react-luminus-components 1.4.31 → 1.4.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.vite/manifest.json +26 -26
- package/dist/{FormDisabledProvider-B8C0lCsy.js → FormDisabledProvider-Ch-vDjrq.js} +1 -1
- package/dist/{FormDisabledProvider-SOoHvwR4.cjs → FormDisabledProvider-EDeNuvxV.cjs} +1 -1
- package/dist/{ShortcutLinksContext-Kp3xhyo9.cjs → ShortcutLinksContext-BtGiohBt.cjs} +1 -1
- package/dist/{ShortcutLinksContext-BvfazLRE.js → ShortcutLinksContext-JGNprvNi.js} +4 -4
- package/dist/contexts.cjs.js +1 -1
- package/dist/contexts.es.js +5 -5
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.es.js +3 -3
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.es.js +2 -2
- package/dist/main.cjs.js +2 -2
- package/dist/main.es.js +5 -5
- package/dist/{useLocalStorageState-CGWxxO8t.cjs → useLocalStorageState-Chn1OW--.cjs} +1 -1
- package/dist/{useLocalStorageState-B7i5ztuC.js → useLocalStorageState-D8hmkEYj.js} +1 -1
- package/dist/utils.cjs.js +1 -1
- package/dist/utils.es.js +2 -2
- package/package.json +1 -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 uv;function m8(){return uv||(uv=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,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,_=e?Symbol.for("react.responder"):60118,w=e?Symbol.for("react.scope"):60119;function x(R){return typeof R=="string"||typeof R=="function"||R===r||R===l||R===a||R===i||R===d||R===f||typeof R=="object"&&R!==null&&(R.$$typeof===g||R.$$typeof===h||R.$$typeof===o||R.$$typeof===s||R.$$typeof===u||R.$$typeof===v||R.$$typeof===_||R.$$typeof===w||R.$$typeof===p)}function T(R){if(typeof R=="object"&&R!==null){var Z=R.$$typeof;switch(Z){case t:var J=R.type;switch(J){case c:case l:case r:case a:case i:case d:return J;default:var ne=J&&J.$$typeof;switch(ne){case s:case u:case g:case h:case o:return ne;default:return Z}}case n:return Z}}}var b=c,k=l,j=s,S=o,O=t,E=u,C=r,M=g,$=h,A=n,P=a,N=i,F=d,z=!1;function q(R){return z||(z=!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.")),W(R)||T(R)===c}function W(R){return T(R)===l}function G(R){return T(R)===s}function ee(R){return T(R)===o}function ie(R){return typeof R=="object"&&R!==null&&R.$$typeof===t}function Q(R){return T(R)===u}function X(R){return T(R)===r}function K(R){return T(R)===g}function te(R){return T(R)===h}function D(R){return T(R)===n}function I(R){return T(R)===a}function L(R){return T(R)===i}function V(R){return T(R)===d}_t.AsyncMode=b,_t.ConcurrentMode=k,_t.ContextConsumer=j,_t.ContextProvider=S,_t.Element=O,_t.ForwardRef=E,_t.Fragment=C,_t.Lazy=M,_t.Memo=$,_t.Portal=A,_t.Profiler=P,_t.StrictMode=N,_t.Suspense=F,_t.isAsyncMode=q,_t.isConcurrentMode=W,_t.isContextConsumer=G,_t.isContextProvider=ee,_t.isElement=ie,_t.isForwardRef=Q,_t.isFragment=X,_t.isLazy=K,_t.isMemo=te,_t.isPortal=D,_t.isProfiler=I,_t.isStrictMode=L,_t.isSuspense=V,_t.isValidElementType=x,_t.typeOf=T}()),_t}var dv;function g8(){return dv||(dv=1,process.env.NODE_ENV==="production"?Rc.exports=p8():Rc.exports=m8()),Rc.exports}var pf,fv;function v8(){if(fv)return pf;fv=1;var e=g8(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},r={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};a[e.ForwardRef]=r,a[e.Memo]=i;function o(g){return e.isMemo(g)?i:a[g.$$typeof]||t}var s=Object.defineProperty,c=Object.getOwnPropertyNames,l=Object.getOwnPropertySymbols,u=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,f=Object.prototype;function h(g,p,v){if(typeof p!="string"){if(f){var _=d(p);_&&_!==f&&h(g,_,v)}var w=c(p);l&&(w=w.concat(l(p)));for(var x=o(g),T=o(p),b=0;b<w.length;++b){var k=w[b];if(!n[k]&&!(v&&v[k])&&!(T&&T[k])&&!(x&&x[k])){var j=u(p,k);try{s(g,k,j)}catch{}}}}return g}return pf=h,pf}v8();function y8(){return typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"}function nm(e,t){const n=m.useContext(h8);if(!n)throw new Error("Missing <CookiesProvider>");const i=Object.assign(Object.assign({},{doNotUpdate:!0}),t),[a,o]=m.useState(()=>n.getAll(i));y8()&&m.useLayoutEffect(()=>{function u(){const d=n.getAll(i);b8(e||null,d,a)&&o(d)}return n.addChangeListener(u),()=>{n.removeChangeListener(u)}},[n,a]);const s=m.useMemo(()=>n.set.bind(n),[n]),c=m.useMemo(()=>n.remove.bind(n),[n]),l=m.useMemo(()=>n.update.bind(n),[n]);return[a,s,c,l]}function b8(e,t,n){if(!e)return!0;for(let r of e)if(t[r]!==n[r])return!0;return!1}const x8=()=>{const{axiosOptions:e,cookieDomain:t}=m.useContext(Kt),[,n,r]=nm(["Authorization"]),i=zt.create(e),a=m.useCallback(()=>{const l=localStorage.getItem("token");return l?{token:l,expiresOn:mb(new Date(Date.now()),1)}:null},[]),o=m.useCallback(()=>{const l=a();return l!==null&&l.token.length>0},[a]),s=m.useCallback(async(l,u)=>i.post("/user/login",{kid:l,password:u}).then(d=>(localStorage.setItem("token",d.data),n("Authorization",d.data,{path:"/",secure:!0,sameSite:"none",domain:t,expires:fb(new Date(Date.now()),24)}),d.data)).catch(d=>(console.log(d),null)),[i,n,t]),c=m.useCallback(()=>{localStorage.removeItem("token"),localStorage.removeItem("user"),r("Authorization")},[r]);return{isAuthenticated:o,login:s,logout:c,getToken:a}},_8=()=>{const[,,e]=nm(["Authorization"]),{msalScopes:t,msalExtraScopes:n}=m.useContext(om),{instance:r,inProgress:i}=r0.useMsal(),a=r0.useIsAuthenticated(),o=m.useCallback(async()=>{var h;const d=r.getActiveAccount(),f=d??((h=r.getAllAccounts())==null?void 0:h.at(0))??void 0;return f?(d||r.setActiveAccount(f),r.acquireTokenSilent({scopes:t,account:f}).then(g=>({token:g.accessToken,expiresOn:g.expiresOn??new Date(Date.now())})).catch(g=>{if(console.error("Error acquiring token",g),g instanceof n0.InteractionRequiredAuthError)return console.log("Silent token acquisition failed. Acquiring token using popup"),r.acquireTokenPopup({scopes:t,extraScopesToConsent:n}),null;throw g})):null},[r,t,n]),s=m.useCallback(()=>a,[a]),c=m.useCallback(()=>!s()&&i!==n0.InteractionStatus.None,[s,i]),l=m.useCallback(async()=>r.loginPopup({scopes:t,extraScopesToConsent:n}).then(()=>"").catch(()=>null),[r,t,n]),u=m.useCallback(()=>{r.logout(),localStorage.removeItem("user"),e("Authorization")},[e,r]);return{isAuthenticated:s,isAuthenticating:c,login:l,logout:u,getToken:o}},V2=()=>{const{useMsal:e}=m.useContext(om),t=x8(),n=_8();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}},w8="_toast_1s57i_1",jo={toast:w8},C8=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}},Su=()=>({addNotification:m.useCallback((t,n)=>{const r=h2(t),i=C8(n),a=y.jsxs(y.Fragment,{children:[r,y.jsx(Jx,{onClick:()=>ba.dismiss(r),type:"button",style:{position:"absolute",fontSize:"12px",top:"calc(50% - 6px)",right:"8px"}})]});switch(n){case"success":{ba(a,{id:r,duration:i,position:"top-center",icon:y.jsx(oO,{size:12}),className:oe("luminus-toast-success rounded shadow bg-success",jo.toast)});break}case"danger":{ba(a,{id:r,duration:i,position:"top-center",icon:y.jsx(KS,{size:12}),className:oe("luminus-toast-danger rounded shadow bg-danger",jo.toast)});break}case"warning":{ba(a,{id:r,duration:i,position:"top-center",icon:y.jsx(qS,{size:12}),className:oe("luminus-toast-warning rounded shadow bg-warning",jo.toast)});break}case"info":{ba(a,{id:r,duration:i,position:"top-center",icon:y.jsx(GS,{size:12}),className:oe("luminus-toast-info rounded shadow bg-info",jo.toast)});break}case"prompt":{ba(a,{id:r,duration:i,position:"top-center",icon:y.jsx(ZS,{size:12}),className:oe("luminus-toast-prompt rounded shadow bg-light",jo.toast)});break}}},[])}),T8=zt.CancelToken,Ou=e=>{const{authenticated:t=!0,differentBaseUrl:n,silent:r=!1,customToken:i,ignoreDelegation:a,noToastOnStatus:o}={...e},{language:s,axiosOptions:c,texts:{axios:l}}=m.useContext(Kt),{delegation:u}=m.useContext(o_),d=m.useMemo(()=>(u==null?void 0:u.id)??null,[u==null?void 0:u.id]),{addNotification:f}=Su(),{getToken:h}=V2(),p=m.useRef(zt.create(c)).current,v=m.useRef(t),_=m.useRef(i),w=m.useRef(d),x=m.useRef(a),T=m.useRef(s),b=m.useRef(h);m.useEffect(()=>{v.current=t,_.current=i,w.current=d,x.current=a,T.current=s,b.current=h},[t,i,d,a,s,h]);const k=async S=>{var O,E,C;if(v.current&&!S.headers.Authorization){const M=_.current?{token:_.current,expiresOn:fb(new Date(Date.now()),1)}:await b.current();if(!M)return console.log("No bearer token"),Promise.reject(new Error("No bearer token"));if(f6(M.expiresOn))return console.log("Token expired"),Promise.reject(new Error("Token expired"));S.headers.Authorization=`Bearer ${M.token}`}return w.current!==null&&!x.current&&(S.headers.DelegationId=w.current.toString()),(O=S.url)!=null&&O.includes("culture=")?S.url=(E=S.url)==null?void 0:E.replace(/culture=[a-z]{2}/,`culture=${T.current}`):S.url=`${S.url}${(C=S.url)!=null&&C.includes("?")?"&":"?"}culture=${T.current}`,S},j=S=>{var C,M;if(console.log(S),zt.isCancel(S))return Promise.reject(S);const O=Gp(S);if(O.length>0){const $=O.find(A=>A.name.toLowerCase()==="others");return $?(!r&&f($.errors,"danger"),Promise.reject(S)):(!r&&f(l.validationError,"warning"),Promise.reject(S))}const E=d2(S);return E!==null?(!r&&f(`${l.permissionError}: ${fs(", ",...E)}`,"danger"),Promise.reject(S)):(o??[]).includes((C=S.response)==null?void 0:C.status)?Promise.reject(S):((M=S.response)==null?void 0:M.status)===403?(!r&&f(l.forbiddenError,"danger"),Promise.reject(S)):S.message&&S.message==="Network Error"?(!r&&f(l.networkError,"danger"),Promise.reject(S)):(zt.isCancel(S)||(S.response||S.request)&&!r&&f(l.unexpectedError,"danger"),Promise.reject(S))};return m.useEffect(()=>{n&&(p.defaults.baseURL=n);const S=p.interceptors.request.use(k,E=>Promise.reject(E)),O=p.interceptors.response.use(E=>E,j);return()=>{p.interceptors.request.eject(S),p.interceptors.response.eject(O)}},[n]),p};let Po;const rm=()=>{const{show:e,text:t,showConfirm:n,hideConfirm:r,textSm:i}=m.useContext(t2),a=()=>{r()};return{confirm:async(l,u)=>(n(l,u),new Promise(d=>{Po=d})),onConfirm:()=>{a(),Po&&Po(!0)},onCancel:()=>{a(),Po&&Po(!1)},show:e,text:t,textSm:i}};var ut;(function(e){e.assertEqual=i=>i;function t(i){}e.assertIs=t;function n(i){throw new Error}e.assertNever=n,e.arrayToEnum=i=>{const a={};for(const o of i)a[o]=o;return a},e.getValidEnumValues=i=>{const a=e.objectKeys(i).filter(s=>typeof i[i[s]]!="number"),o={};for(const s of a)o[s]=i[s];return e.objectValues(o)},e.objectValues=i=>e.objectKeys(i).map(function(a){return i[a]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const a=[];for(const o in i)Object.prototype.hasOwnProperty.call(i,o)&&a.push(o);return a},e.find=(i,a)=>{for(const o of i)if(a(o))return o},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function r(i,a=" | "){return i.map(o=>typeof o=="string"?`'${o}'`:o).join(a)}e.joinValues=r,e.jsonStringifyReplacer=(i,a)=>typeof a=="bigint"?a.toString():a})(ut||(ut={}));var _h;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(_h||(_h={}));const we=ut.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),ai=e=>{switch(typeof e){case"undefined":return we.undefined;case"string":return we.string;case"number":return isNaN(e)?we.nan:we.number;case"boolean":return we.boolean;case"function":return we.function;case"bigint":return we.bigint;case"symbol":return we.symbol;case"object":return Array.isArray(e)?we.array:e===null?we.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?we.promise:typeof Map<"u"&&e instanceof Map?we.map:typeof Set<"u"&&e instanceof Set?we.set:typeof Date<"u"&&e instanceof Date?we.date:we.object;default:return we.unknown}},fe=ut.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"]),k8=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Ln 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(a){return a.message},r={_errors:[]},i=a=>{for(const o of a.issues)if(o.code==="invalid_union")o.unionErrors.map(i);else if(o.code==="invalid_return_type")i(o.returnTypeError);else if(o.code==="invalid_arguments")i(o.argumentsError);else if(o.path.length===0)r._errors.push(n(o));else{let s=r,c=0;for(;c<o.path.length;){const l=o.path[c];c===o.path.length-1?(s[l]=s[l]||{_errors:[]},s[l]._errors.push(n(o))):s[l]=s[l]||{_errors:[]},s=s[l],c++}}};return i(this),r}static assert(t){if(!(t instanceof Ln))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,ut.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const i of this.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Ln.create=e=>new Ln(e);const qa=(e,t)=>{let n;switch(e.code){case fe.invalid_type:e.received===we.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case fe.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,ut.jsonStringifyReplacer)}`;break;case fe.unrecognized_keys:n=`Unrecognized key(s) in object: ${ut.joinValues(e.keys,", ")}`;break;case fe.invalid_union:n="Invalid input";break;case fe.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${ut.joinValues(e.options)}`;break;case fe.invalid_enum_value:n=`Invalid enum value. Expected ${ut.joinValues(e.options)}, received '${e.received}'`;break;case fe.invalid_arguments:n="Invalid function arguments";break;case fe.invalid_return_type:n="Invalid function return type";break;case fe.invalid_date:n="Invalid date";break;case fe.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}"`:ut.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case fe.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 fe.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 fe.custom:n="Invalid input";break;case fe.invalid_intersection_types:n="Intersection results could not be merged";break;case fe.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case fe.not_finite:n="Number must be finite";break;default:n=t.defaultError,ut.assertNever(e)}return{message:n}};let q2=qa;function S8(e){q2=e}function kl(){return q2}const Sl=e=>{const{data:t,path:n,errorMaps:r,issueData:i}=e,a=[...n,...i.path||[]],o={...i,path:a};if(i.message!==void 0)return{...i,path:a,message:i.message};let s="";const c=r.filter(l=>!!l).slice().reverse();for(const l of c)s=l(o,{data:t,defaultError:s}).message;return{...i,path:a,message:s}},O8=[];function _e(e,t){const n=kl(),r=Sl({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===qa?void 0:qa].filter(i=>!!i)});e.common.issues.push(r)}class yn{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 i of n){if(i.status==="aborted")return Ue;i.status==="dirty"&&t.dirty(),r.push(i.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const i of n){const a=await i.key,o=await i.value;r.push({key:a,value:o})}return yn.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const i of n){const{key:a,value:o}=i;if(a.status==="aborted"||o.status==="aborted")return Ue;a.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),a.value!=="__proto__"&&(typeof o.value<"u"||i.alwaysSet)&&(r[a.value]=o.value)}return{status:t.value,value:r}}}const Ue=Object.freeze({status:"aborted"}),Oa=e=>({status:"dirty",value:e}),kn=e=>({status:"valid",value:e}),wh=e=>e.status==="aborted",Ch=e=>e.status==="dirty",ps=e=>e.status==="valid",ms=e=>typeof Promise<"u"&&e instanceof Promise;function Ol(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 Y2(e,t,n,r,i){if(typeof t=="function"?e!==t||!i:!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 Ae;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Ae||(Ae={}));var Go,Zo;class yr{constructor(t,n,r,i){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=i}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 hv=(e,t)=>{if(ps(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 Ln(e.common.issues);return this._error=n,this._error}}};function Ke(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:i}=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:i}:{errorMap:(o,s)=>{var c,l;const{message:u}=e;return o.code==="invalid_enum_value"?{message:u??s.defaultError}:typeof s.data>"u"?{message:(c=u??r)!==null&&c!==void 0?c:s.defaultError}:o.code!=="invalid_type"?{message:s.defaultError}:{message:(l=u??n)!==null&&l!==void 0?l:s.defaultError}},description:i}}class tt{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 ai(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:ai(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new yn,ctx:{common:t.parent.common,data:t.data,parsedType:ai(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(ms(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 i={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:ai(t)},a=this._parseSync({data:t,path:i.path,parent:i});return hv(i,a)}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:ai(t)},i=this._parse({data:t,path:r.path,parent:r}),a=await(ms(i)?i:Promise.resolve(i));return hv(r,a)}refine(t,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,a)=>{const o=t(i),s=()=>a.addIssue({code:fe.custom,...r(i)});return typeof Promise<"u"&&o instanceof Promise?o.then(c=>c?!0:(s(),!1)):o?!0:(s(),!1)})}refinement(t,n){return this._refinement((r,i)=>t(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(t){return new cr({schema:this,typeName:Be.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return gr.create(this,this._def)}nullable(){return gi.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return or.create(this,this._def)}promise(){return Ga.create(this,this._def)}or(t){return bs.create([this,t],this._def)}and(t){return xs.create(this,t,this._def)}transform(t){return new cr({...Ke(this._def),schema:this,typeName:Be.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new ks({...Ke(this._def),innerType:this,defaultValue:n,typeName:Be.ZodDefault})}brand(){return new im({typeName:Be.ZodBranded,type:this,...Ke(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Ss({...Ke(this._def),innerType:this,catchValue:n,typeName:Be.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return tc.create(this,t)}readonly(){return Os.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const E8=/^c[^\s-]{8,}$/i,M8=/^[0-9a-z]+$/,$8=/^[0-9A-HJKMNP-TV-Z]{26}$/,A8=/^[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,R8=/^[a-z0-9_-]{21}$/i,j8=/^[-+]?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)?)??$/,P8=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,I8="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let mf;const D8=/^(?:(?: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])$/,N8=/^(([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})))$/,L8=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,G2="((\\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])))",F8=new RegExp(`^${G2}$`);function Z2(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 B8(e){return new RegExp(`^${Z2(e)}$`)}function K2(e){let t=`${G2}T${Z2(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 U8(e,t){return!!((t==="v4"||!t)&&D8.test(e)||(t==="v6"||!t)&&N8.test(e))}class ir extends tt{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==we.string){const a=this._getOrReturnCtx(t);return _e(a,{code:fe.invalid_type,expected:we.string,received:a.parsedType}),Ue}const r=new yn;let i;for(const a of this._def.checks)if(a.kind==="min")t.data.length<a.value&&(i=this._getOrReturnCtx(t,i),_e(i,{code:fe.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="max")t.data.length>a.value&&(i=this._getOrReturnCtx(t,i),_e(i,{code:fe.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="length"){const o=t.data.length>a.value,s=t.data.length<a.value;(o||s)&&(i=this._getOrReturnCtx(t,i),o?_e(i,{code:fe.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):s&&_e(i,{code:fe.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),r.dirty())}else if(a.kind==="email")P8.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"email",code:fe.invalid_string,message:a.message}),r.dirty());else if(a.kind==="emoji")mf||(mf=new RegExp(I8,"u")),mf.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"emoji",code:fe.invalid_string,message:a.message}),r.dirty());else if(a.kind==="uuid")A8.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"uuid",code:fe.invalid_string,message:a.message}),r.dirty());else if(a.kind==="nanoid")R8.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"nanoid",code:fe.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid")E8.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"cuid",code:fe.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid2")M8.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"cuid2",code:fe.invalid_string,message:a.message}),r.dirty());else if(a.kind==="ulid")$8.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"ulid",code:fe.invalid_string,message:a.message}),r.dirty());else if(a.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),_e(i,{validation:"url",code:fe.invalid_string,message:a.message}),r.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"regex",code:fe.invalid_string,message:a.message}),r.dirty())):a.kind==="trim"?t.data=t.data.trim():a.kind==="includes"?t.data.includes(a.value,a.position)||(i=this._getOrReturnCtx(t,i),_e(i,{code:fe.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),r.dirty()):a.kind==="toLowerCase"?t.data=t.data.toLowerCase():a.kind==="toUpperCase"?t.data=t.data.toUpperCase():a.kind==="startsWith"?t.data.startsWith(a.value)||(i=this._getOrReturnCtx(t,i),_e(i,{code:fe.invalid_string,validation:{startsWith:a.value},message:a.message}),r.dirty()):a.kind==="endsWith"?t.data.endsWith(a.value)||(i=this._getOrReturnCtx(t,i),_e(i,{code:fe.invalid_string,validation:{endsWith:a.value},message:a.message}),r.dirty()):a.kind==="datetime"?K2(a).test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{code:fe.invalid_string,validation:"datetime",message:a.message}),r.dirty()):a.kind==="date"?F8.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{code:fe.invalid_string,validation:"date",message:a.message}),r.dirty()):a.kind==="time"?B8(a).test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{code:fe.invalid_string,validation:"time",message:a.message}),r.dirty()):a.kind==="duration"?j8.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"duration",code:fe.invalid_string,message:a.message}),r.dirty()):a.kind==="ip"?U8(t.data,a.version)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"ip",code:fe.invalid_string,message:a.message}),r.dirty()):a.kind==="base64"?L8.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"base64",code:fe.invalid_string,message:a.message}),r.dirty()):ut.assertNever(a);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(i=>t.test(i),{validation:n,code:fe.invalid_string,...Ae.errToObj(r)})}_addCheck(t){return new ir({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Ae.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Ae.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Ae.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Ae.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Ae.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Ae.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Ae.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Ae.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Ae.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Ae.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,...Ae.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,...Ae.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...Ae.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Ae.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...Ae.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Ae.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Ae.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Ae.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Ae.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Ae.errToObj(n)})}nonempty(t){return this.min(1,Ae.errToObj(t))}trim(){return new ir({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ir({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ir({...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}}ir.create=e=>{var t;return new ir({checks:[],typeName:Be.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ke(e)})};function W8(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r,a=parseInt(e.toFixed(i).replace(".","")),o=parseInt(t.toFixed(i).replace(".",""));return a%o/Math.pow(10,i)}class hi extends tt{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)!==we.number){const a=this._getOrReturnCtx(t);return _e(a,{code:fe.invalid_type,expected:we.number,received:a.parsedType}),Ue}let r;const i=new yn;for(const a of this._def.checks)a.kind==="int"?ut.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),_e(r,{code:fe.invalid_type,expected:"integer",received:"float",message:a.message}),i.dirty()):a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(r=this._getOrReturnCtx(t,r),_e(r,{code:fe.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(r=this._getOrReturnCtx(t,r),_e(r,{code:fe.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="multipleOf"?W8(t.data,a.value)!==0&&(r=this._getOrReturnCtx(t,r),_e(r,{code:fe.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):a.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),_e(r,{code:fe.not_finite,message:a.message}),i.dirty()):ut.assertNever(a);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Ae.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ae.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ae.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ae.toString(n))}setLimit(t,n,r,i){return new hi({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ae.toString(i)}]})}_addCheck(t){return new hi({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Ae.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ae.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ae.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ae.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ae.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ae.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Ae.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Ae.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Ae.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"&&ut.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)}}hi.create=e=>new hi({checks:[],typeName:Be.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Ke(e)});class pi extends tt{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)!==we.bigint){const a=this._getOrReturnCtx(t);return _e(a,{code:fe.invalid_type,expected:we.bigint,received:a.parsedType}),Ue}let r;const i=new yn;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(r=this._getOrReturnCtx(t,r),_e(r,{code:fe.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(r=this._getOrReturnCtx(t,r),_e(r,{code:fe.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="multipleOf"?t.data%a.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),_e(r,{code:fe.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):ut.assertNever(a);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Ae.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ae.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ae.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ae.toString(n))}setLimit(t,n,r,i){return new pi({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ae.toString(i)}]})}_addCheck(t){return new pi({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Ae.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Ae.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Ae.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Ae.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ae.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}}pi.create=e=>{var t;return new pi({checks:[],typeName:Be.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ke(e)})};class gs extends tt{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==we.boolean){const r=this._getOrReturnCtx(t);return _e(r,{code:fe.invalid_type,expected:we.boolean,received:r.parsedType}),Ue}return kn(t.data)}}gs.create=e=>new gs({typeName:Be.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Ke(e)});class Ki extends tt{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==we.date){const a=this._getOrReturnCtx(t);return _e(a,{code:fe.invalid_type,expected:we.date,received:a.parsedType}),Ue}if(isNaN(t.data.getTime())){const a=this._getOrReturnCtx(t);return _e(a,{code:fe.invalid_date}),Ue}const r=new yn;let i;for(const a of this._def.checks)a.kind==="min"?t.data.getTime()<a.value&&(i=this._getOrReturnCtx(t,i),_e(i,{code:fe.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),r.dirty()):a.kind==="max"?t.data.getTime()>a.value&&(i=this._getOrReturnCtx(t,i),_e(i,{code:fe.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),r.dirty()):ut.assertNever(a);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Ki({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Ae.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Ae.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}}Ki.create=e=>new Ki({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Be.ZodDate,...Ke(e)});class El extends tt{_parse(t){if(this._getType(t)!==we.symbol){const r=this._getOrReturnCtx(t);return _e(r,{code:fe.invalid_type,expected:we.symbol,received:r.parsedType}),Ue}return kn(t.data)}}El.create=e=>new El({typeName:Be.ZodSymbol,...Ke(e)});class vs extends tt{_parse(t){if(this._getType(t)!==we.undefined){const r=this._getOrReturnCtx(t);return _e(r,{code:fe.invalid_type,expected:we.undefined,received:r.parsedType}),Ue}return kn(t.data)}}vs.create=e=>new vs({typeName:Be.ZodUndefined,...Ke(e)});class ys extends tt{_parse(t){if(this._getType(t)!==we.null){const r=this._getOrReturnCtx(t);return _e(r,{code:fe.invalid_type,expected:we.null,received:r.parsedType}),Ue}return kn(t.data)}}ys.create=e=>new ys({typeName:Be.ZodNull,...Ke(e)});class Ya extends tt{constructor(){super(...arguments),this._any=!0}_parse(t){return kn(t.data)}}Ya.create=e=>new Ya({typeName:Be.ZodAny,...Ke(e)});class zi extends tt{constructor(){super(...arguments),this._unknown=!0}_parse(t){return kn(t.data)}}zi.create=e=>new zi({typeName:Be.ZodUnknown,...Ke(e)});class Vr extends tt{_parse(t){const n=this._getOrReturnCtx(t);return _e(n,{code:fe.invalid_type,expected:we.never,received:n.parsedType}),Ue}}Vr.create=e=>new Vr({typeName:Be.ZodNever,...Ke(e)});class Ml extends tt{_parse(t){if(this._getType(t)!==we.undefined){const r=this._getOrReturnCtx(t);return _e(r,{code:fe.invalid_type,expected:we.void,received:r.parsedType}),Ue}return kn(t.data)}}Ml.create=e=>new Ml({typeName:Be.ZodVoid,...Ke(e)});class or extends tt{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==we.array)return _e(n,{code:fe.invalid_type,expected:we.array,received:n.parsedType}),Ue;if(i.exactLength!==null){const o=n.data.length>i.exactLength.value,s=n.data.length<i.exactLength.value;(o||s)&&(_e(n,{code:o?fe.too_big:fe.too_small,minimum:s?i.exactLength.value:void 0,maximum:o?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),r.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(_e(n,{code:fe.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(_e(n,{code:fe.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((o,s)=>i.type._parseAsync(new yr(n,o,n.path,s)))).then(o=>yn.mergeArray(r,o));const a=[...n.data].map((o,s)=>i.type._parseSync(new yr(n,o,n.path,s)));return yn.mergeArray(r,a)}get element(){return this._def.type}min(t,n){return new or({...this._def,minLength:{value:t,message:Ae.toString(n)}})}max(t,n){return new or({...this._def,maxLength:{value:t,message:Ae.toString(n)}})}length(t,n){return new or({...this._def,exactLength:{value:t,message:Ae.toString(n)}})}nonempty(t){return this.min(1,t)}}or.create=(e,t)=>new or({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Be.ZodArray,...Ke(t)});function Sa(e){if(e instanceof Zt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=gr.create(Sa(r))}return new Zt({...e._def,shape:()=>t})}else return e instanceof or?new or({...e._def,type:Sa(e.element)}):e instanceof gr?gr.create(Sa(e.unwrap())):e instanceof gi?gi.create(Sa(e.unwrap())):e instanceof br?br.create(e.items.map(t=>Sa(t))):e}class Zt extends tt{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=ut.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==we.object){const l=this._getOrReturnCtx(t);return _e(l,{code:fe.invalid_type,expected:we.object,received:l.parsedType}),Ue}const{status:r,ctx:i}=this._processInputParams(t),{shape:a,keys:o}=this._getCached(),s=[];if(!(this._def.catchall instanceof Vr&&this._def.unknownKeys==="strip"))for(const l in i.data)o.includes(l)||s.push(l);const c=[];for(const l of o){const u=a[l],d=i.data[l];c.push({key:{status:"valid",value:l},value:u._parse(new yr(i,d,i.path,l)),alwaysSet:l in i.data})}if(this._def.catchall instanceof Vr){const l=this._def.unknownKeys;if(l==="passthrough")for(const u of s)c.push({key:{status:"valid",value:u},value:{status:"valid",value:i.data[u]}});else if(l==="strict")s.length>0&&(_e(i,{code:fe.unrecognized_keys,keys:s}),r.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const u of s){const d=i.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new yr(i,d,i.path,u)),alwaysSet:u in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const l=[];for(const u of c){const d=await u.key,f=await u.value;l.push({key:d,value:f,alwaysSet:u.alwaysSet})}return l}).then(l=>yn.mergeObjectSync(r,l)):yn.mergeObjectSync(r,c)}get shape(){return this._def.shape()}strict(t){return Ae.errToObj,new Zt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var i,a,o,s;const c=(o=(a=(i=this._def).errorMap)===null||a===void 0?void 0:a.call(i,n,r).message)!==null&&o!==void 0?o:r.defaultError;return n.code==="unrecognized_keys"?{message:(s=Ae.errToObj(t).message)!==null&&s!==void 0?s:c}:{message:c}}}:{}})}strip(){return new Zt({...this._def,unknownKeys:"strip"})}passthrough(){return new Zt({...this._def,unknownKeys:"passthrough"})}extend(t){return new Zt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Zt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Be.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Zt({...this._def,catchall:t})}pick(t){const n={};return ut.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new Zt({...this._def,shape:()=>n})}omit(t){const n={};return ut.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new Zt({...this._def,shape:()=>n})}deepPartial(){return Sa(this)}partial(t){const n={};return ut.objectKeys(this.shape).forEach(r=>{const i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i.optional()}),new Zt({...this._def,shape:()=>n})}required(t){const n={};return ut.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let a=this.shape[r];for(;a instanceof gr;)a=a._def.innerType;n[r]=a}}),new Zt({...this._def,shape:()=>n})}keyof(){return X2(ut.objectKeys(this.shape))}}Zt.create=(e,t)=>new Zt({shape:()=>e,unknownKeys:"strip",catchall:Vr.create(),typeName:Be.ZodObject,...Ke(t)});Zt.strictCreate=(e,t)=>new Zt({shape:()=>e,unknownKeys:"strict",catchall:Vr.create(),typeName:Be.ZodObject,...Ke(t)});Zt.lazycreate=(e,t)=>new Zt({shape:e,unknownKeys:"strip",catchall:Vr.create(),typeName:Be.ZodObject,...Ke(t)});class bs extends tt{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function i(a){for(const s of a)if(s.result.status==="valid")return s.result;for(const s of a)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const o=a.map(s=>new Ln(s.ctx.common.issues));return _e(n,{code:fe.invalid_union,unionErrors:o}),Ue}if(n.common.async)return Promise.all(r.map(async a=>{const o={...n,common:{...n.common,issues:[]},parent:null};return{result:await a._parseAsync({data:n.data,path:n.path,parent:o}),ctx:o}})).then(i);{let a;const o=[];for(const c of r){const l={...n,common:{...n.common,issues:[]},parent:null},u=c._parseSync({data:n.data,path:n.path,parent:l});if(u.status==="valid")return u;u.status==="dirty"&&!a&&(a={result:u,ctx:l}),l.common.issues.length&&o.push(l.common.issues)}if(a)return n.common.issues.push(...a.ctx.common.issues),a.result;const s=o.map(c=>new Ln(c));return _e(n,{code:fe.invalid_union,unionErrors:s}),Ue}}get options(){return this._def.options}}bs.create=(e,t)=>new bs({options:e,typeName:Be.ZodUnion,...Ke(t)});const Pr=e=>e instanceof ws?Pr(e.schema):e instanceof cr?Pr(e.innerType()):e instanceof Cs?[e.value]:e instanceof mi?e.options:e instanceof Ts?ut.objectValues(e.enum):e instanceof ks?Pr(e._def.innerType):e instanceof vs?[void 0]:e instanceof ys?[null]:e instanceof gr?[void 0,...Pr(e.unwrap())]:e instanceof gi?[null,...Pr(e.unwrap())]:e instanceof im||e instanceof Os?Pr(e.unwrap()):e instanceof Ss?Pr(e._def.innerType):[];class Eu extends tt{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==we.object)return _e(n,{code:fe.invalid_type,expected:we.object,received:n.parsedType}),Ue;const r=this.discriminator,i=n.data[r],a=this.optionsMap.get(i);return a?n.common.async?a._parseAsync({data:n.data,path:n.path,parent:n}):a._parseSync({data:n.data,path:n.path,parent:n}):(_e(n,{code:fe.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Ue)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const i=new Map;for(const a of n){const o=Pr(a.shape[t]);if(!o.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const s of o){if(i.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);i.set(s,a)}}return new Eu({typeName:Be.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...Ke(r)})}}function Th(e,t){const n=ai(e),r=ai(t);if(e===t)return{valid:!0,data:e};if(n===we.object&&r===we.object){const i=ut.objectKeys(t),a=ut.objectKeys(e).filter(s=>i.indexOf(s)!==-1),o={...e,...t};for(const s of a){const c=Th(e[s],t[s]);if(!c.valid)return{valid:!1};o[s]=c.data}return{valid:!0,data:o}}else if(n===we.array&&r===we.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let a=0;a<e.length;a++){const o=e[a],s=t[a],c=Th(o,s);if(!c.valid)return{valid:!1};i.push(c.data)}return{valid:!0,data:i}}else return n===we.date&&r===we.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class xs extends tt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=(a,o)=>{if(wh(a)||wh(o))return Ue;const s=Th(a.value,o.value);return s.valid?((Ch(a)||Ch(o))&&n.dirty(),{status:n.value,value:s.data}):(_e(r,{code:fe.invalid_intersection_types}),Ue)};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(([a,o])=>i(a,o)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}xs.create=(e,t,n)=>new xs({left:e,right:t,typeName:Be.ZodIntersection,...Ke(n)});class br extends tt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==we.array)return _e(r,{code:fe.invalid_type,expected:we.array,received:r.parsedType}),Ue;if(r.data.length<this._def.items.length)return _e(r,{code:fe.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ue;!this._def.rest&&r.data.length>this._def.items.length&&(_e(r,{code:fe.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const a=[...r.data].map((o,s)=>{const c=this._def.items[s]||this._def.rest;return c?c._parse(new yr(r,o,r.path,s)):null}).filter(o=>!!o);return r.common.async?Promise.all(a).then(o=>yn.mergeArray(n,o)):yn.mergeArray(n,a)}get items(){return this._def.items}rest(t){return new br({...this._def,rest:t})}}br.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new br({items:e,typeName:Be.ZodTuple,rest:null,...Ke(t)})};class _s extends tt{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!==we.object)return _e(r,{code:fe.invalid_type,expected:we.object,received:r.parsedType}),Ue;const i=[],a=this._def.keyType,o=this._def.valueType;for(const s in r.data)i.push({key:a._parse(new yr(r,s,r.path,s)),value:o._parse(new yr(r,r.data[s],r.path,s)),alwaysSet:s in r.data});return r.common.async?yn.mergeObjectAsync(n,i):yn.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof tt?new _s({keyType:t,valueType:n,typeName:Be.ZodRecord,...Ke(r)}):new _s({keyType:ir.create(),valueType:t,typeName:Be.ZodRecord,...Ke(n)})}}class $l extends tt{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!==we.map)return _e(r,{code:fe.invalid_type,expected:we.map,received:r.parsedType}),Ue;const i=this._def.keyType,a=this._def.valueType,o=[...r.data.entries()].map(([s,c],l)=>({key:i._parse(new yr(r,s,r.path,[l,"key"])),value:a._parse(new yr(r,c,r.path,[l,"value"]))}));if(r.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const c of o){const l=await c.key,u=await c.value;if(l.status==="aborted"||u.status==="aborted")return Ue;(l.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(l.value,u.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const c of o){const l=c.key,u=c.value;if(l.status==="aborted"||u.status==="aborted")return Ue;(l.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(l.value,u.value)}return{status:n.value,value:s}}}}$l.create=(e,t,n)=>new $l({valueType:t,keyType:e,typeName:Be.ZodMap,...Ke(n)});class Xi extends tt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==we.set)return _e(r,{code:fe.invalid_type,expected:we.set,received:r.parsedType}),Ue;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(_e(r,{code:fe.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&r.data.size>i.maxSize.value&&(_e(r,{code:fe.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const a=this._def.valueType;function o(c){const l=new Set;for(const u of c){if(u.status==="aborted")return Ue;u.status==="dirty"&&n.dirty(),l.add(u.value)}return{status:n.value,value:l}}const s=[...r.data.values()].map((c,l)=>a._parse(new yr(r,c,r.path,l)));return r.common.async?Promise.all(s).then(c=>o(c)):o(s)}min(t,n){return new Xi({...this._def,minSize:{value:t,message:Ae.toString(n)}})}max(t,n){return new Xi({...this._def,maxSize:{value:t,message:Ae.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Xi.create=(e,t)=>new Xi({valueType:e,minSize:null,maxSize:null,typeName:Be.ZodSet,...Ke(t)});class Ra extends tt{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==we.function)return _e(n,{code:fe.invalid_type,expected:we.function,received:n.parsedType}),Ue;function r(s,c){return Sl({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,kl(),qa].filter(l=>!!l),issueData:{code:fe.invalid_arguments,argumentsError:c}})}function i(s,c){return Sl({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,kl(),qa].filter(l=>!!l),issueData:{code:fe.invalid_return_type,returnTypeError:c}})}const a={errorMap:n.common.contextualErrorMap},o=n.data;if(this._def.returns instanceof Ga){const s=this;return kn(async function(...c){const l=new Ln([]),u=await s._def.args.parseAsync(c,a).catch(h=>{throw l.addIssue(r(c,h)),l}),d=await Reflect.apply(o,this,u);return await s._def.returns._def.type.parseAsync(d,a).catch(h=>{throw l.addIssue(i(d,h)),l})})}else{const s=this;return kn(function(...c){const l=s._def.args.safeParse(c,a);if(!l.success)throw new Ln([r(c,l.error)]);const u=Reflect.apply(o,this,l.data),d=s._def.returns.safeParse(u,a);if(!d.success)throw new Ln([i(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Ra({...this._def,args:br.create(t).rest(zi.create())})}returns(t){return new Ra({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Ra({args:t||br.create([]).rest(zi.create()),returns:n||zi.create(),typeName:Be.ZodFunction,...Ke(r)})}}class ws extends tt{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})}}ws.create=(e,t)=>new ws({getter:e,typeName:Be.ZodLazy,...Ke(t)});class Cs extends tt{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return _e(n,{received:n.data,code:fe.invalid_literal,expected:this._def.value}),Ue}return{status:"valid",value:t.data}}get value(){return this._def.value}}Cs.create=(e,t)=>new Cs({value:e,typeName:Be.ZodLiteral,...Ke(t)});function X2(e,t){return new mi({values:e,typeName:Be.ZodEnum,...Ke(t)})}class mi extends tt{constructor(){super(...arguments),Go.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return _e(n,{expected:ut.joinValues(r),received:n.parsedType,code:fe.invalid_type}),Ue}if(Ol(this,Go)||Y2(this,Go,new Set(this._def.values)),!Ol(this,Go).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return _e(n,{received:n.data,code:fe.invalid_enum_value,options:r}),Ue}return kn(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 mi.create(t,{...this._def,...n})}exclude(t,n=this._def){return mi.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Go=new WeakMap;mi.create=X2;class Ts extends tt{constructor(){super(...arguments),Zo.set(this,void 0)}_parse(t){const n=ut.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==we.string&&r.parsedType!==we.number){const i=ut.objectValues(n);return _e(r,{expected:ut.joinValues(i),received:r.parsedType,code:fe.invalid_type}),Ue}if(Ol(this,Zo)||Y2(this,Zo,new Set(ut.getValidEnumValues(this._def.values))),!Ol(this,Zo).has(t.data)){const i=ut.objectValues(n);return _e(r,{received:r.data,code:fe.invalid_enum_value,options:i}),Ue}return kn(t.data)}get enum(){return this._def.values}}Zo=new WeakMap;Ts.create=(e,t)=>new Ts({values:e,typeName:Be.ZodNativeEnum,...Ke(t)});class Ga extends tt{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==we.promise&&n.common.async===!1)return _e(n,{code:fe.invalid_type,expected:we.promise,received:n.parsedType}),Ue;const r=n.parsedType===we.promise?n.data:Promise.resolve(n.data);return kn(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Ga.create=(e,t)=>new Ga({type:e,typeName:Be.ZodPromise,...Ke(t)});class cr extends tt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Be.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=this._def.effect||null,a={addIssue:o=>{_e(r,o),o.fatal?n.abort():n.dirty()},get path(){return r.path}};if(a.addIssue=a.addIssue.bind(a),i.type==="preprocess"){const o=i.transform(r.data,a);if(r.common.async)return Promise.resolve(o).then(async s=>{if(n.value==="aborted")return Ue;const c=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});return c.status==="aborted"?Ue:c.status==="dirty"||n.value==="dirty"?Oa(c.value):c});{if(n.value==="aborted")return Ue;const s=this._def.schema._parseSync({data:o,path:r.path,parent:r});return s.status==="aborted"?Ue:s.status==="dirty"||n.value==="dirty"?Oa(s.value):s}}if(i.type==="refinement"){const o=s=>{const c=i.refinement(s,a);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 s};if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Ue:(s.status==="dirty"&&n.dirty(),o(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>s.status==="aborted"?Ue:(s.status==="dirty"&&n.dirty(),o(s.value).then(()=>({status:n.value,value:s.value}))))}if(i.type==="transform")if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!ps(o))return o;const s=i.transform(o.value,a);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>ps(o)?Promise.resolve(i.transform(o.value,a)).then(s=>({status:n.value,value:s})):o);ut.assertNever(i)}}cr.create=(e,t,n)=>new cr({schema:e,typeName:Be.ZodEffects,effect:t,...Ke(n)});cr.createWithPreprocess=(e,t,n)=>new cr({schema:t,effect:{type:"preprocess",transform:e},typeName:Be.ZodEffects,...Ke(n)});class gr extends tt{_parse(t){return this._getType(t)===we.undefined?kn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}gr.create=(e,t)=>new gr({innerType:e,typeName:Be.ZodOptional,...Ke(t)});class gi extends tt{_parse(t){return this._getType(t)===we.null?kn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}gi.create=(e,t)=>new gi({innerType:e,typeName:Be.ZodNullable,...Ke(t)});class ks extends tt{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===we.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}ks.create=(e,t)=>new ks({innerType:e,typeName:Be.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ke(t)});class Ss extends tt{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return ms(i)?i.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Ln(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Ln(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Ss.create=(e,t)=>new Ss({innerType:e,typeName:Be.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ke(t)});class Al extends tt{_parse(t){if(this._getType(t)!==we.nan){const r=this._getOrReturnCtx(t);return _e(r,{code:fe.invalid_type,expected:we.nan,received:r.parsedType}),Ue}return{status:"valid",value:t.data}}}Al.create=e=>new Al({typeName:Be.ZodNaN,...Ke(e)});const z8=Symbol("zod_brand");class im extends tt{_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 tc extends tt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?Ue:a.status==="dirty"?(n.dirty(),Oa(a.value)):this._def.out._parseAsync({data:a.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Ue:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(t,n){return new tc({in:t,out:n,typeName:Be.ZodPipeline})}}class Os extends tt{_parse(t){const n=this._def.innerType._parse(t),r=i=>(ps(i)&&(i.value=Object.freeze(i.value)),i);return ms(n)?n.then(i=>r(i)):r(n)}unwrap(){return this._def.innerType}}Os.create=(e,t)=>new Os({innerType:e,typeName:Be.ZodReadonly,...Ke(t)});function Q2(e,t={},n){return e?Ya.create().superRefine((r,i)=>{var a,o;if(!e(r)){const s=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,c=(o=(a=s.fatal)!==null&&a!==void 0?a:n)!==null&&o!==void 0?o:!0,l=typeof s=="string"?{message:s}:s;i.addIssue({code:"custom",...l,fatal:c})}}):Ya.create()}const H8={object:Zt.lazycreate};var Be;(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"})(Be||(Be={}));const V8=(e,t={message:`Input not instance of ${e.name}`})=>Q2(n=>n instanceof e,t),J2=ir.create,e_=hi.create,q8=Al.create,Y8=pi.create,t_=gs.create,G8=Ki.create,Z8=El.create,K8=vs.create,X8=ys.create,Q8=Ya.create,J8=zi.create,e$=Vr.create,t$=Ml.create,n$=or.create,r$=Zt.create,i$=Zt.strictCreate,a$=bs.create,o$=Eu.create,s$=xs.create,c$=br.create,l$=_s.create,u$=$l.create,d$=Xi.create,f$=Ra.create,h$=ws.create,p$=Cs.create,m$=mi.create,g$=Ts.create,v$=Ga.create,pv=cr.create,y$=gr.create,b$=gi.create,x$=cr.createWithPreprocess,_$=tc.create,w$=()=>J2().optional(),C$=()=>e_().optional(),T$=()=>t_().optional(),k$={string:e=>ir.create({...e,coerce:!0}),number:e=>hi.create({...e,coerce:!0}),boolean:e=>gs.create({...e,coerce:!0}),bigint:e=>pi.create({...e,coerce:!0}),date:e=>Ki.create({...e,coerce:!0})},S$=Ue;var sn=Object.freeze({__proto__:null,defaultErrorMap:qa,setErrorMap:S8,getErrorMap:kl,makeIssue:Sl,EMPTY_PATH:O8,addIssueToContext:_e,ParseStatus:yn,INVALID:Ue,DIRTY:Oa,OK:kn,isAborted:wh,isDirty:Ch,isValid:ps,isAsync:ms,get util(){return ut},get objectUtil(){return _h},ZodParsedType:we,getParsedType:ai,ZodType:tt,datetimeRegex:K2,ZodString:ir,ZodNumber:hi,ZodBigInt:pi,ZodBoolean:gs,ZodDate:Ki,ZodSymbol:El,ZodUndefined:vs,ZodNull:ys,ZodAny:Ya,ZodUnknown:zi,ZodNever:Vr,ZodVoid:Ml,ZodArray:or,ZodObject:Zt,ZodUnion:bs,ZodDiscriminatedUnion:Eu,ZodIntersection:xs,ZodTuple:br,ZodRecord:_s,ZodMap:$l,ZodSet:Xi,ZodFunction:Ra,ZodLazy:ws,ZodLiteral:Cs,ZodEnum:mi,ZodNativeEnum:Ts,ZodPromise:Ga,ZodEffects:cr,ZodTransformer:cr,ZodOptional:gr,ZodNullable:gi,ZodDefault:ks,ZodCatch:Ss,ZodNaN:Al,BRAND:z8,ZodBranded:im,ZodPipeline:tc,ZodReadonly:Os,custom:Q2,Schema:tt,ZodSchema:tt,late:H8,get ZodFirstPartyTypeKind(){return Be},coerce:k$,any:Q8,array:n$,bigint:Y8,boolean:t_,date:G8,discriminatedUnion:o$,effect:pv,enum:m$,function:f$,instanceof:V8,intersection:s$,lazy:h$,literal:p$,map:u$,nan:q8,nativeEnum:g$,never:e$,null:X8,nullable:b$,number:e_,object:r$,oboolean:T$,onumber:C$,optional:y$,ostring:w$,pipeline:_$,preprocess:x$,promise:v$,record:l$,set:d$,strictObject:i$,string:J2,symbol:Z8,transformer:pv,tuple:c$,undefined:K8,union:a$,unknown:J8,void:t$,NEVER:S$,ZodIssueCode:fe,quotelessJson:k8,ZodError:Ln});const Mu=()=>{const{texts:{formValidation:e}}=m.useContext(Kt),t=m.useCallback(p=>{let v=(p!=null&&p.useCoerce?sn.coerce:sn).string({invalid_type_error:e.required,required_error:e.required});return p!=null&&p.email&&(v=v.email(e.invalidEmail)),p!=null&&p.length&&(v=v.min(p.length,e.length(p.length))),p!=null&&p.minLength&&(v=v.min(p.minLength,e.minLength(p.minLength))),p!=null&&p.maxLength&&(v=v.max(p.maxLength,e.maxLength(p.maxLength))),p!=null&&p.numeric&&(v=v.regex(/^\d+$/,e.noCharactersOtherThanNumbers)),p!=null&&p.regex&&(v=v.regex(p.regex,e.invalidFormat)),v.transform(_=>_??null)},[e]),n=m.useCallback(p=>t(p).nullable().optional().transform(v=>v??null),[t]),r=m.useCallback(p=>{const v=(p==null?void 0:p.min)??Number.MIN_SAFE_INTEGER,_=(p==null?void 0:p.max)??Number.MAX_SAFE_INTEGER,w=(p!=null&&p.useCoerce?sn.coerce:sn).number({invalid_type_error:e.required,required_error:e.required}).min(v,e.lessThanMin(v)).max(_,e.moreThanMax(_));return w.transform(x=>x??null),w},[e]),i=m.useCallback(p=>r(p).nullable().optional().transform(v=>v??null),[r]),a=m.useCallback(p=>(p!=null&&p.useCoerce?sn.coerce:sn).boolean({invalid_type_error:e.required,required_error:e.required}).transform(v=>v??null),[e.required]),o=m.useCallback(p=>(p!=null&&p.useCoerce?sn.coerce:sn).string({invalid_type_error:e.required,required_error:e.required}).refine(m2,{message:e.invalidDate}).transform(_=>_??null),[e.invalidDate,e.required]),s=m.useCallback(p=>o(p).nullable().transform(v=>v??null),[o]),c=m.useCallback((p,v)=>sn.enum(p,{invalid_type_error:e.required,required_error:e.required}).transform(w=>w??null),[e.required]),l=m.useCallback((p,v)=>c(p,v).nullable().transform(_=>_??null),[c]),u=m.useCallback(p=>sn.object({id:i({useCoerce:!0})}).nullable().transform(_=>_??null),[i]),d=m.useCallback(p=>sn.object({id:r()}).transform(_=>_??null),[r]),f=m.useCallback(p=>sn.object({id:n({useCoerce:!0})}).nullable().transform(_=>_??null),[n]),h=m.useCallback(p=>sn.object({id:t()}).transform(_=>_??null),[t]),g=m.useCallback(({required:p,multiple:v,maxFileSize:_})=>sn.any().transform(x=>Array.from(x??[])).refine(x=>!p||(x==null?void 0:x.length)>0,"File is required.").refine(x=>v||(x==null?void 0:x.length)<=1,"Multiple files not allowed.").refine(x=>x.every(T=>T.size<=_),`Maximum file size is ${Ha(_)}.`).transform(x=>(v?x:x==null?void 0:x[0])??null),[]);return{zString:n,zStringRequired:t,zNumber:i,zNumberRequired:r,zBool:a,zDate:s,zDateRequired:o,zEnum:l,zEnumRequired:c,zObjectIdInt:u,zObjectIdIntRequired:d,zObjectIdStr:f,zObjectIdStrRequired:h,zFile:g}},n_=(e,t)=>{m.useEffect(()=>{const n=r=>{e.some(i=>i.current&&i.current.contains(r.target))||t()};return document.addEventListener("mouseup",n),()=>{document.removeEventListener("mouseup",n)}},[e,t])},r_=()=>{const{user:e}=m.useContext(c2);return{checkUserHasPermissions:m.useCallback((n,r="any")=>n.length===0?!0:r==="any"?n.some(i=>{var a;return(a=e==null?void 0:e.permissions)==null?void 0:a.includes(i)}):n.every(i=>{var a;return(a=e==null?void 0:e.permissions)==null?void 0:a.includes(i)}),[e])}},i_=(e,t)=>{m.useEffect(()=>(document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}),[e]),m.useEffect(()=>t===void 0?()=>{}:(document.addEventListener("keyup",t),()=>{document.removeEventListener("keyup",t)}),[t])},am=(e,t,n)=>m.useMemo(()=>n||e!=="date"&&e!=="datetime-local"&&e!=="time"||t?e:"text",[t,e,n]),a_=()=>{const{addNotification:e}=Su(),{texts:{clipboard:t}}=m.useContext(Kt);return{copyToClipboard:m.useCallback(async r=>{var i;try{await((i=navigator.clipboard)==null?void 0:i.writeText(r)),e(t.copySuccess(r),"prompt")}catch(a){console.error(a),e(t.copyError,"danger")}},[e,t])}},nc=()=>{const[e,t]=m.useState(window.innerWidth),[n,r]=m.useState(window.innerHeight),i=()=>{t(window.innerWidth),r(window.innerHeight)};return m.useEffect(()=>(window.addEventListener("resize",i),()=>window.removeEventListener("resize",i)),[]),{width:e,height:n,isMobile:e<992}},om=m.createContext({useMsal:!1,msalInstance:null,msalScopes:[],msalExtraScopes:[]}),o_=m.createContext({delegation:null,setDelegation:()=>{},availableDelegations:null,setAvailableDelegations:()=>{},refreshAvailableDelegations:async()=>{}}),s_=m.createContext({addHelmet:e=>{},removeHelmet:()=>{}}),c_=m.createContext(void 0),mv={falseIfNotInit:!1},$u=({falseIfNotInit:e=mv.falseIfNotInit}=mv)=>{const t=m.useContext(c_);if(!e&&t===void 0)throw new Error("FormDisabledProvider not initilized. Probably tried to use useFormDisabledContext outside FormDisabledProvider.");return t??!1},O$="_button_1wjon_1",E$="_filled_1wjon_7",M$="_sm_1wjon_13",$$="_md_1wjon_18",A$="_lg_1wjon_23",xa={button:O$,filled:E$,sm:M$,md:$$,lg:A$},Qi=({variant:e="filled",color:t="primary",size:n="md",className:r,children:i,...a})=>a.as==="link"?y.jsx(to.Link,{to:a.href??"/",className:oe(`luminus-primary-button ${t} btn ${e==="outlined"?`btn-outline-${t}`:`btn-${t}`} ${r??""}`,xa.button,xa[e],xa[n]),...a,children:i}):a.as==="button"||a.as===void 0?y.jsx("button",{type:"button",className:oe(`luminus-primary-button ${t} btn ${e==="outlined"?`btn-outline-${t}`:`btn-${t}`} ${r??""}`,xa.button,xa[e],xa[n]),...a,children:i}):null,R$="_button_1r3i0_1",kh={button:R$},Au=({color:e="primary",icon:t,className:n,children:r,...i})=>i.as==="link"?y.jsxs(to.Link,{to:i.href??"/",className:oe(`luminus-context-button btn text-${e} ${n??""}`,kh.button),...i,children:[t,r]}):i.as==="button"||i.as===void 0?y.jsxs("button",{type:"button",className:oe(`luminus-context-button btn text-${e} ${n??""}`,kh.button),...i,children:[t,r]}):null,j$=m.forwardRef(({color:e="primary",icon:t=y.jsx(Qx,{size:12}),inputId:n="context-file-input",accept:r="*",onUpload:i,className:a,children:o,multiple:s,...c},l)=>{const u=d=>{d.target.files&&(i(d.target.files),d.target.value="")};return y.jsxs(y.Fragment,{children:[y.jsxs("label",{ref:l,htmlFor:n,className:oe(`luminus-context-button btn text-${e} ${a??""}`,kh.button),...c,children:[t,o]}),y.jsx("input",{id:n,type:"file",accept:r,onChange:u,hidden:!0,multiple:s})]})}),P$="_icon-button_15e26_1",I$="_sm_15e26_14",D$="_md_15e26_23",N$="_lg_15e26_32",jc={"icon-button":"_icon-button_15e26_1",iconButton:P$,sm:I$,md:D$,lg:N$},rc=({type:e="button",color:t="primary",size:n="md",children:r,className:i,...a})=>a.as==="link"?y.jsx(to.Link,{to:a.href??"/",className:oe(`luminus-icon-button btn text-${t} ${i??""}`,jc.iconButton,jc[n]),...a,children:r}):a.as==="button"||a.as===void 0?y.jsx("button",{type:e,className:oe(`luminus-icon-button btn text-${t} ${i??""}`,jc.iconButton,jc[n]),...a,children:r}):null,L$="_feedback_esh1j_1",F$="_feedback-spacer_esh1j_8",gv={feedback:L$,"feedback-spacer":"_feedback-spacer_esh1j_8",feedbackSpacer:F$},Ru=({message:e})=>y.jsxs(y.Fragment,{children:[y.jsx("div",{className:oe("invalid-feedback luminus-invalid-feedback",gv.feedback),children:e}),y.jsx("div",{className:oe("invalid-feedback-spacer",gv.feedbackSpacer),children:e})]}),B$="_item_1dy8x_1",l_={item:B$},ja=({color:e="primary",icon:t,className:n,children:r,to:i,as:a,...o})=>y.jsxs(ds.Item,{className:oe(`btn luminus-dropdown-item text-nowrap rounded text-${e} ${n??""}`,l_.item),as:a==="link"?to.Link:void 0,to:i??"",...o,children:[t,r]}),U$="_button_qhwih_1",W$={button:U$},sm=m.forwardRef(({color:e="primary",icon:t=y.jsx(e2,{size:21}),text:n,onClick:r,className:i,children:a,...o},s)=>y.jsxs("button",{type:"button",ref:s,onClick:c=>{c.preventDefault(),r(c)},"aria-label":"dropdown toggle",className:oe(`btn luminus-context-button text-${e} ${i??""}`,W$.button),...o,children:[t,n]})),z$="_avatar-icon_1axl6_1",H$={"avatar-icon":"_avatar-icon_1axl6_1",avatarIcon:z$},u_=({name:e,fontSize:t,size:n})=>{const r=m.useMemo(()=>{const o=e.split(" ");return o.length<2?e:fs(" ",o.at(o.length-2),o.at(o.length-1))},[e]),i=m.useMemo(()=>{const o=r.split(" ");return fs("",...o.map(s=>s.at(0)??void 0))},[r]),a=o=>{let s=0,c;for(c=0;c<o.length;c+=1)s=o.charCodeAt(c)+((s<<5)-s);let l="#";for(c=0;c<3;c+=1){const u=s>>c*8&255;l+=`00${u.toString(16)}`.slice(-2)}return l};return y.jsx(Gx,{placement:"bottom",overlay:y.jsx(qx,{children:e}),children:y.jsx("div",{className:oe("luminus-avatar-icon",H$.avatarIcon),style:{backgroundColor:a(r),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:i})})})},V$=m.forwardRef(({userName:e,onClick:t,children:n},r)=>y.jsxs("button",{type:"button",ref:r,onClick:i=>{i.preventDefault(),t(i)},"aria-label":"User avatar toggle",className:"m-0 p-0",style:{backgroundColor:"transparent",border:"none",cursor:"pointer"},children:[y.jsx(u_,{name:e}),n]})),cm=e=>y.jsx(ds.Toggle,{...e}),q$="_divider_1e6rk_1",Y$={divider:q$},d_=({className:e})=>y.jsx(ds.Divider,{className:oe("luminus-dropdown-divider",e,Y$.divider)}),G$="_dropdown_1lk66_1",Z$={dropdown:G$},lm=({toggle:e,children:t,align:n,...r})=>y.jsxs(ds,{...r,align:n,children:[e,y.jsx(ds.Menu,{className:oe("luminus-dropdown rounded shadow",Z$.dropdown),align:n,children:t})]});function K$(e,t,n){var r=this,i=m.useRef(null),a=m.useRef(0),o=m.useRef(null),s=m.useRef([]),c=m.useRef(),l=m.useRef(),u=m.useRef(e),d=m.useRef(!0);u.current=e;var f=typeof window<"u",h=!t&&t!==0&&f;if(typeof e!="function")throw new TypeError("Expected a function");t=+t||0;var g=!!(n=n||{}).leading,p=!("trailing"in n)||!!n.trailing,v="maxWait"in n,_="debounceOnServer"in n&&!!n.debounceOnServer,w=v?Math.max(+n.maxWait||0,t):null;m.useEffect(function(){return d.current=!0,function(){d.current=!1}},[]);var x=m.useMemo(function(){var T=function(E){var C=s.current,M=c.current;return s.current=c.current=null,a.current=E,l.current=u.current.apply(M,C)},b=function(E,C){h&&cancelAnimationFrame(o.current),o.current=h?requestAnimationFrame(E):setTimeout(E,C)},k=function(E){if(!d.current)return!1;var C=E-i.current;return!i.current||C>=t||C<0||v&&E-a.current>=w},j=function(E){return o.current=null,p&&s.current?T(E):(s.current=c.current=null,l.current)},S=function E(){var C=Date.now();if(k(C))return j(C);if(d.current){var M=t-(C-i.current),$=v?Math.min(M,w-(C-a.current)):M;b(E,$)}},O=function(){if(f||_){var E=Date.now(),C=k(E);if(s.current=[].slice.call(arguments),c.current=r,i.current=E,C){if(!o.current&&d.current)return a.current=i.current,b(S,t),g?T(i.current):l.current;if(v)return b(S,t),T(i.current)}return o.current||b(S,t),l.current}};return O.cancel=function(){o.current&&(h?cancelAnimationFrame(o.current):clearTimeout(o.current)),a.current=0,s.current=i.current=c.current=o.current=null},O.isPending=function(){return!!o.current},O.flush=function(){return o.current?j(Date.now()):l.current},O},[g,v,t,w,p,h,f,_]);return x}function X$(e,t){return e===t}function f_(e,t,n){var r=X$,i=m.useRef(e),a=m.useState({})[1],o=K$(m.useCallback(function(c){i.current=c,a({})},[a]),t,n),s=m.useRef(e);return r(s.current,e)||(o(e),s.current=e),[i.current,o]}const Q$="_wrapper_1mvyk_1",J$="_open_1mvyk_9",e7="_dropdown_1mvyk_13",t7="_search-input-container_1mvyk_19",n7="_search-input_1mvyk_19",r7="_loading-container_1mvyk_25",i7="_items-container_1mvyk_32",a7="_header-row_1mvyk_38",o7="_name_1mvyk_49",s7="_item_1mvyk_32",c7="_column-item_1mvyk_65",l7="_icon_1mvyk_69",u7="_action-buttons-container_1mvyk_89",d7="_reverse_1mvyk_97",f7="_action-button_1mvyk_89",h7="_actions-dropdown_1mvyk_110",on={wrapper:Q$,open:J$,dropdown:e7,"search-input-container":"_search-input-container_1mvyk_19",searchInputContainer:t7,"search-input":"_search-input_1mvyk_19",searchInput:n7,"loading-container":"_loading-container_1mvyk_25",loadingContainer:r7,"items-container":"_items-container_1mvyk_32",itemsContainer:i7,"header-row":"_header-row_1mvyk_38",headerRow:a7,name:o7,item:s7,"column-item":"_column-item_1mvyk_65",columnItem:c7,icon:l7,"action-buttons-container":"_action-buttons-container_1mvyk_89",actionButtonsContainer:u7,reverse:d7,"action-button":"_action-button_1mvyk_89",actionButton:f7,"actions-dropdown":"_actions-dropdown_1mvyk_110",actionsDropdown:h7},h_=({show:e,onCancel:t,items:n,suggestedItems:r,suggestedItemsTitle:i,currentSelection:a,onSelectionChange:o,onSearchQueryChange:s,texts:c,itemsNameWidth:l,additionalColumns:u,displayIdAsName:d=!1,autoHideSearch:f=!1,allItemsLength:h,disabled:g,isLoading:p=!1,inputRef:v,archiveColumn:_="archive",addNewOptionPath:w,refreshOptions:x})=>{var qe;const{texts:{customSelect:T}}=m.useContext(Kt),b=m.useRef(null),k=m.useRef(null),j=m.useRef(null),S=m.useRef(null),O=m.useRef(null),[E,C]=m.useState(""),[M]=f_(E,500),[,$]=m.useState(!1),{copyToClipboard:A}=a_(),P=(qe=v.current)==null?void 0:qe.getBoundingClientRect(),N=(P==null?void 0:P.x)??0,F=((P==null?void 0:P.x)??0)+((P==null?void 0:P.width)??0),z=(P==null?void 0:P.y)??0,q=((P==null?void 0:P.y)??0)+((P==null?void 0:P.height)??0),W=(P==null?void 0:P.width)??0,G=(P==null?void 0:P.height)??0,ee=5,{isMobile:ie}=nc(),Q=8,X=m.useMemo(()=>N?N>window.innerWidth/2-Q:!1,[N]),K=m.useMemo(()=>z?z>window.innerHeight/2-Q:!1,[z]);m.useEffect(()=>{var pe;e&&((pe=j.current)==null||pe.focus())},[j,e]),m.useEffect(()=>{e||C("")},[e]),m.useEffect(()=>{s&&s(M)},[M,s]);const[te,D]=m.useState(null);m.useEffect(()=>{e&&n.length>0?D(0):D(null)},[n,e]);const I=m.useMemo(()=>te!==null?n.at(te)??null:null,[te,n]),L=m.useCallback((pe,Oe)=>{var Ce,Le;const Ee=document.getElementById(`item-${pe}`);if(Ee){const rt=Ee.clientHeight??0;Oe==="down"?(Ce=S.current)==null||Ce.scrollBy({left:0,top:rt,behavior:"smooth"}):(Le=S.current)==null||Le.scrollBy({left:0,top:-rt,behavior:"smooth"})}},[]),V=m.useCallback(pe=>{if(te===null||g)return;const Oe=te+pe;Oe<0||Oe>=n.length||D(Ee=>(Ee!==null&&L(Ee,pe>0?"down":"up"),Oe))},[te,n,g,L]),R=m.useCallback(pe=>{if(e)switch(pe.key){case"Escape":pe.stopPropagation(),pe.preventDefault(),t();break;case"Enter":pe.stopPropagation(),pe.preventDefault(),g||o(I);break;case"ArrowUp":pe.stopPropagation(),pe.preventDefault(),V(-1);break;case"ArrowDown":pe.stopPropagation(),pe.preventDefault(),V(1);break}},[t,e,V,I,g,o]),Z=m.useCallback(()=>{$(pe=>!pe)},[]);m.useEffect(()=>(window.addEventListener("scroll",Z),()=>{window.removeEventListener("scroll",Z)}),[Z]),m.useEffect(()=>(window.addEventListener("resize",Z),()=>{window.removeEventListener("resize",Z)}),[Z]),i_(R),n_([b,k,O],t);const J=l??(u&&u.length>0?250:0),ne=(u==null?void 0:u.reduce((pe,Oe)=>pe+(Oe.width??100),0))??0,he=m.useMemo(()=>(a&&e&&!g)??!1,[a,e,g]),be=m.useMemo(()=>(a&&e)??!1,[a,e]),ge=m.useMemo(()=>e&&(be||w!==void 0||x!==void 0),[e,be,w,x]),We=32,Re=ie?`calc(100vw - ${We}px)`:`calc(max(${W}px, calc(${J}px + ${ne}px)))`,et=m.useMemo(()=>(E.length<1&&r&&r.length>0?r:n).map(pe=>{var Oe,Ee;return d?((Oe=pe.id)==null?void 0:Oe.toString())??"":((Ee=pe.name)==null?void 0:Ee.toString())??""}).reduce((pe,Oe)=>pe.length>Oe.length?pe:Oe,""),[E,r,n,d]);return y.jsxs(y.Fragment,{children:[y.jsx(w_,{show:e,onClick:t}),y.jsxs("div",{className:oe("luminus-dropdown-picker-actions",on.actionButtonsContainer,{[on.reverse]:X}),style:{top:`calc(${z}px + ${G/2}px - 12px)`,left:X?he&&be?`calc(${N}px - 24px - 8px - 24px - 4px)`:`calc(${N}px - 24px - 8px)`:`calc(${F}px + 8px)`},children:[he&&y.jsx("button",{ref:k,type:"button",className:oe("luminus-dropdown-picker-clear-button",on.actionButton),onClick:()=>!g&&o(null),children:y.jsx(wn,{variant:"caption",className:"text-danger",children:y.jsx(Xx,{size:16})})}),ge?y.jsx("div",{ref:O,children:y.jsxs(lm,{toggle:y.jsx(cm,{as:sm,className:oe("luminus-dropdown-picker-actions-dropdown",on.actionsDropdown),icon:y.jsx(wn,{variant:"caption",className:"text-primary",children:y.jsx(e2,{size:16})})}),children:[be?y.jsx(ja,{icon:y.jsx(JS,{}),onClick:()=>{var pe,Oe;A(d?((pe=a==null?void 0:a.id)==null?void 0:pe.toString())??"":((Oe=a==null?void 0:a.name)==null?void 0:Oe.toString())??"")},children:T.copySelection}):null,be&&(w||x)?y.jsx(d_,{}):null,w?y.jsx(ja,{icon:y.jsx(QS,{}),onClick:()=>{window.open(w,"_blank")},children:T.addNewOption}):null,x?y.jsx(ja,{icon:y.jsx(lO,{}),onClick:()=>{x()},children:T.refreshOptions}):null]})}):null]}),y.jsx("div",{className:oe("luminus-dropdown-picker",on.wrapper,{[on.open]:e}),style:{top:K?`calc(${z}px - 50vh - 8px)`:`calc(${q}px + 8px)`,left:ie?`${We/2}px`:X?`calc(${F}px - ${Re})`:N,right:ie?`${We/2}px`:X?`${F}px`:`calc(${N}px + ${Re})`,width:Re,justifyContent:K?"flex-end":"flex-start"},children:y.jsx("div",{ref:b,className:oe("shadow rounded",on.dropdown),children:!g&&y.jsxs(y.Fragment,{children:[!s||f&&(h??n.length)<=ee?null:y.jsx("div",{className:oe("search-input-container border-bottom",on.searchInputContainer),children:y.jsx(kr.Control,{ref:j,type:"search",size:"sm",className:on.searchInput,placeholder:c.searchPlaceholder,value:E,onChange:pe=>{var Oe;return C(((Oe=pe.target)==null?void 0:Oe.value)??"")}})}),E.length<1&&r&&r.length>0?y.jsx(pm,{variant:"info",size:"sm",children:i??T.suggestedItemsTitle}):null,p?y.jsx("div",{className:on.loadingContainer,children:y.jsx(Yp,{animation:"border",variant:"primary"})}):(E.length<1&&r&&(r==null?void 0:r.length)>0||n.length>0)&&y.jsxs("div",{ref:S,className:oe("items",on.itemsContainer),children:[u&&u.length>0&&y.jsxs("div",{className:oe("header-row border-bottom",on.headerRow),children:[y.jsx("div",{className:on.name,children:y.jsx(wn,{variant:"body2",children:et})}),u==null?void 0:u.filter(pe=>pe.key!==_).map(pe=>y.jsx("div",{className:on.columnItem,style:{width:`${pe.width??100}px`,minWidth:`${pe.width??100}px`,maxWidth:`${pe.width??100}px`},children:y.jsx(wn,{variant:"caption",children:pe.name})},pe.key))]}),(E.length<1&&r&&r.length>0?r:n).map((pe,Oe)=>y.jsxs("button",{id:`item-${Oe}`,type:"button",className:oe("item cursor-pointer",on.item,{[on.focused]:te===Oe},{focused:te===Oe},{archive:pe.additionalColumns?pe.additionalColumns[_]:!1}),onClick:()=>!g&&o(pe),onMouseEnter:()=>D(Oe),children:[y.jsx("div",{className:on.name,children:y.jsx(wn,{variant:"body2",children:d?pe.id:pe.name})}),u==null?void 0:u.filter(Ee=>Ee.key!==_).map(Ee=>y.jsx("div",{className:on.columnItem,style:{width:`${Ee.width??100}px`,minWidth:`${Ee.width??100}px`,maxWidth:`${Ee.width??100}px`},children:y.jsx(wn,{variant:"caption",className:oe("text-muted"),children:pe.additionalColumns&&pe.additionalColumns[Ee.key]})},Ee.key))]},pe.id))]})]})})})]})};function p7(e){return nt({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 m7(e){return nt({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 g7(e){return nt({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 v7(e){return nt({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)}var um={};um.match=C7;um.parse=p_;var y7=/(?:(only|not)?\s*([^\s\(\)]+)(?:\s*and)?\s*)?(.+)?/i,b7=/\(\s*([^\s\:\)]+)\s*(?:\:\s*([^\s\)]+))?\s*\)/,x7=/^(?:(min|max)-)?(.+)/,_7=/(em|rem|px|cm|mm|in|pt|pc)?$/,w7=/(dpi|dpcm|dppx)?$/;function C7(e,t){return p_(e).some(function(n){var r=n.inverse,i=n.type==="all"||t.type===n.type;if(i&&r||!(i||r))return!1;var a=n.expressions.every(function(o){var s=o.feature,c=o.modifier,l=o.value,u=t[s];if(!u)return!1;switch(s){case"orientation":case"scan":return u.toLowerCase()===l.toLowerCase();case"width":case"height":case"device-width":case"device-height":l=bv(l),u=bv(u);break;case"resolution":l=yv(l),u=yv(u);break;case"aspect-ratio":case"device-aspect-ratio":case"device-pixel-ratio":l=vv(l),u=vv(u);break;case"grid":case"color":case"color-index":case"monochrome":l=parseInt(l,10)||1,u=parseInt(u,10)||0;break}switch(c){case"min":return u>=l;case"max":return u<=l;default:return u===l}});return a&&!r||!a&&r})}function p_(e){return e.split(",").map(function(t){t=t.trim();var n=t.match(y7),r=n[1],i=n[2],a=n[3]||"",o={};return o.inverse=!!r&&r.toLowerCase()==="not",o.type=i?i.toLowerCase():"all",a=a.match(/\([^\)]+\)/g)||[],o.expressions=a.map(function(s){var c=s.match(b7),l=c[1].toLowerCase().match(x7);return{modifier:l[1],feature:l[2],value:c[2]}}),o})}function vv(e){var t=Number(e),n;return t||(n=e.match(/^(\d+)\s*\/\s*(\d+)$/),t=n[1]/n[2]),t}function yv(e){var t=parseFloat(e),n=String(e).match(w7)[1];switch(n){case"dpcm":return t/2.54;case"dppx":return t*96;default:return t}}function bv(e){var t=parseFloat(e),n=String(e).match(_7)[1];switch(n){case"em":return t*16;case"rem":return t*16;case"cm":return t*96/2.54;case"mm":return t*96/2.54/10;case"in":return t*96;case"pt":return t*72;case"pc":return t*72/12;default:return t}}var T7=um.match,xv=typeof window<"u"?window.matchMedia:null;function k7(e,t,n){var r=this,i;xv&&!n&&(i=xv.call(window,e)),i?(this.matches=i.matches,this.media=i.media,i.addListener(s)):(this.matches=T7(e,t),this.media=e),this.addListener=a,this.removeListener=o,this.dispose=c;function a(l){i&&i.addListener(l)}function o(l){i&&i.removeListener(l)}function s(l){r.matches=l.matches,r.media=l.media}function c(){i&&i.removeListener(s)}}function S7(e,t,n){return new k7(e,t,n)}var O7=S7;const E7=Ht(O7);var M7=/[A-Z]/g,$7=/^ms-/,gf={};function A7(e){return"-"+e.toLowerCase()}function m_(e){if(gf.hasOwnProperty(e))return gf[e];var t=e.replace(M7,A7);return gf[e]=$7.test(t)?"-"+t:t}function R7(e,t){if(e===t)return!0;if(!e||!t)return!1;const n=Object.keys(e),r=Object.keys(t),i=n.length;if(r.length!==i)return!1;for(let a=0;a<i;a++){const o=n[a];if(e[o]!==t[o]||!Object.prototype.hasOwnProperty.call(t,o))return!1}return!0}const _n=H.oneOfType([H.string,H.number]),dm={all:H.bool,grid:H.bool,aural:H.bool,braille:H.bool,handheld:H.bool,print:H.bool,projection:H.bool,screen:H.bool,tty:H.bool,tv:H.bool,embossed:H.bool},g_={orientation:H.oneOf(["portrait","landscape"]),scan:H.oneOf(["progressive","interlace"]),aspectRatio:H.string,deviceAspectRatio:H.string,height:_n,deviceHeight:_n,width:_n,deviceWidth:_n,color:H.bool,colorIndex:H.bool,monochrome:H.bool,resolution:_n,type:Object.keys(dm)},{type:Kne,...j7}=g_,v_={minAspectRatio:H.string,maxAspectRatio:H.string,minDeviceAspectRatio:H.string,maxDeviceAspectRatio:H.string,minHeight:_n,maxHeight:_n,minDeviceHeight:_n,maxDeviceHeight:_n,minWidth:_n,maxWidth:_n,minDeviceWidth:_n,maxDeviceWidth:_n,minColor:H.number,maxColor:H.number,minColorIndex:H.number,maxColorIndex:H.number,minMonochrome:H.number,maxMonochrome:H.number,minResolution:_n,maxResolution:_n,...j7},P7={...dm,...v_};var I7={all:P7,types:dm,matchers:g_,features:v_};const D7=e=>`not ${e}`,N7=(e,t)=>{const n=m_(e);return typeof t=="number"&&(t=`${t}px`),t===!0?n:t===!1?D7(n):`(${n}: ${t})`},L7=e=>e.join(" and "),F7=e=>{const t=[];return Object.keys(I7.all).forEach(n=>{const r=e[n];r!=null&&t.push(N7(n,r))}),L7(t)},B7=m.createContext(void 0),U7=e=>e.query||F7(e),_v=e=>e?Object.keys(e).reduce((n,r)=>(n[m_(r)]=e[r],n),{}):void 0,y_=()=>{const e=m.useRef(!1);return m.useEffect(()=>{e.current=!0},[]),e.current},W7=e=>{const t=m.useContext(B7),n=()=>_v(e)||_v(t),[r,i]=m.useState(n);return m.useEffect(()=>{const a=n();R7(r,a)||i(a)},[e,t]),r},z7=e=>{const t=()=>U7(e),[n,r]=m.useState(t);return m.useEffect(()=>{const i=t();n!==i&&r(i)},[e]),n},H7=(e,t)=>{const n=()=>E7(e,t||{},!!t),[r,i]=m.useState(n),a=y_();return m.useEffect(()=>{if(a){const o=n();return i(o),()=>{o&&o.dispose()}}},[e,t]),r},V7=e=>{const[t,n]=m.useState(e.matches);return m.useEffect(()=>{const r=i=>{n(i.matches)};return e.addListener(r),n(e.matches),()=>{e.removeListener(r)}},[e]),t},vf=(e,t,n)=>{const r=W7(t),i=z7(e);if(!i)throw new Error("Invalid or missing MediaQuery!");const a=H7(i,r),o=V7(a),s=y_();return m.useEffect(()=>{s&&n&&n(o)},[o]),m.useEffect(()=>()=>{a&&a.dispose()},[]),o},q7=["sm","md","lg","always"],b_="ResponsiveContextDropdownItem",Y7=e=>e.type.displayName===b_,fm=e=>({});fm.displayName=b_;function G7(e){return e.type&&e.type===m.Fragment}const x_=e=>{const t=[];Array.isArray(e)?t.push(...e):t.push(e);const n=[];return t.forEach(r=>{if(r){if(G7(r)){n.push(...x_(r.props.children));return}n.push(r)}}),n},Z7=(e,t)=>{if(t===void 0)return e;const{searchQueryString:n,...r}=t;return to.generatePath(e,r)+"?"+n},K7="_disabled_9mp5v_1",X7={disabled:K7},Q7=()=>{const{ProjectIconComponent:e}=m.useContext(Kt),{checkUserHasPermissions:t}=r_();return{getProcessedChildren:m.useCallback((r,i)=>{const a=[],o=[];let s=null;const c=u=>{const{hideOn:d,children:f,cKey:h,to:g,toRoute:p,disabled:v,icon:_,pathParams:w,...x}=u.props,T=(p==null?void 0:p.permissions)!=null,b=(p==null?void 0:p.permissions)!=null&&t(p==null?void 0:p.permissions),k=(v??!1)||T&&!b,j=g??(p==null?void 0:Z7(p==null?void 0:p.route,w)),S=f??(p==null?void 0:p.name),O=_??(p!=null?y.jsx(e,{icon:"link"}):void 0);if(d==="always"||q7.indexOf(d)>=i){s&&o.length>0&&o.push(s),s=null;const E=oe(x.className,{[X7.disabled]:k});j!=null?o.push(y.jsx(ja,{...x,as:"link",to:j,disabled:k,icon:O,className:E,children:S},h)):o.push(y.jsx(ja,{...x,icon:O,className:E,children:S},h))}else{const E=j!=null?{as:"link",href:j}:{};a.push(y.jsx(Au,{...x,...E,icon:O,className:oe(k?"disabled":void 0,x.className),children:S},h))}};return x_(r).forEach(u=>{u&&m.isValidElement(u)&&(Y7(u)?c(u):s=u)}),{buttons:a,dropdownItems:o}},[e,t])}},__=({children:e})=>{const{getProcessedChildren:t}=Q7(),n=vf({maxWidth:768}),r=vf({minWidth:769,maxWidth:1200}),i=vf({minWidth:1201}),a=[n,r,i].indexOf(!0),{buttons:o,dropdownItems:s}=t(e,a);return y.jsxs("div",{className:"d-flex gap-1",children:[y.jsx(y.Fragment,{children:o}),s.length>0?y.jsx(lm,{toggle:y.jsx(cm,{as:sm}),children:s}):null]})};__.Item=fm;const J7="Left",eA="Right",tA="Up",nA="Down",Ea={delta:10,preventScrollOnSwipe:!1,rotationAngle:0,trackMouse:!1,trackTouch:!0,swipeDuration:1/0,touchEventOptions:{passive:!0}},Sh={first:!0,initial:[0,0],start:0,swiping:!1,xy:[0,0]},wv="mousemove",Cv="mouseup",rA="touchend",iA="touchmove",aA="touchstart";function oA(e,t,n,r){return e>t?n>0?eA:J7:r>0?nA:tA}function Tv(e,t){if(t===0)return e;const n=Math.PI/180*t,r=e[0]*Math.cos(n)+e[1]*Math.sin(n),i=e[1]*Math.cos(n)-e[0]*Math.sin(n);return[r,i]}function sA(e,t){const n=u=>{const d="touches"in u;d&&u.touches.length>1||e((f,h)=>{h.trackMouse&&!d&&(document.addEventListener(wv,r),document.addEventListener(Cv,o));const{clientX:g,clientY:p}=d?u.touches[0]:u,v=Tv([g,p],h.rotationAngle);return h.onTouchStartOrOnMouseDown&&h.onTouchStartOrOnMouseDown({event:u}),Object.assign(Object.assign(Object.assign({},f),Sh),{initial:v.slice(),xy:v,start:u.timeStamp||0})})},r=u=>{e((d,f)=>{const h="touches"in u;if(h&&u.touches.length>1)return d;if(u.timeStamp-d.start>f.swipeDuration)return d.swiping?Object.assign(Object.assign({},d),{swiping:!1}):d;const{clientX:g,clientY:p}=h?u.touches[0]:u,[v,_]=Tv([g,p],f.rotationAngle),w=v-d.xy[0],x=_-d.xy[1],T=Math.abs(w),b=Math.abs(x),k=(u.timeStamp||0)-d.start,j=Math.sqrt(T*T+b*b)/(k||1),S=[w/(k||1),x/(k||1)],O=oA(T,b,w,x),E=typeof f.delta=="number"?f.delta:f.delta[O.toLowerCase()]||Ea.delta;if(T<E&&b<E&&!d.swiping)return d;const C={absX:T,absY:b,deltaX:w,deltaY:x,dir:O,event:u,first:d.first,initial:d.initial,velocity:j,vxvy:S};C.first&&f.onSwipeStart&&f.onSwipeStart(C),f.onSwiping&&f.onSwiping(C);let M=!1;return(f.onSwiping||f.onSwiped||f[`onSwiped${O}`])&&(M=!0),M&&f.preventScrollOnSwipe&&f.trackTouch&&u.cancelable&&u.preventDefault(),Object.assign(Object.assign({},d),{first:!1,eventData:C,swiping:!0})})},i=u=>{e((d,f)=>{let h;if(d.swiping&&d.eventData){if(u.timeStamp-d.start<f.swipeDuration){h=Object.assign(Object.assign({},d.eventData),{event:u}),f.onSwiped&&f.onSwiped(h);const g=f[`onSwiped${h.dir}`];g&&g(h)}}else f.onTap&&f.onTap({event:u});return f.onTouchEndOrOnMouseUp&&f.onTouchEndOrOnMouseUp({event:u}),Object.assign(Object.assign(Object.assign({},d),Sh),{eventData:h})})},a=()=>{document.removeEventListener(wv,r),document.removeEventListener(Cv,o)},o=u=>{a(),i(u)},s=(u,d)=>{let f=()=>{};if(u&&u.addEventListener){const h=Object.assign(Object.assign({},Ea.touchEventOptions),d.touchEventOptions),g=[[aA,n,h],[iA,r,Object.assign(Object.assign({},h),d.preventScrollOnSwipe?{passive:!1}:{})],[rA,i,h]];g.forEach(([p,v,_])=>u.addEventListener(p,v,_)),f=()=>g.forEach(([p,v])=>u.removeEventListener(p,v))}return f},l={ref:u=>{u!==null&&e((d,f)=>{if(d.el===u)return d;const h={};return d.el&&d.el!==u&&d.cleanUpTouch&&(d.cleanUpTouch(),h.cleanUpTouch=void 0),f.trackTouch&&u&&(h.cleanUpTouch=s(u,f)),Object.assign(Object.assign(Object.assign({},d),{el:u}),h)})}};return t.trackMouse&&(l.onMouseDown=n),[l,s]}function cA(e,t,n,r){return!t.trackTouch||!e.el?(e.cleanUpTouch&&e.cleanUpTouch(),Object.assign(Object.assign({},e),{cleanUpTouch:void 0})):e.cleanUpTouch?t.preventScrollOnSwipe!==n.preventScrollOnSwipe||t.touchEventOptions.passive!==n.touchEventOptions.passive?(e.cleanUpTouch(),Object.assign(Object.assign({},e),{cleanUpTouch:r(e.el,t)})):e:Object.assign(Object.assign({},e),{cleanUpTouch:r(e.el,t)})}function hm(e){const{trackMouse:t}=e,n=ue.useRef(Object.assign({},Sh)),r=ue.useRef(Object.assign({},Ea)),i=ue.useRef(Object.assign({},r.current));i.current=Object.assign({},r.current),r.current=Object.assign(Object.assign({},Ea),e);let a;for(a in Ea)r.current[a]===void 0&&(r.current[a]=Ea[a]);const[o,s]=ue.useMemo(()=>sA(c=>n.current=c(n.current,r.current),{trackMouse:t}),[t]);return n.current=cA(n.current,r.current,i.current,s),o}const lA="_backdrop_3huvf_1",uA="_show_3huvf_11",kv={backdrop:lA,show:uA},w_=({show:e,onClick:t})=>y.jsx("div",{className:oe("luminus-backdrop",kv.backdrop,{[kv.show]:e}),onClick:()=>t&&t()}),pm=e=>{const{variant:t,children:n,className:r,size:i="md",typographyVariant:a=i==="sm"?"body2":"body",...o}={...e};return y.jsx(p5,{variant:t,className:`text-center ${i==="sm"?"p-1":i==="md"?"p-3":"p-4"} bg-${t} bg-opacity-10 border-none ${r??""}`,...o,children:y.jsx(wn,{variant:a,children:n})})},dA="_floating-label_3xm9u_1",fA="_without-label_3xm9u_21",hA="_floating-label-check_3xm9u_184",yf={"floating-label":"_floating-label_3xm9u_1",floatingLabel:dA,"without-label":"_without-label_3xm9u_21",withoutLabel:fA,"floating-label-check":"_floating-label-check_3xm9u_184",floatingLabelCheck:hA},pA=({hint:e,children:t})=>e?y.jsx(Zp,{text:e,placement:"top",children:t}):t,ju=m.forwardRef(({hidden:e,children:t,className:n,isInvalid:r,isForRadioInput:i,inputContainerClassName:a,isForCheckInput:o,hint:s,required:c,disabled:l,...u},d)=>{const{ProjectIconComponent:f}=m.useContext(Kt),h=u.withoutLabel?"":y.jsxs("div",{className:"d-flex gap-1 align-items-center",children:[u.label,c?y.jsx("span",{className:oe("fw-bold",{"text-danger":!l}),style:{fontSize:"16px"},children:"*"}):null,s?y.jsx("div",{className:"d-flex align-items-center",children:y.jsx(f,{icon:"info"})}):null]});return o?y.jsx("div",{className:oe("luminus-floating-label-check",yf.floatingLabelCheck),children:t}):y.jsx(pA,{hint:s,children:y.jsx(Up,{ref:d,label:y.jsx("div",{className:"d-flex gap-1 align-items-center",children:h}),hidden:e??!1,className:oe(`luminus-floating-label ${n??""}`,yf.floatingLabel,{[a??""]:a},{[yf.withoutLabel]:u.withoutLabel}),children:t})})});ju.displayName="FloatingLabelInput";const mA="_row-label-input_mqkkx_1",gA="_label_mqkkx_4",vA="_input-container_mqkkx_9",yA="_invalid-feedback_mqkkx_104",bA="_keep-check-label_mqkkx_132",xA="_is-invalid_mqkkx_160",Io={"row-label-input":"_row-label-input_mqkkx_1",rowLabelInput:mA,label:gA,"input-container":"_input-container_mqkkx_9",inputContainer:vA,"invalid-feedback":"_invalid-feedback_mqkkx_104",invalidFeedback:yA,"keep-check-label":"_keep-check-label_mqkkx_132",keepCheckLabel:bA,"is-invalid":"_is-invalid_mqkkx_160",isInvalid:xA},ic=m.forwardRef(({hidden:e,children:t,required:n,disabled:r,className:i,isInvalid:a,isForRadioInput:o,isForTextAreaInput:s,inputContainerClassName:c,hint:l,...u},d)=>{const{ProjectIconComponent:f}=m.useContext(Kt),h=u.withoutLabel?y.jsx(y.Fragment,{}):y.jsx("label",{className:oe("label col-6",{"col-12":s},Io.label),children:y.jsxs(wn,{variant:"form-label",className:oe("d-flex gap-1 align-items-center",a?"text-danger":""),children:[u.label,n?y.jsx("span",{className:oe("fw-bold",{"text-danger":!r}),style:{fontSize:"16px"},children:"*"}):null,l?y.jsx("div",{className:"d-flex align-items-center",style:{paddingTop:"2px"},children:y.jsx(f,{icon:"info"})}):null]})});return y.jsxs("div",{ref:d,className:oe("luminus-row-label row gx-0 gy-0",{"is-invalid":a},{[Io.isInvalid]:a},{[i??""]:i},{"d-none":e},Io.rowLabelInput),children:[l?y.jsx(Zp,{text:l,placement:"top",children:h}):h,y.jsx("div",{className:oe("input-container",Io.inputContainer,{"col-6":!u.withoutLabel&&!s},{"col-12":u.withoutLabel||s},{[Io.keepCheckLabel]:o},{[c??""]:c}),children:t})]})});ic.displayName="RowLabelInput";const C_=m.forwardRef(({children:e,className:t,hidden:n},r)=>y.jsx("div",{ref:r,className:`${n?"d-none":""} ${t}`,children:e}));C_.displayName="NoInputContainer";const T_=({currentSelection:e,selectedItemNavigateTo:t,children:n})=>{if(!e||!e.id||!t)return y.jsx("div",{className:"luminus-input-container position-relative w-100",children:n});const r=t(e);return y.jsx(to.Link,{to:r,className:"luminus-input-container position-relative w-100 text-decoration-none",children:n})},k_=({InputContainer:e=ju,type:t,value:n,onChange:r,debounceMs:i,label:a,withoutLabel:o,placeholder:s,size:c,hidden:l,disabled:u,showClearIcon:d,clearValue:f,list:h,className:g,step:p,minLength:v,maxLength:_,noSelectOnFocus:w,hint:x,onConfirm:T,autoComplete:b})=>{const k=t==="number",j=m.useCallback(()=>{if(!r)return;const F=f??null;r(k?F?Number(F):null:(F==null?void 0:F.toString())??"")},[f,k,r]),S=m.useRef(null),[O,E]=m.useState((n==null?void 0:n.toString())??""),C=m.useCallback(F=>{const z=F;r&&r(k?z==null||z===""?null:Number(z):z||null)},[k,r]),M=m.useCallback(F=>{var q;const z=(q=F.target)==null?void 0:q.value;if(!i){C(z);return}E(z),S.current!==null&&window.clearTimeout(S.current),S.current=window.setTimeout(()=>{C(z)},i)},[i,C]),$=m.useMemo(()=>{if(T!==void 0)return F=>{F.key==="Enter"&&T&&T()}},[T]);m.useEffect(()=>{E(n===null?"":n.toString())},[n]);const[A,P]=m.useState(!1),N=am(t,n?n.toString()??null:null,A);return y.jsxs(e,{withoutLabel:o,label:a??"",hidden:l,className:g,hint:x,disabled:u,children:[y.jsx(kr.Control,{type:N,placeholder:s??a,size:c,value:i?O:(n==null?void 0:n.toString())??"",onChange:M,className:g??"",hidden:l,disabled:u??!1,list:h,onFocus:F=>{P(!0),!w&&F.target.select()},onBlur:()=>P(!1),onKeyDown:$,step:p,minLength:v,maxLength:_,autoComplete:b}),d&&n!==null&&r&&!u&&y.jsx("div",{className:`luminus-input-remove-icon ${t!=="text"?"inset":""}`,children:y.jsx(rc,{color:"secondary",size:"sm",onClick:j,children:y.jsx(Xs,{})})})]})};var mm={},Rl={exports:{}};Rl.exports;(function(e,t){var n=200,r="__lodash_hash_undefined__",i=1,a=2,o=9007199254740991,s="[object Arguments]",c="[object Array]",l="[object AsyncFunction]",u="[object Boolean]",d="[object Date]",f="[object Error]",h="[object Function]",g="[object GeneratorFunction]",p="[object Map]",v="[object Number]",_="[object Null]",w="[object Object]",x="[object Promise]",T="[object Proxy]",b="[object RegExp]",k="[object Set]",j="[object String]",S="[object Symbol]",O="[object Undefined]",E="[object WeakMap]",C="[object ArrayBuffer]",M="[object DataView]",$="[object Float32Array]",A="[object Float64Array]",P="[object Int8Array]",N="[object Int16Array]",F="[object Int32Array]",z="[object Uint8Array]",q="[object Uint8ClampedArray]",W="[object Uint16Array]",G="[object Uint32Array]",ee=/[\\^$.*+?()[\]{}|]/g,ie=/^\[object .+?Constructor\]$/,Q=/^(?:0|[1-9]\d*)$/,X={};X[$]=X[A]=X[P]=X[N]=X[F]=X[z]=X[q]=X[W]=X[G]=!0,X[s]=X[c]=X[C]=X[u]=X[M]=X[d]=X[f]=X[h]=X[p]=X[v]=X[w]=X[b]=X[k]=X[j]=X[E]=!1;var K=typeof Hn=="object"&&Hn&&Hn.Object===Object&&Hn,te=typeof self=="object"&&self&&self.Object===Object&&self,D=K||te||Function("return this")(),I=t&&!t.nodeType&&t,L=I&&!0&&e&&!e.nodeType&&e,V=L&&L.exports===I,R=V&&K.process,Z=function(){try{return R&&R.binding&&R.binding("util")}catch{}}(),J=Z&&Z.isTypedArray;function ne(B,Y){for(var le=-1,Te=B==null?0:B.length,Nt=0,Qe=[];++le<Te;){var Qt=B[le];Y(Qt,le,B)&&(Qe[Nt++]=Qt)}return Qe}function he(B,Y){for(var le=-1,Te=Y.length,Nt=B.length;++le<Te;)B[Nt+le]=Y[le];return B}function be(B,Y){for(var le=-1,Te=B==null?0:B.length;++le<Te;)if(Y(B[le],le,B))return!0;return!1}function ge(B,Y){for(var le=-1,Te=Array(B);++le<B;)Te[le]=Y(le);return Te}function We(B){return function(Y){return B(Y)}}function Re(B,Y){return B.has(Y)}function et(B,Y){return B==null?void 0:B[Y]}function qe(B){var Y=-1,le=Array(B.size);return B.forEach(function(Te,Nt){le[++Y]=[Nt,Te]}),le}function pe(B,Y){return function(le){return B(Y(le))}}function Oe(B){var Y=-1,le=Array(B.size);return B.forEach(function(Te){le[++Y]=Te}),le}var Ee=Array.prototype,Ce=Function.prototype,Le=Object.prototype,rt=D["__core-js_shared__"],Pt=Ce.toString,it=Le.hasOwnProperty,st=function(){var B=/[^.]+$/.exec(rt&&rt.keys&&rt.keys.IE_PROTO||"");return B?"Symbol(src)_1."+B:""}(),pt=Le.toString,It=RegExp("^"+Pt.call(it).replace(ee,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ct=V?D.Buffer:void 0,dt=D.Symbol,mt=D.Uint8Array,Ut=Le.propertyIsEnumerable,Ne=Ee.splice,je=dt?dt.toStringTag:void 0,Ye=Object.getOwnPropertySymbols,lt=ct?ct.isBuffer:void 0,gt=pe(Object.keys,Object),kt=ma(D,"DataView"),Vt=ma(D,"Map"),At=ma(D,"Promise"),Dt=ma(D,"Set"),qt=ma(D,"WeakMap"),vt=ma(Object,"create"),Yt=ki(kt),rn=ki(Vt),Jt=ki(At),ve=ki(Dt),Se=ki(qt),Pe=dt?dt.prototype:void 0,Ge=Pe?Pe.valueOf:void 0;function ze(B){var Y=-1,le=B==null?0:B.length;for(this.clear();++Y<le;){var Te=B[Y];this.set(Te[0],Te[1])}}function ft(){this.__data__=vt?vt(null):{},this.size=0}function U(B){var Y=this.has(B)&&delete this.__data__[B];return this.size-=Y?1:0,Y}function ce(B){var Y=this.__data__;if(vt){var le=Y[B];return le===r?void 0:le}return it.call(Y,B)?Y[B]:void 0}function ae(B){var Y=this.__data__;return vt?Y[B]!==void 0:it.call(Y,B)}function se(B,Y){var le=this.__data__;return this.size+=this.has(B)?0:1,le[B]=vt&&Y===void 0?r:Y,this}ze.prototype.clear=ft,ze.prototype.delete=U,ze.prototype.get=ce,ze.prototype.has=ae,ze.prototype.set=se;function ye(B){var Y=-1,le=B==null?0:B.length;for(this.clear();++Y<le;){var Te=B[Y];this.set(Te[0],Te[1])}}function Me(){this.__data__=[],this.size=0}function xe(B){var Y=this.__data__,le=xc(Y,B);if(le<0)return!1;var Te=Y.length-1;return le==Te?Y.pop():Ne.call(Y,le,1),--this.size,!0}function ke(B){var Y=this.__data__,le=xc(Y,B);return le<0?void 0:Y[le][1]}function Fe(B){return xc(this.__data__,B)>-1}function Ie(B,Y){var le=this.__data__,Te=xc(le,B);return Te<0?(++this.size,le.push([B,Y])):le[Te][1]=Y,this}ye.prototype.clear=Me,ye.prototype.delete=xe,ye.prototype.get=ke,ye.prototype.has=Fe,ye.prototype.set=Ie;function Xe(B){var Y=-1,le=B==null?0:B.length;for(this.clear();++Y<le;){var Te=B[Y];this.set(Te[0],Te[1])}}function Wt(){this.size=0,this.__data__={hash:new ze,map:new(Vt||ye),string:new ze}}function Ot(B){var Y=_c(this,B).delete(B);return this.size-=Y?1:0,Y}function Xt(B){return _c(this,B).get(B)}function me(B){return _c(this,B).has(B)}function ln(B,Y){var le=_c(this,B),Te=le.size;return le.set(B,Y),this.size+=le.size==Te?0:1,this}Xe.prototype.clear=Wt,Xe.prototype.delete=Ot,Xe.prototype.get=Xt,Xe.prototype.has=me,Xe.prototype.set=ln;function Et(B){var Y=-1,le=B==null?0:B.length;for(this.__data__=new Xe;++Y<le;)this.add(B[Y])}function Jn(B){return this.__data__.set(B,r),this}function yc(B){return this.__data__.has(B)}Et.prototype.add=Et.prototype.push=Jn,Et.prototype.has=yc;function er(B){var Y=this.__data__=new ye(B);this.size=Y.size}function Ti(){this.__data__=new ye,this.size=0}function bc(B){var Y=this.__data__,le=Y.delete(B);return this.size=Y.size,le}function Mr(B){return this.__data__.get(B)}function qd(B){return this.__data__.has(B)}function $r(B,Y){var le=this.__data__;if(le instanceof ye){var Te=le.__data__;if(!Vt||Te.length<n-1)return Te.push([B,Y]),this.size=++le.size,this;le=this.__data__=new Xe(Te)}return le.set(B,Y),this.size=le.size,this}er.prototype.clear=Ti,er.prototype.delete=bc,er.prototype.get=Mr,er.prototype.has=qd,er.prototype.set=$r;function Co(B,Y){var le=wc(B),Te=!le&&qC(B),Nt=!le&&!Te&&Yd(B),Qe=!le&&!Te&&!Nt&&e0(B),Qt=le||Te||Nt||Qe,an=Qt?ge(B.length,String):[],un=an.length;for(var Gt in B)it.call(B,Gt)&&!(Qt&&(Gt=="length"||Nt&&(Gt=="offset"||Gt=="parent")||Qe&&(Gt=="buffer"||Gt=="byteLength"||Gt=="byteOffset")||UC(Gt,un)))&&an.push(Gt);return an}function xc(B,Y){for(var le=B.length;le--;)if(Kg(B[le][0],Y))return le;return-1}function RC(B,Y,le){var Te=Y(B);return wc(B)?Te:he(Te,le(B))}function To(B){return B==null?B===void 0?O:_:je&&je in Object(B)?FC(B):VC(B)}function qg(B){return ko(B)&&To(B)==s}function Yg(B,Y,le,Te,Nt){return B===Y?!0:B==null||Y==null||!ko(B)&&!ko(Y)?B!==B&&Y!==Y:jC(B,Y,le,Te,Yg,Nt)}function jC(B,Y,le,Te,Nt,Qe){var Qt=wc(B),an=wc(Y),un=Qt?c:Zr(B),Gt=an?c:Zr(Y);un=un==s?w:un,Gt=Gt==s?w:Gt;var In=un==w,tr=Gt==w,fn=un==Gt;if(fn&&Yd(B)){if(!Yd(Y))return!1;Qt=!0,In=!1}if(fn&&!In)return Qe||(Qe=new er),Qt||e0(B)?Gg(B,Y,le,Te,Nt,Qe):NC(B,Y,un,le,Te,Nt,Qe);if(!(le&i)){var Bn=In&&it.call(B,"__wrapped__"),Un=tr&&it.call(Y,"__wrapped__");if(Bn||Un){var Kr=Bn?B.value():B,Ar=Un?Y.value():Y;return Qe||(Qe=new er),Nt(Kr,Ar,le,Te,Qe)}}return fn?(Qe||(Qe=new er),LC(B,Y,le,Te,Nt,Qe)):!1}function PC(B){if(!Jg(B)||zC(B))return!1;var Y=Xg(B)?It:ie;return Y.test(ki(B))}function IC(B){return ko(B)&&Qg(B.length)&&!!X[To(B)]}function DC(B){if(!HC(B))return gt(B);var Y=[];for(var le in Object(B))it.call(B,le)&&le!="constructor"&&Y.push(le);return Y}function Gg(B,Y,le,Te,Nt,Qe){var Qt=le&i,an=B.length,un=Y.length;if(an!=un&&!(Qt&&un>an))return!1;var Gt=Qe.get(B);if(Gt&&Qe.get(Y))return Gt==Y;var In=-1,tr=!0,fn=le&a?new Et:void 0;for(Qe.set(B,Y),Qe.set(Y,B);++In<an;){var Bn=B[In],Un=Y[In];if(Te)var Kr=Qt?Te(Un,Bn,In,Y,B,Qe):Te(Bn,Un,In,B,Y,Qe);if(Kr!==void 0){if(Kr)continue;tr=!1;break}if(fn){if(!be(Y,function(Ar,Si){if(!Re(fn,Si)&&(Bn===Ar||Nt(Bn,Ar,le,Te,Qe)))return fn.push(Si)})){tr=!1;break}}else if(!(Bn===Un||Nt(Bn,Un,le,Te,Qe))){tr=!1;break}}return Qe.delete(B),Qe.delete(Y),tr}function NC(B,Y,le,Te,Nt,Qe,Qt){switch(le){case M:if(B.byteLength!=Y.byteLength||B.byteOffset!=Y.byteOffset)return!1;B=B.buffer,Y=Y.buffer;case C:return!(B.byteLength!=Y.byteLength||!Qe(new mt(B),new mt(Y)));case u:case d:case v:return Kg(+B,+Y);case f:return B.name==Y.name&&B.message==Y.message;case b:case j:return B==Y+"";case p:var an=qe;case k:var un=Te&i;if(an||(an=Oe),B.size!=Y.size&&!un)return!1;var Gt=Qt.get(B);if(Gt)return Gt==Y;Te|=a,Qt.set(B,Y);var In=Gg(an(B),an(Y),Te,Nt,Qe,Qt);return Qt.delete(B),In;case S:if(Ge)return Ge.call(B)==Ge.call(Y)}return!1}function LC(B,Y,le,Te,Nt,Qe){var Qt=le&i,an=Zg(B),un=an.length,Gt=Zg(Y),In=Gt.length;if(un!=In&&!Qt)return!1;for(var tr=un;tr--;){var fn=an[tr];if(!(Qt?fn in Y:it.call(Y,fn)))return!1}var Bn=Qe.get(B);if(Bn&&Qe.get(Y))return Bn==Y;var Un=!0;Qe.set(B,Y),Qe.set(Y,B);for(var Kr=Qt;++tr<un;){fn=an[tr];var Ar=B[fn],Si=Y[fn];if(Te)var t0=Qt?Te(Si,Ar,fn,Y,B,Qe):Te(Ar,Si,fn,B,Y,Qe);if(!(t0===void 0?Ar===Si||Nt(Ar,Si,le,Te,Qe):t0)){Un=!1;break}Kr||(Kr=fn=="constructor")}if(Un&&!Kr){var Cc=B.constructor,Tc=Y.constructor;Cc!=Tc&&"constructor"in B&&"constructor"in Y&&!(typeof Cc=="function"&&Cc instanceof Cc&&typeof Tc=="function"&&Tc instanceof Tc)&&(Un=!1)}return Qe.delete(B),Qe.delete(Y),Un}function Zg(B){return RC(B,ZC,BC)}function _c(B,Y){var le=B.__data__;return WC(Y)?le[typeof Y=="string"?"string":"hash"]:le.map}function ma(B,Y){var le=et(B,Y);return PC(le)?le:void 0}function FC(B){var Y=it.call(B,je),le=B[je];try{B[je]=void 0;var Te=!0}catch{}var Nt=pt.call(B);return Te&&(Y?B[je]=le:delete B[je]),Nt}var BC=Ye?function(B){return B==null?[]:(B=Object(B),ne(Ye(B),function(Y){return Ut.call(B,Y)}))}:KC,Zr=To;(kt&&Zr(new kt(new ArrayBuffer(1)))!=M||Vt&&Zr(new Vt)!=p||At&&Zr(At.resolve())!=x||Dt&&Zr(new Dt)!=k||qt&&Zr(new qt)!=E)&&(Zr=function(B){var Y=To(B),le=Y==w?B.constructor:void 0,Te=le?ki(le):"";if(Te)switch(Te){case Yt:return M;case rn:return p;case Jt:return x;case ve:return k;case Se:return E}return Y});function UC(B,Y){return Y=Y??o,!!Y&&(typeof B=="number"||Q.test(B))&&B>-1&&B%1==0&&B<Y}function WC(B){var Y=typeof B;return Y=="string"||Y=="number"||Y=="symbol"||Y=="boolean"?B!=="__proto__":B===null}function zC(B){return!!st&&st in B}function HC(B){var Y=B&&B.constructor,le=typeof Y=="function"&&Y.prototype||Le;return B===le}function VC(B){return pt.call(B)}function ki(B){if(B!=null){try{return Pt.call(B)}catch{}try{return B+""}catch{}}return""}function Kg(B,Y){return B===Y||B!==B&&Y!==Y}var qC=qg(function(){return arguments}())?qg:function(B){return ko(B)&&it.call(B,"callee")&&!Ut.call(B,"callee")},wc=Array.isArray;function YC(B){return B!=null&&Qg(B.length)&&!Xg(B)}var Yd=lt||XC;function GC(B,Y){return Yg(B,Y)}function Xg(B){if(!Jg(B))return!1;var Y=To(B);return Y==h||Y==g||Y==l||Y==T}function Qg(B){return typeof B=="number"&&B>-1&&B%1==0&&B<=o}function Jg(B){var Y=typeof B;return B!=null&&(Y=="object"||Y=="function")}function ko(B){return B!=null&&typeof B=="object"}var e0=J?We(J):IC;function ZC(B){return YC(B)?Co(B):DC(B)}function KC(){return[]}function XC(){return!1}e.exports=GC})(Rl,Rl.exports);var _A=Rl.exports,S_={exports:{}};(function(e,t){var n=function(){var r=function(b,k){var j=236,S=17,O=b,E=a[k],C=null,M=0,$=null,A=[],P={},N=function(D,I){M=O*4+17,C=function(L){for(var V=new Array(L),R=0;R<L;R+=1){V[R]=new Array(L);for(var Z=0;Z<L;Z+=1)V[R][Z]=null}return V}(M),F(0,0),F(M-7,0),F(0,M-7),W(),q(),ee(D,I),O>=7&&G(D),$==null&&($=X(O,E,A)),ie($,I)},F=function(D,I){for(var L=-1;L<=7;L+=1)if(!(D+L<=-1||M<=D+L))for(var V=-1;V<=7;V+=1)I+V<=-1||M<=I+V||(0<=L&&L<=6&&(V==0||V==6)||0<=V&&V<=6&&(L==0||L==6)||2<=L&&L<=4&&2<=V&&V<=4?C[D+L][I+V]=!0:C[D+L][I+V]=!1)},z=function(){for(var D=0,I=0,L=0;L<8;L+=1){N(!0,L);var V=s.getLostPoint(P);(L==0||D>V)&&(D=V,I=L)}return I},q=function(){for(var D=8;D<M-8;D+=1)C[D][6]==null&&(C[D][6]=D%2==0);for(var I=8;I<M-8;I+=1)C[6][I]==null&&(C[6][I]=I%2==0)},W=function(){for(var D=s.getPatternPosition(O),I=0;I<D.length;I+=1)for(var L=0;L<D.length;L+=1){var V=D[I],R=D[L];if(C[V][R]==null)for(var Z=-2;Z<=2;Z+=1)for(var J=-2;J<=2;J+=1)Z==-2||Z==2||J==-2||J==2||Z==0&&J==0?C[V+Z][R+J]=!0:C[V+Z][R+J]=!1}},G=function(D){for(var I=s.getBCHTypeNumber(O),L=0;L<18;L+=1){var V=!D&&(I>>L&1)==1;C[Math.floor(L/3)][L%3+M-8-3]=V}for(var L=0;L<18;L+=1){var V=!D&&(I>>L&1)==1;C[L%3+M-8-3][Math.floor(L/3)]=V}},ee=function(D,I){for(var L=E<<3|I,V=s.getBCHTypeInfo(L),R=0;R<15;R+=1){var Z=!D&&(V>>R&1)==1;R<6?C[R][8]=Z:R<8?C[R+1][8]=Z:C[M-15+R][8]=Z}for(var R=0;R<15;R+=1){var Z=!D&&(V>>R&1)==1;R<8?C[8][M-R-1]=Z:R<9?C[8][15-R-1+1]=Z:C[8][15-R-1]=Z}C[M-8][8]=!D},ie=function(D,I){for(var L=-1,V=M-1,R=7,Z=0,J=s.getMaskFunction(I),ne=M-1;ne>0;ne-=2)for(ne==6&&(ne-=1);;){for(var he=0;he<2;he+=1)if(C[V][ne-he]==null){var be=!1;Z<D.length&&(be=(D[Z]>>>R&1)==1);var ge=J(V,ne-he);ge&&(be=!be),C[V][ne-he]=be,R-=1,R==-1&&(Z+=1,R=7)}if(V+=L,V<0||M<=V){V-=L,L=-L;break}}},Q=function(D,I){for(var L=0,V=0,R=0,Z=new Array(I.length),J=new Array(I.length),ne=0;ne<I.length;ne+=1){var he=I[ne].dataCount,be=I[ne].totalCount-he;V=Math.max(V,he),R=Math.max(R,be),Z[ne]=new Array(he);for(var ge=0;ge<Z[ne].length;ge+=1)Z[ne][ge]=255&D.getBuffer()[ge+L];L+=he;var We=s.getErrorCorrectPolynomial(be),Re=l(Z[ne],We.getLength()-1),et=Re.mod(We);J[ne]=new Array(We.getLength()-1);for(var ge=0;ge<J[ne].length;ge+=1){var qe=ge+et.getLength()-J[ne].length;J[ne][ge]=qe>=0?et.getAt(qe):0}}for(var pe=0,ge=0;ge<I.length;ge+=1)pe+=I[ge].totalCount;for(var Oe=new Array(pe),Ee=0,ge=0;ge<V;ge+=1)for(var ne=0;ne<I.length;ne+=1)ge<Z[ne].length&&(Oe[Ee]=Z[ne][ge],Ee+=1);for(var ge=0;ge<R;ge+=1)for(var ne=0;ne<I.length;ne+=1)ge<J[ne].length&&(Oe[Ee]=J[ne][ge],Ee+=1);return Oe},X=function(D,I,L){for(var V=u.getRSBlocks(D,I),R=d(),Z=0;Z<L.length;Z+=1){var J=L[Z];R.put(J.getMode(),4),R.put(J.getLength(),s.getLengthInBits(J.getMode(),D)),J.write(R)}for(var ne=0,Z=0;Z<V.length;Z+=1)ne+=V[Z].dataCount;if(R.getLengthInBits()>ne*8)throw"code length overflow. ("+R.getLengthInBits()+">"+ne*8+")";for(R.getLengthInBits()+4<=ne*8&&R.put(0,4);R.getLengthInBits()%8!=0;)R.putBit(!1);for(;!(R.getLengthInBits()>=ne*8||(R.put(j,8),R.getLengthInBits()>=ne*8));)R.put(S,8);return Q(R,V)};P.addData=function(D,I){I=I||"Byte";var L=null;switch(I){case"Numeric":L=f(D);break;case"Alphanumeric":L=h(D);break;case"Byte":L=g(D);break;case"Kanji":L=p(D);break;default:throw"mode:"+I}A.push(L),$=null},P.isDark=function(D,I){if(D<0||M<=D||I<0||M<=I)throw D+","+I;return C[D][I]},P.getModuleCount=function(){return M},P.make=function(){if(O<1){for(var D=1;D<40;D++){for(var I=u.getRSBlocks(D,E),L=d(),V=0;V<A.length;V++){var R=A[V];L.put(R.getMode(),4),L.put(R.getLength(),s.getLengthInBits(R.getMode(),D)),R.write(L)}for(var Z=0,V=0;V<I.length;V++)Z+=I[V].dataCount;if(L.getLengthInBits()<=Z*8)break}O=D}N(!1,z())},P.createTableTag=function(D,I){D=D||2,I=typeof I>"u"?D*4:I;var L="";L+='<table style="',L+=" border-width: 0px; border-style: none;",L+=" border-collapse: collapse;",L+=" padding: 0px; margin: "+I+"px;",L+='">',L+="<tbody>";for(var V=0;V<P.getModuleCount();V+=1){L+="<tr>";for(var R=0;R<P.getModuleCount();R+=1)L+='<td style="',L+=" border-width: 0px; border-style: none;",L+=" border-collapse: collapse;",L+=" padding: 0px; margin: 0px;",L+=" width: "+D+"px;",L+=" height: "+D+"px;",L+=" background-color: ",L+=P.isDark(V,R)?"#000000":"#ffffff",L+=";",L+='"/>';L+="</tr>"}return L+="</tbody>",L+="</table>",L},P.createSvgTag=function(D,I,L,V){var R={};typeof arguments[0]=="object"&&(R=arguments[0],D=R.cellSize,I=R.margin,L=R.alt,V=R.title),D=D||2,I=typeof I>"u"?D*4:I,L=typeof L=="string"?{text:L}:L||{},L.text=L.text||null,L.id=L.text?L.id||"qrcode-description":null,V=typeof V=="string"?{text:V}:V||{},V.text=V.text||null,V.id=V.text?V.id||"qrcode-title":null;var Z=P.getModuleCount()*D+I*2,J,ne,he,be,ge="",We;for(We="l"+D+",0 0,"+D+" -"+D+",0 0,-"+D+"z ",ge+='<svg version="1.1" xmlns="http://www.w3.org/2000/svg"',ge+=R.scalable?"":' width="'+Z+'px" height="'+Z+'px"',ge+=' viewBox="0 0 '+Z+" "+Z+'" ',ge+=' preserveAspectRatio="xMinYMin meet"',ge+=V.text||L.text?' role="img" aria-labelledby="'+K([V.id,L.id].join(" ").trim())+'"':"",ge+=">",ge+=V.text?'<title id="'+K(V.id)+'">'+K(V.text)+"</title>":"",ge+=L.text?'<description id="'+K(L.id)+'">'+K(L.text)+"</description>":"",ge+='<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>',ge+='<path d="',he=0;he<P.getModuleCount();he+=1)for(be=he*D+I,J=0;J<P.getModuleCount();J+=1)P.isDark(he,J)&&(ne=J*D+I,ge+="M"+ne+","+be+We);return ge+='" stroke="transparent" fill="black"/>',ge+="</svg>",ge},P.createDataURL=function(D,I){D=D||2,I=typeof I>"u"?D*4:I;var L=P.getModuleCount()*D+I*2,V=I,R=L-I;return T(L,L,function(Z,J){if(V<=Z&&Z<R&&V<=J&&J<R){var ne=Math.floor((Z-V)/D),he=Math.floor((J-V)/D);return P.isDark(he,ne)?0:1}else return 1})},P.createImgTag=function(D,I,L){D=D||2,I=typeof I>"u"?D*4:I;var V=P.getModuleCount()*D+I*2,R="";return R+="<img",R+=' src="',R+=P.createDataURL(D,I),R+='"',R+=' width="',R+=V,R+='"',R+=' height="',R+=V,R+='"',L&&(R+=' alt="',R+=K(L),R+='"'),R+="/>",R};var K=function(D){for(var I="",L=0;L<D.length;L+=1){var V=D.charAt(L);switch(V){case"<":I+="<";break;case">":I+=">";break;case"&":I+="&";break;case'"':I+=""";break;default:I+=V;break}}return I},te=function(D){var I=1;D=typeof D>"u"?I*2:D;var L=P.getModuleCount()*I+D*2,V=D,R=L-D,Z,J,ne,he,be,ge={"██":"█","█ ":"▀"," █":"▄"," ":" "},We={"██":"▀","█ ":"▀"," █":" "," ":" "},Re="";for(Z=0;Z<L;Z+=2){for(ne=Math.floor((Z-V)/I),he=Math.floor((Z+1-V)/I),J=0;J<L;J+=1)be="█",V<=J&&J<R&&V<=Z&&Z<R&&P.isDark(ne,Math.floor((J-V)/I))&&(be=" "),V<=J&&J<R&&V<=Z+1&&Z+1<R&&P.isDark(he,Math.floor((J-V)/I))?be+=" ":be+="█",Re+=D<1&&Z+1>=R?We[be]:ge[be];Re+=`
|
|
253
|
+
*/var uv;function m8(){return uv||(uv=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,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,_=e?Symbol.for("react.responder"):60118,w=e?Symbol.for("react.scope"):60119;function x(R){return typeof R=="string"||typeof R=="function"||R===r||R===l||R===a||R===i||R===d||R===f||typeof R=="object"&&R!==null&&(R.$$typeof===g||R.$$typeof===h||R.$$typeof===o||R.$$typeof===s||R.$$typeof===u||R.$$typeof===v||R.$$typeof===_||R.$$typeof===w||R.$$typeof===p)}function T(R){if(typeof R=="object"&&R!==null){var Z=R.$$typeof;switch(Z){case t:var J=R.type;switch(J){case c:case l:case r:case a:case i:case d:return J;default:var ne=J&&J.$$typeof;switch(ne){case s:case u:case g:case h:case o:return ne;default:return Z}}case n:return Z}}}var b=c,k=l,j=s,S=o,O=t,E=u,C=r,M=g,$=h,A=n,P=a,N=i,F=d,z=!1;function q(R){return z||(z=!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.")),W(R)||T(R)===c}function W(R){return T(R)===l}function G(R){return T(R)===s}function ee(R){return T(R)===o}function ie(R){return typeof R=="object"&&R!==null&&R.$$typeof===t}function Q(R){return T(R)===u}function X(R){return T(R)===r}function K(R){return T(R)===g}function te(R){return T(R)===h}function D(R){return T(R)===n}function I(R){return T(R)===a}function L(R){return T(R)===i}function V(R){return T(R)===d}_t.AsyncMode=b,_t.ConcurrentMode=k,_t.ContextConsumer=j,_t.ContextProvider=S,_t.Element=O,_t.ForwardRef=E,_t.Fragment=C,_t.Lazy=M,_t.Memo=$,_t.Portal=A,_t.Profiler=P,_t.StrictMode=N,_t.Suspense=F,_t.isAsyncMode=q,_t.isConcurrentMode=W,_t.isContextConsumer=G,_t.isContextProvider=ee,_t.isElement=ie,_t.isForwardRef=Q,_t.isFragment=X,_t.isLazy=K,_t.isMemo=te,_t.isPortal=D,_t.isProfiler=I,_t.isStrictMode=L,_t.isSuspense=V,_t.isValidElementType=x,_t.typeOf=T}()),_t}var dv;function g8(){return dv||(dv=1,process.env.NODE_ENV==="production"?Rc.exports=p8():Rc.exports=m8()),Rc.exports}var pf,fv;function v8(){if(fv)return pf;fv=1;var e=g8(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},r={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};a[e.ForwardRef]=r,a[e.Memo]=i;function o(g){return e.isMemo(g)?i:a[g.$$typeof]||t}var s=Object.defineProperty,c=Object.getOwnPropertyNames,l=Object.getOwnPropertySymbols,u=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,f=Object.prototype;function h(g,p,v){if(typeof p!="string"){if(f){var _=d(p);_&&_!==f&&h(g,_,v)}var w=c(p);l&&(w=w.concat(l(p)));for(var x=o(g),T=o(p),b=0;b<w.length;++b){var k=w[b];if(!n[k]&&!(v&&v[k])&&!(T&&T[k])&&!(x&&x[k])){var j=u(p,k);try{s(g,k,j)}catch{}}}}return g}return pf=h,pf}v8();function y8(){return typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"}function nm(e,t){const n=m.useContext(h8);if(!n)throw new Error("Missing <CookiesProvider>");const i=Object.assign(Object.assign({},{doNotUpdate:!0}),t),[a,o]=m.useState(()=>n.getAll(i));y8()&&m.useLayoutEffect(()=>{function u(){const d=n.getAll(i);b8(e||null,d,a)&&o(d)}return n.addChangeListener(u),()=>{n.removeChangeListener(u)}},[n,a]);const s=m.useMemo(()=>n.set.bind(n),[n]),c=m.useMemo(()=>n.remove.bind(n),[n]),l=m.useMemo(()=>n.update.bind(n),[n]);return[a,s,c,l]}function b8(e,t,n){if(!e)return!0;for(let r of e)if(t[r]!==n[r])return!0;return!1}const x8=()=>{const{axiosOptions:e,cookieDomain:t}=m.useContext(Kt),[,n,r]=nm(["Authorization"]),i=zt.create(e),a=m.useCallback(()=>{const l=localStorage.getItem("token");return l?{token:l,expiresOn:mb(new Date(Date.now()),1)}:null},[]),o=m.useCallback(()=>{const l=a();return l!==null&&l.token.length>0},[a]),s=m.useCallback(async(l,u)=>i.post("/user/login",{kid:l,password:u}).then(d=>(localStorage.setItem("token",d.data),n("Authorization",d.data,{path:"/",secure:!0,sameSite:"none",domain:t,expires:fb(new Date(Date.now()),24)}),d.data)).catch(d=>(console.log(d),null)),[i,n,t]),c=m.useCallback(()=>{localStorage.removeItem("token"),localStorage.removeItem("user"),r("Authorization")},[r]);return{isAuthenticated:o,login:s,logout:c,getToken:a}},_8=()=>{const[,,e]=nm(["Authorization"]),{msalScopes:t,msalExtraScopes:n}=m.useContext(om),{instance:r,inProgress:i}=r0.useMsal(),a=r0.useIsAuthenticated(),o=m.useCallback(async()=>{var h;const d=r.getActiveAccount(),f=d??((h=r.getAllAccounts())==null?void 0:h.at(0))??void 0;return f?(d||r.setActiveAccount(f),r.acquireTokenSilent({scopes:t,account:f}).then(g=>({token:g.accessToken,expiresOn:g.expiresOn??new Date(Date.now())})).catch(g=>{if(console.error("Error acquiring token",g),g instanceof n0.InteractionRequiredAuthError)return console.log("Silent token acquisition failed. Acquiring token using redirect"),r.acquireTokenRedirect({scopes:t,extraScopesToConsent:n}),null;throw g})):null},[r,t,n]),s=m.useCallback(()=>a,[a]),c=m.useCallback(()=>!s()&&i!==n0.InteractionStatus.None,[s,i]),l=m.useCallback(async()=>r.loginRedirect({scopes:t,extraScopesToConsent:n}).then(()=>"").catch(()=>null),[r,t,n]),u=m.useCallback(()=>{r.logout(),localStorage.removeItem("user"),e("Authorization")},[e,r]);return{isAuthenticated:s,isAuthenticating:c,login:l,logout:u,getToken:o}},V2=()=>{const{useMsal:e}=m.useContext(om),t=x8(),n=_8();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}},w8="_toast_1s57i_1",jo={toast:w8},C8=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}},Su=()=>({addNotification:m.useCallback((t,n)=>{const r=h2(t),i=C8(n),a=y.jsxs(y.Fragment,{children:[r,y.jsx(Jx,{onClick:()=>ba.dismiss(r),type:"button",style:{position:"absolute",fontSize:"12px",top:"calc(50% - 6px)",right:"8px"}})]});switch(n){case"success":{ba(a,{id:r,duration:i,position:"top-center",icon:y.jsx(oO,{size:12}),className:oe("luminus-toast-success rounded shadow bg-success",jo.toast)});break}case"danger":{ba(a,{id:r,duration:i,position:"top-center",icon:y.jsx(KS,{size:12}),className:oe("luminus-toast-danger rounded shadow bg-danger",jo.toast)});break}case"warning":{ba(a,{id:r,duration:i,position:"top-center",icon:y.jsx(qS,{size:12}),className:oe("luminus-toast-warning rounded shadow bg-warning",jo.toast)});break}case"info":{ba(a,{id:r,duration:i,position:"top-center",icon:y.jsx(GS,{size:12}),className:oe("luminus-toast-info rounded shadow bg-info",jo.toast)});break}case"prompt":{ba(a,{id:r,duration:i,position:"top-center",icon:y.jsx(ZS,{size:12}),className:oe("luminus-toast-prompt rounded shadow bg-light",jo.toast)});break}}},[])}),T8=zt.CancelToken,Ou=e=>{const{authenticated:t=!0,differentBaseUrl:n,silent:r=!1,customToken:i,ignoreDelegation:a,noToastOnStatus:o}={...e},{language:s,axiosOptions:c,texts:{axios:l}}=m.useContext(Kt),{delegation:u}=m.useContext(o_),d=m.useMemo(()=>(u==null?void 0:u.id)??null,[u==null?void 0:u.id]),{addNotification:f}=Su(),{getToken:h}=V2(),p=m.useRef(zt.create(c)).current,v=m.useRef(t),_=m.useRef(i),w=m.useRef(d),x=m.useRef(a),T=m.useRef(s),b=m.useRef(h);m.useEffect(()=>{v.current=t,_.current=i,w.current=d,x.current=a,T.current=s,b.current=h},[t,i,d,a,s,h]);const k=async S=>{var O,E,C;if(v.current&&!S.headers.Authorization){const M=_.current?{token:_.current,expiresOn:fb(new Date(Date.now()),1)}:await b.current();if(!M)return console.log("No bearer token"),Promise.reject(new Error("No bearer token"));if(f6(M.expiresOn))return console.log("Token expired"),Promise.reject(new Error("Token expired"));S.headers.Authorization=`Bearer ${M.token}`}return w.current!==null&&!x.current&&(S.headers.DelegationId=w.current.toString()),(O=S.url)!=null&&O.includes("culture=")?S.url=(E=S.url)==null?void 0:E.replace(/culture=[a-z]{2}/,`culture=${T.current}`):S.url=`${S.url}${(C=S.url)!=null&&C.includes("?")?"&":"?"}culture=${T.current}`,S},j=S=>{var C,M;if(console.log(S),zt.isCancel(S))return Promise.reject(S);const O=Gp(S);if(O.length>0){const $=O.find(A=>A.name.toLowerCase()==="others");return $?(!r&&f($.errors,"danger"),Promise.reject(S)):(!r&&f(l.validationError,"warning"),Promise.reject(S))}const E=d2(S);return E!==null?(!r&&f(`${l.permissionError}: ${fs(", ",...E)}`,"danger"),Promise.reject(S)):(o??[]).includes((C=S.response)==null?void 0:C.status)?Promise.reject(S):((M=S.response)==null?void 0:M.status)===403?(!r&&f(l.forbiddenError,"danger"),Promise.reject(S)):S.message&&S.message==="Network Error"?(!r&&f(l.networkError,"danger"),Promise.reject(S)):(zt.isCancel(S)||(S.response||S.request)&&!r&&f(l.unexpectedError,"danger"),Promise.reject(S))};return m.useEffect(()=>{n&&(p.defaults.baseURL=n);const S=p.interceptors.request.use(k,E=>Promise.reject(E)),O=p.interceptors.response.use(E=>E,j);return console.log("Axios interceptors attached"),()=>{p.interceptors.request.eject(S),p.interceptors.response.eject(O),console.log("Axios interceptors detached")}},[n]),p};let Po;const rm=()=>{const{show:e,text:t,showConfirm:n,hideConfirm:r,textSm:i}=m.useContext(t2),a=()=>{r()};return{confirm:async(l,u)=>(n(l,u),new Promise(d=>{Po=d})),onConfirm:()=>{a(),Po&&Po(!0)},onCancel:()=>{a(),Po&&Po(!1)},show:e,text:t,textSm:i}};var ut;(function(e){e.assertEqual=i=>i;function t(i){}e.assertIs=t;function n(i){throw new Error}e.assertNever=n,e.arrayToEnum=i=>{const a={};for(const o of i)a[o]=o;return a},e.getValidEnumValues=i=>{const a=e.objectKeys(i).filter(s=>typeof i[i[s]]!="number"),o={};for(const s of a)o[s]=i[s];return e.objectValues(o)},e.objectValues=i=>e.objectKeys(i).map(function(a){return i[a]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const a=[];for(const o in i)Object.prototype.hasOwnProperty.call(i,o)&&a.push(o);return a},e.find=(i,a)=>{for(const o of i)if(a(o))return o},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function r(i,a=" | "){return i.map(o=>typeof o=="string"?`'${o}'`:o).join(a)}e.joinValues=r,e.jsonStringifyReplacer=(i,a)=>typeof a=="bigint"?a.toString():a})(ut||(ut={}));var _h;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(_h||(_h={}));const we=ut.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),ai=e=>{switch(typeof e){case"undefined":return we.undefined;case"string":return we.string;case"number":return isNaN(e)?we.nan:we.number;case"boolean":return we.boolean;case"function":return we.function;case"bigint":return we.bigint;case"symbol":return we.symbol;case"object":return Array.isArray(e)?we.array:e===null?we.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?we.promise:typeof Map<"u"&&e instanceof Map?we.map:typeof Set<"u"&&e instanceof Set?we.set:typeof Date<"u"&&e instanceof Date?we.date:we.object;default:return we.unknown}},fe=ut.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"]),k8=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Ln 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(a){return a.message},r={_errors:[]},i=a=>{for(const o of a.issues)if(o.code==="invalid_union")o.unionErrors.map(i);else if(o.code==="invalid_return_type")i(o.returnTypeError);else if(o.code==="invalid_arguments")i(o.argumentsError);else if(o.path.length===0)r._errors.push(n(o));else{let s=r,c=0;for(;c<o.path.length;){const l=o.path[c];c===o.path.length-1?(s[l]=s[l]||{_errors:[]},s[l]._errors.push(n(o))):s[l]=s[l]||{_errors:[]},s=s[l],c++}}};return i(this),r}static assert(t){if(!(t instanceof Ln))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,ut.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const i of this.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Ln.create=e=>new Ln(e);const qa=(e,t)=>{let n;switch(e.code){case fe.invalid_type:e.received===we.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case fe.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,ut.jsonStringifyReplacer)}`;break;case fe.unrecognized_keys:n=`Unrecognized key(s) in object: ${ut.joinValues(e.keys,", ")}`;break;case fe.invalid_union:n="Invalid input";break;case fe.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${ut.joinValues(e.options)}`;break;case fe.invalid_enum_value:n=`Invalid enum value. Expected ${ut.joinValues(e.options)}, received '${e.received}'`;break;case fe.invalid_arguments:n="Invalid function arguments";break;case fe.invalid_return_type:n="Invalid function return type";break;case fe.invalid_date:n="Invalid date";break;case fe.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}"`:ut.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case fe.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 fe.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 fe.custom:n="Invalid input";break;case fe.invalid_intersection_types:n="Intersection results could not be merged";break;case fe.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case fe.not_finite:n="Number must be finite";break;default:n=t.defaultError,ut.assertNever(e)}return{message:n}};let q2=qa;function S8(e){q2=e}function kl(){return q2}const Sl=e=>{const{data:t,path:n,errorMaps:r,issueData:i}=e,a=[...n,...i.path||[]],o={...i,path:a};if(i.message!==void 0)return{...i,path:a,message:i.message};let s="";const c=r.filter(l=>!!l).slice().reverse();for(const l of c)s=l(o,{data:t,defaultError:s}).message;return{...i,path:a,message:s}},O8=[];function _e(e,t){const n=kl(),r=Sl({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===qa?void 0:qa].filter(i=>!!i)});e.common.issues.push(r)}class yn{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 i of n){if(i.status==="aborted")return Ue;i.status==="dirty"&&t.dirty(),r.push(i.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const i of n){const a=await i.key,o=await i.value;r.push({key:a,value:o})}return yn.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const i of n){const{key:a,value:o}=i;if(a.status==="aborted"||o.status==="aborted")return Ue;a.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),a.value!=="__proto__"&&(typeof o.value<"u"||i.alwaysSet)&&(r[a.value]=o.value)}return{status:t.value,value:r}}}const Ue=Object.freeze({status:"aborted"}),Oa=e=>({status:"dirty",value:e}),kn=e=>({status:"valid",value:e}),wh=e=>e.status==="aborted",Ch=e=>e.status==="dirty",ps=e=>e.status==="valid",ms=e=>typeof Promise<"u"&&e instanceof Promise;function Ol(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 Y2(e,t,n,r,i){if(typeof t=="function"?e!==t||!i:!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 Ae;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Ae||(Ae={}));var Go,Zo;class yr{constructor(t,n,r,i){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=i}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 hv=(e,t)=>{if(ps(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 Ln(e.common.issues);return this._error=n,this._error}}};function Ke(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:i}=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:i}:{errorMap:(o,s)=>{var c,l;const{message:u}=e;return o.code==="invalid_enum_value"?{message:u??s.defaultError}:typeof s.data>"u"?{message:(c=u??r)!==null&&c!==void 0?c:s.defaultError}:o.code!=="invalid_type"?{message:s.defaultError}:{message:(l=u??n)!==null&&l!==void 0?l:s.defaultError}},description:i}}class tt{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 ai(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:ai(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new yn,ctx:{common:t.parent.common,data:t.data,parsedType:ai(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(ms(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 i={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:ai(t)},a=this._parseSync({data:t,path:i.path,parent:i});return hv(i,a)}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:ai(t)},i=this._parse({data:t,path:r.path,parent:r}),a=await(ms(i)?i:Promise.resolve(i));return hv(r,a)}refine(t,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,a)=>{const o=t(i),s=()=>a.addIssue({code:fe.custom,...r(i)});return typeof Promise<"u"&&o instanceof Promise?o.then(c=>c?!0:(s(),!1)):o?!0:(s(),!1)})}refinement(t,n){return this._refinement((r,i)=>t(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(t){return new cr({schema:this,typeName:Be.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return gr.create(this,this._def)}nullable(){return gi.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return or.create(this,this._def)}promise(){return Ga.create(this,this._def)}or(t){return bs.create([this,t],this._def)}and(t){return xs.create(this,t,this._def)}transform(t){return new cr({...Ke(this._def),schema:this,typeName:Be.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new ks({...Ke(this._def),innerType:this,defaultValue:n,typeName:Be.ZodDefault})}brand(){return new im({typeName:Be.ZodBranded,type:this,...Ke(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Ss({...Ke(this._def),innerType:this,catchValue:n,typeName:Be.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return tc.create(this,t)}readonly(){return Os.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const E8=/^c[^\s-]{8,}$/i,M8=/^[0-9a-z]+$/,$8=/^[0-9A-HJKMNP-TV-Z]{26}$/,A8=/^[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,R8=/^[a-z0-9_-]{21}$/i,j8=/^[-+]?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)?)??$/,P8=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,I8="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let mf;const D8=/^(?:(?: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])$/,N8=/^(([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})))$/,L8=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,G2="((\\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])))",F8=new RegExp(`^${G2}$`);function Z2(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 B8(e){return new RegExp(`^${Z2(e)}$`)}function K2(e){let t=`${G2}T${Z2(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 U8(e,t){return!!((t==="v4"||!t)&&D8.test(e)||(t==="v6"||!t)&&N8.test(e))}class ir extends tt{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==we.string){const a=this._getOrReturnCtx(t);return _e(a,{code:fe.invalid_type,expected:we.string,received:a.parsedType}),Ue}const r=new yn;let i;for(const a of this._def.checks)if(a.kind==="min")t.data.length<a.value&&(i=this._getOrReturnCtx(t,i),_e(i,{code:fe.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="max")t.data.length>a.value&&(i=this._getOrReturnCtx(t,i),_e(i,{code:fe.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="length"){const o=t.data.length>a.value,s=t.data.length<a.value;(o||s)&&(i=this._getOrReturnCtx(t,i),o?_e(i,{code:fe.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):s&&_e(i,{code:fe.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),r.dirty())}else if(a.kind==="email")P8.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"email",code:fe.invalid_string,message:a.message}),r.dirty());else if(a.kind==="emoji")mf||(mf=new RegExp(I8,"u")),mf.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"emoji",code:fe.invalid_string,message:a.message}),r.dirty());else if(a.kind==="uuid")A8.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"uuid",code:fe.invalid_string,message:a.message}),r.dirty());else if(a.kind==="nanoid")R8.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"nanoid",code:fe.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid")E8.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"cuid",code:fe.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid2")M8.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"cuid2",code:fe.invalid_string,message:a.message}),r.dirty());else if(a.kind==="ulid")$8.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"ulid",code:fe.invalid_string,message:a.message}),r.dirty());else if(a.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),_e(i,{validation:"url",code:fe.invalid_string,message:a.message}),r.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"regex",code:fe.invalid_string,message:a.message}),r.dirty())):a.kind==="trim"?t.data=t.data.trim():a.kind==="includes"?t.data.includes(a.value,a.position)||(i=this._getOrReturnCtx(t,i),_e(i,{code:fe.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),r.dirty()):a.kind==="toLowerCase"?t.data=t.data.toLowerCase():a.kind==="toUpperCase"?t.data=t.data.toUpperCase():a.kind==="startsWith"?t.data.startsWith(a.value)||(i=this._getOrReturnCtx(t,i),_e(i,{code:fe.invalid_string,validation:{startsWith:a.value},message:a.message}),r.dirty()):a.kind==="endsWith"?t.data.endsWith(a.value)||(i=this._getOrReturnCtx(t,i),_e(i,{code:fe.invalid_string,validation:{endsWith:a.value},message:a.message}),r.dirty()):a.kind==="datetime"?K2(a).test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{code:fe.invalid_string,validation:"datetime",message:a.message}),r.dirty()):a.kind==="date"?F8.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{code:fe.invalid_string,validation:"date",message:a.message}),r.dirty()):a.kind==="time"?B8(a).test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{code:fe.invalid_string,validation:"time",message:a.message}),r.dirty()):a.kind==="duration"?j8.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"duration",code:fe.invalid_string,message:a.message}),r.dirty()):a.kind==="ip"?U8(t.data,a.version)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"ip",code:fe.invalid_string,message:a.message}),r.dirty()):a.kind==="base64"?L8.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"base64",code:fe.invalid_string,message:a.message}),r.dirty()):ut.assertNever(a);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(i=>t.test(i),{validation:n,code:fe.invalid_string,...Ae.errToObj(r)})}_addCheck(t){return new ir({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Ae.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Ae.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Ae.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Ae.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Ae.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Ae.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Ae.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Ae.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Ae.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Ae.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,...Ae.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,...Ae.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...Ae.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Ae.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...Ae.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Ae.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Ae.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Ae.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Ae.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Ae.errToObj(n)})}nonempty(t){return this.min(1,Ae.errToObj(t))}trim(){return new ir({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ir({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ir({...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}}ir.create=e=>{var t;return new ir({checks:[],typeName:Be.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ke(e)})};function W8(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r,a=parseInt(e.toFixed(i).replace(".","")),o=parseInt(t.toFixed(i).replace(".",""));return a%o/Math.pow(10,i)}class hi extends tt{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)!==we.number){const a=this._getOrReturnCtx(t);return _e(a,{code:fe.invalid_type,expected:we.number,received:a.parsedType}),Ue}let r;const i=new yn;for(const a of this._def.checks)a.kind==="int"?ut.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),_e(r,{code:fe.invalid_type,expected:"integer",received:"float",message:a.message}),i.dirty()):a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(r=this._getOrReturnCtx(t,r),_e(r,{code:fe.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(r=this._getOrReturnCtx(t,r),_e(r,{code:fe.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="multipleOf"?W8(t.data,a.value)!==0&&(r=this._getOrReturnCtx(t,r),_e(r,{code:fe.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):a.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),_e(r,{code:fe.not_finite,message:a.message}),i.dirty()):ut.assertNever(a);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Ae.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ae.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ae.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ae.toString(n))}setLimit(t,n,r,i){return new hi({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ae.toString(i)}]})}_addCheck(t){return new hi({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Ae.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ae.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ae.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ae.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ae.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ae.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Ae.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Ae.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Ae.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"&&ut.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)}}hi.create=e=>new hi({checks:[],typeName:Be.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Ke(e)});class pi extends tt{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)!==we.bigint){const a=this._getOrReturnCtx(t);return _e(a,{code:fe.invalid_type,expected:we.bigint,received:a.parsedType}),Ue}let r;const i=new yn;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(r=this._getOrReturnCtx(t,r),_e(r,{code:fe.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(r=this._getOrReturnCtx(t,r),_e(r,{code:fe.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="multipleOf"?t.data%a.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),_e(r,{code:fe.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):ut.assertNever(a);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Ae.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ae.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ae.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ae.toString(n))}setLimit(t,n,r,i){return new pi({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ae.toString(i)}]})}_addCheck(t){return new pi({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Ae.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Ae.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Ae.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Ae.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ae.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}}pi.create=e=>{var t;return new pi({checks:[],typeName:Be.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ke(e)})};class gs extends tt{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==we.boolean){const r=this._getOrReturnCtx(t);return _e(r,{code:fe.invalid_type,expected:we.boolean,received:r.parsedType}),Ue}return kn(t.data)}}gs.create=e=>new gs({typeName:Be.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Ke(e)});class Ki extends tt{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==we.date){const a=this._getOrReturnCtx(t);return _e(a,{code:fe.invalid_type,expected:we.date,received:a.parsedType}),Ue}if(isNaN(t.data.getTime())){const a=this._getOrReturnCtx(t);return _e(a,{code:fe.invalid_date}),Ue}const r=new yn;let i;for(const a of this._def.checks)a.kind==="min"?t.data.getTime()<a.value&&(i=this._getOrReturnCtx(t,i),_e(i,{code:fe.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),r.dirty()):a.kind==="max"?t.data.getTime()>a.value&&(i=this._getOrReturnCtx(t,i),_e(i,{code:fe.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),r.dirty()):ut.assertNever(a);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Ki({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Ae.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Ae.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}}Ki.create=e=>new Ki({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Be.ZodDate,...Ke(e)});class El extends tt{_parse(t){if(this._getType(t)!==we.symbol){const r=this._getOrReturnCtx(t);return _e(r,{code:fe.invalid_type,expected:we.symbol,received:r.parsedType}),Ue}return kn(t.data)}}El.create=e=>new El({typeName:Be.ZodSymbol,...Ke(e)});class vs extends tt{_parse(t){if(this._getType(t)!==we.undefined){const r=this._getOrReturnCtx(t);return _e(r,{code:fe.invalid_type,expected:we.undefined,received:r.parsedType}),Ue}return kn(t.data)}}vs.create=e=>new vs({typeName:Be.ZodUndefined,...Ke(e)});class ys extends tt{_parse(t){if(this._getType(t)!==we.null){const r=this._getOrReturnCtx(t);return _e(r,{code:fe.invalid_type,expected:we.null,received:r.parsedType}),Ue}return kn(t.data)}}ys.create=e=>new ys({typeName:Be.ZodNull,...Ke(e)});class Ya extends tt{constructor(){super(...arguments),this._any=!0}_parse(t){return kn(t.data)}}Ya.create=e=>new Ya({typeName:Be.ZodAny,...Ke(e)});class zi extends tt{constructor(){super(...arguments),this._unknown=!0}_parse(t){return kn(t.data)}}zi.create=e=>new zi({typeName:Be.ZodUnknown,...Ke(e)});class Vr extends tt{_parse(t){const n=this._getOrReturnCtx(t);return _e(n,{code:fe.invalid_type,expected:we.never,received:n.parsedType}),Ue}}Vr.create=e=>new Vr({typeName:Be.ZodNever,...Ke(e)});class Ml extends tt{_parse(t){if(this._getType(t)!==we.undefined){const r=this._getOrReturnCtx(t);return _e(r,{code:fe.invalid_type,expected:we.void,received:r.parsedType}),Ue}return kn(t.data)}}Ml.create=e=>new Ml({typeName:Be.ZodVoid,...Ke(e)});class or extends tt{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==we.array)return _e(n,{code:fe.invalid_type,expected:we.array,received:n.parsedType}),Ue;if(i.exactLength!==null){const o=n.data.length>i.exactLength.value,s=n.data.length<i.exactLength.value;(o||s)&&(_e(n,{code:o?fe.too_big:fe.too_small,minimum:s?i.exactLength.value:void 0,maximum:o?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),r.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(_e(n,{code:fe.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(_e(n,{code:fe.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((o,s)=>i.type._parseAsync(new yr(n,o,n.path,s)))).then(o=>yn.mergeArray(r,o));const a=[...n.data].map((o,s)=>i.type._parseSync(new yr(n,o,n.path,s)));return yn.mergeArray(r,a)}get element(){return this._def.type}min(t,n){return new or({...this._def,minLength:{value:t,message:Ae.toString(n)}})}max(t,n){return new or({...this._def,maxLength:{value:t,message:Ae.toString(n)}})}length(t,n){return new or({...this._def,exactLength:{value:t,message:Ae.toString(n)}})}nonempty(t){return this.min(1,t)}}or.create=(e,t)=>new or({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Be.ZodArray,...Ke(t)});function Sa(e){if(e instanceof Zt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=gr.create(Sa(r))}return new Zt({...e._def,shape:()=>t})}else return e instanceof or?new or({...e._def,type:Sa(e.element)}):e instanceof gr?gr.create(Sa(e.unwrap())):e instanceof gi?gi.create(Sa(e.unwrap())):e instanceof br?br.create(e.items.map(t=>Sa(t))):e}class Zt extends tt{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=ut.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==we.object){const l=this._getOrReturnCtx(t);return _e(l,{code:fe.invalid_type,expected:we.object,received:l.parsedType}),Ue}const{status:r,ctx:i}=this._processInputParams(t),{shape:a,keys:o}=this._getCached(),s=[];if(!(this._def.catchall instanceof Vr&&this._def.unknownKeys==="strip"))for(const l in i.data)o.includes(l)||s.push(l);const c=[];for(const l of o){const u=a[l],d=i.data[l];c.push({key:{status:"valid",value:l},value:u._parse(new yr(i,d,i.path,l)),alwaysSet:l in i.data})}if(this._def.catchall instanceof Vr){const l=this._def.unknownKeys;if(l==="passthrough")for(const u of s)c.push({key:{status:"valid",value:u},value:{status:"valid",value:i.data[u]}});else if(l==="strict")s.length>0&&(_e(i,{code:fe.unrecognized_keys,keys:s}),r.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const u of s){const d=i.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new yr(i,d,i.path,u)),alwaysSet:u in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const l=[];for(const u of c){const d=await u.key,f=await u.value;l.push({key:d,value:f,alwaysSet:u.alwaysSet})}return l}).then(l=>yn.mergeObjectSync(r,l)):yn.mergeObjectSync(r,c)}get shape(){return this._def.shape()}strict(t){return Ae.errToObj,new Zt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var i,a,o,s;const c=(o=(a=(i=this._def).errorMap)===null||a===void 0?void 0:a.call(i,n,r).message)!==null&&o!==void 0?o:r.defaultError;return n.code==="unrecognized_keys"?{message:(s=Ae.errToObj(t).message)!==null&&s!==void 0?s:c}:{message:c}}}:{}})}strip(){return new Zt({...this._def,unknownKeys:"strip"})}passthrough(){return new Zt({...this._def,unknownKeys:"passthrough"})}extend(t){return new Zt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Zt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Be.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Zt({...this._def,catchall:t})}pick(t){const n={};return ut.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new Zt({...this._def,shape:()=>n})}omit(t){const n={};return ut.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new Zt({...this._def,shape:()=>n})}deepPartial(){return Sa(this)}partial(t){const n={};return ut.objectKeys(this.shape).forEach(r=>{const i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i.optional()}),new Zt({...this._def,shape:()=>n})}required(t){const n={};return ut.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let a=this.shape[r];for(;a instanceof gr;)a=a._def.innerType;n[r]=a}}),new Zt({...this._def,shape:()=>n})}keyof(){return X2(ut.objectKeys(this.shape))}}Zt.create=(e,t)=>new Zt({shape:()=>e,unknownKeys:"strip",catchall:Vr.create(),typeName:Be.ZodObject,...Ke(t)});Zt.strictCreate=(e,t)=>new Zt({shape:()=>e,unknownKeys:"strict",catchall:Vr.create(),typeName:Be.ZodObject,...Ke(t)});Zt.lazycreate=(e,t)=>new Zt({shape:e,unknownKeys:"strip",catchall:Vr.create(),typeName:Be.ZodObject,...Ke(t)});class bs extends tt{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function i(a){for(const s of a)if(s.result.status==="valid")return s.result;for(const s of a)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const o=a.map(s=>new Ln(s.ctx.common.issues));return _e(n,{code:fe.invalid_union,unionErrors:o}),Ue}if(n.common.async)return Promise.all(r.map(async a=>{const o={...n,common:{...n.common,issues:[]},parent:null};return{result:await a._parseAsync({data:n.data,path:n.path,parent:o}),ctx:o}})).then(i);{let a;const o=[];for(const c of r){const l={...n,common:{...n.common,issues:[]},parent:null},u=c._parseSync({data:n.data,path:n.path,parent:l});if(u.status==="valid")return u;u.status==="dirty"&&!a&&(a={result:u,ctx:l}),l.common.issues.length&&o.push(l.common.issues)}if(a)return n.common.issues.push(...a.ctx.common.issues),a.result;const s=o.map(c=>new Ln(c));return _e(n,{code:fe.invalid_union,unionErrors:s}),Ue}}get options(){return this._def.options}}bs.create=(e,t)=>new bs({options:e,typeName:Be.ZodUnion,...Ke(t)});const Pr=e=>e instanceof ws?Pr(e.schema):e instanceof cr?Pr(e.innerType()):e instanceof Cs?[e.value]:e instanceof mi?e.options:e instanceof Ts?ut.objectValues(e.enum):e instanceof ks?Pr(e._def.innerType):e instanceof vs?[void 0]:e instanceof ys?[null]:e instanceof gr?[void 0,...Pr(e.unwrap())]:e instanceof gi?[null,...Pr(e.unwrap())]:e instanceof im||e instanceof Os?Pr(e.unwrap()):e instanceof Ss?Pr(e._def.innerType):[];class Eu extends tt{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==we.object)return _e(n,{code:fe.invalid_type,expected:we.object,received:n.parsedType}),Ue;const r=this.discriminator,i=n.data[r],a=this.optionsMap.get(i);return a?n.common.async?a._parseAsync({data:n.data,path:n.path,parent:n}):a._parseSync({data:n.data,path:n.path,parent:n}):(_e(n,{code:fe.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Ue)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const i=new Map;for(const a of n){const o=Pr(a.shape[t]);if(!o.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const s of o){if(i.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);i.set(s,a)}}return new Eu({typeName:Be.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...Ke(r)})}}function Th(e,t){const n=ai(e),r=ai(t);if(e===t)return{valid:!0,data:e};if(n===we.object&&r===we.object){const i=ut.objectKeys(t),a=ut.objectKeys(e).filter(s=>i.indexOf(s)!==-1),o={...e,...t};for(const s of a){const c=Th(e[s],t[s]);if(!c.valid)return{valid:!1};o[s]=c.data}return{valid:!0,data:o}}else if(n===we.array&&r===we.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let a=0;a<e.length;a++){const o=e[a],s=t[a],c=Th(o,s);if(!c.valid)return{valid:!1};i.push(c.data)}return{valid:!0,data:i}}else return n===we.date&&r===we.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class xs extends tt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=(a,o)=>{if(wh(a)||wh(o))return Ue;const s=Th(a.value,o.value);return s.valid?((Ch(a)||Ch(o))&&n.dirty(),{status:n.value,value:s.data}):(_e(r,{code:fe.invalid_intersection_types}),Ue)};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(([a,o])=>i(a,o)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}xs.create=(e,t,n)=>new xs({left:e,right:t,typeName:Be.ZodIntersection,...Ke(n)});class br extends tt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==we.array)return _e(r,{code:fe.invalid_type,expected:we.array,received:r.parsedType}),Ue;if(r.data.length<this._def.items.length)return _e(r,{code:fe.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ue;!this._def.rest&&r.data.length>this._def.items.length&&(_e(r,{code:fe.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const a=[...r.data].map((o,s)=>{const c=this._def.items[s]||this._def.rest;return c?c._parse(new yr(r,o,r.path,s)):null}).filter(o=>!!o);return r.common.async?Promise.all(a).then(o=>yn.mergeArray(n,o)):yn.mergeArray(n,a)}get items(){return this._def.items}rest(t){return new br({...this._def,rest:t})}}br.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new br({items:e,typeName:Be.ZodTuple,rest:null,...Ke(t)})};class _s extends tt{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!==we.object)return _e(r,{code:fe.invalid_type,expected:we.object,received:r.parsedType}),Ue;const i=[],a=this._def.keyType,o=this._def.valueType;for(const s in r.data)i.push({key:a._parse(new yr(r,s,r.path,s)),value:o._parse(new yr(r,r.data[s],r.path,s)),alwaysSet:s in r.data});return r.common.async?yn.mergeObjectAsync(n,i):yn.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof tt?new _s({keyType:t,valueType:n,typeName:Be.ZodRecord,...Ke(r)}):new _s({keyType:ir.create(),valueType:t,typeName:Be.ZodRecord,...Ke(n)})}}class $l extends tt{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!==we.map)return _e(r,{code:fe.invalid_type,expected:we.map,received:r.parsedType}),Ue;const i=this._def.keyType,a=this._def.valueType,o=[...r.data.entries()].map(([s,c],l)=>({key:i._parse(new yr(r,s,r.path,[l,"key"])),value:a._parse(new yr(r,c,r.path,[l,"value"]))}));if(r.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const c of o){const l=await c.key,u=await c.value;if(l.status==="aborted"||u.status==="aborted")return Ue;(l.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(l.value,u.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const c of o){const l=c.key,u=c.value;if(l.status==="aborted"||u.status==="aborted")return Ue;(l.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(l.value,u.value)}return{status:n.value,value:s}}}}$l.create=(e,t,n)=>new $l({valueType:t,keyType:e,typeName:Be.ZodMap,...Ke(n)});class Xi extends tt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==we.set)return _e(r,{code:fe.invalid_type,expected:we.set,received:r.parsedType}),Ue;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(_e(r,{code:fe.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&r.data.size>i.maxSize.value&&(_e(r,{code:fe.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const a=this._def.valueType;function o(c){const l=new Set;for(const u of c){if(u.status==="aborted")return Ue;u.status==="dirty"&&n.dirty(),l.add(u.value)}return{status:n.value,value:l}}const s=[...r.data.values()].map((c,l)=>a._parse(new yr(r,c,r.path,l)));return r.common.async?Promise.all(s).then(c=>o(c)):o(s)}min(t,n){return new Xi({...this._def,minSize:{value:t,message:Ae.toString(n)}})}max(t,n){return new Xi({...this._def,maxSize:{value:t,message:Ae.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Xi.create=(e,t)=>new Xi({valueType:e,minSize:null,maxSize:null,typeName:Be.ZodSet,...Ke(t)});class Ra extends tt{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==we.function)return _e(n,{code:fe.invalid_type,expected:we.function,received:n.parsedType}),Ue;function r(s,c){return Sl({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,kl(),qa].filter(l=>!!l),issueData:{code:fe.invalid_arguments,argumentsError:c}})}function i(s,c){return Sl({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,kl(),qa].filter(l=>!!l),issueData:{code:fe.invalid_return_type,returnTypeError:c}})}const a={errorMap:n.common.contextualErrorMap},o=n.data;if(this._def.returns instanceof Ga){const s=this;return kn(async function(...c){const l=new Ln([]),u=await s._def.args.parseAsync(c,a).catch(h=>{throw l.addIssue(r(c,h)),l}),d=await Reflect.apply(o,this,u);return await s._def.returns._def.type.parseAsync(d,a).catch(h=>{throw l.addIssue(i(d,h)),l})})}else{const s=this;return kn(function(...c){const l=s._def.args.safeParse(c,a);if(!l.success)throw new Ln([r(c,l.error)]);const u=Reflect.apply(o,this,l.data),d=s._def.returns.safeParse(u,a);if(!d.success)throw new Ln([i(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Ra({...this._def,args:br.create(t).rest(zi.create())})}returns(t){return new Ra({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Ra({args:t||br.create([]).rest(zi.create()),returns:n||zi.create(),typeName:Be.ZodFunction,...Ke(r)})}}class ws extends tt{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})}}ws.create=(e,t)=>new ws({getter:e,typeName:Be.ZodLazy,...Ke(t)});class Cs extends tt{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return _e(n,{received:n.data,code:fe.invalid_literal,expected:this._def.value}),Ue}return{status:"valid",value:t.data}}get value(){return this._def.value}}Cs.create=(e,t)=>new Cs({value:e,typeName:Be.ZodLiteral,...Ke(t)});function X2(e,t){return new mi({values:e,typeName:Be.ZodEnum,...Ke(t)})}class mi extends tt{constructor(){super(...arguments),Go.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return _e(n,{expected:ut.joinValues(r),received:n.parsedType,code:fe.invalid_type}),Ue}if(Ol(this,Go)||Y2(this,Go,new Set(this._def.values)),!Ol(this,Go).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return _e(n,{received:n.data,code:fe.invalid_enum_value,options:r}),Ue}return kn(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 mi.create(t,{...this._def,...n})}exclude(t,n=this._def){return mi.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Go=new WeakMap;mi.create=X2;class Ts extends tt{constructor(){super(...arguments),Zo.set(this,void 0)}_parse(t){const n=ut.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==we.string&&r.parsedType!==we.number){const i=ut.objectValues(n);return _e(r,{expected:ut.joinValues(i),received:r.parsedType,code:fe.invalid_type}),Ue}if(Ol(this,Zo)||Y2(this,Zo,new Set(ut.getValidEnumValues(this._def.values))),!Ol(this,Zo).has(t.data)){const i=ut.objectValues(n);return _e(r,{received:r.data,code:fe.invalid_enum_value,options:i}),Ue}return kn(t.data)}get enum(){return this._def.values}}Zo=new WeakMap;Ts.create=(e,t)=>new Ts({values:e,typeName:Be.ZodNativeEnum,...Ke(t)});class Ga extends tt{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==we.promise&&n.common.async===!1)return _e(n,{code:fe.invalid_type,expected:we.promise,received:n.parsedType}),Ue;const r=n.parsedType===we.promise?n.data:Promise.resolve(n.data);return kn(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Ga.create=(e,t)=>new Ga({type:e,typeName:Be.ZodPromise,...Ke(t)});class cr extends tt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Be.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=this._def.effect||null,a={addIssue:o=>{_e(r,o),o.fatal?n.abort():n.dirty()},get path(){return r.path}};if(a.addIssue=a.addIssue.bind(a),i.type==="preprocess"){const o=i.transform(r.data,a);if(r.common.async)return Promise.resolve(o).then(async s=>{if(n.value==="aborted")return Ue;const c=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});return c.status==="aborted"?Ue:c.status==="dirty"||n.value==="dirty"?Oa(c.value):c});{if(n.value==="aborted")return Ue;const s=this._def.schema._parseSync({data:o,path:r.path,parent:r});return s.status==="aborted"?Ue:s.status==="dirty"||n.value==="dirty"?Oa(s.value):s}}if(i.type==="refinement"){const o=s=>{const c=i.refinement(s,a);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 s};if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Ue:(s.status==="dirty"&&n.dirty(),o(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>s.status==="aborted"?Ue:(s.status==="dirty"&&n.dirty(),o(s.value).then(()=>({status:n.value,value:s.value}))))}if(i.type==="transform")if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!ps(o))return o;const s=i.transform(o.value,a);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>ps(o)?Promise.resolve(i.transform(o.value,a)).then(s=>({status:n.value,value:s})):o);ut.assertNever(i)}}cr.create=(e,t,n)=>new cr({schema:e,typeName:Be.ZodEffects,effect:t,...Ke(n)});cr.createWithPreprocess=(e,t,n)=>new cr({schema:t,effect:{type:"preprocess",transform:e},typeName:Be.ZodEffects,...Ke(n)});class gr extends tt{_parse(t){return this._getType(t)===we.undefined?kn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}gr.create=(e,t)=>new gr({innerType:e,typeName:Be.ZodOptional,...Ke(t)});class gi extends tt{_parse(t){return this._getType(t)===we.null?kn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}gi.create=(e,t)=>new gi({innerType:e,typeName:Be.ZodNullable,...Ke(t)});class ks extends tt{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===we.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}ks.create=(e,t)=>new ks({innerType:e,typeName:Be.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ke(t)});class Ss extends tt{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return ms(i)?i.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Ln(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Ln(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Ss.create=(e,t)=>new Ss({innerType:e,typeName:Be.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ke(t)});class Al extends tt{_parse(t){if(this._getType(t)!==we.nan){const r=this._getOrReturnCtx(t);return _e(r,{code:fe.invalid_type,expected:we.nan,received:r.parsedType}),Ue}return{status:"valid",value:t.data}}}Al.create=e=>new Al({typeName:Be.ZodNaN,...Ke(e)});const z8=Symbol("zod_brand");class im extends tt{_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 tc extends tt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?Ue:a.status==="dirty"?(n.dirty(),Oa(a.value)):this._def.out._parseAsync({data:a.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Ue:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(t,n){return new tc({in:t,out:n,typeName:Be.ZodPipeline})}}class Os extends tt{_parse(t){const n=this._def.innerType._parse(t),r=i=>(ps(i)&&(i.value=Object.freeze(i.value)),i);return ms(n)?n.then(i=>r(i)):r(n)}unwrap(){return this._def.innerType}}Os.create=(e,t)=>new Os({innerType:e,typeName:Be.ZodReadonly,...Ke(t)});function Q2(e,t={},n){return e?Ya.create().superRefine((r,i)=>{var a,o;if(!e(r)){const s=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,c=(o=(a=s.fatal)!==null&&a!==void 0?a:n)!==null&&o!==void 0?o:!0,l=typeof s=="string"?{message:s}:s;i.addIssue({code:"custom",...l,fatal:c})}}):Ya.create()}const H8={object:Zt.lazycreate};var Be;(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"})(Be||(Be={}));const V8=(e,t={message:`Input not instance of ${e.name}`})=>Q2(n=>n instanceof e,t),J2=ir.create,e_=hi.create,q8=Al.create,Y8=pi.create,t_=gs.create,G8=Ki.create,Z8=El.create,K8=vs.create,X8=ys.create,Q8=Ya.create,J8=zi.create,e$=Vr.create,t$=Ml.create,n$=or.create,r$=Zt.create,i$=Zt.strictCreate,a$=bs.create,o$=Eu.create,s$=xs.create,c$=br.create,l$=_s.create,u$=$l.create,d$=Xi.create,f$=Ra.create,h$=ws.create,p$=Cs.create,m$=mi.create,g$=Ts.create,v$=Ga.create,pv=cr.create,y$=gr.create,b$=gi.create,x$=cr.createWithPreprocess,_$=tc.create,w$=()=>J2().optional(),C$=()=>e_().optional(),T$=()=>t_().optional(),k$={string:e=>ir.create({...e,coerce:!0}),number:e=>hi.create({...e,coerce:!0}),boolean:e=>gs.create({...e,coerce:!0}),bigint:e=>pi.create({...e,coerce:!0}),date:e=>Ki.create({...e,coerce:!0})},S$=Ue;var sn=Object.freeze({__proto__:null,defaultErrorMap:qa,setErrorMap:S8,getErrorMap:kl,makeIssue:Sl,EMPTY_PATH:O8,addIssueToContext:_e,ParseStatus:yn,INVALID:Ue,DIRTY:Oa,OK:kn,isAborted:wh,isDirty:Ch,isValid:ps,isAsync:ms,get util(){return ut},get objectUtil(){return _h},ZodParsedType:we,getParsedType:ai,ZodType:tt,datetimeRegex:K2,ZodString:ir,ZodNumber:hi,ZodBigInt:pi,ZodBoolean:gs,ZodDate:Ki,ZodSymbol:El,ZodUndefined:vs,ZodNull:ys,ZodAny:Ya,ZodUnknown:zi,ZodNever:Vr,ZodVoid:Ml,ZodArray:or,ZodObject:Zt,ZodUnion:bs,ZodDiscriminatedUnion:Eu,ZodIntersection:xs,ZodTuple:br,ZodRecord:_s,ZodMap:$l,ZodSet:Xi,ZodFunction:Ra,ZodLazy:ws,ZodLiteral:Cs,ZodEnum:mi,ZodNativeEnum:Ts,ZodPromise:Ga,ZodEffects:cr,ZodTransformer:cr,ZodOptional:gr,ZodNullable:gi,ZodDefault:ks,ZodCatch:Ss,ZodNaN:Al,BRAND:z8,ZodBranded:im,ZodPipeline:tc,ZodReadonly:Os,custom:Q2,Schema:tt,ZodSchema:tt,late:H8,get ZodFirstPartyTypeKind(){return Be},coerce:k$,any:Q8,array:n$,bigint:Y8,boolean:t_,date:G8,discriminatedUnion:o$,effect:pv,enum:m$,function:f$,instanceof:V8,intersection:s$,lazy:h$,literal:p$,map:u$,nan:q8,nativeEnum:g$,never:e$,null:X8,nullable:b$,number:e_,object:r$,oboolean:T$,onumber:C$,optional:y$,ostring:w$,pipeline:_$,preprocess:x$,promise:v$,record:l$,set:d$,strictObject:i$,string:J2,symbol:Z8,transformer:pv,tuple:c$,undefined:K8,union:a$,unknown:J8,void:t$,NEVER:S$,ZodIssueCode:fe,quotelessJson:k8,ZodError:Ln});const Mu=()=>{const{texts:{formValidation:e}}=m.useContext(Kt),t=m.useCallback(p=>{let v=(p!=null&&p.useCoerce?sn.coerce:sn).string({invalid_type_error:e.required,required_error:e.required});return p!=null&&p.email&&(v=v.email(e.invalidEmail)),p!=null&&p.length&&(v=v.min(p.length,e.length(p.length))),p!=null&&p.minLength&&(v=v.min(p.minLength,e.minLength(p.minLength))),p!=null&&p.maxLength&&(v=v.max(p.maxLength,e.maxLength(p.maxLength))),p!=null&&p.numeric&&(v=v.regex(/^\d+$/,e.noCharactersOtherThanNumbers)),p!=null&&p.regex&&(v=v.regex(p.regex,e.invalidFormat)),v.transform(_=>_??null)},[e]),n=m.useCallback(p=>t(p).nullable().optional().transform(v=>v??null),[t]),r=m.useCallback(p=>{const v=(p==null?void 0:p.min)??Number.MIN_SAFE_INTEGER,_=(p==null?void 0:p.max)??Number.MAX_SAFE_INTEGER,w=(p!=null&&p.useCoerce?sn.coerce:sn).number({invalid_type_error:e.required,required_error:e.required}).min(v,e.lessThanMin(v)).max(_,e.moreThanMax(_));return w.transform(x=>x??null),w},[e]),i=m.useCallback(p=>r(p).nullable().optional().transform(v=>v??null),[r]),a=m.useCallback(p=>(p!=null&&p.useCoerce?sn.coerce:sn).boolean({invalid_type_error:e.required,required_error:e.required}).transform(v=>v??null),[e.required]),o=m.useCallback(p=>(p!=null&&p.useCoerce?sn.coerce:sn).string({invalid_type_error:e.required,required_error:e.required}).refine(m2,{message:e.invalidDate}).transform(_=>_??null),[e.invalidDate,e.required]),s=m.useCallback(p=>o(p).nullable().transform(v=>v??null),[o]),c=m.useCallback((p,v)=>sn.enum(p,{invalid_type_error:e.required,required_error:e.required}).transform(w=>w??null),[e.required]),l=m.useCallback((p,v)=>c(p,v).nullable().transform(_=>_??null),[c]),u=m.useCallback(p=>sn.object({id:i({useCoerce:!0})}).nullable().transform(_=>_??null),[i]),d=m.useCallback(p=>sn.object({id:r()}).transform(_=>_??null),[r]),f=m.useCallback(p=>sn.object({id:n({useCoerce:!0})}).nullable().transform(_=>_??null),[n]),h=m.useCallback(p=>sn.object({id:t()}).transform(_=>_??null),[t]),g=m.useCallback(({required:p,multiple:v,maxFileSize:_})=>sn.any().transform(x=>Array.from(x??[])).refine(x=>!p||(x==null?void 0:x.length)>0,"File is required.").refine(x=>v||(x==null?void 0:x.length)<=1,"Multiple files not allowed.").refine(x=>x.every(T=>T.size<=_),`Maximum file size is ${Ha(_)}.`).transform(x=>(v?x:x==null?void 0:x[0])??null),[]);return{zString:n,zStringRequired:t,zNumber:i,zNumberRequired:r,zBool:a,zDate:s,zDateRequired:o,zEnum:l,zEnumRequired:c,zObjectIdInt:u,zObjectIdIntRequired:d,zObjectIdStr:f,zObjectIdStrRequired:h,zFile:g}},n_=(e,t)=>{m.useEffect(()=>{const n=r=>{e.some(i=>i.current&&i.current.contains(r.target))||t()};return document.addEventListener("mouseup",n),()=>{document.removeEventListener("mouseup",n)}},[e,t])},r_=()=>{const{user:e}=m.useContext(c2);return{checkUserHasPermissions:m.useCallback((n,r="any")=>n.length===0?!0:r==="any"?n.some(i=>{var a;return(a=e==null?void 0:e.permissions)==null?void 0:a.includes(i)}):n.every(i=>{var a;return(a=e==null?void 0:e.permissions)==null?void 0:a.includes(i)}),[e])}},i_=(e,t)=>{m.useEffect(()=>(document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}),[e]),m.useEffect(()=>t===void 0?()=>{}:(document.addEventListener("keyup",t),()=>{document.removeEventListener("keyup",t)}),[t])},am=(e,t,n)=>m.useMemo(()=>n||e!=="date"&&e!=="datetime-local"&&e!=="time"||t?e:"text",[t,e,n]),a_=()=>{const{addNotification:e}=Su(),{texts:{clipboard:t}}=m.useContext(Kt);return{copyToClipboard:m.useCallback(async r=>{var i;try{await((i=navigator.clipboard)==null?void 0:i.writeText(r)),e(t.copySuccess(r),"prompt")}catch(a){console.error(a),e(t.copyError,"danger")}},[e,t])}},nc=()=>{const[e,t]=m.useState(window.innerWidth),[n,r]=m.useState(window.innerHeight),i=()=>{t(window.innerWidth),r(window.innerHeight)};return m.useEffect(()=>(window.addEventListener("resize",i),()=>window.removeEventListener("resize",i)),[]),{width:e,height:n,isMobile:e<992}},om=m.createContext({useMsal:!1,msalInstance:null,msalScopes:[],msalExtraScopes:[]}),o_=m.createContext({delegation:null,setDelegation:()=>{},availableDelegations:null,setAvailableDelegations:()=>{},refreshAvailableDelegations:async()=>{}}),s_=m.createContext({addHelmet:e=>{},removeHelmet:()=>{}}),c_=m.createContext(void 0),mv={falseIfNotInit:!1},$u=({falseIfNotInit:e=mv.falseIfNotInit}=mv)=>{const t=m.useContext(c_);if(!e&&t===void 0)throw new Error("FormDisabledProvider not initilized. Probably tried to use useFormDisabledContext outside FormDisabledProvider.");return t??!1},O$="_button_1wjon_1",E$="_filled_1wjon_7",M$="_sm_1wjon_13",$$="_md_1wjon_18",A$="_lg_1wjon_23",xa={button:O$,filled:E$,sm:M$,md:$$,lg:A$},Qi=({variant:e="filled",color:t="primary",size:n="md",className:r,children:i,...a})=>a.as==="link"?y.jsx(to.Link,{to:a.href??"/",className:oe(`luminus-primary-button ${t} btn ${e==="outlined"?`btn-outline-${t}`:`btn-${t}`} ${r??""}`,xa.button,xa[e],xa[n]),...a,children:i}):a.as==="button"||a.as===void 0?y.jsx("button",{type:"button",className:oe(`luminus-primary-button ${t} btn ${e==="outlined"?`btn-outline-${t}`:`btn-${t}`} ${r??""}`,xa.button,xa[e],xa[n]),...a,children:i}):null,R$="_button_1r3i0_1",kh={button:R$},Au=({color:e="primary",icon:t,className:n,children:r,...i})=>i.as==="link"?y.jsxs(to.Link,{to:i.href??"/",className:oe(`luminus-context-button btn text-${e} ${n??""}`,kh.button),...i,children:[t,r]}):i.as==="button"||i.as===void 0?y.jsxs("button",{type:"button",className:oe(`luminus-context-button btn text-${e} ${n??""}`,kh.button),...i,children:[t,r]}):null,j$=m.forwardRef(({color:e="primary",icon:t=y.jsx(Qx,{size:12}),inputId:n="context-file-input",accept:r="*",onUpload:i,className:a,children:o,multiple:s,...c},l)=>{const u=d=>{d.target.files&&(i(d.target.files),d.target.value="")};return y.jsxs(y.Fragment,{children:[y.jsxs("label",{ref:l,htmlFor:n,className:oe(`luminus-context-button btn text-${e} ${a??""}`,kh.button),...c,children:[t,o]}),y.jsx("input",{id:n,type:"file",accept:r,onChange:u,hidden:!0,multiple:s})]})}),P$="_icon-button_15e26_1",I$="_sm_15e26_14",D$="_md_15e26_23",N$="_lg_15e26_32",jc={"icon-button":"_icon-button_15e26_1",iconButton:P$,sm:I$,md:D$,lg:N$},rc=({type:e="button",color:t="primary",size:n="md",children:r,className:i,...a})=>a.as==="link"?y.jsx(to.Link,{to:a.href??"/",className:oe(`luminus-icon-button btn text-${t} ${i??""}`,jc.iconButton,jc[n]),...a,children:r}):a.as==="button"||a.as===void 0?y.jsx("button",{type:e,className:oe(`luminus-icon-button btn text-${t} ${i??""}`,jc.iconButton,jc[n]),...a,children:r}):null,L$="_feedback_esh1j_1",F$="_feedback-spacer_esh1j_8",gv={feedback:L$,"feedback-spacer":"_feedback-spacer_esh1j_8",feedbackSpacer:F$},Ru=({message:e})=>y.jsxs(y.Fragment,{children:[y.jsx("div",{className:oe("invalid-feedback luminus-invalid-feedback",gv.feedback),children:e}),y.jsx("div",{className:oe("invalid-feedback-spacer",gv.feedbackSpacer),children:e})]}),B$="_item_1dy8x_1",l_={item:B$},ja=({color:e="primary",icon:t,className:n,children:r,to:i,as:a,...o})=>y.jsxs(ds.Item,{className:oe(`btn luminus-dropdown-item text-nowrap rounded text-${e} ${n??""}`,l_.item),as:a==="link"?to.Link:void 0,to:i??"",...o,children:[t,r]}),U$="_button_qhwih_1",W$={button:U$},sm=m.forwardRef(({color:e="primary",icon:t=y.jsx(e2,{size:21}),text:n,onClick:r,className:i,children:a,...o},s)=>y.jsxs("button",{type:"button",ref:s,onClick:c=>{c.preventDefault(),r(c)},"aria-label":"dropdown toggle",className:oe(`btn luminus-context-button text-${e} ${i??""}`,W$.button),...o,children:[t,n]})),z$="_avatar-icon_1axl6_1",H$={"avatar-icon":"_avatar-icon_1axl6_1",avatarIcon:z$},u_=({name:e,fontSize:t,size:n})=>{const r=m.useMemo(()=>{const o=e.split(" ");return o.length<2?e:fs(" ",o.at(o.length-2),o.at(o.length-1))},[e]),i=m.useMemo(()=>{const o=r.split(" ");return fs("",...o.map(s=>s.at(0)??void 0))},[r]),a=o=>{let s=0,c;for(c=0;c<o.length;c+=1)s=o.charCodeAt(c)+((s<<5)-s);let l="#";for(c=0;c<3;c+=1){const u=s>>c*8&255;l+=`00${u.toString(16)}`.slice(-2)}return l};return y.jsx(Gx,{placement:"bottom",overlay:y.jsx(qx,{children:e}),children:y.jsx("div",{className:oe("luminus-avatar-icon",H$.avatarIcon),style:{backgroundColor:a(r),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:i})})})},V$=m.forwardRef(({userName:e,onClick:t,children:n},r)=>y.jsxs("button",{type:"button",ref:r,onClick:i=>{i.preventDefault(),t(i)},"aria-label":"User avatar toggle",className:"m-0 p-0",style:{backgroundColor:"transparent",border:"none",cursor:"pointer"},children:[y.jsx(u_,{name:e}),n]})),cm=e=>y.jsx(ds.Toggle,{...e}),q$="_divider_1e6rk_1",Y$={divider:q$},d_=({className:e})=>y.jsx(ds.Divider,{className:oe("luminus-dropdown-divider",e,Y$.divider)}),G$="_dropdown_1lk66_1",Z$={dropdown:G$},lm=({toggle:e,children:t,align:n,...r})=>y.jsxs(ds,{...r,align:n,children:[e,y.jsx(ds.Menu,{className:oe("luminus-dropdown rounded shadow",Z$.dropdown),align:n,children:t})]});function K$(e,t,n){var r=this,i=m.useRef(null),a=m.useRef(0),o=m.useRef(null),s=m.useRef([]),c=m.useRef(),l=m.useRef(),u=m.useRef(e),d=m.useRef(!0);u.current=e;var f=typeof window<"u",h=!t&&t!==0&&f;if(typeof e!="function")throw new TypeError("Expected a function");t=+t||0;var g=!!(n=n||{}).leading,p=!("trailing"in n)||!!n.trailing,v="maxWait"in n,_="debounceOnServer"in n&&!!n.debounceOnServer,w=v?Math.max(+n.maxWait||0,t):null;m.useEffect(function(){return d.current=!0,function(){d.current=!1}},[]);var x=m.useMemo(function(){var T=function(E){var C=s.current,M=c.current;return s.current=c.current=null,a.current=E,l.current=u.current.apply(M,C)},b=function(E,C){h&&cancelAnimationFrame(o.current),o.current=h?requestAnimationFrame(E):setTimeout(E,C)},k=function(E){if(!d.current)return!1;var C=E-i.current;return!i.current||C>=t||C<0||v&&E-a.current>=w},j=function(E){return o.current=null,p&&s.current?T(E):(s.current=c.current=null,l.current)},S=function E(){var C=Date.now();if(k(C))return j(C);if(d.current){var M=t-(C-i.current),$=v?Math.min(M,w-(C-a.current)):M;b(E,$)}},O=function(){if(f||_){var E=Date.now(),C=k(E);if(s.current=[].slice.call(arguments),c.current=r,i.current=E,C){if(!o.current&&d.current)return a.current=i.current,b(S,t),g?T(i.current):l.current;if(v)return b(S,t),T(i.current)}return o.current||b(S,t),l.current}};return O.cancel=function(){o.current&&(h?cancelAnimationFrame(o.current):clearTimeout(o.current)),a.current=0,s.current=i.current=c.current=o.current=null},O.isPending=function(){return!!o.current},O.flush=function(){return o.current?j(Date.now()):l.current},O},[g,v,t,w,p,h,f,_]);return x}function X$(e,t){return e===t}function f_(e,t,n){var r=X$,i=m.useRef(e),a=m.useState({})[1],o=K$(m.useCallback(function(c){i.current=c,a({})},[a]),t,n),s=m.useRef(e);return r(s.current,e)||(o(e),s.current=e),[i.current,o]}const Q$="_wrapper_1mvyk_1",J$="_open_1mvyk_9",e7="_dropdown_1mvyk_13",t7="_search-input-container_1mvyk_19",n7="_search-input_1mvyk_19",r7="_loading-container_1mvyk_25",i7="_items-container_1mvyk_32",a7="_header-row_1mvyk_38",o7="_name_1mvyk_49",s7="_item_1mvyk_32",c7="_column-item_1mvyk_65",l7="_icon_1mvyk_69",u7="_action-buttons-container_1mvyk_89",d7="_reverse_1mvyk_97",f7="_action-button_1mvyk_89",h7="_actions-dropdown_1mvyk_110",on={wrapper:Q$,open:J$,dropdown:e7,"search-input-container":"_search-input-container_1mvyk_19",searchInputContainer:t7,"search-input":"_search-input_1mvyk_19",searchInput:n7,"loading-container":"_loading-container_1mvyk_25",loadingContainer:r7,"items-container":"_items-container_1mvyk_32",itemsContainer:i7,"header-row":"_header-row_1mvyk_38",headerRow:a7,name:o7,item:s7,"column-item":"_column-item_1mvyk_65",columnItem:c7,icon:l7,"action-buttons-container":"_action-buttons-container_1mvyk_89",actionButtonsContainer:u7,reverse:d7,"action-button":"_action-button_1mvyk_89",actionButton:f7,"actions-dropdown":"_actions-dropdown_1mvyk_110",actionsDropdown:h7},h_=({show:e,onCancel:t,items:n,suggestedItems:r,suggestedItemsTitle:i,currentSelection:a,onSelectionChange:o,onSearchQueryChange:s,texts:c,itemsNameWidth:l,additionalColumns:u,displayIdAsName:d=!1,autoHideSearch:f=!1,allItemsLength:h,disabled:g,isLoading:p=!1,inputRef:v,archiveColumn:_="archive",addNewOptionPath:w,refreshOptions:x})=>{var qe;const{texts:{customSelect:T}}=m.useContext(Kt),b=m.useRef(null),k=m.useRef(null),j=m.useRef(null),S=m.useRef(null),O=m.useRef(null),[E,C]=m.useState(""),[M]=f_(E,500),[,$]=m.useState(!1),{copyToClipboard:A}=a_(),P=(qe=v.current)==null?void 0:qe.getBoundingClientRect(),N=(P==null?void 0:P.x)??0,F=((P==null?void 0:P.x)??0)+((P==null?void 0:P.width)??0),z=(P==null?void 0:P.y)??0,q=((P==null?void 0:P.y)??0)+((P==null?void 0:P.height)??0),W=(P==null?void 0:P.width)??0,G=(P==null?void 0:P.height)??0,ee=5,{isMobile:ie}=nc(),Q=8,X=m.useMemo(()=>N?N>window.innerWidth/2-Q:!1,[N]),K=m.useMemo(()=>z?z>window.innerHeight/2-Q:!1,[z]);m.useEffect(()=>{var pe;e&&((pe=j.current)==null||pe.focus())},[j,e]),m.useEffect(()=>{e||C("")},[e]),m.useEffect(()=>{s&&s(M)},[M,s]);const[te,D]=m.useState(null);m.useEffect(()=>{e&&n.length>0?D(0):D(null)},[n,e]);const I=m.useMemo(()=>te!==null?n.at(te)??null:null,[te,n]),L=m.useCallback((pe,Oe)=>{var Ce,Le;const Ee=document.getElementById(`item-${pe}`);if(Ee){const rt=Ee.clientHeight??0;Oe==="down"?(Ce=S.current)==null||Ce.scrollBy({left:0,top:rt,behavior:"smooth"}):(Le=S.current)==null||Le.scrollBy({left:0,top:-rt,behavior:"smooth"})}},[]),V=m.useCallback(pe=>{if(te===null||g)return;const Oe=te+pe;Oe<0||Oe>=n.length||D(Ee=>(Ee!==null&&L(Ee,pe>0?"down":"up"),Oe))},[te,n,g,L]),R=m.useCallback(pe=>{if(e)switch(pe.key){case"Escape":pe.stopPropagation(),pe.preventDefault(),t();break;case"Enter":pe.stopPropagation(),pe.preventDefault(),g||o(I);break;case"ArrowUp":pe.stopPropagation(),pe.preventDefault(),V(-1);break;case"ArrowDown":pe.stopPropagation(),pe.preventDefault(),V(1);break}},[t,e,V,I,g,o]),Z=m.useCallback(()=>{$(pe=>!pe)},[]);m.useEffect(()=>(window.addEventListener("scroll",Z),()=>{window.removeEventListener("scroll",Z)}),[Z]),m.useEffect(()=>(window.addEventListener("resize",Z),()=>{window.removeEventListener("resize",Z)}),[Z]),i_(R),n_([b,k,O],t);const J=l??(u&&u.length>0?250:0),ne=(u==null?void 0:u.reduce((pe,Oe)=>pe+(Oe.width??100),0))??0,he=m.useMemo(()=>(a&&e&&!g)??!1,[a,e,g]),be=m.useMemo(()=>(a&&e)??!1,[a,e]),ge=m.useMemo(()=>e&&(be||w!==void 0||x!==void 0),[e,be,w,x]),We=32,Re=ie?`calc(100vw - ${We}px)`:`calc(max(${W}px, calc(${J}px + ${ne}px)))`,et=m.useMemo(()=>(E.length<1&&r&&r.length>0?r:n).map(pe=>{var Oe,Ee;return d?((Oe=pe.id)==null?void 0:Oe.toString())??"":((Ee=pe.name)==null?void 0:Ee.toString())??""}).reduce((pe,Oe)=>pe.length>Oe.length?pe:Oe,""),[E,r,n,d]);return y.jsxs(y.Fragment,{children:[y.jsx(w_,{show:e,onClick:t}),y.jsxs("div",{className:oe("luminus-dropdown-picker-actions",on.actionButtonsContainer,{[on.reverse]:X}),style:{top:`calc(${z}px + ${G/2}px - 12px)`,left:X?he&&be?`calc(${N}px - 24px - 8px - 24px - 4px)`:`calc(${N}px - 24px - 8px)`:`calc(${F}px + 8px)`},children:[he&&y.jsx("button",{ref:k,type:"button",className:oe("luminus-dropdown-picker-clear-button",on.actionButton),onClick:()=>!g&&o(null),children:y.jsx(wn,{variant:"caption",className:"text-danger",children:y.jsx(Xx,{size:16})})}),ge?y.jsx("div",{ref:O,children:y.jsxs(lm,{toggle:y.jsx(cm,{as:sm,className:oe("luminus-dropdown-picker-actions-dropdown",on.actionsDropdown),icon:y.jsx(wn,{variant:"caption",className:"text-primary",children:y.jsx(e2,{size:16})})}),children:[be?y.jsx(ja,{icon:y.jsx(JS,{}),onClick:()=>{var pe,Oe;A(d?((pe=a==null?void 0:a.id)==null?void 0:pe.toString())??"":((Oe=a==null?void 0:a.name)==null?void 0:Oe.toString())??"")},children:T.copySelection}):null,be&&(w||x)?y.jsx(d_,{}):null,w?y.jsx(ja,{icon:y.jsx(QS,{}),onClick:()=>{window.open(w,"_blank")},children:T.addNewOption}):null,x?y.jsx(ja,{icon:y.jsx(lO,{}),onClick:()=>{x()},children:T.refreshOptions}):null]})}):null]}),y.jsx("div",{className:oe("luminus-dropdown-picker",on.wrapper,{[on.open]:e}),style:{top:K?`calc(${z}px - 50vh - 8px)`:`calc(${q}px + 8px)`,left:ie?`${We/2}px`:X?`calc(${F}px - ${Re})`:N,right:ie?`${We/2}px`:X?`${F}px`:`calc(${N}px + ${Re})`,width:Re,justifyContent:K?"flex-end":"flex-start"},children:y.jsx("div",{ref:b,className:oe("shadow rounded",on.dropdown),children:!g&&y.jsxs(y.Fragment,{children:[!s||f&&(h??n.length)<=ee?null:y.jsx("div",{className:oe("search-input-container border-bottom",on.searchInputContainer),children:y.jsx(kr.Control,{ref:j,type:"search",size:"sm",className:on.searchInput,placeholder:c.searchPlaceholder,value:E,onChange:pe=>{var Oe;return C(((Oe=pe.target)==null?void 0:Oe.value)??"")}})}),E.length<1&&r&&r.length>0?y.jsx(pm,{variant:"info",size:"sm",children:i??T.suggestedItemsTitle}):null,p?y.jsx("div",{className:on.loadingContainer,children:y.jsx(Yp,{animation:"border",variant:"primary"})}):(E.length<1&&r&&(r==null?void 0:r.length)>0||n.length>0)&&y.jsxs("div",{ref:S,className:oe("items",on.itemsContainer),children:[u&&u.length>0&&y.jsxs("div",{className:oe("header-row border-bottom",on.headerRow),children:[y.jsx("div",{className:on.name,children:y.jsx(wn,{variant:"body2",children:et})}),u==null?void 0:u.filter(pe=>pe.key!==_).map(pe=>y.jsx("div",{className:on.columnItem,style:{width:`${pe.width??100}px`,minWidth:`${pe.width??100}px`,maxWidth:`${pe.width??100}px`},children:y.jsx(wn,{variant:"caption",children:pe.name})},pe.key))]}),(E.length<1&&r&&r.length>0?r:n).map((pe,Oe)=>y.jsxs("button",{id:`item-${Oe}`,type:"button",className:oe("item cursor-pointer",on.item,{[on.focused]:te===Oe},{focused:te===Oe},{archive:pe.additionalColumns?pe.additionalColumns[_]:!1}),onClick:()=>!g&&o(pe),onMouseEnter:()=>D(Oe),children:[y.jsx("div",{className:on.name,children:y.jsx(wn,{variant:"body2",children:d?pe.id:pe.name})}),u==null?void 0:u.filter(Ee=>Ee.key!==_).map(Ee=>y.jsx("div",{className:on.columnItem,style:{width:`${Ee.width??100}px`,minWidth:`${Ee.width??100}px`,maxWidth:`${Ee.width??100}px`},children:y.jsx(wn,{variant:"caption",className:oe("text-muted"),children:pe.additionalColumns&&pe.additionalColumns[Ee.key]})},Ee.key))]},pe.id))]})]})})})]})};function p7(e){return nt({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 m7(e){return nt({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 g7(e){return nt({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 v7(e){return nt({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)}var um={};um.match=C7;um.parse=p_;var y7=/(?:(only|not)?\s*([^\s\(\)]+)(?:\s*and)?\s*)?(.+)?/i,b7=/\(\s*([^\s\:\)]+)\s*(?:\:\s*([^\s\)]+))?\s*\)/,x7=/^(?:(min|max)-)?(.+)/,_7=/(em|rem|px|cm|mm|in|pt|pc)?$/,w7=/(dpi|dpcm|dppx)?$/;function C7(e,t){return p_(e).some(function(n){var r=n.inverse,i=n.type==="all"||t.type===n.type;if(i&&r||!(i||r))return!1;var a=n.expressions.every(function(o){var s=o.feature,c=o.modifier,l=o.value,u=t[s];if(!u)return!1;switch(s){case"orientation":case"scan":return u.toLowerCase()===l.toLowerCase();case"width":case"height":case"device-width":case"device-height":l=bv(l),u=bv(u);break;case"resolution":l=yv(l),u=yv(u);break;case"aspect-ratio":case"device-aspect-ratio":case"device-pixel-ratio":l=vv(l),u=vv(u);break;case"grid":case"color":case"color-index":case"monochrome":l=parseInt(l,10)||1,u=parseInt(u,10)||0;break}switch(c){case"min":return u>=l;case"max":return u<=l;default:return u===l}});return a&&!r||!a&&r})}function p_(e){return e.split(",").map(function(t){t=t.trim();var n=t.match(y7),r=n[1],i=n[2],a=n[3]||"",o={};return o.inverse=!!r&&r.toLowerCase()==="not",o.type=i?i.toLowerCase():"all",a=a.match(/\([^\)]+\)/g)||[],o.expressions=a.map(function(s){var c=s.match(b7),l=c[1].toLowerCase().match(x7);return{modifier:l[1],feature:l[2],value:c[2]}}),o})}function vv(e){var t=Number(e),n;return t||(n=e.match(/^(\d+)\s*\/\s*(\d+)$/),t=n[1]/n[2]),t}function yv(e){var t=parseFloat(e),n=String(e).match(w7)[1];switch(n){case"dpcm":return t/2.54;case"dppx":return t*96;default:return t}}function bv(e){var t=parseFloat(e),n=String(e).match(_7)[1];switch(n){case"em":return t*16;case"rem":return t*16;case"cm":return t*96/2.54;case"mm":return t*96/2.54/10;case"in":return t*96;case"pt":return t*72;case"pc":return t*72/12;default:return t}}var T7=um.match,xv=typeof window<"u"?window.matchMedia:null;function k7(e,t,n){var r=this,i;xv&&!n&&(i=xv.call(window,e)),i?(this.matches=i.matches,this.media=i.media,i.addListener(s)):(this.matches=T7(e,t),this.media=e),this.addListener=a,this.removeListener=o,this.dispose=c;function a(l){i&&i.addListener(l)}function o(l){i&&i.removeListener(l)}function s(l){r.matches=l.matches,r.media=l.media}function c(){i&&i.removeListener(s)}}function S7(e,t,n){return new k7(e,t,n)}var O7=S7;const E7=Ht(O7);var M7=/[A-Z]/g,$7=/^ms-/,gf={};function A7(e){return"-"+e.toLowerCase()}function m_(e){if(gf.hasOwnProperty(e))return gf[e];var t=e.replace(M7,A7);return gf[e]=$7.test(t)?"-"+t:t}function R7(e,t){if(e===t)return!0;if(!e||!t)return!1;const n=Object.keys(e),r=Object.keys(t),i=n.length;if(r.length!==i)return!1;for(let a=0;a<i;a++){const o=n[a];if(e[o]!==t[o]||!Object.prototype.hasOwnProperty.call(t,o))return!1}return!0}const _n=H.oneOfType([H.string,H.number]),dm={all:H.bool,grid:H.bool,aural:H.bool,braille:H.bool,handheld:H.bool,print:H.bool,projection:H.bool,screen:H.bool,tty:H.bool,tv:H.bool,embossed:H.bool},g_={orientation:H.oneOf(["portrait","landscape"]),scan:H.oneOf(["progressive","interlace"]),aspectRatio:H.string,deviceAspectRatio:H.string,height:_n,deviceHeight:_n,width:_n,deviceWidth:_n,color:H.bool,colorIndex:H.bool,monochrome:H.bool,resolution:_n,type:Object.keys(dm)},{type:Kne,...j7}=g_,v_={minAspectRatio:H.string,maxAspectRatio:H.string,minDeviceAspectRatio:H.string,maxDeviceAspectRatio:H.string,minHeight:_n,maxHeight:_n,minDeviceHeight:_n,maxDeviceHeight:_n,minWidth:_n,maxWidth:_n,minDeviceWidth:_n,maxDeviceWidth:_n,minColor:H.number,maxColor:H.number,minColorIndex:H.number,maxColorIndex:H.number,minMonochrome:H.number,maxMonochrome:H.number,minResolution:_n,maxResolution:_n,...j7},P7={...dm,...v_};var I7={all:P7,types:dm,matchers:g_,features:v_};const D7=e=>`not ${e}`,N7=(e,t)=>{const n=m_(e);return typeof t=="number"&&(t=`${t}px`),t===!0?n:t===!1?D7(n):`(${n}: ${t})`},L7=e=>e.join(" and "),F7=e=>{const t=[];return Object.keys(I7.all).forEach(n=>{const r=e[n];r!=null&&t.push(N7(n,r))}),L7(t)},B7=m.createContext(void 0),U7=e=>e.query||F7(e),_v=e=>e?Object.keys(e).reduce((n,r)=>(n[m_(r)]=e[r],n),{}):void 0,y_=()=>{const e=m.useRef(!1);return m.useEffect(()=>{e.current=!0},[]),e.current},W7=e=>{const t=m.useContext(B7),n=()=>_v(e)||_v(t),[r,i]=m.useState(n);return m.useEffect(()=>{const a=n();R7(r,a)||i(a)},[e,t]),r},z7=e=>{const t=()=>U7(e),[n,r]=m.useState(t);return m.useEffect(()=>{const i=t();n!==i&&r(i)},[e]),n},H7=(e,t)=>{const n=()=>E7(e,t||{},!!t),[r,i]=m.useState(n),a=y_();return m.useEffect(()=>{if(a){const o=n();return i(o),()=>{o&&o.dispose()}}},[e,t]),r},V7=e=>{const[t,n]=m.useState(e.matches);return m.useEffect(()=>{const r=i=>{n(i.matches)};return e.addListener(r),n(e.matches),()=>{e.removeListener(r)}},[e]),t},vf=(e,t,n)=>{const r=W7(t),i=z7(e);if(!i)throw new Error("Invalid or missing MediaQuery!");const a=H7(i,r),o=V7(a),s=y_();return m.useEffect(()=>{s&&n&&n(o)},[o]),m.useEffect(()=>()=>{a&&a.dispose()},[]),o},q7=["sm","md","lg","always"],b_="ResponsiveContextDropdownItem",Y7=e=>e.type.displayName===b_,fm=e=>({});fm.displayName=b_;function G7(e){return e.type&&e.type===m.Fragment}const x_=e=>{const t=[];Array.isArray(e)?t.push(...e):t.push(e);const n=[];return t.forEach(r=>{if(r){if(G7(r)){n.push(...x_(r.props.children));return}n.push(r)}}),n},Z7=(e,t)=>{if(t===void 0)return e;const{searchQueryString:n,...r}=t;return to.generatePath(e,r)+"?"+n},K7="_disabled_9mp5v_1",X7={disabled:K7},Q7=()=>{const{ProjectIconComponent:e}=m.useContext(Kt),{checkUserHasPermissions:t}=r_();return{getProcessedChildren:m.useCallback((r,i)=>{const a=[],o=[];let s=null;const c=u=>{const{hideOn:d,children:f,cKey:h,to:g,toRoute:p,disabled:v,icon:_,pathParams:w,...x}=u.props,T=(p==null?void 0:p.permissions)!=null,b=(p==null?void 0:p.permissions)!=null&&t(p==null?void 0:p.permissions),k=(v??!1)||T&&!b,j=g??(p==null?void 0:Z7(p==null?void 0:p.route,w)),S=f??(p==null?void 0:p.name),O=_??(p!=null?y.jsx(e,{icon:"link"}):void 0);if(d==="always"||q7.indexOf(d)>=i){s&&o.length>0&&o.push(s),s=null;const E=oe(x.className,{[X7.disabled]:k});j!=null?o.push(y.jsx(ja,{...x,as:"link",to:j,disabled:k,icon:O,className:E,children:S},h)):o.push(y.jsx(ja,{...x,icon:O,className:E,children:S},h))}else{const E=j!=null?{as:"link",href:j}:{};a.push(y.jsx(Au,{...x,...E,icon:O,className:oe(k?"disabled":void 0,x.className),children:S},h))}};return x_(r).forEach(u=>{u&&m.isValidElement(u)&&(Y7(u)?c(u):s=u)}),{buttons:a,dropdownItems:o}},[e,t])}},__=({children:e})=>{const{getProcessedChildren:t}=Q7(),n=vf({maxWidth:768}),r=vf({minWidth:769,maxWidth:1200}),i=vf({minWidth:1201}),a=[n,r,i].indexOf(!0),{buttons:o,dropdownItems:s}=t(e,a);return y.jsxs("div",{className:"d-flex gap-1",children:[y.jsx(y.Fragment,{children:o}),s.length>0?y.jsx(lm,{toggle:y.jsx(cm,{as:sm}),children:s}):null]})};__.Item=fm;const J7="Left",eA="Right",tA="Up",nA="Down",Ea={delta:10,preventScrollOnSwipe:!1,rotationAngle:0,trackMouse:!1,trackTouch:!0,swipeDuration:1/0,touchEventOptions:{passive:!0}},Sh={first:!0,initial:[0,0],start:0,swiping:!1,xy:[0,0]},wv="mousemove",Cv="mouseup",rA="touchend",iA="touchmove",aA="touchstart";function oA(e,t,n,r){return e>t?n>0?eA:J7:r>0?nA:tA}function Tv(e,t){if(t===0)return e;const n=Math.PI/180*t,r=e[0]*Math.cos(n)+e[1]*Math.sin(n),i=e[1]*Math.cos(n)-e[0]*Math.sin(n);return[r,i]}function sA(e,t){const n=u=>{const d="touches"in u;d&&u.touches.length>1||e((f,h)=>{h.trackMouse&&!d&&(document.addEventListener(wv,r),document.addEventListener(Cv,o));const{clientX:g,clientY:p}=d?u.touches[0]:u,v=Tv([g,p],h.rotationAngle);return h.onTouchStartOrOnMouseDown&&h.onTouchStartOrOnMouseDown({event:u}),Object.assign(Object.assign(Object.assign({},f),Sh),{initial:v.slice(),xy:v,start:u.timeStamp||0})})},r=u=>{e((d,f)=>{const h="touches"in u;if(h&&u.touches.length>1)return d;if(u.timeStamp-d.start>f.swipeDuration)return d.swiping?Object.assign(Object.assign({},d),{swiping:!1}):d;const{clientX:g,clientY:p}=h?u.touches[0]:u,[v,_]=Tv([g,p],f.rotationAngle),w=v-d.xy[0],x=_-d.xy[1],T=Math.abs(w),b=Math.abs(x),k=(u.timeStamp||0)-d.start,j=Math.sqrt(T*T+b*b)/(k||1),S=[w/(k||1),x/(k||1)],O=oA(T,b,w,x),E=typeof f.delta=="number"?f.delta:f.delta[O.toLowerCase()]||Ea.delta;if(T<E&&b<E&&!d.swiping)return d;const C={absX:T,absY:b,deltaX:w,deltaY:x,dir:O,event:u,first:d.first,initial:d.initial,velocity:j,vxvy:S};C.first&&f.onSwipeStart&&f.onSwipeStart(C),f.onSwiping&&f.onSwiping(C);let M=!1;return(f.onSwiping||f.onSwiped||f[`onSwiped${O}`])&&(M=!0),M&&f.preventScrollOnSwipe&&f.trackTouch&&u.cancelable&&u.preventDefault(),Object.assign(Object.assign({},d),{first:!1,eventData:C,swiping:!0})})},i=u=>{e((d,f)=>{let h;if(d.swiping&&d.eventData){if(u.timeStamp-d.start<f.swipeDuration){h=Object.assign(Object.assign({},d.eventData),{event:u}),f.onSwiped&&f.onSwiped(h);const g=f[`onSwiped${h.dir}`];g&&g(h)}}else f.onTap&&f.onTap({event:u});return f.onTouchEndOrOnMouseUp&&f.onTouchEndOrOnMouseUp({event:u}),Object.assign(Object.assign(Object.assign({},d),Sh),{eventData:h})})},a=()=>{document.removeEventListener(wv,r),document.removeEventListener(Cv,o)},o=u=>{a(),i(u)},s=(u,d)=>{let f=()=>{};if(u&&u.addEventListener){const h=Object.assign(Object.assign({},Ea.touchEventOptions),d.touchEventOptions),g=[[aA,n,h],[iA,r,Object.assign(Object.assign({},h),d.preventScrollOnSwipe?{passive:!1}:{})],[rA,i,h]];g.forEach(([p,v,_])=>u.addEventListener(p,v,_)),f=()=>g.forEach(([p,v])=>u.removeEventListener(p,v))}return f},l={ref:u=>{u!==null&&e((d,f)=>{if(d.el===u)return d;const h={};return d.el&&d.el!==u&&d.cleanUpTouch&&(d.cleanUpTouch(),h.cleanUpTouch=void 0),f.trackTouch&&u&&(h.cleanUpTouch=s(u,f)),Object.assign(Object.assign(Object.assign({},d),{el:u}),h)})}};return t.trackMouse&&(l.onMouseDown=n),[l,s]}function cA(e,t,n,r){return!t.trackTouch||!e.el?(e.cleanUpTouch&&e.cleanUpTouch(),Object.assign(Object.assign({},e),{cleanUpTouch:void 0})):e.cleanUpTouch?t.preventScrollOnSwipe!==n.preventScrollOnSwipe||t.touchEventOptions.passive!==n.touchEventOptions.passive?(e.cleanUpTouch(),Object.assign(Object.assign({},e),{cleanUpTouch:r(e.el,t)})):e:Object.assign(Object.assign({},e),{cleanUpTouch:r(e.el,t)})}function hm(e){const{trackMouse:t}=e,n=ue.useRef(Object.assign({},Sh)),r=ue.useRef(Object.assign({},Ea)),i=ue.useRef(Object.assign({},r.current));i.current=Object.assign({},r.current),r.current=Object.assign(Object.assign({},Ea),e);let a;for(a in Ea)r.current[a]===void 0&&(r.current[a]=Ea[a]);const[o,s]=ue.useMemo(()=>sA(c=>n.current=c(n.current,r.current),{trackMouse:t}),[t]);return n.current=cA(n.current,r.current,i.current,s),o}const lA="_backdrop_3huvf_1",uA="_show_3huvf_11",kv={backdrop:lA,show:uA},w_=({show:e,onClick:t})=>y.jsx("div",{className:oe("luminus-backdrop",kv.backdrop,{[kv.show]:e}),onClick:()=>t&&t()}),pm=e=>{const{variant:t,children:n,className:r,size:i="md",typographyVariant:a=i==="sm"?"body2":"body",...o}={...e};return y.jsx(p5,{variant:t,className:`text-center ${i==="sm"?"p-1":i==="md"?"p-3":"p-4"} bg-${t} bg-opacity-10 border-none ${r??""}`,...o,children:y.jsx(wn,{variant:a,children:n})})},dA="_floating-label_3xm9u_1",fA="_without-label_3xm9u_21",hA="_floating-label-check_3xm9u_184",yf={"floating-label":"_floating-label_3xm9u_1",floatingLabel:dA,"without-label":"_without-label_3xm9u_21",withoutLabel:fA,"floating-label-check":"_floating-label-check_3xm9u_184",floatingLabelCheck:hA},pA=({hint:e,children:t})=>e?y.jsx(Zp,{text:e,placement:"top",children:t}):t,ju=m.forwardRef(({hidden:e,children:t,className:n,isInvalid:r,isForRadioInput:i,inputContainerClassName:a,isForCheckInput:o,hint:s,required:c,disabled:l,...u},d)=>{const{ProjectIconComponent:f}=m.useContext(Kt),h=u.withoutLabel?"":y.jsxs("div",{className:"d-flex gap-1 align-items-center",children:[u.label,c?y.jsx("span",{className:oe("fw-bold",{"text-danger":!l}),style:{fontSize:"16px"},children:"*"}):null,s?y.jsx("div",{className:"d-flex align-items-center",children:y.jsx(f,{icon:"info"})}):null]});return o?y.jsx("div",{className:oe("luminus-floating-label-check",yf.floatingLabelCheck),children:t}):y.jsx(pA,{hint:s,children:y.jsx(Up,{ref:d,label:y.jsx("div",{className:"d-flex gap-1 align-items-center",children:h}),hidden:e??!1,className:oe(`luminus-floating-label ${n??""}`,yf.floatingLabel,{[a??""]:a},{[yf.withoutLabel]:u.withoutLabel}),children:t})})});ju.displayName="FloatingLabelInput";const mA="_row-label-input_mqkkx_1",gA="_label_mqkkx_4",vA="_input-container_mqkkx_9",yA="_invalid-feedback_mqkkx_104",bA="_keep-check-label_mqkkx_132",xA="_is-invalid_mqkkx_160",Io={"row-label-input":"_row-label-input_mqkkx_1",rowLabelInput:mA,label:gA,"input-container":"_input-container_mqkkx_9",inputContainer:vA,"invalid-feedback":"_invalid-feedback_mqkkx_104",invalidFeedback:yA,"keep-check-label":"_keep-check-label_mqkkx_132",keepCheckLabel:bA,"is-invalid":"_is-invalid_mqkkx_160",isInvalid:xA},ic=m.forwardRef(({hidden:e,children:t,required:n,disabled:r,className:i,isInvalid:a,isForRadioInput:o,isForTextAreaInput:s,inputContainerClassName:c,hint:l,...u},d)=>{const{ProjectIconComponent:f}=m.useContext(Kt),h=u.withoutLabel?y.jsx(y.Fragment,{}):y.jsx("label",{className:oe("label col-6",{"col-12":s},Io.label),children:y.jsxs(wn,{variant:"form-label",className:oe("d-flex gap-1 align-items-center",a?"text-danger":""),children:[u.label,n?y.jsx("span",{className:oe("fw-bold",{"text-danger":!r}),style:{fontSize:"16px"},children:"*"}):null,l?y.jsx("div",{className:"d-flex align-items-center",style:{paddingTop:"2px"},children:y.jsx(f,{icon:"info"})}):null]})});return y.jsxs("div",{ref:d,className:oe("luminus-row-label row gx-0 gy-0",{"is-invalid":a},{[Io.isInvalid]:a},{[i??""]:i},{"d-none":e},Io.rowLabelInput),children:[l?y.jsx(Zp,{text:l,placement:"top",children:h}):h,y.jsx("div",{className:oe("input-container",Io.inputContainer,{"col-6":!u.withoutLabel&&!s},{"col-12":u.withoutLabel||s},{[Io.keepCheckLabel]:o},{[c??""]:c}),children:t})]})});ic.displayName="RowLabelInput";const C_=m.forwardRef(({children:e,className:t,hidden:n},r)=>y.jsx("div",{ref:r,className:`${n?"d-none":""} ${t}`,children:e}));C_.displayName="NoInputContainer";const T_=({currentSelection:e,selectedItemNavigateTo:t,children:n})=>{if(!e||!e.id||!t)return y.jsx("div",{className:"luminus-input-container position-relative w-100",children:n});const r=t(e);return y.jsx(to.Link,{to:r,className:"luminus-input-container position-relative w-100 text-decoration-none",children:n})},k_=({InputContainer:e=ju,type:t,value:n,onChange:r,debounceMs:i,label:a,withoutLabel:o,placeholder:s,size:c,hidden:l,disabled:u,showClearIcon:d,clearValue:f,list:h,className:g,step:p,minLength:v,maxLength:_,noSelectOnFocus:w,hint:x,onConfirm:T,autoComplete:b})=>{const k=t==="number",j=m.useCallback(()=>{if(!r)return;const F=f??null;r(k?F?Number(F):null:(F==null?void 0:F.toString())??"")},[f,k,r]),S=m.useRef(null),[O,E]=m.useState((n==null?void 0:n.toString())??""),C=m.useCallback(F=>{const z=F;r&&r(k?z==null||z===""?null:Number(z):z||null)},[k,r]),M=m.useCallback(F=>{var q;const z=(q=F.target)==null?void 0:q.value;if(!i){C(z);return}E(z),S.current!==null&&window.clearTimeout(S.current),S.current=window.setTimeout(()=>{C(z)},i)},[i,C]),$=m.useMemo(()=>{if(T!==void 0)return F=>{F.key==="Enter"&&T&&T()}},[T]);m.useEffect(()=>{E(n===null?"":n.toString())},[n]);const[A,P]=m.useState(!1),N=am(t,n?n.toString()??null:null,A);return y.jsxs(e,{withoutLabel:o,label:a??"",hidden:l,className:g,hint:x,disabled:u,children:[y.jsx(kr.Control,{type:N,placeholder:s??a,size:c,value:i?O:(n==null?void 0:n.toString())??"",onChange:M,className:g??"",hidden:l,disabled:u??!1,list:h,onFocus:F=>{P(!0),!w&&F.target.select()},onBlur:()=>P(!1),onKeyDown:$,step:p,minLength:v,maxLength:_,autoComplete:b}),d&&n!==null&&r&&!u&&y.jsx("div",{className:`luminus-input-remove-icon ${t!=="text"?"inset":""}`,children:y.jsx(rc,{color:"secondary",size:"sm",onClick:j,children:y.jsx(Xs,{})})})]})};var mm={},Rl={exports:{}};Rl.exports;(function(e,t){var n=200,r="__lodash_hash_undefined__",i=1,a=2,o=9007199254740991,s="[object Arguments]",c="[object Array]",l="[object AsyncFunction]",u="[object Boolean]",d="[object Date]",f="[object Error]",h="[object Function]",g="[object GeneratorFunction]",p="[object Map]",v="[object Number]",_="[object Null]",w="[object Object]",x="[object Promise]",T="[object Proxy]",b="[object RegExp]",k="[object Set]",j="[object String]",S="[object Symbol]",O="[object Undefined]",E="[object WeakMap]",C="[object ArrayBuffer]",M="[object DataView]",$="[object Float32Array]",A="[object Float64Array]",P="[object Int8Array]",N="[object Int16Array]",F="[object Int32Array]",z="[object Uint8Array]",q="[object Uint8ClampedArray]",W="[object Uint16Array]",G="[object Uint32Array]",ee=/[\\^$.*+?()[\]{}|]/g,ie=/^\[object .+?Constructor\]$/,Q=/^(?:0|[1-9]\d*)$/,X={};X[$]=X[A]=X[P]=X[N]=X[F]=X[z]=X[q]=X[W]=X[G]=!0,X[s]=X[c]=X[C]=X[u]=X[M]=X[d]=X[f]=X[h]=X[p]=X[v]=X[w]=X[b]=X[k]=X[j]=X[E]=!1;var K=typeof Hn=="object"&&Hn&&Hn.Object===Object&&Hn,te=typeof self=="object"&&self&&self.Object===Object&&self,D=K||te||Function("return this")(),I=t&&!t.nodeType&&t,L=I&&!0&&e&&!e.nodeType&&e,V=L&&L.exports===I,R=V&&K.process,Z=function(){try{return R&&R.binding&&R.binding("util")}catch{}}(),J=Z&&Z.isTypedArray;function ne(B,Y){for(var le=-1,Te=B==null?0:B.length,Nt=0,Qe=[];++le<Te;){var Qt=B[le];Y(Qt,le,B)&&(Qe[Nt++]=Qt)}return Qe}function he(B,Y){for(var le=-1,Te=Y.length,Nt=B.length;++le<Te;)B[Nt+le]=Y[le];return B}function be(B,Y){for(var le=-1,Te=B==null?0:B.length;++le<Te;)if(Y(B[le],le,B))return!0;return!1}function ge(B,Y){for(var le=-1,Te=Array(B);++le<B;)Te[le]=Y(le);return Te}function We(B){return function(Y){return B(Y)}}function Re(B,Y){return B.has(Y)}function et(B,Y){return B==null?void 0:B[Y]}function qe(B){var Y=-1,le=Array(B.size);return B.forEach(function(Te,Nt){le[++Y]=[Nt,Te]}),le}function pe(B,Y){return function(le){return B(Y(le))}}function Oe(B){var Y=-1,le=Array(B.size);return B.forEach(function(Te){le[++Y]=Te}),le}var Ee=Array.prototype,Ce=Function.prototype,Le=Object.prototype,rt=D["__core-js_shared__"],Pt=Ce.toString,it=Le.hasOwnProperty,st=function(){var B=/[^.]+$/.exec(rt&&rt.keys&&rt.keys.IE_PROTO||"");return B?"Symbol(src)_1."+B:""}(),pt=Le.toString,It=RegExp("^"+Pt.call(it).replace(ee,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ct=V?D.Buffer:void 0,dt=D.Symbol,mt=D.Uint8Array,Ut=Le.propertyIsEnumerable,Ne=Ee.splice,je=dt?dt.toStringTag:void 0,Ye=Object.getOwnPropertySymbols,lt=ct?ct.isBuffer:void 0,gt=pe(Object.keys,Object),kt=ma(D,"DataView"),Vt=ma(D,"Map"),At=ma(D,"Promise"),Dt=ma(D,"Set"),qt=ma(D,"WeakMap"),vt=ma(Object,"create"),Yt=ki(kt),rn=ki(Vt),Jt=ki(At),ve=ki(Dt),Se=ki(qt),Pe=dt?dt.prototype:void 0,Ge=Pe?Pe.valueOf:void 0;function ze(B){var Y=-1,le=B==null?0:B.length;for(this.clear();++Y<le;){var Te=B[Y];this.set(Te[0],Te[1])}}function ft(){this.__data__=vt?vt(null):{},this.size=0}function U(B){var Y=this.has(B)&&delete this.__data__[B];return this.size-=Y?1:0,Y}function ce(B){var Y=this.__data__;if(vt){var le=Y[B];return le===r?void 0:le}return it.call(Y,B)?Y[B]:void 0}function ae(B){var Y=this.__data__;return vt?Y[B]!==void 0:it.call(Y,B)}function se(B,Y){var le=this.__data__;return this.size+=this.has(B)?0:1,le[B]=vt&&Y===void 0?r:Y,this}ze.prototype.clear=ft,ze.prototype.delete=U,ze.prototype.get=ce,ze.prototype.has=ae,ze.prototype.set=se;function ye(B){var Y=-1,le=B==null?0:B.length;for(this.clear();++Y<le;){var Te=B[Y];this.set(Te[0],Te[1])}}function Me(){this.__data__=[],this.size=0}function xe(B){var Y=this.__data__,le=xc(Y,B);if(le<0)return!1;var Te=Y.length-1;return le==Te?Y.pop():Ne.call(Y,le,1),--this.size,!0}function ke(B){var Y=this.__data__,le=xc(Y,B);return le<0?void 0:Y[le][1]}function Fe(B){return xc(this.__data__,B)>-1}function Ie(B,Y){var le=this.__data__,Te=xc(le,B);return Te<0?(++this.size,le.push([B,Y])):le[Te][1]=Y,this}ye.prototype.clear=Me,ye.prototype.delete=xe,ye.prototype.get=ke,ye.prototype.has=Fe,ye.prototype.set=Ie;function Xe(B){var Y=-1,le=B==null?0:B.length;for(this.clear();++Y<le;){var Te=B[Y];this.set(Te[0],Te[1])}}function Wt(){this.size=0,this.__data__={hash:new ze,map:new(Vt||ye),string:new ze}}function Ot(B){var Y=_c(this,B).delete(B);return this.size-=Y?1:0,Y}function Xt(B){return _c(this,B).get(B)}function me(B){return _c(this,B).has(B)}function ln(B,Y){var le=_c(this,B),Te=le.size;return le.set(B,Y),this.size+=le.size==Te?0:1,this}Xe.prototype.clear=Wt,Xe.prototype.delete=Ot,Xe.prototype.get=Xt,Xe.prototype.has=me,Xe.prototype.set=ln;function Et(B){var Y=-1,le=B==null?0:B.length;for(this.__data__=new Xe;++Y<le;)this.add(B[Y])}function Jn(B){return this.__data__.set(B,r),this}function yc(B){return this.__data__.has(B)}Et.prototype.add=Et.prototype.push=Jn,Et.prototype.has=yc;function er(B){var Y=this.__data__=new ye(B);this.size=Y.size}function Ti(){this.__data__=new ye,this.size=0}function bc(B){var Y=this.__data__,le=Y.delete(B);return this.size=Y.size,le}function Mr(B){return this.__data__.get(B)}function qd(B){return this.__data__.has(B)}function $r(B,Y){var le=this.__data__;if(le instanceof ye){var Te=le.__data__;if(!Vt||Te.length<n-1)return Te.push([B,Y]),this.size=++le.size,this;le=this.__data__=new Xe(Te)}return le.set(B,Y),this.size=le.size,this}er.prototype.clear=Ti,er.prototype.delete=bc,er.prototype.get=Mr,er.prototype.has=qd,er.prototype.set=$r;function Co(B,Y){var le=wc(B),Te=!le&&qC(B),Nt=!le&&!Te&&Yd(B),Qe=!le&&!Te&&!Nt&&e0(B),Qt=le||Te||Nt||Qe,an=Qt?ge(B.length,String):[],un=an.length;for(var Gt in B)it.call(B,Gt)&&!(Qt&&(Gt=="length"||Nt&&(Gt=="offset"||Gt=="parent")||Qe&&(Gt=="buffer"||Gt=="byteLength"||Gt=="byteOffset")||UC(Gt,un)))&&an.push(Gt);return an}function xc(B,Y){for(var le=B.length;le--;)if(Kg(B[le][0],Y))return le;return-1}function RC(B,Y,le){var Te=Y(B);return wc(B)?Te:he(Te,le(B))}function To(B){return B==null?B===void 0?O:_:je&&je in Object(B)?FC(B):VC(B)}function qg(B){return ko(B)&&To(B)==s}function Yg(B,Y,le,Te,Nt){return B===Y?!0:B==null||Y==null||!ko(B)&&!ko(Y)?B!==B&&Y!==Y:jC(B,Y,le,Te,Yg,Nt)}function jC(B,Y,le,Te,Nt,Qe){var Qt=wc(B),an=wc(Y),un=Qt?c:Zr(B),Gt=an?c:Zr(Y);un=un==s?w:un,Gt=Gt==s?w:Gt;var In=un==w,tr=Gt==w,fn=un==Gt;if(fn&&Yd(B)){if(!Yd(Y))return!1;Qt=!0,In=!1}if(fn&&!In)return Qe||(Qe=new er),Qt||e0(B)?Gg(B,Y,le,Te,Nt,Qe):NC(B,Y,un,le,Te,Nt,Qe);if(!(le&i)){var Bn=In&&it.call(B,"__wrapped__"),Un=tr&&it.call(Y,"__wrapped__");if(Bn||Un){var Kr=Bn?B.value():B,Ar=Un?Y.value():Y;return Qe||(Qe=new er),Nt(Kr,Ar,le,Te,Qe)}}return fn?(Qe||(Qe=new er),LC(B,Y,le,Te,Nt,Qe)):!1}function PC(B){if(!Jg(B)||zC(B))return!1;var Y=Xg(B)?It:ie;return Y.test(ki(B))}function IC(B){return ko(B)&&Qg(B.length)&&!!X[To(B)]}function DC(B){if(!HC(B))return gt(B);var Y=[];for(var le in Object(B))it.call(B,le)&&le!="constructor"&&Y.push(le);return Y}function Gg(B,Y,le,Te,Nt,Qe){var Qt=le&i,an=B.length,un=Y.length;if(an!=un&&!(Qt&&un>an))return!1;var Gt=Qe.get(B);if(Gt&&Qe.get(Y))return Gt==Y;var In=-1,tr=!0,fn=le&a?new Et:void 0;for(Qe.set(B,Y),Qe.set(Y,B);++In<an;){var Bn=B[In],Un=Y[In];if(Te)var Kr=Qt?Te(Un,Bn,In,Y,B,Qe):Te(Bn,Un,In,B,Y,Qe);if(Kr!==void 0){if(Kr)continue;tr=!1;break}if(fn){if(!be(Y,function(Ar,Si){if(!Re(fn,Si)&&(Bn===Ar||Nt(Bn,Ar,le,Te,Qe)))return fn.push(Si)})){tr=!1;break}}else if(!(Bn===Un||Nt(Bn,Un,le,Te,Qe))){tr=!1;break}}return Qe.delete(B),Qe.delete(Y),tr}function NC(B,Y,le,Te,Nt,Qe,Qt){switch(le){case M:if(B.byteLength!=Y.byteLength||B.byteOffset!=Y.byteOffset)return!1;B=B.buffer,Y=Y.buffer;case C:return!(B.byteLength!=Y.byteLength||!Qe(new mt(B),new mt(Y)));case u:case d:case v:return Kg(+B,+Y);case f:return B.name==Y.name&&B.message==Y.message;case b:case j:return B==Y+"";case p:var an=qe;case k:var un=Te&i;if(an||(an=Oe),B.size!=Y.size&&!un)return!1;var Gt=Qt.get(B);if(Gt)return Gt==Y;Te|=a,Qt.set(B,Y);var In=Gg(an(B),an(Y),Te,Nt,Qe,Qt);return Qt.delete(B),In;case S:if(Ge)return Ge.call(B)==Ge.call(Y)}return!1}function LC(B,Y,le,Te,Nt,Qe){var Qt=le&i,an=Zg(B),un=an.length,Gt=Zg(Y),In=Gt.length;if(un!=In&&!Qt)return!1;for(var tr=un;tr--;){var fn=an[tr];if(!(Qt?fn in Y:it.call(Y,fn)))return!1}var Bn=Qe.get(B);if(Bn&&Qe.get(Y))return Bn==Y;var Un=!0;Qe.set(B,Y),Qe.set(Y,B);for(var Kr=Qt;++tr<un;){fn=an[tr];var Ar=B[fn],Si=Y[fn];if(Te)var t0=Qt?Te(Si,Ar,fn,Y,B,Qe):Te(Ar,Si,fn,B,Y,Qe);if(!(t0===void 0?Ar===Si||Nt(Ar,Si,le,Te,Qe):t0)){Un=!1;break}Kr||(Kr=fn=="constructor")}if(Un&&!Kr){var Cc=B.constructor,Tc=Y.constructor;Cc!=Tc&&"constructor"in B&&"constructor"in Y&&!(typeof Cc=="function"&&Cc instanceof Cc&&typeof Tc=="function"&&Tc instanceof Tc)&&(Un=!1)}return Qe.delete(B),Qe.delete(Y),Un}function Zg(B){return RC(B,ZC,BC)}function _c(B,Y){var le=B.__data__;return WC(Y)?le[typeof Y=="string"?"string":"hash"]:le.map}function ma(B,Y){var le=et(B,Y);return PC(le)?le:void 0}function FC(B){var Y=it.call(B,je),le=B[je];try{B[je]=void 0;var Te=!0}catch{}var Nt=pt.call(B);return Te&&(Y?B[je]=le:delete B[je]),Nt}var BC=Ye?function(B){return B==null?[]:(B=Object(B),ne(Ye(B),function(Y){return Ut.call(B,Y)}))}:KC,Zr=To;(kt&&Zr(new kt(new ArrayBuffer(1)))!=M||Vt&&Zr(new Vt)!=p||At&&Zr(At.resolve())!=x||Dt&&Zr(new Dt)!=k||qt&&Zr(new qt)!=E)&&(Zr=function(B){var Y=To(B),le=Y==w?B.constructor:void 0,Te=le?ki(le):"";if(Te)switch(Te){case Yt:return M;case rn:return p;case Jt:return x;case ve:return k;case Se:return E}return Y});function UC(B,Y){return Y=Y??o,!!Y&&(typeof B=="number"||Q.test(B))&&B>-1&&B%1==0&&B<Y}function WC(B){var Y=typeof B;return Y=="string"||Y=="number"||Y=="symbol"||Y=="boolean"?B!=="__proto__":B===null}function zC(B){return!!st&&st in B}function HC(B){var Y=B&&B.constructor,le=typeof Y=="function"&&Y.prototype||Le;return B===le}function VC(B){return pt.call(B)}function ki(B){if(B!=null){try{return Pt.call(B)}catch{}try{return B+""}catch{}}return""}function Kg(B,Y){return B===Y||B!==B&&Y!==Y}var qC=qg(function(){return arguments}())?qg:function(B){return ko(B)&&it.call(B,"callee")&&!Ut.call(B,"callee")},wc=Array.isArray;function YC(B){return B!=null&&Qg(B.length)&&!Xg(B)}var Yd=lt||XC;function GC(B,Y){return Yg(B,Y)}function Xg(B){if(!Jg(B))return!1;var Y=To(B);return Y==h||Y==g||Y==l||Y==T}function Qg(B){return typeof B=="number"&&B>-1&&B%1==0&&B<=o}function Jg(B){var Y=typeof B;return B!=null&&(Y=="object"||Y=="function")}function ko(B){return B!=null&&typeof B=="object"}var e0=J?We(J):IC;function ZC(B){return YC(B)?Co(B):DC(B)}function KC(){return[]}function XC(){return!1}e.exports=GC})(Rl,Rl.exports);var _A=Rl.exports,S_={exports:{}};(function(e,t){var n=function(){var r=function(b,k){var j=236,S=17,O=b,E=a[k],C=null,M=0,$=null,A=[],P={},N=function(D,I){M=O*4+17,C=function(L){for(var V=new Array(L),R=0;R<L;R+=1){V[R]=new Array(L);for(var Z=0;Z<L;Z+=1)V[R][Z]=null}return V}(M),F(0,0),F(M-7,0),F(0,M-7),W(),q(),ee(D,I),O>=7&&G(D),$==null&&($=X(O,E,A)),ie($,I)},F=function(D,I){for(var L=-1;L<=7;L+=1)if(!(D+L<=-1||M<=D+L))for(var V=-1;V<=7;V+=1)I+V<=-1||M<=I+V||(0<=L&&L<=6&&(V==0||V==6)||0<=V&&V<=6&&(L==0||L==6)||2<=L&&L<=4&&2<=V&&V<=4?C[D+L][I+V]=!0:C[D+L][I+V]=!1)},z=function(){for(var D=0,I=0,L=0;L<8;L+=1){N(!0,L);var V=s.getLostPoint(P);(L==0||D>V)&&(D=V,I=L)}return I},q=function(){for(var D=8;D<M-8;D+=1)C[D][6]==null&&(C[D][6]=D%2==0);for(var I=8;I<M-8;I+=1)C[6][I]==null&&(C[6][I]=I%2==0)},W=function(){for(var D=s.getPatternPosition(O),I=0;I<D.length;I+=1)for(var L=0;L<D.length;L+=1){var V=D[I],R=D[L];if(C[V][R]==null)for(var Z=-2;Z<=2;Z+=1)for(var J=-2;J<=2;J+=1)Z==-2||Z==2||J==-2||J==2||Z==0&&J==0?C[V+Z][R+J]=!0:C[V+Z][R+J]=!1}},G=function(D){for(var I=s.getBCHTypeNumber(O),L=0;L<18;L+=1){var V=!D&&(I>>L&1)==1;C[Math.floor(L/3)][L%3+M-8-3]=V}for(var L=0;L<18;L+=1){var V=!D&&(I>>L&1)==1;C[L%3+M-8-3][Math.floor(L/3)]=V}},ee=function(D,I){for(var L=E<<3|I,V=s.getBCHTypeInfo(L),R=0;R<15;R+=1){var Z=!D&&(V>>R&1)==1;R<6?C[R][8]=Z:R<8?C[R+1][8]=Z:C[M-15+R][8]=Z}for(var R=0;R<15;R+=1){var Z=!D&&(V>>R&1)==1;R<8?C[8][M-R-1]=Z:R<9?C[8][15-R-1+1]=Z:C[8][15-R-1]=Z}C[M-8][8]=!D},ie=function(D,I){for(var L=-1,V=M-1,R=7,Z=0,J=s.getMaskFunction(I),ne=M-1;ne>0;ne-=2)for(ne==6&&(ne-=1);;){for(var he=0;he<2;he+=1)if(C[V][ne-he]==null){var be=!1;Z<D.length&&(be=(D[Z]>>>R&1)==1);var ge=J(V,ne-he);ge&&(be=!be),C[V][ne-he]=be,R-=1,R==-1&&(Z+=1,R=7)}if(V+=L,V<0||M<=V){V-=L,L=-L;break}}},Q=function(D,I){for(var L=0,V=0,R=0,Z=new Array(I.length),J=new Array(I.length),ne=0;ne<I.length;ne+=1){var he=I[ne].dataCount,be=I[ne].totalCount-he;V=Math.max(V,he),R=Math.max(R,be),Z[ne]=new Array(he);for(var ge=0;ge<Z[ne].length;ge+=1)Z[ne][ge]=255&D.getBuffer()[ge+L];L+=he;var We=s.getErrorCorrectPolynomial(be),Re=l(Z[ne],We.getLength()-1),et=Re.mod(We);J[ne]=new Array(We.getLength()-1);for(var ge=0;ge<J[ne].length;ge+=1){var qe=ge+et.getLength()-J[ne].length;J[ne][ge]=qe>=0?et.getAt(qe):0}}for(var pe=0,ge=0;ge<I.length;ge+=1)pe+=I[ge].totalCount;for(var Oe=new Array(pe),Ee=0,ge=0;ge<V;ge+=1)for(var ne=0;ne<I.length;ne+=1)ge<Z[ne].length&&(Oe[Ee]=Z[ne][ge],Ee+=1);for(var ge=0;ge<R;ge+=1)for(var ne=0;ne<I.length;ne+=1)ge<J[ne].length&&(Oe[Ee]=J[ne][ge],Ee+=1);return Oe},X=function(D,I,L){for(var V=u.getRSBlocks(D,I),R=d(),Z=0;Z<L.length;Z+=1){var J=L[Z];R.put(J.getMode(),4),R.put(J.getLength(),s.getLengthInBits(J.getMode(),D)),J.write(R)}for(var ne=0,Z=0;Z<V.length;Z+=1)ne+=V[Z].dataCount;if(R.getLengthInBits()>ne*8)throw"code length overflow. ("+R.getLengthInBits()+">"+ne*8+")";for(R.getLengthInBits()+4<=ne*8&&R.put(0,4);R.getLengthInBits()%8!=0;)R.putBit(!1);for(;!(R.getLengthInBits()>=ne*8||(R.put(j,8),R.getLengthInBits()>=ne*8));)R.put(S,8);return Q(R,V)};P.addData=function(D,I){I=I||"Byte";var L=null;switch(I){case"Numeric":L=f(D);break;case"Alphanumeric":L=h(D);break;case"Byte":L=g(D);break;case"Kanji":L=p(D);break;default:throw"mode:"+I}A.push(L),$=null},P.isDark=function(D,I){if(D<0||M<=D||I<0||M<=I)throw D+","+I;return C[D][I]},P.getModuleCount=function(){return M},P.make=function(){if(O<1){for(var D=1;D<40;D++){for(var I=u.getRSBlocks(D,E),L=d(),V=0;V<A.length;V++){var R=A[V];L.put(R.getMode(),4),L.put(R.getLength(),s.getLengthInBits(R.getMode(),D)),R.write(L)}for(var Z=0,V=0;V<I.length;V++)Z+=I[V].dataCount;if(L.getLengthInBits()<=Z*8)break}O=D}N(!1,z())},P.createTableTag=function(D,I){D=D||2,I=typeof I>"u"?D*4:I;var L="";L+='<table style="',L+=" border-width: 0px; border-style: none;",L+=" border-collapse: collapse;",L+=" padding: 0px; margin: "+I+"px;",L+='">',L+="<tbody>";for(var V=0;V<P.getModuleCount();V+=1){L+="<tr>";for(var R=0;R<P.getModuleCount();R+=1)L+='<td style="',L+=" border-width: 0px; border-style: none;",L+=" border-collapse: collapse;",L+=" padding: 0px; margin: 0px;",L+=" width: "+D+"px;",L+=" height: "+D+"px;",L+=" background-color: ",L+=P.isDark(V,R)?"#000000":"#ffffff",L+=";",L+='"/>';L+="</tr>"}return L+="</tbody>",L+="</table>",L},P.createSvgTag=function(D,I,L,V){var R={};typeof arguments[0]=="object"&&(R=arguments[0],D=R.cellSize,I=R.margin,L=R.alt,V=R.title),D=D||2,I=typeof I>"u"?D*4:I,L=typeof L=="string"?{text:L}:L||{},L.text=L.text||null,L.id=L.text?L.id||"qrcode-description":null,V=typeof V=="string"?{text:V}:V||{},V.text=V.text||null,V.id=V.text?V.id||"qrcode-title":null;var Z=P.getModuleCount()*D+I*2,J,ne,he,be,ge="",We;for(We="l"+D+",0 0,"+D+" -"+D+",0 0,-"+D+"z ",ge+='<svg version="1.1" xmlns="http://www.w3.org/2000/svg"',ge+=R.scalable?"":' width="'+Z+'px" height="'+Z+'px"',ge+=' viewBox="0 0 '+Z+" "+Z+'" ',ge+=' preserveAspectRatio="xMinYMin meet"',ge+=V.text||L.text?' role="img" aria-labelledby="'+K([V.id,L.id].join(" ").trim())+'"':"",ge+=">",ge+=V.text?'<title id="'+K(V.id)+'">'+K(V.text)+"</title>":"",ge+=L.text?'<description id="'+K(L.id)+'">'+K(L.text)+"</description>":"",ge+='<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>',ge+='<path d="',he=0;he<P.getModuleCount();he+=1)for(be=he*D+I,J=0;J<P.getModuleCount();J+=1)P.isDark(he,J)&&(ne=J*D+I,ge+="M"+ne+","+be+We);return ge+='" stroke="transparent" fill="black"/>',ge+="</svg>",ge},P.createDataURL=function(D,I){D=D||2,I=typeof I>"u"?D*4:I;var L=P.getModuleCount()*D+I*2,V=I,R=L-I;return T(L,L,function(Z,J){if(V<=Z&&Z<R&&V<=J&&J<R){var ne=Math.floor((Z-V)/D),he=Math.floor((J-V)/D);return P.isDark(he,ne)?0:1}else return 1})},P.createImgTag=function(D,I,L){D=D||2,I=typeof I>"u"?D*4:I;var V=P.getModuleCount()*D+I*2,R="";return R+="<img",R+=' src="',R+=P.createDataURL(D,I),R+='"',R+=' width="',R+=V,R+='"',R+=' height="',R+=V,R+='"',L&&(R+=' alt="',R+=K(L),R+='"'),R+="/>",R};var K=function(D){for(var I="",L=0;L<D.length;L+=1){var V=D.charAt(L);switch(V){case"<":I+="<";break;case">":I+=">";break;case"&":I+="&";break;case'"':I+=""";break;default:I+=V;break}}return I},te=function(D){var I=1;D=typeof D>"u"?I*2:D;var L=P.getModuleCount()*I+D*2,V=D,R=L-D,Z,J,ne,he,be,ge={"██":"█","█ ":"▀"," █":"▄"," ":" "},We={"██":"▀","█ ":"▀"," █":" "," ":" "},Re="";for(Z=0;Z<L;Z+=2){for(ne=Math.floor((Z-V)/I),he=Math.floor((Z+1-V)/I),J=0;J<L;J+=1)be="█",V<=J&&J<R&&V<=Z&&Z<R&&P.isDark(ne,Math.floor((J-V)/I))&&(be=" "),V<=J&&J<R&&V<=Z+1&&Z+1<R&&P.isDark(he,Math.floor((J-V)/I))?be+=" ":be+="█",Re+=D<1&&Z+1>=R?We[be]:ge[be];Re+=`
|
|
254
254
|
`}return L%2&&D>0?Re.substring(0,Re.length-L-1)+Array(L+1).join("▀"):Re.substring(0,Re.length-1)};return P.createASCII=function(D,I){if(D=D||1,D<2)return te(I);D-=1,I=typeof I>"u"?D*2:I;var L=P.getModuleCount()*D+I*2,V=I,R=L-I,Z,J,ne,he,be=Array(D+1).join("██"),ge=Array(D+1).join(" "),We="",Re="";for(Z=0;Z<L;Z+=1){for(ne=Math.floor((Z-V)/D),Re="",J=0;J<L;J+=1)he=1,V<=J&&J<R&&V<=Z&&Z<R&&P.isDark(ne,Math.floor((J-V)/D))&&(he=0),Re+=he?be:ge;for(ne=0;ne<D;ne+=1)We+=Re+`
|
|
255
255
|
`}return We.substring(0,We.length-1)},P.renderTo2dContext=function(D,I){I=I||2;for(var L=P.getModuleCount(),V=0;V<L;V++)for(var R=0;R<L;R++)D.fillStyle=P.isDark(V,R)?"black":"white",D.fillRect(V*I,R*I,I,I)},P};r.stringToBytesFuncs={default:function(b){for(var k=[],j=0;j<b.length;j+=1){var S=b.charCodeAt(j);k.push(S&255)}return k}},r.stringToBytes=r.stringToBytesFuncs.default,r.createStringToBytes=function(b,k){var j=function(){for(var O=w(b),E=function(){var q=O.read();if(q==-1)throw"eof";return q},C=0,M={};;){var $=O.read();if($==-1)break;var A=E(),P=E(),N=E(),F=String.fromCharCode($<<8|A),z=P<<8|N;M[F]=z,C+=1}if(C!=k)throw C+" != "+k;return M}(),S=63;return function(O){for(var E=[],C=0;C<O.length;C+=1){var M=O.charCodeAt(C);if(M<128)E.push(M);else{var $=j[O.charAt(C)];typeof $=="number"?($&255)==$?E.push($):(E.push($>>>8),E.push($&255)):E.push(S)}}return E}};var i={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},a={L:1,M:0,Q:3,H:2},o={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},s=function(){var b=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],k=1335,j=7973,S=21522,O={},E=function(C){for(var M=0;C!=0;)M+=1,C>>>=1;return M};return O.getBCHTypeInfo=function(C){for(var M=C<<10;E(M)-E(k)>=0;)M^=k<<E(M)-E(k);return(C<<10|M)^S},O.getBCHTypeNumber=function(C){for(var M=C<<12;E(M)-E(j)>=0;)M^=j<<E(M)-E(j);return C<<12|M},O.getPatternPosition=function(C){return b[C-1]},O.getMaskFunction=function(C){switch(C){case o.PATTERN000:return function(M,$){return(M+$)%2==0};case o.PATTERN001:return function(M,$){return M%2==0};case o.PATTERN010:return function(M,$){return $%3==0};case o.PATTERN011:return function(M,$){return(M+$)%3==0};case o.PATTERN100:return function(M,$){return(Math.floor(M/2)+Math.floor($/3))%2==0};case o.PATTERN101:return function(M,$){return M*$%2+M*$%3==0};case o.PATTERN110:return function(M,$){return(M*$%2+M*$%3)%2==0};case o.PATTERN111:return function(M,$){return(M*$%3+(M+$)%2)%2==0};default:throw"bad maskPattern:"+C}},O.getErrorCorrectPolynomial=function(C){for(var M=l([1],0),$=0;$<C;$+=1)M=M.multiply(l([1,c.gexp($)],0));return M},O.getLengthInBits=function(C,M){if(1<=M&&M<10)switch(C){case i.MODE_NUMBER:return 10;case i.MODE_ALPHA_NUM:return 9;case i.MODE_8BIT_BYTE:return 8;case i.MODE_KANJI:return 8;default:throw"mode:"+C}else if(M<27)switch(C){case i.MODE_NUMBER:return 12;case i.MODE_ALPHA_NUM:return 11;case i.MODE_8BIT_BYTE:return 16;case i.MODE_KANJI:return 10;default:throw"mode:"+C}else if(M<41)switch(C){case i.MODE_NUMBER:return 14;case i.MODE_ALPHA_NUM:return 13;case i.MODE_8BIT_BYTE:return 16;case i.MODE_KANJI:return 12;default:throw"mode:"+C}else throw"type:"+M},O.getLostPoint=function(C){for(var M=C.getModuleCount(),$=0,A=0;A<M;A+=1)for(var P=0;P<M;P+=1){for(var N=0,F=C.isDark(A,P),z=-1;z<=1;z+=1)if(!(A+z<0||M<=A+z))for(var q=-1;q<=1;q+=1)P+q<0||M<=P+q||z==0&&q==0||F==C.isDark(A+z,P+q)&&(N+=1);N>5&&($+=3+N-5)}for(var A=0;A<M-1;A+=1)for(var P=0;P<M-1;P+=1){var W=0;C.isDark(A,P)&&(W+=1),C.isDark(A+1,P)&&(W+=1),C.isDark(A,P+1)&&(W+=1),C.isDark(A+1,P+1)&&(W+=1),(W==0||W==4)&&($+=3)}for(var A=0;A<M;A+=1)for(var P=0;P<M-6;P+=1)C.isDark(A,P)&&!C.isDark(A,P+1)&&C.isDark(A,P+2)&&C.isDark(A,P+3)&&C.isDark(A,P+4)&&!C.isDark(A,P+5)&&C.isDark(A,P+6)&&($+=40);for(var P=0;P<M;P+=1)for(var A=0;A<M-6;A+=1)C.isDark(A,P)&&!C.isDark(A+1,P)&&C.isDark(A+2,P)&&C.isDark(A+3,P)&&C.isDark(A+4,P)&&!C.isDark(A+5,P)&&C.isDark(A+6,P)&&($+=40);for(var G=0,P=0;P<M;P+=1)for(var A=0;A<M;A+=1)C.isDark(A,P)&&(G+=1);var ee=Math.abs(100*G/M/M-50)/5;return $+=ee*10,$},O}(),c=function(){for(var b=new Array(256),k=new Array(256),j=0;j<8;j+=1)b[j]=1<<j;for(var j=8;j<256;j+=1)b[j]=b[j-4]^b[j-5]^b[j-6]^b[j-8];for(var j=0;j<255;j+=1)k[b[j]]=j;var S={};return S.glog=function(O){if(O<1)throw"glog("+O+")";return k[O]},S.gexp=function(O){for(;O<0;)O+=255;for(;O>=256;)O-=255;return b[O]},S}();function l(b,k){if(typeof b.length>"u")throw b.length+"/"+k;var j=function(){for(var O=0;O<b.length&&b[O]==0;)O+=1;for(var E=new Array(b.length-O+k),C=0;C<b.length-O;C+=1)E[C]=b[C+O];return E}(),S={};return S.getAt=function(O){return j[O]},S.getLength=function(){return j.length},S.multiply=function(O){for(var E=new Array(S.getLength()+O.getLength()-1),C=0;C<S.getLength();C+=1)for(var M=0;M<O.getLength();M+=1)E[C+M]^=c.gexp(c.glog(S.getAt(C))+c.glog(O.getAt(M)));return l(E,0)},S.mod=function(O){if(S.getLength()-O.getLength()<0)return S;for(var E=c.glog(S.getAt(0))-c.glog(O.getAt(0)),C=new Array(S.getLength()),M=0;M<S.getLength();M+=1)C[M]=S.getAt(M);for(var M=0;M<O.getLength();M+=1)C[M]^=c.gexp(c.glog(O.getAt(M))+E);return l(C,0).mod(O)},S}var u=function(){var b=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12,7,37,13],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],k=function(O,E){var C={};return C.totalCount=O,C.dataCount=E,C},j={},S=function(O,E){switch(E){case a.L:return b[(O-1)*4+0];case a.M:return b[(O-1)*4+1];case a.Q:return b[(O-1)*4+2];case a.H:return b[(O-1)*4+3];default:return}};return j.getRSBlocks=function(O,E){var C=S(O,E);if(typeof C>"u")throw"bad rs block @ typeNumber:"+O+"/errorCorrectionLevel:"+E;for(var M=C.length/3,$=[],A=0;A<M;A+=1)for(var P=C[A*3+0],N=C[A*3+1],F=C[A*3+2],z=0;z<P;z+=1)$.push(k(N,F));return $},j}(),d=function(){var b=[],k=0,j={};return j.getBuffer=function(){return b},j.getAt=function(S){var O=Math.floor(S/8);return(b[O]>>>7-S%8&1)==1},j.put=function(S,O){for(var E=0;E<O;E+=1)j.putBit((S>>>O-E-1&1)==1)},j.getLengthInBits=function(){return k},j.putBit=function(S){var O=Math.floor(k/8);b.length<=O&&b.push(0),S&&(b[O]|=128>>>k%8),k+=1},j},f=function(b){var k=i.MODE_NUMBER,j=b,S={};S.getMode=function(){return k},S.getLength=function(C){return j.length},S.write=function(C){for(var M=j,$=0;$+2<M.length;)C.put(O(M.substring($,$+3)),10),$+=3;$<M.length&&(M.length-$==1?C.put(O(M.substring($,$+1)),4):M.length-$==2&&C.put(O(M.substring($,$+2)),7))};var O=function(C){for(var M=0,$=0;$<C.length;$+=1)M=M*10+E(C.charAt($));return M},E=function(C){if("0"<=C&&C<="9")return C.charCodeAt(0)-48;throw"illegal char :"+C};return S},h=function(b){var k=i.MODE_ALPHA_NUM,j=b,S={};S.getMode=function(){return k},S.getLength=function(E){return j.length},S.write=function(E){for(var C=j,M=0;M+1<C.length;)E.put(O(C.charAt(M))*45+O(C.charAt(M+1)),11),M+=2;M<C.length&&E.put(O(C.charAt(M)),6)};var O=function(E){if("0"<=E&&E<="9")return E.charCodeAt(0)-48;if("A"<=E&&E<="Z")return E.charCodeAt(0)-65+10;switch(E){case" ":return 36;case"$":return 37;case"%":return 38;case"*":return 39;case"+":return 40;case"-":return 41;case".":return 42;case"/":return 43;case":":return 44;default:throw"illegal char :"+E}};return S},g=function(b){var k=i.MODE_8BIT_BYTE,j=r.stringToBytes(b),S={};return S.getMode=function(){return k},S.getLength=function(O){return j.length},S.write=function(O){for(var E=0;E<j.length;E+=1)O.put(j[E],8)},S},p=function(b){var k=i.MODE_KANJI,j=r.stringToBytesFuncs.SJIS;if(!j)throw"sjis not supported.";(function(E,C){var M=j(E);if(M.length!=2||(M[0]<<8|M[1])!=C)throw"sjis not supported."})("友",38726);var S=j(b),O={};return O.getMode=function(){return k},O.getLength=function(E){return~~(S.length/2)},O.write=function(E){for(var C=S,M=0;M+1<C.length;){var $=(255&C[M])<<8|255&C[M+1];if(33088<=$&&$<=40956)$-=33088;else if(57408<=$&&$<=60351)$-=49472;else throw"illegal char at "+(M+1)+"/"+$;$=($>>>8&255)*192+($&255),E.put($,13),M+=2}if(M<C.length)throw"illegal char at "+(M+1)},O},v=function(){var b=[],k={};return k.writeByte=function(j){b.push(j&255)},k.writeShort=function(j){k.writeByte(j),k.writeByte(j>>>8)},k.writeBytes=function(j,S,O){S=S||0,O=O||j.length;for(var E=0;E<O;E+=1)k.writeByte(j[E+S])},k.writeString=function(j){for(var S=0;S<j.length;S+=1)k.writeByte(j.charCodeAt(S))},k.toByteArray=function(){return b},k.toString=function(){var j="";j+="[";for(var S=0;S<b.length;S+=1)S>0&&(j+=","),j+=b[S];return j+="]",j},k},_=function(){var b=0,k=0,j=0,S="",O={},E=function(M){S+=String.fromCharCode(C(M&63))},C=function(M){if(!(M<0)){if(M<26)return 65+M;if(M<52)return 97+(M-26);if(M<62)return 48+(M-52);if(M==62)return 43;if(M==63)return 47}throw"n:"+M};return O.writeByte=function(M){for(b=b<<8|M&255,k+=8,j+=1;k>=6;)E(b>>>k-6),k-=6},O.flush=function(){if(k>0&&(E(b<<6-k),b=0,k=0),j%3!=0)for(var M=3-j%3,$=0;$<M;$+=1)S+="="},O.toString=function(){return S},O},w=function(b){var k=b,j=0,S=0,O=0,E={};E.read=function(){for(;O<8;){if(j>=k.length){if(O==0)return-1;throw"unexpected end of file./"+O}var M=k.charAt(j);if(j+=1,M=="=")return O=0,-1;if(M.match(/^\s$/))continue;S=S<<6|C(M.charCodeAt(0)),O+=6}var $=S>>>O-8&255;return O-=8,$};var C=function(M){if(65<=M&&M<=90)return M-65;if(97<=M&&M<=122)return M-97+26;if(48<=M&&M<=57)return M-48+52;if(M==43)return 62;if(M==47)return 63;throw"c:"+M};return E},x=function(b,k){var j=b,S=k,O=new Array(b*k),E={};E.setPixel=function(A,P,N){O[P*j+A]=N},E.write=function(A){A.writeString("GIF87a"),A.writeShort(j),A.writeShort(S),A.writeByte(128),A.writeByte(0),A.writeByte(0),A.writeByte(0),A.writeByte(0),A.writeByte(0),A.writeByte(255),A.writeByte(255),A.writeByte(255),A.writeString(","),A.writeShort(0),A.writeShort(0),A.writeShort(j),A.writeShort(S),A.writeByte(0);var P=2,N=M(P);A.writeByte(P);for(var F=0;N.length-F>255;)A.writeByte(255),A.writeBytes(N,F,255),F+=255;A.writeByte(N.length-F),A.writeBytes(N,F,N.length-F),A.writeByte(0),A.writeString(";")};var C=function(A){var P=A,N=0,F=0,z={};return z.write=function(q,W){if(q>>>W)throw"length over";for(;N+W>=8;)P.writeByte(255&(q<<N|F)),W-=8-N,q>>>=8-N,F=0,N=0;F=q<<N|F,N=N+W},z.flush=function(){N>0&&P.writeByte(F)},z},M=function(A){for(var P=1<<A,N=(1<<A)+1,F=A+1,z=$(),q=0;q<P;q+=1)z.add(String.fromCharCode(q));z.add(String.fromCharCode(P)),z.add(String.fromCharCode(N));var W=v(),G=C(W);G.write(P,F);var ee=0,ie=String.fromCharCode(O[ee]);for(ee+=1;ee<O.length;){var Q=String.fromCharCode(O[ee]);ee+=1,z.contains(ie+Q)?ie=ie+Q:(G.write(z.indexOf(ie),F),z.size()<4095&&(z.size()==1<<F&&(F+=1),z.add(ie+Q)),ie=Q)}return G.write(z.indexOf(ie),F),G.write(N,F),G.flush(),W.toByteArray()},$=function(){var A={},P=0,N={};return N.add=function(F){if(N.contains(F))throw"dup key:"+F;A[F]=P,P+=1},N.size=function(){return P},N.indexOf=function(F){return A[F]},N.contains=function(F){return typeof A[F]<"u"},N};return E},T=function(b,k,j){for(var S=x(b,k),O=0;O<k;O+=1)for(var E=0;E<b;E+=1)S.setPixel(E,O,j(E,O));var C=v();S.write(C);for(var M=_(),$=C.toByteArray(),A=0;A<$.length;A+=1)M.writeByte($[A]);return M.flush(),"data:image/gif;base64,"+M};return r}();(function(){n.stringToBytesFuncs["UTF-8"]=function(r){function i(a){for(var o=[],s=0;s<a.length;s++){var c=a.charCodeAt(s);c<128?o.push(c):c<2048?o.push(192|c>>6,128|c&63):c<55296||c>=57344?o.push(224|c>>12,128|c>>6&63,128|c&63):(s++,c=65536+((c&1023)<<10|a.charCodeAt(s)&1023),o.push(240|c>>18,128|c>>12&63,128|c>>6&63,128|c&63))}return o}return i(r)}})(),function(r){e.exports=r()}(function(){return n})})(S_);var wA=S_.exports,CA=Hn&&Hn.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Oh=Hn&&Hn.__assign||function(){return Oh=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Oh.apply(this,arguments)};Object.defineProperty(mm,"__esModule",{value:!0});exports.QRCode_1=mm.QRCode=void 0;var TA=_A,kA=wA,bf=m,SA=function(e){CA(t,e);function t(n){var r=e.call(this,n)||this;return r.canvasRef=bf.createRef(),r}return t.prototype.download=function(n,r){if(this.canvasRef.current){var i=void 0;switch(n){case"jpg":i="image/jpeg";break;case"webp":i="image/webp";break;case"png":default:i="image/png";break}var a=this.canvasRef.current.toDataURL(i,1),o=document.createElement("a");o.download=r??"react-qrcode-logo",o.href=a,o.click()}},t.prototype.utf16to8=function(n){var r="",i,a,o=n.length;for(i=0;i<o;i++)a=n.charCodeAt(i),a>=1&&a<=127?r+=n.charAt(i):a>2047?(r+=String.fromCharCode(224|a>>12&15),r+=String.fromCharCode(128|a>>6&63),r+=String.fromCharCode(128|a>>0&63)):(r+=String.fromCharCode(192|a>>6&31),r+=String.fromCharCode(128|a>>0&63));return r},t.prototype.drawRoundedSquare=function(n,r,i,a,o,s,c,l){l.lineWidth=n,l.fillStyle=o,l.strokeStyle=o,i+=n/2,r+=n/2,a-=n,Array.isArray(s)||(s=[s,s,s,s]),s=s.map(function(g){return g=Math.min(g,a/2),g<0?0:g});var u=s[0]||0,d=s[1]||0,f=s[2]||0,h=s[3]||0;l.beginPath(),l.moveTo(r+u,i),l.lineTo(r+a-d,i),d&&l.quadraticCurveTo(r+a,i,r+a,i+d),l.lineTo(r+a,i+a-f),f&&l.quadraticCurveTo(r+a,i+a,r+a-f,i+a),l.lineTo(r+h,i+a),h&&l.quadraticCurveTo(r,i+a,r,i+a-h),l.lineTo(r,i+u),u&&l.quadraticCurveTo(r,i,r+u,i),l.closePath(),l.stroke(),c&&l.fill()},t.prototype.drawPositioningPattern=function(n,r,i,a,o,s,c){c===void 0&&(c=[0,0,0,0]);var l=Math.ceil(r),u,d;typeof c!="number"&&!Array.isArray(c)?(u=c.outer||0,d=c.inner||0):(u=c,d=u);var f,h;typeof s!="string"?(f=s.outer,h=s.inner):(f=s,h=s);var g=a*r+i,p=o*r+i,v=r*7;this.drawRoundedSquare(l,p,g,v,f,u,!1,n),v=r*3,g+=r*2,p+=r*2,this.drawRoundedSquare(l,p,g,v,h,d,!0,n)},t.prototype.isInPositioninZone=function(n,r,i){return i.some(function(a){return r>=a.row&&r<=a.row+7&&n>=a.col&&n<=a.col+7})},t.prototype.transformPixelLengthIntoNumberOfCells=function(n,r){return n/r},t.prototype.isCoordinateInImage=function(n,r,i,a,o,s,c,l){if(l){var u=2,d=this.transformPixelLengthIntoNumberOfCells(o,c),f=this.transformPixelLengthIntoNumberOfCells(s,c),h=this.transformPixelLengthIntoNumberOfCells(i,c)-1,g=this.transformPixelLengthIntoNumberOfCells(a,c)-1;return r>=d-u&&r<=d+h+u&&n>=f-u&&n<=f+g+u}else return!1},t.prototype.shouldComponentUpdate=function(n){return!TA(this.props,n)},t.prototype.componentDidMount=function(){this.update()},t.prototype.componentDidUpdate=function(){this.update()},t.prototype.update=function(){var n,r=this.props,i=r.value,a=r.ecLevel,o=r.enableCORS,s=r.bgColor,c=r.fgColor,l=r.logoImage,u=r.logoOpacity,d=r.logoOnLoad,f=r.removeQrCodeBehindLogo,h=r.qrStyle,g=r.eyeRadius,p=r.eyeColor,v=r.logoPaddingStyle,_=+this.props.size,w=+this.props.quietZone,x=this.props.logoWidth?+this.props.logoWidth:0,T=this.props.logoHeight?+this.props.logoHeight:0,b=this.props.logoPadding?+this.props.logoPadding:0,k=kA(0,a);k.addData(this.utf16to8(i)),k.make();var j=(n=this.canvasRef)===null||n===void 0?void 0:n.current,S=j.getContext("2d"),O=_+2*w,E=k.getModuleCount(),C=_/E,M=window.devicePixelRatio||1;j.height=j.width=O*M,S.scale(M,M),S.fillStyle=s,S.fillRect(0,0,O,O);var $=w,A=[{row:0,col:0},{row:0,col:E-7},{row:E-7,col:0}];if(S.strokeStyle=c,h==="dots"){S.fillStyle=c;for(var P=C/2,N=0;N<E;N++)for(var F=0;F<E;F++)k.isDark(N,F)&&!this.isInPositioninZone(N,F,A)&&(S.beginPath(),S.arc(Math.round(F*C)+P+$,Math.round(N*C)+P+$,P/100*75,0,2*Math.PI,!1),S.closePath(),S.fill())}else if(h==="fluid"){for(var P=Math.ceil(C/2),N=0;N<E;N++)for(var F=0;F<E;F++)if(k.isDark(N,F)&&!this.isInPositioninZone(N,F,A)){var z=[!1,!1,!1,!1];N>0&&!k.isDark(N-1,F)&&F>0&&!k.isDark(N,F-1)&&(z[0]=!0),N>0&&!k.isDark(N-1,F)&&F<E-1&&!k.isDark(N,F+1)&&(z[1]=!0),N<E-1&&!k.isDark(N+1,F)&&F<E-1&&!k.isDark(N,F+1)&&(z[2]=!0),N<E-1&&!k.isDark(N+1,F)&&F>0&&!k.isDark(N,F-1)&&(z[3]=!0);var q=Math.ceil((F+1)*C)-Math.floor(F*C),W=Math.ceil((N+1)*C)-Math.floor(N*C);S.fillStyle=c,S.beginPath(),S.arc(Math.round(F*C)+P+$,Math.round(N*C)+P+$,P,0,2*Math.PI,!1),S.closePath(),S.fill(),z[0]||S.fillRect(Math.round(F*C)+$,Math.round(N*C)+$,q/2,W/2),z[1]||S.fillRect(Math.round(F*C)+$+Math.floor(q/2),Math.round(N*C)+$,q/2,W/2),z[2]||S.fillRect(Math.round(F*C)+$+Math.floor(q/2),Math.round(N*C)+$+Math.floor(W/2),q/2,W/2),z[3]||S.fillRect(Math.round(F*C)+$,Math.round(N*C)+$+Math.floor(W/2),q/2,W/2)}}else for(var N=0;N<E;N++)for(var F=0;F<E;F++)if(k.isDark(N,F)&&!this.isInPositioninZone(N,F,A)){S.fillStyle=c;var q=Math.ceil((F+1)*C)-Math.floor(F*C),W=Math.ceil((N+1)*C)-Math.floor(N*C);S.fillRect(Math.round(F*C)+$,Math.round(N*C)+$,q,W)}for(var G=0;G<3;G++){var ee=A[G],N=ee.row,F=ee.col,ie=g,Q=void 0;Array.isArray(ie)&&(ie=ie[G]),typeof ie=="number"&&(ie=[ie,ie,ie,ie]),p?Array.isArray(p)?Q=p[G]:Q=p:Q=c,this.drawPositioningPattern(S,C,$,N,F,Q,ie)}if(l){var X=new Image;o&&(X.crossOrigin="Anonymous"),X.onload=function(K){S.save();var te=x||_*.2,D=T||te,I=(_-te)/2,L=(_-D)/2;if(f||b){S.beginPath(),S.strokeStyle=s,S.fillStyle=s;var V=te+2*b,R=D+2*b,Z=I+$-b,J=L+$-b;if(v==="circle"){var ne=Z+V/2,he=J+R/2;S.ellipse(ne,he,V/2,R/2,0,0,2*Math.PI),S.stroke(),S.fill()}else S.fillRect(Z,J,V,R)}S.globalAlpha=u,S.drawImage(X,I+$,L+$,te,D),S.restore(),d&&d(K)},X.src=l}},t.prototype.render=function(){var n,r=+this.props.size+2*+this.props.quietZone;return bf.createElement("canvas",{id:(n=this.props.id)!==null&&n!==void 0?n:"react-qrcode-logo",height:r,width:r,style:Oh({height:r+"px",width:r+"px"},this.props.style),ref:this.canvasRef})},t.defaultProps={value:"https://reactjs.org/",ecLevel:"M",enableCORS:!1,size:150,quietZone:10,bgColor:"#FFFFFF",fgColor:"#000000",logoOpacity:1,qrStyle:"squares",eyeRadius:[0,0,0],logoPaddingStyle:"square"},t}(bf.Component);exports.QRCode_1=mm.QRCode=SA;const O_=({value:e,MiniDetailComponent:t,children:n,miniDetailPlacement:r})=>!e||!t?n:y.jsx(t,{id:e.toString(),placement:r,children:n}),E_=({InputContainer:e=ju,value:t,options:n,onChange:r,label:i,withoutLabel:a,isNumber:o,size:s,hidden:c,disabled:l,noSortOptions:u,className:d,suffixIdToName:f,noEmptyOption:h,appendCurrentSelectionWithName:g,dropdownWidth:p,hint:v,addNewOptionPath:_,refreshOptions:w,MiniDetailComponent:x,miniDetailPlacement:T,selectedItemNavigateTo:b})=>{const{texts:{customSelect:k}}=m.useContext(Kt),[j,S]=m.useState(!1),[O,E]=m.useState(""),C=m.useCallback(z=>{E(z)},[]),M=m.useMemo(()=>n.find(z=>z.id===t)??null,[n,t]),$=m.useCallback(z=>{var q;return z===null?"":!z.name||z.name.length===0?((q=z.id)==null?void 0:q.toString())??"":f?`${z.name} (${z.id})`:z.name},[f]),A=m.useMemo(()=>{const z=n?[...n]:[];return g!==void 0&&t!==void 0&&t!==null&&(z.some(q=>q.id===t)||z.push({id:t,name:g})),z.map(q=>({id:q.id,name:$(q)})).filter(q=>Kp(q.name,O)).sort((q,W)=>u?0:(q.name??"").localeCompare(W.name??""))},[n,u,O,$,g,t]),P=m.useCallback(z=>{var q;r&&r((z==null?void 0:z.id)===void 0||(z==null?void 0:z.id)===null?null:o?Number(z.id):(q=z.id)==null?void 0:q.toString())},[r,o]),N=m.useCallback(z=>{S(!1),P(z)},[P]),F=m.useRef(null);return y.jsx(y.Fragment,{children:y.jsxs(e,{withoutLabel:a,label:i??"",hidden:c,inputContainerClassName:oe({"luminus-dropdown-select-open":j}),className:d,hint:v,disabled:l,children:[y.jsx(T_,{currentSelection:M,selectedItemNavigateTo:b,children:y.jsx(O_,{value:t,MiniDetailComponent:x,miniDetailPlacement:T,children:y.jsxs(kr.Select,{ref:F,size:s,value:t??"",onMouseDown:z=>{z.currentTarget.focus(),z.preventDefault()},onClick:()=>{!l&&S(!0)},onChange:()=>{},className:oe("w-100",{"luminus-dropdown-picker-disabled":l}),hidden:c,children:[h&&!(t==null||t==="")?void 0:y.jsx("option",{value:""}),t!=null&&y.jsx("option",{value:t,children:$(M)})]})})}),F.current&&y.jsx(h_,{show:j,onCancel:()=>S(!1),items:A,currentSelection:M??null,onSelectionChange:N,onSearchQueryChange:C,texts:k,disabled:l,inputRef:F,autoHideSearch:!0,allItemsLength:n.length,itemsNameWidth:p,addNewOptionPath:_,refreshOptions:w})]})})},OA=m.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 gm=oc(),Ve=e=>ac(e,gm),vm=oc();Ve.write=e=>ac(e,vm);var Pu=oc();Ve.onStart=e=>ac(e,Pu);var ym=oc();Ve.onFrame=e=>ac(e,ym);var bm=oc();Ve.onFinish=e=>ac(e,bm);var Pa=[];Ve.setTimeout=(e,t)=>{const n=Ve.now()+t,r=()=>{const a=Pa.findIndex(o=>o.cancel==r);~a&&Pa.splice(a,1),ci-=~a?1:0},i={time:n,handler:e,cancel:r};return Pa.splice(M_(n),0,i),ci+=1,$_(),i};var M_=e=>~(~Pa.findIndex(t=>t.time>e)||~Pa.length);Ve.cancel=e=>{Pu.delete(e),ym.delete(e),bm.delete(e),gm.delete(e),vm.delete(e)};Ve.sync=e=>{Eh=!0,Ve.batchedUpdates(e),Eh=!1};Ve.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...i){t=i,Ve.onStart(n)}return r.handler=e,r.cancel=()=>{Pu.delete(n),t=null},r};var xm=typeof window<"u"?window.requestAnimationFrame:()=>{};Ve.use=e=>xm=e;Ve.now=typeof performance<"u"?()=>performance.now():Date.now;Ve.batchedUpdates=e=>e();Ve.catch=console.error;Ve.frameLoop="always";Ve.advance=()=>{Ve.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):R_()};var si=-1,ci=0,Eh=!1;function ac(e,t){Eh?(t.delete(e),e(0)):(t.add(e),$_())}function $_(){si<0&&(si=0,Ve.frameLoop!=="demand"&&xm(A_))}function EA(){si=-1}function A_(){~si&&(xm(A_),Ve.batchedUpdates(R_))}function R_(){const e=si;si=Ve.now();const t=M_(si);if(t&&(j_(Pa.splice(0,t),n=>n.handler()),ci-=t),!ci){EA();return}Pu.flush(),gm.flush(e?Math.min(64,si-e):16.667),ym.flush(),vm.flush(),bm.flush()}function oc(){let e=new Set,t=e;return{add(n){ci+=t==e&&!e.has(n)?1:0,e.add(n)},delete(n){return ci-=t==e&&e.has(n)?1:0,e.delete(n)},flush(n){t.size&&(e=new Set,ci-=t.size,j_(t,r=>r(n)&&e.add(r)),ci+=e.size,t=e)}}}function j_(e,t){e.forEach(n=>{try{t(n)}catch(r){Ve.catch(r)}})}var MA=Object.defineProperty,$A=(e,t)=>{for(var n in t)MA(e,n,{get:t[n],enumerable:!0})},lr={};$A(lr,{assign:()=>RA,colors:()=>ui,createStringInterpolator:()=>wm,skipAnimation:()=>I_,to:()=>P_,willAdvance:()=>Cm});function Mh(){}var AA=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),de={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 Ir(e,t){if(de.arr(e)){if(!de.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 He=(e,t)=>e.forEach(t);function xr(e,t,n){if(de.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 Cn=e=>de.und(e)?[]:de.arr(e)?e:[e];function ts(e,t){if(e.size){const n=Array.from(e);e.clear(),He(n,t)}}var Ko=(e,...t)=>ts(e,n=>n(...t)),_m=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),wm,P_,ui=null,I_=!1,Cm=Mh,RA=e=>{e.to&&(P_=e.to),e.now&&(Ve.now=e.now),e.colors!==void 0&&(ui=e.colors),e.skipAnimation!=null&&(I_=e.skipAnimation),e.createStringInterpolator&&(wm=e.createStringInterpolator),e.requestAnimationFrame&&Ve.use(e.requestAnimationFrame),e.batchedUpdates&&(Ve.batchedUpdates=e.batchedUpdates),e.willAdvance&&(Cm=e.willAdvance),e.frameLoop&&(Ve.frameLoop=e.frameLoop)},ns=new Set,zn=[],xf=[],jl=0,Iu={get idle(){return!ns.size&&!zn.length},start(e){jl>e.priority?(ns.add(e),Ve.onStart(jA)):(D_(e),Ve($h))},advance:$h,sort(e){if(jl)Ve.onFrame(()=>Iu.sort(e));else{const t=zn.indexOf(e);~t&&(zn.splice(t,1),N_(e))}},clear(){zn=[],ns.clear()}};function jA(){ns.forEach(D_),ns.clear(),Ve($h)}function D_(e){zn.includes(e)||N_(e)}function N_(e){zn.splice(PA(zn,t=>t.priority>e.priority),0,e)}function $h(e){const t=xf;for(let n=0;n<zn.length;n++){const r=zn[n];jl=r.priority,r.idle||(Cm(r),r.advance(e),r.idle||t.push(r))}return jl=0,xf=zn,xf.length=0,zn=t,zn.length>0}function PA(e,t){const n=e.findIndex(t);return n<0?e.length:n}var IA=(e,t,n)=>Math.min(Math.max(n,e),t),DA={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},ar="[-+]?\\d*\\.?\\d+",Pl=ar+"%";function Du(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var NA=new RegExp("rgb"+Du(ar,ar,ar)),LA=new RegExp("rgba"+Du(ar,ar,ar,ar)),FA=new RegExp("hsl"+Du(ar,Pl,Pl)),BA=new RegExp("hsla"+Du(ar,Pl,Pl,ar)),UA=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,WA=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,zA=/^#([0-9a-fA-F]{6})$/,HA=/^#([0-9a-fA-F]{8})$/;function VA(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=zA.exec(e))?parseInt(t[1]+"ff",16)>>>0:ui&&ui[e]!==void 0?ui[e]:(t=NA.exec(e))?(_a(t[1])<<24|_a(t[2])<<16|_a(t[3])<<8|255)>>>0:(t=LA.exec(e))?(_a(t[1])<<24|_a(t[2])<<16|_a(t[3])<<8|Ev(t[4]))>>>0:(t=UA.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=HA.exec(e))?parseInt(t[1],16)>>>0:(t=WA.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=FA.exec(e))?(Sv(Ov(t[1]),Pc(t[2]),Pc(t[3]))|255)>>>0:(t=BA.exec(e))?(Sv(Ov(t[1]),Pc(t[2]),Pc(t[3]))|Ev(t[4]))>>>0:null}function _f(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 Sv(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,a=_f(i,r,e+1/3),o=_f(i,r,e),s=_f(i,r,e-1/3);return Math.round(a*255)<<24|Math.round(o*255)<<16|Math.round(s*255)<<8}function _a(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function Ov(e){return(parseFloat(e)%360+360)%360/360}function Ev(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function Pc(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function Mv(e){let t=VA(e);if(t===null)return e;t=t||0;const n=(t&4278190080)>>>24,r=(t&16711680)>>>16,i=(t&65280)>>>8,a=(t&255)/255;return`rgba(${n}, ${r}, ${i}, ${a})`}var Es=(e,t,n)=>{if(de.fun(e))return e;if(de.arr(e))return Es({range:e,output:t,extrapolate:n});if(de.str(e.output[0]))return wm(e);const r=e,i=r.output,a=r.range||[0,1],o=r.extrapolateLeft||r.extrapolate||"extend",s=r.extrapolateRight||r.extrapolate||"extend",c=r.easing||(l=>l);return l=>{const u=YA(l,a);return qA(l,a[u],a[u+1],i[u],i[u+1],c,o,s,r.map)}};function qA(e,t,n,r,i,a,o,s,c){let l=c?c(e):e;if(l<t){if(o==="identity")return l;o==="clamp"&&(l=t)}if(l>n){if(s==="identity")return l;s==="clamp"&&(l=n)}return r===i?r:t===n?e<=t?r:i:(t===-1/0?l=-l:n===1/0?l=l-t:l=(l-t)/(n-t),l=a(l),r===-1/0?l=-l:i===1/0?l=l+r:l=l*(i-r)+r,l)}function YA(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}var GA=(e,t="end")=>n=>{n=t==="end"?Math.min(n,.999):Math.max(n,.001);const r=n*e,i=t==="end"?Math.floor(r):Math.ceil(r);return IA(0,1,i/e)},Il=1.70158,Ic=Il*1.525,$v=Il+1,Av=2*Math.PI/3,Rv=2*Math.PI/4.5,Dc=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,ZA={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=>$v*e*e*e-Il*e*e,easeOutBack:e=>1+$v*Math.pow(e-1,3)+Il*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((Ic+1)*2*e-Ic)/2:(Math.pow(2*e-2,2)*((Ic+1)*(e*2-2)+Ic)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-Math.pow(2,10*e-10)*Math.sin((e*10-10.75)*Av),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*Av)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*Rv))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*Rv)/2+1,easeInBounce:e=>1-Dc(1-e),easeOutBounce:Dc,easeInOutBounce:e=>e<.5?(1-Dc(1-2*e))/2:(1+Dc(2*e-1))/2,steps:GA},Ms=Symbol.for("FluidValue.get"),Za=Symbol.for("FluidValue.observers"),Wn=e=>!!(e&&e[Ms]),On=e=>e&&e[Ms]?e[Ms]():e,jv=e=>e[Za]||null;function KA(e,t){e.eventObserved?e.eventObserved(t):e(t)}function $s(e,t){const n=e[Za];n&&n.forEach(r=>{KA(r,t)})}var L_=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");XA(this,e)}},XA=(e,t)=>F_(e,Ms,t);function so(e,t){if(e[Ms]){let n=e[Za];n||F_(e,Za,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function As(e,t){const n=e[Za];if(n&&n.has(t)){const r=n.size-1;r?n.delete(t):e[Za]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var F_=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),il=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,QA=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Pv=new RegExp(`(${il.source})(%|[a-z]+)`,"i"),JA=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,Nu=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,B_=e=>{const[t,n]=eR(e);if(!t||_m())return e;const r=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(r)return r.trim();if(n&&n.startsWith("--")){const i=window.getComputedStyle(document.documentElement).getPropertyValue(n);return i||e}else{if(n&&Nu.test(n))return B_(n);if(n)return n}return e},eR=e=>{const t=Nu.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]},wf,tR=(e,t,n,r,i)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${i})`,U_=e=>{wf||(wf=ui?new RegExp(`(${Object.keys(ui).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map(a=>On(a).replace(Nu,B_).replace(QA,Mv).replace(wf,Mv)),n=t.map(a=>a.match(il).map(Number)),i=n[0].map((a,o)=>n.map(s=>{if(!(o in s))throw Error('The arity of each "output" value must be equal');return s[o]})).map(a=>Es({...e,output:a}));return a=>{var c;const o=!Pv.test(t[0])&&((c=t.find(l=>Pv.test(l)))==null?void 0:c.replace(il,""));let s=0;return t[0].replace(il,()=>`${i[s++](a)}${o||""}`).replace(JA,tR)}},Tm="react-spring: ",W_=e=>{const t=e;let n=!1;if(typeof t!="function")throw new TypeError(`${Tm}once requires a function parameter`);return(...r)=>{n||(t(...r),n=!0)}},nR=W_(console.warn);function rR(){nR(`${Tm}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var iR=W_(console.warn);function aR(){iR(`${Tm}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 Lu(e){return de.str(e)&&(e[0]=="#"||/\d/.test(e)||!_m()&&Nu.test(e)||e in(ui||{}))}var Ii=_m()?m.useEffect:m.useLayoutEffect,oR=()=>{const e=m.useRef(!1);return Ii(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function km(){const e=m.useState()[1],t=oR();return()=>{t.current&&e(Math.random())}}function sR(e,t){const[n]=m.useState(()=>({inputs:t,result:e()})),r=m.useRef(),i=r.current;let a=i;return a?t&&a.inputs&&cR(t,a.inputs)||(a={inputs:t,result:e()}):a=n,m.useEffect(()=>{r.current=a,i==n&&(n.inputs=n.result=void 0)},[a]),a.result}function cR(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 Sm=e=>m.useEffect(e,lR),lR=[];function Ah(e){const t=m.useRef();return m.useEffect(()=>{t.current=e}),t.current}var Rs=Symbol.for("Animated:node"),uR=e=>!!e&&e[Rs]===e,hr=e=>e&&e[Rs],Om=(e,t)=>AA(e,Rs,t),Fu=e=>e&&e[Rs]&&e[Rs].getPayload(),z_=class{constructor(){Om(this,this)}getPayload(){return this.payload||[]}},sc=class extends z_{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,de.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new sc(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return de.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,de.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},js=class extends sc{constructor(e){super(0),this._string=null,this._toString=Es({output:[e,e]})}static create(e){return new js(e)}getValue(){const e=this._string;return e??(this._string=this._toString(this._value))}setValue(e){if(de.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=Es({output:[this.getValue(),e]})),this._value=0,super.reset()}},Dl={dependencies:null},Bu=class extends z_{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return xr(this.source,(n,r)=>{uR(n)?t[r]=n.getValue(e):Wn(n)?t[r]=On(n):e||(t[r]=n)}),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&He(this.payload,e=>e.reset())}_makePayload(e){if(e){const t=new Set;return xr(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){Dl.dependencies&&Wn(e)&&Dl.dependencies.add(e);const t=Fu(e);t&&He(t,n=>this.add(n))}},H_=class extends Bu{constructor(e){super(e)}static create(e){return new H_(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(dR)),!0)}};function dR(e){return(Lu(e)?js:sc).create(e)}function Rh(e){const t=hr(e);return t?t.constructor:de.arr(e)?H_:Lu(e)?js:sc}var Iv=(e,t)=>{const n=!de.fun(e)||e.prototype&&e.prototype.isReactComponent;return m.forwardRef((r,i)=>{const a=m.useRef(null),o=n&&m.useCallback(g=>{a.current=pR(i,g)},[i]),[s,c]=hR(r,t),l=km(),u=()=>{const g=a.current;if(n&&!g)return;(g?t.applyAnimatedValues(g,s.getValue(!0)):!1)===!1&&l()},d=new fR(u,c),f=m.useRef();Ii(()=>(f.current=d,He(c,g=>so(g,d)),()=>{f.current&&(He(f.current.deps,g=>As(g,f.current)),Ve.cancel(f.current.update))})),m.useEffect(u,[]),Sm(()=>()=>{const g=f.current;He(g.deps,p=>As(p,g))});const h=t.getComponentProps(s.getValue());return ue.createElement(e,{...h,ref:o})})},fR=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){e.type=="change"&&Ve.write(this.update)}};function hR(e,t){const n=new Set;return Dl.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new Bu(e),Dl.dependencies=null,[e,n]}function pR(e,t){return e&&(de.fun(e)?e(t):e.current=t),t}var Dv=Symbol.for("AnimatedComponent"),mR=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:n=i=>new Bu(i),getComponentProps:r=i=>i}={})=>{const i={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},a=o=>{const s=Nv(o)||"Anonymous";return de.str(o)?o=a[o]||(a[o]=Iv(o,i)):o=o[Dv]||(o[Dv]=Iv(o,i)),o.displayName=`Animated(${s})`,o};return xr(e,(o,s)=>{de.arr(e)&&(s=Nv(o)),a[s]=a(o)}),{animated:a}},Nv=e=>de.str(e)?e:e&&de.str(e.displayName)?e.displayName:de.fun(e)&&e.name||null;function En(e,...t){return de.fun(e)?e(...t):e}var rs=(e,t)=>e===!0||!!(t&&e&&(de.fun(e)?e(t):Cn(e).includes(t))),V_=(e,t)=>de.obj(e)?t&&e[t]:e,q_=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,gR=e=>e,Uu=(e,t=gR)=>{let n=vR;e.default&&e.default!==!0&&(e=e.default,n=Object.keys(e));const r={};for(const i of n){const a=t(e[i],i);de.und(a)||(r[i]=a)}return r},vR=["config","onProps","onStart","onChange","onPause","onResume","onRest"],yR={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 bR(e){const t={};let n=0;if(xr(e,(r,i)=>{yR[i]||(t[i]=r,n++)}),n)return t}function Em(e){const t=bR(e);if(t){const n={to:t};return xr(e,(r,i)=>i in t||(n[i]=r)),n}return{...e}}function Ps(e){return e=On(e),de.arr(e)?e.map(Ps):Lu(e)?lr.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function Y_(e){for(const t in e)return!0;return!1}function jh(e){return de.fun(e)||de.arr(e)&&de.obj(e[0])}function Ph(e,t){var n;(n=e.ref)==null||n.delete(e),t==null||t.delete(e)}function G_(e,t){var n;t&&e.ref!==t&&((n=e.ref)==null||n.delete(e),t.add(e),e.ref=t)}var Mm={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}},Ih={...Mm.default,mass:1,damping:1,easing:ZA.linear,clamp:!1},xR=class{constructor(){this.velocity=0,Object.assign(this,Ih)}};function _R(e,t,n){n&&(n={...n},Lv(n,t),t={...n,...t}),Lv(e,t),Object.assign(e,t);for(const o in Ih)e[o]==null&&(e[o]=Ih[o]);let{frequency:r,damping:i}=e;const{mass:a}=e;return de.und(r)||(r<.01&&(r=.01),i<0&&(i=0),e.tension=Math.pow(2*Math.PI/r,2)*a,e.friction=4*Math.PI*i*a/r),e}function Lv(e,t){if(!de.und(t.decay))e.duration=void 0;else{const n=!de.und(t.tension)||!de.und(t.friction);(n||!de.und(t.frequency)||!de.und(t.damping)||!de.und(t.mass))&&(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}}var Fv=[],wR=class{constructor(){this.changed=!1,this.values=Fv,this.toValues=null,this.fromValues=Fv,this.config=new xR,this.immediate=!1}};function Z_(e,{key:t,props:n,defaultProps:r,state:i,actions:a}){return new Promise((o,s)=>{let c,l,u=rs(n.cancel??(r==null?void 0:r.cancel),t);if(u)h();else{de.und(n.pause)||(i.paused=rs(n.pause,t));let g=r==null?void 0:r.pause;g!==!0&&(g=i.paused||rs(g,t)),c=En(n.delay||0,t),g?(i.resumeQueue.add(f),a.pause()):(a.resume(),f())}function d(){i.resumeQueue.add(f),i.timeouts.delete(l),l.cancel(),c=l.time-Ve.now()}function f(){c>0&&!lr.skipAnimation?(i.delayed=!0,l=Ve.setTimeout(h,c),i.pauseQueue.add(d),i.timeouts.add(l)):h()}function h(){i.delayed&&(i.delayed=!1),i.pauseQueue.delete(d),i.timeouts.delete(l),e<=(i.cancelId||0)&&(u=!0);try{a.start({...n,callId:e,cancel:u},o)}catch(g){s(g)}}})}var $m=(e,t)=>t.length==1?t[0]:t.some(n=>n.cancelled)?Ia(e.get()):t.every(n=>n.noop)?K_(e.get()):nr(e.get(),t.every(n=>n.finished)),K_=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),nr=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),Ia=e=>({value:e,cancelled:!0,finished:!1});function X_(e,t,n,r){const{callId:i,parentId:a,onRest:o}=t,{asyncTo:s,promise:c}=n;return!a&&e===s&&!t.reset?c:n.promise=(async()=>{n.asyncId=i,n.asyncTo=e;const l=Uu(t,(v,_)=>_==="onRest"?void 0:v);let u,d;const f=new Promise((v,_)=>(u=v,d=_)),h=v=>{const _=i<=(n.cancelId||0)&&Ia(r)||i!==n.asyncId&&nr(r,!1);if(_)throw v.result=_,d(v),v},g=(v,_)=>{const w=new Bv,x=new Uv;return(async()=>{if(lr.skipAnimation)throw Is(n),x.result=nr(r,!1),d(x),x;h(w);const T=de.obj(v)?{...v}:{..._,to:v};T.parentId=i,xr(l,(k,j)=>{de.und(T[j])&&(T[j]=k)});const b=await r.start(T);return h(w),n.paused&&await new Promise(k=>{n.resumeQueue.add(k)}),b})()};let p;if(lr.skipAnimation)return Is(n),nr(r,!1);try{let v;de.arr(e)?v=(async _=>{for(const w of _)await g(w)})(e):v=Promise.resolve(e(g,r.stop.bind(r))),await Promise.all([v.then(u),f]),p=nr(r.get(),!0,!1)}catch(v){if(v instanceof Bv)p=v.result;else if(v instanceof Uv)p=v.result;else throw v}finally{i==n.asyncId&&(n.asyncId=a,n.asyncTo=a?s:void 0,n.promise=a?c:void 0)}return de.fun(o)&&Ve.batchedUpdates(()=>{o(p,r,r.item)}),p})()}function Is(e,t){ts(e.timeouts,n=>n.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var Bv=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.")}},Uv=class extends Error{constructor(){super("SkipAnimationSignal")}},Dh=e=>e instanceof Am,CR=1,Am=class extends L_{constructor(){super(...arguments),this.id=CR++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=hr(this);return e&&e.getValue()}to(...e){return lr.to(this,e)}interpolate(...e){return rR(),lr.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){$s(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||Iu.sort(this),$s(this,{type:"priority",parent:this,priority:e})}},Ji=Symbol.for("SpringPhase"),Q_=1,Nh=2,Lh=4,Cf=e=>(e[Ji]&Q_)>0,ei=e=>(e[Ji]&Nh)>0,Do=e=>(e[Ji]&Lh)>0,Wv=(e,t)=>t?e[Ji]|=Nh|Q_:e[Ji]&=~Nh,zv=(e,t)=>t?e[Ji]|=Lh:e[Ji]&=~Lh,TR=class extends Am{constructor(e,t){if(super(),this.animation=new wR,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,!de.und(e)||!de.und(t)){const n=de.obj(e)?{...e}:{...t,from:e};de.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(ei(this)||this._state.asyncTo)||Do(this)}get goal(){return On(this.animation.to)}get velocity(){const e=hr(this);return e instanceof sc?e.lastVelocity||0:e.getPayload().map(t=>t.lastVelocity||0)}get hasAnimated(){return Cf(this)}get isAnimating(){return ei(this)}get isPaused(){return Do(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1;const r=this.animation;let{toValues:i}=r;const{config:a}=r,o=Fu(r.to);!o&&Wn(r.to)&&(i=Cn(On(r.to))),r.values.forEach((l,u)=>{if(l.done)return;const d=l.constructor==js?1:o?o[u].lastPosition:i[u];let f=r.immediate,h=d;if(!f){if(h=l.lastPosition,a.tension<=0){l.done=!0;return}let g=l.elapsedTime+=e;const p=r.fromValues[u],v=l.v0!=null?l.v0:l.v0=de.arr(a.velocity)?a.velocity[u]:a.velocity;let _;const w=a.precision||(p==d?.005:Math.min(1,Math.abs(d-p)*.001));if(de.und(a.duration))if(a.decay){const x=a.decay===!0?.998:a.decay,T=Math.exp(-(1-x)*g);h=p+v/(1-x)*(1-T),f=Math.abs(l.lastPosition-h)<=w,_=v*T}else{_=l.lastVelocity==null?v:l.lastVelocity;const x=a.restVelocity||w/10,T=a.clamp?0:a.bounce,b=!de.und(T),k=p==d?l.v0>0:p<d;let j,S=!1;const O=1,E=Math.ceil(e/O);for(let C=0;C<E&&(j=Math.abs(_)>x,!(!j&&(f=Math.abs(d-h)<=w,f)));++C){b&&(S=h==d||h>d==k,S&&(_=-_*T,h=d));const M=-a.tension*1e-6*(h-d),$=-a.friction*.001*_,A=(M+$)/a.mass;_=_+A*O,h=h+_*O}}else{let x=1;a.duration>0&&(this._memoizedDuration!==a.duration&&(this._memoizedDuration=a.duration,l.durationProgress>0&&(l.elapsedTime=a.duration*l.durationProgress,g=l.elapsedTime+=e)),x=(a.progress||0)+g/this._memoizedDuration,x=x>1?1:x<0?0:x,l.durationProgress=x),h=p+a.easing(x)*(d-p),_=(h-l.lastPosition)/e,f=x==1}l.lastVelocity=_,Number.isNaN(h)&&(console.warn("Got NaN while animating:",this),f=!0)}o&&!o[u].done&&(f=!1),f?l.done=!0:t=!1,l.setValue(h,a.round)&&(n=!0)});const s=hr(this),c=s.getValue();if(t){const l=On(r.to);(c!==l||n)&&!a.decay?(s.setValue(l),this._onChange(l)):n&&a.decay&&this._onChange(c),this._stop()}else n&&this._onChange(c)}set(e){return Ve.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(ei(this)){const{to:e,config:t}=this.animation;Ve.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 de.und(e)?(n=this.queue||[],this.queue=[]):n=[de.obj(e)?e:{...t,to:e}],Promise.all(n.map(r=>this._update(r))).then(r=>$m(this,r))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),Is(this._state,e&&this._lastCallId),Ve.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=de.obj(n)?n[t]:n,(n==null||jh(n))&&(n=void 0),r=de.obj(r)?r[t]:r,r==null&&(r=void 0);const i={to:n,from:r};return Cf(this)||(e.reverse&&([n,r]=[r,n]),r=On(r),de.und(r)?hr(this)||this._set(n):this._set(r)),i}_update({...e},t){const{key:n,defaultProps:r}=this;e.default&&Object.assign(r,Uu(e,(o,s)=>/^on/.test(s)?V_(o,n):o)),Vv(this,e,"onProps"),Lo(this,"onProps",e,this);const i=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 a=this._state;return Z_(++this._lastCallId,{key:n,props:e,defaultProps:r,state:a,actions:{pause:()=>{Do(this)||(zv(this,!0),Ko(a.pauseQueue),Lo(this,"onPause",nr(this,No(this,this.animation.to)),this))},resume:()=>{Do(this)&&(zv(this,!1),ei(this)&&this._resume(),Ko(a.resumeQueue),Lo(this,"onResume",nr(this,No(this,this.animation.to)),this))},start:this._merge.bind(this,i)}}).then(o=>{if(e.loop&&o.finished&&!(t&&o.noop)){const s=J_(e);if(s)return this._update(s,!0)}return o})}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(Ia(this));const r=!de.und(e.to),i=!de.und(e.from);if(r||i)if(t.callId>this._lastToId)this._lastToId=t.callId;else return n(Ia(this));const{key:a,defaultProps:o,animation:s}=this,{to:c,from:l}=s;let{to:u=c,from:d=l}=e;i&&!r&&(!t.default||de.und(u))&&(u=d),t.reverse&&([u,d]=[d,u]);const f=!Ir(d,l);f&&(s.from=d),d=On(d);const h=!Ir(u,c);h&&this._focus(u);const g=jh(t.to),{config:p}=s,{decay:v,velocity:_}=p;(r||i)&&(p.velocity=0),t.config&&!g&&_R(p,En(t.config,a),t.config!==o.config?En(o.config,a):void 0);let w=hr(this);if(!w||de.und(u))return n(nr(this,!0));const x=de.und(t.reset)?i&&!t.default:!de.und(d)&&rs(t.reset,a),T=x?d:this.get(),b=Ps(u),k=de.num(b)||de.arr(b)||Lu(b),j=!g&&(!k||rs(o.immediate||t.immediate,a));if(h){const C=Rh(u);if(C!==w.constructor)if(j)w=this._set(b);else throw Error(`Cannot animate between ${w.constructor.name} and ${C.name}, as the "to" prop suggests`)}const S=w.constructor;let O=Wn(u),E=!1;if(!O){const C=x||!Cf(this)&&f;(h||C)&&(E=Ir(Ps(T),b),O=!E),(!Ir(s.immediate,j)&&!j||!Ir(p.decay,v)||!Ir(p.velocity,_))&&(O=!0)}if(E&&ei(this)&&(s.changed&&!x?O=!0:O||this._stop(c)),!g&&((O||Wn(c))&&(s.values=w.getPayload(),s.toValues=Wn(u)?null:S==js?[1]:Cn(b)),s.immediate!=j&&(s.immediate=j,!j&&!x&&this._set(c)),O)){const{onRest:C}=s;He(SR,$=>Vv(this,t,$));const M=nr(this,No(this,c));Ko(this._pendingCalls,M),this._pendingCalls.add(n),s.changed&&Ve.batchedUpdates(()=>{var $;s.changed=!x,C==null||C(M,this),x?En(o.onRest,M):($=s.onStart)==null||$.call(s,M,this)})}x&&this._set(T),g?n(X_(t.to,t,this._state,this)):O?this._start():ei(this)&&!h?this._pendingCalls.add(n):n(K_(T))}_focus(e){const t=this.animation;e!==t.to&&(jv(this)&&this._detach(),t.to=e,jv(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;Wn(t)&&(so(t,this),Dh(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;Wn(e)&&As(e,this)}_set(e,t=!0){const n=On(e);if(!de.und(n)){const r=hr(this);if(!r||!Ir(n,r.getValue())){const i=Rh(n);!r||r.constructor!=i?Om(this,i.create(n)):r.setValue(n),r&&Ve.batchedUpdates(()=>{this._onChange(n,t)})}}return hr(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,Lo(this,"onStart",nr(this,No(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),En(this.animation.onChange,e,this)),En(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;hr(this).reset(On(e.to)),e.immediate||(e.fromValues=e.values.map(t=>t.lastPosition)),ei(this)||(Wv(this,!0),Do(this)||this._resume())}_resume(){lr.skipAnimation?this.finish():Iu.start(this)}_stop(e,t){if(ei(this)){Wv(this,!1);const n=this.animation;He(n.values,i=>{i.done=!0}),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),$s(this,{type:"idle",parent:this});const r=t?Ia(this.get()):nr(this.get(),No(this,e??n.to));Ko(this._pendingCalls,r),n.changed&&(n.changed=!1,Lo(this,"onRest",r,this))}}};function No(e,t){const n=Ps(t),r=Ps(e.get());return Ir(r,n)}function J_(e,t=e.loop,n=e.to){const r=En(t);if(r){const i=r!==!0&&Em(r),a=(i||e).reverse,o=!i||i.reset;return Ds({...e,loop:t,default:!1,pause:void 0,to:!a||jh(n)?n:void 0,from:o?e.from:void 0,reset:o,...i})}}function Ds(e){const{to:t,from:n}=e=Em(e),r=new Set;return de.obj(t)&&Hv(t,r),de.obj(n)&&Hv(n,r),e.keys=r.size?Array.from(r):null,e}function kR(e){const t=Ds(e);return de.und(t.default)&&(t.default=Uu(t)),t}function Hv(e,t){xr(e,(n,r)=>n!=null&&t.add(r))}var SR=["onStart","onRest","onChange","onPause","onResume"];function Vv(e,t,n){e.animation[n]=t[n]!==q_(t,n)?V_(t[n],e.key):void 0}function Lo(e,t,...n){var r,i,a,o;(i=(r=e.animation)[t])==null||i.call(r,...n),(o=(a=e.defaultProps)[t])==null||o.call(a,...n)}var OR=["onStart","onChange","onRest"],ER=1,ew=class{constructor(e,t){this.id=ER++,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];de.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(Ds(e)),this}start(e){let{queue:t}=this;return e?t=Cn(e).map(Ds):this.queue=[],this._flush?this._flush(this,t):(aw(this,t),Fh(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){const n=this.springs;He(Cn(t),r=>n[r].stop(!!e))}else Is(this._state,this._lastAsyncId),this.each(n=>n.stop(!!e));return this}pause(e){if(de.und(e))this.start({pause:!0});else{const t=this.springs;He(Cn(e),n=>t[n].pause())}return this}resume(e){if(de.und(e))this.start({pause:!1});else{const t=this.springs;He(Cn(e),n=>t[n].resume())}return this}each(e){xr(this.springs,e)}_onFrame(){const{onStart:e,onChange:t,onRest:n}=this._events,r=this._active.size>0,i=this._changed.size>0;(r&&!this._started||i&&!this._started)&&(this._started=!0,ts(e,([s,c])=>{c.value=this.get(),s(c,this,this._item)}));const a=!r&&this._started,o=i||a&&n.size?this.get():null;i&&t.size&&ts(t,([s,c])=>{c.value=o,s(c,this,this._item)}),a&&(this._started=!1,ts(n,([s,c])=>{c.value=o,s(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;Ve.onFrame(this._onFrame)}};function Fh(e,t){return Promise.all(t.map(n=>tw(e,n))).then(n=>$m(e,n))}async function tw(e,t,n){const{keys:r,to:i,from:a,loop:o,onRest:s,onResolve:c}=t,l=de.obj(t.default)&&t.default;o&&(t.loop=!1),i===!1&&(t.to=null),a===!1&&(t.from=null);const u=de.arr(i)||de.fun(i)?i:void 0;u?(t.to=void 0,t.onRest=void 0,l&&(l.onRest=void 0)):He(OR,p=>{const v=t[p];if(de.fun(v)){const _=e._events[p];t[p]=({finished:w,cancelled:x})=>{const T=_.get(v);T?(w||(T.finished=!1),x&&(T.cancelled=!0)):_.set(v,{value:null,finished:w||!1,cancelled:x||!1})},l&&(l[p]=t[p])}});const d=e._state;t.pause===!d.paused?(d.paused=t.pause,Ko(t.pause?d.pauseQueue:d.resumeQueue)):d.paused&&(t.pause=!0);const f=(r||Object.keys(e.springs)).map(p=>e.springs[p].start(t)),h=t.cancel===!0||q_(t,"cancel")===!0;(u||h&&d.asyncId)&&f.push(Z_(++e._lastAsyncId,{props:t,state:d,actions:{pause:Mh,resume:Mh,start(p,v){h?(Is(d,e._lastAsyncId),v(Ia(e))):(p.onRest=s,v(X_(u,p,d,e)))}}})),d.paused&&await new Promise(p=>{d.resumeQueue.add(p)});const g=$m(e,await Promise.all(f));if(o&&g.finished&&!(n&&g.noop)){const p=J_(t,o,i);if(p)return aw(e,[p]),tw(e,p,!0)}return c&&Ve.batchedUpdates(()=>c(g,e,e.item)),g}function Bh(e,t){const n={...e.springs};return t&&He(Cn(t),r=>{de.und(r.keys)&&(r=Ds(r)),de.obj(r.to)||(r={...r,to:void 0}),iw(n,r,i=>rw(i))}),nw(e,n),n}function nw(e,t){xr(t,(n,r)=>{e.springs[r]||(e.springs[r]=n,so(n,e))})}function rw(e,t){const n=new TR;return n.key=e,t&&so(n,t),n}function iw(e,t,n){t.keys&&He(t.keys,r=>{(e[r]||(e[r]=n(r)))._prepareNode(t)})}function aw(e,t){He(t,n=>{iw(e.springs,n,r=>rw(r,e))})}var cc=({children:e,...t})=>{const n=m.useContext(Nl),r=t.pause||!!n.pause,i=t.immediate||!!n.immediate;t=sR(()=>({pause:r,immediate:i}),[r,i]);const{Provider:a}=Nl;return ue.createElement(a,{value:t},e)},Nl=MR(cc,{});cc.Provider=Nl.Provider;cc.Consumer=Nl.Consumer;function MR(e,t){return Object.assign(e,ue.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}var ow=()=>{const e=[],t=function(r){aR();const i=[];return He(e,(a,o)=>{if(de.und(r))i.push(a.start());else{const s=n(r,a,o);s&&i.push(a.start(s))}}),i};t.current=e,t.add=function(r){e.includes(r)||e.push(r)},t.delete=function(r){const i=e.indexOf(r);~i&&e.splice(i,1)},t.pause=function(){return He(e,r=>r.pause(...arguments)),this},t.resume=function(){return He(e,r=>r.resume(...arguments)),this},t.set=function(r){He(e,(i,a)=>{const o=de.fun(r)?r(a,i):r;o&&i.set(o)})},t.start=function(r){const i=[];return He(e,(a,o)=>{if(de.und(r))i.push(a.start());else{const s=this._getProps(r,a,o);s&&i.push(a.start(s))}}),i},t.stop=function(){return He(e,r=>r.stop(...arguments)),this},t.update=function(r){return He(e,(i,a)=>i.update(this._getProps(r,i,a))),this};const n=function(r,i,a){return de.fun(r)?r(a,i):r};return t._getProps=n,t};function $R(e,t,n){const r=de.fun(t)&&t;r&&!n&&(n=[]);const i=m.useMemo(()=>r||arguments.length==3?ow():void 0,[]),a=m.useRef(0),o=km(),s=m.useMemo(()=>({ctrls:[],queue:[],flush(_,w){const x=Bh(_,w);return a.current>0&&!s.queue.length&&!Object.keys(x).some(b=>!_.springs[b])?Fh(_,w):new Promise(b=>{nw(_,x),s.queue.push(()=>{b(Fh(_,w))}),o()})}}),[]),c=m.useRef([...s.ctrls]),l=[],u=Ah(e)||0;m.useMemo(()=>{He(c.current.slice(e,u),_=>{Ph(_,i),_.stop(!0)}),c.current.length=e,d(u,e)},[e]),m.useMemo(()=>{d(0,Math.min(u,e))},n);function d(_,w){for(let x=_;x<w;x++){const T=c.current[x]||(c.current[x]=new ew(null,s.flush)),b=r?r(x,T):t[x];b&&(l[x]=kR(b))}}const f=c.current.map((_,w)=>Bh(_,l[w])),h=m.useContext(cc),g=Ah(h),p=h!==g&&Y_(h);Ii(()=>{a.current++,s.ctrls=c.current;const{queue:_}=s;_.length&&(s.queue=[],He(_,w=>w())),He(c.current,(w,x)=>{i==null||i.add(w),p&&w.start({default:h});const T=l[x];T&&(G_(w,T.ref),w.ref?w.queue.push(T):w.start(T))})}),Sm(()=>()=>{He(s.ctrls,_=>_.stop(!0))});const v=f.map(_=>({..._}));return i?[v,i]:v}function Sr(e,t){const n=de.fun(e),[[r],i]=$R(1,n?e:[e],n?[]:t);return n||arguments.length==2?[r,i]:r}function sa(e,t,n){const r=de.fun(t)&&t,{reset:i,sort:a,trail:o=0,expires:s=!0,exitBeforeEnter:c=!1,onDestroyed:l,ref:u,config:d}=r?r():t,f=m.useMemo(()=>r||arguments.length==3?ow():void 0,[]),h=Cn(e),g=[],p=m.useRef(null),v=i?null:p.current;Ii(()=>{p.current=g}),Sm(()=>(He(g,A=>{f==null||f.add(A.ctrl),A.ctrl.ref=f}),()=>{He(p.current,A=>{A.expired&&clearTimeout(A.expirationId),Ph(A.ctrl,f),A.ctrl.stop(!0)})}));const _=RR(h,r?r():t,v),w=i&&p.current||[];Ii(()=>He(w,({ctrl:A,item:P,key:N})=>{Ph(A,f),En(l,P,N)}));const x=[];if(v&&He(v,(A,P)=>{A.expired?(clearTimeout(A.expirationId),w.push(A)):(P=x[P]=_.indexOf(A.key),~P&&(g[P]=A))}),He(h,(A,P)=>{g[P]||(g[P]={key:_[P],item:A,phase:"mount",ctrl:new ew},g[P].ctrl.item=A)}),x.length){let A=-1;const{leave:P}=r?r():t;He(x,(N,F)=>{const z=v[F];~N?(A=g.indexOf(z),g[A]={...z,item:h[N]}):P&&g.splice(++A,0,z)})}de.fun(a)&&g.sort((A,P)=>a(A.item,P.item));let T=-o;const b=km(),k=Uu(t),j=new Map,S=m.useRef(new Map),O=m.useRef(!1);He(g,(A,P)=>{const N=A.key,F=A.phase,z=r?r():t;let q,W;const G=En(z.delay||0,N);if(F=="mount")q=z.enter,W="enter";else{const X=_.indexOf(N)<0;if(F!="leave")if(X)q=z.leave,W="leave";else if(q=z.update)W="update";else return;else if(!X)q=z.enter,W="enter";else return}if(q=En(q,A.item,P),q=de.obj(q)?Em(q):{to:q},!q.config){const X=d||k.config;q.config=En(X,A.item,P,W)}T+=o;const ee={...k,delay:G+T,ref:u,immediate:z.immediate,reset:!1,...q};if(W=="enter"&&de.und(ee.from)){const X=r?r():t,K=de.und(X.initial)||v?X.from:X.initial;ee.from=En(K,A.item,P)}const{onResolve:ie}=ee;ee.onResolve=X=>{En(ie,X);const K=p.current,te=K.find(D=>D.key===N);if(te&&!(X.cancelled&&te.phase!="update")&&te.ctrl.idle){const D=K.every(I=>I.ctrl.idle);if(te.phase=="leave"){const I=En(s,te.item);if(I!==!1){const L=I===!0?0:I;if(te.expired=!0,!D&&L>0){L<=2147483647&&(te.expirationId=setTimeout(b,L));return}}}D&&K.some(I=>I.expired)&&(S.current.delete(te),c&&(O.current=!0),b())}};const Q=Bh(A.ctrl,ee);W==="leave"&&c?S.current.set(A,{phase:W,springs:Q,payload:ee}):j.set(A,{phase:W,springs:Q,payload:ee})});const E=m.useContext(cc),C=Ah(E),M=E!==C&&Y_(E);Ii(()=>{M&&He(g,A=>{A.ctrl.start({default:E})})},[E]),He(j,(A,P)=>{if(S.current.size){const N=g.findIndex(F=>F.key===P.key);g.splice(N,1)}}),Ii(()=>{He(S.current.size?S.current:j,({phase:A,payload:P},N)=>{const{ctrl:F}=N;N.phase=A,f==null||f.add(F),M&&A=="enter"&&F.start({default:E}),P&&(G_(F,P.ref),(F.ref||f)&&!O.current?F.update(P):(F.start(P),O.current&&(O.current=!1)))})},i?void 0:n);const $=A=>ue.createElement(ue.Fragment,null,g.map((P,N)=>{const{springs:F}=j.get(P)||P.ctrl,z=A({...F},P.item,P,N);return z&&z.type?ue.createElement(z.type,{...z.props,key:de.str(P.key)||de.num(P.key)?P.key:P.ctrl.id,ref:z.ref}):z}));return f?[$,f]:$}var AR=1;function RR(e,{key:t,keys:n=t},r){if(n===null){const i=new Set;return e.map(a=>{const o=r&&r.find(s=>s.item===a&&s.phase!=="leave"&&!i.has(s));return o?(i.add(o),o.key):AR++})}return de.und(n)?e:de.fun(n)?e.map(n):Cn(n)}var sw=class extends Am{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=Es(...t);const n=this._get(),r=Rh(n);Om(this,r.create(n))}advance(e){const t=this._get(),n=this.get();Ir(t,n)||(hr(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&qv(this._active)&&Tf(this)}_get(){const e=de.arr(this.source)?this.source.map(On):Cn(On(this.source));return this.calc(...e)}_start(){this.idle&&!qv(this._active)&&(this.idle=!1,He(Fu(this),e=>{e.done=!1}),lr.skipAnimation?(Ve.batchedUpdates(()=>this.advance()),Tf(this)):Iu.start(this))}_attach(){let e=1;He(Cn(this.source),t=>{Wn(t)&&so(t,this),Dh(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))}),this.priority=e,this._start()}_detach(){He(Cn(this.source),e=>{Wn(e)&&As(e,this)}),this._active.clear(),Tf(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=Cn(this.source).reduce((t,n)=>Math.max(t,(Dh(n)?n.priority:0)+1),0))}};function jR(e){return e.idle!==!1}function qv(e){return!e.size||Array.from(e).every(jR)}function Tf(e){e.idle||(e.idle=!0,He(Fu(e),t=>{t.done=!0}),$s(e,{type:"idle",parent:e}))}var vi=(e,...t)=>new sw(e,t);lr.assign({createStringInterpolator:U_,to:(e,t)=>new sw(e,t)});var cw=/^--/;function PR(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!cw.test(e)&&!(is.hasOwnProperty(e)&&is[e])?t+"px":(""+t).trim()}var Yv={};function IR(e,t){if(!e.nodeType||!e.setAttribute)return!1;const n=e.nodeName==="filter"||e.parentNode&&e.parentNode.nodeName==="filter",{className:r,style:i,children:a,scrollTop:o,scrollLeft:s,viewBox:c,...l}=t,u=Object.values(l),d=Object.keys(l).map(f=>n||e.hasAttribute(f)?f:Yv[f]||(Yv[f]=f.replace(/([A-Z])/g,h=>"-"+h.toLowerCase())));a!==void 0&&(e.textContent=a);for(const f in i)if(i.hasOwnProperty(f)){const h=PR(f,i[f]);cw.test(f)?e.style.setProperty(f,h):e.style[f]=h}d.forEach((f,h)=>{e.setAttribute(f,u[h])}),r!==void 0&&(e.className=r),o!==void 0&&(e.scrollTop=o),s!==void 0&&(e.scrollLeft=s),c!==void 0&&e.setAttribute("viewBox",c)}var is={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},DR=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),NR=["Webkit","Ms","Moz","O"];is=Object.keys(is).reduce((e,t)=>(NR.forEach(n=>e[DR(n,t)]=e[t]),e),is);var LR=/^(matrix|translate|scale|rotate|skew)/,FR=/^(translate)/,BR=/^(rotate|skew)/,kf=(e,t)=>de.num(e)&&e!==0?e+t:e,al=(e,t)=>de.arr(e)?e.every(n=>al(n,t)):de.num(e)?e===t:parseFloat(e)===t,UR=class extends Bu{constructor({x:e,y:t,z:n,...r}){const i=[],a=[];(e||t||n)&&(i.push([e||0,t||0,n||0]),a.push(o=>[`translate3d(${o.map(s=>kf(s,"px")).join(",")})`,al(o,0)])),xr(r,(o,s)=>{if(s==="transform")i.push([o||""]),a.push(c=>[c,c===""]);else if(LR.test(s)){if(delete r[s],de.und(o))return;const c=FR.test(s)?"px":BR.test(s)?"deg":"";i.push(Cn(o)),a.push(s==="rotate3d"?([l,u,d,f])=>[`rotate3d(${l},${u},${d},${kf(f,c)})`,al(f,0)]:l=>[`${s}(${l.map(u=>kf(u,c)).join(",")})`,al(l,s.startsWith("scale")?1:0)])}}),i.length&&(r.transform=new WR(i,a)),super(r)}},WR=class extends L_{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 He(this.inputs,(n,r)=>{const i=On(n[0]),[a,o]=this.transforms[r](de.arr(i)?i:n.map(On));e+=" "+a,t=t&&o}),t?"none":e}observerAdded(e){e==1&&He(this.inputs,t=>He(t,n=>Wn(n)&&so(n,this)))}observerRemoved(e){e==0&&He(this.inputs,t=>He(t,n=>Wn(n)&&As(n,this)))}eventObserved(e){e.type=="change"&&(this._value=null),$s(this,e)}},zR=["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"];lr.assign({batchedUpdates:oi.unstable_batchedUpdates,createStringInterpolator:U_,colors:DA});var HR=mR(zR,{applyAnimatedValues:IR,createAnimatedStyle:e=>new UR(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}),Ct=HR.animated;function ea(){return ea=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},ea.apply(this,arguments)}var VR={pointerEvents:"none",position:"absolute",zIndex:10,top:0,left:0},Gv=function(e,t){return"translate("+e+"px, "+t+"px)"},lw=m.memo(function(e){var t,n=e.position,r=e.anchor,i=e.children,a=Tt(),o=Sn(),s=o.animate,c=o.config,l=m3(),u=l[0],d=l[1],f=m.useRef(!1),h=void 0,g=!1,p=d.width>0&&d.height>0,v=Math.round(n[0]),_=Math.round(n[1]);p&&(r==="top"?(v-=d.width/2,_-=d.height+14):r==="right"?(v+=14,_-=d.height/2):r==="bottom"?(v-=d.width/2,_+=14):r==="left"?(v-=d.width+14,_-=d.height/2):r==="center"&&(v-=d.width/2,_-=d.height/2),h={transform:Gv(v,_)},f.current||(g=!0),f.current=[v,_]);var w=Sr({to:h,config:c,immediate:!s||g}),x=ea({},VR,a.tooltip.wrapper,{transform:(t=w.transform)!=null?t:Gv(v,_),opacity:w.transform?1:0});return y.jsx(Ct.div,{ref:u,style:x,children:i})});lw.displayName="TooltipWrapper";var uw=m.memo(function(e){var t=e.size,n=t===void 0?12:t,r=e.color,i=e.style;return y.jsx("span",{style:ea({display:"block",width:n,height:n,background:r},i===void 0?{}:i)})}),Rm=m.memo(function(e){var t,n=e.id,r=e.value,i=e.format,a=e.enableChip,o=a!==void 0&&a,s=e.color,c=e.renderContent,l=Tt(),u=Ja(i);if(typeof c=="function")t=c();else{var d=r;u!==void 0&&d!==void 0&&(d=u(d)),t=y.jsxs("div",{style:l.tooltip.basic,children:[o&&y.jsx(uw,{color:s,style:l.tooltip.chip}),d!==void 0?y.jsxs("span",{children:[n,": ",y.jsx("strong",{children:""+d})]}):n]})}return y.jsx("div",{style:l.tooltip.container,children:t})}),qR={width:"100%",borderCollapse:"collapse"},dw=m.memo(function(e){var t,n=e.title,r=e.rows,i=r===void 0?[]:r,a=e.renderContent,o=Tt();return i.length?(t=typeof a=="function"?a():y.jsxs("div",{children:[n&&n,y.jsx("table",{style:ea({},qR,o.tooltip.table),children:y.jsx("tbody",{children:i.map(function(s,c){return y.jsx("tr",{children:s.map(function(l,u){return y.jsx("td",{style:o.tooltip.tableCell,children:l},u)})},c)})})})]}),y.jsx("div",{style:o.tooltip.container,children:t})):null});dw.displayName="TableTooltip";var Uh=m.memo(function(e){var t=e.x0,n=e.x1,r=e.y0,i=e.y1,a=Tt(),o=Sn(),s=o.animate,c=o.config,l=m.useMemo(function(){return ea({},a.crosshair.line,{pointerEvents:"none"})},[a.crosshair.line]),u=Sr({x1:t,x2:n,y1:r,y2:i,config:c,immediate:!s});return y.jsx(Ct.line,ea({},u,{fill:"none",style:l}))});Uh.displayName="CrosshairLine";var Wh=m.memo(function(e){var t,n,r=e.width,i=e.height,a=e.type,o=e.x,s=e.y;return a==="cross"?(t={x0:o,x1:o,y0:0,y1:i},n={x0:0,x1:r,y0:s,y1:s}):a==="top-left"?(t={x0:o,x1:o,y0:0,y1:s},n={x0:0,x1:o,y0:s,y1:s}):a==="top"?t={x0:o,x1:o,y0:0,y1:s}:a==="top-right"?(t={x0:o,x1:o,y0:0,y1:s},n={x0:o,x1:r,y0:s,y1:s}):a==="right"?n={x0:o,x1:r,y0:s,y1:s}:a==="bottom-right"?(t={x0:o,x1:o,y0:s,y1:i},n={x0:o,x1:r,y0:s,y1:s}):a==="bottom"?t={x0:o,x1:o,y0:s,y1:i}:a==="bottom-left"?(t={x0:o,x1:o,y0:s,y1:i},n={x0:0,x1:o,y0:s,y1:s}):a==="left"?n={x0:0,x1:o,y0:s,y1:s}:a==="x"?t={x0:o,x1:o,y0:0,y1:i}:a==="y"&&(n={x0:0,x1:r,y0:s,y1:s}),y.jsxs(y.Fragment,{children:[t&&y.jsx(Uh,{x0:t.x0,x1:t.x1,y0:t.y0,y1:t.y1}),n&&y.jsx(Uh,{x0:n.x0,x1:n.x1,y0:n.y0,y1:n.y1})]})});Wh.displayName="Crosshair";var fw=m.createContext({showTooltipAt:function(){},showTooltipFromEvent:function(){},hideTooltip:function(){}}),zh={isVisible:!1,position:[null,null],content:null,anchor:null},hw=m.createContext(zh),YR=function(e){var t=m.useState(zh),n=t[0],r=t[1],i=m.useCallback(function(s,c,l){var u=c[0],d=c[1];l===void 0&&(l="top"),r({isVisible:!0,position:[u,d],anchor:l,content:s})},[r]),a=m.useCallback(function(s,c,l){l===void 0&&(l="top");var u=e.current.getBoundingClientRect(),d=e.current.offsetWidth,f=d===u.width?1:d/u.width,h="touches"in c?c.touches[0]:c,g=h.clientX,p=h.clientY,v=(g-u.left)*f,_=(p-u.top)*f;l!=="left"&&l!=="right"||(l=v<u.width/2?"right":"left"),r({isVisible:!0,position:[v,_],anchor:l,content:s})},[e,r]),o=m.useCallback(function(){r(zh)},[r]);return{actions:m.useMemo(function(){return{showTooltipAt:i,showTooltipFromEvent:a,hideTooltip:o}},[i,a,o]),state:n}},ca=function(){var e=m.useContext(fw);if(e===void 0)throw new Error("useTooltip must be used within a TooltipProvider");return e},GR=function(){var e=m.useContext(hw);if(e===void 0)throw new Error("useTooltipState must be used within a TooltipProvider");return e},ZR=function(e){return e.isVisible},KR=function(){var e=GR();return ZR(e)?y.jsx(lw,{position:e.position,anchor:e.anchor,children:e.content}):null},XR=function(e){var t=e.container,n=e.children,r=YR(t),i=r.actions,a=r.state;return y.jsx(fw.Provider,{value:i,children:y.jsx(hw.Provider,{value:a,children:n})})};function QR(){this.__data__=[],this.size=0}var JR=QR;function e9(e,t){return e===t||e!==e&&t!==t}var lc=e9,t9=lc;function n9(e,t){for(var n=e.length;n--;)if(t9(e[n][0],t))return n;return-1}var Wu=n9,r9=Wu,i9=Array.prototype,a9=i9.splice;function o9(e){var t=this.__data__,n=r9(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():a9.call(t,n,1),--this.size,!0}var s9=o9,c9=Wu;function l9(e){var t=this.__data__,n=c9(t,e);return n<0?void 0:t[n][1]}var u9=l9,d9=Wu;function f9(e){return d9(this.__data__,e)>-1}var h9=f9,p9=Wu;function m9(e,t){var n=this.__data__,r=p9(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var g9=m9,v9=JR,y9=s9,b9=u9,x9=h9,_9=g9;function co(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])}}co.prototype.clear=v9;co.prototype.delete=y9;co.prototype.get=b9;co.prototype.has=x9;co.prototype.set=_9;var zu=co,w9=zu;function C9(){this.__data__=new w9,this.size=0}var T9=C9;function k9(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var S9=k9;function O9(e){return this.__data__.get(e)}var E9=O9;function M9(e){return this.__data__.has(e)}var $9=M9,A9=typeof Hn=="object"&&Hn&&Hn.Object===Object&&Hn,pw=A9,R9=pw,j9=typeof self=="object"&&self&&self.Object===Object&&self,P9=R9||j9||Function("return this")(),Or=P9,I9=Or,D9=I9.Symbol,lo=D9,Zv=lo,mw=Object.prototype,N9=mw.hasOwnProperty,L9=mw.toString,Fo=Zv?Zv.toStringTag:void 0;function F9(e){var t=N9.call(e,Fo),n=e[Fo];try{e[Fo]=void 0;var r=!0}catch{}var i=L9.call(e);return r&&(t?e[Fo]=n:delete e[Fo]),i}var B9=F9,U9=Object.prototype,W9=U9.toString;function z9(e){return W9.call(e)}var H9=z9,Kv=lo,V9=B9,q9=H9,Y9="[object Null]",G9="[object Undefined]",Xv=Kv?Kv.toStringTag:void 0;function Z9(e){return e==null?e===void 0?G9:Y9:Xv&&Xv in Object(e)?V9(e):q9(e)}var Gr=Z9;function K9(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Er=K9,X9=Gr,Q9=Er,J9="[object AsyncFunction]",ej="[object Function]",tj="[object GeneratorFunction]",nj="[object Proxy]";function rj(e){if(!Q9(e))return!1;var t=X9(e);return t==ej||t==tj||t==J9||t==nj}var Hu=rj;const jm=Ht(Hu);var ij=Or,aj=ij["__core-js_shared__"],oj=aj,Sf=oj,Qv=function(){var e=/[^.]+$/.exec(Sf&&Sf.keys&&Sf.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function sj(e){return!!Qv&&Qv in e}var cj=sj,lj=Function.prototype,uj=lj.toString;function dj(e){if(e!=null){try{return uj.call(e)}catch{}try{return e+""}catch{}}return""}var gw=dj,fj=Hu,hj=cj,pj=Er,mj=gw,gj=/[\\^$.*+?()[\]{}|]/g,vj=/^\[object .+?Constructor\]$/,yj=Function.prototype,bj=Object.prototype,xj=yj.toString,_j=bj.hasOwnProperty,wj=RegExp("^"+xj.call(_j).replace(gj,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Cj(e){if(!pj(e)||hj(e))return!1;var t=fj(e)?wj:vj;return t.test(mj(e))}var Tj=Cj;function kj(e,t){return e==null?void 0:e[t]}var Sj=kj,Oj=Tj,Ej=Sj;function Mj(e,t){var n=Ej(e,t);return Oj(n)?n:void 0}var la=Mj,$j=la,Aj=Or,Rj=$j(Aj,"Map"),Pm=Rj,jj=la,Pj=jj(Object,"create"),Vu=Pj,Jv=Vu;function Ij(){this.__data__=Jv?Jv(null):{},this.size=0}var Dj=Ij;function Nj(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Lj=Nj,Fj=Vu,Bj="__lodash_hash_undefined__",Uj=Object.prototype,Wj=Uj.hasOwnProperty;function zj(e){var t=this.__data__;if(Fj){var n=t[e];return n===Bj?void 0:n}return Wj.call(t,e)?t[e]:void 0}var Hj=zj,Vj=Vu,qj=Object.prototype,Yj=qj.hasOwnProperty;function Gj(e){var t=this.__data__;return Vj?t[e]!==void 0:Yj.call(t,e)}var Zj=Gj,Kj=Vu,Xj="__lodash_hash_undefined__";function Qj(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Kj&&t===void 0?Xj:t,this}var Jj=Qj,eP=Dj,tP=Lj,nP=Hj,rP=Zj,iP=Jj;function uo(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])}}uo.prototype.clear=eP;uo.prototype.delete=tP;uo.prototype.get=nP;uo.prototype.has=rP;uo.prototype.set=iP;var aP=uo,e1=aP,oP=zu,sP=Pm;function cP(){this.size=0,this.__data__={hash:new e1,map:new(sP||oP),string:new e1}}var lP=cP;function uP(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var dP=uP,fP=dP;function hP(e,t){var n=e.__data__;return fP(t)?n[typeof t=="string"?"string":"hash"]:n.map}var qu=hP,pP=qu;function mP(e){var t=pP(this,e).delete(e);return this.size-=t?1:0,t}var gP=mP,vP=qu;function yP(e){return vP(this,e).get(e)}var bP=yP,xP=qu;function _P(e){return xP(this,e).has(e)}var wP=_P,CP=qu;function TP(e,t){var n=CP(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var kP=TP,SP=lP,OP=gP,EP=bP,MP=wP,$P=kP;function fo(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])}}fo.prototype.clear=SP;fo.prototype.delete=OP;fo.prototype.get=EP;fo.prototype.has=MP;fo.prototype.set=$P;var Im=fo,AP=zu,RP=Pm,jP=Im,PP=200;function IP(e,t){var n=this.__data__;if(n instanceof AP){var r=n.__data__;if(!RP||r.length<PP-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new jP(r)}return n.set(e,t),this.size=n.size,this}var DP=IP,NP=zu,LP=T9,FP=S9,BP=E9,UP=$9,WP=DP;function ho(e){var t=this.__data__=new NP(e);this.size=t.size}ho.prototype.clear=LP;ho.prototype.delete=FP;ho.prototype.get=BP;ho.prototype.has=UP;ho.prototype.set=WP;var Yu=ho,zP=la,HP=function(){try{var e=zP(Object,"defineProperty");return e({},"",{}),e}catch{}}(),vw=HP,t1=vw;function VP(e,t,n){t=="__proto__"&&t1?t1(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var Dm=VP,qP=Dm,YP=lc;function GP(e,t,n){(n!==void 0&&!YP(e[t],n)||n===void 0&&!(t in e))&&qP(e,t,n)}var yw=GP;function ZP(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),s=o.length;s--;){var c=o[e?s:++i];if(n(a[c],c,a)===!1)break}return t}}var KP=ZP,XP=KP,QP=XP(),bw=QP,Ll={exports:{}};Ll.exports;(function(e,t){var n=Or,r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===r,o=a?n.Buffer:void 0,s=o?o.allocUnsafe:void 0;function c(l,u){if(u)return l.slice();var d=l.length,f=s?s(d):new l.constructor(d);return l.copy(f),f}e.exports=c})(Ll,Ll.exports);var xw=Ll.exports,JP=Or,eI=JP.Uint8Array,_w=eI,n1=_w;function tI(e){var t=new e.constructor(e.byteLength);return new n1(t).set(new n1(e)),t}var Nm=tI,nI=Nm;function rI(e,t){var n=t?nI(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var ww=rI;function iI(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var Cw=iI,aI=Er,r1=Object.create,oI=function(){function e(){}return function(t){if(!aI(t))return{};if(r1)return r1(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),sI=oI;function cI(e,t){return function(n){return e(t(n))}}var Tw=cI,lI=Tw,uI=lI(Object.getPrototypeOf,Object),Lm=uI,dI=Object.prototype;function fI(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||dI;return e===n}var Fm=fI,hI=sI,pI=Lm,mI=Fm;function gI(e){return typeof e.constructor=="function"&&!mI(e)?hI(pI(e)):{}}var kw=gI;function vI(e){return e!=null&&typeof e=="object"}var Qn=vI,yI=Gr,bI=Qn,xI="[object Arguments]";function _I(e){return bI(e)&&yI(e)==xI}var wI=_I,i1=wI,CI=Qn,Sw=Object.prototype,TI=Sw.hasOwnProperty,kI=Sw.propertyIsEnumerable,SI=i1(function(){return arguments}())?i1:function(e){return CI(e)&&TI.call(e,"callee")&&!kI.call(e,"callee")},Gu=SI,OI=Array.isArray,Pn=OI,EI=9007199254740991;function MI(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=EI}var Bm=MI,$I=Hu,AI=Bm;function RI(e){return e!=null&&AI(e.length)&&!$I(e)}var po=RI,jI=po,PI=Qn;function II(e){return PI(e)&&jI(e)}var Ow=II,Fl={exports:{}};function DI(){return!1}var NI=DI;Fl.exports;(function(e,t){var n=Or,r=NI,i=t&&!t.nodeType&&t,a=i&&!0&&e&&!e.nodeType&&e,o=a&&a.exports===i,s=o?n.Buffer:void 0,c=s?s.isBuffer:void 0,l=c||r;e.exports=l})(Fl,Fl.exports);var Zu=Fl.exports,LI=Gr,FI=Lm,BI=Qn,UI="[object Object]",WI=Function.prototype,zI=Object.prototype,Ew=WI.toString,HI=zI.hasOwnProperty,VI=Ew.call(Object);function qI(e){if(!BI(e)||LI(e)!=UI)return!1;var t=FI(e);if(t===null)return!0;var n=HI.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Ew.call(n)==VI}var Um=qI;const Wm=Ht(Um);var YI=Gr,GI=Bm,ZI=Qn,KI="[object Arguments]",XI="[object Array]",QI="[object Boolean]",JI="[object Date]",eD="[object Error]",tD="[object Function]",nD="[object Map]",rD="[object Number]",iD="[object Object]",aD="[object RegExp]",oD="[object Set]",sD="[object String]",cD="[object WeakMap]",lD="[object ArrayBuffer]",uD="[object DataView]",dD="[object Float32Array]",fD="[object Float64Array]",hD="[object Int8Array]",pD="[object Int16Array]",mD="[object Int32Array]",gD="[object Uint8Array]",vD="[object Uint8ClampedArray]",yD="[object Uint16Array]",bD="[object Uint32Array]",Ft={};Ft[dD]=Ft[fD]=Ft[hD]=Ft[pD]=Ft[mD]=Ft[gD]=Ft[vD]=Ft[yD]=Ft[bD]=!0;Ft[KI]=Ft[XI]=Ft[lD]=Ft[QI]=Ft[uD]=Ft[JI]=Ft[eD]=Ft[tD]=Ft[nD]=Ft[rD]=Ft[iD]=Ft[aD]=Ft[oD]=Ft[sD]=Ft[cD]=!1;function xD(e){return ZI(e)&&GI(e.length)&&!!Ft[YI(e)]}var _D=xD;function wD(e){return function(t){return e(t)}}var mo=wD,Bl={exports:{}};Bl.exports;(function(e,t){var n=pw,r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===r,o=a&&n.process,s=function(){try{var c=i&&i.require&&i.require("util").types;return c||o&&o.binding&&o.binding("util")}catch{}}();e.exports=s})(Bl,Bl.exports);var Ku=Bl.exports,CD=_D,TD=mo,a1=Ku,o1=a1&&a1.isTypedArray,kD=o1?TD(o1):CD,zm=kD;function SD(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var Mw=SD,OD=Dm,ED=lc,MD=Object.prototype,$D=MD.hasOwnProperty;function AD(e,t,n){var r=e[t];(!($D.call(e,t)&&ED(r,n))||n===void 0&&!(t in e))&&OD(e,t,n)}var Hm=AD,RD=Hm,jD=Dm;function PD(e,t,n,r){var i=!n;n||(n={});for(var a=-1,o=t.length;++a<o;){var s=t[a],c=r?r(n[s],e[s],s,n,e):void 0;c===void 0&&(c=e[s]),i?jD(n,s,c):RD(n,s,c)}return n}var go=PD;function ID(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var DD=ID,ND=9007199254740991,LD=/^(?:0|[1-9]\d*)$/;function FD(e,t){var n=typeof e;return t=t??ND,!!t&&(n=="number"||n!="symbol"&&LD.test(e))&&e>-1&&e%1==0&&e<t}var Xu=FD,BD=DD,UD=Gu,WD=Pn,zD=Zu,HD=Xu,VD=zm,qD=Object.prototype,YD=qD.hasOwnProperty;function GD(e,t){var n=WD(e),r=!n&&UD(e),i=!n&&!r&&zD(e),a=!n&&!r&&!i&&VD(e),o=n||r||i||a,s=o?BD(e.length,String):[],c=s.length;for(var l in e)(t||YD.call(e,l))&&!(o&&(l=="length"||i&&(l=="offset"||l=="parent")||a&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||HD(l,c)))&&s.push(l);return s}var $w=GD;function ZD(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var KD=ZD,XD=Er,QD=Fm,JD=KD,eN=Object.prototype,tN=eN.hasOwnProperty;function nN(e){if(!XD(e))return JD(e);var t=QD(e),n=[];for(var r in e)r=="constructor"&&(t||!tN.call(e,r))||n.push(r);return n}var rN=nN,iN=$w,aN=rN,oN=po;function sN(e){return oN(e)?iN(e,!0):aN(e)}var uc=sN,cN=go,lN=uc;function uN(e){return cN(e,lN(e))}var dN=uN,s1=yw,fN=xw,hN=ww,pN=Cw,mN=kw,c1=Gu,l1=Pn,gN=Ow,vN=Zu,yN=Hu,bN=Er,xN=Um,_N=zm,u1=Mw,wN=dN;function CN(e,t,n,r,i,a,o){var s=u1(e,n),c=u1(t,n),l=o.get(c);if(l){s1(e,n,l);return}var u=a?a(s,c,n+"",e,t,o):void 0,d=u===void 0;if(d){var f=l1(c),h=!f&&vN(c),g=!f&&!h&&_N(c);u=c,f||h||g?l1(s)?u=s:gN(s)?u=pN(s):h?(d=!1,u=fN(c,!0)):g?(d=!1,u=hN(c,!0)):u=[]:xN(c)||c1(c)?(u=s,c1(s)?u=wN(s):(!bN(s)||yN(s))&&(u=mN(c))):d=!1}d&&(o.set(c,u),i(u,c,r,a,o),o.delete(c)),s1(e,n,u)}var TN=CN,kN=Yu,SN=yw,ON=bw,EN=TN,MN=Er,$N=uc,AN=Mw;function Aw(e,t,n,r,i){e!==t&&ON(t,function(a,o){if(i||(i=new kN),MN(a))EN(e,t,o,n,Aw,r,i);else{var s=r?r(AN(e,o),a,o+"",e,t,i):void 0;s===void 0&&(s=a),SN(e,o,s)}},$N)}var RN=Aw;function jN(e){return e}var Qu=jN;function PN(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 IN=PN,DN=IN,d1=Math.max;function NN(e,t,n){return t=d1(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=d1(r.length-t,0),o=Array(a);++i<a;)o[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(o),DN(e,this,s)}}var Rw=NN;function LN(e){return function(){return e}}var FN=LN,BN=FN,f1=vw,UN=Qu,WN=f1?function(e,t){return f1(e,"toString",{configurable:!0,enumerable:!1,value:BN(t),writable:!0})}:UN,zN=WN,HN=800,VN=16,qN=Date.now;function YN(e){var t=0,n=0;return function(){var r=qN(),i=VN-(r-n);if(n=r,i>0){if(++t>=HN)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var GN=YN,ZN=zN,KN=GN,XN=KN(ZN),jw=XN,QN=Qu,JN=Rw,eL=jw;function tL(e,t){return eL(JN(e,t,QN),e+"")}var Vm=tL,nL=lc,rL=po,iL=Xu,aL=Er;function oL(e,t,n){if(!aL(n))return!1;var r=typeof t;return(r=="number"?rL(n)&&iL(t,n.length):r=="string"&&t in n)?nL(n[t],e):!1}var Pw=oL,sL=Vm,cL=Pw;function lL(e){return sL(function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(a=e.length>3&&typeof a=="function"?(i--,a):void 0,o&&cL(n[0],n[1],o)&&(a=i<3?void 0:a,i=1),t=Object(t);++r<i;){var s=n[r];s&&e(t,s,r,a)}return t})}var uL=lL,dL=RN,fL=uL,hL=fL(function(e,t,n){dL(e,t,n)}),pL=hL;const mL=Ht(pL);var gL=Gr,vL=Qn,yL="[object Symbol]";function bL(e){return typeof e=="symbol"||vL(e)&&gL(e)==yL}var Ju=bL,xL=Pn,_L=Ju,wL=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,CL=/^\w*$/;function TL(e,t){if(xL(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||_L(e)?!0:CL.test(e)||!wL.test(e)||t!=null&&e in Object(t)}var qm=TL,Iw=Im,kL="Expected a function";function Ym(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(kL);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(Ym.Cache||Iw),n}Ym.Cache=Iw;var SL=Ym,OL=SL,EL=500;function ML(e){var t=OL(e,function(r){return n.size===EL&&n.clear(),r}),n=t.cache;return t}var $L=ML,AL=$L,RL=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,jL=/\\(\\)?/g,PL=AL(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(RL,function(n,r,i,a){t.push(i?a.replace(jL,"$1"):r||n)}),t}),IL=PL;function DL(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var ed=DL,h1=lo,NL=ed,LL=Pn,FL=Ju,BL=1/0,p1=h1?h1.prototype:void 0,m1=p1?p1.toString:void 0;function Dw(e){if(typeof e=="string")return e;if(LL(e))return NL(e,Dw)+"";if(FL(e))return m1?m1.call(e):"";var t=e+"";return t=="0"&&1/e==-BL?"-0":t}var UL=Dw,WL=UL;function zL(e){return e==null?"":WL(e)}var Nw=zL,HL=Pn,VL=qm,qL=IL,YL=Nw;function GL(e,t){return HL(e)?e:VL(e,t)?[e]:qL(YL(e))}var vo=GL,ZL=Ju,KL=1/0;function XL(e){if(typeof e=="string"||ZL(e))return e;var t=e+"";return t=="0"&&1/e==-KL?"-0":t}var yo=XL,QL=vo,JL=yo;function eF(e,t){t=QL(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[JL(t[n++])];return n&&n==r?e:void 0}var dc=eF,tF=dc;function nF(e,t,n){var r=e==null?void 0:tF(e,t);return r===void 0?n:r}var Lw=nF;const _r=Ht(Lw);var rF=Hm,iF=vo,aF=Xu,g1=Er,oF=yo;function sF(e,t,n,r){if(!g1(e))return e;t=iF(t,e);for(var i=-1,a=t.length,o=a-1,s=e;s!=null&&++i<a;){var c=oF(t[i]),l=n;if(c==="__proto__"||c==="constructor"||c==="prototype")return e;if(i!=o){var u=s[c];l=r?r(u,c,s):void 0,l===void 0&&(l=g1(u)?u:aF(t[i+1])?[]:{})}rF(s,c,l),s=s[c]}return e}var Fw=sF,cF=Fw;function lF(e,t,n){return e==null?e:cF(e,t,n)}var uF=lF;const Xo=Ht(uF);function td(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Gm(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function bo(){}var ta=.7,Ka=1/ta,Da="\\s*([+-]?\\d+)\\s*",Ns="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",vr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",dF=/^#([0-9a-f]{3,8})$/,fF=new RegExp(`^rgb\\(${Da},${Da},${Da}\\)$`),hF=new RegExp(`^rgb\\(${vr},${vr},${vr}\\)$`),pF=new RegExp(`^rgba\\(${Da},${Da},${Da},${Ns}\\)$`),mF=new RegExp(`^rgba\\(${vr},${vr},${vr},${Ns}\\)$`),gF=new RegExp(`^hsl\\(${Ns},${vr},${vr}\\)$`),vF=new RegExp(`^hsla\\(${Ns},${vr},${vr},${Ns}\\)$`),v1={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};td(bo,Ls,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:y1,formatHex:y1,formatHex8:yF,formatHsl:bF,formatRgb:b1,toString:b1});function y1(){return this.rgb().formatHex()}function yF(){return this.rgb().formatHex8()}function bF(){return Uw(this).formatHsl()}function b1(){return this.rgb().formatRgb()}function Ls(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=dF.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?x1(t):n===3?new vn(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Nc(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Nc(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=fF.exec(e))?new vn(t[1],t[2],t[3],1):(t=hF.exec(e))?new vn(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=pF.exec(e))?Nc(t[1],t[2],t[3],t[4]):(t=mF.exec(e))?Nc(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=gF.exec(e))?C1(t[1],t[2]/100,t[3]/100,1):(t=vF.exec(e))?C1(t[1],t[2]/100,t[3]/100,t[4]):v1.hasOwnProperty(e)?x1(v1[e]):e==="transparent"?new vn(NaN,NaN,NaN,0):null}function x1(e){return new vn(e>>16&255,e>>8&255,e&255,1)}function Nc(e,t,n,r){return r<=0&&(e=t=n=NaN),new vn(e,t,n,r)}function Bw(e){return e instanceof bo||(e=Ls(e)),e?(e=e.rgb(),new vn(e.r,e.g,e.b,e.opacity)):new vn}function Xa(e,t,n,r){return arguments.length===1?Bw(e):new vn(e,t,n,r??1)}function vn(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}td(vn,Xa,Gm(bo,{brighter(e){return e=e==null?Ka:Math.pow(Ka,e),new vn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?ta:Math.pow(ta,e),new vn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new vn(Hi(this.r),Hi(this.g),Hi(this.b),Ul(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:_1,formatHex:_1,formatHex8:xF,formatRgb:w1,toString:w1}));function _1(){return`#${Di(this.r)}${Di(this.g)}${Di(this.b)}`}function xF(){return`#${Di(this.r)}${Di(this.g)}${Di(this.b)}${Di((isNaN(this.opacity)?1:this.opacity)*255)}`}function w1(){const e=Ul(this.opacity);return`${e===1?"rgb(":"rgba("}${Hi(this.r)}, ${Hi(this.g)}, ${Hi(this.b)}${e===1?")":`, ${e})`}`}function Ul(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Hi(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Di(e){return e=Hi(e),(e<16?"0":"")+e.toString(16)}function C1(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new rr(e,t,n,r)}function Uw(e){if(e instanceof rr)return new rr(e.h,e.s,e.l,e.opacity);if(e instanceof bo||(e=Ls(e)),!e)return new rr;if(e instanceof rr)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(t===a?o=(n-r)/s+(n<r)*6:n===a?o=(r-t)/s+2:o=(t-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new rr(o,s,c,e.opacity)}function _F(e,t,n,r){return arguments.length===1?Uw(e):new rr(e,t,n,r??1)}function rr(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}td(rr,_F,Gm(bo,{brighter(e){return e=e==null?Ka:Math.pow(Ka,e),new rr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?ta:Math.pow(ta,e),new rr(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,i=2*n-r;return new vn(Of(e>=240?e-240:e+120,i,r),Of(e,i,r),Of(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new rr(T1(this.h),Lc(this.s),Lc(this.l),Ul(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=Ul(this.opacity);return`${e===1?"hsl(":"hsla("}${T1(this.h)}, ${Lc(this.s)*100}%, ${Lc(this.l)*100}%${e===1?")":`, ${e})`}`}}));function T1(e){return e=(e||0)%360,e<0?e+360:e}function Lc(e){return Math.max(0,Math.min(1,e||0))}function Of(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 wF=Math.PI/180,CF=180/Math.PI;var Ww=-.14861,Zm=1.78277,Km=-.29227,nd=-.90649,Fs=1.97294,k1=Fs*nd,S1=Fs*Zm,O1=Zm*Km-nd*Ww;function TF(e){if(e instanceof Vi)return new Vi(e.h,e.s,e.l,e.opacity);e instanceof vn||(e=Bw(e));var t=e.r/255,n=e.g/255,r=e.b/255,i=(O1*r+k1*t-S1*n)/(O1+k1-S1),a=r-i,o=(Fs*(n-i)-Km*a)/nd,s=Math.sqrt(o*o+a*a)/(Fs*i*(1-i)),c=s?Math.atan2(o,a)*CF-120:NaN;return new Vi(c<0?c+360:c,s,i,e.opacity)}function wr(e,t,n,r){return arguments.length===1?TF(e):new Vi(e,t,n,r??1)}function Vi(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}td(Vi,wr,Gm(bo,{brighter(e){return e=e==null?Ka:Math.pow(Ka,e),new Vi(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?ta:Math.pow(ta,e),new Vi(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*wF,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),i=Math.sin(e);return new vn(255*(t+n*(Ww*r+Zm*i)),255*(t+n*(Km*r+nd*i)),255*(t+n*(Fs*r)),this.opacity)}}));function kF(e,t,n,r,i){var a=e*e,o=a*e;return((1-3*e+3*a-o)*t+(4-6*a+3*o)*n+(1+3*e+3*a-3*o)*r+o*i)/6}function SF(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),i=e[r],a=e[r+1],o=r>0?e[r-1]:2*i-a,s=r<t-1?e[r+2]:2*a-i;return kF((n-r/t)*t,o,i,a,s)}}const rd=e=>()=>e;function zw(e,t){return function(n){return e+n*t}}function OF(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 EF(e,t){var n=t-e;return n?zw(e,n>180||n<-180?n-360*Math.round(n/360):n):rd(isNaN(e)?t:e)}function MF(e){return(e=+e)==1?Na:function(t,n){return n-t?OF(t,n,e):rd(isNaN(t)?n:t)}}function Na(e,t){var n=t-e;return n?zw(e,n):rd(isNaN(e)?t:e)}const E1=function e(t){var n=MF(t);function r(i,a){var o=n((i=Xa(i)).r,(a=Xa(a)).r),s=n(i.g,a.g),c=n(i.b,a.b),l=Na(i.opacity,a.opacity);return function(u){return i.r=o(u),i.g=s(u),i.b=c(u),i.opacity=l(u),i+""}}return r.gamma=e,r}(1);function $F(e){return function(t){var n=t.length,r=new Array(n),i=new Array(n),a=new Array(n),o,s;for(o=0;o<n;++o)s=Xa(t[o]),r[o]=s.r||0,i[o]=s.g||0,a[o]=s.b||0;return r=e(r),i=e(i),a=e(a),s.opacity=1,function(c){return s.r=r(c),s.g=i(c),s.b=a(c),s+""}}}var AF=$F(SF);function RF(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=e[i]*(1-a)+t[i]*a;return r}}function jF(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function PF(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),a=new Array(n),o;for(o=0;o<r;++o)i[o]=Xm(e[o],t[o]);for(;o<n;++o)a[o]=t[o];return function(s){for(o=0;o<r;++o)a[o]=i[o](s);return a}}function IF(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Wl(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function DF(e,t){var n={},r={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=Xm(e[i],t[i]):r[i]=t[i];return function(a){for(i in n)r[i]=n[i](a);return r}}var Hh=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Ef=new RegExp(Hh.source,"g");function NF(e){return function(){return e}}function LF(e){return function(t){return e(t)+""}}function Hw(e,t){var n=Hh.lastIndex=Ef.lastIndex=0,r,i,a,o=-1,s=[],c=[];for(e=e+"",t=t+"";(r=Hh.exec(e))&&(i=Ef.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,c.push({i:o,x:Wl(r,i)})),n=Ef.lastIndex;return n<t.length&&(a=t.slice(n),s[o]?s[o]+=a:s[++o]=a),s.length<2?c[0]?LF(c[0].x):NF(t):(t=c.length,function(l){for(var u=0,d;u<t;++u)s[(d=c[u]).i]=d.x(l);return s.join("")})}function Xm(e,t){var n=typeof t,r;return t==null||n==="boolean"?rd(t):(n==="number"?Wl:n==="string"?(r=Ls(t))?(t=r,E1):Hw:t instanceof Ls?E1:t instanceof Date?IF:jF(t)?RF:Array.isArray(t)?PF:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?DF:Wl)(e,t)}function FF(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function Vw(e){return function t(n){n=+n;function r(i,a){var o=e((i=wr(i)).h,(a=wr(a)).h),s=Na(i.s,a.s),c=Na(i.l,a.l),l=Na(i.opacity,a.opacity);return function(u){return i.h=o(u),i.s=s(u),i.l=c(Math.pow(u,n)),i.opacity=l(u),i+""}}return r.gamma=t,r}(1)}Vw(EF);var Qm=Vw(Na),BF=Gr,UF=Pn,WF=Qn,zF="[object String]";function HF(e){return typeof e=="string"||!UF(e)&&WF(e)&&BF(e)==zF}var VF=HF;const qF=Ht(VF);function YF(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var qw=YF;const $e=Ht(qw);function ol(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function GF(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Jm(e){let t,n,r;e.length!==2?(t=ol,n=(s,c)=>ol(e(s),c),r=(s,c)=>e(s)-c):(t=e===ol||e===GF?e:ZF,n=e,r=e);function i(s,c,l=0,u=s.length){if(l<u){if(t(c,c)!==0)return u;do{const d=l+u>>>1;n(s[d],c)<0?l=d+1:u=d}while(l<u)}return l}function a(s,c,l=0,u=s.length){if(l<u){if(t(c,c)!==0)return u;do{const d=l+u>>>1;n(s[d],c)<=0?l=d+1:u=d}while(l<u)}return l}function o(s,c,l=0,u=s.length){const d=i(s,c,l,u-1);return d>l&&r(s[d-1],c)>-r(s[d],c)?d-1:d}return{left:i,center:o,right:a}}function ZF(){return 0}function KF(e){return e===null?NaN:+e}const XF=Jm(ol),QF=XF.right;Jm(KF).center;class M1 extends Map{constructor(t,n=tB){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get($1(this,t))}has(t){return super.has($1(this,t))}set(t,n){return super.set(JF(this,t),n)}delete(t){return super.delete(eB(this,t))}}function $1({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function JF({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function eB({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function tB(e){return e!==null&&typeof e=="object"?e.valueOf():e}const nB=Math.sqrt(50),rB=Math.sqrt(10),iB=Math.sqrt(2);function zl(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/Math.pow(10,i),o=a>=nB?10:a>=rB?5:a>=iB?2:1;let s,c,l;return i<0?(l=Math.pow(10,-i)/o,s=Math.round(e*l),c=Math.round(t*l),s/l<e&&++s,c/l>t&&--c,l=-l):(l=Math.pow(10,i)*o,s=Math.round(e/l),c=Math.round(t/l),s*l<e&&++s,c*l>t&&--c),c<s&&.5<=n&&n<2?zl(e,t,n*2):[s,c,l]}function Vh(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[i,a,o]=r?zl(t,e,n):zl(e,t,n);if(!(a>=i))return[];const s=a-i+1,c=new Array(s);if(r)if(o<0)for(let l=0;l<s;++l)c[l]=(a-l)/-o;else for(let l=0;l<s;++l)c[l]=(a-l)*o;else if(o<0)for(let l=0;l<s;++l)c[l]=(i+l)/-o;else for(let l=0;l<s;++l)c[l]=(i+l)*o;return c}function qh(e,t,n){return t=+t,e=+e,n=+n,zl(e,t,n)[2]}function Yh(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?qh(t,e,n):qh(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function aB(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,a=new Array(i);++r<i;)a[r]=e+r*n;return a}function ua(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}const A1=Symbol("implicit");function Ni(){var e=new M1,t=[],n=[],r=A1;function i(a){let o=e.get(a);if(o===void 0){if(r!==A1)return r;e.set(a,o=t.push(a)-1)}return n[o%n.length]}return i.domain=function(a){if(!arguments.length)return t.slice();t=[],e=new M1;for(const o of a)e.has(o)||e.set(o,t.push(o)-1);return i},i.range=function(a){return arguments.length?(n=Array.from(a),i):n.slice()},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return Ni(t,n).unknown(r)},ua.apply(i,arguments),i}function eg(){var e=Ni().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,a,o,s=!1,c=0,l=0,u=.5;delete e.unknown;function d(){var f=t().length,h=i<r,g=h?i:r,p=h?r:i;a=(p-g)/Math.max(1,f-c+l*2),s&&(a=Math.floor(a)),g+=(p-g-a*(f-c))*u,o=a*(1-c),s&&(g=Math.round(g),o=Math.round(o));var v=aB(f).map(function(_){return g+a*_});return n(h?v.reverse():v)}return e.domain=function(f){return arguments.length?(t(f),d()):t()},e.range=function(f){return arguments.length?([r,i]=f,r=+r,i=+i,d()):[r,i]},e.rangeRound=function(f){return[r,i]=f,r=+r,i=+i,s=!0,d()},e.bandwidth=function(){return o},e.step=function(){return a},e.round=function(f){return arguments.length?(s=!!f,d()):s},e.padding=function(f){return arguments.length?(c=Math.min(1,l=+f),d()):c},e.paddingInner=function(f){return arguments.length?(c=Math.min(1,f),d()):c},e.paddingOuter=function(f){return arguments.length?(l=+f,d()):l},e.align=function(f){return arguments.length?(u=Math.max(0,Math.min(1,f)),d()):u},e.copy=function(){return eg(t(),[r,i]).round(s).paddingInner(c).paddingOuter(l).align(u)},ua.apply(d(),arguments)}function Yw(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return Yw(t())},e}function oB(){return Yw(eg.apply(null,arguments).paddingInner(1))}function sB(e){return function(){return e}}function cB(e){return+e}var R1=[0,1];function Ma(e){return e}function Gh(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:sB(isNaN(t)?NaN:.5)}function lB(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function uB(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i<r?(r=Gh(i,r),a=n(o,a)):(r=Gh(r,i),a=n(a,o)),function(s){return a(r(s))}}function dB(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),a=new Array(r),o=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<r;)i[o]=Gh(e[o],e[o+1]),a[o]=n(t[o],t[o+1]);return function(s){var c=QF(e,s,1,r)-1;return a[c](i[c](s))}}function id(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function tg(){var e=R1,t=R1,n=Xm,r,i,a,o=Ma,s,c,l;function u(){var f=Math.min(e.length,t.length);return o!==Ma&&(o=lB(e[0],e[f-1])),s=f>2?dB:uB,c=l=null,d}function d(f){return f==null||isNaN(f=+f)?a:(c||(c=s(e.map(r),t,n)))(r(o(f)))}return d.invert=function(f){return o(i((l||(l=s(t,e.map(r),Wl)))(f)))},d.domain=function(f){return arguments.length?(e=Array.from(f,cB),u()):e.slice()},d.range=function(f){return arguments.length?(t=Array.from(f),u()):t.slice()},d.rangeRound=function(f){return t=Array.from(f),n=FF,u()},d.clamp=function(f){return arguments.length?(o=f?!0:Ma,u()):o!==Ma},d.interpolate=function(f){return arguments.length?(n=f,u()):n},d.unknown=function(f){return arguments.length?(a=f,d):a},function(f,h){return r=f,i=h,u()}}function Gw(){return tg()(Ma,Ma)}function fB(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Hl(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 Qa(e){return e=Hl(Math.abs(e)),e?e[1]:NaN}function hB(e,t){return function(n,r){for(var i=n.length,a=[],o=0,s=e[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),a.push(n.substring(i-=s,i+s)),!((c+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function pB(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var mB=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Bs(e){if(!(t=mB.exec(e)))throw new Error("invalid format: "+e);var t;return new ng({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]})}Bs.prototype=ng.prototype;function ng(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+""}ng.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 gB(e){e:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var Zw;function vB(e,t){var n=Hl(e,t);if(!n)return e+"";var r=n[0],i=n[1],a=i-(Zw=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+Hl(e,Math.max(0,t+a-1))[0]}function j1(e,t){var n=Hl(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const P1={"%":function(e,t){return(e*100).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:fB,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 j1(e*100,t)},r:j1,s:vB,X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function I1(e){return e}var D1=Array.prototype.map,N1=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function yB(e){var t=e.grouping===void 0||e.thousands===void 0?I1:hB(D1.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?I1:pB(D1.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"-":e.minus+"",c=e.nan===void 0?"NaN":e.nan+"";function l(d){d=Bs(d);var f=d.fill,h=d.align,g=d.sign,p=d.symbol,v=d.zero,_=d.width,w=d.comma,x=d.precision,T=d.trim,b=d.type;b==="n"?(w=!0,b="g"):P1[b]||(x===void 0&&(x=12),T=!0,b="g"),(v||f==="0"&&h==="=")&&(v=!0,f="0",h="=");var k=p==="$"?n:p==="#"&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",j=p==="$"?r:/[%p]/.test(b)?o:"",S=P1[b],O=/[defgprs%]/.test(b);x=x===void 0?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,x)):Math.max(0,Math.min(20,x));function E(C){var M=k,$=j,A,P,N;if(b==="c")$=S(C)+$,C="";else{C=+C;var F=C<0||1/C<0;if(C=isNaN(C)?c:S(Math.abs(C),x),T&&(C=gB(C)),F&&+C==0&&g!=="+"&&(F=!1),M=(F?g==="("?g:s:g==="-"||g==="("?"":g)+M,$=(b==="s"?N1[8+Zw/3]:"")+$+(F&&g==="("?")":""),O){for(A=-1,P=C.length;++A<P;)if(N=C.charCodeAt(A),48>N||N>57){$=(N===46?i+C.slice(A+1):C.slice(A))+$,C=C.slice(0,A);break}}}w&&!v&&(C=t(C,1/0));var z=M.length+C.length+$.length,q=z<_?new Array(_-z+1).join(f):"";switch(w&&v&&(C=t(q+C,q.length?_-$.length:1/0),q=""),h){case"<":C=M+C+$+q;break;case"=":C=M+q+C+$;break;case"^":C=q.slice(0,z=q.length>>1)+M+C+$+q.slice(z);break;default:C=q+M+C+$;break}return a(C)}return E.toString=function(){return d+""},E}function u(d,f){var h=l((d=Bs(d),d.type="f",d)),g=Math.max(-8,Math.min(8,Math.floor(Qa(f)/3)))*3,p=Math.pow(10,-g),v=N1[8+g/3];return function(_){return h(p*_)+v}}return{format:l,formatPrefix:u}}var Fc,fc,Kw;bB({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function bB(e){return Fc=yB(e),fc=Fc.format,Kw=Fc.formatPrefix,Fc}function xB(e){return Math.max(0,-Qa(Math.abs(e)))}function _B(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Qa(t)/3)))*3-Qa(Math.abs(e)))}function wB(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Qa(t)-Qa(e))+1}function CB(e,t,n,r){var i=Yh(e,t,n),a;switch(r=Bs(r??",f"),r.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=_B(i,o))&&(r.precision=a),Kw(r,o)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(a=wB(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(a=xB(i))&&(r.precision=a-(r.type==="%")*2);break}}return fc(r)}function Xw(e){var t=e.domain;return e.ticks=function(n){var r=t();return Vh(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return CB(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,a=r.length-1,o=r[i],s=r[a],c,l,u=10;for(s<o&&(l=o,o=s,s=l,l=i,i=a,a=l);u-- >0;){if(l=qh(o,s,n),l===c)return r[i]=o,r[a]=s,t(r);if(l>0)o=Math.floor(o/l)*l,s=Math.ceil(s/l)*l;else if(l<0)o=Math.ceil(o*l)/l,s=Math.floor(s*l)/l;else break;c=l}return e},e}function Qw(){var e=Gw();return e.copy=function(){return id(e,Qw())},ua.apply(e,arguments),Xw(e)}function Jw(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],a=e[r],o;return a<i&&(o=n,n=r,r=o,o=i,i=a,a=o),e[n]=t.floor(i),e[r]=t.ceil(a),e}function L1(e){return Math.log(e)}function F1(e){return Math.exp(e)}function TB(e){return-Math.log(-e)}function kB(e){return-Math.exp(-e)}function SB(e){return isFinite(e)?+("1e"+e):e<0?0:e}function OB(e){return e===10?SB:e===Math.E?Math.exp:t=>Math.pow(e,t)}function EB(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function B1(e){return(t,n)=>-e(-t,n)}function MB(e){const t=e(L1,F1),n=t.domain;let r=10,i,a;function o(){return i=EB(r),a=OB(r),n()[0]<0?(i=B1(i),a=B1(a),e(TB,kB)):e(L1,F1),t}return t.base=function(s){return arguments.length?(r=+s,o()):r},t.domain=function(s){return arguments.length?(n(s),o()):n()},t.ticks=s=>{const c=n();let l=c[0],u=c[c.length-1];const d=u<l;d&&([l,u]=[u,l]);let f=i(l),h=i(u),g,p;const v=s==null?10:+s;let _=[];if(!(r%1)&&h-f<v){if(f=Math.floor(f),h=Math.ceil(h),l>0){for(;f<=h;++f)for(g=1;g<r;++g)if(p=f<0?g/a(-f):g*a(f),!(p<l)){if(p>u)break;_.push(p)}}else for(;f<=h;++f)for(g=r-1;g>=1;--g)if(p=f>0?g/a(-f):g*a(f),!(p<l)){if(p>u)break;_.push(p)}_.length*2<v&&(_=Vh(l,u,v))}else _=Vh(f,h,Math.min(h-f,v)).map(a);return d?_.reverse():_},t.tickFormat=(s,c)=>{if(s==null&&(s=10),c==null&&(c=r===10?"s":","),typeof c!="function"&&(!(r%1)&&(c=Bs(c)).precision==null&&(c.trim=!0),c=fc(c)),s===1/0)return c;const l=Math.max(1,r*s/t.ticks().length);return u=>{let d=u/a(Math.round(i(u)));return d*r<r-.5&&(d*=r),d<=l?c(u):""}},t.nice=()=>n(Jw(n(),{floor:s=>a(Math.floor(i(s))),ceil:s=>a(Math.ceil(i(s)))})),t}function e4(){const e=MB(tg()).domain([1,10]);return e.copy=()=>id(e,e4()).base(e.base()),ua.apply(e,arguments),e}function U1(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function W1(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function $B(e){var t=1,n=e(U1(t),W1(t));return n.constant=function(r){return arguments.length?e(U1(t=+r),W1(t)):t},Xw(n)}function t4(){var e=$B(tg());return e.copy=function(){return id(e,t4()).constant(e.constant())},ua.apply(e,arguments)}const Mf=new Date,$f=new Date;function nn(e,t,n,r){function i(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(e(a=new Date(+a)),a),i.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),i.round=a=>{const o=i(a),s=i.ceil(a);return a-o<s-a?o:s},i.offset=(a,o)=>(t(a=new Date(+a),o==null?1:Math.floor(o)),a),i.range=(a,o,s)=>{const c=[];if(a=i.ceil(a),s=s==null?1:Math.floor(s),!(a<o)||!(s>0))return c;let l;do c.push(l=new Date(+a)),t(a,s),e(a);while(l<a&&a<o);return c},i.filter=a=>nn(o=>{if(o>=o)for(;e(o),!a(o);)o.setTime(o-1)},(o,s)=>{if(o>=o)if(s<0)for(;++s<=0;)for(;t(o,-1),!a(o););else for(;--s>=0;)for(;t(o,1),!a(o););}),n&&(i.count=(a,o)=>(Mf.setTime(+a),$f.setTime(+o),e(Mf),e($f),Math.floor(n(Mf,$f))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(r?o=>r(o)%a===0:o=>i.count(0,o)%a===0):i)),i}const Vl=nn(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Vl.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?nn(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Vl);Vl.range;const Fr=1e3,Vn=Fr*60,Br=Vn*60,qr=Br*24,rg=qr*7,z1=qr*30,Af=qr*365,Li=nn(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Fr)},(e,t)=>(t-e)/Fr,e=>e.getUTCSeconds());Li.range;const ig=nn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Fr)},(e,t)=>{e.setTime(+e+t*Vn)},(e,t)=>(t-e)/Vn,e=>e.getMinutes());ig.range;const ag=nn(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Vn)},(e,t)=>(t-e)/Vn,e=>e.getUTCMinutes());ag.range;const og=nn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Fr-e.getMinutes()*Vn)},(e,t)=>{e.setTime(+e+t*Br)},(e,t)=>(t-e)/Br,e=>e.getHours());og.range;const sg=nn(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Br)},(e,t)=>(t-e)/Br,e=>e.getUTCHours());sg.range;const cg=nn(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Vn)/qr,e=>e.getDate()-1);cg.range;const n4=nn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/qr,e=>e.getUTCDate()-1);n4.range;const r4=nn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/qr,e=>Math.floor(e/qr));r4.range;function da(e){return nn(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Vn)/rg)}const lg=da(0),AB=da(1),RB=da(2),jB=da(3),PB=da(4),IB=da(5),DB=da(6);lg.range;AB.range;RB.range;jB.range;PB.range;IB.range;DB.range;function fa(e){return nn(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/rg)}const ug=fa(0),NB=fa(1),LB=fa(2),FB=fa(3),BB=fa(4),UB=fa(5),WB=fa(6);ug.range;NB.range;LB.range;FB.range;BB.range;UB.range;WB.range;const dg=nn(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());dg.range;const fg=nn(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());fg.range;const ad=nn(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());ad.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:nn(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});ad.range;const od=nn(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());od.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:nn(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});od.range;function i4(e,t,n,r,i,a){const o=[[Li,1,Fr],[Li,5,5*Fr],[Li,15,15*Fr],[Li,30,30*Fr],[a,1,Vn],[a,5,5*Vn],[a,15,15*Vn],[a,30,30*Vn],[i,1,Br],[i,3,3*Br],[i,6,6*Br],[i,12,12*Br],[r,1,qr],[r,2,2*qr],[n,1,rg],[t,1,z1],[t,3,3*z1],[e,1,Af]];function s(l,u,d){const f=u<l;f&&([l,u]=[u,l]);const h=d&&typeof d.range=="function"?d:c(l,u,d),g=h?h.range(l,+u+1):[];return f?g.reverse():g}function c(l,u,d){const f=Math.abs(u-l)/d,h=Jm(([,,v])=>v).right(o,f);if(h===o.length)return e.every(Yh(l/Af,u/Af,d));if(h===0)return Vl.every(Math.max(Yh(l,u,d),1));const[g,p]=o[f/o[h-1][2]<o[h][2]/f?h-1:h];return g.every(p)}return[s,c]}const[zB,HB]=i4(od,fg,ug,r4,sg,ag),[VB,qB]=i4(ad,dg,lg,cg,og,ig);var Rf=new Date,jf=new Date;function en(e,t,n,r){function i(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=function(a){return e(a=new Date(+a)),a},i.ceil=function(a){return e(a=new Date(a-1)),t(a,1),e(a),a},i.round=function(a){var o=i(a),s=i.ceil(a);return a-o<s-a?o:s},i.offset=function(a,o){return t(a=new Date(+a),o==null?1:Math.floor(o)),a},i.range=function(a,o,s){var c=[],l;if(a=i.ceil(a),s=s==null?1:Math.floor(s),!(a<o)||!(s>0))return c;do c.push(l=new Date(+a)),t(a,s),e(a);while(l<a&&a<o);return c},i.filter=function(a){return en(function(o){if(o>=o)for(;e(o),!a(o);)o.setTime(o-1)},function(o,s){if(o>=o)if(s<0)for(;++s<=0;)for(;t(o,-1),!a(o););else for(;--s>=0;)for(;t(o,1),!a(o););})},n&&(i.count=function(a,o){return Rf.setTime(+a),jf.setTime(+o),e(Rf),e(jf),Math.floor(n(Rf,jf))},i.every=function(a){return a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(r?function(o){return r(o)%a===0}:function(o){return i.count(0,o)%a===0}):i}),i}var Us=en(function(){},function(e,t){e.setTime(+e+t)},function(e,t){return t-e});Us.every=function(e){return e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?en(function(t){t.setTime(Math.floor(t/e)*e)},function(t,n){t.setTime(+t+n*e)},function(t,n){return(n-t)/e}):Us};Us.range;var ql=1e3,na=6e4,Yl=36e5,a4=864e5,o4=6048e5,Zh=en(function(e){e.setTime(e-e.getMilliseconds())},function(e,t){e.setTime(+e+t*ql)},function(e,t){return(t-e)/ql},function(e){return e.getUTCSeconds()});Zh.range;var s4=en(function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*ql)},function(e,t){e.setTime(+e+t*na)},function(e,t){return(t-e)/na},function(e){return e.getMinutes()});s4.range;var c4=en(function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*ql-e.getMinutes()*na)},function(e,t){e.setTime(+e+t*Yl)},function(e,t){return(t-e)/Yl},function(e){return e.getHours()});c4.range;var hg=en(function(e){e.setHours(0,0,0,0)},function(e,t){e.setDate(e.getDate()+t)},function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*na)/a4},function(e){return e.getDate()-1});hg.range;function ha(e){return en(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())*na)/o4})}var Gl=ha(0),Ws=ha(1),l4=ha(2),u4=ha(3),ra=ha(4),d4=ha(5),f4=ha(6);Gl.range;Ws.range;l4.range;u4.range;ra.range;d4.range;f4.range;var h4=en(function(e){e.setDate(1),e.setHours(0,0,0,0)},function(e,t){e.setMonth(e.getMonth()+t)},function(e,t){return t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12},function(e){return e.getMonth()});h4.range;var yi=en(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()});yi.every=function(e){return!isFinite(e=Math.floor(e))||!(e>0)?null:en(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)})};yi.range;var p4=en(function(e){e.setUTCSeconds(0,0)},function(e,t){e.setTime(+e+t*na)},function(e,t){return(t-e)/na},function(e){return e.getUTCMinutes()});p4.range;var m4=en(function(e){e.setUTCMinutes(0,0,0)},function(e,t){e.setTime(+e+t*Yl)},function(e,t){return(t-e)/Yl},function(e){return e.getUTCHours()});m4.range;var pg=en(function(e){e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t-e)/a4},function(e){return e.getUTCDate()-1});pg.range;function pa(e){return en(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)/o4})}var Zl=pa(0),zs=pa(1),g4=pa(2),v4=pa(3),ia=pa(4),y4=pa(5),b4=pa(6);Zl.range;zs.range;g4.range;v4.range;ia.range;y4.range;b4.range;var x4=en(function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCMonth(e.getUTCMonth()+t)},function(e,t){return t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12},function(e){return e.getUTCMonth()});x4.range;var bi=en(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()});bi.every=function(e){return!isFinite(e=Math.floor(e))||!(e>0)?null:en(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)})};bi.range;function Pf(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 If(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 Bo(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function YB(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,a=e.days,o=e.shortDays,s=e.months,c=e.shortMonths,l=Uo(i),u=Wo(i),d=Uo(a),f=Wo(a),h=Uo(o),g=Wo(o),p=Uo(s),v=Wo(s),_=Uo(c),w=Wo(c),x={a:F,A:z,b:q,B:W,c:null,d:Z1,e:Z1,f:gU,g:SU,G:EU,H:hU,I:pU,j:mU,L:_4,m:vU,M:yU,p:G,q:ee,Q:Q1,s:J1,S:bU,u:xU,U:_U,V:wU,w:CU,W:TU,x:null,X:null,y:kU,Y:OU,Z:MU,"%":X1},T={a:ie,A:Q,b:X,B:K,c:null,d:K1,e:K1,f:jU,g:zU,G:VU,H:$U,I:AU,j:RU,L:C4,m:PU,M:IU,p:te,q:D,Q:Q1,s:J1,S:DU,u:NU,U:LU,V:FU,w:BU,W:UU,x:null,X:null,y:WU,Y:HU,Z:qU,"%":X1},b={a:E,A:C,b:M,B:$,c:A,d:Y1,e:Y1,f:lU,g:q1,G:V1,H:G1,I:G1,j:aU,L:cU,m:iU,M:oU,p:O,q:rU,Q:dU,s:fU,S:sU,u:QB,U:JB,V:eU,w:XB,W:tU,x:P,X:N,y:q1,Y:V1,Z:nU,"%":uU};x.x=k(n,x),x.X=k(r,x),x.c=k(t,x),T.x=k(n,T),T.X=k(r,T),T.c=k(t,T);function k(I,L){return function(V){var R=[],Z=-1,J=0,ne=I.length,he,be,ge;for(V instanceof Date||(V=new Date(+V));++Z<ne;)I.charCodeAt(Z)===37&&(R.push(I.slice(J,Z)),(be=H1[he=I.charAt(++Z)])!=null?he=I.charAt(++Z):be=he==="e"?" ":"0",(ge=L[he])&&(he=ge(V,be)),R.push(he),J=Z+1);return R.push(I.slice(J,Z)),R.join("")}}function j(I,L){return function(V){var R=Bo(1900,void 0,1),Z=S(R,I,V+="",0),J,ne;if(Z!=V.length)return null;if("Q"in R)return new Date(R.Q);if("s"in R)return new Date(R.s*1e3+("L"in R?R.L:0));if(L&&!("Z"in R)&&(R.Z=0),"p"in R&&(R.H=R.H%12+R.p*12),R.m===void 0&&(R.m="q"in R?R.q:0),"V"in R){if(R.V<1||R.V>53)return null;"w"in R||(R.w=1),"Z"in R?(J=If(Bo(R.y,0,1)),ne=J.getUTCDay(),J=ne>4||ne===0?zs.ceil(J):zs(J),J=pg.offset(J,(R.V-1)*7),R.y=J.getUTCFullYear(),R.m=J.getUTCMonth(),R.d=J.getUTCDate()+(R.w+6)%7):(J=Pf(Bo(R.y,0,1)),ne=J.getDay(),J=ne>4||ne===0?Ws.ceil(J):Ws(J),J=hg.offset(J,(R.V-1)*7),R.y=J.getFullYear(),R.m=J.getMonth(),R.d=J.getDate()+(R.w+6)%7)}else("W"in R||"U"in R)&&("w"in R||(R.w="u"in R?R.u%7:"W"in R?1:0),ne="Z"in R?If(Bo(R.y,0,1)).getUTCDay():Pf(Bo(R.y,0,1)).getDay(),R.m=0,R.d="W"in R?(R.w+6)%7+R.W*7-(ne+5)%7:R.w+R.U*7-(ne+6)%7);return"Z"in R?(R.H+=R.Z/100|0,R.M+=R.Z%100,If(R)):Pf(R)}}function S(I,L,V,R){for(var Z=0,J=L.length,ne=V.length,he,be;Z<J;){if(R>=ne)return-1;if(he=L.charCodeAt(Z++),he===37){if(he=L.charAt(Z++),be=b[he in H1?L.charAt(Z++):he],!be||(R=be(I,V,R))<0)return-1}else if(he!=V.charCodeAt(R++))return-1}return R}function O(I,L,V){var R=l.exec(L.slice(V));return R?(I.p=u.get(R[0].toLowerCase()),V+R[0].length):-1}function E(I,L,V){var R=h.exec(L.slice(V));return R?(I.w=g.get(R[0].toLowerCase()),V+R[0].length):-1}function C(I,L,V){var R=d.exec(L.slice(V));return R?(I.w=f.get(R[0].toLowerCase()),V+R[0].length):-1}function M(I,L,V){var R=_.exec(L.slice(V));return R?(I.m=w.get(R[0].toLowerCase()),V+R[0].length):-1}function $(I,L,V){var R=p.exec(L.slice(V));return R?(I.m=v.get(R[0].toLowerCase()),V+R[0].length):-1}function A(I,L,V){return S(I,t,L,V)}function P(I,L,V){return S(I,n,L,V)}function N(I,L,V){return S(I,r,L,V)}function F(I){return o[I.getDay()]}function z(I){return a[I.getDay()]}function q(I){return c[I.getMonth()]}function W(I){return s[I.getMonth()]}function G(I){return i[+(I.getHours()>=12)]}function ee(I){return 1+~~(I.getMonth()/3)}function ie(I){return o[I.getUTCDay()]}function Q(I){return a[I.getUTCDay()]}function X(I){return c[I.getUTCMonth()]}function K(I){return s[I.getUTCMonth()]}function te(I){return i[+(I.getUTCHours()>=12)]}function D(I){return 1+~~(I.getUTCMonth()/3)}return{format:function(I){var L=k(I+="",x);return L.toString=function(){return I},L},parse:function(I){var L=j(I+="",!1);return L.toString=function(){return I},L},utcFormat:function(I){var L=k(I+="",T);return L.toString=function(){return I},L},utcParse:function(I){var L=j(I+="",!0);return L.toString=function(){return I},L}}}var H1={"-":"",_:" ",0:"0"},cn=/^\s*\d+/,GB=/^%/,ZB=/[\\^$*+?|[\]().{}]/g;function ht(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",a=i.length;return r+(a<n?new Array(n-a+1).join(t)+i:i)}function KB(e){return e.replace(ZB,"\\$&")}function Uo(e){return new RegExp("^(?:"+e.map(KB).join("|")+")","i")}function Wo(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function XB(e,t,n){var r=cn.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function QB(e,t,n){var r=cn.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function JB(e,t,n){var r=cn.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function eU(e,t,n){var r=cn.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function tU(e,t,n){var r=cn.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function V1(e,t,n){var r=cn.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function q1(e,t,n){var r=cn.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function nU(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 rU(e,t,n){var r=cn.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function iU(e,t,n){var r=cn.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Y1(e,t,n){var r=cn.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function aU(e,t,n){var r=cn.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function G1(e,t,n){var r=cn.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function oU(e,t,n){var r=cn.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function sU(e,t,n){var r=cn.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function cU(e,t,n){var r=cn.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function lU(e,t,n){var r=cn.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function uU(e,t,n){var r=GB.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function dU(e,t,n){var r=cn.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function fU(e,t,n){var r=cn.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Z1(e,t){return ht(e.getDate(),t,2)}function hU(e,t){return ht(e.getHours(),t,2)}function pU(e,t){return ht(e.getHours()%12||12,t,2)}function mU(e,t){return ht(1+hg.count(yi(e),e),t,3)}function _4(e,t){return ht(e.getMilliseconds(),t,3)}function gU(e,t){return _4(e,t)+"000"}function vU(e,t){return ht(e.getMonth()+1,t,2)}function yU(e,t){return ht(e.getMinutes(),t,2)}function bU(e,t){return ht(e.getSeconds(),t,2)}function xU(e){var t=e.getDay();return t===0?7:t}function _U(e,t){return ht(Gl.count(yi(e)-1,e),t,2)}function w4(e){var t=e.getDay();return t>=4||t===0?ra(e):ra.ceil(e)}function wU(e,t){return e=w4(e),ht(ra.count(yi(e),e)+(yi(e).getDay()===4),t,2)}function CU(e){return e.getDay()}function TU(e,t){return ht(Ws.count(yi(e)-1,e),t,2)}function kU(e,t){return ht(e.getFullYear()%100,t,2)}function SU(e,t){return e=w4(e),ht(e.getFullYear()%100,t,2)}function OU(e,t){return ht(e.getFullYear()%1e4,t,4)}function EU(e,t){var n=e.getDay();return e=n>=4||n===0?ra(e):ra.ceil(e),ht(e.getFullYear()%1e4,t,4)}function MU(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+ht(t/60|0,"0",2)+ht(t%60,"0",2)}function K1(e,t){return ht(e.getUTCDate(),t,2)}function $U(e,t){return ht(e.getUTCHours(),t,2)}function AU(e,t){return ht(e.getUTCHours()%12||12,t,2)}function RU(e,t){return ht(1+pg.count(bi(e),e),t,3)}function C4(e,t){return ht(e.getUTCMilliseconds(),t,3)}function jU(e,t){return C4(e,t)+"000"}function PU(e,t){return ht(e.getUTCMonth()+1,t,2)}function IU(e,t){return ht(e.getUTCMinutes(),t,2)}function DU(e,t){return ht(e.getUTCSeconds(),t,2)}function NU(e){var t=e.getUTCDay();return t===0?7:t}function LU(e,t){return ht(Zl.count(bi(e)-1,e),t,2)}function T4(e){var t=e.getUTCDay();return t>=4||t===0?ia(e):ia.ceil(e)}function FU(e,t){return e=T4(e),ht(ia.count(bi(e),e)+(bi(e).getUTCDay()===4),t,2)}function BU(e){return e.getUTCDay()}function UU(e,t){return ht(zs.count(bi(e)-1,e),t,2)}function WU(e,t){return ht(e.getUTCFullYear()%100,t,2)}function zU(e,t){return e=T4(e),ht(e.getUTCFullYear()%100,t,2)}function HU(e,t){return ht(e.getUTCFullYear()%1e4,t,4)}function VU(e,t){var n=e.getUTCDay();return e=n>=4||n===0?ia(e):ia.ceil(e),ht(e.getUTCFullYear()%1e4,t,4)}function qU(){return"+0000"}function X1(){return"%"}function Q1(e){return+e}function J1(e){return Math.floor(+e/1e3)}var wa,sd,k4,S4,O4;YU({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 YU(e){return wa=YB(e),sd=wa.format,k4=wa.parse,S4=wa.utcFormat,O4=wa.utcParse,wa}function GU(e){return new Date(e)}function ZU(e){return e instanceof Date?+e:+new Date(+e)}function mg(e,t,n,r,i,a,o,s,c,l){var u=Gw(),d=u.invert,f=u.domain,h=l(".%L"),g=l(":%S"),p=l("%I:%M"),v=l("%I %p"),_=l("%a %d"),w=l("%b %d"),x=l("%B"),T=l("%Y");function b(k){return(c(k)<k?h:s(k)<k?g:o(k)<k?p:a(k)<k?v:r(k)<k?i(k)<k?_:w:n(k)<k?x:T)(k)}return u.invert=function(k){return new Date(d(k))},u.domain=function(k){return arguments.length?f(Array.from(k,ZU)):f().map(GU)},u.ticks=function(k){var j=f();return e(j[0],j[j.length-1],k??10)},u.tickFormat=function(k,j){return j==null?b:l(j)},u.nice=function(k){var j=f();return(!k||typeof k.range!="function")&&(k=t(j[0],j[j.length-1],k??10)),k?f(Jw(j,k)):u},u.copy=function(){return id(u,mg(e,t,n,r,i,a,o,s,c,l))},u}function KU(){return ua.apply(mg(VB,qB,ad,dg,lg,cg,og,ig,Li,sd).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function XU(){return ua.apply(mg(zB,HB,od,fg,ug,n4,sg,ag,Li,S4).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Je(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 E4=Je("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),M4=Je("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),$4=Je("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),A4=Je("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),R4=Je("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),j4=Je("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),P4=Je("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),I4=Je("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),gg=Je("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),QU=Je("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab"),$t=e=>AF(e[e.length-1]);var cd=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(Je);const JU=$t(cd);var ld=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(Je);const eW=$t(ld);var ud=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(Je);const tW=$t(ud);var dd=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(Je);const nW=$t(dd);var fd=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(Je);const rW=$t(fd);var hd=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(Je);const iW=$t(hd);var pd=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(Je);const aW=$t(pd);var md=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(Je);const oW=$t(md);var gd=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(Je);const sW=$t(gd);var vd=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(Je);const cW=$t(vd);var yd=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(Je);const lW=$t(yd);var bd=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(Je);const uW=$t(bd);var xd=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(Je);const dW=$t(xd);var _d=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(Je);const fW=$t(_d);var wd=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(Je);const hW=$t(wd);var Cd=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(Je);const pW=$t(Cd);var Td=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(Je);const mW=$t(Td);var kd=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(Je);const gW=$t(kd);var Sd=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(Je);const vW=$t(Sd);var Od=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(Je);const yW=$t(Od);var Ed=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(Je);const bW=$t(Ed);var Md=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(Je);const xW=$t(Md);var $d=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(Je);const _W=$t($d);var Ad=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(Je);const wW=$t(Ad);var Rd=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(Je);const CW=$t(Rd);var jd=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(Je);const TW=$t(jd);var Pd=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(Je);const kW=$t(Pd);function SW(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 OW=Qm(wr(300,.5,0),wr(-240,.5,1));var EW=Qm(wr(-100,.75,.35),wr(80,1.5,.8)),MW=Qm(wr(260,.75,.35),wr(80,1.5,.8)),Bc=wr();function $W(e){(e<0||e>1)&&(e-=Math.floor(e));var t=Math.abs(e-.5);return Bc.h=360*e-100,Bc.s=1.5-1.5*t,Bc.l=.8-.9*t,Bc+""}var Uc=Xa(),AW=Math.PI/3,RW=Math.PI*2/3;function jW(e){var t;return e=(.5-e)*Math.PI,Uc.r=255*(t=Math.sin(e))*t,Uc.g=255*(t=Math.sin(e+AW))*t,Uc.b=255*(t=Math.sin(e+RW))*t,Uc+""}function PW(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 Id(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}}const IW=Id(Je("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var DW=Id(Je("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),NW=Id(Je("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),LW=Id(Je("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")),FW="__lodash_hash_undefined__";function BW(e){return this.__data__.set(e,FW),this}var UW=BW;function WW(e){return this.__data__.has(e)}var zW=WW,HW=Im,VW=UW,qW=zW;function Kl(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new HW;++t<n;)this.add(e[t])}Kl.prototype.add=Kl.prototype.push=VW;Kl.prototype.has=qW;var vg=Kl;function YW(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a<i;)if(t(e[a],a,e))return a;return-1}var GW=YW;function ZW(e){return e!==e}var KW=ZW;function XW(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}var QW=XW,JW=GW,ez=KW,tz=QW;function nz(e,t,n){return t===t?tz(e,t,n):JW(e,ez,n)}var rz=nz,iz=rz;function az(e,t){var n=e==null?0:e.length;return!!n&&iz(e,t,0)>-1}var D4=az;function oz(e,t,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}var N4=oz;function sz(e,t){return e.has(t)}var yg=sz,cz=vg,lz=D4,uz=N4,dz=ed,fz=mo,hz=yg,pz=200;function mz(e,t,n,r){var i=-1,a=lz,o=!0,s=e.length,c=[],l=t.length;if(!s)return c;n&&(t=dz(t,fz(n))),r?(a=uz,o=!1):t.length>=pz&&(a=hz,o=!1,t=new cz(t));e:for(;++i<s;){var u=e[i],d=n==null?u:n(u);if(u=r||u!==0?u:0,o&&d===d){for(var f=l;f--;)if(t[f]===d)continue e;c.push(u)}else a(t,d,r)||c.push(u)}return c}var gz=mz,vz=gz,yz=Vm,bz=Ow,xz=yz(function(e,t){return bz(e)?vz(e,t):[]}),_z=xz;const L4=Ht(_z);function ot(e){return function(){return e}}const ey=Math.abs,hn=Math.atan2,Oi=Math.cos,wz=Math.max,Df=Math.min,dr=Math.sin,$a=Math.sqrt,mn=1e-12,Hs=Math.PI,Xl=Hs/2,sl=2*Hs;function Cz(e){return e>1?0:e<-1?Hs:Math.acos(e)}function ty(e){return e>=1?Xl:e<=-1?-Xl:Math.asin(e)}const Kh=Math.PI,Xh=2*Kh,Ai=1e-6,Tz=Xh-Ai;function F4(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function kz(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return F4;const n=10**t;return function(r){this._+=r[0];for(let i=1,a=r.length;i<a;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}let Sz=class{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?F4:kz(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,i){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(t,n,r,i,a,o){this._append`C${+t},${+n},${+r},${+i},${this._x1=+a},${this._y1=+o}`}arcTo(t,n,r,i,a){if(t=+t,n=+n,r=+r,i=+i,a=+a,a<0)throw new Error(`negative radius: ${a}`);let o=this._x1,s=this._y1,c=r-t,l=i-n,u=o-t,d=s-n,f=u*u+d*d;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(f>Ai)if(!(Math.abs(d*c-l*u)>Ai)||!a)this._append`L${this._x1=t},${this._y1=n}`;else{let h=r-o,g=i-s,p=c*c+l*l,v=h*h+g*g,_=Math.sqrt(p),w=Math.sqrt(f),x=a*Math.tan((Kh-Math.acos((p+f-v)/(2*_*w)))/2),T=x/w,b=x/_;Math.abs(T-1)>Ai&&this._append`L${t+T*u},${n+T*d}`,this._append`A${a},${a},0,0,${+(d*h>u*g)},${this._x1=t+b*c},${this._y1=n+b*l}`}}arc(t,n,r,i,a,o){if(t=+t,n=+n,r=+r,o=!!o,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(i),c=r*Math.sin(i),l=t+s,u=n+c,d=1^o,f=o?i-a:a-i;this._x1===null?this._append`M${l},${u}`:(Math.abs(this._x1-l)>Ai||Math.abs(this._y1-u)>Ai)&&this._append`L${l},${u}`,r&&(f<0&&(f=f%Xh+Xh),f>Tz?this._append`A${r},${r},0,1,${d},${t-s},${n-c}A${r},${r},0,1,${d},${this._x1=l},${this._y1=u}`:f>Ai&&this._append`A${r},${r},0,${+(f>=Kh)},${d},${this._x1=t+r*Math.cos(a)},${this._y1=n+r*Math.sin(a)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}};function bg(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 Sz(t)}function Oz(e){return e.innerRadius}function Ez(e){return e.outerRadius}function Mz(e){return e.startAngle}function $z(e){return e.endAngle}function Az(e){return e&&e.padAngle}function Rz(e,t,n,r,i,a,o,s){var c=n-e,l=r-t,u=o-i,d=s-a,f=d*c-u*l;if(!(f*f<mn))return f=(u*(t-a)-d*(e-i))/f,[e+f*c,t+f*l]}function Wc(e,t,n,r,i,a,o){var s=e-n,c=t-r,l=(o?a:-a)/$a(s*s+c*c),u=l*c,d=-l*s,f=e+u,h=t+d,g=n+u,p=r+d,v=(f+g)/2,_=(h+p)/2,w=g-f,x=p-h,T=w*w+x*x,b=i-a,k=f*p-g*h,j=(x<0?-1:1)*$a(wz(0,b*b*T-k*k)),S=(k*x-w*j)/T,O=(-k*w-x*j)/T,E=(k*x+w*j)/T,C=(-k*w+x*j)/T,M=S-v,$=O-_,A=E-v,P=C-_;return M*M+$*$>A*A+P*P&&(S=E,O=C),{cx:S,cy:O,x01:-u,y01:-d,x11:S*(i/b-1),y11:O*(i/b-1)}}function jz(){var e=Oz,t=Ez,n=ot(0),r=null,i=Mz,a=$z,o=Az,s=null,c=bg(l);function l(){var u,d,f=+e.apply(this,arguments),h=+t.apply(this,arguments),g=i.apply(this,arguments)-Xl,p=a.apply(this,arguments)-Xl,v=ey(p-g),_=p>g;if(s||(s=u=c()),h<f&&(d=h,h=f,f=d),!(h>mn))s.moveTo(0,0);else if(v>sl-mn)s.moveTo(h*Oi(g),h*dr(g)),s.arc(0,0,h,g,p,!_),f>mn&&(s.moveTo(f*Oi(p),f*dr(p)),s.arc(0,0,f,p,g,_));else{var w=g,x=p,T=g,b=p,k=v,j=v,S=o.apply(this,arguments)/2,O=S>mn&&(r?+r.apply(this,arguments):$a(f*f+h*h)),E=Df(ey(h-f)/2,+n.apply(this,arguments)),C=E,M=E,$,A;if(O>mn){var P=ty(O/f*dr(S)),N=ty(O/h*dr(S));(k-=P*2)>mn?(P*=_?1:-1,T+=P,b-=P):(k=0,T=b=(g+p)/2),(j-=N*2)>mn?(N*=_?1:-1,w+=N,x-=N):(j=0,w=x=(g+p)/2)}var F=h*Oi(w),z=h*dr(w),q=f*Oi(b),W=f*dr(b);if(E>mn){var G=h*Oi(x),ee=h*dr(x),ie=f*Oi(T),Q=f*dr(T),X;if(v<Hs)if(X=Rz(F,z,ie,Q,G,ee,q,W)){var K=F-X[0],te=z-X[1],D=G-X[0],I=ee-X[1],L=1/dr(Cz((K*D+te*I)/($a(K*K+te*te)*$a(D*D+I*I)))/2),V=$a(X[0]*X[0]+X[1]*X[1]);C=Df(E,(f-V)/(L-1)),M=Df(E,(h-V)/(L+1))}else C=M=0}j>mn?M>mn?($=Wc(ie,Q,F,z,h,M,_),A=Wc(G,ee,q,W,h,M,_),s.moveTo($.cx+$.x01,$.cy+$.y01),M<E?s.arc($.cx,$.cy,M,hn($.y01,$.x01),hn(A.y01,A.x01),!_):(s.arc($.cx,$.cy,M,hn($.y01,$.x01),hn($.y11,$.x11),!_),s.arc(0,0,h,hn($.cy+$.y11,$.cx+$.x11),hn(A.cy+A.y11,A.cx+A.x11),!_),s.arc(A.cx,A.cy,M,hn(A.y11,A.x11),hn(A.y01,A.x01),!_))):(s.moveTo(F,z),s.arc(0,0,h,w,x,!_)):s.moveTo(F,z),!(f>mn)||!(k>mn)?s.lineTo(q,W):C>mn?($=Wc(q,W,G,ee,f,-C,_),A=Wc(F,z,ie,Q,f,-C,_),s.lineTo($.cx+$.x01,$.cy+$.y01),C<E?s.arc($.cx,$.cy,C,hn($.y01,$.x01),hn(A.y01,A.x01),!_):(s.arc($.cx,$.cy,C,hn($.y01,$.x01),hn($.y11,$.x11),!_),s.arc(0,0,f,hn($.cy+$.y11,$.cx+$.x11),hn(A.cy+A.y11,A.cx+A.x11),_),s.arc(A.cx,A.cy,C,hn(A.y11,A.x11),hn(A.y01,A.x01),!_))):s.arc(0,0,f,b,T,_)}if(s.closePath(),u)return s=null,u+""||null}return l.centroid=function(){var u=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,d=(+i.apply(this,arguments)+ +a.apply(this,arguments))/2-Hs/2;return[Oi(d)*u,dr(d)*u]},l.innerRadius=function(u){return arguments.length?(e=typeof u=="function"?u:ot(+u),l):e},l.outerRadius=function(u){return arguments.length?(t=typeof u=="function"?u:ot(+u),l):t},l.cornerRadius=function(u){return arguments.length?(n=typeof u=="function"?u:ot(+u),l):n},l.padRadius=function(u){return arguments.length?(r=u==null?null:typeof u=="function"?u:ot(+u),l):r},l.startAngle=function(u){return arguments.length?(i=typeof u=="function"?u:ot(+u),l):i},l.endAngle=function(u){return arguments.length?(a=typeof u=="function"?u:ot(+u),l):a},l.padAngle=function(u){return arguments.length?(o=typeof u=="function"?u:ot(+u),l):o},l.context=function(u){return arguments.length?(s=u??null,l):s},l}function Dd(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function B4(e){this._context=e}B4.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 xg(e){return new B4(e)}function U4(e){return e[0]}function W4(e){return e[1]}function _g(e,t){var n=ot(!0),r=null,i=xg,a=null,o=bg(s);e=typeof e=="function"?e:e===void 0?U4:ot(e),t=typeof t=="function"?t:t===void 0?W4:ot(t);function s(c){var l,u=(c=Dd(c)).length,d,f=!1,h;for(r==null&&(a=i(h=o())),l=0;l<=u;++l)!(l<u&&n(d=c[l],l,c))===f&&((f=!f)?a.lineStart():a.lineEnd()),f&&a.point(+e(d,l,c),+t(d,l,c));if(h)return a=null,h+""||null}return s.x=function(c){return arguments.length?(e=typeof c=="function"?c:ot(+c),s):e},s.y=function(c){return arguments.length?(t=typeof c=="function"?c:ot(+c),s):t},s.defined=function(c){return arguments.length?(n=typeof c=="function"?c:ot(!!c),s):n},s.curve=function(c){return arguments.length?(i=c,r!=null&&(a=i(r)),s):i},s.context=function(c){return arguments.length?(c==null?r=a=null:a=i(r=c),s):r},s}function Pz(e,t,n){var r=null,i=ot(!0),a=null,o=xg,s=null,c=bg(l);e=typeof e=="function"?e:e===void 0?U4:ot(+e),t=typeof t=="function"?t:ot(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?W4:ot(+n);function l(d){var f,h,g,p=(d=Dd(d)).length,v,_=!1,w,x=new Array(p),T=new Array(p);for(a==null&&(s=o(w=c())),f=0;f<=p;++f){if(!(f<p&&i(v=d[f],f,d))===_)if(_=!_)h=f,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),g=f-1;g>=h;--g)s.point(x[g],T[g]);s.lineEnd(),s.areaEnd()}_&&(x[f]=+e(v,f,d),T[f]=+t(v,f,d),s.point(r?+r(v,f,d):x[f],n?+n(v,f,d):T[f]))}if(w)return s=null,w+""||null}function u(){return _g().defined(i).curve(o).context(a)}return l.x=function(d){return arguments.length?(e=typeof d=="function"?d:ot(+d),r=null,l):e},l.x0=function(d){return arguments.length?(e=typeof d=="function"?d:ot(+d),l):e},l.x1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:ot(+d),l):r},l.y=function(d){return arguments.length?(t=typeof d=="function"?d:ot(+d),n=null,l):t},l.y0=function(d){return arguments.length?(t=typeof d=="function"?d:ot(+d),l):t},l.y1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:ot(+d),l):n},l.lineX0=l.lineY0=function(){return u().x(e).y(t)},l.lineY1=function(){return u().x(e).y(n)},l.lineX1=function(){return u().x(r).y(t)},l.defined=function(d){return arguments.length?(i=typeof d=="function"?d:ot(!!d),l):i},l.curve=function(d){return arguments.length?(o=d,a!=null&&(s=o(a)),l):o},l.context=function(d){return arguments.length?(d==null?a=s=null:s=o(a=d),l):a},l}function Iz(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function Dz(e){return e}function Nz(){var e=Dz,t=Iz,n=null,r=ot(0),i=ot(sl),a=ot(0);function o(s){var c,l=(s=Dd(s)).length,u,d,f=0,h=new Array(l),g=new Array(l),p=+r.apply(this,arguments),v=Math.min(sl,Math.max(-sl,i.apply(this,arguments)-p)),_,w=Math.min(Math.abs(v)/l,a.apply(this,arguments)),x=w*(v<0?-1:1),T;for(c=0;c<l;++c)(T=g[h[c]=c]=+e(s[c],c,s))>0&&(f+=T);for(t!=null?h.sort(function(b,k){return t(g[b],g[k])}):n!=null&&h.sort(function(b,k){return n(s[b],s[k])}),c=0,d=f?(v-l*x)/f:0;c<l;++c,p=_)u=h[c],T=g[u],_=p+(T>0?T*d:0)+x,g[u]={data:s[u],index:c,value:T,startAngle:p,endAngle:_,padAngle:w};return g}return o.value=function(s){return arguments.length?(e=typeof s=="function"?s:ot(+s),o):e},o.sortValues=function(s){return arguments.length?(t=s,n=null,o):t},o.sort=function(s){return arguments.length?(n=s,t=null,o):n},o.startAngle=function(s){return arguments.length?(r=typeof s=="function"?s:ot(+s),o):r},o.endAngle=function(s){return arguments.length?(i=typeof s=="function"?s:ot(+s),o):i},o.padAngle=function(s){return arguments.length?(a=typeof s=="function"?s:ot(+s),o):a},o}function xi(){}function Ql(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 Nd(e){this._context=e}Nd.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:Ql(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:Ql(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Lz(e){return new Nd(e)}function z4(e){this._context=e}z4.prototype={areaStart:xi,areaEnd:xi,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:Ql(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Fz(e){return new z4(e)}function H4(e){this._context=e}H4.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:Ql(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Bz(e){return new H4(e)}function V4(e,t){this._basis=new Nd(e),this._beta=t}V4.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],i=t[0],a=e[n]-r,o=t[n]-i,s=-1,c;++s<=n;)c=s/n,this._basis.point(this._beta*e[s]+(1-this._beta)*(r+c*a),this._beta*t[s]+(1-this._beta)*(i+c*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const Uz=function e(t){function n(r){return t===1?new Nd(r):new V4(r,t)}return n.beta=function(r){return e(+r)},n}(.85);function Jl(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 wg(e,t){this._context=e,this._k=(1-t)/6}wg.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:Jl(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:Jl(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 Wz=function e(t){function n(r){return new wg(r,t)}return n.tension=function(r){return e(+r)},n}(0);function Cg(e,t){this._context=e,this._k=(1-t)/6}Cg.prototype={areaStart:xi,areaEnd:xi,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:Jl(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 zz=function e(t){function n(r){return new Cg(r,t)}return n.tension=function(r){return e(+r)},n}(0);function Tg(e,t){this._context=e,this._k=(1-t)/6}Tg.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:Jl(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 Hz=function e(t){function n(r){return new Tg(r,t)}return n.tension=function(r){return e(+r)},n}(0);function kg(e,t,n){var r=e._x1,i=e._y1,a=e._x2,o=e._y2;if(e._l01_a>mn){var s=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*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/c,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/c}if(e._l23_a>mn){var l=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*l+e._x1*e._l23_2a-t*e._l12_2a)/u,o=(o*l+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(r,i,a,o,e._x2,e._y2)}function q4(e,t){this._context=e,this._alpha=t}q4.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:kg(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 Vz=function e(t){function n(r){return t?new q4(r,t):new wg(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function Y4(e,t){this._context=e,this._alpha=t}Y4.prototype={areaStart:xi,areaEnd:xi,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:kg(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 qz=function e(t){function n(r){return t?new Y4(r,t):new Cg(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function G4(e,t){this._context=e,this._alpha=t}G4.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:kg(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 Yz=function e(t){function n(r){return t?new G4(r,t):new Tg(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function Z4(e){this._context=e}Z4.prototype={areaStart:xi,areaEnd:xi,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 Gz(e){return new Z4(e)}function ny(e){return e<0?-1:1}function ry(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(ny(a)+ny(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function iy(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Nf(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function eu(e){this._context=e}eu.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:Nf(this,this._t0,iy(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,Nf(this,iy(this,n=ry(this,e,t)),n);break;default:Nf(this,this._t0,n=ry(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function K4(e){this._context=new X4(e)}(K4.prototype=Object.create(eu.prototype)).point=function(e,t){eu.prototype.point.call(this,t,e)};function X4(e){this._context=e}X4.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,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function Zz(e){return new eu(e)}function Kz(e){return new K4(e)}function Q4(e){this._context=e}Q4.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=ay(e),i=ay(t),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[o],t[o]);(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 ay(e){var t,n=e.length-1,r,i=new Array(n),a=new Array(n),o=new Array(n);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,a[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/a[t-1],a[t]-=r,o[t]-=r*o[t-1];for(i[n-1]=o[n-1]/a[n-1],t=n-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function Xz(e){return new Q4(e)}function Ld(e,t){this._context=e,this._t=t}Ld.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 Qz(e){return new Ld(e,.5)}function Jz(e){return new Ld(e,0)}function eH(e){return new Ld(e,1)}function oy(e,t){if((o=e.length)>1)for(var n=1,r,i,a=e[t[0]],o,s=a.length;n<o;++n)for(i=a,a=e[t[n]],r=0;r<s;++r)a[r][1]+=a[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function sy(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function tH(e,t){return e[t]}function nH(e){const t=[];return t.key=e,t}function rH(){var e=ot([]),t=sy,n=oy,r=tH;function i(a){var o=Array.from(e.apply(this,arguments),nH),s,c=o.length,l=-1,u;for(const d of a)for(s=0,++l;s<c;++s)(o[s][l]=[0,+r(d,o[s].key,l,a)]).data=d;for(s=0,u=Dd(t(o));s<c;++s)o[u[s]].index=s;return n(o,u),o}return i.keys=function(a){return arguments.length?(e=typeof a=="function"?a:ot(Array.from(a)),i):e},i.value=function(a){return arguments.length?(r=typeof a=="function"?a:ot(+a),i):r},i.order=function(a){return arguments.length?(t=a==null?sy:typeof a=="function"?a:ot(Array.from(a)),i):t},i.offset=function(a){return arguments.length?(n=a??oy,i):n},i}function iH(e,t){if((c=e.length)>0)for(var n,r=0,i,a,o,s,c,l=e[t[0]].length;r<l;++r)for(o=s=0,n=0;n<c;++n)(a=(i=e[t[n]][r])[1]-i[0])>0?(i[0]=o,i[1]=o+=a):a<0?(i[1]=s,i[0]=s+=a):(i[0]=0,i[1]=a)}var aH=dc,oH=Fw,sH=vo;function cH(e,t,n){for(var r=-1,i=t.length,a={};++r<i;){var o=t[r],s=aH(e,o);n(s,o)&&oH(a,sH(o,e),s)}return a}var lH=cH;function uH(e,t){return e!=null&&t in Object(e)}var dH=uH,fH=vo,hH=Gu,pH=Pn,mH=Xu,gH=Bm,vH=yo;function yH(e,t,n){t=fH(t,e);for(var r=-1,i=t.length,a=!1;++r<i;){var o=vH(t[r]);if(!(a=e!=null&&n(e,o)))break;e=e[o]}return a||++r!=i?a:(i=e==null?0:e.length,!!i&&gH(i)&&mH(o,i)&&(pH(e)||hH(e)))}var bH=yH,xH=dH,_H=bH;function wH(e,t){return e!=null&&_H(e,t,xH)}var J4=wH,CH=lH,TH=J4;function kH(e,t){return CH(e,t,function(n,r){return TH(e,r)})}var SH=kH;function OH(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var Sg=OH,cy=lo,EH=Gu,MH=Pn,ly=cy?cy.isConcatSpreadable:void 0;function $H(e){return MH(e)||EH(e)||!!(ly&&e&&e[ly])}var AH=$H,RH=Sg,jH=AH;function e3(e,t,n,r,i){var a=-1,o=e.length;for(n||(n=jH),i||(i=[]);++a<o;){var s=e[a];t>0&&n(s)?t>1?e3(s,t-1,n,r,i):RH(i,s):r||(i[i.length]=s)}return i}var t3=e3,PH=t3;function IH(e){var t=e==null?0:e.length;return t?PH(e,1):[]}var DH=IH,NH=DH,LH=Rw,FH=jw;function BH(e){return FH(LH(e,void 0,NH),e+"")}var n3=BH,UH=SH,WH=n3,zH=WH(function(e,t){return e==null?{}:UH(e,t)}),HH=zH;const VH=Ht(HH);function qH(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 YH=qH,GH=vg,ZH=YH,KH=yg,XH=1,QH=2;function JH(e,t,n,r,i,a){var o=n&XH,s=e.length,c=t.length;if(s!=c&&!(o&&c>s))return!1;var l=a.get(e),u=a.get(t);if(l&&u)return l==t&&u==e;var d=-1,f=!0,h=n&QH?new GH:void 0;for(a.set(e,t),a.set(t,e);++d<s;){var g=e[d],p=t[d];if(r)var v=o?r(p,g,d,t,e,a):r(g,p,d,e,t,a);if(v!==void 0){if(v)continue;f=!1;break}if(h){if(!ZH(t,function(_,w){if(!KH(h,w)&&(g===_||i(g,_,n,r,a)))return h.push(w)})){f=!1;break}}else if(!(g===p||i(g,p,n,r,a))){f=!1;break}}return a.delete(e),a.delete(t),f}var r3=JH;function eV(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}var tV=eV;function nV(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var Og=nV,uy=lo,dy=_w,rV=lc,iV=r3,aV=tV,oV=Og,sV=1,cV=2,lV="[object Boolean]",uV="[object Date]",dV="[object Error]",fV="[object Map]",hV="[object Number]",pV="[object RegExp]",mV="[object Set]",gV="[object String]",vV="[object Symbol]",yV="[object ArrayBuffer]",bV="[object DataView]",fy=uy?uy.prototype:void 0,Lf=fy?fy.valueOf:void 0;function xV(e,t,n,r,i,a,o){switch(n){case bV:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case yV:return!(e.byteLength!=t.byteLength||!a(new dy(e),new dy(t)));case lV:case uV:case hV:return rV(+e,+t);case dV:return e.name==t.name&&e.message==t.message;case pV:case gV:return e==t+"";case fV:var s=aV;case mV:var c=r&sV;if(s||(s=oV),e.size!=t.size&&!c)return!1;var l=o.get(e);if(l)return l==t;r|=cV,o.set(e,t);var u=iV(s(e),s(t),r,i,a,o);return o.delete(e),u;case vV:if(Lf)return Lf.call(e)==Lf.call(t)}return!1}var _V=xV,wV=Sg,CV=Pn;function TV(e,t,n){var r=t(e);return CV(e)?r:wV(r,n(e))}var i3=TV;function kV(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}var a3=kV;function SV(){return[]}var o3=SV,OV=a3,EV=o3,MV=Object.prototype,$V=MV.propertyIsEnumerable,hy=Object.getOwnPropertySymbols,AV=hy?function(e){return e==null?[]:(e=Object(e),OV(hy(e),function(t){return $V.call(e,t)}))}:EV,Eg=AV,RV=Tw,jV=RV(Object.keys,Object),PV=jV,IV=Fm,DV=PV,NV=Object.prototype,LV=NV.hasOwnProperty;function FV(e){if(!IV(e))return DV(e);var t=[];for(var n in Object(e))LV.call(e,n)&&n!="constructor"&&t.push(n);return t}var BV=FV,UV=$w,WV=BV,zV=po;function HV(e){return zV(e)?UV(e):WV(e)}var hc=HV,VV=i3,qV=Eg,YV=hc;function GV(e){return VV(e,YV,qV)}var s3=GV,py=s3,ZV=1,KV=Object.prototype,XV=KV.hasOwnProperty;function QV(e,t,n,r,i,a){var o=n&ZV,s=py(e),c=s.length,l=py(t),u=l.length;if(c!=u&&!o)return!1;for(var d=c;d--;){var f=s[d];if(!(o?f in t:XV.call(t,f)))return!1}var h=a.get(e),g=a.get(t);if(h&&g)return h==t&&g==e;var p=!0;a.set(e,t),a.set(t,e);for(var v=o;++d<c;){f=s[d];var _=e[f],w=t[f];if(r)var x=o?r(w,_,f,t,e,a):r(_,w,f,e,t,a);if(!(x===void 0?_===w||i(_,w,n,r,a):x)){p=!1;break}v||(v=f=="constructor")}if(p&&!v){var T=e.constructor,b=t.constructor;T!=b&&"constructor"in e&&"constructor"in t&&!(typeof T=="function"&&T instanceof T&&typeof b=="function"&&b instanceof b)&&(p=!1)}return a.delete(e),a.delete(t),p}var JV=QV,eq=la,tq=Or,nq=eq(tq,"DataView"),rq=nq,iq=la,aq=Or,oq=iq(aq,"Promise"),sq=oq,cq=la,lq=Or,uq=cq(lq,"Set"),c3=uq,dq=la,fq=Or,hq=dq(fq,"WeakMap"),pq=hq,Qh=rq,Jh=Pm,ep=sq,tp=c3,np=pq,l3=Gr,xo=gw,my="[object Map]",mq="[object Object]",gy="[object Promise]",vy="[object Set]",yy="[object WeakMap]",by="[object DataView]",gq=xo(Qh),vq=xo(Jh),yq=xo(ep),bq=xo(tp),xq=xo(np),Ri=l3;(Qh&&Ri(new Qh(new ArrayBuffer(1)))!=by||Jh&&Ri(new Jh)!=my||ep&&Ri(ep.resolve())!=gy||tp&&Ri(new tp)!=vy||np&&Ri(new np)!=yy)&&(Ri=function(e){var t=l3(e),n=t==mq?e.constructor:void 0,r=n?xo(n):"";if(r)switch(r){case gq:return by;case vq:return my;case yq:return gy;case bq:return vy;case xq:return yy}return t});var Fd=Ri,Ff=Yu,_q=r3,wq=_V,Cq=JV,xy=Fd,_y=Pn,wy=Zu,Tq=zm,kq=1,Cy="[object Arguments]",Ty="[object Array]",zc="[object Object]",Sq=Object.prototype,ky=Sq.hasOwnProperty;function Oq(e,t,n,r,i,a){var o=_y(e),s=_y(t),c=o?Ty:xy(e),l=s?Ty:xy(t);c=c==Cy?zc:c,l=l==Cy?zc:l;var u=c==zc,d=l==zc,f=c==l;if(f&&wy(e)){if(!wy(t))return!1;o=!0,u=!1}if(f&&!u)return a||(a=new Ff),o||Tq(e)?_q(e,t,n,r,i,a):wq(e,t,c,n,r,i,a);if(!(n&kq)){var h=u&&ky.call(e,"__wrapped__"),g=d&&ky.call(t,"__wrapped__");if(h||g){var p=h?e.value():e,v=g?t.value():t;return a||(a=new Ff),i(p,v,n,r,a)}}return f?(a||(a=new Ff),Cq(e,t,n,r,i,a)):!1}var Eq=Oq,Mq=Eq,Sy=Qn;function u3(e,t,n,r,i){return e===t?!0:e==null||t==null||!Sy(e)&&!Sy(t)?e!==e&&t!==t:Mq(e,t,n,r,u3,i)}var Mg=u3,$q=Mg;function Aq(e,t){return $q(e,t)}var Rq=Aq;const jq=Ht(Rq);var Pq={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 qn(){return qn=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},qn.apply(this,arguments)}function rp(e,t){return rp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},rp(e,t)}function Bd(e,t){if(e==null)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}var Iq=["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"],Dq=function(e,t){return qn({},t,e)},Nq=function(e,t){var n=mL({},e,t);return Iq.forEach(function(r){Xo(n,r,Dq(_r(n,r),n.text))}),n},d3=m.createContext(),f3=function(e){var t=e.children,n=e.animate,r=n===void 0||n,i=e.config,a=i===void 0?"default":i,o=m.useMemo(function(){var s=qF(a)?Mm[a]:a;return{animate:r,config:s}},[r,a]);return y.jsx(d3.Provider,{value:o,children:t})},Oy={animate:H.bool,motionConfig:H.oneOfType([H.oneOf(Object.keys(Mm)),H.shape({mass:H.number,tension:H.number,friction:H.number,clamp:H.bool,precision:H.number,velocity:H.number,duration:H.number,easing:H.func})])};f3.propTypes={children:H.node.isRequired,animate:Oy.animate,config:Oy.motionConfig};var Sn=function(){return m.useContext(d3)},$g=function(e){var t=Sn(),n=t.animate,r=t.config,i=function(s){var c=m.useRef();return m.useEffect(function(){c.current=s},[s]),c.current}(e),a=m.useMemo(function(){return Hw(i,e)},[i,e]),o=Sr({from:{value:0},to:{value:1},reset:!0,config:r,immediate:!n}).value;return vi(o,a)},Lq={nivo:["#d76445","#f47560","#e8c1a0","#97e3d5","#61cdbb","#00b0a7"],BrBG:$e(cd),PRGn:$e(ld),PiYG:$e(ud),PuOr:$e(dd),RdBu:$e(fd),RdGy:$e(hd),RdYlBu:$e(pd),RdYlGn:$e(md),spectral:$e(gd),blues:$e(Md),greens:$e($d),greys:$e(Ad),oranges:$e(Pd),purples:$e(Rd),reds:$e(jd),BuGn:$e(vd),BuPu:$e(yd),GnBu:$e(bd),OrRd:$e(xd),PuBuGn:$e(_d),PuBu:$e(wd),PuRd:$e(Cd),RdPu:$e(Td),YlGnBu:$e(kd),YlGn:$e(Sd),YlOrBr:$e(Od),YlOrRd:$e(Ed)},Fq=Object.keys(Lq);$e(cd),$e(ld),$e(ud),$e(dd),$e(fd),$e(hd),$e(pd),$e(md),$e(gd),$e(Md),$e($d),$e(Ad),$e(Pd),$e(Rd),$e(jd),$e(vd),$e(yd),$e(bd),$e(xd),$e(_d),$e(wd),$e(Cd),$e(Td),$e(kd),$e(Sd),$e(Od),$e(Ed);H.oneOfType([H.oneOf(Fq),H.func,H.arrayOf(H.string)]);var ip={basis:Lz,basisClosed:Fz,basisOpen:Bz,bundle:Uz,cardinal:Wz,cardinalClosed:zz,cardinalOpen:Hz,catmullRom:Vz,catmullRomClosed:qz,catmullRomOpen:Yz,linear:xg,linearClosed:Gz,monotoneX:Zz,monotoneY:Kz,natural:Xz,step:Qz,stepAfter:eH,stepBefore:Jz},Ag=Object.keys(ip);Ag.filter(function(e){return e.endsWith("Closed")});L4(Ag,"bundle","basisClosed","basisOpen","cardinalClosed","cardinalOpen","catmullRomClosed","catmullRomOpen","linearClosed");L4(Ag,"bundle","basisClosed","basisOpen","cardinalClosed","cardinalOpen","catmullRomClosed","catmullRomOpen","linearClosed");var h3=function(e){if(!ip[e])throw new TypeError("'"+e+"', is not a valid curve interpolator identifier.");return ip[e]};H.shape({top:H.number,right:H.number,bottom:H.number,left:H.number}).isRequired;var Bq=["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"];H.oneOf(Bq);Ni(gg);var p3={top:0,right:0,bottom:0,left:0},pc=function(e,t,n){return n===void 0&&(n={}),m.useMemo(function(){var r=qn({},p3,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])},m3=function(){var e=m.useRef(null),t=m.useState({left:0,top:0,width:0,height:0}),n=t[0],r=t[1],i=m.useState(function(){return typeof ResizeObserver>"u"?null:new ResizeObserver(function(a){var o=a[0];return r(o.contentRect)})})[0];return m.useEffect(function(){return e.current&&i!==null&&i.observe(e.current),function(){i!==null&&i.disconnect()}},[]),[e,n]},Uq=function(e){return m.useMemo(function(){return Nq(Pq,e)},[e])},Wq=function(e){return typeof e=="function"?e:typeof e=="string"?e.indexOf("time:")===0?sd(e.slice("5")):fc(e):function(t){return""+t}},Ja=function(e){return m.useMemo(function(){return Wq(e)},[e])},g3=m.createContext(),zq={},v3=function(e){var t=e.theme,n=t===void 0?zq:t,r=e.children,i=Uq(n);return y.jsx(g3.Provider,{value:i,children:r})};v3.propTypes={children:H.node.isRequired,theme:H.object};var Tt=function(){return m.useContext(g3)},Hq=["outlineWidth","outlineColor","outlineOpacity"],Rg=function(e){return e.outlineWidth,e.outlineColor,e.outlineOpacity,Bd(e,Hq)},y3=function(e){var t=e.children,n=e.condition,r=e.wrapper;return n?m.cloneElement(r,{},t):t};y3.propTypes={children:H.node.isRequired,condition:H.bool.isRequired,wrapper:H.element.isRequired};var Vq={position:"relative"},mc=function(e){var t=e.children,n=e.theme,r=e.renderWrapper,i=r===void 0||r,a=e.isInteractive,o=a===void 0||a,s=e.animate,c=e.motionConfig,l=m.useRef(null);return y.jsx(v3,{theme:n,children:y.jsx(f3,{animate:s,config:c,children:y.jsx(XR,{container:l,children:y.jsxs(y3,{condition:i,wrapper:y.jsx("div",{style:Vq,ref:l}),children:[t,o&&y.jsx(KR,{})]})})})})};mc.propTypes={children:H.element.isRequired,isInteractive:H.bool,renderWrapper:H.bool,theme:H.object,animate:H.bool,motionConfig:H.string};H.func.isRequired,H.bool,H.bool,H.object.isRequired,H.bool.isRequired,H.string;var _o=function(e){var t=e.children,n=m3(),r=n[0],i=n[1],a=i.width>0&&i.height>0;return y.jsx("div",{ref:r,style:{width:"100%",height:"100%"},children:a&&t({width:i.width,height:i.height})})};_o.propTypes={children:H.func.isRequired};var qq=["id","colors"],b3=function(e){var t=e.id,n=e.colors,r=Bd(e,qq);return y.jsx("linearGradient",qn({id:t,x1:0,x2:0,y1:0,y2:1},r,{children:n.map(function(i){var a=i.offset,o=i.color,s=i.opacity;return y.jsx("stop",{offset:a+"%",stopColor:o,stopOpacity:s!==void 0?s:1},a)})}))};b3.propTypes={id:H.string.isRequired,colors:H.arrayOf(H.shape({offset:H.number.isRequired,color:H.string.isRequired,opacity:H.number})).isRequired,gradientTransform:H.string};var x3={linearGradient:b3},zo={color:"#000000",background:"#ffffff",size:4,padding:4,stagger:!1},ap=m.memo(function(e){var t=e.id,n=e.background,r=n===void 0?zo.background:n,i=e.color,a=i===void 0?zo.color:i,o=e.size,s=o===void 0?zo.size:o,c=e.padding,l=c===void 0?zo.padding:c,u=e.stagger,d=u===void 0?zo.stagger:u,f=s+l,h=s/2,g=l/2;return d===!0&&(f=2*s+2*l),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+h,cy:g+h,r:h,fill:a}),d&&y.jsx("circle",{cx:1.5*l+s+h,cy:1.5*l+s+h,r:h,fill:a})]})});ap.displayName="PatternDots",ap.propTypes={id:H.string.isRequired,color:H.string.isRequired,background:H.string.isRequired,size:H.number.isRequired,padding:H.number.isRequired,stagger:H.bool.isRequired};var Yn=function(e){return e*Math.PI/180},Ud=function(e){return 180*e/Math.PI},Yq=function(e){return e.startAngle+(e.endAngle-e.startAngle)/2},qi=function(e,t){return{x:Math.cos(e)*t,y:Math.sin(e)*t}},Gq=function(e){var t=e%360;return t<0&&(t+=360),t},Zq={svg:{align:{left:"start",center:"middle",right:"end",start:"start",middle:"middle",end:"end"},baseline:{top:"text-before-edge",center:"central",bottom:"alphabetic"}},canvas:{align:{left:"left",center:"center",right:"right",start:"left",middle:"center",end:"right"},baseline:{top:"top",center:"middle",bottom:"bottom"}}},Ho={spacing:5,rotation:0,background:"#000000",color:"#ffffff",lineWidth:2},op=m.memo(function(e){var t=e.id,n=e.spacing,r=n===void 0?Ho.spacing:n,i=e.rotation,a=i===void 0?Ho.rotation:i,o=e.background,s=o===void 0?Ho.background:o,c=e.color,l=c===void 0?Ho.color:c,u=e.lineWidth,d=u===void 0?Ho.lineWidth:u,f=Math.round(a)%360,h=Math.abs(r);f>180?f-=360:f>90?f-=180:f<-180?f+=360:f<-90&&(f+=180);var g,p=h,v=h;return f===0?g=`
|
|
256
256
|
M 0 0 L `+p+` 0
|