mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2025-06-13 11:05:03 +00:00
100 lines
1.1 MiB
100 lines
1.1 MiB
var sg=Object.defineProperty;var gp=e=>{throw TypeError(e)};var og=(e,t,i)=>t in e?sg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i;var kt=(e,t,i)=>og(e,typeof t!="symbol"?t+"":t,i),Jl=(e,t,i)=>t.has(e)||gp("Cannot "+i);var N=(e,t,i)=>(Jl(e,t,"read from private field"),i?i.call(e):t.get(e)),Se=(e,t,i)=>t.has(e)?gp("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),Ce=(e,t,i,a)=>(Jl(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),me=(e,t,i)=>(Jl(e,t,"access private method"),i);var fa=(e,t,i,a)=>({set _(o){Ce(e,t,o,i)},get _(){return N(e,t,a)}});function _mergeNamespaces(e,t){for(var i=0;i<t.length;i++){const a=t[i];if(typeof a!="string"&&!Array.isArray(a)){for(const o in a)if(o!=="default"&&!(o in e)){const l=Object.getOwnPropertyDescriptor(a,o);l&&Object.defineProperty(e,o,l.get?l:{enumerable:!0,get:()=>a[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))a(o);new MutationObserver(o=>{for(const l of o)if(l.type==="childList")for(const u of l.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&a(u)}).observe(document,{childList:!0,subtree:!0});function i(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerPolicy&&(l.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?l.credentials="include":o.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function a(o){if(o.ep)return;o.ep=!0;const l=i(o);fetch(o.href,l)}})();var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function getAugmentedNamespace(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var i=function a(){return this instanceof a?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};i.prototype=t.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(e).forEach(function(a){var o=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(i,a,o.get?o:{enumerable:!0,get:function(){return e[a]}})}),i}var jsxRuntime={exports:{}},reactJsxRuntime_production={};/**
|
||
* @license React
|
||
* react-jsx-runtime.production.js
|
||
*
|
||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var hasRequiredReactJsxRuntime_production;function requireReactJsxRuntime_production(){if(hasRequiredReactJsxRuntime_production)return reactJsxRuntime_production;hasRequiredReactJsxRuntime_production=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function i(a,o,l){var u=null;if(l!==void 0&&(u=""+l),o.key!==void 0&&(u=""+o.key),"key"in o){l={};for(var f in o)f!=="key"&&(l[f]=o[f])}else l=o;return o=l.ref,{$$typeof:e,type:a,key:u,ref:o!==void 0?o:null,props:l}}return reactJsxRuntime_production.Fragment=t,reactJsxRuntime_production.jsx=i,reactJsxRuntime_production.jsxs=i,reactJsxRuntime_production}var hasRequiredJsxRuntime;function requireJsxRuntime(){return hasRequiredJsxRuntime||(hasRequiredJsxRuntime=1,jsxRuntime.exports=requireReactJsxRuntime_production()),jsxRuntime.exports}var jsxRuntimeExports=requireJsxRuntime(),react={exports:{}},react_production={};/**
|
||
* @license React
|
||
* react.production.js
|
||
*
|
||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var hasRequiredReact_production;function requireReact_production(){if(hasRequiredReact_production)return react_production;hasRequiredReact_production=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),u=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),g=Symbol.iterator;function b(F){return F===null||typeof F!="object"?null:(F=g&&F[g]||F["@@iterator"],typeof F=="function"?F:null)}var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},y=Object.assign,S={};function E(F,X,z){this.props=F,this.context=X,this.refs=S,this.updater=z||x}E.prototype.isReactComponent={},E.prototype.setState=function(F,X){if(typeof F!="object"&&typeof F!="function"&&F!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,F,X,"setState")},E.prototype.forceUpdate=function(F){this.updater.enqueueForceUpdate(this,F,"forceUpdate")};function w(){}w.prototype=E.prototype;function _(F,X,z){this.props=F,this.context=X,this.refs=S,this.updater=z||x}var O=_.prototype=new w;O.constructor=_,y(O,E.prototype),O.isPureReactComponent=!0;var k=Array.isArray,A={H:null,A:null,T:null,S:null,V:null},D=Object.prototype.hasOwnProperty;function R(F,X,z,L,$,V){return z=V.ref,{$$typeof:e,type:F,key:X,ref:z!==void 0?z:null,props:V}}function T(F,X){return R(F.type,X,void 0,void 0,void 0,F.props)}function j(F){return typeof F=="object"&&F!==null&&F.$$typeof===e}function P(F){var X={"=":"=0",":":"=2"};return"$"+F.replace(/[=:]/g,function(z){return X[z]})}var M=/\/+/g;function I(F,X){return typeof F=="object"&&F!==null&&F.key!=null?P(""+F.key):X.toString(36)}function G(){}function ne(F){switch(F.status){case"fulfilled":return F.value;case"rejected":throw F.reason;default:switch(typeof F.status=="string"?F.then(G,G):(F.status="pending",F.then(function(X){F.status==="pending"&&(F.status="fulfilled",F.value=X)},function(X){F.status==="pending"&&(F.status="rejected",F.reason=X)})),F.status){case"fulfilled":return F.value;case"rejected":throw F.reason}}throw F}function Q(F,X,z,L,$){var V=typeof F;(V==="undefined"||V==="boolean")&&(F=null);var K=!1;if(F===null)K=!0;else switch(V){case"bigint":case"string":case"number":K=!0;break;case"object":switch(F.$$typeof){case e:case t:K=!0;break;case m:return K=F._init,Q(K(F._payload),X,z,L,$)}}if(K)return $=$(F),K=L===""?"."+I(F,0):L,k($)?(z="",K!=null&&(z=K.replace(M,"$&/")+"/"),Q($,X,z,"",function(ce){return ce})):$!=null&&(j($)&&($=T($,z+($.key==null||F&&F.key===$.key?"":(""+$.key).replace(M,"$&/")+"/")+K)),X.push($)),1;K=0;var te=L===""?".":L+":";if(k(F))for(var J=0;J<F.length;J++)L=F[J],V=te+I(L,J),K+=Q(L,X,z,V,$);else if(J=b(F),typeof J=="function")for(F=J.call(F),J=0;!(L=F.next()).done;)L=L.value,V=te+I(L,J++),K+=Q(L,X,z,V,$);else if(V==="object"){if(typeof F.then=="function")return Q(ne(F),X,z,L,$);throw X=String(F),Error("Objects are not valid as a React child (found: "+(X==="[object Object]"?"object with keys {"+Object.keys(F).join(", ")+"}":X)+"). If you meant to render a collection of children, use an array instead.")}return K}function B(F,X,z){if(F==null)return F;var L=[],$=0;return Q(F,L,"","",function(V){return X.call(z,V,$++)}),L}function H(F){if(F._status===-1){var X=F._result;X=X(),X.then(function(z){(F._status===0||F._status===-1)&&(F._status=1,F._result=z)},function(z){(F._status===0||F._status===-1)&&(F._status=2,F._result=z)}),F._status===-1&&(F._status=0,F._result=X)}if(F._status===1)return F._result.default;throw F._result}var Y=typeof reportError=="function"?reportError:function(F){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var X=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof F=="object"&&F!==null&&typeof F.message=="string"?String(F.message):String(F),error:F});if(!window.dispatchEvent(X))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",F);return}console.error(F)};function U(){}return react_production.Children={map:B,forEach:function(F,X,z){B(F,function(){X.apply(this,arguments)},z)},count:function(F){var X=0;return B(F,function(){X++}),X},toArray:function(F){return B(F,function(X){return X})||[]},only:function(F){if(!j(F))throw Error("React.Children.only expected to receive a single React element child.");return F}},react_production.Component=E,react_production.Fragment=i,react_production.Profiler=o,react_production.PureComponent=_,react_production.StrictMode=a,react_production.Suspense=h,react_production.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=A,react_production.__COMPILER_RUNTIME={__proto__:null,c:function(F){return A.H.useMemoCache(F)}},react_production.cache=function(F){return function(){return F.apply(null,arguments)}},react_production.cloneElement=function(F,X,z){if(F==null)throw Error("The argument must be a React element, but you passed "+F+".");var L=y({},F.props),$=F.key,V=void 0;if(X!=null)for(K in X.ref!==void 0&&(V=void 0),X.key!==void 0&&($=""+X.key),X)!D.call(X,K)||K==="key"||K==="__self"||K==="__source"||K==="ref"&&X.ref===void 0||(L[K]=X[K]);var K=arguments.length-2;if(K===1)L.children=z;else if(1<K){for(var te=Array(K),J=0;J<K;J++)te[J]=arguments[J+2];L.children=te}return R(F.type,$,void 0,void 0,V,L)},react_production.createContext=function(F){return F={$$typeof:u,_currentValue:F,_currentValue2:F,_threadCount:0,Provider:null,Consumer:null},F.Provider=F,F.Consumer={$$typeof:l,_context:F},F},react_production.createElement=function(F,X,z){var L,$={},V=null;if(X!=null)for(L in X.key!==void 0&&(V=""+X.key),X)D.call(X,L)&&L!=="key"&&L!=="__self"&&L!=="__source"&&($[L]=X[L]);var K=arguments.length-2;if(K===1)$.children=z;else if(1<K){for(var te=Array(K),J=0;J<K;J++)te[J]=arguments[J+2];$.children=te}if(F&&F.defaultProps)for(L in K=F.defaultProps,K)$[L]===void 0&&($[L]=K[L]);return R(F,V,void 0,void 0,null,$)},react_production.createRef=function(){return{current:null}},react_production.forwardRef=function(F){return{$$typeof:f,render:F}},react_production.isValidElement=j,react_production.lazy=function(F){return{$$typeof:m,_payload:{_status:-1,_result:F},_init:H}},react_production.memo=function(F,X){return{$$typeof:p,type:F,compare:X===void 0?null:X}},react_production.startTransition=function(F){var X=A.T,z={};A.T=z;try{var L=F(),$=A.S;$!==null&&$(z,L),typeof L=="object"&&L!==null&&typeof L.then=="function"&&L.then(U,Y)}catch(V){Y(V)}finally{A.T=X}},react_production.unstable_useCacheRefresh=function(){return A.H.useCacheRefresh()},react_production.use=function(F){return A.H.use(F)},react_production.useActionState=function(F,X,z){return A.H.useActionState(F,X,z)},react_production.useCallback=function(F,X){return A.H.useCallback(F,X)},react_production.useContext=function(F){return A.H.useContext(F)},react_production.useDebugValue=function(){},react_production.useDeferredValue=function(F,X){return A.H.useDeferredValue(F,X)},react_production.useEffect=function(F,X,z){var L=A.H;if(typeof z=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return L.useEffect(F,X)},react_production.useId=function(){return A.H.useId()},react_production.useImperativeHandle=function(F,X,z){return A.H.useImperativeHandle(F,X,z)},react_production.useInsertionEffect=function(F,X){return A.H.useInsertionEffect(F,X)},react_production.useLayoutEffect=function(F,X){return A.H.useLayoutEffect(F,X)},react_production.useMemo=function(F,X){return A.H.useMemo(F,X)},react_production.useOptimistic=function(F,X){return A.H.useOptimistic(F,X)},react_production.useReducer=function(F,X,z){return A.H.useReducer(F,X,z)},react_production.useRef=function(F){return A.H.useRef(F)},react_production.useState=function(F){return A.H.useState(F)},react_production.useSyncExternalStore=function(F,X,z){return A.H.useSyncExternalStore(F,X,z)},react_production.useTransition=function(){return A.H.useTransition()},react_production.version="19.1.0",react_production}var hasRequiredReact;function requireReact(){return hasRequiredReact||(hasRequiredReact=1,react.exports=requireReact_production()),react.exports}var reactExports=requireReact();const React=getDefaultExportFromCjs(reactExports),React$1=_mergeNamespaces({__proto__:null,default:React},[reactExports]);var client={exports:{}},reactDomClient_production={},scheduler={exports:{}},scheduler_production={};/**
|
||
* @license React
|
||
* scheduler.production.js
|
||
*
|
||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var hasRequiredScheduler_production;function requireScheduler_production(){return hasRequiredScheduler_production||(hasRequiredScheduler_production=1,function(e){function t(B,H){var Y=B.length;B.push(H);e:for(;0<Y;){var U=Y-1>>>1,F=B[U];if(0<o(F,H))B[U]=H,B[Y]=F,Y=U;else break e}}function i(B){return B.length===0?null:B[0]}function a(B){if(B.length===0)return null;var H=B[0],Y=B.pop();if(Y!==H){B[0]=Y;e:for(var U=0,F=B.length,X=F>>>1;U<X;){var z=2*(U+1)-1,L=B[z],$=z+1,V=B[$];if(0>o(L,Y))$<F&&0>o(V,L)?(B[U]=V,B[$]=Y,U=$):(B[U]=L,B[z]=Y,U=z);else if($<F&&0>o(V,Y))B[U]=V,B[$]=Y,U=$;else break e}}return H}function o(B,H){var Y=B.sortIndex-H.sortIndex;return Y!==0?Y:B.id-H.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var u=Date,f=u.now();e.unstable_now=function(){return u.now()-f}}var h=[],p=[],m=1,g=null,b=3,x=!1,y=!1,S=!1,E=!1,w=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,O=typeof setImmediate<"u"?setImmediate:null;function k(B){for(var H=i(p);H!==null;){if(H.callback===null)a(p);else if(H.startTime<=B)a(p),H.sortIndex=H.expirationTime,t(h,H);else break;H=i(p)}}function A(B){if(S=!1,k(B),!y)if(i(h)!==null)y=!0,D||(D=!0,I());else{var H=i(p);H!==null&&Q(A,H.startTime-B)}}var D=!1,R=-1,T=5,j=-1;function P(){return E?!0:!(e.unstable_now()-j<T)}function M(){if(E=!1,D){var B=e.unstable_now();j=B;var H=!0;try{e:{y=!1,S&&(S=!1,_(R),R=-1),x=!0;var Y=b;try{t:{for(k(B),g=i(h);g!==null&&!(g.expirationTime>B&&P());){var U=g.callback;if(typeof U=="function"){g.callback=null,b=g.priorityLevel;var F=U(g.expirationTime<=B);if(B=e.unstable_now(),typeof F=="function"){g.callback=F,k(B),H=!0;break t}g===i(h)&&a(h),k(B)}else a(h);g=i(h)}if(g!==null)H=!0;else{var X=i(p);X!==null&&Q(A,X.startTime-B),H=!1}}break e}finally{g=null,b=Y,x=!1}H=void 0}}finally{H?I():D=!1}}}var I;if(typeof O=="function")I=function(){O(M)};else if(typeof MessageChannel<"u"){var G=new MessageChannel,ne=G.port2;G.port1.onmessage=M,I=function(){ne.postMessage(null)}}else I=function(){w(M,0)};function Q(B,H){R=w(function(){B(e.unstable_now())},H)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(B){B.callback=null},e.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):T=0<B?Math.floor(1e3/B):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_next=function(B){switch(b){case 1:case 2:case 3:var H=3;break;default:H=b}var Y=b;b=H;try{return B()}finally{b=Y}},e.unstable_requestPaint=function(){E=!0},e.unstable_runWithPriority=function(B,H){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var Y=b;b=B;try{return H()}finally{b=Y}},e.unstable_scheduleCallback=function(B,H,Y){var U=e.unstable_now();switch(typeof Y=="object"&&Y!==null?(Y=Y.delay,Y=typeof Y=="number"&&0<Y?U+Y:U):Y=U,B){case 1:var F=-1;break;case 2:F=250;break;case 5:F=1073741823;break;case 4:F=1e4;break;default:F=5e3}return F=Y+F,B={id:m++,callback:H,priorityLevel:B,startTime:Y,expirationTime:F,sortIndex:-1},Y>U?(B.sortIndex=Y,t(p,B),i(h)===null&&B===i(p)&&(S?(_(R),R=-1):S=!0,Q(A,Y-U))):(B.sortIndex=F,t(h,B),y||x||(y=!0,D||(D=!0,I()))),B},e.unstable_shouldYield=P,e.unstable_wrapCallback=function(B){var H=b;return function(){var Y=b;b=H;try{return B.apply(this,arguments)}finally{b=Y}}}}(scheduler_production)),scheduler_production}var hasRequiredScheduler;function requireScheduler(){return hasRequiredScheduler||(hasRequiredScheduler=1,scheduler.exports=requireScheduler_production()),scheduler.exports}var reactDom={exports:{}},reactDom_production={};/**
|
||
* @license React
|
||
* react-dom.production.js
|
||
*
|
||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var hasRequiredReactDom_production;function requireReactDom_production(){if(hasRequiredReactDom_production)return reactDom_production;hasRequiredReactDom_production=1;var e=requireReact();function t(h){var p="https://react.dev/errors/"+h;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)p+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+h+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var a={d:{f:i,r:function(){throw Error(t(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for("react.portal");function l(h,p,m){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:g==null?null:""+g,children:h,containerInfo:p,implementation:m}}var u=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(h,p){if(h==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return reactDom_production.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,reactDom_production.createPortal=function(h,p){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(t(299));return l(h,p,null,m)},reactDom_production.flushSync=function(h){var p=u.T,m=a.p;try{if(u.T=null,a.p=2,h)return h()}finally{u.T=p,a.p=m,a.d.f()}},reactDom_production.preconnect=function(h,p){typeof h=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,a.d.C(h,p))},reactDom_production.prefetchDNS=function(h){typeof h=="string"&&a.d.D(h)},reactDom_production.preinit=function(h,p){if(typeof h=="string"&&p&&typeof p.as=="string"){var m=p.as,g=f(m,p.crossOrigin),b=typeof p.integrity=="string"?p.integrity:void 0,x=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;m==="style"?a.d.S(h,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:g,integrity:b,fetchPriority:x}):m==="script"&&a.d.X(h,{crossOrigin:g,integrity:b,fetchPriority:x,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},reactDom_production.preinitModule=function(h,p){if(typeof h=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var m=f(p.as,p.crossOrigin);a.d.M(h,{crossOrigin:m,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&a.d.M(h)},reactDom_production.preload=function(h,p){if(typeof h=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var m=p.as,g=f(m,p.crossOrigin);a.d.L(h,m,{crossOrigin:g,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},reactDom_production.preloadModule=function(h,p){if(typeof h=="string")if(p){var m=f(p.as,p.crossOrigin);a.d.m(h,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:m,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else a.d.m(h)},reactDom_production.requestFormReset=function(h){a.d.r(h)},reactDom_production.unstable_batchedUpdates=function(h,p){return h(p)},reactDom_production.useFormState=function(h,p,m){return u.H.useFormState(h,p,m)},reactDom_production.useFormStatus=function(){return u.H.useHostTransitionStatus()},reactDom_production.version="19.1.0",reactDom_production}var hasRequiredReactDom;function requireReactDom(){if(hasRequiredReactDom)return reactDom.exports;hasRequiredReactDom=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),reactDom.exports=requireReactDom_production(),reactDom.exports}/**
|
||
* @license React
|
||
* react-dom-client.production.js
|
||
*
|
||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var hasRequiredReactDomClient_production;function requireReactDomClient_production(){if(hasRequiredReactDomClient_production)return reactDomClient_production;hasRequiredReactDomClient_production=1;var e=requireScheduler(),t=requireReact(),i=requireReactDom();function a(n){var s="https://react.dev/errors/"+n;if(1<arguments.length){s+="?args[]="+encodeURIComponent(arguments[1]);for(var c=2;c<arguments.length;c++)s+="&args[]="+encodeURIComponent(arguments[c])}return"Minified React error #"+n+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function l(n){var s=n,c=n;if(n.alternate)for(;s.return;)s=s.return;else{n=s;do s=n,(s.flags&4098)!==0&&(c=s.return),n=s.return;while(n)}return s.tag===3?c:null}function u(n){if(n.tag===13){var s=n.memoizedState;if(s===null&&(n=n.alternate,n!==null&&(s=n.memoizedState)),s!==null)return s.dehydrated}return null}function f(n){if(l(n)!==n)throw Error(a(188))}function h(n){var s=n.alternate;if(!s){if(s=l(n),s===null)throw Error(a(188));return s!==n?null:n}for(var c=n,d=s;;){var v=c.return;if(v===null)break;var C=v.alternate;if(C===null){if(d=v.return,d!==null){c=d;continue}break}if(v.child===C.child){for(C=v.child;C;){if(C===c)return f(v),n;if(C===d)return f(v),s;C=C.sibling}throw Error(a(188))}if(c.return!==d.return)c=v,d=C;else{for(var q=!1,Z=v.child;Z;){if(Z===c){q=!0,c=v,d=C;break}if(Z===d){q=!0,d=v,c=C;break}Z=Z.sibling}if(!q){for(Z=C.child;Z;){if(Z===c){q=!0,c=C,d=v;break}if(Z===d){q=!0,d=C,c=v;break}Z=Z.sibling}if(!q)throw Error(a(189))}}if(c.alternate!==d)throw Error(a(190))}if(c.tag!==3)throw Error(a(188));return c.stateNode.current===c?n:s}function p(n){var s=n.tag;if(s===5||s===26||s===27||s===6)return n;for(n=n.child;n!==null;){if(s=p(n),s!==null)return s;n=n.sibling}return null}var m=Object.assign,g=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),x=Symbol.for("react.portal"),y=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),w=Symbol.for("react.provider"),_=Symbol.for("react.consumer"),O=Symbol.for("react.context"),k=Symbol.for("react.forward_ref"),A=Symbol.for("react.suspense"),D=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),T=Symbol.for("react.lazy"),j=Symbol.for("react.activity"),P=Symbol.for("react.memo_cache_sentinel"),M=Symbol.iterator;function I(n){return n===null||typeof n!="object"?null:(n=M&&n[M]||n["@@iterator"],typeof n=="function"?n:null)}var G=Symbol.for("react.client.reference");function ne(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===G?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case y:return"Fragment";case E:return"Profiler";case S:return"StrictMode";case A:return"Suspense";case D:return"SuspenseList";case j:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case x:return"Portal";case O:return(n.displayName||"Context")+".Provider";case _:return(n._context.displayName||"Context")+".Consumer";case k:var s=n.render;return n=n.displayName,n||(n=s.displayName||s.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case R:return s=n.displayName||null,s!==null?s:ne(n.type)||"Memo";case T:s=n._payload,n=n._init;try{return ne(n(s))}catch{}}return null}var Q=Array.isArray,B=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,H=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y={pending:!1,data:null,method:null,action:null},U=[],F=-1;function X(n){return{current:n}}function z(n){0>F||(n.current=U[F],U[F]=null,F--)}function L(n,s){F++,U[F]=n.current,n.current=s}var $=X(null),V=X(null),K=X(null),te=X(null);function J(n,s){switch(L(K,s),L(V,n),L($,null),s.nodeType){case 9:case 11:n=(n=s.documentElement)&&(n=n.namespaceURI)?Vf(n):0;break;default:if(n=s.tagName,s=s.namespaceURI)s=Vf(s),n=qf(s,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}z($),L($,n)}function ce(){z($),z(V),z(K)}function ue(n){n.memoizedState!==null&&L(te,n);var s=$.current,c=qf(s,n.type);s!==c&&(L(V,n),L($,c))}function we(n){V.current===n&&(z($),z(V)),te.current===n&&(z(te),oa._currentValue=Y)}var Ee=Object.prototype.hasOwnProperty,De=e.unstable_scheduleCallback,je=e.unstable_cancelCallback,Pe=e.unstable_shouldYield,ge=e.unstable_requestPaint,se=e.unstable_now,W=e.unstable_getCurrentPriorityLevel,ee=e.unstable_ImmediatePriority,de=e.unstable_UserBlockingPriority,pe=e.unstable_NormalPriority,ve=e.unstable_LowPriority,Te=e.unstable_IdlePriority,oe=e.log,ie=e.unstable_setDisableYieldValue,Fe=null,Le=null;function Ye(n){if(typeof oe=="function"&&ie(n),Le&&typeof Le.setStrictMode=="function")try{Le.setStrictMode(Fe,n)}catch{}}var qe=Math.clz32?Math.clz32:Je,it=Math.log,We=Math.LN2;function Je(n){return n>>>=0,n===0?32:31-(it(n)/We|0)|0}var ct=256,ot=4194304;function Oe(n){var s=n&42;if(s!==0)return s;switch(n&-n){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return n&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return n&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return n}}function ye(n,s,c){var d=n.pendingLanes;if(d===0)return 0;var v=0,C=n.suspendedLanes,q=n.pingedLanes;n=n.warmLanes;var Z=d&134217727;return Z!==0?(d=Z&~C,d!==0?v=Oe(d):(q&=Z,q!==0?v=Oe(q):c||(c=Z&~n,c!==0&&(v=Oe(c))))):(Z=d&~C,Z!==0?v=Oe(Z):q!==0?v=Oe(q):c||(c=d&~n,c!==0&&(v=Oe(c)))),v===0?0:s!==0&&s!==v&&(s&C)===0&&(C=v&-v,c=s&-s,C>=c||C===32&&(c&4194048)!==0)?s:v}function xe(n,s){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&s)===0}function Qe(n,s){switch(n){case 1:case 2:case 4:case 8:case 64:return s+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function pt(){var n=ct;return ct<<=1,(ct&4194048)===0&&(ct=256),n}function ht(){var n=ot;return ot<<=1,(ot&62914560)===0&&(ot=4194304),n}function le(n){for(var s=[],c=0;31>c;c++)s.push(n);return s}function Ne(n,s){n.pendingLanes|=s,s!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function Ge(n,s,c,d,v,C){var q=n.pendingLanes;n.pendingLanes=c,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=c,n.entangledLanes&=c,n.errorRecoveryDisabledLanes&=c,n.shellSuspendCounter=0;var Z=n.entanglements,fe=n.expirationTimes,Me=n.hiddenUpdates;for(c=q&~c;0<c;){var Ue=31-qe(c),Ve=1<<Ue;Z[Ue]=0,fe[Ue]=-1;var $e=Me[Ue];if($e!==null)for(Me[Ue]=null,Ue=0;Ue<$e.length;Ue++){var ze=$e[Ue];ze!==null&&(ze.lane&=-536870913)}c&=~Ve}d!==0&&nt(n,d,0),C!==0&&v===0&&n.tag!==0&&(n.suspendedLanes|=C&~(q&~s))}function nt(n,s,c){n.pendingLanes|=s,n.suspendedLanes&=~s;var d=31-qe(s);n.entangledLanes|=s,n.entanglements[d]=n.entanglements[d]|1073741824|c&4194090}function at(n,s){var c=n.entangledLanes|=s;for(n=n.entanglements;c;){var d=31-qe(c),v=1<<d;v&s|n[d]&s&&(n[d]|=s),c&=~v}}function Ke(n){switch(n){case 2:n=1;break;case 8:n=4;break;case 32:n=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:n=128;break;case 268435456:n=134217728;break;default:n=0}return n}function ae(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function re(){var n=H.p;return n!==0?n:(n=window.event,n===void 0?32:up(n.type))}function he(n,s){var c=H.p;try{return H.p=n,s()}finally{H.p=c}}var Re=Math.random().toString(36).slice(2),_e="__reactFiber$"+Re,Ie="__reactProps$"+Re,Be="__reactContainer$"+Re,et="__reactEvents$"+Re,tt="__reactListeners$"+Re,Xe="__reactHandles$"+Re,ut="__reactResources$"+Re,Ze="__reactMarker$"+Re;function rt(n){delete n[_e],delete n[Ie],delete n[et],delete n[tt],delete n[Xe]}function st(n){var s=n[_e];if(s)return s;for(var c=n.parentNode;c;){if(s=c[Be]||c[_e]){if(c=s.alternate,s.child!==null||c!==null&&c.child!==null)for(n=Yf(n);n!==null;){if(c=n[_e])return c;n=Yf(n)}return s}n=c,c=n.parentNode}return null}function ft(n){if(n=n[_e]||n[Be]){var s=n.tag;if(s===5||s===6||s===13||s===26||s===27||s===3)return n}return null}function yt(n){var s=n.tag;if(s===5||s===26||s===27||s===6)return n.stateNode;throw Error(a(33))}function xt(n){var s=n[ut];return s||(s=n[ut]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function Et(n){n[Ze]=!0}var Lt=new Set,mn={};function Jt(n,s){tn(n,s),tn(n+"Capture",s)}function tn(n,s){for(mn[n]=s,n=0;n<s.length;n++)Lt.add(s[n])}var xa=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),jc={},Lc={};function Zp(n){return Ee.call(Lc,n)?!0:Ee.call(jc,n)?!1:xa.test(n)?Lc[n]=!0:(jc[n]=!0,!1)}function Sa(n,s,c){if(Zp(s))if(c===null)n.removeAttribute(s);else{switch(typeof c){case"undefined":case"function":case"symbol":n.removeAttribute(s);return;case"boolean":var d=s.toLowerCase().slice(0,5);if(d!=="data-"&&d!=="aria-"){n.removeAttribute(s);return}}n.setAttribute(s,""+c)}}function Ea(n,s,c){if(c===null)n.removeAttribute(s);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(s);return}n.setAttribute(s,""+c)}}function jn(n,s,c,d){if(d===null)n.removeAttribute(c);else{switch(typeof d){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(c);return}n.setAttributeNS(s,c,""+d)}}var Gs,Nc;function Lr(n){if(Gs===void 0)try{throw Error()}catch(c){var s=c.stack.trim().match(/\n( *(at )?)/);Gs=s&&s[1]||"",Nc=-1<c.stack.indexOf(`
|
||
at`)?" (<anonymous>)":-1<c.stack.indexOf("@")?"@unknown:0:0":""}return`
|
||
`+Gs+n+Nc}var Ws=!1;function Xs(n,s){if(!n||Ws)return"";Ws=!0;var c=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var d={DetermineComponentFrameRoot:function(){try{if(s){var Ve=function(){throw Error()};if(Object.defineProperty(Ve.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ve,[])}catch(ze){var $e=ze}Reflect.construct(n,[],Ve)}else{try{Ve.call()}catch(ze){$e=ze}n.call(Ve.prototype)}}else{try{throw Error()}catch(ze){$e=ze}(Ve=n())&&typeof Ve.catch=="function"&&Ve.catch(function(){})}}catch(ze){if(ze&&$e&&typeof ze.stack=="string")return[ze.stack,$e.stack]}return[null,null]}};d.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var v=Object.getOwnPropertyDescriptor(d.DetermineComponentFrameRoot,"name");v&&v.configurable&&Object.defineProperty(d.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var C=d.DetermineComponentFrameRoot(),q=C[0],Z=C[1];if(q&&Z){var fe=q.split(`
|
||
`),Me=Z.split(`
|
||
`);for(v=d=0;d<fe.length&&!fe[d].includes("DetermineComponentFrameRoot");)d++;for(;v<Me.length&&!Me[v].includes("DetermineComponentFrameRoot");)v++;if(d===fe.length||v===Me.length)for(d=fe.length-1,v=Me.length-1;1<=d&&0<=v&&fe[d]!==Me[v];)v--;for(;1<=d&&0<=v;d--,v--)if(fe[d]!==Me[v]){if(d!==1||v!==1)do if(d--,v--,0>v||fe[d]!==Me[v]){var Ue=`
|
||
`+fe[d].replace(" at new "," at ");return n.displayName&&Ue.includes("<anonymous>")&&(Ue=Ue.replace("<anonymous>",n.displayName)),Ue}while(1<=d&&0<=v);break}}}finally{Ws=!1,Error.prepareStackTrace=c}return(c=n?n.displayName||n.name:"")?Lr(c):""}function Jp(n){switch(n.tag){case 26:case 27:case 5:return Lr(n.type);case 16:return Lr("Lazy");case 13:return Lr("Suspense");case 19:return Lr("SuspenseList");case 0:case 15:return Xs(n.type,!1);case 11:return Xs(n.type.render,!1);case 1:return Xs(n.type,!0);case 31:return Lr("Activity");default:return""}}function $c(n){try{var s="";do s+=Jp(n),n=n.return;while(n);return s}catch(c){return`
|
||
Error generating stack: `+c.message+`
|
||
`+c.stack}}function gn(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function Fc(n){var s=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function eh(n){var s=Fc(n)?"checked":"value",c=Object.getOwnPropertyDescriptor(n.constructor.prototype,s),d=""+n[s];if(!n.hasOwnProperty(s)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var v=c.get,C=c.set;return Object.defineProperty(n,s,{configurable:!0,get:function(){return v.call(this)},set:function(q){d=""+q,C.call(this,q)}}),Object.defineProperty(n,s,{enumerable:c.enumerable}),{getValue:function(){return d},setValue:function(q){d=""+q},stopTracking:function(){n._valueTracker=null,delete n[s]}}}}function wa(n){n._valueTracker||(n._valueTracker=eh(n))}function Ic(n){if(!n)return!1;var s=n._valueTracker;if(!s)return!0;var c=s.getValue(),d="";return n&&(d=Fc(n)?n.checked?"true":"false":n.value),n=d,n!==c?(s.setValue(n),!0):!1}function Ca(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}var th=/[\n"\\]/g;function vn(n){return n.replace(th,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function Ys(n,s,c,d,v,C,q,Z){n.name="",q!=null&&typeof q!="function"&&typeof q!="symbol"&&typeof q!="boolean"?n.type=q:n.removeAttribute("type"),s!=null?q==="number"?(s===0&&n.value===""||n.value!=s)&&(n.value=""+gn(s)):n.value!==""+gn(s)&&(n.value=""+gn(s)):q!=="submit"&&q!=="reset"||n.removeAttribute("value"),s!=null?Ks(n,q,gn(s)):c!=null?Ks(n,q,gn(c)):d!=null&&n.removeAttribute("value"),v==null&&C!=null&&(n.defaultChecked=!!C),v!=null&&(n.checked=v&&typeof v!="function"&&typeof v!="symbol"),Z!=null&&typeof Z!="function"&&typeof Z!="symbol"&&typeof Z!="boolean"?n.name=""+gn(Z):n.removeAttribute("name")}function zc(n,s,c,d,v,C,q,Z){if(C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"&&(n.type=C),s!=null||c!=null){if(!(C!=="submit"&&C!=="reset"||s!=null))return;c=c!=null?""+gn(c):"",s=s!=null?""+gn(s):c,Z||s===n.value||(n.value=s),n.defaultValue=s}d=d??v,d=typeof d!="function"&&typeof d!="symbol"&&!!d,n.checked=Z?n.checked:!!d,n.defaultChecked=!!d,q!=null&&typeof q!="function"&&typeof q!="symbol"&&typeof q!="boolean"&&(n.name=q)}function Ks(n,s,c){s==="number"&&Ca(n.ownerDocument)===n||n.defaultValue===""+c||(n.defaultValue=""+c)}function Nr(n,s,c,d){if(n=n.options,s){s={};for(var v=0;v<c.length;v++)s["$"+c[v]]=!0;for(c=0;c<n.length;c++)v=s.hasOwnProperty("$"+n[c].value),n[c].selected!==v&&(n[c].selected=v),v&&d&&(n[c].defaultSelected=!0)}else{for(c=""+gn(c),s=null,v=0;v<n.length;v++){if(n[v].value===c){n[v].selected=!0,d&&(n[v].defaultSelected=!0);return}s!==null||n[v].disabled||(s=n[v])}s!==null&&(s.selected=!0)}}function Bc(n,s,c){if(s!=null&&(s=""+gn(s),s!==n.value&&(n.value=s),c==null)){n.defaultValue!==s&&(n.defaultValue=s);return}n.defaultValue=c!=null?""+gn(c):""}function Uc(n,s,c,d){if(s==null){if(d!=null){if(c!=null)throw Error(a(92));if(Q(d)){if(1<d.length)throw Error(a(93));d=d[0]}c=d}c==null&&(c=""),s=c}c=gn(s),n.defaultValue=c,d=n.textContent,d===c&&d!==""&&d!==null&&(n.value=d)}function $r(n,s){if(s){var c=n.firstChild;if(c&&c===n.lastChild&&c.nodeType===3){c.nodeValue=s;return}}n.textContent=s}var nh=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Hc(n,s,c){var d=s.indexOf("--")===0;c==null||typeof c=="boolean"||c===""?d?n.setProperty(s,""):s==="float"?n.cssFloat="":n[s]="":d?n.setProperty(s,c):typeof c!="number"||c===0||nh.has(s)?s==="float"?n.cssFloat=c:n[s]=(""+c).trim():n[s]=c+"px"}function Vc(n,s,c){if(s!=null&&typeof s!="object")throw Error(a(62));if(n=n.style,c!=null){for(var d in c)!c.hasOwnProperty(d)||s!=null&&s.hasOwnProperty(d)||(d.indexOf("--")===0?n.setProperty(d,""):d==="float"?n.cssFloat="":n[d]="");for(var v in s)d=s[v],s.hasOwnProperty(v)&&c[v]!==d&&Hc(n,v,d)}else for(var C in s)s.hasOwnProperty(C)&&Hc(n,C,s[C])}function Qs(n){if(n.indexOf("-")===-1)return!1;switch(n){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var rh=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),ih=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Aa(n){return ih.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}var Zs=null;function Js(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var Fr=null,Ir=null;function qc(n){var s=ft(n);if(s&&(n=s.stateNode)){var c=n[Ie]||null;e:switch(n=s.stateNode,s.type){case"input":if(Ys(n,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name),s=c.name,c.type==="radio"&&s!=null){for(c=n;c.parentNode;)c=c.parentNode;for(c=c.querySelectorAll('input[name="'+vn(""+s)+'"][type="radio"]'),s=0;s<c.length;s++){var d=c[s];if(d!==n&&d.form===n.form){var v=d[Ie]||null;if(!v)throw Error(a(90));Ys(d,v.value,v.defaultValue,v.defaultValue,v.checked,v.defaultChecked,v.type,v.name)}}for(s=0;s<c.length;s++)d=c[s],d.form===n.form&&Ic(d)}break e;case"textarea":Bc(n,c.value,c.defaultValue);break e;case"select":s=c.value,s!=null&&Nr(n,!!c.multiple,s,!1)}}}var eo=!1;function Gc(n,s,c){if(eo)return n(s,c);eo=!0;try{var d=n(s);return d}finally{if(eo=!1,(Fr!==null||Ir!==null)&&(ds(),Fr&&(s=Fr,n=Ir,Ir=Fr=null,qc(s),n)))for(s=0;s<n.length;s++)qc(n[s])}}function xi(n,s){var c=n.stateNode;if(c===null)return null;var d=c[Ie]||null;if(d===null)return null;c=d[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(d=!d.disabled)||(n=n.type,d=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!d;break e;default:n=!1}if(n)return null;if(c&&typeof c!="function")throw Error(a(231,s,typeof c));return c}var Ln=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),to=!1;if(Ln)try{var Si={};Object.defineProperty(Si,"passive",{get:function(){to=!0}}),window.addEventListener("test",Si,Si),window.removeEventListener("test",Si,Si)}catch{to=!1}var Kn=null,no=null,Ra=null;function Wc(){if(Ra)return Ra;var n,s=no,c=s.length,d,v="value"in Kn?Kn.value:Kn.textContent,C=v.length;for(n=0;n<c&&s[n]===v[n];n++);var q=c-n;for(d=1;d<=q&&s[c-d]===v[C-d];d++);return Ra=v.slice(n,1<d?1-d:void 0)}function _a(n){var s=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&s===13&&(n=13)):n=s,n===10&&(n=13),32<=n||n===13?n:0}function Ta(){return!0}function Xc(){return!1}function rn(n){function s(c,d,v,C,q){this._reactName=c,this._targetInst=v,this.type=d,this.nativeEvent=C,this.target=q,this.currentTarget=null;for(var Z in n)n.hasOwnProperty(Z)&&(c=n[Z],this[Z]=c?c(C):C[Z]);return this.isDefaultPrevented=(C.defaultPrevented!=null?C.defaultPrevented:C.returnValue===!1)?Ta:Xc,this.isPropagationStopped=Xc,this}return m(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var c=this.nativeEvent;c&&(c.preventDefault?c.preventDefault():typeof c.returnValue!="unknown"&&(c.returnValue=!1),this.isDefaultPrevented=Ta)},stopPropagation:function(){var c=this.nativeEvent;c&&(c.stopPropagation?c.stopPropagation():typeof c.cancelBubble!="unknown"&&(c.cancelBubble=!0),this.isPropagationStopped=Ta)},persist:function(){},isPersistent:Ta}),s}var yr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Pa=rn(yr),Ei=m({},yr,{view:0,detail:0}),ah=rn(Ei),ro,io,wi,ka=m({},Ei,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:so,button:0,buttons:0,relatedTarget:function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},movementX:function(n){return"movementX"in n?n.movementX:(n!==wi&&(wi&&n.type==="mousemove"?(ro=n.screenX-wi.screenX,io=n.screenY-wi.screenY):io=ro=0,wi=n),ro)},movementY:function(n){return"movementY"in n?n.movementY:io}}),Yc=rn(ka),sh=m({},ka,{dataTransfer:0}),oh=rn(sh),lh=m({},Ei,{relatedTarget:0}),ao=rn(lh),ch=m({},yr,{animationName:0,elapsedTime:0,pseudoElement:0}),uh=rn(ch),dh=m({},yr,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),fh=rn(dh),ph=m({},yr,{data:0}),Kc=rn(ph),hh={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},mh={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},gh={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function vh(n){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(n):(n=gh[n])?!!s[n]:!1}function so(){return vh}var yh=m({},Ei,{key:function(n){if(n.key){var s=hh[n.key]||n.key;if(s!=="Unidentified")return s}return n.type==="keypress"?(n=_a(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?mh[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:so,charCode:function(n){return n.type==="keypress"?_a(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?_a(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),bh=rn(yh),xh=m({},ka,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Qc=rn(xh),Sh=m({},Ei,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:so}),Eh=rn(Sh),wh=m({},yr,{propertyName:0,elapsedTime:0,pseudoElement:0}),Ch=rn(wh),Ah=m({},ka,{deltaX:function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),Rh=rn(Ah),_h=m({},yr,{newState:0,oldState:0}),Th=rn(_h),Ph=[9,13,27,32],oo=Ln&&"CompositionEvent"in window,Ci=null;Ln&&"documentMode"in document&&(Ci=document.documentMode);var kh=Ln&&"TextEvent"in window&&!Ci,Zc=Ln&&(!oo||Ci&&8<Ci&&11>=Ci),Jc=" ",eu=!1;function tu(n,s){switch(n){case"keyup":return Ph.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function nu(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var zr=!1;function Oh(n,s){switch(n){case"compositionend":return nu(s);case"keypress":return s.which!==32?null:(eu=!0,Jc);case"textInput":return n=s.data,n===Jc&&eu?null:n;default:return null}}function Dh(n,s){if(zr)return n==="compositionend"||!oo&&tu(n,s)?(n=Wc(),Ra=no=Kn=null,zr=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return Zc&&s.locale!=="ko"?null:s.data;default:return null}}var Mh={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function ru(n){var s=n&&n.nodeName&&n.nodeName.toLowerCase();return s==="input"?!!Mh[n.type]:s==="textarea"}function iu(n,s,c,d){Fr?Ir?Ir.push(d):Ir=[d]:Fr=d,s=vs(s,"onChange"),0<s.length&&(c=new Pa("onChange","change",null,c,d),n.push({event:c,listeners:s}))}var Ai=null,Ri=null;function jh(n){If(n,0)}function Oa(n){var s=yt(n);if(Ic(s))return n}function au(n,s){if(n==="change")return s}var su=!1;if(Ln){var lo;if(Ln){var co="oninput"in document;if(!co){var ou=document.createElement("div");ou.setAttribute("oninput","return;"),co=typeof ou.oninput=="function"}lo=co}else lo=!1;su=lo&&(!document.documentMode||9<document.documentMode)}function lu(){Ai&&(Ai.detachEvent("onpropertychange",cu),Ri=Ai=null)}function cu(n){if(n.propertyName==="value"&&Oa(Ri)){var s=[];iu(s,Ri,n,Js(n)),Gc(jh,s)}}function Lh(n,s,c){n==="focusin"?(lu(),Ai=s,Ri=c,Ai.attachEvent("onpropertychange",cu)):n==="focusout"&&lu()}function Nh(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return Oa(Ri)}function $h(n,s){if(n==="click")return Oa(s)}function Fh(n,s){if(n==="input"||n==="change")return Oa(s)}function Ih(n,s){return n===s&&(n!==0||1/n===1/s)||n!==n&&s!==s}var ln=typeof Object.is=="function"?Object.is:Ih;function _i(n,s){if(ln(n,s))return!0;if(typeof n!="object"||n===null||typeof s!="object"||s===null)return!1;var c=Object.keys(n),d=Object.keys(s);if(c.length!==d.length)return!1;for(d=0;d<c.length;d++){var v=c[d];if(!Ee.call(s,v)||!ln(n[v],s[v]))return!1}return!0}function uu(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function du(n,s){var c=uu(n);n=0;for(var d;c;){if(c.nodeType===3){if(d=n+c.textContent.length,n<=s&&d>=s)return{node:c,offset:s-n};n=d}e:{for(;c;){if(c.nextSibling){c=c.nextSibling;break e}c=c.parentNode}c=void 0}c=uu(c)}}function fu(n,s){return n&&s?n===s?!0:n&&n.nodeType===3?!1:s&&s.nodeType===3?fu(n,s.parentNode):"contains"in n?n.contains(s):n.compareDocumentPosition?!!(n.compareDocumentPosition(s)&16):!1:!1}function pu(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var s=Ca(n.document);s instanceof n.HTMLIFrameElement;){try{var c=typeof s.contentWindow.location.href=="string"}catch{c=!1}if(c)n=s.contentWindow;else break;s=Ca(n.document)}return s}function uo(n){var s=n&&n.nodeName&&n.nodeName.toLowerCase();return s&&(s==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||s==="textarea"||n.contentEditable==="true")}var zh=Ln&&"documentMode"in document&&11>=document.documentMode,Br=null,fo=null,Ti=null,po=!1;function hu(n,s,c){var d=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;po||Br==null||Br!==Ca(d)||(d=Br,"selectionStart"in d&&uo(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),Ti&&_i(Ti,d)||(Ti=d,d=vs(fo,"onSelect"),0<d.length&&(s=new Pa("onSelect","select",null,s,c),n.push({event:s,listeners:d}),s.target=Br)))}function br(n,s){var c={};return c[n.toLowerCase()]=s.toLowerCase(),c["Webkit"+n]="webkit"+s,c["Moz"+n]="moz"+s,c}var Ur={animationend:br("Animation","AnimationEnd"),animationiteration:br("Animation","AnimationIteration"),animationstart:br("Animation","AnimationStart"),transitionrun:br("Transition","TransitionRun"),transitionstart:br("Transition","TransitionStart"),transitioncancel:br("Transition","TransitionCancel"),transitionend:br("Transition","TransitionEnd")},ho={},mu={};Ln&&(mu=document.createElement("div").style,"AnimationEvent"in window||(delete Ur.animationend.animation,delete Ur.animationiteration.animation,delete Ur.animationstart.animation),"TransitionEvent"in window||delete Ur.transitionend.transition);function xr(n){if(ho[n])return ho[n];if(!Ur[n])return n;var s=Ur[n],c;for(c in s)if(s.hasOwnProperty(c)&&c in mu)return ho[n]=s[c];return n}var gu=xr("animationend"),vu=xr("animationiteration"),yu=xr("animationstart"),Bh=xr("transitionrun"),Uh=xr("transitionstart"),Hh=xr("transitioncancel"),bu=xr("transitionend"),xu=new Map,mo="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");mo.push("scrollEnd");function Rn(n,s){xu.set(n,s),Jt(s,[n])}var Su=new WeakMap;function yn(n,s){if(typeof n=="object"&&n!==null){var c=Su.get(n);return c!==void 0?c:(s={value:n,source:s,stack:$c(s)},Su.set(n,s),s)}return{value:n,source:s,stack:$c(s)}}var bn=[],Hr=0,go=0;function Da(){for(var n=Hr,s=go=Hr=0;s<n;){var c=bn[s];bn[s++]=null;var d=bn[s];bn[s++]=null;var v=bn[s];bn[s++]=null;var C=bn[s];if(bn[s++]=null,d!==null&&v!==null){var q=d.pending;q===null?v.next=v:(v.next=q.next,q.next=v),d.pending=v}C!==0&&Eu(c,v,C)}}function Ma(n,s,c,d){bn[Hr++]=n,bn[Hr++]=s,bn[Hr++]=c,bn[Hr++]=d,go|=d,n.lanes|=d,n=n.alternate,n!==null&&(n.lanes|=d)}function vo(n,s,c,d){return Ma(n,s,c,d),ja(n)}function Vr(n,s){return Ma(n,null,null,s),ja(n)}function Eu(n,s,c){n.lanes|=c;var d=n.alternate;d!==null&&(d.lanes|=c);for(var v=!1,C=n.return;C!==null;)C.childLanes|=c,d=C.alternate,d!==null&&(d.childLanes|=c),C.tag===22&&(n=C.stateNode,n===null||n._visibility&1||(v=!0)),n=C,C=C.return;return n.tag===3?(C=n.stateNode,v&&s!==null&&(v=31-qe(c),n=C.hiddenUpdates,d=n[v],d===null?n[v]=[s]:d.push(s),s.lane=c|536870912),C):null}function ja(n){if(50<Ji)throw Ji=0,wl=null,Error(a(185));for(var s=n.return;s!==null;)n=s,s=n.return;return n.tag===3?n.stateNode:null}var qr={};function Vh(n,s,c,d){this.tag=n,this.key=c,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=d,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function cn(n,s,c,d){return new Vh(n,s,c,d)}function yo(n){return n=n.prototype,!(!n||!n.isReactComponent)}function Nn(n,s){var c=n.alternate;return c===null?(c=cn(n.tag,s,n.key,n.mode),c.elementType=n.elementType,c.type=n.type,c.stateNode=n.stateNode,c.alternate=n,n.alternate=c):(c.pendingProps=s,c.type=n.type,c.flags=0,c.subtreeFlags=0,c.deletions=null),c.flags=n.flags&65011712,c.childLanes=n.childLanes,c.lanes=n.lanes,c.child=n.child,c.memoizedProps=n.memoizedProps,c.memoizedState=n.memoizedState,c.updateQueue=n.updateQueue,s=n.dependencies,c.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},c.sibling=n.sibling,c.index=n.index,c.ref=n.ref,c.refCleanup=n.refCleanup,c}function wu(n,s){n.flags&=65011714;var c=n.alternate;return c===null?(n.childLanes=0,n.lanes=s,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=c.childLanes,n.lanes=c.lanes,n.child=c.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=c.memoizedProps,n.memoizedState=c.memoizedState,n.updateQueue=c.updateQueue,n.type=c.type,s=c.dependencies,n.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),n}function La(n,s,c,d,v,C){var q=0;if(d=n,typeof n=="function")yo(n)&&(q=1);else if(typeof n=="string")q=Wm(n,c,$.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case j:return n=cn(31,c,s,v),n.elementType=j,n.lanes=C,n;case y:return Sr(c.children,v,C,s);case S:q=8,v|=24;break;case E:return n=cn(12,c,s,v|2),n.elementType=E,n.lanes=C,n;case A:return n=cn(13,c,s,v),n.elementType=A,n.lanes=C,n;case D:return n=cn(19,c,s,v),n.elementType=D,n.lanes=C,n;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case w:case O:q=10;break e;case _:q=9;break e;case k:q=11;break e;case R:q=14;break e;case T:q=16,d=null;break e}q=29,c=Error(a(130,n===null?"null":typeof n,"")),d=null}return s=cn(q,c,s,v),s.elementType=n,s.type=d,s.lanes=C,s}function Sr(n,s,c,d){return n=cn(7,n,d,s),n.lanes=c,n}function bo(n,s,c){return n=cn(6,n,null,s),n.lanes=c,n}function xo(n,s,c){return s=cn(4,n.children!==null?n.children:[],n.key,s),s.lanes=c,s.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},s}var Gr=[],Wr=0,Na=null,$a=0,xn=[],Sn=0,Er=null,$n=1,Fn="";function wr(n,s){Gr[Wr++]=$a,Gr[Wr++]=Na,Na=n,$a=s}function Cu(n,s,c){xn[Sn++]=$n,xn[Sn++]=Fn,xn[Sn++]=Er,Er=n;var d=$n;n=Fn;var v=32-qe(d)-1;d&=~(1<<v),c+=1;var C=32-qe(s)+v;if(30<C){var q=v-v%5;C=(d&(1<<q)-1).toString(32),d>>=q,v-=q,$n=1<<32-qe(s)+v|c<<v|d,Fn=C+n}else $n=1<<C|c<<v|d,Fn=n}function So(n){n.return!==null&&(wr(n,1),Cu(n,1,0))}function Eo(n){for(;n===Na;)Na=Gr[--Wr],Gr[Wr]=null,$a=Gr[--Wr],Gr[Wr]=null;for(;n===Er;)Er=xn[--Sn],xn[Sn]=null,Fn=xn[--Sn],xn[Sn]=null,$n=xn[--Sn],xn[Sn]=null}var nn=null,It=null,_t=!1,Cr=null,Pn=!1,wo=Error(a(519));function Ar(n){var s=Error(a(418,""));throw Oi(yn(s,n)),wo}function Au(n){var s=n.stateNode,c=n.type,d=n.memoizedProps;switch(s[_e]=n,s[Ie]=d,c){case"dialog":Ct("cancel",s),Ct("close",s);break;case"iframe":case"object":case"embed":Ct("load",s);break;case"video":case"audio":for(c=0;c<ta.length;c++)Ct(ta[c],s);break;case"source":Ct("error",s);break;case"img":case"image":case"link":Ct("error",s),Ct("load",s);break;case"details":Ct("toggle",s);break;case"input":Ct("invalid",s),zc(s,d.value,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name,!0),wa(s);break;case"select":Ct("invalid",s);break;case"textarea":Ct("invalid",s),Uc(s,d.value,d.defaultValue,d.children),wa(s)}c=d.children,typeof c!="string"&&typeof c!="number"&&typeof c!="bigint"||s.textContent===""+c||d.suppressHydrationWarning===!0||Hf(s.textContent,c)?(d.popover!=null&&(Ct("beforetoggle",s),Ct("toggle",s)),d.onScroll!=null&&Ct("scroll",s),d.onScrollEnd!=null&&Ct("scrollend",s),d.onClick!=null&&(s.onclick=ys),s=!0):s=!1,s||Ar(n)}function Ru(n){for(nn=n.return;nn;)switch(nn.tag){case 5:case 13:Pn=!1;return;case 27:case 3:Pn=!0;return;default:nn=nn.return}}function Pi(n){if(n!==nn)return!1;if(!_t)return Ru(n),_t=!0,!1;var s=n.tag,c;if((c=s!==3&&s!==27)&&((c=s===5)&&(c=n.type,c=!(c!=="form"&&c!=="button")||Il(n.type,n.memoizedProps)),c=!c),c&&It&&Ar(n),Ru(n),s===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(317));e:{for(n=n.nextSibling,s=0;n;){if(n.nodeType===8)if(c=n.data,c==="/$"){if(s===0){It=Tn(n.nextSibling);break e}s--}else c!=="$"&&c!=="$!"&&c!=="$?"||s++;n=n.nextSibling}It=null}}else s===27?(s=It,fr(n.type)?(n=Hl,Hl=null,It=n):It=s):It=nn?Tn(n.stateNode.nextSibling):null;return!0}function ki(){It=nn=null,_t=!1}function _u(){var n=Cr;return n!==null&&(on===null?on=n:on.push.apply(on,n),Cr=null),n}function Oi(n){Cr===null?Cr=[n]:Cr.push(n)}var Co=X(null),Rr=null,In=null;function Qn(n,s,c){L(Co,s._currentValue),s._currentValue=c}function zn(n){n._currentValue=Co.current,z(Co)}function Ao(n,s,c){for(;n!==null;){var d=n.alternate;if((n.childLanes&s)!==s?(n.childLanes|=s,d!==null&&(d.childLanes|=s)):d!==null&&(d.childLanes&s)!==s&&(d.childLanes|=s),n===c)break;n=n.return}}function Ro(n,s,c,d){var v=n.child;for(v!==null&&(v.return=n);v!==null;){var C=v.dependencies;if(C!==null){var q=v.child;C=C.firstContext;e:for(;C!==null;){var Z=C;C=v;for(var fe=0;fe<s.length;fe++)if(Z.context===s[fe]){C.lanes|=c,Z=C.alternate,Z!==null&&(Z.lanes|=c),Ao(C.return,c,n),d||(q=null);break e}C=Z.next}}else if(v.tag===18){if(q=v.return,q===null)throw Error(a(341));q.lanes|=c,C=q.alternate,C!==null&&(C.lanes|=c),Ao(q,c,n),q=null}else q=v.child;if(q!==null)q.return=v;else for(q=v;q!==null;){if(q===n){q=null;break}if(v=q.sibling,v!==null){v.return=q.return,q=v;break}q=q.return}v=q}}function Di(n,s,c,d){n=null;for(var v=s,C=!1;v!==null;){if(!C){if((v.flags&524288)!==0)C=!0;else if((v.flags&262144)!==0)break}if(v.tag===10){var q=v.alternate;if(q===null)throw Error(a(387));if(q=q.memoizedProps,q!==null){var Z=v.type;ln(v.pendingProps.value,q.value)||(n!==null?n.push(Z):n=[Z])}}else if(v===te.current){if(q=v.alternate,q===null)throw Error(a(387));q.memoizedState.memoizedState!==v.memoizedState.memoizedState&&(n!==null?n.push(oa):n=[oa])}v=v.return}n!==null&&Ro(s,n,c,d),s.flags|=262144}function Fa(n){for(n=n.firstContext;n!==null;){if(!ln(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function _r(n){Rr=n,In=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function en(n){return Tu(Rr,n)}function Ia(n,s){return Rr===null&&_r(n),Tu(n,s)}function Tu(n,s){var c=s._currentValue;if(s={context:s,memoizedValue:c,next:null},In===null){if(n===null)throw Error(a(308));In=s,n.dependencies={lanes:0,firstContext:s},n.flags|=524288}else In=In.next=s;return c}var qh=typeof AbortController<"u"?AbortController:function(){var n=[],s=this.signal={aborted:!1,addEventListener:function(c,d){n.push(d)}};this.abort=function(){s.aborted=!0,n.forEach(function(c){return c()})}},Gh=e.unstable_scheduleCallback,Wh=e.unstable_NormalPriority,qt={$$typeof:O,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function _o(){return{controller:new qh,data:new Map,refCount:0}}function Mi(n){n.refCount--,n.refCount===0&&Gh(Wh,function(){n.controller.abort()})}var ji=null,To=0,Xr=0,Yr=null;function Xh(n,s){if(ji===null){var c=ji=[];To=0,Xr=kl(),Yr={status:"pending",value:void 0,then:function(d){c.push(d)}}}return To++,s.then(Pu,Pu),s}function Pu(){if(--To===0&&ji!==null){Yr!==null&&(Yr.status="fulfilled");var n=ji;ji=null,Xr=0,Yr=null;for(var s=0;s<n.length;s++)(0,n[s])()}}function Yh(n,s){var c=[],d={status:"pending",value:null,reason:null,then:function(v){c.push(v)}};return n.then(function(){d.status="fulfilled",d.value=s;for(var v=0;v<c.length;v++)(0,c[v])(s)},function(v){for(d.status="rejected",d.reason=v,v=0;v<c.length;v++)(0,c[v])(void 0)}),d}var ku=B.S;B.S=function(n,s){typeof s=="object"&&s!==null&&typeof s.then=="function"&&Xh(n,s),ku!==null&&ku(n,s)};var Tr=X(null);function Po(){var n=Tr.current;return n!==null?n:Nt.pooledCache}function za(n,s){s===null?L(Tr,Tr.current):L(Tr,s.pool)}function Ou(){var n=Po();return n===null?null:{parent:qt._currentValue,pool:n}}var Li=Error(a(460)),Du=Error(a(474)),Ba=Error(a(542)),ko={then:function(){}};function Mu(n){return n=n.status,n==="fulfilled"||n==="rejected"}function Ua(){}function ju(n,s,c){switch(c=n[c],c===void 0?n.push(s):c!==s&&(s.then(Ua,Ua),s=c),s.status){case"fulfilled":return s.value;case"rejected":throw n=s.reason,Nu(n),n;default:if(typeof s.status=="string")s.then(Ua,Ua);else{if(n=Nt,n!==null&&100<n.shellSuspendCounter)throw Error(a(482));n=s,n.status="pending",n.then(function(d){if(s.status==="pending"){var v=s;v.status="fulfilled",v.value=d}},function(d){if(s.status==="pending"){var v=s;v.status="rejected",v.reason=d}})}switch(s.status){case"fulfilled":return s.value;case"rejected":throw n=s.reason,Nu(n),n}throw Ni=s,Li}}var Ni=null;function Lu(){if(Ni===null)throw Error(a(459));var n=Ni;return Ni=null,n}function Nu(n){if(n===Li||n===Ba)throw Error(a(483))}var Zn=!1;function Oo(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Do(n,s){n=n.updateQueue,s.updateQueue===n&&(s.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,callbacks:null})}function Jn(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function er(n,s,c){var d=n.updateQueue;if(d===null)return null;if(d=d.shared,(Tt&2)!==0){var v=d.pending;return v===null?s.next=s:(s.next=v.next,v.next=s),d.pending=s,s=ja(n),Eu(n,null,c),s}return Ma(n,d,s,c),ja(n)}function $i(n,s,c){if(s=s.updateQueue,s!==null&&(s=s.shared,(c&4194048)!==0)){var d=s.lanes;d&=n.pendingLanes,c|=d,s.lanes=c,at(n,c)}}function Mo(n,s){var c=n.updateQueue,d=n.alternate;if(d!==null&&(d=d.updateQueue,c===d)){var v=null,C=null;if(c=c.firstBaseUpdate,c!==null){do{var q={lane:c.lane,tag:c.tag,payload:c.payload,callback:null,next:null};C===null?v=C=q:C=C.next=q,c=c.next}while(c!==null);C===null?v=C=s:C=C.next=s}else v=C=s;c={baseState:d.baseState,firstBaseUpdate:v,lastBaseUpdate:C,shared:d.shared,callbacks:d.callbacks},n.updateQueue=c;return}n=c.lastBaseUpdate,n===null?c.firstBaseUpdate=s:n.next=s,c.lastBaseUpdate=s}var jo=!1;function Fi(){if(jo){var n=Yr;if(n!==null)throw n}}function Ii(n,s,c,d){jo=!1;var v=n.updateQueue;Zn=!1;var C=v.firstBaseUpdate,q=v.lastBaseUpdate,Z=v.shared.pending;if(Z!==null){v.shared.pending=null;var fe=Z,Me=fe.next;fe.next=null,q===null?C=Me:q.next=Me,q=fe;var Ue=n.alternate;Ue!==null&&(Ue=Ue.updateQueue,Z=Ue.lastBaseUpdate,Z!==q&&(Z===null?Ue.firstBaseUpdate=Me:Z.next=Me,Ue.lastBaseUpdate=fe))}if(C!==null){var Ve=v.baseState;q=0,Ue=Me=fe=null,Z=C;do{var $e=Z.lane&-536870913,ze=$e!==Z.lane;if(ze?(At&$e)===$e:(d&$e)===$e){$e!==0&&$e===Xr&&(jo=!0),Ue!==null&&(Ue=Ue.next={lane:0,tag:Z.tag,payload:Z.payload,callback:null,next:null});e:{var vt=n,mt=Z;$e=s;var Mt=c;switch(mt.tag){case 1:if(vt=mt.payload,typeof vt=="function"){Ve=vt.call(Mt,Ve,$e);break e}Ve=vt;break e;case 3:vt.flags=vt.flags&-65537|128;case 0:if(vt=mt.payload,$e=typeof vt=="function"?vt.call(Mt,Ve,$e):vt,$e==null)break e;Ve=m({},Ve,$e);break e;case 2:Zn=!0}}$e=Z.callback,$e!==null&&(n.flags|=64,ze&&(n.flags|=8192),ze=v.callbacks,ze===null?v.callbacks=[$e]:ze.push($e))}else ze={lane:$e,tag:Z.tag,payload:Z.payload,callback:Z.callback,next:null},Ue===null?(Me=Ue=ze,fe=Ve):Ue=Ue.next=ze,q|=$e;if(Z=Z.next,Z===null){if(Z=v.shared.pending,Z===null)break;ze=Z,Z=ze.next,ze.next=null,v.lastBaseUpdate=ze,v.shared.pending=null}}while(!0);Ue===null&&(fe=Ve),v.baseState=fe,v.firstBaseUpdate=Me,v.lastBaseUpdate=Ue,C===null&&(v.shared.lanes=0),lr|=q,n.lanes=q,n.memoizedState=Ve}}function $u(n,s){if(typeof n!="function")throw Error(a(191,n));n.call(s)}function Fu(n,s){var c=n.callbacks;if(c!==null)for(n.callbacks=null,n=0;n<c.length;n++)$u(c[n],s)}var Kr=X(null),Ha=X(0);function Iu(n,s){n=Wn,L(Ha,n),L(Kr,s),Wn=n|s.baseLanes}function Lo(){L(Ha,Wn),L(Kr,Kr.current)}function No(){Wn=Ha.current,z(Kr),z(Ha)}var tr=0,bt=null,Ot=null,Ht=null,Va=!1,Qr=!1,Pr=!1,qa=0,zi=0,Zr=null,Kh=0;function Bt(){throw Error(a(321))}function $o(n,s){if(s===null)return!1;for(var c=0;c<s.length&&c<n.length;c++)if(!ln(n[c],s[c]))return!1;return!0}function Fo(n,s,c,d,v,C){return tr=C,bt=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,B.H=n===null||n.memoizedState===null?Ed:wd,Pr=!1,C=c(d,v),Pr=!1,Qr&&(C=Bu(s,c,d,v)),zu(n),C}function zu(n){B.H=Qa;var s=Ot!==null&&Ot.next!==null;if(tr=0,Ht=Ot=bt=null,Va=!1,zi=0,Zr=null,s)throw Error(a(300));n===null||Wt||(n=n.dependencies,n!==null&&Fa(n)&&(Wt=!0))}function Bu(n,s,c,d){bt=n;var v=0;do{if(Qr&&(Zr=null),zi=0,Qr=!1,25<=v)throw Error(a(301));if(v+=1,Ht=Ot=null,n.updateQueue!=null){var C=n.updateQueue;C.lastEffect=null,C.events=null,C.stores=null,C.memoCache!=null&&(C.memoCache.index=0)}B.H=im,C=s(c,d)}while(Qr);return C}function Qh(){var n=B.H,s=n.useState()[0];return s=typeof s.then=="function"?Bi(s):s,n=n.useState()[0],(Ot!==null?Ot.memoizedState:null)!==n&&(bt.flags|=1024),s}function Io(){var n=qa!==0;return qa=0,n}function zo(n,s,c){s.updateQueue=n.updateQueue,s.flags&=-2053,n.lanes&=~c}function Bo(n){if(Va){for(n=n.memoizedState;n!==null;){var s=n.queue;s!==null&&(s.pending=null),n=n.next}Va=!1}tr=0,Ht=Ot=bt=null,Qr=!1,zi=qa=0,Zr=null}function an(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ht===null?bt.memoizedState=Ht=n:Ht=Ht.next=n,Ht}function Vt(){if(Ot===null){var n=bt.alternate;n=n!==null?n.memoizedState:null}else n=Ot.next;var s=Ht===null?bt.memoizedState:Ht.next;if(s!==null)Ht=s,Ot=n;else{if(n===null)throw bt.alternate===null?Error(a(467)):Error(a(310));Ot=n,n={memoizedState:Ot.memoizedState,baseState:Ot.baseState,baseQueue:Ot.baseQueue,queue:Ot.queue,next:null},Ht===null?bt.memoizedState=Ht=n:Ht=Ht.next=n}return Ht}function Uo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Bi(n){var s=zi;return zi+=1,Zr===null&&(Zr=[]),n=ju(Zr,n,s),s=bt,(Ht===null?s.memoizedState:Ht.next)===null&&(s=s.alternate,B.H=s===null||s.memoizedState===null?Ed:wd),n}function Ga(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return Bi(n);if(n.$$typeof===O)return en(n)}throw Error(a(438,String(n)))}function Ho(n){var s=null,c=bt.updateQueue;if(c!==null&&(s=c.memoCache),s==null){var d=bt.alternate;d!==null&&(d=d.updateQueue,d!==null&&(d=d.memoCache,d!=null&&(s={data:d.data.map(function(v){return v.slice()}),index:0})))}if(s==null&&(s={data:[],index:0}),c===null&&(c=Uo(),bt.updateQueue=c),c.memoCache=s,c=s.data[s.index],c===void 0)for(c=s.data[s.index]=Array(n),d=0;d<n;d++)c[d]=P;return s.index++,c}function Bn(n,s){return typeof s=="function"?s(n):s}function Wa(n){var s=Vt();return Vo(s,Ot,n)}function Vo(n,s,c){var d=n.queue;if(d===null)throw Error(a(311));d.lastRenderedReducer=c;var v=n.baseQueue,C=d.pending;if(C!==null){if(v!==null){var q=v.next;v.next=C.next,C.next=q}s.baseQueue=v=C,d.pending=null}if(C=n.baseState,v===null)n.memoizedState=C;else{s=v.next;var Z=q=null,fe=null,Me=s,Ue=!1;do{var Ve=Me.lane&-536870913;if(Ve!==Me.lane?(At&Ve)===Ve:(tr&Ve)===Ve){var $e=Me.revertLane;if($e===0)fe!==null&&(fe=fe.next={lane:0,revertLane:0,action:Me.action,hasEagerState:Me.hasEagerState,eagerState:Me.eagerState,next:null}),Ve===Xr&&(Ue=!0);else if((tr&$e)===$e){Me=Me.next,$e===Xr&&(Ue=!0);continue}else Ve={lane:0,revertLane:Me.revertLane,action:Me.action,hasEagerState:Me.hasEagerState,eagerState:Me.eagerState,next:null},fe===null?(Z=fe=Ve,q=C):fe=fe.next=Ve,bt.lanes|=$e,lr|=$e;Ve=Me.action,Pr&&c(C,Ve),C=Me.hasEagerState?Me.eagerState:c(C,Ve)}else $e={lane:Ve,revertLane:Me.revertLane,action:Me.action,hasEagerState:Me.hasEagerState,eagerState:Me.eagerState,next:null},fe===null?(Z=fe=$e,q=C):fe=fe.next=$e,bt.lanes|=Ve,lr|=Ve;Me=Me.next}while(Me!==null&&Me!==s);if(fe===null?q=C:fe.next=Z,!ln(C,n.memoizedState)&&(Wt=!0,Ue&&(c=Yr,c!==null)))throw c;n.memoizedState=C,n.baseState=q,n.baseQueue=fe,d.lastRenderedState=C}return v===null&&(d.lanes=0),[n.memoizedState,d.dispatch]}function qo(n){var s=Vt(),c=s.queue;if(c===null)throw Error(a(311));c.lastRenderedReducer=n;var d=c.dispatch,v=c.pending,C=s.memoizedState;if(v!==null){c.pending=null;var q=v=v.next;do C=n(C,q.action),q=q.next;while(q!==v);ln(C,s.memoizedState)||(Wt=!0),s.memoizedState=C,s.baseQueue===null&&(s.baseState=C),c.lastRenderedState=C}return[C,d]}function Uu(n,s,c){var d=bt,v=Vt(),C=_t;if(C){if(c===void 0)throw Error(a(407));c=c()}else c=s();var q=!ln((Ot||v).memoizedState,c);q&&(v.memoizedState=c,Wt=!0),v=v.queue;var Z=qu.bind(null,d,v,n);if(Ui(2048,8,Z,[n]),v.getSnapshot!==s||q||Ht!==null&&Ht.memoizedState.tag&1){if(d.flags|=2048,Jr(9,Xa(),Vu.bind(null,d,v,c,s),null),Nt===null)throw Error(a(349));C||(tr&124)!==0||Hu(d,s,c)}return c}function Hu(n,s,c){n.flags|=16384,n={getSnapshot:s,value:c},s=bt.updateQueue,s===null?(s=Uo(),bt.updateQueue=s,s.stores=[n]):(c=s.stores,c===null?s.stores=[n]:c.push(n))}function Vu(n,s,c,d){s.value=c,s.getSnapshot=d,Gu(s)&&Wu(n)}function qu(n,s,c){return c(function(){Gu(s)&&Wu(n)})}function Gu(n){var s=n.getSnapshot;n=n.value;try{var c=s();return!ln(n,c)}catch{return!0}}function Wu(n){var s=Vr(n,2);s!==null&&hn(s,n,2)}function Go(n){var s=an();if(typeof n=="function"){var c=n;if(n=c(),Pr){Ye(!0);try{c()}finally{Ye(!1)}}}return s.memoizedState=s.baseState=n,s.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bn,lastRenderedState:n},s}function Xu(n,s,c,d){return n.baseState=c,Vo(n,Ot,typeof d=="function"?d:Bn)}function Zh(n,s,c,d,v){if(Ka(n))throw Error(a(485));if(n=s.action,n!==null){var C={payload:v,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(q){C.listeners.push(q)}};B.T!==null?c(!0):C.isTransition=!1,d(C),c=s.pending,c===null?(C.next=s.pending=C,Yu(s,C)):(C.next=c.next,s.pending=c.next=C)}}function Yu(n,s){var c=s.action,d=s.payload,v=n.state;if(s.isTransition){var C=B.T,q={};B.T=q;try{var Z=c(v,d),fe=B.S;fe!==null&&fe(q,Z),Ku(n,s,Z)}catch(Me){Wo(n,s,Me)}finally{B.T=C}}else try{C=c(v,d),Ku(n,s,C)}catch(Me){Wo(n,s,Me)}}function Ku(n,s,c){c!==null&&typeof c=="object"&&typeof c.then=="function"?c.then(function(d){Qu(n,s,d)},function(d){return Wo(n,s,d)}):Qu(n,s,c)}function Qu(n,s,c){s.status="fulfilled",s.value=c,Zu(s),n.state=c,s=n.pending,s!==null&&(c=s.next,c===s?n.pending=null:(c=c.next,s.next=c,Yu(n,c)))}function Wo(n,s,c){var d=n.pending;if(n.pending=null,d!==null){d=d.next;do s.status="rejected",s.reason=c,Zu(s),s=s.next;while(s!==d)}n.action=null}function Zu(n){n=n.listeners;for(var s=0;s<n.length;s++)(0,n[s])()}function Ju(n,s){return s}function ed(n,s){if(_t){var c=Nt.formState;if(c!==null){e:{var d=bt;if(_t){if(It){t:{for(var v=It,C=Pn;v.nodeType!==8;){if(!C){v=null;break t}if(v=Tn(v.nextSibling),v===null){v=null;break t}}C=v.data,v=C==="F!"||C==="F"?v:null}if(v){It=Tn(v.nextSibling),d=v.data==="F!";break e}}Ar(d)}d=!1}d&&(s=c[0])}}return c=an(),c.memoizedState=c.baseState=s,d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ju,lastRenderedState:s},c.queue=d,c=bd.bind(null,bt,d),d.dispatch=c,d=Go(!1),C=Zo.bind(null,bt,!1,d.queue),d=an(),v={state:s,dispatch:null,action:n,pending:null},d.queue=v,c=Zh.bind(null,bt,v,C,c),v.dispatch=c,d.memoizedState=n,[s,c,!1]}function td(n){var s=Vt();return nd(s,Ot,n)}function nd(n,s,c){if(s=Vo(n,s,Ju)[0],n=Wa(Bn)[0],typeof s=="object"&&s!==null&&typeof s.then=="function")try{var d=Bi(s)}catch(q){throw q===Li?Ba:q}else d=s;s=Vt();var v=s.queue,C=v.dispatch;return c!==s.memoizedState&&(bt.flags|=2048,Jr(9,Xa(),Jh.bind(null,v,c),null)),[d,C,n]}function Jh(n,s){n.action=s}function rd(n){var s=Vt(),c=Ot;if(c!==null)return nd(s,c,n);Vt(),s=s.memoizedState,c=Vt();var d=c.queue.dispatch;return c.memoizedState=n,[s,d,!1]}function Jr(n,s,c,d){return n={tag:n,create:c,deps:d,inst:s,next:null},s=bt.updateQueue,s===null&&(s=Uo(),bt.updateQueue=s),c=s.lastEffect,c===null?s.lastEffect=n.next=n:(d=c.next,c.next=n,n.next=d,s.lastEffect=n),n}function Xa(){return{destroy:void 0,resource:void 0}}function id(){return Vt().memoizedState}function Ya(n,s,c,d){var v=an();d=d===void 0?null:d,bt.flags|=n,v.memoizedState=Jr(1|s,Xa(),c,d)}function Ui(n,s,c,d){var v=Vt();d=d===void 0?null:d;var C=v.memoizedState.inst;Ot!==null&&d!==null&&$o(d,Ot.memoizedState.deps)?v.memoizedState=Jr(s,C,c,d):(bt.flags|=n,v.memoizedState=Jr(1|s,C,c,d))}function ad(n,s){Ya(8390656,8,n,s)}function sd(n,s){Ui(2048,8,n,s)}function od(n,s){return Ui(4,2,n,s)}function ld(n,s){return Ui(4,4,n,s)}function cd(n,s){if(typeof s=="function"){n=n();var c=s(n);return function(){typeof c=="function"?c():s(null)}}if(s!=null)return n=n(),s.current=n,function(){s.current=null}}function ud(n,s,c){c=c!=null?c.concat([n]):null,Ui(4,4,cd.bind(null,s,n),c)}function Xo(){}function dd(n,s){var c=Vt();s=s===void 0?null:s;var d=c.memoizedState;return s!==null&&$o(s,d[1])?d[0]:(c.memoizedState=[n,s],n)}function fd(n,s){var c=Vt();s=s===void 0?null:s;var d=c.memoizedState;if(s!==null&&$o(s,d[1]))return d[0];if(d=n(),Pr){Ye(!0);try{n()}finally{Ye(!1)}}return c.memoizedState=[d,s],d}function Yo(n,s,c){return c===void 0||(tr&1073741824)!==0?n.memoizedState=s:(n.memoizedState=c,n=gf(),bt.lanes|=n,lr|=n,c)}function pd(n,s,c,d){return ln(c,s)?c:Kr.current!==null?(n=Yo(n,c,d),ln(n,s)||(Wt=!0),n):(tr&42)===0?(Wt=!0,n.memoizedState=c):(n=gf(),bt.lanes|=n,lr|=n,s)}function hd(n,s,c,d,v){var C=H.p;H.p=C!==0&&8>C?C:8;var q=B.T,Z={};B.T=Z,Zo(n,!1,s,c);try{var fe=v(),Me=B.S;if(Me!==null&&Me(Z,fe),fe!==null&&typeof fe=="object"&&typeof fe.then=="function"){var Ue=Yh(fe,d);Hi(n,s,Ue,pn(n))}else Hi(n,s,d,pn(n))}catch(Ve){Hi(n,s,{then:function(){},status:"rejected",reason:Ve},pn())}finally{H.p=C,B.T=q}}function tm(){}function Ko(n,s,c,d){if(n.tag!==5)throw Error(a(476));var v=md(n).queue;hd(n,v,s,Y,c===null?tm:function(){return gd(n),c(d)})}function md(n){var s=n.memoizedState;if(s!==null)return s;s={memoizedState:Y,baseState:Y,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bn,lastRenderedState:Y},next:null};var c={};return s.next={memoizedState:c,baseState:c,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bn,lastRenderedState:c},next:null},n.memoizedState=s,n=n.alternate,n!==null&&(n.memoizedState=s),s}function gd(n){var s=md(n).next.queue;Hi(n,s,{},pn())}function Qo(){return en(oa)}function vd(){return Vt().memoizedState}function yd(){return Vt().memoizedState}function nm(n){for(var s=n.return;s!==null;){switch(s.tag){case 24:case 3:var c=pn();n=Jn(c);var d=er(s,n,c);d!==null&&(hn(d,s,c),$i(d,s,c)),s={cache:_o()},n.payload=s;return}s=s.return}}function rm(n,s,c){var d=pn();c={lane:d,revertLane:0,action:c,hasEagerState:!1,eagerState:null,next:null},Ka(n)?xd(s,c):(c=vo(n,s,c,d),c!==null&&(hn(c,n,d),Sd(c,s,d)))}function bd(n,s,c){var d=pn();Hi(n,s,c,d)}function Hi(n,s,c,d){var v={lane:d,revertLane:0,action:c,hasEagerState:!1,eagerState:null,next:null};if(Ka(n))xd(s,v);else{var C=n.alternate;if(n.lanes===0&&(C===null||C.lanes===0)&&(C=s.lastRenderedReducer,C!==null))try{var q=s.lastRenderedState,Z=C(q,c);if(v.hasEagerState=!0,v.eagerState=Z,ln(Z,q))return Ma(n,s,v,0),Nt===null&&Da(),!1}catch{}finally{}if(c=vo(n,s,v,d),c!==null)return hn(c,n,d),Sd(c,s,d),!0}return!1}function Zo(n,s,c,d){if(d={lane:2,revertLane:kl(),action:d,hasEagerState:!1,eagerState:null,next:null},Ka(n)){if(s)throw Error(a(479))}else s=vo(n,c,d,2),s!==null&&hn(s,n,2)}function Ka(n){var s=n.alternate;return n===bt||s!==null&&s===bt}function xd(n,s){Qr=Va=!0;var c=n.pending;c===null?s.next=s:(s.next=c.next,c.next=s),n.pending=s}function Sd(n,s,c){if((c&4194048)!==0){var d=s.lanes;d&=n.pendingLanes,c|=d,s.lanes=c,at(n,c)}}var Qa={readContext:en,use:Ga,useCallback:Bt,useContext:Bt,useEffect:Bt,useImperativeHandle:Bt,useLayoutEffect:Bt,useInsertionEffect:Bt,useMemo:Bt,useReducer:Bt,useRef:Bt,useState:Bt,useDebugValue:Bt,useDeferredValue:Bt,useTransition:Bt,useSyncExternalStore:Bt,useId:Bt,useHostTransitionStatus:Bt,useFormState:Bt,useActionState:Bt,useOptimistic:Bt,useMemoCache:Bt,useCacheRefresh:Bt},Ed={readContext:en,use:Ga,useCallback:function(n,s){return an().memoizedState=[n,s===void 0?null:s],n},useContext:en,useEffect:ad,useImperativeHandle:function(n,s,c){c=c!=null?c.concat([n]):null,Ya(4194308,4,cd.bind(null,s,n),c)},useLayoutEffect:function(n,s){return Ya(4194308,4,n,s)},useInsertionEffect:function(n,s){Ya(4,2,n,s)},useMemo:function(n,s){var c=an();s=s===void 0?null:s;var d=n();if(Pr){Ye(!0);try{n()}finally{Ye(!1)}}return c.memoizedState=[d,s],d},useReducer:function(n,s,c){var d=an();if(c!==void 0){var v=c(s);if(Pr){Ye(!0);try{c(s)}finally{Ye(!1)}}}else v=s;return d.memoizedState=d.baseState=v,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:v},d.queue=n,n=n.dispatch=rm.bind(null,bt,n),[d.memoizedState,n]},useRef:function(n){var s=an();return n={current:n},s.memoizedState=n},useState:function(n){n=Go(n);var s=n.queue,c=bd.bind(null,bt,s);return s.dispatch=c,[n.memoizedState,c]},useDebugValue:Xo,useDeferredValue:function(n,s){var c=an();return Yo(c,n,s)},useTransition:function(){var n=Go(!1);return n=hd.bind(null,bt,n.queue,!0,!1),an().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,s,c){var d=bt,v=an();if(_t){if(c===void 0)throw Error(a(407));c=c()}else{if(c=s(),Nt===null)throw Error(a(349));(At&124)!==0||Hu(d,s,c)}v.memoizedState=c;var C={value:c,getSnapshot:s};return v.queue=C,ad(qu.bind(null,d,C,n),[n]),d.flags|=2048,Jr(9,Xa(),Vu.bind(null,d,C,c,s),null),c},useId:function(){var n=an(),s=Nt.identifierPrefix;if(_t){var c=Fn,d=$n;c=(d&~(1<<32-qe(d)-1)).toString(32)+c,s="«"+s+"R"+c,c=qa++,0<c&&(s+="H"+c.toString(32)),s+="»"}else c=Kh++,s="«"+s+"r"+c.toString(32)+"»";return n.memoizedState=s},useHostTransitionStatus:Qo,useFormState:ed,useActionState:ed,useOptimistic:function(n){var s=an();s.memoizedState=s.baseState=n;var c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return s.queue=c,s=Zo.bind(null,bt,!0,c),c.dispatch=s,[n,s]},useMemoCache:Ho,useCacheRefresh:function(){return an().memoizedState=nm.bind(null,bt)}},wd={readContext:en,use:Ga,useCallback:dd,useContext:en,useEffect:sd,useImperativeHandle:ud,useInsertionEffect:od,useLayoutEffect:ld,useMemo:fd,useReducer:Wa,useRef:id,useState:function(){return Wa(Bn)},useDebugValue:Xo,useDeferredValue:function(n,s){var c=Vt();return pd(c,Ot.memoizedState,n,s)},useTransition:function(){var n=Wa(Bn)[0],s=Vt().memoizedState;return[typeof n=="boolean"?n:Bi(n),s]},useSyncExternalStore:Uu,useId:vd,useHostTransitionStatus:Qo,useFormState:td,useActionState:td,useOptimistic:function(n,s){var c=Vt();return Xu(c,Ot,n,s)},useMemoCache:Ho,useCacheRefresh:yd},im={readContext:en,use:Ga,useCallback:dd,useContext:en,useEffect:sd,useImperativeHandle:ud,useInsertionEffect:od,useLayoutEffect:ld,useMemo:fd,useReducer:qo,useRef:id,useState:function(){return qo(Bn)},useDebugValue:Xo,useDeferredValue:function(n,s){var c=Vt();return Ot===null?Yo(c,n,s):pd(c,Ot.memoizedState,n,s)},useTransition:function(){var n=qo(Bn)[0],s=Vt().memoizedState;return[typeof n=="boolean"?n:Bi(n),s]},useSyncExternalStore:Uu,useId:vd,useHostTransitionStatus:Qo,useFormState:rd,useActionState:rd,useOptimistic:function(n,s){var c=Vt();return Ot!==null?Xu(c,Ot,n,s):(c.baseState=n,[n,c.queue.dispatch])},useMemoCache:Ho,useCacheRefresh:yd},ei=null,Vi=0;function Za(n){var s=Vi;return Vi+=1,ei===null&&(ei=[]),ju(ei,n,s)}function qi(n,s){s=s.props.ref,n.ref=s!==void 0?s:null}function Ja(n,s){throw s.$$typeof===g?Error(a(525)):(n=Object.prototype.toString.call(s),Error(a(31,n==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":n)))}function Cd(n){var s=n._init;return s(n._payload)}function Ad(n){function s(Ae,be){if(n){var ke=Ae.deletions;ke===null?(Ae.deletions=[be],Ae.flags|=16):ke.push(be)}}function c(Ae,be){if(!n)return null;for(;be!==null;)s(Ae,be),be=be.sibling;return null}function d(Ae){for(var be=new Map;Ae!==null;)Ae.key!==null?be.set(Ae.key,Ae):be.set(Ae.index,Ae),Ae=Ae.sibling;return be}function v(Ae,be){return Ae=Nn(Ae,be),Ae.index=0,Ae.sibling=null,Ae}function C(Ae,be,ke){return Ae.index=ke,n?(ke=Ae.alternate,ke!==null?(ke=ke.index,ke<be?(Ae.flags|=67108866,be):ke):(Ae.flags|=67108866,be)):(Ae.flags|=1048576,be)}function q(Ae){return n&&Ae.alternate===null&&(Ae.flags|=67108866),Ae}function Z(Ae,be,ke,He){return be===null||be.tag!==6?(be=bo(ke,Ae.mode,He),be.return=Ae,be):(be=v(be,ke),be.return=Ae,be)}function fe(Ae,be,ke,He){var lt=ke.type;return lt===y?Ue(Ae,be,ke.props.children,He,ke.key):be!==null&&(be.elementType===lt||typeof lt=="object"&<!==null&<.$$typeof===T&&Cd(lt)===be.type)?(be=v(be,ke.props),qi(be,ke),be.return=Ae,be):(be=La(ke.type,ke.key,ke.props,null,Ae.mode,He),qi(be,ke),be.return=Ae,be)}function Me(Ae,be,ke,He){return be===null||be.tag!==4||be.stateNode.containerInfo!==ke.containerInfo||be.stateNode.implementation!==ke.implementation?(be=xo(ke,Ae.mode,He),be.return=Ae,be):(be=v(be,ke.children||[]),be.return=Ae,be)}function Ue(Ae,be,ke,He,lt){return be===null||be.tag!==7?(be=Sr(ke,Ae.mode,He,lt),be.return=Ae,be):(be=v(be,ke),be.return=Ae,be)}function Ve(Ae,be,ke){if(typeof be=="string"&&be!==""||typeof be=="number"||typeof be=="bigint")return be=bo(""+be,Ae.mode,ke),be.return=Ae,be;if(typeof be=="object"&&be!==null){switch(be.$$typeof){case b:return ke=La(be.type,be.key,be.props,null,Ae.mode,ke),qi(ke,be),ke.return=Ae,ke;case x:return be=xo(be,Ae.mode,ke),be.return=Ae,be;case T:var He=be._init;return be=He(be._payload),Ve(Ae,be,ke)}if(Q(be)||I(be))return be=Sr(be,Ae.mode,ke,null),be.return=Ae,be;if(typeof be.then=="function")return Ve(Ae,Za(be),ke);if(be.$$typeof===O)return Ve(Ae,Ia(Ae,be),ke);Ja(Ae,be)}return null}function $e(Ae,be,ke,He){var lt=be!==null?be.key:null;if(typeof ke=="string"&&ke!==""||typeof ke=="number"||typeof ke=="bigint")return lt!==null?null:Z(Ae,be,""+ke,He);if(typeof ke=="object"&&ke!==null){switch(ke.$$typeof){case b:return ke.key===lt?fe(Ae,be,ke,He):null;case x:return ke.key===lt?Me(Ae,be,ke,He):null;case T:return lt=ke._init,ke=lt(ke._payload),$e(Ae,be,ke,He)}if(Q(ke)||I(ke))return lt!==null?null:Ue(Ae,be,ke,He,null);if(typeof ke.then=="function")return $e(Ae,be,Za(ke),He);if(ke.$$typeof===O)return $e(Ae,be,Ia(Ae,ke),He);Ja(Ae,ke)}return null}function ze(Ae,be,ke,He,lt){if(typeof He=="string"&&He!==""||typeof He=="number"||typeof He=="bigint")return Ae=Ae.get(ke)||null,Z(be,Ae,""+He,lt);if(typeof He=="object"&&He!==null){switch(He.$$typeof){case b:return Ae=Ae.get(He.key===null?ke:He.key)||null,fe(be,Ae,He,lt);case x:return Ae=Ae.get(He.key===null?ke:He.key)||null,Me(be,Ae,He,lt);case T:var St=He._init;return He=St(He._payload),ze(Ae,be,ke,He,lt)}if(Q(He)||I(He))return Ae=Ae.get(ke)||null,Ue(be,Ae,He,lt,null);if(typeof He.then=="function")return ze(Ae,be,ke,Za(He),lt);if(He.$$typeof===O)return ze(Ae,be,ke,Ia(be,He),lt);Ja(be,He)}return null}function vt(Ae,be,ke,He){for(var lt=null,St=null,dt=be,gt=be=0,Yt=null;dt!==null&><ke.length;gt++){dt.index>gt?(Yt=dt,dt=null):Yt=dt.sibling;var Rt=$e(Ae,dt,ke[gt],He);if(Rt===null){dt===null&&(dt=Yt);break}n&&dt&&Rt.alternate===null&&s(Ae,dt),be=C(Rt,be,gt),St===null?lt=Rt:St.sibling=Rt,St=Rt,dt=Yt}if(gt===ke.length)return c(Ae,dt),_t&&wr(Ae,gt),lt;if(dt===null){for(;gt<ke.length;gt++)dt=Ve(Ae,ke[gt],He),dt!==null&&(be=C(dt,be,gt),St===null?lt=dt:St.sibling=dt,St=dt);return _t&&wr(Ae,gt),lt}for(dt=d(dt);gt<ke.length;gt++)Yt=ze(dt,Ae,gt,ke[gt],He),Yt!==null&&(n&&Yt.alternate!==null&&dt.delete(Yt.key===null?gt:Yt.key),be=C(Yt,be,gt),St===null?lt=Yt:St.sibling=Yt,St=Yt);return n&&dt.forEach(function(vr){return s(Ae,vr)}),_t&&wr(Ae,gt),lt}function mt(Ae,be,ke,He){if(ke==null)throw Error(a(151));for(var lt=null,St=null,dt=be,gt=be=0,Yt=null,Rt=ke.next();dt!==null&&!Rt.done;gt++,Rt=ke.next()){dt.index>gt?(Yt=dt,dt=null):Yt=dt.sibling;var vr=$e(Ae,dt,Rt.value,He);if(vr===null){dt===null&&(dt=Yt);break}n&&dt&&vr.alternate===null&&s(Ae,dt),be=C(vr,be,gt),St===null?lt=vr:St.sibling=vr,St=vr,dt=Yt}if(Rt.done)return c(Ae,dt),_t&&wr(Ae,gt),lt;if(dt===null){for(;!Rt.done;gt++,Rt=ke.next())Rt=Ve(Ae,Rt.value,He),Rt!==null&&(be=C(Rt,be,gt),St===null?lt=Rt:St.sibling=Rt,St=Rt);return _t&&wr(Ae,gt),lt}for(dt=d(dt);!Rt.done;gt++,Rt=ke.next())Rt=ze(dt,Ae,gt,Rt.value,He),Rt!==null&&(n&&Rt.alternate!==null&&dt.delete(Rt.key===null?gt:Rt.key),be=C(Rt,be,gt),St===null?lt=Rt:St.sibling=Rt,St=Rt);return n&&dt.forEach(function(ag){return s(Ae,ag)}),_t&&wr(Ae,gt),lt}function Mt(Ae,be,ke,He){if(typeof ke=="object"&&ke!==null&&ke.type===y&&ke.key===null&&(ke=ke.props.children),typeof ke=="object"&&ke!==null){switch(ke.$$typeof){case b:e:{for(var lt=ke.key;be!==null;){if(be.key===lt){if(lt=ke.type,lt===y){if(be.tag===7){c(Ae,be.sibling),He=v(be,ke.props.children),He.return=Ae,Ae=He;break e}}else if(be.elementType===lt||typeof lt=="object"&<!==null&<.$$typeof===T&&Cd(lt)===be.type){c(Ae,be.sibling),He=v(be,ke.props),qi(He,ke),He.return=Ae,Ae=He;break e}c(Ae,be);break}else s(Ae,be);be=be.sibling}ke.type===y?(He=Sr(ke.props.children,Ae.mode,He,ke.key),He.return=Ae,Ae=He):(He=La(ke.type,ke.key,ke.props,null,Ae.mode,He),qi(He,ke),He.return=Ae,Ae=He)}return q(Ae);case x:e:{for(lt=ke.key;be!==null;){if(be.key===lt)if(be.tag===4&&be.stateNode.containerInfo===ke.containerInfo&&be.stateNode.implementation===ke.implementation){c(Ae,be.sibling),He=v(be,ke.children||[]),He.return=Ae,Ae=He;break e}else{c(Ae,be);break}else s(Ae,be);be=be.sibling}He=xo(ke,Ae.mode,He),He.return=Ae,Ae=He}return q(Ae);case T:return lt=ke._init,ke=lt(ke._payload),Mt(Ae,be,ke,He)}if(Q(ke))return vt(Ae,be,ke,He);if(I(ke)){if(lt=I(ke),typeof lt!="function")throw Error(a(150));return ke=lt.call(ke),mt(Ae,be,ke,He)}if(typeof ke.then=="function")return Mt(Ae,be,Za(ke),He);if(ke.$$typeof===O)return Mt(Ae,be,Ia(Ae,ke),He);Ja(Ae,ke)}return typeof ke=="string"&&ke!==""||typeof ke=="number"||typeof ke=="bigint"?(ke=""+ke,be!==null&&be.tag===6?(c(Ae,be.sibling),He=v(be,ke),He.return=Ae,Ae=He):(c(Ae,be),He=bo(ke,Ae.mode,He),He.return=Ae,Ae=He),q(Ae)):c(Ae,be)}return function(Ae,be,ke,He){try{Vi=0;var lt=Mt(Ae,be,ke,He);return ei=null,lt}catch(dt){if(dt===Li||dt===Ba)throw dt;var St=cn(29,dt,null,Ae.mode);return St.lanes=He,St.return=Ae,St}finally{}}}var ti=Ad(!0),Rd=Ad(!1),En=X(null),kn=null;function nr(n){var s=n.alternate;L(Gt,Gt.current&1),L(En,n),kn===null&&(s===null||Kr.current!==null||s.memoizedState!==null)&&(kn=n)}function _d(n){if(n.tag===22){if(L(Gt,Gt.current),L(En,n),kn===null){var s=n.alternate;s!==null&&s.memoizedState!==null&&(kn=n)}}else rr()}function rr(){L(Gt,Gt.current),L(En,En.current)}function Un(n){z(En),kn===n&&(kn=null),z(Gt)}var Gt=X(0);function ts(n){for(var s=n;s!==null;){if(s.tag===13){var c=s.memoizedState;if(c!==null&&(c=c.dehydrated,c===null||c.data==="$?"||Ul(c)))return s}else if(s.tag===19&&s.memoizedProps.revealOrder!==void 0){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===n)break;for(;s.sibling===null;){if(s.return===null||s.return===n)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}function Jo(n,s,c,d){s=n.memoizedState,c=c(d,s),c=c==null?s:m({},s,c),n.memoizedState=c,n.lanes===0&&(n.updateQueue.baseState=c)}var el={enqueueSetState:function(n,s,c){n=n._reactInternals;var d=pn(),v=Jn(d);v.payload=s,c!=null&&(v.callback=c),s=er(n,v,d),s!==null&&(hn(s,n,d),$i(s,n,d))},enqueueReplaceState:function(n,s,c){n=n._reactInternals;var d=pn(),v=Jn(d);v.tag=1,v.payload=s,c!=null&&(v.callback=c),s=er(n,v,d),s!==null&&(hn(s,n,d),$i(s,n,d))},enqueueForceUpdate:function(n,s){n=n._reactInternals;var c=pn(),d=Jn(c);d.tag=2,s!=null&&(d.callback=s),s=er(n,d,c),s!==null&&(hn(s,n,c),$i(s,n,c))}};function Td(n,s,c,d,v,C,q){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(d,C,q):s.prototype&&s.prototype.isPureReactComponent?!_i(c,d)||!_i(v,C):!0}function Pd(n,s,c,d){n=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(c,d),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(c,d),s.state!==n&&el.enqueueReplaceState(s,s.state,null)}function kr(n,s){var c=s;if("ref"in s){c={};for(var d in s)d!=="ref"&&(c[d]=s[d])}if(n=n.defaultProps){c===s&&(c=m({},c));for(var v in n)c[v]===void 0&&(c[v]=n[v])}return c}var ns=typeof reportError=="function"?reportError:function(n){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var s=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof n=="object"&&n!==null&&typeof n.message=="string"?String(n.message):String(n),error:n});if(!window.dispatchEvent(s))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",n);return}console.error(n)};function kd(n){ns(n)}function Od(n){console.error(n)}function Dd(n){ns(n)}function rs(n,s){try{var c=n.onUncaughtError;c(s.value,{componentStack:s.stack})}catch(d){setTimeout(function(){throw d})}}function Md(n,s,c){try{var d=n.onCaughtError;d(c.value,{componentStack:c.stack,errorBoundary:s.tag===1?s.stateNode:null})}catch(v){setTimeout(function(){throw v})}}function tl(n,s,c){return c=Jn(c),c.tag=3,c.payload={element:null},c.callback=function(){rs(n,s)},c}function jd(n){return n=Jn(n),n.tag=3,n}function Ld(n,s,c,d){var v=c.type.getDerivedStateFromError;if(typeof v=="function"){var C=d.value;n.payload=function(){return v(C)},n.callback=function(){Md(s,c,d)}}var q=c.stateNode;q!==null&&typeof q.componentDidCatch=="function"&&(n.callback=function(){Md(s,c,d),typeof v!="function"&&(cr===null?cr=new Set([this]):cr.add(this));var Z=d.stack;this.componentDidCatch(d.value,{componentStack:Z!==null?Z:""})})}function am(n,s,c,d,v){if(c.flags|=32768,d!==null&&typeof d=="object"&&typeof d.then=="function"){if(s=c.alternate,s!==null&&Di(s,c,v,!0),c=En.current,c!==null){switch(c.tag){case 13:return kn===null?Al():c.alternate===null&&zt===0&&(zt=3),c.flags&=-257,c.flags|=65536,c.lanes=v,d===ko?c.flags|=16384:(s=c.updateQueue,s===null?c.updateQueue=new Set([d]):s.add(d),_l(n,d,v)),!1;case 22:return c.flags|=65536,d===ko?c.flags|=16384:(s=c.updateQueue,s===null?(s={transitions:null,markerInstances:null,retryQueue:new Set([d])},c.updateQueue=s):(c=s.retryQueue,c===null?s.retryQueue=new Set([d]):c.add(d)),_l(n,d,v)),!1}throw Error(a(435,c.tag))}return _l(n,d,v),Al(),!1}if(_t)return s=En.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=v,d!==wo&&(n=Error(a(422),{cause:d}),Oi(yn(n,c)))):(d!==wo&&(s=Error(a(423),{cause:d}),Oi(yn(s,c))),n=n.current.alternate,n.flags|=65536,v&=-v,n.lanes|=v,d=yn(d,c),v=tl(n.stateNode,d,v),Mo(n,v),zt!==4&&(zt=2)),!1;var C=Error(a(520),{cause:d});if(C=yn(C,c),Zi===null?Zi=[C]:Zi.push(C),zt!==4&&(zt=2),s===null)return!0;d=yn(d,c),c=s;do{switch(c.tag){case 3:return c.flags|=65536,n=v&-v,c.lanes|=n,n=tl(c.stateNode,d,n),Mo(c,n),!1;case 1:if(s=c.type,C=c.stateNode,(c.flags&128)===0&&(typeof s.getDerivedStateFromError=="function"||C!==null&&typeof C.componentDidCatch=="function"&&(cr===null||!cr.has(C))))return c.flags|=65536,v&=-v,c.lanes|=v,v=jd(v),Ld(v,n,c,d),Mo(c,v),!1}c=c.return}while(c!==null);return!1}var Nd=Error(a(461)),Wt=!1;function Kt(n,s,c,d){s.child=n===null?Rd(s,null,c,d):ti(s,n.child,c,d)}function $d(n,s,c,d,v){c=c.render;var C=s.ref;if("ref"in d){var q={};for(var Z in d)Z!=="ref"&&(q[Z]=d[Z])}else q=d;return _r(s),d=Fo(n,s,c,q,C,v),Z=Io(),n!==null&&!Wt?(zo(n,s,v),Hn(n,s,v)):(_t&&Z&&So(s),s.flags|=1,Kt(n,s,d,v),s.child)}function Fd(n,s,c,d,v){if(n===null){var C=c.type;return typeof C=="function"&&!yo(C)&&C.defaultProps===void 0&&c.compare===null?(s.tag=15,s.type=C,Id(n,s,C,d,v)):(n=La(c.type,null,d,s,s.mode,v),n.ref=s.ref,n.return=s,s.child=n)}if(C=n.child,!cl(n,v)){var q=C.memoizedProps;if(c=c.compare,c=c!==null?c:_i,c(q,d)&&n.ref===s.ref)return Hn(n,s,v)}return s.flags|=1,n=Nn(C,d),n.ref=s.ref,n.return=s,s.child=n}function Id(n,s,c,d,v){if(n!==null){var C=n.memoizedProps;if(_i(C,d)&&n.ref===s.ref)if(Wt=!1,s.pendingProps=d=C,cl(n,v))(n.flags&131072)!==0&&(Wt=!0);else return s.lanes=n.lanes,Hn(n,s,v)}return nl(n,s,c,d,v)}function zd(n,s,c){var d=s.pendingProps,v=d.children,C=n!==null?n.memoizedState:null;if(d.mode==="hidden"){if((s.flags&128)!==0){if(d=C!==null?C.baseLanes|c:c,n!==null){for(v=s.child=n.child,C=0;v!==null;)C=C|v.lanes|v.childLanes,v=v.sibling;s.childLanes=C&~d}else s.childLanes=0,s.child=null;return Bd(n,s,d,c)}if((c&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},n!==null&&za(s,C!==null?C.cachePool:null),C!==null?Iu(s,C):Lo(),_d(s);else return s.lanes=s.childLanes=536870912,Bd(n,s,C!==null?C.baseLanes|c:c,c)}else C!==null?(za(s,C.cachePool),Iu(s,C),rr(),s.memoizedState=null):(n!==null&&za(s,null),Lo(),rr());return Kt(n,s,v,c),s.child}function Bd(n,s,c,d){var v=Po();return v=v===null?null:{parent:qt._currentValue,pool:v},s.memoizedState={baseLanes:c,cachePool:v},n!==null&&za(s,null),Lo(),_d(s),n!==null&&Di(n,s,d,!0),null}function is(n,s){var c=s.ref;if(c===null)n!==null&&n.ref!==null&&(s.flags|=4194816);else{if(typeof c!="function"&&typeof c!="object")throw Error(a(284));(n===null||n.ref!==c)&&(s.flags|=4194816)}}function nl(n,s,c,d,v){return _r(s),c=Fo(n,s,c,d,void 0,v),d=Io(),n!==null&&!Wt?(zo(n,s,v),Hn(n,s,v)):(_t&&d&&So(s),s.flags|=1,Kt(n,s,c,v),s.child)}function Ud(n,s,c,d,v,C){return _r(s),s.updateQueue=null,c=Bu(s,d,c,v),zu(n),d=Io(),n!==null&&!Wt?(zo(n,s,C),Hn(n,s,C)):(_t&&d&&So(s),s.flags|=1,Kt(n,s,c,C),s.child)}function Hd(n,s,c,d,v){if(_r(s),s.stateNode===null){var C=qr,q=c.contextType;typeof q=="object"&&q!==null&&(C=en(q)),C=new c(d,C),s.memoizedState=C.state!==null&&C.state!==void 0?C.state:null,C.updater=el,s.stateNode=C,C._reactInternals=s,C=s.stateNode,C.props=d,C.state=s.memoizedState,C.refs={},Oo(s),q=c.contextType,C.context=typeof q=="object"&&q!==null?en(q):qr,C.state=s.memoizedState,q=c.getDerivedStateFromProps,typeof q=="function"&&(Jo(s,c,q,d),C.state=s.memoizedState),typeof c.getDerivedStateFromProps=="function"||typeof C.getSnapshotBeforeUpdate=="function"||typeof C.UNSAFE_componentWillMount!="function"&&typeof C.componentWillMount!="function"||(q=C.state,typeof C.componentWillMount=="function"&&C.componentWillMount(),typeof C.UNSAFE_componentWillMount=="function"&&C.UNSAFE_componentWillMount(),q!==C.state&&el.enqueueReplaceState(C,C.state,null),Ii(s,d,C,v),Fi(),C.state=s.memoizedState),typeof C.componentDidMount=="function"&&(s.flags|=4194308),d=!0}else if(n===null){C=s.stateNode;var Z=s.memoizedProps,fe=kr(c,Z);C.props=fe;var Me=C.context,Ue=c.contextType;q=qr,typeof Ue=="object"&&Ue!==null&&(q=en(Ue));var Ve=c.getDerivedStateFromProps;Ue=typeof Ve=="function"||typeof C.getSnapshotBeforeUpdate=="function",Z=s.pendingProps!==Z,Ue||typeof C.UNSAFE_componentWillReceiveProps!="function"&&typeof C.componentWillReceiveProps!="function"||(Z||Me!==q)&&Pd(s,C,d,q),Zn=!1;var $e=s.memoizedState;C.state=$e,Ii(s,d,C,v),Fi(),Me=s.memoizedState,Z||$e!==Me||Zn?(typeof Ve=="function"&&(Jo(s,c,Ve,d),Me=s.memoizedState),(fe=Zn||Td(s,c,fe,d,$e,Me,q))?(Ue||typeof C.UNSAFE_componentWillMount!="function"&&typeof C.componentWillMount!="function"||(typeof C.componentWillMount=="function"&&C.componentWillMount(),typeof C.UNSAFE_componentWillMount=="function"&&C.UNSAFE_componentWillMount()),typeof C.componentDidMount=="function"&&(s.flags|=4194308)):(typeof C.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=d,s.memoizedState=Me),C.props=d,C.state=Me,C.context=q,d=fe):(typeof C.componentDidMount=="function"&&(s.flags|=4194308),d=!1)}else{C=s.stateNode,Do(n,s),q=s.memoizedProps,Ue=kr(c,q),C.props=Ue,Ve=s.pendingProps,$e=C.context,Me=c.contextType,fe=qr,typeof Me=="object"&&Me!==null&&(fe=en(Me)),Z=c.getDerivedStateFromProps,(Me=typeof Z=="function"||typeof C.getSnapshotBeforeUpdate=="function")||typeof C.UNSAFE_componentWillReceiveProps!="function"&&typeof C.componentWillReceiveProps!="function"||(q!==Ve||$e!==fe)&&Pd(s,C,d,fe),Zn=!1,$e=s.memoizedState,C.state=$e,Ii(s,d,C,v),Fi();var ze=s.memoizedState;q!==Ve||$e!==ze||Zn||n!==null&&n.dependencies!==null&&Fa(n.dependencies)?(typeof Z=="function"&&(Jo(s,c,Z,d),ze=s.memoizedState),(Ue=Zn||Td(s,c,Ue,d,$e,ze,fe)||n!==null&&n.dependencies!==null&&Fa(n.dependencies))?(Me||typeof C.UNSAFE_componentWillUpdate!="function"&&typeof C.componentWillUpdate!="function"||(typeof C.componentWillUpdate=="function"&&C.componentWillUpdate(d,ze,fe),typeof C.UNSAFE_componentWillUpdate=="function"&&C.UNSAFE_componentWillUpdate(d,ze,fe)),typeof C.componentDidUpdate=="function"&&(s.flags|=4),typeof C.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof C.componentDidUpdate!="function"||q===n.memoizedProps&&$e===n.memoizedState||(s.flags|=4),typeof C.getSnapshotBeforeUpdate!="function"||q===n.memoizedProps&&$e===n.memoizedState||(s.flags|=1024),s.memoizedProps=d,s.memoizedState=ze),C.props=d,C.state=ze,C.context=fe,d=Ue):(typeof C.componentDidUpdate!="function"||q===n.memoizedProps&&$e===n.memoizedState||(s.flags|=4),typeof C.getSnapshotBeforeUpdate!="function"||q===n.memoizedProps&&$e===n.memoizedState||(s.flags|=1024),d=!1)}return C=d,is(n,s),d=(s.flags&128)!==0,C||d?(C=s.stateNode,c=d&&typeof c.getDerivedStateFromError!="function"?null:C.render(),s.flags|=1,n!==null&&d?(s.child=ti(s,n.child,null,v),s.child=ti(s,null,c,v)):Kt(n,s,c,v),s.memoizedState=C.state,n=s.child):n=Hn(n,s,v),n}function Vd(n,s,c,d){return ki(),s.flags|=256,Kt(n,s,c,d),s.child}var rl={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function il(n){return{baseLanes:n,cachePool:Ou()}}function al(n,s,c){return n=n!==null?n.childLanes&~c:0,s&&(n|=wn),n}function qd(n,s,c){var d=s.pendingProps,v=!1,C=(s.flags&128)!==0,q;if((q=C)||(q=n!==null&&n.memoizedState===null?!1:(Gt.current&2)!==0),q&&(v=!0,s.flags&=-129),q=(s.flags&32)!==0,s.flags&=-33,n===null){if(_t){if(v?nr(s):rr(),_t){var Z=It,fe;if(fe=Z){e:{for(fe=Z,Z=Pn;fe.nodeType!==8;){if(!Z){Z=null;break e}if(fe=Tn(fe.nextSibling),fe===null){Z=null;break e}}Z=fe}Z!==null?(s.memoizedState={dehydrated:Z,treeContext:Er!==null?{id:$n,overflow:Fn}:null,retryLane:536870912,hydrationErrors:null},fe=cn(18,null,null,0),fe.stateNode=Z,fe.return=s,s.child=fe,nn=s,It=null,fe=!0):fe=!1}fe||Ar(s)}if(Z=s.memoizedState,Z!==null&&(Z=Z.dehydrated,Z!==null))return Ul(Z)?s.lanes=32:s.lanes=536870912,null;Un(s)}return Z=d.children,d=d.fallback,v?(rr(),v=s.mode,Z=as({mode:"hidden",children:Z},v),d=Sr(d,v,c,null),Z.return=s,d.return=s,Z.sibling=d,s.child=Z,v=s.child,v.memoizedState=il(c),v.childLanes=al(n,q,c),s.memoizedState=rl,d):(nr(s),sl(s,Z))}if(fe=n.memoizedState,fe!==null&&(Z=fe.dehydrated,Z!==null)){if(C)s.flags&256?(nr(s),s.flags&=-257,s=ol(n,s,c)):s.memoizedState!==null?(rr(),s.child=n.child,s.flags|=128,s=null):(rr(),v=d.fallback,Z=s.mode,d=as({mode:"visible",children:d.children},Z),v=Sr(v,Z,c,null),v.flags|=2,d.return=s,v.return=s,d.sibling=v,s.child=d,ti(s,n.child,null,c),d=s.child,d.memoizedState=il(c),d.childLanes=al(n,q,c),s.memoizedState=rl,s=v);else if(nr(s),Ul(Z)){if(q=Z.nextSibling&&Z.nextSibling.dataset,q)var Me=q.dgst;q=Me,d=Error(a(419)),d.stack="",d.digest=q,Oi({value:d,source:null,stack:null}),s=ol(n,s,c)}else if(Wt||Di(n,s,c,!1),q=(c&n.childLanes)!==0,Wt||q){if(q=Nt,q!==null&&(d=c&-c,d=(d&42)!==0?1:Ke(d),d=(d&(q.suspendedLanes|c))!==0?0:d,d!==0&&d!==fe.retryLane))throw fe.retryLane=d,Vr(n,d),hn(q,n,d),Nd;Z.data==="$?"||Al(),s=ol(n,s,c)}else Z.data==="$?"?(s.flags|=192,s.child=n.child,s=null):(n=fe.treeContext,It=Tn(Z.nextSibling),nn=s,_t=!0,Cr=null,Pn=!1,n!==null&&(xn[Sn++]=$n,xn[Sn++]=Fn,xn[Sn++]=Er,$n=n.id,Fn=n.overflow,Er=s),s=sl(s,d.children),s.flags|=4096);return s}return v?(rr(),v=d.fallback,Z=s.mode,fe=n.child,Me=fe.sibling,d=Nn(fe,{mode:"hidden",children:d.children}),d.subtreeFlags=fe.subtreeFlags&65011712,Me!==null?v=Nn(Me,v):(v=Sr(v,Z,c,null),v.flags|=2),v.return=s,d.return=s,d.sibling=v,s.child=d,d=v,v=s.child,Z=n.child.memoizedState,Z===null?Z=il(c):(fe=Z.cachePool,fe!==null?(Me=qt._currentValue,fe=fe.parent!==Me?{parent:Me,pool:Me}:fe):fe=Ou(),Z={baseLanes:Z.baseLanes|c,cachePool:fe}),v.memoizedState=Z,v.childLanes=al(n,q,c),s.memoizedState=rl,d):(nr(s),c=n.child,n=c.sibling,c=Nn(c,{mode:"visible",children:d.children}),c.return=s,c.sibling=null,n!==null&&(q=s.deletions,q===null?(s.deletions=[n],s.flags|=16):q.push(n)),s.child=c,s.memoizedState=null,c)}function sl(n,s){return s=as({mode:"visible",children:s},n.mode),s.return=n,n.child=s}function as(n,s){return n=cn(22,n,null,s),n.lanes=0,n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},n}function ol(n,s,c){return ti(s,n.child,null,c),n=sl(s,s.pendingProps.children),n.flags|=2,s.memoizedState=null,n}function Gd(n,s,c){n.lanes|=s;var d=n.alternate;d!==null&&(d.lanes|=s),Ao(n.return,s,c)}function ll(n,s,c,d,v){var C=n.memoizedState;C===null?n.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:d,tail:c,tailMode:v}:(C.isBackwards=s,C.rendering=null,C.renderingStartTime=0,C.last=d,C.tail=c,C.tailMode=v)}function Wd(n,s,c){var d=s.pendingProps,v=d.revealOrder,C=d.tail;if(Kt(n,s,d.children,c),d=Gt.current,(d&2)!==0)d=d&1|2,s.flags|=128;else{if(n!==null&&(n.flags&128)!==0)e:for(n=s.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&Gd(n,c,s);else if(n.tag===19)Gd(n,c,s);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===s)break e;for(;n.sibling===null;){if(n.return===null||n.return===s)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}d&=1}switch(L(Gt,d),v){case"forwards":for(c=s.child,v=null;c!==null;)n=c.alternate,n!==null&&ts(n)===null&&(v=c),c=c.sibling;c=v,c===null?(v=s.child,s.child=null):(v=c.sibling,c.sibling=null),ll(s,!1,v,c,C);break;case"backwards":for(c=null,v=s.child,s.child=null;v!==null;){if(n=v.alternate,n!==null&&ts(n)===null){s.child=v;break}n=v.sibling,v.sibling=c,c=v,v=n}ll(s,!0,c,null,C);break;case"together":ll(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function Hn(n,s,c){if(n!==null&&(s.dependencies=n.dependencies),lr|=s.lanes,(c&s.childLanes)===0)if(n!==null){if(Di(n,s,c,!1),(c&s.childLanes)===0)return null}else return null;if(n!==null&&s.child!==n.child)throw Error(a(153));if(s.child!==null){for(n=s.child,c=Nn(n,n.pendingProps),s.child=c,c.return=s;n.sibling!==null;)n=n.sibling,c=c.sibling=Nn(n,n.pendingProps),c.return=s;c.sibling=null}return s.child}function cl(n,s){return(n.lanes&s)!==0?!0:(n=n.dependencies,!!(n!==null&&Fa(n)))}function sm(n,s,c){switch(s.tag){case 3:J(s,s.stateNode.containerInfo),Qn(s,qt,n.memoizedState.cache),ki();break;case 27:case 5:ue(s);break;case 4:J(s,s.stateNode.containerInfo);break;case 10:Qn(s,s.type,s.memoizedProps.value);break;case 13:var d=s.memoizedState;if(d!==null)return d.dehydrated!==null?(nr(s),s.flags|=128,null):(c&s.child.childLanes)!==0?qd(n,s,c):(nr(s),n=Hn(n,s,c),n!==null?n.sibling:null);nr(s);break;case 19:var v=(n.flags&128)!==0;if(d=(c&s.childLanes)!==0,d||(Di(n,s,c,!1),d=(c&s.childLanes)!==0),v){if(d)return Wd(n,s,c);s.flags|=128}if(v=s.memoizedState,v!==null&&(v.rendering=null,v.tail=null,v.lastEffect=null),L(Gt,Gt.current),d)break;return null;case 22:case 23:return s.lanes=0,zd(n,s,c);case 24:Qn(s,qt,n.memoizedState.cache)}return Hn(n,s,c)}function Xd(n,s,c){if(n!==null)if(n.memoizedProps!==s.pendingProps)Wt=!0;else{if(!cl(n,c)&&(s.flags&128)===0)return Wt=!1,sm(n,s,c);Wt=(n.flags&131072)!==0}else Wt=!1,_t&&(s.flags&1048576)!==0&&Cu(s,$a,s.index);switch(s.lanes=0,s.tag){case 16:e:{n=s.pendingProps;var d=s.elementType,v=d._init;if(d=v(d._payload),s.type=d,typeof d=="function")yo(d)?(n=kr(d,n),s.tag=1,s=Hd(null,s,d,n,c)):(s.tag=0,s=nl(null,s,d,n,c));else{if(d!=null){if(v=d.$$typeof,v===k){s.tag=11,s=$d(null,s,d,n,c);break e}else if(v===R){s.tag=14,s=Fd(null,s,d,n,c);break e}}throw s=ne(d)||d,Error(a(306,s,""))}}return s;case 0:return nl(n,s,s.type,s.pendingProps,c);case 1:return d=s.type,v=kr(d,s.pendingProps),Hd(n,s,d,v,c);case 3:e:{if(J(s,s.stateNode.containerInfo),n===null)throw Error(a(387));d=s.pendingProps;var C=s.memoizedState;v=C.element,Do(n,s),Ii(s,d,null,c);var q=s.memoizedState;if(d=q.cache,Qn(s,qt,d),d!==C.cache&&Ro(s,[qt],c,!0),Fi(),d=q.element,C.isDehydrated)if(C={element:d,isDehydrated:!1,cache:q.cache},s.updateQueue.baseState=C,s.memoizedState=C,s.flags&256){s=Vd(n,s,d,c);break e}else if(d!==v){v=yn(Error(a(424)),s),Oi(v),s=Vd(n,s,d,c);break e}else{switch(n=s.stateNode.containerInfo,n.nodeType){case 9:n=n.body;break;default:n=n.nodeName==="HTML"?n.ownerDocument.body:n}for(It=Tn(n.firstChild),nn=s,_t=!0,Cr=null,Pn=!0,c=Rd(s,null,d,c),s.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling}else{if(ki(),d===v){s=Hn(n,s,c);break e}Kt(n,s,d,c)}s=s.child}return s;case 26:return is(n,s),n===null?(c=Jf(s.type,null,s.pendingProps,null))?s.memoizedState=c:_t||(c=s.type,n=s.pendingProps,d=bs(K.current).createElement(c),d[_e]=s,d[Ie]=n,Zt(d,c,n),Et(d),s.stateNode=d):s.memoizedState=Jf(s.type,n.memoizedProps,s.pendingProps,n.memoizedState),null;case 27:return ue(s),n===null&&_t&&(d=s.stateNode=Kf(s.type,s.pendingProps,K.current),nn=s,Pn=!0,v=It,fr(s.type)?(Hl=v,It=Tn(d.firstChild)):It=v),Kt(n,s,s.pendingProps.children,c),is(n,s),n===null&&(s.flags|=4194304),s.child;case 5:return n===null&&_t&&((v=d=It)&&(d=jm(d,s.type,s.pendingProps,Pn),d!==null?(s.stateNode=d,nn=s,It=Tn(d.firstChild),Pn=!1,v=!0):v=!1),v||Ar(s)),ue(s),v=s.type,C=s.pendingProps,q=n!==null?n.memoizedProps:null,d=C.children,Il(v,C)?d=null:q!==null&&Il(v,q)&&(s.flags|=32),s.memoizedState!==null&&(v=Fo(n,s,Qh,null,null,c),oa._currentValue=v),is(n,s),Kt(n,s,d,c),s.child;case 6:return n===null&&_t&&((n=c=It)&&(c=Lm(c,s.pendingProps,Pn),c!==null?(s.stateNode=c,nn=s,It=null,n=!0):n=!1),n||Ar(s)),null;case 13:return qd(n,s,c);case 4:return J(s,s.stateNode.containerInfo),d=s.pendingProps,n===null?s.child=ti(s,null,d,c):Kt(n,s,d,c),s.child;case 11:return $d(n,s,s.type,s.pendingProps,c);case 7:return Kt(n,s,s.pendingProps,c),s.child;case 8:return Kt(n,s,s.pendingProps.children,c),s.child;case 12:return Kt(n,s,s.pendingProps.children,c),s.child;case 10:return d=s.pendingProps,Qn(s,s.type,d.value),Kt(n,s,d.children,c),s.child;case 9:return v=s.type._context,d=s.pendingProps.children,_r(s),v=en(v),d=d(v),s.flags|=1,Kt(n,s,d,c),s.child;case 14:return Fd(n,s,s.type,s.pendingProps,c);case 15:return Id(n,s,s.type,s.pendingProps,c);case 19:return Wd(n,s,c);case 31:return d=s.pendingProps,c=s.mode,d={mode:d.mode,children:d.children},n===null?(c=as(d,c),c.ref=s.ref,s.child=c,c.return=s,s=c):(c=Nn(n.child,d),c.ref=s.ref,s.child=c,c.return=s,s=c),s;case 22:return zd(n,s,c);case 24:return _r(s),d=en(qt),n===null?(v=Po(),v===null&&(v=Nt,C=_o(),v.pooledCache=C,C.refCount++,C!==null&&(v.pooledCacheLanes|=c),v=C),s.memoizedState={parent:d,cache:v},Oo(s),Qn(s,qt,v)):((n.lanes&c)!==0&&(Do(n,s),Ii(s,null,null,c),Fi()),v=n.memoizedState,C=s.memoizedState,v.parent!==d?(v={parent:d,cache:d},s.memoizedState=v,s.lanes===0&&(s.memoizedState=s.updateQueue.baseState=v),Qn(s,qt,d)):(d=C.cache,Qn(s,qt,d),d!==v.cache&&Ro(s,[qt],c,!0))),Kt(n,s,s.pendingProps.children,c),s.child;case 29:throw s.pendingProps}throw Error(a(156,s.tag))}function Vn(n){n.flags|=4}function Yd(n,s){if(s.type!=="stylesheet"||(s.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!ip(s)){if(s=En.current,s!==null&&((At&4194048)===At?kn!==null:(At&62914560)!==At&&(At&536870912)===0||s!==kn))throw Ni=ko,Du;n.flags|=8192}}function ss(n,s){s!==null&&(n.flags|=4),n.flags&16384&&(s=n.tag!==22?ht():536870912,n.lanes|=s,ai|=s)}function Gi(n,s){if(!_t)switch(n.tailMode){case"hidden":s=n.tail;for(var c=null;s!==null;)s.alternate!==null&&(c=s),s=s.sibling;c===null?n.tail=null:c.sibling=null;break;case"collapsed":c=n.tail;for(var d=null;c!==null;)c.alternate!==null&&(d=c),c=c.sibling;d===null?s||n.tail===null?n.tail=null:n.tail.sibling=null:d.sibling=null}}function Ft(n){var s=n.alternate!==null&&n.alternate.child===n.child,c=0,d=0;if(s)for(var v=n.child;v!==null;)c|=v.lanes|v.childLanes,d|=v.subtreeFlags&65011712,d|=v.flags&65011712,v.return=n,v=v.sibling;else for(v=n.child;v!==null;)c|=v.lanes|v.childLanes,d|=v.subtreeFlags,d|=v.flags,v.return=n,v=v.sibling;return n.subtreeFlags|=d,n.childLanes=c,s}function om(n,s,c){var d=s.pendingProps;switch(Eo(s),s.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ft(s),null;case 1:return Ft(s),null;case 3:return c=s.stateNode,d=null,n!==null&&(d=n.memoizedState.cache),s.memoizedState.cache!==d&&(s.flags|=2048),zn(qt),ce(),c.pendingContext&&(c.context=c.pendingContext,c.pendingContext=null),(n===null||n.child===null)&&(Pi(s)?Vn(s):n===null||n.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,_u())),Ft(s),null;case 26:return c=s.memoizedState,n===null?(Vn(s),c!==null?(Ft(s),Yd(s,c)):(Ft(s),s.flags&=-16777217)):c?c!==n.memoizedState?(Vn(s),Ft(s),Yd(s,c)):(Ft(s),s.flags&=-16777217):(n.memoizedProps!==d&&Vn(s),Ft(s),s.flags&=-16777217),null;case 27:we(s),c=K.current;var v=s.type;if(n!==null&&s.stateNode!=null)n.memoizedProps!==d&&Vn(s);else{if(!d){if(s.stateNode===null)throw Error(a(166));return Ft(s),null}n=$.current,Pi(s)?Au(s):(n=Kf(v,d,c),s.stateNode=n,Vn(s))}return Ft(s),null;case 5:if(we(s),c=s.type,n!==null&&s.stateNode!=null)n.memoizedProps!==d&&Vn(s);else{if(!d){if(s.stateNode===null)throw Error(a(166));return Ft(s),null}if(n=$.current,Pi(s))Au(s);else{switch(v=bs(K.current),n){case 1:n=v.createElementNS("http://www.w3.org/2000/svg",c);break;case 2:n=v.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;default:switch(c){case"svg":n=v.createElementNS("http://www.w3.org/2000/svg",c);break;case"math":n=v.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;case"script":n=v.createElement("div"),n.innerHTML="<script><\/script>",n=n.removeChild(n.firstChild);break;case"select":n=typeof d.is=="string"?v.createElement("select",{is:d.is}):v.createElement("select"),d.multiple?n.multiple=!0:d.size&&(n.size=d.size);break;default:n=typeof d.is=="string"?v.createElement(c,{is:d.is}):v.createElement(c)}}n[_e]=s,n[Ie]=d;e:for(v=s.child;v!==null;){if(v.tag===5||v.tag===6)n.appendChild(v.stateNode);else if(v.tag!==4&&v.tag!==27&&v.child!==null){v.child.return=v,v=v.child;continue}if(v===s)break e;for(;v.sibling===null;){if(v.return===null||v.return===s)break e;v=v.return}v.sibling.return=v.return,v=v.sibling}s.stateNode=n;e:switch(Zt(n,c,d),c){case"button":case"input":case"select":case"textarea":n=!!d.autoFocus;break e;case"img":n=!0;break e;default:n=!1}n&&Vn(s)}}return Ft(s),s.flags&=-16777217,null;case 6:if(n&&s.stateNode!=null)n.memoizedProps!==d&&Vn(s);else{if(typeof d!="string"&&s.stateNode===null)throw Error(a(166));if(n=K.current,Pi(s)){if(n=s.stateNode,c=s.memoizedProps,d=null,v=nn,v!==null)switch(v.tag){case 27:case 5:d=v.memoizedProps}n[_e]=s,n=!!(n.nodeValue===c||d!==null&&d.suppressHydrationWarning===!0||Hf(n.nodeValue,c)),n||Ar(s)}else n=bs(n).createTextNode(d),n[_e]=s,s.stateNode=n}return Ft(s),null;case 13:if(d=s.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(v=Pi(s),d!==null&&d.dehydrated!==null){if(n===null){if(!v)throw Error(a(318));if(v=s.memoizedState,v=v!==null?v.dehydrated:null,!v)throw Error(a(317));v[_e]=s}else ki(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;Ft(s),v=!1}else v=_u(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=v),v=!0;if(!v)return s.flags&256?(Un(s),s):(Un(s),null)}if(Un(s),(s.flags&128)!==0)return s.lanes=c,s;if(c=d!==null,n=n!==null&&n.memoizedState!==null,c){d=s.child,v=null,d.alternate!==null&&d.alternate.memoizedState!==null&&d.alternate.memoizedState.cachePool!==null&&(v=d.alternate.memoizedState.cachePool.pool);var C=null;d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(C=d.memoizedState.cachePool.pool),C!==v&&(d.flags|=2048)}return c!==n&&c&&(s.child.flags|=8192),ss(s,s.updateQueue),Ft(s),null;case 4:return ce(),n===null&&jl(s.stateNode.containerInfo),Ft(s),null;case 10:return zn(s.type),Ft(s),null;case 19:if(z(Gt),v=s.memoizedState,v===null)return Ft(s),null;if(d=(s.flags&128)!==0,C=v.rendering,C===null)if(d)Gi(v,!1);else{if(zt!==0||n!==null&&(n.flags&128)!==0)for(n=s.child;n!==null;){if(C=ts(n),C!==null){for(s.flags|=128,Gi(v,!1),n=C.updateQueue,s.updateQueue=n,ss(s,n),s.subtreeFlags=0,n=c,c=s.child;c!==null;)wu(c,n),c=c.sibling;return L(Gt,Gt.current&1|2),s.child}n=n.sibling}v.tail!==null&&se()>cs&&(s.flags|=128,d=!0,Gi(v,!1),s.lanes=4194304)}else{if(!d)if(n=ts(C),n!==null){if(s.flags|=128,d=!0,n=n.updateQueue,s.updateQueue=n,ss(s,n),Gi(v,!0),v.tail===null&&v.tailMode==="hidden"&&!C.alternate&&!_t)return Ft(s),null}else 2*se()-v.renderingStartTime>cs&&c!==536870912&&(s.flags|=128,d=!0,Gi(v,!1),s.lanes=4194304);v.isBackwards?(C.sibling=s.child,s.child=C):(n=v.last,n!==null?n.sibling=C:s.child=C,v.last=C)}return v.tail!==null?(s=v.tail,v.rendering=s,v.tail=s.sibling,v.renderingStartTime=se(),s.sibling=null,n=Gt.current,L(Gt,d?n&1|2:n&1),s):(Ft(s),null);case 22:case 23:return Un(s),No(),d=s.memoizedState!==null,n!==null?n.memoizedState!==null!==d&&(s.flags|=8192):d&&(s.flags|=8192),d?(c&536870912)!==0&&(s.flags&128)===0&&(Ft(s),s.subtreeFlags&6&&(s.flags|=8192)):Ft(s),c=s.updateQueue,c!==null&&ss(s,c.retryQueue),c=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(c=n.memoizedState.cachePool.pool),d=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(d=s.memoizedState.cachePool.pool),d!==c&&(s.flags|=2048),n!==null&&z(Tr),null;case 24:return c=null,n!==null&&(c=n.memoizedState.cache),s.memoizedState.cache!==c&&(s.flags|=2048),zn(qt),Ft(s),null;case 25:return null;case 30:return null}throw Error(a(156,s.tag))}function lm(n,s){switch(Eo(s),s.tag){case 1:return n=s.flags,n&65536?(s.flags=n&-65537|128,s):null;case 3:return zn(qt),ce(),n=s.flags,(n&65536)!==0&&(n&128)===0?(s.flags=n&-65537|128,s):null;case 26:case 27:case 5:return we(s),null;case 13:if(Un(s),n=s.memoizedState,n!==null&&n.dehydrated!==null){if(s.alternate===null)throw Error(a(340));ki()}return n=s.flags,n&65536?(s.flags=n&-65537|128,s):null;case 19:return z(Gt),null;case 4:return ce(),null;case 10:return zn(s.type),null;case 22:case 23:return Un(s),No(),n!==null&&z(Tr),n=s.flags,n&65536?(s.flags=n&-65537|128,s):null;case 24:return zn(qt),null;case 25:return null;default:return null}}function Kd(n,s){switch(Eo(s),s.tag){case 3:zn(qt),ce();break;case 26:case 27:case 5:we(s);break;case 4:ce();break;case 13:Un(s);break;case 19:z(Gt);break;case 10:zn(s.type);break;case 22:case 23:Un(s),No(),n!==null&&z(Tr);break;case 24:zn(qt)}}function Wi(n,s){try{var c=s.updateQueue,d=c!==null?c.lastEffect:null;if(d!==null){var v=d.next;c=v;do{if((c.tag&n)===n){d=void 0;var C=c.create,q=c.inst;d=C(),q.destroy=d}c=c.next}while(c!==v)}}catch(Z){jt(s,s.return,Z)}}function ir(n,s,c){try{var d=s.updateQueue,v=d!==null?d.lastEffect:null;if(v!==null){var C=v.next;d=C;do{if((d.tag&n)===n){var q=d.inst,Z=q.destroy;if(Z!==void 0){q.destroy=void 0,v=s;var fe=c,Me=Z;try{Me()}catch(Ue){jt(v,fe,Ue)}}}d=d.next}while(d!==C)}}catch(Ue){jt(s,s.return,Ue)}}function Qd(n){var s=n.updateQueue;if(s!==null){var c=n.stateNode;try{Fu(s,c)}catch(d){jt(n,n.return,d)}}}function Zd(n,s,c){c.props=kr(n.type,n.memoizedProps),c.state=n.memoizedState;try{c.componentWillUnmount()}catch(d){jt(n,s,d)}}function Xi(n,s){try{var c=n.ref;if(c!==null){switch(n.tag){case 26:case 27:case 5:var d=n.stateNode;break;case 30:d=n.stateNode;break;default:d=n.stateNode}typeof c=="function"?n.refCleanup=c(d):c.current=d}}catch(v){jt(n,s,v)}}function On(n,s){var c=n.ref,d=n.refCleanup;if(c!==null)if(typeof d=="function")try{d()}catch(v){jt(n,s,v)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof c=="function")try{c(null)}catch(v){jt(n,s,v)}else c.current=null}function Jd(n){var s=n.type,c=n.memoizedProps,d=n.stateNode;try{e:switch(s){case"button":case"input":case"select":case"textarea":c.autoFocus&&d.focus();break e;case"img":c.src?d.src=c.src:c.srcSet&&(d.srcset=c.srcSet)}}catch(v){jt(n,n.return,v)}}function ul(n,s,c){try{var d=n.stateNode;Pm(d,n.type,c,s),d[Ie]=s}catch(v){jt(n,n.return,v)}}function ef(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&fr(n.type)||n.tag===4}function dl(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||ef(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.tag===27&&fr(n.type)||n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function fl(n,s,c){var d=n.tag;if(d===5||d===6)n=n.stateNode,s?(c.nodeType===9?c.body:c.nodeName==="HTML"?c.ownerDocument.body:c).insertBefore(n,s):(s=c.nodeType===9?c.body:c.nodeName==="HTML"?c.ownerDocument.body:c,s.appendChild(n),c=c._reactRootContainer,c!=null||s.onclick!==null||(s.onclick=ys));else if(d!==4&&(d===27&&fr(n.type)&&(c=n.stateNode,s=null),n=n.child,n!==null))for(fl(n,s,c),n=n.sibling;n!==null;)fl(n,s,c),n=n.sibling}function os(n,s,c){var d=n.tag;if(d===5||d===6)n=n.stateNode,s?c.insertBefore(n,s):c.appendChild(n);else if(d!==4&&(d===27&&fr(n.type)&&(c=n.stateNode),n=n.child,n!==null))for(os(n,s,c),n=n.sibling;n!==null;)os(n,s,c),n=n.sibling}function tf(n){var s=n.stateNode,c=n.memoizedProps;try{for(var d=n.type,v=s.attributes;v.length;)s.removeAttributeNode(v[0]);Zt(s,d,c),s[_e]=n,s[Ie]=c}catch(C){jt(n,n.return,C)}}var qn=!1,Ut=!1,pl=!1,nf=typeof WeakSet=="function"?WeakSet:Set,Xt=null;function cm(n,s){if(n=n.containerInfo,$l=As,n=pu(n),uo(n)){if("selectionStart"in n)var c={start:n.selectionStart,end:n.selectionEnd};else e:{c=(c=n.ownerDocument)&&c.defaultView||window;var d=c.getSelection&&c.getSelection();if(d&&d.rangeCount!==0){c=d.anchorNode;var v=d.anchorOffset,C=d.focusNode;d=d.focusOffset;try{c.nodeType,C.nodeType}catch{c=null;break e}var q=0,Z=-1,fe=-1,Me=0,Ue=0,Ve=n,$e=null;t:for(;;){for(var ze;Ve!==c||v!==0&&Ve.nodeType!==3||(Z=q+v),Ve!==C||d!==0&&Ve.nodeType!==3||(fe=q+d),Ve.nodeType===3&&(q+=Ve.nodeValue.length),(ze=Ve.firstChild)!==null;)$e=Ve,Ve=ze;for(;;){if(Ve===n)break t;if($e===c&&++Me===v&&(Z=q),$e===C&&++Ue===d&&(fe=q),(ze=Ve.nextSibling)!==null)break;Ve=$e,$e=Ve.parentNode}Ve=ze}c=Z===-1||fe===-1?null:{start:Z,end:fe}}else c=null}c=c||{start:0,end:0}}else c=null;for(Fl={focusedElem:n,selectionRange:c},As=!1,Xt=s;Xt!==null;)if(s=Xt,n=s.child,(s.subtreeFlags&1024)!==0&&n!==null)n.return=s,Xt=n;else for(;Xt!==null;){switch(s=Xt,C=s.alternate,n=s.flags,s.tag){case 0:break;case 11:case 15:break;case 1:if((n&1024)!==0&&C!==null){n=void 0,c=s,v=C.memoizedProps,C=C.memoizedState,d=c.stateNode;try{var vt=kr(c.type,v,c.elementType===c.type);n=d.getSnapshotBeforeUpdate(vt,C),d.__reactInternalSnapshotBeforeUpdate=n}catch(mt){jt(c,c.return,mt)}}break;case 3:if((n&1024)!==0){if(n=s.stateNode.containerInfo,c=n.nodeType,c===9)Bl(n);else if(c===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":Bl(n);break;default:n.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((n&1024)!==0)throw Error(a(163))}if(n=s.sibling,n!==null){n.return=s.return,Xt=n;break}Xt=s.return}}function rf(n,s,c){var d=c.flags;switch(c.tag){case 0:case 11:case 15:ar(n,c),d&4&&Wi(5,c);break;case 1:if(ar(n,c),d&4)if(n=c.stateNode,s===null)try{n.componentDidMount()}catch(q){jt(c,c.return,q)}else{var v=kr(c.type,s.memoizedProps);s=s.memoizedState;try{n.componentDidUpdate(v,s,n.__reactInternalSnapshotBeforeUpdate)}catch(q){jt(c,c.return,q)}}d&64&&Qd(c),d&512&&Xi(c,c.return);break;case 3:if(ar(n,c),d&64&&(n=c.updateQueue,n!==null)){if(s=null,c.child!==null)switch(c.child.tag){case 27:case 5:s=c.child.stateNode;break;case 1:s=c.child.stateNode}try{Fu(n,s)}catch(q){jt(c,c.return,q)}}break;case 27:s===null&&d&4&&tf(c);case 26:case 5:ar(n,c),s===null&&d&4&&Jd(c),d&512&&Xi(c,c.return);break;case 12:ar(n,c);break;case 13:ar(n,c),d&4&&of(n,c),d&64&&(n=c.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(c=ym.bind(null,c),Nm(n,c))));break;case 22:if(d=c.memoizedState!==null||qn,!d){s=s!==null&&s.memoizedState!==null||Ut,v=qn;var C=Ut;qn=d,(Ut=s)&&!C?sr(n,c,(c.subtreeFlags&8772)!==0):ar(n,c),qn=v,Ut=C}break;case 30:break;default:ar(n,c)}}function af(n){var s=n.alternate;s!==null&&(n.alternate=null,af(s)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(s=n.stateNode,s!==null&&rt(s)),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}var $t=null,sn=!1;function Gn(n,s,c){for(c=c.child;c!==null;)sf(n,s,c),c=c.sibling}function sf(n,s,c){if(Le&&typeof Le.onCommitFiberUnmount=="function")try{Le.onCommitFiberUnmount(Fe,c)}catch{}switch(c.tag){case 26:Ut||On(c,s),Gn(n,s,c),c.memoizedState?c.memoizedState.count--:c.stateNode&&(c=c.stateNode,c.parentNode.removeChild(c));break;case 27:Ut||On(c,s);var d=$t,v=sn;fr(c.type)&&($t=c.stateNode,sn=!1),Gn(n,s,c),ra(c.stateNode),$t=d,sn=v;break;case 5:Ut||On(c,s);case 6:if(d=$t,v=sn,$t=null,Gn(n,s,c),$t=d,sn=v,$t!==null)if(sn)try{($t.nodeType===9?$t.body:$t.nodeName==="HTML"?$t.ownerDocument.body:$t).removeChild(c.stateNode)}catch(C){jt(c,s,C)}else try{$t.removeChild(c.stateNode)}catch(C){jt(c,s,C)}break;case 18:$t!==null&&(sn?(n=$t,Xf(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,c.stateNode),da(n)):Xf($t,c.stateNode));break;case 4:d=$t,v=sn,$t=c.stateNode.containerInfo,sn=!0,Gn(n,s,c),$t=d,sn=v;break;case 0:case 11:case 14:case 15:Ut||ir(2,c,s),Ut||ir(4,c,s),Gn(n,s,c);break;case 1:Ut||(On(c,s),d=c.stateNode,typeof d.componentWillUnmount=="function"&&Zd(c,s,d)),Gn(n,s,c);break;case 21:Gn(n,s,c);break;case 22:Ut=(d=Ut)||c.memoizedState!==null,Gn(n,s,c),Ut=d;break;default:Gn(n,s,c)}}function of(n,s){if(s.memoizedState===null&&(n=s.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{da(n)}catch(c){jt(s,s.return,c)}}function um(n){switch(n.tag){case 13:case 19:var s=n.stateNode;return s===null&&(s=n.stateNode=new nf),s;case 22:return n=n.stateNode,s=n._retryCache,s===null&&(s=n._retryCache=new nf),s;default:throw Error(a(435,n.tag))}}function hl(n,s){var c=um(n);s.forEach(function(d){var v=bm.bind(null,n,d);c.has(d)||(c.add(d),d.then(v,v))})}function un(n,s){var c=s.deletions;if(c!==null)for(var d=0;d<c.length;d++){var v=c[d],C=n,q=s,Z=q;e:for(;Z!==null;){switch(Z.tag){case 27:if(fr(Z.type)){$t=Z.stateNode,sn=!1;break e}break;case 5:$t=Z.stateNode,sn=!1;break e;case 3:case 4:$t=Z.stateNode.containerInfo,sn=!0;break e}Z=Z.return}if($t===null)throw Error(a(160));sf(C,q,v),$t=null,sn=!1,C=v.alternate,C!==null&&(C.return=null),v.return=null}if(s.subtreeFlags&13878)for(s=s.child;s!==null;)lf(s,n),s=s.sibling}var _n=null;function lf(n,s){var c=n.alternate,d=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:un(s,n),dn(n),d&4&&(ir(3,n,n.return),Wi(3,n),ir(5,n,n.return));break;case 1:un(s,n),dn(n),d&512&&(Ut||c===null||On(c,c.return)),d&64&&qn&&(n=n.updateQueue,n!==null&&(d=n.callbacks,d!==null&&(c=n.shared.hiddenCallbacks,n.shared.hiddenCallbacks=c===null?d:c.concat(d))));break;case 26:var v=_n;if(un(s,n),dn(n),d&512&&(Ut||c===null||On(c,c.return)),d&4){var C=c!==null?c.memoizedState:null;if(d=n.memoizedState,c===null)if(d===null)if(n.stateNode===null){e:{d=n.type,c=n.memoizedProps,v=v.ownerDocument||v;t:switch(d){case"title":C=v.getElementsByTagName("title")[0],(!C||C[Ze]||C[_e]||C.namespaceURI==="http://www.w3.org/2000/svg"||C.hasAttribute("itemprop"))&&(C=v.createElement(d),v.head.insertBefore(C,v.querySelector("head > title"))),Zt(C,d,c),C[_e]=n,Et(C),d=C;break e;case"link":var q=np("link","href",v).get(d+(c.href||""));if(q){for(var Z=0;Z<q.length;Z++)if(C=q[Z],C.getAttribute("href")===(c.href==null||c.href===""?null:c.href)&&C.getAttribute("rel")===(c.rel==null?null:c.rel)&&C.getAttribute("title")===(c.title==null?null:c.title)&&C.getAttribute("crossorigin")===(c.crossOrigin==null?null:c.crossOrigin)){q.splice(Z,1);break t}}C=v.createElement(d),Zt(C,d,c),v.head.appendChild(C);break;case"meta":if(q=np("meta","content",v).get(d+(c.content||""))){for(Z=0;Z<q.length;Z++)if(C=q[Z],C.getAttribute("content")===(c.content==null?null:""+c.content)&&C.getAttribute("name")===(c.name==null?null:c.name)&&C.getAttribute("property")===(c.property==null?null:c.property)&&C.getAttribute("http-equiv")===(c.httpEquiv==null?null:c.httpEquiv)&&C.getAttribute("charset")===(c.charSet==null?null:c.charSet)){q.splice(Z,1);break t}}C=v.createElement(d),Zt(C,d,c),v.head.appendChild(C);break;default:throw Error(a(468,d))}C[_e]=n,Et(C),d=C}n.stateNode=d}else rp(v,n.type,n.stateNode);else n.stateNode=tp(v,d,n.memoizedProps);else C!==d?(C===null?c.stateNode!==null&&(c=c.stateNode,c.parentNode.removeChild(c)):C.count--,d===null?rp(v,n.type,n.stateNode):tp(v,d,n.memoizedProps)):d===null&&n.stateNode!==null&&ul(n,n.memoizedProps,c.memoizedProps)}break;case 27:un(s,n),dn(n),d&512&&(Ut||c===null||On(c,c.return)),c!==null&&d&4&&ul(n,n.memoizedProps,c.memoizedProps);break;case 5:if(un(s,n),dn(n),d&512&&(Ut||c===null||On(c,c.return)),n.flags&32){v=n.stateNode;try{$r(v,"")}catch(ze){jt(n,n.return,ze)}}d&4&&n.stateNode!=null&&(v=n.memoizedProps,ul(n,v,c!==null?c.memoizedProps:v)),d&1024&&(pl=!0);break;case 6:if(un(s,n),dn(n),d&4){if(n.stateNode===null)throw Error(a(162));d=n.memoizedProps,c=n.stateNode;try{c.nodeValue=d}catch(ze){jt(n,n.return,ze)}}break;case 3:if(Es=null,v=_n,_n=xs(s.containerInfo),un(s,n),_n=v,dn(n),d&4&&c!==null&&c.memoizedState.isDehydrated)try{da(s.containerInfo)}catch(ze){jt(n,n.return,ze)}pl&&(pl=!1,cf(n));break;case 4:d=_n,_n=xs(n.stateNode.containerInfo),un(s,n),dn(n),_n=d;break;case 12:un(s,n),dn(n);break;case 13:un(s,n),dn(n),n.child.flags&8192&&n.memoizedState!==null!=(c!==null&&c.memoizedState!==null)&&(xl=se()),d&4&&(d=n.updateQueue,d!==null&&(n.updateQueue=null,hl(n,d)));break;case 22:v=n.memoizedState!==null;var fe=c!==null&&c.memoizedState!==null,Me=qn,Ue=Ut;if(qn=Me||v,Ut=Ue||fe,un(s,n),Ut=Ue,qn=Me,dn(n),d&8192)e:for(s=n.stateNode,s._visibility=v?s._visibility&-2:s._visibility|1,v&&(c===null||fe||qn||Ut||Or(n)),c=null,s=n;;){if(s.tag===5||s.tag===26){if(c===null){fe=c=s;try{if(C=fe.stateNode,v)q=C.style,typeof q.setProperty=="function"?q.setProperty("display","none","important"):q.display="none";else{Z=fe.stateNode;var Ve=fe.memoizedProps.style,$e=Ve!=null&&Ve.hasOwnProperty("display")?Ve.display:null;Z.style.display=$e==null||typeof $e=="boolean"?"":(""+$e).trim()}}catch(ze){jt(fe,fe.return,ze)}}}else if(s.tag===6){if(c===null){fe=s;try{fe.stateNode.nodeValue=v?"":fe.memoizedProps}catch(ze){jt(fe,fe.return,ze)}}}else if((s.tag!==22&&s.tag!==23||s.memoizedState===null||s===n)&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===n)break e;for(;s.sibling===null;){if(s.return===null||s.return===n)break e;c===s&&(c=null),s=s.return}c===s&&(c=null),s.sibling.return=s.return,s=s.sibling}d&4&&(d=n.updateQueue,d!==null&&(c=d.retryQueue,c!==null&&(d.retryQueue=null,hl(n,c))));break;case 19:un(s,n),dn(n),d&4&&(d=n.updateQueue,d!==null&&(n.updateQueue=null,hl(n,d)));break;case 30:break;case 21:break;default:un(s,n),dn(n)}}function dn(n){var s=n.flags;if(s&2){try{for(var c,d=n.return;d!==null;){if(ef(d)){c=d;break}d=d.return}if(c==null)throw Error(a(160));switch(c.tag){case 27:var v=c.stateNode,C=dl(n);os(n,C,v);break;case 5:var q=c.stateNode;c.flags&32&&($r(q,""),c.flags&=-33);var Z=dl(n);os(n,Z,q);break;case 3:case 4:var fe=c.stateNode.containerInfo,Me=dl(n);fl(n,Me,fe);break;default:throw Error(a(161))}}catch(Ue){jt(n,n.return,Ue)}n.flags&=-3}s&4096&&(n.flags&=-4097)}function cf(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var s=n;cf(s),s.tag===5&&s.flags&1024&&s.stateNode.reset(),n=n.sibling}}function ar(n,s){if(s.subtreeFlags&8772)for(s=s.child;s!==null;)rf(n,s.alternate,s),s=s.sibling}function Or(n){for(n=n.child;n!==null;){var s=n;switch(s.tag){case 0:case 11:case 14:case 15:ir(4,s,s.return),Or(s);break;case 1:On(s,s.return);var c=s.stateNode;typeof c.componentWillUnmount=="function"&&Zd(s,s.return,c),Or(s);break;case 27:ra(s.stateNode);case 26:case 5:On(s,s.return),Or(s);break;case 22:s.memoizedState===null&&Or(s);break;case 30:Or(s);break;default:Or(s)}n=n.sibling}}function sr(n,s,c){for(c=c&&(s.subtreeFlags&8772)!==0,s=s.child;s!==null;){var d=s.alternate,v=n,C=s,q=C.flags;switch(C.tag){case 0:case 11:case 15:sr(v,C,c),Wi(4,C);break;case 1:if(sr(v,C,c),d=C,v=d.stateNode,typeof v.componentDidMount=="function")try{v.componentDidMount()}catch(Me){jt(d,d.return,Me)}if(d=C,v=d.updateQueue,v!==null){var Z=d.stateNode;try{var fe=v.shared.hiddenCallbacks;if(fe!==null)for(v.shared.hiddenCallbacks=null,v=0;v<fe.length;v++)$u(fe[v],Z)}catch(Me){jt(d,d.return,Me)}}c&&q&64&&Qd(C),Xi(C,C.return);break;case 27:tf(C);case 26:case 5:sr(v,C,c),c&&d===null&&q&4&&Jd(C),Xi(C,C.return);break;case 12:sr(v,C,c);break;case 13:sr(v,C,c),c&&q&4&&of(v,C);break;case 22:C.memoizedState===null&&sr(v,C,c),Xi(C,C.return);break;case 30:break;default:sr(v,C,c)}s=s.sibling}}function ml(n,s){var c=null;n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(c=n.memoizedState.cachePool.pool),n=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(n=s.memoizedState.cachePool.pool),n!==c&&(n!=null&&n.refCount++,c!=null&&Mi(c))}function gl(n,s){n=null,s.alternate!==null&&(n=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==n&&(s.refCount++,n!=null&&Mi(n))}function Dn(n,s,c,d){if(s.subtreeFlags&10256)for(s=s.child;s!==null;)uf(n,s,c,d),s=s.sibling}function uf(n,s,c,d){var v=s.flags;switch(s.tag){case 0:case 11:case 15:Dn(n,s,c,d),v&2048&&Wi(9,s);break;case 1:Dn(n,s,c,d);break;case 3:Dn(n,s,c,d),v&2048&&(n=null,s.alternate!==null&&(n=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==n&&(s.refCount++,n!=null&&Mi(n)));break;case 12:if(v&2048){Dn(n,s,c,d),n=s.stateNode;try{var C=s.memoizedProps,q=C.id,Z=C.onPostCommit;typeof Z=="function"&&Z(q,s.alternate===null?"mount":"update",n.passiveEffectDuration,-0)}catch(fe){jt(s,s.return,fe)}}else Dn(n,s,c,d);break;case 13:Dn(n,s,c,d);break;case 23:break;case 22:C=s.stateNode,q=s.alternate,s.memoizedState!==null?C._visibility&2?Dn(n,s,c,d):Yi(n,s):C._visibility&2?Dn(n,s,c,d):(C._visibility|=2,ni(n,s,c,d,(s.subtreeFlags&10256)!==0)),v&2048&&ml(q,s);break;case 24:Dn(n,s,c,d),v&2048&&gl(s.alternate,s);break;default:Dn(n,s,c,d)}}function ni(n,s,c,d,v){for(v=v&&(s.subtreeFlags&10256)!==0,s=s.child;s!==null;){var C=n,q=s,Z=c,fe=d,Me=q.flags;switch(q.tag){case 0:case 11:case 15:ni(C,q,Z,fe,v),Wi(8,q);break;case 23:break;case 22:var Ue=q.stateNode;q.memoizedState!==null?Ue._visibility&2?ni(C,q,Z,fe,v):Yi(C,q):(Ue._visibility|=2,ni(C,q,Z,fe,v)),v&&Me&2048&&ml(q.alternate,q);break;case 24:ni(C,q,Z,fe,v),v&&Me&2048&&gl(q.alternate,q);break;default:ni(C,q,Z,fe,v)}s=s.sibling}}function Yi(n,s){if(s.subtreeFlags&10256)for(s=s.child;s!==null;){var c=n,d=s,v=d.flags;switch(d.tag){case 22:Yi(c,d),v&2048&&ml(d.alternate,d);break;case 24:Yi(c,d),v&2048&&gl(d.alternate,d);break;default:Yi(c,d)}s=s.sibling}}var Ki=8192;function ri(n){if(n.subtreeFlags&Ki)for(n=n.child;n!==null;)df(n),n=n.sibling}function df(n){switch(n.tag){case 26:ri(n),n.flags&Ki&&n.memoizedState!==null&&Ym(_n,n.memoizedState,n.memoizedProps);break;case 5:ri(n);break;case 3:case 4:var s=_n;_n=xs(n.stateNode.containerInfo),ri(n),_n=s;break;case 22:n.memoizedState===null&&(s=n.alternate,s!==null&&s.memoizedState!==null?(s=Ki,Ki=16777216,ri(n),Ki=s):ri(n));break;default:ri(n)}}function ff(n){var s=n.alternate;if(s!==null&&(n=s.child,n!==null)){s.child=null;do s=n.sibling,n.sibling=null,n=s;while(n!==null)}}function Qi(n){var s=n.deletions;if((n.flags&16)!==0){if(s!==null)for(var c=0;c<s.length;c++){var d=s[c];Xt=d,hf(d,n)}ff(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)pf(n),n=n.sibling}function pf(n){switch(n.tag){case 0:case 11:case 15:Qi(n),n.flags&2048&&ir(9,n,n.return);break;case 3:Qi(n);break;case 12:Qi(n);break;case 22:var s=n.stateNode;n.memoizedState!==null&&s._visibility&2&&(n.return===null||n.return.tag!==13)?(s._visibility&=-3,ls(n)):Qi(n);break;default:Qi(n)}}function ls(n){var s=n.deletions;if((n.flags&16)!==0){if(s!==null)for(var c=0;c<s.length;c++){var d=s[c];Xt=d,hf(d,n)}ff(n)}for(n=n.child;n!==null;){switch(s=n,s.tag){case 0:case 11:case 15:ir(8,s,s.return),ls(s);break;case 22:c=s.stateNode,c._visibility&2&&(c._visibility&=-3,ls(s));break;default:ls(s)}n=n.sibling}}function hf(n,s){for(;Xt!==null;){var c=Xt;switch(c.tag){case 0:case 11:case 15:ir(8,c,s);break;case 23:case 22:if(c.memoizedState!==null&&c.memoizedState.cachePool!==null){var d=c.memoizedState.cachePool.pool;d!=null&&d.refCount++}break;case 24:Mi(c.memoizedState.cache)}if(d=c.child,d!==null)d.return=c,Xt=d;else e:for(c=n;Xt!==null;){d=Xt;var v=d.sibling,C=d.return;if(af(d),d===c){Xt=null;break e}if(v!==null){v.return=C,Xt=v;break e}Xt=C}}}var dm={getCacheForType:function(n){var s=en(qt),c=s.data.get(n);return c===void 0&&(c=n(),s.data.set(n,c)),c}},fm=typeof WeakMap=="function"?WeakMap:Map,Tt=0,Nt=null,wt=null,At=0,Pt=0,fn=null,or=!1,ii=!1,vl=!1,Wn=0,zt=0,lr=0,Dr=0,yl=0,wn=0,ai=0,Zi=null,on=null,bl=!1,xl=0,cs=1/0,us=null,cr=null,Qt=0,ur=null,si=null,oi=0,Sl=0,El=null,mf=null,Ji=0,wl=null;function pn(){if((Tt&2)!==0&&At!==0)return At&-At;if(B.T!==null){var n=Xr;return n!==0?n:kl()}return re()}function gf(){wn===0&&(wn=(At&536870912)===0||_t?pt():536870912);var n=En.current;return n!==null&&(n.flags|=32),wn}function hn(n,s,c){(n===Nt&&(Pt===2||Pt===9)||n.cancelPendingCommit!==null)&&(li(n,0),dr(n,At,wn,!1)),Ne(n,c),((Tt&2)===0||n!==Nt)&&(n===Nt&&((Tt&2)===0&&(Dr|=c),zt===4&&dr(n,At,wn,!1)),Mn(n))}function vf(n,s,c){if((Tt&6)!==0)throw Error(a(327));var d=!c&&(s&124)===0&&(s&n.expiredLanes)===0||xe(n,s),v=d?mm(n,s):Rl(n,s,!0),C=d;do{if(v===0){ii&&!d&&dr(n,s,0,!1);break}else{if(c=n.current.alternate,C&&!pm(c)){v=Rl(n,s,!1),C=!1;continue}if(v===2){if(C=s,n.errorRecoveryDisabledLanes&C)var q=0;else q=n.pendingLanes&-536870913,q=q!==0?q:q&536870912?536870912:0;if(q!==0){s=q;e:{var Z=n;v=Zi;var fe=Z.current.memoizedState.isDehydrated;if(fe&&(li(Z,q).flags|=256),q=Rl(Z,q,!1),q!==2){if(vl&&!fe){Z.errorRecoveryDisabledLanes|=C,Dr|=C,v=4;break e}C=on,on=v,C!==null&&(on===null?on=C:on.push.apply(on,C))}v=q}if(C=!1,v!==2)continue}}if(v===1){li(n,0),dr(n,s,0,!0);break}e:{switch(d=n,C=v,C){case 0:case 1:throw Error(a(345));case 4:if((s&4194048)!==s)break;case 6:dr(d,s,wn,!or);break e;case 2:on=null;break;case 3:case 5:break;default:throw Error(a(329))}if((s&62914560)===s&&(v=xl+300-se(),10<v)){if(dr(d,s,wn,!or),ye(d,0,!0)!==0)break e;d.timeoutHandle=Gf(yf.bind(null,d,c,on,us,bl,s,wn,Dr,ai,or,C,2,-0,0),v);break e}yf(d,c,on,us,bl,s,wn,Dr,ai,or,C,0,-0,0)}}break}while(!0);Mn(n)}function yf(n,s,c,d,v,C,q,Z,fe,Me,Ue,Ve,$e,ze){if(n.timeoutHandle=-1,Ve=s.subtreeFlags,(Ve&8192||(Ve&16785408)===16785408)&&(sa={stylesheets:null,count:0,unsuspend:Xm},df(s),Ve=Km(),Ve!==null)){n.cancelPendingCommit=Ve(Af.bind(null,n,s,C,c,d,v,q,Z,fe,Ue,1,$e,ze)),dr(n,C,q,!Me);return}Af(n,s,C,c,d,v,q,Z,fe)}function pm(n){for(var s=n;;){var c=s.tag;if((c===0||c===11||c===15)&&s.flags&16384&&(c=s.updateQueue,c!==null&&(c=c.stores,c!==null)))for(var d=0;d<c.length;d++){var v=c[d],C=v.getSnapshot;v=v.value;try{if(!ln(C(),v))return!1}catch{return!1}}if(c=s.child,s.subtreeFlags&16384&&c!==null)c.return=s,s=c;else{if(s===n)break;for(;s.sibling===null;){if(s.return===null||s.return===n)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function dr(n,s,c,d){s&=~yl,s&=~Dr,n.suspendedLanes|=s,n.pingedLanes&=~s,d&&(n.warmLanes|=s),d=n.expirationTimes;for(var v=s;0<v;){var C=31-qe(v),q=1<<C;d[C]=-1,v&=~q}c!==0&&nt(n,c,s)}function ds(){return(Tt&6)===0?(ea(0),!1):!0}function Cl(){if(wt!==null){if(Pt===0)var n=wt.return;else n=wt,In=Rr=null,Bo(n),ei=null,Vi=0,n=wt;for(;n!==null;)Kd(n.alternate,n),n=n.return;wt=null}}function li(n,s){var c=n.timeoutHandle;c!==-1&&(n.timeoutHandle=-1,Om(c)),c=n.cancelPendingCommit,c!==null&&(n.cancelPendingCommit=null,c()),Cl(),Nt=n,wt=c=Nn(n.current,null),At=s,Pt=0,fn=null,or=!1,ii=xe(n,s),vl=!1,ai=wn=yl=Dr=lr=zt=0,on=Zi=null,bl=!1,(s&8)!==0&&(s|=s&32);var d=n.entangledLanes;if(d!==0)for(n=n.entanglements,d&=s;0<d;){var v=31-qe(d),C=1<<v;s|=n[v],d&=~C}return Wn=s,Da(),c}function bf(n,s){bt=null,B.H=Qa,s===Li||s===Ba?(s=Lu(),Pt=3):s===Du?(s=Lu(),Pt=4):Pt=s===Nd?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,fn=s,wt===null&&(zt=1,rs(n,yn(s,n.current)))}function xf(){var n=B.H;return B.H=Qa,n===null?Qa:n}function Sf(){var n=B.A;return B.A=dm,n}function Al(){zt=4,or||(At&4194048)!==At&&En.current!==null||(ii=!0),(lr&134217727)===0&&(Dr&134217727)===0||Nt===null||dr(Nt,At,wn,!1)}function Rl(n,s,c){var d=Tt;Tt|=2;var v=xf(),C=Sf();(Nt!==n||At!==s)&&(us=null,li(n,s)),s=!1;var q=zt;e:do try{if(Pt!==0&&wt!==null){var Z=wt,fe=fn;switch(Pt){case 8:Cl(),q=6;break e;case 3:case 2:case 9:case 6:En.current===null&&(s=!0);var Me=Pt;if(Pt=0,fn=null,ci(n,Z,fe,Me),c&&ii){q=0;break e}break;default:Me=Pt,Pt=0,fn=null,ci(n,Z,fe,Me)}}hm(),q=zt;break}catch(Ue){bf(n,Ue)}while(!0);return s&&n.shellSuspendCounter++,In=Rr=null,Tt=d,B.H=v,B.A=C,wt===null&&(Nt=null,At=0,Da()),q}function hm(){for(;wt!==null;)Ef(wt)}function mm(n,s){var c=Tt;Tt|=2;var d=xf(),v=Sf();Nt!==n||At!==s?(us=null,cs=se()+500,li(n,s)):ii=xe(n,s);e:do try{if(Pt!==0&&wt!==null){s=wt;var C=fn;t:switch(Pt){case 1:Pt=0,fn=null,ci(n,s,C,1);break;case 2:case 9:if(Mu(C)){Pt=0,fn=null,wf(s);break}s=function(){Pt!==2&&Pt!==9||Nt!==n||(Pt=7),Mn(n)},C.then(s,s);break e;case 3:Pt=7;break e;case 4:Pt=5;break e;case 7:Mu(C)?(Pt=0,fn=null,wf(s)):(Pt=0,fn=null,ci(n,s,C,7));break;case 5:var q=null;switch(wt.tag){case 26:q=wt.memoizedState;case 5:case 27:var Z=wt;if(!q||ip(q)){Pt=0,fn=null;var fe=Z.sibling;if(fe!==null)wt=fe;else{var Me=Z.return;Me!==null?(wt=Me,fs(Me)):wt=null}break t}}Pt=0,fn=null,ci(n,s,C,5);break;case 6:Pt=0,fn=null,ci(n,s,C,6);break;case 8:Cl(),zt=6;break e;default:throw Error(a(462))}}gm();break}catch(Ue){bf(n,Ue)}while(!0);return In=Rr=null,B.H=d,B.A=v,Tt=c,wt!==null?0:(Nt=null,At=0,Da(),zt)}function gm(){for(;wt!==null&&!Pe();)Ef(wt)}function Ef(n){var s=Xd(n.alternate,n,Wn);n.memoizedProps=n.pendingProps,s===null?fs(n):wt=s}function wf(n){var s=n,c=s.alternate;switch(s.tag){case 15:case 0:s=Ud(c,s,s.pendingProps,s.type,void 0,At);break;case 11:s=Ud(c,s,s.pendingProps,s.type.render,s.ref,At);break;case 5:Bo(s);default:Kd(c,s),s=wt=wu(s,Wn),s=Xd(c,s,Wn)}n.memoizedProps=n.pendingProps,s===null?fs(n):wt=s}function ci(n,s,c,d){In=Rr=null,Bo(s),ei=null,Vi=0;var v=s.return;try{if(am(n,v,s,c,At)){zt=1,rs(n,yn(c,n.current)),wt=null;return}}catch(C){if(v!==null)throw wt=v,C;zt=1,rs(n,yn(c,n.current)),wt=null;return}s.flags&32768?(_t||d===1?n=!0:ii||(At&536870912)!==0?n=!1:(or=n=!0,(d===2||d===9||d===3||d===6)&&(d=En.current,d!==null&&d.tag===13&&(d.flags|=16384))),Cf(s,n)):fs(s)}function fs(n){var s=n;do{if((s.flags&32768)!==0){Cf(s,or);return}n=s.return;var c=om(s.alternate,s,Wn);if(c!==null){wt=c;return}if(s=s.sibling,s!==null){wt=s;return}wt=s=n}while(s!==null);zt===0&&(zt=5)}function Cf(n,s){do{var c=lm(n.alternate,n);if(c!==null){c.flags&=32767,wt=c;return}if(c=n.return,c!==null&&(c.flags|=32768,c.subtreeFlags=0,c.deletions=null),!s&&(n=n.sibling,n!==null)){wt=n;return}wt=n=c}while(n!==null);zt=6,wt=null}function Af(n,s,c,d,v,C,q,Z,fe){n.cancelPendingCommit=null;do ps();while(Qt!==0);if((Tt&6)!==0)throw Error(a(327));if(s!==null){if(s===n.current)throw Error(a(177));if(C=s.lanes|s.childLanes,C|=go,Ge(n,c,C,q,Z,fe),n===Nt&&(wt=Nt=null,At=0),si=s,ur=n,oi=c,Sl=C,El=v,mf=d,(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,xm(pe,function(){return kf(),null})):(n.callbackNode=null,n.callbackPriority=0),d=(s.flags&13878)!==0,(s.subtreeFlags&13878)!==0||d){d=B.T,B.T=null,v=H.p,H.p=2,q=Tt,Tt|=4;try{cm(n,s,c)}finally{Tt=q,H.p=v,B.T=d}}Qt=1,Rf(),_f(),Tf()}}function Rf(){if(Qt===1){Qt=0;var n=ur,s=si,c=(s.flags&13878)!==0;if((s.subtreeFlags&13878)!==0||c){c=B.T,B.T=null;var d=H.p;H.p=2;var v=Tt;Tt|=4;try{lf(s,n);var C=Fl,q=pu(n.containerInfo),Z=C.focusedElem,fe=C.selectionRange;if(q!==Z&&Z&&Z.ownerDocument&&fu(Z.ownerDocument.documentElement,Z)){if(fe!==null&&uo(Z)){var Me=fe.start,Ue=fe.end;if(Ue===void 0&&(Ue=Me),"selectionStart"in Z)Z.selectionStart=Me,Z.selectionEnd=Math.min(Ue,Z.value.length);else{var Ve=Z.ownerDocument||document,$e=Ve&&Ve.defaultView||window;if($e.getSelection){var ze=$e.getSelection(),vt=Z.textContent.length,mt=Math.min(fe.start,vt),Mt=fe.end===void 0?mt:Math.min(fe.end,vt);!ze.extend&&mt>Mt&&(q=Mt,Mt=mt,mt=q);var Ae=du(Z,mt),be=du(Z,Mt);if(Ae&&be&&(ze.rangeCount!==1||ze.anchorNode!==Ae.node||ze.anchorOffset!==Ae.offset||ze.focusNode!==be.node||ze.focusOffset!==be.offset)){var ke=Ve.createRange();ke.setStart(Ae.node,Ae.offset),ze.removeAllRanges(),mt>Mt?(ze.addRange(ke),ze.extend(be.node,be.offset)):(ke.setEnd(be.node,be.offset),ze.addRange(ke))}}}}for(Ve=[],ze=Z;ze=ze.parentNode;)ze.nodeType===1&&Ve.push({element:ze,left:ze.scrollLeft,top:ze.scrollTop});for(typeof Z.focus=="function"&&Z.focus(),Z=0;Z<Ve.length;Z++){var He=Ve[Z];He.element.scrollLeft=He.left,He.element.scrollTop=He.top}}As=!!$l,Fl=$l=null}finally{Tt=v,H.p=d,B.T=c}}n.current=s,Qt=2}}function _f(){if(Qt===2){Qt=0;var n=ur,s=si,c=(s.flags&8772)!==0;if((s.subtreeFlags&8772)!==0||c){c=B.T,B.T=null;var d=H.p;H.p=2;var v=Tt;Tt|=4;try{rf(n,s.alternate,s)}finally{Tt=v,H.p=d,B.T=c}}Qt=3}}function Tf(){if(Qt===4||Qt===3){Qt=0,ge();var n=ur,s=si,c=oi,d=mf;(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?Qt=5:(Qt=0,si=ur=null,Pf(n,n.pendingLanes));var v=n.pendingLanes;if(v===0&&(cr=null),ae(c),s=s.stateNode,Le&&typeof Le.onCommitFiberRoot=="function")try{Le.onCommitFiberRoot(Fe,s,void 0,(s.current.flags&128)===128)}catch{}if(d!==null){s=B.T,v=H.p,H.p=2,B.T=null;try{for(var C=n.onRecoverableError,q=0;q<d.length;q++){var Z=d[q];C(Z.value,{componentStack:Z.stack})}}finally{B.T=s,H.p=v}}(oi&3)!==0&&ps(),Mn(n),v=n.pendingLanes,(c&4194090)!==0&&(v&42)!==0?n===wl?Ji++:(Ji=0,wl=n):Ji=0,ea(0)}}function Pf(n,s){(n.pooledCacheLanes&=s)===0&&(s=n.pooledCache,s!=null&&(n.pooledCache=null,Mi(s)))}function ps(n){return Rf(),_f(),Tf(),kf()}function kf(){if(Qt!==5)return!1;var n=ur,s=Sl;Sl=0;var c=ae(oi),d=B.T,v=H.p;try{H.p=32>c?32:c,B.T=null,c=El,El=null;var C=ur,q=oi;if(Qt=0,si=ur=null,oi=0,(Tt&6)!==0)throw Error(a(331));var Z=Tt;if(Tt|=4,pf(C.current),uf(C,C.current,q,c),Tt=Z,ea(0,!1),Le&&typeof Le.onPostCommitFiberRoot=="function")try{Le.onPostCommitFiberRoot(Fe,C)}catch{}return!0}finally{H.p=v,B.T=d,Pf(n,s)}}function Of(n,s,c){s=yn(c,s),s=tl(n.stateNode,s,2),n=er(n,s,2),n!==null&&(Ne(n,2),Mn(n))}function jt(n,s,c){if(n.tag===3)Of(n,n,c);else for(;s!==null;){if(s.tag===3){Of(s,n,c);break}else if(s.tag===1){var d=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof d.componentDidCatch=="function"&&(cr===null||!cr.has(d))){n=yn(c,n),c=jd(2),d=er(s,c,2),d!==null&&(Ld(c,d,s,n),Ne(d,2),Mn(d));break}}s=s.return}}function _l(n,s,c){var d=n.pingCache;if(d===null){d=n.pingCache=new fm;var v=new Set;d.set(s,v)}else v=d.get(s),v===void 0&&(v=new Set,d.set(s,v));v.has(c)||(vl=!0,v.add(c),n=vm.bind(null,n,s,c),s.then(n,n))}function vm(n,s,c){var d=n.pingCache;d!==null&&d.delete(s),n.pingedLanes|=n.suspendedLanes&c,n.warmLanes&=~c,Nt===n&&(At&c)===c&&(zt===4||zt===3&&(At&62914560)===At&&300>se()-xl?(Tt&2)===0&&li(n,0):yl|=c,ai===At&&(ai=0)),Mn(n)}function Df(n,s){s===0&&(s=ht()),n=Vr(n,s),n!==null&&(Ne(n,s),Mn(n))}function ym(n){var s=n.memoizedState,c=0;s!==null&&(c=s.retryLane),Df(n,c)}function bm(n,s){var c=0;switch(n.tag){case 13:var d=n.stateNode,v=n.memoizedState;v!==null&&(c=v.retryLane);break;case 19:d=n.stateNode;break;case 22:d=n.stateNode._retryCache;break;default:throw Error(a(314))}d!==null&&d.delete(s),Df(n,c)}function xm(n,s){return De(n,s)}var hs=null,ui=null,Tl=!1,ms=!1,Pl=!1,Mr=0;function Mn(n){n!==ui&&n.next===null&&(ui===null?hs=ui=n:ui=ui.next=n),ms=!0,Tl||(Tl=!0,Em())}function ea(n,s){if(!Pl&&ms){Pl=!0;do for(var c=!1,d=hs;d!==null;){if(n!==0){var v=d.pendingLanes;if(v===0)var C=0;else{var q=d.suspendedLanes,Z=d.pingedLanes;C=(1<<31-qe(42|n)+1)-1,C&=v&~(q&~Z),C=C&201326741?C&201326741|1:C?C|2:0}C!==0&&(c=!0,Nf(d,C))}else C=At,C=ye(d,d===Nt?C:0,d.cancelPendingCommit!==null||d.timeoutHandle!==-1),(C&3)===0||xe(d,C)||(c=!0,Nf(d,C));d=d.next}while(c);Pl=!1}}function Sm(){Mf()}function Mf(){ms=Tl=!1;var n=0;Mr!==0&&(km()&&(n=Mr),Mr=0);for(var s=se(),c=null,d=hs;d!==null;){var v=d.next,C=jf(d,s);C===0?(d.next=null,c===null?hs=v:c.next=v,v===null&&(ui=c)):(c=d,(n!==0||(C&3)!==0)&&(ms=!0)),d=v}ea(n)}function jf(n,s){for(var c=n.suspendedLanes,d=n.pingedLanes,v=n.expirationTimes,C=n.pendingLanes&-62914561;0<C;){var q=31-qe(C),Z=1<<q,fe=v[q];fe===-1?((Z&c)===0||(Z&d)!==0)&&(v[q]=Qe(Z,s)):fe<=s&&(n.expiredLanes|=Z),C&=~Z}if(s=Nt,c=At,c=ye(n,n===s?c:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),d=n.callbackNode,c===0||n===s&&(Pt===2||Pt===9)||n.cancelPendingCommit!==null)return d!==null&&d!==null&&je(d),n.callbackNode=null,n.callbackPriority=0;if((c&3)===0||xe(n,c)){if(s=c&-c,s===n.callbackPriority)return s;switch(d!==null&&je(d),ae(c)){case 2:case 8:c=de;break;case 32:c=pe;break;case 268435456:c=Te;break;default:c=pe}return d=Lf.bind(null,n),c=De(c,d),n.callbackPriority=s,n.callbackNode=c,s}return d!==null&&d!==null&&je(d),n.callbackPriority=2,n.callbackNode=null,2}function Lf(n,s){if(Qt!==0&&Qt!==5)return n.callbackNode=null,n.callbackPriority=0,null;var c=n.callbackNode;if(ps()&&n.callbackNode!==c)return null;var d=At;return d=ye(n,n===Nt?d:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),d===0?null:(vf(n,d,s),jf(n,se()),n.callbackNode!=null&&n.callbackNode===c?Lf.bind(null,n):null)}function Nf(n,s){if(ps())return null;vf(n,s,!0)}function Em(){Dm(function(){(Tt&6)!==0?De(ee,Sm):Mf()})}function kl(){return Mr===0&&(Mr=pt()),Mr}function $f(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:Aa(""+n)}function Ff(n,s){var c=s.ownerDocument.createElement("input");return c.name=s.name,c.value=s.value,n.id&&c.setAttribute("form",n.id),s.parentNode.insertBefore(c,s),n=new FormData(n),c.parentNode.removeChild(c),n}function wm(n,s,c,d,v){if(s==="submit"&&c&&c.stateNode===v){var C=$f((v[Ie]||null).action),q=d.submitter;q&&(s=(s=q[Ie]||null)?$f(s.formAction):q.getAttribute("formAction"),s!==null&&(C=s,q=null));var Z=new Pa("action","action",null,d,v);n.push({event:Z,listeners:[{instance:null,listener:function(){if(d.defaultPrevented){if(Mr!==0){var fe=q?Ff(v,q):new FormData(v);Ko(c,{pending:!0,data:fe,method:v.method,action:C},null,fe)}}else typeof C=="function"&&(Z.preventDefault(),fe=q?Ff(v,q):new FormData(v),Ko(c,{pending:!0,data:fe,method:v.method,action:C},C,fe))},currentTarget:v}]})}}for(var Ol=0;Ol<mo.length;Ol++){var Dl=mo[Ol],Cm=Dl.toLowerCase(),Am=Dl[0].toUpperCase()+Dl.slice(1);Rn(Cm,"on"+Am)}Rn(gu,"onAnimationEnd"),Rn(vu,"onAnimationIteration"),Rn(yu,"onAnimationStart"),Rn("dblclick","onDoubleClick"),Rn("focusin","onFocus"),Rn("focusout","onBlur"),Rn(Bh,"onTransitionRun"),Rn(Uh,"onTransitionStart"),Rn(Hh,"onTransitionCancel"),Rn(bu,"onTransitionEnd"),tn("onMouseEnter",["mouseout","mouseover"]),tn("onMouseLeave",["mouseout","mouseover"]),tn("onPointerEnter",["pointerout","pointerover"]),tn("onPointerLeave",["pointerout","pointerover"]),Jt("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Jt("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Jt("onBeforeInput",["compositionend","keypress","textInput","paste"]),Jt("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Jt("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Jt("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ta="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Rm=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ta));function If(n,s){s=(s&4)!==0;for(var c=0;c<n.length;c++){var d=n[c],v=d.event;d=d.listeners;e:{var C=void 0;if(s)for(var q=d.length-1;0<=q;q--){var Z=d[q],fe=Z.instance,Me=Z.currentTarget;if(Z=Z.listener,fe!==C&&v.isPropagationStopped())break e;C=Z,v.currentTarget=Me;try{C(v)}catch(Ue){ns(Ue)}v.currentTarget=null,C=fe}else for(q=0;q<d.length;q++){if(Z=d[q],fe=Z.instance,Me=Z.currentTarget,Z=Z.listener,fe!==C&&v.isPropagationStopped())break e;C=Z,v.currentTarget=Me;try{C(v)}catch(Ue){ns(Ue)}v.currentTarget=null,C=fe}}}}function Ct(n,s){var c=s[et];c===void 0&&(c=s[et]=new Set);var d=n+"__bubble";c.has(d)||(zf(s,n,2,!1),c.add(d))}function Ml(n,s,c){var d=0;s&&(d|=4),zf(c,n,d,s)}var gs="_reactListening"+Math.random().toString(36).slice(2);function jl(n){if(!n[gs]){n[gs]=!0,Lt.forEach(function(c){c!=="selectionchange"&&(Rm.has(c)||Ml(c,!1,n),Ml(c,!0,n))});var s=n.nodeType===9?n:n.ownerDocument;s===null||s[gs]||(s[gs]=!0,Ml("selectionchange",!1,s))}}function zf(n,s,c,d){switch(up(s)){case 2:var v=Jm;break;case 8:v=eg;break;default:v=Xl}c=v.bind(null,s,c,n),v=void 0,!to||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(v=!0),d?v!==void 0?n.addEventListener(s,c,{capture:!0,passive:v}):n.addEventListener(s,c,!0):v!==void 0?n.addEventListener(s,c,{passive:v}):n.addEventListener(s,c,!1)}function Ll(n,s,c,d,v){var C=d;if((s&1)===0&&(s&2)===0&&d!==null)e:for(;;){if(d===null)return;var q=d.tag;if(q===3||q===4){var Z=d.stateNode.containerInfo;if(Z===v)break;if(q===4)for(q=d.return;q!==null;){var fe=q.tag;if((fe===3||fe===4)&&q.stateNode.containerInfo===v)return;q=q.return}for(;Z!==null;){if(q=st(Z),q===null)return;if(fe=q.tag,fe===5||fe===6||fe===26||fe===27){d=C=q;continue e}Z=Z.parentNode}}d=d.return}Gc(function(){var Me=C,Ue=Js(c),Ve=[];e:{var $e=xu.get(n);if($e!==void 0){var ze=Pa,vt=n;switch(n){case"keypress":if(_a(c)===0)break e;case"keydown":case"keyup":ze=bh;break;case"focusin":vt="focus",ze=ao;break;case"focusout":vt="blur",ze=ao;break;case"beforeblur":case"afterblur":ze=ao;break;case"click":if(c.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ze=Yc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ze=oh;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ze=Eh;break;case gu:case vu:case yu:ze=uh;break;case bu:ze=Ch;break;case"scroll":case"scrollend":ze=ah;break;case"wheel":ze=Rh;break;case"copy":case"cut":case"paste":ze=fh;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ze=Qc;break;case"toggle":case"beforetoggle":ze=Th}var mt=(s&4)!==0,Mt=!mt&&(n==="scroll"||n==="scrollend"),Ae=mt?$e!==null?$e+"Capture":null:$e;mt=[];for(var be=Me,ke;be!==null;){var He=be;if(ke=He.stateNode,He=He.tag,He!==5&&He!==26&&He!==27||ke===null||Ae===null||(He=xi(be,Ae),He!=null&&mt.push(na(be,He,ke))),Mt)break;be=be.return}0<mt.length&&($e=new ze($e,vt,null,c,Ue),Ve.push({event:$e,listeners:mt}))}}if((s&7)===0){e:{if($e=n==="mouseover"||n==="pointerover",ze=n==="mouseout"||n==="pointerout",$e&&c!==Zs&&(vt=c.relatedTarget||c.fromElement)&&(st(vt)||vt[Be]))break e;if((ze||$e)&&($e=Ue.window===Ue?Ue:($e=Ue.ownerDocument)?$e.defaultView||$e.parentWindow:window,ze?(vt=c.relatedTarget||c.toElement,ze=Me,vt=vt?st(vt):null,vt!==null&&(Mt=l(vt),mt=vt.tag,vt!==Mt||mt!==5&&mt!==27&&mt!==6)&&(vt=null)):(ze=null,vt=Me),ze!==vt)){if(mt=Yc,He="onMouseLeave",Ae="onMouseEnter",be="mouse",(n==="pointerout"||n==="pointerover")&&(mt=Qc,He="onPointerLeave",Ae="onPointerEnter",be="pointer"),Mt=ze==null?$e:yt(ze),ke=vt==null?$e:yt(vt),$e=new mt(He,be+"leave",ze,c,Ue),$e.target=Mt,$e.relatedTarget=ke,He=null,st(Ue)===Me&&(mt=new mt(Ae,be+"enter",vt,c,Ue),mt.target=ke,mt.relatedTarget=Mt,He=mt),Mt=He,ze&&vt)t:{for(mt=ze,Ae=vt,be=0,ke=mt;ke;ke=di(ke))be++;for(ke=0,He=Ae;He;He=di(He))ke++;for(;0<be-ke;)mt=di(mt),be--;for(;0<ke-be;)Ae=di(Ae),ke--;for(;be--;){if(mt===Ae||Ae!==null&&mt===Ae.alternate)break t;mt=di(mt),Ae=di(Ae)}mt=null}else mt=null;ze!==null&&Bf(Ve,$e,ze,mt,!1),vt!==null&&Mt!==null&&Bf(Ve,Mt,vt,mt,!0)}}e:{if($e=Me?yt(Me):window,ze=$e.nodeName&&$e.nodeName.toLowerCase(),ze==="select"||ze==="input"&&$e.type==="file")var lt=au;else if(ru($e))if(su)lt=Fh;else{lt=Nh;var St=Lh}else ze=$e.nodeName,!ze||ze.toLowerCase()!=="input"||$e.type!=="checkbox"&&$e.type!=="radio"?Me&&Qs(Me.elementType)&&(lt=au):lt=$h;if(lt&&(lt=lt(n,Me))){iu(Ve,lt,c,Ue);break e}St&&St(n,$e,Me),n==="focusout"&&Me&&$e.type==="number"&&Me.memoizedProps.value!=null&&Ks($e,"number",$e.value)}switch(St=Me?yt(Me):window,n){case"focusin":(ru(St)||St.contentEditable==="true")&&(Br=St,fo=Me,Ti=null);break;case"focusout":Ti=fo=Br=null;break;case"mousedown":po=!0;break;case"contextmenu":case"mouseup":case"dragend":po=!1,hu(Ve,c,Ue);break;case"selectionchange":if(zh)break;case"keydown":case"keyup":hu(Ve,c,Ue)}var dt;if(oo)e:{switch(n){case"compositionstart":var gt="onCompositionStart";break e;case"compositionend":gt="onCompositionEnd";break e;case"compositionupdate":gt="onCompositionUpdate";break e}gt=void 0}else zr?tu(n,c)&&(gt="onCompositionEnd"):n==="keydown"&&c.keyCode===229&&(gt="onCompositionStart");gt&&(Zc&&c.locale!=="ko"&&(zr||gt!=="onCompositionStart"?gt==="onCompositionEnd"&&zr&&(dt=Wc()):(Kn=Ue,no="value"in Kn?Kn.value:Kn.textContent,zr=!0)),St=vs(Me,gt),0<St.length&&(gt=new Kc(gt,n,null,c,Ue),Ve.push({event:gt,listeners:St}),dt?gt.data=dt:(dt=nu(c),dt!==null&&(gt.data=dt)))),(dt=kh?Oh(n,c):Dh(n,c))&&(gt=vs(Me,"onBeforeInput"),0<gt.length&&(St=new Kc("onBeforeInput","beforeinput",null,c,Ue),Ve.push({event:St,listeners:gt}),St.data=dt)),wm(Ve,n,Me,c,Ue)}If(Ve,s)})}function na(n,s,c){return{instance:n,listener:s,currentTarget:c}}function vs(n,s){for(var c=s+"Capture",d=[];n!==null;){var v=n,C=v.stateNode;if(v=v.tag,v!==5&&v!==26&&v!==27||C===null||(v=xi(n,c),v!=null&&d.unshift(na(n,v,C)),v=xi(n,s),v!=null&&d.push(na(n,v,C))),n.tag===3)return d;n=n.return}return[]}function di(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function Bf(n,s,c,d,v){for(var C=s._reactName,q=[];c!==null&&c!==d;){var Z=c,fe=Z.alternate,Me=Z.stateNode;if(Z=Z.tag,fe!==null&&fe===d)break;Z!==5&&Z!==26&&Z!==27||Me===null||(fe=Me,v?(Me=xi(c,C),Me!=null&&q.unshift(na(c,Me,fe))):v||(Me=xi(c,C),Me!=null&&q.push(na(c,Me,fe)))),c=c.return}q.length!==0&&n.push({event:s,listeners:q})}var _m=/\r\n?/g,Tm=/\u0000|\uFFFD/g;function Uf(n){return(typeof n=="string"?n:""+n).replace(_m,`
|
||
`).replace(Tm,"")}function Hf(n,s){return s=Uf(s),Uf(n)===s}function ys(){}function Dt(n,s,c,d,v,C){switch(c){case"children":typeof d=="string"?s==="body"||s==="textarea"&&d===""||$r(n,d):(typeof d=="number"||typeof d=="bigint")&&s!=="body"&&$r(n,""+d);break;case"className":Ea(n,"class",d);break;case"tabIndex":Ea(n,"tabindex",d);break;case"dir":case"role":case"viewBox":case"width":case"height":Ea(n,c,d);break;case"style":Vc(n,d,C);break;case"data":if(s!=="object"){Ea(n,"data",d);break}case"src":case"href":if(d===""&&(s!=="a"||c!=="href")){n.removeAttribute(c);break}if(d==null||typeof d=="function"||typeof d=="symbol"||typeof d=="boolean"){n.removeAttribute(c);break}d=Aa(""+d),n.setAttribute(c,d);break;case"action":case"formAction":if(typeof d=="function"){n.setAttribute(c,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof C=="function"&&(c==="formAction"?(s!=="input"&&Dt(n,s,"name",v.name,v,null),Dt(n,s,"formEncType",v.formEncType,v,null),Dt(n,s,"formMethod",v.formMethod,v,null),Dt(n,s,"formTarget",v.formTarget,v,null)):(Dt(n,s,"encType",v.encType,v,null),Dt(n,s,"method",v.method,v,null),Dt(n,s,"target",v.target,v,null)));if(d==null||typeof d=="symbol"||typeof d=="boolean"){n.removeAttribute(c);break}d=Aa(""+d),n.setAttribute(c,d);break;case"onClick":d!=null&&(n.onclick=ys);break;case"onScroll":d!=null&&Ct("scroll",n);break;case"onScrollEnd":d!=null&&Ct("scrollend",n);break;case"dangerouslySetInnerHTML":if(d!=null){if(typeof d!="object"||!("__html"in d))throw Error(a(61));if(c=d.__html,c!=null){if(v.children!=null)throw Error(a(60));n.innerHTML=c}}break;case"multiple":n.multiple=d&&typeof d!="function"&&typeof d!="symbol";break;case"muted":n.muted=d&&typeof d!="function"&&typeof d!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(d==null||typeof d=="function"||typeof d=="boolean"||typeof d=="symbol"){n.removeAttribute("xlink:href");break}c=Aa(""+d),n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",c);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":d!=null&&typeof d!="function"&&typeof d!="symbol"?n.setAttribute(c,""+d):n.removeAttribute(c);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":d&&typeof d!="function"&&typeof d!="symbol"?n.setAttribute(c,""):n.removeAttribute(c);break;case"capture":case"download":d===!0?n.setAttribute(c,""):d!==!1&&d!=null&&typeof d!="function"&&typeof d!="symbol"?n.setAttribute(c,d):n.removeAttribute(c);break;case"cols":case"rows":case"size":case"span":d!=null&&typeof d!="function"&&typeof d!="symbol"&&!isNaN(d)&&1<=d?n.setAttribute(c,d):n.removeAttribute(c);break;case"rowSpan":case"start":d==null||typeof d=="function"||typeof d=="symbol"||isNaN(d)?n.removeAttribute(c):n.setAttribute(c,d);break;case"popover":Ct("beforetoggle",n),Ct("toggle",n),Sa(n,"popover",d);break;case"xlinkActuate":jn(n,"http://www.w3.org/1999/xlink","xlink:actuate",d);break;case"xlinkArcrole":jn(n,"http://www.w3.org/1999/xlink","xlink:arcrole",d);break;case"xlinkRole":jn(n,"http://www.w3.org/1999/xlink","xlink:role",d);break;case"xlinkShow":jn(n,"http://www.w3.org/1999/xlink","xlink:show",d);break;case"xlinkTitle":jn(n,"http://www.w3.org/1999/xlink","xlink:title",d);break;case"xlinkType":jn(n,"http://www.w3.org/1999/xlink","xlink:type",d);break;case"xmlBase":jn(n,"http://www.w3.org/XML/1998/namespace","xml:base",d);break;case"xmlLang":jn(n,"http://www.w3.org/XML/1998/namespace","xml:lang",d);break;case"xmlSpace":jn(n,"http://www.w3.org/XML/1998/namespace","xml:space",d);break;case"is":Sa(n,"is",d);break;case"innerText":case"textContent":break;default:(!(2<c.length)||c[0]!=="o"&&c[0]!=="O"||c[1]!=="n"&&c[1]!=="N")&&(c=rh.get(c)||c,Sa(n,c,d))}}function Nl(n,s,c,d,v,C){switch(c){case"style":Vc(n,d,C);break;case"dangerouslySetInnerHTML":if(d!=null){if(typeof d!="object"||!("__html"in d))throw Error(a(61));if(c=d.__html,c!=null){if(v.children!=null)throw Error(a(60));n.innerHTML=c}}break;case"children":typeof d=="string"?$r(n,d):(typeof d=="number"||typeof d=="bigint")&&$r(n,""+d);break;case"onScroll":d!=null&&Ct("scroll",n);break;case"onScrollEnd":d!=null&&Ct("scrollend",n);break;case"onClick":d!=null&&(n.onclick=ys);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!mn.hasOwnProperty(c))e:{if(c[0]==="o"&&c[1]==="n"&&(v=c.endsWith("Capture"),s=c.slice(2,v?c.length-7:void 0),C=n[Ie]||null,C=C!=null?C[c]:null,typeof C=="function"&&n.removeEventListener(s,C,v),typeof d=="function")){typeof C!="function"&&C!==null&&(c in n?n[c]=null:n.hasAttribute(c)&&n.removeAttribute(c)),n.addEventListener(s,d,v);break e}c in n?n[c]=d:d===!0?n.setAttribute(c,""):Sa(n,c,d)}}}function Zt(n,s,c){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ct("error",n),Ct("load",n);var d=!1,v=!1,C;for(C in c)if(c.hasOwnProperty(C)){var q=c[C];if(q!=null)switch(C){case"src":d=!0;break;case"srcSet":v=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,s));default:Dt(n,s,C,q,c,null)}}v&&Dt(n,s,"srcSet",c.srcSet,c,null),d&&Dt(n,s,"src",c.src,c,null);return;case"input":Ct("invalid",n);var Z=C=q=v=null,fe=null,Me=null;for(d in c)if(c.hasOwnProperty(d)){var Ue=c[d];if(Ue!=null)switch(d){case"name":v=Ue;break;case"type":q=Ue;break;case"checked":fe=Ue;break;case"defaultChecked":Me=Ue;break;case"value":C=Ue;break;case"defaultValue":Z=Ue;break;case"children":case"dangerouslySetInnerHTML":if(Ue!=null)throw Error(a(137,s));break;default:Dt(n,s,d,Ue,c,null)}}zc(n,C,Z,fe,Me,q,v,!1),wa(n);return;case"select":Ct("invalid",n),d=q=C=null;for(v in c)if(c.hasOwnProperty(v)&&(Z=c[v],Z!=null))switch(v){case"value":C=Z;break;case"defaultValue":q=Z;break;case"multiple":d=Z;default:Dt(n,s,v,Z,c,null)}s=C,c=q,n.multiple=!!d,s!=null?Nr(n,!!d,s,!1):c!=null&&Nr(n,!!d,c,!0);return;case"textarea":Ct("invalid",n),C=v=d=null;for(q in c)if(c.hasOwnProperty(q)&&(Z=c[q],Z!=null))switch(q){case"value":d=Z;break;case"defaultValue":v=Z;break;case"children":C=Z;break;case"dangerouslySetInnerHTML":if(Z!=null)throw Error(a(91));break;default:Dt(n,s,q,Z,c,null)}Uc(n,d,v,C),wa(n);return;case"option":for(fe in c)if(c.hasOwnProperty(fe)&&(d=c[fe],d!=null))switch(fe){case"selected":n.selected=d&&typeof d!="function"&&typeof d!="symbol";break;default:Dt(n,s,fe,d,c,null)}return;case"dialog":Ct("beforetoggle",n),Ct("toggle",n),Ct("cancel",n),Ct("close",n);break;case"iframe":case"object":Ct("load",n);break;case"video":case"audio":for(d=0;d<ta.length;d++)Ct(ta[d],n);break;case"image":Ct("error",n),Ct("load",n);break;case"details":Ct("toggle",n);break;case"embed":case"source":case"link":Ct("error",n),Ct("load",n);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Me in c)if(c.hasOwnProperty(Me)&&(d=c[Me],d!=null))switch(Me){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,s));default:Dt(n,s,Me,d,c,null)}return;default:if(Qs(s)){for(Ue in c)c.hasOwnProperty(Ue)&&(d=c[Ue],d!==void 0&&Nl(n,s,Ue,d,c,void 0));return}}for(Z in c)c.hasOwnProperty(Z)&&(d=c[Z],d!=null&&Dt(n,s,Z,d,c,null))}function Pm(n,s,c,d){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var v=null,C=null,q=null,Z=null,fe=null,Me=null,Ue=null;for(ze in c){var Ve=c[ze];if(c.hasOwnProperty(ze)&&Ve!=null)switch(ze){case"checked":break;case"value":break;case"defaultValue":fe=Ve;default:d.hasOwnProperty(ze)||Dt(n,s,ze,null,d,Ve)}}for(var $e in d){var ze=d[$e];if(Ve=c[$e],d.hasOwnProperty($e)&&(ze!=null||Ve!=null))switch($e){case"type":C=ze;break;case"name":v=ze;break;case"checked":Me=ze;break;case"defaultChecked":Ue=ze;break;case"value":q=ze;break;case"defaultValue":Z=ze;break;case"children":case"dangerouslySetInnerHTML":if(ze!=null)throw Error(a(137,s));break;default:ze!==Ve&&Dt(n,s,$e,ze,d,Ve)}}Ys(n,q,Z,fe,Me,Ue,C,v);return;case"select":ze=q=Z=$e=null;for(C in c)if(fe=c[C],c.hasOwnProperty(C)&&fe!=null)switch(C){case"value":break;case"multiple":ze=fe;default:d.hasOwnProperty(C)||Dt(n,s,C,null,d,fe)}for(v in d)if(C=d[v],fe=c[v],d.hasOwnProperty(v)&&(C!=null||fe!=null))switch(v){case"value":$e=C;break;case"defaultValue":Z=C;break;case"multiple":q=C;default:C!==fe&&Dt(n,s,v,C,d,fe)}s=Z,c=q,d=ze,$e!=null?Nr(n,!!c,$e,!1):!!d!=!!c&&(s!=null?Nr(n,!!c,s,!0):Nr(n,!!c,c?[]:"",!1));return;case"textarea":ze=$e=null;for(Z in c)if(v=c[Z],c.hasOwnProperty(Z)&&v!=null&&!d.hasOwnProperty(Z))switch(Z){case"value":break;case"children":break;default:Dt(n,s,Z,null,d,v)}for(q in d)if(v=d[q],C=c[q],d.hasOwnProperty(q)&&(v!=null||C!=null))switch(q){case"value":$e=v;break;case"defaultValue":ze=v;break;case"children":break;case"dangerouslySetInnerHTML":if(v!=null)throw Error(a(91));break;default:v!==C&&Dt(n,s,q,v,d,C)}Bc(n,$e,ze);return;case"option":for(var vt in c)if($e=c[vt],c.hasOwnProperty(vt)&&$e!=null&&!d.hasOwnProperty(vt))switch(vt){case"selected":n.selected=!1;break;default:Dt(n,s,vt,null,d,$e)}for(fe in d)if($e=d[fe],ze=c[fe],d.hasOwnProperty(fe)&&$e!==ze&&($e!=null||ze!=null))switch(fe){case"selected":n.selected=$e&&typeof $e!="function"&&typeof $e!="symbol";break;default:Dt(n,s,fe,$e,d,ze)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var mt in c)$e=c[mt],c.hasOwnProperty(mt)&&$e!=null&&!d.hasOwnProperty(mt)&&Dt(n,s,mt,null,d,$e);for(Me in d)if($e=d[Me],ze=c[Me],d.hasOwnProperty(Me)&&$e!==ze&&($e!=null||ze!=null))switch(Me){case"children":case"dangerouslySetInnerHTML":if($e!=null)throw Error(a(137,s));break;default:Dt(n,s,Me,$e,d,ze)}return;default:if(Qs(s)){for(var Mt in c)$e=c[Mt],c.hasOwnProperty(Mt)&&$e!==void 0&&!d.hasOwnProperty(Mt)&&Nl(n,s,Mt,void 0,d,$e);for(Ue in d)$e=d[Ue],ze=c[Ue],!d.hasOwnProperty(Ue)||$e===ze||$e===void 0&&ze===void 0||Nl(n,s,Ue,$e,d,ze);return}}for(var Ae in c)$e=c[Ae],c.hasOwnProperty(Ae)&&$e!=null&&!d.hasOwnProperty(Ae)&&Dt(n,s,Ae,null,d,$e);for(Ve in d)$e=d[Ve],ze=c[Ve],!d.hasOwnProperty(Ve)||$e===ze||$e==null&&ze==null||Dt(n,s,Ve,$e,d,ze)}var $l=null,Fl=null;function bs(n){return n.nodeType===9?n:n.ownerDocument}function Vf(n){switch(n){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function qf(n,s){if(n===0)switch(s){case"svg":return 1;case"math":return 2;default:return 0}return n===1&&s==="foreignObject"?0:n}function Il(n,s){return n==="textarea"||n==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.children=="bigint"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var zl=null;function km(){var n=window.event;return n&&n.type==="popstate"?n===zl?!1:(zl=n,!0):(zl=null,!1)}var Gf=typeof setTimeout=="function"?setTimeout:void 0,Om=typeof clearTimeout=="function"?clearTimeout:void 0,Wf=typeof Promise=="function"?Promise:void 0,Dm=typeof queueMicrotask=="function"?queueMicrotask:typeof Wf<"u"?function(n){return Wf.resolve(null).then(n).catch(Mm)}:Gf;function Mm(n){setTimeout(function(){throw n})}function fr(n){return n==="head"}function Xf(n,s){var c=s,d=0,v=0;do{var C=c.nextSibling;if(n.removeChild(c),C&&C.nodeType===8)if(c=C.data,c==="/$"){if(0<d&&8>d){c=d;var q=n.ownerDocument;if(c&1&&ra(q.documentElement),c&2&&ra(q.body),c&4)for(c=q.head,ra(c),q=c.firstChild;q;){var Z=q.nextSibling,fe=q.nodeName;q[Ze]||fe==="SCRIPT"||fe==="STYLE"||fe==="LINK"&&q.rel.toLowerCase()==="stylesheet"||c.removeChild(q),q=Z}}if(v===0){n.removeChild(C),da(s);return}v--}else c==="$"||c==="$?"||c==="$!"?v++:d=c.charCodeAt(0)-48;else d=0;c=C}while(c);da(s)}function Bl(n){var s=n.firstChild;for(s&&s.nodeType===10&&(s=s.nextSibling);s;){var c=s;switch(s=s.nextSibling,c.nodeName){case"HTML":case"HEAD":case"BODY":Bl(c),rt(c);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(c.rel.toLowerCase()==="stylesheet")continue}n.removeChild(c)}}function jm(n,s,c,d){for(;n.nodeType===1;){var v=c;if(n.nodeName.toLowerCase()!==s.toLowerCase()){if(!d&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(d){if(!n[Ze])switch(s){case"meta":if(!n.hasAttribute("itemprop"))break;return n;case"link":if(C=n.getAttribute("rel"),C==="stylesheet"&&n.hasAttribute("data-precedence"))break;if(C!==v.rel||n.getAttribute("href")!==(v.href==null||v.href===""?null:v.href)||n.getAttribute("crossorigin")!==(v.crossOrigin==null?null:v.crossOrigin)||n.getAttribute("title")!==(v.title==null?null:v.title))break;return n;case"style":if(n.hasAttribute("data-precedence"))break;return n;case"script":if(C=n.getAttribute("src"),(C!==(v.src==null?null:v.src)||n.getAttribute("type")!==(v.type==null?null:v.type)||n.getAttribute("crossorigin")!==(v.crossOrigin==null?null:v.crossOrigin))&&C&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}}else if(s==="input"&&n.type==="hidden"){var C=v.name==null?null:""+v.name;if(v.type==="hidden"&&n.getAttribute("name")===C)return n}else return n;if(n=Tn(n.nextSibling),n===null)break}return null}function Lm(n,s,c){if(s==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!c||(n=Tn(n.nextSibling),n===null))return null;return n}function Ul(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState==="complete"}function Nm(n,s){var c=n.ownerDocument;if(n.data!=="$?"||c.readyState==="complete")s();else{var d=function(){s(),c.removeEventListener("DOMContentLoaded",d)};c.addEventListener("DOMContentLoaded",d),n._reactRetry=d}}function Tn(n){for(;n!=null;n=n.nextSibling){var s=n.nodeType;if(s===1||s===3)break;if(s===8){if(s=n.data,s==="$"||s==="$!"||s==="$?"||s==="F!"||s==="F")break;if(s==="/$")return null}}return n}var Hl=null;function Yf(n){n=n.previousSibling;for(var s=0;n;){if(n.nodeType===8){var c=n.data;if(c==="$"||c==="$!"||c==="$?"){if(s===0)return n;s--}else c==="/$"&&s++}n=n.previousSibling}return null}function Kf(n,s,c){switch(s=bs(c),n){case"html":if(n=s.documentElement,!n)throw Error(a(452));return n;case"head":if(n=s.head,!n)throw Error(a(453));return n;case"body":if(n=s.body,!n)throw Error(a(454));return n;default:throw Error(a(451))}}function ra(n){for(var s=n.attributes;s.length;)n.removeAttributeNode(s[0]);rt(n)}var Cn=new Map,Qf=new Set;function xs(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}var Xn=H.d;H.d={f:$m,r:Fm,D:Im,C:zm,L:Bm,m:Um,X:Vm,S:Hm,M:qm};function $m(){var n=Xn.f(),s=ds();return n||s}function Fm(n){var s=ft(n);s!==null&&s.tag===5&&s.type==="form"?gd(s):Xn.r(n)}var fi=typeof document>"u"?null:document;function Zf(n,s,c){var d=fi;if(d&&typeof s=="string"&&s){var v=vn(s);v='link[rel="'+n+'"][href="'+v+'"]',typeof c=="string"&&(v+='[crossorigin="'+c+'"]'),Qf.has(v)||(Qf.add(v),n={rel:n,crossOrigin:c,href:s},d.querySelector(v)===null&&(s=d.createElement("link"),Zt(s,"link",n),Et(s),d.head.appendChild(s)))}}function Im(n){Xn.D(n),Zf("dns-prefetch",n,null)}function zm(n,s){Xn.C(n,s),Zf("preconnect",n,s)}function Bm(n,s,c){Xn.L(n,s,c);var d=fi;if(d&&n&&s){var v='link[rel="preload"][as="'+vn(s)+'"]';s==="image"&&c&&c.imageSrcSet?(v+='[imagesrcset="'+vn(c.imageSrcSet)+'"]',typeof c.imageSizes=="string"&&(v+='[imagesizes="'+vn(c.imageSizes)+'"]')):v+='[href="'+vn(n)+'"]';var C=v;switch(s){case"style":C=pi(n);break;case"script":C=hi(n)}Cn.has(C)||(n=m({rel:"preload",href:s==="image"&&c&&c.imageSrcSet?void 0:n,as:s},c),Cn.set(C,n),d.querySelector(v)!==null||s==="style"&&d.querySelector(ia(C))||s==="script"&&d.querySelector(aa(C))||(s=d.createElement("link"),Zt(s,"link",n),Et(s),d.head.appendChild(s)))}}function Um(n,s){Xn.m(n,s);var c=fi;if(c&&n){var d=s&&typeof s.as=="string"?s.as:"script",v='link[rel="modulepreload"][as="'+vn(d)+'"][href="'+vn(n)+'"]',C=v;switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":C=hi(n)}if(!Cn.has(C)&&(n=m({rel:"modulepreload",href:n},s),Cn.set(C,n),c.querySelector(v)===null)){switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(c.querySelector(aa(C)))return}d=c.createElement("link"),Zt(d,"link",n),Et(d),c.head.appendChild(d)}}}function Hm(n,s,c){Xn.S(n,s,c);var d=fi;if(d&&n){var v=xt(d).hoistableStyles,C=pi(n);s=s||"default";var q=v.get(C);if(!q){var Z={loading:0,preload:null};if(q=d.querySelector(ia(C)))Z.loading=5;else{n=m({rel:"stylesheet",href:n,"data-precedence":s},c),(c=Cn.get(C))&&Vl(n,c);var fe=q=d.createElement("link");Et(fe),Zt(fe,"link",n),fe._p=new Promise(function(Me,Ue){fe.onload=Me,fe.onerror=Ue}),fe.addEventListener("load",function(){Z.loading|=1}),fe.addEventListener("error",function(){Z.loading|=2}),Z.loading|=4,Ss(q,s,d)}q={type:"stylesheet",instance:q,count:1,state:Z},v.set(C,q)}}}function Vm(n,s){Xn.X(n,s);var c=fi;if(c&&n){var d=xt(c).hoistableScripts,v=hi(n),C=d.get(v);C||(C=c.querySelector(aa(v)),C||(n=m({src:n,async:!0},s),(s=Cn.get(v))&&ql(n,s),C=c.createElement("script"),Et(C),Zt(C,"link",n),c.head.appendChild(C)),C={type:"script",instance:C,count:1,state:null},d.set(v,C))}}function qm(n,s){Xn.M(n,s);var c=fi;if(c&&n){var d=xt(c).hoistableScripts,v=hi(n),C=d.get(v);C||(C=c.querySelector(aa(v)),C||(n=m({src:n,async:!0,type:"module"},s),(s=Cn.get(v))&&ql(n,s),C=c.createElement("script"),Et(C),Zt(C,"link",n),c.head.appendChild(C)),C={type:"script",instance:C,count:1,state:null},d.set(v,C))}}function Jf(n,s,c,d){var v=(v=K.current)?xs(v):null;if(!v)throw Error(a(446));switch(n){case"meta":case"title":return null;case"style":return typeof c.precedence=="string"&&typeof c.href=="string"?(s=pi(c.href),c=xt(v).hoistableStyles,d=c.get(s),d||(d={type:"style",instance:null,count:0,state:null},c.set(s,d)),d):{type:"void",instance:null,count:0,state:null};case"link":if(c.rel==="stylesheet"&&typeof c.href=="string"&&typeof c.precedence=="string"){n=pi(c.href);var C=xt(v).hoistableStyles,q=C.get(n);if(q||(v=v.ownerDocument||v,q={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},C.set(n,q),(C=v.querySelector(ia(n)))&&!C._p&&(q.instance=C,q.state.loading=5),Cn.has(n)||(c={rel:"preload",as:"style",href:c.href,crossOrigin:c.crossOrigin,integrity:c.integrity,media:c.media,hrefLang:c.hrefLang,referrerPolicy:c.referrerPolicy},Cn.set(n,c),C||Gm(v,n,c,q.state))),s&&d===null)throw Error(a(528,""));return q}if(s&&d!==null)throw Error(a(529,""));return null;case"script":return s=c.async,c=c.src,typeof c=="string"&&s&&typeof s!="function"&&typeof s!="symbol"?(s=hi(c),c=xt(v).hoistableScripts,d=c.get(s),d||(d={type:"script",instance:null,count:0,state:null},c.set(s,d)),d):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,n))}}function pi(n){return'href="'+vn(n)+'"'}function ia(n){return'link[rel="stylesheet"]['+n+"]"}function ep(n){return m({},n,{"data-precedence":n.precedence,precedence:null})}function Gm(n,s,c,d){n.querySelector('link[rel="preload"][as="style"]['+s+"]")?d.loading=1:(s=n.createElement("link"),d.preload=s,s.addEventListener("load",function(){return d.loading|=1}),s.addEventListener("error",function(){return d.loading|=2}),Zt(s,"link",c),Et(s),n.head.appendChild(s))}function hi(n){return'[src="'+vn(n)+'"]'}function aa(n){return"script[async]"+n}function tp(n,s,c){if(s.count++,s.instance===null)switch(s.type){case"style":var d=n.querySelector('style[data-href~="'+vn(c.href)+'"]');if(d)return s.instance=d,Et(d),d;var v=m({},c,{"data-href":c.href,"data-precedence":c.precedence,href:null,precedence:null});return d=(n.ownerDocument||n).createElement("style"),Et(d),Zt(d,"style",v),Ss(d,c.precedence,n),s.instance=d;case"stylesheet":v=pi(c.href);var C=n.querySelector(ia(v));if(C)return s.state.loading|=4,s.instance=C,Et(C),C;d=ep(c),(v=Cn.get(v))&&Vl(d,v),C=(n.ownerDocument||n).createElement("link"),Et(C);var q=C;return q._p=new Promise(function(Z,fe){q.onload=Z,q.onerror=fe}),Zt(C,"link",d),s.state.loading|=4,Ss(C,c.precedence,n),s.instance=C;case"script":return C=hi(c.src),(v=n.querySelector(aa(C)))?(s.instance=v,Et(v),v):(d=c,(v=Cn.get(C))&&(d=m({},c),ql(d,v)),n=n.ownerDocument||n,v=n.createElement("script"),Et(v),Zt(v,"link",d),n.head.appendChild(v),s.instance=v);case"void":return null;default:throw Error(a(443,s.type))}else s.type==="stylesheet"&&(s.state.loading&4)===0&&(d=s.instance,s.state.loading|=4,Ss(d,c.precedence,n));return s.instance}function Ss(n,s,c){for(var d=c.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),v=d.length?d[d.length-1]:null,C=v,q=0;q<d.length;q++){var Z=d[q];if(Z.dataset.precedence===s)C=Z;else if(C!==v)break}C?C.parentNode.insertBefore(n,C.nextSibling):(s=c.nodeType===9?c.head:c,s.insertBefore(n,s.firstChild))}function Vl(n,s){n.crossOrigin==null&&(n.crossOrigin=s.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=s.referrerPolicy),n.title==null&&(n.title=s.title)}function ql(n,s){n.crossOrigin==null&&(n.crossOrigin=s.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=s.referrerPolicy),n.integrity==null&&(n.integrity=s.integrity)}var Es=null;function np(n,s,c){if(Es===null){var d=new Map,v=Es=new Map;v.set(c,d)}else v=Es,d=v.get(c),d||(d=new Map,v.set(c,d));if(d.has(n))return d;for(d.set(n,null),c=c.getElementsByTagName(n),v=0;v<c.length;v++){var C=c[v];if(!(C[Ze]||C[_e]||n==="link"&&C.getAttribute("rel")==="stylesheet")&&C.namespaceURI!=="http://www.w3.org/2000/svg"){var q=C.getAttribute(s)||"";q=n+q;var Z=d.get(q);Z?Z.push(C):d.set(q,[C])}}return d}function rp(n,s,c){n=n.ownerDocument||n,n.head.insertBefore(c,s==="title"?n.querySelector("head > title"):null)}function Wm(n,s,c){if(c===1||s.itemProp!=null)return!1;switch(n){case"meta":case"title":return!0;case"style":if(typeof s.precedence!="string"||typeof s.href!="string"||s.href==="")break;return!0;case"link":if(typeof s.rel!="string"||typeof s.href!="string"||s.href===""||s.onLoad||s.onError)break;switch(s.rel){case"stylesheet":return n=s.disabled,typeof s.precedence=="string"&&n==null;default:return!0}case"script":if(s.async&&typeof s.async!="function"&&typeof s.async!="symbol"&&!s.onLoad&&!s.onError&&s.src&&typeof s.src=="string")return!0}return!1}function ip(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}var sa=null;function Xm(){}function Ym(n,s,c){if(sa===null)throw Error(a(475));var d=sa;if(s.type==="stylesheet"&&(typeof c.media!="string"||matchMedia(c.media).matches!==!1)&&(s.state.loading&4)===0){if(s.instance===null){var v=pi(c.href),C=n.querySelector(ia(v));if(C){n=C._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(d.count++,d=ws.bind(d),n.then(d,d)),s.state.loading|=4,s.instance=C,Et(C);return}C=n.ownerDocument||n,c=ep(c),(v=Cn.get(v))&&Vl(c,v),C=C.createElement("link"),Et(C);var q=C;q._p=new Promise(function(Z,fe){q.onload=Z,q.onerror=fe}),Zt(C,"link",c),s.instance=C}d.stylesheets===null&&(d.stylesheets=new Map),d.stylesheets.set(s,n),(n=s.state.preload)&&(s.state.loading&3)===0&&(d.count++,s=ws.bind(d),n.addEventListener("load",s),n.addEventListener("error",s))}}function Km(){if(sa===null)throw Error(a(475));var n=sa;return n.stylesheets&&n.count===0&&Gl(n,n.stylesheets),0<n.count?function(s){var c=setTimeout(function(){if(n.stylesheets&&Gl(n,n.stylesheets),n.unsuspend){var d=n.unsuspend;n.unsuspend=null,d()}},6e4);return n.unsuspend=s,function(){n.unsuspend=null,clearTimeout(c)}}:null}function ws(){if(this.count--,this.count===0){if(this.stylesheets)Gl(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var Cs=null;function Gl(n,s){n.stylesheets=null,n.unsuspend!==null&&(n.count++,Cs=new Map,s.forEach(Qm,n),Cs=null,ws.call(n))}function Qm(n,s){if(!(s.state.loading&4)){var c=Cs.get(n);if(c)var d=c.get(null);else{c=new Map,Cs.set(n,c);for(var v=n.querySelectorAll("link[data-precedence],style[data-precedence]"),C=0;C<v.length;C++){var q=v[C];(q.nodeName==="LINK"||q.getAttribute("media")!=="not all")&&(c.set(q.dataset.precedence,q),d=q)}d&&c.set(null,d)}v=s.instance,q=v.getAttribute("data-precedence"),C=c.get(q)||d,C===d&&c.set(null,v),c.set(q,v),this.count++,d=ws.bind(this),v.addEventListener("load",d),v.addEventListener("error",d),C?C.parentNode.insertBefore(v,C.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(v,n.firstChild)),s.state.loading|=4}}var oa={$$typeof:O,Provider:null,Consumer:null,_currentValue:Y,_currentValue2:Y,_threadCount:0};function Zm(n,s,c,d,v,C,q,Z){this.tag=1,this.containerInfo=n,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=le(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=le(0),this.hiddenUpdates=le(null),this.identifierPrefix=d,this.onUncaughtError=v,this.onCaughtError=C,this.onRecoverableError=q,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Z,this.incompleteTransitions=new Map}function ap(n,s,c,d,v,C,q,Z,fe,Me,Ue,Ve){return n=new Zm(n,s,c,q,Z,fe,Me,Ve),s=1,C===!0&&(s|=24),C=cn(3,null,null,s),n.current=C,C.stateNode=n,s=_o(),s.refCount++,n.pooledCache=s,s.refCount++,C.memoizedState={element:d,isDehydrated:c,cache:s},Oo(C),n}function sp(n){return n?(n=qr,n):qr}function op(n,s,c,d,v,C){v=sp(v),d.context===null?d.context=v:d.pendingContext=v,d=Jn(s),d.payload={element:c},C=C===void 0?null:C,C!==null&&(d.callback=C),c=er(n,d,s),c!==null&&(hn(c,n,s),$i(c,n,s))}function lp(n,s){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var c=n.retryLane;n.retryLane=c!==0&&c<s?c:s}}function Wl(n,s){lp(n,s),(n=n.alternate)&&lp(n,s)}function cp(n){if(n.tag===13){var s=Vr(n,67108864);s!==null&&hn(s,n,67108864),Wl(n,67108864)}}var As=!0;function Jm(n,s,c,d){var v=B.T;B.T=null;var C=H.p;try{H.p=2,Xl(n,s,c,d)}finally{H.p=C,B.T=v}}function eg(n,s,c,d){var v=B.T;B.T=null;var C=H.p;try{H.p=8,Xl(n,s,c,d)}finally{H.p=C,B.T=v}}function Xl(n,s,c,d){if(As){var v=Yl(d);if(v===null)Ll(n,s,d,Rs,c),dp(n,d);else if(ng(v,n,s,c,d))d.stopPropagation();else if(dp(n,d),s&4&&-1<tg.indexOf(n)){for(;v!==null;){var C=ft(v);if(C!==null)switch(C.tag){case 3:if(C=C.stateNode,C.current.memoizedState.isDehydrated){var q=Oe(C.pendingLanes);if(q!==0){var Z=C;for(Z.pendingLanes|=2,Z.entangledLanes|=2;q;){var fe=1<<31-qe(q);Z.entanglements[1]|=fe,q&=~fe}Mn(C),(Tt&6)===0&&(cs=se()+500,ea(0))}}break;case 13:Z=Vr(C,2),Z!==null&&hn(Z,C,2),ds(),Wl(C,2)}if(C=Yl(d),C===null&&Ll(n,s,d,Rs,c),C===v)break;v=C}v!==null&&d.stopPropagation()}else Ll(n,s,d,null,c)}}function Yl(n){return n=Js(n),Kl(n)}var Rs=null;function Kl(n){if(Rs=null,n=st(n),n!==null){var s=l(n);if(s===null)n=null;else{var c=s.tag;if(c===13){if(n=u(s),n!==null)return n;n=null}else if(c===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;n=null}else s!==n&&(n=null)}}return Rs=n,null}function up(n){switch(n){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(W()){case ee:return 2;case de:return 8;case pe:case ve:return 32;case Te:return 268435456;default:return 32}default:return 32}}var Ql=!1,pr=null,hr=null,mr=null,la=new Map,ca=new Map,gr=[],tg="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function dp(n,s){switch(n){case"focusin":case"focusout":pr=null;break;case"dragenter":case"dragleave":hr=null;break;case"mouseover":case"mouseout":mr=null;break;case"pointerover":case"pointerout":la.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":ca.delete(s.pointerId)}}function ua(n,s,c,d,v,C){return n===null||n.nativeEvent!==C?(n={blockedOn:s,domEventName:c,eventSystemFlags:d,nativeEvent:C,targetContainers:[v]},s!==null&&(s=ft(s),s!==null&&cp(s)),n):(n.eventSystemFlags|=d,s=n.targetContainers,v!==null&&s.indexOf(v)===-1&&s.push(v),n)}function ng(n,s,c,d,v){switch(s){case"focusin":return pr=ua(pr,n,s,c,d,v),!0;case"dragenter":return hr=ua(hr,n,s,c,d,v),!0;case"mouseover":return mr=ua(mr,n,s,c,d,v),!0;case"pointerover":var C=v.pointerId;return la.set(C,ua(la.get(C)||null,n,s,c,d,v)),!0;case"gotpointercapture":return C=v.pointerId,ca.set(C,ua(ca.get(C)||null,n,s,c,d,v)),!0}return!1}function fp(n){var s=st(n.target);if(s!==null){var c=l(s);if(c!==null){if(s=c.tag,s===13){if(s=u(c),s!==null){n.blockedOn=s,he(n.priority,function(){if(c.tag===13){var d=pn();d=Ke(d);var v=Vr(c,d);v!==null&&hn(v,c,d),Wl(c,d)}});return}}else if(s===3&&c.stateNode.current.memoizedState.isDehydrated){n.blockedOn=c.tag===3?c.stateNode.containerInfo:null;return}}}n.blockedOn=null}function _s(n){if(n.blockedOn!==null)return!1;for(var s=n.targetContainers;0<s.length;){var c=Yl(n.nativeEvent);if(c===null){c=n.nativeEvent;var d=new c.constructor(c.type,c);Zs=d,c.target.dispatchEvent(d),Zs=null}else return s=ft(c),s!==null&&cp(s),n.blockedOn=c,!1;s.shift()}return!0}function pp(n,s,c){_s(n)&&c.delete(s)}function rg(){Ql=!1,pr!==null&&_s(pr)&&(pr=null),hr!==null&&_s(hr)&&(hr=null),mr!==null&&_s(mr)&&(mr=null),la.forEach(pp),ca.forEach(pp)}function Ts(n,s){n.blockedOn===s&&(n.blockedOn=null,Ql||(Ql=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,rg)))}var Ps=null;function hp(n){Ps!==n&&(Ps=n,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Ps===n&&(Ps=null);for(var s=0;s<n.length;s+=3){var c=n[s],d=n[s+1],v=n[s+2];if(typeof d!="function"){if(Kl(d||c)===null)continue;break}var C=ft(c);C!==null&&(n.splice(s,3),s-=3,Ko(C,{pending:!0,data:v,method:c.method,action:d},d,v))}}))}function da(n){function s(fe){return Ts(fe,n)}pr!==null&&Ts(pr,n),hr!==null&&Ts(hr,n),mr!==null&&Ts(mr,n),la.forEach(s),ca.forEach(s);for(var c=0;c<gr.length;c++){var d=gr[c];d.blockedOn===n&&(d.blockedOn=null)}for(;0<gr.length&&(c=gr[0],c.blockedOn===null);)fp(c),c.blockedOn===null&&gr.shift();if(c=(n.ownerDocument||n).$$reactFormReplay,c!=null)for(d=0;d<c.length;d+=3){var v=c[d],C=c[d+1],q=v[Ie]||null;if(typeof C=="function")q||hp(c);else if(q){var Z=null;if(C&&C.hasAttribute("formAction")){if(v=C,q=C[Ie]||null)Z=q.formAction;else if(Kl(v)!==null)continue}else Z=q.action;typeof Z=="function"?c[d+1]=Z:(c.splice(d,3),d-=3),hp(c)}}}function Zl(n){this._internalRoot=n}ks.prototype.render=Zl.prototype.render=function(n){var s=this._internalRoot;if(s===null)throw Error(a(409));var c=s.current,d=pn();op(c,d,n,s,null,null)},ks.prototype.unmount=Zl.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var s=n.containerInfo;op(n.current,2,null,n,null,null),ds(),s[Be]=null}};function ks(n){this._internalRoot=n}ks.prototype.unstable_scheduleHydration=function(n){if(n){var s=re();n={blockedOn:null,target:n,priority:s};for(var c=0;c<gr.length&&s!==0&&s<gr[c].priority;c++);gr.splice(c,0,n),c===0&&fp(n)}};var mp=t.version;if(mp!=="19.1.0")throw Error(a(527,mp,"19.1.0"));H.findDOMNode=function(n){var s=n._reactInternals;if(s===void 0)throw typeof n.render=="function"?Error(a(188)):(n=Object.keys(n).join(","),Error(a(268,n)));return n=h(s),n=n!==null?p(n):null,n=n===null?null:n.stateNode,n};var ig={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:B,reconcilerVersion:"19.1.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Os=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Os.isDisabled&&Os.supportsFiber)try{Fe=Os.inject(ig),Le=Os}catch{}}return reactDomClient_production.createRoot=function(n,s){if(!o(n))throw Error(a(299));var c=!1,d="",v=kd,C=Od,q=Dd,Z=null;return s!=null&&(s.unstable_strictMode===!0&&(c=!0),s.identifierPrefix!==void 0&&(d=s.identifierPrefix),s.onUncaughtError!==void 0&&(v=s.onUncaughtError),s.onCaughtError!==void 0&&(C=s.onCaughtError),s.onRecoverableError!==void 0&&(q=s.onRecoverableError),s.unstable_transitionCallbacks!==void 0&&(Z=s.unstable_transitionCallbacks)),s=ap(n,1,!1,null,null,c,d,v,C,q,Z,null),n[Be]=s.current,jl(n),new Zl(s)},reactDomClient_production.hydrateRoot=function(n,s,c){if(!o(n))throw Error(a(299));var d=!1,v="",C=kd,q=Od,Z=Dd,fe=null,Me=null;return c!=null&&(c.unstable_strictMode===!0&&(d=!0),c.identifierPrefix!==void 0&&(v=c.identifierPrefix),c.onUncaughtError!==void 0&&(C=c.onUncaughtError),c.onCaughtError!==void 0&&(q=c.onCaughtError),c.onRecoverableError!==void 0&&(Z=c.onRecoverableError),c.unstable_transitionCallbacks!==void 0&&(fe=c.unstable_transitionCallbacks),c.formState!==void 0&&(Me=c.formState)),s=ap(n,1,!0,s,c??null,d,v,C,q,Z,fe,Me),s.context=sp(null),c=s.current,d=pn(),d=Ke(d),v=Jn(d),v.callback=null,er(c,v,d),c=d,s.current.lanes=c,Ne(s,c),Mn(s),n[Be]=s.current,jl(n),new ks(s)},reactDomClient_production.version="19.1.0",reactDomClient_production}var hasRequiredClient;function requireClient(){if(hasRequiredClient)return client.exports;hasRequiredClient=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),client.exports=requireReactDomClient_production(),client.exports}var clientExports=requireClient();const ReactDOM$1=getDefaultExportFromCjs(clientExports);function __awaiter(e,t,i,a){function o(l){return l instanceof i?l:new i(function(u){u(l)})}return new(i||(i=Promise))(function(l,u){function f(m){try{p(a.next(m))}catch(g){u(g)}}function h(m){try{p(a.throw(m))}catch(g){u(g)}}function p(m){m.done?l(m.value):o(m.value).then(f,h)}p((a=a.apply(e,t||[])).next())})}typeof SuppressedError=="function"&&SuppressedError;function keys(e){return Object.keys(e)}function isObject$3(e){return e&&typeof e=="object"&&!Array.isArray(e)}function deepMerge(e,t){const i={...e},a=t;return isObject$3(e)&&isObject$3(t)&&Object.keys(t).forEach(o=>{isObject$3(a[o])&&o in e?i[o]=deepMerge(i[o],a[o]):i[o]=a[o]}),i}function camelToKebabCase(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function getTransformedScaledValue(e){var t;return typeof e!="string"||!e.includes("var(--mantine-scale)")?e:(t=e.match(/^calc\((.*?)\)$/))==null?void 0:t[1].split("*")[0].trim()}function px(e){const t=getTransformedScaledValue(e);return typeof t=="number"?t:typeof t=="string"?t.includes("calc")||t.includes("var")?t:t.includes("px")?Number(t.replace("px","")):t.includes("rem")?Number(t.replace("rem",""))*16:t.includes("em")?Number(t.replace("em",""))*16:Number(t):NaN}function scaleRem(e){return e==="0rem"?"0rem":`calc(${e} * var(--mantine-scale))`}function createConverter(e,{shouldScale:t=!1}={}){function i(a){if(a===0||a==="0")return`0${e}`;if(typeof a=="number"){const o=`${a/16}${e}`;return t?scaleRem(o):o}if(typeof a=="string"){if(a===""||a.startsWith("calc(")||a.startsWith("clamp(")||a.includes("rgba("))return a;if(a.includes(","))return a.split(",").map(l=>i(l)).join(",");if(a.includes(" "))return a.split(" ").map(l=>i(l)).join(" ");const o=a.replace("px","");if(!Number.isNaN(Number(o))){const l=`${Number(o)/16}${e}`;return t?scaleRem(l):l}}return a}return i}const rem=createConverter("rem",{shouldScale:!0}),em=createConverter("em");function filterProps(e){return Object.keys(e).reduce((t,i)=>(e[i]!==void 0&&(t[i]=e[i]),t),{})}function isNumberLike(e){if(typeof e=="number")return!0;if(typeof e=="string"){if(e.startsWith("calc(")||e.startsWith("var(")||e.includes(" ")&&e.trim()!=="")return!0;const t=/^[+-]?[0-9]+(\.[0-9]+)?(px|em|rem|ex|ch|lh|rlh|vw|vh|vmin|vmax|vb|vi|svw|svh|lvw|lvh|dvw|dvh|cm|mm|in|pt|pc|q|cqw|cqh|cqi|cqb|cqmin|cqmax|%)?$/;return e.trim().split(/\s+/).every(a=>t.test(a))}return!1}function isElement$1(e){return Array.isArray(e)||e===null?!1:typeof e=="object"?e.type!==reactExports.Fragment:!1}function createSafeContext(e){const t=reactExports.createContext(null);return[({children:o,value:l})=>jsxRuntimeExports.jsx(t.Provider,{value:l,children:o}),()=>{const o=reactExports.useContext(t);if(o===null)throw new Error(e);return o}]}function createOptionalContext(e=null){const t=reactExports.createContext(e);return[({children:o,value:l})=>jsxRuntimeExports.jsx(t.Provider,{value:l,children:o}),()=>reactExports.useContext(t)]}function findElementAncestor(e,t){let i=e;for(;(i=i.parentElement)&&!i.matches(t););return i}function getPreviousIndex$1(e,t,i){for(let a=e-1;a>=0;a-=1)if(!t[a].disabled)return a;if(i){for(let a=t.length-1;a>-1;a-=1)if(!t[a].disabled)return a}return e}function getNextIndex$1(e,t,i){for(let a=e+1;a<t.length;a+=1)if(!t[a].disabled)return a;if(i){for(let a=0;a<t.length;a+=1)if(!t[a].disabled)return a}return e}function onSameLevel(e,t,i){return findElementAncestor(e,i)===findElementAncestor(t,i)}function createScopedKeydownHandler({parentSelector:e,siblingSelector:t,onKeyDown:i,loop:a=!0,activateOnFocus:o=!1,dir:l="rtl",orientation:u}){return f=>{var b;i==null||i(f);const h=Array.from(((b=findElementAncestor(f.currentTarget,e))==null?void 0:b.querySelectorAll(t))||[]).filter(x=>onSameLevel(f.currentTarget,x,e)),p=h.findIndex(x=>f.currentTarget===x),m=getNextIndex$1(p,h,a),g=getPreviousIndex$1(p,h,a);switch(f.key){case"ArrowRight":break;case"ArrowLeft":break;case"ArrowUp":{f.stopPropagation(),f.preventDefault(),h[g].focus(),o&&h[g].click();break}case"ArrowDown":{f.stopPropagation(),f.preventDefault(),h[m].focus(),o&&h[m].click();break}case"Home":{f.stopPropagation(),f.preventDefault(),!h[0].disabled&&h[0].focus();break}case"End":{f.stopPropagation(),f.preventDefault();const x=h.length-1;!h[x].disabled&&h[x].focus();break}}}}const elevations={app:100,modal:200,popover:300,overlay:400,max:9999};function getDefaultZIndex(e){return elevations[e]}const noop$4=()=>{};function closeOnEscape(e,t={active:!0}){return typeof e!="function"||!t.active?t.onKeyDown||noop$4:i=>{var a;i.key==="Escape"&&(e(i),(a=t.onTrigger)==null||a.call(t))}}function getSize(e,t="size",i=!0){if(e!==void 0)return isNumberLike(e)?i?rem(e):e:`var(--${t}-${e})`}function getSpacing(e){return getSize(e,"mantine-spacing")}function getRadius(e){return e===void 0?"var(--mantine-radius-default)":getSize(e,"mantine-radius")}function getFontSize(e){return getSize(e,"mantine-font-size")}function getLineHeight(e){return getSize(e,"mantine-line-height",!1)}function getShadow(e){if(e)return getSize(e,"mantine-shadow",!1)}function createEventHandler(e,t){return i=>{e==null||e(i),t==null||t(i)}}function getContextItemIndex(e,t,i){var a;return i?Array.from(((a=findElementAncestor(i,t))==null?void 0:a.querySelectorAll(e))||[]).findIndex(o=>o===i):null}function clamp$4(e,t,i){return t===void 0&&i===void 0?e:t!==void 0&&i===void 0?Math.max(e,t):Math.min(t===void 0&&i!==void 0?e:Math.max(e,t),i)}function randomId(e="mantine-"){return`${e}${Math.random().toString(36).slice(2,11)}`}function shallowEqual(e,t){if(e===t)return!0;if(!(e instanceof Object)||!(t instanceof Object))return!1;const i=Object.keys(e),{length:a}=i;if(a!==Object.keys(t).length)return!1;for(let o=0;o<a;o+=1){const l=i[o];if(!(l in t)||e[l]!==t[l])return!1}return!0}function upperFirst(e){return typeof e!="string"?"":e.charAt(0).toUpperCase()+e.slice(1)}function useCallbackRef(e){const t=reactExports.useRef(e);return reactExports.useEffect(()=>{t.current=e}),reactExports.useMemo(()=>(...i)=>{var a;return(a=t.current)==null?void 0:a.call(t,...i)},[])}function useDebouncedCallback(e,t){const i=typeof t=="number"?t:t.delay,a=typeof t=="number"?!1:t.flushOnUnmount,o=typeof t=="number"?!1:t.leading,l=useCallbackRef(e),u=reactExports.useRef(0),f=reactExports.useRef(()=>{}),h=reactExports.useRef(o),p=Object.assign(reactExports.useCallback((...m)=>{if(window.clearTimeout(u.current),o&&h.current){h.current=!1,l(...m);return}const g=()=>{u.current!==0&&(u.current=0,h.current=!0,l(...m))};f.current=g,p.flush=g,u.current=window.setTimeout(g,i),h.current=!1},[l,i,o]),{flush:f.current});return reactExports.useEffect(()=>()=>{window.clearTimeout(u.current),a&&p.flush()},[p,a]),p}const DEFAULT_EVENTS=["mousedown","touchstart"];function useClickOutside(e,t,i){const a=reactExports.useRef(null);return reactExports.useEffect(()=>{const o=l=>{const{target:u}=l??{};if(Array.isArray(i)){const f=(u==null?void 0:u.hasAttribute("data-ignore-outside-clicks"))||!document.body.contains(u)&&u.tagName!=="HTML";i.every(p=>!!p&&!l.composedPath().includes(p))&&!f&&e()}else a.current&&!a.current.contains(u)&&e()};return(t||DEFAULT_EVENTS).forEach(l=>document.addEventListener(l,o)),()=>{(t||DEFAULT_EVENTS).forEach(l=>document.removeEventListener(l,o))}},[a,e,i]),a}function attachMediaListener(e,t){try{return e.addEventListener("change",t),()=>e.removeEventListener("change",t)}catch{return e.addListener(t),()=>e.removeListener(t)}}function getInitialValue(e,t){return typeof window<"u"&&"matchMedia"in window?window.matchMedia(e).matches:!1}function useMediaQuery(e,t,{getInitialValueInEffect:i}={getInitialValueInEffect:!0}){const[a,o]=reactExports.useState(i?t:getInitialValue(e)),l=reactExports.useRef(null);return reactExports.useEffect(()=>{if("matchMedia"in window)return l.current=window.matchMedia(e),o(l.current.matches),attachMediaListener(l.current,u=>o(u.matches))},[e]),a}function useColorScheme(e,t){return useMediaQuery("(prefers-color-scheme: dark)",e==="dark",t)?"dark":"light"}const useIsomorphicEffect=typeof document<"u"?reactExports.useLayoutEffect:reactExports.useEffect;function useDidUpdate(e,t){const i=reactExports.useRef(!1);reactExports.useEffect(()=>()=>{i.current=!1},[]),reactExports.useEffect(()=>{if(i.current)return e();i.current=!0},t)}function useFocusReturn({opened:e,shouldReturnFocus:t=!0}){const i=reactExports.useRef(null),a=()=>{var o;i.current&&"focus"in i.current&&typeof i.current.focus=="function"&&((o=i.current)==null||o.focus({preventScroll:!0}))};return useDidUpdate(()=>{let o=-1;const l=u=>{u.key==="Tab"&&window.clearTimeout(o)};return document.addEventListener("keydown",l),e?i.current=document.activeElement:t&&(o=window.setTimeout(a,10)),()=>{window.clearTimeout(o),document.removeEventListener("keydown",l)}},[e,t]),a}const TABBABLE_NODES=/input|select|textarea|button|object/,FOCUS_SELECTOR="a, input, select, textarea, button, object, [tabindex]";function hidden(e){return e.style.display==="none"}function visible(e){if(e.getAttribute("aria-hidden")||e.getAttribute("hidden")||e.getAttribute("type")==="hidden")return!1;let i=e;for(;i&&!(i===document.body||i.nodeType===11);){if(hidden(i))return!1;i=i.parentNode}return!0}function getElementTabIndex(e){let t=e.getAttribute("tabindex");return t===null&&(t=void 0),parseInt(t,10)}function focusable(e){const t=e.nodeName.toLowerCase(),i=!Number.isNaN(getElementTabIndex(e));return(TABBABLE_NODES.test(t)&&!e.disabled||e instanceof HTMLAnchorElement&&e.href||i)&&visible(e)}function tabbable(e){const t=getElementTabIndex(e);return(Number.isNaN(t)||t>=0)&&focusable(e)}function findTabbableDescendants(e){return Array.from(e.querySelectorAll(FOCUS_SELECTOR)).filter(tabbable)}function scopeTab(e,t){const i=findTabbableDescendants(e);if(!i.length){t.preventDefault();return}const a=i[t.shiftKey?0:i.length-1],o=e.getRootNode();let l=a===o.activeElement||e===o.activeElement;const u=o.activeElement;if(u.tagName==="INPUT"&&u.getAttribute("type")==="radio"&&(l=i.filter(m=>m.getAttribute("type")==="radio"&&m.getAttribute("name")===u.getAttribute("name")).includes(a)),!l)return;t.preventDefault();const h=i[t.shiftKey?i.length-1:0];h&&h.focus()}function useFocusTrap(e=!0){const t=reactExports.useRef(null),i=o=>{let l=o.querySelector("[data-autofocus]");if(!l){const u=Array.from(o.querySelectorAll(FOCUS_SELECTOR));l=u.find(tabbable)||u.find(focusable)||null,!l&&focusable(o)&&(l=o)}l&&l.focus({preventScroll:!0})},a=reactExports.useCallback(o=>{e&&o!==null&&t.current!==o&&(o?(setTimeout(()=>{o.getRootNode()&&i(o)}),t.current=o):t.current=null)},[e]);return reactExports.useEffect(()=>{if(!e)return;t.current&&setTimeout(()=>i(t.current));const o=l=>{l.key==="Tab"&&t.current&&scopeTab(t.current,l)};return document.addEventListener("keydown",o),()=>document.removeEventListener("keydown",o)},[e]),a}const __useId=React.useId||(()=>{});function useReactId$1(){const e=__useId();return e?`mantine-${e.replace(/:/g,"")}`:""}function useId$1(e){const t=useReactId$1(),[i,a]=reactExports.useState(t);return useIsomorphicEffect(()=>{a(randomId())},[]),typeof e=="string"?e:typeof window>"u"?t:i}function assignRef(e,t){if(typeof e=="function")return e(t);typeof e=="object"&&e!==null&&"current"in e&&(e.current=t)}function mergeRefs$1(...e){const t=new Map;return i=>{if(e.forEach(a=>{const o=assignRef(a,i);o&&t.set(a,o)}),t.size>0)return()=>{e.forEach(a=>{const o=t.get(a);o?o():assignRef(a,null)}),t.clear()}}}function useMergedRef(...e){return reactExports.useCallback(mergeRefs$1(...e),e)}function useMove(e,t,i="ltr"){const a=reactExports.useRef(null),o=reactExports.useRef(!1),l=reactExports.useRef(!1),u=reactExports.useRef(0),[f,h]=reactExports.useState(!1);return reactExports.useEffect(()=>{o.current=!0},[]),reactExports.useEffect(()=>{const p=a.current,m=({x:O,y:k})=>{cancelAnimationFrame(u.current),u.current=requestAnimationFrame(()=>{if(o.current&&p){p.style.userSelect="none";const A=p.getBoundingClientRect();if(A.width&&A.height){const D=clamp$4((O-A.left)/A.width,0,1);e({x:i==="ltr"?D:1-D,y:clamp$4((k-A.top)/A.height,0,1)})}}})},g=()=>{document.addEventListener("mousemove",E),document.addEventListener("mouseup",y),document.addEventListener("touchmove",_),document.addEventListener("touchend",y)},b=()=>{document.removeEventListener("mousemove",E),document.removeEventListener("mouseup",y),document.removeEventListener("touchmove",_),document.removeEventListener("touchend",y)},x=()=>{!l.current&&o.current&&(l.current=!0,typeof(t==null?void 0:t.onScrubStart)=="function"&&t.onScrubStart(),h(!0),g())},y=()=>{l.current&&o.current&&(l.current=!1,h(!1),b(),setTimeout(()=>{typeof(t==null?void 0:t.onScrubEnd)=="function"&&t.onScrubEnd()},0))},S=O=>{x(),O.preventDefault(),E(O)},E=O=>m({x:O.clientX,y:O.clientY}),w=O=>{O.cancelable&&O.preventDefault(),x(),_(O)},_=O=>{O.cancelable&&O.preventDefault(),m({x:O.changedTouches[0].clientX,y:O.changedTouches[0].clientY})};return p==null||p.addEventListener("mousedown",S),p==null||p.addEventListener("touchstart",w,{passive:!1}),()=>{p&&(p.removeEventListener("mousedown",S),p.removeEventListener("touchstart",w))}},[i,e]),{ref:a,active:f}}function useUncontrolled({value:e,defaultValue:t,finalValue:i,onChange:a=()=>{}}){const[o,l]=reactExports.useState(t!==void 0?t:i),u=(f,...h)=>{l(f),a==null||a(f,...h)};return e!==void 0?[e,a,!0]:[o,u,!1]}function useReducedMotion(e,t){return useMediaQuery("(prefers-reduced-motion: reduce)",e,t)}function shallowCompare(e,t){if(!e||!t)return!1;if(e===t)return!0;if(e.length!==t.length)return!1;for(let i=0;i<e.length;i+=1)if(!shallowEqual(e[i],t[i]))return!1;return!0}function useShallowCompare(e){const t=reactExports.useRef([]),i=reactExports.useRef(0);return shallowCompare(t.current,e)||(t.current=e,i.current+=1),[i.current]}function useShallowEffect(e,t){reactExports.useEffect(e,useShallowCompare(t))}function useDisclosure(e=!1,t){const{onOpen:i,onClose:a}={},[o,l]=reactExports.useState(e),u=reactExports.useCallback(()=>{l(p=>p||(i==null||i(),!0))},[i]),f=reactExports.useCallback(()=>{l(p=>p&&(a==null||a(),!1))},[a]),h=reactExports.useCallback(()=>{o?f():u()},[f,u,o]);return[o,{open:u,close:f,toggle:h}]}function useTimeout(e,t,i={autoInvoke:!1}){const a=reactExports.useRef(null),o=reactExports.useCallback((...u)=>{a.current||(a.current=window.setTimeout(()=>{e(u),a.current=null},t))},[t]),l=reactExports.useCallback(()=>{a.current&&(window.clearTimeout(a.current),a.current=null)},[]);return reactExports.useEffect(()=>(i.autoInvoke&&o(),l),[l,o]),{start:o,clear:l}}function usePrevious$1(e){const t=reactExports.useRef(void 0);return reactExports.useEffect(()=>{t.current=e},[e]),t.current}function useMutationObserver(e,t,i){const a=reactExports.useRef(null),o=reactExports.useRef(null);return reactExports.useEffect(()=>{const l=typeof i=="function"?i():i;return(l||o.current)&&(a.current=new MutationObserver(e),a.current.observe(l||o.current,t)),()=>{var u;(u=a.current)==null||u.disconnect()}},[e,t]),o}function useMounted(){const[e,t]=reactExports.useState(!1);return reactExports.useEffect(()=>t(!0),[]),e}var define_process_env_default={};function getEnv(){return typeof process<"u"&&define_process_env_default?"production":"development"}function findClosestNumber(e,t){return t.length===0?e:t.reduce((i,a)=>Math.abs(a-e)<Math.abs(i-e)?a:i)}function getRefProp(e){var i;const t=React.version;return typeof React.version!="string"||t.startsWith("18.")?e==null?void 0:e.ref:(i=e==null?void 0:e.props)==null?void 0:i.ref}function createVarsResolver(e){return e}function r(e){var t,i,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(i=r(e[t]))&&(a&&(a+=" "),a+=i)}else for(i in e)e[i]&&(a&&(a+=" "),a+=i);return a}function clsx(){for(var e,t,i=0,a="",o=arguments.length;i<o;i++)(e=arguments[i])&&(t=r(e))&&(a&&(a+=" "),a+=t);return a}const EMPTY_CLASS_NAMES={};function mergeClassNames(e){const t={};return e.forEach(i=>{Object.entries(i).forEach(([a,o])=>{t[a]?t[a]=clsx(t[a],o):t[a]=o})}),t}function resolveClassNames({theme:e,classNames:t,props:i,stylesCtx:a}){const l=(Array.isArray(t)?t:[t]).map(u=>typeof u=="function"?u(e,i,a):u||EMPTY_CLASS_NAMES);return mergeClassNames(l)}function resolveStyles({theme:e,styles:t,props:i,stylesCtx:a}){return(Array.isArray(t)?t:[t]).reduce((l,u)=>typeof u=="function"?{...l,...u(e,i,a)}:{...l,...u},{})}const MantineContext=reactExports.createContext(null);function useMantineContext(){const e=reactExports.useContext(MantineContext);if(!e)throw new Error("[@mantine/core] MantineProvider was not found in tree");return e}function useMantineCssVariablesResolver(){return useMantineContext().cssVariablesResolver}function useMantineClassNamesPrefix(){return useMantineContext().classNamesPrefix}function useMantineStyleNonce(){return useMantineContext().getStyleNonce}function useMantineWithStaticClasses(){return useMantineContext().withStaticClasses}function useMantineIsHeadless(){return useMantineContext().headless}function useMantineSxTransform(){var e;return(e=useMantineContext().stylesTransform)==null?void 0:e.sx}function useMantineStylesTransform(){var e;return(e=useMantineContext().stylesTransform)==null?void 0:e.styles}function useMantineEnv(){return useMantineContext().env||"default"}function isHexColor(e){return/^#?([0-9A-F]{3}){1,2}([0-9A-F]{2})?$/i.test(e)}function hexToRgba(e){let t=e.replace("#","");if(t.length===3){const u=t.split("");t=[u[0],u[0],u[1],u[1],u[2],u[2]].join("")}if(t.length===8){const u=parseInt(t.slice(6,8),16)/255;return{r:parseInt(t.slice(0,2),16),g:parseInt(t.slice(2,4),16),b:parseInt(t.slice(4,6),16),a:u}}const i=parseInt(t,16),a=i>>16&255,o=i>>8&255,l=i&255;return{r:a,g:o,b:l,a:1}}function rgbStringToRgba(e){const[t,i,a,o]=e.replace(/[^0-9,./]/g,"").split(/[/,]/).map(Number);return{r:t,g:i,b:a,a:o||1}}function hslStringToRgba(e){const t=/^hsla?\(\s*(\d+)\s*,\s*(\d+%)\s*,\s*(\d+%)\s*(,\s*(0?\.\d+|\d+(\.\d+)?))?\s*\)$/i,i=e.match(t);if(!i)return{r:0,g:0,b:0,a:1};const a=parseInt(i[1],10),o=parseInt(i[2],10)/100,l=parseInt(i[3],10)/100,u=i[5]?parseFloat(i[5]):void 0,f=(1-Math.abs(2*l-1))*o,h=a/60,p=f*(1-Math.abs(h%2-1)),m=l-f/2;let g,b,x;return h>=0&&h<1?(g=f,b=p,x=0):h>=1&&h<2?(g=p,b=f,x=0):h>=2&&h<3?(g=0,b=f,x=p):h>=3&&h<4?(g=0,b=p,x=f):h>=4&&h<5?(g=p,b=0,x=f):(g=f,b=0,x=p),{r:Math.round((g+m)*255),g:Math.round((b+m)*255),b:Math.round((x+m)*255),a:u||1}}function toRgba(e){return isHexColor(e)?hexToRgba(e):e.startsWith("rgb")?rgbStringToRgba(e):e.startsWith("hsl")?hslStringToRgba(e):{r:0,g:0,b:0,a:1}}function darken$1(e,t){if(e.startsWith("var("))return`color-mix(in srgb, ${e}, black ${t*100}%)`;const{r:i,g:a,b:o,a:l}=toRgba(e),u=1-t,f=h=>Math.round(h*u);return`rgba(${f(i)}, ${f(a)}, ${f(o)}, ${l})`}function getPrimaryShade(e,t){return typeof e.primaryShade=="number"?e.primaryShade:t==="dark"?e.primaryShade.dark:e.primaryShade.light}function gammaCorrect(e){return e<=.03928?e/12.92:((e+.055)/1.055)**2.4}function getLightnessFromOklch(e){const t=e.match(/oklch\((.*?)%\s/);return t?parseFloat(t[1]):null}function luminance(e){if(e.startsWith("oklch("))return(getLightnessFromOklch(e)||0)/100;const{r:t,g:i,b:a}=toRgba(e),o=t/255,l=i/255,u=a/255,f=gammaCorrect(o),h=gammaCorrect(l),p=gammaCorrect(u);return .2126*f+.7152*h+.0722*p}function isLightColor(e,t=.179){return e.startsWith("var(")?!1:luminance(e)>t}function parseThemeColor({color:e,theme:t,colorScheme:i}){if(typeof e!="string")throw new Error(`[@mantine/core] Failed to parse color. Expected color to be a string, instead got ${typeof e}`);if(e==="bright")return{color:e,value:i==="dark"?t.white:t.black,shade:void 0,isThemeColor:!1,isLight:isLightColor(i==="dark"?t.white:t.black,t.luminanceThreshold),variable:"--mantine-color-bright"};if(e==="dimmed")return{color:e,value:i==="dark"?t.colors.dark[2]:t.colors.gray[7],shade:void 0,isThemeColor:!1,isLight:isLightColor(i==="dark"?t.colors.dark[2]:t.colors.gray[6],t.luminanceThreshold),variable:"--mantine-color-dimmed"};if(e==="white"||e==="black")return{color:e,value:e==="white"?t.white:t.black,shade:void 0,isThemeColor:!1,isLight:isLightColor(e==="white"?t.white:t.black,t.luminanceThreshold),variable:`--mantine-color-${e}`};const[a,o]=e.split("."),l=o?Number(o):void 0,u=a in t.colors;if(u){const f=l!==void 0?t.colors[a][l]:t.colors[a][getPrimaryShade(t,i||"light")];return{color:a,value:f,shade:l,isThemeColor:u,isLight:isLightColor(f,t.luminanceThreshold),variable:o?`--mantine-color-${a}-${l}`:`--mantine-color-${a}-filled`}}return{color:e,value:e,isThemeColor:u,isLight:isLightColor(e,t.luminanceThreshold),shade:l,variable:void 0}}function getThemeColor(e,t){const i=parseThemeColor({color:e||t.primaryColor,theme:t});return i.variable?`var(${i.variable})`:e}function getGradient(e,t){const i={from:(e==null?void 0:e.from)||t.defaultGradient.from,to:(e==null?void 0:e.to)||t.defaultGradient.to,deg:(e==null?void 0:e.deg)??t.defaultGradient.deg??0},a=getThemeColor(i.from,t),o=getThemeColor(i.to,t);return`linear-gradient(${i.deg}deg, ${a} 0%, ${o} 100%)`}function rgba(e,t){if(typeof e!="string"||t>1||t<0)return"rgba(0, 0, 0, 1)";if(e.startsWith("var(")){const l=(1-t)*100;return`color-mix(in srgb, ${e}, transparent ${l}%)`}if(e.startsWith("oklch"))return e.includes("/")?e.replace(/\/\s*[\d.]+\s*\)/,`/ ${t})`):e.replace(")",` / ${t})`);const{r:i,g:a,b:o}=toRgba(e);return`rgba(${i}, ${a}, ${o}, ${t})`}const alpha$1=rgba,defaultVariantColorsResolver=({color:e,theme:t,variant:i,gradient:a,autoContrast:o})=>{const l=parseThemeColor({color:e,theme:t}),u=typeof o=="boolean"?o:t.autoContrast;if(i==="none")return{background:"transparent",hover:"transparent",color:"inherit",border:"none"};if(i==="filled"){const f=u&&l.isLight?"var(--mantine-color-black)":"var(--mantine-color-white)";return l.isThemeColor?l.shade===void 0?{background:`var(--mantine-color-${e}-filled)`,hover:`var(--mantine-color-${e}-filled-hover)`,color:f,border:`${rem(1)} solid transparent`}:{background:`var(--mantine-color-${l.color}-${l.shade})`,hover:`var(--mantine-color-${l.color}-${l.shade===9?8:l.shade+1})`,color:f,border:`${rem(1)} solid transparent`}:{background:e,hover:darken$1(e,.1),color:f,border:`${rem(1)} solid transparent`}}if(i==="light"){if(l.isThemeColor){if(l.shade===void 0)return{background:`var(--mantine-color-${e}-light)`,hover:`var(--mantine-color-${e}-light-hover)`,color:`var(--mantine-color-${e}-light-color)`,border:`${rem(1)} solid transparent`};const f=t.colors[l.color][l.shade];return{background:rgba(f,.1),hover:rgba(f,.12),color:`var(--mantine-color-${l.color}-${Math.min(l.shade,6)})`,border:`${rem(1)} solid transparent`}}return{background:rgba(e,.1),hover:rgba(e,.12),color:e,border:`${rem(1)} solid transparent`}}if(i==="outline")return l.isThemeColor?l.shade===void 0?{background:"transparent",hover:`var(--mantine-color-${e}-outline-hover)`,color:`var(--mantine-color-${e}-outline)`,border:`${rem(1)} solid var(--mantine-color-${e}-outline)`}:{background:"transparent",hover:rgba(t.colors[l.color][l.shade],.05),color:`var(--mantine-color-${l.color}-${l.shade})`,border:`${rem(1)} solid var(--mantine-color-${l.color}-${l.shade})`}:{background:"transparent",hover:rgba(e,.05),color:e,border:`${rem(1)} solid ${e}`};if(i==="subtle"){if(l.isThemeColor){if(l.shade===void 0)return{background:"transparent",hover:`var(--mantine-color-${e}-light-hover)`,color:`var(--mantine-color-${e}-light-color)`,border:`${rem(1)} solid transparent`};const f=t.colors[l.color][l.shade];return{background:"transparent",hover:rgba(f,.12),color:`var(--mantine-color-${l.color}-${Math.min(l.shade,6)})`,border:`${rem(1)} solid transparent`}}return{background:"transparent",hover:rgba(e,.12),color:e,border:`${rem(1)} solid transparent`}}return i==="transparent"?l.isThemeColor?l.shade===void 0?{background:"transparent",hover:"transparent",color:`var(--mantine-color-${e}-light-color)`,border:`${rem(1)} solid transparent`}:{background:"transparent",hover:"transparent",color:`var(--mantine-color-${l.color}-${Math.min(l.shade,6)})`,border:`${rem(1)} solid transparent`}:{background:"transparent",hover:"transparent",color:e,border:`${rem(1)} solid transparent`}:i==="white"?l.isThemeColor?l.shade===void 0?{background:"var(--mantine-color-white)",hover:darken$1(t.white,.01),color:`var(--mantine-color-${e}-filled)`,border:`${rem(1)} solid transparent`}:{background:"var(--mantine-color-white)",hover:darken$1(t.white,.01),color:`var(--mantine-color-${l.color}-${l.shade})`,border:`${rem(1)} solid transparent`}:{background:"var(--mantine-color-white)",hover:darken$1(t.white,.01),color:e,border:`${rem(1)} solid transparent`}:i==="gradient"?{background:getGradient(a,t),hover:getGradient(a,t),color:"var(--mantine-color-white)",border:"none"}:i==="default"?{background:"var(--mantine-color-default)",hover:"var(--mantine-color-default-hover)",color:"var(--mantine-color-default-color)",border:`${rem(1)} solid var(--mantine-color-default-border)`}:{}},DEFAULT_COLORS={dark:["#C9C9C9","#b8b8b8","#828282","#696969","#424242","#3b3b3b","#2e2e2e","#242424","#1f1f1f","#141414"],gray:["#f8f9fa","#f1f3f5","#e9ecef","#dee2e6","#ced4da","#adb5bd","#868e96","#495057","#343a40","#212529"],red:["#fff5f5","#ffe3e3","#ffc9c9","#ffa8a8","#ff8787","#ff6b6b","#fa5252","#f03e3e","#e03131","#c92a2a"],pink:["#fff0f6","#ffdeeb","#fcc2d7","#faa2c1","#f783ac","#f06595","#e64980","#d6336c","#c2255c","#a61e4d"],grape:["#f8f0fc","#f3d9fa","#eebefa","#e599f7","#da77f2","#cc5de8","#be4bdb","#ae3ec9","#9c36b5","#862e9c"],violet:["#f3f0ff","#e5dbff","#d0bfff","#b197fc","#9775fa","#845ef7","#7950f2","#7048e8","#6741d9","#5f3dc4"],indigo:["#edf2ff","#dbe4ff","#bac8ff","#91a7ff","#748ffc","#5c7cfa","#4c6ef5","#4263eb","#3b5bdb","#364fc7"],blue:["#e7f5ff","#d0ebff","#a5d8ff","#74c0fc","#4dabf7","#339af0","#228be6","#1c7ed6","#1971c2","#1864ab"],cyan:["#e3fafc","#c5f6fa","#99e9f2","#66d9e8","#3bc9db","#22b8cf","#15aabf","#1098ad","#0c8599","#0b7285"],teal:["#e6fcf5","#c3fae8","#96f2d7","#63e6be","#38d9a9","#20c997","#12b886","#0ca678","#099268","#087f5b"],green:["#ebfbee","#d3f9d8","#b2f2bb","#8ce99a","#69db7c","#51cf66","#40c057","#37b24d","#2f9e44","#2b8a3e"],lime:["#f4fce3","#e9fac8","#d8f5a2","#c0eb75","#a9e34b","#94d82d","#82c91e","#74b816","#66a80f","#5c940d"],yellow:["#fff9db","#fff3bf","#ffec99","#ffe066","#ffd43b","#fcc419","#fab005","#f59f00","#f08c00","#e67700"],orange:["#fff4e6","#ffe8cc","#ffd8a8","#ffc078","#ffa94d","#ff922b","#fd7e14","#f76707","#e8590c","#d9480f"]},DEFAULT_FONT_FAMILY="-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",DEFAULT_THEME={scale:1,fontSmoothing:!0,focusRing:"auto",white:"#fff",black:"#000",colors:DEFAULT_COLORS,primaryShade:{light:6,dark:8},primaryColor:"blue",variantColorResolver:defaultVariantColorsResolver,autoContrast:!1,luminanceThreshold:.3,fontFamily:DEFAULT_FONT_FAMILY,fontFamilyMonospace:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace",respectReducedMotion:!1,cursorType:"default",defaultGradient:{from:"blue",to:"cyan",deg:45},defaultRadius:"sm",activeClassName:"mantine-active",focusClassName:"",headings:{fontFamily:DEFAULT_FONT_FAMILY,fontWeight:"700",textWrap:"wrap",sizes:{h1:{fontSize:rem(34),lineHeight:"1.3"},h2:{fontSize:rem(26),lineHeight:"1.35"},h3:{fontSize:rem(22),lineHeight:"1.4"},h4:{fontSize:rem(18),lineHeight:"1.45"},h5:{fontSize:rem(16),lineHeight:"1.5"},h6:{fontSize:rem(14),lineHeight:"1.5"}}},fontSizes:{xs:rem(12),sm:rem(14),md:rem(16),lg:rem(18),xl:rem(20)},lineHeights:{xs:"1.4",sm:"1.45",md:"1.55",lg:"1.6",xl:"1.65"},radius:{xs:rem(2),sm:rem(4),md:rem(8),lg:rem(16),xl:rem(32)},spacing:{xs:rem(10),sm:rem(12),md:rem(16),lg:rem(20),xl:rem(32)},breakpoints:{xs:"36em",sm:"48em",md:"62em",lg:"75em",xl:"88em"},shadows:{xs:`0 ${rem(1)} ${rem(3)} rgba(0, 0, 0, 0.05), 0 ${rem(1)} ${rem(2)} rgba(0, 0, 0, 0.1)`,sm:`0 ${rem(1)} ${rem(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${rem(10)} ${rem(15)} ${rem(-5)}, rgba(0, 0, 0, 0.04) 0 ${rem(7)} ${rem(7)} ${rem(-5)}`,md:`0 ${rem(1)} ${rem(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${rem(20)} ${rem(25)} ${rem(-5)}, rgba(0, 0, 0, 0.04) 0 ${rem(10)} ${rem(10)} ${rem(-5)}`,lg:`0 ${rem(1)} ${rem(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${rem(28)} ${rem(23)} ${rem(-7)}, rgba(0, 0, 0, 0.04) 0 ${rem(12)} ${rem(12)} ${rem(-7)}`,xl:`0 ${rem(1)} ${rem(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${rem(36)} ${rem(28)} ${rem(-7)}, rgba(0, 0, 0, 0.04) 0 ${rem(17)} ${rem(17)} ${rem(-7)}`},other:{},components:{}};function isMantineColorScheme(e){return e==="auto"||e==="dark"||e==="light"}function localStorageColorSchemeManager({key:e="mantine-color-scheme-value"}={}){let t;return{get:i=>{if(typeof window>"u")return i;try{const a=window.localStorage.getItem(e);return isMantineColorScheme(a)?a:i}catch{return i}},set:i=>{try{window.localStorage.setItem(e,i)}catch(a){console.warn("[@mantine/core] Local storage color scheme manager was unable to save color scheme.",a)}},subscribe:i=>{t=a=>{a.storageArea===window.localStorage&&a.key===e&&isMantineColorScheme(a.newValue)&&i(a.newValue)},window.addEventListener("storage",t)},unsubscribe:()=>{window.removeEventListener("storage",t)},clear:()=>{window.localStorage.removeItem(e)}}}const INVALID_PRIMARY_COLOR_ERROR="[@mantine/core] MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more – https://mantine.dev/theming/colors/#primary-color",INVALID_PRIMARY_SHADE_ERROR="[@mantine/core] MantineProvider: Invalid theme.primaryShade, it accepts only 0-9 integers or an object { light: 0-9, dark: 0-9 }";function isValidPrimaryShade(e){return e<0||e>9?!1:parseInt(e.toString(),10)===e}function validateMantineTheme(e){if(!(e.primaryColor in e.colors))throw new Error(INVALID_PRIMARY_COLOR_ERROR);if(typeof e.primaryShade=="object"&&(!isValidPrimaryShade(e.primaryShade.dark)||!isValidPrimaryShade(e.primaryShade.light)))throw new Error(INVALID_PRIMARY_SHADE_ERROR);if(typeof e.primaryShade=="number"&&!isValidPrimaryShade(e.primaryShade))throw new Error(INVALID_PRIMARY_SHADE_ERROR)}function mergeMantineTheme(e,t){var a;if(!t)return validateMantineTheme(e),e;const i=deepMerge(e,t);return t.fontFamily&&!((a=t.headings)!=null&&a.fontFamily)&&(i.headings.fontFamily=t.fontFamily),validateMantineTheme(i),i}const MantineThemeContext=reactExports.createContext(null),useSafeMantineTheme=()=>reactExports.useContext(MantineThemeContext)||DEFAULT_THEME;function useMantineTheme(){const e=reactExports.useContext(MantineThemeContext);if(!e)throw new Error("@mantine/core: MantineProvider was not found in component tree, make sure you have it in your app");return e}function MantineThemeProvider({theme:e,children:t,inherit:i=!0}){const a=useSafeMantineTheme(),o=reactExports.useMemo(()=>mergeMantineTheme(i?a:DEFAULT_THEME,e),[e,a,i]);return jsxRuntimeExports.jsx(MantineThemeContext.Provider,{value:o,children:t})}MantineThemeProvider.displayName="@mantine/core/MantineThemeProvider";function MantineClasses(){const e=useMantineTheme(),t=useMantineStyleNonce(),i=keys(e.breakpoints).reduce((a,o)=>{const l=e.breakpoints[o].includes("px"),u=px(e.breakpoints[o]),f=l?`${u-.1}px`:em(u-.1),h=l?`${u}px`:em(u);return`${a}@media (max-width: ${f}) {.mantine-visible-from-${o} {display: none !important;}}@media (min-width: ${h}) {.mantine-hidden-from-${o} {display: none !important;}}`},"");return jsxRuntimeExports.jsx("style",{"data-mantine-styles":"classes",nonce:t==null?void 0:t(),dangerouslySetInnerHTML:{__html:i}})}function cssVariablesObjectToString(e){return Object.entries(e).map(([t,i])=>`${t}: ${i};`).join("")}function wrapWithSelector(e,t){return(Array.isArray(e)?e:[e]).reduce((a,o)=>`${o}{${a}}`,t)}function convertCssVariables(e,t){const i=cssVariablesObjectToString(e.variables),a=i?wrapWithSelector(t,i):"",o=cssVariablesObjectToString(e.dark),l=cssVariablesObjectToString(e.light),u=o?wrapWithSelector(t===":host"?`${t}([data-mantine-color-scheme="dark"])`:`${t}[data-mantine-color-scheme="dark"]`,o):"",f=l?wrapWithSelector(t===":host"?`${t}([data-mantine-color-scheme="light"])`:`${t}[data-mantine-color-scheme="light"]`,l):"";return`${a}${u}${f}`}function getContrastColor({color:e,theme:t,autoContrast:i}){return(typeof i=="boolean"?i:t.autoContrast)&&parseThemeColor({color:e||t.primaryColor,theme:t}).isLight?"var(--mantine-color-black)":"var(--mantine-color-white)"}function getPrimaryContrastColor(e,t){return getContrastColor({color:e.colors[e.primaryColor][getPrimaryShade(e,t)],theme:e,autoContrast:null})}function getCSSColorVariables({theme:e,color:t,colorScheme:i,name:a=t,withColorValues:o=!0}){if(!e.colors[t])return{};if(i==="light"){const f=getPrimaryShade(e,"light"),h={[`--mantine-color-${a}-text`]:`var(--mantine-color-${a}-filled)`,[`--mantine-color-${a}-filled`]:`var(--mantine-color-${a}-${f})`,[`--mantine-color-${a}-filled-hover`]:`var(--mantine-color-${a}-${f===9?8:f+1})`,[`--mantine-color-${a}-light`]:alpha$1(e.colors[t][f],.1),[`--mantine-color-${a}-light-hover`]:alpha$1(e.colors[t][f],.12),[`--mantine-color-${a}-light-color`]:`var(--mantine-color-${a}-${f})`,[`--mantine-color-${a}-outline`]:`var(--mantine-color-${a}-${f})`,[`--mantine-color-${a}-outline-hover`]:alpha$1(e.colors[t][f],.05)};return o?{[`--mantine-color-${a}-0`]:e.colors[t][0],[`--mantine-color-${a}-1`]:e.colors[t][1],[`--mantine-color-${a}-2`]:e.colors[t][2],[`--mantine-color-${a}-3`]:e.colors[t][3],[`--mantine-color-${a}-4`]:e.colors[t][4],[`--mantine-color-${a}-5`]:e.colors[t][5],[`--mantine-color-${a}-6`]:e.colors[t][6],[`--mantine-color-${a}-7`]:e.colors[t][7],[`--mantine-color-${a}-8`]:e.colors[t][8],[`--mantine-color-${a}-9`]:e.colors[t][9],...h}:h}const l=getPrimaryShade(e,"dark"),u={[`--mantine-color-${a}-text`]:`var(--mantine-color-${a}-4)`,[`--mantine-color-${a}-filled`]:`var(--mantine-color-${a}-${l})`,[`--mantine-color-${a}-filled-hover`]:`var(--mantine-color-${a}-${l===9?8:l+1})`,[`--mantine-color-${a}-light`]:alpha$1(e.colors[t][Math.max(0,l-2)],.15),[`--mantine-color-${a}-light-hover`]:alpha$1(e.colors[t][Math.max(0,l-2)],.2),[`--mantine-color-${a}-light-color`]:`var(--mantine-color-${a}-${Math.max(l-5,0)})`,[`--mantine-color-${a}-outline`]:`var(--mantine-color-${a}-${Math.max(l-4,0)})`,[`--mantine-color-${a}-outline-hover`]:alpha$1(e.colors[t][Math.max(l-4,0)],.05)};return o?{[`--mantine-color-${a}-0`]:e.colors[t][0],[`--mantine-color-${a}-1`]:e.colors[t][1],[`--mantine-color-${a}-2`]:e.colors[t][2],[`--mantine-color-${a}-3`]:e.colors[t][3],[`--mantine-color-${a}-4`]:e.colors[t][4],[`--mantine-color-${a}-5`]:e.colors[t][5],[`--mantine-color-${a}-6`]:e.colors[t][6],[`--mantine-color-${a}-7`]:e.colors[t][7],[`--mantine-color-${a}-8`]:e.colors[t][8],[`--mantine-color-${a}-9`]:e.colors[t][9],...u}:u}function isVirtualColor(e){return!!e&&typeof e=="object"&&"mantine-virtual-color"in e}function assignSizeVariables(e,t,i){keys(t).forEach(a=>Object.assign(e,{[`--mantine-${i}-${a}`]:t[a]}))}const defaultCssVariablesResolver=e=>{const t=getPrimaryShade(e,"light"),i=e.defaultRadius in e.radius?e.radius[e.defaultRadius]:rem(e.defaultRadius),a={variables:{"--mantine-scale":e.scale.toString(),"--mantine-cursor-type":e.cursorType,"--mantine-color-scheme":"light dark","--mantine-webkit-font-smoothing":e.fontSmoothing?"antialiased":"unset","--mantine-moz-font-smoothing":e.fontSmoothing?"grayscale":"unset","--mantine-color-white":e.white,"--mantine-color-black":e.black,"--mantine-line-height":e.lineHeights.md,"--mantine-font-family":e.fontFamily,"--mantine-font-family-monospace":e.fontFamilyMonospace,"--mantine-font-family-headings":e.headings.fontFamily,"--mantine-heading-font-weight":e.headings.fontWeight,"--mantine-heading-text-wrap":e.headings.textWrap,"--mantine-radius-default":i,"--mantine-primary-color-filled":`var(--mantine-color-${e.primaryColor}-filled)`,"--mantine-primary-color-filled-hover":`var(--mantine-color-${e.primaryColor}-filled-hover)`,"--mantine-primary-color-light":`var(--mantine-color-${e.primaryColor}-light)`,"--mantine-primary-color-light-hover":`var(--mantine-color-${e.primaryColor}-light-hover)`,"--mantine-primary-color-light-color":`var(--mantine-color-${e.primaryColor}-light-color)`},light:{"--mantine-primary-color-contrast":getPrimaryContrastColor(e,"light"),"--mantine-color-bright":"var(--mantine-color-black)","--mantine-color-text":e.black,"--mantine-color-body":e.white,"--mantine-color-error":"var(--mantine-color-red-6)","--mantine-color-placeholder":"var(--mantine-color-gray-5)","--mantine-color-anchor":`var(--mantine-color-${e.primaryColor}-${t})`,"--mantine-color-default":"var(--mantine-color-white)","--mantine-color-default-hover":"var(--mantine-color-gray-0)","--mantine-color-default-color":"var(--mantine-color-black)","--mantine-color-default-border":"var(--mantine-color-gray-4)","--mantine-color-dimmed":"var(--mantine-color-gray-6)","--mantine-color-disabled":"var(--mantine-color-gray-2)","--mantine-color-disabled-color":"var(--mantine-color-gray-5)","--mantine-color-disabled-border":"var(--mantine-color-gray-3)"},dark:{"--mantine-primary-color-contrast":getPrimaryContrastColor(e,"dark"),"--mantine-color-bright":"var(--mantine-color-white)","--mantine-color-text":"var(--mantine-color-dark-0)","--mantine-color-body":"var(--mantine-color-dark-7)","--mantine-color-error":"var(--mantine-color-red-8)","--mantine-color-placeholder":"var(--mantine-color-dark-3)","--mantine-color-anchor":`var(--mantine-color-${e.primaryColor}-4)`,"--mantine-color-default":"var(--mantine-color-dark-6)","--mantine-color-default-hover":"var(--mantine-color-dark-5)","--mantine-color-default-color":"var(--mantine-color-white)","--mantine-color-default-border":"var(--mantine-color-dark-4)","--mantine-color-dimmed":"var(--mantine-color-dark-2)","--mantine-color-disabled":"var(--mantine-color-dark-6)","--mantine-color-disabled-color":"var(--mantine-color-dark-3)","--mantine-color-disabled-border":"var(--mantine-color-gray-6)"}};assignSizeVariables(a.variables,e.breakpoints,"breakpoint"),assignSizeVariables(a.variables,e.spacing,"spacing"),assignSizeVariables(a.variables,e.fontSizes,"font-size"),assignSizeVariables(a.variables,e.lineHeights,"line-height"),assignSizeVariables(a.variables,e.shadows,"shadow"),assignSizeVariables(a.variables,e.radius,"radius"),e.colors[e.primaryColor].forEach((l,u)=>{a.variables[`--mantine-primary-color-${u}`]=`var(--mantine-color-${e.primaryColor}-${u})`}),keys(e.colors).forEach(l=>{const u=e.colors[l];if(isVirtualColor(u)){Object.assign(a.light,getCSSColorVariables({theme:e,name:u.name,color:u.light,colorScheme:"light",withColorValues:!0})),Object.assign(a.dark,getCSSColorVariables({theme:e,name:u.name,color:u.dark,colorScheme:"dark",withColorValues:!0}));return}u.forEach((f,h)=>{a.variables[`--mantine-color-${l}-${h}`]=f}),Object.assign(a.light,getCSSColorVariables({theme:e,color:l,colorScheme:"light",withColorValues:!1})),Object.assign(a.dark,getCSSColorVariables({theme:e,color:l,colorScheme:"dark",withColorValues:!1}))});const o=e.headings.sizes;return keys(o).forEach(l=>{a.variables[`--mantine-${l}-font-size`]=o[l].fontSize,a.variables[`--mantine-${l}-line-height`]=o[l].lineHeight,a.variables[`--mantine-${l}-font-weight`]=o[l].fontWeight||e.headings.fontWeight}),a};function getMergedVariables({theme:e,generator:t}){const i=defaultCssVariablesResolver(e),a=t==null?void 0:t(e);return a?deepMerge(i,a):i}const defaultCssVariables=defaultCssVariablesResolver(DEFAULT_THEME);function removeDefaultVariables(e){const t={variables:{},light:{},dark:{}};return keys(e.variables).forEach(i=>{defaultCssVariables.variables[i]!==e.variables[i]&&(t.variables[i]=e.variables[i])}),keys(e.light).forEach(i=>{defaultCssVariables.light[i]!==e.light[i]&&(t.light[i]=e.light[i])}),keys(e.dark).forEach(i=>{defaultCssVariables.dark[i]!==e.dark[i]&&(t.dark[i]=e.dark[i])}),t}function getColorSchemeCssVariables(e){return`
|
||
${e}[data-mantine-color-scheme="dark"] { --mantine-color-scheme: dark; }
|
||
${e}[data-mantine-color-scheme="light"] { --mantine-color-scheme: light; }
|
||
`}function MantineCssVariables({cssVariablesSelector:e,deduplicateCssVariables:t}){const i=useMantineTheme(),a=useMantineStyleNonce(),o=useMantineCssVariablesResolver(),l=getMergedVariables({theme:i,generator:o}),u=e===":root"&&t,f=u?removeDefaultVariables(l):l,h=convertCssVariables(f,e);return h?jsxRuntimeExports.jsx("style",{"data-mantine-styles":!0,nonce:a==null?void 0:a(),dangerouslySetInnerHTML:{__html:`${h}${u?"":getColorSchemeCssVariables(e)}`}}):null}MantineCssVariables.displayName="@mantine/CssVariables";function setColorSchemeAttribute(e,t){var o,l;const i=typeof window<"u"&&"matchMedia"in window&&((o=window.matchMedia("(prefers-color-scheme: dark)"))==null?void 0:o.matches),a=e!=="auto"?e:i?"dark":"light";(l=t())==null||l.setAttribute("data-mantine-color-scheme",a)}function useProviderColorScheme({manager:e,defaultColorScheme:t,getRootElement:i,forceColorScheme:a}){const o=reactExports.useRef(null),[l,u]=reactExports.useState(()=>e.get(t)),f=a||l,h=reactExports.useCallback(m=>{a||(setColorSchemeAttribute(m,i),u(m),e.set(m))},[e.set,f,a]),p=reactExports.useCallback(()=>{u(t),setColorSchemeAttribute(t,i),e.clear()},[e.clear,t]);return reactExports.useEffect(()=>(e.subscribe(h),e.unsubscribe),[e.subscribe,e.unsubscribe]),useIsomorphicEffect(()=>{setColorSchemeAttribute(e.get(t),i)},[]),reactExports.useEffect(()=>{var g;if(a)return setColorSchemeAttribute(a,i),()=>{};a===void 0&&setColorSchemeAttribute(l,i),typeof window<"u"&&"matchMedia"in window&&(o.current=window.matchMedia("(prefers-color-scheme: dark)"));const m=b=>{l==="auto"&&setColorSchemeAttribute(b.matches?"dark":"light",i)};return(g=o.current)==null||g.addEventListener("change",m),()=>{var b;return(b=o.current)==null?void 0:b.removeEventListener("change",m)}},[l,a]),{colorScheme:f,setColorScheme:h,clearColorScheme:p}}function useRespectReduceMotion({respectReducedMotion:e,getRootElement:t}){useIsomorphicEffect(()=>{var i;e&&((i=t())==null||i.setAttribute("data-respect-reduced-motion","true"))},[e])}function MantineProvider({theme:e,children:t,getStyleNonce:i,withStaticClasses:a=!0,withGlobalClasses:o=!0,deduplicateCssVariables:l=!0,withCssVariables:u=!0,cssVariablesSelector:f=":root",classNamesPrefix:h="mantine",colorSchemeManager:p=localStorageColorSchemeManager(),defaultColorScheme:m="light",getRootElement:g=()=>document.documentElement,cssVariablesResolver:b,forceColorScheme:x,stylesTransform:y,env:S}){const{colorScheme:E,setColorScheme:w,clearColorScheme:_}=useProviderColorScheme({defaultColorScheme:m,forceColorScheme:x,manager:p,getRootElement:g});return useRespectReduceMotion({respectReducedMotion:(e==null?void 0:e.respectReducedMotion)||!1,getRootElement:g}),jsxRuntimeExports.jsx(MantineContext.Provider,{value:{colorScheme:E,setColorScheme:w,clearColorScheme:_,getRootElement:g,classNamesPrefix:h,getStyleNonce:i,cssVariablesResolver:b,cssVariablesSelector:f,withStaticClasses:a,stylesTransform:y,env:S},children:jsxRuntimeExports.jsxs(MantineThemeProvider,{theme:e,children:[u&&jsxRuntimeExports.jsx(MantineCssVariables,{cssVariablesSelector:f,deduplicateCssVariables:l}),o&&jsxRuntimeExports.jsx(MantineClasses,{}),t]})})}MantineProvider.displayName="@mantine/core/MantineProvider";function useResolvedStylesApi({classNames:e,styles:t,props:i,stylesCtx:a}){const o=useMantineTheme();return{resolvedClassNames:resolveClassNames({theme:o,classNames:e,props:i,stylesCtx:a||void 0}),resolvedStyles:resolveStyles({theme:o,styles:t,props:i,stylesCtx:a||void 0})}}const FOCUS_CLASS_NAMES={always:"mantine-focus-always",auto:"mantine-focus-auto",never:"mantine-focus-never"};function getGlobalClassNames({theme:e,options:t,unstyled:i}){return clsx((t==null?void 0:t.focusable)&&!i&&(e.focusClassName||FOCUS_CLASS_NAMES[e.focusRing]),(t==null?void 0:t.active)&&!i&&e.activeClassName)}function getOptionsClassNames({selector:e,stylesCtx:t,options:i,props:a,theme:o}){return resolveClassNames({theme:o,classNames:i==null?void 0:i.classNames,props:(i==null?void 0:i.props)||a,stylesCtx:t})[e]}function getResolvedClassNames({selector:e,stylesCtx:t,theme:i,classNames:a,props:o}){return resolveClassNames({theme:i,classNames:a,props:o,stylesCtx:t})[e]}function getRootClassName({rootSelector:e,selector:t,className:i}){return e===t?i:void 0}function getSelectorClassName({selector:e,classes:t,unstyled:i}){return i?void 0:t[e]}function getStaticClassNames({themeName:e,classNamesPrefix:t,selector:i,withStaticClass:a}){return a===!1?[]:e.map(o=>`${t}-${o}-${i}`)}function getThemeClassNames({themeName:e,theme:t,selector:i,props:a,stylesCtx:o}){return e.map(l=>{var u,f;return(f=resolveClassNames({theme:t,classNames:(u=t.components[l])==null?void 0:u.classNames,props:a,stylesCtx:o}))==null?void 0:f[i]})}function getVariantClassName({options:e,classes:t,selector:i,unstyled:a}){return e!=null&&e.variant&&!a?t[`${i}--${e.variant}`]:void 0}function getClassName({theme:e,options:t,themeName:i,selector:a,classNamesPrefix:o,classNames:l,classes:u,unstyled:f,className:h,rootSelector:p,props:m,stylesCtx:g,withStaticClasses:b,headless:x,transformedStyles:y}){return clsx(getGlobalClassNames({theme:e,options:t,unstyled:f||x}),getThemeClassNames({theme:e,themeName:i,selector:a,props:m,stylesCtx:g}),getVariantClassName({options:t,classes:u,selector:a,unstyled:f}),getResolvedClassNames({selector:a,stylesCtx:g,theme:e,classNames:l,props:m}),getResolvedClassNames({selector:a,stylesCtx:g,theme:e,classNames:y,props:m}),getOptionsClassNames({selector:a,stylesCtx:g,options:t,props:m,theme:e}),getRootClassName({rootSelector:p,selector:a,className:h}),getSelectorClassName({selector:a,classes:u,unstyled:f||x}),b&&!x&&getStaticClassNames({themeName:i,classNamesPrefix:o,selector:a,withStaticClass:t==null?void 0:t.withStaticClass}),t==null?void 0:t.className)}function getThemeStyles({theme:e,themeName:t,props:i,stylesCtx:a,selector:o}){return t.map(l=>{var u;return resolveStyles({theme:e,styles:(u=e.components[l])==null?void 0:u.styles,props:i,stylesCtx:a})[o]}).reduce((l,u)=>({...l,...u}),{})}function resolveStyle({style:e,theme:t}){return Array.isArray(e)?[...e].reduce((i,a)=>({...i,...resolveStyle({style:a,theme:t})}),{}):typeof e=="function"?e(t):e??{}}function mergeVars(e){return e.reduce((t,i)=>(i&&Object.keys(i).forEach(a=>{t[a]={...t[a],...filterProps(i[a])}}),t),{})}function resolveVars({vars:e,varsResolver:t,theme:i,props:a,stylesCtx:o,selector:l,themeName:u,headless:f}){var h;return(h=mergeVars([f?{}:t==null?void 0:t(i,a,o),...u.map(p=>{var m,g,b;return(b=(g=(m=i.components)==null?void 0:m[p])==null?void 0:g.vars)==null?void 0:b.call(g,i,a,o)}),e==null?void 0:e(i,a,o)]))==null?void 0:h[l]}function getStyle({theme:e,themeName:t,selector:i,options:a,props:o,stylesCtx:l,rootSelector:u,styles:f,style:h,vars:p,varsResolver:m,headless:g,withStylesTransform:b}){return{...!b&&getThemeStyles({theme:e,themeName:t,props:o,stylesCtx:l,selector:i}),...!b&&resolveStyles({theme:e,styles:f,props:o,stylesCtx:l})[i],...!b&&resolveStyles({theme:e,styles:a==null?void 0:a.styles,props:(a==null?void 0:a.props)||o,stylesCtx:l})[i],...resolveVars({theme:e,props:o,stylesCtx:l,vars:p,varsResolver:m,selector:i,themeName:t,headless:g}),...u===i?resolveStyle({style:h,theme:e}):null,...resolveStyle({style:a==null?void 0:a.style,theme:e})}}function useStylesTransform({props:e,stylesCtx:t,themeName:i}){var u;const a=useMantineTheme(),o=(u=useMantineStylesTransform())==null?void 0:u();return{getTransformedStyles:f=>o?[...f.map(p=>o(p,{props:e,theme:a,ctx:t})),...i.map(p=>{var m;return o((m=a.components[p])==null?void 0:m.styles,{props:e,theme:a,ctx:t})})].filter(Boolean):[],withStylesTransform:!!o}}function useStyles({name:e,classes:t,props:i,stylesCtx:a,className:o,style:l,rootSelector:u="root",unstyled:f,classNames:h,styles:p,vars:m,varsResolver:g}){const b=useMantineTheme(),x=useMantineClassNamesPrefix(),y=useMantineWithStaticClasses(),S=useMantineIsHeadless(),E=(Array.isArray(e)?e:[e]).filter(O=>O),{withStylesTransform:w,getTransformedStyles:_}=useStylesTransform({props:i,stylesCtx:a,themeName:E});return(O,k)=>({className:getClassName({theme:b,options:k,themeName:E,selector:O,classNamesPrefix:x,classNames:h,classes:t,unstyled:f,className:o,rootSelector:u,props:i,stylesCtx:a,withStaticClasses:y,headless:S,transformedStyles:_([k==null?void 0:k.styles,p])}),style:getStyle({theme:b,themeName:E,selector:O,options:k,props:i,stylesCtx:a,rootSelector:u,styles:p,style:l,vars:m,varsResolver:g,headless:S,withStylesTransform:w})})}function getAutoContrastValue(e,t){return typeof e=="boolean"?e:t.autoContrast}function disableTransition(e){const t=document.createElement("style");return t.setAttribute("data-mantine-styles","inline"),t.innerHTML="*, *::before, *::after {transition: none !important;}",t.setAttribute("data-mantine-disable-transition","true"),e&&t.setAttribute("nonce",e),document.head.appendChild(t),()=>document.querySelectorAll("[data-mantine-disable-transition]").forEach(a=>a.remove())}function useMantineColorScheme({keepTransitions:e}={}){const t=reactExports.useRef(noop$4),i=reactExports.useRef(-1),a=reactExports.useContext(MantineContext),o=useMantineStyleNonce(),l=reactExports.useRef(o==null?void 0:o());if(!a)throw new Error("[@mantine/core] MantineProvider was not found in tree");const u=g=>{a.setColorScheme(g),t.current=e?()=>{}:disableTransition(l.current),window.clearTimeout(i.current),i.current=window.setTimeout(()=>{var b;(b=t.current)==null||b.call(t)},10)},f=()=>{a.clearColorScheme(),t.current=e?()=>{}:disableTransition(l.current),window.clearTimeout(i.current),i.current=window.setTimeout(()=>{var g;(g=t.current)==null||g.call(t)},10)},h=useColorScheme("light",{getInitialValueInEffect:!1}),p=a.colorScheme==="auto"?h:a.colorScheme,m=reactExports.useCallback(()=>u(p==="light"?"dark":"light"),[u,p]);return reactExports.useEffect(()=>()=>{var g;(g=t.current)==null||g.call(t),window.clearTimeout(i.current)},[]),{colorScheme:a.colorScheme,setColorScheme:u,clearColorScheme:f,toggleColorScheme:m}}const getScript=({defaultColorScheme:e,localStorageKey:t,forceColorScheme:i})=>i?`document.documentElement.setAttribute("data-mantine-color-scheme", '${i}');`:`try {
|
||
var _colorScheme = window.localStorage.getItem("${t}");
|
||
var colorScheme = _colorScheme === "light" || _colorScheme === "dark" || _colorScheme === "auto" ? _colorScheme : "${e}";
|
||
var computedColorScheme = colorScheme !== "auto" ? colorScheme : window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
||
document.documentElement.setAttribute("data-mantine-color-scheme", computedColorScheme);
|
||
} catch (e) {}
|
||
`;function ColorSchemeScript({defaultColorScheme:e="light",localStorageKey:t="mantine-color-scheme-value",forceColorScheme:i,...a}){const o=["light","dark","auto"].includes(e)?e:"light";return jsxRuntimeExports.jsx("script",{...a,"data-mantine-script":!0,dangerouslySetInnerHTML:{__html:getScript({defaultColorScheme:o,localStorageKey:t,forceColorScheme:i})}})}function useProps(e,t,i){var u;const a=useMantineTheme(),o=(u=a.components[e])==null?void 0:u.defaultProps,l=typeof o=="function"?o(a):o;return{...t,...l,...filterProps(i)}}function cssObjectToString(e){return keys(e).reduce((t,i)=>e[i]!==void 0?`${t}${camelToKebabCase(i)}:${e[i]};`:t,"").trim()}function stylesToString({selector:e,styles:t,media:i,container:a}){const o=t?cssObjectToString(t):"",l=Array.isArray(i)?i.map(f=>`@media${f.query}{${e}{${cssObjectToString(f.styles)}}}`):[],u=Array.isArray(a)?a.map(f=>`@container ${f.query}{${e}{${cssObjectToString(f.styles)}}}`):[];return`${o?`${e}{${o}}`:""}${l.join("")}${u.join("")}`.trim()}function InlineStyles(e){const t=useMantineStyleNonce();return jsxRuntimeExports.jsx("style",{"data-mantine-styles":"inline",nonce:t==null?void 0:t(),dangerouslySetInnerHTML:{__html:stylesToString(e)}})}function extractStyleProps(e){const{m:t,mx:i,my:a,mt:o,mb:l,ml:u,mr:f,me:h,ms:p,p:m,px:g,py:b,pt:x,pb:y,pl:S,pr:E,pe:w,ps:_,bd:O,bg:k,c:A,opacity:D,ff:R,fz:T,fw:j,lts:P,ta:M,lh:I,fs:G,tt:ne,td:Q,w:B,miw:H,maw:Y,h:U,mih:F,mah:X,bgsz:z,bgp:L,bgr:$,bga:V,pos:K,top:te,left:J,bottom:ce,right:ue,inset:we,display:Ee,flex:De,hiddenFrom:je,visibleFrom:Pe,lightHidden:ge,darkHidden:se,sx:W,...ee}=e;return{styleProps:filterProps({m:t,mx:i,my:a,mt:o,mb:l,ml:u,mr:f,me:h,ms:p,p:m,px:g,py:b,pt:x,pb:y,pl:S,pr:E,pe:w,ps:_,bd:O,bg:k,c:A,opacity:D,ff:R,fz:T,fw:j,lts:P,ta:M,lh:I,fs:G,tt:ne,td:Q,w:B,miw:H,maw:Y,h:U,mih:F,mah:X,bgsz:z,bgp:L,bgr:$,bga:V,pos:K,top:te,left:J,bottom:ce,right:ue,inset:we,display:Ee,flex:De,hiddenFrom:je,visibleFrom:Pe,lightHidden:ge,darkHidden:se,sx:W}),rest:ee}}const STYlE_PROPS_DATA={m:{type:"spacing",property:"margin"},mt:{type:"spacing",property:"marginTop"},mb:{type:"spacing",property:"marginBottom"},ml:{type:"spacing",property:"marginLeft"},mr:{type:"spacing",property:"marginRight"},ms:{type:"spacing",property:"marginInlineStart"},me:{type:"spacing",property:"marginInlineEnd"},mx:{type:"spacing",property:"marginInline"},my:{type:"spacing",property:"marginBlock"},p:{type:"spacing",property:"padding"},pt:{type:"spacing",property:"paddingTop"},pb:{type:"spacing",property:"paddingBottom"},pl:{type:"spacing",property:"paddingLeft"},pr:{type:"spacing",property:"paddingRight"},ps:{type:"spacing",property:"paddingInlineStart"},pe:{type:"spacing",property:"paddingInlineEnd"},px:{type:"spacing",property:"paddingInline"},py:{type:"spacing",property:"paddingBlock"},bd:{type:"border",property:"border"},bg:{type:"color",property:"background"},c:{type:"textColor",property:"color"},opacity:{type:"identity",property:"opacity"},ff:{type:"fontFamily",property:"fontFamily"},fz:{type:"fontSize",property:"fontSize"},fw:{type:"identity",property:"fontWeight"},lts:{type:"size",property:"letterSpacing"},ta:{type:"identity",property:"textAlign"},lh:{type:"lineHeight",property:"lineHeight"},fs:{type:"identity",property:"fontStyle"},tt:{type:"identity",property:"textTransform"},td:{type:"identity",property:"textDecoration"},w:{type:"spacing",property:"width"},miw:{type:"spacing",property:"minWidth"},maw:{type:"spacing",property:"maxWidth"},h:{type:"spacing",property:"height"},mih:{type:"spacing",property:"minHeight"},mah:{type:"spacing",property:"maxHeight"},bgsz:{type:"size",property:"backgroundSize"},bgp:{type:"identity",property:"backgroundPosition"},bgr:{type:"identity",property:"backgroundRepeat"},bga:{type:"identity",property:"backgroundAttachment"},pos:{type:"identity",property:"position"},top:{type:"size",property:"top"},left:{type:"size",property:"left"},bottom:{type:"size",property:"bottom"},right:{type:"size",property:"right"},inset:{type:"size",property:"inset"},display:{type:"identity",property:"display"},flex:{type:"identity",property:"flex"}};function colorResolver(e,t){const i=parseThemeColor({color:e,theme:t});return i.color==="dimmed"?"var(--mantine-color-dimmed)":i.color==="bright"?"var(--mantine-color-bright)":i.variable?`var(${i.variable})`:i.color}function textColorResolver(e,t){const i=parseThemeColor({color:e,theme:t});return i.isThemeColor&&i.shade===void 0?`var(--mantine-color-${i.color}-text)`:colorResolver(e,t)}function borderResolver(e,t){if(typeof e=="number")return rem(e);if(typeof e=="string"){const[i,a,...o]=e.split(" ").filter(u=>u.trim()!=="");let l=`${rem(i)}`;return a&&(l+=` ${a}`),o.length>0&&(l+=` ${colorResolver(o.join(" "),t)}`),l.trim()}return e}const values$1={text:"var(--mantine-font-family)",mono:"var(--mantine-font-family-monospace)",monospace:"var(--mantine-font-family-monospace)",heading:"var(--mantine-font-family-headings)",headings:"var(--mantine-font-family-headings)"};function fontFamilyResolver(e){return typeof e=="string"&&e in values$1?values$1[e]:e}const headings$1=["h1","h2","h3","h4","h5","h6"];function fontSizeResolver(e,t){return typeof e=="string"&&e in t.fontSizes?`var(--mantine-font-size-${e})`:typeof e=="string"&&headings$1.includes(e)?`var(--mantine-${e}-font-size)`:typeof e=="number"||typeof e=="string"?rem(e):e}function identityResolver(e){return e}const headings=["h1","h2","h3","h4","h5","h6"];function lineHeightResolver(e,t){return typeof e=="string"&&e in t.lineHeights?`var(--mantine-line-height-${e})`:typeof e=="string"&&headings.includes(e)?`var(--mantine-${e}-line-height)`:e}function sizeResolver(e){return typeof e=="number"?rem(e):e}function spacingResolver(e,t){if(typeof e=="number")return rem(e);if(typeof e=="string"){const i=e.replace("-","");if(!(i in t.spacing))return rem(e);const a=`--mantine-spacing-${i}`;return e.startsWith("-")?`calc(var(${a}) * -1)`:`var(${a})`}return e}const resolvers$1={color:colorResolver,textColor:textColorResolver,fontSize:fontSizeResolver,spacing:spacingResolver,identity:identityResolver,size:sizeResolver,lineHeight:lineHeightResolver,fontFamily:fontFamilyResolver,border:borderResolver};function replaceMediaQuery(e){return e.replace("(min-width: ","").replace("em)","")}function sortMediaQueries({media:e,...t}){const a=Object.keys(e).sort((o,l)=>Number(replaceMediaQuery(o))-Number(replaceMediaQuery(l))).map(o=>({query:o,styles:e[o]}));return{...t,media:a}}function hasResponsiveStyles(e){if(typeof e!="object"||e===null)return!1;const t=Object.keys(e);return!(t.length===1&&t[0]==="base")}function getBaseValue(e){return typeof e=="object"&&e!==null?"base"in e?e.base:void 0:e}function getBreakpointKeys(e){return typeof e=="object"&&e!==null?keys(e).filter(t=>t!=="base"):[]}function getBreakpointValue(e,t){return typeof e=="object"&&e!==null&&t in e?e[t]:e}function parseStyleProps({styleProps:e,data:t,theme:i}){return sortMediaQueries(keys(e).reduce((a,o)=>{if(o==="hiddenFrom"||o==="visibleFrom"||o==="sx")return a;const l=t[o],u=Array.isArray(l.property)?l.property:[l.property],f=getBaseValue(e[o]);if(!hasResponsiveStyles(e[o]))return u.forEach(p=>{a.inlineStyles[p]=resolvers$1[l.type](f,i)}),a;a.hasResponsiveStyles=!0;const h=getBreakpointKeys(e[o]);return u.forEach(p=>{f&&(a.styles[p]=resolvers$1[l.type](f,i)),h.forEach(m=>{const g=`(min-width: ${i.breakpoints[m]})`;a.media[g]={...a.media[g],[p]:resolvers$1[l.type](getBreakpointValue(e[o],m),i)}})}),a},{hasResponsiveStyles:!1,styles:{},inlineStyles:{},media:{}}))}function useRandomClassName(){return`__m__-${reactExports.useId().replace(/:/g,"")}`}function getStyleObject(e,t){return Array.isArray(e)?[...e].reduce((i,a)=>({...i,...getStyleObject(a,t)}),{}):typeof e=="function"?e(t):e??{}}function createPolymorphicComponent(e){return e}function transformModKey(e){return e.startsWith("data-")?e:`data-${e}`}function getMod(e){return Object.keys(e).reduce((t,i)=>{const a=e[i];return a===void 0||a===""||a===!1||a===null||(t[transformModKey(i)]=e[i]),t},{})}function getBoxMod(e){return e?typeof e=="string"?{[transformModKey(e)]:!0}:Array.isArray(e)?[...e].reduce((t,i)=>({...t,...getBoxMod(i)}),{}):getMod(e):null}function mergeStyles(e,t){return Array.isArray(e)?[...e].reduce((i,a)=>({...i,...mergeStyles(a,t)}),{}):typeof e=="function"?e(t):e??{}}function getBoxStyle({theme:e,style:t,vars:i,styleProps:a}){const o=mergeStyles(t,e),l=mergeStyles(i,e);return{...o,...l,...a}}const _Box=reactExports.forwardRef(({component:e,style:t,__vars:i,className:a,variant:o,mod:l,size:u,hiddenFrom:f,visibleFrom:h,lightHidden:p,darkHidden:m,renderRoot:g,__size:b,...x},y)=>{var T;const S=useMantineTheme(),E=e||"div",{styleProps:w,rest:_}=extractStyleProps(x),O=useMantineSxTransform(),k=(T=O==null?void 0:O())==null?void 0:T(w.sx),A=useRandomClassName(),D=parseStyleProps({styleProps:w,theme:S,data:STYlE_PROPS_DATA}),R={ref:y,style:getBoxStyle({theme:S,style:t,vars:i,styleProps:D.inlineStyles}),className:clsx(a,k,{[A]:D.hasResponsiveStyles,"mantine-light-hidden":p,"mantine-dark-hidden":m,[`mantine-hidden-from-${f}`]:f,[`mantine-visible-from-${h}`]:h}),"data-variant":o,"data-size":isNumberLike(u)?void 0:u||void 0,size:b,...getBoxMod(l),..._};return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[D.hasResponsiveStyles&&jsxRuntimeExports.jsx(InlineStyles,{selector:`.${A}`,styles:D.styles,media:D.media}),typeof g=="function"?g(R):jsxRuntimeExports.jsx(E,{...R})]})});_Box.displayName="@mantine/core/Box";const Box=_Box;function identity(e){return e}function getWithProps(e){const t=e;return i=>{const a=reactExports.forwardRef((o,l)=>jsxRuntimeExports.jsx(t,{...i,...o,ref:l}));return a.extend=t.extend,a.displayName=`WithProps(${t.displayName})`,a}}function factory(e){const t=reactExports.forwardRef(e);return t.extend=identity,t.withProps=i=>{const a=reactExports.forwardRef((o,l)=>jsxRuntimeExports.jsx(t,{...i,...o,ref:l}));return a.extend=t.extend,a.displayName=`WithProps(${t.displayName})`,a},t}function polymorphicFactory(e){const t=reactExports.forwardRef(e);return t.withProps=i=>{const a=reactExports.forwardRef((o,l)=>jsxRuntimeExports.jsx(t,{...i,...o,ref:l}));return a.extend=t.extend,a.displayName=`WithProps(${t.displayName})`,a},t.extend=identity,t}const DirectionContext=reactExports.createContext({dir:"ltr",toggleDirection:()=>{},setDirection:()=>{}});function useDirection(){return reactExports.useContext(DirectionContext)}var reactDomExports=requireReactDom();const ReactDOM=getDefaultExportFromCjs(reactDomExports);function hasWindow(){return typeof window<"u"}function getNodeName(e){return isNode(e)?(e.nodeName||"").toLowerCase():"#document"}function getWindow(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function getDocumentElement(e){var t;return(t=(isNode(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function isNode(e){return hasWindow()?e instanceof Node||e instanceof getWindow(e).Node:!1}function isElement(e){return hasWindow()?e instanceof Element||e instanceof getWindow(e).Element:!1}function isHTMLElement(e){return hasWindow()?e instanceof HTMLElement||e instanceof getWindow(e).HTMLElement:!1}function isShadowRoot(e){return!hasWindow()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof getWindow(e).ShadowRoot}function isOverflowElement(e){const{overflow:t,overflowX:i,overflowY:a,display:o}=getComputedStyle$1(e);return/auto|scroll|overlay|hidden|clip/.test(t+a+i)&&!["inline","contents"].includes(o)}function isTableElement(e){return["table","td","th"].includes(getNodeName(e))}function isTopLayer(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function isContainingBlock(e){const t=isWebKit(),i=isElement(e)?getComputedStyle$1(e):e;return["transform","translate","scale","rotate","perspective"].some(a=>i[a]?i[a]!=="none":!1)||(i.containerType?i.containerType!=="normal":!1)||!t&&(i.backdropFilter?i.backdropFilter!=="none":!1)||!t&&(i.filter?i.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(a=>(i.willChange||"").includes(a))||["paint","layout","strict","content"].some(a=>(i.contain||"").includes(a))}function getContainingBlock(e){let t=getParentNode(e);for(;isHTMLElement(t)&&!isLastTraversableNode(t);){if(isContainingBlock(t))return t;if(isTopLayer(t))return null;t=getParentNode(t)}return null}function isWebKit(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function isLastTraversableNode(e){return["html","body","#document"].includes(getNodeName(e))}function getComputedStyle$1(e){return getWindow(e).getComputedStyle(e)}function getNodeScroll(e){return isElement(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function getParentNode(e){if(getNodeName(e)==="html")return e;const t=e.assignedSlot||e.parentNode||isShadowRoot(e)&&e.host||getDocumentElement(e);return isShadowRoot(t)?t.host:t}function getNearestOverflowAncestor(e){const t=getParentNode(e);return isLastTraversableNode(t)?e.ownerDocument?e.ownerDocument.body:e.body:isHTMLElement(t)&&isOverflowElement(t)?t:getNearestOverflowAncestor(t)}function getOverflowAncestors(e,t,i){var a;t===void 0&&(t=[]),i===void 0&&(i=!0);const o=getNearestOverflowAncestor(e),l=o===((a=e.ownerDocument)==null?void 0:a.body),u=getWindow(o);if(l){const f=getFrameElement(u);return t.concat(u,u.visualViewport||[],isOverflowElement(o)?o:[],f&&i?getOverflowAncestors(f):[])}return t.concat(o,getOverflowAncestors(o,[],i))}function getFrameElement(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function activeElement(e){let t=e.activeElement;for(;((i=t)==null||(i=i.shadowRoot)==null?void 0:i.activeElement)!=null;){var i;t=t.shadowRoot.activeElement}return t}function contains(e,t){if(!e||!t)return!1;const i=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(i&&isShadowRoot(i)){let a=t;for(;a;){if(e===a)return!0;a=a.parentNode||a.host}}return!1}function getPlatform(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function getUserAgent(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:i,version:a}=t;return i+"/"+a}).join(" "):navigator.userAgent}function isVirtualPointerEvent(e){return isJSDOM()?!1:!isAndroid()&&e.width===0&&e.height===0||isAndroid()&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function isSafari(){return/apple/i.test(navigator.vendor)}function isAndroid(){const e=/android/i;return e.test(getPlatform())||e.test(getUserAgent())}function isMac(){return getPlatform().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function isJSDOM(){return getUserAgent().includes("jsdom/")}function isMouseLikePointerType(e,t){const i=["mouse","pen"];return i.push("",void 0),i.includes(e)}function isReactEvent(e){return"nativeEvent"in e}function isRootElement(e){return e.matches("html,body")}function getDocument(e){return(e==null?void 0:e.ownerDocument)||document}function isEventTargetWithin(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const i=e;return i.target!=null&&t.contains(i.target)}function getTarget(e){return"composedPath"in e?e.composedPath()[0]:e.target}const TYPEABLE_SELECTOR="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function isTypeableElement(e){return isHTMLElement(e)&&e.matches(TYPEABLE_SELECTOR)}const sides=["top","right","bottom","left"],min=Math.min,max=Math.max,round$1=Math.round,floor=Math.floor,createCoords=e=>({x:e,y:e}),oppositeSideMap={left:"right",right:"left",bottom:"top",top:"bottom"},oppositeAlignmentMap={start:"end",end:"start"};function clamp$3(e,t,i){return max(e,min(t,i))}function evaluate(e,t){return typeof e=="function"?e(t):e}function getSide(e){return e.split("-")[0]}function getAlignment(e){return e.split("-")[1]}function getOppositeAxis(e){return e==="x"?"y":"x"}function getAxisLength(e){return e==="y"?"height":"width"}function getSideAxis(e){return["top","bottom"].includes(getSide(e))?"y":"x"}function getAlignmentAxis(e){return getOppositeAxis(getSideAxis(e))}function getAlignmentSides(e,t,i){i===void 0&&(i=!1);const a=getAlignment(e),o=getAlignmentAxis(e),l=getAxisLength(o);let u=o==="x"?a===(i?"end":"start")?"right":"left":a==="start"?"bottom":"top";return t.reference[l]>t.floating[l]&&(u=getOppositePlacement(u)),[u,getOppositePlacement(u)]}function getExpandedPlacements(e){const t=getOppositePlacement(e);return[getOppositeAlignmentPlacement(e),t,getOppositeAlignmentPlacement(t)]}function getOppositeAlignmentPlacement(e){return e.replace(/start|end/g,t=>oppositeAlignmentMap[t])}function getSideList(e,t,i){const a=["left","right"],o=["right","left"],l=["top","bottom"],u=["bottom","top"];switch(e){case"top":case"bottom":return i?t?o:a:t?a:o;case"left":case"right":return t?l:u;default:return[]}}function getOppositeAxisPlacements(e,t,i,a){const o=getAlignment(e);let l=getSideList(getSide(e),i==="start",a);return o&&(l=l.map(u=>u+"-"+o),t&&(l=l.concat(l.map(getOppositeAlignmentPlacement)))),l}function getOppositePlacement(e){return e.replace(/left|right|bottom|top/g,t=>oppositeSideMap[t])}function expandPaddingObject(e){return{top:0,right:0,bottom:0,left:0,...e}}function getPaddingObject(e){return typeof e!="number"?expandPaddingObject(e):{top:e,right:e,bottom:e,left:e}}function rectToClientRect(e){const{x:t,y:i,width:a,height:o}=e;return{width:a,height:o,top:i,left:t,right:t+a,bottom:i+o,x:t,y:i}}function computeCoordsFromPlacement(e,t,i){let{reference:a,floating:o}=e;const l=getSideAxis(t),u=getAlignmentAxis(t),f=getAxisLength(u),h=getSide(t),p=l==="y",m=a.x+a.width/2-o.width/2,g=a.y+a.height/2-o.height/2,b=a[f]/2-o[f]/2;let x;switch(h){case"top":x={x:m,y:a.y-o.height};break;case"bottom":x={x:m,y:a.y+a.height};break;case"right":x={x:a.x+a.width,y:g};break;case"left":x={x:a.x-o.width,y:g};break;default:x={x:a.x,y:a.y}}switch(getAlignment(t)){case"start":x[u]-=b*(i&&p?-1:1);break;case"end":x[u]+=b*(i&&p?-1:1);break}return x}const computePosition$1=async(e,t,i)=>{const{placement:a="bottom",strategy:o="absolute",middleware:l=[],platform:u}=i,f=l.filter(Boolean),h=await(u.isRTL==null?void 0:u.isRTL(t));let p=await u.getElementRects({reference:e,floating:t,strategy:o}),{x:m,y:g}=computeCoordsFromPlacement(p,a,h),b=a,x={},y=0;for(let S=0;S<f.length;S++){const{name:E,fn:w}=f[S],{x:_,y:O,data:k,reset:A}=await w({x:m,y:g,initialPlacement:a,placement:b,strategy:o,middlewareData:x,rects:p,platform:u,elements:{reference:e,floating:t}});m=_??m,g=O??g,x={...x,[E]:{...x[E],...k}},A&&y<=50&&(y++,typeof A=="object"&&(A.placement&&(b=A.placement),A.rects&&(p=A.rects===!0?await u.getElementRects({reference:e,floating:t,strategy:o}):A.rects),{x:m,y:g}=computeCoordsFromPlacement(p,b,h)),S=-1)}return{x:m,y:g,placement:b,strategy:o,middlewareData:x}};async function detectOverflow(e,t){var i;t===void 0&&(t={});const{x:a,y:o,platform:l,rects:u,elements:f,strategy:h}=e,{boundary:p="clippingAncestors",rootBoundary:m="viewport",elementContext:g="floating",altBoundary:b=!1,padding:x=0}=evaluate(t,e),y=getPaddingObject(x),E=f[b?g==="floating"?"reference":"floating":g],w=rectToClientRect(await l.getClippingRect({element:(i=await(l.isElement==null?void 0:l.isElement(E)))==null||i?E:E.contextElement||await(l.getDocumentElement==null?void 0:l.getDocumentElement(f.floating)),boundary:p,rootBoundary:m,strategy:h})),_=g==="floating"?{x:a,y:o,width:u.floating.width,height:u.floating.height}:u.reference,O=await(l.getOffsetParent==null?void 0:l.getOffsetParent(f.floating)),k=await(l.isElement==null?void 0:l.isElement(O))?await(l.getScale==null?void 0:l.getScale(O))||{x:1,y:1}:{x:1,y:1},A=rectToClientRect(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:f,rect:_,offsetParent:O,strategy:h}):_);return{top:(w.top-A.top+y.top)/k.y,bottom:(A.bottom-w.bottom+y.bottom)/k.y,left:(w.left-A.left+y.left)/k.x,right:(A.right-w.right+y.right)/k.x}}const arrow$3=e=>({name:"arrow",options:e,async fn(t){const{x:i,y:a,placement:o,rects:l,platform:u,elements:f,middlewareData:h}=t,{element:p,padding:m=0}=evaluate(e,t)||{};if(p==null)return{};const g=getPaddingObject(m),b={x:i,y:a},x=getAlignmentAxis(o),y=getAxisLength(x),S=await u.getDimensions(p),E=x==="y",w=E?"top":"left",_=E?"bottom":"right",O=E?"clientHeight":"clientWidth",k=l.reference[y]+l.reference[x]-b[x]-l.floating[y],A=b[x]-l.reference[x],D=await(u.getOffsetParent==null?void 0:u.getOffsetParent(p));let R=D?D[O]:0;(!R||!await(u.isElement==null?void 0:u.isElement(D)))&&(R=f.floating[O]||l.floating[y]);const T=k/2-A/2,j=R/2-S[y]/2-1,P=min(g[w],j),M=min(g[_],j),I=P,G=R-S[y]-M,ne=R/2-S[y]/2+T,Q=clamp$3(I,ne,G),B=!h.arrow&&getAlignment(o)!=null&&ne!==Q&&l.reference[y]/2-(ne<I?P:M)-S[y]/2<0,H=B?ne<I?ne-I:ne-G:0;return{[x]:b[x]+H,data:{[x]:Q,centerOffset:ne-Q-H,...B&&{alignmentOffset:H}},reset:B}}}),flip$2=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var i,a;const{placement:o,middlewareData:l,rects:u,initialPlacement:f,platform:h,elements:p}=t,{mainAxis:m=!0,crossAxis:g=!0,fallbackPlacements:b,fallbackStrategy:x="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:S=!0,...E}=evaluate(e,t);if((i=l.arrow)!=null&&i.alignmentOffset)return{};const w=getSide(o),_=getSideAxis(f),O=getSide(f)===f,k=await(h.isRTL==null?void 0:h.isRTL(p.floating)),A=b||(O||!S?[getOppositePlacement(f)]:getExpandedPlacements(f)),D=y!=="none";!b&&D&&A.push(...getOppositeAxisPlacements(f,S,y,k));const R=[f,...A],T=await detectOverflow(t,E),j=[];let P=((a=l.flip)==null?void 0:a.overflows)||[];if(m&&j.push(T[w]),g){const Q=getAlignmentSides(o,u,k);j.push(T[Q[0]],T[Q[1]])}if(P=[...P,{placement:o,overflows:j}],!j.every(Q=>Q<=0)){var M,I;const Q=(((M=l.flip)==null?void 0:M.index)||0)+1,B=R[Q];if(B){var G;const Y=g==="alignment"?_!==getSideAxis(B):!1,U=((G=P[0])==null?void 0:G.overflows[0])>0;if(!Y||U)return{data:{index:Q,overflows:P},reset:{placement:B}}}let H=(I=P.filter(Y=>Y.overflows[0]<=0).sort((Y,U)=>Y.overflows[1]-U.overflows[1])[0])==null?void 0:I.placement;if(!H)switch(x){case"bestFit":{var ne;const Y=(ne=P.filter(U=>{if(D){const F=getSideAxis(U.placement);return F===_||F==="y"}return!0}).map(U=>[U.placement,U.overflows.filter(F=>F>0).reduce((F,X)=>F+X,0)]).sort((U,F)=>U[1]-F[1])[0])==null?void 0:ne[0];Y&&(H=Y);break}case"initialPlacement":H=f;break}if(o!==H)return{reset:{placement:H}}}return{}}}};function getSideOffsets(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function isAnySideFullyClipped(e){return sides.some(t=>e[t]>=0)}const hide$2=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:i}=t,{strategy:a="referenceHidden",...o}=evaluate(e,t);switch(a){case"referenceHidden":{const l=await detectOverflow(t,{...o,elementContext:"reference"}),u=getSideOffsets(l,i.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:isAnySideFullyClipped(u)}}}case"escaped":{const l=await detectOverflow(t,{...o,altBoundary:!0}),u=getSideOffsets(l,i.floating);return{data:{escapedOffsets:u,escaped:isAnySideFullyClipped(u)}}}default:return{}}}}};function getBoundingRect(e){const t=min(...e.map(l=>l.left)),i=min(...e.map(l=>l.top)),a=max(...e.map(l=>l.right)),o=max(...e.map(l=>l.bottom));return{x:t,y:i,width:a-t,height:o-i}}function getRectsByLine(e){const t=e.slice().sort((o,l)=>o.y-l.y),i=[];let a=null;for(let o=0;o<t.length;o++){const l=t[o];!a||l.y-a.y>a.height/2?i.push([l]):i[i.length-1].push(l),a=l}return i.map(o=>rectToClientRect(getBoundingRect(o)))}const inline$2=function(e){return e===void 0&&(e={}),{name:"inline",options:e,async fn(t){const{placement:i,elements:a,rects:o,platform:l,strategy:u}=t,{padding:f=2,x:h,y:p}=evaluate(e,t),m=Array.from(await(l.getClientRects==null?void 0:l.getClientRects(a.reference))||[]),g=getRectsByLine(m),b=rectToClientRect(getBoundingRect(m)),x=getPaddingObject(f);function y(){if(g.length===2&&g[0].left>g[1].right&&h!=null&&p!=null)return g.find(E=>h>E.left-x.left&&h<E.right+x.right&&p>E.top-x.top&&p<E.bottom+x.bottom)||b;if(g.length>=2){if(getSideAxis(i)==="y"){const P=g[0],M=g[g.length-1],I=getSide(i)==="top",G=P.top,ne=M.bottom,Q=I?P.left:M.left,B=I?P.right:M.right,H=B-Q,Y=ne-G;return{top:G,bottom:ne,left:Q,right:B,width:H,height:Y,x:Q,y:G}}const E=getSide(i)==="left",w=max(...g.map(P=>P.right)),_=min(...g.map(P=>P.left)),O=g.filter(P=>E?P.left===_:P.right===w),k=O[0].top,A=O[O.length-1].bottom,D=_,R=w,T=R-D,j=A-k;return{top:k,bottom:A,left:D,right:R,width:T,height:j,x:D,y:k}}return b}const S=await l.getElementRects({reference:{getBoundingClientRect:y},floating:a.floating,strategy:u});return o.reference.x!==S.reference.x||o.reference.y!==S.reference.y||o.reference.width!==S.reference.width||o.reference.height!==S.reference.height?{reset:{rects:S}}:{}}}};async function convertValueToCoords(e,t){const{placement:i,platform:a,elements:o}=e,l=await(a.isRTL==null?void 0:a.isRTL(o.floating)),u=getSide(i),f=getAlignment(i),h=getSideAxis(i)==="y",p=["left","top"].includes(u)?-1:1,m=l&&h?-1:1,g=evaluate(t,e);let{mainAxis:b,crossAxis:x,alignmentAxis:y}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return f&&typeof y=="number"&&(x=f==="end"?y*-1:y),h?{x:x*m,y:b*p}:{x:b*p,y:x*m}}const offset$2=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var i,a;const{x:o,y:l,placement:u,middlewareData:f}=t,h=await convertValueToCoords(t,e);return u===((i=f.offset)==null?void 0:i.placement)&&(a=f.arrow)!=null&&a.alignmentOffset?{}:{x:o+h.x,y:l+h.y,data:{...h,placement:u}}}}},shift$2=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:i,y:a,placement:o}=t,{mainAxis:l=!0,crossAxis:u=!1,limiter:f={fn:E=>{let{x:w,y:_}=E;return{x:w,y:_}}},...h}=evaluate(e,t),p={x:i,y:a},m=await detectOverflow(t,h),g=getSideAxis(getSide(o)),b=getOppositeAxis(g);let x=p[b],y=p[g];if(l){const E=b==="y"?"top":"left",w=b==="y"?"bottom":"right",_=x+m[E],O=x-m[w];x=clamp$3(_,x,O)}if(u){const E=g==="y"?"top":"left",w=g==="y"?"bottom":"right",_=y+m[E],O=y-m[w];y=clamp$3(_,y,O)}const S=f.fn({...t,[b]:x,[g]:y});return{...S,data:{x:S.x-i,y:S.y-a,enabled:{[b]:l,[g]:u}}}}}},limitShift$2=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:i,y:a,placement:o,rects:l,middlewareData:u}=t,{offset:f=0,mainAxis:h=!0,crossAxis:p=!0}=evaluate(e,t),m={x:i,y:a},g=getSideAxis(o),b=getOppositeAxis(g);let x=m[b],y=m[g];const S=evaluate(f,t),E=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(h){const O=b==="y"?"height":"width",k=l.reference[b]-l.floating[O]+E.mainAxis,A=l.reference[b]+l.reference[O]-E.mainAxis;x<k?x=k:x>A&&(x=A)}if(p){var w,_;const O=b==="y"?"width":"height",k=["top","left"].includes(getSide(o)),A=l.reference[g]-l.floating[O]+(k&&((w=u.offset)==null?void 0:w[g])||0)+(k?0:E.crossAxis),D=l.reference[g]+l.reference[O]+(k?0:((_=u.offset)==null?void 0:_[g])||0)-(k?E.crossAxis:0);y<A?y=A:y>D&&(y=D)}return{[b]:x,[g]:y}}}},size$2=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var i,a;const{placement:o,rects:l,platform:u,elements:f}=t,{apply:h=()=>{},...p}=evaluate(e,t),m=await detectOverflow(t,p),g=getSide(o),b=getAlignment(o),x=getSideAxis(o)==="y",{width:y,height:S}=l.floating;let E,w;g==="top"||g==="bottom"?(E=g,w=b===(await(u.isRTL==null?void 0:u.isRTL(f.floating))?"start":"end")?"left":"right"):(w=g,E=b==="end"?"top":"bottom");const _=S-m.top-m.bottom,O=y-m.left-m.right,k=min(S-m[E],_),A=min(y-m[w],O),D=!t.middlewareData.shift;let R=k,T=A;if((i=t.middlewareData.shift)!=null&&i.enabled.x&&(T=O),(a=t.middlewareData.shift)!=null&&a.enabled.y&&(R=_),D&&!b){const P=max(m.left,0),M=max(m.right,0),I=max(m.top,0),G=max(m.bottom,0);x?T=y-2*(P!==0||M!==0?P+M:max(m.left,m.right)):R=S-2*(I!==0||G!==0?I+G:max(m.top,m.bottom))}await h({...t,availableWidth:T,availableHeight:R});const j=await u.getDimensions(f.floating);return y!==j.width||S!==j.height?{reset:{rects:!0}}:{}}}};function getCssDimensions(e){const t=getComputedStyle$1(e);let i=parseFloat(t.width)||0,a=parseFloat(t.height)||0;const o=isHTMLElement(e),l=o?e.offsetWidth:i,u=o?e.offsetHeight:a,f=round$1(i)!==l||round$1(a)!==u;return f&&(i=l,a=u),{width:i,height:a,$:f}}function unwrapElement(e){return isElement(e)?e:e.contextElement}function getScale(e){const t=unwrapElement(e);if(!isHTMLElement(t))return createCoords(1);const i=t.getBoundingClientRect(),{width:a,height:o,$:l}=getCssDimensions(t);let u=(l?round$1(i.width):i.width)/a,f=(l?round$1(i.height):i.height)/o;return(!u||!Number.isFinite(u))&&(u=1),(!f||!Number.isFinite(f))&&(f=1),{x:u,y:f}}const noOffsets=createCoords(0);function getVisualOffsets(e){const t=getWindow(e);return!isWebKit()||!t.visualViewport?noOffsets:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function shouldAddVisualOffsets(e,t,i){return t===void 0&&(t=!1),!i||t&&i!==getWindow(e)?!1:t}function getBoundingClientRect(e,t,i,a){t===void 0&&(t=!1),i===void 0&&(i=!1);const o=e.getBoundingClientRect(),l=unwrapElement(e);let u=createCoords(1);t&&(a?isElement(a)&&(u=getScale(a)):u=getScale(e));const f=shouldAddVisualOffsets(l,i,a)?getVisualOffsets(l):createCoords(0);let h=(o.left+f.x)/u.x,p=(o.top+f.y)/u.y,m=o.width/u.x,g=o.height/u.y;if(l){const b=getWindow(l),x=a&&isElement(a)?getWindow(a):a;let y=b,S=getFrameElement(y);for(;S&&a&&x!==y;){const E=getScale(S),w=S.getBoundingClientRect(),_=getComputedStyle$1(S),O=w.left+(S.clientLeft+parseFloat(_.paddingLeft))*E.x,k=w.top+(S.clientTop+parseFloat(_.paddingTop))*E.y;h*=E.x,p*=E.y,m*=E.x,g*=E.y,h+=O,p+=k,y=getWindow(S),S=getFrameElement(y)}}return rectToClientRect({width:m,height:g,x:h,y:p})}function getWindowScrollBarX(e,t){const i=getNodeScroll(e).scrollLeft;return t?t.left+i:getBoundingClientRect(getDocumentElement(e)).left+i}function getHTMLOffset(e,t,i){i===void 0&&(i=!1);const a=e.getBoundingClientRect(),o=a.left+t.scrollLeft-(i?0:getWindowScrollBarX(e,a)),l=a.top+t.scrollTop;return{x:o,y:l}}function convertOffsetParentRelativeRectToViewportRelativeRect(e){let{elements:t,rect:i,offsetParent:a,strategy:o}=e;const l=o==="fixed",u=getDocumentElement(a),f=t?isTopLayer(t.floating):!1;if(a===u||f&&l)return i;let h={scrollLeft:0,scrollTop:0},p=createCoords(1);const m=createCoords(0),g=isHTMLElement(a);if((g||!g&&!l)&&((getNodeName(a)!=="body"||isOverflowElement(u))&&(h=getNodeScroll(a)),isHTMLElement(a))){const x=getBoundingClientRect(a);p=getScale(a),m.x=x.x+a.clientLeft,m.y=x.y+a.clientTop}const b=u&&!g&&!l?getHTMLOffset(u,h,!0):createCoords(0);return{width:i.width*p.x,height:i.height*p.y,x:i.x*p.x-h.scrollLeft*p.x+m.x+b.x,y:i.y*p.y-h.scrollTop*p.y+m.y+b.y}}function getClientRects(e){return Array.from(e.getClientRects())}function getDocumentRect(e){const t=getDocumentElement(e),i=getNodeScroll(e),a=e.ownerDocument.body,o=max(t.scrollWidth,t.clientWidth,a.scrollWidth,a.clientWidth),l=max(t.scrollHeight,t.clientHeight,a.scrollHeight,a.clientHeight);let u=-i.scrollLeft+getWindowScrollBarX(e);const f=-i.scrollTop;return getComputedStyle$1(a).direction==="rtl"&&(u+=max(t.clientWidth,a.clientWidth)-o),{width:o,height:l,x:u,y:f}}function getViewportRect(e,t){const i=getWindow(e),a=getDocumentElement(e),o=i.visualViewport;let l=a.clientWidth,u=a.clientHeight,f=0,h=0;if(o){l=o.width,u=o.height;const p=isWebKit();(!p||p&&t==="fixed")&&(f=o.offsetLeft,h=o.offsetTop)}return{width:l,height:u,x:f,y:h}}function getInnerBoundingClientRect(e,t){const i=getBoundingClientRect(e,!0,t==="fixed"),a=i.top+e.clientTop,o=i.left+e.clientLeft,l=isHTMLElement(e)?getScale(e):createCoords(1),u=e.clientWidth*l.x,f=e.clientHeight*l.y,h=o*l.x,p=a*l.y;return{width:u,height:f,x:h,y:p}}function getClientRectFromClippingAncestor(e,t,i){let a;if(t==="viewport")a=getViewportRect(e,i);else if(t==="document")a=getDocumentRect(getDocumentElement(e));else if(isElement(t))a=getInnerBoundingClientRect(t,i);else{const o=getVisualOffsets(e);a={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return rectToClientRect(a)}function hasFixedPositionAncestor(e,t){const i=getParentNode(e);return i===t||!isElement(i)||isLastTraversableNode(i)?!1:getComputedStyle$1(i).position==="fixed"||hasFixedPositionAncestor(i,t)}function getClippingElementAncestors(e,t){const i=t.get(e);if(i)return i;let a=getOverflowAncestors(e,[],!1).filter(f=>isElement(f)&&getNodeName(f)!=="body"),o=null;const l=getComputedStyle$1(e).position==="fixed";let u=l?getParentNode(e):e;for(;isElement(u)&&!isLastTraversableNode(u);){const f=getComputedStyle$1(u),h=isContainingBlock(u);!h&&f.position==="fixed"&&(o=null),(l?!h&&!o:!h&&f.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||isOverflowElement(u)&&!h&&hasFixedPositionAncestor(e,u))?a=a.filter(m=>m!==u):o=f,u=getParentNode(u)}return t.set(e,a),a}function getClippingRect(e){let{element:t,boundary:i,rootBoundary:a,strategy:o}=e;const u=[...i==="clippingAncestors"?isTopLayer(t)?[]:getClippingElementAncestors(t,this._c):[].concat(i),a],f=u[0],h=u.reduce((p,m)=>{const g=getClientRectFromClippingAncestor(t,m,o);return p.top=max(g.top,p.top),p.right=min(g.right,p.right),p.bottom=min(g.bottom,p.bottom),p.left=max(g.left,p.left),p},getClientRectFromClippingAncestor(t,f,o));return{width:h.right-h.left,height:h.bottom-h.top,x:h.left,y:h.top}}function getDimensions(e){const{width:t,height:i}=getCssDimensions(e);return{width:t,height:i}}function getRectRelativeToOffsetParent(e,t,i){const a=isHTMLElement(t),o=getDocumentElement(t),l=i==="fixed",u=getBoundingClientRect(e,!0,l,t);let f={scrollLeft:0,scrollTop:0};const h=createCoords(0);function p(){h.x=getWindowScrollBarX(o)}if(a||!a&&!l)if((getNodeName(t)!=="body"||isOverflowElement(o))&&(f=getNodeScroll(t)),a){const x=getBoundingClientRect(t,!0,l,t);h.x=x.x+t.clientLeft,h.y=x.y+t.clientTop}else o&&p();l&&!a&&o&&p();const m=o&&!a&&!l?getHTMLOffset(o,f):createCoords(0),g=u.left+f.scrollLeft-h.x-m.x,b=u.top+f.scrollTop-h.y-m.y;return{x:g,y:b,width:u.width,height:u.height}}function isStaticPositioned(e){return getComputedStyle$1(e).position==="static"}function getTrueOffsetParent(e,t){if(!isHTMLElement(e)||getComputedStyle$1(e).position==="fixed")return null;if(t)return t(e);let i=e.offsetParent;return getDocumentElement(e)===i&&(i=i.ownerDocument.body),i}function getOffsetParent(e,t){const i=getWindow(e);if(isTopLayer(e))return i;if(!isHTMLElement(e)){let o=getParentNode(e);for(;o&&!isLastTraversableNode(o);){if(isElement(o)&&!isStaticPositioned(o))return o;o=getParentNode(o)}return i}let a=getTrueOffsetParent(e,t);for(;a&&isTableElement(a)&&isStaticPositioned(a);)a=getTrueOffsetParent(a,t);return a&&isLastTraversableNode(a)&&isStaticPositioned(a)&&!isContainingBlock(a)?i:a||getContainingBlock(e)||i}const getElementRects=async function(e){const t=this.getOffsetParent||getOffsetParent,i=this.getDimensions,a=await i(e.floating);return{reference:getRectRelativeToOffsetParent(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:a.width,height:a.height}}};function isRTL(e){return getComputedStyle$1(e).direction==="rtl"}const platform$2={convertOffsetParentRelativeRectToViewportRelativeRect,getDocumentElement,getClippingRect,getOffsetParent,getElementRects,getClientRects,getDimensions,getScale,isElement,isRTL};function rectsAreEqual(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function observeMove(e,t){let i=null,a;const o=getDocumentElement(e);function l(){var f;clearTimeout(a),(f=i)==null||f.disconnect(),i=null}function u(f,h){f===void 0&&(f=!1),h===void 0&&(h=1),l();const p=e.getBoundingClientRect(),{left:m,top:g,width:b,height:x}=p;if(f||t(),!b||!x)return;const y=floor(g),S=floor(o.clientWidth-(m+b)),E=floor(o.clientHeight-(g+x)),w=floor(m),O={rootMargin:-y+"px "+-S+"px "+-E+"px "+-w+"px",threshold:max(0,min(1,h))||1};let k=!0;function A(D){const R=D[0].intersectionRatio;if(R!==h){if(!k)return u();R?u(!1,R):a=setTimeout(()=>{u(!1,1e-7)},1e3)}R===1&&!rectsAreEqual(p,e.getBoundingClientRect())&&u(),k=!1}try{i=new IntersectionObserver(A,{...O,root:o.ownerDocument})}catch{i=new IntersectionObserver(A,O)}i.observe(e)}return u(!0),l}function autoUpdate(e,t,i,a){a===void 0&&(a={});const{ancestorScroll:o=!0,ancestorResize:l=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:f=typeof IntersectionObserver=="function",animationFrame:h=!1}=a,p=unwrapElement(e),m=o||l?[...p?getOverflowAncestors(p):[],...getOverflowAncestors(t)]:[];m.forEach(w=>{o&&w.addEventListener("scroll",i,{passive:!0}),l&&w.addEventListener("resize",i)});const g=p&&f?observeMove(p,i):null;let b=-1,x=null;u&&(x=new ResizeObserver(w=>{let[_]=w;_&&_.target===p&&x&&(x.unobserve(t),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var O;(O=x)==null||O.observe(t)})),i()}),p&&!h&&x.observe(p),x.observe(t));let y,S=h?getBoundingClientRect(e):null;h&&E();function E(){const w=getBoundingClientRect(e);S&&!rectsAreEqual(S,w)&&i(),S=w,y=requestAnimationFrame(E)}return i(),()=>{var w;m.forEach(_=>{o&&_.removeEventListener("scroll",i),l&&_.removeEventListener("resize",i)}),g==null||g(),(w=x)==null||w.disconnect(),x=null,h&&cancelAnimationFrame(y)}}const offset$1=offset$2,shift$1=shift$2,flip$1=flip$2,size$1=size$2,hide$1=hide$2,arrow$2=arrow$3,inline$1=inline$2,limitShift$1=limitShift$2,computePosition=(e,t,i)=>{const a=new Map,o={platform:platform$2,...i},l={...o.platform,_c:a};return computePosition$1(e,t,{...o,platform:l})};var index$1=typeof document<"u"?reactExports.useLayoutEffect:reactExports.useEffect;function deepEqual(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let i,a,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(i=e.length,i!==t.length)return!1;for(a=i;a--!==0;)if(!deepEqual(e[a],t[a]))return!1;return!0}if(o=Object.keys(e),i=o.length,i!==Object.keys(t).length)return!1;for(a=i;a--!==0;)if(!{}.hasOwnProperty.call(t,o[a]))return!1;for(a=i;a--!==0;){const l=o[a];if(!(l==="_owner"&&e.$$typeof)&&!deepEqual(e[l],t[l]))return!1}return!0}return e!==e&&t!==t}function getDPR(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function roundByDPR(e,t){const i=getDPR(e);return Math.round(t*i)/i}function useLatestRef$1(e){const t=reactExports.useRef(e);return index$1(()=>{t.current=e}),t}function useFloating$1(e){e===void 0&&(e={});const{placement:t="bottom",strategy:i="absolute",middleware:a=[],platform:o,elements:{reference:l,floating:u}={},transform:f=!0,whileElementsMounted:h,open:p}=e,[m,g]=reactExports.useState({x:0,y:0,strategy:i,placement:t,middlewareData:{},isPositioned:!1}),[b,x]=reactExports.useState(a);deepEqual(b,a)||x(a);const[y,S]=reactExports.useState(null),[E,w]=reactExports.useState(null),_=reactExports.useCallback(Y=>{Y!==D.current&&(D.current=Y,S(Y))},[]),O=reactExports.useCallback(Y=>{Y!==R.current&&(R.current=Y,w(Y))},[]),k=l||y,A=u||E,D=reactExports.useRef(null),R=reactExports.useRef(null),T=reactExports.useRef(m),j=h!=null,P=useLatestRef$1(h),M=useLatestRef$1(o),I=useLatestRef$1(p),G=reactExports.useCallback(()=>{if(!D.current||!R.current)return;const Y={placement:t,strategy:i,middleware:b};M.current&&(Y.platform=M.current),computePosition(D.current,R.current,Y).then(U=>{const F={...U,isPositioned:I.current!==!1};ne.current&&!deepEqual(T.current,F)&&(T.current=F,reactDomExports.flushSync(()=>{g(F)}))})},[b,t,i,M,I]);index$1(()=>{p===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,g(Y=>({...Y,isPositioned:!1})))},[p]);const ne=reactExports.useRef(!1);index$1(()=>(ne.current=!0,()=>{ne.current=!1}),[]),index$1(()=>{if(k&&(D.current=k),A&&(R.current=A),k&&A){if(P.current)return P.current(k,A,G);G()}},[k,A,G,P,j]);const Q=reactExports.useMemo(()=>({reference:D,floating:R,setReference:_,setFloating:O}),[_,O]),B=reactExports.useMemo(()=>({reference:k,floating:A}),[k,A]),H=reactExports.useMemo(()=>{const Y={position:i,left:0,top:0};if(!B.floating)return Y;const U=roundByDPR(B.floating,m.x),F=roundByDPR(B.floating,m.y);return f?{...Y,transform:"translate("+U+"px, "+F+"px)",...getDPR(B.floating)>=1.5&&{willChange:"transform"}}:{position:i,left:U,top:F}},[i,f,B.floating,m.x,m.y]);return reactExports.useMemo(()=>({...m,update:G,refs:Q,elements:B,floatingStyles:H}),[m,G,Q,B,H])}const arrow$1=e=>{function t(i){return{}.hasOwnProperty.call(i,"current")}return{name:"arrow",options:e,fn(i){const{element:a,padding:o}=typeof e=="function"?e(i):e;return a&&t(a)?a.current!=null?arrow$2({element:a.current,padding:o}).fn(i):{}:a?arrow$2({element:a,padding:o}).fn(i):{}}}},offset=(e,t)=>({...offset$1(e),options:[e,t]}),shift=(e,t)=>({...shift$1(e),options:[e,t]}),limitShift=(e,t)=>({...limitShift$1(e),options:[e,t]}),flip=(e,t)=>({...flip$1(e),options:[e,t]}),size=(e,t)=>({...size$1(e),options:[e,t]}),hide=(e,t)=>({...hide$1(e),options:[e,t]}),inline=(e,t)=>({...inline$1(e),options:[e,t]}),arrow=(e,t)=>({...arrow$1(e),options:[e,t]});function useMergeRefs(e){return reactExports.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(i=>{typeof i=="function"?i(t):i!=null&&(i.current=t)})},e)}const SafeReact={...React$1},useInsertionEffect$1=SafeReact.useInsertionEffect,useSafeInsertionEffect=useInsertionEffect$1||(e=>e());function useEffectEvent(e){const t=reactExports.useRef(()=>{});return useSafeInsertionEffect(()=>{t.current=e}),reactExports.useCallback(function(){for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return t.current==null?void 0:t.current(...a)},[])}var index=typeof document<"u"?reactExports.useLayoutEffect:reactExports.useEffect;let serverHandoffComplete=!1,count=0;const genId=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+count++;function useFloatingId(){const[e,t]=reactExports.useState(()=>serverHandoffComplete?genId():void 0);return index(()=>{e==null&&t(genId())},[]),reactExports.useEffect(()=>{serverHandoffComplete=!0},[]),e}const useReactId=SafeReact.useId,useId=useReactId||useFloatingId;function createPubSub(){const e=new Map;return{emit(t,i){var a;(a=e.get(t))==null||a.forEach(o=>o(i))},on(t,i){e.set(t,[...e.get(t)||[],i])},off(t,i){var a;e.set(t,((a=e.get(t))==null?void 0:a.filter(o=>o!==i))||[])}}}const FloatingNodeContext=reactExports.createContext(null),FloatingTreeContext=reactExports.createContext(null),useFloatingParentNodeId=()=>{var e;return((e=reactExports.useContext(FloatingNodeContext))==null?void 0:e.id)||null},useFloatingTree=()=>reactExports.useContext(FloatingTreeContext);function createAttribute(e){return"data-floating-ui-"+e}function useLatestRef(e){const t=reactExports.useRef(e);return index(()=>{t.current=e}),t}const safePolygonIdentifier=createAttribute("safe-polygon");function getDelay(e,t,i){return i&&!isMouseLikePointerType(i)?0:typeof e=="number"?e:e==null?void 0:e[t]}function useHover(e,t){t===void 0&&(t={});const{open:i,onOpenChange:a,dataRef:o,events:l,elements:u}=e,{enabled:f=!0,delay:h=0,handleClose:p=null,mouseOnly:m=!1,restMs:g=0,move:b=!0}=t,x=useFloatingTree(),y=useFloatingParentNodeId(),S=useLatestRef(p),E=useLatestRef(h),w=useLatestRef(i),_=reactExports.useRef(),O=reactExports.useRef(-1),k=reactExports.useRef(),A=reactExports.useRef(-1),D=reactExports.useRef(!0),R=reactExports.useRef(!1),T=reactExports.useRef(()=>{}),j=reactExports.useRef(!1),P=reactExports.useCallback(()=>{var H;const Y=(H=o.current.openEvent)==null?void 0:H.type;return(Y==null?void 0:Y.includes("mouse"))&&Y!=="mousedown"},[o]);reactExports.useEffect(()=>{if(!f)return;function H(Y){let{open:U}=Y;U||(clearTimeout(O.current),clearTimeout(A.current),D.current=!0,j.current=!1)}return l.on("openchange",H),()=>{l.off("openchange",H)}},[f,l]),reactExports.useEffect(()=>{if(!f||!S.current||!i)return;function H(U){P()&&a(!1,U,"hover")}const Y=getDocument(u.floating).documentElement;return Y.addEventListener("mouseleave",H),()=>{Y.removeEventListener("mouseleave",H)}},[u.floating,i,a,f,S,P]);const M=reactExports.useCallback(function(H,Y,U){Y===void 0&&(Y=!0),U===void 0&&(U="hover");const F=getDelay(E.current,"close",_.current);F&&!k.current?(clearTimeout(O.current),O.current=window.setTimeout(()=>a(!1,H,U),F)):Y&&(clearTimeout(O.current),a(!1,H,U))},[E,a]),I=useEffectEvent(()=>{T.current(),k.current=void 0}),G=useEffectEvent(()=>{if(R.current){const H=getDocument(u.floating).body;H.style.pointerEvents="",H.removeAttribute(safePolygonIdentifier),R.current=!1}}),ne=useEffectEvent(()=>o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1);reactExports.useEffect(()=>{if(!f)return;function H(X){if(clearTimeout(O.current),D.current=!1,m&&!isMouseLikePointerType(_.current)||g>0&&!getDelay(E.current,"open"))return;const z=getDelay(E.current,"open",_.current);z?O.current=window.setTimeout(()=>{w.current||a(!0,X,"hover")},z):i||a(!0,X,"hover")}function Y(X){if(ne())return;T.current();const z=getDocument(u.floating);if(clearTimeout(A.current),j.current=!1,S.current&&o.current.floatingContext){i||clearTimeout(O.current),k.current=S.current({...o.current.floatingContext,tree:x,x:X.clientX,y:X.clientY,onClose(){G(),I(),ne()||M(X,!0,"safe-polygon")}});const $=k.current;z.addEventListener("mousemove",$),T.current=()=>{z.removeEventListener("mousemove",$)};return}(_.current==="touch"?!contains(u.floating,X.relatedTarget):!0)&&M(X)}function U(X){ne()||o.current.floatingContext&&(S.current==null||S.current({...o.current.floatingContext,tree:x,x:X.clientX,y:X.clientY,onClose(){G(),I(),ne()||M(X)}})(X))}if(isElement(u.domReference)){var F;const X=u.domReference;return i&&X.addEventListener("mouseleave",U),(F=u.floating)==null||F.addEventListener("mouseleave",U),b&&X.addEventListener("mousemove",H,{once:!0}),X.addEventListener("mouseenter",H),X.addEventListener("mouseleave",Y),()=>{var z;i&&X.removeEventListener("mouseleave",U),(z=u.floating)==null||z.removeEventListener("mouseleave",U),b&&X.removeEventListener("mousemove",H),X.removeEventListener("mouseenter",H),X.removeEventListener("mouseleave",Y)}}},[u,f,e,m,g,b,M,I,G,a,i,w,x,E,S,o,ne]),index(()=>{var H;if(f&&i&&(H=S.current)!=null&&H.__options.blockPointerEvents&&P()){R.current=!0;const U=u.floating;if(isElement(u.domReference)&&U){var Y;const F=getDocument(u.floating).body;F.setAttribute(safePolygonIdentifier,"");const X=u.domReference,z=x==null||(Y=x.nodesRef.current.find(L=>L.id===y))==null||(Y=Y.context)==null?void 0:Y.elements.floating;return z&&(z.style.pointerEvents=""),F.style.pointerEvents="none",X.style.pointerEvents="auto",U.style.pointerEvents="auto",()=>{F.style.pointerEvents="",X.style.pointerEvents="",U.style.pointerEvents=""}}}},[f,i,y,u,x,S,P]),index(()=>{i||(_.current=void 0,j.current=!1,I(),G())},[i,I,G]),reactExports.useEffect(()=>()=>{I(),clearTimeout(O.current),clearTimeout(A.current),G()},[f,u.domReference,I,G]);const Q=reactExports.useMemo(()=>{function H(Y){_.current=Y.pointerType}return{onPointerDown:H,onPointerEnter:H,onMouseMove(Y){const{nativeEvent:U}=Y;function F(){!D.current&&!w.current&&a(!0,U,"hover")}m&&!isMouseLikePointerType(_.current)||i||g===0||j.current&&Y.movementX**2+Y.movementY**2<2||(clearTimeout(A.current),_.current==="touch"?F():(j.current=!0,A.current=window.setTimeout(F,g)))}}},[m,a,i,w,g]),B=reactExports.useMemo(()=>({onMouseEnter(){clearTimeout(O.current)},onMouseLeave(H){ne()||M(H.nativeEvent,!1)}}),[M,ne]);return reactExports.useMemo(()=>f?{reference:Q,floating:B}:{},[f,Q,B])}const NOOP=()=>{},FloatingDelayGroupContext=reactExports.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:NOOP,setState:NOOP,isInstantPhase:!1}),useDelayGroupContext=()=>reactExports.useContext(FloatingDelayGroupContext);function FloatingDelayGroup(e){const{children:t,delay:i,timeoutMs:a=0}=e,[o,l]=reactExports.useReducer((h,p)=>({...h,...p}),{delay:i,timeoutMs:a,initialDelay:i,currentId:null,isInstantPhase:!1}),u=reactExports.useRef(null),f=reactExports.useCallback(h=>{l({currentId:h})},[]);return index(()=>{o.currentId?u.current===null?u.current=o.currentId:o.isInstantPhase||l({isInstantPhase:!0}):(o.isInstantPhase&&l({isInstantPhase:!1}),u.current=null)},[o.currentId,o.isInstantPhase]),reactExports.createElement(FloatingDelayGroupContext.Provider,{value:reactExports.useMemo(()=>({...o,setState:l,setCurrentId:f}),[o,f])},t)}function useDelayGroup(e,t){t===void 0&&(t={});const{open:i,onOpenChange:a,floatingId:o}=e,{id:l,enabled:u=!0}=t,f=l??o,h=useDelayGroupContext(),{currentId:p,setCurrentId:m,initialDelay:g,setState:b,timeoutMs:x}=h;return index(()=>{u&&p&&(b({delay:{open:1,close:getDelay(g,"close")}}),p!==f&&a(!1))},[u,f,a,b,p,g]),index(()=>{function y(){a(!1),b({delay:g,currentId:null})}if(u&&p&&!i&&p===f){if(x){const S=window.setTimeout(y,x);return()=>{clearTimeout(S)}}y()}},[u,i,b,p,f,a,g,x]),index(()=>{u&&(m===NOOP||!i||m(f))},[u,i,m,f]),h}function getChildren(e,t){let i=e.filter(o=>{var l;return o.parentId===t&&((l=o.context)==null?void 0:l.open)}),a=i;for(;a.length;)a=e.filter(o=>{var l;return(l=a)==null?void 0:l.some(u=>{var f;return o.parentId===u.id&&((f=o.context)==null?void 0:f.open)})}),i=i.concat(a);return i}const FOCUSABLE_ATTRIBUTE="data-floating-ui-focusable",bubbleHandlerKeys={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},captureHandlerKeys={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},normalizeProp=e=>{var t,i;return{escapeKey:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(i=e==null?void 0:e.outsidePress)!=null?i:!0}};function useDismiss(e,t){t===void 0&&(t={});const{open:i,onOpenChange:a,elements:o,dataRef:l}=e,{enabled:u=!0,escapeKey:f=!0,outsidePress:h=!0,outsidePressEvent:p="pointerdown",referencePress:m=!1,referencePressEvent:g="pointerdown",ancestorScroll:b=!1,bubbles:x,capture:y}=t,S=useFloatingTree(),E=useEffectEvent(typeof h=="function"?h:()=>!1),w=typeof h=="function"?E:h,_=reactExports.useRef(!1),O=reactExports.useRef(!1),{escapeKey:k,outsidePress:A}=normalizeProp(x),{escapeKey:D,outsidePress:R}=normalizeProp(y),T=reactExports.useRef(!1),j=useEffectEvent(Q=>{var B;if(!i||!u||!f||Q.key!=="Escape"||T.current)return;const H=(B=l.current.floatingContext)==null?void 0:B.nodeId,Y=S?getChildren(S.nodesRef.current,H):[];if(!k&&(Q.stopPropagation(),Y.length>0)){let U=!0;if(Y.forEach(F=>{var X;if((X=F.context)!=null&&X.open&&!F.context.dataRef.current.__escapeKeyBubbles){U=!1;return}}),!U)return}a(!1,isReactEvent(Q)?Q.nativeEvent:Q,"escape-key")}),P=useEffectEvent(Q=>{var B;const H=()=>{var Y;j(Q),(Y=getTarget(Q))==null||Y.removeEventListener("keydown",H)};(B=getTarget(Q))==null||B.addEventListener("keydown",H)}),M=useEffectEvent(Q=>{var B;const H=_.current;_.current=!1;const Y=O.current;if(O.current=!1,p==="click"&&Y||H||typeof w=="function"&&!w(Q))return;const U=getTarget(Q),F="["+createAttribute("inert")+"]",X=getDocument(o.floating).querySelectorAll(F);let z=isElement(U)?U:null;for(;z&&!isLastTraversableNode(z);){const K=getParentNode(z);if(isLastTraversableNode(K)||!isElement(K))break;z=K}if(X.length&&isElement(U)&&!isRootElement(U)&&!contains(U,o.floating)&&Array.from(X).every(K=>!contains(z,K)))return;if(isHTMLElement(U)&&ne){const K=U.clientWidth>0&&U.scrollWidth>U.clientWidth,te=U.clientHeight>0&&U.scrollHeight>U.clientHeight;let J=te&&Q.offsetX>U.clientWidth;if(te&&getComputedStyle$1(U).direction==="rtl"&&(J=Q.offsetX<=U.offsetWidth-U.clientWidth),J||K&&Q.offsetY>U.clientHeight)return}const L=(B=l.current.floatingContext)==null?void 0:B.nodeId,$=S&&getChildren(S.nodesRef.current,L).some(K=>{var te;return isEventTargetWithin(Q,(te=K.context)==null?void 0:te.elements.floating)});if(isEventTargetWithin(Q,o.floating)||isEventTargetWithin(Q,o.domReference)||$)return;const V=S?getChildren(S.nodesRef.current,L):[];if(V.length>0){let K=!0;if(V.forEach(te=>{var J;if((J=te.context)!=null&&J.open&&!te.context.dataRef.current.__outsidePressBubbles){K=!1;return}}),!K)return}a(!1,Q,"outside-press")}),I=useEffectEvent(Q=>{var B;const H=()=>{var Y;M(Q),(Y=getTarget(Q))==null||Y.removeEventListener(p,H)};(B=getTarget(Q))==null||B.addEventListener(p,H)});reactExports.useEffect(()=>{if(!i||!u)return;l.current.__escapeKeyBubbles=k,l.current.__outsidePressBubbles=A;let Q=-1;function B(X){a(!1,X,"ancestor-scroll")}function H(){window.clearTimeout(Q),T.current=!0}function Y(){Q=window.setTimeout(()=>{T.current=!1},isWebKit()?5:0)}const U=getDocument(o.floating);f&&(U.addEventListener("keydown",D?P:j,D),U.addEventListener("compositionstart",H),U.addEventListener("compositionend",Y)),w&&U.addEventListener(p,R?I:M,R);let F=[];return b&&(isElement(o.domReference)&&(F=getOverflowAncestors(o.domReference)),isElement(o.floating)&&(F=F.concat(getOverflowAncestors(o.floating))),!isElement(o.reference)&&o.reference&&o.reference.contextElement&&(F=F.concat(getOverflowAncestors(o.reference.contextElement)))),F=F.filter(X=>{var z;return X!==((z=U.defaultView)==null?void 0:z.visualViewport)}),F.forEach(X=>{X.addEventListener("scroll",B,{passive:!0})}),()=>{f&&(U.removeEventListener("keydown",D?P:j,D),U.removeEventListener("compositionstart",H),U.removeEventListener("compositionend",Y)),w&&U.removeEventListener(p,R?I:M,R),F.forEach(X=>{X.removeEventListener("scroll",B)}),window.clearTimeout(Q)}},[l,o,f,w,p,i,a,b,u,k,A,j,D,P,M,R,I]),reactExports.useEffect(()=>{_.current=!1},[w,p]);const G=reactExports.useMemo(()=>({onKeyDown:j,[bubbleHandlerKeys[g]]:Q=>{m&&a(!1,Q.nativeEvent,"reference-press")}}),[j,a,m,g]),ne=reactExports.useMemo(()=>({onKeyDown:j,onMouseDown(){O.current=!0},onMouseUp(){O.current=!0},[captureHandlerKeys[p]]:()=>{_.current=!0}}),[j,p]);return reactExports.useMemo(()=>u?{reference:G,floating:ne}:{},[u,G,ne])}function useFloatingRootContext(e){const{open:t=!1,onOpenChange:i,elements:a}=e,o=useId(),l=reactExports.useRef({}),[u]=reactExports.useState(()=>createPubSub()),f=useFloatingParentNodeId()!=null,[h,p]=reactExports.useState(a.reference),m=useEffectEvent((x,y,S)=>{l.current.openEvent=x?y:void 0,u.emit("openchange",{open:x,event:y,reason:S,nested:f}),i==null||i(x,y,S)}),g=reactExports.useMemo(()=>({setPositionReference:p}),[]),b=reactExports.useMemo(()=>({reference:h||a.reference||null,floating:a.floating||null,domReference:a.reference}),[h,a.reference,a.floating]);return reactExports.useMemo(()=>({dataRef:l,open:t,onOpenChange:m,elements:b,events:u,floatingId:o,refs:g}),[t,m,b,u,o,g])}function useFloating(e){e===void 0&&(e={});const{nodeId:t}=e,i=useFloatingRootContext({...e,elements:{reference:null,floating:null,...e.elements}}),a=e.rootContext||i,o=a.elements,[l,u]=reactExports.useState(null),[f,h]=reactExports.useState(null),m=(o==null?void 0:o.domReference)||l,g=reactExports.useRef(null),b=useFloatingTree();index(()=>{m&&(g.current=m)},[m]);const x=useFloating$1({...e,elements:{...o,...f&&{reference:f}}}),y=reactExports.useCallback(O=>{const k=isElement(O)?{getBoundingClientRect:()=>O.getBoundingClientRect(),contextElement:O}:O;h(k),x.refs.setReference(k)},[x.refs]),S=reactExports.useCallback(O=>{(isElement(O)||O===null)&&(g.current=O,u(O)),(isElement(x.refs.reference.current)||x.refs.reference.current===null||O!==null&&!isElement(O))&&x.refs.setReference(O)},[x.refs]),E=reactExports.useMemo(()=>({...x.refs,setReference:S,setPositionReference:y,domReference:g}),[x.refs,S,y]),w=reactExports.useMemo(()=>({...x.elements,domReference:m}),[x.elements,m]),_=reactExports.useMemo(()=>({...x,...a,refs:E,elements:w,nodeId:t}),[x,E,w,t,a]);return index(()=>{a.dataRef.current.floatingContext=_;const O=b==null?void 0:b.nodesRef.current.find(k=>k.id===t);O&&(O.context=_)}),reactExports.useMemo(()=>({...x,context:_,refs:E,elements:w}),[x,E,w,_])}function useFocus(e,t){t===void 0&&(t={});const{open:i,onOpenChange:a,events:o,dataRef:l,elements:u}=e,{enabled:f=!0,visibleOnly:h=!0}=t,p=reactExports.useRef(!1),m=reactExports.useRef(),g=reactExports.useRef(!0);reactExports.useEffect(()=>{if(!f)return;const x=getWindow(u.domReference);function y(){!i&&isHTMLElement(u.domReference)&&u.domReference===activeElement(getDocument(u.domReference))&&(p.current=!0)}function S(){g.current=!0}return x.addEventListener("blur",y),x.addEventListener("keydown",S,!0),()=>{x.removeEventListener("blur",y),x.removeEventListener("keydown",S,!0)}},[u.domReference,i,f]),reactExports.useEffect(()=>{if(!f)return;function x(y){let{reason:S}=y;(S==="reference-press"||S==="escape-key")&&(p.current=!0)}return o.on("openchange",x),()=>{o.off("openchange",x)}},[o,f]),reactExports.useEffect(()=>()=>{clearTimeout(m.current)},[]);const b=reactExports.useMemo(()=>({onPointerDown(x){isVirtualPointerEvent(x.nativeEvent)||(g.current=!1)},onMouseLeave(){p.current=!1},onFocus(x){if(p.current)return;const y=getTarget(x.nativeEvent);if(h&&isElement(y))try{if(isSafari()&&isMac())throw Error();if(!y.matches(":focus-visible"))return}catch{if(!g.current&&!isTypeableElement(y))return}a(!0,x.nativeEvent,"focus")},onBlur(x){p.current=!1;const y=x.relatedTarget,S=x.nativeEvent,E=isElement(y)&&y.hasAttribute(createAttribute("focus-guard"))&&y.getAttribute("data-type")==="outside";m.current=window.setTimeout(()=>{var w;const _=activeElement(u.domReference?u.domReference.ownerDocument:document);!y&&_===u.domReference||contains((w=l.current.floatingContext)==null?void 0:w.refs.floating.current,_)||contains(u.domReference,_)||E||a(!1,S,"focus")})}}),[l,u.domReference,a,h]);return reactExports.useMemo(()=>f?{reference:b}:{},[f,b])}const ACTIVE_KEY="active",SELECTED_KEY="selected";function mergeProps(e,t,i){const a=new Map,o=i==="item";let l=e;if(o&&e){const{[ACTIVE_KEY]:u,[SELECTED_KEY]:f,...h}=e;l=h}return{...i==="floating"&&{tabIndex:-1,[FOCUSABLE_ATTRIBUTE]:""},...l,...t.map(u=>{const f=u?u[i]:null;return typeof f=="function"?e?f(e):null:f}).concat(e).reduce((u,f)=>(f&&Object.entries(f).forEach(h=>{let[p,m]=h;if(!(o&&[ACTIVE_KEY,SELECTED_KEY].includes(p)))if(p.indexOf("on")===0){if(a.has(p)||a.set(p,[]),typeof m=="function"){var g;(g=a.get(p))==null||g.push(m),u[p]=function(){for(var b,x=arguments.length,y=new Array(x),S=0;S<x;S++)y[S]=arguments[S];return(b=a.get(p))==null?void 0:b.map(E=>E(...y)).find(E=>E!==void 0)}}}else u[p]=m}),u),{})}}function useInteractions(e){e===void 0&&(e=[]);const t=e.map(f=>f==null?void 0:f.reference),i=e.map(f=>f==null?void 0:f.floating),a=e.map(f=>f==null?void 0:f.item),o=reactExports.useCallback(f=>mergeProps(f,e,"reference"),t),l=reactExports.useCallback(f=>mergeProps(f,e,"floating"),i),u=reactExports.useCallback(f=>mergeProps(f,e,"item"),a);return reactExports.useMemo(()=>({getReferenceProps:o,getFloatingProps:l,getItemProps:u}),[o,l,u])}const componentRoleToAriaRoleMap=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function useRole(e,t){var i;t===void 0&&(t={});const{open:a,floatingId:o}=e,{enabled:l=!0,role:u="dialog"}=t,f=(i=componentRoleToAriaRoleMap.get(u))!=null?i:u,h=useId(),m=useFloatingParentNodeId()!=null,g=reactExports.useMemo(()=>f==="tooltip"||u==="label"?{["aria-"+(u==="label"?"labelledby":"describedby")]:a?o:void 0}:{"aria-expanded":a?"true":"false","aria-haspopup":f==="alertdialog"?"dialog":f,"aria-controls":a?o:void 0,...f==="listbox"&&{role:"combobox"},...f==="menu"&&{id:h},...f==="menu"&&m&&{role:"menuitem"},...u==="select"&&{"aria-autocomplete":"none"},...u==="combobox"&&{"aria-autocomplete":"list"}},[f,o,m,a,h,u]),b=reactExports.useMemo(()=>{const y={id:o,...f&&{role:f}};return f==="tooltip"||u==="label"?y:{...y,...f==="menu"&&{"aria-labelledby":h}}},[f,o,h,u]),x=reactExports.useCallback(y=>{let{active:S,selected:E}=y;const w={role:"option",...S&&{id:o+"-option"}};switch(u){case"select":return{...w,"aria-selected":S&&E};case"combobox":return{...w,...S&&{"aria-selected":!0}}}return{}},[o,u]);return reactExports.useMemo(()=>l?{reference:g,floating:b,item:x}:{},[l,g,b,x])}const[ScrollAreaProvider,useScrollAreaContext]=createSafeContext("ScrollArea.Root component was not found in tree");function useResizeObserver(e,t){const i=useCallbackRef(t);useIsomorphicEffect(()=>{let a=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(a),a=window.requestAnimationFrame(i)});return o.observe(e),()=>{window.cancelAnimationFrame(a),o.unobserve(e)}}},[e,i])}const Corner=reactExports.forwardRef((e,t)=>{const{style:i,...a}=e,o=useScrollAreaContext(),[l,u]=reactExports.useState(0),[f,h]=reactExports.useState(0),p=!!(l&&f);return useResizeObserver(o.scrollbarX,()=>{var g;const m=((g=o.scrollbarX)==null?void 0:g.offsetHeight)||0;o.onCornerHeightChange(m),h(m)}),useResizeObserver(o.scrollbarY,()=>{var g;const m=((g=o.scrollbarY)==null?void 0:g.offsetWidth)||0;o.onCornerWidthChange(m),u(m)}),p?jsxRuntimeExports.jsx("div",{...a,ref:t,style:{...i,width:l,height:f}}):null}),ScrollAreaCorner=reactExports.forwardRef((e,t)=>{const i=useScrollAreaContext(),a=!!(i.scrollbarX&&i.scrollbarY);return i.type!=="scroll"&&a?jsxRuntimeExports.jsx(Corner,{...e,ref:t}):null}),defaultProps$1c={scrollHideDelay:1e3,type:"hover"},ScrollAreaRoot=reactExports.forwardRef((e,t)=>{const{type:i,scrollHideDelay:a,scrollbars:o,getStyles:l,...u}=useProps("ScrollAreaRoot",defaultProps$1c,e),[f,h]=reactExports.useState(null),[p,m]=reactExports.useState(null),[g,b]=reactExports.useState(null),[x,y]=reactExports.useState(null),[S,E]=reactExports.useState(null),[w,_]=reactExports.useState(0),[O,k]=reactExports.useState(0),[A,D]=reactExports.useState(!1),[R,T]=reactExports.useState(!1),j=useMergedRef(t,P=>h(P));return jsxRuntimeExports.jsx(ScrollAreaProvider,{value:{type:i,scrollHideDelay:a,scrollArea:f,viewport:p,onViewportChange:m,content:g,onContentChange:b,scrollbarX:x,onScrollbarXChange:y,scrollbarXEnabled:A,onScrollbarXEnabledChange:D,scrollbarY:S,onScrollbarYChange:E,scrollbarYEnabled:R,onScrollbarYEnabledChange:T,onCornerWidthChange:_,onCornerHeightChange:k,getStyles:l},children:jsxRuntimeExports.jsx(Box,{...u,ref:j,__vars:{"--sa-corner-width":o!=="xy"?"0px":`${w}px`,"--sa-corner-height":o!=="xy"?"0px":`${O}px`}})})});ScrollAreaRoot.displayName="@mantine/core/ScrollAreaRoot";function getThumbRatio(e,t){const i=e/t;return Number.isNaN(i)?0:i}function getThumbSize(e){const t=getThumbRatio(e.viewport,e.content),i=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,a=(e.scrollbar.size-i)*t;return Math.max(a,18)}function linearScale(e,t){return i=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const a=(t[1]-t[0])/(e[1]-e[0]);return t[0]+a*(i-e[0])}}function clamp$2(e,[t,i]){return Math.min(i,Math.max(t,e))}function getThumbOffsetFromScroll(e,t,i="ltr"){const a=getThumbSize(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,l=t.scrollbar.size-o,u=t.content-t.viewport,f=l-a,h=i==="ltr"?[0,u]:[u*-1,0],p=clamp$2(e,h);return linearScale([0,u],[0,f])(p)}function getScrollPositionFromPointer(e,t,i,a="ltr"){const o=getThumbSize(i),l=o/2,u=t||l,f=o-u,h=i.scrollbar.paddingStart+u,p=i.scrollbar.size-i.scrollbar.paddingEnd-f,m=i.content-i.viewport,g=a==="ltr"?[0,m]:[m*-1,0];return linearScale([h,p],g)(e)}function isScrollingWithinScrollbarBounds(e,t){return e>0&&e<t}function toInt(e){return e?parseInt(e,10):0}function composeEventHandlers$2(e,t,{checkForDefaultPrevented:i=!0}={}){return a=>{e==null||e(a),(i===!1||!a.defaultPrevented)&&(t==null||t(a))}}const[ScrollbarProvider,useScrollbarContext]=createSafeContext("ScrollAreaScrollbar was not found in tree"),Scrollbar=reactExports.forwardRef((e,t)=>{const{sizes:i,hasThumb:a,onThumbChange:o,onThumbPointerUp:l,onThumbPointerDown:u,onThumbPositionChange:f,onDragScroll:h,onWheelScroll:p,onResize:m,...g}=e,b=useScrollAreaContext(),[x,y]=reactExports.useState(null),S=useMergedRef(t,T=>y(T)),E=reactExports.useRef(null),w=reactExports.useRef(""),{viewport:_}=b,O=i.content-i.viewport,k=useCallbackRef(p),A=useCallbackRef(f),D=useDebouncedCallback(m,10),R=T=>{if(E.current){const j=T.clientX-E.current.left,P=T.clientY-E.current.top;h({x:j,y:P})}};return reactExports.useEffect(()=>{const T=j=>{const P=j.target;(x==null?void 0:x.contains(P))&&k(j,O)};return document.addEventListener("wheel",T,{passive:!1}),()=>document.removeEventListener("wheel",T,{passive:!1})},[_,x,O,k]),reactExports.useEffect(A,[i,A]),useResizeObserver(x,D),useResizeObserver(b.content,D),jsxRuntimeExports.jsx(ScrollbarProvider,{value:{scrollbar:x,hasThumb:a,onThumbChange:useCallbackRef(o),onThumbPointerUp:useCallbackRef(l),onThumbPositionChange:A,onThumbPointerDown:useCallbackRef(u)},children:jsxRuntimeExports.jsx("div",{...g,ref:S,"data-mantine-scrollbar":!0,style:{position:"absolute",...g.style},onPointerDown:composeEventHandlers$2(e.onPointerDown,T=>{T.preventDefault(),T.button===0&&(T.target.setPointerCapture(T.pointerId),E.current=x.getBoundingClientRect(),w.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",R(T))}),onPointerMove:composeEventHandlers$2(e.onPointerMove,R),onPointerUp:composeEventHandlers$2(e.onPointerUp,T=>{const j=T.target;j.hasPointerCapture(T.pointerId)&&(T.preventDefault(),j.releasePointerCapture(T.pointerId))}),onLostPointerCapture:()=>{document.body.style.webkitUserSelect=w.current,E.current=null}})})}),ScrollAreaScrollbarX=reactExports.forwardRef((e,t)=>{const{sizes:i,onSizesChange:a,style:o,...l}=e,u=useScrollAreaContext(),[f,h]=reactExports.useState(),p=reactExports.useRef(null),m=useMergedRef(t,p,u.onScrollbarXChange);return reactExports.useEffect(()=>{p.current&&h(getComputedStyle(p.current))},[p]),jsxRuntimeExports.jsx(Scrollbar,{"data-orientation":"horizontal",...l,ref:m,sizes:i,style:{...o,"--sa-thumb-width":`${getThumbSize(i)}px`},onThumbPointerDown:g=>e.onThumbPointerDown(g.x),onDragScroll:g=>e.onDragScroll(g.x),onWheelScroll:(g,b)=>{if(u.viewport){const x=u.viewport.scrollLeft+g.deltaX;e.onWheelScroll(x),isScrollingWithinScrollbarBounds(x,b)&&g.preventDefault()}},onResize:()=>{p.current&&u.viewport&&f&&a({content:u.viewport.scrollWidth,viewport:u.viewport.offsetWidth,scrollbar:{size:p.current.clientWidth,paddingStart:toInt(f.paddingLeft),paddingEnd:toInt(f.paddingRight)}})}})});ScrollAreaScrollbarX.displayName="@mantine/core/ScrollAreaScrollbarX";const ScrollAreaScrollbarY=reactExports.forwardRef((e,t)=>{const{sizes:i,onSizesChange:a,style:o,...l}=e,u=useScrollAreaContext(),[f,h]=reactExports.useState(),p=reactExports.useRef(null),m=useMergedRef(t,p,u.onScrollbarYChange);return reactExports.useEffect(()=>{p.current&&h(window.getComputedStyle(p.current))},[]),jsxRuntimeExports.jsx(Scrollbar,{...l,"data-orientation":"vertical",ref:m,sizes:i,style:{"--sa-thumb-height":`${getThumbSize(i)}px`,...o},onThumbPointerDown:g=>e.onThumbPointerDown(g.y),onDragScroll:g=>e.onDragScroll(g.y),onWheelScroll:(g,b)=>{if(u.viewport){const x=u.viewport.scrollTop+g.deltaY;e.onWheelScroll(x),isScrollingWithinScrollbarBounds(x,b)&&g.preventDefault()}},onResize:()=>{p.current&&u.viewport&&f&&a({content:u.viewport.scrollHeight,viewport:u.viewport.offsetHeight,scrollbar:{size:p.current.clientHeight,paddingStart:toInt(f.paddingTop),paddingEnd:toInt(f.paddingBottom)}})}})});ScrollAreaScrollbarY.displayName="@mantine/core/ScrollAreaScrollbarY";const ScrollAreaScrollbarVisible=reactExports.forwardRef((e,t)=>{const{orientation:i="vertical",...a}=e,{dir:o}=useDirection(),l=useScrollAreaContext(),u=reactExports.useRef(null),f=reactExports.useRef(0),[h,p]=reactExports.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),m=getThumbRatio(h.viewport,h.content),g={...a,sizes:h,onSizesChange:p,hasThumb:m>0&&m<1,onThumbChange:x=>{u.current=x},onThumbPointerUp:()=>{f.current=0},onThumbPointerDown:x=>{f.current=x}},b=(x,y)=>getScrollPositionFromPointer(x,f.current,h,y);return i==="horizontal"?jsxRuntimeExports.jsx(ScrollAreaScrollbarX,{...g,ref:t,onThumbPositionChange:()=>{if(l.viewport&&u.current){const x=l.viewport.scrollLeft,y=getThumbOffsetFromScroll(x,h,o);u.current.style.transform=`translate3d(${y}px, 0, 0)`}},onWheelScroll:x=>{l.viewport&&(l.viewport.scrollLeft=x)},onDragScroll:x=>{l.viewport&&(l.viewport.scrollLeft=b(x,o))}}):i==="vertical"?jsxRuntimeExports.jsx(ScrollAreaScrollbarY,{...g,ref:t,onThumbPositionChange:()=>{if(l.viewport&&u.current){const x=l.viewport.scrollTop,y=getThumbOffsetFromScroll(x,h);h.scrollbar.size===0?u.current.style.setProperty("--thumb-opacity","0"):u.current.style.setProperty("--thumb-opacity","1"),u.current.style.transform=`translate3d(0, ${y}px, 0)`}},onWheelScroll:x=>{l.viewport&&(l.viewport.scrollTop=x)},onDragScroll:x=>{l.viewport&&(l.viewport.scrollTop=b(x))}}):null});ScrollAreaScrollbarVisible.displayName="@mantine/core/ScrollAreaScrollbarVisible";const ScrollAreaScrollbarAuto=reactExports.forwardRef((e,t)=>{const i=useScrollAreaContext(),{forceMount:a,...o}=e,[l,u]=reactExports.useState(!1),f=e.orientation==="horizontal",h=useDebouncedCallback(()=>{if(i.viewport){const p=i.viewport.offsetWidth<i.viewport.scrollWidth,m=i.viewport.offsetHeight<i.viewport.scrollHeight;u(f?p:m)}},10);return useResizeObserver(i.viewport,h),useResizeObserver(i.content,h),a||l?jsxRuntimeExports.jsx(ScrollAreaScrollbarVisible,{"data-state":l?"visible":"hidden",...o,ref:t}):null});ScrollAreaScrollbarAuto.displayName="@mantine/core/ScrollAreaScrollbarAuto";const ScrollAreaScrollbarHover=reactExports.forwardRef((e,t)=>{const{forceMount:i,...a}=e,o=useScrollAreaContext(),[l,u]=reactExports.useState(!1);return reactExports.useEffect(()=>{const{scrollArea:f}=o;let h=0;if(f){const p=()=>{window.clearTimeout(h),u(!0)},m=()=>{h=window.setTimeout(()=>u(!1),o.scrollHideDelay)};return f.addEventListener("pointerenter",p),f.addEventListener("pointerleave",m),()=>{window.clearTimeout(h),f.removeEventListener("pointerenter",p),f.removeEventListener("pointerleave",m)}}},[o.scrollArea,o.scrollHideDelay]),i||l?jsxRuntimeExports.jsx(ScrollAreaScrollbarAuto,{"data-state":l?"visible":"hidden",...a,ref:t}):null});ScrollAreaScrollbarHover.displayName="@mantine/core/ScrollAreaScrollbarHover";const ScrollAreaScrollbarScroll=reactExports.forwardRef((e,t)=>{const{forceMount:i,...a}=e,o=useScrollAreaContext(),l=e.orientation==="horizontal",[u,f]=reactExports.useState("hidden"),h=useDebouncedCallback(()=>f("idle"),100);return reactExports.useEffect(()=>{if(u==="idle"){const p=window.setTimeout(()=>f("hidden"),o.scrollHideDelay);return()=>window.clearTimeout(p)}},[u,o.scrollHideDelay]),reactExports.useEffect(()=>{const{viewport:p}=o,m=l?"scrollLeft":"scrollTop";if(p){let g=p[m];const b=()=>{const x=p[m];g!==x&&(f("scrolling"),h()),g=x};return p.addEventListener("scroll",b),()=>p.removeEventListener("scroll",b)}},[o.viewport,l,h]),i||u!=="hidden"?jsxRuntimeExports.jsx(ScrollAreaScrollbarVisible,{"data-state":u==="hidden"?"hidden":"visible",...a,ref:t,onPointerEnter:composeEventHandlers$2(e.onPointerEnter,()=>f("interacting")),onPointerLeave:composeEventHandlers$2(e.onPointerLeave,()=>f("idle"))}):null}),ScrollAreaScrollbar=reactExports.forwardRef((e,t)=>{const{forceMount:i,...a}=e,o=useScrollAreaContext(),{onScrollbarXEnabledChange:l,onScrollbarYEnabledChange:u}=o,f=e.orientation==="horizontal";return reactExports.useEffect(()=>(f?l(!0):u(!0),()=>{f?l(!1):u(!1)}),[f,l,u]),o.type==="hover"?jsxRuntimeExports.jsx(ScrollAreaScrollbarHover,{...a,ref:t,forceMount:i}):o.type==="scroll"?jsxRuntimeExports.jsx(ScrollAreaScrollbarScroll,{...a,ref:t,forceMount:i}):o.type==="auto"?jsxRuntimeExports.jsx(ScrollAreaScrollbarAuto,{...a,ref:t,forceMount:i}):o.type==="always"?jsxRuntimeExports.jsx(ScrollAreaScrollbarVisible,{...a,ref:t}):null});ScrollAreaScrollbar.displayName="@mantine/core/ScrollAreaScrollbar";function addUnlinkedScrollListener(e,t=()=>{}){let i={left:e.scrollLeft,top:e.scrollTop},a=0;return function o(){const l={left:e.scrollLeft,top:e.scrollTop},u=i.left!==l.left,f=i.top!==l.top;(u||f)&&t(),i=l,a=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(a)}const Thumb$1=reactExports.forwardRef((e,t)=>{const{style:i,...a}=e,o=useScrollAreaContext(),l=useScrollbarContext(),{onThumbPositionChange:u}=l,f=useMergedRef(t,m=>l.onThumbChange(m)),h=reactExports.useRef(void 0),p=useDebouncedCallback(()=>{h.current&&(h.current(),h.current=void 0)},100);return reactExports.useEffect(()=>{const{viewport:m}=o;if(m){const g=()=>{if(p(),!h.current){const b=addUnlinkedScrollListener(m,u);h.current=b,u()}};return u(),m.addEventListener("scroll",g),()=>m.removeEventListener("scroll",g)}},[o.viewport,p,u]),jsxRuntimeExports.jsx("div",{"data-state":l.hasThumb?"visible":"hidden",...a,ref:f,style:{width:"var(--sa-thumb-width)",height:"var(--sa-thumb-height)",...i},onPointerDownCapture:composeEventHandlers$2(e.onPointerDownCapture,m=>{const b=m.target.getBoundingClientRect(),x=m.clientX-b.left,y=m.clientY-b.top;l.onThumbPointerDown({x,y})}),onPointerUp:composeEventHandlers$2(e.onPointerUp,l.onThumbPointerUp)})});Thumb$1.displayName="@mantine/core/ScrollAreaThumb";const ScrollAreaThumb=reactExports.forwardRef((e,t)=>{const{forceMount:i,...a}=e,o=useScrollbarContext();return i||o.hasThumb?jsxRuntimeExports.jsx(Thumb$1,{ref:t,...a}):null});ScrollAreaThumb.displayName="@mantine/core/ScrollAreaThumb";const ScrollAreaViewport=reactExports.forwardRef(({children:e,style:t,...i},a)=>{const o=useScrollAreaContext(),l=useMergedRef(a,o.onViewportChange);return jsxRuntimeExports.jsx(Box,{...i,ref:l,style:{overflowX:o.scrollbarXEnabled?"scroll":"hidden",overflowY:o.scrollbarYEnabled?"scroll":"hidden",...t},children:jsxRuntimeExports.jsx("div",{...o.getStyles("content"),ref:o.onContentChange,children:e})})});ScrollAreaViewport.displayName="@mantine/core/ScrollAreaViewport";var classes$y={root:"m_d57069b5",viewport:"m_c0783ff9",viewportInner:"m_f8f631dd",scrollbar:"m_c44ba933",thumb:"m_d8b5e363",corner:"m_21657268",content:"m_b1336c6"};const defaultProps$1b={scrollHideDelay:1e3,type:"hover",scrollbars:"xy"},varsResolver$C=(e,{scrollbarSize:t,overscrollBehavior:i})=>({root:{"--scrollarea-scrollbar-size":rem(t),"--scrollarea-over-scroll-behavior":i}}),ScrollArea=factory((e,t)=>{const i=useProps("ScrollArea",defaultProps$1b,e),{classNames:a,className:o,style:l,styles:u,unstyled:f,scrollbarSize:h,vars:p,type:m,scrollHideDelay:g,viewportProps:b,viewportRef:x,onScrollPositionChange:y,children:S,offsetScrollbars:E,scrollbars:w,onBottomReached:_,onTopReached:O,overscrollBehavior:k,...A}=i,[D,R]=reactExports.useState(!1),[T,j]=reactExports.useState(!1),[P,M]=reactExports.useState(!1),I=useStyles({name:"ScrollArea",props:i,classes:classes$y,className:o,style:l,classNames:a,styles:u,unstyled:f,vars:p,varsResolver:varsResolver$C}),G=reactExports.useRef(null),ne=useMergeRefs([x,G]);return reactExports.useEffect(()=>{if(!G.current||E!=="present")return;const Q=G.current,B=new ResizeObserver(()=>{const{scrollHeight:H,clientHeight:Y,scrollWidth:U,clientWidth:F}=Q;j(H>Y),M(U>F)});return B.observe(Q),()=>B.disconnect()},[G,E]),jsxRuntimeExports.jsxs(ScrollAreaRoot,{getStyles:I,type:m==="never"?"always":m,scrollHideDelay:g,ref:t,scrollbars:w,...I("root"),...A,children:[jsxRuntimeExports.jsx(ScrollAreaViewport,{...b,...I("viewport",{style:b==null?void 0:b.style}),ref:ne,"data-offset-scrollbars":E===!0?"xy":E||void 0,"data-scrollbars":w||void 0,"data-horizontal-hidden":E==="present"&&!P?"true":void 0,"data-vertical-hidden":E==="present"&&!T?"true":void 0,onScroll:Q=>{var U;(U=b==null?void 0:b.onScroll)==null||U.call(b,Q),y==null||y({x:Q.currentTarget.scrollLeft,y:Q.currentTarget.scrollTop});const{scrollTop:B,scrollHeight:H,clientHeight:Y}=Q.currentTarget;B-(H-Y)>=0&&(_==null||_()),B===0&&(O==null||O())},children:S}),(w==="xy"||w==="x")&&jsxRuntimeExports.jsx(ScrollAreaScrollbar,{...I("scrollbar"),orientation:"horizontal","data-hidden":m==="never"||E==="present"&&!P?!0:void 0,forceMount:!0,onMouseEnter:()=>R(!0),onMouseLeave:()=>R(!1),children:jsxRuntimeExports.jsx(ScrollAreaThumb,{...I("thumb")})}),(w==="xy"||w==="y")&&jsxRuntimeExports.jsx(ScrollAreaScrollbar,{...I("scrollbar"),orientation:"vertical","data-hidden":m==="never"||E==="present"&&!T?!0:void 0,forceMount:!0,onMouseEnter:()=>R(!0),onMouseLeave:()=>R(!1),children:jsxRuntimeExports.jsx(ScrollAreaThumb,{...I("thumb")})}),jsxRuntimeExports.jsx(ScrollAreaCorner,{...I("corner"),"data-hovered":D||void 0,"data-hidden":m==="never"||void 0})]})});ScrollArea.displayName="@mantine/core/ScrollArea";const ScrollAreaAutosize=factory((e,t)=>{const{children:i,classNames:a,styles:o,scrollbarSize:l,scrollHideDelay:u,type:f,dir:h,offsetScrollbars:p,viewportRef:m,onScrollPositionChange:g,unstyled:b,variant:x,viewportProps:y,scrollbars:S,style:E,vars:w,onBottomReached:_,onTopReached:O,...k}=useProps("ScrollAreaAutosize",defaultProps$1b,e);return jsxRuntimeExports.jsx(Box,{...k,ref:t,style:[{display:"flex",overflow:"auto"},E],children:jsxRuntimeExports.jsx(Box,{style:{display:"flex",flexDirection:"column",flex:1},children:jsxRuntimeExports.jsx(ScrollArea,{classNames:a,styles:o,scrollHideDelay:u,scrollbarSize:l,type:f,dir:h,offsetScrollbars:p,viewportRef:m,onScrollPositionChange:g,unstyled:b,variant:x,viewportProps:y,vars:w,scrollbars:S,onBottomReached:_,onTopReached:O,children:i})})})});ScrollArea.classes=classes$y;ScrollAreaAutosize.displayName="@mantine/core/ScrollAreaAutosize";ScrollAreaAutosize.classes=classes$y;ScrollArea.Autosize=ScrollAreaAutosize;var classes$x={root:"m_87cf2631"};const defaultProps$1a={__staticSelector:"UnstyledButton"},UnstyledButton=polymorphicFactory((e,t)=>{const i=useProps("UnstyledButton",defaultProps$1a,e),{className:a,component:o="button",__staticSelector:l,unstyled:u,classNames:f,styles:h,style:p,...m}=i,g=useStyles({name:l,props:i,classes:classes$x,className:a,style:p,classNames:f,styles:h,unstyled:u});return jsxRuntimeExports.jsx(Box,{...g("root",{focusable:!0}),component:o,ref:t,type:o==="button"?"button":void 0,...m})});UnstyledButton.classes=classes$x;UnstyledButton.displayName="@mantine/core/UnstyledButton";var classes$w={root:"m_515a97f8"};const defaultProps$19={},VisuallyHidden=factory((e,t)=>{const i=useProps("VisuallyHidden",defaultProps$19,e),{classNames:a,className:o,style:l,styles:u,unstyled:f,vars:h,...p}=i,m=useStyles({name:"VisuallyHidden",classes:classes$w,props:i,className:o,style:l,classNames:a,styles:u,unstyled:f});return jsxRuntimeExports.jsx(Box,{component:"span",ref:t,...m("root"),...p})});VisuallyHidden.classes=classes$w;VisuallyHidden.displayName="@mantine/core/VisuallyHidden";var classes$v={root:"m_1b7284a3"};const defaultProps$18={},varsResolver$B=(e,{radius:t,shadow:i})=>({root:{"--paper-radius":t===void 0?void 0:getRadius(t),"--paper-shadow":getShadow(i)}}),Paper=polymorphicFactory((e,t)=>{const i=useProps("Paper",defaultProps$18,e),{classNames:a,className:o,style:l,styles:u,unstyled:f,withBorder:h,vars:p,radius:m,shadow:g,variant:b,mod:x,...y}=i,S=useStyles({name:"Paper",props:i,classes:classes$v,className:o,style:l,classNames:a,styles:u,unstyled:f,vars:p,varsResolver:varsResolver$B});return jsxRuntimeExports.jsx(Box,{ref:t,mod:[{"data-with-border":h},x],...S("root"),variant:b,...y})});Paper.classes=classes$v;Paper.displayName="@mantine/core/Paper";function getFloatingPosition(e,t){if(e==="rtl"&&(t.includes("right")||t.includes("left"))){const[i,a]=t.split("-"),o=i==="right"?"left":"right";return a===void 0?o:`${o}-${a}`}return t}function horizontalSide(e,t,i,a){return e==="center"||a==="center"?{top:t}:e==="end"?{bottom:i}:e==="start"?{top:i}:{}}function verticalSide(e,t,i,a,o){return e==="center"||a==="center"?{left:t}:e==="end"?{[o==="ltr"?"right":"left"]:i}:e==="start"?{[o==="ltr"?"left":"right"]:i}:{}}const radiusByFloatingSide={bottom:"borderTopLeftRadius",left:"borderTopRightRadius",right:"borderBottomLeftRadius",top:"borderBottomRightRadius"};function getArrowPositionStyles({position:e,arrowSize:t,arrowOffset:i,arrowRadius:a,arrowPosition:o,arrowX:l,arrowY:u,dir:f}){const[h,p="center"]=e.split("-"),m={width:t,height:t,transform:"rotate(45deg)",position:"absolute",[radiusByFloatingSide[h]]:a},g=-t/2;return h==="left"?{...m,...horizontalSide(p,u,i,o),right:g,borderLeftColor:"transparent",borderBottomColor:"transparent",clipPath:"polygon(100% 0, 0 0, 100% 100%)"}:h==="right"?{...m,...horizontalSide(p,u,i,o),left:g,borderRightColor:"transparent",borderTopColor:"transparent",clipPath:"polygon(0 100%, 0 0, 100% 100%)"}:h==="top"?{...m,...verticalSide(p,l,i,o,f),bottom:g,borderTopColor:"transparent",borderLeftColor:"transparent",clipPath:"polygon(0 100%, 100% 100%, 100% 0)"}:h==="bottom"?{...m,...verticalSide(p,l,i,o,f),top:g,borderBottomColor:"transparent",borderRightColor:"transparent",clipPath:"polygon(0 100%, 0 0, 100% 0)"}:{}}const FloatingArrow=reactExports.forwardRef(({position:e,arrowSize:t,arrowOffset:i,arrowRadius:a,arrowPosition:o,visible:l,arrowX:u,arrowY:f,style:h,...p},m)=>{const{dir:g}=useDirection();return l?jsxRuntimeExports.jsx("div",{...p,ref:m,style:{...h,...getArrowPositionStyles({position:e,arrowSize:t,arrowOffset:i,arrowRadius:a,arrowPosition:o,dir:g,arrowX:u,arrowY:f})}}):null});FloatingArrow.displayName="@mantine/core/FloatingArrow";var classes$u={root:"m_9814e45f"};const defaultProps$17={zIndex:getDefaultZIndex("modal")},varsResolver$A=(e,{gradient:t,color:i,backgroundOpacity:a,blur:o,radius:l,zIndex:u})=>({root:{"--overlay-bg":t||(i!==void 0||a!==void 0)&&rgba(i||"#000",a??.6)||void 0,"--overlay-filter":o?`blur(${rem(o)})`:void 0,"--overlay-radius":l===void 0?void 0:getRadius(l),"--overlay-z-index":u==null?void 0:u.toString()}}),Overlay=polymorphicFactory((e,t)=>{const i=useProps("Overlay",defaultProps$17,e),{classNames:a,className:o,style:l,styles:u,unstyled:f,vars:h,fixed:p,center:m,children:g,radius:b,zIndex:x,gradient:y,blur:S,color:E,backgroundOpacity:w,mod:_,...O}=i,k=useStyles({name:"Overlay",props:i,classes:classes$u,className:o,style:l,classNames:a,styles:u,unstyled:f,vars:h,varsResolver:varsResolver$A});return jsxRuntimeExports.jsx(Box,{ref:t,...k("root"),mod:[{center:m,fixed:p},_],...O,children:g})});Overlay.classes=classes$u;Overlay.displayName="@mantine/core/Overlay";function createPortalNode(e){const t=document.createElement("div");return t.setAttribute("data-portal","true"),typeof e.className=="string"&&t.classList.add(...e.className.split(" ").filter(Boolean)),typeof e.style=="object"&&Object.assign(t.style,e.style),typeof e.id=="string"&&t.setAttribute("id",e.id),t}function getTargetNode({target:e,reuseTargetNode:t,...i}){if(e)return typeof e=="string"?document.querySelector(e)||createPortalNode(i):e;if(t){const a=document.querySelector("[data-mantine-shared-portal-node]");if(a)return a;const o=createPortalNode(i);return o.setAttribute("data-mantine-shared-portal-node","true"),document.body.appendChild(o),o}return createPortalNode(i)}const defaultProps$16={reuseTargetNode:!0},Portal=factory((e,t)=>{const{children:i,target:a,reuseTargetNode:o,...l}=useProps("Portal",defaultProps$16,e),[u,f]=reactExports.useState(!1),h=reactExports.useRef(null);return useIsomorphicEffect(()=>(f(!0),h.current=getTargetNode({target:a,reuseTargetNode:o,...l}),assignRef(t,h.current),!a&&!o&&h.current&&document.body.appendChild(h.current),()=>{!a&&!o&&h.current&&document.body.removeChild(h.current)}),[a]),!u||!h.current?null:reactDomExports.createPortal(jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:i}),h.current)});Portal.displayName="@mantine/core/Portal";const OptionalPortal=factory(({withinPortal:e=!0,children:t,...i},a)=>useMantineEnv()==="test"||!e?jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:t}):jsxRuntimeExports.jsx(Portal,{ref:a,...i,children:t}));OptionalPortal.displayName="@mantine/core/OptionalPortal";const popIn=e=>({in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:`scale(.9) translateY(${e==="bottom"?10:-10}px)`},transitionProperty:"transform, opacity"}),transitions={fade:{in:{opacity:1},out:{opacity:0},transitionProperty:"opacity"},"fade-up":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(30px)"},transitionProperty:"opacity, transform"},"fade-down":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(-30px)"},transitionProperty:"opacity, transform"},"fade-left":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(30px)"},transitionProperty:"opacity, transform"},"fade-right":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(-30px)"},transitionProperty:"opacity, transform"},scale:{in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:"scale(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-y":{in:{opacity:1,transform:"scaleY(1)"},out:{opacity:0,transform:"scaleY(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-x":{in:{opacity:1,transform:"scaleX(1)"},out:{opacity:0,transform:"scaleX(0)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"skew-up":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:"translateY(-20px) skew(-10deg, -5deg)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"skew-down":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:"translateY(20px) skew(-10deg, -5deg)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-left":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:"translateY(20px) rotate(-5deg)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-right":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:"translateY(20px) rotate(5deg)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-down":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(-100%)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-up":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(100%)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"slide-left":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(100%)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"slide-right":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(-100%)"},common:{transformOrigin:"right"},transitionProperty:"transform, opacity"},pop:{...popIn("bottom"),common:{transformOrigin:"center center"}},"pop-bottom-left":{...popIn("bottom"),common:{transformOrigin:"bottom left"}},"pop-bottom-right":{...popIn("bottom"),common:{transformOrigin:"bottom right"}},"pop-top-left":{...popIn("top"),common:{transformOrigin:"top left"}},"pop-top-right":{...popIn("top"),common:{transformOrigin:"top right"}}},transitionStatuses={entering:"in",entered:"in",exiting:"out",exited:"out","pre-exiting":"out","pre-entering":"out"};function getTransitionStyles({transition:e,state:t,duration:i,timingFunction:a}){const o={WebkitBackfaceVisibility:"hidden",willChange:"transform, opacity",transitionDuration:`${i}ms`,transitionTimingFunction:a};return typeof e=="string"?e in transitions?{transitionProperty:transitions[e].transitionProperty,...o,...transitions[e].common,...transitions[e][transitionStatuses[t]]}:{}:{transitionProperty:e.transitionProperty,...o,...e.common,...e[transitionStatuses[t]]}}function useTransition({duration:e,exitDuration:t,timingFunction:i,mounted:a,onEnter:o,onExit:l,onEntered:u,onExited:f,enterDelay:h,exitDelay:p}){const m=useMantineTheme(),g=useReducedMotion(),b=m.respectReducedMotion?g:!1,[x,y]=reactExports.useState(b?0:e),[S,E]=reactExports.useState(a?"entered":"exited"),w=reactExports.useRef(-1),_=reactExports.useRef(-1),O=reactExports.useRef(-1);function k(){window.clearTimeout(w.current),window.clearTimeout(_.current),cancelAnimationFrame(O.current)}const A=R=>{k();const T=R?o:l,j=R?u:f,P=b?0:R?e:t;y(P),P===0?(typeof T=="function"&&T(),typeof j=="function"&&j(),E(R?"entered":"exited")):O.current=requestAnimationFrame(()=>{ReactDOM.flushSync(()=>{E(R?"pre-entering":"pre-exiting")}),O.current=requestAnimationFrame(()=>{typeof T=="function"&&T(),E(R?"entering":"exiting"),w.current=window.setTimeout(()=>{typeof j=="function"&&j(),E(R?"entered":"exited")},P)})})},D=R=>{if(k(),typeof(R?h:p)!="number"){A(R);return}_.current=window.setTimeout(()=>{A(R)},R?h:p)};return useDidUpdate(()=>{D(a)},[a]),reactExports.useEffect(()=>()=>{k()},[]),{transitionDuration:x,transitionStatus:S,transitionTimingFunction:i||"ease"}}function Transition({keepMounted:e,transition:t="fade",duration:i=250,exitDuration:a=i,mounted:o,children:l,timingFunction:u="ease",onExit:f,onEntered:h,onEnter:p,onExited:m,enterDelay:g,exitDelay:b}){const x=useMantineEnv(),{transitionDuration:y,transitionStatus:S,transitionTimingFunction:E}=useTransition({mounted:o,exitDuration:a,duration:i,timingFunction:u,onExit:f,onEntered:h,onEnter:p,onExited:m,enterDelay:g,exitDelay:b});return y===0||x==="test"?o?jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:l({})}):e?l({display:"none"}):null:S==="exited"?e?l({display:"none"}):null:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:l(getTransitionStyles({transition:t,duration:y,state:S,timingFunction:E}))})}Transition.displayName="@mantine/core/Transition";const[PopoverContextProvider,usePopoverContext]=createSafeContext("Popover component was not found in the tree");function FocusTrap({children:e,active:t=!0,refProp:i="ref",innerRef:a}){const o=useFocusTrap(t),l=useMergedRef(o,a);return isElement$1(e)?reactExports.cloneElement(e,{[i]:l}):e}function FocusTrapInitialFocus(e){return jsxRuntimeExports.jsx(VisuallyHidden,{tabIndex:-1,"data-autofocus":!0,...e})}FocusTrap.displayName="@mantine/core/FocusTrap";FocusTrapInitialFocus.displayName="@mantine/core/FocusTrapInitialFocus";FocusTrap.InitialFocus=FocusTrapInitialFocus;var classes$t={dropdown:"m_38a85659",arrow:"m_a31dc6c1",overlay:"m_3d7bc908"};const defaultProps$15={},PopoverDropdown=factory((e,t)=>{var E,w,_,O;const i=useProps("PopoverDropdown",defaultProps$15,e),{className:a,style:o,vars:l,children:u,onKeyDownCapture:f,variant:h,classNames:p,styles:m,...g}=i,b=usePopoverContext(),x=useFocusReturn({opened:b.opened,shouldReturnFocus:b.returnFocus}),y=b.withRoles?{"aria-labelledby":b.getTargetId(),id:b.getDropdownId(),role:"dialog",tabIndex:-1}:{},S=useMergedRef(t,b.floating);return b.disabled?null:jsxRuntimeExports.jsx(OptionalPortal,{...b.portalProps,withinPortal:b.withinPortal,children:jsxRuntimeExports.jsx(Transition,{mounted:b.opened,...b.transitionProps,transition:((E=b.transitionProps)==null?void 0:E.transition)||"fade",duration:((w=b.transitionProps)==null?void 0:w.duration)??150,keepMounted:b.keepMounted,exitDuration:typeof((_=b.transitionProps)==null?void 0:_.exitDuration)=="number"?b.transitionProps.exitDuration:(O=b.transitionProps)==null?void 0:O.duration,children:k=>jsxRuntimeExports.jsx(FocusTrap,{active:b.trapFocus&&b.opened,innerRef:S,children:jsxRuntimeExports.jsxs(Box,{...y,...g,variant:h,onKeyDownCapture:closeOnEscape(()=>{var A,D;(A=b.onClose)==null||A.call(b),(D=b.onDismiss)==null||D.call(b)},{active:b.closeOnEscape,onTrigger:x,onKeyDown:f}),"data-position":b.placement,"data-fixed":b.floatingStrategy==="fixed"||void 0,...b.getStyles("dropdown",{className:a,props:i,classNames:p,styles:m,style:[{...k,zIndex:b.zIndex,top:b.y??0,left:b.x??0,width:b.width==="target"?void 0:rem(b.width),...b.referenceHidden?{display:"none"}:null},b.resolvedStyles.dropdown,m==null?void 0:m.dropdown,o]}),children:[u,jsxRuntimeExports.jsx(FloatingArrow,{ref:b.arrowRef,arrowX:b.arrowX,arrowY:b.arrowY,visible:b.withArrow,position:b.placement,arrowSize:b.arrowSize,arrowRadius:b.arrowRadius,arrowOffset:b.arrowOffset,arrowPosition:b.arrowPosition,...b.getStyles("arrow",{props:i,classNames:p,styles:m})})]})})})})});PopoverDropdown.classes=classes$t;PopoverDropdown.displayName="@mantine/core/PopoverDropdown";const defaultProps$14={refProp:"ref",popupType:"dialog"},PopoverTarget=factory((e,t)=>{const{children:i,refProp:a,popupType:o,...l}=useProps("PopoverTarget",defaultProps$14,e);if(!isElement$1(i))throw new Error("Popover.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const u=l,f=usePopoverContext(),h=useMergedRef(f.reference,getRefProp(i),t),p=f.withRoles?{"aria-haspopup":o,"aria-expanded":f.opened,"aria-controls":f.getDropdownId(),id:f.getTargetId()}:{};return reactExports.cloneElement(i,{...u,...p,...f.targetProps,className:clsx(f.targetProps.className,u.className,i.props.className),[a]:h,...f.controlled?null:{onClick:f.onToggle}})});PopoverTarget.displayName="@mantine/core/PopoverTarget";function useFloatingAutoUpdate({opened:e,floating:t,position:i,positionDependencies:a}){const[o,l]=reactExports.useState(0);reactExports.useEffect(()=>{if(t.refs.reference.current&&t.refs.floating.current&&e)return autoUpdate(t.refs.reference.current,t.refs.floating.current,t.update)},[t.refs.reference.current,t.refs.floating.current,e,o,i]),useDidUpdate(()=>{t.update()},a),useDidUpdate(()=>{l(u=>u+1)},[e])}function getDefaultMiddlewares$1(e){if(e===void 0)return{shift:!0,flip:!0};const t={...e};return e.shift===void 0&&(t.shift=!0),e.flip===void 0&&(t.flip=!0),t}function getPopoverMiddlewares(e,t){const i=getDefaultMiddlewares$1(e.middlewares),a=[offset(e.offset),hide()];return i.shift&&a.push(shift(typeof i.shift=="boolean"?{limiter:limitShift(),padding:5}:{limiter:limitShift(),padding:5,...i.shift})),i.flip&&a.push(typeof i.flip=="boolean"?flip():flip(i.flip)),i.inline&&a.push(typeof i.inline=="boolean"?inline():inline(i.inline)),a.push(arrow({element:e.arrowRef,padding:e.arrowOffset})),(i.size||e.width==="target")&&a.push(size({...typeof i.size=="boolean"?{}:i.size,apply({rects:o,availableWidth:l,availableHeight:u,...f}){var m;const p=((m=t().refs.floating.current)==null?void 0:m.style)??{};i.size&&(typeof i.size=="object"&&i.size.apply?i.size.apply({rects:o,availableWidth:l,availableHeight:u,...f}):Object.assign(p,{maxWidth:`${l}px`,maxHeight:`${u}px`})),e.width==="target"&&Object.assign(p,{width:`${o.reference.width}px`})}})),a}function usePopover(e){const[t,i]=useUncontrolled({value:e.opened,defaultValue:e.defaultOpened,finalValue:!1,onChange:e.onChange}),a=reactExports.useRef(t),o=()=>{t&&i(!1)},l=()=>i(!t),u=useFloating({strategy:e.strategy,placement:e.position,middleware:getPopoverMiddlewares(e,()=>u)});return useFloatingAutoUpdate({opened:t,position:e.position,positionDependencies:e.positionDependencies||[],floating:u}),useDidUpdate(()=>{var f;(f=e.onPositionChange)==null||f.call(e,u.placement)},[u.placement]),useDidUpdate(()=>{var f,h;t!==a.current&&(t?(h=e.onOpen)==null||h.call(e):(f=e.onClose)==null||f.call(e)),a.current=t},[t,e.onClose,e.onOpen]),{floating:u,controlled:typeof e.opened=="boolean",opened:t,onClose:o,onToggle:l}}const defaultProps$13={position:"bottom",offset:8,positionDependencies:[],transitionProps:{transition:"fade",duration:150},middlewares:{flip:!0,shift:!0,inline:!1},arrowSize:7,arrowOffset:5,arrowRadius:0,arrowPosition:"side",closeOnClickOutside:!0,withinPortal:!0,closeOnEscape:!0,trapFocus:!1,withRoles:!0,returnFocus:!1,withOverlay:!1,hideDetached:!0,clickOutsideEvents:["mousedown","touchstart"],zIndex:getDefaultZIndex("popover"),__staticSelector:"Popover",width:"max-content"},varsResolver$z=(e,{radius:t,shadow:i})=>({dropdown:{"--popover-radius":t===void 0?void 0:getRadius(t),"--popover-shadow":getShadow(i)}});function Popover(e){var Le,Ye,qe,it,We,Je,ct;const t=useProps("Popover",defaultProps$13,e),{children:i,position:a,offset:o,onPositionChange:l,positionDependencies:u,opened:f,transitionProps:h,onExitTransitionEnd:p,onEnterTransitionEnd:m,width:g,middlewares:b,withArrow:x,arrowSize:y,arrowOffset:S,arrowRadius:E,arrowPosition:w,unstyled:_,classNames:O,styles:k,closeOnClickOutside:A,withinPortal:D,portalProps:R,closeOnEscape:T,clickOutsideEvents:j,trapFocus:P,onClose:M,onDismiss:I,onOpen:G,onChange:ne,zIndex:Q,radius:B,shadow:H,id:Y,defaultOpened:U,__staticSelector:F,withRoles:X,disabled:z,returnFocus:L,variant:$,keepMounted:V,vars:K,floatingStrategy:te,withOverlay:J,overlayProps:ce,hideDetached:ue,...we}=t,Ee=useStyles({name:F,props:t,classes:classes$t,classNames:O,styles:k,unstyled:_,rootSelector:"dropdown",vars:K,varsResolver:varsResolver$z}),{resolvedStyles:De}=useResolvedStylesApi({classNames:O,styles:k,props:t}),je=reactExports.useRef(null),[Pe,ge]=reactExports.useState(null),[se,W]=reactExports.useState(null),{dir:ee}=useDirection(),de=useMantineEnv(),pe=useId$1(Y),ve=usePopover({middlewares:b,width:g,position:getFloatingPosition(ee,a),offset:typeof o=="number"?o+(x?y/2:0):o,arrowRef:je,arrowOffset:S,onPositionChange:l,positionDependencies:u,opened:f,defaultOpened:U,onChange:ne,onOpen:G,onClose:M,onDismiss:I,strategy:te});useClickOutside(()=>{A&&(ve.onClose(),I==null||I())},j,[Pe,se]);const Te=reactExports.useCallback(ot=>{ge(ot),ve.floating.refs.setReference(ot)},[ve.floating.refs.setReference]),oe=reactExports.useCallback(ot=>{W(ot),ve.floating.refs.setFloating(ot)},[ve.floating.refs.setFloating]),ie=reactExports.useCallback(()=>{var ot;(ot=h==null?void 0:h.onExited)==null||ot.call(h),p==null||p()},[h==null?void 0:h.onExited,p]),Fe=reactExports.useCallback(()=>{var ot;(ot=h==null?void 0:h.onEntered)==null||ot.call(h),m==null||m()},[h==null?void 0:h.onEntered,m]);return jsxRuntimeExports.jsxs(PopoverContextProvider,{value:{returnFocus:L,disabled:z,controlled:ve.controlled,reference:Te,floating:oe,x:ve.floating.x,y:ve.floating.y,arrowX:(qe=(Ye=(Le=ve.floating)==null?void 0:Le.middlewareData)==null?void 0:Ye.arrow)==null?void 0:qe.x,arrowY:(Je=(We=(it=ve.floating)==null?void 0:it.middlewareData)==null?void 0:We.arrow)==null?void 0:Je.y,opened:ve.opened,arrowRef:je,transitionProps:{...h,onExited:ie,onEntered:Fe},width:g,withArrow:x,arrowSize:y,arrowOffset:S,arrowRadius:E,arrowPosition:w,placement:ve.floating.placement,trapFocus:P,withinPortal:D,portalProps:R,zIndex:Q,radius:B,shadow:H,closeOnEscape:T,onDismiss:I,onClose:ve.onClose,onToggle:ve.onToggle,getTargetId:()=>`${pe}-target`,getDropdownId:()=>`${pe}-dropdown`,withRoles:X,targetProps:we,__staticSelector:F,classNames:O,styles:k,unstyled:_,variant:$,keepMounted:V,getStyles:Ee,resolvedStyles:De,floatingStrategy:te,referenceHidden:ue&&de!=="test"?(ct=ve.floating.middlewareData.hide)==null?void 0:ct.referenceHidden:!1},children:[i,J&&jsxRuntimeExports.jsx(Transition,{transition:"fade",mounted:ve.opened,duration:(h==null?void 0:h.duration)||250,exitDuration:(h==null?void 0:h.exitDuration)||250,children:ot=>jsxRuntimeExports.jsx(OptionalPortal,{withinPortal:D,children:jsxRuntimeExports.jsx(Overlay,{...ce,...Ee("overlay",{className:ce==null?void 0:ce.className,style:[ot,ce==null?void 0:ce.style]})})})})]})}Popover.Target=PopoverTarget;Popover.Dropdown=PopoverDropdown;Popover.displayName="@mantine/core/Popover";Popover.extend=e=>e;var classes$s={root:"m_5ae2e3c",barsLoader:"m_7a2bd4cd",bar:"m_870bb79","bars-loader-animation":"m_5d2b3b9d",dotsLoader:"m_4e3f22d7",dot:"m_870c4af","loader-dots-animation":"m_aac34a1",ovalLoader:"m_b34414df","oval-loader-animation":"m_f8e89c4b"};const Bars=reactExports.forwardRef(({className:e,...t},i)=>jsxRuntimeExports.jsxs(Box,{component:"span",className:clsx(classes$s.barsLoader,e),...t,ref:i,children:[jsxRuntimeExports.jsx("span",{className:classes$s.bar}),jsxRuntimeExports.jsx("span",{className:classes$s.bar}),jsxRuntimeExports.jsx("span",{className:classes$s.bar})]}));Bars.displayName="@mantine/core/Bars";const Dots=reactExports.forwardRef(({className:e,...t},i)=>jsxRuntimeExports.jsxs(Box,{component:"span",className:clsx(classes$s.dotsLoader,e),...t,ref:i,children:[jsxRuntimeExports.jsx("span",{className:classes$s.dot}),jsxRuntimeExports.jsx("span",{className:classes$s.dot}),jsxRuntimeExports.jsx("span",{className:classes$s.dot})]}));Dots.displayName="@mantine/core/Dots";const Oval=reactExports.forwardRef(({className:e,...t},i)=>jsxRuntimeExports.jsx(Box,{component:"span",className:clsx(classes$s.ovalLoader,e),...t,ref:i}));Oval.displayName="@mantine/core/Oval";const defaultLoaders={bars:Bars,oval:Oval,dots:Dots},defaultProps$12={loaders:defaultLoaders,type:"oval"},varsResolver$y=(e,{size:t,color:i})=>({root:{"--loader-size":getSize(t,"loader-size"),"--loader-color":i?getThemeColor(i,e):void 0}}),Loader=factory((e,t)=>{const i=useProps("Loader",defaultProps$12,e),{size:a,color:o,type:l,vars:u,className:f,style:h,classNames:p,styles:m,unstyled:g,loaders:b,variant:x,children:y,...S}=i,E=useStyles({name:"Loader",props:i,classes:classes$s,className:f,style:h,classNames:p,styles:m,unstyled:g,vars:u,varsResolver:varsResolver$y});return y?jsxRuntimeExports.jsx(Box,{...E("root"),ref:t,...S,children:y}):jsxRuntimeExports.jsx(Box,{...E("root"),ref:t,component:b[l],variant:x,size:a,...S})});Loader.defaultLoaders=defaultLoaders;Loader.classes=classes$s;Loader.displayName="@mantine/core/Loader";var classes$r={root:"m_8d3f4000",icon:"m_8d3afb97",loader:"m_302b9fb1",group:"m_1a0f1b21",groupSection:"m_437b6484"};const defaultProps$11={orientation:"horizontal"},varsResolver$x=(e,{borderWidth:t})=>({group:{"--ai-border-width":rem(t)}}),ActionIconGroup=factory((e,t)=>{const i=useProps("ActionIconGroup",defaultProps$11,e),{className:a,style:o,classNames:l,styles:u,unstyled:f,orientation:h,vars:p,borderWidth:m,variant:g,mod:b,...x}=useProps("ActionIconGroup",defaultProps$11,e),y=useStyles({name:"ActionIconGroup",props:i,classes:classes$r,className:a,style:o,classNames:l,styles:u,unstyled:f,vars:p,varsResolver:varsResolver$x,rootSelector:"group"});return jsxRuntimeExports.jsx(Box,{...y("group"),ref:t,variant:g,mod:[{"data-orientation":h},b],role:"group",...x})});ActionIconGroup.classes=classes$r;ActionIconGroup.displayName="@mantine/core/ActionIconGroup";const defaultProps$10={},varsResolver$w=(e,{radius:t,color:i,gradient:a,variant:o,autoContrast:l,size:u})=>{const f=e.variantColorResolver({color:i||e.primaryColor,theme:e,gradient:a,variant:o||"filled",autoContrast:l});return{groupSection:{"--section-height":getSize(u,"section-height"),"--section-padding-x":getSize(u,"section-padding-x"),"--section-fz":getFontSize(u),"--section-radius":t===void 0?void 0:getRadius(t),"--section-bg":i||o?f.background:void 0,"--section-color":f.color,"--section-bd":i||o?f.border:void 0}}},ActionIconGroupSection=factory((e,t)=>{const i=useProps("ActionIconGroupSection",defaultProps$10,e),{className:a,style:o,classNames:l,styles:u,unstyled:f,vars:h,variant:p,gradient:m,radius:g,autoContrast:b,...x}=useProps("ActionIconGroupSection",defaultProps$10,e),y=useStyles({name:"ActionIconGroupSection",props:i,classes:classes$r,className:a,style:o,classNames:l,styles:u,unstyled:f,vars:h,varsResolver:varsResolver$w,rootSelector:"groupSection"});return jsxRuntimeExports.jsx(Box,{...y("groupSection"),ref:t,variant:p,...x})});ActionIconGroupSection.classes=classes$r;ActionIconGroupSection.displayName="@mantine/core/ActionIconGroupSection";const defaultProps$$={},varsResolver$v=(e,{size:t,radius:i,variant:a,gradient:o,color:l,autoContrast:u})=>{const f=e.variantColorResolver({color:l||e.primaryColor,theme:e,gradient:o,variant:a||"filled",autoContrast:u});return{root:{"--ai-size":getSize(t,"ai-size"),"--ai-radius":i===void 0?void 0:getRadius(i),"--ai-bg":l||a?f.background:void 0,"--ai-hover":l||a?f.hover:void 0,"--ai-hover-color":l||a?f.hoverColor:void 0,"--ai-color":f.color,"--ai-bd":l||a?f.border:void 0}}},ActionIcon=polymorphicFactory((e,t)=>{const i=useProps("ActionIcon",defaultProps$$,e),{className:a,unstyled:o,variant:l,classNames:u,styles:f,style:h,loading:p,loaderProps:m,size:g,color:b,radius:x,__staticSelector:y,gradient:S,vars:E,children:w,disabled:_,"data-disabled":O,autoContrast:k,mod:A,...D}=i,R=useStyles({name:["ActionIcon",y],props:i,className:a,style:h,classes:classes$r,classNames:u,styles:f,unstyled:o,vars:E,varsResolver:varsResolver$v});return jsxRuntimeExports.jsxs(UnstyledButton,{...R("root",{active:!_&&!p&&!O}),...D,unstyled:o,variant:l,size:g,disabled:_||p,ref:t,mod:[{loading:p,disabled:_||O},A],children:[jsxRuntimeExports.jsx(Transition,{mounted:!!p,transition:"slide-down",duration:150,children:T=>jsxRuntimeExports.jsx(Box,{component:"span",...R("loader",{style:T}),"aria-hidden":!0,children:jsxRuntimeExports.jsx(Loader,{color:"var(--ai-color)",size:"calc(var(--ai-size) * 0.55)",...m})})}),jsxRuntimeExports.jsx(Box,{component:"span",mod:{loading:p},...R("icon"),children:w})]})});ActionIcon.classes=classes$r;ActionIcon.displayName="@mantine/core/ActionIcon";ActionIcon.Group=ActionIconGroup;ActionIcon.GroupSection=ActionIconGroupSection;const CloseIcon=reactExports.forwardRef(({size:e="var(--cb-icon-size, 70%)",style:t,...i},a)=>jsxRuntimeExports.jsx("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{...t,width:e,height:e},ref:a,...i,children:jsxRuntimeExports.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})}));CloseIcon.displayName="@mantine/core/CloseIcon";var classes$q={root:"m_86a44da5","root--subtle":"m_220c80f2"};const defaultProps$_={variant:"subtle"},varsResolver$u=(e,{size:t,radius:i,iconSize:a})=>({root:{"--cb-size":getSize(t,"cb-size"),"--cb-radius":i===void 0?void 0:getRadius(i),"--cb-icon-size":rem(a)}}),CloseButton=polymorphicFactory((e,t)=>{const i=useProps("CloseButton",defaultProps$_,e),{iconSize:a,children:o,vars:l,radius:u,className:f,classNames:h,style:p,styles:m,unstyled:g,"data-disabled":b,disabled:x,variant:y,icon:S,mod:E,__staticSelector:w,..._}=i,O=useStyles({name:w||"CloseButton",props:i,className:f,style:p,classes:classes$q,classNames:h,styles:m,unstyled:g,vars:l,varsResolver:varsResolver$u});return jsxRuntimeExports.jsxs(UnstyledButton,{ref:t,..._,unstyled:g,variant:y,disabled:x,mod:[{disabled:x||b},E],...O("root",{variant:y,active:!x&&!b}),children:[S||jsxRuntimeExports.jsx(CloseIcon,{}),o]})});CloseButton.classes=classes$q;CloseButton.displayName="@mantine/core/CloseButton";function filterFalsyChildren(e){return reactExports.Children.toArray(e).filter(Boolean)}var classes$p={root:"m_4081bf90"};const defaultProps$Z={preventGrowOverflow:!0,gap:"md",align:"center",justify:"flex-start",wrap:"wrap"},varsResolver$t=(e,{grow:t,preventGrowOverflow:i,gap:a,align:o,justify:l,wrap:u},{childWidth:f})=>({root:{"--group-child-width":t&&i?f:void 0,"--group-gap":getSpacing(a),"--group-align":o,"--group-justify":l,"--group-wrap":u}}),Group=factory((e,t)=>{const i=useProps("Group",defaultProps$Z,e),{classNames:a,className:o,style:l,styles:u,unstyled:f,children:h,gap:p,align:m,justify:g,wrap:b,grow:x,preventGrowOverflow:y,vars:S,variant:E,__size:w,mod:_,...O}=i,k=filterFalsyChildren(h),A=k.length,D=getSpacing(p??"md"),T={childWidth:`calc(${100/A}% - (${D} - ${D} / ${A}))`},j=useStyles({name:"Group",props:i,stylesCtx:T,className:o,style:l,classes:classes$p,classNames:a,styles:u,unstyled:f,vars:S,varsResolver:varsResolver$t});return jsxRuntimeExports.jsx(Box,{...j("root"),ref:t,variant:E,mod:[{grow:x},_],size:w,...O,children:k})});Group.classes=classes$p;Group.displayName="@mantine/core/Group";const[InputContext,useInputContext]=createOptionalContext({size:"sm"}),defaultProps$Y={},InputClearButton=factory((e,t)=>{const i=useProps("InputClearButton",defaultProps$Y,e),{size:a,variant:o,vars:l,classNames:u,styles:f,...h}=i,p=useInputContext(),{resolvedClassNames:m,resolvedStyles:g}=useResolvedStylesApi({classNames:u,styles:f,props:i});return jsxRuntimeExports.jsx(CloseButton,{variant:o||"transparent",ref:t,size:a||(p==null?void 0:p.size)||"sm",classNames:m,styles:g,__staticSelector:"InputClearButton",...h})});InputClearButton.displayName="@mantine/core/InputClearButton";const[InputWrapperProvider,useInputWrapperContext]=createOptionalContext({offsetBottom:!1,offsetTop:!1,describedBy:void 0,getStyles:null,inputId:void 0,labelId:void 0});var classes$o={wrapper:"m_6c018570",input:"m_8fb7ebe7",section:"m_82577fc2",placeholder:"m_88bacfd0",root:"m_46b77525",label:"m_8fdc1311",required:"m_78a94662",error:"m_8f816625",description:"m_fe47ce59"};const defaultProps$X={},varsResolver$s=(e,{size:t})=>({description:{"--input-description-size":t===void 0?void 0:`calc(${getFontSize(t)} - ${rem(2)})`}}),InputDescription=factory((e,t)=>{const i=useProps("InputDescription",defaultProps$X,e),{classNames:a,className:o,style:l,styles:u,unstyled:f,vars:h,size:p,__staticSelector:m,__inheritStyles:g=!0,variant:b,...x}=useProps("InputDescription",defaultProps$X,i),y=useInputWrapperContext(),S=useStyles({name:["InputWrapper",m],props:i,classes:classes$o,className:o,style:l,classNames:a,styles:u,unstyled:f,rootSelector:"description",vars:h,varsResolver:varsResolver$s}),E=g&&(y==null?void 0:y.getStyles)||S;return jsxRuntimeExports.jsx(Box,{component:"p",ref:t,variant:b,size:p,...E("description",y!=null&&y.getStyles?{className:o,style:l}:void 0),...x})});InputDescription.classes=classes$o;InputDescription.displayName="@mantine/core/InputDescription";const defaultProps$W={},varsResolver$r=(e,{size:t})=>({error:{"--input-error-size":t===void 0?void 0:`calc(${getFontSize(t)} - ${rem(2)})`}}),InputError=factory((e,t)=>{const i=useProps("InputError",defaultProps$W,e),{classNames:a,className:o,style:l,styles:u,unstyled:f,vars:h,size:p,__staticSelector:m,__inheritStyles:g=!0,variant:b,...x}=i,y=useStyles({name:["InputWrapper",m],props:i,classes:classes$o,className:o,style:l,classNames:a,styles:u,unstyled:f,rootSelector:"error",vars:h,varsResolver:varsResolver$r}),S=useInputWrapperContext(),E=g&&(S==null?void 0:S.getStyles)||y;return jsxRuntimeExports.jsx(Box,{component:"p",ref:t,variant:b,size:p,...E("error",S!=null&&S.getStyles?{className:o,style:l}:void 0),...x})});InputError.classes=classes$o;InputError.displayName="@mantine/core/InputError";const defaultProps$V={labelElement:"label"},varsResolver$q=(e,{size:t})=>({label:{"--input-label-size":getFontSize(t),"--input-asterisk-color":void 0}}),InputLabel=factory((e,t)=>{const i=useProps("InputLabel",defaultProps$V,e),{classNames:a,className:o,style:l,styles:u,unstyled:f,vars:h,labelElement:p,size:m,required:g,htmlFor:b,onMouseDown:x,children:y,__staticSelector:S,variant:E,mod:w,..._}=useProps("InputLabel",defaultProps$V,i),O=useStyles({name:["InputWrapper",S],props:i,classes:classes$o,className:o,style:l,classNames:a,styles:u,unstyled:f,rootSelector:"label",vars:h,varsResolver:varsResolver$q}),k=useInputWrapperContext(),A=(k==null?void 0:k.getStyles)||O;return jsxRuntimeExports.jsxs(Box,{...A("label",k!=null&&k.getStyles?{className:o,style:l}:void 0),component:p,variant:E,size:m,ref:t,htmlFor:p==="label"?b:void 0,mod:[{required:g},w],onMouseDown:D=>{x==null||x(D),!D.defaultPrevented&&D.detail>1&&D.preventDefault()},..._,children:[y,g&&jsxRuntimeExports.jsx("span",{...A("required"),"aria-hidden":!0,children:" *"})]})});InputLabel.classes=classes$o;InputLabel.displayName="@mantine/core/InputLabel";const defaultProps$U={},InputPlaceholder=factory((e,t)=>{const i=useProps("InputPlaceholder",defaultProps$U,e),{classNames:a,className:o,style:l,styles:u,unstyled:f,vars:h,__staticSelector:p,variant:m,error:g,mod:b,...x}=useProps("InputPlaceholder",defaultProps$U,i),y=useStyles({name:["InputPlaceholder",p],props:i,classes:classes$o,className:o,style:l,classNames:a,styles:u,unstyled:f,rootSelector:"placeholder"});return jsxRuntimeExports.jsx(Box,{...y("placeholder"),mod:[{error:!!g},b],component:"span",variant:m,ref:t,...x})});InputPlaceholder.classes=classes$o;InputPlaceholder.displayName="@mantine/core/InputPlaceholder";function getInputOffsets(e,{hasDescription:t,hasError:i}){const a=e.findIndex(h=>h==="input"),o=e.slice(0,a),l=e.slice(a+1),u=t&&o.includes("description")||i&&o.includes("error");return{offsetBottom:t&&l.includes("description")||i&&l.includes("error"),offsetTop:u}}const defaultProps$T={labelElement:"label",inputContainer:e=>e,inputWrapperOrder:["label","description","input","error"]},varsResolver$p=(e,{size:t})=>({label:{"--input-label-size":getFontSize(t),"--input-asterisk-color":void 0},error:{"--input-error-size":t===void 0?void 0:`calc(${getFontSize(t)} - ${rem(2)})`},description:{"--input-description-size":t===void 0?void 0:`calc(${getFontSize(t)} - ${rem(2)})`}}),InputWrapper=factory((e,t)=>{const i=useProps("InputWrapper",defaultProps$T,e),{classNames:a,className:o,style:l,styles:u,unstyled:f,vars:h,size:p,variant:m,__staticSelector:g,inputContainer:b,inputWrapperOrder:x,label:y,error:S,description:E,labelProps:w,descriptionProps:_,errorProps:O,labelElement:k,children:A,withAsterisk:D,id:R,required:T,__stylesApiProps:j,mod:P,...M}=i,I=useStyles({name:["InputWrapper",g],props:j||i,classes:classes$o,className:o,style:l,classNames:a,styles:u,unstyled:f,vars:h,varsResolver:varsResolver$p}),G={size:p,variant:m,__staticSelector:g},ne=useId$1(R),Q=typeof D=="boolean"?D:T,B=(O==null?void 0:O.id)||`${ne}-error`,H=(_==null?void 0:_.id)||`${ne}-description`,Y=ne,U=!!S&&typeof S!="boolean",F=!!E,X=`${U?B:""} ${F?H:""}`,z=X.trim().length>0?X.trim():void 0,L=(w==null?void 0:w.id)||`${ne}-label`,$=y&&jsxRuntimeExports.jsx(InputLabel,{labelElement:k,id:L,htmlFor:Y,required:Q,...G,...w,children:y},"label"),V=F&&jsxRuntimeExports.jsx(InputDescription,{..._,...G,size:(_==null?void 0:_.size)||G.size,id:(_==null?void 0:_.id)||H,children:E},"description"),K=jsxRuntimeExports.jsx(reactExports.Fragment,{children:b(A)},"input"),te=U&&reactExports.createElement(InputError,{...O,...G,size:(O==null?void 0:O.size)||G.size,key:"error",id:(O==null?void 0:O.id)||B},S),J=x.map(ce=>{switch(ce){case"label":return $;case"input":return K;case"description":return V;case"error":return te;default:return null}});return jsxRuntimeExports.jsx(InputWrapperProvider,{value:{getStyles:I,describedBy:z,inputId:Y,labelId:L,...getInputOffsets(x,{hasDescription:F,hasError:U})},children:jsxRuntimeExports.jsx(Box,{ref:t,variant:m,size:p,mod:[{error:!!S},P],...I("root"),...M,children:J})})});InputWrapper.classes=classes$o;InputWrapper.displayName="@mantine/core/InputWrapper";const defaultProps$S={variant:"default",leftSectionPointerEvents:"none",rightSectionPointerEvents:"none",withAria:!0,withErrorStyles:!0},varsResolver$o=(e,t,i)=>({wrapper:{"--input-margin-top":i.offsetTop?"calc(var(--mantine-spacing-xs) / 2)":void 0,"--input-margin-bottom":i.offsetBottom?"calc(var(--mantine-spacing-xs) / 2)":void 0,"--input-height":getSize(t.size,"input-height"),"--input-fz":getFontSize(t.size),"--input-radius":t.radius===void 0?void 0:getRadius(t.radius),"--input-left-section-width":t.leftSectionWidth!==void 0?rem(t.leftSectionWidth):void 0,"--input-right-section-width":t.rightSectionWidth!==void 0?rem(t.rightSectionWidth):void 0,"--input-padding-y":t.multiline?getSize(t.size,"input-padding-y"):void 0,"--input-left-section-pointer-events":t.leftSectionPointerEvents,"--input-right-section-pointer-events":t.rightSectionPointerEvents}}),Input=polymorphicFactory((e,t)=>{const i=useProps("Input",defaultProps$S,e),{classNames:a,className:o,style:l,styles:u,unstyled:f,required:h,__staticSelector:p,__stylesApiProps:m,size:g,wrapperProps:b,error:x,disabled:y,leftSection:S,leftSectionProps:E,leftSectionWidth:w,rightSection:_,rightSectionProps:O,rightSectionWidth:k,rightSectionPointerEvents:A,leftSectionPointerEvents:D,variant:R,vars:T,pointer:j,multiline:P,radius:M,id:I,withAria:G,withErrorStyles:ne,mod:Q,inputSize:B,__clearSection:H,__clearable:Y,__defaultRightSection:U,...F}=i,{styleProps:X,rest:z}=extractStyleProps(F),L=useInputWrapperContext(),$={offsetBottom:L==null?void 0:L.offsetBottom,offsetTop:L==null?void 0:L.offsetTop},V=useStyles({name:["Input",p],props:m||i,classes:classes$o,className:o,style:l,classNames:a,styles:u,unstyled:f,stylesCtx:$,rootSelector:"wrapper",vars:T,varsResolver:varsResolver$o}),K=G?{required:h,disabled:y,"aria-invalid":!!x,"aria-describedby":L==null?void 0:L.describedBy,id:(L==null?void 0:L.inputId)||I}:{},te=_||Y&&H||U;return jsxRuntimeExports.jsx(InputContext,{value:{size:g||"sm"},children:jsxRuntimeExports.jsxs(Box,{...V("wrapper"),...X,...b,mod:[{error:!!x&&ne,pointer:j,disabled:y,multiline:P,"data-with-right-section":!!te,"data-with-left-section":!!S},Q],variant:R,size:g,children:[S&&jsxRuntimeExports.jsx("div",{...E,"data-position":"left",...V("section",{className:E==null?void 0:E.className,style:E==null?void 0:E.style}),children:S}),jsxRuntimeExports.jsx(Box,{component:"input",...z,...K,ref:t,required:h,mod:{disabled:y,error:!!x&&ne},variant:R,__size:B,...V("input")}),te&&jsxRuntimeExports.jsx("div",{...O,"data-position":"right",...V("section",{className:O==null?void 0:O.className,style:O==null?void 0:O.style}),children:te})]})})});Input.classes=classes$o;Input.Wrapper=InputWrapper;Input.Label=InputLabel;Input.Error=InputError;Input.Description=InputDescription;Input.Placeholder=InputPlaceholder;Input.ClearButton=InputClearButton;Input.displayName="@mantine/core/Input";function useInputProps(e,t,i){const a=useProps(e,t,i),{label:o,description:l,error:u,required:f,classNames:h,styles:p,className:m,unstyled:g,__staticSelector:b,__stylesApiProps:x,errorProps:y,labelProps:S,descriptionProps:E,wrapperProps:w,id:_,size:O,style:k,inputContainer:A,inputWrapperOrder:D,withAsterisk:R,variant:T,vars:j,mod:P,...M}=a,{styleProps:I,rest:G}=extractStyleProps(M),ne={label:o,description:l,error:u,required:f,classNames:h,className:m,__staticSelector:b,__stylesApiProps:x||a,errorProps:y,labelProps:S,descriptionProps:E,unstyled:g,styles:p,size:O,style:k,inputContainer:A,inputWrapperOrder:D,withAsterisk:R,variant:T,id:_,mod:P,...w};return{...G,classNames:h,styles:p,unstyled:g,wrapperProps:{...ne,...I},inputProps:{required:f,classNames:h,styles:p,unstyled:g,size:O,__staticSelector:b,__stylesApiProps:x||a,error:u,variant:T,id:_}}}const defaultProps$R={__staticSelector:"InputBase",withAria:!0},InputBase=polymorphicFactory((e,t)=>{const{inputProps:i,wrapperProps:a,...o}=useInputProps("InputBase",defaultProps$R,e);return jsxRuntimeExports.jsx(Input.Wrapper,{...a,children:jsxRuntimeExports.jsx(Input,{...i,...o,ref:t})})});InputBase.classes={...Input.classes,...Input.Wrapper.classes};InputBase.displayName="@mantine/core/InputBase";const FLEX_STYLE_PROPS_DATA={gap:{type:"spacing",property:"gap"},rowGap:{type:"spacing",property:"rowGap"},columnGap:{type:"spacing",property:"columnGap"},align:{type:"identity",property:"alignItems"},justify:{type:"identity",property:"justifyContent"},wrap:{type:"identity",property:"flexWrap"},direction:{type:"identity",property:"flexDirection"}};var classes$n={root:"m_8bffd616"};const defaultProps$Q={},Flex=polymorphicFactory((e,t)=>{const i=useProps("Flex",defaultProps$Q,e),{classNames:a,className:o,style:l,styles:u,unstyled:f,vars:h,gap:p,rowGap:m,columnGap:g,align:b,justify:x,wrap:y,direction:S,...E}=i,w=useStyles({name:"Flex",classes:classes$n,props:i,className:o,style:l,classNames:a,styles:u,unstyled:f,vars:h}),_=useMantineTheme(),O=useRandomClassName(),k=parseStyleProps({styleProps:{gap:p,rowGap:m,columnGap:g,align:b,justify:x,wrap:y,direction:S},theme:_,data:FLEX_STYLE_PROPS_DATA});return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[k.hasResponsiveStyles&&jsxRuntimeExports.jsx(InlineStyles,{selector:`.${O}`,styles:k.styles,media:k.media}),jsxRuntimeExports.jsx(Box,{ref:t,...w("root",{className:O,style:filterProps(k.inlineStyles)}),...E})]})});Flex.classes=classes$n;Flex.displayName="@mantine/core/Flex";function isParent(e,t){if(!t||!e)return!1;let i=t.parentNode;for(;i!=null;){if(i===e)return!0;i=i.parentNode}return!1}function useFloatingIndicator({target:e,parent:t,ref:i,displayAfterTransitionEnd:a}){const o=reactExports.useRef(-1),[l,u]=reactExports.useState(!1),[f,h]=reactExports.useState(typeof a=="boolean"?a:!1),p=()=>{if(!e||!t||!i.current)return;const x=e.getBoundingClientRect(),y=t.getBoundingClientRect(),S=window.getComputedStyle(e),E=window.getComputedStyle(t),w=toInt(S.borderTopWidth)+toInt(E.borderTopWidth),_=toInt(S.borderLeftWidth)+toInt(E.borderLeftWidth),O={top:x.top-y.top-w,left:x.left-y.left-_,width:x.width,height:x.height};i.current.style.transform=`translateY(${O.top}px) translateX(${O.left}px)`,i.current.style.width=`${O.width}px`,i.current.style.height=`${O.height}px`},m=()=>{window.clearTimeout(o.current),i.current&&(i.current.style.transitionDuration="0ms"),p(),o.current=window.setTimeout(()=>{i.current&&(i.current.style.transitionDuration="")},30)},g=reactExports.useRef(null),b=reactExports.useRef(null);return reactExports.useEffect(()=>{if(p(),e)return g.current=new ResizeObserver(m),g.current.observe(e),t&&(b.current=new ResizeObserver(m),b.current.observe(t)),()=>{var x,y;(x=g.current)==null||x.disconnect(),(y=b.current)==null||y.disconnect()}},[t,e]),reactExports.useEffect(()=>{if(t){const x=y=>{isParent(y.target,t)&&(m(),h(!1))};return t.addEventListener("transitionend",x),()=>{t.removeEventListener("transitionend",x)}}},[t]),useTimeout(()=>{getEnv()!=="test"&&u(!0)},20,{autoInvoke:!0}),useMutationObserver(x=>{x.forEach(y=>{y.type==="attributes"&&y.attributeName==="dir"&&m()})},{attributes:!0,attributeFilter:["dir"]},()=>document.documentElement),{initialized:l,hidden:f}}var classes$m={root:"m_96b553a6"};const defaultProps$P={},varsResolver$n=(e,{transitionDuration:t})=>({root:{"--transition-duration":typeof t=="number"?`${t}ms`:t}}),FloatingIndicator=factory((e,t)=>{const i=useProps("FloatingIndicator",defaultProps$P,e),{classNames:a,className:o,style:l,styles:u,unstyled:f,vars:h,target:p,parent:m,transitionDuration:g,mod:b,displayAfterTransitionEnd:x,...y}=i,S=useStyles({name:"FloatingIndicator",classes:classes$m,props:i,className:o,style:l,classNames:a,styles:u,unstyled:f,vars:h,varsResolver:varsResolver$n}),E=reactExports.useRef(null),{initialized:w,hidden:_}=useFloatingIndicator({target:p,parent:m,ref:E,displayAfterTransitionEnd:x}),O=useMergedRef(t,E);return!p||!m?null:jsxRuntimeExports.jsx(Box,{ref:O,mod:[{initialized:w,hidden:_},b],...S("root"),...y})});FloatingIndicator.displayName="@mantine/core/FloatingIndicator";FloatingIndicator.classes=classes$m;function AccordionChevron({style:e,size:t=16,...i}){return jsxRuntimeExports.jsx("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{...e,width:rem(t),height:rem(t),display:"block"},...i,children:jsxRuntimeExports.jsx("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}AccordionChevron.displayName="@mantine/core/AccordionChevron";var classes$l={root:"m_66836ed3",wrapper:"m_a5d60502",body:"m_667c2793",title:"m_6a03f287",label:"m_698f4f23",icon:"m_667f2a6a",message:"m_7fa78076",closeButton:"m_87f54839"};const defaultProps$O={},varsResolver$m=(e,{radius:t,color:i,variant:a,autoContrast:o})=>{const l=e.variantColorResolver({color:i||e.primaryColor,theme:e,variant:a||"light",autoContrast:o});return{root:{"--alert-radius":t===void 0?void 0:getRadius(t),"--alert-bg":i||a?l.background:void 0,"--alert-color":l.color,"--alert-bd":i||a?l.border:void 0}}},Alert=factory((e,t)=>{const i=useProps("Alert",defaultProps$O,e),{classNames:a,className:o,style:l,styles:u,unstyled:f,vars:h,radius:p,color:m,title:g,children:b,id:x,icon:y,withCloseButton:S,onClose:E,closeButtonLabel:w,variant:_,autoContrast:O,...k}=i,A=useStyles({name:"Alert",classes:classes$l,props:i,className:o,style:l,classNames:a,styles:u,unstyled:f,vars:h,varsResolver:varsResolver$m}),D=useId$1(x),R=g&&`${D}-title`||void 0,T=`${D}-body`;return jsxRuntimeExports.jsx(Box,{id:D,...A("root",{variant:_}),variant:_,ref:t,...k,role:"alert","aria-describedby":T,"aria-labelledby":R,children:jsxRuntimeExports.jsxs("div",{...A("wrapper"),children:[y&&jsxRuntimeExports.jsx("div",{...A("icon"),children:y}),jsxRuntimeExports.jsxs("div",{...A("body"),children:[g&&jsxRuntimeExports.jsx("div",{...A("title"),"data-with-close-button":S||void 0,children:jsxRuntimeExports.jsx("span",{id:R,...A("label"),children:g})}),b&&jsxRuntimeExports.jsx("div",{id:T,...A("message"),"data-variant":_,children:b})]}),S&&jsxRuntimeExports.jsx(CloseButton,{...A("closeButton"),onClick:E,variant:"transparent",size:16,iconSize:16,"aria-label":w,unstyled:f})]})})});Alert.classes=classes$l;Alert.displayName="@mantine/core/Alert";var classes$k={root:"m_b6d8b162"};function getTextTruncate(e){if(e==="start")return"start";if(e==="end"||e)return"end"}const defaultProps$N={inherit:!1},varsResolver$l=(e,{variant:t,lineClamp:i,gradient:a,size:o,color:l})=>({root:{"--text-fz":getFontSize(o),"--text-lh":getLineHeight(o),"--text-gradient":t==="gradient"?getGradient(a,e):void 0,"--text-line-clamp":typeof i=="number"?i.toString():void 0,"--text-color":l?getThemeColor(l,e):void 0}}),Text=polymorphicFactory((e,t)=>{const i=useProps("Text",defaultProps$N,e),{lineClamp:a,truncate:o,inline:l,inherit:u,gradient:f,span:h,__staticSelector:p,vars:m,className:g,style:b,classNames:x,styles:y,unstyled:S,variant:E,mod:w,size:_,...O}=i,k=useStyles({name:["Text",p],props:i,classes:classes$k,className:g,style:b,classNames:x,styles:y,unstyled:S,vars:m,varsResolver:varsResolver$l});return jsxRuntimeExports.jsx(Box,{...k("root",{focusable:!0}),ref:t,component:h?"span":"p",variant:E,mod:[{"data-truncate":getTextTruncate(o),"data-line-clamp":typeof a=="number","data-inline":l,"data-inherit":u},w],size:_,...O})});Text.classes=classes$k;Text.displayName="@mantine/core/Text";function parseItem(e){return typeof e=="string"?{value:e,label:e}:"value"in e&&!("label"in e)?{value:e.value,label:e.value,disabled:e.disabled}:typeof e=="number"?{value:e.toString(),label:e.toString()}:"group"in e?{group:e.group,items:e.items.map(t=>parseItem(t))}:e}function getParsedComboboxData(e){return e?e.map(t=>parseItem(t)):[]}function getOptionsLockup(e){return e.reduce((t,i)=>"group"in i?{...t,...getOptionsLockup(i.items)}:(t[i.value]=i,t),{})}var classes$j={dropdown:"m_88b62a41",search:"m_985517d8",options:"m_b2821a6e",option:"m_92253aa5",empty:"m_2530cd1d",header:"m_858f94bd",footer:"m_82b967cb",group:"m_254f3e4f",groupLabel:"m_2bb2e9e5",chevron:"m_2943220b",optionsDropdownOption:"m_390b5f4",optionsDropdownCheckIcon:"m_8ee53fc2"};const defaultProps$M={error:null},varsResolver$k=(e,{size:t,color:i})=>({chevron:{"--combobox-chevron-size":getSize(t,"combobox-chevron-size"),"--combobox-chevron-color":i?getThemeColor(i,e):void 0}}),ComboboxChevron=factory((e,t)=>{const i=useProps("ComboboxChevron",defaultProps$M,e),{size:a,error:o,style:l,className:u,classNames:f,styles:h,unstyled:p,vars:m,mod:g,...b}=i,x=useStyles({name:"ComboboxChevron",classes:classes$j,props:i,style:l,className:u,classNames:f,styles:h,unstyled:p,vars:m,varsResolver:varsResolver$k,rootSelector:"chevron"});return jsxRuntimeExports.jsx(Box,{component:"svg",...b,...x("chevron"),size:a,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",mod:["combobox-chevron",{error:o},g],ref:t,children:jsxRuntimeExports.jsx("path",{d:"M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})});ComboboxChevron.classes=classes$j;ComboboxChevron.displayName="@mantine/core/ComboboxChevron";const[ComboboxProvider,useComboboxContext]=createSafeContext("Combobox component was not found in tree"),ComboboxClearButton=reactExports.forwardRef(({size:e,onMouseDown:t,onClick:i,onClear:a,...o},l)=>jsxRuntimeExports.jsx(Input.ClearButton,{ref:l,tabIndex:-1,"aria-hidden":!0,...o,onMouseDown:u=>{u.preventDefault(),t==null||t(u)},onClick:u=>{a(),i==null||i(u)}}));ComboboxClearButton.displayName="@mantine/core/ComboboxClearButton";const defaultProps$L={},ComboboxDropdown=factory((e,t)=>{const{classNames:i,styles:a,className:o,style:l,hidden:u,...f}=useProps("ComboboxDropdown",defaultProps$L,e),h=useComboboxContext();return jsxRuntimeExports.jsx(Popover.Dropdown,{...f,ref:t,role:"presentation","data-hidden":u||void 0,...h.getStyles("dropdown",{className:o,style:l,classNames:i,styles:a})})});ComboboxDropdown.classes=classes$j;ComboboxDropdown.displayName="@mantine/core/ComboboxDropdown";const defaultProps$K={refProp:"ref"},ComboboxDropdownTarget=factory((e,t)=>{const{children:i,refProp:a}=useProps("ComboboxDropdownTarget",defaultProps$K,e);if(useComboboxContext(),!isElement$1(i))throw new Error("Combobox.DropdownTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");return jsxRuntimeExports.jsx(Popover.Target,{ref:t,refProp:a,children:i})});ComboboxDropdownTarget.displayName="@mantine/core/ComboboxDropdownTarget";const defaultProps$J={},ComboboxEmpty=factory((e,t)=>{const{classNames:i,className:a,style:o,styles:l,vars:u,...f}=useProps("ComboboxEmpty",defaultProps$J,e),h=useComboboxContext();return jsxRuntimeExports.jsx(Box,{ref:t,...h.getStyles("empty",{className:a,classNames:i,styles:l,style:o}),...f})});ComboboxEmpty.classes=classes$j;ComboboxEmpty.displayName="@mantine/core/ComboboxEmpty";function useComboboxTargetProps({onKeyDown:e,withKeyboardNavigation:t,withAriaAttributes:i,withExpandedAttribute:a,targetType:o,autoComplete:l}){const u=useComboboxContext(),[f,h]=reactExports.useState(null),p=g=>{if(e==null||e(g),!u.readOnly&&t){if(g.nativeEvent.isComposing)return;if(g.nativeEvent.code==="ArrowDown"&&(g.preventDefault(),u.store.dropdownOpened?h(u.store.selectNextOption()):(u.store.openDropdown("keyboard"),h(u.store.selectActiveOption()),u.store.updateSelectedOptionIndex("selected",{scrollIntoView:!0}))),g.nativeEvent.code==="ArrowUp"&&(g.preventDefault(),u.store.dropdownOpened?h(u.store.selectPreviousOption()):(u.store.openDropdown("keyboard"),h(u.store.selectActiveOption()),u.store.updateSelectedOptionIndex("selected",{scrollIntoView:!0}))),g.nativeEvent.code==="Enter"||g.nativeEvent.code==="NumpadEnter"){if(g.nativeEvent.keyCode===229)return;const b=u.store.getSelectedOptionIndex();u.store.dropdownOpened&&b!==-1?(g.preventDefault(),u.store.clickSelectedOption()):o==="button"&&(g.preventDefault(),u.store.openDropdown("keyboard"))}g.key==="Escape"&&u.store.closeDropdown("keyboard"),g.nativeEvent.code==="Space"&&o==="button"&&(g.preventDefault(),u.store.toggleDropdown("keyboard"))}};return{...i?{"aria-haspopup":"listbox","aria-expanded":a&&!!(u.store.listId&&u.store.dropdownOpened)||void 0,"aria-controls":u.store.dropdownOpened?u.store.listId:void 0,"aria-activedescendant":u.store.dropdownOpened&&f||void 0,autoComplete:l,"data-expanded":u.store.dropdownOpened||void 0,"data-mantine-stop-propagation":u.store.dropdownOpened||void 0}:{},onKeyDown:p}}const defaultProps$I={refProp:"ref",targetType:"input",withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:"off"},ComboboxEventsTarget=factory((e,t)=>{const{children:i,refProp:a,withKeyboardNavigation:o,withAriaAttributes:l,withExpandedAttribute:u,targetType:f,autoComplete:h,...p}=useProps("ComboboxEventsTarget",defaultProps$I,e);if(!isElement$1(i))throw new Error("Combobox.EventsTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const m=useComboboxContext(),g=useComboboxTargetProps({targetType:f,withAriaAttributes:l,withKeyboardNavigation:o,withExpandedAttribute:u,onKeyDown:i.props.onKeyDown,autoComplete:h});return reactExports.cloneElement(i,{...g,...p,[a]:useMergedRef(t,m.store.targetRef,getRefProp(i))})});ComboboxEventsTarget.displayName="@mantine/core/ComboboxEventsTarget";const defaultProps$H={},ComboboxFooter=factory((e,t)=>{const{classNames:i,className:a,style:o,styles:l,vars:u,...f}=useProps("ComboboxFooter",defaultProps$H,e),h=useComboboxContext();return jsxRuntimeExports.jsx(Box,{ref:t,...h.getStyles("footer",{className:a,classNames:i,style:o,styles:l}),...f,onMouseDown:p=>{p.preventDefault()}})});ComboboxFooter.classes=classes$j;ComboboxFooter.displayName="@mantine/core/ComboboxFooter";const defaultProps$G={},ComboboxGroup=factory((e,t)=>{const{classNames:i,className:a,style:o,styles:l,vars:u,children:f,label:h,...p}=useProps("ComboboxGroup",defaultProps$G,e),m=useComboboxContext();return jsxRuntimeExports.jsxs(Box,{ref:t,...m.getStyles("group",{className:a,classNames:i,style:o,styles:l}),...p,children:[h&&jsxRuntimeExports.jsx("div",{...m.getStyles("groupLabel",{classNames:i,styles:l}),children:h}),f]})});ComboboxGroup.classes=classes$j;ComboboxGroup.displayName="@mantine/core/ComboboxGroup";const defaultProps$F={},ComboboxHeader=factory((e,t)=>{const{classNames:i,className:a,style:o,styles:l,vars:u,...f}=useProps("ComboboxHeader",defaultProps$F,e),h=useComboboxContext();return jsxRuntimeExports.jsx(Box,{ref:t,...h.getStyles("header",{className:a,classNames:i,style:o,styles:l}),...f,onMouseDown:p=>{p.preventDefault()}})});ComboboxHeader.classes=classes$j;ComboboxHeader.displayName="@mantine/core/ComboboxHeader";function ComboboxHiddenInput({value:e,valuesDivider:t=",",...i}){return jsxRuntimeExports.jsx("input",{type:"hidden",value:Array.isArray(e)?e.join(t):e||"",...i})}ComboboxHiddenInput.displayName="@mantine/core/ComboboxHiddenInput";const defaultProps$E={},ComboboxOption=factory((e,t)=>{const i=useProps("ComboboxOption",defaultProps$E,e),{classNames:a,className:o,style:l,styles:u,vars:f,onClick:h,id:p,active:m,onMouseDown:g,onMouseOver:b,disabled:x,selected:y,mod:S,...E}=i,w=useComboboxContext(),_=reactExports.useId(),O=p||_;return jsxRuntimeExports.jsx(Box,{...w.getStyles("option",{className:o,classNames:a,styles:u,style:l}),...E,ref:t,id:O,mod:["combobox-option",{"combobox-active":m,"combobox-disabled":x,"combobox-selected":y},S],role:"option",onClick:k=>{var A;x?k.preventDefault():((A=w.onOptionSubmit)==null||A.call(w,i.value,i),h==null||h(k))},onMouseDown:k=>{k.preventDefault(),g==null||g(k)},onMouseOver:k=>{w.resetSelectionOnOptionHover&&w.store.resetSelectedOption(),b==null||b(k)}})});ComboboxOption.classes=classes$j;ComboboxOption.displayName="@mantine/core/ComboboxOption";const defaultProps$D={},ComboboxOptions=factory((e,t)=>{const i=useProps("ComboboxOptions",defaultProps$D,e),{classNames:a,className:o,style:l,styles:u,id:f,onMouseDown:h,labelledBy:p,...m}=i,g=useComboboxContext(),b=useId$1(f);return reactExports.useEffect(()=>{g.store.setListId(b)},[b]),jsxRuntimeExports.jsx(Box,{ref:t,...g.getStyles("options",{className:o,style:l,classNames:a,styles:u}),...m,id:b,role:"listbox","aria-labelledby":p,onMouseDown:x=>{x.preventDefault(),h==null||h(x)}})});ComboboxOptions.classes=classes$j;ComboboxOptions.displayName="@mantine/core/ComboboxOptions";const defaultProps$C={withAriaAttributes:!0,withKeyboardNavigation:!0},ComboboxSearch=factory((e,t)=>{const i=useProps("ComboboxSearch",defaultProps$C,e),{classNames:a,styles:o,unstyled:l,vars:u,withAriaAttributes:f,onKeyDown:h,withKeyboardNavigation:p,size:m,...g}=i,b=useComboboxContext(),x=b.getStyles("search"),y=useComboboxTargetProps({targetType:"input",withAriaAttributes:f,withKeyboardNavigation:p,withExpandedAttribute:!1,onKeyDown:h,autoComplete:"off"});return jsxRuntimeExports.jsx(Input,{ref:useMergedRef(t,b.store.searchRef),classNames:[{input:x.className},a],styles:[{input:x.style},o],size:m||b.size,...y,...g,__staticSelector:"Combobox"})});ComboboxSearch.classes=classes$j;ComboboxSearch.displayName="@mantine/core/ComboboxSearch";const defaultProps$B={refProp:"ref",targetType:"input",withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:"off"},ComboboxTarget=factory((e,t)=>{const{children:i,refProp:a,withKeyboardNavigation:o,withAriaAttributes:l,withExpandedAttribute:u,targetType:f,autoComplete:h,...p}=useProps("ComboboxTarget",defaultProps$B,e);if(!isElement$1(i))throw new Error("Combobox.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const m=useComboboxContext(),g=useComboboxTargetProps({targetType:f,withAriaAttributes:l,withKeyboardNavigation:o,withExpandedAttribute:u,onKeyDown:i.props.onKeyDown,autoComplete:h}),b=reactExports.cloneElement(i,{...g,...p});return jsxRuntimeExports.jsx(Popover.Target,{ref:useMergedRef(t,m.store.targetRef),children:b})});ComboboxTarget.displayName="@mantine/core/ComboboxTarget";function getPreviousIndex(e,t,i){for(let a=e-1;a>=0;a-=1)if(!t[a].hasAttribute("data-combobox-disabled"))return a;if(i){for(let a=t.length-1;a>-1;a-=1)if(!t[a].hasAttribute("data-combobox-disabled"))return a}return e}function getNextIndex(e,t,i){for(let a=e+1;a<t.length;a+=1)if(!t[a].hasAttribute("data-combobox-disabled"))return a;if(i){for(let a=0;a<t.length;a+=1)if(!t[a].hasAttribute("data-combobox-disabled"))return a}return e}function getFirstIndex(e){for(let t=0;t<e.length;t+=1)if(!e[t].hasAttribute("data-combobox-disabled"))return t;return-1}function useCombobox({defaultOpened:e,opened:t,onOpenedChange:i,onDropdownClose:a,onDropdownOpen:o,loop:l=!0,scrollBehavior:u="instant"}={}){const[f,h]=useUncontrolled({value:t,defaultValue:e,finalValue:!1,onChange:i}),p=reactExports.useRef(null),m=reactExports.useRef(-1),g=reactExports.useRef(null),b=reactExports.useRef(null),x=reactExports.useRef(-1),y=reactExports.useRef(-1),S=reactExports.useRef(-1),E=reactExports.useCallback((B="unknown")=>{f||(h(!0),o==null||o(B))},[h,o,f]),w=reactExports.useCallback((B="unknown")=>{f&&(h(!1),a==null||a(B))},[h,a,f]),_=reactExports.useCallback((B="unknown")=>{f?w(B):E(B)},[w,E,f]),O=reactExports.useCallback(()=>{const B=document.querySelector(`#${p.current} [data-combobox-selected]`);B==null||B.removeAttribute("data-combobox-selected"),B==null||B.removeAttribute("aria-selected")},[]),k=reactExports.useCallback(B=>{const H=document.getElementById(p.current),Y=H==null?void 0:H.querySelectorAll("[data-combobox-option]");if(!Y)return null;const U=B>=Y.length?0:B<0?Y.length-1:B;return m.current=U,Y!=null&&Y[U]&&!Y[U].hasAttribute("data-combobox-disabled")?(O(),Y[U].setAttribute("data-combobox-selected","true"),Y[U].setAttribute("aria-selected","true"),Y[U].scrollIntoView({block:"nearest",behavior:u}),Y[U].id):null},[u,O]),A=reactExports.useCallback(()=>{const B=document.querySelector(`#${p.current} [data-combobox-active]`);if(B){const H=document.querySelectorAll(`#${p.current} [data-combobox-option]`),Y=Array.from(H).findIndex(U=>U===B);return k(Y)}return k(0)},[k]),D=reactExports.useCallback(()=>k(getNextIndex(m.current,document.querySelectorAll(`#${p.current} [data-combobox-option]`),l)),[k,l]),R=reactExports.useCallback(()=>k(getPreviousIndex(m.current,document.querySelectorAll(`#${p.current} [data-combobox-option]`),l)),[k,l]),T=reactExports.useCallback(()=>k(getFirstIndex(document.querySelectorAll(`#${p.current} [data-combobox-option]`))),[k]),j=reactExports.useCallback((B="selected",H)=>{S.current=window.setTimeout(()=>{var F;const Y=document.querySelectorAll(`#${p.current} [data-combobox-option]`),U=Array.from(Y).findIndex(X=>X.hasAttribute(`data-combobox-${B}`));m.current=U,H!=null&&H.scrollIntoView&&((F=Y[U])==null||F.scrollIntoView({block:"nearest",behavior:u}))},0)},[]),P=reactExports.useCallback(()=>{m.current=-1,O()},[O]),M=reactExports.useCallback(()=>{const B=document.querySelectorAll(`#${p.current} [data-combobox-option]`),H=B==null?void 0:B[m.current];H==null||H.click()},[]),I=reactExports.useCallback(B=>{p.current=B},[]),G=reactExports.useCallback(()=>{x.current=window.setTimeout(()=>g.current.focus(),0)},[]),ne=reactExports.useCallback(()=>{y.current=window.setTimeout(()=>b.current.focus(),0)},[]),Q=reactExports.useCallback(()=>m.current,[]);return reactExports.useEffect(()=>()=>{window.clearTimeout(x.current),window.clearTimeout(y.current),window.clearTimeout(S.current)},[]),{dropdownOpened:f,openDropdown:E,closeDropdown:w,toggleDropdown:_,selectedOptionIndex:m.current,getSelectedOptionIndex:Q,selectOption:k,selectFirstOption:T,selectActiveOption:A,selectNextOption:D,selectPreviousOption:R,resetSelectedOption:P,updateSelectedOptionIndex:j,listId:p.current,setListId:I,clickSelectedOption:M,searchRef:g,focusSearchInput:G,targetRef:b,focusTarget:ne}}const defaultProps$A={keepMounted:!0,withinPortal:!0,resetSelectionOnOptionHover:!1,width:"target",transitionProps:{transition:"fade",duration:0}},varsResolver$j=(e,{size:t,dropdownPadding:i})=>({options:{"--combobox-option-fz":getFontSize(t),"--combobox-option-padding":getSize(t,"combobox-option-padding")},dropdown:{"--combobox-padding":i===void 0?void 0:rem(i),"--combobox-option-fz":getFontSize(t),"--combobox-option-padding":getSize(t,"combobox-option-padding")}});function Combobox(e){const t=useProps("Combobox",defaultProps$A,e),{classNames:i,styles:a,unstyled:o,children:l,store:u,vars:f,onOptionSubmit:h,onClose:p,size:m,dropdownPadding:g,resetSelectionOnOptionHover:b,__staticSelector:x,readOnly:y,...S}=t,E=useCombobox(),w=u||E,_=useStyles({name:x||"Combobox",classes:classes$j,props:t,classNames:i,styles:a,unstyled:o,vars:f,varsResolver:varsResolver$j}),O=()=>{p==null||p(),w.closeDropdown()};return jsxRuntimeExports.jsx(ComboboxProvider,{value:{getStyles:_,store:w,onOptionSubmit:h,size:m,resetSelectionOnOptionHover:b,readOnly:y},children:jsxRuntimeExports.jsx(Popover,{opened:w.dropdownOpened,...S,onChange:k=>!k&&O(),withRoles:!1,unstyled:o,children:l})})}const extendCombobox=e=>e;Combobox.extend=extendCombobox;Combobox.classes=classes$j;Combobox.displayName="@mantine/core/Combobox";Combobox.Target=ComboboxTarget;Combobox.Dropdown=ComboboxDropdown;Combobox.Options=ComboboxOptions;Combobox.Option=ComboboxOption;Combobox.Search=ComboboxSearch;Combobox.Empty=ComboboxEmpty;Combobox.Chevron=ComboboxChevron;Combobox.Footer=ComboboxFooter;Combobox.Header=ComboboxHeader;Combobox.EventsTarget=ComboboxEventsTarget;Combobox.DropdownTarget=ComboboxDropdownTarget;Combobox.Group=ComboboxGroup;Combobox.ClearButton=ComboboxClearButton;Combobox.HiddenInput=ComboboxHiddenInput;var classes$i={root:"m_5f75b09e",body:"m_5f6e695e",labelWrapper:"m_d3ea56bb",label:"m_8ee546b8",description:"m_328f68c0",error:"m_8e8a99cc"};const InlineInputClasses=classes$i,InlineInput=reactExports.forwardRef(({__staticSelector:e,__stylesApiProps:t,className:i,classNames:a,styles:o,unstyled:l,children:u,label:f,description:h,id:p,disabled:m,error:g,size:b,labelPosition:x="left",bodyElement:y="div",labelElement:S="label",variant:E,style:w,vars:_,mod:O,...k},A)=>{const D=useStyles({name:e,props:t,className:i,style:w,classes:classes$i,classNames:a,styles:o,unstyled:l});return jsxRuntimeExports.jsx(Box,{...D("root"),ref:A,__vars:{"--label-fz":getFontSize(b),"--label-lh":getSize(b,"label-lh")},mod:[{"label-position":x},O],variant:E,size:b,...k,children:jsxRuntimeExports.jsxs(Box,{component:y,htmlFor:y==="label"?p:void 0,...D("body"),children:[u,jsxRuntimeExports.jsxs("div",{...D("labelWrapper"),"data-disabled":m||void 0,children:[f&&jsxRuntimeExports.jsx(Box,{component:S,htmlFor:S==="label"?p:void 0,...D("label"),"data-disabled":m||void 0,children:f}),h&&jsxRuntimeExports.jsx(Input.Description,{size:b,__inheritStyles:!1,...D("description"),children:h}),g&&typeof g!="boolean"&&jsxRuntimeExports.jsx(Input.Error,{size:b,__inheritStyles:!1,...D("error"),children:g})]})]})})});InlineInput.displayName="@mantine/core/InlineInput";const CheckboxGroupContext=reactExports.createContext(null),CheckboxGroupProvider=CheckboxGroupContext.Provider,useCheckboxGroupContext=()=>reactExports.useContext(CheckboxGroupContext),[CheckboxCardProvider,useCheckboxCardContext]=createOptionalContext();var classes$h={card:"m_26775b0a"};const defaultProps$z={withBorder:!0},varsResolver$i=(e,{radius:t})=>({card:{"--card-radius":getRadius(t)}}),CheckboxCard=factory((e,t)=>{const i=useProps("CheckboxCard",defaultProps$z,e),{classNames:a,className:o,style:l,styles:u,unstyled:f,vars:h,checked:p,mod:m,withBorder:g,value:b,onClick:x,defaultChecked:y,onChange:S,...E}=i,w=useStyles({name:"CheckboxCard",classes:classes$h,props:i,className:o,style:l,classNames:a,styles:u,unstyled:f,vars:h,varsResolver:varsResolver$i,rootSelector:"card"}),_=useCheckboxGroupContext(),O=typeof p=="boolean"?p:_?_.value.includes(b||""):void 0,[k,A]=useUncontrolled({value:O,defaultValue:y,finalValue:!1,onChange:S});return jsxRuntimeExports.jsx(CheckboxCardProvider,{value:{checked:k},children:jsxRuntimeExports.jsx(UnstyledButton,{ref:t,mod:[{"with-border":g,checked:k},m],...w("card"),...E,role:"checkbox","aria-checked":k,onClick:D=>{x==null||x(D),_==null||_.onChange(b||""),A(!k)}})})});CheckboxCard.displayName="@mantine/core/CheckboxCard";CheckboxCard.classes=classes$h;function InputsGroupFieldset({children:e,role:t}){const i=useInputWrapperContext();return i?jsxRuntimeExports.jsx("div",{role:t,"aria-labelledby":i.labelId,"aria-describedby":i.describedBy,children:e}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:e})}const defaultProps$y={},CheckboxGroup=factory((e,t)=>{const{value:i,defaultValue:a,onChange:o,size:l,wrapperProps:u,children:f,readOnly:h,...p}=useProps("CheckboxGroup",defaultProps$y,e),[m,g]=useUncontrolled({value:i,defaultValue:a,finalValue:[],onChange:o}),b=x=>{const y=typeof x=="string"?x:x.currentTarget.value;!h&&g(m.includes(y)?m.filter(S=>S!==y):[...m,y])};return jsxRuntimeExports.jsx(CheckboxGroupProvider,{value:{value:m,onChange:b,size:l},children:jsxRuntimeExports.jsx(Input.Wrapper,{size:l,ref:t,...u,...p,labelElement:"div",__staticSelector:"CheckboxGroup",children:jsxRuntimeExports.jsx(InputsGroupFieldset,{role:"group",children:f})})})});CheckboxGroup.classes=Input.Wrapper.classes;CheckboxGroup.displayName="@mantine/core/CheckboxGroup";function CheckIcon({size:e,style:t,...i}){const a=e!==void 0?{width:rem(e),height:rem(e),...t}:t;return jsxRuntimeExports.jsx("svg",{viewBox:"0 0 10 7",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:a,"aria-hidden":!0,...i,children:jsxRuntimeExports.jsx("path",{d:"M4 4.586L1.707 2.293A1 1 0 1 0 .293 3.707l3 3a.997.997 0 0 0 1.414 0l5-5A1 1 0 1 0 8.293.293L4 4.586z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}function CheckboxIcon({indeterminate:e,...t}){return e?jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 32 6","aria-hidden":!0,...t,children:jsxRuntimeExports.jsx("rect",{width:"32",height:"6",fill:"currentColor",rx:"3"})}):jsxRuntimeExports.jsx(CheckIcon,{...t})}var classes$g={indicator:"m_5e5256ee",icon:"m_1b1c543a","indicator--outline":"m_76e20374"};const defaultProps$x={icon:CheckboxIcon},varsResolver$h=(e,{radius:t,color:i,size:a,iconColor:o,variant:l,autoContrast:u})=>{const f=parseThemeColor({color:i||e.primaryColor,theme:e}),h=f.isThemeColor&&f.shade===void 0?`var(--mantine-color-${f.color}-outline)`:f.color;return{indicator:{"--checkbox-size":getSize(a,"checkbox-size"),"--checkbox-radius":t===void 0?void 0:getRadius(t),"--checkbox-color":l==="outline"?h:getThemeColor(i,e),"--checkbox-icon-color":o?getThemeColor(o,e):getAutoContrastValue(u,e)?getContrastColor({color:i,theme:e,autoContrast:u}):void 0}}},CheckboxIndicator=factory((e,t)=>{const i=useProps("CheckboxIndicator",defaultProps$x,e),{classNames:a,className:o,style:l,styles:u,unstyled:f,vars:h,icon:p,indeterminate:m,radius:g,color:b,iconColor:x,autoContrast:y,checked:S,mod:E,variant:w,disabled:_,...O}=i,k=p,A=useStyles({name:"CheckboxIndicator",classes:classes$g,props:i,className:o,style:l,classNames:a,styles:u,unstyled:f,vars:h,varsResolver:varsResolver$h,rootSelector:"indicator"}),D=useCheckboxCardContext(),R=typeof S=="boolean"||typeof m=="boolean"?S||m:(D==null?void 0:D.checked)||!1;return jsxRuntimeExports.jsx(Box,{ref:t,...A("indicator",{variant:w}),variant:w,mod:[{checked:R,disabled:_},E],...O,children:jsxRuntimeExports.jsx(k,{indeterminate:m,...A("icon")})})});CheckboxIndicator.displayName="@mantine/core/CheckboxIndicator";CheckboxIndicator.classes=classes$g;var classes$f={root:"m_bf2d988c",inner:"m_26062bec",input:"m_26063560",icon:"m_bf295423","input--outline":"m_215c4542"};const defaultProps$w={labelPosition:"right",icon:CheckboxIcon},varsResolver$g=(e,{radius:t,color:i,size:a,iconColor:o,variant:l,autoContrast:u})=>{const f=parseThemeColor({color:i||e.primaryColor,theme:e}),h=f.isThemeColor&&f.shade===void 0?`var(--mantine-color-${f.color}-outline)`:f.color;return{root:{"--checkbox-size":getSize(a,"checkbox-size"),"--checkbox-radius":t===void 0?void 0:getRadius(t),"--checkbox-color":l==="outline"?h:getThemeColor(i,e),"--checkbox-icon-color":o?getThemeColor(o,e):getAutoContrastValue(u,e)?getContrastColor({color:i,theme:e,autoContrast:u}):void 0}}},Checkbox=factory((e,t)=>{const i=useProps("Checkbox",defaultProps$w,e),{classNames:a,className:o,style:l,styles:u,unstyled:f,vars:h,color:p,label:m,id:g,size:b,radius:x,wrapperProps:y,checked:S,labelPosition:E,description:w,error:_,disabled:O,variant:k,indeterminate:A,icon:D,rootRef:R,iconColor:T,onChange:j,autoContrast:P,mod:M,...I}=i,G=useCheckboxGroupContext(),ne=b||(G==null?void 0:G.size),Q=D,B=useStyles({name:"Checkbox",props:i,classes:classes$f,className:o,style:l,classNames:a,styles:u,unstyled:f,vars:h,varsResolver:varsResolver$g}),{styleProps:H,rest:Y}=extractStyleProps(I),U=useId$1(g),F=G?{checked:G.value.includes(Y.value),onChange:L=>{G.onChange(L),j==null||j(L)}}:{},X=reactExports.useRef(null),z=t||X;return reactExports.useEffect(()=>{z&&"current"in z&&z.current&&(z.current.indeterminate=A||!1)},[A,z]),jsxRuntimeExports.jsx(InlineInput,{...B("root"),__staticSelector:"Checkbox",__stylesApiProps:i,id:U,size:ne,labelPosition:E,label:m,description:w,error:_,disabled:O,classNames:a,styles:u,unstyled:f,"data-checked":F.checked||S||void 0,variant:k,ref:R,mod:M,...H,...y,children:jsxRuntimeExports.jsxs(Box,{...B("inner"),mod:{"data-label-position":E},children:[jsxRuntimeExports.jsx(Box,{component:"input",id:U,ref:z,checked:S,disabled:O,mod:{error:!!_,indeterminate:A},...B("input",{focusable:!0,variant:k}),onChange:j,...Y,...F,type:"checkbox"}),jsxRuntimeExports.jsx(Q,{indeterminate:A,...B("icon")})]})})});Checkbox.classes={...classes$f,...InlineInputClasses};Checkbox.displayName="@mantine/core/Checkbox";Checkbox.Group=CheckboxGroup;Checkbox.Indicator=CheckboxIndicator;Checkbox.Card=CheckboxCard;function isOptionsGroup(e){return"group"in e}function defaultOptionsFilter({options:e,search:t,limit:i}){const a=t.trim().toLowerCase(),o=[];for(let l=0;l<e.length;l+=1){const u=e[l];if(o.length===i)return o;isOptionsGroup(u)&&o.push({group:u.group,items:defaultOptionsFilter({options:u.items,search:t,limit:i-o.length})}),isOptionsGroup(u)||u.label.toLowerCase().includes(a)&&o.push(u)}return o}function isEmptyComboboxData(e){if(e.length===0)return!0;for(const t of e)if(!("group"in t)||t.items.length>0)return!1;return!0}function validateOptions(e,t=new Set){if(Array.isArray(e))for(const i of e)if(isOptionsGroup(i))validateOptions(i.items,t);else{if(typeof i.value>"u")throw new Error("[@mantine/core] Each option must have value property");if(typeof i.value!="string")throw new Error(`[@mantine/core] Option value must be a string, other data formats are not supported, got ${typeof i.value}`);if(t.has(i.value))throw new Error(`[@mantine/core] Duplicate options are not supported. Option with value "${i.value}" was provided more than once`);t.add(i.value)}}function isValueChecked(e,t){return Array.isArray(e)?e.includes(t):e===t}function Option({data:e,withCheckIcon:t,value:i,checkIconPosition:a,unstyled:o,renderOption:l}){if(!isOptionsGroup(e)){const f=isValueChecked(i,e.value),h=t&&f&&jsxRuntimeExports.jsx(CheckIcon,{className:classes$j.optionsDropdownCheckIcon}),p=jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[a==="left"&&h,jsxRuntimeExports.jsx("span",{children:e.label}),a==="right"&&h]});return jsxRuntimeExports.jsx(Combobox.Option,{value:e.value,disabled:e.disabled,className:clsx({[classes$j.optionsDropdownOption]:!o}),"data-reverse":a==="right"||void 0,"data-checked":f||void 0,"aria-selected":f,active:f,children:typeof l=="function"?l({option:e,checked:f}):p})}const u=e.items.map(f=>jsxRuntimeExports.jsx(Option,{data:f,value:i,unstyled:o,withCheckIcon:t,checkIconPosition:a,renderOption:l},f.value));return jsxRuntimeExports.jsx(Combobox.Group,{label:e.group,children:u})}function OptionsDropdown({data:e,hidden:t,hiddenWhenEmpty:i,filter:a,search:o,limit:l,maxDropdownHeight:u,withScrollArea:f=!0,filterOptions:h=!0,withCheckIcon:p=!1,value:m,checkIconPosition:g,nothingFoundMessage:b,unstyled:x,labelId:y,renderOption:S,scrollAreaProps:E,"aria-label":w}){validateOptions(e);const O=typeof o=="string"?(a||defaultOptionsFilter)({options:e,search:h?o:"",limit:l??1/0}):e,k=isEmptyComboboxData(O),A=O.map(D=>jsxRuntimeExports.jsx(Option,{data:D,withCheckIcon:p,value:m,checkIconPosition:g,unstyled:x,renderOption:S},isOptionsGroup(D)?D.group:D.value));return jsxRuntimeExports.jsx(Combobox.Dropdown,{hidden:t||i&&k,"data-composed":!0,children:jsxRuntimeExports.jsxs(Combobox.Options,{labelledBy:y,"aria-label":w,children:[f?jsxRuntimeExports.jsx(ScrollArea.Autosize,{mah:u??220,type:"scroll",scrollbarSize:"var(--combobox-padding)",offsetScrollbars:"y",...E,children:A}):A,k&&b&&jsxRuntimeExports.jsx(Combobox.Empty,{children:b})]})})}var classes$e={root:"m_347db0ec","root--dot":"m_fbd81e3d",label:"m_5add502a",section:"m_91fdda9b"};const defaultProps$v={},varsResolver$f=(e,{radius:t,color:i,gradient:a,variant:o,size:l,autoContrast:u})=>{const f=e.variantColorResolver({color:i||e.primaryColor,theme:e,gradient:a,variant:o||"filled",autoContrast:u});return{root:{"--badge-height":getSize(l,"badge-height"),"--badge-padding-x":getSize(l,"badge-padding-x"),"--badge-fz":getSize(l,"badge-fz"),"--badge-radius":t===void 0?void 0:getRadius(t),"--badge-bg":i||o?f.background:void 0,"--badge-color":i||o?f.color:void 0,"--badge-bd":i||o?f.border:void 0,"--badge-dot-color":o==="dot"?getThemeColor(i,e):void 0}}},Badge=polymorphicFactory((e,t)=>{const i=useProps("Badge",defaultProps$v,e),{classNames:a,className:o,style:l,styles:u,unstyled:f,vars:h,radius:p,color:m,gradient:g,leftSection:b,rightSection:x,children:y,variant:S,fullWidth:E,autoContrast:w,circle:_,mod:O,...k}=i,A=useStyles({name:"Badge",props:i,classes:classes$e,className:o,style:l,classNames:a,styles:u,unstyled:f,vars:h,varsResolver:varsResolver$f});return jsxRuntimeExports.jsxs(Box,{variant:S,mod:[{block:E,circle:_,"with-right-section":!!x,"with-left-section":!!b},O],...A("root",{variant:S}),ref:t,...k,children:[b&&jsxRuntimeExports.jsx("span",{...A("section"),"data-position":"left",children:b}),jsxRuntimeExports.jsx("span",{...A("label"),children:y}),x&&jsxRuntimeExports.jsx("span",{...A("section"),"data-position":"right",children:x})]})});Badge.classes=classes$e;Badge.displayName="@mantine/core/Badge";var classes$d={root:"m_77c9d27d",inner:"m_80f1301b",label:"m_811560b9",section:"m_a74036a",loader:"m_a25b86ee",group:"m_80d6d844",groupSection:"m_70be2a01"};const defaultProps$u={orientation:"horizontal"},varsResolver$e=(e,{borderWidth:t})=>({group:{"--button-border-width":rem(t)}}),ButtonGroup=factory((e,t)=>{const i=useProps("ButtonGroup",defaultProps$u,e),{className:a,style:o,classNames:l,styles:u,unstyled:f,orientation:h,vars:p,borderWidth:m,variant:g,mod:b,...x}=useProps("ButtonGroup",defaultProps$u,e),y=useStyles({name:"ButtonGroup",props:i,classes:classes$d,className:a,style:o,classNames:l,styles:u,unstyled:f,vars:p,varsResolver:varsResolver$e,rootSelector:"group"});return jsxRuntimeExports.jsx(Box,{...y("group"),ref:t,variant:g,mod:[{"data-orientation":h},b],role:"group",...x})});ButtonGroup.classes=classes$d;ButtonGroup.displayName="@mantine/core/ButtonGroup";const defaultProps$t={},varsResolver$d=(e,{radius:t,color:i,gradient:a,variant:o,autoContrast:l,size:u})=>{const f=e.variantColorResolver({color:i||e.primaryColor,theme:e,gradient:a,variant:o||"filled",autoContrast:l});return{groupSection:{"--section-height":getSize(u,"section-height"),"--section-padding-x":getSize(u,"section-padding-x"),"--section-fz":u!=null&&u.includes("compact")?getFontSize(u.replace("compact-","")):getFontSize(u),"--section-radius":t===void 0?void 0:getRadius(t),"--section-bg":i||o?f.background:void 0,"--section-color":f.color,"--section-bd":i||o?f.border:void 0}}},ButtonGroupSection=factory((e,t)=>{const i=useProps("ButtonGroupSection",defaultProps$t,e),{className:a,style:o,classNames:l,styles:u,unstyled:f,vars:h,variant:p,gradient:m,radius:g,autoContrast:b,...x}=useProps("ButtonGroupSection",defaultProps$t,e),y=useStyles({name:"ButtonGroupSection",props:i,classes:classes$d,className:a,style:o,classNames:l,styles:u,unstyled:f,vars:h,varsResolver:varsResolver$d,rootSelector:"groupSection"});return jsxRuntimeExports.jsx(Box,{...y("groupSection"),ref:t,variant:p,...x})});ButtonGroupSection.classes=classes$d;ButtonGroupSection.displayName="@mantine/core/ButtonGroupSection";const loaderTransition={in:{opacity:1,transform:`translate(-50%, calc(-50% + ${rem(1)}))`},out:{opacity:0,transform:"translate(-50%, -200%)"},common:{transformOrigin:"center"},transitionProperty:"transform, opacity"},defaultProps$s={},varsResolver$c=(e,{radius:t,color:i,gradient:a,variant:o,size:l,justify:u,autoContrast:f})=>{const h=e.variantColorResolver({color:i||e.primaryColor,theme:e,gradient:a,variant:o||"filled",autoContrast:f});return{root:{"--button-justify":u,"--button-height":getSize(l,"button-height"),"--button-padding-x":getSize(l,"button-padding-x"),"--button-fz":l!=null&&l.includes("compact")?getFontSize(l.replace("compact-","")):getFontSize(l),"--button-radius":t===void 0?void 0:getRadius(t),"--button-bg":i||o?h.background:void 0,"--button-hover":i||o?h.hover:void 0,"--button-color":h.color,"--button-bd":i||o?h.border:void 0,"--button-hover-color":i||o?h.hoverColor:void 0}}},Button=polymorphicFactory((e,t)=>{const i=useProps("Button",defaultProps$s,e),{style:a,vars:o,className:l,color:u,disabled:f,children:h,leftSection:p,rightSection:m,fullWidth:g,variant:b,radius:x,loading:y,loaderProps:S,gradient:E,classNames:w,styles:_,unstyled:O,"data-disabled":k,autoContrast:A,mod:D,...R}=i,T=useStyles({name:"Button",props:i,classes:classes$d,className:l,style:a,classNames:w,styles:_,unstyled:O,vars:o,varsResolver:varsResolver$c}),j=!!p,P=!!m;return jsxRuntimeExports.jsxs(UnstyledButton,{ref:t,...T("root",{active:!f&&!y&&!k}),unstyled:O,variant:b,disabled:f||y,mod:[{disabled:f||k,loading:y,block:g,"with-left-section":j,"with-right-section":P},D],...R,children:[jsxRuntimeExports.jsx(Transition,{mounted:!!y,transition:loaderTransition,duration:150,children:M=>jsxRuntimeExports.jsx(Box,{component:"span",...T("loader",{style:M}),"aria-hidden":!0,children:jsxRuntimeExports.jsx(Loader,{color:"var(--button-color)",size:"calc(var(--button-height) / 1.8)",...S})})}),jsxRuntimeExports.jsxs("span",{...T("inner"),children:[p&&jsxRuntimeExports.jsx(Box,{component:"span",...T("section"),mod:{position:"left"},children:p}),jsxRuntimeExports.jsx(Box,{component:"span",mod:{loading:y},...T("label"),children:h}),m&&jsxRuntimeExports.jsx(Box,{component:"span",...T("section"),mod:{position:"right"},children:m})]})]})});Button.classes=classes$d;Button.displayName="@mantine/core/Button";Button.Group=ButtonGroup;Button.GroupSection=ButtonGroupSection;const[CardProvider,useCardContext]=createSafeContext("Card component was not found in tree");var classes$c={root:"m_e615b15f",section:"m_599a2148"};const defaultProps$r={},CardSection=polymorphicFactory((e,t)=>{const i=useProps("CardSection",defaultProps$r,e),{classNames:a,className:o,style:l,styles:u,vars:f,withBorder:h,inheritPadding:p,mod:m,...g}=i,b=useCardContext();return jsxRuntimeExports.jsx(Box,{ref:t,mod:[{"with-border":h,"inherit-padding":p},m],...b.getStyles("section",{className:o,style:l,styles:u,classNames:a}),...g})});CardSection.classes=classes$c;CardSection.displayName="@mantine/core/CardSection";const defaultProps$q={},varsResolver$b=(e,{padding:t})=>({root:{"--card-padding":getSpacing(t)}}),Card=polymorphicFactory((e,t)=>{const i=useProps("Card",defaultProps$q,e),{classNames:a,className:o,style:l,styles:u,unstyled:f,vars:h,children:p,padding:m,...g}=i,b=useStyles({name:"Card",props:i,classes:classes$c,className:o,style:l,classNames:a,styles:u,unstyled:f,vars:h,varsResolver:varsResolver$b}),x=reactExports.Children.toArray(p),y=x.map((S,E)=>typeof S=="object"&&S&&"type"in S&&S.type===CardSection?reactExports.cloneElement(S,{"data-first-section":E===0||void 0,"data-last-section":E===x.length-1||void 0}):S);return jsxRuntimeExports.jsx(CardProvider,{value:{getStyles:b},children:jsxRuntimeExports.jsx(Paper,{ref:t,unstyled:f,...b("root"),...g,children:y})})});Card.classes=classes$c;Card.displayName="@mantine/core/Card";Card.Section=CardSection;var classes$b={root:"m_4451eb3a"};const defaultProps$p={},Center=polymorphicFactory((e,t)=>{const i=useProps("Center",defaultProps$p,e),{classNames:a,className:o,style:l,styles:u,unstyled:f,vars:h,inline:p,mod:m,...g}=i,b=useStyles({name:"Center",props:i,classes:classes$b,className:o,style:l,classNames:a,styles:u,unstyled:f,vars:h});return jsxRuntimeExports.jsx(Box,{ref:t,mod:[{inline:p},m],...b("root"),...g})});Center.classes=classes$b;Center.displayName="@mantine/core/Center";function useDelayedHover({open:e,close:t,openDelay:i,closeDelay:a}){const o=reactExports.useRef(-1),l=reactExports.useRef(-1),u=()=>{window.clearTimeout(o.current),window.clearTimeout(l.current)},f=()=>{u(),i===0||i===void 0?e():o.current=window.setTimeout(e,i)},h=()=>{u(),a===0||a===void 0?t():l.current=window.setTimeout(t,a)};return reactExports.useEffect(()=>u,[]),{openDropdown:f,closeDropdown:h}}var classes$a={root:"m_9e117634"};const defaultProps$o={},varsResolver$a=(e,{radius:t,fit:i})=>({root:{"--image-radius":t===void 0?void 0:getRadius(t),"--image-object-fit":i}}),Image$1=polymorphicFactory((e,t)=>{const i=useProps("Image",defaultProps$o,e),{classNames:a,className:o,style:l,styles:u,unstyled:f,vars:h,onError:p,src:m,radius:g,fit:b,fallbackSrc:x,mod:y,...S}=i,[E,w]=reactExports.useState(!m);reactExports.useEffect(()=>w(!m),[m]);const _=useStyles({name:"Image",classes:classes$a,props:i,className:o,style:l,classNames:a,styles:u,unstyled:f,vars:h,varsResolver:varsResolver$a});return E&&x?jsxRuntimeExports.jsx(Box,{component:"img",ref:t,src:x,..._("root"),onError:p,mod:["fallback",y],...S}):jsxRuntimeExports.jsx(Box,{component:"img",ref:t,..._("root"),src:m,onError:O=>{p==null||p(O),w(!0)},mod:y,...S})});Image$1.classes=classes$a;Image$1.displayName="@mantine/core/Image";function _extends(){return _extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var a in i)({}).hasOwnProperty.call(i,a)&&(e[a]=i[a])}return e},_extends.apply(null,arguments)}var classes$9={root:"m_6e45937b",loader:"m_e8eb006c",overlay:"m_df587f17"};const defaultProps$n={transitionProps:{transition:"fade",duration:0},overlayProps:{backgroundOpacity:.75},zIndex:getDefaultZIndex("overlay")},varsResolver$9=(e,{zIndex:t})=>({root:{"--lo-z-index":t==null?void 0:t.toString()}}),LoadingOverlay=factory((e,t)=>{const i=useProps("LoadingOverlay",defaultProps$n,e),{classNames:a,className:o,style:l,styles:u,unstyled:f,vars:h,transitionProps:p,loaderProps:m,overlayProps:g,visible:b,zIndex:x,...y}=i,S=useMantineTheme(),E=useStyles({name:"LoadingOverlay",classes:classes$9,props:i,className:o,style:l,classNames:a,styles:u,unstyled:f,vars:h,varsResolver:varsResolver$9}),w={...defaultProps$n.overlayProps,...g};return jsxRuntimeExports.jsx(Transition,{transition:"fade",...p,mounted:!!b,children:_=>jsxRuntimeExports.jsxs(Box,{...E("root",{style:_}),ref:t,...y,children:[jsxRuntimeExports.jsx(Loader,{...E("loader"),unstyled:f,...m}),jsxRuntimeExports.jsx(Overlay,{...w,...E("overlay"),darkHidden:!0,unstyled:f,color:(g==null?void 0:g.color)||S.white}),jsxRuntimeExports.jsx(Overlay,{...w,...E("overlay"),lightHidden:!0,unstyled:f,color:(g==null?void 0:g.color)||S.colors.dark[5]})]})})});LoadingOverlay.classes=classes$9;LoadingOverlay.displayName="@mantine/core/LoadingOverlay";const[MenuContextProvider,useMenuContext]=createSafeContext("Menu component was not found in the tree");var classes$8={dropdown:"m_dc9b7c9f",label:"m_9bfac126",divider:"m_efdf90cb",item:"m_99ac2aa1",itemLabel:"m_5476e0d3",itemSection:"m_8b75e504",chevron:"m_b85b0bed"};const defaultProps$m={},MenuDivider=factory((e,t)=>{const{classNames:i,className:a,style:o,styles:l,vars:u,...f}=useProps("MenuDivider",defaultProps$m,e),h=useMenuContext();return jsxRuntimeExports.jsx(Box,{ref:t,...h.getStyles("divider",{className:a,style:o,styles:l,classNames:i}),...f})});MenuDivider.classes=classes$8;MenuDivider.displayName="@mantine/core/MenuDivider";const defaultProps$l={},MenuDropdown=factory((e,t)=>{const{classNames:i,className:a,style:o,styles:l,vars:u,onMouseEnter:f,onMouseLeave:h,onKeyDown:p,children:m,...g}=useProps("MenuDropdown",defaultProps$l,e),b=reactExports.useRef(null),x=useMenuContext(),y=createEventHandler(p,w=>{var _,O;(w.key==="ArrowUp"||w.key==="ArrowDown")&&(w.preventDefault(),(O=(_=b.current)==null?void 0:_.querySelectorAll("[data-menu-item]:not(:disabled)")[0])==null||O.focus())}),S=createEventHandler(f,()=>(x.trigger==="hover"||x.trigger==="click-hover")&&x.openDropdown()),E=createEventHandler(h,()=>(x.trigger==="hover"||x.trigger==="click-hover")&&x.closeDropdown());return jsxRuntimeExports.jsxs(Popover.Dropdown,{...g,onMouseEnter:S,onMouseLeave:E,role:"menu","aria-orientation":"vertical",ref:useMergedRef(t,b),...x.getStyles("dropdown",{className:a,style:o,styles:l,classNames:i,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,onKeyDown:y,children:[x.withInitialFocusPlaceholder&&jsxRuntimeExports.jsx("div",{tabIndex:-1,"data-autofocus":!0,"data-mantine-stop-propagation":!0,style:{outline:0}}),m]})});MenuDropdown.classes=classes$8;MenuDropdown.displayName="@mantine/core/MenuDropdown";const[SubMenuProvider,useSubMenuContext]=createOptionalContext(),defaultProps$k={},MenuItem=polymorphicFactory((e,t)=>{const{classNames:i,className:a,style:o,styles:l,vars:u,color:f,closeMenuOnClick:h,leftSection:p,rightSection:m,children:g,disabled:b,"data-disabled":x,...y}=useProps("MenuItem",defaultProps$k,e),S=useMenuContext(),E=useSubMenuContext(),w=useMantineTheme(),{dir:_}=useDirection(),O=reactExports.useRef(null),k=y,A=createEventHandler(k.onClick,()=>{x||(typeof h=="boolean"?h&&S.closeDropdownImmediately():S.closeOnItemClick&&S.closeDropdownImmediately())}),D=f?w.variantColorResolver({color:f,theme:w,variant:"light"}):void 0,R=f?parseThemeColor({color:f,theme:w}):null,T=createEventHandler(k.onKeyDown,j=>{j.key==="ArrowLeft"&&E&&(E.close(),E.focusParentItem())});return jsxRuntimeExports.jsxs(UnstyledButton,{onMouseDown:j=>j.preventDefault(),...y,unstyled:S.unstyled,tabIndex:S.menuItemTabIndex,...S.getStyles("item",{className:a,style:o,styles:l,classNames:i}),ref:useMergedRef(O,t),role:"menuitem",disabled:b,"data-menu-item":!0,"data-disabled":b||x||void 0,"data-mantine-stop-propagation":!0,onClick:A,onKeyDown:createScopedKeydownHandler({siblingSelector:"[data-menu-item]:not([data-disabled])",parentSelector:"[data-menu-dropdown]",activateOnFocus:!1,loop:S.loop,dir:_,orientation:"vertical",onKeyDown:T}),__vars:{"--menu-item-color":R!=null&&R.isThemeColor&&(R==null?void 0:R.shade)===void 0?`var(--mantine-color-${R.color}-6)`:D==null?void 0:D.color,"--menu-item-hover":D==null?void 0:D.hover},children:[p&&jsxRuntimeExports.jsx("div",{...S.getStyles("itemSection",{styles:l,classNames:i}),"data-position":"left",children:p}),g&&jsxRuntimeExports.jsx("div",{...S.getStyles("itemLabel",{styles:l,classNames:i}),children:g}),m&&jsxRuntimeExports.jsx("div",{...S.getStyles("itemSection",{styles:l,classNames:i}),"data-position":"right",children:m})]})});MenuItem.classes=classes$8;MenuItem.displayName="@mantine/core/MenuItem";const defaultProps$j={},MenuLabel=factory((e,t)=>{const{classNames:i,className:a,style:o,styles:l,vars:u,...f}=useProps("MenuLabel",defaultProps$j,e),h=useMenuContext();return jsxRuntimeExports.jsx(Box,{ref:t,...h.getStyles("label",{className:a,style:o,styles:l,classNames:i}),...f})});MenuLabel.classes=classes$8;MenuLabel.displayName="@mantine/core/MenuLabel";const defaultProps$i={},MenuSubDropdown=factory((e,t)=>{const{classNames:i,className:a,style:o,styles:l,vars:u,onMouseEnter:f,onMouseLeave:h,onKeyDown:p,children:m,...g}=useProps("MenuSubDropdown",defaultProps$i,e),b=reactExports.useRef(null),x=useMenuContext(),y=useSubMenuContext(),S=createEventHandler(f,y==null?void 0:y.open),E=createEventHandler(h,y==null?void 0:y.close);return jsxRuntimeExports.jsx(Popover.Dropdown,{...g,onMouseEnter:S,onMouseLeave:E,role:"menu","aria-orientation":"vertical",ref:useMergedRef(t,b),...x.getStyles("dropdown",{className:a,style:o,styles:l,classNames:i,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,children:m})});MenuSubDropdown.classes=classes$8;MenuSubDropdown.displayName="@mantine/core/MenuSubDropdown";const defaultProps$h={},MenuSubItem=polymorphicFactory((e,t)=>{const{classNames:i,className:a,style:o,styles:l,vars:u,color:f,leftSection:h,rightSection:p,children:m,disabled:g,"data-disabled":b,closeMenuOnClick:x,...y}=useProps("MenuSubItem",defaultProps$h,e),S=useMenuContext(),E=useSubMenuContext(),w=useMantineTheme(),{dir:_}=useDirection(),O=reactExports.useRef(null),k=y,A=f?w.variantColorResolver({color:f,theme:w,variant:"light"}):void 0,D=f?parseThemeColor({color:f,theme:w}):null,R=createEventHandler(k.onKeyDown,M=>{M.key==="ArrowRight"&&(E==null||E.open(),E==null||E.focusFirstItem()),M.key==="ArrowLeft"&&(E!=null&&E.parentContext)&&(E.parentContext.close(),E.parentContext.focusParentItem())}),T=createEventHandler(k.onClick,()=>{!b&&x&&S.closeDropdownImmediately()}),j=createEventHandler(k.onMouseEnter,E==null?void 0:E.open),P=createEventHandler(k.onMouseLeave,E==null?void 0:E.close);return jsxRuntimeExports.jsxs(UnstyledButton,{onMouseDown:M=>M.preventDefault(),...y,unstyled:S.unstyled,tabIndex:S.menuItemTabIndex,...S.getStyles("item",{className:a,style:o,styles:l,classNames:i}),ref:useMergedRef(O,t),role:"menuitem",disabled:g,"data-menu-item":!0,"data-sub-menu-item":!0,"data-disabled":g||b||void 0,"data-mantine-stop-propagation":!0,onMouseEnter:j,onMouseLeave:P,onClick:T,onKeyDown:createScopedKeydownHandler({siblingSelector:"[data-menu-item]:not([data-disabled])",parentSelector:"[data-menu-dropdown]",activateOnFocus:!1,loop:S.loop,dir:_,orientation:"vertical",onKeyDown:R}),__vars:{"--menu-item-color":D!=null&&D.isThemeColor&&(D==null?void 0:D.shade)===void 0?`var(--mantine-color-${D.color}-6)`:A==null?void 0:A.color,"--menu-item-hover":A==null?void 0:A.hover},children:[h&&jsxRuntimeExports.jsx("div",{...S.getStyles("itemSection",{styles:l,classNames:i}),"data-position":"left",children:h}),m&&jsxRuntimeExports.jsx("div",{...S.getStyles("itemLabel",{styles:l,classNames:i}),children:m}),jsxRuntimeExports.jsx("div",{...S.getStyles("itemSection",{styles:l,classNames:i}),"data-position":"right",children:p||jsxRuntimeExports.jsx(AccordionChevron,{...S.getStyles("chevron"),size:14})})]})});MenuSubItem.classes=classes$8;MenuSubItem.displayName="@mantine/core/MenuSubItem";function MenuSubTarget({children:e,refProp:t}){if(!isElement$1(e))throw new Error("Menu.Sub.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");return useMenuContext(),jsxRuntimeExports.jsx(Popover.Target,{refProp:t,popupType:"menu",children:e})}MenuSubTarget.displayName="@mantine/core/MenuSubTarget";const defaultProps$g={offset:0,position:"right-start",transitionProps:{duration:0}};function MenuSub(e){const{children:t,closeDelay:i,...a}=useProps("MenuSub",defaultProps$g,e),o=useId$1(),[l,{open:u,close:f}]=useDisclosure(!1),h=useSubMenuContext(),{openDropdown:p,closeDropdown:m}=useDelayedHover({open:u,close:f,closeDelay:i,openDelay:0}),g=()=>window.setTimeout(()=>{var x,y;(y=(x=document.getElementById(`${o}-dropdown`))==null?void 0:x.querySelectorAll("[data-menu-item]:not([data-disabled])")[0])==null||y.focus()},16),b=()=>window.setTimeout(()=>{var x;(x=document.getElementById(`${o}-target`))==null||x.focus()},16);return jsxRuntimeExports.jsx(SubMenuProvider,{value:{opened:l,close:m,open:p,focusFirstItem:g,focusParentItem:b,parentContext:h},children:jsxRuntimeExports.jsx(Popover,{opened:l,...a,withinPortal:!1,id:o,children:t})})}MenuSub.extend=e=>e;MenuSub.displayName="@mantine/core/MenuSub";MenuSub.Target=MenuSubTarget;MenuSub.Dropdown=MenuSubDropdown;MenuSub.Item=MenuSubItem;const defaultProps$f={refProp:"ref"},MenuTarget=reactExports.forwardRef((e,t)=>{const{children:i,refProp:a,...o}=useProps("MenuTarget",defaultProps$f,e);if(!isElement$1(i))throw new Error("Menu.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const l=useMenuContext(),u=i.props,f=createEventHandler(u.onClick,()=>{l.trigger==="click"?l.toggleDropdown():l.trigger==="click-hover"&&(l.setOpenedViaClick(!0),l.opened||l.openDropdown())}),h=createEventHandler(u.onMouseEnter,()=>(l.trigger==="hover"||l.trigger==="click-hover")&&l.openDropdown()),p=createEventHandler(u.onMouseLeave,()=>{(l.trigger==="hover"||l.trigger==="click-hover"&&!l.openedViaClick)&&l.closeDropdown()});return jsxRuntimeExports.jsx(Popover.Target,{refProp:a,popupType:"menu",ref:t,...o,children:reactExports.cloneElement(i,{onClick:f,onMouseEnter:h,onMouseLeave:p,"data-expanded":l.opened?!0:void 0})})});MenuTarget.displayName="@mantine/core/MenuTarget";const defaultProps$e={trapFocus:!0,closeOnItemClick:!0,withInitialFocusPlaceholder:!0,clickOutsideEvents:["mousedown","touchstart","keydown"],loop:!0,trigger:"click",openDelay:0,closeDelay:100,menuItemTabIndex:-1};function Menu(e){const t=useProps("Menu",defaultProps$e,e),{children:i,onOpen:a,onClose:o,opened:l,defaultOpened:u,trapFocus:f,onChange:h,closeOnItemClick:p,loop:m,closeOnEscape:g,trigger:b,openDelay:x,closeDelay:y,classNames:S,styles:E,unstyled:w,variant:_,vars:O,menuItemTabIndex:k,keepMounted:A,withInitialFocusPlaceholder:D,...R}=t,T=useStyles({name:"Menu",classes:classes$8,props:t,classNames:S,styles:E,unstyled:w}),[j,P]=useUncontrolled({value:l,defaultValue:u,finalValue:!1,onChange:h}),[M,I]=reactExports.useState(!1),G=()=>{P(!1),I(!1),j&&(o==null||o())},ne=()=>{P(!0),!j&&(a==null||a())},Q=()=>{j?G():ne()},{openDropdown:B,closeDropdown:H}=useDelayedHover({open:ne,close:G,closeDelay:y,openDelay:x}),Y=X=>getContextItemIndex("[data-menu-item]","[data-menu-dropdown]",X),{resolvedClassNames:U,resolvedStyles:F}=useResolvedStylesApi({classNames:S,styles:E,props:t});return jsxRuntimeExports.jsx(MenuContextProvider,{value:{getStyles:T,opened:j,toggleDropdown:Q,getItemIndex:Y,openedViaClick:M,setOpenedViaClick:I,closeOnItemClick:p,closeDropdown:b==="click"?G:H,openDropdown:b==="click"?ne:B,closeDropdownImmediately:G,loop:m,trigger:b,unstyled:w,menuItemTabIndex:k,withInitialFocusPlaceholder:D},children:jsxRuntimeExports.jsx(Popover,{...R,opened:j,onChange:Q,defaultOpened:u,trapFocus:A?!1:f,closeOnEscape:g,__staticSelector:"Menu",classNames:U,styles:F,unstyled:w,variant:_,keepMounted:A,children:i})})}Menu.extend=e=>e;Menu.withProps=getWithProps(Menu);Menu.classes=classes$8;Menu.displayName="@mantine/core/Menu";Menu.Item=MenuItem;Menu.Label=MenuLabel;Menu.Dropdown=MenuDropdown;Menu.Target=MenuTarget;Menu.Divider=MenuDivider;Menu.Sub=MenuSub;var classes$7={root:"m_a513464",icon:"m_a4ceffb",loader:"m_b0920b15",body:"m_a49ed24",title:"m_3feedf16",description:"m_3d733a3a",closeButton:"m_919a4d88"};const defaultProps$d={withCloseButton:!0},varsResolver$8=(e,{radius:t,color:i})=>({root:{"--notification-radius":t===void 0?void 0:getRadius(t),"--notification-color":i?getThemeColor(i,e):void 0}}),Notification=factory((e,t)=>{const i=useProps("Notification",defaultProps$d,e),{className:a,color:o,radius:l,loading:u,withCloseButton:f,withBorder:h,title:p,icon:m,children:g,onClose:b,closeButtonProps:x,classNames:y,style:S,styles:E,unstyled:w,variant:_,vars:O,mod:k,loaderProps:A,role:D,...R}=i,T=useStyles({name:"Notification",classes:classes$7,props:i,className:a,style:S,classNames:y,styles:E,unstyled:w,vars:O,varsResolver:varsResolver$8});return jsxRuntimeExports.jsxs(Box,{...T("root"),mod:[{"data-with-icon":!!m||u,"data-with-border":h},k],ref:t,variant:_,role:D||"alert",...R,children:[m&&!u&&jsxRuntimeExports.jsx("div",{...T("icon"),children:m}),u&&jsxRuntimeExports.jsx(Loader,{size:28,color:o,...A,...T("loader")}),jsxRuntimeExports.jsxs("div",{...T("body"),children:[p&&jsxRuntimeExports.jsx("div",{...T("title"),children:p}),jsxRuntimeExports.jsx(Box,{...T("description"),mod:{"data-with-title":!!p},children:g})]}),f&&jsxRuntimeExports.jsx(CloseButton,{iconSize:16,color:"gray",...x,unstyled:w,onClick:b,...T("closeButton")})]})});Notification.classes=classes$7;Notification.displayName="@mantine/core/Notification";function __rest(e,t){var i={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(i[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,a=Object.getOwnPropertySymbols(e);o<a.length;o++)t.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(i[a[o]]=e[a[o]]);return i}var SourceType;(function(e){e.event="event",e.props="prop"})(SourceType||(SourceType={}));function noop$3(){}function memoizeOnce(e){var t,i=void 0;return function(){for(var a=[],o=arguments.length;o--;)a[o]=arguments[o];return t&&a.length===t.length&&a.every(function(l,u){return l===t[u]})||(t=a,i=e.apply(void 0,a)),i}}function charIsNumber(e){return!!(e||"").match(/\d/)}function isNil(e){return e==null}function isNanValue(e){return typeof e=="number"&&isNaN(e)}function isNotValidValue(e){return isNil(e)||isNanValue(e)||typeof e=="number"&&!isFinite(e)}function escapeRegExp(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function getThousandsGroupRegex(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;case"thousand":default:return/(\d)(?=(\d{3})+(?!\d))/g}}function applyThousandSeparator(e,t,i){var a=getThousandsGroupRegex(i),o=e.search(/[1-9]/);return o=o===-1?e.length:o,e.substring(0,o)+e.substring(o,e.length).replace(a,"$1"+t)}function usePersistentCallback(e){var t=reactExports.useRef(e);t.current=e;var i=reactExports.useRef(function(){for(var a=[],o=arguments.length;o--;)a[o]=arguments[o];return t.current.apply(t,a)});return i.current}function splitDecimal(e,t){t===void 0&&(t=!0);var i=e[0]==="-",a=i&&t;e=e.replace("-","");var o=e.split("."),l=o[0],u=o[1]||"";return{beforeDecimal:l,afterDecimal:u,hasNegation:i,addNegation:a}}function fixLeadingZero(e){if(!e)return e;var t=e[0]==="-";t&&(e=e.substring(1,e.length));var i=e.split("."),a=i[0].replace(/^0+/,"")||"0",o=i[1]||"";return(t?"-":"")+a+(o?"."+o:"")}function limitToScale(e,t,i){for(var a="",o=i?"0":"",l=0;l<=t-1;l++)a+=e[l]||o;return a}function repeat(e,t){return Array(t+1).join(e)}function toNumericString(e){var t=e+"",i=t[0]==="-"?"-":"";i&&(t=t.substring(1));var a=t.split(/[eE]/g),o=a[0],l=a[1];if(l=Number(l),!l)return i+o;o=o.replace(".","");var u=1+l,f=o.length;return u<0?o="0."+repeat("0",Math.abs(u))+o:u>=f?o=o+repeat("0",u-f):o=(o.substring(0,u)||"0")+"."+o.substring(u),i+o}function roundToPrecision(e,t,i){if(["","-"].indexOf(e)!==-1)return e;var a=(e.indexOf(".")!==-1||i)&&t,o=splitDecimal(e),l=o.beforeDecimal,u=o.afterDecimal,f=o.hasNegation,h=parseFloat("0."+(u||"0")),p=u.length<=t?"0."+u:h.toFixed(t),m=p.split("."),g=l;l&&Number(m[0])&&(g=l.split("").reverse().reduce(function(S,E,w){return S.length>w?(Number(S[0])+Number(E)).toString()+S.substring(1,S.length):E+S},m[0]));var b=limitToScale(m[1]||"",t,i),x=f?"-":"",y=a?".":"";return""+x+g+y+b}function setCaretPosition(e,t){if(e.value=e.value,e!==null){if(e.createTextRange){var i=e.createTextRange();return i.move("character",t),i.select(),!0}return e.selectionStart||e.selectionStart===0?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}var findChangeRange=memoizeOnce(function(e,t){for(var i=0,a=0,o=e.length,l=t.length;e[i]===t[i]&&i<o;)i++;for(;e[o-1-a]===t[l-1-a]&&l-a>i&&o-a>i;)a++;return{from:{start:i,end:o-a},to:{start:i,end:l-a}}}),findChangedRangeFromCaretPositions=function(e,t){var i=Math.min(e.selectionStart,t);return{from:{start:i,end:e.selectionEnd},to:{start:i,end:t}}};function clamp$1(e,t,i){return Math.min(Math.max(e,t),i)}function geInputCaretPosition(e){return Math.max(e.selectionStart,e.selectionEnd)}function addInputMode(){return typeof navigator<"u"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function getDefaultChangeMeta(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function defaultIsCharacterSame(e){var t=e.currentValue,i=e.formattedValue,a=e.currentValueIndex,o=e.formattedValueIndex;return t[a]===i[o]}function getCaretPosition(e,t,i,a,o,l,u){u===void 0&&(u=defaultIsCharacterSame);var f=o.findIndex(function(k){return k}),h=e.slice(0,f);!t&&!i.startsWith(h)&&(t=h,i=h+i,a=a+h.length);for(var p=i.length,m=e.length,g={},b=new Array(p),x=0;x<p;x++){b[x]=-1;for(var y=0,S=m;y<S;y++){var E=u({currentValue:i,lastValue:t,formattedValue:e,currentValueIndex:x,formattedValueIndex:y});if(E&&g[y]!==!0){b[x]=y,g[y]=!0;break}}}for(var w=a;w<p&&(b[w]===-1||!l(i[w]));)w++;var _=w===p||b[w]===-1?m:b[w];for(w=a-1;w>0&&b[w]===-1;)w--;var O=w===-1||b[w]===-1?0:b[w]+1;return O>_?_:a-O<_-a?O:_}function getCaretPosInBoundary(e,t,i,a){var o=e.length;if(t=clamp$1(t,0,o),a==="left"){for(;t>=0&&!i[t];)t--;t===-1&&(t=i.indexOf(!0))}else{for(;t<=o&&!i[t];)t++;t>o&&(t=i.lastIndexOf(!0))}return t===-1&&(t=o),t}function caretUnknownFormatBoundary(e){for(var t=Array.from({length:e.length+1}).map(function(){return!0}),i=0,a=t.length;i<a;i++)t[i]=!!(charIsNumber(e[i])||charIsNumber(e[i-1]));return t}function useInternalValues(e,t,i,a,o,l){l===void 0&&(l=noop$3);var u=usePersistentCallback(function(y,S){var E,w;return isNotValidValue(y)?(w="",E=""):typeof y=="number"||S?(w=typeof y=="number"?toNumericString(y):y,E=a(w)):(w=o(y,void 0),E=a(w)),{formattedValue:E,numAsString:w}}),f=reactExports.useState(function(){return u(isNil(e)?t:e,i)}),h=f[0],p=f[1],m=function(y,S){y.formattedValue!==h.formattedValue&&p({formattedValue:y.formattedValue,numAsString:y.value}),l(y,S)},g=e,b=i;isNil(e)&&(g=h.numAsString,b=!0);var x=u(g,b);return reactExports.useMemo(function(){p(x)},[x.formattedValue]),[h,m]}function defaultRemoveFormatting(e){return e.replace(/[^0-9]/g,"")}function defaultFormat(e){return e}function NumberFormatBase(e){var t=e.type;t===void 0&&(t="text");var i=e.displayType;i===void 0&&(i="input");var a=e.customInput,o=e.renderText,l=e.getInputRef,u=e.format;u===void 0&&(u=defaultFormat);var f=e.removeFormatting;f===void 0&&(f=defaultRemoveFormatting);var h=e.defaultValue,p=e.valueIsNumericString,m=e.onValueChange,g=e.isAllowed,b=e.onChange;b===void 0&&(b=noop$3);var x=e.onKeyDown;x===void 0&&(x=noop$3);var y=e.onMouseUp;y===void 0&&(y=noop$3);var S=e.onFocus;S===void 0&&(S=noop$3);var E=e.onBlur;E===void 0&&(E=noop$3);var w=e.value,_=e.getCaretBoundary;_===void 0&&(_=caretUnknownFormatBoundary);var O=e.isValidInputCharacter;O===void 0&&(O=charIsNumber);var k=e.isCharacterSame,A=__rest(e,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter","isCharacterSame"]),D=useInternalValues(w,h,!!p,u,f,m),R=D[0],T=R.formattedValue,j=R.numAsString,P=D[1],M=reactExports.useRef(),I=reactExports.useRef({formattedValue:T,numAsString:j}),G=function(se,W){I.current={formattedValue:se.formattedValue,numAsString:se.value},P(se,W)},ne=reactExports.useState(!1),Q=ne[0],B=ne[1],H=reactExports.useRef(null),Y=reactExports.useRef({setCaretTimeout:null,focusTimeout:null});reactExports.useEffect(function(){return B(!0),function(){clearTimeout(Y.current.setCaretTimeout),clearTimeout(Y.current.focusTimeout)}},[]);var U=u,F=function(se,W){var ee=parseFloat(W);return{formattedValue:se,value:W,floatValue:isNaN(ee)?void 0:ee}},X=function(se,W,ee){se.selectionStart===0&&se.selectionEnd===se.value.length||(setCaretPosition(se,W),Y.current.setCaretTimeout=setTimeout(function(){se.value===ee&&se.selectionStart!==W&&setCaretPosition(se,W)},0))},z=function(se,W,ee){return getCaretPosInBoundary(se,W,_(se),ee)},L=function(se,W,ee){var de=_(W),pe=getCaretPosition(W,T,se,ee,de,O,k);return pe=getCaretPosInBoundary(W,pe,de),pe},$=function(se){var W=se.formattedValue;W===void 0&&(W="");var ee=se.input,de=se.source,pe=se.event,ve=se.numAsString,Te;if(ee){var oe=se.inputValue||ee.value,ie=geInputCaretPosition(ee);ee.value=W,Te=L(oe,W,ie),Te!==void 0&&X(ee,Te,W)}W!==T&&G(F(W,ve),{event:pe,source:de})};reactExports.useEffect(function(){var se=I.current,W=se.formattedValue,ee=se.numAsString;(T!==W||j!==ee)&&G(F(T,j),{event:void 0,source:SourceType.props})},[T,j]);var V=H.current?geInputCaretPosition(H.current):void 0,K=typeof window<"u"?reactExports.useLayoutEffect:reactExports.useEffect;K(function(){var se=H.current;if(T!==I.current.formattedValue&&se){var W=L(I.current.formattedValue,T,V);se.value=T,X(se,W,T)}},[T]);var te=function(se,W,ee){var de=W.target,pe=M.current?findChangedRangeFromCaretPositions(M.current,de.selectionEnd):findChangeRange(T,se),ve=Object.assign(Object.assign({},pe),{lastValue:T}),Te=f(se,ve),oe=U(Te);if(Te=f(oe,void 0),g&&!g(F(oe,Te))){var ie=W.target,Fe=geInputCaretPosition(ie),Le=L(se,T,Fe);return ie.value=T,X(ie,Le,T),!1}return $({formattedValue:oe,numAsString:Te,inputValue:se,event:W,source:ee,input:W.target}),!0},J=function(se,W){W===void 0&&(W=0);var ee=se.selectionStart,de=se.selectionEnd;M.current={selectionStart:ee,selectionEnd:de+W}},ce=function(se){var W=se.target,ee=W.value,de=te(ee,se,SourceType.event);de&&b(se),M.current=void 0},ue=function(se){var W=se.target,ee=se.key,de=W.selectionStart,pe=W.selectionEnd,ve=W.value;ve===void 0&&(ve="");var Te;ee==="ArrowLeft"||ee==="Backspace"?Te=Math.max(de-1,0):ee==="ArrowRight"?Te=Math.min(de+1,ve.length):ee==="Delete"&&(Te=de);var oe=0;ee==="Delete"&&de===pe&&(oe=1);var ie=ee==="ArrowLeft"||ee==="ArrowRight";if(Te===void 0||de!==pe&&!ie){x(se),J(W,oe);return}var Fe=Te;if(ie){var Le=ee==="ArrowLeft"?"left":"right";Fe=z(ve,Te,Le),Fe!==Te&&se.preventDefault()}else ee==="Delete"&&!O(ve[Te])?Fe=z(ve,Te,"right"):ee==="Backspace"&&!O(ve[Te])&&(Fe=z(ve,Te,"left"));Fe!==Te&&X(W,Fe,ve),x(se),J(W,oe)},we=function(se){var W=se.target,ee=function(){var de=W.selectionStart,pe=W.selectionEnd,ve=W.value;if(ve===void 0&&(ve=""),de===pe){var Te=z(ve,de);Te!==de&&X(W,Te,ve)}};ee(),requestAnimationFrame(function(){ee()}),y(se),J(W)},Ee=function(se){se.persist&&se.persist();var W=se.target,ee=se.currentTarget;H.current=W,Y.current.focusTimeout=setTimeout(function(){var de=W.selectionStart,pe=W.selectionEnd,ve=W.value;ve===void 0&&(ve="");var Te=z(ve,de);Te!==de&&!(de===0&&pe===ve.length)&&X(W,Te,ve),S(Object.assign(Object.assign({},se),{currentTarget:ee}))},0)},De=function(se){H.current=null,clearTimeout(Y.current.focusTimeout),clearTimeout(Y.current.setCaretTimeout),E(se)},je=Q&&addInputMode()?"numeric":void 0,Pe=Object.assign({inputMode:je},A,{type:t,value:T,onChange:ce,onKeyDown:ue,onMouseUp:we,onFocus:Ee,onBlur:De});if(i==="text")return o?React.createElement(React.Fragment,null,o(T,A)||null):React.createElement("span",Object.assign({},A,{ref:l}),T);if(a){var ge=a;return React.createElement(ge,Object.assign({},Pe,{ref:l}))}return React.createElement("input",Object.assign({},Pe,{ref:l}))}function format(e,t){var i=t.decimalScale,a=t.fixedDecimalScale,o=t.prefix;o===void 0&&(o="");var l=t.suffix;l===void 0&&(l="");var u=t.allowNegative,f=t.thousandsGroupStyle;if(f===void 0&&(f="thousand"),e===""||e==="-")return e;var h=getSeparators(t),p=h.thousandSeparator,m=h.decimalSeparator,g=i!==0&&e.indexOf(".")!==-1||i&&a,b=splitDecimal(e,u),x=b.beforeDecimal,y=b.afterDecimal,S=b.addNegation;return i!==void 0&&(y=limitToScale(y,i,!!a)),p&&(x=applyThousandSeparator(x,p,f)),o&&(x=o+x),l&&(y=y+l),S&&(x="-"+x),e=x+(g&&m||"")+y,e}function getSeparators(e){var t=e.decimalSeparator;t===void 0&&(t=".");var i=e.thousandSeparator,a=e.allowedDecimalSeparators;return i===!0&&(i=","),a||(a=[t,"."]),{decimalSeparator:t,thousandSeparator:i,allowedDecimalSeparators:a}}function handleNegation(e,t){e===void 0&&(e="");var i=new RegExp("(-)"),a=new RegExp("(-)(.)*(-)"),o=i.test(e),l=a.test(e);return e=e.replace(/-/g,""),o&&!l&&t&&(e="-"+e),e}function getNumberRegex(e,t){return new RegExp("(^-)|[0-9]|"+escapeRegExp(e),"g")}function isNumericString(e,t,i){return e===""?!0:!(t!=null&&t.match(/\d/))&&!(i!=null&&i.match(/\d/))&&typeof e=="string"&&!isNaN(Number(e))}function removeFormatting(e,t,i){var a;t===void 0&&(t=getDefaultChangeMeta(e));var o=i.allowNegative,l=i.prefix;l===void 0&&(l="");var u=i.suffix;u===void 0&&(u="");var f=i.decimalScale,h=t.from,p=t.to,m=p.start,g=p.end,b=getSeparators(i),x=b.allowedDecimalSeparators,y=b.decimalSeparator,S=e[g]===y;if(charIsNumber(e)&&(e===l||e===u)&&t.lastValue==="")return e;if(g-m===1&&x.indexOf(e[m])!==-1){var E=f===0?"":y;e=e.substring(0,m)+E+e.substring(m+1,e.length)}var w=function(H,Y,U){var F=!1,X=!1;l.startsWith("-")?F=!1:H.startsWith("--")?(F=!1,X=!0):u.startsWith("-")&&H.length===u.length?F=!1:H[0]==="-"&&(F=!0);var z=F?1:0;return X&&(z=2),z&&(H=H.substring(z),Y-=z,U-=z),{value:H,start:Y,end:U,hasNegation:F}},_=w(e,m,g),O=_.hasNegation;a=_,e=a.value,m=a.start,g=a.end;var k=w(t.lastValue,h.start,h.end),A=k.start,D=k.end,R=k.value,T=e.substring(m,g);e.length&&R.length&&(A>R.length-u.length||D<l.length)&&!(T&&u.startsWith(T))&&(e=R);var j=0;e.startsWith(l)?j+=l.length:m<l.length&&(j=m),e=e.substring(j),g-=j;var P=e.length,M=e.length-u.length;e.endsWith(u)?P=M:(g>M||g>e.length-u.length)&&(P=g),e=e.substring(0,P),e=handleNegation(O?"-"+e:e,o),e=(e.match(getNumberRegex(y))||[]).join("");var I=e.indexOf(y);e=e.replace(new RegExp(escapeRegExp(y),"g"),function(H,Y){return Y===I?".":""});var G=splitDecimal(e,o),ne=G.beforeDecimal,Q=G.afterDecimal,B=G.addNegation;return p.end-p.start<h.end-h.start&&ne===""&&S&&!parseFloat(Q)&&(e=B?"-":""),e}function getCaretBoundary(e,t){var i=t.prefix;i===void 0&&(i="");var a=t.suffix;a===void 0&&(a="");var o=Array.from({length:e.length+1}).map(function(){return!0}),l=e[0]==="-";o.fill(!1,0,i.length+(l?1:0));var u=e.length;return o.fill(!1,u-a.length+1,u+1),o}function validateAndUpdateProps(e){var t=getSeparators(e),i=t.thousandSeparator,a=t.decimalSeparator,o=e.prefix;o===void 0&&(o="");var l=e.allowNegative;if(l===void 0&&(l=!0),i===a)throw new Error(`
|
||
Decimal separator can't be same as thousand separator.
|
||
thousandSeparator: `+i+` (thousandSeparator = {true} is same as thousandSeparator = ",")
|
||
decimalSeparator: `+a+` (default value for decimalSeparator is .)
|
||
`);return o.startsWith("-")&&l&&(console.error(`
|
||
Prefix can't start with '-' when allowNegative is true.
|
||
prefix: `+o+`
|
||
allowNegative: `+l+`
|
||
`),l=!1),Object.assign(Object.assign({},e),{allowNegative:l})}function useNumericFormat(e){e=validateAndUpdateProps(e),e.decimalSeparator,e.allowedDecimalSeparators,e.thousandsGroupStyle;var t=e.suffix,i=e.allowNegative,a=e.allowLeadingZeros,o=e.onKeyDown;o===void 0&&(o=noop$3);var l=e.onBlur;l===void 0&&(l=noop$3);var u=e.thousandSeparator,f=e.decimalScale,h=e.fixedDecimalScale,p=e.prefix;p===void 0&&(p="");var m=e.defaultValue,g=e.value,b=e.valueIsNumericString,x=e.onValueChange,y=__rest(e,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),S=getSeparators(e),E=S.decimalSeparator,w=S.allowedDecimalSeparators,_=function(B){return format(B,e)},O=function(B,H){return removeFormatting(B,H,e)},k=isNil(g)?m:g,A=b??isNumericString(k,p,t);isNil(g)?isNil(m)||(A=A||typeof m=="number"):A=A||typeof g=="number";var D=function(B){return isNotValidValue(B)?B:(typeof B=="number"&&(B=toNumericString(B)),A&&typeof f=="number"?roundToPrecision(B,f,!!h):B)},R=useInternalValues(D(g),D(m),!!A,_,O,x),T=R[0],j=T.numAsString,P=T.formattedValue,M=R[1],I=function(B){var H=B.target,Y=B.key,U=H.selectionStart,F=H.selectionEnd,X=H.value;if(X===void 0&&(X=""),(Y==="Backspace"||Y==="Delete")&&F<p.length){B.preventDefault();return}if(U!==F){o(B);return}Y==="Backspace"&&X[0]==="-"&&U===p.length+1&&i&&setCaretPosition(H,1),f&&h&&(Y==="Backspace"&&X[U-1]===E?(setCaretPosition(H,U-1),B.preventDefault()):Y==="Delete"&&X[U]===E&&B.preventDefault()),w!=null&&w.includes(Y)&&X[U]===E&&setCaretPosition(H,U+1);var z=u===!0?",":u;Y==="Backspace"&&X[U-1]===z&&setCaretPosition(H,U-1),Y==="Delete"&&X[U]===z&&setCaretPosition(H,U+1),o(B)},G=function(B){var H=j;if(H.match(/\d/g)||(H=""),a||(H=fixLeadingZero(H)),h&&f&&(H=roundToPrecision(H,f,h)),H!==j){var Y=format(H,e);M({formattedValue:Y,value:H,floatValue:parseFloat(H)},{event:B,source:SourceType.event})}l(B)},ne=function(B){return B===E?!0:charIsNumber(B)},Q=function(B){var H=B.currentValue,Y=B.lastValue,U=B.formattedValue,F=B.currentValueIndex,X=B.formattedValueIndex,z=H[F],L=U[X],$=findChangeRange(Y,H),V=$.to,K=function(te){return O(te).indexOf(".")+p.length};return g===0&&h&&f&&H[V.start]===E&&K(H)<F&&K(U)>X?!1:F>=V.start&&F<V.end&&w&&w.includes(z)&&L===E?!0:z===L};return Object.assign(Object.assign({},y),{value:P,valueIsNumericString:!1,isValidInputCharacter:ne,isCharacterSame:Q,onValueChange:M,format:_,removeFormatting:O,getCaretBoundary:function(B){return getCaretBoundary(B,e)},onKeyDown:I,onBlur:G})}function NumericFormat(e){var t=useNumericFormat(e);return React.createElement(NumberFormatBase,Object.assign({},t))}function NumberInputChevron({direction:e,style:t,...i}){return jsxRuntimeExports.jsx("svg",{style:{width:"var(--ni-chevron-size)",height:"var(--ni-chevron-size)",transform:e==="up"?"rotate(180deg)":void 0,...t},viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",...i,children:jsxRuntimeExports.jsx("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}var classes$6={root:"m_e2f5cd4e",controls:"m_95e17d22",control:"m_80b4b171"};const leadingDecimalZeroPattern=/^(0\.0*|-0(\.0*)?)$/,leadingZerosPattern=/^-?0\d+(\.\d+)?\.?$/;function isNumberString(e){return typeof e=="string"&&e!==""&&!Number.isNaN(Number(e))}function canIncrement(e){return typeof e=="number"?e<Number.MAX_SAFE_INTEGER:e===""||isNumberString(e)&&Number(e)<Number.MAX_SAFE_INTEGER}function getDecimalPlaces(e){return e.toString().replace(".","").length}function isValidNumber(e,t){return(typeof e=="number"?e<Number.MAX_SAFE_INTEGER:!Number.isNaN(Number(e)))&&!Number.isNaN(e)&&getDecimalPlaces(t)<14&&t!==""}function isInRange(e,t,i){if(e===void 0)return!0;const a=t===void 0||e>=t,o=i===void 0||e<=i;return a&&o}const defaultProps$c={step:1,clampBehavior:"blur",allowDecimal:!0,allowNegative:!0,withKeyboardEvents:!0,allowLeadingZeros:!0,trimLeadingZeroesOnBlur:!0,startValue:0},varsResolver$7=(e,{size:t})=>({controls:{"--ni-chevron-size":getSize(t,"ni-chevron-size")}});function clampAndSanitizeInput(e,t,i){const a=e.toString().replace(/^0+/,""),o=parseFloat(a);return Number.isNaN(o)?a:o>Number.MAX_SAFE_INTEGER?t!==void 0?String(t):a:clamp$4(o,i,t)}const NumberInput=factory((e,t)=>{const i=useProps("NumberInput",defaultProps$c,e),{className:a,classNames:o,styles:l,unstyled:u,vars:f,onChange:h,onValueChange:p,value:m,defaultValue:g,max:b,min:x,step:y,hideControls:S,rightSection:E,isAllowed:w,clampBehavior:_,onBlur:O,allowDecimal:k,decimalScale:A,onKeyDown:D,onKeyDownCapture:R,handlersRef:T,startValue:j,disabled:P,rightSectionPointerEvents:M,allowNegative:I,readOnly:G,size:ne,rightSectionWidth:Q,stepHoldInterval:B,stepHoldDelay:H,allowLeadingZeros:Y,withKeyboardEvents:U,trimLeadingZeroesOnBlur:F,...X}=i,z=useStyles({name:"NumberInput",classes:classes$6,props:i,classNames:o,styles:l,unstyled:u,vars:f,varsResolver:varsResolver$7}),{resolvedClassNames:L,resolvedStyles:$}=useResolvedStylesApi({classNames:o,styles:l,props:i}),[V,K]=useUncontrolled({value:m,defaultValue:g,finalValue:"",onChange:h}),te=H!==void 0&&B!==void 0,J=reactExports.useRef(null),ce=reactExports.useRef(null),ue=reactExports.useRef(0),we=(oe,ie)=>{ie.source==="event"&&K(isValidNumber(oe.floatValue,oe.value)&&!leadingDecimalZeroPattern.test(oe.value)&&!(Y&&leadingZerosPattern.test(oe.value))?oe.floatValue:oe.value),p==null||p(oe,ie)},Ee=oe=>{const ie=String(oe).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return ie?Math.max(0,(ie[1]?ie[1].length:0)-(ie[2]?+ie[2]:0)):0},De=oe=>{J.current&&typeof oe<"u"&&J.current.setSelectionRange(oe,oe)},je=reactExports.useRef(noop$4);je.current=()=>{if(!canIncrement(V))return;let oe;const ie=Ee(V),Fe=Ee(y),Le=Math.max(ie,Fe),Ye=10**Le;if(!isNumberString(V)&&(typeof V!="number"||Number.isNaN(V)))oe=clamp$4(j,x,b);else if(b!==void 0){const it=(Math.round(Number(V)*Ye)+Math.round(y*Ye))/Ye;oe=it<=b?it:b}else oe=(Math.round(Number(V)*Ye)+Math.round(y*Ye))/Ye;const qe=oe.toFixed(Le);K(parseFloat(qe)),p==null||p({floatValue:parseFloat(qe),formattedValue:qe,value:qe},{source:"increment"}),setTimeout(()=>{var it;return De((it=J.current)==null?void 0:it.value.length)},0)};const Pe=reactExports.useRef(noop$4);Pe.current=()=>{if(!canIncrement(V))return;let oe;const ie=x!==void 0?x:I?Number.MIN_SAFE_INTEGER:0,Fe=Ee(V),Le=Ee(y),Ye=Math.max(Fe,Le),qe=10**Ye;if(!isNumberString(V)&&typeof V!="number"||Number.isNaN(V))oe=clamp$4(j,ie,b);else{const We=(Math.round(Number(V)*qe)-Math.round(y*qe))/qe;oe=ie!==void 0&&We<ie?ie:We}const it=oe.toFixed(Ye);K(parseFloat(it)),p==null||p({floatValue:parseFloat(it),formattedValue:it,value:it},{source:"decrement"}),setTimeout(()=>{var We;return De((We=J.current)==null?void 0:We.value.length)},0)};const ge=oe=>{D==null||D(oe),!(G||!U)&&(oe.key==="ArrowUp"&&(oe.preventDefault(),je.current()),oe.key==="ArrowDown"&&(oe.preventDefault(),Pe.current()))},se=oe=>{if(R==null||R(oe),oe.key==="Backspace"){const ie=J.current;ie.selectionStart===0&&ie.selectionStart===ie.selectionEnd&&(oe.preventDefault(),window.setTimeout(()=>De(0),0))}},W=oe=>{let ie=V;_==="blur"&&typeof ie=="number"&&(ie=clamp$4(ie,x,b)),F&&typeof ie=="string"&&Ee(ie)<15&&(ie=clampAndSanitizeInput(ie,b,x)),V!==ie&&K(ie),O==null||O(oe)};assignRef(T,{increment:je.current,decrement:Pe.current});const ee=oe=>{oe?je.current():Pe.current(),ue.current+=1},de=oe=>{if(ee(oe),te){const ie=typeof B=="number"?B:B(ue.current);ce.current=window.setTimeout(()=>de(oe),ie)}},pe=(oe,ie)=>{var Fe;oe.preventDefault(),(Fe=J.current)==null||Fe.focus(),ee(ie),te&&(ce.current=window.setTimeout(()=>de(ie),H))},ve=()=>{ce.current&&window.clearTimeout(ce.current),ce.current=null,ue.current=0},Te=jsxRuntimeExports.jsxs("div",{...z("controls"),children:[jsxRuntimeExports.jsx(UnstyledButton,{...z("control"),tabIndex:-1,"aria-hidden":!0,disabled:P||typeof V=="number"&&b!==void 0&&V>=b,mod:{direction:"up"},onMouseDown:oe=>oe.preventDefault(),onPointerDown:oe=>{pe(oe,!0)},onPointerUp:ve,onPointerLeave:ve,children:jsxRuntimeExports.jsx(NumberInputChevron,{direction:"up"})}),jsxRuntimeExports.jsx(UnstyledButton,{...z("control"),tabIndex:-1,"aria-hidden":!0,disabled:P||typeof V=="number"&&x!==void 0&&V<=x,mod:{direction:"down"},onMouseDown:oe=>oe.preventDefault(),onPointerDown:oe=>{pe(oe,!1)},onPointerUp:ve,onPointerLeave:ve,children:jsxRuntimeExports.jsx(NumberInputChevron,{direction:"down"})})]});return jsxRuntimeExports.jsx(InputBase,{component:NumericFormat,allowNegative:I,className:clsx(classes$6.root,a),size:ne,...X,readOnly:G,disabled:P,value:V,getInputRef:useMergedRef(t,J),onValueChange:we,rightSection:S||G||!canIncrement(V)?E:E||Te,classNames:L,styles:$,unstyled:u,__staticSelector:"NumberInput",decimalScale:k?A:0,onKeyDown:ge,onKeyDownCapture:se,rightSectionPointerEvents:M??(P?"none":void 0),rightSectionWidth:Q??`var(--ni-right-section-width-${ne||"sm"})`,allowLeadingZeros:Y,onBlur:W,isAllowed:oe=>_==="strict"?w?w(oe)&&isInRange(oe.floatValue,x,b):isInRange(oe.floatValue,x,b):w?w(oe):!0})});NumberInput.classes={...InputBase.classes,...classes$6};NumberInput.displayName="@mantine/core/NumberInput";const defaultTransition={duration:100,transition:"fade"};function getTransitionProps(e,t){return{...defaultTransition,...t,...e}}function useFloatingTooltip({offset:e,position:t,defaultOpened:i}){const[a,o]=reactExports.useState(i),l=reactExports.useRef(null),{x:u,y:f,elements:h,refs:p,update:m,placement:g}=useFloating({placement:t,middleware:[shift({crossAxis:!0,padding:5,rootBoundary:"document"})]}),b=g.includes("right")?e:t.includes("left")?e*-1:0,x=g.includes("bottom")?e:t.includes("top")?e*-1:0,y=reactExports.useCallback(({clientX:S,clientY:E})=>{p.setPositionReference({getBoundingClientRect(){return{width:0,height:0,x:S,y:E,left:S+b,top:E+x,right:S,bottom:E}}})},[h.reference]);return reactExports.useEffect(()=>{if(p.floating.current){const S=l.current;S.addEventListener("mousemove",y);const E=getOverflowAncestors(p.floating.current);return E.forEach(w=>{w.addEventListener("scroll",m)}),()=>{S.removeEventListener("mousemove",y),E.forEach(w=>{w.removeEventListener("scroll",m)})}}},[h.reference,p.floating.current,m,y,a]),{handleMouseMove:y,x:u,y:f,opened:a,setOpened:o,boundaryRef:l,floating:p.setFloating}}var classes$5={tooltip:"m_1b3c8819",arrow:"m_f898399f"};const defaultProps$b={refProp:"ref",withinPortal:!0,offset:10,defaultOpened:!1,position:"right",zIndex:getDefaultZIndex("popover")},varsResolver$6=(e,{radius:t,color:i})=>({tooltip:{"--tooltip-radius":t===void 0?void 0:getRadius(t),"--tooltip-bg":i?getThemeColor(i,e):void 0,"--tooltip-color":i?"var(--mantine-color-white)":void 0}}),TooltipFloating=factory((e,t)=>{const i=useProps("TooltipFloating",defaultProps$b,e),{children:a,refProp:o,withinPortal:l,style:u,className:f,classNames:h,styles:p,unstyled:m,radius:g,color:b,label:x,offset:y,position:S,multiline:E,zIndex:w,disabled:_,defaultOpened:O,variant:k,vars:A,portalProps:D,...R}=i,T=useMantineTheme(),j=useStyles({name:"TooltipFloating",props:i,classes:classes$5,className:f,style:u,classNames:h,styles:p,unstyled:m,rootSelector:"tooltip",vars:A,varsResolver:varsResolver$6}),{handleMouseMove:P,x:M,y:I,opened:G,boundaryRef:ne,floating:Q,setOpened:B}=useFloatingTooltip({offset:y,position:S,defaultOpened:O});if(!isElement$1(a))throw new Error("[@mantine/core] Tooltip.Floating component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported");const H=useMergedRef(ne,getRefProp(a),t),Y=a.props,U=X=>{var z;(z=Y.onMouseEnter)==null||z.call(Y,X),P(X),B(!0)},F=X=>{var z;(z=Y.onMouseLeave)==null||z.call(Y,X),B(!1)};return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(OptionalPortal,{...D,withinPortal:l,children:jsxRuntimeExports.jsx(Box,{...R,...j("tooltip",{style:{...getStyleObject(u,T),zIndex:w,display:!_&&G?"block":"none",top:(I&&Math.round(I))??"",left:(M&&Math.round(M))??""}}),variant:k,ref:Q,mod:{multiline:E},children:x})}),reactExports.cloneElement(a,{...Y,[o]:H,onMouseEnter:U,onMouseLeave:F})]})});TooltipFloating.classes=classes$5;TooltipFloating.displayName="@mantine/core/TooltipFloating";const TooltipGroupContext=reactExports.createContext(!1),TooltipGroupProvider=TooltipGroupContext.Provider,useTooltipGroupContext=()=>reactExports.useContext(TooltipGroupContext),defaultProps$a={openDelay:0,closeDelay:0};function TooltipGroup(e){const{openDelay:t,closeDelay:i,children:a}=useProps("TooltipGroup",defaultProps$a,e);return jsxRuntimeExports.jsx(TooltipGroupProvider,{value:!0,children:jsxRuntimeExports.jsx(FloatingDelayGroup,{delay:{open:t,close:i},children:a})})}TooltipGroup.displayName="@mantine/core/TooltipGroup";TooltipGroup.extend=e=>e;function getDefaultMiddlewares(e){if(e===void 0)return{shift:!0,flip:!0};const t={...e};return e.shift===void 0&&(t.shift=!0),e.flip===void 0&&(t.flip=!0),t}function getTooltipMiddlewares(e){const t=getDefaultMiddlewares(e.middlewares),i=[offset(e.offset)];return t.shift&&i.push(shift(typeof t.shift=="boolean"?{padding:8}:{padding:8,...t.shift})),t.flip&&i.push(typeof t.flip=="boolean"?flip():flip(t.flip)),i.push(arrow({element:e.arrowRef,padding:e.arrowOffset})),t.inline?i.push(typeof t.inline=="boolean"?inline():inline(t.inline)):e.inline&&i.push(inline()),i}function useTooltip(e){var D,R,T;const[t,i]=reactExports.useState(e.defaultOpened),o=typeof e.opened=="boolean"?e.opened:t,l=useTooltipGroupContext(),u=useId$1(),f=reactExports.useCallback(j=>{i(j),j&&_(u)},[u]),{x:h,y:p,context:m,refs:g,update:b,placement:x,middlewareData:{arrow:{x:y,y:S}={}}}=useFloating({strategy:e.strategy,placement:e.position,open:o,onOpenChange:f,middleware:getTooltipMiddlewares(e)}),{delay:E,currentId:w,setCurrentId:_}=useDelayGroup(m,{id:u}),{getReferenceProps:O,getFloatingProps:k}=useInteractions([useHover(m,{enabled:(D=e.events)==null?void 0:D.hover,delay:l?E:{open:e.openDelay,close:e.closeDelay},mouseOnly:!((R=e.events)!=null&&R.touch)}),useFocus(m,{enabled:(T=e.events)==null?void 0:T.focus,visibleOnly:!0}),useRole(m,{role:"tooltip"}),useDismiss(m,{enabled:typeof e.opened>"u"})]);useFloatingAutoUpdate({opened:o,position:e.position,positionDependencies:e.positionDependencies,floating:{refs:g,update:b}}),useDidUpdate(()=>{var j;(j=e.onPositionChange)==null||j.call(e,x)},[x]);const A=o&&w&&w!==u;return{x:h,y:p,arrowX:y,arrowY:S,reference:g.setReference,floating:g.setFloating,getFloatingProps:k,getReferenceProps:O,isGroupPhase:A,opened:o,placement:x}}const defaultProps$9={position:"top",refProp:"ref",withinPortal:!0,inline:!1,defaultOpened:!1,arrowSize:4,arrowOffset:5,arrowRadius:0,arrowPosition:"side",offset:5,transitionProps:{duration:100,transition:"fade"},events:{hover:!0,focus:!1,touch:!1},zIndex:getDefaultZIndex("popover"),positionDependencies:[],middlewares:{flip:!0,shift:!0,inline:!1}},varsResolver$5=(e,{radius:t,color:i})=>({tooltip:{"--tooltip-radius":t===void 0?void 0:getRadius(t),"--tooltip-bg":i?getThemeColor(i,e):void 0,"--tooltip-color":i?"var(--mantine-color-white)":void 0}}),Tooltip=factory((e,t)=>{const i=useProps("Tooltip",defaultProps$9,e),{children:a,position:o,refProp:l,label:u,openDelay:f,closeDelay:h,onPositionChange:p,opened:m,defaultOpened:g,withinPortal:b,radius:x,color:y,classNames:S,styles:E,unstyled:w,style:_,className:O,withArrow:k,arrowSize:A,arrowOffset:D,arrowRadius:R,arrowPosition:T,offset:j,transitionProps:P,multiline:M,events:I,zIndex:G,disabled:ne,positionDependencies:Q,onClick:B,onMouseEnter:H,onMouseLeave:Y,inline:U,variant:F,keepMounted:X,vars:z,portalProps:L,mod:$,floatingStrategy:V,middlewares:K,...te}=useProps("Tooltip",defaultProps$9,i),{dir:J}=useDirection(),ce=reactExports.useRef(null),ue=useTooltip({position:getFloatingPosition(J,o),closeDelay:h,openDelay:f,onPositionChange:p,opened:m,defaultOpened:g,events:I,arrowRef:ce,arrowOffset:D,offset:typeof j=="number"?j+(k?A/2:0):j,positionDependencies:[...Q,a],inline:U,strategy:V,middlewares:K}),we=useStyles({name:"Tooltip",props:i,classes:classes$5,className:O,style:_,classNames:S,styles:E,unstyled:w,rootSelector:"tooltip",vars:z,varsResolver:varsResolver$5});if(!isElement$1(a))throw new Error("[@mantine/core] Tooltip component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported");const Ee=useMergedRef(ue.reference,getRefProp(a),t),De=getTransitionProps(P,{duration:100,transition:"fade"}),je=a.props;return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(OptionalPortal,{...L,withinPortal:b,children:jsxRuntimeExports.jsx(Transition,{...De,keepMounted:X,mounted:!ne&&!!ue.opened,duration:ue.isGroupPhase?10:De.duration,children:Pe=>jsxRuntimeExports.jsxs(Box,{...te,"data-fixed":V==="fixed"||void 0,variant:F,mod:[{multiline:M},$],...ue.getFloatingProps({ref:ue.floating,className:we("tooltip").className,style:{...we("tooltip").style,...Pe,zIndex:G,top:ue.y??0,left:ue.x??0}}),children:[u,jsxRuntimeExports.jsx(FloatingArrow,{ref:ce,arrowX:ue.arrowX,arrowY:ue.arrowY,visible:k,position:ue.placement,arrowSize:A,arrowOffset:D,arrowRadius:R,arrowPosition:T,...we("arrow")})]})})}),reactExports.cloneElement(a,ue.getReferenceProps({onClick:B,onMouseEnter:H,onMouseLeave:Y,onMouseMove:i.onMouseMove,onPointerDown:i.onPointerDown,onPointerEnter:i.onPointerEnter,className:clsx(O,je.className),...je,[l]:Ee}))]})});Tooltip.classes=classes$5;Tooltip.displayName="@mantine/core/Tooltip";Tooltip.Floating=TooltipFloating;Tooltip.Group=TooltipGroup;var classes$4={root:"m_cf365364",indicator:"m_9e182ccd",label:"m_1738fcb2",input:"m_1714d588",control:"m_69686b9b",innerLabel:"m_78882f40"};const defaultProps$8={withItemsBorders:!0},varsResolver$4=(e,{radius:t,color:i,transitionDuration:a,size:o,transitionTimingFunction:l})=>({root:{"--sc-radius":t===void 0?void 0:getRadius(t),"--sc-color":i?getThemeColor(i,e):void 0,"--sc-shadow":i?void 0:"var(--mantine-shadow-xs)","--sc-transition-duration":a===void 0?void 0:`${a}ms`,"--sc-transition-timing-function":l,"--sc-padding":getSize(o,"sc-padding"),"--sc-font-size":getFontSize(o)}}),SegmentedControl=factory((e,t)=>{var J,ce;const i=useProps("SegmentedControl",defaultProps$8,e),{classNames:a,className:o,style:l,styles:u,unstyled:f,vars:h,data:p,value:m,defaultValue:g,onChange:b,size:x,name:y,disabled:S,readOnly:E,fullWidth:w,orientation:_,radius:O,color:k,transitionDuration:A,transitionTimingFunction:D,variant:R,autoContrast:T,withItemsBorders:j,mod:P,...M}=i,I=useStyles({name:"SegmentedControl",props:i,classes:classes$4,className:o,style:l,classNames:a,styles:u,unstyled:f,vars:h,varsResolver:varsResolver$4}),G=useMantineTheme(),ne=p.map(ue=>typeof ue=="string"?{label:ue,value:ue}:ue),Q=useMounted(),[B,H]=reactExports.useState(randomId()),[Y,U]=reactExports.useState(null),[F,X]=reactExports.useState({}),z=(ue,we)=>{F[we]=ue,X(F)},[L,$]=useUncontrolled({value:m,defaultValue:g,finalValue:Array.isArray(p)?((J=ne.find(ue=>!ue.disabled))==null?void 0:J.value)??((ce=p[0])==null?void 0:ce.value)??null:null,onChange:b}),V=useId$1(y),K=ne.map(ue=>reactExports.createElement(Box,{...I("control"),mod:{active:L===ue.value,orientation:_},key:ue.value},reactExports.createElement("input",{...I("input"),disabled:S||ue.disabled,type:"radio",name:V,value:ue.value,id:`${V}-${ue.value}`,checked:L===ue.value,onChange:()=>!E&&$(ue.value),"data-focus-ring":G.focusRing,key:`${ue.value}-input`}),reactExports.createElement(Box,{component:"label",...I("label"),mod:{active:L===ue.value&&!(S||ue.disabled),disabled:S||ue.disabled,"read-only":E},htmlFor:`${V}-${ue.value}`,ref:we=>z(we,ue.value),__vars:{"--sc-label-color":k!==void 0?getContrastColor({color:k,theme:G,autoContrast:T}):void 0},key:`${ue.value}-label`},jsxRuntimeExports.jsx("span",{...I("innerLabel"),children:ue.label})))),te=useMergedRef(t,ue=>U(ue));return useShallowEffect(()=>{H(randomId())},[p.length]),p.length===0?null:jsxRuntimeExports.jsxs(Box,{...I("root"),variant:R,size:x,ref:te,mod:[{"full-width":w,orientation:_,initialized:Q,"with-items-borders":j},P],...M,role:"radiogroup","data-disabled":S,children:[typeof L=="string"&&jsxRuntimeExports.jsx(FloatingIndicator,{target:F[L],parent:Y,component:"span",transitionDuration:"var(--sc-transition-duration)",...I("indicator")},B),K]})});SegmentedControl.classes=classes$4;SegmentedControl.displayName="@mantine/core/SegmentedControl";const defaultProps$7={searchable:!1,withCheckIcon:!0,allowDeselect:!0,checkIconPosition:"left"},Select=factory((e,t)=>{const i=useProps("Select",defaultProps$7,e),{classNames:a,styles:o,unstyled:l,vars:u,dropdownOpened:f,defaultDropdownOpened:h,onDropdownClose:p,onDropdownOpen:m,onFocus:g,onBlur:b,onClick:x,onChange:y,data:S,value:E,defaultValue:w,selectFirstOptionOnChange:_,onOptionSubmit:O,comboboxProps:k,readOnly:A,disabled:D,filter:R,limit:T,withScrollArea:j,maxDropdownHeight:P,size:M,searchable:I,rightSection:G,checkIconPosition:ne,withCheckIcon:Q,nothingFoundMessage:B,name:H,form:Y,searchValue:U,defaultSearchValue:F,onSearchChange:X,allowDeselect:z,error:L,rightSectionPointerEvents:$,id:V,clearable:K,clearButtonProps:te,hiddenInputProps:J,renderOption:ce,onClear:ue,autoComplete:we,scrollAreaProps:Ee,__defaultRightSection:De,__clearSection:je,__clearable:Pe,chevronColor:ge,...se}=i,W=reactExports.useMemo(()=>getParsedComboboxData(S),[S]),ee=reactExports.useMemo(()=>getOptionsLockup(W),[W]),de=useId$1(V),[pe,ve,Te]=useUncontrolled({value:E,defaultValue:w,finalValue:null,onChange:y}),oe=typeof pe=="string"?ee[pe]:void 0,ie=usePrevious$1(oe),[Fe,Le,Ye]=useUncontrolled({value:U,defaultValue:F,finalValue:oe?oe.label:"",onChange:X}),qe=useCombobox({opened:f,defaultOpened:h,onDropdownOpen:()=>{m==null||m(),qe.updateSelectedOptionIndex("active",{scrollIntoView:!0})},onDropdownClose:()=>{p==null||p(),qe.resetSelectedOption()}}),it=Oe=>{Le(Oe),qe.resetSelectedOption()},{resolvedClassNames:We,resolvedStyles:Je}=useResolvedStylesApi({props:i,styles:o,classNames:a});reactExports.useEffect(()=>{_&&qe.selectFirstOption()},[_,Fe]),reactExports.useEffect(()=>{E===null&&it(""),typeof E=="string"&&oe&&((ie==null?void 0:ie.value)!==oe.value||(ie==null?void 0:ie.label)!==oe.label)&&it(oe.label)},[E,oe]),reactExports.useEffect(()=>{var Oe;!Te&&!Ye&&it(typeof pe=="string"&&((Oe=ee[pe])==null?void 0:Oe.label)||"")},[S,pe]);const ct=jsxRuntimeExports.jsx(Combobox.ClearButton,{...te,onClear:()=>{ve(null,null),it(""),ue==null||ue()}}),ot=K&&!!pe&&!D&&!A;return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(Combobox,{store:qe,__staticSelector:"Select",classNames:We,styles:Je,unstyled:l,readOnly:A,onOptionSubmit:Oe=>{O==null||O(Oe);const ye=z&&ee[Oe].value===pe?null:ee[Oe],xe=ye?ye.value:null;xe!==pe&&ve(xe,ye),!Te&&it(typeof xe=="string"&&(ye==null?void 0:ye.label)||""),qe.closeDropdown()},size:M,...k,children:[jsxRuntimeExports.jsx(Combobox.Target,{targetType:I?"input":"button",autoComplete:we,children:jsxRuntimeExports.jsx(InputBase,{id:de,ref:t,__defaultRightSection:jsxRuntimeExports.jsx(Combobox.Chevron,{size:M,error:L,unstyled:l,color:ge}),__clearSection:ct,__clearable:ot,rightSection:G,rightSectionPointerEvents:$||(ot?"all":"none"),...se,size:M,__staticSelector:"Select",disabled:D,readOnly:A||!I,value:Fe,onChange:Oe=>{it(Oe.currentTarget.value),qe.openDropdown(),_&&qe.selectFirstOption()},onFocus:Oe=>{I&&qe.openDropdown(),g==null||g(Oe)},onBlur:Oe=>{var ye;I&&qe.closeDropdown(),it(pe!=null&&((ye=ee[pe])==null?void 0:ye.label)||""),b==null||b(Oe)},onClick:Oe=>{I?qe.openDropdown():qe.toggleDropdown(),x==null||x(Oe)},classNames:We,styles:Je,unstyled:l,pointer:!I,error:L})}),jsxRuntimeExports.jsx(OptionsDropdown,{data:W,hidden:A||D,filter:R,search:Fe,limit:T,hiddenWhenEmpty:!B,withScrollArea:j,maxDropdownHeight:P,filterOptions:I&&(oe==null?void 0:oe.label)!==Fe,value:pe,checkIconPosition:ne,withCheckIcon:Q,nothingFoundMessage:B,unstyled:l,labelId:se.label?`${de}-label`:void 0,"aria-label":se.label?void 0:se["aria-label"],renderOption:ce,scrollAreaProps:Ee})]}),jsxRuntimeExports.jsx(Combobox.HiddenInput,{value:pe,name:H,form:Y,disabled:D,...J})]})});Select.classes={...InputBase.classes,...Combobox.classes};Select.displayName="@mantine/core/Select";const[SliderProvider,useSliderContext]=createSafeContext("SliderProvider was not found in tree"),SliderRoot=reactExports.forwardRef(({size:e,disabled:t,variant:i,color:a,thumbSize:o,radius:l,...u},f)=>{const{getStyles:h}=useSliderContext();return jsxRuntimeExports.jsx(Box,{tabIndex:-1,variant:i,size:e,ref:f,...h("root"),...u})});SliderRoot.displayName="@mantine/core/SliderRoot";const Thumb=reactExports.forwardRef(({max:e,min:t,value:i,position:a,label:o,dragging:l,onMouseDown:u,onKeyDownCapture:f,labelTransitionProps:h,labelAlwaysOn:p,thumbLabel:m,onFocus:g,onBlur:b,showLabelOnHover:x,isHovered:y,children:S=null,disabled:E},w)=>{const{getStyles:_}=useSliderContext(),[O,k]=reactExports.useState(!1),A=p||l||O||x&&y;return jsxRuntimeExports.jsxs(Box,{tabIndex:0,role:"slider","aria-label":m,"aria-valuemax":e,"aria-valuemin":t,"aria-valuenow":i,ref:w,__vars:{"--slider-thumb-offset":`${a}%`},..._("thumb",{focusable:!0}),mod:{dragging:l,disabled:E},onFocus:D=>{k(!0),typeof g=="function"&&g(D)},onBlur:D=>{k(!1),typeof b=="function"&&b(D)},onTouchStart:u,onMouseDown:u,onKeyDownCapture:f,onClick:D=>D.stopPropagation(),children:[S,jsxRuntimeExports.jsx(Transition,{mounted:o!=null&&!!A,transition:"fade",duration:0,...h,children:D=>jsxRuntimeExports.jsx("div",{..._("label",{style:D}),children:o})})]})});Thumb.displayName="@mantine/core/SliderThumb";function getPosition({value:e,min:t,max:i}){const a=(e-t)/(i-t)*100;return Math.min(Math.max(a,0),100)}function isMarkFilled({mark:e,offset:t,value:i,inverted:a=!1}){return a?typeof t=="number"&&e.value<=t||e.value>=i:typeof t=="number"?e.value>=t&&e.value<=i:e.value<=i}function Marks({marks:e,min:t,max:i,disabled:a,value:o,offset:l,inverted:u}){const{getStyles:f}=useSliderContext();if(!e)return null;const h=e.map((p,m)=>reactExports.createElement(Box,{...f("markWrapper"),__vars:{"--mark-offset":`${getPosition({value:p.value,min:t,max:i})}%`},key:m},jsxRuntimeExports.jsx(Box,{...f("mark"),mod:{filled:isMarkFilled({mark:p,value:o,offset:l,inverted:u}),disabled:a}}),p.label&&jsxRuntimeExports.jsx("div",{...f("markLabel"),children:p.label})));return jsxRuntimeExports.jsx("div",{children:h})}Marks.displayName="@mantine/core/SliderMarks";function Track({filled:e,children:t,offset:i,disabled:a,marksOffset:o,inverted:l,containerProps:u,...f}){const{getStyles:h}=useSliderContext();return jsxRuntimeExports.jsx(Box,{...h("trackContainer"),mod:{disabled:a},...u,children:jsxRuntimeExports.jsxs(Box,{...h("track"),mod:{inverted:l,disabled:a},children:[jsxRuntimeExports.jsx(Box,{mod:{inverted:l,disabled:a},__vars:{"--slider-bar-width":`calc(${e}% + 2 * var(--slider-size))`,"--slider-bar-offset":`calc(${i}% - var(--slider-size))`},...h("bar")}),t,jsxRuntimeExports.jsx(Marks,{...f,offset:o,disabled:a,inverted:l})]})})}Track.displayName="@mantine/core/SliderTrack";function getChangeValue({value:e,containerWidth:t,min:i,max:a,step:o,precision:l}){const f=(t?Math.min(Math.max(e,0),t)/t:e)*(a-i),h=(f!==0?Math.round(f/o)*o:0)+i,p=Math.max(h,i);return l!==void 0?Number(p.toFixed(l)):p}function getFloatingValue(e,t){return parseFloat(e.toFixed(t))}function getPrecision(e){if(!e)return 0;const t=e.toString().split(".");return t.length>1?t[1].length:0}function getNextMarkValue(e,t){const a=[...t].sort((o,l)=>o.value-l.value).find(o=>o.value>e);return a?a.value:e}function getPreviousMarkValue(e,t){const a=[...t].sort((o,l)=>l.value-o.value).find(o=>o.value<e);return a?a.value:e}function getFirstMarkValue(e){const t=[...e].sort((i,a)=>i.value-a.value);return t.length>0?t[0].value:0}function getLastMarkValue(e){const t=[...e].sort((i,a)=>i.value-a.value);return t.length>0?t[t.length-1].value:100}var classes$3={root:"m_dd36362e",label:"m_c9357328",thumb:"m_c9a9a60a",trackContainer:"m_a8645c2",track:"m_c9ade57f",bar:"m_38aeed47",markWrapper:"m_b7b0423a",mark:"m_dd33bc19",markLabel:"m_68c77a5b"};const defaultProps$6={radius:"xl",min:0,max:100,step:1,marks:[],label:e=>e,labelTransitionProps:{transition:"fade",duration:0},labelAlwaysOn:!1,thumbLabel:"",showLabelOnHover:!0,disabled:!1,scale:e=>e},varsResolver$3=(e,{size:t,color:i,thumbSize:a,radius:o})=>({root:{"--slider-size":getSize(t,"slider-size"),"--slider-color":i?getThemeColor(i,e):void 0,"--slider-radius":o===void 0?void 0:getRadius(o),"--slider-thumb-size":a!==void 0?rem(a):"calc(var(--slider-size) * 2)"}}),Slider=factory((e,t)=>{const i=useProps("Slider",defaultProps$6,e),{classNames:a,styles:o,value:l,onChange:u,onChangeEnd:f,size:h,min:p,max:m,step:g,precision:b,defaultValue:x,name:y,marks:S,label:E,labelTransitionProps:w,labelAlwaysOn:_,thumbLabel:O,showLabelOnHover:k,thumbChildren:A,disabled:D,unstyled:R,scale:T,inverted:j,className:P,style:M,vars:I,hiddenInputProps:G,restrictToMarks:ne,thumbProps:Q,...B}=i,H=useStyles({name:"Slider",props:i,classes:classes$3,classNames:a,className:P,styles:o,style:M,vars:I,varsResolver:varsResolver$3,unstyled:R}),{dir:Y}=useDirection(),[U,F]=reactExports.useState(!1),[X,z]=useUncontrolled({value:typeof l=="number"?clamp$4(l,p,m):l,defaultValue:typeof x=="number"?clamp$4(x,p,m):x,finalValue:clamp$4(0,p,m),onChange:u}),L=reactExports.useRef(X),$=reactExports.useRef(f);reactExports.useEffect(()=>{$.current=f},[f]);const V=reactExports.useRef(null),K=reactExports.useRef(null),te=getPosition({value:X,min:p,max:m}),J=T(X),ce=typeof E=="function"?E(J):E,ue=b??getPrecision(g),we=reactExports.useCallback(({x:se})=>{if(!D){const W=getChangeValue({value:se,min:p,max:m,step:g,precision:ue});z(ne&&(S!=null&&S.length)?findClosestNumber(W,S.map(ee=>ee.value)):W),L.current=W}},[D,p,m,g,ue,z,S,ne]),Ee=reactExports.useCallback(()=>{if(!D&&$.current){const se=ne&&(S!=null&&S.length)?findClosestNumber(L.current,S.map(W=>W.value)):L.current;$.current(se)}},[D,S,ne]),{ref:De,active:je}=useMove(we,{onScrubEnd:Ee},Y),Pe=reactExports.useCallback(se=>{!D&&$.current&&$.current(se)},[D]),ge=se=>{var W,ee,de,pe,ve,Te;if(!D)switch(se.key){case"ArrowUp":{if(se.preventDefault(),(W=K.current)==null||W.focus(),ne&&S){const ie=getNextMarkValue(X,S);z(ie),Pe(ie);break}const oe=getFloatingValue(Math.min(Math.max(X+g,p),m),ue);z(oe),Pe(oe);break}case"ArrowRight":{if(se.preventDefault(),(ee=K.current)==null||ee.focus(),ne&&S){const ie=Y==="rtl"?getPreviousMarkValue(X,S):getNextMarkValue(X,S);z(ie),Pe(ie);break}const oe=getFloatingValue(Math.min(Math.max(Y==="rtl"?X-g:X+g,p),m),ue);z(oe),Pe(oe);break}case"ArrowDown":{if(se.preventDefault(),(de=K.current)==null||de.focus(),ne&&S){const ie=getPreviousMarkValue(X,S);z(ie),Pe(ie);break}const oe=getFloatingValue(Math.min(Math.max(X-g,p),m),ue);z(oe),Pe(oe);break}case"ArrowLeft":{if(se.preventDefault(),(pe=K.current)==null||pe.focus(),ne&&S){const ie=Y==="rtl"?getNextMarkValue(X,S):getPreviousMarkValue(X,S);z(ie),Pe(ie);break}const oe=getFloatingValue(Math.min(Math.max(Y==="rtl"?X+g:X-g,p),m),ue);z(oe),Pe(oe);break}case"Home":{if(se.preventDefault(),(ve=K.current)==null||ve.focus(),ne&&S){z(getFirstMarkValue(S)),Pe(getFirstMarkValue(S));break}z(p),Pe(p);break}case"End":{if(se.preventDefault(),(Te=K.current)==null||Te.focus(),ne&&S){z(getLastMarkValue(S)),Pe(getLastMarkValue(S));break}z(m),Pe(m);break}}};return jsxRuntimeExports.jsx(SliderProvider,{value:{getStyles:H},children:jsxRuntimeExports.jsxs(SliderRoot,{...B,ref:useMergedRef(t,V),onKeyDownCapture:ge,onMouseDownCapture:()=>{var se;return(se=V.current)==null?void 0:se.focus()},size:h,disabled:D,children:[jsxRuntimeExports.jsx(Track,{inverted:j,offset:0,filled:te,marks:S,min:p,max:m,value:J,disabled:D,containerProps:{ref:De,onMouseEnter:k?()=>F(!0):void 0,onMouseLeave:k?()=>F(!1):void 0},children:jsxRuntimeExports.jsx(Thumb,{max:m,min:p,value:J,position:te,dragging:je,label:ce,ref:K,labelTransitionProps:w,labelAlwaysOn:_,thumbLabel:O,showLabelOnHover:k,isHovered:U,disabled:D,...Q,children:A})}),jsxRuntimeExports.jsx("input",{type:"hidden",name:y,value:J,...G})]})})});Slider.classes=classes$3;Slider.displayName="@mantine/core/Slider";var classes$2={root:"m_6d731127"};const defaultProps$5={gap:"md",align:"stretch",justify:"flex-start"},varsResolver$2=(e,{gap:t,align:i,justify:a})=>({root:{"--stack-gap":getSpacing(t),"--stack-align":i,"--stack-justify":a}}),Stack=factory((e,t)=>{const i=useProps("Stack",defaultProps$5,e),{classNames:a,className:o,style:l,styles:u,unstyled:f,vars:h,align:p,justify:m,gap:g,variant:b,...x}=i,y=useStyles({name:"Stack",props:i,classes:classes$2,className:o,style:l,classNames:a,styles:u,unstyled:f,vars:h,varsResolver:varsResolver$2});return jsxRuntimeExports.jsx(Box,{ref:t,...y("root"),variant:b,...x})});Stack.classes=classes$2;Stack.displayName="@mantine/core/Stack";const defaultProps$4={},TextInput=factory((e,t)=>{const i=useProps("TextInput",defaultProps$4,e);return jsxRuntimeExports.jsx(InputBase,{component:"input",ref:t,...i,__staticSelector:"TextInput"})});TextInput.classes=InputBase.classes;TextInput.displayName="@mantine/core/TextInput";var classes$1={root:"m_7341320d"};const defaultProps$3={},varsResolver$1=(e,{size:t,radius:i,variant:a,gradient:o,color:l,autoContrast:u})=>{const f=e.variantColorResolver({color:l||e.primaryColor,theme:e,gradient:o,variant:a||"filled",autoContrast:u});return{root:{"--ti-size":getSize(t,"ti-size"),"--ti-radius":i===void 0?void 0:getRadius(i),"--ti-bg":l||a?f.background:void 0,"--ti-color":l||a?f.color:void 0,"--ti-bd":l||a?f.border:void 0}}},ThemeIcon=factory((e,t)=>{const i=useProps("ThemeIcon",defaultProps$3,e),{classNames:a,className:o,style:l,styles:u,unstyled:f,vars:h,autoContrast:p,...m}=i,g=useStyles({name:"ThemeIcon",classes:classes$1,props:i,className:o,style:l,classNames:a,styles:u,unstyled:f,vars:h,varsResolver:varsResolver$1});return jsxRuntimeExports.jsx(Box,{ref:t,...g("root"),...m})});ThemeIcon.classes=classes$1;ThemeIcon.displayName="@mantine/core/ThemeIcon";var dist={},hasRequiredDist;function requireDist(){if(hasRequiredDist)return dist;hasRequiredDist=1,Object.defineProperty(dist,"__esModule",{value:!0}),dist.parse=u,dist.serialize=p;const e=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,t=/^[\u0021-\u003A\u003C-\u007E]*$/,i=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,a=/^[\u0020-\u003A\u003D-\u007E]*$/,o=Object.prototype.toString,l=(()=>{const b=function(){};return b.prototype=Object.create(null),b})();function u(b,x){const y=new l,S=b.length;if(S<2)return y;const E=(x==null?void 0:x.decode)||m;let w=0;do{const _=b.indexOf("=",w);if(_===-1)break;const O=b.indexOf(";",w),k=O===-1?S:O;if(_>k){w=b.lastIndexOf(";",_-1)+1;continue}const A=f(b,w,_),D=h(b,_,A),R=b.slice(A,D);if(y[R]===void 0){let T=f(b,_+1,k),j=h(b,k,T);const P=E(b.slice(T,j));y[R]=P}w=k+1}while(w<S);return y}function f(b,x,y){do{const S=b.charCodeAt(x);if(S!==32&&S!==9)return x}while(++x<y);return y}function h(b,x,y){for(;x>y;){const S=b.charCodeAt(--x);if(S!==32&&S!==9)return x+1}return y}function p(b,x,y){const S=(y==null?void 0:y.encode)||encodeURIComponent;if(!e.test(b))throw new TypeError(`argument name is invalid: ${b}`);const E=S(x);if(!t.test(E))throw new TypeError(`argument val is invalid: ${x}`);let w=b+"="+E;if(!y)return w;if(y.maxAge!==void 0){if(!Number.isInteger(y.maxAge))throw new TypeError(`option maxAge is invalid: ${y.maxAge}`);w+="; Max-Age="+y.maxAge}if(y.domain){if(!i.test(y.domain))throw new TypeError(`option domain is invalid: ${y.domain}`);w+="; Domain="+y.domain}if(y.path){if(!a.test(y.path))throw new TypeError(`option path is invalid: ${y.path}`);w+="; Path="+y.path}if(y.expires){if(!g(y.expires)||!Number.isFinite(y.expires.valueOf()))throw new TypeError(`option expires is invalid: ${y.expires}`);w+="; Expires="+y.expires.toUTCString()}if(y.httpOnly&&(w+="; HttpOnly"),y.secure&&(w+="; Secure"),y.partitioned&&(w+="; Partitioned"),y.priority)switch(typeof y.priority=="string"?y.priority.toLowerCase():void 0){case"low":w+="; Priority=Low";break;case"medium":w+="; Priority=Medium";break;case"high":w+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${y.priority}`)}if(y.sameSite)switch(typeof y.sameSite=="string"?y.sameSite.toLowerCase():y.sameSite){case!0:case"strict":w+="; SameSite=Strict";break;case"lax":w+="; SameSite=Lax";break;case"none":w+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${y.sameSite}`)}return w}function m(b){if(b.indexOf("%")===-1)return b;try{return decodeURIComponent(b)}catch{return b}}function g(b){return o.call(b)==="[object Date]"}return dist}requireDist();var PopStateEventType="popstate";function createBrowserHistory(e={}){function t(a,o){let{pathname:l,search:u,hash:f}=a.location;return createLocation("",{pathname:l,search:u,hash:f},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function i(a,o){return typeof o=="string"?o:createPath(o)}return getUrlBasedHistory(t,i,null,e)}function invariant(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function warning(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function createKey(){return Math.random().toString(36).substring(2,10)}function getHistoryState(e,t){return{usr:e.state,key:e.key,idx:t}}function createLocation(e,t,i=null,a){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?parsePath(t):t,state:i,key:t&&t.key||a||createKey()}}function createPath({pathname:e="/",search:t="",hash:i=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),i&&i!=="#"&&(e+=i.charAt(0)==="#"?i:"#"+i),e}function parsePath(e){let t={};if(e){let i=e.indexOf("#");i>=0&&(t.hash=e.substring(i),e=e.substring(0,i));let a=e.indexOf("?");a>=0&&(t.search=e.substring(a),e=e.substring(0,a)),e&&(t.pathname=e)}return t}function getUrlBasedHistory(e,t,i,a={}){let{window:o=document.defaultView,v5Compat:l=!1}=a,u=o.history,f="POP",h=null,p=m();p==null&&(p=0,u.replaceState({...u.state,idx:p},""));function m(){return(u.state||{idx:null}).idx}function g(){f="POP";let E=m(),w=E==null?null:E-p;p=E,h&&h({action:f,location:S.location,delta:w})}function b(E,w){f="PUSH";let _=createLocation(S.location,E,w);p=m()+1;let O=getHistoryState(_,p),k=S.createHref(_);try{u.pushState(O,"",k)}catch(A){if(A instanceof DOMException&&A.name==="DataCloneError")throw A;o.location.assign(k)}l&&h&&h({action:f,location:S.location,delta:1})}function x(E,w){f="REPLACE";let _=createLocation(S.location,E,w);p=m();let O=getHistoryState(_,p),k=S.createHref(_);u.replaceState(O,"",k),l&&h&&h({action:f,location:S.location,delta:0})}function y(E){return createBrowserURLImpl(E)}let S={get action(){return f},get location(){return e(o,u)},listen(E){if(h)throw new Error("A history only accepts one active listener");return o.addEventListener(PopStateEventType,g),h=E,()=>{o.removeEventListener(PopStateEventType,g),h=null}},createHref(E){return t(o,E)},createURL:y,encodeLocation(E){let w=y(E);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:b,replace:x,go(E){return u.go(E)}};return S}function createBrowserURLImpl(e,t=!1){let i="http://localhost";typeof window<"u"&&(i=window.location.origin!=="null"?window.location.origin:window.location.href),invariant(i,"No window.location.(origin|href) available to create URL");let a=typeof e=="string"?e:createPath(e);return a=a.replace(/ $/,"%20"),!t&&a.startsWith("//")&&(a=i+a),new URL(a,i)}function matchRoutes(e,t,i="/"){return matchRoutesImpl(e,t,i,!1)}function matchRoutesImpl(e,t,i,a){let o=typeof t=="string"?parsePath(t):t,l=stripBasename(o.pathname||"/",i);if(l==null)return null;let u=flattenRoutes(e);rankRouteBranches(u);let f=null;for(let h=0;f==null&&h<u.length;++h){let p=decodePath(l);f=matchRouteBranch(u[h],p,a)}return f}function flattenRoutes(e,t=[],i=[],a=""){let o=(l,u,f)=>{let h={relativePath:f===void 0?l.path||"":f,caseSensitive:l.caseSensitive===!0,childrenIndex:u,route:l};h.relativePath.startsWith("/")&&(invariant(h.relativePath.startsWith(a),`Absolute route path "${h.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),h.relativePath=h.relativePath.slice(a.length));let p=joinPaths([a,h.relativePath]),m=i.concat(h);l.children&&l.children.length>0&&(invariant(l.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${p}".`),flattenRoutes(l.children,t,m,p)),!(l.path==null&&!l.index)&&t.push({path:p,score:computeScore(p,l.index),routesMeta:m})};return e.forEach((l,u)=>{var f;if(l.path===""||!((f=l.path)!=null&&f.includes("?")))o(l,u);else for(let h of explodeOptionalSegments(l.path))o(l,u,h)}),t}function explodeOptionalSegments(e){let t=e.split("/");if(t.length===0)return[];let[i,...a]=t,o=i.endsWith("?"),l=i.replace(/\?$/,"");if(a.length===0)return o?[l,""]:[l];let u=explodeOptionalSegments(a.join("/")),f=[];return f.push(...u.map(h=>h===""?l:[l,h].join("/"))),o&&f.push(...u),f.map(h=>e.startsWith("/")&&h===""?"/":h)}function rankRouteBranches(e){e.sort((t,i)=>t.score!==i.score?i.score-t.score:compareIndexes(t.routesMeta.map(a=>a.childrenIndex),i.routesMeta.map(a=>a.childrenIndex)))}var paramRe=/^:[\w-]+$/,dynamicSegmentValue=3,indexRouteValue=2,emptySegmentValue=1,staticSegmentValue=10,splatPenalty=-2,isSplat=e=>e==="*";function computeScore(e,t){let i=e.split("/"),a=i.length;return i.some(isSplat)&&(a+=splatPenalty),t&&(a+=indexRouteValue),i.filter(o=>!isSplat(o)).reduce((o,l)=>o+(paramRe.test(l)?dynamicSegmentValue:l===""?emptySegmentValue:staticSegmentValue),a)}function compareIndexes(e,t){return e.length===t.length&&e.slice(0,-1).every((a,o)=>a===t[o])?e[e.length-1]-t[t.length-1]:0}function matchRouteBranch(e,t,i=!1){let{routesMeta:a}=e,o={},l="/",u=[];for(let f=0;f<a.length;++f){let h=a[f],p=f===a.length-1,m=l==="/"?t:t.slice(l.length)||"/",g=matchPath({path:h.relativePath,caseSensitive:h.caseSensitive,end:p},m),b=h.route;if(!g&&p&&i&&!a[a.length-1].route.index&&(g=matchPath({path:h.relativePath,caseSensitive:h.caseSensitive,end:!1},m)),!g)return null;Object.assign(o,g.params),u.push({params:o,pathname:joinPaths([l,g.pathname]),pathnameBase:normalizePathname(joinPaths([l,g.pathnameBase])),route:b}),g.pathnameBase!=="/"&&(l=joinPaths([l,g.pathnameBase]))}return u}function matchPath(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[i,a]=compilePath(e.path,e.caseSensitive,e.end),o=t.match(i);if(!o)return null;let l=o[0],u=l.replace(/(.)\/+$/,"$1"),f=o.slice(1);return{params:a.reduce((p,{paramName:m,isOptional:g},b)=>{if(m==="*"){let y=f[b]||"";u=l.slice(0,l.length-y.length).replace(/(.)\/+$/,"$1")}const x=f[b];return g&&!x?p[m]=void 0:p[m]=(x||"").replace(/%2F/g,"/"),p},{}),pathname:l,pathnameBase:u,pattern:e}}function compilePath(e,t=!1,i=!0){warning(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let a=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(u,f,h)=>(a.push({paramName:f,isOptional:h!=null}),h?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(a.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):i?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),a]}function decodePath(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return warning(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function stripBasename(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let i=t.endsWith("/")?t.length-1:t.length,a=e.charAt(i);return a&&a!=="/"?null:e.slice(i)||"/"}function resolvePath(e,t="/"){let{pathname:i,search:a="",hash:o=""}=typeof e=="string"?parsePath(e):e;return{pathname:i?i.startsWith("/")?i:resolvePathname(i,t):t,search:normalizeSearch(a),hash:normalizeHash(o)}}function resolvePathname(e,t){let i=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?i.length>1&&i.pop():o!=="."&&i.push(o)}),i.length>1?i.join("/"):"/"}function getInvalidPathError(e,t,i,a){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(a)}]. Please separate it out to the \`to.${i}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function getPathContributingMatches(e){return e.filter((t,i)=>i===0||t.route.path&&t.route.path.length>0)}function getResolveToMatches(e){let t=getPathContributingMatches(e);return t.map((i,a)=>a===t.length-1?i.pathname:i.pathnameBase)}function resolveTo(e,t,i,a=!1){let o;typeof e=="string"?o=parsePath(e):(o={...e},invariant(!o.pathname||!o.pathname.includes("?"),getInvalidPathError("?","pathname","search",o)),invariant(!o.pathname||!o.pathname.includes("#"),getInvalidPathError("#","pathname","hash",o)),invariant(!o.search||!o.search.includes("#"),getInvalidPathError("#","search","hash",o)));let l=e===""||o.pathname==="",u=l?"/":o.pathname,f;if(u==null)f=i;else{let g=t.length-1;if(!a&&u.startsWith("..")){let b=u.split("/");for(;b[0]==="..";)b.shift(),g-=1;o.pathname=b.join("/")}f=g>=0?t[g]:"/"}let h=resolvePath(o,f),p=u&&u!=="/"&&u.endsWith("/"),m=(l||u===".")&&i.endsWith("/");return!h.pathname.endsWith("/")&&(p||m)&&(h.pathname+="/"),h}var joinPaths=e=>e.join("/").replace(/\/\/+/g,"/"),normalizePathname=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),normalizeSearch=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,normalizeHash=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function isRouteErrorResponse(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var validMutationMethodsArr=["POST","PUT","PATCH","DELETE"];new Set(validMutationMethodsArr);var validRequestMethodsArr=["GET",...validMutationMethodsArr];new Set(validRequestMethodsArr);var DataRouterContext=reactExports.createContext(null);DataRouterContext.displayName="DataRouter";var DataRouterStateContext=reactExports.createContext(null);DataRouterStateContext.displayName="DataRouterState";var ViewTransitionContext=reactExports.createContext({isTransitioning:!1});ViewTransitionContext.displayName="ViewTransition";var FetchersContext=reactExports.createContext(new Map);FetchersContext.displayName="Fetchers";var AwaitContext=reactExports.createContext(null);AwaitContext.displayName="Await";var NavigationContext=reactExports.createContext(null);NavigationContext.displayName="Navigation";var LocationContext=reactExports.createContext(null);LocationContext.displayName="Location";var RouteContext=reactExports.createContext({outlet:null,matches:[],isDataRoute:!1});RouteContext.displayName="Route";var RouteErrorContext=reactExports.createContext(null);RouteErrorContext.displayName="RouteError";function useHref(e,{relative:t}={}){invariant(useInRouterContext(),"useHref() may be used only in the context of a <Router> component.");let{basename:i,navigator:a}=reactExports.useContext(NavigationContext),{hash:o,pathname:l,search:u}=useResolvedPath(e,{relative:t}),f=l;return i!=="/"&&(f=l==="/"?i:joinPaths([i,l])),a.createHref({pathname:f,search:u,hash:o})}function useInRouterContext(){return reactExports.useContext(LocationContext)!=null}function useLocation(){return invariant(useInRouterContext(),"useLocation() may be used only in the context of a <Router> component."),reactExports.useContext(LocationContext).location}var navigateEffectWarning="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function useIsomorphicLayoutEffect(e){reactExports.useContext(NavigationContext).static||reactExports.useLayoutEffect(e)}function useNavigate(){let{isDataRoute:e}=reactExports.useContext(RouteContext);return e?useNavigateStable():useNavigateUnstable()}function useNavigateUnstable(){invariant(useInRouterContext(),"useNavigate() may be used only in the context of a <Router> component.");let e=reactExports.useContext(DataRouterContext),{basename:t,navigator:i}=reactExports.useContext(NavigationContext),{matches:a}=reactExports.useContext(RouteContext),{pathname:o}=useLocation(),l=JSON.stringify(getResolveToMatches(a)),u=reactExports.useRef(!1);return useIsomorphicLayoutEffect(()=>{u.current=!0}),reactExports.useCallback((h,p={})=>{if(warning(u.current,navigateEffectWarning),!u.current)return;if(typeof h=="number"){i.go(h);return}let m=resolveTo(h,JSON.parse(l),o,p.relative==="path");e==null&&t!=="/"&&(m.pathname=m.pathname==="/"?t:joinPaths([t,m.pathname])),(p.replace?i.replace:i.push)(m,p.state,p)},[t,i,l,o,e])}reactExports.createContext(null);function useResolvedPath(e,{relative:t}={}){let{matches:i}=reactExports.useContext(RouteContext),{pathname:a}=useLocation(),o=JSON.stringify(getResolveToMatches(i));return reactExports.useMemo(()=>resolveTo(e,JSON.parse(o),a,t==="path"),[e,o,a,t])}function useRoutesImpl(e,t,i,a){invariant(useInRouterContext(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o,static:l}=reactExports.useContext(NavigationContext),{matches:u}=reactExports.useContext(RouteContext),f=u[u.length-1],h=f?f.params:{},p=f?f.pathname:"/",m=f?f.pathnameBase:"/",g=f&&f.route;{let _=g&&g.path||"";warningOnce(p,!g||_.endsWith("*")||_.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${p}" (under <Route path="${_}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
||
|
||
Please change the parent <Route path="${_}"> to <Route path="${_==="/"?"*":`${_}/*`}">.`)}let b=useLocation(),x;x=b;let y=x.pathname||"/",S=y;if(m!=="/"){let _=m.replace(/^\//,"").split("/");S="/"+y.replace(/^\//,"").split("/").slice(_.length).join("/")}let E=!l&&i&&i.matches&&i.matches.length>0?i.matches:matchRoutes(e,{pathname:S});return warning(g||E!=null,`No routes matched location "${x.pathname}${x.search}${x.hash}" `),warning(E==null||E[E.length-1].route.element!==void 0||E[E.length-1].route.Component!==void 0||E[E.length-1].route.lazy!==void 0,`Matched leaf route at location "${x.pathname}${x.search}${x.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),_renderMatches(E&&E.map(_=>Object.assign({},_,{params:Object.assign({},h,_.params),pathname:joinPaths([m,o.encodeLocation?o.encodeLocation(_.pathname).pathname:_.pathname]),pathnameBase:_.pathnameBase==="/"?m:joinPaths([m,o.encodeLocation?o.encodeLocation(_.pathnameBase).pathname:_.pathnameBase])})),u,i,a)}function DefaultErrorComponent(){let e=useRouteError(),t=isRouteErrorResponse(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),i=e instanceof Error?e.stack:null,a="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:a},l={padding:"2px 4px",backgroundColor:a},u=null;return console.error("Error handled by React Router default ErrorBoundary:",e),u=reactExports.createElement(reactExports.Fragment,null,reactExports.createElement("p",null,"💿 Hey developer 👋"),reactExports.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",reactExports.createElement("code",{style:l},"ErrorBoundary")," or"," ",reactExports.createElement("code",{style:l},"errorElement")," prop on your route.")),reactExports.createElement(reactExports.Fragment,null,reactExports.createElement("h2",null,"Unexpected Application Error!"),reactExports.createElement("h3",{style:{fontStyle:"italic"}},t),i?reactExports.createElement("pre",{style:o},i):null,u)}var defaultErrorElement=reactExports.createElement(DefaultErrorComponent,null),RenderErrorBoundary=class extends reactExports.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error!==void 0?reactExports.createElement(RouteContext.Provider,{value:this.props.routeContext},reactExports.createElement(RouteErrorContext.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function RenderedRoute({routeContext:e,match:t,children:i}){let a=reactExports.useContext(DataRouterContext);return a&&a.static&&a.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=t.route.id),reactExports.createElement(RouteContext.Provider,{value:e},i)}function _renderMatches(e,t=[],i=null,a=null){if(e==null){if(!i)return null;if(i.errors)e=i.matches;else if(t.length===0&&!i.initialized&&i.matches.length>0)e=i.matches;else return null}let o=e,l=i==null?void 0:i.errors;if(l!=null){let h=o.findIndex(p=>p.route.id&&(l==null?void 0:l[p.route.id])!==void 0);invariant(h>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(l).join(",")}`),o=o.slice(0,Math.min(o.length,h+1))}let u=!1,f=-1;if(i)for(let h=0;h<o.length;h++){let p=o[h];if((p.route.HydrateFallback||p.route.hydrateFallbackElement)&&(f=h),p.route.id){let{loaderData:m,errors:g}=i,b=p.route.loader&&!m.hasOwnProperty(p.route.id)&&(!g||g[p.route.id]===void 0);if(p.route.lazy||b){u=!0,f>=0?o=o.slice(0,f+1):o=[o[0]];break}}}return o.reduceRight((h,p,m)=>{let g,b=!1,x=null,y=null;i&&(g=l&&p.route.id?l[p.route.id]:void 0,x=p.route.errorElement||defaultErrorElement,u&&(f<0&&m===0?(warningOnce("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),b=!0,y=null):f===m&&(b=!0,y=p.route.hydrateFallbackElement||null)));let S=t.concat(o.slice(0,m+1)),E=()=>{let w;return g?w=x:b?w=y:p.route.Component?w=reactExports.createElement(p.route.Component,null):p.route.element?w=p.route.element:w=h,reactExports.createElement(RenderedRoute,{match:p,routeContext:{outlet:h,matches:S,isDataRoute:i!=null},children:w})};return i&&(p.route.ErrorBoundary||p.route.errorElement||m===0)?reactExports.createElement(RenderErrorBoundary,{location:i.location,revalidation:i.revalidation,component:x,error:g,children:E(),routeContext:{outlet:null,matches:S,isDataRoute:!0}}):E()},null)}function getDataRouterConsoleError(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function useDataRouterContext(e){let t=reactExports.useContext(DataRouterContext);return invariant(t,getDataRouterConsoleError(e)),t}function useDataRouterState(e){let t=reactExports.useContext(DataRouterStateContext);return invariant(t,getDataRouterConsoleError(e)),t}function useRouteContext(e){let t=reactExports.useContext(RouteContext);return invariant(t,getDataRouterConsoleError(e)),t}function useCurrentRouteId(e){let t=useRouteContext(e),i=t.matches[t.matches.length-1];return invariant(i.route.id,`${e} can only be used on routes that contain a unique "id"`),i.route.id}function useRouteId(){return useCurrentRouteId("useRouteId")}function useRouteError(){var a;let e=reactExports.useContext(RouteErrorContext),t=useDataRouterState("useRouteError"),i=useCurrentRouteId("useRouteError");return e!==void 0?e:(a=t.errors)==null?void 0:a[i]}function useNavigateStable(){let{router:e}=useDataRouterContext("useNavigate"),t=useCurrentRouteId("useNavigate"),i=reactExports.useRef(!1);return useIsomorphicLayoutEffect(()=>{i.current=!0}),reactExports.useCallback(async(o,l={})=>{warning(i.current,navigateEffectWarning),i.current&&(typeof o=="number"?e.navigate(o):await e.navigate(o,{fromRouteId:t,...l}))},[e,t])}var alreadyWarned$1={};function warningOnce(e,t,i){!t&&!alreadyWarned$1[e]&&(alreadyWarned$1[e]=!0,warning(!1,i))}reactExports.memo(DataRoutes);function DataRoutes({routes:e,future:t,state:i}){return useRoutesImpl(e,void 0,i,t)}function Router({basename:e="/",children:t=null,location:i,navigationType:a="POP",navigator:o,static:l=!1}){invariant(!useInRouterContext(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let u=e.replace(/^\/*/,"/"),f=reactExports.useMemo(()=>({basename:u,navigator:o,static:l,future:{}}),[u,o,l]);typeof i=="string"&&(i=parsePath(i));let{pathname:h="/",search:p="",hash:m="",state:g=null,key:b="default"}=i,x=reactExports.useMemo(()=>{let y=stripBasename(h,u);return y==null?null:{location:{pathname:y,search:p,hash:m,state:g,key:b},navigationType:a}},[u,h,p,m,g,b,a]);return warning(x!=null,`<Router basename="${u}"> is not able to match the URL "${h}${p}${m}" because it does not start with the basename, so the <Router> won't render anything.`),x==null?null:reactExports.createElement(NavigationContext.Provider,{value:f},reactExports.createElement(LocationContext.Provider,{children:t,value:x}))}var defaultMethod="get",defaultEncType="application/x-www-form-urlencoded";function isHtmlElement(e){return e!=null&&typeof e.tagName=="string"}function isButtonElement(e){return isHtmlElement(e)&&e.tagName.toLowerCase()==="button"}function isFormElement(e){return isHtmlElement(e)&&e.tagName.toLowerCase()==="form"}function isInputElement(e){return isHtmlElement(e)&&e.tagName.toLowerCase()==="input"}function isModifiedEvent(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function shouldProcessLinkClick(e,t){return e.button===0&&(!t||t==="_self")&&!isModifiedEvent(e)}function createSearchParams(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,i)=>{let a=e[i];return t.concat(Array.isArray(a)?a.map(o=>[i,o]):[[i,a]])},[]))}function getSearchParamsForLocation(e,t){let i=createSearchParams(e);return t&&t.forEach((a,o)=>{i.has(o)||t.getAll(o).forEach(l=>{i.append(o,l)})}),i}var _formDataSupportsSubmitter=null;function isFormDataSubmitterSupported(){if(_formDataSupportsSubmitter===null)try{new FormData(document.createElement("form"),0),_formDataSupportsSubmitter=!1}catch{_formDataSupportsSubmitter=!0}return _formDataSupportsSubmitter}var supportedFormEncTypes=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function getFormEncType(e){return e!=null&&!supportedFormEncTypes.has(e)?(warning(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${defaultEncType}"`),null):e}function getFormSubmissionInfo(e,t){let i,a,o,l,u;if(isFormElement(e)){let f=e.getAttribute("action");a=f?stripBasename(f,t):null,i=e.getAttribute("method")||defaultMethod,o=getFormEncType(e.getAttribute("enctype"))||defaultEncType,l=new FormData(e)}else if(isButtonElement(e)||isInputElement(e)&&(e.type==="submit"||e.type==="image")){let f=e.form;if(f==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let h=e.getAttribute("formaction")||f.getAttribute("action");if(a=h?stripBasename(h,t):null,i=e.getAttribute("formmethod")||f.getAttribute("method")||defaultMethod,o=getFormEncType(e.getAttribute("formenctype"))||getFormEncType(f.getAttribute("enctype"))||defaultEncType,l=new FormData(f,e),!isFormDataSubmitterSupported()){let{name:p,type:m,value:g}=e;if(m==="image"){let b=p?`${p}.`:"";l.append(`${b}x`,"0"),l.append(`${b}y`,"0")}else p&&l.append(p,g)}}else{if(isHtmlElement(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');i=defaultMethod,a=null,o=defaultEncType,u=e}return l&&o==="text/plain"&&(u=l,l=void 0),{action:a,method:i.toLowerCase(),encType:o,formData:l,body:u}}function invariant2(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}async function loadRouteModule(e,t){if(e.id in t)return t[e.id];try{let i=await import(e.module);return t[e.id]=i,i}catch(i){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(i),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function isHtmlLinkDescriptor(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function getKeyedPrefetchLinks(e,t,i){let a=await Promise.all(e.map(async o=>{let l=t.routes[o.route.id];if(l){let u=await loadRouteModule(l,i);return u.links?u.links():[]}return[]}));return dedupeLinkDescriptors(a.flat(1).filter(isHtmlLinkDescriptor).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function getNewMatchesForLinks(e,t,i,a,o,l){let u=(h,p)=>i[p]?h.route.id!==i[p].route.id:!0,f=(h,p)=>{var m;return i[p].pathname!==h.pathname||((m=i[p].route.path)==null?void 0:m.endsWith("*"))&&i[p].params["*"]!==h.params["*"]};return l==="assets"?t.filter((h,p)=>u(h,p)||f(h,p)):l==="data"?t.filter((h,p)=>{var g;let m=a.routes[h.route.id];if(!m||!m.hasLoader)return!1;if(u(h,p)||f(h,p))return!0;if(h.route.shouldRevalidate){let b=h.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:((g=i[0])==null?void 0:g.params)||{},nextUrl:new URL(e,window.origin),nextParams:h.params,defaultShouldRevalidate:!0});if(typeof b=="boolean")return b}return!0}):[]}function getModuleLinkHrefs(e,t,{includeHydrateFallback:i}={}){return dedupeHrefs(e.map(a=>{let o=t.routes[a.route.id];if(!o)return[];let l=[o.module];return o.clientActionModule&&(l=l.concat(o.clientActionModule)),o.clientLoaderModule&&(l=l.concat(o.clientLoaderModule)),i&&o.hydrateFallbackModule&&(l=l.concat(o.hydrateFallbackModule)),o.imports&&(l=l.concat(o.imports)),l}).flat(1))}function dedupeHrefs(e){return[...new Set(e)]}function sortKeys(e){let t={},i=Object.keys(e).sort();for(let a of i)t[a]=e[a];return t}function dedupeLinkDescriptors(e,t){let i=new Set;return new Set(t),e.reduce((a,o)=>{let l=JSON.stringify(sortKeys(o));return i.has(l)||(i.add(l),a.push({key:l,link:o})),a},[])}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var NO_BODY_STATUS_CODES=new Set([100,101,204,205]);function singleFetchUrl(e,t){let i=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return i.pathname==="/"?i.pathname="_root.data":t&&stripBasename(i.pathname,t)==="/"?i.pathname=`${t.replace(/\/$/,"")}/_root.data`:i.pathname=`${i.pathname.replace(/\/$/,"")}.data`,i}function useDataRouterContext2(){let e=reactExports.useContext(DataRouterContext);return invariant2(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function useDataRouterStateContext(){let e=reactExports.useContext(DataRouterStateContext);return invariant2(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var FrameworkContext=reactExports.createContext(void 0);FrameworkContext.displayName="FrameworkContext";function useFrameworkContext(){let e=reactExports.useContext(FrameworkContext);return invariant2(e,"You must render this element inside a <HydratedRouter> element"),e}function usePrefetchBehavior(e,t){let i=reactExports.useContext(FrameworkContext),[a,o]=reactExports.useState(!1),[l,u]=reactExports.useState(!1),{onFocus:f,onBlur:h,onMouseEnter:p,onMouseLeave:m,onTouchStart:g}=t,b=reactExports.useRef(null);reactExports.useEffect(()=>{if(e==="render"&&u(!0),e==="viewport"){let S=w=>{w.forEach(_=>{u(_.isIntersecting)})},E=new IntersectionObserver(S,{threshold:.5});return b.current&&E.observe(b.current),()=>{E.disconnect()}}},[e]),reactExports.useEffect(()=>{if(a){let S=setTimeout(()=>{u(!0)},100);return()=>{clearTimeout(S)}}},[a]);let x=()=>{o(!0)},y=()=>{o(!1),u(!1)};return i?e!=="intent"?[l,b,{}]:[l,b,{onFocus:composeEventHandlers$1(f,x),onBlur:composeEventHandlers$1(h,y),onMouseEnter:composeEventHandlers$1(p,x),onMouseLeave:composeEventHandlers$1(m,y),onTouchStart:composeEventHandlers$1(g,x)}]:[!1,b,{}]}function composeEventHandlers$1(e,t){return i=>{e&&e(i),i.defaultPrevented||t(i)}}function PrefetchPageLinks({page:e,...t}){let{router:i}=useDataRouterContext2(),a=reactExports.useMemo(()=>matchRoutes(i.routes,e,i.basename),[i.routes,e,i.basename]);return a?reactExports.createElement(PrefetchPageLinksImpl,{page:e,matches:a,...t}):null}function useKeyedPrefetchLinks(e){let{manifest:t,routeModules:i}=useFrameworkContext(),[a,o]=reactExports.useState([]);return reactExports.useEffect(()=>{let l=!1;return getKeyedPrefetchLinks(e,t,i).then(u=>{l||o(u)}),()=>{l=!0}},[e,t,i]),a}function PrefetchPageLinksImpl({page:e,matches:t,...i}){let a=useLocation(),{manifest:o,routeModules:l}=useFrameworkContext(),{basename:u}=useDataRouterContext2(),{loaderData:f,matches:h}=useDataRouterStateContext(),p=reactExports.useMemo(()=>getNewMatchesForLinks(e,t,h,o,a,"data"),[e,t,h,o,a]),m=reactExports.useMemo(()=>getNewMatchesForLinks(e,t,h,o,a,"assets"),[e,t,h,o,a]),g=reactExports.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let y=new Set,S=!1;if(t.forEach(w=>{var O;let _=o.routes[w.route.id];!_||!_.hasLoader||(!p.some(k=>k.route.id===w.route.id)&&w.route.id in f&&((O=l[w.route.id])!=null&&O.shouldRevalidate)||_.hasClientLoader?S=!0:y.add(w.route.id))}),y.size===0)return[];let E=singleFetchUrl(e,u);return S&&y.size>0&&E.searchParams.set("_routes",t.filter(w=>y.has(w.route.id)).map(w=>w.route.id).join(",")),[E.pathname+E.search]},[u,f,a,o,p,t,e,l]),b=reactExports.useMemo(()=>getModuleLinkHrefs(m,o),[m,o]),x=useKeyedPrefetchLinks(m);return reactExports.createElement(reactExports.Fragment,null,g.map(y=>reactExports.createElement("link",{key:y,rel:"prefetch",as:"fetch",href:y,...i})),b.map(y=>reactExports.createElement("link",{key:y,rel:"modulepreload",href:y,...i})),x.map(({key:y,link:S})=>reactExports.createElement("link",{key:y,...S})))}function mergeRefs(...e){return t=>{e.forEach(i=>{typeof i=="function"?i(t):i!=null&&(i.current=t)})}}var isBrowser$1=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{isBrowser$1&&(window.__reactRouterVersion="7.6.0")}catch{}function BrowserRouter({basename:e,children:t,window:i}){let a=reactExports.useRef();a.current==null&&(a.current=createBrowserHistory({window:i,v5Compat:!0}));let o=a.current,[l,u]=reactExports.useState({action:o.action,location:o.location}),f=reactExports.useCallback(h=>{reactExports.startTransition(()=>u(h))},[u]);return reactExports.useLayoutEffect(()=>o.listen(f),[o,f]),reactExports.createElement(Router,{basename:e,children:t,location:l.location,navigationType:l.action,navigator:o})}var ABSOLUTE_URL_REGEX2=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Link=reactExports.forwardRef(function({onClick:t,discover:i="render",prefetch:a="none",relative:o,reloadDocument:l,replace:u,state:f,target:h,to:p,preventScrollReset:m,viewTransition:g,...b},x){let{basename:y}=reactExports.useContext(NavigationContext),S=typeof p=="string"&&ABSOLUTE_URL_REGEX2.test(p),E,w=!1;if(typeof p=="string"&&S&&(E=p,isBrowser$1))try{let j=new URL(window.location.href),P=p.startsWith("//")?new URL(j.protocol+p):new URL(p),M=stripBasename(P.pathname,y);P.origin===j.origin&&M!=null?p=M+P.search+P.hash:w=!0}catch{warning(!1,`<Link to="${p}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let _=useHref(p,{relative:o}),[O,k,A]=usePrefetchBehavior(a,b),D=useLinkClickHandler(p,{replace:u,state:f,target:h,preventScrollReset:m,relative:o,viewTransition:g});function R(j){t&&t(j),j.defaultPrevented||D(j)}let T=reactExports.createElement("a",{...b,...A,href:E||_,onClick:w||l?t:R,ref:mergeRefs(x,k),target:h,"data-discover":!S&&i==="render"?"true":void 0});return O&&!S?reactExports.createElement(reactExports.Fragment,null,T,reactExports.createElement(PrefetchPageLinks,{page:_})):T});Link.displayName="Link";var NavLink=reactExports.forwardRef(function({"aria-current":t="page",caseSensitive:i=!1,className:a="",end:o=!1,style:l,to:u,viewTransition:f,children:h,...p},m){let g=useResolvedPath(u,{relative:p.relative}),b=useLocation(),x=reactExports.useContext(DataRouterStateContext),{navigator:y,basename:S}=reactExports.useContext(NavigationContext),E=x!=null&&useViewTransitionState(g)&&f===!0,w=y.encodeLocation?y.encodeLocation(g).pathname:g.pathname,_=b.pathname,O=x&&x.navigation&&x.navigation.location?x.navigation.location.pathname:null;i||(_=_.toLowerCase(),O=O?O.toLowerCase():null,w=w.toLowerCase()),O&&S&&(O=stripBasename(O,S)||O);const k=w!=="/"&&w.endsWith("/")?w.length-1:w.length;let A=_===w||!o&&_.startsWith(w)&&_.charAt(k)==="/",D=O!=null&&(O===w||!o&&O.startsWith(w)&&O.charAt(w.length)==="/"),R={isActive:A,isPending:D,isTransitioning:E},T=A?t:void 0,j;typeof a=="function"?j=a(R):j=[a,A?"active":null,D?"pending":null,E?"transitioning":null].filter(Boolean).join(" ");let P=typeof l=="function"?l(R):l;return reactExports.createElement(Link,{...p,"aria-current":T,className:j,ref:m,style:P,to:u,viewTransition:f},typeof h=="function"?h(R):h)});NavLink.displayName="NavLink";var Form=reactExports.forwardRef(({discover:e="render",fetcherKey:t,navigate:i,reloadDocument:a,replace:o,state:l,method:u=defaultMethod,action:f,onSubmit:h,relative:p,preventScrollReset:m,viewTransition:g,...b},x)=>{let y=useSubmit(),S=useFormAction(f,{relative:p}),E=u.toLowerCase()==="get"?"get":"post",w=typeof f=="string"&&ABSOLUTE_URL_REGEX2.test(f),_=O=>{if(h&&h(O),O.defaultPrevented)return;O.preventDefault();let k=O.nativeEvent.submitter,A=(k==null?void 0:k.getAttribute("formmethod"))||u;y(k||O.currentTarget,{fetcherKey:t,method:A,navigate:i,replace:o,state:l,relative:p,preventScrollReset:m,viewTransition:g})};return reactExports.createElement("form",{ref:x,method:E,action:S,onSubmit:a?h:_,...b,"data-discover":!w&&e==="render"?"true":void 0})});Form.displayName="Form";function getDataRouterConsoleError2(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function useDataRouterContext3(e){let t=reactExports.useContext(DataRouterContext);return invariant(t,getDataRouterConsoleError2(e)),t}function useLinkClickHandler(e,{target:t,replace:i,state:a,preventScrollReset:o,relative:l,viewTransition:u}={}){let f=useNavigate(),h=useLocation(),p=useResolvedPath(e,{relative:l});return reactExports.useCallback(m=>{if(shouldProcessLinkClick(m,t)){m.preventDefault();let g=i!==void 0?i:createPath(h)===createPath(p);f(e,{replace:g,state:a,preventScrollReset:o,relative:l,viewTransition:u})}},[h,f,p,i,a,t,e,o,l,u])}function useSearchParams(e){warning(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=reactExports.useRef(createSearchParams(e)),i=reactExports.useRef(!1),a=useLocation(),o=reactExports.useMemo(()=>getSearchParamsForLocation(a.search,i.current?null:t.current),[a.search]),l=useNavigate(),u=reactExports.useCallback((f,h)=>{const p=createSearchParams(typeof f=="function"?f(o):f);i.current=!0,l("?"+p,h)},[l,o]);return[o,u]}var fetcherId=0,getUniqueFetcherId=()=>`__${String(++fetcherId)}__`;function useSubmit(){let{router:e}=useDataRouterContext3("useSubmit"),{basename:t}=reactExports.useContext(NavigationContext),i=useRouteId();return reactExports.useCallback(async(a,o={})=>{let{action:l,method:u,encType:f,formData:h,body:p}=getFormSubmissionInfo(a,t);if(o.navigate===!1){let m=o.fetcherKey||getUniqueFetcherId();await e.fetch(m,i,o.action||l,{preventScrollReset:o.preventScrollReset,formData:h,body:p,formMethod:o.method||u,formEncType:o.encType||f,flushSync:o.flushSync})}else await e.navigate(o.action||l,{preventScrollReset:o.preventScrollReset,formData:h,body:p,formMethod:o.method||u,formEncType:o.encType||f,replace:o.replace,state:o.state,fromRouteId:i,flushSync:o.flushSync,viewTransition:o.viewTransition})},[e,t,i])}function useFormAction(e,{relative:t}={}){let{basename:i}=reactExports.useContext(NavigationContext),a=reactExports.useContext(RouteContext);invariant(a,"useFormAction must be used inside a RouteContext");let[o]=a.matches.slice(-1),l={...useResolvedPath(e||".",{relative:t})},u=useLocation();if(e==null){l.search=u.search;let f=new URLSearchParams(l.search),h=f.getAll("index");if(h.some(m=>m==="")){f.delete("index"),h.filter(g=>g).forEach(g=>f.append("index",g));let m=f.toString();l.search=m?`?${m}`:""}}return(!e||e===".")&&o.route.index&&(l.search=l.search?l.search.replace(/^\?/,"?index&"):"?index"),i!=="/"&&(l.pathname=l.pathname==="/"?i:joinPaths([i,l.pathname])),createPath(l)}function useViewTransitionState(e,t={}){let i=reactExports.useContext(ViewTransitionContext);invariant(i!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=useDataRouterContext3("useViewTransitionState"),o=useResolvedPath(e,{relative:t.relative});if(!i.isTransitioning)return!1;let l=stripBasename(i.currentLocation.pathname,a)||i.currentLocation.pathname,u=stripBasename(i.nextLocation.pathname,a)||i.nextLocation.pathname;return matchPath(o.pathname,u)!=null||matchPath(o.pathname,l)!=null}[...NO_BODY_STATUS_CODES];const warn=(e,t,i,a)=>{var l,u,f,h;const o=[i,{code:t,...a||{}}];if((u=(l=e==null?void 0:e.services)==null?void 0:l.logger)!=null&&u.forward)return e.services.logger.forward(o,"warn","react-i18next::",!0);isString$2(o[0])&&(o[0]=`react-i18next:: ${o[0]}`),(h=(f=e==null?void 0:e.services)==null?void 0:f.logger)!=null&&h.warn?e.services.logger.warn(...o):console!=null&&console.warn&&console.warn(...o)},alreadyWarned={},warnOnce=(e,t,i,a)=>{isString$2(i)&&alreadyWarned[i]||(isString$2(i)&&(alreadyWarned[i]=new Date),warn(e,t,i,a))},loadedClb=(e,t)=>()=>{if(e.isInitialized)t();else{const i=()=>{setTimeout(()=>{e.off("initialized",i)},0),t()};e.on("initialized",i)}},loadNamespaces=(e,t,i)=>{e.loadNamespaces(t,loadedClb(e,i))},loadLanguages=(e,t,i,a)=>{if(isString$2(i)&&(i=[i]),e.options.preload&&e.options.preload.indexOf(t)>-1)return loadNamespaces(e,i,a);i.forEach(o=>{e.options.ns.indexOf(o)<0&&e.options.ns.push(o)}),e.loadLanguages(t,loadedClb(e,a))},hasLoadedNamespace=(e,t,i={})=>!t.languages||!t.languages.length?(warnOnce(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:i.lng,precheck:(a,o)=>{var l;if(((l=i.bindI18n)==null?void 0:l.indexOf("languageChanging"))>-1&&a.services.backendConnector.backend&&a.isLanguageChangingTo&&!o(a.isLanguageChangingTo,e))return!1}}),isString$2=e=>typeof e=="string",isObject$2=e=>typeof e=="object"&&e!==null,matchHtmlEntity=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,htmlEntities={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},unescapeHtmlEntity=e=>htmlEntities[e],unescape$1=e=>e.replace(matchHtmlEntity,unescapeHtmlEntity);let defaultOptions={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:unescape$1};const setDefaults=(e={})=>{defaultOptions={...defaultOptions,...e}},getDefaults$2=()=>defaultOptions;let i18nInstance;const setI18n=e=>{i18nInstance=e},getI18n=()=>i18nInstance,initReactI18next={type:"3rdParty",init(e){setDefaults(e.options.react),setI18n(e)}},I18nContext=reactExports.createContext();class ReportNamespaces{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(i=>{this.usedNamespaces[i]||(this.usedNamespaces[i]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const usePrevious=(e,t)=>{const i=reactExports.useRef();return reactExports.useEffect(()=>{i.current=e},[e,t]),i.current},alwaysNewT=(e,t,i,a)=>e.getFixedT(t,i,a),useMemoizedT=(e,t,i,a)=>reactExports.useCallback(alwaysNewT(e,t,i,a),[e,t,i,a]),useTranslation=(e,t={})=>{var k,A,D,R;const{i18n:i}=t,{i18n:a,defaultNS:o}=reactExports.useContext(I18nContext)||{},l=i||a||getI18n();if(l&&!l.reportNamespaces&&(l.reportNamespaces=new ReportNamespaces),!l){warnOnce(l,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const T=(P,M)=>isString$2(M)?M:isObject$2(M)&&isString$2(M.defaultValue)?M.defaultValue:Array.isArray(P)?P[P.length-1]:P,j=[T,{},!1];return j.t=T,j.i18n={},j.ready=!1,j}(k=l.options.react)!=null&&k.wait&&warnOnce(l,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const u={...getDefaults$2(),...l.options.react,...t},{useSuspense:f,keyPrefix:h}=u;let p=o||((A=l.options)==null?void 0:A.defaultNS);p=isString$2(p)?[p]:p||["translation"],(R=(D=l.reportNamespaces).addUsedNamespaces)==null||R.call(D,p);const m=(l.isInitialized||l.initializedStoreOnce)&&p.every(T=>hasLoadedNamespace(T,l,u)),g=useMemoizedT(l,t.lng||null,u.nsMode==="fallback"?p:p[0],h),b=()=>g,x=()=>alwaysNewT(l,t.lng||null,u.nsMode==="fallback"?p:p[0],h),[y,S]=reactExports.useState(b);let E=p.join();t.lng&&(E=`${t.lng}${E}`);const w=usePrevious(E),_=reactExports.useRef(!0);reactExports.useEffect(()=>{const{bindI18n:T,bindI18nStore:j}=u;_.current=!0,!m&&!f&&(t.lng?loadLanguages(l,t.lng,p,()=>{_.current&&S(x)}):loadNamespaces(l,p,()=>{_.current&&S(x)})),m&&w&&w!==E&&_.current&&S(x);const P=()=>{_.current&&S(x)};return T&&(l==null||l.on(T,P)),j&&(l==null||l.store.on(j,P)),()=>{_.current=!1,l&&(T==null||T.split(" ").forEach(M=>l.off(M,P))),j&&l&&j.split(" ").forEach(M=>l.store.off(M,P))}},[l,E]),reactExports.useEffect(()=>{_.current&&m&&S(b)},[l,h,m]);const O=[y,l,m];if(O.t=y,O.i18n=l,O.ready=m,m||!m&&!f)return O;throw new Promise(T=>{t.lng?loadLanguages(l,t.lng,p,()=>T()):loadNamespaces(l,p,()=>T())})},defaultGenerator=e=>e,createClassNameGenerator=()=>{let e=defaultGenerator;return{configure(t){e=t},generate(t){return e(t)},reset(){e=defaultGenerator}}},ClassNameGenerator=createClassNameGenerator();function formatMuiErrorMessage(e,...t){const i=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(a=>i.searchParams.append("args[]",a)),`Minified MUI error #${e}; visit ${i} for the full message.`}function capitalize(e){if(typeof e!="string")throw new Error(formatMuiErrorMessage(7));return e.charAt(0).toUpperCase()+e.slice(1)}var propTypes={exports:{}},ReactPropTypesSecret_1,hasRequiredReactPropTypesSecret;function requireReactPropTypesSecret(){if(hasRequiredReactPropTypesSecret)return ReactPropTypesSecret_1;hasRequiredReactPropTypesSecret=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return ReactPropTypesSecret_1=e,ReactPropTypesSecret_1}var factoryWithThrowingShims,hasRequiredFactoryWithThrowingShims;function requireFactoryWithThrowingShims(){if(hasRequiredFactoryWithThrowingShims)return factoryWithThrowingShims;hasRequiredFactoryWithThrowingShims=1;var e=requireReactPropTypesSecret();function t(){}function i(){}return i.resetWarningCache=t,factoryWithThrowingShims=function(){function a(u,f,h,p,m,g){if(g!==e){var b=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw b.name="Invariant Violation",b}}a.isRequired=a;function o(){return a}var l={array:a,bigint:a,bool:a,func:a,number:a,object:a,string:a,symbol:a,any:a,arrayOf:o,element:a,elementType:a,instanceOf:o,node:a,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:i,resetWarningCache:t};return l.PropTypes=l,l},factoryWithThrowingShims}var hasRequiredPropTypes;function requirePropTypes(){return hasRequiredPropTypes||(hasRequiredPropTypes=1,propTypes.exports=requireFactoryWithThrowingShims()()),propTypes.exports}var propTypesExports=requirePropTypes();const PropTypes=getDefaultExportFromCjs(propTypesExports);function composeClasses(e,t,i=void 0){const a={};for(const o in e){const l=e[o];let u="",f=!0;for(let h=0;h<l.length;h+=1){const p=l[h];p&&(u+=(f===!0?"":" ")+t(p),f=!1,i&&i[p]&&(u+=" "+i[p]))}a[o]=u}return a}var reactIs={exports:{}},reactIs_production={};/**
|
||
* @license React
|
||
* react-is.production.js
|
||
*
|
||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var hasRequiredReactIs_production;function requireReactIs_production(){if(hasRequiredReactIs_production)return reactIs_production;hasRequiredReactIs_production=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),u=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),b=Symbol.for("react.view_transition"),x=Symbol.for("react.client.reference");function y(S){if(typeof S=="object"&&S!==null){var E=S.$$typeof;switch(E){case e:switch(S=S.type,S){case i:case o:case a:case h:case p:case b:return S;default:switch(S=S&&S.$$typeof,S){case u:case f:case g:case m:return S;case l:return S;default:return E}}case t:return E}}}return reactIs_production.ContextConsumer=l,reactIs_production.ContextProvider=u,reactIs_production.Element=e,reactIs_production.ForwardRef=f,reactIs_production.Fragment=i,reactIs_production.Lazy=g,reactIs_production.Memo=m,reactIs_production.Portal=t,reactIs_production.Profiler=o,reactIs_production.StrictMode=a,reactIs_production.Suspense=h,reactIs_production.SuspenseList=p,reactIs_production.isContextConsumer=function(S){return y(S)===l},reactIs_production.isContextProvider=function(S){return y(S)===u},reactIs_production.isElement=function(S){return typeof S=="object"&&S!==null&&S.$$typeof===e},reactIs_production.isForwardRef=function(S){return y(S)===f},reactIs_production.isFragment=function(S){return y(S)===i},reactIs_production.isLazy=function(S){return y(S)===g},reactIs_production.isMemo=function(S){return y(S)===m},reactIs_production.isPortal=function(S){return y(S)===t},reactIs_production.isProfiler=function(S){return y(S)===o},reactIs_production.isStrictMode=function(S){return y(S)===a},reactIs_production.isSuspense=function(S){return y(S)===h},reactIs_production.isSuspenseList=function(S){return y(S)===p},reactIs_production.isValidElementType=function(S){return typeof S=="string"||typeof S=="function"||S===i||S===o||S===a||S===h||S===p||typeof S=="object"&&S!==null&&(S.$$typeof===g||S.$$typeof===m||S.$$typeof===u||S.$$typeof===l||S.$$typeof===f||S.$$typeof===x||S.getModuleId!==void 0)},reactIs_production.typeOf=y,reactIs_production}var hasRequiredReactIs;function requireReactIs(){return hasRequiredReactIs||(hasRequiredReactIs=1,reactIs.exports=requireReactIs_production()),reactIs.exports}var reactIsExports=requireReactIs();function isPlainObject$1(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function deepClone(e){if(reactExports.isValidElement(e)||reactIsExports.isValidElementType(e)||!isPlainObject$1(e))return e;const t={};return Object.keys(e).forEach(i=>{t[i]=deepClone(e[i])}),t}function deepmerge(e,t,i={clone:!0}){const a=i.clone?{...e}:e;return isPlainObject$1(e)&&isPlainObject$1(t)&&Object.keys(t).forEach(o=>{reactExports.isValidElement(t[o])||reactIsExports.isValidElementType(t[o])?a[o]=t[o]:isPlainObject$1(t[o])&&Object.prototype.hasOwnProperty.call(e,o)&&isPlainObject$1(e[o])?a[o]=deepmerge(e[o],t[o],i):i.clone?a[o]=isPlainObject$1(t[o])?deepClone(t[o]):t[o]:a[o]=t[o]}),a}function merge$1(e,t){return t?deepmerge(e,t,{clone:!1}):e}function sortContainerQueries(e,t){if(!e.containerQueries)return t;const i=Object.keys(t).filter(a=>a.startsWith("@container")).sort((a,o)=>{var u,f;const l=/min-width:\s*([0-9.]+)/;return+(((u=a.match(l))==null?void 0:u[1])||0)-+(((f=o.match(l))==null?void 0:f[1])||0)});return i.length?i.reduce((a,o)=>{const l=t[o];return delete a[o],a[o]=l,a},{...t}):t}function isCqShorthand(e,t){return t==="@"||t.startsWith("@")&&(e.some(i=>t.startsWith(`@${i}`))||!!t.match(/^@\d/))}function getContainerQuery(e,t){const i=t.match(/^@([^/]+)?\/?(.+)?$/);if(!i)return null;const[,a,o]=i,l=Number.isNaN(+a)?a||0:+a;return e.containerQueries(o).up(l)}function cssContainerQueries(e){const t=(l,u)=>l.replace("@media",u?`@container ${u}`:"@container");function i(l,u){l.up=(...f)=>t(e.breakpoints.up(...f),u),l.down=(...f)=>t(e.breakpoints.down(...f),u),l.between=(...f)=>t(e.breakpoints.between(...f),u),l.only=(...f)=>t(e.breakpoints.only(...f),u),l.not=(...f)=>{const h=t(e.breakpoints.not(...f),u);return h.includes("not all and")?h.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):h}}const a={},o=l=>(i(a,l),a);return i(o),{...e,containerQueries:o}}const values={xs:0,sm:600,md:900,lg:1200,xl:1536},defaultBreakpoints={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${values[e]}px)`},defaultContainerQueries={containerQueries:e=>({up:t=>{let i=typeof t=="number"?t:values[t]||t;return typeof i=="number"&&(i=`${i}px`),e?`@container ${e} (min-width:${i})`:`@container (min-width:${i})`}})};function handleBreakpoints(e,t,i){const a=e.theme||{};if(Array.isArray(t)){const l=a.breakpoints||defaultBreakpoints;return t.reduce((u,f,h)=>(u[l.up(l.keys[h])]=i(t[h]),u),{})}if(typeof t=="object"){const l=a.breakpoints||defaultBreakpoints;return Object.keys(t).reduce((u,f)=>{if(isCqShorthand(l.keys,f)){const h=getContainerQuery(a.containerQueries?a:defaultContainerQueries,f);h&&(u[h]=i(t[f],f))}else if(Object.keys(l.values||values).includes(f)){const h=l.up(f);u[h]=i(t[f],f)}else{const h=f;u[h]=t[h]}return u},{})}return i(t)}function createEmptyBreakpointObject(e={}){var i;return((i=e.keys)==null?void 0:i.reduce((a,o)=>{const l=e.up(o);return a[l]={},a},{}))||{}}function removeUnusedBreakpoints(e,t){return e.reduce((i,a)=>{const o=i[a];return(!o||Object.keys(o).length===0)&&delete i[a],i},t)}function getPath$1(e,t,i=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&i){const a=`vars.${t}`.split(".").reduce((o,l)=>o&&o[l]?o[l]:null,e);if(a!=null)return a}return t.split(".").reduce((a,o)=>a&&a[o]!=null?a[o]:null,e)}function getStyleValue(e,t,i,a=i){let o;return typeof e=="function"?o=e(i):Array.isArray(e)?o=e[i]||a:o=getPath$1(e,i)||a,t&&(o=t(o,a,e)),o}function style$1(e){const{prop:t,cssProperty:i=e.prop,themeKey:a,transform:o}=e,l=u=>{if(u[t]==null)return null;const f=u[t],h=u.theme,p=getPath$1(h,a)||{};return handleBreakpoints(u,f,g=>{let b=getStyleValue(p,o,g);return g===b&&typeof g=="string"&&(b=getStyleValue(p,o,`${t}${g==="default"?"":capitalize(g)}`,g)),i===!1?b:{[i]:b}})};return l.propTypes={},l.filterProps=[t],l}function memoize$1(e){const t={};return i=>(t[i]===void 0&&(t[i]=e(i)),t[i])}const properties={m:"margin",p:"padding"},directions={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},aliases={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},getCssProperties=memoize$1(e=>{if(e.length>2)if(aliases[e])e=aliases[e];else return[e];const[t,i]=e.split(""),a=properties[t],o=directions[i]||"";return Array.isArray(o)?o.map(l=>a+l):[a+o]}),marginKeys=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],paddingKeys=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...marginKeys,...paddingKeys];function createUnaryUnit(e,t,i,a){const o=getPath$1(e,t,!0)??i;return typeof o=="number"||typeof o=="string"?l=>typeof l=="string"?l:typeof o=="string"?o.startsWith("var(")&&l===0?0:o.startsWith("var(")&&l===1?o:`calc(${l} * ${o})`:o*l:Array.isArray(o)?l=>{if(typeof l=="string")return l;const u=Math.abs(l),f=o[u];return l>=0?f:typeof f=="number"?-f:typeof f=="string"&&f.startsWith("var(")?`calc(-1 * ${f})`:`-${f}`}:typeof o=="function"?o:()=>{}}function createUnarySpacing(e){return createUnaryUnit(e,"spacing",8)}function getValue(e,t){return typeof t=="string"||t==null?t:e(t)}function getStyleFromPropValue(e,t){return i=>e.reduce((a,o)=>(a[o]=getValue(t,i),a),{})}function resolveCssProperty(e,t,i,a){if(!t.includes(i))return null;const o=getCssProperties(i),l=getStyleFromPropValue(o,a),u=e[i];return handleBreakpoints(e,u,l)}function style(e,t){const i=createUnarySpacing(e.theme);return Object.keys(e).map(a=>resolveCssProperty(e,t,a,i)).reduce(merge$1,{})}function margin(e){return style(e,marginKeys)}margin.propTypes={};margin.filterProps=marginKeys;function padding(e){return style(e,paddingKeys)}padding.propTypes={};padding.filterProps=paddingKeys;function compose(...e){const t=e.reduce((a,o)=>(o.filterProps.forEach(l=>{a[l]=o}),a),{}),i=a=>Object.keys(a).reduce((o,l)=>t[l]?merge$1(o,t[l](a)):o,{});return i.propTypes={},i.filterProps=e.reduce((a,o)=>a.concat(o.filterProps),[]),i}function borderTransform(e){return typeof e!="number"?e:`${e}px solid`}function createBorderStyle(e,t){return style$1({prop:e,themeKey:"borders",transform:t})}const border=createBorderStyle("border",borderTransform),borderTop=createBorderStyle("borderTop",borderTransform),borderRight=createBorderStyle("borderRight",borderTransform),borderBottom=createBorderStyle("borderBottom",borderTransform),borderLeft=createBorderStyle("borderLeft",borderTransform),borderColor=createBorderStyle("borderColor"),borderTopColor=createBorderStyle("borderTopColor"),borderRightColor=createBorderStyle("borderRightColor"),borderBottomColor=createBorderStyle("borderBottomColor"),borderLeftColor=createBorderStyle("borderLeftColor"),outline=createBorderStyle("outline",borderTransform),outlineColor=createBorderStyle("outlineColor"),borderRadius=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=createUnaryUnit(e.theme,"shape.borderRadius",4),i=a=>({borderRadius:getValue(t,a)});return handleBreakpoints(e,e.borderRadius,i)}return null};borderRadius.propTypes={};borderRadius.filterProps=["borderRadius"];compose(border,borderTop,borderRight,borderBottom,borderLeft,borderColor,borderTopColor,borderRightColor,borderBottomColor,borderLeftColor,borderRadius,outline,outlineColor);const gap=e=>{if(e.gap!==void 0&&e.gap!==null){const t=createUnaryUnit(e.theme,"spacing",8),i=a=>({gap:getValue(t,a)});return handleBreakpoints(e,e.gap,i)}return null};gap.propTypes={};gap.filterProps=["gap"];const columnGap=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=createUnaryUnit(e.theme,"spacing",8),i=a=>({columnGap:getValue(t,a)});return handleBreakpoints(e,e.columnGap,i)}return null};columnGap.propTypes={};columnGap.filterProps=["columnGap"];const rowGap=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=createUnaryUnit(e.theme,"spacing",8),i=a=>({rowGap:getValue(t,a)});return handleBreakpoints(e,e.rowGap,i)}return null};rowGap.propTypes={};rowGap.filterProps=["rowGap"];const gridColumn=style$1({prop:"gridColumn"}),gridRow=style$1({prop:"gridRow"}),gridAutoFlow=style$1({prop:"gridAutoFlow"}),gridAutoColumns=style$1({prop:"gridAutoColumns"}),gridAutoRows=style$1({prop:"gridAutoRows"}),gridTemplateColumns=style$1({prop:"gridTemplateColumns"}),gridTemplateRows=style$1({prop:"gridTemplateRows"}),gridTemplateAreas=style$1({prop:"gridTemplateAreas"}),gridArea=style$1({prop:"gridArea"});compose(gap,columnGap,rowGap,gridColumn,gridRow,gridAutoFlow,gridAutoColumns,gridAutoRows,gridTemplateColumns,gridTemplateRows,gridTemplateAreas,gridArea);function paletteTransform(e,t){return t==="grey"?t:e}const color=style$1({prop:"color",themeKey:"palette",transform:paletteTransform}),bgcolor=style$1({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:paletteTransform}),backgroundColor=style$1({prop:"backgroundColor",themeKey:"palette",transform:paletteTransform});compose(color,bgcolor,backgroundColor);function sizingTransform(e){return e<=1&&e!==0?`${e*100}%`:e}const width=style$1({prop:"width",transform:sizingTransform}),maxWidth=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=i=>{var o,l,u,f,h;const a=((u=(l=(o=e.theme)==null?void 0:o.breakpoints)==null?void 0:l.values)==null?void 0:u[i])||values[i];return a?((h=(f=e.theme)==null?void 0:f.breakpoints)==null?void 0:h.unit)!=="px"?{maxWidth:`${a}${e.theme.breakpoints.unit}`}:{maxWidth:a}:{maxWidth:sizingTransform(i)}};return handleBreakpoints(e,e.maxWidth,t)}return null};maxWidth.filterProps=["maxWidth"];const minWidth=style$1({prop:"minWidth",transform:sizingTransform}),height=style$1({prop:"height",transform:sizingTransform}),maxHeight=style$1({prop:"maxHeight",transform:sizingTransform}),minHeight=style$1({prop:"minHeight",transform:sizingTransform});style$1({prop:"size",cssProperty:"width",transform:sizingTransform});style$1({prop:"size",cssProperty:"height",transform:sizingTransform});const boxSizing=style$1({prop:"boxSizing"});compose(width,maxWidth,minWidth,height,maxHeight,minHeight,boxSizing);const defaultSxConfig={border:{themeKey:"borders",transform:borderTransform},borderTop:{themeKey:"borders",transform:borderTransform},borderRight:{themeKey:"borders",transform:borderTransform},borderBottom:{themeKey:"borders",transform:borderTransform},borderLeft:{themeKey:"borders",transform:borderTransform},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:borderTransform},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:borderRadius},color:{themeKey:"palette",transform:paletteTransform},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:paletteTransform},backgroundColor:{themeKey:"palette",transform:paletteTransform},p:{style:padding},pt:{style:padding},pr:{style:padding},pb:{style:padding},pl:{style:padding},px:{style:padding},py:{style:padding},padding:{style:padding},paddingTop:{style:padding},paddingRight:{style:padding},paddingBottom:{style:padding},paddingLeft:{style:padding},paddingX:{style:padding},paddingY:{style:padding},paddingInline:{style:padding},paddingInlineStart:{style:padding},paddingInlineEnd:{style:padding},paddingBlock:{style:padding},paddingBlockStart:{style:padding},paddingBlockEnd:{style:padding},m:{style:margin},mt:{style:margin},mr:{style:margin},mb:{style:margin},ml:{style:margin},mx:{style:margin},my:{style:margin},margin:{style:margin},marginTop:{style:margin},marginRight:{style:margin},marginBottom:{style:margin},marginLeft:{style:margin},marginX:{style:margin},marginY:{style:margin},marginInline:{style:margin},marginInlineStart:{style:margin},marginInlineEnd:{style:margin},marginBlock:{style:margin},marginBlockStart:{style:margin},marginBlockEnd:{style:margin},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:gap},rowGap:{style:rowGap},columnGap:{style:columnGap},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:sizingTransform},maxWidth:{style:maxWidth},minWidth:{transform:sizingTransform},height:{transform:sizingTransform},maxHeight:{transform:sizingTransform},minHeight:{transform:sizingTransform},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function objectsHaveSameKeys(...e){const t=e.reduce((a,o)=>a.concat(Object.keys(o)),[]),i=new Set(t);return e.every(a=>i.size===Object.keys(a).length)}function callIfFn(e,t){return typeof e=="function"?e(t):e}function unstable_createStyleFunctionSx(){function e(i,a,o,l){const u={[i]:a,theme:o},f=l[i];if(!f)return{[i]:a};const{cssProperty:h=i,themeKey:p,transform:m,style:g}=f;if(a==null)return null;if(p==="typography"&&a==="inherit")return{[i]:a};const b=getPath$1(o,p)||{};return g?g(u):handleBreakpoints(u,a,y=>{let S=getStyleValue(b,m,y);return y===S&&typeof y=="string"&&(S=getStyleValue(b,m,`${i}${y==="default"?"":capitalize(y)}`,y)),h===!1?S:{[h]:S}})}function t(i){const{sx:a,theme:o={}}=i||{};if(!a)return null;const l=o.unstable_sxConfig??defaultSxConfig;function u(f){let h=f;if(typeof f=="function")h=f(o);else if(typeof f!="object")return f;if(!h)return null;const p=createEmptyBreakpointObject(o.breakpoints),m=Object.keys(p);let g=p;return Object.keys(h).forEach(b=>{const x=callIfFn(h[b],o);if(x!=null)if(typeof x=="object")if(l[b])g=merge$1(g,e(b,x,o,l));else{const y=handleBreakpoints({theme:o},x,S=>({[b]:S}));objectsHaveSameKeys(y,x)?g[b]=t({sx:x,theme:o}):g=merge$1(g,y)}else g=merge$1(g,e(b,x,o,l))}),sortContainerQueries(o,removeUnusedBreakpoints(m,g))}return Array.isArray(a)?a.map(u):u(a)}return t}const styleFunctionSx=unstable_createStyleFunctionSx();styleFunctionSx.filterProps=["sx"];function sheetForTag(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function createStyleElement(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var StyleSheet=function(){function e(i){var a=this;this._insertTag=function(o){var l;a.tags.length===0?a.insertionPoint?l=a.insertionPoint.nextSibling:a.prepend?l=a.container.firstChild:l=a.before:l=a.tags[a.tags.length-1].nextSibling,a.container.insertBefore(o,l),a.tags.push(o)},this.isSpeedy=i.speedy===void 0?!0:i.speedy,this.tags=[],this.ctr=0,this.nonce=i.nonce,this.key=i.key,this.container=i.container,this.prepend=i.prepend,this.insertionPoint=i.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(a){a.forEach(this._insertTag)},t.insert=function(a){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(createStyleElement(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var l=sheetForTag(o);try{l.insertRule(a,l.cssRules.length)}catch{}}else o.appendChild(document.createTextNode(a));this.ctr++},t.flush=function(){this.tags.forEach(function(a){var o;return(o=a.parentNode)==null?void 0:o.removeChild(a)}),this.tags=[],this.ctr=0},e}(),MS="-ms-",MOZ="-moz-",WEBKIT="-webkit-",COMMENT="comm",RULESET="rule",DECLARATION="decl",IMPORT="@import",KEYFRAMES="@keyframes",LAYER="@layer",abs=Math.abs,from=String.fromCharCode,assign=Object.assign;function hash(e,t){return charat(e,0)^45?(((t<<2^charat(e,0))<<2^charat(e,1))<<2^charat(e,2))<<2^charat(e,3):0}function trim$1(e){return e.trim()}function match(e,t){return(e=t.exec(e))?e[0]:e}function replace(e,t,i){return e.replace(t,i)}function indexof(e,t){return e.indexOf(t)}function charat(e,t){return e.charCodeAt(t)|0}function substr(e,t,i){return e.slice(t,i)}function strlen(e){return e.length}function sizeof(e){return e.length}function append(e,t){return t.push(e),e}function combine(e,t){return e.map(t).join("")}var line=1,column=1,length=0,position=0,character=0,characters="";function node(e,t,i,a,o,l,u){return{value:e,root:t,parent:i,type:a,props:o,children:l,line,column,length:u,return:""}}function copy$1(e,t){return assign(node("",null,null,"",null,null,0),e,{length:-e.length},t)}function char(){return character}function prev(){return character=position>0?charat(characters,--position):0,column--,character===10&&(column=1,line--),character}function next(){return character=position<length?charat(characters,position++):0,column++,character===10&&(column=1,line++),character}function peek(){return charat(characters,position)}function caret(){return position}function slice$1(e,t){return substr(characters,e,t)}function token(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function alloc(e){return line=column=1,length=strlen(characters=e),position=0,[]}function dealloc(e){return characters="",e}function delimit(e){return trim$1(slice$1(position-1,delimiter(e===91?e+2:e===40?e+1:e)))}function whitespace(e){for(;(character=peek())&&character<33;)next();return token(e)>2||token(character)>3?"":" "}function escaping(e,t){for(;--t&&next()&&!(character<48||character>102||character>57&&character<65||character>70&&character<97););return slice$1(e,caret()+(t<6&&peek()==32&&next()==32))}function delimiter(e){for(;next();)switch(character){case e:return position;case 34:case 39:e!==34&&e!==39&&delimiter(character);break;case 40:e===41&&delimiter(e);break;case 92:next();break}return position}function commenter(e,t){for(;next()&&e+character!==57;)if(e+character===84&&peek()===47)break;return"/*"+slice$1(t,position-1)+"*"+from(e===47?e:next())}function identifier(e){for(;!token(peek());)next();return slice$1(e,position)}function compile(e){return dealloc(parse("",null,null,null,[""],e=alloc(e),0,[0],e))}function parse(e,t,i,a,o,l,u,f,h){for(var p=0,m=0,g=u,b=0,x=0,y=0,S=1,E=1,w=1,_=0,O="",k=o,A=l,D=a,R=O;E;)switch(y=_,_=next()){case 40:if(y!=108&&charat(R,g-1)==58){indexof(R+=replace(delimit(_),"&","&\f"),"&\f")!=-1&&(w=-1);break}case 34:case 39:case 91:R+=delimit(_);break;case 9:case 10:case 13:case 32:R+=whitespace(y);break;case 92:R+=escaping(caret()-1,7);continue;case 47:switch(peek()){case 42:case 47:append(comment(commenter(next(),caret()),t,i),h);break;default:R+="/"}break;case 123*S:f[p++]=strlen(R)*w;case 125*S:case 59:case 0:switch(_){case 0:case 125:E=0;case 59+m:w==-1&&(R=replace(R,/\f/g,"")),x>0&&strlen(R)-g&&append(x>32?declaration(R+";",a,i,g-1):declaration(replace(R," ","")+";",a,i,g-2),h);break;case 59:R+=";";default:if(append(D=ruleset(R,t,i,p,m,o,f,O,k=[],A=[],g),l),_===123)if(m===0)parse(R,t,D,D,k,l,g,f,A);else switch(b===99&&charat(R,3)===110?100:b){case 100:case 108:case 109:case 115:parse(e,D,D,a&&append(ruleset(e,D,D,0,0,o,f,O,o,k=[],g),A),o,A,g,f,a?k:A);break;default:parse(R,D,D,D,[""],A,0,f,A)}}p=m=x=0,S=w=1,O=R="",g=u;break;case 58:g=1+strlen(R),x=y;default:if(S<1){if(_==123)--S;else if(_==125&&S++==0&&prev()==125)continue}switch(R+=from(_),_*S){case 38:w=m>0?1:(R+="\f",-1);break;case 44:f[p++]=(strlen(R)-1)*w,w=1;break;case 64:peek()===45&&(R+=delimit(next())),b=peek(),m=g=strlen(O=R+=identifier(caret())),_++;break;case 45:y===45&&strlen(R)==2&&(S=0)}}return l}function ruleset(e,t,i,a,o,l,u,f,h,p,m){for(var g=o-1,b=o===0?l:[""],x=sizeof(b),y=0,S=0,E=0;y<a;++y)for(var w=0,_=substr(e,g+1,g=abs(S=u[y])),O=e;w<x;++w)(O=trim$1(S>0?b[w]+" "+_:replace(_,/&\f/g,b[w])))&&(h[E++]=O);return node(e,t,i,o===0?RULESET:f,h,p,m)}function comment(e,t,i){return node(e,t,i,COMMENT,from(char()),substr(e,2,-2),0)}function declaration(e,t,i,a){return node(e,t,i,DECLARATION,substr(e,0,a),substr(e,a+1,-1),a)}function serialize(e,t){for(var i="",a=sizeof(e),o=0;o<a;o++)i+=t(e[o],o,e,t)||"";return i}function stringify(e,t,i,a){switch(e.type){case LAYER:if(e.children.length)break;case IMPORT:case DECLARATION:return e.return=e.return||e.value;case COMMENT:return"";case KEYFRAMES:return e.return=e.value+"{"+serialize(e.children,a)+"}";case RULESET:e.value=e.props.join(",")}return strlen(i=serialize(e.children,a))?e.return=e.value+"{"+i+"}":""}function middleware(e){var t=sizeof(e);return function(i,a,o,l){for(var u="",f=0;f<t;f++)u+=e[f](i,a,o,l)||"";return u}}function rulesheet(e){return function(t){t.root||(t=t.return)&&e(t)}}function memoize(e){var t=Object.create(null);return function(i){return t[i]===void 0&&(t[i]=e(i)),t[i]}}var identifierWithPointTracking=function(t,i,a){for(var o=0,l=0;o=l,l=peek(),o===38&&l===12&&(i[a]=1),!token(l);)next();return slice$1(t,position)},toRules=function(t,i){var a=-1,o=44;do switch(token(o)){case 0:o===38&&peek()===12&&(i[a]=1),t[a]+=identifierWithPointTracking(position-1,i,a);break;case 2:t[a]+=delimit(o);break;case 4:if(o===44){t[++a]=peek()===58?"&\f":"",i[a]=t[a].length;break}default:t[a]+=from(o)}while(o=next());return t},getRules=function(t,i){return dealloc(toRules(alloc(t),i))},fixedElements=new WeakMap,compat=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var i=t.value,a=t.parent,o=t.column===a.column&&t.line===a.line;a.type!=="rule";)if(a=a.parent,!a)return;if(!(t.props.length===1&&i.charCodeAt(0)!==58&&!fixedElements.get(a))&&!o){fixedElements.set(t,!0);for(var l=[],u=getRules(i,l),f=a.props,h=0,p=0;h<u.length;h++)for(var m=0;m<f.length;m++,p++)t.props[p]=l[h]?u[h].replace(/&\f/g,f[m]):f[m]+" "+u[h]}}},removeLabel=function(t){if(t.type==="decl"){var i=t.value;i.charCodeAt(0)===108&&i.charCodeAt(2)===98&&(t.return="",t.value="")}};function prefix(e,t){switch(hash(e,t)){case 5103:return WEBKIT+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return WEBKIT+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return WEBKIT+e+MOZ+e+MS+e+e;case 6828:case 4268:return WEBKIT+e+MS+e+e;case 6165:return WEBKIT+e+MS+"flex-"+e+e;case 5187:return WEBKIT+e+replace(e,/(\w+).+(:[^]+)/,WEBKIT+"box-$1$2"+MS+"flex-$1$2")+e;case 5443:return WEBKIT+e+MS+"flex-item-"+replace(e,/flex-|-self/,"")+e;case 4675:return WEBKIT+e+MS+"flex-line-pack"+replace(e,/align-content|flex-|-self/,"")+e;case 5548:return WEBKIT+e+MS+replace(e,"shrink","negative")+e;case 5292:return WEBKIT+e+MS+replace(e,"basis","preferred-size")+e;case 6060:return WEBKIT+"box-"+replace(e,"-grow","")+WEBKIT+e+MS+replace(e,"grow","positive")+e;case 4554:return WEBKIT+replace(e,/([^-])(transform)/g,"$1"+WEBKIT+"$2")+e;case 6187:return replace(replace(replace(e,/(zoom-|grab)/,WEBKIT+"$1"),/(image-set)/,WEBKIT+"$1"),e,"")+e;case 5495:case 3959:return replace(e,/(image-set\([^]*)/,WEBKIT+"$1$`$1");case 4968:return replace(replace(e,/(.+:)(flex-)?(.*)/,WEBKIT+"box-pack:$3"+MS+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+WEBKIT+e+e;case 4095:case 3583:case 4068:case 2532:return replace(e,/(.+)-inline(.+)/,WEBKIT+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(strlen(e)-1-t>6)switch(charat(e,t+1)){case 109:if(charat(e,t+4)!==45)break;case 102:return replace(e,/(.+:)(.+)-([^]+)/,"$1"+WEBKIT+"$2-$3$1"+MOZ+(charat(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~indexof(e,"stretch")?prefix(replace(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(charat(e,t+1)!==115)break;case 6444:switch(charat(e,strlen(e)-3-(~indexof(e,"!important")&&10))){case 107:return replace(e,":",":"+WEBKIT)+e;case 101:return replace(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+WEBKIT+(charat(e,14)===45?"inline-":"")+"box$3$1"+WEBKIT+"$2$3$1"+MS+"$2box$3")+e}break;case 5936:switch(charat(e,t+11)){case 114:return WEBKIT+e+MS+replace(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return WEBKIT+e+MS+replace(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return WEBKIT+e+MS+replace(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return WEBKIT+e+MS+e+e}return e}var prefixer=function(t,i,a,o){if(t.length>-1&&!t.return)switch(t.type){case DECLARATION:t.return=prefix(t.value,t.length);break;case KEYFRAMES:return serialize([copy$1(t,{value:replace(t.value,"@","@"+WEBKIT)})],o);case RULESET:if(t.length)return combine(t.props,function(l){switch(match(l,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return serialize([copy$1(t,{props:[replace(l,/:(read-\w+)/,":"+MOZ+"$1")]})],o);case"::placeholder":return serialize([copy$1(t,{props:[replace(l,/:(plac\w+)/,":"+WEBKIT+"input-$1")]}),copy$1(t,{props:[replace(l,/:(plac\w+)/,":"+MOZ+"$1")]}),copy$1(t,{props:[replace(l,/:(plac\w+)/,MS+"input-$1")]})],o)}return""})}},defaultStylisPlugins=[prefixer],createCache=function(t){var i=t.key;if(i==="css"){var a=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(a,function(S){var E=S.getAttribute("data-emotion");E.indexOf(" ")!==-1&&(document.head.appendChild(S),S.setAttribute("data-s",""))})}var o=t.stylisPlugins||defaultStylisPlugins,l={},u,f=[];u=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+i+' "]'),function(S){for(var E=S.getAttribute("data-emotion").split(" "),w=1;w<E.length;w++)l[E[w]]=!0;f.push(S)});var h,p=[compat,removeLabel];{var m,g=[stringify,rulesheet(function(S){m.insert(S)})],b=middleware(p.concat(o,g)),x=function(E){return serialize(compile(E),b)};h=function(E,w,_,O){m=_,x(E?E+"{"+w.styles+"}":w.styles),O&&(y.inserted[w.name]=!0)}}var y={key:i,sheet:new StyleSheet({key:i,container:u,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:l,registered:{},insert:h};return y.sheet.hydrate(f),y},isBrowser=!0;function getRegisteredStyles(e,t,i){var a="";return i.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):o&&(a+=o+" ")}),a}var registerStyles=function(t,i,a){var o=t.key+"-"+i.name;(a===!1||isBrowser===!1)&&t.registered[o]===void 0&&(t.registered[o]=i.styles)},insertStyles=function(t,i,a){registerStyles(t,i,a);var o=t.key+"-"+i.name;if(t.inserted[i.name]===void 0){var l=i;do t.insert(i===l?"."+o:"",l,t.sheet,!0),l=l.next;while(l!==void 0)}};function murmur2(e){for(var t=0,i,a=0,o=e.length;o>=4;++a,o-=4)i=e.charCodeAt(a)&255|(e.charCodeAt(++a)&255)<<8|(e.charCodeAt(++a)&255)<<16|(e.charCodeAt(++a)&255)<<24,i=(i&65535)*1540483477+((i>>>16)*59797<<16),i^=i>>>24,t=(i&65535)*1540483477+((i>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(a+2)&255)<<16;case 2:t^=(e.charCodeAt(a+1)&255)<<8;case 1:t^=e.charCodeAt(a)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var unitlessKeys={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},hyphenateRegex=/[A-Z]|^ms/g,animationRegex=/_EMO_([^_]+?)_([^]*?)_EMO_/g,isCustomProperty=function(t){return t.charCodeAt(1)===45},isProcessableValue=function(t){return t!=null&&typeof t!="boolean"},processStyleName=memoize(function(e){return isCustomProperty(e)?e:e.replace(hyphenateRegex,"-$&").toLowerCase()}),processStyleValue=function(t,i){switch(t){case"animation":case"animationName":if(typeof i=="string")return i.replace(animationRegex,function(a,o,l){return cursor={name:o,styles:l,next:cursor},o})}return unitlessKeys[t]!==1&&!isCustomProperty(t)&&typeof i=="number"&&i!==0?i+"px":i};function handleInterpolation(e,t,i){if(i==null)return"";var a=i;if(a.__emotion_styles!==void 0)return a;switch(typeof i){case"boolean":return"";case"object":{var o=i;if(o.anim===1)return cursor={name:o.name,styles:o.styles,next:cursor},o.name;var l=i;if(l.styles!==void 0){var u=l.next;if(u!==void 0)for(;u!==void 0;)cursor={name:u.name,styles:u.styles,next:cursor},u=u.next;var f=l.styles+";";return f}return createStringFromObject(e,t,i)}case"function":{if(e!==void 0){var h=cursor,p=i(e);return cursor=h,handleInterpolation(e,t,p)}break}}var m=i;if(t==null)return m;var g=t[m];return g!==void 0?g:m}function createStringFromObject(e,t,i){var a="";if(Array.isArray(i))for(var o=0;o<i.length;o++)a+=handleInterpolation(e,t,i[o])+";";else for(var l in i){var u=i[l];if(typeof u!="object"){var f=u;t!=null&&t[f]!==void 0?a+=l+"{"+t[f]+"}":isProcessableValue(f)&&(a+=processStyleName(l)+":"+processStyleValue(l,f)+";")}else if(Array.isArray(u)&&typeof u[0]=="string"&&(t==null||t[u[0]]===void 0))for(var h=0;h<u.length;h++)isProcessableValue(u[h])&&(a+=processStyleName(l)+":"+processStyleValue(l,u[h])+";");else{var p=handleInterpolation(e,t,u);switch(l){case"animation":case"animationName":{a+=processStyleName(l)+":"+p+";";break}default:a+=l+"{"+p+"}"}}}return a}var labelPattern=/label:\s*([^\s;{]+)\s*(;|$)/g,cursor;function serializeStyles(e,t,i){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var a=!0,o="";cursor=void 0;var l=e[0];if(l==null||l.raw===void 0)a=!1,o+=handleInterpolation(i,t,l);else{var u=l;o+=u[0]}for(var f=1;f<e.length;f++)if(o+=handleInterpolation(i,t,e[f]),a){var h=l;o+=h[f]}labelPattern.lastIndex=0;for(var p="",m;(m=labelPattern.exec(o))!==null;)p+="-"+m[1];var g=murmur2(o)+p;return{name:g,styles:o,next:cursor}}var syncFallback=function(t){return t()},useInsertionEffect=React$1.useInsertionEffect?React$1.useInsertionEffect:!1,useInsertionEffectAlwaysWithSyncFallback=useInsertionEffect||syncFallback,EmotionCacheContext=reactExports.createContext(typeof HTMLElement<"u"?createCache({key:"css"}):null);EmotionCacheContext.Provider;var withEmotionCache=function(t){return reactExports.forwardRef(function(i,a){var o=reactExports.useContext(EmotionCacheContext);return t(i,o,a)})},ThemeContext=reactExports.createContext({}),reactPropsRegex=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,isPropValid=memoize(function(e){return reactPropsRegex.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),testOmitPropsOnStringTag=isPropValid,testOmitPropsOnComponent=function(t){return t!=="theme"},getDefaultShouldForwardProp=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?testOmitPropsOnStringTag:testOmitPropsOnComponent},composeShouldForwardProps=function(t,i,a){var o;if(i){var l=i.shouldForwardProp;o=t.__emotion_forwardProp&&l?function(u){return t.__emotion_forwardProp(u)&&l(u)}:l}return typeof o!="function"&&a&&(o=t.__emotion_forwardProp),o},Insertion=function(t){var i=t.cache,a=t.serialized,o=t.isStringTag;return registerStyles(i,a,o),useInsertionEffectAlwaysWithSyncFallback(function(){return insertStyles(i,a,o)}),null},createStyled$1=function e(t,i){var a=t.__emotion_real===t,o=a&&t.__emotion_base||t,l,u;i!==void 0&&(l=i.label,u=i.target);var f=composeShouldForwardProps(t,i,a),h=f||getDefaultShouldForwardProp(o),p=!h("as");return function(){var m=arguments,g=a&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(l!==void 0&&g.push("label:"+l+";"),m[0]==null||m[0].raw===void 0)g.push.apply(g,m);else{var b=m[0];g.push(b[0]);for(var x=m.length,y=1;y<x;y++)g.push(m[y],b[y])}var S=withEmotionCache(function(E,w,_){var O=p&&E.as||o,k="",A=[],D=E;if(E.theme==null){D={};for(var R in E)D[R]=E[R];D.theme=reactExports.useContext(ThemeContext)}typeof E.className=="string"?k=getRegisteredStyles(w.registered,A,E.className):E.className!=null&&(k=E.className+" ");var T=serializeStyles(g.concat(A),w.registered,D);k+=w.key+"-"+T.name,u!==void 0&&(k+=" "+u);var j=p&&f===void 0?getDefaultShouldForwardProp(O):h,P={};for(var M in E)p&&M==="as"||j(M)&&(P[M]=E[M]);return P.className=k,_&&(P.ref=_),reactExports.createElement(reactExports.Fragment,null,reactExports.createElement(Insertion,{cache:w,serialized:T,isStringTag:typeof O=="string"}),reactExports.createElement(O,P))});return S.displayName=l!==void 0?l:"Styled("+(typeof o=="string"?o:o.displayName||o.name||"Component")+")",S.defaultProps=t.defaultProps,S.__emotion_real=S,S.__emotion_base=o,S.__emotion_styles=g,S.__emotion_forwardProp=f,Object.defineProperty(S,"toString",{value:function(){return"."+u}}),S.withComponent=function(E,w){var _=e(E,_extends({},i,w,{shouldForwardProp:composeShouldForwardProps(S,w,!0)}));return _.apply(void 0,g)},S}},tags=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],newStyled=createStyled$1.bind(null);tags.forEach(function(e){newStyled[e]=newStyled(e)});function styled$1(e,t){return newStyled(e,t)}function internal_mutateStyles(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const wrapper=[];function internal_serializeStyles(e){return wrapper[0]=e,serializeStyles(wrapper)}const sortBreakpointsValues=e=>{const t=Object.keys(e).map(i=>({key:i,val:e[i]}))||[];return t.sort((i,a)=>i.val-a.val),t.reduce((i,a)=>({...i,[a.key]:a.val}),{})};function createBreakpoints(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:i="px",step:a=5,...o}=e,l=sortBreakpointsValues(t),u=Object.keys(l);function f(b){return`@media (min-width:${typeof t[b]=="number"?t[b]:b}${i})`}function h(b){return`@media (max-width:${(typeof t[b]=="number"?t[b]:b)-a/100}${i})`}function p(b,x){const y=u.indexOf(x);return`@media (min-width:${typeof t[b]=="number"?t[b]:b}${i}) and (max-width:${(y!==-1&&typeof t[u[y]]=="number"?t[u[y]]:x)-a/100}${i})`}function m(b){return u.indexOf(b)+1<u.length?p(b,u[u.indexOf(b)+1]):f(b)}function g(b){const x=u.indexOf(b);return x===0?f(u[1]):x===u.length-1?h(u[x]):p(b,u[u.indexOf(b)+1]).replace("@media","@media not all and")}return{keys:u,values:l,up:f,down:h,between:p,only:m,not:g,unit:i,...o}}const shape={borderRadius:4};function createSpacing(e=8,t=createUnarySpacing({spacing:e})){if(e.mui)return e;const i=(...a)=>(a.length===0?[1]:a).map(l=>{const u=t(l);return typeof u=="number"?`${u}px`:u}).join(" ");return i.mui=!0,i}function applyStyles(e,t){var a;const i=this;if(i.vars){if(!((a=i.colorSchemes)!=null&&a[e])||typeof i.getColorSchemeSelector!="function")return{};let o=i.getColorSchemeSelector(e);return o==="&"?t:((o.includes("data-")||o.includes("."))&&(o=`*:where(${o.replace(/\s*&$/,"")}) &`),{[o]:t})}return i.palette.mode===e?t:{}}function createTheme$1(e={},...t){const{breakpoints:i={},palette:a={},spacing:o,shape:l={},...u}=e,f=createBreakpoints(i),h=createSpacing(o);let p=deepmerge({breakpoints:f,direction:"ltr",components:{},palette:{mode:"light",...a},spacing:h,shape:{...shape,...l}},u);return p=cssContainerQueries(p),p.applyStyles=applyStyles,p=t.reduce((m,g)=>deepmerge(m,g),p),p.unstable_sxConfig={...defaultSxConfig,...u==null?void 0:u.unstable_sxConfig},p.unstable_sx=function(g){return styleFunctionSx({sx:g,theme:this})},p}const globalStateClasses={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function generateUtilityClass(e,t,i="Mui"){const a=globalStateClasses[t];return a?`${i}-${a}`:`${ClassNameGenerator.generate(e)}-${t}`}function generateUtilityClasses(e,t,i="Mui"){const a={};return t.forEach(o=>{a[o]=generateUtilityClass(e,o,i)}),a}function preprocessStyles(e){const{variants:t,...i}=e,a={variants:t,style:internal_serializeStyles(i),isProcessed:!0};return a.style===i||t&&t.forEach(o=>{typeof o.style!="function"&&(o.style=internal_serializeStyles(o.style))}),a}const systemDefaultTheme=createTheme$1();function shouldForwardProp(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function defaultOverridesResolver(e){return e?(t,i)=>i[e]:null}function attachTheme(e,t,i){e.theme=isObjectEmpty(e.theme)?i:e.theme[t]||e.theme}function processStyle(e,t){const i=typeof t=="function"?t(e):t;if(Array.isArray(i))return i.flatMap(a=>processStyle(e,a));if(Array.isArray(i==null?void 0:i.variants)){let a;if(i.isProcessed)a=i.style;else{const{variants:o,...l}=i;a=l}return processStyleVariants(e,i.variants,[a])}return i!=null&&i.isProcessed?i.style:i}function processStyleVariants(e,t,i=[]){var o;let a;e:for(let l=0;l<t.length;l+=1){const u=t[l];if(typeof u.props=="function"){if(a??(a={...e,...e.ownerState,ownerState:e.ownerState}),!u.props(a))continue}else for(const f in u.props)if(e[f]!==u.props[f]&&((o=e.ownerState)==null?void 0:o[f])!==u.props[f])continue e;typeof u.style=="function"?(a??(a={...e,...e.ownerState,ownerState:e.ownerState}),i.push(u.style(a))):i.push(u.style)}return i}function createStyled(e={}){const{themeId:t,defaultTheme:i=systemDefaultTheme,rootShouldForwardProp:a=shouldForwardProp,slotShouldForwardProp:o=shouldForwardProp}=e;function l(f){attachTheme(f,t,i)}return(f,h={})=>{internal_mutateStyles(f,A=>A.filter(D=>D!==styleFunctionSx));const{name:p,slot:m,skipVariantsResolver:g,skipSx:b,overridesResolver:x=defaultOverridesResolver(lowercaseFirstLetter(m)),...y}=h,S=g!==void 0?g:m&&m!=="Root"&&m!=="root"||!1,E=b||!1;let w=shouldForwardProp;m==="Root"||m==="root"?w=a:m?w=o:isStringTag(f)&&(w=void 0);const _=styled$1(f,{shouldForwardProp:w,label:generateStyledLabel(),...y}),O=A=>{if(typeof A=="function"&&A.__emotion_real!==A)return function(R){return processStyle(R,A)};if(isPlainObject$1(A)){const D=preprocessStyles(A);return D.variants?function(T){return processStyle(T,D)}:D.style}return A},k=(...A)=>{const D=[],R=A.map(O),T=[];if(D.push(l),p&&x&&T.push(function(I){var B,H;const ne=(H=(B=I.theme.components)==null?void 0:B[p])==null?void 0:H.styleOverrides;if(!ne)return null;const Q={};for(const Y in ne)Q[Y]=processStyle(I,ne[Y]);return x(I,Q)}),p&&!S&&T.push(function(I){var Q,B;const G=I.theme,ne=(B=(Q=G==null?void 0:G.components)==null?void 0:Q[p])==null?void 0:B.variants;return ne?processStyleVariants(I,ne):null}),E||T.push(styleFunctionSx),Array.isArray(R[0])){const M=R.shift(),I=new Array(D.length).fill(""),G=new Array(T.length).fill("");let ne;ne=[...I,...M,...G],ne.raw=[...I,...M.raw,...G],D.unshift(ne)}const j=[...D,...R,...T],P=_(...j);return f.muiName&&(P.muiName=f.muiName),P};return _.withConfig&&(k.withConfig=_.withConfig),k}}function generateStyledLabel(e,t){return void 0}function isObjectEmpty(e){for(const t in e)return!1;return!0}function isStringTag(e){return typeof e=="string"&&e.charCodeAt(0)>96}function lowercaseFirstLetter(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function resolveProps(e,t){const i={...t};for(const a in e)if(Object.prototype.hasOwnProperty.call(e,a)){const o=a;if(o==="components"||o==="slots")i[o]={...e[o],...i[o]};else if(o==="componentsProps"||o==="slotProps"){const l=e[o],u=t[o];if(!u)i[o]=l||{};else if(!l)i[o]=u;else{i[o]={...u};for(const f in l)if(Object.prototype.hasOwnProperty.call(l,f)){const h=f;i[o][h]=resolveProps(l[h],u[h])}}}else i[o]===void 0&&(i[o]=e[o])}return i}function clamp(e,t=Number.MIN_SAFE_INTEGER,i=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,i))}function clampWrapper(e,t=0,i=1){return clamp(e,t,i)}function hexToRgb(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let i=e.match(t);return i&&i[0].length===1&&(i=i.map(a=>a+a)),i?`rgb${i.length===4?"a":""}(${i.map((a,o)=>o<3?parseInt(a,16):Math.round(parseInt(a,16)/255*1e3)/1e3).join(", ")})`:""}function decomposeColor(e){if(e.type)return e;if(e.charAt(0)==="#")return decomposeColor(hexToRgb(e));const t=e.indexOf("("),i=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(i))throw new Error(formatMuiErrorMessage(9,e));let a=e.substring(t+1,e.length-1),o;if(i==="color"){if(a=a.split(" "),o=a.shift(),a.length===4&&a[3].charAt(0)==="/"&&(a[3]=a[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(o))throw new Error(formatMuiErrorMessage(10,o))}else a=a.split(",");return a=a.map(l=>parseFloat(l)),{type:i,values:a,colorSpace:o}}const colorChannel=e=>{const t=decomposeColor(e);return t.values.slice(0,3).map((i,a)=>t.type.includes("hsl")&&a!==0?`${i}%`:i).join(" ")},private_safeColorChannel=(e,t)=>{try{return colorChannel(e)}catch{return e}};function recomposeColor(e){const{type:t,colorSpace:i}=e;let{values:a}=e;return t.includes("rgb")?a=a.map((o,l)=>l<3?parseInt(o,10):o):t.includes("hsl")&&(a[1]=`${a[1]}%`,a[2]=`${a[2]}%`),t.includes("color")?a=`${i} ${a.join(" ")}`:a=`${a.join(", ")}`,`${t}(${a})`}function hslToRgb(e){e=decomposeColor(e);const{values:t}=e,i=t[0],a=t[1]/100,o=t[2]/100,l=a*Math.min(o,1-o),u=(p,m=(p+i/30)%12)=>o-l*Math.max(Math.min(m-3,9-m,1),-1);let f="rgb";const h=[Math.round(u(0)*255),Math.round(u(8)*255),Math.round(u(4)*255)];return e.type==="hsla"&&(f+="a",h.push(t[3])),recomposeColor({type:f,values:h})}function getLuminance(e){e=decomposeColor(e);let t=e.type==="hsl"||e.type==="hsla"?decomposeColor(hslToRgb(e)).values:e.values;return t=t.map(i=>(e.type!=="color"&&(i/=255),i<=.03928?i/12.92:((i+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function getContrastRatio(e,t){const i=getLuminance(e),a=getLuminance(t);return(Math.max(i,a)+.05)/(Math.min(i,a)+.05)}function alpha(e,t){return e=decomposeColor(e),t=clampWrapper(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,recomposeColor(e)}function private_safeAlpha(e,t,i){try{return alpha(e,t)}catch{return e}}function darken(e,t){if(e=decomposeColor(e),t=clampWrapper(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let i=0;i<3;i+=1)e.values[i]*=1-t;return recomposeColor(e)}function private_safeDarken(e,t,i){try{return darken(e,t)}catch{return e}}function lighten(e,t){if(e=decomposeColor(e),t=clampWrapper(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let i=0;i<3;i+=1)e.values[i]+=(255-e.values[i])*t;else if(e.type.includes("color"))for(let i=0;i<3;i+=1)e.values[i]+=(1-e.values[i])*t;return recomposeColor(e)}function private_safeLighten(e,t,i){try{return lighten(e,t)}catch{return e}}function emphasize(e,t=.15){return getLuminance(e)>.5?darken(e,t):lighten(e,t)}function private_safeEmphasize(e,t,i){try{return emphasize(e,t)}catch{return e}}const PropsContext=reactExports.createContext(void 0);function getThemeProps(e){const{theme:t,name:i,props:a}=e;if(!t||!t.components||!t.components[i])return a;const o=t.components[i];return o.defaultProps?resolveProps(o.defaultProps,a):!o.styleOverrides&&!o.variants?resolveProps(o,a):a}function useDefaultProps$1({props:e,name:t}){const i=reactExports.useContext(PropsContext);return getThemeProps({props:e,name:t,theme:{components:i}})}const arg={theme:void 0};function unstable_memoTheme(e){let t,i;return function(o){let l=t;return(l===void 0||o.theme!==i)&&(arg.theme=o.theme,l=preprocessStyles(e(arg)),t=l,i=o.theme),l}}function createGetCssVar$1(e=""){function t(...a){if(!a.length)return"";const o=a[0];return typeof o=="string"&&!o.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${e?`${e}-`:""}${o}${t(...a.slice(1))})`:`, ${o}`}return(a,...o)=>`var(--${e?`${e}-`:""}${a}${t(...o)})`}const assignNestedKeys=(e,t,i,a=[])=>{let o=e;t.forEach((l,u)=>{u===t.length-1?Array.isArray(o)?o[Number(l)]=i:o&&typeof o=="object"&&(o[l]=i):o&&typeof o=="object"&&(o[l]||(o[l]=a.includes(l)?[]:{}),o=o[l])})},walkObjectDeep=(e,t,i)=>{function a(o,l=[],u=[]){Object.entries(o).forEach(([f,h])=>{(!i||i&&!i([...l,f]))&&h!=null&&(typeof h=="object"&&Object.keys(h).length>0?a(h,[...l,f],Array.isArray(h)?[...u,f]:u):t([...l,f],h,u))})}a(e)},getCssValue=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(a=>e.includes(a))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function cssVarsParser(e,t){const{prefix:i,shouldSkipGeneratingVar:a}=t||{},o={},l={},u={};return walkObjectDeep(e,(f,h,p)=>{if((typeof h=="string"||typeof h=="number")&&(!a||!a(f,h))){const m=`--${i?`${i}-`:""}${f.join("-")}`,g=getCssValue(f,h);Object.assign(o,{[m]:g}),assignNestedKeys(l,f,`var(${m})`,p),assignNestedKeys(u,f,`var(${m}, ${g})`,p)}},f=>f[0]==="vars"),{css:o,vars:l,varsWithDefaults:u}}function prepareCssVars(e,t={}){const{getSelector:i=E,disableCssColorScheme:a,colorSchemeSelector:o}=t,{colorSchemes:l={},components:u,defaultColorScheme:f="light",...h}=e,{vars:p,css:m,varsWithDefaults:g}=cssVarsParser(h,t);let b=g;const x={},{[f]:y,...S}=l;if(Object.entries(S||{}).forEach(([O,k])=>{const{vars:A,css:D,varsWithDefaults:R}=cssVarsParser(k,t);b=deepmerge(b,R),x[O]={css:D,vars:A}}),y){const{css:O,vars:k,varsWithDefaults:A}=cssVarsParser(y,t);b=deepmerge(b,A),x[f]={css:O,vars:k}}function E(O,k){var D,R;let A=o;if(o==="class"&&(A=".%s"),o==="data"&&(A="[data-%s]"),o!=null&&o.startsWith("data-")&&!o.includes("%s")&&(A=`[${o}="%s"]`),O){if(A==="media")return e.defaultColorScheme===O?":root":{[`@media (prefers-color-scheme: ${((R=(D=l[O])==null?void 0:D.palette)==null?void 0:R.mode)||O})`]:{":root":k}};if(A)return e.defaultColorScheme===O?`:root, ${A.replace("%s",String(O))}`:A.replace("%s",String(O))}return":root"}return{vars:b,generateThemeVars:()=>{let O={...p};return Object.entries(x).forEach(([,{vars:k}])=>{O=deepmerge(O,k)}),O},generateStyleSheets:()=>{var T,j;const O=[],k=e.defaultColorScheme||"light";function A(P,M){Object.keys(M).length&&O.push(typeof P=="string"?{[P]:{...M}}:P)}A(i(void 0,{...m}),m);const{[k]:D,...R}=x;if(D){const{css:P}=D,M=(j=(T=l[k])==null?void 0:T.palette)==null?void 0:j.mode,I=!a&&M?{colorScheme:M,...P}:{...P};A(i(k,{...I}),I)}return Object.entries(R).forEach(([P,{css:M}])=>{var ne,Q;const I=(Q=(ne=l[P])==null?void 0:ne.palette)==null?void 0:Q.mode,G=!a&&I?{colorScheme:I,...M}:{...M};A(i(P,{...G}),G)}),O}}}function createGetColorSchemeSelector(e){return function(i){return e==="media"?`@media (prefers-color-scheme: ${i})`:e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${i}"] &`:e==="class"?`.${i} &`:e==="data"?`[data-${i}] &`:`${e.replace("%s",i)} &`:"&"}}const common={black:"#000",white:"#fff"},grey={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},purple={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},red={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},orange={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},blue={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},lightBlue={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},green={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function getLight(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:common.white,default:common.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const light=getLight();function getDark(){return{text:{primary:common.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:common.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const dark=getDark();function addLightOrDark(e,t,i,a){const o=a.light||a,l=a.dark||a*1.5;e[t]||(e.hasOwnProperty(i)?e[t]=e[i]:t==="light"?e.light=lighten(e.main,o):t==="dark"&&(e.dark=darken(e.main,l)))}function getDefaultPrimary(e="light"){return e==="dark"?{main:blue[200],light:blue[50],dark:blue[400]}:{main:blue[700],light:blue[400],dark:blue[800]}}function getDefaultSecondary(e="light"){return e==="dark"?{main:purple[200],light:purple[50],dark:purple[400]}:{main:purple[500],light:purple[300],dark:purple[700]}}function getDefaultError(e="light"){return e==="dark"?{main:red[500],light:red[300],dark:red[700]}:{main:red[700],light:red[400],dark:red[800]}}function getDefaultInfo(e="light"){return e==="dark"?{main:lightBlue[400],light:lightBlue[300],dark:lightBlue[700]}:{main:lightBlue[700],light:lightBlue[500],dark:lightBlue[900]}}function getDefaultSuccess(e="light"){return e==="dark"?{main:green[400],light:green[300],dark:green[700]}:{main:green[800],light:green[500],dark:green[900]}}function getDefaultWarning(e="light"){return e==="dark"?{main:orange[400],light:orange[300],dark:orange[700]}:{main:"#ed6c02",light:orange[500],dark:orange[900]}}function createPalette(e){const{mode:t="light",contrastThreshold:i=3,tonalOffset:a=.2,...o}=e,l=e.primary||getDefaultPrimary(t),u=e.secondary||getDefaultSecondary(t),f=e.error||getDefaultError(t),h=e.info||getDefaultInfo(t),p=e.success||getDefaultSuccess(t),m=e.warning||getDefaultWarning(t);function g(S){return getContrastRatio(S,dark.text.primary)>=i?dark.text.primary:light.text.primary}const b=({color:S,name:E,mainShade:w=500,lightShade:_=300,darkShade:O=700})=>{if(S={...S},!S.main&&S[w]&&(S.main=S[w]),!S.hasOwnProperty("main"))throw new Error(formatMuiErrorMessage(11,E?` (${E})`:"",w));if(typeof S.main!="string")throw new Error(formatMuiErrorMessage(12,E?` (${E})`:"",JSON.stringify(S.main)));return addLightOrDark(S,"light",_,a),addLightOrDark(S,"dark",O,a),S.contrastText||(S.contrastText=g(S.main)),S};let x;return t==="light"?x=getLight():t==="dark"&&(x=getDark()),deepmerge({common:{...common},mode:t,primary:b({color:l,name:"primary"}),secondary:b({color:u,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:b({color:f,name:"error"}),warning:b({color:m,name:"warning"}),info:b({color:h,name:"info"}),success:b({color:p,name:"success"}),grey,contrastThreshold:i,getContrastText:g,augmentColor:b,tonalOffset:a,...x},o)}function prepareTypographyVars(e){const t={};return Object.entries(e).forEach(a=>{const[o,l]=a;typeof l=="object"&&(t[o]=`${l.fontStyle?`${l.fontStyle} `:""}${l.fontVariant?`${l.fontVariant} `:""}${l.fontWeight?`${l.fontWeight} `:""}${l.fontStretch?`${l.fontStretch} `:""}${l.fontSize||""}${l.lineHeight?`/${l.lineHeight} `:""}${l.fontFamily||""}`)}),t}function createMixins(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function round(e){return Math.round(e*1e5)/1e5}const caseAllCaps={textTransform:"uppercase"},defaultFontFamily='"Roboto", "Helvetica", "Arial", sans-serif';function createTypography(e,t){const{fontFamily:i=defaultFontFamily,fontSize:a=14,fontWeightLight:o=300,fontWeightRegular:l=400,fontWeightMedium:u=500,fontWeightBold:f=700,htmlFontSize:h=16,allVariants:p,pxToRem:m,...g}=typeof t=="function"?t(e):t,b=a/14,x=m||(E=>`${E/h*b}rem`),y=(E,w,_,O,k)=>({fontFamily:i,fontWeight:E,fontSize:x(w),lineHeight:_,...i===defaultFontFamily?{letterSpacing:`${round(O/w)}em`}:{},...k,...p}),S={h1:y(o,96,1.167,-1.5),h2:y(o,60,1.2,-.5),h3:y(l,48,1.167,0),h4:y(l,34,1.235,.25),h5:y(l,24,1.334,0),h6:y(u,20,1.6,.15),subtitle1:y(l,16,1.75,.15),subtitle2:y(u,14,1.57,.1),body1:y(l,16,1.5,.15),body2:y(l,14,1.43,.15),button:y(u,14,1.75,.4,caseAllCaps),caption:y(l,12,1.66,.4),overline:y(l,12,2.66,1,caseAllCaps),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return deepmerge({htmlFontSize:h,pxToRem:x,fontFamily:i,fontSize:a,fontWeightLight:o,fontWeightRegular:l,fontWeightMedium:u,fontWeightBold:f,...S},g,{clone:!1})}const shadowKeyUmbraOpacity=.2,shadowKeyPenumbraOpacity=.14,shadowAmbientShadowOpacity=.12;function createShadow(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${shadowKeyUmbraOpacity})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${shadowKeyPenumbraOpacity})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${shadowAmbientShadowOpacity})`].join(",")}const shadows=["none",createShadow(0,2,1,-1,0,1,1,0,0,1,3,0),createShadow(0,3,1,-2,0,2,2,0,0,1,5,0),createShadow(0,3,3,-2,0,3,4,0,0,1,8,0),createShadow(0,2,4,-1,0,4,5,0,0,1,10,0),createShadow(0,3,5,-1,0,5,8,0,0,1,14,0),createShadow(0,3,5,-1,0,6,10,0,0,1,18,0),createShadow(0,4,5,-2,0,7,10,1,0,2,16,1),createShadow(0,5,5,-3,0,8,10,1,0,3,14,2),createShadow(0,5,6,-3,0,9,12,1,0,3,16,2),createShadow(0,6,6,-3,0,10,14,1,0,4,18,3),createShadow(0,6,7,-4,0,11,15,1,0,4,20,3),createShadow(0,7,8,-4,0,12,17,2,0,5,22,4),createShadow(0,7,8,-4,0,13,19,2,0,5,24,4),createShadow(0,7,9,-4,0,14,21,2,0,5,26,4),createShadow(0,8,9,-5,0,15,22,2,0,6,28,5),createShadow(0,8,10,-5,0,16,24,2,0,6,30,5),createShadow(0,8,11,-5,0,17,26,2,0,6,32,5),createShadow(0,9,11,-5,0,18,28,2,0,7,34,6),createShadow(0,9,12,-6,0,19,29,2,0,7,36,6),createShadow(0,10,13,-6,0,20,31,3,0,8,38,7),createShadow(0,10,13,-6,0,21,33,3,0,8,40,7),createShadow(0,10,14,-6,0,22,35,3,0,8,42,7),createShadow(0,11,14,-7,0,23,36,3,0,9,44,8),createShadow(0,11,15,-7,0,24,38,3,0,9,46,8)],easing={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},duration={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function formatMs(e){return`${Math.round(e)}ms`}function getAutoHeightDuration(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function createTransitions(e){const t={...easing,...e.easing},i={...duration,...e.duration};return{getAutoHeightDuration,create:(o=["all"],l={})=>{const{duration:u=i.standard,easing:f=t.easeInOut,delay:h=0,...p}=l;return(Array.isArray(o)?o:[o]).map(m=>`${m} ${typeof u=="string"?u:formatMs(u)} ${f} ${typeof h=="string"?h:formatMs(h)}`).join(",")},...e,easing:t,duration:i}}const zIndex={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function isSerializable(e){return isPlainObject$1(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function stringifyTheme(e={}){const t={...e};function i(a){const o=Object.entries(a);for(let l=0;l<o.length;l++){const[u,f]=o[l];!isSerializable(f)||u.startsWith("unstable_")?delete a[u]:isPlainObject$1(f)&&(a[u]={...f},i(a[u]))}}return i(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
|
||
|
||
const theme = ${JSON.stringify(t,null,2)};
|
||
|
||
theme.breakpoints = createBreakpoints(theme.breakpoints || {});
|
||
theme.transitions = createTransitions(theme.transitions || {});
|
||
|
||
export default theme;`}function createThemeNoVars(e={},...t){const{breakpoints:i,mixins:a={},spacing:o,palette:l={},transitions:u={},typography:f={},shape:h,...p}=e;if(e.vars&&e.generateThemeVars===void 0)throw new Error(formatMuiErrorMessage(20));const m=createPalette(l),g=createTheme$1(e);let b=deepmerge(g,{mixins:createMixins(g.breakpoints,a),palette:m,shadows:shadows.slice(),typography:createTypography(m,f),transitions:createTransitions(u),zIndex:{...zIndex}});return b=deepmerge(b,p),b=t.reduce((x,y)=>deepmerge(x,y),b),b.unstable_sxConfig={...defaultSxConfig,...p==null?void 0:p.unstable_sxConfig},b.unstable_sx=function(y){return styleFunctionSx({sx:y,theme:this})},b.toRuntimeSource=stringifyTheme,b}function getOverlayAlpha(e){let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}const defaultDarkOverlays=[...Array(25)].map((e,t)=>{if(t===0)return"none";const i=getOverlayAlpha(t);return`linear-gradient(rgba(255 255 255 / ${i}), rgba(255 255 255 / ${i}))`});function getOpacity(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function getOverlays(e){return e==="dark"?defaultDarkOverlays:[]}function createColorScheme(e){const{palette:t={mode:"light"},opacity:i,overlays:a,...o}=e,l=createPalette(t);return{palette:l,opacity:{...getOpacity(l.mode),...i},overlays:a||getOverlays(l.mode),...o}}function shouldSkipGeneratingVar(e){var t;return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!((t=e[1])!=null&&t.match(/(mode|contrastThreshold|tonalOffset)/))}const excludeVariablesFromRoot=e=>[...[...Array(25)].map((t,i)=>`--${e?`${e}-`:""}overlays-${i}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],defaultGetSelector=e=>(t,i)=>{const a=e.rootSelector||":root",o=e.colorSchemeSelector;let l=o;if(o==="class"&&(l=".%s"),o==="data"&&(l="[data-%s]"),o!=null&&o.startsWith("data-")&&!o.includes("%s")&&(l=`[${o}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const u={};return excludeVariablesFromRoot(e.cssVarPrefix).forEach(f=>{u[f]=i[f],delete i[f]}),l==="media"?{[a]:i,"@media (prefers-color-scheme: dark)":{[a]:u}}:l?{[l.replace("%s",t)]:u,[`${a}, ${l.replace("%s",t)}`]:i}:{[a]:{...i,...u}}}if(l&&l!=="media")return`${a}, ${l.replace("%s",String(t))}`}else if(t){if(l==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[a]:i}};if(l)return l.replace("%s",String(t))}return a};function assignNode(e,t){t.forEach(i=>{e[i]||(e[i]={})})}function setColor(e,t,i){!e[t]&&i&&(e[t]=i)}function toRgb(e){return typeof e!="string"||!e.startsWith("hsl")?e:hslToRgb(e)}function setColorChannel(e,t){`${t}Channel`in e||(e[`${t}Channel`]=private_safeColorChannel(toRgb(e[t])))}function getSpacingVal(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const silent=e=>{try{return e()}catch{}},createGetCssVar=(e="mui")=>createGetCssVar$1(e);function attachColorScheme$1(e,t,i,a){if(!t)return;t=t===!0?{}:t;const o=a==="dark"?"dark":"light";if(!i){e[a]=createColorScheme({...t,palette:{mode:o,...t==null?void 0:t.palette}});return}const{palette:l,...u}=createThemeNoVars({...i,palette:{mode:o,...t==null?void 0:t.palette}});return e[a]={...t,palette:l,opacity:{...getOpacity(o),...t==null?void 0:t.opacity},overlays:(t==null?void 0:t.overlays)||getOverlays(o)},u}function createThemeWithVars(e={},...t){const{colorSchemes:i={light:!0},defaultColorScheme:a,disableCssColorScheme:o=!1,cssVarPrefix:l="mui",shouldSkipGeneratingVar:u=shouldSkipGeneratingVar,colorSchemeSelector:f=i.light&&i.dark?"media":void 0,rootSelector:h=":root",...p}=e,m=Object.keys(i)[0],g=a||(i.light&&m!=="light"?"light":m),b=createGetCssVar(l),{[g]:x,light:y,dark:S,...E}=i,w={...E};let _=x;if((g==="dark"&&!("dark"in i)||g==="light"&&!("light"in i))&&(_=!0),!_)throw new Error(formatMuiErrorMessage(21,g));const O=attachColorScheme$1(w,_,p,g);y&&!w.light&&attachColorScheme$1(w,y,void 0,"light"),S&&!w.dark&&attachColorScheme$1(w,S,void 0,"dark");let k={defaultColorScheme:g,...O,cssVarPrefix:l,colorSchemeSelector:f,rootSelector:h,getCssVar:b,colorSchemes:w,font:{...prepareTypographyVars(O.typography),...O.font},spacing:getSpacingVal(p.spacing)};Object.keys(k.colorSchemes).forEach(j=>{const P=k.colorSchemes[j].palette,M=I=>{const G=I.split("-"),ne=G[1],Q=G[2];return b(I,P[ne][Q])};if(P.mode==="light"&&(setColor(P.common,"background","#fff"),setColor(P.common,"onBackground","#000")),P.mode==="dark"&&(setColor(P.common,"background","#000"),setColor(P.common,"onBackground","#fff")),assignNode(P,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),P.mode==="light"){setColor(P.Alert,"errorColor",private_safeDarken(P.error.light,.6)),setColor(P.Alert,"infoColor",private_safeDarken(P.info.light,.6)),setColor(P.Alert,"successColor",private_safeDarken(P.success.light,.6)),setColor(P.Alert,"warningColor",private_safeDarken(P.warning.light,.6)),setColor(P.Alert,"errorFilledBg",M("palette-error-main")),setColor(P.Alert,"infoFilledBg",M("palette-info-main")),setColor(P.Alert,"successFilledBg",M("palette-success-main")),setColor(P.Alert,"warningFilledBg",M("palette-warning-main")),setColor(P.Alert,"errorFilledColor",silent(()=>P.getContrastText(P.error.main))),setColor(P.Alert,"infoFilledColor",silent(()=>P.getContrastText(P.info.main))),setColor(P.Alert,"successFilledColor",silent(()=>P.getContrastText(P.success.main))),setColor(P.Alert,"warningFilledColor",silent(()=>P.getContrastText(P.warning.main))),setColor(P.Alert,"errorStandardBg",private_safeLighten(P.error.light,.9)),setColor(P.Alert,"infoStandardBg",private_safeLighten(P.info.light,.9)),setColor(P.Alert,"successStandardBg",private_safeLighten(P.success.light,.9)),setColor(P.Alert,"warningStandardBg",private_safeLighten(P.warning.light,.9)),setColor(P.Alert,"errorIconColor",M("palette-error-main")),setColor(P.Alert,"infoIconColor",M("palette-info-main")),setColor(P.Alert,"successIconColor",M("palette-success-main")),setColor(P.Alert,"warningIconColor",M("palette-warning-main")),setColor(P.AppBar,"defaultBg",M("palette-grey-100")),setColor(P.Avatar,"defaultBg",M("palette-grey-400")),setColor(P.Button,"inheritContainedBg",M("palette-grey-300")),setColor(P.Button,"inheritContainedHoverBg",M("palette-grey-A100")),setColor(P.Chip,"defaultBorder",M("palette-grey-400")),setColor(P.Chip,"defaultAvatarColor",M("palette-grey-700")),setColor(P.Chip,"defaultIconColor",M("palette-grey-700")),setColor(P.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),setColor(P.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),setColor(P.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),setColor(P.LinearProgress,"primaryBg",private_safeLighten(P.primary.main,.62)),setColor(P.LinearProgress,"secondaryBg",private_safeLighten(P.secondary.main,.62)),setColor(P.LinearProgress,"errorBg",private_safeLighten(P.error.main,.62)),setColor(P.LinearProgress,"infoBg",private_safeLighten(P.info.main,.62)),setColor(P.LinearProgress,"successBg",private_safeLighten(P.success.main,.62)),setColor(P.LinearProgress,"warningBg",private_safeLighten(P.warning.main,.62)),setColor(P.Skeleton,"bg",`rgba(${M("palette-text-primaryChannel")} / 0.11)`),setColor(P.Slider,"primaryTrack",private_safeLighten(P.primary.main,.62)),setColor(P.Slider,"secondaryTrack",private_safeLighten(P.secondary.main,.62)),setColor(P.Slider,"errorTrack",private_safeLighten(P.error.main,.62)),setColor(P.Slider,"infoTrack",private_safeLighten(P.info.main,.62)),setColor(P.Slider,"successTrack",private_safeLighten(P.success.main,.62)),setColor(P.Slider,"warningTrack",private_safeLighten(P.warning.main,.62));const I=private_safeEmphasize(P.background.default,.8);setColor(P.SnackbarContent,"bg",I),setColor(P.SnackbarContent,"color",silent(()=>P.getContrastText(I))),setColor(P.SpeedDialAction,"fabHoverBg",private_safeEmphasize(P.background.paper,.15)),setColor(P.StepConnector,"border",M("palette-grey-400")),setColor(P.StepContent,"border",M("palette-grey-400")),setColor(P.Switch,"defaultColor",M("palette-common-white")),setColor(P.Switch,"defaultDisabledColor",M("palette-grey-100")),setColor(P.Switch,"primaryDisabledColor",private_safeLighten(P.primary.main,.62)),setColor(P.Switch,"secondaryDisabledColor",private_safeLighten(P.secondary.main,.62)),setColor(P.Switch,"errorDisabledColor",private_safeLighten(P.error.main,.62)),setColor(P.Switch,"infoDisabledColor",private_safeLighten(P.info.main,.62)),setColor(P.Switch,"successDisabledColor",private_safeLighten(P.success.main,.62)),setColor(P.Switch,"warningDisabledColor",private_safeLighten(P.warning.main,.62)),setColor(P.TableCell,"border",private_safeLighten(private_safeAlpha(P.divider,1),.88)),setColor(P.Tooltip,"bg",private_safeAlpha(P.grey[700],.92))}if(P.mode==="dark"){setColor(P.Alert,"errorColor",private_safeLighten(P.error.light,.6)),setColor(P.Alert,"infoColor",private_safeLighten(P.info.light,.6)),setColor(P.Alert,"successColor",private_safeLighten(P.success.light,.6)),setColor(P.Alert,"warningColor",private_safeLighten(P.warning.light,.6)),setColor(P.Alert,"errorFilledBg",M("palette-error-dark")),setColor(P.Alert,"infoFilledBg",M("palette-info-dark")),setColor(P.Alert,"successFilledBg",M("palette-success-dark")),setColor(P.Alert,"warningFilledBg",M("palette-warning-dark")),setColor(P.Alert,"errorFilledColor",silent(()=>P.getContrastText(P.error.dark))),setColor(P.Alert,"infoFilledColor",silent(()=>P.getContrastText(P.info.dark))),setColor(P.Alert,"successFilledColor",silent(()=>P.getContrastText(P.success.dark))),setColor(P.Alert,"warningFilledColor",silent(()=>P.getContrastText(P.warning.dark))),setColor(P.Alert,"errorStandardBg",private_safeDarken(P.error.light,.9)),setColor(P.Alert,"infoStandardBg",private_safeDarken(P.info.light,.9)),setColor(P.Alert,"successStandardBg",private_safeDarken(P.success.light,.9)),setColor(P.Alert,"warningStandardBg",private_safeDarken(P.warning.light,.9)),setColor(P.Alert,"errorIconColor",M("palette-error-main")),setColor(P.Alert,"infoIconColor",M("palette-info-main")),setColor(P.Alert,"successIconColor",M("palette-success-main")),setColor(P.Alert,"warningIconColor",M("palette-warning-main")),setColor(P.AppBar,"defaultBg",M("palette-grey-900")),setColor(P.AppBar,"darkBg",M("palette-background-paper")),setColor(P.AppBar,"darkColor",M("palette-text-primary")),setColor(P.Avatar,"defaultBg",M("palette-grey-600")),setColor(P.Button,"inheritContainedBg",M("palette-grey-800")),setColor(P.Button,"inheritContainedHoverBg",M("palette-grey-700")),setColor(P.Chip,"defaultBorder",M("palette-grey-700")),setColor(P.Chip,"defaultAvatarColor",M("palette-grey-300")),setColor(P.Chip,"defaultIconColor",M("palette-grey-300")),setColor(P.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),setColor(P.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),setColor(P.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),setColor(P.LinearProgress,"primaryBg",private_safeDarken(P.primary.main,.5)),setColor(P.LinearProgress,"secondaryBg",private_safeDarken(P.secondary.main,.5)),setColor(P.LinearProgress,"errorBg",private_safeDarken(P.error.main,.5)),setColor(P.LinearProgress,"infoBg",private_safeDarken(P.info.main,.5)),setColor(P.LinearProgress,"successBg",private_safeDarken(P.success.main,.5)),setColor(P.LinearProgress,"warningBg",private_safeDarken(P.warning.main,.5)),setColor(P.Skeleton,"bg",`rgba(${M("palette-text-primaryChannel")} / 0.13)`),setColor(P.Slider,"primaryTrack",private_safeDarken(P.primary.main,.5)),setColor(P.Slider,"secondaryTrack",private_safeDarken(P.secondary.main,.5)),setColor(P.Slider,"errorTrack",private_safeDarken(P.error.main,.5)),setColor(P.Slider,"infoTrack",private_safeDarken(P.info.main,.5)),setColor(P.Slider,"successTrack",private_safeDarken(P.success.main,.5)),setColor(P.Slider,"warningTrack",private_safeDarken(P.warning.main,.5));const I=private_safeEmphasize(P.background.default,.98);setColor(P.SnackbarContent,"bg",I),setColor(P.SnackbarContent,"color",silent(()=>P.getContrastText(I))),setColor(P.SpeedDialAction,"fabHoverBg",private_safeEmphasize(P.background.paper,.15)),setColor(P.StepConnector,"border",M("palette-grey-600")),setColor(P.StepContent,"border",M("palette-grey-600")),setColor(P.Switch,"defaultColor",M("palette-grey-300")),setColor(P.Switch,"defaultDisabledColor",M("palette-grey-600")),setColor(P.Switch,"primaryDisabledColor",private_safeDarken(P.primary.main,.55)),setColor(P.Switch,"secondaryDisabledColor",private_safeDarken(P.secondary.main,.55)),setColor(P.Switch,"errorDisabledColor",private_safeDarken(P.error.main,.55)),setColor(P.Switch,"infoDisabledColor",private_safeDarken(P.info.main,.55)),setColor(P.Switch,"successDisabledColor",private_safeDarken(P.success.main,.55)),setColor(P.Switch,"warningDisabledColor",private_safeDarken(P.warning.main,.55)),setColor(P.TableCell,"border",private_safeDarken(private_safeAlpha(P.divider,1),.68)),setColor(P.Tooltip,"bg",private_safeAlpha(P.grey[700],.92))}setColorChannel(P.background,"default"),setColorChannel(P.background,"paper"),setColorChannel(P.common,"background"),setColorChannel(P.common,"onBackground"),setColorChannel(P,"divider"),Object.keys(P).forEach(I=>{const G=P[I];I!=="tonalOffset"&&G&&typeof G=="object"&&(G.main&&setColor(P[I],"mainChannel",private_safeColorChannel(toRgb(G.main))),G.light&&setColor(P[I],"lightChannel",private_safeColorChannel(toRgb(G.light))),G.dark&&setColor(P[I],"darkChannel",private_safeColorChannel(toRgb(G.dark))),G.contrastText&&setColor(P[I],"contrastTextChannel",private_safeColorChannel(toRgb(G.contrastText))),I==="text"&&(setColorChannel(P[I],"primary"),setColorChannel(P[I],"secondary")),I==="action"&&(G.active&&setColorChannel(P[I],"active"),G.selected&&setColorChannel(P[I],"selected")))})}),k=t.reduce((j,P)=>deepmerge(j,P),k);const A={prefix:l,disableCssColorScheme:o,shouldSkipGeneratingVar:u,getSelector:defaultGetSelector(k)},{vars:D,generateThemeVars:R,generateStyleSheets:T}=prepareCssVars(k,A);return k.vars=D,Object.entries(k.colorSchemes[k.defaultColorScheme]).forEach(([j,P])=>{k[j]=P}),k.generateThemeVars=R,k.generateStyleSheets=T,k.generateSpacing=function(){return createSpacing(p.spacing,createUnarySpacing(this))},k.getColorSchemeSelector=createGetColorSchemeSelector(f),k.spacing=k.generateSpacing(),k.shouldSkipGeneratingVar=u,k.unstable_sxConfig={...defaultSxConfig,...p==null?void 0:p.unstable_sxConfig},k.unstable_sx=function(P){return styleFunctionSx({sx:P,theme:this})},k.toRuntimeSource=stringifyTheme,k}function attachColorScheme(e,t,i){e.colorSchemes&&i&&(e.colorSchemes[t]={...i!==!0&&i,palette:createPalette({...i===!0?{}:i.palette,mode:t})})}function createTheme(e={},...t){const{palette:i,cssVariables:a=!1,colorSchemes:o=i?void 0:{light:!0},defaultColorScheme:l=i==null?void 0:i.mode,...u}=e,f=l||"light",h=o==null?void 0:o[f],p={...o,...i?{[f]:{...typeof h!="boolean"&&h,palette:i}}:void 0};if(a===!1){if(!("colorSchemes"in e))return createThemeNoVars(e,...t);let m=i;"palette"in e||p[f]&&(p[f]!==!0?m=p[f].palette:f==="dark"&&(m={mode:"dark"}));const g=createThemeNoVars({...e,palette:m},...t);return g.defaultColorScheme=f,g.colorSchemes=p,g.palette.mode==="light"&&(g.colorSchemes.light={...p.light!==!0&&p.light,palette:g.palette},attachColorScheme(g,"dark",p.dark)),g.palette.mode==="dark"&&(g.colorSchemes.dark={...p.dark!==!0&&p.dark,palette:g.palette},attachColorScheme(g,"light",p.light)),g}return!i&&!("light"in p)&&f==="light"&&(p.light=!0),createThemeWithVars({...u,colorSchemes:p,defaultColorScheme:f,...typeof a!="boolean"&&a},...t)}const defaultTheme=createTheme(),THEME_ID="$$material";function slotShouldForwardProp(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const rootShouldForwardProp=e=>slotShouldForwardProp(e)&&e!=="classes",styled=createStyled({themeId:THEME_ID,defaultTheme,rootShouldForwardProp}),memoTheme=unstable_memoTheme;function useDefaultProps(e){return useDefaultProps$1(e)}function getSvgIconUtilityClass(e){return generateUtilityClass("MuiSvgIcon",e)}generateUtilityClasses("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const useUtilityClasses=e=>{const{color:t,fontSize:i,classes:a}=e,o={root:["root",t!=="inherit"&&`color${capitalize(t)}`,`fontSize${capitalize(i)}`]};return composeClasses(o,getSvgIconUtilityClass,a)},SvgIconRoot=styled("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:i}=e;return[t.root,i.color!=="inherit"&&t[`color${capitalize(i.color)}`],t[`fontSize${capitalize(i.fontSize)}`]]}})(memoTheme(({theme:e})=>{var t,i,a,o,l,u,f,h,p,m,g,b,x,y;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(o=(t=e.transitions)==null?void 0:t.create)==null?void 0:o.call(t,"fill",{duration:(a=(i=(e.vars??e).transitions)==null?void 0:i.duration)==null?void 0:a.shorter}),variants:[{props:S=>!S.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((u=(l=e.typography)==null?void 0:l.pxToRem)==null?void 0:u.call(l,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((h=(f=e.typography)==null?void 0:f.pxToRem)==null?void 0:h.call(f,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((m=(p=e.typography)==null?void 0:p.pxToRem)==null?void 0:m.call(p,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,S])=>S&&S.main).map(([S])=>{var E,w;return{props:{color:S},style:{color:(w=(E=(e.vars??e).palette)==null?void 0:E[S])==null?void 0:w.main}}}),{props:{color:"action"},style:{color:(b=(g=(e.vars??e).palette)==null?void 0:g.action)==null?void 0:b.active}},{props:{color:"disabled"},style:{color:(y=(x=(e.vars??e).palette)==null?void 0:x.action)==null?void 0:y.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),SvgIcon=reactExports.forwardRef(function(t,i){const a=useDefaultProps({props:t,name:"MuiSvgIcon"}),{children:o,className:l,color:u="inherit",component:f="svg",fontSize:h="medium",htmlColor:p,inheritViewBox:m=!1,titleAccess:g,viewBox:b="0 0 24 24",...x}=a,y=reactExports.isValidElement(o)&&o.type==="svg",S={...a,color:u,component:f,fontSize:h,instanceFontSize:t.fontSize,inheritViewBox:m,viewBox:b,hasSvgAsChild:y},E={};m||(E.viewBox=b);const w=useUtilityClasses(S);return jsxRuntimeExports.jsxs(SvgIconRoot,{as:f,className:clsx(w.root,l),focusable:"false",color:p,"aria-hidden":g?void 0:!0,role:g?"img":void 0,ref:i,...E,...x,...y&&o.props,ownerState:S,children:[y?o.props.children:o,g?jsxRuntimeExports.jsx("title",{children:g}):null]})});SvgIcon.muiName="SvgIcon";function createSvgIcon(e,t){function i(a,o){return jsxRuntimeExports.jsx(SvgIcon,{"data-testid":void 0,ref:o,...a,children:e})}return i.muiName=SvgIcon.muiName,reactExports.memo(reactExports.forwardRef(i))}const AddToPhotosIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M4 6H2v14c0 1.1.9 2 2 2h14v-2H4zm16-4H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m-1 9h-4v4h-2v-4H9V9h4V5h2v4h4z"})),ContentCutIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M9.64 7.64c.23-.5.36-1.05.36-1.64 0-2.21-1.79-4-4-4S2 3.79 2 6s1.79 4 4 4c.59 0 1.14-.13 1.64-.36L10 12l-2.36 2.36C7.14 14.13 6.59 14 6 14c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4c0-.59-.13-1.14-.36-1.64L12 14l7 7h3v-1zM6 8c-1.1 0-2-.89-2-2s.9-2 2-2 2 .89 2 2-.9 2-2 2m0 12c-1.1 0-2-.89-2-2s.9-2 2-2 2 .89 2 2-.9 2-2 2m6-7.5c-.28 0-.5-.22-.5-.5s.22-.5.5-.5.5.22.5.5-.22.5-.5.5M19 3l-6 6 2 2 7-7V3z"})),ZoomInMapIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M9 9V3H7v2.59L3.91 2.5 2.5 3.91 5.59 7H3v2zm12 0V7h-2.59l3.09-3.09-1.41-1.41L17 5.59V3h-2v6zM3 15v2h2.59L2.5 20.09l1.41 1.41L7 18.41V21h2v-6zm12 0v6h2v-2.59l3.09 3.09 1.41-1.41L18.41 17H21v-2z"})),InsertDriveFileIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M6 2c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm7 7V3.5L18.5 9z"})),VisibilityIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"})),EditNoteIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M3 10h11v2H3zm0-2h11V6H3zm0 8h7v-2H3zm15.01-3.13.71-.71c.39-.39 1.02-.39 1.41 0l.71.71c.39.39.39 1.02 0 1.41l-.71.71zm-.71.71-5.3 5.3V21h2.12l5.3-5.3z"})),ToolPicker=({selectedToolKey:e,onSelect:t,toolRegistry:i})=>{const{t:a}=useTranslation(),[o,l]=reactExports.useState(""),u=Object.entries(i).filter(([f,{name:h}])=>h.toLowerCase().includes(o.toLowerCase()));return jsxRuntimeExports.jsxs(Box,{children:[jsxRuntimeExports.jsx(TextInput,{placeholder:a("toolPicker.searchPlaceholder","Search tools..."),value:o,onChange:f=>l(f.currentTarget.value),mb:"md",autoComplete:"off"}),jsxRuntimeExports.jsx(Stack,{align:"flex-start",children:u.length===0?jsxRuntimeExports.jsx(Text,{c:"dimmed",size:"sm",children:a("toolPicker.noToolsFound","No tools found")}):u.map(([f,{icon:h,name:p}])=>jsxRuntimeExports.jsx(Button,{variant:e===f?"filled":"subtle",onClick:()=>t(f),size:"md",radius:"md",leftSection:h,fullWidth:!0,justify:"flex-start",children:p},f))})]})},COMMON_MIME_TYPES=new Map([["1km","application/vnd.1000minds.decision-model+xml"],["3dml","text/vnd.in3d.3dml"],["3ds","image/x-3ds"],["3g2","video/3gpp2"],["3gp","video/3gp"],["3gpp","video/3gpp"],["3mf","model/3mf"],["7z","application/x-7z-compressed"],["7zip","application/x-7z-compressed"],["123","application/vnd.lotus-1-2-3"],["aab","application/x-authorware-bin"],["aac","audio/x-acc"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abw","application/x-abiword"],["ac","application/vnd.nokia.n-gage.ac+xml"],["ac3","audio/ac3"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acu","application/vnd.acucobol"],["acutc","application/vnd.acucorp"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afm","application/x-font-type1"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/pdf"],["aif","audio/x-aiff"],["aifc","audio/x-aiff"],["aiff","audio/x-aiff"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["amr","audio/amr"],["apk","application/vnd.android.package-archive"],["apng","image/apng"],["appcache","text/cache-manifest"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["arc","application/x-freearc"],["arj","application/x-arj"],["asc","application/pgp-signature"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asx","video/x-ms-asf"],["atc","application/vnd.acucorp"],["atom","application/atom+xml"],["atomcat","application/atomcat+xml"],["atomdeleted","application/atomdeleted+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au","audio/x-au"],["avi","video/x-msvideo"],["avif","image/avif"],["aw","application/applixware"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azv","image/vnd.airzip.accelerator.azv"],["azw","application/vnd.amazon.ebook"],["b16","image/vnd.pco.b16"],["bat","application/x-msdownload"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bdoc","application/x-bdoc"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin","application/octet-stream"],["blb","application/x-blorb"],["blorb","application/x-blorb"],["bmi","application/vnd.bmi"],["bmml","application/vnd.balsamiq.bmml+xml"],["bmp","image/bmp"],["book","application/vnd.framemaker"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bpk","application/octet-stream"],["bpmn","application/octet-stream"],["bsp","model/vnd.valve.source.compiled-map"],["btif","image/prs.btif"],["buffer","application/octet-stream"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c","text/x-c"],["c4d","application/vnd.clonk.c4group"],["c4f","application/vnd.clonk.c4group"],["c4g","application/vnd.clonk.c4group"],["c4p","application/vnd.clonk.c4group"],["c4u","application/vnd.clonk.c4group"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["cab","application/vnd.ms-cab-compressed"],["caf","audio/x-caf"],["cap","application/vnd.tcpdump.pcap"],["car","application/vnd.curl.car"],["cat","application/vnd.ms-pki.seccat"],["cb7","application/x-cbr"],["cba","application/x-cbr"],["cbr","application/x-cbr"],["cbt","application/x-cbr"],["cbz","application/x-cbr"],["cc","text/x-c"],["cco","application/x-cocoa"],["cct","application/x-director"],["ccxml","application/ccxml+xml"],["cdbcmsg","application/vnd.contact.cmsg"],["cda","application/x-cdf"],["cdf","application/x-netcdf"],["cdfx","application/cdfx+xml"],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdr","application/cdr"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer","application/pkix-cert"],["cfs","application/x-cfs-compressed"],["cgm","image/cgm"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cjs","application/node"],["cla","application/vnd.claymore"],["class","application/octet-stream"],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod","application/vnd.rim.cod"],["coffee","text/coffeescript"],["com","application/x-msdownload"],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt","application/mac-compactpro"],["crd","application/x-mscardfile"],["crl","application/pkix-crl"],["crt","application/x-x509-ca-cert"],["crx","application/x-chrome-extension"],["cryptonote","application/vnd.rig.cryptonote"],["csh","application/x-csh"],["csl","application/vnd.citationstyles.style+xml"],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["csr","application/octet-stream"],["css","text/css"],["cst","application/x-director"],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxt","application/x-director"],["cxx","text/x-c"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["dart","application/vnd.dart"],["dataless","application/vnd.fdsn.seed"],["davmount","application/davmount+xml"],["dbf","application/vnd.dbf"],["dbk","application/docbook+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["ddf","application/vnd.syncml.dmddf+xml"],["dds","image/vnd.ms-dds"],["deb","application/x-debian-package"],["def","text/plain"],["deploy","application/octet-stream"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dgc","application/x-dgc-compressed"],["dic","text/x-c"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["disposition-notification","message/disposition-notification"],["dist","application/octet-stream"],["distz","application/octet-stream"],["djv","image/vnd.djvu"],["djvu","image/vnd.djvu"],["dll","application/octet-stream"],["dmg","application/x-apple-diskimage"],["dmn","application/octet-stream"],["dmp","application/vnd.tcpdump.pcap"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.template.macroEnabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroEnabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp","application/vnd.osgi.dp"],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drle","image/dicom-rle"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dvb","video/vnd.dvb.file"],["dvi","application/x-dvi"],["dwd","application/atsc-dwd+xml"],["dwf","model/vnd.dwf"],["dwg","image/vnd.dwg"],["dxf","image/vnd.dxf"],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ear","application/java-archive"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["ecma","application/ecmascript"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["elc","application/octet-stream"],["emf","image/emf"],["eml","message/rfc822"],["emma","application/emma+xml"],["emotionml","application/emotionml+xml"],["emz","application/x-msmetafile"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es","application/ecmascript"],["es3","application/vnd.eszigno3+xml"],["esa","application/vnd.osgi.subsystem"],["esf","application/vnd.epson.esf"],["et3","application/vnd.eszigno3+xml"],["etx","text/x-setext"],["eva","application/x-eva"],["evy","application/x-envoy"],["exe","application/octet-stream"],["exi","application/exi"],["exp","application/express"],["exr","image/aces"],["ext","application/vnd.novadigm.ext"],["ez","application/andrew-inset"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f","text/x-fortran"],["f4v","video/mp4"],["f77","text/x-fortran"],["f90","text/x-fortran"],["fbs","image/vnd.fastbidsheet"],["fcdt","application/vnd.adobe.formscentral.fcdt"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fdt","application/fdt+xml"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fgd","application/x-director"],["fh","image/x-freehand"],["fh4","image/x-freehand"],["fh5","image/x-freehand"],["fh7","image/x-freehand"],["fhc","image/x-freehand"],["fig","application/x-xfig"],["fits","image/fits"],["flac","audio/x-flac"],["fli","video/x-fli"],["flo","application/vnd.micrografx.flo"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fnc","application/vnd.frogans.fnc"],["fo","application/vnd.software602.filler.form+xml"],["for","text/x-fortran"],["fpx","image/vnd.fpx"],["frame","application/vnd.framemaker"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fxpl","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gam","application/x-tads"],["gbr","application/rpki-ghostbusters"],["gca","application/x-gca-compressed"],["gdl","model/vnd.gdl"],["gdoc","application/vnd.google-apps.document"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["glb","model/gltf-binary"],["gltf","model/gltf+json"],["gml","application/gml+xml"],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gpg","application/gpg-keys"],["gph","application/vnd.flographit"],["gpx","application/gpx+xml"],["gqf","application/vnd.grafeq"],["gqs","application/vnd.grafeq"],["gram","application/srgs"],["gramps","application/x-gramps-xml"],["gre","application/vnd.geometry-explorer"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsf","application/x-font-ghostscript"],["gsheet","application/vnd.google-apps.spreadsheet"],["gslides","application/vnd.google-apps.presentation"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxf","application/gxf"],["gxt","application/vnd.geonext"],["gz","application/gzip"],["gzip","application/gzip"],["h","text/x-c"],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hbs","text/x-handlebars-template"],["hdd","application/x-virtualbox-hdd"],["hdf","application/x-hdf"],["heic","image/heic"],["heics","image/heic-sequence"],["heif","image/heif"],["heifs","image/heif-sequence"],["hej2","image/hej2k"],["held","application/atsc-held+xml"],["hh","text/x-c"],["hjson","application/hjson"],["hlp","application/winhlp"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx","application/mac-binhex40"],["hsj2","image/hsj2"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["icm","application/vnd.iccprofile"],["ico","image/x-icon"],["ics","text/calendar"],["ief","image/ief"],["ifb","text/calendar"],["ifm","application/vnd.shana.informed.formdata"],["iges","model/iges"],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs","model/iges"],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["img","application/octet-stream"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["in","text/plain"],["ini","text/plain"],["ink","application/inkml+xml"],["inkml","application/inkml+xml"],["install","application/x-install-instructions"],["iota","application/vnd.astraea-software.iota"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["iso","application/x-iso9660-image"],["itp","application/vnd.shana.informed.formtemplate"],["its","application/its+xml"],["ivp","application/vnd.immervision-ivp"],["ivu","application/vnd.immervision-ivu"],["jad","text/vnd.sun.j2me.app-descriptor"],["jade","text/jade"],["jam","application/vnd.jam"],["jar","application/java-archive"],["jardiff","application/x-java-archive-diff"],["java","text/x-java-source"],["jhc","image/jphc"],["jisp","application/vnd.jisp"],["jls","image/jls"],["jlt","application/vnd.hp-jlyt"],["jng","image/x-jng"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jp2","image/jp2"],["jpe","image/jpeg"],["jpeg","image/jpeg"],["jpf","image/jpx"],["jpg","image/jpeg"],["jpg2","image/jp2"],["jpgm","video/jpm"],["jpgv","video/jpeg"],["jph","image/jph"],["jpm","video/jpm"],["jpx","image/jpx"],["js","application/javascript"],["json","application/json"],["json5","application/json5"],["jsonld","application/ld+json"],["jsonl","application/jsonl"],["jsonml","application/jsonml+json"],["jsx","text/jsx"],["jxr","image/jxr"],["jxra","image/jxra"],["jxrs","image/jxrs"],["jxs","image/jxs"],["jxsc","image/jxsc"],["jxsi","image/jxsi"],["jxss","image/jxss"],["kar","audio/midi"],["karbon","application/vnd.kde.karbon"],["kdb","application/octet-stream"],["kdbx","application/x-keepass2"],["key","application/x-iwork-keynote-sffkey"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["knp","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["kpt","application/vnd.kde.kpresenter"],["kpxx","application/vnd.ds-keypoint"],["ksp","application/vnd.kde.kspread"],["ktr","application/vnd.kahootz"],["ktx","image/ktx"],["ktx2","image/ktx2"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["kwt","application/vnd.kde.kword"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["less","text/less"],["lgr","application/lgr+xml"],["lha","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["list3820","application/vnd.ibm.modcap"],["listafp","application/vnd.ibm.modcap"],["litcoffee","text/coffeescript"],["lnk","application/x-ms-shortcut"],["log","text/plain"],["lostxml","application/lost+xml"],["lrf","application/octet-stream"],["lrm","application/vnd.ms-lrm"],["ltf","application/vnd.frogans.ltf"],["lua","text/x-lua"],["luac","application/x-lua-bytecode"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh","application/octet-stream"],["m1v","video/mpeg"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3a","audio/mpeg"],["m3u","text/plain"],["m3u8","application/vnd.apple.mpegurl"],["m4a","audio/x-m4a"],["m4p","application/mp4"],["m4s","video/iso.segment"],["m4u","application/vnd.mpegurl"],["m4v","video/x-m4v"],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m21","application/mp21"],["ma","application/mathematica"],["mads","application/mads+xml"],["maei","application/mmt-aei+xml"],["mag","application/vnd.ecowin.chart"],["maker","application/vnd.framemaker"],["man","text/troff"],["manifest","text/cache-manifest"],["map","application/json"],["mar","application/octet-stream"],["markdown","text/markdown"],["mathml","application/mathml+xml"],["mb","application/mathematica"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc1","application/vnd.medcalcdata"],["mcd","application/vnd.mcd"],["mcurl","text/vnd.curl.mcurl"],["md","text/markdown"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["mdx","text/mdx"],["me","text/troff"],["mesh","model/mesh"],["meta4","application/metalink4+xml"],["metalink","application/metalink+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mft","application/rpki-manifest"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mid","audio/midi"],["midi","audio/midi"],["mie","application/x-mie"],["mif","application/vnd.mif"],["mime","message/rfc822"],["mj2","video/mj2"],["mjp2","video/mj2"],["mjs","application/javascript"],["mk3d","video/x-matroska"],["mka","audio/x-matroska"],["mkd","text/x-markdown"],["mks","video/x-matroska"],["mkv","video/x-matroska"],["mlp","application/vnd.dolby.mlp"],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mmf","application/vnd.smaf"],["mml","text/mathml"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mng","video/x-mng"],["mny","application/x-msmoney"],["mobi","application/x-mobipocket-ebook"],["mods","application/mods+xml"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2","audio/mpeg"],["mp2a","audio/mpeg"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mp4a","audio/mp4"],["mp4s","application/mp4"],["mp4v","video/mp4"],["mp21","application/mp21"],["mpc","application/vnd.mophun.certificate"],["mpd","application/dash+xml"],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg","video/mpeg"],["mpg4","video/mp4"],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/vnd.ms-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","text/troff"],["mscml","application/mediaservercontrol+xml"],["mseed","application/vnd.fdsn.mseed"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msi","application/x-msdownload"],["msl","application/vnd.mobius.msl"],["msm","application/octet-stream"],["msp","application/octet-stream"],["msty","application/vnd.muvee.style"],["mtl","model/mtl"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musd","application/mmt-usd+xml"],["musicxml","application/vnd.recordare.musicxml+xml"],["mvb","application/x-msmediaview"],["mvt","application/vnd.mapbox-vector-tile"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxmf","audio/mobile-xmf"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nb","application/mathematica"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncx","application/x-dtbncx+xml"],["nfo","text/x-nfo"],["ngdat","application/vnd.nokia.n-gage.data"],["nitf","application/vnd.nitf"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nq","application/n-quads"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nt","application/n-triples"],["ntf","application/vnd.nitf"],["numbers","application/x-iwork-numbers-sffnumbers"],["nzb","application/x-nzb"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["obgx","application/vnd.openblox.game+xml"],["obj","model/obj"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogex","model/vnd.opengex"],["ogg","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omdoc","application/omdoc+xml"],["onepkg","application/onenote"],["onetmp","application/onenote"],["onetoc","application/onenote"],["onetoc2","application/onenote"],["opf","application/oebps-package+xml"],["opml","text/x-opml"],["oprc","application/vnd.palm"],["opus","audio/ogg"],["org","text/x-org"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["osm","application/vnd.openstreetmap.data+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","font/otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["ova","application/x-virtualbox-ova"],["ovf","application/x-virtualbox-ovf"],["owl","application/rdf+xml"],["oxps","application/oxps"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c","application/pkcs7-mime"],["p7m","application/pkcs7-mime"],["p7r","application/x-pkcs7-certreqresp"],["p7s","application/pkcs7-signature"],["p8","application/pkcs8"],["p10","application/x-pkcs10"],["p12","application/x-pkcs12"],["pac","application/x-ns-proxy-autoconfig"],["pages","application/x-iwork-pages-sffpages"],["pas","text/x-pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcap","application/vnd.tcpdump.pcap"],["pcf","application/x-font-pcf"],["pcl","application/vnd.hp-pcl"],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb","application/x-pilot"],["pde","text/x-processing"],["pdf","application/pdf"],["pem","application/x-x509-user-cert"],["pfa","application/x-font-type1"],["pfb","application/x-font-type1"],["pfm","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfx","application/x-pkcs12"],["pgm","image/x-portable-graymap"],["pgn","application/x-chess-pgn"],["pgp","application/pgp"],["php","application/x-httpd-php"],["php3","application/x-httpd-php"],["php4","application/x-httpd-php"],["phps","application/x-httpd-php-source"],["phtml","application/x-httpd-php"],["pic","image/x-pict"],["pkg","application/octet-stream"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pkpass","application/vnd.apple.pkpass"],["pl","application/x-perl"],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["pm","application/x-perl"],["pml","application/vnd.ctc-posml"],["png","image/png"],["pnm","image/x-portable-anymap"],["portpkg","application/vnd.macports.portpkg"],["pot","application/vnd.ms-powerpoint"],["potm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps","application/vnd.ms-powerpoint"],["ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt","application/powerpoint"],["pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["pqa","application/vnd.palm"],["prc","application/x-pilot"],["pre","application/vnd.lotus-freelance"],["prf","application/pics-rules"],["provx","application/provenance+xml"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd","application/x-photoshop"],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["pti","image/prs.pti"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pwn","application/vnd.3m.post-it-notes"],["pya","audio/vnd.ms-playready.media.pya"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qfx","application/vnd.intu.qfx"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qwd","application/vnd.quark.quarkxpress"],["qwt","application/vnd.quark.quarkxpress"],["qxb","application/vnd.quark.quarkxpress"],["qxd","application/vnd.quark.quarkxpress"],["qxl","application/vnd.quark.quarkxpress"],["qxt","application/vnd.quark.quarkxpress"],["ra","audio/x-realaudio"],["ram","audio/x-pn-realaudio"],["raml","application/raml+yaml"],["rapd","application/route-apd+xml"],["rar","application/x-rar"],["ras","image/x-cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["relo","application/p2p-overlay+xml"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["ris","application/x-research-info-systems"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm","audio/x-pn-realaudio"],["rmi","audio/midi"],["rmp","audio/x-pn-realaudio-plugin"],["rms","application/vnd.jcp.javame.midlet-rms"],["rmvb","application/vnd.rn-realmedia-vbr"],["rnc","application/relax-ng-compact-syntax"],["rng","application/xml"],["roa","application/rpki-roa"],["roff","text/troff"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsa","application/x-pkcs7"],["rsat","application/atsc-rsat+xml"],["rsd","application/rsd+xml"],["rsheet","application/urc-ressheet+xml"],["rss","application/rss+xml"],["rtf","text/rtf"],["rtx","text/richtext"],["run","application/x-makeself"],["rusd","application/route-usd+xml"],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["sass","text/x-sass"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm","application/vnd.lotus-screencam"],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["scss","text/x-scss"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkd","application/vnd.solent.sdkm+xml"],["sdkm","application/vnd.solent.sdkm+xml"],["sdp","application/sdp"],["sdw","application/vnd.stardivision.writer"],["sea","application/octet-stream"],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["senmlx","application/senml+xml"],["sensmlx","application/sensml+xml"],["ser","application/java-serialized-object"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sfv","text/x-sfv"],["sgi","image/sgi"],["sgl","application/vnd.stardivision.writer-global"],["sgm","text/sgml"],["sgml","text/sgml"],["sh","application/x-sh"],["shar","application/x-shar"],["shex","text/shex"],["shf","application/shf+xml"],["shtml","text/html"],["sid","image/x-mrsid-image"],["sieve","application/sieve"],["sig","application/pgp-signature"],["sil","audio/silk"],["silo","model/mesh"],["sis","application/vnd.symbian.install"],["sisx","application/vnd.symbian.install"],["sit","application/x-stuffit"],["sitx","application/x-stuffitx"],["siv","application/sieve"],["skd","application/vnd.koan"],["skm","application/vnd.koan"],["skp","application/vnd.koan"],["skt","application/vnd.koan"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slim","text/slim"],["slm","text/slim"],["sls","application/route-s-tsid+xml"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi","application/smil"],["smil","application/smil"],["smv","video/x-smv"],["smzip","application/vnd.stepmania.package"],["snd","audio/basic"],["snf","application/x-font-snf"],["so","application/octet-stream"],["spc","application/x-pkcs7-certificates"],["spdx","text/spdx"],["spf","application/vnd.yamaha.smaf-phrase"],["spl","application/x-futuresplash"],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spx","audio/ogg"],["sql","application/x-sql"],["src","application/x-wais-source"],["srt","application/x-subrip"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["ssdl","application/ssdl+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssml","application/ssml+xml"],["sst","application/octet-stream"],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl","model/stl"],["stpx","model/step+xml"],["stpxz","model/step-xml+zip"],["stpz","model/step+zip"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["styl","text/stylus"],["stylus","text/stylus"],["sub","text/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["susp","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svg","image/svg+xml"],["svgz","image/svg+xml"],["swa","application/x-director"],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["swidtag","application/swid+xml"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t","text/troff"],["t3","application/x-t3vm-image"],["t38","image/t38"],["taglet","application/vnd.mynfc"],["tao","application/vnd.tao.intent-module-archive"],["tap","image/vnd.tencent.tap"],["tar","application/x-tar"],["tcap","application/vnd.3gpp2.tcap"],["tcl","application/x-tcl"],["td","application/urc-targetdesc+xml"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["teicorpus","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text","text/plain"],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tfx","image/tiff-fx"],["tga","image/x-tga"],["tgz","application/x-tar"],["thmx","application/vnd.ms-officetheme"],["tif","image/tiff"],["tiff","image/tiff"],["tk","application/x-tcl"],["tmo","application/vnd.tmobile-livetv"],["toml","application/toml"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","text/troff"],["tra","application/vnd.trueapp"],["trig","application/trig"],["trm","application/x-msterminal"],["ts","video/mp2t"],["tsd","application/timestamped-data"],["tsv","text/tab-separated-values"],["ttc","font/collection"],["ttf","font/ttf"],["ttl","text/turtle"],["ttml","application/ttml+xml"],["twd","application/vnd.simtech-mindmapper"],["twds","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["u8dsn","message/global-delivery-status"],["u8hdr","message/global-headers"],["u8mdn","message/global-disposition-notification"],["u8msg","message/global"],["u32","application/x-authorware-bin"],["ubj","application/ubjson"],["udeb","application/x-debian-package"],["ufd","application/vnd.ufdl"],["ufdl","application/vnd.ufdl"],["ulx","application/x-glulx"],["umj","application/vnd.umajin"],["unityweb","application/vnd.unity"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["urls","text/uri-list"],["usdz","model/vnd.usdz+zip"],["ustar","application/x-ustar"],["utz","application/vnd.uiq.theme"],["uu","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvd","application/vnd.dece.data"],["uvf","application/vnd.dece.data"],["uvg","image/vnd.dece.graphic"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvt","application/vnd.dece.ttml+xml"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["uvva","audio/vnd.dece.audio"],["uvvd","application/vnd.dece.data"],["uvvf","application/vnd.dece.data"],["uvvg","image/vnd.dece.graphic"],["uvvh","video/vnd.dece.hd"],["uvvi","image/vnd.dece.graphic"],["uvvm","video/vnd.dece.mobile"],["uvvp","video/vnd.dece.pd"],["uvvs","video/vnd.dece.sd"],["uvvt","application/vnd.dece.ttml+xml"],["uvvu","video/vnd.uvvu.mp4"],["uvvv","video/vnd.dece.video"],["uvvx","application/vnd.dece.unspecified"],["uvvz","application/vnd.dece.zip"],["uvx","application/vnd.dece.unspecified"],["uvz","application/vnd.dece.zip"],["vbox","application/x-virtualbox-vbox"],["vbox-extpack","application/x-virtualbox-vbox-extpack"],["vcard","text/vcard"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vdi","application/x-virtualbox-vdi"],["vds","model/vnd.sap.vds"],["vhd","application/x-virtualbox-vhd"],["vis","application/vnd.visionary"],["viv","video/vnd.vivo"],["vlc","application/videolan"],["vmdk","application/x-virtualbox-vmdk"],["vob","video/x-ms-vob"],["vor","application/vnd.stardivision.writer"],["vox","application/x-authorware-bin"],["vrml","model/vrml"],["vsd","application/vnd.visio"],["vsf","application/vnd.vsf"],["vss","application/vnd.visio"],["vst","application/vnd.visio"],["vsw","application/vnd.visio"],["vtf","image/vnd.valve.source.texture"],["vtt","text/vtt"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w3d","application/x-director"],["wad","application/x-doom"],["wadl","application/vnd.sun.wadl+xml"],["war","application/java-archive"],["wasm","application/wasm"],["wav","audio/x-wav"],["wax","audio/x-ms-wax"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["wdp","image/vnd.ms-photo"],["weba","audio/webm"],["webapp","application/x-web-app-manifest+json"],["webm","video/webm"],["webmanifest","application/manifest+json"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf","image/wmf"],["wml","text/vnd.wap.wml"],["wmlc","application/wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-msmetafile"],["woff","font/woff"],["woff2","font/woff2"],["word","application/msword"],["wpd","application/vnd.wordperfect"],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wqd","application/vnd.wqd"],["wri","application/x-mswrite"],["wrl","model/vrml"],["wsc","message/vnd.wfa.wsc"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wtb","application/vnd.webturbo"],["wvx","video/x-ms-wvx"],["x3d","model/x3d+xml"],["x3db","model/x3d+fastinfoset"],["x3dbz","model/x3d+binary"],["x3dv","model/x3d-vrml"],["x3dvz","model/x3d+vrml"],["x3dz","model/x3d+xml"],["x32","application/x-authorware-bin"],["x_b","model/vnd.parasolid.transmit.binary"],["x_t","model/vnd.parasolid.transmit.text"],["xaml","application/xaml+xml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xav","application/xcap-att+xml"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm","image/x-xbitmap"],["xca","application/xcap-caps+xml"],["xcs","application/calendar+xml"],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xel","application/xcap-el+xml"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xht","application/xhtml+xml"],["xhtml","application/xhtml+xml"],["xhvml","application/xv+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla","application/vnd.ms-excel"],["xlam","application/vnd.ms-excel.addin.macroEnabled.12"],["xlc","application/vnd.ms-excel"],["xlf","application/xliff+xml"],["xlm","application/vnd.ms-excel"],["xls","application/vnd.ms-excel"],["xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt","application/vnd.ms-excel"],["xltm","application/vnd.ms-excel.template.macroEnabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlw","application/vnd.ms-excel"],["xm","audio/xm"],["xml","application/xml"],["xns","application/xcap-ns+xml"],["xo","application/vnd.olpc-sugar"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpl","application/xproc+xml"],["xpm","image/x-xpixmap"],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xpx","application/vnd.intercon.formnet"],["xsd","application/xml"],["xsl","application/xml"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xul","application/vnd.mozilla.xul+xml"],["xvm","application/xv+xml"],["xvml","application/xv+xml"],["xwd","image/x-xwindowdump"],["xyz","chemical/x-xyz"],["xz","application/x-xz"],["yaml","text/yaml"],["yang","application/yang"],["yin","application/yin+xml"],["yml","text/yaml"],["ymp","text/x-suse-ymp"],["z","application/x-compress"],["z1","application/x-zmachine"],["z2","application/x-zmachine"],["z3","application/x-zmachine"],["z4","application/x-zmachine"],["z5","application/x-zmachine"],["z6","application/x-zmachine"],["z7","application/x-zmachine"],["z8","application/x-zmachine"],["zaz","application/vnd.zzazz.deck+xml"],["zip","application/zip"],["zir","application/vnd.zul"],["zirz","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zsh","text/x-scriptzsh"]]);function toFileWithPath(e,t,i){const a=withMimeType(e),{webkitRelativePath:o}=e,l=typeof t=="string"?t:typeof o=="string"&&o.length>0?o:`./${e.name}`;return typeof a.path!="string"&&setObjProp(a,"path",l),setObjProp(a,"relativePath",l),a}function withMimeType(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const a=t.split(".").pop().toLowerCase(),o=COMMON_MIME_TYPES.get(a);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}function setObjProp(e,t,i){Object.defineProperty(e,t,{value:i,writable:!1,configurable:!1,enumerable:!0})}const FILES_TO_IGNORE=[".DS_Store","Thumbs.db"];function fromEvent(e){return __awaiter(this,void 0,void 0,function*(){return isObject$1(e)&&isDataTransfer(e.dataTransfer)?getDataTransferFiles(e.dataTransfer,e.type):isChangeEvt(e)?getInputFiles(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?getFsHandleFiles(e):[]})}function isDataTransfer(e){return isObject$1(e)}function isChangeEvt(e){return isObject$1(e)&&isObject$1(e.target)}function isObject$1(e){return typeof e=="object"&&e!==null}function getInputFiles(e){return fromList(e.target.files).map(t=>toFileWithPath(t))}function getFsHandleFiles(e){return __awaiter(this,void 0,void 0,function*(){return(yield Promise.all(e.map(i=>i.getFile()))).map(i=>toFileWithPath(i))})}function getDataTransferFiles(e,t){return __awaiter(this,void 0,void 0,function*(){if(e.items){const i=fromList(e.items).filter(o=>o.kind==="file");if(t!=="drop")return i;const a=yield Promise.all(i.map(toFilePromises));return noIgnoredFiles(flatten(a))}return noIgnoredFiles(fromList(e.files).map(i=>toFileWithPath(i)))})}function noIgnoredFiles(e){return e.filter(t=>FILES_TO_IGNORE.indexOf(t.name)===-1)}function fromList(e){if(e===null)return[];const t=[];for(let i=0;i<e.length;i++){const a=e[i];t.push(a)}return t}function toFilePromises(e){if(typeof e.webkitGetAsEntry!="function")return fromDataTransferItem(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?fromDirEntry(t):fromDataTransferItem(e,t)}function flatten(e){return e.reduce((t,i)=>[...t,...Array.isArray(i)?flatten(i):[i]],[])}function fromDataTransferItem(e,t){return __awaiter(this,void 0,void 0,function*(){var i;if(globalThis.isSecureContext&&typeof e.getAsFileSystemHandle=="function"){const l=yield e.getAsFileSystemHandle();if(l===null)throw new Error(`${e} is not a File`);if(l!==void 0){const u=yield l.getFile();return u.handle=l,toFileWithPath(u)}}const a=e.getAsFile();if(!a)throw new Error(`${e} is not a File`);return toFileWithPath(a,(i=t==null?void 0:t.fullPath)!==null&&i!==void 0?i:void 0)})}function fromEntry(e){return __awaiter(this,void 0,void 0,function*(){return e.isDirectory?fromDirEntry(e):fromFileEntry(e)})}function fromDirEntry(e){const t=e.createReader();return new Promise((i,a)=>{const o=[];function l(){t.readEntries(u=>__awaiter(this,void 0,void 0,function*(){if(u.length){const f=Promise.all(u.map(fromEntry));o.push(f),l()}else try{const f=yield Promise.all(o);i(f)}catch(f){a(f)}}),u=>{a(u)})}l()})}function fromFileEntry(e){return __awaiter(this,void 0,void 0,function*(){return new Promise((t,i)=>{e.file(a=>{const o=toFileWithPath(a,e.fullPath);t(o)},a=>{i(a)})})})}var es={},hasRequiredEs;function requireEs(){return hasRequiredEs||(hasRequiredEs=1,es.__esModule=!0,es.default=function(e,t){if(e&&t){var i=Array.isArray(t)?t:t.split(",");if(i.length===0)return!0;var a=e.name||"",o=(e.type||"").toLowerCase(),l=o.replace(/\/.*$/,"");return i.some(function(u){var f=u.trim().toLowerCase();return f.charAt(0)==="."?a.toLowerCase().endsWith(f):f.endsWith("/*")?l===f.replace(/\/.*$/,""):o===f})}return!0}),es}var esExports=requireEs();const _accepts=getDefaultExportFromCjs(esExports);function _toConsumableArray$1(e){return _arrayWithoutHoles$1(e)||_iterableToArray$1(e)||_unsupportedIterableToArray$1(e)||_nonIterableSpread$1()}function _nonIterableSpread$1(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _iterableToArray$1(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function _arrayWithoutHoles$1(e){if(Array.isArray(e))return _arrayLikeToArray$1(e)}function ownKeys$3(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),i.push.apply(i,a)}return i}function _objectSpread$3(e){for(var t=1;t<arguments.length;t++){var i=arguments[t]!=null?arguments[t]:{};t%2?ownKeys$3(Object(i),!0).forEach(function(a){_defineProperty$3(e,a,i[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):ownKeys$3(Object(i)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(i,a))})}return e}function _defineProperty$3(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function _slicedToArray$1(e,t){return _arrayWithHoles$1(e)||_iterableToArrayLimit$1(e,t)||_unsupportedIterableToArray$1(e,t)||_nonIterableRest$1()}function _nonIterableRest$1(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$1(e,t){if(e){if(typeof e=="string")return _arrayLikeToArray$1(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);if(i==="Object"&&e.constructor&&(i=e.constructor.name),i==="Map"||i==="Set")return Array.from(e);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _arrayLikeToArray$1(e,t)}}function _arrayLikeToArray$1(e,t){(t==null||t>e.length)&&(t=e.length);for(var i=0,a=new Array(t);i<t;i++)a[i]=e[i];return a}function _iterableToArrayLimit$1(e,t){var i=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(i!=null){var a=[],o=!0,l=!1,u,f;try{for(i=i.call(e);!(o=(u=i.next()).done)&&(a.push(u.value),!(t&&a.length===t));o=!0);}catch(h){l=!0,f=h}finally{try{!o&&i.return!=null&&i.return()}finally{if(l)throw f}}return a}}function _arrayWithHoles$1(e){if(Array.isArray(e))return e}var accepts=typeof _accepts=="function"?_accepts:_accepts.default,FILE_INVALID_TYPE="file-invalid-type",FILE_TOO_LARGE="file-too-large",FILE_TOO_SMALL="file-too-small",TOO_MANY_FILES="too-many-files",getInvalidTypeRejectionErr=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",i=t.split(","),a=i.length>1?"one of ".concat(i.join(", ")):i[0];return{code:FILE_INVALID_TYPE,message:"File type must be ".concat(a)}},getTooLargeRejectionErr=function(t){return{code:FILE_TOO_LARGE,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},getTooSmallRejectionErr=function(t){return{code:FILE_TOO_SMALL,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},TOO_MANY_FILES_REJECTION={code:TOO_MANY_FILES,message:"Too many files"};function fileAccepted(e,t){var i=e.type==="application/x-moz-file"||accepts(e,t);return[i,i?null:getInvalidTypeRejectionErr(t)]}function fileMatchSize(e,t,i){if(isDefined(e.size))if(isDefined(t)&&isDefined(i)){if(e.size>i)return[!1,getTooLargeRejectionErr(i)];if(e.size<t)return[!1,getTooSmallRejectionErr(t)]}else{if(isDefined(t)&&e.size<t)return[!1,getTooSmallRejectionErr(t)];if(isDefined(i)&&e.size>i)return[!1,getTooLargeRejectionErr(i)]}return[!0,null]}function isDefined(e){return e!=null}function allFilesAccepted(e){var t=e.files,i=e.accept,a=e.minSize,o=e.maxSize,l=e.multiple,u=e.maxFiles,f=e.validator;return!l&&t.length>1||l&&u>=1&&t.length>u?!1:t.every(function(h){var p=fileAccepted(h,i),m=_slicedToArray$1(p,1),g=m[0],b=fileMatchSize(h,a,o),x=_slicedToArray$1(b,1),y=x[0],S=f?f(h):null;return g&&y&&!S})}function isPropagationStopped(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function isEvtWithFiles(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function onDocumentDragOver(e){e.preventDefault()}function isIe(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function isEdge(e){return e.indexOf("Edge/")!==-1}function isIeOrEdge(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return isIe(e)||isEdge(e)}function composeEventHandlers(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return function(a){for(var o=arguments.length,l=new Array(o>1?o-1:0),u=1;u<o;u++)l[u-1]=arguments[u];return t.some(function(f){return!isPropagationStopped(a)&&f&&f.apply(void 0,[a].concat(l)),isPropagationStopped(a)})}}function canUseFileSystemAccessAPI(){return"showOpenFilePicker"in window}function pickerOptionsFromAccept(e){if(isDefined(e)){var t=Object.entries(e).filter(function(i){var a=_slicedToArray$1(i,2),o=a[0],l=a[1],u=!0;return isMIMEType(o)||(console.warn('Skipped "'.concat(o,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),u=!1),(!Array.isArray(l)||!l.every(isExt))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),u=!1),u}).reduce(function(i,a){var o=_slicedToArray$1(a,2),l=o[0],u=o[1];return _objectSpread$3(_objectSpread$3({},i),{},_defineProperty$3({},l,u))},{});return[{description:"Files",accept:t}]}return e}function acceptPropAsAcceptAttr(e){if(isDefined(e))return Object.entries(e).reduce(function(t,i){var a=_slicedToArray$1(i,2),o=a[0],l=a[1];return[].concat(_toConsumableArray$1(t),[o],_toConsumableArray$1(l))},[]).filter(function(t){return isMIMEType(t)||isExt(t)}).join(",")}function isAbort(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function isSecurityError(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function isMIMEType(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function isExt(e){return/^.*\.[\w]+$/.test(e)}var _excluded=["children"],_excluded2=["open"],_excluded3=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],_excluded4=["refKey","onChange","onClick"];function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _iterableToArray(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray(e,t){if(e){if(typeof e=="string")return _arrayLikeToArray(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);if(i==="Object"&&e.constructor&&(i=e.constructor.name),i==="Map"||i==="Set")return Array.from(e);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _arrayLikeToArray(e,t)}}function _arrayLikeToArray(e,t){(t==null||t>e.length)&&(t=e.length);for(var i=0,a=new Array(t);i<t;i++)a[i]=e[i];return a}function _iterableToArrayLimit(e,t){var i=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(i!=null){var a=[],o=!0,l=!1,u,f;try{for(i=i.call(e);!(o=(u=i.next()).done)&&(a.push(u.value),!(t&&a.length===t));o=!0);}catch(h){l=!0,f=h}finally{try{!o&&i.return!=null&&i.return()}finally{if(l)throw f}}return a}}function _arrayWithHoles(e){if(Array.isArray(e))return e}function ownKeys$2(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),i.push.apply(i,a)}return i}function _objectSpread$2(e){for(var t=1;t<arguments.length;t++){var i=arguments[t]!=null?arguments[t]:{};t%2?ownKeys$2(Object(i),!0).forEach(function(a){_defineProperty$2(e,a,i[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):ownKeys$2(Object(i)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(i,a))})}return e}function _defineProperty$2(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function _objectWithoutProperties(e,t){if(e==null)return{};var i=_objectWithoutPropertiesLoose(e,t),a,o;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(o=0;o<l.length;o++)a=l[o],!(t.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(i[a]=e[a])}return i}function _objectWithoutPropertiesLoose(e,t){if(e==null)return{};var i={},a=Object.keys(e),o,l;for(l=0;l<a.length;l++)o=a[l],!(t.indexOf(o)>=0)&&(i[o]=e[o]);return i}var Dropzone$2=reactExports.forwardRef(function(e,t){var i=e.children,a=_objectWithoutProperties(e,_excluded),o=useDropzone(a),l=o.open,u=_objectWithoutProperties(o,_excluded2);return reactExports.useImperativeHandle(t,function(){return{open:l}},[l]),React.createElement(reactExports.Fragment,null,i(_objectSpread$2(_objectSpread$2({},u),{},{open:l})))});Dropzone$2.displayName="Dropzone";var defaultProps$2={disabled:!1,getFilesFromEvent:fromEvent,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};Dropzone$2.defaultProps=defaultProps$2;Dropzone$2.propTypes={children:PropTypes.func,accept:PropTypes.objectOf(PropTypes.arrayOf(PropTypes.string)),multiple:PropTypes.bool,preventDropOnDocument:PropTypes.bool,noClick:PropTypes.bool,noKeyboard:PropTypes.bool,noDrag:PropTypes.bool,noDragEventsBubbling:PropTypes.bool,minSize:PropTypes.number,maxSize:PropTypes.number,maxFiles:PropTypes.number,disabled:PropTypes.bool,getFilesFromEvent:PropTypes.func,onFileDialogCancel:PropTypes.func,onFileDialogOpen:PropTypes.func,useFsAccessApi:PropTypes.bool,autoFocus:PropTypes.bool,onDragEnter:PropTypes.func,onDragLeave:PropTypes.func,onDragOver:PropTypes.func,onDrop:PropTypes.func,onDropAccepted:PropTypes.func,onDropRejected:PropTypes.func,onError:PropTypes.func,validator:PropTypes.func};var initialState={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function useDropzone(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=_objectSpread$2(_objectSpread$2({},defaultProps$2),e),i=t.accept,a=t.disabled,o=t.getFilesFromEvent,l=t.maxSize,u=t.minSize,f=t.multiple,h=t.maxFiles,p=t.onDragEnter,m=t.onDragLeave,g=t.onDragOver,b=t.onDrop,x=t.onDropAccepted,y=t.onDropRejected,S=t.onFileDialogCancel,E=t.onFileDialogOpen,w=t.useFsAccessApi,_=t.autoFocus,O=t.preventDropOnDocument,k=t.noClick,A=t.noKeyboard,D=t.noDrag,R=t.noDragEventsBubbling,T=t.onError,j=t.validator,P=reactExports.useMemo(function(){return acceptPropAsAcceptAttr(i)},[i]),M=reactExports.useMemo(function(){return pickerOptionsFromAccept(i)},[i]),I=reactExports.useMemo(function(){return typeof E=="function"?E:noop$2},[E]),G=reactExports.useMemo(function(){return typeof S=="function"?S:noop$2},[S]),ne=reactExports.useRef(null),Q=reactExports.useRef(null),B=reactExports.useReducer(reducer,initialState),H=_slicedToArray(B,2),Y=H[0],U=H[1],F=Y.isFocused,X=Y.isFileDialogActive,z=reactExports.useRef(typeof window<"u"&&window.isSecureContext&&w&&canUseFileSystemAccessAPI()),L=function(){!z.current&&X&&setTimeout(function(){if(Q.current){var ie=Q.current.files;ie.length||(U({type:"closeDialog"}),G())}},300)};reactExports.useEffect(function(){return window.addEventListener("focus",L,!1),function(){window.removeEventListener("focus",L,!1)}},[Q,X,G,z]);var $=reactExports.useRef([]),V=function(ie){ne.current&&ne.current.contains(ie.target)||(ie.preventDefault(),$.current=[])};reactExports.useEffect(function(){return O&&(document.addEventListener("dragover",onDocumentDragOver,!1),document.addEventListener("drop",V,!1)),function(){O&&(document.removeEventListener("dragover",onDocumentDragOver),document.removeEventListener("drop",V))}},[ne,O]),reactExports.useEffect(function(){return!a&&_&&ne.current&&ne.current.focus(),function(){}},[ne,_,a]);var K=reactExports.useCallback(function(oe){T?T(oe):console.error(oe)},[T]),te=reactExports.useCallback(function(oe){oe.preventDefault(),oe.persist(),de(oe),$.current=[].concat(_toConsumableArray($.current),[oe.target]),isEvtWithFiles(oe)&&Promise.resolve(o(oe)).then(function(ie){if(!(isPropagationStopped(oe)&&!R)){var Fe=ie.length,Le=Fe>0&&allFilesAccepted({files:ie,accept:P,minSize:u,maxSize:l,multiple:f,maxFiles:h,validator:j}),Ye=Fe>0&&!Le;U({isDragAccept:Le,isDragReject:Ye,isDragActive:!0,type:"setDraggedFiles"}),p&&p(oe)}}).catch(function(ie){return K(ie)})},[o,p,K,R,P,u,l,f,h,j]),J=reactExports.useCallback(function(oe){oe.preventDefault(),oe.persist(),de(oe);var ie=isEvtWithFiles(oe);if(ie&&oe.dataTransfer)try{oe.dataTransfer.dropEffect="copy"}catch{}return ie&&g&&g(oe),!1},[g,R]),ce=reactExports.useCallback(function(oe){oe.preventDefault(),oe.persist(),de(oe);var ie=$.current.filter(function(Le){return ne.current&&ne.current.contains(Le)}),Fe=ie.indexOf(oe.target);Fe!==-1&&ie.splice(Fe,1),$.current=ie,!(ie.length>0)&&(U({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),isEvtWithFiles(oe)&&m&&m(oe))},[ne,m,R]),ue=reactExports.useCallback(function(oe,ie){var Fe=[],Le=[];oe.forEach(function(Ye){var qe=fileAccepted(Ye,P),it=_slicedToArray(qe,2),We=it[0],Je=it[1],ct=fileMatchSize(Ye,u,l),ot=_slicedToArray(ct,2),Oe=ot[0],ye=ot[1],xe=j?j(Ye):null;if(We&&Oe&&!xe)Fe.push(Ye);else{var Qe=[Je,ye];xe&&(Qe=Qe.concat(xe)),Le.push({file:Ye,errors:Qe.filter(function(pt){return pt})})}}),(!f&&Fe.length>1||f&&h>=1&&Fe.length>h)&&(Fe.forEach(function(Ye){Le.push({file:Ye,errors:[TOO_MANY_FILES_REJECTION]})}),Fe.splice(0)),U({acceptedFiles:Fe,fileRejections:Le,isDragReject:Le.length>0,type:"setFiles"}),b&&b(Fe,Le,ie),Le.length>0&&y&&y(Le,ie),Fe.length>0&&x&&x(Fe,ie)},[U,f,P,u,l,h,b,x,y,j]),we=reactExports.useCallback(function(oe){oe.preventDefault(),oe.persist(),de(oe),$.current=[],isEvtWithFiles(oe)&&Promise.resolve(o(oe)).then(function(ie){isPropagationStopped(oe)&&!R||ue(ie,oe)}).catch(function(ie){return K(ie)}),U({type:"reset"})},[o,ue,K,R]),Ee=reactExports.useCallback(function(){if(z.current){U({type:"openDialog"}),I();var oe={multiple:f,types:M};window.showOpenFilePicker(oe).then(function(ie){return o(ie)}).then(function(ie){ue(ie,null),U({type:"closeDialog"})}).catch(function(ie){isAbort(ie)?(G(ie),U({type:"closeDialog"})):isSecurityError(ie)?(z.current=!1,Q.current?(Q.current.value=null,Q.current.click()):K(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):K(ie)});return}Q.current&&(U({type:"openDialog"}),I(),Q.current.value=null,Q.current.click())},[U,I,G,w,ue,K,M,f]),De=reactExports.useCallback(function(oe){!ne.current||!ne.current.isEqualNode(oe.target)||(oe.key===" "||oe.key==="Enter"||oe.keyCode===32||oe.keyCode===13)&&(oe.preventDefault(),Ee())},[ne,Ee]),je=reactExports.useCallback(function(){U({type:"focus"})},[]),Pe=reactExports.useCallback(function(){U({type:"blur"})},[]),ge=reactExports.useCallback(function(){k||(isIeOrEdge()?setTimeout(Ee,0):Ee())},[k,Ee]),se=function(ie){return a?null:ie},W=function(ie){return A?null:se(ie)},ee=function(ie){return D?null:se(ie)},de=function(ie){R&&ie.stopPropagation()},pe=reactExports.useMemo(function(){return function(){var oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ie=oe.refKey,Fe=ie===void 0?"ref":ie,Le=oe.role,Ye=oe.onKeyDown,qe=oe.onFocus,it=oe.onBlur,We=oe.onClick,Je=oe.onDragEnter,ct=oe.onDragOver,ot=oe.onDragLeave,Oe=oe.onDrop,ye=_objectWithoutProperties(oe,_excluded3);return _objectSpread$2(_objectSpread$2(_defineProperty$2({onKeyDown:W(composeEventHandlers(Ye,De)),onFocus:W(composeEventHandlers(qe,je)),onBlur:W(composeEventHandlers(it,Pe)),onClick:se(composeEventHandlers(We,ge)),onDragEnter:ee(composeEventHandlers(Je,te)),onDragOver:ee(composeEventHandlers(ct,J)),onDragLeave:ee(composeEventHandlers(ot,ce)),onDrop:ee(composeEventHandlers(Oe,we)),role:typeof Le=="string"&&Le!==""?Le:"presentation"},Fe,ne),!a&&!A?{tabIndex:0}:{}),ye)}},[ne,De,je,Pe,ge,te,J,ce,we,A,D,a]),ve=reactExports.useCallback(function(oe){oe.stopPropagation()},[]),Te=reactExports.useMemo(function(){return function(){var oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ie=oe.refKey,Fe=ie===void 0?"ref":ie,Le=oe.onChange,Ye=oe.onClick,qe=_objectWithoutProperties(oe,_excluded4),it=_defineProperty$2({accept:P,multiple:f,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:se(composeEventHandlers(Le,we)),onClick:se(composeEventHandlers(Ye,ve)),tabIndex:-1},Fe,Q);return _objectSpread$2(_objectSpread$2({},it),qe)}},[Q,i,f,we,a]);return _objectSpread$2(_objectSpread$2({},Y),{},{isFocused:F&&!a,getRootProps:pe,getInputProps:Te,rootRef:ne,inputRef:Q,open:se(Ee)})}function reducer(e,t){switch(t.type){case"focus":return _objectSpread$2(_objectSpread$2({},e),{},{isFocused:!0});case"blur":return _objectSpread$2(_objectSpread$2({},e),{},{isFocused:!1});case"openDialog":return _objectSpread$2(_objectSpread$2({},initialState),{},{isFileDialogActive:!0});case"closeDialog":return _objectSpread$2(_objectSpread$2({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return _objectSpread$2(_objectSpread$2({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return _objectSpread$2(_objectSpread$2({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return _objectSpread$2({},initialState);default:return e}}function noop$2(){}const[DropzoneProvider,useDropzoneContext]=createSafeContext("Dropzone component was not found in tree");function createDropzoneStatus(e){const t=i=>{const{children:a,...o}=useProps(`Dropzone${upperFirst(e)}`,{},i),l=useDropzoneContext(),u=isElement$1(a)?a:jsxRuntimeExports.jsx("span",{children:a});return l[e]?reactExports.cloneElement(u,o):null};return t.displayName=`@mantine/dropzone/${upperFirst(e)}`,t}const DropzoneAccept=createDropzoneStatus("accept"),DropzoneReject=createDropzoneStatus("reject"),DropzoneIdle=createDropzoneStatus("idle");var classes={root:"m_d46a4834",inner:"m_b85f7144",fullScreen:"m_96f6e9ad",dropzone:"m_7946116d"};const defaultProps$1={loading:!1,multiple:!0,maxSize:1/0,autoFocus:!1,activateOnClick:!0,activateOnDrag:!0,dragEventsBubbling:!0,activateOnKeyboard:!0,useFsAccessApi:!0,variant:"light",rejectColor:"red"},varsResolver=(e,{radius:t,variant:i,acceptColor:a,rejectColor:o})=>{const l=e.variantColorResolver({color:a||e.primaryColor,theme:e,variant:i}),u=e.variantColorResolver({color:o||"red",theme:e,variant:i});return{root:{"--dropzone-radius":getRadius(t),"--dropzone-accept-color":l.color,"--dropzone-accept-bg":l.background,"--dropzone-reject-color":u.color,"--dropzone-reject-bg":u.background}}},Dropzone$1=factory((e,t)=>{const i=useProps("Dropzone",defaultProps$1,e),{classNames:a,className:o,style:l,styles:u,unstyled:f,vars:h,radius:p,disabled:m,loading:g,multiple:b,maxSize:x,accept:y,children:S,onDropAny:E,onDrop:w,onReject:_,openRef:O,name:k,maxFiles:A,autoFocus:D,activateOnClick:R,activateOnDrag:T,dragEventsBubbling:j,activateOnKeyboard:P,onDragEnter:M,onDragLeave:I,onDragOver:G,onFileDialogCancel:ne,onFileDialogOpen:Q,preventDropOnDocument:B,useFsAccessApi:H,getFilesFromEvent:Y,validator:U,rejectColor:F,acceptColor:X,enablePointerEvents:z,loaderProps:L,inputProps:$,mod:V,...K}=i,te=useStyles({name:"Dropzone",classes,props:i,className:o,style:l,classNames:a,styles:u,unstyled:f,vars:h,varsResolver}),{getRootProps:J,getInputProps:ce,isDragAccept:ue,isDragReject:we,isDragActive:Ee,open:De}=useDropzone({onDrop:E,onDropAccepted:w,onDropRejected:_,disabled:m||g,accept:Array.isArray(y)?y.reduce((se,W)=>({...se,[W]:[]}),{}):y,multiple:b,maxSize:x,maxFiles:A,autoFocus:D,noClick:!R,noDrag:!T,noDragEventsBubbling:!j,noKeyboard:!P,onDragEnter:M,onDragLeave:I,onDragOver:G,onFileDialogCancel:ne,onFileDialogOpen:Q,preventDropOnDocument:B,useFsAccessApi:H,validator:U,...Y?{getFilesFromEvent:Y}:null});assignRef(O,De);const je=Ee&&ue,Pe=Ee&&we,ge=!je&&!Pe;return jsxRuntimeExports.jsx(DropzoneProvider,{value:{accept:je,reject:Pe,idle:ge},children:jsxRuntimeExports.jsxs(Box,{...J(),...te("root",{focusable:!0}),...K,mod:[{accept:je,reject:Pe,idle:ge,disabled:m,loading:g,"activate-on-click":R},V],children:[jsxRuntimeExports.jsx(LoadingOverlay,{visible:g,overlayProps:{radius:p},unstyled:f,loaderProps:L}),jsxRuntimeExports.jsx("input",{...ce($),name:k}),jsxRuntimeExports.jsx("div",{...te("inner"),ref:t,"data-enable-pointer-events":z||void 0,children:S})]})})});Dropzone$1.classes=classes;Dropzone$1.displayName="@mantine/dropzone/Dropzone";Dropzone$1.Accept=DropzoneAccept;Dropzone$1.Idle=DropzoneIdle;Dropzone$1.Reject=DropzoneReject;const defaultProps={loading:!1,maxSize:1/0,activateOnClick:!1,activateOnDrag:!0,dragEventsBubbling:!0,activateOnKeyboard:!0,active:!0,zIndex:getDefaultZIndex("max"),withinPortal:!0},DropzoneFullScreen=factory((e,t)=>{const i=useProps("DropzoneFullScreen",defaultProps,e),{classNames:a,className:o,style:l,styles:u,unstyled:f,vars:h,active:p,onDrop:m,onReject:g,zIndex:b,withinPortal:x,portalProps:y,...S}=i,E=useStyles({name:"DropzoneFullScreen",classes,props:i,className:o,style:l,classNames:a,styles:u,unstyled:f,rootSelector:"fullScreen"}),{resolvedClassNames:w,resolvedStyles:_}=useResolvedStylesApi({classNames:a,styles:u,props:i}),[O,k]=reactExports.useState(0),[A,{open:D,close:R}]=useDisclosure(!1),T=P=>{var M;(M=P.dataTransfer)!=null&&M.types.includes("Files")&&(k(I=>I+1),D())},j=()=>{k(P=>P-1)};return reactExports.useEffect(()=>{O===0&&R()},[O]),reactExports.useEffect(()=>{if(p)return document.addEventListener("dragenter",T,!1),document.addEventListener("dragleave",j,!1),()=>{document.removeEventListener("dragenter",T,!1),document.removeEventListener("dragleave",j,!1)}},[p]),jsxRuntimeExports.jsx(OptionalPortal,{...y,withinPortal:x,children:jsxRuntimeExports.jsx(Box,{...E("fullScreen",{style:{opacity:A?1:0,pointerEvents:A?"all":"none",zIndex:b}}),ref:t,children:jsxRuntimeExports.jsx(Dropzone$1,{...S,classNames:w,styles:_,unstyled:f,className:classes.dropzone,onDrop:P=>{m==null||m(P),R(),k(0)},onReject:P=>{g==null||g(P),R(),k(0)}})})})});DropzoneFullScreen.classes=classes;DropzoneFullScreen.displayName="@mantine/dropzone/DropzoneFullScreen";const MIME_TYPES={pdf:"application/pdf"};Dropzone$1.FullScreen=DropzoneFullScreen;const Dropzone=Dropzone$1,PictureAsPdfIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M20 2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m-8.5 7.5c0 .83-.67 1.5-1.5 1.5H9v2H7.5V7H10c.83 0 1.5.67 1.5 1.5zm5 2c0 .83-.67 1.5-1.5 1.5h-2.5V7H15c.83 0 1.5.67 1.5 1.5zm4-3H19v1h1.5V11H19v2h-1.5V7h3zM9 9.5h1v-1H9zM4 6H2v14c0 1.1.9 2 2 2h14v-2H4zm10 5.5h1v-3h-1z"}));function commonjsRequire(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var pdf={exports:{}};const __viteBrowserExternal={},__viteBrowserExternal$1=Object.freeze(Object.defineProperty({__proto__:null,default:__viteBrowserExternal},Symbol.toStringTag,{value:"Module"})),require$$5=getAugmentedNamespace(__viteBrowserExternal$1);var hasRequiredPdf;function requirePdf(){return hasRequiredPdf||(hasRequiredPdf=1,function(module,exports){(function(t,i){module.exports=t.pdfjsLib=i()})(globalThis,()=>(()=>{var __webpack_modules__=[,(e,t)=>{var ot;Object.defineProperty(t,"__esModule",{value:!0}),t.VerbosityLevel=t.Util=t.UnknownErrorException=t.UnexpectedResponseException=t.TextRenderingMode=t.RenderingIntentFlag=t.PromiseCapability=t.PermissionFlag=t.PasswordResponses=t.PasswordException=t.PageActionEventType=t.OPS=t.MissingPDFException=t.MAX_IMAGE_SIZE_TO_CACHE=t.LINE_FACTOR=t.LINE_DESCENT_FACTOR=t.InvalidPDFException=t.ImageKind=t.IDENTITY_MATRIX=t.FormatError=t.FeatureTest=t.FONT_IDENTITY_MATRIX=t.DocumentActionEventType=t.CMapCompressionType=t.BaseException=t.BASELINE_FACTOR=t.AnnotationType=t.AnnotationReplyType=t.AnnotationPrefix=t.AnnotationMode=t.AnnotationFlag=t.AnnotationFieldFlag=t.AnnotationEditorType=t.AnnotationEditorPrefix=t.AnnotationEditorParamsType=t.AnnotationBorderStyleType=t.AnnotationActionEventType=t.AbortException=void 0,t.assert=U,t.bytesToString=we,t.createValidAbsoluteUrl=X,t.getModificationDate=Le,t.getUuid=Je,t.getVerbosityLevel=Q,t.info=B,t.isArrayBuffer=ie,t.isArrayEqual=Fe,t.isNodeJS=void 0,t.normalizeUnicode=We,t.objectFromMap=Pe,t.objectSize=je,t.setVerbosityLevel=ne,t.shadow=z,t.string32=De,t.stringToBytes=Ee,t.stringToPDFString=ve,t.stringToUTF8String=Te,t.unreachable=Y,t.utf8StringToString=oe,t.warn=H;const i=typeof process=="object"&&process+""=="[object process]"&&!process.versions.nw&&!(process.versions.electron&&process.type&&process.type!=="browser");t.isNodeJS=i;const a=[1,0,0,1,0,0];t.IDENTITY_MATRIX=a;const o=[.001,0,0,.001,0,0];t.FONT_IDENTITY_MATRIX=o;const l=1e7;t.MAX_IMAGE_SIZE_TO_CACHE=l;const u=1.35;t.LINE_FACTOR=u;const f=.35;t.LINE_DESCENT_FACTOR=f;const h=f/u;t.BASELINE_FACTOR=h;const p={ANY:1,DISPLAY:2,PRINT:4,SAVE:8,ANNOTATIONS_FORMS:16,ANNOTATIONS_STORAGE:32,ANNOTATIONS_DISABLE:64,OPLIST:256};t.RenderingIntentFlag=p;const m={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3};t.AnnotationMode=m;const g="pdfjs_internal_editor_";t.AnnotationEditorPrefix=g;const b={DISABLE:-1,NONE:0,FREETEXT:3,STAMP:13,INK:15};t.AnnotationEditorType=b;const x={RESIZE:1,CREATE:2,FREETEXT_SIZE:11,FREETEXT_COLOR:12,FREETEXT_OPACITY:13,INK_COLOR:21,INK_THICKNESS:22,INK_OPACITY:23};t.AnnotationEditorParamsType=x;const y={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048};t.PermissionFlag=y;const S={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_ADD_TO_PATH:4,STROKE_ADD_TO_PATH:5,FILL_STROKE_ADD_TO_PATH:6,ADD_TO_PATH:7,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4};t.TextRenderingMode=S;const E={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3};t.ImageKind=E;const w={TEXT:1,LINK:2,FREETEXT:3,LINE:4,SQUARE:5,CIRCLE:6,POLYGON:7,POLYLINE:8,HIGHLIGHT:9,UNDERLINE:10,SQUIGGLY:11,STRIKEOUT:12,STAMP:13,CARET:14,INK:15,POPUP:16,FILEATTACHMENT:17,SOUND:18,MOVIE:19,WIDGET:20,SCREEN:21,PRINTERMARK:22,TRAPNET:23,WATERMARK:24,THREED:25,REDACT:26};t.AnnotationType=w;const _={GROUP:"Group",REPLY:"R"};t.AnnotationReplyType=_;const O={INVISIBLE:1,HIDDEN:2,PRINT:4,NOZOOM:8,NOROTATE:16,NOVIEW:32,READONLY:64,LOCKED:128,TOGGLENOVIEW:256,LOCKEDCONTENTS:512};t.AnnotationFlag=O;const k={READONLY:1,REQUIRED:2,NOEXPORT:4,MULTILINE:4096,PASSWORD:8192,NOTOGGLETOOFF:16384,RADIO:32768,PUSHBUTTON:65536,COMBO:131072,EDIT:262144,SORT:524288,FILESELECT:1048576,MULTISELECT:2097152,DONOTSPELLCHECK:4194304,DONOTSCROLL:8388608,COMB:16777216,RICHTEXT:33554432,RADIOSINUNISON:33554432,COMMITONSELCHANGE:67108864};t.AnnotationFieldFlag=k;const A={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5};t.AnnotationBorderStyleType=A;const D={E:"Mouse Enter",X:"Mouse Exit",D:"Mouse Down",U:"Mouse Up",Fo:"Focus",Bl:"Blur",PO:"PageOpen",PC:"PageClose",PV:"PageVisible",PI:"PageInvisible",K:"Keystroke",F:"Format",V:"Validate",C:"Calculate"};t.AnnotationActionEventType=D;const R={WC:"WillClose",WS:"WillSave",DS:"DidSave",WP:"WillPrint",DP:"DidPrint"};t.DocumentActionEventType=R;const T={O:"PageOpen",C:"PageClose"};t.PageActionEventType=T;const j={ERRORS:0,WARNINGS:1,INFOS:5};t.VerbosityLevel=j;const P={NONE:0,BINARY:1};t.CMapCompressionType=P;const M={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotation:80,endAnnotation:81,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91};t.OPS=M;const I={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};t.PasswordResponses=I;let G=j.WARNINGS;function ne(Oe){Number.isInteger(Oe)&&(G=Oe)}function Q(){return G}function B(Oe){G>=j.INFOS&&console.log(`Info: ${Oe}`)}function H(Oe){G>=j.WARNINGS&&console.log(`Warning: ${Oe}`)}function Y(Oe){throw new Error(Oe)}function U(Oe,ye){Oe||Y(ye)}function F(Oe){switch(Oe==null?void 0:Oe.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}function X(Oe,ye=null,xe=null){if(!Oe)return null;try{if(xe&&typeof Oe=="string"){if(xe.addDefaultProtocol&&Oe.startsWith("www.")){const pt=Oe.match(/\./g);(pt==null?void 0:pt.length)>=2&&(Oe=`http://${Oe}`)}if(xe.tryConvertEncoding)try{Oe=Te(Oe)}catch{}}const Qe=ye?new URL(Oe,ye):new URL(Oe);if(F(Qe))return Qe}catch{}return null}function z(Oe,ye,xe,Qe=!1){return Object.defineProperty(Oe,ye,{value:xe,enumerable:!Qe,configurable:!0,writable:!1}),xe}const L=function(){function ye(xe,Qe){this.constructor===ye&&Y("Cannot initialize BaseException."),this.message=xe,this.name=Qe}return ye.prototype=new Error,ye.constructor=ye,ye}();t.BaseException=L;class $ extends L{constructor(ye,xe){super(ye,"PasswordException"),this.code=xe}}t.PasswordException=$;class V extends L{constructor(ye,xe){super(ye,"UnknownErrorException"),this.details=xe}}t.UnknownErrorException=V;class K extends L{constructor(ye){super(ye,"InvalidPDFException")}}t.InvalidPDFException=K;class te extends L{constructor(ye){super(ye,"MissingPDFException")}}t.MissingPDFException=te;class J extends L{constructor(ye,xe){super(ye,"UnexpectedResponseException"),this.status=xe}}t.UnexpectedResponseException=J;class ce extends L{constructor(ye){super(ye,"FormatError")}}t.FormatError=ce;class ue extends L{constructor(ye){super(ye,"AbortException")}}t.AbortException=ue;function we(Oe){(typeof Oe!="object"||(Oe==null?void 0:Oe.length)===void 0)&&Y("Invalid argument for bytesToString");const ye=Oe.length,xe=8192;if(ye<xe)return String.fromCharCode.apply(null,Oe);const Qe=[];for(let pt=0;pt<ye;pt+=xe){const ht=Math.min(pt+xe,ye),le=Oe.subarray(pt,ht);Qe.push(String.fromCharCode.apply(null,le))}return Qe.join("")}function Ee(Oe){typeof Oe!="string"&&Y("Invalid argument for stringToBytes");const ye=Oe.length,xe=new Uint8Array(ye);for(let Qe=0;Qe<ye;++Qe)xe[Qe]=Oe.charCodeAt(Qe)&255;return xe}function De(Oe){return String.fromCharCode(Oe>>24&255,Oe>>16&255,Oe>>8&255,Oe&255)}function je(Oe){return Object.keys(Oe).length}function Pe(Oe){const ye=Object.create(null);for(const[xe,Qe]of Oe)ye[xe]=Qe;return ye}function ge(){const Oe=new Uint8Array(4);return Oe[0]=1,new Uint32Array(Oe.buffer,0,1)[0]===1}function se(){try{return new Function(""),!0}catch{return!1}}class W{static get isLittleEndian(){return z(this,"isLittleEndian",ge())}static get isEvalSupported(){return z(this,"isEvalSupported",se())}static get isOffscreenCanvasSupported(){return z(this,"isOffscreenCanvasSupported",typeof OffscreenCanvas<"u")}static get platform(){return typeof navigator>"u"?z(this,"platform",{isWin:!1,isMac:!1}):z(this,"platform",{isWin:navigator.platform.includes("Win"),isMac:navigator.platform.includes("Mac")})}static get isCSSRoundSupported(){var ye,xe;return z(this,"isCSSRoundSupported",(xe=(ye=globalThis.CSS)==null?void 0:ye.supports)==null?void 0:xe.call(ye,"width: round(1.5px, 1px)"))}}t.FeatureTest=W;const ee=[...Array(256).keys()].map(Oe=>Oe.toString(16).padStart(2,"0"));class de{static makeHexColor(ye,xe,Qe){return`#${ee[ye]}${ee[xe]}${ee[Qe]}`}static scaleMinMax(ye,xe){let Qe;ye[0]?(ye[0]<0&&(Qe=xe[0],xe[0]=xe[1],xe[1]=Qe),xe[0]*=ye[0],xe[1]*=ye[0],ye[3]<0&&(Qe=xe[2],xe[2]=xe[3],xe[3]=Qe),xe[2]*=ye[3],xe[3]*=ye[3]):(Qe=xe[0],xe[0]=xe[2],xe[2]=Qe,Qe=xe[1],xe[1]=xe[3],xe[3]=Qe,ye[1]<0&&(Qe=xe[2],xe[2]=xe[3],xe[3]=Qe),xe[2]*=ye[1],xe[3]*=ye[1],ye[2]<0&&(Qe=xe[0],xe[0]=xe[1],xe[1]=Qe),xe[0]*=ye[2],xe[1]*=ye[2]),xe[0]+=ye[4],xe[1]+=ye[4],xe[2]+=ye[5],xe[3]+=ye[5]}static transform(ye,xe){return[ye[0]*xe[0]+ye[2]*xe[1],ye[1]*xe[0]+ye[3]*xe[1],ye[0]*xe[2]+ye[2]*xe[3],ye[1]*xe[2]+ye[3]*xe[3],ye[0]*xe[4]+ye[2]*xe[5]+ye[4],ye[1]*xe[4]+ye[3]*xe[5]+ye[5]]}static applyTransform(ye,xe){const Qe=ye[0]*xe[0]+ye[1]*xe[2]+xe[4],pt=ye[0]*xe[1]+ye[1]*xe[3]+xe[5];return[Qe,pt]}static applyInverseTransform(ye,xe){const Qe=xe[0]*xe[3]-xe[1]*xe[2],pt=(ye[0]*xe[3]-ye[1]*xe[2]+xe[2]*xe[5]-xe[4]*xe[3])/Qe,ht=(-ye[0]*xe[1]+ye[1]*xe[0]+xe[4]*xe[1]-xe[5]*xe[0])/Qe;return[pt,ht]}static getAxialAlignedBoundingBox(ye,xe){const Qe=this.applyTransform(ye,xe),pt=this.applyTransform(ye.slice(2,4),xe),ht=this.applyTransform([ye[0],ye[3]],xe),le=this.applyTransform([ye[2],ye[1]],xe);return[Math.min(Qe[0],pt[0],ht[0],le[0]),Math.min(Qe[1],pt[1],ht[1],le[1]),Math.max(Qe[0],pt[0],ht[0],le[0]),Math.max(Qe[1],pt[1],ht[1],le[1])]}static inverseTransform(ye){const xe=ye[0]*ye[3]-ye[1]*ye[2];return[ye[3]/xe,-ye[1]/xe,-ye[2]/xe,ye[0]/xe,(ye[2]*ye[5]-ye[4]*ye[3])/xe,(ye[4]*ye[1]-ye[5]*ye[0])/xe]}static singularValueDecompose2dScale(ye){const xe=[ye[0],ye[2],ye[1],ye[3]],Qe=ye[0]*xe[0]+ye[1]*xe[2],pt=ye[0]*xe[1]+ye[1]*xe[3],ht=ye[2]*xe[0]+ye[3]*xe[2],le=ye[2]*xe[1]+ye[3]*xe[3],Ne=(Qe+le)/2,Ge=Math.sqrt((Qe+le)**2-4*(Qe*le-ht*pt))/2,nt=Ne+Ge||1,at=Ne-Ge||1;return[Math.sqrt(nt),Math.sqrt(at)]}static normalizeRect(ye){const xe=ye.slice(0);return ye[0]>ye[2]&&(xe[0]=ye[2],xe[2]=ye[0]),ye[1]>ye[3]&&(xe[1]=ye[3],xe[3]=ye[1]),xe}static intersect(ye,xe){const Qe=Math.max(Math.min(ye[0],ye[2]),Math.min(xe[0],xe[2])),pt=Math.min(Math.max(ye[0],ye[2]),Math.max(xe[0],xe[2]));if(Qe>pt)return null;const ht=Math.max(Math.min(ye[1],ye[3]),Math.min(xe[1],xe[3])),le=Math.min(Math.max(ye[1],ye[3]),Math.max(xe[1],xe[3]));return ht>le?null:[Qe,ht,pt,le]}static bezierBoundingBox(ye,xe,Qe,pt,ht,le,Ne,Ge){const nt=[],at=[[],[]];let Ke,ae,re,he,Re,_e,Ie,Be;for(let ut=0;ut<2;++ut){if(ut===0?(ae=6*ye-12*Qe+6*ht,Ke=-3*ye+9*Qe-9*ht+3*Ne,re=3*Qe-3*ye):(ae=6*xe-12*pt+6*le,Ke=-3*xe+9*pt-9*le+3*Ge,re=3*pt-3*xe),Math.abs(Ke)<1e-12){if(Math.abs(ae)<1e-12)continue;he=-re/ae,0<he&&he<1&&nt.push(he);continue}Ie=ae*ae-4*re*Ke,Be=Math.sqrt(Ie),!(Ie<0)&&(Re=(-ae+Be)/(2*Ke),0<Re&&Re<1&&nt.push(Re),_e=(-ae-Be)/(2*Ke),0<_e&&_e<1&&nt.push(_e))}let et=nt.length,tt;const Xe=et;for(;et--;)he=nt[et],tt=1-he,at[0][et]=tt*tt*tt*ye+3*tt*tt*he*Qe+3*tt*he*he*ht+he*he*he*Ne,at[1][et]=tt*tt*tt*xe+3*tt*tt*he*pt+3*tt*he*he*le+he*he*he*Ge;return at[0][Xe]=ye,at[1][Xe]=xe,at[0][Xe+1]=Ne,at[1][Xe+1]=Ge,at[0].length=at[1].length=Xe+2,[Math.min(...at[0]),Math.min(...at[1]),Math.max(...at[0]),Math.max(...at[1])]}}t.Util=de;const pe=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,728,711,710,729,733,731,730,732,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8226,8224,8225,8230,8212,8211,402,8260,8249,8250,8722,8240,8222,8220,8221,8216,8217,8218,8482,64257,64258,321,338,352,376,381,305,322,339,353,382,0,8364];function ve(Oe){if(Oe[0]>="ï"){let xe;if(Oe[0]==="þ"&&Oe[1]==="ÿ"?xe="utf-16be":Oe[0]==="ÿ"&&Oe[1]==="þ"?xe="utf-16le":Oe[0]==="ï"&&Oe[1]==="»"&&Oe[2]==="¿"&&(xe="utf-8"),xe)try{const Qe=new TextDecoder(xe,{fatal:!0}),pt=Ee(Oe);return Qe.decode(pt)}catch(Qe){H(`stringToPDFString: "${Qe}".`)}}const ye=[];for(let xe=0,Qe=Oe.length;xe<Qe;xe++){const pt=pe[Oe.charCodeAt(xe)];ye.push(pt?String.fromCharCode(pt):Oe.charAt(xe))}return ye.join("")}function Te(Oe){return decodeURIComponent(escape(Oe))}function oe(Oe){return unescape(encodeURIComponent(Oe))}function ie(Oe){return typeof Oe=="object"&&(Oe==null?void 0:Oe.byteLength)!==void 0}function Fe(Oe,ye){if(Oe.length!==ye.length)return!1;for(let xe=0,Qe=Oe.length;xe<Qe;xe++)if(Oe[xe]!==ye[xe])return!1;return!0}function Le(Oe=new Date){return[Oe.getUTCFullYear().toString(),(Oe.getUTCMonth()+1).toString().padStart(2,"0"),Oe.getUTCDate().toString().padStart(2,"0"),Oe.getUTCHours().toString().padStart(2,"0"),Oe.getUTCMinutes().toString().padStart(2,"0"),Oe.getUTCSeconds().toString().padStart(2,"0")].join("")}class Ye{constructor(){Se(this,ot,!1);this.promise=new Promise((ye,xe)=>{this.resolve=Qe=>{Ce(this,ot,!0),ye(Qe)},this.reject=Qe=>{Ce(this,ot,!0),xe(Qe)}})}get settled(){return N(this,ot)}}ot=new WeakMap,t.PromiseCapability=Ye;let qe=null,it=null;function We(Oe){return qe||(qe=/([\u00a0\u00b5\u037e\u0eb3\u2000-\u200a\u202f\u2126\ufb00-\ufb04\ufb06\ufb20-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufba1\ufba4-\ufba9\ufbae-\ufbb1\ufbd3-\ufbdc\ufbde-\ufbe7\ufbea-\ufbf8\ufbfc-\ufbfd\ufc00-\ufc5d\ufc64-\ufcf1\ufcf5-\ufd3d\ufd88\ufdf4\ufdfa-\ufdfb\ufe71\ufe77\ufe79\ufe7b\ufe7d]+)|(\ufb05+)/gu,it=new Map([["ſt","ſt"]])),Oe.replaceAll(qe,(ye,xe,Qe)=>xe?xe.normalize("NFKC"):it.get(Qe))}function Je(){if(typeof crypto<"u"&&typeof(crypto==null?void 0:crypto.randomUUID)=="function")return crypto.randomUUID();const Oe=new Uint8Array(32);if(typeof crypto<"u"&&typeof(crypto==null?void 0:crypto.getRandomValues)=="function")crypto.getRandomValues(Oe);else for(let ye=0;ye<32;ye++)Oe[ye]=Math.floor(Math.random()*255);return we(Oe)}const ct="pdfjs_internal_id_";t.AnnotationPrefix=ct},(__unused_webpack_module,exports,__w_pdfjs_require__)=>{var e,i,a,o,mi,Ds,f,h,p,m,g,b,x,y,S,Ms,w,_,ec,k,A;Object.defineProperty(exports,"__esModule",{value:!0}),exports.RenderTask=exports.PDFWorkerUtil=exports.PDFWorker=exports.PDFPageProxy=exports.PDFDocumentProxy=exports.PDFDocumentLoadingTask=exports.PDFDataRangeTransport=exports.LoopbackPort=exports.DefaultStandardFontDataFactory=exports.DefaultFilterFactory=exports.DefaultCanvasFactory=exports.DefaultCMapReaderFactory=void 0,Object.defineProperty(exports,"SVGGraphics",{enumerable:!0,get:function(){return _displaySvg.SVGGraphics}}),exports.build=void 0,exports.getDocument=getDocument,exports.version=void 0;var _util=__w_pdfjs_require__(1),_annotation_storage=__w_pdfjs_require__(3),_display_utils=__w_pdfjs_require__(6),_font_loader=__w_pdfjs_require__(9),_displayNode_utils=__w_pdfjs_require__(10),_canvas=__w_pdfjs_require__(11),_worker_options=__w_pdfjs_require__(14),_message_handler=__w_pdfjs_require__(15),_metadata=__w_pdfjs_require__(16),_optional_content_config=__w_pdfjs_require__(17),_transport_stream=__w_pdfjs_require__(18),_displayFetch_stream=__w_pdfjs_require__(19),_displayNetwork=__w_pdfjs_require__(22),_displayNode_stream=__w_pdfjs_require__(23),_displaySvg=__w_pdfjs_require__(24),_xfa_text=__w_pdfjs_require__(25);const DEFAULT_RANGE_CHUNK_SIZE=65536,RENDERING_CANCELLED_TIMEOUT=100,DELAYED_CLEANUP_TIMEOUT=5e3,DefaultCanvasFactory=_util.isNodeJS?_displayNode_utils.NodeCanvasFactory:_display_utils.DOMCanvasFactory;exports.DefaultCanvasFactory=DefaultCanvasFactory;const DefaultCMapReaderFactory=_util.isNodeJS?_displayNode_utils.NodeCMapReaderFactory:_display_utils.DOMCMapReaderFactory;exports.DefaultCMapReaderFactory=DefaultCMapReaderFactory;const DefaultFilterFactory=_util.isNodeJS?_displayNode_utils.NodeFilterFactory:_display_utils.DOMFilterFactory;exports.DefaultFilterFactory=DefaultFilterFactory;const DefaultStandardFontDataFactory=_util.isNodeJS?_displayNode_utils.NodeStandardFontDataFactory:_display_utils.DOMStandardFontDataFactory;exports.DefaultStandardFontDataFactory=DefaultStandardFontDataFactory;function getDocument(R){if(typeof R=="string"||R instanceof URL?R={url:R}:(0,_util.isArrayBuffer)(R)&&(R={data:R}),typeof R!="object")throw new Error("Invalid parameter in getDocument, need parameter object.");if(!R.url&&!R.data&&!R.range)throw new Error("Invalid parameter object: need either .data, .range or .url");const T=new PDFDocumentLoadingTask,{docId:j}=T,P=R.url?getUrlProp(R.url):null,M=R.data?getDataProp(R.data):null,I=R.httpHeaders||null,G=R.withCredentials===!0,ne=R.password??null,Q=R.range instanceof PDFDataRangeTransport?R.range:null,B=Number.isInteger(R.rangeChunkSize)&&R.rangeChunkSize>0?R.rangeChunkSize:DEFAULT_RANGE_CHUNK_SIZE;let H=R.worker instanceof PDFWorker?R.worker:null;const Y=R.verbosity,U=typeof R.docBaseUrl=="string"&&!(0,_display_utils.isDataScheme)(R.docBaseUrl)?R.docBaseUrl:null,F=typeof R.cMapUrl=="string"?R.cMapUrl:null,X=R.cMapPacked!==!1,z=R.CMapReaderFactory||DefaultCMapReaderFactory,L=typeof R.standardFontDataUrl=="string"?R.standardFontDataUrl:null,$=R.StandardFontDataFactory||DefaultStandardFontDataFactory,V=R.stopAtErrors!==!0,K=Number.isInteger(R.maxImageSize)&&R.maxImageSize>-1?R.maxImageSize:-1,te=R.isEvalSupported!==!1,J=typeof R.isOffscreenCanvasSupported=="boolean"?R.isOffscreenCanvasSupported:!_util.isNodeJS,ce=Number.isInteger(R.canvasMaxAreaInBytes)?R.canvasMaxAreaInBytes:-1,ue=typeof R.disableFontFace=="boolean"?R.disableFontFace:_util.isNodeJS,we=R.fontExtraProperties===!0,Ee=R.enableXfa===!0,De=R.ownerDocument||globalThis.document,je=R.disableRange===!0,Pe=R.disableStream===!0,ge=R.disableAutoFetch===!0,se=R.pdfBug===!0,W=Q?Q.length:R.length??NaN,ee=typeof R.useSystemFonts=="boolean"?R.useSystemFonts:!_util.isNodeJS&&!ue,de=typeof R.useWorkerFetch=="boolean"?R.useWorkerFetch:z===_display_utils.DOMCMapReaderFactory&&$===_display_utils.DOMStandardFontDataFactory&&F&&L&&(0,_display_utils.isValidFetchUrl)(F,document.baseURI)&&(0,_display_utils.isValidFetchUrl)(L,document.baseURI),pe=R.canvasFactory||new DefaultCanvasFactory({ownerDocument:De}),ve=R.filterFactory||new DefaultFilterFactory({docId:j,ownerDocument:De}),Te=null;(0,_util.setVerbosityLevel)(Y);const oe={canvasFactory:pe,filterFactory:ve};if(de||(oe.cMapReaderFactory=new z({baseUrl:F,isCompressed:X}),oe.standardFontDataFactory=new $({baseUrl:L})),!H){const Le={verbosity:Y,port:_worker_options.GlobalWorkerOptions.workerPort};H=Le.port?PDFWorker.fromPort(Le):new PDFWorker(Le),T._worker=H}const ie={docId:j,apiVersion:"3.11.174",data:M,password:ne,disableAutoFetch:ge,rangeChunkSize:B,length:W,docBaseUrl:U,enableXfa:Ee,evaluatorOptions:{maxImageSize:K,disableFontFace:ue,ignoreErrors:V,isEvalSupported:te,isOffscreenCanvasSupported:J,canvasMaxAreaInBytes:ce,fontExtraProperties:we,useSystemFonts:ee,cMapUrl:de?F:null,standardFontDataUrl:de?L:null}},Fe={ignoreErrors:V,isEvalSupported:te,disableFontFace:ue,fontExtraProperties:we,enableXfa:Ee,ownerDocument:De,disableAutoFetch:ge,pdfBug:se,styleElement:Te};return H.promise.then(function(){if(T.destroyed)throw new Error("Loading aborted");const Le=_fetchDocument(H,ie),Ye=new Promise(function(qe){let it;Q?it=new _transport_stream.PDFDataTransportStream({length:W,initialData:Q.initialData,progressiveDone:Q.progressiveDone,contentDispositionFilename:Q.contentDispositionFilename,disableRange:je,disableStream:Pe},Q):M||(it=(Je=>_util.isNodeJS?new _displayNode_stream.PDFNodeStream(Je):(0,_display_utils.isValidFetchUrl)(Je.url)?new _displayFetch_stream.PDFFetchStream(Je):new _displayNetwork.PDFNetworkStream(Je))({url:P,length:W,httpHeaders:I,withCredentials:G,rangeChunkSize:B,disableRange:je,disableStream:Pe})),qe(it)});return Promise.all([Le,Ye]).then(function([qe,it]){if(T.destroyed)throw new Error("Loading aborted");const We=new _message_handler.MessageHandler(j,qe,H.port),Je=new WorkerTransport(We,T,it,Fe,oe);T._transport=Je,We.send("Ready",null)})}).catch(T._capability.reject),T}async function _fetchDocument(R,T){if(R.destroyed)throw new Error("Worker was destroyed");const j=await R.messageHandler.sendWithPromise("GetDocRequest",T,T.data?[T.data.buffer]:null);if(R.destroyed)throw new Error("Worker was destroyed");return j}function getUrlProp(R){if(R instanceof URL)return R.href;try{return new URL(R,window.location).href}catch{if(_util.isNodeJS&&typeof R=="string")return R}throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.")}function getDataProp(R){if(_util.isNodeJS&&typeof Buffer<"u"&&R instanceof Buffer)throw new Error("Please provide binary data as `Uint8Array`, rather than `Buffer`.");if(R instanceof Uint8Array&&R.byteLength===R.buffer.byteLength)return R;if(typeof R=="string")return(0,_util.stringToBytes)(R);if(typeof R=="object"&&!isNaN(R==null?void 0:R.length)||(0,_util.isArrayBuffer)(R))return new Uint8Array(R);throw new Error("Invalid PDF binary data: either TypedArray, string, or array-like object is expected in the data property.")}const t=class t{constructor(){this._capability=new _util.PromiseCapability,this._transport=null,this._worker=null,this.docId=`d${fa(t,e)._++}`,this.destroyed=!1,this.onPassword=null,this.onProgress=null}get promise(){return this._capability.promise}async destroy(){var T,j,P;this.destroyed=!0;try{(T=this._worker)!=null&&T.port&&(this._worker._pendingDestroy=!0),await((j=this._transport)==null?void 0:j.destroy())}catch(M){throw(P=this._worker)!=null&&P.port&&delete this._worker._pendingDestroy,M}this._transport=null,this._worker&&(this._worker.destroy(),this._worker=null)}};e=new WeakMap,Se(t,e,0);let PDFDocumentLoadingTask=t;exports.PDFDocumentLoadingTask=PDFDocumentLoadingTask;class PDFDataRangeTransport{constructor(T,j,P=!1,M=null){this.length=T,this.initialData=j,this.progressiveDone=P,this.contentDispositionFilename=M,this._rangeListeners=[],this._progressListeners=[],this._progressiveReadListeners=[],this._progressiveDoneListeners=[],this._readyCapability=new _util.PromiseCapability}addRangeListener(T){this._rangeListeners.push(T)}addProgressListener(T){this._progressListeners.push(T)}addProgressiveReadListener(T){this._progressiveReadListeners.push(T)}addProgressiveDoneListener(T){this._progressiveDoneListeners.push(T)}onDataRange(T,j){for(const P of this._rangeListeners)P(T,j)}onDataProgress(T,j){this._readyCapability.promise.then(()=>{for(const P of this._progressListeners)P(T,j)})}onDataProgressiveRead(T){this._readyCapability.promise.then(()=>{for(const j of this._progressiveReadListeners)j(T)})}onDataProgressiveDone(){this._readyCapability.promise.then(()=>{for(const T of this._progressiveDoneListeners)T()})}transportReady(){this._readyCapability.resolve()}requestDataRange(T,j){(0,_util.unreachable)("Abstract method PDFDataRangeTransport.requestDataRange")}abort(){}}exports.PDFDataRangeTransport=PDFDataRangeTransport;class PDFDocumentProxy{constructor(T,j){this._pdfInfo=T,this._transport=j,Object.defineProperty(this,"getJavaScript",{value:()=>((0,_display_utils.deprecated)("`PDFDocumentProxy.getJavaScript`, please use `PDFDocumentProxy.getJSActions` instead."),this.getJSActions().then(P=>{if(!P)return P;const M=[];for(const I in P)M.push(...P[I]);return M}))})}get annotationStorage(){return this._transport.annotationStorage}get filterFactory(){return this._transport.filterFactory}get numPages(){return this._pdfInfo.numPages}get fingerprints(){return this._pdfInfo.fingerprints}get isPureXfa(){return(0,_util.shadow)(this,"isPureXfa",!!this._transport._htmlForXfa)}get allXfaHtml(){return this._transport._htmlForXfa}getPage(T){return this._transport.getPage(T)}getPageIndex(T){return this._transport.getPageIndex(T)}getDestinations(){return this._transport.getDestinations()}getDestination(T){return this._transport.getDestination(T)}getPageLabels(){return this._transport.getPageLabels()}getPageLayout(){return this._transport.getPageLayout()}getPageMode(){return this._transport.getPageMode()}getViewerPreferences(){return this._transport.getViewerPreferences()}getOpenAction(){return this._transport.getOpenAction()}getAttachments(){return this._transport.getAttachments()}getJSActions(){return this._transport.getDocJSActions()}getOutline(){return this._transport.getOutline()}getOptionalContentConfig(){return this._transport.getOptionalContentConfig()}getPermissions(){return this._transport.getPermissions()}getMetadata(){return this._transport.getMetadata()}getMarkInfo(){return this._transport.getMarkInfo()}getData(){return this._transport.getData()}saveDocument(){return this._transport.saveDocument()}getDownloadInfo(){return this._transport.downloadInfoCapability.promise}cleanup(T=!1){return this._transport.startCleanup(T||this.isPureXfa)}destroy(){return this.loadingTask.destroy()}get loadingParams(){return this._transport.loadingParams}get loadingTask(){return this._transport.loadingTask}getFieldObjects(){return this._transport.getFieldObjects()}hasJSActions(){return this._transport.hasJSActions()}getCalculationOrderIds(){return this._transport.getCalculationOrderIds()}}exports.PDFDocumentProxy=PDFDocumentProxy;class PDFPageProxy{constructor(T,j,P,M=!1){Se(this,o);Se(this,i,null);Se(this,a,!1);this._pageIndex=T,this._pageInfo=j,this._transport=P,this._stats=M?new _display_utils.StatTimer:null,this._pdfBug=M,this.commonObjs=P.commonObjs,this.objs=new PDFObjects,this._maybeCleanupAfterRender=!1,this._intentStates=new Map,this.destroyed=!1}get pageNumber(){return this._pageIndex+1}get rotate(){return this._pageInfo.rotate}get ref(){return this._pageInfo.ref}get userUnit(){return this._pageInfo.userUnit}get view(){return this._pageInfo.view}getViewport({scale:T,rotation:j=this.rotate,offsetX:P=0,offsetY:M=0,dontFlip:I=!1}={}){return new _display_utils.PageViewport({viewBox:this.view,scale:T,rotation:j,offsetX:P,offsetY:M,dontFlip:I})}getAnnotations({intent:T="display"}={}){const j=this._transport.getRenderingIntent(T);return this._transport.getAnnotations(this._pageIndex,j.renderingIntent)}getJSActions(){return this._transport.getPageJSActions(this._pageIndex)}get filterFactory(){return this._transport.filterFactory}get isPureXfa(){return(0,_util.shadow)(this,"isPureXfa",!!this._transport._htmlForXfa)}async getXfa(){var T;return((T=this._transport._htmlForXfa)==null?void 0:T.children[this._pageIndex])||null}render({canvasContext:T,viewport:j,intent:P="display",annotationMode:M=_util.AnnotationMode.ENABLE,transform:I=null,background:G=null,optionalContentConfigPromise:ne=null,annotationCanvasMap:Q=null,pageColors:B=null,printAnnotationStorage:H=null}){var $,V;($=this._stats)==null||$.time("Overall");const Y=this._transport.getRenderingIntent(P,M,H);Ce(this,a,!1),me(this,o,Ds).call(this),ne||(ne=this._transport.getOptionalContentConfig());let U=this._intentStates.get(Y.cacheKey);U||(U=Object.create(null),this._intentStates.set(Y.cacheKey,U)),U.streamReaderCancelTimeout&&(clearTimeout(U.streamReaderCancelTimeout),U.streamReaderCancelTimeout=null);const F=!!(Y.renderingIntent&_util.RenderingIntentFlag.PRINT);U.displayReadyCapability||(U.displayReadyCapability=new _util.PromiseCapability,U.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},(V=this._stats)==null||V.time("Page Request"),this._pumpOperatorList(Y));const X=K=>{var te,J;U.renderTasks.delete(z),(this._maybeCleanupAfterRender||F)&&Ce(this,a,!0),me(this,o,mi).call(this,!F),K?(z.capability.reject(K),this._abortOperatorList({intentState:U,reason:K instanceof Error?K:new Error(K)})):z.capability.resolve(),(te=this._stats)==null||te.timeEnd("Rendering"),(J=this._stats)==null||J.timeEnd("Overall")},z=new InternalRenderTask({callback:X,params:{canvasContext:T,viewport:j,transform:I,background:G},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:Q,operatorList:U.operatorList,pageIndex:this._pageIndex,canvasFactory:this._transport.canvasFactory,filterFactory:this._transport.filterFactory,useRequestAnimationFrame:!F,pdfBug:this._pdfBug,pageColors:B});(U.renderTasks||(U.renderTasks=new Set)).add(z);const L=z.task;return Promise.all([U.displayReadyCapability.promise,ne]).then(([K,te])=>{var J;if(this.destroyed){X();return}(J=this._stats)==null||J.time("Rendering"),z.initializeGraphics({transparency:K,optionalContentConfig:te}),z.operatorListChanged()}).catch(X),L}getOperatorList({intent:T="display",annotationMode:j=_util.AnnotationMode.ENABLE,printAnnotationStorage:P=null}={}){var Q;function M(){G.operatorList.lastChunk&&(G.opListReadCapability.resolve(G.operatorList),G.renderTasks.delete(ne))}const I=this._transport.getRenderingIntent(T,j,P,!0);let G=this._intentStates.get(I.cacheKey);G||(G=Object.create(null),this._intentStates.set(I.cacheKey,G));let ne;return G.opListReadCapability||(ne=Object.create(null),ne.operatorListChanged=M,G.opListReadCapability=new _util.PromiseCapability,(G.renderTasks||(G.renderTasks=new Set)).add(ne),G.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},(Q=this._stats)==null||Q.time("Page Request"),this._pumpOperatorList(I)),G.opListReadCapability.promise}streamTextContent({includeMarkedContent:T=!1,disableNormalization:j=!1}={}){return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,includeMarkedContent:T===!0,disableNormalization:j===!0},{highWaterMark:100,size(M){return M.items.length}})}getTextContent(T={}){if(this._transport._htmlForXfa)return this.getXfa().then(P=>_xfa_text.XfaText.textContent(P));const j=this.streamTextContent(T);return new Promise(function(P,M){function I(){G.read().then(function({value:Q,done:B}){if(B){P(ne);return}Object.assign(ne.styles,Q.styles),ne.items.push(...Q.items),I()},M)}const G=j.getReader(),ne={items:[],styles:Object.create(null)};I()})}getStructTree(){return this._transport.getStructTree(this._pageIndex)}_destroy(){this.destroyed=!0;const T=[];for(const j of this._intentStates.values())if(this._abortOperatorList({intentState:j,reason:new Error("Page was destroyed."),force:!0}),!j.opListReadCapability)for(const P of j.renderTasks)T.push(P.completed),P.cancel();return this.objs.clear(),Ce(this,a,!1),me(this,o,Ds).call(this),Promise.all(T)}cleanup(T=!1){Ce(this,a,!0);const j=me(this,o,mi).call(this,!1);return T&&j&&this._stats&&(this._stats=new _display_utils.StatTimer),j}_startRenderPage(T,j){var M,I;const P=this._intentStates.get(j);P&&((M=this._stats)==null||M.timeEnd("Page Request"),(I=P.displayReadyCapability)==null||I.resolve(T))}_renderPageChunk(T,j){for(let P=0,M=T.length;P<M;P++)j.operatorList.fnArray.push(T.fnArray[P]),j.operatorList.argsArray.push(T.argsArray[P]);j.operatorList.lastChunk=T.lastChunk,j.operatorList.separateAnnots=T.separateAnnots;for(const P of j.renderTasks)P.operatorListChanged();T.lastChunk&&me(this,o,mi).call(this,!0)}_pumpOperatorList({renderingIntent:T,cacheKey:j,annotationStorageSerializable:P}){const{map:M,transfers:I}=P,ne=this._transport.messageHandler.sendWithStream("GetOperatorList",{pageIndex:this._pageIndex,intent:T,cacheKey:j,annotationStorage:M},I).getReader(),Q=this._intentStates.get(j);Q.streamReader=ne;const B=()=>{ne.read().then(({value:H,done:Y})=>{if(Y){Q.streamReader=null;return}this._transport.destroyed||(this._renderPageChunk(H,Q),B())},H=>{if(Q.streamReader=null,!this._transport.destroyed){if(Q.operatorList){Q.operatorList.lastChunk=!0;for(const Y of Q.renderTasks)Y.operatorListChanged();me(this,o,mi).call(this,!0)}if(Q.displayReadyCapability)Q.displayReadyCapability.reject(H);else if(Q.opListReadCapability)Q.opListReadCapability.reject(H);else throw H}})};B()}_abortOperatorList({intentState:T,reason:j,force:P=!1}){if(T.streamReader){if(T.streamReaderCancelTimeout&&(clearTimeout(T.streamReaderCancelTimeout),T.streamReaderCancelTimeout=null),!P){if(T.renderTasks.size>0)return;if(j instanceof _display_utils.RenderingCancelledException){let M=RENDERING_CANCELLED_TIMEOUT;j.extraDelay>0&&j.extraDelay<1e3&&(M+=j.extraDelay),T.streamReaderCancelTimeout=setTimeout(()=>{T.streamReaderCancelTimeout=null,this._abortOperatorList({intentState:T,reason:j,force:!0})},M);return}}if(T.streamReader.cancel(new _util.AbortException(j.message)).catch(()=>{}),T.streamReader=null,!this._transport.destroyed){for(const[M,I]of this._intentStates)if(I===T){this._intentStates.delete(M);break}this.cleanup()}}}get stats(){return this._stats}}i=new WeakMap,a=new WeakMap,o=new WeakSet,mi=function(T=!1){if(me(this,o,Ds).call(this),!N(this,a)||this.destroyed)return!1;if(T)return Ce(this,i,setTimeout(()=>{Ce(this,i,null),me(this,o,mi).call(this,!1)},DELAYED_CLEANUP_TIMEOUT)),!1;for(const{renderTasks:j,operatorList:P}of this._intentStates.values())if(j.size>0||!P.lastChunk)return!1;return this._intentStates.clear(),this.objs.clear(),Ce(this,a,!1),!0},Ds=function(){N(this,i)&&(clearTimeout(N(this,i)),Ce(this,i,null))},exports.PDFPageProxy=PDFPageProxy;class LoopbackPort{constructor(){Se(this,f,new Set);Se(this,h,Promise.resolve())}postMessage(T,j){const P={data:structuredClone(T,j?{transfer:j}:null)};N(this,h).then(()=>{for(const M of N(this,f))M.call(this,P)})}addEventListener(T,j){N(this,f).add(j)}removeEventListener(T,j){N(this,f).delete(j)}terminate(){N(this,f).clear()}}f=new WeakMap,h=new WeakMap,exports.LoopbackPort=LoopbackPort;const PDFWorkerUtil={isWorkerDisabled:!1,fallbackWorkerSrc:null,fakeWorkerId:0};exports.PDFWorkerUtil=PDFWorkerUtil;{if(_util.isNodeJS&&typeof commonjsRequire=="function")PDFWorkerUtil.isWorkerDisabled=!0,PDFWorkerUtil.fallbackWorkerSrc="./pdf.worker.js";else if(typeof document=="object"){const R=(p=document==null?void 0:document.currentScript)==null?void 0:p.src;R&&(PDFWorkerUtil.fallbackWorkerSrc=R.replace(/(\.(?:min\.)?js)(\?.*)?$/i,".worker$1$2"))}PDFWorkerUtil.isSameOrigin=function(R,T){let j;try{if(j=new URL(R),!j.origin||j.origin==="null")return!1}catch{return!1}const P=new URL(T,j);return j.origin===P.origin},PDFWorkerUtil.createCDNWrapper=function(R){const T=`importScripts("${R}");`;return URL.createObjectURL(new Blob([T]))}}const _PDFWorker=class _PDFWorker{constructor({name:R=null,port:T=null,verbosity:j=(0,_util.getVerbosityLevel)()}={}){var P;if(this.name=R,this.destroyed=!1,this.verbosity=j,this._readyCapability=new _util.PromiseCapability,this._port=null,this._webWorker=null,this._messageHandler=null,T){if((P=N(_PDFWorker,m))!=null&&P.has(T))throw new Error("Cannot use more than one PDFWorker per port.");(N(_PDFWorker,m)||Ce(_PDFWorker,m,new WeakMap)).set(T,this),this._initializeFromPort(T);return}this._initialize()}get promise(){return this._readyCapability.promise}get port(){return this._port}get messageHandler(){return this._messageHandler}_initializeFromPort(R){this._port=R,this._messageHandler=new _message_handler.MessageHandler("main","worker",R),this._messageHandler.on("ready",function(){}),this._readyCapability.resolve(),this._messageHandler.send("configure",{verbosity:this.verbosity})}_initialize(){if(!PDFWorkerUtil.isWorkerDisabled&&!_PDFWorker._mainThreadWorkerMessageHandler){let{workerSrc:R}=_PDFWorker;try{PDFWorkerUtil.isSameOrigin(window.location.href,R)||(R=PDFWorkerUtil.createCDNWrapper(new URL(R,window.location).href));const T=new Worker(R),j=new _message_handler.MessageHandler("main","worker",T),P=()=>{T.removeEventListener("error",M),j.destroy(),T.terminate(),this.destroyed?this._readyCapability.reject(new Error("Worker was destroyed")):this._setupFakeWorker()},M=()=>{this._webWorker||P()};T.addEventListener("error",M),j.on("test",G=>{if(T.removeEventListener("error",M),this.destroyed){P();return}G?(this._messageHandler=j,this._port=T,this._webWorker=T,this._readyCapability.resolve(),j.send("configure",{verbosity:this.verbosity})):(this._setupFakeWorker(),j.destroy(),T.terminate())}),j.on("ready",G=>{if(T.removeEventListener("error",M),this.destroyed){P();return}try{I()}catch{this._setupFakeWorker()}});const I=()=>{const G=new Uint8Array;j.send("test",G,[G.buffer])};I();return}catch{(0,_util.info)("The worker has been disabled.")}}this._setupFakeWorker()}_setupFakeWorker(){PDFWorkerUtil.isWorkerDisabled||((0,_util.warn)("Setting up fake worker."),PDFWorkerUtil.isWorkerDisabled=!0),_PDFWorker._setupFakeWorkerGlobal.then(R=>{if(this.destroyed){this._readyCapability.reject(new Error("Worker was destroyed"));return}const T=new LoopbackPort;this._port=T;const j=`fake${PDFWorkerUtil.fakeWorkerId++}`,P=new _message_handler.MessageHandler(j+"_worker",j,T);R.setup(P,T);const M=new _message_handler.MessageHandler(j,j+"_worker",T);this._messageHandler=M,this._readyCapability.resolve(),M.send("configure",{verbosity:this.verbosity})}).catch(R=>{this._readyCapability.reject(new Error(`Setting up fake worker failed: "${R.message}".`))})}destroy(){var R;this.destroyed=!0,this._webWorker&&(this._webWorker.terminate(),this._webWorker=null),(R=N(_PDFWorker,m))==null||R.delete(this._port),this._port=null,this._messageHandler&&(this._messageHandler.destroy(),this._messageHandler=null)}static fromPort(R){var j;if(!(R!=null&&R.port))throw new Error("PDFWorker.fromPort - invalid method signature.");const T=(j=N(this,m))==null?void 0:j.get(R.port);if(T){if(T._pendingDestroy)throw new Error("PDFWorker.fromPort - the worker is being destroyed.\nPlease remember to await `PDFDocumentLoadingTask.destroy()`-calls.");return T}return new _PDFWorker(R)}static get workerSrc(){if(_worker_options.GlobalWorkerOptions.workerSrc)return _worker_options.GlobalWorkerOptions.workerSrc;if(PDFWorkerUtil.fallbackWorkerSrc!==null)return _util.isNodeJS||(0,_display_utils.deprecated)('No "GlobalWorkerOptions.workerSrc" specified.'),PDFWorkerUtil.fallbackWorkerSrc;throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}static get _mainThreadWorkerMessageHandler(){var R;try{return((R=globalThis.pdfjsWorker)==null?void 0:R.WorkerMessageHandler)||null}catch{return null}}static get _setupFakeWorkerGlobal(){const loader=async()=>{const mainWorkerMessageHandler=this._mainThreadWorkerMessageHandler;if(mainWorkerMessageHandler)return mainWorkerMessageHandler;if(_util.isNodeJS&&typeof commonjsRequire=="function"){const worker=eval("require")(this.workerSrc);return worker.WorkerMessageHandler}return await(0,_display_utils.loadScript)(this.workerSrc),window.pdfjsWorker.WorkerMessageHandler};return(0,_util.shadow)(this,"_setupFakeWorkerGlobal",loader())}};m=new WeakMap,Se(_PDFWorker,m);let PDFWorker=_PDFWorker;exports.PDFWorker=PDFWorker;class WorkerTransport{constructor(T,j,P,M,I){Se(this,S);Se(this,g,new Map);Se(this,b,new Map);Se(this,x,new Map);Se(this,y,null);this.messageHandler=T,this.loadingTask=j,this.commonObjs=new PDFObjects,this.fontLoader=new _font_loader.FontLoader({ownerDocument:M.ownerDocument,styleElement:M.styleElement}),this._params=M,this.canvasFactory=I.canvasFactory,this.filterFactory=I.filterFactory,this.cMapReaderFactory=I.cMapReaderFactory,this.standardFontDataFactory=I.standardFontDataFactory,this.destroyed=!1,this.destroyCapability=null,this._networkStream=P,this._fullReader=null,this._lastProgress=null,this.downloadInfoCapability=new _util.PromiseCapability,this.setupMessageHandler()}get annotationStorage(){return(0,_util.shadow)(this,"annotationStorage",new _annotation_storage.AnnotationStorage)}getRenderingIntent(T,j=_util.AnnotationMode.ENABLE,P=null,M=!1){let I=_util.RenderingIntentFlag.DISPLAY,G=_annotation_storage.SerializableEmpty;switch(T){case"any":I=_util.RenderingIntentFlag.ANY;break;case"display":break;case"print":I=_util.RenderingIntentFlag.PRINT;break;default:(0,_util.warn)(`getRenderingIntent - invalid intent: ${T}`)}switch(j){case _util.AnnotationMode.DISABLE:I+=_util.RenderingIntentFlag.ANNOTATIONS_DISABLE;break;case _util.AnnotationMode.ENABLE:break;case _util.AnnotationMode.ENABLE_FORMS:I+=_util.RenderingIntentFlag.ANNOTATIONS_FORMS;break;case _util.AnnotationMode.ENABLE_STORAGE:I+=_util.RenderingIntentFlag.ANNOTATIONS_STORAGE,G=(I&_util.RenderingIntentFlag.PRINT&&P instanceof _annotation_storage.PrintAnnotationStorage?P:this.annotationStorage).serializable;break;default:(0,_util.warn)(`getRenderingIntent - invalid annotationMode: ${j}`)}return M&&(I+=_util.RenderingIntentFlag.OPLIST),{renderingIntent:I,cacheKey:`${I}_${G.hash}`,annotationStorageSerializable:G}}destroy(){var P;if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=new _util.PromiseCapability,(P=N(this,y))==null||P.reject(new Error("Worker was destroyed during onPassword callback"));const T=[];for(const M of N(this,b).values())T.push(M._destroy());N(this,b).clear(),N(this,x).clear(),this.hasOwnProperty("annotationStorage")&&this.annotationStorage.resetModified();const j=this.messageHandler.sendWithPromise("Terminate",null);return T.push(j),Promise.all(T).then(()=>{var M;this.commonObjs.clear(),this.fontLoader.clear(),N(this,g).clear(),this.filterFactory.destroy(),(M=this._networkStream)==null||M.cancelAllRequests(new _util.AbortException("Worker was terminated.")),this.messageHandler&&(this.messageHandler.destroy(),this.messageHandler=null),this.destroyCapability.resolve()},this.destroyCapability.reject),this.destroyCapability.promise}setupMessageHandler(){const{messageHandler:T,loadingTask:j}=this;T.on("GetReader",(P,M)=>{(0,_util.assert)(this._networkStream,"GetReader - no `IPDFStream` instance available."),this._fullReader=this._networkStream.getFullReader(),this._fullReader.onProgress=I=>{this._lastProgress={loaded:I.loaded,total:I.total}},M.onPull=()=>{this._fullReader.read().then(function({value:I,done:G}){if(G){M.close();return}(0,_util.assert)(I instanceof ArrayBuffer,"GetReader - expected an ArrayBuffer."),M.enqueue(new Uint8Array(I),1,[I])}).catch(I=>{M.error(I)})},M.onCancel=I=>{this._fullReader.cancel(I),M.ready.catch(G=>{if(!this.destroyed)throw G})}}),T.on("ReaderHeadersReady",P=>{const M=new _util.PromiseCapability,I=this._fullReader;return I.headersReady.then(()=>{var G;(!I.isStreamingSupported||!I.isRangeSupported)&&(this._lastProgress&&((G=j.onProgress)==null||G.call(j,this._lastProgress)),I.onProgress=ne=>{var Q;(Q=j.onProgress)==null||Q.call(j,{loaded:ne.loaded,total:ne.total})}),M.resolve({isStreamingSupported:I.isStreamingSupported,isRangeSupported:I.isRangeSupported,contentLength:I.contentLength})},M.reject),M.promise}),T.on("GetRangeReader",(P,M)=>{(0,_util.assert)(this._networkStream,"GetRangeReader - no `IPDFStream` instance available.");const I=this._networkStream.getRangeReader(P.begin,P.end);if(!I){M.close();return}M.onPull=()=>{I.read().then(function({value:G,done:ne}){if(ne){M.close();return}(0,_util.assert)(G instanceof ArrayBuffer,"GetRangeReader - expected an ArrayBuffer."),M.enqueue(new Uint8Array(G),1,[G])}).catch(G=>{M.error(G)})},M.onCancel=G=>{I.cancel(G),M.ready.catch(ne=>{if(!this.destroyed)throw ne})}}),T.on("GetDoc",({pdfInfo:P})=>{this._numPages=P.numPages,this._htmlForXfa=P.htmlForXfa,delete P.htmlForXfa,j._capability.resolve(new PDFDocumentProxy(P,this))}),T.on("DocException",function(P){let M;switch(P.name){case"PasswordException":M=new _util.PasswordException(P.message,P.code);break;case"InvalidPDFException":M=new _util.InvalidPDFException(P.message);break;case"MissingPDFException":M=new _util.MissingPDFException(P.message);break;case"UnexpectedResponseException":M=new _util.UnexpectedResponseException(P.message,P.status);break;case"UnknownErrorException":M=new _util.UnknownErrorException(P.message,P.details);break;default:(0,_util.unreachable)("DocException - expected a valid Error.")}j._capability.reject(M)}),T.on("PasswordRequest",P=>{if(Ce(this,y,new _util.PromiseCapability),j.onPassword){const M=I=>{I instanceof Error?N(this,y).reject(I):N(this,y).resolve({password:I})};try{j.onPassword(M,P.code)}catch(I){N(this,y).reject(I)}}else N(this,y).reject(new _util.PasswordException(P.message,P.code));return N(this,y).promise}),T.on("DataLoaded",P=>{var M;(M=j.onProgress)==null||M.call(j,{loaded:P.length,total:P.length}),this.downloadInfoCapability.resolve(P)}),T.on("StartRenderPage",P=>{if(this.destroyed)return;N(this,b).get(P.pageIndex)._startRenderPage(P.transparency,P.cacheKey)}),T.on("commonobj",([P,M,I])=>{var G;if(!this.destroyed&&!this.commonObjs.has(P))switch(M){case"Font":const ne=this._params;if("error"in I){const H=I.error;(0,_util.warn)(`Error during font loading: ${H}`),this.commonObjs.resolve(P,H);break}const Q=ne.pdfBug&&((G=globalThis.FontInspector)!=null&&G.enabled)?(H,Y)=>globalThis.FontInspector.fontAdded(H,Y):null,B=new _font_loader.FontFaceObject(I,{isEvalSupported:ne.isEvalSupported,disableFontFace:ne.disableFontFace,ignoreErrors:ne.ignoreErrors,inspectFont:Q});this.fontLoader.bind(B).catch(H=>T.sendWithPromise("FontFallback",{id:P})).finally(()=>{!ne.fontExtraProperties&&B.data&&(B.data=null),this.commonObjs.resolve(P,B)});break;case"FontPath":case"Image":case"Pattern":this.commonObjs.resolve(P,I);break;default:throw new Error(`Got unknown common object type ${M}`)}}),T.on("obj",([P,M,I,G])=>{var Q;if(this.destroyed)return;const ne=N(this,b).get(M);if(!ne.objs.has(P))switch(I){case"Image":if(ne.objs.resolve(P,G),G){let B;if(G.bitmap){const{width:H,height:Y}=G;B=H*Y*4}else B=((Q=G.data)==null?void 0:Q.length)||0;B>_util.MAX_IMAGE_SIZE_TO_CACHE&&(ne._maybeCleanupAfterRender=!0)}break;case"Pattern":ne.objs.resolve(P,G);break;default:throw new Error(`Got unknown object type ${I}`)}}),T.on("DocProgress",P=>{var M;this.destroyed||(M=j.onProgress)==null||M.call(j,{loaded:P.loaded,total:P.total})}),T.on("FetchBuiltInCMap",P=>this.destroyed?Promise.reject(new Error("Worker was destroyed.")):this.cMapReaderFactory?this.cMapReaderFactory.fetch(P):Promise.reject(new Error("CMapReaderFactory not initialized, see the `useWorkerFetch` parameter."))),T.on("FetchStandardFontData",P=>this.destroyed?Promise.reject(new Error("Worker was destroyed.")):this.standardFontDataFactory?this.standardFontDataFactory.fetch(P):Promise.reject(new Error("StandardFontDataFactory not initialized, see the `useWorkerFetch` parameter.")))}getData(){return this.messageHandler.sendWithPromise("GetData",null)}saveDocument(){var P;this.annotationStorage.size<=0&&(0,_util.warn)("saveDocument called while `annotationStorage` is empty, please use the getData-method instead.");const{map:T,transfers:j}=this.annotationStorage.serializable;return this.messageHandler.sendWithPromise("SaveDocument",{isPureXfa:!!this._htmlForXfa,numPages:this._numPages,annotationStorage:T,filename:((P=this._fullReader)==null?void 0:P.filename)??null},j).finally(()=>{this.annotationStorage.resetModified()})}getPage(T){if(!Number.isInteger(T)||T<=0||T>this._numPages)return Promise.reject(new Error("Invalid page request."));const j=T-1,P=N(this,x).get(j);if(P)return P;const M=this.messageHandler.sendWithPromise("GetPage",{pageIndex:j}).then(I=>{if(this.destroyed)throw new Error("Transport destroyed");const G=new PDFPageProxy(j,I,this,this._params.pdfBug);return N(this,b).set(j,G),G});return N(this,x).set(j,M),M}getPageIndex(T){return typeof T!="object"||T===null||!Number.isInteger(T.num)||T.num<0||!Number.isInteger(T.gen)||T.gen<0?Promise.reject(new Error("Invalid pageIndex request.")):this.messageHandler.sendWithPromise("GetPageIndex",{num:T.num,gen:T.gen})}getAnnotations(T,j){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:T,intent:j})}getFieldObjects(){return me(this,S,Ms).call(this,"GetFieldObjects")}hasJSActions(){return me(this,S,Ms).call(this,"HasJSActions")}getCalculationOrderIds(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}getDestinations(){return this.messageHandler.sendWithPromise("GetDestinations",null)}getDestination(T){return typeof T!="string"?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:T})}getPageLabels(){return this.messageHandler.sendWithPromise("GetPageLabels",null)}getPageLayout(){return this.messageHandler.sendWithPromise("GetPageLayout",null)}getPageMode(){return this.messageHandler.sendWithPromise("GetPageMode",null)}getViewerPreferences(){return this.messageHandler.sendWithPromise("GetViewerPreferences",null)}getOpenAction(){return this.messageHandler.sendWithPromise("GetOpenAction",null)}getAttachments(){return this.messageHandler.sendWithPromise("GetAttachments",null)}getDocJSActions(){return me(this,S,Ms).call(this,"GetDocJSActions")}getPageJSActions(T){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:T})}getStructTree(T){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex:T})}getOutline(){return this.messageHandler.sendWithPromise("GetOutline",null)}getOptionalContentConfig(){return this.messageHandler.sendWithPromise("GetOptionalContentConfig",null).then(T=>new _optional_content_config.OptionalContentConfig(T))}getPermissions(){return this.messageHandler.sendWithPromise("GetPermissions",null)}getMetadata(){const T="GetMetadata",j=N(this,g).get(T);if(j)return j;const P=this.messageHandler.sendWithPromise(T,null).then(M=>{var I,G;return{info:M[0],metadata:M[1]?new _metadata.Metadata(M[1]):null,contentDispositionFilename:((I=this._fullReader)==null?void 0:I.filename)??null,contentLength:((G=this._fullReader)==null?void 0:G.contentLength)??null}});return N(this,g).set(T,P),P}getMarkInfo(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}async startCleanup(T=!1){if(!this.destroyed){await this.messageHandler.sendWithPromise("Cleanup",null);for(const j of N(this,b).values())if(!j.cleanup())throw new Error(`startCleanup: Page ${j.pageNumber} is currently rendering.`);this.commonObjs.clear(),T||this.fontLoader.clear(),N(this,g).clear(),this.filterFactory.destroy(!0)}}get loadingParams(){const{disableAutoFetch:T,enableXfa:j}=this._params;return(0,_util.shadow)(this,"loadingParams",{disableAutoFetch:T,enableXfa:j})}}g=new WeakMap,b=new WeakMap,x=new WeakMap,y=new WeakMap,S=new WeakSet,Ms=function(T,j=null){const P=N(this,g).get(T);if(P)return P;const M=this.messageHandler.sendWithPromise(T,j);return N(this,g).set(T,M),M};class PDFObjects{constructor(){Se(this,_);Se(this,w,Object.create(null))}get(T,j=null){if(j){const M=me(this,_,ec).call(this,T);return M.capability.promise.then(()=>j(M.data)),null}const P=N(this,w)[T];if(!(P!=null&&P.capability.settled))throw new Error(`Requesting object that isn't resolved yet ${T}.`);return P.data}has(T){const j=N(this,w)[T];return(j==null?void 0:j.capability.settled)||!1}resolve(T,j=null){const P=me(this,_,ec).call(this,T);P.data=j,P.capability.resolve()}clear(){var T;for(const j in N(this,w)){const{data:P}=N(this,w)[j];(T=P==null?void 0:P.bitmap)==null||T.close()}Ce(this,w,Object.create(null))}}w=new WeakMap,_=new WeakSet,ec=function(T){var j;return(j=N(this,w))[T]||(j[T]={capability:new _util.PromiseCapability,data:null})};class RenderTask{constructor(T){Se(this,k,null);Ce(this,k,T),this.onContinue=null}get promise(){return N(this,k).capability.promise}cancel(T=0){N(this,k).cancel(null,T)}get separateAnnots(){const{separateAnnots:T}=N(this,k).operatorList;if(!T)return!1;const{annotationCanvasMap:j}=N(this,k);return T.form||T.canvas&&(j==null?void 0:j.size)>0}}k=new WeakMap,exports.RenderTask=RenderTask;const D=class D{constructor({callback:T,params:j,objs:P,commonObjs:M,annotationCanvasMap:I,operatorList:G,pageIndex:ne,canvasFactory:Q,filterFactory:B,useRequestAnimationFrame:H=!1,pdfBug:Y=!1,pageColors:U=null}){this.callback=T,this.params=j,this.objs=P,this.commonObjs=M,this.annotationCanvasMap=I,this.operatorListIdx=null,this.operatorList=G,this._pageIndex=ne,this.canvasFactory=Q,this.filterFactory=B,this._pdfBug=Y,this.pageColors=U,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=H===!0&&typeof window<"u",this.cancelled=!1,this.capability=new _util.PromiseCapability,this.task=new RenderTask(this),this._cancelBound=this.cancel.bind(this),this._continueBound=this._continue.bind(this),this._scheduleNextBound=this._scheduleNext.bind(this),this._nextBound=this._next.bind(this),this._canvas=j.canvasContext.canvas}get completed(){return this.capability.promise.catch(function(){})}initializeGraphics({transparency:T=!1,optionalContentConfig:j}){var ne,Q;if(this.cancelled)return;if(this._canvas){if(N(D,A).has(this._canvas))throw new Error("Cannot use the same canvas during multiple render() operations. Use different canvas or ensure previous operations were cancelled or completed.");N(D,A).add(this._canvas)}this._pdfBug&&((ne=globalThis.StepperManager)!=null&&ne.enabled)&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());const{canvasContext:P,viewport:M,transform:I,background:G}=this.params;this.gfx=new _canvas.CanvasGraphics(P,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:j},this.annotationCanvasMap,this.pageColors),this.gfx.beginDrawing({transform:I,viewport:M,transparency:T,background:G}),this.operatorListIdx=0,this.graphicsReady=!0,(Q=this.graphicsReadyCallback)==null||Q.call(this)}cancel(T=null,j=0){var P;this.running=!1,this.cancelled=!0,(P=this.gfx)==null||P.endDrawing(),N(D,A).delete(this._canvas),this.callback(T||new _display_utils.RenderingCancelledException(`Rendering cancelled, page ${this._pageIndex+1}`,j))}operatorListChanged(){var T;if(!this.graphicsReady){this.graphicsReadyCallback||(this.graphicsReadyCallback=this._continueBound);return}(T=this.stepper)==null||T.updateOperatorList(this.operatorList),!this.running&&this._continue()}_continue(){this.running=!0,!this.cancelled&&(this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext())}_scheduleNext(){this._useRequestAnimationFrame?window.requestAnimationFrame(()=>{this._nextBound().catch(this._cancelBound)}):Promise.resolve().then(this._nextBound).catch(this._cancelBound)}async _next(){this.cancelled||(this.operatorListIdx=this.gfx.executeOperatorList(this.operatorList,this.operatorListIdx,this._continueBound,this.stepper),this.operatorListIdx===this.operatorList.argsArray.length&&(this.running=!1,this.operatorList.lastChunk&&(this.gfx.endDrawing(),N(D,A).delete(this._canvas),this.callback())))}};A=new WeakMap,Se(D,A,new WeakSet);let InternalRenderTask=D;const version="3.11.174";exports.version=version;const build="ce8716743";exports.build=build},(e,t,i)=>{var p,m,g,vp,x;Object.defineProperty(t,"__esModule",{value:!0}),t.SerializableEmpty=t.PrintAnnotationStorage=t.AnnotationStorage=void 0;var a=i(1),o=i(4),l=i(8);const u=Object.freeze({map:null,hash:"",transfers:void 0});t.SerializableEmpty=u;class f{constructor(){Se(this,g);Se(this,p,!1);Se(this,m,new Map);this.onSetModified=null,this.onResetModified=null,this.onAnnotationEditor=null}getValue(S,E){const w=N(this,m).get(S);return w===void 0?E:Object.assign(E,w)}getRawValue(S){return N(this,m).get(S)}remove(S){if(N(this,m).delete(S),N(this,m).size===0&&this.resetModified(),typeof this.onAnnotationEditor=="function"){for(const E of N(this,m).values())if(E instanceof o.AnnotationEditor)return;this.onAnnotationEditor(null)}}setValue(S,E){const w=N(this,m).get(S);let _=!1;if(w!==void 0)for(const[O,k]of Object.entries(E))w[O]!==k&&(_=!0,w[O]=k);else _=!0,N(this,m).set(S,E);_&&me(this,g,vp).call(this),E instanceof o.AnnotationEditor&&typeof this.onAnnotationEditor=="function"&&this.onAnnotationEditor(E.constructor._type)}has(S){return N(this,m).has(S)}getAll(){return N(this,m).size>0?(0,a.objectFromMap)(N(this,m)):null}setAll(S){for(const[E,w]of Object.entries(S))this.setValue(E,w)}get size(){return N(this,m).size}resetModified(){N(this,p)&&(Ce(this,p,!1),typeof this.onResetModified=="function"&&this.onResetModified())}get print(){return new h(this)}get serializable(){if(N(this,m).size===0)return u;const S=new Map,E=new l.MurmurHash3_64,w=[],_=Object.create(null);let O=!1;for(const[k,A]of N(this,m)){const D=A instanceof o.AnnotationEditor?A.serialize(!1,_):A;D&&(S.set(k,D),E.update(`${k}:${JSON.stringify(D)}`),O||(O=!!D.bitmap))}if(O)for(const k of S.values())k.bitmap&&w.push(k.bitmap);return S.size>0?{map:S,hash:E.hexdigest(),transfers:w}:u}}p=new WeakMap,m=new WeakMap,g=new WeakSet,vp=function(){N(this,p)||(Ce(this,p,!0),typeof this.onSetModified=="function"&&this.onSetModified())},t.AnnotationStorage=f;class h extends f{constructor(E){super();Se(this,x);const{map:w,hash:_,transfers:O}=E.serializable,k=structuredClone(w,O?{transfer:O}:null);Ce(this,x,{map:k,hash:_,transfers:O})}get print(){(0,a.unreachable)("Should not call PrintAnnotationStorage.print")}get serializable(){return N(this,x)}}x=new WeakMap,t.PrintAnnotationStorage=h},(e,t,i)=>{var h,p,m,g,b,x,y,S,E,w,_,O,k,A,D,tc,nc,j,rc,ic,yp,bp,xp,ac,Sp;Object.defineProperty(t,"__esModule",{value:!0}),t.AnnotationEditor=void 0;var a=i(5),o=i(1),l=i(6);const H=class H{constructor(U){Se(this,D);Se(this,h,"");Se(this,p,!1);Se(this,m,null);Se(this,g,null);Se(this,b,null);Se(this,x,!1);Se(this,y,null);Se(this,S,this.focusin.bind(this));Se(this,E,this.focusout.bind(this));Se(this,w,!1);Se(this,_,!1);Se(this,O,!1);kt(this,"_initialOptions",Object.create(null));kt(this,"_uiManager",null);kt(this,"_focusEventsAllowed",!0);kt(this,"_l10nPromise",null);Se(this,k,!1);Se(this,A,H._zIndex++);this.constructor===H&&(0,o.unreachable)("Cannot initialize AnnotationEditor."),this.parent=U.parent,this.id=U.id,this.width=this.height=null,this.pageIndex=U.parent.pageIndex,this.name=U.name,this.div=null,this._uiManager=U.uiManager,this.annotationElementId=null,this._willKeepAspectRatio=!1,this._initialOptions.isCentered=U.isCentered,this._structTreeParentId=null;const{rotation:F,rawDims:{pageWidth:X,pageHeight:z,pageX:L,pageY:$}}=this.parent.viewport;this.rotation=F,this.pageRotation=(360+F-this._uiManager.viewParameters.rotation)%360,this.pageDimensions=[X,z],this.pageTranslation=[L,$];const[V,K]=this.parentDimensions;this.x=U.x/V,this.y=U.y/K,this.isAttachedToDOM=!1,this.deleted=!1}get editorType(){return Object.getPrototypeOf(this).constructor._type}static get _defaultLineColor(){return(0,o.shadow)(this,"_defaultLineColor",this._colorManager.getHexCode("CanvasText"))}static deleteAnnotationElement(U){const F=new f({id:U.parent.getNextId(),parent:U.parent,uiManager:U._uiManager});F.annotationElementId=U.annotationElementId,F.deleted=!0,F._uiManager.addToAnnotationStorage(F)}static initialize(U,F=null){if(H._l10nPromise||(H._l10nPromise=new Map(["editor_alt_text_button_label","editor_alt_text_edit_button_label","editor_alt_text_decorative_tooltip"].map(z=>[z,U.get(z)]))),F!=null&&F.strings)for(const z of F.strings)H._l10nPromise.set(z,U.get(z));if(H._borderLineWidth!==-1)return;const X=getComputedStyle(document.documentElement);H._borderLineWidth=parseFloat(X.getPropertyValue("--outline-width"))||0}static updateDefaultParams(U,F){}static get defaultPropertiesToUpdate(){return[]}static isHandlingMimeForPasting(U){return!1}static paste(U,F){(0,o.unreachable)("Not implemented")}get propertiesToUpdate(){return[]}get _isDraggable(){return N(this,k)}set _isDraggable(U){var F;Ce(this,k,U),(F=this.div)==null||F.classList.toggle("draggable",U)}center(){const[U,F]=this.pageDimensions;switch(this.parentRotation){case 90:this.x-=this.height*F/(U*2),this.y+=this.width*U/(F*2);break;case 180:this.x+=this.width/2,this.y+=this.height/2;break;case 270:this.x+=this.height*F/(U*2),this.y-=this.width*U/(F*2);break;default:this.x-=this.width/2,this.y-=this.height/2;break}this.fixAndSetPosition()}addCommands(U){this._uiManager.addCommands(U)}get currentLayer(){return this._uiManager.currentLayer}setInBackground(){this.div.style.zIndex=0}setInForeground(){this.div.style.zIndex=N(this,A)}setParent(U){U!==null&&(this.pageIndex=U.pageIndex,this.pageDimensions=U.pageDimensions),this.parent=U}focusin(U){this._focusEventsAllowed&&(N(this,w)?Ce(this,w,!1):this.parent.setSelected(this))}focusout(U){var X;if(!this._focusEventsAllowed||!this.isAttachedToDOM)return;const F=U.relatedTarget;F!=null&&F.closest(`#${this.id}`)||(U.preventDefault(),(X=this.parent)!=null&&X.isMultipleSelection||this.commitOrRemove())}commitOrRemove(){this.isEmpty()?this.remove():this.commit()}commit(){this.addToAnnotationStorage()}addToAnnotationStorage(){this._uiManager.addToAnnotationStorage(this)}setAt(U,F,X,z){const[L,$]=this.parentDimensions;[X,z]=this.screenToPageTranslation(X,z),this.x=(U+X)/L,this.y=(F+z)/$,this.fixAndSetPosition()}translate(U,F){me(this,D,tc).call(this,this.parentDimensions,U,F)}translateInPage(U,F){me(this,D,tc).call(this,this.pageDimensions,U,F),this.div.scrollIntoView({block:"nearest"})}drag(U,F){const[X,z]=this.parentDimensions;if(this.x+=U/X,this.y+=F/z,this.parent&&(this.x<0||this.x>1||this.y<0||this.y>1)){const{x:te,y:J}=this.div.getBoundingClientRect();this.parent.findNewParent(this,te,J)&&(this.x-=Math.floor(this.x),this.y-=Math.floor(this.y))}let{x:L,y:$}=this;const[V,K]=me(this,D,nc).call(this);L+=V,$+=K,this.div.style.left=`${(100*L).toFixed(2)}%`,this.div.style.top=`${(100*$).toFixed(2)}%`,this.div.scrollIntoView({block:"nearest"})}fixAndSetPosition(){const[U,F]=this.pageDimensions;let{x:X,y:z,width:L,height:$}=this;switch(L*=U,$*=F,X*=U,z*=F,this.rotation){case 0:X=Math.max(0,Math.min(U-L,X)),z=Math.max(0,Math.min(F-$,z));break;case 90:X=Math.max(0,Math.min(U-$,X)),z=Math.min(F,Math.max(L,z));break;case 180:X=Math.min(U,Math.max(L,X)),z=Math.min(F,Math.max($,z));break;case 270:X=Math.min(U,Math.max($,X)),z=Math.max(0,Math.min(F-L,z));break}this.x=X/=U,this.y=z/=F;const[V,K]=me(this,D,nc).call(this);X+=V,z+=K;const{style:te}=this.div;te.left=`${(100*X).toFixed(2)}%`,te.top=`${(100*z).toFixed(2)}%`,this.moveInDOM()}screenToPageTranslation(U,F){var X;return me(X=H,j,rc).call(X,U,F,this.parentRotation)}pageTranslationToScreen(U,F){var X;return me(X=H,j,rc).call(X,U,F,360-this.parentRotation)}get parentScale(){return this._uiManager.viewParameters.realScale}get parentRotation(){return(this._uiManager.viewParameters.rotation+this.pageRotation)%360}get parentDimensions(){const{parentScale:U,pageDimensions:[F,X]}=this,z=F*U,L=X*U;return o.FeatureTest.isCSSRoundSupported?[Math.round(z),Math.round(L)]:[z,L]}setDims(U,F){var L;const[X,z]=this.parentDimensions;this.div.style.width=`${(100*U/X).toFixed(2)}%`,N(this,x)||(this.div.style.height=`${(100*F/z).toFixed(2)}%`),(L=N(this,m))==null||L.classList.toggle("small",U<H.SMALL_EDITOR_SIZE||F<H.SMALL_EDITOR_SIZE)}fixDims(){const{style:U}=this.div,{height:F,width:X}=U,z=X.endsWith("%"),L=!N(this,x)&&F.endsWith("%");if(z&&L)return;const[$,V]=this.parentDimensions;z||(U.width=`${(100*parseFloat(X)/$).toFixed(2)}%`),!N(this,x)&&!L&&(U.height=`${(100*parseFloat(F)/V).toFixed(2)}%`)}getInitialTranslation(){return[0,0]}async addAltTextButton(){if(N(this,m))return;const U=Ce(this,m,document.createElement("button"));U.className="altText";const F=await H._l10nPromise.get("editor_alt_text_button_label");U.textContent=F,U.setAttribute("aria-label",F),U.tabIndex="0",U.addEventListener("contextmenu",l.noContextMenu),U.addEventListener("pointerdown",X=>X.stopPropagation()),U.addEventListener("click",X=>{X.preventDefault(),this._uiManager.editAltText(this)},{capture:!0}),U.addEventListener("keydown",X=>{X.target===U&&X.key==="Enter"&&(X.preventDefault(),this._uiManager.editAltText(this))}),me(this,D,ac).call(this),this.div.append(U),H.SMALL_EDITOR_SIZE||(H.SMALL_EDITOR_SIZE=Math.min(128,Math.round(U.getBoundingClientRect().width*1.4)))}getClientDimensions(){return this.div.getBoundingClientRect()}get altTextData(){return{altText:N(this,h),decorative:N(this,p)}}set altTextData({altText:U,decorative:F}){N(this,h)===U&&N(this,p)===F||(Ce(this,h,U),Ce(this,p,F),me(this,D,ac).call(this))}render(){this.div=document.createElement("div"),this.div.setAttribute("data-editor-rotation",(360-this.rotation)%360),this.div.className=this.name,this.div.setAttribute("id",this.id),this.div.setAttribute("tabIndex",0),this.setInForeground(),this.div.addEventListener("focusin",N(this,S)),this.div.addEventListener("focusout",N(this,E));const[U,F]=this.parentDimensions;this.parentRotation%180!==0&&(this.div.style.maxWidth=`${(100*F/U).toFixed(2)}%`,this.div.style.maxHeight=`${(100*U/F).toFixed(2)}%`);const[X,z]=this.getInitialTranslation();return this.translate(X,z),(0,a.bindEvents)(this,this.div,["pointerdown"]),this.div}pointerdown(U){const{isMac:F}=o.FeatureTest.platform;if(U.button!==0||U.ctrlKey&&F){U.preventDefault();return}Ce(this,w,!0),me(this,D,Sp).call(this,U)}moveInDOM(){var U;(U=this.parent)==null||U.moveEditorInDOM(this)}_setParentAndPosition(U,F,X){U.changeParent(this),this.x=F,this.y=X,this.fixAndSetPosition()}getRect(U,F){const X=this.parentScale,[z,L]=this.pageDimensions,[$,V]=this.pageTranslation,K=U/X,te=F/X,J=this.x*z,ce=this.y*L,ue=this.width*z,we=this.height*L;switch(this.rotation){case 0:return[J+K+$,L-ce-te-we+V,J+K+ue+$,L-ce-te+V];case 90:return[J+te+$,L-ce+K+V,J+te+we+$,L-ce+K+ue+V];case 180:return[J-K-ue+$,L-ce+te+V,J-K+$,L-ce+te+we+V];case 270:return[J-te-we+$,L-ce-K-ue+V,J-te+$,L-ce-K+V];default:throw new Error("Invalid rotation")}}getRectInCurrentCoords(U,F){const[X,z,L,$]=U,V=L-X,K=$-z;switch(this.rotation){case 0:return[X,F-$,V,K];case 90:return[X,F-z,K,V];case 180:return[L,F-z,V,K];case 270:return[L,F-$,K,V];default:throw new Error("Invalid rotation")}}onceAdded(){}isEmpty(){return!1}enableEditMode(){Ce(this,O,!0)}disableEditMode(){Ce(this,O,!1)}isInEditMode(){return N(this,O)}shouldGetKeyboardEvents(){return!1}needsToBeRebuilt(){return this.div&&!this.isAttachedToDOM}rebuild(){var U,F;(U=this.div)==null||U.addEventListener("focusin",N(this,S)),(F=this.div)==null||F.addEventListener("focusout",N(this,E))}serialize(U=!1,F=null){(0,o.unreachable)("An editor must be serializable")}static deserialize(U,F,X){const z=new this.prototype.constructor({parent:F,id:F.getNextId(),uiManager:X});z.rotation=U.rotation;const[L,$]=z.pageDimensions,[V,K,te,J]=z.getRectInCurrentCoords(U.rect,$);return z.x=V/L,z.y=K/$,z.width=te/L,z.height=J/$,z}remove(){var U;this.div.removeEventListener("focusin",N(this,S)),this.div.removeEventListener("focusout",N(this,E)),this.isEmpty()||this.commit(),this.parent?this.parent.remove(this):this._uiManager.removeEditor(this),(U=N(this,m))==null||U.remove(),Ce(this,m,null),Ce(this,g,null)}get isResizable(){return!1}makeResizable(){this.isResizable&&(me(this,D,yp).call(this),N(this,y).classList.remove("hidden"))}select(){var U;this.makeResizable(),(U=this.div)==null||U.classList.add("selectedEditor")}unselect(){var U,F,X;(U=N(this,y))==null||U.classList.add("hidden"),(F=this.div)==null||F.classList.remove("selectedEditor"),(X=this.div)!=null&&X.contains(document.activeElement)&&this._uiManager.currentLayer.div.focus()}updateParams(U,F){}disableEditing(){N(this,m)&&(N(this,m).hidden=!0)}enableEditing(){N(this,m)&&(N(this,m).hidden=!1)}enterInEditMode(){}get contentDiv(){return this.div}get isEditing(){return N(this,_)}set isEditing(U){Ce(this,_,U),this.parent&&(U?(this.parent.setSelected(this),this.parent.setActiveEditor(this)):this.parent.setActiveEditor(null))}setAspectRatio(U,F){Ce(this,x,!0);const X=U/F,{style:z}=this.div;z.aspectRatio=X,z.height="auto"}static get MIN_SIZE(){return 16}};h=new WeakMap,p=new WeakMap,m=new WeakMap,g=new WeakMap,b=new WeakMap,x=new WeakMap,y=new WeakMap,S=new WeakMap,E=new WeakMap,w=new WeakMap,_=new WeakMap,O=new WeakMap,k=new WeakMap,A=new WeakMap,D=new WeakSet,tc=function([U,F],X,z){[X,z]=this.screenToPageTranslation(X,z),this.x+=X/U,this.y+=z/F,this.fixAndSetPosition()},nc=function(){const[U,F]=this.parentDimensions,{_borderLineWidth:X}=H,z=X/U,L=X/F;switch(this.rotation){case 90:return[-z,L];case 180:return[z,L];case 270:return[z,-L];default:return[-z,-L]}},j=new WeakSet,rc=function(U,F,X){switch(X){case 90:return[F,-U];case 180:return[-U,-F];case 270:return[-F,U];default:return[U,F]}},ic=function(U){switch(U){case 90:{const[F,X]=this.pageDimensions;return[0,-F/X,X/F,0]}case 180:return[-1,0,0,-1];case 270:{const[F,X]=this.pageDimensions;return[0,F/X,-X/F,0]}default:return[1,0,0,1]}},yp=function(){if(N(this,y))return;Ce(this,y,document.createElement("div")),N(this,y).classList.add("resizers");const U=["topLeft","topRight","bottomRight","bottomLeft"];this._willKeepAspectRatio||U.push("topMiddle","middleRight","bottomMiddle","middleLeft");for(const F of U){const X=document.createElement("div");N(this,y).append(X),X.classList.add("resizer",F),X.addEventListener("pointerdown",me(this,D,bp).bind(this,F)),X.addEventListener("contextmenu",l.noContextMenu)}this.div.prepend(N(this,y))},bp=function(U,F){F.preventDefault();const{isMac:X}=o.FeatureTest.platform;if(F.button!==0||F.ctrlKey&&X)return;const z=me(this,D,xp).bind(this,U),L=this._isDraggable;this._isDraggable=!1;const $={passive:!0,capture:!0};window.addEventListener("pointermove",z,$);const V=this.x,K=this.y,te=this.width,J=this.height,ce=this.parent.div.style.cursor,ue=this.div.style.cursor;this.div.style.cursor=this.parent.div.style.cursor=window.getComputedStyle(F.target).cursor;const we=()=>{this._isDraggable=L,window.removeEventListener("pointerup",we),window.removeEventListener("blur",we),window.removeEventListener("pointermove",z,$),this.parent.div.style.cursor=ce,this.div.style.cursor=ue;const Ee=this.x,De=this.y,je=this.width,Pe=this.height;Ee===V&&De===K&&je===te&&Pe===J||this.addCommands({cmd:()=>{this.width=je,this.height=Pe,this.x=Ee,this.y=De;const[ge,se]=this.parentDimensions;this.setDims(ge*je,se*Pe),this.fixAndSetPosition()},undo:()=>{this.width=te,this.height=J,this.x=V,this.y=K;const[ge,se]=this.parentDimensions;this.setDims(ge*te,se*J),this.fixAndSetPosition()},mustExec:!0})};window.addEventListener("pointerup",we),window.addEventListener("blur",we)},xp=function(U,F){const[X,z]=this.parentDimensions,L=this.x,$=this.y,V=this.width,K=this.height,te=H.MIN_SIZE/X,J=H.MIN_SIZE/z,ce=We=>Math.round(We*1e4)/1e4,ue=me(this,D,ic).call(this,this.rotation),we=(We,Je)=>[ue[0]*We+ue[2]*Je,ue[1]*We+ue[3]*Je],Ee=me(this,D,ic).call(this,360-this.rotation),De=(We,Je)=>[Ee[0]*We+Ee[2]*Je,Ee[1]*We+Ee[3]*Je];let je,Pe,ge=!1,se=!1;switch(U){case"topLeft":ge=!0,je=(We,Je)=>[0,0],Pe=(We,Je)=>[We,Je];break;case"topMiddle":je=(We,Je)=>[We/2,0],Pe=(We,Je)=>[We/2,Je];break;case"topRight":ge=!0,je=(We,Je)=>[We,0],Pe=(We,Je)=>[0,Je];break;case"middleRight":se=!0,je=(We,Je)=>[We,Je/2],Pe=(We,Je)=>[0,Je/2];break;case"bottomRight":ge=!0,je=(We,Je)=>[We,Je],Pe=(We,Je)=>[0,0];break;case"bottomMiddle":je=(We,Je)=>[We/2,Je],Pe=(We,Je)=>[We/2,0];break;case"bottomLeft":ge=!0,je=(We,Je)=>[0,Je],Pe=(We,Je)=>[We,0];break;case"middleLeft":se=!0,je=(We,Je)=>[0,Je/2],Pe=(We,Je)=>[We,Je/2];break}const W=je(V,K),ee=Pe(V,K);let de=we(...ee);const pe=ce(L+de[0]),ve=ce($+de[1]);let Te=1,oe=1,[ie,Fe]=this.screenToPageTranslation(F.movementX,F.movementY);if([ie,Fe]=De(ie/X,Fe/z),ge){const We=Math.hypot(V,K);Te=oe=Math.max(Math.min(Math.hypot(ee[0]-W[0]-ie,ee[1]-W[1]-Fe)/We,1/V,1/K),te/V,J/K)}else se?Te=Math.max(te,Math.min(1,Math.abs(ee[0]-W[0]-ie)))/V:oe=Math.max(J,Math.min(1,Math.abs(ee[1]-W[1]-Fe)))/K;const Le=ce(V*Te),Ye=ce(K*oe);de=we(...Pe(Le,Ye));const qe=pe-de[0],it=ve-de[1];this.width=Le,this.height=Ye,this.x=qe,this.y=it,this.setDims(X*Le,z*Ye),this.fixAndSetPosition()},ac=async function(){var X;const U=N(this,m);if(!U)return;if(!N(this,h)&&!N(this,p)){U.classList.remove("done"),(X=N(this,g))==null||X.remove();return}H._l10nPromise.get("editor_alt_text_edit_button_label").then(z=>{U.setAttribute("aria-label",z)});let F=N(this,g);if(!F){Ce(this,g,F=document.createElement("span")),F.className="tooltip",F.setAttribute("role","tooltip");const z=F.id=`alt-text-tooltip-${this.id}`;U.setAttribute("aria-describedby",z);const L=100;U.addEventListener("mouseenter",()=>{Ce(this,b,setTimeout(()=>{Ce(this,b,null),N(this,g).classList.add("show"),this._uiManager._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",subtype:this.editorType,data:{action:"alt_text_tooltip"}}})},L))}),U.addEventListener("mouseleave",()=>{var $;clearTimeout(N(this,b)),Ce(this,b,null),($=N(this,g))==null||$.classList.remove("show")})}U.classList.add("done"),F.innerText=N(this,p)?await H._l10nPromise.get("editor_alt_text_decorative_tooltip"):N(this,h),F.parentNode||U.append(F)},Sp=function(U){if(!this._isDraggable)return;const F=this._uiManager.isSelected(this);this._uiManager.setUpDragSession();let X,z;F&&(X={passive:!0,capture:!0},z=$=>{const[V,K]=this.screenToPageTranslation($.movementX,$.movementY);this._uiManager.dragSelectedEditors(V,K)},window.addEventListener("pointermove",z,X));const L=()=>{if(window.removeEventListener("pointerup",L),window.removeEventListener("blur",L),F&&window.removeEventListener("pointermove",z,X),Ce(this,w,!1),!this._uiManager.endDragSession()){const{isMac:$}=o.FeatureTest.platform;U.ctrlKey&&!$||U.shiftKey||U.metaKey&&$?this.parent.toggleSelected(this):this.parent.setSelected(this)}};window.addEventListener("pointerup",L),window.addEventListener("blur",L)},Se(H,j),kt(H,"_borderLineWidth",-1),kt(H,"_colorManager",new a.ColorManager),kt(H,"_zIndex",1),kt(H,"SMALL_EDITOR_SIZE",0);let u=H;t.AnnotationEditor=u;class f extends u{constructor(U){super(U),this.annotationElementId=U.annotationElementId,this.deleted=!0}serialize(){return{id:this.annotationElementId,deleted:!0,pageIndex:this.pageIndex}}}},(e,t,i)=>{var x,y,S,E,w,sc,k,A,D,R,T,Ep,M,I,G,ne,Q,B,H,Y,U,F,X,z,L,$,V,K,te,J,ce,ue,we,Ee,De,je,Pe,ge,se,W,ee,de,pe,ve,Te,oe,ie,wp,oc,lc,js,cc,uc,An,pa,Cp,Ap,dc,ha,fc;Object.defineProperty(t,"__esModule",{value:!0}),t.KeyboardManager=t.CommandManager=t.ColorManager=t.AnnotationEditorUIManager=void 0,t.bindEvents=l,t.opacityToHex=u;var a=i(1),o=i(6);function l(ht,le,Ne){for(const Ge of Ne)le.addEventListener(Ge,ht[Ge].bind(ht))}function u(ht){return Math.round(Math.min(255,Math.max(1,255*ht))).toString(16).padStart(2,"0")}class f{constructor(){Se(this,x,0)}getId(){return`${a.AnnotationEditorPrefix}${fa(this,x)._++}`}}x=new WeakMap;const O=class O{constructor(){Se(this,w);Se(this,y,(0,a.getUuid)());Se(this,S,0);Se(this,E,null)}static get _isSVGFittingCanvas(){const le='data:image/svg+xml;charset=UTF-8,<svg viewBox="0 0 1 1" width="1" height="1" xmlns="http://www.w3.org/2000/svg"><rect width="1" height="1" style="fill:red;"/></svg>',Ge=new OffscreenCanvas(1,3).getContext("2d"),nt=new Image;nt.src=le;const at=nt.decode().then(()=>(Ge.drawImage(nt,0,0,1,1,0,0,1,3),new Uint32Array(Ge.getImageData(0,0,1,1).data.buffer)[0]===0));return(0,a.shadow)(this,"_isSVGFittingCanvas",at)}async getFromFile(le){const{lastModified:Ne,name:Ge,size:nt,type:at}=le;return me(this,w,sc).call(this,`${Ne}_${Ge}_${nt}_${at}`,le)}async getFromUrl(le){return me(this,w,sc).call(this,le,le)}async getFromId(le){N(this,E)||Ce(this,E,new Map);const Ne=N(this,E).get(le);return Ne?Ne.bitmap?(Ne.refCounter+=1,Ne):Ne.file?this.getFromFile(Ne.file):this.getFromUrl(Ne.url):null}getSvgUrl(le){const Ne=N(this,E).get(le);return Ne!=null&&Ne.isSvg?Ne.svgUrl:null}deleteId(le){N(this,E)||Ce(this,E,new Map);const Ne=N(this,E).get(le);Ne&&(Ne.refCounter-=1,Ne.refCounter===0&&(Ne.bitmap=null))}isValidId(le){return le.startsWith(`image_${N(this,y)}_`)}};y=new WeakMap,S=new WeakMap,E=new WeakMap,w=new WeakSet,sc=async function(le,Ne){N(this,E)||Ce(this,E,new Map);let Ge=N(this,E).get(le);if(Ge===null)return null;if(Ge!=null&&Ge.bitmap)return Ge.refCounter+=1,Ge;try{Ge||(Ge={bitmap:null,id:`image_${N(this,y)}_${fa(this,S)._++}`,refCounter:0,isSvg:!1});let nt;if(typeof Ne=="string"){Ge.url=Ne;const at=await fetch(Ne);if(!at.ok)throw new Error(at.statusText);nt=await at.blob()}else nt=Ge.file=Ne;if(nt.type==="image/svg+xml"){const at=O._isSVGFittingCanvas,Ke=new FileReader,ae=new Image,re=new Promise((he,Re)=>{ae.onload=()=>{Ge.bitmap=ae,Ge.isSvg=!0,he()},Ke.onload=async()=>{const _e=Ge.svgUrl=Ke.result;ae.src=await at?`${_e}#svgView(preserveAspectRatio(none))`:_e},ae.onerror=Ke.onerror=Re});Ke.readAsDataURL(nt),await re}else Ge.bitmap=await createImageBitmap(nt);Ge.refCounter=1}catch(nt){console.error(nt),Ge=null}return N(this,E).set(le,Ge),Ge&&N(this,E).set(Ge.id,Ge),Ge};let h=O;class p{constructor(le=128){Se(this,k,[]);Se(this,A,!1);Se(this,D);Se(this,R,-1);Ce(this,D,le)}add({cmd:le,undo:Ne,mustExec:Ge,type:nt=NaN,overwriteIfSameType:at=!1,keepUndo:Ke=!1}){if(Ge&&le(),N(this,A))return;const ae={cmd:le,undo:Ne,type:nt};if(N(this,R)===-1){N(this,k).length>0&&(N(this,k).length=0),Ce(this,R,0),N(this,k).push(ae);return}if(at&&N(this,k)[N(this,R)].type===nt){Ke&&(ae.undo=N(this,k)[N(this,R)].undo),N(this,k)[N(this,R)]=ae;return}const re=N(this,R)+1;re===N(this,D)?N(this,k).splice(0,1):(Ce(this,R,re),re<N(this,k).length&&N(this,k).splice(re)),N(this,k).push(ae)}undo(){N(this,R)!==-1&&(Ce(this,A,!0),N(this,k)[N(this,R)].undo(),Ce(this,A,!1),Ce(this,R,N(this,R)-1))}redo(){N(this,R)<N(this,k).length-1&&(Ce(this,R,N(this,R)+1),Ce(this,A,!0),N(this,k)[N(this,R)].cmd(),Ce(this,A,!1))}hasSomethingToUndo(){return N(this,R)!==-1}hasSomethingToRedo(){return N(this,R)<N(this,k).length-1}destroy(){Ce(this,k,null)}}k=new WeakMap,A=new WeakMap,D=new WeakMap,R=new WeakMap,t.CommandManager=p;class m{constructor(le){Se(this,T);this.buffer=[],this.callbacks=new Map,this.allKeys=new Set;const{isMac:Ne}=a.FeatureTest.platform;for(const[Ge,nt,at={}]of le)for(const Ke of Ge){const ae=Ke.startsWith("mac+");Ne&&ae?(this.callbacks.set(Ke.slice(4),{callback:nt,options:at}),this.allKeys.add(Ke.split("+").at(-1))):!Ne&&!ae&&(this.callbacks.set(Ke,{callback:nt,options:at}),this.allKeys.add(Ke.split("+").at(-1)))}}exec(le,Ne){if(!this.allKeys.has(Ne.key))return;const Ge=this.callbacks.get(me(this,T,Ep).call(this,Ne));if(!Ge)return;const{callback:nt,options:{bubbles:at=!1,args:Ke=[],checker:ae=null}}=Ge;ae&&!ae(le,Ne)||(nt.bind(le,...Ke)(),at||(Ne.stopPropagation(),Ne.preventDefault()))}}T=new WeakSet,Ep=function(le){le.altKey&&this.buffer.push("alt"),le.ctrlKey&&this.buffer.push("ctrl"),le.metaKey&&this.buffer.push("meta"),le.shiftKey&&this.buffer.push("shift"),this.buffer.push(le.key);const Ne=this.buffer.join("+");return this.buffer.length=0,Ne},t.KeyboardManager=m;const P=class P{get _colors(){const le=new Map([["CanvasText",null],["Canvas",null]]);return(0,o.getColorValues)(le),(0,a.shadow)(this,"_colors",le)}convert(le){const Ne=(0,o.getRGB)(le);if(!window.matchMedia("(forced-colors: active)").matches)return Ne;for(const[Ge,nt]of this._colors)if(nt.every((at,Ke)=>at===Ne[Ke]))return P._colorsMapping.get(Ge);return Ne}getHexCode(le){const Ne=this._colors.get(le);return Ne?a.Util.makeHexColor(...Ne):le}};kt(P,"_colorsMapping",new Map([["CanvasText",[0,0,0]],["Canvas",[255,255,255]]]));let g=P;t.ColorManager=g;const pt=class pt{constructor(le,Ne,Ge,nt,at,Ke){Se(this,ie);Se(this,M,null);Se(this,I,new Map);Se(this,G,new Map);Se(this,ne,null);Se(this,Q,null);Se(this,B,new p);Se(this,H,0);Se(this,Y,new Set);Se(this,U,null);Se(this,F,null);Se(this,X,new Set);Se(this,z,null);Se(this,L,new f);Se(this,$,!1);Se(this,V,!1);Se(this,K,null);Se(this,te,a.AnnotationEditorType.NONE);Se(this,J,new Set);Se(this,ce,null);Se(this,ue,this.blur.bind(this));Se(this,we,this.focus.bind(this));Se(this,Ee,this.copy.bind(this));Se(this,De,this.cut.bind(this));Se(this,je,this.paste.bind(this));Se(this,Pe,this.keydown.bind(this));Se(this,ge,this.onEditingAction.bind(this));Se(this,se,this.onPageChanging.bind(this));Se(this,W,this.onScaleChanging.bind(this));Se(this,ee,this.onRotationChanging.bind(this));Se(this,de,{isEditing:!1,isEmpty:!0,hasSomethingToUndo:!1,hasSomethingToRedo:!1,hasSelectedEditor:!1});Se(this,pe,[0,0]);Se(this,ve,null);Se(this,Te,null);Se(this,oe,null);Ce(this,Te,le),Ce(this,oe,Ne),Ce(this,ne,Ge),this._eventBus=nt,this._eventBus._on("editingaction",N(this,ge)),this._eventBus._on("pagechanging",N(this,se)),this._eventBus._on("scalechanging",N(this,W)),this._eventBus._on("rotationchanging",N(this,ee)),Ce(this,Q,at.annotationStorage),Ce(this,z,at.filterFactory),Ce(this,ce,Ke),this.viewParameters={realScale:o.PixelsPerInch.PDF_TO_CSS_UNITS,rotation:0}}static get _keyboardManager(){const le=pt.prototype,Ne=at=>{const{activeElement:Ke}=document;return Ke&&N(at,Te).contains(Ke)&&at.hasSomethingToControl()},Ge=this.TRANSLATE_SMALL,nt=this.TRANSLATE_BIG;return(0,a.shadow)(this,"_keyboardManager",new m([[["ctrl+a","mac+meta+a"],le.selectAll],[["ctrl+z","mac+meta+z"],le.undo],[["ctrl+y","ctrl+shift+z","mac+meta+shift+z","ctrl+shift+Z","mac+meta+shift+Z"],le.redo],[["Backspace","alt+Backspace","ctrl+Backspace","shift+Backspace","mac+Backspace","mac+alt+Backspace","mac+ctrl+Backspace","Delete","ctrl+Delete","shift+Delete","mac+Delete"],le.delete],[["Escape","mac+Escape"],le.unselectAll],[["ArrowLeft","mac+ArrowLeft"],le.translateSelectedEditors,{args:[-Ge,0],checker:Ne}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],le.translateSelectedEditors,{args:[-nt,0],checker:Ne}],[["ArrowRight","mac+ArrowRight"],le.translateSelectedEditors,{args:[Ge,0],checker:Ne}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],le.translateSelectedEditors,{args:[nt,0],checker:Ne}],[["ArrowUp","mac+ArrowUp"],le.translateSelectedEditors,{args:[0,-Ge],checker:Ne}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],le.translateSelectedEditors,{args:[0,-nt],checker:Ne}],[["ArrowDown","mac+ArrowDown"],le.translateSelectedEditors,{args:[0,Ge],checker:Ne}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],le.translateSelectedEditors,{args:[0,nt],checker:Ne}]]))}destroy(){me(this,ie,js).call(this),me(this,ie,oc).call(this),this._eventBus._off("editingaction",N(this,ge)),this._eventBus._off("pagechanging",N(this,se)),this._eventBus._off("scalechanging",N(this,W)),this._eventBus._off("rotationchanging",N(this,ee));for(const le of N(this,G).values())le.destroy();N(this,G).clear(),N(this,I).clear(),N(this,X).clear(),Ce(this,M,null),N(this,J).clear(),N(this,B).destroy(),N(this,ne).destroy()}get hcmFilter(){return(0,a.shadow)(this,"hcmFilter",N(this,ce)?N(this,z).addHCMFilter(N(this,ce).foreground,N(this,ce).background):"none")}get direction(){return(0,a.shadow)(this,"direction",getComputedStyle(N(this,Te)).direction)}editAltText(le){var Ne;(Ne=N(this,ne))==null||Ne.editAltText(this,le)}onPageChanging({pageNumber:le}){Ce(this,H,le-1)}focusMainContainer(){N(this,Te).focus()}findParent(le,Ne){for(const Ge of N(this,G).values()){const{x:nt,y:at,width:Ke,height:ae}=Ge.div.getBoundingClientRect();if(le>=nt&&le<=nt+Ke&&Ne>=at&&Ne<=at+ae)return Ge}return null}disableUserSelect(le=!1){N(this,oe).classList.toggle("noUserSelect",le)}addShouldRescale(le){N(this,X).add(le)}removeShouldRescale(le){N(this,X).delete(le)}onScaleChanging({scale:le}){this.commitOrRemove(),this.viewParameters.realScale=le*o.PixelsPerInch.PDF_TO_CSS_UNITS;for(const Ne of N(this,X))Ne.onScaleChanging()}onRotationChanging({pagesRotation:le}){this.commitOrRemove(),this.viewParameters.rotation=le}addToAnnotationStorage(le){!le.isEmpty()&&N(this,Q)&&!N(this,Q).has(le.id)&&N(this,Q).setValue(le.id,le)}blur(){if(!this.hasSelection)return;const{activeElement:le}=document;for(const Ne of N(this,J))if(Ne.div.contains(le)){Ce(this,K,[Ne,le]),Ne._focusEventsAllowed=!1;break}}focus(){if(!N(this,K))return;const[le,Ne]=N(this,K);Ce(this,K,null),Ne.addEventListener("focusin",()=>{le._focusEventsAllowed=!0},{once:!0}),Ne.focus()}addEditListeners(){me(this,ie,lc).call(this),me(this,ie,cc).call(this)}removeEditListeners(){me(this,ie,js).call(this),me(this,ie,uc).call(this)}copy(le){var Ge;if(le.preventDefault(),(Ge=N(this,M))==null||Ge.commitOrRemove(),!this.hasSelection)return;const Ne=[];for(const nt of N(this,J)){const at=nt.serialize(!0);at&&Ne.push(at)}Ne.length!==0&&le.clipboardData.setData("application/pdfjs",JSON.stringify(Ne))}cut(le){this.copy(le),this.delete()}paste(le){le.preventDefault();const{clipboardData:Ne}=le;for(const at of Ne.items)for(const Ke of N(this,F))if(Ke.isHandlingMimeForPasting(at.type)){Ke.paste(at,this.currentLayer);return}let Ge=Ne.getData("application/pdfjs");if(!Ge)return;try{Ge=JSON.parse(Ge)}catch(at){(0,a.warn)(`paste: "${at.message}".`);return}if(!Array.isArray(Ge))return;this.unselectAll();const nt=this.currentLayer;try{const at=[];for(const re of Ge){const he=nt.deserialize(re);if(!he)return;at.push(he)}const Ke=()=>{for(const re of at)me(this,ie,dc).call(this,re);me(this,ie,fc).call(this,at)},ae=()=>{for(const re of at)re.remove()};this.addCommands({cmd:Ke,undo:ae,mustExec:!0})}catch(at){(0,a.warn)(`paste: "${at.message}".`)}}keydown(le){var Ne;(Ne=this.getActive())!=null&&Ne.shouldGetKeyboardEvents()||pt._keyboardManager.exec(this,le)}onEditingAction(le){["undo","redo","delete","selectAll"].includes(le.name)&&this[le.name]()}setEditingState(le){le?(me(this,ie,wp).call(this),me(this,ie,lc).call(this),me(this,ie,cc).call(this),me(this,ie,An).call(this,{isEditing:N(this,te)!==a.AnnotationEditorType.NONE,isEmpty:me(this,ie,ha).call(this),hasSomethingToUndo:N(this,B).hasSomethingToUndo(),hasSomethingToRedo:N(this,B).hasSomethingToRedo(),hasSelectedEditor:!1})):(me(this,ie,oc).call(this),me(this,ie,js).call(this),me(this,ie,uc).call(this),me(this,ie,An).call(this,{isEditing:!1}),this.disableUserSelect(!1))}registerEditorTypes(le){if(!N(this,F)){Ce(this,F,le);for(const Ne of N(this,F))me(this,ie,pa).call(this,Ne.defaultPropertiesToUpdate)}}getId(){return N(this,L).getId()}get currentLayer(){return N(this,G).get(N(this,H))}getLayer(le){return N(this,G).get(le)}get currentPageIndex(){return N(this,H)}addLayer(le){N(this,G).set(le.pageIndex,le),N(this,$)?le.enable():le.disable()}removeLayer(le){N(this,G).delete(le.pageIndex)}updateMode(le,Ne=null){if(N(this,te)!==le){if(Ce(this,te,le),le===a.AnnotationEditorType.NONE){this.setEditingState(!1),me(this,ie,Ap).call(this);return}this.setEditingState(!0),me(this,ie,Cp).call(this),this.unselectAll();for(const Ge of N(this,G).values())Ge.updateMode(le);if(Ne){for(const Ge of N(this,I).values())if(Ge.annotationElementId===Ne){this.setSelected(Ge),Ge.enterInEditMode();break}}}}updateToolbar(le){le!==N(this,te)&&this._eventBus.dispatch("switchannotationeditormode",{source:this,mode:le})}updateParams(le,Ne){if(N(this,F)){if(le===a.AnnotationEditorParamsType.CREATE){this.currentLayer.addNewEditor(le);return}for(const Ge of N(this,J))Ge.updateParams(le,Ne);for(const Ge of N(this,F))Ge.updateDefaultParams(le,Ne)}}enableWaiting(le=!1){if(N(this,V)!==le){Ce(this,V,le);for(const Ne of N(this,G).values())le?Ne.disableClick():Ne.enableClick(),Ne.div.classList.toggle("waiting",le)}}getEditors(le){const Ne=[];for(const Ge of N(this,I).values())Ge.pageIndex===le&&Ne.push(Ge);return Ne}getEditor(le){return N(this,I).get(le)}addEditor(le){N(this,I).set(le.id,le)}removeEditor(le){var Ne;N(this,I).delete(le.id),this.unselect(le),(!le.annotationElementId||!N(this,Y).has(le.annotationElementId))&&((Ne=N(this,Q))==null||Ne.remove(le.id))}addDeletedAnnotationElement(le){N(this,Y).add(le.annotationElementId),le.deleted=!0}isDeletedAnnotationElement(le){return N(this,Y).has(le)}removeDeletedAnnotationElement(le){N(this,Y).delete(le.annotationElementId),le.deleted=!1}setActiveEditor(le){N(this,M)!==le&&(Ce(this,M,le),le&&me(this,ie,pa).call(this,le.propertiesToUpdate))}toggleSelected(le){if(N(this,J).has(le)){N(this,J).delete(le),le.unselect(),me(this,ie,An).call(this,{hasSelectedEditor:this.hasSelection});return}N(this,J).add(le),le.select(),me(this,ie,pa).call(this,le.propertiesToUpdate),me(this,ie,An).call(this,{hasSelectedEditor:!0})}setSelected(le){for(const Ne of N(this,J))Ne!==le&&Ne.unselect();N(this,J).clear(),N(this,J).add(le),le.select(),me(this,ie,pa).call(this,le.propertiesToUpdate),me(this,ie,An).call(this,{hasSelectedEditor:!0})}isSelected(le){return N(this,J).has(le)}unselect(le){le.unselect(),N(this,J).delete(le),me(this,ie,An).call(this,{hasSelectedEditor:this.hasSelection})}get hasSelection(){return N(this,J).size!==0}undo(){N(this,B).undo(),me(this,ie,An).call(this,{hasSomethingToUndo:N(this,B).hasSomethingToUndo(),hasSomethingToRedo:!0,isEmpty:me(this,ie,ha).call(this)})}redo(){N(this,B).redo(),me(this,ie,An).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:N(this,B).hasSomethingToRedo(),isEmpty:me(this,ie,ha).call(this)})}addCommands(le){N(this,B).add(le),me(this,ie,An).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:!1,isEmpty:me(this,ie,ha).call(this)})}delete(){if(this.commitOrRemove(),!this.hasSelection)return;const le=[...N(this,J)],Ne=()=>{for(const nt of le)nt.remove()},Ge=()=>{for(const nt of le)me(this,ie,dc).call(this,nt)};this.addCommands({cmd:Ne,undo:Ge,mustExec:!0})}commitOrRemove(){var le;(le=N(this,M))==null||le.commitOrRemove()}hasSomethingToControl(){return N(this,M)||this.hasSelection}selectAll(){for(const le of N(this,J))le.commit();me(this,ie,fc).call(this,N(this,I).values())}unselectAll(){if(N(this,M)){N(this,M).commitOrRemove();return}if(this.hasSelection){for(const le of N(this,J))le.unselect();N(this,J).clear(),me(this,ie,An).call(this,{hasSelectedEditor:!1})}}translateSelectedEditors(le,Ne,Ge=!1){if(Ge||this.commitOrRemove(),!this.hasSelection)return;N(this,pe)[0]+=le,N(this,pe)[1]+=Ne;const[nt,at]=N(this,pe),Ke=[...N(this,J)],ae=1e3;N(this,ve)&&clearTimeout(N(this,ve)),Ce(this,ve,setTimeout(()=>{Ce(this,ve,null),N(this,pe)[0]=N(this,pe)[1]=0,this.addCommands({cmd:()=>{for(const re of Ke)N(this,I).has(re.id)&&re.translateInPage(nt,at)},undo:()=>{for(const re of Ke)N(this,I).has(re.id)&&re.translateInPage(-nt,-at)},mustExec:!1})},ae));for(const re of Ke)re.translateInPage(le,Ne)}setUpDragSession(){if(this.hasSelection){this.disableUserSelect(!0),Ce(this,U,new Map);for(const le of N(this,J))N(this,U).set(le,{savedX:le.x,savedY:le.y,savedPageIndex:le.pageIndex,newX:0,newY:0,newPageIndex:-1})}}endDragSession(){if(!N(this,U))return!1;this.disableUserSelect(!1);const le=N(this,U);Ce(this,U,null);let Ne=!1;for(const[{x:nt,y:at,pageIndex:Ke},ae]of le)ae.newX=nt,ae.newY=at,ae.newPageIndex=Ke,Ne||(Ne=nt!==ae.savedX||at!==ae.savedY||Ke!==ae.savedPageIndex);if(!Ne)return!1;const Ge=(nt,at,Ke,ae)=>{if(N(this,I).has(nt.id)){const re=N(this,G).get(ae);re?nt._setParentAndPosition(re,at,Ke):(nt.pageIndex=ae,nt.x=at,nt.y=Ke)}};return this.addCommands({cmd:()=>{for(const[nt,{newX:at,newY:Ke,newPageIndex:ae}]of le)Ge(nt,at,Ke,ae)},undo:()=>{for(const[nt,{savedX:at,savedY:Ke,savedPageIndex:ae}]of le)Ge(nt,at,Ke,ae)},mustExec:!0}),!0}dragSelectedEditors(le,Ne){if(N(this,U))for(const Ge of N(this,U).keys())Ge.drag(le,Ne)}rebuild(le){if(le.parent===null){const Ne=this.getLayer(le.pageIndex);Ne?(Ne.changeParent(le),Ne.addOrRebuild(le)):(this.addEditor(le),this.addToAnnotationStorage(le),le.rebuild())}else le.parent.addOrRebuild(le)}isActive(le){return N(this,M)===le}getActive(){return N(this,M)}getMode(){return N(this,te)}get imageManager(){return(0,a.shadow)(this,"imageManager",new h)}};M=new WeakMap,I=new WeakMap,G=new WeakMap,ne=new WeakMap,Q=new WeakMap,B=new WeakMap,H=new WeakMap,Y=new WeakMap,U=new WeakMap,F=new WeakMap,X=new WeakMap,z=new WeakMap,L=new WeakMap,$=new WeakMap,V=new WeakMap,K=new WeakMap,te=new WeakMap,J=new WeakMap,ce=new WeakMap,ue=new WeakMap,we=new WeakMap,Ee=new WeakMap,De=new WeakMap,je=new WeakMap,Pe=new WeakMap,ge=new WeakMap,se=new WeakMap,W=new WeakMap,ee=new WeakMap,de=new WeakMap,pe=new WeakMap,ve=new WeakMap,Te=new WeakMap,oe=new WeakMap,ie=new WeakSet,wp=function(){window.addEventListener("focus",N(this,we)),window.addEventListener("blur",N(this,ue))},oc=function(){window.removeEventListener("focus",N(this,we)),window.removeEventListener("blur",N(this,ue))},lc=function(){window.addEventListener("keydown",N(this,Pe),{capture:!0})},js=function(){window.removeEventListener("keydown",N(this,Pe),{capture:!0})},cc=function(){document.addEventListener("copy",N(this,Ee)),document.addEventListener("cut",N(this,De)),document.addEventListener("paste",N(this,je))},uc=function(){document.removeEventListener("copy",N(this,Ee)),document.removeEventListener("cut",N(this,De)),document.removeEventListener("paste",N(this,je))},An=function(le){Object.entries(le).some(([Ge,nt])=>N(this,de)[Ge]!==nt)&&this._eventBus.dispatch("annotationeditorstateschanged",{source:this,details:Object.assign(N(this,de),le)})},pa=function(le){this._eventBus.dispatch("annotationeditorparamschanged",{source:this,details:le})},Cp=function(){if(!N(this,$)){Ce(this,$,!0);for(const le of N(this,G).values())le.enable()}},Ap=function(){if(this.unselectAll(),N(this,$)){Ce(this,$,!1);for(const le of N(this,G).values())le.disable()}},dc=function(le){const Ne=N(this,G).get(le.pageIndex);Ne?Ne.addOrRebuild(le):this.addEditor(le)},ha=function(){if(N(this,I).size===0)return!0;if(N(this,I).size===1)for(const le of N(this,I).values())return le.isEmpty();return!1},fc=function(le){N(this,J).clear();for(const Ne of le)Ne.isEmpty()||(N(this,J).add(Ne),Ne.select());me(this,ie,An).call(this,{hasSelectedEditor:!0})},kt(pt,"TRANSLATE_SMALL",1),kt(pt,"TRANSLATE_BIG",10);let b=pt;t.AnnotationEditorUIManager=b},(e,t,i)=>{var H,Y,U,F,X,z,L,$,V,K,te,J,gi,vi,pc,Ls,Ns,ma,ga;Object.defineProperty(t,"__esModule",{value:!0}),t.StatTimer=t.RenderingCancelledException=t.PixelsPerInch=t.PageViewport=t.PDFDateString=t.DOMStandardFontDataFactory=t.DOMSVGFactory=t.DOMFilterFactory=t.DOMCanvasFactory=t.DOMCMapReaderFactory=void 0,t.deprecated=R,t.getColorValues=I,t.getCurrentTransform=G,t.getCurrentTransformInverse=ne,t.getFilenameFromUrl=w,t.getPdfFilenameFromUrl=_,t.getRGB=M,t.getXfaPageViewport=P,t.isDataScheme=S,t.isPdfFile=E,t.isValidFetchUrl=k,t.loadScript=D,t.noContextMenu=A,t.setLayerDimensions=Q;var a=i(7),o=i(1);const l="http://www.w3.org/2000/svg",B=class B{};kt(B,"CSS",96),kt(B,"PDF",72),kt(B,"PDF_TO_CSS_UNITS",B.CSS/B.PDF);let u=B;t.PixelsPerInch=u;class f extends a.BaseFilterFactory{constructor({docId:W,ownerDocument:ee=globalThis.document}={}){super();Se(this,J);Se(this,H);Se(this,Y);Se(this,U);Se(this,F);Se(this,X);Se(this,z);Se(this,L);Se(this,$);Se(this,V);Se(this,K);Se(this,te,0);Ce(this,U,W),Ce(this,F,ee)}addFilter(W){if(!W)return"none";let ee=N(this,J,gi).get(W);if(ee)return ee;let de,pe,ve,Te;if(W.length===1){const Le=W[0],Ye=new Array(256);for(let qe=0;qe<256;qe++)Ye[qe]=Le[qe]/255;Te=de=pe=ve=Ye.join(",")}else{const[Le,Ye,qe]=W,it=new Array(256),We=new Array(256),Je=new Array(256);for(let ct=0;ct<256;ct++)it[ct]=Le[ct]/255,We[ct]=Ye[ct]/255,Je[ct]=qe[ct]/255;de=it.join(","),pe=We.join(","),ve=Je.join(","),Te=`${de}${pe}${ve}`}if(ee=N(this,J,gi).get(Te),ee)return N(this,J,gi).set(W,ee),ee;const oe=`g_${N(this,U)}_transfer_map_${fa(this,te)._++}`,ie=`url(#${oe})`;N(this,J,gi).set(W,ie),N(this,J,gi).set(Te,ie);const Fe=me(this,J,Ls).call(this,oe);return me(this,J,ma).call(this,de,pe,ve,Fe),ie}addHCMFilter(W,ee){var Ye;const de=`${W}-${ee}`;if(N(this,z)===de)return N(this,L);if(Ce(this,z,de),Ce(this,L,"none"),(Ye=N(this,X))==null||Ye.remove(),!W||!ee)return N(this,L);const pe=me(this,J,ga).call(this,W);W=o.Util.makeHexColor(...pe);const ve=me(this,J,ga).call(this,ee);if(ee=o.Util.makeHexColor(...ve),N(this,J,vi).style.color="",W==="#000000"&&ee==="#ffffff"||W===ee)return N(this,L);const Te=new Array(256);for(let qe=0;qe<=255;qe++){const it=qe/255;Te[qe]=it<=.03928?it/12.92:((it+.055)/1.055)**2.4}const oe=Te.join(","),ie=`g_${N(this,U)}_hcm_filter`,Fe=Ce(this,$,me(this,J,Ls).call(this,ie));me(this,J,ma).call(this,oe,oe,oe,Fe),me(this,J,pc).call(this,Fe);const Le=(qe,it)=>{const We=pe[qe]/255,Je=ve[qe]/255,ct=new Array(it+1);for(let ot=0;ot<=it;ot++)ct[ot]=We+ot/it*(Je-We);return ct.join(",")};return me(this,J,ma).call(this,Le(0,5),Le(1,5),Le(2,5),Fe),Ce(this,L,`url(#${ie})`),N(this,L)}addHighlightHCMFilter(W,ee,de,pe){var Je;const ve=`${W}-${ee}-${de}-${pe}`;if(N(this,V)===ve)return N(this,K);if(Ce(this,V,ve),Ce(this,K,"none"),(Je=N(this,$))==null||Je.remove(),!W||!ee)return N(this,K);const[Te,oe]=[W,ee].map(me(this,J,ga).bind(this));let ie=Math.round(.2126*Te[0]+.7152*Te[1]+.0722*Te[2]),Fe=Math.round(.2126*oe[0]+.7152*oe[1]+.0722*oe[2]),[Le,Ye]=[de,pe].map(me(this,J,ga).bind(this));Fe<ie&&([ie,Fe,Le,Ye]=[Fe,ie,Ye,Le]),N(this,J,vi).style.color="";const qe=(ct,ot,Oe)=>{const ye=new Array(256),xe=(Fe-ie)/Oe,Qe=ct/255,pt=(ot-ct)/(255*Oe);let ht=0;for(let le=0;le<=Oe;le++){const Ne=Math.round(ie+le*xe),Ge=Qe+le*pt;for(let nt=ht;nt<=Ne;nt++)ye[nt]=Ge;ht=Ne+1}for(let le=ht;le<256;le++)ye[le]=ye[ht-1];return ye.join(",")},it=`g_${N(this,U)}_hcm_highlight_filter`,We=Ce(this,$,me(this,J,Ls).call(this,it));return me(this,J,pc).call(this,We),me(this,J,ma).call(this,qe(Le[0],Ye[0],5),qe(Le[1],Ye[1],5),qe(Le[2],Ye[2],5),We),Ce(this,K,`url(#${it})`),N(this,K)}destroy(W=!1){W&&(N(this,L)||N(this,K))||(N(this,Y)&&(N(this,Y).parentNode.parentNode.remove(),Ce(this,Y,null)),N(this,H)&&(N(this,H).clear(),Ce(this,H,null)),Ce(this,te,0))}}H=new WeakMap,Y=new WeakMap,U=new WeakMap,F=new WeakMap,X=new WeakMap,z=new WeakMap,L=new WeakMap,$=new WeakMap,V=new WeakMap,K=new WeakMap,te=new WeakMap,J=new WeakSet,gi=function(){return N(this,H)||Ce(this,H,new Map)},vi=function(){if(!N(this,Y)){const W=N(this,F).createElement("div"),{style:ee}=W;ee.visibility="hidden",ee.contain="strict",ee.width=ee.height=0,ee.position="absolute",ee.top=ee.left=0,ee.zIndex=-1;const de=N(this,F).createElementNS(l,"svg");de.setAttribute("width",0),de.setAttribute("height",0),Ce(this,Y,N(this,F).createElementNS(l,"defs")),W.append(de),de.append(N(this,Y)),N(this,F).body.append(W)}return N(this,Y)},pc=function(W){const ee=N(this,F).createElementNS(l,"feColorMatrix");ee.setAttribute("type","matrix"),ee.setAttribute("values","0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0 0 0 1 0"),W.append(ee)},Ls=function(W){const ee=N(this,F).createElementNS(l,"filter");return ee.setAttribute("color-interpolation-filters","sRGB"),ee.setAttribute("id",W),N(this,J,vi).append(ee),ee},Ns=function(W,ee,de){const pe=N(this,F).createElementNS(l,ee);pe.setAttribute("type","discrete"),pe.setAttribute("tableValues",de),W.append(pe)},ma=function(W,ee,de,pe){const ve=N(this,F).createElementNS(l,"feComponentTransfer");pe.append(ve),me(this,J,Ns).call(this,ve,"feFuncR",W),me(this,J,Ns).call(this,ve,"feFuncG",ee),me(this,J,Ns).call(this,ve,"feFuncB",de)},ga=function(W){return N(this,J,vi).style.color=W,M(getComputedStyle(N(this,J,vi)).getPropertyValue("color"))},t.DOMFilterFactory=f;class h extends a.BaseCanvasFactory{constructor({ownerDocument:se=globalThis.document}={}){super(),this._document=se}_createCanvas(se,W){const ee=this._document.createElement("canvas");return ee.width=se,ee.height=W,ee}}t.DOMCanvasFactory=h;async function p(ge,se=!1){if(k(ge,document.baseURI)){const W=await fetch(ge);if(!W.ok)throw new Error(W.statusText);return se?new Uint8Array(await W.arrayBuffer()):(0,o.stringToBytes)(await W.text())}return new Promise((W,ee)=>{const de=new XMLHttpRequest;de.open("GET",ge,!0),se&&(de.responseType="arraybuffer"),de.onreadystatechange=()=>{if(de.readyState===XMLHttpRequest.DONE){if(de.status===200||de.status===0){let pe;if(se&&de.response?pe=new Uint8Array(de.response):!se&&de.responseText&&(pe=(0,o.stringToBytes)(de.responseText)),pe){W(pe);return}}ee(new Error(de.statusText))}},de.send(null)})}class m extends a.BaseCMapReaderFactory{_fetchData(se,W){return p(se,this.isCompressed).then(ee=>({cMapData:ee,compressionType:W}))}}t.DOMCMapReaderFactory=m;class g extends a.BaseStandardFontDataFactory{_fetchData(se){return p(se,!0)}}t.DOMStandardFontDataFactory=g;class b extends a.BaseSVGFactory{_createSVG(se){return document.createElementNS(l,se)}}t.DOMSVGFactory=b;class x{constructor({viewBox:se,scale:W,rotation:ee,offsetX:de=0,offsetY:pe=0,dontFlip:ve=!1}){this.viewBox=se,this.scale=W,this.rotation=ee,this.offsetX=de,this.offsetY=pe;const Te=(se[2]+se[0])/2,oe=(se[3]+se[1])/2;let ie,Fe,Le,Ye;switch(ee%=360,ee<0&&(ee+=360),ee){case 180:ie=-1,Fe=0,Le=0,Ye=1;break;case 90:ie=0,Fe=1,Le=1,Ye=0;break;case 270:ie=0,Fe=-1,Le=-1,Ye=0;break;case 0:ie=1,Fe=0,Le=0,Ye=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}ve&&(Le=-Le,Ye=-Ye);let qe,it,We,Je;ie===0?(qe=Math.abs(oe-se[1])*W+de,it=Math.abs(Te-se[0])*W+pe,We=(se[3]-se[1])*W,Je=(se[2]-se[0])*W):(qe=Math.abs(Te-se[0])*W+de,it=Math.abs(oe-se[1])*W+pe,We=(se[2]-se[0])*W,Je=(se[3]-se[1])*W),this.transform=[ie*W,Fe*W,Le*W,Ye*W,qe-ie*W*Te-Le*W*oe,it-Fe*W*Te-Ye*W*oe],this.width=We,this.height=Je}get rawDims(){const{viewBox:se}=this;return(0,o.shadow)(this,"rawDims",{pageWidth:se[2]-se[0],pageHeight:se[3]-se[1],pageX:se[0],pageY:se[1]})}clone({scale:se=this.scale,rotation:W=this.rotation,offsetX:ee=this.offsetX,offsetY:de=this.offsetY,dontFlip:pe=!1}={}){return new x({viewBox:this.viewBox.slice(),scale:se,rotation:W,offsetX:ee,offsetY:de,dontFlip:pe})}convertToViewportPoint(se,W){return o.Util.applyTransform([se,W],this.transform)}convertToViewportRectangle(se){const W=o.Util.applyTransform([se[0],se[1]],this.transform),ee=o.Util.applyTransform([se[2],se[3]],this.transform);return[W[0],W[1],ee[0],ee[1]]}convertToPdfPoint(se,W){return o.Util.applyInverseTransform([se,W],this.transform)}}t.PageViewport=x;class y extends o.BaseException{constructor(se,W=0){super(se,"RenderingCancelledException"),this.extraDelay=W}}t.RenderingCancelledException=y;function S(ge){const se=ge.length;let W=0;for(;W<se&&ge[W].trim()==="";)W++;return ge.substring(W,W+5).toLowerCase()==="data:"}function E(ge){return typeof ge=="string"&&/\.pdf$/i.test(ge)}function w(ge,se=!1){return se||([ge]=ge.split(/[#?]/,1)),ge.substring(ge.lastIndexOf("/")+1)}function _(ge,se="document.pdf"){if(typeof ge!="string")return se;if(S(ge))return(0,o.warn)('getPdfFilenameFromUrl: ignore "data:"-URL for performance reasons.'),se;const W=/^(?:(?:[^:]+:)?\/\/[^/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/,ee=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i,de=W.exec(ge);let pe=ee.exec(de[1])||ee.exec(de[2])||ee.exec(de[3]);if(pe&&(pe=pe[0],pe.includes("%")))try{pe=ee.exec(decodeURIComponent(pe))[0]}catch{}return pe||se}class O{constructor(){kt(this,"started",Object.create(null));kt(this,"times",[])}time(se){se in this.started&&(0,o.warn)(`Timer is already running for ${se}`),this.started[se]=Date.now()}timeEnd(se){se in this.started||(0,o.warn)(`Timer has not been started for ${se}`),this.times.push({name:se,start:this.started[se],end:Date.now()}),delete this.started[se]}toString(){const se=[];let W=0;for(const{name:ee}of this.times)W=Math.max(ee.length,W);for(const{name:ee,start:de,end:pe}of this.times)se.push(`${ee.padEnd(W)} ${pe-de}ms
|
||
`);return se.join("")}}t.StatTimer=O;function k(ge,se){try{const{protocol:W}=se?new URL(ge,se):new URL(ge);return W==="http:"||W==="https:"}catch{return!1}}function A(ge){ge.preventDefault()}function D(ge,se=!1){return new Promise((W,ee)=>{const de=document.createElement("script");de.src=ge,de.onload=function(pe){se&&de.remove(),W(pe)},de.onerror=function(){ee(new Error(`Cannot load script at: ${de.src}`))},(document.head||document.documentElement).append(de)})}function R(ge){console.log("Deprecated API usage: "+ge)}let T;class j{static toDateObject(se){if(!se||typeof se!="string")return null;T||(T=new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"));const W=T.exec(se);if(!W)return null;const ee=parseInt(W[1],10);let de=parseInt(W[2],10);de=de>=1&&de<=12?de-1:0;let pe=parseInt(W[3],10);pe=pe>=1&&pe<=31?pe:1;let ve=parseInt(W[4],10);ve=ve>=0&&ve<=23?ve:0;let Te=parseInt(W[5],10);Te=Te>=0&&Te<=59?Te:0;let oe=parseInt(W[6],10);oe=oe>=0&&oe<=59?oe:0;const ie=W[7]||"Z";let Fe=parseInt(W[8],10);Fe=Fe>=0&&Fe<=23?Fe:0;let Le=parseInt(W[9],10)||0;return Le=Le>=0&&Le<=59?Le:0,ie==="-"?(ve+=Fe,Te+=Le):ie==="+"&&(ve-=Fe,Te-=Le),new Date(Date.UTC(ee,de,pe,ve,Te,oe))}}t.PDFDateString=j;function P(ge,{scale:se=1,rotation:W=0}){const{width:ee,height:de}=ge.attributes.style,pe=[0,0,parseInt(ee),parseInt(de)];return new x({viewBox:pe,scale:se,rotation:W})}function M(ge){if(ge.startsWith("#")){const se=parseInt(ge.slice(1),16);return[(se&16711680)>>16,(se&65280)>>8,se&255]}return ge.startsWith("rgb(")?ge.slice(4,-1).split(",").map(se=>parseInt(se)):ge.startsWith("rgba(")?ge.slice(5,-1).split(",").map(se=>parseInt(se)).slice(0,3):((0,o.warn)(`Not a valid color format: "${ge}"`),[0,0,0])}function I(ge){const se=document.createElement("span");se.style.visibility="hidden",document.body.append(se);for(const W of ge.keys()){se.style.color=W;const ee=window.getComputedStyle(se).color;ge.set(W,M(ee))}se.remove()}function G(ge){const{a:se,b:W,c:ee,d:de,e:pe,f:ve}=ge.getTransform();return[se,W,ee,de,pe,ve]}function ne(ge){const{a:se,b:W,c:ee,d:de,e:pe,f:ve}=ge.getTransform().invertSelf();return[se,W,ee,de,pe,ve]}function Q(ge,se,W=!1,ee=!0){if(se instanceof x){const{pageWidth:de,pageHeight:pe}=se.rawDims,{style:ve}=ge,Te=o.FeatureTest.isCSSRoundSupported,oe=`var(--scale-factor) * ${de}px`,ie=`var(--scale-factor) * ${pe}px`,Fe=Te?`round(${oe}, 1px)`:`calc(${oe})`,Le=Te?`round(${ie}, 1px)`:`calc(${ie})`;!W||se.rotation%180===0?(ve.width=Fe,ve.height=Le):(ve.width=Le,ve.height=Fe)}ee&&ge.setAttribute("data-main-rotation",se.rotation)}},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BaseStandardFontDataFactory=t.BaseSVGFactory=t.BaseFilterFactory=t.BaseCanvasFactory=t.BaseCMapReaderFactory=void 0;var a=i(1);class o{constructor(){this.constructor===o&&(0,a.unreachable)("Cannot initialize BaseFilterFactory.")}addFilter(m){return"none"}addHCMFilter(m,g){return"none"}addHighlightHCMFilter(m,g,b,x){return"none"}destroy(m=!1){}}t.BaseFilterFactory=o;class l{constructor(){this.constructor===l&&(0,a.unreachable)("Cannot initialize BaseCanvasFactory.")}create(m,g){if(m<=0||g<=0)throw new Error("Invalid canvas size");const b=this._createCanvas(m,g);return{canvas:b,context:b.getContext("2d")}}reset(m,g,b){if(!m.canvas)throw new Error("Canvas is not specified");if(g<=0||b<=0)throw new Error("Invalid canvas size");m.canvas.width=g,m.canvas.height=b}destroy(m){if(!m.canvas)throw new Error("Canvas is not specified");m.canvas.width=0,m.canvas.height=0,m.canvas=null,m.context=null}_createCanvas(m,g){(0,a.unreachable)("Abstract method `_createCanvas` called.")}}t.BaseCanvasFactory=l;class u{constructor({baseUrl:m=null,isCompressed:g=!0}){this.constructor===u&&(0,a.unreachable)("Cannot initialize BaseCMapReaderFactory."),this.baseUrl=m,this.isCompressed=g}async fetch({name:m}){if(!this.baseUrl)throw new Error('The CMap "baseUrl" parameter must be specified, ensure that the "cMapUrl" and "cMapPacked" API parameters are provided.');if(!m)throw new Error("CMap name must be specified.");const g=this.baseUrl+m+(this.isCompressed?".bcmap":""),b=this.isCompressed?a.CMapCompressionType.BINARY:a.CMapCompressionType.NONE;return this._fetchData(g,b).catch(x=>{throw new Error(`Unable to load ${this.isCompressed?"binary ":""}CMap at: ${g}`)})}_fetchData(m,g){(0,a.unreachable)("Abstract method `_fetchData` called.")}}t.BaseCMapReaderFactory=u;class f{constructor({baseUrl:m=null}){this.constructor===f&&(0,a.unreachable)("Cannot initialize BaseStandardFontDataFactory."),this.baseUrl=m}async fetch({filename:m}){if(!this.baseUrl)throw new Error('The standard font "baseUrl" parameter must be specified, ensure that the "standardFontDataUrl" API parameter is provided.');if(!m)throw new Error("Font filename must be specified.");const g=`${this.baseUrl}${m}`;return this._fetchData(g).catch(b=>{throw new Error(`Unable to load font data at: ${g}`)})}_fetchData(m){(0,a.unreachable)("Abstract method `_fetchData` called.")}}t.BaseStandardFontDataFactory=f;class h{constructor(){this.constructor===h&&(0,a.unreachable)("Cannot initialize BaseSVGFactory.")}create(m,g,b=!1){if(m<=0||g<=0)throw new Error("Invalid SVG dimensions");const x=this._createSVG("svg:svg");return x.setAttribute("version","1.1"),b||(x.setAttribute("width",`${m}px`),x.setAttribute("height",`${g}px`)),x.setAttribute("preserveAspectRatio","none"),x.setAttribute("viewBox",`0 0 ${m} ${g}`),x}createElement(m){if(typeof m!="string")throw new Error("Invalid SVG element type");return this._createSVG(m)}_createSVG(m){(0,a.unreachable)("Abstract method `_createSVG` called.")}}t.BaseSVGFactory=h},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MurmurHash3_64=void 0;var a=i(1);const o=3285377520,l=4294901760,u=65535;class f{constructor(p){this.h1=p?p&4294967295:o,this.h2=p?p&4294967295:o}update(p){let m,g;if(typeof p=="string"){m=new Uint8Array(p.length*2),g=0;for(let R=0,T=p.length;R<T;R++){const j=p.charCodeAt(R);j<=255?m[g++]=j:(m[g++]=j>>>8,m[g++]=j&255)}}else if((0,a.isArrayBuffer)(p))m=p.slice(),g=m.byteLength;else throw new Error("Wrong data format in MurmurHash3_64_update. Input must be a string or array.");const b=g>>2,x=g-b*4,y=new Uint32Array(m.buffer,0,b);let S=0,E=0,w=this.h1,_=this.h2;const O=3432918353,k=461845907,A=O&u,D=k&u;for(let R=0;R<b;R++)R&1?(S=y[R],S=S*O&l|S*A&u,S=S<<15|S>>>17,S=S*k&l|S*D&u,w^=S,w=w<<13|w>>>19,w=w*5+3864292196):(E=y[R],E=E*O&l|E*A&u,E=E<<15|E>>>17,E=E*k&l|E*D&u,_^=E,_=_<<13|_>>>19,_=_*5+3864292196);switch(S=0,x){case 3:S^=m[b*4+2]<<16;case 2:S^=m[b*4+1]<<8;case 1:S^=m[b*4],S=S*O&l|S*A&u,S=S<<15|S>>>17,S=S*k&l|S*D&u,b&1?w^=S:_^=S}this.h1=w,this.h2=_}hexdigest(){let p=this.h1,m=this.h2;return p^=m>>>1,p=p*3981806797&l|p*36045&u,m=m*4283543511&l|((m<<16|p>>>16)*2950163797&l)>>>16,p^=m>>>1,p=p*444984403&l|p*60499&u,m=m*3301882366&l|((m<<16|p>>>16)*3120437893&l)>>>16,p^=m>>>1,(p>>>0).toString(16).padStart(8,"0")+(m>>>0).toString(16).padStart(8,"0")}}t.MurmurHash3_64=f},(e,t,i)=>{var u;Object.defineProperty(t,"__esModule",{value:!0}),t.FontLoader=t.FontFaceObject=void 0;var a=i(1);class o{constructor({ownerDocument:h=globalThis.document,styleElement:p=null}){Se(this,u,new Set);this._document=h,this.nativeFontFaces=new Set,this.styleElement=null,this.loadingRequests=[],this.loadTestFontId=0}addNativeFontFace(h){this.nativeFontFaces.add(h),this._document.fonts.add(h)}removeNativeFontFace(h){this.nativeFontFaces.delete(h),this._document.fonts.delete(h)}insertRule(h){this.styleElement||(this.styleElement=this._document.createElement("style"),this._document.documentElement.getElementsByTagName("head")[0].append(this.styleElement));const p=this.styleElement.sheet;p.insertRule(h,p.cssRules.length)}clear(){for(const h of this.nativeFontFaces)this._document.fonts.delete(h);this.nativeFontFaces.clear(),N(this,u).clear(),this.styleElement&&(this.styleElement.remove(),this.styleElement=null)}async loadSystemFont(h){if(!(!h||N(this,u).has(h.loadedName))){if((0,a.assert)(!this.disableFontFace,"loadSystemFont shouldn't be called when `disableFontFace` is set."),this.isFontLoadingAPISupported){const{loadedName:p,src:m,style:g}=h,b=new FontFace(p,m,g);this.addNativeFontFace(b);try{await b.load(),N(this,u).add(p)}catch{(0,a.warn)(`Cannot load system font: ${h.baseFontName}, installing it could help to improve PDF rendering.`),this.removeNativeFontFace(b)}return}(0,a.unreachable)("Not implemented: loadSystemFont without the Font Loading API.")}}async bind(h){if(h.attached||h.missingFile&&!h.systemFontInfo)return;if(h.attached=!0,h.systemFontInfo){await this.loadSystemFont(h.systemFontInfo);return}if(this.isFontLoadingAPISupported){const m=h.createNativeFontFace();if(m){this.addNativeFontFace(m);try{await m.loaded}catch(g){throw(0,a.warn)(`Failed to load font '${m.family}': '${g}'.`),h.disableFontFace=!0,g}}return}const p=h.createFontFaceRule();if(p){if(this.insertRule(p),this.isSyncFontLoadingSupported)return;await new Promise(m=>{const g=this._queueLoadingCallback(m);this._prepareFontLoadEvent(h,g)})}}get isFontLoadingAPISupported(){var p;const h=!!((p=this._document)!=null&&p.fonts);return(0,a.shadow)(this,"isFontLoadingAPISupported",h)}get isSyncFontLoadingSupported(){let h=!1;return(a.isNodeJS||typeof navigator<"u"&&/Mozilla\/5.0.*?rv:\d+.*? Gecko/.test(navigator.userAgent))&&(h=!0),(0,a.shadow)(this,"isSyncFontLoadingSupported",h)}_queueLoadingCallback(h){function p(){for((0,a.assert)(!g.done,"completeRequest() cannot be called twice."),g.done=!0;m.length>0&&m[0].done;){const b=m.shift();setTimeout(b.callback,0)}}const{loadingRequests:m}=this,g={done:!1,complete:p,callback:h};return m.push(g),g}get _loadTestFont(){const h=atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA==");return(0,a.shadow)(this,"_loadTestFont",h)}_prepareFontLoadEvent(h,p){function m(M,I){return M.charCodeAt(I)<<24|M.charCodeAt(I+1)<<16|M.charCodeAt(I+2)<<8|M.charCodeAt(I+3)&255}function g(M,I,G,ne){const Q=M.substring(0,I),B=M.substring(I+G);return Q+ne+B}let b,x;const y=this._document.createElement("canvas");y.width=1,y.height=1;const S=y.getContext("2d");let E=0;function w(M,I){if(++E>30){(0,a.warn)("Load test font never loaded."),I();return}if(S.font="30px "+M,S.fillText(".",0,20),S.getImageData(0,0,1,1).data[3]>0){I();return}setTimeout(w.bind(null,M,I))}const _=`lt${Date.now()}${this.loadTestFontId++}`;let O=this._loadTestFont;O=g(O,976,_.length,_);const A=16,D=1482184792;let R=m(O,A);for(b=0,x=_.length-3;b<x;b+=4)R=R-D+m(_,b)|0;b<_.length&&(R=R-D+m(_+"XXX",b)|0),O=g(O,A,4,(0,a.string32)(R));const T=`url(data:font/opentype;base64,${btoa(O)});`,j=`@font-face {font-family:"${_}";src:${T}}`;this.insertRule(j);const P=this._document.createElement("div");P.style.visibility="hidden",P.style.width=P.style.height="10px",P.style.position="absolute",P.style.top=P.style.left="0px";for(const M of[h.loadedName,_]){const I=this._document.createElement("span");I.textContent="Hi",I.style.fontFamily=M,P.append(I)}this._document.body.append(P),w(_,()=>{P.remove(),p.complete()})}}u=new WeakMap,t.FontLoader=o;class l{constructor(h,{isEvalSupported:p=!0,disableFontFace:m=!1,ignoreErrors:g=!1,inspectFont:b=null}){this.compiledGlyphs=Object.create(null);for(const x in h)this[x]=h[x];this.isEvalSupported=p!==!1,this.disableFontFace=m===!0,this.ignoreErrors=g===!0,this._inspectFont=b}createNativeFontFace(){var p;if(!this.data||this.disableFontFace)return null;let h;if(!this.cssFontInfo)h=new FontFace(this.loadedName,this.data,{});else{const m={weight:this.cssFontInfo.fontWeight};this.cssFontInfo.italicAngle&&(m.style=`oblique ${this.cssFontInfo.italicAngle}deg`),h=new FontFace(this.cssFontInfo.fontFamily,this.data,m)}return(p=this._inspectFont)==null||p.call(this,this),h}createFontFaceRule(){var g;if(!this.data||this.disableFontFace)return null;const h=(0,a.bytesToString)(this.data),p=`url(data:${this.mimetype};base64,${btoa(h)});`;let m;if(!this.cssFontInfo)m=`@font-face {font-family:"${this.loadedName}";src:${p}}`;else{let b=`font-weight: ${this.cssFontInfo.fontWeight};`;this.cssFontInfo.italicAngle&&(b+=`font-style: oblique ${this.cssFontInfo.italicAngle}deg;`),m=`@font-face {font-family:"${this.cssFontInfo.fontFamily}";${b}src:${p}}`}return(g=this._inspectFont)==null||g.call(this,this,p),m}getPathGenerator(h,p){if(this.compiledGlyphs[p]!==void 0)return this.compiledGlyphs[p];let m;try{m=h.get(this.loadedName+"_path_"+p)}catch(g){if(!this.ignoreErrors)throw g;return(0,a.warn)(`getPathGenerator - ignoring character: "${g}".`),this.compiledGlyphs[p]=function(b,x){}}if(this.isEvalSupported&&a.FeatureTest.isEvalSupported){const g=[];for(const b of m){const x=b.args!==void 0?b.args.join(","):"";g.push("c.",b.cmd,"(",x,`);
|
||
`)}return this.compiledGlyphs[p]=new Function("c","size",g.join(""))}return this.compiledGlyphs[p]=function(g,b){for(const x of m)x.cmd==="scale"&&(x.args=[b,-b]),g[x.cmd].apply(g,x.args)}}}t.FontFaceObject=l},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NodeStandardFontDataFactory=t.NodeFilterFactory=t.NodeCanvasFactory=t.NodeCMapReaderFactory=void 0;var a=i(7);i(1);const o=function(p){return new Promise((m,g)=>{require$$5.readFile(p,(x,y)=>{if(x||!y){g(new Error(x));return}m(new Uint8Array(y))})})};class l extends a.BaseFilterFactory{}t.NodeFilterFactory=l;class u extends a.BaseCanvasFactory{_createCanvas(m,g){return require$$5.createCanvas(m,g)}}t.NodeCanvasFactory=u;class f extends a.BaseCMapReaderFactory{_fetchData(m,g){return o(m).then(b=>({cMapData:b,compressionType:g}))}}t.NodeCMapReaderFactory=f;class h extends a.BaseStandardFontDataFactory{_fetchData(m){return o(m)}}t.NodeStandardFontDataFactory=h},(e,t,i)=>{var Y,hc,mc;Object.defineProperty(t,"__esModule",{value:!0}),t.CanvasGraphics=void 0;var a=i(1),o=i(6),l=i(12),u=i(13);const f=16,h=100,p=4096,m=15,g=10,b=1e3,x=16;function y(z,L){if(z._removeMirroring)throw new Error("Context is already forwarding operations.");z.__originalSave=z.save,z.__originalRestore=z.restore,z.__originalRotate=z.rotate,z.__originalScale=z.scale,z.__originalTranslate=z.translate,z.__originalTransform=z.transform,z.__originalSetTransform=z.setTransform,z.__originalResetTransform=z.resetTransform,z.__originalClip=z.clip,z.__originalMoveTo=z.moveTo,z.__originalLineTo=z.lineTo,z.__originalBezierCurveTo=z.bezierCurveTo,z.__originalRect=z.rect,z.__originalClosePath=z.closePath,z.__originalBeginPath=z.beginPath,z._removeMirroring=()=>{z.save=z.__originalSave,z.restore=z.__originalRestore,z.rotate=z.__originalRotate,z.scale=z.__originalScale,z.translate=z.__originalTranslate,z.transform=z.__originalTransform,z.setTransform=z.__originalSetTransform,z.resetTransform=z.__originalResetTransform,z.clip=z.__originalClip,z.moveTo=z.__originalMoveTo,z.lineTo=z.__originalLineTo,z.bezierCurveTo=z.__originalBezierCurveTo,z.rect=z.__originalRect,z.closePath=z.__originalClosePath,z.beginPath=z.__originalBeginPath,delete z._removeMirroring},z.save=function(){L.save(),this.__originalSave()},z.restore=function(){L.restore(),this.__originalRestore()},z.translate=function(V,K){L.translate(V,K),this.__originalTranslate(V,K)},z.scale=function(V,K){L.scale(V,K),this.__originalScale(V,K)},z.transform=function(V,K,te,J,ce,ue){L.transform(V,K,te,J,ce,ue),this.__originalTransform(V,K,te,J,ce,ue)},z.setTransform=function(V,K,te,J,ce,ue){L.setTransform(V,K,te,J,ce,ue),this.__originalSetTransform(V,K,te,J,ce,ue)},z.resetTransform=function(){L.resetTransform(),this.__originalResetTransform()},z.rotate=function(V){L.rotate(V),this.__originalRotate(V)},z.clip=function(V){L.clip(V),this.__originalClip(V)},z.moveTo=function($,V){L.moveTo($,V),this.__originalMoveTo($,V)},z.lineTo=function($,V){L.lineTo($,V),this.__originalLineTo($,V)},z.bezierCurveTo=function($,V,K,te,J,ce){L.bezierCurveTo($,V,K,te,J,ce),this.__originalBezierCurveTo($,V,K,te,J,ce)},z.rect=function($,V,K,te){L.rect($,V,K,te),this.__originalRect($,V,K,te)},z.closePath=function(){L.closePath(),this.__originalClosePath()},z.beginPath=function(){L.beginPath(),this.__originalBeginPath()}}class S{constructor(L){this.canvasFactory=L,this.cache=Object.create(null)}getCanvas(L,$,V){let K;return this.cache[L]!==void 0?(K=this.cache[L],this.canvasFactory.reset(K,$,V)):(K=this.canvasFactory.create($,V),this.cache[L]=K),K}delete(L){delete this.cache[L]}clear(){for(const L in this.cache){const $=this.cache[L];this.canvasFactory.destroy($),delete this.cache[L]}}}function E(z,L,$,V,K,te,J,ce,ue,we){const[Ee,De,je,Pe,ge,se]=(0,o.getCurrentTransform)(z);if(De===0&&je===0){const de=J*Ee+ge,pe=Math.round(de),ve=ce*Pe+se,Te=Math.round(ve),oe=(J+ue)*Ee+ge,ie=Math.abs(Math.round(oe)-pe)||1,Fe=(ce+we)*Pe+se,Le=Math.abs(Math.round(Fe)-Te)||1;return z.setTransform(Math.sign(Ee),0,0,Math.sign(Pe),pe,Te),z.drawImage(L,$,V,K,te,0,0,ie,Le),z.setTransform(Ee,De,je,Pe,ge,se),[ie,Le]}if(Ee===0&&Pe===0){const de=ce*je+ge,pe=Math.round(de),ve=J*De+se,Te=Math.round(ve),oe=(ce+we)*je+ge,ie=Math.abs(Math.round(oe)-pe)||1,Fe=(J+ue)*De+se,Le=Math.abs(Math.round(Fe)-Te)||1;return z.setTransform(0,Math.sign(De),Math.sign(je),0,pe,Te),z.drawImage(L,$,V,K,te,0,0,Le,ie),z.setTransform(Ee,De,je,Pe,ge,se),[Le,ie]}z.drawImage(L,$,V,K,te,J,ce,ue,we);const W=Math.hypot(Ee,De),ee=Math.hypot(je,Pe);return[W*ue,ee*we]}function w(z){const{width:L,height:$}=z;if(L>b||$>b)return null;const V=1e3,K=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),te=L+1;let J=new Uint8Array(te*($+1)),ce,ue,we;const Ee=L+7&-8;let De=new Uint8Array(Ee*$),je=0;for(const ee of z.data){let de=128;for(;de>0;)De[je++]=ee&de?0:255,de>>=1}let Pe=0;for(je=0,De[je]!==0&&(J[0]=1,++Pe),ue=1;ue<L;ue++)De[je]!==De[je+1]&&(J[ue]=De[je]?2:1,++Pe),je++;for(De[je]!==0&&(J[ue]=2,++Pe),ce=1;ce<$;ce++){je=ce*Ee,we=ce*te,De[je-Ee]!==De[je]&&(J[we]=De[je]?1:8,++Pe);let ee=(De[je]?4:0)+(De[je-Ee]?8:0);for(ue=1;ue<L;ue++)ee=(ee>>2)+(De[je+1]?4:0)+(De[je-Ee+1]?8:0),K[ee]&&(J[we+ue]=K[ee],++Pe),je++;if(De[je-Ee]!==De[je]&&(J[we+ue]=De[je]?2:4,++Pe),Pe>V)return null}for(je=Ee*($-1),we=ce*te,De[je]!==0&&(J[we]=8,++Pe),ue=1;ue<L;ue++)De[je]!==De[je+1]&&(J[we+ue]=De[je]?4:8,++Pe),je++;if(De[je]!==0&&(J[we+ue]=4,++Pe),Pe>V)return null;const ge=new Int32Array([0,te,-1,0,-te,0,0,0,1]),se=new Path2D;for(ce=0;Pe&&ce<=$;ce++){let ee=ce*te;const de=ee+L;for(;ee<de&&!J[ee];)ee++;if(ee===de)continue;se.moveTo(ee%te,ce);const pe=ee;let ve=J[ee];do{const Te=ge[ve];do ee+=Te;while(!J[ee]);const oe=J[ee];oe!==5&&oe!==10?(ve=oe,J[ee]=0):(ve=oe&51*ve>>4,J[ee]&=ve>>2|ve<<2),se.lineTo(ee%te,ee/te|0),J[ee]||--Pe}while(pe!==ee);--ce}return De=null,J=null,function(ee){ee.save(),ee.scale(1/L,-1/$),ee.translate(0,-$),ee.fill(se),ee.beginPath(),ee.restore()}}class _{constructor(L,$){this.alphaIsShape=!1,this.fontSize=0,this.fontSizeScale=1,this.textMatrix=a.IDENTITY_MATRIX,this.textMatrixScale=1,this.fontMatrix=a.FONT_IDENTITY_MATRIX,this.leading=0,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRenderingMode=a.TextRenderingMode.FILL,this.textRise=0,this.fillColor="#000000",this.strokeColor="#000000",this.patternFill=!1,this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.activeSMask=null,this.transferMaps="none",this.startNewPathAndClipBox([0,0,L,$])}clone(){const L=Object.create(this);return L.clipBox=this.clipBox.slice(),L}setCurrentPoint(L,$){this.x=L,this.y=$}updatePathMinMax(L,$,V){[$,V]=a.Util.applyTransform([$,V],L),this.minX=Math.min(this.minX,$),this.minY=Math.min(this.minY,V),this.maxX=Math.max(this.maxX,$),this.maxY=Math.max(this.maxY,V)}updateRectMinMax(L,$){const V=a.Util.applyTransform($,L),K=a.Util.applyTransform($.slice(2),L);this.minX=Math.min(this.minX,V[0],K[0]),this.minY=Math.min(this.minY,V[1],K[1]),this.maxX=Math.max(this.maxX,V[0],K[0]),this.maxY=Math.max(this.maxY,V[1],K[1])}updateScalingPathMinMax(L,$){a.Util.scaleMinMax(L,$),this.minX=Math.min(this.minX,$[0]),this.maxX=Math.max(this.maxX,$[1]),this.minY=Math.min(this.minY,$[2]),this.maxY=Math.max(this.maxY,$[3])}updateCurvePathMinMax(L,$,V,K,te,J,ce,ue,we,Ee){const De=a.Util.bezierBoundingBox($,V,K,te,J,ce,ue,we);if(Ee){Ee[0]=Math.min(Ee[0],De[0],De[2]),Ee[1]=Math.max(Ee[1],De[0],De[2]),Ee[2]=Math.min(Ee[2],De[1],De[3]),Ee[3]=Math.max(Ee[3],De[1],De[3]);return}this.updateRectMinMax(L,De)}getPathBoundingBox(L=l.PathType.FILL,$=null){const V=[this.minX,this.minY,this.maxX,this.maxY];if(L===l.PathType.STROKE){$||(0,a.unreachable)("Stroke bounding box must include transform.");const K=a.Util.singularValueDecompose2dScale($),te=K[0]*this.lineWidth/2,J=K[1]*this.lineWidth/2;V[0]-=te,V[1]-=J,V[2]+=te,V[3]+=J}return V}updateClipFromPath(){const L=a.Util.intersect(this.clipBox,this.getPathBoundingBox());this.startNewPathAndClipBox(L||[0,0,0,0])}isEmptyClip(){return this.minX===1/0}startNewPathAndClipBox(L){this.clipBox=L,this.minX=1/0,this.minY=1/0,this.maxX=0,this.maxY=0}getClippedPathBoundingBox(L=l.PathType.FILL,$=null){return a.Util.intersect(this.clipBox,this.getPathBoundingBox(L,$))}}function O(z,L){if(typeof ImageData<"u"&&L instanceof ImageData){z.putImageData(L,0,0);return}const $=L.height,V=L.width,K=$%x,te=($-K)/x,J=K===0?te:te+1,ce=z.createImageData(V,x);let ue=0,we;const Ee=L.data,De=ce.data;let je,Pe,ge,se;if(L.kind===a.ImageKind.GRAYSCALE_1BPP){const W=Ee.byteLength,ee=new Uint32Array(De.buffer,0,De.byteLength>>2),de=ee.length,pe=V+7>>3,ve=4294967295,Te=a.FeatureTest.isLittleEndian?4278190080:255;for(je=0;je<J;je++){for(ge=je<te?x:K,we=0,Pe=0;Pe<ge;Pe++){const oe=W-ue;let ie=0;const Fe=oe>pe?V:oe*8-7,Le=Fe&-8;let Ye=0,qe=0;for(;ie<Le;ie+=8)qe=Ee[ue++],ee[we++]=qe&128?ve:Te,ee[we++]=qe&64?ve:Te,ee[we++]=qe&32?ve:Te,ee[we++]=qe&16?ve:Te,ee[we++]=qe&8?ve:Te,ee[we++]=qe&4?ve:Te,ee[we++]=qe&2?ve:Te,ee[we++]=qe&1?ve:Te;for(;ie<Fe;ie++)Ye===0&&(qe=Ee[ue++],Ye=128),ee[we++]=qe&Ye?ve:Te,Ye>>=1}for(;we<de;)ee[we++]=0;z.putImageData(ce,0,je*x)}}else if(L.kind===a.ImageKind.RGBA_32BPP){for(Pe=0,se=V*x*4,je=0;je<te;je++)De.set(Ee.subarray(ue,ue+se)),ue+=se,z.putImageData(ce,0,Pe),Pe+=x;je<J&&(se=V*K*4,De.set(Ee.subarray(ue,ue+se)),z.putImageData(ce,0,Pe))}else if(L.kind===a.ImageKind.RGB_24BPP)for(ge=x,se=V*ge,je=0;je<J;je++){for(je>=te&&(ge=K,se=V*ge),we=0,Pe=se;Pe--;)De[we++]=Ee[ue++],De[we++]=Ee[ue++],De[we++]=Ee[ue++],De[we++]=255;z.putImageData(ce,0,je*x)}else throw new Error(`bad image kind: ${L.kind}`)}function k(z,L){if(L.bitmap){z.drawImage(L.bitmap,0,0);return}const $=L.height,V=L.width,K=$%x,te=($-K)/x,J=K===0?te:te+1,ce=z.createImageData(V,x);let ue=0;const we=L.data,Ee=ce.data;for(let De=0;De<J;De++){const je=De<te?x:K;({srcPos:ue}=(0,u.convertBlackAndWhiteToRGBA)({src:we,srcPos:ue,dest:Ee,width:V,height:je,nonBlackColor:0})),z.putImageData(ce,0,De*x)}}function A(z,L){const $=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font","filter"];for(const V of $)z[V]!==void 0&&(L[V]=z[V]);z.setLineDash!==void 0&&(L.setLineDash(z.getLineDash()),L.lineDashOffset=z.lineDashOffset)}function D(z){if(z.strokeStyle=z.fillStyle="#000000",z.fillRule="nonzero",z.globalAlpha=1,z.lineWidth=1,z.lineCap="butt",z.lineJoin="miter",z.miterLimit=10,z.globalCompositeOperation="source-over",z.font="10px sans-serif",z.setLineDash!==void 0&&(z.setLineDash([]),z.lineDashOffset=0),!a.isNodeJS){const{filter:L}=z;L!=="none"&&L!==""&&(z.filter="none")}}function R(z,L,$,V){const K=z.length;for(let te=3;te<K;te+=4){const J=z[te];if(J===0)z[te-3]=L,z[te-2]=$,z[te-1]=V;else if(J<255){const ce=255-J;z[te-3]=z[te-3]*J+L*ce>>8,z[te-2]=z[te-2]*J+$*ce>>8,z[te-1]=z[te-1]*J+V*ce>>8}}}function T(z,L,$){const V=z.length,K=1/255;for(let te=3;te<V;te+=4){const J=$?$[z[te]]:z[te];L[te]=L[te]*J*K|0}}function j(z,L,$){const V=z.length;for(let K=3;K<V;K+=4){const te=z[K-3]*77+z[K-2]*152+z[K-1]*28;L[K]=$?L[K]*$[te>>8]>>8:L[K]*te>>16}}function P(z,L,$,V,K,te,J,ce,ue,we,Ee){const De=!!te,je=De?te[0]:0,Pe=De?te[1]:0,ge=De?te[2]:0,se=K==="Luminosity"?j:T,ee=Math.min(V,Math.ceil(1048576/$));for(let de=0;de<V;de+=ee){const pe=Math.min(ee,V-de),ve=z.getImageData(ce-we,de+(ue-Ee),$,pe),Te=L.getImageData(ce,de+ue,$,pe);De&&R(ve.data,je,Pe,ge),se(ve.data,Te.data,J),L.putImageData(Te,ce,de+ue)}}function M(z,L,$,V){const K=V[0],te=V[1],J=V[2]-K,ce=V[3]-te;J===0||ce===0||(P(L.context,$,J,ce,L.subtype,L.backdrop,L.transferMap,K,te,L.offsetX,L.offsetY),z.save(),z.globalAlpha=1,z.globalCompositeOperation="source-over",z.setTransform(1,0,0,1,0,0),z.drawImage($.canvas,0,0),z.restore())}function I(z,L){const $=a.Util.singularValueDecompose2dScale(z);$[0]=Math.fround($[0]),$[1]=Math.fround($[1]);const V=Math.fround((globalThis.devicePixelRatio||1)*o.PixelsPerInch.PDF_TO_CSS_UNITS);return L!==void 0?L:$[0]<=V||$[1]<=V}const G=["butt","round","square"],ne=["miter","round","bevel"],Q={},B={},X=class X{constructor(L,$,V,K,te,{optionalContentConfig:J,markedContentStack:ce=null},ue,we){Se(this,Y);this.ctx=L,this.current=new _(this.ctx.canvas.width,this.ctx.canvas.height),this.stateStack=[],this.pendingClip=null,this.pendingEOFill=!1,this.res=null,this.xobjs=null,this.commonObjs=$,this.objs=V,this.canvasFactory=K,this.filterFactory=te,this.groupStack=[],this.processingType3=null,this.baseTransform=null,this.baseTransformStack=[],this.groupLevel=0,this.smaskStack=[],this.smaskCounter=0,this.tempSMask=null,this.suspendedCtx=null,this.contentVisible=!0,this.markedContentStack=ce||[],this.optionalContentConfig=J,this.cachedCanvases=new S(this.canvasFactory),this.cachedPatterns=new Map,this.annotationCanvasMap=ue,this.viewportScale=1,this.outputScaleX=1,this.outputScaleY=1,this.pageColors=we,this._cachedScaleForStroking=[-1,0],this._cachedGetSinglePixelWidth=null,this._cachedBitmapsMap=new Map}getObject(L,$=null){return typeof L=="string"?L.startsWith("g_")?this.commonObjs.get(L):this.objs.get(L):$}beginDrawing({transform:L,viewport:$,transparency:V=!1,background:K=null}){const te=this.ctx.canvas.width,J=this.ctx.canvas.height,ce=this.ctx.fillStyle;if(this.ctx.fillStyle=K||"#ffffff",this.ctx.fillRect(0,0,te,J),this.ctx.fillStyle=ce,V){const ue=this.cachedCanvases.getCanvas("transparent",te,J);this.compositeCtx=this.ctx,this.transparentCanvas=ue.canvas,this.ctx=ue.context,this.ctx.save(),this.ctx.transform(...(0,o.getCurrentTransform)(this.compositeCtx))}this.ctx.save(),D(this.ctx),L&&(this.ctx.transform(...L),this.outputScaleX=L[0],this.outputScaleY=L[0]),this.ctx.transform(...$.transform),this.viewportScale=$.scale,this.baseTransform=(0,o.getCurrentTransform)(this.ctx)}executeOperatorList(L,$,V,K){const te=L.argsArray,J=L.fnArray;let ce=$||0;const ue=te.length;if(ue===ce)return ce;const we=ue-ce>g&&typeof V=="function",Ee=we?Date.now()+m:0;let De=0;const je=this.commonObjs,Pe=this.objs;let ge;for(;;){if(K!==void 0&&ce===K.nextBreakPoint)return K.breakIt(ce,V),ce;if(ge=J[ce],ge!==a.OPS.dependency)this[ge].apply(this,te[ce]);else for(const se of te[ce]){const W=se.startsWith("g_")?je:Pe;if(!W.has(se))return W.get(se,V),ce}if(ce++,ce===ue)return ce;if(we&&++De>g){if(Date.now()>Ee)return V(),ce;De=0}}}endDrawing(){me(this,Y,hc).call(this),this.cachedCanvases.clear(),this.cachedPatterns.clear();for(const L of this._cachedBitmapsMap.values()){for(const $ of L.values())typeof HTMLCanvasElement<"u"&&$ instanceof HTMLCanvasElement&&($.width=$.height=0);L.clear()}this._cachedBitmapsMap.clear(),me(this,Y,mc).call(this)}_scaleImage(L,$){const V=L.width,K=L.height;let te=Math.max(Math.hypot($[0],$[1]),1),J=Math.max(Math.hypot($[2],$[3]),1),ce=V,ue=K,we="prescale1",Ee,De;for(;te>2&&ce>1||J>2&&ue>1;){let je=ce,Pe=ue;te>2&&ce>1&&(je=ce>=16384?Math.floor(ce/2)-1||1:Math.ceil(ce/2),te/=ce/je),J>2&&ue>1&&(Pe=ue>=16384?Math.floor(ue/2)-1||1:Math.ceil(ue)/2,J/=ue/Pe),Ee=this.cachedCanvases.getCanvas(we,je,Pe),De=Ee.context,De.clearRect(0,0,je,Pe),De.drawImage(L,0,0,ce,ue,0,0,je,Pe),L=Ee.canvas,ce=je,ue=Pe,we=we==="prescale1"?"prescale2":"prescale1"}return{img:L,paintWidth:ce,paintHeight:ue}}_createMaskCanvas(L){const $=this.ctx,{width:V,height:K}=L,te=this.current.fillColor,J=this.current.patternFill,ce=(0,o.getCurrentTransform)($);let ue,we,Ee,De;if((L.bitmap||L.data)&&L.count>1){const ie=L.bitmap||L.data.buffer;we=JSON.stringify(J?ce:[ce.slice(0,4),te]),ue=this._cachedBitmapsMap.get(ie),ue||(ue=new Map,this._cachedBitmapsMap.set(ie,ue));const Fe=ue.get(we);if(Fe&&!J){const Le=Math.round(Math.min(ce[0],ce[2])+ce[4]),Ye=Math.round(Math.min(ce[1],ce[3])+ce[5]);return{canvas:Fe,offsetX:Le,offsetY:Ye}}Ee=Fe}Ee||(De=this.cachedCanvases.getCanvas("maskCanvas",V,K),k(De.context,L));let je=a.Util.transform(ce,[1/V,0,0,-1/K,0,0]);je=a.Util.transform(je,[1,0,0,1,0,-K]);const Pe=a.Util.applyTransform([0,0],je),ge=a.Util.applyTransform([V,K],je),se=a.Util.normalizeRect([Pe[0],Pe[1],ge[0],ge[1]]),W=Math.round(se[2]-se[0])||1,ee=Math.round(se[3]-se[1])||1,de=this.cachedCanvases.getCanvas("fillCanvas",W,ee),pe=de.context,ve=Math.min(Pe[0],ge[0]),Te=Math.min(Pe[1],ge[1]);pe.translate(-ve,-Te),pe.transform(...je),Ee||(Ee=this._scaleImage(De.canvas,(0,o.getCurrentTransformInverse)(pe)),Ee=Ee.img,ue&&J&&ue.set(we,Ee)),pe.imageSmoothingEnabled=I((0,o.getCurrentTransform)(pe),L.interpolate),E(pe,Ee,0,0,Ee.width,Ee.height,0,0,V,K),pe.globalCompositeOperation="source-in";const oe=a.Util.transform((0,o.getCurrentTransformInverse)(pe),[1,0,0,1,-ve,-Te]);return pe.fillStyle=J?te.getPattern($,this,oe,l.PathType.FILL):te,pe.fillRect(0,0,V,K),ue&&!J&&(this.cachedCanvases.delete("fillCanvas"),ue.set(we,de.canvas)),{canvas:de.canvas,offsetX:Math.round(ve),offsetY:Math.round(Te)}}setLineWidth(L){L!==this.current.lineWidth&&(this._cachedScaleForStroking[0]=-1),this.current.lineWidth=L,this.ctx.lineWidth=L}setLineCap(L){this.ctx.lineCap=G[L]}setLineJoin(L){this.ctx.lineJoin=ne[L]}setMiterLimit(L){this.ctx.miterLimit=L}setDash(L,$){const V=this.ctx;V.setLineDash!==void 0&&(V.setLineDash(L),V.lineDashOffset=$)}setRenderingIntent(L){}setFlatness(L){}setGState(L){for(const[$,V]of L)switch($){case"LW":this.setLineWidth(V);break;case"LC":this.setLineCap(V);break;case"LJ":this.setLineJoin(V);break;case"ML":this.setMiterLimit(V);break;case"D":this.setDash(V[0],V[1]);break;case"RI":this.setRenderingIntent(V);break;case"FL":this.setFlatness(V);break;case"Font":this.setFont(V[0],V[1]);break;case"CA":this.current.strokeAlpha=V;break;case"ca":this.current.fillAlpha=V,this.ctx.globalAlpha=V;break;case"BM":this.ctx.globalCompositeOperation=V;break;case"SMask":this.current.activeSMask=V?this.tempSMask:null,this.tempSMask=null,this.checkSMaskState();break;case"TR":this.ctx.filter=this.current.transferMaps=this.filterFactory.addFilter(V);break}}get inSMaskMode(){return!!this.suspendedCtx}checkSMaskState(){const L=this.inSMaskMode;this.current.activeSMask&&!L?this.beginSMaskMode():!this.current.activeSMask&&L&&this.endSMaskMode()}beginSMaskMode(){if(this.inSMaskMode)throw new Error("beginSMaskMode called while already in smask mode");const L=this.ctx.canvas.width,$=this.ctx.canvas.height,V="smaskGroupAt"+this.groupLevel,K=this.cachedCanvases.getCanvas(V,L,$);this.suspendedCtx=this.ctx,this.ctx=K.context;const te=this.ctx;te.setTransform(...(0,o.getCurrentTransform)(this.suspendedCtx)),A(this.suspendedCtx,te),y(te,this.suspendedCtx),this.setGState([["BM","source-over"],["ca",1],["CA",1]])}endSMaskMode(){if(!this.inSMaskMode)throw new Error("endSMaskMode called while not in smask mode");this.ctx._removeMirroring(),A(this.ctx,this.suspendedCtx),this.ctx=this.suspendedCtx,this.suspendedCtx=null}compose(L){if(!this.current.activeSMask)return;L?(L[0]=Math.floor(L[0]),L[1]=Math.floor(L[1]),L[2]=Math.ceil(L[2]),L[3]=Math.ceil(L[3])):L=[0,0,this.ctx.canvas.width,this.ctx.canvas.height];const $=this.current.activeSMask,V=this.suspendedCtx;M(V,$,this.ctx,L),this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.clearRect(0,0,this.ctx.canvas.width,this.ctx.canvas.height),this.ctx.restore()}save(){this.inSMaskMode?(A(this.ctx,this.suspendedCtx),this.suspendedCtx.save()):this.ctx.save();const L=this.current;this.stateStack.push(L),this.current=L.clone()}restore(){this.stateStack.length===0&&this.inSMaskMode&&this.endSMaskMode(),this.stateStack.length!==0&&(this.current=this.stateStack.pop(),this.inSMaskMode?(this.suspendedCtx.restore(),A(this.suspendedCtx,this.ctx)):this.ctx.restore(),this.checkSMaskState(),this.pendingClip=null,this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null)}transform(L,$,V,K,te,J){this.ctx.transform(L,$,V,K,te,J),this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null}constructPath(L,$,V){const K=this.ctx,te=this.current;let J=te.x,ce=te.y,ue,we;const Ee=(0,o.getCurrentTransform)(K),De=Ee[0]===0&&Ee[3]===0||Ee[1]===0&&Ee[2]===0,je=De?V.slice(0):null;for(let Pe=0,ge=0,se=L.length;Pe<se;Pe++)switch(L[Pe]|0){case a.OPS.rectangle:J=$[ge++],ce=$[ge++];const W=$[ge++],ee=$[ge++],de=J+W,pe=ce+ee;K.moveTo(J,ce),W===0||ee===0?K.lineTo(de,pe):(K.lineTo(de,ce),K.lineTo(de,pe),K.lineTo(J,pe)),De||te.updateRectMinMax(Ee,[J,ce,de,pe]),K.closePath();break;case a.OPS.moveTo:J=$[ge++],ce=$[ge++],K.moveTo(J,ce),De||te.updatePathMinMax(Ee,J,ce);break;case a.OPS.lineTo:J=$[ge++],ce=$[ge++],K.lineTo(J,ce),De||te.updatePathMinMax(Ee,J,ce);break;case a.OPS.curveTo:ue=J,we=ce,J=$[ge+4],ce=$[ge+5],K.bezierCurveTo($[ge],$[ge+1],$[ge+2],$[ge+3],J,ce),te.updateCurvePathMinMax(Ee,ue,we,$[ge],$[ge+1],$[ge+2],$[ge+3],J,ce,je),ge+=6;break;case a.OPS.curveTo2:ue=J,we=ce,K.bezierCurveTo(J,ce,$[ge],$[ge+1],$[ge+2],$[ge+3]),te.updateCurvePathMinMax(Ee,ue,we,J,ce,$[ge],$[ge+1],$[ge+2],$[ge+3],je),J=$[ge+2],ce=$[ge+3],ge+=4;break;case a.OPS.curveTo3:ue=J,we=ce,J=$[ge+2],ce=$[ge+3],K.bezierCurveTo($[ge],$[ge+1],J,ce,J,ce),te.updateCurvePathMinMax(Ee,ue,we,$[ge],$[ge+1],J,ce,J,ce,je),ge+=4;break;case a.OPS.closePath:K.closePath();break}De&&te.updateScalingPathMinMax(Ee,je),te.setCurrentPoint(J,ce)}closePath(){this.ctx.closePath()}stroke(L=!0){const $=this.ctx,V=this.current.strokeColor;$.globalAlpha=this.current.strokeAlpha,this.contentVisible&&(typeof V=="object"&&(V!=null&&V.getPattern)?($.save(),$.strokeStyle=V.getPattern($,this,(0,o.getCurrentTransformInverse)($),l.PathType.STROKE),this.rescaleAndStroke(!1),$.restore()):this.rescaleAndStroke(!0)),L&&this.consumePath(this.current.getClippedPathBoundingBox()),$.globalAlpha=this.current.fillAlpha}closeStroke(){this.closePath(),this.stroke()}fill(L=!0){const $=this.ctx,V=this.current.fillColor,K=this.current.patternFill;let te=!1;K&&($.save(),$.fillStyle=V.getPattern($,this,(0,o.getCurrentTransformInverse)($),l.PathType.FILL),te=!0);const J=this.current.getClippedPathBoundingBox();this.contentVisible&&J!==null&&(this.pendingEOFill?($.fill("evenodd"),this.pendingEOFill=!1):$.fill()),te&&$.restore(),L&&this.consumePath(J)}eoFill(){this.pendingEOFill=!0,this.fill()}fillStroke(){this.fill(!1),this.stroke(!1),this.consumePath()}eoFillStroke(){this.pendingEOFill=!0,this.fillStroke()}closeFillStroke(){this.closePath(),this.fillStroke()}closeEOFillStroke(){this.pendingEOFill=!0,this.closePath(),this.fillStroke()}endPath(){this.consumePath()}clip(){this.pendingClip=Q}eoClip(){this.pendingClip=B}beginText(){this.current.textMatrix=a.IDENTITY_MATRIX,this.current.textMatrixScale=1,this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}endText(){const L=this.pendingTextPaths,$=this.ctx;if(L===void 0){$.beginPath();return}$.save(),$.beginPath();for(const V of L)$.setTransform(...V.transform),$.translate(V.x,V.y),V.addToPath($,V.fontSize);$.restore(),$.clip(),$.beginPath(),delete this.pendingTextPaths}setCharSpacing(L){this.current.charSpacing=L}setWordSpacing(L){this.current.wordSpacing=L}setHScale(L){this.current.textHScale=L/100}setLeading(L){this.current.leading=-L}setFont(L,$){var Ee;const V=this.commonObjs.get(L),K=this.current;if(!V)throw new Error(`Can't find font for ${L}`);if(K.fontMatrix=V.fontMatrix||a.FONT_IDENTITY_MATRIX,(K.fontMatrix[0]===0||K.fontMatrix[3]===0)&&(0,a.warn)("Invalid font matrix for font "+L),$<0?($=-$,K.fontDirection=-1):K.fontDirection=1,this.current.font=V,this.current.fontSize=$,V.isType3Font)return;const te=V.loadedName||"sans-serif",J=((Ee=V.systemFontInfo)==null?void 0:Ee.css)||`"${te}", ${V.fallbackName}`;let ce="normal";V.black?ce="900":V.bold&&(ce="bold");const ue=V.italic?"italic":"normal";let we=$;$<f?we=f:$>h&&(we=h),this.current.fontSizeScale=$/we,this.ctx.font=`${ue} ${ce} ${we}px ${J}`}setTextRenderingMode(L){this.current.textRenderingMode=L}setTextRise(L){this.current.textRise=L}moveText(L,$){this.current.x=this.current.lineX+=L,this.current.y=this.current.lineY+=$}setLeadingMoveText(L,$){this.setLeading(-$),this.moveText(L,$)}setTextMatrix(L,$,V,K,te,J){this.current.textMatrix=[L,$,V,K,te,J],this.current.textMatrixScale=Math.hypot(L,$),this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}nextLine(){this.moveText(0,this.current.leading)}paintChar(L,$,V,K){const te=this.ctx,J=this.current,ce=J.font,ue=J.textRenderingMode,we=J.fontSize/J.fontSizeScale,Ee=ue&a.TextRenderingMode.FILL_STROKE_MASK,De=!!(ue&a.TextRenderingMode.ADD_TO_PATH_FLAG),je=J.patternFill&&!ce.missingFile;let Pe;(ce.disableFontFace||De||je)&&(Pe=ce.getPathGenerator(this.commonObjs,L)),ce.disableFontFace||je?(te.save(),te.translate($,V),te.beginPath(),Pe(te,we),K&&te.setTransform(...K),(Ee===a.TextRenderingMode.FILL||Ee===a.TextRenderingMode.FILL_STROKE)&&te.fill(),(Ee===a.TextRenderingMode.STROKE||Ee===a.TextRenderingMode.FILL_STROKE)&&te.stroke(),te.restore()):((Ee===a.TextRenderingMode.FILL||Ee===a.TextRenderingMode.FILL_STROKE)&&te.fillText(L,$,V),(Ee===a.TextRenderingMode.STROKE||Ee===a.TextRenderingMode.FILL_STROKE)&&te.strokeText(L,$,V)),De&&(this.pendingTextPaths||(this.pendingTextPaths=[])).push({transform:(0,o.getCurrentTransform)(te),x:$,y:V,fontSize:we,addToPath:Pe})}get isFontSubpixelAAEnabled(){const{context:L}=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10);L.scale(1.5,1),L.fillText("I",0,10);const $=L.getImageData(0,0,10,10).data;let V=!1;for(let K=3;K<$.length;K+=4)if($[K]>0&&$[K]<255){V=!0;break}return(0,a.shadow)(this,"isFontSubpixelAAEnabled",V)}showText(L){const $=this.current,V=$.font;if(V.isType3Font)return this.showType3Text(L);const K=$.fontSize;if(K===0)return;const te=this.ctx,J=$.fontSizeScale,ce=$.charSpacing,ue=$.wordSpacing,we=$.fontDirection,Ee=$.textHScale*we,De=L.length,je=V.vertical,Pe=je?1:-1,ge=V.defaultVMetrics,se=K*$.fontMatrix[0],W=$.textRenderingMode===a.TextRenderingMode.FILL&&!V.disableFontFace&&!$.patternFill;te.save(),te.transform(...$.textMatrix),te.translate($.x,$.y+$.textRise),we>0?te.scale(Ee,-1):te.scale(Ee,1);let ee;if($.patternFill){te.save();const oe=$.fillColor.getPattern(te,this,(0,o.getCurrentTransformInverse)(te),l.PathType.FILL);ee=(0,o.getCurrentTransform)(te),te.restore(),te.fillStyle=oe}let de=$.lineWidth;const pe=$.textMatrixScale;if(pe===0||de===0){const oe=$.textRenderingMode&a.TextRenderingMode.FILL_STROKE_MASK;(oe===a.TextRenderingMode.STROKE||oe===a.TextRenderingMode.FILL_STROKE)&&(de=this.getSinglePixelWidth())}else de/=pe;if(J!==1&&(te.scale(J,J),de/=J),te.lineWidth=de,V.isInvalidPDFjsFont){const oe=[];let ie=0;for(const Fe of L)oe.push(Fe.unicode),ie+=Fe.width;te.fillText(oe.join(""),0,0),$.x+=ie*se*Ee,te.restore(),this.compose();return}let ve=0,Te;for(Te=0;Te<De;++Te){const oe=L[Te];if(typeof oe=="number"){ve+=Pe*oe*K/1e3;continue}let ie=!1;const Fe=(oe.isSpace?ue:0)+ce,Le=oe.fontChar,Ye=oe.accent;let qe,it,We=oe.width;if(je){const ct=oe.vmetric||ge,ot=-(oe.vmetric?ct[1]:We*.5)*se,Oe=ct[2]*se;We=ct?-ct[0]:We,qe=ot/J,it=(ve+Oe)/J}else qe=ve/J,it=0;if(V.remeasure&&We>0){const ct=te.measureText(Le).width*1e3/K*J;if(We<ct&&this.isFontSubpixelAAEnabled){const ot=We/ct;ie=!0,te.save(),te.scale(ot,1),qe/=ot}else We!==ct&&(qe+=(We-ct)/2e3*K/J)}if(this.contentVisible&&(oe.isInFont||V.missingFile)){if(W&&!Ye)te.fillText(Le,qe,it);else if(this.paintChar(Le,qe,it,ee),Ye){const ct=qe+K*Ye.offset.x/J,ot=it-K*Ye.offset.y/J;this.paintChar(Ye.fontChar,ct,ot,ee)}}const Je=je?We*se-Fe*we:We*se+Fe*we;ve+=Je,ie&&te.restore()}je?$.y-=ve:$.x+=ve*Ee,te.restore(),this.compose()}showType3Text(L){const $=this.ctx,V=this.current,K=V.font,te=V.fontSize,J=V.fontDirection,ce=K.vertical?1:-1,ue=V.charSpacing,we=V.wordSpacing,Ee=V.textHScale*J,De=V.fontMatrix||a.FONT_IDENTITY_MATRIX,je=L.length,Pe=V.textRenderingMode===a.TextRenderingMode.INVISIBLE;let ge,se,W,ee;if(!(Pe||te===0)){for(this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null,$.save(),$.transform(...V.textMatrix),$.translate(V.x,V.y),$.scale(Ee,J),ge=0;ge<je;++ge){if(se=L[ge],typeof se=="number"){ee=ce*se*te/1e3,this.ctx.translate(ee,0),V.x+=ee*Ee;continue}const de=(se.isSpace?we:0)+ue,pe=K.charProcOperatorList[se.operatorListId];if(!pe){(0,a.warn)(`Type3 character "${se.operatorListId}" is not available.`);continue}this.contentVisible&&(this.processingType3=se,this.save(),$.scale(te,te),$.transform(...De),this.executeOperatorList(pe),this.restore()),W=a.Util.applyTransform([se.width,0],De)[0]*te+de,$.translate(W,0),V.x+=W*Ee}$.restore(),this.processingType3=null}}setCharWidth(L,$){}setCharWidthAndBounds(L,$,V,K,te,J){this.ctx.rect(V,K,te-V,J-K),this.ctx.clip(),this.endPath()}getColorN_Pattern(L){let $;if(L[0]==="TilingPattern"){const V=L[1],K=this.baseTransform||(0,o.getCurrentTransform)(this.ctx),te={createCanvasGraphics:J=>new X(J,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:this.optionalContentConfig,markedContentStack:this.markedContentStack})};$=new l.TilingPattern(L,V,this.ctx,te,K)}else $=this._getPattern(L[1],L[2]);return $}setStrokeColorN(){this.current.strokeColor=this.getColorN_Pattern(arguments)}setFillColorN(){this.current.fillColor=this.getColorN_Pattern(arguments),this.current.patternFill=!0}setStrokeRGBColor(L,$,V){const K=a.Util.makeHexColor(L,$,V);this.ctx.strokeStyle=K,this.current.strokeColor=K}setFillRGBColor(L,$,V){const K=a.Util.makeHexColor(L,$,V);this.ctx.fillStyle=K,this.current.fillColor=K,this.current.patternFill=!1}_getPattern(L,$=null){let V;return this.cachedPatterns.has(L)?V=this.cachedPatterns.get(L):(V=(0,l.getShadingPattern)(this.getObject(L)),this.cachedPatterns.set(L,V)),$&&(V.matrix=$),V}shadingFill(L){if(!this.contentVisible)return;const $=this.ctx;this.save();const V=this._getPattern(L);$.fillStyle=V.getPattern($,this,(0,o.getCurrentTransformInverse)($),l.PathType.SHADING);const K=(0,o.getCurrentTransformInverse)($);if(K){const{width:te,height:J}=$.canvas,[ce,ue,we,Ee]=a.Util.getAxialAlignedBoundingBox([0,0,te,J],K);this.ctx.fillRect(ce,ue,we-ce,Ee-ue)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.compose(this.current.getClippedPathBoundingBox()),this.restore()}beginInlineImage(){(0,a.unreachable)("Should not call beginInlineImage")}beginImageData(){(0,a.unreachable)("Should not call beginImageData")}paintFormXObjectBegin(L,$){if(this.contentVisible&&(this.save(),this.baseTransformStack.push(this.baseTransform),Array.isArray(L)&&L.length===6&&this.transform(...L),this.baseTransform=(0,o.getCurrentTransform)(this.ctx),$)){const V=$[2]-$[0],K=$[3]-$[1];this.ctx.rect($[0],$[1],V,K),this.current.updateRectMinMax((0,o.getCurrentTransform)(this.ctx),$),this.clip(),this.endPath()}}paintFormXObjectEnd(){this.contentVisible&&(this.restore(),this.baseTransform=this.baseTransformStack.pop())}beginGroup(L){if(!this.contentVisible)return;this.save(),this.inSMaskMode&&(this.endSMaskMode(),this.current.activeSMask=null);const $=this.ctx;L.isolated||(0,a.info)("TODO: Support non-isolated groups."),L.knockout&&(0,a.warn)("Knockout groups not supported.");const V=(0,o.getCurrentTransform)($);if(L.matrix&&$.transform(...L.matrix),!L.bbox)throw new Error("Bounding box is required.");let K=a.Util.getAxialAlignedBoundingBox(L.bbox,(0,o.getCurrentTransform)($));const te=[0,0,$.canvas.width,$.canvas.height];K=a.Util.intersect(K,te)||[0,0,0,0];const J=Math.floor(K[0]),ce=Math.floor(K[1]);let ue=Math.max(Math.ceil(K[2])-J,1),we=Math.max(Math.ceil(K[3])-ce,1),Ee=1,De=1;ue>p&&(Ee=ue/p,ue=p),we>p&&(De=we/p,we=p),this.current.startNewPathAndClipBox([0,0,ue,we]);let je="groupAt"+this.groupLevel;L.smask&&(je+="_smask_"+this.smaskCounter++%2);const Pe=this.cachedCanvases.getCanvas(je,ue,we),ge=Pe.context;ge.scale(1/Ee,1/De),ge.translate(-J,-ce),ge.transform(...V),L.smask?this.smaskStack.push({canvas:Pe.canvas,context:ge,offsetX:J,offsetY:ce,scaleX:Ee,scaleY:De,subtype:L.smask.subtype,backdrop:L.smask.backdrop,transferMap:L.smask.transferMap||null,startTransformInverse:null}):($.setTransform(1,0,0,1,0,0),$.translate(J,ce),$.scale(Ee,De),$.save()),A($,ge),this.ctx=ge,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push($),this.groupLevel++}endGroup(L){if(!this.contentVisible)return;this.groupLevel--;const $=this.ctx,V=this.groupStack.pop();if(this.ctx=V,this.ctx.imageSmoothingEnabled=!1,L.smask)this.tempSMask=this.smaskStack.pop(),this.restore();else{this.ctx.restore();const K=(0,o.getCurrentTransform)(this.ctx);this.restore(),this.ctx.save(),this.ctx.setTransform(...K);const te=a.Util.getAxialAlignedBoundingBox([0,0,$.canvas.width,$.canvas.height],K);this.ctx.drawImage($.canvas,0,0),this.ctx.restore(),this.compose(te)}}beginAnnotation(L,$,V,K,te){if(me(this,Y,hc).call(this),D(this.ctx),this.ctx.save(),this.save(),this.baseTransform&&this.ctx.setTransform(...this.baseTransform),Array.isArray($)&&$.length===4){const J=$[2]-$[0],ce=$[3]-$[1];if(te&&this.annotationCanvasMap){V=V.slice(),V[4]-=$[0],V[5]-=$[1],$=$.slice(),$[0]=$[1]=0,$[2]=J,$[3]=ce;const[ue,we]=a.Util.singularValueDecompose2dScale((0,o.getCurrentTransform)(this.ctx)),{viewportScale:Ee}=this,De=Math.ceil(J*this.outputScaleX*Ee),je=Math.ceil(ce*this.outputScaleY*Ee);this.annotationCanvas=this.canvasFactory.create(De,je);const{canvas:Pe,context:ge}=this.annotationCanvas;this.annotationCanvasMap.set(L,Pe),this.annotationCanvas.savedCtx=this.ctx,this.ctx=ge,this.ctx.save(),this.ctx.setTransform(ue,0,0,-we,0,ce*we),D(this.ctx)}else D(this.ctx),this.ctx.rect($[0],$[1],J,ce),this.ctx.clip(),this.endPath()}this.current=new _(this.ctx.canvas.width,this.ctx.canvas.height),this.transform(...V),this.transform(...K)}endAnnotation(){this.annotationCanvas&&(this.ctx.restore(),me(this,Y,mc).call(this),this.ctx=this.annotationCanvas.savedCtx,delete this.annotationCanvas.savedCtx,delete this.annotationCanvas)}paintImageMaskXObject(L){if(!this.contentVisible)return;const $=L.count;L=this.getObject(L.data,L),L.count=$;const V=this.ctx,K=this.processingType3;if(K&&(K.compiled===void 0&&(K.compiled=w(L)),K.compiled)){K.compiled(V);return}const te=this._createMaskCanvas(L),J=te.canvas;V.save(),V.setTransform(1,0,0,1,0,0),V.drawImage(J,te.offsetX,te.offsetY),V.restore(),this.compose()}paintImageMaskXObjectRepeat(L,$,V=0,K=0,te,J){if(!this.contentVisible)return;L=this.getObject(L.data,L);const ce=this.ctx;ce.save();const ue=(0,o.getCurrentTransform)(ce);ce.transform($,V,K,te,0,0);const we=this._createMaskCanvas(L);ce.setTransform(1,0,0,1,we.offsetX-ue[4],we.offsetY-ue[5]);for(let Ee=0,De=J.length;Ee<De;Ee+=2){const je=a.Util.transform(ue,[$,V,K,te,J[Ee],J[Ee+1]]),[Pe,ge]=a.Util.applyTransform([0,0],je);ce.drawImage(we.canvas,Pe,ge)}ce.restore(),this.compose()}paintImageMaskXObjectGroup(L){if(!this.contentVisible)return;const $=this.ctx,V=this.current.fillColor,K=this.current.patternFill;for(const te of L){const{data:J,width:ce,height:ue,transform:we}=te,Ee=this.cachedCanvases.getCanvas("maskCanvas",ce,ue),De=Ee.context;De.save();const je=this.getObject(J,te);k(De,je),De.globalCompositeOperation="source-in",De.fillStyle=K?V.getPattern(De,this,(0,o.getCurrentTransformInverse)($),l.PathType.FILL):V,De.fillRect(0,0,ce,ue),De.restore(),$.save(),$.transform(...we),$.scale(1,-1),E($,Ee.canvas,0,0,ce,ue,0,-1,1,1),$.restore()}this.compose()}paintImageXObject(L){if(!this.contentVisible)return;const $=this.getObject(L);if(!$){(0,a.warn)("Dependent image isn't ready yet");return}this.paintInlineImageXObject($)}paintImageXObjectRepeat(L,$,V,K){if(!this.contentVisible)return;const te=this.getObject(L);if(!te){(0,a.warn)("Dependent image isn't ready yet");return}const J=te.width,ce=te.height,ue=[];for(let we=0,Ee=K.length;we<Ee;we+=2)ue.push({transform:[$,0,0,V,K[we],K[we+1]],x:0,y:0,w:J,h:ce});this.paintInlineImageXObjectGroup(te,ue)}applyTransferMapsToCanvas(L){return this.current.transferMaps!=="none"&&(L.filter=this.current.transferMaps,L.drawImage(L.canvas,0,0),L.filter="none"),L.canvas}applyTransferMapsToBitmap(L){if(this.current.transferMaps==="none")return L.bitmap;const{bitmap:$,width:V,height:K}=L,te=this.cachedCanvases.getCanvas("inlineImage",V,K),J=te.context;return J.filter=this.current.transferMaps,J.drawImage($,0,0),J.filter="none",te.canvas}paintInlineImageXObject(L){if(!this.contentVisible)return;const $=L.width,V=L.height,K=this.ctx;if(this.save(),!a.isNodeJS){const{filter:ce}=K;ce!=="none"&&ce!==""&&(K.filter="none")}K.scale(1/$,-1/V);let te;if(L.bitmap)te=this.applyTransferMapsToBitmap(L);else if(typeof HTMLElement=="function"&&L instanceof HTMLElement||!L.data)te=L;else{const ue=this.cachedCanvases.getCanvas("inlineImage",$,V).context;O(ue,L),te=this.applyTransferMapsToCanvas(ue)}const J=this._scaleImage(te,(0,o.getCurrentTransformInverse)(K));K.imageSmoothingEnabled=I((0,o.getCurrentTransform)(K),L.interpolate),E(K,J.img,0,0,J.paintWidth,J.paintHeight,0,-V,$,V),this.compose(),this.restore()}paintInlineImageXObjectGroup(L,$){if(!this.contentVisible)return;const V=this.ctx;let K;if(L.bitmap)K=L.bitmap;else{const te=L.width,J=L.height,ue=this.cachedCanvases.getCanvas("inlineImage",te,J).context;O(ue,L),K=this.applyTransferMapsToCanvas(ue)}for(const te of $)V.save(),V.transform(...te.transform),V.scale(1,-1),E(V,K,te.x,te.y,te.w,te.h,0,-1,1,1),V.restore();this.compose()}paintSolidColorImageMask(){this.contentVisible&&(this.ctx.fillRect(0,0,1,1),this.compose())}markPoint(L){}markPointProps(L,$){}beginMarkedContent(L){this.markedContentStack.push({visible:!0})}beginMarkedContentProps(L,$){L==="OC"?this.markedContentStack.push({visible:this.optionalContentConfig.isVisible($)}):this.markedContentStack.push({visible:!0}),this.contentVisible=this.isContentVisible()}endMarkedContent(){this.markedContentStack.pop(),this.contentVisible=this.isContentVisible()}beginCompat(){}endCompat(){}consumePath(L){const $=this.current.isEmptyClip();this.pendingClip&&this.current.updateClipFromPath(),this.pendingClip||this.compose(L);const V=this.ctx;this.pendingClip&&($||(this.pendingClip===B?V.clip("evenodd"):V.clip()),this.pendingClip=null),this.current.startNewPathAndClipBox(this.current.clipBox),V.beginPath()}getSinglePixelWidth(){if(!this._cachedGetSinglePixelWidth){const L=(0,o.getCurrentTransform)(this.ctx);if(L[1]===0&&L[2]===0)this._cachedGetSinglePixelWidth=1/Math.min(Math.abs(L[0]),Math.abs(L[3]));else{const $=Math.abs(L[0]*L[3]-L[2]*L[1]),V=Math.hypot(L[0],L[2]),K=Math.hypot(L[1],L[3]);this._cachedGetSinglePixelWidth=Math.max(V,K)/$}}return this._cachedGetSinglePixelWidth}getScaleForStroking(){if(this._cachedScaleForStroking[0]===-1){const{lineWidth:L}=this.current,{a:$,b:V,c:K,d:te}=this.ctx.getTransform();let J,ce;if(V===0&&K===0){const ue=Math.abs($),we=Math.abs(te);if(ue===we)if(L===0)J=ce=1/ue;else{const Ee=ue*L;J=ce=Ee<1?1/Ee:1}else if(L===0)J=1/ue,ce=1/we;else{const Ee=ue*L,De=we*L;J=Ee<1?1/Ee:1,ce=De<1?1/De:1}}else{const ue=Math.abs($*te-V*K),we=Math.hypot($,V),Ee=Math.hypot(K,te);if(L===0)J=Ee/ue,ce=we/ue;else{const De=L*ue;J=Ee>De?Ee/De:1,ce=we>De?we/De:1}}this._cachedScaleForStroking[0]=J,this._cachedScaleForStroking[1]=ce}return this._cachedScaleForStroking}rescaleAndStroke(L){const{ctx:$}=this,{lineWidth:V}=this.current,[K,te]=this.getScaleForStroking();if($.lineWidth=V||1,K===1&&te===1){$.stroke();return}const J=$.getLineDash();if(L&&$.save(),$.scale(K,te),J.length>0){const ce=Math.max(K,te);$.setLineDash(J.map(ue=>ue/ce)),$.lineDashOffset/=ce}$.stroke(),L&&$.restore()}isContentVisible(){for(let L=this.markedContentStack.length-1;L>=0;L--)if(!this.markedContentStack[L].visible)return!1;return!0}};Y=new WeakSet,hc=function(){for(;this.stateStack.length||this.inSMaskMode;)this.restore();this.ctx.restore(),this.transparentCanvas&&(this.ctx=this.compositeCtx,this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.drawImage(this.transparentCanvas,0,0),this.ctx.restore(),this.transparentCanvas=null)},mc=function(){if(this.pageColors){const L=this.filterFactory.addHCMFilter(this.pageColors.foreground,this.pageColors.background);if(L!=="none"){const $=this.ctx.filter;this.ctx.filter=L,this.ctx.drawImage(this.ctx.canvas,0,0),this.ctx.filter=$}}};let H=X;t.CanvasGraphics=H;for(const z in a.OPS)H.prototype[z]!==void 0&&(H.prototype[a.OPS[z]]=H.prototype[z])},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TilingPattern=t.PathType=void 0,t.getShadingPattern=x;var a=i(1),o=i(6);const l={FILL:"Fill",STROKE:"Stroke",SHADING:"Shading"};t.PathType=l;function u(w,_){if(!_)return;const O=_[2]-_[0],k=_[3]-_[1],A=new Path2D;A.rect(_[0],_[1],O,k),w.clip(A)}class f{constructor(){this.constructor===f&&(0,a.unreachable)("Cannot initialize BaseShadingPattern.")}getPattern(){(0,a.unreachable)("Abstract method `getPattern` called.")}}class h extends f{constructor(_){super(),this._type=_[1],this._bbox=_[2],this._colorStops=_[3],this._p0=_[4],this._p1=_[5],this._r0=_[6],this._r1=_[7],this.matrix=null}_createGradient(_){let O;this._type==="axial"?O=_.createLinearGradient(this._p0[0],this._p0[1],this._p1[0],this._p1[1]):this._type==="radial"&&(O=_.createRadialGradient(this._p0[0],this._p0[1],this._r0,this._p1[0],this._p1[1],this._r1));for(const k of this._colorStops)O.addColorStop(k[0],k[1]);return O}getPattern(_,O,k,A){let D;if(A===l.STROKE||A===l.FILL){const R=O.current.getClippedPathBoundingBox(A,(0,o.getCurrentTransform)(_))||[0,0,0,0],T=Math.ceil(R[2]-R[0])||1,j=Math.ceil(R[3]-R[1])||1,P=O.cachedCanvases.getCanvas("pattern",T,j,!0),M=P.context;M.clearRect(0,0,M.canvas.width,M.canvas.height),M.beginPath(),M.rect(0,0,M.canvas.width,M.canvas.height),M.translate(-R[0],-R[1]),k=a.Util.transform(k,[1,0,0,1,R[0],R[1]]),M.transform(...O.baseTransform),this.matrix&&M.transform(...this.matrix),u(M,this._bbox),M.fillStyle=this._createGradient(M),M.fill(),D=_.createPattern(P.canvas,"no-repeat");const I=new DOMMatrix(k);D.setTransform(I)}else u(_,this._bbox),D=this._createGradient(_);return D}}function p(w,_,O,k,A,D,R,T){const j=_.coords,P=_.colors,M=w.data,I=w.width*4;let G;j[O+1]>j[k+1]&&(G=O,O=k,k=G,G=D,D=R,R=G),j[k+1]>j[A+1]&&(G=k,k=A,A=G,G=R,R=T,T=G),j[O+1]>j[k+1]&&(G=O,O=k,k=G,G=D,D=R,R=G);const ne=(j[O]+_.offsetX)*_.scaleX,Q=(j[O+1]+_.offsetY)*_.scaleY,B=(j[k]+_.offsetX)*_.scaleX,H=(j[k+1]+_.offsetY)*_.scaleY,Y=(j[A]+_.offsetX)*_.scaleX,U=(j[A+1]+_.offsetY)*_.scaleY;if(Q>=U)return;const F=P[D],X=P[D+1],z=P[D+2],L=P[R],$=P[R+1],V=P[R+2],K=P[T],te=P[T+1],J=P[T+2],ce=Math.round(Q),ue=Math.round(U);let we,Ee,De,je,Pe,ge,se,W;for(let ee=ce;ee<=ue;ee++){if(ee<H){const oe=ee<Q?0:(Q-ee)/(Q-H);we=ne-(ne-B)*oe,Ee=F-(F-L)*oe,De=X-(X-$)*oe,je=z-(z-V)*oe}else{let oe;ee>U?oe=1:H===U?oe=0:oe=(H-ee)/(H-U),we=B-(B-Y)*oe,Ee=L-(L-K)*oe,De=$-($-te)*oe,je=V-(V-J)*oe}let de;ee<Q?de=0:ee>U?de=1:de=(Q-ee)/(Q-U),Pe=ne-(ne-Y)*de,ge=F-(F-K)*de,se=X-(X-te)*de,W=z-(z-J)*de;const pe=Math.round(Math.min(we,Pe)),ve=Math.round(Math.max(we,Pe));let Te=I*ee+pe*4;for(let oe=pe;oe<=ve;oe++)de=(we-oe)/(we-Pe),de<0?de=0:de>1&&(de=1),M[Te++]=Ee-(Ee-ge)*de|0,M[Te++]=De-(De-se)*de|0,M[Te++]=je-(je-W)*de|0,M[Te++]=255}}function m(w,_,O){const k=_.coords,A=_.colors;let D,R;switch(_.type){case"lattice":const T=_.verticesPerRow,j=Math.floor(k.length/T)-1,P=T-1;for(D=0;D<j;D++){let M=D*T;for(let I=0;I<P;I++,M++)p(w,O,k[M],k[M+1],k[M+T],A[M],A[M+1],A[M+T]),p(w,O,k[M+T+1],k[M+1],k[M+T],A[M+T+1],A[M+1],A[M+T])}break;case"triangles":for(D=0,R=k.length;D<R;D+=3)p(w,O,k[D],k[D+1],k[D+2],A[D],A[D+1],A[D+2]);break;default:throw new Error("illegal figure")}}class g extends f{constructor(_){super(),this._coords=_[2],this._colors=_[3],this._figures=_[4],this._bounds=_[5],this._bbox=_[7],this._background=_[8],this.matrix=null}_createMeshCanvas(_,O,k){const T=Math.floor(this._bounds[0]),j=Math.floor(this._bounds[1]),P=Math.ceil(this._bounds[2])-T,M=Math.ceil(this._bounds[3])-j,I=Math.min(Math.ceil(Math.abs(P*_[0]*1.1)),3e3),G=Math.min(Math.ceil(Math.abs(M*_[1]*1.1)),3e3),ne=P/I,Q=M/G,B={coords:this._coords,colors:this._colors,offsetX:-T,offsetY:-j,scaleX:1/ne,scaleY:1/Q},H=I+2*2,Y=G+2*2,U=k.getCanvas("mesh",H,Y,!1),F=U.context,X=F.createImageData(I,G);if(O){const L=X.data;for(let $=0,V=L.length;$<V;$+=4)L[$]=O[0],L[$+1]=O[1],L[$+2]=O[2],L[$+3]=255}for(const L of this._figures)m(X,L,B);return F.putImageData(X,2,2),{canvas:U.canvas,offsetX:T-2*ne,offsetY:j-2*Q,scaleX:ne,scaleY:Q}}getPattern(_,O,k,A){u(_,this._bbox);let D;if(A===l.SHADING)D=a.Util.singularValueDecompose2dScale((0,o.getCurrentTransform)(_));else if(D=a.Util.singularValueDecompose2dScale(O.baseTransform),this.matrix){const T=a.Util.singularValueDecompose2dScale(this.matrix);D=[D[0]*T[0],D[1]*T[1]]}const R=this._createMeshCanvas(D,A===l.SHADING?null:this._background,O.cachedCanvases);return A!==l.SHADING&&(_.setTransform(...O.baseTransform),this.matrix&&_.transform(...this.matrix)),_.translate(R.offsetX,R.offsetY),_.scale(R.scaleX,R.scaleY),_.createPattern(R.canvas,"no-repeat")}}class b extends f{getPattern(){return"hotpink"}}function x(w){switch(w[0]){case"RadialAxial":return new h(w);case"Mesh":return new g(w);case"Dummy":return new b}throw new Error(`Unknown IR type: ${w[0]}`)}const y={COLORED:1,UNCOLORED:2},E=class E{constructor(_,O,k,A,D){this.operatorList=_[2],this.matrix=_[3]||[1,0,0,1,0,0],this.bbox=_[4],this.xstep=_[5],this.ystep=_[6],this.paintType=_[7],this.tilingType=_[8],this.color=O,this.ctx=k,this.canvasGraphicsFactory=A,this.baseTransform=D}createPatternCanvas(_){const O=this.operatorList,k=this.bbox,A=this.xstep,D=this.ystep,R=this.paintType,T=this.tilingType,j=this.color,P=this.canvasGraphicsFactory;(0,a.info)("TilingType: "+T);const M=k[0],I=k[1],G=k[2],ne=k[3],Q=a.Util.singularValueDecompose2dScale(this.matrix),B=a.Util.singularValueDecompose2dScale(this.baseTransform),H=[Q[0]*B[0],Q[1]*B[1]],Y=this.getSizeAndScale(A,this.ctx.canvas.width,H[0]),U=this.getSizeAndScale(D,this.ctx.canvas.height,H[1]),F=_.cachedCanvases.getCanvas("pattern",Y.size,U.size,!0),X=F.context,z=P.createCanvasGraphics(X);z.groupLevel=_.groupLevel,this.setFillAndStrokeStyleToContext(z,R,j);let L=M,$=I,V=G,K=ne;return M<0&&(L=0,V+=Math.abs(M)),I<0&&($=0,K+=Math.abs(I)),X.translate(-(Y.scale*L),-(U.scale*$)),z.transform(Y.scale,0,0,U.scale,0,0),X.save(),this.clipBbox(z,L,$,V,K),z.baseTransform=(0,o.getCurrentTransform)(z.ctx),z.executeOperatorList(O),z.endDrawing(),{canvas:F.canvas,scaleX:Y.scale,scaleY:U.scale,offsetX:L,offsetY:$}}getSizeAndScale(_,O,k){_=Math.abs(_);const A=Math.max(E.MAX_PATTERN_SIZE,O);let D=Math.ceil(_*k);return D>=A?D=A:k=D/_,{scale:k,size:D}}clipBbox(_,O,k,A,D){const R=A-O,T=D-k;_.ctx.rect(O,k,R,T),_.current.updateRectMinMax((0,o.getCurrentTransform)(_.ctx),[O,k,A,D]),_.clip(),_.endPath()}setFillAndStrokeStyleToContext(_,O,k){const A=_.ctx,D=_.current;switch(O){case y.COLORED:const R=this.ctx;A.fillStyle=R.fillStyle,A.strokeStyle=R.strokeStyle,D.fillColor=R.fillStyle,D.strokeColor=R.strokeStyle;break;case y.UNCOLORED:const T=a.Util.makeHexColor(k[0],k[1],k[2]);A.fillStyle=T,A.strokeStyle=T,D.fillColor=T,D.strokeColor=T;break;default:throw new a.FormatError(`Unsupported paint type: ${O}`)}}getPattern(_,O,k,A){let D=k;A!==l.SHADING&&(D=a.Util.transform(D,O.baseTransform),this.matrix&&(D=a.Util.transform(D,this.matrix)));const R=this.createPatternCanvas(O);let T=new DOMMatrix(D);T=T.translate(R.offsetX,R.offsetY),T=T.scale(1/R.scaleX,1/R.scaleY);const j=_.createPattern(R.canvas,"repeat");return j.setTransform(T),j}};kt(E,"MAX_PATTERN_SIZE",3e3);let S=E;t.TilingPattern=S},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.convertBlackAndWhiteToRGBA=l,t.convertToRGBA=o,t.grayToRGBA=f;var a=i(1);function o(h){switch(h.kind){case a.ImageKind.GRAYSCALE_1BPP:return l(h);case a.ImageKind.RGB_24BPP:return u(h)}return null}function l({src:h,srcPos:p=0,dest:m,width:g,height:b,nonBlackColor:x=4294967295,inverseDecode:y=!1}){const S=a.FeatureTest.isLittleEndian?4278190080:255,[E,w]=y?[x,S]:[S,x],_=g>>3,O=g&7,k=h.length;m=new Uint32Array(m.buffer);let A=0;for(let D=0;D<b;D++){for(const T=p+_;p<T;p++){const j=p<k?h[p]:255;m[A++]=j&128?w:E,m[A++]=j&64?w:E,m[A++]=j&32?w:E,m[A++]=j&16?w:E,m[A++]=j&8?w:E,m[A++]=j&4?w:E,m[A++]=j&2?w:E,m[A++]=j&1?w:E}if(O===0)continue;const R=p<k?h[p++]:255;for(let T=0;T<O;T++)m[A++]=R&1<<7-T?w:E}return{srcPos:p,destPos:A}}function u({src:h,srcPos:p=0,dest:m,destPos:g=0,width:b,height:x}){let y=0;const S=h.length>>2,E=new Uint32Array(h.buffer,p,S);if(a.FeatureTest.isLittleEndian){for(;y<S-2;y+=3,g+=4){const w=E[y],_=E[y+1],O=E[y+2];m[g]=w|4278190080,m[g+1]=w>>>24|_<<8|4278190080,m[g+2]=_>>>16|O<<16|4278190080,m[g+3]=O>>>8|4278190080}for(let w=y*4,_=h.length;w<_;w+=3)m[g++]=h[w]|h[w+1]<<8|h[w+2]<<16|4278190080}else{for(;y<S-2;y+=3,g+=4){const w=E[y],_=E[y+1],O=E[y+2];m[g]=w|255,m[g+1]=w<<24|_>>>8|255,m[g+2]=_<<16|O>>>16|255,m[g+3]=O<<8|255}for(let w=y*4,_=h.length;w<_;w+=3)m[g++]=h[w]<<24|h[w+1]<<16|h[w+2]<<8|255}return{srcPos:p,destPos:g}}function f(h,p){if(a.FeatureTest.isLittleEndian)for(let m=0,g=h.length;m<g;m++)p[m]=h[m]*65793|4278190080;else for(let m=0,g=h.length;m<g;m++)p[m]=h[m]*16843008|255}},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GlobalWorkerOptions=void 0;const i=Object.create(null);t.GlobalWorkerOptions=i,i.workerPort=null,i.workerSrc=""},(e,t,i)=>{var h,Rp,_p,$s;Object.defineProperty(t,"__esModule",{value:!0}),t.MessageHandler=void 0;var a=i(1);const o={DATA:1,ERROR:2},l={CANCEL:1,CANCEL_COMPLETE:2,CLOSE:3,ENQUEUE:4,ERROR:5,PULL:6,PULL_COMPLETE:7,START_COMPLETE:8};function u(b){switch(b instanceof Error||typeof b=="object"&&b!==null||(0,a.unreachable)('wrapReason: Expected "reason" to be a (possibly cloned) Error.'),b.name){case"AbortException":return new a.AbortException(b.message);case"MissingPDFException":return new a.MissingPDFException(b.message);case"PasswordException":return new a.PasswordException(b.message,b.code);case"UnexpectedResponseException":return new a.UnexpectedResponseException(b.message,b.status);case"UnknownErrorException":return new a.UnknownErrorException(b.message,b.details);default:return new a.UnknownErrorException(b.message,b.toString())}}class f{constructor(x,y,S){Se(this,h);this.sourceName=x,this.targetName=y,this.comObj=S,this.callbackId=1,this.streamId=1,this.streamSinks=Object.create(null),this.streamControllers=Object.create(null),this.callbackCapabilities=Object.create(null),this.actionHandler=Object.create(null),this._onComObjOnMessage=E=>{const w=E.data;if(w.targetName!==this.sourceName)return;if(w.stream){me(this,h,_p).call(this,w);return}if(w.callback){const O=w.callbackId,k=this.callbackCapabilities[O];if(!k)throw new Error(`Cannot resolve callback ${O}`);if(delete this.callbackCapabilities[O],w.callback===o.DATA)k.resolve(w.data);else if(w.callback===o.ERROR)k.reject(u(w.reason));else throw new Error("Unexpected callback case");return}const _=this.actionHandler[w.action];if(!_)throw new Error(`Unknown action from worker: ${w.action}`);if(w.callbackId){const O=this.sourceName,k=w.sourceName;new Promise(function(A){A(_(w.data))}).then(function(A){S.postMessage({sourceName:O,targetName:k,callback:o.DATA,callbackId:w.callbackId,data:A})},function(A){S.postMessage({sourceName:O,targetName:k,callback:o.ERROR,callbackId:w.callbackId,reason:u(A)})});return}if(w.streamId){me(this,h,Rp).call(this,w);return}_(w.data)},S.addEventListener("message",this._onComObjOnMessage)}on(x,y){const S=this.actionHandler;if(S[x])throw new Error(`There is already an actionName called "${x}"`);S[x]=y}send(x,y,S){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:x,data:y},S)}sendWithPromise(x,y,S){const E=this.callbackId++,w=new a.PromiseCapability;this.callbackCapabilities[E]=w;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:x,callbackId:E,data:y},S)}catch(_){w.reject(_)}return w.promise}sendWithStream(x,y,S,E){const w=this.streamId++,_=this.sourceName,O=this.targetName,k=this.comObj;return new ReadableStream({start:A=>{const D=new a.PromiseCapability;return this.streamControllers[w]={controller:A,startCall:D,pullCall:null,cancelCall:null,isClosed:!1},k.postMessage({sourceName:_,targetName:O,action:x,streamId:w,data:y,desiredSize:A.desiredSize},E),D.promise},pull:A=>{const D=new a.PromiseCapability;return this.streamControllers[w].pullCall=D,k.postMessage({sourceName:_,targetName:O,stream:l.PULL,streamId:w,desiredSize:A.desiredSize}),D.promise},cancel:A=>{(0,a.assert)(A instanceof Error,"cancel must have a valid reason");const D=new a.PromiseCapability;return this.streamControllers[w].cancelCall=D,this.streamControllers[w].isClosed=!0,k.postMessage({sourceName:_,targetName:O,stream:l.CANCEL,streamId:w,reason:u(A)}),D.promise}},S)}destroy(){this.comObj.removeEventListener("message",this._onComObjOnMessage)}}h=new WeakSet,Rp=function(x){const y=x.streamId,S=this.sourceName,E=x.sourceName,w=this.comObj,_=this,O=this.actionHandler[x.action],k={enqueue(A,D=1,R){if(this.isCancelled)return;const T=this.desiredSize;this.desiredSize-=D,T>0&&this.desiredSize<=0&&(this.sinkCapability=new a.PromiseCapability,this.ready=this.sinkCapability.promise),w.postMessage({sourceName:S,targetName:E,stream:l.ENQUEUE,streamId:y,chunk:A},R)},close(){this.isCancelled||(this.isCancelled=!0,w.postMessage({sourceName:S,targetName:E,stream:l.CLOSE,streamId:y}),delete _.streamSinks[y])},error(A){(0,a.assert)(A instanceof Error,"error must have a valid reason"),!this.isCancelled&&(this.isCancelled=!0,w.postMessage({sourceName:S,targetName:E,stream:l.ERROR,streamId:y,reason:u(A)}))},sinkCapability:new a.PromiseCapability,onPull:null,onCancel:null,isCancelled:!1,desiredSize:x.desiredSize,ready:null};k.sinkCapability.resolve(),k.ready=k.sinkCapability.promise,this.streamSinks[y]=k,new Promise(function(A){A(O(x.data,k))}).then(function(){w.postMessage({sourceName:S,targetName:E,stream:l.START_COMPLETE,streamId:y,success:!0})},function(A){w.postMessage({sourceName:S,targetName:E,stream:l.START_COMPLETE,streamId:y,reason:u(A)})})},_p=function(x){const y=x.streamId,S=this.sourceName,E=x.sourceName,w=this.comObj,_=this.streamControllers[y],O=this.streamSinks[y];switch(x.stream){case l.START_COMPLETE:x.success?_.startCall.resolve():_.startCall.reject(u(x.reason));break;case l.PULL_COMPLETE:x.success?_.pullCall.resolve():_.pullCall.reject(u(x.reason));break;case l.PULL:if(!O){w.postMessage({sourceName:S,targetName:E,stream:l.PULL_COMPLETE,streamId:y,success:!0});break}O.desiredSize<=0&&x.desiredSize>0&&O.sinkCapability.resolve(),O.desiredSize=x.desiredSize,new Promise(function(k){var A;k((A=O.onPull)==null?void 0:A.call(O))}).then(function(){w.postMessage({sourceName:S,targetName:E,stream:l.PULL_COMPLETE,streamId:y,success:!0})},function(k){w.postMessage({sourceName:S,targetName:E,stream:l.PULL_COMPLETE,streamId:y,reason:u(k)})});break;case l.ENQUEUE:if((0,a.assert)(_,"enqueue should have stream controller"),_.isClosed)break;_.controller.enqueue(x.chunk);break;case l.CLOSE:if((0,a.assert)(_,"close should have stream controller"),_.isClosed)break;_.isClosed=!0,_.controller.close(),me(this,h,$s).call(this,_,y);break;case l.ERROR:(0,a.assert)(_,"error should have stream controller"),_.controller.error(u(x.reason)),me(this,h,$s).call(this,_,y);break;case l.CANCEL_COMPLETE:x.success?_.cancelCall.resolve():_.cancelCall.reject(u(x.reason)),me(this,h,$s).call(this,_,y);break;case l.CANCEL:if(!O)break;new Promise(function(k){var A;k((A=O.onCancel)==null?void 0:A.call(O,u(x.reason)))}).then(function(){w.postMessage({sourceName:S,targetName:E,stream:l.CANCEL_COMPLETE,streamId:y,success:!0})},function(k){w.postMessage({sourceName:S,targetName:E,stream:l.CANCEL_COMPLETE,streamId:y,reason:u(k)})}),O.sinkCapability.reject(u(x.reason)),O.isCancelled=!0,delete this.streamSinks[y];break;default:throw new Error("Unexpected stream case")}},$s=async function(x,y){var S,E,w;await Promise.allSettled([(S=x.startCall)==null?void 0:S.promise,(E=x.pullCall)==null?void 0:E.promise,(w=x.cancelCall)==null?void 0:w.promise]),delete this.streamControllers[y]},t.MessageHandler=f},(e,t,i)=>{var l,u;Object.defineProperty(t,"__esModule",{value:!0}),t.Metadata=void 0;var a=i(1);class o{constructor({parsedData:h,rawData:p}){Se(this,l);Se(this,u);Ce(this,l,h),Ce(this,u,p)}getRaw(){return N(this,u)}get(h){return N(this,l).get(h)??null}getAll(){return(0,a.objectFromMap)(N(this,l))}has(h){return N(this,l).has(h)}}l=new WeakMap,u=new WeakMap,t.Metadata=o},(e,t,i)=>{var h,p,m,g,b,x,gc;Object.defineProperty(t,"__esModule",{value:!0}),t.OptionalContentConfig=void 0;var a=i(1),o=i(8);const l=Symbol("INTERNAL");class u{constructor(E,w){Se(this,h,!0);this.name=E,this.intent=w}get visible(){return N(this,h)}_setVisible(E,w){E!==l&&(0,a.unreachable)("Internal method `_setVisible` called."),Ce(this,h,w)}}h=new WeakMap;class f{constructor(E){Se(this,x);Se(this,p,null);Se(this,m,new Map);Se(this,g,null);Se(this,b,null);if(this.name=null,this.creator=null,E!==null){this.name=E.name,this.creator=E.creator,Ce(this,b,E.order);for(const w of E.groups)N(this,m).set(w.id,new u(w.name,w.intent));if(E.baseState==="OFF")for(const w of N(this,m).values())w._setVisible(l,!1);for(const w of E.on)N(this,m).get(w)._setVisible(l,!0);for(const w of E.off)N(this,m).get(w)._setVisible(l,!1);Ce(this,g,this.getHash())}}isVisible(E){if(N(this,m).size===0)return!0;if(!E)return(0,a.warn)("Optional content group not defined."),!0;if(E.type==="OCG")return N(this,m).has(E.id)?N(this,m).get(E.id).visible:((0,a.warn)(`Optional content group not found: ${E.id}`),!0);if(E.type==="OCMD"){if(E.expression)return me(this,x,gc).call(this,E.expression);if(!E.policy||E.policy==="AnyOn"){for(const w of E.ids){if(!N(this,m).has(w))return(0,a.warn)(`Optional content group not found: ${w}`),!0;if(N(this,m).get(w).visible)return!0}return!1}else if(E.policy==="AllOn"){for(const w of E.ids){if(!N(this,m).has(w))return(0,a.warn)(`Optional content group not found: ${w}`),!0;if(!N(this,m).get(w).visible)return!1}return!0}else if(E.policy==="AnyOff"){for(const w of E.ids){if(!N(this,m).has(w))return(0,a.warn)(`Optional content group not found: ${w}`),!0;if(!N(this,m).get(w).visible)return!0}return!1}else if(E.policy==="AllOff"){for(const w of E.ids){if(!N(this,m).has(w))return(0,a.warn)(`Optional content group not found: ${w}`),!0;if(N(this,m).get(w).visible)return!1}return!0}return(0,a.warn)(`Unknown optional content policy ${E.policy}.`),!0}return(0,a.warn)(`Unknown group type ${E.type}.`),!0}setVisibility(E,w=!0){if(!N(this,m).has(E)){(0,a.warn)(`Optional content group not found: ${E}`);return}N(this,m).get(E)._setVisible(l,!!w),Ce(this,p,null)}get hasInitialVisibility(){return N(this,g)===null||this.getHash()===N(this,g)}getOrder(){return N(this,m).size?N(this,b)?N(this,b).slice():[...N(this,m).keys()]:null}getGroups(){return N(this,m).size>0?(0,a.objectFromMap)(N(this,m)):null}getGroup(E){return N(this,m).get(E)||null}getHash(){if(N(this,p)!==null)return N(this,p);const E=new o.MurmurHash3_64;for(const[w,_]of N(this,m))E.update(`${w}:${_.visible}`);return Ce(this,p,E.hexdigest())}}p=new WeakMap,m=new WeakMap,g=new WeakMap,b=new WeakMap,x=new WeakSet,gc=function(E){const w=E.length;if(w<2)return!0;const _=E[0];for(let O=1;O<w;O++){const k=E[O];let A;if(Array.isArray(k))A=me(this,x,gc).call(this,k);else if(N(this,m).has(k))A=N(this,m).get(k).visible;else return(0,a.warn)(`Optional content group not found: ${k}`),!0;switch(_){case"And":if(!A)return!1;break;case"Or":if(A)return!0;break;case"Not":return!A;default:return!0}}return _==="And"},t.OptionalContentConfig=f},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PDFDataTransportStream=void 0;var a=i(1),o=i(6);class l{constructor({length:p,initialData:m,progressiveDone:g=!1,contentDispositionFilename:b=null,disableRange:x=!1,disableStream:y=!1},S){if((0,a.assert)(S,'PDFDataTransportStream - missing required "pdfDataRangeTransport" argument.'),this._queuedChunks=[],this._progressiveDone=g,this._contentDispositionFilename=b,(m==null?void 0:m.length)>0){const E=m instanceof Uint8Array&&m.byteLength===m.buffer.byteLength?m.buffer:new Uint8Array(m).buffer;this._queuedChunks.push(E)}this._pdfDataRangeTransport=S,this._isStreamingSupported=!y,this._isRangeSupported=!x,this._contentLength=p,this._fullRequestReader=null,this._rangeReaders=[],this._pdfDataRangeTransport.addRangeListener((E,w)=>{this._onReceiveData({begin:E,chunk:w})}),this._pdfDataRangeTransport.addProgressListener((E,w)=>{this._onProgress({loaded:E,total:w})}),this._pdfDataRangeTransport.addProgressiveReadListener(E=>{this._onReceiveData({chunk:E})}),this._pdfDataRangeTransport.addProgressiveDoneListener(()=>{this._onProgressiveDone()}),this._pdfDataRangeTransport.transportReady()}_onReceiveData({begin:p,chunk:m}){const g=m instanceof Uint8Array&&m.byteLength===m.buffer.byteLength?m.buffer:new Uint8Array(m).buffer;if(p===void 0)this._fullRequestReader?this._fullRequestReader._enqueue(g):this._queuedChunks.push(g);else{const b=this._rangeReaders.some(function(x){return x._begin!==p?!1:(x._enqueue(g),!0)});(0,a.assert)(b,"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}}get _progressiveDataLength(){var p;return((p=this._fullRequestReader)==null?void 0:p._loaded)??0}_onProgress(p){var m,g,b,x;p.total===void 0?(g=(m=this._rangeReaders[0])==null?void 0:m.onProgress)==null||g.call(m,{loaded:p.loaded}):(x=(b=this._fullRequestReader)==null?void 0:b.onProgress)==null||x.call(b,{loaded:p.loaded,total:p.total})}_onProgressiveDone(){var p;(p=this._fullRequestReader)==null||p.progressiveDone(),this._progressiveDone=!0}_removeRangeReader(p){const m=this._rangeReaders.indexOf(p);m>=0&&this._rangeReaders.splice(m,1)}getFullReader(){(0,a.assert)(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");const p=this._queuedChunks;return this._queuedChunks=null,new u(this,p,this._progressiveDone,this._contentDispositionFilename)}getRangeReader(p,m){if(m<=this._progressiveDataLength)return null;const g=new f(this,p,m);return this._pdfDataRangeTransport.requestDataRange(p,m),this._rangeReaders.push(g),g}cancelAllRequests(p){var m;(m=this._fullRequestReader)==null||m.cancel(p);for(const g of this._rangeReaders.slice(0))g.cancel(p);this._pdfDataRangeTransport.abort()}}t.PDFDataTransportStream=l;class u{constructor(p,m,g=!1,b=null){this._stream=p,this._done=g||!1,this._filename=(0,o.isPdfFile)(b)?b:null,this._queuedChunks=m||[],this._loaded=0;for(const x of this._queuedChunks)this._loaded+=x.byteLength;this._requests=[],this._headersReady=Promise.resolve(),p._fullRequestReader=this,this.onProgress=null}_enqueue(p){this._done||(this._requests.length>0?this._requests.shift().resolve({value:p,done:!1}):this._queuedChunks.push(p),this._loaded+=p.byteLength)}get headersReady(){return this._headersReady}get filename(){return this._filename}get isRangeSupported(){return this._stream._isRangeSupported}get isStreamingSupported(){return this._stream._isStreamingSupported}get contentLength(){return this._stream._contentLength}async read(){if(this._queuedChunks.length>0)return{value:this._queuedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};const p=new a.PromiseCapability;return this._requests.push(p),p.promise}cancel(p){this._done=!0;for(const m of this._requests)m.resolve({value:void 0,done:!0});this._requests.length=0}progressiveDone(){this._done||(this._done=!0)}}class f{constructor(p,m,g){this._stream=p,this._begin=m,this._end=g,this._queuedChunk=null,this._requests=[],this._done=!1,this.onProgress=null}_enqueue(p){if(!this._done){if(this._requests.length===0)this._queuedChunk=p;else{this._requests.shift().resolve({value:p,done:!1});for(const g of this._requests)g.resolve({value:void 0,done:!0});this._requests.length=0}this._done=!0,this._stream._removeRangeReader(this)}}get isStreamingSupported(){return!1}async read(){if(this._queuedChunk){const m=this._queuedChunk;return this._queuedChunk=null,{value:m,done:!1}}if(this._done)return{value:void 0,done:!0};const p=new a.PromiseCapability;return this._requests.push(p),p.promise}cancel(p){this._done=!0;for(const m of this._requests)m.resolve({value:void 0,done:!0});this._requests.length=0,this._stream._removeRangeReader(this)}}},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PDFFetchStream=void 0;var a=i(1),o=i(20);function l(g,b,x){return{method:"GET",headers:g,signal:x.signal,mode:"cors",credentials:b?"include":"same-origin",redirect:"follow"}}function u(g){const b=new Headers;for(const x in g){const y=g[x];y!==void 0&&b.append(x,y)}return b}function f(g){return g instanceof Uint8Array?g.buffer:g instanceof ArrayBuffer?g:((0,a.warn)(`getArrayBuffer - unexpected data format: ${g}`),new Uint8Array(g).buffer)}class h{constructor(b){this.source=b,this.isHttp=/^https?:/i.test(b.url),this.httpHeaders=this.isHttp&&b.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){var b;return((b=this._fullRequestReader)==null?void 0:b._loaded)??0}getFullReader(){return(0,a.assert)(!this._fullRequestReader,"PDFFetchStream.getFullReader can only be called once."),this._fullRequestReader=new p(this),this._fullRequestReader}getRangeReader(b,x){if(x<=this._progressiveDataLength)return null;const y=new m(this,b,x);return this._rangeRequestReaders.push(y),y}cancelAllRequests(b){var x;(x=this._fullRequestReader)==null||x.cancel(b);for(const y of this._rangeRequestReaders.slice(0))y.cancel(b)}}t.PDFFetchStream=h;class p{constructor(b){this._stream=b,this._reader=null,this._loaded=0,this._filename=null;const x=b.source;this._withCredentials=x.withCredentials||!1,this._contentLength=x.length,this._headersCapability=new a.PromiseCapability,this._disableRange=x.disableRange||!1,this._rangeChunkSize=x.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._abortController=new AbortController,this._isStreamingSupported=!x.disableStream,this._isRangeSupported=!x.disableRange,this._headers=u(this._stream.httpHeaders);const y=x.url;fetch(y,l(this._headers,this._withCredentials,this._abortController)).then(S=>{if(!(0,o.validateResponseStatus)(S.status))throw(0,o.createResponseStatusError)(S.status,y);this._reader=S.body.getReader(),this._headersCapability.resolve();const E=O=>S.headers.get(O),{allowRangeRequests:w,suggestedLength:_}=(0,o.validateRangeRequestCapabilities)({getResponseHeader:E,isHttp:this._stream.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=w,this._contentLength=_||this._contentLength,this._filename=(0,o.extractFilenameFromHeader)(E),!this._isStreamingSupported&&this._isRangeSupported&&this.cancel(new a.AbortException("Streaming is disabled."))}).catch(this._headersCapability.reject),this.onProgress=null}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){var y;await this._headersCapability.promise;const{value:b,done:x}=await this._reader.read();return x?{value:b,done:x}:(this._loaded+=b.byteLength,(y=this.onProgress)==null||y.call(this,{loaded:this._loaded,total:this._contentLength}),{value:f(b),done:!1})}cancel(b){var x;(x=this._reader)==null||x.cancel(b),this._abortController.abort()}}class m{constructor(b,x,y){this._stream=b,this._reader=null,this._loaded=0;const S=b.source;this._withCredentials=S.withCredentials||!1,this._readCapability=new a.PromiseCapability,this._isStreamingSupported=!S.disableStream,this._abortController=new AbortController,this._headers=u(this._stream.httpHeaders),this._headers.append("Range",`bytes=${x}-${y-1}`);const E=S.url;fetch(E,l(this._headers,this._withCredentials,this._abortController)).then(w=>{if(!(0,o.validateResponseStatus)(w.status))throw(0,o.createResponseStatusError)(w.status,E);this._readCapability.resolve(),this._reader=w.body.getReader()}).catch(this._readCapability.reject),this.onProgress=null}get isStreamingSupported(){return this._isStreamingSupported}async read(){var y;await this._readCapability.promise;const{value:b,done:x}=await this._reader.read();return x?{value:b,done:x}:(this._loaded+=b.byteLength,(y=this.onProgress)==null||y.call(this,{loaded:this._loaded}),{value:f(b),done:!1})}cancel(b){var x;(x=this._reader)==null||x.cancel(b),this._abortController.abort()}}},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createResponseStatusError=h,t.extractFilenameFromHeader=f,t.validateRangeRequestCapabilities=u,t.validateResponseStatus=p;var a=i(1),o=i(21),l=i(6);function u({getResponseHeader:m,isHttp:g,rangeChunkSize:b,disableRange:x}){const y={allowRangeRequests:!1,suggestedLength:void 0},S=parseInt(m("Content-Length"),10);return!Number.isInteger(S)||(y.suggestedLength=S,S<=2*b)||x||!g||m("Accept-Ranges")!=="bytes"||(m("Content-Encoding")||"identity")!=="identity"||(y.allowRangeRequests=!0),y}function f(m){const g=m("Content-Disposition");if(g){let b=(0,o.getFilenameFromContentDispositionHeader)(g);if(b.includes("%"))try{b=decodeURIComponent(b)}catch{}if((0,l.isPdfFile)(b))return b}return null}function h(m,g){return m===404||m===0&&g.startsWith("file:")?new a.MissingPDFException('Missing PDF "'+g+'".'):new a.UnexpectedResponseException(`Unexpected server response (${m}) while retrieving PDF "${g}".`,m)}function p(m){return m===200||m===206}},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getFilenameFromContentDispositionHeader=o;var a=i(1);function o(l){let u=!0,f=h("filename\\*","i").exec(l);if(f){f=f[1];let S=b(f);return S=unescape(S),S=x(S),S=y(S),m(S)}if(f=g(l),f){const S=y(f);return m(S)}if(f=h("filename","i").exec(l),f){f=f[1];let S=b(f);return S=y(S),m(S)}function h(S,E){return new RegExp("(?:^|;)\\s*"+S+'\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)',E)}function p(S,E){if(S){if(!/^[\x00-\xFF]+$/.test(E))return E;try{const w=new TextDecoder(S,{fatal:!0}),_=(0,a.stringToBytes)(E);E=w.decode(_),u=!1}catch{}}return E}function m(S){return u&&/[\x80-\xff]/.test(S)&&(S=p("utf-8",S),u&&(S=p("iso-8859-1",S))),S}function g(S){const E=[];let w;const _=h("filename\\*((?!0\\d)\\d+)(\\*?)","ig");for(;(w=_.exec(S))!==null;){let[,k,A,D]=w;if(k=parseInt(k,10),k in E){if(k===0)break;continue}E[k]=[A,D]}const O=[];for(let k=0;k<E.length&&k in E;++k){let[A,D]=E[k];D=b(D),A&&(D=unescape(D),k===0&&(D=x(D))),O.push(D)}return O.join("")}function b(S){if(S.startsWith('"')){const E=S.slice(1).split('\\"');for(let w=0;w<E.length;++w){const _=E[w].indexOf('"');_!==-1&&(E[w]=E[w].slice(0,_),E.length=w+1),E[w]=E[w].replaceAll(/\\(.)/g,"$1")}S=E.join('"')}return S}function x(S){const E=S.indexOf("'");if(E===-1)return S;const w=S.slice(0,E),O=S.slice(E+1).replace(/^[^']*'/,"");return p(w,O)}function y(S){return!S.startsWith("=?")||/[\x00-\x19\x80-\xff]/.test(S)?S:S.replaceAll(/=\?([\w-]*)\?([QqBb])\?((?:[^?]|\?(?!=))*)\?=/g,function(E,w,_,O){if(_==="q"||_==="Q")return O=O.replaceAll("_"," "),O=O.replaceAll(/=([0-9a-fA-F]{2})/g,function(k,A){return String.fromCharCode(parseInt(A,16))}),p(w,O);try{O=atob(O)}catch{}return p(w,O)})}return""}},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PDFNetworkStream=void 0;var a=i(1),o=i(20);const l=200,u=206;function f(b){const x=b.response;return typeof x!="string"?x:(0,a.stringToBytes)(x).buffer}class h{constructor(x,y={}){this.url=x,this.isHttp=/^https?:/i.test(x),this.httpHeaders=this.isHttp&&y.httpHeaders||Object.create(null),this.withCredentials=y.withCredentials||!1,this.currXhrId=0,this.pendingRequests=Object.create(null)}requestRange(x,y,S){const E={begin:x,end:y};for(const w in S)E[w]=S[w];return this.request(E)}requestFull(x){return this.request(x)}request(x){const y=new XMLHttpRequest,S=this.currXhrId++,E=this.pendingRequests[S]={xhr:y};y.open("GET",this.url),y.withCredentials=this.withCredentials;for(const w in this.httpHeaders){const _=this.httpHeaders[w];_!==void 0&&y.setRequestHeader(w,_)}return this.isHttp&&"begin"in x&&"end"in x?(y.setRequestHeader("Range",`bytes=${x.begin}-${x.end-1}`),E.expectedStatus=u):E.expectedStatus=l,y.responseType="arraybuffer",x.onError&&(y.onerror=function(w){x.onError(y.status)}),y.onreadystatechange=this.onStateChange.bind(this,S),y.onprogress=this.onProgress.bind(this,S),E.onHeadersReceived=x.onHeadersReceived,E.onDone=x.onDone,E.onError=x.onError,E.onProgress=x.onProgress,y.send(null),S}onProgress(x,y){var E;const S=this.pendingRequests[x];S&&((E=S.onProgress)==null||E.call(S,y))}onStateChange(x,y){var k,A,D;const S=this.pendingRequests[x];if(!S)return;const E=S.xhr;if(E.readyState>=2&&S.onHeadersReceived&&(S.onHeadersReceived(),delete S.onHeadersReceived),E.readyState!==4||!(x in this.pendingRequests))return;if(delete this.pendingRequests[x],E.status===0&&this.isHttp){(k=S.onError)==null||k.call(S,E.status);return}const w=E.status||l;if(!(w===l&&S.expectedStatus===u)&&w!==S.expectedStatus){(A=S.onError)==null||A.call(S,E.status);return}const O=f(E);if(w===u){const R=E.getResponseHeader("Content-Range"),T=/bytes (\d+)-(\d+)\/(\d+)/.exec(R);S.onDone({begin:parseInt(T[1],10),chunk:O})}else O?S.onDone({begin:0,chunk:O}):(D=S.onError)==null||D.call(S,E.status)}getRequestXhr(x){return this.pendingRequests[x].xhr}isPendingRequest(x){return x in this.pendingRequests}abortRequest(x){const y=this.pendingRequests[x].xhr;delete this.pendingRequests[x],y.abort()}}class p{constructor(x){this._source=x,this._manager=new h(x.url,{httpHeaders:x.httpHeaders,withCredentials:x.withCredentials}),this._rangeChunkSize=x.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}_onRangeRequestReaderClosed(x){const y=this._rangeRequestReaders.indexOf(x);y>=0&&this._rangeRequestReaders.splice(y,1)}getFullReader(){return(0,a.assert)(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once."),this._fullRequestReader=new m(this._manager,this._source),this._fullRequestReader}getRangeReader(x,y){const S=new g(this._manager,x,y);return S.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(S),S}cancelAllRequests(x){var y;(y=this._fullRequestReader)==null||y.cancel(x);for(const S of this._rangeRequestReaders.slice(0))S.cancel(x)}}t.PDFNetworkStream=p;class m{constructor(x,y){this._manager=x;const S={onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=y.url,this._fullRequestId=x.requestFull(S),this._headersReceivedCapability=new a.PromiseCapability,this._disableRange=y.disableRange||!1,this._contentLength=y.length,this._rangeChunkSize=y.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._isStreamingSupported=!1,this._isRangeSupported=!1,this._cachedChunks=[],this._requests=[],this._done=!1,this._storedError=void 0,this._filename=null,this.onProgress=null}_onHeadersReceived(){const x=this._fullRequestId,y=this._manager.getRequestXhr(x),S=_=>y.getResponseHeader(_),{allowRangeRequests:E,suggestedLength:w}=(0,o.validateRangeRequestCapabilities)({getResponseHeader:S,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});E&&(this._isRangeSupported=!0),this._contentLength=w||this._contentLength,this._filename=(0,o.extractFilenameFromHeader)(S),this._isRangeSupported&&this._manager.abortRequest(x),this._headersReceivedCapability.resolve()}_onDone(x){if(x&&(this._requests.length>0?this._requests.shift().resolve({value:x.chunk,done:!1}):this._cachedChunks.push(x.chunk)),this._done=!0,!(this._cachedChunks.length>0)){for(const y of this._requests)y.resolve({value:void 0,done:!0});this._requests.length=0}}_onError(x){this._storedError=(0,o.createResponseStatusError)(x,this._url),this._headersReceivedCapability.reject(this._storedError);for(const y of this._requests)y.reject(this._storedError);this._requests.length=0,this._cachedChunks.length=0}_onProgress(x){var y;(y=this.onProgress)==null||y.call(this,{loaded:x.loaded,total:x.lengthComputable?x.total:this._contentLength})}get filename(){return this._filename}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}get contentLength(){return this._contentLength}get headersReady(){return this._headersReceivedCapability.promise}async read(){if(this._storedError)throw this._storedError;if(this._cachedChunks.length>0)return{value:this._cachedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};const x=new a.PromiseCapability;return this._requests.push(x),x.promise}cancel(x){this._done=!0,this._headersReceivedCapability.reject(x);for(const y of this._requests)y.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId),this._fullRequestReader=null}}class g{constructor(x,y,S){this._manager=x;const E={onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=x.url,this._requestId=x.requestRange(y,S,E),this._requests=[],this._queuedChunk=null,this._done=!1,this._storedError=void 0,this.onProgress=null,this.onClosed=null}_close(){var x;(x=this.onClosed)==null||x.call(this,this)}_onDone(x){const y=x.chunk;this._requests.length>0?this._requests.shift().resolve({value:y,done:!1}):this._queuedChunk=y,this._done=!0;for(const S of this._requests)S.resolve({value:void 0,done:!0});this._requests.length=0,this._close()}_onError(x){this._storedError=(0,o.createResponseStatusError)(x,this._url);for(const y of this._requests)y.reject(this._storedError);this._requests.length=0,this._queuedChunk=null}_onProgress(x){var y;this.isStreamingSupported||(y=this.onProgress)==null||y.call(this,{loaded:x.loaded})}get isStreamingSupported(){return!1}async read(){if(this._storedError)throw this._storedError;if(this._queuedChunk!==null){const y=this._queuedChunk;return this._queuedChunk=null,{value:y,done:!1}}if(this._done)return{value:void 0,done:!0};const x=new a.PromiseCapability;return this._requests.push(x),x.promise}cancel(x){this._done=!0;for(const y of this._requests)y.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId),this._close()}}},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PDFNodeStream=void 0;var a=i(1),o=i(20);const l=/^file:\/\/\/[a-zA-Z]:\//;function u(S){const E=require$$5,w=E.parse(S);return w.protocol==="file:"||w.host?w:/^[a-z]:[/\\]/i.test(S)?E.parse(`file:///${S}`):(w.host||(w.protocol="file:"),w)}class f{constructor(E){this.source=E,this.url=u(E.url),this.isHttp=this.url.protocol==="http:"||this.url.protocol==="https:",this.isFsUrl=this.url.protocol==="file:",this.httpHeaders=this.isHttp&&E.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){var E;return((E=this._fullRequestReader)==null?void 0:E._loaded)??0}getFullReader(){return(0,a.assert)(!this._fullRequestReader,"PDFNodeStream.getFullReader can only be called once."),this._fullRequestReader=this.isFsUrl?new x(this):new g(this),this._fullRequestReader}getRangeReader(E,w){if(w<=this._progressiveDataLength)return null;const _=this.isFsUrl?new y(this,E,w):new b(this,E,w);return this._rangeRequestReaders.push(_),_}cancelAllRequests(E){var w;(w=this._fullRequestReader)==null||w.cancel(E);for(const _ of this._rangeRequestReaders.slice(0))_.cancel(E)}}t.PDFNodeStream=f;class h{constructor(E){this._url=E.url,this._done=!1,this._storedError=null,this.onProgress=null;const w=E.source;this._contentLength=w.length,this._loaded=0,this._filename=null,this._disableRange=w.disableRange||!1,this._rangeChunkSize=w.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._isStreamingSupported=!w.disableStream,this._isRangeSupported=!w.disableRange,this._readableStream=null,this._readCapability=new a.PromiseCapability,this._headersCapability=new a.PromiseCapability}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){var _;if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const E=this._readableStream.read();return E===null?(this._readCapability=new a.PromiseCapability,this.read()):(this._loaded+=E.length,(_=this.onProgress)==null||_.call(this,{loaded:this._loaded,total:this._contentLength}),{value:new Uint8Array(E).buffer,done:!1})}cancel(E){if(!this._readableStream){this._error(E);return}this._readableStream.destroy(E)}_error(E){this._storedError=E,this._readCapability.resolve()}_setReadableStream(E){this._readableStream=E,E.on("readable",()=>{this._readCapability.resolve()}),E.on("end",()=>{E.destroy(),this._done=!0,this._readCapability.resolve()}),E.on("error",w=>{this._error(w)}),!this._isStreamingSupported&&this._isRangeSupported&&this._error(new a.AbortException("streaming is disabled")),this._storedError&&this._readableStream.destroy(this._storedError)}}class p{constructor(E){this._url=E.url,this._done=!1,this._storedError=null,this.onProgress=null,this._loaded=0,this._readableStream=null,this._readCapability=new a.PromiseCapability;const w=E.source;this._isStreamingSupported=!w.disableStream}get isStreamingSupported(){return this._isStreamingSupported}async read(){var _;if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const E=this._readableStream.read();return E===null?(this._readCapability=new a.PromiseCapability,this.read()):(this._loaded+=E.length,(_=this.onProgress)==null||_.call(this,{loaded:this._loaded}),{value:new Uint8Array(E).buffer,done:!1})}cancel(E){if(!this._readableStream){this._error(E);return}this._readableStream.destroy(E)}_error(E){this._storedError=E,this._readCapability.resolve()}_setReadableStream(E){this._readableStream=E,E.on("readable",()=>{this._readCapability.resolve()}),E.on("end",()=>{E.destroy(),this._done=!0,this._readCapability.resolve()}),E.on("error",w=>{this._error(w)}),this._storedError&&this._readableStream.destroy(this._storedError)}}function m(S,E){return{protocol:S.protocol,auth:S.auth,host:S.hostname,port:S.port,path:S.path,method:"GET",headers:E}}class g extends h{constructor(E){super(E);const w=_=>{if(_.statusCode===404){const D=new a.MissingPDFException(`Missing PDF "${this._url}".`);this._storedError=D,this._headersCapability.reject(D);return}this._headersCapability.resolve(),this._setReadableStream(_);const O=D=>this._readableStream.headers[D.toLowerCase()],{allowRangeRequests:k,suggestedLength:A}=(0,o.validateRangeRequestCapabilities)({getResponseHeader:O,isHttp:E.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=k,this._contentLength=A||this._contentLength,this._filename=(0,o.extractFilenameFromHeader)(O)};if(this._request=null,this._url.protocol==="http:"){const _=require$$5;this._request=_.request(m(this._url,E.httpHeaders),w)}else{const _=require$$5;this._request=_.request(m(this._url,E.httpHeaders),w)}this._request.on("error",_=>{this._storedError=_,this._headersCapability.reject(_)}),this._request.end()}}class b extends p{constructor(E,w,_){super(E),this._httpHeaders={};for(const k in E.httpHeaders){const A=E.httpHeaders[k];A!==void 0&&(this._httpHeaders[k]=A)}this._httpHeaders.Range=`bytes=${w}-${_-1}`;const O=k=>{if(k.statusCode===404){const A=new a.MissingPDFException(`Missing PDF "${this._url}".`);this._storedError=A;return}this._setReadableStream(k)};if(this._request=null,this._url.protocol==="http:"){const k=require$$5;this._request=k.request(m(this._url,this._httpHeaders),O)}else{const k=require$$5;this._request=k.request(m(this._url,this._httpHeaders),O)}this._request.on("error",k=>{this._storedError=k}),this._request.end()}}class x extends h{constructor(E){super(E);let w=decodeURIComponent(this._url.path);l.test(this._url.href)&&(w=w.replace(/^\//,""));const _=require$$5;_.lstat(w,(O,k)=>{if(O){O.code==="ENOENT"&&(O=new a.MissingPDFException(`Missing PDF "${w}".`)),this._storedError=O,this._headersCapability.reject(O);return}this._contentLength=k.size,this._setReadableStream(_.createReadStream(w)),this._headersCapability.resolve()})}}class y extends p{constructor(E,w,_){super(E);let O=decodeURIComponent(this._url.path);l.test(this._url.href)&&(O=O.replace(/^\//,""));const k=require$$5;this._setReadableStream(k.createReadStream(O,{start:w,end:_-1}))}}},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SVGGraphics=void 0;var a=i(6),o=i(1);const l={fontStyle:"normal",fontWeight:"normal",fillColor:"#000000"},u="http://www.w3.org/XML/1998/namespace",f="http://www.w3.org/1999/xlink",h=["butt","round","square"],p=["miter","round","bevel"],m=function(k,A="",D=!1){if(URL.createObjectURL&&typeof Blob<"u"&&!D)return URL.createObjectURL(new Blob([k],{type:A}));const R="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";let T=`data:${A};base64,`;for(let j=0,P=k.length;j<P;j+=3){const M=k[j]&255,I=k[j+1]&255,G=k[j+2]&255,ne=M>>2,Q=(M&3)<<4|I>>4,B=j+1<P?(I&15)<<2|G>>6:64,H=j+2<P?G&63:64;T+=R[ne]+R[Q]+R[B]+R[H]}return T},g=function(){const k=new Uint8Array([137,80,78,71,13,10,26,10]),A=12,D=new Int32Array(256);for(let G=0;G<256;G++){let ne=G;for(let Q=0;Q<8;Q++)ne=ne&1?3988292384^ne>>1&2147483647:ne>>1&2147483647;D[G]=ne}function R(G,ne,Q){let B=-1;for(let H=ne;H<Q;H++){const Y=(B^G[H])&255,U=D[Y];B=B>>>8^U}return B^-1}function T(G,ne,Q,B){let H=B;const Y=ne.length;Q[H]=Y>>24&255,Q[H+1]=Y>>16&255,Q[H+2]=Y>>8&255,Q[H+3]=Y&255,H+=4,Q[H]=G.charCodeAt(0)&255,Q[H+1]=G.charCodeAt(1)&255,Q[H+2]=G.charCodeAt(2)&255,Q[H+3]=G.charCodeAt(3)&255,H+=4,Q.set(ne,H),H+=ne.length;const U=R(Q,B+4,H);Q[H]=U>>24&255,Q[H+1]=U>>16&255,Q[H+2]=U>>8&255,Q[H+3]=U&255}function j(G,ne,Q){let B=1,H=0;for(let Y=ne;Y<Q;++Y)B=(B+(G[Y]&255))%65521,H=(H+B)%65521;return H<<16|B}function P(G){if(!o.isNodeJS)return M(G);try{const ne=parseInt(process.versions.node)>=8?G:Buffer.from(G),Q=require$$5.deflateSync(ne,{level:9});return Q instanceof Uint8Array?Q:new Uint8Array(Q)}catch(ne){(0,o.warn)("Not compressing PNG because zlib.deflateSync is unavailable: "+ne)}return M(G)}function M(G){let ne=G.length;const Q=65535,B=Math.ceil(ne/Q),H=new Uint8Array(2+ne+B*5+4);let Y=0;H[Y++]=120,H[Y++]=156;let U=0;for(;ne>Q;)H[Y++]=0,H[Y++]=255,H[Y++]=255,H[Y++]=0,H[Y++]=0,H.set(G.subarray(U,U+Q),Y),Y+=Q,U+=Q,ne-=Q;H[Y++]=1,H[Y++]=ne&255,H[Y++]=ne>>8&255,H[Y++]=~ne&65535&255,H[Y++]=(~ne&65535)>>8&255,H.set(G.subarray(U),Y),Y+=G.length-U;const F=j(G,0,G.length);return H[Y++]=F>>24&255,H[Y++]=F>>16&255,H[Y++]=F>>8&255,H[Y++]=F&255,H}function I(G,ne,Q,B){const H=G.width,Y=G.height;let U,F,X;const z=G.data;switch(ne){case o.ImageKind.GRAYSCALE_1BPP:F=0,U=1,X=H+7>>3;break;case o.ImageKind.RGB_24BPP:F=2,U=8,X=H*3;break;case o.ImageKind.RGBA_32BPP:F=6,U=8,X=H*4;break;default:throw new Error("invalid format")}const L=new Uint8Array((1+X)*Y);let $=0,V=0;for(let we=0;we<Y;++we)L[$++]=0,L.set(z.subarray(V,V+X),$),V+=X,$+=X;if(ne===o.ImageKind.GRAYSCALE_1BPP&&B){$=0;for(let we=0;we<Y;we++){$++;for(let Ee=0;Ee<X;Ee++)L[$++]^=255}}const K=new Uint8Array([H>>24&255,H>>16&255,H>>8&255,H&255,Y>>24&255,Y>>16&255,Y>>8&255,Y&255,U,F,0,0,0]),te=P(L),J=k.length+A*3+K.length+te.length,ce=new Uint8Array(J);let ue=0;return ce.set(k,ue),ue+=k.length,T("IHDR",K,ce,ue),ue+=A+K.length,T("IDATA",te,ce,ue),ue+=A+te.length,T("IEND",new Uint8Array(0),ce,ue),m(ce,"image/png",Q)}return function(ne,Q,B){const H=ne.kind===void 0?o.ImageKind.GRAYSCALE_1BPP:ne.kind;return I(ne,H,Q,B)}}();class b{constructor(){this.fontSizeScale=1,this.fontWeight=l.fontWeight,this.fontSize=0,this.textMatrix=o.IDENTITY_MATRIX,this.fontMatrix=o.FONT_IDENTITY_MATRIX,this.leading=0,this.textRenderingMode=o.TextRenderingMode.FILL,this.textMatrixScale=1,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRise=0,this.fillColor=l.fillColor,this.strokeColor="#000000",this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.lineJoin="",this.lineCap="",this.miterLimit=0,this.dashArray=[],this.dashPhase=0,this.dependencies=[],this.activeClipUrl=null,this.clipGroup=null,this.maskId=""}clone(){return Object.create(this)}setCurrentPoint(A,D){this.x=A,this.y=D}}function x(k){let A=[];const D=[];for(const R of k){if(R.fn==="save"){A.push({fnId:92,fn:"group",items:[]}),D.push(A),A=A.at(-1).items;continue}R.fn==="restore"?A=D.pop():A.push(R)}return A}function y(k){if(Number.isInteger(k))return k.toString();const A=k.toFixed(10);let D=A.length-1;if(A[D]!=="0")return A;do D--;while(A[D]==="0");return A.substring(0,A[D]==="."?D:D+1)}function S(k){if(k[4]===0&&k[5]===0){if(k[1]===0&&k[2]===0)return k[0]===1&&k[3]===1?"":`scale(${y(k[0])} ${y(k[3])})`;if(k[0]===k[3]&&k[1]===-k[2]){const A=Math.acos(k[0])*180/Math.PI;return`rotate(${y(A)})`}}else if(k[0]===1&&k[1]===0&&k[2]===0&&k[3]===1)return`translate(${y(k[4])} ${y(k[5])})`;return`matrix(${y(k[0])} ${y(k[1])} ${y(k[2])} ${y(k[3])} ${y(k[4])} ${y(k[5])})`}let E=0,w=0,_=0;class O{constructor(A,D,R=!1){(0,a.deprecated)("The SVG back-end is no longer maintained and *may* be removed in the future."),this.svgFactory=new a.DOMSVGFactory,this.current=new b,this.transformMatrix=o.IDENTITY_MATRIX,this.transformStack=[],this.extraStack=[],this.commonObjs=A,this.objs=D,this.pendingClip=null,this.pendingEOFill=!1,this.embedFonts=!1,this.embeddedFonts=Object.create(null),this.cssStyle=null,this.forceDataSchema=!!R,this._operatorIdMapping=[];for(const T in o.OPS)this._operatorIdMapping[o.OPS[T]]=T}getObject(A,D=null){return typeof A=="string"?A.startsWith("g_")?this.commonObjs.get(A):this.objs.get(A):D}save(){this.transformStack.push(this.transformMatrix);const A=this.current;this.extraStack.push(A),this.current=A.clone()}restore(){this.transformMatrix=this.transformStack.pop(),this.current=this.extraStack.pop(),this.pendingClip=null,this.tgrp=null}group(A){this.save(),this.executeOpTree(A),this.restore()}loadDependencies(A){const D=A.fnArray,R=A.argsArray;for(let T=0,j=D.length;T<j;T++)if(D[T]===o.OPS.dependency)for(const P of R[T]){const M=P.startsWith("g_")?this.commonObjs:this.objs,I=new Promise(G=>{M.get(P,G)});this.current.dependencies.push(I)}return Promise.all(this.current.dependencies)}transform(A,D,R,T,j,P){const M=[A,D,R,T,j,P];this.transformMatrix=o.Util.transform(this.transformMatrix,M),this.tgrp=null}getSVG(A,D){this.viewport=D;const R=this._initialize(D);return this.loadDependencies(A).then(()=>(this.transformMatrix=o.IDENTITY_MATRIX,this.executeOpTree(this.convertOpList(A)),R))}convertOpList(A){const D=this._operatorIdMapping,R=A.argsArray,T=A.fnArray,j=[];for(let P=0,M=T.length;P<M;P++){const I=T[P];j.push({fnId:I,fn:D[I],args:R[P]})}return x(j)}executeOpTree(A){for(const D of A){const R=D.fn,T=D.fnId,j=D.args;switch(T|0){case o.OPS.beginText:this.beginText();break;case o.OPS.dependency:break;case o.OPS.setLeading:this.setLeading(j);break;case o.OPS.setLeadingMoveText:this.setLeadingMoveText(j[0],j[1]);break;case o.OPS.setFont:this.setFont(j);break;case o.OPS.showText:this.showText(j[0]);break;case o.OPS.showSpacedText:this.showText(j[0]);break;case o.OPS.endText:this.endText();break;case o.OPS.moveText:this.moveText(j[0],j[1]);break;case o.OPS.setCharSpacing:this.setCharSpacing(j[0]);break;case o.OPS.setWordSpacing:this.setWordSpacing(j[0]);break;case o.OPS.setHScale:this.setHScale(j[0]);break;case o.OPS.setTextMatrix:this.setTextMatrix(j[0],j[1],j[2],j[3],j[4],j[5]);break;case o.OPS.setTextRise:this.setTextRise(j[0]);break;case o.OPS.setTextRenderingMode:this.setTextRenderingMode(j[0]);break;case o.OPS.setLineWidth:this.setLineWidth(j[0]);break;case o.OPS.setLineJoin:this.setLineJoin(j[0]);break;case o.OPS.setLineCap:this.setLineCap(j[0]);break;case o.OPS.setMiterLimit:this.setMiterLimit(j[0]);break;case o.OPS.setFillRGBColor:this.setFillRGBColor(j[0],j[1],j[2]);break;case o.OPS.setStrokeRGBColor:this.setStrokeRGBColor(j[0],j[1],j[2]);break;case o.OPS.setStrokeColorN:this.setStrokeColorN(j);break;case o.OPS.setFillColorN:this.setFillColorN(j);break;case o.OPS.shadingFill:this.shadingFill(j[0]);break;case o.OPS.setDash:this.setDash(j[0],j[1]);break;case o.OPS.setRenderingIntent:this.setRenderingIntent(j[0]);break;case o.OPS.setFlatness:this.setFlatness(j[0]);break;case o.OPS.setGState:this.setGState(j[0]);break;case o.OPS.fill:this.fill();break;case o.OPS.eoFill:this.eoFill();break;case o.OPS.stroke:this.stroke();break;case o.OPS.fillStroke:this.fillStroke();break;case o.OPS.eoFillStroke:this.eoFillStroke();break;case o.OPS.clip:this.clip("nonzero");break;case o.OPS.eoClip:this.clip("evenodd");break;case o.OPS.paintSolidColorImageMask:this.paintSolidColorImageMask();break;case o.OPS.paintImageXObject:this.paintImageXObject(j[0]);break;case o.OPS.paintInlineImageXObject:this.paintInlineImageXObject(j[0]);break;case o.OPS.paintImageMaskXObject:this.paintImageMaskXObject(j[0]);break;case o.OPS.paintFormXObjectBegin:this.paintFormXObjectBegin(j[0],j[1]);break;case o.OPS.paintFormXObjectEnd:this.paintFormXObjectEnd();break;case o.OPS.closePath:this.closePath();break;case o.OPS.closeStroke:this.closeStroke();break;case o.OPS.closeFillStroke:this.closeFillStroke();break;case o.OPS.closeEOFillStroke:this.closeEOFillStroke();break;case o.OPS.nextLine:this.nextLine();break;case o.OPS.transform:this.transform(j[0],j[1],j[2],j[3],j[4],j[5]);break;case o.OPS.constructPath:this.constructPath(j[0],j[1]);break;case o.OPS.endPath:this.endPath();break;case 92:this.group(D.items);break;default:(0,o.warn)(`Unimplemented operator ${R}`);break}}}setWordSpacing(A){this.current.wordSpacing=A}setCharSpacing(A){this.current.charSpacing=A}nextLine(){this.moveText(0,this.current.leading)}setTextMatrix(A,D,R,T,j,P){const M=this.current;M.textMatrix=M.lineMatrix=[A,D,R,T,j,P],M.textMatrixScale=Math.hypot(A,D),M.x=M.lineX=0,M.y=M.lineY=0,M.xcoords=[],M.ycoords=[],M.tspan=this.svgFactory.createElement("svg:tspan"),M.tspan.setAttributeNS(null,"font-family",M.fontFamily),M.tspan.setAttributeNS(null,"font-size",`${y(M.fontSize)}px`),M.tspan.setAttributeNS(null,"y",y(-M.y)),M.txtElement=this.svgFactory.createElement("svg:text"),M.txtElement.append(M.tspan)}beginText(){const A=this.current;A.x=A.lineX=0,A.y=A.lineY=0,A.textMatrix=o.IDENTITY_MATRIX,A.lineMatrix=o.IDENTITY_MATRIX,A.textMatrixScale=1,A.tspan=this.svgFactory.createElement("svg:tspan"),A.txtElement=this.svgFactory.createElement("svg:text"),A.txtgrp=this.svgFactory.createElement("svg:g"),A.xcoords=[],A.ycoords=[]}moveText(A,D){const R=this.current;R.x=R.lineX+=A,R.y=R.lineY+=D,R.xcoords=[],R.ycoords=[],R.tspan=this.svgFactory.createElement("svg:tspan"),R.tspan.setAttributeNS(null,"font-family",R.fontFamily),R.tspan.setAttributeNS(null,"font-size",`${y(R.fontSize)}px`),R.tspan.setAttributeNS(null,"y",y(-R.y))}showText(A){const D=this.current,R=D.font,T=D.fontSize;if(T===0)return;const j=D.fontSizeScale,P=D.charSpacing,M=D.wordSpacing,I=D.fontDirection,G=D.textHScale*I,ne=R.vertical,Q=ne?1:-1,B=R.defaultVMetrics,H=T*D.fontMatrix[0];let Y=0;for(const X of A){if(X===null){Y+=I*M;continue}else if(typeof X=="number"){Y+=Q*X*T/1e3;continue}const z=(X.isSpace?M:0)+P,L=X.fontChar;let $,V,K=X.width;if(ne){let J;const ce=X.vmetric||B;J=X.vmetric?ce[1]:K*.5,J=-J*H;const ue=ce[2]*H;K=ce?-ce[0]:K,$=J/j,V=(Y+ue)/j}else $=Y/j,V=0;(X.isInFont||R.missingFile)&&(D.xcoords.push(D.x+$),ne&&D.ycoords.push(-D.y+V),D.tspan.textContent+=L);const te=ne?K*H-z*I:K*H+z*I;Y+=te}D.tspan.setAttributeNS(null,"x",D.xcoords.map(y).join(" ")),ne?D.tspan.setAttributeNS(null,"y",D.ycoords.map(y).join(" ")):D.tspan.setAttributeNS(null,"y",y(-D.y)),ne?D.y-=Y:D.x+=Y*G,D.tspan.setAttributeNS(null,"font-family",D.fontFamily),D.tspan.setAttributeNS(null,"font-size",`${y(D.fontSize)}px`),D.fontStyle!==l.fontStyle&&D.tspan.setAttributeNS(null,"font-style",D.fontStyle),D.fontWeight!==l.fontWeight&&D.tspan.setAttributeNS(null,"font-weight",D.fontWeight);const U=D.textRenderingMode&o.TextRenderingMode.FILL_STROKE_MASK;if(U===o.TextRenderingMode.FILL||U===o.TextRenderingMode.FILL_STROKE?(D.fillColor!==l.fillColor&&D.tspan.setAttributeNS(null,"fill",D.fillColor),D.fillAlpha<1&&D.tspan.setAttributeNS(null,"fill-opacity",D.fillAlpha)):D.textRenderingMode===o.TextRenderingMode.ADD_TO_PATH?D.tspan.setAttributeNS(null,"fill","transparent"):D.tspan.setAttributeNS(null,"fill","none"),U===o.TextRenderingMode.STROKE||U===o.TextRenderingMode.FILL_STROKE){const X=1/(D.textMatrixScale||1);this._setStrokeAttributes(D.tspan,X)}let F=D.textMatrix;D.textRise!==0&&(F=F.slice(),F[5]+=D.textRise),D.txtElement.setAttributeNS(null,"transform",`${S(F)} scale(${y(G)}, -1)`),D.txtElement.setAttributeNS(u,"xml:space","preserve"),D.txtElement.append(D.tspan),D.txtgrp.append(D.txtElement),this._ensureTransformGroup().append(D.txtElement)}setLeadingMoveText(A,D){this.setLeading(-D),this.moveText(A,D)}addFontStyle(A){if(!A.data)throw new Error('addFontStyle: No font data available, ensure that the "fontExtraProperties" API parameter is set.');this.cssStyle||(this.cssStyle=this.svgFactory.createElement("svg:style"),this.cssStyle.setAttributeNS(null,"type","text/css"),this.defs.append(this.cssStyle));const D=m(A.data,A.mimetype,this.forceDataSchema);this.cssStyle.textContent+=`@font-face { font-family: "${A.loadedName}"; src: url(${D}); }
|
||
`}setFont(A){const D=this.current,R=this.commonObjs.get(A[0]);let T=A[1];D.font=R,this.embedFonts&&!R.missingFile&&!this.embeddedFonts[R.loadedName]&&(this.addFontStyle(R),this.embeddedFonts[R.loadedName]=R),D.fontMatrix=R.fontMatrix||o.FONT_IDENTITY_MATRIX;let j="normal";R.black?j="900":R.bold&&(j="bold");const P=R.italic?"italic":"normal";T<0?(T=-T,D.fontDirection=-1):D.fontDirection=1,D.fontSize=T,D.fontFamily=R.loadedName,D.fontWeight=j,D.fontStyle=P,D.tspan=this.svgFactory.createElement("svg:tspan"),D.tspan.setAttributeNS(null,"y",y(-D.y)),D.xcoords=[],D.ycoords=[]}endText(){var D;const A=this.current;A.textRenderingMode&o.TextRenderingMode.ADD_TO_PATH_FLAG&&((D=A.txtElement)!=null&&D.hasChildNodes())&&(A.element=A.txtElement,this.clip("nonzero"),this.endPath())}setLineWidth(A){A>0&&(this.current.lineWidth=A)}setLineCap(A){this.current.lineCap=h[A]}setLineJoin(A){this.current.lineJoin=p[A]}setMiterLimit(A){this.current.miterLimit=A}setStrokeAlpha(A){this.current.strokeAlpha=A}setStrokeRGBColor(A,D,R){this.current.strokeColor=o.Util.makeHexColor(A,D,R)}setFillAlpha(A){this.current.fillAlpha=A}setFillRGBColor(A,D,R){this.current.fillColor=o.Util.makeHexColor(A,D,R),this.current.tspan=this.svgFactory.createElement("svg:tspan"),this.current.xcoords=[],this.current.ycoords=[]}setStrokeColorN(A){this.current.strokeColor=this._makeColorN_Pattern(A)}setFillColorN(A){this.current.fillColor=this._makeColorN_Pattern(A)}shadingFill(A){const{width:D,height:R}=this.viewport,T=o.Util.inverseTransform(this.transformMatrix),[j,P,M,I]=o.Util.getAxialAlignedBoundingBox([0,0,D,R],T),G=this.svgFactory.createElement("svg:rect");G.setAttributeNS(null,"x",j),G.setAttributeNS(null,"y",P),G.setAttributeNS(null,"width",M-j),G.setAttributeNS(null,"height",I-P),G.setAttributeNS(null,"fill",this._makeShadingPattern(A)),this.current.fillAlpha<1&&G.setAttributeNS(null,"fill-opacity",this.current.fillAlpha),this._ensureTransformGroup().append(G)}_makeColorN_Pattern(A){return A[0]==="TilingPattern"?this._makeTilingPattern(A):this._makeShadingPattern(A)}_makeTilingPattern(A){const D=A[1],R=A[2],T=A[3]||o.IDENTITY_MATRIX,[j,P,M,I]=A[4],G=A[5],ne=A[6],Q=A[7],B=`shading${_++}`,[H,Y,U,F]=o.Util.normalizeRect([...o.Util.applyTransform([j,P],T),...o.Util.applyTransform([M,I],T)]),[X,z]=o.Util.singularValueDecompose2dScale(T),L=G*X,$=ne*z,V=this.svgFactory.createElement("svg:pattern");V.setAttributeNS(null,"id",B),V.setAttributeNS(null,"patternUnits","userSpaceOnUse"),V.setAttributeNS(null,"width",L),V.setAttributeNS(null,"height",$),V.setAttributeNS(null,"x",`${H}`),V.setAttributeNS(null,"y",`${Y}`);const K=this.svg,te=this.transformMatrix,J=this.current.fillColor,ce=this.current.strokeColor,ue=this.svgFactory.create(U-H,F-Y);if(this.svg=ue,this.transformMatrix=T,Q===2){const we=o.Util.makeHexColor(...D);this.current.fillColor=we,this.current.strokeColor=we}return this.executeOpTree(this.convertOpList(R)),this.svg=K,this.transformMatrix=te,this.current.fillColor=J,this.current.strokeColor=ce,V.append(ue.childNodes[0]),this.defs.append(V),`url(#${B})`}_makeShadingPattern(A){switch(typeof A=="string"&&(A=this.objs.get(A)),A[0]){case"RadialAxial":const D=`shading${_++}`,R=A[3];let T;switch(A[1]){case"axial":const j=A[4],P=A[5];T=this.svgFactory.createElement("svg:linearGradient"),T.setAttributeNS(null,"id",D),T.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),T.setAttributeNS(null,"x1",j[0]),T.setAttributeNS(null,"y1",j[1]),T.setAttributeNS(null,"x2",P[0]),T.setAttributeNS(null,"y2",P[1]);break;case"radial":const M=A[4],I=A[5],G=A[6],ne=A[7];T=this.svgFactory.createElement("svg:radialGradient"),T.setAttributeNS(null,"id",D),T.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),T.setAttributeNS(null,"cx",I[0]),T.setAttributeNS(null,"cy",I[1]),T.setAttributeNS(null,"r",ne),T.setAttributeNS(null,"fx",M[0]),T.setAttributeNS(null,"fy",M[1]),T.setAttributeNS(null,"fr",G);break;default:throw new Error(`Unknown RadialAxial type: ${A[1]}`)}for(const j of R){const P=this.svgFactory.createElement("svg:stop");P.setAttributeNS(null,"offset",j[0]),P.setAttributeNS(null,"stop-color",j[1]),T.append(P)}return this.defs.append(T),`url(#${D})`;case"Mesh":return(0,o.warn)("Unimplemented pattern Mesh"),null;case"Dummy":return"hotpink";default:throw new Error(`Unknown IR type: ${A[0]}`)}}setDash(A,D){this.current.dashArray=A,this.current.dashPhase=D}constructPath(A,D){const R=this.current;let T=R.x,j=R.y,P=[],M=0;for(const I of A)switch(I|0){case o.OPS.rectangle:T=D[M++],j=D[M++];const G=D[M++],ne=D[M++],Q=T+G,B=j+ne;P.push("M",y(T),y(j),"L",y(Q),y(j),"L",y(Q),y(B),"L",y(T),y(B),"Z");break;case o.OPS.moveTo:T=D[M++],j=D[M++],P.push("M",y(T),y(j));break;case o.OPS.lineTo:T=D[M++],j=D[M++],P.push("L",y(T),y(j));break;case o.OPS.curveTo:T=D[M+4],j=D[M+5],P.push("C",y(D[M]),y(D[M+1]),y(D[M+2]),y(D[M+3]),y(T),y(j)),M+=6;break;case o.OPS.curveTo2:P.push("C",y(T),y(j),y(D[M]),y(D[M+1]),y(D[M+2]),y(D[M+3])),T=D[M+2],j=D[M+3],M+=4;break;case o.OPS.curveTo3:T=D[M+2],j=D[M+3],P.push("C",y(D[M]),y(D[M+1]),y(T),y(j),y(T),y(j)),M+=4;break;case o.OPS.closePath:P.push("Z");break}P=P.join(" "),R.path&&A.length>0&&A[0]!==o.OPS.rectangle&&A[0]!==o.OPS.moveTo?P=R.path.getAttributeNS(null,"d")+P:(R.path=this.svgFactory.createElement("svg:path"),this._ensureTransformGroup().append(R.path)),R.path.setAttributeNS(null,"d",P),R.path.setAttributeNS(null,"fill","none"),R.element=R.path,R.setCurrentPoint(T,j)}endPath(){const A=this.current;if(A.path=null,!this.pendingClip)return;if(!A.element){this.pendingClip=null;return}const D=`clippath${E++}`,R=this.svgFactory.createElement("svg:clipPath");R.setAttributeNS(null,"id",D),R.setAttributeNS(null,"transform",S(this.transformMatrix));const T=A.element.cloneNode(!0);if(this.pendingClip==="evenodd"?T.setAttributeNS(null,"clip-rule","evenodd"):T.setAttributeNS(null,"clip-rule","nonzero"),this.pendingClip=null,R.append(T),this.defs.append(R),A.activeClipUrl){A.clipGroup=null;for(const j of this.extraStack)j.clipGroup=null;R.setAttributeNS(null,"clip-path",A.activeClipUrl)}A.activeClipUrl=`url(#${D})`,this.tgrp=null}clip(A){this.pendingClip=A}closePath(){const A=this.current;if(A.path){const D=`${A.path.getAttributeNS(null,"d")}Z`;A.path.setAttributeNS(null,"d",D)}}setLeading(A){this.current.leading=-A}setTextRise(A){this.current.textRise=A}setTextRenderingMode(A){this.current.textRenderingMode=A}setHScale(A){this.current.textHScale=A/100}setRenderingIntent(A){}setFlatness(A){}setGState(A){for(const[D,R]of A)switch(D){case"LW":this.setLineWidth(R);break;case"LC":this.setLineCap(R);break;case"LJ":this.setLineJoin(R);break;case"ML":this.setMiterLimit(R);break;case"D":this.setDash(R[0],R[1]);break;case"RI":this.setRenderingIntent(R);break;case"FL":this.setFlatness(R);break;case"Font":this.setFont(R);break;case"CA":this.setStrokeAlpha(R);break;case"ca":this.setFillAlpha(R);break;default:(0,o.warn)(`Unimplemented graphic state operator ${D}`);break}}fill(){const A=this.current;A.element&&(A.element.setAttributeNS(null,"fill",A.fillColor),A.element.setAttributeNS(null,"fill-opacity",A.fillAlpha),this.endPath())}stroke(){const A=this.current;A.element&&(this._setStrokeAttributes(A.element),A.element.setAttributeNS(null,"fill","none"),this.endPath())}_setStrokeAttributes(A,D=1){const R=this.current;let T=R.dashArray;D!==1&&T.length>0&&(T=T.map(function(j){return D*j})),A.setAttributeNS(null,"stroke",R.strokeColor),A.setAttributeNS(null,"stroke-opacity",R.strokeAlpha),A.setAttributeNS(null,"stroke-miterlimit",y(R.miterLimit)),A.setAttributeNS(null,"stroke-linecap",R.lineCap),A.setAttributeNS(null,"stroke-linejoin",R.lineJoin),A.setAttributeNS(null,"stroke-width",y(D*R.lineWidth)+"px"),A.setAttributeNS(null,"stroke-dasharray",T.map(y).join(" ")),A.setAttributeNS(null,"stroke-dashoffset",y(D*R.dashPhase)+"px")}eoFill(){var A;(A=this.current.element)==null||A.setAttributeNS(null,"fill-rule","evenodd"),this.fill()}fillStroke(){this.stroke(),this.fill()}eoFillStroke(){var A;(A=this.current.element)==null||A.setAttributeNS(null,"fill-rule","evenodd"),this.fillStroke()}closeStroke(){this.closePath(),this.stroke()}closeFillStroke(){this.closePath(),this.fillStroke()}closeEOFillStroke(){this.closePath(),this.eoFillStroke()}paintSolidColorImageMask(){const A=this.svgFactory.createElement("svg:rect");A.setAttributeNS(null,"x","0"),A.setAttributeNS(null,"y","0"),A.setAttributeNS(null,"width","1px"),A.setAttributeNS(null,"height","1px"),A.setAttributeNS(null,"fill",this.current.fillColor),this._ensureTransformGroup().append(A)}paintImageXObject(A){const D=this.getObject(A);if(!D){(0,o.warn)(`Dependent image with object ID ${A} is not ready yet`);return}this.paintInlineImageXObject(D)}paintInlineImageXObject(A,D){const R=A.width,T=A.height,j=g(A,this.forceDataSchema,!!D),P=this.svgFactory.createElement("svg:rect");P.setAttributeNS(null,"x","0"),P.setAttributeNS(null,"y","0"),P.setAttributeNS(null,"width",y(R)),P.setAttributeNS(null,"height",y(T)),this.current.element=P,this.clip("nonzero");const M=this.svgFactory.createElement("svg:image");M.setAttributeNS(f,"xlink:href",j),M.setAttributeNS(null,"x","0"),M.setAttributeNS(null,"y",y(-T)),M.setAttributeNS(null,"width",y(R)+"px"),M.setAttributeNS(null,"height",y(T)+"px"),M.setAttributeNS(null,"transform",`scale(${y(1/R)} ${y(-1/T)})`),D?D.append(M):this._ensureTransformGroup().append(M)}paintImageMaskXObject(A){const D=this.getObject(A.data,A);if(D.bitmap){(0,o.warn)("paintImageMaskXObject: ImageBitmap support is not implemented, ensure that the `isOffscreenCanvasSupported` API parameter is disabled.");return}const R=this.current,T=D.width,j=D.height,P=R.fillColor;R.maskId=`mask${w++}`;const M=this.svgFactory.createElement("svg:mask");M.setAttributeNS(null,"id",R.maskId);const I=this.svgFactory.createElement("svg:rect");I.setAttributeNS(null,"x","0"),I.setAttributeNS(null,"y","0"),I.setAttributeNS(null,"width",y(T)),I.setAttributeNS(null,"height",y(j)),I.setAttributeNS(null,"fill",P),I.setAttributeNS(null,"mask",`url(#${R.maskId})`),this.defs.append(M),this._ensureTransformGroup().append(I),this.paintInlineImageXObject(D,M)}paintFormXObjectBegin(A,D){if(Array.isArray(A)&&A.length===6&&this.transform(A[0],A[1],A[2],A[3],A[4],A[5]),D){const R=D[2]-D[0],T=D[3]-D[1],j=this.svgFactory.createElement("svg:rect");j.setAttributeNS(null,"x",D[0]),j.setAttributeNS(null,"y",D[1]),j.setAttributeNS(null,"width",y(R)),j.setAttributeNS(null,"height",y(T)),this.current.element=j,this.clip("nonzero"),this.endPath()}}paintFormXObjectEnd(){}_initialize(A){const D=this.svgFactory.create(A.width,A.height),R=this.svgFactory.createElement("svg:defs");D.append(R),this.defs=R;const T=this.svgFactory.createElement("svg:g");return T.setAttributeNS(null,"transform",S(A.transform)),D.append(T),this.svg=T,D}_ensureClipGroup(){if(!this.current.clipGroup){const A=this.svgFactory.createElement("svg:g");A.setAttributeNS(null,"clip-path",this.current.activeClipUrl),this.svg.append(A),this.current.clipGroup=A}return this.current.clipGroup}_ensureTransformGroup(){return this.tgrp||(this.tgrp=this.svgFactory.createElement("svg:g"),this.tgrp.setAttributeNS(null,"transform",S(this.transformMatrix)),this.current.activeClipUrl?this._ensureClipGroup().append(this.tgrp):this.svg.append(this.tgrp)),this.tgrp}}t.SVGGraphics=O},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.XfaText=void 0;class i{static textContent(o){const l=[],u={items:l,styles:Object.create(null)};function f(h){var g;if(!h)return;let p=null;const m=h.name;if(m==="#text")p=h.value;else if(i.shouldBuildText(m))(g=h==null?void 0:h.attributes)!=null&&g.textContent?p=h.attributes.textContent:h.value&&(p=h.value);else return;if(p!==null&&l.push({str:p}),!!h.children)for(const b of h.children)f(b)}return f(o),u}static shouldBuildText(o){return!(o==="textarea"||o==="input"||o==="option"||o==="select")}}t.XfaText=i},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TextLayerRenderTask=void 0,t.renderTextLayer=S,t.updateTextLayer=E;var a=i(1),o=i(6);const l=1e5,u=30,f=.8,h=new Map;function p(w,_){let O;if(_&&a.FeatureTest.isOffscreenCanvasSupported)O=new OffscreenCanvas(w,w).getContext("2d",{alpha:!1});else{const k=document.createElement("canvas");k.width=k.height=w,O=k.getContext("2d",{alpha:!1})}return O}function m(w,_){const O=h.get(w);if(O)return O;const k=p(u,_);k.font=`${u}px ${w}`;const A=k.measureText("");let D=A.fontBoundingBoxAscent,R=Math.abs(A.fontBoundingBoxDescent);if(D){const j=D/(D+R);return h.set(w,j),k.canvas.width=k.canvas.height=0,j}k.strokeStyle="red",k.clearRect(0,0,u,u),k.strokeText("g",0,0);let T=k.getImageData(0,0,u,u).data;R=0;for(let j=T.length-1-3;j>=0;j-=4)if(T[j]>0){R=Math.ceil(j/4/u);break}k.clearRect(0,0,u,u),k.strokeText("A",0,u),T=k.getImageData(0,0,u,u).data,D=0;for(let j=0,P=T.length;j<P;j+=4)if(T[j]>0){D=u-Math.floor(j/4/u);break}if(k.canvas.width=k.canvas.height=0,D){const j=D/(D+R);return h.set(w,j),j}return h.set(w,f),f}function g(w,_,O){const k=document.createElement("span"),A={angle:0,canvasWidth:0,hasText:_.str!=="",hasEOL:_.hasEOL,fontSize:0};w._textDivs.push(k);const D=a.Util.transform(w._transform,_.transform);let R=Math.atan2(D[1],D[0]);const T=O[_.fontName];T.vertical&&(R+=Math.PI/2);const j=Math.hypot(D[2],D[3]),P=j*m(T.fontFamily,w._isOffscreenCanvasSupported);let M,I;R===0?(M=D[4],I=D[5]-P):(M=D[4]+P*Math.sin(R),I=D[5]-P*Math.cos(R));const G="calc(var(--scale-factor)*",ne=k.style;w._container===w._rootContainer?(ne.left=`${(100*M/w._pageWidth).toFixed(2)}%`,ne.top=`${(100*I/w._pageHeight).toFixed(2)}%`):(ne.left=`${G}${M.toFixed(2)}px)`,ne.top=`${G}${I.toFixed(2)}px)`),ne.fontSize=`${G}${j.toFixed(2)}px)`,ne.fontFamily=T.fontFamily,A.fontSize=j,k.setAttribute("role","presentation"),k.textContent=_.str,k.dir=_.dir,w._fontInspectorEnabled&&(k.dataset.fontName=_.fontName),R!==0&&(A.angle=R*(180/Math.PI));let Q=!1;if(_.str.length>1)Q=!0;else if(_.str!==" "&&_.transform[0]!==_.transform[3]){const B=Math.abs(_.transform[0]),H=Math.abs(_.transform[3]);B!==H&&Math.max(B,H)/Math.min(B,H)>1.5&&(Q=!0)}Q&&(A.canvasWidth=T.vertical?_.height:_.width),w._textDivProperties.set(k,A),w._isReadableStream&&w._layoutText(k)}function b(w){const{div:_,scale:O,properties:k,ctx:A,prevFontSize:D,prevFontFamily:R}=w,{style:T}=_;let j="";if(k.canvasWidth!==0&&k.hasText){const{fontFamily:P}=T,{canvasWidth:M,fontSize:I}=k;(D!==I||R!==P)&&(A.font=`${I*O}px ${P}`,w.prevFontSize=I,w.prevFontFamily=P);const{width:G}=A.measureText(_.textContent);G>0&&(j=`scaleX(${M*O/G})`)}k.angle!==0&&(j=`rotate(${k.angle}deg) ${j}`),j.length>0&&(T.transform=j)}function x(w){if(w._canceled)return;const _=w._textDivs,O=w._capability;if(_.length>l){O.resolve();return}if(!w._isReadableStream)for(const A of _)w._layoutText(A);O.resolve()}class y{constructor({textContentSource:_,container:O,viewport:k,textDivs:A,textDivProperties:D,textContentItemsStr:R,isOffscreenCanvasSupported:T}){var G;this._textContentSource=_,this._isReadableStream=_ instanceof ReadableStream,this._container=this._rootContainer=O,this._textDivs=A||[],this._textContentItemsStr=R||[],this._isOffscreenCanvasSupported=T,this._fontInspectorEnabled=!!((G=globalThis.FontInspector)!=null&&G.enabled),this._reader=null,this._textDivProperties=D||new WeakMap,this._canceled=!1,this._capability=new a.PromiseCapability,this._layoutTextParams={prevFontSize:null,prevFontFamily:null,div:null,scale:k.scale*(globalThis.devicePixelRatio||1),properties:null,ctx:p(0,T)};const{pageWidth:j,pageHeight:P,pageX:M,pageY:I}=k.rawDims;this._transform=[1,0,0,-1,-M,I+P],this._pageWidth=j,this._pageHeight=P,(0,o.setLayerDimensions)(O,k),this._capability.promise.finally(()=>{this._layoutTextParams=null}).catch(()=>{})}get promise(){return this._capability.promise}cancel(){this._canceled=!0,this._reader&&(this._reader.cancel(new a.AbortException("TextLayer task cancelled.")).catch(()=>{}),this._reader=null),this._capability.reject(new a.AbortException("TextLayer task cancelled."))}_processItems(_,O){for(const k of _){if(k.str===void 0){if(k.type==="beginMarkedContentProps"||k.type==="beginMarkedContent"){const A=this._container;this._container=document.createElement("span"),this._container.classList.add("markedContent"),k.id!==null&&this._container.setAttribute("id",`${k.id}`),A.append(this._container)}else k.type==="endMarkedContent"&&(this._container=this._container.parentNode);continue}this._textContentItemsStr.push(k.str),g(this,k,O)}}_layoutText(_){const O=this._layoutTextParams.properties=this._textDivProperties.get(_);if(this._layoutTextParams.div=_,b(this._layoutTextParams),O.hasText&&this._container.append(_),O.hasEOL){const k=document.createElement("br");k.setAttribute("role","presentation"),this._container.append(k)}}_render(){const _=new a.PromiseCapability;let O=Object.create(null);if(this._isReadableStream){const k=()=>{this._reader.read().then(({value:A,done:D})=>{if(D){_.resolve();return}Object.assign(O,A.styles),this._processItems(A.items,O),k()},_.reject)};this._reader=this._textContentSource.getReader(),k()}else if(this._textContentSource){const{items:k,styles:A}=this._textContentSource;this._processItems(k,A),_.resolve()}else throw new Error('No "textContentSource" parameter specified.');_.promise.then(()=>{O=null,x(this)},this._capability.reject)}}t.TextLayerRenderTask=y;function S(w){!w.textContentSource&&(w.textContent||w.textContentStream)&&((0,o.deprecated)("The TextLayerRender `textContent`/`textContentStream` parameters will be removed in the future, please use `textContentSource` instead."),w.textContentSource=w.textContent||w.textContentStream);const{container:_,viewport:O}=w,k=getComputedStyle(_),A=k.getPropertyValue("visibility"),D=parseFloat(k.getPropertyValue("--scale-factor"));A==="visible"&&(!D||Math.abs(D-O.scale)>1e-5)&&console.error("The `--scale-factor` CSS-variable must be set, to the same value as `viewport.scale`, either on the `container`-element itself or higher up in the DOM.");const R=new y(w);return R._render(),R}function E({container:w,viewport:_,textDivs:O,textDivProperties:k,isOffscreenCanvasSupported:A,mustRotate:D=!0,mustRescale:R=!0}){if(D&&(0,o.setLayerDimensions)(w,{rotation:_.rotation}),R){const T=p(0,A),P={prevFontSize:null,prevFontFamily:null,div:null,scale:_.scale*(globalThis.devicePixelRatio||1),properties:null,ctx:T};for(const M of O)P.properties=k.get(M),P.div=M,b(P)}}},(e,t,i)=>{var m,g,b,x,y,S,E,w,_,O,k,vc,Fs,yc,bc;Object.defineProperty(t,"__esModule",{value:!0}),t.AnnotationEditorLayer=void 0;var a=i(1),o=i(4),l=i(28),u=i(33),f=i(6),h=i(34);const j=class j{constructor({uiManager:M,pageIndex:I,div:G,accessibilityManager:ne,annotationLayer:Q,viewport:B,l10n:H}){Se(this,k);Se(this,m);Se(this,g,!1);Se(this,b,null);Se(this,x,this.pointerup.bind(this));Se(this,y,this.pointerdown.bind(this));Se(this,S,new Map);Se(this,E,!1);Se(this,w,!1);Se(this,_,!1);Se(this,O);const Y=[l.FreeTextEditor,u.InkEditor,h.StampEditor];if(!j._initialized){j._initialized=!0;for(const U of Y)U.initialize(H)}M.registerEditorTypes(Y),Ce(this,O,M),this.pageIndex=I,this.div=G,Ce(this,m,ne),Ce(this,b,Q),this.viewport=B,N(this,O).addLayer(this)}get isEmpty(){return N(this,S).size===0}updateToolbar(M){N(this,O).updateToolbar(M)}updateMode(M=N(this,O).getMode()){me(this,k,bc).call(this),M===a.AnnotationEditorType.INK?(this.addInkEditorIfNeeded(!1),this.disableClick()):this.enableClick(),M!==a.AnnotationEditorType.NONE&&(this.div.classList.toggle("freeTextEditing",M===a.AnnotationEditorType.FREETEXT),this.div.classList.toggle("inkEditing",M===a.AnnotationEditorType.INK),this.div.classList.toggle("stampEditing",M===a.AnnotationEditorType.STAMP),this.div.hidden=!1)}addInkEditorIfNeeded(M){if(!M&&N(this,O).getMode()!==a.AnnotationEditorType.INK)return;if(!M){for(const G of N(this,S).values())if(G.isEmpty()){G.setInBackground();return}}me(this,k,Fs).call(this,{offsetX:0,offsetY:0},!1).setInBackground()}setEditingState(M){N(this,O).setEditingState(M)}addCommands(M){N(this,O).addCommands(M)}enable(){this.div.style.pointerEvents="auto";const M=new Set;for(const G of N(this,S).values())G.enableEditing(),G.annotationElementId&&M.add(G.annotationElementId);if(!N(this,b))return;const I=N(this,b).getEditableAnnotations();for(const G of I){if(G.hide(),N(this,O).isDeletedAnnotationElement(G.data.id)||M.has(G.data.id))continue;const ne=this.deserialize(G);ne&&(this.addOrRebuild(ne),ne.enableEditing())}}disable(){var I;Ce(this,_,!0),this.div.style.pointerEvents="none";const M=new Set;for(const G of N(this,S).values()){if(G.disableEditing(),!G.annotationElementId||G.serialize()!==null){M.add(G.annotationElementId);continue}(I=this.getEditableAnnotation(G.annotationElementId))==null||I.show(),G.remove()}if(N(this,b)){const G=N(this,b).getEditableAnnotations();for(const ne of G){const{id:Q}=ne.data;M.has(Q)||N(this,O).isDeletedAnnotationElement(Q)||ne.show()}}me(this,k,bc).call(this),this.isEmpty&&(this.div.hidden=!0),Ce(this,_,!1)}getEditableAnnotation(M){var I;return((I=N(this,b))==null?void 0:I.getEditableAnnotation(M))||null}setActiveEditor(M){N(this,O).getActive()!==M&&N(this,O).setActiveEditor(M)}enableClick(){this.div.addEventListener("pointerdown",N(this,y)),this.div.addEventListener("pointerup",N(this,x))}disableClick(){this.div.removeEventListener("pointerdown",N(this,y)),this.div.removeEventListener("pointerup",N(this,x))}attach(M){N(this,S).set(M.id,M);const{annotationElementId:I}=M;I&&N(this,O).isDeletedAnnotationElement(I)&&N(this,O).removeDeletedAnnotationElement(M)}detach(M){var I;N(this,S).delete(M.id),(I=N(this,m))==null||I.removePointerInTextLayer(M.contentDiv),!N(this,_)&&M.annotationElementId&&N(this,O).addDeletedAnnotationElement(M)}remove(M){this.detach(M),N(this,O).removeEditor(M),M.div.contains(document.activeElement)&&setTimeout(()=>{N(this,O).focusMainContainer()},0),M.div.remove(),M.isAttachedToDOM=!1,N(this,w)||this.addInkEditorIfNeeded(!1)}changeParent(M){var I;M.parent!==this&&(M.annotationElementId&&(N(this,O).addDeletedAnnotationElement(M.annotationElementId),o.AnnotationEditor.deleteAnnotationElement(M),M.annotationElementId=null),this.attach(M),(I=M.parent)==null||I.detach(M),M.setParent(this),M.div&&M.isAttachedToDOM&&(M.div.remove(),this.div.append(M.div)))}add(M){if(this.changeParent(M),N(this,O).addEditor(M),this.attach(M),!M.isAttachedToDOM){const I=M.render();this.div.append(I),M.isAttachedToDOM=!0}M.fixAndSetPosition(),M.onceAdded(),N(this,O).addToAnnotationStorage(M)}moveEditorInDOM(M){var G;if(!M.isAttachedToDOM)return;const{activeElement:I}=document;M.div.contains(I)&&(M._focusEventsAllowed=!1,setTimeout(()=>{M.div.contains(document.activeElement)?M._focusEventsAllowed=!0:(M.div.addEventListener("focusin",()=>{M._focusEventsAllowed=!0},{once:!0}),I.focus())},0)),M._structTreeParentId=(G=N(this,m))==null?void 0:G.moveElementInDOM(this.div,M.div,M.contentDiv,!0)}addOrRebuild(M){M.needsToBeRebuilt()?M.rebuild():this.add(M)}addUndoableEditor(M){const I=()=>M._uiManager.rebuild(M),G=()=>{M.remove()};this.addCommands({cmd:I,undo:G,mustExec:!1})}getNextId(){return N(this,O).getId()}pasteEditor(M,I){N(this,O).updateToolbar(M),N(this,O).updateMode(M);const{offsetX:G,offsetY:ne}=me(this,k,yc).call(this),Q=this.getNextId(),B=me(this,k,vc).call(this,{parent:this,id:Q,x:G,y:ne,uiManager:N(this,O),isCentered:!0,...I});B&&this.add(B)}deserialize(M){switch(M.annotationType??M.annotationEditorType){case a.AnnotationEditorType.FREETEXT:return l.FreeTextEditor.deserialize(M,this,N(this,O));case a.AnnotationEditorType.INK:return u.InkEditor.deserialize(M,this,N(this,O));case a.AnnotationEditorType.STAMP:return h.StampEditor.deserialize(M,this,N(this,O))}return null}addNewEditor(){me(this,k,Fs).call(this,me(this,k,yc).call(this),!0)}setSelected(M){N(this,O).setSelected(M)}toggleSelected(M){N(this,O).toggleSelected(M)}isSelected(M){return N(this,O).isSelected(M)}unselect(M){N(this,O).unselect(M)}pointerup(M){const{isMac:I}=a.FeatureTest.platform;if(!(M.button!==0||M.ctrlKey&&I)&&M.target===this.div&&N(this,E)){if(Ce(this,E,!1),!N(this,g)){Ce(this,g,!0);return}if(N(this,O).getMode()===a.AnnotationEditorType.STAMP){N(this,O).unselectAll();return}me(this,k,Fs).call(this,M,!1)}}pointerdown(M){if(N(this,E)){Ce(this,E,!1);return}const{isMac:I}=a.FeatureTest.platform;if(M.button!==0||M.ctrlKey&&I||M.target!==this.div)return;Ce(this,E,!0);const G=N(this,O).getActive();Ce(this,g,!G||G.isEmpty())}findNewParent(M,I,G){const ne=N(this,O).findParent(I,G);return ne===null||ne===this?!1:(ne.changeParent(M),!0)}destroy(){var M,I;((M=N(this,O).getActive())==null?void 0:M.parent)===this&&(N(this,O).commitOrRemove(),N(this,O).setActiveEditor(null));for(const G of N(this,S).values())(I=N(this,m))==null||I.removePointerInTextLayer(G.contentDiv),G.setParent(null),G.isAttachedToDOM=!1,G.div.remove();this.div=null,N(this,S).clear(),N(this,O).removeLayer(this)}render({viewport:M}){this.viewport=M,(0,f.setLayerDimensions)(this.div,M);for(const I of N(this,O).getEditors(this.pageIndex))this.add(I);this.updateMode()}update({viewport:M}){N(this,O).commitOrRemove(),this.viewport=M,(0,f.setLayerDimensions)(this.div,{rotation:M.rotation}),this.updateMode()}get pageDimensions(){const{pageWidth:M,pageHeight:I}=this.viewport.rawDims;return[M,I]}};m=new WeakMap,g=new WeakMap,b=new WeakMap,x=new WeakMap,y=new WeakMap,S=new WeakMap,E=new WeakMap,w=new WeakMap,_=new WeakMap,O=new WeakMap,k=new WeakSet,vc=function(M){switch(N(this,O).getMode()){case a.AnnotationEditorType.FREETEXT:return new l.FreeTextEditor(M);case a.AnnotationEditorType.INK:return new u.InkEditor(M);case a.AnnotationEditorType.STAMP:return new h.StampEditor(M)}return null},Fs=function(M,I){const G=this.getNextId(),ne=me(this,k,vc).call(this,{parent:this,id:G,x:M.offsetX,y:M.offsetY,uiManager:N(this,O),isCentered:I});return ne&&this.add(ne),ne},yc=function(){const{x:M,y:I,width:G,height:ne}=this.div.getBoundingClientRect(),Q=Math.max(0,M),B=Math.max(0,I),H=Math.min(window.innerWidth,M+G),Y=Math.min(window.innerHeight,I+ne),U=(Q+H)/2-M,F=(B+Y)/2-I,[X,z]=this.viewport.rotation%180===0?[U,F]:[F,U];return{offsetX:X,offsetY:z}},bc=function(){Ce(this,w,!0);for(const M of N(this,S).values())M.isEmpty()&&M.remove();Ce(this,w,!1)},kt(j,"_initialized",!1);let p=j;t.AnnotationEditorLayer=p},(e,t,i)=>{var h,p,m,g,b,x,y,S,E,w,Tp,Pp,kp,va,xc,Op,Sc;Object.defineProperty(t,"__esModule",{value:!0}),t.FreeTextEditor=void 0;var a=i(1),o=i(5),l=i(4),u=i(29);const j=class j extends l.AnnotationEditor{constructor(I){super({...I,name:"freeTextEditor"});Se(this,w);Se(this,h,this.editorDivBlur.bind(this));Se(this,p,this.editorDivFocus.bind(this));Se(this,m,this.editorDivInput.bind(this));Se(this,g,this.editorDivKeydown.bind(this));Se(this,b);Se(this,x,"");Se(this,y,`${this.id}-editor`);Se(this,S);Se(this,E,null);Ce(this,b,I.color||j._defaultColor||l.AnnotationEditor._defaultLineColor),Ce(this,S,I.fontSize||j._defaultFontSize)}static get _keyboardManager(){const I=j.prototype,G=B=>B.isEmpty(),ne=o.AnnotationEditorUIManager.TRANSLATE_SMALL,Q=o.AnnotationEditorUIManager.TRANSLATE_BIG;return(0,a.shadow)(this,"_keyboardManager",new o.KeyboardManager([[["ctrl+s","mac+meta+s","ctrl+p","mac+meta+p"],I.commitOrRemove,{bubbles:!0}],[["ctrl+Enter","mac+meta+Enter","Escape","mac+Escape"],I.commitOrRemove],[["ArrowLeft","mac+ArrowLeft"],I._translateEmpty,{args:[-ne,0],checker:G}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],I._translateEmpty,{args:[-Q,0],checker:G}],[["ArrowRight","mac+ArrowRight"],I._translateEmpty,{args:[ne,0],checker:G}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],I._translateEmpty,{args:[Q,0],checker:G}],[["ArrowUp","mac+ArrowUp"],I._translateEmpty,{args:[0,-ne],checker:G}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],I._translateEmpty,{args:[0,-Q],checker:G}],[["ArrowDown","mac+ArrowDown"],I._translateEmpty,{args:[0,ne],checker:G}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],I._translateEmpty,{args:[0,Q],checker:G}]]))}static initialize(I){l.AnnotationEditor.initialize(I,{strings:["free_text2_default_content","editor_free_text2_aria_label"]});const G=getComputedStyle(document.documentElement);this._internalPadding=parseFloat(G.getPropertyValue("--freetext-padding"))}static updateDefaultParams(I,G){switch(I){case a.AnnotationEditorParamsType.FREETEXT_SIZE:j._defaultFontSize=G;break;case a.AnnotationEditorParamsType.FREETEXT_COLOR:j._defaultColor=G;break}}updateParams(I,G){switch(I){case a.AnnotationEditorParamsType.FREETEXT_SIZE:me(this,w,Tp).call(this,G);break;case a.AnnotationEditorParamsType.FREETEXT_COLOR:me(this,w,Pp).call(this,G);break}}static get defaultPropertiesToUpdate(){return[[a.AnnotationEditorParamsType.FREETEXT_SIZE,j._defaultFontSize],[a.AnnotationEditorParamsType.FREETEXT_COLOR,j._defaultColor||l.AnnotationEditor._defaultLineColor]]}get propertiesToUpdate(){return[[a.AnnotationEditorParamsType.FREETEXT_SIZE,N(this,S)],[a.AnnotationEditorParamsType.FREETEXT_COLOR,N(this,b)]]}_translateEmpty(I,G){this._uiManager.translateSelectedEditors(I,G,!0)}getInitialTranslation(){const I=this.parentScale;return[-j._internalPadding*I,-(j._internalPadding+N(this,S))*I]}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(this.isAttachedToDOM||this.parent.add(this)))}enableEditMode(){this.isInEditMode()||(this.parent.setEditingState(!1),this.parent.updateToolbar(a.AnnotationEditorType.FREETEXT),super.enableEditMode(),this.overlayDiv.classList.remove("enabled"),this.editorDiv.contentEditable=!0,this._isDraggable=!1,this.div.removeAttribute("aria-activedescendant"),this.editorDiv.addEventListener("keydown",N(this,g)),this.editorDiv.addEventListener("focus",N(this,p)),this.editorDiv.addEventListener("blur",N(this,h)),this.editorDiv.addEventListener("input",N(this,m)))}disableEditMode(){this.isInEditMode()&&(this.parent.setEditingState(!0),super.disableEditMode(),this.overlayDiv.classList.add("enabled"),this.editorDiv.contentEditable=!1,this.div.setAttribute("aria-activedescendant",N(this,y)),this._isDraggable=!0,this.editorDiv.removeEventListener("keydown",N(this,g)),this.editorDiv.removeEventListener("focus",N(this,p)),this.editorDiv.removeEventListener("blur",N(this,h)),this.editorDiv.removeEventListener("input",N(this,m)),this.div.focus({preventScroll:!0}),this.isEditing=!1,this.parent.div.classList.add("freeTextEditing"))}focusin(I){this._focusEventsAllowed&&(super.focusin(I),I.target!==this.editorDiv&&this.editorDiv.focus())}onceAdded(){var I;if(this.width){me(this,w,Sc).call(this);return}this.enableEditMode(),this.editorDiv.focus(),(I=this._initialOptions)!=null&&I.isCentered&&this.center(),this._initialOptions=null}isEmpty(){return!this.editorDiv||this.editorDiv.innerText.trim()===""}remove(){this.isEditing=!1,this.parent&&(this.parent.setEditingState(!0),this.parent.div.classList.add("freeTextEditing")),super.remove()}commit(){if(!this.isInEditMode())return;super.commit(),this.disableEditMode();const I=N(this,x),G=Ce(this,x,me(this,w,kp).call(this).trimEnd());if(I===G)return;const ne=Q=>{if(Ce(this,x,Q),!Q){this.remove();return}me(this,w,xc).call(this),this._uiManager.rebuild(this),me(this,w,va).call(this)};this.addCommands({cmd:()=>{ne(G)},undo:()=>{ne(I)},mustExec:!1}),me(this,w,va).call(this)}shouldGetKeyboardEvents(){return this.isInEditMode()}enterInEditMode(){this.enableEditMode(),this.editorDiv.focus()}dblclick(I){this.enterInEditMode()}keydown(I){I.target===this.div&&I.key==="Enter"&&(this.enterInEditMode(),I.preventDefault())}editorDivKeydown(I){j._keyboardManager.exec(this,I)}editorDivFocus(I){this.isEditing=!0}editorDivBlur(I){this.isEditing=!1}editorDivInput(I){this.parent.div.classList.toggle("freeTextEditing",this.isEmpty())}disableEditing(){this.editorDiv.setAttribute("role","comment"),this.editorDiv.removeAttribute("aria-multiline")}enableEditing(){this.editorDiv.setAttribute("role","textbox"),this.editorDiv.setAttribute("aria-multiline",!0)}render(){if(this.div)return this.div;let I,G;this.width&&(I=this.x,G=this.y),super.render(),this.editorDiv=document.createElement("div"),this.editorDiv.className="internal",this.editorDiv.setAttribute("id",N(this,y)),this.enableEditing(),l.AnnotationEditor._l10nPromise.get("editor_free_text2_aria_label").then(Q=>{var B;return(B=this.editorDiv)==null?void 0:B.setAttribute("aria-label",Q)}),l.AnnotationEditor._l10nPromise.get("free_text2_default_content").then(Q=>{var B;return(B=this.editorDiv)==null?void 0:B.setAttribute("default-content",Q)}),this.editorDiv.contentEditable=!0;const{style:ne}=this.editorDiv;if(ne.fontSize=`calc(${N(this,S)}px * var(--scale-factor))`,ne.color=N(this,b),this.div.append(this.editorDiv),this.overlayDiv=document.createElement("div"),this.overlayDiv.classList.add("overlay","enabled"),this.div.append(this.overlayDiv),(0,o.bindEvents)(this,this.div,["dblclick","keydown"]),this.width){const[Q,B]=this.parentDimensions;if(this.annotationElementId){const{position:H}=N(this,E);let[Y,U]=this.getInitialTranslation();[Y,U]=this.pageTranslationToScreen(Y,U);const[F,X]=this.pageDimensions,[z,L]=this.pageTranslation;let $,V;switch(this.rotation){case 0:$=I+(H[0]-z)/F,V=G+this.height-(H[1]-L)/X;break;case 90:$=I+(H[0]-z)/F,V=G-(H[1]-L)/X,[Y,U]=[U,-Y];break;case 180:$=I-this.width+(H[0]-z)/F,V=G-(H[1]-L)/X,[Y,U]=[-Y,-U];break;case 270:$=I+(H[0]-z-this.height*X)/F,V=G+(H[1]-L-this.width*F)/X,[Y,U]=[-U,Y];break}this.setAt($*Q,V*B,Y,U)}else this.setAt(I*Q,G*B,this.width*Q,this.height*B);me(this,w,xc).call(this),this._isDraggable=!0,this.editorDiv.contentEditable=!1}else this._isDraggable=!1,this.editorDiv.contentEditable=!0;return this.div}get contentDiv(){return this.editorDiv}static deserialize(I,G,ne){let Q=null;if(I instanceof u.FreeTextAnnotationElement){const{data:{defaultAppearanceData:{fontSize:H,fontColor:Y},rect:U,rotation:F,id:X},textContent:z,textPosition:L,parent:{page:{pageNumber:$}}}=I;if(!z||z.length===0)return null;Q=I={annotationType:a.AnnotationEditorType.FREETEXT,color:Array.from(Y),fontSize:H,value:z.join(`
|
||
`),position:L,pageIndex:$-1,rect:U,rotation:F,id:X,deleted:!1}}const B=super.deserialize(I,G,ne);return Ce(B,S,I.fontSize),Ce(B,b,a.Util.makeHexColor(...I.color)),Ce(B,x,I.value),B.annotationElementId=I.id||null,Ce(B,E,Q),B}serialize(I=!1){if(this.isEmpty())return null;if(this.deleted)return{pageIndex:this.pageIndex,id:this.annotationElementId,deleted:!0};const G=j._internalPadding*this.parentScale,ne=this.getRect(G,G),Q=l.AnnotationEditor._colorManager.convert(this.isAttachedToDOM?getComputedStyle(this.editorDiv).color:N(this,b)),B={annotationType:a.AnnotationEditorType.FREETEXT,color:Q,fontSize:N(this,S),value:N(this,x),pageIndex:this.pageIndex,rect:ne,rotation:this.rotation,structTreeParentId:this._structTreeParentId};return I?B:this.annotationElementId&&!me(this,w,Op).call(this,B)?null:(B.id=this.annotationElementId,B)}};h=new WeakMap,p=new WeakMap,m=new WeakMap,g=new WeakMap,b=new WeakMap,x=new WeakMap,y=new WeakMap,S=new WeakMap,E=new WeakMap,w=new WeakSet,Tp=function(I){const G=Q=>{this.editorDiv.style.fontSize=`calc(${Q}px * var(--scale-factor))`,this.translate(0,-(Q-N(this,S))*this.parentScale),Ce(this,S,Q),me(this,w,va).call(this)},ne=N(this,S);this.addCommands({cmd:()=>{G(I)},undo:()=>{G(ne)},mustExec:!0,type:a.AnnotationEditorParamsType.FREETEXT_SIZE,overwriteIfSameType:!0,keepUndo:!0})},Pp=function(I){const G=N(this,b);this.addCommands({cmd:()=>{Ce(this,b,this.editorDiv.style.color=I)},undo:()=>{Ce(this,b,this.editorDiv.style.color=G)},mustExec:!0,type:a.AnnotationEditorParamsType.FREETEXT_COLOR,overwriteIfSameType:!0,keepUndo:!0})},kp=function(){const I=this.editorDiv.getElementsByTagName("div");if(I.length===0)return this.editorDiv.innerText;const G=[];for(const ne of I)G.push(ne.innerText.replace(/\r\n?|\n/,""));return G.join(`
|
||
`)},va=function(){const[I,G]=this.parentDimensions;let ne;if(this.isAttachedToDOM)ne=this.div.getBoundingClientRect();else{const{currentLayer:Q,div:B}=this,H=B.style.display;B.style.display="hidden",Q.div.append(this.div),ne=B.getBoundingClientRect(),B.remove(),B.style.display=H}this.rotation%180===this.parentRotation%180?(this.width=ne.width/I,this.height=ne.height/G):(this.width=ne.height/I,this.height=ne.width/G),this.fixAndSetPosition()},xc=function(){if(this.editorDiv.replaceChildren(),!!N(this,x))for(const I of N(this,x).split(`
|
||
`)){const G=document.createElement("div");G.append(I?document.createTextNode(I):document.createElement("br")),this.editorDiv.append(G)}},Op=function(I){const{value:G,fontSize:ne,color:Q,rect:B,pageIndex:H}=N(this,E);return I.value!==G||I.fontSize!==ne||I.rect.some((Y,U)=>Math.abs(Y-B[U])>=1)||I.color.some((Y,U)=>Y!==Q[U])||I.pageIndex!==H},Sc=function(I=!1){if(!this.annotationElementId)return;if(me(this,w,va).call(this),!I&&(this.width===0||this.height===0)){setTimeout(()=>me(this,w,Sc).call(this,!0),0);return}const G=j._internalPadding*this.parentScale;N(this,E).rect=this.getRect(G,G)},kt(j,"_freeTextDefaultContent",""),kt(j,"_internalPadding",0),kt(j,"_defaultColor",null),kt(j,"_defaultFontSize",10),kt(j,"_type","freetext");let f=j;t.FreeTextEditor=f},(e,t,i)=>{var V,te,jr,Dp,ue,we,Ee,De,je,Pe,ge,se,W,ee,de,pe,ve,Te,oe,ie,Fe,Le,Mp,Is,Ec,wc,Je,ct,ot,Oe,ye,xe,Qe,Cc,ht,le,Ne,Ge,jp,Ac;Object.defineProperty(t,"__esModule",{value:!0}),t.StampAnnotationElement=t.InkAnnotationElement=t.FreeTextAnnotationElement=t.AnnotationLayer=void 0;var a=i(1),o=i(6),l=i(3),u=i(30),f=i(31),h=i(32);const p=1e3,m=9,g=new WeakSet;function b(Ke){return{width:Ke[2]-Ke[0],height:Ke[3]-Ke[1]}}class x{static create(ae){switch(ae.data.annotationType){case a.AnnotationType.LINK:return new S(ae);case a.AnnotationType.TEXT:return new E(ae);case a.AnnotationType.WIDGET:switch(ae.data.fieldType){case"Tx":return new _(ae);case"Btn":return ae.data.radioButton?new A(ae):ae.data.checkBox?new k(ae):new D(ae);case"Ch":return new R(ae);case"Sig":return new O(ae)}return new w(ae);case a.AnnotationType.POPUP:return new T(ae);case a.AnnotationType.FREETEXT:return new P(ae);case a.AnnotationType.LINE:return new M(ae);case a.AnnotationType.SQUARE:return new I(ae);case a.AnnotationType.CIRCLE:return new G(ae);case a.AnnotationType.POLYLINE:return new ne(ae);case a.AnnotationType.CARET:return new B(ae);case a.AnnotationType.INK:return new H(ae);case a.AnnotationType.POLYGON:return new Q(ae);case a.AnnotationType.HIGHLIGHT:return new Y(ae);case a.AnnotationType.UNDERLINE:return new U(ae);case a.AnnotationType.SQUIGGLY:return new F(ae);case a.AnnotationType.STRIKEOUT:return new X(ae);case a.AnnotationType.STAMP:return new z(ae);case a.AnnotationType.FILEATTACHMENT:return new L(ae);default:return new y(ae)}}}const K=class K{constructor(ae,{isRenderable:re=!1,ignoreBorder:he=!1,createQuadrilaterals:Re=!1}={}){Se(this,V,!1);this.isRenderable=re,this.data=ae.data,this.layer=ae.layer,this.linkService=ae.linkService,this.downloadManager=ae.downloadManager,this.imageResourcesPath=ae.imageResourcesPath,this.renderForms=ae.renderForms,this.svgFactory=ae.svgFactory,this.annotationStorage=ae.annotationStorage,this.enableScripting=ae.enableScripting,this.hasJSActions=ae.hasJSActions,this._fieldObjects=ae.fieldObjects,this.parent=ae.parent,re&&(this.container=this._createContainer(he)),Re&&this._createQuadrilaterals()}static _hasPopupData({titleObj:ae,contentsObj:re,richText:he}){return!!(ae!=null&&ae.str||re!=null&&re.str||he!=null&&he.str)}get hasPopupData(){return K._hasPopupData(this.data)}_createContainer(ae){const{data:re,parent:{page:he,viewport:Re}}=this,_e=document.createElement("section");_e.setAttribute("data-annotation-id",re.id),this instanceof w||(_e.tabIndex=p),_e.style.zIndex=this.parent.zIndex++,this.data.popupRef&&_e.setAttribute("aria-haspopup","dialog"),re.noRotate&&_e.classList.add("norotate");const{pageWidth:Ie,pageHeight:Be,pageX:et,pageY:tt}=Re.rawDims;if(!re.rect||this instanceof T){const{rotation:st}=re;return!re.hasOwnCanvas&&st!==0&&this.setRotation(st,_e),_e}const{width:Xe,height:ut}=b(re.rect),Ze=a.Util.normalizeRect([re.rect[0],he.view[3]-re.rect[1]+he.view[1],re.rect[2],he.view[3]-re.rect[3]+he.view[1]]);if(!ae&&re.borderStyle.width>0){_e.style.borderWidth=`${re.borderStyle.width}px`;const st=re.borderStyle.horizontalCornerRadius,ft=re.borderStyle.verticalCornerRadius;if(st>0||ft>0){const xt=`calc(${st}px * var(--scale-factor)) / calc(${ft}px * var(--scale-factor))`;_e.style.borderRadius=xt}else if(this instanceof A){const xt=`calc(${Xe}px * var(--scale-factor)) / calc(${ut}px * var(--scale-factor))`;_e.style.borderRadius=xt}switch(re.borderStyle.style){case a.AnnotationBorderStyleType.SOLID:_e.style.borderStyle="solid";break;case a.AnnotationBorderStyleType.DASHED:_e.style.borderStyle="dashed";break;case a.AnnotationBorderStyleType.BEVELED:(0,a.warn)("Unimplemented border style: beveled");break;case a.AnnotationBorderStyleType.INSET:(0,a.warn)("Unimplemented border style: inset");break;case a.AnnotationBorderStyleType.UNDERLINE:_e.style.borderBottomStyle="solid";break}const yt=re.borderColor||null;yt?(Ce(this,V,!0),_e.style.borderColor=a.Util.makeHexColor(yt[0]|0,yt[1]|0,yt[2]|0)):_e.style.borderWidth=0}_e.style.left=`${100*(Ze[0]-et)/Ie}%`,_e.style.top=`${100*(Ze[1]-tt)/Be}%`;const{rotation:rt}=re;return re.hasOwnCanvas||rt===0?(_e.style.width=`${100*Xe/Ie}%`,_e.style.height=`${100*ut/Be}%`):this.setRotation(rt,_e),_e}setRotation(ae,re=this.container){if(!this.data.rect)return;const{pageWidth:he,pageHeight:Re}=this.parent.viewport.rawDims,{width:_e,height:Ie}=b(this.data.rect);let Be,et;ae%180===0?(Be=100*_e/he,et=100*Ie/Re):(Be=100*Ie/he,et=100*_e/Re),re.style.width=`${Be}%`,re.style.height=`${et}%`,re.setAttribute("data-main-rotation",(360-ae)%360)}get _commonActions(){const ae=(re,he,Re)=>{const _e=Re.detail[re],Ie=_e[0],Be=_e.slice(1);Re.target.style[he]=u.ColorConverters[`${Ie}_HTML`](Be),this.annotationStorage.setValue(this.data.id,{[he]:u.ColorConverters[`${Ie}_rgb`](Be)})};return(0,a.shadow)(this,"_commonActions",{display:re=>{const{display:he}=re.detail,Re=he%2===1;this.container.style.visibility=Re?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noView:Re,noPrint:he===1||he===2})},print:re=>{this.annotationStorage.setValue(this.data.id,{noPrint:!re.detail.print})},hidden:re=>{const{hidden:he}=re.detail;this.container.style.visibility=he?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noPrint:he,noView:he})},focus:re=>{setTimeout(()=>re.target.focus({preventScroll:!1}),0)},userName:re=>{re.target.title=re.detail.userName},readonly:re=>{re.target.disabled=re.detail.readonly},required:re=>{this._setRequired(re.target,re.detail.required)},bgColor:re=>{ae("bgColor","backgroundColor",re)},fillColor:re=>{ae("fillColor","backgroundColor",re)},fgColor:re=>{ae("fgColor","color",re)},textColor:re=>{ae("textColor","color",re)},borderColor:re=>{ae("borderColor","borderColor",re)},strokeColor:re=>{ae("strokeColor","borderColor",re)},rotation:re=>{const he=re.detail.rotation;this.setRotation(he),this.annotationStorage.setValue(this.data.id,{rotation:he})}})}_dispatchEventFromSandbox(ae,re){const he=this._commonActions;for(const Re of Object.keys(re.detail)){const _e=ae[Re]||he[Re];_e==null||_e(re)}}_setDefaultPropertiesFromJS(ae){if(!this.enableScripting)return;const re=this.annotationStorage.getRawValue(this.data.id);if(!re)return;const he=this._commonActions;for(const[Re,_e]of Object.entries(re)){const Ie=he[Re];if(Ie){const Be={detail:{[Re]:_e},target:ae};Ie(Be),delete re[Re]}}}_createQuadrilaterals(){if(!this.container)return;const{quadPoints:ae}=this.data;if(!ae)return;const[re,he,Re,_e]=this.data.rect;if(ae.length===1){const[,{x:ft,y:yt},{x:xt,y:Et}]=ae[0];if(Re===ft&&_e===yt&&re===xt&&he===Et)return}const{style:Ie}=this.container;let Be;if(N(this,V)){const{borderColor:ft,borderWidth:yt}=Ie;Ie.borderWidth=0,Be=["url('data:image/svg+xml;utf8,",'<svg xmlns="http://www.w3.org/2000/svg"',' preserveAspectRatio="none" viewBox="0 0 1 1">',`<g fill="transparent" stroke="${ft}" stroke-width="${yt}">`],this.container.classList.add("hasBorder")}const et=Re-re,tt=_e-he,{svgFactory:Xe}=this,ut=Xe.createElement("svg");ut.classList.add("quadrilateralsContainer"),ut.setAttribute("width",0),ut.setAttribute("height",0);const Ze=Xe.createElement("defs");ut.append(Ze);const rt=Xe.createElement("clipPath"),st=`clippath_${this.data.id}`;rt.setAttribute("id",st),rt.setAttribute("clipPathUnits","objectBoundingBox"),Ze.append(rt);for(const[,{x:ft,y:yt},{x:xt,y:Et}]of ae){const Lt=Xe.createElement("rect"),mn=(xt-re)/et,Jt=(_e-yt)/tt,tn=(ft-xt)/et,xa=(yt-Et)/tt;Lt.setAttribute("x",mn),Lt.setAttribute("y",Jt),Lt.setAttribute("width",tn),Lt.setAttribute("height",xa),rt.append(Lt),Be==null||Be.push(`<rect vector-effect="non-scaling-stroke" x="${mn}" y="${Jt}" width="${tn}" height="${xa}"/>`)}N(this,V)&&(Be.push("</g></svg>')"),Ie.backgroundImage=Be.join("")),this.container.append(ut),this.container.style.clipPath=`url(#${st})`}_createPopup(){const{container:ae,data:re}=this;ae.setAttribute("aria-haspopup","dialog");const he=new T({data:{color:re.color,titleObj:re.titleObj,modificationDate:re.modificationDate,contentsObj:re.contentsObj,richText:re.richText,parentRect:re.rect,borderStyle:0,id:`popup_${re.id}`,rotation:re.rotation},parent:this.parent,elements:[this]});this.parent.div.append(he.render())}render(){(0,a.unreachable)("Abstract method `AnnotationElement.render` called")}_getElementsByName(ae,re=null){const he=[];if(this._fieldObjects){const Re=this._fieldObjects[ae];if(Re)for(const{page:_e,id:Ie,exportValues:Be}of Re){if(_e===-1||Ie===re)continue;const et=typeof Be=="string"?Be:null,tt=document.querySelector(`[data-element-id="${Ie}"]`);if(tt&&!g.has(tt)){(0,a.warn)(`_getElementsByName - element not allowed: ${Ie}`);continue}he.push({id:Ie,exportValue:et,domElement:tt})}return he}for(const Re of document.getElementsByName(ae)){const{exportValue:_e}=Re,Ie=Re.getAttribute("data-element-id");Ie!==re&&g.has(Re)&&he.push({id:Ie,exportValue:_e,domElement:Re})}return he}show(){var ae;this.container&&(this.container.hidden=!1),(ae=this.popup)==null||ae.maybeShow()}hide(){var ae;this.container&&(this.container.hidden=!0),(ae=this.popup)==null||ae.forceHide()}getElementsToTriggerPopup(){return this.container}addHighlightArea(){const ae=this.getElementsToTriggerPopup();if(Array.isArray(ae))for(const re of ae)re.classList.add("highlightArea");else ae.classList.add("highlightArea")}_editOnDoubleClick(){const{annotationEditorType:ae,data:{id:re}}=this;this.container.addEventListener("dblclick",()=>{var he;(he=this.linkService.eventBus)==null||he.dispatch("switchannotationeditormode",{source:this,mode:ae,editId:re})})}};V=new WeakMap;let y=K;class S extends y{constructor(re,he=null){super(re,{isRenderable:!0,ignoreBorder:!!(he!=null&&he.ignoreBorder),createQuadrilaterals:!0});Se(this,te);this.isTooltipOnly=re.data.isTooltipOnly}render(){const{data:re,linkService:he}=this,Re=document.createElement("a");Re.setAttribute("data-element-id",re.id);let _e=!1;return re.url?(he.addLinkAttributes(Re,re.url,re.newWindow),_e=!0):re.action?(this._bindNamedAction(Re,re.action),_e=!0):re.attachment?(this._bindAttachment(Re,re.attachment),_e=!0):re.setOCGState?(me(this,te,Dp).call(this,Re,re.setOCGState),_e=!0):re.dest?(this._bindLink(Re,re.dest),_e=!0):(re.actions&&(re.actions.Action||re.actions["Mouse Up"]||re.actions["Mouse Down"])&&this.enableScripting&&this.hasJSActions&&(this._bindJSAction(Re,re),_e=!0),re.resetForm?(this._bindResetFormAction(Re,re.resetForm),_e=!0):this.isTooltipOnly&&!_e&&(this._bindLink(Re,""),_e=!0)),this.container.classList.add("linkAnnotation"),_e&&this.container.append(Re),this.container}_bindLink(re,he){re.href=this.linkService.getDestinationHash(he),re.onclick=()=>(he&&this.linkService.goToDestination(he),!1),(he||he==="")&&me(this,te,jr).call(this)}_bindNamedAction(re,he){re.href=this.linkService.getAnchorUrl(""),re.onclick=()=>(this.linkService.executeNamedAction(he),!1),me(this,te,jr).call(this)}_bindAttachment(re,he){re.href=this.linkService.getAnchorUrl(""),re.onclick=()=>{var Re;return(Re=this.downloadManager)==null||Re.openOrDownloadData(this.container,he.content,he.filename),!1},me(this,te,jr).call(this)}_bindJSAction(re,he){re.href=this.linkService.getAnchorUrl("");const Re=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]);for(const _e of Object.keys(he.actions)){const Ie=Re.get(_e);Ie&&(re[Ie]=()=>{var Be;return(Be=this.linkService.eventBus)==null||Be.dispatch("dispatcheventinsandbox",{source:this,detail:{id:he.id,name:_e}}),!1})}re.onclick||(re.onclick=()=>!1),me(this,te,jr).call(this)}_bindResetFormAction(re,he){const Re=re.onclick;if(Re||(re.href=this.linkService.getAnchorUrl("")),me(this,te,jr).call(this),!this._fieldObjects){(0,a.warn)('_bindResetFormAction - "resetForm" action not supported, ensure that the `fieldObjects` parameter is provided.'),Re||(re.onclick=()=>!1);return}re.onclick=()=>{var ut;Re==null||Re();const{fields:_e,refs:Ie,include:Be}=he,et=[];if(_e.length!==0||Ie.length!==0){const Ze=new Set(Ie);for(const rt of _e){const st=this._fieldObjects[rt]||[];for(const{id:ft}of st)Ze.add(ft)}for(const rt of Object.values(this._fieldObjects))for(const st of rt)Ze.has(st.id)===Be&&et.push(st)}else for(const Ze of Object.values(this._fieldObjects))et.push(...Ze);const tt=this.annotationStorage,Xe=[];for(const Ze of et){const{id:rt}=Ze;switch(Xe.push(rt),Ze.type){case"text":{const ft=Ze.defaultValue||"";tt.setValue(rt,{value:ft});break}case"checkbox":case"radiobutton":{const ft=Ze.defaultValue===Ze.exportValues;tt.setValue(rt,{value:ft});break}case"combobox":case"listbox":{const ft=Ze.defaultValue||"";tt.setValue(rt,{value:ft});break}default:continue}const st=document.querySelector(`[data-element-id="${rt}"]`);if(st){if(!g.has(st)){(0,a.warn)(`_bindResetFormAction - element not allowed: ${rt}`);continue}}else continue;st.dispatchEvent(new Event("resetform"))}return this.enableScripting&&((ut=this.linkService.eventBus)==null||ut.dispatch("dispatcheventinsandbox",{source:this,detail:{id:"app",ids:Xe,name:"ResetForm"}})),!1}}}te=new WeakSet,jr=function(){this.container.setAttribute("data-internal-link","")},Dp=function(re,he){re.href=this.linkService.getAnchorUrl(""),re.onclick=()=>(this.linkService.executeSetOCGState(he),!1),me(this,te,jr).call(this)};class E extends y{constructor(ae){super(ae,{isRenderable:!0})}render(){this.container.classList.add("textAnnotation");const ae=document.createElement("img");return ae.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg",ae.alt="[{{type}} Annotation]",ae.dataset.l10nId="text_annotation_type",ae.dataset.l10nArgs=JSON.stringify({type:this.data.name}),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.append(ae),this.container}}class w extends y{render(){return this.data.alternativeText&&(this.container.title=this.data.alternativeText),this.container}showElementAndHideCanvas(ae){var re;this.data.hasOwnCanvas&&(((re=ae.previousSibling)==null?void 0:re.nodeName)==="CANVAS"&&(ae.previousSibling.hidden=!0),ae.hidden=!1)}_getKeyModifier(ae){const{isWin:re,isMac:he}=a.FeatureTest.platform;return re&&ae.ctrlKey||he&&ae.metaKey}_setEventListener(ae,re,he,Re,_e){he.includes("mouse")?ae.addEventListener(he,Ie=>{var Be;(Be=this.linkService.eventBus)==null||Be.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:Re,value:_e(Ie),shift:Ie.shiftKey,modifier:this._getKeyModifier(Ie)}})}):ae.addEventListener(he,Ie=>{var Be;if(he==="blur"){if(!re.focused||!Ie.relatedTarget)return;re.focused=!1}else if(he==="focus"){if(re.focused)return;re.focused=!0}_e&&((Be=this.linkService.eventBus)==null||Be.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:Re,value:_e(Ie)}}))})}_setEventListeners(ae,re,he,Re){var _e,Ie,Be;for(const[et,tt]of he)(tt==="Action"||(_e=this.data.actions)!=null&&_e[tt])&&((tt==="Focus"||tt==="Blur")&&(re||(re={focused:!1})),this._setEventListener(ae,re,et,tt,Re),tt==="Focus"&&!((Ie=this.data.actions)!=null&&Ie.Blur)?this._setEventListener(ae,re,"blur","Blur",null):tt==="Blur"&&!((Be=this.data.actions)!=null&&Be.Focus)&&this._setEventListener(ae,re,"focus","Focus",null))}_setBackgroundColor(ae){const re=this.data.backgroundColor||null;ae.style.backgroundColor=re===null?"transparent":a.Util.makeHexColor(re[0],re[1],re[2])}_setTextStyle(ae){const re=["left","center","right"],{fontColor:he}=this.data.defaultAppearanceData,Re=this.data.defaultAppearanceData.fontSize||m,_e=ae.style;let Ie;const Be=2,et=tt=>Math.round(10*tt)/10;if(this.data.multiLine){const tt=Math.abs(this.data.rect[3]-this.data.rect[1]-Be),Xe=Math.round(tt/(a.LINE_FACTOR*Re))||1,ut=tt/Xe;Ie=Math.min(Re,et(ut/a.LINE_FACTOR))}else{const tt=Math.abs(this.data.rect[3]-this.data.rect[1]-Be);Ie=Math.min(Re,et(tt/a.LINE_FACTOR))}_e.fontSize=`calc(${Ie}px * var(--scale-factor))`,_e.color=a.Util.makeHexColor(he[0],he[1],he[2]),this.data.textAlignment!==null&&(_e.textAlign=re[this.data.textAlignment])}_setRequired(ae,re){re?ae.setAttribute("required",!0):ae.removeAttribute("required"),ae.setAttribute("aria-required",re)}}class _ extends w{constructor(ae){const re=ae.renderForms||!ae.data.hasAppearance&&!!ae.data.fieldValue;super(ae,{isRenderable:re})}setPropertyOnSiblings(ae,re,he,Re){const _e=this.annotationStorage;for(const Ie of this._getElementsByName(ae.name,ae.id))Ie.domElement&&(Ie.domElement[re]=he),_e.setValue(Ie.id,{[Re]:he})}render(){var Re,_e;const ae=this.annotationStorage,re=this.data.id;this.container.classList.add("textWidgetAnnotation");let he=null;if(this.renderForms){const Ie=ae.getValue(re,{value:this.data.fieldValue});let Be=Ie.value||"";const et=ae.getValue(re,{charLimit:this.data.maxLen}).charLimit;et&&Be.length>et&&(Be=Be.slice(0,et));let tt=Ie.formattedValue||((Re=this.data.textContent)==null?void 0:Re.join(`
|
||
`))||null;tt&&this.data.comb&&(tt=tt.replaceAll(/\s+/g,""));const Xe={userValue:Be,formattedValue:tt,lastCommittedValue:null,commitKey:1,focused:!1};this.data.multiLine?(he=document.createElement("textarea"),he.textContent=tt??Be,this.data.doNotScroll&&(he.style.overflowY="hidden")):(he=document.createElement("input"),he.type="text",he.setAttribute("value",tt??Be),this.data.doNotScroll&&(he.style.overflowX="hidden")),this.data.hasOwnCanvas&&(he.hidden=!0),g.add(he),he.setAttribute("data-element-id",re),he.disabled=this.data.readOnly,he.name=this.data.fieldName,he.tabIndex=p,this._setRequired(he,this.data.required),et&&(he.maxLength=et),he.addEventListener("input",Ze=>{ae.setValue(re,{value:Ze.target.value}),this.setPropertyOnSiblings(he,"value",Ze.target.value,"value"),Xe.formattedValue=null}),he.addEventListener("resetform",Ze=>{const rt=this.data.defaultFieldValue??"";he.value=Xe.userValue=rt,Xe.formattedValue=null});let ut=Ze=>{const{formattedValue:rt}=Xe;rt!=null&&(Ze.target.value=rt),Ze.target.scrollLeft=0};if(this.enableScripting&&this.hasJSActions){he.addEventListener("focus",rt=>{if(Xe.focused)return;const{target:st}=rt;Xe.userValue&&(st.value=Xe.userValue),Xe.lastCommittedValue=st.value,Xe.commitKey=1,Xe.focused=!0}),he.addEventListener("updatefromsandbox",rt=>{this.showElementAndHideCanvas(rt.target);const st={value(ft){Xe.userValue=ft.detail.value??"",ae.setValue(re,{value:Xe.userValue.toString()}),ft.target.value=Xe.userValue},formattedValue(ft){const{formattedValue:yt}=ft.detail;Xe.formattedValue=yt,yt!=null&&ft.target!==document.activeElement&&(ft.target.value=yt),ae.setValue(re,{formattedValue:yt})},selRange(ft){ft.target.setSelectionRange(...ft.detail.selRange)},charLimit:ft=>{var Lt;const{charLimit:yt}=ft.detail,{target:xt}=ft;if(yt===0){xt.removeAttribute("maxLength");return}xt.setAttribute("maxLength",yt);let Et=Xe.userValue;!Et||Et.length<=yt||(Et=Et.slice(0,yt),xt.value=Xe.userValue=Et,ae.setValue(re,{value:Et}),(Lt=this.linkService.eventBus)==null||Lt.dispatch("dispatcheventinsandbox",{source:this,detail:{id:re,name:"Keystroke",value:Et,willCommit:!0,commitKey:1,selStart:xt.selectionStart,selEnd:xt.selectionEnd}}))}};this._dispatchEventFromSandbox(st,rt)}),he.addEventListener("keydown",rt=>{var yt;Xe.commitKey=1;let st=-1;if(rt.key==="Escape"?st=0:rt.key==="Enter"&&!this.data.multiLine?st=2:rt.key==="Tab"&&(Xe.commitKey=3),st===-1)return;const{value:ft}=rt.target;Xe.lastCommittedValue!==ft&&(Xe.lastCommittedValue=ft,Xe.userValue=ft,(yt=this.linkService.eventBus)==null||yt.dispatch("dispatcheventinsandbox",{source:this,detail:{id:re,name:"Keystroke",value:ft,willCommit:!0,commitKey:st,selStart:rt.target.selectionStart,selEnd:rt.target.selectionEnd}}))});const Ze=ut;ut=null,he.addEventListener("blur",rt=>{var ft;if(!Xe.focused||!rt.relatedTarget)return;Xe.focused=!1;const{value:st}=rt.target;Xe.userValue=st,Xe.lastCommittedValue!==st&&((ft=this.linkService.eventBus)==null||ft.dispatch("dispatcheventinsandbox",{source:this,detail:{id:re,name:"Keystroke",value:st,willCommit:!0,commitKey:Xe.commitKey,selStart:rt.target.selectionStart,selEnd:rt.target.selectionEnd}})),Ze(rt)}),(_e=this.data.actions)!=null&&_e.Keystroke&&he.addEventListener("beforeinput",rt=>{var Jt;Xe.lastCommittedValue=null;const{data:st,target:ft}=rt,{value:yt,selectionStart:xt,selectionEnd:Et}=ft;let Lt=xt,mn=Et;switch(rt.inputType){case"deleteWordBackward":{const tn=yt.substring(0,xt).match(/\w*[^\w]*$/);tn&&(Lt-=tn[0].length);break}case"deleteWordForward":{const tn=yt.substring(xt).match(/^[^\w]*\w*/);tn&&(mn+=tn[0].length);break}case"deleteContentBackward":xt===Et&&(Lt-=1);break;case"deleteContentForward":xt===Et&&(mn+=1);break}rt.preventDefault(),(Jt=this.linkService.eventBus)==null||Jt.dispatch("dispatcheventinsandbox",{source:this,detail:{id:re,name:"Keystroke",value:yt,change:st||"",willCommit:!1,selStart:Lt,selEnd:mn}})}),this._setEventListeners(he,Xe,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],rt=>rt.target.value)}if(ut&&he.addEventListener("blur",ut),this.data.comb){const rt=(this.data.rect[2]-this.data.rect[0])/et;he.classList.add("comb"),he.style.letterSpacing=`calc(${rt}px * var(--scale-factor) - 1ch)`}}else he=document.createElement("div"),he.textContent=this.data.fieldValue,he.style.verticalAlign="middle",he.style.display="table-cell";return this._setTextStyle(he),this._setBackgroundColor(he),this._setDefaultPropertiesFromJS(he),this.container.append(he),this.container}}class O extends w{constructor(ae){super(ae,{isRenderable:!!ae.data.hasOwnCanvas})}}class k extends w{constructor(ae){super(ae,{isRenderable:ae.renderForms})}render(){const ae=this.annotationStorage,re=this.data,he=re.id;let Re=ae.getValue(he,{value:re.exportValue===re.fieldValue}).value;typeof Re=="string"&&(Re=Re!=="Off",ae.setValue(he,{value:Re})),this.container.classList.add("buttonWidgetAnnotation","checkBox");const _e=document.createElement("input");return g.add(_e),_e.setAttribute("data-element-id",he),_e.disabled=re.readOnly,this._setRequired(_e,this.data.required),_e.type="checkbox",_e.name=re.fieldName,Re&&_e.setAttribute("checked",!0),_e.setAttribute("exportValue",re.exportValue),_e.tabIndex=p,_e.addEventListener("change",Ie=>{const{name:Be,checked:et}=Ie.target;for(const tt of this._getElementsByName(Be,he)){const Xe=et&&tt.exportValue===re.exportValue;tt.domElement&&(tt.domElement.checked=Xe),ae.setValue(tt.id,{value:Xe})}ae.setValue(he,{value:et})}),_e.addEventListener("resetform",Ie=>{const Be=re.defaultFieldValue||"Off";Ie.target.checked=Be===re.exportValue}),this.enableScripting&&this.hasJSActions&&(_e.addEventListener("updatefromsandbox",Ie=>{const Be={value(et){et.target.checked=et.detail.value!=="Off",ae.setValue(he,{value:et.target.checked})}};this._dispatchEventFromSandbox(Be,Ie)}),this._setEventListeners(_e,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],Ie=>Ie.target.checked)),this._setBackgroundColor(_e),this._setDefaultPropertiesFromJS(_e),this.container.append(_e),this.container}}class A extends w{constructor(ae){super(ae,{isRenderable:ae.renderForms})}render(){this.container.classList.add("buttonWidgetAnnotation","radioButton");const ae=this.annotationStorage,re=this.data,he=re.id;let Re=ae.getValue(he,{value:re.fieldValue===re.buttonValue}).value;typeof Re=="string"&&(Re=Re!==re.buttonValue,ae.setValue(he,{value:Re}));const _e=document.createElement("input");if(g.add(_e),_e.setAttribute("data-element-id",he),_e.disabled=re.readOnly,this._setRequired(_e,this.data.required),_e.type="radio",_e.name=re.fieldName,Re&&_e.setAttribute("checked",!0),_e.tabIndex=p,_e.addEventListener("change",Ie=>{const{name:Be,checked:et}=Ie.target;for(const tt of this._getElementsByName(Be,he))ae.setValue(tt.id,{value:!1});ae.setValue(he,{value:et})}),_e.addEventListener("resetform",Ie=>{const Be=re.defaultFieldValue;Ie.target.checked=Be!=null&&Be===re.buttonValue}),this.enableScripting&&this.hasJSActions){const Ie=re.buttonValue;_e.addEventListener("updatefromsandbox",Be=>{const et={value:tt=>{const Xe=Ie===tt.detail.value;for(const ut of this._getElementsByName(tt.target.name)){const Ze=Xe&&ut.id===he;ut.domElement&&(ut.domElement.checked=Ze),ae.setValue(ut.id,{value:Ze})}}};this._dispatchEventFromSandbox(et,Be)}),this._setEventListeners(_e,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],Be=>Be.target.checked)}return this._setBackgroundColor(_e),this._setDefaultPropertiesFromJS(_e),this.container.append(_e),this.container}}class D extends S{constructor(ae){super(ae,{ignoreBorder:ae.data.hasAppearance})}render(){const ae=super.render();ae.classList.add("buttonWidgetAnnotation","pushButton"),this.data.alternativeText&&(ae.title=this.data.alternativeText);const re=ae.lastChild;return this.enableScripting&&this.hasJSActions&&re&&(this._setDefaultPropertiesFromJS(re),re.addEventListener("updatefromsandbox",he=>{this._dispatchEventFromSandbox({},he)})),ae}}class R extends w{constructor(ae){super(ae,{isRenderable:ae.renderForms})}render(){this.container.classList.add("choiceWidgetAnnotation");const ae=this.annotationStorage,re=this.data.id,he=ae.getValue(re,{value:this.data.fieldValue}),Re=document.createElement("select");g.add(Re),Re.setAttribute("data-element-id",re),Re.disabled=this.data.readOnly,this._setRequired(Re,this.data.required),Re.name=this.data.fieldName,Re.tabIndex=p;let _e=this.data.combo&&this.data.options.length>0;this.data.combo||(Re.size=this.data.options.length,this.data.multiSelect&&(Re.multiple=!0)),Re.addEventListener("resetform",Xe=>{const ut=this.data.defaultFieldValue;for(const Ze of Re.options)Ze.selected=Ze.value===ut});for(const Xe of this.data.options){const ut=document.createElement("option");ut.textContent=Xe.displayValue,ut.value=Xe.exportValue,he.value.includes(Xe.exportValue)&&(ut.setAttribute("selected",!0),_e=!1),Re.append(ut)}let Ie=null;if(_e){const Xe=document.createElement("option");Xe.value=" ",Xe.setAttribute("hidden",!0),Xe.setAttribute("selected",!0),Re.prepend(Xe),Ie=()=>{Xe.remove(),Re.removeEventListener("input",Ie),Ie=null},Re.addEventListener("input",Ie)}const Be=Xe=>{const ut=Xe?"value":"textContent",{options:Ze,multiple:rt}=Re;return rt?Array.prototype.filter.call(Ze,st=>st.selected).map(st=>st[ut]):Ze.selectedIndex===-1?null:Ze[Ze.selectedIndex][ut]};let et=Be(!1);const tt=Xe=>{const ut=Xe.target.options;return Array.prototype.map.call(ut,Ze=>({displayValue:Ze.textContent,exportValue:Ze.value}))};return this.enableScripting&&this.hasJSActions?(Re.addEventListener("updatefromsandbox",Xe=>{const ut={value(Ze){Ie==null||Ie();const rt=Ze.detail.value,st=new Set(Array.isArray(rt)?rt:[rt]);for(const ft of Re.options)ft.selected=st.has(ft.value);ae.setValue(re,{value:Be(!0)}),et=Be(!1)},multipleSelection(Ze){Re.multiple=!0},remove(Ze){const rt=Re.options,st=Ze.detail.remove;rt[st].selected=!1,Re.remove(st),rt.length>0&&Array.prototype.findIndex.call(rt,yt=>yt.selected)===-1&&(rt[0].selected=!0),ae.setValue(re,{value:Be(!0),items:tt(Ze)}),et=Be(!1)},clear(Ze){for(;Re.length!==0;)Re.remove(0);ae.setValue(re,{value:null,items:[]}),et=Be(!1)},insert(Ze){const{index:rt,displayValue:st,exportValue:ft}=Ze.detail.insert,yt=Re.children[rt],xt=document.createElement("option");xt.textContent=st,xt.value=ft,yt?yt.before(xt):Re.append(xt),ae.setValue(re,{value:Be(!0),items:tt(Ze)}),et=Be(!1)},items(Ze){const{items:rt}=Ze.detail;for(;Re.length!==0;)Re.remove(0);for(const st of rt){const{displayValue:ft,exportValue:yt}=st,xt=document.createElement("option");xt.textContent=ft,xt.value=yt,Re.append(xt)}Re.options.length>0&&(Re.options[0].selected=!0),ae.setValue(re,{value:Be(!0),items:tt(Ze)}),et=Be(!1)},indices(Ze){const rt=new Set(Ze.detail.indices);for(const st of Ze.target.options)st.selected=rt.has(st.index);ae.setValue(re,{value:Be(!0)}),et=Be(!1)},editable(Ze){Ze.target.disabled=!Ze.detail.editable}};this._dispatchEventFromSandbox(ut,Xe)}),Re.addEventListener("input",Xe=>{var Ze;const ut=Be(!0);ae.setValue(re,{value:ut}),Xe.preventDefault(),(Ze=this.linkService.eventBus)==null||Ze.dispatch("dispatcheventinsandbox",{source:this,detail:{id:re,name:"Keystroke",value:et,changeEx:ut,willCommit:!1,commitKey:1,keyDown:!1}})}),this._setEventListeners(Re,null,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"],["input","Action"],["input","Validate"]],Xe=>Xe.target.value)):Re.addEventListener("input",function(Xe){ae.setValue(re,{value:Be(!0)})}),this.data.combo&&this._setTextStyle(Re),this._setBackgroundColor(Re),this._setDefaultPropertiesFromJS(Re),this.container.append(Re),this.container}}class T extends y{constructor(ae){const{data:re,elements:he}=ae;super(ae,{isRenderable:y._hasPopupData(re)}),this.elements=he}render(){this.container.classList.add("popupAnnotation");const ae=new j({container:this.container,color:this.data.color,titleObj:this.data.titleObj,modificationDate:this.data.modificationDate,contentsObj:this.data.contentsObj,richText:this.data.richText,rect:this.data.rect,parentRect:this.data.parentRect||null,parent:this.parent,elements:this.elements,open:this.data.open}),re=[];for(const he of this.elements)he.popup=ae,re.push(he.data.id),he.addHighlightArea();return this.container.setAttribute("aria-controls",re.map(he=>`${a.AnnotationPrefix}${he}`).join(",")),this.container}}class j{constructor({container:ae,color:re,elements:he,titleObj:Re,modificationDate:_e,contentsObj:Ie,richText:Be,parent:et,rect:tt,parentRect:Xe,open:ut}){Se(this,Le);Se(this,ue,null);Se(this,we,me(this,Le,Mp).bind(this));Se(this,Ee,me(this,Le,wc).bind(this));Se(this,De,me(this,Le,Ec).bind(this));Se(this,je,me(this,Le,Is).bind(this));Se(this,Pe,null);Se(this,ge,null);Se(this,se,null);Se(this,W,null);Se(this,ee,null);Se(this,de,null);Se(this,pe,!1);Se(this,ve,null);Se(this,Te,null);Se(this,oe,null);Se(this,ie,null);Se(this,Fe,!1);var rt;Ce(this,ge,ae),Ce(this,ie,Re),Ce(this,se,Ie),Ce(this,oe,Be),Ce(this,ee,et),Ce(this,Pe,re),Ce(this,Te,tt),Ce(this,de,Xe),Ce(this,W,he);const Ze=o.PDFDateString.toDateObject(_e);Ze&&Ce(this,ue,et.l10n.get("annotation_date_string",{date:Ze.toLocaleDateString(),time:Ze.toLocaleTimeString()})),this.trigger=he.flatMap(st=>st.getElementsToTriggerPopup());for(const st of this.trigger)st.addEventListener("click",N(this,je)),st.addEventListener("mouseenter",N(this,De)),st.addEventListener("mouseleave",N(this,Ee)),st.classList.add("popupTriggerArea");for(const st of he)(rt=st.container)==null||rt.addEventListener("keydown",N(this,we));N(this,ge).hidden=!0,ut&&me(this,Le,Is).call(this)}render(){if(N(this,ve))return;const{page:{view:ae},viewport:{rawDims:{pageWidth:re,pageHeight:he,pageX:Re,pageY:_e}}}=N(this,ee),Ie=Ce(this,ve,document.createElement("div"));if(Ie.className="popup",N(this,Pe)){const Lt=Ie.style.outlineColor=a.Util.makeHexColor(...N(this,Pe));CSS.supports("background-color","color-mix(in srgb, red 30%, white)")?Ie.style.backgroundColor=`color-mix(in srgb, ${Lt} 30%, white)`:Ie.style.backgroundColor=a.Util.makeHexColor(...N(this,Pe).map(Jt=>Math.floor(.7*(255-Jt)+Jt)))}const Be=document.createElement("span");Be.className="header";const et=document.createElement("h1");if(Be.append(et),{dir:et.dir,str:et.textContent}=N(this,ie),Ie.append(Be),N(this,ue)){const Lt=document.createElement("span");Lt.classList.add("popupDate"),N(this,ue).then(mn=>{Lt.textContent=mn}),Be.append(Lt)}const tt=N(this,se),Xe=N(this,oe);if(Xe!=null&&Xe.str&&(!(tt!=null&&tt.str)||tt.str===Xe.str))h.XfaLayer.render({xfaHtml:Xe.html,intent:"richText",div:Ie}),Ie.lastChild.classList.add("richText","popupContent");else{const Lt=this._formatContents(tt);Ie.append(Lt)}let ut=!!N(this,de),Ze=ut?N(this,de):N(this,Te);for(const Lt of N(this,W))if(!Ze||a.Util.intersect(Lt.data.rect,Ze)!==null){Ze=Lt.data.rect,ut=!0;break}const rt=a.Util.normalizeRect([Ze[0],ae[3]-Ze[1]+ae[1],Ze[2],ae[3]-Ze[3]+ae[1]]),ft=ut?Ze[2]-Ze[0]+5:0,yt=rt[0]+ft,xt=rt[1],{style:Et}=N(this,ge);Et.left=`${100*(yt-Re)/re}%`,Et.top=`${100*(xt-_e)/he}%`,N(this,ge).append(Ie)}_formatContents({str:ae,dir:re}){const he=document.createElement("p");he.classList.add("popupContent"),he.dir=re;const Re=ae.split(/(?:\r\n?|\n)/);for(let _e=0,Ie=Re.length;_e<Ie;++_e){const Be=Re[_e];he.append(document.createTextNode(Be)),_e<Ie-1&&he.append(document.createElement("br"))}return he}forceHide(){Ce(this,Fe,this.isVisible),N(this,Fe)&&(N(this,ge).hidden=!0)}maybeShow(){N(this,Fe)&&(Ce(this,Fe,!1),N(this,ge).hidden=!1)}get isVisible(){return N(this,ge).hidden===!1}}ue=new WeakMap,we=new WeakMap,Ee=new WeakMap,De=new WeakMap,je=new WeakMap,Pe=new WeakMap,ge=new WeakMap,se=new WeakMap,W=new WeakMap,ee=new WeakMap,de=new WeakMap,pe=new WeakMap,ve=new WeakMap,Te=new WeakMap,oe=new WeakMap,ie=new WeakMap,Fe=new WeakMap,Le=new WeakSet,Mp=function(ae){ae.altKey||ae.shiftKey||ae.ctrlKey||ae.metaKey||(ae.key==="Enter"||ae.key==="Escape"&&N(this,pe))&&me(this,Le,Is).call(this)},Is=function(){Ce(this,pe,!N(this,pe)),N(this,pe)?(me(this,Le,Ec).call(this),N(this,ge).addEventListener("click",N(this,je)),N(this,ge).addEventListener("keydown",N(this,we))):(me(this,Le,wc).call(this),N(this,ge).removeEventListener("click",N(this,je)),N(this,ge).removeEventListener("keydown",N(this,we)))},Ec=function(){N(this,ve)||this.render(),this.isVisible?N(this,pe)&&N(this,ge).classList.add("focused"):(N(this,ge).hidden=!1,N(this,ge).style.zIndex=parseInt(N(this,ge).style.zIndex)+1e3)},wc=function(){N(this,ge).classList.remove("focused"),!(N(this,pe)||!this.isVisible)&&(N(this,ge).hidden=!0,N(this,ge).style.zIndex=parseInt(N(this,ge).style.zIndex)-1e3)};class P extends y{constructor(ae){super(ae,{isRenderable:!0,ignoreBorder:!0}),this.textContent=ae.data.textContent,this.textPosition=ae.data.textPosition,this.annotationEditorType=a.AnnotationEditorType.FREETEXT}render(){if(this.container.classList.add("freeTextAnnotation"),this.textContent){const ae=document.createElement("div");ae.classList.add("annotationTextContent"),ae.setAttribute("role","comment");for(const re of this.textContent){const he=document.createElement("span");he.textContent=re,ae.append(he)}this.container.append(ae)}return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this._editOnDoubleClick(),this.container}}t.FreeTextAnnotationElement=P;class M extends y{constructor(re){super(re,{isRenderable:!0,ignoreBorder:!0});Se(this,Je,null)}render(){this.container.classList.add("lineAnnotation");const re=this.data,{width:he,height:Re}=b(re.rect),_e=this.svgFactory.create(he,Re,!0),Ie=Ce(this,Je,this.svgFactory.createElement("svg:line"));return Ie.setAttribute("x1",re.rect[2]-re.lineCoordinates[0]),Ie.setAttribute("y1",re.rect[3]-re.lineCoordinates[1]),Ie.setAttribute("x2",re.rect[2]-re.lineCoordinates[2]),Ie.setAttribute("y2",re.rect[3]-re.lineCoordinates[3]),Ie.setAttribute("stroke-width",re.borderStyle.width||1),Ie.setAttribute("stroke","transparent"),Ie.setAttribute("fill","transparent"),_e.append(Ie),this.container.append(_e),!re.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return N(this,Je)}addHighlightArea(){this.container.classList.add("highlightArea")}}Je=new WeakMap;class I extends y{constructor(re){super(re,{isRenderable:!0,ignoreBorder:!0});Se(this,ct,null)}render(){this.container.classList.add("squareAnnotation");const re=this.data,{width:he,height:Re}=b(re.rect),_e=this.svgFactory.create(he,Re,!0),Ie=re.borderStyle.width,Be=Ce(this,ct,this.svgFactory.createElement("svg:rect"));return Be.setAttribute("x",Ie/2),Be.setAttribute("y",Ie/2),Be.setAttribute("width",he-Ie),Be.setAttribute("height",Re-Ie),Be.setAttribute("stroke-width",Ie||1),Be.setAttribute("stroke","transparent"),Be.setAttribute("fill","transparent"),_e.append(Be),this.container.append(_e),!re.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return N(this,ct)}addHighlightArea(){this.container.classList.add("highlightArea")}}ct=new WeakMap;class G extends y{constructor(re){super(re,{isRenderable:!0,ignoreBorder:!0});Se(this,ot,null)}render(){this.container.classList.add("circleAnnotation");const re=this.data,{width:he,height:Re}=b(re.rect),_e=this.svgFactory.create(he,Re,!0),Ie=re.borderStyle.width,Be=Ce(this,ot,this.svgFactory.createElement("svg:ellipse"));return Be.setAttribute("cx",he/2),Be.setAttribute("cy",Re/2),Be.setAttribute("rx",he/2-Ie/2),Be.setAttribute("ry",Re/2-Ie/2),Be.setAttribute("stroke-width",Ie||1),Be.setAttribute("stroke","transparent"),Be.setAttribute("fill","transparent"),_e.append(Be),this.container.append(_e),!re.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return N(this,ot)}addHighlightArea(){this.container.classList.add("highlightArea")}}ot=new WeakMap;class ne extends y{constructor(re){super(re,{isRenderable:!0,ignoreBorder:!0});Se(this,Oe,null);this.containerClassName="polylineAnnotation",this.svgElementName="svg:polyline"}render(){this.container.classList.add(this.containerClassName);const re=this.data,{width:he,height:Re}=b(re.rect),_e=this.svgFactory.create(he,Re,!0);let Ie=[];for(const et of re.vertices){const tt=et.x-re.rect[0],Xe=re.rect[3]-et.y;Ie.push(tt+","+Xe)}Ie=Ie.join(" ");const Be=Ce(this,Oe,this.svgFactory.createElement(this.svgElementName));return Be.setAttribute("points",Ie),Be.setAttribute("stroke-width",re.borderStyle.width||1),Be.setAttribute("stroke","transparent"),Be.setAttribute("fill","transparent"),_e.append(Be),this.container.append(_e),!re.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return N(this,Oe)}addHighlightArea(){this.container.classList.add("highlightArea")}}Oe=new WeakMap;class Q extends ne{constructor(ae){super(ae),this.containerClassName="polygonAnnotation",this.svgElementName="svg:polygon"}}class B extends y{constructor(ae){super(ae,{isRenderable:!0,ignoreBorder:!0})}render(){return this.container.classList.add("caretAnnotation"),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container}}class H extends y{constructor(re){super(re,{isRenderable:!0,ignoreBorder:!0});Se(this,ye,[]);this.containerClassName="inkAnnotation",this.svgElementName="svg:polyline",this.annotationEditorType=a.AnnotationEditorType.INK}render(){this.container.classList.add(this.containerClassName);const re=this.data,{width:he,height:Re}=b(re.rect),_e=this.svgFactory.create(he,Re,!0);for(const Ie of re.inkLists){let Be=[];for(const tt of Ie){const Xe=tt.x-re.rect[0],ut=re.rect[3]-tt.y;Be.push(`${Xe},${ut}`)}Be=Be.join(" ");const et=this.svgFactory.createElement(this.svgElementName);N(this,ye).push(et),et.setAttribute("points",Be),et.setAttribute("stroke-width",re.borderStyle.width||1),et.setAttribute("stroke","transparent"),et.setAttribute("fill","transparent"),!re.popupRef&&this.hasPopupData&&this._createPopup(),_e.append(et)}return this.container.append(_e),this.container}getElementsToTriggerPopup(){return N(this,ye)}addHighlightArea(){this.container.classList.add("highlightArea")}}ye=new WeakMap,t.InkAnnotationElement=H;class Y extends y{constructor(ae){super(ae,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("highlightAnnotation"),this.container}}class U extends y{constructor(ae){super(ae,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("underlineAnnotation"),this.container}}class F extends y{constructor(ae){super(ae,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("squigglyAnnotation"),this.container}}class X extends y{constructor(ae){super(ae,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("strikeoutAnnotation"),this.container}}class z extends y{constructor(ae){super(ae,{isRenderable:!0,ignoreBorder:!0})}render(){return this.container.classList.add("stampAnnotation"),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container}}t.StampAnnotationElement=z;class L extends y{constructor(re){var _e;super(re,{isRenderable:!0});Se(this,Qe);Se(this,xe,null);const{filename:he,content:Re}=this.data.file;this.filename=(0,o.getFilenameFromUrl)(he,!0),this.content=Re,(_e=this.linkService.eventBus)==null||_e.dispatch("fileattachmentannotation",{source:this,filename:he,content:Re})}render(){this.container.classList.add("fileAttachmentAnnotation");const{container:re,data:he}=this;let Re;he.hasAppearance||he.fillAlpha===0?Re=document.createElement("div"):(Re=document.createElement("img"),Re.src=`${this.imageResourcesPath}annotation-${/paperclip/i.test(he.name)?"paperclip":"pushpin"}.svg`,he.fillAlpha&&he.fillAlpha<1&&(Re.style=`filter: opacity(${Math.round(he.fillAlpha*100)}%);`)),Re.addEventListener("dblclick",me(this,Qe,Cc).bind(this)),Ce(this,xe,Re);const{isMac:_e}=a.FeatureTest.platform;return re.addEventListener("keydown",Ie=>{Ie.key==="Enter"&&(_e?Ie.metaKey:Ie.ctrlKey)&&me(this,Qe,Cc).call(this)}),!he.popupRef&&this.hasPopupData?this._createPopup():Re.classList.add("popupTriggerArea"),re.append(Re),re}getElementsToTriggerPopup(){return N(this,xe)}addHighlightArea(){this.container.classList.add("highlightArea")}}xe=new WeakMap,Qe=new WeakSet,Cc=function(){var re;(re=this.downloadManager)==null||re.openOrDownloadData(this.container,this.content,this.filename)};class ${constructor({div:ae,accessibilityManager:re,annotationCanvasMap:he,l10n:Re,page:_e,viewport:Ie}){Se(this,Ge);Se(this,ht,null);Se(this,le,null);Se(this,Ne,new Map);this.div=ae,Ce(this,ht,re),Ce(this,le,he),this.l10n=Re,this.page=_e,this.viewport=Ie,this.zIndex=0,this.l10n||(this.l10n=f.NullL10n)}async render(ae){const{annotations:re}=ae,he=this.div;(0,o.setLayerDimensions)(he,this.viewport);const Re=new Map,_e={data:null,layer:he,linkService:ae.linkService,downloadManager:ae.downloadManager,imageResourcesPath:ae.imageResourcesPath||"",renderForms:ae.renderForms!==!1,svgFactory:new o.DOMSVGFactory,annotationStorage:ae.annotationStorage||new l.AnnotationStorage,enableScripting:ae.enableScripting===!0,hasJSActions:ae.hasJSActions,fieldObjects:ae.fieldObjects,parent:this,elements:null};for(const Ie of re){if(Ie.noHTML)continue;const Be=Ie.annotationType===a.AnnotationType.POPUP;if(Be){const Xe=Re.get(Ie.id);if(!Xe)continue;_e.elements=Xe}else{const{width:Xe,height:ut}=b(Ie.rect);if(Xe<=0||ut<=0)continue}_e.data=Ie;const et=x.create(_e);if(!et.isRenderable)continue;if(!Be&&Ie.popupRef){const Xe=Re.get(Ie.popupRef);Xe?Xe.push(et):Re.set(Ie.popupRef,[et])}et.annotationEditorType>0&&N(this,Ne).set(et.data.id,et);const tt=et.render();Ie.hidden&&(tt.style.visibility="hidden"),me(this,Ge,jp).call(this,tt,Ie.id)}me(this,Ge,Ac).call(this),await this.l10n.translate(he)}update({viewport:ae}){const re=this.div;this.viewport=ae,(0,o.setLayerDimensions)(re,{rotation:ae.rotation}),me(this,Ge,Ac).call(this),re.hidden=!1}getEditableAnnotations(){return Array.from(N(this,Ne).values())}getEditableAnnotation(ae){return N(this,Ne).get(ae)}}ht=new WeakMap,le=new WeakMap,Ne=new WeakMap,Ge=new WeakSet,jp=function(ae,re){var Re;const he=ae.firstChild||ae;he.id=`${a.AnnotationPrefix}${re}`,this.div.append(ae),(Re=N(this,ht))==null||Re.moveElementInDOM(this.div,ae,he,!1)},Ac=function(){if(!N(this,le))return;const ae=this.div;for(const[re,he]of N(this,le)){const Re=ae.querySelector(`[data-annotation-id="${re}"]`);if(!Re)continue;const{firstChild:_e}=Re;_e?_e.nodeName==="CANVAS"?_e.replaceWith(he):_e.before(he):Re.append(he)}N(this,le).clear()},t.AnnotationLayer=$},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ColorConverters=void 0;function i(l){return Math.floor(Math.max(0,Math.min(1,l))*255).toString(16).padStart(2,"0")}function a(l){return Math.max(0,Math.min(255,255*l))}class o{static CMYK_G([u,f,h,p]){return["G",1-Math.min(1,.3*u+.59*h+.11*f+p)]}static G_CMYK([u]){return["CMYK",0,0,0,1-u]}static G_RGB([u]){return["RGB",u,u,u]}static G_rgb([u]){return u=a(u),[u,u,u]}static G_HTML([u]){const f=i(u);return`#${f}${f}${f}`}static RGB_G([u,f,h]){return["G",.3*u+.59*f+.11*h]}static RGB_rgb(u){return u.map(a)}static RGB_HTML(u){return`#${u.map(i).join("")}`}static T_HTML(){return"#00000000"}static T_rgb(){return[null]}static CMYK_RGB([u,f,h,p]){return["RGB",1-Math.min(1,u+p),1-Math.min(1,h+p),1-Math.min(1,f+p)]}static CMYK_rgb([u,f,h,p]){return[a(1-Math.min(1,u+p)),a(1-Math.min(1,h+p)),a(1-Math.min(1,f+p))]}static CMYK_HTML(u){const f=this.CMYK_RGB(u).slice(1);return this.RGB_HTML(f)}static RGB_CMYK([u,f,h]){const p=1-u,m=1-f,g=1-h,b=Math.min(p,m,g);return["CMYK",p,m,g,b]}}t.ColorConverters=o},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NullL10n=void 0,t.getL10nFallback=a;const i={of_pages:"of {{pagesCount}}",page_of_pages:"({{pageNumber}} of {{pagesCount}})",document_properties_kb:"{{size_kb}} KB ({{size_b}} bytes)",document_properties_mb:"{{size_mb}} MB ({{size_b}} bytes)",document_properties_date_string:"{{date}}, {{time}}",document_properties_page_size_unit_inches:"in",document_properties_page_size_unit_millimeters:"mm",document_properties_page_size_orientation_portrait:"portrait",document_properties_page_size_orientation_landscape:"landscape",document_properties_page_size_name_a3:"A3",document_properties_page_size_name_a4:"A4",document_properties_page_size_name_letter:"Letter",document_properties_page_size_name_legal:"Legal",document_properties_page_size_dimension_string:"{{width}} × {{height}} {{unit}} ({{orientation}})",document_properties_page_size_dimension_name_string:"{{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})",document_properties_linearized_yes:"Yes",document_properties_linearized_no:"No",additional_layers:"Additional Layers",page_landmark:"Page {{page}}",thumb_page_title:"Page {{page}}",thumb_page_canvas:"Thumbnail of Page {{page}}",find_reached_top:"Reached top of document, continued from bottom",find_reached_bottom:"Reached end of document, continued from top","find_match_count[one]":"{{current}} of {{total}} match","find_match_count[other]":"{{current}} of {{total}} matches","find_match_count_limit[one]":"More than {{limit}} match","find_match_count_limit[other]":"More than {{limit}} matches",find_not_found:"Phrase not found",page_scale_width:"Page Width",page_scale_fit:"Page Fit",page_scale_auto:"Automatic Zoom",page_scale_actual:"Actual Size",page_scale_percent:"{{scale}}%",loading_error:"An error occurred while loading the PDF.",invalid_file_error:"Invalid or corrupted PDF file.",missing_file_error:"Missing PDF file.",unexpected_response_error:"Unexpected server response.",rendering_error:"An error occurred while rendering the page.",annotation_date_string:"{{date}}, {{time}}",printing_not_supported:"Warning: Printing is not fully supported by this browser.",printing_not_ready:"Warning: The PDF is not fully loaded for printing.",web_fonts_disabled:"Web fonts are disabled: unable to use embedded PDF fonts.",free_text2_default_content:"Start typing…",editor_free_text2_aria_label:"Text Editor",editor_ink2_aria_label:"Draw Editor",editor_ink_canvas_aria_label:"User-created image",editor_alt_text_button_label:"Alt text",editor_alt_text_edit_button_label:"Edit alt text",editor_alt_text_decorative_tooltip:"Marked as decorative"};i.print_progress_percent="{{progress}}%";function a(u,f){switch(u){case"find_match_count":u=`find_match_count[${f.total===1?"one":"other"}]`;break;case"find_match_count_limit":u=`find_match_count_limit[${f.limit===1?"one":"other"}]`;break}return i[u]||""}function o(u,f){return f?u.replaceAll(/\{\{\s*(\w+)\s*\}\}/g,(h,p)=>p in f?f[p]:"{{"+p+"}}"):u}const l={async getLanguage(){return"en-us"},async getDirection(){return"ltr"},async get(u,f=null,h=a(u,f)){return o(h,f)},async translate(u){}};t.NullL10n=l},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.XfaLayer=void 0;var a=i(25);class o{static setupStorage(u,f,h,p,m){const g=p.getValue(f,{value:null});switch(h.name){case"textarea":if(g.value!==null&&(u.textContent=g.value),m==="print")break;u.addEventListener("input",b=>{p.setValue(f,{value:b.target.value})});break;case"input":if(h.attributes.type==="radio"||h.attributes.type==="checkbox"){if(g.value===h.attributes.xfaOn?u.setAttribute("checked",!0):g.value===h.attributes.xfaOff&&u.removeAttribute("checked"),m==="print")break;u.addEventListener("change",b=>{p.setValue(f,{value:b.target.checked?b.target.getAttribute("xfaOn"):b.target.getAttribute("xfaOff")})})}else{if(g.value!==null&&u.setAttribute("value",g.value),m==="print")break;u.addEventListener("input",b=>{p.setValue(f,{value:b.target.value})})}break;case"select":if(g.value!==null){u.setAttribute("value",g.value);for(const b of h.children)b.attributes.value===g.value?b.attributes.selected=!0:b.attributes.hasOwnProperty("selected")&&delete b.attributes.selected}u.addEventListener("input",b=>{const x=b.target.options,y=x.selectedIndex===-1?"":x[x.selectedIndex].value;p.setValue(f,{value:y})});break}}static setAttributes({html:u,element:f,storage:h=null,intent:p,linkService:m}){const{attributes:g}=f,b=u instanceof HTMLAnchorElement;g.type==="radio"&&(g.name=`${g.name}-${p}`);for(const[x,y]of Object.entries(g))if(y!=null)switch(x){case"class":y.length&&u.setAttribute(x,y.join(" "));break;case"dataId":break;case"id":u.setAttribute("data-element-id",y);break;case"style":Object.assign(u.style,y);break;case"textContent":u.textContent=y;break;default:(!b||x!=="href"&&x!=="newWindow")&&u.setAttribute(x,y)}b&&m.addLinkAttributes(u,g.href,g.newWindow),h&&g.dataId&&this.setupStorage(u,g.dataId,f,h)}static render(u){var S;const f=u.annotationStorage,h=u.linkService,p=u.xfaHtml,m=u.intent||"display",g=document.createElement(p.name);p.attributes&&this.setAttributes({html:g,element:p,intent:m,linkService:h});const b=[[p,-1,g]],x=u.div;if(x.append(g),u.viewport){const E=`matrix(${u.viewport.transform.join(",")})`;x.style.transform=E}m!=="richText"&&x.setAttribute("class","xfaLayer xfaFont");const y=[];for(;b.length>0;){const[E,w,_]=b.at(-1);if(w+1===E.children.length){b.pop();continue}const O=E.children[++b.at(-1)[1]];if(O===null)continue;const{name:k}=O;if(k==="#text"){const D=document.createTextNode(O.value);y.push(D),_.append(D);continue}const A=(S=O==null?void 0:O.attributes)!=null&&S.xmlns?document.createElementNS(O.attributes.xmlns,k):document.createElement(k);if(_.append(A),O.attributes&&this.setAttributes({html:A,element:O,storage:f,intent:m,linkService:h}),O.children&&O.children.length>0)b.push([O,-1,A]);else if(O.value){const D=document.createTextNode(O.value);a.XfaText.shouldBuildText(k)&&y.push(D),A.append(D)}}for(const E of x.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea"))E.setAttribute("readOnly",!0);return{textDivs:y}}static update(u){const f=`matrix(${u.viewport.transform.join(",")})`;u.div.style.transform=f,u.div.hidden=!1}}t.XfaLayer=o},(e,t,i)=>{var p,m,g,b,x,y,S,E,w,_,O,k,A,D,R,Lp,Np,$p,Fp,Rc,Ip,_c,zp,Bp,Up,Hp,Vp,Yn,Tc,zs,Bs,yi,Pc,Us,te,qp,kc,Gp,Wp,Oc,Hs,bi;Object.defineProperty(t,"__esModule",{value:!0}),t.InkEditor=void 0;var a=i(1),o=i(4),l=i(29),u=i(6),f=i(5);const Pe=class Pe extends o.AnnotationEditor{constructor(W){super({...W,name:"inkEditor"});Se(this,R);Se(this,p,0);Se(this,m,0);Se(this,g,this.canvasPointermove.bind(this));Se(this,b,this.canvasPointerleave.bind(this));Se(this,x,this.canvasPointerup.bind(this));Se(this,y,this.canvasPointerdown.bind(this));Se(this,S,new Path2D);Se(this,E,!1);Se(this,w,!1);Se(this,_,!1);Se(this,O,null);Se(this,k,0);Se(this,A,0);Se(this,D,null);this.color=W.color||null,this.thickness=W.thickness||null,this.opacity=W.opacity||null,this.paths=[],this.bezierPath2D=[],this.allRawPaths=[],this.currentPath=[],this.scaleFactor=1,this.translationX=this.translationY=0,this.x=0,this.y=0,this._willKeepAspectRatio=!0}static initialize(W){o.AnnotationEditor.initialize(W,{strings:["editor_ink_canvas_aria_label","editor_ink2_aria_label"]})}static updateDefaultParams(W,ee){switch(W){case a.AnnotationEditorParamsType.INK_THICKNESS:Pe._defaultThickness=ee;break;case a.AnnotationEditorParamsType.INK_COLOR:Pe._defaultColor=ee;break;case a.AnnotationEditorParamsType.INK_OPACITY:Pe._defaultOpacity=ee/100;break}}updateParams(W,ee){switch(W){case a.AnnotationEditorParamsType.INK_THICKNESS:me(this,R,Lp).call(this,ee);break;case a.AnnotationEditorParamsType.INK_COLOR:me(this,R,Np).call(this,ee);break;case a.AnnotationEditorParamsType.INK_OPACITY:me(this,R,$p).call(this,ee);break}}static get defaultPropertiesToUpdate(){return[[a.AnnotationEditorParamsType.INK_THICKNESS,Pe._defaultThickness],[a.AnnotationEditorParamsType.INK_COLOR,Pe._defaultColor||o.AnnotationEditor._defaultLineColor],[a.AnnotationEditorParamsType.INK_OPACITY,Math.round(Pe._defaultOpacity*100)]]}get propertiesToUpdate(){return[[a.AnnotationEditorParamsType.INK_THICKNESS,this.thickness||Pe._defaultThickness],[a.AnnotationEditorParamsType.INK_COLOR,this.color||Pe._defaultColor||o.AnnotationEditor._defaultLineColor],[a.AnnotationEditorParamsType.INK_OPACITY,Math.round(100*(this.opacity??Pe._defaultOpacity))]]}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(this.canvas||(me(this,R,zs).call(this),me(this,R,Bs).call(this)),this.isAttachedToDOM||(this.parent.add(this),me(this,R,yi).call(this)),me(this,R,bi).call(this)))}remove(){this.canvas!==null&&(this.isEmpty()||this.commit(),this.canvas.width=this.canvas.height=0,this.canvas.remove(),this.canvas=null,N(this,O).disconnect(),Ce(this,O,null),super.remove())}setParent(W){!this.parent&&W?this._uiManager.removeShouldRescale(this):this.parent&&W===null&&this._uiManager.addShouldRescale(this),super.setParent(W)}onScaleChanging(){const[W,ee]=this.parentDimensions,de=this.width*W,pe=this.height*ee;this.setDimensions(de,pe)}enableEditMode(){N(this,E)||this.canvas===null||(super.enableEditMode(),this._isDraggable=!1,this.canvas.addEventListener("pointerdown",N(this,y)))}disableEditMode(){!this.isInEditMode()||this.canvas===null||(super.disableEditMode(),this._isDraggable=!this.isEmpty(),this.div.classList.remove("editing"),this.canvas.removeEventListener("pointerdown",N(this,y)))}onceAdded(){this._isDraggable=!this.isEmpty()}isEmpty(){return this.paths.length===0||this.paths.length===1&&this.paths[0].length===0}commit(){N(this,E)||(super.commit(),this.isEditing=!1,this.disableEditMode(),this.setInForeground(),Ce(this,E,!0),this.div.classList.add("disabled"),me(this,R,bi).call(this,!0),this.makeResizable(),this.parent.addInkEditorIfNeeded(!0),this.moveInDOM(),this.div.focus({preventScroll:!0}))}focusin(W){this._focusEventsAllowed&&(super.focusin(W),this.enableEditMode())}canvasPointerdown(W){W.button!==0||!this.isInEditMode()||N(this,E)||(this.setInForeground(),W.preventDefault(),W.type!=="mouse"&&this.div.focus(),me(this,R,Ip).call(this,W.offsetX,W.offsetY))}canvasPointermove(W){W.preventDefault(),me(this,R,_c).call(this,W.offsetX,W.offsetY)}canvasPointerup(W){W.preventDefault(),me(this,R,Tc).call(this,W)}canvasPointerleave(W){me(this,R,Tc).call(this,W)}get isResizable(){return!this.isEmpty()&&N(this,E)}render(){if(this.div)return this.div;let W,ee;this.width&&(W=this.x,ee=this.y),super.render(),o.AnnotationEditor._l10nPromise.get("editor_ink2_aria_label").then(oe=>{var ie;return(ie=this.div)==null?void 0:ie.setAttribute("aria-label",oe)});const[de,pe,ve,Te]=me(this,R,Fp).call(this);if(this.setAt(de,pe,0,0),this.setDims(ve,Te),me(this,R,zs).call(this),this.width){const[oe,ie]=this.parentDimensions;this.setAspectRatio(this.width*oe,this.height*ie),this.setAt(W*oe,ee*ie,this.width*oe,this.height*ie),Ce(this,_,!0),me(this,R,yi).call(this),this.setDims(this.width*oe,this.height*ie),me(this,R,Yn).call(this),this.div.classList.add("disabled")}else this.div.classList.add("editing"),this.enableEditMode();return me(this,R,Bs).call(this),this.div}setDimensions(W,ee){const de=Math.round(W),pe=Math.round(ee);if(N(this,k)===de&&N(this,A)===pe)return;Ce(this,k,de),Ce(this,A,pe),this.canvas.style.visibility="hidden";const[ve,Te]=this.parentDimensions;this.width=W/ve,this.height=ee/Te,this.fixAndSetPosition(),N(this,E)&&me(this,R,Pc).call(this,W,ee),me(this,R,yi).call(this),me(this,R,Yn).call(this),this.canvas.style.visibility="visible",this.fixDims()}static deserialize(W,ee,de){var Je,ct,ot;if(W instanceof l.InkAnnotationElement)return null;const pe=super.deserialize(W,ee,de);pe.thickness=W.thickness,pe.color=a.Util.makeHexColor(...W.color),pe.opacity=W.opacity;const[ve,Te]=pe.pageDimensions,oe=pe.width*ve,ie=pe.height*Te,Fe=pe.parentScale,Le=W.thickness/2;Ce(pe,E,!0),Ce(pe,k,Math.round(oe)),Ce(pe,A,Math.round(ie));const{paths:Ye,rect:qe,rotation:it}=W;for(let{bezier:Oe}of Ye){Oe=me(Je=Pe,te,Gp).call(Je,Oe,qe,it);const ye=[];pe.paths.push(ye);let xe=Fe*(Oe[0]-Le),Qe=Fe*(Oe[1]-Le);for(let ht=2,le=Oe.length;ht<le;ht+=6){const Ne=Fe*(Oe[ht]-Le),Ge=Fe*(Oe[ht+1]-Le),nt=Fe*(Oe[ht+2]-Le),at=Fe*(Oe[ht+3]-Le),Ke=Fe*(Oe[ht+4]-Le),ae=Fe*(Oe[ht+5]-Le);ye.push([[xe,Qe],[Ne,Ge],[nt,at],[Ke,ae]]),xe=Ke,Qe=ae}const pt=me(this,te,qp).call(this,ye);pe.bezierPath2D.push(pt)}const We=me(ct=pe,R,Oc).call(ct);return Ce(pe,m,Math.max(o.AnnotationEditor.MIN_SIZE,We[2]-We[0])),Ce(pe,p,Math.max(o.AnnotationEditor.MIN_SIZE,We[3]-We[1])),me(ot=pe,R,Pc).call(ot,oe,ie),pe}serialize(){if(this.isEmpty())return null;const W=this.getRect(0,0),ee=o.AnnotationEditor._colorManager.convert(this.ctx.strokeStyle);return{annotationType:a.AnnotationEditorType.INK,color:ee,thickness:this.thickness,opacity:this.opacity,paths:me(this,R,Wp).call(this,this.scaleFactor/this.parentScale,this.translationX,this.translationY,W),pageIndex:this.pageIndex,rect:W,rotation:this.rotation,structTreeParentId:this._structTreeParentId}}};p=new WeakMap,m=new WeakMap,g=new WeakMap,b=new WeakMap,x=new WeakMap,y=new WeakMap,S=new WeakMap,E=new WeakMap,w=new WeakMap,_=new WeakMap,O=new WeakMap,k=new WeakMap,A=new WeakMap,D=new WeakMap,R=new WeakSet,Lp=function(W){const ee=this.thickness;this.addCommands({cmd:()=>{this.thickness=W,me(this,R,bi).call(this)},undo:()=>{this.thickness=ee,me(this,R,bi).call(this)},mustExec:!0,type:a.AnnotationEditorParamsType.INK_THICKNESS,overwriteIfSameType:!0,keepUndo:!0})},Np=function(W){const ee=this.color;this.addCommands({cmd:()=>{this.color=W,me(this,R,Yn).call(this)},undo:()=>{this.color=ee,me(this,R,Yn).call(this)},mustExec:!0,type:a.AnnotationEditorParamsType.INK_COLOR,overwriteIfSameType:!0,keepUndo:!0})},$p=function(W){W/=100;const ee=this.opacity;this.addCommands({cmd:()=>{this.opacity=W,me(this,R,Yn).call(this)},undo:()=>{this.opacity=ee,me(this,R,Yn).call(this)},mustExec:!0,type:a.AnnotationEditorParamsType.INK_OPACITY,overwriteIfSameType:!0,keepUndo:!0})},Fp=function(){const{parentRotation:W,parentDimensions:[ee,de]}=this;switch(W){case 90:return[0,de,de,ee];case 180:return[ee,de,ee,de];case 270:return[ee,0,de,ee];default:return[0,0,ee,de]}},Rc=function(){const{ctx:W,color:ee,opacity:de,thickness:pe,parentScale:ve,scaleFactor:Te}=this;W.lineWidth=pe*ve/Te,W.lineCap="round",W.lineJoin="round",W.miterLimit=10,W.strokeStyle=`${ee}${(0,f.opacityToHex)(de)}`},Ip=function(W,ee){this.canvas.addEventListener("contextmenu",u.noContextMenu),this.canvas.addEventListener("pointerleave",N(this,b)),this.canvas.addEventListener("pointermove",N(this,g)),this.canvas.addEventListener("pointerup",N(this,x)),this.canvas.removeEventListener("pointerdown",N(this,y)),this.isEditing=!0,N(this,_)||(Ce(this,_,!0),me(this,R,yi).call(this),this.thickness||(this.thickness=Pe._defaultThickness),this.color||(this.color=Pe._defaultColor||o.AnnotationEditor._defaultLineColor),this.opacity??(this.opacity=Pe._defaultOpacity)),this.currentPath.push([W,ee]),Ce(this,w,!1),me(this,R,Rc).call(this),Ce(this,D,()=>{me(this,R,Up).call(this),N(this,D)&&window.requestAnimationFrame(N(this,D))}),window.requestAnimationFrame(N(this,D))},_c=function(W,ee){const[de,pe]=this.currentPath.at(-1);if(this.currentPath.length>1&&W===de&&ee===pe)return;const ve=this.currentPath;let Te=N(this,S);if(ve.push([W,ee]),Ce(this,w,!0),ve.length<=2){Te.moveTo(...ve[0]),Te.lineTo(W,ee);return}ve.length===3&&(Ce(this,S,Te=new Path2D),Te.moveTo(...ve[0])),me(this,R,Hp).call(this,Te,...ve.at(-3),...ve.at(-2),W,ee)},zp=function(){if(this.currentPath.length===0)return;const W=this.currentPath.at(-1);N(this,S).lineTo(...W)},Bp=function(W,ee){Ce(this,D,null),W=Math.min(Math.max(W,0),this.canvas.width),ee=Math.min(Math.max(ee,0),this.canvas.height),me(this,R,_c).call(this,W,ee),me(this,R,zp).call(this);let de;if(this.currentPath.length!==1)de=me(this,R,Vp).call(this);else{const ie=[W,ee];de=[[ie,ie.slice(),ie.slice(),ie]]}const pe=N(this,S),ve=this.currentPath;this.currentPath=[],Ce(this,S,new Path2D);const Te=()=>{this.allRawPaths.push(ve),this.paths.push(de),this.bezierPath2D.push(pe),this.rebuild()},oe=()=>{this.allRawPaths.pop(),this.paths.pop(),this.bezierPath2D.pop(),this.paths.length===0?this.remove():(this.canvas||(me(this,R,zs).call(this),me(this,R,Bs).call(this)),me(this,R,bi).call(this))};this.addCommands({cmd:Te,undo:oe,mustExec:!0})},Up=function(){if(!N(this,w))return;Ce(this,w,!1);const W=Math.ceil(this.thickness*this.parentScale),ee=this.currentPath.slice(-3),de=ee.map(Te=>Te[0]),pe=ee.map(Te=>Te[1]);Math.min(...de)-W,Math.max(...de)+W,Math.min(...pe)-W,Math.max(...pe)+W;const{ctx:ve}=this;ve.save(),ve.clearRect(0,0,this.canvas.width,this.canvas.height);for(const Te of this.bezierPath2D)ve.stroke(Te);ve.stroke(N(this,S)),ve.restore()},Hp=function(W,ee,de,pe,ve,Te,oe){const ie=(ee+pe)/2,Fe=(de+ve)/2,Le=(pe+Te)/2,Ye=(ve+oe)/2;W.bezierCurveTo(ie+2*(pe-ie)/3,Fe+2*(ve-Fe)/3,Le+2*(pe-Le)/3,Ye+2*(ve-Ye)/3,Le,Ye)},Vp=function(){const W=this.currentPath;if(W.length<=2)return[[W[0],W[0],W.at(-1),W.at(-1)]];const ee=[];let de,[pe,ve]=W[0];for(de=1;de<W.length-2;de++){const[qe,it]=W[de],[We,Je]=W[de+1],ct=(qe+We)/2,ot=(it+Je)/2,Oe=[pe+2*(qe-pe)/3,ve+2*(it-ve)/3],ye=[ct+2*(qe-ct)/3,ot+2*(it-ot)/3];ee.push([[pe,ve],Oe,ye,[ct,ot]]),[pe,ve]=[ct,ot]}const[Te,oe]=W[de],[ie,Fe]=W[de+1],Le=[pe+2*(Te-pe)/3,ve+2*(oe-ve)/3],Ye=[ie+2*(Te-ie)/3,Fe+2*(oe-Fe)/3];return ee.push([[pe,ve],Le,Ye,[ie,Fe]]),ee},Yn=function(){if(this.isEmpty()){me(this,R,Us).call(this);return}me(this,R,Rc).call(this);const{canvas:W,ctx:ee}=this;ee.setTransform(1,0,0,1,0,0),ee.clearRect(0,0,W.width,W.height),me(this,R,Us).call(this);for(const de of this.bezierPath2D)ee.stroke(de)},Tc=function(W){this.canvas.removeEventListener("pointerleave",N(this,b)),this.canvas.removeEventListener("pointermove",N(this,g)),this.canvas.removeEventListener("pointerup",N(this,x)),this.canvas.addEventListener("pointerdown",N(this,y)),setTimeout(()=>{this.canvas.removeEventListener("contextmenu",u.noContextMenu)},10),me(this,R,Bp).call(this,W.offsetX,W.offsetY),this.addToAnnotationStorage(),this.setInBackground()},zs=function(){this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=0,this.canvas.className="inkEditorCanvas",o.AnnotationEditor._l10nPromise.get("editor_ink_canvas_aria_label").then(W=>{var ee;return(ee=this.canvas)==null?void 0:ee.setAttribute("aria-label",W)}),this.div.append(this.canvas),this.ctx=this.canvas.getContext("2d")},Bs=function(){Ce(this,O,new ResizeObserver(W=>{const ee=W[0].contentRect;ee.width&&ee.height&&this.setDimensions(ee.width,ee.height)})),N(this,O).observe(this.div)},yi=function(){if(!N(this,_))return;const[W,ee]=this.parentDimensions;this.canvas.width=Math.ceil(this.width*W),this.canvas.height=Math.ceil(this.height*ee),me(this,R,Us).call(this)},Pc=function(W,ee){const de=me(this,R,Hs).call(this),pe=(W-de)/N(this,m),ve=(ee-de)/N(this,p);this.scaleFactor=Math.min(pe,ve)},Us=function(){const W=me(this,R,Hs).call(this)/2;this.ctx.setTransform(this.scaleFactor,0,0,this.scaleFactor,this.translationX*this.scaleFactor+W,this.translationY*this.scaleFactor+W)},te=new WeakSet,qp=function(W){const ee=new Path2D;for(let de=0,pe=W.length;de<pe;de++){const[ve,Te,oe,ie]=W[de];de===0&&ee.moveTo(...ve),ee.bezierCurveTo(Te[0],Te[1],oe[0],oe[1],ie[0],ie[1])}return ee},kc=function(W,ee,de){const[pe,ve,Te,oe]=ee;switch(de){case 0:for(let ie=0,Fe=W.length;ie<Fe;ie+=2)W[ie]+=pe,W[ie+1]=oe-W[ie+1];break;case 90:for(let ie=0,Fe=W.length;ie<Fe;ie+=2){const Le=W[ie];W[ie]=W[ie+1]+pe,W[ie+1]=Le+ve}break;case 180:for(let ie=0,Fe=W.length;ie<Fe;ie+=2)W[ie]=Te-W[ie],W[ie+1]+=ve;break;case 270:for(let ie=0,Fe=W.length;ie<Fe;ie+=2){const Le=W[ie];W[ie]=Te-W[ie+1],W[ie+1]=oe-Le}break;default:throw new Error("Invalid rotation")}return W},Gp=function(W,ee,de){const[pe,ve,Te,oe]=ee;switch(de){case 0:for(let ie=0,Fe=W.length;ie<Fe;ie+=2)W[ie]-=pe,W[ie+1]=oe-W[ie+1];break;case 90:for(let ie=0,Fe=W.length;ie<Fe;ie+=2){const Le=W[ie];W[ie]=W[ie+1]-ve,W[ie+1]=Le-pe}break;case 180:for(let ie=0,Fe=W.length;ie<Fe;ie+=2)W[ie]=Te-W[ie],W[ie+1]-=ve;break;case 270:for(let ie=0,Fe=W.length;ie<Fe;ie+=2){const Le=W[ie];W[ie]=oe-W[ie+1],W[ie+1]=Te-Le}break;default:throw new Error("Invalid rotation")}return W},Wp=function(W,ee,de,pe){var Fe,Le;const ve=[],Te=this.thickness/2,oe=W*ee+Te,ie=W*de+Te;for(const Ye of this.paths){const qe=[],it=[];for(let We=0,Je=Ye.length;We<Je;We++){const[ct,ot,Oe,ye]=Ye[We],xe=W*ct[0]+oe,Qe=W*ct[1]+ie,pt=W*ot[0]+oe,ht=W*ot[1]+ie,le=W*Oe[0]+oe,Ne=W*Oe[1]+ie,Ge=W*ye[0]+oe,nt=W*ye[1]+ie;We===0&&(qe.push(xe,Qe),it.push(xe,Qe)),qe.push(pt,ht,le,Ne,Ge,nt),it.push(pt,ht),We===Je-1&&it.push(Ge,nt)}ve.push({bezier:me(Fe=Pe,te,kc).call(Fe,qe,pe,this.rotation),points:me(Le=Pe,te,kc).call(Le,it,pe,this.rotation)})}return ve},Oc=function(){let W=1/0,ee=-1/0,de=1/0,pe=-1/0;for(const ve of this.paths)for(const[Te,oe,ie,Fe]of ve){const Le=a.Util.bezierBoundingBox(...Te,...oe,...ie,...Fe);W=Math.min(W,Le[0]),de=Math.min(de,Le[1]),ee=Math.max(ee,Le[2]),pe=Math.max(pe,Le[3])}return[W,de,ee,pe]},Hs=function(){return N(this,E)?Math.ceil(this.thickness*this.parentScale):0},bi=function(W=!1){if(this.isEmpty())return;if(!N(this,E)){me(this,R,Yn).call(this);return}const ee=me(this,R,Oc).call(this),de=me(this,R,Hs).call(this);Ce(this,m,Math.max(o.AnnotationEditor.MIN_SIZE,ee[2]-ee[0])),Ce(this,p,Math.max(o.AnnotationEditor.MIN_SIZE,ee[3]-ee[1]));const pe=Math.ceil(de+N(this,m)*this.scaleFactor),ve=Math.ceil(de+N(this,p)*this.scaleFactor),[Te,oe]=this.parentDimensions;this.width=pe/Te,this.height=ve/oe,this.setAspectRatio(pe,ve);const ie=this.translationX,Fe=this.translationY;this.translationX=-ee[0],this.translationY=-ee[1],me(this,R,yi).call(this),me(this,R,Yn).call(this),Ce(this,k,pe),Ce(this,A,ve),this.setDims(pe,ve);const Le=W?de/this.scaleFactor/2:0;this.translate(ie-this.translationX-Le,Fe-this.translationY-Le)},Se(Pe,te),kt(Pe,"_defaultColor",null),kt(Pe,"_defaultOpacity",1),kt(Pe,"_defaultThickness",1),kt(Pe,"_type","ink");let h=Pe;t.InkEditor=h},(e,t,i)=>{var h,p,m,g,b,x,y,S,E,w,_,ya,ba,Vs,Dc,Xp,Yp,Mc,qs,Kp;Object.defineProperty(t,"__esModule",{value:!0}),t.StampEditor=void 0;var a=i(1),o=i(4),l=i(6),u=i(29);const I=class I extends o.AnnotationEditor{constructor(Q){super({...Q,name:"stampEditor"});Se(this,_);Se(this,h,null);Se(this,p,null);Se(this,m,null);Se(this,g,null);Se(this,b,null);Se(this,x,null);Se(this,y,null);Se(this,S,null);Se(this,E,!1);Se(this,w,!1);Ce(this,g,Q.bitmapUrl),Ce(this,b,Q.bitmapFile)}static initialize(Q){o.AnnotationEditor.initialize(Q)}static get supportedTypes(){const Q=["apng","avif","bmp","gif","jpeg","png","svg+xml","webp","x-icon"];return(0,a.shadow)(this,"supportedTypes",Q.map(B=>`image/${B}`))}static get supportedTypesStr(){return(0,a.shadow)(this,"supportedTypesStr",this.supportedTypes.join(","))}static isHandlingMimeForPasting(Q){return this.supportedTypes.includes(Q)}static paste(Q,B){B.pasteEditor(a.AnnotationEditorType.STAMP,{bitmapFile:Q.getAsFile()})}remove(){var Q,B;N(this,p)&&(Ce(this,h,null),this._uiManager.imageManager.deleteId(N(this,p)),(Q=N(this,x))==null||Q.remove(),Ce(this,x,null),(B=N(this,y))==null||B.disconnect(),Ce(this,y,null)),super.remove()}rebuild(){if(!this.parent){N(this,p)&&me(this,_,Vs).call(this);return}super.rebuild(),this.div!==null&&(N(this,p)&&me(this,_,Vs).call(this),this.isAttachedToDOM||this.parent.add(this))}onceAdded(){this._isDraggable=!0,this.div.focus()}isEmpty(){return!(N(this,m)||N(this,h)||N(this,g)||N(this,b))}get isResizable(){return!0}render(){if(this.div)return this.div;let Q,B;if(this.width&&(Q=this.x,B=this.y),super.render(),this.div.hidden=!0,N(this,h)?me(this,_,Dc).call(this):me(this,_,Vs).call(this),this.width){const[H,Y]=this.parentDimensions;this.setAt(Q*H,B*Y,this.width*H,this.height*Y)}return this.div}static deserialize(Q,B,H){if(Q instanceof u.StampAnnotationElement)return null;const Y=super.deserialize(Q,B,H),{rect:U,bitmapUrl:F,bitmapId:X,isSvg:z,accessibilityData:L}=Q;X&&H.imageManager.isValidId(X)?Ce(Y,p,X):Ce(Y,g,F),Ce(Y,E,z);const[$,V]=Y.pageDimensions;return Y.width=(U[2]-U[0])/$,Y.height=(U[3]-U[1])/V,L&&(Y.altTextData=L),Y}serialize(Q=!1,B=null){if(this.isEmpty())return null;const H={annotationType:a.AnnotationEditorType.STAMP,bitmapId:N(this,p),pageIndex:this.pageIndex,rect:this.getRect(0,0),rotation:this.rotation,isSvg:N(this,E),structTreeParentId:this._structTreeParentId};if(Q)return H.bitmapUrl=me(this,_,qs).call(this,!0),H.accessibilityData=this.altTextData,H;const{decorative:Y,altText:U}=this.altTextData;if(!Y&&U&&(H.accessibilityData={type:"Figure",alt:U}),B===null)return H;B.stamps||(B.stamps=new Map);const F=N(this,E)?(H.rect[2]-H.rect[0])*(H.rect[3]-H.rect[1]):null;if(!B.stamps.has(N(this,p)))B.stamps.set(N(this,p),{area:F,serialized:H}),H.bitmap=me(this,_,qs).call(this,!1);else if(N(this,E)){const X=B.stamps.get(N(this,p));F>X.area&&(X.area=F,X.serialized.bitmap.close(),X.serialized.bitmap=me(this,_,qs).call(this,!1))}return H}};h=new WeakMap,p=new WeakMap,m=new WeakMap,g=new WeakMap,b=new WeakMap,x=new WeakMap,y=new WeakMap,S=new WeakMap,E=new WeakMap,w=new WeakMap,_=new WeakSet,ya=function(Q,B=!1){if(!Q){this.remove();return}Ce(this,h,Q.bitmap),B||(Ce(this,p,Q.id),Ce(this,E,Q.isSvg)),me(this,_,Dc).call(this)},ba=function(){Ce(this,m,null),this._uiManager.enableWaiting(!1),N(this,x)&&this.div.focus()},Vs=function(){if(N(this,p)){this._uiManager.enableWaiting(!0),this._uiManager.imageManager.getFromId(N(this,p)).then(B=>me(this,_,ya).call(this,B,!0)).finally(()=>me(this,_,ba).call(this));return}if(N(this,g)){const B=N(this,g);Ce(this,g,null),this._uiManager.enableWaiting(!0),Ce(this,m,this._uiManager.imageManager.getFromUrl(B).then(H=>me(this,_,ya).call(this,H)).finally(()=>me(this,_,ba).call(this)));return}if(N(this,b)){const B=N(this,b);Ce(this,b,null),this._uiManager.enableWaiting(!0),Ce(this,m,this._uiManager.imageManager.getFromFile(B).then(H=>me(this,_,ya).call(this,H)).finally(()=>me(this,_,ba).call(this)));return}const Q=document.createElement("input");Q.type="file",Q.accept=I.supportedTypesStr,Ce(this,m,new Promise(B=>{Q.addEventListener("change",async()=>{if(!Q.files||Q.files.length===0)this.remove();else{this._uiManager.enableWaiting(!0);const H=await this._uiManager.imageManager.getFromFile(Q.files[0]);me(this,_,ya).call(this,H)}B()}),Q.addEventListener("cancel",()=>{this.remove(),B()})}).finally(()=>me(this,_,ba).call(this))),Q.click()},Dc=function(){const{div:Q}=this;let{width:B,height:H}=N(this,h);const[Y,U]=this.pageDimensions,F=.75;if(this.width)B=this.width*Y,H=this.height*U;else if(B>F*Y||H>F*U){const $=Math.min(F*Y/B,F*U/H);B*=$,H*=$}const[X,z]=this.parentDimensions;this.setDims(B*X/Y,H*z/U),this._uiManager.enableWaiting(!1);const L=Ce(this,x,document.createElement("canvas"));Q.append(L),Q.hidden=!1,me(this,_,Mc).call(this,B,H),me(this,_,Kp).call(this),N(this,w)||(this.parent.addUndoableEditor(this),Ce(this,w,!0)),this._uiManager._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",subtype:this.editorType,data:{action:"inserted_image"}}}),this.addAltTextButton()},Xp=function(Q,B){var F;const[H,Y]=this.parentDimensions;this.width=Q/H,this.height=B/Y,this.setDims(Q,B),(F=this._initialOptions)!=null&&F.isCentered?this.center():this.fixAndSetPosition(),this._initialOptions=null,N(this,S)!==null&&clearTimeout(N(this,S)),Ce(this,S,setTimeout(()=>{Ce(this,S,null),me(this,_,Mc).call(this,Q,B)},200))},Yp=function(Q,B){const{width:H,height:Y}=N(this,h);let U=H,F=Y,X=N(this,h);for(;U>2*Q||F>2*B;){const z=U,L=F;U>2*Q&&(U=U>=16384?Math.floor(U/2)-1:Math.ceil(U/2)),F>2*B&&(F=F>=16384?Math.floor(F/2)-1:Math.ceil(F/2));const $=new OffscreenCanvas(U,F);$.getContext("2d").drawImage(X,0,0,z,L,0,0,U,F),X=$.transferToImageBitmap()}return X},Mc=function(Q,B){Q=Math.ceil(Q),B=Math.ceil(B);const H=N(this,x);if(!H||H.width===Q&&H.height===B)return;H.width=Q,H.height=B;const Y=N(this,E)?N(this,h):me(this,_,Yp).call(this,Q,B),U=H.getContext("2d");U.filter=this._uiManager.hcmFilter,U.drawImage(Y,0,0,Y.width,Y.height,0,0,Q,B)},qs=function(Q){if(Q){if(N(this,E)){const Y=this._uiManager.imageManager.getSvgUrl(N(this,p));if(Y)return Y}const B=document.createElement("canvas");return{width:B.width,height:B.height}=N(this,h),B.getContext("2d").drawImage(N(this,h),0,0),B.toDataURL()}if(N(this,E)){const[B,H]=this.pageDimensions,Y=Math.round(this.width*B*l.PixelsPerInch.PDF_TO_CSS_UNITS),U=Math.round(this.height*H*l.PixelsPerInch.PDF_TO_CSS_UNITS),F=new OffscreenCanvas(Y,U);return F.getContext("2d").drawImage(N(this,h),0,0,N(this,h).width,N(this,h).height,0,0,Y,U),F.transferToImageBitmap()}return structuredClone(N(this,h))},Kp=function(){Ce(this,y,new ResizeObserver(Q=>{const B=Q[0].contentRect;B.width&&B.height&&me(this,_,Xp).call(this,B.width,B.height)})),N(this,y).observe(this.div)},kt(I,"_type","stamp");let f=I;t.StampEditor=f}],__webpack_module_cache__={};function __w_pdfjs_require__(e){var t=__webpack_module_cache__[e];if(t!==void 0)return t.exports;var i=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](i,i.exports,__w_pdfjs_require__),i.exports}var __webpack_exports__={};return(()=>{var e=__webpack_exports__;Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"AbortException",{enumerable:!0,get:function(){return t.AbortException}}),Object.defineProperty(e,"AnnotationEditorLayer",{enumerable:!0,get:function(){return l.AnnotationEditorLayer}}),Object.defineProperty(e,"AnnotationEditorParamsType",{enumerable:!0,get:function(){return t.AnnotationEditorParamsType}}),Object.defineProperty(e,"AnnotationEditorType",{enumerable:!0,get:function(){return t.AnnotationEditorType}}),Object.defineProperty(e,"AnnotationEditorUIManager",{enumerable:!0,get:function(){return u.AnnotationEditorUIManager}}),Object.defineProperty(e,"AnnotationLayer",{enumerable:!0,get:function(){return f.AnnotationLayer}}),Object.defineProperty(e,"AnnotationMode",{enumerable:!0,get:function(){return t.AnnotationMode}}),Object.defineProperty(e,"CMapCompressionType",{enumerable:!0,get:function(){return t.CMapCompressionType}}),Object.defineProperty(e,"DOMSVGFactory",{enumerable:!0,get:function(){return a.DOMSVGFactory}}),Object.defineProperty(e,"FeatureTest",{enumerable:!0,get:function(){return t.FeatureTest}}),Object.defineProperty(e,"GlobalWorkerOptions",{enumerable:!0,get:function(){return h.GlobalWorkerOptions}}),Object.defineProperty(e,"ImageKind",{enumerable:!0,get:function(){return t.ImageKind}}),Object.defineProperty(e,"InvalidPDFException",{enumerable:!0,get:function(){return t.InvalidPDFException}}),Object.defineProperty(e,"MissingPDFException",{enumerable:!0,get:function(){return t.MissingPDFException}}),Object.defineProperty(e,"OPS",{enumerable:!0,get:function(){return t.OPS}}),Object.defineProperty(e,"PDFDataRangeTransport",{enumerable:!0,get:function(){return i.PDFDataRangeTransport}}),Object.defineProperty(e,"PDFDateString",{enumerable:!0,get:function(){return a.PDFDateString}}),Object.defineProperty(e,"PDFWorker",{enumerable:!0,get:function(){return i.PDFWorker}}),Object.defineProperty(e,"PasswordResponses",{enumerable:!0,get:function(){return t.PasswordResponses}}),Object.defineProperty(e,"PermissionFlag",{enumerable:!0,get:function(){return t.PermissionFlag}}),Object.defineProperty(e,"PixelsPerInch",{enumerable:!0,get:function(){return a.PixelsPerInch}}),Object.defineProperty(e,"PromiseCapability",{enumerable:!0,get:function(){return t.PromiseCapability}}),Object.defineProperty(e,"RenderingCancelledException",{enumerable:!0,get:function(){return a.RenderingCancelledException}}),Object.defineProperty(e,"SVGGraphics",{enumerable:!0,get:function(){return i.SVGGraphics}}),Object.defineProperty(e,"UnexpectedResponseException",{enumerable:!0,get:function(){return t.UnexpectedResponseException}}),Object.defineProperty(e,"Util",{enumerable:!0,get:function(){return t.Util}}),Object.defineProperty(e,"VerbosityLevel",{enumerable:!0,get:function(){return t.VerbosityLevel}}),Object.defineProperty(e,"XfaLayer",{enumerable:!0,get:function(){return p.XfaLayer}}),Object.defineProperty(e,"build",{enumerable:!0,get:function(){return i.build}}),Object.defineProperty(e,"createValidAbsoluteUrl",{enumerable:!0,get:function(){return t.createValidAbsoluteUrl}}),Object.defineProperty(e,"getDocument",{enumerable:!0,get:function(){return i.getDocument}}),Object.defineProperty(e,"getFilenameFromUrl",{enumerable:!0,get:function(){return a.getFilenameFromUrl}}),Object.defineProperty(e,"getPdfFilenameFromUrl",{enumerable:!0,get:function(){return a.getPdfFilenameFromUrl}}),Object.defineProperty(e,"getXfaPageViewport",{enumerable:!0,get:function(){return a.getXfaPageViewport}}),Object.defineProperty(e,"isDataScheme",{enumerable:!0,get:function(){return a.isDataScheme}}),Object.defineProperty(e,"isPdfFile",{enumerable:!0,get:function(){return a.isPdfFile}}),Object.defineProperty(e,"loadScript",{enumerable:!0,get:function(){return a.loadScript}}),Object.defineProperty(e,"noContextMenu",{enumerable:!0,get:function(){return a.noContextMenu}}),Object.defineProperty(e,"normalizeUnicode",{enumerable:!0,get:function(){return t.normalizeUnicode}}),Object.defineProperty(e,"renderTextLayer",{enumerable:!0,get:function(){return o.renderTextLayer}}),Object.defineProperty(e,"setLayerDimensions",{enumerable:!0,get:function(){return a.setLayerDimensions}}),Object.defineProperty(e,"shadow",{enumerable:!0,get:function(){return t.shadow}}),Object.defineProperty(e,"updateTextLayer",{enumerable:!0,get:function(){return o.updateTextLayer}}),Object.defineProperty(e,"version",{enumerable:!0,get:function(){return i.version}});var t=__w_pdfjs_require__(1),i=__w_pdfjs_require__(2),a=__w_pdfjs_require__(6),o=__w_pdfjs_require__(26),l=__w_pdfjs_require__(27),u=__w_pdfjs_require__(5),f=__w_pdfjs_require__(29),h=__w_pdfjs_require__(14),p=__w_pdfjs_require__(32)})(),__webpack_exports__})())}(pdf)),pdf.exports}var pdfExports=requirePdf();pdfExports.GlobalWorkerOptions.workerSrc="/pdf.worker.js";function getFileDate(e){return e.lastModified?new Date(e.lastModified).toLocaleString():"Unknown"}function getFileSize(e){return e.size?e.size<1024?`${e.size} B`:e.size<1024*1024?`${(e.size/1024).toFixed(1)} KB`:`${(e.size/(1024*1024)).toFixed(2)} MB`:"Unknown"}function usePdfThumbnail(e){const[t,i]=reactExports.useState(null);return reactExports.useEffect(()=>{let a=!1;async function o(){if(e)try{const l=await e.arrayBuffer(),f=await(await pdfExports.getDocument({data:l}).promise).getPage(1),h=f.getViewport({scale:.5}),p=document.createElement("canvas");p.width=h.width,p.height=h.height;const m=p.getContext("2d");m&&(await f.render({canvasContext:m,viewport:h}).promise,a||i(p.toDataURL()))}catch{a||i(null)}}return o(),()=>{a=!0}},[e]),t}function FileCard({file:e,onRemove:t,onDoubleClick:i}){const{t:a}=useTranslation(),o=usePdfThumbnail(e);return jsxRuntimeExports.jsx(Card,{shadow:"xs",radius:"md",withBorder:!0,p:"xs",style:{width:225,minWidth:180,maxWidth:260,cursor:i?"pointer":void 0},onDoubleClick:i,children:jsxRuntimeExports.jsxs(Stack,{gap:6,align:"center",children:[jsxRuntimeExports.jsx(Box,{style:{border:"2px solid #e0e0e0",borderRadius:8,width:90,height:120,display:"flex",alignItems:"center",justifyContent:"center",margin:"0 auto",background:"#fafbfc"},children:o?jsxRuntimeExports.jsx(Image$1,{src:o,alt:"PDF thumbnail",height:110,width:80,fit:"contain",radius:"sm"}):jsxRuntimeExports.jsx(ThemeIcon,{variant:"light",color:"red",size:60,radius:"sm",style:{display:"flex",alignItems:"center",justifyContent:"center"},children:jsxRuntimeExports.jsx(PictureAsPdfIcon,{style:{fontSize:40}})})}),jsxRuntimeExports.jsx(Text,{fw:500,size:"sm",lineClamp:1,ta:"center",children:e.name}),jsxRuntimeExports.jsxs(Group,{gap:"xs",justify:"center",children:[jsxRuntimeExports.jsx(Badge,{color:"gray",variant:"light",size:"sm",children:getFileSize(e)}),jsxRuntimeExports.jsx(Badge,{color:"blue",variant:"light",size:"sm",children:getFileDate(e)})]}),jsxRuntimeExports.jsx(Button,{color:"red",size:"xs",variant:"light",onClick:t,mt:4,children:a("delete","Remove")})]})})}const FileManager=({files:e=[],setFiles:t,allowMultiple:i=!0,setPdfFile:a,setCurrentView:o})=>{const{t:l}=useTranslation(),u=h=>{t(p=>i?[...p,...h]:h)},f=h=>{t(p=>p.filter((m,g)=>g!==h))};return jsxRuntimeExports.jsxs("div",{style:{width:"100%",margin:"0 auto",justifyContent:"center",display:"flex",flexDirection:"column",alignItems:"center",padding:"20px"},children:[jsxRuntimeExports.jsx(Dropzone,{onDrop:u,accept:[MIME_TYPES.pdf],multiple:i,maxSize:20*1024*1024,style:{marginTop:16,marginBottom:16,border:"2px dashed rgb(202, 202, 202)",borderRadius:8,minHeight:120,display:"flex",alignItems:"center",justifyContent:"center",width:"90%"},children:jsxRuntimeExports.jsx(Group,{justify:"center",gap:"xl",style:{pointerEvents:"none"},children:jsxRuntimeExports.jsx(Text,{size:"md",children:l("fileChooser.dragAndDropPDF","Drag PDF files here or click to select")})})}),e.length===0?jsxRuntimeExports.jsx(Text,{c:"dimmed",ta:"center",children:l("noFileSelected","No files uploaded yet.")}):jsxRuntimeExports.jsx(Box,{children:jsxRuntimeExports.jsx(Flex,{wrap:"wrap",gap:"lg",justify:"flex-start",style:{width:"fit-content",margin:"0 auto"},children:e.map((h,p)=>jsxRuntimeExports.jsx(FileCard,{file:h,onRemove:()=>f(p),onDoubleClick:()=>{const m=h.file||h;a&&a({file:m,url:URL.createObjectURL(m)}),o&&o("viewer")}},h.name+p))})})]})};function bind(e,t){return function(){return e.apply(t,arguments)}}const{toString}=Object.prototype,{getPrototypeOf}=Object,{iterator,toStringTag}=Symbol,kindOf=(e=>t=>{const i=toString.call(t);return e[i]||(e[i]=i.slice(8,-1).toLowerCase())})(Object.create(null)),kindOfTest=e=>(e=e.toLowerCase(),t=>kindOf(t)===e),typeOfTest=e=>t=>typeof t===e,{isArray}=Array,isUndefined=typeOfTest("undefined");function isBuffer(e){return e!==null&&!isUndefined(e)&&e.constructor!==null&&!isUndefined(e.constructor)&&isFunction(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const isArrayBuffer=kindOfTest("ArrayBuffer");function isArrayBufferView(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&isArrayBuffer(e.buffer),t}const isString$1=typeOfTest("string"),isFunction=typeOfTest("function"),isNumber=typeOfTest("number"),isObject=e=>e!==null&&typeof e=="object",isBoolean=e=>e===!0||e===!1,isPlainObject=e=>{if(kindOf(e)!=="object")return!1;const t=getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(toStringTag in e)&&!(iterator in e)},isDate=kindOfTest("Date"),isFile=kindOfTest("File"),isBlob=kindOfTest("Blob"),isFileList=kindOfTest("FileList"),isStream=e=>isObject(e)&&isFunction(e.pipe),isFormData=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||isFunction(e.append)&&((t=kindOf(e))==="formdata"||t==="object"&&isFunction(e.toString)&&e.toString()==="[object FormData]"))},isURLSearchParams=kindOfTest("URLSearchParams"),[isReadableStream,isRequest,isResponse,isHeaders]=["ReadableStream","Request","Response","Headers"].map(kindOfTest),trim=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function forEach$1(e,t,{allOwnKeys:i=!1}={}){if(e===null||typeof e>"u")return;let a,o;if(typeof e!="object"&&(e=[e]),isArray(e))for(a=0,o=e.length;a<o;a++)t.call(null,e[a],a,e);else{const l=i?Object.getOwnPropertyNames(e):Object.keys(e),u=l.length;let f;for(a=0;a<u;a++)f=l[a],t.call(null,e[f],f,e)}}function findKey(e,t){t=t.toLowerCase();const i=Object.keys(e);let a=i.length,o;for(;a-- >0;)if(o=i[a],t===o.toLowerCase())return o;return null}const _global=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,isContextDefined=e=>!isUndefined(e)&&e!==_global;function merge(){const{caseless:e}=isContextDefined(this)&&this||{},t={},i=(a,o)=>{const l=e&&findKey(t,o)||o;isPlainObject(t[l])&&isPlainObject(a)?t[l]=merge(t[l],a):isPlainObject(a)?t[l]=merge({},a):isArray(a)?t[l]=a.slice():t[l]=a};for(let a=0,o=arguments.length;a<o;a++)arguments[a]&&forEach$1(arguments[a],i);return t}const extend=(e,t,i,{allOwnKeys:a}={})=>(forEach$1(t,(o,l)=>{i&&isFunction(o)?e[l]=bind(o,i):e[l]=o},{allOwnKeys:a}),e),stripBOM=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),inherits=(e,t,i,a)=>{e.prototype=Object.create(t.prototype,a),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),i&&Object.assign(e.prototype,i)},toFlatObject=(e,t,i,a)=>{let o,l,u;const f={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),l=o.length;l-- >0;)u=o[l],(!a||a(u,e,t))&&!f[u]&&(t[u]=e[u],f[u]=!0);e=i!==!1&&getPrototypeOf(e)}while(e&&(!i||i(e,t))&&e!==Object.prototype);return t},endsWith=(e,t,i)=>{e=String(e),(i===void 0||i>e.length)&&(i=e.length),i-=t.length;const a=e.indexOf(t,i);return a!==-1&&a===i},toArray=e=>{if(!e)return null;if(isArray(e))return e;let t=e.length;if(!isNumber(t))return null;const i=new Array(t);for(;t-- >0;)i[t]=e[t];return i},isTypedArray=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&getPrototypeOf(Uint8Array)),forEachEntry=(e,t)=>{const a=(e&&e[iterator]).call(e);let o;for(;(o=a.next())&&!o.done;){const l=o.value;t.call(e,l[0],l[1])}},matchAll=(e,t)=>{let i;const a=[];for(;(i=e.exec(t))!==null;)a.push(i);return a},isHTMLForm=kindOfTest("HTMLFormElement"),toCamelCase=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(i,a,o){return a.toUpperCase()+o}),hasOwnProperty=(({hasOwnProperty:e})=>(t,i)=>e.call(t,i))(Object.prototype),isRegExp=kindOfTest("RegExp"),reduceDescriptors=(e,t)=>{const i=Object.getOwnPropertyDescriptors(e),a={};forEach$1(i,(o,l)=>{let u;(u=t(o,l,e))!==!1&&(a[l]=u||o)}),Object.defineProperties(e,a)},freezeMethods=e=>{reduceDescriptors(e,(t,i)=>{if(isFunction(e)&&["arguments","caller","callee"].indexOf(i)!==-1)return!1;const a=e[i];if(isFunction(a)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+i+"'")})}})},toObjectSet=(e,t)=>{const i={},a=o=>{o.forEach(l=>{i[l]=!0})};return isArray(e)?a(e):a(String(e).split(t)),i},noop$1=()=>{},toFiniteNumber=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function isSpecCompliantForm(e){return!!(e&&isFunction(e.append)&&e[toStringTag]==="FormData"&&e[iterator])}const toJSONObject=e=>{const t=new Array(10),i=(a,o)=>{if(isObject(a)){if(t.indexOf(a)>=0)return;if(!("toJSON"in a)){t[o]=a;const l=isArray(a)?[]:{};return forEach$1(a,(u,f)=>{const h=i(u,o+1);!isUndefined(h)&&(l[f]=h)}),t[o]=void 0,l}}return a};return i(e,0)},isAsyncFn=kindOfTest("AsyncFunction"),isThenable=e=>e&&(isObject(e)||isFunction(e))&&isFunction(e.then)&&isFunction(e.catch),_setImmediate=((e,t)=>e?setImmediate:t?((i,a)=>(_global.addEventListener("message",({source:o,data:l})=>{o===_global&&l===i&&a.length&&a.shift()()},!1),o=>{a.push(o),_global.postMessage(i,"*")}))(`axios@${Math.random()}`,[]):i=>setTimeout(i))(typeof setImmediate=="function",isFunction(_global.postMessage)),asap=typeof queueMicrotask<"u"?queueMicrotask.bind(_global):typeof process<"u"&&process.nextTick||_setImmediate,isIterable=e=>e!=null&&isFunction(e[iterator]),utils$1={isArray,isArrayBuffer,isBuffer,isFormData,isArrayBufferView,isString:isString$1,isNumber,isBoolean,isObject,isPlainObject,isReadableStream,isRequest,isResponse,isHeaders,isUndefined,isDate,isFile,isBlob,isRegExp,isFunction,isStream,isURLSearchParams,isTypedArray,isFileList,forEach:forEach$1,merge,extend,trim,stripBOM,inherits,toFlatObject,kindOf,kindOfTest,endsWith,toArray,forEachEntry,matchAll,isHTMLForm,hasOwnProperty,hasOwnProp:hasOwnProperty,reduceDescriptors,freezeMethods,toObjectSet,toCamelCase,noop:noop$1,toFiniteNumber,findKey,global:_global,isContextDefined,isSpecCompliantForm,toJSONObject,isAsyncFn,isThenable,setImmediate:_setImmediate,asap,isIterable};function AxiosError$1(e,t,i,a,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),i&&(this.config=i),a&&(this.request=a),o&&(this.response=o,this.status=o.status?o.status:null)}utils$1.inherits(AxiosError$1,Error,{toJSON:function e(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:utils$1.toJSONObject(this.config),code:this.code,status:this.status}}});const prototype$1=AxiosError$1.prototype,descriptors={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{descriptors[e]={value:e}});Object.defineProperties(AxiosError$1,descriptors);Object.defineProperty(prototype$1,"isAxiosError",{value:!0});AxiosError$1.from=(e,t,i,a,o,l)=>{const u=Object.create(prototype$1);return utils$1.toFlatObject(e,u,function(h){return h!==Error.prototype},f=>f!=="isAxiosError"),AxiosError$1.call(u,e.message,t,i,a,o),u.cause=e,u.name=e.name,l&&Object.assign(u,l),u};const httpAdapter=null;function isVisitable(e){return utils$1.isPlainObject(e)||utils$1.isArray(e)}function removeBrackets(e){return utils$1.endsWith(e,"[]")?e.slice(0,-2):e}function renderKey(e,t,i){return e?e.concat(t).map(function(o,l){return o=removeBrackets(o),!i&&l?"["+o+"]":o}).join(i?".":""):t}function isFlatArray(e){return utils$1.isArray(e)&&!e.some(isVisitable)}const predicates=utils$1.toFlatObject(utils$1,{},null,function e(t){return/^is[A-Z]/.test(t)});function toFormData$1(e,t,i){if(!utils$1.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,i=utils$1.toFlatObject(i,{metaTokens:!0,dots:!1,indexes:!1},!1,function(S,E){return!utils$1.isUndefined(E[S])});const a=i.metaTokens,o=i.visitor||m,l=i.dots,u=i.indexes,h=(i.Blob||typeof Blob<"u"&&Blob)&&utils$1.isSpecCompliantForm(t);if(!utils$1.isFunction(o))throw new TypeError("visitor must be a function");function p(y){if(y===null)return"";if(utils$1.isDate(y))return y.toISOString();if(!h&&utils$1.isBlob(y))throw new AxiosError$1("Blob is not supported. Use a Buffer instead.");return utils$1.isArrayBuffer(y)||utils$1.isTypedArray(y)?h&&typeof Blob=="function"?new Blob([y]):Buffer.from(y):y}function m(y,S,E){let w=y;if(y&&!E&&typeof y=="object"){if(utils$1.endsWith(S,"{}"))S=a?S:S.slice(0,-2),y=JSON.stringify(y);else if(utils$1.isArray(y)&&isFlatArray(y)||(utils$1.isFileList(y)||utils$1.endsWith(S,"[]"))&&(w=utils$1.toArray(y)))return S=removeBrackets(S),w.forEach(function(O,k){!(utils$1.isUndefined(O)||O===null)&&t.append(u===!0?renderKey([S],k,l):u===null?S:S+"[]",p(O))}),!1}return isVisitable(y)?!0:(t.append(renderKey(E,S,l),p(y)),!1)}const g=[],b=Object.assign(predicates,{defaultVisitor:m,convertValue:p,isVisitable});function x(y,S){if(!utils$1.isUndefined(y)){if(g.indexOf(y)!==-1)throw Error("Circular reference detected in "+S.join("."));g.push(y),utils$1.forEach(y,function(w,_){(!(utils$1.isUndefined(w)||w===null)&&o.call(t,w,utils$1.isString(_)?_.trim():_,S,b))===!0&&x(w,S?S.concat(_):[_])}),g.pop()}}if(!utils$1.isObject(e))throw new TypeError("data must be an object");return x(e),t}function encode$1(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(a){return t[a]})}function AxiosURLSearchParams(e,t){this._pairs=[],e&&toFormData$1(e,this,t)}const prototype=AxiosURLSearchParams.prototype;prototype.append=function e(t,i){this._pairs.push([t,i])};prototype.toString=function e(t){const i=t?function(a){return t.call(this,a,encode$1)}:encode$1;return this._pairs.map(function(o){return i(o[0])+"="+i(o[1])},"").join("&")};function encode(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function buildURL(e,t,i){if(!t)return e;const a=i&&i.encode||encode;utils$1.isFunction(i)&&(i={serialize:i});const o=i&&i.serialize;let l;if(o?l=o(t,i):l=utils$1.isURLSearchParams(t)?t.toString():new AxiosURLSearchParams(t,i).toString(a),l){const u=e.indexOf("#");u!==-1&&(e=e.slice(0,u)),e+=(e.indexOf("?")===-1?"?":"&")+l}return e}class InterceptorManager{constructor(){this.handlers=[]}use(t,i,a){return this.handlers.push({fulfilled:t,rejected:i,synchronous:a?a.synchronous:!1,runWhen:a?a.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){utils$1.forEach(this.handlers,function(a){a!==null&&t(a)})}}const transitionalDefaults={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},URLSearchParams$1=typeof URLSearchParams<"u"?URLSearchParams:AxiosURLSearchParams,FormData$1=typeof FormData<"u"?FormData:null,Blob$1=typeof Blob<"u"?Blob:null,platform$1={isBrowser:!0,classes:{URLSearchParams:URLSearchParams$1,FormData:FormData$1,Blob:Blob$1},protocols:["http","https","file","blob","url","data"]},hasBrowserEnv=typeof window<"u"&&typeof document<"u",_navigator=typeof navigator=="object"&&navigator||void 0,hasStandardBrowserEnv=hasBrowserEnv&&(!_navigator||["ReactNative","NativeScript","NS"].indexOf(_navigator.product)<0),hasStandardBrowserWebWorkerEnv=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",origin=hasBrowserEnv&&window.location.href||"http://localhost",utils=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv,hasStandardBrowserEnv,hasStandardBrowserWebWorkerEnv,navigator:_navigator,origin},Symbol.toStringTag,{value:"Module"})),platform={...utils,...platform$1};function toURLEncodedForm(e,t){return toFormData$1(e,new platform.classes.URLSearchParams,Object.assign({visitor:function(i,a,o,l){return platform.isNode&&utils$1.isBuffer(i)?(this.append(a,i.toString("base64")),!1):l.defaultVisitor.apply(this,arguments)}},t))}function parsePropPath(e){return utils$1.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function arrayToObject(e){const t={},i=Object.keys(e);let a;const o=i.length;let l;for(a=0;a<o;a++)l=i[a],t[l]=e[l];return t}function formDataToJSON(e){function t(i,a,o,l){let u=i[l++];if(u==="__proto__")return!0;const f=Number.isFinite(+u),h=l>=i.length;return u=!u&&utils$1.isArray(o)?o.length:u,h?(utils$1.hasOwnProp(o,u)?o[u]=[o[u],a]:o[u]=a,!f):((!o[u]||!utils$1.isObject(o[u]))&&(o[u]=[]),t(i,a,o[u],l)&&utils$1.isArray(o[u])&&(o[u]=arrayToObject(o[u])),!f)}if(utils$1.isFormData(e)&&utils$1.isFunction(e.entries)){const i={};return utils$1.forEachEntry(e,(a,o)=>{t(parsePropPath(a),o,i,0)}),i}return null}function stringifySafely(e,t,i){if(utils$1.isString(e))try{return(t||JSON.parse)(e),utils$1.trim(e)}catch(a){if(a.name!=="SyntaxError")throw a}return(i||JSON.stringify)(e)}const defaults$1={transitional:transitionalDefaults,adapter:["xhr","http","fetch"],transformRequest:[function e(t,i){const a=i.getContentType()||"",o=a.indexOf("application/json")>-1,l=utils$1.isObject(t);if(l&&utils$1.isHTMLForm(t)&&(t=new FormData(t)),utils$1.isFormData(t))return o?JSON.stringify(formDataToJSON(t)):t;if(utils$1.isArrayBuffer(t)||utils$1.isBuffer(t)||utils$1.isStream(t)||utils$1.isFile(t)||utils$1.isBlob(t)||utils$1.isReadableStream(t))return t;if(utils$1.isArrayBufferView(t))return t.buffer;if(utils$1.isURLSearchParams(t))return i.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let f;if(l){if(a.indexOf("application/x-www-form-urlencoded")>-1)return toURLEncodedForm(t,this.formSerializer).toString();if((f=utils$1.isFileList(t))||a.indexOf("multipart/form-data")>-1){const h=this.env&&this.env.FormData;return toFormData$1(f?{"files[]":t}:t,h&&new h,this.formSerializer)}}return l||o?(i.setContentType("application/json",!1),stringifySafely(t)):t}],transformResponse:[function e(t){const i=this.transitional||defaults$1.transitional,a=i&&i.forcedJSONParsing,o=this.responseType==="json";if(utils$1.isResponse(t)||utils$1.isReadableStream(t))return t;if(t&&utils$1.isString(t)&&(a&&!this.responseType||o)){const u=!(i&&i.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(f){if(u)throw f.name==="SyntaxError"?AxiosError$1.from(f,AxiosError$1.ERR_BAD_RESPONSE,this,null,this.response):f}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:platform.classes.FormData,Blob:platform.classes.Blob},validateStatus:function e(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};utils$1.forEach(["delete","get","head","post","put","patch"],e=>{defaults$1.headers[e]={}});const ignoreDuplicateOf=utils$1.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),parseHeaders=e=>{const t={};let i,a,o;return e&&e.split(`
|
||
`).forEach(function(u){o=u.indexOf(":"),i=u.substring(0,o).trim().toLowerCase(),a=u.substring(o+1).trim(),!(!i||t[i]&&ignoreDuplicateOf[i])&&(i==="set-cookie"?t[i]?t[i].push(a):t[i]=[a]:t[i]=t[i]?t[i]+", "+a:a)}),t},$internals=Symbol("internals");function normalizeHeader(e){return e&&String(e).trim().toLowerCase()}function normalizeValue(e){return e===!1||e==null?e:utils$1.isArray(e)?e.map(normalizeValue):String(e)}function parseTokens(e){const t=Object.create(null),i=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let a;for(;a=i.exec(e);)t[a[1]]=a[2];return t}const isValidHeaderName=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function matchHeaderValue(e,t,i,a,o){if(utils$1.isFunction(a))return a.call(this,t,i);if(o&&(t=i),!!utils$1.isString(t)){if(utils$1.isString(a))return t.indexOf(a)!==-1;if(utils$1.isRegExp(a))return a.test(t)}}function formatHeader(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,i,a)=>i.toUpperCase()+a)}function buildAccessors(e,t){const i=utils$1.toCamelCase(" "+t);["get","set","has"].forEach(a=>{Object.defineProperty(e,a+i,{value:function(o,l,u){return this[a].call(this,t,o,l,u)},configurable:!0})})}let AxiosHeaders$1=class{constructor(t){t&&this.set(t)}set(t,i,a){const o=this;function l(f,h,p){const m=normalizeHeader(h);if(!m)throw new Error("header name must be a non-empty string");const g=utils$1.findKey(o,m);(!g||o[g]===void 0||p===!0||p===void 0&&o[g]!==!1)&&(o[g||h]=normalizeValue(f))}const u=(f,h)=>utils$1.forEach(f,(p,m)=>l(p,m,h));if(utils$1.isPlainObject(t)||t instanceof this.constructor)u(t,i);else if(utils$1.isString(t)&&(t=t.trim())&&!isValidHeaderName(t))u(parseHeaders(t),i);else if(utils$1.isObject(t)&&utils$1.isIterable(t)){let f={},h,p;for(const m of t){if(!utils$1.isArray(m))throw TypeError("Object iterator must return a key-value pair");f[p=m[0]]=(h=f[p])?utils$1.isArray(h)?[...h,m[1]]:[h,m[1]]:m[1]}u(f,i)}else t!=null&&l(i,t,a);return this}get(t,i){if(t=normalizeHeader(t),t){const a=utils$1.findKey(this,t);if(a){const o=this[a];if(!i)return o;if(i===!0)return parseTokens(o);if(utils$1.isFunction(i))return i.call(this,o,a);if(utils$1.isRegExp(i))return i.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,i){if(t=normalizeHeader(t),t){const a=utils$1.findKey(this,t);return!!(a&&this[a]!==void 0&&(!i||matchHeaderValue(this,this[a],a,i)))}return!1}delete(t,i){const a=this;let o=!1;function l(u){if(u=normalizeHeader(u),u){const f=utils$1.findKey(a,u);f&&(!i||matchHeaderValue(a,a[f],f,i))&&(delete a[f],o=!0)}}return utils$1.isArray(t)?t.forEach(l):l(t),o}clear(t){const i=Object.keys(this);let a=i.length,o=!1;for(;a--;){const l=i[a];(!t||matchHeaderValue(this,this[l],l,t,!0))&&(delete this[l],o=!0)}return o}normalize(t){const i=this,a={};return utils$1.forEach(this,(o,l)=>{const u=utils$1.findKey(a,l);if(u){i[u]=normalizeValue(o),delete i[l];return}const f=t?formatHeader(l):String(l).trim();f!==l&&delete i[l],i[f]=normalizeValue(o),a[f]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const i=Object.create(null);return utils$1.forEach(this,(a,o)=>{a!=null&&a!==!1&&(i[o]=t&&utils$1.isArray(a)?a.join(", "):a)}),i}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,i])=>t+": "+i).join(`
|
||
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...i){const a=new this(t);return i.forEach(o=>a.set(o)),a}static accessor(t){const a=(this[$internals]=this[$internals]={accessors:{}}).accessors,o=this.prototype;function l(u){const f=normalizeHeader(u);a[f]||(buildAccessors(o,u),a[f]=!0)}return utils$1.isArray(t)?t.forEach(l):l(t),this}};AxiosHeaders$1.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);utils$1.reduceDescriptors(AxiosHeaders$1.prototype,({value:e},t)=>{let i=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(a){this[i]=a}}});utils$1.freezeMethods(AxiosHeaders$1);function transformData(e,t){const i=this||defaults$1,a=t||i,o=AxiosHeaders$1.from(a.headers);let l=a.data;return utils$1.forEach(e,function(f){l=f.call(i,l,o.normalize(),t?t.status:void 0)}),o.normalize(),l}function isCancel$1(e){return!!(e&&e.__CANCEL__)}function CanceledError$1(e,t,i){AxiosError$1.call(this,e??"canceled",AxiosError$1.ERR_CANCELED,t,i),this.name="CanceledError"}utils$1.inherits(CanceledError$1,AxiosError$1,{__CANCEL__:!0});function settle(e,t,i){const a=i.config.validateStatus;!i.status||!a||a(i.status)?e(i):t(new AxiosError$1("Request failed with status code "+i.status,[AxiosError$1.ERR_BAD_REQUEST,AxiosError$1.ERR_BAD_RESPONSE][Math.floor(i.status/100)-4],i.config,i.request,i))}function parseProtocol(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function speedometer(e,t){e=e||10;const i=new Array(e),a=new Array(e);let o=0,l=0,u;return t=t!==void 0?t:1e3,function(h){const p=Date.now(),m=a[l];u||(u=p),i[o]=h,a[o]=p;let g=l,b=0;for(;g!==o;)b+=i[g++],g=g%e;if(o=(o+1)%e,o===l&&(l=(l+1)%e),p-u<t)return;const x=m&&p-m;return x?Math.round(b*1e3/x):void 0}}function throttle(e,t){let i=0,a=1e3/t,o,l;const u=(p,m=Date.now())=>{i=m,o=null,l&&(clearTimeout(l),l=null),e.apply(null,p)};return[(...p)=>{const m=Date.now(),g=m-i;g>=a?u(p,m):(o=p,l||(l=setTimeout(()=>{l=null,u(o)},a-g)))},()=>o&&u(o)]}const progressEventReducer=(e,t,i=3)=>{let a=0;const o=speedometer(50,250);return throttle(l=>{const u=l.loaded,f=l.lengthComputable?l.total:void 0,h=u-a,p=o(h),m=u<=f;a=u;const g={loaded:u,total:f,progress:f?u/f:void 0,bytes:h,rate:p||void 0,estimated:p&&f&&m?(f-u)/p:void 0,event:l,lengthComputable:f!=null,[t?"download":"upload"]:!0};e(g)},i)},progressEventDecorator=(e,t)=>{const i=e!=null;return[a=>t[0]({lengthComputable:i,total:e,loaded:a}),t[1]]},asyncDecorator=e=>(...t)=>utils$1.asap(()=>e(...t)),isURLSameOrigin=platform.hasStandardBrowserEnv?((e,t)=>i=>(i=new URL(i,platform.origin),e.protocol===i.protocol&&e.host===i.host&&(t||e.port===i.port)))(new URL(platform.origin),platform.navigator&&/(msie|trident)/i.test(platform.navigator.userAgent)):()=>!0,cookies=platform.hasStandardBrowserEnv?{write(e,t,i,a,o,l){const u=[e+"="+encodeURIComponent(t)];utils$1.isNumber(i)&&u.push("expires="+new Date(i).toGMTString()),utils$1.isString(a)&&u.push("path="+a),utils$1.isString(o)&&u.push("domain="+o),l===!0&&u.push("secure"),document.cookie=u.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function isAbsoluteURL(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function combineURLs(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function buildFullPath(e,t,i){let a=!isAbsoluteURL(t);return e&&(a||i==!1)?combineURLs(e,t):t}const headersToObject=e=>e instanceof AxiosHeaders$1?{...e}:e;function mergeConfig$1(e,t){t=t||{};const i={};function a(p,m,g,b){return utils$1.isPlainObject(p)&&utils$1.isPlainObject(m)?utils$1.merge.call({caseless:b},p,m):utils$1.isPlainObject(m)?utils$1.merge({},m):utils$1.isArray(m)?m.slice():m}function o(p,m,g,b){if(utils$1.isUndefined(m)){if(!utils$1.isUndefined(p))return a(void 0,p,g,b)}else return a(p,m,g,b)}function l(p,m){if(!utils$1.isUndefined(m))return a(void 0,m)}function u(p,m){if(utils$1.isUndefined(m)){if(!utils$1.isUndefined(p))return a(void 0,p)}else return a(void 0,m)}function f(p,m,g){if(g in t)return a(p,m);if(g in e)return a(void 0,p)}const h={url:l,method:l,data:l,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:f,headers:(p,m,g)=>o(headersToObject(p),headersToObject(m),g,!0)};return utils$1.forEach(Object.keys(Object.assign({},e,t)),function(m){const g=h[m]||o,b=g(e[m],t[m],m);utils$1.isUndefined(b)&&g!==f||(i[m]=b)}),i}const resolveConfig=e=>{const t=mergeConfig$1({},e);let{data:i,withXSRFToken:a,xsrfHeaderName:o,xsrfCookieName:l,headers:u,auth:f}=t;t.headers=u=AxiosHeaders$1.from(u),t.url=buildURL(buildFullPath(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),f&&u.set("Authorization","Basic "+btoa((f.username||"")+":"+(f.password?unescape(encodeURIComponent(f.password)):"")));let h;if(utils$1.isFormData(i)){if(platform.hasStandardBrowserEnv||platform.hasStandardBrowserWebWorkerEnv)u.setContentType(void 0);else if((h=u.getContentType())!==!1){const[p,...m]=h?h.split(";").map(g=>g.trim()).filter(Boolean):[];u.setContentType([p||"multipart/form-data",...m].join("; "))}}if(platform.hasStandardBrowserEnv&&(a&&utils$1.isFunction(a)&&(a=a(t)),a||a!==!1&&isURLSameOrigin(t.url))){const p=o&&l&&cookies.read(l);p&&u.set(o,p)}return t},isXHRAdapterSupported=typeof XMLHttpRequest<"u",xhrAdapter=isXHRAdapterSupported&&function(e){return new Promise(function(i,a){const o=resolveConfig(e);let l=o.data;const u=AxiosHeaders$1.from(o.headers).normalize();let{responseType:f,onUploadProgress:h,onDownloadProgress:p}=o,m,g,b,x,y;function S(){x&&x(),y&&y(),o.cancelToken&&o.cancelToken.unsubscribe(m),o.signal&&o.signal.removeEventListener("abort",m)}let E=new XMLHttpRequest;E.open(o.method.toUpperCase(),o.url,!0),E.timeout=o.timeout;function w(){if(!E)return;const O=AxiosHeaders$1.from("getAllResponseHeaders"in E&&E.getAllResponseHeaders()),A={data:!f||f==="text"||f==="json"?E.responseText:E.response,status:E.status,statusText:E.statusText,headers:O,config:e,request:E};settle(function(R){i(R),S()},function(R){a(R),S()},A),E=null}"onloadend"in E?E.onloadend=w:E.onreadystatechange=function(){!E||E.readyState!==4||E.status===0&&!(E.responseURL&&E.responseURL.indexOf("file:")===0)||setTimeout(w)},E.onabort=function(){E&&(a(new AxiosError$1("Request aborted",AxiosError$1.ECONNABORTED,e,E)),E=null)},E.onerror=function(){a(new AxiosError$1("Network Error",AxiosError$1.ERR_NETWORK,e,E)),E=null},E.ontimeout=function(){let k=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const A=o.transitional||transitionalDefaults;o.timeoutErrorMessage&&(k=o.timeoutErrorMessage),a(new AxiosError$1(k,A.clarifyTimeoutError?AxiosError$1.ETIMEDOUT:AxiosError$1.ECONNABORTED,e,E)),E=null},l===void 0&&u.setContentType(null),"setRequestHeader"in E&&utils$1.forEach(u.toJSON(),function(k,A){E.setRequestHeader(A,k)}),utils$1.isUndefined(o.withCredentials)||(E.withCredentials=!!o.withCredentials),f&&f!=="json"&&(E.responseType=o.responseType),p&&([b,y]=progressEventReducer(p,!0),E.addEventListener("progress",b)),h&&E.upload&&([g,x]=progressEventReducer(h),E.upload.addEventListener("progress",g),E.upload.addEventListener("loadend",x)),(o.cancelToken||o.signal)&&(m=O=>{E&&(a(!O||O.type?new CanceledError$1(null,e,E):O),E.abort(),E=null)},o.cancelToken&&o.cancelToken.subscribe(m),o.signal&&(o.signal.aborted?m():o.signal.addEventListener("abort",m)));const _=parseProtocol(o.url);if(_&&platform.protocols.indexOf(_)===-1){a(new AxiosError$1("Unsupported protocol "+_+":",AxiosError$1.ERR_BAD_REQUEST,e));return}E.send(l||null)})},composeSignals=(e,t)=>{const{length:i}=e=e?e.filter(Boolean):[];if(t||i){let a=new AbortController,o;const l=function(p){if(!o){o=!0,f();const m=p instanceof Error?p:this.reason;a.abort(m instanceof AxiosError$1?m:new CanceledError$1(m instanceof Error?m.message:m))}};let u=t&&setTimeout(()=>{u=null,l(new AxiosError$1(`timeout ${t} of ms exceeded`,AxiosError$1.ETIMEDOUT))},t);const f=()=>{e&&(u&&clearTimeout(u),u=null,e.forEach(p=>{p.unsubscribe?p.unsubscribe(l):p.removeEventListener("abort",l)}),e=null)};e.forEach(p=>p.addEventListener("abort",l));const{signal:h}=a;return h.unsubscribe=()=>utils$1.asap(f),h}},streamChunk=function*(e,t){let i=e.byteLength;if(i<t){yield e;return}let a=0,o;for(;a<i;)o=a+t,yield e.slice(a,o),a=o},readBytes=async function*(e,t){for await(const i of readStream(e))yield*streamChunk(i,t)},readStream=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:i,value:a}=await t.read();if(i)break;yield a}}finally{await t.cancel()}},trackStream=(e,t,i,a)=>{const o=readBytes(e,t);let l=0,u,f=h=>{u||(u=!0,a&&a(h))};return new ReadableStream({async pull(h){try{const{done:p,value:m}=await o.next();if(p){f(),h.close();return}let g=m.byteLength;if(i){let b=l+=g;i(b)}h.enqueue(new Uint8Array(m))}catch(p){throw f(p),p}},cancel(h){return f(h),o.return()}},{highWaterMark:2})},isFetchSupported=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",isReadableStreamSupported=isFetchSupported&&typeof ReadableStream=="function",encodeText=isFetchSupported&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),test=(e,...t)=>{try{return!!e(...t)}catch{return!1}},supportsRequestStream=isReadableStreamSupported&&test(()=>{let e=!1;const t=new Request(platform.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),DEFAULT_CHUNK_SIZE=64*1024,supportsResponseStream=isReadableStreamSupported&&test(()=>utils$1.isReadableStream(new Response("").body)),resolvers={stream:supportsResponseStream&&(e=>e.body)};isFetchSupported&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!resolvers[t]&&(resolvers[t]=utils$1.isFunction(e[t])?i=>i[t]():(i,a)=>{throw new AxiosError$1(`Response type '${t}' is not supported`,AxiosError$1.ERR_NOT_SUPPORT,a)})})})(new Response);const getBodyLength=async e=>{if(e==null)return 0;if(utils$1.isBlob(e))return e.size;if(utils$1.isSpecCompliantForm(e))return(await new Request(platform.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(utils$1.isArrayBufferView(e)||utils$1.isArrayBuffer(e))return e.byteLength;if(utils$1.isURLSearchParams(e)&&(e=e+""),utils$1.isString(e))return(await encodeText(e)).byteLength},resolveBodyLength=async(e,t)=>{const i=utils$1.toFiniteNumber(e.getContentLength());return i??getBodyLength(t)},fetchAdapter=isFetchSupported&&(async e=>{let{url:t,method:i,data:a,signal:o,cancelToken:l,timeout:u,onDownloadProgress:f,onUploadProgress:h,responseType:p,headers:m,withCredentials:g="same-origin",fetchOptions:b}=resolveConfig(e);p=p?(p+"").toLowerCase():"text";let x=composeSignals([o,l&&l.toAbortSignal()],u),y;const S=x&&x.unsubscribe&&(()=>{x.unsubscribe()});let E;try{if(h&&supportsRequestStream&&i!=="get"&&i!=="head"&&(E=await resolveBodyLength(m,a))!==0){let A=new Request(t,{method:"POST",body:a,duplex:"half"}),D;if(utils$1.isFormData(a)&&(D=A.headers.get("content-type"))&&m.setContentType(D),A.body){const[R,T]=progressEventDecorator(E,progressEventReducer(asyncDecorator(h)));a=trackStream(A.body,DEFAULT_CHUNK_SIZE,R,T)}}utils$1.isString(g)||(g=g?"include":"omit");const w="credentials"in Request.prototype;y=new Request(t,{...b,signal:x,method:i.toUpperCase(),headers:m.normalize().toJSON(),body:a,duplex:"half",credentials:w?g:void 0});let _=await fetch(y);const O=supportsResponseStream&&(p==="stream"||p==="response");if(supportsResponseStream&&(f||O&&S)){const A={};["status","statusText","headers"].forEach(j=>{A[j]=_[j]});const D=utils$1.toFiniteNumber(_.headers.get("content-length")),[R,T]=f&&progressEventDecorator(D,progressEventReducer(asyncDecorator(f),!0))||[];_=new Response(trackStream(_.body,DEFAULT_CHUNK_SIZE,R,()=>{T&&T(),S&&S()}),A)}p=p||"text";let k=await resolvers[utils$1.findKey(resolvers,p)||"text"](_,e);return!O&&S&&S(),await new Promise((A,D)=>{settle(A,D,{data:k,headers:AxiosHeaders$1.from(_.headers),status:_.status,statusText:_.statusText,config:e,request:y})})}catch(w){throw S&&S(),w&&w.name==="TypeError"&&/Load failed|fetch/i.test(w.message)?Object.assign(new AxiosError$1("Network Error",AxiosError$1.ERR_NETWORK,e,y),{cause:w.cause||w}):AxiosError$1.from(w,w&&w.code,e,y)}}),knownAdapters={http:httpAdapter,xhr:xhrAdapter,fetch:fetchAdapter};utils$1.forEach(knownAdapters,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const renderReason=e=>`- ${e}`,isResolvedHandle=e=>utils$1.isFunction(e)||e===null||e===!1,adapters={getAdapter:e=>{e=utils$1.isArray(e)?e:[e];const{length:t}=e;let i,a;const o={};for(let l=0;l<t;l++){i=e[l];let u;if(a=i,!isResolvedHandle(i)&&(a=knownAdapters[(u=String(i)).toLowerCase()],a===void 0))throw new AxiosError$1(`Unknown adapter '${u}'`);if(a)break;o[u||"#"+l]=a}if(!a){const l=Object.entries(o).map(([f,h])=>`adapter ${f} `+(h===!1?"is not supported by the environment":"is not available in the build"));let u=t?l.length>1?`since :
|
||
`+l.map(renderReason).join(`
|
||
`):" "+renderReason(l[0]):"as no adapter specified";throw new AxiosError$1("There is no suitable adapter to dispatch the request "+u,"ERR_NOT_SUPPORT")}return a},adapters:knownAdapters};function throwIfCancellationRequested(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new CanceledError$1(null,e)}function dispatchRequest(e){return throwIfCancellationRequested(e),e.headers=AxiosHeaders$1.from(e.headers),e.data=transformData.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),adapters.getAdapter(e.adapter||defaults$1.adapter)(e).then(function(a){return throwIfCancellationRequested(e),a.data=transformData.call(e,e.transformResponse,a),a.headers=AxiosHeaders$1.from(a.headers),a},function(a){return isCancel$1(a)||(throwIfCancellationRequested(e),a&&a.response&&(a.response.data=transformData.call(e,e.transformResponse,a.response),a.response.headers=AxiosHeaders$1.from(a.response.headers))),Promise.reject(a)})}const VERSION$1="1.9.0",validators$1={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{validators$1[e]=function(a){return typeof a===e||"a"+(t<1?"n ":" ")+e}});const deprecatedWarnings={};validators$1.transitional=function e(t,i,a){function o(l,u){return"[Axios v"+VERSION$1+"] Transitional option '"+l+"'"+u+(a?". "+a:"")}return(l,u,f)=>{if(t===!1)throw new AxiosError$1(o(u," has been removed"+(i?" in "+i:"")),AxiosError$1.ERR_DEPRECATED);return i&&!deprecatedWarnings[u]&&(deprecatedWarnings[u]=!0,console.warn(o(u," has been deprecated since v"+i+" and will be removed in the near future"))),t?t(l,u,f):!0}};validators$1.spelling=function e(t){return(i,a)=>(console.warn(`${a} is likely a misspelling of ${t}`),!0)};function assertOptions(e,t,i){if(typeof e!="object")throw new AxiosError$1("options must be an object",AxiosError$1.ERR_BAD_OPTION_VALUE);const a=Object.keys(e);let o=a.length;for(;o-- >0;){const l=a[o],u=t[l];if(u){const f=e[l],h=f===void 0||u(f,l,e);if(h!==!0)throw new AxiosError$1("option "+l+" must be "+h,AxiosError$1.ERR_BAD_OPTION_VALUE);continue}if(i!==!0)throw new AxiosError$1("Unknown option "+l,AxiosError$1.ERR_BAD_OPTION)}}const validator={assertOptions,validators:validators$1},validators=validator.validators;let Axios$1=class{constructor(t){this.defaults=t||{},this.interceptors={request:new InterceptorManager,response:new InterceptorManager}}async request(t,i){try{return await this._request(t,i)}catch(a){if(a instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const l=o.stack?o.stack.replace(/^.+\n/,""):"";try{a.stack?l&&!String(a.stack).endsWith(l.replace(/^.+\n.+\n/,""))&&(a.stack+=`
|
||
`+l):a.stack=l}catch{}}throw a}}_request(t,i){typeof t=="string"?(i=i||{},i.url=t):i=t||{},i=mergeConfig$1(this.defaults,i);const{transitional:a,paramsSerializer:o,headers:l}=i;a!==void 0&&validator.assertOptions(a,{silentJSONParsing:validators.transitional(validators.boolean),forcedJSONParsing:validators.transitional(validators.boolean),clarifyTimeoutError:validators.transitional(validators.boolean)},!1),o!=null&&(utils$1.isFunction(o)?i.paramsSerializer={serialize:o}:validator.assertOptions(o,{encode:validators.function,serialize:validators.function},!0)),i.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?i.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:i.allowAbsoluteUrls=!0),validator.assertOptions(i,{baseUrl:validators.spelling("baseURL"),withXsrfToken:validators.spelling("withXSRFToken")},!0),i.method=(i.method||this.defaults.method||"get").toLowerCase();let u=l&&utils$1.merge(l.common,l[i.method]);l&&utils$1.forEach(["delete","get","head","post","put","patch","common"],y=>{delete l[y]}),i.headers=AxiosHeaders$1.concat(u,l);const f=[];let h=!0;this.interceptors.request.forEach(function(S){typeof S.runWhen=="function"&&S.runWhen(i)===!1||(h=h&&S.synchronous,f.unshift(S.fulfilled,S.rejected))});const p=[];this.interceptors.response.forEach(function(S){p.push(S.fulfilled,S.rejected)});let m,g=0,b;if(!h){const y=[dispatchRequest.bind(this),void 0];for(y.unshift.apply(y,f),y.push.apply(y,p),b=y.length,m=Promise.resolve(i);g<b;)m=m.then(y[g++],y[g++]);return m}b=f.length;let x=i;for(g=0;g<b;){const y=f[g++],S=f[g++];try{x=y(x)}catch(E){S.call(this,E);break}}try{m=dispatchRequest.call(this,x)}catch(y){return Promise.reject(y)}for(g=0,b=p.length;g<b;)m=m.then(p[g++],p[g++]);return m}getUri(t){t=mergeConfig$1(this.defaults,t);const i=buildFullPath(t.baseURL,t.url,t.allowAbsoluteUrls);return buildURL(i,t.params,t.paramsSerializer)}};utils$1.forEach(["delete","get","head","options"],function e(t){Axios$1.prototype[t]=function(i,a){return this.request(mergeConfig$1(a||{},{method:t,url:i,data:(a||{}).data}))}});utils$1.forEach(["post","put","patch"],function e(t){function i(a){return function(l,u,f){return this.request(mergeConfig$1(f||{},{method:t,headers:a?{"Content-Type":"multipart/form-data"}:{},url:l,data:u}))}}Axios$1.prototype[t]=i(),Axios$1.prototype[t+"Form"]=i(!0)});let CancelToken$1=class Qp{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let i;this.promise=new Promise(function(l){i=l});const a=this;this.promise.then(o=>{if(!a._listeners)return;let l=a._listeners.length;for(;l-- >0;)a._listeners[l](o);a._listeners=null}),this.promise.then=o=>{let l;const u=new Promise(f=>{a.subscribe(f),l=f}).then(o);return u.cancel=function(){a.unsubscribe(l)},u},t(function(l,u,f){a.reason||(a.reason=new CanceledError$1(l,u,f),i(a.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const i=this._listeners.indexOf(t);i!==-1&&this._listeners.splice(i,1)}toAbortSignal(){const t=new AbortController,i=a=>{t.abort(a)};return this.subscribe(i),t.signal.unsubscribe=()=>this.unsubscribe(i),t.signal}static source(){let t;return{token:new Qp(function(o){t=o}),cancel:t}}};function spread$1(e){return function(i){return e.apply(null,i)}}function isAxiosError$1(e){return utils$1.isObject(e)&&e.isAxiosError===!0}const HttpStatusCode$1={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(HttpStatusCode$1).forEach(([e,t])=>{HttpStatusCode$1[t]=e});function createInstance(e){const t=new Axios$1(e),i=bind(Axios$1.prototype.request,t);return utils$1.extend(i,Axios$1.prototype,t,{allOwnKeys:!0}),utils$1.extend(i,t,null,{allOwnKeys:!0}),i.create=function(o){return createInstance(mergeConfig$1(e,o))},i}const axios=createInstance(defaults$1);axios.Axios=Axios$1;axios.CanceledError=CanceledError$1;axios.CancelToken=CancelToken$1;axios.isCancel=isCancel$1;axios.VERSION=VERSION$1;axios.toFormData=toFormData$1;axios.AxiosError=AxiosError$1;axios.Cancel=axios.CanceledError;axios.all=function e(t){return Promise.all(t)};axios.spread=spread$1;axios.isAxiosError=isAxiosError$1;axios.mergeConfig=mergeConfig$1;axios.AxiosHeaders=AxiosHeaders$1;axios.formToJSON=e=>formDataToJSON(utils$1.isHTMLForm(e)?new FormData(e):e);axios.getAdapter=adapters.getAdapter;axios.HttpStatusCode=HttpStatusCode$1;axios.default=axios;const{Axios,AxiosError,CanceledError,isCancel,CancelToken,VERSION,all,Cancel,isAxiosError,spread,toFormData,AxiosHeaders,HttpStatusCode,formToJSON,getAdapter,mergeConfig}=axios,DownloadIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M5 20h14v-2H5zM19 9h-4V3H9v6H5l7 7z"})),SplitPdfPanel=({file:e,downloadUrl:t,setDownloadUrl:i,params:a,updateParams:o})=>{const{t:l}=useTranslation();useSearchParams();const[u,f]=reactExports.useState(""),[h,p]=reactExports.useState(!1),[m,g]=reactExports.useState(null),{mode:b,pages:x,hDiv:y,vDiv:S,merge:E,splitType:w,splitValue:_,bookmarkLevel:O,includeMetadata:k,allowDuplicates:A}=a,D=async R=>{var P;if(R.preventDefault(),!e){f(l("noFileSelected"));return}const T=new FormData;T.append("fileInput",e.file);let j="";switch(b){case"byPages":T.append("pageNumbers",x),j="/api/v1/general/split-pages";break;case"bySections":T.append("horizontalDivisions",y),T.append("verticalDivisions",S),T.append("merge",E.toString()),j="/api/v1/general/split-pdf-by-sections";break;case"bySizeOrCount":T.append("splitType",w==="size"?"0":w==="pages"?"1":"2"),T.append("splitValue",_),j="/api/v1/general/split-by-size-or-count";break;case"byChapters":T.append("bookmarkLevel",O),T.append("includeMetadata",k.toString()),T.append("allowDuplicates",A.toString()),j="/api/v1/general/split-pdf-by-chapters";break;default:return}f(l("loading")),p(!0),g(null);try{const M=await axios.post(j,T,{responseType:"blob"}),I=new Blob([M.data],{type:"application/zip"}),G=window.URL.createObjectURL(I);i(G),f(l("downloadComplete"))}catch(M){console.error(M),g(((P=M.response)==null?void 0:P.data)||l("error.pdfPassword","An error occurred while splitting the PDF.")),f(l("error._value","Split failed."))}finally{p(!1)}};return jsxRuntimeExports.jsx("form",{onSubmit:D,children:jsxRuntimeExports.jsxs(Stack,{gap:"sm",mb:16,children:[jsxRuntimeExports.jsx(Select,{label:l("split-by-size-or-count.type.label","Split Mode"),value:b,onChange:R=>R&&o({mode:R}),data:[{value:"byPages",label:l("split.header","Split by Pages")+" (e.g. 1,3,5-10)"},{value:"bySections",label:l("split-by-sections.title","Split by Grid Sections")},{value:"bySizeOrCount",label:l("split-by-size-or-count.title","Split by Size or Count")},{value:"byChapters",label:l("splitByChapters.title","Split by Chapters")}]}),b==="byPages"&&jsxRuntimeExports.jsx(TextInput,{label:l("split.splitPages","Pages"),placeholder:l("pageSelectionPrompt","e.g. 1,3,5-10"),value:x,onChange:R=>o({pages:R.target.value})}),b==="bySections"&&jsxRuntimeExports.jsxs(Stack,{gap:"sm",children:[jsxRuntimeExports.jsx(TextInput,{label:l("split-by-sections.horizontal.label","Horizontal Divisions"),type:"number",min:"0",max:"300",value:y,onChange:R=>o({hDiv:R.target.value}),placeholder:l("split-by-sections.horizontal.placeholder","Enter number of horizontal divisions")}),jsxRuntimeExports.jsx(TextInput,{label:l("split-by-sections.vertical.label","Vertical Divisions"),type:"number",min:"0",max:"300",value:S,onChange:R=>o({vDiv:R.target.value}),placeholder:l("split-by-sections.vertical.placeholder","Enter number of vertical divisions")}),jsxRuntimeExports.jsx(Checkbox,{label:l("split-by-sections.merge","Merge sections into one PDF"),checked:E,onChange:R=>o({merge:R.currentTarget.checked})})]}),b==="bySizeOrCount"&&jsxRuntimeExports.jsxs(Stack,{gap:"sm",children:[jsxRuntimeExports.jsx(Select,{label:l("split-by-size-or-count.type.label","Split Type"),value:w,onChange:R=>R&&o({splitType:R}),data:[{value:"size",label:l("split-by-size-or-count.type.size","By Size")},{value:"pages",label:l("split-by-size-or-count.type.pageCount","By Page Count")},{value:"docs",label:l("split-by-size-or-count.type.docCount","By Document Count")}]}),jsxRuntimeExports.jsx(TextInput,{label:l("split-by-size-or-count.value.label","Split Value"),placeholder:l("split-by-size-or-count.value.placeholder","e.g. 10MB or 5 pages"),value:_,onChange:R=>o({splitValue:R.target.value})})]}),b==="byChapters"&&jsxRuntimeExports.jsxs(Stack,{gap:"sm",children:[jsxRuntimeExports.jsx(TextInput,{label:l("splitByChapters.bookmarkLevel","Bookmark Level"),type:"number",value:O,onChange:R=>o({bookmarkLevel:R.target.value})}),jsxRuntimeExports.jsx(Checkbox,{label:l("splitByChapters.includeMetadata","Include Metadata"),checked:k,onChange:R=>o({includeMetadata:R.currentTarget.checked})}),jsxRuntimeExports.jsx(Checkbox,{label:l("splitByChapters.allowDuplicates","Allow Duplicate Bookmarks"),checked:A,onChange:R=>o({allowDuplicates:R.currentTarget.checked})})]}),jsxRuntimeExports.jsx(Button,{type:"submit",loading:h,fullWidth:!0,children:h?l("loading"):l("split.submit","Split PDF")}),u&&jsxRuntimeExports.jsx("p",{className:"text-xs text-gray-600",children:u}),m&&jsxRuntimeExports.jsx(Notification,{color:"red",title:l("error._value","Error"),onClose:()=>g(null),children:m}),u===l("downloadComplete")&&t&&jsxRuntimeExports.jsx(Button,{component:"a",href:t,download:"split_output.zip",leftSection:jsxRuntimeExports.jsx(DownloadIcon,{}),color:"green",fullWidth:!0,children:l("downloadPdf","Download Split PDF")})]})})},CompressPdfPanel=({files:e=[],setDownloadUrl:t,setLoading:i})=>{const{t:a}=useTranslation();useSearchParams();const[o,l]=reactExports.useState(e.map(()=>!1)),[u,f]=reactExports.useState(5),[h,p]=reactExports.useState(!1),[m,g]=reactExports.useState(!1),[b,x]=reactExports.useState(""),[y,S]=reactExports.useState(!1),[E,w]=reactExports.useState(!1);React.useEffect(()=>{l(e.map(()=>!1))},[e]);const _=k=>{l(A=>A.map((D,R)=>R===k?!D:D))},O=async()=>{const k=e.filter((D,R)=>o[R]);if(k.length===0)return;w(!0),i==null||i(!0);const A=new FormData;k.forEach(D=>A.append("fileInput",D)),A.append("compressionLevel",u.toString()),A.append("grayscale",h.toString()),A.append("removeMetadata",m.toString()),A.append("aggressive",y.toString()),b&&A.append("expectedSize",b);try{const R=await(await fetch("/api/v1/general/compress-pdf",{method:"POST",body:A})).blob();t==null||t(URL.createObjectURL(R))}finally{w(!1),i==null||i(!1)}};return jsxRuntimeExports.jsxs(Stack,{children:[jsxRuntimeExports.jsx(Text,{fw:500,mb:4,children:a("multiPdfDropPrompt","Select files to compress:")}),jsxRuntimeExports.jsxs(Stack,{gap:4,children:[e.length===0&&jsxRuntimeExports.jsx(Text,{c:"dimmed",size:"sm",children:a("noFileSelected")}),e.map((k,A)=>jsxRuntimeExports.jsx(Checkbox,{label:k.name,checked:o[A]||!1,onChange:()=>_(A)},k.name+A))]}),jsxRuntimeExports.jsxs(Stack,{gap:4,mb:14,children:[jsxRuntimeExports.jsx(Text,{size:"sm",style:{minWidth:140},children:a("compress.selectText.2","Compression Level")}),jsxRuntimeExports.jsx(Slider,{min:1,max:9,step:1,value:u,onChange:f,marks:[{value:1,label:"1"},{value:5,label:"5"},{value:9,label:"9"}],style:{flex:1}})]}),jsxRuntimeExports.jsx(Checkbox,{label:a("compress.grayscale.label","Convert images to grayscale"),checked:h,onChange:k=>p(k.currentTarget.checked)}),jsxRuntimeExports.jsx(Checkbox,{label:a("removeMetadata.submit","Remove PDF metadata"),checked:m,onChange:k=>g(k.currentTarget.checked)}),jsxRuntimeExports.jsx(Checkbox,{label:a("compress.selectText.1.1","Aggressive compression (may reduce quality)"),checked:y,onChange:k=>S(k.currentTarget.checked)}),jsxRuntimeExports.jsx(TextInput,{label:a("compress.selectText.5","Expected output size"),placeholder:a("compress.selectText.5","e.g. 25MB, 10.8MB, 25KB"),value:b,onChange:k=>x(k.currentTarget.value)}),jsxRuntimeExports.jsxs(Button,{onClick:O,loading:E,disabled:o.every(k=>!k),fullWidth:!0,mt:"md",children:[a("compress.submit","Compress")," ",a("pdfPrompt","PDF"),o.filter(Boolean).length>1?"s":""]})]})},MergePdfPanel=({files:e,setDownloadUrl:t,params:i,updateParams:a})=>{const{t:o}=useTranslation();useSearchParams();const[l,u]=reactExports.useState([]),[f,h]=reactExports.useState(null),[p,m]=reactExports.useState(!1),[g,b]=reactExports.useState(null);reactExports.useEffect(()=>{u(e.map(()=>!0))},[e]);const x=async()=>{const _=e.filter((k,A)=>l[A]);if(_.length<2){b(o("multiPdfPrompt"));return}const O=new FormData;_.forEach(k=>O.append("fileInput",k)),m(!0),b(null);try{const k=await fetch("/api/v1/general/merge-pdfs",{method:"POST",body:O});if(!k.ok){const R=await k.text();throw new Error(`Failed to merge PDFs: ${R}`)}const A=await k.blob(),D=URL.createObjectURL(A);t(D),h(D)}catch(k){b(k.message||"Unknown error occurred.")}finally{m(!1)}},y=_=>{u(O=>O.map((k,A)=>A===_?!k:k))},S=l.filter(Boolean).length,{order:E,removeDuplicates:w}=i;return jsxRuntimeExports.jsxs(Stack,{children:[jsxRuntimeExports.jsx(Text,{fw:500,size:"lg",children:o("merge.header")}),jsxRuntimeExports.jsx(Stack,{gap:4,children:e.map((_,O)=>jsxRuntimeExports.jsxs(Group,{gap:"xs",children:[jsxRuntimeExports.jsx(Checkbox,{checked:l[O]||!1,onChange:()=>y(O)}),jsxRuntimeExports.jsx(Text,{size:"sm",children:_.name})]},O))}),S<2&&jsxRuntimeExports.jsx(Text,{size:"sm",c:"red",children:o("multiPdfPrompt")}),jsxRuntimeExports.jsx(Button,{onClick:x,loading:p,disabled:S<2||p,mt:"md",children:o("merge.submit")}),g&&jsxRuntimeExports.jsx(Alert,{color:"red",mt:"sm",children:g}),f&&jsxRuntimeExports.jsx(Button,{component:"a",href:f,download:"merged.pdf",color:"green",variant:"light",mt:"md",children:o("downloadPdf")}),jsxRuntimeExports.jsx(Checkbox,{label:o("merge.removeCertSign"),checked:w,onChange:()=>a({removeDuplicates:!w})})]})},UndoIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8"})),RedoIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M18.4 10.6C16.55 8.99 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16c1.05-3.19 4.05-5.5 7.6-5.5 1.95 0 3.73.72 5.12 1.88L13 16h9V7z"})),AddIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"})),RotateLeftIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M7.11 8.53 5.7 7.11C4.8 8.27 4.24 9.61 4.07 11h2.02c.14-.87.49-1.72 1.02-2.47M6.09 13H4.07c.17 1.39.72 2.73 1.62 3.89l1.41-1.42c-.52-.75-.87-1.59-1.01-2.47m1.01 5.32c1.16.9 2.51 1.44 3.9 1.61V17.9c-.87-.15-1.71-.49-2.46-1.03zM13 4.07V1L8.45 5.55 13 10V6.09c2.84.48 5 2.94 5 5.91s-2.16 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93s-3.05-7.44-7-7.93"})),RotateRightIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M15.55 5.55 11 1v3.07C7.06 4.56 4 7.92 4 12s3.05 7.44 7 7.93v-2.02c-2.84-.48-5-2.94-5-5.91s2.16-5.43 5-5.91V10zM19.93 11c-.17-1.39-.72-2.73-1.62-3.89l-1.42 1.42c.54.75.88 1.6 1.02 2.47zM13 17.9v2.02c1.39-.17 2.74-.71 3.9-1.61l-1.44-1.44c-.75.54-1.59.89-2.46 1.03m3.89-2.42 1.42 1.41c.9-1.16 1.45-2.5 1.62-3.89h-2.02c-.14.87-.48 1.72-1.02 2.48"})),DeleteIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"})),ArrowBackIosNewIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M17.77 3.77 16 2 6 12l10 10 1.77-1.77L9.54 12z"})),ArrowForwardIosIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M6.23 20.23 8 22l10-10L8 2 6.23 3.77 14.46 12z"})),DUMMY_PAGE_COUNT=8,PageEditor=({file:e,setFile:t,downloadUrl:i,setDownloadUrl:a})=>{const{t:o}=useTranslation(),[l,u]=reactExports.useState([]),[f,h]=reactExports.useState(null),[p,m]=reactExports.useState(!1),[g,b]=reactExports.useState([]),[x,y]=reactExports.useState([]),S=Array.from({length:DUMMY_PAGE_COUNT},(G,ne)=>ne+1),E=()=>u(S),w=()=>u([]),_=G=>u(ne=>ne.includes(G)?ne.filter(Q=>Q!==G):[...ne,G]),O=()=>{g.length>0&&(y([l,...x]),u(g[0]),b(g.slice(1)))},k=()=>{x.length>0&&(b([l,...g]),u(x[0]),y(x.slice(1)))},A=()=>h(o("pageEditor.rotatedLeft","Rotated left: ")+l.join(", ")),D=()=>h(o("pageEditor.rotatedRight","Rotated right: ")+l.join(", ")),R=()=>h(o("pageEditor.deleted","Deleted: ")+l.join(", ")),T=()=>h(o("pageEditor.movedLeft","Moved left: ")+l.join(", ")),j=()=>h(o("pageEditor.movedRight","Moved right: ")+l.join(", ")),P=()=>h(o("pageEditor.splitAt","Split at: ")+l.join(", ")),M=()=>h(o("pageEditor.insertedPageBreak","Inserted page break at: ")+l.join(", ")),I=()=>h(o("pageEditor.addFileNotImplemented","Add file not implemented in demo"));return e?jsxRuntimeExports.jsxs(Paper,{shadow:"xs",radius:"md",p:"md",children:[jsxRuntimeExports.jsxs(Group,{align:"flex-start",gap:"lg",children:[jsxRuntimeExports.jsxs(Stack,{w:180,gap:"xs",children:[jsxRuntimeExports.jsx(Text,{fw:600,size:"lg",children:o("pageEditor.title","PDF Multitool")}),jsxRuntimeExports.jsx(Button,{onClick:E,fullWidth:!0,variant:"light",children:o("multiTool.selectAll","Select All")}),jsxRuntimeExports.jsx(Button,{onClick:w,fullWidth:!0,variant:"light",children:o("multiTool.deselectAll","Deselect All")}),jsxRuntimeExports.jsx(Button,{onClick:O,leftSection:jsxRuntimeExports.jsx(UndoIcon,{fontSize:"small"}),fullWidth:!0,disabled:g.length===0,children:o("multiTool.undo","Undo")}),jsxRuntimeExports.jsx(Button,{onClick:k,leftSection:jsxRuntimeExports.jsx(RedoIcon,{fontSize:"small"}),fullWidth:!0,disabled:x.length===0,children:o("multiTool.redo","Redo")}),jsxRuntimeExports.jsx(Button,{onClick:I,leftSection:jsxRuntimeExports.jsx(AddIcon,{fontSize:"small"}),fullWidth:!0,children:o("multiTool.addFile","Add File")}),jsxRuntimeExports.jsx(Button,{onClick:M,leftSection:jsxRuntimeExports.jsx(ContentCutIcon,{fontSize:"small"}),fullWidth:!0,children:o("multiTool.insertPageBreak","Insert Page Break")}),jsxRuntimeExports.jsx(Button,{onClick:P,leftSection:jsxRuntimeExports.jsx(ContentCutIcon,{fontSize:"small"}),fullWidth:!0,children:o("multiTool.split","Split")}),jsxRuntimeExports.jsx(Button,{component:"a",href:i||"#",download:"edited.pdf",leftSection:jsxRuntimeExports.jsx(DownloadIcon,{fontSize:"small"}),fullWidth:!0,color:"green",variant:"light",disabled:!i,children:o("multiTool.downloadAll","Download All")}),jsxRuntimeExports.jsx(Button,{component:"a",href:i||"#",download:"selected.pdf",leftSection:jsxRuntimeExports.jsx(DownloadIcon,{fontSize:"small"}),fullWidth:!0,color:"blue",variant:"light",disabled:!i||l.length===0,children:o("multiTool.downloadSelected","Download Selected")}),jsxRuntimeExports.jsx(Button,{color:"red",variant:"light",onClick:()=>t&&t(null),fullWidth:!0,children:o("pageEditor.closePdf","Close PDF")})]}),jsxRuntimeExports.jsxs(Box,{style:{flex:1},children:[jsxRuntimeExports.jsxs(Group,{mb:"sm",children:[jsxRuntimeExports.jsx(Tooltip,{label:o("multiTool.rotateLeft","Rotate Left"),children:jsxRuntimeExports.jsx(ActionIcon,{onClick:A,disabled:l.length===0,color:"blue",variant:"light",children:jsxRuntimeExports.jsx(RotateLeftIcon,{})})}),jsxRuntimeExports.jsx(Tooltip,{label:o("multiTool.rotateRight","Rotate Right"),children:jsxRuntimeExports.jsx(ActionIcon,{onClick:D,disabled:l.length===0,color:"blue",variant:"light",children:jsxRuntimeExports.jsx(RotateRightIcon,{})})}),jsxRuntimeExports.jsx(Tooltip,{label:o("delete","Delete"),children:jsxRuntimeExports.jsx(ActionIcon,{onClick:R,disabled:l.length===0,color:"red",variant:"light",children:jsxRuntimeExports.jsx(DeleteIcon,{})})}),jsxRuntimeExports.jsx(Tooltip,{label:o("multiTool.moveLeft","Move Left"),children:jsxRuntimeExports.jsx(ActionIcon,{onClick:T,disabled:l.length===0,color:"gray",variant:"light",children:jsxRuntimeExports.jsx(ArrowBackIosNewIcon,{})})}),jsxRuntimeExports.jsx(Tooltip,{label:o("multiTool.moveRight","Move Right"),children:jsxRuntimeExports.jsx(ActionIcon,{onClick:j,disabled:l.length===0,color:"gray",variant:"light",children:jsxRuntimeExports.jsx(ArrowForwardIosIcon,{})})})]}),jsxRuntimeExports.jsx(ScrollArea,{h:350,children:jsxRuntimeExports.jsx(Group,{children:S.map(G=>jsxRuntimeExports.jsxs(Stack,{align:"center",gap:2,children:[jsxRuntimeExports.jsx(Checkbox,{checked:l.includes(G),onChange:()=>_(G),label:o("page","Page")+` ${G}`}),jsxRuntimeExports.jsx(Box,{w:60,h:80,bg:l.includes(G)?"blue.1":"gray.1",style:{border:"1px solid #ccc",borderRadius:4},children:jsxRuntimeExports.jsx(Center,{h:"100%",children:jsxRuntimeExports.jsx(Text,{size:"xs",color:"dimmed",children:G})})})]},G))})})]})]}),f&&jsxRuntimeExports.jsx(Notification,{color:"blue",mt:"md",onClose:()=>h(null),children:f})]}):jsxRuntimeExports.jsx(Paper,{shadow:"xs",radius:"md",p:"md",children:jsxRuntimeExports.jsx(Center,{children:jsxRuntimeExports.jsx(Text,{color:"dimmed",children:o("pageEditor.noPdfLoaded","No PDF loaded. Please upload a PDF to edit.")})})})},FirstPageIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M18.41 16.59 13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"})),LastPageIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M5.59 7.41 10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"})),ViewSidebarIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M16 20H2V4h14zm2-12h4V4h-4zm0 12h4v-4h-4zm0-6h4v-4h-4z"})),ViewWeekIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M5.33 20H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2h1.33c1.1 0 2 .9 2 2v12c0 1.1-.89 2-2 2M22 18V6c0-1.1-.9-2-2-2h-1.33c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2H20c1.11 0 2-.9 2-2m-7.33 0V6c0-1.1-.9-2-2-2h-1.33c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h1.33c1.1 0 2-.9 2-2"})),DescriptionIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8zm2 16H8v-2h8zm0-4H8v-2h8zm-3-5V3.5L18.5 9z"}));pdfExports.GlobalWorkerOptions.workerSrc="/pdf.worker.js";const Viewer=({pdfFile:e,setPdfFile:t,sidebarsVisible:i,setSidebarsVisible:a})=>{const{t:o}=useTranslation(),l=useMantineTheme(),[u,f]=reactExports.useState(0),[h,p]=reactExports.useState([]),[m,g]=reactExports.useState(!1),[b,x]=reactExports.useState(null),[y,S]=reactExports.useState(!1),[E,w]=reactExports.useState(1),_=reactExports.useRef([]),O=reactExports.useRef(null),k=reactExports.useRef(!1),A=reactExports.useRef(!1);reactExports.useEffect(()=>{function R(){if(window.location.hash.startsWith("#page=")){const T=parseInt(window.location.hash.replace("#page=",""),10);!isNaN(T)&&T>=1&&T<=u&&x(T)}k.current=!1}return window.addEventListener("hashchange",R),R(),()=>window.removeEventListener("hashchange",R)},[u]),reactExports.useEffect(()=>{if(b&&_.current[b-1]){A.current=!0;const R=_.current[b-1];R==null||R.scrollIntoView({behavior:"smooth",block:"center"});const T=O.current;let j=null,P=null;return T&&"onscrollend"in T?(P=()=>{A.current=!1,T.removeEventListener("scrollend",P)},T.addEventListener("scrollend",P)):j=setTimeout(()=>{A.current=!1},1e3),()=>{T&&P&&T.removeEventListener("scrollend",P),j&&clearTimeout(j)}}},[b,h]);const D=()=>{if(A.current)return;const R=O.current;if(!R||!_.current.length)return;const T=R.getBoundingClientRect();let j=0,P=1/0;_.current.forEach((M,I)=>{if(M){const G=M.getBoundingClientRect(),ne=Math.abs(G.top-T.top);ne<P&&(P=ne,j=I)}}),b!==j+1&&(x(j+1),window.location.hash!==`#page=${j+1}`&&(window.location.hash=`#page=${j+1}`))};return reactExports.useEffect(()=>{let R=!1;async function T(){if(!e||!e.url){f(0),p([]);return}g(!0);try{const j=await pdfExports.getDocument(e.url).promise;f(j.numPages);const P=[];for(let M=1;M<=j.numPages;M++){const I=await j.getPage(M),G=I.getViewport({scale:1.2}),ne=document.createElement("canvas");ne.width=G.width,ne.height=G.height;const Q=ne.getContext("2d");Q&&(await I.render({canvasContext:Q,viewport:G}).promise,P.push(ne.toDataURL()))}R||p(P)}catch{R||p([])}R||g(!1)}return T(),()=>{R=!0}},[e]),reactExports.useEffect(()=>{const R=O.current;if(!R)return;const T=()=>{D()};return R.addEventListener("scroll",T),()=>R.removeEventListener("scroll",T)},[h]),jsxRuntimeExports.jsx(Paper,{shadow:"xs",radius:"md",style:{height:"100vh",display:"flex",flexDirection:"column",position:"relative"},children:e?m?jsxRuntimeExports.jsx(Center,{style:{flex:1},children:jsxRuntimeExports.jsx(Loader,{size:"lg"})}):jsxRuntimeExports.jsxs(ScrollArea,{style:{flex:1,height:"100%",position:"relative"},viewportRef:O,children:[jsxRuntimeExports.jsxs(Stack,{gap:"xl",align:"center",children:[h.length===0&&jsxRuntimeExports.jsx(Text,{color:"dimmed",children:o("viewer.noPagesToDisplay","No pages to display.")}),y?Array.from({length:Math.ceil(h.length/2)}).map((R,T)=>jsxRuntimeExports.jsxs(Group,{gap:"md",align:"flex-start",style:{width:"100%",justifyContent:"center"},children:[jsxRuntimeExports.jsx("img",{ref:j=>{_.current[T*2]=j},src:h[T*2],alt:`Page ${T*2+1}`,style:{width:`${100*E}%`,maxWidth:700*E,boxShadow:"0 2px 8px rgba(0,0,0,0.08)",borderRadius:8,marginTop:T===0?l.spacing.xl:0}}),h[T*2+1]&&jsxRuntimeExports.jsx("img",{ref:j=>{_.current[T*2+1]=j},src:h[T*2+1],alt:`Page ${T*2+2}`,style:{width:`${100*E}%`,maxWidth:700*E,boxShadow:"0 2px 8px rgba(0,0,0,0.08)",borderRadius:8,marginTop:T===0?l.spacing.xl:0}})]},T)):h.map((R,T)=>jsxRuntimeExports.jsx("img",{ref:j=>{_.current[T]=j},src:R,alt:`Page ${T+1}`,style:{width:`${100*E}%`,maxWidth:700*E,boxShadow:"0 2px 8px rgba(0,0,0,0.08)",borderRadius:8,marginTop:T===0?l.spacing.xl:0}},T))]}),jsxRuntimeExports.jsx("div",{style:{position:"absolute",left:0,right:0,bottom:0,zIndex:50,display:"flex",justifyContent:"center",pointerEvents:"none",background:"transparent"},children:jsxRuntimeExports.jsxs(Paper,{radius:"xl xl 0 0",shadow:"sm",p:12,style:{display:"flex",alignItems:"center",gap:10,borderTopLeftRadius:16,borderTopRightRadius:16,borderBottomLeftRadius:0,borderBottomRightRadius:0,boxShadow:"0 -2px 8px rgba(0,0,0,0.04)",pointerEvents:"auto",minWidth:420,maxWidth:700,flexWrap:"wrap"},children:[jsxRuntimeExports.jsx(Button,{variant:"subtle",color:"blue",size:"md",px:8,radius:"xl",onClick:()=>{window.location.hash="#page=1"},disabled:b===1,style:{minWidth:36},children:jsxRuntimeExports.jsx(FirstPageIcon,{fontSize:"small"})}),jsxRuntimeExports.jsx(Button,{variant:"subtle",color:"blue",size:"md",px:8,radius:"xl",onClick:()=>{window.location.hash=`#page=${Math.max(1,(b||1)-1)}`},disabled:b===1,style:{minWidth:36},children:jsxRuntimeExports.jsx(ArrowBackIosNewIcon,{fontSize:"small"})}),jsxRuntimeExports.jsx(NumberInput,{value:b||1,onChange:R=>{const T=Number(R);!isNaN(T)&&T>=1&&T<=u&&(window.location.hash=`#page=${T}`)},min:1,max:u,hideControls:!0,styles:{input:{width:48,textAlign:"center",fontWeight:500,fontSize:16}}}),jsxRuntimeExports.jsxs("span",{style:{fontWeight:500,fontSize:16},children:["/ ",u]}),jsxRuntimeExports.jsx(Button,{variant:"subtle",color:"blue",size:"md",px:8,radius:"xl",onClick:()=>{window.location.hash=`#page=${Math.min(u,(b||1)+1)}`},disabled:b===u,style:{minWidth:36},children:jsxRuntimeExports.jsx(ArrowForwardIosIcon,{fontSize:"small"})}),jsxRuntimeExports.jsx(Button,{variant:"subtle",color:"blue",size:"md",px:8,radius:"xl",onClick:()=>{window.location.hash=`#page=${u}`},disabled:b===u,style:{minWidth:36},children:jsxRuntimeExports.jsx(LastPageIcon,{fontSize:"small"})}),jsxRuntimeExports.jsx(Button,{variant:y?"filled":"light",color:"blue",size:"md",radius:"xl",onClick:()=>S(R=>!R),style:{minWidth:36},title:y?o("viewer.singlePageView","Single Page View"):o("viewer.dualPageView","Dual Page View"),children:y?jsxRuntimeExports.jsx(DescriptionIcon,{fontSize:"small"}):jsxRuntimeExports.jsx(ViewWeekIcon,{fontSize:"small"})}),jsxRuntimeExports.jsx(Button,{variant:"subtle",color:"blue",size:"md",radius:"xl",onClick:()=>a(!i),style:{minWidth:36},title:i?o("viewer.hideSidebars","Hide Sidebars"):o("viewer.showSidebars","Show Sidebars"),children:jsxRuntimeExports.jsx(ViewSidebarIcon,{fontSize:"small",style:{transform:i?"none":"scaleX(-1)",transition:"transform 0.2s"}})}),jsxRuntimeExports.jsxs(Group,{gap:4,align:"center",style:{marginLeft:16},children:[jsxRuntimeExports.jsx(Button,{variant:"subtle",color:"blue",size:"md",radius:"xl",onClick:()=>w(R=>Math.max(.1,R-.1)),style:{minWidth:32,padding:0},title:o("viewer.zoomOut","Zoom out"),children:"−"}),jsxRuntimeExports.jsxs("span",{style:{minWidth:40,textAlign:"center"},children:[Math.round(E*100),"%"]}),jsxRuntimeExports.jsx(Button,{variant:"subtle",color:"blue",size:"md",radius:"xl",onClick:()=>w(R=>Math.min(5,R+.1)),style:{minWidth:32,padding:0},title:o("viewer.zoomIn","Zoom in"),children:"+"})]})]})})]}):jsxRuntimeExports.jsx(Center,{style:{flex:1},children:jsxRuntimeExports.jsxs(Stack,{align:"center",children:[jsxRuntimeExports.jsx(Text,{c:"dimmed",children:o("viewer.noPdfLoaded","No PDF loaded. Click to upload a PDF.")}),jsxRuntimeExports.jsxs(Button,{component:"label",variant:"outline",color:"blue",children:[o("viewer.choosePdf","Choose PDF"),jsxRuntimeExports.jsx("input",{type:"file",accept:"application/pdf",hidden:!0,onChange:R=>{var j;const T=(j=R.target.files)==null?void 0:j[0];if(T&&T.type==="application/pdf"){const P=URL.createObjectURL(T);t({file:T,url:P})}}})]})]})})})},isString=e=>typeof e=="string",defer=()=>{let e,t;const i=new Promise((a,o)=>{e=a,t=o});return i.resolve=e,i.reject=t,i},makeString=e=>e==null?"":""+e,copy=(e,t,i)=>{e.forEach(a=>{t[a]&&(i[a]=t[a])})},lastOfPathSeparatorRegExp=/###/g,cleanKey=e=>e&&e.indexOf("###")>-1?e.replace(lastOfPathSeparatorRegExp,"."):e,canNotTraverseDeeper=e=>!e||isString(e),getLastOfPath=(e,t,i)=>{const a=isString(t)?t.split("."):t;let o=0;for(;o<a.length-1;){if(canNotTraverseDeeper(e))return{};const l=cleanKey(a[o]);!e[l]&&i&&(e[l]=new i),Object.prototype.hasOwnProperty.call(e,l)?e=e[l]:e={},++o}return canNotTraverseDeeper(e)?{}:{obj:e,k:cleanKey(a[o])}},setPath=(e,t,i)=>{const{obj:a,k:o}=getLastOfPath(e,t,Object);if(a!==void 0||t.length===1){a[o]=i;return}let l=t[t.length-1],u=t.slice(0,t.length-1),f=getLastOfPath(e,u,Object);for(;f.obj===void 0&&u.length;)l=`${u[u.length-1]}.${l}`,u=u.slice(0,u.length-1),f=getLastOfPath(e,u,Object),f!=null&&f.obj&&typeof f.obj[`${f.k}.${l}`]<"u"&&(f.obj=void 0);f.obj[`${f.k}.${l}`]=i},pushPath=(e,t,i,a)=>{const{obj:o,k:l}=getLastOfPath(e,t,Object);o[l]=o[l]||[],o[l].push(i)},getPath=(e,t)=>{const{obj:i,k:a}=getLastOfPath(e,t);if(i&&Object.prototype.hasOwnProperty.call(i,a))return i[a]},getPathWithDefaults=(e,t,i)=>{const a=getPath(e,i);return a!==void 0?a:getPath(t,i)},deepExtend=(e,t,i)=>{for(const a in t)a!=="__proto__"&&a!=="constructor"&&(a in e?isString(e[a])||e[a]instanceof String||isString(t[a])||t[a]instanceof String?i&&(e[a]=t[a]):deepExtend(e[a],t[a],i):e[a]=t[a]);return e},regexEscape=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var _entityMap={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const escape$1=e=>isString(e)?e.replace(/[&<>"'\/]/g,t=>_entityMap[t]):e;class RegExpCache{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const i=this.regExpMap.get(t);if(i!==void 0)return i;const a=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,a),this.regExpQueue.push(t),a}}const chars=[" ",",","?","!",";"],looksLikeObjectPathRegExpCache=new RegExpCache(20),looksLikeObjectPath=(e,t,i)=>{t=t||"",i=i||"";const a=chars.filter(u=>t.indexOf(u)<0&&i.indexOf(u)<0);if(a.length===0)return!0;const o=looksLikeObjectPathRegExpCache.getRegExp(`(${a.map(u=>u==="?"?"\\?":u).join("|")})`);let l=!o.test(e);if(!l){const u=e.indexOf(i);u>0&&!o.test(e.substring(0,u))&&(l=!0)}return l},deepFind=(e,t,i=".")=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const a=t.split(i);let o=e;for(let l=0;l<a.length;){if(!o||typeof o!="object")return;let u,f="";for(let h=l;h<a.length;++h)if(h!==l&&(f+=i),f+=a[h],u=o[f],u!==void 0){if(["string","number","boolean"].indexOf(typeof u)>-1&&h<a.length-1)continue;l+=h-l+1;break}o=u}return o},getCleanedCode=e=>e==null?void 0:e.replace("_","-"),consoleLogger={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){var i,a;(a=(i=console==null?void 0:console[e])==null?void 0:i.apply)==null||a.call(i,console,t)}};class Logger{constructor(t,i={}){this.init(t,i)}init(t,i={}){this.prefix=i.prefix||"i18next:",this.logger=t||consoleLogger,this.options=i,this.debug=i.debug}log(...t){return this.forward(t,"log","",!0)}warn(...t){return this.forward(t,"warn","",!0)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(t,i,a,o){return o&&!this.debug?null:(isString(t[0])&&(t[0]=`${a}${this.prefix} ${t[0]}`),this.logger[i](t))}create(t){return new Logger(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new Logger(this.logger,t)}}var baseLogger=new Logger;class EventEmitter{constructor(){this.observers={}}on(t,i){return t.split(" ").forEach(a=>{this.observers[a]||(this.observers[a]=new Map);const o=this.observers[a].get(i)||0;this.observers[a].set(i,o+1)}),this}off(t,i){if(this.observers[t]){if(!i){delete this.observers[t];return}this.observers[t].delete(i)}}emit(t,...i){this.observers[t]&&Array.from(this.observers[t].entries()).forEach(([o,l])=>{for(let u=0;u<l;u++)o(...i)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([o,l])=>{for(let u=0;u<l;u++)o.apply(o,[t,...i])})}}class ResourceStore extends EventEmitter{constructor(t,i={ns:["translation"],defaultNS:"translation"}){super(),this.data=t||{},this.options=i,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const i=this.options.ns.indexOf(t);i>-1&&this.options.ns.splice(i,1)}getResource(t,i,a,o={}){var p,m;const l=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,u=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let f;t.indexOf(".")>-1?f=t.split("."):(f=[t,i],a&&(Array.isArray(a)?f.push(...a):isString(a)&&l?f.push(...a.split(l)):f.push(a)));const h=getPath(this.data,f);return!h&&!i&&!a&&t.indexOf(".")>-1&&(t=f[0],i=f[1],a=f.slice(2).join(".")),h||!u||!isString(a)?h:deepFind((m=(p=this.data)==null?void 0:p[t])==null?void 0:m[i],a,l)}addResource(t,i,a,o,l={silent:!1}){const u=l.keySeparator!==void 0?l.keySeparator:this.options.keySeparator;let f=[t,i];a&&(f=f.concat(u?a.split(u):a)),t.indexOf(".")>-1&&(f=t.split("."),o=i,i=f[1]),this.addNamespaces(i),setPath(this.data,f,o),l.silent||this.emit("added",t,i,a,o)}addResources(t,i,a,o={silent:!1}){for(const l in a)(isString(a[l])||Array.isArray(a[l]))&&this.addResource(t,i,l,a[l],{silent:!0});o.silent||this.emit("added",t,i,a)}addResourceBundle(t,i,a,o,l,u={silent:!1,skipCopy:!1}){let f=[t,i];t.indexOf(".")>-1&&(f=t.split("."),o=a,a=i,i=f[1]),this.addNamespaces(i);let h=getPath(this.data,f)||{};u.skipCopy||(a=JSON.parse(JSON.stringify(a))),o?deepExtend(h,a,l):h={...h,...a},setPath(this.data,f,h),u.silent||this.emit("added",t,i,a)}removeResourceBundle(t,i){this.hasResourceBundle(t,i)&&delete this.data[t][i],this.removeNamespaces(i),this.emit("removed",t,i)}hasResourceBundle(t,i){return this.getResource(t,i)!==void 0}getResourceBundle(t,i){return i||(i=this.options.defaultNS),this.getResource(t,i)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const i=this.getDataByLanguage(t);return!!(i&&Object.keys(i)||[]).find(o=>i[o]&&Object.keys(i[o]).length>0)}toJSON(){return this.data}}var postProcessor={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,i,a,o){return e.forEach(l=>{var u;t=((u=this.processors[l])==null?void 0:u.process(t,i,a,o))??t}),t}};const checkedLoadedFor={},shouldHandleAsObject=e=>!isString(e)&&typeof e!="boolean"&&typeof e!="number";class Translator extends EventEmitter{constructor(t,i={}){super(),copy(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=i,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=baseLogger.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t,i={interpolation:{}}){const a={...i};if(t==null)return!1;const o=this.resolve(t,a);return(o==null?void 0:o.res)!==void 0}extractFromKey(t,i){let a=i.nsSeparator!==void 0?i.nsSeparator:this.options.nsSeparator;a===void 0&&(a=":");const o=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator;let l=i.ns||this.options.defaultNS||[];const u=a&&t.indexOf(a)>-1,f=!this.options.userDefinedKeySeparator&&!i.keySeparator&&!this.options.userDefinedNsSeparator&&!i.nsSeparator&&!looksLikeObjectPath(t,a,o);if(u&&!f){const h=t.match(this.interpolator.nestingRegexp);if(h&&h.length>0)return{key:t,namespaces:isString(l)?[l]:l};const p=t.split(a);(a!==o||a===o&&this.options.ns.indexOf(p[0])>-1)&&(l=p.shift()),t=p.join(o)}return{key:t,namespaces:isString(l)?[l]:l}}translate(t,i,a){let o=typeof i=="object"?{...i}:i;if(typeof o!="object"&&this.options.overloadTranslationOptionHandler&&(o=this.options.overloadTranslationOptionHandler(arguments)),typeof options=="object"&&(o={...o}),o||(o={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const l=o.returnDetails!==void 0?o.returnDetails:this.options.returnDetails,u=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,{key:f,namespaces:h}=this.extractFromKey(t[t.length-1],o),p=h[h.length-1];let m=o.nsSeparator!==void 0?o.nsSeparator:this.options.nsSeparator;m===void 0&&(m=":");const g=o.lng||this.language,b=o.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((g==null?void 0:g.toLowerCase())==="cimode")return b?l?{res:`${p}${m}${f}`,usedKey:f,exactUsedKey:f,usedLng:g,usedNS:p,usedParams:this.getUsedParamsDetails(o)}:`${p}${m}${f}`:l?{res:f,usedKey:f,exactUsedKey:f,usedLng:g,usedNS:p,usedParams:this.getUsedParamsDetails(o)}:f;const x=this.resolve(t,o);let y=x==null?void 0:x.res;const S=(x==null?void 0:x.usedKey)||f,E=(x==null?void 0:x.exactUsedKey)||f,w=["[object Number]","[object Function]","[object RegExp]"],_=o.joinArrays!==void 0?o.joinArrays:this.options.joinArrays,O=!this.i18nFormat||this.i18nFormat.handleAsObject,k=o.count!==void 0&&!isString(o.count),A=Translator.hasDefaultValue(o),D=k?this.pluralResolver.getSuffix(g,o.count,o):"",R=o.ordinal&&k?this.pluralResolver.getSuffix(g,o.count,{ordinal:!1}):"",T=k&&!o.ordinal&&o.count===0,j=T&&o[`defaultValue${this.options.pluralSeparator}zero`]||o[`defaultValue${D}`]||o[`defaultValue${R}`]||o.defaultValue;let P=y;O&&!y&&A&&(P=j);const M=shouldHandleAsObject(P),I=Object.prototype.toString.apply(P);if(O&&P&&M&&w.indexOf(I)<0&&!(isString(_)&&Array.isArray(P))){if(!o.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const G=this.options.returnedObjectHandler?this.options.returnedObjectHandler(S,P,{...o,ns:h}):`key '${f} (${this.language})' returned an object instead of string.`;return l?(x.res=G,x.usedParams=this.getUsedParamsDetails(o),x):G}if(u){const G=Array.isArray(P),ne=G?[]:{},Q=G?E:S;for(const B in P)if(Object.prototype.hasOwnProperty.call(P,B)){const H=`${Q}${u}${B}`;A&&!y?ne[B]=this.translate(H,{...o,defaultValue:shouldHandleAsObject(j)?j[B]:void 0,joinArrays:!1,ns:h}):ne[B]=this.translate(H,{...o,joinArrays:!1,ns:h}),ne[B]===H&&(ne[B]=P[B])}y=ne}}else if(O&&isString(_)&&Array.isArray(y))y=y.join(_),y&&(y=this.extendTranslation(y,t,o,a));else{let G=!1,ne=!1;!this.isValidLookup(y)&&A&&(G=!0,y=j),this.isValidLookup(y)||(ne=!0,y=f);const B=(o.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&ne?void 0:y,H=A&&j!==y&&this.options.updateMissing;if(ne||G||H){if(this.logger.log(H?"updateKey":"missingKey",g,p,f,H?j:y),u){const X=this.resolve(f,{...o,keySeparator:!1});X&&X.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let Y=[];const U=this.languageUtils.getFallbackCodes(this.options.fallbackLng,o.lng||this.language);if(this.options.saveMissingTo==="fallback"&&U&&U[0])for(let X=0;X<U.length;X++)Y.push(U[X]);else this.options.saveMissingTo==="all"?Y=this.languageUtils.toResolveHierarchy(o.lng||this.language):Y.push(o.lng||this.language);const F=(X,z,L)=>{var V;const $=A&&L!==y?L:B;this.options.missingKeyHandler?this.options.missingKeyHandler(X,p,z,$,H,o):(V=this.backendConnector)!=null&&V.saveMissing&&this.backendConnector.saveMissing(X,p,z,$,H,o),this.emit("missingKey",X,p,z,y)};this.options.saveMissing&&(this.options.saveMissingPlurals&&k?Y.forEach(X=>{const z=this.pluralResolver.getSuffixes(X,o);T&&o[`defaultValue${this.options.pluralSeparator}zero`]&&z.indexOf(`${this.options.pluralSeparator}zero`)<0&&z.push(`${this.options.pluralSeparator}zero`),z.forEach(L=>{F([X],f+L,o[`defaultValue${L}`]||j)})}):F(Y,f,j))}y=this.extendTranslation(y,t,o,x,a),ne&&y===f&&this.options.appendNamespaceToMissingKey&&(y=`${p}${m}${f}`),(ne||G)&&this.options.parseMissingKeyHandler&&(y=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${p}${m}${f}`:f,G?y:void 0,o))}return l?(x.res=y,x.usedParams=this.getUsedParamsDetails(o),x):y}extendTranslation(t,i,a,o,l){var h,p;if((h=this.i18nFormat)!=null&&h.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...a},a.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!a.skipInterpolation){a.interpolation&&this.interpolator.init({...a,interpolation:{...this.options.interpolation,...a.interpolation}});const m=isString(t)&&(((p=a==null?void 0:a.interpolation)==null?void 0:p.skipOnVariables)!==void 0?a.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let g;if(m){const x=t.match(this.interpolator.nestingRegexp);g=x&&x.length}let b=a.replace&&!isString(a.replace)?a.replace:a;if(this.options.interpolation.defaultVariables&&(b={...this.options.interpolation.defaultVariables,...b}),t=this.interpolator.interpolate(t,b,a.lng||this.language||o.usedLng,a),m){const x=t.match(this.interpolator.nestingRegexp),y=x&&x.length;g<y&&(a.nest=!1)}!a.lng&&o&&o.res&&(a.lng=this.language||o.usedLng),a.nest!==!1&&(t=this.interpolator.nest(t,(...x)=>(l==null?void 0:l[0])===x[0]&&!a.context?(this.logger.warn(`It seems you are nesting recursively key: ${x[0]} in key: ${i[0]}`),null):this.translate(...x,i),a)),a.interpolation&&this.interpolator.reset()}const u=a.postProcess||this.options.postProcess,f=isString(u)?[u]:u;return t!=null&&(f!=null&&f.length)&&a.applyPostProcessor!==!1&&(t=postProcessor.handle(f,t,i,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...o,usedParams:this.getUsedParamsDetails(a)},...a}:a,this)),t}resolve(t,i={}){let a,o,l,u,f;return isString(t)&&(t=[t]),t.forEach(h=>{if(this.isValidLookup(a))return;const p=this.extractFromKey(h,i),m=p.key;o=m;let g=p.namespaces;this.options.fallbackNS&&(g=g.concat(this.options.fallbackNS));const b=i.count!==void 0&&!isString(i.count),x=b&&!i.ordinal&&i.count===0,y=i.context!==void 0&&(isString(i.context)||typeof i.context=="number")&&i.context!=="",S=i.lngs?i.lngs:this.languageUtils.toResolveHierarchy(i.lng||this.language,i.fallbackLng);g.forEach(E=>{var w,_;this.isValidLookup(a)||(f=E,!checkedLoadedFor[`${S[0]}-${E}`]&&((w=this.utils)!=null&&w.hasLoadedNamespace)&&!((_=this.utils)!=null&&_.hasLoadedNamespace(f))&&(checkedLoadedFor[`${S[0]}-${E}`]=!0,this.logger.warn(`key "${o}" for languages "${S.join(", ")}" won't get resolved as namespace "${f}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),S.forEach(O=>{var D;if(this.isValidLookup(a))return;u=O;const k=[m];if((D=this.i18nFormat)!=null&&D.addLookupKeys)this.i18nFormat.addLookupKeys(k,m,O,E,i);else{let R;b&&(R=this.pluralResolver.getSuffix(O,i.count,i));const T=`${this.options.pluralSeparator}zero`,j=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(b&&(k.push(m+R),i.ordinal&&R.indexOf(j)===0&&k.push(m+R.replace(j,this.options.pluralSeparator)),x&&k.push(m+T)),y){const P=`${m}${this.options.contextSeparator}${i.context}`;k.push(P),b&&(k.push(P+R),i.ordinal&&R.indexOf(j)===0&&k.push(P+R.replace(j,this.options.pluralSeparator)),x&&k.push(P+T))}}let A;for(;A=k.pop();)this.isValidLookup(a)||(l=A,a=this.getResource(O,E,A,i))}))})}),{res:a,usedKey:o,exactUsedKey:l,usedLng:u,usedNS:f}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,i,a,o={}){var l;return(l=this.i18nFormat)!=null&&l.getResource?this.i18nFormat.getResource(t,i,a,o):this.resourceStore.getResource(t,i,a,o)}getUsedParamsDetails(t={}){const i=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],a=t.replace&&!isString(t.replace);let o=a?t.replace:t;if(a&&typeof t.count<"u"&&(o.count=t.count),this.options.interpolation.defaultVariables&&(o={...this.options.interpolation.defaultVariables,...o}),!a){o={...o};for(const l of i)delete o[l]}return o}static hasDefaultValue(t){const i="defaultValue";for(const a in t)if(Object.prototype.hasOwnProperty.call(t,a)&&i===a.substring(0,i.length)&&t[a]!==void 0)return!0;return!1}}class LanguageUtil{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=baseLogger.create("languageUtils")}getScriptPartFromCode(t){if(t=getCleanedCode(t),!t||t.indexOf("-")<0)return null;const i=t.split("-");return i.length===2||(i.pop(),i[i.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(i.join("-"))}getLanguagePartFromCode(t){if(t=getCleanedCode(t),!t||t.indexOf("-")<0)return t;const i=t.split("-");return this.formatLanguageCode(i[0])}formatLanguageCode(t){if(isString(t)&&t.indexOf("-")>-1){let i;try{i=Intl.getCanonicalLocales(t)[0]}catch{}return i&&this.options.lowerCaseLng&&(i=i.toLowerCase()),i||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let i;return t.forEach(a=>{if(i)return;const o=this.formatLanguageCode(a);(!this.options.supportedLngs||this.isSupportedCode(o))&&(i=o)}),!i&&this.options.supportedLngs&&t.forEach(a=>{if(i)return;const o=this.getScriptPartFromCode(a);if(this.isSupportedCode(o))return i=o;const l=this.getLanguagePartFromCode(a);if(this.isSupportedCode(l))return i=l;i=this.options.supportedLngs.find(u=>{if(u===l)return u;if(!(u.indexOf("-")<0&&l.indexOf("-")<0)&&(u.indexOf("-")>0&&l.indexOf("-")<0&&u.substring(0,u.indexOf("-"))===l||u.indexOf(l)===0&&l.length>1))return u})}),i||(i=this.getFallbackCodes(this.options.fallbackLng)[0]),i}getFallbackCodes(t,i){if(!t)return[];if(typeof t=="function"&&(t=t(i)),isString(t)&&(t=[t]),Array.isArray(t))return t;if(!i)return t.default||[];let a=t[i];return a||(a=t[this.getScriptPartFromCode(i)]),a||(a=t[this.formatLanguageCode(i)]),a||(a=t[this.getLanguagePartFromCode(i)]),a||(a=t.default),a||[]}toResolveHierarchy(t,i){const a=this.getFallbackCodes((i===!1?[]:i)||this.options.fallbackLng||[],t),o=[],l=u=>{u&&(this.isSupportedCode(u)?o.push(u):this.logger.warn(`rejecting language code not found in supportedLngs: ${u}`))};return isString(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&l(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&l(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&l(this.getLanguagePartFromCode(t))):isString(t)&&l(this.formatLanguageCode(t)),a.forEach(u=>{o.indexOf(u)<0&&l(this.formatLanguageCode(u))}),o}}const suffixesOrder={zero:0,one:1,two:2,few:3,many:4,other:5},dummyRule={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class PluralResolver{constructor(t,i={}){this.languageUtils=t,this.options=i,this.logger=baseLogger.create("pluralResolver"),this.pluralRulesCache={}}addRule(t,i){this.rules[t]=i}clearCache(){this.pluralRulesCache={}}getRule(t,i={}){const a=getCleanedCode(t==="dev"?"en":t),o=i.ordinal?"ordinal":"cardinal",l=JSON.stringify({cleanedCode:a,type:o});if(l in this.pluralRulesCache)return this.pluralRulesCache[l];let u;try{u=new Intl.PluralRules(a,{type:o})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),dummyRule;if(!t.match(/-|_/))return dummyRule;const h=this.languageUtils.getLanguagePartFromCode(t);u=this.getRule(h,i)}return this.pluralRulesCache[l]=u,u}needsPlural(t,i={}){let a=this.getRule(t,i);return a||(a=this.getRule("dev",i)),(a==null?void 0:a.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(t,i,a={}){return this.getSuffixes(t,a).map(o=>`${i}${o}`)}getSuffixes(t,i={}){let a=this.getRule(t,i);return a||(a=this.getRule("dev",i)),a?a.resolvedOptions().pluralCategories.sort((o,l)=>suffixesOrder[o]-suffixesOrder[l]).map(o=>`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${o}`):[]}getSuffix(t,i,a={}){const o=this.getRule(t,a);return o?`${this.options.prepend}${a.ordinal?`ordinal${this.options.prepend}`:""}${o.select(i)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",i,a))}}const deepFindWithDefaults=(e,t,i,a=".",o=!0)=>{let l=getPathWithDefaults(e,t,i);return!l&&o&&isString(i)&&(l=deepFind(e,i,a),l===void 0&&(l=deepFind(t,i,a))),l},regexSafe=e=>e.replace(/\$/g,"$$$$");class Interpolator{constructor(t={}){var i;this.logger=baseLogger.create("interpolator"),this.options=t,this.format=((i=t==null?void 0:t.interpolation)==null?void 0:i.format)||(a=>a),this.init(t)}init(t={}){t.interpolation||(t.interpolation={escapeValue:!0});const{escape:i,escapeValue:a,useRawValueToEscape:o,prefix:l,prefixEscaped:u,suffix:f,suffixEscaped:h,formatSeparator:p,unescapeSuffix:m,unescapePrefix:g,nestingPrefix:b,nestingPrefixEscaped:x,nestingSuffix:y,nestingSuffixEscaped:S,nestingOptionsSeparator:E,maxReplaces:w,alwaysFormat:_}=t.interpolation;this.escape=i!==void 0?i:escape$1,this.escapeValue=a!==void 0?a:!0,this.useRawValueToEscape=o!==void 0?o:!1,this.prefix=l?regexEscape(l):u||"{{",this.suffix=f?regexEscape(f):h||"}}",this.formatSeparator=p||",",this.unescapePrefix=m?"":g||"-",this.unescapeSuffix=this.unescapePrefix?"":m||"",this.nestingPrefix=b?regexEscape(b):x||regexEscape("$t("),this.nestingSuffix=y?regexEscape(y):S||regexEscape(")"),this.nestingOptionsSeparator=E||",",this.maxReplaces=w||1e3,this.alwaysFormat=_!==void 0?_:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(i,a)=>(i==null?void 0:i.source)===a?(i.lastIndex=0,i):new RegExp(a,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,i,a,o){var x;let l,u,f;const h=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},p=y=>{if(y.indexOf(this.formatSeparator)<0){const _=deepFindWithDefaults(i,h,y,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(_,void 0,a,{...o,...i,interpolationkey:y}):_}const S=y.split(this.formatSeparator),E=S.shift().trim(),w=S.join(this.formatSeparator).trim();return this.format(deepFindWithDefaults(i,h,E,this.options.keySeparator,this.options.ignoreJSONStructure),w,a,{...o,...i,interpolationkey:E})};this.resetRegExp();const m=(o==null?void 0:o.missingInterpolationHandler)||this.options.missingInterpolationHandler,g=((x=o==null?void 0:o.interpolation)==null?void 0:x.skipOnVariables)!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:y=>regexSafe(y)},{regex:this.regexp,safeValue:y=>this.escapeValue?regexSafe(this.escape(y)):regexSafe(y)}].forEach(y=>{for(f=0;l=y.regex.exec(t);){const S=l[1].trim();if(u=p(S),u===void 0)if(typeof m=="function"){const w=m(t,l,o);u=isString(w)?w:""}else if(o&&Object.prototype.hasOwnProperty.call(o,S))u="";else if(g){u=l[0];continue}else this.logger.warn(`missed to pass in variable ${S} for interpolating ${t}`),u="";else!isString(u)&&!this.useRawValueToEscape&&(u=makeString(u));const E=y.safeValue(u);if(t=t.replace(l[0],E),g?(y.regex.lastIndex+=u.length,y.regex.lastIndex-=l[0].length):y.regex.lastIndex=0,f++,f>=this.maxReplaces)break}}),t}nest(t,i,a={}){let o,l,u;const f=(h,p)=>{const m=this.nestingOptionsSeparator;if(h.indexOf(m)<0)return h;const g=h.split(new RegExp(`${m}[ ]*{`));let b=`{${g[1]}`;h=g[0],b=this.interpolate(b,u);const x=b.match(/'/g),y=b.match(/"/g);(((x==null?void 0:x.length)??0)%2===0&&!y||y.length%2!==0)&&(b=b.replace(/'/g,'"'));try{u=JSON.parse(b),p&&(u={...p,...u})}catch(S){return this.logger.warn(`failed parsing options string in nesting for key ${h}`,S),`${h}${m}${b}`}return u.defaultValue&&u.defaultValue.indexOf(this.prefix)>-1&&delete u.defaultValue,h};for(;o=this.nestingRegexp.exec(t);){let h=[];u={...a},u=u.replace&&!isString(u.replace)?u.replace:u,u.applyPostProcessor=!1,delete u.defaultValue;let p=!1;if(o[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(o[1])){const m=o[1].split(this.formatSeparator).map(g=>g.trim());o[1]=m.shift(),h=m,p=!0}if(l=i(f.call(this,o[1].trim(),u),u),l&&o[0]===t&&!isString(l))return l;isString(l)||(l=makeString(l)),l||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${t}`),l=""),p&&(l=h.reduce((m,g)=>this.format(m,g,a.lng,{...a,interpolationkey:o[1].trim()}),l.trim())),t=t.replace(o[0],l),this.regexp.lastIndex=0}return t}}const parseFormatStr=e=>{let t=e.toLowerCase().trim();const i={};if(e.indexOf("(")>-1){const a=e.split("(");t=a[0].toLowerCase().trim();const o=a[1].substring(0,a[1].length-1);t==="currency"&&o.indexOf(":")<0?i.currency||(i.currency=o.trim()):t==="relativetime"&&o.indexOf(":")<0?i.range||(i.range=o.trim()):o.split(";").forEach(u=>{if(u){const[f,...h]=u.split(":"),p=h.join(":").trim().replace(/^'+|'+$/g,""),m=f.trim();i[m]||(i[m]=p),p==="false"&&(i[m]=!1),p==="true"&&(i[m]=!0),isNaN(p)||(i[m]=parseInt(p,10))}})}return{formatName:t,formatOptions:i}},createCachedFormatter=e=>{const t={};return(i,a,o)=>{let l=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(l={...l,[o.interpolationkey]:void 0});const u=a+JSON.stringify(l);let f=t[u];return f||(f=e(getCleanedCode(a),o),t[u]=f),f(i)}},createNonCachedFormatter=e=>(t,i,a)=>e(getCleanedCode(i),a)(t);class Formatter{constructor(t={}){this.logger=baseLogger.create("formatter"),this.options=t,this.init(t)}init(t,i={interpolation:{}}){this.formatSeparator=i.interpolation.formatSeparator||",";const a=i.cacheInBuiltFormats?createCachedFormatter:createNonCachedFormatter;this.formats={number:a((o,l)=>{const u=new Intl.NumberFormat(o,{...l});return f=>u.format(f)}),currency:a((o,l)=>{const u=new Intl.NumberFormat(o,{...l,style:"currency"});return f=>u.format(f)}),datetime:a((o,l)=>{const u=new Intl.DateTimeFormat(o,{...l});return f=>u.format(f)}),relativetime:a((o,l)=>{const u=new Intl.RelativeTimeFormat(o,{...l});return f=>u.format(f,l.range||"day")}),list:a((o,l)=>{const u=new Intl.ListFormat(o,{...l});return f=>u.format(f)})}}add(t,i){this.formats[t.toLowerCase().trim()]=i}addCached(t,i){this.formats[t.toLowerCase().trim()]=createCachedFormatter(i)}format(t,i,a,o={}){const l=i.split(this.formatSeparator);if(l.length>1&&l[0].indexOf("(")>1&&l[0].indexOf(")")<0&&l.find(f=>f.indexOf(")")>-1)){const f=l.findIndex(h=>h.indexOf(")")>-1);l[0]=[l[0],...l.splice(1,f)].join(this.formatSeparator)}return l.reduce((f,h)=>{var g;const{formatName:p,formatOptions:m}=parseFormatStr(h);if(this.formats[p]){let b=f;try{const x=((g=o==null?void 0:o.formatParams)==null?void 0:g[o.interpolationkey])||{},y=x.locale||x.lng||o.locale||o.lng||a;b=this.formats[p](f,y,{...m,...o,...x})}catch(x){this.logger.warn(x)}return b}else this.logger.warn(`there was no format function for ${p}`);return f},t)}}const removePending=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class Connector extends EventEmitter{constructor(t,i,a,o={}){var l,u;super(),this.backend=t,this.store=i,this.services=a,this.languageUtils=a.languageUtils,this.options=o,this.logger=baseLogger.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=o.maxParallelReads||10,this.readingCalls=0,this.maxRetries=o.maxRetries>=0?o.maxRetries:5,this.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,this.state={},this.queue=[],(u=(l=this.backend)==null?void 0:l.init)==null||u.call(l,a,o.backend,o)}queueLoad(t,i,a,o){const l={},u={},f={},h={};return t.forEach(p=>{let m=!0;i.forEach(g=>{const b=`${p}|${g}`;!a.reload&&this.store.hasResourceBundle(p,g)?this.state[b]=2:this.state[b]<0||(this.state[b]===1?u[b]===void 0&&(u[b]=!0):(this.state[b]=1,m=!1,u[b]===void 0&&(u[b]=!0),l[b]===void 0&&(l[b]=!0),h[g]===void 0&&(h[g]=!0)))}),m||(f[p]=!0)}),(Object.keys(l).length||Object.keys(u).length)&&this.queue.push({pending:u,pendingCount:Object.keys(u).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(l),pending:Object.keys(u),toLoadLanguages:Object.keys(f),toLoadNamespaces:Object.keys(h)}}loaded(t,i,a){const o=t.split("|"),l=o[0],u=o[1];i&&this.emit("failedLoading",l,u,i),!i&&a&&this.store.addResourceBundle(l,u,a,void 0,void 0,{skipCopy:!0}),this.state[t]=i?-1:2,i&&a&&(this.state[t]=0);const f={};this.queue.forEach(h=>{pushPath(h.loaded,[l],u),removePending(h,t),i&&h.errors.push(i),h.pendingCount===0&&!h.done&&(Object.keys(h.loaded).forEach(p=>{f[p]||(f[p]={});const m=h.loaded[p];m.length&&m.forEach(g=>{f[p][g]===void 0&&(f[p][g]=!0)})}),h.done=!0,h.errors.length?h.callback(h.errors):h.callback())}),this.emit("loaded",f),this.queue=this.queue.filter(h=>!h.done)}read(t,i,a,o=0,l=this.retryTimeout,u){if(!t.length)return u(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:i,fcName:a,tried:o,wait:l,callback:u});return}this.readingCalls++;const f=(p,m)=>{if(this.readingCalls--,this.waitingReads.length>0){const g=this.waitingReads.shift();this.read(g.lng,g.ns,g.fcName,g.tried,g.wait,g.callback)}if(p&&m&&o<this.maxRetries){setTimeout(()=>{this.read.call(this,t,i,a,o+1,l*2,u)},l);return}u(p,m)},h=this.backend[a].bind(this.backend);if(h.length===2){try{const p=h(t,i);p&&typeof p.then=="function"?p.then(m=>f(null,m)).catch(f):f(null,p)}catch(p){f(p)}return}return h(t,i,f)}prepareLoading(t,i,a={},o){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();isString(t)&&(t=this.languageUtils.toResolveHierarchy(t)),isString(i)&&(i=[i]);const l=this.queueLoad(t,i,a,o);if(!l.toLoad.length)return l.pending.length||o(),null;l.toLoad.forEach(u=>{this.loadOne(u)})}load(t,i,a){this.prepareLoading(t,i,{},a)}reload(t,i,a){this.prepareLoading(t,i,{reload:!0},a)}loadOne(t,i=""){const a=t.split("|"),o=a[0],l=a[1];this.read(o,l,"read",void 0,void 0,(u,f)=>{u&&this.logger.warn(`${i}loading namespace ${l} for language ${o} failed`,u),!u&&f&&this.logger.log(`${i}loaded namespace ${l} for language ${o}`,f),this.loaded(t,u,f)})}saveMissing(t,i,a,o,l,u={},f=()=>{}){var h,p,m,g,b;if((p=(h=this.services)==null?void 0:h.utils)!=null&&p.hasLoadedNamespace&&!((g=(m=this.services)==null?void 0:m.utils)!=null&&g.hasLoadedNamespace(i))){this.logger.warn(`did not save key "${a}" as the namespace "${i}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(a==null||a==="")){if((b=this.backend)!=null&&b.create){const x={...u,isUpdate:l},y=this.backend.create.bind(this.backend);if(y.length<6)try{let S;y.length===5?S=y(t,i,a,o,x):S=y(t,i,a,o),S&&typeof S.then=="function"?S.then(E=>f(null,E)).catch(f):f(null,S)}catch(S){f(S)}else y(t,i,a,o,f,x)}!t||!t[0]||this.store.addResource(t[0],i,a,o)}}}const get=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),isString(e[1])&&(t.defaultValue=e[1]),isString(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const i=e[3]||e[2];Object.keys(i).forEach(a=>{t[a]=i[a]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),transformOptions=e=>{var t,i;return isString(e.ns)&&(e.ns=[e.ns]),isString(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),isString(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),((i=(t=e.supportedLngs)==null?void 0:t.indexOf)==null?void 0:i.call(t,"cimode"))<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),typeof e.initImmediate=="boolean"&&(e.initAsync=e.initImmediate),e},noop=()=>{},bindMemberFunctions=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(i=>{typeof e[i]=="function"&&(e[i]=e[i].bind(e))})};class I18n extends EventEmitter{constructor(t={},i){if(super(),this.options=transformOptions(t),this.services={},this.logger=baseLogger,this.modules={external:[]},bindMemberFunctions(this),i&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,i),this;setTimeout(()=>{this.init(t,i)},0)}}init(t={},i){this.isInitializing=!0,typeof t=="function"&&(i=t,t={}),t.defaultNS==null&&t.ns&&(isString(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const a=get();this.options={...a,...this.options,...transformOptions(t)},this.options.interpolation={...a.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator);const o=p=>p?typeof p=="function"?new p:p:null;if(!this.options.isClone){this.modules.logger?baseLogger.init(o(this.modules.logger),this.options):baseLogger.init(null,this.options);let p;this.modules.formatter?p=this.modules.formatter:p=Formatter;const m=new LanguageUtil(this.options);this.store=new ResourceStore(this.options.resources,this.options);const g=this.services;g.logger=baseLogger,g.resourceStore=this.store,g.languageUtils=m,g.pluralResolver=new PluralResolver(m,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),p&&(!this.options.interpolation.format||this.options.interpolation.format===a.interpolation.format)&&(g.formatter=o(p),g.formatter.init(g,this.options),this.options.interpolation.format=g.formatter.format.bind(g.formatter)),g.interpolator=new Interpolator(this.options),g.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},g.backendConnector=new Connector(o(this.modules.backend),g.resourceStore,g,this.options),g.backendConnector.on("*",(b,...x)=>{this.emit(b,...x)}),this.modules.languageDetector&&(g.languageDetector=o(this.modules.languageDetector),g.languageDetector.init&&g.languageDetector.init(g,this.options.detection,this.options)),this.modules.i18nFormat&&(g.i18nFormat=o(this.modules.i18nFormat),g.i18nFormat.init&&g.i18nFormat.init(this)),this.translator=new Translator(this.services,this.options),this.translator.on("*",(b,...x)=>{this.emit(b,...x)}),this.modules.external.forEach(b=>{b.init&&b.init(this)})}if(this.format=this.options.interpolation.format,i||(i=noop),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const p=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);p.length>0&&p[0]!=="dev"&&(this.options.lng=p[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(p=>{this[p]=(...m)=>this.store[p](...m)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(p=>{this[p]=(...m)=>(this.store[p](...m),this)});const f=defer(),h=()=>{const p=(m,g)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),f.resolve(g),i(m,g)};if(this.languages&&!this.isInitialized)return p(null,this.t.bind(this));this.changeLanguage(this.options.lng,p)};return this.options.resources||!this.options.initAsync?h():setTimeout(h,0),f}loadResources(t,i=noop){var l,u;let a=i;const o=isString(t)?t:this.language;if(typeof t=="function"&&(a=t),!this.options.resources||this.options.partialBundledLanguages){if((o==null?void 0:o.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return a();const f=[],h=p=>{if(!p||p==="cimode")return;this.services.languageUtils.toResolveHierarchy(p).forEach(g=>{g!=="cimode"&&f.indexOf(g)<0&&f.push(g)})};o?h(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(m=>h(m)),(u=(l=this.options.preload)==null?void 0:l.forEach)==null||u.call(l,p=>h(p)),this.services.backendConnector.load(f,this.options.ns,p=>{!p&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),a(p)})}else a(null)}reloadResources(t,i,a){const o=defer();return typeof t=="function"&&(a=t,t=void 0),typeof i=="function"&&(a=i,i=void 0),t||(t=this.languages),i||(i=this.options.ns),a||(a=noop),this.services.backendConnector.reload(t,i,l=>{o.resolve(),a(l)}),o}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&postProcessor.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1)){for(let i=0;i<this.languages.length;i++){const a=this.languages[i];if(!(["cimode","dev"].indexOf(a)>-1)&&this.store.hasLanguageSomeTranslations(a)){this.resolvedLanguage=a;break}}!this.resolvedLanguage&&this.languages.indexOf(t)<0&&this.store.hasLanguageSomeTranslations(t)&&(this.resolvedLanguage=t,this.languages.unshift(t))}}changeLanguage(t,i){this.isLanguageChangingTo=t;const a=defer();this.emit("languageChanging",t);const o=f=>{this.language=f,this.languages=this.services.languageUtils.toResolveHierarchy(f),this.resolvedLanguage=void 0,this.setResolvedLanguage(f)},l=(f,h)=>{h?this.isLanguageChangingTo===t&&(o(h),this.translator.changeLanguage(h),this.isLanguageChangingTo=void 0,this.emit("languageChanged",h),this.logger.log("languageChanged",h)):this.isLanguageChangingTo=void 0,a.resolve((...p)=>this.t(...p)),i&&i(f,(...p)=>this.t(...p))},u=f=>{var m,g;!t&&!f&&this.services.languageDetector&&(f=[]);const h=isString(f)?f:f&&f[0],p=this.store.hasLanguageSomeTranslations(h)?h:this.services.languageUtils.getBestMatchFromCodes(isString(f)?[f]:f);p&&(this.language||o(p),this.translator.language||this.translator.changeLanguage(p),(g=(m=this.services.languageDetector)==null?void 0:m.cacheUserLanguage)==null||g.call(m,p)),this.loadResources(p,b=>{l(b,p)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?u(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(u):this.services.languageDetector.detect(u):u(t),a}getFixedT(t,i,a){const o=(l,u,...f)=>{let h;typeof u!="object"?h=this.options.overloadTranslationOptionHandler([l,u].concat(f)):h={...u},h.lng=h.lng||o.lng,h.lngs=h.lngs||o.lngs,h.ns=h.ns||o.ns,h.keyPrefix!==""&&(h.keyPrefix=h.keyPrefix||a||o.keyPrefix);const p=this.options.keySeparator||".";let m;return h.keyPrefix&&Array.isArray(l)?m=l.map(g=>`${h.keyPrefix}${p}${g}`):m=h.keyPrefix?`${h.keyPrefix}${p}${l}`:l,this.t(m,h)};return isString(t)?o.lng=t:o.lngs=t,o.ns=i,o.keyPrefix=a,o}t(...t){var i;return(i=this.translator)==null?void 0:i.translate(...t)}exists(...t){var i;return(i=this.translator)==null?void 0:i.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,i={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const a=i.lng||this.resolvedLanguage||this.languages[0],o=this.options?this.options.fallbackLng:!1,l=this.languages[this.languages.length-1];if(a.toLowerCase()==="cimode")return!0;const u=(f,h)=>{const p=this.services.backendConnector.state[`${f}|${h}`];return p===-1||p===0||p===2};if(i.precheck){const f=i.precheck(this,u);if(f!==void 0)return f}return!!(this.hasResourceBundle(a,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||u(a,t)&&(!o||u(l,t)))}loadNamespaces(t,i){const a=defer();return this.options.ns?(isString(t)&&(t=[t]),t.forEach(o=>{this.options.ns.indexOf(o)<0&&this.options.ns.push(o)}),this.loadResources(o=>{a.resolve(),i&&i(o)}),a):(i&&i(),Promise.resolve())}loadLanguages(t,i){const a=defer();isString(t)&&(t=[t]);const o=this.options.preload||[],l=t.filter(u=>o.indexOf(u)<0&&this.services.languageUtils.isSupportedCode(u));return l.length?(this.options.preload=o.concat(l),this.loadResources(u=>{a.resolve(),i&&i(u)}),a):(i&&i(),Promise.resolve())}dir(t){var o,l;if(t||(t=this.resolvedLanguage||(((o=this.languages)==null?void 0:o.length)>0?this.languages[0]:this.language)),!t)return"rtl";const i=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],a=((l=this.services)==null?void 0:l.languageUtils)||new LanguageUtil(get());return i.indexOf(a.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},i){return new I18n(t,i)}cloneInstance(t={},i=noop){const a=t.forkResourceStore;a&&delete t.forkResourceStore;const o={...this.options,...t,isClone:!0},l=new I18n(o);if((t.debug!==void 0||t.prefix!==void 0)&&(l.logger=l.logger.clone(t)),["store","services","language"].forEach(f=>{l[f]=this[f]}),l.services={...this.services},l.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},a){const f=Object.keys(this.store.data).reduce((h,p)=>(h[p]={...this.store.data[p]},h[p]=Object.keys(h[p]).reduce((m,g)=>(m[g]={...h[p][g]},m),h[p]),h),{});l.store=new ResourceStore(f,o),l.services.resourceStore=l.store}return l.translator=new Translator(l.services,o),l.translator.on("*",(f,...h)=>{l.emit(f,...h)}),l.init(o,i),l.translator.options=o,l.translator.backendConnector.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const instance=I18n.createInstance();instance.createInstance=I18n.createInstance;instance.createInstance;instance.dir;instance.init;instance.loadResources;instance.reloadResources;instance.use;instance.changeLanguage;instance.getFixedT;instance.t;instance.exists;instance.setDefaultNamespace;instance.hasLoadedNamespace;instance.loadNamespaces;instance.loadLanguages;const{slice,forEach}=[];function defaults(e){return forEach.call(slice.call(arguments,1),t=>{if(t)for(const i in t)e[i]===void 0&&(e[i]=t[i])}),e}function hasXSS(e){return typeof e!="string"?!1:[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(i=>i.test(e))}const fieldContentRegExp=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,serializeCookie=function(e,t){const a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},o=encodeURIComponent(t);let l=`${e}=${o}`;if(a.maxAge>0){const u=a.maxAge-0;if(Number.isNaN(u))throw new Error("maxAge should be a Number");l+=`; Max-Age=${Math.floor(u)}`}if(a.domain){if(!fieldContentRegExp.test(a.domain))throw new TypeError("option domain is invalid");l+=`; Domain=${a.domain}`}if(a.path){if(!fieldContentRegExp.test(a.path))throw new TypeError("option path is invalid");l+=`; Path=${a.path}`}if(a.expires){if(typeof a.expires.toUTCString!="function")throw new TypeError("option expires is invalid");l+=`; Expires=${a.expires.toUTCString()}`}if(a.httpOnly&&(l+="; HttpOnly"),a.secure&&(l+="; Secure"),a.sameSite)switch(typeof a.sameSite=="string"?a.sameSite.toLowerCase():a.sameSite){case!0:l+="; SameSite=Strict";break;case"lax":l+="; SameSite=Lax";break;case"strict":l+="; SameSite=Strict";break;case"none":l+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return a.partitioned&&(l+="; Partitioned"),l},cookie={create(e,t,i,a){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};i&&(o.expires=new Date,o.expires.setTime(o.expires.getTime()+i*60*1e3)),a&&(o.domain=a),document.cookie=serializeCookie(e,encodeURIComponent(t),o)},read(e){const t=`${e}=`,i=document.cookie.split(";");for(let a=0;a<i.length;a++){let o=i[a];for(;o.charAt(0)===" ";)o=o.substring(1,o.length);if(o.indexOf(t)===0)return o.substring(t.length,o.length)}return null},remove(e){this.create(e,"",-1)}};var cookie$1={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&typeof document<"u")return cookie.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:i,cookieMinutes:a,cookieDomain:o,cookieOptions:l}=t;i&&typeof document<"u"&&cookie.create(i,e,a,o,l)}},querystring={name:"querystring",lookup(e){var a;let{lookupQuerystring:t}=e,i;if(typeof window<"u"){let{search:o}=window.location;!window.location.search&&((a=window.location.hash)==null?void 0:a.indexOf("?"))>-1&&(o=window.location.hash.substring(window.location.hash.indexOf("?")));const u=o.substring(1).split("&");for(let f=0;f<u.length;f++){const h=u[f].indexOf("=");h>0&&u[f].substring(0,h)===t&&(i=u[f].substring(h+1))}}return i}};let hasLocalStorageSupport=null;const localStorageAvailable=()=>{if(hasLocalStorageSupport!==null)return hasLocalStorageSupport;try{if(hasLocalStorageSupport=typeof window<"u"&&window.localStorage!==null,!hasLocalStorageSupport)return!1;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{hasLocalStorageSupport=!1}return hasLocalStorageSupport};var localStorage={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&localStorageAvailable())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:i}=t;i&&localStorageAvailable()&&window.localStorage.setItem(i,e)}};let hasSessionStorageSupport=null;const sessionStorageAvailable=()=>{if(hasSessionStorageSupport!==null)return hasSessionStorageSupport;try{if(hasSessionStorageSupport=typeof window<"u"&&window.sessionStorage!==null,!hasSessionStorageSupport)return!1;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{hasSessionStorageSupport=!1}return hasSessionStorageSupport};var sessionStorage={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&sessionStorageAvailable())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:i}=t;i&&sessionStorageAvailable()&&window.sessionStorage.setItem(i,e)}},navigator$1={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:i,userLanguage:a,language:o}=navigator;if(i)for(let l=0;l<i.length;l++)t.push(i[l]);a&&t.push(a),o&&t.push(o)}return t.length>0?t:void 0}},htmlTag={name:"htmlTag",lookup(e){let{htmlTag:t}=e,i;const a=t||(typeof document<"u"?document.documentElement:null);return a&&typeof a.getAttribute=="function"&&(i=a.getAttribute("lang")),i}},path={name:"path",lookup(e){var o;let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const i=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(i)?(o=i[typeof t=="number"?t:0])==null?void 0:o.replace("/",""):void 0}},subdomain={name:"subdomain",lookup(e){var o,l;let{lookupFromSubdomainIndex:t}=e;const i=typeof t=="number"?t+1:1,a=typeof window<"u"&&((l=(o=window.location)==null?void 0:o.hostname)==null?void 0:l.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(a)return a[i]}};let canCookies=!1;try{document.cookie,canCookies=!0}catch(e){}const order=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];canCookies||order.splice(1,1);const getDefaults$1=()=>({order,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e});class Browser{constructor(t){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,i)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t,this.options=defaults(i,this.options||{},getDefaults$1()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=o=>o.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=a,this.addDetector(cookie$1),this.addDetector(querystring),this.addDetector(localStorage),this.addDetector(sessionStorage),this.addDetector(navigator$1),this.addDetector(htmlTag),this.addDetector(path),this.addDetector(subdomain)}addDetector(t){return this.detectors[t.name]=t,this}detect(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,i=[];return t.forEach(a=>{if(this.detectors[a]){let o=this.detectors[a].lookup(this.options);o&&typeof o=="string"&&(o=[o]),o&&(i=i.concat(o))}}),i=i.filter(a=>a!=null&&!hasXSS(a)).map(a=>this.options.convertDetectedLanguage(a)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?i:i.length>0?i[0]:null}cacheUserLanguage(t){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;i&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||i.forEach(a=>{this.detectors[a]&&this.detectors[a].cacheUserLanguage(t,this.options)}))}}Browser.type="languageDetector";function _typeof$2(e){"@babel/helpers - typeof";return _typeof$2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof$2(e)}function hasXMLHttpRequest(){return typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":_typeof$2(XMLHttpRequest))==="object"}function isPromise(e){return!!e&&typeof e.then=="function"}function makePromise(e){return isPromise(e)?e:Promise.resolve(e)}const scriptRel="modulepreload",assetsURL=function(e){return"/"+e},seen={},__vitePreload=function e(t,i,a){let o=Promise.resolve();if(i&&i.length>0){let u=function(p){return Promise.all(p.map(m=>Promise.resolve(m).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const f=document.querySelector("meta[property=csp-nonce]"),h=(f==null?void 0:f.nonce)||(f==null?void 0:f.getAttribute("nonce"));o=u(i.map(p=>{if(p=assetsURL(p),p in seen)return;seen[p]=!0;const m=p.endsWith(".css"),g=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${p}"]${g}`))return;const b=document.createElement("link");if(b.rel=m?"stylesheet":scriptRel,m||(b.as="script"),b.crossOrigin="",b.href=p,h&&b.setAttribute("nonce",h),document.head.appendChild(b),m)return new Promise((x,y)=>{b.addEventListener("load",x),b.addEventListener("error",()=>y(new Error(`Unable to preload CSS for ${p}`)))})}))}function l(u){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=u,window.dispatchEvent(f),!f.defaultPrevented)throw u}return o.then(u=>{for(const f of u||[])f.status==="rejected"&&l(f.reason);return t().catch(l)})};function ownKeys$1(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),i.push.apply(i,a)}return i}function _objectSpread$1(e){for(var t=1;t<arguments.length;t++){var i=arguments[t]!=null?arguments[t]:{};t%2?ownKeys$1(Object(i),!0).forEach(function(a){_defineProperty$1(e,a,i[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):ownKeys$1(Object(i)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(i,a))})}return e}function _defineProperty$1(e,t,i){return(t=_toPropertyKey$1(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function _toPropertyKey$1(e){var t=_toPrimitive$1(e,"string");return _typeof$1(t)=="symbol"?t:t+""}function _toPrimitive$1(e,t){if(_typeof$1(e)!="object"||!e)return e;var i=e[Symbol.toPrimitive];if(i!==void 0){var a=i.call(e,t);if(_typeof$1(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function _typeof$1(e){"@babel/helpers - typeof";return _typeof$1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof$1(e)}var fetchApi=typeof fetch=="function"?fetch:void 0;typeof global<"u"&&global.fetch?fetchApi=global.fetch:typeof window<"u"&&window.fetch&&(fetchApi=window.fetch);var XmlHttpRequestApi;hasXMLHttpRequest()&&(typeof global<"u"&&global.XMLHttpRequest?XmlHttpRequestApi=global.XMLHttpRequest:typeof window<"u"&&window.XMLHttpRequest&&(XmlHttpRequestApi=window.XMLHttpRequest));var ActiveXObjectApi;typeof ActiveXObject=="function"&&(typeof global<"u"&&global.ActiveXObject?ActiveXObjectApi=global.ActiveXObject:typeof window<"u"&&window.ActiveXObject&&(ActiveXObjectApi=window.ActiveXObject));typeof fetchApi!="function"&&(fetchApi=void 0);if(!fetchApi&&!XmlHttpRequestApi&&!ActiveXObjectApi)try{__vitePreload(()=>import("./browser-ponyfill-CwETHAJL.js").then(e=>e.b),[]).then(function(e){fetchApi=e.default}).catch(function(){})}catch{}var addQueryString=function e(t,i){if(i&&_typeof$1(i)==="object"){var a="";for(var o in i)a+="&"+encodeURIComponent(o)+"="+encodeURIComponent(i[o]);if(!a)return t;t=t+(t.indexOf("?")!==-1?"&":"?")+a.slice(1)}return t},fetchIt=function e(t,i,a,o){var l=function(h){if(!h.ok)return a(h.statusText||"Error",{status:h.status});h.text().then(function(p){a(null,{status:h.status,data:p})}).catch(a)};if(o){var u=o(t,i);if(u instanceof Promise){u.then(l).catch(a);return}}typeof fetch=="function"?fetch(t,i).then(l).catch(a):fetchApi(t,i).then(l).catch(a)},omitFetchOptions=!1,requestWithFetch=function e(t,i,a,o){t.queryStringParams&&(i=addQueryString(i,t.queryStringParams));var l=_objectSpread$1({},typeof t.customHeaders=="function"?t.customHeaders():t.customHeaders);typeof window>"u"&&typeof global<"u"&&typeof global.process<"u"&&global.process.versions&&global.process.versions.node&&(l["User-Agent"]="i18next-http-backend (node/".concat(global.process.version,"; ").concat(global.process.platform," ").concat(global.process.arch,")")),a&&(l["Content-Type"]="application/json");var u=typeof t.requestOptions=="function"?t.requestOptions(a):t.requestOptions,f=_objectSpread$1({method:a?"POST":"GET",body:a?t.stringify(a):void 0,headers:l},omitFetchOptions?{}:u),h=typeof t.alternateFetch=="function"&&t.alternateFetch.length>=1?t.alternateFetch:void 0;try{fetchIt(i,f,o,h)}catch(p){if(!u||Object.keys(u).length===0||!p.message||p.message.indexOf("not implemented")<0)return o(p);try{Object.keys(u).forEach(function(m){delete f[m]}),fetchIt(i,f,o,h),omitFetchOptions=!0}catch(m){o(m)}}},requestWithXmlHttpRequest=function e(t,i,a,o){a&&_typeof$1(a)==="object"&&(a=addQueryString("",a).slice(1)),t.queryStringParams&&(i=addQueryString(i,t.queryStringParams));try{var l=XmlHttpRequestApi?new XmlHttpRequestApi:new ActiveXObjectApi("MSXML2.XMLHTTP.3.0");l.open(a?"POST":"GET",i,1),t.crossDomain||l.setRequestHeader("X-Requested-With","XMLHttpRequest"),l.withCredentials=!!t.withCredentials,a&&l.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),l.overrideMimeType&&l.overrideMimeType("application/json");var u=t.customHeaders;if(u=typeof u=="function"?u():u,u)for(var f in u)l.setRequestHeader(f,u[f]);l.onreadystatechange=function(){l.readyState>3&&o(l.status>=400?l.statusText:null,{status:l.status,data:l.responseText})},l.send(a)}catch(h){console&&console.log(h)}},request=function e(t,i,a,o){if(typeof a=="function"&&(o=a,a=void 0),o=o||function(){},fetchApi&&i.indexOf("file:")!==0)return requestWithFetch(t,i,a,o);if(hasXMLHttpRequest()||typeof ActiveXObject=="function")return requestWithXmlHttpRequest(t,i,a,o);o(new Error("No fetch and no xhr implementation found!"))};function _typeof(e){"@babel/helpers - typeof";return _typeof=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(e)}function ownKeys(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),i.push.apply(i,a)}return i}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var i=arguments[t]!=null?arguments[t]:{};t%2?ownKeys(Object(i),!0).forEach(function(a){_defineProperty(e,a,i[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):ownKeys(Object(i)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(i,a))})}return e}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var i=0;i<t.length;i++){var a=t[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,_toPropertyKey(a.key),a)}}function _createClass(e,t,i){return t&&_defineProperties(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function _defineProperty(e,t,i){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function _toPropertyKey(e){var t=_toPrimitive(e,"string");return _typeof(t)=="symbol"?t:t+""}function _toPrimitive(e,t){if(_typeof(e)!="object"||!e)return e;var i=e[Symbol.toPrimitive];if(i!==void 0){var a=i.call(e,t);if(_typeof(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var getDefaults=function e(){return{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",parse:function(i){return JSON.parse(i)},stringify:JSON.stringify,parsePayload:function(i,a,o){return _defineProperty({},a,o||"")},parseLoadPayload:function(i,a){},request,reloadInterval:typeof window<"u"?!1:60*60*1e3,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}},Backend=function(){function e(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};_classCallCheck(this,e),this.services=t,this.options=i,this.allOptions=a,this.type="backend",this.init(t,i,a)}return _createClass(e,[{key:"init",value:function(i){var a=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(this.services=i,this.options=_objectSpread(_objectSpread(_objectSpread({},getDefaults()),this.options||{}),o),this.allOptions=l,this.services&&this.options.reloadInterval){var u=setInterval(function(){return a.reload()},this.options.reloadInterval);_typeof(u)==="object"&&typeof u.unref=="function"&&u.unref()}}},{key:"readMulti",value:function(i,a,o){this._readAny(i,i,a,a,o)}},{key:"read",value:function(i,a,o){this._readAny([i],i,[a],a,o)}},{key:"_readAny",value:function(i,a,o,l,u){var f=this,h=this.options.loadPath;typeof this.options.loadPath=="function"&&(h=this.options.loadPath(i,o)),h=makePromise(h),h.then(function(p){if(!p)return u(null,{});var m=f.services.interpolator.interpolate(p,{lng:i.join("+"),ns:o.join("+")});f.loadUrl(m,u,a,l)})}},{key:"loadUrl",value:function(i,a,o,l){var u=this,f=typeof o=="string"?[o]:o,h=typeof l=="string"?[l]:l,p=this.options.parseLoadPayload(f,h);this.options.request(this.options,i,p,function(m,g){if(g&&(g.status>=500&&g.status<600||!g.status))return a("failed loading "+i+"; status code: "+g.status,!0);if(g&&g.status>=400&&g.status<500)return a("failed loading "+i+"; status code: "+g.status,!1);if(!g&&m&&m.message){var b=m.message.toLowerCase(),x=["failed","fetch","network","load"].find(function(E){return b.indexOf(E)>-1});if(x)return a("failed loading "+i+": "+m.message,!0)}if(m)return a(m,!1);var y,S;try{typeof g.data=="string"?y=u.options.parse(g.data,o,l):y=g.data}catch{S="failed parsing "+i+" to json"}if(S)return a(S,!1);a(null,y)})}},{key:"create",value:function(i,a,o,l,u){var f=this;if(this.options.addPath){typeof i=="string"&&(i=[i]);var h=this.options.parsePayload(a,o,l),p=0,m=[],g=[];i.forEach(function(b){var x=f.options.addPath;typeof f.options.addPath=="function"&&(x=f.options.addPath(b,a));var y=f.services.interpolator.interpolate(x,{lng:b,ns:a});f.options.request(f.options,y,h,function(S,E){p+=1,m.push(S),g.push(E),p===i.length&&typeof u=="function"&&u(m,g)})})}}},{key:"reload",value:function(){var i=this,a=this.services,o=a.backendConnector,l=a.languageUtils,u=a.logger,f=o.language;if(!(f&&f.toLowerCase()==="cimode")){var h=[],p=function(g){var b=l.toResolveHierarchy(g);b.forEach(function(x){h.indexOf(x)<0&&h.push(x)})};p(f),this.allOptions.preload&&this.allOptions.preload.forEach(function(m){return p(m)}),h.forEach(function(m){i.allOptions.ns.forEach(function(g){o.read(m,g,"read",null,null,function(b,x){b&&u.warn("loading namespace ".concat(g," for language ").concat(m," failed"),b),!b&&x&&u.log("loaded namespace ".concat(g," for language ").concat(m),x),o.loaded("".concat(m,"|").concat(g),b,x)})})})}}}])}();Backend.type="backend";const supportedLanguages={"en-GB":"English (UK)","en-US":"English (US)","ar-AR":"العربية","az-AZ":"Azərbaycan Dili","bg-BG":"Български","ca-CA":"Català","cs-CZ":"Česky","da-DK":"Dansk","de-DE":"Deutsch","el-GR":"Ελληνικά","es-ES":"Español","eu-ES":"Euskara","fa-IR":"فارسی","fr-FR":"Français","ga-IE":"Gaeilge","hi-IN":"हिंदी","hr-HR":"Hrvatski","hu-HU":"Magyar","id-ID":"Bahasa Indonesia","it-IT":"Italiano","ja-JP":"日本語","ko-KR":"한국어","ml-ML":"മലയാളം","nl-NL":"Nederlands","no-NB":"Norsk","pl-PL":"Polski","pt-BR":"Português (Brasil)","pt-PT":"Português","ro-RO":"Română","ru-RU":"Русский","sk-SK":"Slovensky","sl-SI":"Slovenščina","sr-LATN-RS":"Srpski","sv-SE":"Svenska","th-TH":"ไทย","tr-TR":"Türkçe","uk-UA":"Українська","vi-VN":"Tiếng Việt","zh-BO":"བོད་ཡིག","zh-CN":"简体中文","zh-TW":"繁體中文"},rtlLanguages=["ar-AR","fa-IR"];instance.use(Backend).use(Browser).use(initReactI18next).init({fallbackLng:"en-GB",debug:!1,interpolation:{escapeValue:!1},backend:{loadPath:"/locales/{{lng}}/{{ns}}.json"},detection:{order:["localStorage","navigator","htmlTag"],caches:["localStorage"]},react:{useSuspense:!1}});instance.on("languageChanged",e=>{const t=rtlLanguages.includes(e);document.documentElement.dir=t?"rtl":"ltr",document.documentElement.lang=e});const LanguageIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2m6.93 6h-2.95c-.32-1.25-.78-2.45-1.38-3.56 1.84.63 3.37 1.91 4.33 3.56M12 4.04c.83 1.2 1.48 2.53 1.91 3.96h-3.82c.43-1.43 1.08-2.76 1.91-3.96M4.26 14C4.1 13.36 4 12.69 4 12s.1-1.36.26-2h3.38c-.08.66-.14 1.32-.14 2s.06 1.34.14 2zm.82 2h2.95c.32 1.25.78 2.45 1.38 3.56-1.84-.63-3.37-1.9-4.33-3.56m2.95-8H5.08c.96-1.66 2.49-2.93 4.33-3.56C8.81 5.55 8.35 6.75 8.03 8M12 19.96c-.83-1.2-1.48-2.53-1.91-3.96h3.82c-.43 1.43-1.08 2.76-1.91 3.96M14.34 14H9.66c-.09-.66-.16-1.32-.16-2s.07-1.35.16-2h4.68c.09.65.16 1.32.16 2s-.07 1.34-.16 2m.25 5.56c.6-1.11 1.06-2.31 1.38-3.56h2.95c-.96 1.65-2.49 2.93-4.33 3.56M16.36 14c.08-.66.14-1.32.14-2s-.06-1.34-.14-2h3.38c.16.64.26 1.31.26 2s-.1 1.36-.26 2z"})),languageGrid="_languageGrid_1bgvs_2",languageItem="_languageItem_1bgvs_8",languageText="_languageText_1bgvs_63",styles={languageGrid,languageItem,languageText},LanguageSelector=()=>{const{i18n:e}=useTranslation(),t=useMantineTheme(),{colorScheme:i}=useMantineColorScheme(),[a,o]=reactExports.useState(!1),l=Object.entries(supportedLanguages).sort(([,h],[,p])=>h.localeCompare(p)).map(([h,p])=>({value:h,label:p})),u=h=>{e.changeLanguage(h),o(!1)},f=supportedLanguages[e.language]||supportedLanguages["en-GB"];return jsxRuntimeExports.jsxs(Menu,{opened:a,onChange:o,width:600,position:"bottom-start",offset:8,children:[jsxRuntimeExports.jsx(Menu.Target,{children:jsxRuntimeExports.jsx(Button,{variant:"subtle",size:"sm",leftSection:jsxRuntimeExports.jsx(LanguageIcon,{style:{fontSize:18}}),styles:{root:{border:"none",color:i==="dark"?t.colors.gray[3]:t.colors.gray[7],"&:hover":{backgroundColor:i==="dark"?t.colors.dark[5]:t.colors.gray[1]}},label:{fontSize:"12px",fontWeight:500}},children:jsxRuntimeExports.jsx("span",{className:styles.languageText,children:f})})}),jsxRuntimeExports.jsx(Menu.Dropdown,{style:{padding:"12px",borderRadius:"8px",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.1)",border:i==="dark"?`1px solid ${t.colors.dark[4]}`:`1px solid ${t.colors.gray[3]}`},children:jsxRuntimeExports.jsx(ScrollArea,{h:190,type:"scroll",children:jsxRuntimeExports.jsx("div",{className:styles.languageGrid,children:l.map(h=>jsxRuntimeExports.jsx("div",{className:styles.languageItem,children:jsxRuntimeExports.jsx(Button,{variant:"subtle",size:"sm",fullWidth:!0,onClick:()=>u(h.value),styles:{root:{borderRadius:"4px",minHeight:"32px",padding:"4px 8px",justifyContent:"flex-start",backgroundColor:h.value===e.language?i==="dark"?t.colors.blue[8]:t.colors.blue[1]:"transparent",color:h.value===e.language?i==="dark"?t.colors.blue[2]:t.colors.blue[7]:i==="dark"?t.colors.gray[3]:t.colors.gray[7],"&:hover":{backgroundColor:h.value===e.language?i==="dark"?t.colors.blue[7]:t.colors.blue[2]:i==="dark"?t.colors.dark[5]:t.colors.gray[1]}},label:{fontSize:"13px",fontWeight:h.value===e.language?600:400,textAlign:"left",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},children:h.label})},h.value))})})})]})},DarkModeIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9 9-4.03 9-9c0-.46-.04-.92-.1-1.36-.98 1.37-2.58 2.26-4.4 2.26-2.98 0-5.4-2.42-5.4-5.4 0-1.81.89-3.42 2.26-4.4-.44-.06-.9-.1-1.36-.1"})),LightModeIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5M2 13h2c.55 0 1-.45 1-1s-.45-1-1-1H2c-.55 0-1 .45-1 1s.45 1 1 1m18 0h2c.55 0 1-.45 1-1s-.45-1-1-1h-2c-.55 0-1 .45-1 1s.45 1 1 1M11 2v2c0 .55.45 1 1 1s1-.45 1-1V2c0-.55-.45-1-1-1s-1 .45-1 1m0 18v2c0 .55.45 1 1 1s1-.45 1-1v-2c0-.55-.45-1-1-1s-1 .45-1 1M5.99 4.58c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0s.39-1.03 0-1.41zm12.37 12.37c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0 .39-.39.39-1.03 0-1.41zm1.06-10.96c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0zM7.05 18.36c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0z"})),baseToolRegistry={split:{icon:jsxRuntimeExports.jsx(ContentCutIcon,{}),component:SplitPdfPanel,view:"viewer"},compress:{icon:jsxRuntimeExports.jsx(ZoomInMapIcon,{}),component:CompressPdfPanel,view:"viewer"},merge:{icon:jsxRuntimeExports.jsx(AddToPhotosIcon,{}),component:MergePdfPanel,view:"fileManager"}},VIEW_OPTIONS=[{label:jsxRuntimeExports.jsx(Group,{gap:4,children:jsxRuntimeExports.jsx(VisibilityIcon,{fontSize:"small"})}),value:"viewer"},{label:jsxRuntimeExports.jsx(Group,{gap:4,children:jsxRuntimeExports.jsx(EditNoteIcon,{fontSize:"small"})}),value:"pageEditor"},{label:jsxRuntimeExports.jsx(Group,{gap:4,children:jsxRuntimeExports.jsx(InsertDriveFileIcon,{fontSize:"small"})}),value:"fileManager"}];function getToolParams(e,t){switch(e){case"split":return{mode:t.get("splitMode")||"byPages",pages:t.get("pages")||"",hDiv:t.get("hDiv")||"0",vDiv:t.get("vDiv")||"1",merge:t.get("merge")==="true",splitType:t.get("splitType")||"size",splitValue:t.get("splitValue")||"",bookmarkLevel:t.get("bookmarkLevel")||"0",includeMetadata:t.get("includeMetadata")==="true",allowDuplicates:t.get("allowDuplicates")==="true"};case"compress":return{level:t.get("compressLevel")||"medium",keepQuality:t.get("keepQuality")==="true"};case"merge":return{order:t.get("mergeOrder")||"default",removeDuplicates:t.get("removeDuplicates")==="true"};default:return{}}}function updateToolParams(e,t,i,a){const o=new URLSearchParams(t);if(e==="split"){["splitMode","pages","hDiv","vDiv","merge","splitType","splitValue","bookmarkLevel","includeMetadata","allowDuplicates"].forEach(u=>o.delete(u));const l={...getToolParams("split",t),...a};o.set("splitMode",l.mode),l.mode==="byPages"?o.set("pages",l.pages):l.mode==="bySections"?(o.set("hDiv",l.hDiv),o.set("vDiv",l.vDiv),o.set("merge",String(l.merge))):l.mode==="bySizeOrCount"?(o.set("splitType",l.splitType),o.set("splitValue",l.splitValue)):l.mode==="byChapters"&&(o.set("bookmarkLevel",l.bookmarkLevel),o.set("includeMetadata",String(l.includeMetadata)),o.set("allowDuplicates",String(l.allowDuplicates)))}else if(e==="compress"){["compressLevel","keepQuality"].forEach(u=>o.delete(u));const l={...getToolParams("compress",t),...a};o.set("compressLevel",l.level),o.set("keepQuality",String(l.keepQuality))}else if(e==="merge"){["mergeOrder","removeDuplicates"].forEach(u=>o.delete(u));const l={...getToolParams("merge",t),...a};o.set("mergeOrder",l.order),o.set("removeDuplicates",String(l.removeDuplicates))}i(o,{replace:!0})}const TOOL_PARAMS={split:["splitMode","pages","hDiv","vDiv","merge","splitType","splitValue","bookmarkLevel","includeMetadata","allowDuplicates"],compress:["compressLevel","keepQuality"],merge:["mergeOrder","removeDuplicates"]};function HomePage(){const{t:e}=useTranslation(),[t,i]=useSearchParams(),a=useMantineTheme(),{colorScheme:o,toggleColorScheme:l}=useMantineColorScheme(),u={split:{...baseToolRegistry.split,name:e("home.split.title","Split PDF")},compress:{...baseToolRegistry.compress,name:e("home.compressPdfs.title","Compress PDF")},merge:{...baseToolRegistry.merge,name:e("home.merge.title","Merge PDFs")}},[f,h]=reactExports.useState(t.get("tool")||"split"),[p,m]=reactExports.useState(t.get("view")||"viewer"),[g,b]=reactExports.useState(null),[x,y]=reactExports.useState([]),[S,E]=reactExports.useState(null),[w,_]=reactExports.useState(!0),O=getToolParams(f,t),k=T=>updateToolParams(f,t,i,T);reactExports.useEffect(()=>{const T=new URLSearchParams(t);Object.entries(TOOL_PARAMS).forEach(([M,I])=>{M!==f&&I.forEach(G=>T.delete(G))});const j=Array.from(T.entries()).filter(([M])=>M!=="view"),P=new URLSearchParams;P.set("view",p),P.set("tool",f),j.forEach(([M,I])=>{M!=="tool"&&P.set(M,I)}),i(P,{replace:!0})},[f,p,i,t]);const A=reactExports.useCallback(T=>{var j;h(T),(j=u[T])!=null&&j.view&&m(u[T].view)},[u]),D=u[f],R=()=>!D||!D.component?jsxRuntimeExports.jsx("div",{children:"Tool not found"}):React.createElement(D.component,{files:x,setDownloadUrl:E,params:O,updateParams:k});return jsxRuntimeExports.jsxs(Group,{align:"flex-start",gap:0,style:{minHeight:"100vh",width:"100vw",overflow:"hidden",flexWrap:"nowrap",display:"flex"},children:[w&&jsxRuntimeExports.jsx(Box,{style:{minWidth:180,maxWidth:240,width:"16vw",height:"100vh",borderRight:`1px solid ${o==="dark"?a.colors.dark[4]:"#e9ecef"}`,background:o==="dark"?a.colors.dark[7]:"#fff",zIndex:101,display:"flex",flexDirection:"column"},children:jsxRuntimeExports.jsx(ToolPicker,{selectedToolKey:f,onSelect:A,toolRegistry:u})}),jsxRuntimeExports.jsxs(Box,{style:{flex:1,height:"100vh",minWidth:"20rem",position:"relative",display:"flex",flexDirection:"column",transition:"all 0.3s",background:o==="dark"?a.colors.dark[6]:"#f8f9fa"},children:[jsxRuntimeExports.jsxs("div",{style:{position:"absolute",left:0,width:"100%",top:0,zIndex:30,pointerEvents:"none"},children:[jsxRuntimeExports.jsxs("div",{style:{position:"absolute",left:16,top:"50%",transform:"translateY(-50%)",pointerEvents:"auto",display:"flex",gap:12,alignItems:"center"},children:[jsxRuntimeExports.jsx(Button,{onClick:l,variant:"subtle",size:"md","aria-label":"Toggle theme",children:o==="dark"?jsxRuntimeExports.jsx(LightModeIcon,{}):jsxRuntimeExports.jsx(DarkModeIcon,{})}),jsxRuntimeExports.jsx(LanguageSelector,{})]}),jsxRuntimeExports.jsx("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%",pointerEvents:"auto"},children:jsxRuntimeExports.jsx(SegmentedControl,{data:VIEW_OPTIONS,value:p,onChange:m,color:"blue",radius:"xl",size:"md",fullWidth:!0})})]}),jsxRuntimeExports.jsx(Paper,{radius:"0 0 xl xl",shadow:"sm",p:0,style:{flex:1,minHeight:0,marginTop:0,boxSizing:"border-box",overflow:"hidden",display:"flex",flexDirection:"column"},children:jsxRuntimeExports.jsx(Box,{style:{flex:1,minHeight:0},children:(p==="viewer"||p==="pageEditor")&&!g?jsxRuntimeExports.jsx(FileManager,{files:x,setFiles:y,setPdfFile:b,setCurrentView:m}):p==="viewer"?jsxRuntimeExports.jsx(Viewer,{pdfFile:g,setPdfFile:b,sidebarsVisible:w,setSidebarsVisible:_}):p==="pageEditor"?jsxRuntimeExports.jsx(PageEditor,{file:g,setFile:b,downloadUrl:S,setDownloadUrl:E}):jsxRuntimeExports.jsx(FileManager,{files:x,setFiles:y,setPdfFile:b,setCurrentView:m})})})]}),w&&jsxRuntimeExports.jsx(Box,{style:{minWidth:260,maxWidth:400,width:"22vw",height:"100vh",borderLeft:`1px solid ${o==="dark"?a.colors.dark[4]:"#e9ecef"}`,background:o==="dark"?a.colors.dark[7]:"#fff",padding:24,gap:16,zIndex:100,display:"flex",flexDirection:"column"},children:D&&D.component&&R()}),jsxRuntimeExports.jsx(Button,{variant:"light",color:"blue",size:"xs",style:{position:"fixed",top:16,right:16,zIndex:200},onClick:()=>_(T=>!T),children:e("sidebar.toggle",w?"Hide Sidebars":"Show Sidebars")})]})}function App(){return jsxRuntimeExports.jsx(HomePage,{})}const container=document.getElementById("root");if(!container)throw new Error("Root container missing in index.html");const root=ReactDOM$1.createRoot(container);root.render(jsxRuntimeExports.jsxs(React.StrictMode,{children:[jsxRuntimeExports.jsx(ColorSchemeScript,{}),jsxRuntimeExports.jsx(MantineProvider,{defaultColorScheme:"auto",children:jsxRuntimeExports.jsx(BrowserRouter,{children:jsxRuntimeExports.jsx(App,{})})})]}));export{commonjsGlobal as c,getDefaultExportFromCjs as g};
|