mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2025-06-14 03:25:02 +00:00
100 lines
1.0 MiB
100 lines
1.0 MiB
var og=Object.defineProperty;var gp=e=>{throw TypeError(e)};var sg=(e,t,i)=>t in e?og(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i;var Pt=(e,t,i)=>sg(e,typeof t!="symbol"?t+"":t,i),Jl=(e,t,i)=>t.has(e)||gp("Cannot "+i);var j=(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,o)=>(Jl(e,t,"write to private field"),o?o.call(e,i):t.set(e,i),i),me=(e,t,i)=>(Jl(e,t,"access private method"),i);var fi=(e,t,i,o)=>({set _(s){Ce(e,t,s,i)},get _(){return j(e,t,o)}});function _mergeNamespaces(e,t){for(var i=0;i<t.length;i++){const o=t[i];if(typeof o!="string"&&!Array.isArray(o)){for(const s in o)if(s!=="default"&&!(s in e)){const c=Object.getOwnPropertyDescriptor(o,s);c&&Object.defineProperty(e,s,c.get?c:{enumerable:!0,get:()=>o[s]})}}}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 s of document.querySelectorAll('link[rel="modulepreload"]'))o(s);new MutationObserver(s=>{for(const c of s)if(c.type==="childList")for(const d of c.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&o(d)}).observe(document,{childList:!0,subtree:!0});function i(s){const c={};return s.integrity&&(c.integrity=s.integrity),s.referrerPolicy&&(c.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?c.credentials="include":s.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function o(s){if(s.ep)return;s.ep=!0;const c=i(s);fetch(s.href,c)}})();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 o(){return this instanceof o?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(o){var s=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(i,o,s.get?s:{enumerable:!0,get:function(){return e[o]}})}),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(o,s,c){var d=null;if(c!==void 0&&(d=""+c),s.key!==void 0&&(d=""+s.key),"key"in s){c={};for(var p in s)p!=="key"&&(c[p]=s[p])}else c=s;return s=c.ref,{$$typeof:e,type:o,key:d,ref:s!==void 0?s:null,props:c}}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"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),d=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),v=Symbol.iterator;function y($){return $===null||typeof $!="object"?null:($=v&&$[v]||$["@@iterator"],typeof $=="function"?$:null)}var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b=Object.assign,S={};function A($,Y,z){this.props=$,this.context=Y,this.refs=S,this.updater=z||x}A.prototype.isReactComponent={},A.prototype.setState=function($,Y){if(typeof $!="object"&&typeof $!="function"&&$!=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,$,Y,"setState")},A.prototype.forceUpdate=function($){this.updater.enqueueForceUpdate(this,$,"forceUpdate")};function C(){}C.prototype=A.prototype;function T($,Y,z){this.props=$,this.context=Y,this.refs=S,this.updater=z||x}var k=T.prototype=new C;k.constructor=T,b(k,A.prototype),k.isPureReactComponent=!0;var D=Array.isArray,w={H:null,A:null,T:null,S:null,V:null},R=Object.prototype.hasOwnProperty;function _($,Y,z,O,F,H){return z=H.ref,{$$typeof:e,type:$,key:Y,ref:z!==void 0?z:null,props:H}}function M($,Y){return _($.type,Y,void 0,void 0,void 0,$.props)}function N($){return typeof $=="object"&&$!==null&&$.$$typeof===e}function P($){var Y={"=":"=0",":":"=2"};return"$"+$.replace(/[=:]/g,function(z){return Y[z]})}var L=/\/+/g;function I($,Y){return typeof $=="object"&&$!==null&&$.key!=null?P(""+$.key):Y.toString(36)}function W(){}function ae($){switch($.status){case"fulfilled":return $.value;case"rejected":throw $.reason;default:switch(typeof $.status=="string"?$.then(W,W):($.status="pending",$.then(function(Y){$.status==="pending"&&($.status="fulfilled",$.value=Y)},function(Y){$.status==="pending"&&($.status="rejected",$.reason=Y)})),$.status){case"fulfilled":return $.value;case"rejected":throw $.reason}}throw $}function Q($,Y,z,O,F){var H=typeof $;(H==="undefined"||H==="boolean")&&($=null);var X=!1;if($===null)X=!0;else switch(H){case"bigint":case"string":case"number":X=!0;break;case"object":switch($.$$typeof){case e:case t:X=!0;break;case h:return X=$._init,Q(X($._payload),Y,z,O,F)}}if(X)return F=F($),X=O===""?"."+I($,0):O,D(F)?(z="",X!=null&&(z=X.replace(L,"$&/")+"/"),Q(F,Y,z,"",function(ce){return ce})):F!=null&&(N(F)&&(F=M(F,z+(F.key==null||$&&$.key===F.key?"":(""+F.key).replace(L,"$&/")+"/")+X)),Y.push(F)),1;X=0;var te=O===""?".":O+":";if(D($))for(var J=0;J<$.length;J++)O=$[J],H=te+I(O,J),X+=Q(O,Y,z,H,F);else if(J=y($),typeof J=="function")for($=J.call($),J=0;!(O=$.next()).done;)O=O.value,H=te+I(O,J++),X+=Q(O,Y,z,H,F);else if(H==="object"){if(typeof $.then=="function")return Q(ae($),Y,z,O,F);throw Y=String($),Error("Objects are not valid as a React child (found: "+(Y==="[object Object]"?"object with keys {"+Object.keys($).join(", ")+"}":Y)+"). If you meant to render a collection of children, use an array instead.")}return X}function B($,Y,z){if($==null)return $;var O=[],F=0;return Q($,O,"","",function(H){return Y.call(z,H,F++)}),O}function q($){if($._status===-1){var Y=$._result;Y=Y(),Y.then(function(z){($._status===0||$._status===-1)&&($._status=1,$._result=z)},function(z){($._status===0||$._status===-1)&&($._status=2,$._result=z)}),$._status===-1&&($._status=0,$._result=Y)}if($._status===1)return $._result.default;throw $._result}var K=typeof reportError=="function"?reportError:function($){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Y=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof $=="object"&&$!==null&&typeof $.message=="string"?String($.message):String($),error:$});if(!window.dispatchEvent(Y))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",$);return}console.error($)};function U(){}return react_production.Children={map:B,forEach:function($,Y,z){B($,function(){Y.apply(this,arguments)},z)},count:function($){var Y=0;return B($,function(){Y++}),Y},toArray:function($){return B($,function(Y){return Y})||[]},only:function($){if(!N($))throw Error("React.Children.only expected to receive a single React element child.");return $}},react_production.Component=A,react_production.Fragment=i,react_production.Profiler=s,react_production.PureComponent=T,react_production.StrictMode=o,react_production.Suspense=m,react_production.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,react_production.__COMPILER_RUNTIME={__proto__:null,c:function($){return w.H.useMemoCache($)}},react_production.cache=function($){return function(){return $.apply(null,arguments)}},react_production.cloneElement=function($,Y,z){if($==null)throw Error("The argument must be a React element, but you passed "+$+".");var O=b({},$.props),F=$.key,H=void 0;if(Y!=null)for(X in Y.ref!==void 0&&(H=void 0),Y.key!==void 0&&(F=""+Y.key),Y)!R.call(Y,X)||X==="key"||X==="__self"||X==="__source"||X==="ref"&&Y.ref===void 0||(O[X]=Y[X]);var X=arguments.length-2;if(X===1)O.children=z;else if(1<X){for(var te=Array(X),J=0;J<X;J++)te[J]=arguments[J+2];O.children=te}return _($.type,F,void 0,void 0,H,O)},react_production.createContext=function($){return $={$$typeof:d,_currentValue:$,_currentValue2:$,_threadCount:0,Provider:null,Consumer:null},$.Provider=$,$.Consumer={$$typeof:c,_context:$},$},react_production.createElement=function($,Y,z){var O,F={},H=null;if(Y!=null)for(O in Y.key!==void 0&&(H=""+Y.key),Y)R.call(Y,O)&&O!=="key"&&O!=="__self"&&O!=="__source"&&(F[O]=Y[O]);var X=arguments.length-2;if(X===1)F.children=z;else if(1<X){for(var te=Array(X),J=0;J<X;J++)te[J]=arguments[J+2];F.children=te}if($&&$.defaultProps)for(O in X=$.defaultProps,X)F[O]===void 0&&(F[O]=X[O]);return _($,H,void 0,void 0,null,F)},react_production.createRef=function(){return{current:null}},react_production.forwardRef=function($){return{$$typeof:p,render:$}},react_production.isValidElement=N,react_production.lazy=function($){return{$$typeof:h,_payload:{_status:-1,_result:$},_init:q}},react_production.memo=function($,Y){return{$$typeof:f,type:$,compare:Y===void 0?null:Y}},react_production.startTransition=function($){var Y=w.T,z={};w.T=z;try{var O=$(),F=w.S;F!==null&&F(z,O),typeof O=="object"&&O!==null&&typeof O.then=="function"&&O.then(U,K)}catch(H){K(H)}finally{w.T=Y}},react_production.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},react_production.use=function($){return w.H.use($)},react_production.useActionState=function($,Y,z){return w.H.useActionState($,Y,z)},react_production.useCallback=function($,Y){return w.H.useCallback($,Y)},react_production.useContext=function($){return w.H.useContext($)},react_production.useDebugValue=function(){},react_production.useDeferredValue=function($,Y){return w.H.useDeferredValue($,Y)},react_production.useEffect=function($,Y,z){var O=w.H;if(typeof z=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return O.useEffect($,Y)},react_production.useId=function(){return w.H.useId()},react_production.useImperativeHandle=function($,Y,z){return w.H.useImperativeHandle($,Y,z)},react_production.useInsertionEffect=function($,Y){return w.H.useInsertionEffect($,Y)},react_production.useLayoutEffect=function($,Y){return w.H.useLayoutEffect($,Y)},react_production.useMemo=function($,Y){return w.H.useMemo($,Y)},react_production.useOptimistic=function($,Y){return w.H.useOptimistic($,Y)},react_production.useReducer=function($,Y,z){return w.H.useReducer($,Y,z)},react_production.useRef=function($){return w.H.useRef($)},react_production.useState=function($){return w.H.useState($)},react_production.useSyncExternalStore=function($,Y,z){return w.H.useSyncExternalStore($,Y,z)},react_production.useTransition=function(){return w.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,q){var K=B.length;B.push(q);e:for(;0<K;){var U=K-1>>>1,$=B[U];if(0<s($,q))B[U]=q,B[K]=$,K=U;else break e}}function i(B){return B.length===0?null:B[0]}function o(B){if(B.length===0)return null;var q=B[0],K=B.pop();if(K!==q){B[0]=K;e:for(var U=0,$=B.length,Y=$>>>1;U<Y;){var z=2*(U+1)-1,O=B[z],F=z+1,H=B[F];if(0>s(O,K))F<$&&0>s(H,O)?(B[U]=H,B[F]=K,U=F):(B[U]=O,B[z]=K,U=z);else if(F<$&&0>s(H,K))B[U]=H,B[F]=K,U=F;else break e}}return q}function s(B,q){var K=B.sortIndex-q.sortIndex;return K!==0?K:B.id-q.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;e.unstable_now=function(){return c.now()}}else{var d=Date,p=d.now();e.unstable_now=function(){return d.now()-p}}var m=[],f=[],h=1,v=null,y=3,x=!1,b=!1,S=!1,A=!1,C=typeof setTimeout=="function"?setTimeout:null,T=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;function D(B){for(var q=i(f);q!==null;){if(q.callback===null)o(f);else if(q.startTime<=B)o(f),q.sortIndex=q.expirationTime,t(m,q);else break;q=i(f)}}function w(B){if(S=!1,D(B),!b)if(i(m)!==null)b=!0,R||(R=!0,I());else{var q=i(f);q!==null&&Q(w,q.startTime-B)}}var R=!1,_=-1,M=5,N=-1;function P(){return A?!0:!(e.unstable_now()-N<M)}function L(){if(A=!1,R){var B=e.unstable_now();N=B;var q=!0;try{e:{b=!1,S&&(S=!1,T(_),_=-1),x=!0;var K=y;try{t:{for(D(B),v=i(m);v!==null&&!(v.expirationTime>B&&P());){var U=v.callback;if(typeof U=="function"){v.callback=null,y=v.priorityLevel;var $=U(v.expirationTime<=B);if(B=e.unstable_now(),typeof $=="function"){v.callback=$,D(B),q=!0;break t}v===i(m)&&o(m),D(B)}else o(m);v=i(m)}if(v!==null)q=!0;else{var Y=i(f);Y!==null&&Q(w,Y.startTime-B),q=!1}}break e}finally{v=null,y=K,x=!1}q=void 0}}finally{q?I():R=!1}}}var I;if(typeof k=="function")I=function(){k(L)};else if(typeof MessageChannel<"u"){var W=new MessageChannel,ae=W.port2;W.port1.onmessage=L,I=function(){ae.postMessage(null)}}else I=function(){C(L,0)};function Q(B,q){_=C(function(){B(e.unstable_now())},q)}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"):M=0<B?Math.floor(1e3/B):5},e.unstable_getCurrentPriorityLevel=function(){return y},e.unstable_next=function(B){switch(y){case 1:case 2:case 3:var q=3;break;default:q=y}var K=y;y=q;try{return B()}finally{y=K}},e.unstable_requestPaint=function(){A=!0},e.unstable_runWithPriority=function(B,q){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var K=y;y=B;try{return q()}finally{y=K}},e.unstable_scheduleCallback=function(B,q,K){var U=e.unstable_now();switch(typeof K=="object"&&K!==null?(K=K.delay,K=typeof K=="number"&&0<K?U+K:U):K=U,B){case 1:var $=-1;break;case 2:$=250;break;case 5:$=1073741823;break;case 4:$=1e4;break;default:$=5e3}return $=K+$,B={id:h++,callback:q,priorityLevel:B,startTime:K,expirationTime:$,sortIndex:-1},K>U?(B.sortIndex=K,t(f,B),i(m)===null&&B===i(f)&&(S?(T(_),_=-1):S=!0,Q(w,K-U))):(B.sortIndex=$,t(m,B),b||x||(b=!0,R||(R=!0,I()))),B},e.unstable_shouldYield=P,e.unstable_wrapCallback=function(B){var q=y;return function(){var K=y;y=q;try{return B.apply(this,arguments)}finally{y=K}}}}(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(m){var f="https://react.dev/errors/"+m;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var h=2;h<arguments.length;h++)f+="&args[]="+encodeURIComponent(arguments[h])}return"Minified React error #"+m+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var o={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},s=Symbol.for("react.portal");function c(m,f,h){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:v==null?null:""+v,children:m,containerInfo:f,implementation:h}}var d=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function p(m,f){if(m==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return reactDom_production.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,reactDom_production.createPortal=function(m,f){var h=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(t(299));return c(m,f,null,h)},reactDom_production.flushSync=function(m){var f=d.T,h=o.p;try{if(d.T=null,o.p=2,m)return m()}finally{d.T=f,o.p=h,o.d.f()}},reactDom_production.preconnect=function(m,f){typeof m=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,o.d.C(m,f))},reactDom_production.prefetchDNS=function(m){typeof m=="string"&&o.d.D(m)},reactDom_production.preinit=function(m,f){if(typeof m=="string"&&f&&typeof f.as=="string"){var h=f.as,v=p(h,f.crossOrigin),y=typeof f.integrity=="string"?f.integrity:void 0,x=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;h==="style"?o.d.S(m,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:v,integrity:y,fetchPriority:x}):h==="script"&&o.d.X(m,{crossOrigin:v,integrity:y,fetchPriority:x,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},reactDom_production.preinitModule=function(m,f){if(typeof m=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var h=p(f.as,f.crossOrigin);o.d.M(m,{crossOrigin:h,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&o.d.M(m)},reactDom_production.preload=function(m,f){if(typeof m=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var h=f.as,v=p(h,f.crossOrigin);o.d.L(m,h,{crossOrigin:v,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},reactDom_production.preloadModule=function(m,f){if(typeof m=="string")if(f){var h=p(f.as,f.crossOrigin);o.d.m(m,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:h,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else o.d.m(m)},reactDom_production.requestFormReset=function(m){o.d.r(m)},reactDom_production.unstable_batchedUpdates=function(m,f){return m(f)},reactDom_production.useFormState=function(m,f,h){return d.H.useFormState(m,f,h)},reactDom_production.useFormStatus=function(){return d.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 o(n){var a="https://react.dev/errors/"+n;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)a+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+n+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function c(n){var a=n,l=n;if(n.alternate)for(;a.return;)a=a.return;else{n=a;do a=n,(a.flags&4098)!==0&&(l=a.return),n=a.return;while(n)}return a.tag===3?l:null}function d(n){if(n.tag===13){var a=n.memoizedState;if(a===null&&(n=n.alternate,n!==null&&(a=n.memoizedState)),a!==null)return a.dehydrated}return null}function p(n){if(c(n)!==n)throw Error(o(188))}function m(n){var a=n.alternate;if(!a){if(a=c(n),a===null)throw Error(o(188));return a!==n?null:n}for(var l=n,u=a;;){var g=l.return;if(g===null)break;var E=g.alternate;if(E===null){if(u=g.return,u!==null){l=u;continue}break}if(g.child===E.child){for(E=g.child;E;){if(E===l)return p(g),n;if(E===u)return p(g),a;E=E.sibling}throw Error(o(188))}if(l.return!==u.return)l=g,u=E;else{for(var V=!1,Z=g.child;Z;){if(Z===l){V=!0,l=g,u=E;break}if(Z===u){V=!0,u=g,l=E;break}Z=Z.sibling}if(!V){for(Z=E.child;Z;){if(Z===l){V=!0,l=E,u=g;break}if(Z===u){V=!0,u=E,l=g;break}Z=Z.sibling}if(!V)throw Error(o(189))}}if(l.alternate!==u)throw Error(o(190))}if(l.tag!==3)throw Error(o(188));return l.stateNode.current===l?n:a}function f(n){var a=n.tag;if(a===5||a===26||a===27||a===6)return n;for(n=n.child;n!==null;){if(a=f(n),a!==null)return a;n=n.sibling}return null}var h=Object.assign,v=Symbol.for("react.element"),y=Symbol.for("react.transitional.element"),x=Symbol.for("react.portal"),b=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),A=Symbol.for("react.profiler"),C=Symbol.for("react.provider"),T=Symbol.for("react.consumer"),k=Symbol.for("react.context"),D=Symbol.for("react.forward_ref"),w=Symbol.for("react.suspense"),R=Symbol.for("react.suspense_list"),_=Symbol.for("react.memo"),M=Symbol.for("react.lazy"),N=Symbol.for("react.activity"),P=Symbol.for("react.memo_cache_sentinel"),L=Symbol.iterator;function I(n){return n===null||typeof n!="object"?null:(n=L&&n[L]||n["@@iterator"],typeof n=="function"?n:null)}var W=Symbol.for("react.client.reference");function ae(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===W?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case b:return"Fragment";case A:return"Profiler";case S:return"StrictMode";case w:return"Suspense";case R:return"SuspenseList";case N:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case x:return"Portal";case k:return(n.displayName||"Context")+".Provider";case T:return(n._context.displayName||"Context")+".Consumer";case D:var a=n.render;return n=n.displayName,n||(n=a.displayName||a.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case _:return a=n.displayName||null,a!==null?a:ae(n.type)||"Memo";case M:a=n._payload,n=n._init;try{return ae(n(a))}catch{}}return null}var Q=Array.isArray,B=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,q=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,K={pending:!1,data:null,method:null,action:null},U=[],$=-1;function Y(n){return{current:n}}function z(n){0>$||(n.current=U[$],U[$]=null,$--)}function O(n,a){$++,U[$]=n.current,n.current=a}var F=Y(null),H=Y(null),X=Y(null),te=Y(null);function J(n,a){switch(O(X,a),O(H,n),O(F,null),a.nodeType){case 9:case 11:n=(n=a.documentElement)&&(n=n.namespaceURI)?Vf(n):0;break;default:if(n=a.tagName,a=a.namespaceURI)a=Vf(a),n=qf(a,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}z(F),O(F,n)}function ce(){z(F),z(H),z(X)}function ue(n){n.memoizedState!==null&&O(te,n);var a=F.current,l=qf(a,n.type);a!==l&&(O(H,n),O(F,l))}function Ae(n){H.current===n&&(z(F),z(H)),te.current===n&&(z(te),si._currentValue=K)}var Ee=Object.prototype.hasOwnProperty,Me=e.unstable_scheduleCallback,je=e.unstable_cancelCallback,ke=e.unstable_shouldYield,ge=e.unstable_requestPaint,oe=e.unstable_now,G=e.unstable_getCurrentPriorityLevel,ee=e.unstable_ImmediatePriority,de=e.unstable_UserBlockingPriority,pe=e.unstable_NormalPriority,ve=e.unstable_LowPriority,Te=e.unstable_IdlePriority,se=e.log,re=e.unstable_setDisableYieldValue,$e=null,Le=null;function Xe(n){if(typeof se=="function"&&re(n),Le&&typeof Le.setStrictMode=="function")try{Le.setStrictMode($e,n)}catch{}}var qe=Math.clz32?Math.clz32:Je,at=Math.log,We=Math.LN2;function Je(n){return n>>>=0,n===0?32:31-(at(n)/We|0)|0}var ct=256,st=4194304;function De(n){var a=n&42;if(a!==0)return a;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 be(n,a,l){var u=n.pendingLanes;if(u===0)return 0;var g=0,E=n.suspendedLanes,V=n.pingedLanes;n=n.warmLanes;var Z=u&134217727;return Z!==0?(u=Z&~E,u!==0?g=De(u):(V&=Z,V!==0?g=De(V):l||(l=Z&~n,l!==0&&(g=De(l))))):(Z=u&~E,Z!==0?g=De(Z):V!==0?g=De(V):l||(l=u&~n,l!==0&&(g=De(l)))),g===0?0:a!==0&&a!==g&&(a&E)===0&&(E=g&-g,l=a&-a,E>=l||E===32&&(l&4194048)!==0)?a:g}function xe(n,a){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&a)===0}function Qe(n,a){switch(n){case 1:case 2:case 4:case 8:case 64:return a+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 a+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=st;return st<<=1,(st&62914560)===0&&(st=4194304),n}function le(n){for(var a=[],l=0;31>l;l++)a.push(n);return a}function Ne(n,a){n.pendingLanes|=a,a!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function Ge(n,a,l,u,g,E){var V=n.pendingLanes;n.pendingLanes=l,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=l,n.entangledLanes&=l,n.errorRecoveryDisabledLanes&=l,n.shellSuspendCounter=0;var Z=n.entanglements,fe=n.expirationTimes,Oe=n.hiddenUpdates;for(l=V&~l;0<l;){var Ue=31-qe(l),Ve=1<<Ue;Z[Ue]=0,fe[Ue]=-1;var Fe=Oe[Ue];if(Fe!==null)for(Oe[Ue]=null,Ue=0;Ue<Fe.length;Ue++){var ze=Fe[Ue];ze!==null&&(ze.lane&=-536870913)}l&=~Ve}u!==0&&nt(n,u,0),E!==0&&g===0&&n.tag!==0&&(n.suspendedLanes|=E&~(V&~a))}function nt(n,a,l){n.pendingLanes|=a,n.suspendedLanes&=~a;var u=31-qe(a);n.entangledLanes|=a,n.entanglements[u]=n.entanglements[u]|1073741824|l&4194090}function it(n,a){var l=n.entangledLanes|=a;for(n=n.entanglements;l;){var u=31-qe(l),g=1<<u;g&a|n[u]&a&&(n[u]|=a),l&=~g}}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 ie(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function ne(){var n=q.p;return n!==0?n:(n=window.event,n===void 0?32:up(n.type))}function he(n,a){var l=q.p;try{return q.p=n,a()}finally{q.p=l}}var _e=Math.random().toString(36).slice(2),Re="__reactFiber$"+_e,Ie="__reactProps$"+_e,Be="__reactContainer$"+_e,et="__reactEvents$"+_e,tt="__reactListeners$"+_e,Ye="__reactHandles$"+_e,ut="__reactResources$"+_e,Ze="__reactMarker$"+_e;function rt(n){delete n[Re],delete n[Ie],delete n[et],delete n[tt],delete n[Ye]}function ot(n){var a=n[Re];if(a)return a;for(var l=n.parentNode;l;){if(a=l[Be]||l[Re]){if(l=a.alternate,a.child!==null||l!==null&&l.child!==null)for(n=Xf(n);n!==null;){if(l=n[Re])return l;n=Xf(n)}return a}n=l,l=n.parentNode}return null}function ft(n){if(n=n[Re]||n[Be]){var a=n.tag;if(a===5||a===6||a===13||a===26||a===27||a===3)return n}return null}function bt(n){var a=n.tag;if(a===5||a===26||a===27||a===6)return n.stateNode;throw Error(o(33))}function xt(n){var a=n[ut];return a||(a=n[ut]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function Et(n){n[Ze]=!0}var Lt=new Set,mn={};function Jt(n,a){tn(n,a),tn(n+"Capture",a)}function tn(n,a){for(mn[n]=a,n=0;n<a.length;n++)Lt.add(a[n])}var xi=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:xi.test(n)?Lc[n]=!0:(jc[n]=!0,!1)}function Si(n,a,l){if(Zp(a))if(l===null)n.removeAttribute(a);else{switch(typeof l){case"undefined":case"function":case"symbol":n.removeAttribute(a);return;case"boolean":var u=a.toLowerCase().slice(0,5);if(u!=="data-"&&u!=="aria-"){n.removeAttribute(a);return}}n.setAttribute(a,""+l)}}function Ei(n,a,l){if(l===null)n.removeAttribute(a);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(a);return}n.setAttribute(a,""+l)}}function jn(n,a,l,u){if(u===null)n.removeAttribute(l);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(l);return}n.setAttributeNS(a,l,""+u)}}var Go,Nc;function Lr(n){if(Go===void 0)try{throw Error()}catch(l){var a=l.stack.trim().match(/\n( *(at )?)/);Go=a&&a[1]||"",Nc=-1<l.stack.indexOf(`
|
||
at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
|
||
`+Go+n+Nc}var Wo=!1;function Yo(n,a){if(!n||Wo)return"";Wo=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(a){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 Fe=ze}Reflect.construct(n,[],Ve)}else{try{Ve.call()}catch(ze){Fe=ze}n.call(Ve.prototype)}}else{try{throw Error()}catch(ze){Fe=ze}(Ve=n())&&typeof Ve.catch=="function"&&Ve.catch(function(){})}}catch(ze){if(ze&&Fe&&typeof ze.stack=="string")return[ze.stack,Fe.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var g=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");g&&g.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var E=u.DetermineComponentFrameRoot(),V=E[0],Z=E[1];if(V&&Z){var fe=V.split(`
|
||
`),Oe=Z.split(`
|
||
`);for(g=u=0;u<fe.length&&!fe[u].includes("DetermineComponentFrameRoot");)u++;for(;g<Oe.length&&!Oe[g].includes("DetermineComponentFrameRoot");)g++;if(u===fe.length||g===Oe.length)for(u=fe.length-1,g=Oe.length-1;1<=u&&0<=g&&fe[u]!==Oe[g];)g--;for(;1<=u&&0<=g;u--,g--)if(fe[u]!==Oe[g]){if(u!==1||g!==1)do if(u--,g--,0>g||fe[u]!==Oe[g]){var Ue=`
|
||
`+fe[u].replace(" at new "," at ");return n.displayName&&Ue.includes("<anonymous>")&&(Ue=Ue.replace("<anonymous>",n.displayName)),Ue}while(1<=u&&0<=g);break}}}finally{Wo=!1,Error.prepareStackTrace=l}return(l=n?n.displayName||n.name:"")?Lr(l):""}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 Yo(n.type,!1);case 11:return Yo(n.type.render,!1);case 1:return Yo(n.type,!0);case 31:return Lr("Activity");default:return""}}function Fc(n){try{var a="";do a+=Jp(n),n=n.return;while(n);return a}catch(l){return`
|
||
Error generating stack: `+l.message+`
|
||
`+l.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 $c(n){var a=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function eh(n){var a=$c(n)?"checked":"value",l=Object.getOwnPropertyDescriptor(n.constructor.prototype,a),u=""+n[a];if(!n.hasOwnProperty(a)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var g=l.get,E=l.set;return Object.defineProperty(n,a,{configurable:!0,get:function(){return g.call(this)},set:function(V){u=""+V,E.call(this,V)}}),Object.defineProperty(n,a,{enumerable:l.enumerable}),{getValue:function(){return u},setValue:function(V){u=""+V},stopTracking:function(){n._valueTracker=null,delete n[a]}}}}function Ai(n){n._valueTracker||(n._valueTracker=eh(n))}function Ic(n){if(!n)return!1;var a=n._valueTracker;if(!a)return!0;var l=a.getValue(),u="";return n&&(u=$c(n)?n.checked?"true":"false":n.value),n=u,n!==l?(a.setValue(n),!0):!1}function Ci(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(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function Xo(n,a,l,u,g,E,V,Z){n.name="",V!=null&&typeof V!="function"&&typeof V!="symbol"&&typeof V!="boolean"?n.type=V:n.removeAttribute("type"),a!=null?V==="number"?(a===0&&n.value===""||n.value!=a)&&(n.value=""+gn(a)):n.value!==""+gn(a)&&(n.value=""+gn(a)):V!=="submit"&&V!=="reset"||n.removeAttribute("value"),a!=null?Ko(n,V,gn(a)):l!=null?Ko(n,V,gn(l)):u!=null&&n.removeAttribute("value"),g==null&&E!=null&&(n.defaultChecked=!!E),g!=null&&(n.checked=g&&typeof g!="function"&&typeof g!="symbol"),Z!=null&&typeof Z!="function"&&typeof Z!="symbol"&&typeof Z!="boolean"?n.name=""+gn(Z):n.removeAttribute("name")}function zc(n,a,l,u,g,E,V,Z){if(E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"&&(n.type=E),a!=null||l!=null){if(!(E!=="submit"&&E!=="reset"||a!=null))return;l=l!=null?""+gn(l):"",a=a!=null?""+gn(a):l,Z||a===n.value||(n.value=a),n.defaultValue=a}u=u??g,u=typeof u!="function"&&typeof u!="symbol"&&!!u,n.checked=Z?n.checked:!!u,n.defaultChecked=!!u,V!=null&&typeof V!="function"&&typeof V!="symbol"&&typeof V!="boolean"&&(n.name=V)}function Ko(n,a,l){a==="number"&&Ci(n.ownerDocument)===n||n.defaultValue===""+l||(n.defaultValue=""+l)}function Nr(n,a,l,u){if(n=n.options,a){a={};for(var g=0;g<l.length;g++)a["$"+l[g]]=!0;for(l=0;l<n.length;l++)g=a.hasOwnProperty("$"+n[l].value),n[l].selected!==g&&(n[l].selected=g),g&&u&&(n[l].defaultSelected=!0)}else{for(l=""+gn(l),a=null,g=0;g<n.length;g++){if(n[g].value===l){n[g].selected=!0,u&&(n[g].defaultSelected=!0);return}a!==null||n[g].disabled||(a=n[g])}a!==null&&(a.selected=!0)}}function Bc(n,a,l){if(a!=null&&(a=""+gn(a),a!==n.value&&(n.value=a),l==null)){n.defaultValue!==a&&(n.defaultValue=a);return}n.defaultValue=l!=null?""+gn(l):""}function Uc(n,a,l,u){if(a==null){if(u!=null){if(l!=null)throw Error(o(92));if(Q(u)){if(1<u.length)throw Error(o(93));u=u[0]}l=u}l==null&&(l=""),a=l}l=gn(a),n.defaultValue=l,u=n.textContent,u===l&&u!==""&&u!==null&&(n.value=u)}function Fr(n,a){if(a){var l=n.firstChild;if(l&&l===n.lastChild&&l.nodeType===3){l.nodeValue=a;return}}n.textContent=a}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,a,l){var u=a.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?u?n.setProperty(a,""):a==="float"?n.cssFloat="":n[a]="":u?n.setProperty(a,l):typeof l!="number"||l===0||nh.has(a)?a==="float"?n.cssFloat=l:n[a]=(""+l).trim():n[a]=l+"px"}function Vc(n,a,l){if(a!=null&&typeof a!="object")throw Error(o(62));if(n=n.style,l!=null){for(var u in l)!l.hasOwnProperty(u)||a!=null&&a.hasOwnProperty(u)||(u.indexOf("--")===0?n.setProperty(u,""):u==="float"?n.cssFloat="":n[u]="");for(var g in a)u=a[g],a.hasOwnProperty(g)&&l[g]!==u&&Hc(n,g,u)}else for(var E in a)a.hasOwnProperty(E)&&Hc(n,E,a[E])}function Qo(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"]]),ah=/^[\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 wi(n){return ah.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}var Zo=null;function Jo(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var $r=null,Ir=null;function qc(n){var a=ft(n);if(a&&(n=a.stateNode)){var l=n[Ie]||null;e:switch(n=a.stateNode,a.type){case"input":if(Xo(n,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),a=l.name,l.type==="radio"&&a!=null){for(l=n;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+vn(""+a)+'"][type="radio"]'),a=0;a<l.length;a++){var u=l[a];if(u!==n&&u.form===n.form){var g=u[Ie]||null;if(!g)throw Error(o(90));Xo(u,g.value,g.defaultValue,g.defaultValue,g.checked,g.defaultChecked,g.type,g.name)}}for(a=0;a<l.length;a++)u=l[a],u.form===n.form&&Ic(u)}break e;case"textarea":Bc(n,l.value,l.defaultValue);break e;case"select":a=l.value,a!=null&&Nr(n,!!l.multiple,a,!1)}}}var ts=!1;function Gc(n,a,l){if(ts)return n(a,l);ts=!0;try{var u=n(a);return u}finally{if(ts=!1,($r!==null||Ir!==null)&&(uo(),$r&&(a=$r,n=Ir,Ir=$r=null,qc(a),n)))for(a=0;a<n.length;a++)qc(n[a])}}function xa(n,a){var l=n.stateNode;if(l===null)return null;var u=l[Ie]||null;if(u===null)return null;l=u[a];e:switch(a){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(u=!u.disabled)||(n=n.type,u=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!u;break e;default:n=!1}if(n)return null;if(l&&typeof l!="function")throw Error(o(231,a,typeof l));return l}var Ln=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ns=!1;if(Ln)try{var Sa={};Object.defineProperty(Sa,"passive",{get:function(){ns=!0}}),window.addEventListener("test",Sa,Sa),window.removeEventListener("test",Sa,Sa)}catch{ns=!1}var Kn=null,rs=null,_i=null;function Wc(){if(_i)return _i;var n,a=rs,l=a.length,u,g="value"in Kn?Kn.value:Kn.textContent,E=g.length;for(n=0;n<l&&a[n]===g[n];n++);var V=l-n;for(u=1;u<=V&&a[l-u]===g[E-u];u++);return _i=g.slice(n,1<u?1-u:void 0)}function Ri(n){var a=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&a===13&&(n=13)):n=a,n===10&&(n=13),32<=n||n===13?n:0}function Ti(){return!0}function Yc(){return!1}function rn(n){function a(l,u,g,E,V){this._reactName=l,this._targetInst=g,this.type=u,this.nativeEvent=E,this.target=V,this.currentTarget=null;for(var Z in n)n.hasOwnProperty(Z)&&(l=n[Z],this[Z]=l?l(E):E[Z]);return this.isDefaultPrevented=(E.defaultPrevented!=null?E.defaultPrevented:E.returnValue===!1)?Ti:Yc,this.isPropagationStopped=Yc,this}return h(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Ti)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Ti)},persist:function(){},isPersistent:Ti}),a}var br={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ki=rn(br),Ea=h({},br,{view:0,detail:0}),ih=rn(Ea),as,is,Aa,Pi=h({},Ea,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ss,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!==Aa&&(Aa&&n.type==="mousemove"?(as=n.screenX-Aa.screenX,is=n.screenY-Aa.screenY):is=as=0,Aa=n),as)},movementY:function(n){return"movementY"in n?n.movementY:is}}),Xc=rn(Pi),oh=h({},Pi,{dataTransfer:0}),sh=rn(oh),lh=h({},Ea,{relatedTarget:0}),os=rn(lh),ch=h({},br,{animationName:0,elapsedTime:0,pseudoElement:0}),uh=rn(ch),dh=h({},br,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),fh=rn(dh),ph=h({},br,{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 a=this.nativeEvent;return a.getModifierState?a.getModifierState(n):(n=gh[n])?!!a[n]:!1}function ss(){return vh}var bh=h({},Ea,{key:function(n){if(n.key){var a=hh[n.key]||n.key;if(a!=="Unidentified")return a}return n.type==="keypress"?(n=Ri(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:ss,charCode:function(n){return n.type==="keypress"?Ri(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?Ri(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),yh=rn(bh),xh=h({},Pi,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Qc=rn(xh),Sh=h({},Ea,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ss}),Eh=rn(Sh),Ah=h({},br,{propertyName:0,elapsedTime:0,pseudoElement:0}),Ch=rn(Ah),wh=h({},Pi,{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}),_h=rn(wh),Rh=h({},br,{newState:0,oldState:0}),Th=rn(Rh),kh=[9,13,27,32],ls=Ln&&"CompositionEvent"in window,Ca=null;Ln&&"documentMode"in document&&(Ca=document.documentMode);var Ph=Ln&&"TextEvent"in window&&!Ca,Zc=Ln&&(!ls||Ca&&8<Ca&&11>=Ca),Jc=" ",eu=!1;function tu(n,a){switch(n){case"keyup":return kh.indexOf(a.keyCode)!==-1;case"keydown":return a.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 Dh(n,a){switch(n){case"compositionend":return nu(a);case"keypress":return a.which!==32?null:(eu=!0,Jc);case"textInput":return n=a.data,n===Jc&&eu?null:n;default:return null}}function Mh(n,a){if(zr)return n==="compositionend"||!ls&&tu(n,a)?(n=Wc(),_i=rs=Kn=null,zr=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1<a.char.length)return a.char;if(a.which)return String.fromCharCode(a.which)}return null;case"compositionend":return Zc&&a.locale!=="ko"?null:a.data;default:return null}}var Oh={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 a=n&&n.nodeName&&n.nodeName.toLowerCase();return a==="input"?!!Oh[n.type]:a==="textarea"}function au(n,a,l,u){$r?Ir?Ir.push(u):Ir=[u]:$r=u,a=vo(a,"onChange"),0<a.length&&(l=new ki("onChange","change",null,l,u),n.push({event:l,listeners:a}))}var wa=null,_a=null;function jh(n){If(n,0)}function Di(n){var a=bt(n);if(Ic(a))return n}function iu(n,a){if(n==="change")return a}var ou=!1;if(Ln){var cs;if(Ln){var us="oninput"in document;if(!us){var su=document.createElement("div");su.setAttribute("oninput","return;"),us=typeof su.oninput=="function"}cs=us}else cs=!1;ou=cs&&(!document.documentMode||9<document.documentMode)}function lu(){wa&&(wa.detachEvent("onpropertychange",cu),_a=wa=null)}function cu(n){if(n.propertyName==="value"&&Di(_a)){var a=[];au(a,_a,n,Jo(n)),Gc(jh,a)}}function Lh(n,a,l){n==="focusin"?(lu(),wa=a,_a=l,wa.attachEvent("onpropertychange",cu)):n==="focusout"&&lu()}function Nh(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return Di(_a)}function Fh(n,a){if(n==="click")return Di(a)}function $h(n,a){if(n==="input"||n==="change")return Di(a)}function Ih(n,a){return n===a&&(n!==0||1/n===1/a)||n!==n&&a!==a}var ln=typeof Object.is=="function"?Object.is:Ih;function Ra(n,a){if(ln(n,a))return!0;if(typeof n!="object"||n===null||typeof a!="object"||a===null)return!1;var l=Object.keys(n),u=Object.keys(a);if(l.length!==u.length)return!1;for(u=0;u<l.length;u++){var g=l[u];if(!Ee.call(a,g)||!ln(n[g],a[g]))return!1}return!0}function uu(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function du(n,a){var l=uu(n);n=0;for(var u;l;){if(l.nodeType===3){if(u=n+l.textContent.length,n<=a&&u>=a)return{node:l,offset:a-n};n=u}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=uu(l)}}function fu(n,a){return n&&a?n===a?!0:n&&n.nodeType===3?!1:a&&a.nodeType===3?fu(n,a.parentNode):"contains"in n?n.contains(a):n.compareDocumentPosition?!!(n.compareDocumentPosition(a)&16):!1:!1}function pu(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var a=Ci(n.document);a instanceof n.HTMLIFrameElement;){try{var l=typeof a.contentWindow.location.href=="string"}catch{l=!1}if(l)n=a.contentWindow;else break;a=Ci(n.document)}return a}function ds(n){var a=n&&n.nodeName&&n.nodeName.toLowerCase();return a&&(a==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||a==="textarea"||n.contentEditable==="true")}var zh=Ln&&"documentMode"in document&&11>=document.documentMode,Br=null,fs=null,Ta=null,ps=!1;function hu(n,a,l){var u=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;ps||Br==null||Br!==Ci(u)||(u=Br,"selectionStart"in u&&ds(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),Ta&&Ra(Ta,u)||(Ta=u,u=vo(fs,"onSelect"),0<u.length&&(a=new ki("onSelect","select",null,a,l),n.push({event:a,listeners:u}),a.target=Br)))}function yr(n,a){var l={};return l[n.toLowerCase()]=a.toLowerCase(),l["Webkit"+n]="webkit"+a,l["Moz"+n]="moz"+a,l}var Ur={animationend:yr("Animation","AnimationEnd"),animationiteration:yr("Animation","AnimationIteration"),animationstart:yr("Animation","AnimationStart"),transitionrun:yr("Transition","TransitionRun"),transitionstart:yr("Transition","TransitionStart"),transitioncancel:yr("Transition","TransitionCancel"),transitionend:yr("Transition","TransitionEnd")},hs={},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(hs[n])return hs[n];if(!Ur[n])return n;var a=Ur[n],l;for(l in a)if(a.hasOwnProperty(l)&&l in mu)return hs[n]=a[l];return n}var gu=xr("animationend"),vu=xr("animationiteration"),bu=xr("animationstart"),Bh=xr("transitionrun"),Uh=xr("transitionstart"),Hh=xr("transitioncancel"),yu=xr("transitionend"),xu=new Map,ms="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(" ");ms.push("scrollEnd");function _n(n,a){xu.set(n,a),Jt(a,[n])}var Su=new WeakMap;function bn(n,a){if(typeof n=="object"&&n!==null){var l=Su.get(n);return l!==void 0?l:(a={value:n,source:a,stack:Fc(a)},Su.set(n,a),a)}return{value:n,source:a,stack:Fc(a)}}var yn=[],Hr=0,gs=0;function Mi(){for(var n=Hr,a=gs=Hr=0;a<n;){var l=yn[a];yn[a++]=null;var u=yn[a];yn[a++]=null;var g=yn[a];yn[a++]=null;var E=yn[a];if(yn[a++]=null,u!==null&&g!==null){var V=u.pending;V===null?g.next=g:(g.next=V.next,V.next=g),u.pending=g}E!==0&&Eu(l,g,E)}}function Oi(n,a,l,u){yn[Hr++]=n,yn[Hr++]=a,yn[Hr++]=l,yn[Hr++]=u,gs|=u,n.lanes|=u,n=n.alternate,n!==null&&(n.lanes|=u)}function vs(n,a,l,u){return Oi(n,a,l,u),ji(n)}function Vr(n,a){return Oi(n,null,null,a),ji(n)}function Eu(n,a,l){n.lanes|=l;var u=n.alternate;u!==null&&(u.lanes|=l);for(var g=!1,E=n.return;E!==null;)E.childLanes|=l,u=E.alternate,u!==null&&(u.childLanes|=l),E.tag===22&&(n=E.stateNode,n===null||n._visibility&1||(g=!0)),n=E,E=E.return;return n.tag===3?(E=n.stateNode,g&&a!==null&&(g=31-qe(l),n=E.hiddenUpdates,u=n[g],u===null?n[g]=[a]:u.push(a),a.lane=l|536870912),E):null}function ji(n){if(50<Ja)throw Ja=0,Al=null,Error(o(185));for(var a=n.return;a!==null;)n=a,a=n.return;return n.tag===3?n.stateNode:null}var qr={};function Vh(n,a,l,u){this.tag=n,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function cn(n,a,l,u){return new Vh(n,a,l,u)}function bs(n){return n=n.prototype,!(!n||!n.isReactComponent)}function Nn(n,a){var l=n.alternate;return l===null?(l=cn(n.tag,a,n.key,n.mode),l.elementType=n.elementType,l.type=n.type,l.stateNode=n.stateNode,l.alternate=n,n.alternate=l):(l.pendingProps=a,l.type=n.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=n.flags&65011712,l.childLanes=n.childLanes,l.lanes=n.lanes,l.child=n.child,l.memoizedProps=n.memoizedProps,l.memoizedState=n.memoizedState,l.updateQueue=n.updateQueue,a=n.dependencies,l.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},l.sibling=n.sibling,l.index=n.index,l.ref=n.ref,l.refCleanup=n.refCleanup,l}function Au(n,a){n.flags&=65011714;var l=n.alternate;return l===null?(n.childLanes=0,n.lanes=a,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=l.childLanes,n.lanes=l.lanes,n.child=l.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=l.memoizedProps,n.memoizedState=l.memoizedState,n.updateQueue=l.updateQueue,n.type=l.type,a=l.dependencies,n.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),n}function Li(n,a,l,u,g,E){var V=0;if(u=n,typeof n=="function")bs(n)&&(V=1);else if(typeof n=="string")V=Wm(n,l,F.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case N:return n=cn(31,l,a,g),n.elementType=N,n.lanes=E,n;case b:return Sr(l.children,g,E,a);case S:V=8,g|=24;break;case A:return n=cn(12,l,a,g|2),n.elementType=A,n.lanes=E,n;case w:return n=cn(13,l,a,g),n.elementType=w,n.lanes=E,n;case R:return n=cn(19,l,a,g),n.elementType=R,n.lanes=E,n;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case C:case k:V=10;break e;case T:V=9;break e;case D:V=11;break e;case _:V=14;break e;case M:V=16,u=null;break e}V=29,l=Error(o(130,n===null?"null":typeof n,"")),u=null}return a=cn(V,l,a,g),a.elementType=n,a.type=u,a.lanes=E,a}function Sr(n,a,l,u){return n=cn(7,n,u,a),n.lanes=l,n}function ys(n,a,l){return n=cn(6,n,null,a),n.lanes=l,n}function xs(n,a,l){return a=cn(4,n.children!==null?n.children:[],n.key,a),a.lanes=l,a.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},a}var Gr=[],Wr=0,Ni=null,Fi=0,xn=[],Sn=0,Er=null,Fn=1,$n="";function Ar(n,a){Gr[Wr++]=Fi,Gr[Wr++]=Ni,Ni=n,Fi=a}function Cu(n,a,l){xn[Sn++]=Fn,xn[Sn++]=$n,xn[Sn++]=Er,Er=n;var u=Fn;n=$n;var g=32-qe(u)-1;u&=~(1<<g),l+=1;var E=32-qe(a)+g;if(30<E){var V=g-g%5;E=(u&(1<<V)-1).toString(32),u>>=V,g-=V,Fn=1<<32-qe(a)+g|l<<g|u,$n=E+n}else Fn=1<<E|l<<g|u,$n=n}function Ss(n){n.return!==null&&(Ar(n,1),Cu(n,1,0))}function Es(n){for(;n===Ni;)Ni=Gr[--Wr],Gr[Wr]=null,Fi=Gr[--Wr],Gr[Wr]=null;for(;n===Er;)Er=xn[--Sn],xn[Sn]=null,$n=xn[--Sn],xn[Sn]=null,Fn=xn[--Sn],xn[Sn]=null}var nn=null,It=null,Rt=!1,Cr=null,kn=!1,As=Error(o(519));function wr(n){var a=Error(o(418,""));throw Da(bn(a,n)),As}function wu(n){var a=n.stateNode,l=n.type,u=n.memoizedProps;switch(a[Re]=n,a[Ie]=u,l){case"dialog":Ct("cancel",a),Ct("close",a);break;case"iframe":case"object":case"embed":Ct("load",a);break;case"video":case"audio":for(l=0;l<ti.length;l++)Ct(ti[l],a);break;case"source":Ct("error",a);break;case"img":case"image":case"link":Ct("error",a),Ct("load",a);break;case"details":Ct("toggle",a);break;case"input":Ct("invalid",a),zc(a,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0),Ai(a);break;case"select":Ct("invalid",a);break;case"textarea":Ct("invalid",a),Uc(a,u.value,u.defaultValue,u.children),Ai(a)}l=u.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||a.textContent===""+l||u.suppressHydrationWarning===!0||Hf(a.textContent,l)?(u.popover!=null&&(Ct("beforetoggle",a),Ct("toggle",a)),u.onScroll!=null&&Ct("scroll",a),u.onScrollEnd!=null&&Ct("scrollend",a),u.onClick!=null&&(a.onclick=bo),a=!0):a=!1,a||wr(n)}function _u(n){for(nn=n.return;nn;)switch(nn.tag){case 5:case 13:kn=!1;return;case 27:case 3:kn=!0;return;default:nn=nn.return}}function ka(n){if(n!==nn)return!1;if(!Rt)return _u(n),Rt=!0,!1;var a=n.tag,l;if((l=a!==3&&a!==27)&&((l=a===5)&&(l=n.type,l=!(l!=="form"&&l!=="button")||Il(n.type,n.memoizedProps)),l=!l),l&&It&&wr(n),_u(n),a===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(o(317));e:{for(n=n.nextSibling,a=0;n;){if(n.nodeType===8)if(l=n.data,l==="/$"){if(a===0){It=Tn(n.nextSibling);break e}a--}else l!=="$"&&l!=="$!"&&l!=="$?"||a++;n=n.nextSibling}It=null}}else a===27?(a=It,fr(n.type)?(n=Hl,Hl=null,It=n):It=a):It=nn?Tn(n.stateNode.nextSibling):null;return!0}function Pa(){It=nn=null,Rt=!1}function Ru(){var n=Cr;return n!==null&&(sn===null?sn=n:sn.push.apply(sn,n),Cr=null),n}function Da(n){Cr===null?Cr=[n]:Cr.push(n)}var Cs=Y(null),_r=null,In=null;function Qn(n,a,l){O(Cs,a._currentValue),a._currentValue=l}function zn(n){n._currentValue=Cs.current,z(Cs)}function ws(n,a,l){for(;n!==null;){var u=n.alternate;if((n.childLanes&a)!==a?(n.childLanes|=a,u!==null&&(u.childLanes|=a)):u!==null&&(u.childLanes&a)!==a&&(u.childLanes|=a),n===l)break;n=n.return}}function _s(n,a,l,u){var g=n.child;for(g!==null&&(g.return=n);g!==null;){var E=g.dependencies;if(E!==null){var V=g.child;E=E.firstContext;e:for(;E!==null;){var Z=E;E=g;for(var fe=0;fe<a.length;fe++)if(Z.context===a[fe]){E.lanes|=l,Z=E.alternate,Z!==null&&(Z.lanes|=l),ws(E.return,l,n),u||(V=null);break e}E=Z.next}}else if(g.tag===18){if(V=g.return,V===null)throw Error(o(341));V.lanes|=l,E=V.alternate,E!==null&&(E.lanes|=l),ws(V,l,n),V=null}else V=g.child;if(V!==null)V.return=g;else for(V=g;V!==null;){if(V===n){V=null;break}if(g=V.sibling,g!==null){g.return=V.return,V=g;break}V=V.return}g=V}}function Ma(n,a,l,u){n=null;for(var g=a,E=!1;g!==null;){if(!E){if((g.flags&524288)!==0)E=!0;else if((g.flags&262144)!==0)break}if(g.tag===10){var V=g.alternate;if(V===null)throw Error(o(387));if(V=V.memoizedProps,V!==null){var Z=g.type;ln(g.pendingProps.value,V.value)||(n!==null?n.push(Z):n=[Z])}}else if(g===te.current){if(V=g.alternate,V===null)throw Error(o(387));V.memoizedState.memoizedState!==g.memoizedState.memoizedState&&(n!==null?n.push(si):n=[si])}g=g.return}n!==null&&_s(a,n,l,u),a.flags|=262144}function $i(n){for(n=n.firstContext;n!==null;){if(!ln(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function Rr(n){_r=n,In=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function en(n){return Tu(_r,n)}function Ii(n,a){return _r===null&&Rr(n),Tu(n,a)}function Tu(n,a){var l=a._currentValue;if(a={context:a,memoizedValue:l,next:null},In===null){if(n===null)throw Error(o(308));In=a,n.dependencies={lanes:0,firstContext:a},n.flags|=524288}else In=In.next=a;return l}var qh=typeof AbortController<"u"?AbortController:function(){var n=[],a=this.signal={aborted:!1,addEventListener:function(l,u){n.push(u)}};this.abort=function(){a.aborted=!0,n.forEach(function(l){return l()})}},Gh=e.unstable_scheduleCallback,Wh=e.unstable_NormalPriority,qt={$$typeof:k,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Rs(){return{controller:new qh,data:new Map,refCount:0}}function Oa(n){n.refCount--,n.refCount===0&&Gh(Wh,function(){n.controller.abort()})}var ja=null,Ts=0,Yr=0,Xr=null;function Yh(n,a){if(ja===null){var l=ja=[];Ts=0,Yr=Pl(),Xr={status:"pending",value:void 0,then:function(u){l.push(u)}}}return Ts++,a.then(ku,ku),a}function ku(){if(--Ts===0&&ja!==null){Xr!==null&&(Xr.status="fulfilled");var n=ja;ja=null,Yr=0,Xr=null;for(var a=0;a<n.length;a++)(0,n[a])()}}function Xh(n,a){var l=[],u={status:"pending",value:null,reason:null,then:function(g){l.push(g)}};return n.then(function(){u.status="fulfilled",u.value=a;for(var g=0;g<l.length;g++)(0,l[g])(a)},function(g){for(u.status="rejected",u.reason=g,g=0;g<l.length;g++)(0,l[g])(void 0)}),u}var Pu=B.S;B.S=function(n,a){typeof a=="object"&&a!==null&&typeof a.then=="function"&&Yh(n,a),Pu!==null&&Pu(n,a)};var Tr=Y(null);function ks(){var n=Tr.current;return n!==null?n:Nt.pooledCache}function zi(n,a){a===null?O(Tr,Tr.current):O(Tr,a.pool)}function Du(){var n=ks();return n===null?null:{parent:qt._currentValue,pool:n}}var La=Error(o(460)),Mu=Error(o(474)),Bi=Error(o(542)),Ps={then:function(){}};function Ou(n){return n=n.status,n==="fulfilled"||n==="rejected"}function Ui(){}function ju(n,a,l){switch(l=n[l],l===void 0?n.push(a):l!==a&&(a.then(Ui,Ui),a=l),a.status){case"fulfilled":return a.value;case"rejected":throw n=a.reason,Nu(n),n;default:if(typeof a.status=="string")a.then(Ui,Ui);else{if(n=Nt,n!==null&&100<n.shellSuspendCounter)throw Error(o(482));n=a,n.status="pending",n.then(function(u){if(a.status==="pending"){var g=a;g.status="fulfilled",g.value=u}},function(u){if(a.status==="pending"){var g=a;g.status="rejected",g.reason=u}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw n=a.reason,Nu(n),n}throw Na=a,La}}var Na=null;function Lu(){if(Na===null)throw Error(o(459));var n=Na;return Na=null,n}function Nu(n){if(n===La||n===Bi)throw Error(o(483))}var Zn=!1;function Ds(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ms(n,a){n=n.updateQueue,a.updateQueue===n&&(a.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,a,l){var u=n.updateQueue;if(u===null)return null;if(u=u.shared,(Tt&2)!==0){var g=u.pending;return g===null?a.next=a:(a.next=g.next,g.next=a),u.pending=a,a=ji(n),Eu(n,null,l),a}return Oi(n,u,a,l),ji(n)}function Fa(n,a,l){if(a=a.updateQueue,a!==null&&(a=a.shared,(l&4194048)!==0)){var u=a.lanes;u&=n.pendingLanes,l|=u,a.lanes=l,it(n,l)}}function Os(n,a){var l=n.updateQueue,u=n.alternate;if(u!==null&&(u=u.updateQueue,l===u)){var g=null,E=null;if(l=l.firstBaseUpdate,l!==null){do{var V={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};E===null?g=E=V:E=E.next=V,l=l.next}while(l!==null);E===null?g=E=a:E=E.next=a}else g=E=a;l={baseState:u.baseState,firstBaseUpdate:g,lastBaseUpdate:E,shared:u.shared,callbacks:u.callbacks},n.updateQueue=l;return}n=l.lastBaseUpdate,n===null?l.firstBaseUpdate=a:n.next=a,l.lastBaseUpdate=a}var js=!1;function $a(){if(js){var n=Xr;if(n!==null)throw n}}function Ia(n,a,l,u){js=!1;var g=n.updateQueue;Zn=!1;var E=g.firstBaseUpdate,V=g.lastBaseUpdate,Z=g.shared.pending;if(Z!==null){g.shared.pending=null;var fe=Z,Oe=fe.next;fe.next=null,V===null?E=Oe:V.next=Oe,V=fe;var Ue=n.alternate;Ue!==null&&(Ue=Ue.updateQueue,Z=Ue.lastBaseUpdate,Z!==V&&(Z===null?Ue.firstBaseUpdate=Oe:Z.next=Oe,Ue.lastBaseUpdate=fe))}if(E!==null){var Ve=g.baseState;V=0,Ue=Oe=fe=null,Z=E;do{var Fe=Z.lane&-536870913,ze=Fe!==Z.lane;if(ze?(wt&Fe)===Fe:(u&Fe)===Fe){Fe!==0&&Fe===Yr&&(js=!0),Ue!==null&&(Ue=Ue.next={lane:0,tag:Z.tag,payload:Z.payload,callback:null,next:null});e:{var vt=n,mt=Z;Fe=a;var Ot=l;switch(mt.tag){case 1:if(vt=mt.payload,typeof vt=="function"){Ve=vt.call(Ot,Ve,Fe);break e}Ve=vt;break e;case 3:vt.flags=vt.flags&-65537|128;case 0:if(vt=mt.payload,Fe=typeof vt=="function"?vt.call(Ot,Ve,Fe):vt,Fe==null)break e;Ve=h({},Ve,Fe);break e;case 2:Zn=!0}}Fe=Z.callback,Fe!==null&&(n.flags|=64,ze&&(n.flags|=8192),ze=g.callbacks,ze===null?g.callbacks=[Fe]:ze.push(Fe))}else ze={lane:Fe,tag:Z.tag,payload:Z.payload,callback:Z.callback,next:null},Ue===null?(Oe=Ue=ze,fe=Ve):Ue=Ue.next=ze,V|=Fe;if(Z=Z.next,Z===null){if(Z=g.shared.pending,Z===null)break;ze=Z,Z=ze.next,ze.next=null,g.lastBaseUpdate=ze,g.shared.pending=null}}while(!0);Ue===null&&(fe=Ve),g.baseState=fe,g.firstBaseUpdate=Oe,g.lastBaseUpdate=Ue,E===null&&(g.shared.lanes=0),lr|=V,n.lanes=V,n.memoizedState=Ve}}function Fu(n,a){if(typeof n!="function")throw Error(o(191,n));n.call(a)}function $u(n,a){var l=n.callbacks;if(l!==null)for(n.callbacks=null,n=0;n<l.length;n++)Fu(l[n],a)}var Kr=Y(null),Hi=Y(0);function Iu(n,a){n=Wn,O(Hi,n),O(Kr,a),Wn=n|a.baseLanes}function Ls(){O(Hi,Wn),O(Kr,Kr.current)}function Ns(){Wn=Hi.current,z(Kr),z(Hi)}var tr=0,yt=null,Dt=null,Ht=null,Vi=!1,Qr=!1,kr=!1,qi=0,za=0,Zr=null,Kh=0;function Bt(){throw Error(o(321))}function Fs(n,a){if(a===null)return!1;for(var l=0;l<a.length&&l<n.length;l++)if(!ln(n[l],a[l]))return!1;return!0}function $s(n,a,l,u,g,E){return tr=E,yt=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,B.H=n===null||n.memoizedState===null?Ed:Ad,kr=!1,E=l(u,g),kr=!1,Qr&&(E=Bu(a,l,u,g)),zu(n),E}function zu(n){B.H=Qi;var a=Dt!==null&&Dt.next!==null;if(tr=0,Ht=Dt=yt=null,Vi=!1,za=0,Zr=null,a)throw Error(o(300));n===null||Wt||(n=n.dependencies,n!==null&&$i(n)&&(Wt=!0))}function Bu(n,a,l,u){yt=n;var g=0;do{if(Qr&&(Zr=null),za=0,Qr=!1,25<=g)throw Error(o(301));if(g+=1,Ht=Dt=null,n.updateQueue!=null){var E=n.updateQueue;E.lastEffect=null,E.events=null,E.stores=null,E.memoCache!=null&&(E.memoCache.index=0)}B.H=am,E=a(l,u)}while(Qr);return E}function Qh(){var n=B.H,a=n.useState()[0];return a=typeof a.then=="function"?Ba(a):a,n=n.useState()[0],(Dt!==null?Dt.memoizedState:null)!==n&&(yt.flags|=1024),a}function Is(){var n=qi!==0;return qi=0,n}function zs(n,a,l){a.updateQueue=n.updateQueue,a.flags&=-2053,n.lanes&=~l}function Bs(n){if(Vi){for(n=n.memoizedState;n!==null;){var a=n.queue;a!==null&&(a.pending=null),n=n.next}Vi=!1}tr=0,Ht=Dt=yt=null,Qr=!1,za=qi=0,Zr=null}function an(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ht===null?yt.memoizedState=Ht=n:Ht=Ht.next=n,Ht}function Vt(){if(Dt===null){var n=yt.alternate;n=n!==null?n.memoizedState:null}else n=Dt.next;var a=Ht===null?yt.memoizedState:Ht.next;if(a!==null)Ht=a,Dt=n;else{if(n===null)throw yt.alternate===null?Error(o(467)):Error(o(310));Dt=n,n={memoizedState:Dt.memoizedState,baseState:Dt.baseState,baseQueue:Dt.baseQueue,queue:Dt.queue,next:null},Ht===null?yt.memoizedState=Ht=n:Ht=Ht.next=n}return Ht}function Us(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ba(n){var a=za;return za+=1,Zr===null&&(Zr=[]),n=ju(Zr,n,a),a=yt,(Ht===null?a.memoizedState:Ht.next)===null&&(a=a.alternate,B.H=a===null||a.memoizedState===null?Ed:Ad),n}function Gi(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return Ba(n);if(n.$$typeof===k)return en(n)}throw Error(o(438,String(n)))}function Hs(n){var a=null,l=yt.updateQueue;if(l!==null&&(a=l.memoCache),a==null){var u=yt.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(a={data:u.data.map(function(g){return g.slice()}),index:0})))}if(a==null&&(a={data:[],index:0}),l===null&&(l=Us(),yt.updateQueue=l),l.memoCache=a,l=a.data[a.index],l===void 0)for(l=a.data[a.index]=Array(n),u=0;u<n;u++)l[u]=P;return a.index++,l}function Bn(n,a){return typeof a=="function"?a(n):a}function Wi(n){var a=Vt();return Vs(a,Dt,n)}function Vs(n,a,l){var u=n.queue;if(u===null)throw Error(o(311));u.lastRenderedReducer=l;var g=n.baseQueue,E=u.pending;if(E!==null){if(g!==null){var V=g.next;g.next=E.next,E.next=V}a.baseQueue=g=E,u.pending=null}if(E=n.baseState,g===null)n.memoizedState=E;else{a=g.next;var Z=V=null,fe=null,Oe=a,Ue=!1;do{var Ve=Oe.lane&-536870913;if(Ve!==Oe.lane?(wt&Ve)===Ve:(tr&Ve)===Ve){var Fe=Oe.revertLane;if(Fe===0)fe!==null&&(fe=fe.next={lane:0,revertLane:0,action:Oe.action,hasEagerState:Oe.hasEagerState,eagerState:Oe.eagerState,next:null}),Ve===Yr&&(Ue=!0);else if((tr&Fe)===Fe){Oe=Oe.next,Fe===Yr&&(Ue=!0);continue}else Ve={lane:0,revertLane:Oe.revertLane,action:Oe.action,hasEagerState:Oe.hasEagerState,eagerState:Oe.eagerState,next:null},fe===null?(Z=fe=Ve,V=E):fe=fe.next=Ve,yt.lanes|=Fe,lr|=Fe;Ve=Oe.action,kr&&l(E,Ve),E=Oe.hasEagerState?Oe.eagerState:l(E,Ve)}else Fe={lane:Ve,revertLane:Oe.revertLane,action:Oe.action,hasEagerState:Oe.hasEagerState,eagerState:Oe.eagerState,next:null},fe===null?(Z=fe=Fe,V=E):fe=fe.next=Fe,yt.lanes|=Ve,lr|=Ve;Oe=Oe.next}while(Oe!==null&&Oe!==a);if(fe===null?V=E:fe.next=Z,!ln(E,n.memoizedState)&&(Wt=!0,Ue&&(l=Xr,l!==null)))throw l;n.memoizedState=E,n.baseState=V,n.baseQueue=fe,u.lastRenderedState=E}return g===null&&(u.lanes=0),[n.memoizedState,u.dispatch]}function qs(n){var a=Vt(),l=a.queue;if(l===null)throw Error(o(311));l.lastRenderedReducer=n;var u=l.dispatch,g=l.pending,E=a.memoizedState;if(g!==null){l.pending=null;var V=g=g.next;do E=n(E,V.action),V=V.next;while(V!==g);ln(E,a.memoizedState)||(Wt=!0),a.memoizedState=E,a.baseQueue===null&&(a.baseState=E),l.lastRenderedState=E}return[E,u]}function Uu(n,a,l){var u=yt,g=Vt(),E=Rt;if(E){if(l===void 0)throw Error(o(407));l=l()}else l=a();var V=!ln((Dt||g).memoizedState,l);V&&(g.memoizedState=l,Wt=!0),g=g.queue;var Z=qu.bind(null,u,g,n);if(Ua(2048,8,Z,[n]),g.getSnapshot!==a||V||Ht!==null&&Ht.memoizedState.tag&1){if(u.flags|=2048,Jr(9,Yi(),Vu.bind(null,u,g,l,a),null),Nt===null)throw Error(o(349));E||(tr&124)!==0||Hu(u,a,l)}return l}function Hu(n,a,l){n.flags|=16384,n={getSnapshot:a,value:l},a=yt.updateQueue,a===null?(a=Us(),yt.updateQueue=a,a.stores=[n]):(l=a.stores,l===null?a.stores=[n]:l.push(n))}function Vu(n,a,l,u){a.value=l,a.getSnapshot=u,Gu(a)&&Wu(n)}function qu(n,a,l){return l(function(){Gu(a)&&Wu(n)})}function Gu(n){var a=n.getSnapshot;n=n.value;try{var l=a();return!ln(n,l)}catch{return!0}}function Wu(n){var a=Vr(n,2);a!==null&&hn(a,n,2)}function Gs(n){var a=an();if(typeof n=="function"){var l=n;if(n=l(),kr){Xe(!0);try{l()}finally{Xe(!1)}}}return a.memoizedState=a.baseState=n,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bn,lastRenderedState:n},a}function Yu(n,a,l,u){return n.baseState=l,Vs(n,Dt,typeof u=="function"?u:Bn)}function Zh(n,a,l,u,g){if(Ki(n))throw Error(o(485));if(n=a.action,n!==null){var E={payload:g,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(V){E.listeners.push(V)}};B.T!==null?l(!0):E.isTransition=!1,u(E),l=a.pending,l===null?(E.next=a.pending=E,Xu(a,E)):(E.next=l.next,a.pending=l.next=E)}}function Xu(n,a){var l=a.action,u=a.payload,g=n.state;if(a.isTransition){var E=B.T,V={};B.T=V;try{var Z=l(g,u),fe=B.S;fe!==null&&fe(V,Z),Ku(n,a,Z)}catch(Oe){Ws(n,a,Oe)}finally{B.T=E}}else try{E=l(g,u),Ku(n,a,E)}catch(Oe){Ws(n,a,Oe)}}function Ku(n,a,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(u){Qu(n,a,u)},function(u){return Ws(n,a,u)}):Qu(n,a,l)}function Qu(n,a,l){a.status="fulfilled",a.value=l,Zu(a),n.state=l,a=n.pending,a!==null&&(l=a.next,l===a?n.pending=null:(l=l.next,a.next=l,Xu(n,l)))}function Ws(n,a,l){var u=n.pending;if(n.pending=null,u!==null){u=u.next;do a.status="rejected",a.reason=l,Zu(a),a=a.next;while(a!==u)}n.action=null}function Zu(n){n=n.listeners;for(var a=0;a<n.length;a++)(0,n[a])()}function Ju(n,a){return a}function ed(n,a){if(Rt){var l=Nt.formState;if(l!==null){e:{var u=yt;if(Rt){if(It){t:{for(var g=It,E=kn;g.nodeType!==8;){if(!E){g=null;break t}if(g=Tn(g.nextSibling),g===null){g=null;break t}}E=g.data,g=E==="F!"||E==="F"?g:null}if(g){It=Tn(g.nextSibling),u=g.data==="F!";break e}}wr(u)}u=!1}u&&(a=l[0])}}return l=an(),l.memoizedState=l.baseState=a,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ju,lastRenderedState:a},l.queue=u,l=yd.bind(null,yt,u),u.dispatch=l,u=Gs(!1),E=Zs.bind(null,yt,!1,u.queue),u=an(),g={state:a,dispatch:null,action:n,pending:null},u.queue=g,l=Zh.bind(null,yt,g,E,l),g.dispatch=l,u.memoizedState=n,[a,l,!1]}function td(n){var a=Vt();return nd(a,Dt,n)}function nd(n,a,l){if(a=Vs(n,a,Ju)[0],n=Wi(Bn)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var u=Ba(a)}catch(V){throw V===La?Bi:V}else u=a;a=Vt();var g=a.queue,E=g.dispatch;return l!==a.memoizedState&&(yt.flags|=2048,Jr(9,Yi(),Jh.bind(null,g,l),null)),[u,E,n]}function Jh(n,a){n.action=a}function rd(n){var a=Vt(),l=Dt;if(l!==null)return nd(a,l,n);Vt(),a=a.memoizedState,l=Vt();var u=l.queue.dispatch;return l.memoizedState=n,[a,u,!1]}function Jr(n,a,l,u){return n={tag:n,create:l,deps:u,inst:a,next:null},a=yt.updateQueue,a===null&&(a=Us(),yt.updateQueue=a),l=a.lastEffect,l===null?a.lastEffect=n.next=n:(u=l.next,l.next=n,n.next=u,a.lastEffect=n),n}function Yi(){return{destroy:void 0,resource:void 0}}function ad(){return Vt().memoizedState}function Xi(n,a,l,u){var g=an();u=u===void 0?null:u,yt.flags|=n,g.memoizedState=Jr(1|a,Yi(),l,u)}function Ua(n,a,l,u){var g=Vt();u=u===void 0?null:u;var E=g.memoizedState.inst;Dt!==null&&u!==null&&Fs(u,Dt.memoizedState.deps)?g.memoizedState=Jr(a,E,l,u):(yt.flags|=n,g.memoizedState=Jr(1|a,E,l,u))}function id(n,a){Xi(8390656,8,n,a)}function od(n,a){Ua(2048,8,n,a)}function sd(n,a){return Ua(4,2,n,a)}function ld(n,a){return Ua(4,4,n,a)}function cd(n,a){if(typeof a=="function"){n=n();var l=a(n);return function(){typeof l=="function"?l():a(null)}}if(a!=null)return n=n(),a.current=n,function(){a.current=null}}function ud(n,a,l){l=l!=null?l.concat([n]):null,Ua(4,4,cd.bind(null,a,n),l)}function Ys(){}function dd(n,a){var l=Vt();a=a===void 0?null:a;var u=l.memoizedState;return a!==null&&Fs(a,u[1])?u[0]:(l.memoizedState=[n,a],n)}function fd(n,a){var l=Vt();a=a===void 0?null:a;var u=l.memoizedState;if(a!==null&&Fs(a,u[1]))return u[0];if(u=n(),kr){Xe(!0);try{n()}finally{Xe(!1)}}return l.memoizedState=[u,a],u}function Xs(n,a,l){return l===void 0||(tr&1073741824)!==0?n.memoizedState=a:(n.memoizedState=l,n=gf(),yt.lanes|=n,lr|=n,l)}function pd(n,a,l,u){return ln(l,a)?l:Kr.current!==null?(n=Xs(n,l,u),ln(n,a)||(Wt=!0),n):(tr&42)===0?(Wt=!0,n.memoizedState=l):(n=gf(),yt.lanes|=n,lr|=n,a)}function hd(n,a,l,u,g){var E=q.p;q.p=E!==0&&8>E?E:8;var V=B.T,Z={};B.T=Z,Zs(n,!1,a,l);try{var fe=g(),Oe=B.S;if(Oe!==null&&Oe(Z,fe),fe!==null&&typeof fe=="object"&&typeof fe.then=="function"){var Ue=Xh(fe,u);Ha(n,a,Ue,pn(n))}else Ha(n,a,u,pn(n))}catch(Ve){Ha(n,a,{then:function(){},status:"rejected",reason:Ve},pn())}finally{q.p=E,B.T=V}}function tm(){}function Ks(n,a,l,u){if(n.tag!==5)throw Error(o(476));var g=md(n).queue;hd(n,g,a,K,l===null?tm:function(){return gd(n),l(u)})}function md(n){var a=n.memoizedState;if(a!==null)return a;a={memoizedState:K,baseState:K,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bn,lastRenderedState:K},next:null};var l={};return a.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bn,lastRenderedState:l},next:null},n.memoizedState=a,n=n.alternate,n!==null&&(n.memoizedState=a),a}function gd(n){var a=md(n).next.queue;Ha(n,a,{},pn())}function Qs(){return en(si)}function vd(){return Vt().memoizedState}function bd(){return Vt().memoizedState}function nm(n){for(var a=n.return;a!==null;){switch(a.tag){case 24:case 3:var l=pn();n=Jn(l);var u=er(a,n,l);u!==null&&(hn(u,a,l),Fa(u,a,l)),a={cache:Rs()},n.payload=a;return}a=a.return}}function rm(n,a,l){var u=pn();l={lane:u,revertLane:0,action:l,hasEagerState:!1,eagerState:null,next:null},Ki(n)?xd(a,l):(l=vs(n,a,l,u),l!==null&&(hn(l,n,u),Sd(l,a,u)))}function yd(n,a,l){var u=pn();Ha(n,a,l,u)}function Ha(n,a,l,u){var g={lane:u,revertLane:0,action:l,hasEagerState:!1,eagerState:null,next:null};if(Ki(n))xd(a,g);else{var E=n.alternate;if(n.lanes===0&&(E===null||E.lanes===0)&&(E=a.lastRenderedReducer,E!==null))try{var V=a.lastRenderedState,Z=E(V,l);if(g.hasEagerState=!0,g.eagerState=Z,ln(Z,V))return Oi(n,a,g,0),Nt===null&&Mi(),!1}catch{}finally{}if(l=vs(n,a,g,u),l!==null)return hn(l,n,u),Sd(l,a,u),!0}return!1}function Zs(n,a,l,u){if(u={lane:2,revertLane:Pl(),action:u,hasEagerState:!1,eagerState:null,next:null},Ki(n)){if(a)throw Error(o(479))}else a=vs(n,l,u,2),a!==null&&hn(a,n,2)}function Ki(n){var a=n.alternate;return n===yt||a!==null&&a===yt}function xd(n,a){Qr=Vi=!0;var l=n.pending;l===null?a.next=a:(a.next=l.next,l.next=a),n.pending=a}function Sd(n,a,l){if((l&4194048)!==0){var u=a.lanes;u&=n.pendingLanes,l|=u,a.lanes=l,it(n,l)}}var Qi={readContext:en,use:Gi,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:Gi,useCallback:function(n,a){return an().memoizedState=[n,a===void 0?null:a],n},useContext:en,useEffect:id,useImperativeHandle:function(n,a,l){l=l!=null?l.concat([n]):null,Xi(4194308,4,cd.bind(null,a,n),l)},useLayoutEffect:function(n,a){return Xi(4194308,4,n,a)},useInsertionEffect:function(n,a){Xi(4,2,n,a)},useMemo:function(n,a){var l=an();a=a===void 0?null:a;var u=n();if(kr){Xe(!0);try{n()}finally{Xe(!1)}}return l.memoizedState=[u,a],u},useReducer:function(n,a,l){var u=an();if(l!==void 0){var g=l(a);if(kr){Xe(!0);try{l(a)}finally{Xe(!1)}}}else g=a;return u.memoizedState=u.baseState=g,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:g},u.queue=n,n=n.dispatch=rm.bind(null,yt,n),[u.memoizedState,n]},useRef:function(n){var a=an();return n={current:n},a.memoizedState=n},useState:function(n){n=Gs(n);var a=n.queue,l=yd.bind(null,yt,a);return a.dispatch=l,[n.memoizedState,l]},useDebugValue:Ys,useDeferredValue:function(n,a){var l=an();return Xs(l,n,a)},useTransition:function(){var n=Gs(!1);return n=hd.bind(null,yt,n.queue,!0,!1),an().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,a,l){var u=yt,g=an();if(Rt){if(l===void 0)throw Error(o(407));l=l()}else{if(l=a(),Nt===null)throw Error(o(349));(wt&124)!==0||Hu(u,a,l)}g.memoizedState=l;var E={value:l,getSnapshot:a};return g.queue=E,id(qu.bind(null,u,E,n),[n]),u.flags|=2048,Jr(9,Yi(),Vu.bind(null,u,E,l,a),null),l},useId:function(){var n=an(),a=Nt.identifierPrefix;if(Rt){var l=$n,u=Fn;l=(u&~(1<<32-qe(u)-1)).toString(32)+l,a="«"+a+"R"+l,l=qi++,0<l&&(a+="H"+l.toString(32)),a+="»"}else l=Kh++,a="«"+a+"r"+l.toString(32)+"»";return n.memoizedState=a},useHostTransitionStatus:Qs,useFormState:ed,useActionState:ed,useOptimistic:function(n){var a=an();a.memoizedState=a.baseState=n;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=l,a=Zs.bind(null,yt,!0,l),l.dispatch=a,[n,a]},useMemoCache:Hs,useCacheRefresh:function(){return an().memoizedState=nm.bind(null,yt)}},Ad={readContext:en,use:Gi,useCallback:dd,useContext:en,useEffect:od,useImperativeHandle:ud,useInsertionEffect:sd,useLayoutEffect:ld,useMemo:fd,useReducer:Wi,useRef:ad,useState:function(){return Wi(Bn)},useDebugValue:Ys,useDeferredValue:function(n,a){var l=Vt();return pd(l,Dt.memoizedState,n,a)},useTransition:function(){var n=Wi(Bn)[0],a=Vt().memoizedState;return[typeof n=="boolean"?n:Ba(n),a]},useSyncExternalStore:Uu,useId:vd,useHostTransitionStatus:Qs,useFormState:td,useActionState:td,useOptimistic:function(n,a){var l=Vt();return Yu(l,Dt,n,a)},useMemoCache:Hs,useCacheRefresh:bd},am={readContext:en,use:Gi,useCallback:dd,useContext:en,useEffect:od,useImperativeHandle:ud,useInsertionEffect:sd,useLayoutEffect:ld,useMemo:fd,useReducer:qs,useRef:ad,useState:function(){return qs(Bn)},useDebugValue:Ys,useDeferredValue:function(n,a){var l=Vt();return Dt===null?Xs(l,n,a):pd(l,Dt.memoizedState,n,a)},useTransition:function(){var n=qs(Bn)[0],a=Vt().memoizedState;return[typeof n=="boolean"?n:Ba(n),a]},useSyncExternalStore:Uu,useId:vd,useHostTransitionStatus:Qs,useFormState:rd,useActionState:rd,useOptimistic:function(n,a){var l=Vt();return Dt!==null?Yu(l,Dt,n,a):(l.baseState=n,[n,l.queue.dispatch])},useMemoCache:Hs,useCacheRefresh:bd},ea=null,Va=0;function Zi(n){var a=Va;return Va+=1,ea===null&&(ea=[]),ju(ea,n,a)}function qa(n,a){a=a.props.ref,n.ref=a!==void 0?a:null}function Ji(n,a){throw a.$$typeof===v?Error(o(525)):(n=Object.prototype.toString.call(a),Error(o(31,n==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":n)))}function Cd(n){var a=n._init;return a(n._payload)}function wd(n){function a(we,ye){if(n){var Pe=we.deletions;Pe===null?(we.deletions=[ye],we.flags|=16):Pe.push(ye)}}function l(we,ye){if(!n)return null;for(;ye!==null;)a(we,ye),ye=ye.sibling;return null}function u(we){for(var ye=new Map;we!==null;)we.key!==null?ye.set(we.key,we):ye.set(we.index,we),we=we.sibling;return ye}function g(we,ye){return we=Nn(we,ye),we.index=0,we.sibling=null,we}function E(we,ye,Pe){return we.index=Pe,n?(Pe=we.alternate,Pe!==null?(Pe=Pe.index,Pe<ye?(we.flags|=67108866,ye):Pe):(we.flags|=67108866,ye)):(we.flags|=1048576,ye)}function V(we){return n&&we.alternate===null&&(we.flags|=67108866),we}function Z(we,ye,Pe,He){return ye===null||ye.tag!==6?(ye=ys(Pe,we.mode,He),ye.return=we,ye):(ye=g(ye,Pe),ye.return=we,ye)}function fe(we,ye,Pe,He){var lt=Pe.type;return lt===b?Ue(we,ye,Pe.props.children,He,Pe.key):ye!==null&&(ye.elementType===lt||typeof lt=="object"&<!==null&<.$$typeof===M&&Cd(lt)===ye.type)?(ye=g(ye,Pe.props),qa(ye,Pe),ye.return=we,ye):(ye=Li(Pe.type,Pe.key,Pe.props,null,we.mode,He),qa(ye,Pe),ye.return=we,ye)}function Oe(we,ye,Pe,He){return ye===null||ye.tag!==4||ye.stateNode.containerInfo!==Pe.containerInfo||ye.stateNode.implementation!==Pe.implementation?(ye=xs(Pe,we.mode,He),ye.return=we,ye):(ye=g(ye,Pe.children||[]),ye.return=we,ye)}function Ue(we,ye,Pe,He,lt){return ye===null||ye.tag!==7?(ye=Sr(Pe,we.mode,He,lt),ye.return=we,ye):(ye=g(ye,Pe),ye.return=we,ye)}function Ve(we,ye,Pe){if(typeof ye=="string"&&ye!==""||typeof ye=="number"||typeof ye=="bigint")return ye=ys(""+ye,we.mode,Pe),ye.return=we,ye;if(typeof ye=="object"&&ye!==null){switch(ye.$$typeof){case y:return Pe=Li(ye.type,ye.key,ye.props,null,we.mode,Pe),qa(Pe,ye),Pe.return=we,Pe;case x:return ye=xs(ye,we.mode,Pe),ye.return=we,ye;case M:var He=ye._init;return ye=He(ye._payload),Ve(we,ye,Pe)}if(Q(ye)||I(ye))return ye=Sr(ye,we.mode,Pe,null),ye.return=we,ye;if(typeof ye.then=="function")return Ve(we,Zi(ye),Pe);if(ye.$$typeof===k)return Ve(we,Ii(we,ye),Pe);Ji(we,ye)}return null}function Fe(we,ye,Pe,He){var lt=ye!==null?ye.key:null;if(typeof Pe=="string"&&Pe!==""||typeof Pe=="number"||typeof Pe=="bigint")return lt!==null?null:Z(we,ye,""+Pe,He);if(typeof Pe=="object"&&Pe!==null){switch(Pe.$$typeof){case y:return Pe.key===lt?fe(we,ye,Pe,He):null;case x:return Pe.key===lt?Oe(we,ye,Pe,He):null;case M:return lt=Pe._init,Pe=lt(Pe._payload),Fe(we,ye,Pe,He)}if(Q(Pe)||I(Pe))return lt!==null?null:Ue(we,ye,Pe,He,null);if(typeof Pe.then=="function")return Fe(we,ye,Zi(Pe),He);if(Pe.$$typeof===k)return Fe(we,ye,Ii(we,Pe),He);Ji(we,Pe)}return null}function ze(we,ye,Pe,He,lt){if(typeof He=="string"&&He!==""||typeof He=="number"||typeof He=="bigint")return we=we.get(Pe)||null,Z(ye,we,""+He,lt);if(typeof He=="object"&&He!==null){switch(He.$$typeof){case y:return we=we.get(He.key===null?Pe:He.key)||null,fe(ye,we,He,lt);case x:return we=we.get(He.key===null?Pe:He.key)||null,Oe(ye,we,He,lt);case M:var St=He._init;return He=St(He._payload),ze(we,ye,Pe,He,lt)}if(Q(He)||I(He))return we=we.get(Pe)||null,Ue(ye,we,He,lt,null);if(typeof He.then=="function")return ze(we,ye,Pe,Zi(He),lt);if(He.$$typeof===k)return ze(we,ye,Pe,Ii(ye,He),lt);Ji(ye,He)}return null}function vt(we,ye,Pe,He){for(var lt=null,St=null,dt=ye,gt=ye=0,Xt=null;dt!==null&><Pe.length;gt++){dt.index>gt?(Xt=dt,dt=null):Xt=dt.sibling;var _t=Fe(we,dt,Pe[gt],He);if(_t===null){dt===null&&(dt=Xt);break}n&&dt&&_t.alternate===null&&a(we,dt),ye=E(_t,ye,gt),St===null?lt=_t:St.sibling=_t,St=_t,dt=Xt}if(gt===Pe.length)return l(we,dt),Rt&&Ar(we,gt),lt;if(dt===null){for(;gt<Pe.length;gt++)dt=Ve(we,Pe[gt],He),dt!==null&&(ye=E(dt,ye,gt),St===null?lt=dt:St.sibling=dt,St=dt);return Rt&&Ar(we,gt),lt}for(dt=u(dt);gt<Pe.length;gt++)Xt=ze(dt,we,gt,Pe[gt],He),Xt!==null&&(n&&Xt.alternate!==null&&dt.delete(Xt.key===null?gt:Xt.key),ye=E(Xt,ye,gt),St===null?lt=Xt:St.sibling=Xt,St=Xt);return n&&dt.forEach(function(vr){return a(we,vr)}),Rt&&Ar(we,gt),lt}function mt(we,ye,Pe,He){if(Pe==null)throw Error(o(151));for(var lt=null,St=null,dt=ye,gt=ye=0,Xt=null,_t=Pe.next();dt!==null&&!_t.done;gt++,_t=Pe.next()){dt.index>gt?(Xt=dt,dt=null):Xt=dt.sibling;var vr=Fe(we,dt,_t.value,He);if(vr===null){dt===null&&(dt=Xt);break}n&&dt&&vr.alternate===null&&a(we,dt),ye=E(vr,ye,gt),St===null?lt=vr:St.sibling=vr,St=vr,dt=Xt}if(_t.done)return l(we,dt),Rt&&Ar(we,gt),lt;if(dt===null){for(;!_t.done;gt++,_t=Pe.next())_t=Ve(we,_t.value,He),_t!==null&&(ye=E(_t,ye,gt),St===null?lt=_t:St.sibling=_t,St=_t);return Rt&&Ar(we,gt),lt}for(dt=u(dt);!_t.done;gt++,_t=Pe.next())_t=ze(dt,we,gt,_t.value,He),_t!==null&&(n&&_t.alternate!==null&&dt.delete(_t.key===null?gt:_t.key),ye=E(_t,ye,gt),St===null?lt=_t:St.sibling=_t,St=_t);return n&&dt.forEach(function(ig){return a(we,ig)}),Rt&&Ar(we,gt),lt}function Ot(we,ye,Pe,He){if(typeof Pe=="object"&&Pe!==null&&Pe.type===b&&Pe.key===null&&(Pe=Pe.props.children),typeof Pe=="object"&&Pe!==null){switch(Pe.$$typeof){case y:e:{for(var lt=Pe.key;ye!==null;){if(ye.key===lt){if(lt=Pe.type,lt===b){if(ye.tag===7){l(we,ye.sibling),He=g(ye,Pe.props.children),He.return=we,we=He;break e}}else if(ye.elementType===lt||typeof lt=="object"&<!==null&<.$$typeof===M&&Cd(lt)===ye.type){l(we,ye.sibling),He=g(ye,Pe.props),qa(He,Pe),He.return=we,we=He;break e}l(we,ye);break}else a(we,ye);ye=ye.sibling}Pe.type===b?(He=Sr(Pe.props.children,we.mode,He,Pe.key),He.return=we,we=He):(He=Li(Pe.type,Pe.key,Pe.props,null,we.mode,He),qa(He,Pe),He.return=we,we=He)}return V(we);case x:e:{for(lt=Pe.key;ye!==null;){if(ye.key===lt)if(ye.tag===4&&ye.stateNode.containerInfo===Pe.containerInfo&&ye.stateNode.implementation===Pe.implementation){l(we,ye.sibling),He=g(ye,Pe.children||[]),He.return=we,we=He;break e}else{l(we,ye);break}else a(we,ye);ye=ye.sibling}He=xs(Pe,we.mode,He),He.return=we,we=He}return V(we);case M:return lt=Pe._init,Pe=lt(Pe._payload),Ot(we,ye,Pe,He)}if(Q(Pe))return vt(we,ye,Pe,He);if(I(Pe)){if(lt=I(Pe),typeof lt!="function")throw Error(o(150));return Pe=lt.call(Pe),mt(we,ye,Pe,He)}if(typeof Pe.then=="function")return Ot(we,ye,Zi(Pe),He);if(Pe.$$typeof===k)return Ot(we,ye,Ii(we,Pe),He);Ji(we,Pe)}return typeof Pe=="string"&&Pe!==""||typeof Pe=="number"||typeof Pe=="bigint"?(Pe=""+Pe,ye!==null&&ye.tag===6?(l(we,ye.sibling),He=g(ye,Pe),He.return=we,we=He):(l(we,ye),He=ys(Pe,we.mode,He),He.return=we,we=He),V(we)):l(we,ye)}return function(we,ye,Pe,He){try{Va=0;var lt=Ot(we,ye,Pe,He);return ea=null,lt}catch(dt){if(dt===La||dt===Bi)throw dt;var St=cn(29,dt,null,we.mode);return St.lanes=He,St.return=we,St}finally{}}}var ta=wd(!0),_d=wd(!1),En=Y(null),Pn=null;function nr(n){var a=n.alternate;O(Gt,Gt.current&1),O(En,n),Pn===null&&(a===null||Kr.current!==null||a.memoizedState!==null)&&(Pn=n)}function Rd(n){if(n.tag===22){if(O(Gt,Gt.current),O(En,n),Pn===null){var a=n.alternate;a!==null&&a.memoizedState!==null&&(Pn=n)}}else rr()}function rr(){O(Gt,Gt.current),O(En,En.current)}function Un(n){z(En),Pn===n&&(Pn=null),z(Gt)}var Gt=Y(0);function eo(n){for(var a=n;a!==null;){if(a.tag===13){var l=a.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||l.data==="$?"||Ul(l)))return a}else if(a.tag===19&&a.memoizedProps.revealOrder!==void 0){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===n)break;for(;a.sibling===null;){if(a.return===null||a.return===n)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}function Js(n,a,l,u){a=n.memoizedState,l=l(u,a),l=l==null?a:h({},a,l),n.memoizedState=l,n.lanes===0&&(n.updateQueue.baseState=l)}var el={enqueueSetState:function(n,a,l){n=n._reactInternals;var u=pn(),g=Jn(u);g.payload=a,l!=null&&(g.callback=l),a=er(n,g,u),a!==null&&(hn(a,n,u),Fa(a,n,u))},enqueueReplaceState:function(n,a,l){n=n._reactInternals;var u=pn(),g=Jn(u);g.tag=1,g.payload=a,l!=null&&(g.callback=l),a=er(n,g,u),a!==null&&(hn(a,n,u),Fa(a,n,u))},enqueueForceUpdate:function(n,a){n=n._reactInternals;var l=pn(),u=Jn(l);u.tag=2,a!=null&&(u.callback=a),a=er(n,u,l),a!==null&&(hn(a,n,l),Fa(a,n,l))}};function Td(n,a,l,u,g,E,V){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(u,E,V):a.prototype&&a.prototype.isPureReactComponent?!Ra(l,u)||!Ra(g,E):!0}function kd(n,a,l,u){n=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(l,u),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(l,u),a.state!==n&&el.enqueueReplaceState(a,a.state,null)}function Pr(n,a){var l=a;if("ref"in a){l={};for(var u in a)u!=="ref"&&(l[u]=a[u])}if(n=n.defaultProps){l===a&&(l=h({},l));for(var g in n)l[g]===void 0&&(l[g]=n[g])}return l}var to=typeof reportError=="function"?reportError:function(n){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=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(a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",n);return}console.error(n)};function Pd(n){to(n)}function Dd(n){console.error(n)}function Md(n){to(n)}function no(n,a){try{var l=n.onUncaughtError;l(a.value,{componentStack:a.stack})}catch(u){setTimeout(function(){throw u})}}function Od(n,a,l){try{var u=n.onCaughtError;u(l.value,{componentStack:l.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(g){setTimeout(function(){throw g})}}function tl(n,a,l){return l=Jn(l),l.tag=3,l.payload={element:null},l.callback=function(){no(n,a)},l}function jd(n){return n=Jn(n),n.tag=3,n}function Ld(n,a,l,u){var g=l.type.getDerivedStateFromError;if(typeof g=="function"){var E=u.value;n.payload=function(){return g(E)},n.callback=function(){Od(a,l,u)}}var V=l.stateNode;V!==null&&typeof V.componentDidCatch=="function"&&(n.callback=function(){Od(a,l,u),typeof g!="function"&&(cr===null?cr=new Set([this]):cr.add(this));var Z=u.stack;this.componentDidCatch(u.value,{componentStack:Z!==null?Z:""})})}function im(n,a,l,u,g){if(l.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){if(a=l.alternate,a!==null&&Ma(a,l,g,!0),l=En.current,l!==null){switch(l.tag){case 13:return Pn===null?wl():l.alternate===null&&zt===0&&(zt=3),l.flags&=-257,l.flags|=65536,l.lanes=g,u===Ps?l.flags|=16384:(a=l.updateQueue,a===null?l.updateQueue=new Set([u]):a.add(u),Rl(n,u,g)),!1;case 22:return l.flags|=65536,u===Ps?l.flags|=16384:(a=l.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([u])},l.updateQueue=a):(l=a.retryQueue,l===null?a.retryQueue=new Set([u]):l.add(u)),Rl(n,u,g)),!1}throw Error(o(435,l.tag))}return Rl(n,u,g),wl(),!1}if(Rt)return a=En.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=g,u!==As&&(n=Error(o(422),{cause:u}),Da(bn(n,l)))):(u!==As&&(a=Error(o(423),{cause:u}),Da(bn(a,l))),n=n.current.alternate,n.flags|=65536,g&=-g,n.lanes|=g,u=bn(u,l),g=tl(n.stateNode,u,g),Os(n,g),zt!==4&&(zt=2)),!1;var E=Error(o(520),{cause:u});if(E=bn(E,l),Za===null?Za=[E]:Za.push(E),zt!==4&&(zt=2),a===null)return!0;u=bn(u,l),l=a;do{switch(l.tag){case 3:return l.flags|=65536,n=g&-g,l.lanes|=n,n=tl(l.stateNode,u,n),Os(l,n),!1;case 1:if(a=l.type,E=l.stateNode,(l.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||E!==null&&typeof E.componentDidCatch=="function"&&(cr===null||!cr.has(E))))return l.flags|=65536,g&=-g,l.lanes|=g,g=jd(g),Ld(g,n,l,u),Os(l,g),!1}l=l.return}while(l!==null);return!1}var Nd=Error(o(461)),Wt=!1;function Kt(n,a,l,u){a.child=n===null?_d(a,null,l,u):ta(a,n.child,l,u)}function Fd(n,a,l,u,g){l=l.render;var E=a.ref;if("ref"in u){var V={};for(var Z in u)Z!=="ref"&&(V[Z]=u[Z])}else V=u;return Rr(a),u=$s(n,a,l,V,E,g),Z=Is(),n!==null&&!Wt?(zs(n,a,g),Hn(n,a,g)):(Rt&&Z&&Ss(a),a.flags|=1,Kt(n,a,u,g),a.child)}function $d(n,a,l,u,g){if(n===null){var E=l.type;return typeof E=="function"&&!bs(E)&&E.defaultProps===void 0&&l.compare===null?(a.tag=15,a.type=E,Id(n,a,E,u,g)):(n=Li(l.type,null,u,a,a.mode,g),n.ref=a.ref,n.return=a,a.child=n)}if(E=n.child,!cl(n,g)){var V=E.memoizedProps;if(l=l.compare,l=l!==null?l:Ra,l(V,u)&&n.ref===a.ref)return Hn(n,a,g)}return a.flags|=1,n=Nn(E,u),n.ref=a.ref,n.return=a,a.child=n}function Id(n,a,l,u,g){if(n!==null){var E=n.memoizedProps;if(Ra(E,u)&&n.ref===a.ref)if(Wt=!1,a.pendingProps=u=E,cl(n,g))(n.flags&131072)!==0&&(Wt=!0);else return a.lanes=n.lanes,Hn(n,a,g)}return nl(n,a,l,u,g)}function zd(n,a,l){var u=a.pendingProps,g=u.children,E=n!==null?n.memoizedState:null;if(u.mode==="hidden"){if((a.flags&128)!==0){if(u=E!==null?E.baseLanes|l:l,n!==null){for(g=a.child=n.child,E=0;g!==null;)E=E|g.lanes|g.childLanes,g=g.sibling;a.childLanes=E&~u}else a.childLanes=0,a.child=null;return Bd(n,a,u,l)}if((l&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},n!==null&&zi(a,E!==null?E.cachePool:null),E!==null?Iu(a,E):Ls(),Rd(a);else return a.lanes=a.childLanes=536870912,Bd(n,a,E!==null?E.baseLanes|l:l,l)}else E!==null?(zi(a,E.cachePool),Iu(a,E),rr(),a.memoizedState=null):(n!==null&&zi(a,null),Ls(),rr());return Kt(n,a,g,l),a.child}function Bd(n,a,l,u){var g=ks();return g=g===null?null:{parent:qt._currentValue,pool:g},a.memoizedState={baseLanes:l,cachePool:g},n!==null&&zi(a,null),Ls(),Rd(a),n!==null&&Ma(n,a,u,!0),null}function ro(n,a){var l=a.ref;if(l===null)n!==null&&n.ref!==null&&(a.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(o(284));(n===null||n.ref!==l)&&(a.flags|=4194816)}}function nl(n,a,l,u,g){return Rr(a),l=$s(n,a,l,u,void 0,g),u=Is(),n!==null&&!Wt?(zs(n,a,g),Hn(n,a,g)):(Rt&&u&&Ss(a),a.flags|=1,Kt(n,a,l,g),a.child)}function Ud(n,a,l,u,g,E){return Rr(a),a.updateQueue=null,l=Bu(a,u,l,g),zu(n),u=Is(),n!==null&&!Wt?(zs(n,a,E),Hn(n,a,E)):(Rt&&u&&Ss(a),a.flags|=1,Kt(n,a,l,E),a.child)}function Hd(n,a,l,u,g){if(Rr(a),a.stateNode===null){var E=qr,V=l.contextType;typeof V=="object"&&V!==null&&(E=en(V)),E=new l(u,E),a.memoizedState=E.state!==null&&E.state!==void 0?E.state:null,E.updater=el,a.stateNode=E,E._reactInternals=a,E=a.stateNode,E.props=u,E.state=a.memoizedState,E.refs={},Ds(a),V=l.contextType,E.context=typeof V=="object"&&V!==null?en(V):qr,E.state=a.memoizedState,V=l.getDerivedStateFromProps,typeof V=="function"&&(Js(a,l,V,u),E.state=a.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof E.getSnapshotBeforeUpdate=="function"||typeof E.UNSAFE_componentWillMount!="function"&&typeof E.componentWillMount!="function"||(V=E.state,typeof E.componentWillMount=="function"&&E.componentWillMount(),typeof E.UNSAFE_componentWillMount=="function"&&E.UNSAFE_componentWillMount(),V!==E.state&&el.enqueueReplaceState(E,E.state,null),Ia(a,u,E,g),$a(),E.state=a.memoizedState),typeof E.componentDidMount=="function"&&(a.flags|=4194308),u=!0}else if(n===null){E=a.stateNode;var Z=a.memoizedProps,fe=Pr(l,Z);E.props=fe;var Oe=E.context,Ue=l.contextType;V=qr,typeof Ue=="object"&&Ue!==null&&(V=en(Ue));var Ve=l.getDerivedStateFromProps;Ue=typeof Ve=="function"||typeof E.getSnapshotBeforeUpdate=="function",Z=a.pendingProps!==Z,Ue||typeof E.UNSAFE_componentWillReceiveProps!="function"&&typeof E.componentWillReceiveProps!="function"||(Z||Oe!==V)&&kd(a,E,u,V),Zn=!1;var Fe=a.memoizedState;E.state=Fe,Ia(a,u,E,g),$a(),Oe=a.memoizedState,Z||Fe!==Oe||Zn?(typeof Ve=="function"&&(Js(a,l,Ve,u),Oe=a.memoizedState),(fe=Zn||Td(a,l,fe,u,Fe,Oe,V))?(Ue||typeof E.UNSAFE_componentWillMount!="function"&&typeof E.componentWillMount!="function"||(typeof E.componentWillMount=="function"&&E.componentWillMount(),typeof E.UNSAFE_componentWillMount=="function"&&E.UNSAFE_componentWillMount()),typeof E.componentDidMount=="function"&&(a.flags|=4194308)):(typeof E.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=u,a.memoizedState=Oe),E.props=u,E.state=Oe,E.context=V,u=fe):(typeof E.componentDidMount=="function"&&(a.flags|=4194308),u=!1)}else{E=a.stateNode,Ms(n,a),V=a.memoizedProps,Ue=Pr(l,V),E.props=Ue,Ve=a.pendingProps,Fe=E.context,Oe=l.contextType,fe=qr,typeof Oe=="object"&&Oe!==null&&(fe=en(Oe)),Z=l.getDerivedStateFromProps,(Oe=typeof Z=="function"||typeof E.getSnapshotBeforeUpdate=="function")||typeof E.UNSAFE_componentWillReceiveProps!="function"&&typeof E.componentWillReceiveProps!="function"||(V!==Ve||Fe!==fe)&&kd(a,E,u,fe),Zn=!1,Fe=a.memoizedState,E.state=Fe,Ia(a,u,E,g),$a();var ze=a.memoizedState;V!==Ve||Fe!==ze||Zn||n!==null&&n.dependencies!==null&&$i(n.dependencies)?(typeof Z=="function"&&(Js(a,l,Z,u),ze=a.memoizedState),(Ue=Zn||Td(a,l,Ue,u,Fe,ze,fe)||n!==null&&n.dependencies!==null&&$i(n.dependencies))?(Oe||typeof E.UNSAFE_componentWillUpdate!="function"&&typeof E.componentWillUpdate!="function"||(typeof E.componentWillUpdate=="function"&&E.componentWillUpdate(u,ze,fe),typeof E.UNSAFE_componentWillUpdate=="function"&&E.UNSAFE_componentWillUpdate(u,ze,fe)),typeof E.componentDidUpdate=="function"&&(a.flags|=4),typeof E.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof E.componentDidUpdate!="function"||V===n.memoizedProps&&Fe===n.memoizedState||(a.flags|=4),typeof E.getSnapshotBeforeUpdate!="function"||V===n.memoizedProps&&Fe===n.memoizedState||(a.flags|=1024),a.memoizedProps=u,a.memoizedState=ze),E.props=u,E.state=ze,E.context=fe,u=Ue):(typeof E.componentDidUpdate!="function"||V===n.memoizedProps&&Fe===n.memoizedState||(a.flags|=4),typeof E.getSnapshotBeforeUpdate!="function"||V===n.memoizedProps&&Fe===n.memoizedState||(a.flags|=1024),u=!1)}return E=u,ro(n,a),u=(a.flags&128)!==0,E||u?(E=a.stateNode,l=u&&typeof l.getDerivedStateFromError!="function"?null:E.render(),a.flags|=1,n!==null&&u?(a.child=ta(a,n.child,null,g),a.child=ta(a,null,l,g)):Kt(n,a,l,g),a.memoizedState=E.state,n=a.child):n=Hn(n,a,g),n}function Vd(n,a,l,u){return Pa(),a.flags|=256,Kt(n,a,l,u),a.child}var rl={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function al(n){return{baseLanes:n,cachePool:Du()}}function il(n,a,l){return n=n!==null?n.childLanes&~l:0,a&&(n|=An),n}function qd(n,a,l){var u=a.pendingProps,g=!1,E=(a.flags&128)!==0,V;if((V=E)||(V=n!==null&&n.memoizedState===null?!1:(Gt.current&2)!==0),V&&(g=!0,a.flags&=-129),V=(a.flags&32)!==0,a.flags&=-33,n===null){if(Rt){if(g?nr(a):rr(),Rt){var Z=It,fe;if(fe=Z){e:{for(fe=Z,Z=kn;fe.nodeType!==8;){if(!Z){Z=null;break e}if(fe=Tn(fe.nextSibling),fe===null){Z=null;break e}}Z=fe}Z!==null?(a.memoizedState={dehydrated:Z,treeContext:Er!==null?{id:Fn,overflow:$n}:null,retryLane:536870912,hydrationErrors:null},fe=cn(18,null,null,0),fe.stateNode=Z,fe.return=a,a.child=fe,nn=a,It=null,fe=!0):fe=!1}fe||wr(a)}if(Z=a.memoizedState,Z!==null&&(Z=Z.dehydrated,Z!==null))return Ul(Z)?a.lanes=32:a.lanes=536870912,null;Un(a)}return Z=u.children,u=u.fallback,g?(rr(),g=a.mode,Z=ao({mode:"hidden",children:Z},g),u=Sr(u,g,l,null),Z.return=a,u.return=a,Z.sibling=u,a.child=Z,g=a.child,g.memoizedState=al(l),g.childLanes=il(n,V,l),a.memoizedState=rl,u):(nr(a),ol(a,Z))}if(fe=n.memoizedState,fe!==null&&(Z=fe.dehydrated,Z!==null)){if(E)a.flags&256?(nr(a),a.flags&=-257,a=sl(n,a,l)):a.memoizedState!==null?(rr(),a.child=n.child,a.flags|=128,a=null):(rr(),g=u.fallback,Z=a.mode,u=ao({mode:"visible",children:u.children},Z),g=Sr(g,Z,l,null),g.flags|=2,u.return=a,g.return=a,u.sibling=g,a.child=u,ta(a,n.child,null,l),u=a.child,u.memoizedState=al(l),u.childLanes=il(n,V,l),a.memoizedState=rl,a=g);else if(nr(a),Ul(Z)){if(V=Z.nextSibling&&Z.nextSibling.dataset,V)var Oe=V.dgst;V=Oe,u=Error(o(419)),u.stack="",u.digest=V,Da({value:u,source:null,stack:null}),a=sl(n,a,l)}else if(Wt||Ma(n,a,l,!1),V=(l&n.childLanes)!==0,Wt||V){if(V=Nt,V!==null&&(u=l&-l,u=(u&42)!==0?1:Ke(u),u=(u&(V.suspendedLanes|l))!==0?0:u,u!==0&&u!==fe.retryLane))throw fe.retryLane=u,Vr(n,u),hn(V,n,u),Nd;Z.data==="$?"||wl(),a=sl(n,a,l)}else Z.data==="$?"?(a.flags|=192,a.child=n.child,a=null):(n=fe.treeContext,It=Tn(Z.nextSibling),nn=a,Rt=!0,Cr=null,kn=!1,n!==null&&(xn[Sn++]=Fn,xn[Sn++]=$n,xn[Sn++]=Er,Fn=n.id,$n=n.overflow,Er=a),a=ol(a,u.children),a.flags|=4096);return a}return g?(rr(),g=u.fallback,Z=a.mode,fe=n.child,Oe=fe.sibling,u=Nn(fe,{mode:"hidden",children:u.children}),u.subtreeFlags=fe.subtreeFlags&65011712,Oe!==null?g=Nn(Oe,g):(g=Sr(g,Z,l,null),g.flags|=2),g.return=a,u.return=a,u.sibling=g,a.child=u,u=g,g=a.child,Z=n.child.memoizedState,Z===null?Z=al(l):(fe=Z.cachePool,fe!==null?(Oe=qt._currentValue,fe=fe.parent!==Oe?{parent:Oe,pool:Oe}:fe):fe=Du(),Z={baseLanes:Z.baseLanes|l,cachePool:fe}),g.memoizedState=Z,g.childLanes=il(n,V,l),a.memoizedState=rl,u):(nr(a),l=n.child,n=l.sibling,l=Nn(l,{mode:"visible",children:u.children}),l.return=a,l.sibling=null,n!==null&&(V=a.deletions,V===null?(a.deletions=[n],a.flags|=16):V.push(n)),a.child=l,a.memoizedState=null,l)}function ol(n,a){return a=ao({mode:"visible",children:a},n.mode),a.return=n,n.child=a}function ao(n,a){return n=cn(22,n,null,a),n.lanes=0,n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},n}function sl(n,a,l){return ta(a,n.child,null,l),n=ol(a,a.pendingProps.children),n.flags|=2,a.memoizedState=null,n}function Gd(n,a,l){n.lanes|=a;var u=n.alternate;u!==null&&(u.lanes|=a),ws(n.return,a,l)}function ll(n,a,l,u,g){var E=n.memoizedState;E===null?n.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:u,tail:l,tailMode:g}:(E.isBackwards=a,E.rendering=null,E.renderingStartTime=0,E.last=u,E.tail=l,E.tailMode=g)}function Wd(n,a,l){var u=a.pendingProps,g=u.revealOrder,E=u.tail;if(Kt(n,a,u.children,l),u=Gt.current,(u&2)!==0)u=u&1|2,a.flags|=128;else{if(n!==null&&(n.flags&128)!==0)e:for(n=a.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&Gd(n,l,a);else if(n.tag===19)Gd(n,l,a);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===a)break e;for(;n.sibling===null;){if(n.return===null||n.return===a)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}u&=1}switch(O(Gt,u),g){case"forwards":for(l=a.child,g=null;l!==null;)n=l.alternate,n!==null&&eo(n)===null&&(g=l),l=l.sibling;l=g,l===null?(g=a.child,a.child=null):(g=l.sibling,l.sibling=null),ll(a,!1,g,l,E);break;case"backwards":for(l=null,g=a.child,a.child=null;g!==null;){if(n=g.alternate,n!==null&&eo(n)===null){a.child=g;break}n=g.sibling,g.sibling=l,l=g,g=n}ll(a,!0,l,null,E);break;case"together":ll(a,!1,null,null,void 0);break;default:a.memoizedState=null}return a.child}function Hn(n,a,l){if(n!==null&&(a.dependencies=n.dependencies),lr|=a.lanes,(l&a.childLanes)===0)if(n!==null){if(Ma(n,a,l,!1),(l&a.childLanes)===0)return null}else return null;if(n!==null&&a.child!==n.child)throw Error(o(153));if(a.child!==null){for(n=a.child,l=Nn(n,n.pendingProps),a.child=l,l.return=a;n.sibling!==null;)n=n.sibling,l=l.sibling=Nn(n,n.pendingProps),l.return=a;l.sibling=null}return a.child}function cl(n,a){return(n.lanes&a)!==0?!0:(n=n.dependencies,!!(n!==null&&$i(n)))}function om(n,a,l){switch(a.tag){case 3:J(a,a.stateNode.containerInfo),Qn(a,qt,n.memoizedState.cache),Pa();break;case 27:case 5:ue(a);break;case 4:J(a,a.stateNode.containerInfo);break;case 10:Qn(a,a.type,a.memoizedProps.value);break;case 13:var u=a.memoizedState;if(u!==null)return u.dehydrated!==null?(nr(a),a.flags|=128,null):(l&a.child.childLanes)!==0?qd(n,a,l):(nr(a),n=Hn(n,a,l),n!==null?n.sibling:null);nr(a);break;case 19:var g=(n.flags&128)!==0;if(u=(l&a.childLanes)!==0,u||(Ma(n,a,l,!1),u=(l&a.childLanes)!==0),g){if(u)return Wd(n,a,l);a.flags|=128}if(g=a.memoizedState,g!==null&&(g.rendering=null,g.tail=null,g.lastEffect=null),O(Gt,Gt.current),u)break;return null;case 22:case 23:return a.lanes=0,zd(n,a,l);case 24:Qn(a,qt,n.memoizedState.cache)}return Hn(n,a,l)}function Yd(n,a,l){if(n!==null)if(n.memoizedProps!==a.pendingProps)Wt=!0;else{if(!cl(n,l)&&(a.flags&128)===0)return Wt=!1,om(n,a,l);Wt=(n.flags&131072)!==0}else Wt=!1,Rt&&(a.flags&1048576)!==0&&Cu(a,Fi,a.index);switch(a.lanes=0,a.tag){case 16:e:{n=a.pendingProps;var u=a.elementType,g=u._init;if(u=g(u._payload),a.type=u,typeof u=="function")bs(u)?(n=Pr(u,n),a.tag=1,a=Hd(null,a,u,n,l)):(a.tag=0,a=nl(null,a,u,n,l));else{if(u!=null){if(g=u.$$typeof,g===D){a.tag=11,a=Fd(null,a,u,n,l);break e}else if(g===_){a.tag=14,a=$d(null,a,u,n,l);break e}}throw a=ae(u)||u,Error(o(306,a,""))}}return a;case 0:return nl(n,a,a.type,a.pendingProps,l);case 1:return u=a.type,g=Pr(u,a.pendingProps),Hd(n,a,u,g,l);case 3:e:{if(J(a,a.stateNode.containerInfo),n===null)throw Error(o(387));u=a.pendingProps;var E=a.memoizedState;g=E.element,Ms(n,a),Ia(a,u,null,l);var V=a.memoizedState;if(u=V.cache,Qn(a,qt,u),u!==E.cache&&_s(a,[qt],l,!0),$a(),u=V.element,E.isDehydrated)if(E={element:u,isDehydrated:!1,cache:V.cache},a.updateQueue.baseState=E,a.memoizedState=E,a.flags&256){a=Vd(n,a,u,l);break e}else if(u!==g){g=bn(Error(o(424)),a),Da(g),a=Vd(n,a,u,l);break e}else{switch(n=a.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=a,Rt=!0,Cr=null,kn=!0,l=_d(a,null,u,l),a.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(Pa(),u===g){a=Hn(n,a,l);break e}Kt(n,a,u,l)}a=a.child}return a;case 26:return ro(n,a),n===null?(l=Jf(a.type,null,a.pendingProps,null))?a.memoizedState=l:Rt||(l=a.type,n=a.pendingProps,u=yo(X.current).createElement(l),u[Re]=a,u[Ie]=n,Zt(u,l,n),Et(u),a.stateNode=u):a.memoizedState=Jf(a.type,n.memoizedProps,a.pendingProps,n.memoizedState),null;case 27:return ue(a),n===null&&Rt&&(u=a.stateNode=Kf(a.type,a.pendingProps,X.current),nn=a,kn=!0,g=It,fr(a.type)?(Hl=g,It=Tn(u.firstChild)):It=g),Kt(n,a,a.pendingProps.children,l),ro(n,a),n===null&&(a.flags|=4194304),a.child;case 5:return n===null&&Rt&&((g=u=It)&&(u=jm(u,a.type,a.pendingProps,kn),u!==null?(a.stateNode=u,nn=a,It=Tn(u.firstChild),kn=!1,g=!0):g=!1),g||wr(a)),ue(a),g=a.type,E=a.pendingProps,V=n!==null?n.memoizedProps:null,u=E.children,Il(g,E)?u=null:V!==null&&Il(g,V)&&(a.flags|=32),a.memoizedState!==null&&(g=$s(n,a,Qh,null,null,l),si._currentValue=g),ro(n,a),Kt(n,a,u,l),a.child;case 6:return n===null&&Rt&&((n=l=It)&&(l=Lm(l,a.pendingProps,kn),l!==null?(a.stateNode=l,nn=a,It=null,n=!0):n=!1),n||wr(a)),null;case 13:return qd(n,a,l);case 4:return J(a,a.stateNode.containerInfo),u=a.pendingProps,n===null?a.child=ta(a,null,u,l):Kt(n,a,u,l),a.child;case 11:return Fd(n,a,a.type,a.pendingProps,l);case 7:return Kt(n,a,a.pendingProps,l),a.child;case 8:return Kt(n,a,a.pendingProps.children,l),a.child;case 12:return Kt(n,a,a.pendingProps.children,l),a.child;case 10:return u=a.pendingProps,Qn(a,a.type,u.value),Kt(n,a,u.children,l),a.child;case 9:return g=a.type._context,u=a.pendingProps.children,Rr(a),g=en(g),u=u(g),a.flags|=1,Kt(n,a,u,l),a.child;case 14:return $d(n,a,a.type,a.pendingProps,l);case 15:return Id(n,a,a.type,a.pendingProps,l);case 19:return Wd(n,a,l);case 31:return u=a.pendingProps,l=a.mode,u={mode:u.mode,children:u.children},n===null?(l=ao(u,l),l.ref=a.ref,a.child=l,l.return=a,a=l):(l=Nn(n.child,u),l.ref=a.ref,a.child=l,l.return=a,a=l),a;case 22:return zd(n,a,l);case 24:return Rr(a),u=en(qt),n===null?(g=ks(),g===null&&(g=Nt,E=Rs(),g.pooledCache=E,E.refCount++,E!==null&&(g.pooledCacheLanes|=l),g=E),a.memoizedState={parent:u,cache:g},Ds(a),Qn(a,qt,g)):((n.lanes&l)!==0&&(Ms(n,a),Ia(a,null,null,l),$a()),g=n.memoizedState,E=a.memoizedState,g.parent!==u?(g={parent:u,cache:u},a.memoizedState=g,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=g),Qn(a,qt,u)):(u=E.cache,Qn(a,qt,u),u!==g.cache&&_s(a,[qt],l,!0))),Kt(n,a,a.pendingProps.children,l),a.child;case 29:throw a.pendingProps}throw Error(o(156,a.tag))}function Vn(n){n.flags|=4}function Xd(n,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!ap(a)){if(a=En.current,a!==null&&((wt&4194048)===wt?Pn!==null:(wt&62914560)!==wt&&(wt&536870912)===0||a!==Pn))throw Na=Ps,Mu;n.flags|=8192}}function io(n,a){a!==null&&(n.flags|=4),n.flags&16384&&(a=n.tag!==22?ht():536870912,n.lanes|=a,ia|=a)}function Ga(n,a){if(!Rt)switch(n.tailMode){case"hidden":a=n.tail;for(var l=null;a!==null;)a.alternate!==null&&(l=a),a=a.sibling;l===null?n.tail=null:l.sibling=null;break;case"collapsed":l=n.tail;for(var u=null;l!==null;)l.alternate!==null&&(u=l),l=l.sibling;u===null?a||n.tail===null?n.tail=null:n.tail.sibling=null:u.sibling=null}}function $t(n){var a=n.alternate!==null&&n.alternate.child===n.child,l=0,u=0;if(a)for(var g=n.child;g!==null;)l|=g.lanes|g.childLanes,u|=g.subtreeFlags&65011712,u|=g.flags&65011712,g.return=n,g=g.sibling;else for(g=n.child;g!==null;)l|=g.lanes|g.childLanes,u|=g.subtreeFlags,u|=g.flags,g.return=n,g=g.sibling;return n.subtreeFlags|=u,n.childLanes=l,a}function sm(n,a,l){var u=a.pendingProps;switch(Es(a),a.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return $t(a),null;case 1:return $t(a),null;case 3:return l=a.stateNode,u=null,n!==null&&(u=n.memoizedState.cache),a.memoizedState.cache!==u&&(a.flags|=2048),zn(qt),ce(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(n===null||n.child===null)&&(ka(a)?Vn(a):n===null||n.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,Ru())),$t(a),null;case 26:return l=a.memoizedState,n===null?(Vn(a),l!==null?($t(a),Xd(a,l)):($t(a),a.flags&=-16777217)):l?l!==n.memoizedState?(Vn(a),$t(a),Xd(a,l)):($t(a),a.flags&=-16777217):(n.memoizedProps!==u&&Vn(a),$t(a),a.flags&=-16777217),null;case 27:Ae(a),l=X.current;var g=a.type;if(n!==null&&a.stateNode!=null)n.memoizedProps!==u&&Vn(a);else{if(!u){if(a.stateNode===null)throw Error(o(166));return $t(a),null}n=F.current,ka(a)?wu(a):(n=Kf(g,u,l),a.stateNode=n,Vn(a))}return $t(a),null;case 5:if(Ae(a),l=a.type,n!==null&&a.stateNode!=null)n.memoizedProps!==u&&Vn(a);else{if(!u){if(a.stateNode===null)throw Error(o(166));return $t(a),null}if(n=F.current,ka(a))wu(a);else{switch(g=yo(X.current),n){case 1:n=g.createElementNS("http://www.w3.org/2000/svg",l);break;case 2:n=g.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;default:switch(l){case"svg":n=g.createElementNS("http://www.w3.org/2000/svg",l);break;case"math":n=g.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;case"script":n=g.createElement("div"),n.innerHTML="<script><\/script>",n=n.removeChild(n.firstChild);break;case"select":n=typeof u.is=="string"?g.createElement("select",{is:u.is}):g.createElement("select"),u.multiple?n.multiple=!0:u.size&&(n.size=u.size);break;default:n=typeof u.is=="string"?g.createElement(l,{is:u.is}):g.createElement(l)}}n[Re]=a,n[Ie]=u;e:for(g=a.child;g!==null;){if(g.tag===5||g.tag===6)n.appendChild(g.stateNode);else if(g.tag!==4&&g.tag!==27&&g.child!==null){g.child.return=g,g=g.child;continue}if(g===a)break e;for(;g.sibling===null;){if(g.return===null||g.return===a)break e;g=g.return}g.sibling.return=g.return,g=g.sibling}a.stateNode=n;e:switch(Zt(n,l,u),l){case"button":case"input":case"select":case"textarea":n=!!u.autoFocus;break e;case"img":n=!0;break e;default:n=!1}n&&Vn(a)}}return $t(a),a.flags&=-16777217,null;case 6:if(n&&a.stateNode!=null)n.memoizedProps!==u&&Vn(a);else{if(typeof u!="string"&&a.stateNode===null)throw Error(o(166));if(n=X.current,ka(a)){if(n=a.stateNode,l=a.memoizedProps,u=null,g=nn,g!==null)switch(g.tag){case 27:case 5:u=g.memoizedProps}n[Re]=a,n=!!(n.nodeValue===l||u!==null&&u.suppressHydrationWarning===!0||Hf(n.nodeValue,l)),n||wr(a)}else n=yo(n).createTextNode(u),n[Re]=a,a.stateNode=n}return $t(a),null;case 13:if(u=a.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(g=ka(a),u!==null&&u.dehydrated!==null){if(n===null){if(!g)throw Error(o(318));if(g=a.memoizedState,g=g!==null?g.dehydrated:null,!g)throw Error(o(317));g[Re]=a}else Pa(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;$t(a),g=!1}else g=Ru(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=g),g=!0;if(!g)return a.flags&256?(Un(a),a):(Un(a),null)}if(Un(a),(a.flags&128)!==0)return a.lanes=l,a;if(l=u!==null,n=n!==null&&n.memoizedState!==null,l){u=a.child,g=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(g=u.alternate.memoizedState.cachePool.pool);var E=null;u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(E=u.memoizedState.cachePool.pool),E!==g&&(u.flags|=2048)}return l!==n&&l&&(a.child.flags|=8192),io(a,a.updateQueue),$t(a),null;case 4:return ce(),n===null&&jl(a.stateNode.containerInfo),$t(a),null;case 10:return zn(a.type),$t(a),null;case 19:if(z(Gt),g=a.memoizedState,g===null)return $t(a),null;if(u=(a.flags&128)!==0,E=g.rendering,E===null)if(u)Ga(g,!1);else{if(zt!==0||n!==null&&(n.flags&128)!==0)for(n=a.child;n!==null;){if(E=eo(n),E!==null){for(a.flags|=128,Ga(g,!1),n=E.updateQueue,a.updateQueue=n,io(a,n),a.subtreeFlags=0,n=l,l=a.child;l!==null;)Au(l,n),l=l.sibling;return O(Gt,Gt.current&1|2),a.child}n=n.sibling}g.tail!==null&&oe()>lo&&(a.flags|=128,u=!0,Ga(g,!1),a.lanes=4194304)}else{if(!u)if(n=eo(E),n!==null){if(a.flags|=128,u=!0,n=n.updateQueue,a.updateQueue=n,io(a,n),Ga(g,!0),g.tail===null&&g.tailMode==="hidden"&&!E.alternate&&!Rt)return $t(a),null}else 2*oe()-g.renderingStartTime>lo&&l!==536870912&&(a.flags|=128,u=!0,Ga(g,!1),a.lanes=4194304);g.isBackwards?(E.sibling=a.child,a.child=E):(n=g.last,n!==null?n.sibling=E:a.child=E,g.last=E)}return g.tail!==null?(a=g.tail,g.rendering=a,g.tail=a.sibling,g.renderingStartTime=oe(),a.sibling=null,n=Gt.current,O(Gt,u?n&1|2:n&1),a):($t(a),null);case 22:case 23:return Un(a),Ns(),u=a.memoizedState!==null,n!==null?n.memoizedState!==null!==u&&(a.flags|=8192):u&&(a.flags|=8192),u?(l&536870912)!==0&&(a.flags&128)===0&&($t(a),a.subtreeFlags&6&&(a.flags|=8192)):$t(a),l=a.updateQueue,l!==null&&io(a,l.retryQueue),l=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(l=n.memoizedState.cachePool.pool),u=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),u!==l&&(a.flags|=2048),n!==null&&z(Tr),null;case 24:return l=null,n!==null&&(l=n.memoizedState.cache),a.memoizedState.cache!==l&&(a.flags|=2048),zn(qt),$t(a),null;case 25:return null;case 30:return null}throw Error(o(156,a.tag))}function lm(n,a){switch(Es(a),a.tag){case 1:return n=a.flags,n&65536?(a.flags=n&-65537|128,a):null;case 3:return zn(qt),ce(),n=a.flags,(n&65536)!==0&&(n&128)===0?(a.flags=n&-65537|128,a):null;case 26:case 27:case 5:return Ae(a),null;case 13:if(Un(a),n=a.memoizedState,n!==null&&n.dehydrated!==null){if(a.alternate===null)throw Error(o(340));Pa()}return n=a.flags,n&65536?(a.flags=n&-65537|128,a):null;case 19:return z(Gt),null;case 4:return ce(),null;case 10:return zn(a.type),null;case 22:case 23:return Un(a),Ns(),n!==null&&z(Tr),n=a.flags,n&65536?(a.flags=n&-65537|128,a):null;case 24:return zn(qt),null;case 25:return null;default:return null}}function Kd(n,a){switch(Es(a),a.tag){case 3:zn(qt),ce();break;case 26:case 27:case 5:Ae(a);break;case 4:ce();break;case 13:Un(a);break;case 19:z(Gt);break;case 10:zn(a.type);break;case 22:case 23:Un(a),Ns(),n!==null&&z(Tr);break;case 24:zn(qt)}}function Wa(n,a){try{var l=a.updateQueue,u=l!==null?l.lastEffect:null;if(u!==null){var g=u.next;l=g;do{if((l.tag&n)===n){u=void 0;var E=l.create,V=l.inst;u=E(),V.destroy=u}l=l.next}while(l!==g)}}catch(Z){jt(a,a.return,Z)}}function ar(n,a,l){try{var u=a.updateQueue,g=u!==null?u.lastEffect:null;if(g!==null){var E=g.next;u=E;do{if((u.tag&n)===n){var V=u.inst,Z=V.destroy;if(Z!==void 0){V.destroy=void 0,g=a;var fe=l,Oe=Z;try{Oe()}catch(Ue){jt(g,fe,Ue)}}}u=u.next}while(u!==E)}}catch(Ue){jt(a,a.return,Ue)}}function Qd(n){var a=n.updateQueue;if(a!==null){var l=n.stateNode;try{$u(a,l)}catch(u){jt(n,n.return,u)}}}function Zd(n,a,l){l.props=Pr(n.type,n.memoizedProps),l.state=n.memoizedState;try{l.componentWillUnmount()}catch(u){jt(n,a,u)}}function Ya(n,a){try{var l=n.ref;if(l!==null){switch(n.tag){case 26:case 27:case 5:var u=n.stateNode;break;case 30:u=n.stateNode;break;default:u=n.stateNode}typeof l=="function"?n.refCleanup=l(u):l.current=u}}catch(g){jt(n,a,g)}}function Dn(n,a){var l=n.ref,u=n.refCleanup;if(l!==null)if(typeof u=="function")try{u()}catch(g){jt(n,a,g)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(g){jt(n,a,g)}else l.current=null}function Jd(n){var a=n.type,l=n.memoizedProps,u=n.stateNode;try{e:switch(a){case"button":case"input":case"select":case"textarea":l.autoFocus&&u.focus();break e;case"img":l.src?u.src=l.src:l.srcSet&&(u.srcset=l.srcSet)}}catch(g){jt(n,n.return,g)}}function ul(n,a,l){try{var u=n.stateNode;km(u,n.type,l,a),u[Ie]=a}catch(g){jt(n,n.return,g)}}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,a,l){var u=n.tag;if(u===5||u===6)n=n.stateNode,a?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(n,a):(a=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,a.appendChild(n),l=l._reactRootContainer,l!=null||a.onclick!==null||(a.onclick=bo));else if(u!==4&&(u===27&&fr(n.type)&&(l=n.stateNode,a=null),n=n.child,n!==null))for(fl(n,a,l),n=n.sibling;n!==null;)fl(n,a,l),n=n.sibling}function oo(n,a,l){var u=n.tag;if(u===5||u===6)n=n.stateNode,a?l.insertBefore(n,a):l.appendChild(n);else if(u!==4&&(u===27&&fr(n.type)&&(l=n.stateNode),n=n.child,n!==null))for(oo(n,a,l),n=n.sibling;n!==null;)oo(n,a,l),n=n.sibling}function tf(n){var a=n.stateNode,l=n.memoizedProps;try{for(var u=n.type,g=a.attributes;g.length;)a.removeAttributeNode(g[0]);Zt(a,u,l),a[Re]=n,a[Ie]=l}catch(E){jt(n,n.return,E)}}var qn=!1,Ut=!1,pl=!1,nf=typeof WeakSet=="function"?WeakSet:Set,Yt=null;function cm(n,a){if(n=n.containerInfo,Fl=wo,n=pu(n),ds(n)){if("selectionStart"in n)var l={start:n.selectionStart,end:n.selectionEnd};else e:{l=(l=n.ownerDocument)&&l.defaultView||window;var u=l.getSelection&&l.getSelection();if(u&&u.rangeCount!==0){l=u.anchorNode;var g=u.anchorOffset,E=u.focusNode;u=u.focusOffset;try{l.nodeType,E.nodeType}catch{l=null;break e}var V=0,Z=-1,fe=-1,Oe=0,Ue=0,Ve=n,Fe=null;t:for(;;){for(var ze;Ve!==l||g!==0&&Ve.nodeType!==3||(Z=V+g),Ve!==E||u!==0&&Ve.nodeType!==3||(fe=V+u),Ve.nodeType===3&&(V+=Ve.nodeValue.length),(ze=Ve.firstChild)!==null;)Fe=Ve,Ve=ze;for(;;){if(Ve===n)break t;if(Fe===l&&++Oe===g&&(Z=V),Fe===E&&++Ue===u&&(fe=V),(ze=Ve.nextSibling)!==null)break;Ve=Fe,Fe=Ve.parentNode}Ve=ze}l=Z===-1||fe===-1?null:{start:Z,end:fe}}else l=null}l=l||{start:0,end:0}}else l=null;for($l={focusedElem:n,selectionRange:l},wo=!1,Yt=a;Yt!==null;)if(a=Yt,n=a.child,(a.subtreeFlags&1024)!==0&&n!==null)n.return=a,Yt=n;else for(;Yt!==null;){switch(a=Yt,E=a.alternate,n=a.flags,a.tag){case 0:break;case 11:case 15:break;case 1:if((n&1024)!==0&&E!==null){n=void 0,l=a,g=E.memoizedProps,E=E.memoizedState,u=l.stateNode;try{var vt=Pr(l.type,g,l.elementType===l.type);n=u.getSnapshotBeforeUpdate(vt,E),u.__reactInternalSnapshotBeforeUpdate=n}catch(mt){jt(l,l.return,mt)}}break;case 3:if((n&1024)!==0){if(n=a.stateNode.containerInfo,l=n.nodeType,l===9)Bl(n);else if(l===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(o(163))}if(n=a.sibling,n!==null){n.return=a.return,Yt=n;break}Yt=a.return}}function rf(n,a,l){var u=l.flags;switch(l.tag){case 0:case 11:case 15:ir(n,l),u&4&&Wa(5,l);break;case 1:if(ir(n,l),u&4)if(n=l.stateNode,a===null)try{n.componentDidMount()}catch(V){jt(l,l.return,V)}else{var g=Pr(l.type,a.memoizedProps);a=a.memoizedState;try{n.componentDidUpdate(g,a,n.__reactInternalSnapshotBeforeUpdate)}catch(V){jt(l,l.return,V)}}u&64&&Qd(l),u&512&&Ya(l,l.return);break;case 3:if(ir(n,l),u&64&&(n=l.updateQueue,n!==null)){if(a=null,l.child!==null)switch(l.child.tag){case 27:case 5:a=l.child.stateNode;break;case 1:a=l.child.stateNode}try{$u(n,a)}catch(V){jt(l,l.return,V)}}break;case 27:a===null&&u&4&&tf(l);case 26:case 5:ir(n,l),a===null&&u&4&&Jd(l),u&512&&Ya(l,l.return);break;case 12:ir(n,l);break;case 13:ir(n,l),u&4&&sf(n,l),u&64&&(n=l.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(l=bm.bind(null,l),Nm(n,l))));break;case 22:if(u=l.memoizedState!==null||qn,!u){a=a!==null&&a.memoizedState!==null||Ut,g=qn;var E=Ut;qn=u,(Ut=a)&&!E?or(n,l,(l.subtreeFlags&8772)!==0):ir(n,l),qn=g,Ut=E}break;case 30:break;default:ir(n,l)}}function af(n){var a=n.alternate;a!==null&&(n.alternate=null,af(a)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(a=n.stateNode,a!==null&&rt(a)),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 Ft=null,on=!1;function Gn(n,a,l){for(l=l.child;l!==null;)of(n,a,l),l=l.sibling}function of(n,a,l){if(Le&&typeof Le.onCommitFiberUnmount=="function")try{Le.onCommitFiberUnmount($e,l)}catch{}switch(l.tag){case 26:Ut||Dn(l,a),Gn(n,a,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:Ut||Dn(l,a);var u=Ft,g=on;fr(l.type)&&(Ft=l.stateNode,on=!1),Gn(n,a,l),ri(l.stateNode),Ft=u,on=g;break;case 5:Ut||Dn(l,a);case 6:if(u=Ft,g=on,Ft=null,Gn(n,a,l),Ft=u,on=g,Ft!==null)if(on)try{(Ft.nodeType===9?Ft.body:Ft.nodeName==="HTML"?Ft.ownerDocument.body:Ft).removeChild(l.stateNode)}catch(E){jt(l,a,E)}else try{Ft.removeChild(l.stateNode)}catch(E){jt(l,a,E)}break;case 18:Ft!==null&&(on?(n=Ft,Yf(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,l.stateNode),di(n)):Yf(Ft,l.stateNode));break;case 4:u=Ft,g=on,Ft=l.stateNode.containerInfo,on=!0,Gn(n,a,l),Ft=u,on=g;break;case 0:case 11:case 14:case 15:Ut||ar(2,l,a),Ut||ar(4,l,a),Gn(n,a,l);break;case 1:Ut||(Dn(l,a),u=l.stateNode,typeof u.componentWillUnmount=="function"&&Zd(l,a,u)),Gn(n,a,l);break;case 21:Gn(n,a,l);break;case 22:Ut=(u=Ut)||l.memoizedState!==null,Gn(n,a,l),Ut=u;break;default:Gn(n,a,l)}}function sf(n,a){if(a.memoizedState===null&&(n=a.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{di(n)}catch(l){jt(a,a.return,l)}}function um(n){switch(n.tag){case 13:case 19:var a=n.stateNode;return a===null&&(a=n.stateNode=new nf),a;case 22:return n=n.stateNode,a=n._retryCache,a===null&&(a=n._retryCache=new nf),a;default:throw Error(o(435,n.tag))}}function hl(n,a){var l=um(n);a.forEach(function(u){var g=ym.bind(null,n,u);l.has(u)||(l.add(u),u.then(g,g))})}function un(n,a){var l=a.deletions;if(l!==null)for(var u=0;u<l.length;u++){var g=l[u],E=n,V=a,Z=V;e:for(;Z!==null;){switch(Z.tag){case 27:if(fr(Z.type)){Ft=Z.stateNode,on=!1;break e}break;case 5:Ft=Z.stateNode,on=!1;break e;case 3:case 4:Ft=Z.stateNode.containerInfo,on=!0;break e}Z=Z.return}if(Ft===null)throw Error(o(160));of(E,V,g),Ft=null,on=!1,E=g.alternate,E!==null&&(E.return=null),g.return=null}if(a.subtreeFlags&13878)for(a=a.child;a!==null;)lf(a,n),a=a.sibling}var Rn=null;function lf(n,a){var l=n.alternate,u=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:un(a,n),dn(n),u&4&&(ar(3,n,n.return),Wa(3,n),ar(5,n,n.return));break;case 1:un(a,n),dn(n),u&512&&(Ut||l===null||Dn(l,l.return)),u&64&&qn&&(n=n.updateQueue,n!==null&&(u=n.callbacks,u!==null&&(l=n.shared.hiddenCallbacks,n.shared.hiddenCallbacks=l===null?u:l.concat(u))));break;case 26:var g=Rn;if(un(a,n),dn(n),u&512&&(Ut||l===null||Dn(l,l.return)),u&4){var E=l!==null?l.memoizedState:null;if(u=n.memoizedState,l===null)if(u===null)if(n.stateNode===null){e:{u=n.type,l=n.memoizedProps,g=g.ownerDocument||g;t:switch(u){case"title":E=g.getElementsByTagName("title")[0],(!E||E[Ze]||E[Re]||E.namespaceURI==="http://www.w3.org/2000/svg"||E.hasAttribute("itemprop"))&&(E=g.createElement(u),g.head.insertBefore(E,g.querySelector("head > title"))),Zt(E,u,l),E[Re]=n,Et(E),u=E;break e;case"link":var V=np("link","href",g).get(u+(l.href||""));if(V){for(var Z=0;Z<V.length;Z++)if(E=V[Z],E.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&E.getAttribute("rel")===(l.rel==null?null:l.rel)&&E.getAttribute("title")===(l.title==null?null:l.title)&&E.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){V.splice(Z,1);break t}}E=g.createElement(u),Zt(E,u,l),g.head.appendChild(E);break;case"meta":if(V=np("meta","content",g).get(u+(l.content||""))){for(Z=0;Z<V.length;Z++)if(E=V[Z],E.getAttribute("content")===(l.content==null?null:""+l.content)&&E.getAttribute("name")===(l.name==null?null:l.name)&&E.getAttribute("property")===(l.property==null?null:l.property)&&E.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&E.getAttribute("charset")===(l.charSet==null?null:l.charSet)){V.splice(Z,1);break t}}E=g.createElement(u),Zt(E,u,l),g.head.appendChild(E);break;default:throw Error(o(468,u))}E[Re]=n,Et(E),u=E}n.stateNode=u}else rp(g,n.type,n.stateNode);else n.stateNode=tp(g,u,n.memoizedProps);else E!==u?(E===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):E.count--,u===null?rp(g,n.type,n.stateNode):tp(g,u,n.memoizedProps)):u===null&&n.stateNode!==null&&ul(n,n.memoizedProps,l.memoizedProps)}break;case 27:un(a,n),dn(n),u&512&&(Ut||l===null||Dn(l,l.return)),l!==null&&u&4&&ul(n,n.memoizedProps,l.memoizedProps);break;case 5:if(un(a,n),dn(n),u&512&&(Ut||l===null||Dn(l,l.return)),n.flags&32){g=n.stateNode;try{Fr(g,"")}catch(ze){jt(n,n.return,ze)}}u&4&&n.stateNode!=null&&(g=n.memoizedProps,ul(n,g,l!==null?l.memoizedProps:g)),u&1024&&(pl=!0);break;case 6:if(un(a,n),dn(n),u&4){if(n.stateNode===null)throw Error(o(162));u=n.memoizedProps,l=n.stateNode;try{l.nodeValue=u}catch(ze){jt(n,n.return,ze)}}break;case 3:if(Eo=null,g=Rn,Rn=xo(a.containerInfo),un(a,n),Rn=g,dn(n),u&4&&l!==null&&l.memoizedState.isDehydrated)try{di(a.containerInfo)}catch(ze){jt(n,n.return,ze)}pl&&(pl=!1,cf(n));break;case 4:u=Rn,Rn=xo(n.stateNode.containerInfo),un(a,n),dn(n),Rn=u;break;case 12:un(a,n),dn(n);break;case 13:un(a,n),dn(n),n.child.flags&8192&&n.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(xl=oe()),u&4&&(u=n.updateQueue,u!==null&&(n.updateQueue=null,hl(n,u)));break;case 22:g=n.memoizedState!==null;var fe=l!==null&&l.memoizedState!==null,Oe=qn,Ue=Ut;if(qn=Oe||g,Ut=Ue||fe,un(a,n),Ut=Ue,qn=Oe,dn(n),u&8192)e:for(a=n.stateNode,a._visibility=g?a._visibility&-2:a._visibility|1,g&&(l===null||fe||qn||Ut||Dr(n)),l=null,a=n;;){if(a.tag===5||a.tag===26){if(l===null){fe=l=a;try{if(E=fe.stateNode,g)V=E.style,typeof V.setProperty=="function"?V.setProperty("display","none","important"):V.display="none";else{Z=fe.stateNode;var Ve=fe.memoizedProps.style,Fe=Ve!=null&&Ve.hasOwnProperty("display")?Ve.display:null;Z.style.display=Fe==null||typeof Fe=="boolean"?"":(""+Fe).trim()}}catch(ze){jt(fe,fe.return,ze)}}}else if(a.tag===6){if(l===null){fe=a;try{fe.stateNode.nodeValue=g?"":fe.memoizedProps}catch(ze){jt(fe,fe.return,ze)}}}else if((a.tag!==22&&a.tag!==23||a.memoizedState===null||a===n)&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===n)break e;for(;a.sibling===null;){if(a.return===null||a.return===n)break e;l===a&&(l=null),a=a.return}l===a&&(l=null),a.sibling.return=a.return,a=a.sibling}u&4&&(u=n.updateQueue,u!==null&&(l=u.retryQueue,l!==null&&(u.retryQueue=null,hl(n,l))));break;case 19:un(a,n),dn(n),u&4&&(u=n.updateQueue,u!==null&&(n.updateQueue=null,hl(n,u)));break;case 30:break;case 21:break;default:un(a,n),dn(n)}}function dn(n){var a=n.flags;if(a&2){try{for(var l,u=n.return;u!==null;){if(ef(u)){l=u;break}u=u.return}if(l==null)throw Error(o(160));switch(l.tag){case 27:var g=l.stateNode,E=dl(n);oo(n,E,g);break;case 5:var V=l.stateNode;l.flags&32&&(Fr(V,""),l.flags&=-33);var Z=dl(n);oo(n,Z,V);break;case 3:case 4:var fe=l.stateNode.containerInfo,Oe=dl(n);fl(n,Oe,fe);break;default:throw Error(o(161))}}catch(Ue){jt(n,n.return,Ue)}n.flags&=-3}a&4096&&(n.flags&=-4097)}function cf(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var a=n;cf(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),n=n.sibling}}function ir(n,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)rf(n,a.alternate,a),a=a.sibling}function Dr(n){for(n=n.child;n!==null;){var a=n;switch(a.tag){case 0:case 11:case 14:case 15:ar(4,a,a.return),Dr(a);break;case 1:Dn(a,a.return);var l=a.stateNode;typeof l.componentWillUnmount=="function"&&Zd(a,a.return,l),Dr(a);break;case 27:ri(a.stateNode);case 26:case 5:Dn(a,a.return),Dr(a);break;case 22:a.memoizedState===null&&Dr(a);break;case 30:Dr(a);break;default:Dr(a)}n=n.sibling}}function or(n,a,l){for(l=l&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var u=a.alternate,g=n,E=a,V=E.flags;switch(E.tag){case 0:case 11:case 15:or(g,E,l),Wa(4,E);break;case 1:if(or(g,E,l),u=E,g=u.stateNode,typeof g.componentDidMount=="function")try{g.componentDidMount()}catch(Oe){jt(u,u.return,Oe)}if(u=E,g=u.updateQueue,g!==null){var Z=u.stateNode;try{var fe=g.shared.hiddenCallbacks;if(fe!==null)for(g.shared.hiddenCallbacks=null,g=0;g<fe.length;g++)Fu(fe[g],Z)}catch(Oe){jt(u,u.return,Oe)}}l&&V&64&&Qd(E),Ya(E,E.return);break;case 27:tf(E);case 26:case 5:or(g,E,l),l&&u===null&&V&4&&Jd(E),Ya(E,E.return);break;case 12:or(g,E,l);break;case 13:or(g,E,l),l&&V&4&&sf(g,E);break;case 22:E.memoizedState===null&&or(g,E,l),Ya(E,E.return);break;case 30:break;default:or(g,E,l)}a=a.sibling}}function ml(n,a){var l=null;n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(l=n.memoizedState.cachePool.pool),n=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(n=a.memoizedState.cachePool.pool),n!==l&&(n!=null&&n.refCount++,l!=null&&Oa(l))}function gl(n,a){n=null,a.alternate!==null&&(n=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==n&&(a.refCount++,n!=null&&Oa(n))}function Mn(n,a,l,u){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)uf(n,a,l,u),a=a.sibling}function uf(n,a,l,u){var g=a.flags;switch(a.tag){case 0:case 11:case 15:Mn(n,a,l,u),g&2048&&Wa(9,a);break;case 1:Mn(n,a,l,u);break;case 3:Mn(n,a,l,u),g&2048&&(n=null,a.alternate!==null&&(n=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==n&&(a.refCount++,n!=null&&Oa(n)));break;case 12:if(g&2048){Mn(n,a,l,u),n=a.stateNode;try{var E=a.memoizedProps,V=E.id,Z=E.onPostCommit;typeof Z=="function"&&Z(V,a.alternate===null?"mount":"update",n.passiveEffectDuration,-0)}catch(fe){jt(a,a.return,fe)}}else Mn(n,a,l,u);break;case 13:Mn(n,a,l,u);break;case 23:break;case 22:E=a.stateNode,V=a.alternate,a.memoizedState!==null?E._visibility&2?Mn(n,a,l,u):Xa(n,a):E._visibility&2?Mn(n,a,l,u):(E._visibility|=2,na(n,a,l,u,(a.subtreeFlags&10256)!==0)),g&2048&&ml(V,a);break;case 24:Mn(n,a,l,u),g&2048&&gl(a.alternate,a);break;default:Mn(n,a,l,u)}}function na(n,a,l,u,g){for(g=g&&(a.subtreeFlags&10256)!==0,a=a.child;a!==null;){var E=n,V=a,Z=l,fe=u,Oe=V.flags;switch(V.tag){case 0:case 11:case 15:na(E,V,Z,fe,g),Wa(8,V);break;case 23:break;case 22:var Ue=V.stateNode;V.memoizedState!==null?Ue._visibility&2?na(E,V,Z,fe,g):Xa(E,V):(Ue._visibility|=2,na(E,V,Z,fe,g)),g&&Oe&2048&&ml(V.alternate,V);break;case 24:na(E,V,Z,fe,g),g&&Oe&2048&&gl(V.alternate,V);break;default:na(E,V,Z,fe,g)}a=a.sibling}}function Xa(n,a){if(a.subtreeFlags&10256)for(a=a.child;a!==null;){var l=n,u=a,g=u.flags;switch(u.tag){case 22:Xa(l,u),g&2048&&ml(u.alternate,u);break;case 24:Xa(l,u),g&2048&&gl(u.alternate,u);break;default:Xa(l,u)}a=a.sibling}}var Ka=8192;function ra(n){if(n.subtreeFlags&Ka)for(n=n.child;n!==null;)df(n),n=n.sibling}function df(n){switch(n.tag){case 26:ra(n),n.flags&Ka&&n.memoizedState!==null&&Xm(Rn,n.memoizedState,n.memoizedProps);break;case 5:ra(n);break;case 3:case 4:var a=Rn;Rn=xo(n.stateNode.containerInfo),ra(n),Rn=a;break;case 22:n.memoizedState===null&&(a=n.alternate,a!==null&&a.memoizedState!==null?(a=Ka,Ka=16777216,ra(n),Ka=a):ra(n));break;default:ra(n)}}function ff(n){var a=n.alternate;if(a!==null&&(n=a.child,n!==null)){a.child=null;do a=n.sibling,n.sibling=null,n=a;while(n!==null)}}function Qa(n){var a=n.deletions;if((n.flags&16)!==0){if(a!==null)for(var l=0;l<a.length;l++){var u=a[l];Yt=u,hf(u,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:Qa(n),n.flags&2048&&ar(9,n,n.return);break;case 3:Qa(n);break;case 12:Qa(n);break;case 22:var a=n.stateNode;n.memoizedState!==null&&a._visibility&2&&(n.return===null||n.return.tag!==13)?(a._visibility&=-3,so(n)):Qa(n);break;default:Qa(n)}}function so(n){var a=n.deletions;if((n.flags&16)!==0){if(a!==null)for(var l=0;l<a.length;l++){var u=a[l];Yt=u,hf(u,n)}ff(n)}for(n=n.child;n!==null;){switch(a=n,a.tag){case 0:case 11:case 15:ar(8,a,a.return),so(a);break;case 22:l=a.stateNode,l._visibility&2&&(l._visibility&=-3,so(a));break;default:so(a)}n=n.sibling}}function hf(n,a){for(;Yt!==null;){var l=Yt;switch(l.tag){case 0:case 11:case 15:ar(8,l,a);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var u=l.memoizedState.cachePool.pool;u!=null&&u.refCount++}break;case 24:Oa(l.memoizedState.cache)}if(u=l.child,u!==null)u.return=l,Yt=u;else e:for(l=n;Yt!==null;){u=Yt;var g=u.sibling,E=u.return;if(af(u),u===l){Yt=null;break e}if(g!==null){g.return=E,Yt=g;break e}Yt=E}}}var dm={getCacheForType:function(n){var a=en(qt),l=a.data.get(n);return l===void 0&&(l=n(),a.data.set(n,l)),l}},fm=typeof WeakMap=="function"?WeakMap:Map,Tt=0,Nt=null,At=null,wt=0,kt=0,fn=null,sr=!1,aa=!1,vl=!1,Wn=0,zt=0,lr=0,Mr=0,bl=0,An=0,ia=0,Za=null,sn=null,yl=!1,xl=0,lo=1/0,co=null,cr=null,Qt=0,ur=null,oa=null,sa=0,Sl=0,El=null,mf=null,Ja=0,Al=null;function pn(){if((Tt&2)!==0&&wt!==0)return wt&-wt;if(B.T!==null){var n=Yr;return n!==0?n:Pl()}return ne()}function gf(){An===0&&(An=(wt&536870912)===0||Rt?pt():536870912);var n=En.current;return n!==null&&(n.flags|=32),An}function hn(n,a,l){(n===Nt&&(kt===2||kt===9)||n.cancelPendingCommit!==null)&&(la(n,0),dr(n,wt,An,!1)),Ne(n,l),((Tt&2)===0||n!==Nt)&&(n===Nt&&((Tt&2)===0&&(Mr|=l),zt===4&&dr(n,wt,An,!1)),On(n))}function vf(n,a,l){if((Tt&6)!==0)throw Error(o(327));var u=!l&&(a&124)===0&&(a&n.expiredLanes)===0||xe(n,a),g=u?mm(n,a):_l(n,a,!0),E=u;do{if(g===0){aa&&!u&&dr(n,a,0,!1);break}else{if(l=n.current.alternate,E&&!pm(l)){g=_l(n,a,!1),E=!1;continue}if(g===2){if(E=a,n.errorRecoveryDisabledLanes&E)var V=0;else V=n.pendingLanes&-536870913,V=V!==0?V:V&536870912?536870912:0;if(V!==0){a=V;e:{var Z=n;g=Za;var fe=Z.current.memoizedState.isDehydrated;if(fe&&(la(Z,V).flags|=256),V=_l(Z,V,!1),V!==2){if(vl&&!fe){Z.errorRecoveryDisabledLanes|=E,Mr|=E,g=4;break e}E=sn,sn=g,E!==null&&(sn===null?sn=E:sn.push.apply(sn,E))}g=V}if(E=!1,g!==2)continue}}if(g===1){la(n,0),dr(n,a,0,!0);break}e:{switch(u=n,E=g,E){case 0:case 1:throw Error(o(345));case 4:if((a&4194048)!==a)break;case 6:dr(u,a,An,!sr);break e;case 2:sn=null;break;case 3:case 5:break;default:throw Error(o(329))}if((a&62914560)===a&&(g=xl+300-oe(),10<g)){if(dr(u,a,An,!sr),be(u,0,!0)!==0)break e;u.timeoutHandle=Gf(bf.bind(null,u,l,sn,co,yl,a,An,Mr,ia,sr,E,2,-0,0),g);break e}bf(u,l,sn,co,yl,a,An,Mr,ia,sr,E,0,-0,0)}}break}while(!0);On(n)}function bf(n,a,l,u,g,E,V,Z,fe,Oe,Ue,Ve,Fe,ze){if(n.timeoutHandle=-1,Ve=a.subtreeFlags,(Ve&8192||(Ve&16785408)===16785408)&&(oi={stylesheets:null,count:0,unsuspend:Ym},df(a),Ve=Km(),Ve!==null)){n.cancelPendingCommit=Ve(wf.bind(null,n,a,E,l,u,g,V,Z,fe,Ue,1,Fe,ze)),dr(n,E,V,!Oe);return}wf(n,a,E,l,u,g,V,Z,fe)}function pm(n){for(var a=n;;){var l=a.tag;if((l===0||l===11||l===15)&&a.flags&16384&&(l=a.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var u=0;u<l.length;u++){var g=l[u],E=g.getSnapshot;g=g.value;try{if(!ln(E(),g))return!1}catch{return!1}}if(l=a.child,a.subtreeFlags&16384&&l!==null)l.return=a,a=l;else{if(a===n)break;for(;a.sibling===null;){if(a.return===null||a.return===n)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function dr(n,a,l,u){a&=~bl,a&=~Mr,n.suspendedLanes|=a,n.pingedLanes&=~a,u&&(n.warmLanes|=a),u=n.expirationTimes;for(var g=a;0<g;){var E=31-qe(g),V=1<<E;u[E]=-1,g&=~V}l!==0&&nt(n,l,a)}function uo(){return(Tt&6)===0?(ei(0),!1):!0}function Cl(){if(At!==null){if(kt===0)var n=At.return;else n=At,In=_r=null,Bs(n),ea=null,Va=0,n=At;for(;n!==null;)Kd(n.alternate,n),n=n.return;At=null}}function la(n,a){var l=n.timeoutHandle;l!==-1&&(n.timeoutHandle=-1,Dm(l)),l=n.cancelPendingCommit,l!==null&&(n.cancelPendingCommit=null,l()),Cl(),Nt=n,At=l=Nn(n.current,null),wt=a,kt=0,fn=null,sr=!1,aa=xe(n,a),vl=!1,ia=An=bl=Mr=lr=zt=0,sn=Za=null,yl=!1,(a&8)!==0&&(a|=a&32);var u=n.entangledLanes;if(u!==0)for(n=n.entanglements,u&=a;0<u;){var g=31-qe(u),E=1<<g;a|=n[g],u&=~E}return Wn=a,Mi(),l}function yf(n,a){yt=null,B.H=Qi,a===La||a===Bi?(a=Lu(),kt=3):a===Mu?(a=Lu(),kt=4):kt=a===Nd?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,fn=a,At===null&&(zt=1,no(n,bn(a,n.current)))}function xf(){var n=B.H;return B.H=Qi,n===null?Qi:n}function Sf(){var n=B.A;return B.A=dm,n}function wl(){zt=4,sr||(wt&4194048)!==wt&&En.current!==null||(aa=!0),(lr&134217727)===0&&(Mr&134217727)===0||Nt===null||dr(Nt,wt,An,!1)}function _l(n,a,l){var u=Tt;Tt|=2;var g=xf(),E=Sf();(Nt!==n||wt!==a)&&(co=null,la(n,a)),a=!1;var V=zt;e:do try{if(kt!==0&&At!==null){var Z=At,fe=fn;switch(kt){case 8:Cl(),V=6;break e;case 3:case 2:case 9:case 6:En.current===null&&(a=!0);var Oe=kt;if(kt=0,fn=null,ca(n,Z,fe,Oe),l&&aa){V=0;break e}break;default:Oe=kt,kt=0,fn=null,ca(n,Z,fe,Oe)}}hm(),V=zt;break}catch(Ue){yf(n,Ue)}while(!0);return a&&n.shellSuspendCounter++,In=_r=null,Tt=u,B.H=g,B.A=E,At===null&&(Nt=null,wt=0,Mi()),V}function hm(){for(;At!==null;)Ef(At)}function mm(n,a){var l=Tt;Tt|=2;var u=xf(),g=Sf();Nt!==n||wt!==a?(co=null,lo=oe()+500,la(n,a)):aa=xe(n,a);e:do try{if(kt!==0&&At!==null){a=At;var E=fn;t:switch(kt){case 1:kt=0,fn=null,ca(n,a,E,1);break;case 2:case 9:if(Ou(E)){kt=0,fn=null,Af(a);break}a=function(){kt!==2&&kt!==9||Nt!==n||(kt=7),On(n)},E.then(a,a);break e;case 3:kt=7;break e;case 4:kt=5;break e;case 7:Ou(E)?(kt=0,fn=null,Af(a)):(kt=0,fn=null,ca(n,a,E,7));break;case 5:var V=null;switch(At.tag){case 26:V=At.memoizedState;case 5:case 27:var Z=At;if(!V||ap(V)){kt=0,fn=null;var fe=Z.sibling;if(fe!==null)At=fe;else{var Oe=Z.return;Oe!==null?(At=Oe,fo(Oe)):At=null}break t}}kt=0,fn=null,ca(n,a,E,5);break;case 6:kt=0,fn=null,ca(n,a,E,6);break;case 8:Cl(),zt=6;break e;default:throw Error(o(462))}}gm();break}catch(Ue){yf(n,Ue)}while(!0);return In=_r=null,B.H=u,B.A=g,Tt=l,At!==null?0:(Nt=null,wt=0,Mi(),zt)}function gm(){for(;At!==null&&!ke();)Ef(At)}function Ef(n){var a=Yd(n.alternate,n,Wn);n.memoizedProps=n.pendingProps,a===null?fo(n):At=a}function Af(n){var a=n,l=a.alternate;switch(a.tag){case 15:case 0:a=Ud(l,a,a.pendingProps,a.type,void 0,wt);break;case 11:a=Ud(l,a,a.pendingProps,a.type.render,a.ref,wt);break;case 5:Bs(a);default:Kd(l,a),a=At=Au(a,Wn),a=Yd(l,a,Wn)}n.memoizedProps=n.pendingProps,a===null?fo(n):At=a}function ca(n,a,l,u){In=_r=null,Bs(a),ea=null,Va=0;var g=a.return;try{if(im(n,g,a,l,wt)){zt=1,no(n,bn(l,n.current)),At=null;return}}catch(E){if(g!==null)throw At=g,E;zt=1,no(n,bn(l,n.current)),At=null;return}a.flags&32768?(Rt||u===1?n=!0:aa||(wt&536870912)!==0?n=!1:(sr=n=!0,(u===2||u===9||u===3||u===6)&&(u=En.current,u!==null&&u.tag===13&&(u.flags|=16384))),Cf(a,n)):fo(a)}function fo(n){var a=n;do{if((a.flags&32768)!==0){Cf(a,sr);return}n=a.return;var l=sm(a.alternate,a,Wn);if(l!==null){At=l;return}if(a=a.sibling,a!==null){At=a;return}At=a=n}while(a!==null);zt===0&&(zt=5)}function Cf(n,a){do{var l=lm(n.alternate,n);if(l!==null){l.flags&=32767,At=l;return}if(l=n.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!a&&(n=n.sibling,n!==null)){At=n;return}At=n=l}while(n!==null);zt=6,At=null}function wf(n,a,l,u,g,E,V,Z,fe){n.cancelPendingCommit=null;do po();while(Qt!==0);if((Tt&6)!==0)throw Error(o(327));if(a!==null){if(a===n.current)throw Error(o(177));if(E=a.lanes|a.childLanes,E|=gs,Ge(n,l,E,V,Z,fe),n===Nt&&(At=Nt=null,wt=0),oa=a,ur=n,sa=l,Sl=E,El=g,mf=u,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,xm(pe,function(){return Pf(),null})):(n.callbackNode=null,n.callbackPriority=0),u=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||u){u=B.T,B.T=null,g=q.p,q.p=2,V=Tt,Tt|=4;try{cm(n,a,l)}finally{Tt=V,q.p=g,B.T=u}}Qt=1,_f(),Rf(),Tf()}}function _f(){if(Qt===1){Qt=0;var n=ur,a=oa,l=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||l){l=B.T,B.T=null;var u=q.p;q.p=2;var g=Tt;Tt|=4;try{lf(a,n);var E=$l,V=pu(n.containerInfo),Z=E.focusedElem,fe=E.selectionRange;if(V!==Z&&Z&&Z.ownerDocument&&fu(Z.ownerDocument.documentElement,Z)){if(fe!==null&&ds(Z)){var Oe=fe.start,Ue=fe.end;if(Ue===void 0&&(Ue=Oe),"selectionStart"in Z)Z.selectionStart=Oe,Z.selectionEnd=Math.min(Ue,Z.value.length);else{var Ve=Z.ownerDocument||document,Fe=Ve&&Ve.defaultView||window;if(Fe.getSelection){var ze=Fe.getSelection(),vt=Z.textContent.length,mt=Math.min(fe.start,vt),Ot=fe.end===void 0?mt:Math.min(fe.end,vt);!ze.extend&&mt>Ot&&(V=Ot,Ot=mt,mt=V);var we=du(Z,mt),ye=du(Z,Ot);if(we&&ye&&(ze.rangeCount!==1||ze.anchorNode!==we.node||ze.anchorOffset!==we.offset||ze.focusNode!==ye.node||ze.focusOffset!==ye.offset)){var Pe=Ve.createRange();Pe.setStart(we.node,we.offset),ze.removeAllRanges(),mt>Ot?(ze.addRange(Pe),ze.extend(ye.node,ye.offset)):(Pe.setEnd(ye.node,ye.offset),ze.addRange(Pe))}}}}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}}wo=!!Fl,$l=Fl=null}finally{Tt=g,q.p=u,B.T=l}}n.current=a,Qt=2}}function Rf(){if(Qt===2){Qt=0;var n=ur,a=oa,l=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||l){l=B.T,B.T=null;var u=q.p;q.p=2;var g=Tt;Tt|=4;try{rf(n,a.alternate,a)}finally{Tt=g,q.p=u,B.T=l}}Qt=3}}function Tf(){if(Qt===4||Qt===3){Qt=0,ge();var n=ur,a=oa,l=sa,u=mf;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?Qt=5:(Qt=0,oa=ur=null,kf(n,n.pendingLanes));var g=n.pendingLanes;if(g===0&&(cr=null),ie(l),a=a.stateNode,Le&&typeof Le.onCommitFiberRoot=="function")try{Le.onCommitFiberRoot($e,a,void 0,(a.current.flags&128)===128)}catch{}if(u!==null){a=B.T,g=q.p,q.p=2,B.T=null;try{for(var E=n.onRecoverableError,V=0;V<u.length;V++){var Z=u[V];E(Z.value,{componentStack:Z.stack})}}finally{B.T=a,q.p=g}}(sa&3)!==0&&po(),On(n),g=n.pendingLanes,(l&4194090)!==0&&(g&42)!==0?n===Al?Ja++:(Ja=0,Al=n):Ja=0,ei(0)}}function kf(n,a){(n.pooledCacheLanes&=a)===0&&(a=n.pooledCache,a!=null&&(n.pooledCache=null,Oa(a)))}function po(n){return _f(),Rf(),Tf(),Pf()}function Pf(){if(Qt!==5)return!1;var n=ur,a=Sl;Sl=0;var l=ie(sa),u=B.T,g=q.p;try{q.p=32>l?32:l,B.T=null,l=El,El=null;var E=ur,V=sa;if(Qt=0,oa=ur=null,sa=0,(Tt&6)!==0)throw Error(o(331));var Z=Tt;if(Tt|=4,pf(E.current),uf(E,E.current,V,l),Tt=Z,ei(0,!1),Le&&typeof Le.onPostCommitFiberRoot=="function")try{Le.onPostCommitFiberRoot($e,E)}catch{}return!0}finally{q.p=g,B.T=u,kf(n,a)}}function Df(n,a,l){a=bn(l,a),a=tl(n.stateNode,a,2),n=er(n,a,2),n!==null&&(Ne(n,2),On(n))}function jt(n,a,l){if(n.tag===3)Df(n,n,l);else for(;a!==null;){if(a.tag===3){Df(a,n,l);break}else if(a.tag===1){var u=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(cr===null||!cr.has(u))){n=bn(l,n),l=jd(2),u=er(a,l,2),u!==null&&(Ld(l,u,a,n),Ne(u,2),On(u));break}}a=a.return}}function Rl(n,a,l){var u=n.pingCache;if(u===null){u=n.pingCache=new fm;var g=new Set;u.set(a,g)}else g=u.get(a),g===void 0&&(g=new Set,u.set(a,g));g.has(l)||(vl=!0,g.add(l),n=vm.bind(null,n,a,l),a.then(n,n))}function vm(n,a,l){var u=n.pingCache;u!==null&&u.delete(a),n.pingedLanes|=n.suspendedLanes&l,n.warmLanes&=~l,Nt===n&&(wt&l)===l&&(zt===4||zt===3&&(wt&62914560)===wt&&300>oe()-xl?(Tt&2)===0&&la(n,0):bl|=l,ia===wt&&(ia=0)),On(n)}function Mf(n,a){a===0&&(a=ht()),n=Vr(n,a),n!==null&&(Ne(n,a),On(n))}function bm(n){var a=n.memoizedState,l=0;a!==null&&(l=a.retryLane),Mf(n,l)}function ym(n,a){var l=0;switch(n.tag){case 13:var u=n.stateNode,g=n.memoizedState;g!==null&&(l=g.retryLane);break;case 19:u=n.stateNode;break;case 22:u=n.stateNode._retryCache;break;default:throw Error(o(314))}u!==null&&u.delete(a),Mf(n,l)}function xm(n,a){return Me(n,a)}var ho=null,ua=null,Tl=!1,mo=!1,kl=!1,Or=0;function On(n){n!==ua&&n.next===null&&(ua===null?ho=ua=n:ua=ua.next=n),mo=!0,Tl||(Tl=!0,Em())}function ei(n,a){if(!kl&&mo){kl=!0;do for(var l=!1,u=ho;u!==null;){if(n!==0){var g=u.pendingLanes;if(g===0)var E=0;else{var V=u.suspendedLanes,Z=u.pingedLanes;E=(1<<31-qe(42|n)+1)-1,E&=g&~(V&~Z),E=E&201326741?E&201326741|1:E?E|2:0}E!==0&&(l=!0,Nf(u,E))}else E=wt,E=be(u,u===Nt?E:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(E&3)===0||xe(u,E)||(l=!0,Nf(u,E));u=u.next}while(l);kl=!1}}function Sm(){Of()}function Of(){mo=Tl=!1;var n=0;Or!==0&&(Pm()&&(n=Or),Or=0);for(var a=oe(),l=null,u=ho;u!==null;){var g=u.next,E=jf(u,a);E===0?(u.next=null,l===null?ho=g:l.next=g,g===null&&(ua=l)):(l=u,(n!==0||(E&3)!==0)&&(mo=!0)),u=g}ei(n)}function jf(n,a){for(var l=n.suspendedLanes,u=n.pingedLanes,g=n.expirationTimes,E=n.pendingLanes&-62914561;0<E;){var V=31-qe(E),Z=1<<V,fe=g[V];fe===-1?((Z&l)===0||(Z&u)!==0)&&(g[V]=Qe(Z,a)):fe<=a&&(n.expiredLanes|=Z),E&=~Z}if(a=Nt,l=wt,l=be(n,n===a?l:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),u=n.callbackNode,l===0||n===a&&(kt===2||kt===9)||n.cancelPendingCommit!==null)return u!==null&&u!==null&&je(u),n.callbackNode=null,n.callbackPriority=0;if((l&3)===0||xe(n,l)){if(a=l&-l,a===n.callbackPriority)return a;switch(u!==null&&je(u),ie(l)){case 2:case 8:l=de;break;case 32:l=pe;break;case 268435456:l=Te;break;default:l=pe}return u=Lf.bind(null,n),l=Me(l,u),n.callbackPriority=a,n.callbackNode=l,a}return u!==null&&u!==null&&je(u),n.callbackPriority=2,n.callbackNode=null,2}function Lf(n,a){if(Qt!==0&&Qt!==5)return n.callbackNode=null,n.callbackPriority=0,null;var l=n.callbackNode;if(po()&&n.callbackNode!==l)return null;var u=wt;return u=be(n,n===Nt?u:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),u===0?null:(vf(n,u,a),jf(n,oe()),n.callbackNode!=null&&n.callbackNode===l?Lf.bind(null,n):null)}function Nf(n,a){if(po())return null;vf(n,a,!0)}function Em(){Mm(function(){(Tt&6)!==0?Me(ee,Sm):Of()})}function Pl(){return Or===0&&(Or=pt()),Or}function Ff(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:wi(""+n)}function $f(n,a){var l=a.ownerDocument.createElement("input");return l.name=a.name,l.value=a.value,n.id&&l.setAttribute("form",n.id),a.parentNode.insertBefore(l,a),n=new FormData(n),l.parentNode.removeChild(l),n}function Am(n,a,l,u,g){if(a==="submit"&&l&&l.stateNode===g){var E=Ff((g[Ie]||null).action),V=u.submitter;V&&(a=(a=V[Ie]||null)?Ff(a.formAction):V.getAttribute("formAction"),a!==null&&(E=a,V=null));var Z=new ki("action","action",null,u,g);n.push({event:Z,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(Or!==0){var fe=V?$f(g,V):new FormData(g);Ks(l,{pending:!0,data:fe,method:g.method,action:E},null,fe)}}else typeof E=="function"&&(Z.preventDefault(),fe=V?$f(g,V):new FormData(g),Ks(l,{pending:!0,data:fe,method:g.method,action:E},E,fe))},currentTarget:g}]})}}for(var Dl=0;Dl<ms.length;Dl++){var Ml=ms[Dl],Cm=Ml.toLowerCase(),wm=Ml[0].toUpperCase()+Ml.slice(1);_n(Cm,"on"+wm)}_n(gu,"onAnimationEnd"),_n(vu,"onAnimationIteration"),_n(bu,"onAnimationStart"),_n("dblclick","onDoubleClick"),_n("focusin","onFocus"),_n("focusout","onBlur"),_n(Bh,"onTransitionRun"),_n(Uh,"onTransitionStart"),_n(Hh,"onTransitionCancel"),_n(yu,"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 ti="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(" "),_m=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ti));function If(n,a){a=(a&4)!==0;for(var l=0;l<n.length;l++){var u=n[l],g=u.event;u=u.listeners;e:{var E=void 0;if(a)for(var V=u.length-1;0<=V;V--){var Z=u[V],fe=Z.instance,Oe=Z.currentTarget;if(Z=Z.listener,fe!==E&&g.isPropagationStopped())break e;E=Z,g.currentTarget=Oe;try{E(g)}catch(Ue){to(Ue)}g.currentTarget=null,E=fe}else for(V=0;V<u.length;V++){if(Z=u[V],fe=Z.instance,Oe=Z.currentTarget,Z=Z.listener,fe!==E&&g.isPropagationStopped())break e;E=Z,g.currentTarget=Oe;try{E(g)}catch(Ue){to(Ue)}g.currentTarget=null,E=fe}}}}function Ct(n,a){var l=a[et];l===void 0&&(l=a[et]=new Set);var u=n+"__bubble";l.has(u)||(zf(a,n,2,!1),l.add(u))}function Ol(n,a,l){var u=0;a&&(u|=4),zf(l,n,u,a)}var go="_reactListening"+Math.random().toString(36).slice(2);function jl(n){if(!n[go]){n[go]=!0,Lt.forEach(function(l){l!=="selectionchange"&&(_m.has(l)||Ol(l,!1,n),Ol(l,!0,n))});var a=n.nodeType===9?n:n.ownerDocument;a===null||a[go]||(a[go]=!0,Ol("selectionchange",!1,a))}}function zf(n,a,l,u){switch(up(a)){case 2:var g=Jm;break;case 8:g=eg;break;default:g=Yl}l=g.bind(null,a,l,n),g=void 0,!ns||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(g=!0),u?g!==void 0?n.addEventListener(a,l,{capture:!0,passive:g}):n.addEventListener(a,l,!0):g!==void 0?n.addEventListener(a,l,{passive:g}):n.addEventListener(a,l,!1)}function Ll(n,a,l,u,g){var E=u;if((a&1)===0&&(a&2)===0&&u!==null)e:for(;;){if(u===null)return;var V=u.tag;if(V===3||V===4){var Z=u.stateNode.containerInfo;if(Z===g)break;if(V===4)for(V=u.return;V!==null;){var fe=V.tag;if((fe===3||fe===4)&&V.stateNode.containerInfo===g)return;V=V.return}for(;Z!==null;){if(V=ot(Z),V===null)return;if(fe=V.tag,fe===5||fe===6||fe===26||fe===27){u=E=V;continue e}Z=Z.parentNode}}u=u.return}Gc(function(){var Oe=E,Ue=Jo(l),Ve=[];e:{var Fe=xu.get(n);if(Fe!==void 0){var ze=ki,vt=n;switch(n){case"keypress":if(Ri(l)===0)break e;case"keydown":case"keyup":ze=yh;break;case"focusin":vt="focus",ze=os;break;case"focusout":vt="blur",ze=os;break;case"beforeblur":case"afterblur":ze=os;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ze=Xc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ze=sh;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ze=Eh;break;case gu:case vu:case bu:ze=uh;break;case yu:ze=Ch;break;case"scroll":case"scrollend":ze=ih;break;case"wheel":ze=_h;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=(a&4)!==0,Ot=!mt&&(n==="scroll"||n==="scrollend"),we=mt?Fe!==null?Fe+"Capture":null:Fe;mt=[];for(var ye=Oe,Pe;ye!==null;){var He=ye;if(Pe=He.stateNode,He=He.tag,He!==5&&He!==26&&He!==27||Pe===null||we===null||(He=xa(ye,we),He!=null&&mt.push(ni(ye,He,Pe))),Ot)break;ye=ye.return}0<mt.length&&(Fe=new ze(Fe,vt,null,l,Ue),Ve.push({event:Fe,listeners:mt}))}}if((a&7)===0){e:{if(Fe=n==="mouseover"||n==="pointerover",ze=n==="mouseout"||n==="pointerout",Fe&&l!==Zo&&(vt=l.relatedTarget||l.fromElement)&&(ot(vt)||vt[Be]))break e;if((ze||Fe)&&(Fe=Ue.window===Ue?Ue:(Fe=Ue.ownerDocument)?Fe.defaultView||Fe.parentWindow:window,ze?(vt=l.relatedTarget||l.toElement,ze=Oe,vt=vt?ot(vt):null,vt!==null&&(Ot=c(vt),mt=vt.tag,vt!==Ot||mt!==5&&mt!==27&&mt!==6)&&(vt=null)):(ze=null,vt=Oe),ze!==vt)){if(mt=Xc,He="onMouseLeave",we="onMouseEnter",ye="mouse",(n==="pointerout"||n==="pointerover")&&(mt=Qc,He="onPointerLeave",we="onPointerEnter",ye="pointer"),Ot=ze==null?Fe:bt(ze),Pe=vt==null?Fe:bt(vt),Fe=new mt(He,ye+"leave",ze,l,Ue),Fe.target=Ot,Fe.relatedTarget=Pe,He=null,ot(Ue)===Oe&&(mt=new mt(we,ye+"enter",vt,l,Ue),mt.target=Pe,mt.relatedTarget=Ot,He=mt),Ot=He,ze&&vt)t:{for(mt=ze,we=vt,ye=0,Pe=mt;Pe;Pe=da(Pe))ye++;for(Pe=0,He=we;He;He=da(He))Pe++;for(;0<ye-Pe;)mt=da(mt),ye--;for(;0<Pe-ye;)we=da(we),Pe--;for(;ye--;){if(mt===we||we!==null&&mt===we.alternate)break t;mt=da(mt),we=da(we)}mt=null}else mt=null;ze!==null&&Bf(Ve,Fe,ze,mt,!1),vt!==null&&Ot!==null&&Bf(Ve,Ot,vt,mt,!0)}}e:{if(Fe=Oe?bt(Oe):window,ze=Fe.nodeName&&Fe.nodeName.toLowerCase(),ze==="select"||ze==="input"&&Fe.type==="file")var lt=iu;else if(ru(Fe))if(ou)lt=$h;else{lt=Nh;var St=Lh}else ze=Fe.nodeName,!ze||ze.toLowerCase()!=="input"||Fe.type!=="checkbox"&&Fe.type!=="radio"?Oe&&Qo(Oe.elementType)&&(lt=iu):lt=Fh;if(lt&&(lt=lt(n,Oe))){au(Ve,lt,l,Ue);break e}St&&St(n,Fe,Oe),n==="focusout"&&Oe&&Fe.type==="number"&&Oe.memoizedProps.value!=null&&Ko(Fe,"number",Fe.value)}switch(St=Oe?bt(Oe):window,n){case"focusin":(ru(St)||St.contentEditable==="true")&&(Br=St,fs=Oe,Ta=null);break;case"focusout":Ta=fs=Br=null;break;case"mousedown":ps=!0;break;case"contextmenu":case"mouseup":case"dragend":ps=!1,hu(Ve,l,Ue);break;case"selectionchange":if(zh)break;case"keydown":case"keyup":hu(Ve,l,Ue)}var dt;if(ls)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,l)&&(gt="onCompositionEnd"):n==="keydown"&&l.keyCode===229&&(gt="onCompositionStart");gt&&(Zc&&l.locale!=="ko"&&(zr||gt!=="onCompositionStart"?gt==="onCompositionEnd"&&zr&&(dt=Wc()):(Kn=Ue,rs="value"in Kn?Kn.value:Kn.textContent,zr=!0)),St=vo(Oe,gt),0<St.length&&(gt=new Kc(gt,n,null,l,Ue),Ve.push({event:gt,listeners:St}),dt?gt.data=dt:(dt=nu(l),dt!==null&&(gt.data=dt)))),(dt=Ph?Dh(n,l):Mh(n,l))&&(gt=vo(Oe,"onBeforeInput"),0<gt.length&&(St=new Kc("onBeforeInput","beforeinput",null,l,Ue),Ve.push({event:St,listeners:gt}),St.data=dt)),Am(Ve,n,Oe,l,Ue)}If(Ve,a)})}function ni(n,a,l){return{instance:n,listener:a,currentTarget:l}}function vo(n,a){for(var l=a+"Capture",u=[];n!==null;){var g=n,E=g.stateNode;if(g=g.tag,g!==5&&g!==26&&g!==27||E===null||(g=xa(n,l),g!=null&&u.unshift(ni(n,g,E)),g=xa(n,a),g!=null&&u.push(ni(n,g,E))),n.tag===3)return u;n=n.return}return[]}function da(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function Bf(n,a,l,u,g){for(var E=a._reactName,V=[];l!==null&&l!==u;){var Z=l,fe=Z.alternate,Oe=Z.stateNode;if(Z=Z.tag,fe!==null&&fe===u)break;Z!==5&&Z!==26&&Z!==27||Oe===null||(fe=Oe,g?(Oe=xa(l,E),Oe!=null&&V.unshift(ni(l,Oe,fe))):g||(Oe=xa(l,E),Oe!=null&&V.push(ni(l,Oe,fe)))),l=l.return}V.length!==0&&n.push({event:a,listeners:V})}var Rm=/\r\n?/g,Tm=/\u0000|\uFFFD/g;function Uf(n){return(typeof n=="string"?n:""+n).replace(Rm,`
|
||
`).replace(Tm,"")}function Hf(n,a){return a=Uf(a),Uf(n)===a}function bo(){}function Mt(n,a,l,u,g,E){switch(l){case"children":typeof u=="string"?a==="body"||a==="textarea"&&u===""||Fr(n,u):(typeof u=="number"||typeof u=="bigint")&&a!=="body"&&Fr(n,""+u);break;case"className":Ei(n,"class",u);break;case"tabIndex":Ei(n,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":Ei(n,l,u);break;case"style":Vc(n,u,E);break;case"data":if(a!=="object"){Ei(n,"data",u);break}case"src":case"href":if(u===""&&(a!=="a"||l!=="href")){n.removeAttribute(l);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){n.removeAttribute(l);break}u=wi(""+u),n.setAttribute(l,u);break;case"action":case"formAction":if(typeof u=="function"){n.setAttribute(l,"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 E=="function"&&(l==="formAction"?(a!=="input"&&Mt(n,a,"name",g.name,g,null),Mt(n,a,"formEncType",g.formEncType,g,null),Mt(n,a,"formMethod",g.formMethod,g,null),Mt(n,a,"formTarget",g.formTarget,g,null)):(Mt(n,a,"encType",g.encType,g,null),Mt(n,a,"method",g.method,g,null),Mt(n,a,"target",g.target,g,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){n.removeAttribute(l);break}u=wi(""+u),n.setAttribute(l,u);break;case"onClick":u!=null&&(n.onclick=bo);break;case"onScroll":u!=null&&Ct("scroll",n);break;case"onScrollEnd":u!=null&&Ct("scrollend",n);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(o(61));if(l=u.__html,l!=null){if(g.children!=null)throw Error(o(60));n.innerHTML=l}}break;case"multiple":n.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":n.muted=u&&typeof u!="function"&&typeof u!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(u==null||typeof u=="function"||typeof u=="boolean"||typeof u=="symbol"){n.removeAttribute("xlink:href");break}l=wi(""+u),n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":u!=null&&typeof u!="function"&&typeof u!="symbol"?n.setAttribute(l,""+u):n.removeAttribute(l);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":u&&typeof u!="function"&&typeof u!="symbol"?n.setAttribute(l,""):n.removeAttribute(l);break;case"capture":case"download":u===!0?n.setAttribute(l,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?n.setAttribute(l,u):n.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?n.setAttribute(l,u):n.removeAttribute(l);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?n.removeAttribute(l):n.setAttribute(l,u);break;case"popover":Ct("beforetoggle",n),Ct("toggle",n),Si(n,"popover",u);break;case"xlinkActuate":jn(n,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":jn(n,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":jn(n,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":jn(n,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":jn(n,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":jn(n,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":jn(n,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":jn(n,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":jn(n,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":Si(n,"is",u);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=rh.get(l)||l,Si(n,l,u))}}function Nl(n,a,l,u,g,E){switch(l){case"style":Vc(n,u,E);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(o(61));if(l=u.__html,l!=null){if(g.children!=null)throw Error(o(60));n.innerHTML=l}}break;case"children":typeof u=="string"?Fr(n,u):(typeof u=="number"||typeof u=="bigint")&&Fr(n,""+u);break;case"onScroll":u!=null&&Ct("scroll",n);break;case"onScrollEnd":u!=null&&Ct("scrollend",n);break;case"onClick":u!=null&&(n.onclick=bo);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!mn.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(g=l.endsWith("Capture"),a=l.slice(2,g?l.length-7:void 0),E=n[Ie]||null,E=E!=null?E[l]:null,typeof E=="function"&&n.removeEventListener(a,E,g),typeof u=="function")){typeof E!="function"&&E!==null&&(l in n?n[l]=null:n.hasAttribute(l)&&n.removeAttribute(l)),n.addEventListener(a,u,g);break e}l in n?n[l]=u:u===!0?n.setAttribute(l,""):Si(n,l,u)}}}function Zt(n,a,l){switch(a){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 u=!1,g=!1,E;for(E in l)if(l.hasOwnProperty(E)){var V=l[E];if(V!=null)switch(E){case"src":u=!0;break;case"srcSet":g=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,a));default:Mt(n,a,E,V,l,null)}}g&&Mt(n,a,"srcSet",l.srcSet,l,null),u&&Mt(n,a,"src",l.src,l,null);return;case"input":Ct("invalid",n);var Z=E=V=g=null,fe=null,Oe=null;for(u in l)if(l.hasOwnProperty(u)){var Ue=l[u];if(Ue!=null)switch(u){case"name":g=Ue;break;case"type":V=Ue;break;case"checked":fe=Ue;break;case"defaultChecked":Oe=Ue;break;case"value":E=Ue;break;case"defaultValue":Z=Ue;break;case"children":case"dangerouslySetInnerHTML":if(Ue!=null)throw Error(o(137,a));break;default:Mt(n,a,u,Ue,l,null)}}zc(n,E,Z,fe,Oe,V,g,!1),Ai(n);return;case"select":Ct("invalid",n),u=V=E=null;for(g in l)if(l.hasOwnProperty(g)&&(Z=l[g],Z!=null))switch(g){case"value":E=Z;break;case"defaultValue":V=Z;break;case"multiple":u=Z;default:Mt(n,a,g,Z,l,null)}a=E,l=V,n.multiple=!!u,a!=null?Nr(n,!!u,a,!1):l!=null&&Nr(n,!!u,l,!0);return;case"textarea":Ct("invalid",n),E=g=u=null;for(V in l)if(l.hasOwnProperty(V)&&(Z=l[V],Z!=null))switch(V){case"value":u=Z;break;case"defaultValue":g=Z;break;case"children":E=Z;break;case"dangerouslySetInnerHTML":if(Z!=null)throw Error(o(91));break;default:Mt(n,a,V,Z,l,null)}Uc(n,u,g,E),Ai(n);return;case"option":for(fe in l)if(l.hasOwnProperty(fe)&&(u=l[fe],u!=null))switch(fe){case"selected":n.selected=u&&typeof u!="function"&&typeof u!="symbol";break;default:Mt(n,a,fe,u,l,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(u=0;u<ti.length;u++)Ct(ti[u],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(Oe in l)if(l.hasOwnProperty(Oe)&&(u=l[Oe],u!=null))switch(Oe){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,a));default:Mt(n,a,Oe,u,l,null)}return;default:if(Qo(a)){for(Ue in l)l.hasOwnProperty(Ue)&&(u=l[Ue],u!==void 0&&Nl(n,a,Ue,u,l,void 0));return}}for(Z in l)l.hasOwnProperty(Z)&&(u=l[Z],u!=null&&Mt(n,a,Z,u,l,null))}function km(n,a,l,u){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var g=null,E=null,V=null,Z=null,fe=null,Oe=null,Ue=null;for(ze in l){var Ve=l[ze];if(l.hasOwnProperty(ze)&&Ve!=null)switch(ze){case"checked":break;case"value":break;case"defaultValue":fe=Ve;default:u.hasOwnProperty(ze)||Mt(n,a,ze,null,u,Ve)}}for(var Fe in u){var ze=u[Fe];if(Ve=l[Fe],u.hasOwnProperty(Fe)&&(ze!=null||Ve!=null))switch(Fe){case"type":E=ze;break;case"name":g=ze;break;case"checked":Oe=ze;break;case"defaultChecked":Ue=ze;break;case"value":V=ze;break;case"defaultValue":Z=ze;break;case"children":case"dangerouslySetInnerHTML":if(ze!=null)throw Error(o(137,a));break;default:ze!==Ve&&Mt(n,a,Fe,ze,u,Ve)}}Xo(n,V,Z,fe,Oe,Ue,E,g);return;case"select":ze=V=Z=Fe=null;for(E in l)if(fe=l[E],l.hasOwnProperty(E)&&fe!=null)switch(E){case"value":break;case"multiple":ze=fe;default:u.hasOwnProperty(E)||Mt(n,a,E,null,u,fe)}for(g in u)if(E=u[g],fe=l[g],u.hasOwnProperty(g)&&(E!=null||fe!=null))switch(g){case"value":Fe=E;break;case"defaultValue":Z=E;break;case"multiple":V=E;default:E!==fe&&Mt(n,a,g,E,u,fe)}a=Z,l=V,u=ze,Fe!=null?Nr(n,!!l,Fe,!1):!!u!=!!l&&(a!=null?Nr(n,!!l,a,!0):Nr(n,!!l,l?[]:"",!1));return;case"textarea":ze=Fe=null;for(Z in l)if(g=l[Z],l.hasOwnProperty(Z)&&g!=null&&!u.hasOwnProperty(Z))switch(Z){case"value":break;case"children":break;default:Mt(n,a,Z,null,u,g)}for(V in u)if(g=u[V],E=l[V],u.hasOwnProperty(V)&&(g!=null||E!=null))switch(V){case"value":Fe=g;break;case"defaultValue":ze=g;break;case"children":break;case"dangerouslySetInnerHTML":if(g!=null)throw Error(o(91));break;default:g!==E&&Mt(n,a,V,g,u,E)}Bc(n,Fe,ze);return;case"option":for(var vt in l)if(Fe=l[vt],l.hasOwnProperty(vt)&&Fe!=null&&!u.hasOwnProperty(vt))switch(vt){case"selected":n.selected=!1;break;default:Mt(n,a,vt,null,u,Fe)}for(fe in u)if(Fe=u[fe],ze=l[fe],u.hasOwnProperty(fe)&&Fe!==ze&&(Fe!=null||ze!=null))switch(fe){case"selected":n.selected=Fe&&typeof Fe!="function"&&typeof Fe!="symbol";break;default:Mt(n,a,fe,Fe,u,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 l)Fe=l[mt],l.hasOwnProperty(mt)&&Fe!=null&&!u.hasOwnProperty(mt)&&Mt(n,a,mt,null,u,Fe);for(Oe in u)if(Fe=u[Oe],ze=l[Oe],u.hasOwnProperty(Oe)&&Fe!==ze&&(Fe!=null||ze!=null))switch(Oe){case"children":case"dangerouslySetInnerHTML":if(Fe!=null)throw Error(o(137,a));break;default:Mt(n,a,Oe,Fe,u,ze)}return;default:if(Qo(a)){for(var Ot in l)Fe=l[Ot],l.hasOwnProperty(Ot)&&Fe!==void 0&&!u.hasOwnProperty(Ot)&&Nl(n,a,Ot,void 0,u,Fe);for(Ue in u)Fe=u[Ue],ze=l[Ue],!u.hasOwnProperty(Ue)||Fe===ze||Fe===void 0&&ze===void 0||Nl(n,a,Ue,Fe,u,ze);return}}for(var we in l)Fe=l[we],l.hasOwnProperty(we)&&Fe!=null&&!u.hasOwnProperty(we)&&Mt(n,a,we,null,u,Fe);for(Ve in u)Fe=u[Ve],ze=l[Ve],!u.hasOwnProperty(Ve)||Fe===ze||Fe==null&&ze==null||Mt(n,a,Ve,Fe,u,ze)}var Fl=null,$l=null;function yo(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,a){if(n===0)switch(a){case"svg":return 1;case"math":return 2;default:return 0}return n===1&&a==="foreignObject"?0:n}function Il(n,a){return n==="textarea"||n==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.children=="bigint"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var zl=null;function Pm(){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,Dm=typeof clearTimeout=="function"?clearTimeout:void 0,Wf=typeof Promise=="function"?Promise:void 0,Mm=typeof queueMicrotask=="function"?queueMicrotask:typeof Wf<"u"?function(n){return Wf.resolve(null).then(n).catch(Om)}:Gf;function Om(n){setTimeout(function(){throw n})}function fr(n){return n==="head"}function Yf(n,a){var l=a,u=0,g=0;do{var E=l.nextSibling;if(n.removeChild(l),E&&E.nodeType===8)if(l=E.data,l==="/$"){if(0<u&&8>u){l=u;var V=n.ownerDocument;if(l&1&&ri(V.documentElement),l&2&&ri(V.body),l&4)for(l=V.head,ri(l),V=l.firstChild;V;){var Z=V.nextSibling,fe=V.nodeName;V[Ze]||fe==="SCRIPT"||fe==="STYLE"||fe==="LINK"&&V.rel.toLowerCase()==="stylesheet"||l.removeChild(V),V=Z}}if(g===0){n.removeChild(E),di(a);return}g--}else l==="$"||l==="$?"||l==="$!"?g++:u=l.charCodeAt(0)-48;else u=0;l=E}while(l);di(a)}function Bl(n){var a=n.firstChild;for(a&&a.nodeType===10&&(a=a.nextSibling);a;){var l=a;switch(a=a.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":Bl(l),rt(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}n.removeChild(l)}}function jm(n,a,l,u){for(;n.nodeType===1;){var g=l;if(n.nodeName.toLowerCase()!==a.toLowerCase()){if(!u&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(u){if(!n[Ze])switch(a){case"meta":if(!n.hasAttribute("itemprop"))break;return n;case"link":if(E=n.getAttribute("rel"),E==="stylesheet"&&n.hasAttribute("data-precedence"))break;if(E!==g.rel||n.getAttribute("href")!==(g.href==null||g.href===""?null:g.href)||n.getAttribute("crossorigin")!==(g.crossOrigin==null?null:g.crossOrigin)||n.getAttribute("title")!==(g.title==null?null:g.title))break;return n;case"style":if(n.hasAttribute("data-precedence"))break;return n;case"script":if(E=n.getAttribute("src"),(E!==(g.src==null?null:g.src)||n.getAttribute("type")!==(g.type==null?null:g.type)||n.getAttribute("crossorigin")!==(g.crossOrigin==null?null:g.crossOrigin))&&E&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}}else if(a==="input"&&n.type==="hidden"){var E=g.name==null?null:""+g.name;if(g.type==="hidden"&&n.getAttribute("name")===E)return n}else return n;if(n=Tn(n.nextSibling),n===null)break}return null}function Lm(n,a,l){if(a==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!l||(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,a){var l=n.ownerDocument;if(n.data!=="$?"||l.readyState==="complete")a();else{var u=function(){a(),l.removeEventListener("DOMContentLoaded",u)};l.addEventListener("DOMContentLoaded",u),n._reactRetry=u}}function Tn(n){for(;n!=null;n=n.nextSibling){var a=n.nodeType;if(a===1||a===3)break;if(a===8){if(a=n.data,a==="$"||a==="$!"||a==="$?"||a==="F!"||a==="F")break;if(a==="/$")return null}}return n}var Hl=null;function Xf(n){n=n.previousSibling;for(var a=0;n;){if(n.nodeType===8){var l=n.data;if(l==="$"||l==="$!"||l==="$?"){if(a===0)return n;a--}else l==="/$"&&a++}n=n.previousSibling}return null}function Kf(n,a,l){switch(a=yo(l),n){case"html":if(n=a.documentElement,!n)throw Error(o(452));return n;case"head":if(n=a.head,!n)throw Error(o(453));return n;case"body":if(n=a.body,!n)throw Error(o(454));return n;default:throw Error(o(451))}}function ri(n){for(var a=n.attributes;a.length;)n.removeAttributeNode(a[0]);rt(n)}var Cn=new Map,Qf=new Set;function xo(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}var Yn=q.d;q.d={f:Fm,r:$m,D:Im,C:zm,L:Bm,m:Um,X:Vm,S:Hm,M:qm};function Fm(){var n=Yn.f(),a=uo();return n||a}function $m(n){var a=ft(n);a!==null&&a.tag===5&&a.type==="form"?gd(a):Yn.r(n)}var fa=typeof document>"u"?null:document;function Zf(n,a,l){var u=fa;if(u&&typeof a=="string"&&a){var g=vn(a);g='link[rel="'+n+'"][href="'+g+'"]',typeof l=="string"&&(g+='[crossorigin="'+l+'"]'),Qf.has(g)||(Qf.add(g),n={rel:n,crossOrigin:l,href:a},u.querySelector(g)===null&&(a=u.createElement("link"),Zt(a,"link",n),Et(a),u.head.appendChild(a)))}}function Im(n){Yn.D(n),Zf("dns-prefetch",n,null)}function zm(n,a){Yn.C(n,a),Zf("preconnect",n,a)}function Bm(n,a,l){Yn.L(n,a,l);var u=fa;if(u&&n&&a){var g='link[rel="preload"][as="'+vn(a)+'"]';a==="image"&&l&&l.imageSrcSet?(g+='[imagesrcset="'+vn(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(g+='[imagesizes="'+vn(l.imageSizes)+'"]')):g+='[href="'+vn(n)+'"]';var E=g;switch(a){case"style":E=pa(n);break;case"script":E=ha(n)}Cn.has(E)||(n=h({rel:"preload",href:a==="image"&&l&&l.imageSrcSet?void 0:n,as:a},l),Cn.set(E,n),u.querySelector(g)!==null||a==="style"&&u.querySelector(ai(E))||a==="script"&&u.querySelector(ii(E))||(a=u.createElement("link"),Zt(a,"link",n),Et(a),u.head.appendChild(a)))}}function Um(n,a){Yn.m(n,a);var l=fa;if(l&&n){var u=a&&typeof a.as=="string"?a.as:"script",g='link[rel="modulepreload"][as="'+vn(u)+'"][href="'+vn(n)+'"]',E=g;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":E=ha(n)}if(!Cn.has(E)&&(n=h({rel:"modulepreload",href:n},a),Cn.set(E,n),l.querySelector(g)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(ii(E)))return}u=l.createElement("link"),Zt(u,"link",n),Et(u),l.head.appendChild(u)}}}function Hm(n,a,l){Yn.S(n,a,l);var u=fa;if(u&&n){var g=xt(u).hoistableStyles,E=pa(n);a=a||"default";var V=g.get(E);if(!V){var Z={loading:0,preload:null};if(V=u.querySelector(ai(E)))Z.loading=5;else{n=h({rel:"stylesheet",href:n,"data-precedence":a},l),(l=Cn.get(E))&&Vl(n,l);var fe=V=u.createElement("link");Et(fe),Zt(fe,"link",n),fe._p=new Promise(function(Oe,Ue){fe.onload=Oe,fe.onerror=Ue}),fe.addEventListener("load",function(){Z.loading|=1}),fe.addEventListener("error",function(){Z.loading|=2}),Z.loading|=4,So(V,a,u)}V={type:"stylesheet",instance:V,count:1,state:Z},g.set(E,V)}}}function Vm(n,a){Yn.X(n,a);var l=fa;if(l&&n){var u=xt(l).hoistableScripts,g=ha(n),E=u.get(g);E||(E=l.querySelector(ii(g)),E||(n=h({src:n,async:!0},a),(a=Cn.get(g))&&ql(n,a),E=l.createElement("script"),Et(E),Zt(E,"link",n),l.head.appendChild(E)),E={type:"script",instance:E,count:1,state:null},u.set(g,E))}}function qm(n,a){Yn.M(n,a);var l=fa;if(l&&n){var u=xt(l).hoistableScripts,g=ha(n),E=u.get(g);E||(E=l.querySelector(ii(g)),E||(n=h({src:n,async:!0,type:"module"},a),(a=Cn.get(g))&&ql(n,a),E=l.createElement("script"),Et(E),Zt(E,"link",n),l.head.appendChild(E)),E={type:"script",instance:E,count:1,state:null},u.set(g,E))}}function Jf(n,a,l,u){var g=(g=X.current)?xo(g):null;if(!g)throw Error(o(446));switch(n){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(a=pa(l.href),l=xt(g).hoistableStyles,u=l.get(a),u||(u={type:"style",instance:null,count:0,state:null},l.set(a,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){n=pa(l.href);var E=xt(g).hoistableStyles,V=E.get(n);if(V||(g=g.ownerDocument||g,V={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},E.set(n,V),(E=g.querySelector(ai(n)))&&!E._p&&(V.instance=E,V.state.loading=5),Cn.has(n)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},Cn.set(n,l),E||Gm(g,n,l,V.state))),a&&u===null)throw Error(o(528,""));return V}if(a&&u!==null)throw Error(o(529,""));return null;case"script":return a=l.async,l=l.src,typeof l=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=ha(l),l=xt(g).hoistableScripts,u=l.get(a),u||(u={type:"script",instance:null,count:0,state:null},l.set(a,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,n))}}function pa(n){return'href="'+vn(n)+'"'}function ai(n){return'link[rel="stylesheet"]['+n+"]"}function ep(n){return h({},n,{"data-precedence":n.precedence,precedence:null})}function Gm(n,a,l,u){n.querySelector('link[rel="preload"][as="style"]['+a+"]")?u.loading=1:(a=n.createElement("link"),u.preload=a,a.addEventListener("load",function(){return u.loading|=1}),a.addEventListener("error",function(){return u.loading|=2}),Zt(a,"link",l),Et(a),n.head.appendChild(a))}function ha(n){return'[src="'+vn(n)+'"]'}function ii(n){return"script[async]"+n}function tp(n,a,l){if(a.count++,a.instance===null)switch(a.type){case"style":var u=n.querySelector('style[data-href~="'+vn(l.href)+'"]');if(u)return a.instance=u,Et(u),u;var g=h({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return u=(n.ownerDocument||n).createElement("style"),Et(u),Zt(u,"style",g),So(u,l.precedence,n),a.instance=u;case"stylesheet":g=pa(l.href);var E=n.querySelector(ai(g));if(E)return a.state.loading|=4,a.instance=E,Et(E),E;u=ep(l),(g=Cn.get(g))&&Vl(u,g),E=(n.ownerDocument||n).createElement("link"),Et(E);var V=E;return V._p=new Promise(function(Z,fe){V.onload=Z,V.onerror=fe}),Zt(E,"link",u),a.state.loading|=4,So(E,l.precedence,n),a.instance=E;case"script":return E=ha(l.src),(g=n.querySelector(ii(E)))?(a.instance=g,Et(g),g):(u=l,(g=Cn.get(E))&&(u=h({},l),ql(u,g)),n=n.ownerDocument||n,g=n.createElement("script"),Et(g),Zt(g,"link",u),n.head.appendChild(g),a.instance=g);case"void":return null;default:throw Error(o(443,a.type))}else a.type==="stylesheet"&&(a.state.loading&4)===0&&(u=a.instance,a.state.loading|=4,So(u,l.precedence,n));return a.instance}function So(n,a,l){for(var u=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),g=u.length?u[u.length-1]:null,E=g,V=0;V<u.length;V++){var Z=u[V];if(Z.dataset.precedence===a)E=Z;else if(E!==g)break}E?E.parentNode.insertBefore(n,E.nextSibling):(a=l.nodeType===9?l.head:l,a.insertBefore(n,a.firstChild))}function Vl(n,a){n.crossOrigin==null&&(n.crossOrigin=a.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=a.referrerPolicy),n.title==null&&(n.title=a.title)}function ql(n,a){n.crossOrigin==null&&(n.crossOrigin=a.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=a.referrerPolicy),n.integrity==null&&(n.integrity=a.integrity)}var Eo=null;function np(n,a,l){if(Eo===null){var u=new Map,g=Eo=new Map;g.set(l,u)}else g=Eo,u=g.get(l),u||(u=new Map,g.set(l,u));if(u.has(n))return u;for(u.set(n,null),l=l.getElementsByTagName(n),g=0;g<l.length;g++){var E=l[g];if(!(E[Ze]||E[Re]||n==="link"&&E.getAttribute("rel")==="stylesheet")&&E.namespaceURI!=="http://www.w3.org/2000/svg"){var V=E.getAttribute(a)||"";V=n+V;var Z=u.get(V);Z?Z.push(E):u.set(V,[E])}}return u}function rp(n,a,l){n=n.ownerDocument||n,n.head.insertBefore(l,a==="title"?n.querySelector("head > title"):null)}function Wm(n,a,l){if(l===1||a.itemProp!=null)return!1;switch(n){case"meta":case"title":return!0;case"style":if(typeof a.precedence!="string"||typeof a.href!="string"||a.href==="")break;return!0;case"link":if(typeof a.rel!="string"||typeof a.href!="string"||a.href===""||a.onLoad||a.onError)break;switch(a.rel){case"stylesheet":return n=a.disabled,typeof a.precedence=="string"&&n==null;default:return!0}case"script":if(a.async&&typeof a.async!="function"&&typeof a.async!="symbol"&&!a.onLoad&&!a.onError&&a.src&&typeof a.src=="string")return!0}return!1}function ap(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}var oi=null;function Ym(){}function Xm(n,a,l){if(oi===null)throw Error(o(475));var u=oi;if(a.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var g=pa(l.href),E=n.querySelector(ai(g));if(E){n=E._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(u.count++,u=Ao.bind(u),n.then(u,u)),a.state.loading|=4,a.instance=E,Et(E);return}E=n.ownerDocument||n,l=ep(l),(g=Cn.get(g))&&Vl(l,g),E=E.createElement("link"),Et(E);var V=E;V._p=new Promise(function(Z,fe){V.onload=Z,V.onerror=fe}),Zt(E,"link",l),a.instance=E}u.stylesheets===null&&(u.stylesheets=new Map),u.stylesheets.set(a,n),(n=a.state.preload)&&(a.state.loading&3)===0&&(u.count++,a=Ao.bind(u),n.addEventListener("load",a),n.addEventListener("error",a))}}function Km(){if(oi===null)throw Error(o(475));var n=oi;return n.stylesheets&&n.count===0&&Gl(n,n.stylesheets),0<n.count?function(a){var l=setTimeout(function(){if(n.stylesheets&&Gl(n,n.stylesheets),n.unsuspend){var u=n.unsuspend;n.unsuspend=null,u()}},6e4);return n.unsuspend=a,function(){n.unsuspend=null,clearTimeout(l)}}:null}function Ao(){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 Co=null;function Gl(n,a){n.stylesheets=null,n.unsuspend!==null&&(n.count++,Co=new Map,a.forEach(Qm,n),Co=null,Ao.call(n))}function Qm(n,a){if(!(a.state.loading&4)){var l=Co.get(n);if(l)var u=l.get(null);else{l=new Map,Co.set(n,l);for(var g=n.querySelectorAll("link[data-precedence],style[data-precedence]"),E=0;E<g.length;E++){var V=g[E];(V.nodeName==="LINK"||V.getAttribute("media")!=="not all")&&(l.set(V.dataset.precedence,V),u=V)}u&&l.set(null,u)}g=a.instance,V=g.getAttribute("data-precedence"),E=l.get(V)||u,E===u&&l.set(null,g),l.set(V,g),this.count++,u=Ao.bind(this),g.addEventListener("load",u),g.addEventListener("error",u),E?E.parentNode.insertBefore(g,E.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(g,n.firstChild)),a.state.loading|=4}}var si={$$typeof:k,Provider:null,Consumer:null,_currentValue:K,_currentValue2:K,_threadCount:0};function Zm(n,a,l,u,g,E,V,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=u,this.onUncaughtError=g,this.onCaughtError=E,this.onRecoverableError=V,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Z,this.incompleteTransitions=new Map}function ip(n,a,l,u,g,E,V,Z,fe,Oe,Ue,Ve){return n=new Zm(n,a,l,V,Z,fe,Oe,Ve),a=1,E===!0&&(a|=24),E=cn(3,null,null,a),n.current=E,E.stateNode=n,a=Rs(),a.refCount++,n.pooledCache=a,a.refCount++,E.memoizedState={element:u,isDehydrated:l,cache:a},Ds(E),n}function op(n){return n?(n=qr,n):qr}function sp(n,a,l,u,g,E){g=op(g),u.context===null?u.context=g:u.pendingContext=g,u=Jn(a),u.payload={element:l},E=E===void 0?null:E,E!==null&&(u.callback=E),l=er(n,u,a),l!==null&&(hn(l,n,a),Fa(l,n,a))}function lp(n,a){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var l=n.retryLane;n.retryLane=l!==0&&l<a?l:a}}function Wl(n,a){lp(n,a),(n=n.alternate)&&lp(n,a)}function cp(n){if(n.tag===13){var a=Vr(n,67108864);a!==null&&hn(a,n,67108864),Wl(n,67108864)}}var wo=!0;function Jm(n,a,l,u){var g=B.T;B.T=null;var E=q.p;try{q.p=2,Yl(n,a,l,u)}finally{q.p=E,B.T=g}}function eg(n,a,l,u){var g=B.T;B.T=null;var E=q.p;try{q.p=8,Yl(n,a,l,u)}finally{q.p=E,B.T=g}}function Yl(n,a,l,u){if(wo){var g=Xl(u);if(g===null)Ll(n,a,u,_o,l),dp(n,u);else if(ng(g,n,a,l,u))u.stopPropagation();else if(dp(n,u),a&4&&-1<tg.indexOf(n)){for(;g!==null;){var E=ft(g);if(E!==null)switch(E.tag){case 3:if(E=E.stateNode,E.current.memoizedState.isDehydrated){var V=De(E.pendingLanes);if(V!==0){var Z=E;for(Z.pendingLanes|=2,Z.entangledLanes|=2;V;){var fe=1<<31-qe(V);Z.entanglements[1]|=fe,V&=~fe}On(E),(Tt&6)===0&&(lo=oe()+500,ei(0))}}break;case 13:Z=Vr(E,2),Z!==null&&hn(Z,E,2),uo(),Wl(E,2)}if(E=Xl(u),E===null&&Ll(n,a,u,_o,l),E===g)break;g=E}g!==null&&u.stopPropagation()}else Ll(n,a,u,null,l)}}function Xl(n){return n=Jo(n),Kl(n)}var _o=null;function Kl(n){if(_o=null,n=ot(n),n!==null){var a=c(n);if(a===null)n=null;else{var l=a.tag;if(l===13){if(n=d(a),n!==null)return n;n=null}else if(l===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;n=null}else a!==n&&(n=null)}}return _o=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(G()){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,li=new Map,ci=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,a){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":li.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":ci.delete(a.pointerId)}}function ui(n,a,l,u,g,E){return n===null||n.nativeEvent!==E?(n={blockedOn:a,domEventName:l,eventSystemFlags:u,nativeEvent:E,targetContainers:[g]},a!==null&&(a=ft(a),a!==null&&cp(a)),n):(n.eventSystemFlags|=u,a=n.targetContainers,g!==null&&a.indexOf(g)===-1&&a.push(g),n)}function ng(n,a,l,u,g){switch(a){case"focusin":return pr=ui(pr,n,a,l,u,g),!0;case"dragenter":return hr=ui(hr,n,a,l,u,g),!0;case"mouseover":return mr=ui(mr,n,a,l,u,g),!0;case"pointerover":var E=g.pointerId;return li.set(E,ui(li.get(E)||null,n,a,l,u,g)),!0;case"gotpointercapture":return E=g.pointerId,ci.set(E,ui(ci.get(E)||null,n,a,l,u,g)),!0}return!1}function fp(n){var a=ot(n.target);if(a!==null){var l=c(a);if(l!==null){if(a=l.tag,a===13){if(a=d(l),a!==null){n.blockedOn=a,he(n.priority,function(){if(l.tag===13){var u=pn();u=Ke(u);var g=Vr(l,u);g!==null&&hn(g,l,u),Wl(l,u)}});return}}else if(a===3&&l.stateNode.current.memoizedState.isDehydrated){n.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}n.blockedOn=null}function Ro(n){if(n.blockedOn!==null)return!1;for(var a=n.targetContainers;0<a.length;){var l=Xl(n.nativeEvent);if(l===null){l=n.nativeEvent;var u=new l.constructor(l.type,l);Zo=u,l.target.dispatchEvent(u),Zo=null}else return a=ft(l),a!==null&&cp(a),n.blockedOn=l,!1;a.shift()}return!0}function pp(n,a,l){Ro(n)&&l.delete(a)}function rg(){Ql=!1,pr!==null&&Ro(pr)&&(pr=null),hr!==null&&Ro(hr)&&(hr=null),mr!==null&&Ro(mr)&&(mr=null),li.forEach(pp),ci.forEach(pp)}function To(n,a){n.blockedOn===a&&(n.blockedOn=null,Ql||(Ql=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,rg)))}var ko=null;function hp(n){ko!==n&&(ko=n,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){ko===n&&(ko=null);for(var a=0;a<n.length;a+=3){var l=n[a],u=n[a+1],g=n[a+2];if(typeof u!="function"){if(Kl(u||l)===null)continue;break}var E=ft(l);E!==null&&(n.splice(a,3),a-=3,Ks(E,{pending:!0,data:g,method:l.method,action:u},u,g))}}))}function di(n){function a(fe){return To(fe,n)}pr!==null&&To(pr,n),hr!==null&&To(hr,n),mr!==null&&To(mr,n),li.forEach(a),ci.forEach(a);for(var l=0;l<gr.length;l++){var u=gr[l];u.blockedOn===n&&(u.blockedOn=null)}for(;0<gr.length&&(l=gr[0],l.blockedOn===null);)fp(l),l.blockedOn===null&&gr.shift();if(l=(n.ownerDocument||n).$$reactFormReplay,l!=null)for(u=0;u<l.length;u+=3){var g=l[u],E=l[u+1],V=g[Ie]||null;if(typeof E=="function")V||hp(l);else if(V){var Z=null;if(E&&E.hasAttribute("formAction")){if(g=E,V=E[Ie]||null)Z=V.formAction;else if(Kl(g)!==null)continue}else Z=V.action;typeof Z=="function"?l[u+1]=Z:(l.splice(u,3),u-=3),hp(l)}}}function Zl(n){this._internalRoot=n}Po.prototype.render=Zl.prototype.render=function(n){var a=this._internalRoot;if(a===null)throw Error(o(409));var l=a.current,u=pn();sp(l,u,n,a,null,null)},Po.prototype.unmount=Zl.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var a=n.containerInfo;sp(n.current,2,null,n,null,null),uo(),a[Be]=null}};function Po(n){this._internalRoot=n}Po.prototype.unstable_scheduleHydration=function(n){if(n){var a=ne();n={blockedOn:null,target:n,priority:a};for(var l=0;l<gr.length&&a!==0&&a<gr[l].priority;l++);gr.splice(l,0,n),l===0&&fp(n)}};var mp=t.version;if(mp!=="19.1.0")throw Error(o(527,mp,"19.1.0"));q.findDOMNode=function(n){var a=n._reactInternals;if(a===void 0)throw typeof n.render=="function"?Error(o(188)):(n=Object.keys(n).join(","),Error(o(268,n)));return n=m(a),n=n!==null?f(n):null,n=n===null?null:n.stateNode,n};var ag={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:B,reconcilerVersion:"19.1.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Do=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Do.isDisabled&&Do.supportsFiber)try{$e=Do.inject(ag),Le=Do}catch{}}return reactDomClient_production.createRoot=function(n,a){if(!s(n))throw Error(o(299));var l=!1,u="",g=Pd,E=Dd,V=Md,Z=null;return a!=null&&(a.unstable_strictMode===!0&&(l=!0),a.identifierPrefix!==void 0&&(u=a.identifierPrefix),a.onUncaughtError!==void 0&&(g=a.onUncaughtError),a.onCaughtError!==void 0&&(E=a.onCaughtError),a.onRecoverableError!==void 0&&(V=a.onRecoverableError),a.unstable_transitionCallbacks!==void 0&&(Z=a.unstable_transitionCallbacks)),a=ip(n,1,!1,null,null,l,u,g,E,V,Z,null),n[Be]=a.current,jl(n),new Zl(a)},reactDomClient_production.hydrateRoot=function(n,a,l){if(!s(n))throw Error(o(299));var u=!1,g="",E=Pd,V=Dd,Z=Md,fe=null,Oe=null;return l!=null&&(l.unstable_strictMode===!0&&(u=!0),l.identifierPrefix!==void 0&&(g=l.identifierPrefix),l.onUncaughtError!==void 0&&(E=l.onUncaughtError),l.onCaughtError!==void 0&&(V=l.onCaughtError),l.onRecoverableError!==void 0&&(Z=l.onRecoverableError),l.unstable_transitionCallbacks!==void 0&&(fe=l.unstable_transitionCallbacks),l.formState!==void 0&&(Oe=l.formState)),a=ip(n,1,!0,a,l??null,u,g,E,V,Z,fe,Oe),a.context=op(null),l=a.current,u=pn(),u=Ke(u),g=Jn(u),g.callback=null,er(l,g,u),l=u,a.current.lanes=l,Ne(a,l),On(a),n[Be]=a.current,jl(n),new Po(a)},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,o){function s(c){return c instanceof i?c:new i(function(d){d(c)})}return new(i||(i=Promise))(function(c,d){function p(h){try{f(o.next(h))}catch(v){d(v)}}function m(h){try{f(o.throw(h))}catch(v){d(v)}}function f(h){h.done?c(h.value):s(h.value).then(p,m)}f((o=o.apply(e,t||[])).next())})}typeof SuppressedError=="function"&&SuppressedError;function keys(e){return Object.keys(e)}function isObject$2(e){return e&&typeof e=="object"&&!Array.isArray(e)}function deepMerge(e,t){const i={...e},o=t;return isObject$2(e)&&isObject$2(t)&&Object.keys(t).forEach(s=>{isObject$2(o[s])&&s in e?i[s]=deepMerge(i[s],o[s]):i[s]=o[s]}),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(o){if(o===0||o==="0")return`0${e}`;if(typeof o=="number"){const s=`${o/16}${e}`;return t?scaleRem(s):s}if(typeof o=="string"){if(o===""||o.startsWith("calc(")||o.startsWith("clamp(")||o.includes("rgba("))return o;if(o.includes(","))return o.split(",").map(c=>i(c)).join(",");if(o.includes(" "))return o.split(" ").map(c=>i(c)).join(" ");const s=o.replace("px","");if(!Number.isNaN(Number(s))){const c=`${Number(s)/16}${e}`;return t?scaleRem(c):c}}return o}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(o=>t.test(o))}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:s,value:c})=>jsxRuntimeExports.jsx(t.Provider,{value:c,children:s}),()=>{const s=reactExports.useContext(t);if(s===null)throw new Error(e);return s}]}function createOptionalContext(e=null){const t=reactExports.createContext(e);return[({children:s,value:c})=>jsxRuntimeExports.jsx(t.Provider,{value:c,children:s}),()=>reactExports.useContext(t)]}const elevations={app:100,modal:200,popover:300,overlay:400,max:9999};function getDefaultZIndex(e){return elevations[e]}const noop$3=()=>{};function closeOnEscape(e,t={active:!0}){return typeof e!="function"||!t.active?t.onKeyDown||noop$3:i=>{var o;i.key==="Escape"&&(e(i),(o=t.onTrigger)==null||o.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 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:o}=i;if(o!==Object.keys(t).length)return!1;for(let s=0;s<o;s+=1){const c=i[s];if(!(c in t)||e[c]!==t[c])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 o;return(o=t.current)==null?void 0:o.call(t,...i)},[])}function useDebouncedCallback(e,t){const i=typeof t=="number"?t:t.delay,o=typeof t=="number"?!1:t.flushOnUnmount,s=typeof t=="number"?!1:t.leading,c=useCallbackRef(e),d=reactExports.useRef(0),p=reactExports.useRef(()=>{}),m=reactExports.useRef(s),f=Object.assign(reactExports.useCallback((...h)=>{if(window.clearTimeout(d.current),s&&m.current){m.current=!1,c(...h);return}const v=()=>{d.current!==0&&(d.current=0,m.current=!0,c(...h))};p.current=v,f.flush=v,d.current=window.setTimeout(v,i),m.current=!1},[c,i,s]),{flush:p.current});return reactExports.useEffect(()=>()=>{window.clearTimeout(d.current),o&&f.flush()},[f,o]),f}const DEFAULT_EVENTS=["mousedown","touchstart"];function useClickOutside(e,t,i){const o=reactExports.useRef(null);return reactExports.useEffect(()=>{const s=c=>{const{target:d}=c??{};if(Array.isArray(i)){const p=(d==null?void 0:d.hasAttribute("data-ignore-outside-clicks"))||!document.body.contains(d)&&d.tagName!=="HTML";i.every(f=>!!f&&!c.composedPath().includes(f))&&!p&&e()}else o.current&&!o.current.contains(d)&&e()};return(t||DEFAULT_EVENTS).forEach(c=>document.addEventListener(c,s)),()=>{(t||DEFAULT_EVENTS).forEach(c=>document.removeEventListener(c,s))}},[o,e,i]),o}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[o,s]=reactExports.useState(i?t:getInitialValue(e)),c=reactExports.useRef(null);return reactExports.useEffect(()=>{if("matchMedia"in window)return c.current=window.matchMedia(e),s(c.current.matches),attachMediaListener(c.current,d=>s(d.matches))},[e]),o}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),o=()=>{var s;i.current&&"focus"in i.current&&typeof i.current.focus=="function"&&((s=i.current)==null||s.focus({preventScroll:!0}))};return useDidUpdate(()=>{let s=-1;const c=d=>{d.key==="Tab"&&window.clearTimeout(s)};return document.addEventListener("keydown",c),e?i.current=document.activeElement:t&&(s=window.setTimeout(o,10)),()=>{window.clearTimeout(s),document.removeEventListener("keydown",c)}},[e,t]),o}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 o=i[t.shiftKey?0:i.length-1],s=e.getRootNode();let c=o===s.activeElement||e===s.activeElement;const d=s.activeElement;if(d.tagName==="INPUT"&&d.getAttribute("type")==="radio"&&(c=i.filter(h=>h.getAttribute("type")==="radio"&&h.getAttribute("name")===d.getAttribute("name")).includes(o)),!c)return;t.preventDefault();const m=i[t.shiftKey?i.length-1:0];m&&m.focus()}function useFocusTrap(e=!0){const t=reactExports.useRef(null),i=s=>{let c=s.querySelector("[data-autofocus]");if(!c){const d=Array.from(s.querySelectorAll(FOCUS_SELECTOR));c=d.find(tabbable)||d.find(focusable)||null,!c&&focusable(s)&&(c=s)}c&&c.focus({preventScroll:!0})},o=reactExports.useCallback(s=>{e&&s!==null&&t.current!==s&&(s?(setTimeout(()=>{s.getRootNode()&&i(s)}),t.current=s):t.current=null)},[e]);return reactExports.useEffect(()=>{if(!e)return;t.current&&setTimeout(()=>i(t.current));const s=c=>{c.key==="Tab"&&t.current&&scopeTab(t.current,c)};return document.addEventListener("keydown",s),()=>document.removeEventListener("keydown",s)},[e]),o}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,o]=reactExports.useState(t);return useIsomorphicEffect(()=>{o(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(o=>{const s=assignRef(o,i);s&&t.set(o,s)}),t.size>0)return()=>{e.forEach(o=>{const s=t.get(o);s?s():assignRef(o,null)}),t.clear()}}}function useMergedRef(...e){return reactExports.useCallback(mergeRefs$1(...e),e)}function useMove(e,t,i="ltr"){const o=reactExports.useRef(null),s=reactExports.useRef(!1),c=reactExports.useRef(!1),d=reactExports.useRef(0),[p,m]=reactExports.useState(!1);return reactExports.useEffect(()=>{s.current=!0},[]),reactExports.useEffect(()=>{const f=o.current,h=({x:k,y:D})=>{cancelAnimationFrame(d.current),d.current=requestAnimationFrame(()=>{if(s.current&&f){f.style.userSelect="none";const w=f.getBoundingClientRect();if(w.width&&w.height){const R=clamp$4((k-w.left)/w.width,0,1);e({x:i==="ltr"?R:1-R,y:clamp$4((D-w.top)/w.height,0,1)})}}})},v=()=>{document.addEventListener("mousemove",A),document.addEventListener("mouseup",b),document.addEventListener("touchmove",T),document.addEventListener("touchend",b)},y=()=>{document.removeEventListener("mousemove",A),document.removeEventListener("mouseup",b),document.removeEventListener("touchmove",T),document.removeEventListener("touchend",b)},x=()=>{!c.current&&s.current&&(c.current=!0,typeof(t==null?void 0:t.onScrubStart)=="function"&&t.onScrubStart(),m(!0),v())},b=()=>{c.current&&s.current&&(c.current=!1,m(!1),y(),setTimeout(()=>{typeof(t==null?void 0:t.onScrubEnd)=="function"&&t.onScrubEnd()},0))},S=k=>{x(),k.preventDefault(),A(k)},A=k=>h({x:k.clientX,y:k.clientY}),C=k=>{k.cancelable&&k.preventDefault(),x(),T(k)},T=k=>{k.cancelable&&k.preventDefault(),h({x:k.changedTouches[0].clientX,y:k.changedTouches[0].clientY})};return f==null||f.addEventListener("mousedown",S),f==null||f.addEventListener("touchstart",C,{passive:!1}),()=>{f&&(f.removeEventListener("mousedown",S),f.removeEventListener("touchstart",C))}},[i,e]),{ref:o,active:p}}function useUncontrolled({value:e,defaultValue:t,finalValue:i,onChange:o=()=>{}}){const[s,c]=reactExports.useState(t!==void 0?t:i),d=(p,...m)=>{c(p),o==null||o(p,...m)};return e!==void 0?[e,o,!0]:[s,d,!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:o}={},[s,c]=reactExports.useState(e),d=reactExports.useCallback(()=>{c(f=>f||(i==null||i(),!0))},[i]),p=reactExports.useCallback(()=>{c(f=>f&&(o==null||o(),!1))},[o]),m=reactExports.useCallback(()=>{s?p():d()},[p,d,s]);return[s,{open:d,close:p,toggle:m}]}function useTimeout(e,t,i={autoInvoke:!1}){const o=reactExports.useRef(null),s=reactExports.useCallback((...d)=>{o.current||(o.current=window.setTimeout(()=>{e(d),o.current=null},t))},[t]),c=reactExports.useCallback(()=>{o.current&&(window.clearTimeout(o.current),o.current=null)},[]);return reactExports.useEffect(()=>(i.autoInvoke&&s(),c),[c,s]),{start:s,clear:c}}function usePrevious(e){const t=reactExports.useRef(void 0);return reactExports.useEffect(()=>{t.current=e},[e]),t.current}function useMutationObserver(e,t,i){const o=reactExports.useRef(null),s=reactExports.useRef(null);return reactExports.useEffect(()=>{const c=typeof i=="function"?i():i;return(c||s.current)&&(o.current=new MutationObserver(e),o.current.observe(c||s.current,t)),()=>{var d;(d=o.current)==null||d.disconnect()}},[e,t]),s}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,o)=>Math.abs(o-e)<Math.abs(i-e)?o: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,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(i=r(e[t]))&&(o&&(o+=" "),o+=i)}else for(i in e)e[i]&&(o&&(o+=" "),o+=i);return o}function clsx(){for(var e,t,i=0,o="",s=arguments.length;i<s;i++)(e=arguments[i])&&(t=r(e))&&(o&&(o+=" "),o+=t);return o}const EMPTY_CLASS_NAMES={};function mergeClassNames(e){const t={};return e.forEach(i=>{Object.entries(i).forEach(([o,s])=>{t[o]?t[o]=clsx(t[o],s):t[o]=s})}),t}function resolveClassNames({theme:e,classNames:t,props:i,stylesCtx:o}){const c=(Array.isArray(t)?t:[t]).map(d=>typeof d=="function"?d(e,i,o):d||EMPTY_CLASS_NAMES);return mergeClassNames(c)}function resolveStyles({theme:e,styles:t,props:i,stylesCtx:o}){return(Array.isArray(t)?t:[t]).reduce((c,d)=>typeof d=="function"?{...c,...d(e,i,o)}:{...c,...d},{})}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 d=t.split("");t=[d[0],d[0],d[1],d[1],d[2],d[2]].join("")}if(t.length===8){const d=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:d}}const i=parseInt(t,16),o=i>>16&255,s=i>>8&255,c=i&255;return{r:o,g:s,b:c,a:1}}function rgbStringToRgba(e){const[t,i,o,s]=e.replace(/[^0-9,./]/g,"").split(/[/,]/).map(Number);return{r:t,g:i,b:o,a:s||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 o=parseInt(i[1],10),s=parseInt(i[2],10)/100,c=parseInt(i[3],10)/100,d=i[5]?parseFloat(i[5]):void 0,p=(1-Math.abs(2*c-1))*s,m=o/60,f=p*(1-Math.abs(m%2-1)),h=c-p/2;let v,y,x;return m>=0&&m<1?(v=p,y=f,x=0):m>=1&&m<2?(v=f,y=p,x=0):m>=2&&m<3?(v=0,y=p,x=f):m>=3&&m<4?(v=0,y=f,x=p):m>=4&&m<5?(v=f,y=0,x=p):(v=p,y=0,x=f),{r:Math.round((v+h)*255),g:Math.round((y+h)*255),b:Math.round((x+h)*255),a:d||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:o,b:s,a:c}=toRgba(e),d=1-t,p=m=>Math.round(m*d);return`rgba(${p(i)}, ${p(o)}, ${p(s)}, ${c})`}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:o}=toRgba(e),s=t/255,c=i/255,d=o/255,p=gammaCorrect(s),m=gammaCorrect(c),f=gammaCorrect(d);return .2126*p+.7152*m+.0722*f}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[o,s]=e.split("."),c=s?Number(s):void 0,d=o in t.colors;if(d){const p=c!==void 0?t.colors[o][c]:t.colors[o][getPrimaryShade(t,i||"light")];return{color:o,value:p,shade:c,isThemeColor:d,isLight:isLightColor(p,t.luminanceThreshold),variable:s?`--mantine-color-${o}-${c}`:`--mantine-color-${o}-filled`}}return{color:e,value:e,isThemeColor:d,isLight:isLightColor(e,t.luminanceThreshold),shade:c,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},o=getThemeColor(i.from,t),s=getThemeColor(i.to,t);return`linear-gradient(${i.deg}deg, ${o} 0%, ${s} 100%)`}function rgba(e,t){if(typeof e!="string"||t>1||t<0)return"rgba(0, 0, 0, 1)";if(e.startsWith("var(")){const c=(1-t)*100;return`color-mix(in srgb, ${e}, transparent ${c}%)`}if(e.startsWith("oklch"))return e.includes("/")?e.replace(/\/\s*[\d.]+\s*\)/,`/ ${t})`):e.replace(")",` / ${t})`);const{r:i,g:o,b:s}=toRgba(e);return`rgba(${i}, ${o}, ${s}, ${t})`}const alpha$1=rgba,defaultVariantColorsResolver=({color:e,theme:t,variant:i,gradient:o,autoContrast:s})=>{const c=parseThemeColor({color:e,theme:t}),d=typeof s=="boolean"?s:t.autoContrast;if(i==="none")return{background:"transparent",hover:"transparent",color:"inherit",border:"none"};if(i==="filled"){const p=d&&c.isLight?"var(--mantine-color-black)":"var(--mantine-color-white)";return c.isThemeColor?c.shade===void 0?{background:`var(--mantine-color-${e}-filled)`,hover:`var(--mantine-color-${e}-filled-hover)`,color:p,border:`${rem(1)} solid transparent`}:{background:`var(--mantine-color-${c.color}-${c.shade})`,hover:`var(--mantine-color-${c.color}-${c.shade===9?8:c.shade+1})`,color:p,border:`${rem(1)} solid transparent`}:{background:e,hover:darken$1(e,.1),color:p,border:`${rem(1)} solid transparent`}}if(i==="light"){if(c.isThemeColor){if(c.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 p=t.colors[c.color][c.shade];return{background:rgba(p,.1),hover:rgba(p,.12),color:`var(--mantine-color-${c.color}-${Math.min(c.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 c.isThemeColor?c.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[c.color][c.shade],.05),color:`var(--mantine-color-${c.color}-${c.shade})`,border:`${rem(1)} solid var(--mantine-color-${c.color}-${c.shade})`}:{background:"transparent",hover:rgba(e,.05),color:e,border:`${rem(1)} solid ${e}`};if(i==="subtle"){if(c.isThemeColor){if(c.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 p=t.colors[c.color][c.shade];return{background:"transparent",hover:rgba(p,.12),color:`var(--mantine-color-${c.color}-${Math.min(c.shade,6)})`,border:`${rem(1)} solid transparent`}}return{background:"transparent",hover:rgba(e,.12),color:e,border:`${rem(1)} solid transparent`}}return i==="transparent"?c.isThemeColor?c.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-${c.color}-${Math.min(c.shade,6)})`,border:`${rem(1)} solid transparent`}:{background:"transparent",hover:"transparent",color:e,border:`${rem(1)} solid transparent`}:i==="white"?c.isThemeColor?c.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-${c.color}-${c.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(o,t),hover:getGradient(o,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 o=window.localStorage.getItem(e);return isMantineColorScheme(o)?o:i}catch{return i}},set:i=>{try{window.localStorage.setItem(e,i)}catch(o){console.warn("[@mantine/core] Local storage color scheme manager was unable to save color scheme.",o)}},subscribe:i=>{t=o=>{o.storageArea===window.localStorage&&o.key===e&&isMantineColorScheme(o.newValue)&&i(o.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 o;if(!t)return validateMantineTheme(e),e;const i=deepMerge(e,t);return t.fontFamily&&!((o=t.headings)!=null&&o.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 o=useSafeMantineTheme(),s=reactExports.useMemo(()=>mergeMantineTheme(i?o:DEFAULT_THEME,e),[e,o,i]);return jsxRuntimeExports.jsx(MantineThemeContext.Provider,{value:s,children:t})}MantineThemeProvider.displayName="@mantine/core/MantineThemeProvider";function MantineClasses(){const e=useMantineTheme(),t=useMantineStyleNonce(),i=keys(e.breakpoints).reduce((o,s)=>{const c=e.breakpoints[s].includes("px"),d=px(e.breakpoints[s]),p=c?`${d-.1}px`:em(d-.1),m=c?`${d}px`:em(d);return`${o}@media (max-width: ${p}) {.mantine-visible-from-${s} {display: none !important;}}@media (min-width: ${m}) {.mantine-hidden-from-${s} {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((o,s)=>`${s}{${o}}`,t)}function convertCssVariables(e,t){const i=cssVariablesObjectToString(e.variables),o=i?wrapWithSelector(t,i):"",s=cssVariablesObjectToString(e.dark),c=cssVariablesObjectToString(e.light),d=s?wrapWithSelector(t===":host"?`${t}([data-mantine-color-scheme="dark"])`:`${t}[data-mantine-color-scheme="dark"]`,s):"",p=c?wrapWithSelector(t===":host"?`${t}([data-mantine-color-scheme="light"])`:`${t}[data-mantine-color-scheme="light"]`,c):"";return`${o}${d}${p}`}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:o=t,withColorValues:s=!0}){if(!e.colors[t])return{};if(i==="light"){const p=getPrimaryShade(e,"light"),m={[`--mantine-color-${o}-text`]:`var(--mantine-color-${o}-filled)`,[`--mantine-color-${o}-filled`]:`var(--mantine-color-${o}-${p})`,[`--mantine-color-${o}-filled-hover`]:`var(--mantine-color-${o}-${p===9?8:p+1})`,[`--mantine-color-${o}-light`]:alpha$1(e.colors[t][p],.1),[`--mantine-color-${o}-light-hover`]:alpha$1(e.colors[t][p],.12),[`--mantine-color-${o}-light-color`]:`var(--mantine-color-${o}-${p})`,[`--mantine-color-${o}-outline`]:`var(--mantine-color-${o}-${p})`,[`--mantine-color-${o}-outline-hover`]:alpha$1(e.colors[t][p],.05)};return s?{[`--mantine-color-${o}-0`]:e.colors[t][0],[`--mantine-color-${o}-1`]:e.colors[t][1],[`--mantine-color-${o}-2`]:e.colors[t][2],[`--mantine-color-${o}-3`]:e.colors[t][3],[`--mantine-color-${o}-4`]:e.colors[t][4],[`--mantine-color-${o}-5`]:e.colors[t][5],[`--mantine-color-${o}-6`]:e.colors[t][6],[`--mantine-color-${o}-7`]:e.colors[t][7],[`--mantine-color-${o}-8`]:e.colors[t][8],[`--mantine-color-${o}-9`]:e.colors[t][9],...m}:m}const c=getPrimaryShade(e,"dark"),d={[`--mantine-color-${o}-text`]:`var(--mantine-color-${o}-4)`,[`--mantine-color-${o}-filled`]:`var(--mantine-color-${o}-${c})`,[`--mantine-color-${o}-filled-hover`]:`var(--mantine-color-${o}-${c===9?8:c+1})`,[`--mantine-color-${o}-light`]:alpha$1(e.colors[t][Math.max(0,c-2)],.15),[`--mantine-color-${o}-light-hover`]:alpha$1(e.colors[t][Math.max(0,c-2)],.2),[`--mantine-color-${o}-light-color`]:`var(--mantine-color-${o}-${Math.max(c-5,0)})`,[`--mantine-color-${o}-outline`]:`var(--mantine-color-${o}-${Math.max(c-4,0)})`,[`--mantine-color-${o}-outline-hover`]:alpha$1(e.colors[t][Math.max(c-4,0)],.05)};return s?{[`--mantine-color-${o}-0`]:e.colors[t][0],[`--mantine-color-${o}-1`]:e.colors[t][1],[`--mantine-color-${o}-2`]:e.colors[t][2],[`--mantine-color-${o}-3`]:e.colors[t][3],[`--mantine-color-${o}-4`]:e.colors[t][4],[`--mantine-color-${o}-5`]:e.colors[t][5],[`--mantine-color-${o}-6`]:e.colors[t][6],[`--mantine-color-${o}-7`]:e.colors[t][7],[`--mantine-color-${o}-8`]:e.colors[t][8],[`--mantine-color-${o}-9`]:e.colors[t][9],...d}:d}function isVirtualColor(e){return!!e&&typeof e=="object"&&"mantine-virtual-color"in e}function assignSizeVariables(e,t,i){keys(t).forEach(o=>Object.assign(e,{[`--mantine-${i}-${o}`]:t[o]}))}const defaultCssVariablesResolver=e=>{const t=getPrimaryShade(e,"light"),i=e.defaultRadius in e.radius?e.radius[e.defaultRadius]:rem(e.defaultRadius),o={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(o.variables,e.breakpoints,"breakpoint"),assignSizeVariables(o.variables,e.spacing,"spacing"),assignSizeVariables(o.variables,e.fontSizes,"font-size"),assignSizeVariables(o.variables,e.lineHeights,"line-height"),assignSizeVariables(o.variables,e.shadows,"shadow"),assignSizeVariables(o.variables,e.radius,"radius"),e.colors[e.primaryColor].forEach((c,d)=>{o.variables[`--mantine-primary-color-${d}`]=`var(--mantine-color-${e.primaryColor}-${d})`}),keys(e.colors).forEach(c=>{const d=e.colors[c];if(isVirtualColor(d)){Object.assign(o.light,getCSSColorVariables({theme:e,name:d.name,color:d.light,colorScheme:"light",withColorValues:!0})),Object.assign(o.dark,getCSSColorVariables({theme:e,name:d.name,color:d.dark,colorScheme:"dark",withColorValues:!0}));return}d.forEach((p,m)=>{o.variables[`--mantine-color-${c}-${m}`]=p}),Object.assign(o.light,getCSSColorVariables({theme:e,color:c,colorScheme:"light",withColorValues:!1})),Object.assign(o.dark,getCSSColorVariables({theme:e,color:c,colorScheme:"dark",withColorValues:!1}))});const s=e.headings.sizes;return keys(s).forEach(c=>{o.variables[`--mantine-${c}-font-size`]=s[c].fontSize,o.variables[`--mantine-${c}-line-height`]=s[c].lineHeight,o.variables[`--mantine-${c}-font-weight`]=s[c].fontWeight||e.headings.fontWeight}),o};function getMergedVariables({theme:e,generator:t}){const i=defaultCssVariablesResolver(e),o=t==null?void 0:t(e);return o?deepMerge(i,o):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(),o=useMantineStyleNonce(),s=useMantineCssVariablesResolver(),c=getMergedVariables({theme:i,generator:s}),d=e===":root"&&t,p=d?removeDefaultVariables(c):c,m=convertCssVariables(p,e);return m?jsxRuntimeExports.jsx("style",{"data-mantine-styles":!0,nonce:o==null?void 0:o(),dangerouslySetInnerHTML:{__html:`${m}${d?"":getColorSchemeCssVariables(e)}`}}):null}MantineCssVariables.displayName="@mantine/CssVariables";function setColorSchemeAttribute(e,t){var s,c;const i=typeof window<"u"&&"matchMedia"in window&&((s=window.matchMedia("(prefers-color-scheme: dark)"))==null?void 0:s.matches),o=e!=="auto"?e:i?"dark":"light";(c=t())==null||c.setAttribute("data-mantine-color-scheme",o)}function useProviderColorScheme({manager:e,defaultColorScheme:t,getRootElement:i,forceColorScheme:o}){const s=reactExports.useRef(null),[c,d]=reactExports.useState(()=>e.get(t)),p=o||c,m=reactExports.useCallback(h=>{o||(setColorSchemeAttribute(h,i),d(h),e.set(h))},[e.set,p,o]),f=reactExports.useCallback(()=>{d(t),setColorSchemeAttribute(t,i),e.clear()},[e.clear,t]);return reactExports.useEffect(()=>(e.subscribe(m),e.unsubscribe),[e.subscribe,e.unsubscribe]),useIsomorphicEffect(()=>{setColorSchemeAttribute(e.get(t),i)},[]),reactExports.useEffect(()=>{var v;if(o)return setColorSchemeAttribute(o,i),()=>{};o===void 0&&setColorSchemeAttribute(c,i),typeof window<"u"&&"matchMedia"in window&&(s.current=window.matchMedia("(prefers-color-scheme: dark)"));const h=y=>{c==="auto"&&setColorSchemeAttribute(y.matches?"dark":"light",i)};return(v=s.current)==null||v.addEventListener("change",h),()=>{var y;return(y=s.current)==null?void 0:y.removeEventListener("change",h)}},[c,o]),{colorScheme:p,setColorScheme:m,clearColorScheme:f}}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:o=!0,withGlobalClasses:s=!0,deduplicateCssVariables:c=!0,withCssVariables:d=!0,cssVariablesSelector:p=":root",classNamesPrefix:m="mantine",colorSchemeManager:f=localStorageColorSchemeManager(),defaultColorScheme:h="light",getRootElement:v=()=>document.documentElement,cssVariablesResolver:y,forceColorScheme:x,stylesTransform:b,env:S}){const{colorScheme:A,setColorScheme:C,clearColorScheme:T}=useProviderColorScheme({defaultColorScheme:h,forceColorScheme:x,manager:f,getRootElement:v});return useRespectReduceMotion({respectReducedMotion:(e==null?void 0:e.respectReducedMotion)||!1,getRootElement:v}),jsxRuntimeExports.jsx(MantineContext.Provider,{value:{colorScheme:A,setColorScheme:C,clearColorScheme:T,getRootElement:v,classNamesPrefix:m,getStyleNonce:i,cssVariablesResolver:y,cssVariablesSelector:p,withStaticClasses:o,stylesTransform:b,env:S},children:jsxRuntimeExports.jsxs(MantineThemeProvider,{theme:e,children:[d&&jsxRuntimeExports.jsx(MantineCssVariables,{cssVariablesSelector:p,deduplicateCssVariables:c}),s&&jsxRuntimeExports.jsx(MantineClasses,{}),t]})})}MantineProvider.displayName="@mantine/core/MantineProvider";function useResolvedStylesApi({classNames:e,styles:t,props:i,stylesCtx:o}){const s=useMantineTheme();return{resolvedClassNames:resolveClassNames({theme:s,classNames:e,props:i,stylesCtx:o||void 0}),resolvedStyles:resolveStyles({theme:s,styles:t,props:i,stylesCtx:o||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:o,theme:s}){return resolveClassNames({theme:s,classNames:i==null?void 0:i.classNames,props:(i==null?void 0:i.props)||o,stylesCtx:t})[e]}function getResolvedClassNames({selector:e,stylesCtx:t,theme:i,classNames:o,props:s}){return resolveClassNames({theme:i,classNames:o,props:s,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:o}){return o===!1?[]:e.map(s=>`${t}-${s}-${i}`)}function getThemeClassNames({themeName:e,theme:t,selector:i,props:o,stylesCtx:s}){return e.map(c=>{var d,p;return(p=resolveClassNames({theme:t,classNames:(d=t.components[c])==null?void 0:d.classNames,props:o,stylesCtx:s}))==null?void 0:p[i]})}function getVariantClassName({options:e,classes:t,selector:i,unstyled:o}){return e!=null&&e.variant&&!o?t[`${i}--${e.variant}`]:void 0}function getClassName({theme:e,options:t,themeName:i,selector:o,classNamesPrefix:s,classNames:c,classes:d,unstyled:p,className:m,rootSelector:f,props:h,stylesCtx:v,withStaticClasses:y,headless:x,transformedStyles:b}){return clsx(getGlobalClassNames({theme:e,options:t,unstyled:p||x}),getThemeClassNames({theme:e,themeName:i,selector:o,props:h,stylesCtx:v}),getVariantClassName({options:t,classes:d,selector:o,unstyled:p}),getResolvedClassNames({selector:o,stylesCtx:v,theme:e,classNames:c,props:h}),getResolvedClassNames({selector:o,stylesCtx:v,theme:e,classNames:b,props:h}),getOptionsClassNames({selector:o,stylesCtx:v,options:t,props:h,theme:e}),getRootClassName({rootSelector:f,selector:o,className:m}),getSelectorClassName({selector:o,classes:d,unstyled:p||x}),y&&!x&&getStaticClassNames({themeName:i,classNamesPrefix:s,selector:o,withStaticClass:t==null?void 0:t.withStaticClass}),t==null?void 0:t.className)}function getThemeStyles({theme:e,themeName:t,props:i,stylesCtx:o,selector:s}){return t.map(c=>{var d;return resolveStyles({theme:e,styles:(d=e.components[c])==null?void 0:d.styles,props:i,stylesCtx:o})[s]}).reduce((c,d)=>({...c,...d}),{})}function resolveStyle({style:e,theme:t}){return Array.isArray(e)?[...e].reduce((i,o)=>({...i,...resolveStyle({style:o,theme:t})}),{}):typeof e=="function"?e(t):e??{}}function mergeVars(e){return e.reduce((t,i)=>(i&&Object.keys(i).forEach(o=>{t[o]={...t[o],...filterProps(i[o])}}),t),{})}function resolveVars({vars:e,varsResolver:t,theme:i,props:o,stylesCtx:s,selector:c,themeName:d,headless:p}){var m;return(m=mergeVars([p?{}:t==null?void 0:t(i,o,s),...d.map(f=>{var h,v,y;return(y=(v=(h=i.components)==null?void 0:h[f])==null?void 0:v.vars)==null?void 0:y.call(v,i,o,s)}),e==null?void 0:e(i,o,s)]))==null?void 0:m[c]}function getStyle({theme:e,themeName:t,selector:i,options:o,props:s,stylesCtx:c,rootSelector:d,styles:p,style:m,vars:f,varsResolver:h,headless:v,withStylesTransform:y}){return{...!y&&getThemeStyles({theme:e,themeName:t,props:s,stylesCtx:c,selector:i}),...!y&&resolveStyles({theme:e,styles:p,props:s,stylesCtx:c})[i],...!y&&resolveStyles({theme:e,styles:o==null?void 0:o.styles,props:(o==null?void 0:o.props)||s,stylesCtx:c})[i],...resolveVars({theme:e,props:s,stylesCtx:c,vars:f,varsResolver:h,selector:i,themeName:t,headless:v}),...d===i?resolveStyle({style:m,theme:e}):null,...resolveStyle({style:o==null?void 0:o.style,theme:e})}}function useStylesTransform({props:e,stylesCtx:t,themeName:i}){var d;const o=useMantineTheme(),s=(d=useMantineStylesTransform())==null?void 0:d();return{getTransformedStyles:p=>s?[...p.map(f=>s(f,{props:e,theme:o,ctx:t})),...i.map(f=>{var h;return s((h=o.components[f])==null?void 0:h.styles,{props:e,theme:o,ctx:t})})].filter(Boolean):[],withStylesTransform:!!s}}function useStyles({name:e,classes:t,props:i,stylesCtx:o,className:s,style:c,rootSelector:d="root",unstyled:p,classNames:m,styles:f,vars:h,varsResolver:v}){const y=useMantineTheme(),x=useMantineClassNamesPrefix(),b=useMantineWithStaticClasses(),S=useMantineIsHeadless(),A=(Array.isArray(e)?e:[e]).filter(k=>k),{withStylesTransform:C,getTransformedStyles:T}=useStylesTransform({props:i,stylesCtx:o,themeName:A});return(k,D)=>({className:getClassName({theme:y,options:D,themeName:A,selector:k,classNamesPrefix:x,classNames:m,classes:t,unstyled:p,className:s,rootSelector:d,props:i,stylesCtx:o,withStaticClasses:b,headless:S,transformedStyles:T([D==null?void 0:D.styles,f])}),style:getStyle({theme:y,themeName:A,selector:k,options:D,props:i,stylesCtx:o,rootSelector:d,styles:f,style:c,vars:h,varsResolver:v,headless:S,withStylesTransform:C})})}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(o=>o.remove())}function useMantineColorScheme({keepTransitions:e}={}){const t=reactExports.useRef(noop$3),i=reactExports.useRef(-1),o=reactExports.useContext(MantineContext),s=useMantineStyleNonce(),c=reactExports.useRef(s==null?void 0:s());if(!o)throw new Error("[@mantine/core] MantineProvider was not found in tree");const d=v=>{o.setColorScheme(v),t.current=e?()=>{}:disableTransition(c.current),window.clearTimeout(i.current),i.current=window.setTimeout(()=>{var y;(y=t.current)==null||y.call(t)},10)},p=()=>{o.clearColorScheme(),t.current=e?()=>{}:disableTransition(c.current),window.clearTimeout(i.current),i.current=window.setTimeout(()=>{var v;(v=t.current)==null||v.call(t)},10)},m=useColorScheme("light",{getInitialValueInEffect:!1}),f=o.colorScheme==="auto"?m:o.colorScheme,h=reactExports.useCallback(()=>d(f==="light"?"dark":"light"),[d,f]);return reactExports.useEffect(()=>()=>{var v;(v=t.current)==null||v.call(t),window.clearTimeout(i.current)},[]),{colorScheme:o.colorScheme,setColorScheme:d,clearColorScheme:p,toggleColorScheme:h}}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,...o}){const s=["light","dark","auto"].includes(e)?e:"light";return jsxRuntimeExports.jsx("script",{...o,"data-mantine-script":!0,dangerouslySetInnerHTML:{__html:getScript({defaultColorScheme:s,localStorageKey:t,forceColorScheme:i})}})}function useProps(e,t,i){var d;const o=useMantineTheme(),s=(d=o.components[e])==null?void 0:d.defaultProps,c=typeof s=="function"?s(o):s;return{...t,...c,...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:o}){const s=t?cssObjectToString(t):"",c=Array.isArray(i)?i.map(p=>`@media${p.query}{${e}{${cssObjectToString(p.styles)}}}`):[],d=Array.isArray(o)?o.map(p=>`@container ${p.query}{${e}{${cssObjectToString(p.styles)}}}`):[];return`${s?`${e}{${s}}`:""}${c.join("")}${d.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:o,mt:s,mb:c,ml:d,mr:p,me:m,ms:f,p:h,px:v,py:y,pt:x,pb:b,pl:S,pr:A,pe:C,ps:T,bd:k,bg:D,c:w,opacity:R,ff:_,fz:M,fw:N,lts:P,ta:L,lh:I,fs:W,tt:ae,td:Q,w:B,miw:q,maw:K,h:U,mih:$,mah:Y,bgsz:z,bgp:O,bgr:F,bga:H,pos:X,top:te,left:J,bottom:ce,right:ue,inset:Ae,display:Ee,flex:Me,hiddenFrom:je,visibleFrom:ke,lightHidden:ge,darkHidden:oe,sx:G,...ee}=e;return{styleProps:filterProps({m:t,mx:i,my:o,mt:s,mb:c,ml:d,mr:p,me:m,ms:f,p:h,px:v,py:y,pt:x,pb:b,pl:S,pr:A,pe:C,ps:T,bd:k,bg:D,c:w,opacity:R,ff:_,fz:M,fw:N,lts:P,ta:L,lh:I,fs:W,tt:ae,td:Q,w:B,miw:q,maw:K,h:U,mih:$,mah:Y,bgsz:z,bgp:O,bgr:F,bga:H,pos:X,top:te,left:J,bottom:ce,right:ue,inset:Ae,display:Ee,flex:Me,hiddenFrom:je,visibleFrom:ke,lightHidden:ge,darkHidden:oe,sx:G}),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,o,...s]=e.split(" ").filter(d=>d.trim()!=="");let c=`${rem(i)}`;return o&&(c+=` ${o}`),s.length>0&&(c+=` ${colorResolver(s.join(" "),t)}`),c.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 o=`--mantine-spacing-${i}`;return e.startsWith("-")?`calc(var(${o}) * -1)`:`var(${o})`}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 o=Object.keys(e).sort((s,c)=>Number(replaceMediaQuery(s))-Number(replaceMediaQuery(c))).map(s=>({query:s,styles:e[s]}));return{...t,media:o}}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((o,s)=>{if(s==="hiddenFrom"||s==="visibleFrom"||s==="sx")return o;const c=t[s],d=Array.isArray(c.property)?c.property:[c.property],p=getBaseValue(e[s]);if(!hasResponsiveStyles(e[s]))return d.forEach(f=>{o.inlineStyles[f]=resolvers$1[c.type](p,i)}),o;o.hasResponsiveStyles=!0;const m=getBreakpointKeys(e[s]);return d.forEach(f=>{p&&(o.styles[f]=resolvers$1[c.type](p,i)),m.forEach(h=>{const v=`(min-width: ${i.breakpoints[h]})`;o.media[v]={...o.media[v],[f]:resolvers$1[c.type](getBreakpointValue(e[s],h),i)}})}),o},{hasResponsiveStyles:!1,styles:{},inlineStyles:{},media:{}}))}function useRandomClassName(){return`__m__-${reactExports.useId().replace(/:/g,"")}`}function getStyleObject(e,t){return Array.isArray(e)?[...e].reduce((i,o)=>({...i,...getStyleObject(o,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 o=e[i];return o===void 0||o===""||o===!1||o===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,o)=>({...i,...mergeStyles(o,t)}),{}):typeof e=="function"?e(t):e??{}}function getBoxStyle({theme:e,style:t,vars:i,styleProps:o}){const s=mergeStyles(t,e),c=mergeStyles(i,e);return{...s,...c,...o}}const _Box=reactExports.forwardRef(({component:e,style:t,__vars:i,className:o,variant:s,mod:c,size:d,hiddenFrom:p,visibleFrom:m,lightHidden:f,darkHidden:h,renderRoot:v,__size:y,...x},b)=>{var M;const S=useMantineTheme(),A=e||"div",{styleProps:C,rest:T}=extractStyleProps(x),k=useMantineSxTransform(),D=(M=k==null?void 0:k())==null?void 0:M(C.sx),w=useRandomClassName(),R=parseStyleProps({styleProps:C,theme:S,data:STYlE_PROPS_DATA}),_={ref:b,style:getBoxStyle({theme:S,style:t,vars:i,styleProps:R.inlineStyles}),className:clsx(o,D,{[w]:R.hasResponsiveStyles,"mantine-light-hidden":f,"mantine-dark-hidden":h,[`mantine-hidden-from-${p}`]:p,[`mantine-visible-from-${m}`]:m}),"data-variant":s,"data-size":isNumberLike(d)?void 0:d||void 0,size:y,...getBoxMod(c),...T};return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[R.hasResponsiveStyles&&jsxRuntimeExports.jsx(InlineStyles,{selector:`.${w}`,styles:R.styles,media:R.media}),typeof v=="function"?v(_):jsxRuntimeExports.jsx(A,{..._})]})});_Box.displayName="@mantine/core/Box";const Box=_Box;function identity(e){return e}function factory(e){const t=reactExports.forwardRef(e);return t.extend=identity,t.withProps=i=>{const o=reactExports.forwardRef((s,c)=>jsxRuntimeExports.jsx(t,{...i,...s,ref:c}));return o.extend=t.extend,o.displayName=`WithProps(${t.displayName})`,o},t}function polymorphicFactory(e){const t=reactExports.forwardRef(e);return t.withProps=i=>{const o=reactExports.forwardRef((s,c)=>jsxRuntimeExports.jsx(t,{...i,...s,ref:c}));return o.extend=t.extend,o.displayName=`WithProps(${t.displayName})`,o},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:o,display:s}=getComputedStyle$1(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+i)&&!["inline","contents"].includes(s)}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(o=>i[o]?i[o]!=="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(o=>(i.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(i.contain||"").includes(o))}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 o;t===void 0&&(t=[]),i===void 0&&(i=!0);const s=getNearestOverflowAncestor(e),c=s===((o=e.ownerDocument)==null?void 0:o.body),d=getWindow(s);if(c){const p=getFrameElement(d);return t.concat(d,d.visualViewport||[],isOverflowElement(s)?s:[],p&&i?getOverflowAncestors(p):[])}return t.concat(s,getOverflowAncestors(s,[],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 o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.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:o}=t;return i+"/"+o}).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$1(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 o=getAlignment(e),s=getAlignmentAxis(e),c=getAxisLength(s);let d=s==="x"?o===(i?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[c]>t.floating[c]&&(d=getOppositePlacement(d)),[d,getOppositePlacement(d)]}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 o=["left","right"],s=["right","left"],c=["top","bottom"],d=["bottom","top"];switch(e){case"top":case"bottom":return i?t?s:o:t?o:s;case"left":case"right":return t?c:d;default:return[]}}function getOppositeAxisPlacements(e,t,i,o){const s=getAlignment(e);let c=getSideList(getSide(e),i==="start",o);return s&&(c=c.map(d=>d+"-"+s),t&&(c=c.concat(c.map(getOppositeAlignmentPlacement)))),c}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:o,height:s}=e;return{width:o,height:s,top:i,left:t,right:t+o,bottom:i+s,x:t,y:i}}function computeCoordsFromPlacement(e,t,i){let{reference:o,floating:s}=e;const c=getSideAxis(t),d=getAlignmentAxis(t),p=getAxisLength(d),m=getSide(t),f=c==="y",h=o.x+o.width/2-s.width/2,v=o.y+o.height/2-s.height/2,y=o[p]/2-s[p]/2;let x;switch(m){case"top":x={x:h,y:o.y-s.height};break;case"bottom":x={x:h,y:o.y+o.height};break;case"right":x={x:o.x+o.width,y:v};break;case"left":x={x:o.x-s.width,y:v};break;default:x={x:o.x,y:o.y}}switch(getAlignment(t)){case"start":x[d]-=y*(i&&f?-1:1);break;case"end":x[d]+=y*(i&&f?-1:1);break}return x}const computePosition$1=async(e,t,i)=>{const{placement:o="bottom",strategy:s="absolute",middleware:c=[],platform:d}=i,p=c.filter(Boolean),m=await(d.isRTL==null?void 0:d.isRTL(t));let f=await d.getElementRects({reference:e,floating:t,strategy:s}),{x:h,y:v}=computeCoordsFromPlacement(f,o,m),y=o,x={},b=0;for(let S=0;S<p.length;S++){const{name:A,fn:C}=p[S],{x:T,y:k,data:D,reset:w}=await C({x:h,y:v,initialPlacement:o,placement:y,strategy:s,middlewareData:x,rects:f,platform:d,elements:{reference:e,floating:t}});h=T??h,v=k??v,x={...x,[A]:{...x[A],...D}},w&&b<=50&&(b++,typeof w=="object"&&(w.placement&&(y=w.placement),w.rects&&(f=w.rects===!0?await d.getElementRects({reference:e,floating:t,strategy:s}):w.rects),{x:h,y:v}=computeCoordsFromPlacement(f,y,m)),S=-1)}return{x:h,y:v,placement:y,strategy:s,middlewareData:x}};async function detectOverflow(e,t){var i;t===void 0&&(t={});const{x:o,y:s,platform:c,rects:d,elements:p,strategy:m}=e,{boundary:f="clippingAncestors",rootBoundary:h="viewport",elementContext:v="floating",altBoundary:y=!1,padding:x=0}=evaluate(t,e),b=getPaddingObject(x),A=p[y?v==="floating"?"reference":"floating":v],C=rectToClientRect(await c.getClippingRect({element:(i=await(c.isElement==null?void 0:c.isElement(A)))==null||i?A:A.contextElement||await(c.getDocumentElement==null?void 0:c.getDocumentElement(p.floating)),boundary:f,rootBoundary:h,strategy:m})),T=v==="floating"?{x:o,y:s,width:d.floating.width,height:d.floating.height}:d.reference,k=await(c.getOffsetParent==null?void 0:c.getOffsetParent(p.floating)),D=await(c.isElement==null?void 0:c.isElement(k))?await(c.getScale==null?void 0:c.getScale(k))||{x:1,y:1}:{x:1,y:1},w=rectToClientRect(c.convertOffsetParentRelativeRectToViewportRelativeRect?await c.convertOffsetParentRelativeRectToViewportRelativeRect({elements:p,rect:T,offsetParent:k,strategy:m}):T);return{top:(C.top-w.top+b.top)/D.y,bottom:(w.bottom-C.bottom+b.bottom)/D.y,left:(C.left-w.left+b.left)/D.x,right:(w.right-C.right+b.right)/D.x}}const arrow$3=e=>({name:"arrow",options:e,async fn(t){const{x:i,y:o,placement:s,rects:c,platform:d,elements:p,middlewareData:m}=t,{element:f,padding:h=0}=evaluate(e,t)||{};if(f==null)return{};const v=getPaddingObject(h),y={x:i,y:o},x=getAlignmentAxis(s),b=getAxisLength(x),S=await d.getDimensions(f),A=x==="y",C=A?"top":"left",T=A?"bottom":"right",k=A?"clientHeight":"clientWidth",D=c.reference[b]+c.reference[x]-y[x]-c.floating[b],w=y[x]-c.reference[x],R=await(d.getOffsetParent==null?void 0:d.getOffsetParent(f));let _=R?R[k]:0;(!_||!await(d.isElement==null?void 0:d.isElement(R)))&&(_=p.floating[k]||c.floating[b]);const M=D/2-w/2,N=_/2-S[b]/2-1,P=min(v[C],N),L=min(v[T],N),I=P,W=_-S[b]-L,ae=_/2-S[b]/2+M,Q=clamp$3(I,ae,W),B=!m.arrow&&getAlignment(s)!=null&&ae!==Q&&c.reference[b]/2-(ae<I?P:L)-S[b]/2<0,q=B?ae<I?ae-I:ae-W:0;return{[x]:y[x]+q,data:{[x]:Q,centerOffset:ae-Q-q,...B&&{alignmentOffset:q}},reset:B}}}),flip$2=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var i,o;const{placement:s,middlewareData:c,rects:d,initialPlacement:p,platform:m,elements:f}=t,{mainAxis:h=!0,crossAxis:v=!0,fallbackPlacements:y,fallbackStrategy:x="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:S=!0,...A}=evaluate(e,t);if((i=c.arrow)!=null&&i.alignmentOffset)return{};const C=getSide(s),T=getSideAxis(p),k=getSide(p)===p,D=await(m.isRTL==null?void 0:m.isRTL(f.floating)),w=y||(k||!S?[getOppositePlacement(p)]:getExpandedPlacements(p)),R=b!=="none";!y&&R&&w.push(...getOppositeAxisPlacements(p,S,b,D));const _=[p,...w],M=await detectOverflow(t,A),N=[];let P=((o=c.flip)==null?void 0:o.overflows)||[];if(h&&N.push(M[C]),v){const Q=getAlignmentSides(s,d,D);N.push(M[Q[0]],M[Q[1]])}if(P=[...P,{placement:s,overflows:N}],!N.every(Q=>Q<=0)){var L,I;const Q=(((L=c.flip)==null?void 0:L.index)||0)+1,B=_[Q];if(B){var W;const K=v==="alignment"?T!==getSideAxis(B):!1,U=((W=P[0])==null?void 0:W.overflows[0])>0;if(!K||U)return{data:{index:Q,overflows:P},reset:{placement:B}}}let q=(I=P.filter(K=>K.overflows[0]<=0).sort((K,U)=>K.overflows[1]-U.overflows[1])[0])==null?void 0:I.placement;if(!q)switch(x){case"bestFit":{var ae;const K=(ae=P.filter(U=>{if(R){const $=getSideAxis(U.placement);return $===T||$==="y"}return!0}).map(U=>[U.placement,U.overflows.filter($=>$>0).reduce(($,Y)=>$+Y,0)]).sort((U,$)=>U[1]-$[1])[0])==null?void 0:ae[0];K&&(q=K);break}case"initialPlacement":q=p;break}if(s!==q)return{reset:{placement:q}}}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:o="referenceHidden",...s}=evaluate(e,t);switch(o){case"referenceHidden":{const c=await detectOverflow(t,{...s,elementContext:"reference"}),d=getSideOffsets(c,i.reference);return{data:{referenceHiddenOffsets:d,referenceHidden:isAnySideFullyClipped(d)}}}case"escaped":{const c=await detectOverflow(t,{...s,altBoundary:!0}),d=getSideOffsets(c,i.floating);return{data:{escapedOffsets:d,escaped:isAnySideFullyClipped(d)}}}default:return{}}}}};function getBoundingRect(e){const t=min(...e.map(c=>c.left)),i=min(...e.map(c=>c.top)),o=max(...e.map(c=>c.right)),s=max(...e.map(c=>c.bottom));return{x:t,y:i,width:o-t,height:s-i}}function getRectsByLine(e){const t=e.slice().sort((s,c)=>s.y-c.y),i=[];let o=null;for(let s=0;s<t.length;s++){const c=t[s];!o||c.y-o.y>o.height/2?i.push([c]):i[i.length-1].push(c),o=c}return i.map(s=>rectToClientRect(getBoundingRect(s)))}const inline$2=function(e){return e===void 0&&(e={}),{name:"inline",options:e,async fn(t){const{placement:i,elements:o,rects:s,platform:c,strategy:d}=t,{padding:p=2,x:m,y:f}=evaluate(e,t),h=Array.from(await(c.getClientRects==null?void 0:c.getClientRects(o.reference))||[]),v=getRectsByLine(h),y=rectToClientRect(getBoundingRect(h)),x=getPaddingObject(p);function b(){if(v.length===2&&v[0].left>v[1].right&&m!=null&&f!=null)return v.find(A=>m>A.left-x.left&&m<A.right+x.right&&f>A.top-x.top&&f<A.bottom+x.bottom)||y;if(v.length>=2){if(getSideAxis(i)==="y"){const P=v[0],L=v[v.length-1],I=getSide(i)==="top",W=P.top,ae=L.bottom,Q=I?P.left:L.left,B=I?P.right:L.right,q=B-Q,K=ae-W;return{top:W,bottom:ae,left:Q,right:B,width:q,height:K,x:Q,y:W}}const A=getSide(i)==="left",C=max(...v.map(P=>P.right)),T=min(...v.map(P=>P.left)),k=v.filter(P=>A?P.left===T:P.right===C),D=k[0].top,w=k[k.length-1].bottom,R=T,_=C,M=_-R,N=w-D;return{top:D,bottom:w,left:R,right:_,width:M,height:N,x:R,y:D}}return y}const S=await c.getElementRects({reference:{getBoundingClientRect:b},floating:o.floating,strategy:d});return s.reference.x!==S.reference.x||s.reference.y!==S.reference.y||s.reference.width!==S.reference.width||s.reference.height!==S.reference.height?{reset:{rects:S}}:{}}}};async function convertValueToCoords(e,t){const{placement:i,platform:o,elements:s}=e,c=await(o.isRTL==null?void 0:o.isRTL(s.floating)),d=getSide(i),p=getAlignment(i),m=getSideAxis(i)==="y",f=["left","top"].includes(d)?-1:1,h=c&&m?-1:1,v=evaluate(t,e);let{mainAxis:y,crossAxis:x,alignmentAxis:b}=typeof v=="number"?{mainAxis:v,crossAxis:0,alignmentAxis:null}:{mainAxis:v.mainAxis||0,crossAxis:v.crossAxis||0,alignmentAxis:v.alignmentAxis};return p&&typeof b=="number"&&(x=p==="end"?b*-1:b),m?{x:x*h,y:y*f}:{x:y*f,y:x*h}}const offset$2=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var i,o;const{x:s,y:c,placement:d,middlewareData:p}=t,m=await convertValueToCoords(t,e);return d===((i=p.offset)==null?void 0:i.placement)&&(o=p.arrow)!=null&&o.alignmentOffset?{}:{x:s+m.x,y:c+m.y,data:{...m,placement:d}}}}},shift$2=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:i,y:o,placement:s}=t,{mainAxis:c=!0,crossAxis:d=!1,limiter:p={fn:A=>{let{x:C,y:T}=A;return{x:C,y:T}}},...m}=evaluate(e,t),f={x:i,y:o},h=await detectOverflow(t,m),v=getSideAxis(getSide(s)),y=getOppositeAxis(v);let x=f[y],b=f[v];if(c){const A=y==="y"?"top":"left",C=y==="y"?"bottom":"right",T=x+h[A],k=x-h[C];x=clamp$3(T,x,k)}if(d){const A=v==="y"?"top":"left",C=v==="y"?"bottom":"right",T=b+h[A],k=b-h[C];b=clamp$3(T,b,k)}const S=p.fn({...t,[y]:x,[v]:b});return{...S,data:{x:S.x-i,y:S.y-o,enabled:{[y]:c,[v]:d}}}}}},limitShift$2=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:i,y:o,placement:s,rects:c,middlewareData:d}=t,{offset:p=0,mainAxis:m=!0,crossAxis:f=!0}=evaluate(e,t),h={x:i,y:o},v=getSideAxis(s),y=getOppositeAxis(v);let x=h[y],b=h[v];const S=evaluate(p,t),A=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(m){const k=y==="y"?"height":"width",D=c.reference[y]-c.floating[k]+A.mainAxis,w=c.reference[y]+c.reference[k]-A.mainAxis;x<D?x=D:x>w&&(x=w)}if(f){var C,T;const k=y==="y"?"width":"height",D=["top","left"].includes(getSide(s)),w=c.reference[v]-c.floating[k]+(D&&((C=d.offset)==null?void 0:C[v])||0)+(D?0:A.crossAxis),R=c.reference[v]+c.reference[k]+(D?0:((T=d.offset)==null?void 0:T[v])||0)-(D?A.crossAxis:0);b<w?b=w:b>R&&(b=R)}return{[y]:x,[v]:b}}}},size$2=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var i,o;const{placement:s,rects:c,platform:d,elements:p}=t,{apply:m=()=>{},...f}=evaluate(e,t),h=await detectOverflow(t,f),v=getSide(s),y=getAlignment(s),x=getSideAxis(s)==="y",{width:b,height:S}=c.floating;let A,C;v==="top"||v==="bottom"?(A=v,C=y===(await(d.isRTL==null?void 0:d.isRTL(p.floating))?"start":"end")?"left":"right"):(C=v,A=y==="end"?"top":"bottom");const T=S-h.top-h.bottom,k=b-h.left-h.right,D=min(S-h[A],T),w=min(b-h[C],k),R=!t.middlewareData.shift;let _=D,M=w;if((i=t.middlewareData.shift)!=null&&i.enabled.x&&(M=k),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(_=T),R&&!y){const P=max(h.left,0),L=max(h.right,0),I=max(h.top,0),W=max(h.bottom,0);x?M=b-2*(P!==0||L!==0?P+L:max(h.left,h.right)):_=S-2*(I!==0||W!==0?I+W:max(h.top,h.bottom))}await m({...t,availableWidth:M,availableHeight:_});const N=await d.getDimensions(p.floating);return b!==N.width||S!==N.height?{reset:{rects:!0}}:{}}}};function getCssDimensions(e){const t=getComputedStyle$1(e);let i=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const s=isHTMLElement(e),c=s?e.offsetWidth:i,d=s?e.offsetHeight:o,p=round$1(i)!==c||round$1(o)!==d;return p&&(i=c,o=d),{width:i,height:o,$:p}}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:o,height:s,$:c}=getCssDimensions(t);let d=(c?round$1(i.width):i.width)/o,p=(c?round$1(i.height):i.height)/s;return(!d||!Number.isFinite(d))&&(d=1),(!p||!Number.isFinite(p))&&(p=1),{x:d,y:p}}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,o){t===void 0&&(t=!1),i===void 0&&(i=!1);const s=e.getBoundingClientRect(),c=unwrapElement(e);let d=createCoords(1);t&&(o?isElement(o)&&(d=getScale(o)):d=getScale(e));const p=shouldAddVisualOffsets(c,i,o)?getVisualOffsets(c):createCoords(0);let m=(s.left+p.x)/d.x,f=(s.top+p.y)/d.y,h=s.width/d.x,v=s.height/d.y;if(c){const y=getWindow(c),x=o&&isElement(o)?getWindow(o):o;let b=y,S=getFrameElement(b);for(;S&&o&&x!==b;){const A=getScale(S),C=S.getBoundingClientRect(),T=getComputedStyle$1(S),k=C.left+(S.clientLeft+parseFloat(T.paddingLeft))*A.x,D=C.top+(S.clientTop+parseFloat(T.paddingTop))*A.y;m*=A.x,f*=A.y,h*=A.x,v*=A.y,m+=k,f+=D,b=getWindow(S),S=getFrameElement(b)}}return rectToClientRect({width:h,height:v,x:m,y:f})}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 o=e.getBoundingClientRect(),s=o.left+t.scrollLeft-(i?0:getWindowScrollBarX(e,o)),c=o.top+t.scrollTop;return{x:s,y:c}}function convertOffsetParentRelativeRectToViewportRelativeRect(e){let{elements:t,rect:i,offsetParent:o,strategy:s}=e;const c=s==="fixed",d=getDocumentElement(o),p=t?isTopLayer(t.floating):!1;if(o===d||p&&c)return i;let m={scrollLeft:0,scrollTop:0},f=createCoords(1);const h=createCoords(0),v=isHTMLElement(o);if((v||!v&&!c)&&((getNodeName(o)!=="body"||isOverflowElement(d))&&(m=getNodeScroll(o)),isHTMLElement(o))){const x=getBoundingClientRect(o);f=getScale(o),h.x=x.x+o.clientLeft,h.y=x.y+o.clientTop}const y=d&&!v&&!c?getHTMLOffset(d,m,!0):createCoords(0);return{width:i.width*f.x,height:i.height*f.y,x:i.x*f.x-m.scrollLeft*f.x+h.x+y.x,y:i.y*f.y-m.scrollTop*f.y+h.y+y.y}}function getClientRects(e){return Array.from(e.getClientRects())}function getDocumentRect(e){const t=getDocumentElement(e),i=getNodeScroll(e),o=e.ownerDocument.body,s=max(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),c=max(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let d=-i.scrollLeft+getWindowScrollBarX(e);const p=-i.scrollTop;return getComputedStyle$1(o).direction==="rtl"&&(d+=max(t.clientWidth,o.clientWidth)-s),{width:s,height:c,x:d,y:p}}function getViewportRect(e,t){const i=getWindow(e),o=getDocumentElement(e),s=i.visualViewport;let c=o.clientWidth,d=o.clientHeight,p=0,m=0;if(s){c=s.width,d=s.height;const f=isWebKit();(!f||f&&t==="fixed")&&(p=s.offsetLeft,m=s.offsetTop)}return{width:c,height:d,x:p,y:m}}function getInnerBoundingClientRect(e,t){const i=getBoundingClientRect(e,!0,t==="fixed"),o=i.top+e.clientTop,s=i.left+e.clientLeft,c=isHTMLElement(e)?getScale(e):createCoords(1),d=e.clientWidth*c.x,p=e.clientHeight*c.y,m=s*c.x,f=o*c.y;return{width:d,height:p,x:m,y:f}}function getClientRectFromClippingAncestor(e,t,i){let o;if(t==="viewport")o=getViewportRect(e,i);else if(t==="document")o=getDocumentRect(getDocumentElement(e));else if(isElement(t))o=getInnerBoundingClientRect(t,i);else{const s=getVisualOffsets(e);o={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return rectToClientRect(o)}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 o=getOverflowAncestors(e,[],!1).filter(p=>isElement(p)&&getNodeName(p)!=="body"),s=null;const c=getComputedStyle$1(e).position==="fixed";let d=c?getParentNode(e):e;for(;isElement(d)&&!isLastTraversableNode(d);){const p=getComputedStyle$1(d),m=isContainingBlock(d);!m&&p.position==="fixed"&&(s=null),(c?!m&&!s:!m&&p.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||isOverflowElement(d)&&!m&&hasFixedPositionAncestor(e,d))?o=o.filter(h=>h!==d):s=p,d=getParentNode(d)}return t.set(e,o),o}function getClippingRect(e){let{element:t,boundary:i,rootBoundary:o,strategy:s}=e;const d=[...i==="clippingAncestors"?isTopLayer(t)?[]:getClippingElementAncestors(t,this._c):[].concat(i),o],p=d[0],m=d.reduce((f,h)=>{const v=getClientRectFromClippingAncestor(t,h,s);return f.top=max(v.top,f.top),f.right=min(v.right,f.right),f.bottom=min(v.bottom,f.bottom),f.left=max(v.left,f.left),f},getClientRectFromClippingAncestor(t,p,s));return{width:m.right-m.left,height:m.bottom-m.top,x:m.left,y:m.top}}function getDimensions(e){const{width:t,height:i}=getCssDimensions(e);return{width:t,height:i}}function getRectRelativeToOffsetParent(e,t,i){const o=isHTMLElement(t),s=getDocumentElement(t),c=i==="fixed",d=getBoundingClientRect(e,!0,c,t);let p={scrollLeft:0,scrollTop:0};const m=createCoords(0);function f(){m.x=getWindowScrollBarX(s)}if(o||!o&&!c)if((getNodeName(t)!=="body"||isOverflowElement(s))&&(p=getNodeScroll(t)),o){const x=getBoundingClientRect(t,!0,c,t);m.x=x.x+t.clientLeft,m.y=x.y+t.clientTop}else s&&f();c&&!o&&s&&f();const h=s&&!o&&!c?getHTMLOffset(s,p):createCoords(0),v=d.left+p.scrollLeft-m.x-h.x,y=d.top+p.scrollTop-m.y-h.y;return{x:v,y,width:d.width,height:d.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 s=getParentNode(e);for(;s&&!isLastTraversableNode(s);){if(isElement(s)&&!isStaticPositioned(s))return s;s=getParentNode(s)}return i}let o=getTrueOffsetParent(e,t);for(;o&&isTableElement(o)&&isStaticPositioned(o);)o=getTrueOffsetParent(o,t);return o&&isLastTraversableNode(o)&&isStaticPositioned(o)&&!isContainingBlock(o)?i:o||getContainingBlock(e)||i}const getElementRects=async function(e){const t=this.getOffsetParent||getOffsetParent,i=this.getDimensions,o=await i(e.floating);return{reference:getRectRelativeToOffsetParent(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.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,o;const s=getDocumentElement(e);function c(){var p;clearTimeout(o),(p=i)==null||p.disconnect(),i=null}function d(p,m){p===void 0&&(p=!1),m===void 0&&(m=1),c();const f=e.getBoundingClientRect(),{left:h,top:v,width:y,height:x}=f;if(p||t(),!y||!x)return;const b=floor(v),S=floor(s.clientWidth-(h+y)),A=floor(s.clientHeight-(v+x)),C=floor(h),k={rootMargin:-b+"px "+-S+"px "+-A+"px "+-C+"px",threshold:max(0,min(1,m))||1};let D=!0;function w(R){const _=R[0].intersectionRatio;if(_!==m){if(!D)return d();_?d(!1,_):o=setTimeout(()=>{d(!1,1e-7)},1e3)}_===1&&!rectsAreEqual(f,e.getBoundingClientRect())&&d(),D=!1}try{i=new IntersectionObserver(w,{...k,root:s.ownerDocument})}catch{i=new IntersectionObserver(w,k)}i.observe(e)}return d(!0),c}function autoUpdate(e,t,i,o){o===void 0&&(o={});const{ancestorScroll:s=!0,ancestorResize:c=!0,elementResize:d=typeof ResizeObserver=="function",layoutShift:p=typeof IntersectionObserver=="function",animationFrame:m=!1}=o,f=unwrapElement(e),h=s||c?[...f?getOverflowAncestors(f):[],...getOverflowAncestors(t)]:[];h.forEach(C=>{s&&C.addEventListener("scroll",i,{passive:!0}),c&&C.addEventListener("resize",i)});const v=f&&p?observeMove(f,i):null;let y=-1,x=null;d&&(x=new ResizeObserver(C=>{let[T]=C;T&&T.target===f&&x&&(x.unobserve(t),cancelAnimationFrame(y),y=requestAnimationFrame(()=>{var k;(k=x)==null||k.observe(t)})),i()}),f&&!m&&x.observe(f),x.observe(t));let b,S=m?getBoundingClientRect(e):null;m&&A();function A(){const C=getBoundingClientRect(e);S&&!rectsAreEqual(S,C)&&i(),S=C,b=requestAnimationFrame(A)}return i(),()=>{var C;h.forEach(T=>{s&&T.removeEventListener("scroll",i),c&&T.removeEventListener("resize",i)}),v==null||v(),(C=x)==null||C.disconnect(),x=null,m&&cancelAnimationFrame(b)}}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 o=new Map,s={platform:platform$2,...i},c={...s.platform,_c:o};return computePosition$1(e,t,{...s,platform:c})};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,o,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(i=e.length,i!==t.length)return!1;for(o=i;o--!==0;)if(!deepEqual(e[o],t[o]))return!1;return!0}if(s=Object.keys(e),i=s.length,i!==Object.keys(t).length)return!1;for(o=i;o--!==0;)if(!{}.hasOwnProperty.call(t,s[o]))return!1;for(o=i;o--!==0;){const c=s[o];if(!(c==="_owner"&&e.$$typeof)&&!deepEqual(e[c],t[c]))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:o=[],platform:s,elements:{reference:c,floating:d}={},transform:p=!0,whileElementsMounted:m,open:f}=e,[h,v]=reactExports.useState({x:0,y:0,strategy:i,placement:t,middlewareData:{},isPositioned:!1}),[y,x]=reactExports.useState(o);deepEqual(y,o)||x(o);const[b,S]=reactExports.useState(null),[A,C]=reactExports.useState(null),T=reactExports.useCallback(K=>{K!==R.current&&(R.current=K,S(K))},[]),k=reactExports.useCallback(K=>{K!==_.current&&(_.current=K,C(K))},[]),D=c||b,w=d||A,R=reactExports.useRef(null),_=reactExports.useRef(null),M=reactExports.useRef(h),N=m!=null,P=useLatestRef$1(m),L=useLatestRef$1(s),I=useLatestRef$1(f),W=reactExports.useCallback(()=>{if(!R.current||!_.current)return;const K={placement:t,strategy:i,middleware:y};L.current&&(K.platform=L.current),computePosition(R.current,_.current,K).then(U=>{const $={...U,isPositioned:I.current!==!1};ae.current&&!deepEqual(M.current,$)&&(M.current=$,reactDomExports.flushSync(()=>{v($)}))})},[y,t,i,L,I]);index$1(()=>{f===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,v(K=>({...K,isPositioned:!1})))},[f]);const ae=reactExports.useRef(!1);index$1(()=>(ae.current=!0,()=>{ae.current=!1}),[]),index$1(()=>{if(D&&(R.current=D),w&&(_.current=w),D&&w){if(P.current)return P.current(D,w,W);W()}},[D,w,W,P,N]);const Q=reactExports.useMemo(()=>({reference:R,floating:_,setReference:T,setFloating:k}),[T,k]),B=reactExports.useMemo(()=>({reference:D,floating:w}),[D,w]),q=reactExports.useMemo(()=>{const K={position:i,left:0,top:0};if(!B.floating)return K;const U=roundByDPR(B.floating,h.x),$=roundByDPR(B.floating,h.y);return p?{...K,transform:"translate("+U+"px, "+$+"px)",...getDPR(B.floating)>=1.5&&{willChange:"transform"}}:{position:i,left:U,top:$}},[i,p,B.floating,h.x,h.y]);return reactExports.useMemo(()=>({...h,update:W,refs:Q,elements:B,floatingStyles:q}),[h,W,Q,B,q])}const arrow$1=e=>{function t(i){return{}.hasOwnProperty.call(i,"current")}return{name:"arrow",options:e,fn(i){const{element:o,padding:s}=typeof e=="function"?e(i):e;return o&&t(o)?o.current!=null?arrow$2({element:o.current,padding:s}).fn(i):{}:o?arrow$2({element:o,padding:s}).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,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return t.current==null?void 0:t.current(...o)},[])}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 o;(o=e.get(t))==null||o.forEach(s=>s(i))},on(t,i){e.set(t,[...e.get(t)||[],i])},off(t,i){var o;e.set(t,((o=e.get(t))==null?void 0:o.filter(s=>s!==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:o,dataRef:s,events:c,elements:d}=e,{enabled:p=!0,delay:m=0,handleClose:f=null,mouseOnly:h=!1,restMs:v=0,move:y=!0}=t,x=useFloatingTree(),b=useFloatingParentNodeId(),S=useLatestRef(f),A=useLatestRef(m),C=useLatestRef(i),T=reactExports.useRef(),k=reactExports.useRef(-1),D=reactExports.useRef(),w=reactExports.useRef(-1),R=reactExports.useRef(!0),_=reactExports.useRef(!1),M=reactExports.useRef(()=>{}),N=reactExports.useRef(!1),P=reactExports.useCallback(()=>{var q;const K=(q=s.current.openEvent)==null?void 0:q.type;return(K==null?void 0:K.includes("mouse"))&&K!=="mousedown"},[s]);reactExports.useEffect(()=>{if(!p)return;function q(K){let{open:U}=K;U||(clearTimeout(k.current),clearTimeout(w.current),R.current=!0,N.current=!1)}return c.on("openchange",q),()=>{c.off("openchange",q)}},[p,c]),reactExports.useEffect(()=>{if(!p||!S.current||!i)return;function q(U){P()&&o(!1,U,"hover")}const K=getDocument$1(d.floating).documentElement;return K.addEventListener("mouseleave",q),()=>{K.removeEventListener("mouseleave",q)}},[d.floating,i,o,p,S,P]);const L=reactExports.useCallback(function(q,K,U){K===void 0&&(K=!0),U===void 0&&(U="hover");const $=getDelay(A.current,"close",T.current);$&&!D.current?(clearTimeout(k.current),k.current=window.setTimeout(()=>o(!1,q,U),$)):K&&(clearTimeout(k.current),o(!1,q,U))},[A,o]),I=useEffectEvent(()=>{M.current(),D.current=void 0}),W=useEffectEvent(()=>{if(_.current){const q=getDocument$1(d.floating).body;q.style.pointerEvents="",q.removeAttribute(safePolygonIdentifier),_.current=!1}}),ae=useEffectEvent(()=>s.current.openEvent?["click","mousedown"].includes(s.current.openEvent.type):!1);reactExports.useEffect(()=>{if(!p)return;function q(Y){if(clearTimeout(k.current),R.current=!1,h&&!isMouseLikePointerType(T.current)||v>0&&!getDelay(A.current,"open"))return;const z=getDelay(A.current,"open",T.current);z?k.current=window.setTimeout(()=>{C.current||o(!0,Y,"hover")},z):i||o(!0,Y,"hover")}function K(Y){if(ae())return;M.current();const z=getDocument$1(d.floating);if(clearTimeout(w.current),N.current=!1,S.current&&s.current.floatingContext){i||clearTimeout(k.current),D.current=S.current({...s.current.floatingContext,tree:x,x:Y.clientX,y:Y.clientY,onClose(){W(),I(),ae()||L(Y,!0,"safe-polygon")}});const F=D.current;z.addEventListener("mousemove",F),M.current=()=>{z.removeEventListener("mousemove",F)};return}(T.current==="touch"?!contains(d.floating,Y.relatedTarget):!0)&&L(Y)}function U(Y){ae()||s.current.floatingContext&&(S.current==null||S.current({...s.current.floatingContext,tree:x,x:Y.clientX,y:Y.clientY,onClose(){W(),I(),ae()||L(Y)}})(Y))}if(isElement(d.domReference)){var $;const Y=d.domReference;return i&&Y.addEventListener("mouseleave",U),($=d.floating)==null||$.addEventListener("mouseleave",U),y&&Y.addEventListener("mousemove",q,{once:!0}),Y.addEventListener("mouseenter",q),Y.addEventListener("mouseleave",K),()=>{var z;i&&Y.removeEventListener("mouseleave",U),(z=d.floating)==null||z.removeEventListener("mouseleave",U),y&&Y.removeEventListener("mousemove",q),Y.removeEventListener("mouseenter",q),Y.removeEventListener("mouseleave",K)}}},[d,p,e,h,v,y,L,I,W,o,i,C,x,A,S,s,ae]),index(()=>{var q;if(p&&i&&(q=S.current)!=null&&q.__options.blockPointerEvents&&P()){_.current=!0;const U=d.floating;if(isElement(d.domReference)&&U){var K;const $=getDocument$1(d.floating).body;$.setAttribute(safePolygonIdentifier,"");const Y=d.domReference,z=x==null||(K=x.nodesRef.current.find(O=>O.id===b))==null||(K=K.context)==null?void 0:K.elements.floating;return z&&(z.style.pointerEvents=""),$.style.pointerEvents="none",Y.style.pointerEvents="auto",U.style.pointerEvents="auto",()=>{$.style.pointerEvents="",Y.style.pointerEvents="",U.style.pointerEvents=""}}}},[p,i,b,d,x,S,P]),index(()=>{i||(T.current=void 0,N.current=!1,I(),W())},[i,I,W]),reactExports.useEffect(()=>()=>{I(),clearTimeout(k.current),clearTimeout(w.current),W()},[p,d.domReference,I,W]);const Q=reactExports.useMemo(()=>{function q(K){T.current=K.pointerType}return{onPointerDown:q,onPointerEnter:q,onMouseMove(K){const{nativeEvent:U}=K;function $(){!R.current&&!C.current&&o(!0,U,"hover")}h&&!isMouseLikePointerType(T.current)||i||v===0||N.current&&K.movementX**2+K.movementY**2<2||(clearTimeout(w.current),T.current==="touch"?$():(N.current=!0,w.current=window.setTimeout($,v)))}}},[h,o,i,C,v]),B=reactExports.useMemo(()=>({onMouseEnter(){clearTimeout(k.current)},onMouseLeave(q){ae()||L(q.nativeEvent,!1)}}),[L,ae]);return reactExports.useMemo(()=>p?{reference:Q,floating:B}:{},[p,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:o=0}=e,[s,c]=reactExports.useReducer((m,f)=>({...m,...f}),{delay:i,timeoutMs:o,initialDelay:i,currentId:null,isInstantPhase:!1}),d=reactExports.useRef(null),p=reactExports.useCallback(m=>{c({currentId:m})},[]);return index(()=>{s.currentId?d.current===null?d.current=s.currentId:s.isInstantPhase||c({isInstantPhase:!0}):(s.isInstantPhase&&c({isInstantPhase:!1}),d.current=null)},[s.currentId,s.isInstantPhase]),reactExports.createElement(FloatingDelayGroupContext.Provider,{value:reactExports.useMemo(()=>({...s,setState:c,setCurrentId:p}),[s,p])},t)}function useDelayGroup(e,t){t===void 0&&(t={});const{open:i,onOpenChange:o,floatingId:s}=e,{id:c,enabled:d=!0}=t,p=c??s,m=useDelayGroupContext(),{currentId:f,setCurrentId:h,initialDelay:v,setState:y,timeoutMs:x}=m;return index(()=>{d&&f&&(y({delay:{open:1,close:getDelay(v,"close")}}),f!==p&&o(!1))},[d,p,o,y,f,v]),index(()=>{function b(){o(!1),y({delay:v,currentId:null})}if(d&&f&&!i&&f===p){if(x){const S=window.setTimeout(b,x);return()=>{clearTimeout(S)}}b()}},[d,i,y,f,p,o,v,x]),index(()=>{d&&(h===NOOP||!i||h(p))},[d,i,h,p]),m}function getChildren(e,t){let i=e.filter(s=>{var c;return s.parentId===t&&((c=s.context)==null?void 0:c.open)}),o=i;for(;o.length;)o=e.filter(s=>{var c;return(c=o)==null?void 0:c.some(d=>{var p;return s.parentId===d.id&&((p=s.context)==null?void 0:p.open)})}),i=i.concat(o);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:o,elements:s,dataRef:c}=e,{enabled:d=!0,escapeKey:p=!0,outsidePress:m=!0,outsidePressEvent:f="pointerdown",referencePress:h=!1,referencePressEvent:v="pointerdown",ancestorScroll:y=!1,bubbles:x,capture:b}=t,S=useFloatingTree(),A=useEffectEvent(typeof m=="function"?m:()=>!1),C=typeof m=="function"?A:m,T=reactExports.useRef(!1),k=reactExports.useRef(!1),{escapeKey:D,outsidePress:w}=normalizeProp(x),{escapeKey:R,outsidePress:_}=normalizeProp(b),M=reactExports.useRef(!1),N=useEffectEvent(Q=>{var B;if(!i||!d||!p||Q.key!=="Escape"||M.current)return;const q=(B=c.current.floatingContext)==null?void 0:B.nodeId,K=S?getChildren(S.nodesRef.current,q):[];if(!D&&(Q.stopPropagation(),K.length>0)){let U=!0;if(K.forEach($=>{var Y;if((Y=$.context)!=null&&Y.open&&!$.context.dataRef.current.__escapeKeyBubbles){U=!1;return}}),!U)return}o(!1,isReactEvent(Q)?Q.nativeEvent:Q,"escape-key")}),P=useEffectEvent(Q=>{var B;const q=()=>{var K;N(Q),(K=getTarget(Q))==null||K.removeEventListener("keydown",q)};(B=getTarget(Q))==null||B.addEventListener("keydown",q)}),L=useEffectEvent(Q=>{var B;const q=T.current;T.current=!1;const K=k.current;if(k.current=!1,f==="click"&&K||q||typeof C=="function"&&!C(Q))return;const U=getTarget(Q),$="["+createAttribute("inert")+"]",Y=getDocument$1(s.floating).querySelectorAll($);let z=isElement(U)?U:null;for(;z&&!isLastTraversableNode(z);){const X=getParentNode(z);if(isLastTraversableNode(X)||!isElement(X))break;z=X}if(Y.length&&isElement(U)&&!isRootElement(U)&&!contains(U,s.floating)&&Array.from(Y).every(X=>!contains(z,X)))return;if(isHTMLElement(U)&&ae){const X=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||X&&Q.offsetY>U.clientHeight)return}const O=(B=c.current.floatingContext)==null?void 0:B.nodeId,F=S&&getChildren(S.nodesRef.current,O).some(X=>{var te;return isEventTargetWithin(Q,(te=X.context)==null?void 0:te.elements.floating)});if(isEventTargetWithin(Q,s.floating)||isEventTargetWithin(Q,s.domReference)||F)return;const H=S?getChildren(S.nodesRef.current,O):[];if(H.length>0){let X=!0;if(H.forEach(te=>{var J;if((J=te.context)!=null&&J.open&&!te.context.dataRef.current.__outsidePressBubbles){X=!1;return}}),!X)return}o(!1,Q,"outside-press")}),I=useEffectEvent(Q=>{var B;const q=()=>{var K;L(Q),(K=getTarget(Q))==null||K.removeEventListener(f,q)};(B=getTarget(Q))==null||B.addEventListener(f,q)});reactExports.useEffect(()=>{if(!i||!d)return;c.current.__escapeKeyBubbles=D,c.current.__outsidePressBubbles=w;let Q=-1;function B(Y){o(!1,Y,"ancestor-scroll")}function q(){window.clearTimeout(Q),M.current=!0}function K(){Q=window.setTimeout(()=>{M.current=!1},isWebKit()?5:0)}const U=getDocument$1(s.floating);p&&(U.addEventListener("keydown",R?P:N,R),U.addEventListener("compositionstart",q),U.addEventListener("compositionend",K)),C&&U.addEventListener(f,_?I:L,_);let $=[];return y&&(isElement(s.domReference)&&($=getOverflowAncestors(s.domReference)),isElement(s.floating)&&($=$.concat(getOverflowAncestors(s.floating))),!isElement(s.reference)&&s.reference&&s.reference.contextElement&&($=$.concat(getOverflowAncestors(s.reference.contextElement)))),$=$.filter(Y=>{var z;return Y!==((z=U.defaultView)==null?void 0:z.visualViewport)}),$.forEach(Y=>{Y.addEventListener("scroll",B,{passive:!0})}),()=>{p&&(U.removeEventListener("keydown",R?P:N,R),U.removeEventListener("compositionstart",q),U.removeEventListener("compositionend",K)),C&&U.removeEventListener(f,_?I:L,_),$.forEach(Y=>{Y.removeEventListener("scroll",B)}),window.clearTimeout(Q)}},[c,s,p,C,f,i,o,y,d,D,w,N,R,P,L,_,I]),reactExports.useEffect(()=>{T.current=!1},[C,f]);const W=reactExports.useMemo(()=>({onKeyDown:N,[bubbleHandlerKeys[v]]:Q=>{h&&o(!1,Q.nativeEvent,"reference-press")}}),[N,o,h,v]),ae=reactExports.useMemo(()=>({onKeyDown:N,onMouseDown(){k.current=!0},onMouseUp(){k.current=!0},[captureHandlerKeys[f]]:()=>{T.current=!0}}),[N,f]);return reactExports.useMemo(()=>d?{reference:W,floating:ae}:{},[d,W,ae])}function useFloatingRootContext(e){const{open:t=!1,onOpenChange:i,elements:o}=e,s=useId(),c=reactExports.useRef({}),[d]=reactExports.useState(()=>createPubSub()),p=useFloatingParentNodeId()!=null,[m,f]=reactExports.useState(o.reference),h=useEffectEvent((x,b,S)=>{c.current.openEvent=x?b:void 0,d.emit("openchange",{open:x,event:b,reason:S,nested:p}),i==null||i(x,b,S)}),v=reactExports.useMemo(()=>({setPositionReference:f}),[]),y=reactExports.useMemo(()=>({reference:m||o.reference||null,floating:o.floating||null,domReference:o.reference}),[m,o.reference,o.floating]);return reactExports.useMemo(()=>({dataRef:c,open:t,onOpenChange:h,elements:y,events:d,floatingId:s,refs:v}),[t,h,y,d,s,v])}function useFloating(e){e===void 0&&(e={});const{nodeId:t}=e,i=useFloatingRootContext({...e,elements:{reference:null,floating:null,...e.elements}}),o=e.rootContext||i,s=o.elements,[c,d]=reactExports.useState(null),[p,m]=reactExports.useState(null),h=(s==null?void 0:s.domReference)||c,v=reactExports.useRef(null),y=useFloatingTree();index(()=>{h&&(v.current=h)},[h]);const x=useFloating$1({...e,elements:{...s,...p&&{reference:p}}}),b=reactExports.useCallback(k=>{const D=isElement(k)?{getBoundingClientRect:()=>k.getBoundingClientRect(),contextElement:k}:k;m(D),x.refs.setReference(D)},[x.refs]),S=reactExports.useCallback(k=>{(isElement(k)||k===null)&&(v.current=k,d(k)),(isElement(x.refs.reference.current)||x.refs.reference.current===null||k!==null&&!isElement(k))&&x.refs.setReference(k)},[x.refs]),A=reactExports.useMemo(()=>({...x.refs,setReference:S,setPositionReference:b,domReference:v}),[x.refs,S,b]),C=reactExports.useMemo(()=>({...x.elements,domReference:h}),[x.elements,h]),T=reactExports.useMemo(()=>({...x,...o,refs:A,elements:C,nodeId:t}),[x,A,C,t,o]);return index(()=>{o.dataRef.current.floatingContext=T;const k=y==null?void 0:y.nodesRef.current.find(D=>D.id===t);k&&(k.context=T)}),reactExports.useMemo(()=>({...x,context:T,refs:A,elements:C}),[x,A,C,T])}function useFocus(e,t){t===void 0&&(t={});const{open:i,onOpenChange:o,events:s,dataRef:c,elements:d}=e,{enabled:p=!0,visibleOnly:m=!0}=t,f=reactExports.useRef(!1),h=reactExports.useRef(),v=reactExports.useRef(!0);reactExports.useEffect(()=>{if(!p)return;const x=getWindow(d.domReference);function b(){!i&&isHTMLElement(d.domReference)&&d.domReference===activeElement(getDocument$1(d.domReference))&&(f.current=!0)}function S(){v.current=!0}return x.addEventListener("blur",b),x.addEventListener("keydown",S,!0),()=>{x.removeEventListener("blur",b),x.removeEventListener("keydown",S,!0)}},[d.domReference,i,p]),reactExports.useEffect(()=>{if(!p)return;function x(b){let{reason:S}=b;(S==="reference-press"||S==="escape-key")&&(f.current=!0)}return s.on("openchange",x),()=>{s.off("openchange",x)}},[s,p]),reactExports.useEffect(()=>()=>{clearTimeout(h.current)},[]);const y=reactExports.useMemo(()=>({onPointerDown(x){isVirtualPointerEvent(x.nativeEvent)||(v.current=!1)},onMouseLeave(){f.current=!1},onFocus(x){if(f.current)return;const b=getTarget(x.nativeEvent);if(m&&isElement(b))try{if(isSafari()&&isMac())throw Error();if(!b.matches(":focus-visible"))return}catch{if(!v.current&&!isTypeableElement(b))return}o(!0,x.nativeEvent,"focus")},onBlur(x){f.current=!1;const b=x.relatedTarget,S=x.nativeEvent,A=isElement(b)&&b.hasAttribute(createAttribute("focus-guard"))&&b.getAttribute("data-type")==="outside";h.current=window.setTimeout(()=>{var C;const T=activeElement(d.domReference?d.domReference.ownerDocument:document);!b&&T===d.domReference||contains((C=c.current.floatingContext)==null?void 0:C.refs.floating.current,T)||contains(d.domReference,T)||A||o(!1,S,"focus")})}}),[c,d.domReference,o,m]);return reactExports.useMemo(()=>p?{reference:y}:{},[p,y])}const ACTIVE_KEY="active",SELECTED_KEY="selected";function mergeProps(e,t,i){const o=new Map,s=i==="item";let c=e;if(s&&e){const{[ACTIVE_KEY]:d,[SELECTED_KEY]:p,...m}=e;c=m}return{...i==="floating"&&{tabIndex:-1,[FOCUSABLE_ATTRIBUTE]:""},...c,...t.map(d=>{const p=d?d[i]:null;return typeof p=="function"?e?p(e):null:p}).concat(e).reduce((d,p)=>(p&&Object.entries(p).forEach(m=>{let[f,h]=m;if(!(s&&[ACTIVE_KEY,SELECTED_KEY].includes(f)))if(f.indexOf("on")===0){if(o.has(f)||o.set(f,[]),typeof h=="function"){var v;(v=o.get(f))==null||v.push(h),d[f]=function(){for(var y,x=arguments.length,b=new Array(x),S=0;S<x;S++)b[S]=arguments[S];return(y=o.get(f))==null?void 0:y.map(A=>A(...b)).find(A=>A!==void 0)}}}else d[f]=h}),d),{})}}function useInteractions(e){e===void 0&&(e=[]);const t=e.map(p=>p==null?void 0:p.reference),i=e.map(p=>p==null?void 0:p.floating),o=e.map(p=>p==null?void 0:p.item),s=reactExports.useCallback(p=>mergeProps(p,e,"reference"),t),c=reactExports.useCallback(p=>mergeProps(p,e,"floating"),i),d=reactExports.useCallback(p=>mergeProps(p,e,"item"),o);return reactExports.useMemo(()=>({getReferenceProps:s,getFloatingProps:c,getItemProps:d}),[s,c,d])}const componentRoleToAriaRoleMap=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function useRole(e,t){var i;t===void 0&&(t={});const{open:o,floatingId:s}=e,{enabled:c=!0,role:d="dialog"}=t,p=(i=componentRoleToAriaRoleMap.get(d))!=null?i:d,m=useId(),h=useFloatingParentNodeId()!=null,v=reactExports.useMemo(()=>p==="tooltip"||d==="label"?{["aria-"+(d==="label"?"labelledby":"describedby")]:o?s:void 0}:{"aria-expanded":o?"true":"false","aria-haspopup":p==="alertdialog"?"dialog":p,"aria-controls":o?s:void 0,...p==="listbox"&&{role:"combobox"},...p==="menu"&&{id:m},...p==="menu"&&h&&{role:"menuitem"},...d==="select"&&{"aria-autocomplete":"none"},...d==="combobox"&&{"aria-autocomplete":"list"}},[p,s,h,o,m,d]),y=reactExports.useMemo(()=>{const b={id:s,...p&&{role:p}};return p==="tooltip"||d==="label"?b:{...b,...p==="menu"&&{"aria-labelledby":m}}},[p,s,m,d]),x=reactExports.useCallback(b=>{let{active:S,selected:A}=b;const C={role:"option",...S&&{id:s+"-option"}};switch(d){case"select":return{...C,"aria-selected":S&&A};case"combobox":return{...C,...S&&{"aria-selected":!0}}}return{}},[s,d]);return reactExports.useMemo(()=>c?{reference:v,floating:y,item:x}:{},[c,v,y,x])}const[ScrollAreaProvider,useScrollAreaContext]=createSafeContext("ScrollArea.Root component was not found in tree");function useResizeObserver(e,t){const i=useCallbackRef(t);useIsomorphicEffect(()=>{let o=0;if(e){const s=new ResizeObserver(()=>{cancelAnimationFrame(o),o=window.requestAnimationFrame(i)});return s.observe(e),()=>{window.cancelAnimationFrame(o),s.unobserve(e)}}},[e,i])}const Corner=reactExports.forwardRef((e,t)=>{const{style:i,...o}=e,s=useScrollAreaContext(),[c,d]=reactExports.useState(0),[p,m]=reactExports.useState(0),f=!!(c&&p);return useResizeObserver(s.scrollbarX,()=>{var v;const h=((v=s.scrollbarX)==null?void 0:v.offsetHeight)||0;s.onCornerHeightChange(h),m(h)}),useResizeObserver(s.scrollbarY,()=>{var v;const h=((v=s.scrollbarY)==null?void 0:v.offsetWidth)||0;s.onCornerWidthChange(h),d(h)}),f?jsxRuntimeExports.jsx("div",{...o,ref:t,style:{...i,width:c,height:p}}):null}),ScrollAreaCorner=reactExports.forwardRef((e,t)=>{const i=useScrollAreaContext(),o=!!(i.scrollbarX&&i.scrollbarY);return i.type!=="scroll"&&o?jsxRuntimeExports.jsx(Corner,{...e,ref:t}):null}),defaultProps$13={scrollHideDelay:1e3,type:"hover"},ScrollAreaRoot=reactExports.forwardRef((e,t)=>{const{type:i,scrollHideDelay:o,scrollbars:s,getStyles:c,...d}=useProps("ScrollAreaRoot",defaultProps$13,e),[p,m]=reactExports.useState(null),[f,h]=reactExports.useState(null),[v,y]=reactExports.useState(null),[x,b]=reactExports.useState(null),[S,A]=reactExports.useState(null),[C,T]=reactExports.useState(0),[k,D]=reactExports.useState(0),[w,R]=reactExports.useState(!1),[_,M]=reactExports.useState(!1),N=useMergedRef(t,P=>m(P));return jsxRuntimeExports.jsx(ScrollAreaProvider,{value:{type:i,scrollHideDelay:o,scrollArea:p,viewport:f,onViewportChange:h,content:v,onContentChange:y,scrollbarX:x,onScrollbarXChange:b,scrollbarXEnabled:w,onScrollbarXEnabledChange:R,scrollbarY:S,onScrollbarYChange:A,scrollbarYEnabled:_,onScrollbarYEnabledChange:M,onCornerWidthChange:T,onCornerHeightChange:D,getStyles:c},children:jsxRuntimeExports.jsx(Box,{...d,ref:N,__vars:{"--sa-corner-width":s!=="xy"?"0px":`${C}px`,"--sa-corner-height":s!=="xy"?"0px":`${k}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,o=(e.scrollbar.size-i)*t;return Math.max(o,18)}function linearScale(e,t){return i=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const o=(t[1]-t[0])/(e[1]-e[0]);return t[0]+o*(i-e[0])}}function clamp$2(e,[t,i]){return Math.min(i,Math.max(t,e))}function getThumbOffsetFromScroll(e,t,i="ltr"){const o=getThumbSize(t),s=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,c=t.scrollbar.size-s,d=t.content-t.viewport,p=c-o,m=i==="ltr"?[0,d]:[d*-1,0],f=clamp$2(e,m);return linearScale([0,d],[0,p])(f)}function getScrollPositionFromPointer(e,t,i,o="ltr"){const s=getThumbSize(i),c=s/2,d=t||c,p=s-d,m=i.scrollbar.paddingStart+d,f=i.scrollbar.size-i.scrollbar.paddingEnd-p,h=i.content-i.viewport,v=o==="ltr"?[0,h]:[h*-1,0];return linearScale([m,f],v)(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 o=>{e==null||e(o),(i===!1||!o.defaultPrevented)&&(t==null||t(o))}}const[ScrollbarProvider,useScrollbarContext]=createSafeContext("ScrollAreaScrollbar was not found in tree"),Scrollbar=reactExports.forwardRef((e,t)=>{const{sizes:i,hasThumb:o,onThumbChange:s,onThumbPointerUp:c,onThumbPointerDown:d,onThumbPositionChange:p,onDragScroll:m,onWheelScroll:f,onResize:h,...v}=e,y=useScrollAreaContext(),[x,b]=reactExports.useState(null),S=useMergedRef(t,M=>b(M)),A=reactExports.useRef(null),C=reactExports.useRef(""),{viewport:T}=y,k=i.content-i.viewport,D=useCallbackRef(f),w=useCallbackRef(p),R=useDebouncedCallback(h,10),_=M=>{if(A.current){const N=M.clientX-A.current.left,P=M.clientY-A.current.top;m({x:N,y:P})}};return reactExports.useEffect(()=>{const M=N=>{const P=N.target;(x==null?void 0:x.contains(P))&&D(N,k)};return document.addEventListener("wheel",M,{passive:!1}),()=>document.removeEventListener("wheel",M,{passive:!1})},[T,x,k,D]),reactExports.useEffect(w,[i,w]),useResizeObserver(x,R),useResizeObserver(y.content,R),jsxRuntimeExports.jsx(ScrollbarProvider,{value:{scrollbar:x,hasThumb:o,onThumbChange:useCallbackRef(s),onThumbPointerUp:useCallbackRef(c),onThumbPositionChange:w,onThumbPointerDown:useCallbackRef(d)},children:jsxRuntimeExports.jsx("div",{...v,ref:S,"data-mantine-scrollbar":!0,style:{position:"absolute",...v.style},onPointerDown:composeEventHandlers$2(e.onPointerDown,M=>{M.preventDefault(),M.button===0&&(M.target.setPointerCapture(M.pointerId),A.current=x.getBoundingClientRect(),C.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",_(M))}),onPointerMove:composeEventHandlers$2(e.onPointerMove,_),onPointerUp:composeEventHandlers$2(e.onPointerUp,M=>{const N=M.target;N.hasPointerCapture(M.pointerId)&&(M.preventDefault(),N.releasePointerCapture(M.pointerId))}),onLostPointerCapture:()=>{document.body.style.webkitUserSelect=C.current,A.current=null}})})}),ScrollAreaScrollbarX=reactExports.forwardRef((e,t)=>{const{sizes:i,onSizesChange:o,style:s,...c}=e,d=useScrollAreaContext(),[p,m]=reactExports.useState(),f=reactExports.useRef(null),h=useMergedRef(t,f,d.onScrollbarXChange);return reactExports.useEffect(()=>{f.current&&m(getComputedStyle(f.current))},[f]),jsxRuntimeExports.jsx(Scrollbar,{"data-orientation":"horizontal",...c,ref:h,sizes:i,style:{...s,"--sa-thumb-width":`${getThumbSize(i)}px`},onThumbPointerDown:v=>e.onThumbPointerDown(v.x),onDragScroll:v=>e.onDragScroll(v.x),onWheelScroll:(v,y)=>{if(d.viewport){const x=d.viewport.scrollLeft+v.deltaX;e.onWheelScroll(x),isScrollingWithinScrollbarBounds(x,y)&&v.preventDefault()}},onResize:()=>{f.current&&d.viewport&&p&&o({content:d.viewport.scrollWidth,viewport:d.viewport.offsetWidth,scrollbar:{size:f.current.clientWidth,paddingStart:toInt(p.paddingLeft),paddingEnd:toInt(p.paddingRight)}})}})});ScrollAreaScrollbarX.displayName="@mantine/core/ScrollAreaScrollbarX";const ScrollAreaScrollbarY=reactExports.forwardRef((e,t)=>{const{sizes:i,onSizesChange:o,style:s,...c}=e,d=useScrollAreaContext(),[p,m]=reactExports.useState(),f=reactExports.useRef(null),h=useMergedRef(t,f,d.onScrollbarYChange);return reactExports.useEffect(()=>{f.current&&m(window.getComputedStyle(f.current))},[]),jsxRuntimeExports.jsx(Scrollbar,{...c,"data-orientation":"vertical",ref:h,sizes:i,style:{"--sa-thumb-height":`${getThumbSize(i)}px`,...s},onThumbPointerDown:v=>e.onThumbPointerDown(v.y),onDragScroll:v=>e.onDragScroll(v.y),onWheelScroll:(v,y)=>{if(d.viewport){const x=d.viewport.scrollTop+v.deltaY;e.onWheelScroll(x),isScrollingWithinScrollbarBounds(x,y)&&v.preventDefault()}},onResize:()=>{f.current&&d.viewport&&p&&o({content:d.viewport.scrollHeight,viewport:d.viewport.offsetHeight,scrollbar:{size:f.current.clientHeight,paddingStart:toInt(p.paddingTop),paddingEnd:toInt(p.paddingBottom)}})}})});ScrollAreaScrollbarY.displayName="@mantine/core/ScrollAreaScrollbarY";const ScrollAreaScrollbarVisible=reactExports.forwardRef((e,t)=>{const{orientation:i="vertical",...o}=e,{dir:s}=useDirection(),c=useScrollAreaContext(),d=reactExports.useRef(null),p=reactExports.useRef(0),[m,f]=reactExports.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),h=getThumbRatio(m.viewport,m.content),v={...o,sizes:m,onSizesChange:f,hasThumb:h>0&&h<1,onThumbChange:x=>{d.current=x},onThumbPointerUp:()=>{p.current=0},onThumbPointerDown:x=>{p.current=x}},y=(x,b)=>getScrollPositionFromPointer(x,p.current,m,b);return i==="horizontal"?jsxRuntimeExports.jsx(ScrollAreaScrollbarX,{...v,ref:t,onThumbPositionChange:()=>{if(c.viewport&&d.current){const x=c.viewport.scrollLeft,b=getThumbOffsetFromScroll(x,m,s);d.current.style.transform=`translate3d(${b}px, 0, 0)`}},onWheelScroll:x=>{c.viewport&&(c.viewport.scrollLeft=x)},onDragScroll:x=>{c.viewport&&(c.viewport.scrollLeft=y(x,s))}}):i==="vertical"?jsxRuntimeExports.jsx(ScrollAreaScrollbarY,{...v,ref:t,onThumbPositionChange:()=>{if(c.viewport&&d.current){const x=c.viewport.scrollTop,b=getThumbOffsetFromScroll(x,m);m.scrollbar.size===0?d.current.style.setProperty("--thumb-opacity","0"):d.current.style.setProperty("--thumb-opacity","1"),d.current.style.transform=`translate3d(0, ${b}px, 0)`}},onWheelScroll:x=>{c.viewport&&(c.viewport.scrollTop=x)},onDragScroll:x=>{c.viewport&&(c.viewport.scrollTop=y(x))}}):null});ScrollAreaScrollbarVisible.displayName="@mantine/core/ScrollAreaScrollbarVisible";const ScrollAreaScrollbarAuto=reactExports.forwardRef((e,t)=>{const i=useScrollAreaContext(),{forceMount:o,...s}=e,[c,d]=reactExports.useState(!1),p=e.orientation==="horizontal",m=useDebouncedCallback(()=>{if(i.viewport){const f=i.viewport.offsetWidth<i.viewport.scrollWidth,h=i.viewport.offsetHeight<i.viewport.scrollHeight;d(p?f:h)}},10);return useResizeObserver(i.viewport,m),useResizeObserver(i.content,m),o||c?jsxRuntimeExports.jsx(ScrollAreaScrollbarVisible,{"data-state":c?"visible":"hidden",...s,ref:t}):null});ScrollAreaScrollbarAuto.displayName="@mantine/core/ScrollAreaScrollbarAuto";const ScrollAreaScrollbarHover=reactExports.forwardRef((e,t)=>{const{forceMount:i,...o}=e,s=useScrollAreaContext(),[c,d]=reactExports.useState(!1);return reactExports.useEffect(()=>{const{scrollArea:p}=s;let m=0;if(p){const f=()=>{window.clearTimeout(m),d(!0)},h=()=>{m=window.setTimeout(()=>d(!1),s.scrollHideDelay)};return p.addEventListener("pointerenter",f),p.addEventListener("pointerleave",h),()=>{window.clearTimeout(m),p.removeEventListener("pointerenter",f),p.removeEventListener("pointerleave",h)}}},[s.scrollArea,s.scrollHideDelay]),i||c?jsxRuntimeExports.jsx(ScrollAreaScrollbarAuto,{"data-state":c?"visible":"hidden",...o,ref:t}):null});ScrollAreaScrollbarHover.displayName="@mantine/core/ScrollAreaScrollbarHover";const ScrollAreaScrollbarScroll=reactExports.forwardRef((e,t)=>{const{forceMount:i,...o}=e,s=useScrollAreaContext(),c=e.orientation==="horizontal",[d,p]=reactExports.useState("hidden"),m=useDebouncedCallback(()=>p("idle"),100);return reactExports.useEffect(()=>{if(d==="idle"){const f=window.setTimeout(()=>p("hidden"),s.scrollHideDelay);return()=>window.clearTimeout(f)}},[d,s.scrollHideDelay]),reactExports.useEffect(()=>{const{viewport:f}=s,h=c?"scrollLeft":"scrollTop";if(f){let v=f[h];const y=()=>{const x=f[h];v!==x&&(p("scrolling"),m()),v=x};return f.addEventListener("scroll",y),()=>f.removeEventListener("scroll",y)}},[s.viewport,c,m]),i||d!=="hidden"?jsxRuntimeExports.jsx(ScrollAreaScrollbarVisible,{"data-state":d==="hidden"?"hidden":"visible",...o,ref:t,onPointerEnter:composeEventHandlers$2(e.onPointerEnter,()=>p("interacting")),onPointerLeave:composeEventHandlers$2(e.onPointerLeave,()=>p("idle"))}):null}),ScrollAreaScrollbar=reactExports.forwardRef((e,t)=>{const{forceMount:i,...o}=e,s=useScrollAreaContext(),{onScrollbarXEnabledChange:c,onScrollbarYEnabledChange:d}=s,p=e.orientation==="horizontal";return reactExports.useEffect(()=>(p?c(!0):d(!0),()=>{p?c(!1):d(!1)}),[p,c,d]),s.type==="hover"?jsxRuntimeExports.jsx(ScrollAreaScrollbarHover,{...o,ref:t,forceMount:i}):s.type==="scroll"?jsxRuntimeExports.jsx(ScrollAreaScrollbarScroll,{...o,ref:t,forceMount:i}):s.type==="auto"?jsxRuntimeExports.jsx(ScrollAreaScrollbarAuto,{...o,ref:t,forceMount:i}):s.type==="always"?jsxRuntimeExports.jsx(ScrollAreaScrollbarVisible,{...o,ref:t}):null});ScrollAreaScrollbar.displayName="@mantine/core/ScrollAreaScrollbar";function addUnlinkedScrollListener(e,t=()=>{}){let i={left:e.scrollLeft,top:e.scrollTop},o=0;return function s(){const c={left:e.scrollLeft,top:e.scrollTop},d=i.left!==c.left,p=i.top!==c.top;(d||p)&&t(),i=c,o=window.requestAnimationFrame(s)}(),()=>window.cancelAnimationFrame(o)}const Thumb$1=reactExports.forwardRef((e,t)=>{const{style:i,...o}=e,s=useScrollAreaContext(),c=useScrollbarContext(),{onThumbPositionChange:d}=c,p=useMergedRef(t,h=>c.onThumbChange(h)),m=reactExports.useRef(void 0),f=useDebouncedCallback(()=>{m.current&&(m.current(),m.current=void 0)},100);return reactExports.useEffect(()=>{const{viewport:h}=s;if(h){const v=()=>{if(f(),!m.current){const y=addUnlinkedScrollListener(h,d);m.current=y,d()}};return d(),h.addEventListener("scroll",v),()=>h.removeEventListener("scroll",v)}},[s.viewport,f,d]),jsxRuntimeExports.jsx("div",{"data-state":c.hasThumb?"visible":"hidden",...o,ref:p,style:{width:"var(--sa-thumb-width)",height:"var(--sa-thumb-height)",...i},onPointerDownCapture:composeEventHandlers$2(e.onPointerDownCapture,h=>{const y=h.target.getBoundingClientRect(),x=h.clientX-y.left,b=h.clientY-y.top;c.onThumbPointerDown({x,y:b})}),onPointerUp:composeEventHandlers$2(e.onPointerUp,c.onThumbPointerUp)})});Thumb$1.displayName="@mantine/core/ScrollAreaThumb";const ScrollAreaThumb=reactExports.forwardRef((e,t)=>{const{forceMount:i,...o}=e,s=useScrollbarContext();return i||s.hasThumb?jsxRuntimeExports.jsx(Thumb$1,{ref:t,...o}):null});ScrollAreaThumb.displayName="@mantine/core/ScrollAreaThumb";const ScrollAreaViewport=reactExports.forwardRef(({children:e,style:t,...i},o)=>{const s=useScrollAreaContext(),c=useMergedRef(o,s.onViewportChange);return jsxRuntimeExports.jsx(Box,{...i,ref:c,style:{overflowX:s.scrollbarXEnabled?"scroll":"hidden",overflowY:s.scrollbarYEnabled?"scroll":"hidden",...t},children:jsxRuntimeExports.jsx("div",{...s.getStyles("content"),ref:s.onContentChange,children:e})})});ScrollAreaViewport.displayName="@mantine/core/ScrollAreaViewport";var classes$x={root:"m_d57069b5",viewport:"m_c0783ff9",viewportInner:"m_f8f631dd",scrollbar:"m_c44ba933",thumb:"m_d8b5e363",corner:"m_21657268",content:"m_b1336c6"};const defaultProps$12={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$12,e),{classNames:o,className:s,style:c,styles:d,unstyled:p,scrollbarSize:m,vars:f,type:h,scrollHideDelay:v,viewportProps:y,viewportRef:x,onScrollPositionChange:b,children:S,offsetScrollbars:A,scrollbars:C,onBottomReached:T,onTopReached:k,overscrollBehavior:D,...w}=i,[R,_]=reactExports.useState(!1),[M,N]=reactExports.useState(!1),[P,L]=reactExports.useState(!1),I=useStyles({name:"ScrollArea",props:i,classes:classes$x,className:s,style:c,classNames:o,styles:d,unstyled:p,vars:f,varsResolver:varsResolver$C}),W=reactExports.useRef(null),ae=useMergeRefs([x,W]);return reactExports.useEffect(()=>{if(!W.current||A!=="present")return;const Q=W.current,B=new ResizeObserver(()=>{const{scrollHeight:q,clientHeight:K,scrollWidth:U,clientWidth:$}=Q;N(q>K),L(U>$)});return B.observe(Q),()=>B.disconnect()},[W,A]),jsxRuntimeExports.jsxs(ScrollAreaRoot,{getStyles:I,type:h==="never"?"always":h,scrollHideDelay:v,ref:t,scrollbars:C,...I("root"),...w,children:[jsxRuntimeExports.jsx(ScrollAreaViewport,{...y,...I("viewport",{style:y==null?void 0:y.style}),ref:ae,"data-offset-scrollbars":A===!0?"xy":A||void 0,"data-scrollbars":C||void 0,"data-horizontal-hidden":A==="present"&&!P?"true":void 0,"data-vertical-hidden":A==="present"&&!M?"true":void 0,onScroll:Q=>{var U;(U=y==null?void 0:y.onScroll)==null||U.call(y,Q),b==null||b({x:Q.currentTarget.scrollLeft,y:Q.currentTarget.scrollTop});const{scrollTop:B,scrollHeight:q,clientHeight:K}=Q.currentTarget;B-(q-K)>=0&&(T==null||T()),B===0&&(k==null||k())},children:S}),(C==="xy"||C==="x")&&jsxRuntimeExports.jsx(ScrollAreaScrollbar,{...I("scrollbar"),orientation:"horizontal","data-hidden":h==="never"||A==="present"&&!P?!0:void 0,forceMount:!0,onMouseEnter:()=>_(!0),onMouseLeave:()=>_(!1),children:jsxRuntimeExports.jsx(ScrollAreaThumb,{...I("thumb")})}),(C==="xy"||C==="y")&&jsxRuntimeExports.jsx(ScrollAreaScrollbar,{...I("scrollbar"),orientation:"vertical","data-hidden":h==="never"||A==="present"&&!M?!0:void 0,forceMount:!0,onMouseEnter:()=>_(!0),onMouseLeave:()=>_(!1),children:jsxRuntimeExports.jsx(ScrollAreaThumb,{...I("thumb")})}),jsxRuntimeExports.jsx(ScrollAreaCorner,{...I("corner"),"data-hovered":R||void 0,"data-hidden":h==="never"||void 0})]})});ScrollArea.displayName="@mantine/core/ScrollArea";const ScrollAreaAutosize=factory((e,t)=>{const{children:i,classNames:o,styles:s,scrollbarSize:c,scrollHideDelay:d,type:p,dir:m,offsetScrollbars:f,viewportRef:h,onScrollPositionChange:v,unstyled:y,variant:x,viewportProps:b,scrollbars:S,style:A,vars:C,onBottomReached:T,onTopReached:k,...D}=useProps("ScrollAreaAutosize",defaultProps$12,e);return jsxRuntimeExports.jsx(Box,{...D,ref:t,style:[{display:"flex",overflow:"auto"},A],children:jsxRuntimeExports.jsx(Box,{style:{display:"flex",flexDirection:"column",flex:1},children:jsxRuntimeExports.jsx(ScrollArea,{classNames:o,styles:s,scrollHideDelay:d,scrollbarSize:c,type:p,dir:m,offsetScrollbars:f,viewportRef:h,onScrollPositionChange:v,unstyled:y,variant:x,viewportProps:b,vars:C,scrollbars:S,onBottomReached:T,onTopReached:k,children:i})})})});ScrollArea.classes=classes$x;ScrollAreaAutosize.displayName="@mantine/core/ScrollAreaAutosize";ScrollAreaAutosize.classes=classes$x;ScrollArea.Autosize=ScrollAreaAutosize;var classes$w={root:"m_87cf2631"};const defaultProps$11={__staticSelector:"UnstyledButton"},UnstyledButton=polymorphicFactory((e,t)=>{const i=useProps("UnstyledButton",defaultProps$11,e),{className:o,component:s="button",__staticSelector:c,unstyled:d,classNames:p,styles:m,style:f,...h}=i,v=useStyles({name:c,props:i,classes:classes$w,className:o,style:f,classNames:p,styles:m,unstyled:d});return jsxRuntimeExports.jsx(Box,{...v("root",{focusable:!0}),component:s,ref:t,type:s==="button"?"button":void 0,...h})});UnstyledButton.classes=classes$w;UnstyledButton.displayName="@mantine/core/UnstyledButton";var classes$v={root:"m_515a97f8"};const defaultProps$10={},VisuallyHidden=factory((e,t)=>{const i=useProps("VisuallyHidden",defaultProps$10,e),{classNames:o,className:s,style:c,styles:d,unstyled:p,vars:m,...f}=i,h=useStyles({name:"VisuallyHidden",classes:classes$v,props:i,className:s,style:c,classNames:o,styles:d,unstyled:p});return jsxRuntimeExports.jsx(Box,{component:"span",ref:t,...h("root"),...f})});VisuallyHidden.classes=classes$v;VisuallyHidden.displayName="@mantine/core/VisuallyHidden";var classes$u={root:"m_1b7284a3"};const defaultProps$$={},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$$,e),{classNames:o,className:s,style:c,styles:d,unstyled:p,withBorder:m,vars:f,radius:h,shadow:v,variant:y,mod:x,...b}=i,S=useStyles({name:"Paper",props:i,classes:classes$u,className:s,style:c,classNames:o,styles:d,unstyled:p,vars:f,varsResolver:varsResolver$B});return jsxRuntimeExports.jsx(Box,{ref:t,mod:[{"data-with-border":m},x],...S("root"),variant:y,...b})});Paper.classes=classes$u;Paper.displayName="@mantine/core/Paper";function getFloatingPosition(e,t){if(e==="rtl"&&(t.includes("right")||t.includes("left"))){const[i,o]=t.split("-"),s=i==="right"?"left":"right";return o===void 0?s:`${s}-${o}`}return t}function horizontalSide(e,t,i,o){return e==="center"||o==="center"?{top:t}:e==="end"?{bottom:i}:e==="start"?{top:i}:{}}function verticalSide(e,t,i,o,s){return e==="center"||o==="center"?{left:t}:e==="end"?{[s==="ltr"?"right":"left"]:i}:e==="start"?{[s==="ltr"?"left":"right"]:i}:{}}const radiusByFloatingSide={bottom:"borderTopLeftRadius",left:"borderTopRightRadius",right:"borderBottomLeftRadius",top:"borderBottomRightRadius"};function getArrowPositionStyles({position:e,arrowSize:t,arrowOffset:i,arrowRadius:o,arrowPosition:s,arrowX:c,arrowY:d,dir:p}){const[m,f="center"]=e.split("-"),h={width:t,height:t,transform:"rotate(45deg)",position:"absolute",[radiusByFloatingSide[m]]:o},v=-t/2;return m==="left"?{...h,...horizontalSide(f,d,i,s),right:v,borderLeftColor:"transparent",borderBottomColor:"transparent",clipPath:"polygon(100% 0, 0 0, 100% 100%)"}:m==="right"?{...h,...horizontalSide(f,d,i,s),left:v,borderRightColor:"transparent",borderTopColor:"transparent",clipPath:"polygon(0 100%, 0 0, 100% 100%)"}:m==="top"?{...h,...verticalSide(f,c,i,s,p),bottom:v,borderTopColor:"transparent",borderLeftColor:"transparent",clipPath:"polygon(0 100%, 100% 100%, 100% 0)"}:m==="bottom"?{...h,...verticalSide(f,c,i,s,p),top:v,borderBottomColor:"transparent",borderRightColor:"transparent",clipPath:"polygon(0 100%, 0 0, 100% 0)"}:{}}const FloatingArrow=reactExports.forwardRef(({position:e,arrowSize:t,arrowOffset:i,arrowRadius:o,arrowPosition:s,visible:c,arrowX:d,arrowY:p,style:m,...f},h)=>{const{dir:v}=useDirection();return c?jsxRuntimeExports.jsx("div",{...f,ref:h,style:{...m,...getArrowPositionStyles({position:e,arrowSize:t,arrowOffset:i,arrowRadius:o,arrowPosition:s,dir:v,arrowX:d,arrowY:p})}}):null});FloatingArrow.displayName="@mantine/core/FloatingArrow";var classes$t={root:"m_9814e45f"};const defaultProps$_={zIndex:getDefaultZIndex("modal")},varsResolver$A=(e,{gradient:t,color:i,backgroundOpacity:o,blur:s,radius:c,zIndex:d})=>({root:{"--overlay-bg":t||(i!==void 0||o!==void 0)&&rgba(i||"#000",o??.6)||void 0,"--overlay-filter":s?`blur(${rem(s)})`:void 0,"--overlay-radius":c===void 0?void 0:getRadius(c),"--overlay-z-index":d==null?void 0:d.toString()}}),Overlay=polymorphicFactory((e,t)=>{const i=useProps("Overlay",defaultProps$_,e),{classNames:o,className:s,style:c,styles:d,unstyled:p,vars:m,fixed:f,center:h,children:v,radius:y,zIndex:x,gradient:b,blur:S,color:A,backgroundOpacity:C,mod:T,...k}=i,D=useStyles({name:"Overlay",props:i,classes:classes$t,className:s,style:c,classNames:o,styles:d,unstyled:p,vars:m,varsResolver:varsResolver$A});return jsxRuntimeExports.jsx(Box,{ref:t,...D("root"),mod:[{center:h,fixed:f},T],...k,children:v})});Overlay.classes=classes$t;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 o=document.querySelector("[data-mantine-shared-portal-node]");if(o)return o;const s=createPortalNode(i);return s.setAttribute("data-mantine-shared-portal-node","true"),document.body.appendChild(s),s}return createPortalNode(i)}const defaultProps$Z={reuseTargetNode:!0},Portal=factory((e,t)=>{const{children:i,target:o,reuseTargetNode:s,...c}=useProps("Portal",defaultProps$Z,e),[d,p]=reactExports.useState(!1),m=reactExports.useRef(null);return useIsomorphicEffect(()=>(p(!0),m.current=getTargetNode({target:o,reuseTargetNode:s,...c}),assignRef(t,m.current),!o&&!s&&m.current&&document.body.appendChild(m.current),()=>{!o&&!s&&m.current&&document.body.removeChild(m.current)}),[o]),!d||!m.current?null:reactDomExports.createPortal(jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:i}),m.current)});Portal.displayName="@mantine/core/Portal";const OptionalPortal=factory(({withinPortal:e=!0,children:t,...i},o)=>useMantineEnv()==="test"||!e?jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:t}):jsxRuntimeExports.jsx(Portal,{ref:o,...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:o}){const s={WebkitBackfaceVisibility:"hidden",willChange:"transform, opacity",transitionDuration:`${i}ms`,transitionTimingFunction:o};return typeof e=="string"?e in transitions?{transitionProperty:transitions[e].transitionProperty,...s,...transitions[e].common,...transitions[e][transitionStatuses[t]]}:{}:{transitionProperty:e.transitionProperty,...s,...e.common,...e[transitionStatuses[t]]}}function useTransition({duration:e,exitDuration:t,timingFunction:i,mounted:o,onEnter:s,onExit:c,onEntered:d,onExited:p,enterDelay:m,exitDelay:f}){const h=useMantineTheme(),v=useReducedMotion(),y=h.respectReducedMotion?v:!1,[x,b]=reactExports.useState(y?0:e),[S,A]=reactExports.useState(o?"entered":"exited"),C=reactExports.useRef(-1),T=reactExports.useRef(-1),k=reactExports.useRef(-1);function D(){window.clearTimeout(C.current),window.clearTimeout(T.current),cancelAnimationFrame(k.current)}const w=_=>{D();const M=_?s:c,N=_?d:p,P=y?0:_?e:t;b(P),P===0?(typeof M=="function"&&M(),typeof N=="function"&&N(),A(_?"entered":"exited")):k.current=requestAnimationFrame(()=>{ReactDOM.flushSync(()=>{A(_?"pre-entering":"pre-exiting")}),k.current=requestAnimationFrame(()=>{typeof M=="function"&&M(),A(_?"entering":"exiting"),C.current=window.setTimeout(()=>{typeof N=="function"&&N(),A(_?"entered":"exited")},P)})})},R=_=>{if(D(),typeof(_?m:f)!="number"){w(_);return}T.current=window.setTimeout(()=>{w(_)},_?m:f)};return useDidUpdate(()=>{R(o)},[o]),reactExports.useEffect(()=>()=>{D()},[]),{transitionDuration:x,transitionStatus:S,transitionTimingFunction:i||"ease"}}function Transition({keepMounted:e,transition:t="fade",duration:i=250,exitDuration:o=i,mounted:s,children:c,timingFunction:d="ease",onExit:p,onEntered:m,onEnter:f,onExited:h,enterDelay:v,exitDelay:y}){const x=useMantineEnv(),{transitionDuration:b,transitionStatus:S,transitionTimingFunction:A}=useTransition({mounted:s,exitDuration:o,duration:i,timingFunction:d,onExit:p,onEntered:m,onEnter:f,onExited:h,enterDelay:v,exitDelay:y});return b===0||x==="test"?s?jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:c({})}):e?c({display:"none"}):null:S==="exited"?e?c({display:"none"}):null:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:c(getTransitionStyles({transition:t,duration:b,state:S,timingFunction:A}))})}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:o}){const s=useFocusTrap(t),c=useMergedRef(s,o);return isElement$1(e)?reactExports.cloneElement(e,{[i]:c}):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$s={dropdown:"m_38a85659",arrow:"m_a31dc6c1",overlay:"m_3d7bc908"};const defaultProps$Y={},PopoverDropdown=factory((e,t)=>{var A,C,T,k;const i=useProps("PopoverDropdown",defaultProps$Y,e),{className:o,style:s,vars:c,children:d,onKeyDownCapture:p,variant:m,classNames:f,styles:h,...v}=i,y=usePopoverContext(),x=useFocusReturn({opened:y.opened,shouldReturnFocus:y.returnFocus}),b=y.withRoles?{"aria-labelledby":y.getTargetId(),id:y.getDropdownId(),role:"dialog",tabIndex:-1}:{},S=useMergedRef(t,y.floating);return y.disabled?null:jsxRuntimeExports.jsx(OptionalPortal,{...y.portalProps,withinPortal:y.withinPortal,children:jsxRuntimeExports.jsx(Transition,{mounted:y.opened,...y.transitionProps,transition:((A=y.transitionProps)==null?void 0:A.transition)||"fade",duration:((C=y.transitionProps)==null?void 0:C.duration)??150,keepMounted:y.keepMounted,exitDuration:typeof((T=y.transitionProps)==null?void 0:T.exitDuration)=="number"?y.transitionProps.exitDuration:(k=y.transitionProps)==null?void 0:k.duration,children:D=>jsxRuntimeExports.jsx(FocusTrap,{active:y.trapFocus&&y.opened,innerRef:S,children:jsxRuntimeExports.jsxs(Box,{...b,...v,variant:m,onKeyDownCapture:closeOnEscape(()=>{var w,R;(w=y.onClose)==null||w.call(y),(R=y.onDismiss)==null||R.call(y)},{active:y.closeOnEscape,onTrigger:x,onKeyDown:p}),"data-position":y.placement,"data-fixed":y.floatingStrategy==="fixed"||void 0,...y.getStyles("dropdown",{className:o,props:i,classNames:f,styles:h,style:[{...D,zIndex:y.zIndex,top:y.y??0,left:y.x??0,width:y.width==="target"?void 0:rem(y.width),...y.referenceHidden?{display:"none"}:null},y.resolvedStyles.dropdown,h==null?void 0:h.dropdown,s]}),children:[d,jsxRuntimeExports.jsx(FloatingArrow,{ref:y.arrowRef,arrowX:y.arrowX,arrowY:y.arrowY,visible:y.withArrow,position:y.placement,arrowSize:y.arrowSize,arrowRadius:y.arrowRadius,arrowOffset:y.arrowOffset,arrowPosition:y.arrowPosition,...y.getStyles("arrow",{props:i,classNames:f,styles:h})})]})})})})});PopoverDropdown.classes=classes$s;PopoverDropdown.displayName="@mantine/core/PopoverDropdown";const defaultProps$X={refProp:"ref",popupType:"dialog"},PopoverTarget=factory((e,t)=>{const{children:i,refProp:o,popupType:s,...c}=useProps("PopoverTarget",defaultProps$X,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 d=c,p=usePopoverContext(),m=useMergedRef(p.reference,getRefProp(i),t),f=p.withRoles?{"aria-haspopup":s,"aria-expanded":p.opened,"aria-controls":p.getDropdownId(),id:p.getTargetId()}:{};return reactExports.cloneElement(i,{...d,...f,...p.targetProps,className:clsx(p.targetProps.className,d.className,i.props.className),[o]:m,...p.controlled?null:{onClick:p.onToggle}})});PopoverTarget.displayName="@mantine/core/PopoverTarget";function useFloatingAutoUpdate({opened:e,floating:t,position:i,positionDependencies:o}){const[s,c]=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,s,i]),useDidUpdate(()=>{t.update()},o),useDidUpdate(()=>{c(d=>d+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),o=[offset(e.offset),hide()];return i.shift&&o.push(shift(typeof i.shift=="boolean"?{limiter:limitShift(),padding:5}:{limiter:limitShift(),padding:5,...i.shift})),i.flip&&o.push(typeof i.flip=="boolean"?flip():flip(i.flip)),i.inline&&o.push(typeof i.inline=="boolean"?inline():inline(i.inline)),o.push(arrow({element:e.arrowRef,padding:e.arrowOffset})),(i.size||e.width==="target")&&o.push(size({...typeof i.size=="boolean"?{}:i.size,apply({rects:s,availableWidth:c,availableHeight:d,...p}){var h;const f=((h=t().refs.floating.current)==null?void 0:h.style)??{};i.size&&(typeof i.size=="object"&&i.size.apply?i.size.apply({rects:s,availableWidth:c,availableHeight:d,...p}):Object.assign(f,{maxWidth:`${c}px`,maxHeight:`${d}px`})),e.width==="target"&&Object.assign(f,{width:`${s.reference.width}px`})}})),o}function usePopover(e){const[t,i]=useUncontrolled({value:e.opened,defaultValue:e.defaultOpened,finalValue:!1,onChange:e.onChange}),o=reactExports.useRef(t),s=()=>{t&&i(!1)},c=()=>i(!t),d=useFloating({strategy:e.strategy,placement:e.position,middleware:getPopoverMiddlewares(e,()=>d)});return useFloatingAutoUpdate({opened:t,position:e.position,positionDependencies:e.positionDependencies||[],floating:d}),useDidUpdate(()=>{var p;(p=e.onPositionChange)==null||p.call(e,d.placement)},[d.placement]),useDidUpdate(()=>{var p,m;t!==o.current&&(t?(m=e.onOpen)==null||m.call(e):(p=e.onClose)==null||p.call(e)),o.current=t},[t,e.onClose,e.onOpen]),{floating:d,controlled:typeof e.opened=="boolean",opened:t,onClose:s,onToggle:c}}const defaultProps$W={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,Xe,qe,at,We,Je,ct;const t=useProps("Popover",defaultProps$W,e),{children:i,position:o,offset:s,onPositionChange:c,positionDependencies:d,opened:p,transitionProps:m,onExitTransitionEnd:f,onEnterTransitionEnd:h,width:v,middlewares:y,withArrow:x,arrowSize:b,arrowOffset:S,arrowRadius:A,arrowPosition:C,unstyled:T,classNames:k,styles:D,closeOnClickOutside:w,withinPortal:R,portalProps:_,closeOnEscape:M,clickOutsideEvents:N,trapFocus:P,onClose:L,onDismiss:I,onOpen:W,onChange:ae,zIndex:Q,radius:B,shadow:q,id:K,defaultOpened:U,__staticSelector:$,withRoles:Y,disabled:z,returnFocus:O,variant:F,keepMounted:H,vars:X,floatingStrategy:te,withOverlay:J,overlayProps:ce,hideDetached:ue,...Ae}=t,Ee=useStyles({name:$,props:t,classes:classes$s,classNames:k,styles:D,unstyled:T,rootSelector:"dropdown",vars:X,varsResolver:varsResolver$z}),{resolvedStyles:Me}=useResolvedStylesApi({classNames:k,styles:D,props:t}),je=reactExports.useRef(null),[ke,ge]=reactExports.useState(null),[oe,G]=reactExports.useState(null),{dir:ee}=useDirection(),de=useMantineEnv(),pe=useId$1(K),ve=usePopover({middlewares:y,width:v,position:getFloatingPosition(ee,o),offset:typeof s=="number"?s+(x?b/2:0):s,arrowRef:je,arrowOffset:S,onPositionChange:c,positionDependencies:d,opened:p,defaultOpened:U,onChange:ae,onOpen:W,onClose:L,onDismiss:I,strategy:te});useClickOutside(()=>{w&&(ve.onClose(),I==null||I())},N,[ke,oe]);const Te=reactExports.useCallback(st=>{ge(st),ve.floating.refs.setReference(st)},[ve.floating.refs.setReference]),se=reactExports.useCallback(st=>{G(st),ve.floating.refs.setFloating(st)},[ve.floating.refs.setFloating]),re=reactExports.useCallback(()=>{var st;(st=m==null?void 0:m.onExited)==null||st.call(m),f==null||f()},[m==null?void 0:m.onExited,f]),$e=reactExports.useCallback(()=>{var st;(st=m==null?void 0:m.onEntered)==null||st.call(m),h==null||h()},[m==null?void 0:m.onEntered,h]);return jsxRuntimeExports.jsxs(PopoverContextProvider,{value:{returnFocus:O,disabled:z,controlled:ve.controlled,reference:Te,floating:se,x:ve.floating.x,y:ve.floating.y,arrowX:(qe=(Xe=(Le=ve.floating)==null?void 0:Le.middlewareData)==null?void 0:Xe.arrow)==null?void 0:qe.x,arrowY:(Je=(We=(at=ve.floating)==null?void 0:at.middlewareData)==null?void 0:We.arrow)==null?void 0:Je.y,opened:ve.opened,arrowRef:je,transitionProps:{...m,onExited:re,onEntered:$e},width:v,withArrow:x,arrowSize:b,arrowOffset:S,arrowRadius:A,arrowPosition:C,placement:ve.floating.placement,trapFocus:P,withinPortal:R,portalProps:_,zIndex:Q,radius:B,shadow:q,closeOnEscape:M,onDismiss:I,onClose:ve.onClose,onToggle:ve.onToggle,getTargetId:()=>`${pe}-target`,getDropdownId:()=>`${pe}-dropdown`,withRoles:Y,targetProps:Ae,__staticSelector:$,classNames:k,styles:D,unstyled:T,variant:F,keepMounted:H,getStyles:Ee,resolvedStyles:Me,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:(m==null?void 0:m.duration)||250,exitDuration:(m==null?void 0:m.exitDuration)||250,children:st=>jsxRuntimeExports.jsx(OptionalPortal,{withinPortal:R,children:jsxRuntimeExports.jsx(Overlay,{...ce,...Ee("overlay",{className:ce==null?void 0:ce.className,style:[st,ce==null?void 0:ce.style]})})})})]})}Popover.Target=PopoverTarget;Popover.Dropdown=PopoverDropdown;Popover.displayName="@mantine/core/Popover";Popover.extend=e=>e;var classes$r={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$r.barsLoader,e),...t,ref:i,children:[jsxRuntimeExports.jsx("span",{className:classes$r.bar}),jsxRuntimeExports.jsx("span",{className:classes$r.bar}),jsxRuntimeExports.jsx("span",{className:classes$r.bar})]}));Bars.displayName="@mantine/core/Bars";const Dots=reactExports.forwardRef(({className:e,...t},i)=>jsxRuntimeExports.jsxs(Box,{component:"span",className:clsx(classes$r.dotsLoader,e),...t,ref:i,children:[jsxRuntimeExports.jsx("span",{className:classes$r.dot}),jsxRuntimeExports.jsx("span",{className:classes$r.dot}),jsxRuntimeExports.jsx("span",{className:classes$r.dot})]}));Dots.displayName="@mantine/core/Dots";const Oval=reactExports.forwardRef(({className:e,...t},i)=>jsxRuntimeExports.jsx(Box,{component:"span",className:clsx(classes$r.ovalLoader,e),...t,ref:i}));Oval.displayName="@mantine/core/Oval";const defaultLoaders={bars:Bars,oval:Oval,dots:Dots},defaultProps$V={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$V,e),{size:o,color:s,type:c,vars:d,className:p,style:m,classNames:f,styles:h,unstyled:v,loaders:y,variant:x,children:b,...S}=i,A=useStyles({name:"Loader",props:i,classes:classes$r,className:p,style:m,classNames:f,styles:h,unstyled:v,vars:d,varsResolver:varsResolver$y});return b?jsxRuntimeExports.jsx(Box,{...A("root"),ref:t,...S,children:b}):jsxRuntimeExports.jsx(Box,{...A("root"),ref:t,component:y[c],variant:x,size:o,...S})});Loader.defaultLoaders=defaultLoaders;Loader.classes=classes$r;Loader.displayName="@mantine/core/Loader";var classes$q={root:"m_8d3f4000",icon:"m_8d3afb97",loader:"m_302b9fb1",group:"m_1a0f1b21",groupSection:"m_437b6484"};const defaultProps$U={orientation:"horizontal"},varsResolver$x=(e,{borderWidth:t})=>({group:{"--ai-border-width":rem(t)}}),ActionIconGroup=factory((e,t)=>{const i=useProps("ActionIconGroup",defaultProps$U,e),{className:o,style:s,classNames:c,styles:d,unstyled:p,orientation:m,vars:f,borderWidth:h,variant:v,mod:y,...x}=useProps("ActionIconGroup",defaultProps$U,e),b=useStyles({name:"ActionIconGroup",props:i,classes:classes$q,className:o,style:s,classNames:c,styles:d,unstyled:p,vars:f,varsResolver:varsResolver$x,rootSelector:"group"});return jsxRuntimeExports.jsx(Box,{...b("group"),ref:t,variant:v,mod:[{"data-orientation":m},y],role:"group",...x})});ActionIconGroup.classes=classes$q;ActionIconGroup.displayName="@mantine/core/ActionIconGroup";const defaultProps$T={},varsResolver$w=(e,{radius:t,color:i,gradient:o,variant:s,autoContrast:c,size:d})=>{const p=e.variantColorResolver({color:i||e.primaryColor,theme:e,gradient:o,variant:s||"filled",autoContrast:c});return{groupSection:{"--section-height":getSize(d,"section-height"),"--section-padding-x":getSize(d,"section-padding-x"),"--section-fz":getFontSize(d),"--section-radius":t===void 0?void 0:getRadius(t),"--section-bg":i||s?p.background:void 0,"--section-color":p.color,"--section-bd":i||s?p.border:void 0}}},ActionIconGroupSection=factory((e,t)=>{const i=useProps("ActionIconGroupSection",defaultProps$T,e),{className:o,style:s,classNames:c,styles:d,unstyled:p,vars:m,variant:f,gradient:h,radius:v,autoContrast:y,...x}=useProps("ActionIconGroupSection",defaultProps$T,e),b=useStyles({name:"ActionIconGroupSection",props:i,classes:classes$q,className:o,style:s,classNames:c,styles:d,unstyled:p,vars:m,varsResolver:varsResolver$w,rootSelector:"groupSection"});return jsxRuntimeExports.jsx(Box,{...b("groupSection"),ref:t,variant:f,...x})});ActionIconGroupSection.classes=classes$q;ActionIconGroupSection.displayName="@mantine/core/ActionIconGroupSection";const defaultProps$S={},varsResolver$v=(e,{size:t,radius:i,variant:o,gradient:s,color:c,autoContrast:d})=>{const p=e.variantColorResolver({color:c||e.primaryColor,theme:e,gradient:s,variant:o||"filled",autoContrast:d});return{root:{"--ai-size":getSize(t,"ai-size"),"--ai-radius":i===void 0?void 0:getRadius(i),"--ai-bg":c||o?p.background:void 0,"--ai-hover":c||o?p.hover:void 0,"--ai-hover-color":c||o?p.hoverColor:void 0,"--ai-color":p.color,"--ai-bd":c||o?p.border:void 0}}},ActionIcon=polymorphicFactory((e,t)=>{const i=useProps("ActionIcon",defaultProps$S,e),{className:o,unstyled:s,variant:c,classNames:d,styles:p,style:m,loading:f,loaderProps:h,size:v,color:y,radius:x,__staticSelector:b,gradient:S,vars:A,children:C,disabled:T,"data-disabled":k,autoContrast:D,mod:w,...R}=i,_=useStyles({name:["ActionIcon",b],props:i,className:o,style:m,classes:classes$q,classNames:d,styles:p,unstyled:s,vars:A,varsResolver:varsResolver$v});return jsxRuntimeExports.jsxs(UnstyledButton,{..._("root",{active:!T&&!f&&!k}),...R,unstyled:s,variant:c,size:v,disabled:T||f,ref:t,mod:[{loading:f,disabled:T||k},w],children:[jsxRuntimeExports.jsx(Transition,{mounted:!!f,transition:"slide-down",duration:150,children:M=>jsxRuntimeExports.jsx(Box,{component:"span",..._("loader",{style:M}),"aria-hidden":!0,children:jsxRuntimeExports.jsx(Loader,{color:"var(--ai-color)",size:"calc(var(--ai-size) * 0.55)",...h})})}),jsxRuntimeExports.jsx(Box,{component:"span",mod:{loading:f},..._("icon"),children:C})]})});ActionIcon.classes=classes$q;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},o)=>jsxRuntimeExports.jsx("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{...t,width:e,height:e},ref:o,...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$p={root:"m_86a44da5","root--subtle":"m_220c80f2"};const defaultProps$R={variant:"subtle"},varsResolver$u=(e,{size:t,radius:i,iconSize:o})=>({root:{"--cb-size":getSize(t,"cb-size"),"--cb-radius":i===void 0?void 0:getRadius(i),"--cb-icon-size":rem(o)}}),CloseButton=polymorphicFactory((e,t)=>{const i=useProps("CloseButton",defaultProps$R,e),{iconSize:o,children:s,vars:c,radius:d,className:p,classNames:m,style:f,styles:h,unstyled:v,"data-disabled":y,disabled:x,variant:b,icon:S,mod:A,__staticSelector:C,...T}=i,k=useStyles({name:C||"CloseButton",props:i,className:p,style:f,classes:classes$p,classNames:m,styles:h,unstyled:v,vars:c,varsResolver:varsResolver$u});return jsxRuntimeExports.jsxs(UnstyledButton,{ref:t,...T,unstyled:v,variant:b,disabled:x,mod:[{disabled:x||y},A],...k("root",{variant:b,active:!x&&!y}),children:[S||jsxRuntimeExports.jsx(CloseIcon,{}),s]})});CloseButton.classes=classes$p;CloseButton.displayName="@mantine/core/CloseButton";function filterFalsyChildren(e){return reactExports.Children.toArray(e).filter(Boolean)}var classes$o={root:"m_4081bf90"};const defaultProps$Q={preventGrowOverflow:!0,gap:"md",align:"center",justify:"flex-start",wrap:"wrap"},varsResolver$t=(e,{grow:t,preventGrowOverflow:i,gap:o,align:s,justify:c,wrap:d},{childWidth:p})=>({root:{"--group-child-width":t&&i?p:void 0,"--group-gap":getSpacing(o),"--group-align":s,"--group-justify":c,"--group-wrap":d}}),Group=factory((e,t)=>{const i=useProps("Group",defaultProps$Q,e),{classNames:o,className:s,style:c,styles:d,unstyled:p,children:m,gap:f,align:h,justify:v,wrap:y,grow:x,preventGrowOverflow:b,vars:S,variant:A,__size:C,mod:T,...k}=i,D=filterFalsyChildren(m),w=D.length,R=getSpacing(f??"md"),M={childWidth:`calc(${100/w}% - (${R} - ${R} / ${w}))`},N=useStyles({name:"Group",props:i,stylesCtx:M,className:s,style:c,classes:classes$o,classNames:o,styles:d,unstyled:p,vars:S,varsResolver:varsResolver$t});return jsxRuntimeExports.jsx(Box,{...N("root"),ref:t,variant:A,mod:[{grow:x},T],size:C,...k,children:D})});Group.classes=classes$o;Group.displayName="@mantine/core/Group";const[InputContext,useInputContext]=createOptionalContext({size:"sm"}),defaultProps$P={},InputClearButton=factory((e,t)=>{const i=useProps("InputClearButton",defaultProps$P,e),{size:o,variant:s,vars:c,classNames:d,styles:p,...m}=i,f=useInputContext(),{resolvedClassNames:h,resolvedStyles:v}=useResolvedStylesApi({classNames:d,styles:p,props:i});return jsxRuntimeExports.jsx(CloseButton,{variant:s||"transparent",ref:t,size:o||(f==null?void 0:f.size)||"sm",classNames:h,styles:v,__staticSelector:"InputClearButton",...m})});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$n={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$O={},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$O,e),{classNames:o,className:s,style:c,styles:d,unstyled:p,vars:m,size:f,__staticSelector:h,__inheritStyles:v=!0,variant:y,...x}=useProps("InputDescription",defaultProps$O,i),b=useInputWrapperContext(),S=useStyles({name:["InputWrapper",h],props:i,classes:classes$n,className:s,style:c,classNames:o,styles:d,unstyled:p,rootSelector:"description",vars:m,varsResolver:varsResolver$s}),A=v&&(b==null?void 0:b.getStyles)||S;return jsxRuntimeExports.jsx(Box,{component:"p",ref:t,variant:y,size:f,...A("description",b!=null&&b.getStyles?{className:s,style:c}:void 0),...x})});InputDescription.classes=classes$n;InputDescription.displayName="@mantine/core/InputDescription";const defaultProps$N={},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$N,e),{classNames:o,className:s,style:c,styles:d,unstyled:p,vars:m,size:f,__staticSelector:h,__inheritStyles:v=!0,variant:y,...x}=i,b=useStyles({name:["InputWrapper",h],props:i,classes:classes$n,className:s,style:c,classNames:o,styles:d,unstyled:p,rootSelector:"error",vars:m,varsResolver:varsResolver$r}),S=useInputWrapperContext(),A=v&&(S==null?void 0:S.getStyles)||b;return jsxRuntimeExports.jsx(Box,{component:"p",ref:t,variant:y,size:f,...A("error",S!=null&&S.getStyles?{className:s,style:c}:void 0),...x})});InputError.classes=classes$n;InputError.displayName="@mantine/core/InputError";const defaultProps$M={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$M,e),{classNames:o,className:s,style:c,styles:d,unstyled:p,vars:m,labelElement:f,size:h,required:v,htmlFor:y,onMouseDown:x,children:b,__staticSelector:S,variant:A,mod:C,...T}=useProps("InputLabel",defaultProps$M,i),k=useStyles({name:["InputWrapper",S],props:i,classes:classes$n,className:s,style:c,classNames:o,styles:d,unstyled:p,rootSelector:"label",vars:m,varsResolver:varsResolver$q}),D=useInputWrapperContext(),w=(D==null?void 0:D.getStyles)||k;return jsxRuntimeExports.jsxs(Box,{...w("label",D!=null&&D.getStyles?{className:s,style:c}:void 0),component:f,variant:A,size:h,ref:t,htmlFor:f==="label"?y:void 0,mod:[{required:v},C],onMouseDown:R=>{x==null||x(R),!R.defaultPrevented&&R.detail>1&&R.preventDefault()},...T,children:[b,v&&jsxRuntimeExports.jsx("span",{...w("required"),"aria-hidden":!0,children:" *"})]})});InputLabel.classes=classes$n;InputLabel.displayName="@mantine/core/InputLabel";const defaultProps$L={},InputPlaceholder=factory((e,t)=>{const i=useProps("InputPlaceholder",defaultProps$L,e),{classNames:o,className:s,style:c,styles:d,unstyled:p,vars:m,__staticSelector:f,variant:h,error:v,mod:y,...x}=useProps("InputPlaceholder",defaultProps$L,i),b=useStyles({name:["InputPlaceholder",f],props:i,classes:classes$n,className:s,style:c,classNames:o,styles:d,unstyled:p,rootSelector:"placeholder"});return jsxRuntimeExports.jsx(Box,{...b("placeholder"),mod:[{error:!!v},y],component:"span",variant:h,ref:t,...x})});InputPlaceholder.classes=classes$n;InputPlaceholder.displayName="@mantine/core/InputPlaceholder";function getInputOffsets(e,{hasDescription:t,hasError:i}){const o=e.findIndex(m=>m==="input"),s=e.slice(0,o),c=e.slice(o+1),d=t&&s.includes("description")||i&&s.includes("error");return{offsetBottom:t&&c.includes("description")||i&&c.includes("error"),offsetTop:d}}const defaultProps$K={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$K,e),{classNames:o,className:s,style:c,styles:d,unstyled:p,vars:m,size:f,variant:h,__staticSelector:v,inputContainer:y,inputWrapperOrder:x,label:b,error:S,description:A,labelProps:C,descriptionProps:T,errorProps:k,labelElement:D,children:w,withAsterisk:R,id:_,required:M,__stylesApiProps:N,mod:P,...L}=i,I=useStyles({name:["InputWrapper",v],props:N||i,classes:classes$n,className:s,style:c,classNames:o,styles:d,unstyled:p,vars:m,varsResolver:varsResolver$p}),W={size:f,variant:h,__staticSelector:v},ae=useId$1(_),Q=typeof R=="boolean"?R:M,B=(k==null?void 0:k.id)||`${ae}-error`,q=(T==null?void 0:T.id)||`${ae}-description`,K=ae,U=!!S&&typeof S!="boolean",$=!!A,Y=`${U?B:""} ${$?q:""}`,z=Y.trim().length>0?Y.trim():void 0,O=(C==null?void 0:C.id)||`${ae}-label`,F=b&&jsxRuntimeExports.jsx(InputLabel,{labelElement:D,id:O,htmlFor:K,required:Q,...W,...C,children:b},"label"),H=$&&jsxRuntimeExports.jsx(InputDescription,{...T,...W,size:(T==null?void 0:T.size)||W.size,id:(T==null?void 0:T.id)||q,children:A},"description"),X=jsxRuntimeExports.jsx(reactExports.Fragment,{children:y(w)},"input"),te=U&&reactExports.createElement(InputError,{...k,...W,size:(k==null?void 0:k.size)||W.size,key:"error",id:(k==null?void 0:k.id)||B},S),J=x.map(ce=>{switch(ce){case"label":return F;case"input":return X;case"description":return H;case"error":return te;default:return null}});return jsxRuntimeExports.jsx(InputWrapperProvider,{value:{getStyles:I,describedBy:z,inputId:K,labelId:O,...getInputOffsets(x,{hasDescription:$,hasError:U})},children:jsxRuntimeExports.jsx(Box,{ref:t,variant:h,size:f,mod:[{error:!!S},P],...I("root"),...L,children:J})})});InputWrapper.classes=classes$n;InputWrapper.displayName="@mantine/core/InputWrapper";const defaultProps$J={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$J,e),{classNames:o,className:s,style:c,styles:d,unstyled:p,required:m,__staticSelector:f,__stylesApiProps:h,size:v,wrapperProps:y,error:x,disabled:b,leftSection:S,leftSectionProps:A,leftSectionWidth:C,rightSection:T,rightSectionProps:k,rightSectionWidth:D,rightSectionPointerEvents:w,leftSectionPointerEvents:R,variant:_,vars:M,pointer:N,multiline:P,radius:L,id:I,withAria:W,withErrorStyles:ae,mod:Q,inputSize:B,__clearSection:q,__clearable:K,__defaultRightSection:U,...$}=i,{styleProps:Y,rest:z}=extractStyleProps($),O=useInputWrapperContext(),F={offsetBottom:O==null?void 0:O.offsetBottom,offsetTop:O==null?void 0:O.offsetTop},H=useStyles({name:["Input",f],props:h||i,classes:classes$n,className:s,style:c,classNames:o,styles:d,unstyled:p,stylesCtx:F,rootSelector:"wrapper",vars:M,varsResolver:varsResolver$o}),X=W?{required:m,disabled:b,"aria-invalid":!!x,"aria-describedby":O==null?void 0:O.describedBy,id:(O==null?void 0:O.inputId)||I}:{},te=T||K&&q||U;return jsxRuntimeExports.jsx(InputContext,{value:{size:v||"sm"},children:jsxRuntimeExports.jsxs(Box,{...H("wrapper"),...Y,...y,mod:[{error:!!x&&ae,pointer:N,disabled:b,multiline:P,"data-with-right-section":!!te,"data-with-left-section":!!S},Q],variant:_,size:v,children:[S&&jsxRuntimeExports.jsx("div",{...A,"data-position":"left",...H("section",{className:A==null?void 0:A.className,style:A==null?void 0:A.style}),children:S}),jsxRuntimeExports.jsx(Box,{component:"input",...z,...X,ref:t,required:m,mod:{disabled:b,error:!!x&&ae},variant:_,__size:B,...H("input")}),te&&jsxRuntimeExports.jsx("div",{...k,"data-position":"right",...H("section",{className:k==null?void 0:k.className,style:k==null?void 0:k.style}),children:te})]})})});Input.classes=classes$n;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 o=useProps(e,t,i),{label:s,description:c,error:d,required:p,classNames:m,styles:f,className:h,unstyled:v,__staticSelector:y,__stylesApiProps:x,errorProps:b,labelProps:S,descriptionProps:A,wrapperProps:C,id:T,size:k,style:D,inputContainer:w,inputWrapperOrder:R,withAsterisk:_,variant:M,vars:N,mod:P,...L}=o,{styleProps:I,rest:W}=extractStyleProps(L),ae={label:s,description:c,error:d,required:p,classNames:m,className:h,__staticSelector:y,__stylesApiProps:x||o,errorProps:b,labelProps:S,descriptionProps:A,unstyled:v,styles:f,size:k,style:D,inputContainer:w,inputWrapperOrder:R,withAsterisk:_,variant:M,id:T,mod:P,...C};return{...W,classNames:m,styles:f,unstyled:v,wrapperProps:{...ae,...I},inputProps:{required:p,classNames:m,styles:f,unstyled:v,size:k,__staticSelector:y,__stylesApiProps:x||o,error:d,variant:M,id:T}}}const defaultProps$I={__staticSelector:"InputBase",withAria:!0},InputBase=polymorphicFactory((e,t)=>{const{inputProps:i,wrapperProps:o,...s}=useInputProps("InputBase",defaultProps$I,e);return jsxRuntimeExports.jsx(Input.Wrapper,{...o,children:jsxRuntimeExports.jsx(Input,{...i,...s,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$m={root:"m_8bffd616"};const defaultProps$H={},Flex=polymorphicFactory((e,t)=>{const i=useProps("Flex",defaultProps$H,e),{classNames:o,className:s,style:c,styles:d,unstyled:p,vars:m,gap:f,rowGap:h,columnGap:v,align:y,justify:x,wrap:b,direction:S,...A}=i,C=useStyles({name:"Flex",classes:classes$m,props:i,className:s,style:c,classNames:o,styles:d,unstyled:p,vars:m}),T=useMantineTheme(),k=useRandomClassName(),D=parseStyleProps({styleProps:{gap:f,rowGap:h,columnGap:v,align:y,justify:x,wrap:b,direction:S},theme:T,data:FLEX_STYLE_PROPS_DATA});return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[D.hasResponsiveStyles&&jsxRuntimeExports.jsx(InlineStyles,{selector:`.${k}`,styles:D.styles,media:D.media}),jsxRuntimeExports.jsx(Box,{ref:t,...C("root",{className:k,style:filterProps(D.inlineStyles)}),...A})]})});Flex.classes=classes$m;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:o}){const s=reactExports.useRef(-1),[c,d]=reactExports.useState(!1),[p,m]=reactExports.useState(typeof o=="boolean"?o:!1),f=()=>{if(!e||!t||!i.current)return;const x=e.getBoundingClientRect(),b=t.getBoundingClientRect(),S=window.getComputedStyle(e),A=window.getComputedStyle(t),C=toInt(S.borderTopWidth)+toInt(A.borderTopWidth),T=toInt(S.borderLeftWidth)+toInt(A.borderLeftWidth),k={top:x.top-b.top-C,left:x.left-b.left-T,width:x.width,height:x.height};i.current.style.transform=`translateY(${k.top}px) translateX(${k.left}px)`,i.current.style.width=`${k.width}px`,i.current.style.height=`${k.height}px`},h=()=>{window.clearTimeout(s.current),i.current&&(i.current.style.transitionDuration="0ms"),f(),s.current=window.setTimeout(()=>{i.current&&(i.current.style.transitionDuration="")},30)},v=reactExports.useRef(null),y=reactExports.useRef(null);return reactExports.useEffect(()=>{if(f(),e)return v.current=new ResizeObserver(h),v.current.observe(e),t&&(y.current=new ResizeObserver(h),y.current.observe(t)),()=>{var x,b;(x=v.current)==null||x.disconnect(),(b=y.current)==null||b.disconnect()}},[t,e]),reactExports.useEffect(()=>{if(t){const x=b=>{isParent(b.target,t)&&(h(),m(!1))};return t.addEventListener("transitionend",x),()=>{t.removeEventListener("transitionend",x)}}},[t]),useTimeout(()=>{getEnv()!=="test"&&d(!0)},20,{autoInvoke:!0}),useMutationObserver(x=>{x.forEach(b=>{b.type==="attributes"&&b.attributeName==="dir"&&h()})},{attributes:!0,attributeFilter:["dir"]},()=>document.documentElement),{initialized:c,hidden:p}}var classes$l={root:"m_96b553a6"};const defaultProps$G={},varsResolver$n=(e,{transitionDuration:t})=>({root:{"--transition-duration":typeof t=="number"?`${t}ms`:t}}),FloatingIndicator=factory((e,t)=>{const i=useProps("FloatingIndicator",defaultProps$G,e),{classNames:o,className:s,style:c,styles:d,unstyled:p,vars:m,target:f,parent:h,transitionDuration:v,mod:y,displayAfterTransitionEnd:x,...b}=i,S=useStyles({name:"FloatingIndicator",classes:classes$l,props:i,className:s,style:c,classNames:o,styles:d,unstyled:p,vars:m,varsResolver:varsResolver$n}),A=reactExports.useRef(null),{initialized:C,hidden:T}=useFloatingIndicator({target:f,parent:h,ref:A,displayAfterTransitionEnd:x}),k=useMergedRef(t,A);return!f||!h?null:jsxRuntimeExports.jsx(Box,{ref:k,mod:[{initialized:C,hidden:T},y],...S("root"),...b})});FloatingIndicator.displayName="@mantine/core/FloatingIndicator";FloatingIndicator.classes=classes$l;var classes$k={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$F={},varsResolver$m=(e,{radius:t,color:i,variant:o,autoContrast:s})=>{const c=e.variantColorResolver({color:i||e.primaryColor,theme:e,variant:o||"light",autoContrast:s});return{root:{"--alert-radius":t===void 0?void 0:getRadius(t),"--alert-bg":i||o?c.background:void 0,"--alert-color":c.color,"--alert-bd":i||o?c.border:void 0}}},Alert=factory((e,t)=>{const i=useProps("Alert",defaultProps$F,e),{classNames:o,className:s,style:c,styles:d,unstyled:p,vars:m,radius:f,color:h,title:v,children:y,id:x,icon:b,withCloseButton:S,onClose:A,closeButtonLabel:C,variant:T,autoContrast:k,...D}=i,w=useStyles({name:"Alert",classes:classes$k,props:i,className:s,style:c,classNames:o,styles:d,unstyled:p,vars:m,varsResolver:varsResolver$m}),R=useId$1(x),_=v&&`${R}-title`||void 0,M=`${R}-body`;return jsxRuntimeExports.jsx(Box,{id:R,...w("root",{variant:T}),variant:T,ref:t,...D,role:"alert","aria-describedby":M,"aria-labelledby":_,children:jsxRuntimeExports.jsxs("div",{...w("wrapper"),children:[b&&jsxRuntimeExports.jsx("div",{...w("icon"),children:b}),jsxRuntimeExports.jsxs("div",{...w("body"),children:[v&&jsxRuntimeExports.jsx("div",{...w("title"),"data-with-close-button":S||void 0,children:jsxRuntimeExports.jsx("span",{id:_,...w("label"),children:v})}),y&&jsxRuntimeExports.jsx("div",{id:M,...w("message"),"data-variant":T,children:y})]}),S&&jsxRuntimeExports.jsx(CloseButton,{...w("closeButton"),onClick:A,variant:"transparent",size:16,iconSize:16,"aria-label":C,unstyled:p})]})})});Alert.classes=classes$k;Alert.displayName="@mantine/core/Alert";var classes$j={root:"m_b6d8b162"};function getTextTruncate(e){if(e==="start")return"start";if(e==="end"||e)return"end"}const defaultProps$E={inherit:!1},varsResolver$l=(e,{variant:t,lineClamp:i,gradient:o,size:s,color:c})=>({root:{"--text-fz":getFontSize(s),"--text-lh":getLineHeight(s),"--text-gradient":t==="gradient"?getGradient(o,e):void 0,"--text-line-clamp":typeof i=="number"?i.toString():void 0,"--text-color":c?getThemeColor(c,e):void 0}}),Text=polymorphicFactory((e,t)=>{const i=useProps("Text",defaultProps$E,e),{lineClamp:o,truncate:s,inline:c,inherit:d,gradient:p,span:m,__staticSelector:f,vars:h,className:v,style:y,classNames:x,styles:b,unstyled:S,variant:A,mod:C,size:T,...k}=i,D=useStyles({name:["Text",f],props:i,classes:classes$j,className:v,style:y,classNames:x,styles:b,unstyled:S,vars:h,varsResolver:varsResolver$l});return jsxRuntimeExports.jsx(Box,{...D("root",{focusable:!0}),ref:t,component:m?"span":"p",variant:A,mod:[{"data-truncate":getTextTruncate(s),"data-line-clamp":typeof o=="number","data-inline":c,"data-inherit":d},C],size:T,...k})});Text.classes=classes$j;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$i={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$D={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$D,e),{size:o,error:s,style:c,className:d,classNames:p,styles:m,unstyled:f,vars:h,mod:v,...y}=i,x=useStyles({name:"ComboboxChevron",classes:classes$i,props:i,style:c,className:d,classNames:p,styles:m,unstyled:f,vars:h,varsResolver:varsResolver$k,rootSelector:"chevron"});return jsxRuntimeExports.jsx(Box,{component:"svg",...y,...x("chevron"),size:o,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",mod:["combobox-chevron",{error:s},v],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$i;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:o,...s},c)=>jsxRuntimeExports.jsx(Input.ClearButton,{ref:c,tabIndex:-1,"aria-hidden":!0,...s,onMouseDown:d=>{d.preventDefault(),t==null||t(d)},onClick:d=>{o(),i==null||i(d)}}));ComboboxClearButton.displayName="@mantine/core/ComboboxClearButton";const defaultProps$C={},ComboboxDropdown=factory((e,t)=>{const{classNames:i,styles:o,className:s,style:c,hidden:d,...p}=useProps("ComboboxDropdown",defaultProps$C,e),m=useComboboxContext();return jsxRuntimeExports.jsx(Popover.Dropdown,{...p,ref:t,role:"presentation","data-hidden":d||void 0,...m.getStyles("dropdown",{className:s,style:c,classNames:i,styles:o})})});ComboboxDropdown.classes=classes$i;ComboboxDropdown.displayName="@mantine/core/ComboboxDropdown";const defaultProps$B={refProp:"ref"},ComboboxDropdownTarget=factory((e,t)=>{const{children:i,refProp:o}=useProps("ComboboxDropdownTarget",defaultProps$B,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:o,children:i})});ComboboxDropdownTarget.displayName="@mantine/core/ComboboxDropdownTarget";const defaultProps$A={},ComboboxEmpty=factory((e,t)=>{const{classNames:i,className:o,style:s,styles:c,vars:d,...p}=useProps("ComboboxEmpty",defaultProps$A,e),m=useComboboxContext();return jsxRuntimeExports.jsx(Box,{ref:t,...m.getStyles("empty",{className:o,classNames:i,styles:c,style:s}),...p})});ComboboxEmpty.classes=classes$i;ComboboxEmpty.displayName="@mantine/core/ComboboxEmpty";function useComboboxTargetProps({onKeyDown:e,withKeyboardNavigation:t,withAriaAttributes:i,withExpandedAttribute:o,targetType:s,autoComplete:c}){const d=useComboboxContext(),[p,m]=reactExports.useState(null),f=v=>{if(e==null||e(v),!d.readOnly&&t){if(v.nativeEvent.isComposing)return;if(v.nativeEvent.code==="ArrowDown"&&(v.preventDefault(),d.store.dropdownOpened?m(d.store.selectNextOption()):(d.store.openDropdown("keyboard"),m(d.store.selectActiveOption()),d.store.updateSelectedOptionIndex("selected",{scrollIntoView:!0}))),v.nativeEvent.code==="ArrowUp"&&(v.preventDefault(),d.store.dropdownOpened?m(d.store.selectPreviousOption()):(d.store.openDropdown("keyboard"),m(d.store.selectActiveOption()),d.store.updateSelectedOptionIndex("selected",{scrollIntoView:!0}))),v.nativeEvent.code==="Enter"||v.nativeEvent.code==="NumpadEnter"){if(v.nativeEvent.keyCode===229)return;const y=d.store.getSelectedOptionIndex();d.store.dropdownOpened&&y!==-1?(v.preventDefault(),d.store.clickSelectedOption()):s==="button"&&(v.preventDefault(),d.store.openDropdown("keyboard"))}v.key==="Escape"&&d.store.closeDropdown("keyboard"),v.nativeEvent.code==="Space"&&s==="button"&&(v.preventDefault(),d.store.toggleDropdown("keyboard"))}};return{...i?{"aria-haspopup":"listbox","aria-expanded":o&&!!(d.store.listId&&d.store.dropdownOpened)||void 0,"aria-controls":d.store.dropdownOpened?d.store.listId:void 0,"aria-activedescendant":d.store.dropdownOpened&&p||void 0,autoComplete:c,"data-expanded":d.store.dropdownOpened||void 0,"data-mantine-stop-propagation":d.store.dropdownOpened||void 0}:{},onKeyDown:f}}const defaultProps$z={refProp:"ref",targetType:"input",withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:"off"},ComboboxEventsTarget=factory((e,t)=>{const{children:i,refProp:o,withKeyboardNavigation:s,withAriaAttributes:c,withExpandedAttribute:d,targetType:p,autoComplete:m,...f}=useProps("ComboboxEventsTarget",defaultProps$z,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 h=useComboboxContext(),v=useComboboxTargetProps({targetType:p,withAriaAttributes:c,withKeyboardNavigation:s,withExpandedAttribute:d,onKeyDown:i.props.onKeyDown,autoComplete:m});return reactExports.cloneElement(i,{...v,...f,[o]:useMergedRef(t,h.store.targetRef,getRefProp(i))})});ComboboxEventsTarget.displayName="@mantine/core/ComboboxEventsTarget";const defaultProps$y={},ComboboxFooter=factory((e,t)=>{const{classNames:i,className:o,style:s,styles:c,vars:d,...p}=useProps("ComboboxFooter",defaultProps$y,e),m=useComboboxContext();return jsxRuntimeExports.jsx(Box,{ref:t,...m.getStyles("footer",{className:o,classNames:i,style:s,styles:c}),...p,onMouseDown:f=>{f.preventDefault()}})});ComboboxFooter.classes=classes$i;ComboboxFooter.displayName="@mantine/core/ComboboxFooter";const defaultProps$x={},ComboboxGroup=factory((e,t)=>{const{classNames:i,className:o,style:s,styles:c,vars:d,children:p,label:m,...f}=useProps("ComboboxGroup",defaultProps$x,e),h=useComboboxContext();return jsxRuntimeExports.jsxs(Box,{ref:t,...h.getStyles("group",{className:o,classNames:i,style:s,styles:c}),...f,children:[m&&jsxRuntimeExports.jsx("div",{...h.getStyles("groupLabel",{classNames:i,styles:c}),children:m}),p]})});ComboboxGroup.classes=classes$i;ComboboxGroup.displayName="@mantine/core/ComboboxGroup";const defaultProps$w={},ComboboxHeader=factory((e,t)=>{const{classNames:i,className:o,style:s,styles:c,vars:d,...p}=useProps("ComboboxHeader",defaultProps$w,e),m=useComboboxContext();return jsxRuntimeExports.jsx(Box,{ref:t,...m.getStyles("header",{className:o,classNames:i,style:s,styles:c}),...p,onMouseDown:f=>{f.preventDefault()}})});ComboboxHeader.classes=classes$i;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$v={},ComboboxOption=factory((e,t)=>{const i=useProps("ComboboxOption",defaultProps$v,e),{classNames:o,className:s,style:c,styles:d,vars:p,onClick:m,id:f,active:h,onMouseDown:v,onMouseOver:y,disabled:x,selected:b,mod:S,...A}=i,C=useComboboxContext(),T=reactExports.useId(),k=f||T;return jsxRuntimeExports.jsx(Box,{...C.getStyles("option",{className:s,classNames:o,styles:d,style:c}),...A,ref:t,id:k,mod:["combobox-option",{"combobox-active":h,"combobox-disabled":x,"combobox-selected":b},S],role:"option",onClick:D=>{var w;x?D.preventDefault():((w=C.onOptionSubmit)==null||w.call(C,i.value,i),m==null||m(D))},onMouseDown:D=>{D.preventDefault(),v==null||v(D)},onMouseOver:D=>{C.resetSelectionOnOptionHover&&C.store.resetSelectedOption(),y==null||y(D)}})});ComboboxOption.classes=classes$i;ComboboxOption.displayName="@mantine/core/ComboboxOption";const defaultProps$u={},ComboboxOptions=factory((e,t)=>{const i=useProps("ComboboxOptions",defaultProps$u,e),{classNames:o,className:s,style:c,styles:d,id:p,onMouseDown:m,labelledBy:f,...h}=i,v=useComboboxContext(),y=useId$1(p);return reactExports.useEffect(()=>{v.store.setListId(y)},[y]),jsxRuntimeExports.jsx(Box,{ref:t,...v.getStyles("options",{className:s,style:c,classNames:o,styles:d}),...h,id:y,role:"listbox","aria-labelledby":f,onMouseDown:x=>{x.preventDefault(),m==null||m(x)}})});ComboboxOptions.classes=classes$i;ComboboxOptions.displayName="@mantine/core/ComboboxOptions";const defaultProps$t={withAriaAttributes:!0,withKeyboardNavigation:!0},ComboboxSearch=factory((e,t)=>{const i=useProps("ComboboxSearch",defaultProps$t,e),{classNames:o,styles:s,unstyled:c,vars:d,withAriaAttributes:p,onKeyDown:m,withKeyboardNavigation:f,size:h,...v}=i,y=useComboboxContext(),x=y.getStyles("search"),b=useComboboxTargetProps({targetType:"input",withAriaAttributes:p,withKeyboardNavigation:f,withExpandedAttribute:!1,onKeyDown:m,autoComplete:"off"});return jsxRuntimeExports.jsx(Input,{ref:useMergedRef(t,y.store.searchRef),classNames:[{input:x.className},o],styles:[{input:x.style},s],size:h||y.size,...b,...v,__staticSelector:"Combobox"})});ComboboxSearch.classes=classes$i;ComboboxSearch.displayName="@mantine/core/ComboboxSearch";const defaultProps$s={refProp:"ref",targetType:"input",withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:"off"},ComboboxTarget=factory((e,t)=>{const{children:i,refProp:o,withKeyboardNavigation:s,withAriaAttributes:c,withExpandedAttribute:d,targetType:p,autoComplete:m,...f}=useProps("ComboboxTarget",defaultProps$s,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 h=useComboboxContext(),v=useComboboxTargetProps({targetType:p,withAriaAttributes:c,withKeyboardNavigation:s,withExpandedAttribute:d,onKeyDown:i.props.onKeyDown,autoComplete:m}),y=reactExports.cloneElement(i,{...v,...f});return jsxRuntimeExports.jsx(Popover.Target,{ref:useMergedRef(t,h.store.targetRef),children:y})});ComboboxTarget.displayName="@mantine/core/ComboboxTarget";function getPreviousIndex(e,t,i){for(let o=e-1;o>=0;o-=1)if(!t[o].hasAttribute("data-combobox-disabled"))return o;if(i){for(let o=t.length-1;o>-1;o-=1)if(!t[o].hasAttribute("data-combobox-disabled"))return o}return e}function getNextIndex(e,t,i){for(let o=e+1;o<t.length;o+=1)if(!t[o].hasAttribute("data-combobox-disabled"))return o;if(i){for(let o=0;o<t.length;o+=1)if(!t[o].hasAttribute("data-combobox-disabled"))return o}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:o,onDropdownOpen:s,loop:c=!0,scrollBehavior:d="instant"}={}){const[p,m]=useUncontrolled({value:t,defaultValue:e,finalValue:!1,onChange:i}),f=reactExports.useRef(null),h=reactExports.useRef(-1),v=reactExports.useRef(null),y=reactExports.useRef(null),x=reactExports.useRef(-1),b=reactExports.useRef(-1),S=reactExports.useRef(-1),A=reactExports.useCallback((B="unknown")=>{p||(m(!0),s==null||s(B))},[m,s,p]),C=reactExports.useCallback((B="unknown")=>{p&&(m(!1),o==null||o(B))},[m,o,p]),T=reactExports.useCallback((B="unknown")=>{p?C(B):A(B)},[C,A,p]),k=reactExports.useCallback(()=>{const B=document.querySelector(`#${f.current} [data-combobox-selected]`);B==null||B.removeAttribute("data-combobox-selected"),B==null||B.removeAttribute("aria-selected")},[]),D=reactExports.useCallback(B=>{const q=document.getElementById(f.current),K=q==null?void 0:q.querySelectorAll("[data-combobox-option]");if(!K)return null;const U=B>=K.length?0:B<0?K.length-1:B;return h.current=U,K!=null&&K[U]&&!K[U].hasAttribute("data-combobox-disabled")?(k(),K[U].setAttribute("data-combobox-selected","true"),K[U].setAttribute("aria-selected","true"),K[U].scrollIntoView({block:"nearest",behavior:d}),K[U].id):null},[d,k]),w=reactExports.useCallback(()=>{const B=document.querySelector(`#${f.current} [data-combobox-active]`);if(B){const q=document.querySelectorAll(`#${f.current} [data-combobox-option]`),K=Array.from(q).findIndex(U=>U===B);return D(K)}return D(0)},[D]),R=reactExports.useCallback(()=>D(getNextIndex(h.current,document.querySelectorAll(`#${f.current} [data-combobox-option]`),c)),[D,c]),_=reactExports.useCallback(()=>D(getPreviousIndex(h.current,document.querySelectorAll(`#${f.current} [data-combobox-option]`),c)),[D,c]),M=reactExports.useCallback(()=>D(getFirstIndex(document.querySelectorAll(`#${f.current} [data-combobox-option]`))),[D]),N=reactExports.useCallback((B="selected",q)=>{S.current=window.setTimeout(()=>{var $;const K=document.querySelectorAll(`#${f.current} [data-combobox-option]`),U=Array.from(K).findIndex(Y=>Y.hasAttribute(`data-combobox-${B}`));h.current=U,q!=null&&q.scrollIntoView&&(($=K[U])==null||$.scrollIntoView({block:"nearest",behavior:d}))},0)},[]),P=reactExports.useCallback(()=>{h.current=-1,k()},[k]),L=reactExports.useCallback(()=>{const B=document.querySelectorAll(`#${f.current} [data-combobox-option]`),q=B==null?void 0:B[h.current];q==null||q.click()},[]),I=reactExports.useCallback(B=>{f.current=B},[]),W=reactExports.useCallback(()=>{x.current=window.setTimeout(()=>v.current.focus(),0)},[]),ae=reactExports.useCallback(()=>{b.current=window.setTimeout(()=>y.current.focus(),0)},[]),Q=reactExports.useCallback(()=>h.current,[]);return reactExports.useEffect(()=>()=>{window.clearTimeout(x.current),window.clearTimeout(b.current),window.clearTimeout(S.current)},[]),{dropdownOpened:p,openDropdown:A,closeDropdown:C,toggleDropdown:T,selectedOptionIndex:h.current,getSelectedOptionIndex:Q,selectOption:D,selectFirstOption:M,selectActiveOption:w,selectNextOption:R,selectPreviousOption:_,resetSelectedOption:P,updateSelectedOptionIndex:N,listId:f.current,setListId:I,clickSelectedOption:L,searchRef:v,focusSearchInput:W,targetRef:y,focusTarget:ae}}const defaultProps$r={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$r,e),{classNames:i,styles:o,unstyled:s,children:c,store:d,vars:p,onOptionSubmit:m,onClose:f,size:h,dropdownPadding:v,resetSelectionOnOptionHover:y,__staticSelector:x,readOnly:b,...S}=t,A=useCombobox(),C=d||A,T=useStyles({name:x||"Combobox",classes:classes$i,props:t,classNames:i,styles:o,unstyled:s,vars:p,varsResolver:varsResolver$j}),k=()=>{f==null||f(),C.closeDropdown()};return jsxRuntimeExports.jsx(ComboboxProvider,{value:{getStyles:T,store:C,onOptionSubmit:m,size:h,resetSelectionOnOptionHover:y,readOnly:b},children:jsxRuntimeExports.jsx(Popover,{opened:C.dropdownOpened,...S,onChange:D=>!D&&k(),withRoles:!1,unstyled:s,children:c})})}const extendCombobox=e=>e;Combobox.extend=extendCombobox;Combobox.classes=classes$i;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$h={root:"m_5f75b09e",body:"m_5f6e695e",labelWrapper:"m_d3ea56bb",label:"m_8ee546b8",description:"m_328f68c0",error:"m_8e8a99cc"};const InlineInputClasses=classes$h,InlineInput=reactExports.forwardRef(({__staticSelector:e,__stylesApiProps:t,className:i,classNames:o,styles:s,unstyled:c,children:d,label:p,description:m,id:f,disabled:h,error:v,size:y,labelPosition:x="left",bodyElement:b="div",labelElement:S="label",variant:A,style:C,vars:T,mod:k,...D},w)=>{const R=useStyles({name:e,props:t,className:i,style:C,classes:classes$h,classNames:o,styles:s,unstyled:c});return jsxRuntimeExports.jsx(Box,{...R("root"),ref:w,__vars:{"--label-fz":getFontSize(y),"--label-lh":getSize(y,"label-lh")},mod:[{"label-position":x},k],variant:A,size:y,...D,children:jsxRuntimeExports.jsxs(Box,{component:b,htmlFor:b==="label"?f:void 0,...R("body"),children:[d,jsxRuntimeExports.jsxs("div",{...R("labelWrapper"),"data-disabled":h||void 0,children:[p&&jsxRuntimeExports.jsx(Box,{component:S,htmlFor:S==="label"?f:void 0,...R("label"),"data-disabled":h||void 0,children:p}),m&&jsxRuntimeExports.jsx(Input.Description,{size:y,__inheritStyles:!1,...R("description"),children:m}),v&&typeof v!="boolean"&&jsxRuntimeExports.jsx(Input.Error,{size:y,__inheritStyles:!1,...R("error"),children:v})]})]})})});InlineInput.displayName="@mantine/core/InlineInput";const CheckboxGroupContext=reactExports.createContext(null),CheckboxGroupProvider=CheckboxGroupContext.Provider,useCheckboxGroupContext=()=>reactExports.useContext(CheckboxGroupContext),[CheckboxCardProvider,useCheckboxCardContext]=createOptionalContext();var classes$g={card:"m_26775b0a"};const defaultProps$q={withBorder:!0},varsResolver$i=(e,{radius:t})=>({card:{"--card-radius":getRadius(t)}}),CheckboxCard=factory((e,t)=>{const i=useProps("CheckboxCard",defaultProps$q,e),{classNames:o,className:s,style:c,styles:d,unstyled:p,vars:m,checked:f,mod:h,withBorder:v,value:y,onClick:x,defaultChecked:b,onChange:S,...A}=i,C=useStyles({name:"CheckboxCard",classes:classes$g,props:i,className:s,style:c,classNames:o,styles:d,unstyled:p,vars:m,varsResolver:varsResolver$i,rootSelector:"card"}),T=useCheckboxGroupContext(),k=typeof f=="boolean"?f:T?T.value.includes(y||""):void 0,[D,w]=useUncontrolled({value:k,defaultValue:b,finalValue:!1,onChange:S});return jsxRuntimeExports.jsx(CheckboxCardProvider,{value:{checked:D},children:jsxRuntimeExports.jsx(UnstyledButton,{ref:t,mod:[{"with-border":v,checked:D},h],...C("card"),...A,role:"checkbox","aria-checked":D,onClick:R=>{x==null||x(R),T==null||T.onChange(y||""),w(!D)}})})});CheckboxCard.displayName="@mantine/core/CheckboxCard";CheckboxCard.classes=classes$g;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$p={},CheckboxGroup=factory((e,t)=>{const{value:i,defaultValue:o,onChange:s,size:c,wrapperProps:d,children:p,readOnly:m,...f}=useProps("CheckboxGroup",defaultProps$p,e),[h,v]=useUncontrolled({value:i,defaultValue:o,finalValue:[],onChange:s}),y=x=>{const b=typeof x=="string"?x:x.currentTarget.value;!m&&v(h.includes(b)?h.filter(S=>S!==b):[...h,b])};return jsxRuntimeExports.jsx(CheckboxGroupProvider,{value:{value:h,onChange:y,size:c},children:jsxRuntimeExports.jsx(Input.Wrapper,{size:c,ref:t,...d,...f,labelElement:"div",__staticSelector:"CheckboxGroup",children:jsxRuntimeExports.jsx(InputsGroupFieldset,{role:"group",children:p})})})});CheckboxGroup.classes=Input.Wrapper.classes;CheckboxGroup.displayName="@mantine/core/CheckboxGroup";function CheckIcon({size:e,style:t,...i}){const o=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:o,"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$f={indicator:"m_5e5256ee",icon:"m_1b1c543a","indicator--outline":"m_76e20374"};const defaultProps$o={icon:CheckboxIcon},varsResolver$h=(e,{radius:t,color:i,size:o,iconColor:s,variant:c,autoContrast:d})=>{const p=parseThemeColor({color:i||e.primaryColor,theme:e}),m=p.isThemeColor&&p.shade===void 0?`var(--mantine-color-${p.color}-outline)`:p.color;return{indicator:{"--checkbox-size":getSize(o,"checkbox-size"),"--checkbox-radius":t===void 0?void 0:getRadius(t),"--checkbox-color":c==="outline"?m:getThemeColor(i,e),"--checkbox-icon-color":s?getThemeColor(s,e):getAutoContrastValue(d,e)?getContrastColor({color:i,theme:e,autoContrast:d}):void 0}}},CheckboxIndicator=factory((e,t)=>{const i=useProps("CheckboxIndicator",defaultProps$o,e),{classNames:o,className:s,style:c,styles:d,unstyled:p,vars:m,icon:f,indeterminate:h,radius:v,color:y,iconColor:x,autoContrast:b,checked:S,mod:A,variant:C,disabled:T,...k}=i,D=f,w=useStyles({name:"CheckboxIndicator",classes:classes$f,props:i,className:s,style:c,classNames:o,styles:d,unstyled:p,vars:m,varsResolver:varsResolver$h,rootSelector:"indicator"}),R=useCheckboxCardContext(),_=typeof S=="boolean"||typeof h=="boolean"?S||h:(R==null?void 0:R.checked)||!1;return jsxRuntimeExports.jsx(Box,{ref:t,...w("indicator",{variant:C}),variant:C,mod:[{checked:_,disabled:T},A],...k,children:jsxRuntimeExports.jsx(D,{indeterminate:h,...w("icon")})})});CheckboxIndicator.displayName="@mantine/core/CheckboxIndicator";CheckboxIndicator.classes=classes$f;var classes$e={root:"m_bf2d988c",inner:"m_26062bec",input:"m_26063560",icon:"m_bf295423","input--outline":"m_215c4542"};const defaultProps$n={labelPosition:"right",icon:CheckboxIcon},varsResolver$g=(e,{radius:t,color:i,size:o,iconColor:s,variant:c,autoContrast:d})=>{const p=parseThemeColor({color:i||e.primaryColor,theme:e}),m=p.isThemeColor&&p.shade===void 0?`var(--mantine-color-${p.color}-outline)`:p.color;return{root:{"--checkbox-size":getSize(o,"checkbox-size"),"--checkbox-radius":t===void 0?void 0:getRadius(t),"--checkbox-color":c==="outline"?m:getThemeColor(i,e),"--checkbox-icon-color":s?getThemeColor(s,e):getAutoContrastValue(d,e)?getContrastColor({color:i,theme:e,autoContrast:d}):void 0}}},Checkbox=factory((e,t)=>{const i=useProps("Checkbox",defaultProps$n,e),{classNames:o,className:s,style:c,styles:d,unstyled:p,vars:m,color:f,label:h,id:v,size:y,radius:x,wrapperProps:b,checked:S,labelPosition:A,description:C,error:T,disabled:k,variant:D,indeterminate:w,icon:R,rootRef:_,iconColor:M,onChange:N,autoContrast:P,mod:L,...I}=i,W=useCheckboxGroupContext(),ae=y||(W==null?void 0:W.size),Q=R,B=useStyles({name:"Checkbox",props:i,classes:classes$e,className:s,style:c,classNames:o,styles:d,unstyled:p,vars:m,varsResolver:varsResolver$g}),{styleProps:q,rest:K}=extractStyleProps(I),U=useId$1(v),$=W?{checked:W.value.includes(K.value),onChange:O=>{W.onChange(O),N==null||N(O)}}:{},Y=reactExports.useRef(null),z=t||Y;return reactExports.useEffect(()=>{z&&"current"in z&&z.current&&(z.current.indeterminate=w||!1)},[w,z]),jsxRuntimeExports.jsx(InlineInput,{...B("root"),__staticSelector:"Checkbox",__stylesApiProps:i,id:U,size:ae,labelPosition:A,label:h,description:C,error:T,disabled:k,classNames:o,styles:d,unstyled:p,"data-checked":$.checked||S||void 0,variant:D,ref:_,mod:L,...q,...b,children:jsxRuntimeExports.jsxs(Box,{...B("inner"),mod:{"data-label-position":A},children:[jsxRuntimeExports.jsx(Box,{component:"input",id:U,ref:z,checked:S,disabled:k,mod:{error:!!T,indeterminate:w},...B("input",{focusable:!0,variant:D}),onChange:N,...K,...$,type:"checkbox"}),jsxRuntimeExports.jsx(Q,{indeterminate:w,...B("icon")})]})})});Checkbox.classes={...classes$e,...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 o=t.trim().toLowerCase(),s=[];for(let c=0;c<e.length;c+=1){const d=e[c];if(s.length===i)return s;isOptionsGroup(d)&&s.push({group:d.group,items:defaultOptionsFilter({options:d.items,search:t,limit:i-s.length})}),isOptionsGroup(d)||d.label.toLowerCase().includes(o)&&s.push(d)}return s}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:o,unstyled:s,renderOption:c}){if(!isOptionsGroup(e)){const p=isValueChecked(i,e.value),m=t&&p&&jsxRuntimeExports.jsx(CheckIcon,{className:classes$i.optionsDropdownCheckIcon}),f=jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[o==="left"&&m,jsxRuntimeExports.jsx("span",{children:e.label}),o==="right"&&m]});return jsxRuntimeExports.jsx(Combobox.Option,{value:e.value,disabled:e.disabled,className:clsx({[classes$i.optionsDropdownOption]:!s}),"data-reverse":o==="right"||void 0,"data-checked":p||void 0,"aria-selected":p,active:p,children:typeof c=="function"?c({option:e,checked:p}):f})}const d=e.items.map(p=>jsxRuntimeExports.jsx(Option,{data:p,value:i,unstyled:s,withCheckIcon:t,checkIconPosition:o,renderOption:c},p.value));return jsxRuntimeExports.jsx(Combobox.Group,{label:e.group,children:d})}function OptionsDropdown({data:e,hidden:t,hiddenWhenEmpty:i,filter:o,search:s,limit:c,maxDropdownHeight:d,withScrollArea:p=!0,filterOptions:m=!0,withCheckIcon:f=!1,value:h,checkIconPosition:v,nothingFoundMessage:y,unstyled:x,labelId:b,renderOption:S,scrollAreaProps:A,"aria-label":C}){validateOptions(e);const k=typeof s=="string"?(o||defaultOptionsFilter)({options:e,search:m?s:"",limit:c??1/0}):e,D=isEmptyComboboxData(k),w=k.map(R=>jsxRuntimeExports.jsx(Option,{data:R,withCheckIcon:f,value:h,checkIconPosition:v,unstyled:x,renderOption:S},isOptionsGroup(R)?R.group:R.value));return jsxRuntimeExports.jsx(Combobox.Dropdown,{hidden:t||i&&D,"data-composed":!0,children:jsxRuntimeExports.jsxs(Combobox.Options,{labelledBy:b,"aria-label":C,children:[p?jsxRuntimeExports.jsx(ScrollArea.Autosize,{mah:d??220,type:"scroll",scrollbarSize:"var(--combobox-padding)",offsetScrollbars:"y",...A,children:w}):w,D&&y&&jsxRuntimeExports.jsx(Combobox.Empty,{children:y})]})})}var classes$d={root:"m_347db0ec","root--dot":"m_fbd81e3d",label:"m_5add502a",section:"m_91fdda9b"};const defaultProps$m={},varsResolver$f=(e,{radius:t,color:i,gradient:o,variant:s,size:c,autoContrast:d})=>{const p=e.variantColorResolver({color:i||e.primaryColor,theme:e,gradient:o,variant:s||"filled",autoContrast:d});return{root:{"--badge-height":getSize(c,"badge-height"),"--badge-padding-x":getSize(c,"badge-padding-x"),"--badge-fz":getSize(c,"badge-fz"),"--badge-radius":t===void 0?void 0:getRadius(t),"--badge-bg":i||s?p.background:void 0,"--badge-color":i||s?p.color:void 0,"--badge-bd":i||s?p.border:void 0,"--badge-dot-color":s==="dot"?getThemeColor(i,e):void 0}}},Badge=polymorphicFactory((e,t)=>{const i=useProps("Badge",defaultProps$m,e),{classNames:o,className:s,style:c,styles:d,unstyled:p,vars:m,radius:f,color:h,gradient:v,leftSection:y,rightSection:x,children:b,variant:S,fullWidth:A,autoContrast:C,circle:T,mod:k,...D}=i,w=useStyles({name:"Badge",props:i,classes:classes$d,className:s,style:c,classNames:o,styles:d,unstyled:p,vars:m,varsResolver:varsResolver$f});return jsxRuntimeExports.jsxs(Box,{variant:S,mod:[{block:A,circle:T,"with-right-section":!!x,"with-left-section":!!y},k],...w("root",{variant:S}),ref:t,...D,children:[y&&jsxRuntimeExports.jsx("span",{...w("section"),"data-position":"left",children:y}),jsxRuntimeExports.jsx("span",{...w("label"),children:b}),x&&jsxRuntimeExports.jsx("span",{...w("section"),"data-position":"right",children:x})]})});Badge.classes=classes$d;Badge.displayName="@mantine/core/Badge";var classes$c={root:"m_77c9d27d",inner:"m_80f1301b",label:"m_811560b9",section:"m_a74036a",loader:"m_a25b86ee",group:"m_80d6d844",groupSection:"m_70be2a01"};const defaultProps$l={orientation:"horizontal"},varsResolver$e=(e,{borderWidth:t})=>({group:{"--button-border-width":rem(t)}}),ButtonGroup=factory((e,t)=>{const i=useProps("ButtonGroup",defaultProps$l,e),{className:o,style:s,classNames:c,styles:d,unstyled:p,orientation:m,vars:f,borderWidth:h,variant:v,mod:y,...x}=useProps("ButtonGroup",defaultProps$l,e),b=useStyles({name:"ButtonGroup",props:i,classes:classes$c,className:o,style:s,classNames:c,styles:d,unstyled:p,vars:f,varsResolver:varsResolver$e,rootSelector:"group"});return jsxRuntimeExports.jsx(Box,{...b("group"),ref:t,variant:v,mod:[{"data-orientation":m},y],role:"group",...x})});ButtonGroup.classes=classes$c;ButtonGroup.displayName="@mantine/core/ButtonGroup";const defaultProps$k={},varsResolver$d=(e,{radius:t,color:i,gradient:o,variant:s,autoContrast:c,size:d})=>{const p=e.variantColorResolver({color:i||e.primaryColor,theme:e,gradient:o,variant:s||"filled",autoContrast:c});return{groupSection:{"--section-height":getSize(d,"section-height"),"--section-padding-x":getSize(d,"section-padding-x"),"--section-fz":d!=null&&d.includes("compact")?getFontSize(d.replace("compact-","")):getFontSize(d),"--section-radius":t===void 0?void 0:getRadius(t),"--section-bg":i||s?p.background:void 0,"--section-color":p.color,"--section-bd":i||s?p.border:void 0}}},ButtonGroupSection=factory((e,t)=>{const i=useProps("ButtonGroupSection",defaultProps$k,e),{className:o,style:s,classNames:c,styles:d,unstyled:p,vars:m,variant:f,gradient:h,radius:v,autoContrast:y,...x}=useProps("ButtonGroupSection",defaultProps$k,e),b=useStyles({name:"ButtonGroupSection",props:i,classes:classes$c,className:o,style:s,classNames:c,styles:d,unstyled:p,vars:m,varsResolver:varsResolver$d,rootSelector:"groupSection"});return jsxRuntimeExports.jsx(Box,{...b("groupSection"),ref:t,variant:f,...x})});ButtonGroupSection.classes=classes$c;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$j={},varsResolver$c=(e,{radius:t,color:i,gradient:o,variant:s,size:c,justify:d,autoContrast:p})=>{const m=e.variantColorResolver({color:i||e.primaryColor,theme:e,gradient:o,variant:s||"filled",autoContrast:p});return{root:{"--button-justify":d,"--button-height":getSize(c,"button-height"),"--button-padding-x":getSize(c,"button-padding-x"),"--button-fz":c!=null&&c.includes("compact")?getFontSize(c.replace("compact-","")):getFontSize(c),"--button-radius":t===void 0?void 0:getRadius(t),"--button-bg":i||s?m.background:void 0,"--button-hover":i||s?m.hover:void 0,"--button-color":m.color,"--button-bd":i||s?m.border:void 0,"--button-hover-color":i||s?m.hoverColor:void 0}}},Button=polymorphicFactory((e,t)=>{const i=useProps("Button",defaultProps$j,e),{style:o,vars:s,className:c,color:d,disabled:p,children:m,leftSection:f,rightSection:h,fullWidth:v,variant:y,radius:x,loading:b,loaderProps:S,gradient:A,classNames:C,styles:T,unstyled:k,"data-disabled":D,autoContrast:w,mod:R,..._}=i,M=useStyles({name:"Button",props:i,classes:classes$c,className:c,style:o,classNames:C,styles:T,unstyled:k,vars:s,varsResolver:varsResolver$c}),N=!!f,P=!!h;return jsxRuntimeExports.jsxs(UnstyledButton,{ref:t,...M("root",{active:!p&&!b&&!D}),unstyled:k,variant:y,disabled:p||b,mod:[{disabled:p||D,loading:b,block:v,"with-left-section":N,"with-right-section":P},R],..._,children:[jsxRuntimeExports.jsx(Transition,{mounted:!!b,transition:loaderTransition,duration:150,children:L=>jsxRuntimeExports.jsx(Box,{component:"span",...M("loader",{style:L}),"aria-hidden":!0,children:jsxRuntimeExports.jsx(Loader,{color:"var(--button-color)",size:"calc(var(--button-height) / 1.8)",...S})})}),jsxRuntimeExports.jsxs("span",{...M("inner"),children:[f&&jsxRuntimeExports.jsx(Box,{component:"span",...M("section"),mod:{position:"left"},children:f}),jsxRuntimeExports.jsx(Box,{component:"span",mod:{loading:b},...M("label"),children:m}),h&&jsxRuntimeExports.jsx(Box,{component:"span",...M("section"),mod:{position:"right"},children:h})]})]})});Button.classes=classes$c;Button.displayName="@mantine/core/Button";Button.Group=ButtonGroup;Button.GroupSection=ButtonGroupSection;const[CardProvider,useCardContext]=createSafeContext("Card component was not found in tree");var classes$b={root:"m_e615b15f",section:"m_599a2148"};const defaultProps$i={},CardSection=polymorphicFactory((e,t)=>{const i=useProps("CardSection",defaultProps$i,e),{classNames:o,className:s,style:c,styles:d,vars:p,withBorder:m,inheritPadding:f,mod:h,...v}=i,y=useCardContext();return jsxRuntimeExports.jsx(Box,{ref:t,mod:[{"with-border":m,"inherit-padding":f},h],...y.getStyles("section",{className:s,style:c,styles:d,classNames:o}),...v})});CardSection.classes=classes$b;CardSection.displayName="@mantine/core/CardSection";const defaultProps$h={},varsResolver$b=(e,{padding:t})=>({root:{"--card-padding":getSpacing(t)}}),Card=polymorphicFactory((e,t)=>{const i=useProps("Card",defaultProps$h,e),{classNames:o,className:s,style:c,styles:d,unstyled:p,vars:m,children:f,padding:h,...v}=i,y=useStyles({name:"Card",props:i,classes:classes$b,className:s,style:c,classNames:o,styles:d,unstyled:p,vars:m,varsResolver:varsResolver$b}),x=reactExports.Children.toArray(f),b=x.map((S,A)=>typeof S=="object"&&S&&"type"in S&&S.type===CardSection?reactExports.cloneElement(S,{"data-first-section":A===0||void 0,"data-last-section":A===x.length-1||void 0}):S);return jsxRuntimeExports.jsx(CardProvider,{value:{getStyles:y},children:jsxRuntimeExports.jsx(Paper,{ref:t,unstyled:p,...y("root"),...v,children:b})})});Card.classes=classes$b;Card.displayName="@mantine/core/Card";Card.Section=CardSection;var classes$a={root:"m_4451eb3a"};const defaultProps$g={},Center=polymorphicFactory((e,t)=>{const i=useProps("Center",defaultProps$g,e),{classNames:o,className:s,style:c,styles:d,unstyled:p,vars:m,inline:f,mod:h,...v}=i,y=useStyles({name:"Center",props:i,classes:classes$a,className:s,style:c,classNames:o,styles:d,unstyled:p,vars:m});return jsxRuntimeExports.jsx(Box,{ref:t,mod:[{inline:f},h],...y("root"),...v})});Center.classes=classes$a;Center.displayName="@mantine/core/Center";var classes$9={root:"m_9e117634"};const defaultProps$f={},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$f,e),{classNames:o,className:s,style:c,styles:d,unstyled:p,vars:m,onError:f,src:h,radius:v,fit:y,fallbackSrc:x,mod:b,...S}=i,[A,C]=reactExports.useState(!h);reactExports.useEffect(()=>C(!h),[h]);const T=useStyles({name:"Image",classes:classes$9,props:i,className:s,style:c,classNames:o,styles:d,unstyled:p,vars:m,varsResolver:varsResolver$a});return A&&x?jsxRuntimeExports.jsx(Box,{component:"img",ref:t,src:x,...T("root"),onError:f,mod:["fallback",b],...S}):jsxRuntimeExports.jsx(Box,{component:"img",ref:t,...T("root"),src:h,onError:k=>{f==null||f(k),C(!0)},mod:b,...S})});Image$1.classes=classes$9;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 o in i)({}).hasOwnProperty.call(i,o)&&(e[o]=i[o])}return e},_extends.apply(null,arguments)}var classes$8={root:"m_6e45937b",loader:"m_e8eb006c",overlay:"m_df587f17"};const defaultProps$e={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$e,e),{classNames:o,className:s,style:c,styles:d,unstyled:p,vars:m,transitionProps:f,loaderProps:h,overlayProps:v,visible:y,zIndex:x,...b}=i,S=useMantineTheme(),A=useStyles({name:"LoadingOverlay",classes:classes$8,props:i,className:s,style:c,classNames:o,styles:d,unstyled:p,vars:m,varsResolver:varsResolver$9}),C={...defaultProps$e.overlayProps,...v};return jsxRuntimeExports.jsx(Transition,{transition:"fade",...f,mounted:!!y,children:T=>jsxRuntimeExports.jsxs(Box,{...A("root",{style:T}),ref:t,...b,children:[jsxRuntimeExports.jsx(Loader,{...A("loader"),unstyled:p,...h}),jsxRuntimeExports.jsx(Overlay,{...C,...A("overlay"),darkHidden:!0,unstyled:p,color:(v==null?void 0:v.color)||S.white}),jsxRuntimeExports.jsx(Overlay,{...C,...A("overlay"),lightHidden:!0,unstyled:p,color:(v==null?void 0:v.color)||S.colors.dark[5]})]})})});LoadingOverlay.classes=classes$8;LoadingOverlay.displayName="@mantine/core/LoadingOverlay";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:o,color:s,radius:c,loading:d,withCloseButton:p,withBorder:m,title:f,icon:h,children:v,onClose:y,closeButtonProps:x,classNames:b,style:S,styles:A,unstyled:C,variant:T,vars:k,mod:D,loaderProps:w,role:R,..._}=i,M=useStyles({name:"Notification",classes:classes$7,props:i,className:o,style:S,classNames:b,styles:A,unstyled:C,vars:k,varsResolver:varsResolver$8});return jsxRuntimeExports.jsxs(Box,{...M("root"),mod:[{"data-with-icon":!!h||d,"data-with-border":m},D],ref:t,variant:T,role:R||"alert",..._,children:[h&&!d&&jsxRuntimeExports.jsx("div",{...M("icon"),children:h}),d&&jsxRuntimeExports.jsx(Loader,{size:28,color:s,...w,...M("loader")}),jsxRuntimeExports.jsxs("div",{...M("body"),children:[f&&jsxRuntimeExports.jsx("div",{...M("title"),children:f}),jsxRuntimeExports.jsx(Box,{...M("description"),mod:{"data-with-title":!!f},children:v})]}),p&&jsxRuntimeExports.jsx(CloseButton,{iconSize:16,color:"gray",...x,unstyled:C,onClick:y,...M("closeButton")})]})});Notification.classes=classes$7;Notification.displayName="@mantine/core/Notification";function __rest(e,t){var i={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(i[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,o=Object.getOwnPropertySymbols(e);s<o.length;s++)t.indexOf(o[s])<0&&Object.prototype.propertyIsEnumerable.call(e,o[s])&&(i[o[s]]=e[o[s]]);return i}var SourceType;(function(e){e.event="event",e.props="prop"})(SourceType||(SourceType={}));function noop$2(){}function memoizeOnce(e){var t,i=void 0;return function(){for(var o=[],s=arguments.length;s--;)o[s]=arguments[s];return t&&o.length===t.length&&o.every(function(c,d){return c===t[d]})||(t=o,i=e.apply(void 0,o)),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 o=getThousandsGroupRegex(i),s=e.search(/[1-9]/);return s=s===-1?e.length:s,e.substring(0,s)+e.substring(s,e.length).replace(o,"$1"+t)}function usePersistentCallback(e){var t=reactExports.useRef(e);t.current=e;var i=reactExports.useRef(function(){for(var o=[],s=arguments.length;s--;)o[s]=arguments[s];return t.current.apply(t,o)});return i.current}function splitDecimal(e,t){t===void 0&&(t=!0);var i=e[0]==="-",o=i&&t;e=e.replace("-","");var s=e.split("."),c=s[0],d=s[1]||"";return{beforeDecimal:c,afterDecimal:d,hasNegation:i,addNegation:o}}function fixLeadingZero(e){if(!e)return e;var t=e[0]==="-";t&&(e=e.substring(1,e.length));var i=e.split("."),o=i[0].replace(/^0+/,"")||"0",s=i[1]||"";return(t?"-":"")+o+(s?"."+s:"")}function limitToScale(e,t,i){for(var o="",s=i?"0":"",c=0;c<=t-1;c++)o+=e[c]||s;return o}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 o=t.split(/[eE]/g),s=o[0],c=o[1];if(c=Number(c),!c)return i+s;s=s.replace(".","");var d=1+c,p=s.length;return d<0?s="0."+repeat("0",Math.abs(d))+s:d>=p?s=s+repeat("0",d-p):s=(s.substring(0,d)||"0")+"."+s.substring(d),i+s}function roundToPrecision(e,t,i){if(["","-"].indexOf(e)!==-1)return e;var o=(e.indexOf(".")!==-1||i)&&t,s=splitDecimal(e),c=s.beforeDecimal,d=s.afterDecimal,p=s.hasNegation,m=parseFloat("0."+(d||"0")),f=d.length<=t?"0."+d:m.toFixed(t),h=f.split("."),v=c;c&&Number(h[0])&&(v=c.split("").reverse().reduce(function(S,A,C){return S.length>C?(Number(S[0])+Number(A)).toString()+S.substring(1,S.length):A+S},h[0]));var y=limitToScale(h[1]||"",t,i),x=p?"-":"",b=o?".":"";return""+x+v+b+y}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,o=0,s=e.length,c=t.length;e[i]===t[i]&&i<s;)i++;for(;e[s-1-o]===t[c-1-o]&&c-o>i&&s-o>i;)o++;return{from:{start:i,end:s-o},to:{start:i,end:c-o}}}),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,o=e.currentValueIndex,s=e.formattedValueIndex;return t[o]===i[s]}function getCaretPosition(e,t,i,o,s,c,d){d===void 0&&(d=defaultIsCharacterSame);var p=s.findIndex(function(D){return D}),m=e.slice(0,p);!t&&!i.startsWith(m)&&(t=m,i=m+i,o=o+m.length);for(var f=i.length,h=e.length,v={},y=new Array(f),x=0;x<f;x++){y[x]=-1;for(var b=0,S=h;b<S;b++){var A=d({currentValue:i,lastValue:t,formattedValue:e,currentValueIndex:x,formattedValueIndex:b});if(A&&v[b]!==!0){y[x]=b,v[b]=!0;break}}}for(var C=o;C<f&&(y[C]===-1||!c(i[C]));)C++;var T=C===f||y[C]===-1?h:y[C];for(C=o-1;C>0&&y[C]===-1;)C--;var k=C===-1||y[C]===-1?0:y[C]+1;return k>T?T:o-k<T-o?k:T}function getCaretPosInBoundary(e,t,i,o){var s=e.length;if(t=clamp$1(t,0,s),o==="left"){for(;t>=0&&!i[t];)t--;t===-1&&(t=i.indexOf(!0))}else{for(;t<=s&&!i[t];)t++;t>s&&(t=i.lastIndexOf(!0))}return t===-1&&(t=s),t}function caretUnknownFormatBoundary(e){for(var t=Array.from({length:e.length+1}).map(function(){return!0}),i=0,o=t.length;i<o;i++)t[i]=!!(charIsNumber(e[i])||charIsNumber(e[i-1]));return t}function useInternalValues(e,t,i,o,s,c){c===void 0&&(c=noop$2);var d=usePersistentCallback(function(b,S){var A,C;return isNotValidValue(b)?(C="",A=""):typeof b=="number"||S?(C=typeof b=="number"?toNumericString(b):b,A=o(C)):(C=s(b,void 0),A=o(C)),{formattedValue:A,numAsString:C}}),p=reactExports.useState(function(){return d(isNil(e)?t:e,i)}),m=p[0],f=p[1],h=function(b,S){b.formattedValue!==m.formattedValue&&f({formattedValue:b.formattedValue,numAsString:b.value}),c(b,S)},v=e,y=i;isNil(e)&&(v=m.numAsString,y=!0);var x=d(v,y);return reactExports.useMemo(function(){f(x)},[x.formattedValue]),[m,h]}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 o=e.customInput,s=e.renderText,c=e.getInputRef,d=e.format;d===void 0&&(d=defaultFormat);var p=e.removeFormatting;p===void 0&&(p=defaultRemoveFormatting);var m=e.defaultValue,f=e.valueIsNumericString,h=e.onValueChange,v=e.isAllowed,y=e.onChange;y===void 0&&(y=noop$2);var x=e.onKeyDown;x===void 0&&(x=noop$2);var b=e.onMouseUp;b===void 0&&(b=noop$2);var S=e.onFocus;S===void 0&&(S=noop$2);var A=e.onBlur;A===void 0&&(A=noop$2);var C=e.value,T=e.getCaretBoundary;T===void 0&&(T=caretUnknownFormatBoundary);var k=e.isValidInputCharacter;k===void 0&&(k=charIsNumber);var D=e.isCharacterSame,w=__rest(e,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter","isCharacterSame"]),R=useInternalValues(C,m,!!f,d,p,h),_=R[0],M=_.formattedValue,N=_.numAsString,P=R[1],L=reactExports.useRef(),I=reactExports.useRef({formattedValue:M,numAsString:N}),W=function(oe,G){I.current={formattedValue:oe.formattedValue,numAsString:oe.value},P(oe,G)},ae=reactExports.useState(!1),Q=ae[0],B=ae[1],q=reactExports.useRef(null),K=reactExports.useRef({setCaretTimeout:null,focusTimeout:null});reactExports.useEffect(function(){return B(!0),function(){clearTimeout(K.current.setCaretTimeout),clearTimeout(K.current.focusTimeout)}},[]);var U=d,$=function(oe,G){var ee=parseFloat(G);return{formattedValue:oe,value:G,floatValue:isNaN(ee)?void 0:ee}},Y=function(oe,G,ee){oe.selectionStart===0&&oe.selectionEnd===oe.value.length||(setCaretPosition(oe,G),K.current.setCaretTimeout=setTimeout(function(){oe.value===ee&&oe.selectionStart!==G&&setCaretPosition(oe,G)},0))},z=function(oe,G,ee){return getCaretPosInBoundary(oe,G,T(oe),ee)},O=function(oe,G,ee){var de=T(G),pe=getCaretPosition(G,M,oe,ee,de,k,D);return pe=getCaretPosInBoundary(G,pe,de),pe},F=function(oe){var G=oe.formattedValue;G===void 0&&(G="");var ee=oe.input,de=oe.source,pe=oe.event,ve=oe.numAsString,Te;if(ee){var se=oe.inputValue||ee.value,re=geInputCaretPosition(ee);ee.value=G,Te=O(se,G,re),Te!==void 0&&Y(ee,Te,G)}G!==M&&W($(G,ve),{event:pe,source:de})};reactExports.useEffect(function(){var oe=I.current,G=oe.formattedValue,ee=oe.numAsString;(M!==G||N!==ee)&&W($(M,N),{event:void 0,source:SourceType.props})},[M,N]);var H=q.current?geInputCaretPosition(q.current):void 0,X=typeof window<"u"?reactExports.useLayoutEffect:reactExports.useEffect;X(function(){var oe=q.current;if(M!==I.current.formattedValue&&oe){var G=O(I.current.formattedValue,M,H);oe.value=M,Y(oe,G,M)}},[M]);var te=function(oe,G,ee){var de=G.target,pe=L.current?findChangedRangeFromCaretPositions(L.current,de.selectionEnd):findChangeRange(M,oe),ve=Object.assign(Object.assign({},pe),{lastValue:M}),Te=p(oe,ve),se=U(Te);if(Te=p(se,void 0),v&&!v($(se,Te))){var re=G.target,$e=geInputCaretPosition(re),Le=O(oe,M,$e);return re.value=M,Y(re,Le,M),!1}return F({formattedValue:se,numAsString:Te,inputValue:oe,event:G,source:ee,input:G.target}),!0},J=function(oe,G){G===void 0&&(G=0);var ee=oe.selectionStart,de=oe.selectionEnd;L.current={selectionStart:ee,selectionEnd:de+G}},ce=function(oe){var G=oe.target,ee=G.value,de=te(ee,oe,SourceType.event);de&&y(oe),L.current=void 0},ue=function(oe){var G=oe.target,ee=oe.key,de=G.selectionStart,pe=G.selectionEnd,ve=G.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 se=0;ee==="Delete"&&de===pe&&(se=1);var re=ee==="ArrowLeft"||ee==="ArrowRight";if(Te===void 0||de!==pe&&!re){x(oe),J(G,se);return}var $e=Te;if(re){var Le=ee==="ArrowLeft"?"left":"right";$e=z(ve,Te,Le),$e!==Te&&oe.preventDefault()}else ee==="Delete"&&!k(ve[Te])?$e=z(ve,Te,"right"):ee==="Backspace"&&!k(ve[Te])&&($e=z(ve,Te,"left"));$e!==Te&&Y(G,$e,ve),x(oe),J(G,se)},Ae=function(oe){var G=oe.target,ee=function(){var de=G.selectionStart,pe=G.selectionEnd,ve=G.value;if(ve===void 0&&(ve=""),de===pe){var Te=z(ve,de);Te!==de&&Y(G,Te,ve)}};ee(),requestAnimationFrame(function(){ee()}),b(oe),J(G)},Ee=function(oe){oe.persist&&oe.persist();var G=oe.target,ee=oe.currentTarget;q.current=G,K.current.focusTimeout=setTimeout(function(){var de=G.selectionStart,pe=G.selectionEnd,ve=G.value;ve===void 0&&(ve="");var Te=z(ve,de);Te!==de&&!(de===0&&pe===ve.length)&&Y(G,Te,ve),S(Object.assign(Object.assign({},oe),{currentTarget:ee}))},0)},Me=function(oe){q.current=null,clearTimeout(K.current.focusTimeout),clearTimeout(K.current.setCaretTimeout),A(oe)},je=Q&&addInputMode()?"numeric":void 0,ke=Object.assign({inputMode:je},w,{type:t,value:M,onChange:ce,onKeyDown:ue,onMouseUp:Ae,onFocus:Ee,onBlur:Me});if(i==="text")return s?React.createElement(React.Fragment,null,s(M,w)||null):React.createElement("span",Object.assign({},w,{ref:c}),M);if(o){var ge=o;return React.createElement(ge,Object.assign({},ke,{ref:c}))}return React.createElement("input",Object.assign({},ke,{ref:c}))}function format(e,t){var i=t.decimalScale,o=t.fixedDecimalScale,s=t.prefix;s===void 0&&(s="");var c=t.suffix;c===void 0&&(c="");var d=t.allowNegative,p=t.thousandsGroupStyle;if(p===void 0&&(p="thousand"),e===""||e==="-")return e;var m=getSeparators(t),f=m.thousandSeparator,h=m.decimalSeparator,v=i!==0&&e.indexOf(".")!==-1||i&&o,y=splitDecimal(e,d),x=y.beforeDecimal,b=y.afterDecimal,S=y.addNegation;return i!==void 0&&(b=limitToScale(b,i,!!o)),f&&(x=applyThousandSeparator(x,f,p)),s&&(x=s+x),c&&(b=b+c),S&&(x="-"+x),e=x+(v&&h||"")+b,e}function getSeparators(e){var t=e.decimalSeparator;t===void 0&&(t=".");var i=e.thousandSeparator,o=e.allowedDecimalSeparators;return i===!0&&(i=","),o||(o=[t,"."]),{decimalSeparator:t,thousandSeparator:i,allowedDecimalSeparators:o}}function handleNegation(e,t){e===void 0&&(e="");var i=new RegExp("(-)"),o=new RegExp("(-)(.)*(-)"),s=i.test(e),c=o.test(e);return e=e.replace(/-/g,""),s&&!c&&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 o;t===void 0&&(t=getDefaultChangeMeta(e));var s=i.allowNegative,c=i.prefix;c===void 0&&(c="");var d=i.suffix;d===void 0&&(d="");var p=i.decimalScale,m=t.from,f=t.to,h=f.start,v=f.end,y=getSeparators(i),x=y.allowedDecimalSeparators,b=y.decimalSeparator,S=e[v]===b;if(charIsNumber(e)&&(e===c||e===d)&&t.lastValue==="")return e;if(v-h===1&&x.indexOf(e[h])!==-1){var A=p===0?"":b;e=e.substring(0,h)+A+e.substring(h+1,e.length)}var C=function(q,K,U){var $=!1,Y=!1;c.startsWith("-")?$=!1:q.startsWith("--")?($=!1,Y=!0):d.startsWith("-")&&q.length===d.length?$=!1:q[0]==="-"&&($=!0);var z=$?1:0;return Y&&(z=2),z&&(q=q.substring(z),K-=z,U-=z),{value:q,start:K,end:U,hasNegation:$}},T=C(e,h,v),k=T.hasNegation;o=T,e=o.value,h=o.start,v=o.end;var D=C(t.lastValue,m.start,m.end),w=D.start,R=D.end,_=D.value,M=e.substring(h,v);e.length&&_.length&&(w>_.length-d.length||R<c.length)&&!(M&&d.startsWith(M))&&(e=_);var N=0;e.startsWith(c)?N+=c.length:h<c.length&&(N=h),e=e.substring(N),v-=N;var P=e.length,L=e.length-d.length;e.endsWith(d)?P=L:(v>L||v>e.length-d.length)&&(P=v),e=e.substring(0,P),e=handleNegation(k?"-"+e:e,s),e=(e.match(getNumberRegex(b))||[]).join("");var I=e.indexOf(b);e=e.replace(new RegExp(escapeRegExp(b),"g"),function(q,K){return K===I?".":""});var W=splitDecimal(e,s),ae=W.beforeDecimal,Q=W.afterDecimal,B=W.addNegation;return f.end-f.start<m.end-m.start&&ae===""&&S&&!parseFloat(Q)&&(e=B?"-":""),e}function getCaretBoundary(e,t){var i=t.prefix;i===void 0&&(i="");var o=t.suffix;o===void 0&&(o="");var s=Array.from({length:e.length+1}).map(function(){return!0}),c=e[0]==="-";s.fill(!1,0,i.length+(c?1:0));var d=e.length;return s.fill(!1,d-o.length+1,d+1),s}function validateAndUpdateProps(e){var t=getSeparators(e),i=t.thousandSeparator,o=t.decimalSeparator,s=e.prefix;s===void 0&&(s="");var c=e.allowNegative;if(c===void 0&&(c=!0),i===o)throw new Error(`
|
||
Decimal separator can't be same as thousand separator.
|
||
thousandSeparator: `+i+` (thousandSeparator = {true} is same as thousandSeparator = ",")
|
||
decimalSeparator: `+o+` (default value for decimalSeparator is .)
|
||
`);return s.startsWith("-")&&c&&(console.error(`
|
||
Prefix can't start with '-' when allowNegative is true.
|
||
prefix: `+s+`
|
||
allowNegative: `+c+`
|
||
`),c=!1),Object.assign(Object.assign({},e),{allowNegative:c})}function useNumericFormat(e){e=validateAndUpdateProps(e),e.decimalSeparator,e.allowedDecimalSeparators,e.thousandsGroupStyle;var t=e.suffix,i=e.allowNegative,o=e.allowLeadingZeros,s=e.onKeyDown;s===void 0&&(s=noop$2);var c=e.onBlur;c===void 0&&(c=noop$2);var d=e.thousandSeparator,p=e.decimalScale,m=e.fixedDecimalScale,f=e.prefix;f===void 0&&(f="");var h=e.defaultValue,v=e.value,y=e.valueIsNumericString,x=e.onValueChange,b=__rest(e,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),S=getSeparators(e),A=S.decimalSeparator,C=S.allowedDecimalSeparators,T=function(B){return format(B,e)},k=function(B,q){return removeFormatting(B,q,e)},D=isNil(v)?h:v,w=y??isNumericString(D,f,t);isNil(v)?isNil(h)||(w=w||typeof h=="number"):w=w||typeof v=="number";var R=function(B){return isNotValidValue(B)?B:(typeof B=="number"&&(B=toNumericString(B)),w&&typeof p=="number"?roundToPrecision(B,p,!!m):B)},_=useInternalValues(R(v),R(h),!!w,T,k,x),M=_[0],N=M.numAsString,P=M.formattedValue,L=_[1],I=function(B){var q=B.target,K=B.key,U=q.selectionStart,$=q.selectionEnd,Y=q.value;if(Y===void 0&&(Y=""),(K==="Backspace"||K==="Delete")&&$<f.length){B.preventDefault();return}if(U!==$){s(B);return}K==="Backspace"&&Y[0]==="-"&&U===f.length+1&&i&&setCaretPosition(q,1),p&&m&&(K==="Backspace"&&Y[U-1]===A?(setCaretPosition(q,U-1),B.preventDefault()):K==="Delete"&&Y[U]===A&&B.preventDefault()),C!=null&&C.includes(K)&&Y[U]===A&&setCaretPosition(q,U+1);var z=d===!0?",":d;K==="Backspace"&&Y[U-1]===z&&setCaretPosition(q,U-1),K==="Delete"&&Y[U]===z&&setCaretPosition(q,U+1),s(B)},W=function(B){var q=N;if(q.match(/\d/g)||(q=""),o||(q=fixLeadingZero(q)),m&&p&&(q=roundToPrecision(q,p,m)),q!==N){var K=format(q,e);L({formattedValue:K,value:q,floatValue:parseFloat(q)},{event:B,source:SourceType.event})}c(B)},ae=function(B){return B===A?!0:charIsNumber(B)},Q=function(B){var q=B.currentValue,K=B.lastValue,U=B.formattedValue,$=B.currentValueIndex,Y=B.formattedValueIndex,z=q[$],O=U[Y],F=findChangeRange(K,q),H=F.to,X=function(te){return k(te).indexOf(".")+f.length};return v===0&&m&&p&&q[H.start]===A&&X(q)<$&&X(U)>Y?!1:$>=H.start&&$<H.end&&C&&C.includes(z)&&O===A?!0:z===O};return Object.assign(Object.assign({},b),{value:P,valueIsNumericString:!1,isValidInputCharacter:ae,isCharacterSame:Q,onValueChange:L,format:T,removeFormatting:k,getCaretBoundary:function(B){return getCaretBoundary(B,e)},onKeyDown:I,onBlur:W})}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 o=t===void 0||e>=t,s=i===void 0||e<=i;return o&&s}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 o=e.toString().replace(/^0+/,""),s=parseFloat(o);return Number.isNaN(s)?o:s>Number.MAX_SAFE_INTEGER?t!==void 0?String(t):o:clamp$4(s,i,t)}const NumberInput=factory((e,t)=>{const i=useProps("NumberInput",defaultProps$c,e),{className:o,classNames:s,styles:c,unstyled:d,vars:p,onChange:m,onValueChange:f,value:h,defaultValue:v,max:y,min:x,step:b,hideControls:S,rightSection:A,isAllowed:C,clampBehavior:T,onBlur:k,allowDecimal:D,decimalScale:w,onKeyDown:R,onKeyDownCapture:_,handlersRef:M,startValue:N,disabled:P,rightSectionPointerEvents:L,allowNegative:I,readOnly:W,size:ae,rightSectionWidth:Q,stepHoldInterval:B,stepHoldDelay:q,allowLeadingZeros:K,withKeyboardEvents:U,trimLeadingZeroesOnBlur:$,...Y}=i,z=useStyles({name:"NumberInput",classes:classes$6,props:i,classNames:s,styles:c,unstyled:d,vars:p,varsResolver:varsResolver$7}),{resolvedClassNames:O,resolvedStyles:F}=useResolvedStylesApi({classNames:s,styles:c,props:i}),[H,X]=useUncontrolled({value:h,defaultValue:v,finalValue:"",onChange:m}),te=q!==void 0&&B!==void 0,J=reactExports.useRef(null),ce=reactExports.useRef(null),ue=reactExports.useRef(0),Ae=(se,re)=>{re.source==="event"&&X(isValidNumber(se.floatValue,se.value)&&!leadingDecimalZeroPattern.test(se.value)&&!(K&&leadingZerosPattern.test(se.value))?se.floatValue:se.value),f==null||f(se,re)},Ee=se=>{const re=String(se).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return re?Math.max(0,(re[1]?re[1].length:0)-(re[2]?+re[2]:0)):0},Me=se=>{J.current&&typeof se<"u"&&J.current.setSelectionRange(se,se)},je=reactExports.useRef(noop$3);je.current=()=>{if(!canIncrement(H))return;let se;const re=Ee(H),$e=Ee(b),Le=Math.max(re,$e),Xe=10**Le;if(!isNumberString(H)&&(typeof H!="number"||Number.isNaN(H)))se=clamp$4(N,x,y);else if(y!==void 0){const at=(Math.round(Number(H)*Xe)+Math.round(b*Xe))/Xe;se=at<=y?at:y}else se=(Math.round(Number(H)*Xe)+Math.round(b*Xe))/Xe;const qe=se.toFixed(Le);X(parseFloat(qe)),f==null||f({floatValue:parseFloat(qe),formattedValue:qe,value:qe},{source:"increment"}),setTimeout(()=>{var at;return Me((at=J.current)==null?void 0:at.value.length)},0)};const ke=reactExports.useRef(noop$3);ke.current=()=>{if(!canIncrement(H))return;let se;const re=x!==void 0?x:I?Number.MIN_SAFE_INTEGER:0,$e=Ee(H),Le=Ee(b),Xe=Math.max($e,Le),qe=10**Xe;if(!isNumberString(H)&&typeof H!="number"||Number.isNaN(H))se=clamp$4(N,re,y);else{const We=(Math.round(Number(H)*qe)-Math.round(b*qe))/qe;se=re!==void 0&&We<re?re:We}const at=se.toFixed(Xe);X(parseFloat(at)),f==null||f({floatValue:parseFloat(at),formattedValue:at,value:at},{source:"decrement"}),setTimeout(()=>{var We;return Me((We=J.current)==null?void 0:We.value.length)},0)};const ge=se=>{R==null||R(se),!(W||!U)&&(se.key==="ArrowUp"&&(se.preventDefault(),je.current()),se.key==="ArrowDown"&&(se.preventDefault(),ke.current()))},oe=se=>{if(_==null||_(se),se.key==="Backspace"){const re=J.current;re.selectionStart===0&&re.selectionStart===re.selectionEnd&&(se.preventDefault(),window.setTimeout(()=>Me(0),0))}},G=se=>{let re=H;T==="blur"&&typeof re=="number"&&(re=clamp$4(re,x,y)),$&&typeof re=="string"&&Ee(re)<15&&(re=clampAndSanitizeInput(re,y,x)),H!==re&&X(re),k==null||k(se)};assignRef(M,{increment:je.current,decrement:ke.current});const ee=se=>{se?je.current():ke.current(),ue.current+=1},de=se=>{if(ee(se),te){const re=typeof B=="number"?B:B(ue.current);ce.current=window.setTimeout(()=>de(se),re)}},pe=(se,re)=>{var $e;se.preventDefault(),($e=J.current)==null||$e.focus(),ee(re),te&&(ce.current=window.setTimeout(()=>de(re),q))},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 H=="number"&&y!==void 0&&H>=y,mod:{direction:"up"},onMouseDown:se=>se.preventDefault(),onPointerDown:se=>{pe(se,!0)},onPointerUp:ve,onPointerLeave:ve,children:jsxRuntimeExports.jsx(NumberInputChevron,{direction:"up"})}),jsxRuntimeExports.jsx(UnstyledButton,{...z("control"),tabIndex:-1,"aria-hidden":!0,disabled:P||typeof H=="number"&&x!==void 0&&H<=x,mod:{direction:"down"},onMouseDown:se=>se.preventDefault(),onPointerDown:se=>{pe(se,!1)},onPointerUp:ve,onPointerLeave:ve,children:jsxRuntimeExports.jsx(NumberInputChevron,{direction:"down"})})]});return jsxRuntimeExports.jsx(InputBase,{component:NumericFormat,allowNegative:I,className:clsx(classes$6.root,o),size:ae,...Y,readOnly:W,disabled:P,value:H,getInputRef:useMergedRef(t,J),onValueChange:Ae,rightSection:S||W||!canIncrement(H)?A:A||Te,classNames:O,styles:F,unstyled:d,__staticSelector:"NumberInput",decimalScale:D?w:0,onKeyDown:ge,onKeyDownCapture:oe,rightSectionPointerEvents:L??(P?"none":void 0),rightSectionWidth:Q??`var(--ni-right-section-width-${ae||"sm"})`,allowLeadingZeros:K,onBlur:G,isAllowed:se=>T==="strict"?C?C(se)&&isInRange(se.floatValue,x,y):isInRange(se.floatValue,x,y):C?C(se):!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[o,s]=reactExports.useState(i),c=reactExports.useRef(null),{x:d,y:p,elements:m,refs:f,update:h,placement:v}=useFloating({placement:t,middleware:[shift({crossAxis:!0,padding:5,rootBoundary:"document"})]}),y=v.includes("right")?e:t.includes("left")?e*-1:0,x=v.includes("bottom")?e:t.includes("top")?e*-1:0,b=reactExports.useCallback(({clientX:S,clientY:A})=>{f.setPositionReference({getBoundingClientRect(){return{width:0,height:0,x:S,y:A,left:S+y,top:A+x,right:S,bottom:A}}})},[m.reference]);return reactExports.useEffect(()=>{if(f.floating.current){const S=c.current;S.addEventListener("mousemove",b);const A=getOverflowAncestors(f.floating.current);return A.forEach(C=>{C.addEventListener("scroll",h)}),()=>{S.removeEventListener("mousemove",b),A.forEach(C=>{C.removeEventListener("scroll",h)})}}},[m.reference,f.floating.current,h,b,o]),{handleMouseMove:b,x:d,y:p,opened:o,setOpened:s,boundaryRef:c,floating:f.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:o,refProp:s,withinPortal:c,style:d,className:p,classNames:m,styles:f,unstyled:h,radius:v,color:y,label:x,offset:b,position:S,multiline:A,zIndex:C,disabled:T,defaultOpened:k,variant:D,vars:w,portalProps:R,..._}=i,M=useMantineTheme(),N=useStyles({name:"TooltipFloating",props:i,classes:classes$5,className:p,style:d,classNames:m,styles:f,unstyled:h,rootSelector:"tooltip",vars:w,varsResolver:varsResolver$6}),{handleMouseMove:P,x:L,y:I,opened:W,boundaryRef:ae,floating:Q,setOpened:B}=useFloatingTooltip({offset:b,position:S,defaultOpened:k});if(!isElement$1(o))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 q=useMergedRef(ae,getRefProp(o),t),K=o.props,U=Y=>{var z;(z=K.onMouseEnter)==null||z.call(K,Y),P(Y),B(!0)},$=Y=>{var z;(z=K.onMouseLeave)==null||z.call(K,Y),B(!1)};return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(OptionalPortal,{...R,withinPortal:c,children:jsxRuntimeExports.jsx(Box,{..._,...N("tooltip",{style:{...getStyleObject(d,M),zIndex:C,display:!T&&W?"block":"none",top:(I&&Math.round(I))??"",left:(L&&Math.round(L))??""}}),variant:D,ref:Q,mod:{multiline:A},children:x})}),reactExports.cloneElement(o,{...K,[s]:q,onMouseEnter:U,onMouseLeave:$})]})});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:o}=useProps("TooltipGroup",defaultProps$a,e);return jsxRuntimeExports.jsx(TooltipGroupProvider,{value:!0,children:jsxRuntimeExports.jsx(FloatingDelayGroup,{delay:{open:t,close:i},children:o})})}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 R,_,M;const[t,i]=reactExports.useState(e.defaultOpened),s=typeof e.opened=="boolean"?e.opened:t,c=useTooltipGroupContext(),d=useId$1(),p=reactExports.useCallback(N=>{i(N),N&&T(d)},[d]),{x:m,y:f,context:h,refs:v,update:y,placement:x,middlewareData:{arrow:{x:b,y:S}={}}}=useFloating({strategy:e.strategy,placement:e.position,open:s,onOpenChange:p,middleware:getTooltipMiddlewares(e)}),{delay:A,currentId:C,setCurrentId:T}=useDelayGroup(h,{id:d}),{getReferenceProps:k,getFloatingProps:D}=useInteractions([useHover(h,{enabled:(R=e.events)==null?void 0:R.hover,delay:c?A:{open:e.openDelay,close:e.closeDelay},mouseOnly:!((_=e.events)!=null&&_.touch)}),useFocus(h,{enabled:(M=e.events)==null?void 0:M.focus,visibleOnly:!0}),useRole(h,{role:"tooltip"}),useDismiss(h,{enabled:typeof e.opened>"u"})]);useFloatingAutoUpdate({opened:s,position:e.position,positionDependencies:e.positionDependencies,floating:{refs:v,update:y}}),useDidUpdate(()=>{var N;(N=e.onPositionChange)==null||N.call(e,x)},[x]);const w=s&&C&&C!==d;return{x:m,y:f,arrowX:b,arrowY:S,reference:v.setReference,floating:v.setFloating,getFloatingProps:D,getReferenceProps:k,isGroupPhase:w,opened:s,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:o,position:s,refProp:c,label:d,openDelay:p,closeDelay:m,onPositionChange:f,opened:h,defaultOpened:v,withinPortal:y,radius:x,color:b,classNames:S,styles:A,unstyled:C,style:T,className:k,withArrow:D,arrowSize:w,arrowOffset:R,arrowRadius:_,arrowPosition:M,offset:N,transitionProps:P,multiline:L,events:I,zIndex:W,disabled:ae,positionDependencies:Q,onClick:B,onMouseEnter:q,onMouseLeave:K,inline:U,variant:$,keepMounted:Y,vars:z,portalProps:O,mod:F,floatingStrategy:H,middlewares:X,...te}=useProps("Tooltip",defaultProps$9,i),{dir:J}=useDirection(),ce=reactExports.useRef(null),ue=useTooltip({position:getFloatingPosition(J,s),closeDelay:m,openDelay:p,onPositionChange:f,opened:h,defaultOpened:v,events:I,arrowRef:ce,arrowOffset:R,offset:typeof N=="number"?N+(D?w/2:0):N,positionDependencies:[...Q,o],inline:U,strategy:H,middlewares:X}),Ae=useStyles({name:"Tooltip",props:i,classes:classes$5,className:k,style:T,classNames:S,styles:A,unstyled:C,rootSelector:"tooltip",vars:z,varsResolver:varsResolver$5});if(!isElement$1(o))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(o),t),Me=getTransitionProps(P,{duration:100,transition:"fade"}),je=o.props;return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(OptionalPortal,{...O,withinPortal:y,children:jsxRuntimeExports.jsx(Transition,{...Me,keepMounted:Y,mounted:!ae&&!!ue.opened,duration:ue.isGroupPhase?10:Me.duration,children:ke=>jsxRuntimeExports.jsxs(Box,{...te,"data-fixed":H==="fixed"||void 0,variant:$,mod:[{multiline:L},F],...ue.getFloatingProps({ref:ue.floating,className:Ae("tooltip").className,style:{...Ae("tooltip").style,...ke,zIndex:W,top:ue.y??0,left:ue.x??0}}),children:[d,jsxRuntimeExports.jsx(FloatingArrow,{ref:ce,arrowX:ue.arrowX,arrowY:ue.arrowY,visible:D,position:ue.placement,arrowSize:w,arrowOffset:R,arrowRadius:_,arrowPosition:M,...Ae("arrow")})]})})}),reactExports.cloneElement(o,ue.getReferenceProps({onClick:B,onMouseEnter:q,onMouseLeave:K,onMouseMove:i.onMouseMove,onPointerDown:i.onPointerDown,onPointerEnter:i.onPointerEnter,className:clsx(k,je.className),...je,[c]: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:o,size:s,transitionTimingFunction:c})=>({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":o===void 0?void 0:`${o}ms`,"--sc-transition-timing-function":c,"--sc-padding":getSize(s,"sc-padding"),"--sc-font-size":getFontSize(s)}}),SegmentedControl=factory((e,t)=>{var J,ce;const i=useProps("SegmentedControl",defaultProps$8,e),{classNames:o,className:s,style:c,styles:d,unstyled:p,vars:m,data:f,value:h,defaultValue:v,onChange:y,size:x,name:b,disabled:S,readOnly:A,fullWidth:C,orientation:T,radius:k,color:D,transitionDuration:w,transitionTimingFunction:R,variant:_,autoContrast:M,withItemsBorders:N,mod:P,...L}=i,I=useStyles({name:"SegmentedControl",props:i,classes:classes$4,className:s,style:c,classNames:o,styles:d,unstyled:p,vars:m,varsResolver:varsResolver$4}),W=useMantineTheme(),ae=f.map(ue=>typeof ue=="string"?{label:ue,value:ue}:ue),Q=useMounted(),[B,q]=reactExports.useState(randomId()),[K,U]=reactExports.useState(null),[$,Y]=reactExports.useState({}),z=(ue,Ae)=>{$[Ae]=ue,Y($)},[O,F]=useUncontrolled({value:h,defaultValue:v,finalValue:Array.isArray(f)?((J=ae.find(ue=>!ue.disabled))==null?void 0:J.value)??((ce=f[0])==null?void 0:ce.value)??null:null,onChange:y}),H=useId$1(b),X=ae.map(ue=>reactExports.createElement(Box,{...I("control"),mod:{active:O===ue.value,orientation:T},key:ue.value},reactExports.createElement("input",{...I("input"),disabled:S||ue.disabled,type:"radio",name:H,value:ue.value,id:`${H}-${ue.value}`,checked:O===ue.value,onChange:()=>!A&&F(ue.value),"data-focus-ring":W.focusRing,key:`${ue.value}-input`}),reactExports.createElement(Box,{component:"label",...I("label"),mod:{active:O===ue.value&&!(S||ue.disabled),disabled:S||ue.disabled,"read-only":A},htmlFor:`${H}-${ue.value}`,ref:Ae=>z(Ae,ue.value),__vars:{"--sc-label-color":D!==void 0?getContrastColor({color:D,theme:W,autoContrast:M}):void 0},key:`${ue.value}-label`},jsxRuntimeExports.jsx("span",{...I("innerLabel"),children:ue.label})))),te=useMergedRef(t,ue=>U(ue));return useShallowEffect(()=>{q(randomId())},[f.length]),f.length===0?null:jsxRuntimeExports.jsxs(Box,{...I("root"),variant:_,size:x,ref:te,mod:[{"full-width":C,orientation:T,initialized:Q,"with-items-borders":N},P],...L,role:"radiogroup","data-disabled":S,children:[typeof O=="string"&&jsxRuntimeExports.jsx(FloatingIndicator,{target:$[O],parent:K,component:"span",transitionDuration:"var(--sc-transition-duration)",...I("indicator")},B),X]})});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:o,styles:s,unstyled:c,vars:d,dropdownOpened:p,defaultDropdownOpened:m,onDropdownClose:f,onDropdownOpen:h,onFocus:v,onBlur:y,onClick:x,onChange:b,data:S,value:A,defaultValue:C,selectFirstOptionOnChange:T,onOptionSubmit:k,comboboxProps:D,readOnly:w,disabled:R,filter:_,limit:M,withScrollArea:N,maxDropdownHeight:P,size:L,searchable:I,rightSection:W,checkIconPosition:ae,withCheckIcon:Q,nothingFoundMessage:B,name:q,form:K,searchValue:U,defaultSearchValue:$,onSearchChange:Y,allowDeselect:z,error:O,rightSectionPointerEvents:F,id:H,clearable:X,clearButtonProps:te,hiddenInputProps:J,renderOption:ce,onClear:ue,autoComplete:Ae,scrollAreaProps:Ee,__defaultRightSection:Me,__clearSection:je,__clearable:ke,chevronColor:ge,...oe}=i,G=reactExports.useMemo(()=>getParsedComboboxData(S),[S]),ee=reactExports.useMemo(()=>getOptionsLockup(G),[G]),de=useId$1(H),[pe,ve,Te]=useUncontrolled({value:A,defaultValue:C,finalValue:null,onChange:b}),se=typeof pe=="string"?ee[pe]:void 0,re=usePrevious(se),[$e,Le,Xe]=useUncontrolled({value:U,defaultValue:$,finalValue:se?se.label:"",onChange:Y}),qe=useCombobox({opened:p,defaultOpened:m,onDropdownOpen:()=>{h==null||h(),qe.updateSelectedOptionIndex("active",{scrollIntoView:!0})},onDropdownClose:()=>{f==null||f(),qe.resetSelectedOption()}}),at=De=>{Le(De),qe.resetSelectedOption()},{resolvedClassNames:We,resolvedStyles:Je}=useResolvedStylesApi({props:i,styles:s,classNames:o});reactExports.useEffect(()=>{T&&qe.selectFirstOption()},[T,$e]),reactExports.useEffect(()=>{A===null&&at(""),typeof A=="string"&&se&&((re==null?void 0:re.value)!==se.value||(re==null?void 0:re.label)!==se.label)&&at(se.label)},[A,se]),reactExports.useEffect(()=>{var De;!Te&&!Xe&&at(typeof pe=="string"&&((De=ee[pe])==null?void 0:De.label)||"")},[S,pe]);const ct=jsxRuntimeExports.jsx(Combobox.ClearButton,{...te,onClear:()=>{ve(null,null),at(""),ue==null||ue()}}),st=X&&!!pe&&!R&&!w;return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(Combobox,{store:qe,__staticSelector:"Select",classNames:We,styles:Je,unstyled:c,readOnly:w,onOptionSubmit:De=>{k==null||k(De);const be=z&&ee[De].value===pe?null:ee[De],xe=be?be.value:null;xe!==pe&&ve(xe,be),!Te&&at(typeof xe=="string"&&(be==null?void 0:be.label)||""),qe.closeDropdown()},size:L,...D,children:[jsxRuntimeExports.jsx(Combobox.Target,{targetType:I?"input":"button",autoComplete:Ae,children:jsxRuntimeExports.jsx(InputBase,{id:de,ref:t,__defaultRightSection:jsxRuntimeExports.jsx(Combobox.Chevron,{size:L,error:O,unstyled:c,color:ge}),__clearSection:ct,__clearable:st,rightSection:W,rightSectionPointerEvents:F||(st?"all":"none"),...oe,size:L,__staticSelector:"Select",disabled:R,readOnly:w||!I,value:$e,onChange:De=>{at(De.currentTarget.value),qe.openDropdown(),T&&qe.selectFirstOption()},onFocus:De=>{I&&qe.openDropdown(),v==null||v(De)},onBlur:De=>{var be;I&&qe.closeDropdown(),at(pe!=null&&((be=ee[pe])==null?void 0:be.label)||""),y==null||y(De)},onClick:De=>{I?qe.openDropdown():qe.toggleDropdown(),x==null||x(De)},classNames:We,styles:Je,unstyled:c,pointer:!I,error:O})}),jsxRuntimeExports.jsx(OptionsDropdown,{data:G,hidden:w||R,filter:_,search:$e,limit:M,hiddenWhenEmpty:!B,withScrollArea:N,maxDropdownHeight:P,filterOptions:I&&(se==null?void 0:se.label)!==$e,value:pe,checkIconPosition:ae,withCheckIcon:Q,nothingFoundMessage:B,unstyled:c,labelId:oe.label?`${de}-label`:void 0,"aria-label":oe.label?void 0:oe["aria-label"],renderOption:ce,scrollAreaProps:Ee})]}),jsxRuntimeExports.jsx(Combobox.HiddenInput,{value:pe,name:q,form:K,disabled:R,...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:o,thumbSize:s,radius:c,...d},p)=>{const{getStyles:m}=useSliderContext();return jsxRuntimeExports.jsx(Box,{tabIndex:-1,variant:i,size:e,ref:p,...m("root"),...d})});SliderRoot.displayName="@mantine/core/SliderRoot";const Thumb=reactExports.forwardRef(({max:e,min:t,value:i,position:o,label:s,dragging:c,onMouseDown:d,onKeyDownCapture:p,labelTransitionProps:m,labelAlwaysOn:f,thumbLabel:h,onFocus:v,onBlur:y,showLabelOnHover:x,isHovered:b,children:S=null,disabled:A},C)=>{const{getStyles:T}=useSliderContext(),[k,D]=reactExports.useState(!1),w=f||c||k||x&&b;return jsxRuntimeExports.jsxs(Box,{tabIndex:0,role:"slider","aria-label":h,"aria-valuemax":e,"aria-valuemin":t,"aria-valuenow":i,ref:C,__vars:{"--slider-thumb-offset":`${o}%`},...T("thumb",{focusable:!0}),mod:{dragging:c,disabled:A},onFocus:R=>{D(!0),typeof v=="function"&&v(R)},onBlur:R=>{D(!1),typeof y=="function"&&y(R)},onTouchStart:d,onMouseDown:d,onKeyDownCapture:p,onClick:R=>R.stopPropagation(),children:[S,jsxRuntimeExports.jsx(Transition,{mounted:s!=null&&!!w,transition:"fade",duration:0,...m,children:R=>jsxRuntimeExports.jsx("div",{...T("label",{style:R}),children:s})})]})});Thumb.displayName="@mantine/core/SliderThumb";function getPosition({value:e,min:t,max:i}){const o=(e-t)/(i-t)*100;return Math.min(Math.max(o,0),100)}function isMarkFilled({mark:e,offset:t,value:i,inverted:o=!1}){return o?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:o,value:s,offset:c,inverted:d}){const{getStyles:p}=useSliderContext();if(!e)return null;const m=e.map((f,h)=>reactExports.createElement(Box,{...p("markWrapper"),__vars:{"--mark-offset":`${getPosition({value:f.value,min:t,max:i})}%`},key:h},jsxRuntimeExports.jsx(Box,{...p("mark"),mod:{filled:isMarkFilled({mark:f,value:s,offset:c,inverted:d}),disabled:o}}),f.label&&jsxRuntimeExports.jsx("div",{...p("markLabel"),children:f.label})));return jsxRuntimeExports.jsx("div",{children:m})}Marks.displayName="@mantine/core/SliderMarks";function Track({filled:e,children:t,offset:i,disabled:o,marksOffset:s,inverted:c,containerProps:d,...p}){const{getStyles:m}=useSliderContext();return jsxRuntimeExports.jsx(Box,{...m("trackContainer"),mod:{disabled:o},...d,children:jsxRuntimeExports.jsxs(Box,{...m("track"),mod:{inverted:c,disabled:o},children:[jsxRuntimeExports.jsx(Box,{mod:{inverted:c,disabled:o},__vars:{"--slider-bar-width":`calc(${e}% + 2 * var(--slider-size))`,"--slider-bar-offset":`calc(${i}% - var(--slider-size))`},...m("bar")}),t,jsxRuntimeExports.jsx(Marks,{...p,offset:s,disabled:o,inverted:c})]})})}Track.displayName="@mantine/core/SliderTrack";function getChangeValue({value:e,containerWidth:t,min:i,max:o,step:s,precision:c}){const p=(t?Math.min(Math.max(e,0),t)/t:e)*(o-i),m=(p!==0?Math.round(p/s)*s:0)+i,f=Math.max(m,i);return c!==void 0?Number(f.toFixed(c)):f}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 o=[...t].sort((s,c)=>s.value-c.value).find(s=>s.value>e);return o?o.value:e}function getPreviousMarkValue(e,t){const o=[...t].sort((s,c)=>c.value-s.value).find(s=>s.value<e);return o?o.value:e}function getFirstMarkValue(e){const t=[...e].sort((i,o)=>i.value-o.value);return t.length>0?t[0].value:0}function getLastMarkValue(e){const t=[...e].sort((i,o)=>i.value-o.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:o,radius:s})=>({root:{"--slider-size":getSize(t,"slider-size"),"--slider-color":i?getThemeColor(i,e):void 0,"--slider-radius":s===void 0?void 0:getRadius(s),"--slider-thumb-size":o!==void 0?rem(o):"calc(var(--slider-size) * 2)"}}),Slider=factory((e,t)=>{const i=useProps("Slider",defaultProps$6,e),{classNames:o,styles:s,value:c,onChange:d,onChangeEnd:p,size:m,min:f,max:h,step:v,precision:y,defaultValue:x,name:b,marks:S,label:A,labelTransitionProps:C,labelAlwaysOn:T,thumbLabel:k,showLabelOnHover:D,thumbChildren:w,disabled:R,unstyled:_,scale:M,inverted:N,className:P,style:L,vars:I,hiddenInputProps:W,restrictToMarks:ae,thumbProps:Q,...B}=i,q=useStyles({name:"Slider",props:i,classes:classes$3,classNames:o,className:P,styles:s,style:L,vars:I,varsResolver:varsResolver$3,unstyled:_}),{dir:K}=useDirection(),[U,$]=reactExports.useState(!1),[Y,z]=useUncontrolled({value:typeof c=="number"?clamp$4(c,f,h):c,defaultValue:typeof x=="number"?clamp$4(x,f,h):x,finalValue:clamp$4(0,f,h),onChange:d}),O=reactExports.useRef(Y),F=reactExports.useRef(p);reactExports.useEffect(()=>{F.current=p},[p]);const H=reactExports.useRef(null),X=reactExports.useRef(null),te=getPosition({value:Y,min:f,max:h}),J=M(Y),ce=typeof A=="function"?A(J):A,ue=y??getPrecision(v),Ae=reactExports.useCallback(({x:oe})=>{if(!R){const G=getChangeValue({value:oe,min:f,max:h,step:v,precision:ue});z(ae&&(S!=null&&S.length)?findClosestNumber(G,S.map(ee=>ee.value)):G),O.current=G}},[R,f,h,v,ue,z,S,ae]),Ee=reactExports.useCallback(()=>{if(!R&&F.current){const oe=ae&&(S!=null&&S.length)?findClosestNumber(O.current,S.map(G=>G.value)):O.current;F.current(oe)}},[R,S,ae]),{ref:Me,active:je}=useMove(Ae,{onScrubEnd:Ee},K),ke=reactExports.useCallback(oe=>{!R&&F.current&&F.current(oe)},[R]),ge=oe=>{var G,ee,de,pe,ve,Te;if(!R)switch(oe.key){case"ArrowUp":{if(oe.preventDefault(),(G=X.current)==null||G.focus(),ae&&S){const re=getNextMarkValue(Y,S);z(re),ke(re);break}const se=getFloatingValue(Math.min(Math.max(Y+v,f),h),ue);z(se),ke(se);break}case"ArrowRight":{if(oe.preventDefault(),(ee=X.current)==null||ee.focus(),ae&&S){const re=K==="rtl"?getPreviousMarkValue(Y,S):getNextMarkValue(Y,S);z(re),ke(re);break}const se=getFloatingValue(Math.min(Math.max(K==="rtl"?Y-v:Y+v,f),h),ue);z(se),ke(se);break}case"ArrowDown":{if(oe.preventDefault(),(de=X.current)==null||de.focus(),ae&&S){const re=getPreviousMarkValue(Y,S);z(re),ke(re);break}const se=getFloatingValue(Math.min(Math.max(Y-v,f),h),ue);z(se),ke(se);break}case"ArrowLeft":{if(oe.preventDefault(),(pe=X.current)==null||pe.focus(),ae&&S){const re=K==="rtl"?getNextMarkValue(Y,S):getPreviousMarkValue(Y,S);z(re),ke(re);break}const se=getFloatingValue(Math.min(Math.max(K==="rtl"?Y+v:Y-v,f),h),ue);z(se),ke(se);break}case"Home":{if(oe.preventDefault(),(ve=X.current)==null||ve.focus(),ae&&S){z(getFirstMarkValue(S)),ke(getFirstMarkValue(S));break}z(f),ke(f);break}case"End":{if(oe.preventDefault(),(Te=X.current)==null||Te.focus(),ae&&S){z(getLastMarkValue(S)),ke(getLastMarkValue(S));break}z(h),ke(h);break}}};return jsxRuntimeExports.jsx(SliderProvider,{value:{getStyles:q},children:jsxRuntimeExports.jsxs(SliderRoot,{...B,ref:useMergedRef(t,H),onKeyDownCapture:ge,onMouseDownCapture:()=>{var oe;return(oe=H.current)==null?void 0:oe.focus()},size:m,disabled:R,children:[jsxRuntimeExports.jsx(Track,{inverted:N,offset:0,filled:te,marks:S,min:f,max:h,value:J,disabled:R,containerProps:{ref:Me,onMouseEnter:D?()=>$(!0):void 0,onMouseLeave:D?()=>$(!1):void 0},children:jsxRuntimeExports.jsx(Thumb,{max:h,min:f,value:J,position:te,dragging:je,label:ce,ref:X,labelTransitionProps:C,labelAlwaysOn:T,thumbLabel:k,showLabelOnHover:D,isHovered:U,disabled:R,...Q,children:w})}),jsxRuntimeExports.jsx("input",{type:"hidden",name:b,value:J,...W})]})})});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:o})=>({root:{"--stack-gap":getSpacing(t),"--stack-align":i,"--stack-justify":o}}),Stack=factory((e,t)=>{const i=useProps("Stack",defaultProps$5,e),{classNames:o,className:s,style:c,styles:d,unstyled:p,vars:m,align:f,justify:h,gap:v,variant:y,...x}=i,b=useStyles({name:"Stack",props:i,classes:classes$2,className:s,style:c,classNames:o,styles:d,unstyled:p,vars:m,varsResolver:varsResolver$2});return jsxRuntimeExports.jsx(Box,{ref:t,...b("root"),variant:y,...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:o,gradient:s,color:c,autoContrast:d})=>{const p=e.variantColorResolver({color:c||e.primaryColor,theme:e,gradient:s,variant:o||"filled",autoContrast:d});return{root:{"--ti-size":getSize(t,"ti-size"),"--ti-radius":i===void 0?void 0:getRadius(i),"--ti-bg":c||o?p.background:void 0,"--ti-color":c||o?p.color:void 0,"--ti-bd":c||o?p.border:void 0}}},ThemeIcon=factory((e,t)=>{const i=useProps("ThemeIcon",defaultProps$3,e),{classNames:o,className:s,style:c,styles:d,unstyled:p,vars:m,autoContrast:f,...h}=i,v=useStyles({name:"ThemeIcon",classes:classes$1,props:i,className:s,style:c,classNames:o,styles:d,unstyled:p,vars:m,varsResolver:varsResolver$1});return jsxRuntimeExports.jsx(Box,{ref:t,...v("root"),...h})});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=d,dist.serialize=f;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,o=/^[\u0020-\u003A\u003D-\u007E]*$/,s=Object.prototype.toString,c=(()=>{const y=function(){};return y.prototype=Object.create(null),y})();function d(y,x){const b=new c,S=y.length;if(S<2)return b;const A=(x==null?void 0:x.decode)||h;let C=0;do{const T=y.indexOf("=",C);if(T===-1)break;const k=y.indexOf(";",C),D=k===-1?S:k;if(T>D){C=y.lastIndexOf(";",T-1)+1;continue}const w=p(y,C,T),R=m(y,T,w),_=y.slice(w,R);if(b[_]===void 0){let M=p(y,T+1,D),N=m(y,D,M);const P=A(y.slice(M,N));b[_]=P}C=D+1}while(C<S);return b}function p(y,x,b){do{const S=y.charCodeAt(x);if(S!==32&&S!==9)return x}while(++x<b);return b}function m(y,x,b){for(;x>b;){const S=y.charCodeAt(--x);if(S!==32&&S!==9)return x+1}return b}function f(y,x,b){const S=(b==null?void 0:b.encode)||encodeURIComponent;if(!e.test(y))throw new TypeError(`argument name is invalid: ${y}`);const A=S(x);if(!t.test(A))throw new TypeError(`argument val is invalid: ${x}`);let C=y+"="+A;if(!b)return C;if(b.maxAge!==void 0){if(!Number.isInteger(b.maxAge))throw new TypeError(`option maxAge is invalid: ${b.maxAge}`);C+="; Max-Age="+b.maxAge}if(b.domain){if(!i.test(b.domain))throw new TypeError(`option domain is invalid: ${b.domain}`);C+="; Domain="+b.domain}if(b.path){if(!o.test(b.path))throw new TypeError(`option path is invalid: ${b.path}`);C+="; Path="+b.path}if(b.expires){if(!v(b.expires)||!Number.isFinite(b.expires.valueOf()))throw new TypeError(`option expires is invalid: ${b.expires}`);C+="; Expires="+b.expires.toUTCString()}if(b.httpOnly&&(C+="; HttpOnly"),b.secure&&(C+="; Secure"),b.partitioned&&(C+="; Partitioned"),b.priority)switch(typeof b.priority=="string"?b.priority.toLowerCase():void 0){case"low":C+="; Priority=Low";break;case"medium":C+="; Priority=Medium";break;case"high":C+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${b.priority}`)}if(b.sameSite)switch(typeof b.sameSite=="string"?b.sameSite.toLowerCase():b.sameSite){case!0:case"strict":C+="; SameSite=Strict";break;case"lax":C+="; SameSite=Lax";break;case"none":C+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${b.sameSite}`)}return C}function h(y){if(y.indexOf("%")===-1)return y;try{return decodeURIComponent(y)}catch{return y}}function v(y){return s.call(y)==="[object Date]"}return dist}requireDist();var PopStateEventType="popstate";function createBrowserHistory(e={}){function t(o,s){let{pathname:c,search:d,hash:p}=o.location;return createLocation("",{pathname:c,search:d,hash:p},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function i(o,s){return typeof s=="string"?s:createPath(s)}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,o){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?parsePath(t):t,state:i,key:t&&t.key||o||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 o=e.indexOf("?");o>=0&&(t.search=e.substring(o),e=e.substring(0,o)),e&&(t.pathname=e)}return t}function getUrlBasedHistory(e,t,i,o={}){let{window:s=document.defaultView,v5Compat:c=!1}=o,d=s.history,p="POP",m=null,f=h();f==null&&(f=0,d.replaceState({...d.state,idx:f},""));function h(){return(d.state||{idx:null}).idx}function v(){p="POP";let A=h(),C=A==null?null:A-f;f=A,m&&m({action:p,location:S.location,delta:C})}function y(A,C){p="PUSH";let T=createLocation(S.location,A,C);f=h()+1;let k=getHistoryState(T,f),D=S.createHref(T);try{d.pushState(k,"",D)}catch(w){if(w instanceof DOMException&&w.name==="DataCloneError")throw w;s.location.assign(D)}c&&m&&m({action:p,location:S.location,delta:1})}function x(A,C){p="REPLACE";let T=createLocation(S.location,A,C);f=h();let k=getHistoryState(T,f),D=S.createHref(T);d.replaceState(k,"",D),c&&m&&m({action:p,location:S.location,delta:0})}function b(A){return createBrowserURLImpl(A)}let S={get action(){return p},get location(){return e(s,d)},listen(A){if(m)throw new Error("A history only accepts one active listener");return s.addEventListener(PopStateEventType,v),m=A,()=>{s.removeEventListener(PopStateEventType,v),m=null}},createHref(A){return t(s,A)},createURL:b,encodeLocation(A){let C=b(A);return{pathname:C.pathname,search:C.search,hash:C.hash}},push:y,replace:x,go(A){return d.go(A)}};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 o=typeof e=="string"?e:createPath(e);return o=o.replace(/ $/,"%20"),!t&&o.startsWith("//")&&(o=i+o),new URL(o,i)}function matchRoutes(e,t,i="/"){return matchRoutesImpl(e,t,i,!1)}function matchRoutesImpl(e,t,i,o){let s=typeof t=="string"?parsePath(t):t,c=stripBasename(s.pathname||"/",i);if(c==null)return null;let d=flattenRoutes(e);rankRouteBranches(d);let p=null;for(let m=0;p==null&&m<d.length;++m){let f=decodePath(c);p=matchRouteBranch(d[m],f,o)}return p}function flattenRoutes(e,t=[],i=[],o=""){let s=(c,d,p)=>{let m={relativePath:p===void 0?c.path||"":p,caseSensitive:c.caseSensitive===!0,childrenIndex:d,route:c};m.relativePath.startsWith("/")&&(invariant(m.relativePath.startsWith(o),`Absolute route path "${m.relativePath}" nested under path "${o}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),m.relativePath=m.relativePath.slice(o.length));let f=joinPaths([o,m.relativePath]),h=i.concat(m);c.children&&c.children.length>0&&(invariant(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${f}".`),flattenRoutes(c.children,t,h,f)),!(c.path==null&&!c.index)&&t.push({path:f,score:computeScore(f,c.index),routesMeta:h})};return e.forEach((c,d)=>{var p;if(c.path===""||!((p=c.path)!=null&&p.includes("?")))s(c,d);else for(let m of explodeOptionalSegments(c.path))s(c,d,m)}),t}function explodeOptionalSegments(e){let t=e.split("/");if(t.length===0)return[];let[i,...o]=t,s=i.endsWith("?"),c=i.replace(/\?$/,"");if(o.length===0)return s?[c,""]:[c];let d=explodeOptionalSegments(o.join("/")),p=[];return p.push(...d.map(m=>m===""?c:[c,m].join("/"))),s&&p.push(...d),p.map(m=>e.startsWith("/")&&m===""?"/":m)}function rankRouteBranches(e){e.sort((t,i)=>t.score!==i.score?i.score-t.score:compareIndexes(t.routesMeta.map(o=>o.childrenIndex),i.routesMeta.map(o=>o.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("/"),o=i.length;return i.some(isSplat)&&(o+=splatPenalty),t&&(o+=indexRouteValue),i.filter(s=>!isSplat(s)).reduce((s,c)=>s+(paramRe.test(c)?dynamicSegmentValue:c===""?emptySegmentValue:staticSegmentValue),o)}function compareIndexes(e,t){return e.length===t.length&&e.slice(0,-1).every((o,s)=>o===t[s])?e[e.length-1]-t[t.length-1]:0}function matchRouteBranch(e,t,i=!1){let{routesMeta:o}=e,s={},c="/",d=[];for(let p=0;p<o.length;++p){let m=o[p],f=p===o.length-1,h=c==="/"?t:t.slice(c.length)||"/",v=matchPath({path:m.relativePath,caseSensitive:m.caseSensitive,end:f},h),y=m.route;if(!v&&f&&i&&!o[o.length-1].route.index&&(v=matchPath({path:m.relativePath,caseSensitive:m.caseSensitive,end:!1},h)),!v)return null;Object.assign(s,v.params),d.push({params:s,pathname:joinPaths([c,v.pathname]),pathnameBase:normalizePathname(joinPaths([c,v.pathnameBase])),route:y}),v.pathnameBase!=="/"&&(c=joinPaths([c,v.pathnameBase]))}return d}function matchPath(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[i,o]=compilePath(e.path,e.caseSensitive,e.end),s=t.match(i);if(!s)return null;let c=s[0],d=c.replace(/(.)\/+$/,"$1"),p=s.slice(1);return{params:o.reduce((f,{paramName:h,isOptional:v},y)=>{if(h==="*"){let b=p[y]||"";d=c.slice(0,c.length-b.length).replace(/(.)\/+$/,"$1")}const x=p[y];return v&&!x?f[h]=void 0:f[h]=(x||"").replace(/%2F/g,"/"),f},{}),pathname:c,pathnameBase:d,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 o=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(d,p,m)=>(o.push({paramName:p,isOptional:m!=null}),m?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(o.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):i?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),o]}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,o=e.charAt(i);return o&&o!=="/"?null:e.slice(i)||"/"}function resolvePath(e,t="/"){let{pathname:i,search:o="",hash:s=""}=typeof e=="string"?parsePath(e):e;return{pathname:i?i.startsWith("/")?i:resolvePathname(i,t):t,search:normalizeSearch(o),hash:normalizeHash(s)}}function resolvePathname(e,t){let i=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?i.length>1&&i.pop():s!=="."&&i.push(s)}),i.length>1?i.join("/"):"/"}function getInvalidPathError(e,t,i,o){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(o)}]. 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,o)=>o===t.length-1?i.pathname:i.pathnameBase)}function resolveTo(e,t,i,o=!1){let s;typeof e=="string"?s=parsePath(e):(s={...e},invariant(!s.pathname||!s.pathname.includes("?"),getInvalidPathError("?","pathname","search",s)),invariant(!s.pathname||!s.pathname.includes("#"),getInvalidPathError("#","pathname","hash",s)),invariant(!s.search||!s.search.includes("#"),getInvalidPathError("#","search","hash",s)));let c=e===""||s.pathname==="",d=c?"/":s.pathname,p;if(d==null)p=i;else{let v=t.length-1;if(!o&&d.startsWith("..")){let y=d.split("/");for(;y[0]==="..";)y.shift(),v-=1;s.pathname=y.join("/")}p=v>=0?t[v]:"/"}let m=resolvePath(s,p),f=d&&d!=="/"&&d.endsWith("/"),h=(c||d===".")&&i.endsWith("/");return!m.pathname.endsWith("/")&&(f||h)&&(m.pathname+="/"),m}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:o}=reactExports.useContext(NavigationContext),{hash:s,pathname:c,search:d}=useResolvedPath(e,{relative:t}),p=c;return i!=="/"&&(p=c==="/"?i:joinPaths([i,c])),o.createHref({pathname:p,search:d,hash:s})}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:o}=reactExports.useContext(RouteContext),{pathname:s}=useLocation(),c=JSON.stringify(getResolveToMatches(o)),d=reactExports.useRef(!1);return useIsomorphicLayoutEffect(()=>{d.current=!0}),reactExports.useCallback((m,f={})=>{if(warning(d.current,navigateEffectWarning),!d.current)return;if(typeof m=="number"){i.go(m);return}let h=resolveTo(m,JSON.parse(c),s,f.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:joinPaths([t,h.pathname])),(f.replace?i.replace:i.push)(h,f.state,f)},[t,i,c,s,e])}reactExports.createContext(null);function useResolvedPath(e,{relative:t}={}){let{matches:i}=reactExports.useContext(RouteContext),{pathname:o}=useLocation(),s=JSON.stringify(getResolveToMatches(i));return reactExports.useMemo(()=>resolveTo(e,JSON.parse(s),o,t==="path"),[e,s,o,t])}function useRoutesImpl(e,t,i,o){invariant(useInRouterContext(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:s,static:c}=reactExports.useContext(NavigationContext),{matches:d}=reactExports.useContext(RouteContext),p=d[d.length-1],m=p?p.params:{},f=p?p.pathname:"/",h=p?p.pathnameBase:"/",v=p&&p.route;{let T=v&&v.path||"";warningOnce(f,!v||T.endsWith("*")||T.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${f}" (under <Route path="${T}">) 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="${T}"> to <Route path="${T==="/"?"*":`${T}/*`}">.`)}let y=useLocation(),x;x=y;let b=x.pathname||"/",S=b;if(h!=="/"){let T=h.replace(/^\//,"").split("/");S="/"+b.replace(/^\//,"").split("/").slice(T.length).join("/")}let A=!c&&i&&i.matches&&i.matches.length>0?i.matches:matchRoutes(e,{pathname:S});return warning(v||A!=null,`No routes matched location "${x.pathname}${x.search}${x.hash}" `),warning(A==null||A[A.length-1].route.element!==void 0||A[A.length-1].route.Component!==void 0||A[A.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(A&&A.map(T=>Object.assign({},T,{params:Object.assign({},m,T.params),pathname:joinPaths([h,s.encodeLocation?s.encodeLocation(T.pathname).pathname:T.pathname]),pathnameBase:T.pathnameBase==="/"?h:joinPaths([h,s.encodeLocation?s.encodeLocation(T.pathnameBase).pathname:T.pathnameBase])})),d,i,o)}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,o="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:o},c={padding:"2px 4px",backgroundColor:o},d=null;return console.error("Error handled by React Router default ErrorBoundary:",e),d=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:c},"ErrorBoundary")," or"," ",reactExports.createElement("code",{style:c},"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:s},i):null,d)}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 o=reactExports.useContext(DataRouterContext);return o&&o.static&&o.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=t.route.id),reactExports.createElement(RouteContext.Provider,{value:e},i)}function _renderMatches(e,t=[],i=null,o=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 s=e,c=i==null?void 0:i.errors;if(c!=null){let m=s.findIndex(f=>f.route.id&&(c==null?void 0:c[f.route.id])!==void 0);invariant(m>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(c).join(",")}`),s=s.slice(0,Math.min(s.length,m+1))}let d=!1,p=-1;if(i)for(let m=0;m<s.length;m++){let f=s[m];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(p=m),f.route.id){let{loaderData:h,errors:v}=i,y=f.route.loader&&!h.hasOwnProperty(f.route.id)&&(!v||v[f.route.id]===void 0);if(f.route.lazy||y){d=!0,p>=0?s=s.slice(0,p+1):s=[s[0]];break}}}return s.reduceRight((m,f,h)=>{let v,y=!1,x=null,b=null;i&&(v=c&&f.route.id?c[f.route.id]:void 0,x=f.route.errorElement||defaultErrorElement,d&&(p<0&&h===0?(warningOnce("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),y=!0,b=null):p===h&&(y=!0,b=f.route.hydrateFallbackElement||null)));let S=t.concat(s.slice(0,h+1)),A=()=>{let C;return v?C=x:y?C=b:f.route.Component?C=reactExports.createElement(f.route.Component,null):f.route.element?C=f.route.element:C=m,reactExports.createElement(RenderedRoute,{match:f,routeContext:{outlet:m,matches:S,isDataRoute:i!=null},children:C})};return i&&(f.route.ErrorBoundary||f.route.errorElement||h===0)?reactExports.createElement(RenderErrorBoundary,{location:i.location,revalidation:i.revalidation,component:x,error:v,children:A(),routeContext:{outlet:null,matches:S,isDataRoute:!0}}):A()},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 o;let e=reactExports.useContext(RouteErrorContext),t=useDataRouterState("useRouteError"),i=useCurrentRouteId("useRouteError");return e!==void 0?e:(o=t.errors)==null?void 0:o[i]}function useNavigateStable(){let{router:e}=useDataRouterContext("useNavigate"),t=useCurrentRouteId("useNavigate"),i=reactExports.useRef(!1);return useIsomorphicLayoutEffect(()=>{i.current=!0}),reactExports.useCallback(async(s,c={})=>{warning(i.current,navigateEffectWarning),i.current&&(typeof s=="number"?e.navigate(s):await e.navigate(s,{fromRouteId:t,...c}))},[e,t])}var alreadyWarned={};function warningOnce(e,t,i){!t&&!alreadyWarned[e]&&(alreadyWarned[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:o="POP",navigator:s,static:c=!1}){invariant(!useInRouterContext(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let d=e.replace(/^\/*/,"/"),p=reactExports.useMemo(()=>({basename:d,navigator:s,static:c,future:{}}),[d,s,c]);typeof i=="string"&&(i=parsePath(i));let{pathname:m="/",search:f="",hash:h="",state:v=null,key:y="default"}=i,x=reactExports.useMemo(()=>{let b=stripBasename(m,d);return b==null?null:{location:{pathname:b,search:f,hash:h,state:v,key:y},navigationType:o}},[d,m,f,h,v,y,o]);return warning(x!=null,`<Router basename="${d}"> is not able to match the URL "${m}${f}${h}" because it does not start with the basename, so the <Router> won't render anything.`),x==null?null:reactExports.createElement(NavigationContext.Provider,{value:p},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 o=e[i];return t.concat(Array.isArray(o)?o.map(s=>[i,s]):[[i,o]])},[]))}function getSearchParamsForLocation(e,t){let i=createSearchParams(e);return t&&t.forEach((o,s)=>{i.has(s)||t.getAll(s).forEach(c=>{i.append(s,c)})}),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,o,s,c,d;if(isFormElement(e)){let p=e.getAttribute("action");o=p?stripBasename(p,t):null,i=e.getAttribute("method")||defaultMethod,s=getFormEncType(e.getAttribute("enctype"))||defaultEncType,c=new FormData(e)}else if(isButtonElement(e)||isInputElement(e)&&(e.type==="submit"||e.type==="image")){let p=e.form;if(p==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let m=e.getAttribute("formaction")||p.getAttribute("action");if(o=m?stripBasename(m,t):null,i=e.getAttribute("formmethod")||p.getAttribute("method")||defaultMethod,s=getFormEncType(e.getAttribute("formenctype"))||getFormEncType(p.getAttribute("enctype"))||defaultEncType,c=new FormData(p,e),!isFormDataSubmitterSupported()){let{name:f,type:h,value:v}=e;if(h==="image"){let y=f?`${f}.`:"";c.append(`${y}x`,"0"),c.append(`${y}y`,"0")}else f&&c.append(f,v)}}else{if(isHtmlElement(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');i=defaultMethod,o=null,s=defaultEncType,d=e}return c&&s==="text/plain"&&(d=c,c=void 0),{action:o,method:i.toLowerCase(),encType:s,formData:c,body:d}}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 o=await Promise.all(e.map(async s=>{let c=t.routes[s.route.id];if(c){let d=await loadRouteModule(c,i);return d.links?d.links():[]}return[]}));return dedupeLinkDescriptors(o.flat(1).filter(isHtmlLinkDescriptor).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function getNewMatchesForLinks(e,t,i,o,s,c){let d=(m,f)=>i[f]?m.route.id!==i[f].route.id:!0,p=(m,f)=>{var h;return i[f].pathname!==m.pathname||((h=i[f].route.path)==null?void 0:h.endsWith("*"))&&i[f].params["*"]!==m.params["*"]};return c==="assets"?t.filter((m,f)=>d(m,f)||p(m,f)):c==="data"?t.filter((m,f)=>{var v;let h=o.routes[m.route.id];if(!h||!h.hasLoader)return!1;if(d(m,f)||p(m,f))return!0;if(m.route.shouldRevalidate){let y=m.route.shouldRevalidate({currentUrl:new URL(s.pathname+s.search+s.hash,window.origin),currentParams:((v=i[0])==null?void 0:v.params)||{},nextUrl:new URL(e,window.origin),nextParams:m.params,defaultShouldRevalidate:!0});if(typeof y=="boolean")return y}return!0}):[]}function getModuleLinkHrefs(e,t,{includeHydrateFallback:i}={}){return dedupeHrefs(e.map(o=>{let s=t.routes[o.route.id];if(!s)return[];let c=[s.module];return s.clientActionModule&&(c=c.concat(s.clientActionModule)),s.clientLoaderModule&&(c=c.concat(s.clientLoaderModule)),i&&s.hydrateFallbackModule&&(c=c.concat(s.hydrateFallbackModule)),s.imports&&(c=c.concat(s.imports)),c}).flat(1))}function dedupeHrefs(e){return[...new Set(e)]}function sortKeys(e){let t={},i=Object.keys(e).sort();for(let o of i)t[o]=e[o];return t}function dedupeLinkDescriptors(e,t){let i=new Set;return new Set(t),e.reduce((o,s)=>{let c=JSON.stringify(sortKeys(s));return i.has(c)||(i.add(c),o.push({key:c,link:s})),o},[])}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),[o,s]=reactExports.useState(!1),[c,d]=reactExports.useState(!1),{onFocus:p,onBlur:m,onMouseEnter:f,onMouseLeave:h,onTouchStart:v}=t,y=reactExports.useRef(null);reactExports.useEffect(()=>{if(e==="render"&&d(!0),e==="viewport"){let S=C=>{C.forEach(T=>{d(T.isIntersecting)})},A=new IntersectionObserver(S,{threshold:.5});return y.current&&A.observe(y.current),()=>{A.disconnect()}}},[e]),reactExports.useEffect(()=>{if(o){let S=setTimeout(()=>{d(!0)},100);return()=>{clearTimeout(S)}}},[o]);let x=()=>{s(!0)},b=()=>{s(!1),d(!1)};return i?e!=="intent"?[c,y,{}]:[c,y,{onFocus:composeEventHandlers$1(p,x),onBlur:composeEventHandlers$1(m,b),onMouseEnter:composeEventHandlers$1(f,x),onMouseLeave:composeEventHandlers$1(h,b),onTouchStart:composeEventHandlers$1(v,x)}]:[!1,y,{}]}function composeEventHandlers$1(e,t){return i=>{e&&e(i),i.defaultPrevented||t(i)}}function PrefetchPageLinks({page:e,...t}){let{router:i}=useDataRouterContext2(),o=reactExports.useMemo(()=>matchRoutes(i.routes,e,i.basename),[i.routes,e,i.basename]);return o?reactExports.createElement(PrefetchPageLinksImpl,{page:e,matches:o,...t}):null}function useKeyedPrefetchLinks(e){let{manifest:t,routeModules:i}=useFrameworkContext(),[o,s]=reactExports.useState([]);return reactExports.useEffect(()=>{let c=!1;return getKeyedPrefetchLinks(e,t,i).then(d=>{c||s(d)}),()=>{c=!0}},[e,t,i]),o}function PrefetchPageLinksImpl({page:e,matches:t,...i}){let o=useLocation(),{manifest:s,routeModules:c}=useFrameworkContext(),{basename:d}=useDataRouterContext2(),{loaderData:p,matches:m}=useDataRouterStateContext(),f=reactExports.useMemo(()=>getNewMatchesForLinks(e,t,m,s,o,"data"),[e,t,m,s,o]),h=reactExports.useMemo(()=>getNewMatchesForLinks(e,t,m,s,o,"assets"),[e,t,m,s,o]),v=reactExports.useMemo(()=>{if(e===o.pathname+o.search+o.hash)return[];let b=new Set,S=!1;if(t.forEach(C=>{var k;let T=s.routes[C.route.id];!T||!T.hasLoader||(!f.some(D=>D.route.id===C.route.id)&&C.route.id in p&&((k=c[C.route.id])!=null&&k.shouldRevalidate)||T.hasClientLoader?S=!0:b.add(C.route.id))}),b.size===0)return[];let A=singleFetchUrl(e,d);return S&&b.size>0&&A.searchParams.set("_routes",t.filter(C=>b.has(C.route.id)).map(C=>C.route.id).join(",")),[A.pathname+A.search]},[d,p,o,s,f,t,e,c]),y=reactExports.useMemo(()=>getModuleLinkHrefs(h,s),[h,s]),x=useKeyedPrefetchLinks(h);return reactExports.createElement(reactExports.Fragment,null,v.map(b=>reactExports.createElement("link",{key:b,rel:"prefetch",as:"fetch",href:b,...i})),y.map(b=>reactExports.createElement("link",{key:b,rel:"modulepreload",href:b,...i})),x.map(({key:b,link:S})=>reactExports.createElement("link",{key:b,...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 o=reactExports.useRef();o.current==null&&(o.current=createBrowserHistory({window:i,v5Compat:!0}));let s=o.current,[c,d]=reactExports.useState({action:s.action,location:s.location}),p=reactExports.useCallback(m=>{reactExports.startTransition(()=>d(m))},[d]);return reactExports.useLayoutEffect(()=>s.listen(p),[s,p]),reactExports.createElement(Router,{basename:e,children:t,location:c.location,navigationType:c.action,navigator:s})}var ABSOLUTE_URL_REGEX2=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Link=reactExports.forwardRef(function({onClick:t,discover:i="render",prefetch:o="none",relative:s,reloadDocument:c,replace:d,state:p,target:m,to:f,preventScrollReset:h,viewTransition:v,...y},x){let{basename:b}=reactExports.useContext(NavigationContext),S=typeof f=="string"&&ABSOLUTE_URL_REGEX2.test(f),A,C=!1;if(typeof f=="string"&&S&&(A=f,isBrowser$1))try{let N=new URL(window.location.href),P=f.startsWith("//")?new URL(N.protocol+f):new URL(f),L=stripBasename(P.pathname,b);P.origin===N.origin&&L!=null?f=L+P.search+P.hash:C=!0}catch{warning(!1,`<Link to="${f}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let T=useHref(f,{relative:s}),[k,D,w]=usePrefetchBehavior(o,y),R=useLinkClickHandler(f,{replace:d,state:p,target:m,preventScrollReset:h,relative:s,viewTransition:v});function _(N){t&&t(N),N.defaultPrevented||R(N)}let M=reactExports.createElement("a",{...y,...w,href:A||T,onClick:C||c?t:_,ref:mergeRefs(x,D),target:m,"data-discover":!S&&i==="render"?"true":void 0});return k&&!S?reactExports.createElement(reactExports.Fragment,null,M,reactExports.createElement(PrefetchPageLinks,{page:T})):M});Link.displayName="Link";var NavLink=reactExports.forwardRef(function({"aria-current":t="page",caseSensitive:i=!1,className:o="",end:s=!1,style:c,to:d,viewTransition:p,children:m,...f},h){let v=useResolvedPath(d,{relative:f.relative}),y=useLocation(),x=reactExports.useContext(DataRouterStateContext),{navigator:b,basename:S}=reactExports.useContext(NavigationContext),A=x!=null&&useViewTransitionState(v)&&p===!0,C=b.encodeLocation?b.encodeLocation(v).pathname:v.pathname,T=y.pathname,k=x&&x.navigation&&x.navigation.location?x.navigation.location.pathname:null;i||(T=T.toLowerCase(),k=k?k.toLowerCase():null,C=C.toLowerCase()),k&&S&&(k=stripBasename(k,S)||k);const D=C!=="/"&&C.endsWith("/")?C.length-1:C.length;let w=T===C||!s&&T.startsWith(C)&&T.charAt(D)==="/",R=k!=null&&(k===C||!s&&k.startsWith(C)&&k.charAt(C.length)==="/"),_={isActive:w,isPending:R,isTransitioning:A},M=w?t:void 0,N;typeof o=="function"?N=o(_):N=[o,w?"active":null,R?"pending":null,A?"transitioning":null].filter(Boolean).join(" ");let P=typeof c=="function"?c(_):c;return reactExports.createElement(Link,{...f,"aria-current":M,className:N,ref:h,style:P,to:d,viewTransition:p},typeof m=="function"?m(_):m)});NavLink.displayName="NavLink";var Form=reactExports.forwardRef(({discover:e="render",fetcherKey:t,navigate:i,reloadDocument:o,replace:s,state:c,method:d=defaultMethod,action:p,onSubmit:m,relative:f,preventScrollReset:h,viewTransition:v,...y},x)=>{let b=useSubmit(),S=useFormAction(p,{relative:f}),A=d.toLowerCase()==="get"?"get":"post",C=typeof p=="string"&&ABSOLUTE_URL_REGEX2.test(p),T=k=>{if(m&&m(k),k.defaultPrevented)return;k.preventDefault();let D=k.nativeEvent.submitter,w=(D==null?void 0:D.getAttribute("formmethod"))||d;b(D||k.currentTarget,{fetcherKey:t,method:w,navigate:i,replace:s,state:c,relative:f,preventScrollReset:h,viewTransition:v})};return reactExports.createElement("form",{ref:x,method:A,action:S,onSubmit:o?m:T,...y,"data-discover":!C&&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:o,preventScrollReset:s,relative:c,viewTransition:d}={}){let p=useNavigate(),m=useLocation(),f=useResolvedPath(e,{relative:c});return reactExports.useCallback(h=>{if(shouldProcessLinkClick(h,t)){h.preventDefault();let v=i!==void 0?i:createPath(m)===createPath(f);p(e,{replace:v,state:o,preventScrollReset:s,relative:c,viewTransition:d})}},[m,p,f,i,o,t,e,s,c,d])}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),o=useLocation(),s=reactExports.useMemo(()=>getSearchParamsForLocation(o.search,i.current?null:t.current),[o.search]),c=useNavigate(),d=reactExports.useCallback((p,m)=>{const f=createSearchParams(typeof p=="function"?p(s):p);i.current=!0,c("?"+f,m)},[c,s]);return[s,d]}var fetcherId=0,getUniqueFetcherId=()=>`__${String(++fetcherId)}__`;function useSubmit(){let{router:e}=useDataRouterContext3("useSubmit"),{basename:t}=reactExports.useContext(NavigationContext),i=useRouteId();return reactExports.useCallback(async(o,s={})=>{let{action:c,method:d,encType:p,formData:m,body:f}=getFormSubmissionInfo(o,t);if(s.navigate===!1){let h=s.fetcherKey||getUniqueFetcherId();await e.fetch(h,i,s.action||c,{preventScrollReset:s.preventScrollReset,formData:m,body:f,formMethod:s.method||d,formEncType:s.encType||p,flushSync:s.flushSync})}else await e.navigate(s.action||c,{preventScrollReset:s.preventScrollReset,formData:m,body:f,formMethod:s.method||d,formEncType:s.encType||p,replace:s.replace,state:s.state,fromRouteId:i,flushSync:s.flushSync,viewTransition:s.viewTransition})},[e,t,i])}function useFormAction(e,{relative:t}={}){let{basename:i}=reactExports.useContext(NavigationContext),o=reactExports.useContext(RouteContext);invariant(o,"useFormAction must be used inside a RouteContext");let[s]=o.matches.slice(-1),c={...useResolvedPath(e||".",{relative:t})},d=useLocation();if(e==null){c.search=d.search;let p=new URLSearchParams(c.search),m=p.getAll("index");if(m.some(h=>h==="")){p.delete("index"),m.filter(v=>v).forEach(v=>p.append("index",v));let h=p.toString();c.search=h?`?${h}`:""}}return(!e||e===".")&&s.route.index&&(c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index"),i!=="/"&&(c.pathname=c.pathname==="/"?i:joinPaths([i,c.pathname])),createPath(c)}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:o}=useDataRouterContext3("useViewTransitionState"),s=useResolvedPath(e,{relative:t.relative});if(!i.isTransitioning)return!1;let c=stripBasename(i.currentLocation.pathname,o)||i.currentLocation.pathname,d=stripBasename(i.nextLocation.pathname,o)||i.nextLocation.pathname;return matchPath(s.pathname,d)!=null||matchPath(s.pathname,c)!=null}[...NO_BODY_STATUS_CODES];const 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(o=>i.searchParams.append("args[]",o)),`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 o(d,p,m,f,h,v){if(v!==e){var y=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 y.name="Invariant Violation",y}}o.isRequired=o;function s(){return o}var c={array:o,bigint:o,bool:o,func:o,number:o,object:o,string:o,symbol:o,any:o,arrayOf:s,element:o,elementType:o,instanceOf:s,node:o,objectOf:s,oneOf:s,oneOfType:s,shape:s,exact:s,checkPropTypes:i,resetWarningCache:t};return c.PropTypes=c,c},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 o={};for(const s in e){const c=e[s];let d="",p=!0;for(let m=0;m<c.length;m+=1){const f=c[m];f&&(d+=(p===!0?"":" ")+t(f),p=!1,i&&i[f]&&(d+=" "+i[f]))}o[s]=d}return o}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"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),d=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),y=Symbol.for("react.view_transition"),x=Symbol.for("react.client.reference");function b(S){if(typeof S=="object"&&S!==null){var A=S.$$typeof;switch(A){case e:switch(S=S.type,S){case i:case s:case o:case m:case f:case y:return S;default:switch(S=S&&S.$$typeof,S){case d:case p:case v:case h:return S;case c:return S;default:return A}}case t:return A}}}return reactIs_production.ContextConsumer=c,reactIs_production.ContextProvider=d,reactIs_production.Element=e,reactIs_production.ForwardRef=p,reactIs_production.Fragment=i,reactIs_production.Lazy=v,reactIs_production.Memo=h,reactIs_production.Portal=t,reactIs_production.Profiler=s,reactIs_production.StrictMode=o,reactIs_production.Suspense=m,reactIs_production.SuspenseList=f,reactIs_production.isContextConsumer=function(S){return b(S)===c},reactIs_production.isContextProvider=function(S){return b(S)===d},reactIs_production.isElement=function(S){return typeof S=="object"&&S!==null&&S.$$typeof===e},reactIs_production.isForwardRef=function(S){return b(S)===p},reactIs_production.isFragment=function(S){return b(S)===i},reactIs_production.isLazy=function(S){return b(S)===v},reactIs_production.isMemo=function(S){return b(S)===h},reactIs_production.isPortal=function(S){return b(S)===t},reactIs_production.isProfiler=function(S){return b(S)===s},reactIs_production.isStrictMode=function(S){return b(S)===o},reactIs_production.isSuspense=function(S){return b(S)===m},reactIs_production.isSuspenseList=function(S){return b(S)===f},reactIs_production.isValidElementType=function(S){return typeof S=="string"||typeof S=="function"||S===i||S===s||S===o||S===m||S===f||typeof S=="object"&&S!==null&&(S.$$typeof===v||S.$$typeof===h||S.$$typeof===d||S.$$typeof===c||S.$$typeof===p||S.$$typeof===x||S.getModuleId!==void 0)},reactIs_production.typeOf=b,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 o=i.clone?{...e}:e;return isPlainObject$1(e)&&isPlainObject$1(t)&&Object.keys(t).forEach(s=>{reactExports.isValidElement(t[s])||reactIsExports.isValidElementType(t[s])?o[s]=t[s]:isPlainObject$1(t[s])&&Object.prototype.hasOwnProperty.call(e,s)&&isPlainObject$1(e[s])?o[s]=deepmerge(e[s],t[s],i):i.clone?o[s]=isPlainObject$1(t[s])?deepClone(t[s]):t[s]:o[s]=t[s]}),o}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(o=>o.startsWith("@container")).sort((o,s)=>{var d,p;const c=/min-width:\s*([0-9.]+)/;return+(((d=o.match(c))==null?void 0:d[1])||0)-+(((p=s.match(c))==null?void 0:p[1])||0)});return i.length?i.reduce((o,s)=>{const c=t[s];return delete o[s],o[s]=c,o},{...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[,o,s]=i,c=Number.isNaN(+o)?o||0:+o;return e.containerQueries(s).up(c)}function cssContainerQueries(e){const t=(c,d)=>c.replace("@media",d?`@container ${d}`:"@container");function i(c,d){c.up=(...p)=>t(e.breakpoints.up(...p),d),c.down=(...p)=>t(e.breakpoints.down(...p),d),c.between=(...p)=>t(e.breakpoints.between(...p),d),c.only=(...p)=>t(e.breakpoints.only(...p),d),c.not=(...p)=>{const m=t(e.breakpoints.not(...p),d);return m.includes("not all and")?m.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):m}}const o={},s=c=>(i(o,c),o);return i(s),{...e,containerQueries:s}}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 o=e.theme||{};if(Array.isArray(t)){const c=o.breakpoints||defaultBreakpoints;return t.reduce((d,p,m)=>(d[c.up(c.keys[m])]=i(t[m]),d),{})}if(typeof t=="object"){const c=o.breakpoints||defaultBreakpoints;return Object.keys(t).reduce((d,p)=>{if(isCqShorthand(c.keys,p)){const m=getContainerQuery(o.containerQueries?o:defaultContainerQueries,p);m&&(d[m]=i(t[p],p))}else if(Object.keys(c.values||values).includes(p)){const m=c.up(p);d[m]=i(t[p],p)}else{const m=p;d[m]=t[m]}return d},{})}return i(t)}function createEmptyBreakpointObject(e={}){var i;return((i=e.keys)==null?void 0:i.reduce((o,s)=>{const c=e.up(s);return o[c]={},o},{}))||{}}function removeUnusedBreakpoints(e,t){return e.reduce((i,o)=>{const s=i[o];return(!s||Object.keys(s).length===0)&&delete i[o],i},t)}function getPath(e,t,i=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&i){const o=`vars.${t}`.split(".").reduce((s,c)=>s&&s[c]?s[c]:null,e);if(o!=null)return o}return t.split(".").reduce((o,s)=>o&&o[s]!=null?o[s]:null,e)}function getStyleValue(e,t,i,o=i){let s;return typeof e=="function"?s=e(i):Array.isArray(e)?s=e[i]||o:s=getPath(e,i)||o,t&&(s=t(s,o,e)),s}function style$1(e){const{prop:t,cssProperty:i=e.prop,themeKey:o,transform:s}=e,c=d=>{if(d[t]==null)return null;const p=d[t],m=d.theme,f=getPath(m,o)||{};return handleBreakpoints(d,p,v=>{let y=getStyleValue(f,s,v);return v===y&&typeof v=="string"&&(y=getStyleValue(f,s,`${t}${v==="default"?"":capitalize(v)}`,v)),i===!1?y:{[i]:y}})};return c.propTypes={},c.filterProps=[t],c}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(""),o=properties[t],s=directions[i]||"";return Array.isArray(s)?s.map(c=>o+c):[o+s]}),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,o){const s=getPath(e,t,!0)??i;return typeof s=="number"||typeof s=="string"?c=>typeof c=="string"?c:typeof s=="string"?s.startsWith("var(")&&c===0?0:s.startsWith("var(")&&c===1?s:`calc(${c} * ${s})`:s*c:Array.isArray(s)?c=>{if(typeof c=="string")return c;const d=Math.abs(c),p=s[d];return c>=0?p:typeof p=="number"?-p:typeof p=="string"&&p.startsWith("var(")?`calc(-1 * ${p})`:`-${p}`}:typeof s=="function"?s:()=>{}}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((o,s)=>(o[s]=getValue(t,i),o),{})}function resolveCssProperty(e,t,i,o){if(!t.includes(i))return null;const s=getCssProperties(i),c=getStyleFromPropValue(s,o),d=e[i];return handleBreakpoints(e,d,c)}function style(e,t){const i=createUnarySpacing(e.theme);return Object.keys(e).map(o=>resolveCssProperty(e,t,o,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((o,s)=>(s.filterProps.forEach(c=>{o[c]=s}),o),{}),i=o=>Object.keys(o).reduce((s,c)=>t[c]?merge$1(s,t[c](o)):s,{});return i.propTypes={},i.filterProps=e.reduce((o,s)=>o.concat(s.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=o=>({borderRadius:getValue(t,o)});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=o=>({gap:getValue(t,o)});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=o=>({columnGap:getValue(t,o)});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=o=>({rowGap:getValue(t,o)});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 s,c,d,p,m;const o=((d=(c=(s=e.theme)==null?void 0:s.breakpoints)==null?void 0:c.values)==null?void 0:d[i])||values[i];return o?((m=(p=e.theme)==null?void 0:p.breakpoints)==null?void 0:m.unit)!=="px"?{maxWidth:`${o}${e.theme.breakpoints.unit}`}:{maxWidth:o}:{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((o,s)=>o.concat(Object.keys(s)),[]),i=new Set(t);return e.every(o=>i.size===Object.keys(o).length)}function callIfFn(e,t){return typeof e=="function"?e(t):e}function unstable_createStyleFunctionSx(){function e(i,o,s,c){const d={[i]:o,theme:s},p=c[i];if(!p)return{[i]:o};const{cssProperty:m=i,themeKey:f,transform:h,style:v}=p;if(o==null)return null;if(f==="typography"&&o==="inherit")return{[i]:o};const y=getPath(s,f)||{};return v?v(d):handleBreakpoints(d,o,b=>{let S=getStyleValue(y,h,b);return b===S&&typeof b=="string"&&(S=getStyleValue(y,h,`${i}${b==="default"?"":capitalize(b)}`,b)),m===!1?S:{[m]:S}})}function t(i){const{sx:o,theme:s={}}=i||{};if(!o)return null;const c=s.unstable_sxConfig??defaultSxConfig;function d(p){let m=p;if(typeof p=="function")m=p(s);else if(typeof p!="object")return p;if(!m)return null;const f=createEmptyBreakpointObject(s.breakpoints),h=Object.keys(f);let v=f;return Object.keys(m).forEach(y=>{const x=callIfFn(m[y],s);if(x!=null)if(typeof x=="object")if(c[y])v=merge$1(v,e(y,x,s,c));else{const b=handleBreakpoints({theme:s},x,S=>({[y]:S}));objectsHaveSameKeys(b,x)?v[y]=t({sx:x,theme:s}):v=merge$1(v,b)}else v=merge$1(v,e(y,x,s,c))}),sortContainerQueries(s,removeUnusedBreakpoints(h,v))}return Array.isArray(o)?o.map(d):d(o)}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 o=this;this._insertTag=function(s){var c;o.tags.length===0?o.insertionPoint?c=o.insertionPoint.nextSibling:o.prepend?c=o.container.firstChild:c=o.before:c=o.tags[o.tags.length-1].nextSibling,o.container.insertBefore(s,c),o.tags.push(s)},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(o){o.forEach(this._insertTag)},t.insert=function(o){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(createStyleElement(this));var s=this.tags[this.tags.length-1];if(this.isSpeedy){var c=sheetForTag(s);try{c.insertRule(o,c.cssRules.length)}catch{}}else s.appendChild(document.createTextNode(o));this.ctr++},t.flush=function(){this.tags.forEach(function(o){var s;return(s=o.parentNode)==null?void 0:s.removeChild(o)}),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,o,s,c,d){return{value:e,root:t,parent:i,type:o,props:s,children:c,line,column,length:d,return:""}}function copy(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(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(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(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(t,position-1)+"*"+from(e===47?e:next())}function identifier(e){for(;!token(peek());)next();return slice(e,position)}function compile(e){return dealloc(parse("",null,null,null,[""],e=alloc(e),0,[0],e))}function parse(e,t,i,o,s,c,d,p,m){for(var f=0,h=0,v=d,y=0,x=0,b=0,S=1,A=1,C=1,T=0,k="",D=s,w=c,R=o,_=k;A;)switch(b=T,T=next()){case 40:if(b!=108&&charat(_,v-1)==58){indexof(_+=replace(delimit(T),"&","&\f"),"&\f")!=-1&&(C=-1);break}case 34:case 39:case 91:_+=delimit(T);break;case 9:case 10:case 13:case 32:_+=whitespace(b);break;case 92:_+=escaping(caret()-1,7);continue;case 47:switch(peek()){case 42:case 47:append(comment(commenter(next(),caret()),t,i),m);break;default:_+="/"}break;case 123*S:p[f++]=strlen(_)*C;case 125*S:case 59:case 0:switch(T){case 0:case 125:A=0;case 59+h:C==-1&&(_=replace(_,/\f/g,"")),x>0&&strlen(_)-v&&append(x>32?declaration(_+";",o,i,v-1):declaration(replace(_," ","")+";",o,i,v-2),m);break;case 59:_+=";";default:if(append(R=ruleset(_,t,i,f,h,s,p,k,D=[],w=[],v),c),T===123)if(h===0)parse(_,t,R,R,D,c,v,p,w);else switch(y===99&&charat(_,3)===110?100:y){case 100:case 108:case 109:case 115:parse(e,R,R,o&&append(ruleset(e,R,R,0,0,s,p,k,s,D=[],v),w),s,w,v,p,o?D:w);break;default:parse(_,R,R,R,[""],w,0,p,w)}}f=h=x=0,S=C=1,k=_="",v=d;break;case 58:v=1+strlen(_),x=b;default:if(S<1){if(T==123)--S;else if(T==125&&S++==0&&prev()==125)continue}switch(_+=from(T),T*S){case 38:C=h>0?1:(_+="\f",-1);break;case 44:p[f++]=(strlen(_)-1)*C,C=1;break;case 64:peek()===45&&(_+=delimit(next())),y=peek(),h=v=strlen(k=_+=identifier(caret())),T++;break;case 45:b===45&&strlen(_)==2&&(S=0)}}return c}function ruleset(e,t,i,o,s,c,d,p,m,f,h){for(var v=s-1,y=s===0?c:[""],x=sizeof(y),b=0,S=0,A=0;b<o;++b)for(var C=0,T=substr(e,v+1,v=abs(S=d[b])),k=e;C<x;++C)(k=trim$1(S>0?y[C]+" "+T:replace(T,/&\f/g,y[C])))&&(m[A++]=k);return node(e,t,i,s===0?RULESET:p,m,f,h)}function comment(e,t,i){return node(e,t,i,COMMENT,from(char()),substr(e,2,-2),0)}function declaration(e,t,i,o){return node(e,t,i,DECLARATION,substr(e,0,o),substr(e,o+1,-1),o)}function serialize(e,t){for(var i="",o=sizeof(e),s=0;s<o;s++)i+=t(e[s],s,e,t)||"";return i}function stringify(e,t,i,o){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,o)+"}";case RULESET:e.value=e.props.join(",")}return strlen(i=serialize(e.children,o))?e.return=e.value+"{"+i+"}":""}function middleware(e){var t=sizeof(e);return function(i,o,s,c){for(var d="",p=0;p<t;p++)d+=e[p](i,o,s,c)||"";return d}}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,o){for(var s=0,c=0;s=c,c=peek(),s===38&&c===12&&(i[o]=1),!token(c);)next();return slice(t,position)},toRules=function(t,i){var o=-1,s=44;do switch(token(s)){case 0:s===38&&peek()===12&&(i[o]=1),t[o]+=identifierWithPointTracking(position-1,i,o);break;case 2:t[o]+=delimit(s);break;case 4:if(s===44){t[++o]=peek()===58?"&\f":"",i[o]=t[o].length;break}default:t[o]+=from(s)}while(s=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,o=t.parent,s=t.column===o.column&&t.line===o.line;o.type!=="rule";)if(o=o.parent,!o)return;if(!(t.props.length===1&&i.charCodeAt(0)!==58&&!fixedElements.get(o))&&!s){fixedElements.set(t,!0);for(var c=[],d=getRules(i,c),p=o.props,m=0,f=0;m<d.length;m++)for(var h=0;h<p.length;h++,f++)t.props[f]=c[m]?d[m].replace(/&\f/g,p[h]):p[h]+" "+d[m]}}},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,o,s){if(t.length>-1&&!t.return)switch(t.type){case DECLARATION:t.return=prefix(t.value,t.length);break;case KEYFRAMES:return serialize([copy(t,{value:replace(t.value,"@","@"+WEBKIT)})],s);case RULESET:if(t.length)return combine(t.props,function(c){switch(match(c,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return serialize([copy(t,{props:[replace(c,/:(read-\w+)/,":"+MOZ+"$1")]})],s);case"::placeholder":return serialize([copy(t,{props:[replace(c,/:(plac\w+)/,":"+WEBKIT+"input-$1")]}),copy(t,{props:[replace(c,/:(plac\w+)/,":"+MOZ+"$1")]}),copy(t,{props:[replace(c,/:(plac\w+)/,MS+"input-$1")]})],s)}return""})}},defaultStylisPlugins=[prefixer],createCache=function(t){var i=t.key;if(i==="css"){var o=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(o,function(S){var A=S.getAttribute("data-emotion");A.indexOf(" ")!==-1&&(document.head.appendChild(S),S.setAttribute("data-s",""))})}var s=t.stylisPlugins||defaultStylisPlugins,c={},d,p=[];d=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+i+' "]'),function(S){for(var A=S.getAttribute("data-emotion").split(" "),C=1;C<A.length;C++)c[A[C]]=!0;p.push(S)});var m,f=[compat,removeLabel];{var h,v=[stringify,rulesheet(function(S){h.insert(S)})],y=middleware(f.concat(s,v)),x=function(A){return serialize(compile(A),y)};m=function(A,C,T,k){h=T,x(A?A+"{"+C.styles+"}":C.styles),k&&(b.inserted[C.name]=!0)}}var b={key:i,sheet:new StyleSheet({key:i,container:d,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:c,registered:{},insert:m};return b.sheet.hydrate(p),b},isBrowser=!0;function getRegisteredStyles(e,t,i){var o="";return i.split(" ").forEach(function(s){e[s]!==void 0?t.push(e[s]+";"):s&&(o+=s+" ")}),o}var registerStyles=function(t,i,o){var s=t.key+"-"+i.name;(o===!1||isBrowser===!1)&&t.registered[s]===void 0&&(t.registered[s]=i.styles)},insertStyles=function(t,i,o){registerStyles(t,i,o);var s=t.key+"-"+i.name;if(t.inserted[i.name]===void 0){var c=i;do t.insert(i===c?"."+s:"",c,t.sheet,!0),c=c.next;while(c!==void 0)}};function murmur2(e){for(var t=0,i,o=0,s=e.length;s>=4;++o,s-=4)i=e.charCodeAt(o)&255|(e.charCodeAt(++o)&255)<<8|(e.charCodeAt(++o)&255)<<16|(e.charCodeAt(++o)&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(s){case 3:t^=(e.charCodeAt(o+2)&255)<<16;case 2:t^=(e.charCodeAt(o+1)&255)<<8;case 1:t^=e.charCodeAt(o)&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(o,s,c){return cursor={name:s,styles:c,next:cursor},s})}return unitlessKeys[t]!==1&&!isCustomProperty(t)&&typeof i=="number"&&i!==0?i+"px":i};function handleInterpolation(e,t,i){if(i==null)return"";var o=i;if(o.__emotion_styles!==void 0)return o;switch(typeof i){case"boolean":return"";case"object":{var s=i;if(s.anim===1)return cursor={name:s.name,styles:s.styles,next:cursor},s.name;var c=i;if(c.styles!==void 0){var d=c.next;if(d!==void 0)for(;d!==void 0;)cursor={name:d.name,styles:d.styles,next:cursor},d=d.next;var p=c.styles+";";return p}return createStringFromObject(e,t,i)}case"function":{if(e!==void 0){var m=cursor,f=i(e);return cursor=m,handleInterpolation(e,t,f)}break}}var h=i;if(t==null)return h;var v=t[h];return v!==void 0?v:h}function createStringFromObject(e,t,i){var o="";if(Array.isArray(i))for(var s=0;s<i.length;s++)o+=handleInterpolation(e,t,i[s])+";";else for(var c in i){var d=i[c];if(typeof d!="object"){var p=d;t!=null&&t[p]!==void 0?o+=c+"{"+t[p]+"}":isProcessableValue(p)&&(o+=processStyleName(c)+":"+processStyleValue(c,p)+";")}else if(Array.isArray(d)&&typeof d[0]=="string"&&(t==null||t[d[0]]===void 0))for(var m=0;m<d.length;m++)isProcessableValue(d[m])&&(o+=processStyleName(c)+":"+processStyleValue(c,d[m])+";");else{var f=handleInterpolation(e,t,d);switch(c){case"animation":case"animationName":{o+=processStyleName(c)+":"+f+";";break}default:o+=c+"{"+f+"}"}}}return o}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 o=!0,s="";cursor=void 0;var c=e[0];if(c==null||c.raw===void 0)o=!1,s+=handleInterpolation(i,t,c);else{var d=c;s+=d[0]}for(var p=1;p<e.length;p++)if(s+=handleInterpolation(i,t,e[p]),o){var m=c;s+=m[p]}labelPattern.lastIndex=0;for(var f="",h;(h=labelPattern.exec(s))!==null;)f+="-"+h[1];var v=murmur2(s)+f;return{name:v,styles:s,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,o){var s=reactExports.useContext(EmotionCacheContext);return t(i,s,o)})},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,o){var s;if(i){var c=i.shouldForwardProp;s=t.__emotion_forwardProp&&c?function(d){return t.__emotion_forwardProp(d)&&c(d)}:c}return typeof s!="function"&&o&&(s=t.__emotion_forwardProp),s},Insertion=function(t){var i=t.cache,o=t.serialized,s=t.isStringTag;return registerStyles(i,o,s),useInsertionEffectAlwaysWithSyncFallback(function(){return insertStyles(i,o,s)}),null},createStyled$1=function e(t,i){var o=t.__emotion_real===t,s=o&&t.__emotion_base||t,c,d;i!==void 0&&(c=i.label,d=i.target);var p=composeShouldForwardProps(t,i,o),m=p||getDefaultShouldForwardProp(s),f=!m("as");return function(){var h=arguments,v=o&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(c!==void 0&&v.push("label:"+c+";"),h[0]==null||h[0].raw===void 0)v.push.apply(v,h);else{var y=h[0];v.push(y[0]);for(var x=h.length,b=1;b<x;b++)v.push(h[b],y[b])}var S=withEmotionCache(function(A,C,T){var k=f&&A.as||s,D="",w=[],R=A;if(A.theme==null){R={};for(var _ in A)R[_]=A[_];R.theme=reactExports.useContext(ThemeContext)}typeof A.className=="string"?D=getRegisteredStyles(C.registered,w,A.className):A.className!=null&&(D=A.className+" ");var M=serializeStyles(v.concat(w),C.registered,R);D+=C.key+"-"+M.name,d!==void 0&&(D+=" "+d);var N=f&&p===void 0?getDefaultShouldForwardProp(k):m,P={};for(var L in A)f&&L==="as"||N(L)&&(P[L]=A[L]);return P.className=D,T&&(P.ref=T),reactExports.createElement(reactExports.Fragment,null,reactExports.createElement(Insertion,{cache:C,serialized:M,isStringTag:typeof k=="string"}),reactExports.createElement(k,P))});return S.displayName=c!==void 0?c:"Styled("+(typeof s=="string"?s:s.displayName||s.name||"Component")+")",S.defaultProps=t.defaultProps,S.__emotion_real=S,S.__emotion_base=s,S.__emotion_styles=v,S.__emotion_forwardProp=p,Object.defineProperty(S,"toString",{value:function(){return"."+d}}),S.withComponent=function(A,C){var T=e(A,_extends({},i,C,{shouldForwardProp:composeShouldForwardProps(S,C,!0)}));return T.apply(void 0,v)},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,o)=>i.val-o.val),t.reduce((i,o)=>({...i,[o.key]:o.val}),{})};function createBreakpoints(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:i="px",step:o=5,...s}=e,c=sortBreakpointsValues(t),d=Object.keys(c);function p(y){return`@media (min-width:${typeof t[y]=="number"?t[y]:y}${i})`}function m(y){return`@media (max-width:${(typeof t[y]=="number"?t[y]:y)-o/100}${i})`}function f(y,x){const b=d.indexOf(x);return`@media (min-width:${typeof t[y]=="number"?t[y]:y}${i}) and (max-width:${(b!==-1&&typeof t[d[b]]=="number"?t[d[b]]:x)-o/100}${i})`}function h(y){return d.indexOf(y)+1<d.length?f(y,d[d.indexOf(y)+1]):p(y)}function v(y){const x=d.indexOf(y);return x===0?p(d[1]):x===d.length-1?m(d[x]):f(y,d[d.indexOf(y)+1]).replace("@media","@media not all and")}return{keys:d,values:c,up:p,down:m,between:f,only:h,not:v,unit:i,...s}}const shape={borderRadius:4};function createSpacing(e=8,t=createUnarySpacing({spacing:e})){if(e.mui)return e;const i=(...o)=>(o.length===0?[1]:o).map(c=>{const d=t(c);return typeof d=="number"?`${d}px`:d}).join(" ");return i.mui=!0,i}function applyStyles(e,t){var o;const i=this;if(i.vars){if(!((o=i.colorSchemes)!=null&&o[e])||typeof i.getColorSchemeSelector!="function")return{};let s=i.getColorSchemeSelector(e);return s==="&"?t:((s.includes("data-")||s.includes("."))&&(s=`*:where(${s.replace(/\s*&$/,"")}) &`),{[s]:t})}return i.palette.mode===e?t:{}}function createTheme$1(e={},...t){const{breakpoints:i={},palette:o={},spacing:s,shape:c={},...d}=e,p=createBreakpoints(i),m=createSpacing(s);let f=deepmerge({breakpoints:p,direction:"ltr",components:{},palette:{mode:"light",...o},spacing:m,shape:{...shape,...c}},d);return f=cssContainerQueries(f),f.applyStyles=applyStyles,f=t.reduce((h,v)=>deepmerge(h,v),f),f.unstable_sxConfig={...defaultSxConfig,...d==null?void 0:d.unstable_sxConfig},f.unstable_sx=function(v){return styleFunctionSx({sx:v,theme:this})},f}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 o=globalStateClasses[t];return o?`${i}-${o}`:`${ClassNameGenerator.generate(e)}-${t}`}function generateUtilityClasses(e,t,i="Mui"){const o={};return t.forEach(s=>{o[s]=generateUtilityClass(e,s,i)}),o}function preprocessStyles(e){const{variants:t,...i}=e,o={variants:t,style:internal_serializeStyles(i),isProcessed:!0};return o.style===i||t&&t.forEach(s=>{typeof s.style!="function"&&(s.style=internal_serializeStyles(s.style))}),o}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(o=>processStyle(e,o));if(Array.isArray(i==null?void 0:i.variants)){let o;if(i.isProcessed)o=i.style;else{const{variants:s,...c}=i;o=c}return processStyleVariants(e,i.variants,[o])}return i!=null&&i.isProcessed?i.style:i}function processStyleVariants(e,t,i=[]){var s;let o;e:for(let c=0;c<t.length;c+=1){const d=t[c];if(typeof d.props=="function"){if(o??(o={...e,...e.ownerState,ownerState:e.ownerState}),!d.props(o))continue}else for(const p in d.props)if(e[p]!==d.props[p]&&((s=e.ownerState)==null?void 0:s[p])!==d.props[p])continue e;typeof d.style=="function"?(o??(o={...e,...e.ownerState,ownerState:e.ownerState}),i.push(d.style(o))):i.push(d.style)}return i}function createStyled(e={}){const{themeId:t,defaultTheme:i=systemDefaultTheme,rootShouldForwardProp:o=shouldForwardProp,slotShouldForwardProp:s=shouldForwardProp}=e;function c(p){attachTheme(p,t,i)}return(p,m={})=>{internal_mutateStyles(p,w=>w.filter(R=>R!==styleFunctionSx));const{name:f,slot:h,skipVariantsResolver:v,skipSx:y,overridesResolver:x=defaultOverridesResolver(lowercaseFirstLetter(h)),...b}=m,S=v!==void 0?v:h&&h!=="Root"&&h!=="root"||!1,A=y||!1;let C=shouldForwardProp;h==="Root"||h==="root"?C=o:h?C=s:isStringTag(p)&&(C=void 0);const T=styled$1(p,{shouldForwardProp:C,label:generateStyledLabel(),...b}),k=w=>{if(typeof w=="function"&&w.__emotion_real!==w)return function(_){return processStyle(_,w)};if(isPlainObject$1(w)){const R=preprocessStyles(w);return R.variants?function(M){return processStyle(M,R)}:R.style}return w},D=(...w)=>{const R=[],_=w.map(k),M=[];if(R.push(c),f&&x&&M.push(function(I){var B,q;const ae=(q=(B=I.theme.components)==null?void 0:B[f])==null?void 0:q.styleOverrides;if(!ae)return null;const Q={};for(const K in ae)Q[K]=processStyle(I,ae[K]);return x(I,Q)}),f&&!S&&M.push(function(I){var Q,B;const W=I.theme,ae=(B=(Q=W==null?void 0:W.components)==null?void 0:Q[f])==null?void 0:B.variants;return ae?processStyleVariants(I,ae):null}),A||M.push(styleFunctionSx),Array.isArray(_[0])){const L=_.shift(),I=new Array(R.length).fill(""),W=new Array(M.length).fill("");let ae;ae=[...I,...L,...W],ae.raw=[...I,...L.raw,...W],R.unshift(ae)}const N=[...R,..._,...M],P=T(...N);return p.muiName&&(P.muiName=p.muiName),P};return T.withConfig&&(D.withConfig=T.withConfig),D}}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 o in e)if(Object.prototype.hasOwnProperty.call(e,o)){const s=o;if(s==="components"||s==="slots")i[s]={...e[s],...i[s]};else if(s==="componentsProps"||s==="slotProps"){const c=e[s],d=t[s];if(!d)i[s]=c||{};else if(!c)i[s]=d;else{i[s]={...d};for(const p in c)if(Object.prototype.hasOwnProperty.call(c,p)){const m=p;i[s][m]=resolveProps(c[m],d[m])}}}else i[s]===void 0&&(i[s]=e[s])}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(o=>o+o)),i?`rgb${i.length===4?"a":""}(${i.map((o,s)=>s<3?parseInt(o,16):Math.round(parseInt(o,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 o=e.substring(t+1,e.length-1),s;if(i==="color"){if(o=o.split(" "),s=o.shift(),o.length===4&&o[3].charAt(0)==="/"&&(o[3]=o[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(s))throw new Error(formatMuiErrorMessage(10,s))}else o=o.split(",");return o=o.map(c=>parseFloat(c)),{type:i,values:o,colorSpace:s}}const colorChannel=e=>{const t=decomposeColor(e);return t.values.slice(0,3).map((i,o)=>t.type.includes("hsl")&&o!==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:o}=e;return t.includes("rgb")?o=o.map((s,c)=>c<3?parseInt(s,10):s):t.includes("hsl")&&(o[1]=`${o[1]}%`,o[2]=`${o[2]}%`),t.includes("color")?o=`${i} ${o.join(" ")}`:o=`${o.join(", ")}`,`${t}(${o})`}function hslToRgb(e){e=decomposeColor(e);const{values:t}=e,i=t[0],o=t[1]/100,s=t[2]/100,c=o*Math.min(s,1-s),d=(f,h=(f+i/30)%12)=>s-c*Math.max(Math.min(h-3,9-h,1),-1);let p="rgb";const m=[Math.round(d(0)*255),Math.round(d(8)*255),Math.round(d(4)*255)];return e.type==="hsla"&&(p+="a",m.push(t[3])),recomposeColor({type:p,values:m})}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),o=getLuminance(t);return(Math.max(i,o)+.05)/(Math.min(i,o)+.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:o}=e;if(!t||!t.components||!t.components[i])return o;const s=t.components[i];return s.defaultProps?resolveProps(s.defaultProps,o):!s.styleOverrides&&!s.variants?resolveProps(s,o):o}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(s){let c=t;return(c===void 0||s.theme!==i)&&(arg.theme=s.theme,c=preprocessStyles(e(arg)),t=c,i=s.theme),c}}function createGetCssVar$1(e=""){function t(...o){if(!o.length)return"";const s=o[0];return typeof s=="string"&&!s.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}-`:""}${s}${t(...o.slice(1))})`:`, ${s}`}return(o,...s)=>`var(--${e?`${e}-`:""}${o}${t(...s)})`}const assignNestedKeys=(e,t,i,o=[])=>{let s=e;t.forEach((c,d)=>{d===t.length-1?Array.isArray(s)?s[Number(c)]=i:s&&typeof s=="object"&&(s[c]=i):s&&typeof s=="object"&&(s[c]||(s[c]=o.includes(c)?[]:{}),s=s[c])})},walkObjectDeep=(e,t,i)=>{function o(s,c=[],d=[]){Object.entries(s).forEach(([p,m])=>{(!i||i&&!i([...c,p]))&&m!=null&&(typeof m=="object"&&Object.keys(m).length>0?o(m,[...c,p],Array.isArray(m)?[...d,p]:d):t([...c,p],m,d))})}o(e)},getCssValue=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(o=>e.includes(o))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function cssVarsParser(e,t){const{prefix:i,shouldSkipGeneratingVar:o}=t||{},s={},c={},d={};return walkObjectDeep(e,(p,m,f)=>{if((typeof m=="string"||typeof m=="number")&&(!o||!o(p,m))){const h=`--${i?`${i}-`:""}${p.join("-")}`,v=getCssValue(p,m);Object.assign(s,{[h]:v}),assignNestedKeys(c,p,`var(${h})`,f),assignNestedKeys(d,p,`var(${h}, ${v})`,f)}},p=>p[0]==="vars"),{css:s,vars:c,varsWithDefaults:d}}function prepareCssVars(e,t={}){const{getSelector:i=A,disableCssColorScheme:o,colorSchemeSelector:s}=t,{colorSchemes:c={},components:d,defaultColorScheme:p="light",...m}=e,{vars:f,css:h,varsWithDefaults:v}=cssVarsParser(m,t);let y=v;const x={},{[p]:b,...S}=c;if(Object.entries(S||{}).forEach(([k,D])=>{const{vars:w,css:R,varsWithDefaults:_}=cssVarsParser(D,t);y=deepmerge(y,_),x[k]={css:R,vars:w}}),b){const{css:k,vars:D,varsWithDefaults:w}=cssVarsParser(b,t);y=deepmerge(y,w),x[p]={css:k,vars:D}}function A(k,D){var R,_;let w=s;if(s==="class"&&(w=".%s"),s==="data"&&(w="[data-%s]"),s!=null&&s.startsWith("data-")&&!s.includes("%s")&&(w=`[${s}="%s"]`),k){if(w==="media")return e.defaultColorScheme===k?":root":{[`@media (prefers-color-scheme: ${((_=(R=c[k])==null?void 0:R.palette)==null?void 0:_.mode)||k})`]:{":root":D}};if(w)return e.defaultColorScheme===k?`:root, ${w.replace("%s",String(k))}`:w.replace("%s",String(k))}return":root"}return{vars:y,generateThemeVars:()=>{let k={...f};return Object.entries(x).forEach(([,{vars:D}])=>{k=deepmerge(k,D)}),k},generateStyleSheets:()=>{var M,N;const k=[],D=e.defaultColorScheme||"light";function w(P,L){Object.keys(L).length&&k.push(typeof P=="string"?{[P]:{...L}}:P)}w(i(void 0,{...h}),h);const{[D]:R,..._}=x;if(R){const{css:P}=R,L=(N=(M=c[D])==null?void 0:M.palette)==null?void 0:N.mode,I=!o&&L?{colorScheme:L,...P}:{...P};w(i(D,{...I}),I)}return Object.entries(_).forEach(([P,{css:L}])=>{var ae,Q;const I=(Q=(ae=c[P])==null?void 0:ae.palette)==null?void 0:Q.mode,W=!o&&I?{colorScheme:I,...L}:{...L};w(i(P,{...W}),W)}),k}}}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,o){const s=o.light||o,c=o.dark||o*1.5;e[t]||(e.hasOwnProperty(i)?e[t]=e[i]:t==="light"?e.light=lighten(e.main,s):t==="dark"&&(e.dark=darken(e.main,c)))}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:o=.2,...s}=e,c=e.primary||getDefaultPrimary(t),d=e.secondary||getDefaultSecondary(t),p=e.error||getDefaultError(t),m=e.info||getDefaultInfo(t),f=e.success||getDefaultSuccess(t),h=e.warning||getDefaultWarning(t);function v(S){return getContrastRatio(S,dark.text.primary)>=i?dark.text.primary:light.text.primary}const y=({color:S,name:A,mainShade:C=500,lightShade:T=300,darkShade:k=700})=>{if(S={...S},!S.main&&S[C]&&(S.main=S[C]),!S.hasOwnProperty("main"))throw new Error(formatMuiErrorMessage(11,A?` (${A})`:"",C));if(typeof S.main!="string")throw new Error(formatMuiErrorMessage(12,A?` (${A})`:"",JSON.stringify(S.main)));return addLightOrDark(S,"light",T,o),addLightOrDark(S,"dark",k,o),S.contrastText||(S.contrastText=v(S.main)),S};let x;return t==="light"?x=getLight():t==="dark"&&(x=getDark()),deepmerge({common:{...common},mode:t,primary:y({color:c,name:"primary"}),secondary:y({color:d,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:y({color:p,name:"error"}),warning:y({color:h,name:"warning"}),info:y({color:m,name:"info"}),success:y({color:f,name:"success"}),grey,contrastThreshold:i,getContrastText:v,augmentColor:y,tonalOffset:o,...x},s)}function prepareTypographyVars(e){const t={};return Object.entries(e).forEach(o=>{const[s,c]=o;typeof c=="object"&&(t[s]=`${c.fontStyle?`${c.fontStyle} `:""}${c.fontVariant?`${c.fontVariant} `:""}${c.fontWeight?`${c.fontWeight} `:""}${c.fontStretch?`${c.fontStretch} `:""}${c.fontSize||""}${c.lineHeight?`/${c.lineHeight} `:""}${c.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:o=14,fontWeightLight:s=300,fontWeightRegular:c=400,fontWeightMedium:d=500,fontWeightBold:p=700,htmlFontSize:m=16,allVariants:f,pxToRem:h,...v}=typeof t=="function"?t(e):t,y=o/14,x=h||(A=>`${A/m*y}rem`),b=(A,C,T,k,D)=>({fontFamily:i,fontWeight:A,fontSize:x(C),lineHeight:T,...i===defaultFontFamily?{letterSpacing:`${round(k/C)}em`}:{},...D,...f}),S={h1:b(s,96,1.167,-1.5),h2:b(s,60,1.2,-.5),h3:b(c,48,1.167,0),h4:b(c,34,1.235,.25),h5:b(c,24,1.334,0),h6:b(d,20,1.6,.15),subtitle1:b(c,16,1.75,.15),subtitle2:b(d,14,1.57,.1),body1:b(c,16,1.5,.15),body2:b(c,14,1.43,.15),button:b(d,14,1.75,.4,caseAllCaps),caption:b(c,12,1.66,.4),overline:b(c,12,2.66,1,caseAllCaps),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return deepmerge({htmlFontSize:m,pxToRem:x,fontFamily:i,fontSize:o,fontWeightLight:s,fontWeightRegular:c,fontWeightMedium:d,fontWeightBold:p,...S},v,{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:(s=["all"],c={})=>{const{duration:d=i.standard,easing:p=t.easeInOut,delay:m=0,...f}=c;return(Array.isArray(s)?s:[s]).map(h=>`${h} ${typeof d=="string"?d:formatMs(d)} ${p} ${typeof m=="string"?m:formatMs(m)}`).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(o){const s=Object.entries(o);for(let c=0;c<s.length;c++){const[d,p]=s[c];!isSerializable(p)||d.startsWith("unstable_")?delete o[d]:isPlainObject$1(p)&&(o[d]={...p},i(o[d]))}}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:o={},spacing:s,palette:c={},transitions:d={},typography:p={},shape:m,...f}=e;if(e.vars&&e.generateThemeVars===void 0)throw new Error(formatMuiErrorMessage(20));const h=createPalette(c),v=createTheme$1(e);let y=deepmerge(v,{mixins:createMixins(v.breakpoints,o),palette:h,shadows:shadows.slice(),typography:createTypography(h,p),transitions:createTransitions(d),zIndex:{...zIndex}});return y=deepmerge(y,f),y=t.reduce((x,b)=>deepmerge(x,b),y),y.unstable_sxConfig={...defaultSxConfig,...f==null?void 0:f.unstable_sxConfig},y.unstable_sx=function(b){return styleFunctionSx({sx:b,theme:this})},y.toRuntimeSource=stringifyTheme,y}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:o,...s}=e,c=createPalette(t);return{palette:c,opacity:{...getOpacity(c.mode),...i},overlays:o||getOverlays(c.mode),...s}}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 o=e.rootSelector||":root",s=e.colorSchemeSelector;let c=s;if(s==="class"&&(c=".%s"),s==="data"&&(c="[data-%s]"),s!=null&&s.startsWith("data-")&&!s.includes("%s")&&(c=`[${s}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const d={};return excludeVariablesFromRoot(e.cssVarPrefix).forEach(p=>{d[p]=i[p],delete i[p]}),c==="media"?{[o]:i,"@media (prefers-color-scheme: dark)":{[o]:d}}:c?{[c.replace("%s",t)]:d,[`${o}, ${c.replace("%s",t)}`]:i}:{[o]:{...i,...d}}}if(c&&c!=="media")return`${o}, ${c.replace("%s",String(t))}`}else if(t){if(c==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[o]:i}};if(c)return c.replace("%s",String(t))}return o};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,o){if(!t)return;t=t===!0?{}:t;const s=o==="dark"?"dark":"light";if(!i){e[o]=createColorScheme({...t,palette:{mode:s,...t==null?void 0:t.palette}});return}const{palette:c,...d}=createThemeNoVars({...i,palette:{mode:s,...t==null?void 0:t.palette}});return e[o]={...t,palette:c,opacity:{...getOpacity(s),...t==null?void 0:t.opacity},overlays:(t==null?void 0:t.overlays)||getOverlays(s)},d}function createThemeWithVars(e={},...t){const{colorSchemes:i={light:!0},defaultColorScheme:o,disableCssColorScheme:s=!1,cssVarPrefix:c="mui",shouldSkipGeneratingVar:d=shouldSkipGeneratingVar,colorSchemeSelector:p=i.light&&i.dark?"media":void 0,rootSelector:m=":root",...f}=e,h=Object.keys(i)[0],v=o||(i.light&&h!=="light"?"light":h),y=createGetCssVar(c),{[v]:x,light:b,dark:S,...A}=i,C={...A};let T=x;if((v==="dark"&&!("dark"in i)||v==="light"&&!("light"in i))&&(T=!0),!T)throw new Error(formatMuiErrorMessage(21,v));const k=attachColorScheme$1(C,T,f,v);b&&!C.light&&attachColorScheme$1(C,b,void 0,"light"),S&&!C.dark&&attachColorScheme$1(C,S,void 0,"dark");let D={defaultColorScheme:v,...k,cssVarPrefix:c,colorSchemeSelector:p,rootSelector:m,getCssVar:y,colorSchemes:C,font:{...prepareTypographyVars(k.typography),...k.font},spacing:getSpacingVal(f.spacing)};Object.keys(D.colorSchemes).forEach(N=>{const P=D.colorSchemes[N].palette,L=I=>{const W=I.split("-"),ae=W[1],Q=W[2];return y(I,P[ae][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",L("palette-error-main")),setColor(P.Alert,"infoFilledBg",L("palette-info-main")),setColor(P.Alert,"successFilledBg",L("palette-success-main")),setColor(P.Alert,"warningFilledBg",L("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",L("palette-error-main")),setColor(P.Alert,"infoIconColor",L("palette-info-main")),setColor(P.Alert,"successIconColor",L("palette-success-main")),setColor(P.Alert,"warningIconColor",L("palette-warning-main")),setColor(P.AppBar,"defaultBg",L("palette-grey-100")),setColor(P.Avatar,"defaultBg",L("palette-grey-400")),setColor(P.Button,"inheritContainedBg",L("palette-grey-300")),setColor(P.Button,"inheritContainedHoverBg",L("palette-grey-A100")),setColor(P.Chip,"defaultBorder",L("palette-grey-400")),setColor(P.Chip,"defaultAvatarColor",L("palette-grey-700")),setColor(P.Chip,"defaultIconColor",L("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(${L("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",L("palette-grey-400")),setColor(P.StepContent,"border",L("palette-grey-400")),setColor(P.Switch,"defaultColor",L("palette-common-white")),setColor(P.Switch,"defaultDisabledColor",L("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",L("palette-error-dark")),setColor(P.Alert,"infoFilledBg",L("palette-info-dark")),setColor(P.Alert,"successFilledBg",L("palette-success-dark")),setColor(P.Alert,"warningFilledBg",L("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",L("palette-error-main")),setColor(P.Alert,"infoIconColor",L("palette-info-main")),setColor(P.Alert,"successIconColor",L("palette-success-main")),setColor(P.Alert,"warningIconColor",L("palette-warning-main")),setColor(P.AppBar,"defaultBg",L("palette-grey-900")),setColor(P.AppBar,"darkBg",L("palette-background-paper")),setColor(P.AppBar,"darkColor",L("palette-text-primary")),setColor(P.Avatar,"defaultBg",L("palette-grey-600")),setColor(P.Button,"inheritContainedBg",L("palette-grey-800")),setColor(P.Button,"inheritContainedHoverBg",L("palette-grey-700")),setColor(P.Chip,"defaultBorder",L("palette-grey-700")),setColor(P.Chip,"defaultAvatarColor",L("palette-grey-300")),setColor(P.Chip,"defaultIconColor",L("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(${L("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",L("palette-grey-600")),setColor(P.StepContent,"border",L("palette-grey-600")),setColor(P.Switch,"defaultColor",L("palette-grey-300")),setColor(P.Switch,"defaultDisabledColor",L("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 W=P[I];I!=="tonalOffset"&&W&&typeof W=="object"&&(W.main&&setColor(P[I],"mainChannel",private_safeColorChannel(toRgb(W.main))),W.light&&setColor(P[I],"lightChannel",private_safeColorChannel(toRgb(W.light))),W.dark&&setColor(P[I],"darkChannel",private_safeColorChannel(toRgb(W.dark))),W.contrastText&&setColor(P[I],"contrastTextChannel",private_safeColorChannel(toRgb(W.contrastText))),I==="text"&&(setColorChannel(P[I],"primary"),setColorChannel(P[I],"secondary")),I==="action"&&(W.active&&setColorChannel(P[I],"active"),W.selected&&setColorChannel(P[I],"selected")))})}),D=t.reduce((N,P)=>deepmerge(N,P),D);const w={prefix:c,disableCssColorScheme:s,shouldSkipGeneratingVar:d,getSelector:defaultGetSelector(D)},{vars:R,generateThemeVars:_,generateStyleSheets:M}=prepareCssVars(D,w);return D.vars=R,Object.entries(D.colorSchemes[D.defaultColorScheme]).forEach(([N,P])=>{D[N]=P}),D.generateThemeVars=_,D.generateStyleSheets=M,D.generateSpacing=function(){return createSpacing(f.spacing,createUnarySpacing(this))},D.getColorSchemeSelector=createGetColorSchemeSelector(p),D.spacing=D.generateSpacing(),D.shouldSkipGeneratingVar=d,D.unstable_sxConfig={...defaultSxConfig,...f==null?void 0:f.unstable_sxConfig},D.unstable_sx=function(P){return styleFunctionSx({sx:P,theme:this})},D.toRuntimeSource=stringifyTheme,D}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:o=!1,colorSchemes:s=i?void 0:{light:!0},defaultColorScheme:c=i==null?void 0:i.mode,...d}=e,p=c||"light",m=s==null?void 0:s[p],f={...s,...i?{[p]:{...typeof m!="boolean"&&m,palette:i}}:void 0};if(o===!1){if(!("colorSchemes"in e))return createThemeNoVars(e,...t);let h=i;"palette"in e||f[p]&&(f[p]!==!0?h=f[p].palette:p==="dark"&&(h={mode:"dark"}));const v=createThemeNoVars({...e,palette:h},...t);return v.defaultColorScheme=p,v.colorSchemes=f,v.palette.mode==="light"&&(v.colorSchemes.light={...f.light!==!0&&f.light,palette:v.palette},attachColorScheme(v,"dark",f.dark)),v.palette.mode==="dark"&&(v.colorSchemes.dark={...f.dark!==!0&&f.dark,palette:v.palette},attachColorScheme(v,"light",f.light)),v}return!i&&!("light"in f)&&p==="light"&&(f.light=!0),createThemeWithVars({...d,colorSchemes:f,defaultColorScheme:p,...typeof o!="boolean"&&o},...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:o}=e,s={root:["root",t!=="inherit"&&`color${capitalize(t)}`,`fontSize${capitalize(i)}`]};return composeClasses(s,getSvgIconUtilityClass,o)},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,o,s,c,d,p,m,f,h,v,y,x,b;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(s=(t=e.transitions)==null?void 0:t.create)==null?void 0:s.call(t,"fill",{duration:(o=(i=(e.vars??e).transitions)==null?void 0:i.duration)==null?void 0:o.shorter}),variants:[{props:S=>!S.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((d=(c=e.typography)==null?void 0:c.pxToRem)==null?void 0:d.call(c,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((m=(p=e.typography)==null?void 0:p.pxToRem)==null?void 0:m.call(p,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((h=(f=e.typography)==null?void 0:f.pxToRem)==null?void 0:h.call(f,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,S])=>S&&S.main).map(([S])=>{var A,C;return{props:{color:S},style:{color:(C=(A=(e.vars??e).palette)==null?void 0:A[S])==null?void 0:C.main}}}),{props:{color:"action"},style:{color:(y=(v=(e.vars??e).palette)==null?void 0:v.action)==null?void 0:y.active}},{props:{color:"disabled"},style:{color:(b=(x=(e.vars??e).palette)==null?void 0:x.action)==null?void 0:b.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),SvgIcon=reactExports.forwardRef(function(t,i){const o=useDefaultProps({props:t,name:"MuiSvgIcon"}),{children:s,className:c,color:d="inherit",component:p="svg",fontSize:m="medium",htmlColor:f,inheritViewBox:h=!1,titleAccess:v,viewBox:y="0 0 24 24",...x}=o,b=reactExports.isValidElement(s)&&s.type==="svg",S={...o,color:d,component:p,fontSize:m,instanceFontSize:t.fontSize,inheritViewBox:h,viewBox:y,hasSvgAsChild:b},A={};h||(A.viewBox=y);const C=useUtilityClasses(S);return jsxRuntimeExports.jsxs(SvgIconRoot,{as:p,className:clsx(C.root,c),focusable:"false",color:f,"aria-hidden":v?void 0:!0,role:v?"img":void 0,ref:i,...A,...x,...b&&s.props,ownerState:S,children:[b?s.props.children:s,v?jsxRuntimeExports.jsx("title",{children:v}):null]})});SvgIcon.muiName="SvgIcon";function createSvgIcon(e,t){function i(o,s){return jsxRuntimeExports.jsx(SvgIcon,{"data-testid":void 0,ref:s,...o,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[o,s]=reactExports.useState(""),c=Object.entries(i).filter(([d,{name:p}])=>p.toLowerCase().includes(o.toLowerCase()));return jsxRuntimeExports.jsxs(Box,{children:[jsxRuntimeExports.jsx(TextInput,{placeholder:"Search tools...",value:o,onChange:d=>s(d.currentTarget.value),mb:"md",autoComplete:"off"}),jsxRuntimeExports.jsx(Stack,{align:"flex-start",children:c.length===0?jsxRuntimeExports.jsx(Text,{c:"dimmed",size:"sm",children:"No tools found"}):c.map(([d,{icon:p,name:m}])=>jsxRuntimeExports.jsx(Button,{variant:e===d?"filled":"subtle",onClick:()=>t(d),size:"md",radius:"md",leftSection:p,fullWidth:!0,justify:"flex-start",children:m},d))})]})},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 o=withMimeType(e),{webkitRelativePath:s}=e,c=typeof t=="string"?t:typeof s=="string"&&s.length>0?s:`./${e.name}`;return typeof o.path!="string"&&setObjProp(o,"path",c),setObjProp(o,"relativePath",c),o}function withMimeType(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const o=t.split(".").pop().toLowerCase(),s=COMMON_MIME_TYPES.get(o);s&&Object.defineProperty(e,"type",{value:s,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(s=>s.kind==="file");if(t!=="drop")return i;const o=yield Promise.all(i.map(toFilePromises));return noIgnoredFiles(flatten(o))}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 o=e[i];t.push(o)}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 c=yield e.getAsFileSystemHandle();if(c===null)throw new Error(`${e} is not a File`);if(c!==void 0){const d=yield c.getFile();return d.handle=c,toFileWithPath(d)}}const o=e.getAsFile();if(!o)throw new Error(`${e} is not a File`);return toFileWithPath(o,(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,o)=>{const s=[];function c(){t.readEntries(d=>__awaiter(this,void 0,void 0,function*(){if(d.length){const p=Promise.all(d.map(fromEntry));s.push(p),c()}else try{const p=yield Promise.all(s);i(p)}catch(p){o(p)}}),d=>{o(d)})}c()})}function fromFileEntry(e){return __awaiter(this,void 0,void 0,function*(){return new Promise((t,i)=>{e.file(o=>{const s=toFileWithPath(o,e.fullPath);t(s)},o=>{i(o)})})})}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 o=e.name||"",s=(e.type||"").toLowerCase(),c=s.replace(/\/.*$/,"");return i.some(function(d){var p=d.trim().toLowerCase();return p.charAt(0)==="."?o.toLowerCase().endsWith(p):p.endsWith("/*")?c===p.replace(/\/.*$/,""):s===p})}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$1(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),i.push.apply(i,o)}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(o){_defineProperty$1(e,o,i[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):ownKeys$1(Object(i)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(i,o))})}return e}function _defineProperty$1(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,o=new Array(t);i<t;i++)o[i]=e[i];return o}function _iterableToArrayLimit$1(e,t){var i=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(i!=null){var o=[],s=!0,c=!1,d,p;try{for(i=i.call(e);!(s=(d=i.next()).done)&&(o.push(d.value),!(t&&o.length===t));s=!0);}catch(m){c=!0,p=m}finally{try{!s&&i.return!=null&&i.return()}finally{if(c)throw p}}return o}}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(","),o=i.length>1?"one of ".concat(i.join(", ")):i[0];return{code:FILE_INVALID_TYPE,message:"File type must be ".concat(o)}},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,o=e.minSize,s=e.maxSize,c=e.multiple,d=e.maxFiles,p=e.validator;return!c&&t.length>1||c&&d>=1&&t.length>d?!1:t.every(function(m){var f=fileAccepted(m,i),h=_slicedToArray$1(f,1),v=h[0],y=fileMatchSize(m,o,s),x=_slicedToArray$1(y,1),b=x[0],S=p?p(m):null;return v&&b&&!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(o){for(var s=arguments.length,c=new Array(s>1?s-1:0),d=1;d<s;d++)c[d-1]=arguments[d];return t.some(function(p){return!isPropagationStopped(o)&&p&&p.apply(void 0,[o].concat(c)),isPropagationStopped(o)})}}function canUseFileSystemAccessAPI(){return"showOpenFilePicker"in window}function pickerOptionsFromAccept(e){if(isDefined(e)){var t=Object.entries(e).filter(function(i){var o=_slicedToArray$1(i,2),s=o[0],c=o[1],d=!0;return isMIMEType(s)||(console.warn('Skipped "'.concat(s,'" 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.')),d=!1),(!Array.isArray(c)||!c.every(isExt))&&(console.warn('Skipped "'.concat(s,'" because an invalid file extension was provided.')),d=!1),d}).reduce(function(i,o){var s=_slicedToArray$1(o,2),c=s[0],d=s[1];return _objectSpread$1(_objectSpread$1({},i),{},_defineProperty$1({},c,d))},{});return[{description:"Files",accept:t}]}return e}function acceptPropAsAcceptAttr(e){if(isDefined(e))return Object.entries(e).reduce(function(t,i){var o=_slicedToArray$1(i,2),s=o[0],c=o[1];return[].concat(_toConsumableArray$1(t),[s],_toConsumableArray$1(c))},[]).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,o=new Array(t);i<t;i++)o[i]=e[i];return o}function _iterableToArrayLimit(e,t){var i=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(i!=null){var o=[],s=!0,c=!1,d,p;try{for(i=i.call(e);!(s=(d=i.next()).done)&&(o.push(d.value),!(t&&o.length===t));s=!0);}catch(m){c=!0,p=m}finally{try{!s&&i.return!=null&&i.return()}finally{if(c)throw p}}return o}}function _arrayWithHoles(e){if(Array.isArray(e))return e}function ownKeys(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),i.push.apply(i,o)}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(o){_defineProperty(e,o,i[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):ownKeys(Object(i)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(i,o))})}return e}function _defineProperty(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),o,s;if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(s=0;s<c.length;s++)o=c[s],!(t.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(e,o)&&(i[o]=e[o])}return i}function _objectWithoutPropertiesLoose(e,t){if(e==null)return{};var i={},o=Object.keys(e),s,c;for(c=0;c<o.length;c++)s=o[c],!(t.indexOf(s)>=0)&&(i[s]=e[s]);return i}var Dropzone$2=reactExports.forwardRef(function(e,t){var i=e.children,o=_objectWithoutProperties(e,_excluded),s=useDropzone(o),c=s.open,d=_objectWithoutProperties(s,_excluded2);return reactExports.useImperativeHandle(t,function(){return{open:c}},[c]),React.createElement(reactExports.Fragment,null,i(_objectSpread(_objectSpread({},d),{},{open:c})))});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(_objectSpread({},defaultProps$2),e),i=t.accept,o=t.disabled,s=t.getFilesFromEvent,c=t.maxSize,d=t.minSize,p=t.multiple,m=t.maxFiles,f=t.onDragEnter,h=t.onDragLeave,v=t.onDragOver,y=t.onDrop,x=t.onDropAccepted,b=t.onDropRejected,S=t.onFileDialogCancel,A=t.onFileDialogOpen,C=t.useFsAccessApi,T=t.autoFocus,k=t.preventDropOnDocument,D=t.noClick,w=t.noKeyboard,R=t.noDrag,_=t.noDragEventsBubbling,M=t.onError,N=t.validator,P=reactExports.useMemo(function(){return acceptPropAsAcceptAttr(i)},[i]),L=reactExports.useMemo(function(){return pickerOptionsFromAccept(i)},[i]),I=reactExports.useMemo(function(){return typeof A=="function"?A:noop$1},[A]),W=reactExports.useMemo(function(){return typeof S=="function"?S:noop$1},[S]),ae=reactExports.useRef(null),Q=reactExports.useRef(null),B=reactExports.useReducer(reducer,initialState),q=_slicedToArray(B,2),K=q[0],U=q[1],$=K.isFocused,Y=K.isFileDialogActive,z=reactExports.useRef(typeof window<"u"&&window.isSecureContext&&C&&canUseFileSystemAccessAPI()),O=function(){!z.current&&Y&&setTimeout(function(){if(Q.current){var re=Q.current.files;re.length||(U({type:"closeDialog"}),W())}},300)};reactExports.useEffect(function(){return window.addEventListener("focus",O,!1),function(){window.removeEventListener("focus",O,!1)}},[Q,Y,W,z]);var F=reactExports.useRef([]),H=function(re){ae.current&&ae.current.contains(re.target)||(re.preventDefault(),F.current=[])};reactExports.useEffect(function(){return k&&(document.addEventListener("dragover",onDocumentDragOver,!1),document.addEventListener("drop",H,!1)),function(){k&&(document.removeEventListener("dragover",onDocumentDragOver),document.removeEventListener("drop",H))}},[ae,k]),reactExports.useEffect(function(){return!o&&T&&ae.current&&ae.current.focus(),function(){}},[ae,T,o]);var X=reactExports.useCallback(function(se){M?M(se):console.error(se)},[M]),te=reactExports.useCallback(function(se){se.preventDefault(),se.persist(),de(se),F.current=[].concat(_toConsumableArray(F.current),[se.target]),isEvtWithFiles(se)&&Promise.resolve(s(se)).then(function(re){if(!(isPropagationStopped(se)&&!_)){var $e=re.length,Le=$e>0&&allFilesAccepted({files:re,accept:P,minSize:d,maxSize:c,multiple:p,maxFiles:m,validator:N}),Xe=$e>0&&!Le;U({isDragAccept:Le,isDragReject:Xe,isDragActive:!0,type:"setDraggedFiles"}),f&&f(se)}}).catch(function(re){return X(re)})},[s,f,X,_,P,d,c,p,m,N]),J=reactExports.useCallback(function(se){se.preventDefault(),se.persist(),de(se);var re=isEvtWithFiles(se);if(re&&se.dataTransfer)try{se.dataTransfer.dropEffect="copy"}catch{}return re&&v&&v(se),!1},[v,_]),ce=reactExports.useCallback(function(se){se.preventDefault(),se.persist(),de(se);var re=F.current.filter(function(Le){return ae.current&&ae.current.contains(Le)}),$e=re.indexOf(se.target);$e!==-1&&re.splice($e,1),F.current=re,!(re.length>0)&&(U({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),isEvtWithFiles(se)&&h&&h(se))},[ae,h,_]),ue=reactExports.useCallback(function(se,re){var $e=[],Le=[];se.forEach(function(Xe){var qe=fileAccepted(Xe,P),at=_slicedToArray(qe,2),We=at[0],Je=at[1],ct=fileMatchSize(Xe,d,c),st=_slicedToArray(ct,2),De=st[0],be=st[1],xe=N?N(Xe):null;if(We&&De&&!xe)$e.push(Xe);else{var Qe=[Je,be];xe&&(Qe=Qe.concat(xe)),Le.push({file:Xe,errors:Qe.filter(function(pt){return pt})})}}),(!p&&$e.length>1||p&&m>=1&&$e.length>m)&&($e.forEach(function(Xe){Le.push({file:Xe,errors:[TOO_MANY_FILES_REJECTION]})}),$e.splice(0)),U({acceptedFiles:$e,fileRejections:Le,isDragReject:Le.length>0,type:"setFiles"}),y&&y($e,Le,re),Le.length>0&&b&&b(Le,re),$e.length>0&&x&&x($e,re)},[U,p,P,d,c,m,y,x,b,N]),Ae=reactExports.useCallback(function(se){se.preventDefault(),se.persist(),de(se),F.current=[],isEvtWithFiles(se)&&Promise.resolve(s(se)).then(function(re){isPropagationStopped(se)&&!_||ue(re,se)}).catch(function(re){return X(re)}),U({type:"reset"})},[s,ue,X,_]),Ee=reactExports.useCallback(function(){if(z.current){U({type:"openDialog"}),I();var se={multiple:p,types:L};window.showOpenFilePicker(se).then(function(re){return s(re)}).then(function(re){ue(re,null),U({type:"closeDialog"})}).catch(function(re){isAbort(re)?(W(re),U({type:"closeDialog"})):isSecurityError(re)?(z.current=!1,Q.current?(Q.current.value=null,Q.current.click()):X(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."))):X(re)});return}Q.current&&(U({type:"openDialog"}),I(),Q.current.value=null,Q.current.click())},[U,I,W,C,ue,X,L,p]),Me=reactExports.useCallback(function(se){!ae.current||!ae.current.isEqualNode(se.target)||(se.key===" "||se.key==="Enter"||se.keyCode===32||se.keyCode===13)&&(se.preventDefault(),Ee())},[ae,Ee]),je=reactExports.useCallback(function(){U({type:"focus"})},[]),ke=reactExports.useCallback(function(){U({type:"blur"})},[]),ge=reactExports.useCallback(function(){D||(isIeOrEdge()?setTimeout(Ee,0):Ee())},[D,Ee]),oe=function(re){return o?null:re},G=function(re){return w?null:oe(re)},ee=function(re){return R?null:oe(re)},de=function(re){_&&re.stopPropagation()},pe=reactExports.useMemo(function(){return function(){var se=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},re=se.refKey,$e=re===void 0?"ref":re,Le=se.role,Xe=se.onKeyDown,qe=se.onFocus,at=se.onBlur,We=se.onClick,Je=se.onDragEnter,ct=se.onDragOver,st=se.onDragLeave,De=se.onDrop,be=_objectWithoutProperties(se,_excluded3);return _objectSpread(_objectSpread(_defineProperty({onKeyDown:G(composeEventHandlers(Xe,Me)),onFocus:G(composeEventHandlers(qe,je)),onBlur:G(composeEventHandlers(at,ke)),onClick:oe(composeEventHandlers(We,ge)),onDragEnter:ee(composeEventHandlers(Je,te)),onDragOver:ee(composeEventHandlers(ct,J)),onDragLeave:ee(composeEventHandlers(st,ce)),onDrop:ee(composeEventHandlers(De,Ae)),role:typeof Le=="string"&&Le!==""?Le:"presentation"},$e,ae),!o&&!w?{tabIndex:0}:{}),be)}},[ae,Me,je,ke,ge,te,J,ce,Ae,w,R,o]),ve=reactExports.useCallback(function(se){se.stopPropagation()},[]),Te=reactExports.useMemo(function(){return function(){var se=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},re=se.refKey,$e=re===void 0?"ref":re,Le=se.onChange,Xe=se.onClick,qe=_objectWithoutProperties(se,_excluded4),at=_defineProperty({accept:P,multiple:p,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:oe(composeEventHandlers(Le,Ae)),onClick:oe(composeEventHandlers(Xe,ve)),tabIndex:-1},$e,Q);return _objectSpread(_objectSpread({},at),qe)}},[Q,i,p,Ae,o]);return _objectSpread(_objectSpread({},K),{},{isFocused:$&&!o,getRootProps:pe,getInputProps:Te,rootRef:ae,inputRef:Q,open:oe(Ee)})}function reducer(e,t){switch(t.type){case"focus":return _objectSpread(_objectSpread({},e),{},{isFocused:!0});case"blur":return _objectSpread(_objectSpread({},e),{},{isFocused:!1});case"openDialog":return _objectSpread(_objectSpread({},initialState),{},{isFileDialogActive:!0});case"closeDialog":return _objectSpread(_objectSpread({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return _objectSpread(_objectSpread({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return _objectSpread(_objectSpread({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return _objectSpread({},initialState);default:return e}}function noop$1(){}const[DropzoneProvider,useDropzoneContext]=createSafeContext("Dropzone component was not found in tree");function createDropzoneStatus(e){const t=i=>{const{children:o,...s}=useProps(`Dropzone${upperFirst(e)}`,{},i),c=useDropzoneContext(),d=isElement$1(o)?o:jsxRuntimeExports.jsx("span",{children:o});return c[e]?reactExports.cloneElement(d,s):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:o,rejectColor:s})=>{const c=e.variantColorResolver({color:o||e.primaryColor,theme:e,variant:i}),d=e.variantColorResolver({color:s||"red",theme:e,variant:i});return{root:{"--dropzone-radius":getRadius(t),"--dropzone-accept-color":c.color,"--dropzone-accept-bg":c.background,"--dropzone-reject-color":d.color,"--dropzone-reject-bg":d.background}}},Dropzone$1=factory((e,t)=>{const i=useProps("Dropzone",defaultProps$1,e),{classNames:o,className:s,style:c,styles:d,unstyled:p,vars:m,radius:f,disabled:h,loading:v,multiple:y,maxSize:x,accept:b,children:S,onDropAny:A,onDrop:C,onReject:T,openRef:k,name:D,maxFiles:w,autoFocus:R,activateOnClick:_,activateOnDrag:M,dragEventsBubbling:N,activateOnKeyboard:P,onDragEnter:L,onDragLeave:I,onDragOver:W,onFileDialogCancel:ae,onFileDialogOpen:Q,preventDropOnDocument:B,useFsAccessApi:q,getFilesFromEvent:K,validator:U,rejectColor:$,acceptColor:Y,enablePointerEvents:z,loaderProps:O,inputProps:F,mod:H,...X}=i,te=useStyles({name:"Dropzone",classes,props:i,className:s,style:c,classNames:o,styles:d,unstyled:p,vars:m,varsResolver}),{getRootProps:J,getInputProps:ce,isDragAccept:ue,isDragReject:Ae,isDragActive:Ee,open:Me}=useDropzone({onDrop:A,onDropAccepted:C,onDropRejected:T,disabled:h||v,accept:Array.isArray(b)?b.reduce((oe,G)=>({...oe,[G]:[]}),{}):b,multiple:y,maxSize:x,maxFiles:w,autoFocus:R,noClick:!_,noDrag:!M,noDragEventsBubbling:!N,noKeyboard:!P,onDragEnter:L,onDragLeave:I,onDragOver:W,onFileDialogCancel:ae,onFileDialogOpen:Q,preventDropOnDocument:B,useFsAccessApi:q,validator:U,...K?{getFilesFromEvent:K}:null});assignRef(k,Me);const je=Ee&&ue,ke=Ee&&Ae,ge=!je&&!ke;return jsxRuntimeExports.jsx(DropzoneProvider,{value:{accept:je,reject:ke,idle:ge},children:jsxRuntimeExports.jsxs(Box,{...J(),...te("root",{focusable:!0}),...X,mod:[{accept:je,reject:ke,idle:ge,disabled:h,loading:v,"activate-on-click":_},H],children:[jsxRuntimeExports.jsx(LoadingOverlay,{visible:v,overlayProps:{radius:f},unstyled:p,loaderProps:O}),jsxRuntimeExports.jsx("input",{...ce(F),name:D}),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:o,className:s,style:c,styles:d,unstyled:p,vars:m,active:f,onDrop:h,onReject:v,zIndex:y,withinPortal:x,portalProps:b,...S}=i,A=useStyles({name:"DropzoneFullScreen",classes,props:i,className:s,style:c,classNames:o,styles:d,unstyled:p,rootSelector:"fullScreen"}),{resolvedClassNames:C,resolvedStyles:T}=useResolvedStylesApi({classNames:o,styles:d,props:i}),[k,D]=reactExports.useState(0),[w,{open:R,close:_}]=useDisclosure(!1),M=P=>{var L;(L=P.dataTransfer)!=null&&L.types.includes("Files")&&(D(I=>I+1),R())},N=()=>{D(P=>P-1)};return reactExports.useEffect(()=>{k===0&&_()},[k]),reactExports.useEffect(()=>{if(f)return document.addEventListener("dragenter",M,!1),document.addEventListener("dragleave",N,!1),()=>{document.removeEventListener("dragenter",M,!1),document.removeEventListener("dragleave",N,!1)}},[f]),jsxRuntimeExports.jsx(OptionalPortal,{...b,withinPortal:x,children:jsxRuntimeExports.jsx(Box,{...A("fullScreen",{style:{opacity:w?1:0,pointerEvents:w?"all":"none",zIndex:y}}),ref:t,children:jsxRuntimeExports.jsx(Dropzone$1,{...S,classNames:C,styles:T,unstyled:p,className:classes.dropzone,onDrop:P=>{h==null||h(P),_(),D(0)},onReject:P=>{v==null||v(P),_(),D(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 st;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=Ae,t.createValidAbsoluteUrl=Y,t.getModificationDate=Le,t.getUuid=Je,t.getVerbosityLevel=Q,t.info=B,t.isArrayBuffer=re,t.isArrayEqual=$e,t.isNodeJS=void 0,t.normalizeUnicode=We,t.objectFromMap=ke,t.objectSize=je,t.setVerbosityLevel=ae,t.shadow=z,t.string32=Me,t.stringToBytes=Ee,t.stringToPDFString=ve,t.stringToUTF8String=Te,t.unreachable=K,t.utf8StringToString=se,t.warn=q;const i=typeof process=="object"&&process+""=="[object process]"&&!process.versions.nw&&!(process.versions.electron&&process.type&&process.type!=="browser");t.isNodeJS=i;const o=[1,0,0,1,0,0];t.IDENTITY_MATRIX=o;const s=[.001,0,0,.001,0,0];t.FONT_IDENTITY_MATRIX=s;const c=1e7;t.MAX_IMAGE_SIZE_TO_CACHE=c;const d=1.35;t.LINE_FACTOR=d;const p=.35;t.LINE_DESCENT_FACTOR=p;const m=p/d;t.BASELINE_FACTOR=m;const f={ANY:1,DISPLAY:2,PRINT:4,SAVE:8,ANNOTATIONS_FORMS:16,ANNOTATIONS_STORAGE:32,ANNOTATIONS_DISABLE:64,OPLIST:256};t.RenderingIntentFlag=f;const h={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3};t.AnnotationMode=h;const v="pdfjs_internal_editor_";t.AnnotationEditorPrefix=v;const y={DISABLE:-1,NONE:0,FREETEXT:3,STAMP:13,INK:15};t.AnnotationEditorType=y;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 b={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=b;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 A={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3};t.ImageKind=A;const C={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=C;const T={GROUP:"Group",REPLY:"R"};t.AnnotationReplyType=T;const k={INVISIBLE:1,HIDDEN:2,PRINT:4,NOZOOM:8,NOROTATE:16,NOVIEW:32,READONLY:64,LOCKED:128,TOGGLENOVIEW:256,LOCKEDCONTENTS:512};t.AnnotationFlag=k;const D={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=D;const w={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5};t.AnnotationBorderStyleType=w;const R={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=R;const _={WC:"WillClose",WS:"WillSave",DS:"DidSave",WP:"WillPrint",DP:"DidPrint"};t.DocumentActionEventType=_;const M={O:"PageOpen",C:"PageClose"};t.PageActionEventType=M;const N={ERRORS:0,WARNINGS:1,INFOS:5};t.VerbosityLevel=N;const P={NONE:0,BINARY:1};t.CMapCompressionType=P;const L={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=L;const I={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};t.PasswordResponses=I;let W=N.WARNINGS;function ae(De){Number.isInteger(De)&&(W=De)}function Q(){return W}function B(De){W>=N.INFOS&&console.log(`Info: ${De}`)}function q(De){W>=N.WARNINGS&&console.log(`Warning: ${De}`)}function K(De){throw new Error(De)}function U(De,be){De||K(be)}function $(De){switch(De==null?void 0:De.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}function Y(De,be=null,xe=null){if(!De)return null;try{if(xe&&typeof De=="string"){if(xe.addDefaultProtocol&&De.startsWith("www.")){const pt=De.match(/\./g);(pt==null?void 0:pt.length)>=2&&(De=`http://${De}`)}if(xe.tryConvertEncoding)try{De=Te(De)}catch{}}const Qe=be?new URL(De,be):new URL(De);if($(Qe))return Qe}catch{}return null}function z(De,be,xe,Qe=!1){return Object.defineProperty(De,be,{value:xe,enumerable:!Qe,configurable:!0,writable:!1}),xe}const O=function(){function be(xe,Qe){this.constructor===be&&K("Cannot initialize BaseException."),this.message=xe,this.name=Qe}return be.prototype=new Error,be.constructor=be,be}();t.BaseException=O;class F extends O{constructor(be,xe){super(be,"PasswordException"),this.code=xe}}t.PasswordException=F;class H extends O{constructor(be,xe){super(be,"UnknownErrorException"),this.details=xe}}t.UnknownErrorException=H;class X extends O{constructor(be){super(be,"InvalidPDFException")}}t.InvalidPDFException=X;class te extends O{constructor(be){super(be,"MissingPDFException")}}t.MissingPDFException=te;class J extends O{constructor(be,xe){super(be,"UnexpectedResponseException"),this.status=xe}}t.UnexpectedResponseException=J;class ce extends O{constructor(be){super(be,"FormatError")}}t.FormatError=ce;class ue extends O{constructor(be){super(be,"AbortException")}}t.AbortException=ue;function Ae(De){(typeof De!="object"||(De==null?void 0:De.length)===void 0)&&K("Invalid argument for bytesToString");const be=De.length,xe=8192;if(be<xe)return String.fromCharCode.apply(null,De);const Qe=[];for(let pt=0;pt<be;pt+=xe){const ht=Math.min(pt+xe,be),le=De.subarray(pt,ht);Qe.push(String.fromCharCode.apply(null,le))}return Qe.join("")}function Ee(De){typeof De!="string"&&K("Invalid argument for stringToBytes");const be=De.length,xe=new Uint8Array(be);for(let Qe=0;Qe<be;++Qe)xe[Qe]=De.charCodeAt(Qe)&255;return xe}function Me(De){return String.fromCharCode(De>>24&255,De>>16&255,De>>8&255,De&255)}function je(De){return Object.keys(De).length}function ke(De){const be=Object.create(null);for(const[xe,Qe]of De)be[xe]=Qe;return be}function ge(){const De=new Uint8Array(4);return De[0]=1,new Uint32Array(De.buffer,0,1)[0]===1}function oe(){try{return new Function(""),!0}catch{return!1}}class G{static get isLittleEndian(){return z(this,"isLittleEndian",ge())}static get isEvalSupported(){return z(this,"isEvalSupported",oe())}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 be,xe;return z(this,"isCSSRoundSupported",(xe=(be=globalThis.CSS)==null?void 0:be.supports)==null?void 0:xe.call(be,"width: round(1.5px, 1px)"))}}t.FeatureTest=G;const ee=[...Array(256).keys()].map(De=>De.toString(16).padStart(2,"0"));class de{static makeHexColor(be,xe,Qe){return`#${ee[be]}${ee[xe]}${ee[Qe]}`}static scaleMinMax(be,xe){let Qe;be[0]?(be[0]<0&&(Qe=xe[0],xe[0]=xe[1],xe[1]=Qe),xe[0]*=be[0],xe[1]*=be[0],be[3]<0&&(Qe=xe[2],xe[2]=xe[3],xe[3]=Qe),xe[2]*=be[3],xe[3]*=be[3]):(Qe=xe[0],xe[0]=xe[2],xe[2]=Qe,Qe=xe[1],xe[1]=xe[3],xe[3]=Qe,be[1]<0&&(Qe=xe[2],xe[2]=xe[3],xe[3]=Qe),xe[2]*=be[1],xe[3]*=be[1],be[2]<0&&(Qe=xe[0],xe[0]=xe[1],xe[1]=Qe),xe[0]*=be[2],xe[1]*=be[2]),xe[0]+=be[4],xe[1]+=be[4],xe[2]+=be[5],xe[3]+=be[5]}static transform(be,xe){return[be[0]*xe[0]+be[2]*xe[1],be[1]*xe[0]+be[3]*xe[1],be[0]*xe[2]+be[2]*xe[3],be[1]*xe[2]+be[3]*xe[3],be[0]*xe[4]+be[2]*xe[5]+be[4],be[1]*xe[4]+be[3]*xe[5]+be[5]]}static applyTransform(be,xe){const Qe=be[0]*xe[0]+be[1]*xe[2]+xe[4],pt=be[0]*xe[1]+be[1]*xe[3]+xe[5];return[Qe,pt]}static applyInverseTransform(be,xe){const Qe=xe[0]*xe[3]-xe[1]*xe[2],pt=(be[0]*xe[3]-be[1]*xe[2]+xe[2]*xe[5]-xe[4]*xe[3])/Qe,ht=(-be[0]*xe[1]+be[1]*xe[0]+xe[4]*xe[1]-xe[5]*xe[0])/Qe;return[pt,ht]}static getAxialAlignedBoundingBox(be,xe){const Qe=this.applyTransform(be,xe),pt=this.applyTransform(be.slice(2,4),xe),ht=this.applyTransform([be[0],be[3]],xe),le=this.applyTransform([be[2],be[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(be){const xe=be[0]*be[3]-be[1]*be[2];return[be[3]/xe,-be[1]/xe,-be[2]/xe,be[0]/xe,(be[2]*be[5]-be[4]*be[3])/xe,(be[4]*be[1]-be[5]*be[0])/xe]}static singularValueDecompose2dScale(be){const xe=[be[0],be[2],be[1],be[3]],Qe=be[0]*xe[0]+be[1]*xe[2],pt=be[0]*xe[1]+be[1]*xe[3],ht=be[2]*xe[0]+be[3]*xe[2],le=be[2]*xe[1]+be[3]*xe[3],Ne=(Qe+le)/2,Ge=Math.sqrt((Qe+le)**2-4*(Qe*le-ht*pt))/2,nt=Ne+Ge||1,it=Ne-Ge||1;return[Math.sqrt(nt),Math.sqrt(it)]}static normalizeRect(be){const xe=be.slice(0);return be[0]>be[2]&&(xe[0]=be[2],xe[2]=be[0]),be[1]>be[3]&&(xe[1]=be[3],xe[3]=be[1]),xe}static intersect(be,xe){const Qe=Math.max(Math.min(be[0],be[2]),Math.min(xe[0],xe[2])),pt=Math.min(Math.max(be[0],be[2]),Math.max(xe[0],xe[2]));if(Qe>pt)return null;const ht=Math.max(Math.min(be[1],be[3]),Math.min(xe[1],xe[3])),le=Math.min(Math.max(be[1],be[3]),Math.max(xe[1],xe[3]));return ht>le?null:[Qe,ht,pt,le]}static bezierBoundingBox(be,xe,Qe,pt,ht,le,Ne,Ge){const nt=[],it=[[],[]];let Ke,ie,ne,he,_e,Re,Ie,Be;for(let ut=0;ut<2;++ut){if(ut===0?(ie=6*be-12*Qe+6*ht,Ke=-3*be+9*Qe-9*ht+3*Ne,ne=3*Qe-3*be):(ie=6*xe-12*pt+6*le,Ke=-3*xe+9*pt-9*le+3*Ge,ne=3*pt-3*xe),Math.abs(Ke)<1e-12){if(Math.abs(ie)<1e-12)continue;he=-ne/ie,0<he&&he<1&&nt.push(he);continue}Ie=ie*ie-4*ne*Ke,Be=Math.sqrt(Ie),!(Ie<0)&&(_e=(-ie+Be)/(2*Ke),0<_e&&_e<1&&nt.push(_e),Re=(-ie-Be)/(2*Ke),0<Re&&Re<1&&nt.push(Re))}let et=nt.length,tt;const Ye=et;for(;et--;)he=nt[et],tt=1-he,it[0][et]=tt*tt*tt*be+3*tt*tt*he*Qe+3*tt*he*he*ht+he*he*he*Ne,it[1][et]=tt*tt*tt*xe+3*tt*tt*he*pt+3*tt*he*he*le+he*he*he*Ge;return it[0][Ye]=be,it[1][Ye]=xe,it[0][Ye+1]=Ne,it[1][Ye+1]=Ge,it[0].length=it[1].length=Ye+2,[Math.min(...it[0]),Math.min(...it[1]),Math.max(...it[0]),Math.max(...it[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(De){if(De[0]>="ï"){let xe;if(De[0]==="þ"&&De[1]==="ÿ"?xe="utf-16be":De[0]==="ÿ"&&De[1]==="þ"?xe="utf-16le":De[0]==="ï"&&De[1]==="»"&&De[2]==="¿"&&(xe="utf-8"),xe)try{const Qe=new TextDecoder(xe,{fatal:!0}),pt=Ee(De);return Qe.decode(pt)}catch(Qe){q(`stringToPDFString: "${Qe}".`)}}const be=[];for(let xe=0,Qe=De.length;xe<Qe;xe++){const pt=pe[De.charCodeAt(xe)];be.push(pt?String.fromCharCode(pt):De.charAt(xe))}return be.join("")}function Te(De){return decodeURIComponent(escape(De))}function se(De){return unescape(encodeURIComponent(De))}function re(De){return typeof De=="object"&&(De==null?void 0:De.byteLength)!==void 0}function $e(De,be){if(De.length!==be.length)return!1;for(let xe=0,Qe=De.length;xe<Qe;xe++)if(De[xe]!==be[xe])return!1;return!0}function Le(De=new Date){return[De.getUTCFullYear().toString(),(De.getUTCMonth()+1).toString().padStart(2,"0"),De.getUTCDate().toString().padStart(2,"0"),De.getUTCHours().toString().padStart(2,"0"),De.getUTCMinutes().toString().padStart(2,"0"),De.getUTCSeconds().toString().padStart(2,"0")].join("")}class Xe{constructor(){Se(this,st,!1);this.promise=new Promise((be,xe)=>{this.resolve=Qe=>{Ce(this,st,!0),be(Qe)},this.reject=Qe=>{Ce(this,st,!0),xe(Qe)}})}get settled(){return j(this,st)}}st=new WeakMap,t.PromiseCapability=Xe;let qe=null,at=null;function We(De){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,at=new Map([["ſt","ſt"]])),De.replaceAll(qe,(be,xe,Qe)=>xe?xe.normalize("NFKC"):at.get(Qe))}function Je(){if(typeof crypto<"u"&&typeof(crypto==null?void 0:crypto.randomUUID)=="function")return crypto.randomUUID();const De=new Uint8Array(32);if(typeof crypto<"u"&&typeof(crypto==null?void 0:crypto.getRandomValues)=="function")crypto.getRandomValues(De);else for(let be=0;be<32;be++)De[be]=Math.floor(Math.random()*255);return Ae(De)}const ct="pdfjs_internal_id_";t.AnnotationPrefix=ct},(__unused_webpack_module,exports,__w_pdfjs_require__)=>{var e,i,o,s,ma,Mo,p,m,f,h,v,y,x,b,S,Oo,C,T,ec,D,w;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(_){if(typeof _=="string"||_ instanceof URL?_={url:_}:(0,_util.isArrayBuffer)(_)&&(_={data:_}),typeof _!="object")throw new Error("Invalid parameter in getDocument, need parameter object.");if(!_.url&&!_.data&&!_.range)throw new Error("Invalid parameter object: need either .data, .range or .url");const M=new PDFDocumentLoadingTask,{docId:N}=M,P=_.url?getUrlProp(_.url):null,L=_.data?getDataProp(_.data):null,I=_.httpHeaders||null,W=_.withCredentials===!0,ae=_.password??null,Q=_.range instanceof PDFDataRangeTransport?_.range:null,B=Number.isInteger(_.rangeChunkSize)&&_.rangeChunkSize>0?_.rangeChunkSize:DEFAULT_RANGE_CHUNK_SIZE;let q=_.worker instanceof PDFWorker?_.worker:null;const K=_.verbosity,U=typeof _.docBaseUrl=="string"&&!(0,_display_utils.isDataScheme)(_.docBaseUrl)?_.docBaseUrl:null,$=typeof _.cMapUrl=="string"?_.cMapUrl:null,Y=_.cMapPacked!==!1,z=_.CMapReaderFactory||DefaultCMapReaderFactory,O=typeof _.standardFontDataUrl=="string"?_.standardFontDataUrl:null,F=_.StandardFontDataFactory||DefaultStandardFontDataFactory,H=_.stopAtErrors!==!0,X=Number.isInteger(_.maxImageSize)&&_.maxImageSize>-1?_.maxImageSize:-1,te=_.isEvalSupported!==!1,J=typeof _.isOffscreenCanvasSupported=="boolean"?_.isOffscreenCanvasSupported:!_util.isNodeJS,ce=Number.isInteger(_.canvasMaxAreaInBytes)?_.canvasMaxAreaInBytes:-1,ue=typeof _.disableFontFace=="boolean"?_.disableFontFace:_util.isNodeJS,Ae=_.fontExtraProperties===!0,Ee=_.enableXfa===!0,Me=_.ownerDocument||globalThis.document,je=_.disableRange===!0,ke=_.disableStream===!0,ge=_.disableAutoFetch===!0,oe=_.pdfBug===!0,G=Q?Q.length:_.length??NaN,ee=typeof _.useSystemFonts=="boolean"?_.useSystemFonts:!_util.isNodeJS&&!ue,de=typeof _.useWorkerFetch=="boolean"?_.useWorkerFetch:z===_display_utils.DOMCMapReaderFactory&&F===_display_utils.DOMStandardFontDataFactory&&$&&O&&(0,_display_utils.isValidFetchUrl)($,document.baseURI)&&(0,_display_utils.isValidFetchUrl)(O,document.baseURI),pe=_.canvasFactory||new DefaultCanvasFactory({ownerDocument:Me}),ve=_.filterFactory||new DefaultFilterFactory({docId:N,ownerDocument:Me}),Te=null;(0,_util.setVerbosityLevel)(K);const se={canvasFactory:pe,filterFactory:ve};if(de||(se.cMapReaderFactory=new z({baseUrl:$,isCompressed:Y}),se.standardFontDataFactory=new F({baseUrl:O})),!q){const Le={verbosity:K,port:_worker_options.GlobalWorkerOptions.workerPort};q=Le.port?PDFWorker.fromPort(Le):new PDFWorker(Le),M._worker=q}const re={docId:N,apiVersion:"3.11.174",data:L,password:ae,disableAutoFetch:ge,rangeChunkSize:B,length:G,docBaseUrl:U,enableXfa:Ee,evaluatorOptions:{maxImageSize:X,disableFontFace:ue,ignoreErrors:H,isEvalSupported:te,isOffscreenCanvasSupported:J,canvasMaxAreaInBytes:ce,fontExtraProperties:Ae,useSystemFonts:ee,cMapUrl:de?$:null,standardFontDataUrl:de?O:null}},$e={ignoreErrors:H,isEvalSupported:te,disableFontFace:ue,fontExtraProperties:Ae,enableXfa:Ee,ownerDocument:Me,disableAutoFetch:ge,pdfBug:oe,styleElement:Te};return q.promise.then(function(){if(M.destroyed)throw new Error("Loading aborted");const Le=_fetchDocument(q,re),Xe=new Promise(function(qe){let at;Q?at=new _transport_stream.PDFDataTransportStream({length:G,initialData:Q.initialData,progressiveDone:Q.progressiveDone,contentDispositionFilename:Q.contentDispositionFilename,disableRange:je,disableStream:ke},Q):L||(at=(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:G,httpHeaders:I,withCredentials:W,rangeChunkSize:B,disableRange:je,disableStream:ke})),qe(at)});return Promise.all([Le,Xe]).then(function([qe,at]){if(M.destroyed)throw new Error("Loading aborted");const We=new _message_handler.MessageHandler(N,qe,q.port),Je=new WorkerTransport(We,M,at,$e,se);M._transport=Je,We.send("Ready",null)})}).catch(M._capability.reject),M}async function _fetchDocument(_,M){if(_.destroyed)throw new Error("Worker was destroyed");const N=await _.messageHandler.sendWithPromise("GetDocRequest",M,M.data?[M.data.buffer]:null);if(_.destroyed)throw new Error("Worker was destroyed");return N}function getUrlProp(_){if(_ instanceof URL)return _.href;try{return new URL(_,window.location).href}catch{if(_util.isNodeJS&&typeof _=="string")return _}throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.")}function getDataProp(_){if(_util.isNodeJS&&typeof Buffer<"u"&&_ instanceof Buffer)throw new Error("Please provide binary data as `Uint8Array`, rather than `Buffer`.");if(_ instanceof Uint8Array&&_.byteLength===_.buffer.byteLength)return _;if(typeof _=="string")return(0,_util.stringToBytes)(_);if(typeof _=="object"&&!isNaN(_==null?void 0:_.length)||(0,_util.isArrayBuffer)(_))return new Uint8Array(_);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${fi(t,e)._++}`,this.destroyed=!1,this.onPassword=null,this.onProgress=null}get promise(){return this._capability.promise}async destroy(){var M,N,P;this.destroyed=!0;try{(M=this._worker)!=null&&M.port&&(this._worker._pendingDestroy=!0),await((N=this._transport)==null?void 0:N.destroy())}catch(L){throw(P=this._worker)!=null&&P.port&&delete this._worker._pendingDestroy,L}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(M,N,P=!1,L=null){this.length=M,this.initialData=N,this.progressiveDone=P,this.contentDispositionFilename=L,this._rangeListeners=[],this._progressListeners=[],this._progressiveReadListeners=[],this._progressiveDoneListeners=[],this._readyCapability=new _util.PromiseCapability}addRangeListener(M){this._rangeListeners.push(M)}addProgressListener(M){this._progressListeners.push(M)}addProgressiveReadListener(M){this._progressiveReadListeners.push(M)}addProgressiveDoneListener(M){this._progressiveDoneListeners.push(M)}onDataRange(M,N){for(const P of this._rangeListeners)P(M,N)}onDataProgress(M,N){this._readyCapability.promise.then(()=>{for(const P of this._progressListeners)P(M,N)})}onDataProgressiveRead(M){this._readyCapability.promise.then(()=>{for(const N of this._progressiveReadListeners)N(M)})}onDataProgressiveDone(){this._readyCapability.promise.then(()=>{for(const M of this._progressiveDoneListeners)M()})}transportReady(){this._readyCapability.resolve()}requestDataRange(M,N){(0,_util.unreachable)("Abstract method PDFDataRangeTransport.requestDataRange")}abort(){}}exports.PDFDataRangeTransport=PDFDataRangeTransport;class PDFDocumentProxy{constructor(M,N){this._pdfInfo=M,this._transport=N,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 L=[];for(const I in P)L.push(...P[I]);return L}))})}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(M){return this._transport.getPage(M)}getPageIndex(M){return this._transport.getPageIndex(M)}getDestinations(){return this._transport.getDestinations()}getDestination(M){return this._transport.getDestination(M)}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(M=!1){return this._transport.startCleanup(M||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(M,N,P,L=!1){Se(this,s);Se(this,i,null);Se(this,o,!1);this._pageIndex=M,this._pageInfo=N,this._transport=P,this._stats=L?new _display_utils.StatTimer:null,this._pdfBug=L,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:M,rotation:N=this.rotate,offsetX:P=0,offsetY:L=0,dontFlip:I=!1}={}){return new _display_utils.PageViewport({viewBox:this.view,scale:M,rotation:N,offsetX:P,offsetY:L,dontFlip:I})}getAnnotations({intent:M="display"}={}){const N=this._transport.getRenderingIntent(M);return this._transport.getAnnotations(this._pageIndex,N.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 M;return((M=this._transport._htmlForXfa)==null?void 0:M.children[this._pageIndex])||null}render({canvasContext:M,viewport:N,intent:P="display",annotationMode:L=_util.AnnotationMode.ENABLE,transform:I=null,background:W=null,optionalContentConfigPromise:ae=null,annotationCanvasMap:Q=null,pageColors:B=null,printAnnotationStorage:q=null}){var F,H;(F=this._stats)==null||F.time("Overall");const K=this._transport.getRenderingIntent(P,L,q);Ce(this,o,!1),me(this,s,Mo).call(this),ae||(ae=this._transport.getOptionalContentConfig());let U=this._intentStates.get(K.cacheKey);U||(U=Object.create(null),this._intentStates.set(K.cacheKey,U)),U.streamReaderCancelTimeout&&(clearTimeout(U.streamReaderCancelTimeout),U.streamReaderCancelTimeout=null);const $=!!(K.renderingIntent&_util.RenderingIntentFlag.PRINT);U.displayReadyCapability||(U.displayReadyCapability=new _util.PromiseCapability,U.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},(H=this._stats)==null||H.time("Page Request"),this._pumpOperatorList(K));const Y=X=>{var te,J;U.renderTasks.delete(z),(this._maybeCleanupAfterRender||$)&&Ce(this,o,!0),me(this,s,ma).call(this,!$),X?(z.capability.reject(X),this._abortOperatorList({intentState:U,reason:X instanceof Error?X:new Error(X)})):z.capability.resolve(),(te=this._stats)==null||te.timeEnd("Rendering"),(J=this._stats)==null||J.timeEnd("Overall")},z=new InternalRenderTask({callback:Y,params:{canvasContext:M,viewport:N,transform:I,background:W},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:Q,operatorList:U.operatorList,pageIndex:this._pageIndex,canvasFactory:this._transport.canvasFactory,filterFactory:this._transport.filterFactory,useRequestAnimationFrame:!$,pdfBug:this._pdfBug,pageColors:B});(U.renderTasks||(U.renderTasks=new Set)).add(z);const O=z.task;return Promise.all([U.displayReadyCapability.promise,ae]).then(([X,te])=>{var J;if(this.destroyed){Y();return}(J=this._stats)==null||J.time("Rendering"),z.initializeGraphics({transparency:X,optionalContentConfig:te}),z.operatorListChanged()}).catch(Y),O}getOperatorList({intent:M="display",annotationMode:N=_util.AnnotationMode.ENABLE,printAnnotationStorage:P=null}={}){var Q;function L(){W.operatorList.lastChunk&&(W.opListReadCapability.resolve(W.operatorList),W.renderTasks.delete(ae))}const I=this._transport.getRenderingIntent(M,N,P,!0);let W=this._intentStates.get(I.cacheKey);W||(W=Object.create(null),this._intentStates.set(I.cacheKey,W));let ae;return W.opListReadCapability||(ae=Object.create(null),ae.operatorListChanged=L,W.opListReadCapability=new _util.PromiseCapability,(W.renderTasks||(W.renderTasks=new Set)).add(ae),W.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},(Q=this._stats)==null||Q.time("Page Request"),this._pumpOperatorList(I)),W.opListReadCapability.promise}streamTextContent({includeMarkedContent:M=!1,disableNormalization:N=!1}={}){return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,includeMarkedContent:M===!0,disableNormalization:N===!0},{highWaterMark:100,size(L){return L.items.length}})}getTextContent(M={}){if(this._transport._htmlForXfa)return this.getXfa().then(P=>_xfa_text.XfaText.textContent(P));const N=this.streamTextContent(M);return new Promise(function(P,L){function I(){W.read().then(function({value:Q,done:B}){if(B){P(ae);return}Object.assign(ae.styles,Q.styles),ae.items.push(...Q.items),I()},L)}const W=N.getReader(),ae={items:[],styles:Object.create(null)};I()})}getStructTree(){return this._transport.getStructTree(this._pageIndex)}_destroy(){this.destroyed=!0;const M=[];for(const N of this._intentStates.values())if(this._abortOperatorList({intentState:N,reason:new Error("Page was destroyed."),force:!0}),!N.opListReadCapability)for(const P of N.renderTasks)M.push(P.completed),P.cancel();return this.objs.clear(),Ce(this,o,!1),me(this,s,Mo).call(this),Promise.all(M)}cleanup(M=!1){Ce(this,o,!0);const N=me(this,s,ma).call(this,!1);return M&&N&&this._stats&&(this._stats=new _display_utils.StatTimer),N}_startRenderPage(M,N){var L,I;const P=this._intentStates.get(N);P&&((L=this._stats)==null||L.timeEnd("Page Request"),(I=P.displayReadyCapability)==null||I.resolve(M))}_renderPageChunk(M,N){for(let P=0,L=M.length;P<L;P++)N.operatorList.fnArray.push(M.fnArray[P]),N.operatorList.argsArray.push(M.argsArray[P]);N.operatorList.lastChunk=M.lastChunk,N.operatorList.separateAnnots=M.separateAnnots;for(const P of N.renderTasks)P.operatorListChanged();M.lastChunk&&me(this,s,ma).call(this,!0)}_pumpOperatorList({renderingIntent:M,cacheKey:N,annotationStorageSerializable:P}){const{map:L,transfers:I}=P,ae=this._transport.messageHandler.sendWithStream("GetOperatorList",{pageIndex:this._pageIndex,intent:M,cacheKey:N,annotationStorage:L},I).getReader(),Q=this._intentStates.get(N);Q.streamReader=ae;const B=()=>{ae.read().then(({value:q,done:K})=>{if(K){Q.streamReader=null;return}this._transport.destroyed||(this._renderPageChunk(q,Q),B())},q=>{if(Q.streamReader=null,!this._transport.destroyed){if(Q.operatorList){Q.operatorList.lastChunk=!0;for(const K of Q.renderTasks)K.operatorListChanged();me(this,s,ma).call(this,!0)}if(Q.displayReadyCapability)Q.displayReadyCapability.reject(q);else if(Q.opListReadCapability)Q.opListReadCapability.reject(q);else throw q}})};B()}_abortOperatorList({intentState:M,reason:N,force:P=!1}){if(M.streamReader){if(M.streamReaderCancelTimeout&&(clearTimeout(M.streamReaderCancelTimeout),M.streamReaderCancelTimeout=null),!P){if(M.renderTasks.size>0)return;if(N instanceof _display_utils.RenderingCancelledException){let L=RENDERING_CANCELLED_TIMEOUT;N.extraDelay>0&&N.extraDelay<1e3&&(L+=N.extraDelay),M.streamReaderCancelTimeout=setTimeout(()=>{M.streamReaderCancelTimeout=null,this._abortOperatorList({intentState:M,reason:N,force:!0})},L);return}}if(M.streamReader.cancel(new _util.AbortException(N.message)).catch(()=>{}),M.streamReader=null,!this._transport.destroyed){for(const[L,I]of this._intentStates)if(I===M){this._intentStates.delete(L);break}this.cleanup()}}}get stats(){return this._stats}}i=new WeakMap,o=new WeakMap,s=new WeakSet,ma=function(M=!1){if(me(this,s,Mo).call(this),!j(this,o)||this.destroyed)return!1;if(M)return Ce(this,i,setTimeout(()=>{Ce(this,i,null),me(this,s,ma).call(this,!1)},DELAYED_CLEANUP_TIMEOUT)),!1;for(const{renderTasks:N,operatorList:P}of this._intentStates.values())if(N.size>0||!P.lastChunk)return!1;return this._intentStates.clear(),this.objs.clear(),Ce(this,o,!1),!0},Mo=function(){j(this,i)&&(clearTimeout(j(this,i)),Ce(this,i,null))},exports.PDFPageProxy=PDFPageProxy;class LoopbackPort{constructor(){Se(this,p,new Set);Se(this,m,Promise.resolve())}postMessage(M,N){const P={data:structuredClone(M,N?{transfer:N}:null)};j(this,m).then(()=>{for(const L of j(this,p))L.call(this,P)})}addEventListener(M,N){j(this,p).add(N)}removeEventListener(M,N){j(this,p).delete(N)}terminate(){j(this,p).clear()}}p=new WeakMap,m=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 _=(f=document==null?void 0:document.currentScript)==null?void 0:f.src;_&&(PDFWorkerUtil.fallbackWorkerSrc=_.replace(/(\.(?:min\.)?js)(\?.*)?$/i,".worker$1$2"))}PDFWorkerUtil.isSameOrigin=function(_,M){let N;try{if(N=new URL(_),!N.origin||N.origin==="null")return!1}catch{return!1}const P=new URL(M,N);return N.origin===P.origin},PDFWorkerUtil.createCDNWrapper=function(_){const M=`importScripts("${_}");`;return URL.createObjectURL(new Blob([M]))}}const _PDFWorker=class _PDFWorker{constructor({name:_=null,port:M=null,verbosity:N=(0,_util.getVerbosityLevel)()}={}){var P;if(this.name=_,this.destroyed=!1,this.verbosity=N,this._readyCapability=new _util.PromiseCapability,this._port=null,this._webWorker=null,this._messageHandler=null,M){if((P=j(_PDFWorker,h))!=null&&P.has(M))throw new Error("Cannot use more than one PDFWorker per port.");(j(_PDFWorker,h)||Ce(_PDFWorker,h,new WeakMap)).set(M,this),this._initializeFromPort(M);return}this._initialize()}get promise(){return this._readyCapability.promise}get port(){return this._port}get messageHandler(){return this._messageHandler}_initializeFromPort(_){this._port=_,this._messageHandler=new _message_handler.MessageHandler("main","worker",_),this._messageHandler.on("ready",function(){}),this._readyCapability.resolve(),this._messageHandler.send("configure",{verbosity:this.verbosity})}_initialize(){if(!PDFWorkerUtil.isWorkerDisabled&&!_PDFWorker._mainThreadWorkerMessageHandler){let{workerSrc:_}=_PDFWorker;try{PDFWorkerUtil.isSameOrigin(window.location.href,_)||(_=PDFWorkerUtil.createCDNWrapper(new URL(_,window.location).href));const M=new Worker(_),N=new _message_handler.MessageHandler("main","worker",M),P=()=>{M.removeEventListener("error",L),N.destroy(),M.terminate(),this.destroyed?this._readyCapability.reject(new Error("Worker was destroyed")):this._setupFakeWorker()},L=()=>{this._webWorker||P()};M.addEventListener("error",L),N.on("test",W=>{if(M.removeEventListener("error",L),this.destroyed){P();return}W?(this._messageHandler=N,this._port=M,this._webWorker=M,this._readyCapability.resolve(),N.send("configure",{verbosity:this.verbosity})):(this._setupFakeWorker(),N.destroy(),M.terminate())}),N.on("ready",W=>{if(M.removeEventListener("error",L),this.destroyed){P();return}try{I()}catch{this._setupFakeWorker()}});const I=()=>{const W=new Uint8Array;N.send("test",W,[W.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(_=>{if(this.destroyed){this._readyCapability.reject(new Error("Worker was destroyed"));return}const M=new LoopbackPort;this._port=M;const N=`fake${PDFWorkerUtil.fakeWorkerId++}`,P=new _message_handler.MessageHandler(N+"_worker",N,M);_.setup(P,M);const L=new _message_handler.MessageHandler(N,N+"_worker",M);this._messageHandler=L,this._readyCapability.resolve(),L.send("configure",{verbosity:this.verbosity})}).catch(_=>{this._readyCapability.reject(new Error(`Setting up fake worker failed: "${_.message}".`))})}destroy(){var _;this.destroyed=!0,this._webWorker&&(this._webWorker.terminate(),this._webWorker=null),(_=j(_PDFWorker,h))==null||_.delete(this._port),this._port=null,this._messageHandler&&(this._messageHandler.destroy(),this._messageHandler=null)}static fromPort(_){var N;if(!(_!=null&&_.port))throw new Error("PDFWorker.fromPort - invalid method signature.");const M=(N=j(this,h))==null?void 0:N.get(_.port);if(M){if(M._pendingDestroy)throw new Error("PDFWorker.fromPort - the worker is being destroyed.\nPlease remember to await `PDFDocumentLoadingTask.destroy()`-calls.");return M}return new _PDFWorker(_)}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 _;try{return((_=globalThis.pdfjsWorker)==null?void 0:_.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())}};h=new WeakMap,Se(_PDFWorker,h);let PDFWorker=_PDFWorker;exports.PDFWorker=PDFWorker;class WorkerTransport{constructor(M,N,P,L,I){Se(this,S);Se(this,v,new Map);Se(this,y,new Map);Se(this,x,new Map);Se(this,b,null);this.messageHandler=M,this.loadingTask=N,this.commonObjs=new PDFObjects,this.fontLoader=new _font_loader.FontLoader({ownerDocument:L.ownerDocument,styleElement:L.styleElement}),this._params=L,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(M,N=_util.AnnotationMode.ENABLE,P=null,L=!1){let I=_util.RenderingIntentFlag.DISPLAY,W=_annotation_storage.SerializableEmpty;switch(M){case"any":I=_util.RenderingIntentFlag.ANY;break;case"display":break;case"print":I=_util.RenderingIntentFlag.PRINT;break;default:(0,_util.warn)(`getRenderingIntent - invalid intent: ${M}`)}switch(N){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,W=(I&_util.RenderingIntentFlag.PRINT&&P instanceof _annotation_storage.PrintAnnotationStorage?P:this.annotationStorage).serializable;break;default:(0,_util.warn)(`getRenderingIntent - invalid annotationMode: ${N}`)}return L&&(I+=_util.RenderingIntentFlag.OPLIST),{renderingIntent:I,cacheKey:`${I}_${W.hash}`,annotationStorageSerializable:W}}destroy(){var P;if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=new _util.PromiseCapability,(P=j(this,b))==null||P.reject(new Error("Worker was destroyed during onPassword callback"));const M=[];for(const L of j(this,y).values())M.push(L._destroy());j(this,y).clear(),j(this,x).clear(),this.hasOwnProperty("annotationStorage")&&this.annotationStorage.resetModified();const N=this.messageHandler.sendWithPromise("Terminate",null);return M.push(N),Promise.all(M).then(()=>{var L;this.commonObjs.clear(),this.fontLoader.clear(),j(this,v).clear(),this.filterFactory.destroy(),(L=this._networkStream)==null||L.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:M,loadingTask:N}=this;M.on("GetReader",(P,L)=>{(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}},L.onPull=()=>{this._fullReader.read().then(function({value:I,done:W}){if(W){L.close();return}(0,_util.assert)(I instanceof ArrayBuffer,"GetReader - expected an ArrayBuffer."),L.enqueue(new Uint8Array(I),1,[I])}).catch(I=>{L.error(I)})},L.onCancel=I=>{this._fullReader.cancel(I),L.ready.catch(W=>{if(!this.destroyed)throw W})}}),M.on("ReaderHeadersReady",P=>{const L=new _util.PromiseCapability,I=this._fullReader;return I.headersReady.then(()=>{var W;(!I.isStreamingSupported||!I.isRangeSupported)&&(this._lastProgress&&((W=N.onProgress)==null||W.call(N,this._lastProgress)),I.onProgress=ae=>{var Q;(Q=N.onProgress)==null||Q.call(N,{loaded:ae.loaded,total:ae.total})}),L.resolve({isStreamingSupported:I.isStreamingSupported,isRangeSupported:I.isRangeSupported,contentLength:I.contentLength})},L.reject),L.promise}),M.on("GetRangeReader",(P,L)=>{(0,_util.assert)(this._networkStream,"GetRangeReader - no `IPDFStream` instance available.");const I=this._networkStream.getRangeReader(P.begin,P.end);if(!I){L.close();return}L.onPull=()=>{I.read().then(function({value:W,done:ae}){if(ae){L.close();return}(0,_util.assert)(W instanceof ArrayBuffer,"GetRangeReader - expected an ArrayBuffer."),L.enqueue(new Uint8Array(W),1,[W])}).catch(W=>{L.error(W)})},L.onCancel=W=>{I.cancel(W),L.ready.catch(ae=>{if(!this.destroyed)throw ae})}}),M.on("GetDoc",({pdfInfo:P})=>{this._numPages=P.numPages,this._htmlForXfa=P.htmlForXfa,delete P.htmlForXfa,N._capability.resolve(new PDFDocumentProxy(P,this))}),M.on("DocException",function(P){let L;switch(P.name){case"PasswordException":L=new _util.PasswordException(P.message,P.code);break;case"InvalidPDFException":L=new _util.InvalidPDFException(P.message);break;case"MissingPDFException":L=new _util.MissingPDFException(P.message);break;case"UnexpectedResponseException":L=new _util.UnexpectedResponseException(P.message,P.status);break;case"UnknownErrorException":L=new _util.UnknownErrorException(P.message,P.details);break;default:(0,_util.unreachable)("DocException - expected a valid Error.")}N._capability.reject(L)}),M.on("PasswordRequest",P=>{if(Ce(this,b,new _util.PromiseCapability),N.onPassword){const L=I=>{I instanceof Error?j(this,b).reject(I):j(this,b).resolve({password:I})};try{N.onPassword(L,P.code)}catch(I){j(this,b).reject(I)}}else j(this,b).reject(new _util.PasswordException(P.message,P.code));return j(this,b).promise}),M.on("DataLoaded",P=>{var L;(L=N.onProgress)==null||L.call(N,{loaded:P.length,total:P.length}),this.downloadInfoCapability.resolve(P)}),M.on("StartRenderPage",P=>{if(this.destroyed)return;j(this,y).get(P.pageIndex)._startRenderPage(P.transparency,P.cacheKey)}),M.on("commonobj",([P,L,I])=>{var W;if(!this.destroyed&&!this.commonObjs.has(P))switch(L){case"Font":const ae=this._params;if("error"in I){const q=I.error;(0,_util.warn)(`Error during font loading: ${q}`),this.commonObjs.resolve(P,q);break}const Q=ae.pdfBug&&((W=globalThis.FontInspector)!=null&&W.enabled)?(q,K)=>globalThis.FontInspector.fontAdded(q,K):null,B=new _font_loader.FontFaceObject(I,{isEvalSupported:ae.isEvalSupported,disableFontFace:ae.disableFontFace,ignoreErrors:ae.ignoreErrors,inspectFont:Q});this.fontLoader.bind(B).catch(q=>M.sendWithPromise("FontFallback",{id:P})).finally(()=>{!ae.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 ${L}`)}}),M.on("obj",([P,L,I,W])=>{var Q;if(this.destroyed)return;const ae=j(this,y).get(L);if(!ae.objs.has(P))switch(I){case"Image":if(ae.objs.resolve(P,W),W){let B;if(W.bitmap){const{width:q,height:K}=W;B=q*K*4}else B=((Q=W.data)==null?void 0:Q.length)||0;B>_util.MAX_IMAGE_SIZE_TO_CACHE&&(ae._maybeCleanupAfterRender=!0)}break;case"Pattern":ae.objs.resolve(P,W);break;default:throw new Error(`Got unknown object type ${I}`)}}),M.on("DocProgress",P=>{var L;this.destroyed||(L=N.onProgress)==null||L.call(N,{loaded:P.loaded,total:P.total})}),M.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."))),M.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:M,transfers:N}=this.annotationStorage.serializable;return this.messageHandler.sendWithPromise("SaveDocument",{isPureXfa:!!this._htmlForXfa,numPages:this._numPages,annotationStorage:M,filename:((P=this._fullReader)==null?void 0:P.filename)??null},N).finally(()=>{this.annotationStorage.resetModified()})}getPage(M){if(!Number.isInteger(M)||M<=0||M>this._numPages)return Promise.reject(new Error("Invalid page request."));const N=M-1,P=j(this,x).get(N);if(P)return P;const L=this.messageHandler.sendWithPromise("GetPage",{pageIndex:N}).then(I=>{if(this.destroyed)throw new Error("Transport destroyed");const W=new PDFPageProxy(N,I,this,this._params.pdfBug);return j(this,y).set(N,W),W});return j(this,x).set(N,L),L}getPageIndex(M){return typeof M!="object"||M===null||!Number.isInteger(M.num)||M.num<0||!Number.isInteger(M.gen)||M.gen<0?Promise.reject(new Error("Invalid pageIndex request.")):this.messageHandler.sendWithPromise("GetPageIndex",{num:M.num,gen:M.gen})}getAnnotations(M,N){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:M,intent:N})}getFieldObjects(){return me(this,S,Oo).call(this,"GetFieldObjects")}hasJSActions(){return me(this,S,Oo).call(this,"HasJSActions")}getCalculationOrderIds(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}getDestinations(){return this.messageHandler.sendWithPromise("GetDestinations",null)}getDestination(M){return typeof M!="string"?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:M})}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,Oo).call(this,"GetDocJSActions")}getPageJSActions(M){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:M})}getStructTree(M){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex:M})}getOutline(){return this.messageHandler.sendWithPromise("GetOutline",null)}getOptionalContentConfig(){return this.messageHandler.sendWithPromise("GetOptionalContentConfig",null).then(M=>new _optional_content_config.OptionalContentConfig(M))}getPermissions(){return this.messageHandler.sendWithPromise("GetPermissions",null)}getMetadata(){const M="GetMetadata",N=j(this,v).get(M);if(N)return N;const P=this.messageHandler.sendWithPromise(M,null).then(L=>{var I,W;return{info:L[0],metadata:L[1]?new _metadata.Metadata(L[1]):null,contentDispositionFilename:((I=this._fullReader)==null?void 0:I.filename)??null,contentLength:((W=this._fullReader)==null?void 0:W.contentLength)??null}});return j(this,v).set(M,P),P}getMarkInfo(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}async startCleanup(M=!1){if(!this.destroyed){await this.messageHandler.sendWithPromise("Cleanup",null);for(const N of j(this,y).values())if(!N.cleanup())throw new Error(`startCleanup: Page ${N.pageNumber} is currently rendering.`);this.commonObjs.clear(),M||this.fontLoader.clear(),j(this,v).clear(),this.filterFactory.destroy(!0)}}get loadingParams(){const{disableAutoFetch:M,enableXfa:N}=this._params;return(0,_util.shadow)(this,"loadingParams",{disableAutoFetch:M,enableXfa:N})}}v=new WeakMap,y=new WeakMap,x=new WeakMap,b=new WeakMap,S=new WeakSet,Oo=function(M,N=null){const P=j(this,v).get(M);if(P)return P;const L=this.messageHandler.sendWithPromise(M,N);return j(this,v).set(M,L),L};class PDFObjects{constructor(){Se(this,T);Se(this,C,Object.create(null))}get(M,N=null){if(N){const L=me(this,T,ec).call(this,M);return L.capability.promise.then(()=>N(L.data)),null}const P=j(this,C)[M];if(!(P!=null&&P.capability.settled))throw new Error(`Requesting object that isn't resolved yet ${M}.`);return P.data}has(M){const N=j(this,C)[M];return(N==null?void 0:N.capability.settled)||!1}resolve(M,N=null){const P=me(this,T,ec).call(this,M);P.data=N,P.capability.resolve()}clear(){var M;for(const N in j(this,C)){const{data:P}=j(this,C)[N];(M=P==null?void 0:P.bitmap)==null||M.close()}Ce(this,C,Object.create(null))}}C=new WeakMap,T=new WeakSet,ec=function(M){var N;return(N=j(this,C))[M]||(N[M]={capability:new _util.PromiseCapability,data:null})};class RenderTask{constructor(M){Se(this,D,null);Ce(this,D,M),this.onContinue=null}get promise(){return j(this,D).capability.promise}cancel(M=0){j(this,D).cancel(null,M)}get separateAnnots(){const{separateAnnots:M}=j(this,D).operatorList;if(!M)return!1;const{annotationCanvasMap:N}=j(this,D);return M.form||M.canvas&&(N==null?void 0:N.size)>0}}D=new WeakMap,exports.RenderTask=RenderTask;const R=class R{constructor({callback:M,params:N,objs:P,commonObjs:L,annotationCanvasMap:I,operatorList:W,pageIndex:ae,canvasFactory:Q,filterFactory:B,useRequestAnimationFrame:q=!1,pdfBug:K=!1,pageColors:U=null}){this.callback=M,this.params=N,this.objs=P,this.commonObjs=L,this.annotationCanvasMap=I,this.operatorListIdx=null,this.operatorList=W,this._pageIndex=ae,this.canvasFactory=Q,this.filterFactory=B,this._pdfBug=K,this.pageColors=U,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=q===!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=N.canvasContext.canvas}get completed(){return this.capability.promise.catch(function(){})}initializeGraphics({transparency:M=!1,optionalContentConfig:N}){var ae,Q;if(this.cancelled)return;if(this._canvas){if(j(R,w).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.");j(R,w).add(this._canvas)}this._pdfBug&&((ae=globalThis.StepperManager)!=null&&ae.enabled)&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());const{canvasContext:P,viewport:L,transform:I,background:W}=this.params;this.gfx=new _canvas.CanvasGraphics(P,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:N},this.annotationCanvasMap,this.pageColors),this.gfx.beginDrawing({transform:I,viewport:L,transparency:M,background:W}),this.operatorListIdx=0,this.graphicsReady=!0,(Q=this.graphicsReadyCallback)==null||Q.call(this)}cancel(M=null,N=0){var P;this.running=!1,this.cancelled=!0,(P=this.gfx)==null||P.endDrawing(),j(R,w).delete(this._canvas),this.callback(M||new _display_utils.RenderingCancelledException(`Rendering cancelled, page ${this._pageIndex+1}`,N))}operatorListChanged(){var M;if(!this.graphicsReady){this.graphicsReadyCallback||(this.graphicsReadyCallback=this._continueBound);return}(M=this.stepper)==null||M.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(),j(R,w).delete(this._canvas),this.callback())))}};w=new WeakMap,Se(R,w,new WeakSet);let InternalRenderTask=R;const version="3.11.174";exports.version=version;const build="ce8716743";exports.build=build},(e,t,i)=>{var f,h,v,vp,x;Object.defineProperty(t,"__esModule",{value:!0}),t.SerializableEmpty=t.PrintAnnotationStorage=t.AnnotationStorage=void 0;var o=i(1),s=i(4),c=i(8);const d=Object.freeze({map:null,hash:"",transfers:void 0});t.SerializableEmpty=d;class p{constructor(){Se(this,v);Se(this,f,!1);Se(this,h,new Map);this.onSetModified=null,this.onResetModified=null,this.onAnnotationEditor=null}getValue(S,A){const C=j(this,h).get(S);return C===void 0?A:Object.assign(A,C)}getRawValue(S){return j(this,h).get(S)}remove(S){if(j(this,h).delete(S),j(this,h).size===0&&this.resetModified(),typeof this.onAnnotationEditor=="function"){for(const A of j(this,h).values())if(A instanceof s.AnnotationEditor)return;this.onAnnotationEditor(null)}}setValue(S,A){const C=j(this,h).get(S);let T=!1;if(C!==void 0)for(const[k,D]of Object.entries(A))C[k]!==D&&(T=!0,C[k]=D);else T=!0,j(this,h).set(S,A);T&&me(this,v,vp).call(this),A instanceof s.AnnotationEditor&&typeof this.onAnnotationEditor=="function"&&this.onAnnotationEditor(A.constructor._type)}has(S){return j(this,h).has(S)}getAll(){return j(this,h).size>0?(0,o.objectFromMap)(j(this,h)):null}setAll(S){for(const[A,C]of Object.entries(S))this.setValue(A,C)}get size(){return j(this,h).size}resetModified(){j(this,f)&&(Ce(this,f,!1),typeof this.onResetModified=="function"&&this.onResetModified())}get print(){return new m(this)}get serializable(){if(j(this,h).size===0)return d;const S=new Map,A=new c.MurmurHash3_64,C=[],T=Object.create(null);let k=!1;for(const[D,w]of j(this,h)){const R=w instanceof s.AnnotationEditor?w.serialize(!1,T):w;R&&(S.set(D,R),A.update(`${D}:${JSON.stringify(R)}`),k||(k=!!R.bitmap))}if(k)for(const D of S.values())D.bitmap&&C.push(D.bitmap);return S.size>0?{map:S,hash:A.hexdigest(),transfers:C}:d}}f=new WeakMap,h=new WeakMap,v=new WeakSet,vp=function(){j(this,f)||(Ce(this,f,!0),typeof this.onSetModified=="function"&&this.onSetModified())},t.AnnotationStorage=p;class m extends p{constructor(A){super();Se(this,x);const{map:C,hash:T,transfers:k}=A.serializable,D=structuredClone(C,k?{transfer:k}:null);Ce(this,x,{map:D,hash:T,transfers:k})}get print(){(0,o.unreachable)("Should not call PrintAnnotationStorage.print")}get serializable(){return j(this,x)}}x=new WeakMap,t.PrintAnnotationStorage=m},(e,t,i)=>{var m,f,h,v,y,x,b,S,A,C,T,k,D,w,R,tc,nc,N,rc,ac,bp,yp,xp,ic,Sp;Object.defineProperty(t,"__esModule",{value:!0}),t.AnnotationEditor=void 0;var o=i(5),s=i(1),c=i(6);const q=class q{constructor(U){Se(this,R);Se(this,m,"");Se(this,f,!1);Se(this,h,null);Se(this,v,null);Se(this,y,null);Se(this,x,!1);Se(this,b,null);Se(this,S,this.focusin.bind(this));Se(this,A,this.focusout.bind(this));Se(this,C,!1);Se(this,T,!1);Se(this,k,!1);Pt(this,"_initialOptions",Object.create(null));Pt(this,"_uiManager",null);Pt(this,"_focusEventsAllowed",!0);Pt(this,"_l10nPromise",null);Se(this,D,!1);Se(this,w,q._zIndex++);this.constructor===q&&(0,s.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:$,rawDims:{pageWidth:Y,pageHeight:z,pageX:O,pageY:F}}=this.parent.viewport;this.rotation=$,this.pageRotation=(360+$-this._uiManager.viewParameters.rotation)%360,this.pageDimensions=[Y,z],this.pageTranslation=[O,F];const[H,X]=this.parentDimensions;this.x=U.x/H,this.y=U.y/X,this.isAttachedToDOM=!1,this.deleted=!1}get editorType(){return Object.getPrototypeOf(this).constructor._type}static get _defaultLineColor(){return(0,s.shadow)(this,"_defaultLineColor",this._colorManager.getHexCode("CanvasText"))}static deleteAnnotationElement(U){const $=new p({id:U.parent.getNextId(),parent:U.parent,uiManager:U._uiManager});$.annotationElementId=U.annotationElementId,$.deleted=!0,$._uiManager.addToAnnotationStorage($)}static initialize(U,$=null){if(q._l10nPromise||(q._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)]))),$!=null&&$.strings)for(const z of $.strings)q._l10nPromise.set(z,U.get(z));if(q._borderLineWidth!==-1)return;const Y=getComputedStyle(document.documentElement);q._borderLineWidth=parseFloat(Y.getPropertyValue("--outline-width"))||0}static updateDefaultParams(U,$){}static get defaultPropertiesToUpdate(){return[]}static isHandlingMimeForPasting(U){return!1}static paste(U,$){(0,s.unreachable)("Not implemented")}get propertiesToUpdate(){return[]}get _isDraggable(){return j(this,D)}set _isDraggable(U){var $;Ce(this,D,U),($=this.div)==null||$.classList.toggle("draggable",U)}center(){const[U,$]=this.pageDimensions;switch(this.parentRotation){case 90:this.x-=this.height*$/(U*2),this.y+=this.width*U/($*2);break;case 180:this.x+=this.width/2,this.y+=this.height/2;break;case 270:this.x+=this.height*$/(U*2),this.y-=this.width*U/($*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=j(this,w)}setParent(U){U!==null&&(this.pageIndex=U.pageIndex,this.pageDimensions=U.pageDimensions),this.parent=U}focusin(U){this._focusEventsAllowed&&(j(this,C)?Ce(this,C,!1):this.parent.setSelected(this))}focusout(U){var Y;if(!this._focusEventsAllowed||!this.isAttachedToDOM)return;const $=U.relatedTarget;$!=null&&$.closest(`#${this.id}`)||(U.preventDefault(),(Y=this.parent)!=null&&Y.isMultipleSelection||this.commitOrRemove())}commitOrRemove(){this.isEmpty()?this.remove():this.commit()}commit(){this.addToAnnotationStorage()}addToAnnotationStorage(){this._uiManager.addToAnnotationStorage(this)}setAt(U,$,Y,z){const[O,F]=this.parentDimensions;[Y,z]=this.screenToPageTranslation(Y,z),this.x=(U+Y)/O,this.y=($+z)/F,this.fixAndSetPosition()}translate(U,$){me(this,R,tc).call(this,this.parentDimensions,U,$)}translateInPage(U,$){me(this,R,tc).call(this,this.pageDimensions,U,$),this.div.scrollIntoView({block:"nearest"})}drag(U,$){const[Y,z]=this.parentDimensions;if(this.x+=U/Y,this.y+=$/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:O,y:F}=this;const[H,X]=me(this,R,nc).call(this);O+=H,F+=X,this.div.style.left=`${(100*O).toFixed(2)}%`,this.div.style.top=`${(100*F).toFixed(2)}%`,this.div.scrollIntoView({block:"nearest"})}fixAndSetPosition(){const[U,$]=this.pageDimensions;let{x:Y,y:z,width:O,height:F}=this;switch(O*=U,F*=$,Y*=U,z*=$,this.rotation){case 0:Y=Math.max(0,Math.min(U-O,Y)),z=Math.max(0,Math.min($-F,z));break;case 90:Y=Math.max(0,Math.min(U-F,Y)),z=Math.min($,Math.max(O,z));break;case 180:Y=Math.min(U,Math.max(O,Y)),z=Math.min($,Math.max(F,z));break;case 270:Y=Math.min(U,Math.max(F,Y)),z=Math.max(0,Math.min($-O,z));break}this.x=Y/=U,this.y=z/=$;const[H,X]=me(this,R,nc).call(this);Y+=H,z+=X;const{style:te}=this.div;te.left=`${(100*Y).toFixed(2)}%`,te.top=`${(100*z).toFixed(2)}%`,this.moveInDOM()}screenToPageTranslation(U,$){var Y;return me(Y=q,N,rc).call(Y,U,$,this.parentRotation)}pageTranslationToScreen(U,$){var Y;return me(Y=q,N,rc).call(Y,U,$,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:[$,Y]}=this,z=$*U,O=Y*U;return s.FeatureTest.isCSSRoundSupported?[Math.round(z),Math.round(O)]:[z,O]}setDims(U,$){var O;const[Y,z]=this.parentDimensions;this.div.style.width=`${(100*U/Y).toFixed(2)}%`,j(this,x)||(this.div.style.height=`${(100*$/z).toFixed(2)}%`),(O=j(this,h))==null||O.classList.toggle("small",U<q.SMALL_EDITOR_SIZE||$<q.SMALL_EDITOR_SIZE)}fixDims(){const{style:U}=this.div,{height:$,width:Y}=U,z=Y.endsWith("%"),O=!j(this,x)&&$.endsWith("%");if(z&&O)return;const[F,H]=this.parentDimensions;z||(U.width=`${(100*parseFloat(Y)/F).toFixed(2)}%`),!j(this,x)&&!O&&(U.height=`${(100*parseFloat($)/H).toFixed(2)}%`)}getInitialTranslation(){return[0,0]}async addAltTextButton(){if(j(this,h))return;const U=Ce(this,h,document.createElement("button"));U.className="altText";const $=await q._l10nPromise.get("editor_alt_text_button_label");U.textContent=$,U.setAttribute("aria-label",$),U.tabIndex="0",U.addEventListener("contextmenu",c.noContextMenu),U.addEventListener("pointerdown",Y=>Y.stopPropagation()),U.addEventListener("click",Y=>{Y.preventDefault(),this._uiManager.editAltText(this)},{capture:!0}),U.addEventListener("keydown",Y=>{Y.target===U&&Y.key==="Enter"&&(Y.preventDefault(),this._uiManager.editAltText(this))}),me(this,R,ic).call(this),this.div.append(U),q.SMALL_EDITOR_SIZE||(q.SMALL_EDITOR_SIZE=Math.min(128,Math.round(U.getBoundingClientRect().width*1.4)))}getClientDimensions(){return this.div.getBoundingClientRect()}get altTextData(){return{altText:j(this,m),decorative:j(this,f)}}set altTextData({altText:U,decorative:$}){j(this,m)===U&&j(this,f)===$||(Ce(this,m,U),Ce(this,f,$),me(this,R,ic).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",j(this,S)),this.div.addEventListener("focusout",j(this,A));const[U,$]=this.parentDimensions;this.parentRotation%180!==0&&(this.div.style.maxWidth=`${(100*$/U).toFixed(2)}%`,this.div.style.maxHeight=`${(100*U/$).toFixed(2)}%`);const[Y,z]=this.getInitialTranslation();return this.translate(Y,z),(0,o.bindEvents)(this,this.div,["pointerdown"]),this.div}pointerdown(U){const{isMac:$}=s.FeatureTest.platform;if(U.button!==0||U.ctrlKey&&$){U.preventDefault();return}Ce(this,C,!0),me(this,R,Sp).call(this,U)}moveInDOM(){var U;(U=this.parent)==null||U.moveEditorInDOM(this)}_setParentAndPosition(U,$,Y){U.changeParent(this),this.x=$,this.y=Y,this.fixAndSetPosition()}getRect(U,$){const Y=this.parentScale,[z,O]=this.pageDimensions,[F,H]=this.pageTranslation,X=U/Y,te=$/Y,J=this.x*z,ce=this.y*O,ue=this.width*z,Ae=this.height*O;switch(this.rotation){case 0:return[J+X+F,O-ce-te-Ae+H,J+X+ue+F,O-ce-te+H];case 90:return[J+te+F,O-ce+X+H,J+te+Ae+F,O-ce+X+ue+H];case 180:return[J-X-ue+F,O-ce+te+H,J-X+F,O-ce+te+Ae+H];case 270:return[J-te-Ae+F,O-ce-X-ue+H,J-te+F,O-ce-X+H];default:throw new Error("Invalid rotation")}}getRectInCurrentCoords(U,$){const[Y,z,O,F]=U,H=O-Y,X=F-z;switch(this.rotation){case 0:return[Y,$-F,H,X];case 90:return[Y,$-z,X,H];case 180:return[O,$-z,H,X];case 270:return[O,$-F,X,H];default:throw new Error("Invalid rotation")}}onceAdded(){}isEmpty(){return!1}enableEditMode(){Ce(this,k,!0)}disableEditMode(){Ce(this,k,!1)}isInEditMode(){return j(this,k)}shouldGetKeyboardEvents(){return!1}needsToBeRebuilt(){return this.div&&!this.isAttachedToDOM}rebuild(){var U,$;(U=this.div)==null||U.addEventListener("focusin",j(this,S)),($=this.div)==null||$.addEventListener("focusout",j(this,A))}serialize(U=!1,$=null){(0,s.unreachable)("An editor must be serializable")}static deserialize(U,$,Y){const z=new this.prototype.constructor({parent:$,id:$.getNextId(),uiManager:Y});z.rotation=U.rotation;const[O,F]=z.pageDimensions,[H,X,te,J]=z.getRectInCurrentCoords(U.rect,F);return z.x=H/O,z.y=X/F,z.width=te/O,z.height=J/F,z}remove(){var U;this.div.removeEventListener("focusin",j(this,S)),this.div.removeEventListener("focusout",j(this,A)),this.isEmpty()||this.commit(),this.parent?this.parent.remove(this):this._uiManager.removeEditor(this),(U=j(this,h))==null||U.remove(),Ce(this,h,null),Ce(this,v,null)}get isResizable(){return!1}makeResizable(){this.isResizable&&(me(this,R,bp).call(this),j(this,b).classList.remove("hidden"))}select(){var U;this.makeResizable(),(U=this.div)==null||U.classList.add("selectedEditor")}unselect(){var U,$,Y;(U=j(this,b))==null||U.classList.add("hidden"),($=this.div)==null||$.classList.remove("selectedEditor"),(Y=this.div)!=null&&Y.contains(document.activeElement)&&this._uiManager.currentLayer.div.focus()}updateParams(U,$){}disableEditing(){j(this,h)&&(j(this,h).hidden=!0)}enableEditing(){j(this,h)&&(j(this,h).hidden=!1)}enterInEditMode(){}get contentDiv(){return this.div}get isEditing(){return j(this,T)}set isEditing(U){Ce(this,T,U),this.parent&&(U?(this.parent.setSelected(this),this.parent.setActiveEditor(this)):this.parent.setActiveEditor(null))}setAspectRatio(U,$){Ce(this,x,!0);const Y=U/$,{style:z}=this.div;z.aspectRatio=Y,z.height="auto"}static get MIN_SIZE(){return 16}};m=new WeakMap,f=new WeakMap,h=new WeakMap,v=new WeakMap,y=new WeakMap,x=new WeakMap,b=new WeakMap,S=new WeakMap,A=new WeakMap,C=new WeakMap,T=new WeakMap,k=new WeakMap,D=new WeakMap,w=new WeakMap,R=new WeakSet,tc=function([U,$],Y,z){[Y,z]=this.screenToPageTranslation(Y,z),this.x+=Y/U,this.y+=z/$,this.fixAndSetPosition()},nc=function(){const[U,$]=this.parentDimensions,{_borderLineWidth:Y}=q,z=Y/U,O=Y/$;switch(this.rotation){case 90:return[-z,O];case 180:return[z,O];case 270:return[z,-O];default:return[-z,-O]}},N=new WeakSet,rc=function(U,$,Y){switch(Y){case 90:return[$,-U];case 180:return[-U,-$];case 270:return[-$,U];default:return[U,$]}},ac=function(U){switch(U){case 90:{const[$,Y]=this.pageDimensions;return[0,-$/Y,Y/$,0]}case 180:return[-1,0,0,-1];case 270:{const[$,Y]=this.pageDimensions;return[0,$/Y,-Y/$,0]}default:return[1,0,0,1]}},bp=function(){if(j(this,b))return;Ce(this,b,document.createElement("div")),j(this,b).classList.add("resizers");const U=["topLeft","topRight","bottomRight","bottomLeft"];this._willKeepAspectRatio||U.push("topMiddle","middleRight","bottomMiddle","middleLeft");for(const $ of U){const Y=document.createElement("div");j(this,b).append(Y),Y.classList.add("resizer",$),Y.addEventListener("pointerdown",me(this,R,yp).bind(this,$)),Y.addEventListener("contextmenu",c.noContextMenu)}this.div.prepend(j(this,b))},yp=function(U,$){$.preventDefault();const{isMac:Y}=s.FeatureTest.platform;if($.button!==0||$.ctrlKey&&Y)return;const z=me(this,R,xp).bind(this,U),O=this._isDraggable;this._isDraggable=!1;const F={passive:!0,capture:!0};window.addEventListener("pointermove",z,F);const H=this.x,X=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($.target).cursor;const Ae=()=>{this._isDraggable=O,window.removeEventListener("pointerup",Ae),window.removeEventListener("blur",Ae),window.removeEventListener("pointermove",z,F),this.parent.div.style.cursor=ce,this.div.style.cursor=ue;const Ee=this.x,Me=this.y,je=this.width,ke=this.height;Ee===H&&Me===X&&je===te&&ke===J||this.addCommands({cmd:()=>{this.width=je,this.height=ke,this.x=Ee,this.y=Me;const[ge,oe]=this.parentDimensions;this.setDims(ge*je,oe*ke),this.fixAndSetPosition()},undo:()=>{this.width=te,this.height=J,this.x=H,this.y=X;const[ge,oe]=this.parentDimensions;this.setDims(ge*te,oe*J),this.fixAndSetPosition()},mustExec:!0})};window.addEventListener("pointerup",Ae),window.addEventListener("blur",Ae)},xp=function(U,$){const[Y,z]=this.parentDimensions,O=this.x,F=this.y,H=this.width,X=this.height,te=q.MIN_SIZE/Y,J=q.MIN_SIZE/z,ce=We=>Math.round(We*1e4)/1e4,ue=me(this,R,ac).call(this,this.rotation),Ae=(We,Je)=>[ue[0]*We+ue[2]*Je,ue[1]*We+ue[3]*Je],Ee=me(this,R,ac).call(this,360-this.rotation),Me=(We,Je)=>[Ee[0]*We+Ee[2]*Je,Ee[1]*We+Ee[3]*Je];let je,ke,ge=!1,oe=!1;switch(U){case"topLeft":ge=!0,je=(We,Je)=>[0,0],ke=(We,Je)=>[We,Je];break;case"topMiddle":je=(We,Je)=>[We/2,0],ke=(We,Je)=>[We/2,Je];break;case"topRight":ge=!0,je=(We,Je)=>[We,0],ke=(We,Je)=>[0,Je];break;case"middleRight":oe=!0,je=(We,Je)=>[We,Je/2],ke=(We,Je)=>[0,Je/2];break;case"bottomRight":ge=!0,je=(We,Je)=>[We,Je],ke=(We,Je)=>[0,0];break;case"bottomMiddle":je=(We,Je)=>[We/2,Je],ke=(We,Je)=>[We/2,0];break;case"bottomLeft":ge=!0,je=(We,Je)=>[0,Je],ke=(We,Je)=>[We,0];break;case"middleLeft":oe=!0,je=(We,Je)=>[0,Je/2],ke=(We,Je)=>[We,Je/2];break}const G=je(H,X),ee=ke(H,X);let de=Ae(...ee);const pe=ce(O+de[0]),ve=ce(F+de[1]);let Te=1,se=1,[re,$e]=this.screenToPageTranslation($.movementX,$.movementY);if([re,$e]=Me(re/Y,$e/z),ge){const We=Math.hypot(H,X);Te=se=Math.max(Math.min(Math.hypot(ee[0]-G[0]-re,ee[1]-G[1]-$e)/We,1/H,1/X),te/H,J/X)}else oe?Te=Math.max(te,Math.min(1,Math.abs(ee[0]-G[0]-re)))/H:se=Math.max(J,Math.min(1,Math.abs(ee[1]-G[1]-$e)))/X;const Le=ce(H*Te),Xe=ce(X*se);de=Ae(...ke(Le,Xe));const qe=pe-de[0],at=ve-de[1];this.width=Le,this.height=Xe,this.x=qe,this.y=at,this.setDims(Y*Le,z*Xe),this.fixAndSetPosition()},ic=async function(){var Y;const U=j(this,h);if(!U)return;if(!j(this,m)&&!j(this,f)){U.classList.remove("done"),(Y=j(this,v))==null||Y.remove();return}q._l10nPromise.get("editor_alt_text_edit_button_label").then(z=>{U.setAttribute("aria-label",z)});let $=j(this,v);if(!$){Ce(this,v,$=document.createElement("span")),$.className="tooltip",$.setAttribute("role","tooltip");const z=$.id=`alt-text-tooltip-${this.id}`;U.setAttribute("aria-describedby",z);const O=100;U.addEventListener("mouseenter",()=>{Ce(this,y,setTimeout(()=>{Ce(this,y,null),j(this,v).classList.add("show"),this._uiManager._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",subtype:this.editorType,data:{action:"alt_text_tooltip"}}})},O))}),U.addEventListener("mouseleave",()=>{var F;clearTimeout(j(this,y)),Ce(this,y,null),(F=j(this,v))==null||F.classList.remove("show")})}U.classList.add("done"),$.innerText=j(this,f)?await q._l10nPromise.get("editor_alt_text_decorative_tooltip"):j(this,m),$.parentNode||U.append($)},Sp=function(U){if(!this._isDraggable)return;const $=this._uiManager.isSelected(this);this._uiManager.setUpDragSession();let Y,z;$&&(Y={passive:!0,capture:!0},z=F=>{const[H,X]=this.screenToPageTranslation(F.movementX,F.movementY);this._uiManager.dragSelectedEditors(H,X)},window.addEventListener("pointermove",z,Y));const O=()=>{if(window.removeEventListener("pointerup",O),window.removeEventListener("blur",O),$&&window.removeEventListener("pointermove",z,Y),Ce(this,C,!1),!this._uiManager.endDragSession()){const{isMac:F}=s.FeatureTest.platform;U.ctrlKey&&!F||U.shiftKey||U.metaKey&&F?this.parent.toggleSelected(this):this.parent.setSelected(this)}};window.addEventListener("pointerup",O),window.addEventListener("blur",O)},Se(q,N),Pt(q,"_borderLineWidth",-1),Pt(q,"_colorManager",new o.ColorManager),Pt(q,"_zIndex",1),Pt(q,"SMALL_EDITOR_SIZE",0);let d=q;t.AnnotationEditor=d;class p extends d{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,b,S,A,C,oc,D,w,R,_,M,Ep,L,I,W,ae,Q,B,q,K,U,$,Y,z,O,F,H,X,te,J,ce,ue,Ae,Ee,Me,je,ke,ge,oe,G,ee,de,pe,ve,Te,se,re,Ap,sc,lc,jo,cc,uc,wn,pi,Cp,wp,dc,hi,fc;Object.defineProperty(t,"__esModule",{value:!0}),t.KeyboardManager=t.CommandManager=t.ColorManager=t.AnnotationEditorUIManager=void 0,t.bindEvents=c,t.opacityToHex=d;var o=i(1),s=i(6);function c(ht,le,Ne){for(const Ge of Ne)le.addEventListener(Ge,ht[Ge].bind(ht))}function d(ht){return Math.round(Math.min(255,Math.max(1,255*ht))).toString(16).padStart(2,"0")}class p{constructor(){Se(this,x,0)}getId(){return`${o.AnnotationEditorPrefix}${fi(this,x)._++}`}}x=new WeakMap;const k=class k{constructor(){Se(this,C);Se(this,b,(0,o.getUuid)());Se(this,S,0);Se(this,A,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 it=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,o.shadow)(this,"_isSVGFittingCanvas",it)}async getFromFile(le){const{lastModified:Ne,name:Ge,size:nt,type:it}=le;return me(this,C,oc).call(this,`${Ne}_${Ge}_${nt}_${it}`,le)}async getFromUrl(le){return me(this,C,oc).call(this,le,le)}async getFromId(le){j(this,A)||Ce(this,A,new Map);const Ne=j(this,A).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=j(this,A).get(le);return Ne!=null&&Ne.isSvg?Ne.svgUrl:null}deleteId(le){j(this,A)||Ce(this,A,new Map);const Ne=j(this,A).get(le);Ne&&(Ne.refCounter-=1,Ne.refCounter===0&&(Ne.bitmap=null))}isValidId(le){return le.startsWith(`image_${j(this,b)}_`)}};b=new WeakMap,S=new WeakMap,A=new WeakMap,C=new WeakSet,oc=async function(le,Ne){j(this,A)||Ce(this,A,new Map);let Ge=j(this,A).get(le);if(Ge===null)return null;if(Ge!=null&&Ge.bitmap)return Ge.refCounter+=1,Ge;try{Ge||(Ge={bitmap:null,id:`image_${j(this,b)}_${fi(this,S)._++}`,refCounter:0,isSvg:!1});let nt;if(typeof Ne=="string"){Ge.url=Ne;const it=await fetch(Ne);if(!it.ok)throw new Error(it.statusText);nt=await it.blob()}else nt=Ge.file=Ne;if(nt.type==="image/svg+xml"){const it=k._isSVGFittingCanvas,Ke=new FileReader,ie=new Image,ne=new Promise((he,_e)=>{ie.onload=()=>{Ge.bitmap=ie,Ge.isSvg=!0,he()},Ke.onload=async()=>{const Re=Ge.svgUrl=Ke.result;ie.src=await it?`${Re}#svgView(preserveAspectRatio(none))`:Re},ie.onerror=Ke.onerror=_e});Ke.readAsDataURL(nt),await ne}else Ge.bitmap=await createImageBitmap(nt);Ge.refCounter=1}catch(nt){console.error(nt),Ge=null}return j(this,A).set(le,Ge),Ge&&j(this,A).set(Ge.id,Ge),Ge};let m=k;class f{constructor(le=128){Se(this,D,[]);Se(this,w,!1);Se(this,R);Se(this,_,-1);Ce(this,R,le)}add({cmd:le,undo:Ne,mustExec:Ge,type:nt=NaN,overwriteIfSameType:it=!1,keepUndo:Ke=!1}){if(Ge&&le(),j(this,w))return;const ie={cmd:le,undo:Ne,type:nt};if(j(this,_)===-1){j(this,D).length>0&&(j(this,D).length=0),Ce(this,_,0),j(this,D).push(ie);return}if(it&&j(this,D)[j(this,_)].type===nt){Ke&&(ie.undo=j(this,D)[j(this,_)].undo),j(this,D)[j(this,_)]=ie;return}const ne=j(this,_)+1;ne===j(this,R)?j(this,D).splice(0,1):(Ce(this,_,ne),ne<j(this,D).length&&j(this,D).splice(ne)),j(this,D).push(ie)}undo(){j(this,_)!==-1&&(Ce(this,w,!0),j(this,D)[j(this,_)].undo(),Ce(this,w,!1),Ce(this,_,j(this,_)-1))}redo(){j(this,_)<j(this,D).length-1&&(Ce(this,_,j(this,_)+1),Ce(this,w,!0),j(this,D)[j(this,_)].cmd(),Ce(this,w,!1))}hasSomethingToUndo(){return j(this,_)!==-1}hasSomethingToRedo(){return j(this,_)<j(this,D).length-1}destroy(){Ce(this,D,null)}}D=new WeakMap,w=new WeakMap,R=new WeakMap,_=new WeakMap,t.CommandManager=f;class h{constructor(le){Se(this,M);this.buffer=[],this.callbacks=new Map,this.allKeys=new Set;const{isMac:Ne}=o.FeatureTest.platform;for(const[Ge,nt,it={}]of le)for(const Ke of Ge){const ie=Ke.startsWith("mac+");Ne&&ie?(this.callbacks.set(Ke.slice(4),{callback:nt,options:it}),this.allKeys.add(Ke.split("+").at(-1))):!Ne&&!ie&&(this.callbacks.set(Ke,{callback:nt,options:it}),this.allKeys.add(Ke.split("+").at(-1)))}}exec(le,Ne){if(!this.allKeys.has(Ne.key))return;const Ge=this.callbacks.get(me(this,M,Ep).call(this,Ne));if(!Ge)return;const{callback:nt,options:{bubbles:it=!1,args:Ke=[],checker:ie=null}}=Ge;ie&&!ie(le,Ne)||(nt.bind(le,...Ke)(),it||(Ne.stopPropagation(),Ne.preventDefault()))}}M=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=h;const P=class P{get _colors(){const le=new Map([["CanvasText",null],["Canvas",null]]);return(0,s.getColorValues)(le),(0,o.shadow)(this,"_colors",le)}convert(le){const Ne=(0,s.getRGB)(le);if(!window.matchMedia("(forced-colors: active)").matches)return Ne;for(const[Ge,nt]of this._colors)if(nt.every((it,Ke)=>it===Ne[Ke]))return P._colorsMapping.get(Ge);return Ne}getHexCode(le){const Ne=this._colors.get(le);return Ne?o.Util.makeHexColor(...Ne):le}};Pt(P,"_colorsMapping",new Map([["CanvasText",[0,0,0]],["Canvas",[255,255,255]]]));let v=P;t.ColorManager=v;const pt=class pt{constructor(le,Ne,Ge,nt,it,Ke){Se(this,re);Se(this,L,null);Se(this,I,new Map);Se(this,W,new Map);Se(this,ae,null);Se(this,Q,null);Se(this,B,new f);Se(this,q,0);Se(this,K,new Set);Se(this,U,null);Se(this,$,null);Se(this,Y,new Set);Se(this,z,null);Se(this,O,new p);Se(this,F,!1);Se(this,H,!1);Se(this,X,null);Se(this,te,o.AnnotationEditorType.NONE);Se(this,J,new Set);Se(this,ce,null);Se(this,ue,this.blur.bind(this));Se(this,Ae,this.focus.bind(this));Se(this,Ee,this.copy.bind(this));Se(this,Me,this.cut.bind(this));Se(this,je,this.paste.bind(this));Se(this,ke,this.keydown.bind(this));Se(this,ge,this.onEditingAction.bind(this));Se(this,oe,this.onPageChanging.bind(this));Se(this,G,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,se,null);Ce(this,Te,le),Ce(this,se,Ne),Ce(this,ae,Ge),this._eventBus=nt,this._eventBus._on("editingaction",j(this,ge)),this._eventBus._on("pagechanging",j(this,oe)),this._eventBus._on("scalechanging",j(this,G)),this._eventBus._on("rotationchanging",j(this,ee)),Ce(this,Q,it.annotationStorage),Ce(this,z,it.filterFactory),Ce(this,ce,Ke),this.viewParameters={realScale:s.PixelsPerInch.PDF_TO_CSS_UNITS,rotation:0}}static get _keyboardManager(){const le=pt.prototype,Ne=it=>{const{activeElement:Ke}=document;return Ke&&j(it,Te).contains(Ke)&&it.hasSomethingToControl()},Ge=this.TRANSLATE_SMALL,nt=this.TRANSLATE_BIG;return(0,o.shadow)(this,"_keyboardManager",new h([[["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,re,jo).call(this),me(this,re,sc).call(this),this._eventBus._off("editingaction",j(this,ge)),this._eventBus._off("pagechanging",j(this,oe)),this._eventBus._off("scalechanging",j(this,G)),this._eventBus._off("rotationchanging",j(this,ee));for(const le of j(this,W).values())le.destroy();j(this,W).clear(),j(this,I).clear(),j(this,Y).clear(),Ce(this,L,null),j(this,J).clear(),j(this,B).destroy(),j(this,ae).destroy()}get hcmFilter(){return(0,o.shadow)(this,"hcmFilter",j(this,ce)?j(this,z).addHCMFilter(j(this,ce).foreground,j(this,ce).background):"none")}get direction(){return(0,o.shadow)(this,"direction",getComputedStyle(j(this,Te)).direction)}editAltText(le){var Ne;(Ne=j(this,ae))==null||Ne.editAltText(this,le)}onPageChanging({pageNumber:le}){Ce(this,q,le-1)}focusMainContainer(){j(this,Te).focus()}findParent(le,Ne){for(const Ge of j(this,W).values()){const{x:nt,y:it,width:Ke,height:ie}=Ge.div.getBoundingClientRect();if(le>=nt&&le<=nt+Ke&&Ne>=it&&Ne<=it+ie)return Ge}return null}disableUserSelect(le=!1){j(this,se).classList.toggle("noUserSelect",le)}addShouldRescale(le){j(this,Y).add(le)}removeShouldRescale(le){j(this,Y).delete(le)}onScaleChanging({scale:le}){this.commitOrRemove(),this.viewParameters.realScale=le*s.PixelsPerInch.PDF_TO_CSS_UNITS;for(const Ne of j(this,Y))Ne.onScaleChanging()}onRotationChanging({pagesRotation:le}){this.commitOrRemove(),this.viewParameters.rotation=le}addToAnnotationStorage(le){!le.isEmpty()&&j(this,Q)&&!j(this,Q).has(le.id)&&j(this,Q).setValue(le.id,le)}blur(){if(!this.hasSelection)return;const{activeElement:le}=document;for(const Ne of j(this,J))if(Ne.div.contains(le)){Ce(this,X,[Ne,le]),Ne._focusEventsAllowed=!1;break}}focus(){if(!j(this,X))return;const[le,Ne]=j(this,X);Ce(this,X,null),Ne.addEventListener("focusin",()=>{le._focusEventsAllowed=!0},{once:!0}),Ne.focus()}addEditListeners(){me(this,re,lc).call(this),me(this,re,cc).call(this)}removeEditListeners(){me(this,re,jo).call(this),me(this,re,uc).call(this)}copy(le){var Ge;if(le.preventDefault(),(Ge=j(this,L))==null||Ge.commitOrRemove(),!this.hasSelection)return;const Ne=[];for(const nt of j(this,J)){const it=nt.serialize(!0);it&&Ne.push(it)}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 it of Ne.items)for(const Ke of j(this,$))if(Ke.isHandlingMimeForPasting(it.type)){Ke.paste(it,this.currentLayer);return}let Ge=Ne.getData("application/pdfjs");if(!Ge)return;try{Ge=JSON.parse(Ge)}catch(it){(0,o.warn)(`paste: "${it.message}".`);return}if(!Array.isArray(Ge))return;this.unselectAll();const nt=this.currentLayer;try{const it=[];for(const ne of Ge){const he=nt.deserialize(ne);if(!he)return;it.push(he)}const Ke=()=>{for(const ne of it)me(this,re,dc).call(this,ne);me(this,re,fc).call(this,it)},ie=()=>{for(const ne of it)ne.remove()};this.addCommands({cmd:Ke,undo:ie,mustExec:!0})}catch(it){(0,o.warn)(`paste: "${it.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,re,Ap).call(this),me(this,re,lc).call(this),me(this,re,cc).call(this),me(this,re,wn).call(this,{isEditing:j(this,te)!==o.AnnotationEditorType.NONE,isEmpty:me(this,re,hi).call(this),hasSomethingToUndo:j(this,B).hasSomethingToUndo(),hasSomethingToRedo:j(this,B).hasSomethingToRedo(),hasSelectedEditor:!1})):(me(this,re,sc).call(this),me(this,re,jo).call(this),me(this,re,uc).call(this),me(this,re,wn).call(this,{isEditing:!1}),this.disableUserSelect(!1))}registerEditorTypes(le){if(!j(this,$)){Ce(this,$,le);for(const Ne of j(this,$))me(this,re,pi).call(this,Ne.defaultPropertiesToUpdate)}}getId(){return j(this,O).getId()}get currentLayer(){return j(this,W).get(j(this,q))}getLayer(le){return j(this,W).get(le)}get currentPageIndex(){return j(this,q)}addLayer(le){j(this,W).set(le.pageIndex,le),j(this,F)?le.enable():le.disable()}removeLayer(le){j(this,W).delete(le.pageIndex)}updateMode(le,Ne=null){if(j(this,te)!==le){if(Ce(this,te,le),le===o.AnnotationEditorType.NONE){this.setEditingState(!1),me(this,re,wp).call(this);return}this.setEditingState(!0),me(this,re,Cp).call(this),this.unselectAll();for(const Ge of j(this,W).values())Ge.updateMode(le);if(Ne){for(const Ge of j(this,I).values())if(Ge.annotationElementId===Ne){this.setSelected(Ge),Ge.enterInEditMode();break}}}}updateToolbar(le){le!==j(this,te)&&this._eventBus.dispatch("switchannotationeditormode",{source:this,mode:le})}updateParams(le,Ne){if(j(this,$)){if(le===o.AnnotationEditorParamsType.CREATE){this.currentLayer.addNewEditor(le);return}for(const Ge of j(this,J))Ge.updateParams(le,Ne);for(const Ge of j(this,$))Ge.updateDefaultParams(le,Ne)}}enableWaiting(le=!1){if(j(this,H)!==le){Ce(this,H,le);for(const Ne of j(this,W).values())le?Ne.disableClick():Ne.enableClick(),Ne.div.classList.toggle("waiting",le)}}getEditors(le){const Ne=[];for(const Ge of j(this,I).values())Ge.pageIndex===le&&Ne.push(Ge);return Ne}getEditor(le){return j(this,I).get(le)}addEditor(le){j(this,I).set(le.id,le)}removeEditor(le){var Ne;j(this,I).delete(le.id),this.unselect(le),(!le.annotationElementId||!j(this,K).has(le.annotationElementId))&&((Ne=j(this,Q))==null||Ne.remove(le.id))}addDeletedAnnotationElement(le){j(this,K).add(le.annotationElementId),le.deleted=!0}isDeletedAnnotationElement(le){return j(this,K).has(le)}removeDeletedAnnotationElement(le){j(this,K).delete(le.annotationElementId),le.deleted=!1}setActiveEditor(le){j(this,L)!==le&&(Ce(this,L,le),le&&me(this,re,pi).call(this,le.propertiesToUpdate))}toggleSelected(le){if(j(this,J).has(le)){j(this,J).delete(le),le.unselect(),me(this,re,wn).call(this,{hasSelectedEditor:this.hasSelection});return}j(this,J).add(le),le.select(),me(this,re,pi).call(this,le.propertiesToUpdate),me(this,re,wn).call(this,{hasSelectedEditor:!0})}setSelected(le){for(const Ne of j(this,J))Ne!==le&&Ne.unselect();j(this,J).clear(),j(this,J).add(le),le.select(),me(this,re,pi).call(this,le.propertiesToUpdate),me(this,re,wn).call(this,{hasSelectedEditor:!0})}isSelected(le){return j(this,J).has(le)}unselect(le){le.unselect(),j(this,J).delete(le),me(this,re,wn).call(this,{hasSelectedEditor:this.hasSelection})}get hasSelection(){return j(this,J).size!==0}undo(){j(this,B).undo(),me(this,re,wn).call(this,{hasSomethingToUndo:j(this,B).hasSomethingToUndo(),hasSomethingToRedo:!0,isEmpty:me(this,re,hi).call(this)})}redo(){j(this,B).redo(),me(this,re,wn).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:j(this,B).hasSomethingToRedo(),isEmpty:me(this,re,hi).call(this)})}addCommands(le){j(this,B).add(le),me(this,re,wn).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:!1,isEmpty:me(this,re,hi).call(this)})}delete(){if(this.commitOrRemove(),!this.hasSelection)return;const le=[...j(this,J)],Ne=()=>{for(const nt of le)nt.remove()},Ge=()=>{for(const nt of le)me(this,re,dc).call(this,nt)};this.addCommands({cmd:Ne,undo:Ge,mustExec:!0})}commitOrRemove(){var le;(le=j(this,L))==null||le.commitOrRemove()}hasSomethingToControl(){return j(this,L)||this.hasSelection}selectAll(){for(const le of j(this,J))le.commit();me(this,re,fc).call(this,j(this,I).values())}unselectAll(){if(j(this,L)){j(this,L).commitOrRemove();return}if(this.hasSelection){for(const le of j(this,J))le.unselect();j(this,J).clear(),me(this,re,wn).call(this,{hasSelectedEditor:!1})}}translateSelectedEditors(le,Ne,Ge=!1){if(Ge||this.commitOrRemove(),!this.hasSelection)return;j(this,pe)[0]+=le,j(this,pe)[1]+=Ne;const[nt,it]=j(this,pe),Ke=[...j(this,J)],ie=1e3;j(this,ve)&&clearTimeout(j(this,ve)),Ce(this,ve,setTimeout(()=>{Ce(this,ve,null),j(this,pe)[0]=j(this,pe)[1]=0,this.addCommands({cmd:()=>{for(const ne of Ke)j(this,I).has(ne.id)&&ne.translateInPage(nt,it)},undo:()=>{for(const ne of Ke)j(this,I).has(ne.id)&&ne.translateInPage(-nt,-it)},mustExec:!1})},ie));for(const ne of Ke)ne.translateInPage(le,Ne)}setUpDragSession(){if(this.hasSelection){this.disableUserSelect(!0),Ce(this,U,new Map);for(const le of j(this,J))j(this,U).set(le,{savedX:le.x,savedY:le.y,savedPageIndex:le.pageIndex,newX:0,newY:0,newPageIndex:-1})}}endDragSession(){if(!j(this,U))return!1;this.disableUserSelect(!1);const le=j(this,U);Ce(this,U,null);let Ne=!1;for(const[{x:nt,y:it,pageIndex:Ke},ie]of le)ie.newX=nt,ie.newY=it,ie.newPageIndex=Ke,Ne||(Ne=nt!==ie.savedX||it!==ie.savedY||Ke!==ie.savedPageIndex);if(!Ne)return!1;const Ge=(nt,it,Ke,ie)=>{if(j(this,I).has(nt.id)){const ne=j(this,W).get(ie);ne?nt._setParentAndPosition(ne,it,Ke):(nt.pageIndex=ie,nt.x=it,nt.y=Ke)}};return this.addCommands({cmd:()=>{for(const[nt,{newX:it,newY:Ke,newPageIndex:ie}]of le)Ge(nt,it,Ke,ie)},undo:()=>{for(const[nt,{savedX:it,savedY:Ke,savedPageIndex:ie}]of le)Ge(nt,it,Ke,ie)},mustExec:!0}),!0}dragSelectedEditors(le,Ne){if(j(this,U))for(const Ge of j(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 j(this,L)===le}getActive(){return j(this,L)}getMode(){return j(this,te)}get imageManager(){return(0,o.shadow)(this,"imageManager",new m)}};L=new WeakMap,I=new WeakMap,W=new WeakMap,ae=new WeakMap,Q=new WeakMap,B=new WeakMap,q=new WeakMap,K=new WeakMap,U=new WeakMap,$=new WeakMap,Y=new WeakMap,z=new WeakMap,O=new WeakMap,F=new WeakMap,H=new WeakMap,X=new WeakMap,te=new WeakMap,J=new WeakMap,ce=new WeakMap,ue=new WeakMap,Ae=new WeakMap,Ee=new WeakMap,Me=new WeakMap,je=new WeakMap,ke=new WeakMap,ge=new WeakMap,oe=new WeakMap,G=new WeakMap,ee=new WeakMap,de=new WeakMap,pe=new WeakMap,ve=new WeakMap,Te=new WeakMap,se=new WeakMap,re=new WeakSet,Ap=function(){window.addEventListener("focus",j(this,Ae)),window.addEventListener("blur",j(this,ue))},sc=function(){window.removeEventListener("focus",j(this,Ae)),window.removeEventListener("blur",j(this,ue))},lc=function(){window.addEventListener("keydown",j(this,ke),{capture:!0})},jo=function(){window.removeEventListener("keydown",j(this,ke),{capture:!0})},cc=function(){document.addEventListener("copy",j(this,Ee)),document.addEventListener("cut",j(this,Me)),document.addEventListener("paste",j(this,je))},uc=function(){document.removeEventListener("copy",j(this,Ee)),document.removeEventListener("cut",j(this,Me)),document.removeEventListener("paste",j(this,je))},wn=function(le){Object.entries(le).some(([Ge,nt])=>j(this,de)[Ge]!==nt)&&this._eventBus.dispatch("annotationeditorstateschanged",{source:this,details:Object.assign(j(this,de),le)})},pi=function(le){this._eventBus.dispatch("annotationeditorparamschanged",{source:this,details:le})},Cp=function(){if(!j(this,F)){Ce(this,F,!0);for(const le of j(this,W).values())le.enable()}},wp=function(){if(this.unselectAll(),j(this,F)){Ce(this,F,!1);for(const le of j(this,W).values())le.disable()}},dc=function(le){const Ne=j(this,W).get(le.pageIndex);Ne?Ne.addOrRebuild(le):this.addEditor(le)},hi=function(){if(j(this,I).size===0)return!0;if(j(this,I).size===1)for(const le of j(this,I).values())return le.isEmpty();return!1},fc=function(le){j(this,J).clear();for(const Ne of le)Ne.isEmpty()||(j(this,J).add(Ne),Ne.select());me(this,re,wn).call(this,{hasSelectedEditor:!0})},Pt(pt,"TRANSLATE_SMALL",1),Pt(pt,"TRANSLATE_BIG",10);let y=pt;t.AnnotationEditorUIManager=y},(e,t,i)=>{var q,K,U,$,Y,z,O,F,H,X,te,J,ga,va,pc,Lo,No,mi,gi;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=_,t.getColorValues=I,t.getCurrentTransform=W,t.getCurrentTransformInverse=ae,t.getFilenameFromUrl=C,t.getPdfFilenameFromUrl=T,t.getRGB=L,t.getXfaPageViewport=P,t.isDataScheme=S,t.isPdfFile=A,t.isValidFetchUrl=D,t.loadScript=R,t.noContextMenu=w,t.setLayerDimensions=Q;var o=i(7),s=i(1);const c="http://www.w3.org/2000/svg",B=class B{};Pt(B,"CSS",96),Pt(B,"PDF",72),Pt(B,"PDF_TO_CSS_UNITS",B.CSS/B.PDF);let d=B;t.PixelsPerInch=d;class p extends o.BaseFilterFactory{constructor({docId:G,ownerDocument:ee=globalThis.document}={}){super();Se(this,J);Se(this,q);Se(this,K);Se(this,U);Se(this,$);Se(this,Y);Se(this,z);Se(this,O);Se(this,F);Se(this,H);Se(this,X);Se(this,te,0);Ce(this,U,G),Ce(this,$,ee)}addFilter(G){if(!G)return"none";let ee=j(this,J,ga).get(G);if(ee)return ee;let de,pe,ve,Te;if(G.length===1){const Le=G[0],Xe=new Array(256);for(let qe=0;qe<256;qe++)Xe[qe]=Le[qe]/255;Te=de=pe=ve=Xe.join(",")}else{const[Le,Xe,qe]=G,at=new Array(256),We=new Array(256),Je=new Array(256);for(let ct=0;ct<256;ct++)at[ct]=Le[ct]/255,We[ct]=Xe[ct]/255,Je[ct]=qe[ct]/255;de=at.join(","),pe=We.join(","),ve=Je.join(","),Te=`${de}${pe}${ve}`}if(ee=j(this,J,ga).get(Te),ee)return j(this,J,ga).set(G,ee),ee;const se=`g_${j(this,U)}_transfer_map_${fi(this,te)._++}`,re=`url(#${se})`;j(this,J,ga).set(G,re),j(this,J,ga).set(Te,re);const $e=me(this,J,Lo).call(this,se);return me(this,J,mi).call(this,de,pe,ve,$e),re}addHCMFilter(G,ee){var Xe;const de=`${G}-${ee}`;if(j(this,z)===de)return j(this,O);if(Ce(this,z,de),Ce(this,O,"none"),(Xe=j(this,Y))==null||Xe.remove(),!G||!ee)return j(this,O);const pe=me(this,J,gi).call(this,G);G=s.Util.makeHexColor(...pe);const ve=me(this,J,gi).call(this,ee);if(ee=s.Util.makeHexColor(...ve),j(this,J,va).style.color="",G==="#000000"&&ee==="#ffffff"||G===ee)return j(this,O);const Te=new Array(256);for(let qe=0;qe<=255;qe++){const at=qe/255;Te[qe]=at<=.03928?at/12.92:((at+.055)/1.055)**2.4}const se=Te.join(","),re=`g_${j(this,U)}_hcm_filter`,$e=Ce(this,F,me(this,J,Lo).call(this,re));me(this,J,mi).call(this,se,se,se,$e),me(this,J,pc).call(this,$e);const Le=(qe,at)=>{const We=pe[qe]/255,Je=ve[qe]/255,ct=new Array(at+1);for(let st=0;st<=at;st++)ct[st]=We+st/at*(Je-We);return ct.join(",")};return me(this,J,mi).call(this,Le(0,5),Le(1,5),Le(2,5),$e),Ce(this,O,`url(#${re})`),j(this,O)}addHighlightHCMFilter(G,ee,de,pe){var Je;const ve=`${G}-${ee}-${de}-${pe}`;if(j(this,H)===ve)return j(this,X);if(Ce(this,H,ve),Ce(this,X,"none"),(Je=j(this,F))==null||Je.remove(),!G||!ee)return j(this,X);const[Te,se]=[G,ee].map(me(this,J,gi).bind(this));let re=Math.round(.2126*Te[0]+.7152*Te[1]+.0722*Te[2]),$e=Math.round(.2126*se[0]+.7152*se[1]+.0722*se[2]),[Le,Xe]=[de,pe].map(me(this,J,gi).bind(this));$e<re&&([re,$e,Le,Xe]=[$e,re,Xe,Le]),j(this,J,va).style.color="";const qe=(ct,st,De)=>{const be=new Array(256),xe=($e-re)/De,Qe=ct/255,pt=(st-ct)/(255*De);let ht=0;for(let le=0;le<=De;le++){const Ne=Math.round(re+le*xe),Ge=Qe+le*pt;for(let nt=ht;nt<=Ne;nt++)be[nt]=Ge;ht=Ne+1}for(let le=ht;le<256;le++)be[le]=be[ht-1];return be.join(",")},at=`g_${j(this,U)}_hcm_highlight_filter`,We=Ce(this,F,me(this,J,Lo).call(this,at));return me(this,J,pc).call(this,We),me(this,J,mi).call(this,qe(Le[0],Xe[0],5),qe(Le[1],Xe[1],5),qe(Le[2],Xe[2],5),We),Ce(this,X,`url(#${at})`),j(this,X)}destroy(G=!1){G&&(j(this,O)||j(this,X))||(j(this,K)&&(j(this,K).parentNode.parentNode.remove(),Ce(this,K,null)),j(this,q)&&(j(this,q).clear(),Ce(this,q,null)),Ce(this,te,0))}}q=new WeakMap,K=new WeakMap,U=new WeakMap,$=new WeakMap,Y=new WeakMap,z=new WeakMap,O=new WeakMap,F=new WeakMap,H=new WeakMap,X=new WeakMap,te=new WeakMap,J=new WeakSet,ga=function(){return j(this,q)||Ce(this,q,new Map)},va=function(){if(!j(this,K)){const G=j(this,$).createElement("div"),{style:ee}=G;ee.visibility="hidden",ee.contain="strict",ee.width=ee.height=0,ee.position="absolute",ee.top=ee.left=0,ee.zIndex=-1;const de=j(this,$).createElementNS(c,"svg");de.setAttribute("width",0),de.setAttribute("height",0),Ce(this,K,j(this,$).createElementNS(c,"defs")),G.append(de),de.append(j(this,K)),j(this,$).body.append(G)}return j(this,K)},pc=function(G){const ee=j(this,$).createElementNS(c,"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"),G.append(ee)},Lo=function(G){const ee=j(this,$).createElementNS(c,"filter");return ee.setAttribute("color-interpolation-filters","sRGB"),ee.setAttribute("id",G),j(this,J,va).append(ee),ee},No=function(G,ee,de){const pe=j(this,$).createElementNS(c,ee);pe.setAttribute("type","discrete"),pe.setAttribute("tableValues",de),G.append(pe)},mi=function(G,ee,de,pe){const ve=j(this,$).createElementNS(c,"feComponentTransfer");pe.append(ve),me(this,J,No).call(this,ve,"feFuncR",G),me(this,J,No).call(this,ve,"feFuncG",ee),me(this,J,No).call(this,ve,"feFuncB",de)},gi=function(G){return j(this,J,va).style.color=G,L(getComputedStyle(j(this,J,va)).getPropertyValue("color"))},t.DOMFilterFactory=p;class m extends o.BaseCanvasFactory{constructor({ownerDocument:oe=globalThis.document}={}){super(),this._document=oe}_createCanvas(oe,G){const ee=this._document.createElement("canvas");return ee.width=oe,ee.height=G,ee}}t.DOMCanvasFactory=m;async function f(ge,oe=!1){if(D(ge,document.baseURI)){const G=await fetch(ge);if(!G.ok)throw new Error(G.statusText);return oe?new Uint8Array(await G.arrayBuffer()):(0,s.stringToBytes)(await G.text())}return new Promise((G,ee)=>{const de=new XMLHttpRequest;de.open("GET",ge,!0),oe&&(de.responseType="arraybuffer"),de.onreadystatechange=()=>{if(de.readyState===XMLHttpRequest.DONE){if(de.status===200||de.status===0){let pe;if(oe&&de.response?pe=new Uint8Array(de.response):!oe&&de.responseText&&(pe=(0,s.stringToBytes)(de.responseText)),pe){G(pe);return}}ee(new Error(de.statusText))}},de.send(null)})}class h extends o.BaseCMapReaderFactory{_fetchData(oe,G){return f(oe,this.isCompressed).then(ee=>({cMapData:ee,compressionType:G}))}}t.DOMCMapReaderFactory=h;class v extends o.BaseStandardFontDataFactory{_fetchData(oe){return f(oe,!0)}}t.DOMStandardFontDataFactory=v;class y extends o.BaseSVGFactory{_createSVG(oe){return document.createElementNS(c,oe)}}t.DOMSVGFactory=y;class x{constructor({viewBox:oe,scale:G,rotation:ee,offsetX:de=0,offsetY:pe=0,dontFlip:ve=!1}){this.viewBox=oe,this.scale=G,this.rotation=ee,this.offsetX=de,this.offsetY=pe;const Te=(oe[2]+oe[0])/2,se=(oe[3]+oe[1])/2;let re,$e,Le,Xe;switch(ee%=360,ee<0&&(ee+=360),ee){case 180:re=-1,$e=0,Le=0,Xe=1;break;case 90:re=0,$e=1,Le=1,Xe=0;break;case 270:re=0,$e=-1,Le=-1,Xe=0;break;case 0:re=1,$e=0,Le=0,Xe=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}ve&&(Le=-Le,Xe=-Xe);let qe,at,We,Je;re===0?(qe=Math.abs(se-oe[1])*G+de,at=Math.abs(Te-oe[0])*G+pe,We=(oe[3]-oe[1])*G,Je=(oe[2]-oe[0])*G):(qe=Math.abs(Te-oe[0])*G+de,at=Math.abs(se-oe[1])*G+pe,We=(oe[2]-oe[0])*G,Je=(oe[3]-oe[1])*G),this.transform=[re*G,$e*G,Le*G,Xe*G,qe-re*G*Te-Le*G*se,at-$e*G*Te-Xe*G*se],this.width=We,this.height=Je}get rawDims(){const{viewBox:oe}=this;return(0,s.shadow)(this,"rawDims",{pageWidth:oe[2]-oe[0],pageHeight:oe[3]-oe[1],pageX:oe[0],pageY:oe[1]})}clone({scale:oe=this.scale,rotation:G=this.rotation,offsetX:ee=this.offsetX,offsetY:de=this.offsetY,dontFlip:pe=!1}={}){return new x({viewBox:this.viewBox.slice(),scale:oe,rotation:G,offsetX:ee,offsetY:de,dontFlip:pe})}convertToViewportPoint(oe,G){return s.Util.applyTransform([oe,G],this.transform)}convertToViewportRectangle(oe){const G=s.Util.applyTransform([oe[0],oe[1]],this.transform),ee=s.Util.applyTransform([oe[2],oe[3]],this.transform);return[G[0],G[1],ee[0],ee[1]]}convertToPdfPoint(oe,G){return s.Util.applyInverseTransform([oe,G],this.transform)}}t.PageViewport=x;class b extends s.BaseException{constructor(oe,G=0){super(oe,"RenderingCancelledException"),this.extraDelay=G}}t.RenderingCancelledException=b;function S(ge){const oe=ge.length;let G=0;for(;G<oe&&ge[G].trim()==="";)G++;return ge.substring(G,G+5).toLowerCase()==="data:"}function A(ge){return typeof ge=="string"&&/\.pdf$/i.test(ge)}function C(ge,oe=!1){return oe||([ge]=ge.split(/[#?]/,1)),ge.substring(ge.lastIndexOf("/")+1)}function T(ge,oe="document.pdf"){if(typeof ge!="string")return oe;if(S(ge))return(0,s.warn)('getPdfFilenameFromUrl: ignore "data:"-URL for performance reasons.'),oe;const G=/^(?:(?:[^:]+:)?\/\/[^/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/,ee=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i,de=G.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||oe}class k{constructor(){Pt(this,"started",Object.create(null));Pt(this,"times",[])}time(oe){oe in this.started&&(0,s.warn)(`Timer is already running for ${oe}`),this.started[oe]=Date.now()}timeEnd(oe){oe in this.started||(0,s.warn)(`Timer has not been started for ${oe}`),this.times.push({name:oe,start:this.started[oe],end:Date.now()}),delete this.started[oe]}toString(){const oe=[];let G=0;for(const{name:ee}of this.times)G=Math.max(ee.length,G);for(const{name:ee,start:de,end:pe}of this.times)oe.push(`${ee.padEnd(G)} ${pe-de}ms
|
||
`);return oe.join("")}}t.StatTimer=k;function D(ge,oe){try{const{protocol:G}=oe?new URL(ge,oe):new URL(ge);return G==="http:"||G==="https:"}catch{return!1}}function w(ge){ge.preventDefault()}function R(ge,oe=!1){return new Promise((G,ee)=>{const de=document.createElement("script");de.src=ge,de.onload=function(pe){oe&&de.remove(),G(pe)},de.onerror=function(){ee(new Error(`Cannot load script at: ${de.src}`))},(document.head||document.documentElement).append(de)})}function _(ge){console.log("Deprecated API usage: "+ge)}let M;class N{static toDateObject(oe){if(!oe||typeof oe!="string")return null;M||(M=new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"));const G=M.exec(oe);if(!G)return null;const ee=parseInt(G[1],10);let de=parseInt(G[2],10);de=de>=1&&de<=12?de-1:0;let pe=parseInt(G[3],10);pe=pe>=1&&pe<=31?pe:1;let ve=parseInt(G[4],10);ve=ve>=0&&ve<=23?ve:0;let Te=parseInt(G[5],10);Te=Te>=0&&Te<=59?Te:0;let se=parseInt(G[6],10);se=se>=0&&se<=59?se:0;const re=G[7]||"Z";let $e=parseInt(G[8],10);$e=$e>=0&&$e<=23?$e:0;let Le=parseInt(G[9],10)||0;return Le=Le>=0&&Le<=59?Le:0,re==="-"?(ve+=$e,Te+=Le):re==="+"&&(ve-=$e,Te-=Le),new Date(Date.UTC(ee,de,pe,ve,Te,se))}}t.PDFDateString=N;function P(ge,{scale:oe=1,rotation:G=0}){const{width:ee,height:de}=ge.attributes.style,pe=[0,0,parseInt(ee),parseInt(de)];return new x({viewBox:pe,scale:oe,rotation:G})}function L(ge){if(ge.startsWith("#")){const oe=parseInt(ge.slice(1),16);return[(oe&16711680)>>16,(oe&65280)>>8,oe&255]}return ge.startsWith("rgb(")?ge.slice(4,-1).split(",").map(oe=>parseInt(oe)):ge.startsWith("rgba(")?ge.slice(5,-1).split(",").map(oe=>parseInt(oe)).slice(0,3):((0,s.warn)(`Not a valid color format: "${ge}"`),[0,0,0])}function I(ge){const oe=document.createElement("span");oe.style.visibility="hidden",document.body.append(oe);for(const G of ge.keys()){oe.style.color=G;const ee=window.getComputedStyle(oe).color;ge.set(G,L(ee))}oe.remove()}function W(ge){const{a:oe,b:G,c:ee,d:de,e:pe,f:ve}=ge.getTransform();return[oe,G,ee,de,pe,ve]}function ae(ge){const{a:oe,b:G,c:ee,d:de,e:pe,f:ve}=ge.getTransform().invertSelf();return[oe,G,ee,de,pe,ve]}function Q(ge,oe,G=!1,ee=!0){if(oe instanceof x){const{pageWidth:de,pageHeight:pe}=oe.rawDims,{style:ve}=ge,Te=s.FeatureTest.isCSSRoundSupported,se=`var(--scale-factor) * ${de}px`,re=`var(--scale-factor) * ${pe}px`,$e=Te?`round(${se}, 1px)`:`calc(${se})`,Le=Te?`round(${re}, 1px)`:`calc(${re})`;!G||oe.rotation%180===0?(ve.width=$e,ve.height=Le):(ve.width=Le,ve.height=$e)}ee&&ge.setAttribute("data-main-rotation",oe.rotation)}},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BaseStandardFontDataFactory=t.BaseSVGFactory=t.BaseFilterFactory=t.BaseCanvasFactory=t.BaseCMapReaderFactory=void 0;var o=i(1);class s{constructor(){this.constructor===s&&(0,o.unreachable)("Cannot initialize BaseFilterFactory.")}addFilter(h){return"none"}addHCMFilter(h,v){return"none"}addHighlightHCMFilter(h,v,y,x){return"none"}destroy(h=!1){}}t.BaseFilterFactory=s;class c{constructor(){this.constructor===c&&(0,o.unreachable)("Cannot initialize BaseCanvasFactory.")}create(h,v){if(h<=0||v<=0)throw new Error("Invalid canvas size");const y=this._createCanvas(h,v);return{canvas:y,context:y.getContext("2d")}}reset(h,v,y){if(!h.canvas)throw new Error("Canvas is not specified");if(v<=0||y<=0)throw new Error("Invalid canvas size");h.canvas.width=v,h.canvas.height=y}destroy(h){if(!h.canvas)throw new Error("Canvas is not specified");h.canvas.width=0,h.canvas.height=0,h.canvas=null,h.context=null}_createCanvas(h,v){(0,o.unreachable)("Abstract method `_createCanvas` called.")}}t.BaseCanvasFactory=c;class d{constructor({baseUrl:h=null,isCompressed:v=!0}){this.constructor===d&&(0,o.unreachable)("Cannot initialize BaseCMapReaderFactory."),this.baseUrl=h,this.isCompressed=v}async fetch({name:h}){if(!this.baseUrl)throw new Error('The CMap "baseUrl" parameter must be specified, ensure that the "cMapUrl" and "cMapPacked" API parameters are provided.');if(!h)throw new Error("CMap name must be specified.");const v=this.baseUrl+h+(this.isCompressed?".bcmap":""),y=this.isCompressed?o.CMapCompressionType.BINARY:o.CMapCompressionType.NONE;return this._fetchData(v,y).catch(x=>{throw new Error(`Unable to load ${this.isCompressed?"binary ":""}CMap at: ${v}`)})}_fetchData(h,v){(0,o.unreachable)("Abstract method `_fetchData` called.")}}t.BaseCMapReaderFactory=d;class p{constructor({baseUrl:h=null}){this.constructor===p&&(0,o.unreachable)("Cannot initialize BaseStandardFontDataFactory."),this.baseUrl=h}async fetch({filename:h}){if(!this.baseUrl)throw new Error('The standard font "baseUrl" parameter must be specified, ensure that the "standardFontDataUrl" API parameter is provided.');if(!h)throw new Error("Font filename must be specified.");const v=`${this.baseUrl}${h}`;return this._fetchData(v).catch(y=>{throw new Error(`Unable to load font data at: ${v}`)})}_fetchData(h){(0,o.unreachable)("Abstract method `_fetchData` called.")}}t.BaseStandardFontDataFactory=p;class m{constructor(){this.constructor===m&&(0,o.unreachable)("Cannot initialize BaseSVGFactory.")}create(h,v,y=!1){if(h<=0||v<=0)throw new Error("Invalid SVG dimensions");const x=this._createSVG("svg:svg");return x.setAttribute("version","1.1"),y||(x.setAttribute("width",`${h}px`),x.setAttribute("height",`${v}px`)),x.setAttribute("preserveAspectRatio","none"),x.setAttribute("viewBox",`0 0 ${h} ${v}`),x}createElement(h){if(typeof h!="string")throw new Error("Invalid SVG element type");return this._createSVG(h)}_createSVG(h){(0,o.unreachable)("Abstract method `_createSVG` called.")}}t.BaseSVGFactory=m},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MurmurHash3_64=void 0;var o=i(1);const s=3285377520,c=4294901760,d=65535;class p{constructor(f){this.h1=f?f&4294967295:s,this.h2=f?f&4294967295:s}update(f){let h,v;if(typeof f=="string"){h=new Uint8Array(f.length*2),v=0;for(let _=0,M=f.length;_<M;_++){const N=f.charCodeAt(_);N<=255?h[v++]=N:(h[v++]=N>>>8,h[v++]=N&255)}}else if((0,o.isArrayBuffer)(f))h=f.slice(),v=h.byteLength;else throw new Error("Wrong data format in MurmurHash3_64_update. Input must be a string or array.");const y=v>>2,x=v-y*4,b=new Uint32Array(h.buffer,0,y);let S=0,A=0,C=this.h1,T=this.h2;const k=3432918353,D=461845907,w=k&d,R=D&d;for(let _=0;_<y;_++)_&1?(S=b[_],S=S*k&c|S*w&d,S=S<<15|S>>>17,S=S*D&c|S*R&d,C^=S,C=C<<13|C>>>19,C=C*5+3864292196):(A=b[_],A=A*k&c|A*w&d,A=A<<15|A>>>17,A=A*D&c|A*R&d,T^=A,T=T<<13|T>>>19,T=T*5+3864292196);switch(S=0,x){case 3:S^=h[y*4+2]<<16;case 2:S^=h[y*4+1]<<8;case 1:S^=h[y*4],S=S*k&c|S*w&d,S=S<<15|S>>>17,S=S*D&c|S*R&d,y&1?C^=S:T^=S}this.h1=C,this.h2=T}hexdigest(){let f=this.h1,h=this.h2;return f^=h>>>1,f=f*3981806797&c|f*36045&d,h=h*4283543511&c|((h<<16|f>>>16)*2950163797&c)>>>16,f^=h>>>1,f=f*444984403&c|f*60499&d,h=h*3301882366&c|((h<<16|f>>>16)*3120437893&c)>>>16,f^=h>>>1,(f>>>0).toString(16).padStart(8,"0")+(h>>>0).toString(16).padStart(8,"0")}}t.MurmurHash3_64=p},(e,t,i)=>{var d;Object.defineProperty(t,"__esModule",{value:!0}),t.FontLoader=t.FontFaceObject=void 0;var o=i(1);class s{constructor({ownerDocument:m=globalThis.document,styleElement:f=null}){Se(this,d,new Set);this._document=m,this.nativeFontFaces=new Set,this.styleElement=null,this.loadingRequests=[],this.loadTestFontId=0}addNativeFontFace(m){this.nativeFontFaces.add(m),this._document.fonts.add(m)}removeNativeFontFace(m){this.nativeFontFaces.delete(m),this._document.fonts.delete(m)}insertRule(m){this.styleElement||(this.styleElement=this._document.createElement("style"),this._document.documentElement.getElementsByTagName("head")[0].append(this.styleElement));const f=this.styleElement.sheet;f.insertRule(m,f.cssRules.length)}clear(){for(const m of this.nativeFontFaces)this._document.fonts.delete(m);this.nativeFontFaces.clear(),j(this,d).clear(),this.styleElement&&(this.styleElement.remove(),this.styleElement=null)}async loadSystemFont(m){if(!(!m||j(this,d).has(m.loadedName))){if((0,o.assert)(!this.disableFontFace,"loadSystemFont shouldn't be called when `disableFontFace` is set."),this.isFontLoadingAPISupported){const{loadedName:f,src:h,style:v}=m,y=new FontFace(f,h,v);this.addNativeFontFace(y);try{await y.load(),j(this,d).add(f)}catch{(0,o.warn)(`Cannot load system font: ${m.baseFontName}, installing it could help to improve PDF rendering.`),this.removeNativeFontFace(y)}return}(0,o.unreachable)("Not implemented: loadSystemFont without the Font Loading API.")}}async bind(m){if(m.attached||m.missingFile&&!m.systemFontInfo)return;if(m.attached=!0,m.systemFontInfo){await this.loadSystemFont(m.systemFontInfo);return}if(this.isFontLoadingAPISupported){const h=m.createNativeFontFace();if(h){this.addNativeFontFace(h);try{await h.loaded}catch(v){throw(0,o.warn)(`Failed to load font '${h.family}': '${v}'.`),m.disableFontFace=!0,v}}return}const f=m.createFontFaceRule();if(f){if(this.insertRule(f),this.isSyncFontLoadingSupported)return;await new Promise(h=>{const v=this._queueLoadingCallback(h);this._prepareFontLoadEvent(m,v)})}}get isFontLoadingAPISupported(){var f;const m=!!((f=this._document)!=null&&f.fonts);return(0,o.shadow)(this,"isFontLoadingAPISupported",m)}get isSyncFontLoadingSupported(){let m=!1;return(o.isNodeJS||typeof navigator<"u"&&/Mozilla\/5.0.*?rv:\d+.*? Gecko/.test(navigator.userAgent))&&(m=!0),(0,o.shadow)(this,"isSyncFontLoadingSupported",m)}_queueLoadingCallback(m){function f(){for((0,o.assert)(!v.done,"completeRequest() cannot be called twice."),v.done=!0;h.length>0&&h[0].done;){const y=h.shift();setTimeout(y.callback,0)}}const{loadingRequests:h}=this,v={done:!1,complete:f,callback:m};return h.push(v),v}get _loadTestFont(){const m=atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA==");return(0,o.shadow)(this,"_loadTestFont",m)}_prepareFontLoadEvent(m,f){function h(L,I){return L.charCodeAt(I)<<24|L.charCodeAt(I+1)<<16|L.charCodeAt(I+2)<<8|L.charCodeAt(I+3)&255}function v(L,I,W,ae){const Q=L.substring(0,I),B=L.substring(I+W);return Q+ae+B}let y,x;const b=this._document.createElement("canvas");b.width=1,b.height=1;const S=b.getContext("2d");let A=0;function C(L,I){if(++A>30){(0,o.warn)("Load test font never loaded."),I();return}if(S.font="30px "+L,S.fillText(".",0,20),S.getImageData(0,0,1,1).data[3]>0){I();return}setTimeout(C.bind(null,L,I))}const T=`lt${Date.now()}${this.loadTestFontId++}`;let k=this._loadTestFont;k=v(k,976,T.length,T);const w=16,R=1482184792;let _=h(k,w);for(y=0,x=T.length-3;y<x;y+=4)_=_-R+h(T,y)|0;y<T.length&&(_=_-R+h(T+"XXX",y)|0),k=v(k,w,4,(0,o.string32)(_));const M=`url(data:font/opentype;base64,${btoa(k)});`,N=`@font-face {font-family:"${T}";src:${M}}`;this.insertRule(N);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 L of[m.loadedName,T]){const I=this._document.createElement("span");I.textContent="Hi",I.style.fontFamily=L,P.append(I)}this._document.body.append(P),C(T,()=>{P.remove(),f.complete()})}}d=new WeakMap,t.FontLoader=s;class c{constructor(m,{isEvalSupported:f=!0,disableFontFace:h=!1,ignoreErrors:v=!1,inspectFont:y=null}){this.compiledGlyphs=Object.create(null);for(const x in m)this[x]=m[x];this.isEvalSupported=f!==!1,this.disableFontFace=h===!0,this.ignoreErrors=v===!0,this._inspectFont=y}createNativeFontFace(){var f;if(!this.data||this.disableFontFace)return null;let m;if(!this.cssFontInfo)m=new FontFace(this.loadedName,this.data,{});else{const h={weight:this.cssFontInfo.fontWeight};this.cssFontInfo.italicAngle&&(h.style=`oblique ${this.cssFontInfo.italicAngle}deg`),m=new FontFace(this.cssFontInfo.fontFamily,this.data,h)}return(f=this._inspectFont)==null||f.call(this,this),m}createFontFaceRule(){var v;if(!this.data||this.disableFontFace)return null;const m=(0,o.bytesToString)(this.data),f=`url(data:${this.mimetype};base64,${btoa(m)});`;let h;if(!this.cssFontInfo)h=`@font-face {font-family:"${this.loadedName}";src:${f}}`;else{let y=`font-weight: ${this.cssFontInfo.fontWeight};`;this.cssFontInfo.italicAngle&&(y+=`font-style: oblique ${this.cssFontInfo.italicAngle}deg;`),h=`@font-face {font-family:"${this.cssFontInfo.fontFamily}";${y}src:${f}}`}return(v=this._inspectFont)==null||v.call(this,this,f),h}getPathGenerator(m,f){if(this.compiledGlyphs[f]!==void 0)return this.compiledGlyphs[f];let h;try{h=m.get(this.loadedName+"_path_"+f)}catch(v){if(!this.ignoreErrors)throw v;return(0,o.warn)(`getPathGenerator - ignoring character: "${v}".`),this.compiledGlyphs[f]=function(y,x){}}if(this.isEvalSupported&&o.FeatureTest.isEvalSupported){const v=[];for(const y of h){const x=y.args!==void 0?y.args.join(","):"";v.push("c.",y.cmd,"(",x,`);
|
||
`)}return this.compiledGlyphs[f]=new Function("c","size",v.join(""))}return this.compiledGlyphs[f]=function(v,y){for(const x of h)x.cmd==="scale"&&(x.args=[y,-y]),v[x.cmd].apply(v,x.args)}}}t.FontFaceObject=c},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NodeStandardFontDataFactory=t.NodeFilterFactory=t.NodeCanvasFactory=t.NodeCMapReaderFactory=void 0;var o=i(7);i(1);const s=function(f){return new Promise((h,v)=>{require$$5.readFile(f,(x,b)=>{if(x||!b){v(new Error(x));return}h(new Uint8Array(b))})})};class c extends o.BaseFilterFactory{}t.NodeFilterFactory=c;class d extends o.BaseCanvasFactory{_createCanvas(h,v){return require$$5.createCanvas(h,v)}}t.NodeCanvasFactory=d;class p extends o.BaseCMapReaderFactory{_fetchData(h,v){return s(h).then(y=>({cMapData:y,compressionType:v}))}}t.NodeCMapReaderFactory=p;class m extends o.BaseStandardFontDataFactory{_fetchData(h){return s(h)}}t.NodeStandardFontDataFactory=m},(e,t,i)=>{var K,hc,mc;Object.defineProperty(t,"__esModule",{value:!0}),t.CanvasGraphics=void 0;var o=i(1),s=i(6),c=i(12),d=i(13);const p=16,m=100,f=4096,h=15,v=10,y=1e3,x=16;function b(z,O){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(){O.save(),this.__originalSave()},z.restore=function(){O.restore(),this.__originalRestore()},z.translate=function(H,X){O.translate(H,X),this.__originalTranslate(H,X)},z.scale=function(H,X){O.scale(H,X),this.__originalScale(H,X)},z.transform=function(H,X,te,J,ce,ue){O.transform(H,X,te,J,ce,ue),this.__originalTransform(H,X,te,J,ce,ue)},z.setTransform=function(H,X,te,J,ce,ue){O.setTransform(H,X,te,J,ce,ue),this.__originalSetTransform(H,X,te,J,ce,ue)},z.resetTransform=function(){O.resetTransform(),this.__originalResetTransform()},z.rotate=function(H){O.rotate(H),this.__originalRotate(H)},z.clip=function(H){O.clip(H),this.__originalClip(H)},z.moveTo=function(F,H){O.moveTo(F,H),this.__originalMoveTo(F,H)},z.lineTo=function(F,H){O.lineTo(F,H),this.__originalLineTo(F,H)},z.bezierCurveTo=function(F,H,X,te,J,ce){O.bezierCurveTo(F,H,X,te,J,ce),this.__originalBezierCurveTo(F,H,X,te,J,ce)},z.rect=function(F,H,X,te){O.rect(F,H,X,te),this.__originalRect(F,H,X,te)},z.closePath=function(){O.closePath(),this.__originalClosePath()},z.beginPath=function(){O.beginPath(),this.__originalBeginPath()}}class S{constructor(O){this.canvasFactory=O,this.cache=Object.create(null)}getCanvas(O,F,H){let X;return this.cache[O]!==void 0?(X=this.cache[O],this.canvasFactory.reset(X,F,H)):(X=this.canvasFactory.create(F,H),this.cache[O]=X),X}delete(O){delete this.cache[O]}clear(){for(const O in this.cache){const F=this.cache[O];this.canvasFactory.destroy(F),delete this.cache[O]}}}function A(z,O,F,H,X,te,J,ce,ue,Ae){const[Ee,Me,je,ke,ge,oe]=(0,s.getCurrentTransform)(z);if(Me===0&&je===0){const de=J*Ee+ge,pe=Math.round(de),ve=ce*ke+oe,Te=Math.round(ve),se=(J+ue)*Ee+ge,re=Math.abs(Math.round(se)-pe)||1,$e=(ce+Ae)*ke+oe,Le=Math.abs(Math.round($e)-Te)||1;return z.setTransform(Math.sign(Ee),0,0,Math.sign(ke),pe,Te),z.drawImage(O,F,H,X,te,0,0,re,Le),z.setTransform(Ee,Me,je,ke,ge,oe),[re,Le]}if(Ee===0&&ke===0){const de=ce*je+ge,pe=Math.round(de),ve=J*Me+oe,Te=Math.round(ve),se=(ce+Ae)*je+ge,re=Math.abs(Math.round(se)-pe)||1,$e=(J+ue)*Me+oe,Le=Math.abs(Math.round($e)-Te)||1;return z.setTransform(0,Math.sign(Me),Math.sign(je),0,pe,Te),z.drawImage(O,F,H,X,te,0,0,Le,re),z.setTransform(Ee,Me,je,ke,ge,oe),[Le,re]}z.drawImage(O,F,H,X,te,J,ce,ue,Ae);const G=Math.hypot(Ee,Me),ee=Math.hypot(je,ke);return[G*ue,ee*Ae]}function C(z){const{width:O,height:F}=z;if(O>y||F>y)return null;const H=1e3,X=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),te=O+1;let J=new Uint8Array(te*(F+1)),ce,ue,Ae;const Ee=O+7&-8;let Me=new Uint8Array(Ee*F),je=0;for(const ee of z.data){let de=128;for(;de>0;)Me[je++]=ee&de?0:255,de>>=1}let ke=0;for(je=0,Me[je]!==0&&(J[0]=1,++ke),ue=1;ue<O;ue++)Me[je]!==Me[je+1]&&(J[ue]=Me[je]?2:1,++ke),je++;for(Me[je]!==0&&(J[ue]=2,++ke),ce=1;ce<F;ce++){je=ce*Ee,Ae=ce*te,Me[je-Ee]!==Me[je]&&(J[Ae]=Me[je]?1:8,++ke);let ee=(Me[je]?4:0)+(Me[je-Ee]?8:0);for(ue=1;ue<O;ue++)ee=(ee>>2)+(Me[je+1]?4:0)+(Me[je-Ee+1]?8:0),X[ee]&&(J[Ae+ue]=X[ee],++ke),je++;if(Me[je-Ee]!==Me[je]&&(J[Ae+ue]=Me[je]?2:4,++ke),ke>H)return null}for(je=Ee*(F-1),Ae=ce*te,Me[je]!==0&&(J[Ae]=8,++ke),ue=1;ue<O;ue++)Me[je]!==Me[je+1]&&(J[Ae+ue]=Me[je]?4:8,++ke),je++;if(Me[je]!==0&&(J[Ae+ue]=4,++ke),ke>H)return null;const ge=new Int32Array([0,te,-1,0,-te,0,0,0,1]),oe=new Path2D;for(ce=0;ke&&ce<=F;ce++){let ee=ce*te;const de=ee+O;for(;ee<de&&!J[ee];)ee++;if(ee===de)continue;oe.moveTo(ee%te,ce);const pe=ee;let ve=J[ee];do{const Te=ge[ve];do ee+=Te;while(!J[ee]);const se=J[ee];se!==5&&se!==10?(ve=se,J[ee]=0):(ve=se&51*ve>>4,J[ee]&=ve>>2|ve<<2),oe.lineTo(ee%te,ee/te|0),J[ee]||--ke}while(pe!==ee);--ce}return Me=null,J=null,function(ee){ee.save(),ee.scale(1/O,-1/F),ee.translate(0,-F),ee.fill(oe),ee.beginPath(),ee.restore()}}class T{constructor(O,F){this.alphaIsShape=!1,this.fontSize=0,this.fontSizeScale=1,this.textMatrix=o.IDENTITY_MATRIX,this.textMatrixScale=1,this.fontMatrix=o.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=o.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,O,F])}clone(){const O=Object.create(this);return O.clipBox=this.clipBox.slice(),O}setCurrentPoint(O,F){this.x=O,this.y=F}updatePathMinMax(O,F,H){[F,H]=o.Util.applyTransform([F,H],O),this.minX=Math.min(this.minX,F),this.minY=Math.min(this.minY,H),this.maxX=Math.max(this.maxX,F),this.maxY=Math.max(this.maxY,H)}updateRectMinMax(O,F){const H=o.Util.applyTransform(F,O),X=o.Util.applyTransform(F.slice(2),O);this.minX=Math.min(this.minX,H[0],X[0]),this.minY=Math.min(this.minY,H[1],X[1]),this.maxX=Math.max(this.maxX,H[0],X[0]),this.maxY=Math.max(this.maxY,H[1],X[1])}updateScalingPathMinMax(O,F){o.Util.scaleMinMax(O,F),this.minX=Math.min(this.minX,F[0]),this.maxX=Math.max(this.maxX,F[1]),this.minY=Math.min(this.minY,F[2]),this.maxY=Math.max(this.maxY,F[3])}updateCurvePathMinMax(O,F,H,X,te,J,ce,ue,Ae,Ee){const Me=o.Util.bezierBoundingBox(F,H,X,te,J,ce,ue,Ae);if(Ee){Ee[0]=Math.min(Ee[0],Me[0],Me[2]),Ee[1]=Math.max(Ee[1],Me[0],Me[2]),Ee[2]=Math.min(Ee[2],Me[1],Me[3]),Ee[3]=Math.max(Ee[3],Me[1],Me[3]);return}this.updateRectMinMax(O,Me)}getPathBoundingBox(O=c.PathType.FILL,F=null){const H=[this.minX,this.minY,this.maxX,this.maxY];if(O===c.PathType.STROKE){F||(0,o.unreachable)("Stroke bounding box must include transform.");const X=o.Util.singularValueDecompose2dScale(F),te=X[0]*this.lineWidth/2,J=X[1]*this.lineWidth/2;H[0]-=te,H[1]-=J,H[2]+=te,H[3]+=J}return H}updateClipFromPath(){const O=o.Util.intersect(this.clipBox,this.getPathBoundingBox());this.startNewPathAndClipBox(O||[0,0,0,0])}isEmptyClip(){return this.minX===1/0}startNewPathAndClipBox(O){this.clipBox=O,this.minX=1/0,this.minY=1/0,this.maxX=0,this.maxY=0}getClippedPathBoundingBox(O=c.PathType.FILL,F=null){return o.Util.intersect(this.clipBox,this.getPathBoundingBox(O,F))}}function k(z,O){if(typeof ImageData<"u"&&O instanceof ImageData){z.putImageData(O,0,0);return}const F=O.height,H=O.width,X=F%x,te=(F-X)/x,J=X===0?te:te+1,ce=z.createImageData(H,x);let ue=0,Ae;const Ee=O.data,Me=ce.data;let je,ke,ge,oe;if(O.kind===o.ImageKind.GRAYSCALE_1BPP){const G=Ee.byteLength,ee=new Uint32Array(Me.buffer,0,Me.byteLength>>2),de=ee.length,pe=H+7>>3,ve=4294967295,Te=o.FeatureTest.isLittleEndian?4278190080:255;for(je=0;je<J;je++){for(ge=je<te?x:X,Ae=0,ke=0;ke<ge;ke++){const se=G-ue;let re=0;const $e=se>pe?H:se*8-7,Le=$e&-8;let Xe=0,qe=0;for(;re<Le;re+=8)qe=Ee[ue++],ee[Ae++]=qe&128?ve:Te,ee[Ae++]=qe&64?ve:Te,ee[Ae++]=qe&32?ve:Te,ee[Ae++]=qe&16?ve:Te,ee[Ae++]=qe&8?ve:Te,ee[Ae++]=qe&4?ve:Te,ee[Ae++]=qe&2?ve:Te,ee[Ae++]=qe&1?ve:Te;for(;re<$e;re++)Xe===0&&(qe=Ee[ue++],Xe=128),ee[Ae++]=qe&Xe?ve:Te,Xe>>=1}for(;Ae<de;)ee[Ae++]=0;z.putImageData(ce,0,je*x)}}else if(O.kind===o.ImageKind.RGBA_32BPP){for(ke=0,oe=H*x*4,je=0;je<te;je++)Me.set(Ee.subarray(ue,ue+oe)),ue+=oe,z.putImageData(ce,0,ke),ke+=x;je<J&&(oe=H*X*4,Me.set(Ee.subarray(ue,ue+oe)),z.putImageData(ce,0,ke))}else if(O.kind===o.ImageKind.RGB_24BPP)for(ge=x,oe=H*ge,je=0;je<J;je++){for(je>=te&&(ge=X,oe=H*ge),Ae=0,ke=oe;ke--;)Me[Ae++]=Ee[ue++],Me[Ae++]=Ee[ue++],Me[Ae++]=Ee[ue++],Me[Ae++]=255;z.putImageData(ce,0,je*x)}else throw new Error(`bad image kind: ${O.kind}`)}function D(z,O){if(O.bitmap){z.drawImage(O.bitmap,0,0);return}const F=O.height,H=O.width,X=F%x,te=(F-X)/x,J=X===0?te:te+1,ce=z.createImageData(H,x);let ue=0;const Ae=O.data,Ee=ce.data;for(let Me=0;Me<J;Me++){const je=Me<te?x:X;({srcPos:ue}=(0,d.convertBlackAndWhiteToRGBA)({src:Ae,srcPos:ue,dest:Ee,width:H,height:je,nonBlackColor:0})),z.putImageData(ce,0,Me*x)}}function w(z,O){const F=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font","filter"];for(const H of F)z[H]!==void 0&&(O[H]=z[H]);z.setLineDash!==void 0&&(O.setLineDash(z.getLineDash()),O.lineDashOffset=z.lineDashOffset)}function R(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),!o.isNodeJS){const{filter:O}=z;O!=="none"&&O!==""&&(z.filter="none")}}function _(z,O,F,H){const X=z.length;for(let te=3;te<X;te+=4){const J=z[te];if(J===0)z[te-3]=O,z[te-2]=F,z[te-1]=H;else if(J<255){const ce=255-J;z[te-3]=z[te-3]*J+O*ce>>8,z[te-2]=z[te-2]*J+F*ce>>8,z[te-1]=z[te-1]*J+H*ce>>8}}}function M(z,O,F){const H=z.length,X=1/255;for(let te=3;te<H;te+=4){const J=F?F[z[te]]:z[te];O[te]=O[te]*J*X|0}}function N(z,O,F){const H=z.length;for(let X=3;X<H;X+=4){const te=z[X-3]*77+z[X-2]*152+z[X-1]*28;O[X]=F?O[X]*F[te>>8]>>8:O[X]*te>>16}}function P(z,O,F,H,X,te,J,ce,ue,Ae,Ee){const Me=!!te,je=Me?te[0]:0,ke=Me?te[1]:0,ge=Me?te[2]:0,oe=X==="Luminosity"?N:M,ee=Math.min(H,Math.ceil(1048576/F));for(let de=0;de<H;de+=ee){const pe=Math.min(ee,H-de),ve=z.getImageData(ce-Ae,de+(ue-Ee),F,pe),Te=O.getImageData(ce,de+ue,F,pe);Me&&_(ve.data,je,ke,ge),oe(ve.data,Te.data,J),O.putImageData(Te,ce,de+ue)}}function L(z,O,F,H){const X=H[0],te=H[1],J=H[2]-X,ce=H[3]-te;J===0||ce===0||(P(O.context,F,J,ce,O.subtype,O.backdrop,O.transferMap,X,te,O.offsetX,O.offsetY),z.save(),z.globalAlpha=1,z.globalCompositeOperation="source-over",z.setTransform(1,0,0,1,0,0),z.drawImage(F.canvas,0,0),z.restore())}function I(z,O){const F=o.Util.singularValueDecompose2dScale(z);F[0]=Math.fround(F[0]),F[1]=Math.fround(F[1]);const H=Math.fround((globalThis.devicePixelRatio||1)*s.PixelsPerInch.PDF_TO_CSS_UNITS);return O!==void 0?O:F[0]<=H||F[1]<=H}const W=["butt","round","square"],ae=["miter","round","bevel"],Q={},B={},Y=class Y{constructor(O,F,H,X,te,{optionalContentConfig:J,markedContentStack:ce=null},ue,Ae){Se(this,K);this.ctx=O,this.current=new T(this.ctx.canvas.width,this.ctx.canvas.height),this.stateStack=[],this.pendingClip=null,this.pendingEOFill=!1,this.res=null,this.xobjs=null,this.commonObjs=F,this.objs=H,this.canvasFactory=X,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=Ae,this._cachedScaleForStroking=[-1,0],this._cachedGetSinglePixelWidth=null,this._cachedBitmapsMap=new Map}getObject(O,F=null){return typeof O=="string"?O.startsWith("g_")?this.commonObjs.get(O):this.objs.get(O):F}beginDrawing({transform:O,viewport:F,transparency:H=!1,background:X=null}){const te=this.ctx.canvas.width,J=this.ctx.canvas.height,ce=this.ctx.fillStyle;if(this.ctx.fillStyle=X||"#ffffff",this.ctx.fillRect(0,0,te,J),this.ctx.fillStyle=ce,H){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,s.getCurrentTransform)(this.compositeCtx))}this.ctx.save(),R(this.ctx),O&&(this.ctx.transform(...O),this.outputScaleX=O[0],this.outputScaleY=O[0]),this.ctx.transform(...F.transform),this.viewportScale=F.scale,this.baseTransform=(0,s.getCurrentTransform)(this.ctx)}executeOperatorList(O,F,H,X){const te=O.argsArray,J=O.fnArray;let ce=F||0;const ue=te.length;if(ue===ce)return ce;const Ae=ue-ce>v&&typeof H=="function",Ee=Ae?Date.now()+h:0;let Me=0;const je=this.commonObjs,ke=this.objs;let ge;for(;;){if(X!==void 0&&ce===X.nextBreakPoint)return X.breakIt(ce,H),ce;if(ge=J[ce],ge!==o.OPS.dependency)this[ge].apply(this,te[ce]);else for(const oe of te[ce]){const G=oe.startsWith("g_")?je:ke;if(!G.has(oe))return G.get(oe,H),ce}if(ce++,ce===ue)return ce;if(Ae&&++Me>v){if(Date.now()>Ee)return H(),ce;Me=0}}}endDrawing(){me(this,K,hc).call(this),this.cachedCanvases.clear(),this.cachedPatterns.clear();for(const O of this._cachedBitmapsMap.values()){for(const F of O.values())typeof HTMLCanvasElement<"u"&&F instanceof HTMLCanvasElement&&(F.width=F.height=0);O.clear()}this._cachedBitmapsMap.clear(),me(this,K,mc).call(this)}_scaleImage(O,F){const H=O.width,X=O.height;let te=Math.max(Math.hypot(F[0],F[1]),1),J=Math.max(Math.hypot(F[2],F[3]),1),ce=H,ue=X,Ae="prescale1",Ee,Me;for(;te>2&&ce>1||J>2&&ue>1;){let je=ce,ke=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&&(ke=ue>=16384?Math.floor(ue/2)-1||1:Math.ceil(ue)/2,J/=ue/ke),Ee=this.cachedCanvases.getCanvas(Ae,je,ke),Me=Ee.context,Me.clearRect(0,0,je,ke),Me.drawImage(O,0,0,ce,ue,0,0,je,ke),O=Ee.canvas,ce=je,ue=ke,Ae=Ae==="prescale1"?"prescale2":"prescale1"}return{img:O,paintWidth:ce,paintHeight:ue}}_createMaskCanvas(O){const F=this.ctx,{width:H,height:X}=O,te=this.current.fillColor,J=this.current.patternFill,ce=(0,s.getCurrentTransform)(F);let ue,Ae,Ee,Me;if((O.bitmap||O.data)&&O.count>1){const re=O.bitmap||O.data.buffer;Ae=JSON.stringify(J?ce:[ce.slice(0,4),te]),ue=this._cachedBitmapsMap.get(re),ue||(ue=new Map,this._cachedBitmapsMap.set(re,ue));const $e=ue.get(Ae);if($e&&!J){const Le=Math.round(Math.min(ce[0],ce[2])+ce[4]),Xe=Math.round(Math.min(ce[1],ce[3])+ce[5]);return{canvas:$e,offsetX:Le,offsetY:Xe}}Ee=$e}Ee||(Me=this.cachedCanvases.getCanvas("maskCanvas",H,X),D(Me.context,O));let je=o.Util.transform(ce,[1/H,0,0,-1/X,0,0]);je=o.Util.transform(je,[1,0,0,1,0,-X]);const ke=o.Util.applyTransform([0,0],je),ge=o.Util.applyTransform([H,X],je),oe=o.Util.normalizeRect([ke[0],ke[1],ge[0],ge[1]]),G=Math.round(oe[2]-oe[0])||1,ee=Math.round(oe[3]-oe[1])||1,de=this.cachedCanvases.getCanvas("fillCanvas",G,ee),pe=de.context,ve=Math.min(ke[0],ge[0]),Te=Math.min(ke[1],ge[1]);pe.translate(-ve,-Te),pe.transform(...je),Ee||(Ee=this._scaleImage(Me.canvas,(0,s.getCurrentTransformInverse)(pe)),Ee=Ee.img,ue&&J&&ue.set(Ae,Ee)),pe.imageSmoothingEnabled=I((0,s.getCurrentTransform)(pe),O.interpolate),A(pe,Ee,0,0,Ee.width,Ee.height,0,0,H,X),pe.globalCompositeOperation="source-in";const se=o.Util.transform((0,s.getCurrentTransformInverse)(pe),[1,0,0,1,-ve,-Te]);return pe.fillStyle=J?te.getPattern(F,this,se,c.PathType.FILL):te,pe.fillRect(0,0,H,X),ue&&!J&&(this.cachedCanvases.delete("fillCanvas"),ue.set(Ae,de.canvas)),{canvas:de.canvas,offsetX:Math.round(ve),offsetY:Math.round(Te)}}setLineWidth(O){O!==this.current.lineWidth&&(this._cachedScaleForStroking[0]=-1),this.current.lineWidth=O,this.ctx.lineWidth=O}setLineCap(O){this.ctx.lineCap=W[O]}setLineJoin(O){this.ctx.lineJoin=ae[O]}setMiterLimit(O){this.ctx.miterLimit=O}setDash(O,F){const H=this.ctx;H.setLineDash!==void 0&&(H.setLineDash(O),H.lineDashOffset=F)}setRenderingIntent(O){}setFlatness(O){}setGState(O){for(const[F,H]of O)switch(F){case"LW":this.setLineWidth(H);break;case"LC":this.setLineCap(H);break;case"LJ":this.setLineJoin(H);break;case"ML":this.setMiterLimit(H);break;case"D":this.setDash(H[0],H[1]);break;case"RI":this.setRenderingIntent(H);break;case"FL":this.setFlatness(H);break;case"Font":this.setFont(H[0],H[1]);break;case"CA":this.current.strokeAlpha=H;break;case"ca":this.current.fillAlpha=H,this.ctx.globalAlpha=H;break;case"BM":this.ctx.globalCompositeOperation=H;break;case"SMask":this.current.activeSMask=H?this.tempSMask:null,this.tempSMask=null,this.checkSMaskState();break;case"TR":this.ctx.filter=this.current.transferMaps=this.filterFactory.addFilter(H);break}}get inSMaskMode(){return!!this.suspendedCtx}checkSMaskState(){const O=this.inSMaskMode;this.current.activeSMask&&!O?this.beginSMaskMode():!this.current.activeSMask&&O&&this.endSMaskMode()}beginSMaskMode(){if(this.inSMaskMode)throw new Error("beginSMaskMode called while already in smask mode");const O=this.ctx.canvas.width,F=this.ctx.canvas.height,H="smaskGroupAt"+this.groupLevel,X=this.cachedCanvases.getCanvas(H,O,F);this.suspendedCtx=this.ctx,this.ctx=X.context;const te=this.ctx;te.setTransform(...(0,s.getCurrentTransform)(this.suspendedCtx)),w(this.suspendedCtx,te),b(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(),w(this.ctx,this.suspendedCtx),this.ctx=this.suspendedCtx,this.suspendedCtx=null}compose(O){if(!this.current.activeSMask)return;O?(O[0]=Math.floor(O[0]),O[1]=Math.floor(O[1]),O[2]=Math.ceil(O[2]),O[3]=Math.ceil(O[3])):O=[0,0,this.ctx.canvas.width,this.ctx.canvas.height];const F=this.current.activeSMask,H=this.suspendedCtx;L(H,F,this.ctx,O),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?(w(this.ctx,this.suspendedCtx),this.suspendedCtx.save()):this.ctx.save();const O=this.current;this.stateStack.push(O),this.current=O.clone()}restore(){this.stateStack.length===0&&this.inSMaskMode&&this.endSMaskMode(),this.stateStack.length!==0&&(this.current=this.stateStack.pop(),this.inSMaskMode?(this.suspendedCtx.restore(),w(this.suspendedCtx,this.ctx)):this.ctx.restore(),this.checkSMaskState(),this.pendingClip=null,this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null)}transform(O,F,H,X,te,J){this.ctx.transform(O,F,H,X,te,J),this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null}constructPath(O,F,H){const X=this.ctx,te=this.current;let J=te.x,ce=te.y,ue,Ae;const Ee=(0,s.getCurrentTransform)(X),Me=Ee[0]===0&&Ee[3]===0||Ee[1]===0&&Ee[2]===0,je=Me?H.slice(0):null;for(let ke=0,ge=0,oe=O.length;ke<oe;ke++)switch(O[ke]|0){case o.OPS.rectangle:J=F[ge++],ce=F[ge++];const G=F[ge++],ee=F[ge++],de=J+G,pe=ce+ee;X.moveTo(J,ce),G===0||ee===0?X.lineTo(de,pe):(X.lineTo(de,ce),X.lineTo(de,pe),X.lineTo(J,pe)),Me||te.updateRectMinMax(Ee,[J,ce,de,pe]),X.closePath();break;case o.OPS.moveTo:J=F[ge++],ce=F[ge++],X.moveTo(J,ce),Me||te.updatePathMinMax(Ee,J,ce);break;case o.OPS.lineTo:J=F[ge++],ce=F[ge++],X.lineTo(J,ce),Me||te.updatePathMinMax(Ee,J,ce);break;case o.OPS.curveTo:ue=J,Ae=ce,J=F[ge+4],ce=F[ge+5],X.bezierCurveTo(F[ge],F[ge+1],F[ge+2],F[ge+3],J,ce),te.updateCurvePathMinMax(Ee,ue,Ae,F[ge],F[ge+1],F[ge+2],F[ge+3],J,ce,je),ge+=6;break;case o.OPS.curveTo2:ue=J,Ae=ce,X.bezierCurveTo(J,ce,F[ge],F[ge+1],F[ge+2],F[ge+3]),te.updateCurvePathMinMax(Ee,ue,Ae,J,ce,F[ge],F[ge+1],F[ge+2],F[ge+3],je),J=F[ge+2],ce=F[ge+3],ge+=4;break;case o.OPS.curveTo3:ue=J,Ae=ce,J=F[ge+2],ce=F[ge+3],X.bezierCurveTo(F[ge],F[ge+1],J,ce,J,ce),te.updateCurvePathMinMax(Ee,ue,Ae,F[ge],F[ge+1],J,ce,J,ce,je),ge+=4;break;case o.OPS.closePath:X.closePath();break}Me&&te.updateScalingPathMinMax(Ee,je),te.setCurrentPoint(J,ce)}closePath(){this.ctx.closePath()}stroke(O=!0){const F=this.ctx,H=this.current.strokeColor;F.globalAlpha=this.current.strokeAlpha,this.contentVisible&&(typeof H=="object"&&(H!=null&&H.getPattern)?(F.save(),F.strokeStyle=H.getPattern(F,this,(0,s.getCurrentTransformInverse)(F),c.PathType.STROKE),this.rescaleAndStroke(!1),F.restore()):this.rescaleAndStroke(!0)),O&&this.consumePath(this.current.getClippedPathBoundingBox()),F.globalAlpha=this.current.fillAlpha}closeStroke(){this.closePath(),this.stroke()}fill(O=!0){const F=this.ctx,H=this.current.fillColor,X=this.current.patternFill;let te=!1;X&&(F.save(),F.fillStyle=H.getPattern(F,this,(0,s.getCurrentTransformInverse)(F),c.PathType.FILL),te=!0);const J=this.current.getClippedPathBoundingBox();this.contentVisible&&J!==null&&(this.pendingEOFill?(F.fill("evenodd"),this.pendingEOFill=!1):F.fill()),te&&F.restore(),O&&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=o.IDENTITY_MATRIX,this.current.textMatrixScale=1,this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}endText(){const O=this.pendingTextPaths,F=this.ctx;if(O===void 0){F.beginPath();return}F.save(),F.beginPath();for(const H of O)F.setTransform(...H.transform),F.translate(H.x,H.y),H.addToPath(F,H.fontSize);F.restore(),F.clip(),F.beginPath(),delete this.pendingTextPaths}setCharSpacing(O){this.current.charSpacing=O}setWordSpacing(O){this.current.wordSpacing=O}setHScale(O){this.current.textHScale=O/100}setLeading(O){this.current.leading=-O}setFont(O,F){var Ee;const H=this.commonObjs.get(O),X=this.current;if(!H)throw new Error(`Can't find font for ${O}`);if(X.fontMatrix=H.fontMatrix||o.FONT_IDENTITY_MATRIX,(X.fontMatrix[0]===0||X.fontMatrix[3]===0)&&(0,o.warn)("Invalid font matrix for font "+O),F<0?(F=-F,X.fontDirection=-1):X.fontDirection=1,this.current.font=H,this.current.fontSize=F,H.isType3Font)return;const te=H.loadedName||"sans-serif",J=((Ee=H.systemFontInfo)==null?void 0:Ee.css)||`"${te}", ${H.fallbackName}`;let ce="normal";H.black?ce="900":H.bold&&(ce="bold");const ue=H.italic?"italic":"normal";let Ae=F;F<p?Ae=p:F>m&&(Ae=m),this.current.fontSizeScale=F/Ae,this.ctx.font=`${ue} ${ce} ${Ae}px ${J}`}setTextRenderingMode(O){this.current.textRenderingMode=O}setTextRise(O){this.current.textRise=O}moveText(O,F){this.current.x=this.current.lineX+=O,this.current.y=this.current.lineY+=F}setLeadingMoveText(O,F){this.setLeading(-F),this.moveText(O,F)}setTextMatrix(O,F,H,X,te,J){this.current.textMatrix=[O,F,H,X,te,J],this.current.textMatrixScale=Math.hypot(O,F),this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}nextLine(){this.moveText(0,this.current.leading)}paintChar(O,F,H,X){const te=this.ctx,J=this.current,ce=J.font,ue=J.textRenderingMode,Ae=J.fontSize/J.fontSizeScale,Ee=ue&o.TextRenderingMode.FILL_STROKE_MASK,Me=!!(ue&o.TextRenderingMode.ADD_TO_PATH_FLAG),je=J.patternFill&&!ce.missingFile;let ke;(ce.disableFontFace||Me||je)&&(ke=ce.getPathGenerator(this.commonObjs,O)),ce.disableFontFace||je?(te.save(),te.translate(F,H),te.beginPath(),ke(te,Ae),X&&te.setTransform(...X),(Ee===o.TextRenderingMode.FILL||Ee===o.TextRenderingMode.FILL_STROKE)&&te.fill(),(Ee===o.TextRenderingMode.STROKE||Ee===o.TextRenderingMode.FILL_STROKE)&&te.stroke(),te.restore()):((Ee===o.TextRenderingMode.FILL||Ee===o.TextRenderingMode.FILL_STROKE)&&te.fillText(O,F,H),(Ee===o.TextRenderingMode.STROKE||Ee===o.TextRenderingMode.FILL_STROKE)&&te.strokeText(O,F,H)),Me&&(this.pendingTextPaths||(this.pendingTextPaths=[])).push({transform:(0,s.getCurrentTransform)(te),x:F,y:H,fontSize:Ae,addToPath:ke})}get isFontSubpixelAAEnabled(){const{context:O}=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10);O.scale(1.5,1),O.fillText("I",0,10);const F=O.getImageData(0,0,10,10).data;let H=!1;for(let X=3;X<F.length;X+=4)if(F[X]>0&&F[X]<255){H=!0;break}return(0,o.shadow)(this,"isFontSubpixelAAEnabled",H)}showText(O){const F=this.current,H=F.font;if(H.isType3Font)return this.showType3Text(O);const X=F.fontSize;if(X===0)return;const te=this.ctx,J=F.fontSizeScale,ce=F.charSpacing,ue=F.wordSpacing,Ae=F.fontDirection,Ee=F.textHScale*Ae,Me=O.length,je=H.vertical,ke=je?1:-1,ge=H.defaultVMetrics,oe=X*F.fontMatrix[0],G=F.textRenderingMode===o.TextRenderingMode.FILL&&!H.disableFontFace&&!F.patternFill;te.save(),te.transform(...F.textMatrix),te.translate(F.x,F.y+F.textRise),Ae>0?te.scale(Ee,-1):te.scale(Ee,1);let ee;if(F.patternFill){te.save();const se=F.fillColor.getPattern(te,this,(0,s.getCurrentTransformInverse)(te),c.PathType.FILL);ee=(0,s.getCurrentTransform)(te),te.restore(),te.fillStyle=se}let de=F.lineWidth;const pe=F.textMatrixScale;if(pe===0||de===0){const se=F.textRenderingMode&o.TextRenderingMode.FILL_STROKE_MASK;(se===o.TextRenderingMode.STROKE||se===o.TextRenderingMode.FILL_STROKE)&&(de=this.getSinglePixelWidth())}else de/=pe;if(J!==1&&(te.scale(J,J),de/=J),te.lineWidth=de,H.isInvalidPDFjsFont){const se=[];let re=0;for(const $e of O)se.push($e.unicode),re+=$e.width;te.fillText(se.join(""),0,0),F.x+=re*oe*Ee,te.restore(),this.compose();return}let ve=0,Te;for(Te=0;Te<Me;++Te){const se=O[Te];if(typeof se=="number"){ve+=ke*se*X/1e3;continue}let re=!1;const $e=(se.isSpace?ue:0)+ce,Le=se.fontChar,Xe=se.accent;let qe,at,We=se.width;if(je){const ct=se.vmetric||ge,st=-(se.vmetric?ct[1]:We*.5)*oe,De=ct[2]*oe;We=ct?-ct[0]:We,qe=st/J,at=(ve+De)/J}else qe=ve/J,at=0;if(H.remeasure&&We>0){const ct=te.measureText(Le).width*1e3/X*J;if(We<ct&&this.isFontSubpixelAAEnabled){const st=We/ct;re=!0,te.save(),te.scale(st,1),qe/=st}else We!==ct&&(qe+=(We-ct)/2e3*X/J)}if(this.contentVisible&&(se.isInFont||H.missingFile)){if(G&&!Xe)te.fillText(Le,qe,at);else if(this.paintChar(Le,qe,at,ee),Xe){const ct=qe+X*Xe.offset.x/J,st=at-X*Xe.offset.y/J;this.paintChar(Xe.fontChar,ct,st,ee)}}const Je=je?We*oe-$e*Ae:We*oe+$e*Ae;ve+=Je,re&&te.restore()}je?F.y-=ve:F.x+=ve*Ee,te.restore(),this.compose()}showType3Text(O){const F=this.ctx,H=this.current,X=H.font,te=H.fontSize,J=H.fontDirection,ce=X.vertical?1:-1,ue=H.charSpacing,Ae=H.wordSpacing,Ee=H.textHScale*J,Me=H.fontMatrix||o.FONT_IDENTITY_MATRIX,je=O.length,ke=H.textRenderingMode===o.TextRenderingMode.INVISIBLE;let ge,oe,G,ee;if(!(ke||te===0)){for(this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null,F.save(),F.transform(...H.textMatrix),F.translate(H.x,H.y),F.scale(Ee,J),ge=0;ge<je;++ge){if(oe=O[ge],typeof oe=="number"){ee=ce*oe*te/1e3,this.ctx.translate(ee,0),H.x+=ee*Ee;continue}const de=(oe.isSpace?Ae:0)+ue,pe=X.charProcOperatorList[oe.operatorListId];if(!pe){(0,o.warn)(`Type3 character "${oe.operatorListId}" is not available.`);continue}this.contentVisible&&(this.processingType3=oe,this.save(),F.scale(te,te),F.transform(...Me),this.executeOperatorList(pe),this.restore()),G=o.Util.applyTransform([oe.width,0],Me)[0]*te+de,F.translate(G,0),H.x+=G*Ee}F.restore(),this.processingType3=null}}setCharWidth(O,F){}setCharWidthAndBounds(O,F,H,X,te,J){this.ctx.rect(H,X,te-H,J-X),this.ctx.clip(),this.endPath()}getColorN_Pattern(O){let F;if(O[0]==="TilingPattern"){const H=O[1],X=this.baseTransform||(0,s.getCurrentTransform)(this.ctx),te={createCanvasGraphics:J=>new Y(J,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:this.optionalContentConfig,markedContentStack:this.markedContentStack})};F=new c.TilingPattern(O,H,this.ctx,te,X)}else F=this._getPattern(O[1],O[2]);return F}setStrokeColorN(){this.current.strokeColor=this.getColorN_Pattern(arguments)}setFillColorN(){this.current.fillColor=this.getColorN_Pattern(arguments),this.current.patternFill=!0}setStrokeRGBColor(O,F,H){const X=o.Util.makeHexColor(O,F,H);this.ctx.strokeStyle=X,this.current.strokeColor=X}setFillRGBColor(O,F,H){const X=o.Util.makeHexColor(O,F,H);this.ctx.fillStyle=X,this.current.fillColor=X,this.current.patternFill=!1}_getPattern(O,F=null){let H;return this.cachedPatterns.has(O)?H=this.cachedPatterns.get(O):(H=(0,c.getShadingPattern)(this.getObject(O)),this.cachedPatterns.set(O,H)),F&&(H.matrix=F),H}shadingFill(O){if(!this.contentVisible)return;const F=this.ctx;this.save();const H=this._getPattern(O);F.fillStyle=H.getPattern(F,this,(0,s.getCurrentTransformInverse)(F),c.PathType.SHADING);const X=(0,s.getCurrentTransformInverse)(F);if(X){const{width:te,height:J}=F.canvas,[ce,ue,Ae,Ee]=o.Util.getAxialAlignedBoundingBox([0,0,te,J],X);this.ctx.fillRect(ce,ue,Ae-ce,Ee-ue)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.compose(this.current.getClippedPathBoundingBox()),this.restore()}beginInlineImage(){(0,o.unreachable)("Should not call beginInlineImage")}beginImageData(){(0,o.unreachable)("Should not call beginImageData")}paintFormXObjectBegin(O,F){if(this.contentVisible&&(this.save(),this.baseTransformStack.push(this.baseTransform),Array.isArray(O)&&O.length===6&&this.transform(...O),this.baseTransform=(0,s.getCurrentTransform)(this.ctx),F)){const H=F[2]-F[0],X=F[3]-F[1];this.ctx.rect(F[0],F[1],H,X),this.current.updateRectMinMax((0,s.getCurrentTransform)(this.ctx),F),this.clip(),this.endPath()}}paintFormXObjectEnd(){this.contentVisible&&(this.restore(),this.baseTransform=this.baseTransformStack.pop())}beginGroup(O){if(!this.contentVisible)return;this.save(),this.inSMaskMode&&(this.endSMaskMode(),this.current.activeSMask=null);const F=this.ctx;O.isolated||(0,o.info)("TODO: Support non-isolated groups."),O.knockout&&(0,o.warn)("Knockout groups not supported.");const H=(0,s.getCurrentTransform)(F);if(O.matrix&&F.transform(...O.matrix),!O.bbox)throw new Error("Bounding box is required.");let X=o.Util.getAxialAlignedBoundingBox(O.bbox,(0,s.getCurrentTransform)(F));const te=[0,0,F.canvas.width,F.canvas.height];X=o.Util.intersect(X,te)||[0,0,0,0];const J=Math.floor(X[0]),ce=Math.floor(X[1]);let ue=Math.max(Math.ceil(X[2])-J,1),Ae=Math.max(Math.ceil(X[3])-ce,1),Ee=1,Me=1;ue>f&&(Ee=ue/f,ue=f),Ae>f&&(Me=Ae/f,Ae=f),this.current.startNewPathAndClipBox([0,0,ue,Ae]);let je="groupAt"+this.groupLevel;O.smask&&(je+="_smask_"+this.smaskCounter++%2);const ke=this.cachedCanvases.getCanvas(je,ue,Ae),ge=ke.context;ge.scale(1/Ee,1/Me),ge.translate(-J,-ce),ge.transform(...H),O.smask?this.smaskStack.push({canvas:ke.canvas,context:ge,offsetX:J,offsetY:ce,scaleX:Ee,scaleY:Me,subtype:O.smask.subtype,backdrop:O.smask.backdrop,transferMap:O.smask.transferMap||null,startTransformInverse:null}):(F.setTransform(1,0,0,1,0,0),F.translate(J,ce),F.scale(Ee,Me),F.save()),w(F,ge),this.ctx=ge,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(F),this.groupLevel++}endGroup(O){if(!this.contentVisible)return;this.groupLevel--;const F=this.ctx,H=this.groupStack.pop();if(this.ctx=H,this.ctx.imageSmoothingEnabled=!1,O.smask)this.tempSMask=this.smaskStack.pop(),this.restore();else{this.ctx.restore();const X=(0,s.getCurrentTransform)(this.ctx);this.restore(),this.ctx.save(),this.ctx.setTransform(...X);const te=o.Util.getAxialAlignedBoundingBox([0,0,F.canvas.width,F.canvas.height],X);this.ctx.drawImage(F.canvas,0,0),this.ctx.restore(),this.compose(te)}}beginAnnotation(O,F,H,X,te){if(me(this,K,hc).call(this),R(this.ctx),this.ctx.save(),this.save(),this.baseTransform&&this.ctx.setTransform(...this.baseTransform),Array.isArray(F)&&F.length===4){const J=F[2]-F[0],ce=F[3]-F[1];if(te&&this.annotationCanvasMap){H=H.slice(),H[4]-=F[0],H[5]-=F[1],F=F.slice(),F[0]=F[1]=0,F[2]=J,F[3]=ce;const[ue,Ae]=o.Util.singularValueDecompose2dScale((0,s.getCurrentTransform)(this.ctx)),{viewportScale:Ee}=this,Me=Math.ceil(J*this.outputScaleX*Ee),je=Math.ceil(ce*this.outputScaleY*Ee);this.annotationCanvas=this.canvasFactory.create(Me,je);const{canvas:ke,context:ge}=this.annotationCanvas;this.annotationCanvasMap.set(O,ke),this.annotationCanvas.savedCtx=this.ctx,this.ctx=ge,this.ctx.save(),this.ctx.setTransform(ue,0,0,-Ae,0,ce*Ae),R(this.ctx)}else R(this.ctx),this.ctx.rect(F[0],F[1],J,ce),this.ctx.clip(),this.endPath()}this.current=new T(this.ctx.canvas.width,this.ctx.canvas.height),this.transform(...H),this.transform(...X)}endAnnotation(){this.annotationCanvas&&(this.ctx.restore(),me(this,K,mc).call(this),this.ctx=this.annotationCanvas.savedCtx,delete this.annotationCanvas.savedCtx,delete this.annotationCanvas)}paintImageMaskXObject(O){if(!this.contentVisible)return;const F=O.count;O=this.getObject(O.data,O),O.count=F;const H=this.ctx,X=this.processingType3;if(X&&(X.compiled===void 0&&(X.compiled=C(O)),X.compiled)){X.compiled(H);return}const te=this._createMaskCanvas(O),J=te.canvas;H.save(),H.setTransform(1,0,0,1,0,0),H.drawImage(J,te.offsetX,te.offsetY),H.restore(),this.compose()}paintImageMaskXObjectRepeat(O,F,H=0,X=0,te,J){if(!this.contentVisible)return;O=this.getObject(O.data,O);const ce=this.ctx;ce.save();const ue=(0,s.getCurrentTransform)(ce);ce.transform(F,H,X,te,0,0);const Ae=this._createMaskCanvas(O);ce.setTransform(1,0,0,1,Ae.offsetX-ue[4],Ae.offsetY-ue[5]);for(let Ee=0,Me=J.length;Ee<Me;Ee+=2){const je=o.Util.transform(ue,[F,H,X,te,J[Ee],J[Ee+1]]),[ke,ge]=o.Util.applyTransform([0,0],je);ce.drawImage(Ae.canvas,ke,ge)}ce.restore(),this.compose()}paintImageMaskXObjectGroup(O){if(!this.contentVisible)return;const F=this.ctx,H=this.current.fillColor,X=this.current.patternFill;for(const te of O){const{data:J,width:ce,height:ue,transform:Ae}=te,Ee=this.cachedCanvases.getCanvas("maskCanvas",ce,ue),Me=Ee.context;Me.save();const je=this.getObject(J,te);D(Me,je),Me.globalCompositeOperation="source-in",Me.fillStyle=X?H.getPattern(Me,this,(0,s.getCurrentTransformInverse)(F),c.PathType.FILL):H,Me.fillRect(0,0,ce,ue),Me.restore(),F.save(),F.transform(...Ae),F.scale(1,-1),A(F,Ee.canvas,0,0,ce,ue,0,-1,1,1),F.restore()}this.compose()}paintImageXObject(O){if(!this.contentVisible)return;const F=this.getObject(O);if(!F){(0,o.warn)("Dependent image isn't ready yet");return}this.paintInlineImageXObject(F)}paintImageXObjectRepeat(O,F,H,X){if(!this.contentVisible)return;const te=this.getObject(O);if(!te){(0,o.warn)("Dependent image isn't ready yet");return}const J=te.width,ce=te.height,ue=[];for(let Ae=0,Ee=X.length;Ae<Ee;Ae+=2)ue.push({transform:[F,0,0,H,X[Ae],X[Ae+1]],x:0,y:0,w:J,h:ce});this.paintInlineImageXObjectGroup(te,ue)}applyTransferMapsToCanvas(O){return this.current.transferMaps!=="none"&&(O.filter=this.current.transferMaps,O.drawImage(O.canvas,0,0),O.filter="none"),O.canvas}applyTransferMapsToBitmap(O){if(this.current.transferMaps==="none")return O.bitmap;const{bitmap:F,width:H,height:X}=O,te=this.cachedCanvases.getCanvas("inlineImage",H,X),J=te.context;return J.filter=this.current.transferMaps,J.drawImage(F,0,0),J.filter="none",te.canvas}paintInlineImageXObject(O){if(!this.contentVisible)return;const F=O.width,H=O.height,X=this.ctx;if(this.save(),!o.isNodeJS){const{filter:ce}=X;ce!=="none"&&ce!==""&&(X.filter="none")}X.scale(1/F,-1/H);let te;if(O.bitmap)te=this.applyTransferMapsToBitmap(O);else if(typeof HTMLElement=="function"&&O instanceof HTMLElement||!O.data)te=O;else{const ue=this.cachedCanvases.getCanvas("inlineImage",F,H).context;k(ue,O),te=this.applyTransferMapsToCanvas(ue)}const J=this._scaleImage(te,(0,s.getCurrentTransformInverse)(X));X.imageSmoothingEnabled=I((0,s.getCurrentTransform)(X),O.interpolate),A(X,J.img,0,0,J.paintWidth,J.paintHeight,0,-H,F,H),this.compose(),this.restore()}paintInlineImageXObjectGroup(O,F){if(!this.contentVisible)return;const H=this.ctx;let X;if(O.bitmap)X=O.bitmap;else{const te=O.width,J=O.height,ue=this.cachedCanvases.getCanvas("inlineImage",te,J).context;k(ue,O),X=this.applyTransferMapsToCanvas(ue)}for(const te of F)H.save(),H.transform(...te.transform),H.scale(1,-1),A(H,X,te.x,te.y,te.w,te.h,0,-1,1,1),H.restore();this.compose()}paintSolidColorImageMask(){this.contentVisible&&(this.ctx.fillRect(0,0,1,1),this.compose())}markPoint(O){}markPointProps(O,F){}beginMarkedContent(O){this.markedContentStack.push({visible:!0})}beginMarkedContentProps(O,F){O==="OC"?this.markedContentStack.push({visible:this.optionalContentConfig.isVisible(F)}):this.markedContentStack.push({visible:!0}),this.contentVisible=this.isContentVisible()}endMarkedContent(){this.markedContentStack.pop(),this.contentVisible=this.isContentVisible()}beginCompat(){}endCompat(){}consumePath(O){const F=this.current.isEmptyClip();this.pendingClip&&this.current.updateClipFromPath(),this.pendingClip||this.compose(O);const H=this.ctx;this.pendingClip&&(F||(this.pendingClip===B?H.clip("evenodd"):H.clip()),this.pendingClip=null),this.current.startNewPathAndClipBox(this.current.clipBox),H.beginPath()}getSinglePixelWidth(){if(!this._cachedGetSinglePixelWidth){const O=(0,s.getCurrentTransform)(this.ctx);if(O[1]===0&&O[2]===0)this._cachedGetSinglePixelWidth=1/Math.min(Math.abs(O[0]),Math.abs(O[3]));else{const F=Math.abs(O[0]*O[3]-O[2]*O[1]),H=Math.hypot(O[0],O[2]),X=Math.hypot(O[1],O[3]);this._cachedGetSinglePixelWidth=Math.max(H,X)/F}}return this._cachedGetSinglePixelWidth}getScaleForStroking(){if(this._cachedScaleForStroking[0]===-1){const{lineWidth:O}=this.current,{a:F,b:H,c:X,d:te}=this.ctx.getTransform();let J,ce;if(H===0&&X===0){const ue=Math.abs(F),Ae=Math.abs(te);if(ue===Ae)if(O===0)J=ce=1/ue;else{const Ee=ue*O;J=ce=Ee<1?1/Ee:1}else if(O===0)J=1/ue,ce=1/Ae;else{const Ee=ue*O,Me=Ae*O;J=Ee<1?1/Ee:1,ce=Me<1?1/Me:1}}else{const ue=Math.abs(F*te-H*X),Ae=Math.hypot(F,H),Ee=Math.hypot(X,te);if(O===0)J=Ee/ue,ce=Ae/ue;else{const Me=O*ue;J=Ee>Me?Ee/Me:1,ce=Ae>Me?Ae/Me:1}}this._cachedScaleForStroking[0]=J,this._cachedScaleForStroking[1]=ce}return this._cachedScaleForStroking}rescaleAndStroke(O){const{ctx:F}=this,{lineWidth:H}=this.current,[X,te]=this.getScaleForStroking();if(F.lineWidth=H||1,X===1&&te===1){F.stroke();return}const J=F.getLineDash();if(O&&F.save(),F.scale(X,te),J.length>0){const ce=Math.max(X,te);F.setLineDash(J.map(ue=>ue/ce)),F.lineDashOffset/=ce}F.stroke(),O&&F.restore()}isContentVisible(){for(let O=this.markedContentStack.length-1;O>=0;O--)if(!this.markedContentStack[O].visible)return!1;return!0}};K=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 O=this.filterFactory.addHCMFilter(this.pageColors.foreground,this.pageColors.background);if(O!=="none"){const F=this.ctx.filter;this.ctx.filter=O,this.ctx.drawImage(this.ctx.canvas,0,0),this.ctx.filter=F}}};let q=Y;t.CanvasGraphics=q;for(const z in o.OPS)q.prototype[z]!==void 0&&(q.prototype[o.OPS[z]]=q.prototype[z])},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TilingPattern=t.PathType=void 0,t.getShadingPattern=x;var o=i(1),s=i(6);const c={FILL:"Fill",STROKE:"Stroke",SHADING:"Shading"};t.PathType=c;function d(C,T){if(!T)return;const k=T[2]-T[0],D=T[3]-T[1],w=new Path2D;w.rect(T[0],T[1],k,D),C.clip(w)}class p{constructor(){this.constructor===p&&(0,o.unreachable)("Cannot initialize BaseShadingPattern.")}getPattern(){(0,o.unreachable)("Abstract method `getPattern` called.")}}class m extends p{constructor(T){super(),this._type=T[1],this._bbox=T[2],this._colorStops=T[3],this._p0=T[4],this._p1=T[5],this._r0=T[6],this._r1=T[7],this.matrix=null}_createGradient(T){let k;this._type==="axial"?k=T.createLinearGradient(this._p0[0],this._p0[1],this._p1[0],this._p1[1]):this._type==="radial"&&(k=T.createRadialGradient(this._p0[0],this._p0[1],this._r0,this._p1[0],this._p1[1],this._r1));for(const D of this._colorStops)k.addColorStop(D[0],D[1]);return k}getPattern(T,k,D,w){let R;if(w===c.STROKE||w===c.FILL){const _=k.current.getClippedPathBoundingBox(w,(0,s.getCurrentTransform)(T))||[0,0,0,0],M=Math.ceil(_[2]-_[0])||1,N=Math.ceil(_[3]-_[1])||1,P=k.cachedCanvases.getCanvas("pattern",M,N,!0),L=P.context;L.clearRect(0,0,L.canvas.width,L.canvas.height),L.beginPath(),L.rect(0,0,L.canvas.width,L.canvas.height),L.translate(-_[0],-_[1]),D=o.Util.transform(D,[1,0,0,1,_[0],_[1]]),L.transform(...k.baseTransform),this.matrix&&L.transform(...this.matrix),d(L,this._bbox),L.fillStyle=this._createGradient(L),L.fill(),R=T.createPattern(P.canvas,"no-repeat");const I=new DOMMatrix(D);R.setTransform(I)}else d(T,this._bbox),R=this._createGradient(T);return R}}function f(C,T,k,D,w,R,_,M){const N=T.coords,P=T.colors,L=C.data,I=C.width*4;let W;N[k+1]>N[D+1]&&(W=k,k=D,D=W,W=R,R=_,_=W),N[D+1]>N[w+1]&&(W=D,D=w,w=W,W=_,_=M,M=W),N[k+1]>N[D+1]&&(W=k,k=D,D=W,W=R,R=_,_=W);const ae=(N[k]+T.offsetX)*T.scaleX,Q=(N[k+1]+T.offsetY)*T.scaleY,B=(N[D]+T.offsetX)*T.scaleX,q=(N[D+1]+T.offsetY)*T.scaleY,K=(N[w]+T.offsetX)*T.scaleX,U=(N[w+1]+T.offsetY)*T.scaleY;if(Q>=U)return;const $=P[R],Y=P[R+1],z=P[R+2],O=P[_],F=P[_+1],H=P[_+2],X=P[M],te=P[M+1],J=P[M+2],ce=Math.round(Q),ue=Math.round(U);let Ae,Ee,Me,je,ke,ge,oe,G;for(let ee=ce;ee<=ue;ee++){if(ee<q){const se=ee<Q?0:(Q-ee)/(Q-q);Ae=ae-(ae-B)*se,Ee=$-($-O)*se,Me=Y-(Y-F)*se,je=z-(z-H)*se}else{let se;ee>U?se=1:q===U?se=0:se=(q-ee)/(q-U),Ae=B-(B-K)*se,Ee=O-(O-X)*se,Me=F-(F-te)*se,je=H-(H-J)*se}let de;ee<Q?de=0:ee>U?de=1:de=(Q-ee)/(Q-U),ke=ae-(ae-K)*de,ge=$-($-X)*de,oe=Y-(Y-te)*de,G=z-(z-J)*de;const pe=Math.round(Math.min(Ae,ke)),ve=Math.round(Math.max(Ae,ke));let Te=I*ee+pe*4;for(let se=pe;se<=ve;se++)de=(Ae-se)/(Ae-ke),de<0?de=0:de>1&&(de=1),L[Te++]=Ee-(Ee-ge)*de|0,L[Te++]=Me-(Me-oe)*de|0,L[Te++]=je-(je-G)*de|0,L[Te++]=255}}function h(C,T,k){const D=T.coords,w=T.colors;let R,_;switch(T.type){case"lattice":const M=T.verticesPerRow,N=Math.floor(D.length/M)-1,P=M-1;for(R=0;R<N;R++){let L=R*M;for(let I=0;I<P;I++,L++)f(C,k,D[L],D[L+1],D[L+M],w[L],w[L+1],w[L+M]),f(C,k,D[L+M+1],D[L+1],D[L+M],w[L+M+1],w[L+1],w[L+M])}break;case"triangles":for(R=0,_=D.length;R<_;R+=3)f(C,k,D[R],D[R+1],D[R+2],w[R],w[R+1],w[R+2]);break;default:throw new Error("illegal figure")}}class v extends p{constructor(T){super(),this._coords=T[2],this._colors=T[3],this._figures=T[4],this._bounds=T[5],this._bbox=T[7],this._background=T[8],this.matrix=null}_createMeshCanvas(T,k,D){const M=Math.floor(this._bounds[0]),N=Math.floor(this._bounds[1]),P=Math.ceil(this._bounds[2])-M,L=Math.ceil(this._bounds[3])-N,I=Math.min(Math.ceil(Math.abs(P*T[0]*1.1)),3e3),W=Math.min(Math.ceil(Math.abs(L*T[1]*1.1)),3e3),ae=P/I,Q=L/W,B={coords:this._coords,colors:this._colors,offsetX:-M,offsetY:-N,scaleX:1/ae,scaleY:1/Q},q=I+2*2,K=W+2*2,U=D.getCanvas("mesh",q,K,!1),$=U.context,Y=$.createImageData(I,W);if(k){const O=Y.data;for(let F=0,H=O.length;F<H;F+=4)O[F]=k[0],O[F+1]=k[1],O[F+2]=k[2],O[F+3]=255}for(const O of this._figures)h(Y,O,B);return $.putImageData(Y,2,2),{canvas:U.canvas,offsetX:M-2*ae,offsetY:N-2*Q,scaleX:ae,scaleY:Q}}getPattern(T,k,D,w){d(T,this._bbox);let R;if(w===c.SHADING)R=o.Util.singularValueDecompose2dScale((0,s.getCurrentTransform)(T));else if(R=o.Util.singularValueDecompose2dScale(k.baseTransform),this.matrix){const M=o.Util.singularValueDecompose2dScale(this.matrix);R=[R[0]*M[0],R[1]*M[1]]}const _=this._createMeshCanvas(R,w===c.SHADING?null:this._background,k.cachedCanvases);return w!==c.SHADING&&(T.setTransform(...k.baseTransform),this.matrix&&T.transform(...this.matrix)),T.translate(_.offsetX,_.offsetY),T.scale(_.scaleX,_.scaleY),T.createPattern(_.canvas,"no-repeat")}}class y extends p{getPattern(){return"hotpink"}}function x(C){switch(C[0]){case"RadialAxial":return new m(C);case"Mesh":return new v(C);case"Dummy":return new y}throw new Error(`Unknown IR type: ${C[0]}`)}const b={COLORED:1,UNCOLORED:2},A=class A{constructor(T,k,D,w,R){this.operatorList=T[2],this.matrix=T[3]||[1,0,0,1,0,0],this.bbox=T[4],this.xstep=T[5],this.ystep=T[6],this.paintType=T[7],this.tilingType=T[8],this.color=k,this.ctx=D,this.canvasGraphicsFactory=w,this.baseTransform=R}createPatternCanvas(T){const k=this.operatorList,D=this.bbox,w=this.xstep,R=this.ystep,_=this.paintType,M=this.tilingType,N=this.color,P=this.canvasGraphicsFactory;(0,o.info)("TilingType: "+M);const L=D[0],I=D[1],W=D[2],ae=D[3],Q=o.Util.singularValueDecompose2dScale(this.matrix),B=o.Util.singularValueDecompose2dScale(this.baseTransform),q=[Q[0]*B[0],Q[1]*B[1]],K=this.getSizeAndScale(w,this.ctx.canvas.width,q[0]),U=this.getSizeAndScale(R,this.ctx.canvas.height,q[1]),$=T.cachedCanvases.getCanvas("pattern",K.size,U.size,!0),Y=$.context,z=P.createCanvasGraphics(Y);z.groupLevel=T.groupLevel,this.setFillAndStrokeStyleToContext(z,_,N);let O=L,F=I,H=W,X=ae;return L<0&&(O=0,H+=Math.abs(L)),I<0&&(F=0,X+=Math.abs(I)),Y.translate(-(K.scale*O),-(U.scale*F)),z.transform(K.scale,0,0,U.scale,0,0),Y.save(),this.clipBbox(z,O,F,H,X),z.baseTransform=(0,s.getCurrentTransform)(z.ctx),z.executeOperatorList(k),z.endDrawing(),{canvas:$.canvas,scaleX:K.scale,scaleY:U.scale,offsetX:O,offsetY:F}}getSizeAndScale(T,k,D){T=Math.abs(T);const w=Math.max(A.MAX_PATTERN_SIZE,k);let R=Math.ceil(T*D);return R>=w?R=w:D=R/T,{scale:D,size:R}}clipBbox(T,k,D,w,R){const _=w-k,M=R-D;T.ctx.rect(k,D,_,M),T.current.updateRectMinMax((0,s.getCurrentTransform)(T.ctx),[k,D,w,R]),T.clip(),T.endPath()}setFillAndStrokeStyleToContext(T,k,D){const w=T.ctx,R=T.current;switch(k){case b.COLORED:const _=this.ctx;w.fillStyle=_.fillStyle,w.strokeStyle=_.strokeStyle,R.fillColor=_.fillStyle,R.strokeColor=_.strokeStyle;break;case b.UNCOLORED:const M=o.Util.makeHexColor(D[0],D[1],D[2]);w.fillStyle=M,w.strokeStyle=M,R.fillColor=M,R.strokeColor=M;break;default:throw new o.FormatError(`Unsupported paint type: ${k}`)}}getPattern(T,k,D,w){let R=D;w!==c.SHADING&&(R=o.Util.transform(R,k.baseTransform),this.matrix&&(R=o.Util.transform(R,this.matrix)));const _=this.createPatternCanvas(k);let M=new DOMMatrix(R);M=M.translate(_.offsetX,_.offsetY),M=M.scale(1/_.scaleX,1/_.scaleY);const N=T.createPattern(_.canvas,"repeat");return N.setTransform(M),N}};Pt(A,"MAX_PATTERN_SIZE",3e3);let S=A;t.TilingPattern=S},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.convertBlackAndWhiteToRGBA=c,t.convertToRGBA=s,t.grayToRGBA=p;var o=i(1);function s(m){switch(m.kind){case o.ImageKind.GRAYSCALE_1BPP:return c(m);case o.ImageKind.RGB_24BPP:return d(m)}return null}function c({src:m,srcPos:f=0,dest:h,width:v,height:y,nonBlackColor:x=4294967295,inverseDecode:b=!1}){const S=o.FeatureTest.isLittleEndian?4278190080:255,[A,C]=b?[x,S]:[S,x],T=v>>3,k=v&7,D=m.length;h=new Uint32Array(h.buffer);let w=0;for(let R=0;R<y;R++){for(const M=f+T;f<M;f++){const N=f<D?m[f]:255;h[w++]=N&128?C:A,h[w++]=N&64?C:A,h[w++]=N&32?C:A,h[w++]=N&16?C:A,h[w++]=N&8?C:A,h[w++]=N&4?C:A,h[w++]=N&2?C:A,h[w++]=N&1?C:A}if(k===0)continue;const _=f<D?m[f++]:255;for(let M=0;M<k;M++)h[w++]=_&1<<7-M?C:A}return{srcPos:f,destPos:w}}function d({src:m,srcPos:f=0,dest:h,destPos:v=0,width:y,height:x}){let b=0;const S=m.length>>2,A=new Uint32Array(m.buffer,f,S);if(o.FeatureTest.isLittleEndian){for(;b<S-2;b+=3,v+=4){const C=A[b],T=A[b+1],k=A[b+2];h[v]=C|4278190080,h[v+1]=C>>>24|T<<8|4278190080,h[v+2]=T>>>16|k<<16|4278190080,h[v+3]=k>>>8|4278190080}for(let C=b*4,T=m.length;C<T;C+=3)h[v++]=m[C]|m[C+1]<<8|m[C+2]<<16|4278190080}else{for(;b<S-2;b+=3,v+=4){const C=A[b],T=A[b+1],k=A[b+2];h[v]=C|255,h[v+1]=C<<24|T>>>8|255,h[v+2]=T<<16|k>>>16|255,h[v+3]=k<<8|255}for(let C=b*4,T=m.length;C<T;C+=3)h[v++]=m[C]<<24|m[C+1]<<16|m[C+2]<<8|255}return{srcPos:f,destPos:v}}function p(m,f){if(o.FeatureTest.isLittleEndian)for(let h=0,v=m.length;h<v;h++)f[h]=m[h]*65793|4278190080;else for(let h=0,v=m.length;h<v;h++)f[h]=m[h]*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 m,_p,Rp,Fo;Object.defineProperty(t,"__esModule",{value:!0}),t.MessageHandler=void 0;var o=i(1);const s={DATA:1,ERROR:2},c={CANCEL:1,CANCEL_COMPLETE:2,CLOSE:3,ENQUEUE:4,ERROR:5,PULL:6,PULL_COMPLETE:7,START_COMPLETE:8};function d(y){switch(y instanceof Error||typeof y=="object"&&y!==null||(0,o.unreachable)('wrapReason: Expected "reason" to be a (possibly cloned) Error.'),y.name){case"AbortException":return new o.AbortException(y.message);case"MissingPDFException":return new o.MissingPDFException(y.message);case"PasswordException":return new o.PasswordException(y.message,y.code);case"UnexpectedResponseException":return new o.UnexpectedResponseException(y.message,y.status);case"UnknownErrorException":return new o.UnknownErrorException(y.message,y.details);default:return new o.UnknownErrorException(y.message,y.toString())}}class p{constructor(x,b,S){Se(this,m);this.sourceName=x,this.targetName=b,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=A=>{const C=A.data;if(C.targetName!==this.sourceName)return;if(C.stream){me(this,m,Rp).call(this,C);return}if(C.callback){const k=C.callbackId,D=this.callbackCapabilities[k];if(!D)throw new Error(`Cannot resolve callback ${k}`);if(delete this.callbackCapabilities[k],C.callback===s.DATA)D.resolve(C.data);else if(C.callback===s.ERROR)D.reject(d(C.reason));else throw new Error("Unexpected callback case");return}const T=this.actionHandler[C.action];if(!T)throw new Error(`Unknown action from worker: ${C.action}`);if(C.callbackId){const k=this.sourceName,D=C.sourceName;new Promise(function(w){w(T(C.data))}).then(function(w){S.postMessage({sourceName:k,targetName:D,callback:s.DATA,callbackId:C.callbackId,data:w})},function(w){S.postMessage({sourceName:k,targetName:D,callback:s.ERROR,callbackId:C.callbackId,reason:d(w)})});return}if(C.streamId){me(this,m,_p).call(this,C);return}T(C.data)},S.addEventListener("message",this._onComObjOnMessage)}on(x,b){const S=this.actionHandler;if(S[x])throw new Error(`There is already an actionName called "${x}"`);S[x]=b}send(x,b,S){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:x,data:b},S)}sendWithPromise(x,b,S){const A=this.callbackId++,C=new o.PromiseCapability;this.callbackCapabilities[A]=C;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:x,callbackId:A,data:b},S)}catch(T){C.reject(T)}return C.promise}sendWithStream(x,b,S,A){const C=this.streamId++,T=this.sourceName,k=this.targetName,D=this.comObj;return new ReadableStream({start:w=>{const R=new o.PromiseCapability;return this.streamControllers[C]={controller:w,startCall:R,pullCall:null,cancelCall:null,isClosed:!1},D.postMessage({sourceName:T,targetName:k,action:x,streamId:C,data:b,desiredSize:w.desiredSize},A),R.promise},pull:w=>{const R=new o.PromiseCapability;return this.streamControllers[C].pullCall=R,D.postMessage({sourceName:T,targetName:k,stream:c.PULL,streamId:C,desiredSize:w.desiredSize}),R.promise},cancel:w=>{(0,o.assert)(w instanceof Error,"cancel must have a valid reason");const R=new o.PromiseCapability;return this.streamControllers[C].cancelCall=R,this.streamControllers[C].isClosed=!0,D.postMessage({sourceName:T,targetName:k,stream:c.CANCEL,streamId:C,reason:d(w)}),R.promise}},S)}destroy(){this.comObj.removeEventListener("message",this._onComObjOnMessage)}}m=new WeakSet,_p=function(x){const b=x.streamId,S=this.sourceName,A=x.sourceName,C=this.comObj,T=this,k=this.actionHandler[x.action],D={enqueue(w,R=1,_){if(this.isCancelled)return;const M=this.desiredSize;this.desiredSize-=R,M>0&&this.desiredSize<=0&&(this.sinkCapability=new o.PromiseCapability,this.ready=this.sinkCapability.promise),C.postMessage({sourceName:S,targetName:A,stream:c.ENQUEUE,streamId:b,chunk:w},_)},close(){this.isCancelled||(this.isCancelled=!0,C.postMessage({sourceName:S,targetName:A,stream:c.CLOSE,streamId:b}),delete T.streamSinks[b])},error(w){(0,o.assert)(w instanceof Error,"error must have a valid reason"),!this.isCancelled&&(this.isCancelled=!0,C.postMessage({sourceName:S,targetName:A,stream:c.ERROR,streamId:b,reason:d(w)}))},sinkCapability:new o.PromiseCapability,onPull:null,onCancel:null,isCancelled:!1,desiredSize:x.desiredSize,ready:null};D.sinkCapability.resolve(),D.ready=D.sinkCapability.promise,this.streamSinks[b]=D,new Promise(function(w){w(k(x.data,D))}).then(function(){C.postMessage({sourceName:S,targetName:A,stream:c.START_COMPLETE,streamId:b,success:!0})},function(w){C.postMessage({sourceName:S,targetName:A,stream:c.START_COMPLETE,streamId:b,reason:d(w)})})},Rp=function(x){const b=x.streamId,S=this.sourceName,A=x.sourceName,C=this.comObj,T=this.streamControllers[b],k=this.streamSinks[b];switch(x.stream){case c.START_COMPLETE:x.success?T.startCall.resolve():T.startCall.reject(d(x.reason));break;case c.PULL_COMPLETE:x.success?T.pullCall.resolve():T.pullCall.reject(d(x.reason));break;case c.PULL:if(!k){C.postMessage({sourceName:S,targetName:A,stream:c.PULL_COMPLETE,streamId:b,success:!0});break}k.desiredSize<=0&&x.desiredSize>0&&k.sinkCapability.resolve(),k.desiredSize=x.desiredSize,new Promise(function(D){var w;D((w=k.onPull)==null?void 0:w.call(k))}).then(function(){C.postMessage({sourceName:S,targetName:A,stream:c.PULL_COMPLETE,streamId:b,success:!0})},function(D){C.postMessage({sourceName:S,targetName:A,stream:c.PULL_COMPLETE,streamId:b,reason:d(D)})});break;case c.ENQUEUE:if((0,o.assert)(T,"enqueue should have stream controller"),T.isClosed)break;T.controller.enqueue(x.chunk);break;case c.CLOSE:if((0,o.assert)(T,"close should have stream controller"),T.isClosed)break;T.isClosed=!0,T.controller.close(),me(this,m,Fo).call(this,T,b);break;case c.ERROR:(0,o.assert)(T,"error should have stream controller"),T.controller.error(d(x.reason)),me(this,m,Fo).call(this,T,b);break;case c.CANCEL_COMPLETE:x.success?T.cancelCall.resolve():T.cancelCall.reject(d(x.reason)),me(this,m,Fo).call(this,T,b);break;case c.CANCEL:if(!k)break;new Promise(function(D){var w;D((w=k.onCancel)==null?void 0:w.call(k,d(x.reason)))}).then(function(){C.postMessage({sourceName:S,targetName:A,stream:c.CANCEL_COMPLETE,streamId:b,success:!0})},function(D){C.postMessage({sourceName:S,targetName:A,stream:c.CANCEL_COMPLETE,streamId:b,reason:d(D)})}),k.sinkCapability.reject(d(x.reason)),k.isCancelled=!0,delete this.streamSinks[b];break;default:throw new Error("Unexpected stream case")}},Fo=async function(x,b){var S,A,C;await Promise.allSettled([(S=x.startCall)==null?void 0:S.promise,(A=x.pullCall)==null?void 0:A.promise,(C=x.cancelCall)==null?void 0:C.promise]),delete this.streamControllers[b]},t.MessageHandler=p},(e,t,i)=>{var c,d;Object.defineProperty(t,"__esModule",{value:!0}),t.Metadata=void 0;var o=i(1);class s{constructor({parsedData:m,rawData:f}){Se(this,c);Se(this,d);Ce(this,c,m),Ce(this,d,f)}getRaw(){return j(this,d)}get(m){return j(this,c).get(m)??null}getAll(){return(0,o.objectFromMap)(j(this,c))}has(m){return j(this,c).has(m)}}c=new WeakMap,d=new WeakMap,t.Metadata=s},(e,t,i)=>{var m,f,h,v,y,x,gc;Object.defineProperty(t,"__esModule",{value:!0}),t.OptionalContentConfig=void 0;var o=i(1),s=i(8);const c=Symbol("INTERNAL");class d{constructor(A,C){Se(this,m,!0);this.name=A,this.intent=C}get visible(){return j(this,m)}_setVisible(A,C){A!==c&&(0,o.unreachable)("Internal method `_setVisible` called."),Ce(this,m,C)}}m=new WeakMap;class p{constructor(A){Se(this,x);Se(this,f,null);Se(this,h,new Map);Se(this,v,null);Se(this,y,null);if(this.name=null,this.creator=null,A!==null){this.name=A.name,this.creator=A.creator,Ce(this,y,A.order);for(const C of A.groups)j(this,h).set(C.id,new d(C.name,C.intent));if(A.baseState==="OFF")for(const C of j(this,h).values())C._setVisible(c,!1);for(const C of A.on)j(this,h).get(C)._setVisible(c,!0);for(const C of A.off)j(this,h).get(C)._setVisible(c,!1);Ce(this,v,this.getHash())}}isVisible(A){if(j(this,h).size===0)return!0;if(!A)return(0,o.warn)("Optional content group not defined."),!0;if(A.type==="OCG")return j(this,h).has(A.id)?j(this,h).get(A.id).visible:((0,o.warn)(`Optional content group not found: ${A.id}`),!0);if(A.type==="OCMD"){if(A.expression)return me(this,x,gc).call(this,A.expression);if(!A.policy||A.policy==="AnyOn"){for(const C of A.ids){if(!j(this,h).has(C))return(0,o.warn)(`Optional content group not found: ${C}`),!0;if(j(this,h).get(C).visible)return!0}return!1}else if(A.policy==="AllOn"){for(const C of A.ids){if(!j(this,h).has(C))return(0,o.warn)(`Optional content group not found: ${C}`),!0;if(!j(this,h).get(C).visible)return!1}return!0}else if(A.policy==="AnyOff"){for(const C of A.ids){if(!j(this,h).has(C))return(0,o.warn)(`Optional content group not found: ${C}`),!0;if(!j(this,h).get(C).visible)return!0}return!1}else if(A.policy==="AllOff"){for(const C of A.ids){if(!j(this,h).has(C))return(0,o.warn)(`Optional content group not found: ${C}`),!0;if(j(this,h).get(C).visible)return!1}return!0}return(0,o.warn)(`Unknown optional content policy ${A.policy}.`),!0}return(0,o.warn)(`Unknown group type ${A.type}.`),!0}setVisibility(A,C=!0){if(!j(this,h).has(A)){(0,o.warn)(`Optional content group not found: ${A}`);return}j(this,h).get(A)._setVisible(c,!!C),Ce(this,f,null)}get hasInitialVisibility(){return j(this,v)===null||this.getHash()===j(this,v)}getOrder(){return j(this,h).size?j(this,y)?j(this,y).slice():[...j(this,h).keys()]:null}getGroups(){return j(this,h).size>0?(0,o.objectFromMap)(j(this,h)):null}getGroup(A){return j(this,h).get(A)||null}getHash(){if(j(this,f)!==null)return j(this,f);const A=new s.MurmurHash3_64;for(const[C,T]of j(this,h))A.update(`${C}:${T.visible}`);return Ce(this,f,A.hexdigest())}}f=new WeakMap,h=new WeakMap,v=new WeakMap,y=new WeakMap,x=new WeakSet,gc=function(A){const C=A.length;if(C<2)return!0;const T=A[0];for(let k=1;k<C;k++){const D=A[k];let w;if(Array.isArray(D))w=me(this,x,gc).call(this,D);else if(j(this,h).has(D))w=j(this,h).get(D).visible;else return(0,o.warn)(`Optional content group not found: ${D}`),!0;switch(T){case"And":if(!w)return!1;break;case"Or":if(w)return!0;break;case"Not":return!w;default:return!0}}return T==="And"},t.OptionalContentConfig=p},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PDFDataTransportStream=void 0;var o=i(1),s=i(6);class c{constructor({length:f,initialData:h,progressiveDone:v=!1,contentDispositionFilename:y=null,disableRange:x=!1,disableStream:b=!1},S){if((0,o.assert)(S,'PDFDataTransportStream - missing required "pdfDataRangeTransport" argument.'),this._queuedChunks=[],this._progressiveDone=v,this._contentDispositionFilename=y,(h==null?void 0:h.length)>0){const A=h instanceof Uint8Array&&h.byteLength===h.buffer.byteLength?h.buffer:new Uint8Array(h).buffer;this._queuedChunks.push(A)}this._pdfDataRangeTransport=S,this._isStreamingSupported=!b,this._isRangeSupported=!x,this._contentLength=f,this._fullRequestReader=null,this._rangeReaders=[],this._pdfDataRangeTransport.addRangeListener((A,C)=>{this._onReceiveData({begin:A,chunk:C})}),this._pdfDataRangeTransport.addProgressListener((A,C)=>{this._onProgress({loaded:A,total:C})}),this._pdfDataRangeTransport.addProgressiveReadListener(A=>{this._onReceiveData({chunk:A})}),this._pdfDataRangeTransport.addProgressiveDoneListener(()=>{this._onProgressiveDone()}),this._pdfDataRangeTransport.transportReady()}_onReceiveData({begin:f,chunk:h}){const v=h instanceof Uint8Array&&h.byteLength===h.buffer.byteLength?h.buffer:new Uint8Array(h).buffer;if(f===void 0)this._fullRequestReader?this._fullRequestReader._enqueue(v):this._queuedChunks.push(v);else{const y=this._rangeReaders.some(function(x){return x._begin!==f?!1:(x._enqueue(v),!0)});(0,o.assert)(y,"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}}get _progressiveDataLength(){var f;return((f=this._fullRequestReader)==null?void 0:f._loaded)??0}_onProgress(f){var h,v,y,x;f.total===void 0?(v=(h=this._rangeReaders[0])==null?void 0:h.onProgress)==null||v.call(h,{loaded:f.loaded}):(x=(y=this._fullRequestReader)==null?void 0:y.onProgress)==null||x.call(y,{loaded:f.loaded,total:f.total})}_onProgressiveDone(){var f;(f=this._fullRequestReader)==null||f.progressiveDone(),this._progressiveDone=!0}_removeRangeReader(f){const h=this._rangeReaders.indexOf(f);h>=0&&this._rangeReaders.splice(h,1)}getFullReader(){(0,o.assert)(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");const f=this._queuedChunks;return this._queuedChunks=null,new d(this,f,this._progressiveDone,this._contentDispositionFilename)}getRangeReader(f,h){if(h<=this._progressiveDataLength)return null;const v=new p(this,f,h);return this._pdfDataRangeTransport.requestDataRange(f,h),this._rangeReaders.push(v),v}cancelAllRequests(f){var h;(h=this._fullRequestReader)==null||h.cancel(f);for(const v of this._rangeReaders.slice(0))v.cancel(f);this._pdfDataRangeTransport.abort()}}t.PDFDataTransportStream=c;class d{constructor(f,h,v=!1,y=null){this._stream=f,this._done=v||!1,this._filename=(0,s.isPdfFile)(y)?y:null,this._queuedChunks=h||[],this._loaded=0;for(const x of this._queuedChunks)this._loaded+=x.byteLength;this._requests=[],this._headersReady=Promise.resolve(),f._fullRequestReader=this,this.onProgress=null}_enqueue(f){this._done||(this._requests.length>0?this._requests.shift().resolve({value:f,done:!1}):this._queuedChunks.push(f),this._loaded+=f.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 f=new o.PromiseCapability;return this._requests.push(f),f.promise}cancel(f){this._done=!0;for(const h of this._requests)h.resolve({value:void 0,done:!0});this._requests.length=0}progressiveDone(){this._done||(this._done=!0)}}class p{constructor(f,h,v){this._stream=f,this._begin=h,this._end=v,this._queuedChunk=null,this._requests=[],this._done=!1,this.onProgress=null}_enqueue(f){if(!this._done){if(this._requests.length===0)this._queuedChunk=f;else{this._requests.shift().resolve({value:f,done:!1});for(const v of this._requests)v.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 h=this._queuedChunk;return this._queuedChunk=null,{value:h,done:!1}}if(this._done)return{value:void 0,done:!0};const f=new o.PromiseCapability;return this._requests.push(f),f.promise}cancel(f){this._done=!0;for(const h of this._requests)h.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 o=i(1),s=i(20);function c(v,y,x){return{method:"GET",headers:v,signal:x.signal,mode:"cors",credentials:y?"include":"same-origin",redirect:"follow"}}function d(v){const y=new Headers;for(const x in v){const b=v[x];b!==void 0&&y.append(x,b)}return y}function p(v){return v instanceof Uint8Array?v.buffer:v instanceof ArrayBuffer?v:((0,o.warn)(`getArrayBuffer - unexpected data format: ${v}`),new Uint8Array(v).buffer)}class m{constructor(y){this.source=y,this.isHttp=/^https?:/i.test(y.url),this.httpHeaders=this.isHttp&&y.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){var y;return((y=this._fullRequestReader)==null?void 0:y._loaded)??0}getFullReader(){return(0,o.assert)(!this._fullRequestReader,"PDFFetchStream.getFullReader can only be called once."),this._fullRequestReader=new f(this),this._fullRequestReader}getRangeReader(y,x){if(x<=this._progressiveDataLength)return null;const b=new h(this,y,x);return this._rangeRequestReaders.push(b),b}cancelAllRequests(y){var x;(x=this._fullRequestReader)==null||x.cancel(y);for(const b of this._rangeRequestReaders.slice(0))b.cancel(y)}}t.PDFFetchStream=m;class f{constructor(y){this._stream=y,this._reader=null,this._loaded=0,this._filename=null;const x=y.source;this._withCredentials=x.withCredentials||!1,this._contentLength=x.length,this._headersCapability=new o.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=d(this._stream.httpHeaders);const b=x.url;fetch(b,c(this._headers,this._withCredentials,this._abortController)).then(S=>{if(!(0,s.validateResponseStatus)(S.status))throw(0,s.createResponseStatusError)(S.status,b);this._reader=S.body.getReader(),this._headersCapability.resolve();const A=k=>S.headers.get(k),{allowRangeRequests:C,suggestedLength:T}=(0,s.validateRangeRequestCapabilities)({getResponseHeader:A,isHttp:this._stream.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=C,this._contentLength=T||this._contentLength,this._filename=(0,s.extractFilenameFromHeader)(A),!this._isStreamingSupported&&this._isRangeSupported&&this.cancel(new o.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 b;await this._headersCapability.promise;const{value:y,done:x}=await this._reader.read();return x?{value:y,done:x}:(this._loaded+=y.byteLength,(b=this.onProgress)==null||b.call(this,{loaded:this._loaded,total:this._contentLength}),{value:p(y),done:!1})}cancel(y){var x;(x=this._reader)==null||x.cancel(y),this._abortController.abort()}}class h{constructor(y,x,b){this._stream=y,this._reader=null,this._loaded=0;const S=y.source;this._withCredentials=S.withCredentials||!1,this._readCapability=new o.PromiseCapability,this._isStreamingSupported=!S.disableStream,this._abortController=new AbortController,this._headers=d(this._stream.httpHeaders),this._headers.append("Range",`bytes=${x}-${b-1}`);const A=S.url;fetch(A,c(this._headers,this._withCredentials,this._abortController)).then(C=>{if(!(0,s.validateResponseStatus)(C.status))throw(0,s.createResponseStatusError)(C.status,A);this._readCapability.resolve(),this._reader=C.body.getReader()}).catch(this._readCapability.reject),this.onProgress=null}get isStreamingSupported(){return this._isStreamingSupported}async read(){var b;await this._readCapability.promise;const{value:y,done:x}=await this._reader.read();return x?{value:y,done:x}:(this._loaded+=y.byteLength,(b=this.onProgress)==null||b.call(this,{loaded:this._loaded}),{value:p(y),done:!1})}cancel(y){var x;(x=this._reader)==null||x.cancel(y),this._abortController.abort()}}},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createResponseStatusError=m,t.extractFilenameFromHeader=p,t.validateRangeRequestCapabilities=d,t.validateResponseStatus=f;var o=i(1),s=i(21),c=i(6);function d({getResponseHeader:h,isHttp:v,rangeChunkSize:y,disableRange:x}){const b={allowRangeRequests:!1,suggestedLength:void 0},S=parseInt(h("Content-Length"),10);return!Number.isInteger(S)||(b.suggestedLength=S,S<=2*y)||x||!v||h("Accept-Ranges")!=="bytes"||(h("Content-Encoding")||"identity")!=="identity"||(b.allowRangeRequests=!0),b}function p(h){const v=h("Content-Disposition");if(v){let y=(0,s.getFilenameFromContentDispositionHeader)(v);if(y.includes("%"))try{y=decodeURIComponent(y)}catch{}if((0,c.isPdfFile)(y))return y}return null}function m(h,v){return h===404||h===0&&v.startsWith("file:")?new o.MissingPDFException('Missing PDF "'+v+'".'):new o.UnexpectedResponseException(`Unexpected server response (${h}) while retrieving PDF "${v}".`,h)}function f(h){return h===200||h===206}},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getFilenameFromContentDispositionHeader=s;var o=i(1);function s(c){let d=!0,p=m("filename\\*","i").exec(c);if(p){p=p[1];let S=y(p);return S=unescape(S),S=x(S),S=b(S),h(S)}if(p=v(c),p){const S=b(p);return h(S)}if(p=m("filename","i").exec(c),p){p=p[1];let S=y(p);return S=b(S),h(S)}function m(S,A){return new RegExp("(?:^|;)\\s*"+S+'\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)',A)}function f(S,A){if(S){if(!/^[\x00-\xFF]+$/.test(A))return A;try{const C=new TextDecoder(S,{fatal:!0}),T=(0,o.stringToBytes)(A);A=C.decode(T),d=!1}catch{}}return A}function h(S){return d&&/[\x80-\xff]/.test(S)&&(S=f("utf-8",S),d&&(S=f("iso-8859-1",S))),S}function v(S){const A=[];let C;const T=m("filename\\*((?!0\\d)\\d+)(\\*?)","ig");for(;(C=T.exec(S))!==null;){let[,D,w,R]=C;if(D=parseInt(D,10),D in A){if(D===0)break;continue}A[D]=[w,R]}const k=[];for(let D=0;D<A.length&&D in A;++D){let[w,R]=A[D];R=y(R),w&&(R=unescape(R),D===0&&(R=x(R))),k.push(R)}return k.join("")}function y(S){if(S.startsWith('"')){const A=S.slice(1).split('\\"');for(let C=0;C<A.length;++C){const T=A[C].indexOf('"');T!==-1&&(A[C]=A[C].slice(0,T),A.length=C+1),A[C]=A[C].replaceAll(/\\(.)/g,"$1")}S=A.join('"')}return S}function x(S){const A=S.indexOf("'");if(A===-1)return S;const C=S.slice(0,A),k=S.slice(A+1).replace(/^[^']*'/,"");return f(C,k)}function b(S){return!S.startsWith("=?")||/[\x00-\x19\x80-\xff]/.test(S)?S:S.replaceAll(/=\?([\w-]*)\?([QqBb])\?((?:[^?]|\?(?!=))*)\?=/g,function(A,C,T,k){if(T==="q"||T==="Q")return k=k.replaceAll("_"," "),k=k.replaceAll(/=([0-9a-fA-F]{2})/g,function(D,w){return String.fromCharCode(parseInt(w,16))}),f(C,k);try{k=atob(k)}catch{}return f(C,k)})}return""}},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PDFNetworkStream=void 0;var o=i(1),s=i(20);const c=200,d=206;function p(y){const x=y.response;return typeof x!="string"?x:(0,o.stringToBytes)(x).buffer}class m{constructor(x,b={}){this.url=x,this.isHttp=/^https?:/i.test(x),this.httpHeaders=this.isHttp&&b.httpHeaders||Object.create(null),this.withCredentials=b.withCredentials||!1,this.currXhrId=0,this.pendingRequests=Object.create(null)}requestRange(x,b,S){const A={begin:x,end:b};for(const C in S)A[C]=S[C];return this.request(A)}requestFull(x){return this.request(x)}request(x){const b=new XMLHttpRequest,S=this.currXhrId++,A=this.pendingRequests[S]={xhr:b};b.open("GET",this.url),b.withCredentials=this.withCredentials;for(const C in this.httpHeaders){const T=this.httpHeaders[C];T!==void 0&&b.setRequestHeader(C,T)}return this.isHttp&&"begin"in x&&"end"in x?(b.setRequestHeader("Range",`bytes=${x.begin}-${x.end-1}`),A.expectedStatus=d):A.expectedStatus=c,b.responseType="arraybuffer",x.onError&&(b.onerror=function(C){x.onError(b.status)}),b.onreadystatechange=this.onStateChange.bind(this,S),b.onprogress=this.onProgress.bind(this,S),A.onHeadersReceived=x.onHeadersReceived,A.onDone=x.onDone,A.onError=x.onError,A.onProgress=x.onProgress,b.send(null),S}onProgress(x,b){var A;const S=this.pendingRequests[x];S&&((A=S.onProgress)==null||A.call(S,b))}onStateChange(x,b){var D,w,R;const S=this.pendingRequests[x];if(!S)return;const A=S.xhr;if(A.readyState>=2&&S.onHeadersReceived&&(S.onHeadersReceived(),delete S.onHeadersReceived),A.readyState!==4||!(x in this.pendingRequests))return;if(delete this.pendingRequests[x],A.status===0&&this.isHttp){(D=S.onError)==null||D.call(S,A.status);return}const C=A.status||c;if(!(C===c&&S.expectedStatus===d)&&C!==S.expectedStatus){(w=S.onError)==null||w.call(S,A.status);return}const k=p(A);if(C===d){const _=A.getResponseHeader("Content-Range"),M=/bytes (\d+)-(\d+)\/(\d+)/.exec(_);S.onDone({begin:parseInt(M[1],10),chunk:k})}else k?S.onDone({begin:0,chunk:k}):(R=S.onError)==null||R.call(S,A.status)}getRequestXhr(x){return this.pendingRequests[x].xhr}isPendingRequest(x){return x in this.pendingRequests}abortRequest(x){const b=this.pendingRequests[x].xhr;delete this.pendingRequests[x],b.abort()}}class f{constructor(x){this._source=x,this._manager=new m(x.url,{httpHeaders:x.httpHeaders,withCredentials:x.withCredentials}),this._rangeChunkSize=x.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}_onRangeRequestReaderClosed(x){const b=this._rangeRequestReaders.indexOf(x);b>=0&&this._rangeRequestReaders.splice(b,1)}getFullReader(){return(0,o.assert)(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once."),this._fullRequestReader=new h(this._manager,this._source),this._fullRequestReader}getRangeReader(x,b){const S=new v(this._manager,x,b);return S.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(S),S}cancelAllRequests(x){var b;(b=this._fullRequestReader)==null||b.cancel(x);for(const S of this._rangeRequestReaders.slice(0))S.cancel(x)}}t.PDFNetworkStream=f;class h{constructor(x,b){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=b.url,this._fullRequestId=x.requestFull(S),this._headersReceivedCapability=new o.PromiseCapability,this._disableRange=b.disableRange||!1,this._contentLength=b.length,this._rangeChunkSize=b.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,b=this._manager.getRequestXhr(x),S=T=>b.getResponseHeader(T),{allowRangeRequests:A,suggestedLength:C}=(0,s.validateRangeRequestCapabilities)({getResponseHeader:S,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});A&&(this._isRangeSupported=!0),this._contentLength=C||this._contentLength,this._filename=(0,s.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 b of this._requests)b.resolve({value:void 0,done:!0});this._requests.length=0}}_onError(x){this._storedError=(0,s.createResponseStatusError)(x,this._url),this._headersReceivedCapability.reject(this._storedError);for(const b of this._requests)b.reject(this._storedError);this._requests.length=0,this._cachedChunks.length=0}_onProgress(x){var b;(b=this.onProgress)==null||b.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 o.PromiseCapability;return this._requests.push(x),x.promise}cancel(x){this._done=!0,this._headersReceivedCapability.reject(x);for(const b of this._requests)b.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId),this._fullRequestReader=null}}class v{constructor(x,b,S){this._manager=x;const A={onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=x.url,this._requestId=x.requestRange(b,S,A),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 b=x.chunk;this._requests.length>0?this._requests.shift().resolve({value:b,done:!1}):this._queuedChunk=b,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,s.createResponseStatusError)(x,this._url);for(const b of this._requests)b.reject(this._storedError);this._requests.length=0,this._queuedChunk=null}_onProgress(x){var b;this.isStreamingSupported||(b=this.onProgress)==null||b.call(this,{loaded:x.loaded})}get isStreamingSupported(){return!1}async read(){if(this._storedError)throw this._storedError;if(this._queuedChunk!==null){const b=this._queuedChunk;return this._queuedChunk=null,{value:b,done:!1}}if(this._done)return{value:void 0,done:!0};const x=new o.PromiseCapability;return this._requests.push(x),x.promise}cancel(x){this._done=!0;for(const b of this._requests)b.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 o=i(1),s=i(20);const c=/^file:\/\/\/[a-zA-Z]:\//;function d(S){const A=require$$5,C=A.parse(S);return C.protocol==="file:"||C.host?C:/^[a-z]:[/\\]/i.test(S)?A.parse(`file:///${S}`):(C.host||(C.protocol="file:"),C)}class p{constructor(A){this.source=A,this.url=d(A.url),this.isHttp=this.url.protocol==="http:"||this.url.protocol==="https:",this.isFsUrl=this.url.protocol==="file:",this.httpHeaders=this.isHttp&&A.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){var A;return((A=this._fullRequestReader)==null?void 0:A._loaded)??0}getFullReader(){return(0,o.assert)(!this._fullRequestReader,"PDFNodeStream.getFullReader can only be called once."),this._fullRequestReader=this.isFsUrl?new x(this):new v(this),this._fullRequestReader}getRangeReader(A,C){if(C<=this._progressiveDataLength)return null;const T=this.isFsUrl?new b(this,A,C):new y(this,A,C);return this._rangeRequestReaders.push(T),T}cancelAllRequests(A){var C;(C=this._fullRequestReader)==null||C.cancel(A);for(const T of this._rangeRequestReaders.slice(0))T.cancel(A)}}t.PDFNodeStream=p;class m{constructor(A){this._url=A.url,this._done=!1,this._storedError=null,this.onProgress=null;const C=A.source;this._contentLength=C.length,this._loaded=0,this._filename=null,this._disableRange=C.disableRange||!1,this._rangeChunkSize=C.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._isStreamingSupported=!C.disableStream,this._isRangeSupported=!C.disableRange,this._readableStream=null,this._readCapability=new o.PromiseCapability,this._headersCapability=new o.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 T;if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const A=this._readableStream.read();return A===null?(this._readCapability=new o.PromiseCapability,this.read()):(this._loaded+=A.length,(T=this.onProgress)==null||T.call(this,{loaded:this._loaded,total:this._contentLength}),{value:new Uint8Array(A).buffer,done:!1})}cancel(A){if(!this._readableStream){this._error(A);return}this._readableStream.destroy(A)}_error(A){this._storedError=A,this._readCapability.resolve()}_setReadableStream(A){this._readableStream=A,A.on("readable",()=>{this._readCapability.resolve()}),A.on("end",()=>{A.destroy(),this._done=!0,this._readCapability.resolve()}),A.on("error",C=>{this._error(C)}),!this._isStreamingSupported&&this._isRangeSupported&&this._error(new o.AbortException("streaming is disabled")),this._storedError&&this._readableStream.destroy(this._storedError)}}class f{constructor(A){this._url=A.url,this._done=!1,this._storedError=null,this.onProgress=null,this._loaded=0,this._readableStream=null,this._readCapability=new o.PromiseCapability;const C=A.source;this._isStreamingSupported=!C.disableStream}get isStreamingSupported(){return this._isStreamingSupported}async read(){var T;if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const A=this._readableStream.read();return A===null?(this._readCapability=new o.PromiseCapability,this.read()):(this._loaded+=A.length,(T=this.onProgress)==null||T.call(this,{loaded:this._loaded}),{value:new Uint8Array(A).buffer,done:!1})}cancel(A){if(!this._readableStream){this._error(A);return}this._readableStream.destroy(A)}_error(A){this._storedError=A,this._readCapability.resolve()}_setReadableStream(A){this._readableStream=A,A.on("readable",()=>{this._readCapability.resolve()}),A.on("end",()=>{A.destroy(),this._done=!0,this._readCapability.resolve()}),A.on("error",C=>{this._error(C)}),this._storedError&&this._readableStream.destroy(this._storedError)}}function h(S,A){return{protocol:S.protocol,auth:S.auth,host:S.hostname,port:S.port,path:S.path,method:"GET",headers:A}}class v extends m{constructor(A){super(A);const C=T=>{if(T.statusCode===404){const R=new o.MissingPDFException(`Missing PDF "${this._url}".`);this._storedError=R,this._headersCapability.reject(R);return}this._headersCapability.resolve(),this._setReadableStream(T);const k=R=>this._readableStream.headers[R.toLowerCase()],{allowRangeRequests:D,suggestedLength:w}=(0,s.validateRangeRequestCapabilities)({getResponseHeader:k,isHttp:A.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=D,this._contentLength=w||this._contentLength,this._filename=(0,s.extractFilenameFromHeader)(k)};if(this._request=null,this._url.protocol==="http:"){const T=require$$5;this._request=T.request(h(this._url,A.httpHeaders),C)}else{const T=require$$5;this._request=T.request(h(this._url,A.httpHeaders),C)}this._request.on("error",T=>{this._storedError=T,this._headersCapability.reject(T)}),this._request.end()}}class y extends f{constructor(A,C,T){super(A),this._httpHeaders={};for(const D in A.httpHeaders){const w=A.httpHeaders[D];w!==void 0&&(this._httpHeaders[D]=w)}this._httpHeaders.Range=`bytes=${C}-${T-1}`;const k=D=>{if(D.statusCode===404){const w=new o.MissingPDFException(`Missing PDF "${this._url}".`);this._storedError=w;return}this._setReadableStream(D)};if(this._request=null,this._url.protocol==="http:"){const D=require$$5;this._request=D.request(h(this._url,this._httpHeaders),k)}else{const D=require$$5;this._request=D.request(h(this._url,this._httpHeaders),k)}this._request.on("error",D=>{this._storedError=D}),this._request.end()}}class x extends m{constructor(A){super(A);let C=decodeURIComponent(this._url.path);c.test(this._url.href)&&(C=C.replace(/^\//,""));const T=require$$5;T.lstat(C,(k,D)=>{if(k){k.code==="ENOENT"&&(k=new o.MissingPDFException(`Missing PDF "${C}".`)),this._storedError=k,this._headersCapability.reject(k);return}this._contentLength=D.size,this._setReadableStream(T.createReadStream(C)),this._headersCapability.resolve()})}}class b extends f{constructor(A,C,T){super(A);let k=decodeURIComponent(this._url.path);c.test(this._url.href)&&(k=k.replace(/^\//,""));const D=require$$5;this._setReadableStream(D.createReadStream(k,{start:C,end:T-1}))}}},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SVGGraphics=void 0;var o=i(6),s=i(1);const c={fontStyle:"normal",fontWeight:"normal",fillColor:"#000000"},d="http://www.w3.org/XML/1998/namespace",p="http://www.w3.org/1999/xlink",m=["butt","round","square"],f=["miter","round","bevel"],h=function(D,w="",R=!1){if(URL.createObjectURL&&typeof Blob<"u"&&!R)return URL.createObjectURL(new Blob([D],{type:w}));const _="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";let M=`data:${w};base64,`;for(let N=0,P=D.length;N<P;N+=3){const L=D[N]&255,I=D[N+1]&255,W=D[N+2]&255,ae=L>>2,Q=(L&3)<<4|I>>4,B=N+1<P?(I&15)<<2|W>>6:64,q=N+2<P?W&63:64;M+=_[ae]+_[Q]+_[B]+_[q]}return M},v=function(){const D=new Uint8Array([137,80,78,71,13,10,26,10]),w=12,R=new Int32Array(256);for(let W=0;W<256;W++){let ae=W;for(let Q=0;Q<8;Q++)ae=ae&1?3988292384^ae>>1&2147483647:ae>>1&2147483647;R[W]=ae}function _(W,ae,Q){let B=-1;for(let q=ae;q<Q;q++){const K=(B^W[q])&255,U=R[K];B=B>>>8^U}return B^-1}function M(W,ae,Q,B){let q=B;const K=ae.length;Q[q]=K>>24&255,Q[q+1]=K>>16&255,Q[q+2]=K>>8&255,Q[q+3]=K&255,q+=4,Q[q]=W.charCodeAt(0)&255,Q[q+1]=W.charCodeAt(1)&255,Q[q+2]=W.charCodeAt(2)&255,Q[q+3]=W.charCodeAt(3)&255,q+=4,Q.set(ae,q),q+=ae.length;const U=_(Q,B+4,q);Q[q]=U>>24&255,Q[q+1]=U>>16&255,Q[q+2]=U>>8&255,Q[q+3]=U&255}function N(W,ae,Q){let B=1,q=0;for(let K=ae;K<Q;++K)B=(B+(W[K]&255))%65521,q=(q+B)%65521;return q<<16|B}function P(W){if(!s.isNodeJS)return L(W);try{const ae=parseInt(process.versions.node)>=8?W:Buffer.from(W),Q=require$$5.deflateSync(ae,{level:9});return Q instanceof Uint8Array?Q:new Uint8Array(Q)}catch(ae){(0,s.warn)("Not compressing PNG because zlib.deflateSync is unavailable: "+ae)}return L(W)}function L(W){let ae=W.length;const Q=65535,B=Math.ceil(ae/Q),q=new Uint8Array(2+ae+B*5+4);let K=0;q[K++]=120,q[K++]=156;let U=0;for(;ae>Q;)q[K++]=0,q[K++]=255,q[K++]=255,q[K++]=0,q[K++]=0,q.set(W.subarray(U,U+Q),K),K+=Q,U+=Q,ae-=Q;q[K++]=1,q[K++]=ae&255,q[K++]=ae>>8&255,q[K++]=~ae&65535&255,q[K++]=(~ae&65535)>>8&255,q.set(W.subarray(U),K),K+=W.length-U;const $=N(W,0,W.length);return q[K++]=$>>24&255,q[K++]=$>>16&255,q[K++]=$>>8&255,q[K++]=$&255,q}function I(W,ae,Q,B){const q=W.width,K=W.height;let U,$,Y;const z=W.data;switch(ae){case s.ImageKind.GRAYSCALE_1BPP:$=0,U=1,Y=q+7>>3;break;case s.ImageKind.RGB_24BPP:$=2,U=8,Y=q*3;break;case s.ImageKind.RGBA_32BPP:$=6,U=8,Y=q*4;break;default:throw new Error("invalid format")}const O=new Uint8Array((1+Y)*K);let F=0,H=0;for(let Ae=0;Ae<K;++Ae)O[F++]=0,O.set(z.subarray(H,H+Y),F),H+=Y,F+=Y;if(ae===s.ImageKind.GRAYSCALE_1BPP&&B){F=0;for(let Ae=0;Ae<K;Ae++){F++;for(let Ee=0;Ee<Y;Ee++)O[F++]^=255}}const X=new Uint8Array([q>>24&255,q>>16&255,q>>8&255,q&255,K>>24&255,K>>16&255,K>>8&255,K&255,U,$,0,0,0]),te=P(O),J=D.length+w*3+X.length+te.length,ce=new Uint8Array(J);let ue=0;return ce.set(D,ue),ue+=D.length,M("IHDR",X,ce,ue),ue+=w+X.length,M("IDATA",te,ce,ue),ue+=w+te.length,M("IEND",new Uint8Array(0),ce,ue),h(ce,"image/png",Q)}return function(ae,Q,B){const q=ae.kind===void 0?s.ImageKind.GRAYSCALE_1BPP:ae.kind;return I(ae,q,Q,B)}}();class y{constructor(){this.fontSizeScale=1,this.fontWeight=c.fontWeight,this.fontSize=0,this.textMatrix=s.IDENTITY_MATRIX,this.fontMatrix=s.FONT_IDENTITY_MATRIX,this.leading=0,this.textRenderingMode=s.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=c.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(w,R){this.x=w,this.y=R}}function x(D){let w=[];const R=[];for(const _ of D){if(_.fn==="save"){w.push({fnId:92,fn:"group",items:[]}),R.push(w),w=w.at(-1).items;continue}_.fn==="restore"?w=R.pop():w.push(_)}return w}function b(D){if(Number.isInteger(D))return D.toString();const w=D.toFixed(10);let R=w.length-1;if(w[R]!=="0")return w;do R--;while(w[R]==="0");return w.substring(0,w[R]==="."?R:R+1)}function S(D){if(D[4]===0&&D[5]===0){if(D[1]===0&&D[2]===0)return D[0]===1&&D[3]===1?"":`scale(${b(D[0])} ${b(D[3])})`;if(D[0]===D[3]&&D[1]===-D[2]){const w=Math.acos(D[0])*180/Math.PI;return`rotate(${b(w)})`}}else if(D[0]===1&&D[1]===0&&D[2]===0&&D[3]===1)return`translate(${b(D[4])} ${b(D[5])})`;return`matrix(${b(D[0])} ${b(D[1])} ${b(D[2])} ${b(D[3])} ${b(D[4])} ${b(D[5])})`}let A=0,C=0,T=0;class k{constructor(w,R,_=!1){(0,o.deprecated)("The SVG back-end is no longer maintained and *may* be removed in the future."),this.svgFactory=new o.DOMSVGFactory,this.current=new y,this.transformMatrix=s.IDENTITY_MATRIX,this.transformStack=[],this.extraStack=[],this.commonObjs=w,this.objs=R,this.pendingClip=null,this.pendingEOFill=!1,this.embedFonts=!1,this.embeddedFonts=Object.create(null),this.cssStyle=null,this.forceDataSchema=!!_,this._operatorIdMapping=[];for(const M in s.OPS)this._operatorIdMapping[s.OPS[M]]=M}getObject(w,R=null){return typeof w=="string"?w.startsWith("g_")?this.commonObjs.get(w):this.objs.get(w):R}save(){this.transformStack.push(this.transformMatrix);const w=this.current;this.extraStack.push(w),this.current=w.clone()}restore(){this.transformMatrix=this.transformStack.pop(),this.current=this.extraStack.pop(),this.pendingClip=null,this.tgrp=null}group(w){this.save(),this.executeOpTree(w),this.restore()}loadDependencies(w){const R=w.fnArray,_=w.argsArray;for(let M=0,N=R.length;M<N;M++)if(R[M]===s.OPS.dependency)for(const P of _[M]){const L=P.startsWith("g_")?this.commonObjs:this.objs,I=new Promise(W=>{L.get(P,W)});this.current.dependencies.push(I)}return Promise.all(this.current.dependencies)}transform(w,R,_,M,N,P){const L=[w,R,_,M,N,P];this.transformMatrix=s.Util.transform(this.transformMatrix,L),this.tgrp=null}getSVG(w,R){this.viewport=R;const _=this._initialize(R);return this.loadDependencies(w).then(()=>(this.transformMatrix=s.IDENTITY_MATRIX,this.executeOpTree(this.convertOpList(w)),_))}convertOpList(w){const R=this._operatorIdMapping,_=w.argsArray,M=w.fnArray,N=[];for(let P=0,L=M.length;P<L;P++){const I=M[P];N.push({fnId:I,fn:R[I],args:_[P]})}return x(N)}executeOpTree(w){for(const R of w){const _=R.fn,M=R.fnId,N=R.args;switch(M|0){case s.OPS.beginText:this.beginText();break;case s.OPS.dependency:break;case s.OPS.setLeading:this.setLeading(N);break;case s.OPS.setLeadingMoveText:this.setLeadingMoveText(N[0],N[1]);break;case s.OPS.setFont:this.setFont(N);break;case s.OPS.showText:this.showText(N[0]);break;case s.OPS.showSpacedText:this.showText(N[0]);break;case s.OPS.endText:this.endText();break;case s.OPS.moveText:this.moveText(N[0],N[1]);break;case s.OPS.setCharSpacing:this.setCharSpacing(N[0]);break;case s.OPS.setWordSpacing:this.setWordSpacing(N[0]);break;case s.OPS.setHScale:this.setHScale(N[0]);break;case s.OPS.setTextMatrix:this.setTextMatrix(N[0],N[1],N[2],N[3],N[4],N[5]);break;case s.OPS.setTextRise:this.setTextRise(N[0]);break;case s.OPS.setTextRenderingMode:this.setTextRenderingMode(N[0]);break;case s.OPS.setLineWidth:this.setLineWidth(N[0]);break;case s.OPS.setLineJoin:this.setLineJoin(N[0]);break;case s.OPS.setLineCap:this.setLineCap(N[0]);break;case s.OPS.setMiterLimit:this.setMiterLimit(N[0]);break;case s.OPS.setFillRGBColor:this.setFillRGBColor(N[0],N[1],N[2]);break;case s.OPS.setStrokeRGBColor:this.setStrokeRGBColor(N[0],N[1],N[2]);break;case s.OPS.setStrokeColorN:this.setStrokeColorN(N);break;case s.OPS.setFillColorN:this.setFillColorN(N);break;case s.OPS.shadingFill:this.shadingFill(N[0]);break;case s.OPS.setDash:this.setDash(N[0],N[1]);break;case s.OPS.setRenderingIntent:this.setRenderingIntent(N[0]);break;case s.OPS.setFlatness:this.setFlatness(N[0]);break;case s.OPS.setGState:this.setGState(N[0]);break;case s.OPS.fill:this.fill();break;case s.OPS.eoFill:this.eoFill();break;case s.OPS.stroke:this.stroke();break;case s.OPS.fillStroke:this.fillStroke();break;case s.OPS.eoFillStroke:this.eoFillStroke();break;case s.OPS.clip:this.clip("nonzero");break;case s.OPS.eoClip:this.clip("evenodd");break;case s.OPS.paintSolidColorImageMask:this.paintSolidColorImageMask();break;case s.OPS.paintImageXObject:this.paintImageXObject(N[0]);break;case s.OPS.paintInlineImageXObject:this.paintInlineImageXObject(N[0]);break;case s.OPS.paintImageMaskXObject:this.paintImageMaskXObject(N[0]);break;case s.OPS.paintFormXObjectBegin:this.paintFormXObjectBegin(N[0],N[1]);break;case s.OPS.paintFormXObjectEnd:this.paintFormXObjectEnd();break;case s.OPS.closePath:this.closePath();break;case s.OPS.closeStroke:this.closeStroke();break;case s.OPS.closeFillStroke:this.closeFillStroke();break;case s.OPS.closeEOFillStroke:this.closeEOFillStroke();break;case s.OPS.nextLine:this.nextLine();break;case s.OPS.transform:this.transform(N[0],N[1],N[2],N[3],N[4],N[5]);break;case s.OPS.constructPath:this.constructPath(N[0],N[1]);break;case s.OPS.endPath:this.endPath();break;case 92:this.group(R.items);break;default:(0,s.warn)(`Unimplemented operator ${_}`);break}}}setWordSpacing(w){this.current.wordSpacing=w}setCharSpacing(w){this.current.charSpacing=w}nextLine(){this.moveText(0,this.current.leading)}setTextMatrix(w,R,_,M,N,P){const L=this.current;L.textMatrix=L.lineMatrix=[w,R,_,M,N,P],L.textMatrixScale=Math.hypot(w,R),L.x=L.lineX=0,L.y=L.lineY=0,L.xcoords=[],L.ycoords=[],L.tspan=this.svgFactory.createElement("svg:tspan"),L.tspan.setAttributeNS(null,"font-family",L.fontFamily),L.tspan.setAttributeNS(null,"font-size",`${b(L.fontSize)}px`),L.tspan.setAttributeNS(null,"y",b(-L.y)),L.txtElement=this.svgFactory.createElement("svg:text"),L.txtElement.append(L.tspan)}beginText(){const w=this.current;w.x=w.lineX=0,w.y=w.lineY=0,w.textMatrix=s.IDENTITY_MATRIX,w.lineMatrix=s.IDENTITY_MATRIX,w.textMatrixScale=1,w.tspan=this.svgFactory.createElement("svg:tspan"),w.txtElement=this.svgFactory.createElement("svg:text"),w.txtgrp=this.svgFactory.createElement("svg:g"),w.xcoords=[],w.ycoords=[]}moveText(w,R){const _=this.current;_.x=_.lineX+=w,_.y=_.lineY+=R,_.xcoords=[],_.ycoords=[],_.tspan=this.svgFactory.createElement("svg:tspan"),_.tspan.setAttributeNS(null,"font-family",_.fontFamily),_.tspan.setAttributeNS(null,"font-size",`${b(_.fontSize)}px`),_.tspan.setAttributeNS(null,"y",b(-_.y))}showText(w){const R=this.current,_=R.font,M=R.fontSize;if(M===0)return;const N=R.fontSizeScale,P=R.charSpacing,L=R.wordSpacing,I=R.fontDirection,W=R.textHScale*I,ae=_.vertical,Q=ae?1:-1,B=_.defaultVMetrics,q=M*R.fontMatrix[0];let K=0;for(const Y of w){if(Y===null){K+=I*L;continue}else if(typeof Y=="number"){K+=Q*Y*M/1e3;continue}const z=(Y.isSpace?L:0)+P,O=Y.fontChar;let F,H,X=Y.width;if(ae){let J;const ce=Y.vmetric||B;J=Y.vmetric?ce[1]:X*.5,J=-J*q;const ue=ce[2]*q;X=ce?-ce[0]:X,F=J/N,H=(K+ue)/N}else F=K/N,H=0;(Y.isInFont||_.missingFile)&&(R.xcoords.push(R.x+F),ae&&R.ycoords.push(-R.y+H),R.tspan.textContent+=O);const te=ae?X*q-z*I:X*q+z*I;K+=te}R.tspan.setAttributeNS(null,"x",R.xcoords.map(b).join(" ")),ae?R.tspan.setAttributeNS(null,"y",R.ycoords.map(b).join(" ")):R.tspan.setAttributeNS(null,"y",b(-R.y)),ae?R.y-=K:R.x+=K*W,R.tspan.setAttributeNS(null,"font-family",R.fontFamily),R.tspan.setAttributeNS(null,"font-size",`${b(R.fontSize)}px`),R.fontStyle!==c.fontStyle&&R.tspan.setAttributeNS(null,"font-style",R.fontStyle),R.fontWeight!==c.fontWeight&&R.tspan.setAttributeNS(null,"font-weight",R.fontWeight);const U=R.textRenderingMode&s.TextRenderingMode.FILL_STROKE_MASK;if(U===s.TextRenderingMode.FILL||U===s.TextRenderingMode.FILL_STROKE?(R.fillColor!==c.fillColor&&R.tspan.setAttributeNS(null,"fill",R.fillColor),R.fillAlpha<1&&R.tspan.setAttributeNS(null,"fill-opacity",R.fillAlpha)):R.textRenderingMode===s.TextRenderingMode.ADD_TO_PATH?R.tspan.setAttributeNS(null,"fill","transparent"):R.tspan.setAttributeNS(null,"fill","none"),U===s.TextRenderingMode.STROKE||U===s.TextRenderingMode.FILL_STROKE){const Y=1/(R.textMatrixScale||1);this._setStrokeAttributes(R.tspan,Y)}let $=R.textMatrix;R.textRise!==0&&($=$.slice(),$[5]+=R.textRise),R.txtElement.setAttributeNS(null,"transform",`${S($)} scale(${b(W)}, -1)`),R.txtElement.setAttributeNS(d,"xml:space","preserve"),R.txtElement.append(R.tspan),R.txtgrp.append(R.txtElement),this._ensureTransformGroup().append(R.txtElement)}setLeadingMoveText(w,R){this.setLeading(-R),this.moveText(w,R)}addFontStyle(w){if(!w.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 R=h(w.data,w.mimetype,this.forceDataSchema);this.cssStyle.textContent+=`@font-face { font-family: "${w.loadedName}"; src: url(${R}); }
|
||
`}setFont(w){const R=this.current,_=this.commonObjs.get(w[0]);let M=w[1];R.font=_,this.embedFonts&&!_.missingFile&&!this.embeddedFonts[_.loadedName]&&(this.addFontStyle(_),this.embeddedFonts[_.loadedName]=_),R.fontMatrix=_.fontMatrix||s.FONT_IDENTITY_MATRIX;let N="normal";_.black?N="900":_.bold&&(N="bold");const P=_.italic?"italic":"normal";M<0?(M=-M,R.fontDirection=-1):R.fontDirection=1,R.fontSize=M,R.fontFamily=_.loadedName,R.fontWeight=N,R.fontStyle=P,R.tspan=this.svgFactory.createElement("svg:tspan"),R.tspan.setAttributeNS(null,"y",b(-R.y)),R.xcoords=[],R.ycoords=[]}endText(){var R;const w=this.current;w.textRenderingMode&s.TextRenderingMode.ADD_TO_PATH_FLAG&&((R=w.txtElement)!=null&&R.hasChildNodes())&&(w.element=w.txtElement,this.clip("nonzero"),this.endPath())}setLineWidth(w){w>0&&(this.current.lineWidth=w)}setLineCap(w){this.current.lineCap=m[w]}setLineJoin(w){this.current.lineJoin=f[w]}setMiterLimit(w){this.current.miterLimit=w}setStrokeAlpha(w){this.current.strokeAlpha=w}setStrokeRGBColor(w,R,_){this.current.strokeColor=s.Util.makeHexColor(w,R,_)}setFillAlpha(w){this.current.fillAlpha=w}setFillRGBColor(w,R,_){this.current.fillColor=s.Util.makeHexColor(w,R,_),this.current.tspan=this.svgFactory.createElement("svg:tspan"),this.current.xcoords=[],this.current.ycoords=[]}setStrokeColorN(w){this.current.strokeColor=this._makeColorN_Pattern(w)}setFillColorN(w){this.current.fillColor=this._makeColorN_Pattern(w)}shadingFill(w){const{width:R,height:_}=this.viewport,M=s.Util.inverseTransform(this.transformMatrix),[N,P,L,I]=s.Util.getAxialAlignedBoundingBox([0,0,R,_],M),W=this.svgFactory.createElement("svg:rect");W.setAttributeNS(null,"x",N),W.setAttributeNS(null,"y",P),W.setAttributeNS(null,"width",L-N),W.setAttributeNS(null,"height",I-P),W.setAttributeNS(null,"fill",this._makeShadingPattern(w)),this.current.fillAlpha<1&&W.setAttributeNS(null,"fill-opacity",this.current.fillAlpha),this._ensureTransformGroup().append(W)}_makeColorN_Pattern(w){return w[0]==="TilingPattern"?this._makeTilingPattern(w):this._makeShadingPattern(w)}_makeTilingPattern(w){const R=w[1],_=w[2],M=w[3]||s.IDENTITY_MATRIX,[N,P,L,I]=w[4],W=w[5],ae=w[6],Q=w[7],B=`shading${T++}`,[q,K,U,$]=s.Util.normalizeRect([...s.Util.applyTransform([N,P],M),...s.Util.applyTransform([L,I],M)]),[Y,z]=s.Util.singularValueDecompose2dScale(M),O=W*Y,F=ae*z,H=this.svgFactory.createElement("svg:pattern");H.setAttributeNS(null,"id",B),H.setAttributeNS(null,"patternUnits","userSpaceOnUse"),H.setAttributeNS(null,"width",O),H.setAttributeNS(null,"height",F),H.setAttributeNS(null,"x",`${q}`),H.setAttributeNS(null,"y",`${K}`);const X=this.svg,te=this.transformMatrix,J=this.current.fillColor,ce=this.current.strokeColor,ue=this.svgFactory.create(U-q,$-K);if(this.svg=ue,this.transformMatrix=M,Q===2){const Ae=s.Util.makeHexColor(...R);this.current.fillColor=Ae,this.current.strokeColor=Ae}return this.executeOpTree(this.convertOpList(_)),this.svg=X,this.transformMatrix=te,this.current.fillColor=J,this.current.strokeColor=ce,H.append(ue.childNodes[0]),this.defs.append(H),`url(#${B})`}_makeShadingPattern(w){switch(typeof w=="string"&&(w=this.objs.get(w)),w[0]){case"RadialAxial":const R=`shading${T++}`,_=w[3];let M;switch(w[1]){case"axial":const N=w[4],P=w[5];M=this.svgFactory.createElement("svg:linearGradient"),M.setAttributeNS(null,"id",R),M.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),M.setAttributeNS(null,"x1",N[0]),M.setAttributeNS(null,"y1",N[1]),M.setAttributeNS(null,"x2",P[0]),M.setAttributeNS(null,"y2",P[1]);break;case"radial":const L=w[4],I=w[5],W=w[6],ae=w[7];M=this.svgFactory.createElement("svg:radialGradient"),M.setAttributeNS(null,"id",R),M.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),M.setAttributeNS(null,"cx",I[0]),M.setAttributeNS(null,"cy",I[1]),M.setAttributeNS(null,"r",ae),M.setAttributeNS(null,"fx",L[0]),M.setAttributeNS(null,"fy",L[1]),M.setAttributeNS(null,"fr",W);break;default:throw new Error(`Unknown RadialAxial type: ${w[1]}`)}for(const N of _){const P=this.svgFactory.createElement("svg:stop");P.setAttributeNS(null,"offset",N[0]),P.setAttributeNS(null,"stop-color",N[1]),M.append(P)}return this.defs.append(M),`url(#${R})`;case"Mesh":return(0,s.warn)("Unimplemented pattern Mesh"),null;case"Dummy":return"hotpink";default:throw new Error(`Unknown IR type: ${w[0]}`)}}setDash(w,R){this.current.dashArray=w,this.current.dashPhase=R}constructPath(w,R){const _=this.current;let M=_.x,N=_.y,P=[],L=0;for(const I of w)switch(I|0){case s.OPS.rectangle:M=R[L++],N=R[L++];const W=R[L++],ae=R[L++],Q=M+W,B=N+ae;P.push("M",b(M),b(N),"L",b(Q),b(N),"L",b(Q),b(B),"L",b(M),b(B),"Z");break;case s.OPS.moveTo:M=R[L++],N=R[L++],P.push("M",b(M),b(N));break;case s.OPS.lineTo:M=R[L++],N=R[L++],P.push("L",b(M),b(N));break;case s.OPS.curveTo:M=R[L+4],N=R[L+5],P.push("C",b(R[L]),b(R[L+1]),b(R[L+2]),b(R[L+3]),b(M),b(N)),L+=6;break;case s.OPS.curveTo2:P.push("C",b(M),b(N),b(R[L]),b(R[L+1]),b(R[L+2]),b(R[L+3])),M=R[L+2],N=R[L+3],L+=4;break;case s.OPS.curveTo3:M=R[L+2],N=R[L+3],P.push("C",b(R[L]),b(R[L+1]),b(M),b(N),b(M),b(N)),L+=4;break;case s.OPS.closePath:P.push("Z");break}P=P.join(" "),_.path&&w.length>0&&w[0]!==s.OPS.rectangle&&w[0]!==s.OPS.moveTo?P=_.path.getAttributeNS(null,"d")+P:(_.path=this.svgFactory.createElement("svg:path"),this._ensureTransformGroup().append(_.path)),_.path.setAttributeNS(null,"d",P),_.path.setAttributeNS(null,"fill","none"),_.element=_.path,_.setCurrentPoint(M,N)}endPath(){const w=this.current;if(w.path=null,!this.pendingClip)return;if(!w.element){this.pendingClip=null;return}const R=`clippath${A++}`,_=this.svgFactory.createElement("svg:clipPath");_.setAttributeNS(null,"id",R),_.setAttributeNS(null,"transform",S(this.transformMatrix));const M=w.element.cloneNode(!0);if(this.pendingClip==="evenodd"?M.setAttributeNS(null,"clip-rule","evenodd"):M.setAttributeNS(null,"clip-rule","nonzero"),this.pendingClip=null,_.append(M),this.defs.append(_),w.activeClipUrl){w.clipGroup=null;for(const N of this.extraStack)N.clipGroup=null;_.setAttributeNS(null,"clip-path",w.activeClipUrl)}w.activeClipUrl=`url(#${R})`,this.tgrp=null}clip(w){this.pendingClip=w}closePath(){const w=this.current;if(w.path){const R=`${w.path.getAttributeNS(null,"d")}Z`;w.path.setAttributeNS(null,"d",R)}}setLeading(w){this.current.leading=-w}setTextRise(w){this.current.textRise=w}setTextRenderingMode(w){this.current.textRenderingMode=w}setHScale(w){this.current.textHScale=w/100}setRenderingIntent(w){}setFlatness(w){}setGState(w){for(const[R,_]of w)switch(R){case"LW":this.setLineWidth(_);break;case"LC":this.setLineCap(_);break;case"LJ":this.setLineJoin(_);break;case"ML":this.setMiterLimit(_);break;case"D":this.setDash(_[0],_[1]);break;case"RI":this.setRenderingIntent(_);break;case"FL":this.setFlatness(_);break;case"Font":this.setFont(_);break;case"CA":this.setStrokeAlpha(_);break;case"ca":this.setFillAlpha(_);break;default:(0,s.warn)(`Unimplemented graphic state operator ${R}`);break}}fill(){const w=this.current;w.element&&(w.element.setAttributeNS(null,"fill",w.fillColor),w.element.setAttributeNS(null,"fill-opacity",w.fillAlpha),this.endPath())}stroke(){const w=this.current;w.element&&(this._setStrokeAttributes(w.element),w.element.setAttributeNS(null,"fill","none"),this.endPath())}_setStrokeAttributes(w,R=1){const _=this.current;let M=_.dashArray;R!==1&&M.length>0&&(M=M.map(function(N){return R*N})),w.setAttributeNS(null,"stroke",_.strokeColor),w.setAttributeNS(null,"stroke-opacity",_.strokeAlpha),w.setAttributeNS(null,"stroke-miterlimit",b(_.miterLimit)),w.setAttributeNS(null,"stroke-linecap",_.lineCap),w.setAttributeNS(null,"stroke-linejoin",_.lineJoin),w.setAttributeNS(null,"stroke-width",b(R*_.lineWidth)+"px"),w.setAttributeNS(null,"stroke-dasharray",M.map(b).join(" ")),w.setAttributeNS(null,"stroke-dashoffset",b(R*_.dashPhase)+"px")}eoFill(){var w;(w=this.current.element)==null||w.setAttributeNS(null,"fill-rule","evenodd"),this.fill()}fillStroke(){this.stroke(),this.fill()}eoFillStroke(){var w;(w=this.current.element)==null||w.setAttributeNS(null,"fill-rule","evenodd"),this.fillStroke()}closeStroke(){this.closePath(),this.stroke()}closeFillStroke(){this.closePath(),this.fillStroke()}closeEOFillStroke(){this.closePath(),this.eoFillStroke()}paintSolidColorImageMask(){const w=this.svgFactory.createElement("svg:rect");w.setAttributeNS(null,"x","0"),w.setAttributeNS(null,"y","0"),w.setAttributeNS(null,"width","1px"),w.setAttributeNS(null,"height","1px"),w.setAttributeNS(null,"fill",this.current.fillColor),this._ensureTransformGroup().append(w)}paintImageXObject(w){const R=this.getObject(w);if(!R){(0,s.warn)(`Dependent image with object ID ${w} is not ready yet`);return}this.paintInlineImageXObject(R)}paintInlineImageXObject(w,R){const _=w.width,M=w.height,N=v(w,this.forceDataSchema,!!R),P=this.svgFactory.createElement("svg:rect");P.setAttributeNS(null,"x","0"),P.setAttributeNS(null,"y","0"),P.setAttributeNS(null,"width",b(_)),P.setAttributeNS(null,"height",b(M)),this.current.element=P,this.clip("nonzero");const L=this.svgFactory.createElement("svg:image");L.setAttributeNS(p,"xlink:href",N),L.setAttributeNS(null,"x","0"),L.setAttributeNS(null,"y",b(-M)),L.setAttributeNS(null,"width",b(_)+"px"),L.setAttributeNS(null,"height",b(M)+"px"),L.setAttributeNS(null,"transform",`scale(${b(1/_)} ${b(-1/M)})`),R?R.append(L):this._ensureTransformGroup().append(L)}paintImageMaskXObject(w){const R=this.getObject(w.data,w);if(R.bitmap){(0,s.warn)("paintImageMaskXObject: ImageBitmap support is not implemented, ensure that the `isOffscreenCanvasSupported` API parameter is disabled.");return}const _=this.current,M=R.width,N=R.height,P=_.fillColor;_.maskId=`mask${C++}`;const L=this.svgFactory.createElement("svg:mask");L.setAttributeNS(null,"id",_.maskId);const I=this.svgFactory.createElement("svg:rect");I.setAttributeNS(null,"x","0"),I.setAttributeNS(null,"y","0"),I.setAttributeNS(null,"width",b(M)),I.setAttributeNS(null,"height",b(N)),I.setAttributeNS(null,"fill",P),I.setAttributeNS(null,"mask",`url(#${_.maskId})`),this.defs.append(L),this._ensureTransformGroup().append(I),this.paintInlineImageXObject(R,L)}paintFormXObjectBegin(w,R){if(Array.isArray(w)&&w.length===6&&this.transform(w[0],w[1],w[2],w[3],w[4],w[5]),R){const _=R[2]-R[0],M=R[3]-R[1],N=this.svgFactory.createElement("svg:rect");N.setAttributeNS(null,"x",R[0]),N.setAttributeNS(null,"y",R[1]),N.setAttributeNS(null,"width",b(_)),N.setAttributeNS(null,"height",b(M)),this.current.element=N,this.clip("nonzero"),this.endPath()}}paintFormXObjectEnd(){}_initialize(w){const R=this.svgFactory.create(w.width,w.height),_=this.svgFactory.createElement("svg:defs");R.append(_),this.defs=_;const M=this.svgFactory.createElement("svg:g");return M.setAttributeNS(null,"transform",S(w.transform)),R.append(M),this.svg=M,R}_ensureClipGroup(){if(!this.current.clipGroup){const w=this.svgFactory.createElement("svg:g");w.setAttributeNS(null,"clip-path",this.current.activeClipUrl),this.svg.append(w),this.current.clipGroup=w}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=k},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.XfaText=void 0;class i{static textContent(s){const c=[],d={items:c,styles:Object.create(null)};function p(m){var v;if(!m)return;let f=null;const h=m.name;if(h==="#text")f=m.value;else if(i.shouldBuildText(h))(v=m==null?void 0:m.attributes)!=null&&v.textContent?f=m.attributes.textContent:m.value&&(f=m.value);else return;if(f!==null&&c.push({str:f}),!!m.children)for(const y of m.children)p(y)}return p(s),d}static shouldBuildText(s){return!(s==="textarea"||s==="input"||s==="option"||s==="select")}}t.XfaText=i},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TextLayerRenderTask=void 0,t.renderTextLayer=S,t.updateTextLayer=A;var o=i(1),s=i(6);const c=1e5,d=30,p=.8,m=new Map;function f(C,T){let k;if(T&&o.FeatureTest.isOffscreenCanvasSupported)k=new OffscreenCanvas(C,C).getContext("2d",{alpha:!1});else{const D=document.createElement("canvas");D.width=D.height=C,k=D.getContext("2d",{alpha:!1})}return k}function h(C,T){const k=m.get(C);if(k)return k;const D=f(d,T);D.font=`${d}px ${C}`;const w=D.measureText("");let R=w.fontBoundingBoxAscent,_=Math.abs(w.fontBoundingBoxDescent);if(R){const N=R/(R+_);return m.set(C,N),D.canvas.width=D.canvas.height=0,N}D.strokeStyle="red",D.clearRect(0,0,d,d),D.strokeText("g",0,0);let M=D.getImageData(0,0,d,d).data;_=0;for(let N=M.length-1-3;N>=0;N-=4)if(M[N]>0){_=Math.ceil(N/4/d);break}D.clearRect(0,0,d,d),D.strokeText("A",0,d),M=D.getImageData(0,0,d,d).data,R=0;for(let N=0,P=M.length;N<P;N+=4)if(M[N]>0){R=d-Math.floor(N/4/d);break}if(D.canvas.width=D.canvas.height=0,R){const N=R/(R+_);return m.set(C,N),N}return m.set(C,p),p}function v(C,T,k){const D=document.createElement("span"),w={angle:0,canvasWidth:0,hasText:T.str!=="",hasEOL:T.hasEOL,fontSize:0};C._textDivs.push(D);const R=o.Util.transform(C._transform,T.transform);let _=Math.atan2(R[1],R[0]);const M=k[T.fontName];M.vertical&&(_+=Math.PI/2);const N=Math.hypot(R[2],R[3]),P=N*h(M.fontFamily,C._isOffscreenCanvasSupported);let L,I;_===0?(L=R[4],I=R[5]-P):(L=R[4]+P*Math.sin(_),I=R[5]-P*Math.cos(_));const W="calc(var(--scale-factor)*",ae=D.style;C._container===C._rootContainer?(ae.left=`${(100*L/C._pageWidth).toFixed(2)}%`,ae.top=`${(100*I/C._pageHeight).toFixed(2)}%`):(ae.left=`${W}${L.toFixed(2)}px)`,ae.top=`${W}${I.toFixed(2)}px)`),ae.fontSize=`${W}${N.toFixed(2)}px)`,ae.fontFamily=M.fontFamily,w.fontSize=N,D.setAttribute("role","presentation"),D.textContent=T.str,D.dir=T.dir,C._fontInspectorEnabled&&(D.dataset.fontName=T.fontName),_!==0&&(w.angle=_*(180/Math.PI));let Q=!1;if(T.str.length>1)Q=!0;else if(T.str!==" "&&T.transform[0]!==T.transform[3]){const B=Math.abs(T.transform[0]),q=Math.abs(T.transform[3]);B!==q&&Math.max(B,q)/Math.min(B,q)>1.5&&(Q=!0)}Q&&(w.canvasWidth=M.vertical?T.height:T.width),C._textDivProperties.set(D,w),C._isReadableStream&&C._layoutText(D)}function y(C){const{div:T,scale:k,properties:D,ctx:w,prevFontSize:R,prevFontFamily:_}=C,{style:M}=T;let N="";if(D.canvasWidth!==0&&D.hasText){const{fontFamily:P}=M,{canvasWidth:L,fontSize:I}=D;(R!==I||_!==P)&&(w.font=`${I*k}px ${P}`,C.prevFontSize=I,C.prevFontFamily=P);const{width:W}=w.measureText(T.textContent);W>0&&(N=`scaleX(${L*k/W})`)}D.angle!==0&&(N=`rotate(${D.angle}deg) ${N}`),N.length>0&&(M.transform=N)}function x(C){if(C._canceled)return;const T=C._textDivs,k=C._capability;if(T.length>c){k.resolve();return}if(!C._isReadableStream)for(const w of T)C._layoutText(w);k.resolve()}class b{constructor({textContentSource:T,container:k,viewport:D,textDivs:w,textDivProperties:R,textContentItemsStr:_,isOffscreenCanvasSupported:M}){var W;this._textContentSource=T,this._isReadableStream=T instanceof ReadableStream,this._container=this._rootContainer=k,this._textDivs=w||[],this._textContentItemsStr=_||[],this._isOffscreenCanvasSupported=M,this._fontInspectorEnabled=!!((W=globalThis.FontInspector)!=null&&W.enabled),this._reader=null,this._textDivProperties=R||new WeakMap,this._canceled=!1,this._capability=new o.PromiseCapability,this._layoutTextParams={prevFontSize:null,prevFontFamily:null,div:null,scale:D.scale*(globalThis.devicePixelRatio||1),properties:null,ctx:f(0,M)};const{pageWidth:N,pageHeight:P,pageX:L,pageY:I}=D.rawDims;this._transform=[1,0,0,-1,-L,I+P],this._pageWidth=N,this._pageHeight=P,(0,s.setLayerDimensions)(k,D),this._capability.promise.finally(()=>{this._layoutTextParams=null}).catch(()=>{})}get promise(){return this._capability.promise}cancel(){this._canceled=!0,this._reader&&(this._reader.cancel(new o.AbortException("TextLayer task cancelled.")).catch(()=>{}),this._reader=null),this._capability.reject(new o.AbortException("TextLayer task cancelled."))}_processItems(T,k){for(const D of T){if(D.str===void 0){if(D.type==="beginMarkedContentProps"||D.type==="beginMarkedContent"){const w=this._container;this._container=document.createElement("span"),this._container.classList.add("markedContent"),D.id!==null&&this._container.setAttribute("id",`${D.id}`),w.append(this._container)}else D.type==="endMarkedContent"&&(this._container=this._container.parentNode);continue}this._textContentItemsStr.push(D.str),v(this,D,k)}}_layoutText(T){const k=this._layoutTextParams.properties=this._textDivProperties.get(T);if(this._layoutTextParams.div=T,y(this._layoutTextParams),k.hasText&&this._container.append(T),k.hasEOL){const D=document.createElement("br");D.setAttribute("role","presentation"),this._container.append(D)}}_render(){const T=new o.PromiseCapability;let k=Object.create(null);if(this._isReadableStream){const D=()=>{this._reader.read().then(({value:w,done:R})=>{if(R){T.resolve();return}Object.assign(k,w.styles),this._processItems(w.items,k),D()},T.reject)};this._reader=this._textContentSource.getReader(),D()}else if(this._textContentSource){const{items:D,styles:w}=this._textContentSource;this._processItems(D,w),T.resolve()}else throw new Error('No "textContentSource" parameter specified.');T.promise.then(()=>{k=null,x(this)},this._capability.reject)}}t.TextLayerRenderTask=b;function S(C){!C.textContentSource&&(C.textContent||C.textContentStream)&&((0,s.deprecated)("The TextLayerRender `textContent`/`textContentStream` parameters will be removed in the future, please use `textContentSource` instead."),C.textContentSource=C.textContent||C.textContentStream);const{container:T,viewport:k}=C,D=getComputedStyle(T),w=D.getPropertyValue("visibility"),R=parseFloat(D.getPropertyValue("--scale-factor"));w==="visible"&&(!R||Math.abs(R-k.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 _=new b(C);return _._render(),_}function A({container:C,viewport:T,textDivs:k,textDivProperties:D,isOffscreenCanvasSupported:w,mustRotate:R=!0,mustRescale:_=!0}){if(R&&(0,s.setLayerDimensions)(C,{rotation:T.rotation}),_){const M=f(0,w),P={prevFontSize:null,prevFontFamily:null,div:null,scale:T.scale*(globalThis.devicePixelRatio||1),properties:null,ctx:M};for(const L of k)P.properties=D.get(L),P.div=L,y(P)}}},(e,t,i)=>{var h,v,y,x,b,S,A,C,T,k,D,vc,$o,bc,yc;Object.defineProperty(t,"__esModule",{value:!0}),t.AnnotationEditorLayer=void 0;var o=i(1),s=i(4),c=i(28),d=i(33),p=i(6),m=i(34);const N=class N{constructor({uiManager:L,pageIndex:I,div:W,accessibilityManager:ae,annotationLayer:Q,viewport:B,l10n:q}){Se(this,D);Se(this,h);Se(this,v,!1);Se(this,y,null);Se(this,x,this.pointerup.bind(this));Se(this,b,this.pointerdown.bind(this));Se(this,S,new Map);Se(this,A,!1);Se(this,C,!1);Se(this,T,!1);Se(this,k);const K=[c.FreeTextEditor,d.InkEditor,m.StampEditor];if(!N._initialized){N._initialized=!0;for(const U of K)U.initialize(q)}L.registerEditorTypes(K),Ce(this,k,L),this.pageIndex=I,this.div=W,Ce(this,h,ae),Ce(this,y,Q),this.viewport=B,j(this,k).addLayer(this)}get isEmpty(){return j(this,S).size===0}updateToolbar(L){j(this,k).updateToolbar(L)}updateMode(L=j(this,k).getMode()){me(this,D,yc).call(this),L===o.AnnotationEditorType.INK?(this.addInkEditorIfNeeded(!1),this.disableClick()):this.enableClick(),L!==o.AnnotationEditorType.NONE&&(this.div.classList.toggle("freeTextEditing",L===o.AnnotationEditorType.FREETEXT),this.div.classList.toggle("inkEditing",L===o.AnnotationEditorType.INK),this.div.classList.toggle("stampEditing",L===o.AnnotationEditorType.STAMP),this.div.hidden=!1)}addInkEditorIfNeeded(L){if(!L&&j(this,k).getMode()!==o.AnnotationEditorType.INK)return;if(!L){for(const W of j(this,S).values())if(W.isEmpty()){W.setInBackground();return}}me(this,D,$o).call(this,{offsetX:0,offsetY:0},!1).setInBackground()}setEditingState(L){j(this,k).setEditingState(L)}addCommands(L){j(this,k).addCommands(L)}enable(){this.div.style.pointerEvents="auto";const L=new Set;for(const W of j(this,S).values())W.enableEditing(),W.annotationElementId&&L.add(W.annotationElementId);if(!j(this,y))return;const I=j(this,y).getEditableAnnotations();for(const W of I){if(W.hide(),j(this,k).isDeletedAnnotationElement(W.data.id)||L.has(W.data.id))continue;const ae=this.deserialize(W);ae&&(this.addOrRebuild(ae),ae.enableEditing())}}disable(){var I;Ce(this,T,!0),this.div.style.pointerEvents="none";const L=new Set;for(const W of j(this,S).values()){if(W.disableEditing(),!W.annotationElementId||W.serialize()!==null){L.add(W.annotationElementId);continue}(I=this.getEditableAnnotation(W.annotationElementId))==null||I.show(),W.remove()}if(j(this,y)){const W=j(this,y).getEditableAnnotations();for(const ae of W){const{id:Q}=ae.data;L.has(Q)||j(this,k).isDeletedAnnotationElement(Q)||ae.show()}}me(this,D,yc).call(this),this.isEmpty&&(this.div.hidden=!0),Ce(this,T,!1)}getEditableAnnotation(L){var I;return((I=j(this,y))==null?void 0:I.getEditableAnnotation(L))||null}setActiveEditor(L){j(this,k).getActive()!==L&&j(this,k).setActiveEditor(L)}enableClick(){this.div.addEventListener("pointerdown",j(this,b)),this.div.addEventListener("pointerup",j(this,x))}disableClick(){this.div.removeEventListener("pointerdown",j(this,b)),this.div.removeEventListener("pointerup",j(this,x))}attach(L){j(this,S).set(L.id,L);const{annotationElementId:I}=L;I&&j(this,k).isDeletedAnnotationElement(I)&&j(this,k).removeDeletedAnnotationElement(L)}detach(L){var I;j(this,S).delete(L.id),(I=j(this,h))==null||I.removePointerInTextLayer(L.contentDiv),!j(this,T)&&L.annotationElementId&&j(this,k).addDeletedAnnotationElement(L)}remove(L){this.detach(L),j(this,k).removeEditor(L),L.div.contains(document.activeElement)&&setTimeout(()=>{j(this,k).focusMainContainer()},0),L.div.remove(),L.isAttachedToDOM=!1,j(this,C)||this.addInkEditorIfNeeded(!1)}changeParent(L){var I;L.parent!==this&&(L.annotationElementId&&(j(this,k).addDeletedAnnotationElement(L.annotationElementId),s.AnnotationEditor.deleteAnnotationElement(L),L.annotationElementId=null),this.attach(L),(I=L.parent)==null||I.detach(L),L.setParent(this),L.div&&L.isAttachedToDOM&&(L.div.remove(),this.div.append(L.div)))}add(L){if(this.changeParent(L),j(this,k).addEditor(L),this.attach(L),!L.isAttachedToDOM){const I=L.render();this.div.append(I),L.isAttachedToDOM=!0}L.fixAndSetPosition(),L.onceAdded(),j(this,k).addToAnnotationStorage(L)}moveEditorInDOM(L){var W;if(!L.isAttachedToDOM)return;const{activeElement:I}=document;L.div.contains(I)&&(L._focusEventsAllowed=!1,setTimeout(()=>{L.div.contains(document.activeElement)?L._focusEventsAllowed=!0:(L.div.addEventListener("focusin",()=>{L._focusEventsAllowed=!0},{once:!0}),I.focus())},0)),L._structTreeParentId=(W=j(this,h))==null?void 0:W.moveElementInDOM(this.div,L.div,L.contentDiv,!0)}addOrRebuild(L){L.needsToBeRebuilt()?L.rebuild():this.add(L)}addUndoableEditor(L){const I=()=>L._uiManager.rebuild(L),W=()=>{L.remove()};this.addCommands({cmd:I,undo:W,mustExec:!1})}getNextId(){return j(this,k).getId()}pasteEditor(L,I){j(this,k).updateToolbar(L),j(this,k).updateMode(L);const{offsetX:W,offsetY:ae}=me(this,D,bc).call(this),Q=this.getNextId(),B=me(this,D,vc).call(this,{parent:this,id:Q,x:W,y:ae,uiManager:j(this,k),isCentered:!0,...I});B&&this.add(B)}deserialize(L){switch(L.annotationType??L.annotationEditorType){case o.AnnotationEditorType.FREETEXT:return c.FreeTextEditor.deserialize(L,this,j(this,k));case o.AnnotationEditorType.INK:return d.InkEditor.deserialize(L,this,j(this,k));case o.AnnotationEditorType.STAMP:return m.StampEditor.deserialize(L,this,j(this,k))}return null}addNewEditor(){me(this,D,$o).call(this,me(this,D,bc).call(this),!0)}setSelected(L){j(this,k).setSelected(L)}toggleSelected(L){j(this,k).toggleSelected(L)}isSelected(L){return j(this,k).isSelected(L)}unselect(L){j(this,k).unselect(L)}pointerup(L){const{isMac:I}=o.FeatureTest.platform;if(!(L.button!==0||L.ctrlKey&&I)&&L.target===this.div&&j(this,A)){if(Ce(this,A,!1),!j(this,v)){Ce(this,v,!0);return}if(j(this,k).getMode()===o.AnnotationEditorType.STAMP){j(this,k).unselectAll();return}me(this,D,$o).call(this,L,!1)}}pointerdown(L){if(j(this,A)){Ce(this,A,!1);return}const{isMac:I}=o.FeatureTest.platform;if(L.button!==0||L.ctrlKey&&I||L.target!==this.div)return;Ce(this,A,!0);const W=j(this,k).getActive();Ce(this,v,!W||W.isEmpty())}findNewParent(L,I,W){const ae=j(this,k).findParent(I,W);return ae===null||ae===this?!1:(ae.changeParent(L),!0)}destroy(){var L,I;((L=j(this,k).getActive())==null?void 0:L.parent)===this&&(j(this,k).commitOrRemove(),j(this,k).setActiveEditor(null));for(const W of j(this,S).values())(I=j(this,h))==null||I.removePointerInTextLayer(W.contentDiv),W.setParent(null),W.isAttachedToDOM=!1,W.div.remove();this.div=null,j(this,S).clear(),j(this,k).removeLayer(this)}render({viewport:L}){this.viewport=L,(0,p.setLayerDimensions)(this.div,L);for(const I of j(this,k).getEditors(this.pageIndex))this.add(I);this.updateMode()}update({viewport:L}){j(this,k).commitOrRemove(),this.viewport=L,(0,p.setLayerDimensions)(this.div,{rotation:L.rotation}),this.updateMode()}get pageDimensions(){const{pageWidth:L,pageHeight:I}=this.viewport.rawDims;return[L,I]}};h=new WeakMap,v=new WeakMap,y=new WeakMap,x=new WeakMap,b=new WeakMap,S=new WeakMap,A=new WeakMap,C=new WeakMap,T=new WeakMap,k=new WeakMap,D=new WeakSet,vc=function(L){switch(j(this,k).getMode()){case o.AnnotationEditorType.FREETEXT:return new c.FreeTextEditor(L);case o.AnnotationEditorType.INK:return new d.InkEditor(L);case o.AnnotationEditorType.STAMP:return new m.StampEditor(L)}return null},$o=function(L,I){const W=this.getNextId(),ae=me(this,D,vc).call(this,{parent:this,id:W,x:L.offsetX,y:L.offsetY,uiManager:j(this,k),isCentered:I});return ae&&this.add(ae),ae},bc=function(){const{x:L,y:I,width:W,height:ae}=this.div.getBoundingClientRect(),Q=Math.max(0,L),B=Math.max(0,I),q=Math.min(window.innerWidth,L+W),K=Math.min(window.innerHeight,I+ae),U=(Q+q)/2-L,$=(B+K)/2-I,[Y,z]=this.viewport.rotation%180===0?[U,$]:[$,U];return{offsetX:Y,offsetY:z}},yc=function(){Ce(this,C,!0);for(const L of j(this,S).values())L.isEmpty()&&L.remove();Ce(this,C,!1)},Pt(N,"_initialized",!1);let f=N;t.AnnotationEditorLayer=f},(e,t,i)=>{var m,f,h,v,y,x,b,S,A,C,Tp,kp,Pp,vi,xc,Dp,Sc;Object.defineProperty(t,"__esModule",{value:!0}),t.FreeTextEditor=void 0;var o=i(1),s=i(5),c=i(4),d=i(29);const N=class N extends c.AnnotationEditor{constructor(I){super({...I,name:"freeTextEditor"});Se(this,C);Se(this,m,this.editorDivBlur.bind(this));Se(this,f,this.editorDivFocus.bind(this));Se(this,h,this.editorDivInput.bind(this));Se(this,v,this.editorDivKeydown.bind(this));Se(this,y);Se(this,x,"");Se(this,b,`${this.id}-editor`);Se(this,S);Se(this,A,null);Ce(this,y,I.color||N._defaultColor||c.AnnotationEditor._defaultLineColor),Ce(this,S,I.fontSize||N._defaultFontSize)}static get _keyboardManager(){const I=N.prototype,W=B=>B.isEmpty(),ae=s.AnnotationEditorUIManager.TRANSLATE_SMALL,Q=s.AnnotationEditorUIManager.TRANSLATE_BIG;return(0,o.shadow)(this,"_keyboardManager",new s.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:[-ae,0],checker:W}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],I._translateEmpty,{args:[-Q,0],checker:W}],[["ArrowRight","mac+ArrowRight"],I._translateEmpty,{args:[ae,0],checker:W}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],I._translateEmpty,{args:[Q,0],checker:W}],[["ArrowUp","mac+ArrowUp"],I._translateEmpty,{args:[0,-ae],checker:W}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],I._translateEmpty,{args:[0,-Q],checker:W}],[["ArrowDown","mac+ArrowDown"],I._translateEmpty,{args:[0,ae],checker:W}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],I._translateEmpty,{args:[0,Q],checker:W}]]))}static initialize(I){c.AnnotationEditor.initialize(I,{strings:["free_text2_default_content","editor_free_text2_aria_label"]});const W=getComputedStyle(document.documentElement);this._internalPadding=parseFloat(W.getPropertyValue("--freetext-padding"))}static updateDefaultParams(I,W){switch(I){case o.AnnotationEditorParamsType.FREETEXT_SIZE:N._defaultFontSize=W;break;case o.AnnotationEditorParamsType.FREETEXT_COLOR:N._defaultColor=W;break}}updateParams(I,W){switch(I){case o.AnnotationEditorParamsType.FREETEXT_SIZE:me(this,C,Tp).call(this,W);break;case o.AnnotationEditorParamsType.FREETEXT_COLOR:me(this,C,kp).call(this,W);break}}static get defaultPropertiesToUpdate(){return[[o.AnnotationEditorParamsType.FREETEXT_SIZE,N._defaultFontSize],[o.AnnotationEditorParamsType.FREETEXT_COLOR,N._defaultColor||c.AnnotationEditor._defaultLineColor]]}get propertiesToUpdate(){return[[o.AnnotationEditorParamsType.FREETEXT_SIZE,j(this,S)],[o.AnnotationEditorParamsType.FREETEXT_COLOR,j(this,y)]]}_translateEmpty(I,W){this._uiManager.translateSelectedEditors(I,W,!0)}getInitialTranslation(){const I=this.parentScale;return[-N._internalPadding*I,-(N._internalPadding+j(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(o.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",j(this,v)),this.editorDiv.addEventListener("focus",j(this,f)),this.editorDiv.addEventListener("blur",j(this,m)),this.editorDiv.addEventListener("input",j(this,h)))}disableEditMode(){this.isInEditMode()&&(this.parent.setEditingState(!0),super.disableEditMode(),this.overlayDiv.classList.add("enabled"),this.editorDiv.contentEditable=!1,this.div.setAttribute("aria-activedescendant",j(this,b)),this._isDraggable=!0,this.editorDiv.removeEventListener("keydown",j(this,v)),this.editorDiv.removeEventListener("focus",j(this,f)),this.editorDiv.removeEventListener("blur",j(this,m)),this.editorDiv.removeEventListener("input",j(this,h)),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,C,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=j(this,x),W=Ce(this,x,me(this,C,Pp).call(this).trimEnd());if(I===W)return;const ae=Q=>{if(Ce(this,x,Q),!Q){this.remove();return}me(this,C,xc).call(this),this._uiManager.rebuild(this),me(this,C,vi).call(this)};this.addCommands({cmd:()=>{ae(W)},undo:()=>{ae(I)},mustExec:!1}),me(this,C,vi).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){N._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,W;this.width&&(I=this.x,W=this.y),super.render(),this.editorDiv=document.createElement("div"),this.editorDiv.className="internal",this.editorDiv.setAttribute("id",j(this,b)),this.enableEditing(),c.AnnotationEditor._l10nPromise.get("editor_free_text2_aria_label").then(Q=>{var B;return(B=this.editorDiv)==null?void 0:B.setAttribute("aria-label",Q)}),c.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:ae}=this.editorDiv;if(ae.fontSize=`calc(${j(this,S)}px * var(--scale-factor))`,ae.color=j(this,y),this.div.append(this.editorDiv),this.overlayDiv=document.createElement("div"),this.overlayDiv.classList.add("overlay","enabled"),this.div.append(this.overlayDiv),(0,s.bindEvents)(this,this.div,["dblclick","keydown"]),this.width){const[Q,B]=this.parentDimensions;if(this.annotationElementId){const{position:q}=j(this,A);let[K,U]=this.getInitialTranslation();[K,U]=this.pageTranslationToScreen(K,U);const[$,Y]=this.pageDimensions,[z,O]=this.pageTranslation;let F,H;switch(this.rotation){case 0:F=I+(q[0]-z)/$,H=W+this.height-(q[1]-O)/Y;break;case 90:F=I+(q[0]-z)/$,H=W-(q[1]-O)/Y,[K,U]=[U,-K];break;case 180:F=I-this.width+(q[0]-z)/$,H=W-(q[1]-O)/Y,[K,U]=[-K,-U];break;case 270:F=I+(q[0]-z-this.height*Y)/$,H=W+(q[1]-O-this.width*$)/Y,[K,U]=[-U,K];break}this.setAt(F*Q,H*B,K,U)}else this.setAt(I*Q,W*B,this.width*Q,this.height*B);me(this,C,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,W,ae){let Q=null;if(I instanceof d.FreeTextAnnotationElement){const{data:{defaultAppearanceData:{fontSize:q,fontColor:K},rect:U,rotation:$,id:Y},textContent:z,textPosition:O,parent:{page:{pageNumber:F}}}=I;if(!z||z.length===0)return null;Q=I={annotationType:o.AnnotationEditorType.FREETEXT,color:Array.from(K),fontSize:q,value:z.join(`
|
||
`),position:O,pageIndex:F-1,rect:U,rotation:$,id:Y,deleted:!1}}const B=super.deserialize(I,W,ae);return Ce(B,S,I.fontSize),Ce(B,y,o.Util.makeHexColor(...I.color)),Ce(B,x,I.value),B.annotationElementId=I.id||null,Ce(B,A,Q),B}serialize(I=!1){if(this.isEmpty())return null;if(this.deleted)return{pageIndex:this.pageIndex,id:this.annotationElementId,deleted:!0};const W=N._internalPadding*this.parentScale,ae=this.getRect(W,W),Q=c.AnnotationEditor._colorManager.convert(this.isAttachedToDOM?getComputedStyle(this.editorDiv).color:j(this,y)),B={annotationType:o.AnnotationEditorType.FREETEXT,color:Q,fontSize:j(this,S),value:j(this,x),pageIndex:this.pageIndex,rect:ae,rotation:this.rotation,structTreeParentId:this._structTreeParentId};return I?B:this.annotationElementId&&!me(this,C,Dp).call(this,B)?null:(B.id=this.annotationElementId,B)}};m=new WeakMap,f=new WeakMap,h=new WeakMap,v=new WeakMap,y=new WeakMap,x=new WeakMap,b=new WeakMap,S=new WeakMap,A=new WeakMap,C=new WeakSet,Tp=function(I){const W=Q=>{this.editorDiv.style.fontSize=`calc(${Q}px * var(--scale-factor))`,this.translate(0,-(Q-j(this,S))*this.parentScale),Ce(this,S,Q),me(this,C,vi).call(this)},ae=j(this,S);this.addCommands({cmd:()=>{W(I)},undo:()=>{W(ae)},mustExec:!0,type:o.AnnotationEditorParamsType.FREETEXT_SIZE,overwriteIfSameType:!0,keepUndo:!0})},kp=function(I){const W=j(this,y);this.addCommands({cmd:()=>{Ce(this,y,this.editorDiv.style.color=I)},undo:()=>{Ce(this,y,this.editorDiv.style.color=W)},mustExec:!0,type:o.AnnotationEditorParamsType.FREETEXT_COLOR,overwriteIfSameType:!0,keepUndo:!0})},Pp=function(){const I=this.editorDiv.getElementsByTagName("div");if(I.length===0)return this.editorDiv.innerText;const W=[];for(const ae of I)W.push(ae.innerText.replace(/\r\n?|\n/,""));return W.join(`
|
||
`)},vi=function(){const[I,W]=this.parentDimensions;let ae;if(this.isAttachedToDOM)ae=this.div.getBoundingClientRect();else{const{currentLayer:Q,div:B}=this,q=B.style.display;B.style.display="hidden",Q.div.append(this.div),ae=B.getBoundingClientRect(),B.remove(),B.style.display=q}this.rotation%180===this.parentRotation%180?(this.width=ae.width/I,this.height=ae.height/W):(this.width=ae.height/I,this.height=ae.width/W),this.fixAndSetPosition()},xc=function(){if(this.editorDiv.replaceChildren(),!!j(this,x))for(const I of j(this,x).split(`
|
||
`)){const W=document.createElement("div");W.append(I?document.createTextNode(I):document.createElement("br")),this.editorDiv.append(W)}},Dp=function(I){const{value:W,fontSize:ae,color:Q,rect:B,pageIndex:q}=j(this,A);return I.value!==W||I.fontSize!==ae||I.rect.some((K,U)=>Math.abs(K-B[U])>=1)||I.color.some((K,U)=>K!==Q[U])||I.pageIndex!==q},Sc=function(I=!1){if(!this.annotationElementId)return;if(me(this,C,vi).call(this),!I&&(this.width===0||this.height===0)){setTimeout(()=>me(this,C,Sc).call(this,!0),0);return}const W=N._internalPadding*this.parentScale;j(this,A).rect=this.getRect(W,W)},Pt(N,"_freeTextDefaultContent",""),Pt(N,"_internalPadding",0),Pt(N,"_defaultColor",null),Pt(N,"_defaultFontSize",10),Pt(N,"_type","freetext");let p=N;t.FreeTextEditor=p},(e,t,i)=>{var H,te,jr,Mp,ue,Ae,Ee,Me,je,ke,ge,oe,G,ee,de,pe,ve,Te,se,re,$e,Le,Op,Io,Ec,Ac,Je,ct,st,De,be,xe,Qe,Cc,ht,le,Ne,Ge,jp,wc;Object.defineProperty(t,"__esModule",{value:!0}),t.StampAnnotationElement=t.InkAnnotationElement=t.FreeTextAnnotationElement=t.AnnotationLayer=void 0;var o=i(1),s=i(6),c=i(3),d=i(30),p=i(31),m=i(32);const f=1e3,h=9,v=new WeakSet;function y(Ke){return{width:Ke[2]-Ke[0],height:Ke[3]-Ke[1]}}class x{static create(ie){switch(ie.data.annotationType){case o.AnnotationType.LINK:return new S(ie);case o.AnnotationType.TEXT:return new A(ie);case o.AnnotationType.WIDGET:switch(ie.data.fieldType){case"Tx":return new T(ie);case"Btn":return ie.data.radioButton?new w(ie):ie.data.checkBox?new D(ie):new R(ie);case"Ch":return new _(ie);case"Sig":return new k(ie)}return new C(ie);case o.AnnotationType.POPUP:return new M(ie);case o.AnnotationType.FREETEXT:return new P(ie);case o.AnnotationType.LINE:return new L(ie);case o.AnnotationType.SQUARE:return new I(ie);case o.AnnotationType.CIRCLE:return new W(ie);case o.AnnotationType.POLYLINE:return new ae(ie);case o.AnnotationType.CARET:return new B(ie);case o.AnnotationType.INK:return new q(ie);case o.AnnotationType.POLYGON:return new Q(ie);case o.AnnotationType.HIGHLIGHT:return new K(ie);case o.AnnotationType.UNDERLINE:return new U(ie);case o.AnnotationType.SQUIGGLY:return new $(ie);case o.AnnotationType.STRIKEOUT:return new Y(ie);case o.AnnotationType.STAMP:return new z(ie);case o.AnnotationType.FILEATTACHMENT:return new O(ie);default:return new b(ie)}}}const X=class X{constructor(ie,{isRenderable:ne=!1,ignoreBorder:he=!1,createQuadrilaterals:_e=!1}={}){Se(this,H,!1);this.isRenderable=ne,this.data=ie.data,this.layer=ie.layer,this.linkService=ie.linkService,this.downloadManager=ie.downloadManager,this.imageResourcesPath=ie.imageResourcesPath,this.renderForms=ie.renderForms,this.svgFactory=ie.svgFactory,this.annotationStorage=ie.annotationStorage,this.enableScripting=ie.enableScripting,this.hasJSActions=ie.hasJSActions,this._fieldObjects=ie.fieldObjects,this.parent=ie.parent,ne&&(this.container=this._createContainer(he)),_e&&this._createQuadrilaterals()}static _hasPopupData({titleObj:ie,contentsObj:ne,richText:he}){return!!(ie!=null&&ie.str||ne!=null&&ne.str||he!=null&&he.str)}get hasPopupData(){return X._hasPopupData(this.data)}_createContainer(ie){const{data:ne,parent:{page:he,viewport:_e}}=this,Re=document.createElement("section");Re.setAttribute("data-annotation-id",ne.id),this instanceof C||(Re.tabIndex=f),Re.style.zIndex=this.parent.zIndex++,this.data.popupRef&&Re.setAttribute("aria-haspopup","dialog"),ne.noRotate&&Re.classList.add("norotate");const{pageWidth:Ie,pageHeight:Be,pageX:et,pageY:tt}=_e.rawDims;if(!ne.rect||this instanceof M){const{rotation:ot}=ne;return!ne.hasOwnCanvas&&ot!==0&&this.setRotation(ot,Re),Re}const{width:Ye,height:ut}=y(ne.rect),Ze=o.Util.normalizeRect([ne.rect[0],he.view[3]-ne.rect[1]+he.view[1],ne.rect[2],he.view[3]-ne.rect[3]+he.view[1]]);if(!ie&&ne.borderStyle.width>0){Re.style.borderWidth=`${ne.borderStyle.width}px`;const ot=ne.borderStyle.horizontalCornerRadius,ft=ne.borderStyle.verticalCornerRadius;if(ot>0||ft>0){const xt=`calc(${ot}px * var(--scale-factor)) / calc(${ft}px * var(--scale-factor))`;Re.style.borderRadius=xt}else if(this instanceof w){const xt=`calc(${Ye}px * var(--scale-factor)) / calc(${ut}px * var(--scale-factor))`;Re.style.borderRadius=xt}switch(ne.borderStyle.style){case o.AnnotationBorderStyleType.SOLID:Re.style.borderStyle="solid";break;case o.AnnotationBorderStyleType.DASHED:Re.style.borderStyle="dashed";break;case o.AnnotationBorderStyleType.BEVELED:(0,o.warn)("Unimplemented border style: beveled");break;case o.AnnotationBorderStyleType.INSET:(0,o.warn)("Unimplemented border style: inset");break;case o.AnnotationBorderStyleType.UNDERLINE:Re.style.borderBottomStyle="solid";break}const bt=ne.borderColor||null;bt?(Ce(this,H,!0),Re.style.borderColor=o.Util.makeHexColor(bt[0]|0,bt[1]|0,bt[2]|0)):Re.style.borderWidth=0}Re.style.left=`${100*(Ze[0]-et)/Ie}%`,Re.style.top=`${100*(Ze[1]-tt)/Be}%`;const{rotation:rt}=ne;return ne.hasOwnCanvas||rt===0?(Re.style.width=`${100*Ye/Ie}%`,Re.style.height=`${100*ut/Be}%`):this.setRotation(rt,Re),Re}setRotation(ie,ne=this.container){if(!this.data.rect)return;const{pageWidth:he,pageHeight:_e}=this.parent.viewport.rawDims,{width:Re,height:Ie}=y(this.data.rect);let Be,et;ie%180===0?(Be=100*Re/he,et=100*Ie/_e):(Be=100*Ie/he,et=100*Re/_e),ne.style.width=`${Be}%`,ne.style.height=`${et}%`,ne.setAttribute("data-main-rotation",(360-ie)%360)}get _commonActions(){const ie=(ne,he,_e)=>{const Re=_e.detail[ne],Ie=Re[0],Be=Re.slice(1);_e.target.style[he]=d.ColorConverters[`${Ie}_HTML`](Be),this.annotationStorage.setValue(this.data.id,{[he]:d.ColorConverters[`${Ie}_rgb`](Be)})};return(0,o.shadow)(this,"_commonActions",{display:ne=>{const{display:he}=ne.detail,_e=he%2===1;this.container.style.visibility=_e?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noView:_e,noPrint:he===1||he===2})},print:ne=>{this.annotationStorage.setValue(this.data.id,{noPrint:!ne.detail.print})},hidden:ne=>{const{hidden:he}=ne.detail;this.container.style.visibility=he?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noPrint:he,noView:he})},focus:ne=>{setTimeout(()=>ne.target.focus({preventScroll:!1}),0)},userName:ne=>{ne.target.title=ne.detail.userName},readonly:ne=>{ne.target.disabled=ne.detail.readonly},required:ne=>{this._setRequired(ne.target,ne.detail.required)},bgColor:ne=>{ie("bgColor","backgroundColor",ne)},fillColor:ne=>{ie("fillColor","backgroundColor",ne)},fgColor:ne=>{ie("fgColor","color",ne)},textColor:ne=>{ie("textColor","color",ne)},borderColor:ne=>{ie("borderColor","borderColor",ne)},strokeColor:ne=>{ie("strokeColor","borderColor",ne)},rotation:ne=>{const he=ne.detail.rotation;this.setRotation(he),this.annotationStorage.setValue(this.data.id,{rotation:he})}})}_dispatchEventFromSandbox(ie,ne){const he=this._commonActions;for(const _e of Object.keys(ne.detail)){const Re=ie[_e]||he[_e];Re==null||Re(ne)}}_setDefaultPropertiesFromJS(ie){if(!this.enableScripting)return;const ne=this.annotationStorage.getRawValue(this.data.id);if(!ne)return;const he=this._commonActions;for(const[_e,Re]of Object.entries(ne)){const Ie=he[_e];if(Ie){const Be={detail:{[_e]:Re},target:ie};Ie(Be),delete ne[_e]}}}_createQuadrilaterals(){if(!this.container)return;const{quadPoints:ie}=this.data;if(!ie)return;const[ne,he,_e,Re]=this.data.rect;if(ie.length===1){const[,{x:ft,y:bt},{x:xt,y:Et}]=ie[0];if(_e===ft&&Re===bt&&ne===xt&&he===Et)return}const{style:Ie}=this.container;let Be;if(j(this,H)){const{borderColor:ft,borderWidth:bt}=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="${bt}">`],this.container.classList.add("hasBorder")}const et=_e-ne,tt=Re-he,{svgFactory:Ye}=this,ut=Ye.createElement("svg");ut.classList.add("quadrilateralsContainer"),ut.setAttribute("width",0),ut.setAttribute("height",0);const Ze=Ye.createElement("defs");ut.append(Ze);const rt=Ye.createElement("clipPath"),ot=`clippath_${this.data.id}`;rt.setAttribute("id",ot),rt.setAttribute("clipPathUnits","objectBoundingBox"),Ze.append(rt);for(const[,{x:ft,y:bt},{x:xt,y:Et}]of ie){const Lt=Ye.createElement("rect"),mn=(xt-ne)/et,Jt=(Re-bt)/tt,tn=(ft-xt)/et,xi=(bt-Et)/tt;Lt.setAttribute("x",mn),Lt.setAttribute("y",Jt),Lt.setAttribute("width",tn),Lt.setAttribute("height",xi),rt.append(Lt),Be==null||Be.push(`<rect vector-effect="non-scaling-stroke" x="${mn}" y="${Jt}" width="${tn}" height="${xi}"/>`)}j(this,H)&&(Be.push("</g></svg>')"),Ie.backgroundImage=Be.join("")),this.container.append(ut),this.container.style.clipPath=`url(#${ot})`}_createPopup(){const{container:ie,data:ne}=this;ie.setAttribute("aria-haspopup","dialog");const he=new M({data:{color:ne.color,titleObj:ne.titleObj,modificationDate:ne.modificationDate,contentsObj:ne.contentsObj,richText:ne.richText,parentRect:ne.rect,borderStyle:0,id:`popup_${ne.id}`,rotation:ne.rotation},parent:this.parent,elements:[this]});this.parent.div.append(he.render())}render(){(0,o.unreachable)("Abstract method `AnnotationElement.render` called")}_getElementsByName(ie,ne=null){const he=[];if(this._fieldObjects){const _e=this._fieldObjects[ie];if(_e)for(const{page:Re,id:Ie,exportValues:Be}of _e){if(Re===-1||Ie===ne)continue;const et=typeof Be=="string"?Be:null,tt=document.querySelector(`[data-element-id="${Ie}"]`);if(tt&&!v.has(tt)){(0,o.warn)(`_getElementsByName - element not allowed: ${Ie}`);continue}he.push({id:Ie,exportValue:et,domElement:tt})}return he}for(const _e of document.getElementsByName(ie)){const{exportValue:Re}=_e,Ie=_e.getAttribute("data-element-id");Ie!==ne&&v.has(_e)&&he.push({id:Ie,exportValue:Re,domElement:_e})}return he}show(){var ie;this.container&&(this.container.hidden=!1),(ie=this.popup)==null||ie.maybeShow()}hide(){var ie;this.container&&(this.container.hidden=!0),(ie=this.popup)==null||ie.forceHide()}getElementsToTriggerPopup(){return this.container}addHighlightArea(){const ie=this.getElementsToTriggerPopup();if(Array.isArray(ie))for(const ne of ie)ne.classList.add("highlightArea");else ie.classList.add("highlightArea")}_editOnDoubleClick(){const{annotationEditorType:ie,data:{id:ne}}=this;this.container.addEventListener("dblclick",()=>{var he;(he=this.linkService.eventBus)==null||he.dispatch("switchannotationeditormode",{source:this,mode:ie,editId:ne})})}};H=new WeakMap;let b=X;class S extends b{constructor(ne,he=null){super(ne,{isRenderable:!0,ignoreBorder:!!(he!=null&&he.ignoreBorder),createQuadrilaterals:!0});Se(this,te);this.isTooltipOnly=ne.data.isTooltipOnly}render(){const{data:ne,linkService:he}=this,_e=document.createElement("a");_e.setAttribute("data-element-id",ne.id);let Re=!1;return ne.url?(he.addLinkAttributes(_e,ne.url,ne.newWindow),Re=!0):ne.action?(this._bindNamedAction(_e,ne.action),Re=!0):ne.attachment?(this._bindAttachment(_e,ne.attachment),Re=!0):ne.setOCGState?(me(this,te,Mp).call(this,_e,ne.setOCGState),Re=!0):ne.dest?(this._bindLink(_e,ne.dest),Re=!0):(ne.actions&&(ne.actions.Action||ne.actions["Mouse Up"]||ne.actions["Mouse Down"])&&this.enableScripting&&this.hasJSActions&&(this._bindJSAction(_e,ne),Re=!0),ne.resetForm?(this._bindResetFormAction(_e,ne.resetForm),Re=!0):this.isTooltipOnly&&!Re&&(this._bindLink(_e,""),Re=!0)),this.container.classList.add("linkAnnotation"),Re&&this.container.append(_e),this.container}_bindLink(ne,he){ne.href=this.linkService.getDestinationHash(he),ne.onclick=()=>(he&&this.linkService.goToDestination(he),!1),(he||he==="")&&me(this,te,jr).call(this)}_bindNamedAction(ne,he){ne.href=this.linkService.getAnchorUrl(""),ne.onclick=()=>(this.linkService.executeNamedAction(he),!1),me(this,te,jr).call(this)}_bindAttachment(ne,he){ne.href=this.linkService.getAnchorUrl(""),ne.onclick=()=>{var _e;return(_e=this.downloadManager)==null||_e.openOrDownloadData(this.container,he.content,he.filename),!1},me(this,te,jr).call(this)}_bindJSAction(ne,he){ne.href=this.linkService.getAnchorUrl("");const _e=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]);for(const Re of Object.keys(he.actions)){const Ie=_e.get(Re);Ie&&(ne[Ie]=()=>{var Be;return(Be=this.linkService.eventBus)==null||Be.dispatch("dispatcheventinsandbox",{source:this,detail:{id:he.id,name:Re}}),!1})}ne.onclick||(ne.onclick=()=>!1),me(this,te,jr).call(this)}_bindResetFormAction(ne,he){const _e=ne.onclick;if(_e||(ne.href=this.linkService.getAnchorUrl("")),me(this,te,jr).call(this),!this._fieldObjects){(0,o.warn)('_bindResetFormAction - "resetForm" action not supported, ensure that the `fieldObjects` parameter is provided.'),_e||(ne.onclick=()=>!1);return}ne.onclick=()=>{var ut;_e==null||_e();const{fields:Re,refs:Ie,include:Be}=he,et=[];if(Re.length!==0||Ie.length!==0){const Ze=new Set(Ie);for(const rt of Re){const ot=this._fieldObjects[rt]||[];for(const{id:ft}of ot)Ze.add(ft)}for(const rt of Object.values(this._fieldObjects))for(const ot of rt)Ze.has(ot.id)===Be&&et.push(ot)}else for(const Ze of Object.values(this._fieldObjects))et.push(...Ze);const tt=this.annotationStorage,Ye=[];for(const Ze of et){const{id:rt}=Ze;switch(Ye.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 ot=document.querySelector(`[data-element-id="${rt}"]`);if(ot){if(!v.has(ot)){(0,o.warn)(`_bindResetFormAction - element not allowed: ${rt}`);continue}}else continue;ot.dispatchEvent(new Event("resetform"))}return this.enableScripting&&((ut=this.linkService.eventBus)==null||ut.dispatch("dispatcheventinsandbox",{source:this,detail:{id:"app",ids:Ye,name:"ResetForm"}})),!1}}}te=new WeakSet,jr=function(){this.container.setAttribute("data-internal-link","")},Mp=function(ne,he){ne.href=this.linkService.getAnchorUrl(""),ne.onclick=()=>(this.linkService.executeSetOCGState(he),!1),me(this,te,jr).call(this)};class A extends b{constructor(ie){super(ie,{isRenderable:!0})}render(){this.container.classList.add("textAnnotation");const ie=document.createElement("img");return ie.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg",ie.alt="[{{type}} Annotation]",ie.dataset.l10nId="text_annotation_type",ie.dataset.l10nArgs=JSON.stringify({type:this.data.name}),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.append(ie),this.container}}class C extends b{render(){return this.data.alternativeText&&(this.container.title=this.data.alternativeText),this.container}showElementAndHideCanvas(ie){var ne;this.data.hasOwnCanvas&&(((ne=ie.previousSibling)==null?void 0:ne.nodeName)==="CANVAS"&&(ie.previousSibling.hidden=!0),ie.hidden=!1)}_getKeyModifier(ie){const{isWin:ne,isMac:he}=o.FeatureTest.platform;return ne&&ie.ctrlKey||he&&ie.metaKey}_setEventListener(ie,ne,he,_e,Re){he.includes("mouse")?ie.addEventListener(he,Ie=>{var Be;(Be=this.linkService.eventBus)==null||Be.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:_e,value:Re(Ie),shift:Ie.shiftKey,modifier:this._getKeyModifier(Ie)}})}):ie.addEventListener(he,Ie=>{var Be;if(he==="blur"){if(!ne.focused||!Ie.relatedTarget)return;ne.focused=!1}else if(he==="focus"){if(ne.focused)return;ne.focused=!0}Re&&((Be=this.linkService.eventBus)==null||Be.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:_e,value:Re(Ie)}}))})}_setEventListeners(ie,ne,he,_e){var Re,Ie,Be;for(const[et,tt]of he)(tt==="Action"||(Re=this.data.actions)!=null&&Re[tt])&&((tt==="Focus"||tt==="Blur")&&(ne||(ne={focused:!1})),this._setEventListener(ie,ne,et,tt,_e),tt==="Focus"&&!((Ie=this.data.actions)!=null&&Ie.Blur)?this._setEventListener(ie,ne,"blur","Blur",null):tt==="Blur"&&!((Be=this.data.actions)!=null&&Be.Focus)&&this._setEventListener(ie,ne,"focus","Focus",null))}_setBackgroundColor(ie){const ne=this.data.backgroundColor||null;ie.style.backgroundColor=ne===null?"transparent":o.Util.makeHexColor(ne[0],ne[1],ne[2])}_setTextStyle(ie){const ne=["left","center","right"],{fontColor:he}=this.data.defaultAppearanceData,_e=this.data.defaultAppearanceData.fontSize||h,Re=ie.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),Ye=Math.round(tt/(o.LINE_FACTOR*_e))||1,ut=tt/Ye;Ie=Math.min(_e,et(ut/o.LINE_FACTOR))}else{const tt=Math.abs(this.data.rect[3]-this.data.rect[1]-Be);Ie=Math.min(_e,et(tt/o.LINE_FACTOR))}Re.fontSize=`calc(${Ie}px * var(--scale-factor))`,Re.color=o.Util.makeHexColor(he[0],he[1],he[2]),this.data.textAlignment!==null&&(Re.textAlign=ne[this.data.textAlignment])}_setRequired(ie,ne){ne?ie.setAttribute("required",!0):ie.removeAttribute("required"),ie.setAttribute("aria-required",ne)}}class T extends C{constructor(ie){const ne=ie.renderForms||!ie.data.hasAppearance&&!!ie.data.fieldValue;super(ie,{isRenderable:ne})}setPropertyOnSiblings(ie,ne,he,_e){const Re=this.annotationStorage;for(const Ie of this._getElementsByName(ie.name,ie.id))Ie.domElement&&(Ie.domElement[ne]=he),Re.setValue(Ie.id,{[_e]:he})}render(){var _e,Re;const ie=this.annotationStorage,ne=this.data.id;this.container.classList.add("textWidgetAnnotation");let he=null;if(this.renderForms){const Ie=ie.getValue(ne,{value:this.data.fieldValue});let Be=Ie.value||"";const et=ie.getValue(ne,{charLimit:this.data.maxLen}).charLimit;et&&Be.length>et&&(Be=Be.slice(0,et));let tt=Ie.formattedValue||((_e=this.data.textContent)==null?void 0:_e.join(`
|
||
`))||null;tt&&this.data.comb&&(tt=tt.replaceAll(/\s+/g,""));const Ye={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),v.add(he),he.setAttribute("data-element-id",ne),he.disabled=this.data.readOnly,he.name=this.data.fieldName,he.tabIndex=f,this._setRequired(he,this.data.required),et&&(he.maxLength=et),he.addEventListener("input",Ze=>{ie.setValue(ne,{value:Ze.target.value}),this.setPropertyOnSiblings(he,"value",Ze.target.value,"value"),Ye.formattedValue=null}),he.addEventListener("resetform",Ze=>{const rt=this.data.defaultFieldValue??"";he.value=Ye.userValue=rt,Ye.formattedValue=null});let ut=Ze=>{const{formattedValue:rt}=Ye;rt!=null&&(Ze.target.value=rt),Ze.target.scrollLeft=0};if(this.enableScripting&&this.hasJSActions){he.addEventListener("focus",rt=>{if(Ye.focused)return;const{target:ot}=rt;Ye.userValue&&(ot.value=Ye.userValue),Ye.lastCommittedValue=ot.value,Ye.commitKey=1,Ye.focused=!0}),he.addEventListener("updatefromsandbox",rt=>{this.showElementAndHideCanvas(rt.target);const ot={value(ft){Ye.userValue=ft.detail.value??"",ie.setValue(ne,{value:Ye.userValue.toString()}),ft.target.value=Ye.userValue},formattedValue(ft){const{formattedValue:bt}=ft.detail;Ye.formattedValue=bt,bt!=null&&ft.target!==document.activeElement&&(ft.target.value=bt),ie.setValue(ne,{formattedValue:bt})},selRange(ft){ft.target.setSelectionRange(...ft.detail.selRange)},charLimit:ft=>{var Lt;const{charLimit:bt}=ft.detail,{target:xt}=ft;if(bt===0){xt.removeAttribute("maxLength");return}xt.setAttribute("maxLength",bt);let Et=Ye.userValue;!Et||Et.length<=bt||(Et=Et.slice(0,bt),xt.value=Ye.userValue=Et,ie.setValue(ne,{value:Et}),(Lt=this.linkService.eventBus)==null||Lt.dispatch("dispatcheventinsandbox",{source:this,detail:{id:ne,name:"Keystroke",value:Et,willCommit:!0,commitKey:1,selStart:xt.selectionStart,selEnd:xt.selectionEnd}}))}};this._dispatchEventFromSandbox(ot,rt)}),he.addEventListener("keydown",rt=>{var bt;Ye.commitKey=1;let ot=-1;if(rt.key==="Escape"?ot=0:rt.key==="Enter"&&!this.data.multiLine?ot=2:rt.key==="Tab"&&(Ye.commitKey=3),ot===-1)return;const{value:ft}=rt.target;Ye.lastCommittedValue!==ft&&(Ye.lastCommittedValue=ft,Ye.userValue=ft,(bt=this.linkService.eventBus)==null||bt.dispatch("dispatcheventinsandbox",{source:this,detail:{id:ne,name:"Keystroke",value:ft,willCommit:!0,commitKey:ot,selStart:rt.target.selectionStart,selEnd:rt.target.selectionEnd}}))});const Ze=ut;ut=null,he.addEventListener("blur",rt=>{var ft;if(!Ye.focused||!rt.relatedTarget)return;Ye.focused=!1;const{value:ot}=rt.target;Ye.userValue=ot,Ye.lastCommittedValue!==ot&&((ft=this.linkService.eventBus)==null||ft.dispatch("dispatcheventinsandbox",{source:this,detail:{id:ne,name:"Keystroke",value:ot,willCommit:!0,commitKey:Ye.commitKey,selStart:rt.target.selectionStart,selEnd:rt.target.selectionEnd}})),Ze(rt)}),(Re=this.data.actions)!=null&&Re.Keystroke&&he.addEventListener("beforeinput",rt=>{var Jt;Ye.lastCommittedValue=null;const{data:ot,target:ft}=rt,{value:bt,selectionStart:xt,selectionEnd:Et}=ft;let Lt=xt,mn=Et;switch(rt.inputType){case"deleteWordBackward":{const tn=bt.substring(0,xt).match(/\w*[^\w]*$/);tn&&(Lt-=tn[0].length);break}case"deleteWordForward":{const tn=bt.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:ne,name:"Keystroke",value:bt,change:ot||"",willCommit:!1,selStart:Lt,selEnd:mn}})}),this._setEventListeners(he,Ye,[["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 k extends C{constructor(ie){super(ie,{isRenderable:!!ie.data.hasOwnCanvas})}}class D extends C{constructor(ie){super(ie,{isRenderable:ie.renderForms})}render(){const ie=this.annotationStorage,ne=this.data,he=ne.id;let _e=ie.getValue(he,{value:ne.exportValue===ne.fieldValue}).value;typeof _e=="string"&&(_e=_e!=="Off",ie.setValue(he,{value:_e})),this.container.classList.add("buttonWidgetAnnotation","checkBox");const Re=document.createElement("input");return v.add(Re),Re.setAttribute("data-element-id",he),Re.disabled=ne.readOnly,this._setRequired(Re,this.data.required),Re.type="checkbox",Re.name=ne.fieldName,_e&&Re.setAttribute("checked",!0),Re.setAttribute("exportValue",ne.exportValue),Re.tabIndex=f,Re.addEventListener("change",Ie=>{const{name:Be,checked:et}=Ie.target;for(const tt of this._getElementsByName(Be,he)){const Ye=et&&tt.exportValue===ne.exportValue;tt.domElement&&(tt.domElement.checked=Ye),ie.setValue(tt.id,{value:Ye})}ie.setValue(he,{value:et})}),Re.addEventListener("resetform",Ie=>{const Be=ne.defaultFieldValue||"Off";Ie.target.checked=Be===ne.exportValue}),this.enableScripting&&this.hasJSActions&&(Re.addEventListener("updatefromsandbox",Ie=>{const Be={value(et){et.target.checked=et.detail.value!=="Off",ie.setValue(he,{value:et.target.checked})}};this._dispatchEventFromSandbox(Be,Ie)}),this._setEventListeners(Re,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(Re),this._setDefaultPropertiesFromJS(Re),this.container.append(Re),this.container}}class w extends C{constructor(ie){super(ie,{isRenderable:ie.renderForms})}render(){this.container.classList.add("buttonWidgetAnnotation","radioButton");const ie=this.annotationStorage,ne=this.data,he=ne.id;let _e=ie.getValue(he,{value:ne.fieldValue===ne.buttonValue}).value;typeof _e=="string"&&(_e=_e!==ne.buttonValue,ie.setValue(he,{value:_e}));const Re=document.createElement("input");if(v.add(Re),Re.setAttribute("data-element-id",he),Re.disabled=ne.readOnly,this._setRequired(Re,this.data.required),Re.type="radio",Re.name=ne.fieldName,_e&&Re.setAttribute("checked",!0),Re.tabIndex=f,Re.addEventListener("change",Ie=>{const{name:Be,checked:et}=Ie.target;for(const tt of this._getElementsByName(Be,he))ie.setValue(tt.id,{value:!1});ie.setValue(he,{value:et})}),Re.addEventListener("resetform",Ie=>{const Be=ne.defaultFieldValue;Ie.target.checked=Be!=null&&Be===ne.buttonValue}),this.enableScripting&&this.hasJSActions){const Ie=ne.buttonValue;Re.addEventListener("updatefromsandbox",Be=>{const et={value:tt=>{const Ye=Ie===tt.detail.value;for(const ut of this._getElementsByName(tt.target.name)){const Ze=Ye&&ut.id===he;ut.domElement&&(ut.domElement.checked=Ze),ie.setValue(ut.id,{value:Ze})}}};this._dispatchEventFromSandbox(et,Be)}),this._setEventListeners(Re,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(Re),this._setDefaultPropertiesFromJS(Re),this.container.append(Re),this.container}}class R extends S{constructor(ie){super(ie,{ignoreBorder:ie.data.hasAppearance})}render(){const ie=super.render();ie.classList.add("buttonWidgetAnnotation","pushButton"),this.data.alternativeText&&(ie.title=this.data.alternativeText);const ne=ie.lastChild;return this.enableScripting&&this.hasJSActions&&ne&&(this._setDefaultPropertiesFromJS(ne),ne.addEventListener("updatefromsandbox",he=>{this._dispatchEventFromSandbox({},he)})),ie}}class _ extends C{constructor(ie){super(ie,{isRenderable:ie.renderForms})}render(){this.container.classList.add("choiceWidgetAnnotation");const ie=this.annotationStorage,ne=this.data.id,he=ie.getValue(ne,{value:this.data.fieldValue}),_e=document.createElement("select");v.add(_e),_e.setAttribute("data-element-id",ne),_e.disabled=this.data.readOnly,this._setRequired(_e,this.data.required),_e.name=this.data.fieldName,_e.tabIndex=f;let Re=this.data.combo&&this.data.options.length>0;this.data.combo||(_e.size=this.data.options.length,this.data.multiSelect&&(_e.multiple=!0)),_e.addEventListener("resetform",Ye=>{const ut=this.data.defaultFieldValue;for(const Ze of _e.options)Ze.selected=Ze.value===ut});for(const Ye of this.data.options){const ut=document.createElement("option");ut.textContent=Ye.displayValue,ut.value=Ye.exportValue,he.value.includes(Ye.exportValue)&&(ut.setAttribute("selected",!0),Re=!1),_e.append(ut)}let Ie=null;if(Re){const Ye=document.createElement("option");Ye.value=" ",Ye.setAttribute("hidden",!0),Ye.setAttribute("selected",!0),_e.prepend(Ye),Ie=()=>{Ye.remove(),_e.removeEventListener("input",Ie),Ie=null},_e.addEventListener("input",Ie)}const Be=Ye=>{const ut=Ye?"value":"textContent",{options:Ze,multiple:rt}=_e;return rt?Array.prototype.filter.call(Ze,ot=>ot.selected).map(ot=>ot[ut]):Ze.selectedIndex===-1?null:Ze[Ze.selectedIndex][ut]};let et=Be(!1);const tt=Ye=>{const ut=Ye.target.options;return Array.prototype.map.call(ut,Ze=>({displayValue:Ze.textContent,exportValue:Ze.value}))};return this.enableScripting&&this.hasJSActions?(_e.addEventListener("updatefromsandbox",Ye=>{const ut={value(Ze){Ie==null||Ie();const rt=Ze.detail.value,ot=new Set(Array.isArray(rt)?rt:[rt]);for(const ft of _e.options)ft.selected=ot.has(ft.value);ie.setValue(ne,{value:Be(!0)}),et=Be(!1)},multipleSelection(Ze){_e.multiple=!0},remove(Ze){const rt=_e.options,ot=Ze.detail.remove;rt[ot].selected=!1,_e.remove(ot),rt.length>0&&Array.prototype.findIndex.call(rt,bt=>bt.selected)===-1&&(rt[0].selected=!0),ie.setValue(ne,{value:Be(!0),items:tt(Ze)}),et=Be(!1)},clear(Ze){for(;_e.length!==0;)_e.remove(0);ie.setValue(ne,{value:null,items:[]}),et=Be(!1)},insert(Ze){const{index:rt,displayValue:ot,exportValue:ft}=Ze.detail.insert,bt=_e.children[rt],xt=document.createElement("option");xt.textContent=ot,xt.value=ft,bt?bt.before(xt):_e.append(xt),ie.setValue(ne,{value:Be(!0),items:tt(Ze)}),et=Be(!1)},items(Ze){const{items:rt}=Ze.detail;for(;_e.length!==0;)_e.remove(0);for(const ot of rt){const{displayValue:ft,exportValue:bt}=ot,xt=document.createElement("option");xt.textContent=ft,xt.value=bt,_e.append(xt)}_e.options.length>0&&(_e.options[0].selected=!0),ie.setValue(ne,{value:Be(!0),items:tt(Ze)}),et=Be(!1)},indices(Ze){const rt=new Set(Ze.detail.indices);for(const ot of Ze.target.options)ot.selected=rt.has(ot.index);ie.setValue(ne,{value:Be(!0)}),et=Be(!1)},editable(Ze){Ze.target.disabled=!Ze.detail.editable}};this._dispatchEventFromSandbox(ut,Ye)}),_e.addEventListener("input",Ye=>{var Ze;const ut=Be(!0);ie.setValue(ne,{value:ut}),Ye.preventDefault(),(Ze=this.linkService.eventBus)==null||Ze.dispatch("dispatcheventinsandbox",{source:this,detail:{id:ne,name:"Keystroke",value:et,changeEx:ut,willCommit:!1,commitKey:1,keyDown:!1}})}),this._setEventListeners(_e,null,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"],["input","Action"],["input","Validate"]],Ye=>Ye.target.value)):_e.addEventListener("input",function(Ye){ie.setValue(ne,{value:Be(!0)})}),this.data.combo&&this._setTextStyle(_e),this._setBackgroundColor(_e),this._setDefaultPropertiesFromJS(_e),this.container.append(_e),this.container}}class M extends b{constructor(ie){const{data:ne,elements:he}=ie;super(ie,{isRenderable:b._hasPopupData(ne)}),this.elements=he}render(){this.container.classList.add("popupAnnotation");const ie=new N({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}),ne=[];for(const he of this.elements)he.popup=ie,ne.push(he.data.id),he.addHighlightArea();return this.container.setAttribute("aria-controls",ne.map(he=>`${o.AnnotationPrefix}${he}`).join(",")),this.container}}class N{constructor({container:ie,color:ne,elements:he,titleObj:_e,modificationDate:Re,contentsObj:Ie,richText:Be,parent:et,rect:tt,parentRect:Ye,open:ut}){Se(this,Le);Se(this,ue,null);Se(this,Ae,me(this,Le,Op).bind(this));Se(this,Ee,me(this,Le,Ac).bind(this));Se(this,Me,me(this,Le,Ec).bind(this));Se(this,je,me(this,Le,Io).bind(this));Se(this,ke,null);Se(this,ge,null);Se(this,oe,null);Se(this,G,null);Se(this,ee,null);Se(this,de,null);Se(this,pe,!1);Se(this,ve,null);Se(this,Te,null);Se(this,se,null);Se(this,re,null);Se(this,$e,!1);var rt;Ce(this,ge,ie),Ce(this,re,_e),Ce(this,oe,Ie),Ce(this,se,Be),Ce(this,ee,et),Ce(this,ke,ne),Ce(this,Te,tt),Ce(this,de,Ye),Ce(this,G,he);const Ze=s.PDFDateString.toDateObject(Re);Ze&&Ce(this,ue,et.l10n.get("annotation_date_string",{date:Ze.toLocaleDateString(),time:Ze.toLocaleTimeString()})),this.trigger=he.flatMap(ot=>ot.getElementsToTriggerPopup());for(const ot of this.trigger)ot.addEventListener("click",j(this,je)),ot.addEventListener("mouseenter",j(this,Me)),ot.addEventListener("mouseleave",j(this,Ee)),ot.classList.add("popupTriggerArea");for(const ot of he)(rt=ot.container)==null||rt.addEventListener("keydown",j(this,Ae));j(this,ge).hidden=!0,ut&&me(this,Le,Io).call(this)}render(){if(j(this,ve))return;const{page:{view:ie},viewport:{rawDims:{pageWidth:ne,pageHeight:he,pageX:_e,pageY:Re}}}=j(this,ee),Ie=Ce(this,ve,document.createElement("div"));if(Ie.className="popup",j(this,ke)){const Lt=Ie.style.outlineColor=o.Util.makeHexColor(...j(this,ke));CSS.supports("background-color","color-mix(in srgb, red 30%, white)")?Ie.style.backgroundColor=`color-mix(in srgb, ${Lt} 30%, white)`:Ie.style.backgroundColor=o.Util.makeHexColor(...j(this,ke).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}=j(this,re),Ie.append(Be),j(this,ue)){const Lt=document.createElement("span");Lt.classList.add("popupDate"),j(this,ue).then(mn=>{Lt.textContent=mn}),Be.append(Lt)}const tt=j(this,oe),Ye=j(this,se);if(Ye!=null&&Ye.str&&(!(tt!=null&&tt.str)||tt.str===Ye.str))m.XfaLayer.render({xfaHtml:Ye.html,intent:"richText",div:Ie}),Ie.lastChild.classList.add("richText","popupContent");else{const Lt=this._formatContents(tt);Ie.append(Lt)}let ut=!!j(this,de),Ze=ut?j(this,de):j(this,Te);for(const Lt of j(this,G))if(!Ze||o.Util.intersect(Lt.data.rect,Ze)!==null){Ze=Lt.data.rect,ut=!0;break}const rt=o.Util.normalizeRect([Ze[0],ie[3]-Ze[1]+ie[1],Ze[2],ie[3]-Ze[3]+ie[1]]),ft=ut?Ze[2]-Ze[0]+5:0,bt=rt[0]+ft,xt=rt[1],{style:Et}=j(this,ge);Et.left=`${100*(bt-_e)/ne}%`,Et.top=`${100*(xt-Re)/he}%`,j(this,ge).append(Ie)}_formatContents({str:ie,dir:ne}){const he=document.createElement("p");he.classList.add("popupContent"),he.dir=ne;const _e=ie.split(/(?:\r\n?|\n)/);for(let Re=0,Ie=_e.length;Re<Ie;++Re){const Be=_e[Re];he.append(document.createTextNode(Be)),Re<Ie-1&&he.append(document.createElement("br"))}return he}forceHide(){Ce(this,$e,this.isVisible),j(this,$e)&&(j(this,ge).hidden=!0)}maybeShow(){j(this,$e)&&(Ce(this,$e,!1),j(this,ge).hidden=!1)}get isVisible(){return j(this,ge).hidden===!1}}ue=new WeakMap,Ae=new WeakMap,Ee=new WeakMap,Me=new WeakMap,je=new WeakMap,ke=new WeakMap,ge=new WeakMap,oe=new WeakMap,G=new WeakMap,ee=new WeakMap,de=new WeakMap,pe=new WeakMap,ve=new WeakMap,Te=new WeakMap,se=new WeakMap,re=new WeakMap,$e=new WeakMap,Le=new WeakSet,Op=function(ie){ie.altKey||ie.shiftKey||ie.ctrlKey||ie.metaKey||(ie.key==="Enter"||ie.key==="Escape"&&j(this,pe))&&me(this,Le,Io).call(this)},Io=function(){Ce(this,pe,!j(this,pe)),j(this,pe)?(me(this,Le,Ec).call(this),j(this,ge).addEventListener("click",j(this,je)),j(this,ge).addEventListener("keydown",j(this,Ae))):(me(this,Le,Ac).call(this),j(this,ge).removeEventListener("click",j(this,je)),j(this,ge).removeEventListener("keydown",j(this,Ae)))},Ec=function(){j(this,ve)||this.render(),this.isVisible?j(this,pe)&&j(this,ge).classList.add("focused"):(j(this,ge).hidden=!1,j(this,ge).style.zIndex=parseInt(j(this,ge).style.zIndex)+1e3)},Ac=function(){j(this,ge).classList.remove("focused"),!(j(this,pe)||!this.isVisible)&&(j(this,ge).hidden=!0,j(this,ge).style.zIndex=parseInt(j(this,ge).style.zIndex)-1e3)};class P extends b{constructor(ie){super(ie,{isRenderable:!0,ignoreBorder:!0}),this.textContent=ie.data.textContent,this.textPosition=ie.data.textPosition,this.annotationEditorType=o.AnnotationEditorType.FREETEXT}render(){if(this.container.classList.add("freeTextAnnotation"),this.textContent){const ie=document.createElement("div");ie.classList.add("annotationTextContent"),ie.setAttribute("role","comment");for(const ne of this.textContent){const he=document.createElement("span");he.textContent=ne,ie.append(he)}this.container.append(ie)}return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this._editOnDoubleClick(),this.container}}t.FreeTextAnnotationElement=P;class L extends b{constructor(ne){super(ne,{isRenderable:!0,ignoreBorder:!0});Se(this,Je,null)}render(){this.container.classList.add("lineAnnotation");const ne=this.data,{width:he,height:_e}=y(ne.rect),Re=this.svgFactory.create(he,_e,!0),Ie=Ce(this,Je,this.svgFactory.createElement("svg:line"));return Ie.setAttribute("x1",ne.rect[2]-ne.lineCoordinates[0]),Ie.setAttribute("y1",ne.rect[3]-ne.lineCoordinates[1]),Ie.setAttribute("x2",ne.rect[2]-ne.lineCoordinates[2]),Ie.setAttribute("y2",ne.rect[3]-ne.lineCoordinates[3]),Ie.setAttribute("stroke-width",ne.borderStyle.width||1),Ie.setAttribute("stroke","transparent"),Ie.setAttribute("fill","transparent"),Re.append(Ie),this.container.append(Re),!ne.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return j(this,Je)}addHighlightArea(){this.container.classList.add("highlightArea")}}Je=new WeakMap;class I extends b{constructor(ne){super(ne,{isRenderable:!0,ignoreBorder:!0});Se(this,ct,null)}render(){this.container.classList.add("squareAnnotation");const ne=this.data,{width:he,height:_e}=y(ne.rect),Re=this.svgFactory.create(he,_e,!0),Ie=ne.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",_e-Ie),Be.setAttribute("stroke-width",Ie||1),Be.setAttribute("stroke","transparent"),Be.setAttribute("fill","transparent"),Re.append(Be),this.container.append(Re),!ne.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return j(this,ct)}addHighlightArea(){this.container.classList.add("highlightArea")}}ct=new WeakMap;class W extends b{constructor(ne){super(ne,{isRenderable:!0,ignoreBorder:!0});Se(this,st,null)}render(){this.container.classList.add("circleAnnotation");const ne=this.data,{width:he,height:_e}=y(ne.rect),Re=this.svgFactory.create(he,_e,!0),Ie=ne.borderStyle.width,Be=Ce(this,st,this.svgFactory.createElement("svg:ellipse"));return Be.setAttribute("cx",he/2),Be.setAttribute("cy",_e/2),Be.setAttribute("rx",he/2-Ie/2),Be.setAttribute("ry",_e/2-Ie/2),Be.setAttribute("stroke-width",Ie||1),Be.setAttribute("stroke","transparent"),Be.setAttribute("fill","transparent"),Re.append(Be),this.container.append(Re),!ne.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return j(this,st)}addHighlightArea(){this.container.classList.add("highlightArea")}}st=new WeakMap;class ae extends b{constructor(ne){super(ne,{isRenderable:!0,ignoreBorder:!0});Se(this,De,null);this.containerClassName="polylineAnnotation",this.svgElementName="svg:polyline"}render(){this.container.classList.add(this.containerClassName);const ne=this.data,{width:he,height:_e}=y(ne.rect),Re=this.svgFactory.create(he,_e,!0);let Ie=[];for(const et of ne.vertices){const tt=et.x-ne.rect[0],Ye=ne.rect[3]-et.y;Ie.push(tt+","+Ye)}Ie=Ie.join(" ");const Be=Ce(this,De,this.svgFactory.createElement(this.svgElementName));return Be.setAttribute("points",Ie),Be.setAttribute("stroke-width",ne.borderStyle.width||1),Be.setAttribute("stroke","transparent"),Be.setAttribute("fill","transparent"),Re.append(Be),this.container.append(Re),!ne.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return j(this,De)}addHighlightArea(){this.container.classList.add("highlightArea")}}De=new WeakMap;class Q extends ae{constructor(ie){super(ie),this.containerClassName="polygonAnnotation",this.svgElementName="svg:polygon"}}class B extends b{constructor(ie){super(ie,{isRenderable:!0,ignoreBorder:!0})}render(){return this.container.classList.add("caretAnnotation"),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container}}class q extends b{constructor(ne){super(ne,{isRenderable:!0,ignoreBorder:!0});Se(this,be,[]);this.containerClassName="inkAnnotation",this.svgElementName="svg:polyline",this.annotationEditorType=o.AnnotationEditorType.INK}render(){this.container.classList.add(this.containerClassName);const ne=this.data,{width:he,height:_e}=y(ne.rect),Re=this.svgFactory.create(he,_e,!0);for(const Ie of ne.inkLists){let Be=[];for(const tt of Ie){const Ye=tt.x-ne.rect[0],ut=ne.rect[3]-tt.y;Be.push(`${Ye},${ut}`)}Be=Be.join(" ");const et=this.svgFactory.createElement(this.svgElementName);j(this,be).push(et),et.setAttribute("points",Be),et.setAttribute("stroke-width",ne.borderStyle.width||1),et.setAttribute("stroke","transparent"),et.setAttribute("fill","transparent"),!ne.popupRef&&this.hasPopupData&&this._createPopup(),Re.append(et)}return this.container.append(Re),this.container}getElementsToTriggerPopup(){return j(this,be)}addHighlightArea(){this.container.classList.add("highlightArea")}}be=new WeakMap,t.InkAnnotationElement=q;class K extends b{constructor(ie){super(ie,{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 b{constructor(ie){super(ie,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("underlineAnnotation"),this.container}}class $ extends b{constructor(ie){super(ie,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("squigglyAnnotation"),this.container}}class Y extends b{constructor(ie){super(ie,{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 b{constructor(ie){super(ie,{isRenderable:!0,ignoreBorder:!0})}render(){return this.container.classList.add("stampAnnotation"),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container}}t.StampAnnotationElement=z;class O extends b{constructor(ne){var Re;super(ne,{isRenderable:!0});Se(this,Qe);Se(this,xe,null);const{filename:he,content:_e}=this.data.file;this.filename=(0,s.getFilenameFromUrl)(he,!0),this.content=_e,(Re=this.linkService.eventBus)==null||Re.dispatch("fileattachmentannotation",{source:this,filename:he,content:_e})}render(){this.container.classList.add("fileAttachmentAnnotation");const{container:ne,data:he}=this;let _e;he.hasAppearance||he.fillAlpha===0?_e=document.createElement("div"):(_e=document.createElement("img"),_e.src=`${this.imageResourcesPath}annotation-${/paperclip/i.test(he.name)?"paperclip":"pushpin"}.svg`,he.fillAlpha&&he.fillAlpha<1&&(_e.style=`filter: opacity(${Math.round(he.fillAlpha*100)}%);`)),_e.addEventListener("dblclick",me(this,Qe,Cc).bind(this)),Ce(this,xe,_e);const{isMac:Re}=o.FeatureTest.platform;return ne.addEventListener("keydown",Ie=>{Ie.key==="Enter"&&(Re?Ie.metaKey:Ie.ctrlKey)&&me(this,Qe,Cc).call(this)}),!he.popupRef&&this.hasPopupData?this._createPopup():_e.classList.add("popupTriggerArea"),ne.append(_e),ne}getElementsToTriggerPopup(){return j(this,xe)}addHighlightArea(){this.container.classList.add("highlightArea")}}xe=new WeakMap,Qe=new WeakSet,Cc=function(){var ne;(ne=this.downloadManager)==null||ne.openOrDownloadData(this.container,this.content,this.filename)};class F{constructor({div:ie,accessibilityManager:ne,annotationCanvasMap:he,l10n:_e,page:Re,viewport:Ie}){Se(this,Ge);Se(this,ht,null);Se(this,le,null);Se(this,Ne,new Map);this.div=ie,Ce(this,ht,ne),Ce(this,le,he),this.l10n=_e,this.page=Re,this.viewport=Ie,this.zIndex=0,this.l10n||(this.l10n=p.NullL10n)}async render(ie){const{annotations:ne}=ie,he=this.div;(0,s.setLayerDimensions)(he,this.viewport);const _e=new Map,Re={data:null,layer:he,linkService:ie.linkService,downloadManager:ie.downloadManager,imageResourcesPath:ie.imageResourcesPath||"",renderForms:ie.renderForms!==!1,svgFactory:new s.DOMSVGFactory,annotationStorage:ie.annotationStorage||new c.AnnotationStorage,enableScripting:ie.enableScripting===!0,hasJSActions:ie.hasJSActions,fieldObjects:ie.fieldObjects,parent:this,elements:null};for(const Ie of ne){if(Ie.noHTML)continue;const Be=Ie.annotationType===o.AnnotationType.POPUP;if(Be){const Ye=_e.get(Ie.id);if(!Ye)continue;Re.elements=Ye}else{const{width:Ye,height:ut}=y(Ie.rect);if(Ye<=0||ut<=0)continue}Re.data=Ie;const et=x.create(Re);if(!et.isRenderable)continue;if(!Be&&Ie.popupRef){const Ye=_e.get(Ie.popupRef);Ye?Ye.push(et):_e.set(Ie.popupRef,[et])}et.annotationEditorType>0&&j(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,wc).call(this),await this.l10n.translate(he)}update({viewport:ie}){const ne=this.div;this.viewport=ie,(0,s.setLayerDimensions)(ne,{rotation:ie.rotation}),me(this,Ge,wc).call(this),ne.hidden=!1}getEditableAnnotations(){return Array.from(j(this,Ne).values())}getEditableAnnotation(ie){return j(this,Ne).get(ie)}}ht=new WeakMap,le=new WeakMap,Ne=new WeakMap,Ge=new WeakSet,jp=function(ie,ne){var _e;const he=ie.firstChild||ie;he.id=`${o.AnnotationPrefix}${ne}`,this.div.append(ie),(_e=j(this,ht))==null||_e.moveElementInDOM(this.div,ie,he,!1)},wc=function(){if(!j(this,le))return;const ie=this.div;for(const[ne,he]of j(this,le)){const _e=ie.querySelector(`[data-annotation-id="${ne}"]`);if(!_e)continue;const{firstChild:Re}=_e;Re?Re.nodeName==="CANVAS"?Re.replaceWith(he):Re.before(he):_e.append(he)}j(this,le).clear()},t.AnnotationLayer=F},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ColorConverters=void 0;function i(c){return Math.floor(Math.max(0,Math.min(1,c))*255).toString(16).padStart(2,"0")}function o(c){return Math.max(0,Math.min(255,255*c))}class s{static CMYK_G([d,p,m,f]){return["G",1-Math.min(1,.3*d+.59*m+.11*p+f)]}static G_CMYK([d]){return["CMYK",0,0,0,1-d]}static G_RGB([d]){return["RGB",d,d,d]}static G_rgb([d]){return d=o(d),[d,d,d]}static G_HTML([d]){const p=i(d);return`#${p}${p}${p}`}static RGB_G([d,p,m]){return["G",.3*d+.59*p+.11*m]}static RGB_rgb(d){return d.map(o)}static RGB_HTML(d){return`#${d.map(i).join("")}`}static T_HTML(){return"#00000000"}static T_rgb(){return[null]}static CMYK_RGB([d,p,m,f]){return["RGB",1-Math.min(1,d+f),1-Math.min(1,m+f),1-Math.min(1,p+f)]}static CMYK_rgb([d,p,m,f]){return[o(1-Math.min(1,d+f)),o(1-Math.min(1,m+f)),o(1-Math.min(1,p+f))]}static CMYK_HTML(d){const p=this.CMYK_RGB(d).slice(1);return this.RGB_HTML(p)}static RGB_CMYK([d,p,m]){const f=1-d,h=1-p,v=1-m,y=Math.min(f,h,v);return["CMYK",f,h,v,y]}}t.ColorConverters=s},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NullL10n=void 0,t.getL10nFallback=o;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 o(d,p){switch(d){case"find_match_count":d=`find_match_count[${p.total===1?"one":"other"}]`;break;case"find_match_count_limit":d=`find_match_count_limit[${p.limit===1?"one":"other"}]`;break}return i[d]||""}function s(d,p){return p?d.replaceAll(/\{\{\s*(\w+)\s*\}\}/g,(m,f)=>f in p?p[f]:"{{"+f+"}}"):d}const c={async getLanguage(){return"en-us"},async getDirection(){return"ltr"},async get(d,p=null,m=o(d,p)){return s(m,p)},async translate(d){}};t.NullL10n=c},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.XfaLayer=void 0;var o=i(25);class s{static setupStorage(d,p,m,f,h){const v=f.getValue(p,{value:null});switch(m.name){case"textarea":if(v.value!==null&&(d.textContent=v.value),h==="print")break;d.addEventListener("input",y=>{f.setValue(p,{value:y.target.value})});break;case"input":if(m.attributes.type==="radio"||m.attributes.type==="checkbox"){if(v.value===m.attributes.xfaOn?d.setAttribute("checked",!0):v.value===m.attributes.xfaOff&&d.removeAttribute("checked"),h==="print")break;d.addEventListener("change",y=>{f.setValue(p,{value:y.target.checked?y.target.getAttribute("xfaOn"):y.target.getAttribute("xfaOff")})})}else{if(v.value!==null&&d.setAttribute("value",v.value),h==="print")break;d.addEventListener("input",y=>{f.setValue(p,{value:y.target.value})})}break;case"select":if(v.value!==null){d.setAttribute("value",v.value);for(const y of m.children)y.attributes.value===v.value?y.attributes.selected=!0:y.attributes.hasOwnProperty("selected")&&delete y.attributes.selected}d.addEventListener("input",y=>{const x=y.target.options,b=x.selectedIndex===-1?"":x[x.selectedIndex].value;f.setValue(p,{value:b})});break}}static setAttributes({html:d,element:p,storage:m=null,intent:f,linkService:h}){const{attributes:v}=p,y=d instanceof HTMLAnchorElement;v.type==="radio"&&(v.name=`${v.name}-${f}`);for(const[x,b]of Object.entries(v))if(b!=null)switch(x){case"class":b.length&&d.setAttribute(x,b.join(" "));break;case"dataId":break;case"id":d.setAttribute("data-element-id",b);break;case"style":Object.assign(d.style,b);break;case"textContent":d.textContent=b;break;default:(!y||x!=="href"&&x!=="newWindow")&&d.setAttribute(x,b)}y&&h.addLinkAttributes(d,v.href,v.newWindow),m&&v.dataId&&this.setupStorage(d,v.dataId,p,m)}static render(d){var S;const p=d.annotationStorage,m=d.linkService,f=d.xfaHtml,h=d.intent||"display",v=document.createElement(f.name);f.attributes&&this.setAttributes({html:v,element:f,intent:h,linkService:m});const y=[[f,-1,v]],x=d.div;if(x.append(v),d.viewport){const A=`matrix(${d.viewport.transform.join(",")})`;x.style.transform=A}h!=="richText"&&x.setAttribute("class","xfaLayer xfaFont");const b=[];for(;y.length>0;){const[A,C,T]=y.at(-1);if(C+1===A.children.length){y.pop();continue}const k=A.children[++y.at(-1)[1]];if(k===null)continue;const{name:D}=k;if(D==="#text"){const R=document.createTextNode(k.value);b.push(R),T.append(R);continue}const w=(S=k==null?void 0:k.attributes)!=null&&S.xmlns?document.createElementNS(k.attributes.xmlns,D):document.createElement(D);if(T.append(w),k.attributes&&this.setAttributes({html:w,element:k,storage:p,intent:h,linkService:m}),k.children&&k.children.length>0)y.push([k,-1,w]);else if(k.value){const R=document.createTextNode(k.value);o.XfaText.shouldBuildText(D)&&b.push(R),w.append(R)}}for(const A of x.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea"))A.setAttribute("readOnly",!0);return{textDivs:b}}static update(d){const p=`matrix(${d.viewport.transform.join(",")})`;d.div.style.transform=p,d.div.hidden=!1}}t.XfaLayer=s},(e,t,i)=>{var f,h,v,y,x,b,S,A,C,T,k,D,w,R,_,Lp,Np,Fp,$p,_c,Ip,Rc,zp,Bp,Up,Hp,Vp,Xn,Tc,zo,Bo,ba,kc,Uo,te,qp,Pc,Gp,Wp,Dc,Ho,ya;Object.defineProperty(t,"__esModule",{value:!0}),t.InkEditor=void 0;var o=i(1),s=i(4),c=i(29),d=i(6),p=i(5);const ke=class ke extends s.AnnotationEditor{constructor(G){super({...G,name:"inkEditor"});Se(this,_);Se(this,f,0);Se(this,h,0);Se(this,v,this.canvasPointermove.bind(this));Se(this,y,this.canvasPointerleave.bind(this));Se(this,x,this.canvasPointerup.bind(this));Se(this,b,this.canvasPointerdown.bind(this));Se(this,S,new Path2D);Se(this,A,!1);Se(this,C,!1);Se(this,T,!1);Se(this,k,null);Se(this,D,0);Se(this,w,0);Se(this,R,null);this.color=G.color||null,this.thickness=G.thickness||null,this.opacity=G.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(G){s.AnnotationEditor.initialize(G,{strings:["editor_ink_canvas_aria_label","editor_ink2_aria_label"]})}static updateDefaultParams(G,ee){switch(G){case o.AnnotationEditorParamsType.INK_THICKNESS:ke._defaultThickness=ee;break;case o.AnnotationEditorParamsType.INK_COLOR:ke._defaultColor=ee;break;case o.AnnotationEditorParamsType.INK_OPACITY:ke._defaultOpacity=ee/100;break}}updateParams(G,ee){switch(G){case o.AnnotationEditorParamsType.INK_THICKNESS:me(this,_,Lp).call(this,ee);break;case o.AnnotationEditorParamsType.INK_COLOR:me(this,_,Np).call(this,ee);break;case o.AnnotationEditorParamsType.INK_OPACITY:me(this,_,Fp).call(this,ee);break}}static get defaultPropertiesToUpdate(){return[[o.AnnotationEditorParamsType.INK_THICKNESS,ke._defaultThickness],[o.AnnotationEditorParamsType.INK_COLOR,ke._defaultColor||s.AnnotationEditor._defaultLineColor],[o.AnnotationEditorParamsType.INK_OPACITY,Math.round(ke._defaultOpacity*100)]]}get propertiesToUpdate(){return[[o.AnnotationEditorParamsType.INK_THICKNESS,this.thickness||ke._defaultThickness],[o.AnnotationEditorParamsType.INK_COLOR,this.color||ke._defaultColor||s.AnnotationEditor._defaultLineColor],[o.AnnotationEditorParamsType.INK_OPACITY,Math.round(100*(this.opacity??ke._defaultOpacity))]]}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(this.canvas||(me(this,_,zo).call(this),me(this,_,Bo).call(this)),this.isAttachedToDOM||(this.parent.add(this),me(this,_,ba).call(this)),me(this,_,ya).call(this)))}remove(){this.canvas!==null&&(this.isEmpty()||this.commit(),this.canvas.width=this.canvas.height=0,this.canvas.remove(),this.canvas=null,j(this,k).disconnect(),Ce(this,k,null),super.remove())}setParent(G){!this.parent&&G?this._uiManager.removeShouldRescale(this):this.parent&&G===null&&this._uiManager.addShouldRescale(this),super.setParent(G)}onScaleChanging(){const[G,ee]=this.parentDimensions,de=this.width*G,pe=this.height*ee;this.setDimensions(de,pe)}enableEditMode(){j(this,A)||this.canvas===null||(super.enableEditMode(),this._isDraggable=!1,this.canvas.addEventListener("pointerdown",j(this,b)))}disableEditMode(){!this.isInEditMode()||this.canvas===null||(super.disableEditMode(),this._isDraggable=!this.isEmpty(),this.div.classList.remove("editing"),this.canvas.removeEventListener("pointerdown",j(this,b)))}onceAdded(){this._isDraggable=!this.isEmpty()}isEmpty(){return this.paths.length===0||this.paths.length===1&&this.paths[0].length===0}commit(){j(this,A)||(super.commit(),this.isEditing=!1,this.disableEditMode(),this.setInForeground(),Ce(this,A,!0),this.div.classList.add("disabled"),me(this,_,ya).call(this,!0),this.makeResizable(),this.parent.addInkEditorIfNeeded(!0),this.moveInDOM(),this.div.focus({preventScroll:!0}))}focusin(G){this._focusEventsAllowed&&(super.focusin(G),this.enableEditMode())}canvasPointerdown(G){G.button!==0||!this.isInEditMode()||j(this,A)||(this.setInForeground(),G.preventDefault(),G.type!=="mouse"&&this.div.focus(),me(this,_,Ip).call(this,G.offsetX,G.offsetY))}canvasPointermove(G){G.preventDefault(),me(this,_,Rc).call(this,G.offsetX,G.offsetY)}canvasPointerup(G){G.preventDefault(),me(this,_,Tc).call(this,G)}canvasPointerleave(G){me(this,_,Tc).call(this,G)}get isResizable(){return!this.isEmpty()&&j(this,A)}render(){if(this.div)return this.div;let G,ee;this.width&&(G=this.x,ee=this.y),super.render(),s.AnnotationEditor._l10nPromise.get("editor_ink2_aria_label").then(se=>{var re;return(re=this.div)==null?void 0:re.setAttribute("aria-label",se)});const[de,pe,ve,Te]=me(this,_,$p).call(this);if(this.setAt(de,pe,0,0),this.setDims(ve,Te),me(this,_,zo).call(this),this.width){const[se,re]=this.parentDimensions;this.setAspectRatio(this.width*se,this.height*re),this.setAt(G*se,ee*re,this.width*se,this.height*re),Ce(this,T,!0),me(this,_,ba).call(this),this.setDims(this.width*se,this.height*re),me(this,_,Xn).call(this),this.div.classList.add("disabled")}else this.div.classList.add("editing"),this.enableEditMode();return me(this,_,Bo).call(this),this.div}setDimensions(G,ee){const de=Math.round(G),pe=Math.round(ee);if(j(this,D)===de&&j(this,w)===pe)return;Ce(this,D,de),Ce(this,w,pe),this.canvas.style.visibility="hidden";const[ve,Te]=this.parentDimensions;this.width=G/ve,this.height=ee/Te,this.fixAndSetPosition(),j(this,A)&&me(this,_,kc).call(this,G,ee),me(this,_,ba).call(this),me(this,_,Xn).call(this),this.canvas.style.visibility="visible",this.fixDims()}static deserialize(G,ee,de){var Je,ct,st;if(G instanceof c.InkAnnotationElement)return null;const pe=super.deserialize(G,ee,de);pe.thickness=G.thickness,pe.color=o.Util.makeHexColor(...G.color),pe.opacity=G.opacity;const[ve,Te]=pe.pageDimensions,se=pe.width*ve,re=pe.height*Te,$e=pe.parentScale,Le=G.thickness/2;Ce(pe,A,!0),Ce(pe,D,Math.round(se)),Ce(pe,w,Math.round(re));const{paths:Xe,rect:qe,rotation:at}=G;for(let{bezier:De}of Xe){De=me(Je=ke,te,Gp).call(Je,De,qe,at);const be=[];pe.paths.push(be);let xe=$e*(De[0]-Le),Qe=$e*(De[1]-Le);for(let ht=2,le=De.length;ht<le;ht+=6){const Ne=$e*(De[ht]-Le),Ge=$e*(De[ht+1]-Le),nt=$e*(De[ht+2]-Le),it=$e*(De[ht+3]-Le),Ke=$e*(De[ht+4]-Le),ie=$e*(De[ht+5]-Le);be.push([[xe,Qe],[Ne,Ge],[nt,it],[Ke,ie]]),xe=Ke,Qe=ie}const pt=me(this,te,qp).call(this,be);pe.bezierPath2D.push(pt)}const We=me(ct=pe,_,Dc).call(ct);return Ce(pe,h,Math.max(s.AnnotationEditor.MIN_SIZE,We[2]-We[0])),Ce(pe,f,Math.max(s.AnnotationEditor.MIN_SIZE,We[3]-We[1])),me(st=pe,_,kc).call(st,se,re),pe}serialize(){if(this.isEmpty())return null;const G=this.getRect(0,0),ee=s.AnnotationEditor._colorManager.convert(this.ctx.strokeStyle);return{annotationType:o.AnnotationEditorType.INK,color:ee,thickness:this.thickness,opacity:this.opacity,paths:me(this,_,Wp).call(this,this.scaleFactor/this.parentScale,this.translationX,this.translationY,G),pageIndex:this.pageIndex,rect:G,rotation:this.rotation,structTreeParentId:this._structTreeParentId}}};f=new WeakMap,h=new WeakMap,v=new WeakMap,y=new WeakMap,x=new WeakMap,b=new WeakMap,S=new WeakMap,A=new WeakMap,C=new WeakMap,T=new WeakMap,k=new WeakMap,D=new WeakMap,w=new WeakMap,R=new WeakMap,_=new WeakSet,Lp=function(G){const ee=this.thickness;this.addCommands({cmd:()=>{this.thickness=G,me(this,_,ya).call(this)},undo:()=>{this.thickness=ee,me(this,_,ya).call(this)},mustExec:!0,type:o.AnnotationEditorParamsType.INK_THICKNESS,overwriteIfSameType:!0,keepUndo:!0})},Np=function(G){const ee=this.color;this.addCommands({cmd:()=>{this.color=G,me(this,_,Xn).call(this)},undo:()=>{this.color=ee,me(this,_,Xn).call(this)},mustExec:!0,type:o.AnnotationEditorParamsType.INK_COLOR,overwriteIfSameType:!0,keepUndo:!0})},Fp=function(G){G/=100;const ee=this.opacity;this.addCommands({cmd:()=>{this.opacity=G,me(this,_,Xn).call(this)},undo:()=>{this.opacity=ee,me(this,_,Xn).call(this)},mustExec:!0,type:o.AnnotationEditorParamsType.INK_OPACITY,overwriteIfSameType:!0,keepUndo:!0})},$p=function(){const{parentRotation:G,parentDimensions:[ee,de]}=this;switch(G){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]}},_c=function(){const{ctx:G,color:ee,opacity:de,thickness:pe,parentScale:ve,scaleFactor:Te}=this;G.lineWidth=pe*ve/Te,G.lineCap="round",G.lineJoin="round",G.miterLimit=10,G.strokeStyle=`${ee}${(0,p.opacityToHex)(de)}`},Ip=function(G,ee){this.canvas.addEventListener("contextmenu",d.noContextMenu),this.canvas.addEventListener("pointerleave",j(this,y)),this.canvas.addEventListener("pointermove",j(this,v)),this.canvas.addEventListener("pointerup",j(this,x)),this.canvas.removeEventListener("pointerdown",j(this,b)),this.isEditing=!0,j(this,T)||(Ce(this,T,!0),me(this,_,ba).call(this),this.thickness||(this.thickness=ke._defaultThickness),this.color||(this.color=ke._defaultColor||s.AnnotationEditor._defaultLineColor),this.opacity??(this.opacity=ke._defaultOpacity)),this.currentPath.push([G,ee]),Ce(this,C,!1),me(this,_,_c).call(this),Ce(this,R,()=>{me(this,_,Up).call(this),j(this,R)&&window.requestAnimationFrame(j(this,R))}),window.requestAnimationFrame(j(this,R))},Rc=function(G,ee){const[de,pe]=this.currentPath.at(-1);if(this.currentPath.length>1&&G===de&&ee===pe)return;const ve=this.currentPath;let Te=j(this,S);if(ve.push([G,ee]),Ce(this,C,!0),ve.length<=2){Te.moveTo(...ve[0]),Te.lineTo(G,ee);return}ve.length===3&&(Ce(this,S,Te=new Path2D),Te.moveTo(...ve[0])),me(this,_,Hp).call(this,Te,...ve.at(-3),...ve.at(-2),G,ee)},zp=function(){if(this.currentPath.length===0)return;const G=this.currentPath.at(-1);j(this,S).lineTo(...G)},Bp=function(G,ee){Ce(this,R,null),G=Math.min(Math.max(G,0),this.canvas.width),ee=Math.min(Math.max(ee,0),this.canvas.height),me(this,_,Rc).call(this,G,ee),me(this,_,zp).call(this);let de;if(this.currentPath.length!==1)de=me(this,_,Vp).call(this);else{const re=[G,ee];de=[[re,re.slice(),re.slice(),re]]}const pe=j(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()},se=()=>{this.allRawPaths.pop(),this.paths.pop(),this.bezierPath2D.pop(),this.paths.length===0?this.remove():(this.canvas||(me(this,_,zo).call(this),me(this,_,Bo).call(this)),me(this,_,ya).call(this))};this.addCommands({cmd:Te,undo:se,mustExec:!0})},Up=function(){if(!j(this,C))return;Ce(this,C,!1);const G=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)-G,Math.max(...de)+G,Math.min(...pe)-G,Math.max(...pe)+G;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(j(this,S)),ve.restore()},Hp=function(G,ee,de,pe,ve,Te,se){const re=(ee+pe)/2,$e=(de+ve)/2,Le=(pe+Te)/2,Xe=(ve+se)/2;G.bezierCurveTo(re+2*(pe-re)/3,$e+2*(ve-$e)/3,Le+2*(pe-Le)/3,Xe+2*(ve-Xe)/3,Le,Xe)},Vp=function(){const G=this.currentPath;if(G.length<=2)return[[G[0],G[0],G.at(-1),G.at(-1)]];const ee=[];let de,[pe,ve]=G[0];for(de=1;de<G.length-2;de++){const[qe,at]=G[de],[We,Je]=G[de+1],ct=(qe+We)/2,st=(at+Je)/2,De=[pe+2*(qe-pe)/3,ve+2*(at-ve)/3],be=[ct+2*(qe-ct)/3,st+2*(at-st)/3];ee.push([[pe,ve],De,be,[ct,st]]),[pe,ve]=[ct,st]}const[Te,se]=G[de],[re,$e]=G[de+1],Le=[pe+2*(Te-pe)/3,ve+2*(se-ve)/3],Xe=[re+2*(Te-re)/3,$e+2*(se-$e)/3];return ee.push([[pe,ve],Le,Xe,[re,$e]]),ee},Xn=function(){if(this.isEmpty()){me(this,_,Uo).call(this);return}me(this,_,_c).call(this);const{canvas:G,ctx:ee}=this;ee.setTransform(1,0,0,1,0,0),ee.clearRect(0,0,G.width,G.height),me(this,_,Uo).call(this);for(const de of this.bezierPath2D)ee.stroke(de)},Tc=function(G){this.canvas.removeEventListener("pointerleave",j(this,y)),this.canvas.removeEventListener("pointermove",j(this,v)),this.canvas.removeEventListener("pointerup",j(this,x)),this.canvas.addEventListener("pointerdown",j(this,b)),setTimeout(()=>{this.canvas.removeEventListener("contextmenu",d.noContextMenu)},10),me(this,_,Bp).call(this,G.offsetX,G.offsetY),this.addToAnnotationStorage(),this.setInBackground()},zo=function(){this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=0,this.canvas.className="inkEditorCanvas",s.AnnotationEditor._l10nPromise.get("editor_ink_canvas_aria_label").then(G=>{var ee;return(ee=this.canvas)==null?void 0:ee.setAttribute("aria-label",G)}),this.div.append(this.canvas),this.ctx=this.canvas.getContext("2d")},Bo=function(){Ce(this,k,new ResizeObserver(G=>{const ee=G[0].contentRect;ee.width&&ee.height&&this.setDimensions(ee.width,ee.height)})),j(this,k).observe(this.div)},ba=function(){if(!j(this,T))return;const[G,ee]=this.parentDimensions;this.canvas.width=Math.ceil(this.width*G),this.canvas.height=Math.ceil(this.height*ee),me(this,_,Uo).call(this)},kc=function(G,ee){const de=me(this,_,Ho).call(this),pe=(G-de)/j(this,h),ve=(ee-de)/j(this,f);this.scaleFactor=Math.min(pe,ve)},Uo=function(){const G=me(this,_,Ho).call(this)/2;this.ctx.setTransform(this.scaleFactor,0,0,this.scaleFactor,this.translationX*this.scaleFactor+G,this.translationY*this.scaleFactor+G)},te=new WeakSet,qp=function(G){const ee=new Path2D;for(let de=0,pe=G.length;de<pe;de++){const[ve,Te,se,re]=G[de];de===0&&ee.moveTo(...ve),ee.bezierCurveTo(Te[0],Te[1],se[0],se[1],re[0],re[1])}return ee},Pc=function(G,ee,de){const[pe,ve,Te,se]=ee;switch(de){case 0:for(let re=0,$e=G.length;re<$e;re+=2)G[re]+=pe,G[re+1]=se-G[re+1];break;case 90:for(let re=0,$e=G.length;re<$e;re+=2){const Le=G[re];G[re]=G[re+1]+pe,G[re+1]=Le+ve}break;case 180:for(let re=0,$e=G.length;re<$e;re+=2)G[re]=Te-G[re],G[re+1]+=ve;break;case 270:for(let re=0,$e=G.length;re<$e;re+=2){const Le=G[re];G[re]=Te-G[re+1],G[re+1]=se-Le}break;default:throw new Error("Invalid rotation")}return G},Gp=function(G,ee,de){const[pe,ve,Te,se]=ee;switch(de){case 0:for(let re=0,$e=G.length;re<$e;re+=2)G[re]-=pe,G[re+1]=se-G[re+1];break;case 90:for(let re=0,$e=G.length;re<$e;re+=2){const Le=G[re];G[re]=G[re+1]-ve,G[re+1]=Le-pe}break;case 180:for(let re=0,$e=G.length;re<$e;re+=2)G[re]=Te-G[re],G[re+1]-=ve;break;case 270:for(let re=0,$e=G.length;re<$e;re+=2){const Le=G[re];G[re]=se-G[re+1],G[re+1]=Te-Le}break;default:throw new Error("Invalid rotation")}return G},Wp=function(G,ee,de,pe){var $e,Le;const ve=[],Te=this.thickness/2,se=G*ee+Te,re=G*de+Te;for(const Xe of this.paths){const qe=[],at=[];for(let We=0,Je=Xe.length;We<Je;We++){const[ct,st,De,be]=Xe[We],xe=G*ct[0]+se,Qe=G*ct[1]+re,pt=G*st[0]+se,ht=G*st[1]+re,le=G*De[0]+se,Ne=G*De[1]+re,Ge=G*be[0]+se,nt=G*be[1]+re;We===0&&(qe.push(xe,Qe),at.push(xe,Qe)),qe.push(pt,ht,le,Ne,Ge,nt),at.push(pt,ht),We===Je-1&&at.push(Ge,nt)}ve.push({bezier:me($e=ke,te,Pc).call($e,qe,pe,this.rotation),points:me(Le=ke,te,Pc).call(Le,at,pe,this.rotation)})}return ve},Dc=function(){let G=1/0,ee=-1/0,de=1/0,pe=-1/0;for(const ve of this.paths)for(const[Te,se,re,$e]of ve){const Le=o.Util.bezierBoundingBox(...Te,...se,...re,...$e);G=Math.min(G,Le[0]),de=Math.min(de,Le[1]),ee=Math.max(ee,Le[2]),pe=Math.max(pe,Le[3])}return[G,de,ee,pe]},Ho=function(){return j(this,A)?Math.ceil(this.thickness*this.parentScale):0},ya=function(G=!1){if(this.isEmpty())return;if(!j(this,A)){me(this,_,Xn).call(this);return}const ee=me(this,_,Dc).call(this),de=me(this,_,Ho).call(this);Ce(this,h,Math.max(s.AnnotationEditor.MIN_SIZE,ee[2]-ee[0])),Ce(this,f,Math.max(s.AnnotationEditor.MIN_SIZE,ee[3]-ee[1]));const pe=Math.ceil(de+j(this,h)*this.scaleFactor),ve=Math.ceil(de+j(this,f)*this.scaleFactor),[Te,se]=this.parentDimensions;this.width=pe/Te,this.height=ve/se,this.setAspectRatio(pe,ve);const re=this.translationX,$e=this.translationY;this.translationX=-ee[0],this.translationY=-ee[1],me(this,_,ba).call(this),me(this,_,Xn).call(this),Ce(this,D,pe),Ce(this,w,ve),this.setDims(pe,ve);const Le=G?de/this.scaleFactor/2:0;this.translate(re-this.translationX-Le,$e-this.translationY-Le)},Se(ke,te),Pt(ke,"_defaultColor",null),Pt(ke,"_defaultOpacity",1),Pt(ke,"_defaultThickness",1),Pt(ke,"_type","ink");let m=ke;t.InkEditor=m},(e,t,i)=>{var m,f,h,v,y,x,b,S,A,C,T,bi,yi,Vo,Mc,Yp,Xp,Oc,qo,Kp;Object.defineProperty(t,"__esModule",{value:!0}),t.StampEditor=void 0;var o=i(1),s=i(4),c=i(6),d=i(29);const I=class I extends s.AnnotationEditor{constructor(Q){super({...Q,name:"stampEditor"});Se(this,T);Se(this,m,null);Se(this,f,null);Se(this,h,null);Se(this,v,null);Se(this,y,null);Se(this,x,null);Se(this,b,null);Se(this,S,null);Se(this,A,!1);Se(this,C,!1);Ce(this,v,Q.bitmapUrl),Ce(this,y,Q.bitmapFile)}static initialize(Q){s.AnnotationEditor.initialize(Q)}static get supportedTypes(){const Q=["apng","avif","bmp","gif","jpeg","png","svg+xml","webp","x-icon"];return(0,o.shadow)(this,"supportedTypes",Q.map(B=>`image/${B}`))}static get supportedTypesStr(){return(0,o.shadow)(this,"supportedTypesStr",this.supportedTypes.join(","))}static isHandlingMimeForPasting(Q){return this.supportedTypes.includes(Q)}static paste(Q,B){B.pasteEditor(o.AnnotationEditorType.STAMP,{bitmapFile:Q.getAsFile()})}remove(){var Q,B;j(this,f)&&(Ce(this,m,null),this._uiManager.imageManager.deleteId(j(this,f)),(Q=j(this,x))==null||Q.remove(),Ce(this,x,null),(B=j(this,b))==null||B.disconnect(),Ce(this,b,null)),super.remove()}rebuild(){if(!this.parent){j(this,f)&&me(this,T,Vo).call(this);return}super.rebuild(),this.div!==null&&(j(this,f)&&me(this,T,Vo).call(this),this.isAttachedToDOM||this.parent.add(this))}onceAdded(){this._isDraggable=!0,this.div.focus()}isEmpty(){return!(j(this,h)||j(this,m)||j(this,v)||j(this,y))}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,j(this,m)?me(this,T,Mc).call(this):me(this,T,Vo).call(this),this.width){const[q,K]=this.parentDimensions;this.setAt(Q*q,B*K,this.width*q,this.height*K)}return this.div}static deserialize(Q,B,q){if(Q instanceof d.StampAnnotationElement)return null;const K=super.deserialize(Q,B,q),{rect:U,bitmapUrl:$,bitmapId:Y,isSvg:z,accessibilityData:O}=Q;Y&&q.imageManager.isValidId(Y)?Ce(K,f,Y):Ce(K,v,$),Ce(K,A,z);const[F,H]=K.pageDimensions;return K.width=(U[2]-U[0])/F,K.height=(U[3]-U[1])/H,O&&(K.altTextData=O),K}serialize(Q=!1,B=null){if(this.isEmpty())return null;const q={annotationType:o.AnnotationEditorType.STAMP,bitmapId:j(this,f),pageIndex:this.pageIndex,rect:this.getRect(0,0),rotation:this.rotation,isSvg:j(this,A),structTreeParentId:this._structTreeParentId};if(Q)return q.bitmapUrl=me(this,T,qo).call(this,!0),q.accessibilityData=this.altTextData,q;const{decorative:K,altText:U}=this.altTextData;if(!K&&U&&(q.accessibilityData={type:"Figure",alt:U}),B===null)return q;B.stamps||(B.stamps=new Map);const $=j(this,A)?(q.rect[2]-q.rect[0])*(q.rect[3]-q.rect[1]):null;if(!B.stamps.has(j(this,f)))B.stamps.set(j(this,f),{area:$,serialized:q}),q.bitmap=me(this,T,qo).call(this,!1);else if(j(this,A)){const Y=B.stamps.get(j(this,f));$>Y.area&&(Y.area=$,Y.serialized.bitmap.close(),Y.serialized.bitmap=me(this,T,qo).call(this,!1))}return q}};m=new WeakMap,f=new WeakMap,h=new WeakMap,v=new WeakMap,y=new WeakMap,x=new WeakMap,b=new WeakMap,S=new WeakMap,A=new WeakMap,C=new WeakMap,T=new WeakSet,bi=function(Q,B=!1){if(!Q){this.remove();return}Ce(this,m,Q.bitmap),B||(Ce(this,f,Q.id),Ce(this,A,Q.isSvg)),me(this,T,Mc).call(this)},yi=function(){Ce(this,h,null),this._uiManager.enableWaiting(!1),j(this,x)&&this.div.focus()},Vo=function(){if(j(this,f)){this._uiManager.enableWaiting(!0),this._uiManager.imageManager.getFromId(j(this,f)).then(B=>me(this,T,bi).call(this,B,!0)).finally(()=>me(this,T,yi).call(this));return}if(j(this,v)){const B=j(this,v);Ce(this,v,null),this._uiManager.enableWaiting(!0),Ce(this,h,this._uiManager.imageManager.getFromUrl(B).then(q=>me(this,T,bi).call(this,q)).finally(()=>me(this,T,yi).call(this)));return}if(j(this,y)){const B=j(this,y);Ce(this,y,null),this._uiManager.enableWaiting(!0),Ce(this,h,this._uiManager.imageManager.getFromFile(B).then(q=>me(this,T,bi).call(this,q)).finally(()=>me(this,T,yi).call(this)));return}const Q=document.createElement("input");Q.type="file",Q.accept=I.supportedTypesStr,Ce(this,h,new Promise(B=>{Q.addEventListener("change",async()=>{if(!Q.files||Q.files.length===0)this.remove();else{this._uiManager.enableWaiting(!0);const q=await this._uiManager.imageManager.getFromFile(Q.files[0]);me(this,T,bi).call(this,q)}B()}),Q.addEventListener("cancel",()=>{this.remove(),B()})}).finally(()=>me(this,T,yi).call(this))),Q.click()},Mc=function(){const{div:Q}=this;let{width:B,height:q}=j(this,m);const[K,U]=this.pageDimensions,$=.75;if(this.width)B=this.width*K,q=this.height*U;else if(B>$*K||q>$*U){const F=Math.min($*K/B,$*U/q);B*=F,q*=F}const[Y,z]=this.parentDimensions;this.setDims(B*Y/K,q*z/U),this._uiManager.enableWaiting(!1);const O=Ce(this,x,document.createElement("canvas"));Q.append(O),Q.hidden=!1,me(this,T,Oc).call(this,B,q),me(this,T,Kp).call(this),j(this,C)||(this.parent.addUndoableEditor(this),Ce(this,C,!0)),this._uiManager._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",subtype:this.editorType,data:{action:"inserted_image"}}}),this.addAltTextButton()},Yp=function(Q,B){var $;const[q,K]=this.parentDimensions;this.width=Q/q,this.height=B/K,this.setDims(Q,B),($=this._initialOptions)!=null&&$.isCentered?this.center():this.fixAndSetPosition(),this._initialOptions=null,j(this,S)!==null&&clearTimeout(j(this,S)),Ce(this,S,setTimeout(()=>{Ce(this,S,null),me(this,T,Oc).call(this,Q,B)},200))},Xp=function(Q,B){const{width:q,height:K}=j(this,m);let U=q,$=K,Y=j(this,m);for(;U>2*Q||$>2*B;){const z=U,O=$;U>2*Q&&(U=U>=16384?Math.floor(U/2)-1:Math.ceil(U/2)),$>2*B&&($=$>=16384?Math.floor($/2)-1:Math.ceil($/2));const F=new OffscreenCanvas(U,$);F.getContext("2d").drawImage(Y,0,0,z,O,0,0,U,$),Y=F.transferToImageBitmap()}return Y},Oc=function(Q,B){Q=Math.ceil(Q),B=Math.ceil(B);const q=j(this,x);if(!q||q.width===Q&&q.height===B)return;q.width=Q,q.height=B;const K=j(this,A)?j(this,m):me(this,T,Xp).call(this,Q,B),U=q.getContext("2d");U.filter=this._uiManager.hcmFilter,U.drawImage(K,0,0,K.width,K.height,0,0,Q,B)},qo=function(Q){if(Q){if(j(this,A)){const K=this._uiManager.imageManager.getSvgUrl(j(this,f));if(K)return K}const B=document.createElement("canvas");return{width:B.width,height:B.height}=j(this,m),B.getContext("2d").drawImage(j(this,m),0,0),B.toDataURL()}if(j(this,A)){const[B,q]=this.pageDimensions,K=Math.round(this.width*B*c.PixelsPerInch.PDF_TO_CSS_UNITS),U=Math.round(this.height*q*c.PixelsPerInch.PDF_TO_CSS_UNITS),$=new OffscreenCanvas(K,U);return $.getContext("2d").drawImage(j(this,m),0,0,j(this,m).width,j(this,m).height,0,0,K,U),$.transferToImageBitmap()}return structuredClone(j(this,m))},Kp=function(){Ce(this,b,new ResizeObserver(Q=>{const B=Q[0].contentRect;B.width&&B.height&&me(this,T,Yp).call(this,B.width,B.height)})),j(this,b).observe(this.div)},Pt(I,"_type","stamp");let p=I;t.StampEditor=p}],__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 c.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 d.AnnotationEditorUIManager}}),Object.defineProperty(e,"AnnotationLayer",{enumerable:!0,get:function(){return p.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 o.DOMSVGFactory}}),Object.defineProperty(e,"FeatureTest",{enumerable:!0,get:function(){return t.FeatureTest}}),Object.defineProperty(e,"GlobalWorkerOptions",{enumerable:!0,get:function(){return m.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 o.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 o.PixelsPerInch}}),Object.defineProperty(e,"PromiseCapability",{enumerable:!0,get:function(){return t.PromiseCapability}}),Object.defineProperty(e,"RenderingCancelledException",{enumerable:!0,get:function(){return o.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 f.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 o.getFilenameFromUrl}}),Object.defineProperty(e,"getPdfFilenameFromUrl",{enumerable:!0,get:function(){return o.getPdfFilenameFromUrl}}),Object.defineProperty(e,"getXfaPageViewport",{enumerable:!0,get:function(){return o.getXfaPageViewport}}),Object.defineProperty(e,"isDataScheme",{enumerable:!0,get:function(){return o.isDataScheme}}),Object.defineProperty(e,"isPdfFile",{enumerable:!0,get:function(){return o.isPdfFile}}),Object.defineProperty(e,"loadScript",{enumerable:!0,get:function(){return o.loadScript}}),Object.defineProperty(e,"noContextMenu",{enumerable:!0,get:function(){return o.noContextMenu}}),Object.defineProperty(e,"normalizeUnicode",{enumerable:!0,get:function(){return t.normalizeUnicode}}),Object.defineProperty(e,"renderTextLayer",{enumerable:!0,get:function(){return s.renderTextLayer}}),Object.defineProperty(e,"setLayerDimensions",{enumerable:!0,get:function(){return o.setLayerDimensions}}),Object.defineProperty(e,"shadow",{enumerable:!0,get:function(){return t.shadow}}),Object.defineProperty(e,"updateTextLayer",{enumerable:!0,get:function(){return s.updateTextLayer}}),Object.defineProperty(e,"version",{enumerable:!0,get:function(){return i.version}});var t=__w_pdfjs_require__(1),i=__w_pdfjs_require__(2),o=__w_pdfjs_require__(6),s=__w_pdfjs_require__(26),c=__w_pdfjs_require__(27),d=__w_pdfjs_require__(5),p=__w_pdfjs_require__(29),m=__w_pdfjs_require__(14),f=__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 o=!1;async function s(){if(e)try{const c=await e.arrayBuffer(),p=await(await getDocument({data:c}).promise).getPage(1),m=p.getViewport({scale:.5}),f=document.createElement("canvas");f.width=m.width,f.height=m.height;const h=f.getContext("2d");h&&(await p.render({canvasContext:h,viewport:m}).promise,o||i(f.toDataURL()))}catch{o||i(null)}}return s(),()=>{o=!0}},[e]),t}function FileCard({file:e,onRemove:t,onDoubleClick:i}){const 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:"Remove"})]})})}const FileManager=({files:e=[],setFiles:t,allowMultiple:i=!0,setPdfFile:o,setCurrentView:s})=>{const c=p=>{t(m=>i?[...m,...p]:p)},d=p=>{t(m=>m.filter((f,h)=>h!==p))};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:c,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:"Drag PDF files here or click to select"})})}),e.length===0?jsxRuntimeExports.jsx(Text,{c:"dimmed",ta:"center",children:"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((p,m)=>jsxRuntimeExports.jsx(FileCard,{file:p,onRemove:()=>d(m),onDoubleClick:()=>{const f=p.file||p;o&&o({file:f,url:URL.createObjectURL(f)}),s&&s("viewer")}},p.name+m))})})]})};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=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(e,t,{allOwnKeys:i=!1}={}){if(e===null||typeof e>"u")return;let o,s;if(typeof e!="object"&&(e=[e]),isArray(e))for(o=0,s=e.length;o<s;o++)t.call(null,e[o],o,e);else{const c=i?Object.getOwnPropertyNames(e):Object.keys(e),d=c.length;let p;for(o=0;o<d;o++)p=c[o],t.call(null,e[p],p,e)}}function findKey(e,t){t=t.toLowerCase();const i=Object.keys(e);let o=i.length,s;for(;o-- >0;)if(s=i[o],t===s.toLowerCase())return s;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=(o,s)=>{const c=e&&findKey(t,s)||s;isPlainObject(t[c])&&isPlainObject(o)?t[c]=merge(t[c],o):isPlainObject(o)?t[c]=merge({},o):isArray(o)?t[c]=o.slice():t[c]=o};for(let o=0,s=arguments.length;o<s;o++)arguments[o]&&forEach(arguments[o],i);return t}const extend=(e,t,i,{allOwnKeys:o}={})=>(forEach(t,(s,c)=>{i&&isFunction(s)?e[c]=bind(s,i):e[c]=s},{allOwnKeys:o}),e),stripBOM=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),inherits=(e,t,i,o)=>{e.prototype=Object.create(t.prototype,o),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),i&&Object.assign(e.prototype,i)},toFlatObject=(e,t,i,o)=>{let s,c,d;const p={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),c=s.length;c-- >0;)d=s[c],(!o||o(d,e,t))&&!p[d]&&(t[d]=e[d],p[d]=!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 o=e.indexOf(t,i);return o!==-1&&o===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 o=(e&&e[iterator]).call(e);let s;for(;(s=o.next())&&!s.done;){const c=s.value;t.call(e,c[0],c[1])}},matchAll=(e,t)=>{let i;const o=[];for(;(i=e.exec(t))!==null;)o.push(i);return o},isHTMLForm=kindOfTest("HTMLFormElement"),toCamelCase=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(i,o,s){return o.toUpperCase()+s}),hasOwnProperty=(({hasOwnProperty:e})=>(t,i)=>e.call(t,i))(Object.prototype),isRegExp=kindOfTest("RegExp"),reduceDescriptors=(e,t)=>{const i=Object.getOwnPropertyDescriptors(e),o={};forEach(i,(s,c)=>{let d;(d=t(s,c,e))!==!1&&(o[c]=d||s)}),Object.defineProperties(e,o)},freezeMethods=e=>{reduceDescriptors(e,(t,i)=>{if(isFunction(e)&&["arguments","caller","callee"].indexOf(i)!==-1)return!1;const o=e[i];if(isFunction(o)){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={},o=s=>{s.forEach(c=>{i[c]=!0})};return isArray(e)?o(e):o(String(e).split(t)),i},noop=()=>{},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=(o,s)=>{if(isObject(o)){if(t.indexOf(o)>=0)return;if(!("toJSON"in o)){t[s]=o;const c=isArray(o)?[]:{};return forEach(o,(d,p)=>{const m=i(d,s+1);!isUndefined(m)&&(c[p]=m)}),t[s]=void 0,c}}return o};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,o)=>(_global.addEventListener("message",({source:s,data:c})=>{s===_global&&c===i&&o.length&&o.shift()()},!1),s=>{o.push(s),_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,isNumber,isBoolean,isObject,isPlainObject,isReadableStream,isRequest,isResponse,isHeaders,isUndefined,isDate,isFile,isBlob,isRegExp,isFunction,isStream,isURLSearchParams,isTypedArray,isFileList,forEach,merge,extend,trim,stripBOM,inherits,toFlatObject,kindOf,kindOfTest,endsWith,toArray,forEachEntry,matchAll,isHTMLForm,hasOwnProperty,hasOwnProp:hasOwnProperty,reduceDescriptors,freezeMethods,toObjectSet,toCamelCase,noop,toFiniteNumber,findKey,global:_global,isContextDefined,isSpecCompliantForm,toJSONObject,isAsyncFn,isThenable,setImmediate:_setImmediate,asap,isIterable};function AxiosError$1(e,t,i,o,s){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),o&&(this.request=o),s&&(this.response=s,this.status=s.status?s.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,o,s,c)=>{const d=Object.create(prototype$1);return utils$1.toFlatObject(e,d,function(m){return m!==Error.prototype},p=>p!=="isAxiosError"),AxiosError$1.call(d,e.message,t,i,o,s),d.cause=e,d.name=e.name,c&&Object.assign(d,c),d};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(s,c){return s=removeBrackets(s),!i&&c?"["+s+"]":s}).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,A){return!utils$1.isUndefined(A[S])});const o=i.metaTokens,s=i.visitor||h,c=i.dots,d=i.indexes,m=(i.Blob||typeof Blob<"u"&&Blob)&&utils$1.isSpecCompliantForm(t);if(!utils$1.isFunction(s))throw new TypeError("visitor must be a function");function f(b){if(b===null)return"";if(utils$1.isDate(b))return b.toISOString();if(!m&&utils$1.isBlob(b))throw new AxiosError$1("Blob is not supported. Use a Buffer instead.");return utils$1.isArrayBuffer(b)||utils$1.isTypedArray(b)?m&&typeof Blob=="function"?new Blob([b]):Buffer.from(b):b}function h(b,S,A){let C=b;if(b&&!A&&typeof b=="object"){if(utils$1.endsWith(S,"{}"))S=o?S:S.slice(0,-2),b=JSON.stringify(b);else if(utils$1.isArray(b)&&isFlatArray(b)||(utils$1.isFileList(b)||utils$1.endsWith(S,"[]"))&&(C=utils$1.toArray(b)))return S=removeBrackets(S),C.forEach(function(k,D){!(utils$1.isUndefined(k)||k===null)&&t.append(d===!0?renderKey([S],D,c):d===null?S:S+"[]",f(k))}),!1}return isVisitable(b)?!0:(t.append(renderKey(A,S,c),f(b)),!1)}const v=[],y=Object.assign(predicates,{defaultVisitor:h,convertValue:f,isVisitable});function x(b,S){if(!utils$1.isUndefined(b)){if(v.indexOf(b)!==-1)throw Error("Circular reference detected in "+S.join("."));v.push(b),utils$1.forEach(b,function(C,T){(!(utils$1.isUndefined(C)||C===null)&&s.call(t,C,utils$1.isString(T)?T.trim():T,S,y))===!0&&x(C,S?S.concat(T):[T])}),v.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(o){return t[o]})}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(o){return t.call(this,o,encode$1)}:encode$1;return this._pairs.map(function(s){return i(s[0])+"="+i(s[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 o=i&&i.encode||encode;utils$1.isFunction(i)&&(i={serialize:i});const s=i&&i.serialize;let c;if(s?c=s(t,i):c=utils$1.isURLSearchParams(t)?t.toString():new AxiosURLSearchParams(t,i).toString(o),c){const d=e.indexOf("#");d!==-1&&(e=e.slice(0,d)),e+=(e.indexOf("?")===-1?"?":"&")+c}return e}class InterceptorManager{constructor(){this.handlers=[]}use(t,i,o){return this.handlers.push({fulfilled:t,rejected:i,synchronous:o?o.synchronous:!1,runWhen:o?o.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(o){o!==null&&t(o)})}}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,o,s,c){return platform.isNode&&utils$1.isBuffer(i)?(this.append(o,i.toString("base64")),!1):c.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 o;const s=i.length;let c;for(o=0;o<s;o++)c=i[o],t[c]=e[c];return t}function formDataToJSON(e){function t(i,o,s,c){let d=i[c++];if(d==="__proto__")return!0;const p=Number.isFinite(+d),m=c>=i.length;return d=!d&&utils$1.isArray(s)?s.length:d,m?(utils$1.hasOwnProp(s,d)?s[d]=[s[d],o]:s[d]=o,!p):((!s[d]||!utils$1.isObject(s[d]))&&(s[d]=[]),t(i,o,s[d],c)&&utils$1.isArray(s[d])&&(s[d]=arrayToObject(s[d])),!p)}if(utils$1.isFormData(e)&&utils$1.isFunction(e.entries)){const i={};return utils$1.forEachEntry(e,(o,s)=>{t(parsePropPath(o),s,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(o){if(o.name!=="SyntaxError")throw o}return(i||JSON.stringify)(e)}const defaults={transitional:transitionalDefaults,adapter:["xhr","http","fetch"],transformRequest:[function e(t,i){const o=i.getContentType()||"",s=o.indexOf("application/json")>-1,c=utils$1.isObject(t);if(c&&utils$1.isHTMLForm(t)&&(t=new FormData(t)),utils$1.isFormData(t))return s?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 p;if(c){if(o.indexOf("application/x-www-form-urlencoded")>-1)return toURLEncodedForm(t,this.formSerializer).toString();if((p=utils$1.isFileList(t))||o.indexOf("multipart/form-data")>-1){const m=this.env&&this.env.FormData;return toFormData$1(p?{"files[]":t}:t,m&&new m,this.formSerializer)}}return c||s?(i.setContentType("application/json",!1),stringifySafely(t)):t}],transformResponse:[function e(t){const i=this.transitional||defaults.transitional,o=i&&i.forcedJSONParsing,s=this.responseType==="json";if(utils$1.isResponse(t)||utils$1.isReadableStream(t))return t;if(t&&utils$1.isString(t)&&(o&&!this.responseType||s)){const d=!(i&&i.silentJSONParsing)&&s;try{return JSON.parse(t)}catch(p){if(d)throw p.name==="SyntaxError"?AxiosError$1.from(p,AxiosError$1.ERR_BAD_RESPONSE,this,null,this.response):p}}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.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,o,s;return e&&e.split(`
|
||
`).forEach(function(d){s=d.indexOf(":"),i=d.substring(0,s).trim().toLowerCase(),o=d.substring(s+1).trim(),!(!i||t[i]&&ignoreDuplicateOf[i])&&(i==="set-cookie"?t[i]?t[i].push(o):t[i]=[o]:t[i]=t[i]?t[i]+", "+o:o)}),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 o;for(;o=i.exec(e);)t[o[1]]=o[2];return t}const isValidHeaderName=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function matchHeaderValue(e,t,i,o,s){if(utils$1.isFunction(o))return o.call(this,t,i);if(s&&(t=i),!!utils$1.isString(t)){if(utils$1.isString(o))return t.indexOf(o)!==-1;if(utils$1.isRegExp(o))return o.test(t)}}function formatHeader(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,i,o)=>i.toUpperCase()+o)}function buildAccessors(e,t){const i=utils$1.toCamelCase(" "+t);["get","set","has"].forEach(o=>{Object.defineProperty(e,o+i,{value:function(s,c,d){return this[o].call(this,t,s,c,d)},configurable:!0})})}let AxiosHeaders$1=class{constructor(t){t&&this.set(t)}set(t,i,o){const s=this;function c(p,m,f){const h=normalizeHeader(m);if(!h)throw new Error("header name must be a non-empty string");const v=utils$1.findKey(s,h);(!v||s[v]===void 0||f===!0||f===void 0&&s[v]!==!1)&&(s[v||m]=normalizeValue(p))}const d=(p,m)=>utils$1.forEach(p,(f,h)=>c(f,h,m));if(utils$1.isPlainObject(t)||t instanceof this.constructor)d(t,i);else if(utils$1.isString(t)&&(t=t.trim())&&!isValidHeaderName(t))d(parseHeaders(t),i);else if(utils$1.isObject(t)&&utils$1.isIterable(t)){let p={},m,f;for(const h of t){if(!utils$1.isArray(h))throw TypeError("Object iterator must return a key-value pair");p[f=h[0]]=(m=p[f])?utils$1.isArray(m)?[...m,h[1]]:[m,h[1]]:h[1]}d(p,i)}else t!=null&&c(i,t,o);return this}get(t,i){if(t=normalizeHeader(t),t){const o=utils$1.findKey(this,t);if(o){const s=this[o];if(!i)return s;if(i===!0)return parseTokens(s);if(utils$1.isFunction(i))return i.call(this,s,o);if(utils$1.isRegExp(i))return i.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,i){if(t=normalizeHeader(t),t){const o=utils$1.findKey(this,t);return!!(o&&this[o]!==void 0&&(!i||matchHeaderValue(this,this[o],o,i)))}return!1}delete(t,i){const o=this;let s=!1;function c(d){if(d=normalizeHeader(d),d){const p=utils$1.findKey(o,d);p&&(!i||matchHeaderValue(o,o[p],p,i))&&(delete o[p],s=!0)}}return utils$1.isArray(t)?t.forEach(c):c(t),s}clear(t){const i=Object.keys(this);let o=i.length,s=!1;for(;o--;){const c=i[o];(!t||matchHeaderValue(this,this[c],c,t,!0))&&(delete this[c],s=!0)}return s}normalize(t){const i=this,o={};return utils$1.forEach(this,(s,c)=>{const d=utils$1.findKey(o,c);if(d){i[d]=normalizeValue(s),delete i[c];return}const p=t?formatHeader(c):String(c).trim();p!==c&&delete i[c],i[p]=normalizeValue(s),o[p]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const i=Object.create(null);return utils$1.forEach(this,(o,s)=>{o!=null&&o!==!1&&(i[s]=t&&utils$1.isArray(o)?o.join(", "):o)}),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 o=new this(t);return i.forEach(s=>o.set(s)),o}static accessor(t){const o=(this[$internals]=this[$internals]={accessors:{}}).accessors,s=this.prototype;function c(d){const p=normalizeHeader(d);o[p]||(buildAccessors(s,d),o[p]=!0)}return utils$1.isArray(t)?t.forEach(c):c(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(o){this[i]=o}}});utils$1.freezeMethods(AxiosHeaders$1);function transformData(e,t){const i=this||defaults,o=t||i,s=AxiosHeaders$1.from(o.headers);let c=o.data;return utils$1.forEach(e,function(p){c=p.call(i,c,s.normalize(),t?t.status:void 0)}),s.normalize(),c}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 o=i.config.validateStatus;!i.status||!o||o(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),o=new Array(e);let s=0,c=0,d;return t=t!==void 0?t:1e3,function(m){const f=Date.now(),h=o[c];d||(d=f),i[s]=m,o[s]=f;let v=c,y=0;for(;v!==s;)y+=i[v++],v=v%e;if(s=(s+1)%e,s===c&&(c=(c+1)%e),f-d<t)return;const x=h&&f-h;return x?Math.round(y*1e3/x):void 0}}function throttle(e,t){let i=0,o=1e3/t,s,c;const d=(f,h=Date.now())=>{i=h,s=null,c&&(clearTimeout(c),c=null),e.apply(null,f)};return[(...f)=>{const h=Date.now(),v=h-i;v>=o?d(f,h):(s=f,c||(c=setTimeout(()=>{c=null,d(s)},o-v)))},()=>s&&d(s)]}const progressEventReducer=(e,t,i=3)=>{let o=0;const s=speedometer(50,250);return throttle(c=>{const d=c.loaded,p=c.lengthComputable?c.total:void 0,m=d-o,f=s(m),h=d<=p;o=d;const v={loaded:d,total:p,progress:p?d/p:void 0,bytes:m,rate:f||void 0,estimated:f&&p&&h?(p-d)/f:void 0,event:c,lengthComputable:p!=null,[t?"download":"upload"]:!0};e(v)},i)},progressEventDecorator=(e,t)=>{const i=e!=null;return[o=>t[0]({lengthComputable:i,total:e,loaded:o}),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,o,s,c){const d=[e+"="+encodeURIComponent(t)];utils$1.isNumber(i)&&d.push("expires="+new Date(i).toGMTString()),utils$1.isString(o)&&d.push("path="+o),utils$1.isString(s)&&d.push("domain="+s),c===!0&&d.push("secure"),document.cookie=d.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 o=!isAbsoluteURL(t);return e&&(o||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 o(f,h,v,y){return utils$1.isPlainObject(f)&&utils$1.isPlainObject(h)?utils$1.merge.call({caseless:y},f,h):utils$1.isPlainObject(h)?utils$1.merge({},h):utils$1.isArray(h)?h.slice():h}function s(f,h,v,y){if(utils$1.isUndefined(h)){if(!utils$1.isUndefined(f))return o(void 0,f,v,y)}else return o(f,h,v,y)}function c(f,h){if(!utils$1.isUndefined(h))return o(void 0,h)}function d(f,h){if(utils$1.isUndefined(h)){if(!utils$1.isUndefined(f))return o(void 0,f)}else return o(void 0,h)}function p(f,h,v){if(v in t)return o(f,h);if(v in e)return o(void 0,f)}const m={url:c,method:c,data:c,baseURL:d,transformRequest:d,transformResponse:d,paramsSerializer:d,timeout:d,timeoutMessage:d,withCredentials:d,withXSRFToken:d,adapter:d,responseType:d,xsrfCookieName:d,xsrfHeaderName:d,onUploadProgress:d,onDownloadProgress:d,decompress:d,maxContentLength:d,maxBodyLength:d,beforeRedirect:d,transport:d,httpAgent:d,httpsAgent:d,cancelToken:d,socketPath:d,responseEncoding:d,validateStatus:p,headers:(f,h,v)=>s(headersToObject(f),headersToObject(h),v,!0)};return utils$1.forEach(Object.keys(Object.assign({},e,t)),function(h){const v=m[h]||s,y=v(e[h],t[h],h);utils$1.isUndefined(y)&&v!==p||(i[h]=y)}),i}const resolveConfig=e=>{const t=mergeConfig$1({},e);let{data:i,withXSRFToken:o,xsrfHeaderName:s,xsrfCookieName:c,headers:d,auth:p}=t;t.headers=d=AxiosHeaders$1.from(d),t.url=buildURL(buildFullPath(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),p&&d.set("Authorization","Basic "+btoa((p.username||"")+":"+(p.password?unescape(encodeURIComponent(p.password)):"")));let m;if(utils$1.isFormData(i)){if(platform.hasStandardBrowserEnv||platform.hasStandardBrowserWebWorkerEnv)d.setContentType(void 0);else if((m=d.getContentType())!==!1){const[f,...h]=m?m.split(";").map(v=>v.trim()).filter(Boolean):[];d.setContentType([f||"multipart/form-data",...h].join("; "))}}if(platform.hasStandardBrowserEnv&&(o&&utils$1.isFunction(o)&&(o=o(t)),o||o!==!1&&isURLSameOrigin(t.url))){const f=s&&c&&cookies.read(c);f&&d.set(s,f)}return t},isXHRAdapterSupported=typeof XMLHttpRequest<"u",xhrAdapter=isXHRAdapterSupported&&function(e){return new Promise(function(i,o){const s=resolveConfig(e);let c=s.data;const d=AxiosHeaders$1.from(s.headers).normalize();let{responseType:p,onUploadProgress:m,onDownloadProgress:f}=s,h,v,y,x,b;function S(){x&&x(),b&&b(),s.cancelToken&&s.cancelToken.unsubscribe(h),s.signal&&s.signal.removeEventListener("abort",h)}let A=new XMLHttpRequest;A.open(s.method.toUpperCase(),s.url,!0),A.timeout=s.timeout;function C(){if(!A)return;const k=AxiosHeaders$1.from("getAllResponseHeaders"in A&&A.getAllResponseHeaders()),w={data:!p||p==="text"||p==="json"?A.responseText:A.response,status:A.status,statusText:A.statusText,headers:k,config:e,request:A};settle(function(_){i(_),S()},function(_){o(_),S()},w),A=null}"onloadend"in A?A.onloadend=C:A.onreadystatechange=function(){!A||A.readyState!==4||A.status===0&&!(A.responseURL&&A.responseURL.indexOf("file:")===0)||setTimeout(C)},A.onabort=function(){A&&(o(new AxiosError$1("Request aborted",AxiosError$1.ECONNABORTED,e,A)),A=null)},A.onerror=function(){o(new AxiosError$1("Network Error",AxiosError$1.ERR_NETWORK,e,A)),A=null},A.ontimeout=function(){let D=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const w=s.transitional||transitionalDefaults;s.timeoutErrorMessage&&(D=s.timeoutErrorMessage),o(new AxiosError$1(D,w.clarifyTimeoutError?AxiosError$1.ETIMEDOUT:AxiosError$1.ECONNABORTED,e,A)),A=null},c===void 0&&d.setContentType(null),"setRequestHeader"in A&&utils$1.forEach(d.toJSON(),function(D,w){A.setRequestHeader(w,D)}),utils$1.isUndefined(s.withCredentials)||(A.withCredentials=!!s.withCredentials),p&&p!=="json"&&(A.responseType=s.responseType),f&&([y,b]=progressEventReducer(f,!0),A.addEventListener("progress",y)),m&&A.upload&&([v,x]=progressEventReducer(m),A.upload.addEventListener("progress",v),A.upload.addEventListener("loadend",x)),(s.cancelToken||s.signal)&&(h=k=>{A&&(o(!k||k.type?new CanceledError$1(null,e,A):k),A.abort(),A=null)},s.cancelToken&&s.cancelToken.subscribe(h),s.signal&&(s.signal.aborted?h():s.signal.addEventListener("abort",h)));const T=parseProtocol(s.url);if(T&&platform.protocols.indexOf(T)===-1){o(new AxiosError$1("Unsupported protocol "+T+":",AxiosError$1.ERR_BAD_REQUEST,e));return}A.send(c||null)})},composeSignals=(e,t)=>{const{length:i}=e=e?e.filter(Boolean):[];if(t||i){let o=new AbortController,s;const c=function(f){if(!s){s=!0,p();const h=f instanceof Error?f:this.reason;o.abort(h instanceof AxiosError$1?h:new CanceledError$1(h instanceof Error?h.message:h))}};let d=t&&setTimeout(()=>{d=null,c(new AxiosError$1(`timeout ${t} of ms exceeded`,AxiosError$1.ETIMEDOUT))},t);const p=()=>{e&&(d&&clearTimeout(d),d=null,e.forEach(f=>{f.unsubscribe?f.unsubscribe(c):f.removeEventListener("abort",c)}),e=null)};e.forEach(f=>f.addEventListener("abort",c));const{signal:m}=o;return m.unsubscribe=()=>utils$1.asap(p),m}},streamChunk=function*(e,t){let i=e.byteLength;if(i<t){yield e;return}let o=0,s;for(;o<i;)s=o+t,yield e.slice(o,s),o=s},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:o}=await t.read();if(i)break;yield o}}finally{await t.cancel()}},trackStream=(e,t,i,o)=>{const s=readBytes(e,t);let c=0,d,p=m=>{d||(d=!0,o&&o(m))};return new ReadableStream({async pull(m){try{const{done:f,value:h}=await s.next();if(f){p(),m.close();return}let v=h.byteLength;if(i){let y=c+=v;i(y)}m.enqueue(new Uint8Array(h))}catch(f){throw p(f),f}},cancel(m){return p(m),s.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,o)=>{throw new AxiosError$1(`Response type '${t}' is not supported`,AxiosError$1.ERR_NOT_SUPPORT,o)})})})(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:o,signal:s,cancelToken:c,timeout:d,onDownloadProgress:p,onUploadProgress:m,responseType:f,headers:h,withCredentials:v="same-origin",fetchOptions:y}=resolveConfig(e);f=f?(f+"").toLowerCase():"text";let x=composeSignals([s,c&&c.toAbortSignal()],d),b;const S=x&&x.unsubscribe&&(()=>{x.unsubscribe()});let A;try{if(m&&supportsRequestStream&&i!=="get"&&i!=="head"&&(A=await resolveBodyLength(h,o))!==0){let w=new Request(t,{method:"POST",body:o,duplex:"half"}),R;if(utils$1.isFormData(o)&&(R=w.headers.get("content-type"))&&h.setContentType(R),w.body){const[_,M]=progressEventDecorator(A,progressEventReducer(asyncDecorator(m)));o=trackStream(w.body,DEFAULT_CHUNK_SIZE,_,M)}}utils$1.isString(v)||(v=v?"include":"omit");const C="credentials"in Request.prototype;b=new Request(t,{...y,signal:x,method:i.toUpperCase(),headers:h.normalize().toJSON(),body:o,duplex:"half",credentials:C?v:void 0});let T=await fetch(b);const k=supportsResponseStream&&(f==="stream"||f==="response");if(supportsResponseStream&&(p||k&&S)){const w={};["status","statusText","headers"].forEach(N=>{w[N]=T[N]});const R=utils$1.toFiniteNumber(T.headers.get("content-length")),[_,M]=p&&progressEventDecorator(R,progressEventReducer(asyncDecorator(p),!0))||[];T=new Response(trackStream(T.body,DEFAULT_CHUNK_SIZE,_,()=>{M&&M(),S&&S()}),w)}f=f||"text";let D=await resolvers[utils$1.findKey(resolvers,f)||"text"](T,e);return!k&&S&&S(),await new Promise((w,R)=>{settle(w,R,{data:D,headers:AxiosHeaders$1.from(T.headers),status:T.status,statusText:T.statusText,config:e,request:b})})}catch(C){throw S&&S(),C&&C.name==="TypeError"&&/Load failed|fetch/i.test(C.message)?Object.assign(new AxiosError$1("Network Error",AxiosError$1.ERR_NETWORK,e,b),{cause:C.cause||C}):AxiosError$1.from(C,C&&C.code,e,b)}}),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,o;const s={};for(let c=0;c<t;c++){i=e[c];let d;if(o=i,!isResolvedHandle(i)&&(o=knownAdapters[(d=String(i)).toLowerCase()],o===void 0))throw new AxiosError$1(`Unknown adapter '${d}'`);if(o)break;s[d||"#"+c]=o}if(!o){const c=Object.entries(s).map(([p,m])=>`adapter ${p} `+(m===!1?"is not supported by the environment":"is not available in the build"));let d=t?c.length>1?`since :
|
||
`+c.map(renderReason).join(`
|
||
`):" "+renderReason(c[0]):"as no adapter specified";throw new AxiosError$1("There is no suitable adapter to dispatch the request "+d,"ERR_NOT_SUPPORT")}return o},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.adapter)(e).then(function(o){return throwIfCancellationRequested(e),o.data=transformData.call(e,e.transformResponse,o),o.headers=AxiosHeaders$1.from(o.headers),o},function(o){return isCancel$1(o)||(throwIfCancellationRequested(e),o&&o.response&&(o.response.data=transformData.call(e,e.transformResponse,o.response),o.response.headers=AxiosHeaders$1.from(o.response.headers))),Promise.reject(o)})}const VERSION$1="1.9.0",validators$1={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{validators$1[e]=function(o){return typeof o===e||"a"+(t<1?"n ":" ")+e}});const deprecatedWarnings={};validators$1.transitional=function e(t,i,o){function s(c,d){return"[Axios v"+VERSION$1+"] Transitional option '"+c+"'"+d+(o?". "+o:"")}return(c,d,p)=>{if(t===!1)throw new AxiosError$1(s(d," has been removed"+(i?" in "+i:"")),AxiosError$1.ERR_DEPRECATED);return i&&!deprecatedWarnings[d]&&(deprecatedWarnings[d]=!0,console.warn(s(d," has been deprecated since v"+i+" and will be removed in the near future"))),t?t(c,d,p):!0}};validators$1.spelling=function e(t){return(i,o)=>(console.warn(`${o} 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 o=Object.keys(e);let s=o.length;for(;s-- >0;){const c=o[s],d=t[c];if(d){const p=e[c],m=p===void 0||d(p,c,e);if(m!==!0)throw new AxiosError$1("option "+c+" must be "+m,AxiosError$1.ERR_BAD_OPTION_VALUE);continue}if(i!==!0)throw new AxiosError$1("Unknown option "+c,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(o){if(o instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const c=s.stack?s.stack.replace(/^.+\n/,""):"";try{o.stack?c&&!String(o.stack).endsWith(c.replace(/^.+\n.+\n/,""))&&(o.stack+=`
|
||
`+c):o.stack=c}catch{}}throw o}}_request(t,i){typeof t=="string"?(i=i||{},i.url=t):i=t||{},i=mergeConfig$1(this.defaults,i);const{transitional:o,paramsSerializer:s,headers:c}=i;o!==void 0&&validator.assertOptions(o,{silentJSONParsing:validators.transitional(validators.boolean),forcedJSONParsing:validators.transitional(validators.boolean),clarifyTimeoutError:validators.transitional(validators.boolean)},!1),s!=null&&(utils$1.isFunction(s)?i.paramsSerializer={serialize:s}:validator.assertOptions(s,{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 d=c&&utils$1.merge(c.common,c[i.method]);c&&utils$1.forEach(["delete","get","head","post","put","patch","common"],b=>{delete c[b]}),i.headers=AxiosHeaders$1.concat(d,c);const p=[];let m=!0;this.interceptors.request.forEach(function(S){typeof S.runWhen=="function"&&S.runWhen(i)===!1||(m=m&&S.synchronous,p.unshift(S.fulfilled,S.rejected))});const f=[];this.interceptors.response.forEach(function(S){f.push(S.fulfilled,S.rejected)});let h,v=0,y;if(!m){const b=[dispatchRequest.bind(this),void 0];for(b.unshift.apply(b,p),b.push.apply(b,f),y=b.length,h=Promise.resolve(i);v<y;)h=h.then(b[v++],b[v++]);return h}y=p.length;let x=i;for(v=0;v<y;){const b=p[v++],S=p[v++];try{x=b(x)}catch(A){S.call(this,A);break}}try{h=dispatchRequest.call(this,x)}catch(b){return Promise.reject(b)}for(v=0,y=f.length;v<y;)h=h.then(f[v++],f[v++]);return h}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,o){return this.request(mergeConfig$1(o||{},{method:t,url:i,data:(o||{}).data}))}});utils$1.forEach(["post","put","patch"],function e(t){function i(o){return function(c,d,p){return this.request(mergeConfig$1(p||{},{method:t,headers:o?{"Content-Type":"multipart/form-data"}:{},url:c,data:d}))}}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(c){i=c});const o=this;this.promise.then(s=>{if(!o._listeners)return;let c=o._listeners.length;for(;c-- >0;)o._listeners[c](s);o._listeners=null}),this.promise.then=s=>{let c;const d=new Promise(p=>{o.subscribe(p),c=p}).then(s);return d.cancel=function(){o.unsubscribe(c)},d},t(function(c,d,p){o.reason||(o.reason=new CanceledError$1(c,d,p),i(o.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=o=>{t.abort(o)};return this.subscribe(i),t.signal.unsubscribe=()=>this.unsubscribe(i),t.signal}static source(){let t;return{token:new Qp(function(s){t=s}),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(s){return createInstance(mergeConfig$1(e,s))},i}const axios=createInstance(defaults);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:o,updateParams:s})=>{useSearchParams();const[c,d]=reactExports.useState(""),[p,m]=reactExports.useState(!1),[f,h]=reactExports.useState(null),{mode:v,pages:y,hDiv:x,vDiv:b,merge:S,splitType:A,splitValue:C,bookmarkLevel:T,includeMetadata:k,allowDuplicates:D}=o,w=async R=>{var N;if(R.preventDefault(),!e){d("Please upload a PDF first.");return}const _=new FormData;_.append("fileInput",e.file);let M="";switch(v){case"byPages":_.append("pageNumbers",y),M="/api/v1/general/split-pages";break;case"bySections":_.append("horizontalDivisions",x),_.append("verticalDivisions",b),_.append("merge",S.toString()),M="/api/v1/general/split-pdf-by-sections";break;case"bySizeOrCount":_.append("splitType",A==="size"?"0":A==="pages"?"1":"2"),_.append("splitValue",C),M="/api/v1/general/split-by-size-or-count";break;case"byChapters":_.append("bookmarkLevel",T),_.append("includeMetadata",k.toString()),_.append("allowDuplicates",D.toString()),M="/api/v1/general/split-pdf-by-chapters";break;default:return}d("Processing split..."),m(!0),h(null);try{const P=await axios.post(M,_,{responseType:"blob"}),L=new Blob([P.data],{type:"application/zip"}),I=window.URL.createObjectURL(L);i(I),d("Download ready.")}catch(P){console.error(P),h(((N=P.response)==null?void 0:N.data)||"An error occurred while splitting the PDF."),d("Split failed.")}finally{m(!1)}};return jsxRuntimeExports.jsx("form",{onSubmit:w,children:jsxRuntimeExports.jsxs(Stack,{gap:"sm",mb:16,children:[jsxRuntimeExports.jsx(Select,{label:"Split Mode",value:v,onChange:R=>R&&s({mode:R}),data:[{value:"byPages",label:"Split by Pages (e.g. 1,3,5-10)"},{value:"bySections",label:"Split by Grid Sections"},{value:"bySizeOrCount",label:"Split by Size or Count"},{value:"byChapters",label:"Split by Chapters"}]}),v==="byPages"&&jsxRuntimeExports.jsx(TextInput,{label:"Pages",placeholder:"e.g. 1,3,5-10",value:y,onChange:R=>s({pages:R.target.value})}),v==="bySections"&&jsxRuntimeExports.jsxs(Stack,{gap:"sm",children:[jsxRuntimeExports.jsx(TextInput,{label:"Horizontal Divisions",type:"number",min:"0",max:"300",value:x,onChange:R=>s({hDiv:R.target.value})}),jsxRuntimeExports.jsx(TextInput,{label:"Vertical Divisions",type:"number",min:"0",max:"300",value:b,onChange:R=>s({vDiv:R.target.value})}),jsxRuntimeExports.jsx(Checkbox,{label:"Merge sections into one PDF",checked:S,onChange:R=>s({merge:R.currentTarget.checked})})]}),v==="bySizeOrCount"&&jsxRuntimeExports.jsxs(Stack,{gap:"sm",children:[jsxRuntimeExports.jsx(Select,{label:"Split Type",value:A,onChange:R=>R&&s({splitType:R}),data:[{value:"size",label:"By Size"},{value:"pages",label:"By Page Count"},{value:"docs",label:"By Document Count"}]}),jsxRuntimeExports.jsx(TextInput,{label:"Split Value",placeholder:"e.g. 10MB or 5 pages",value:C,onChange:R=>s({splitValue:R.target.value})})]}),v==="byChapters"&&jsxRuntimeExports.jsxs(Stack,{gap:"sm",children:[jsxRuntimeExports.jsx(TextInput,{label:"Bookmark Level",type:"number",value:T,onChange:R=>s({bookmarkLevel:R.target.value})}),jsxRuntimeExports.jsx(Checkbox,{label:"Include Metadata",checked:k,onChange:R=>s({includeMetadata:R.currentTarget.checked})}),jsxRuntimeExports.jsx(Checkbox,{label:"Allow Duplicate Bookmarks",checked:D,onChange:R=>s({allowDuplicates:R.currentTarget.checked})})]}),jsxRuntimeExports.jsx(Button,{type:"submit",loading:p,fullWidth:!0,children:p?"Processing...":"Split PDF"}),c&&jsxRuntimeExports.jsx("p",{className:"text-xs text-gray-600",children:c}),f&&jsxRuntimeExports.jsx(Notification,{color:"red",title:"Error",onClose:()=>h(null),children:f}),c==="Download ready."&&t&&jsxRuntimeExports.jsx(Button,{component:"a",href:t,download:"split_output.zip",leftSection:jsxRuntimeExports.jsx(DownloadIcon,{}),color:"green",fullWidth:!0,children:"Download Split PDF"})]})})},CompressPdfPanel=({files:e=[],setDownloadUrl:t,setLoading:i})=>{useSearchParams();const[o,s]=reactExports.useState(e.map(()=>!1)),[c,d]=reactExports.useState(5),[p,m]=reactExports.useState(!1),[f,h]=reactExports.useState(!1),[v,y]=reactExports.useState(""),[x,b]=reactExports.useState(!1),[S,A]=reactExports.useState(!1);React.useEffect(()=>{s(e.map(()=>!1))},[e]);const C=k=>{s(D=>D.map((w,R)=>R===k?!w:w))},T=async()=>{const k=e.filter((w,R)=>o[R]);if(k.length===0)return;A(!0),i==null||i(!0);const D=new FormData;k.forEach(w=>D.append("fileInput",w)),D.append("compressionLevel",c.toString()),D.append("grayscale",p.toString()),D.append("removeMetadata",f.toString()),D.append("aggressive",x.toString()),v&&D.append("expectedSize",v);try{const R=await(await fetch("/api/v1/general/compress-pdf",{method:"POST",body:D})).blob();t==null||t(URL.createObjectURL(R))}finally{A(!1),i==null||i(!1)}};return jsxRuntimeExports.jsxs(Stack,{children:[jsxRuntimeExports.jsx(Text,{fw:500,mb:4,children:"Select files to compress:"}),jsxRuntimeExports.jsxs(Stack,{gap:4,children:[e.length===0&&jsxRuntimeExports.jsx(Text,{c:"dimmed",size:"sm",children:"No files loaded."}),e.map((k,D)=>jsxRuntimeExports.jsx(Checkbox,{label:k.name,checked:o[D]||!1,onChange:()=>C(D)},k.name+D))]}),jsxRuntimeExports.jsxs(Stack,{gap:4,mb:14,children:[jsxRuntimeExports.jsx(Text,{size:"sm",style:{minWidth:140},children:"Compression Level"}),jsxRuntimeExports.jsx(Slider,{min:1,max:9,step:1,value:c,onChange:d,marks:[{value:1,label:"1"},{value:5,label:"5"},{value:9,label:"9"}],style:{flex:1}})]}),jsxRuntimeExports.jsx(Checkbox,{label:"Convert images to grayscale",checked:p,onChange:k=>m(k.currentTarget.checked)}),jsxRuntimeExports.jsx(Checkbox,{label:"Remove PDF metadata",checked:f,onChange:k=>h(k.currentTarget.checked)}),jsxRuntimeExports.jsx(Checkbox,{label:"Aggressive compression (may reduce quality)",checked:x,onChange:k=>b(k.currentTarget.checked)}),jsxRuntimeExports.jsx(TextInput,{label:"Expected output size (e.g. 2MB, 500KB)",placeholder:"Optional",value:v,onChange:k=>y(k.currentTarget.value)}),jsxRuntimeExports.jsxs(Button,{onClick:T,loading:S,disabled:o.every(k=>!k),fullWidth:!0,mt:"md",children:["Compress Selected PDF",o.filter(Boolean).length>1?"s":""]})]})},MergePdfPanel=({files:e,setDownloadUrl:t,params:i,updateParams:o})=>{useSearchParams();const[s,c]=reactExports.useState([]),[d,p]=reactExports.useState(null),[m,f]=reactExports.useState(!1),[h,v]=reactExports.useState(null);reactExports.useEffect(()=>{c(e.map(()=>!0))},[e]);const y=async()=>{const C=e.filter((k,D)=>s[D]);if(C.length<2){v("Please select at least two PDFs to merge.");return}const T=new FormData;C.forEach(k=>T.append("fileInput",k)),f(!0),v(null);try{const k=await fetch("/api/v1/general/merge-pdfs",{method:"POST",body:T});if(!k.ok){const R=await k.text();throw new Error(`Failed to merge PDFs: ${R}`)}const D=await k.blob(),w=URL.createObjectURL(D);t(w),p(w)}catch(k){v(k.message||"Unknown error occurred.")}finally{f(!1)}},x=C=>{c(T=>T.map((k,D)=>D===C?!k:k))},b=s.filter(Boolean).length,{order:S,removeDuplicates:A}=i;return jsxRuntimeExports.jsxs(Stack,{children:[jsxRuntimeExports.jsx(Text,{fw:500,size:"lg",children:"Merge PDFs"}),jsxRuntimeExports.jsx(Stack,{gap:4,children:e.map((C,T)=>jsxRuntimeExports.jsxs(Group,{gap:"xs",children:[jsxRuntimeExports.jsx(Checkbox,{checked:s[T]||!1,onChange:()=>x(T)}),jsxRuntimeExports.jsx(Text,{size:"sm",children:C.name})]},T))}),b<2&&jsxRuntimeExports.jsx(Text,{size:"sm",c:"red",children:"Please select at least two PDFs to merge."}),jsxRuntimeExports.jsx(Button,{onClick:y,loading:m,disabled:b<2||m,mt:"md",children:"Merge PDFs"}),h&&jsxRuntimeExports.jsx(Alert,{color:"red",mt:"sm",children:h}),d&&jsxRuntimeExports.jsx(Button,{component:"a",href:d,download:"merged.pdf",color:"green",variant:"light",mt:"md",children:"Download Merged PDF"}),jsxRuntimeExports.jsx(Checkbox,{label:"Remove Duplicates",checked:A,onChange:()=>o({removeDuplicates:!A})})]})},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:o})=>{const[s,c]=reactExports.useState([]),[d,p]=reactExports.useState(null),[m,f]=reactExports.useState(!1),[h,v]=reactExports.useState([]),[y,x]=reactExports.useState([]),b=Array.from({length:DUMMY_PAGE_COUNT},(I,W)=>W+1),S=()=>c(b),A=()=>c([]),C=I=>c(W=>W.includes(I)?W.filter(ae=>ae!==I):[...W,I]),T=()=>{h.length>0&&(x([s,...y]),c(h[0]),v(h.slice(1)))},k=()=>{y.length>0&&(v([s,...h]),c(y[0]),x(y.slice(1)))},D=()=>p("Rotated left: "+s.join(", ")),w=()=>p("Rotated right: "+s.join(", ")),R=()=>p("Deleted: "+s.join(", ")),_=()=>p("Moved left: "+s.join(", ")),M=()=>p("Moved right: "+s.join(", ")),N=()=>p("Split at: "+s.join(", ")),P=()=>p("Inserted page break at: "+s.join(", ")),L=()=>p("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:"PDF Multitool"}),jsxRuntimeExports.jsx(Button,{onClick:S,fullWidth:!0,variant:"light",children:"Select All"}),jsxRuntimeExports.jsx(Button,{onClick:A,fullWidth:!0,variant:"light",children:"Deselect All"}),jsxRuntimeExports.jsx(Button,{onClick:T,leftSection:jsxRuntimeExports.jsx(UndoIcon,{fontSize:"small"}),fullWidth:!0,disabled:h.length===0,children:"Undo"}),jsxRuntimeExports.jsx(Button,{onClick:k,leftSection:jsxRuntimeExports.jsx(RedoIcon,{fontSize:"small"}),fullWidth:!0,disabled:y.length===0,children:"Redo"}),jsxRuntimeExports.jsx(Button,{onClick:L,leftSection:jsxRuntimeExports.jsx(AddIcon,{fontSize:"small"}),fullWidth:!0,children:"Add File"}),jsxRuntimeExports.jsx(Button,{onClick:P,leftSection:jsxRuntimeExports.jsx(ContentCutIcon,{fontSize:"small"}),fullWidth:!0,children:"Insert Page Break"}),jsxRuntimeExports.jsx(Button,{onClick:N,leftSection:jsxRuntimeExports.jsx(ContentCutIcon,{fontSize:"small"}),fullWidth:!0,children:"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:"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||s.length===0,children:"Download Selected"}),jsxRuntimeExports.jsx(Button,{color:"red",variant:"light",onClick:()=>t&&t(null),fullWidth:!0,children:"Close PDF"})]}),jsxRuntimeExports.jsxs(Box,{style:{flex:1},children:[jsxRuntimeExports.jsxs(Group,{mb:"sm",children:[jsxRuntimeExports.jsx(Tooltip,{label:"Rotate Left",children:jsxRuntimeExports.jsx(ActionIcon,{onClick:D,disabled:s.length===0,color:"blue",variant:"light",children:jsxRuntimeExports.jsx(RotateLeftIcon,{})})}),jsxRuntimeExports.jsx(Tooltip,{label:"Rotate Right",children:jsxRuntimeExports.jsx(ActionIcon,{onClick:w,disabled:s.length===0,color:"blue",variant:"light",children:jsxRuntimeExports.jsx(RotateRightIcon,{})})}),jsxRuntimeExports.jsx(Tooltip,{label:"Delete",children:jsxRuntimeExports.jsx(ActionIcon,{onClick:R,disabled:s.length===0,color:"red",variant:"light",children:jsxRuntimeExports.jsx(DeleteIcon,{})})}),jsxRuntimeExports.jsx(Tooltip,{label:"Move Left",children:jsxRuntimeExports.jsx(ActionIcon,{onClick:_,disabled:s.length===0,color:"gray",variant:"light",children:jsxRuntimeExports.jsx(ArrowBackIosNewIcon,{})})}),jsxRuntimeExports.jsx(Tooltip,{label:"Move Right",children:jsxRuntimeExports.jsx(ActionIcon,{onClick:M,disabled:s.length===0,color:"gray",variant:"light",children:jsxRuntimeExports.jsx(ArrowForwardIosIcon,{})})})]}),jsxRuntimeExports.jsx(ScrollArea,{h:350,children:jsxRuntimeExports.jsx(Group,{children:b.map(I=>jsxRuntimeExports.jsxs(Stack,{align:"center",gap:2,children:[jsxRuntimeExports.jsx(Checkbox,{checked:s.includes(I),onChange:()=>C(I),label:`Page ${I}`}),jsxRuntimeExports.jsx(Box,{w:60,h:80,bg:s.includes(I)?"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:I})})})]},I))})})]})]}),d&&jsxRuntimeExports.jsx(Notification,{color:"blue",mt:"md",onClose:()=>p(null),children:d})]}):jsxRuntimeExports.jsx(Paper,{shadow:"xs",radius:"md",p:"md",children:jsxRuntimeExports.jsx(Center,{children:jsxRuntimeExports.jsx(Text,{color:"dimmed",children:"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:o})=>{const s=useMantineTheme(),[c,d]=reactExports.useState(0),[p,m]=reactExports.useState([]),[f,h]=reactExports.useState(!1),[v,y]=reactExports.useState(null),[x,b]=reactExports.useState(!1),[S,A]=reactExports.useState(1),C=reactExports.useRef([]),T=reactExports.useRef(null),k=reactExports.useRef(!1),D=reactExports.useRef(!1);reactExports.useEffect(()=>{function R(){if(window.location.hash.startsWith("#page=")){const _=parseInt(window.location.hash.replace("#page=",""),10);!isNaN(_)&&_>=1&&_<=c&&y(_)}k.current=!1}return window.addEventListener("hashchange",R),R(),()=>window.removeEventListener("hashchange",R)},[c]),reactExports.useEffect(()=>{if(v&&C.current[v-1]){D.current=!0;const R=C.current[v-1];R==null||R.scrollIntoView({behavior:"smooth",block:"center"});const _=T.current;let M=null,N=null;return _&&"onscrollend"in _?(N=()=>{D.current=!1,_.removeEventListener("scrollend",N)},_.addEventListener("scrollend",N)):M=setTimeout(()=>{D.current=!1},1e3),()=>{_&&N&&_.removeEventListener("scrollend",N),M&&clearTimeout(M)}}},[v,p]);const w=()=>{if(D.current)return;const R=T.current;if(!R||!C.current.length)return;const _=R.getBoundingClientRect();let M=0,N=1/0;C.current.forEach((P,L)=>{if(P){const I=P.getBoundingClientRect(),W=Math.abs(I.top-_.top);W<N&&(N=W,M=L)}}),v!==M+1&&(y(M+1),window.location.hash!==`#page=${M+1}`&&(window.location.hash=`#page=${M+1}`))};return reactExports.useEffect(()=>{let R=!1;async function _(){if(!e||!e.url){d(0),m([]);return}h(!0);try{const M=await pdfExports.getDocument(e.url).promise;d(M.numPages);const N=[];for(let P=1;P<=M.numPages;P++){const L=await M.getPage(P),I=L.getViewport({scale:1.2}),W=document.createElement("canvas");W.width=I.width,W.height=I.height;const ae=W.getContext("2d");ae&&(await L.render({canvasContext:ae,viewport:I}).promise,N.push(W.toDataURL()))}R||m(N)}catch{R||m([])}R||h(!1)}return _(),()=>{R=!0}},[e]),reactExports.useEffect(()=>{const R=T.current;if(!R)return;const _=()=>{w()};return R.addEventListener("scroll",_),()=>R.removeEventListener("scroll",_)},[p]),jsxRuntimeExports.jsx(Paper,{shadow:"xs",radius:"md",style:{height:"100vh",display:"flex",flexDirection:"column",position:"relative"},children:e?f?jsxRuntimeExports.jsx(Center,{style:{flex:1},children:jsxRuntimeExports.jsx(Loader,{size:"lg"})}):jsxRuntimeExports.jsxs(ScrollArea,{style:{flex:1,height:"100%",position:"relative"},viewportRef:T,children:[jsxRuntimeExports.jsxs(Stack,{gap:"xl",align:"center",children:[p.length===0&&jsxRuntimeExports.jsx(Text,{color:"dimmed",children:"No pages to display."}),x?Array.from({length:Math.ceil(p.length/2)}).map((R,_)=>jsxRuntimeExports.jsxs(Group,{gap:"md",align:"flex-start",style:{width:"100%",justifyContent:"center"},children:[jsxRuntimeExports.jsx("img",{ref:M=>{C.current[_*2]=M},src:p[_*2],alt:`Page ${_*2+1}`,style:{width:`${100*S}%`,maxWidth:700*S,boxShadow:"0 2px 8px rgba(0,0,0,0.08)",borderRadius:8,marginTop:_===0?s.spacing.xl:0}}),p[_*2+1]&&jsxRuntimeExports.jsx("img",{ref:M=>{C.current[_*2+1]=M},src:p[_*2+1],alt:`Page ${_*2+2}`,style:{width:`${100*S}%`,maxWidth:700*S,boxShadow:"0 2px 8px rgba(0,0,0,0.08)",borderRadius:8,marginTop:_===0?s.spacing.xl:0}})]},_)):p.map((R,_)=>jsxRuntimeExports.jsx("img",{ref:M=>{C.current[_]=M},src:R,alt:`Page ${_+1}`,style:{width:`${100*S}%`,maxWidth:700*S,boxShadow:"0 2px 8px rgba(0,0,0,0.08)",borderRadius:8,marginTop:_===0?s.spacing.xl:0}},_))]}),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:v===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,(v||1)-1)}`},disabled:v===1,style:{minWidth:36},children:jsxRuntimeExports.jsx(ArrowBackIosNewIcon,{fontSize:"small"})}),jsxRuntimeExports.jsx(NumberInput,{value:v||1,onChange:R=>{const _=Number(R);!isNaN(_)&&_>=1&&_<=c&&(window.location.hash=`#page=${_}`)},min:1,max:c,hideControls:!0,styles:{input:{width:48,textAlign:"center",fontWeight:500,fontSize:16}}}),jsxRuntimeExports.jsxs("span",{style:{fontWeight:500,fontSize:16},children:["/ ",c]}),jsxRuntimeExports.jsx(Button,{variant:"subtle",color:"blue",size:"md",px:8,radius:"xl",onClick:()=>{window.location.hash=`#page=${Math.min(c,(v||1)+1)}`},disabled:v===c,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=${c}`},disabled:v===c,style:{minWidth:36},children:jsxRuntimeExports.jsx(LastPageIcon,{fontSize:"small"})}),jsxRuntimeExports.jsx(Button,{variant:x?"filled":"light",color:"blue",size:"md",radius:"xl",onClick:()=>b(R=>!R),style:{minWidth:36},title:x?"Single Page View":"Dual Page View",children:x?jsxRuntimeExports.jsx(DescriptionIcon,{fontSize:"small"}):jsxRuntimeExports.jsx(ViewWeekIcon,{fontSize:"small"})}),jsxRuntimeExports.jsx(Button,{variant:"subtle",color:"blue",size:"md",radius:"xl",onClick:()=>o(!i),style:{minWidth:36},title:i?"Hide Sidebars":"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:()=>A(R=>Math.max(.1,R-.1)),style:{minWidth:32,padding:0},title:"Zoom out",children:"−"}),jsxRuntimeExports.jsxs("span",{style:{minWidth:40,textAlign:"center"},children:[Math.round(S*100),"%"]}),jsxRuntimeExports.jsx(Button,{variant:"subtle",color:"blue",size:"md",radius:"xl",onClick:()=>A(R=>Math.min(5,R+.1)),style:{minWidth:32,padding:0},title:"Zoom in",children:"+"})]})]})})]}):jsxRuntimeExports.jsx(Center,{style:{flex:1},children:jsxRuntimeExports.jsxs(Stack,{align:"center",children:[jsxRuntimeExports.jsx(Text,{c:"dimmed",children:"No PDF loaded. Click to upload a PDF."}),jsxRuntimeExports.jsxs(Button,{component:"label",variant:"outline",color:"blue",children:["Choose PDF",jsxRuntimeExports.jsx("input",{type:"file",accept:"application/pdf",hidden:!0,onChange:R=>{var M;const _=(M=R.target.files)==null?void 0:M[0];if(_&&_.type==="application/pdf"){const N=URL.createObjectURL(_);t({file:_,url:N})}}})]})]})})})},toolRegistry={split:{icon:jsxRuntimeExports.jsx(ContentCutIcon,{}),name:"Split PDF",component:SplitPdfPanel,view:"viewer"},compress:{icon:jsxRuntimeExports.jsx(ZoomInMapIcon,{}),name:"Compress PDF",component:CompressPdfPanel,view:"viewer"},merge:{icon:jsxRuntimeExports.jsx(AddToPhotosIcon,{}),name:"Merge PDFs",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,o){const s=new URLSearchParams(t);if(e==="split"){["splitMode","pages","hDiv","vDiv","merge","splitType","splitValue","bookmarkLevel","includeMetadata","allowDuplicates"].forEach(d=>s.delete(d));const c={...getToolParams("split",t),...o};s.set("splitMode",c.mode),c.mode==="byPages"?s.set("pages",c.pages):c.mode==="bySections"?(s.set("hDiv",c.hDiv),s.set("vDiv",c.vDiv),s.set("merge",String(c.merge))):c.mode==="bySizeOrCount"?(s.set("splitType",c.splitType),s.set("splitValue",c.splitValue)):c.mode==="byChapters"&&(s.set("bookmarkLevel",c.bookmarkLevel),s.set("includeMetadata",String(c.includeMetadata)),s.set("allowDuplicates",String(c.allowDuplicates)))}else if(e==="compress"){["compressLevel","keepQuality"].forEach(d=>s.delete(d));const c={...getToolParams("compress",t),...o};s.set("compressLevel",c.level),s.set("keepQuality",String(c.keepQuality))}else if(e==="merge"){["mergeOrder","removeDuplicates"].forEach(d=>s.delete(d));const c={...getToolParams("merge",t),...o};s.set("mergeOrder",c.order),s.set("removeDuplicates",String(c.removeDuplicates))}i(s,{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[e,t]=useSearchParams(),i=useMantineTheme(),{colorScheme:o}=useMantineColorScheme(),[s,c]=reactExports.useState(e.get("tool")||"split"),[d,p]=reactExports.useState(e.get("view")||"viewer"),[m,f]=reactExports.useState(null),[h,v]=reactExports.useState([]),[y,x]=reactExports.useState(null),[b,S]=reactExports.useState(!0),A=getToolParams(s,e),C=w=>updateToolParams(s,e,t,w);reactExports.useEffect(()=>{const w=new URLSearchParams(e);Object.entries(TOOL_PARAMS).forEach(([M,N])=>{M!==s&&N.forEach(P=>w.delete(P))});const R=Array.from(w.entries()).filter(([M])=>M!=="view"),_=new URLSearchParams;_.set("view",d),_.set("tool",s),R.forEach(([M,N])=>{M!=="tool"&&_.set(M,N)}),t(_,{replace:!0})},[s,d,t,e]);const T=reactExports.useCallback(w=>{var R;c(w),(R=toolRegistry[w])!=null&&R.view&&p(toolRegistry[w].view)},[toolRegistry]),k=toolRegistry[s],D=()=>!k||!k.component?jsxRuntimeExports.jsx("div",{children:"Tool not found"}):React.createElement(k.component,{files:h,setDownloadUrl:x,params:A,updateParams:C});return jsxRuntimeExports.jsxs(Group,{align:"flex-start",gap:0,style:{minHeight:"100vh",width:"100vw",overflow:"hidden",flexWrap:"nowrap",display:"flex"},children:[b&&jsxRuntimeExports.jsx(Box,{style:{minWidth:180,maxWidth:240,width:"16vw",height:"100vh",borderRight:`1px solid ${o==="dark"?i.colors.dark[4]:"#e9ecef"}`,background:o==="dark"?i.colors.dark[7]:"#fff",zIndex:101,display:"flex",flexDirection:"column",justifyContent:"left"},children:jsxRuntimeExports.jsx(ToolPicker,{selectedToolKey:s,onSelect:T,toolRegistry})}),jsxRuntimeExports.jsxs(Box,{style:{flex:1,height:"100vh",minWidth:"20rem",position:"relative",display:"flex",flexDirection:"column",transition:"all 0.3s",background:o==="dark"?i.colors.dark[6]:"#f8f9fa"},children:[jsxRuntimeExports.jsx("div",{style:{position:"absolute",left:0,width:"100%",display:"flex",justifyContent:"center",zIndex:30,pointerEvents:"none"},children:jsxRuntimeExports.jsx("div",{style:{pointerEvents:"auto"},children:jsxRuntimeExports.jsx(SegmentedControl,{data:VIEW_OPTIONS,value:d,onChange:p,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:(d==="viewer"||d==="pageEditor")&&!m?jsxRuntimeExports.jsx(FileManager,{files:h,setFiles:v,setPdfFile:f,setCurrentView:p}):d==="viewer"?jsxRuntimeExports.jsx(Viewer,{pdfFile:m,setPdfFile:f,sidebarsVisible:b,setSidebarsVisible:S}):d==="pageEditor"?jsxRuntimeExports.jsx(PageEditor,{file:m,setFile:f,downloadUrl:y,setDownloadUrl:x}):jsxRuntimeExports.jsx(FileManager,{files:h,setFiles:v,setPdfFile:f,setCurrentView:p})})})]}),b&&jsxRuntimeExports.jsx(Box,{style:{minWidth:260,maxWidth:400,width:"22vw",height:"100vh",borderLeft:`1px solid ${o==="dark"?i.colors.dark[4]:"#e9ecef"}`,background:o==="dark"?i.colors.dark[7]:"#fff",padding:24,gap:16,zIndex:100,display:"flex",flexDirection:"column"},children:k&&k.component&&D()}),jsxRuntimeExports.jsx(Button,{variant:"light",color:"blue",size:"xs",style:{position:"fixed",top:16,right:16,zIndex:200},onClick:()=>S(w=>!w),children:b?"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,{})})})]}));
|