windows-development-sandbox 1.12.0 → 1.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/config.example.json +11 -1
- package/dist/app/features/access/access.def.d.ts +190 -0
- package/dist/app/features/access/access.def.js +273 -0
- package/dist/app/features/access/access.run.d.ts +79 -0
- package/dist/app/features/access/access.run.js +129 -0
- package/dist/app/features/access/index.d.ts +2 -0
- package/dist/app/features/access/index.js +3 -0
- package/dist/app/features/agents/agent-entry.js +5 -0
- package/dist/app/features/agents/agents.def.js +1 -0
- package/dist/app/features/apps/apps.def.js +1 -0
- package/dist/app/features/audit/audit.def.d.ts +11 -2
- package/dist/app/features/audit/audit.def.js +7 -4
- package/dist/app/features/audit/audit.run.d.ts +3 -0
- package/dist/app/features/defs.d.ts +155 -3
- package/dist/app/features/defs.js +12 -1
- package/dist/app/features/files/files.def.js +1 -0
- package/dist/app/features/health/health.def.js +1 -0
- package/dist/app/features/sandbox/sandbox.def.js +3 -0
- package/dist/app/features/sessions/sessions.def.d.ts +36 -0
- package/dist/app/features/sessions/sessions.def.js +77 -9
- package/dist/app/features/sessions/sessions.run.d.ts +25 -2
- package/dist/app/features/sessions/sessions.run.js +71 -3
- package/dist/app/features/settings/settings.def.d.ts +8 -0
- package/dist/app/features/settings/settings.def.js +17 -0
- package/dist/app/features/web/web.def.d.ts +9 -0
- package/dist/app/features/web/web.def.js +26 -1
- package/dist/app/features/web/web.run.d.ts +3 -0
- package/dist/app/features/web/web.run.js +11 -3
- package/dist/app/kernel/access.d.ts +33 -0
- package/dist/app/kernel/access.js +44 -0
- package/dist/app/kernel/define.d.ts +14 -1
- package/dist/app/kernel/index.d.ts +1 -0
- package/dist/app/kernel/index.js +1 -0
- package/dist/app/kernel/rpc.d.ts +5 -2
- package/dist/app/registry.d.ts +4 -1
- package/dist/app/registry.js +24 -4
- package/dist/cli/commands/registry.js +2 -0
- package/dist/cli/commands/remote.d.ts +2 -0
- package/dist/cli/commands/remote.js +49 -0
- package/dist/cli/commands/sessions/reopen.js +3 -0
- package/dist/cli/commands/web.js +66 -0
- package/dist/cli/manifest.d.ts +63 -4
- package/dist/cli/manifest.js +33 -4
- package/dist/cli/menu/io-menu.d.ts +5 -3
- package/dist/cli/menu/io-menu.js +12 -5
- package/dist/cli/menu/remote-menu.d.ts +19 -0
- package/dist/cli/menu/remote-menu.js +108 -0
- package/dist/cli/menu/views.js +2 -0
- package/dist/cli/operations/handler.js +15 -1
- package/dist/cli/services/remote-client.d.ts +16 -0
- package/dist/cli/services/remote-client.js +141 -0
- package/dist/cli/services/sessions-service.d.ts +5 -0
- package/dist/cli/services/sessions-service.js +17 -1
- package/dist/core/config/defaults.js +11 -1
- package/dist/core/local-config/file.js +16 -2
- package/dist/core/local-config/overrides.js +7 -0
- package/dist/core/run/versions.js +9 -8
- package/dist/core/schema/config.d.ts +22 -3
- package/dist/core/schema/config.js +39 -2
- package/dist/core/schema/web.d.ts +51 -0
- package/dist/core/schema/web.js +46 -1
- package/dist/core/util/fs.d.ts +5 -0
- package/dist/core/util/fs.js +23 -0
- package/dist/core/util/index.d.ts +1 -1
- package/dist/core/util/index.js +1 -1
- package/dist/guest/daemon/daemon.js +2 -0
- package/dist/guest/daemon/idle-shutdown.js +2 -1
- package/dist/guest/daemon/sessions.d.ts +16 -2
- package/dist/guest/daemon/sessions.js +126 -20
- package/dist/guest/git/decision.js +7 -0
- package/dist/guest/sessions/cmdline.d.ts +14 -0
- package/dist/guest/sessions/cmdline.js +10 -0
- package/dist/guest/toolchains/setup.js +3 -0
- package/dist/host/audit/log.d.ts +3 -2
- package/dist/host/audit/log.js +3 -3
- package/dist/host/channel/channel.d.ts +5 -1
- package/dist/host/channel/channel.js +12 -0
- package/dist/host/guard/agent-files.js +7 -1
- package/dist/host/guard/commands.js +13 -1
- package/dist/host/guard/git-config.js +27 -7
- package/dist/host/guard/git-dirs.js +78 -3
- package/dist/host/guard/mark-of-the-web.js +3 -1
- package/dist/host/guard/nested-repos.js +7 -2
- package/dist/host/guard/store.js +1 -0
- package/dist/host/guard/types.d.ts +2 -0
- package/dist/host/launch/mappings.js +11 -1
- package/dist/host/launch/project-scan.js +2 -21
- package/dist/host/launch/stage.js +4 -0
- package/dist/host/life/session-ledger.js +2 -1
- package/dist/host/remote/access-store.d.ts +156 -0
- package/dist/host/remote/access-store.js +308 -0
- package/dist/host/remote/cert.d.ts +20 -0
- package/dist/host/remote/cert.js +103 -0
- package/dist/host/remote/door-client.d.ts +13 -0
- package/dist/host/remote/door-client.js +54 -0
- package/dist/host/remote/firewall.d.ts +44 -0
- package/dist/host/remote/firewall.js +118 -0
- package/dist/host/remote/gate.d.ts +125 -0
- package/dist/host/remote/gate.js +391 -0
- package/dist/host/remote/index.d.ts +8 -0
- package/dist/host/remote/index.js +10 -0
- package/dist/host/remote/lan.d.ts +24 -0
- package/dist/host/remote/lan.js +88 -0
- package/dist/host/remote/tls-store.d.ts +22 -0
- package/dist/host/remote/tls-store.js +63 -0
- package/dist/host/remote/windows-helper.d.ts +67 -0
- package/dist/host/remote/windows-helper.js +129 -0
- package/dist/host/web/bridge.d.ts +5 -1
- package/dist/host/web/bridge.js +6 -2
- package/dist/host/web/browser.js +1 -1
- package/dist/host/web/control.d.ts +4 -1
- package/dist/host/web/control.js +28 -4
- package/dist/host/web/rpc.d.ts +16 -2
- package/dist/host/web/rpc.js +37 -4
- package/dist/host/web/runner.d.ts +4 -0
- package/dist/host/web/runner.js +12 -0
- package/dist/host/web/server.d.ts +18 -2
- package/dist/host/web/server.js +97 -24
- package/dist/host/web/state.d.ts +5 -0
- package/dist/host/web/state.js +8 -0
- package/dist/runtime/agent.js +74 -3
- package/dist/runtime/daemon.js +205 -24
- package/dist/runtime/db.js +74 -3
- package/dist/runtime/gitguard.js +6 -0
- package/dist/runtime/main.js +77 -3
- package/dist/runtime/netproxy.js +74 -3
- package/dist/runtime/view.js +76 -3
- package/dist/selftest/app.test.js +41 -6
- package/dist/selftest/channel.test.js +16 -0
- package/dist/selftest/cmdline.test.js +16 -0
- package/dist/selftest/git-access.test.js +8 -0
- package/dist/selftest/hostile-input.test.js +12 -1
- package/dist/selftest/index.js +2 -0
- package/dist/selftest/live-daemon.test.js +25 -0
- package/dist/selftest/local-config.test.js +30 -0
- package/dist/selftest/remote.test.d.ts +2 -0
- package/dist/selftest/remote.test.js +536 -0
- package/dist/selftest/repo-guard.test.js +56 -2
- package/dist/selftest/resume.test.js +2 -1
- package/dist/selftest/sharing.test.js +9 -2
- package/dist/selftest/support/fixtures.d.ts +13 -0
- package/dist/selftest/support/web-preview.js +63 -0
- package/dist/selftest/web.test.js +2 -0
- package/dist/shared/channel/schema.d.ts +23 -0
- package/dist/shared/channel/schema.js +8 -0
- package/dist/shared/pty/protocol.d.ts +2 -0
- package/dist/shared/pty/protocol.js +2 -0
- package/dist/web/index.html +1 -1
- package/dist/web/main-Z2WYAE2Z.js +221 -0
- package/native/csharp/HostTools/Program.cs +17 -1
- package/native/csharp/HostTools/WebHelper.cs +499 -0
- package/native/scripts/get-network-profile.ps1 +19 -0
- package/native/scripts/set-folder-access.ps1 +11 -0
- package/native/scripts/set-web-firewall.ps1 +103 -0
- package/package.json +1 -1
- package/sandbox/csharp/PtyHost.cs +20 -0
- package/schemas/config.schema.json +65 -0
- package/schemas/sandbox-config.schema.json +0 -18
- package/dist/web/main-UD4QCXZR.js +0 -219
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
var Pre=Object.create;var dy=Object.defineProperty;var Dre=Object.getOwnPropertyDescriptor;var Rre=Object.getOwnPropertyNames;var Tre=Object.getPrototypeOf,Ere=Object.prototype.hasOwnProperty;var mF=e=>{throw TypeError(e)};var $re=(e,t,r)=>t in e?dy(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var ya=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}},ys=(e,t)=>{for(var r in t)dy(e,r,{get:t[r],enumerable:!0})},Are=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Rre(t))!Ere.call(e,o)&&o!==r&&dy(e,o,{get:()=>t[o],enumerable:!(n=Dre(t,o))||n.enumerable});return e};var y=(e,t,r)=>(r=e!=null?Pre(Tre(e)):{},Are(t||!e||!e.__esModule?dy(r,"default",{value:e,enumerable:!0}):r,e));var $t=(e,t,r)=>$re(e,typeof t!="symbol"?t+"":t,r),a2=(e,t,r)=>t.has(e)||mF("Cannot "+r);var L=(e,t,r)=>(a2(e,t,"read from private field"),r?r.call(e):t.get(e)),Re=(e,t,r)=>t.has(e)?mF("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),pe=(e,t,r,n)=>(a2(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),rt=(e,t,r)=>(a2(e,t,"access private method"),r);var Eh=(e,t,r,n)=>({set _(o){pe(e,t,o,r)},get _(){return L(e,t,n)}});var CF=ya(at=>{"use strict";var $h=Symbol.for("react.element"),Ore=Symbol.for("react.portal"),zre=Symbol.for("react.fragment"),Nre=Symbol.for("react.strict_mode"),Fre=Symbol.for("react.profiler"),Lre=Symbol.for("react.provider"),Mre=Symbol.for("react.context"),Bre=Symbol.for("react.forward_ref"),jre=Symbol.for("react.suspense"),Ure=Symbol.for("react.memo"),Vre=Symbol.for("react.lazy"),hF=Symbol.iterator;function Hre(e){return e===null||typeof e!="object"?null:(e=hF&&e[hF]||e["@@iterator"],typeof e=="function"?e:null)}var xF={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},bF=Object.assign,yF={};function pf(e,t,r){this.props=e,this.context=t,this.refs=yF,this.updater=r||xF}pf.prototype.isReactComponent={};pf.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};pf.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function _F(){}_F.prototype=pf.prototype;function l2(e,t,r){this.props=e,this.context=t,this.refs=yF,this.updater=r||xF}var c2=l2.prototype=new _F;c2.constructor=l2;bF(c2,pf.prototype);c2.isPureReactComponent=!0;var gF=Array.isArray,IF=Object.prototype.hasOwnProperty,d2={current:null},wF={key:!0,ref:!0,__self:!0,__source:!0};function SF(e,t,r){var n,o={},i=null,a=null;if(t!=null)for(n in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(i=""+t.key),t)IF.call(t,n)&&!wF.hasOwnProperty(n)&&(o[n]=t[n]);var s=arguments.length-2;if(s===1)o.children=r;else if(1<s){for(var l=Array(s),c=0;c<s;c++)l[c]=arguments[c+2];o.children=l}if(e&&e.defaultProps)for(n in s=e.defaultProps,s)o[n]===void 0&&(o[n]=s[n]);return{$$typeof:$h,type:e,key:i,ref:a,props:o,_owner:d2.current}}function Wre(e,t){return{$$typeof:$h,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function u2(e){return typeof e=="object"&&e!==null&&e.$$typeof===$h}function Zre(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var vF=/\/+/g;function s2(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Zre(""+e.key):t.toString(36)}function my(e,t,r,n,o){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(i){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case $h:case Ore:a=!0}}if(a)return a=e,o=o(a),e=n===""?"."+s2(a,0):n,gF(o)?(r="",e!=null&&(r=e.replace(vF,"$&/")+"/"),my(o,t,r,"",function(c){return c})):o!=null&&(u2(o)&&(o=Wre(o,r+(!o.key||a&&a.key===o.key?"":(""+o.key).replace(vF,"$&/")+"/")+e)),t.push(o)),1;if(a=0,n=n===""?".":n+":",gF(e))for(var s=0;s<e.length;s++){i=e[s];var l=n+s2(i,s);a+=my(i,t,r,l,o)}else if(l=Hre(e),typeof l=="function")for(e=l.call(e),s=0;!(i=e.next()).done;)i=i.value,l=n+s2(i,s++),a+=my(i,t,r,l,o);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return a}function fy(e,t,r){if(e==null)return e;var n=[],o=0;return my(e,n,"","",function(i){return t.call(r,i,o++)}),n}function Gre(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var jo={current:null},py={transition:null},Kre={ReactCurrentDispatcher:jo,ReactCurrentBatchConfig:py,ReactCurrentOwner:d2};function kF(){throw Error("act(...) is not supported in production builds of React.")}at.Children={map:fy,forEach:function(e,t,r){fy(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return fy(e,function(){t++}),t},toArray:function(e){return fy(e,function(t){return t})||[]},only:function(e){if(!u2(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};at.Component=pf;at.Fragment=zre;at.Profiler=Fre;at.PureComponent=l2;at.StrictMode=Nre;at.Suspense=jre;at.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Kre;at.act=kF;at.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n=bF({},e.props),o=e.key,i=e.ref,a=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,a=d2.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(l in t)IF.call(t,l)&&!wF.hasOwnProperty(l)&&(n[l]=t[l]===void 0&&s!==void 0?s[l]:t[l])}var l=arguments.length-2;if(l===1)n.children=r;else if(1<l){s=Array(l);for(var c=0;c<l;c++)s[c]=arguments[c+2];n.children=s}return{$$typeof:$h,type:e.type,key:o,ref:i,props:n,_owner:a}};at.createContext=function(e){return e={$$typeof:Mre,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Lre,_context:e},e.Consumer=e};at.createElement=SF;at.createFactory=function(e){var t=SF.bind(null,e);return t.type=e,t};at.createRef=function(){return{current:null}};at.forwardRef=function(e){return{$$typeof:Bre,render:e}};at.isValidElement=u2;at.lazy=function(e){return{$$typeof:Vre,_payload:{_status:-1,_result:e},_init:Gre}};at.memo=function(e,t){return{$$typeof:Ure,type:e,compare:t===void 0?null:t}};at.startTransition=function(e){var t=py.transition;py.transition={};try{e()}finally{py.transition=t}};at.unstable_act=kF;at.useCallback=function(e,t){return jo.current.useCallback(e,t)};at.useContext=function(e){return jo.current.useContext(e)};at.useDebugValue=function(){};at.useDeferredValue=function(e){return jo.current.useDeferredValue(e)};at.useEffect=function(e,t){return jo.current.useEffect(e,t)};at.useId=function(){return jo.current.useId()};at.useImperativeHandle=function(e,t,r){return jo.current.useImperativeHandle(e,t,r)};at.useInsertionEffect=function(e,t){return jo.current.useInsertionEffect(e,t)};at.useLayoutEffect=function(e,t){return jo.current.useLayoutEffect(e,t)};at.useMemo=function(e,t){return jo.current.useMemo(e,t)};at.useReducer=function(e,t,r){return jo.current.useReducer(e,t,r)};at.useRef=function(e){return jo.current.useRef(e)};at.useState=function(e){return jo.current.useState(e)};at.useSyncExternalStore=function(e,t,r){return jo.current.useSyncExternalStore(e,t,r)};at.useTransition=function(){return jo.current.useTransition()};at.version="18.3.1"});var D=ya((Fke,PF)=>{"use strict";PF.exports=CF()});var XF=ya(_y=>{"use strict";var voe=D(),xoe=Symbol.for("react.element"),boe=Symbol.for("react.fragment"),yoe=Object.prototype.hasOwnProperty,_oe=voe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Ioe={key:!0,ref:!0,__self:!0,__source:!0};function qF(e,t,r){var n,o={},i=null,a=null;r!==void 0&&(i=""+r),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(a=t.ref);for(n in t)yoe.call(t,n)&&!Ioe.hasOwnProperty(n)&&(o[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)o[n]===void 0&&(o[n]=t[n]);return{$$typeof:xoe,type:e,key:i,ref:a,props:o,_owner:_oe.current}}_y.Fragment=boe;_y.jsx=qF;_y.jsxs=qF});var O=ya((e2e,QF)=>{"use strict";QF.exports=XF()});var WM=ya(Nt=>{"use strict";function nP(e,t){var r=e.length;e.push(t);e:for(;0<r;){var n=r-1>>>1,o=e[n];if(0<Vy(o,t))e[n]=t,e[r]=o,r=n;else break e}}function Zi(e){return e.length===0?null:e[0]}function Wy(e){if(e.length===0)return null;var t=e[0],r=e.pop();if(r!==t){e[0]=r;e:for(var n=0,o=e.length,i=o>>>1;n<i;){var a=2*(n+1)-1,s=e[a],l=a+1,c=e[l];if(0>Vy(s,r))l<o&&0>Vy(c,s)?(e[n]=c,e[l]=r,n=l):(e[n]=s,e[a]=r,n=a);else if(l<o&&0>Vy(c,r))e[n]=c,e[l]=r,n=l;else break e}}return t}function Vy(e,t){var r=e.sortIndex-t.sortIndex;return r!==0?r:e.id-t.id}typeof performance=="object"&&typeof performance.now=="function"?(NM=performance,Nt.unstable_now=function(){return NM.now()}):(tP=Date,FM=tP.now(),Nt.unstable_now=function(){return tP.now()-FM});var NM,tP,FM,Ca=[],Ol=[],fne=1,ai=null,Do=3,Zy=!1,Sd=!1,Jh=!1,BM=typeof setTimeout=="function"?setTimeout:null,jM=typeof clearTimeout=="function"?clearTimeout:null,LM=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function iP(e){for(var t=Zi(Ol);t!==null;){if(t.callback===null)Wy(Ol);else if(t.startTime<=e)Wy(Ol),t.sortIndex=t.expirationTime,nP(Ca,t);else break;t=Zi(Ol)}}function aP(e){if(Jh=!1,iP(e),!Sd)if(Zi(Ca)!==null)Sd=!0,lP(sP);else{var t=Zi(Ol);t!==null&&cP(aP,t.startTime-e)}}function sP(e,t){Sd=!1,Jh&&(Jh=!1,jM(eg),eg=-1),Zy=!0;var r=Do;try{for(iP(t),ai=Zi(Ca);ai!==null&&(!(ai.expirationTime>t)||e&&!HM());){var n=ai.callback;if(typeof n=="function"){ai.callback=null,Do=ai.priorityLevel;var o=n(ai.expirationTime<=t);t=Nt.unstable_now(),typeof o=="function"?ai.callback=o:ai===Zi(Ca)&&Wy(Ca),iP(t)}else Wy(Ca);ai=Zi(Ca)}if(ai!==null)var i=!0;else{var a=Zi(Ol);a!==null&&cP(aP,a.startTime-t),i=!1}return i}finally{ai=null,Do=r,Zy=!1}}var Gy=!1,Hy=null,eg=-1,UM=5,VM=-1;function HM(){return!(Nt.unstable_now()-VM<UM)}function rP(){if(Hy!==null){var e=Nt.unstable_now();VM=e;var t=!0;try{t=Hy(!0,e)}finally{t?Yh():(Gy=!1,Hy=null)}}else Gy=!1}var Yh;typeof LM=="function"?Yh=function(){LM(rP)}:typeof MessageChannel<"u"?(oP=new MessageChannel,MM=oP.port2,oP.port1.onmessage=rP,Yh=function(){MM.postMessage(null)}):Yh=function(){BM(rP,0)};var oP,MM;function lP(e){Hy=e,Gy||(Gy=!0,Yh())}function cP(e,t){eg=BM(function(){e(Nt.unstable_now())},t)}Nt.unstable_IdlePriority=5;Nt.unstable_ImmediatePriority=1;Nt.unstable_LowPriority=4;Nt.unstable_NormalPriority=3;Nt.unstable_Profiling=null;Nt.unstable_UserBlockingPriority=2;Nt.unstable_cancelCallback=function(e){e.callback=null};Nt.unstable_continueExecution=function(){Sd||Zy||(Sd=!0,lP(sP))};Nt.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):UM=0<e?Math.floor(1e3/e):5};Nt.unstable_getCurrentPriorityLevel=function(){return Do};Nt.unstable_getFirstCallbackNode=function(){return Zi(Ca)};Nt.unstable_next=function(e){switch(Do){case 1:case 2:case 3:var t=3;break;default:t=Do}var r=Do;Do=t;try{return e()}finally{Do=r}};Nt.unstable_pauseExecution=function(){};Nt.unstable_requestPaint=function(){};Nt.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var r=Do;Do=e;try{return t()}finally{Do=r}};Nt.unstable_scheduleCallback=function(e,t,r){var n=Nt.unstable_now();switch(typeof r=="object"&&r!==null?(r=r.delay,r=typeof r=="number"&&0<r?n+r:n):r=n,e){case 1:var o=-1;break;case 2:o=250;break;case 5:o=1073741823;break;case 4:o=1e4;break;default:o=5e3}return o=r+o,e={id:fne++,callback:t,priorityLevel:e,startTime:r,expirationTime:o,sortIndex:-1},r>n?(e.sortIndex=r,nP(Ol,e),Zi(Ca)===null&&e===Zi(Ol)&&(Jh?(jM(eg),eg=-1):Jh=!0,cP(aP,r-n))):(e.sortIndex=o,nP(Ca,e),Sd||Zy||(Sd=!0,lP(sP))),e};Nt.unstable_shouldYield=HM;Nt.unstable_wrapCallback=function(e){var t=Do;return function(){var r=Do;Do=t;try{return e.apply(this,arguments)}finally{Do=r}}}});var GM=ya((TTe,ZM)=>{"use strict";ZM.exports=WM()});var Q8=ya(Wn=>{"use strict";var mne=D(),Vn=GM();function ie(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var e7=new Set,Ig={};function Fd(e,t){Qf(e,t),Qf(e+"Capture",t)}function Qf(e,t){for(Ig[e]=t,e=0;e<t.length;e++)e7.add(t[e])}var Es=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),$P=Object.prototype.hasOwnProperty,pne=/^[: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]*$/,KM={},qM={};function hne(e){return $P.call(qM,e)?!0:$P.call(KM,e)?!1:pne.test(e)?qM[e]=!0:(KM[e]=!0,!1)}function gne(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function vne(e,t,r,n){if(t===null||typeof t>"u"||gne(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Wo(e,t,r,n,o,i,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=o,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var mo={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){mo[e]=new Wo(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];mo[t]=new Wo(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){mo[e]=new Wo(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){mo[e]=new Wo(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){mo[e]=new Wo(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){mo[e]=new Wo(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){mo[e]=new Wo(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){mo[e]=new Wo(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){mo[e]=new Wo(e,5,!1,e.toLowerCase(),null,!1,!1)});var SD=/[\-:]([a-z])/g;function kD(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(SD,kD);mo[t]=new Wo(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(SD,kD);mo[t]=new Wo(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(SD,kD);mo[t]=new Wo(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){mo[e]=new Wo(e,1,!1,e.toLowerCase(),null,!1,!1)});mo.xlinkHref=new Wo("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){mo[e]=new Wo(e,1,!1,e.toLowerCase(),null,!0,!0)});function CD(e,t,r,n){var o=mo.hasOwnProperty(t)?mo[t]:null;(o!==null?o.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(vne(t,r,o,n)&&(r=null),n||o===null?hne(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):o.mustUseProperty?e[o.propertyName]=r===null?o.type===3?!1:"":r:(t=o.attributeName,n=o.attributeNamespace,r===null?e.removeAttribute(t):(o=o.type,r=o===3||o===4&&r===!0?"":""+r,n?e.setAttributeNS(n,t,r):e.setAttribute(t,r))))}var zs=mne.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Ky=Symbol.for("react.element"),Af=Symbol.for("react.portal"),Of=Symbol.for("react.fragment"),PD=Symbol.for("react.strict_mode"),AP=Symbol.for("react.profiler"),t7=Symbol.for("react.provider"),r7=Symbol.for("react.context"),DD=Symbol.for("react.forward_ref"),OP=Symbol.for("react.suspense"),zP=Symbol.for("react.suspense_list"),RD=Symbol.for("react.memo"),Nl=Symbol.for("react.lazy"),o7=Symbol.for("react.offscreen"),XM=Symbol.iterator;function tg(e){return e===null||typeof e!="object"?null:(e=XM&&e[XM]||e["@@iterator"],typeof e=="function"?e:null)}var cr=Object.assign,dP;function cg(e){if(dP===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);dP=t&&t[1]||""}return`
|
|
2
|
+
`+dP+e}var uP=!1;function fP(e,t){if(!e||uP)return"";uP=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var n=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){n=c}e.call(t.prototype)}else{try{throw Error()}catch(c){n=c}e()}}catch(c){if(c&&n&&typeof c.stack=="string"){for(var o=c.stack.split(`
|
|
3
|
+
`),i=n.stack.split(`
|
|
4
|
+
`),a=o.length-1,s=i.length-1;1<=a&&0<=s&&o[a]!==i[s];)s--;for(;1<=a&&0<=s;a--,s--)if(o[a]!==i[s]){if(a!==1||s!==1)do if(a--,s--,0>s||o[a]!==i[s]){var l=`
|
|
5
|
+
`+o[a].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=a&&0<=s);break}}}finally{uP=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?cg(e):""}function xne(e){switch(e.tag){case 5:return cg(e.type);case 16:return cg("Lazy");case 13:return cg("Suspense");case 19:return cg("SuspenseList");case 0:case 2:case 15:return e=fP(e.type,!1),e;case 11:return e=fP(e.type.render,!1),e;case 1:return e=fP(e.type,!0),e;default:return""}}function NP(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Of:return"Fragment";case Af:return"Portal";case AP:return"Profiler";case PD:return"StrictMode";case OP:return"Suspense";case zP:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case r7:return(e.displayName||"Context")+".Consumer";case t7:return(e._context.displayName||"Context")+".Provider";case DD:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case RD:return t=e.displayName||null,t!==null?t:NP(e.type)||"Memo";case Nl:t=e._payload,e=e._init;try{return NP(e(t))}catch{}}return null}function bne(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return NP(t);case 8:return t===PD?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Xl(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function n7(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function yne(e){var t=n7(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var o=r.get,i=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(a){n=""+a,i.call(this,a)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(a){n=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function qy(e){e._valueTracker||(e._valueTracker=yne(e))}function i7(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=n7(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function w_(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function FP(e,t){var r=t.checked;return cr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function QM(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=Xl(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function a7(e,t){t=t.checked,t!=null&&CD(e,"checked",t,!1)}function LP(e,t){a7(e,t);var r=Xl(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?MP(e,t.type,r):t.hasOwnProperty("defaultValue")&&MP(e,t.type,Xl(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function YM(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function MP(e,t,r){(t!=="number"||w_(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var dg=Array.isArray;function Wf(e,t,r,n){if(e=e.options,t){t={};for(var o=0;o<r.length;o++)t["$"+r[o]]=!0;for(r=0;r<e.length;r++)o=t.hasOwnProperty("$"+e[r].value),e[r].selected!==o&&(e[r].selected=o),o&&n&&(e[r].defaultSelected=!0)}else{for(r=""+Xl(r),t=null,o=0;o<e.length;o++){if(e[o].value===r){e[o].selected=!0,n&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function BP(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(ie(91));return cr({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function JM(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(ie(92));if(dg(r)){if(1<r.length)throw Error(ie(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:Xl(r)}}function s7(e,t){var r=Xl(t.value),n=Xl(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),n!=null&&(e.defaultValue=""+n)}function eB(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function l7(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function jP(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?l7(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Xy,c7=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,n,o){MSApp.execUnsafeLocalFunction(function(){return e(t,r,n,o)})}:e})(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Xy=Xy||document.createElement("div"),Xy.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Xy.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function wg(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var mg={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},_ne=["Webkit","ms","Moz","O"];Object.keys(mg).forEach(function(e){_ne.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),mg[t]=mg[e]})});function d7(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||mg.hasOwnProperty(e)&&mg[e]?(""+t).trim():t+"px"}function u7(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,o=d7(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,o):e[r]=o}}var Ine=cr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function UP(e,t){if(t){if(Ine[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ie(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ie(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ie(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ie(62))}}function VP(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){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 HP=null;function TD(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var WP=null,Zf=null,Gf=null;function tB(e){if(e=jg(e)){if(typeof WP!="function")throw Error(ie(280));var t=e.stateNode;t&&(t=Q_(t),WP(e.stateNode,e.type,t))}}function f7(e){Zf?Gf?Gf.push(e):Gf=[e]:Zf=e}function m7(){if(Zf){var e=Zf,t=Gf;if(Gf=Zf=null,tB(e),t)for(e=0;e<t.length;e++)tB(t[e])}}function p7(e,t){return e(t)}function h7(){}var mP=!1;function g7(e,t,r){if(mP)return e(t,r);mP=!0;try{return p7(e,t,r)}finally{mP=!1,(Zf!==null||Gf!==null)&&(h7(),m7())}}function Sg(e,t){var r=e.stateNode;if(r===null)return null;var n=Q_(r);if(n===null)return null;r=n[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(ie(231,t,typeof r));return r}var ZP=!1;if(Es)try{Ef={},Object.defineProperty(Ef,"passive",{get:function(){ZP=!0}}),window.addEventListener("test",Ef,Ef),window.removeEventListener("test",Ef,Ef)}catch{ZP=!1}var Ef;function wne(e,t,r,n,o,i,a,s,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(r,c)}catch(d){this.onError(d)}}var pg=!1,S_=null,k_=!1,GP=null,Sne={onError:function(e){pg=!0,S_=e}};function kne(e,t,r,n,o,i,a,s,l){pg=!1,S_=null,wne.apply(Sne,arguments)}function Cne(e,t,r,n,o,i,a,s,l){if(kne.apply(this,arguments),pg){if(pg){var c=S_;pg=!1,S_=null}else throw Error(ie(198));k_||(k_=!0,GP=c)}}function Ld(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function v7(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function rB(e){if(Ld(e)!==e)throw Error(ie(188))}function Pne(e){var t=e.alternate;if(!t){if(t=Ld(e),t===null)throw Error(ie(188));return t!==e?null:e}for(var r=e,n=t;;){var o=r.return;if(o===null)break;var i=o.alternate;if(i===null){if(n=o.return,n!==null){r=n;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===r)return rB(o),e;if(i===n)return rB(o),t;i=i.sibling}throw Error(ie(188))}if(r.return!==n.return)r=o,n=i;else{for(var a=!1,s=o.child;s;){if(s===r){a=!0,r=o,n=i;break}if(s===n){a=!0,n=o,r=i;break}s=s.sibling}if(!a){for(s=i.child;s;){if(s===r){a=!0,r=i,n=o;break}if(s===n){a=!0,n=i,r=o;break}s=s.sibling}if(!a)throw Error(ie(189))}}if(r.alternate!==n)throw Error(ie(190))}if(r.tag!==3)throw Error(ie(188));return r.stateNode.current===r?e:t}function x7(e){return e=Pne(e),e!==null?b7(e):null}function b7(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=b7(e);if(t!==null)return t;e=e.sibling}return null}var y7=Vn.unstable_scheduleCallback,oB=Vn.unstable_cancelCallback,Dne=Vn.unstable_shouldYield,Rne=Vn.unstable_requestPaint,wr=Vn.unstable_now,Tne=Vn.unstable_getCurrentPriorityLevel,ED=Vn.unstable_ImmediatePriority,_7=Vn.unstable_UserBlockingPriority,C_=Vn.unstable_NormalPriority,Ene=Vn.unstable_LowPriority,I7=Vn.unstable_IdlePriority,G_=null,Ta=null;function $ne(e){if(Ta&&typeof Ta.onCommitFiberRoot=="function")try{Ta.onCommitFiberRoot(G_,e,void 0,(e.current.flags&128)===128)}catch{}}var Qi=Math.clz32?Math.clz32:zne,Ane=Math.log,One=Math.LN2;function zne(e){return e>>>=0,e===0?32:31-(Ane(e)/One|0)|0}var Qy=64,Yy=4194304;function ug(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function P_(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,o=e.suspendedLanes,i=e.pingedLanes,a=r&268435455;if(a!==0){var s=a&~o;s!==0?n=ug(s):(i&=a,i!==0&&(n=ug(i)))}else a=r&~o,a!==0?n=ug(a):i!==0&&(n=ug(i));if(n===0)return 0;if(t!==0&&t!==n&&(t&o)===0&&(o=n&-n,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if((n&4)!==0&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0<t;)r=31-Qi(t),o=1<<r,n|=e[r],t&=~o;return n}function Nne(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Fne(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,o=e.expirationTimes,i=e.pendingLanes;0<i;){var a=31-Qi(i),s=1<<a,l=o[a];l===-1?((s&r)===0||(s&n)!==0)&&(o[a]=Nne(s,t)):l<=t&&(e.expiredLanes|=s),i&=~s}}function KP(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function w7(){var e=Qy;return Qy<<=1,(Qy&4194240)===0&&(Qy=64),e}function pP(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function Mg(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Qi(t),e[t]=r}function Lne(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0<r;){var o=31-Qi(r),i=1<<o;t[o]=0,n[o]=-1,e[o]=-1,r&=~i}}function $D(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-Qi(r),o=1<<n;o&t|e[n]&t&&(e[n]|=t),r&=~o}}var Ct=0;function S7(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var k7,AD,C7,P7,D7,qP=!1,Jy=[],Ul=null,Vl=null,Hl=null,kg=new Map,Cg=new Map,Ll=[],Mne="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function nB(e,t){switch(e){case"focusin":case"focusout":Ul=null;break;case"dragenter":case"dragleave":Vl=null;break;case"mouseover":case"mouseout":Hl=null;break;case"pointerover":case"pointerout":kg.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Cg.delete(t.pointerId)}}function rg(e,t,r,n,o,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:i,targetContainers:[o]},t!==null&&(t=jg(t),t!==null&&AD(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function Bne(e,t,r,n,o){switch(t){case"focusin":return Ul=rg(Ul,e,t,r,n,o),!0;case"dragenter":return Vl=rg(Vl,e,t,r,n,o),!0;case"mouseover":return Hl=rg(Hl,e,t,r,n,o),!0;case"pointerover":var i=o.pointerId;return kg.set(i,rg(kg.get(i)||null,e,t,r,n,o)),!0;case"gotpointercapture":return i=o.pointerId,Cg.set(i,rg(Cg.get(i)||null,e,t,r,n,o)),!0}return!1}function R7(e){var t=Pd(e.target);if(t!==null){var r=Ld(t);if(r!==null){if(t=r.tag,t===13){if(t=v7(r),t!==null){e.blockedOn=t,D7(e.priority,function(){C7(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function m_(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=XP(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);HP=n,r.target.dispatchEvent(n),HP=null}else return t=jg(r),t!==null&&AD(t),e.blockedOn=r,!1;t.shift()}return!0}function iB(e,t,r){m_(e)&&r.delete(t)}function jne(){qP=!1,Ul!==null&&m_(Ul)&&(Ul=null),Vl!==null&&m_(Vl)&&(Vl=null),Hl!==null&&m_(Hl)&&(Hl=null),kg.forEach(iB),Cg.forEach(iB)}function og(e,t){e.blockedOn===t&&(e.blockedOn=null,qP||(qP=!0,Vn.unstable_scheduleCallback(Vn.unstable_NormalPriority,jne)))}function Pg(e){function t(o){return og(o,e)}if(0<Jy.length){og(Jy[0],e);for(var r=1;r<Jy.length;r++){var n=Jy[r];n.blockedOn===e&&(n.blockedOn=null)}}for(Ul!==null&&og(Ul,e),Vl!==null&&og(Vl,e),Hl!==null&&og(Hl,e),kg.forEach(t),Cg.forEach(t),r=0;r<Ll.length;r++)n=Ll[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<Ll.length&&(r=Ll[0],r.blockedOn===null);)R7(r),r.blockedOn===null&&Ll.shift()}var Kf=zs.ReactCurrentBatchConfig,D_=!0;function Une(e,t,r,n){var o=Ct,i=Kf.transition;Kf.transition=null;try{Ct=1,OD(e,t,r,n)}finally{Ct=o,Kf.transition=i}}function Vne(e,t,r,n){var o=Ct,i=Kf.transition;Kf.transition=null;try{Ct=4,OD(e,t,r,n)}finally{Ct=o,Kf.transition=i}}function OD(e,t,r,n){if(D_){var o=XP(e,t,r,n);if(o===null)_P(e,t,n,R_,r),nB(e,n);else if(Bne(o,e,t,r,n))n.stopPropagation();else if(nB(e,n),t&4&&-1<Mne.indexOf(e)){for(;o!==null;){var i=jg(o);if(i!==null&&k7(i),i=XP(e,t,r,n),i===null&&_P(e,t,n,R_,r),i===o)break;o=i}o!==null&&n.stopPropagation()}else _P(e,t,n,null,r)}}var R_=null;function XP(e,t,r,n){if(R_=null,e=TD(n),e=Pd(e),e!==null)if(t=Ld(e),t===null)e=null;else if(r=t.tag,r===13){if(e=v7(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return R_=e,null}function T7(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Tne()){case ED:return 1;case _7:return 4;case C_:case Ene:return 16;case I7:return 536870912;default:return 16}default:return 16}}var Bl=null,zD=null,p_=null;function E7(){if(p_)return p_;var e,t=zD,r=t.length,n,o="value"in Bl?Bl.value:Bl.textContent,i=o.length;for(e=0;e<r&&t[e]===o[e];e++);var a=r-e;for(n=1;n<=a&&t[r-n]===o[i-n];n++);return p_=o.slice(e,1<n?1-n:void 0)}function h_(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function e_(){return!0}function aB(){return!1}function Hn(e){function t(r,n,o,i,a){this._reactName=r,this._targetInst=o,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(r=e[s],this[s]=r?r(i):i[s]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?e_:aB,this.isPropagationStopped=aB,this}return cr(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=e_)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=e_)},persist:function(){},isPersistent:e_}),t}var nm={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ND=Hn(nm),Bg=cr({},nm,{view:0,detail:0}),Hne=Hn(Bg),hP,gP,ng,K_=cr({},Bg,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:FD,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==ng&&(ng&&e.type==="mousemove"?(hP=e.screenX-ng.screenX,gP=e.screenY-ng.screenY):gP=hP=0,ng=e),hP)},movementY:function(e){return"movementY"in e?e.movementY:gP}}),sB=Hn(K_),Wne=cr({},K_,{dataTransfer:0}),Zne=Hn(Wne),Gne=cr({},Bg,{relatedTarget:0}),vP=Hn(Gne),Kne=cr({},nm,{animationName:0,elapsedTime:0,pseudoElement:0}),qne=Hn(Kne),Xne=cr({},nm,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Qne=Hn(Xne),Yne=cr({},nm,{data:0}),lB=Hn(Yne),Jne={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},eie={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"},tie={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function rie(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=tie[e])?!!t[e]:!1}function FD(){return rie}var oie=cr({},Bg,{key:function(e){if(e.key){var t=Jne[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=h_(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?eie[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:FD,charCode:function(e){return e.type==="keypress"?h_(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?h_(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),nie=Hn(oie),iie=cr({},K_,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),cB=Hn(iie),aie=cr({},Bg,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:FD}),sie=Hn(aie),lie=cr({},nm,{propertyName:0,elapsedTime:0,pseudoElement:0}),cie=Hn(lie),die=cr({},K_,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),uie=Hn(die),fie=[9,13,27,32],LD=Es&&"CompositionEvent"in window,hg=null;Es&&"documentMode"in document&&(hg=document.documentMode);var mie=Es&&"TextEvent"in window&&!hg,$7=Es&&(!LD||hg&&8<hg&&11>=hg),dB=" ",uB=!1;function A7(e,t){switch(e){case"keyup":return fie.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function O7(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var zf=!1;function pie(e,t){switch(e){case"compositionend":return O7(t);case"keypress":return t.which!==32?null:(uB=!0,dB);case"textInput":return e=t.data,e===dB&&uB?null:e;default:return null}}function hie(e,t){if(zf)return e==="compositionend"||!LD&&A7(e,t)?(e=E7(),p_=zD=Bl=null,zf=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return $7&&t.locale!=="ko"?null:t.data;default:return null}}var gie={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 fB(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!gie[e.type]:t==="textarea"}function z7(e,t,r,n){f7(n),t=T_(t,"onChange"),0<t.length&&(r=new ND("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var gg=null,Dg=null;function vie(e){Z7(e,0)}function q_(e){var t=Lf(e);if(i7(t))return e}function xie(e,t){if(e==="change")return t}var N7=!1;Es&&(Es?(r_="oninput"in document,r_||(xP=document.createElement("div"),xP.setAttribute("oninput","return;"),r_=typeof xP.oninput=="function"),t_=r_):t_=!1,N7=t_&&(!document.documentMode||9<document.documentMode));var t_,r_,xP;function mB(){gg&&(gg.detachEvent("onpropertychange",F7),Dg=gg=null)}function F7(e){if(e.propertyName==="value"&&q_(Dg)){var t=[];z7(t,Dg,e,TD(e)),g7(vie,t)}}function bie(e,t,r){e==="focusin"?(mB(),gg=t,Dg=r,gg.attachEvent("onpropertychange",F7)):e==="focusout"&&mB()}function yie(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return q_(Dg)}function _ie(e,t){if(e==="click")return q_(t)}function Iie(e,t){if(e==="input"||e==="change")return q_(t)}function wie(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ji=typeof Object.is=="function"?Object.is:wie;function Rg(e,t){if(Ji(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var o=r[n];if(!$P.call(t,o)||!Ji(e[o],t[o]))return!1}return!0}function pB(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function hB(e,t){var r=pB(e);e=0;for(var n;r;){if(r.nodeType===3){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=pB(r)}}function L7(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?L7(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function M7(){for(var e=window,t=w_();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=w_(e.document)}return t}function MD(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Sie(e){var t=M7(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&L7(r.ownerDocument.documentElement,r)){if(n!==null&&MD(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=r.textContent.length,i=Math.min(n.start,o);n=n.end===void 0?i:Math.min(n.end,o),!e.extend&&i>n&&(o=n,n=i,i=o),o=hB(r,i);var a=hB(r,n);o&&a&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>n?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var kie=Es&&"documentMode"in document&&11>=document.documentMode,Nf=null,QP=null,vg=null,YP=!1;function gB(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;YP||Nf==null||Nf!==w_(n)||(n=Nf,"selectionStart"in n&&MD(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),vg&&Rg(vg,n)||(vg=n,n=T_(QP,"onSelect"),0<n.length&&(t=new ND("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=Nf)))}function o_(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Ff={animationend:o_("Animation","AnimationEnd"),animationiteration:o_("Animation","AnimationIteration"),animationstart:o_("Animation","AnimationStart"),transitionend:o_("Transition","TransitionEnd")},bP={},B7={};Es&&(B7=document.createElement("div").style,"AnimationEvent"in window||(delete Ff.animationend.animation,delete Ff.animationiteration.animation,delete Ff.animationstart.animation),"TransitionEvent"in window||delete Ff.transitionend.transition);function X_(e){if(bP[e])return bP[e];if(!Ff[e])return e;var t=Ff[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in B7)return bP[e]=t[r];return e}var j7=X_("animationend"),U7=X_("animationiteration"),V7=X_("animationstart"),H7=X_("transitionend"),W7=new Map,vB="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Yl(e,t){W7.set(e,t),Fd(t,[e])}for(n_=0;n_<vB.length;n_++)i_=vB[n_],xB=i_.toLowerCase(),bB=i_[0].toUpperCase()+i_.slice(1),Yl(xB,"on"+bB);var i_,xB,bB,n_;Yl(j7,"onAnimationEnd");Yl(U7,"onAnimationIteration");Yl(V7,"onAnimationStart");Yl("dblclick","onDoubleClick");Yl("focusin","onFocus");Yl("focusout","onBlur");Yl(H7,"onTransitionEnd");Qf("onMouseEnter",["mouseout","mouseover"]);Qf("onMouseLeave",["mouseout","mouseover"]);Qf("onPointerEnter",["pointerout","pointerover"]);Qf("onPointerLeave",["pointerout","pointerover"]);Fd("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Fd("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Fd("onBeforeInput",["compositionend","keypress","textInput","paste"]);Fd("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Fd("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Fd("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var fg="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(" "),Cie=new Set("cancel close invalid load scroll toggle".split(" ").concat(fg));function yB(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,Cne(n,t,void 0,e),e.currentTarget=null}function Z7(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var n=e[r],o=n.event;n=n.listeners;e:{var i=void 0;if(t)for(var a=n.length-1;0<=a;a--){var s=n[a],l=s.instance,c=s.currentTarget;if(s=s.listener,l!==i&&o.isPropagationStopped())break e;yB(o,s,c),i=l}else for(a=0;a<n.length;a++){if(s=n[a],l=s.instance,c=s.currentTarget,s=s.listener,l!==i&&o.isPropagationStopped())break e;yB(o,s,c),i=l}}}if(k_)throw e=GP,k_=!1,GP=null,e}function Gt(e,t){var r=t[oD];r===void 0&&(r=t[oD]=new Set);var n=e+"__bubble";r.has(n)||(G7(t,e,2,!1),r.add(n))}function yP(e,t,r){var n=0;t&&(n|=4),G7(r,e,n,t)}var a_="_reactListening"+Math.random().toString(36).slice(2);function Tg(e){if(!e[a_]){e[a_]=!0,e7.forEach(function(r){r!=="selectionchange"&&(Cie.has(r)||yP(r,!1,e),yP(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[a_]||(t[a_]=!0,yP("selectionchange",!1,t))}}function G7(e,t,r,n){switch(T7(t)){case 1:var o=Une;break;case 4:o=Vne;break;default:o=OD}r=o.bind(null,t,r,e),o=void 0,!ZP||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),n?o!==void 0?e.addEventListener(t,r,{capture:!0,passive:o}):e.addEventListener(t,r,!0):o!==void 0?e.addEventListener(t,r,{passive:o}):e.addEventListener(t,r,!1)}function _P(e,t,r,n,o){var i=n;if((t&1)===0&&(t&2)===0&&n!==null)e:for(;;){if(n===null)return;var a=n.tag;if(a===3||a===4){var s=n.stateNode.containerInfo;if(s===o||s.nodeType===8&&s.parentNode===o)break;if(a===4)for(a=n.return;a!==null;){var l=a.tag;if((l===3||l===4)&&(l=a.stateNode.containerInfo,l===o||l.nodeType===8&&l.parentNode===o))return;a=a.return}for(;s!==null;){if(a=Pd(s),a===null)return;if(l=a.tag,l===5||l===6){n=i=a;continue e}s=s.parentNode}}n=n.return}g7(function(){var c=i,d=TD(r),u=[];e:{var f=W7.get(e);if(f!==void 0){var m=ND,p=e;switch(e){case"keypress":if(h_(r)===0)break e;case"keydown":case"keyup":m=nie;break;case"focusin":p="focus",m=vP;break;case"focusout":p="blur",m=vP;break;case"beforeblur":case"afterblur":m=vP;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":m=sB;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":m=Zne;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":m=sie;break;case j7:case U7:case V7:m=qne;break;case H7:m=cie;break;case"scroll":m=Hne;break;case"wheel":m=uie;break;case"copy":case"cut":case"paste":m=Qne;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":m=cB}var g=(t&4)!==0,b=!g&&e==="scroll",v=g?f!==null?f+"Capture":null:f;g=[];for(var x=c,_;x!==null;){_=x;var I=_.stateNode;if(_.tag===5&&I!==null&&(_=I,v!==null&&(I=Sg(x,v),I!=null&&g.push(Eg(x,I,_)))),b)break;x=x.return}0<g.length&&(f=new m(f,p,null,r,d),u.push({event:f,listeners:g}))}}if((t&7)===0){e:{if(f=e==="mouseover"||e==="pointerover",m=e==="mouseout"||e==="pointerout",f&&r!==HP&&(p=r.relatedTarget||r.fromElement)&&(Pd(p)||p[$s]))break e;if((m||f)&&(f=d.window===d?d:(f=d.ownerDocument)?f.defaultView||f.parentWindow:window,m?(p=r.relatedTarget||r.toElement,m=c,p=p?Pd(p):null,p!==null&&(b=Ld(p),p!==b||p.tag!==5&&p.tag!==6)&&(p=null)):(m=null,p=c),m!==p)){if(g=sB,I="onMouseLeave",v="onMouseEnter",x="mouse",(e==="pointerout"||e==="pointerover")&&(g=cB,I="onPointerLeave",v="onPointerEnter",x="pointer"),b=m==null?f:Lf(m),_=p==null?f:Lf(p),f=new g(I,x+"leave",m,r,d),f.target=b,f.relatedTarget=_,I=null,Pd(d)===c&&(g=new g(v,x+"enter",p,r,d),g.target=_,g.relatedTarget=b,I=g),b=I,m&&p)t:{for(g=m,v=p,x=0,_=g;_;_=$f(_))x++;for(_=0,I=v;I;I=$f(I))_++;for(;0<x-_;)g=$f(g),x--;for(;0<_-x;)v=$f(v),_--;for(;x--;){if(g===v||v!==null&&g===v.alternate)break t;g=$f(g),v=$f(v)}g=null}else g=null;m!==null&&_B(u,f,m,g,!1),p!==null&&b!==null&&_B(u,b,p,g,!0)}}e:{if(f=c?Lf(c):window,m=f.nodeName&&f.nodeName.toLowerCase(),m==="select"||m==="input"&&f.type==="file")var S=xie;else if(fB(f))if(N7)S=Iie;else{S=yie;var w=bie}else(m=f.nodeName)&&m.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(S=_ie);if(S&&(S=S(e,c))){z7(u,S,r,d);break e}w&&w(e,f,c),e==="focusout"&&(w=f._wrapperState)&&w.controlled&&f.type==="number"&&MP(f,"number",f.value)}switch(w=c?Lf(c):window,e){case"focusin":(fB(w)||w.contentEditable==="true")&&(Nf=w,QP=c,vg=null);break;case"focusout":vg=QP=Nf=null;break;case"mousedown":YP=!0;break;case"contextmenu":case"mouseup":case"dragend":YP=!1,gB(u,r,d);break;case"selectionchange":if(kie)break;case"keydown":case"keyup":gB(u,r,d)}var P;if(LD)e:{switch(e){case"compositionstart":var $="onCompositionStart";break e;case"compositionend":$="onCompositionEnd";break e;case"compositionupdate":$="onCompositionUpdate";break e}$=void 0}else zf?A7(e,r)&&($="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&($="onCompositionStart");$&&($7&&r.locale!=="ko"&&(zf||$!=="onCompositionStart"?$==="onCompositionEnd"&&zf&&(P=E7()):(Bl=d,zD="value"in Bl?Bl.value:Bl.textContent,zf=!0)),w=T_(c,$),0<w.length&&($=new lB($,e,null,r,d),u.push({event:$,listeners:w}),P?$.data=P:(P=O7(r),P!==null&&($.data=P)))),(P=mie?pie(e,r):hie(e,r))&&(c=T_(c,"onBeforeInput"),0<c.length&&(d=new lB("onBeforeInput","beforeinput",null,r,d),u.push({event:d,listeners:c}),d.data=P))}Z7(u,t)})}function Eg(e,t,r){return{instance:e,listener:t,currentTarget:r}}function T_(e,t){for(var r=t+"Capture",n=[];e!==null;){var o=e,i=o.stateNode;o.tag===5&&i!==null&&(o=i,i=Sg(e,r),i!=null&&n.unshift(Eg(e,i,o)),i=Sg(e,t),i!=null&&n.push(Eg(e,i,o))),e=e.return}return n}function $f(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function _B(e,t,r,n,o){for(var i=t._reactName,a=[];r!==null&&r!==n;){var s=r,l=s.alternate,c=s.stateNode;if(l!==null&&l===n)break;s.tag===5&&c!==null&&(s=c,o?(l=Sg(r,i),l!=null&&a.unshift(Eg(r,l,s))):o||(l=Sg(r,i),l!=null&&a.push(Eg(r,l,s)))),r=r.return}a.length!==0&&e.push({event:t,listeners:a})}var Pie=/\r\n?/g,Die=/\u0000|\uFFFD/g;function IB(e){return(typeof e=="string"?e:""+e).replace(Pie,`
|
|
6
|
+
`).replace(Die,"")}function s_(e,t,r){if(t=IB(t),IB(e)!==t&&r)throw Error(ie(425))}function E_(){}var JP=null,eD=null;function tD(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var rD=typeof setTimeout=="function"?setTimeout:void 0,Rie=typeof clearTimeout=="function"?clearTimeout:void 0,wB=typeof Promise=="function"?Promise:void 0,Tie=typeof queueMicrotask=="function"?queueMicrotask:typeof wB<"u"?function(e){return wB.resolve(null).then(e).catch(Eie)}:rD;function Eie(e){setTimeout(function(){throw e})}function IP(e,t){var r=t,n=0;do{var o=r.nextSibling;if(e.removeChild(r),o&&o.nodeType===8)if(r=o.data,r==="/$"){if(n===0){e.removeChild(o),Pg(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=o}while(r);Pg(t)}function Wl(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function SB(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var im=Math.random().toString(36).slice(2),Ra="__reactFiber$"+im,$g="__reactProps$"+im,$s="__reactContainer$"+im,oD="__reactEvents$"+im,$ie="__reactListeners$"+im,Aie="__reactHandles$"+im;function Pd(e){var t=e[Ra];if(t)return t;for(var r=e.parentNode;r;){if(t=r[$s]||r[Ra]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=SB(e);e!==null;){if(r=e[Ra])return r;e=SB(e)}return t}e=r,r=e.parentNode}return null}function jg(e){return e=e[Ra]||e[$s],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Lf(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(ie(33))}function Q_(e){return e[$g]||null}var nD=[],Mf=-1;function Jl(e){return{current:e}}function Kt(e){0>Mf||(e.current=nD[Mf],nD[Mf]=null,Mf--)}function Ft(e,t){Mf++,nD[Mf]=e.current,e.current=t}var Ql={},$o=Jl(Ql),bn=Jl(!1),$d=Ql;function Yf(e,t){var r=e.type.contextTypes;if(!r)return Ql;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in r)o[i]=t[i];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function yn(e){return e=e.childContextTypes,e!=null}function $_(){Kt(bn),Kt($o)}function kB(e,t,r){if($o.current!==Ql)throw Error(ie(168));Ft($o,t),Ft(bn,r)}function K7(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var o in n)if(!(o in t))throw Error(ie(108,bne(e)||"Unknown",o));return cr({},r,n)}function A_(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ql,$d=$o.current,Ft($o,e),Ft(bn,bn.current),!0}function CB(e,t,r){var n=e.stateNode;if(!n)throw Error(ie(169));r?(e=K7(e,t,$d),n.__reactInternalMemoizedMergedChildContext=e,Kt(bn),Kt($o),Ft($o,e)):Kt(bn),Ft(bn,r)}var Ps=null,Y_=!1,wP=!1;function q7(e){Ps===null?Ps=[e]:Ps.push(e)}function Oie(e){Y_=!0,q7(e)}function ec(){if(!wP&&Ps!==null){wP=!0;var e=0,t=Ct;try{var r=Ps;for(Ct=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}Ps=null,Y_=!1}catch(o){throw Ps!==null&&(Ps=Ps.slice(e+1)),y7(ED,ec),o}finally{Ct=t,wP=!1}}return null}var Bf=[],jf=0,O_=null,z_=0,si=[],li=0,Ad=null,Ds=1,Rs="";function kd(e,t){Bf[jf++]=z_,Bf[jf++]=O_,O_=e,z_=t}function X7(e,t,r){si[li++]=Ds,si[li++]=Rs,si[li++]=Ad,Ad=e;var n=Ds;e=Rs;var o=32-Qi(n)-1;n&=~(1<<o),r+=1;var i=32-Qi(t)+o;if(30<i){var a=o-o%5;i=(n&(1<<a)-1).toString(32),n>>=a,o-=a,Ds=1<<32-Qi(t)+o|r<<o|n,Rs=i+e}else Ds=1<<i|r<<o|n,Rs=e}function BD(e){e.return!==null&&(kd(e,1),X7(e,1,0))}function jD(e){for(;e===O_;)O_=Bf[--jf],Bf[jf]=null,z_=Bf[--jf],Bf[jf]=null;for(;e===Ad;)Ad=si[--li],si[li]=null,Rs=si[--li],si[li]=null,Ds=si[--li],si[li]=null}var Un=null,jn=null,er=!1,Xi=null;function Q7(e,t){var r=ci(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function PB(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Un=e,jn=Wl(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Un=e,jn=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=Ad!==null?{id:Ds,overflow:Rs}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=ci(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,Un=e,jn=null,!0):!1;default:return!1}}function iD(e){return(e.mode&1)!==0&&(e.flags&128)===0}function aD(e){if(er){var t=jn;if(t){var r=t;if(!PB(e,t)){if(iD(e))throw Error(ie(418));t=Wl(r.nextSibling);var n=Un;t&&PB(e,t)?Q7(n,r):(e.flags=e.flags&-4097|2,er=!1,Un=e)}}else{if(iD(e))throw Error(ie(418));e.flags=e.flags&-4097|2,er=!1,Un=e}}}function DB(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Un=e}function l_(e){if(e!==Un)return!1;if(!er)return DB(e),er=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!tD(e.type,e.memoizedProps)),t&&(t=jn)){if(iD(e))throw Y7(),Error(ie(418));for(;t;)Q7(e,t),t=Wl(t.nextSibling)}if(DB(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(ie(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){jn=Wl(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}jn=null}}else jn=Un?Wl(e.stateNode.nextSibling):null;return!0}function Y7(){for(var e=jn;e;)e=Wl(e.nextSibling)}function Jf(){jn=Un=null,er=!1}function UD(e){Xi===null?Xi=[e]:Xi.push(e)}var zie=zs.ReactCurrentBatchConfig;function ig(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(ie(309));var n=r.stateNode}if(!n)throw Error(ie(147,e));var o=n,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(a){var s=o.refs;a===null?delete s[i]:s[i]=a},t._stringRef=i,t)}if(typeof e!="string")throw Error(ie(284));if(!r._owner)throw Error(ie(290,e))}return e}function c_(e,t){throw e=Object.prototype.toString.call(t),Error(ie(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function RB(e){var t=e._init;return t(e._payload)}function J7(e){function t(v,x){if(e){var _=v.deletions;_===null?(v.deletions=[x],v.flags|=16):_.push(x)}}function r(v,x){if(!e)return null;for(;x!==null;)t(v,x),x=x.sibling;return null}function n(v,x){for(v=new Map;x!==null;)x.key!==null?v.set(x.key,x):v.set(x.index,x),x=x.sibling;return v}function o(v,x){return v=ql(v,x),v.index=0,v.sibling=null,v}function i(v,x,_){return v.index=_,e?(_=v.alternate,_!==null?(_=_.index,_<x?(v.flags|=2,x):_):(v.flags|=2,x)):(v.flags|=1048576,x)}function a(v){return e&&v.alternate===null&&(v.flags|=2),v}function s(v,x,_,I){return x===null||x.tag!==6?(x=TP(_,v.mode,I),x.return=v,x):(x=o(x,_),x.return=v,x)}function l(v,x,_,I){var S=_.type;return S===Of?d(v,x,_.props.children,I,_.key):x!==null&&(x.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===Nl&&RB(S)===x.type)?(I=o(x,_.props),I.ref=ig(v,x,_),I.return=v,I):(I=I_(_.type,_.key,_.props,null,v.mode,I),I.ref=ig(v,x,_),I.return=v,I)}function c(v,x,_,I){return x===null||x.tag!==4||x.stateNode.containerInfo!==_.containerInfo||x.stateNode.implementation!==_.implementation?(x=EP(_,v.mode,I),x.return=v,x):(x=o(x,_.children||[]),x.return=v,x)}function d(v,x,_,I,S){return x===null||x.tag!==7?(x=Ed(_,v.mode,I,S),x.return=v,x):(x=o(x,_),x.return=v,x)}function u(v,x,_){if(typeof x=="string"&&x!==""||typeof x=="number")return x=TP(""+x,v.mode,_),x.return=v,x;if(typeof x=="object"&&x!==null){switch(x.$$typeof){case Ky:return _=I_(x.type,x.key,x.props,null,v.mode,_),_.ref=ig(v,null,x),_.return=v,_;case Af:return x=EP(x,v.mode,_),x.return=v,x;case Nl:var I=x._init;return u(v,I(x._payload),_)}if(dg(x)||tg(x))return x=Ed(x,v.mode,_,null),x.return=v,x;c_(v,x)}return null}function f(v,x,_,I){var S=x!==null?x.key:null;if(typeof _=="string"&&_!==""||typeof _=="number")return S!==null?null:s(v,x,""+_,I);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case Ky:return _.key===S?l(v,x,_,I):null;case Af:return _.key===S?c(v,x,_,I):null;case Nl:return S=_._init,f(v,x,S(_._payload),I)}if(dg(_)||tg(_))return S!==null?null:d(v,x,_,I,null);c_(v,_)}return null}function m(v,x,_,I,S){if(typeof I=="string"&&I!==""||typeof I=="number")return v=v.get(_)||null,s(x,v,""+I,S);if(typeof I=="object"&&I!==null){switch(I.$$typeof){case Ky:return v=v.get(I.key===null?_:I.key)||null,l(x,v,I,S);case Af:return v=v.get(I.key===null?_:I.key)||null,c(x,v,I,S);case Nl:var w=I._init;return m(v,x,_,w(I._payload),S)}if(dg(I)||tg(I))return v=v.get(_)||null,d(x,v,I,S,null);c_(x,I)}return null}function p(v,x,_,I){for(var S=null,w=null,P=x,$=x=0,B=null;P!==null&&$<_.length;$++){P.index>$?(B=P,P=null):B=P.sibling;var W=f(v,P,_[$],I);if(W===null){P===null&&(P=B);break}e&&P&&W.alternate===null&&t(v,P),x=i(W,x,$),w===null?S=W:w.sibling=W,w=W,P=B}if($===_.length)return r(v,P),er&&kd(v,$),S;if(P===null){for(;$<_.length;$++)P=u(v,_[$],I),P!==null&&(x=i(P,x,$),w===null?S=P:w.sibling=P,w=P);return er&&kd(v,$),S}for(P=n(v,P);$<_.length;$++)B=m(P,v,$,_[$],I),B!==null&&(e&&B.alternate!==null&&P.delete(B.key===null?$:B.key),x=i(B,x,$),w===null?S=B:w.sibling=B,w=B);return e&&P.forEach(function(H){return t(v,H)}),er&&kd(v,$),S}function g(v,x,_,I){var S=tg(_);if(typeof S!="function")throw Error(ie(150));if(_=S.call(_),_==null)throw Error(ie(151));for(var w=S=null,P=x,$=x=0,B=null,W=_.next();P!==null&&!W.done;$++,W=_.next()){P.index>$?(B=P,P=null):B=P.sibling;var H=f(v,P,W.value,I);if(H===null){P===null&&(P=B);break}e&&P&&H.alternate===null&&t(v,P),x=i(H,x,$),w===null?S=H:w.sibling=H,w=H,P=B}if(W.done)return r(v,P),er&&kd(v,$),S;if(P===null){for(;!W.done;$++,W=_.next())W=u(v,W.value,I),W!==null&&(x=i(W,x,$),w===null?S=W:w.sibling=W,w=W);return er&&kd(v,$),S}for(P=n(v,P);!W.done;$++,W=_.next())W=m(P,v,$,W.value,I),W!==null&&(e&&W.alternate!==null&&P.delete(W.key===null?$:W.key),x=i(W,x,$),w===null?S=W:w.sibling=W,w=W);return e&&P.forEach(function(K){return t(v,K)}),er&&kd(v,$),S}function b(v,x,_,I){if(typeof _=="object"&&_!==null&&_.type===Of&&_.key===null&&(_=_.props.children),typeof _=="object"&&_!==null){switch(_.$$typeof){case Ky:e:{for(var S=_.key,w=x;w!==null;){if(w.key===S){if(S=_.type,S===Of){if(w.tag===7){r(v,w.sibling),x=o(w,_.props.children),x.return=v,v=x;break e}}else if(w.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===Nl&&RB(S)===w.type){r(v,w.sibling),x=o(w,_.props),x.ref=ig(v,w,_),x.return=v,v=x;break e}r(v,w);break}else t(v,w);w=w.sibling}_.type===Of?(x=Ed(_.props.children,v.mode,I,_.key),x.return=v,v=x):(I=I_(_.type,_.key,_.props,null,v.mode,I),I.ref=ig(v,x,_),I.return=v,v=I)}return a(v);case Af:e:{for(w=_.key;x!==null;){if(x.key===w)if(x.tag===4&&x.stateNode.containerInfo===_.containerInfo&&x.stateNode.implementation===_.implementation){r(v,x.sibling),x=o(x,_.children||[]),x.return=v,v=x;break e}else{r(v,x);break}else t(v,x);x=x.sibling}x=EP(_,v.mode,I),x.return=v,v=x}return a(v);case Nl:return w=_._init,b(v,x,w(_._payload),I)}if(dg(_))return p(v,x,_,I);if(tg(_))return g(v,x,_,I);c_(v,_)}return typeof _=="string"&&_!==""||typeof _=="number"?(_=""+_,x!==null&&x.tag===6?(r(v,x.sibling),x=o(x,_),x.return=v,v=x):(r(v,x),x=TP(_,v.mode,I),x.return=v,v=x),a(v)):r(v,x)}return b}var em=J7(!0),e8=J7(!1),N_=Jl(null),F_=null,Uf=null,VD=null;function HD(){VD=Uf=F_=null}function WD(e){var t=N_.current;Kt(N_),e._currentValue=t}function sD(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function qf(e,t){F_=e,VD=Uf=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(xn=!0),e.firstContext=null)}function ui(e){var t=e._currentValue;if(VD!==e)if(e={context:e,memoizedValue:t,next:null},Uf===null){if(F_===null)throw Error(ie(308));Uf=e,F_.dependencies={lanes:0,firstContext:e}}else Uf=Uf.next=e;return t}var Dd=null;function ZD(e){Dd===null?Dd=[e]:Dd.push(e)}function t8(e,t,r,n){var o=t.interleaved;return o===null?(r.next=r,ZD(t)):(r.next=o.next,o.next=r),t.interleaved=r,As(e,n)}function As(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var Fl=!1;function GD(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function r8(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Ts(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Zl(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,(ht&2)!==0){var o=n.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),n.pending=t,As(e,r)}return o=n.interleaved,o===null?(t.next=t,ZD(n)):(t.next=o.next,o.next=t),n.interleaved=t,As(e,r)}function g_(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,$D(e,r)}}function TB(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var o=null,i=null;if(r=r.firstBaseUpdate,r!==null){do{var a={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};i===null?o=i=a:i=i.next=a,r=r.next}while(r!==null);i===null?o=i=t:i=i.next=t}else o=i=t;r={baseState:n.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function L_(e,t,r,n){var o=e.updateQueue;Fl=!1;var i=o.firstBaseUpdate,a=o.lastBaseUpdate,s=o.shared.pending;if(s!==null){o.shared.pending=null;var l=s,c=l.next;l.next=null,a===null?i=c:a.next=c,a=l;var d=e.alternate;d!==null&&(d=d.updateQueue,s=d.lastBaseUpdate,s!==a&&(s===null?d.firstBaseUpdate=c:s.next=c,d.lastBaseUpdate=l))}if(i!==null){var u=o.baseState;a=0,d=c=l=null,s=i;do{var f=s.lane,m=s.eventTime;if((n&f)===f){d!==null&&(d=d.next={eventTime:m,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var p=e,g=s;switch(f=t,m=r,g.tag){case 1:if(p=g.payload,typeof p=="function"){u=p.call(m,u,f);break e}u=p;break e;case 3:p.flags=p.flags&-65537|128;case 0:if(p=g.payload,f=typeof p=="function"?p.call(m,u,f):p,f==null)break e;u=cr({},u,f);break e;case 2:Fl=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,f=o.effects,f===null?o.effects=[s]:f.push(s))}else m={eventTime:m,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},d===null?(c=d=m,l=u):d=d.next=m,a|=f;if(s=s.next,s===null){if(s=o.shared.pending,s===null)break;f=s,s=f.next,f.next=null,o.lastBaseUpdate=f,o.shared.pending=null}}while(!0);if(d===null&&(l=u),o.baseState=l,o.firstBaseUpdate=c,o.lastBaseUpdate=d,t=o.shared.interleaved,t!==null){o=t;do a|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);zd|=a,e.lanes=a,e.memoizedState=u}}function EB(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var n=e[t],o=n.callback;if(o!==null){if(n.callback=null,n=r,typeof o!="function")throw Error(ie(191,o));o.call(n)}}}var Ug={},Ea=Jl(Ug),Ag=Jl(Ug),Og=Jl(Ug);function Rd(e){if(e===Ug)throw Error(ie(174));return e}function KD(e,t){switch(Ft(Og,t),Ft(Ag,e),Ft(Ea,Ug),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:jP(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=jP(t,e)}Kt(Ea),Ft(Ea,t)}function tm(){Kt(Ea),Kt(Ag),Kt(Og)}function o8(e){Rd(Og.current);var t=Rd(Ea.current),r=jP(t,e.type);t!==r&&(Ft(Ag,e),Ft(Ea,r))}function qD(e){Ag.current===e&&(Kt(Ea),Kt(Ag))}var sr=Jl(0);function M_(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var SP=[];function XD(){for(var e=0;e<SP.length;e++)SP[e]._workInProgressVersionPrimary=null;SP.length=0}var v_=zs.ReactCurrentDispatcher,kP=zs.ReactCurrentBatchConfig,Od=0,lr=null,Ar=null,Kr=null,B_=!1,xg=!1,zg=0,Nie=0;function Ro(){throw Error(ie(321))}function QD(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!Ji(e[r],t[r]))return!1;return!0}function YD(e,t,r,n,o,i){if(Od=i,lr=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,v_.current=e===null||e.memoizedState===null?Bie:jie,e=r(n,o),xg){i=0;do{if(xg=!1,zg=0,25<=i)throw Error(ie(301));i+=1,Kr=Ar=null,t.updateQueue=null,v_.current=Uie,e=r(n,o)}while(xg)}if(v_.current=j_,t=Ar!==null&&Ar.next!==null,Od=0,Kr=Ar=lr=null,B_=!1,t)throw Error(ie(300));return e}function JD(){var e=zg!==0;return zg=0,e}function Da(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Kr===null?lr.memoizedState=Kr=e:Kr=Kr.next=e,Kr}function fi(){if(Ar===null){var e=lr.alternate;e=e!==null?e.memoizedState:null}else e=Ar.next;var t=Kr===null?lr.memoizedState:Kr.next;if(t!==null)Kr=t,Ar=e;else{if(e===null)throw Error(ie(310));Ar=e,e={memoizedState:Ar.memoizedState,baseState:Ar.baseState,baseQueue:Ar.baseQueue,queue:Ar.queue,next:null},Kr===null?lr.memoizedState=Kr=e:Kr=Kr.next=e}return Kr}function Ng(e,t){return typeof t=="function"?t(e):t}function CP(e){var t=fi(),r=t.queue;if(r===null)throw Error(ie(311));r.lastRenderedReducer=e;var n=Ar,o=n.baseQueue,i=r.pending;if(i!==null){if(o!==null){var a=o.next;o.next=i.next,i.next=a}n.baseQueue=o=i,r.pending=null}if(o!==null){i=o.next,n=n.baseState;var s=a=null,l=null,c=i;do{var d=c.lane;if((Od&d)===d)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),n=c.hasEagerState?c.eagerState:e(n,c.action);else{var u={lane:d,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(s=l=u,a=n):l=l.next=u,lr.lanes|=d,zd|=d}c=c.next}while(c!==null&&c!==i);l===null?a=n:l.next=s,Ji(n,t.memoizedState)||(xn=!0),t.memoizedState=n,t.baseState=a,t.baseQueue=l,r.lastRenderedState=n}if(e=r.interleaved,e!==null){o=e;do i=o.lane,lr.lanes|=i,zd|=i,o=o.next;while(o!==e)}else o===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function PP(e){var t=fi(),r=t.queue;if(r===null)throw Error(ie(311));r.lastRenderedReducer=e;var n=r.dispatch,o=r.pending,i=t.memoizedState;if(o!==null){r.pending=null;var a=o=o.next;do i=e(i,a.action),a=a.next;while(a!==o);Ji(i,t.memoizedState)||(xn=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),r.lastRenderedState=i}return[i,n]}function n8(){}function i8(e,t){var r=lr,n=fi(),o=t(),i=!Ji(n.memoizedState,o);if(i&&(n.memoizedState=o,xn=!0),n=n.queue,e4(l8.bind(null,r,n,e),[e]),n.getSnapshot!==t||i||Kr!==null&&Kr.memoizedState.tag&1){if(r.flags|=2048,Fg(9,s8.bind(null,r,n,o,t),void 0,null),qr===null)throw Error(ie(349));(Od&30)!==0||a8(r,t,o)}return o}function a8(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=lr.updateQueue,t===null?(t={lastEffect:null,stores:null},lr.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function s8(e,t,r,n){t.value=r,t.getSnapshot=n,c8(t)&&d8(e)}function l8(e,t,r){return r(function(){c8(t)&&d8(e)})}function c8(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Ji(e,r)}catch{return!0}}function d8(e){var t=As(e,1);t!==null&&Yi(t,e,1,-1)}function $B(e){var t=Da();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ng,lastRenderedState:e},t.queue=e,e=e.dispatch=Mie.bind(null,lr,e),[t.memoizedState,e]}function Fg(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},t=lr.updateQueue,t===null?(t={lastEffect:null,stores:null},lr.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(n=r.next,r.next=e,e.next=n,t.lastEffect=e)),e}function u8(){return fi().memoizedState}function x_(e,t,r,n){var o=Da();lr.flags|=e,o.memoizedState=Fg(1|t,r,void 0,n===void 0?null:n)}function J_(e,t,r,n){var o=fi();n=n===void 0?null:n;var i=void 0;if(Ar!==null){var a=Ar.memoizedState;if(i=a.destroy,n!==null&&QD(n,a.deps)){o.memoizedState=Fg(t,r,i,n);return}}lr.flags|=e,o.memoizedState=Fg(1|t,r,i,n)}function AB(e,t){return x_(8390656,8,e,t)}function e4(e,t){return J_(2048,8,e,t)}function f8(e,t){return J_(4,2,e,t)}function m8(e,t){return J_(4,4,e,t)}function p8(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function h8(e,t,r){return r=r!=null?r.concat([e]):null,J_(4,4,p8.bind(null,t,e),r)}function t4(){}function g8(e,t){var r=fi();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&QD(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function v8(e,t){var r=fi();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&QD(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function x8(e,t,r){return(Od&21)===0?(e.baseState&&(e.baseState=!1,xn=!0),e.memoizedState=r):(Ji(r,t)||(r=w7(),lr.lanes|=r,zd|=r,e.baseState=!0),t)}function Fie(e,t){var r=Ct;Ct=r!==0&&4>r?r:4,e(!0);var n=kP.transition;kP.transition={};try{e(!1),t()}finally{Ct=r,kP.transition=n}}function b8(){return fi().memoizedState}function Lie(e,t,r){var n=Kl(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},y8(e))_8(t,r);else if(r=t8(e,t,r,n),r!==null){var o=Ho();Yi(r,e,n,o),I8(r,t,n)}}function Mie(e,t,r){var n=Kl(e),o={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(y8(e))_8(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var a=t.lastRenderedState,s=i(a,r);if(o.hasEagerState=!0,o.eagerState=s,Ji(s,a)){var l=t.interleaved;l===null?(o.next=o,ZD(t)):(o.next=l.next,l.next=o),t.interleaved=o;return}}catch{}r=t8(e,t,o,n),r!==null&&(o=Ho(),Yi(r,e,n,o),I8(r,t,n))}}function y8(e){var t=e.alternate;return e===lr||t!==null&&t===lr}function _8(e,t){xg=B_=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function I8(e,t,r){if((r&4194240)!==0){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,$D(e,r)}}var j_={readContext:ui,useCallback:Ro,useContext:Ro,useEffect:Ro,useImperativeHandle:Ro,useInsertionEffect:Ro,useLayoutEffect:Ro,useMemo:Ro,useReducer:Ro,useRef:Ro,useState:Ro,useDebugValue:Ro,useDeferredValue:Ro,useTransition:Ro,useMutableSource:Ro,useSyncExternalStore:Ro,useId:Ro,unstable_isNewReconciler:!1},Bie={readContext:ui,useCallback:function(e,t){return Da().memoizedState=[e,t===void 0?null:t],e},useContext:ui,useEffect:AB,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,x_(4194308,4,p8.bind(null,t,e),r)},useLayoutEffect:function(e,t){return x_(4194308,4,e,t)},useInsertionEffect:function(e,t){return x_(4,2,e,t)},useMemo:function(e,t){var r=Da();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=Da();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=Lie.bind(null,lr,e),[n.memoizedState,e]},useRef:function(e){var t=Da();return e={current:e},t.memoizedState=e},useState:$B,useDebugValue:t4,useDeferredValue:function(e){return Da().memoizedState=e},useTransition:function(){var e=$B(!1),t=e[0];return e=Fie.bind(null,e[1]),Da().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=lr,o=Da();if(er){if(r===void 0)throw Error(ie(407));r=r()}else{if(r=t(),qr===null)throw Error(ie(349));(Od&30)!==0||a8(n,t,r)}o.memoizedState=r;var i={value:r,getSnapshot:t};return o.queue=i,AB(l8.bind(null,n,i,e),[e]),n.flags|=2048,Fg(9,s8.bind(null,n,i,r,t),void 0,null),r},useId:function(){var e=Da(),t=qr.identifierPrefix;if(er){var r=Rs,n=Ds;r=(n&~(1<<32-Qi(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=zg++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=Nie++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},jie={readContext:ui,useCallback:g8,useContext:ui,useEffect:e4,useImperativeHandle:h8,useInsertionEffect:f8,useLayoutEffect:m8,useMemo:v8,useReducer:CP,useRef:u8,useState:function(){return CP(Ng)},useDebugValue:t4,useDeferredValue:function(e){var t=fi();return x8(t,Ar.memoizedState,e)},useTransition:function(){var e=CP(Ng)[0],t=fi().memoizedState;return[e,t]},useMutableSource:n8,useSyncExternalStore:i8,useId:b8,unstable_isNewReconciler:!1},Uie={readContext:ui,useCallback:g8,useContext:ui,useEffect:e4,useImperativeHandle:h8,useInsertionEffect:f8,useLayoutEffect:m8,useMemo:v8,useReducer:PP,useRef:u8,useState:function(){return PP(Ng)},useDebugValue:t4,useDeferredValue:function(e){var t=fi();return Ar===null?t.memoizedState=e:x8(t,Ar.memoizedState,e)},useTransition:function(){var e=PP(Ng)[0],t=fi().memoizedState;return[e,t]},useMutableSource:n8,useSyncExternalStore:i8,useId:b8,unstable_isNewReconciler:!1};function Ki(e,t){if(e&&e.defaultProps){t=cr({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function lD(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:cr({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var eI={isMounted:function(e){return(e=e._reactInternals)?Ld(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=Ho(),o=Kl(e),i=Ts(n,o);i.payload=t,r!=null&&(i.callback=r),t=Zl(e,i,o),t!==null&&(Yi(t,e,o,n),g_(t,e,o))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=Ho(),o=Kl(e),i=Ts(n,o);i.tag=1,i.payload=t,r!=null&&(i.callback=r),t=Zl(e,i,o),t!==null&&(Yi(t,e,o,n),g_(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=Ho(),n=Kl(e),o=Ts(r,n);o.tag=2,t!=null&&(o.callback=t),t=Zl(e,o,n),t!==null&&(Yi(t,e,n,r),g_(t,e,n))}};function OB(e,t,r,n,o,i,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,i,a):t.prototype&&t.prototype.isPureReactComponent?!Rg(r,n)||!Rg(o,i):!0}function w8(e,t,r){var n=!1,o=Ql,i=t.contextType;return typeof i=="object"&&i!==null?i=ui(i):(o=yn(t)?$d:$o.current,n=t.contextTypes,i=(n=n!=null)?Yf(e,o):Ql),t=new t(r,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=eI,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function zB(e,t,r,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,n),t.state!==e&&eI.enqueueReplaceState(t,t.state,null)}function cD(e,t,r,n){var o=e.stateNode;o.props=r,o.state=e.memoizedState,o.refs={},GD(e);var i=t.contextType;typeof i=="object"&&i!==null?o.context=ui(i):(i=yn(t)?$d:$o.current,o.context=Yf(e,i)),o.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(lD(e,t,i,r),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&eI.enqueueReplaceState(o,o.state,null),L_(e,r,o,n),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function rm(e,t){try{var r="",n=t;do r+=xne(n),n=n.return;while(n);var o=r}catch(i){o=`
|
|
7
|
+
Error generating stack: `+i.message+`
|
|
8
|
+
`+i.stack}return{value:e,source:t,stack:o,digest:null}}function DP(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function dD(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var Vie=typeof WeakMap=="function"?WeakMap:Map;function S8(e,t,r){r=Ts(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){V_||(V_=!0,yD=n),dD(e,t)},r}function k8(e,t,r){r=Ts(-1,r),r.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var o=t.value;r.payload=function(){return n(o)},r.callback=function(){dD(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(r.callback=function(){dD(e,t),typeof n!="function"&&(Gl===null?Gl=new Set([this]):Gl.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),r}function NB(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new Vie;var o=new Set;n.set(t,o)}else o=n.get(t),o===void 0&&(o=new Set,n.set(t,o));o.has(r)||(o.add(r),e=oae.bind(null,e,t,r),t.then(e,e))}function FB(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function LB(e,t,r,n,o){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=Ts(-1,1),t.tag=2,Zl(r,t,1))),r.lanes|=1),e):(e.flags|=65536,e.lanes=o,e)}var Hie=zs.ReactCurrentOwner,xn=!1;function Vo(e,t,r,n){t.child=e===null?e8(t,null,r,n):em(t,e.child,r,n)}function MB(e,t,r,n,o){r=r.render;var i=t.ref;return qf(t,o),n=YD(e,t,r,n,i,o),r=JD(),e!==null&&!xn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Os(e,t,o)):(er&&r&&BD(t),t.flags|=1,Vo(e,t,n,o),t.child)}function BB(e,t,r,n,o){if(e===null){var i=r.type;return typeof i=="function"&&!c4(i)&&i.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=i,C8(e,t,i,n,o)):(e=I_(r.type,null,n,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,(e.lanes&o)===0){var a=i.memoizedProps;if(r=r.compare,r=r!==null?r:Rg,r(a,n)&&e.ref===t.ref)return Os(e,t,o)}return t.flags|=1,e=ql(i,n),e.ref=t.ref,e.return=t,t.child=e}function C8(e,t,r,n,o){if(e!==null){var i=e.memoizedProps;if(Rg(i,n)&&e.ref===t.ref)if(xn=!1,t.pendingProps=n=i,(e.lanes&o)!==0)(e.flags&131072)!==0&&(xn=!0);else return t.lanes=e.lanes,Os(e,t,o)}return uD(e,t,r,n,o)}function P8(e,t,r){var n=t.pendingProps,o=n.children,i=e!==null?e.memoizedState:null;if(n.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ft(Hf,Bn),Bn|=r;else{if((r&1073741824)===0)return e=i!==null?i.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ft(Hf,Bn),Bn|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=i!==null?i.baseLanes:r,Ft(Hf,Bn),Bn|=n}else i!==null?(n=i.baseLanes|r,t.memoizedState=null):n=r,Ft(Hf,Bn),Bn|=n;return Vo(e,t,o,r),t.child}function D8(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function uD(e,t,r,n,o){var i=yn(r)?$d:$o.current;return i=Yf(t,i),qf(t,o),r=YD(e,t,r,n,i,o),n=JD(),e!==null&&!xn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Os(e,t,o)):(er&&n&&BD(t),t.flags|=1,Vo(e,t,r,o),t.child)}function jB(e,t,r,n,o){if(yn(r)){var i=!0;A_(t)}else i=!1;if(qf(t,o),t.stateNode===null)b_(e,t),w8(t,r,n),cD(t,r,n,o),n=!0;else if(e===null){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,c=r.contextType;typeof c=="object"&&c!==null?c=ui(c):(c=yn(r)?$d:$o.current,c=Yf(t,c));var d=r.getDerivedStateFromProps,u=typeof d=="function"||typeof a.getSnapshotBeforeUpdate=="function";u||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==n||l!==c)&&zB(t,a,n,c),Fl=!1;var f=t.memoizedState;a.state=f,L_(t,n,a,o),l=t.memoizedState,s!==n||f!==l||bn.current||Fl?(typeof d=="function"&&(lD(t,r,d,n),l=t.memoizedState),(s=Fl||OB(t,r,s,n,f,l,c))?(u||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=l),a.props=n,a.state=l,a.context=c,n=s):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{a=t.stateNode,r8(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:Ki(t.type,s),a.props=c,u=t.pendingProps,f=a.context,l=r.contextType,typeof l=="object"&&l!==null?l=ui(l):(l=yn(r)?$d:$o.current,l=Yf(t,l));var m=r.getDerivedStateFromProps;(d=typeof m=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==u||f!==l)&&zB(t,a,n,l),Fl=!1,f=t.memoizedState,a.state=f,L_(t,n,a,o);var p=t.memoizedState;s!==u||f!==p||bn.current||Fl?(typeof m=="function"&&(lD(t,r,m,n),p=t.memoizedState),(c=Fl||OB(t,r,c,n,f,p,l)||!1)?(d||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(n,p,l),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(n,p,l)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=p),a.props=n,a.state=p,a.context=l,n=c):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),n=!1)}return fD(e,t,r,n,i,o)}function fD(e,t,r,n,o,i){D8(e,t);var a=(t.flags&128)!==0;if(!n&&!a)return o&&CB(t,r,!1),Os(e,t,i);n=t.stateNode,Hie.current=t;var s=a&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&a?(t.child=em(t,e.child,null,i),t.child=em(t,null,s,i)):Vo(e,t,s,i),t.memoizedState=n.state,o&&CB(t,r,!0),t.child}function R8(e){var t=e.stateNode;t.pendingContext?kB(e,t.pendingContext,t.pendingContext!==t.context):t.context&&kB(e,t.context,!1),KD(e,t.containerInfo)}function UB(e,t,r,n,o){return Jf(),UD(o),t.flags|=256,Vo(e,t,r,n),t.child}var mD={dehydrated:null,treeContext:null,retryLane:0};function pD(e){return{baseLanes:e,cachePool:null,transitions:null}}function T8(e,t,r){var n=t.pendingProps,o=sr.current,i=!1,a=(t.flags&128)!==0,s;if((s=a)||(s=e!==null&&e.memoizedState===null?!1:(o&2)!==0),s?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),Ft(sr,o&1),e===null)return aD(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(a=n.children,e=n.fallback,i?(n=t.mode,i=t.child,a={mode:"hidden",children:a},(n&1)===0&&i!==null?(i.childLanes=0,i.pendingProps=a):i=oI(a,n,0,null),e=Ed(e,n,r,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=pD(r),t.memoizedState=mD,e):r4(t,a));if(o=e.memoizedState,o!==null&&(s=o.dehydrated,s!==null))return Wie(e,t,a,n,s,o,r);if(i){i=n.fallback,a=t.mode,o=e.child,s=o.sibling;var l={mode:"hidden",children:n.children};return(a&1)===0&&t.child!==o?(n=t.child,n.childLanes=0,n.pendingProps=l,t.deletions=null):(n=ql(o,l),n.subtreeFlags=o.subtreeFlags&14680064),s!==null?i=ql(s,i):(i=Ed(i,a,r,null),i.flags|=2),i.return=t,n.return=t,n.sibling=i,t.child=n,n=i,i=t.child,a=e.child.memoizedState,a=a===null?pD(r):{baseLanes:a.baseLanes|r,cachePool:null,transitions:a.transitions},i.memoizedState=a,i.childLanes=e.childLanes&~r,t.memoizedState=mD,n}return i=e.child,e=i.sibling,n=ql(i,{mode:"visible",children:n.children}),(t.mode&1)===0&&(n.lanes=r),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n}function r4(e,t){return t=oI({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function d_(e,t,r,n){return n!==null&&UD(n),em(t,e.child,null,r),e=r4(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Wie(e,t,r,n,o,i,a){if(r)return t.flags&256?(t.flags&=-257,n=DP(Error(ie(422))),d_(e,t,a,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=n.fallback,o=t.mode,n=oI({mode:"visible",children:n.children},o,0,null),i=Ed(i,o,a,null),i.flags|=2,n.return=t,i.return=t,n.sibling=i,t.child=n,(t.mode&1)!==0&&em(t,e.child,null,a),t.child.memoizedState=pD(a),t.memoizedState=mD,i);if((t.mode&1)===0)return d_(e,t,a,null);if(o.data==="$!"){if(n=o.nextSibling&&o.nextSibling.dataset,n)var s=n.dgst;return n=s,i=Error(ie(419)),n=DP(i,n,void 0),d_(e,t,a,n)}if(s=(a&e.childLanes)!==0,xn||s){if(n=qr,n!==null){switch(a&-a){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}o=(o&(n.suspendedLanes|a))!==0?0:o,o!==0&&o!==i.retryLane&&(i.retryLane=o,As(e,o),Yi(n,e,o,-1))}return l4(),n=DP(Error(ie(421))),d_(e,t,a,n)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=nae.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,jn=Wl(o.nextSibling),Un=t,er=!0,Xi=null,e!==null&&(si[li++]=Ds,si[li++]=Rs,si[li++]=Ad,Ds=e.id,Rs=e.overflow,Ad=t),t=r4(t,n.children),t.flags|=4096,t)}function VB(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),sD(e.return,t,r)}function RP(e,t,r,n,o){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=n,i.tail=r,i.tailMode=o)}function E8(e,t,r){var n=t.pendingProps,o=n.revealOrder,i=n.tail;if(Vo(e,t,n.children,r),n=sr.current,(n&2)!==0)n=n&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&VB(e,r,t);else if(e.tag===19)VB(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}n&=1}if(Ft(sr,n),(t.mode&1)===0)t.memoizedState=null;else switch(o){case"forwards":for(r=t.child,o=null;r!==null;)e=r.alternate,e!==null&&M_(e)===null&&(o=r),r=r.sibling;r=o,r===null?(o=t.child,t.child=null):(o=r.sibling,r.sibling=null),RP(t,!1,o,r,i);break;case"backwards":for(r=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&M_(e)===null){t.child=o;break}e=o.sibling,o.sibling=r,r=o,o=e}RP(t,!0,r,null,i);break;case"together":RP(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function b_(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Os(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),zd|=t.lanes,(r&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(ie(153));if(t.child!==null){for(e=t.child,r=ql(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=ql(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function Zie(e,t,r){switch(t.tag){case 3:R8(t),Jf();break;case 5:o8(t);break;case 1:yn(t.type)&&A_(t);break;case 4:KD(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,o=t.memoizedProps.value;Ft(N_,n._currentValue),n._currentValue=o;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(Ft(sr,sr.current&1),t.flags|=128,null):(r&t.child.childLanes)!==0?T8(e,t,r):(Ft(sr,sr.current&1),e=Os(e,t,r),e!==null?e.sibling:null);Ft(sr,sr.current&1);break;case 19:if(n=(r&t.childLanes)!==0,(e.flags&128)!==0){if(n)return E8(e,t,r);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),Ft(sr,sr.current),n)break;return null;case 22:case 23:return t.lanes=0,P8(e,t,r)}return Os(e,t,r)}var $8,hD,A8,O8;$8=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};hD=function(){};A8=function(e,t,r,n){var o=e.memoizedProps;if(o!==n){e=t.stateNode,Rd(Ea.current);var i=null;switch(r){case"input":o=FP(e,o),n=FP(e,n),i=[];break;case"select":o=cr({},o,{value:void 0}),n=cr({},n,{value:void 0}),i=[];break;case"textarea":o=BP(e,o),n=BP(e,n),i=[];break;default:typeof o.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=E_)}UP(r,n);var a;r=null;for(c in o)if(!n.hasOwnProperty(c)&&o.hasOwnProperty(c)&&o[c]!=null)if(c==="style"){var s=o[c];for(a in s)s.hasOwnProperty(a)&&(r||(r={}),r[a]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Ig.hasOwnProperty(c)?i||(i=[]):(i=i||[]).push(c,null));for(c in n){var l=n[c];if(s=o?.[c],n.hasOwnProperty(c)&&l!==s&&(l!=null||s!=null))if(c==="style")if(s){for(a in s)!s.hasOwnProperty(a)||l&&l.hasOwnProperty(a)||(r||(r={}),r[a]="");for(a in l)l.hasOwnProperty(a)&&s[a]!==l[a]&&(r||(r={}),r[a]=l[a])}else r||(i||(i=[]),i.push(c,r)),r=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,s=s?s.__html:void 0,l!=null&&s!==l&&(i=i||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Ig.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&Gt("scroll",e),i||s===l||(i=[])):(i=i||[]).push(c,l))}r&&(i=i||[]).push("style",r);var c=i;(t.updateQueue=c)&&(t.flags|=4)}};O8=function(e,t,r,n){r!==n&&(t.flags|=4)};function ag(e,t){if(!er)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function To(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,n=0;if(t)for(var o=e.child;o!==null;)r|=o.lanes|o.childLanes,n|=o.subtreeFlags&14680064,n|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)r|=o.lanes|o.childLanes,n|=o.subtreeFlags,n|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function Gie(e,t,r){var n=t.pendingProps;switch(jD(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return To(t),null;case 1:return yn(t.type)&&$_(),To(t),null;case 3:return n=t.stateNode,tm(),Kt(bn),Kt($o),XD(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(l_(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Xi!==null&&(wD(Xi),Xi=null))),hD(e,t),To(t),null;case 5:qD(t);var o=Rd(Og.current);if(r=t.type,e!==null&&t.stateNode!=null)A8(e,t,r,n,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(ie(166));return To(t),null}if(e=Rd(Ea.current),l_(t)){n=t.stateNode,r=t.type;var i=t.memoizedProps;switch(n[Ra]=t,n[$g]=i,e=(t.mode&1)!==0,r){case"dialog":Gt("cancel",n),Gt("close",n);break;case"iframe":case"object":case"embed":Gt("load",n);break;case"video":case"audio":for(o=0;o<fg.length;o++)Gt(fg[o],n);break;case"source":Gt("error",n);break;case"img":case"image":case"link":Gt("error",n),Gt("load",n);break;case"details":Gt("toggle",n);break;case"input":QM(n,i),Gt("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!i.multiple},Gt("invalid",n);break;case"textarea":JM(n,i),Gt("invalid",n)}UP(r,i),o=null;for(var a in i)if(i.hasOwnProperty(a)){var s=i[a];a==="children"?typeof s=="string"?n.textContent!==s&&(i.suppressHydrationWarning!==!0&&s_(n.textContent,s,e),o=["children",s]):typeof s=="number"&&n.textContent!==""+s&&(i.suppressHydrationWarning!==!0&&s_(n.textContent,s,e),o=["children",""+s]):Ig.hasOwnProperty(a)&&s!=null&&a==="onScroll"&&Gt("scroll",n)}switch(r){case"input":qy(n),YM(n,i,!0);break;case"textarea":qy(n),eB(n);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(n.onclick=E_)}n=o,t.updateQueue=n,n!==null&&(t.flags|=4)}else{a=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=l7(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=a.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=a.createElement(r,{is:n.is}):(e=a.createElement(r),r==="select"&&(a=e,n.multiple?a.multiple=!0:n.size&&(a.size=n.size))):e=a.createElementNS(e,r),e[Ra]=t,e[$g]=n,$8(e,t,!1,!1),t.stateNode=e;e:{switch(a=VP(r,n),r){case"dialog":Gt("cancel",e),Gt("close",e),o=n;break;case"iframe":case"object":case"embed":Gt("load",e),o=n;break;case"video":case"audio":for(o=0;o<fg.length;o++)Gt(fg[o],e);o=n;break;case"source":Gt("error",e),o=n;break;case"img":case"image":case"link":Gt("error",e),Gt("load",e),o=n;break;case"details":Gt("toggle",e),o=n;break;case"input":QM(e,n),o=FP(e,n),Gt("invalid",e);break;case"option":o=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},o=cr({},n,{value:void 0}),Gt("invalid",e);break;case"textarea":JM(e,n),o=BP(e,n),Gt("invalid",e);break;default:o=n}UP(r,o),s=o;for(i in s)if(s.hasOwnProperty(i)){var l=s[i];i==="style"?u7(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&c7(e,l)):i==="children"?typeof l=="string"?(r!=="textarea"||l!=="")&&wg(e,l):typeof l=="number"&&wg(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Ig.hasOwnProperty(i)?l!=null&&i==="onScroll"&&Gt("scroll",e):l!=null&&CD(e,i,l,a))}switch(r){case"input":qy(e),YM(e,n,!1);break;case"textarea":qy(e),eB(e);break;case"option":n.value!=null&&e.setAttribute("value",""+Xl(n.value));break;case"select":e.multiple=!!n.multiple,i=n.value,i!=null?Wf(e,!!n.multiple,i,!1):n.defaultValue!=null&&Wf(e,!!n.multiple,n.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=E_)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return To(t),null;case 6:if(e&&t.stateNode!=null)O8(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(ie(166));if(r=Rd(Og.current),Rd(Ea.current),l_(t)){if(n=t.stateNode,r=t.memoizedProps,n[Ra]=t,(i=n.nodeValue!==r)&&(e=Un,e!==null))switch(e.tag){case 3:s_(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&s_(n.nodeValue,r,(e.mode&1)!==0)}i&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[Ra]=t,t.stateNode=n}return To(t),null;case 13:if(Kt(sr),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(er&&jn!==null&&(t.mode&1)!==0&&(t.flags&128)===0)Y7(),Jf(),t.flags|=98560,i=!1;else if(i=l_(t),n!==null&&n.dehydrated!==null){if(e===null){if(!i)throw Error(ie(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(ie(317));i[Ra]=t}else Jf(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;To(t),i=!1}else Xi!==null&&(wD(Xi),Xi=null),i=!0;if(!i)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=r,t):(n=n!==null,n!==(e!==null&&e.memoizedState!==null)&&n&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(sr.current&1)!==0?Or===0&&(Or=3):l4())),t.updateQueue!==null&&(t.flags|=4),To(t),null);case 4:return tm(),hD(e,t),e===null&&Tg(t.stateNode.containerInfo),To(t),null;case 10:return WD(t.type._context),To(t),null;case 17:return yn(t.type)&&$_(),To(t),null;case 19:if(Kt(sr),i=t.memoizedState,i===null)return To(t),null;if(n=(t.flags&128)!==0,a=i.rendering,a===null)if(n)ag(i,!1);else{if(Or!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(a=M_(e),a!==null){for(t.flags|=128,ag(i,!1),n=a.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),t.subtreeFlags=0,n=r,r=t.child;r!==null;)i=r,e=n,i.flags&=14680066,a=i.alternate,a===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=a.childLanes,i.lanes=a.lanes,i.child=a.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=a.memoizedProps,i.memoizedState=a.memoizedState,i.updateQueue=a.updateQueue,i.type=a.type,e=a.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return Ft(sr,sr.current&1|2),t.child}e=e.sibling}i.tail!==null&&wr()>om&&(t.flags|=128,n=!0,ag(i,!1),t.lanes=4194304)}else{if(!n)if(e=M_(a),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),ag(i,!0),i.tail===null&&i.tailMode==="hidden"&&!a.alternate&&!er)return To(t),null}else 2*wr()-i.renderingStartTime>om&&r!==1073741824&&(t.flags|=128,n=!0,ag(i,!1),t.lanes=4194304);i.isBackwards?(a.sibling=t.child,t.child=a):(r=i.last,r!==null?r.sibling=a:t.child=a,i.last=a)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=wr(),t.sibling=null,r=sr.current,Ft(sr,n?r&1|2:r&1),t):(To(t),null);case 22:case 23:return s4(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&(t.mode&1)!==0?(Bn&1073741824)!==0&&(To(t),t.subtreeFlags&6&&(t.flags|=8192)):To(t),null;case 24:return null;case 25:return null}throw Error(ie(156,t.tag))}function Kie(e,t){switch(jD(t),t.tag){case 1:return yn(t.type)&&$_(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return tm(),Kt(bn),Kt($o),XD(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return qD(t),null;case 13:if(Kt(sr),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ie(340));Jf()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Kt(sr),null;case 4:return tm(),null;case 10:return WD(t.type._context),null;case 22:case 23:return s4(),null;case 24:return null;default:return null}}var u_=!1,Eo=!1,qie=typeof WeakSet=="function"?WeakSet:Set,Ie=null;function Vf(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){hr(e,t,n)}else r.current=null}function gD(e,t,r){try{r()}catch(n){hr(e,t,n)}}var HB=!1;function Xie(e,t){if(JP=D_,e=M7(),MD(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var o=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{r.nodeType,i.nodeType}catch{r=null;break e}var a=0,s=-1,l=-1,c=0,d=0,u=e,f=null;t:for(;;){for(var m;u!==r||o!==0&&u.nodeType!==3||(s=a+o),u!==i||n!==0&&u.nodeType!==3||(l=a+n),u.nodeType===3&&(a+=u.nodeValue.length),(m=u.firstChild)!==null;)f=u,u=m;for(;;){if(u===e)break t;if(f===r&&++c===o&&(s=a),f===i&&++d===n&&(l=a),(m=u.nextSibling)!==null)break;u=f,f=u.parentNode}u=m}r=s===-1||l===-1?null:{start:s,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(eD={focusedElem:e,selectionRange:r},D_=!1,Ie=t;Ie!==null;)if(t=Ie,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ie=e;else for(;Ie!==null;){t=Ie;try{var p=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var g=p.memoizedProps,b=p.memoizedState,v=t.stateNode,x=v.getSnapshotBeforeUpdate(t.elementType===t.type?g:Ki(t.type,g),b);v.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var _=t.stateNode.containerInfo;_.nodeType===1?_.textContent="":_.nodeType===9&&_.documentElement&&_.removeChild(_.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ie(163))}}catch(I){hr(t,t.return,I)}if(e=t.sibling,e!==null){e.return=t.return,Ie=e;break}Ie=t.return}return p=HB,HB=!1,p}function bg(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var o=n=n.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&gD(t,r,i)}o=o.next}while(o!==n)}}function tI(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function vD(e){var t=e.ref;if(t!==null){var r=e.stateNode;e.tag,e=r,typeof t=="function"?t(e):t.current=e}}function z8(e){var t=e.alternate;t!==null&&(e.alternate=null,z8(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ra],delete t[$g],delete t[oD],delete t[$ie],delete t[Aie])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function N8(e){return e.tag===5||e.tag===3||e.tag===4}function WB(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||N8(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function xD(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=E_));else if(n!==4&&(e=e.child,e!==null))for(xD(e,t,r),e=e.sibling;e!==null;)xD(e,t,r),e=e.sibling}function bD(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(bD(e,t,r),e=e.sibling;e!==null;)bD(e,t,r),e=e.sibling}var uo=null,qi=!1;function zl(e,t,r){for(r=r.child;r!==null;)F8(e,t,r),r=r.sibling}function F8(e,t,r){if(Ta&&typeof Ta.onCommitFiberUnmount=="function")try{Ta.onCommitFiberUnmount(G_,r)}catch{}switch(r.tag){case 5:Eo||Vf(r,t);case 6:var n=uo,o=qi;uo=null,zl(e,t,r),uo=n,qi=o,uo!==null&&(qi?(e=uo,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):uo.removeChild(r.stateNode));break;case 18:uo!==null&&(qi?(e=uo,r=r.stateNode,e.nodeType===8?IP(e.parentNode,r):e.nodeType===1&&IP(e,r),Pg(e)):IP(uo,r.stateNode));break;case 4:n=uo,o=qi,uo=r.stateNode.containerInfo,qi=!0,zl(e,t,r),uo=n,qi=o;break;case 0:case 11:case 14:case 15:if(!Eo&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){o=n=n.next;do{var i=o,a=i.destroy;i=i.tag,a!==void 0&&((i&2)!==0||(i&4)!==0)&&gD(r,t,a),o=o.next}while(o!==n)}zl(e,t,r);break;case 1:if(!Eo&&(Vf(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(s){hr(r,t,s)}zl(e,t,r);break;case 21:zl(e,t,r);break;case 22:r.mode&1?(Eo=(n=Eo)||r.memoizedState!==null,zl(e,t,r),Eo=n):zl(e,t,r);break;default:zl(e,t,r)}}function ZB(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new qie),t.forEach(function(n){var o=iae.bind(null,e,n);r.has(n)||(r.add(n),n.then(o,o))})}}function Gi(e,t){var r=t.deletions;if(r!==null)for(var n=0;n<r.length;n++){var o=r[n];try{var i=e,a=t,s=a;e:for(;s!==null;){switch(s.tag){case 5:uo=s.stateNode,qi=!1;break e;case 3:uo=s.stateNode.containerInfo,qi=!0;break e;case 4:uo=s.stateNode.containerInfo,qi=!0;break e}s=s.return}if(uo===null)throw Error(ie(160));F8(i,a,o),uo=null,qi=!1;var l=o.alternate;l!==null&&(l.return=null),o.return=null}catch(c){hr(o,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)L8(t,e),t=t.sibling}function L8(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Gi(t,e),Pa(e),n&4){try{bg(3,e,e.return),tI(3,e)}catch(g){hr(e,e.return,g)}try{bg(5,e,e.return)}catch(g){hr(e,e.return,g)}}break;case 1:Gi(t,e),Pa(e),n&512&&r!==null&&Vf(r,r.return);break;case 5:if(Gi(t,e),Pa(e),n&512&&r!==null&&Vf(r,r.return),e.flags&32){var o=e.stateNode;try{wg(o,"")}catch(g){hr(e,e.return,g)}}if(n&4&&(o=e.stateNode,o!=null)){var i=e.memoizedProps,a=r!==null?r.memoizedProps:i,s=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{s==="input"&&i.type==="radio"&&i.name!=null&&a7(o,i),VP(s,a);var c=VP(s,i);for(a=0;a<l.length;a+=2){var d=l[a],u=l[a+1];d==="style"?u7(o,u):d==="dangerouslySetInnerHTML"?c7(o,u):d==="children"?wg(o,u):CD(o,d,u,c)}switch(s){case"input":LP(o,i);break;case"textarea":s7(o,i);break;case"select":var f=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!i.multiple;var m=i.value;m!=null?Wf(o,!!i.multiple,m,!1):f!==!!i.multiple&&(i.defaultValue!=null?Wf(o,!!i.multiple,i.defaultValue,!0):Wf(o,!!i.multiple,i.multiple?[]:"",!1))}o[$g]=i}catch(g){hr(e,e.return,g)}}break;case 6:if(Gi(t,e),Pa(e),n&4){if(e.stateNode===null)throw Error(ie(162));o=e.stateNode,i=e.memoizedProps;try{o.nodeValue=i}catch(g){hr(e,e.return,g)}}break;case 3:if(Gi(t,e),Pa(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{Pg(t.containerInfo)}catch(g){hr(e,e.return,g)}break;case 4:Gi(t,e),Pa(e);break;case 13:Gi(t,e),Pa(e),o=e.child,o.flags&8192&&(i=o.memoizedState!==null,o.stateNode.isHidden=i,!i||o.alternate!==null&&o.alternate.memoizedState!==null||(i4=wr())),n&4&&ZB(e);break;case 22:if(d=r!==null&&r.memoizedState!==null,e.mode&1?(Eo=(c=Eo)||d,Gi(t,e),Eo=c):Gi(t,e),Pa(e),n&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!d&&(e.mode&1)!==0)for(Ie=e,d=e.child;d!==null;){for(u=Ie=d;Ie!==null;){switch(f=Ie,m=f.child,f.tag){case 0:case 11:case 14:case 15:bg(4,f,f.return);break;case 1:Vf(f,f.return);var p=f.stateNode;if(typeof p.componentWillUnmount=="function"){n=f,r=f.return;try{t=n,p.props=t.memoizedProps,p.state=t.memoizedState,p.componentWillUnmount()}catch(g){hr(n,r,g)}}break;case 5:Vf(f,f.return);break;case 22:if(f.memoizedState!==null){KB(u);continue}}m!==null?(m.return=f,Ie=m):KB(u)}d=d.sibling}e:for(d=null,u=e;;){if(u.tag===5){if(d===null){d=u;try{o=u.stateNode,c?(i=o.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(s=u.stateNode,l=u.memoizedProps.style,a=l!=null&&l.hasOwnProperty("display")?l.display:null,s.style.display=d7("display",a))}catch(g){hr(e,e.return,g)}}}else if(u.tag===6){if(d===null)try{u.stateNode.nodeValue=c?"":u.memoizedProps}catch(g){hr(e,e.return,g)}}else if((u.tag!==22&&u.tag!==23||u.memoizedState===null||u===e)&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===e)break e;for(;u.sibling===null;){if(u.return===null||u.return===e)break e;d===u&&(d=null),u=u.return}d===u&&(d=null),u.sibling.return=u.return,u=u.sibling}}break;case 19:Gi(t,e),Pa(e),n&4&&ZB(e);break;case 21:break;default:Gi(t,e),Pa(e)}}function Pa(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(N8(r)){var n=r;break e}r=r.return}throw Error(ie(160))}switch(n.tag){case 5:var o=n.stateNode;n.flags&32&&(wg(o,""),n.flags&=-33);var i=WB(e);bD(e,i,o);break;case 3:case 4:var a=n.stateNode.containerInfo,s=WB(e);xD(e,s,a);break;default:throw Error(ie(161))}}catch(l){hr(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Qie(e,t,r){Ie=e,M8(e,t,r)}function M8(e,t,r){for(var n=(e.mode&1)!==0;Ie!==null;){var o=Ie,i=o.child;if(o.tag===22&&n){var a=o.memoizedState!==null||u_;if(!a){var s=o.alternate,l=s!==null&&s.memoizedState!==null||Eo;s=u_;var c=Eo;if(u_=a,(Eo=l)&&!c)for(Ie=o;Ie!==null;)a=Ie,l=a.child,a.tag===22&&a.memoizedState!==null?qB(o):l!==null?(l.return=a,Ie=l):qB(o);for(;i!==null;)Ie=i,M8(i,t,r),i=i.sibling;Ie=o,u_=s,Eo=c}GB(e,t,r)}else(o.subtreeFlags&8772)!==0&&i!==null?(i.return=o,Ie=i):GB(e,t,r)}}function GB(e){for(;Ie!==null;){var t=Ie;if((t.flags&8772)!==0){var r=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:Eo||tI(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!Eo)if(r===null)n.componentDidMount();else{var o=t.elementType===t.type?r.memoizedProps:Ki(t.type,r.memoizedProps);n.componentDidUpdate(o,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&EB(t,i,n);break;case 3:var a=t.updateQueue;if(a!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}EB(t,a,r)}break;case 5:var s=t.stateNode;if(r===null&&t.flags&4){r=s;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&r.focus();break;case"img":l.src&&(r.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var d=c.memoizedState;if(d!==null){var u=d.dehydrated;u!==null&&Pg(u)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(ie(163))}Eo||t.flags&512&&vD(t)}catch(f){hr(t,t.return,f)}}if(t===e){Ie=null;break}if(r=t.sibling,r!==null){r.return=t.return,Ie=r;break}Ie=t.return}}function KB(e){for(;Ie!==null;){var t=Ie;if(t===e){Ie=null;break}var r=t.sibling;if(r!==null){r.return=t.return,Ie=r;break}Ie=t.return}}function qB(e){for(;Ie!==null;){var t=Ie;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{tI(4,t)}catch(l){hr(t,r,l)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var o=t.return;try{n.componentDidMount()}catch(l){hr(t,o,l)}}var i=t.return;try{vD(t)}catch(l){hr(t,i,l)}break;case 5:var a=t.return;try{vD(t)}catch(l){hr(t,a,l)}}}catch(l){hr(t,t.return,l)}if(t===e){Ie=null;break}var s=t.sibling;if(s!==null){s.return=t.return,Ie=s;break}Ie=t.return}}var Yie=Math.ceil,U_=zs.ReactCurrentDispatcher,o4=zs.ReactCurrentOwner,di=zs.ReactCurrentBatchConfig,ht=0,qr=null,Rr=null,fo=0,Bn=0,Hf=Jl(0),Or=0,Lg=null,zd=0,rI=0,n4=0,yg=null,vn=null,i4=0,om=1/0,Cs=null,V_=!1,yD=null,Gl=null,f_=!1,jl=null,H_=0,_g=0,_D=null,y_=-1,__=0;function Ho(){return(ht&6)!==0?wr():y_!==-1?y_:y_=wr()}function Kl(e){return(e.mode&1)===0?1:(ht&2)!==0&&fo!==0?fo&-fo:zie.transition!==null?(__===0&&(__=w7()),__):(e=Ct,e!==0||(e=window.event,e=e===void 0?16:T7(e.type)),e)}function Yi(e,t,r,n){if(50<_g)throw _g=0,_D=null,Error(ie(185));Mg(e,r,n),((ht&2)===0||e!==qr)&&(e===qr&&((ht&2)===0&&(rI|=r),Or===4&&Ml(e,fo)),_n(e,n),r===1&&ht===0&&(t.mode&1)===0&&(om=wr()+500,Y_&&ec()))}function _n(e,t){var r=e.callbackNode;Fne(e,t);var n=P_(e,e===qr?fo:0);if(n===0)r!==null&&oB(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&oB(r),t===1)e.tag===0?Oie(XB.bind(null,e)):q7(XB.bind(null,e)),Tie(function(){(ht&6)===0&&ec()}),r=null;else{switch(S7(n)){case 1:r=ED;break;case 4:r=_7;break;case 16:r=C_;break;case 536870912:r=I7;break;default:r=C_}r=G8(r,B8.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function B8(e,t){if(y_=-1,__=0,(ht&6)!==0)throw Error(ie(327));var r=e.callbackNode;if(Xf()&&e.callbackNode!==r)return null;var n=P_(e,e===qr?fo:0);if(n===0)return null;if((n&30)!==0||(n&e.expiredLanes)!==0||t)t=W_(e,n);else{t=n;var o=ht;ht|=2;var i=U8();(qr!==e||fo!==t)&&(Cs=null,om=wr()+500,Td(e,t));do try{tae();break}catch(s){j8(e,s)}while(!0);HD(),U_.current=i,ht=o,Rr!==null?t=0:(qr=null,fo=0,t=Or)}if(t!==0){if(t===2&&(o=KP(e),o!==0&&(n=o,t=ID(e,o))),t===1)throw r=Lg,Td(e,0),Ml(e,n),_n(e,wr()),r;if(t===6)Ml(e,n);else{if(o=e.current.alternate,(n&30)===0&&!Jie(o)&&(t=W_(e,n),t===2&&(i=KP(e),i!==0&&(n=i,t=ID(e,i))),t===1))throw r=Lg,Td(e,0),Ml(e,n),_n(e,wr()),r;switch(e.finishedWork=o,e.finishedLanes=n,t){case 0:case 1:throw Error(ie(345));case 2:Cd(e,vn,Cs);break;case 3:if(Ml(e,n),(n&130023424)===n&&(t=i4+500-wr(),10<t)){if(P_(e,0)!==0)break;if(o=e.suspendedLanes,(o&n)!==n){Ho(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=rD(Cd.bind(null,e,vn,Cs),t);break}Cd(e,vn,Cs);break;case 4:if(Ml(e,n),(n&4194240)===n)break;for(t=e.eventTimes,o=-1;0<n;){var a=31-Qi(n);i=1<<a,a=t[a],a>o&&(o=a),n&=~i}if(n=o,n=wr()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Yie(n/1960))-n,10<n){e.timeoutHandle=rD(Cd.bind(null,e,vn,Cs),n);break}Cd(e,vn,Cs);break;case 5:Cd(e,vn,Cs);break;default:throw Error(ie(329))}}}return _n(e,wr()),e.callbackNode===r?B8.bind(null,e):null}function ID(e,t){var r=yg;return e.current.memoizedState.isDehydrated&&(Td(e,t).flags|=256),e=W_(e,t),e!==2&&(t=vn,vn=r,t!==null&&wD(t)),e}function wD(e){vn===null?vn=e:vn.push.apply(vn,e)}function Jie(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var o=r[n],i=o.getSnapshot;o=o.value;try{if(!Ji(i(),o))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Ml(e,t){for(t&=~n4,t&=~rI,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-Qi(t),n=1<<r;e[r]=-1,t&=~n}}function XB(e){if((ht&6)!==0)throw Error(ie(327));Xf();var t=P_(e,0);if((t&1)===0)return _n(e,wr()),null;var r=W_(e,t);if(e.tag!==0&&r===2){var n=KP(e);n!==0&&(t=n,r=ID(e,n))}if(r===1)throw r=Lg,Td(e,0),Ml(e,t),_n(e,wr()),r;if(r===6)throw Error(ie(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Cd(e,vn,Cs),_n(e,wr()),null}function a4(e,t){var r=ht;ht|=1;try{return e(t)}finally{ht=r,ht===0&&(om=wr()+500,Y_&&ec())}}function Nd(e){jl!==null&&jl.tag===0&&(ht&6)===0&&Xf();var t=ht;ht|=1;var r=di.transition,n=Ct;try{if(di.transition=null,Ct=1,e)return e()}finally{Ct=n,di.transition=r,ht=t,(ht&6)===0&&ec()}}function s4(){Bn=Hf.current,Kt(Hf)}function Td(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,Rie(r)),Rr!==null)for(r=Rr.return;r!==null;){var n=r;switch(jD(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&$_();break;case 3:tm(),Kt(bn),Kt($o),XD();break;case 5:qD(n);break;case 4:tm();break;case 13:Kt(sr);break;case 19:Kt(sr);break;case 10:WD(n.type._context);break;case 22:case 23:s4()}r=r.return}if(qr=e,Rr=e=ql(e.current,null),fo=Bn=t,Or=0,Lg=null,n4=rI=zd=0,vn=yg=null,Dd!==null){for(t=0;t<Dd.length;t++)if(r=Dd[t],n=r.interleaved,n!==null){r.interleaved=null;var o=n.next,i=r.pending;if(i!==null){var a=i.next;i.next=o,n.next=a}r.pending=n}Dd=null}return e}function j8(e,t){do{var r=Rr;try{if(HD(),v_.current=j_,B_){for(var n=lr.memoizedState;n!==null;){var o=n.queue;o!==null&&(o.pending=null),n=n.next}B_=!1}if(Od=0,Kr=Ar=lr=null,xg=!1,zg=0,o4.current=null,r===null||r.return===null){Or=1,Lg=t,Rr=null;break}e:{var i=e,a=r.return,s=r,l=t;if(t=fo,s.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,d=s,u=d.tag;if((d.mode&1)===0&&(u===0||u===11||u===15)){var f=d.alternate;f?(d.updateQueue=f.updateQueue,d.memoizedState=f.memoizedState,d.lanes=f.lanes):(d.updateQueue=null,d.memoizedState=null)}var m=FB(a);if(m!==null){m.flags&=-257,LB(m,a,s,i,t),m.mode&1&&NB(i,c,t),t=m,l=c;var p=t.updateQueue;if(p===null){var g=new Set;g.add(l),t.updateQueue=g}else p.add(l);break e}else{if((t&1)===0){NB(i,c,t),l4();break e}l=Error(ie(426))}}else if(er&&s.mode&1){var b=FB(a);if(b!==null){(b.flags&65536)===0&&(b.flags|=256),LB(b,a,s,i,t),UD(rm(l,s));break e}}i=l=rm(l,s),Or!==4&&(Or=2),yg===null?yg=[i]:yg.push(i),i=a;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var v=S8(i,l,t);TB(i,v);break e;case 1:s=l;var x=i.type,_=i.stateNode;if((i.flags&128)===0&&(typeof x.getDerivedStateFromError=="function"||_!==null&&typeof _.componentDidCatch=="function"&&(Gl===null||!Gl.has(_)))){i.flags|=65536,t&=-t,i.lanes|=t;var I=k8(i,s,t);TB(i,I);break e}}i=i.return}while(i!==null)}H8(r)}catch(S){t=S,Rr===r&&r!==null&&(Rr=r=r.return);continue}break}while(!0)}function U8(){var e=U_.current;return U_.current=j_,e===null?j_:e}function l4(){(Or===0||Or===3||Or===2)&&(Or=4),qr===null||(zd&268435455)===0&&(rI&268435455)===0||Ml(qr,fo)}function W_(e,t){var r=ht;ht|=2;var n=U8();(qr!==e||fo!==t)&&(Cs=null,Td(e,t));do try{eae();break}catch(o){j8(e,o)}while(!0);if(HD(),ht=r,U_.current=n,Rr!==null)throw Error(ie(261));return qr=null,fo=0,Or}function eae(){for(;Rr!==null;)V8(Rr)}function tae(){for(;Rr!==null&&!Dne();)V8(Rr)}function V8(e){var t=Z8(e.alternate,e,Bn);e.memoizedProps=e.pendingProps,t===null?H8(e):Rr=t,o4.current=null}function H8(e){var t=e;do{var r=t.alternate;if(e=t.return,(t.flags&32768)===0){if(r=Gie(r,t,Bn),r!==null){Rr=r;return}}else{if(r=Kie(r,t),r!==null){r.flags&=32767,Rr=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Or=6,Rr=null;return}}if(t=t.sibling,t!==null){Rr=t;return}Rr=t=e}while(t!==null);Or===0&&(Or=5)}function Cd(e,t,r){var n=Ct,o=di.transition;try{di.transition=null,Ct=1,rae(e,t,r,n)}finally{di.transition=o,Ct=n}return null}function rae(e,t,r,n){do Xf();while(jl!==null);if((ht&6)!==0)throw Error(ie(327));r=e.finishedWork;var o=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(ie(177));e.callbackNode=null,e.callbackPriority=0;var i=r.lanes|r.childLanes;if(Lne(e,i),e===qr&&(Rr=qr=null,fo=0),(r.subtreeFlags&2064)===0&&(r.flags&2064)===0||f_||(f_=!0,G8(C_,function(){return Xf(),null})),i=(r.flags&15990)!==0,(r.subtreeFlags&15990)!==0||i){i=di.transition,di.transition=null;var a=Ct;Ct=1;var s=ht;ht|=4,o4.current=null,Xie(e,r),L8(r,e),Sie(eD),D_=!!JP,eD=JP=null,e.current=r,Qie(r,e,o),Rne(),ht=s,Ct=a,di.transition=i}else e.current=r;if(f_&&(f_=!1,jl=e,H_=o),i=e.pendingLanes,i===0&&(Gl=null),$ne(r.stateNode,n),_n(e,wr()),t!==null)for(n=e.onRecoverableError,r=0;r<t.length;r++)o=t[r],n(o.value,{componentStack:o.stack,digest:o.digest});if(V_)throw V_=!1,e=yD,yD=null,e;return(H_&1)!==0&&e.tag!==0&&Xf(),i=e.pendingLanes,(i&1)!==0?e===_D?_g++:(_g=0,_D=e):_g=0,ec(),null}function Xf(){if(jl!==null){var e=S7(H_),t=di.transition,r=Ct;try{if(di.transition=null,Ct=16>e?16:e,jl===null)var n=!1;else{if(e=jl,jl=null,H_=0,(ht&6)!==0)throw Error(ie(331));var o=ht;for(ht|=4,Ie=e.current;Ie!==null;){var i=Ie,a=i.child;if((Ie.flags&16)!==0){var s=i.deletions;if(s!==null){for(var l=0;l<s.length;l++){var c=s[l];for(Ie=c;Ie!==null;){var d=Ie;switch(d.tag){case 0:case 11:case 15:bg(8,d,i)}var u=d.child;if(u!==null)u.return=d,Ie=u;else for(;Ie!==null;){d=Ie;var f=d.sibling,m=d.return;if(z8(d),d===c){Ie=null;break}if(f!==null){f.return=m,Ie=f;break}Ie=m}}}var p=i.alternate;if(p!==null){var g=p.child;if(g!==null){p.child=null;do{var b=g.sibling;g.sibling=null,g=b}while(g!==null)}}Ie=i}}if((i.subtreeFlags&2064)!==0&&a!==null)a.return=i,Ie=a;else e:for(;Ie!==null;){if(i=Ie,(i.flags&2048)!==0)switch(i.tag){case 0:case 11:case 15:bg(9,i,i.return)}var v=i.sibling;if(v!==null){v.return=i.return,Ie=v;break e}Ie=i.return}}var x=e.current;for(Ie=x;Ie!==null;){a=Ie;var _=a.child;if((a.subtreeFlags&2064)!==0&&_!==null)_.return=a,Ie=_;else e:for(a=x;Ie!==null;){if(s=Ie,(s.flags&2048)!==0)try{switch(s.tag){case 0:case 11:case 15:tI(9,s)}}catch(S){hr(s,s.return,S)}if(s===a){Ie=null;break e}var I=s.sibling;if(I!==null){I.return=s.return,Ie=I;break e}Ie=s.return}}if(ht=o,ec(),Ta&&typeof Ta.onPostCommitFiberRoot=="function")try{Ta.onPostCommitFiberRoot(G_,e)}catch{}n=!0}return n}finally{Ct=r,di.transition=t}}return!1}function QB(e,t,r){t=rm(r,t),t=S8(e,t,1),e=Zl(e,t,1),t=Ho(),e!==null&&(Mg(e,1,t),_n(e,t))}function hr(e,t,r){if(e.tag===3)QB(e,e,r);else for(;t!==null;){if(t.tag===3){QB(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Gl===null||!Gl.has(n))){e=rm(r,e),e=k8(t,e,1),t=Zl(t,e,1),e=Ho(),t!==null&&(Mg(t,1,e),_n(t,e));break}}t=t.return}}function oae(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=Ho(),e.pingedLanes|=e.suspendedLanes&r,qr===e&&(fo&r)===r&&(Or===4||Or===3&&(fo&130023424)===fo&&500>wr()-i4?Td(e,0):n4|=r),_n(e,t)}function W8(e,t){t===0&&((e.mode&1)===0?t=1:(t=Yy,Yy<<=1,(Yy&130023424)===0&&(Yy=4194304)));var r=Ho();e=As(e,t),e!==null&&(Mg(e,t,r),_n(e,r))}function nae(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),W8(e,r)}function iae(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,o=e.memoizedState;o!==null&&(r=o.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(ie(314))}n!==null&&n.delete(t),W8(e,r)}var Z8;Z8=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||bn.current)xn=!0;else{if((e.lanes&r)===0&&(t.flags&128)===0)return xn=!1,Zie(e,t,r);xn=(e.flags&131072)!==0}else xn=!1,er&&(t.flags&1048576)!==0&&X7(t,z_,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;b_(e,t),e=t.pendingProps;var o=Yf(t,$o.current);qf(t,r),o=YD(null,t,n,e,o,r);var i=JD();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,yn(n)?(i=!0,A_(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,GD(t),o.updater=eI,t.stateNode=o,o._reactInternals=t,cD(t,n,e,r),t=fD(null,t,n,!0,i,r)):(t.tag=0,er&&i&&BD(t),Vo(null,t,o,r),t=t.child),t;case 16:n=t.elementType;e:{switch(b_(e,t),e=t.pendingProps,o=n._init,n=o(n._payload),t.type=n,o=t.tag=sae(n),e=Ki(n,e),o){case 0:t=uD(null,t,n,e,r);break e;case 1:t=jB(null,t,n,e,r);break e;case 11:t=MB(null,t,n,e,r);break e;case 14:t=BB(null,t,n,Ki(n.type,e),r);break e}throw Error(ie(306,n,""))}return t;case 0:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:Ki(n,o),uD(e,t,n,o,r);case 1:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:Ki(n,o),jB(e,t,n,o,r);case 3:e:{if(R8(t),e===null)throw Error(ie(387));n=t.pendingProps,i=t.memoizedState,o=i.element,r8(e,t),L_(t,n,null,r);var a=t.memoizedState;if(n=a.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=rm(Error(ie(423)),t),t=UB(e,t,n,r,o);break e}else if(n!==o){o=rm(Error(ie(424)),t),t=UB(e,t,n,r,o);break e}else for(jn=Wl(t.stateNode.containerInfo.firstChild),Un=t,er=!0,Xi=null,r=e8(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Jf(),n===o){t=Os(e,t,r);break e}Vo(e,t,n,r)}t=t.child}return t;case 5:return o8(t),e===null&&aD(t),n=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,a=o.children,tD(n,o)?a=null:i!==null&&tD(n,i)&&(t.flags|=32),D8(e,t),Vo(e,t,a,r),t.child;case 6:return e===null&&aD(t),null;case 13:return T8(e,t,r);case 4:return KD(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=em(t,null,n,r):Vo(e,t,n,r),t.child;case 11:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:Ki(n,o),MB(e,t,n,o,r);case 7:return Vo(e,t,t.pendingProps,r),t.child;case 8:return Vo(e,t,t.pendingProps.children,r),t.child;case 12:return Vo(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,o=t.pendingProps,i=t.memoizedProps,a=o.value,Ft(N_,n._currentValue),n._currentValue=a,i!==null)if(Ji(i.value,a)){if(i.children===o.children&&!bn.current){t=Os(e,t,r);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var s=i.dependencies;if(s!==null){a=i.child;for(var l=s.firstContext;l!==null;){if(l.context===n){if(i.tag===1){l=Ts(-1,r&-r),l.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var d=c.pending;d===null?l.next=l:(l.next=d.next,d.next=l),c.pending=l}}i.lanes|=r,l=i.alternate,l!==null&&(l.lanes|=r),sD(i.return,r,t),s.lanes|=r;break}l=l.next}}else if(i.tag===10)a=i.type===t.type?null:i.child;else if(i.tag===18){if(a=i.return,a===null)throw Error(ie(341));a.lanes|=r,s=a.alternate,s!==null&&(s.lanes|=r),sD(a,r,t),a=i.sibling}else a=i.child;if(a!==null)a.return=i;else for(a=i;a!==null;){if(a===t){a=null;break}if(i=a.sibling,i!==null){i.return=a.return,a=i;break}a=a.return}i=a}Vo(e,t,o.children,r),t=t.child}return t;case 9:return o=t.type,n=t.pendingProps.children,qf(t,r),o=ui(o),n=n(o),t.flags|=1,Vo(e,t,n,r),t.child;case 14:return n=t.type,o=Ki(n,t.pendingProps),o=Ki(n.type,o),BB(e,t,n,o,r);case 15:return C8(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:Ki(n,o),b_(e,t),t.tag=1,yn(n)?(e=!0,A_(t)):e=!1,qf(t,r),w8(t,n,o),cD(t,n,o,r),fD(null,t,n,!0,e,r);case 19:return E8(e,t,r);case 22:return P8(e,t,r)}throw Error(ie(156,t.tag))};function G8(e,t){return y7(e,t)}function aae(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ci(e,t,r,n){return new aae(e,t,r,n)}function c4(e){return e=e.prototype,!(!e||!e.isReactComponent)}function sae(e){if(typeof e=="function")return c4(e)?1:0;if(e!=null){if(e=e.$$typeof,e===DD)return 11;if(e===RD)return 14}return 2}function ql(e,t){var r=e.alternate;return r===null?(r=ci(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function I_(e,t,r,n,o,i){var a=2;if(n=e,typeof e=="function")c4(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Of:return Ed(r.children,o,i,t);case PD:a=8,o|=8;break;case AP:return e=ci(12,r,t,o|2),e.elementType=AP,e.lanes=i,e;case OP:return e=ci(13,r,t,o),e.elementType=OP,e.lanes=i,e;case zP:return e=ci(19,r,t,o),e.elementType=zP,e.lanes=i,e;case o7:return oI(r,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case t7:a=10;break e;case r7:a=9;break e;case DD:a=11;break e;case RD:a=14;break e;case Nl:a=16,n=null;break e}throw Error(ie(130,e==null?e:typeof e,""))}return t=ci(a,r,t,o),t.elementType=e,t.type=n,t.lanes=i,t}function Ed(e,t,r,n){return e=ci(7,e,n,t),e.lanes=r,e}function oI(e,t,r,n){return e=ci(22,e,n,t),e.elementType=o7,e.lanes=r,e.stateNode={isHidden:!1},e}function TP(e,t,r){return e=ci(6,e,null,t),e.lanes=r,e}function EP(e,t,r){return t=ci(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function lae(e,t,r,n,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=pP(0),this.expirationTimes=pP(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=pP(0),this.identifierPrefix=n,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function d4(e,t,r,n,o,i,a,s,l){return e=new lae(e,t,r,s,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=ci(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},GD(i),e}function cae(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Af,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function K8(e){if(!e)return Ql;e=e._reactInternals;e:{if(Ld(e)!==e||e.tag!==1)throw Error(ie(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(yn(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(ie(171))}if(e.tag===1){var r=e.type;if(yn(r))return K7(e,r,t)}return t}function q8(e,t,r,n,o,i,a,s,l){return e=d4(r,n,!0,e,o,i,a,s,l),e.context=K8(null),r=e.current,n=Ho(),o=Kl(r),i=Ts(n,o),i.callback=t??null,Zl(r,i,o),e.current.lanes=o,Mg(e,o,n),_n(e,n),e}function nI(e,t,r,n){var o=t.current,i=Ho(),a=Kl(o);return r=K8(r),t.context===null?t.context=r:t.pendingContext=r,t=Ts(i,a),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=Zl(o,t,a),e!==null&&(Yi(e,o,a,i),g_(e,o,a)),a}function Z_(e){return e=e.current,e.child?(e.child.tag===5,e.child.stateNode):null}function YB(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function u4(e,t){YB(e,t),(e=e.alternate)&&YB(e,t)}function dae(){return null}var X8=typeof reportError=="function"?reportError:function(e){console.error(e)};function f4(e){this._internalRoot=e}iI.prototype.render=f4.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(ie(409));nI(e,t,null,null)};iI.prototype.unmount=f4.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Nd(function(){nI(null,e,null,null)}),t[$s]=null}};function iI(e){this._internalRoot=e}iI.prototype.unstable_scheduleHydration=function(e){if(e){var t=P7();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Ll.length&&t!==0&&t<Ll[r].priority;r++);Ll.splice(r,0,e),r===0&&R7(e)}};function m4(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function aI(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function JB(){}function uae(e,t,r,n,o){if(o){if(typeof n=="function"){var i=n;n=function(){var c=Z_(a);i.call(c)}}var a=q8(t,n,e,0,null,!1,!1,"",JB);return e._reactRootContainer=a,e[$s]=a.current,Tg(e.nodeType===8?e.parentNode:e),Nd(),a}for(;o=e.lastChild;)e.removeChild(o);if(typeof n=="function"){var s=n;n=function(){var c=Z_(l);s.call(c)}}var l=d4(e,0,!1,null,null,!1,!1,"",JB);return e._reactRootContainer=l,e[$s]=l.current,Tg(e.nodeType===8?e.parentNode:e),Nd(function(){nI(t,l,r,n)}),l}function sI(e,t,r,n,o){var i=r._reactRootContainer;if(i){var a=i;if(typeof o=="function"){var s=o;o=function(){var l=Z_(a);s.call(l)}}nI(t,a,e,o)}else a=uae(r,t,e,o,n);return Z_(a)}k7=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=ug(t.pendingLanes);r!==0&&($D(t,r|1),_n(t,wr()),(ht&6)===0&&(om=wr()+500,ec()))}break;case 13:Nd(function(){var n=As(e,1);if(n!==null){var o=Ho();Yi(n,e,1,o)}}),u4(e,1)}};AD=function(e){if(e.tag===13){var t=As(e,134217728);if(t!==null){var r=Ho();Yi(t,e,134217728,r)}u4(e,134217728)}};C7=function(e){if(e.tag===13){var t=Kl(e),r=As(e,t);if(r!==null){var n=Ho();Yi(r,e,t,n)}u4(e,t)}};P7=function(){return Ct};D7=function(e,t){var r=Ct;try{return Ct=e,t()}finally{Ct=r}};WP=function(e,t,r){switch(t){case"input":if(LP(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var n=r[t];if(n!==e&&n.form===e.form){var o=Q_(n);if(!o)throw Error(ie(90));i7(n),LP(n,o)}}}break;case"textarea":s7(e,r);break;case"select":t=r.value,t!=null&&Wf(e,!!r.multiple,t,!1)}};p7=a4;h7=Nd;var fae={usingClientEntryPoint:!1,Events:[jg,Lf,Q_,f7,m7,a4]},sg={findFiberByHostInstance:Pd,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},mae={bundleType:sg.bundleType,version:sg.version,rendererPackageName:sg.rendererPackageName,rendererConfig:sg.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:zs.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=x7(e),e===null?null:e.stateNode},findFiberByHostInstance:sg.findFiberByHostInstance||dae,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(lg=__REACT_DEVTOOLS_GLOBAL_HOOK__,!lg.isDisabled&&lg.supportsFiber))try{G_=lg.inject(mae),Ta=lg}catch{}var lg;Wn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=fae;Wn.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m4(t))throw Error(ie(200));return cae(e,t,null,r)};Wn.createRoot=function(e,t){if(!m4(e))throw Error(ie(299));var r=!1,n="",o=X8;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=d4(e,1,!1,null,null,r,!1,n,o),e[$s]=t.current,Tg(e.nodeType===8?e.parentNode:e),new f4(t)};Wn.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(ie(188)):(e=Object.keys(e).join(","),Error(ie(268,e)));return e=x7(t),e=e===null?null:e.stateNode,e};Wn.flushSync=function(e){return Nd(e)};Wn.hydrate=function(e,t,r){if(!aI(t))throw Error(ie(200));return sI(null,e,t,!0,r)};Wn.hydrateRoot=function(e,t,r){if(!m4(e))throw Error(ie(405));var n=r!=null&&r.hydratedSources||null,o=!1,i="",a=X8;if(r!=null&&(r.unstable_strictMode===!0&&(o=!0),r.identifierPrefix!==void 0&&(i=r.identifierPrefix),r.onRecoverableError!==void 0&&(a=r.onRecoverableError)),t=q8(t,null,e,1,r??null,o,!1,i,a),e[$s]=t.current,Tg(e),n)for(e=0;e<n.length;e++)r=n[e],o=r._getVersion,o=o(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,o]:t.mutableSourceEagerHydrationData.push(r,o);return new iI(t)};Wn.render=function(e,t,r){if(!aI(t))throw Error(ie(200));return sI(null,e,t,!1,r)};Wn.unmountComponentAtNode=function(e){if(!aI(e))throw Error(ie(40));return e._reactRootContainer?(Nd(function(){sI(null,null,e,!1,function(){e._reactRootContainer=null,e[$s]=null})}),!0):!1};Wn.unstable_batchedUpdates=a4;Wn.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!aI(r))throw Error(ie(200));if(e==null||e._reactInternals===void 0)throw Error(ie(38));return sI(e,t,r,!1,n)};Wn.version="18.3.1-next-f1338f8080-20240426"});var tc=ya(($Te,J8)=>{"use strict";function Y8(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Y8)}catch(e){console.error(e)}}Y8(),J8.exports=Q8()});var HZ=ya(gT=>{"use strict";var VZ=tc();gT.createRoot=VZ.createRoot,gT.hydrateRoot=VZ.hydrateRoot;var Jct});var kY=ya((Jbt,SY)=>{"use strict";SY.exports=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,o,i;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(o=n;o--!==0;)if(!e(t[o],r[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(i=Object.keys(t),n=i.length,n!==Object.keys(r).length)return!1;for(o=n;o--!==0;)if(!Object.prototype.hasOwnProperty.call(r,i[o]))return!1;for(o=n;o--!==0;){var a=i[o];if(!e(t[a],r[a]))return!1}return!0}return t!==t&&r!==r}});var gn=function(){return gn=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},gn.apply(this,arguments)};function uy(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function pF(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n<o;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}var by=y(D());var So=y(D());var ld="right-scroll-bar-position",cd="width-before-scroll-bar",f2="with-scroll-bars-hidden",m2="--removed-body-scroll-bar-size";function hy(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}var DF=y(D());function RF(e,t){var r=(0,DF.useState)(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}var gy=y(D());var qre=typeof window<"u"?gy.useLayoutEffect:gy.useEffect,TF=new WeakMap;function p2(e,t){var r=RF(t||null,function(n){return e.forEach(function(o){return hy(o,n)})});return qre(function(){var n=TF.get(r);if(n){var o=new Set(n),i=new Set(e),a=r.current;o.forEach(function(s){i.has(s)||hy(s,null)}),i.forEach(function(s){o.has(s)||hy(s,a)})}TF.set(r,e)},[e]),r}function Xre(e){return e}function Qre(e,t){t===void 0&&(t=Xre);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(i){var a=t(i,n);return r.push(a),function(){r=r.filter(function(s){return s!==a})}},assignSyncMedium:function(i){for(n=!0;r.length;){var a=r;r=[],a.forEach(i)}r={push:function(s){return i(s)},filter:function(){return r}}},assignMedium:function(i){n=!0;var a=[];if(r.length){var s=r;r=[],s.forEach(i),a=r}var l=function(){var d=a;a=[],d.forEach(i)},c=function(){return Promise.resolve().then(l)};c(),r={push:function(d){a.push(d),c()},filter:function(d){return a=a.filter(d),r}}}};return o}function h2(e){e===void 0&&(e={});var t=Qre(null);return t.options=gn({async:!0,ssr:!1},e),t}var EF=y(D()),$F=function(e){var t=e.sideCar,r=uy(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return EF.createElement(n,gn({},r))};$F.isSideCarExport=!0;function g2(e,t){return e.useMedium(t),$F}var vy=h2();var v2=function(){},Ah=So.forwardRef(function(e,t){var r=So.useRef(null),n=So.useState({onScrollCapture:v2,onWheelCapture:v2,onTouchMoveCapture:v2}),o=n[0],i=n[1],a=e.forwardProps,s=e.children,l=e.className,c=e.removeScrollBar,d=e.enabled,u=e.shards,f=e.sideCar,m=e.noRelative,p=e.noIsolation,g=e.inert,b=e.allowPinchZoom,v=e.as,x=v===void 0?"div":v,_=e.gapMode,I=uy(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=f,w=p2([r,t]),P=gn(gn({},I),o);return So.createElement(So.Fragment,null,d&&So.createElement(S,{sideCar:vy,removeScrollBar:c,shards:u,noRelative:m,noIsolation:p,inert:g,setCallbacks:i,allowPinchZoom:!!b,lockRef:r,gapMode:_}),a?So.cloneElement(So.Children.only(s),gn(gn({},P),{ref:w})):So.createElement(x,gn({},P,{className:l,ref:w}),s))});Ah.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Ah.classNames={fullWidth:cd,zeroRight:ld};var Wt=y(D());var gf=y(D());var zF=y(D());var AF;var OF=function(){if(AF)return AF;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Yre(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=OF();return t&&e.setAttribute("nonce",t),e}function Jre(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function eoe(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var x2=function(){var e=0,t=null;return{add:function(r){e==0&&(t=Yre())&&(Jre(t,r),eoe(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}};var b2=function(){var e=x2();return function(t,r){zF.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}};var Oh=function(){var e=b2(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t};var toe={left:0,top:0,right:0,gap:0},y2=function(e){return parseInt(e||"",10)||0},roe=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[y2(r),y2(n),y2(o)]},_2=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return toe;var t=roe(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}};var ooe=Oh(),hf="data-scroll-locked",noe=function(e,t,r,n){var o=e.left,i=e.top,a=e.right,s=e.gap;return r===void 0&&(r="margin"),`
|
|
9
|
+
.`.concat(f2,` {
|
|
10
|
+
overflow: hidden `).concat(n,`;
|
|
11
|
+
padding-right: `).concat(s,"px ").concat(n,`;
|
|
12
|
+
}
|
|
13
|
+
body[`).concat(hf,`] {
|
|
14
|
+
overflow: hidden `).concat(n,`;
|
|
15
|
+
overscroll-behavior: contain;
|
|
16
|
+
`).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&`
|
|
17
|
+
padding-left: `.concat(o,`px;
|
|
18
|
+
padding-top: `).concat(i,`px;
|
|
19
|
+
padding-right: `).concat(a,`px;
|
|
20
|
+
margin-left:0;
|
|
21
|
+
margin-top:0;
|
|
22
|
+
margin-right: `).concat(s,"px ").concat(n,`;
|
|
23
|
+
`),r==="padding"&&"padding-right: ".concat(s,"px ").concat(n,";")].filter(Boolean).join(""),`
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.`).concat(ld,` {
|
|
27
|
+
right: `).concat(s,"px ").concat(n,`;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.`).concat(cd,` {
|
|
31
|
+
margin-right: `).concat(s,"px ").concat(n,`;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.`).concat(ld," .").concat(ld,` {
|
|
35
|
+
right: 0 `).concat(n,`;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.`).concat(cd," .").concat(cd,` {
|
|
39
|
+
margin-right: 0 `).concat(n,`;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
body[`).concat(hf,`] {
|
|
43
|
+
`).concat(m2,": ").concat(s,`px;
|
|
44
|
+
}
|
|
45
|
+
`)},NF=function(){var e=parseInt(document.body.getAttribute(hf)||"0",10);return isFinite(e)?e:0},ioe=function(){gf.useEffect(function(){return document.body.setAttribute(hf,(NF()+1).toString()),function(){var e=NF()-1;e<=0?document.body.removeAttribute(hf):document.body.setAttribute(hf,e.toString())}},[])},I2=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,o=n===void 0?"margin":n;ioe();var i=gf.useMemo(function(){return _2(o)},[o]);return gf.createElement(ooe,{styles:noe(i,!t,o,r?"":"!important")})};var w2=!1;if(typeof window<"u")try{zh=Object.defineProperty({},"passive",{get:function(){return w2=!0,!0}}),window.addEventListener("test",zh,zh),window.removeEventListener("test",zh,zh)}catch{w2=!1}var zh,dd=w2?{passive:!1}:!1;var aoe=function(e){return e.tagName==="TEXTAREA"},FF=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!aoe(e)&&r[t]==="visible")},soe=function(e){return FF(e,"overflowY")},loe=function(e){return FF(e,"overflowX")},S2=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var o=LF(e,n);if(o){var i=MF(e,n),a=i[1],s=i[2];if(a>s)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},coe=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},doe=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},LF=function(e,t){return e==="v"?soe(t):loe(t)},MF=function(e,t){return e==="v"?coe(t):doe(t)},uoe=function(e,t){return e==="h"&&t==="rtl"?-1:1},BF=function(e,t,r,n,o){var i=uoe(e,window.getComputedStyle(t).direction),a=i*n,s=r.target,l=t.contains(s),c=!1,d=a>0,u=0,f=0;do{if(!s)break;var m=MF(e,s),p=m[0],g=m[1],b=m[2],v=g-b-i*p;(p||v)&&LF(e,s)&&(u+=v,f+=p);var x=s.parentNode;s=x&&x.nodeType===Node.DOCUMENT_FRAGMENT_NODE?x.host:x}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(d&&(o&&Math.abs(u)<1||!o&&a>u)||!d&&(o&&Math.abs(f)<1||!o&&-a>f))&&(c=!0),c};var xy=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},jF=function(e){return[e.deltaX,e.deltaY]},UF=function(e){return e&&"current"in e?e.current:e},foe=function(e,t){return e[0]===t[0]&&e[1]===t[1]},moe=function(e){return`
|
|
46
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
47
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
48
|
+
`)},poe=0,vf=[];function VF(e){var t=Wt.useRef([]),r=Wt.useRef([0,0]),n=Wt.useRef(),o=Wt.useState(poe++)[0],i=Wt.useState(Oh)[0],a=Wt.useRef(e);Wt.useEffect(function(){a.current=e},[e]),Wt.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var g=pF([e.lockRef.current],(e.shards||[]).map(UF),!0).filter(Boolean);return g.forEach(function(b){return b.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),g.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=Wt.useCallback(function(g,b){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!a.current.allowPinchZoom;var v=xy(g),x=r.current,_="deltaX"in g?g.deltaX:x[0]-v[0],I="deltaY"in g?g.deltaY:x[1]-v[1],S,w=g.target,P=Math.abs(_)>Math.abs(I)?"h":"v";if("touches"in g&&P==="h"&&w.type==="range")return!1;var $=window.getSelection(),B=$&&$.anchorNode,W=B?B===w||B.contains(w):!1;if(W)return!1;var H=S2(P,w);if(!H)return!0;if(H?S=P:(S=P==="v"?"h":"v",H=S2(P,w)),!H)return!1;if(!n.current&&"changedTouches"in g&&(_||I)&&(n.current=S),!S)return!0;var K=n.current||S;return BF(K,b,g,K==="h"?_:I,!0)},[]),l=Wt.useCallback(function(g){var b=g;if(!(!vf.length||vf[vf.length-1]!==i)){var v="deltaY"in b?jF(b):xy(b),x=t.current.filter(function(S){return S.name===b.type&&(S.target===b.target||b.target===S.shadowParent)&&foe(S.delta,v)})[0];if(x&&x.should){b.cancelable&&b.preventDefault();return}if(!x){var _=(a.current.shards||[]).map(UF).filter(Boolean).filter(function(S){return S.contains(b.target)}),I=_.length>0?s(b,_[0]):!a.current.noIsolation;I&&b.cancelable&&b.preventDefault()}}},[]),c=Wt.useCallback(function(g,b,v,x){var _={name:g,delta:b,target:v,should:x,shadowParent:hoe(v)};t.current.push(_),setTimeout(function(){t.current=t.current.filter(function(I){return I!==_})},1)},[]),d=Wt.useCallback(function(g){r.current=xy(g),n.current=void 0},[]),u=Wt.useCallback(function(g){c(g.type,jF(g),g.target,s(g,e.lockRef.current))},[]),f=Wt.useCallback(function(g){c(g.type,xy(g),g.target,s(g,e.lockRef.current))},[]);Wt.useEffect(function(){return vf.push(i),e.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:f}),document.addEventListener("wheel",l,dd),document.addEventListener("touchmove",l,dd),document.addEventListener("touchstart",d,dd),function(){vf=vf.filter(function(g){return g!==i}),document.removeEventListener("wheel",l,dd),document.removeEventListener("touchmove",l,dd),document.removeEventListener("touchstart",d,dd)}},[]);var m=e.removeScrollBar,p=e.inert;return Wt.createElement(Wt.Fragment,null,p?Wt.createElement(i,{styles:moe(o)}):null,m?Wt.createElement(I2,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function hoe(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var HF=g2(vy,VF);var WF=by.forwardRef(function(e,t){return by.createElement(Ah,gn({},e,{ref:t,sideCar:HF}))});WF.classNames=Ah.classNames;var Ui=WF;function pt(e){return Object.keys(e)}function k2(e){return e&&typeof e=="object"&&!Array.isArray(e)}function Nh(e,t){let r={...e},n=t;return k2(e)&&k2(t)&&Object.keys(t).forEach(o=>{k2(n[o])&&o in e?r[o]=Nh(r[o],n[o]):r[o]=n[o]}),r}function ZF(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function goe(e){return typeof e!="string"||!e.includes("var(--mantine-scale)")?e:e.match(/^calc\((.*?)\)$/)?.[1].split("*")[0].trim()}function Dl(e){let t=goe(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 C2(e){return e==="0rem"?"0rem":`calc(${e} * var(--mantine-scale))`}function GF(e,{shouldScale:t=!1}={}){function r(n){if(n===0||n==="0")return`0${e}`;if(typeof n=="number"){let o=`${n/16}${e}`;return t?C2(o):o}if(typeof n=="string"){if(n===""||n.startsWith("calc(")||n.startsWith("clamp(")||n.includes("rgba("))return n;if(n.includes(","))return n.split(",").map(i=>r(i)).join(",");if(n.includes(" "))return n.split(" ").map(i=>r(i)).join(" ");if(n.includes(e))return t?C2(n):n;let o=n.replace("px","");if(!Number.isNaN(Number(o))){let i=`${Number(o)/16}${e}`;return t?C2(i):i}}return n}return r}var Z=GF("rem",{shouldScale:!0}),ud=GF("em");function _s(e){return Object.keys(e).reduce((t,r)=>(e[r]!==void 0&&(t[r]=e[r]),t),{})}function yy(e){if(typeof e=="number")return!0;if(typeof e=="string"){if(e.startsWith("calc(")||e.startsWith("var(")||e.includes(" ")&&e.trim()!=="")return!0;let 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(n=>t.test(n))}return!1}var KF=y(D(),1);function ko(e){return Array.isArray(e)||e===null?!1:typeof e=="object"?e.type!==KF.Fragment:!1}var YF=y(O(),1),Iy=y(D(),1);function Zt(e){let t=(0,Iy.createContext)(null);return[({children:o,value:i})=>(0,YF.jsx)(t.Provider,{value:i,children:o}),()=>{let o=(0,Iy.useContext)(t);if(o===null)throw new Error(e);return o}]}var JF=y(O(),1),wy=y(D(),1);function Co(e=null){let t=(0,wy.createContext)(e);return[({children:o,value:i})=>(0,JF.jsx)(t.Provider,{value:i,children:o}),()=>(0,wy.useContext)(t)]}function xf(e,t){let r=e;for(;(r=r.parentElement)&&!r.matches(t););return r}function woe(e,t,r){for(let n=e-1;n>=0;n-=1)if(!t[n].disabled)return n;if(r){for(let n=t.length-1;n>-1;n-=1)if(!t[n].disabled)return n}return e}function Soe(e,t,r){for(let n=e+1;n<t.length;n+=1)if(!t[n].disabled)return n;if(r){for(let n=0;n<t.length;n+=1)if(!t[n].disabled)return n}return e}function koe(e,t,r){return xf(e,r)===xf(t,r)}function eL({parentSelector:e,siblingSelector:t,onKeyDown:r,loop:n=!0,activateOnFocus:o=!1,dir:i="rtl",orientation:a}){return s=>{r?.(s);let l=Array.from(xf(s.currentTarget,e)?.querySelectorAll(t)||[]).filter(p=>koe(s.currentTarget,p,e)),c=l.findIndex(p=>s.currentTarget===p),d=Soe(c,l,n),u=woe(c,l,n),f=i==="rtl"?u:d,m=i==="rtl"?d:u;switch(s.key){case"ArrowRight":{a==="horizontal"&&(s.stopPropagation(),s.preventDefault(),l[f].focus(),o&&l[f].click());break}case"ArrowLeft":{a==="horizontal"&&(s.stopPropagation(),s.preventDefault(),l[m].focus(),o&&l[m].click());break}case"ArrowUp":{a==="vertical"&&(s.stopPropagation(),s.preventDefault(),l[u].focus(),o&&l[u].click());break}case"ArrowDown":{a==="vertical"&&(s.stopPropagation(),s.preventDefault(),l[d].focus(),o&&l[d].click());break}case"Home":{s.stopPropagation(),s.preventDefault(),!l[0].disabled&&l[0].focus();break}case"End":{s.stopPropagation(),s.preventDefault();let p=l.length-1;!l[p].disabled&&l[p].focus();break}}}}var Coe={app:100,modal:200,popover:300,overlay:400,max:9999};function Rt(e){return Coe[e]}var fd=()=>{};function tL(e,t={active:!0}){return typeof e!="function"||!t.active?t.onKeyDown||fd:r=>{r.key==="Escape"&&(e(r),t.onTrigger?.())}}function xe(e,t="size",r=!0){if(e!==void 0)return yy(e)?r?Z(e):e:`var(--${t}-${e})`}function At(e){return xe(e,"mantine-spacing")}function Ee(e){return e===void 0?"var(--mantine-radius-default)":xe(e,"mantine-radius")}function kt(e){return xe(e,"mantine-font-size")}function rL(e){return xe(e,"mantine-line-height",!1)}function bf(e){if(e)return xe(e,"mantine-shadow",!1)}function Ln(e,t){return r=>{e?.(r),t?.(r)}}function yf(e,t){return e in t?Dl(t[e]):Dl(e)}function Fh(e,t){let r=e.map(n=>({value:n,px:yf(n,t)}));return r.sort((n,o)=>n.px-o.px),r}function md(e){return typeof e=="object"&&e!==null?"base"in e?e.base:void 0:e}function oL(e,t,r){return r?Array.from(xf(r,t)?.querySelectorAll(e)||[]).findIndex(n=>n===r):null}var nL=y(D(),1);function iL(){let[e,t]=(0,nL.useState)(-1);return[e,{setHovered:t,resetHovered:()=>t(-1)}]}function Rl(e,t,r){return t===void 0&&r===void 0?e:t!==void 0&&r===void 0?Math.max(e,t):Math.min(t===void 0&&r!==void 0?e:Math.max(e,t),r)}function Po(e="mantine-"){return`${e}${Math.random().toString(36).slice(2,11)}`}function aL(e,t){if(e===t||Number.isNaN(e)&&Number.isNaN(t))return!0;if(!(e instanceof Object)||!(t instanceof Object))return!1;let r=Object.keys(e),{length:n}=r;if(n!==Object.keys(t).length)return!1;for(let o=0;o<n;o+=1){let i=r[o];if(!(i in t)||e[i]!==t[i]&&!(Number.isNaN(e[i])&&Number.isNaN(t[i])))return!1}return!0}var _f=y(D(),1);function Vi(e){let t=(0,_f.useRef)(e);return(0,_f.useEffect)(()=>{t.current=e}),(0,_f.useMemo)(()=>(...r)=>t.current?.(...r),[])}var pd=y(D(),1);function Is(e,t){let r=typeof t=="number"?t:t.delay,n=typeof t=="number"?!1:t.flushOnUnmount,o=Vi(e),i=(0,pd.useRef)(0),a=(0,pd.useRef)(()=>{}),s=Object.assign((0,pd.useCallback)((...l)=>{window.clearTimeout(i.current);let c=()=>{i.current!==0&&(i.current=0,o(...l))};a.current=c,s.flush=c,i.current=window.setTimeout(c,r)},[o,r]),{flush:a.current});return(0,pd.useEffect)(()=>()=>{window.clearTimeout(i.current),n&&s.flush()},[s,n]),s}var Sy=y(D(),1),sL=["mousedown","touchstart"];function P2(e,t,r){let n=(0,Sy.useRef)(null);return(0,Sy.useEffect)(()=>{let o=i=>{let{target:a}=i??{};if(Array.isArray(r)){let s=a?.hasAttribute("data-ignore-outside-clicks")||!document.body.contains(a)&&a.tagName!=="HTML";r.every(c=>!!c&&!i.composedPath().includes(c))&&!s&&e()}else n.current&&!n.current.contains(a)&&e()};return(t||sL).forEach(i=>document.addEventListener(i,o)),()=>{(t||sL).forEach(i=>document.removeEventListener(i,o))}},[n,e,r]),n}var If=y(D(),1);function Poe(e,t){try{return e.addEventListener("change",t),()=>e.removeEventListener("change",t)}catch{return e.addListener(t),()=>e.removeListener(t)}}function Doe(e,t){return typeof window<"u"&&"matchMedia"in window?window.matchMedia(e).matches:!1}function hd(e,t,{getInitialValueInEffect:r}={getInitialValueInEffect:!0}){let[n,o]=(0,If.useState)(r?t:Doe(e)),i=(0,If.useRef)(null);return(0,If.useEffect)(()=>{if("matchMedia"in window)return i.current=window.matchMedia(e),o(i.current.matches),Poe(i.current,a=>o(a.matches))},[e]),n}function Lh(e,t){return hd("(prefers-color-scheme: dark)",e==="dark",t)?"dark":"light"}var ky=y(D(),1),Uo=typeof document<"u"?ky.useLayoutEffect:ky.useEffect;var lL=y(D(),1);var Mh=y(D(),1);function _r(e,t){let r=(0,Mh.useRef)(!1);(0,Mh.useEffect)(()=>()=>{r.current=!1},[]),(0,Mh.useEffect)(()=>{if(r.current)return e();r.current=!0},t)}function Bh({opened:e,shouldReturnFocus:t=!0}){let r=(0,lL.useRef)(null),n=()=>{r.current&&"focus"in r.current&&typeof r.current.focus=="function"&&r.current?.focus({preventScroll:!0})};return _r(()=>{let o=-1,i=a=>{a.key==="Tab"&&window.clearTimeout(o)};return document.addEventListener("keydown",i),e?r.current=document.activeElement:t&&(o=window.setTimeout(n,10)),()=>{window.clearTimeout(o),document.removeEventListener("keydown",i)}},[e,t]),n}var wf=y(D(),1);var Roe=/input|select|textarea|button|object/,D2="a, input, select, textarea, button, object, [tabindex]";function Toe(e){return e.style.display==="none"}function Eoe(e){if(e.getAttribute("aria-hidden")||e.getAttribute("hidden")||e.getAttribute("type")==="hidden")return!1;let r=e;for(;r&&!(r===document.body||r.nodeType===11);){if(Toe(r))return!1;r=r.parentNode}return!0}function cL(e){let t=e.getAttribute("tabindex");return t===null&&(t=void 0),parseInt(t,10)}function Cy(e){let t=e.nodeName.toLowerCase(),r=!Number.isNaN(cL(e));return(Roe.test(t)&&!e.disabled||e instanceof HTMLAnchorElement&&e.href||r)&&Eoe(e)}function R2(e){let t=cL(e);return(Number.isNaN(t)||t>=0)&&Cy(e)}function dL(e){return Array.from(e.querySelectorAll(D2)).filter(R2)}function uL(e,t){let r=dL(e);if(!r.length){t.preventDefault();return}let n=r[t.shiftKey?0:r.length-1],o=e.getRootNode(),i=n===o.activeElement||e===o.activeElement,a=o.activeElement;if(a.tagName==="INPUT"&&a.getAttribute("type")==="radio"&&(i=r.filter(d=>d.getAttribute("type")==="radio"&&d.getAttribute("name")===a.getAttribute("name")).includes(n)),!i)return;t.preventDefault();let l=r[t.shiftKey?r.length-1:0];l&&l.focus()}function T2(e=!0){let t=(0,wf.useRef)(null),r=o=>{let i=o.querySelector("[data-autofocus]");if(!i){let a=Array.from(o.querySelectorAll(D2));i=a.find(R2)||a.find(Cy)||null,!i&&Cy(o)&&(i=o)}i&&i.focus({preventScroll:!0})},n=(0,wf.useCallback)(o=>{e&&o!==null&&t.current!==o&&(o?(setTimeout(()=>{o.getRootNode()&&r(o)}),t.current=o):t.current=null)},[e]);return(0,wf.useEffect)(()=>{if(!e)return;t.current&&setTimeout(()=>r(t.current));let o=i=>{i.key==="Tab"&&t.current&&uL(t.current,i)};return document.addEventListener("keydown",o),()=>document.removeEventListener("keydown",o)},[e]),n}var fL=y(D(),1),$oe=e=>(e+1)%1e6;function E2(){let[,e]=(0,fL.useReducer)($oe,0);return e}var hL=y(D(),1);var mL=y(D(),1),Aoe=mL.default.useId||(()=>{});function pL(){let e=Aoe();return e?`mantine-${e.replace(/:/g,"")}`:""}function gt(e){let t=pL(),[r,n]=(0,hL.useState)(t);return Uo(()=>{n(Po())},[]),typeof e=="string"?e:typeof window>"u"?t:r}var ws=y(D(),1);var gL=y(D(),1);function Tl(e,t,r){(0,gL.useEffect)(()=>(window.addEventListener(e,t,r),()=>window.removeEventListener(e,t,r)),[e,t])}function Ooe(e,t="use-local-storage"){try{return JSON.stringify(e)}catch{throw new Error(`@mantine/hooks ${t}: Failed to serialize the value`)}}function vL(e){try{return e&&JSON.parse(e)}catch{return e}}function xL(e){return{getItem:o=>{try{return window[e].getItem(o)}catch{return console.warn("use-local-storage: Failed to get value from storage, localStorage is blocked"),null}},setItem:(o,i)=>{try{window[e].setItem(o,i)}catch{console.warn("use-local-storage: Failed to set value to storage, localStorage is blocked")}},removeItem:o=>{try{window[e].removeItem(o)}catch{console.warn("use-local-storage: Failed to remove value from storage, localStorage is blocked")}}}}function bL(e,t){let r=e==="localStorage"?"mantine-local-storage":"mantine-session-storage",{getItem:n,setItem:o,removeItem:i}=xL(e);return function({key:s,defaultValue:l,getInitialValueInEffect:c=!0,sync:d=!0,deserialize:u=vL,serialize:f=m=>Ooe(m,t)}){let m=(0,ws.useCallback)(x=>{let _;try{_=typeof window>"u"||!(e in window)||window[e]===null||!!x}catch{_=!0}if(_)return l;let I=n(s);return I!==null?u(I):l},[s,l]),[p,g]=(0,ws.useState)(m(c)),b=(0,ws.useCallback)(x=>{x instanceof Function?g(_=>{let I=x(_);return o(s,f(I)),window.dispatchEvent(new CustomEvent(r,{detail:{key:s,value:x(_)}})),I}):(o(s,f(x)),window.dispatchEvent(new CustomEvent(r,{detail:{key:s,value:x}})),g(x))},[s]),v=(0,ws.useCallback)(()=>{i(s),window.dispatchEvent(new CustomEvent(r,{detail:{key:s,value:l}}))},[]);return Tl("storage",x=>{d&&x.storageArea===window[e]&&x.key===s&&g(u(x.newValue??void 0))}),Tl(r,x=>{d&&x.detail.key===s&&g(x.detail.value)}),(0,ws.useEffect)(()=>{l!==void 0&&p===void 0&&b(l)},[l,p,b]),(0,ws.useEffect)(()=>{let x=m();x!==void 0&&b(x)},[s]),[p===void 0?l:p,b,v]}}function yL(e){let{getItem:t}=xL(e);return function({key:n,defaultValue:o,deserialize:i=vL}){let a;try{a=typeof window>"u"||!(e in window)||window[e]===null}catch{a=!0}if(a)return o;let s=t(n);return s!==null?i(s):o}}function $2(e){return bL("localStorage","use-local-storage")(e)}var zoe=yL("localStorage");var _L=y(D(),1);function gd(e,t){if(typeof e=="function")return e(t);typeof e=="object"&&e!==null&&"current"in e&&(e.current=t)}function Py(...e){let t=new Map;return r=>{if(e.forEach(n=>{let o=gd(n,r);o&&t.set(n,o)}),t.size>0)return()=>{e.forEach(n=>{let o=t.get(n);o?o():gd(n,null)}),t.clear()}}}function Ze(...e){return(0,_L.useCallback)(Py(...e),e)}var IL=y(D(),1);function ot({value:e,defaultValue:t,finalValue:r,onChange:n=()=>{}}){let[o,i]=(0,IL.useState)(t!==void 0?t:r),a=(s,...l)=>{i(s),n?.(s,...l)};return e!==void 0?[e,n,!0]:[o,a,!1]}function Ss(e,t){return hd("(prefers-reduced-motion: reduce)",e,t)}var jh=y(D(),1);function Noe(e,t){if(!e||!t)return!1;if(e===t)return!0;if(e.length!==t.length)return!1;for(let r=0;r<e.length;r+=1)if(!aL(e[r],t[r]))return!1;return!0}function Foe(e){let t=(0,jh.useRef)([]),r=(0,jh.useRef)(0);return Noe(t.current,e)||(t.current=e,r.current+=1),[r.current]}function A2(e,t){(0,jh.useEffect)(e,Foe(t))}var SL=y(D(),1);var Loe={" ":"space",ArrowLeft:"arrowleft",ArrowRight:"arrowright",ArrowUp:"arrowup",ArrowDown:"arrowdown",Escape:"esc",Esc:"esc",Enter:"enter",Tab:"tab",Backspace:"backspace",Delete:"delete",Insert:"insert",Home:"home",End:"end",PageUp:"pageup",PageDown:"pagedown","+":"plus","-":"minus","*":"asterisk","/":"slash"};function Dy(e){let t=e.replace("Key","").toLowerCase();return Loe[e]||t}function Moe(e){let t=e.toLowerCase().split("+").map(i=>i.trim()),r={alt:t.includes("alt"),ctrl:t.includes("ctrl"),meta:t.includes("meta"),mod:t.includes("mod"),shift:t.includes("shift"),plus:t.includes("[plus]")},n=["alt","ctrl","meta","shift","mod"],o=t.find(i=>!n.includes(i));return{...r,key:o==="[plus]"?"+":o}}function Boe(e,t,r){let{alt:n,ctrl:o,meta:i,mod:a,shift:s,key:l}=e,{altKey:c,ctrlKey:d,metaKey:u,shiftKey:f,key:m,code:p}=t;if(n!==c)return!1;if(a){if(!d&&!u)return!1}else if(o!==d||i!==u)return!1;return s!==f?!1:!!(l&&(r?Dy(p)===Dy(l):Dy(m??p)===Dy(l)))}function wL(e,t){return r=>Boe(Moe(e),r,t)}function joe(e,t,r=!1){return e.target instanceof HTMLElement?(r||!e.target.isContentEditable)&&!t.includes(e.target.tagName):!0}function Uh(e,t=["INPUT","TEXTAREA","SELECT"],r=!1){(0,SL.useEffect)(()=>{let n=o=>{e.forEach(([i,a,s={preventDefault:!0,usePhysicalKeys:!1}])=>{wL(i,s.usePhysicalKeys)(o)&&joe(o,t,r)&&(s.preventDefault&&o.preventDefault(),a(o))})};return document.documentElement.addEventListener("keydown",n),()=>document.documentElement.removeEventListener("keydown",n)},[e])}var Hi=y(D(),1);function kL(){let e=window.document;return e.fullscreenElement||e.webkitFullscreenElement||e.mozFullScreenElement||e.msFullscreenElement}function Uoe(){let e=window.document;return typeof e.exitFullscreen=="function"?e.exitFullscreen():typeof e.msExitFullscreen=="function"?e.msExitFullscreen():typeof e.webkitExitFullscreen=="function"?e.webkitExitFullscreen():typeof e.mozCancelFullScreen=="function"?e.mozCancelFullScreen():null}function Voe(e){let t=e;return t.requestFullscreen?.()||t.msRequestFullscreen?.()||t.webkitEnterFullscreen?.()||t.webkitRequestFullscreen?.()||t.mozRequestFullscreen?.()}var CL=["","webkit","moz","ms"];function PL(e,{onFullScreen:t,onError:r}){return CL.forEach(n=>{e.addEventListener(`${n}fullscreenchange`,t),e.addEventListener(`${n}fullscreenerror`,r)}),()=>{CL.forEach(n=>{e.removeEventListener(`${n}fullscreenchange`,t),e.removeEventListener(`${n}fullscreenerror`,r)})}}function O2(){let[e,t]=(0,Hi.useState)(!1),r=(0,Hi.useRef)(null),n=(0,Hi.useCallback)(s=>{t(s.target===kL())},[t]),o=(0,Hi.useCallback)(s=>{t(!1),console.error(`[@mantine/hooks] use-fullscreen: Error attempting full-screen mode method: ${s} (${s.target})`)},[t]),i=(0,Hi.useCallback)(async()=>{kL()?await Uoe():await Voe(r.current)},[]),a=(0,Hi.useCallback)(s=>{s===null?r.current=window.document.documentElement:r.current=s},[]);return(0,Hi.useEffect)(()=>{if(!r.current&&window.document)return r.current=window.document.documentElement,PL(r.current,{onFullScreen:n,onError:o});if(r.current)return PL(r.current,{onFullScreen:n,onError:o})},[r.current]),{ref:a,toggle:i,fullscreen:e}}var Sf=y(D(),1);function z2(e=!1,t){let{onOpen:r,onClose:n}=t||{},[o,i]=(0,Sf.useState)(e),a=(0,Sf.useCallback)(()=>{i(c=>c||(r?.(),!0))},[r]),s=(0,Sf.useCallback)(()=>{i(c=>c&&(n?.(),!1))},[n]),l=(0,Sf.useCallback)(()=>{o?s():a()},[s,a,o]);return[o,{open:a,close:s,toggle:l}]}var vd=y(D(),1);function N2(e,t,r={autoInvoke:!1}){let n=(0,vd.useRef)(null),o=(0,vd.useCallback)((...a)=>{n.current||(n.current=window.setTimeout(()=>{e(a),n.current=null},t))},[t]),i=(0,vd.useCallback)(()=>{n.current&&(window.clearTimeout(n.current),n.current=null)},[]);return(0,vd.useEffect)(()=>(r.autoInvoke&&o(),i),[i,o]),{start:o,clear:i}}var Ry=y(D(),1);function F2(e){let t=(0,Ry.useRef)(void 0);return(0,Ry.useEffect)(()=>{t.current=e},[e]),t.current}var Vh=y(D(),1);function L2(e,t,r){let n=(0,Vh.useRef)(null),o=(0,Vh.useRef)(null);return(0,Vh.useEffect)(()=>{let i=typeof r=="function"?r():r;return(i||o.current)&&(n.current=new MutationObserver(e),n.current.observe(i||o.current,t)),()=>{n.current?.disconnect()}},[e,t]),o}var Ty=y(D(),1);function M2(){let[e,t]=(0,Ty.useState)(!1);return(0,Ty.useEffect)(()=>t(!0),[]),e}function Hoe(e,t){window.dispatchEvent(new CustomEvent(e,{detail:t}))}function B2(e){function t(n){let o=Object.keys(n).reduce((i,a)=>(i[`${e}:${a}`]=s=>n[a](s.detail),i),{});Uo(()=>(Object.keys(o).forEach(i=>{window.removeEventListener(i,o[i]),window.addEventListener(i,o[i])}),()=>Object.keys(o).forEach(i=>{window.removeEventListener(i,o[i])})),[o])}function r(n){return(...o)=>Hoe(`${e}:${String(n)}`,o[0])}return[t,r]}function Ey(){return typeof process<"u"&&process.env?"production":"development"}var j2=y(D(),1);function El(e){let t=j2.default.version;return typeof j2.default.version!="string"||t.startsWith("18.")?e?.ref:e?.props?.ref}function DL(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=DL(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Woe(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=DL(e))&&(n&&(n+=" "),n+=t);return n}var qe=Woe;var Zoe={};function Goe(e){let t={};return e.forEach(r=>{Object.entries(r).forEach(([n,o])=>{t[n]?t[n]=qe(t[n],o):t[n]=o})}),t}function Wi({theme:e,classNames:t,props:r,stylesCtx:n}){let i=(Array.isArray(t)?t:[t]).map(a=>typeof a=="function"?a(e,r,n):a||Zoe);return Goe(i)}function _a({theme:e,styles:t,props:r,stylesCtx:n}){return(Array.isArray(t)?t:[t]).reduce((i,a)=>typeof a=="function"?{...i,...a(e,r,n)}:{...i,...a},{})}var Z4e=y(D(),1),G4e=y(O(),1);var $y=y(D(),1),kf=(0,$y.createContext)(null);function Ia(){let e=(0,$y.useContext)(kf);if(!e)throw new Error("[@mantine/core] MantineProvider was not found in tree");return e}function RL(){return Ia().cssVariablesResolver}function TL(){return Ia().classNamesPrefix}function $l(){return Ia().getStyleNonce}function EL(){return Ia().withStaticClasses}function $L(){return Ia().headless}function AL(){return Ia().stylesTransform?.sx}function OL(){return Ia().stylesTransform?.styles}function Ay(){return Ia().env||"default"}var _De=y(D(),1),IDe=y(O(),1);var fDe=y(D(),1),mDe=y(O(),1);function Koe(e){return/^#?([0-9A-F]{3}){1,2}([0-9A-F]{2})?$/i.test(e)}function qoe(e){let t=e.replace("#","");if(t.length===3){let a=t.split("");t=[a[0],a[0],a[1],a[1],a[2],a[2]].join("")}if(t.length===8){let a=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}}let r=parseInt(t,16),n=r>>16&255,o=r>>8&255,i=r&255;return{r:n,g:o,b:i,a:1}}function Xoe(e){let[t,r,n,o]=e.replace(/[^0-9,./]/g,"").split(/[/,]/).map(Number);return{r:t,g:r,b:n,a:o===void 0?1:o}}function Qoe(e){let t=/^hsla?\(\s*(\d+)\s*,\s*(\d+%)\s*,\s*(\d+%)\s*(,\s*(0?\.\d+|\d+(\.\d+)?))?\s*\)$/i,r=e.match(t);if(!r)return{r:0,g:0,b:0,a:1};let n=parseInt(r[1],10),o=parseInt(r[2],10)/100,i=parseInt(r[3],10)/100,a=r[5]?parseFloat(r[5]):void 0,s=(1-Math.abs(2*i-1))*o,l=n/60,c=s*(1-Math.abs(l%2-1)),d=i-s/2,u,f,m;return l>=0&&l<1?(u=s,f=c,m=0):l>=1&&l<2?(u=c,f=s,m=0):l>=2&&l<3?(u=0,f=s,m=c):l>=3&&l<4?(u=0,f=c,m=s):l>=4&&l<5?(u=c,f=0,m=s):(u=s,f=0,m=c),{r:Math.round((u+d)*255),g:Math.round((f+d)*255),b:Math.round((m+d)*255),a:a||1}}function Cf(e){return Koe(e)?qoe(e):e.startsWith("rgb")?Xoe(e):e.startsWith("hsl")?Qoe(e):{r:0,g:0,b:0,a:1}}function Hh(e,t){if(e.startsWith("var("))return`color-mix(in srgb, ${e}, black ${t*100}%)`;let{r,g:n,b:o,a:i}=Cf(e),a=1-t,s=l=>Math.round(l*a);return`rgba(${s(r)}, ${s(n)}, ${s(o)}, ${i})`}function ks(e,t){return typeof e.primaryShade=="number"?e.primaryShade:t==="dark"?e.primaryShade.dark:e.primaryShade.light}function U2(e){return e<=.03928?e/12.92:((e+.055)/1.055)**2.4}function Yoe(e){let t=e.match(/oklch\((.*?)%\s/);return t?parseFloat(t[1]):null}function Joe(e){if(e.startsWith("oklch("))return(Yoe(e)||0)/100;let{r:t,g:r,b:n}=Cf(e),o=t/255,i=r/255,a=n/255,s=U2(o),l=U2(i),c=U2(a);return .2126*s+.7152*l+.0722*c}function Pf(e,t=.179){return e.startsWith("var(")?!1:Joe(e)>t}function Ir({color:e,theme:t,colorScheme:r}){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:r==="dark"?t.white:t.black,shade:void 0,isThemeColor:!1,isLight:Pf(r==="dark"?t.white:t.black,t.luminanceThreshold),variable:"--mantine-color-bright"};if(e==="dimmed")return{color:e,value:r==="dark"?t.colors.dark[2]:t.colors.gray[7],shade:void 0,isThemeColor:!1,isLight:Pf(r==="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:Pf(e==="white"?t.white:t.black,t.luminanceThreshold),variable:`--mantine-color-${e}`};let[n,o]=e.split("."),i=o?Number(o):void 0,a=n in t.colors;if(a){let s=i!==void 0?t.colors[n][i]:t.colors[n][ks(t,r||"light")];return{color:n,value:s,shade:i,isThemeColor:a,isLight:Pf(s,t.luminanceThreshold),variable:o?`--mantine-color-${n}-${i}`:`--mantine-color-${n}-filled`}}return{color:e,value:e,isThemeColor:a,isLight:Pf(e,t.luminanceThreshold),shade:i,variable:void 0}}function Ue(e,t){let r=Ir({color:e||t.primaryColor,theme:t});return r.variable?`var(${r.variable})`:e}function Wh(e,t){let r={from:e?.from||t.defaultGradient.from,to:e?.to||t.defaultGradient.to,deg:e?.deg??t.defaultGradient.deg??0},n=Ue(r.from,t),o=Ue(r.to,t);return`linear-gradient(${r.deg}deg, ${n} 0%, ${o} 100%)`}function ni(e,t){if(typeof e!="string"||t>1||t<0)return"rgba(0, 0, 0, 1)";if(e.startsWith("var(")){let i=(1-t)*100;return`color-mix(in srgb, ${e}, transparent ${i}%)`}if(e.startsWith("oklch"))return e.includes("/")?e.replace(/\/\s*[\d.]+\s*\)/,`/ ${t})`):e.replace(")",` / ${t})`);let{r,g:n,b:o}=Cf(e);return`rgba(${r}, ${n}, ${o}, ${t})`}var xd=ni;var zL=({color:e,theme:t,variant:r,gradient:n,autoContrast:o})=>{let i=Ir({color:e,theme:t}),a=typeof o=="boolean"?o:t.autoContrast;if(r==="filled"){let s=a&&i.isLight?"var(--mantine-color-black)":"var(--mantine-color-white)";return i.isThemeColor?i.shade===void 0?{background:`var(--mantine-color-${e}-filled)`,hover:`var(--mantine-color-${e}-filled-hover)`,color:s,border:`${Z(1)} solid transparent`}:{background:`var(--mantine-color-${i.color}-${i.shade})`,hover:`var(--mantine-color-${i.color}-${i.shade===9?8:i.shade+1})`,color:s,border:`${Z(1)} solid transparent`}:{background:e,hover:Hh(e,.1),color:s,border:`${Z(1)} solid transparent`}}if(r==="light"){if(i.isThemeColor){if(i.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:`${Z(1)} solid transparent`};let s=t.colors[i.color][i.shade];return{background:ni(s,.1),hover:ni(s,.12),color:`var(--mantine-color-${i.color}-${Math.min(i.shade,6)})`,border:`${Z(1)} solid transparent`}}return{background:ni(e,.1),hover:ni(e,.12),color:e,border:`${Z(1)} solid transparent`}}if(r==="outline")return i.isThemeColor?i.shade===void 0?{background:"transparent",hover:`var(--mantine-color-${e}-outline-hover)`,color:`var(--mantine-color-${e}-outline)`,border:`${Z(1)} solid var(--mantine-color-${e}-outline)`}:{background:"transparent",hover:ni(t.colors[i.color][i.shade],.05),color:`var(--mantine-color-${i.color}-${i.shade})`,border:`${Z(1)} solid var(--mantine-color-${i.color}-${i.shade})`}:{background:"transparent",hover:ni(e,.05),color:e,border:`${Z(1)} solid ${e}`};if(r==="subtle"){if(i.isThemeColor){if(i.shade===void 0)return{background:"transparent",hover:`var(--mantine-color-${e}-light-hover)`,color:`var(--mantine-color-${e}-light-color)`,border:`${Z(1)} solid transparent`};let s=t.colors[i.color][i.shade];return{background:"transparent",hover:ni(s,.12),color:`var(--mantine-color-${i.color}-${Math.min(i.shade,6)})`,border:`${Z(1)} solid transparent`}}return{background:"transparent",hover:ni(e,.12),color:e,border:`${Z(1)} solid transparent`}}return r==="transparent"?i.isThemeColor?i.shade===void 0?{background:"transparent",hover:"transparent",color:`var(--mantine-color-${e}-light-color)`,border:`${Z(1)} solid transparent`}:{background:"transparent",hover:"transparent",color:`var(--mantine-color-${i.color}-${Math.min(i.shade,6)})`,border:`${Z(1)} solid transparent`}:{background:"transparent",hover:"transparent",color:e,border:`${Z(1)} solid transparent`}:r==="white"?i.isThemeColor?i.shade===void 0?{background:"var(--mantine-color-white)",hover:Hh(t.white,.01),color:`var(--mantine-color-${e}-filled)`,border:`${Z(1)} solid transparent`}:{background:"var(--mantine-color-white)",hover:Hh(t.white,.01),color:`var(--mantine-color-${i.color}-${i.shade})`,border:`${Z(1)} solid transparent`}:{background:"var(--mantine-color-white)",hover:Hh(t.white,.01),color:e,border:`${Z(1)} solid transparent`}:r==="gradient"?{background:Wh(n,t),hover:Wh(n,t),color:"var(--mantine-color-white)",border:"none"}:r==="default"?{background:"var(--mantine-color-default)",hover:"var(--mantine-color-default-hover)",color:"var(--mantine-color-default-color)",border:`${Z(1)} solid var(--mantine-color-default-border)`}:{}};var NL={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"]};var FL="-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",Zh={scale:1,fontSmoothing:!0,focusRing:"auto",white:"#fff",black:"#000",colors:NL,primaryShade:{light:6,dark:8},primaryColor:"blue",variantColorResolver:zL,autoContrast:!1,luminanceThreshold:.3,fontFamily:FL,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:FL,fontWeight:"700",textWrap:"wrap",sizes:{h1:{fontSize:Z(34),lineHeight:"1.3"},h2:{fontSize:Z(26),lineHeight:"1.35"},h3:{fontSize:Z(22),lineHeight:"1.4"},h4:{fontSize:Z(18),lineHeight:"1.45"},h5:{fontSize:Z(16),lineHeight:"1.5"},h6:{fontSize:Z(14),lineHeight:"1.5"}}},fontSizes:{xs:Z(12),sm:Z(14),md:Z(16),lg:Z(18),xl:Z(20)},lineHeights:{xs:"1.4",sm:"1.45",md:"1.55",lg:"1.6",xl:"1.65"},radius:{xs:Z(2),sm:Z(4),md:Z(8),lg:Z(16),xl:Z(32)},spacing:{xs:Z(10),sm:Z(12),md:Z(16),lg:Z(20),xl:Z(32)},breakpoints:{xs:"36em",sm:"48em",md:"62em",lg:"75em",xl:"88em"},shadows:{xs:`0 ${Z(1)} ${Z(3)} rgba(0, 0, 0, 0.05), 0 ${Z(1)} ${Z(2)} rgba(0, 0, 0, 0.1)`,sm:`0 ${Z(1)} ${Z(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${Z(10)} ${Z(15)} ${Z(-5)}, rgba(0, 0, 0, 0.04) 0 ${Z(7)} ${Z(7)} ${Z(-5)}`,md:`0 ${Z(1)} ${Z(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${Z(20)} ${Z(25)} ${Z(-5)}, rgba(0, 0, 0, 0.04) 0 ${Z(10)} ${Z(10)} ${Z(-5)}`,lg:`0 ${Z(1)} ${Z(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${Z(28)} ${Z(23)} ${Z(-7)}, rgba(0, 0, 0, 0.04) 0 ${Z(12)} ${Z(12)} ${Z(-7)}`,xl:`0 ${Z(1)} ${Z(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${Z(36)} ${Z(28)} ${Z(-7)}, rgba(0, 0, 0, 0.04) 0 ${Z(17)} ${Z(17)} ${Z(-7)}`},other:{},components:{}};var Al=y(O(),1);function V2(e){return e==="auto"||e==="dark"||e==="light"}function LL({key:e="mantine-color-scheme-value"}={}){let t;return{get:r=>{if(typeof window>"u")return r;try{let n=window.localStorage.getItem(e);return V2(n)?n:r}catch{return r}},set:r=>{try{window.localStorage.setItem(e,r)}catch(n){console.warn("[@mantine/core] Local storage color scheme manager was unable to save color scheme.",n)}},subscribe:r=>{t=n=>{n.storageArea===window.localStorage&&n.key===e&&V2(n.newValue)&&r(n.newValue)},window.addEventListener("storage",t)},unsubscribe:()=>{window.removeEventListener("storage",t)},clear:()=>{window.localStorage.removeItem(e)}}}var HL=y(O(),1);var MDe=y(D(),1);var UL=y(O(),1),bd=y(D(),1);var TDe=y(D(),1),EDe=y(O(),1);var ene="[@mantine/core] MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more \u2013 https://mantine.dev/theming/colors/#primary-color",ML="[@mantine/core] MantineProvider: Invalid theme.primaryShade, it accepts only 0-9 integers or an object { light: 0-9, dark: 0-9 }";function H2(e){return e<0||e>9?!1:parseInt(e.toString(),10)===e}function BL(e){if(!(e.primaryColor in e.colors))throw new Error(ene);if(typeof e.primaryShade=="object"&&(!H2(e.primaryShade.dark)||!H2(e.primaryShade.light)))throw new Error(ML);if(typeof e.primaryShade=="number"&&!H2(e.primaryShade))throw new Error(ML)}function jL(e,t){if(!t)return BL(e),e;let r=Nh(e,t);return t.fontFamily&&!t.headings?.fontFamily&&(r.headings.fontFamily=t.fontFamily),BL(r),r}var Oy=(0,bd.createContext)(null),VL=()=>(0,bd.useContext)(Oy)||Zh;function ut(){let e=(0,bd.useContext)(Oy);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 Gh({theme:e,children:t,inherit:r=!0}){let n=VL(),o=(0,bd.useMemo)(()=>jL(r?n:Zh,e),[e,n,r]);return(0,UL.jsx)(Oy.Provider,{value:o,children:t})}Gh.displayName="@mantine/core/MantineThemeProvider";function WL(){let e=ut(),t=$l(),r=pt(e.breakpoints).reduce((n,o)=>{let i=e.breakpoints[o].includes("px"),a=Dl(e.breakpoints[o]),s=i?`${a-.1}px`:ud(a-.1),l=i?`${a}px`:ud(a);return`${n}@media (max-width: ${s}) {.mantine-visible-from-${o} {display: none !important;}}@media (min-width: ${l}) {.mantine-hidden-from-${o} {display: none !important;}}`},"");return(0,HL.jsx)("style",{"data-mantine-styles":"classes",nonce:t?.(),dangerouslySetInnerHTML:{__html:r}})}var XL=y(O(),1);function zy(e){return Object.entries(e).map(([t,r])=>`${t}: ${r};`).join("")}function Df(e,t){return(Array.isArray(e)?e:[e]).reduce((n,o)=>`${o}{${n}}`,t)}function ZL(e,t){let r=zy(e.variables),n=r?Df(t,r):"",o=zy(e.dark),i=zy(e.light),a=o?t===":host"?Df(`${t}([data-mantine-color-scheme="dark"])`,o):Df(`${t}[data-mantine-color-scheme="dark"]`,o):"",s=i?t===":host"?Df(`${t}([data-mantine-color-scheme="light"])`,i):Df(`${t}[data-mantine-color-scheme="light"]`,i):"";return`${n}${a}${s}`}var h4e=y(D(),1),g4e=y(O(),1);var s4e=y(D(),1),l4e=y(O(),1);function Mn({color:e,theme:t,autoContrast:r}){return(typeof r=="boolean"?r:t.autoContrast)&&Ir({color:e||t.primaryColor,theme:t}).isLight?"var(--mantine-color-black)":"var(--mantine-color-white)"}function W2(e,t){return Mn({color:e.colors[e.primaryColor][ks(e,t)],theme:e,autoContrast:null})}var YDe=y(D(),1),JDe=y(O(),1);function Kh({theme:e,color:t,colorScheme:r,name:n=t,withColorValues:o=!0}){if(!e.colors[t])return{};if(r==="light"){let s=ks(e,"light"),l={[`--mantine-color-${n}-text`]:`var(--mantine-color-${n}-filled)`,[`--mantine-color-${n}-filled`]:`var(--mantine-color-${n}-${s})`,[`--mantine-color-${n}-filled-hover`]:`var(--mantine-color-${n}-${s===9?8:s+1})`,[`--mantine-color-${n}-light`]:xd(e.colors[t][s],.1),[`--mantine-color-${n}-light-hover`]:xd(e.colors[t][s],.12),[`--mantine-color-${n}-light-color`]:`var(--mantine-color-${n}-${s})`,[`--mantine-color-${n}-outline`]:`var(--mantine-color-${n}-${s})`,[`--mantine-color-${n}-outline-hover`]:xd(e.colors[t][s],.05)};return o?{[`--mantine-color-${n}-0`]:e.colors[t][0],[`--mantine-color-${n}-1`]:e.colors[t][1],[`--mantine-color-${n}-2`]:e.colors[t][2],[`--mantine-color-${n}-3`]:e.colors[t][3],[`--mantine-color-${n}-4`]:e.colors[t][4],[`--mantine-color-${n}-5`]:e.colors[t][5],[`--mantine-color-${n}-6`]:e.colors[t][6],[`--mantine-color-${n}-7`]:e.colors[t][7],[`--mantine-color-${n}-8`]:e.colors[t][8],[`--mantine-color-${n}-9`]:e.colors[t][9],...l}:l}let i=ks(e,"dark"),a={[`--mantine-color-${n}-text`]:`var(--mantine-color-${n}-4)`,[`--mantine-color-${n}-filled`]:`var(--mantine-color-${n}-${i})`,[`--mantine-color-${n}-filled-hover`]:`var(--mantine-color-${n}-${i===9?8:i+1})`,[`--mantine-color-${n}-light`]:xd(e.colors[t][Math.max(0,i-2)],.15),[`--mantine-color-${n}-light-hover`]:xd(e.colors[t][Math.max(0,i-2)],.2),[`--mantine-color-${n}-light-color`]:`var(--mantine-color-${n}-${Math.max(i-5,0)})`,[`--mantine-color-${n}-outline`]:`var(--mantine-color-${n}-${Math.max(i-4,0)})`,[`--mantine-color-${n}-outline-hover`]:xd(e.colors[t][Math.max(i-4,0)],.05)};return o?{[`--mantine-color-${n}-0`]:e.colors[t][0],[`--mantine-color-${n}-1`]:e.colors[t][1],[`--mantine-color-${n}-2`]:e.colors[t][2],[`--mantine-color-${n}-3`]:e.colors[t][3],[`--mantine-color-${n}-4`]:e.colors[t][4],[`--mantine-color-${n}-5`]:e.colors[t][5],[`--mantine-color-${n}-6`]:e.colors[t][6],[`--mantine-color-${n}-7`]:e.colors[t][7],[`--mantine-color-${n}-8`]:e.colors[t][8],[`--mantine-color-${n}-9`]:e.colors[t][9],...a}:a}var r4e=y(D(),1),o4e=y(O(),1);function GL(e){return!!e&&typeof e=="object"&&"mantine-virtual-color"in e}function Rf(e,t,r){pt(t).forEach(n=>Object.assign(e,{[`--mantine-${r}-${n}`]:t[n]}))}var Ny=e=>{let t=ks(e,"light"),r=e.defaultRadius in e.radius?e.radius[e.defaultRadius]:Z(e.defaultRadius),n={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":r,"--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":W2(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)"},dark:{"--mantine-primary-color-contrast":W2(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)"}};Rf(n.variables,e.breakpoints,"breakpoint"),Rf(n.variables,e.spacing,"spacing"),Rf(n.variables,e.fontSizes,"font-size"),Rf(n.variables,e.lineHeights,"line-height"),Rf(n.variables,e.shadows,"shadow"),Rf(n.variables,e.radius,"radius"),e.colors[e.primaryColor].forEach((i,a)=>{n.variables[`--mantine-primary-color-${a}`]=`var(--mantine-color-${e.primaryColor}-${a})`}),pt(e.colors).forEach(i=>{let a=e.colors[i];if(GL(a)){Object.assign(n.light,Kh({theme:e,name:a.name,color:a.light,colorScheme:"light",withColorValues:!0})),Object.assign(n.dark,Kh({theme:e,name:a.name,color:a.dark,colorScheme:"dark",withColorValues:!0}));return}a.forEach((s,l)=>{n.variables[`--mantine-color-${i}-${l}`]=s}),Object.assign(n.light,Kh({theme:e,color:i,colorScheme:"light",withColorValues:!1})),Object.assign(n.dark,Kh({theme:e,color:i,colorScheme:"dark",withColorValues:!1}))});let o=e.headings.sizes;return pt(o).forEach(i=>{n.variables[`--mantine-${i}-font-size`]=o[i].fontSize,n.variables[`--mantine-${i}-line-height`]=o[i].lineHeight,n.variables[`--mantine-${i}-font-weight`]=o[i].fontWeight||e.headings.fontWeight}),n};function KL({theme:e,generator:t}){let r=Ny(e),n=t?.(e);return n?Nh(r,n):r}var y4e=y(D(),1),_4e=y(O(),1);var Z2=Ny(Zh);function qL(e){let t={variables:{},light:{},dark:{}};return pt(e.variables).forEach(r=>{Z2.variables[r]!==e.variables[r]&&(t.variables[r]=e.variables[r])}),pt(e.light).forEach(r=>{Z2.light[r]!==e.light[r]&&(t.light[r]=e.light[r])}),pt(e.dark).forEach(r=>{Z2.dark[r]!==e.dark[r]&&(t.dark[r]=e.dark[r])}),t}function tne(e){return`
|
|
49
|
+
${e}[data-mantine-color-scheme="dark"] { --mantine-color-scheme: dark; }
|
|
50
|
+
${e}[data-mantine-color-scheme="light"] { --mantine-color-scheme: light; }
|
|
51
|
+
`}function G2({cssVariablesSelector:e,deduplicateCssVariables:t}){let r=ut(),n=$l(),o=RL(),i=KL({theme:r,generator:o}),a=e===":root"&&t,s=a?qL(i):i,l=ZL(s,e);return l?(0,XL.jsx)("style",{"data-mantine-styles":!0,nonce:n?.(),dangerouslySetInnerHTML:{__html:`${l}${a?"":tne(e)}`}}):null}G2.displayName="@mantine/CssVariables";var B4e=y(D(),1);function QL(){let e=console.error;console.error=(...t)=>{t.length>1&&typeof t[0]=="string"&&t[0].toLowerCase().includes("extra attributes from the server")&&typeof t[1]=="string"&&t[1].toLowerCase().includes("data-mantine-color-scheme")||e(...t)}}var wa=y(D(),1);function Tf(e,t){let r=typeof window<"u"&&"matchMedia"in window&&window.matchMedia("(prefers-color-scheme: dark)")?.matches,n=e!=="auto"?e:r?"dark":"light";t()?.setAttribute("data-mantine-color-scheme",n)}function YL({manager:e,defaultColorScheme:t,getRootElement:r,forceColorScheme:n}){let o=(0,wa.useRef)(null),[i,a]=(0,wa.useState)(()=>e.get(t)),s=n||i,l=(0,wa.useCallback)(d=>{n||(Tf(d,r),a(d),e.set(d))},[e.set,s,n]),c=(0,wa.useCallback)(()=>{a(t),Tf(t,r),e.clear()},[e.clear,t]);return(0,wa.useEffect)(()=>(e.subscribe(l),e.unsubscribe),[e.subscribe,e.unsubscribe]),Uo(()=>{Tf(e.get(t),r)},[]),(0,wa.useEffect)(()=>{if(n)return Tf(n,r),()=>{};n===void 0&&Tf(i,r),typeof window<"u"&&"matchMedia"in window&&(o.current=window.matchMedia("(prefers-color-scheme: dark)"));let d=u=>{i==="auto"&&Tf(u.matches?"dark":"light",r)};return o.current?.addEventListener("change",d),()=>o.current?.removeEventListener("change",d)},[i,n]),{colorScheme:s,setColorScheme:l,clearColorScheme:c}}function JL({respectReducedMotion:e,getRootElement:t}){Uo(()=>{e&&t()?.setAttribute("data-respect-reduced-motion","true")},[e])}QL();function Fy({theme:e,children:t,getStyleNonce:r,withStaticClasses:n=!0,withGlobalClasses:o=!0,deduplicateCssVariables:i=!0,withCssVariables:a=!0,cssVariablesSelector:s=":root",classNamesPrefix:l="mantine",colorSchemeManager:c=LL(),defaultColorScheme:d="light",getRootElement:u=()=>document.documentElement,cssVariablesResolver:f,forceColorScheme:m,stylesTransform:p,env:g}){let{colorScheme:b,setColorScheme:v,clearColorScheme:x}=YL({defaultColorScheme:d,forceColorScheme:m,manager:c,getRootElement:u});return JL({respectReducedMotion:e?.respectReducedMotion||!1,getRootElement:u}),(0,Al.jsx)(kf.Provider,{value:{colorScheme:b,setColorScheme:v,clearColorScheme:x,getRootElement:u,classNamesPrefix:l,getStyleNonce:r,cssVariablesResolver:f,cssVariablesSelector:s,withStaticClasses:n,stylesTransform:p,env:g},children:(0,Al.jsxs)(Gh,{theme:e,children:[a&&(0,Al.jsx)(G2,{cssVariablesSelector:s,deduplicateCssVariables:i}),o&&(0,Al.jsx)(WL,{}),t]})})}Fy.displayName="@mantine/core/MantineProvider";function eM({children:e,theme:t}){return(0,Al.jsx)(kf.Provider,{value:{colorScheme:"auto",setColorScheme:()=>{},clearColorScheme:()=>{},getRootElement:()=>document.documentElement,classNamesPrefix:"mantine",cssVariablesSelector:":root",withStaticClasses:!1,headless:!0},children:(0,Al.jsx)(Gh,{theme:t,children:e})})}eM.displayName="@mantine/core/HeadlessMantineProvider";function Zr({classNames:e,styles:t,props:r,stylesCtx:n}){let o=ut();return{resolvedClassNames:Wi({theme:o,classNames:e,props:r,stylesCtx:n||void 0}),resolvedStyles:_a({theme:o,styles:t,props:r,stylesCtx:n||void 0})}}var rne={always:"mantine-focus-always",auto:"mantine-focus-auto",never:"mantine-focus-never"};function tM({theme:e,options:t,unstyled:r}){return qe(t?.focusable&&!r&&(e.focusClassName||rne[e.focusRing]),t?.active&&!r&&e.activeClassName)}var M6e=y(D(),1),B6e=y(O(),1);function rM({selector:e,stylesCtx:t,options:r,props:n,theme:o}){return Wi({theme:o,classNames:r?.classNames,props:r?.props||n,stylesCtx:t})[e]}function K2({selector:e,stylesCtx:t,theme:r,classNames:n,props:o}){return Wi({theme:r,classNames:n,props:o,stylesCtx:t})[e]}function oM({rootSelector:e,selector:t,className:r}){return e===t?r:void 0}function nM({selector:e,classes:t,unstyled:r}){return r?void 0:t[e]}function iM({themeName:e,classNamesPrefix:t,selector:r,withStaticClass:n}){return n===!1?[]:e.map(o=>`${t}-${o}-${r}`)}function aM({themeName:e,theme:t,selector:r,props:n,stylesCtx:o}){return e.map(i=>Wi({theme:t,classNames:t.components[i]?.classNames,props:n,stylesCtx:o})?.[r])}function sM({options:e,classes:t,selector:r,unstyled:n}){return e?.variant&&!n?t[`${r}--${e.variant}`]:void 0}function lM({theme:e,options:t,themeName:r,selector:n,classNamesPrefix:o,classNames:i,classes:a,unstyled:s,className:l,rootSelector:c,props:d,stylesCtx:u,withStaticClasses:f,headless:m,transformedStyles:p}){return qe(tM({theme:e,options:t,unstyled:s||m}),aM({theme:e,themeName:r,selector:n,props:d,stylesCtx:u}),sM({options:t,classes:a,selector:n,unstyled:s}),K2({selector:n,stylesCtx:u,theme:e,classNames:i,props:d}),K2({selector:n,stylesCtx:u,theme:e,classNames:p,props:d}),rM({selector:n,stylesCtx:u,options:t,props:d,theme:e}),oM({rootSelector:c,selector:n,className:l}),nM({selector:n,classes:a,unstyled:s||m}),f&&!m&&iM({themeName:r,classNamesPrefix:o,selector:n,withStaticClass:t?.withStaticClass}),t?.className)}function cM({theme:e,themeName:t,props:r,stylesCtx:n,selector:o}){return t.map(i=>_a({theme:e,styles:e.components[i]?.styles,props:r,stylesCtx:n})[o]).reduce((i,a)=>({...i,...a}),{})}function Ly({style:e,theme:t}){return Array.isArray(e)?[...e].reduce((r,n)=>({...r,...Ly({style:n,theme:t})}),{}):typeof e=="function"?e(t):e??{}}var S6e=y(D(),1),k6e=y(O(),1);function dM(e){return e.reduce((t,r)=>(r&&Object.keys(r).forEach(n=>{t[n]={...t[n],..._s(r[n])}}),t),{})}function uM({vars:e,varsResolver:t,theme:r,props:n,stylesCtx:o,selector:i,themeName:a,headless:s}){return dM([s?{}:t?.(r,n,o),...a.map(l=>r.components?.[l]?.vars?.(r,n,o)),e?.(r,n,o)])?.[i]}function fM({theme:e,themeName:t,selector:r,options:n,props:o,stylesCtx:i,rootSelector:a,styles:s,style:l,vars:c,varsResolver:d,headless:u,withStylesTransform:f}){return{...!f&&cM({theme:e,themeName:t,props:o,stylesCtx:i,selector:r}),...!f&&_a({theme:e,styles:s,props:o,stylesCtx:i})[r],...!f&&_a({theme:e,styles:n?.styles,props:n?.props||o,stylesCtx:i})[r],...uM({theme:e,props:o,stylesCtx:i,vars:c,varsResolver:d,selector:r,themeName:t,headless:u}),...a===r?Ly({style:l,theme:e}):null,...Ly({style:n?.style,theme:e})}}var O6e=y(D(),1),z6e=y(O(),1);function mM({props:e,stylesCtx:t,themeName:r}){let n=ut(),o=OL()?.();return{getTransformedStyles:a=>o?[...a.map(l=>o(l,{props:e,theme:n,ctx:t})),...r.map(l=>o(n.components[l]?.styles,{props:e,theme:n,ctx:t}))].filter(Boolean):[],withStylesTransform:!!o}}function q({name:e,classes:t,props:r,stylesCtx:n,className:o,style:i,rootSelector:a="root",unstyled:s,classNames:l,styles:c,vars:d,varsResolver:u}){let f=ut(),m=TL(),p=EL(),g=$L(),b=(Array.isArray(e)?e:[e]).filter(_=>_),{withStylesTransform:v,getTransformedStyles:x}=mM({props:r,stylesCtx:n,themeName:b});return(_,I)=>({className:lM({theme:f,options:I,themeName:b,selector:_,classNamesPrefix:m,classNames:l,classes:t,unstyled:s,className:o,rootSelector:a,props:r,stylesCtx:n,withStaticClasses:p,headless:g,transformedStyles:x([I?.styles,c])}),style:fM({theme:f,themeName:b,selector:_,options:I,props:r,stylesCtx:n,rootSelector:a,styles:c,style:i,vars:d,varsResolver:u,headless:g,withStylesTransform:v})})}function Sa(e,t){return typeof e=="boolean"?e:t.autoContrast}var ka=y(D(),1);var q6e=y(O(),1);function pM(e){let 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(n=>n.remove())}function yd({keepTransitions:e}={}){let t=(0,ka.useRef)(fd),r=(0,ka.useRef)(-1),n=(0,ka.useContext)(kf),o=$l(),i=(0,ka.useRef)(o?.());if(!n)throw new Error("[@mantine/core] MantineProvider was not found in tree");let a=u=>{n.setColorScheme(u),t.current=e?()=>{}:pM(i.current),window.clearTimeout(r.current),r.current=window.setTimeout(()=>{t.current?.()},10)},s=()=>{n.clearColorScheme(),t.current=e?()=>{}:pM(i.current),window.clearTimeout(r.current),r.current=window.setTimeout(()=>{t.current?.()},10)},l=Lh("light",{getInitialValueInEffect:!1}),c=n.colorScheme==="auto"?l:n.colorScheme,d=(0,ka.useCallback)(()=>a(c==="light"?"dark":"light"),[a,c]);return(0,ka.useEffect)(()=>()=>{t.current?.(),window.clearTimeout(r.current)},[]),{colorScheme:n.colorScheme,setColorScheme:a,clearColorScheme:s,toggleColorScheme:d}}function _d(e,t={getInitialValueInEffect:!0}){let r=Lh(e,t),{colorScheme:n}=yd();return n==="auto"?r:n}var oRe=y(D(),1),nRe=y(O(),1);function z(e,t,r){let n=ut(),o=n.components[e]?.defaultProps,i=typeof o=="function"?o(n):o;return{...t,...i,..._s(r)}}var gM=y(O(),1),pRe=y(D(),1);var cRe=y(D(),1),dRe=y(O(),1);function My(e){return pt(e).reduce((t,r)=>e[r]!==void 0?`${t}${ZF(r)}:${e[r]};`:t,"").trim()}function hM({selector:e,styles:t,media:r,container:n}){let o=t?My(t):"",i=Array.isArray(r)?r.map(s=>`@media${s.query}{${e}{${My(s.styles)}}}`):[],a=Array.isArray(n)?n.map(s=>`@container ${s.query}{${e}{${My(s.styles)}}}`):[];return`${o?`${e}{${o}}`:""}${i.join("")}${a.join("")}`.trim()}function Id(e){let t=$l();return(0,gM.jsx)("style",{"data-mantine-styles":"inline",nonce:t?.(),dangerouslySetInnerHTML:{__html:hM(e)}})}var bRe=y(D(),1),yRe=y(O(),1);function Gr(e){let{m:t,mx:r,my:n,mt:o,mb:i,ml:a,mr:s,me:l,ms:c,p:d,px:u,py:f,pt:m,pb:p,pl:g,pr:b,pe:v,ps:x,bd:_,bg:I,c:S,opacity:w,ff:P,fz:$,fw:B,lts:W,ta:H,lh:K,fs:T,tt:k,td:E,w:C,miw:A,maw:R,h:N,mih:U,mah:G,bgsz:re,bgp:ve,bgr:he,bga:Q,pos:ne,top:we,left:se,bottom:Ae,right:We,inset:et,display:ct,flex:Ne,hiddenFrom:Yt,visibleFrom:Jt,lightHidden:co,darkHidden:ge,sx:me,...ke}=e;return{styleProps:_s({m:t,mx:r,my:n,mt:o,mb:i,ml:a,mr:s,me:l,ms:c,p:d,px:u,py:f,pt:m,pb:p,pl:g,pr:b,pe:v,ps:x,bd:_,bg:I,c:S,opacity:w,ff:P,fz:$,fw:B,lts:W,ta:H,lh:K,fs:T,tt:k,td:E,w:C,miw:A,maw:R,h:N,mih:U,mah:G,bgsz:re,bgp:ve,bgr:he,bga:Q,pos:ne,top:we,left:se,bottom:Ae,right:We,inset:et,display:ct,flex:Ne,hiddenFrom:Yt,visibleFrom:Jt,lightHidden:co,darkHidden:ge,sx:me}),rest:ke}}var vM={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"}};var nTe=y(D(),1),iTe=y(O(),1);var DRe=y(D(),1),RRe=y(O(),1);var SRe=y(D(),1),kRe=y(O(),1);function qh(e,t){let r=Ir({color:e,theme:t});return r.color==="dimmed"?"var(--mantine-color-dimmed)":r.color==="bright"?"var(--mantine-color-bright)":r.variable?`var(${r.variable})`:r.color}function xM(e,t){let r=Ir({color:e,theme:t});return r.isThemeColor&&r.shade===void 0?`var(--mantine-color-${r.color}-text)`:qh(e,t)}function bM(e,t){if(typeof e=="number")return Z(e);if(typeof e=="string"){let[r,n,...o]=e.split(" ").filter(a=>a.trim()!==""),i=`${Z(r)}`;return n&&(i+=` ${n}`),o.length>0&&(i+=` ${qh(o.join(" "),t)}`),i.trim()}return e}var yM={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 _M(e){return typeof e=="string"&&e in yM?yM[e]:e}var ORe=y(D(),1),zRe=y(O(),1);var one=["h1","h2","h3","h4","h5","h6"];function IM(e,t){return typeof e=="string"&&e in t.fontSizes?`var(--mantine-font-size-${e})`:typeof e=="string"&&one.includes(e)?`var(--mantine-${e}-font-size)`:typeof e=="number"?Z(e):typeof e=="string"?Z(e):e}function wM(e){return e}var nne=["h1","h2","h3","h4","h5","h6"];function SM(e,t){return typeof e=="string"&&e in t.lineHeights?`var(--mantine-line-height-${e})`:typeof e=="string"&&nne.includes(e)?`var(--mantine-${e}-line-height)`:e}var BRe=y(D(),1),jRe=y(O(),1);function kM(e){return typeof e=="number"?Z(e):e}var HRe=y(D(),1),WRe=y(O(),1);function CM(e,t){if(typeof e=="number")return Z(e);if(typeof e=="string"){let r=e.replace("-","");if(!(r in t.spacing))return Z(e);let n=`--mantine-spacing-${r}`;return e.startsWith("-")?`calc(var(${n}) * -1)`:`var(${n})`}return e}var By={color:qh,textColor:xM,fontSize:IM,spacing:CM,identity:wM,size:kM,lineHeight:SM,fontFamily:_M,border:bM};function PM(e){return e.replace("(min-width: ","").replace("em)","")}function DM({media:e,...t}){let n=Object.keys(e).sort((o,i)=>Number(PM(o))-Number(PM(i))).map(o=>({query:o,styles:e[o]}));return{...t,media:n}}function ine(e){if(typeof e!="object"||e===null)return!1;let t=Object.keys(e);return!(t.length===1&&t[0]==="base")}function ane(e){return typeof e=="object"&&e!==null?"base"in e?e.base:void 0:e}function sne(e){return typeof e=="object"&&e!==null?pt(e).filter(t=>t!=="base"):[]}function lne(e,t){return typeof e=="object"&&e!==null&&t in e?e[t]:e}function RM({styleProps:e,data:t,theme:r}){return DM(pt(e).reduce((n,o)=>{if(o==="hiddenFrom"||o==="visibleFrom"||o==="sx")return n;let i=t[o],a=Array.isArray(i.property)?i.property:[i.property],s=ane(e[o]);if(!ine(e[o]))return a.forEach(c=>{n.inlineStyles[c]=By[i.type](s,r)}),n;n.hasResponsiveStyles=!0;let l=sne(e[o]);return a.forEach(c=>{s&&(n.styles[c]=By[i.type](s,r)),l.forEach(d=>{let u=`(min-width: ${r.breakpoints[d]})`;n.media[u]={...n.media[u],[c]:By[i.type](lne(e[o],d),r)}})}),n},{hasResponsiveStyles:!1,styles:{},inlineStyles:{},media:{}}))}var TM=y(D(),1);function jy(){return`__m__-${(0,TM.useId)().replace(/:/g,"")}`}function Xh(e,t){return Array.isArray(e)?[...e].reduce((r,n)=>({...r,...Xh(n,t)}),{}):typeof e=="function"?e(t):e??{}}var wd=y(O(),1),AM=y(D(),1);function EM(e){return e.startsWith("data-")?e:`data-${e}`}function cne(e){return Object.keys(e).reduce((t,r)=>{let n=e[r];return n===void 0||n===""||n===!1||n===null||(t[EM(r)]=e[r]),t},{})}function q2(e){return e?typeof e=="string"?{[EM(e)]:!0}:Array.isArray(e)?[...e].reduce((t,r)=>({...t,...q2(r)}),{}):cne(e):null}function X2(e,t){return Array.isArray(e)?[...e].reduce((r,n)=>({...r,...X2(n,t)}),{}):typeof e=="function"?e(t):e??{}}function $M({theme:e,style:t,vars:r,styleProps:n}){let o=X2(t,e),i=X2(r,e);return{...o,...i,...n}}var OM=(0,AM.forwardRef)(({component:e,style:t,__vars:r,className:n,variant:o,mod:i,size:a,hiddenFrom:s,visibleFrom:l,lightHidden:c,darkHidden:d,renderRoot:u,__size:f,...m},p)=>{let g=ut(),b=e||"div",{styleProps:v,rest:x}=Gr(m),I=AL()?.()?.(v.sx),S=jy(),w=RM({styleProps:v,theme:g,data:vM}),P={ref:p,style:$M({theme:g,style:t,vars:r,styleProps:w.inlineStyles}),className:qe(n,I,{[S]:w.hasResponsiveStyles,"mantine-light-hidden":c,"mantine-dark-hidden":d,[`mantine-hidden-from-${s}`]:s,[`mantine-visible-from-${l}`]:l}),"data-variant":o,"data-size":yy(a)?void 0:a||void 0,size:f,...q2(i),...x};return(0,wd.jsxs)(wd.Fragment,{children:[w.hasResponsiveStyles&&(0,wd.jsx)(Id,{selector:`.${S}`,styles:w.styles,media:w.media}),typeof u=="function"?u(P):(0,wd.jsx)(b,{...P})]})});OM.displayName="@mantine/core/Box";var F=OM;var Q2=y(O(),1),Uy=y(D(),1);function Y2(e){return e}function J2(e){let t=e;return r=>{let n=(0,Uy.forwardRef)((o,i)=>(0,Q2.jsx)(t,{...r,...o,ref:i}));return n.extend=t.extend,n.displayName=`WithProps(${t.displayName})`,n}}function M(e){let t=(0,Uy.forwardRef)(e);return t.extend=Y2,t.withProps=r=>{let n=(0,Uy.forwardRef)((o,i)=>(0,Q2.jsx)(t,{...r,...o,ref:i}));return n.extend=t.extend,n.displayName=`WithProps(${t.displayName})`,n},t}var zM=y(O(),1),eP=y(D(),1);function nt(e){let t=(0,eP.forwardRef)(e);return t.withProps=r=>{let n=(0,eP.forwardRef)((o,i)=>(0,zM.jsx)(t,{...r,...o,ref:i}));return n.extend=t.extend,n.displayName=`WithProps(${t.displayName})`,n},t.extend=Y2,t}var dne=y(O(),1),Qh=y(D(),1);var une=(0,Qh.createContext)({dir:"ltr",toggleDirection:()=>{},setDirection:()=>{}});function ii(){return(0,Qh.useContext)(une)}var h4=y(O(),1);var NTe=y(D(),1);var am=y(D(),1),e9=y(tc(),1);function pae(e){if(!e||typeof e=="string")return 0;let t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function p4(e){return e?.current?e.current.scrollHeight:"auto"}var Vg=typeof window<"u"&&window.requestAnimationFrame;function t9({transitionDuration:e,transitionTimingFunction:t="ease",onTransitionEnd:r=()=>{},opened:n}){let o=(0,am.useRef)(null),i=0,a={height:0,overflow:"hidden"},[s,l]=(0,am.useState)(n?{}:a),c=p=>{(0,e9.flushSync)(()=>l(p))},d=p=>{c(g=>({...g,...p}))};function u(p){let g=e||pae(p);return{transition:`height ${g}ms ${t}, opacity ${g}ms ${t}`}}_r(()=>{typeof Vg=="function"&&Vg(n?()=>{d({willChange:"height",display:"block",overflow:"hidden"}),Vg(()=>{let p=p4(o);d({...u(p),height:p})})}:()=>{let p=p4(o);d({...u(p),willChange:"height",height:p}),Vg(()=>d({height:i,overflow:"hidden"}))})},[n]);let f=p=>{if(!(p.target!==o.current||p.propertyName!=="height"))if(n){let g=p4(o);g===s.height?c({}):d({height:g}),r()}else s.height===i&&(c(a),r())};function m({style:p={},refKey:g="ref",...b}={}){let v=b[g],x={"aria-hidden":!n,...b,[g]:Py(o,v),onTransitionEnd:f,style:{boxSizing:"border-box",...p,...s}};return am.default.version.startsWith("18")?n||(x.inert=""):x.inert=!n,x}return m}var hae={transitionDuration:200,transitionTimingFunction:"ease",animateOpacity:!0},sm=M((e,t)=>{let{children:r,in:n,transitionDuration:o,transitionTimingFunction:i,style:a,onTransitionEnd:s,animateOpacity:l,...c}=z("Collapse",hae,e),d=ut(),u=Ss(),m=(d.respectReducedMotion?u:!1)?0:o,p=t9({opened:n,transitionDuration:m,transitionTimingFunction:i,onTransitionEnd:s});return m===0?n?(0,h4.jsx)(F,{...c,children:r}):null:(0,h4.jsx)(F,{...p({style:{opacity:n||!l?1:0,transition:l?`opacity ${m}ms ${i}`:"none",...Xh(a,d)},ref:t,...c}),children:r})});sm.displayName="@mantine/core/Collapse";var hi=y(O(),1),lc=y(D(),1);var de=y(D(),1),fm=y(D(),1);function cI(){return typeof window<"u"}function rc(e){return r9(e)?(e.nodeName||"").toLowerCase():"#document"}function po(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Aa(e){var t;return(t=(r9(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function r9(e){return cI()?e instanceof Node||e instanceof po(e).Node:!1}function Lt(e){return cI()?e instanceof Element||e instanceof po(e).Element:!1}function In(e){return cI()?e instanceof HTMLElement||e instanceof po(e).HTMLElement:!1}function lI(e){return!cI()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof po(e).ShadowRoot}function Hg(e){let{overflow:t,overflowX:r,overflowY:n,display:o}=Zn(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&o!=="inline"&&o!=="contents"}function o9(e){return/^(table|td|th)$/.test(rc(e))}function Wg(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var gae=/transform|translate|scale|rotate|perspective|filter/,vae=/paint|layout|strict|content/,Md=e=>!!e&&e!=="none",g4;function dI(e){let t=Lt(e)?Zn(e):e;return Md(t.transform)||Md(t.translate)||Md(t.scale)||Md(t.rotate)||Md(t.perspective)||!lm()&&(Md(t.backdropFilter)||Md(t.filter))||gae.test(t.willChange||"")||vae.test(t.contain||"")}function n9(e){let t=$a(e);for(;In(t)&&!Ns(t);){if(dI(t))return t;if(Wg(t))return null;t=$a(t)}return null}function lm(){return g4==null&&(g4=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),g4}function Ns(e){return/^(html|body|#document)$/.test(rc(e))}function Zn(e){return po(e).getComputedStyle(e)}function Zg(e){return Lt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function $a(e){if(rc(e)==="html")return e;let t=e.assignedSlot||e.parentNode||lI(e)&&e.host||Aa(e);return lI(t)?t.host:t}function i9(e){let t=$a(e);return Ns(t)?(e.ownerDocument||e).body:In(t)&&Hg(t)?t:i9(t)}function Zo(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);let o=i9(e),i=o===((n=e.ownerDocument)==null?void 0:n.body),a=po(o);if(i){let s=uI(a);return t.concat(a,a.visualViewport||[],Hg(o)?o:[],s&&r?Zo(s):[])}else return t.concat(o,Zo(o,[],r))}function uI(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function v4(e){let t=e.activeElement;for(;((r=t)==null||(r=r.shadowRoot)==null?void 0:r.activeElement)!=null;){var r;t=t.shadowRoot.activeElement}return t}function cm(e,t){if(!e||!t)return!1;let r=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(r&&lI(r)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function x4(){let e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function b4(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:r,version:n}=t;return r+"/"+n}).join(" "):navigator.userAgent}function s9(e){return xae()?!1:!a9()&&e.width===0&&e.height===0||a9()&&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 l9(){return/apple/i.test(navigator.vendor)}function a9(){let e=/android/i;return e.test(x4())||e.test(b4())}function c9(){return x4().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function xae(){return b4().includes("jsdom/")}function fI(e,t){let r=["mouse","pen"];return t||r.push("",void 0),r.includes(e)}function d9(e){return"nativeEvent"in e}function u9(e){return e.matches("html,body")}function oc(e){return e?.ownerDocument||document}function mI(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);let r=e;return r.target!=null&&t.contains(r.target)}function Bd(e){return"composedPath"in e?e.composedPath()[0]:e.target}var bae="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function f9(e){return In(e)&&e.matches(bae)}var Gn=Math.min,wn=Math.max,Kg=Math.round,qg=Math.floor,Oa=e=>({x:e,y:e}),yae={left:"right",right:"left",bottom:"top",top:"bottom"};function y4(e,t,r){return wn(e,Gn(t,r))}function za(e,t){return typeof e=="function"?e(t):e}function ea(e){return e.split("-")[0]}function jd(e){return e.split("-")[1]}function hI(e){return e==="x"?"y":"x"}function gI(e){return e==="y"?"height":"width"}function mi(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function vI(e){return hI(mi(e))}function h9(e,t,r){r===void 0&&(r=!1);let n=jd(e),o=vI(e),i=gI(o),a=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Gg(a)),[a,Gg(a)]}function g9(e){let t=Gg(e);return[pI(e),t,pI(t)]}function pI(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var m9=["left","right"],p9=["right","left"],_ae=["top","bottom"],Iae=["bottom","top"];function wae(e,t,r){switch(e){case"top":case"bottom":return r?t?p9:m9:t?m9:p9;case"left":case"right":return t?_ae:Iae;default:return[]}}function v9(e,t,r,n){let o=jd(e),i=wae(ea(e),r==="start",n);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(pI)))),i}function Gg(e){let t=ea(e);return yae[t]+e.slice(t.length)}function Sae(e){var t,r,n,o;return{top:(t=e.top)!=null?t:0,right:(r=e.right)!=null?r:0,bottom:(n=e.bottom)!=null?n:0,left:(o=e.left)!=null?o:0}}function xI(e){return typeof e!="number"?Sae(e):{top:e,right:e,bottom:e,left:e}}function ta(e){let{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}var tj=y(tc(),1);function x9(e,t,r){let{reference:n,floating:o}=e,i=mi(t),a=vI(t),s=gI(a),l=ea(t),c=i==="y",d=n.x+n.width/2-o.width/2,u=n.y+n.height/2-o.height/2,f=n[s]/2-o[s]/2,m;switch(l){case"top":m={x:d,y:n.y-o.height};break;case"bottom":m={x:d,y:n.y+n.height};break;case"right":m={x:n.x+n.width,y:u};break;case"left":m={x:n.x-o.width,y:u};break;default:m={x:n.x,y:n.y}}let p=jd(t);return p&&(m[a]+=f*(p==="end"?1:-1)*(r&&c?-1:1)),m}async function b9(e,t){var r;t===void 0&&(t={});let{x:n,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:f=!1,padding:m=0}=za(t,e),p=xI(m),b=s[f?u==="floating"?"reference":"floating":u],v=ta(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(b)))==null||r?b:b.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:d,strategy:l})),x=u==="floating"?{x:n,y:o,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),I=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},S=ta(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:x,offsetParent:_,strategy:l}):x);return{top:(v.top-S.top+p.top)/I.y,bottom:(S.bottom-v.bottom+p.bottom)/I.y,left:(v.left-S.left+p.left)/I.x,right:(S.right-v.right+p.right)/I.x}}var kae=50,y9=async(e,t,r)=>{let{placement:n="bottom",strategy:o="absolute",middleware:i=[],platform:a}=r,s=a.detectOverflow?a:{...a,detectOverflow:b9},l=await(a.isRTL==null?void 0:a.isRTL(t)),c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:u}=x9(c,n,l),f=n,m=0,p={};for(let g=0;g<i.length;g++){let b=i[g];if(!b)continue;let{name:v,fn:x}=b,{x:_,y:I,data:S,reset:w}=await x({x:d,y:u,initialPlacement:n,placement:f,strategy:o,middlewareData:p,rects:c,platform:s,elements:{reference:e,floating:t}});d=_??d,u=I??u,p[v]={...p[v],...S},w&&m<kae&&(m++,typeof w=="object"&&(w.placement&&(f=w.placement),w.rects&&(c=w.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):w.rects),{x:d,y:u}=x9(c,f,l)),g=-1)}return{x:d,y:u,placement:f,strategy:o,middlewareData:p}},_9=e=>({name:"arrow",options:e,async fn(t){let{x:r,y:n,placement:o,rects:i,platform:a,elements:s,middlewareData:l}=t,{element:c,padding:d=0}=za(e,t)||{};if(c==null)return{};let u=xI(d),f={x:r,y:n},m=vI(o),p=gI(m),g=await a.getDimensions(c),b=m==="y",v=b?"top":"left",x=b?"bottom":"right",_=b?"clientHeight":"clientWidth",I=i.reference[p]+i.reference[m]-f[m]-i.floating[p],S=f[m]-i.reference[m],w=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c)),P=w?w[_]:0;(!P||!await(a.isElement==null?void 0:a.isElement(w)))&&(P=s.floating[_]||i.floating[p]);let $=I/2-S/2,B=P/2-g[p]/2-1,W=Gn(u[v],B),H=Gn(u[x],B),K=P-g[p]-H,T=P/2-g[p]/2+$,k=y4(W,T,K),E=!l.arrow&&jd(o)!=null&&T!==k&&i.reference[p]/2-(T<W?W:H)-g[p]/2<0,C=E?T<W?T-W:T-K:0;return{[m]:f[m]+C,data:{[m]:k,centerOffset:T-k-C,...E&&{alignmentOffset:C}},reset:E}}});var I9=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;let{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:f,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:g=!0,...b}=za(e,t);if((r=i.arrow)!=null&&r.alignmentOffset)return{};let v=ea(o),x=mi(s),_=ea(s)===s,I=await(l.isRTL==null?void 0:l.isRTL(c.floating)),S=f||(_||!g?[Gg(s)]:g9(s)),w=p!=="none";!f&&w&&S.push(...v9(s,g,p,I));let P=[s,...S],$=await l.detectOverflow(t,b),B=[],W=((n=i.flip)==null?void 0:n.overflows)||[];if(d&&B.push($[v]),u){let k=h9(o,a,I);B.push($[k[0]],$[k[1]])}if(W=[...W,{placement:o,overflows:B}],!B.every(k=>k<=0)){var H,K;let k=(((H=i.flip)==null?void 0:H.index)||0)+1,E=P[k];if(E&&(!(u==="alignment"?x!==mi(E):!1)||W.every(R=>mi(R.placement)===x?R.overflows[0]>0:!0)))return{data:{index:k,overflows:W},reset:{placement:E}};let C=(K=W.filter(A=>A.overflows[0]<=0).sort((A,R)=>A.overflows[1]-R.overflows[1])[0])==null?void 0:K.placement;if(!C)switch(m){case"bestFit":{var T;let A=(T=W.filter(R=>{if(w){let N=mi(R.placement);return N===x||N==="y"}return!0}).map(R=>[R.placement,R.overflows.filter(N=>N>0).reduce((N,U)=>N+U,0)]).sort((R,N)=>R[1]-N[1])[0])==null?void 0:T[0];A&&(C=A);break}case"initialPlacement":C=s;break}if(o!==C)return{reset:{placement:C}}}return{}}}};function w9(e){let t=Gn(...e.map(i=>i.left)),r=Gn(...e.map(i=>i.top)),n=wn(...e.map(i=>i.right)),o=wn(...e.map(i=>i.bottom));return{x:t,y:r,width:n-t,height:o-r}}function Cae(e){let t=e.slice().sort((o,i)=>o.y-i.y),r=[],n=null;for(let o=0;o<t.length;o++){let i=t[o];!n||i.y-n.y>n.height/2?r.push([i]):r[r.length-1].push(i),n=i}return r.map(o=>ta(w9(o)))}var S9=function(e){return e===void 0&&(e={}),{name:"inline",options:e,async fn(t){let{placement:r,elements:n,rects:o,platform:i,strategy:a}=t,{padding:s=2,x:l,y:c}=za(e,t),d=Array.from(await(i.getClientRects==null?void 0:i.getClientRects(n.reference))||[]);if(!d.length)return{};let u=Cae(d),f=ta(w9(d)),m=xI(s);function p(){if(u.length===2&&(u[0].left>u[1].right||u[1].left>u[0].right)&&l!=null&&c!=null)return u.find(b=>l>b.left-m.left&&l<b.right+m.right&&c>b.top-m.top&&c<b.bottom+m.bottom)||f;if(u.length>=2){if(mi(r)==="y"){let w=u[0],P=u[u.length-1],$=ea(r)==="top",B=w.top,W=P.bottom,H=$?w.left:P.left,K=$?w.right:P.right;return ta({x:H,y:B,width:K-H,height:W-B})}let b=ea(r)==="left",v=wn(...u.map(w=>w.right)),x=Gn(...u.map(w=>w.left)),_=u.filter(w=>b?w.left===x:w.right===v),I=_[0].top,S=_[_.length-1].bottom;return ta({x,y:I,width:v-x,height:S-I})}return f}let g=await i.getElementRects({reference:{getBoundingClientRect:p},floating:n.floating,strategy:a});return o.reference.x!==g.reference.x||o.reference.y!==g.reference.y||o.reference.width!==g.reference.width||o.reference.height!==g.reference.height?{reset:{rects:g}}:{}}}},k9=new Set(["left","top"]);async function Pae(e,t){let{placement:r,platform:n,elements:o}=e,i=await(n.isRTL==null?void 0:n.isRTL(o.floating)),a=ea(r),s=jd(r),l=mi(r)==="y",c=k9.has(a)?-1:1,d=i&&l?-1:1,u=za(t,e),{mainAxis:f,crossAxis:m,alignmentAxis:p}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return s&&typeof p=="number"&&(m=s==="end"?p*-1:p),l?{x:m*d,y:f*c}:{x:f*c,y:m*d}}var C9=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;let{x:o,y:i,placement:a,middlewareData:s}=t,l=await Pae(t,e);return a===((r=s.offset)==null?void 0:r.placement)&&(n=s.arrow)!=null&&n.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:a}}}}},P9=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:r,y:n,placement:o,platform:i}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:l={fn:x=>{let{x:_,y:I}=x;return{x:_,y:I}}},...c}=za(e,t),d={x:r,y:n},u=await i.detectOverflow(t,c),f=mi(o),m=hI(f),p=d[m],g=d[f],b=(x,_)=>y4(_+u[x==="y"?"top":"left"],_,_-u[x==="y"?"bottom":"right"]);a&&(p=b(m,p)),s&&(g=b(f,g));let v=l.fn({...t,[m]:p,[f]:g});return{...v,data:{x:v.x-r,y:v.y-n,enabled:{[m]:a,[f]:s}}}}}},D9=function(e){return e===void 0&&(e={}),{options:e,fn(t){var r,n;let{x:o,y:i,placement:a,rects:s,middlewareData:l}=t,{offset:c=0,mainAxis:d=!0,crossAxis:u=!0}=za(e,t),f={x:o,y:i},m=mi(a),p=hI(m),g=f[p],b=f[m],v=za(c,t),x=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:(r=v.mainAxis)!=null?r:0,crossAxis:(n=v.crossAxis)!=null?n:0};if(d){let S=p==="y"?"height":"width",w=s.reference[p]-s.floating[S]+x.mainAxis,P=s.reference[p]+s.reference[S]-x.mainAxis;g<w?g=w:g>P&&(g=P)}if(u){var _,I;let S=p==="y"?"width":"height",w=k9.has(ea(a)),P=s.reference[m]-s.floating[S]+(w&&((_=l.offset)==null?void 0:_[m])||0)+(w?0:x.crossAxis),$=s.reference[m]+s.reference[S]+(w?0:((I=l.offset)==null?void 0:I[m])||0)-(w?x.crossAxis:0);b<P?b=P:b>$&&(b=$)}return{[p]:g,[m]:b}}}},R9=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){let{placement:r,rects:n,platform:o,elements:i}=t,{apply:a=()=>{},...s}=za(e,t),l=await o.detectOverflow(t,s),c=ea(r),d=jd(r),u=mi(r)==="y",{width:f,height:m}=n.floating,p,g;c==="top"||c==="bottom"?(p=c,g=d===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(g=c,p=d==="end"?"top":"bottom");let b=m-l.top-l.bottom,v=f-l.left-l.right,x=Gn(m-l[p],b),_=Gn(f-l[g],v),I=t.middlewareData.shift,S=!I,w=x,P=_;I!=null&&I.enabled.x&&(P=v),I!=null&&I.enabled.y&&(w=b),S&&!d&&(u?P=f-2*wn(l.left,l.right):w=m-2*wn(l.top,l.bottom)),await a({...t,availableWidth:P,availableHeight:w});let $=await o.getDimensions(i.floating);return f!==$.width||m!==$.height?{reset:{rects:!0}}:{}}}};function $9(e){let t=Zn(e),r=parseFloat(t.width)||0,n=parseFloat(t.height)||0,o=In(e),i=o?e.offsetWidth:r,a=o?e.offsetHeight:n,s=Kg(r)!==i||Kg(n)!==a;return s&&(r=i,n=a),{width:r,height:n,$:s}}function I4(e){return Lt(e)?e:e.contextElement}function dm(e){let t=I4(e);if(!In(t))return Oa(1);let r=t.getBoundingClientRect(),{width:n,height:o,$:i}=$9(t),a=(i?Kg(r.width):r.width)/n,s=(i?Kg(r.height):r.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}var Dae=Oa(0);function A9(e){let t=po(e);return!lm()||!t.visualViewport?Dae:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Rae(e,t,r){return t===void 0&&(t=!1),!!r&&t&&r===po(e)}function Ud(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);let o=e.getBoundingClientRect(),i=I4(e),a=Oa(1);t&&(n?Lt(n)&&(a=dm(n)):a=dm(e));let s=Rae(i,r,n)?A9(i):Oa(0),l=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,d=o.width/a.x,u=o.height/a.y;if(i&&n){let f=po(i),m=Lt(n)?po(n):n,p=f,g=uI(p);for(;g&&m!==p;){let b=dm(g),v=g.getBoundingClientRect(),x=Zn(g),_=v.left+(g.clientLeft+parseFloat(x.paddingLeft))*b.x,I=v.top+(g.clientTop+parseFloat(x.paddingTop))*b.y;l*=b.x,c*=b.y,d*=b.x,u*=b.y,l+=_,c+=I,p=po(g),g=uI(p)}}return ta({width:d,height:u,x:l,y:c})}function bI(e,t){let r=Zg(e).scrollLeft;return t?t.left+r:Ud(Aa(e)).left+r}function O9(e,t){let r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-bI(e,r),o=r.top+t.scrollTop;return{x:n,y:o}}function Tae(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e,i=o==="fixed",a=Aa(n),s=t?Wg(t.floating):!1;if(n===a||s&&i)return r;let l={scrollLeft:0,scrollTop:0},c=Oa(1),d=Oa(0),u=In(n);if((u||!i)&&((rc(n)!=="body"||Hg(a))&&(l=Zg(n)),u)){let m=Ud(n);c=dm(n),d.x=m.x+n.clientLeft,d.y=m.y+n.clientTop}let f=a&&!u&&!i?O9(a,l):Oa(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+d.x+f.x,y:r.y*c.y-l.scrollTop*c.y+d.y+f.y}}function Eae(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function $ae(e){let t=Zg(e),r=e.ownerDocument.body,n=wn(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),o=wn(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight),i=-t.scrollLeft+bI(e),a=-t.scrollTop;return Zn(r).direction==="rtl"&&(i+=wn(e.clientWidth,r.clientWidth)-n),{width:n,height:o,x:i,y:a}}var Aae=25;function Oae(e,t,r){r===void 0&&(r="viewport");let n=r==="layoutViewport",o=po(e),i=Aa(e),a=o.visualViewport,s=i.clientWidth,l=i.clientHeight,c=0,d=0;if(a){let f=!lm()||t==="fixed";n?f||(c=-a.offsetLeft,d=-a.offsetTop):(s=a.width,l=a.height,f&&(c=a.offsetLeft,d=a.offsetTop))}if(bI(i)<=0){let f=i.ownerDocument,m=f.body,p=getComputedStyle(m),g=f.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,b=Math.abs(i.clientWidth-m.clientWidth-g),v=getComputedStyle(i).scrollbarGutter==="stable both-edges"?b/2:b;v<=Aae&&(s-=v)}return{width:s,height:l,x:c,y:d}}function zae(e,t){let r=Ud(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,i=dm(e),a=e.clientWidth*i.x,s=e.clientHeight*i.y,l=o*i.x,c=n*i.y;return{width:a,height:s,x:l,y:c}}function T9(e,t,r){let n;if(t==="viewport"||t==="layoutViewport")n=Oae(e,r,t);else if(t==="document")n=$ae(Aa(e));else if(Lt(t))n=zae(t,r);else{let o=A9(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return ta(n)}function Nae(e,t){let r=t.get(e);if(r)return r;let n=Zo(e,[],!1).filter(s=>Lt(s)&&rc(s)!=="body"),o=null,i=Zn(e).position==="fixed",a=i?$a(e):e;for(;Lt(a)&&!Ns(a);){let s=Zn(a),l=dI(a),c=o?o.position:i?"fixed":"";!l&&(c==="fixed"||c==="absolute"&&s.position==="static")?n=n.filter(u=>u!==a):o=s,a=$a(a)}return t.set(e,n),n}function Fae(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e,a=[...r==="clippingAncestors"?Wg(t)?[]:Nae(t,this._c):[].concat(r),n],s=T9(t,a[0],o),l=s.top,c=s.right,d=s.bottom,u=s.left;for(let f=1;f<a.length;f++){let m=T9(t,a[f],o);l=wn(m.top,l),c=Gn(m.right,c),d=Gn(m.bottom,d),u=wn(m.left,u)}return{width:c-u,height:d-l,x:u,y:l}}function Lae(e){let{width:t,height:r}=$9(e);return{width:t,height:r}}function Mae(e,t,r){let n=In(t),o=Aa(t),i=r==="fixed",a=Ud(e,!0,i,t),s={scrollLeft:0,scrollTop:0},l=Oa(0);if((n||!i)&&((rc(t)!=="body"||Hg(o))&&(s=Zg(t)),n)){let f=Ud(t,!0,i,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}!n&&o&&(l.x=bI(o));let c=o&&!n&&!i?O9(o,s):Oa(0),d=a.left+s.scrollLeft-l.x-c.x,u=a.top+s.scrollTop-l.y-c.y;return{x:d,y:u,width:a.width,height:a.height}}function _4(e){return Zn(e).position==="static"}function E9(e,t){if(!In(e)||Zn(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Aa(e)===r&&(r=r.ownerDocument.body),r}function z9(e,t){let r=po(e);if(Wg(e))return r;if(!In(e)){let o=$a(e);for(;o&&!Ns(o);){if(Lt(o)&&!_4(o))return o;o=$a(o)}return r}let n=E9(e,t);for(;n&&o9(n)&&_4(n);)n=E9(n,t);return n&&Ns(n)&&_4(n)&&!dI(n)?r:n||n9(e)||r}var Bae=async function(e){let t=this.getOffsetParent||z9,r=this.getDimensions,n=await r(e.floating);return{reference:Mae(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function jae(e){return Zn(e).direction==="rtl"}var w4={convertOffsetParentRelativeRectToViewportRelativeRect:Tae,getDocumentElement:Aa,getClippingRect:Fae,getOffsetParent:z9,getElementRects:Bae,getClientRects:Eae,getDimensions:Lae,getScale:dm,isElement:Lt,isRTL:jae};function N9(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Uae(e,t,r){let n=null,o,i=Aa(e);function a(){var d;clearTimeout(o),(d=n)==null||d.disconnect(),n=null}function s(d,u){d===void 0&&(d=!1),u===void 0&&(u=1),a();let f=e.getBoundingClientRect(),{left:m,top:p,width:g,height:b}=f;if(d||t(),!g||!b)return;let v=qg(p),x=qg(i.clientWidth-(m+g)),_=qg(i.clientHeight-(p+b)),I=qg(m),w={rootMargin:-v+"px "+-x+"px "+-_+"px "+-I+"px",threshold:wn(0,Gn(1,u))||1},P=!0;function $(B){let W=B[0].intersectionRatio;if(!N9(f,e.getBoundingClientRect()))return s();if(W!==u){if(!P)return s();W?s(!1,W):o=setTimeout(()=>{s(!1,1e-7)},1e3)}P=!1}try{n=new IntersectionObserver($,{...w,root:i.ownerDocument})}catch{n=new IntersectionObserver($,w)}n.observe(e)}let l=po(e),c=()=>s(r);return l.addEventListener("resize",c),s(!0),()=>{l.removeEventListener("resize",c),a()}}function yI(e,t,r,n){n===void 0&&(n={});let{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=I4(e),d=o||i?[...c?Zo(c):[],...t?Zo(t):[]]:[];d.forEach(v=>{o&&v.addEventListener("scroll",r),i&&v.addEventListener("resize",r)});let u=c&&s?Uae(c,r,i):null,f=-1,m=null;a&&(m=new ResizeObserver(v=>{let[x]=v;x&&x.target===c&&m&&t&&(m.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var _;(_=m)==null||_.observe(t)})),r()}),c&&!l&&m.observe(c),t&&m.observe(t));let p,g=l?Ud(e):null;l&&b();function b(){let v=Ud(e);g&&!N9(g,v)&&r(),g=v,p=requestAnimationFrame(b)}return r(),()=>{var v;d.forEach(x=>{o&&x.removeEventListener("scroll",r),i&&x.removeEventListener("resize",r)}),u?.(),(v=m)==null||v.disconnect(),m=null,l&&cancelAnimationFrame(p)}}var F9=C9;var L9=P9,M9=I9,B9=R9;var S4=_9,j9=S9,U9=D9,_I=(e,t,r)=>{let n=new Map,o=r??{},i={...w4,...o.platform,_c:n};return y9(e,t,{...o,platform:i})};var Tr=y(D(),1),W9=y(D(),1),Z9=y(tc(),1),Vae=typeof document<"u",Hae=function(){},II=Vae?W9.useLayoutEffect:Hae;function wI(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 r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!wI(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){let i=o[n];if(!(i==="_owner"&&e.$$typeof)&&!wI(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function G9(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function V9(e,t){let r=G9(e);return Math.round(t*r)/r}function k4(e){let t=Tr.useRef(e);return II(()=>{t.current=e}),t}function K9(e){e===void 0&&(e={});let{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[d,u]=Tr.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[f,m]=Tr.useState(n);wI(f,n)||m(n);let[p,g]=Tr.useState(null),[b,v]=Tr.useState(null),x=Tr.useCallback(R=>{R!==w.current&&(w.current=R,g(R))},[]),_=Tr.useCallback(R=>{R!==P.current&&(P.current=R,v(R))},[]),I=i||p,S=a||b,w=Tr.useRef(null),P=Tr.useRef(null),$=Tr.useRef(d),B=l!=null,W=k4(l),H=k4(o),K=k4(c),T=Tr.useCallback(()=>{if(!w.current||!P.current)return;let R={placement:t,strategy:r,middleware:f};H.current&&(R.platform=H.current),_I(w.current,P.current,R).then(N=>{let U={...N,isPositioned:K.current!==!1};k.current&&!wI($.current,U)&&($.current=U,Z9.flushSync(()=>{u(U)}))})},[f,t,r,H,K]);II(()=>{c===!1&&$.current.isPositioned&&($.current.isPositioned=!1,u(R=>({...R,isPositioned:!1})))},[c]);let k=Tr.useRef(!1);II(()=>(k.current=!0,()=>{k.current=!1}),[]),II(()=>{if(I&&(w.current=I),S&&(P.current=S),I&&S){if(W.current)return W.current(I,S,T);T()}},[I,S,T,W,B]);let E=Tr.useMemo(()=>({reference:w,floating:P,setReference:x,setFloating:_}),[x,_]),C=Tr.useMemo(()=>({reference:I,floating:S}),[I,S]),A=Tr.useMemo(()=>{let R={position:r,left:0,top:0};if(!C.floating)return R;let N=V9(C.floating,d.x),U=V9(C.floating,d.y);return s?{...R,transform:"translate("+N+"px, "+U+"px)",...G9(C.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:N,top:U}},[r,s,C.floating,d.x,d.y]);return Tr.useMemo(()=>({...d,update:T,refs:E,elements:C,floatingStyles:A}),[d,T,E,C,A])}var Wae=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){let{element:n,padding:o}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?S4({element:n.current,padding:o}).fn(r):{}:n?S4({element:n,padding:o}).fn(r):{}}}},um=(e,t)=>{let r=F9(e);return{name:r.name,fn:r.fn,options:[e,t]}},Vd=(e,t)=>{let r=L9(e);return{name:r.name,fn:r.fn,options:[e,t]}},SI=(e,t)=>({fn:U9(e).fn,options:[e,t]}),Hd=(e,t)=>{let r=M9(e);return{name:r.name,fn:r.fn,options:[e,t]}},C4=(e,t)=>{let r=B9(e);return{name:r.name,fn:r.fn,options:[e,t]}};var nc=(e,t)=>{let r=j9(e);return{name:r.name,fn:r.fn,options:[e,t]}},Xg=(e,t)=>{let r=Wae(e);return{name:r.name,fn:r.fn,options:[e,t]}};function rj(e){return de.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})},e)}var oj={...de},Zae=oj.useInsertionEffect,Gae=Zae||(e=>e());function Fs(e){let t=de.useRef(()=>{});return Gae(()=>{t.current=e}),de.useCallback(function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return t.current==null?void 0:t.current(...n)},[])}var Kae="ArrowUp",qae="ArrowDown",Xae="ArrowLeft",Qae="ArrowRight";var Na=typeof document<"u"?fm.useLayoutEffect:fm.useEffect;var Yae=[Xae,Qae],Jae=[Kae,qae],yEe=[...Yae,...Jae];var q9=!1,ese=0,X9=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+ese++;function tse(){let[e,t]=de.useState(()=>q9?X9():void 0);return Na(()=>{e==null&&t(X9())},[]),de.useEffect(()=>{q9=!0},[]),e}var rse=oj.useId,nj=rse||tse;function ose(){let e=new Map;return{emit(t,r){var n;(n=e.get(t))==null||n.forEach(o=>o(r))},on(t,r){e.set(t,[...e.get(t)||[],r])},off(t,r){var n;e.set(t,((n=e.get(t))==null?void 0:n.filter(o=>o!==r))||[])}}}var nse=de.createContext(null),ise=de.createContext(null),E4=()=>{var e;return((e=de.useContext(nse))==null?void 0:e.id)||null},$4=()=>de.useContext(ise);function A4(e){return"data-floating-ui-"+e}function P4(e){let t=(0,fm.useRef)(e);return Na(()=>{t.current=e}),t}var Q9=A4("safe-polygon");function kI(e,t,r){return r&&!fI(r)?0:typeof e=="number"?e:e?.[t]}function ij(e,t){t===void 0&&(t={});let{open:r,onOpenChange:n,dataRef:o,events:i,elements:a}=e,{enabled:s=!0,delay:l=0,handleClose:c=null,mouseOnly:d=!1,restMs:u=0,move:f=!0}=t,m=$4(),p=E4(),g=P4(c),b=P4(l),v=P4(r),x=de.useRef(),_=de.useRef(-1),I=de.useRef(),S=de.useRef(-1),w=de.useRef(!0),P=de.useRef(!1),$=de.useRef(()=>{}),B=de.useRef(!1),W=de.useCallback(()=>{var A;let R=(A=o.current.openEvent)==null?void 0:A.type;return R?.includes("mouse")&&R!=="mousedown"},[o]);de.useEffect(()=>{if(!s)return;function A(R){let{open:N}=R;N||(clearTimeout(_.current),clearTimeout(S.current),w.current=!0,B.current=!1)}return i.on("openchange",A),()=>{i.off("openchange",A)}},[s,i]),de.useEffect(()=>{if(!s||!g.current||!r)return;function A(N){W()&&n(!1,N,"hover")}let R=oc(a.floating).documentElement;return R.addEventListener("mouseleave",A),()=>{R.removeEventListener("mouseleave",A)}},[a.floating,r,n,s,g,W]);let H=de.useCallback(function(A,R,N){R===void 0&&(R=!0),N===void 0&&(N="hover");let U=kI(b.current,"close",x.current);U&&!I.current?(clearTimeout(_.current),_.current=window.setTimeout(()=>n(!1,A,N),U)):R&&(clearTimeout(_.current),n(!1,A,N))},[b,n]),K=Fs(()=>{$.current(),I.current=void 0}),T=Fs(()=>{if(P.current){let A=oc(a.floating).body;A.style.pointerEvents="",A.removeAttribute(Q9),P.current=!1}}),k=Fs(()=>o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1);de.useEffect(()=>{if(!s)return;function A(G){if(clearTimeout(_.current),w.current=!1,d&&!fI(x.current)||u>0&&!kI(b.current,"open"))return;let re=kI(b.current,"open",x.current);re?_.current=window.setTimeout(()=>{v.current||n(!0,G,"hover")},re):r||n(!0,G,"hover")}function R(G){if(k())return;$.current();let re=oc(a.floating);if(clearTimeout(S.current),B.current=!1,g.current&&o.current.floatingContext){r||clearTimeout(_.current),I.current=g.current({...o.current.floatingContext,tree:m,x:G.clientX,y:G.clientY,onClose(){T(),K(),k()||H(G,!0,"safe-polygon")}});let he=I.current;re.addEventListener("mousemove",he),$.current=()=>{re.removeEventListener("mousemove",he)};return}(x.current!=="touch"||!cm(a.floating,G.relatedTarget))&&H(G)}function N(G){k()||o.current.floatingContext&&(g.current==null||g.current({...o.current.floatingContext,tree:m,x:G.clientX,y:G.clientY,onClose(){T(),K(),k()||H(G)}})(G))}if(Lt(a.domReference)){var U;let G=a.domReference;return r&&G.addEventListener("mouseleave",N),(U=a.floating)==null||U.addEventListener("mouseleave",N),f&&G.addEventListener("mousemove",A,{once:!0}),G.addEventListener("mouseenter",A),G.addEventListener("mouseleave",R),()=>{var re;r&&G.removeEventListener("mouseleave",N),(re=a.floating)==null||re.removeEventListener("mouseleave",N),f&&G.removeEventListener("mousemove",A),G.removeEventListener("mouseenter",A),G.removeEventListener("mouseleave",R)}}},[a,s,e,d,u,f,H,K,T,n,r,v,m,b,g,o,k]),Na(()=>{var A;if(s&&r&&(A=g.current)!=null&&A.__options.blockPointerEvents&&W()){P.current=!0;let N=a.floating;if(Lt(a.domReference)&&N){var R;let U=oc(a.floating).body;U.setAttribute(Q9,"");let G=a.domReference,re=m==null||(R=m.nodesRef.current.find(ve=>ve.id===p))==null||(R=R.context)==null?void 0:R.elements.floating;return re&&(re.style.pointerEvents=""),U.style.pointerEvents="none",G.style.pointerEvents="auto",N.style.pointerEvents="auto",()=>{U.style.pointerEvents="",G.style.pointerEvents="",N.style.pointerEvents=""}}}},[s,r,p,a,m,g,W]),Na(()=>{r||(x.current=void 0,B.current=!1,K(),T())},[r,K,T]),de.useEffect(()=>()=>{K(),clearTimeout(_.current),clearTimeout(S.current),T()},[s,a.domReference,K,T]);let E=de.useMemo(()=>{function A(R){x.current=R.pointerType}return{onPointerDown:A,onPointerEnter:A,onMouseMove(R){let{nativeEvent:N}=R;function U(){!w.current&&!v.current&&n(!0,N,"hover")}d&&!fI(x.current)||r||u===0||B.current&&R.movementX**2+R.movementY**2<2||(clearTimeout(S.current),x.current==="touch"?U():(B.current=!0,S.current=window.setTimeout(U,u)))}}},[d,n,r,v,u]),C=de.useMemo(()=>({onMouseEnter(){clearTimeout(_.current)},onMouseLeave(A){k()||H(A.nativeEvent,!1)}}),[H,k]);return de.useMemo(()=>s?{reference:E,floating:C}:{},[s,E,C])}var T4=()=>{},aj=de.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:T4,setState:T4,isInstantPhase:!1}),ase=()=>de.useContext(aj);function sj(e){let{children:t,delay:r,timeoutMs:n=0}=e,[o,i]=de.useReducer((l,c)=>({...l,...c}),{delay:r,timeoutMs:n,initialDelay:r,currentId:null,isInstantPhase:!1}),a=de.useRef(null),s=de.useCallback(l=>{i({currentId:l})},[]);return Na(()=>{o.currentId?a.current===null?a.current=o.currentId:o.isInstantPhase||i({isInstantPhase:!0}):(o.isInstantPhase&&i({isInstantPhase:!1}),a.current=null)},[o.currentId,o.isInstantPhase]),de.createElement(aj.Provider,{value:de.useMemo(()=>({...o,setState:i,setCurrentId:s}),[o,s])},t)}function lj(e,t){t===void 0&&(t={});let{open:r,onOpenChange:n,floatingId:o}=e,{id:i,enabled:a=!0}=t,s=i??o,l=ase(),{currentId:c,setCurrentId:d,initialDelay:u,setState:f,timeoutMs:m}=l;return Na(()=>{a&&c&&(f({delay:{open:1,close:kI(u,"close")}}),c!==s&&n(!1))},[a,s,n,f,c,u]),Na(()=>{function p(){n(!1),f({delay:u,currentId:null})}if(a&&c&&!r&&c===s){if(m){let g=window.setTimeout(p,m);return()=>{clearTimeout(g)}}p()}},[a,r,f,c,s,n,u,m]),Na(()=>{a&&(d===T4||!r||d(s))},[a,r,d,s]),l}function D4(e,t){let r=e.filter(o=>{var i;return o.parentId===t&&((i=o.context)==null?void 0:i.open)}),n=r;for(;n.length;)n=e.filter(o=>{var i;return(i=n)==null?void 0:i.some(a=>{var s;return o.parentId===a.id&&((s=o.context)==null?void 0:s.open)})}),r=r.concat(n);return r}var sse="data-floating-ui-focusable";var lse={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},cse={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Y9=e=>{var t,r;return{escapeKey:typeof e=="boolean"?e:(t=e?.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(r=e?.outsidePress)!=null?r:!0}};function cj(e,t){t===void 0&&(t={});let{open:r,onOpenChange:n,elements:o,dataRef:i}=e,{enabled:a=!0,escapeKey:s=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:d=!1,referencePressEvent:u="pointerdown",ancestorScroll:f=!1,bubbles:m,capture:p}=t,g=$4(),b=Fs(typeof l=="function"?l:()=>!1),v=typeof l=="function"?b:l,x=de.useRef(!1),_=de.useRef(!1),{escapeKey:I,outsidePress:S}=Y9(m),{escapeKey:w,outsidePress:P}=Y9(p),$=de.useRef(!1),B=Fs(E=>{var C;if(!r||!a||!s||E.key!=="Escape"||$.current)return;let A=(C=i.current.floatingContext)==null?void 0:C.nodeId,R=g?D4(g.nodesRef.current,A):[];if(!I&&(E.stopPropagation(),R.length>0)){let N=!0;if(R.forEach(U=>{var G;if((G=U.context)!=null&&G.open&&!U.context.dataRef.current.__escapeKeyBubbles){N=!1;return}}),!N)return}n(!1,d9(E)?E.nativeEvent:E,"escape-key")}),W=Fs(E=>{var C;let A=()=>{var R;B(E),(R=Bd(E))==null||R.removeEventListener("keydown",A)};(C=Bd(E))==null||C.addEventListener("keydown",A)}),H=Fs(E=>{var C;let A=x.current;x.current=!1;let R=_.current;if(_.current=!1,c==="click"&&R||A||typeof v=="function"&&!v(E))return;let N=Bd(E),U="["+A4("inert")+"]",G=oc(o.floating).querySelectorAll(U),re=Lt(N)?N:null;for(;re&&!Ns(re);){let ne=$a(re);if(Ns(ne)||!Lt(ne))break;re=ne}if(G.length&&Lt(N)&&!u9(N)&&!cm(N,o.floating)&&Array.from(G).every(ne=>!cm(re,ne)))return;if(In(N)&&k){let ne=N.clientWidth>0&&N.scrollWidth>N.clientWidth,we=N.clientHeight>0&&N.scrollHeight>N.clientHeight,se=we&&E.offsetX>N.clientWidth;if(we&&Zn(N).direction==="rtl"&&(se=E.offsetX<=N.offsetWidth-N.clientWidth),se||ne&&E.offsetY>N.clientHeight)return}let ve=(C=i.current.floatingContext)==null?void 0:C.nodeId,he=g&&D4(g.nodesRef.current,ve).some(ne=>{var we;return mI(E,(we=ne.context)==null?void 0:we.elements.floating)});if(mI(E,o.floating)||mI(E,o.domReference)||he)return;let Q=g?D4(g.nodesRef.current,ve):[];if(Q.length>0){let ne=!0;if(Q.forEach(we=>{var se;if((se=we.context)!=null&&se.open&&!we.context.dataRef.current.__outsidePressBubbles){ne=!1;return}}),!ne)return}n(!1,E,"outside-press")}),K=Fs(E=>{var C;let A=()=>{var R;H(E),(R=Bd(E))==null||R.removeEventListener(c,A)};(C=Bd(E))==null||C.addEventListener(c,A)});de.useEffect(()=>{if(!r||!a)return;i.current.__escapeKeyBubbles=I,i.current.__outsidePressBubbles=S;let E=-1;function C(G){n(!1,G,"ancestor-scroll")}function A(){window.clearTimeout(E),$.current=!0}function R(){E=window.setTimeout(()=>{$.current=!1},lm()?5:0)}let N=oc(o.floating);s&&(N.addEventListener("keydown",w?W:B,w),N.addEventListener("compositionstart",A),N.addEventListener("compositionend",R)),v&&N.addEventListener(c,P?K:H,P);let U=[];return f&&(Lt(o.domReference)&&(U=Zo(o.domReference)),Lt(o.floating)&&(U=U.concat(Zo(o.floating))),!Lt(o.reference)&&o.reference&&o.reference.contextElement&&(U=U.concat(Zo(o.reference.contextElement)))),U=U.filter(G=>{var re;return G!==((re=N.defaultView)==null?void 0:re.visualViewport)}),U.forEach(G=>{G.addEventListener("scroll",C,{passive:!0})}),()=>{s&&(N.removeEventListener("keydown",w?W:B,w),N.removeEventListener("compositionstart",A),N.removeEventListener("compositionend",R)),v&&N.removeEventListener(c,P?K:H,P),U.forEach(G=>{G.removeEventListener("scroll",C)}),window.clearTimeout(E)}},[i,o,s,v,c,r,n,f,a,I,S,B,w,W,H,P,K]),de.useEffect(()=>{x.current=!1},[v,c]);let T=de.useMemo(()=>({onKeyDown:B,[lse[u]]:E=>{d&&n(!1,E.nativeEvent,"reference-press")}}),[B,n,d,u]),k=de.useMemo(()=>({onKeyDown:B,onMouseDown(){_.current=!0},onMouseUp(){_.current=!0},[cse[c]]:()=>{x.current=!0}}),[B,c]);return de.useMemo(()=>a?{reference:T,floating:k}:{},[a,T,k])}function dse(e){let{open:t=!1,onOpenChange:r,elements:n}=e,o=nj(),i=de.useRef({}),[a]=de.useState(()=>ose()),s=E4()!=null,[l,c]=de.useState(n.reference),d=Fs((m,p,g)=>{i.current.openEvent=m?p:void 0,a.emit("openchange",{open:m,event:p,reason:g,nested:s}),r?.(m,p,g)}),u=de.useMemo(()=>({setPositionReference:c}),[]),f=de.useMemo(()=>({reference:l||n.reference||null,floating:n.floating||null,domReference:n.reference}),[l,n.reference,n.floating]);return de.useMemo(()=>({dataRef:i,open:t,onOpenChange:d,elements:f,events:a,floatingId:o,refs:u}),[t,d,f,a,o,u])}function mm(e){e===void 0&&(e={});let{nodeId:t}=e,r=dse({...e,elements:{reference:null,floating:null,...e.elements}}),n=e.rootContext||r,o=n.elements,[i,a]=de.useState(null),[s,l]=de.useState(null),d=o?.domReference||i,u=de.useRef(null),f=$4();Na(()=>{d&&(u.current=d)},[d]);let m=K9({...e,elements:{...o,...s&&{reference:s}}}),p=de.useCallback(_=>{let I=Lt(_)?{getBoundingClientRect:()=>_.getBoundingClientRect(),contextElement:_}:_;l(I),m.refs.setReference(I)},[m.refs]),g=de.useCallback(_=>{(Lt(_)||_===null)&&(u.current=_,a(_)),(Lt(m.refs.reference.current)||m.refs.reference.current===null||_!==null&&!Lt(_))&&m.refs.setReference(_)},[m.refs]),b=de.useMemo(()=>({...m.refs,setReference:g,setPositionReference:p,domReference:u}),[m.refs,g,p]),v=de.useMemo(()=>({...m.elements,domReference:d}),[m.elements,d]),x=de.useMemo(()=>({...m,...n,refs:b,elements:v,nodeId:t}),[m,b,v,t,n]);return Na(()=>{n.dataRef.current.floatingContext=x;let _=f?.nodesRef.current.find(I=>I.id===t);_&&(_.context=x)}),de.useMemo(()=>({...m,context:x,refs:b,elements:v}),[m,b,v,x])}function dj(e,t){t===void 0&&(t={});let{open:r,onOpenChange:n,events:o,dataRef:i,elements:a}=e,{enabled:s=!0,visibleOnly:l=!0}=t,c=de.useRef(!1),d=de.useRef(),u=de.useRef(!0);de.useEffect(()=>{if(!s)return;let m=po(a.domReference);function p(){!r&&In(a.domReference)&&a.domReference===v4(oc(a.domReference))&&(c.current=!0)}function g(){u.current=!0}return m.addEventListener("blur",p),m.addEventListener("keydown",g,!0),()=>{m.removeEventListener("blur",p),m.removeEventListener("keydown",g,!0)}},[a.domReference,r,s]),de.useEffect(()=>{if(!s)return;function m(p){let{reason:g}=p;(g==="reference-press"||g==="escape-key")&&(c.current=!0)}return o.on("openchange",m),()=>{o.off("openchange",m)}},[o,s]),de.useEffect(()=>()=>{clearTimeout(d.current)},[]);let f=de.useMemo(()=>({onPointerDown(m){s9(m.nativeEvent)||(u.current=!1)},onMouseLeave(){c.current=!1},onFocus(m){if(c.current)return;let p=Bd(m.nativeEvent);if(l&&Lt(p))try{if(l9()&&c9())throw Error();if(!p.matches(":focus-visible"))return}catch{if(!u.current&&!f9(p))return}n(!0,m.nativeEvent,"focus")},onBlur(m){c.current=!1;let p=m.relatedTarget,g=m.nativeEvent,b=Lt(p)&&p.hasAttribute(A4("focus-guard"))&&p.getAttribute("data-type")==="outside";d.current=window.setTimeout(()=>{var v;let x=v4(a.domReference?a.domReference.ownerDocument:document);!p&&x===a.domReference||cm((v=i.current.floatingContext)==null?void 0:v.refs.floating.current,x)||cm(a.domReference,x)||b||n(!1,g,"focus")})}}),[i,a.domReference,n,l]);return de.useMemo(()=>s?{reference:f}:{},[s,f])}var J9="active",ej="selected";function R4(e,t,r){let n=new Map,o=r==="item",i=e;if(o&&e){let{[J9]:a,[ej]:s,...l}=e;i=l}return{...r==="floating"&&{tabIndex:-1,[sse]:""},...i,...t.map(a=>{let s=a?a[r]:null;return typeof s=="function"?e?s(e):null:s}).concat(e).reduce((a,s)=>(s&&Object.entries(s).forEach(l=>{let[c,d]=l;if(!(o&&[J9,ej].includes(c)))if(c.indexOf("on")===0){if(n.has(c)||n.set(c,[]),typeof d=="function"){var u;(u=n.get(c))==null||u.push(d),a[c]=function(){for(var f,m=arguments.length,p=new Array(m),g=0;g<m;g++)p[g]=arguments[g];return(f=n.get(c))==null?void 0:f.map(b=>b(...p)).find(b=>b!==void 0)}}}else a[c]=d}),a),{})}}function uj(e){e===void 0&&(e=[]);let t=e.map(s=>s?.reference),r=e.map(s=>s?.floating),n=e.map(s=>s?.item),o=de.useCallback(s=>R4(s,e,"reference"),t),i=de.useCallback(s=>R4(s,e,"floating"),r),a=de.useCallback(s=>R4(s,e,"item"),n);return de.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:a}),[o,i,a])}var use=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function fj(e,t){var r;t===void 0&&(t={});let{open:n,floatingId:o}=e,{enabled:i=!0,role:a="dialog"}=t,s=(r=use.get(a))!=null?r:a,l=nj(),d=E4()!=null,u=de.useMemo(()=>s==="tooltip"||a==="label"?{["aria-"+(a==="label"?"labelledby":"describedby")]:n?o:void 0}:{"aria-expanded":n?"true":"false","aria-haspopup":s==="alertdialog"?"dialog":s,"aria-controls":n?o:void 0,...s==="listbox"&&{role:"combobox"},...s==="menu"&&{id:l},...s==="menu"&&d&&{role:"menuitem"},...a==="select"&&{"aria-autocomplete":"none"},...a==="combobox"&&{"aria-autocomplete":"list"}},[s,o,d,n,l,a]),f=de.useMemo(()=>{let p={id:o,...s&&{role:s}};return s==="tooltip"||a==="label"?p:{...p,...s==="menu"&&{"aria-labelledby":l}}},[s,o,l,a]),m=de.useCallback(p=>{let{active:g,selected:b}=p,v={role:"option",...g&&{id:o+"-option"}};switch(a){case"select":return{...v,"aria-selected":g&&b};case"combobox":return{...v,...g&&{"aria-selected":!0}}}return{}},[o,a]);return de.useMemo(()=>i?{reference:u,floating:f,item:m}:{},[i,u,f,m])}var O4=y(O(),1),pm=y(D(),1);var wEe=y(D(),1);var kEe=y(O(),1);var[mj,dr]=Zt("ScrollArea.Root component was not found in tree");function Ls(e,t){let r=Vi(t);Uo(()=>{let n=0;if(e){let o=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(r)});return o.observe(e),()=>{window.cancelAnimationFrame(n),o.unobserve(e)}}},[e,r])}var fse=(0,pm.forwardRef)((e,t)=>{let{style:r,...n}=e,o=dr(),[i,a]=(0,pm.useState)(0),[s,l]=(0,pm.useState)(0),c=!!(i&&s);return Ls(o.scrollbarX,()=>{let d=o.scrollbarX?.offsetHeight||0;o.onCornerHeightChange(d),l(d)}),Ls(o.scrollbarY,()=>{let d=o.scrollbarY?.offsetWidth||0;o.onCornerWidthChange(d),a(d)}),c?(0,O4.jsx)("div",{...n,ref:t,style:{...r,width:i,height:s}}):null}),pj=(0,pm.forwardRef)((e,t)=>{let r=dr(),n=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&n?(0,O4.jsx)(fse,{...e,ref:t}):null});var z4=y(O(),1),pi=y(D(),1);var mse={scrollHideDelay:1e3,type:"hover"},N4=(0,pi.forwardRef)((e,t)=>{let r=z("ScrollAreaRoot",mse,e),{type:n,scrollHideDelay:o,scrollbars:i,...a}=r,[s,l]=(0,pi.useState)(null),[c,d]=(0,pi.useState)(null),[u,f]=(0,pi.useState)(null),[m,p]=(0,pi.useState)(null),[g,b]=(0,pi.useState)(null),[v,x]=(0,pi.useState)(0),[_,I]=(0,pi.useState)(0),[S,w]=(0,pi.useState)(!1),[P,$]=(0,pi.useState)(!1),B=Ze(t,W=>l(W));return(0,z4.jsx)(mj,{value:{type:n,scrollHideDelay:o,scrollArea:s,viewport:c,onViewportChange:d,content:u,onContentChange:f,scrollbarX:m,onScrollbarXChange:p,scrollbarXEnabled:S,onScrollbarXEnabledChange:w,scrollbarY:g,onScrollbarYChange:b,scrollbarYEnabled:P,onScrollbarYEnabledChange:$,onCornerWidthChange:x,onCornerHeightChange:I},children:(0,z4.jsx)(F,{...a,ref:B,__vars:{"--sa-corner-width":i!=="xy"?"0px":`${v}px`,"--sa-corner-height":i!=="xy"?"0px":`${_}px`}})})});N4.displayName="@mantine/core/ScrollAreaRoot";var Yg=y(O(),1),EI=y(D(),1);var bj=y(O(),1),TI=y(D(),1);var U4=y(O(),1),Wd=y(D(),1);function CI(e,t){let r=e/t;return Number.isNaN(r)?0:r}function ic(e){let t=CI(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function PI(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function pse(e,[t,r]){return Math.min(r,Math.max(t,e))}function F4(e,t,r="ltr"){let n=ic(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-o,a=t.content-t.viewport,s=i-n,l=r==="ltr"?[0,a]:[a*-1,0],c=pse(e,l);return PI([0,a],[0,s])(c)}function hj(e,t,r,n="ltr"){let o=ic(r),i=o/2,a=t||i,s=o-a,l=r.scrollbar.paddingStart+a,c=r.scrollbar.size-r.scrollbar.paddingEnd-s,d=r.content-r.viewport,u=n==="ltr"?[0,d]:[d*-1,0];return PI([l,c],u)(e)}var vj=y(O(),1),ac=y(D(),1);function DI(e,t){return e>0&&e<t}function ra(e){return e?parseInt(e,10):0}var M4=y(O(),1),La=y(D(),1);function Fa(e,t,{checkForDefaultPrevented:r=!0}={}){return n=>{e?.(n),(r===!1||!n.defaultPrevented)&&t?.(n)}}var YEe=y(D(),1);var e$e=y(O(),1);var[gj,L4]=Zt("ScrollAreaScrollbar was not found in tree");var RI=(0,La.forwardRef)((e,t)=>{let{sizes:r,hasThumb:n,onThumbChange:o,onThumbPointerUp:i,onThumbPointerDown:a,onThumbPositionChange:s,onDragScroll:l,onWheelScroll:c,onResize:d,...u}=e,f=dr(),[m,p]=(0,La.useState)(null),g=Ze(t,$=>p($)),b=(0,La.useRef)(null),v=(0,La.useRef)(""),{viewport:x}=f,_=r.content-r.viewport,I=Vi(c),S=Vi(s),w=Is(d,10),P=$=>{if(b.current){let B=$.clientX-b.current.left,W=$.clientY-b.current.top;l({x:B,y:W})}};return(0,La.useEffect)(()=>{let $=B=>{let W=B.target;m?.contains(W)&&I(B,_)};return document.addEventListener("wheel",$,{passive:!1}),()=>document.removeEventListener("wheel",$,{passive:!1})},[x,m,_,I]),(0,La.useEffect)(S,[r,S]),Ls(m,w),Ls(f.content,w),(0,M4.jsx)(gj,{value:{scrollbar:m,hasThumb:n,onThumbChange:Vi(o),onThumbPointerUp:Vi(i),onThumbPositionChange:S,onThumbPointerDown:Vi(a)},children:(0,M4.jsx)("div",{...u,ref:g,"data-mantine-scrollbar":!0,style:{position:"absolute",...u.style},onPointerDown:Fa(e.onPointerDown,$=>{$.preventDefault(),$.button===0&&($.target.setPointerCapture($.pointerId),b.current=m.getBoundingClientRect(),v.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",P($))}),onPointerMove:Fa(e.onPointerMove,P),onPointerUp:Fa(e.onPointerUp,$=>{let B=$.target;B.hasPointerCapture($.pointerId)&&($.preventDefault(),B.releasePointerCapture($.pointerId))}),onLostPointerCapture:()=>{document.body.style.webkitUserSelect=v.current,b.current=null}})})});var B4=(0,ac.forwardRef)((e,t)=>{let{sizes:r,onSizesChange:n,style:o,...i}=e,a=dr(),[s,l]=(0,ac.useState)(),c=(0,ac.useRef)(null),d=Ze(t,c,a.onScrollbarXChange);return(0,ac.useEffect)(()=>{c.current&&l(getComputedStyle(c.current))},[c]),(0,vj.jsx)(RI,{"data-orientation":"horizontal",...i,ref:d,sizes:r,style:{...o,"--sa-thumb-width":`${ic(r)}px`},onThumbPointerDown:u=>e.onThumbPointerDown(u.x),onDragScroll:u=>e.onDragScroll(u.x),onWheelScroll:(u,f)=>{if(a.viewport){let m=a.viewport.scrollLeft+u.deltaX;e.onWheelScroll(m),DI(m,f)&&u.preventDefault()}},onResize:()=>{c.current&&a.viewport&&s&&n({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:ra(s.paddingLeft),paddingEnd:ra(s.paddingRight)}})}})});B4.displayName="@mantine/core/ScrollAreaScrollbarX";var xj=y(O(),1),sc=y(D(),1);var j4=(0,sc.forwardRef)((e,t)=>{let{sizes:r,onSizesChange:n,style:o,...i}=e,a=dr(),[s,l]=(0,sc.useState)(),c=(0,sc.useRef)(null),d=Ze(t,c,a.onScrollbarYChange);return(0,sc.useEffect)(()=>{c.current&&l(window.getComputedStyle(c.current))},[]),(0,xj.jsx)(RI,{...i,"data-orientation":"vertical",ref:d,sizes:r,style:{"--sa-thumb-height":`${ic(r)}px`,...o},onThumbPointerDown:u=>e.onThumbPointerDown(u.y),onDragScroll:u=>e.onDragScroll(u.y),onWheelScroll:(u,f)=>{if(a.viewport){let m=a.viewport.scrollTop+u.deltaY;e.onWheelScroll(m),DI(m,f)&&u.preventDefault()}},onResize:()=>{c.current&&a.viewport&&s&&n({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:ra(s.paddingTop),paddingEnd:ra(s.paddingBottom)}})}})});j4.displayName="@mantine/core/ScrollAreaScrollbarY";var Zd=(0,Wd.forwardRef)((e,t)=>{let{orientation:r="vertical",...n}=e,{dir:o}=ii(),i=dr(),a=(0,Wd.useRef)(null),s=(0,Wd.useRef)(0),[l,c]=(0,Wd.useState)({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),d=CI(l.viewport,l.content),u={...n,sizes:l,onSizesChange:c,hasThumb:d>0&&d<1,onThumbChange:m=>{a.current=m},onThumbPointerUp:()=>{s.current=0},onThumbPointerDown:m=>{s.current=m}},f=(m,p)=>hj(m,s.current,l,p);return r==="horizontal"?(0,U4.jsx)(B4,{...u,ref:t,onThumbPositionChange:()=>{if(i.viewport&&a.current){let m=i.viewport.scrollLeft,p=F4(m,l,o);a.current.style.transform=`translate3d(${p}px, 0, 0)`}},onWheelScroll:m=>{i.viewport&&(i.viewport.scrollLeft=m)},onDragScroll:m=>{i.viewport&&(i.viewport.scrollLeft=f(m,o))}}):r==="vertical"?(0,U4.jsx)(j4,{...u,ref:t,onThumbPositionChange:()=>{if(i.viewport&&a.current){let m=i.viewport.scrollTop,p=F4(m,l);l.scrollbar.size===0?a.current.style.setProperty("--thumb-opacity","0"):a.current.style.setProperty("--thumb-opacity","1"),a.current.style.transform=`translate3d(0, ${p}px, 0)`}},onWheelScroll:m=>{i.viewport&&(i.viewport.scrollTop=m)},onDragScroll:m=>{i.viewport&&(i.viewport.scrollTop=f(m))}}):null});Zd.displayName="@mantine/core/ScrollAreaScrollbarVisible";var Qg=(0,TI.forwardRef)((e,t)=>{let r=dr(),{forceMount:n,...o}=e,[i,a]=(0,TI.useState)(!1),s=e.orientation==="horizontal",l=Is(()=>{if(r.viewport){let c=r.viewport.offsetWidth<r.viewport.scrollWidth,d=r.viewport.offsetHeight<r.viewport.scrollHeight;a(s?c:d)}},10);return Ls(r.viewport,l),Ls(r.content,l),n||i?(0,bj.jsx)(Zd,{"data-state":i?"visible":"hidden",...o,ref:t}):null});Qg.displayName="@mantine/core/ScrollAreaScrollbarAuto";var yj=y(O(),1),hm=y(D(),1);var V4=(0,hm.forwardRef)((e,t)=>{let{forceMount:r,...n}=e,o=dr(),[i,a]=(0,hm.useState)(!1);return(0,hm.useEffect)(()=>{let{scrollArea:s}=o,l=0;if(s){let c=()=>{window.clearTimeout(l),a(!0)},d=()=>{l=window.setTimeout(()=>a(!1),o.scrollHideDelay)};return s.addEventListener("pointerenter",c),s.addEventListener("pointerleave",d),()=>{window.clearTimeout(l),s.removeEventListener("pointerenter",c),s.removeEventListener("pointerleave",d)}}},[o.scrollArea,o.scrollHideDelay]),r||i?(0,yj.jsx)(Qg,{"data-state":i?"visible":"hidden",...n,ref:t}):null});V4.displayName="@mantine/core/ScrollAreaScrollbarHover";var _j=y(O(),1),Gd=y(D(),1);var Ij=(0,Gd.forwardRef)((e,t)=>{let{forceMount:r,...n}=e,o=dr(),i=e.orientation==="horizontal",[a,s]=(0,Gd.useState)("hidden"),l=Is(()=>s("idle"),100);return(0,Gd.useEffect)(()=>{if(a==="idle"){let c=window.setTimeout(()=>s("hidden"),o.scrollHideDelay);return()=>window.clearTimeout(c)}},[a,o.scrollHideDelay]),(0,Gd.useEffect)(()=>{let{viewport:c}=o,d=i?"scrollLeft":"scrollTop";if(c){let u=c[d],f=()=>{let m=c[d];u!==m&&(s("scrolling"),l()),u=m};return c.addEventListener("scroll",f),()=>c.removeEventListener("scroll",f)}},[o.viewport,i,l]),r||a!=="hidden"?(0,_j.jsx)(Zd,{"data-state":a==="hidden"?"hidden":"visible",...n,ref:t,onPointerEnter:Fa(e.onPointerEnter,()=>s("interacting")),onPointerLeave:Fa(e.onPointerLeave,()=>s("idle"))}):null});var $I=(0,EI.forwardRef)((e,t)=>{let{forceMount:r,...n}=e,o=dr(),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:a}=o,s=e.orientation==="horizontal";return(0,EI.useEffect)(()=>(s?i(!0):a(!0),()=>{s?i(!1):a(!1)}),[s,i,a]),o.type==="hover"?(0,Yg.jsx)(V4,{...n,ref:t,forceMount:r}):o.type==="scroll"?(0,Yg.jsx)(Ij,{...n,ref:t,forceMount:r}):o.type==="auto"?(0,Yg.jsx)(Qg,{...n,ref:t,forceMount:r}):o.type==="always"?(0,Yg.jsx)(Zd,{...n,ref:t}):null});$I.displayName="@mantine/core/ScrollAreaScrollbar";var H4=y(O(),1),Kd=y(D(),1);function wj(e,t=()=>{}){let r={left:e.scrollLeft,top:e.scrollTop},n=0;return(function o(){let i={left:e.scrollLeft,top:e.scrollTop},a=r.left!==i.left,s=r.top!==i.top;(a||s)&&t(),r=i,n=window.requestAnimationFrame(o)})(),()=>window.cancelAnimationFrame(n)}var Sj=(0,Kd.forwardRef)((e,t)=>{let{style:r,...n}=e,o=dr(),i=L4(),{onThumbPositionChange:a}=i,s=Ze(t,d=>i.onThumbChange(d)),l=(0,Kd.useRef)(void 0),c=Is(()=>{l.current&&(l.current(),l.current=void 0)},100);return(0,Kd.useEffect)(()=>{let{viewport:d}=o;if(d){let u=()=>{if(c(),!l.current){let f=wj(d,a);l.current=f,a()}};return a(),d.addEventListener("scroll",u),()=>d.removeEventListener("scroll",u)}},[o.viewport,c,a]),(0,H4.jsx)("div",{"data-state":i.hasThumb?"visible":"hidden",...n,ref:s,style:{width:"var(--sa-thumb-width)",height:"var(--sa-thumb-height)",...r},onPointerDownCapture:Fa(e.onPointerDownCapture,d=>{let f=d.target.getBoundingClientRect(),m=d.clientX-f.left,p=d.clientY-f.top;i.onThumbPointerDown({x:m,y:p})}),onPointerUp:Fa(e.onPointerUp,i.onThumbPointerUp)})});Sj.displayName="@mantine/core/ScrollAreaThumb";var AI=(0,Kd.forwardRef)((e,t)=>{let{forceMount:r,...n}=e,o=L4();return r||o.hasThumb?(0,H4.jsx)(Sj,{ref:t,...n}):null});AI.displayName="@mantine/core/ScrollAreaThumb";var W4=y(O(),1),kj=y(D(),1);var Z4=(0,kj.forwardRef)(({children:e,style:t,...r},n)=>{let o=dr(),i=Ze(n,o.onViewportChange);return(0,W4.jsx)(F,{...r,ref:i,style:{overflowX:o.scrollbarXEnabled?"scroll":"hidden",overflowY:o.scrollbarYEnabled?"scroll":"hidden",...t},children:(0,W4.jsx)("div",{style:{minWidth:"100%"},ref:o.onContentChange,children:e})})});Z4.displayName="@mantine/core/ScrollAreaViewport";var OI={root:"m_d57069b5",viewport:"m_c0783ff9",viewportInner:"m_f8f631dd",scrollbar:"m_c44ba933",thumb:"m_d8b5e363",corner:"m_21657268"};var Cj={scrollHideDelay:1e3,type:"hover",scrollbars:"xy"},hse=(e,{scrollbarSize:t,overscrollBehavior:r})=>({root:{"--scrollarea-scrollbar-size":Z(t),"--scrollarea-over-scroll-behavior":r}}),zr=M((e,t)=>{let r=z("ScrollArea",Cj,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,scrollbarSize:l,vars:c,type:d,scrollHideDelay:u,viewportProps:f,viewportRef:m,onScrollPositionChange:p,children:g,offsetScrollbars:b,scrollbars:v,onBottomReached:x,onTopReached:_,overscrollBehavior:I,...S}=r,[w,P]=(0,lc.useState)(!1),[$,B]=(0,lc.useState)(!1),[W,H]=(0,lc.useState)(!1),K=q({name:"ScrollArea",props:r,classes:OI,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:c,varsResolver:hse}),T=(0,lc.useRef)(null),k=rj([m,T]);return(0,lc.useEffect)(()=>{if(!T.current||b!=="present")return;let E=T.current,C=new ResizeObserver(()=>{let{scrollHeight:A,clientHeight:R,scrollWidth:N,clientWidth:U}=E;B(A>R),H(N>U)});return C.observe(E),()=>C.disconnect()},[T,b]),(0,hi.jsxs)(N4,{type:d==="never"?"always":d,scrollHideDelay:u,ref:t,scrollbars:v,...K("root"),...S,children:[(0,hi.jsx)(Z4,{...f,...K("viewport",{style:f?.style}),ref:k,"data-offset-scrollbars":b===!0?"xy":b||void 0,"data-scrollbars":v||void 0,"data-horizontal-hidden":b==="present"&&!W?"true":void 0,"data-vertical-hidden":b==="present"&&!$?"true":void 0,onScroll:E=>{f?.onScroll?.(E),p?.({x:E.currentTarget.scrollLeft,y:E.currentTarget.scrollTop});let{scrollTop:C,scrollHeight:A,clientHeight:R}=E.currentTarget;C-(A-R)>=-.6&&x?.(),C===0&&_?.()},children:g}),(v==="xy"||v==="x")&&(0,hi.jsx)($I,{...K("scrollbar"),orientation:"horizontal","data-hidden":d==="never"||b==="present"&&!W?!0:void 0,forceMount:!0,onMouseEnter:()=>P(!0),onMouseLeave:()=>P(!1),children:(0,hi.jsx)(AI,{...K("thumb")})}),(v==="xy"||v==="y")&&(0,hi.jsx)($I,{...K("scrollbar"),orientation:"vertical","data-hidden":d==="never"||b==="present"&&!$?!0:void 0,forceMount:!0,onMouseEnter:()=>P(!0),onMouseLeave:()=>P(!1),children:(0,hi.jsx)(AI,{...K("thumb")})}),(0,hi.jsx)(pj,{...K("corner"),"data-hovered":w||void 0,"data-hidden":d==="never"||void 0})]})});zr.displayName="@mantine/core/ScrollArea";var zI=M((e,t)=>{let{children:r,classNames:n,styles:o,scrollbarSize:i,scrollHideDelay:a,type:s,dir:l,offsetScrollbars:c,viewportRef:d,onScrollPositionChange:u,unstyled:f,variant:m,viewportProps:p,scrollbars:g,style:b,vars:v,onBottomReached:x,onTopReached:_,...I}=z("ScrollAreaAutosize",Cj,e);return(0,hi.jsx)(F,{...I,ref:t,style:[{display:"flex",overflow:"auto"},b],children:(0,hi.jsx)(F,{style:{display:"flex",flexDirection:"column",flex:1},children:(0,hi.jsx)(zr,{classNames:n,styles:o,scrollHideDelay:a,scrollbarSize:i,type:s,dir:l,offsetScrollbars:c,viewportRef:d,onScrollPositionChange:u,unstyled:f,variant:m,viewportProps:p,vars:v,scrollbars:g,onBottomReached:x,onTopReached:_,children:r})})})});zr.classes=OI;zI.displayName="@mantine/core/ScrollAreaAutosize";zI.classes=OI;zr.Autosize=zI;var Pj=y(O(),1),kAe=y(D(),1);var G4={root:"m_87cf2631"};var gse={__staticSelector:"UnstyledButton"},_t=nt((e,t)=>{let r=z("UnstyledButton",gse,e),{className:n,component:o="button",__staticSelector:i,unstyled:a,classNames:s,styles:l,style:c,...d}=r,u=q({name:i,props:r,classes:G4,className:n,style:c,classNames:s,styles:l,unstyled:a});return(0,Pj.jsx)(F,{...u("root",{focusable:!0}),component:o,ref:t,type:o==="button"?"button":void 0,...d})});_t.classes=G4;_t.displayName="@mantine/core/UnstyledButton";var Dj=y(O(),1),OAe=y(D(),1);var K4={root:"m_515a97f8"};var vse={},NI=M((e,t)=>{let r=z("VisuallyHidden",vse,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,...c}=r,d=q({name:"VisuallyHidden",classes:K4,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s});return(0,Dj.jsx)(F,{component:"span",ref:t,...d("root"),...c})});NI.classes=K4;NI.displayName="@mantine/core/VisuallyHidden";var Rj=y(O(),1),VAe=y(D(),1);var q4={root:"m_1b7284a3"};var xse={},bse=(e,{radius:t,shadow:r})=>({root:{"--paper-radius":t===void 0?void 0:Ee(t),"--paper-shadow":bf(r)}}),oa=nt((e,t)=>{let r=z("Paper",xse,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,withBorder:l,vars:c,radius:d,shadow:u,variant:f,mod:m,...p}=r,g=q({name:"Paper",props:r,classes:q4,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:c,varsResolver:bse});return(0,Rj.jsx)(F,{ref:t,mod:[{"data-with-border":l},m],...g("root"),variant:f,...p})});oa.classes=q4;oa.displayName="@mantine/core/Paper";var bm=y(O(),1),Ma=y(D(),1);function FI(e,t){if(e==="rtl"&&(t.includes("right")||t.includes("left"))){let[r,n]=t.split("-"),o=r==="right"?"left":"right";return n===void 0?o:`${o}-${n}`}return t}var Aj=y(O(),1),Oj=y(D(),1);function Tj(e,t,r,n){return e==="center"||n==="center"?{top:t}:e==="end"?{bottom:r}:e==="start"?{top:r}:{}}function Ej(e,t,r,n,o){return e==="center"||n==="center"?{left:t}:e==="end"?{[o==="ltr"?"right":"left"]:r}:e==="start"?{[o==="ltr"?"left":"right"]:r}:{}}var yse={bottom:"borderTopLeftRadius",left:"borderTopRightRadius",right:"borderBottomLeftRadius",top:"borderBottomRightRadius"};function $j({position:e,arrowSize:t,arrowOffset:r,arrowRadius:n,arrowPosition:o,arrowX:i,arrowY:a,dir:s}){let[l,c="center"]=e.split("-"),d={width:t,height:t,transform:"rotate(45deg)",position:"absolute",[yse[l]]:n},u=-t/2;return l==="left"?{...d,...Tj(c,a,r,o),right:u,borderLeftColor:"transparent",borderBottomColor:"transparent",clipPath:"polygon(100% 0, 0 0, 100% 100%)"}:l==="right"?{...d,...Tj(c,a,r,o),left:u,borderRightColor:"transparent",borderTopColor:"transparent",clipPath:"polygon(0 100%, 0 0, 100% 100%)"}:l==="top"?{...d,...Ej(c,i,r,o,s),bottom:u,borderTopColor:"transparent",borderLeftColor:"transparent",clipPath:"polygon(0 100%, 100% 100%, 100% 0)"}:l==="bottom"?{...d,...Ej(c,i,r,o,s),top:u,borderBottomColor:"transparent",borderRightColor:"transparent",clipPath:"polygon(0 100%, 0 0, 100% 0)"}:{}}var Jg=(0,Oj.forwardRef)(({position:e,arrowSize:t,arrowOffset:r,arrowRadius:n,arrowPosition:o,visible:i,arrowX:a,arrowY:s,style:l,...c},d)=>{let{dir:u}=ii();return i?(0,Aj.jsx)("div",{...c,ref:d,style:{...l,...$j({position:e,arrowSize:t,arrowOffset:r,arrowRadius:n,arrowPosition:o,dir:u,arrowX:a,arrowY:s})}}):null});Jg.displayName="@mantine/core/FloatingArrow";var zj=y(O(),1);var a5e=y(D(),1);var X4={root:"m_9814e45f"};var _se={zIndex:Rt("modal")},Ise=(e,{gradient:t,color:r,backgroundOpacity:n,blur:o,radius:i,zIndex:a})=>({root:{"--overlay-bg":t||(r!==void 0||n!==void 0)&&ni(r||"#000",n??.6)||void 0,"--overlay-filter":o?`blur(${Z(o)})`:void 0,"--overlay-radius":i===void 0?void 0:Ee(i),"--overlay-z-index":a?.toString()}}),gm=nt((e,t)=>{let r=z("Overlay",_se,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,fixed:c,center:d,children:u,radius:f,zIndex:m,gradient:p,blur:g,color:b,backgroundOpacity:v,mod:x,..._}=r,I=q({name:"Overlay",props:r,classes:X4,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:Ise});return(0,zj.jsx)(F,{ref:t,...I("root"),mod:[{center:d,fixed:c},x],..._,children:u})});gm.classes=X4;gm.displayName="@mantine/core/Overlay";var LI=y(O(),1),MI=y(D(),1),Nj=y(tc(),1);function Q4(e){let 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 wse({target:e,reuseTargetNode:t,...r}){if(e)return typeof e=="string"?document.querySelector(e)||Q4(r):e;if(t){let n=document.querySelector("[data-mantine-shared-portal-node]");if(n)return n;let o=Q4(r);return o.setAttribute("data-mantine-shared-portal-node","true"),document.body.appendChild(o),o}return Q4(r)}var Sse={},Y4=M((e,t)=>{let{children:r,target:n,reuseTargetNode:o,...i}=z("Portal",Sse,e),[a,s]=(0,MI.useState)(!1),l=(0,MI.useRef)(null);return Uo(()=>(s(!0),l.current=wse({target:n,reuseTargetNode:o,...i}),gd(t,l.current),!n&&!o&&l.current&&document.body.appendChild(l.current),()=>{!n&&!o&&l.current&&document.body.removeChild(l.current)}),[n]),!a||!l.current?null:(0,Nj.createPortal)((0,LI.jsx)(LI.Fragment,{children:r}),l.current)});Y4.displayName="@mantine/core/Portal";var ev=y(O(),1),I5e=y(D(),1);var Sn=M(({withinPortal:e=!0,children:t,...r},n)=>Ay()==="test"||!e?(0,ev.jsx)(ev.Fragment,{children:t}):(0,ev.jsx)(Y4,{ref:n,...r,children:t}));Sn.displayName="@mantine/core/OptionalPortal";var vm=y(O(),1),N5e=y(D(),1);var tv=e=>({in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:`scale(.9) translateY(${e==="bottom"?10:-10}px)`},transitionProperty:"transform, opacity"}),rv={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:{...tv("bottom"),common:{transformOrigin:"center center"}},"pop-bottom-left":{...tv("bottom"),common:{transformOrigin:"bottom left"}},"pop-bottom-right":{...tv("bottom"),common:{transformOrigin:"bottom right"}},"pop-top-left":{...tv("top"),common:{transformOrigin:"top left"}},"pop-top-right":{...tv("top"),common:{transformOrigin:"top right"}}};var Fj={entering:"in",entered:"in",exiting:"out",exited:"out","pre-exiting":"out","pre-entering":"out"};function Lj({transition:e,state:t,duration:r,timingFunction:n}){let o={WebkitBackfaceVisibility:"hidden",willChange:"transform, opacity",transitionDuration:`${r}ms`,transitionTimingFunction:n};return typeof e=="string"?e in rv?{transitionProperty:rv[e].transitionProperty,...o,...rv[e].common,...rv[e][Fj[t]]}:{}:{transitionProperty:e.transitionProperty,...o,...e.common,...e[Fj[t]]}}var Ms=y(D(),1),Mj=y(tc(),1);var $5e=y(O(),1);function Bj({duration:e,exitDuration:t,timingFunction:r,mounted:n,onEnter:o,onExit:i,onEntered:a,onExited:s,enterDelay:l,exitDelay:c}){let d=ut(),u=Ss(),f=d.respectReducedMotion?u:!1,[m,p]=(0,Ms.useState)(f?0:e),[g,b]=(0,Ms.useState)(n?"entered":"exited"),v=(0,Ms.useRef)(-1),x=(0,Ms.useRef)(-1),_=(0,Ms.useRef)(-1);function I(){window.clearTimeout(v.current),window.clearTimeout(x.current),cancelAnimationFrame(_.current)}let S=P=>{I();let $=P?o:i,B=P?a:s,W=f?0:P?e:t;p(W),W===0?(typeof $=="function"&&$(),typeof B=="function"&&B(),b(P?"entered":"exited")):_.current=requestAnimationFrame(()=>{Mj.default.flushSync(()=>{b(P?"pre-entering":"pre-exiting")}),_.current=requestAnimationFrame(()=>{typeof $=="function"&&$(),b(P?"entering":"exiting"),v.current=window.setTimeout(()=>{typeof B=="function"&&B(),b(P?"entered":"exited")},W)})})},w=P=>{if(I(),typeof(P?l:c)!="number"){S(P);return}x.current=window.setTimeout(()=>{S(P)},P?l:c)};return _r(()=>{w(n)},[n]),(0,Ms.useEffect)(()=>()=>{I()},[]),{transitionDuration:m,transitionStatus:g,transitionTimingFunction:r||"ease"}}function Go({keepMounted:e,transition:t="fade",duration:r=250,exitDuration:n=r,mounted:o,children:i,timingFunction:a="ease",onExit:s,onEntered:l,onEnter:c,onExited:d,enterDelay:u,exitDelay:f}){let m=Ay(),{transitionDuration:p,transitionStatus:g,transitionTimingFunction:b}=Bj({mounted:o,exitDuration:n,duration:r,timingFunction:a,onExit:s,onEntered:l,onEnter:c,onExited:d,enterDelay:u,exitDelay:f});return p===0||m==="test"?o?(0,vm.jsx)(vm.Fragment,{children:i({})}):e?i({display:"none"}):null:g==="exited"?e?i({display:"none"}):null:(0,vm.jsx)(vm.Fragment,{children:i(Lj({transition:t,duration:p,state:g,timingFunction:b}))})}Go.displayName="@mantine/core/Transition";var U5e=y(D(),1);var H5e=y(O(),1);var[jj,BI]=Zt("Popover component was not found in the tree");var qd=y(O(),1);var tOe=y(D(),1);var Uj=y(O(),1),Vj=y(D(),1);function xm({children:e,active:t=!0,refProp:r="ref",innerRef:n}){let o=T2(t),i=Ze(o,n);return ko(e)?(0,Vj.cloneElement)(e,{[r]:i}):e}function Hj(e){return(0,Uj.jsx)(NI,{tabIndex:-1,"data-autofocus":!0,...e})}xm.displayName="@mantine/core/FocusTrap";Hj.displayName="@mantine/core/FocusTrapInitialFocus";xm.InitialFocus=Hj;var jI={dropdown:"m_38a85659",arrow:"m_a31dc6c1",overlay:"m_3d7bc908"};var kse={},UI=M((e,t)=>{let r=z("PopoverDropdown",kse,e),{className:n,style:o,vars:i,children:a,onKeyDownCapture:s,variant:l,classNames:c,styles:d,...u}=r,f=BI(),m=Bh({opened:f.opened,shouldReturnFocus:f.returnFocus}),p=f.withRoles?{"aria-labelledby":f.getTargetId(),id:f.getDropdownId(),role:"dialog",tabIndex:-1}:{},g=Ze(t,f.floating);return f.disabled?null:(0,qd.jsx)(Sn,{...f.portalProps,withinPortal:f.withinPortal,children:(0,qd.jsx)(Go,{mounted:f.opened,...f.transitionProps,transition:f.transitionProps?.transition||"fade",duration:f.transitionProps?.duration??150,keepMounted:f.keepMounted,exitDuration:typeof f.transitionProps?.exitDuration=="number"?f.transitionProps.exitDuration:f.transitionProps?.duration,children:b=>(0,qd.jsx)(xm,{active:f.trapFocus&&f.opened,innerRef:g,children:(0,qd.jsxs)(F,{...p,...u,variant:l,onKeyDownCapture:tL(()=>{f.onClose?.(),f.onDismiss?.()},{active:f.closeOnEscape,onTrigger:m,onKeyDown:s}),"data-position":f.placement,"data-fixed":f.floatingStrategy==="fixed"||void 0,...f.getStyles("dropdown",{className:n,props:r,classNames:c,styles:d,style:[{...b,zIndex:f.zIndex,top:f.y??0,left:f.x??0,width:f.width==="target"?void 0:Z(f.width)},f.resolvedStyles.dropdown,d?.dropdown,o]}),children:[a,(0,qd.jsx)(Jg,{ref:f.arrowRef,arrowX:f.arrowX,arrowY:f.arrowY,visible:f.withArrow,position:f.placement,arrowSize:f.arrowSize,arrowRadius:f.arrowRadius,arrowOffset:f.arrowOffset,arrowPosition:f.arrowPosition,...f.getStyles("arrow",{props:r,classNames:c,styles:d})})]})})})})});UI.classes=jI;UI.displayName="@mantine/core/PopoverDropdown";var Wj=y(D(),1);var vOe=y(O(),1);var Cse={refProp:"ref",popupType:"dialog"},J4=M((e,t)=>{let{children:r,refProp:n,popupType:o,...i}=z("PopoverTarget",Cse,e);if(!ko(r))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");let a=i,s=BI(),l=Ze(s.reference,El(r),t),c=s.withRoles?{"aria-haspopup":o,"aria-expanded":s.opened,"aria-controls":s.getDropdownId(),id:s.getTargetId()}:{};return(0,Wj.cloneElement)(r,{...a,...c,...s.targetProps,className:qe(s.targetProps.className,a.className,r.props.className),[n]:l,...s.controlled?null:{onClick:s.onToggle}})});J4.displayName="@mantine/core/PopoverTarget";var Zj=y(D(),1);var VI=y(D(),1);function HI({opened:e,floating:t,position:r,positionDependencies:n}){let[o,i]=(0,VI.useState)(0);(0,VI.useEffect)(()=>{if(t.refs.reference.current&&t.refs.floating.current&&e)return yI(t.refs.reference.current,t.refs.floating.current,t.update)},[t.refs.reference.current,t.refs.floating.current,e,o,r]),_r(()=>{t.update()},n),_r(()=>{i(a=>a+1)},[e])}function Pse(e){if(e===void 0)return{shift:!0,flip:!0};let t={...e};return e.shift===void 0&&(t.shift=!0),e.flip===void 0&&(t.flip=!0),t}function Dse(e,t){let r=Pse(e.middlewares),n=[um(e.offset)];return r.shift&&n.push(Vd(typeof r.shift=="boolean"?{limiter:SI(),padding:5}:{limiter:SI(),padding:5,...r.shift})),r.flip&&n.push(typeof r.flip=="boolean"?Hd():Hd(r.flip)),r.inline&&n.push(typeof r.inline=="boolean"?nc():nc(r.inline)),n.push(Xg({element:e.arrowRef,padding:e.arrowOffset})),(r.size||e.width==="target")&&n.push(C4({...typeof r.size=="boolean"?{}:r.size,apply({rects:o,availableWidth:i,availableHeight:a,...s}){let c=t().refs.floating.current?.style??{};r.size&&(typeof r.size=="object"&&r.size.apply?r.size.apply({rects:o,availableWidth:i,availableHeight:a,...s}):Object.assign(c,{maxWidth:`${i}px`,maxHeight:`${a}px`})),e.width==="target"&&Object.assign(c,{width:`${o.reference.width}px`})}})),n}function Gj(e){let[t,r]=ot({value:e.opened,defaultValue:e.defaultOpened,finalValue:!1,onChange:e.onChange}),n=(0,Zj.useRef)(t),o=()=>{t&&!e.disabled&&r(!1)},i=()=>!e.disabled&&r(!t),a=mm({strategy:e.strategy,placement:e.position,middleware:Dse(e,()=>a)});return HI({opened:t,position:e.position,positionDependencies:e.positionDependencies||[],floating:a}),_r(()=>{e.onPositionChange?.(a.placement)},[a.placement]),_r(()=>{t!==n.current&&(t?e.onOpen?.():e.onClose?.()),n.current=t},[t,e.onClose,e.onOpen]),{floating:a,controlled:typeof e.opened=="boolean",opened:t,onClose:o,onToggle:i}}var Rse={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,clickOutsideEvents:["mousedown","touchstart"],zIndex:Rt("popover"),__staticSelector:"Popover",width:"max-content"},Tse=(e,{radius:t,shadow:r})=>({dropdown:{"--popover-radius":t===void 0?void 0:Ee(t),"--popover-shadow":bf(r)}});function Xr(e){let t=z("Popover",Rse,e),{children:r,position:n,offset:o,onPositionChange:i,positionDependencies:a,opened:s,transitionProps:l,onExitTransitionEnd:c,onEnterTransitionEnd:d,width:u,middlewares:f,withArrow:m,arrowSize:p,arrowOffset:g,arrowRadius:b,arrowPosition:v,unstyled:x,classNames:_,styles:I,closeOnClickOutside:S,withinPortal:w,portalProps:P,closeOnEscape:$,clickOutsideEvents:B,trapFocus:W,onClose:H,onDismiss:K,onOpen:T,onChange:k,zIndex:E,radius:C,shadow:A,id:R,defaultOpened:N,__staticSelector:U,withRoles:G,disabled:re,returnFocus:ve,variant:he,keepMounted:Q,vars:ne,floatingStrategy:we,withOverlay:se,overlayProps:Ae,...We}=t,et=q({name:U,props:t,classes:jI,classNames:_,styles:I,unstyled:x,rootSelector:"dropdown",vars:ne,varsResolver:Tse}),{resolvedStyles:ct}=Zr({classNames:_,styles:I,props:t}),Ne=(0,Ma.useRef)(null),[Yt,Jt]=(0,Ma.useState)(null),[co,ge]=(0,Ma.useState)(null),{dir:me}=ii(),ke=gt(R),Oe=Gj({middlewares:f,width:u,position:FI(me,n),offset:typeof o=="number"?o+(m?p/2:0):o,arrowRef:Ne,arrowOffset:g,onPositionChange:i,positionDependencies:a,opened:s,defaultOpened:N,onChange:k,onOpen:T,onClose:H,onDismiss:K,strategy:we,disabled:re});P2(()=>{S&&(Oe.onClose(),K?.())},B,[Yt,co]);let Ye=(0,Ma.useCallback)(Te=>{Jt(Te),Oe.floating.refs.setReference(Te)},[Oe.floating.refs.setReference]),Me=(0,Ma.useCallback)(Te=>{ge(Te),Oe.floating.refs.setFloating(Te)},[Oe.floating.refs.setFloating]),tt=(0,Ma.useCallback)(()=>{l?.onExited?.(),c?.()},[l?.onExited,c]),fe=(0,Ma.useCallback)(()=>{l?.onEntered?.(),d?.()},[l?.onEntered,d]);return(0,bm.jsxs)(jj,{value:{returnFocus:ve,disabled:re,controlled:Oe.controlled,reference:Ye,floating:Me,x:Oe.floating.x,y:Oe.floating.y,arrowX:Oe.floating?.middlewareData?.arrow?.x,arrowY:Oe.floating?.middlewareData?.arrow?.y,opened:Oe.opened,arrowRef:Ne,transitionProps:{...l,onExited:tt,onEntered:fe},width:u,withArrow:m,arrowSize:p,arrowOffset:g,arrowRadius:b,arrowPosition:v,placement:Oe.floating.placement,trapFocus:W,withinPortal:w,portalProps:P,zIndex:E,radius:C,shadow:A,closeOnEscape:$,onDismiss:K,onClose:Oe.onClose,onToggle:Oe.onToggle,getTargetId:()=>`${ke}-target`,getDropdownId:()=>`${ke}-dropdown`,withRoles:G,targetProps:We,__staticSelector:U,classNames:_,styles:I,unstyled:x,variant:he,keepMounted:Q,getStyles:et,resolvedStyles:ct,floatingStrategy:we},children:[r,se&&(0,bm.jsx)(Go,{transition:"fade",mounted:Oe.opened,duration:l?.duration||250,exitDuration:l?.exitDuration||250,children:Te=>(0,bm.jsx)(Sn,{withinPortal:w,children:(0,bm.jsx)(gm,{...Ae,...et("overlay",{className:Ae?.className,style:[Te,Ae?.style]})})})})]})}Xr.Target=J4;Xr.Dropdown=UI;Xr.displayName="@mantine/core/Popover";Xr.extend=e=>e;var Xd=y(O(),1),Mze=y(D(),1);var o6=y(O(),1),sze=y(D(),1);var ym=y(O(),1),Kj=y(D(),1);var Ko={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"};var e6=(0,Kj.forwardRef)(({className:e,...t},r)=>(0,ym.jsxs)(F,{component:"span",className:qe(Ko.barsLoader,e),...t,ref:r,children:[(0,ym.jsx)("span",{className:Ko.bar}),(0,ym.jsx)("span",{className:Ko.bar}),(0,ym.jsx)("span",{className:Ko.bar})]}));e6.displayName="@mantine/core/Bars";var _m=y(O(),1),qj=y(D(),1);var t6=(0,qj.forwardRef)(({className:e,...t},r)=>(0,_m.jsxs)(F,{component:"span",className:qe(Ko.dotsLoader,e),...t,ref:r,children:[(0,_m.jsx)("span",{className:Ko.dot}),(0,_m.jsx)("span",{className:Ko.dot}),(0,_m.jsx)("span",{className:Ko.dot})]}));t6.displayName="@mantine/core/Dots";var Xj=y(O(),1),Qj=y(D(),1);var r6=(0,Qj.forwardRef)(({className:e,...t},r)=>(0,Xj.jsx)(F,{component:"span",className:qe(Ko.ovalLoader,e),...t,ref:r}));r6.displayName="@mantine/core/Oval";var n6={bars:e6,oval:r6,dots:t6},Ese={loaders:n6,type:"oval"},$se=(e,{size:t,color:r})=>({root:{"--loader-size":xe(t,"loader-size"),"--loader-color":r?Ue(r,e):void 0}}),ho=M((e,t)=>{let r=z("Loader",Ese,e),{size:n,color:o,type:i,vars:a,className:s,style:l,classNames:c,styles:d,unstyled:u,loaders:f,variant:m,children:p,...g}=r,b=q({name:"Loader",props:r,classes:Ko,className:s,style:l,classNames:c,styles:d,unstyled:u,vars:a,varsResolver:$se});return p?(0,o6.jsx)(F,{...b("root"),ref:t,...g,children:p}):(0,o6.jsx)(F,{...b("root"),ref:t,component:f[i],variant:m,size:n,...g})});ho.defaultLoaders=n6;ho.classes=Ko;ho.displayName="@mantine/core/Loader";var Jj=y(O(),1);var Ize=y(D(),1);var Bs={root:"m_8d3f4000",icon:"m_8d3afb97",loader:"m_302b9fb1",group:"m_1a0f1b21",groupSection:"m_437b6484"};var Yj={orientation:"horizontal"},Ase=(e,{borderWidth:t})=>({group:{"--ai-border-width":Z(t)}}),WI=M((e,t)=>{let r=z("ActionIconGroup",Yj,e),{className:n,style:o,classNames:i,styles:a,unstyled:s,orientation:l,vars:c,borderWidth:d,variant:u,mod:f,...m}=z("ActionIconGroup",Yj,e),p=q({name:"ActionIconGroup",props:r,classes:Bs,className:n,style:o,classNames:i,styles:a,unstyled:s,vars:c,varsResolver:Ase,rootSelector:"group"});return(0,Jj.jsx)(F,{...p("group"),ref:t,variant:u,mod:[{"data-orientation":l},f],role:"group",...m})});WI.classes=Bs;WI.displayName="@mantine/core/ActionIconGroup";var tU=y(O(),1),Tze=y(D(),1);var eU={},Ose=(e,{radius:t,color:r,gradient:n,variant:o,autoContrast:i,size:a})=>{let s=e.variantColorResolver({color:r||e.primaryColor,theme:e,gradient:n,variant:o||"filled",autoContrast:i});return{groupSection:{"--section-height":xe(a,"section-height"),"--section-padding-x":xe(a,"section-padding-x"),"--section-fz":kt(a),"--section-radius":t===void 0?void 0:Ee(t),"--section-bg":r||o?s.background:void 0,"--section-color":s.color,"--section-bd":r||o?s.border:void 0}}},ZI=M((e,t)=>{let r=z("ActionIconGroupSection",eU,e),{className:n,style:o,classNames:i,styles:a,unstyled:s,vars:l,variant:c,gradient:d,radius:u,autoContrast:f,...m}=z("ActionIconGroupSection",eU,e),p=q({name:"ActionIconGroupSection",props:r,classes:Bs,className:n,style:o,classNames:i,styles:a,unstyled:s,vars:l,varsResolver:Ose,rootSelector:"groupSection"});return(0,tU.jsx)(F,{...p("groupSection"),ref:t,variant:c,...m})});ZI.classes=Bs;ZI.displayName="@mantine/core/ActionIconGroupSection";var zse={},Nse=(e,{size:t,radius:r,variant:n,gradient:o,color:i,autoContrast:a})=>{let s=e.variantColorResolver({color:i||e.primaryColor,theme:e,gradient:o,variant:n||"filled",autoContrast:a});return{root:{"--ai-size":xe(t,"ai-size"),"--ai-radius":r===void 0?void 0:Ee(r),"--ai-bg":i||n?s.background:void 0,"--ai-hover":i||n?s.hover:void 0,"--ai-hover-color":i||n?s.hoverColor:void 0,"--ai-color":s.color,"--ai-bd":i||n?s.border:void 0}}},vt=nt((e,t)=>{let r=z("ActionIcon",zse,e),{className:n,unstyled:o,variant:i,classNames:a,styles:s,style:l,loading:c,loaderProps:d,size:u,color:f,radius:m,__staticSelector:p,gradient:g,vars:b,children:v,disabled:x,"data-disabled":_,autoContrast:I,mod:S,...w}=r,P=q({name:["ActionIcon",p],props:r,className:n,style:l,classes:Bs,classNames:a,styles:s,unstyled:o,vars:b,varsResolver:Nse});return(0,Xd.jsxs)(_t,{...P("root",{active:!x&&!c&&!_}),...w,unstyled:o,variant:i,size:u,disabled:x||c,ref:t,mod:[{loading:c,disabled:x||_},S],children:[(0,Xd.jsx)(Go,{mounted:!!c,transition:"slide-down",duration:150,children:$=>(0,Xd.jsx)(F,{component:"span",...P("loader",{style:$}),"aria-hidden":!0,children:(0,Xd.jsx)(ho,{color:"var(--ai-color)",size:"calc(var(--ai-size) * 0.55)",...d})})}),(0,Xd.jsx)(F,{component:"span",mod:{loading:c},...P("icon"),children:v})]})});vt.classes=Bs;vt.displayName="@mantine/core/ActionIcon";vt.Group=WI;vt.GroupSection=ZI;var i6=y(O(),1),rU=y(D(),1),a6=(0,rU.forwardRef)(({size:e="var(--cb-icon-size, 70%)",style:t,...r},n)=>(0,i6.jsx)("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{...t,width:e,height:e},ref:n,...r,children:(0,i6.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"})}));a6.displayName="@mantine/core/CloseIcon";var GI=y(O(),1);var r3e=y(D(),1);var s6={root:"m_86a44da5","root--subtle":"m_220c80f2"};var Fse={variant:"subtle"},Lse=(e,{size:t,radius:r,iconSize:n})=>({root:{"--cb-size":xe(t,"cb-size"),"--cb-radius":r===void 0?void 0:Ee(r),"--cb-icon-size":Z(n)}}),gi=nt((e,t)=>{let r=z("CloseButton",Fse,e),{iconSize:n,children:o,vars:i,radius:a,className:s,classNames:l,style:c,styles:d,unstyled:u,"data-disabled":f,disabled:m,variant:p,icon:g,mod:b,__staticSelector:v,...x}=r,_=q({name:v||"CloseButton",props:r,className:s,style:c,classes:s6,classNames:l,styles:d,unstyled:u,vars:i,varsResolver:Lse});return(0,GI.jsxs)(_t,{ref:t,...x,unstyled:u,variant:p,disabled:m,mod:[{disabled:m||f},b],..._("root",{variant:p,active:!m&&!f}),children:[g||(0,GI.jsx)(a6,{}),o]})});gi.classes=s6;gi.displayName="@mantine/core/CloseButton";var iU=y(O(),1),p3e=y(D(),1);var oU=y(D(),1);function nU(e){return oU.Children.toArray(e).filter(Boolean)}var l6={root:"m_4081bf90"};var Mse={preventGrowOverflow:!0,gap:"md",align:"center",justify:"flex-start",wrap:"wrap"},Bse=(e,{grow:t,preventGrowOverflow:r,gap:n,align:o,justify:i,wrap:a},{childWidth:s})=>({root:{"--group-child-width":t&&r?s:void 0,"--group-gap":At(n),"--group-align":o,"--group-justify":i,"--group-wrap":a}}),Se=M((e,t)=>{let r=z("Group",Mse,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,children:l,gap:c,align:d,justify:u,wrap:f,grow:m,preventGrowOverflow:p,vars:g,variant:b,__size:v,mod:x,..._}=r,I=nU(l),S=I.length,w=At(c??"md"),$={childWidth:`calc(${100/S}% - (${w} - ${w} / ${S}))`},B=q({name:"Group",props:r,stylesCtx:$,className:o,style:i,classes:l6,classNames:n,styles:a,unstyled:s,vars:g,varsResolver:Bse});return(0,iU.jsx)(F,{...B("root"),ref:t,variant:b,mod:[{grow:m},x],size:v,..._,children:I})});Se.classes=l6;Se.displayName="@mantine/core/Group";var ov=y(O(),1),cU=y(D(),1);var S3e=y(D(),1);var C3e=y(O(),1);var[aU,Qr]=Zt("ModalBase component was not found in tree");var c6=y(D(),1);var Im=y(D(),1);function sU({opened:e,transitionDuration:t}){let[r,n]=(0,Im.useState)(e),o=(0,Im.useRef)(-1),a=Ss()?0:t;return(0,Im.useEffect)(()=>(e?(n(!0),window.clearTimeout(o.current)):a===0?n(!1):o.current=window.setTimeout(()=>n(!1),a),()=>window.clearTimeout(o.current)),[e,a]),r}function lU({id:e,transitionProps:t,opened:r,trapFocus:n,closeOnEscape:o,onClose:i,returnFocus:a}){let s=gt(e),[l,c]=(0,c6.useState)(!1),[d,u]=(0,c6.useState)(!1),f=typeof t?.duration=="number"?t?.duration:200,m=sU({opened:r,transitionDuration:f});return Tl("keydown",p=>{p.key==="Escape"&&o&&!p.isComposing&&r&&p.target?.getAttribute("data-mantine-stop-propagation")!=="true"&&i()},{capture:!0}),Bh({opened:r,shouldReturnFocus:n&&a}),{_id:s,titleMounted:l,bodyMounted:d,shouldLockScroll:m,setTitleMounted:c,setBodyMounted:u}}var d6=(0,cU.forwardRef)(({keepMounted:e,opened:t,onClose:r,id:n,transitionProps:o,onExitTransitionEnd:i,onEnterTransitionEnd:a,trapFocus:s,closeOnEscape:l,returnFocus:c,closeOnClickOutside:d,withinPortal:u,portalProps:f,lockScroll:m,children:p,zIndex:g,shadow:b,padding:v,__vars:x,unstyled:_,removeScrollProps:I,...S},w)=>{let{_id:P,titleMounted:$,bodyMounted:B,shouldLockScroll:W,setTitleMounted:H,setBodyMounted:K}=lU({id:n,transitionProps:o,opened:t,trapFocus:s,closeOnEscape:l,onClose:r,returnFocus:c}),{key:T,...k}=I||{};return(0,ov.jsx)(Sn,{...f,withinPortal:u,children:(0,ov.jsx)(aU,{value:{opened:t,onClose:r,closeOnClickOutside:d,onExitTransitionEnd:i,onEnterTransitionEnd:a,transitionProps:{...o,keepMounted:e},getTitleId:()=>`${P}-title`,getBodyId:()=>`${P}-body`,titleMounted:$,bodyMounted:B,setTitleMounted:H,setBodyMounted:K,trapFocus:s,closeOnEscape:l,zIndex:g,unstyled:_},children:(0,ov.jsx)(Ui,{enabled:W&&m,...k,children:(0,ov.jsx)(F,{ref:w,...S,__vars:{...x,"--mb-z-index":(g||Rt("modal")).toString(),"--mb-shadow":bf(b),"--mb-padding":At(v)},children:p})},T)})})});d6.displayName="@mantine/core/ModalBase";var fU=y(O(),1),mU=y(D(),1);var dU=y(D(),1);function uU(){let e=Qr();return(0,dU.useEffect)(()=>(e.setBodyMounted(!0),()=>e.setBodyMounted(!1)),[]),e.getBodyId()}var na={title:"m_615af6c9",header:"m_b5489c3c",inner:"m_60c222c7",content:"m_fd1ab0aa",close:"m_606cb269",body:"m_5df29311"};var u6=(0,mU.forwardRef)(({className:e,...t},r)=>{let n=uU(),o=Qr();return(0,fU.jsx)(F,{ref:r,...t,id:n,className:qe({[na.body]:!o.unstyled},e)})});u6.displayName="@mantine/core/ModalBaseBody";var pU=y(O(),1),hU=y(D(),1);var f6=(0,hU.forwardRef)(({className:e,onClick:t,...r},n)=>{let o=Qr();return(0,pU.jsx)(gi,{ref:n,...r,onClick:i=>{o.onClose(),t?.(i)},className:qe({[na.close]:!o.unstyled},e),unstyled:o.unstyled})});f6.displayName="@mantine/core/ModalBaseCloseButton";var nv=y(O(),1),gU=y(D(),1);var m6=(0,gU.forwardRef)(({transitionProps:e,className:t,innerProps:r,onKeyDown:n,style:o,...i},a)=>{let s=Qr();return(0,nv.jsx)(Go,{mounted:s.opened,transition:"pop",...s.transitionProps,onExited:()=>{s.onExitTransitionEnd?.(),s.transitionProps?.onExited?.()},onEntered:()=>{s.onEnterTransitionEnd?.(),s.transitionProps?.onEntered?.()},...e,children:l=>(0,nv.jsx)("div",{...r,className:qe({[na.inner]:!s.unstyled},r.className),children:(0,nv.jsx)(xm,{active:s.opened&&s.trapFocus,innerRef:a,children:(0,nv.jsx)(oa,{...i,component:"section",role:"dialog",tabIndex:-1,"aria-modal":!0,"aria-describedby":s.bodyMounted?s.getBodyId():void 0,"aria-labelledby":s.titleMounted?s.getTitleId():void 0,style:[o,l],className:qe({[na.content]:!s.unstyled},t),unstyled:s.unstyled,children:i.children})})})})});m6.displayName="@mantine/core/ModalBaseContent";var vU=y(O(),1),xU=y(D(),1);var p6=(0,xU.forwardRef)(({className:e,...t},r)=>{let n=Qr();return(0,vU.jsx)(F,{component:"header",ref:r,className:qe({[na.header]:!n.unstyled},e),...t})});p6.displayName="@mantine/core/ModalBaseHeader";var h6=y(O(),1),yU=y(D(),1);var jse={duration:200,timingFunction:"ease",transition:"fade"};function bU(e){let t=Qr();return{...jse,...t.transitionProps,...e}}var g6=(0,yU.forwardRef)(({onClick:e,transitionProps:t,style:r,visible:n,...o},i)=>{let a=Qr(),s=bU(t);return(0,h6.jsx)(Go,{mounted:n!==void 0?n:a.opened,...s,transition:"fade",children:l=>(0,h6.jsx)(gm,{ref:i,fixed:!0,style:[r,l],zIndex:a.zIndex,unstyled:a.unstyled,onClick:c=>{e?.(c),a.closeOnClickOutside&&a.onClose()},...o})})});g6.displayName="@mantine/core/ModalBaseOverlay";var wU=y(O(),1),SU=y(D(),1);var _U=y(D(),1);function IU(){let e=Qr();return(0,_U.useEffect)(()=>(e.setTitleMounted(!0),()=>e.setTitleMounted(!1)),[]),e.getTitleId()}var v6=(0,SU.forwardRef)(({className:e,...t},r)=>{let n=IU(),o=Qr();return(0,wU.jsx)(F,{component:"h2",ref:r,className:qe({[na.title]:!o.unstyled},e),...t,id:n})});v6.displayName="@mantine/core/ModalBaseTitle";var KI=y(O(),1);function kU({children:e}){return(0,KI.jsx)(KI.Fragment,{children:e})}var Qd=y(O(),1);var JFe=y(D(),1);var ENe=y(D(),1),$Ne=y(O(),1);var[CU,PU]=Co({size:"sm"});var DU=y(O(),1),NNe=y(D(),1);var Use={},x6=M((e,t)=>{let r=z("InputClearButton",Use,e),{size:n,variant:o,vars:i,classNames:a,styles:s,...l}=r,c=PU(),{resolvedClassNames:d,resolvedStyles:u}=Zr({classNames:a,styles:s,props:r});return(0,DU.jsx)(gi,{variant:o||"transparent",ref:t,size:n||c?.size||"sm",classNames:d,styles:u,__staticSelector:"InputClearButton",...l})});x6.displayName="@mantine/core/InputClearButton";var EU=y(O(),1);var QNe=y(D(),1);var HNe=y(D(),1),WNe=y(O(),1);var[RU,vi]=Co({offsetBottom:!1,offsetTop:!1,describedBy:void 0,getStyles:null,inputId:void 0,labelId:void 0});var Yr={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"};var TU={},Vse=(e,{size:t})=>({description:{"--input-description-size":t===void 0?void 0:`calc(${kt(t)} - ${Z(2)})`}}),wm=M((e,t)=>{let r=z("InputDescription",TU,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,size:c,__staticSelector:d,__inheritStyles:u=!0,variant:f,...m}=z("InputDescription",TU,r),p=vi(),g=q({name:["InputWrapper",d],props:r,classes:Yr,className:o,style:i,classNames:n,styles:a,unstyled:s,rootSelector:"description",vars:l,varsResolver:Vse}),b=u&&p?.getStyles||g;return(0,EU.jsx)(F,{component:"p",ref:t,variant:f,size:c,...b("description",p?.getStyles?{className:o,style:i}:void 0),...m})});wm.classes=Yr;wm.displayName="@mantine/core/InputDescription";var $U=y(O(),1);var lFe=y(D(),1);var Hse={},Wse=(e,{size:t})=>({error:{"--input-error-size":t===void 0?void 0:`calc(${kt(t)} - ${Z(2)})`}}),Sm=M((e,t)=>{let r=z("InputError",Hse,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,size:c,__staticSelector:d,__inheritStyles:u=!0,variant:f,...m}=r,p=q({name:["InputWrapper",d],props:r,classes:Yr,className:o,style:i,classNames:n,styles:a,unstyled:s,rootSelector:"error",vars:l,varsResolver:Wse}),g=vi(),b=u&&g?.getStyles||p;return(0,$U.jsx)(F,{component:"p",ref:t,variant:f,size:c,...b("error",g?.getStyles?{className:o,style:i}:void 0),...m})});Sm.classes=Yr;Sm.displayName="@mantine/core/InputError";var qI=y(O(),1),xFe=y(D(),1);var AU={labelElement:"label"},Zse=(e,{size:t})=>({label:{"--input-label-size":kt(t),"--input-asterisk-color":void 0}}),km=M((e,t)=>{let r=z("InputLabel",AU,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,labelElement:c,size:d,required:u,htmlFor:f,onMouseDown:m,children:p,__staticSelector:g,variant:b,mod:v,...x}=z("InputLabel",AU,r),_=q({name:["InputWrapper",g],props:r,classes:Yr,className:o,style:i,classNames:n,styles:a,unstyled:s,rootSelector:"label",vars:l,varsResolver:Zse}),I=vi(),S=I?.getStyles||_;return(0,qI.jsxs)(F,{...S("label",I?.getStyles?{className:o,style:i}:void 0),component:c,variant:b,size:d,ref:t,htmlFor:c==="label"?f:void 0,mod:[{required:u},v],onMouseDown:w=>{m?.(w),!w.defaultPrevented&&w.detail>1&&w.preventDefault()},...x,children:[p,u&&(0,qI.jsx)("span",{...S("required"),"aria-hidden":!0,children:" *"})]})});km.classes=Yr;km.displayName="@mantine/core/InputLabel";var zU=y(O(),1),DFe=y(D(),1);var OU={},XI=M((e,t)=>{let r=z("InputPlaceholder",OU,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,__staticSelector:c,variant:d,error:u,mod:f,...m}=z("InputPlaceholder",OU,r),p=q({name:["InputPlaceholder",c],props:r,classes:Yr,className:o,style:i,classNames:n,styles:a,unstyled:s,rootSelector:"placeholder"});return(0,zU.jsx)(F,{...p("placeholder"),mod:[{error:!!u},f],component:"span",variant:d,ref:t,...m})});XI.classes=Yr;XI.displayName="@mantine/core/InputPlaceholder";var Cm=y(O(),1),QI=y(D(),1);function NU(e,{hasDescription:t,hasError:r}){let n=e.findIndex(l=>l==="input"),o=e.slice(0,n),i=e.slice(n+1),a=t&&o.includes("description")||r&&o.includes("error");return{offsetBottom:t&&i.includes("description")||r&&i.includes("error"),offsetTop:a}}var Gse={labelElement:"label",inputContainer:e=>e,inputWrapperOrder:["label","description","input","error"]},Kse=(e,{size:t})=>({label:{"--input-label-size":kt(t),"--input-asterisk-color":void 0},error:{"--input-error-size":t===void 0?void 0:`calc(${kt(t)} - ${Z(2)})`},description:{"--input-description-size":t===void 0?void 0:`calc(${kt(t)} - ${Z(2)})`}}),YI=M((e,t)=>{let r=z("InputWrapper",Gse,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,size:c,variant:d,__staticSelector:u,inputContainer:f,inputWrapperOrder:m,label:p,error:g,description:b,labelProps:v,descriptionProps:x,errorProps:_,labelElement:I,children:S,withAsterisk:w,id:P,required:$,__stylesApiProps:B,mod:W,...H}=r,K=q({name:["InputWrapper",u],props:B||r,classes:Yr,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:Kse}),T={size:c,variant:d,__staticSelector:u},k=gt(P),E=typeof w=="boolean"?w:$,C=_?.id||`${k}-error`,A=x?.id||`${k}-description`,R=k,N=!!g&&typeof g!="boolean",U=!!b,G=`${N?C:""} ${U?A:""}`,re=G.trim().length>0?G.trim():void 0,ve=v?.id||`${k}-label`,he=p&&(0,Cm.jsx)(km,{labelElement:I,id:ve,htmlFor:R,required:E,...T,...v,children:p},"label"),Q=U&&(0,Cm.jsx)(wm,{...x,...T,size:x?.size||T.size,id:x?.id||A,children:b},"description"),ne=(0,Cm.jsx)(QI.Fragment,{children:f(S)},"input"),we=N&&(0,QI.createElement)(Sm,{..._,...T,size:_?.size||T.size,key:"error",id:_?.id||C},g),se=m.map(Ae=>{switch(Ae){case"label":return he;case"input":return ne;case"description":return Q;case"error":return we;default:return null}});return(0,Cm.jsx)(RU,{value:{getStyles:K,describedBy:re,inputId:R,labelId:ve,...NU(m,{hasDescription:U,hasError:N})},children:(0,Cm.jsx)(F,{ref:t,variant:d,size:c,mod:[{error:!!g},W],...K("root"),...H,children:se})})});YI.classes=Yr;YI.displayName="@mantine/core/InputWrapper";var qse={variant:"default",leftSectionPointerEvents:"none",rightSectionPointerEvents:"none",withAria:!0,withErrorStyles:!0},Xse=(e,t,r)=>({wrapper:{"--input-margin-top":r.offsetTop?"calc(var(--mantine-spacing-xs) / 2)":void 0,"--input-margin-bottom":r.offsetBottom?"calc(var(--mantine-spacing-xs) / 2)":void 0,"--input-height":xe(t.size,"input-height"),"--input-fz":kt(t.size),"--input-radius":t.radius===void 0?void 0:Ee(t.radius),"--input-left-section-width":t.leftSectionWidth!==void 0?Z(t.leftSectionWidth):void 0,"--input-right-section-width":t.rightSectionWidth!==void 0?Z(t.rightSectionWidth):void 0,"--input-padding-y":t.multiline?xe(t.size,"input-padding-y"):void 0,"--input-left-section-pointer-events":t.leftSectionPointerEvents,"--input-right-section-pointer-events":t.rightSectionPointerEvents}}),ft=nt((e,t)=>{let r=z("Input",qse,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,required:l,__staticSelector:c,__stylesApiProps:d,size:u,wrapperProps:f,error:m,disabled:p,leftSection:g,leftSectionProps:b,leftSectionWidth:v,rightSection:x,rightSectionProps:_,rightSectionWidth:I,rightSectionPointerEvents:S,leftSectionPointerEvents:w,variant:P,vars:$,pointer:B,multiline:W,radius:H,id:K,withAria:T,withErrorStyles:k,mod:E,inputSize:C,__clearSection:A,__clearable:R,__defaultRightSection:N,...U}=r,{styleProps:G,rest:re}=Gr(U),ve=vi(),he={offsetBottom:ve?.offsetBottom,offsetTop:ve?.offsetTop},Q=q({name:["Input",c],props:d||r,classes:Yr,className:o,style:i,classNames:n,styles:a,unstyled:s,stylesCtx:he,rootSelector:"wrapper",vars:$,varsResolver:Xse}),ne=T?{required:l,disabled:p,"aria-invalid":!!m,"aria-describedby":ve?.describedBy,id:ve?.inputId||K}:{},we=x||R&&A||N;return(0,Qd.jsx)(CU,{value:{size:u||"sm"},children:(0,Qd.jsxs)(F,{...Q("wrapper"),...G,...f,mod:[{error:!!m&&k,pointer:B,disabled:p,multiline:W,"data-with-right-section":!!we,"data-with-left-section":!!g},E],variant:P,size:u,children:[g&&(0,Qd.jsx)("div",{...b,"data-position":"left",...Q("section",{className:b?.className,style:b?.style}),children:g}),(0,Qd.jsx)(F,{component:"input",...re,...ne,ref:t,required:l,mod:{disabled:p,error:!!m&&k},variant:P,__size:C,...Q("input")}),we&&(0,Qd.jsx)("div",{..._,"data-position":"right",...Q("section",{className:_?.className,style:_?.style}),children:we})]})})});ft.classes=Yr;ft.Wrapper=YI;ft.Label=km;ft.Error=Sm;ft.Description=wm;ft.Placeholder=XI;ft.ClearButton=x6;ft.displayName="@mantine/core/Input";var vLe=y(D(),1),xLe=y(O(),1);function FU(e,t,r){let n=z(e,t,r),{label:o,description:i,error:a,required:s,classNames:l,styles:c,className:d,unstyled:u,__staticSelector:f,__stylesApiProps:m,errorProps:p,labelProps:g,descriptionProps:b,wrapperProps:v,id:x,size:_,style:I,inputContainer:S,inputWrapperOrder:w,withAsterisk:P,variant:$,vars:B,mod:W,...H}=n,{styleProps:K,rest:T}=Gr(H),k={label:o,description:i,error:a,required:s,classNames:l,className:d,__staticSelector:f,__stylesApiProps:m||n,errorProps:p,labelProps:g,descriptionProps:b,unstyled:u,styles:c,size:_,style:I,inputContainer:S,inputWrapperOrder:w,withAsterisk:P,variant:$,id:x,mod:W,...v};return{...T,classNames:l,styles:c,unstyled:u,wrapperProps:{...k,...K},inputProps:{required:s,classNames:l,styles:c,unstyled:u,size:_,__staticSelector:f,__stylesApiProps:m||n,error:a,variant:$,id:x}}}var b6=y(O(),1),wLe=y(D(),1);var Qse={__staticSelector:"InputBase",withAria:!0},tr=nt((e,t)=>{let{inputProps:r,wrapperProps:n,...o}=FU("InputBase",Qse,e);return(0,b6.jsx)(ft.Wrapper,{...n,children:(0,b6.jsx)(ft,{...r,...o,ref:t})})});tr.classes={...ft.classes,...ft.Wrapper.classes};tr.displayName="@mantine/core/InputBase";var MU=y(O(),1),BU=y(D(),1);var Ba=y(D(),1);var TLe=y(O(),1);function Yse(e,t){if(!t||!e)return!1;let r=t.parentNode;for(;r!=null;){if(r===e)return!0;r=r.parentNode}return!1}function LU({target:e,parent:t,ref:r,displayAfterTransitionEnd:n}){let o=(0,Ba.useRef)(-1),[i,a]=(0,Ba.useState)(!1),[s,l]=(0,Ba.useState)(typeof n=="boolean"?n:!1),c=()=>{if(!e||!t||!r.current)return;let m=e.getBoundingClientRect(),p=t.getBoundingClientRect(),g=window.getComputedStyle(e),b=window.getComputedStyle(t),v=ra(g.borderTopWidth)+ra(b.borderTopWidth),x=ra(g.borderLeftWidth)+ra(b.borderLeftWidth),_={top:m.top-p.top-v,left:m.left-p.left-x,width:m.width,height:m.height};r.current.style.transform=`translateY(${_.top}px) translateX(${_.left}px)`,r.current.style.width=`${_.width}px`,r.current.style.height=`${_.height}px`},d=()=>{window.clearTimeout(o.current),r.current&&(r.current.style.transitionDuration="0ms"),c(),o.current=window.setTimeout(()=>{r.current&&(r.current.style.transitionDuration="")},30)},u=(0,Ba.useRef)(null),f=(0,Ba.useRef)(null);return(0,Ba.useEffect)(()=>{if(c(),e)return u.current=new ResizeObserver(d),u.current.observe(e),t&&(f.current=new ResizeObserver(d),f.current.observe(t)),()=>{u.current?.disconnect(),f.current?.disconnect()}},[t,e]),(0,Ba.useEffect)(()=>{if(t){let m=p=>{Yse(p.target,t)&&(d(),l(!1))};return t.addEventListener("transitionend",m),()=>{t.removeEventListener("transitionend",m)}}},[t]),N2(()=>{Ey()!=="test"&&a(!0)},20,{autoInvoke:!0}),L2(m=>{m.forEach(p=>{p.type==="attributes"&&p.attributeName==="dir"&&d()})},{attributes:!0,attributeFilter:["dir"]},()=>document.documentElement),{initialized:i,hidden:s}}var y6={root:"m_96b553a6"};var Jse={},ele=(e,{transitionDuration:t})=>({root:{"--transition-duration":typeof t=="number"?`${t}ms`:t}}),JI=M((e,t)=>{let r=z("FloatingIndicator",Jse,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,target:c,parent:d,transitionDuration:u,mod:f,displayAfterTransitionEnd:m,...p}=r,g=q({name:"FloatingIndicator",classes:y6,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:ele}),b=(0,BU.useRef)(null),{initialized:v,hidden:x}=LU({target:c,parent:d,ref:b,displayAfterTransitionEnd:m}),_=Ze(t,b);return!c||!d?null:(0,MU.jsx)(F,{ref:_,mod:[{initialized:v,hidden:x},f],...g("root"),...p})});JI.displayName="@mantine/core/FloatingIndicator";JI.classes=y6;var _6=y(O(),1);var ZLe=y(D(),1);function I6({style:e,size:t=16,...r}){return(0,_6.jsx)("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{...e,width:Z(t),height:Z(t),display:"block"},...r,children:(0,_6.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"})})}I6.displayName="@mantine/core/AccordionChevron";var ja=y(O(),1);var QLe=y(D(),1);var w6={root:"m_66836ed3",wrapper:"m_a5d60502",body:"m_667c2793",title:"m_6a03f287",label:"m_698f4f23",icon:"m_667f2a6a",message:"m_7fa78076",closeButton:"m_87f54839"};var tle={},rle=(e,{radius:t,color:r,variant:n,autoContrast:o})=>{let i=e.variantColorResolver({color:r||e.primaryColor,theme:e,variant:n||"light",autoContrast:o});return{root:{"--alert-radius":t===void 0?void 0:Ee(t),"--alert-bg":r||n?i.background:void 0,"--alert-color":i.color,"--alert-bd":r||n?i.border:void 0}}},xi=M((e,t)=>{let r=z("Alert",tle,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,radius:c,color:d,title:u,children:f,id:m,icon:p,withCloseButton:g,onClose:b,closeButtonLabel:v,variant:x,autoContrast:_,...I}=r,S=q({name:"Alert",classes:w6,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:rle}),w=gt(m),P=u&&`${w}-title`||void 0,$=`${w}-body`;return(0,ja.jsx)(F,{id:w,...S("root",{variant:x}),variant:x,ref:t,...I,role:"alert","aria-describedby":$,"aria-labelledby":P,children:(0,ja.jsxs)("div",{...S("wrapper"),children:[p&&(0,ja.jsx)("div",{...S("icon"),children:p}),(0,ja.jsxs)("div",{...S("body"),children:[u&&(0,ja.jsx)("div",{...S("title"),"data-with-close-button":g||void 0,children:(0,ja.jsx)("span",{id:P,...S("label"),children:u})}),f&&(0,ja.jsx)("div",{id:$,...S("message"),"data-variant":x,children:f})]}),g&&(0,ja.jsx)(gi,{...S("closeButton"),onClick:b,variant:"transparent",size:16,iconSize:16,"aria-label":v,unstyled:s})]})})});xi.classes=w6;xi.displayName="@mantine/core/Alert";var UU=y(O(),1);var _Me=y(D(),1);var jU=y(O(),1),lMe=y(D(),1);var S6={root:"m_b6d8b162"};function ole(e){if(e==="start")return"start";if(e==="end"||e)return"end"}var nle={inherit:!1},ile=(e,{variant:t,lineClamp:r,gradient:n,size:o,color:i})=>({root:{"--text-fz":kt(o),"--text-lh":rL(o),"--text-gradient":t==="gradient"?Wh(n,e):void 0,"--text-line-clamp":typeof r=="number"?r.toString():void 0,"--text-color":i?Ue(i,e):void 0}}),ue=nt((e,t)=>{let r=z("Text",nle,e),{lineClamp:n,truncate:o,inline:i,inherit:a,gradient:s,span:l,__staticSelector:c,vars:d,className:u,style:f,classNames:m,styles:p,unstyled:g,variant:b,mod:v,size:x,..._}=r,I=q({name:["Text",c],props:r,classes:S6,className:u,style:f,classNames:m,styles:p,unstyled:g,vars:d,varsResolver:ile});return(0,jU.jsx)(F,{...I("root",{focusable:!0}),ref:t,component:l?"span":"p",variant:b,mod:[{"data-truncate":ole(o),"data-line-clamp":typeof n=="number","data-inline":i,"data-inherit":a},v],size:x,..._})});ue.classes=S6;ue.displayName="@mantine/core/Text";var k6={root:"m_849cf0da"};var ale={underline:"hover"},iv=nt((e,t)=>{let{underline:r,className:n,unstyled:o,mod:i,...a}=z("Anchor",ale,e);return(0,UU.jsx)(ue,{component:"a",ref:t,className:qe({[k6.root]:!o},n),...a,mod:[{underline:r},i],__staticSelector:"Anchor",unstyled:o})});iv.classes=k6;iv.displayName="@mantine/core/Anchor";var av=y(O(),1),Q7e=y(D(),1);var PMe=y(D(),1);var RMe=y(O(),1);var[VU,bi]=Zt("AppShell was not found in tree");var HU=y(O(),1),AMe=y(D(),1);var qo={root:"m_89ab340",navbar:"m_45252eee",aside:"m_9cdde9a",header:"m_3b16f56b",main:"m_8983817",footer:"m_3840c879",section:"m_6dcfc7c7"};var sle={},e0=M((e,t)=>{let r=z("AppShellAside",sle,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,withBorder:c,zIndex:d,mod:u,...f}=r,m=bi();return m.disabled?null:(0,HU.jsx)(F,{component:"aside",ref:t,mod:[{"with-border":c??m.withBorder},u],...m.getStyles("aside",{className:o,classNames:n,styles:a,style:i}),...f,__vars:{"--app-shell-aside-z-index":`calc(${d??m.zIndex} + 1)`}})});e0.classes=qo;e0.displayName="@mantine/core/AppShellAside";var WU=y(O(),1);var VMe=y(D(),1);var lle={},t0=M((e,t)=>{let r=z("AppShellFooter",lle,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,withBorder:c,zIndex:d,mod:u,...f}=r,m=bi();return m.disabled?null:(0,WU.jsx)(F,{component:"footer",ref:t,mod:[{"with-border":c??m.withBorder},u],...m.getStyles("footer",{className:qe({[Ui.classNames.zeroRight]:m.offsetScrollbars},o),classNames:n,styles:a,style:i}),...f,__vars:{"--app-shell-footer-z-index":(d??m.zIndex)?.toString()}})});t0.classes=qo;t0.displayName="@mantine/core/AppShellFooter";var ZU=y(O(),1);var YMe=y(D(),1);var cle={},r0=M((e,t)=>{let r=z("AppShellHeader",cle,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,withBorder:c,zIndex:d,mod:u,...f}=r,m=bi();return m.disabled?null:(0,ZU.jsx)(F,{component:"header",ref:t,mod:[{"with-border":c??m.withBorder},u],...m.getStyles("header",{className:qe({[Ui.classNames.zeroRight]:m.offsetScrollbars},o),classNames:n,styles:a,style:i}),...f,__vars:{"--app-shell-header-z-index":(d??m.zIndex)?.toString()}})});r0.classes=qo;r0.displayName="@mantine/core/AppShellHeader";var GU=y(O(),1),iBe=y(D(),1);var dle={},o0=M((e,t)=>{let r=z("AppShellMain",dle,e),{classNames:n,className:o,style:i,styles:a,vars:s,...l}=r,c=bi();return(0,GU.jsx)(F,{component:"main",ref:t,...c.getStyles("main",{className:o,style:i,classNames:n,styles:a}),...l})});o0.classes=qo;o0.displayName="@mantine/core/AppShellMain";var eV=y(O(),1),C7e=y(D(),1);var g7e=y(D(),1),v7e=y(O(),1);var xBe=y(D(),1),bBe=y(O(),1);function Ua(e){return typeof e=="object"?e.base:e}function Va(e){let t=typeof e=="object"&&e!==null&&typeof e.base<"u"&&Object.keys(e).length===1;return typeof e=="number"||typeof e=="string"||t}function Ha(e){return!(typeof e!="object"||e===null||Object.keys(e).length===1&&"base"in e)}function KU({baseStyles:e,minMediaStyles:t,maxMediaStyles:r,aside:n,theme:o}){let i=n?.width,a="translateX(var(--app-shell-aside-width))",s="translateX(calc(var(--app-shell-aside-width) * -1))";if(n?.breakpoint&&!n?.collapsed?.mobile&&(r[n?.breakpoint]=r[n?.breakpoint]||{},r[n?.breakpoint]["--app-shell-aside-width"]="100%",r[n?.breakpoint]["--app-shell-aside-offset"]="0px"),Va(i)){let l=Z(Ua(i));e["--app-shell-aside-width"]=l,e["--app-shell-aside-offset"]=l}if(Ha(i)&&(typeof i.base<"u"&&(e["--app-shell-aside-width"]=Z(i.base),e["--app-shell-aside-offset"]=Z(i.base)),pt(i).forEach(l=>{l!=="base"&&(t[l]=t[l]||{},t[l]["--app-shell-aside-width"]=Z(i[l]),t[l]["--app-shell-aside-offset"]=Z(i[l]))})),n?.collapsed?.desktop){let l=n.breakpoint;t[l]=t[l]||{},t[l]["--app-shell-aside-transform"]=a,t[l]["--app-shell-aside-transform-rtl"]=s,t[l]["--app-shell-aside-offset"]="0px !important"}if(n?.collapsed?.mobile){let l=yf(n.breakpoint,o.breakpoints)-.1;r[l]=r[l]||{},r[l]["--app-shell-aside-width"]="100%",r[l]["--app-shell-aside-offset"]="0px",r[l]["--app-shell-aside-transform"]=a,r[l]["--app-shell-aside-transform-rtl"]=s}}var DBe=y(D(),1),RBe=y(O(),1);function qU({baseStyles:e,minMediaStyles:t,footer:r}){let n=r?.height,o="translateY(var(--app-shell-footer-height))",i=r?.offset??!0;if(Va(n)){let a=Z(Ua(n));e["--app-shell-footer-height"]=a,i&&(e["--app-shell-footer-offset"]=a)}Ha(n)&&(typeof n.base<"u"&&(e["--app-shell-footer-height"]=Z(n.base),i&&(e["--app-shell-footer-offset"]=Z(n.base))),pt(n).forEach(a=>{a!=="base"&&(t[a]=t[a]||{},t[a]["--app-shell-footer-height"]=Z(n[a]),i&&(t[a]["--app-shell-footer-offset"]=Z(n[a])))})),r?.collapsed&&(e["--app-shell-footer-transform"]=o,e["--app-shell-footer-offset"]="0px !important")}var FBe=y(D(),1),LBe=y(O(),1);function XU({baseStyles:e,minMediaStyles:t,header:r}){let n=r?.height,o="translateY(calc(var(--app-shell-header-height) * -1))",i=r?.offset??!0;if(Va(n)){let a=Z(Ua(n));e["--app-shell-header-height"]=a,i&&(e["--app-shell-header-offset"]=a)}Ha(n)&&(typeof n.base<"u"&&(e["--app-shell-header-height"]=Z(n.base),i&&(e["--app-shell-header-offset"]=Z(n.base))),pt(n).forEach(a=>{a!=="base"&&(t[a]=t[a]||{},t[a]["--app-shell-header-height"]=Z(n[a]),i&&(t[a]["--app-shell-header-offset"]=Z(n[a])))})),r?.collapsed&&(e["--app-shell-header-transform"]=o,e["--app-shell-header-offset"]="0px !important")}var ZBe=y(D(),1),GBe=y(O(),1);function QU({baseStyles:e,minMediaStyles:t,maxMediaStyles:r,navbar:n,theme:o}){let i=n?.width,a="translateX(calc(var(--app-shell-navbar-width) * -1))",s="translateX(var(--app-shell-navbar-width))";if(n?.breakpoint&&!n?.collapsed?.mobile&&(r[n?.breakpoint]=r[n?.breakpoint]||{},r[n?.breakpoint]["--app-shell-navbar-width"]="100%",r[n?.breakpoint]["--app-shell-navbar-offset"]="0px"),Va(i)){let l=Z(Ua(i));e["--app-shell-navbar-width"]=l,e["--app-shell-navbar-offset"]=l}if(Ha(i)&&(typeof i.base<"u"&&(e["--app-shell-navbar-width"]=Z(i.base),e["--app-shell-navbar-offset"]=Z(i.base)),pt(i).forEach(l=>{l!=="base"&&(t[l]=t[l]||{},t[l]["--app-shell-navbar-width"]=Z(i[l]),t[l]["--app-shell-navbar-offset"]=Z(i[l]))})),n?.collapsed?.desktop){let l=n.breakpoint;t[l]=t[l]||{},t[l]["--app-shell-navbar-transform"]=a,t[l]["--app-shell-navbar-transform-rtl"]=s,t[l]["--app-shell-navbar-offset"]="0px !important"}if(n?.collapsed?.mobile){let l=yf(n.breakpoint,o.breakpoints)-.1;r[l]=r[l]||{},r[l]["--app-shell-navbar-width"]="100%",r[l]["--app-shell-navbar-offset"]="0px",r[l]["--app-shell-navbar-transform"]=a,r[l]["--app-shell-navbar-transform-rtl"]=s}}var a7e=y(D(),1),s7e=y(O(),1);var e7e=y(D(),1),t7e=y(O(),1);function n0(e){return Number(e)===0?"0px":At(e)}function YU({padding:e,baseStyles:t,minMediaStyles:r}){Va(e)&&(t["--app-shell-padding"]=n0(Ua(e))),Ha(e)&&(e.base&&(t["--app-shell-padding"]=n0(e.base)),pt(e).forEach(n=>{n!=="base"&&(r[n]=r[n]||{},r[n]["--app-shell-padding"]=n0(e[n]))}))}function JU({navbar:e,header:t,footer:r,aside:n,padding:o,theme:i}){let a={},s={},l={};QU({baseStyles:l,minMediaStyles:a,maxMediaStyles:s,navbar:e,theme:i}),KU({baseStyles:l,minMediaStyles:a,maxMediaStyles:s,aside:n,theme:i}),XU({baseStyles:l,minMediaStyles:a,header:t}),qU({baseStyles:l,minMediaStyles:a,footer:r}),YU({baseStyles:l,minMediaStyles:a,padding:o});let c=Fh(pt(a),i.breakpoints).map(f=>({query:`(min-width: ${ud(f.px)})`,styles:a[f.value]})),d=Fh(pt(s),i.breakpoints).map(f=>({query:`(max-width: ${ud(f.px)})`,styles:s[f.value]})),u=[...c,...d];return{baseStyles:l,media:u}}function tV({navbar:e,header:t,aside:r,footer:n,padding:o}){let i=ut(),a=Ia(),{media:s,baseStyles:l}=JU({navbar:e,header:t,footer:n,aside:r,padding:o,theme:i});return(0,eV.jsx)(Id,{media:s,styles:l,selector:a.cssVariablesSelector})}var rV=y(O(),1),A7e=y(D(),1);var ule={},i0=M((e,t)=>{let r=z("AppShellNavbar",ule,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,withBorder:c,zIndex:d,mod:u,...f}=r,m=bi();return m.disabled?null:(0,rV.jsx)(F,{component:"nav",ref:t,mod:[{"with-border":c??m.withBorder},u],...m.getStyles("navbar",{className:o,classNames:n,styles:a,style:i}),...f,__vars:{"--app-shell-navbar-z-index":`calc(${d??m.zIndex} + 1)`}})});i0.classes=qo;i0.displayName="@mantine/core/AppShellNavbar";var oV=y(O(),1),j7e=y(D(),1);var fle={},a0=nt((e,t)=>{let r=z("AppShellSection",fle,e),{classNames:n,className:o,style:i,styles:a,vars:s,grow:l,mod:c,...d}=r,u=bi();return(0,oV.jsx)(F,{ref:t,mod:[{grow:l},c],...u.getStyles("section",{className:o,style:i,classNames:n,styles:a}),...d})});a0.classes=qo;a0.displayName="@mantine/core/AppShellSection";var cc=y(D(),1);function nV({transitionDuration:e,disabled:t}){let[r,n]=(0,cc.useState)(!0),o=(0,cc.useRef)(-1),i=(0,cc.useRef)(-1);return Tl("resize",()=>{n(!0),clearTimeout(o.current),o.current=window.setTimeout(()=>(0,cc.startTransition)(()=>{n(!1)}),200)}),Uo(()=>{n(!0),clearTimeout(i.current),i.current=window.setTimeout(()=>(0,cc.startTransition)(()=>{n(!1)}),e||0)},[t,e]),r}var mle={withBorder:!0,padding:0,transitionDuration:200,transitionTimingFunction:"ease",zIndex:Rt("app")},ple=(e,{transitionDuration:t,transitionTimingFunction:r})=>({root:{"--app-shell-transition-duration":`${t}ms`,"--app-shell-transition-timing-function":r}}),Nr=M((e,t)=>{let r=z("AppShell",mle,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,navbar:c,withBorder:d,padding:u,transitionDuration:f,transitionTimingFunction:m,header:p,zIndex:g,layout:b,disabled:v,aside:x,footer:_,offsetScrollbars:I=b!=="alt",mod:S,...w}=r,P=q({name:"AppShell",classes:qo,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:ple}),$=nV({disabled:v,transitionDuration:f});return(0,av.jsxs)(VU,{value:{getStyles:P,withBorder:d,zIndex:g,disabled:v,offsetScrollbars:I},children:[(0,av.jsx)(tV,{navbar:c,header:p,aside:x,footer:_,padding:u}),(0,av.jsx)(F,{ref:t,...P("root"),mod:[{resizing:$,layout:b,disabled:v},S],...w})]})});Nr.classes=qo;Nr.displayName="@mantine/core/AppShell";Nr.Navbar=i0;Nr.Header=r0;Nr.Main=o0;Nr.Aside=e0;Nr.Footer=t0;Nr.Section=a0;function iV(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=>iV(t))}:e}function Pm(e){return e?e.map(t=>iV(t)):[]}function Yd(e){return e.reduce((t,r)=>"group"in r?{...t,...Yd(r.items)}:(t[r.value]=r,t),{})}var C6=y(O(),1),x8e=y(D(),1);var qt={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"};var hle={error:null},gle=(e,{size:t,color:r})=>({chevron:{"--combobox-chevron-size":xe(t,"combobox-chevron-size"),"--combobox-chevron-color":r?Ue(r,e):void 0}}),s0=M((e,t)=>{let r=z("ComboboxChevron",hle,e),{size:n,error:o,style:i,className:a,classNames:s,styles:l,unstyled:c,vars:d,mod:u,...f}=r,m=q({name:"ComboboxChevron",classes:qt,props:r,style:i,className:a,classNames:s,styles:l,unstyled:c,vars:d,varsResolver:gle,rootSelector:"chevron"});return(0,C6.jsx)(F,{component:"svg",...f,...m("chevron"),size:n,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",mod:["combobox-chevron",{error:o},u],ref:t,children:(0,C6.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"})})});s0.classes=qt;s0.displayName="@mantine/core/ComboboxChevron";var $6=y(O(),1);var Dje=y(D(),1);var D8e=y(D(),1);var T8e=y(O(),1);var[aV,rr]=Zt("Combobox component was not found in tree");var sV=y(O(),1),lV=y(D(),1);var P6=(0,lV.forwardRef)(({size:e,onMouseDown:t,onClick:r,onClear:n,...o},i)=>(0,sV.jsx)(ft.ClearButton,{ref:i,tabIndex:-1,"aria-hidden":!0,...o,onMouseDown:a=>{a.preventDefault(),t?.(a)},onClick:a=>{n(),r?.(a)}}));P6.displayName="@mantine/core/ComboboxClearButton";var cV=y(O(),1),N8e=y(D(),1);var vle={},l0=M((e,t)=>{let{classNames:r,styles:n,className:o,style:i,hidden:a,...s}=z("ComboboxDropdown",vle,e),l=rr();return(0,cV.jsx)(Xr.Dropdown,{...s,ref:t,role:"presentation","data-hidden":a||void 0,...l.getStyles("dropdown",{className:o,style:i,classNames:r,styles:n})})});l0.classes=qt;l0.displayName="@mantine/core/ComboboxDropdown";var dV=y(O(),1);var W8e=y(D(),1);var xle={refProp:"ref"},D6=M((e,t)=>{let{children:r,refProp:n}=z("ComboboxDropdownTarget",xle,e);if(rr(),!ko(r))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(0,dV.jsx)(Xr.Target,{ref:t,refProp:n,children:r})});D6.displayName="@mantine/core/ComboboxDropdownTarget";var uV=y(O(),1),Y8e=y(D(),1);var ble={},c0=M((e,t)=>{let{classNames:r,className:n,style:o,styles:i,vars:a,...s}=z("ComboboxEmpty",ble,e),l=rr();return(0,uV.jsx)(F,{ref:t,...l.getStyles("empty",{className:n,classNames:r,styles:i,style:o}),...s})});c0.classes=qt;c0.displayName="@mantine/core/ComboboxEmpty";var mV=y(D(),1);var d9e=y(O(),1);var fV=y(D(),1);function Dm({onKeyDown:e,withKeyboardNavigation:t,withAriaAttributes:r,withExpandedAttribute:n,targetType:o,autoComplete:i}){let a=rr(),[s,l]=(0,fV.useState)(null),c=u=>{if(e?.(u),!a.readOnly&&t){if(u.nativeEvent.isComposing)return;if(u.nativeEvent.code==="ArrowDown"&&(u.preventDefault(),a.store.dropdownOpened?l(a.store.selectNextOption()):(a.store.openDropdown("keyboard"),l(a.store.selectActiveOption()),a.store.updateSelectedOptionIndex("selected",{scrollIntoView:!0}))),u.nativeEvent.code==="ArrowUp"&&(u.preventDefault(),a.store.dropdownOpened?l(a.store.selectPreviousOption()):(a.store.openDropdown("keyboard"),l(a.store.selectActiveOption()),a.store.updateSelectedOptionIndex("selected",{scrollIntoView:!0}))),u.nativeEvent.code==="Enter"||u.nativeEvent.code==="NumpadEnter"){if(u.nativeEvent.keyCode===229)return;let f=a.store.getSelectedOptionIndex();a.store.dropdownOpened&&f!==-1?(u.preventDefault(),a.store.clickSelectedOption()):o==="button"&&(u.preventDefault(),a.store.openDropdown("keyboard"))}u.key==="Escape"&&a.store.closeDropdown("keyboard"),u.nativeEvent.code==="Space"&&o==="button"&&(u.preventDefault(),a.store.toggleDropdown("keyboard"))}};return{...r?{"aria-haspopup":"listbox","aria-expanded":n&&!!(a.store.listId&&a.store.dropdownOpened)||void 0,"aria-controls":a.store.dropdownOpened?a.store.listId:void 0,"aria-activedescendant":a.store.dropdownOpened&&s||void 0,autoComplete:i,"data-expanded":a.store.dropdownOpened||void 0,"data-mantine-stop-propagation":a.store.dropdownOpened||void 0}:{},onKeyDown:c}}var yle={refProp:"ref",targetType:"input",withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:"off"},R6=M((e,t)=>{let{children:r,refProp:n,withKeyboardNavigation:o,withAriaAttributes:i,withExpandedAttribute:a,targetType:s,autoComplete:l,...c}=z("ComboboxEventsTarget",yle,e);if(!ko(r))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");let d=rr(),u=Dm({targetType:s,withAriaAttributes:i,withKeyboardNavigation:o,withExpandedAttribute:a,onKeyDown:r.props.onKeyDown,autoComplete:l});return(0,mV.cloneElement)(r,{...u,...c,[n]:Ze(t,d.store.targetRef,El(r))})});R6.displayName="@mantine/core/ComboboxEventsTarget";var pV=y(O(),1),x9e=y(D(),1);var _le={},d0=M((e,t)=>{let{classNames:r,className:n,style:o,styles:i,vars:a,...s}=z("ComboboxFooter",_le,e),l=rr();return(0,pV.jsx)(F,{ref:t,...l.getStyles("footer",{className:n,classNames:r,style:o,styles:i}),...s,onMouseDown:c=>{c.preventDefault()}})});d0.classes=qt;d0.displayName="@mantine/core/ComboboxFooter";var u0=y(O(),1),C9e=y(D(),1);var Ile={},f0=M((e,t)=>{let{classNames:r,className:n,style:o,styles:i,vars:a,children:s,label:l,...c}=z("ComboboxGroup",Ile,e),d=rr();return(0,u0.jsxs)(F,{ref:t,...d.getStyles("group",{className:n,classNames:r,style:o,styles:i}),...c,children:[l&&(0,u0.jsx)("div",{...d.getStyles("groupLabel",{classNames:r,styles:i}),children:l}),s]})});f0.classes=qt;f0.displayName="@mantine/core/ComboboxGroup";var hV=y(O(),1),O9e=y(D(),1);var wle={},m0=M((e,t)=>{let{classNames:r,className:n,style:o,styles:i,vars:a,...s}=z("ComboboxHeader",wle,e),l=rr();return(0,hV.jsx)(F,{ref:t,...l.getStyles("header",{className:n,classNames:r,style:o,styles:i}),...s,onMouseDown:c=>{c.preventDefault()}})});m0.classes=qt;m0.displayName="@mantine/core/ComboboxHeader";var gV=y(O(),1);function T6({value:e,valuesDivider:t=",",...r}){return(0,gV.jsx)("input",{type:"hidden",value:Array.isArray(e)?e.join(t):e||"",...r})}T6.displayName="@mantine/core/ComboboxHiddenInput";var vV=y(O(),1),xV=y(D(),1);var Sle={},p0=M((e,t)=>{let r=z("ComboboxOption",Sle,e),{classNames:n,className:o,style:i,styles:a,vars:s,onClick:l,id:c,active:d,onMouseDown:u,onMouseOver:f,disabled:m,selected:p,mod:g,...b}=r,v=rr(),x=(0,xV.useId)(),_=c||x;return(0,vV.jsx)(F,{...v.getStyles("option",{className:o,classNames:n,styles:a,style:i}),...b,ref:t,id:_,mod:["combobox-option",{"combobox-active":d,"combobox-disabled":m,"combobox-selected":p},g],role:"option",onClick:I=>{m?I.preventDefault():(v.onOptionSubmit?.(r.value,r),l?.(I))},onMouseDown:I=>{I.preventDefault(),u?.(I)},onMouseOver:I=>{v.resetSelectionOnOptionHover&&v.store.resetSelectedOption(),f?.(I)}})});p0.classes=qt;p0.displayName="@mantine/core/ComboboxOption";var bV=y(O(),1),yV=y(D(),1);var kle={},h0=M((e,t)=>{let r=z("ComboboxOptions",kle,e),{classNames:n,className:o,style:i,styles:a,id:s,onMouseDown:l,labelledBy:c,...d}=r,u=rr(),f=gt(s);return(0,yV.useEffect)(()=>{u.store.setListId(f)},[f]),(0,bV.jsx)(F,{ref:t,...u.getStyles("options",{className:o,style:i,classNames:n,styles:a}),...d,id:f,role:"listbox","aria-labelledby":c,onMouseDown:m=>{m.preventDefault(),l?.(m)}})});h0.classes=qt;h0.displayName="@mantine/core/ComboboxOptions";var _V=y(O(),1);var ije=y(D(),1);var Cle={withAriaAttributes:!0,withKeyboardNavigation:!0},g0=M((e,t)=>{let r=z("ComboboxSearch",Cle,e),{classNames:n,styles:o,unstyled:i,vars:a,withAriaAttributes:s,onKeyDown:l,withKeyboardNavigation:c,size:d,...u}=r,f=rr(),m=f.getStyles("search"),p=Dm({targetType:"input",withAriaAttributes:s,withKeyboardNavigation:c,withExpandedAttribute:!1,onKeyDown:l,autoComplete:"off"});return(0,_V.jsx)(ft,{ref:Ze(t,f.store.searchRef),classNames:[{input:m.className},n],styles:[{input:m.style},o],size:d||f.size,...p,...u,__staticSelector:"Combobox"})});g0.classes=qt;g0.displayName="@mantine/core/ComboboxSearch";var IV=y(O(),1),wV=y(D(),1);var Ple={refProp:"ref",targetType:"input",withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:"off"},E6=M((e,t)=>{let{children:r,refProp:n,withKeyboardNavigation:o,withAriaAttributes:i,withExpandedAttribute:a,targetType:s,autoComplete:l,...c}=z("ComboboxTarget",Ple,e);if(!ko(r))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");let d=rr(),u=Dm({targetType:s,withAriaAttributes:i,withKeyboardNavigation:o,withExpandedAttribute:a,onKeyDown:r.props.onKeyDown,autoComplete:l}),f=(0,wV.cloneElement)(r,{...u,...c});return(0,IV.jsx)(Xr.Target,{ref:Ze(t,d.store.targetRef),children:f})});E6.displayName="@mantine/core/ComboboxTarget";var Ot=y(D(),1);function SV(e,t,r){for(let n=e-1;n>=0;n-=1)if(!t[n].hasAttribute("data-combobox-disabled"))return n;if(r){for(let n=t.length-1;n>-1;n-=1)if(!t[n].hasAttribute("data-combobox-disabled"))return n}return e}function kV(e,t,r){for(let n=e+1;n<t.length;n+=1)if(!t[n].hasAttribute("data-combobox-disabled"))return n;if(r){for(let n=0;n<t.length;n+=1)if(!t[n].hasAttribute("data-combobox-disabled"))return n}return e}function CV(e){for(let t=0;t<e.length;t+=1)if(!e[t].hasAttribute("data-combobox-disabled"))return t;return-1}function dc({defaultOpened:e,opened:t,onOpenedChange:r,onDropdownClose:n,onDropdownOpen:o,loop:i=!0,scrollBehavior:a="instant"}={}){let[s,l]=ot({value:t,defaultValue:e,finalValue:!1,onChange:r}),c=(0,Ot.useRef)(null),d=(0,Ot.useRef)(-1),u=(0,Ot.useRef)(null),f=(0,Ot.useRef)(null),m=(0,Ot.useRef)(-1),p=(0,Ot.useRef)(-1),g=(0,Ot.useRef)(-1),b=(0,Ot.useCallback)((C="unknown")=>{s||(l(!0),o?.(C))},[l,o,s]),v=(0,Ot.useCallback)((C="unknown")=>{s&&(l(!1),n?.(C))},[l,n,s]),x=(0,Ot.useCallback)((C="unknown")=>{s?v(C):b(C)},[v,b,s]),_=(0,Ot.useCallback)(()=>{let C=document.querySelector(`#${c.current} [data-combobox-selected]`);C?.removeAttribute("data-combobox-selected"),C?.removeAttribute("aria-selected")},[]),I=(0,Ot.useCallback)(C=>{let R=document.getElementById(c.current)?.querySelectorAll("[data-combobox-option]");if(!R)return null;let N=C>=R.length?0:C<0?R.length-1:C;return d.current=N,R?.[N]&&!R[N].hasAttribute("data-combobox-disabled")?(_(),R[N].setAttribute("data-combobox-selected","true"),R[N].setAttribute("aria-selected","true"),R[N].scrollIntoView({block:"nearest",behavior:a}),R[N].id):null},[a,_]),S=(0,Ot.useCallback)(()=>{let C=document.querySelector(`#${c.current} [data-combobox-active]`);if(C){let A=document.querySelectorAll(`#${c.current} [data-combobox-option]`),R=Array.from(A).findIndex(N=>N===C);return I(R)}return I(0)},[I]),w=(0,Ot.useCallback)(()=>I(kV(d.current,document.querySelectorAll(`#${c.current} [data-combobox-option]`),i)),[I,i]),P=(0,Ot.useCallback)(()=>I(SV(d.current,document.querySelectorAll(`#${c.current} [data-combobox-option]`),i)),[I,i]),$=(0,Ot.useCallback)(()=>I(CV(document.querySelectorAll(`#${c.current} [data-combobox-option]`))),[I]),B=(0,Ot.useCallback)((C="selected",A)=>{g.current=window.setTimeout(()=>{let R=document.querySelectorAll(`#${c.current} [data-combobox-option]`),N=Array.from(R).findIndex(U=>U.hasAttribute(`data-combobox-${C}`));d.current=N,A?.scrollIntoView&&R[N]?.scrollIntoView({block:"nearest",behavior:a})},0)},[]),W=(0,Ot.useCallback)(()=>{d.current=-1,_()},[_]),H=(0,Ot.useCallback)(()=>{document.querySelectorAll(`#${c.current} [data-combobox-option]`)?.[d.current]?.click()},[]),K=(0,Ot.useCallback)(C=>{c.current=C},[]),T=(0,Ot.useCallback)(()=>{m.current=window.setTimeout(()=>u.current.focus(),0)},[]),k=(0,Ot.useCallback)(()=>{p.current=window.setTimeout(()=>f.current.focus(),0)},[]),E=(0,Ot.useCallback)(()=>d.current,[]);return(0,Ot.useEffect)(()=>()=>{window.clearTimeout(m.current),window.clearTimeout(p.current),window.clearTimeout(g.current)},[]),{dropdownOpened:s,openDropdown:b,closeDropdown:v,toggleDropdown:x,selectedOptionIndex:d.current,getSelectedOptionIndex:E,selectOption:I,selectFirstOption:$,selectActiveOption:S,selectNextOption:w,selectPreviousOption:P,resetSelectedOption:W,updateSelectedOptionIndex:B,listId:c.current,setListId:K,clickSelectedOption:H,searchRef:u,focusSearchInput:T,targetRef:f,focusTarget:k}}var Dle={keepMounted:!0,withinPortal:!0,resetSelectionOnOptionHover:!1,width:"target",transitionProps:{transition:"fade",duration:0}},Rle=(e,{size:t,dropdownPadding:r})=>({options:{"--combobox-option-fz":kt(t),"--combobox-option-padding":xe(t,"combobox-option-padding")},dropdown:{"--combobox-padding":r===void 0?void 0:Z(r),"--combobox-option-fz":kt(t),"--combobox-option-padding":xe(t,"combobox-option-padding")}});function Ve(e){let t=z("Combobox",Dle,e),{classNames:r,styles:n,unstyled:o,children:i,store:a,vars:s,onOptionSubmit:l,onClose:c,size:d,dropdownPadding:u,resetSelectionOnOptionHover:f,__staticSelector:m,readOnly:p,...g}=t,b=dc(),v=a||b,x=q({name:m||"Combobox",classes:qt,props:t,classNames:r,styles:n,unstyled:o,vars:s,varsResolver:Rle}),_=()=>{c?.(),v.closeDropdown()};return(0,$6.jsx)(aV,{value:{getStyles:x,store:v,onOptionSubmit:l,size:d,resetSelectionOnOptionHover:f,readOnly:p},children:(0,$6.jsx)(Xr,{opened:v.dropdownOpened,...g,onChange:I=>!I&&_(),withRoles:!1,unstyled:o,children:i})})}var Tle=e=>e;Ve.extend=Tle;Ve.classes=qt;Ve.displayName="@mantine/core/Combobox";Ve.Target=E6;Ve.Dropdown=l0;Ve.Options=h0;Ve.Option=p0;Ve.Search=g0;Ve.Empty=c0;Ve.Chevron=s0;Ve.Footer=d0;Ve.Header=m0;Ve.EventsTarget=R6;Ve.DropdownTarget=D6;Ve.Group=f0;Ve.ClearButton=P6;Ve.HiddenInput=T6;var Xo=y(O(),1);var Em=y(O(),1),k0=y(D(),1);var uc=y(O(),1),PV=y(D(),1);var A6={root:"m_5f75b09e",body:"m_5f6e695e",labelWrapper:"m_d3ea56bb",label:"m_8ee546b8",description:"m_328f68c0",error:"m_8e8a99cc"};var v0=A6,Jd=(0,PV.forwardRef)(({__staticSelector:e,__stylesApiProps:t,className:r,classNames:n,styles:o,unstyled:i,children:a,label:s,description:l,id:c,disabled:d,error:u,size:f,labelPosition:m="left",bodyElement:p="div",labelElement:g="label",variant:b,style:v,vars:x,mod:_,...I},S)=>{let w=q({name:e,props:t,className:r,style:v,classes:A6,classNames:n,styles:o,unstyled:i});return(0,uc.jsx)(F,{...w("root"),ref:S,__vars:{"--label-fz":kt(f),"--label-lh":xe(f,"label-lh")},mod:[{"label-position":m},_],variant:b,size:f,...I,children:(0,uc.jsxs)(F,{component:p,htmlFor:p==="label"?c:void 0,...w("body"),children:[a,(0,uc.jsxs)("div",{...w("labelWrapper"),"data-disabled":d||void 0,children:[s&&(0,uc.jsx)(F,{component:g,htmlFor:g==="label"?c:void 0,...w("label"),"data-disabled":d||void 0,children:s}),l&&(0,uc.jsx)(ft.Description,{size:f,__inheritStyles:!1,...w("description"),children:l}),u&&typeof u!="boolean"&&(0,uc.jsx)(ft.Error,{size:f,__inheritStyles:!1,...w("error"),children:u})]})]})})});Jd.displayName="@mantine/core/InlineInput";var z6=y(O(),1);var pUe=y(D(),1);var x0=y(D(),1),DV=(0,x0.createContext)(null),RV=DV.Provider,b0=()=>(0,x0.useContext)(DV);var sUe=y(D(),1),lUe=y(O(),1);var[TV,EV]=Co();var O6={card:"m_26775b0a"};var Ele={withBorder:!0},$le=(e,{radius:t})=>({card:{"--card-radius":Ee(t)}}),y0=M((e,t)=>{let r=z("CheckboxCard",Ele,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,checked:c,mod:d,withBorder:u,value:f,onClick:m,defaultChecked:p,onChange:g,...b}=r,v=q({name:"CheckboxCard",classes:O6,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:$le,rootSelector:"card"}),x=b0(),_=typeof c=="boolean"?c:x?x.value.includes(f||""):void 0,[I,S]=ot({value:_,defaultValue:p,finalValue:!1,onChange:g});return(0,z6.jsx)(TV,{value:{checked:I},children:(0,z6.jsx)(_t,{ref:t,mod:[{"with-border":u,checked:I},d],...v("card"),...b,role:"checkbox","aria-checked":I,onClick:w=>{m?.(w),x?.onChange(f||""),S(!I)}})})});y0.displayName="@mantine/core/CheckboxCard";y0.classes=O6;var _0=y(O(),1);var TUe=y(D(),1);var sv=y(O(),1);var kUe=y(D(),1);function Rm({children:e,role:t}){let r=vi();return r?(0,sv.jsx)("div",{role:t,"aria-labelledby":r.labelId,"aria-describedby":r.describedBy,children:e}):(0,sv.jsx)(sv.Fragment,{children:e})}var Ale={},I0=M((e,t)=>{let{value:r,defaultValue:n,onChange:o,size:i,wrapperProps:a,children:s,readOnly:l,...c}=z("CheckboxGroup",Ale,e),[d,u]=ot({value:r,defaultValue:n,finalValue:[],onChange:o});return(0,_0.jsx)(RV,{value:{value:d,onChange:m=>{let p=typeof m=="string"?m:m.currentTarget.value;!l&&u(d.includes(p)?d.filter(g=>g!==p):[...d,p])},size:i},children:(0,_0.jsx)(ft.Wrapper,{size:i,ref:t,...a,...c,labelElement:"div",__staticSelector:"CheckboxGroup",children:(0,_0.jsx)(Rm,{role:"group",children:s})})})});I0.classes=ft.Wrapper.classes;I0.displayName="@mantine/core/CheckboxGroup";var L6=y(O(),1),VUe=y(D(),1);var Tm=y(O(),1);var MUe=y(D(),1);function N6({size:e,style:t,...r}){let n=e!==void 0?{width:Z(e),height:Z(e),...t}:t;return(0,Tm.jsx)("svg",{viewBox:"0 0 10 7",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:n,"aria-hidden":!0,...r,children:(0,Tm.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 w0({indeterminate:e,...t}){return e?(0,Tm.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 32 6","aria-hidden":!0,...t,children:(0,Tm.jsx)("rect",{width:"32",height:"6",fill:"currentColor",rx:"3"})}):(0,Tm.jsx)(N6,{...t})}var F6={indicator:"m_5e5256ee",icon:"m_1b1c543a","indicator--outline":"m_76e20374"};var Ole={icon:w0},zle=(e,{radius:t,color:r,size:n,iconColor:o,variant:i,autoContrast:a})=>{let s=Ir({color:r||e.primaryColor,theme:e}),l=s.isThemeColor&&s.shade===void 0?`var(--mantine-color-${s.color}-outline)`:s.color;return{indicator:{"--checkbox-size":xe(n,"checkbox-size"),"--checkbox-radius":t===void 0?void 0:Ee(t),"--checkbox-color":i==="outline"?l:Ue(r,e),"--checkbox-icon-color":o?Ue(o,e):Sa(a,e)?Mn({color:r,theme:e,autoContrast:a}):void 0}}},S0=M((e,t)=>{let r=z("CheckboxIndicator",Ole,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,icon:c,indeterminate:d,radius:u,color:f,iconColor:m,autoContrast:p,checked:g,mod:b,variant:v,disabled:x,..._}=r,I=c,S=q({name:"CheckboxIndicator",classes:F6,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:zle,rootSelector:"indicator"}),w=EV(),P=typeof g=="boolean"||typeof d=="boolean"?g||d:w?.checked||!1;return(0,L6.jsx)(F,{ref:t,...S("indicator",{variant:v}),variant:v,mod:[{checked:P,disabled:x},b],..._,children:(0,L6.jsx)(I,{indeterminate:d,...S("icon")})})});S0.displayName="@mantine/core/CheckboxIndicator";S0.classes=F6;var M6={root:"m_bf2d988c",inner:"m_26062bec",input:"m_26063560",icon:"m_bf295423","input--outline":"m_215c4542"};var Nle={labelPosition:"right",icon:w0},Fle=(e,{radius:t,color:r,size:n,iconColor:o,variant:i,autoContrast:a})=>{let s=Ir({color:r||e.primaryColor,theme:e}),l=s.isThemeColor&&s.shade===void 0?`var(--mantine-color-${s.color}-outline)`:s.color;return{root:{"--checkbox-size":xe(n,"checkbox-size"),"--checkbox-radius":t===void 0?void 0:Ee(t),"--checkbox-color":i==="outline"?l:Ue(r,e),"--checkbox-icon-color":o?Ue(o,e):Sa(a,e)?Mn({color:r,theme:e,autoContrast:a}):void 0}}},js=M((e,t)=>{let r=z("Checkbox",Nle,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,color:c,label:d,id:u,size:f,radius:m,wrapperProps:p,checked:g,labelPosition:b,description:v,error:x,disabled:_,variant:I,indeterminate:S,icon:w,rootRef:P,iconColor:$,onChange:B,autoContrast:W,mod:H,...K}=r,T=b0(),k=f||T?.size,E=w,C=q({name:"Checkbox",props:r,classes:M6,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:Fle}),{styleProps:A,rest:R}=Gr(K),N=gt(u),U=T?{checked:T.value.includes(R.value),onChange:ve=>{T.onChange(ve),B?.(ve)}}:{},G=(0,k0.useRef)(null),re=t||G;return(0,k0.useEffect)(()=>{re&&"current"in re&&re.current&&(re.current.indeterminate=S||!1)},[S,re]),(0,Em.jsx)(Jd,{...C("root"),__staticSelector:"Checkbox",__stylesApiProps:r,id:N,size:k,labelPosition:b,label:d,description:v,error:x,disabled:_,classNames:n,styles:a,unstyled:s,"data-checked":U.checked||g||void 0,variant:I,ref:P,mod:H,...A,...p,children:(0,Em.jsxs)(F,{...C("inner"),mod:{"data-label-position":b},children:[(0,Em.jsx)(F,{component:"input",id:N,ref:re,checked:g,disabled:_,mod:{error:!!x,indeterminate:S},...C("input",{focusable:!0,variant:I}),onChange:B,...R,...U,type:"checkbox"}),(0,Em.jsx)(E,{indeterminate:S,...C("icon")})]})})});js.classes={...M6,...v0};js.displayName="@mantine/core/Checkbox";js.Group=I0;js.Indicator=S0;js.Card=y0;function yi(e){return"group"in e}function B6({options:e,search:t,limit:r}){let n=t.trim().toLowerCase(),o=[];for(let i=0;i<e.length;i+=1){let a=e[i];if(o.length===r)return o;yi(a)&&o.push({group:a.group,items:B6({options:a.items,search:t,limit:r-o.length})}),yi(a)||a.label.toLowerCase().includes(n)&&o.push(a)}return o}function $V(e){if(e.length===0)return!0;for(let t of e)if(!("group"in t)||t.items.length>0)return!1;return!0}function j6(e,t=new Set){if(Array.isArray(e))for(let r of e)if(yi(r))j6(r.items,t);else{if(typeof r.value>"u")throw new Error("[@mantine/core] Each option must have value property");if(typeof r.value!="string")throw new Error(`[@mantine/core] Option value must be a string, other data formats are not supported, got ${typeof r.value}`);if(t.has(r.value))throw new Error(`[@mantine/core] Duplicate options are not supported. Option with value "${r.value}" was provided more than once`);t.add(r.value)}}function Lle(e,t){return Array.isArray(e)?e.includes(t):e===t}function AV({data:e,withCheckIcon:t,value:r,checkIconPosition:n,unstyled:o,renderOption:i}){if(!yi(e)){let s=Lle(r,e.value),l=t&&s&&(0,Xo.jsx)(N6,{className:qt.optionsDropdownCheckIcon}),c=(0,Xo.jsxs)(Xo.Fragment,{children:[n==="left"&&l,(0,Xo.jsx)("span",{children:e.label}),n==="right"&&l]});return(0,Xo.jsx)(Ve.Option,{value:e.value,disabled:e.disabled,className:qe({[qt.optionsDropdownOption]:!o}),"data-reverse":n==="right"||void 0,"data-checked":s||void 0,"aria-selected":s,active:s,children:typeof i=="function"?i({option:e,checked:s}):c})}let a=e.items.map(s=>(0,Xo.jsx)(AV,{data:s,value:r,unstyled:o,withCheckIcon:t,checkIconPosition:n,renderOption:i},s.value));return(0,Xo.jsx)(Ve.Group,{label:e.group,children:a})}function $m({data:e,hidden:t,hiddenWhenEmpty:r,filter:n,search:o,limit:i,maxDropdownHeight:a,withScrollArea:s=!0,filterOptions:l=!0,withCheckIcon:c=!1,value:d,checkIconPosition:u,nothingFoundMessage:f,unstyled:m,labelId:p,renderOption:g,scrollAreaProps:b,"aria-label":v}){j6(e);let _=typeof o=="string"?(n||B6)({options:e,search:l?o:"",limit:i??1/0}):e,I=$V(_),S=_.map(w=>(0,Xo.jsx)(AV,{data:w,withCheckIcon:c,value:d,checkIconPosition:u,unstyled:m,renderOption:g},yi(w)?w.group:w.value));return(0,Xo.jsx)(Ve.Dropdown,{hidden:t||r&&I,"data-composed":!0,children:(0,Xo.jsxs)(Ve.Options,{labelledBy:p,"aria-label":v,children:[s?(0,Xo.jsx)(zr.Autosize,{mah:a??220,type:"scroll",scrollbarSize:"var(--combobox-padding)",offsetScrollbars:"y",...b,children:S}):S,I&&f&&(0,Xo.jsx)(Ve.Empty,{children:f})]})})}var lv=y(O(),1),D0=y(D(),1);var U6=y(O(),1),VVe=y(D(),1);var C0=y(D(),1),OV=(0,C0.createContext)(null),zV=OV.Provider;function NV(){return{withinGroup:!!(0,C0.useContext)(OV)}}var Am={group:"m_11def92b",root:"m_f85678b6",image:"m_11f8ac07",placeholder:"m_104cd71f"};var Mle={},Ble=(e,{spacing:t})=>({group:{"--ag-spacing":At(t)}}),P0=M((e,t)=>{let r=z("AvatarGroup",Mle,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,spacing:c,...d}=r,u=q({name:"AvatarGroup",classes:Am,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:Ble,rootSelector:"group"});return(0,U6.jsx)(zV,{value:!0,children:(0,U6.jsx)(F,{ref:t,...u("group"),...d})})});P0.classes=Am;P0.displayName="@mantine/core/AvatarGroup";var V6=y(O(),1);function FV(e){return(0,V6.jsx)("svg",{...e,"data-avatar-placeholder-icon":!0,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,V6.jsx)("path",{d:"M0.877014 7.49988C0.877014 3.84219 3.84216 0.877045 7.49985 0.877045C11.1575 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1575 14.1227 7.49985 14.1227C3.84216 14.1227 0.877014 11.1575 0.877014 7.49988ZM7.49985 1.82704C4.36683 1.82704 1.82701 4.36686 1.82701 7.49988C1.82701 8.97196 2.38774 10.3131 3.30727 11.3213C4.19074 9.94119 5.73818 9.02499 7.50023 9.02499C9.26206 9.02499 10.8093 9.94097 11.6929 11.3208C12.6121 10.3127 13.1727 8.97172 13.1727 7.49988C13.1727 4.36686 10.6328 1.82704 7.49985 1.82704ZM10.9818 11.9787C10.2839 10.7795 8.9857 9.97499 7.50023 9.97499C6.01458 9.97499 4.71624 10.7797 4.01845 11.9791C4.97952 12.7272 6.18765 13.1727 7.49985 13.1727C8.81227 13.1727 10.0206 12.727 10.9818 11.9787ZM5.14999 6.50487C5.14999 5.207 6.20212 4.15487 7.49999 4.15487C8.79786 4.15487 9.84999 5.207 9.84999 6.50487C9.84999 7.80274 8.79786 8.85487 7.49999 8.85487C6.20212 8.85487 5.14999 7.80274 5.14999 6.50487ZM7.49999 5.10487C6.72679 5.10487 6.09999 5.73167 6.09999 6.50487C6.09999 7.27807 6.72679 7.90487 7.49999 7.90487C8.27319 7.90487 8.89999 7.27807 8.89999 6.50487C8.89999 5.73167 8.27319 5.10487 7.49999 5.10487Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}function jle(e){let t=0;for(let r=0;r<e.length;r+=1){let n=e.charCodeAt(r);t=(t<<5)-t+n,t|=0}return t}var Ule=["blue","cyan","grape","green","indigo","lime","orange","pink","red","teal","violet"];function LV(e,t=Ule){let r=jle(e),n=Math.abs(r)%t.length;return t[n]}function MV(e,t=2){let r=e.split(" ");return r.length===1?e.slice(0,t).toUpperCase():r.map(n=>n[0]).slice(0,t).join("").toUpperCase()}var Vle={},Hle=(e,{size:t,radius:r,variant:n,gradient:o,color:i,autoContrast:a,name:s,allowedInitialsColors:l})=>{let c=i==="initials"&&typeof s=="string"?LV(s,l):i,d=e.variantColorResolver({color:c||"gray",theme:e,gradient:o,variant:n||"light",autoContrast:a});return{root:{"--avatar-size":xe(t,"avatar-size"),"--avatar-radius":r===void 0?void 0:Ee(r),"--avatar-bg":c||n?d.background:void 0,"--avatar-color":c||n?d.color:void 0,"--avatar-bd":c||n?d.border:void 0}}},eu=nt((e,t)=>{let r=z("Avatar",Vle,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,src:c,alt:d,radius:u,color:f,gradient:m,imageProps:p,children:g,autoContrast:b,mod:v,name:x,allowedInitialsColors:_,...I}=r,S=NV(),[w,P]=(0,D0.useState)(!c),$=q({name:"Avatar",props:r,classes:Am,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:Hle});return(0,D0.useEffect)(()=>P(!c),[c]),(0,lv.jsx)(F,{...$("root"),mod:[{"within-group":S.withinGroup},v],ref:t,...I,children:w?(0,lv.jsx)("span",{...$("placeholder"),title:d,children:g||typeof x=="string"&&MV(x)||(0,lv.jsx)(FV,{})}):(0,lv.jsx)("img",{...p,...$("image"),src:c,alt:d,onError:B=>{P(!0),p?.onError?.(B)}})})});eu.classes=Am;eu.displayName="@mantine/core/Avatar";eu.Group=P0;var Om=y(O(),1),gHe=y(D(),1);var H6={root:"m_347db0ec","root--dot":"m_fbd81e3d",label:"m_5add502a",section:"m_91fdda9b"};var Wle={},Zle=(e,{radius:t,color:r,gradient:n,variant:o,size:i,autoContrast:a})=>{let s=e.variantColorResolver({color:r||e.primaryColor,theme:e,gradient:n,variant:o||"filled",autoContrast:a});return{root:{"--badge-height":xe(i,"badge-height"),"--badge-padding-x":xe(i,"badge-padding-x"),"--badge-fz":xe(i,"badge-fz"),"--badge-radius":t===void 0?void 0:Ee(t),"--badge-bg":r||o?s.background:void 0,"--badge-color":r||o?s.color:void 0,"--badge-bd":r||o?s.border:void 0,"--badge-dot-color":o==="dot"?Ue(r,e):void 0}}},kn=nt((e,t)=>{let r=z("Badge",Wle,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,radius:c,color:d,gradient:u,leftSection:f,rightSection:m,children:p,variant:g,fullWidth:b,autoContrast:v,circle:x,mod:_,...I}=r,S=q({name:"Badge",props:r,classes:H6,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:Zle});return(0,Om.jsxs)(F,{variant:g,mod:[{block:b,circle:x,"with-right-section":!!m,"with-left-section":!!f},_],...S("root",{variant:g}),ref:t,...I,children:[f&&(0,Om.jsx)("span",{...S("section"),"data-position":"left",children:f}),(0,Om.jsx)("span",{...S("label"),children:p}),m&&(0,Om.jsx)("span",{...S("section"),"data-position":"right",children:m})]})});kn.classes=H6;kn.displayName="@mantine/core/Badge";var R0=y(O(),1);var DHe=y(D(),1);var W6={root:"m_fea6bf1a",burger:"m_d4fb9cad"};var Gle={},Kle=(e,{color:t,size:r,lineSize:n,transitionDuration:o,transitionTimingFunction:i})=>({root:{"--burger-color":t?Ue(t,e):void 0,"--burger-size":xe(r,"burger-size"),"--burger-line-size":n?Z(n):void 0,"--burger-transition-duration":o===void 0?void 0:`${o}ms`,"--burger-transition-timing-function":i}}),cv=M((e,t)=>{let r=z("Burger",Gle,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,opened:c,children:d,transitionDuration:u,transitionTimingFunction:f,lineSize:m,...p}=r,g=q({name:"Burger",classes:W6,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:Kle});return(0,R0.jsxs)(_t,{...g("root"),ref:t,...p,children:[(0,R0.jsx)(F,{mod:["reduce-motion",{opened:c}],...g("burger")}),d]})});cv.classes=W6;cv.displayName="@mantine/core/Burger";var Wa=y(O(),1);var iWe=y(D(),1);var jV=y(O(),1);var jHe=y(D(),1);var Us={root:"m_77c9d27d",inner:"m_80f1301b",label:"m_811560b9",section:"m_a74036a",loader:"m_a25b86ee",group:"m_80d6d844",groupSection:"m_70be2a01"};var BV={orientation:"horizontal"},qle=(e,{borderWidth:t})=>({group:{"--button-border-width":Z(t)}}),T0=M((e,t)=>{let r=z("ButtonGroup",BV,e),{className:n,style:o,classNames:i,styles:a,unstyled:s,orientation:l,vars:c,borderWidth:d,variant:u,mod:f,...m}=z("ButtonGroup",BV,e),p=q({name:"ButtonGroup",props:r,classes:Us,className:n,style:o,classNames:i,styles:a,unstyled:s,vars:c,varsResolver:qle,rootSelector:"group"});return(0,jV.jsx)(F,{...p("group"),ref:t,variant:u,mod:[{"data-orientation":l},f],role:"group",...m})});T0.classes=Us;T0.displayName="@mantine/core/ButtonGroup";var VV=y(O(),1),qHe=y(D(),1);var UV={},Xle=(e,{radius:t,color:r,gradient:n,variant:o,autoContrast:i,size:a})=>{let s=e.variantColorResolver({color:r||e.primaryColor,theme:e,gradient:n,variant:o||"filled",autoContrast:i});return{groupSection:{"--section-height":xe(a,"section-height"),"--section-padding-x":xe(a,"section-padding-x"),"--section-fz":a?.includes("compact")?kt(a.replace("compact-","")):kt(a),"--section-radius":t===void 0?void 0:Ee(t),"--section-bg":r||o?s.background:void 0,"--section-color":s.color,"--section-bd":r||o?s.border:void 0}}},E0=M((e,t)=>{let r=z("ButtonGroupSection",UV,e),{className:n,style:o,classNames:i,styles:a,unstyled:s,vars:l,variant:c,gradient:d,radius:u,autoContrast:f,...m}=z("ButtonGroupSection",UV,e),p=q({name:"ButtonGroupSection",props:r,classes:Us,className:n,style:o,classNames:i,styles:a,unstyled:s,vars:l,varsResolver:Xle,rootSelector:"groupSection"});return(0,VV.jsx)(F,{...p("groupSection"),ref:t,variant:c,...m})});E0.classes=Us;E0.displayName="@mantine/core/ButtonGroupSection";var Qle={in:{opacity:1,transform:`translate(-50%, calc(-50% + ${Z(1)}))`},out:{opacity:0,transform:"translate(-50%, -200%)"},common:{transformOrigin:"center"},transitionProperty:"transform, opacity"},Yle={},Jle=(e,{radius:t,color:r,gradient:n,variant:o,size:i,justify:a,autoContrast:s})=>{let l=e.variantColorResolver({color:r||e.primaryColor,theme:e,gradient:n,variant:o||"filled",autoContrast:s});return{root:{"--button-justify":a,"--button-height":xe(i,"button-height"),"--button-padding-x":xe(i,"button-padding-x"),"--button-fz":i?.includes("compact")?kt(i.replace("compact-","")):kt(i),"--button-radius":t===void 0?void 0:Ee(t),"--button-bg":r||o?l.background:void 0,"--button-hover":r||o?l.hover:void 0,"--button-color":l.color,"--button-bd":r||o?l.border:void 0,"--button-hover-color":r||o?l.hoverColor:void 0}}},st=nt((e,t)=>{let r=z("Button",Yle,e),{style:n,vars:o,className:i,color:a,disabled:s,children:l,leftSection:c,rightSection:d,fullWidth:u,variant:f,radius:m,loading:p,loaderProps:g,gradient:b,classNames:v,styles:x,unstyled:_,"data-disabled":I,autoContrast:S,mod:w,...P}=r,$=q({name:"Button",props:r,classes:Us,className:i,style:n,classNames:v,styles:x,unstyled:_,vars:o,varsResolver:Jle}),B=!!c,W=!!d;return(0,Wa.jsxs)(_t,{ref:t,...$("root",{active:!s&&!p&&!I}),unstyled:_,variant:f,disabled:s||p,mod:[{disabled:s||I,loading:p,block:u,"with-left-section":B,"with-right-section":W},w],...P,children:[(0,Wa.jsx)(Go,{mounted:!!p,transition:Qle,duration:150,children:H=>(0,Wa.jsx)(F,{component:"span",...$("loader",{style:H}),"aria-hidden":!0,children:(0,Wa.jsx)(ho,{color:"var(--button-color)",size:"calc(var(--button-height) / 1.8)",...g})})}),(0,Wa.jsxs)("span",{...$("inner"),children:[c&&(0,Wa.jsx)(F,{component:"span",...$("section"),mod:{position:"left"},children:c}),(0,Wa.jsx)(F,{component:"span",mod:{loading:p},...$("label"),children:l}),d&&(0,Wa.jsx)(F,{component:"span",...$("section"),mod:{position:"right"},children:d})]})]})});st.classes=Us;st.displayName="@mantine/core/Button";st.Group=T0;st.GroupSection=E0;var Z6=y(O(),1),$0=y(D(),1);var bWe=y(D(),1);var _We=y(O(),1);var[HV,WV]=Zt("Card component was not found in tree");var ZV=y(O(),1),kWe=y(D(),1);var dv={root:"m_e615b15f",section:"m_599a2148"};var ece={},uv=nt((e,t)=>{let r=z("CardSection",ece,e),{classNames:n,className:o,style:i,styles:a,vars:s,withBorder:l,inheritPadding:c,mod:d,...u}=r,f=WV();return(0,ZV.jsx)(F,{ref:t,mod:[{"with-border":l,"inherit-padding":c},d],...f.getStyles("section",{className:o,style:i,styles:a,classNames:n}),...u})});uv.classes=dv;uv.displayName="@mantine/core/CardSection";var tce={},rce=(e,{padding:t})=>({root:{"--card-padding":At(t)}}),gr=nt((e,t)=>{let r=z("Card",tce,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,children:c,padding:d,...u}=r,f=q({name:"Card",props:r,classes:dv,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:rce}),m=$0.Children.toArray(c),p=m.map((g,b)=>typeof g=="object"&&g&&"type"in g&&g.type===uv?(0,$0.cloneElement)(g,{"data-first-section":b===0||void 0,"data-last-section":b===m.length-1||void 0}):g);return(0,Z6.jsx)(HV,{value:{getStyles:f},children:(0,Z6.jsx)(oa,{ref:t,unstyled:s,...f("root"),...u,children:p})})});gr.classes=dv;gr.displayName="@mantine/core/Card";gr.Section=uv;var GV=y(O(),1),HWe=y(D(),1);var G6={root:"m_4451eb3a"};var oce={},Vs=nt((e,t)=>{let r=z("Center",oce,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,inline:c,mod:d,...u}=r,f=q({name:"Center",props:r,classes:G6,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l});return(0,GV.jsx)(F,{ref:t,mod:[{inline:c},d],...f("root"),...u})});Vs.classes=G6;Vs.displayName="@mantine/core/Center";var KV=y(O(),1),JWe=y(D(),1);var K6={root:"m_b183c0a2"};var nce={},ice=(e,{color:t})=>({root:{"--code-bg":t?Ue(t,e):void 0}}),fv=M((e,t)=>{let r=z("Code",nce,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,color:c,block:d,variant:u,mod:f,...m}=r,p=q({name:"Code",props:r,classes:K6,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:ice});return(0,KV.jsx)(F,{component:d?"pre":"code",variant:u,ref:t,mod:[{block:d},f],...p("root"),...m,dir:"ltr"})});fv.classes=K6;fv.displayName="@mantine/core/Code";var X6=y(O(),1),cZe=y(D(),1);var q6={root:"m_3eebeb36",label:"m_9e365f20"};var ace={orientation:"horizontal"},sce=(e,{color:t,variant:r,size:n})=>({root:{"--divider-color":t?Ue(t,e):void 0,"--divider-border-style":r,"--divider-size":xe(n,"divider-size")}}),mv=M((e,t)=>{let r=z("Divider",ace,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,color:c,orientation:d,label:u,labelPosition:f,mod:m,...p}=r,g=q({name:"Divider",classes:q6,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:sce});return(0,X6.jsx)(F,{ref:t,mod:[{orientation:d,"with-label":!!u},m],...g("root"),...p,role:"separator",children:u&&(0,X6.jsx)(F,{component:"span",mod:{position:f},...g("label"),children:u})})});mv.classes=q6;mv.displayName="@mantine/core/Divider";var pv=y(D(),1);function qV({open:e,close:t,openDelay:r,closeDelay:n}){let o=(0,pv.useRef)(-1),i=(0,pv.useRef)(-1),a=()=>{window.clearTimeout(o.current),window.clearTimeout(i.current)},s=()=>{a(),r===0||r===void 0?e():o.current=window.setTimeout(e,r)},l=()=>{a(),n===0||n===void 0?t():i.current=window.setTimeout(t,n)};return(0,pv.useEffect)(()=>a,[]),{openDropdown:s,closeDropdown:l}}var O0=y(O(),1),NZe=y(D(),1);var XV=y(O(),1),CZe=y(D(),1);var yZe=y(D(),1),_Ze=y(O(),1);function Q6({color:e,theme:t,defaultShade:r}){let n=Ir({color:e,theme:t});return n.isThemeColor?n.shade===void 0?`var(--mantine-color-${n.color}-${r})`:`var(${n.variable})`:e}var Y6={root:"m_bcb3f3c2"};var lce={color:"yellow"},cce=(e,{color:t})=>({root:{"--mark-bg-dark":Q6({color:t,theme:e,defaultShade:5}),"--mark-bg-light":Q6({color:t,theme:e,defaultShade:2})}}),A0=M((e,t)=>{let r=z("Mark",lce,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,color:c,variant:d,...u}=r,f=q({name:"Mark",props:r,className:o,style:i,classes:Y6,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:cce});return(0,XV.jsx)(F,{component:"mark",ref:t,variant:d,...f("root"),...u})});A0.classes=Y6;A0.displayName="@mantine/core/Mark";function QV(e){return e.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&")}function YV(e,t){if(t==null)return[{chunk:e,highlighted:!1}];let r=Array.isArray(t)?t.map(QV):QV(t);if(!(Array.isArray(r)?r.filter(s=>s.trim().length>0).length>0:r.trim()!==""))return[{chunk:e,highlighted:!1}];let o=typeof r=="string"?r.trim():r.filter(s=>s.trim().length!==0).map(s=>s.trim()).sort((s,l)=>l.length-s.length).join("|"),i=new RegExp(`(${o})`,"gi");return e.split(i).map(s=>({chunk:s,highlighted:i.test(s)})).filter(({chunk:s})=>s)}var dce={},hv=nt((e,t)=>{let{unstyled:r,children:n,highlight:o,highlightStyles:i,color:a,...s}=z("Highlight",dce,e),l=YV(n,o);return(0,O0.jsx)(ue,{unstyled:r,ref:t,...s,__staticSelector:"Highlight",children:l.map(({chunk:c,highlighted:d},u)=>d?(0,O0.jsx)(A0,{unstyled:r,color:a,style:i,"data-highlight":c,children:c},u):(0,O0.jsx)("span",{children:c},u))})});hv.classes=ue.classes;hv.displayName="@mantine/core/Highlight";var uH=y(O(),1),fH=y(D(),1);var dH=y(O(),1);function zm(){return zm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},zm.apply(null,arguments)}function Nm(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var ia=y(D());var tH=y(D());var JV=y(D()),eH=JV.useLayoutEffect;var rH=function(t){var r=tH.default.useRef(t);return eH(function(){r.current=t}),r};var J6=y(D()),oH=function(t,r){if(typeof t=="function"){t(r);return}t.current=r},nH=function(t,r){var n=J6.default.useRef();return J6.default.useCallback(function(o){t.current=o,n.current&&oH(n.current,null),n.current=r,r&&oH(r,o)},[r])};var iH={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},uce=function(t){Object.keys(iH).forEach(function(r){t.style.setProperty(r,iH[r],"important")})},aH=uce,Qo=null,sH=function(t,r){var n=t.scrollHeight;return r.sizingStyle.boxSizing==="border-box"?n+r.borderSize:n-r.paddingSize};function fce(e,t,r,n){r===void 0&&(r=1),n===void 0&&(n=1/0),Qo||(Qo=document.createElement("textarea"),Qo.setAttribute("tabindex","-1"),Qo.setAttribute("aria-hidden","true"),aH(Qo)),Qo.parentNode===null&&document.body.appendChild(Qo);var o=e.paddingSize,i=e.borderSize,a=e.sizingStyle,s=a.boxSizing;Object.keys(a).forEach(function(f){var m=f;Qo.style[m]=a[m]}),aH(Qo),Qo.value=t;var l=sH(Qo,e);Qo.value=t,l=sH(Qo,e),Qo.value="x";var c=Qo.scrollHeight-o,d=c*r;s==="border-box"&&(d=d+o+i),l=Math.max(d,l);var u=c*n;return s==="border-box"&&(u=u+o+i),l=Math.min(u,l),[l,c]}var lH=function(){},mce=function(t,r){return t.reduce(function(n,o){return n[o]=r[o],n},{})},pce=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak","wordSpacing","scrollbarGutter"],hce=!!document.documentElement.currentStyle,gce=function(t){var r=window.getComputedStyle(t);if(r===null)return null;var n=mce(pce,r),o=n.boxSizing;if(o==="")return null;hce&&o==="border-box"&&(n.width=parseFloat(n.width)+parseFloat(n.borderRightWidth)+parseFloat(n.borderLeftWidth)+parseFloat(n.paddingRight)+parseFloat(n.paddingLeft)+"px");var i=parseFloat(n.paddingBottom)+parseFloat(n.paddingTop),a=parseFloat(n.borderBottomWidth)+parseFloat(n.borderTopWidth);return{sizingStyle:n,paddingSize:i,borderSize:a}},vce=gce;function eR(e,t,r){var n=rH(r);ia.useLayoutEffect(function(){var o=function(a){return n.current(a)};if(e)return e.addEventListener(t,o),function(){return e.removeEventListener(t,o)}},[])}var xce=function(t,r){eR(document.body,"reset",function(n){t.current.form===n.target&&r(n)})},bce=function(t){eR(window,"resize",t)},yce=function(t){eR(document.fonts,"loadingdone",t)},_ce=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],Ice=function(t,r){var n=t.cacheMeasurements,o=t.maxRows,i=t.minRows,a=t.onChange,s=a===void 0?lH:a,l=t.onHeightChange,c=l===void 0?lH:l,d=Nm(t,_ce),u=d.value!==void 0,f=ia.useRef(null),m=nH(f,r),p=ia.useRef(0),g=ia.useRef(),b=function(){var _=f.current,I=n&&g.current?g.current:vce(_);if(I){g.current=I;var S=fce(I,_.value||_.placeholder||"x",i,o),w=S[0],P=S[1];p.current!==w&&(p.current=w,_.style.setProperty("height",w+"px","important"),c(w,{rowHeight:P}))}},v=function(_){u||b(),s(_)};return ia.useLayoutEffect(b),xce(f,function(){if(!u){var x=f.current.value;requestAnimationFrame(function(){var _=f.current;_&&x!==_.value&&b()})}}),bce(b),yce(b),ia.createElement("textarea",zm({},d,{onChange:v,ref:m}))},cH=ia.forwardRef(Ice);var rGe=y(D(),1);var wce={},z0=M((e,t)=>{let{autosize:r,maxRows:n,minRows:o,__staticSelector:i,resize:a,...s}=z("Textarea",wce,e),l=r&&Ey()!=="test";return(0,dH.jsx)(tr,{component:l?cH:"textarea",ref:t,...s,__staticSelector:i||"Textarea",multiline:!0,"data-no-overflow":r&&n===void 0||void 0,__vars:{"--input-resize":a},...l?{maxRows:n,minRows:o}:{}})});z0.classes=tr.classes;z0.displayName="@mantine/core/Textarea";function tR(e,t){if(typeof e=="string"&&e.trim().length===0)return!0;try{return t(e),!0}catch{return!1}}var Sce={serialize:JSON.stringify,deserialize:JSON.parse},gv=M((e,t)=>{let{value:r,defaultValue:n,onChange:o,formatOnBlur:i,validationError:a,serialize:s,deserialize:l,onFocus:c,onBlur:d,readOnly:u,error:f,...m}=z("JsonInput",Sce,e),[p,g]=ot({value:r,defaultValue:n,finalValue:"",onChange:o}),[b,v]=(0,fH.useState)(tR(p,l));return(0,uH.jsx)(z0,{value:p,onChange:I=>g(I.currentTarget.value),onFocus:I=>{c?.(I),v(!0)},onBlur:I=>{typeof d=="function"&&d(I);let S=tR(I.currentTarget.value,l);i&&!u&&S&&I.currentTarget.value.trim()!==""&&g(s(l(I.currentTarget.value),null,2)),v(S)},ref:t,readOnly:u,...m,autoComplete:"off",__staticSelector:"JsonInput",error:b?f:a||!0,"data-monospace":!0})});gv.classes=tr.classes;gv.displayName="@mantine/core/JsonInput";var oR=y(O(),1),bH=y(D(),1);var xGe=y(D(),1);var yGe=y(O(),1);var[mH,Za]=Zt("Menu component was not found in the tree");var pH=y(O(),1),SGe=y(D(),1);var aa={dropdown:"m_dc9b7c9f",label:"m_9bfac126",divider:"m_efdf90cb",item:"m_99ac2aa1",itemLabel:"m_5476e0d3",itemSection:"m_8b75e504"};var kce={},N0=M((e,t)=>{let{classNames:r,className:n,style:o,styles:i,vars:a,...s}=z("MenuDivider",kce,e),l=Za();return(0,pH.jsx)(F,{ref:t,...l.getStyles("divider",{className:n,style:o,styles:i,classNames:r}),...s})});N0.classes=aa;N0.displayName="@mantine/core/MenuDivider";var F0=y(O(),1),hH=y(D(),1);var Cce={},L0=M((e,t)=>{let{classNames:r,className:n,style:o,styles:i,vars:a,onMouseEnter:s,onMouseLeave:l,onKeyDown:c,children:d,...u}=z("MenuDropdown",Cce,e),f=(0,hH.useRef)(null),m=Za(),p=Ln(c,v=>{(v.key==="ArrowUp"||v.key==="ArrowDown")&&(v.preventDefault(),f.current?.querySelectorAll("[data-menu-item]:not(:disabled)")[0]?.focus())}),g=Ln(s,()=>(m.trigger==="hover"||m.trigger==="click-hover")&&m.openDropdown()),b=Ln(l,()=>(m.trigger==="hover"||m.trigger==="click-hover")&&m.closeDropdown());return(0,F0.jsxs)(Xr.Dropdown,{...u,onMouseEnter:g,onMouseLeave:b,role:"menu","aria-orientation":"vertical",ref:Ze(t,f),...m.getStyles("dropdown",{className:n,style:o,styles:i,classNames:r,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,onKeyDown:p,children:[m.withInitialFocusPlaceholder&&(0,F0.jsx)("div",{tabIndex:-1,"data-autofocus":!0,"data-mantine-stop-propagation":!0,style:{outline:0}}),d]})});L0.classes=aa;L0.displayName="@mantine/core/MenuDropdown";var Fm=y(O(),1),gH=y(D(),1);var Pce={},M0=nt((e,t)=>{let{classNames:r,className:n,style:o,styles:i,vars:a,color:s,closeMenuOnClick:l,leftSection:c,rightSection:d,children:u,disabled:f,"data-disabled":m,...p}=z("MenuItem",Pce,e),g=Za(),b=ut(),{dir:v}=ii(),x=(0,gH.useRef)(null),_=g.getItemIndex(x.current),I=p,S=Ln(I.onMouseLeave,()=>g.setHovered(-1)),w=Ln(I.onMouseEnter,()=>g.setHovered(g.getItemIndex(x.current))),P=Ln(I.onClick,()=>{m||(typeof l=="boolean"?l&&g.closeDropdownImmediately():g.closeOnItemClick&&g.closeDropdownImmediately())}),$=Ln(I.onFocus,()=>g.setHovered(g.getItemIndex(x.current))),B=s?b.variantColorResolver({color:s,theme:b,variant:"light"}):void 0,W=s?Ir({color:s,theme:b}):null;return(0,Fm.jsxs)(_t,{...p,unstyled:g.unstyled,tabIndex:g.menuItemTabIndex,onFocus:$,...g.getStyles("item",{className:n,style:o,styles:i,classNames:r}),ref:Ze(x,t),role:"menuitem",disabled:f,"data-menu-item":!0,"data-disabled":f||m||void 0,"data-hovered":g.hovered===_?!0:void 0,"data-mantine-stop-propagation":!0,onMouseEnter:w,onMouseLeave:S,onClick:P,onKeyDown:eL({siblingSelector:"[data-menu-item]:not([data-disabled])",parentSelector:"[data-menu-dropdown]",activateOnFocus:!1,loop:g.loop,dir:v,orientation:"vertical",onKeyDown:I.onKeyDown}),__vars:{"--menu-item-color":W?.isThemeColor&&W?.shade===void 0?`var(--mantine-color-${W.color}-6)`:B?.color,"--menu-item-hover":B?.hover},children:[c&&(0,Fm.jsx)("div",{...g.getStyles("itemSection",{styles:i,classNames:r}),"data-position":"left",children:c}),u&&(0,Fm.jsx)("div",{...g.getStyles("itemLabel",{styles:i,classNames:r}),children:u}),d&&(0,Fm.jsx)("div",{...g.getStyles("itemSection",{styles:i,classNames:r}),"data-position":"right",children:d})]})});M0.classes=aa;M0.displayName="@mantine/core/MenuItem";var vH=y(O(),1),eKe=y(D(),1);var Dce={},B0=M((e,t)=>{let{classNames:r,className:n,style:o,styles:i,vars:a,...s}=z("MenuLabel",Dce,e),l=Za();return(0,vH.jsx)(F,{ref:t,...l.getStyles("label",{className:n,style:o,styles:i,classNames:r}),...s})});B0.classes=aa;B0.displayName="@mantine/core/MenuLabel";var xH=y(O(),1),j0=y(D(),1);var Rce={refProp:"ref"},rR=(0,j0.forwardRef)((e,t)=>{let{children:r,refProp:n,...o}=z("MenuTarget",Rce,e);if(!ko(r))throw new Error("Menu.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");let i=Za(),a=r.props,s=Ln(a.onClick,()=>{i.trigger==="click"?i.toggleDropdown():i.trigger==="click-hover"&&(i.setOpenedViaClick(!0),i.opened||i.openDropdown())}),l=Ln(a.onMouseEnter,()=>(i.trigger==="hover"||i.trigger==="click-hover")&&i.openDropdown()),c=Ln(a.onMouseLeave,()=>{(i.trigger==="hover"||i.trigger==="click-hover"&&!i.openedViaClick)&&i.closeDropdown()});return(0,xH.jsx)(Xr.Target,{refProp:n,popupType:"menu",ref:t,...o,children:(0,j0.cloneElement)(r,{onClick:s,onMouseEnter:l,onMouseLeave:c,"data-expanded":i.opened?!0:void 0})})});rR.displayName="@mantine/core/MenuTarget";var Tce={trapFocus:!0,closeOnItemClick:!0,withInitialFocusPlaceholder:!0,clickOutsideEvents:["mousedown","touchstart","keydown"],loop:!0,trigger:"click",openDelay:0,closeDelay:100,menuItemTabIndex:-1};function Jr(e){let t=z("Menu",Tce,e),{children:r,onOpen:n,onClose:o,opened:i,defaultOpened:a,trapFocus:s,onChange:l,closeOnItemClick:c,loop:d,closeOnEscape:u,trigger:f,openDelay:m,closeDelay:p,classNames:g,styles:b,unstyled:v,variant:x,vars:_,menuItemTabIndex:I,keepMounted:S,withInitialFocusPlaceholder:w,...P}=t,$=q({name:"Menu",classes:aa,props:t,classNames:g,styles:b,unstyled:v}),[B,{setHovered:W,resetHovered:H}]=iL(),[K,T]=ot({value:i,defaultValue:a,finalValue:!1,onChange:l}),[k,E]=(0,bH.useState)(!1),C=()=>{T(!1),E(!1),K&&o?.()},A=()=>{T(!0),!K&&n?.()},R=()=>{K?C():A()},{openDropdown:N,closeDropdown:U}=qV({open:A,close:C,closeDelay:p,openDelay:m}),G=he=>oL("[data-menu-item]","[data-menu-dropdown]",he),{resolvedClassNames:re,resolvedStyles:ve}=Zr({classNames:g,styles:b,props:t});return _r(()=>{H()},[K]),(0,oR.jsx)(mH,{value:{getStyles:$,opened:K,toggleDropdown:R,getItemIndex:G,hovered:B,setHovered:W,openedViaClick:k,setOpenedViaClick:E,closeOnItemClick:c,closeDropdown:f==="click"?C:U,openDropdown:f==="click"?A:N,closeDropdownImmediately:C,loop:d,trigger:f,unstyled:v,menuItemTabIndex:I,withInitialFocusPlaceholder:w},children:(0,oR.jsx)(Xr,{...P,opened:K,onChange:R,defaultOpened:a,trapFocus:S?!1:s,closeOnEscape:u,__staticSelector:"Menu",classNames:re,styles:ve,unstyled:v,variant:x,keepMounted:S,children:r})})}Jr.extend=e=>e;Jr.withProps=J2(Jr);Jr.classes=aa;Jr.displayName="@mantine/core/Menu";Jr.Item=M0;Jr.Label=B0;Jr.Dropdown=L0;Jr.Target=rR;Jr.Divider=N0;var Hs=y(O(),1),DH=y(D(),1);var _H=y(O(),1),MKe=y(D(),1);var AKe=y(D(),1);var zKe=y(O(),1);var[yH,_i]=Zt("Modal component was not found in tree");var go={root:"m_9df02822",content:"m_54c44539",inner:"m_1f958f16",header:"m_d0e2b9cd"};var Ece={},vv=M((e,t)=>{let r=z("ModalBody",Ece,e),{classNames:n,className:o,style:i,styles:a,vars:s,...l}=r,c=_i();return(0,_H.jsx)(u6,{ref:t,...c.getStyles("body",{classNames:n,style:i,styles:a,className:o}),...l})});vv.classes=go;vv.displayName="@mantine/core/ModalBody";var IH=y(O(),1),GKe=y(D(),1);var $ce={},xv=M((e,t)=>{let r=z("ModalCloseButton",$ce,e),{classNames:n,className:o,style:i,styles:a,vars:s,...l}=r,c=_i();return(0,IH.jsx)(f6,{ref:t,...c.getStyles("close",{classNames:n,style:i,styles:a,className:o}),...l})});xv.classes=go;xv.displayName="@mantine/core/ModalCloseButton";var nR=y(O(),1);var rqe=y(D(),1);var Ace={},bv=M((e,t)=>{let r=z("ModalContent",Ace,e),{classNames:n,className:o,style:i,styles:a,vars:s,children:l,__hidden:c,...d}=r,u=_i(),f=u.scrollAreaComponent||kU;return(0,nR.jsx)(m6,{...u.getStyles("content",{className:o,style:i,styles:a,classNames:n}),innerProps:u.getStyles("inner",{className:o,style:i,styles:a,classNames:n}),"data-full-screen":u.fullScreen||void 0,"data-modal-content":!0,"data-hidden":c||void 0,ref:t,...d,children:(0,nR.jsx)(f,{style:{maxHeight:u.fullScreen?"100dvh":`calc(100dvh - (${Z(u.yOffset)} * 2))`},children:l})})});bv.classes=go;bv.displayName="@mantine/core/ModalContent";var wH=y(O(),1),uqe=y(D(),1);var Oce={},yv=M((e,t)=>{let r=z("ModalHeader",Oce,e),{classNames:n,className:o,style:i,styles:a,vars:s,...l}=r,c=_i();return(0,wH.jsx)(p6,{ref:t,...c.getStyles("header",{classNames:n,style:i,styles:a,className:o}),...l})});yv.classes=go;yv.displayName="@mantine/core/ModalHeader";var SH=y(O(),1),bqe=y(D(),1);var zce={},_v=M((e,t)=>{let r=z("ModalOverlay",zce,e),{classNames:n,className:o,style:i,styles:a,vars:s,...l}=r,c=_i();return(0,SH.jsx)(g6,{ref:t,...c.getStyles("overlay",{classNames:n,style:i,styles:a,className:o}),...l})});_v.classes=go;_v.displayName="@mantine/core/ModalOverlay";var iR=y(O(),1);var Dqe=y(D(),1);var Nce={__staticSelector:"Modal",closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:Rt("modal"),transitionProps:{duration:200,transition:"fade-down"},yOffset:"5dvh"},Fce=(e,{radius:t,size:r,yOffset:n,xOffset:o})=>({root:{"--modal-radius":t===void 0?void 0:Ee(t),"--modal-size":xe(r,"modal-size"),"--modal-y-offset":Z(n),"--modal-x-offset":Z(o)}}),Iv=M((e,t)=>{let r=z("ModalRoot",Nce,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,yOffset:c,scrollAreaComponent:d,radius:u,fullScreen:f,centered:m,xOffset:p,__staticSelector:g,...b}=r,v=q({name:g,classes:go,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:Fce});return(0,iR.jsx)(yH,{value:{yOffset:c,scrollAreaComponent:d,getStyles:v,fullScreen:f},children:(0,iR.jsx)(d6,{ref:t,...v("root"),"data-full-screen":f||void 0,"data-centered":m||void 0,"data-offset-scrollbars":d===zr.Autosize||void 0,unstyled:s,...b})})});Iv.classes=go;Iv.displayName="@mantine/core/ModalRoot";var kH=y(O(),1),aR=y(D(),1);var[Lce,CH]=Co();function sR({children:e}){let[t,r]=(0,aR.useState)([]),[n,o]=(0,aR.useState)(Rt("modal"));return(0,kH.jsx)(Lce,{value:{stack:t,addModal:(i,a)=>{r(s=>[...new Set([...s,i])]),o(s=>typeof a=="number"&&typeof s=="number"?Math.max(s,a):s)},removeModal:i=>r(a=>a.filter(s=>s!==i)),getZIndex:i=>`calc(${n} + ${t.indexOf(i)} + 1)`,currentId:t[t.length-1],maxZIndex:n},children:e})}sR.displayName="@mantine/core/ModalStack";var PH=y(O(),1),Hqe=y(D(),1);var Mce={},wv=M((e,t)=>{let r=z("ModalTitle",Mce,e),{classNames:n,className:o,style:i,styles:a,vars:s,...l}=r,c=_i();return(0,PH.jsx)(v6,{ref:t,...c.getStyles("title",{classNames:n,style:i,styles:a,className:o}),...l})});wv.classes=go;wv.displayName="@mantine/core/ModalTitle";var Bce={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:Rt("modal"),transitionProps:{duration:200,transition:"fade-down"},withOverlay:!0,withCloseButton:!0},vo=M((e,t)=>{let{title:r,withOverlay:n,overlayProps:o,withCloseButton:i,closeButtonProps:a,children:s,radius:l,opened:c,stackId:d,zIndex:u,...f}=z("Modal",Bce,e),m=CH(),p=!!r||i,g=m&&d?{closeOnEscape:m.currentId===d,trapFocus:m.currentId===d,zIndex:m.getZIndex(d)}:{},b=n===!1?!1:d&&m?m.currentId===d:c;return(0,DH.useEffect)(()=>{m&&d&&(c?m.addModal(d,u||Rt("modal")):m.removeModal(d))},[c,d,u]),(0,Hs.jsxs)(Iv,{ref:t,radius:l,opened:c,zIndex:m&&d?m.getZIndex(d):u,...f,...g,children:[n&&(0,Hs.jsx)(_v,{visible:b,transitionProps:m&&d?{duration:0}:void 0,...o}),(0,Hs.jsxs)(bv,{radius:l,__hidden:m&&d&&c?d!==m.currentId:!1,children:[p&&(0,Hs.jsxs)(yv,{children:[r&&(0,Hs.jsx)(wv,{children:r}),i&&(0,Hs.jsx)(xv,{...a})]}),(0,Hs.jsx)(vv,{children:s})]})]})});vo.classes=go;vo.displayName="@mantine/core/Modal";vo.Root=Iv;vo.Overlay=_v;vo.Content=bv;vo.Body=vv;vo.Header=yv;vo.Title=wv;vo.CloseButton=xv;vo.Stack=sR;var Ao=y(O(),1),zH=y(D(),1);var Sv=y(O(),1),OXe=y(D(),1);var fXe=y(D(),1),mXe=y(O(),1);var[RH,Lm]=Co();var vXe=y(D(),1),xXe=y(O(),1);var[TH,EH]=Co();var lR=y(O(),1),wXe=y(D(),1);var Mm={root:"m_7cda1cd6","root--default":"m_44da308b","root--contrast":"m_e3a01f8",label:"m_1e0e6180",remove:"m_ae386778",group:"m_1dcfd90b"};var jce={},Uce=(e,{gap:t},{size:r})=>({group:{"--pg-gap":t!==void 0?xe(t):xe(r,"pg-gap")}}),U0=M((e,t)=>{let r=z("PillGroup",jce,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,size:c,disabled:d,...u}=r,m=Lm()?.size||c||void 0,p=q({name:"PillGroup",classes:Mm,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:Uce,stylesCtx:{size:m},rootSelector:"group"});return(0,lR.jsx)(TH,{value:{size:m,disabled:d},children:(0,lR.jsx)(F,{ref:t,size:m,...p("group"),...u})})});U0.classes=Mm;U0.displayName="@mantine/core/PillGroup";var Vce={variant:"default"},Hce=(e,{radius:t},{size:r})=>({root:{"--pill-fz":xe(r,"pill-fz"),"--pill-height":xe(r,"pill-height"),"--pill-radius":t===void 0?void 0:Ee(t)}}),Ws=M((e,t)=>{let r=z("Pill",Vce,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,variant:c,children:d,withRemoveButton:u,onRemove:f,removeButtonProps:m,radius:p,size:g,disabled:b,mod:v,...x}=r,_=EH(),I=Lm(),S=g||_?.size||void 0,w=I?.variant==="filled"?"contrast":c||"default",P=q({name:"Pill",classes:Mm,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:Hce,stylesCtx:{size:S}});return(0,Sv.jsxs)(F,{component:"span",ref:t,variant:w,size:S,...P("root",{variant:w}),mod:[{"with-remove":u&&!b,disabled:b||_?.disabled},v],...x,children:[(0,Sv.jsx)("span",{...P("label"),children:d}),u&&(0,Sv.jsx)(gi,{variant:"transparent",radius:p,tabIndex:-1,"aria-hidden":!0,unstyled:s,...m,...P("remove",{className:m?.className,style:m?.style}),onMouseDown:$=>{$.preventDefault(),$.stopPropagation(),m?.onMouseDown?.($)},onClick:$=>{$.stopPropagation(),f?.(),m?.onClick?.($)}})]})});Ws.classes=Mm;Ws.displayName="@mantine/core/Pill";Ws.Group=U0;var dR=y(O(),1),AH=y(D(),1);var $H=y(O(),1);var qXe=y(D(),1);var cR={field:"m_45c4369d"};var Wce={type:"visible"},V0=M((e,t)=>{let r=z("PillsInputField",Wce,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,type:c,disabled:d,id:u,pointer:f,mod:m,...p}=r,g=Lm(),b=vi(),v=q({name:"PillsInputField",classes:cR,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,rootSelector:"field"}),x=d||g?.disabled;return(0,$H.jsx)(F,{component:"input",ref:Ze(t,g?.fieldRef),"data-type":c,disabled:x,mod:[{disabled:x,pointer:f},m],...v("field"),...p,id:b?.inputId||u,"aria-invalid":g?.hasError,"aria-describedby":b?.describedBy,type:"text",onMouseDown:_=>!f&&_.stopPropagation()})});V0.classes=cR;V0.displayName="@mantine/core/PillsInputField";var Zce={},fc=M((e,t)=>{let r=z("PillsInput",Zce,e),{children:n,onMouseDown:o,onClick:i,size:a,disabled:s,__staticSelector:l,error:c,variant:d,...u}=r,f=(0,AH.useRef)(null);return(0,dR.jsx)(RH,{value:{fieldRef:f,size:a,disabled:s,hasError:!!c,variant:d},children:(0,dR.jsx)(tr,{size:a,error:c,variant:d,component:"div",ref:t,onMouseDown:m=>{m.preventDefault(),o?.(m),f.current?.focus()},onClick:m=>{m.preventDefault(),m.currentTarget.closest("fieldset")?.disabled||(f.current?.focus(),i?.(m))},...u,multiline:!0,disabled:s,__staticSelector:l||"PillsInput",withAria:!1,children:n})})});fc.displayName="@mantine/core/PillsInput";fc.Field=V0;var fQe=y(O(),1);var pQe=y(D(),1);function OH({data:e,value:t}){let r=t.map(o=>o.trim().toLowerCase());return e.reduce((o,i)=>(yi(i)?o.push({group:i.group,items:i.items.filter(a=>r.indexOf(a.value.toLowerCase().trim())===-1)}):r.indexOf(i.value.toLowerCase().trim())===-1&&o.push(i),o),[])}var Gce={maxValues:1/0,withCheckIcon:!0,checkIconPosition:"left",hiddenInputValuesDivider:","},tu=M((e,t)=>{let r=z("MultiSelect",Gce,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,size:c,value:d,defaultValue:u,onChange:f,onKeyDown:m,variant:p,data:g,dropdownOpened:b,defaultDropdownOpened:v,onDropdownOpen:x,onDropdownClose:_,selectFirstOptionOnChange:I,onOptionSubmit:S,comboboxProps:w,filter:P,limit:$,withScrollArea:B,maxDropdownHeight:W,searchValue:H,defaultSearchValue:K,onSearchChange:T,readOnly:k,disabled:E,onFocus:C,onBlur:A,radius:R,rightSection:N,rightSectionWidth:U,rightSectionPointerEvents:G,rightSectionProps:re,leftSection:ve,leftSectionWidth:he,leftSectionPointerEvents:Q,leftSectionProps:ne,inputContainer:we,inputWrapperOrder:se,withAsterisk:Ae,labelProps:We,descriptionProps:et,errorProps:ct,wrapperProps:Ne,description:Yt,label:Jt,error:co,maxValues:ge,searchable:me,nothingFoundMessage:ke,withCheckIcon:Oe,checkIconPosition:Ye,hidePickedOptions:Me,withErrorStyles:tt,name:fe,form:Te,id:yr,clearable:hn,clearButtonProps:Mo,hiddenInputProps:Ht,placeholder:Pr,hiddenInputValuesDivider:bs,required:df,mod:uf,renderOption:ff,onRemove:Dr,onClear:kl,scrollAreaProps:Cl,chevronColor:Ch,...Ph}=r,Dh=gt(yr),mf=Pm(g),Pl=Yd(mf),ar=dc({opened:b,defaultOpened:v,onDropdownOpen:x,onDropdownClose:()=>{_?.(),ar.resetSelectedOption()}}),{styleProps:e2,rest:{type:Cre,autoComplete:t2,...r2}}=Gr(Ph),[dt,Fn]=ot({value:d,defaultValue:u,finalValue:[],onChange:f}),[oi,o2]=ot({value:H,defaultValue:K,finalValue:"",onChange:T}),ji=Ce=>{o2(Ce),ar.resetSelectedOption()},sd=q({name:"MultiSelect",classes:{},props:r,classNames:n,styles:a,unstyled:s}),{resolvedClassNames:Rh,resolvedStyles:Th}=Zr({props:r,styles:a,classNames:n}),sy=Ce=>{m?.(Ce),Ce.key===" "&&!me&&(Ce.preventDefault(),ar.toggleDropdown()),Ce.key==="Backspace"&&oi.length===0&&dt.length>0&&(Dr?.(dt[dt.length-1]),Fn(dt.slice(0,dt.length-1)))},n2=dt.map((Ce,Bo)=>(0,Ao.jsx)(Ws,{withRemoveButton:!k&&!Pl[Ce]?.disabled,onRemove:()=>{Fn(dt.filter(ba=>Ce!==ba)),Dr?.(Ce)},unstyled:s,disabled:E,...sd("pill"),children:Pl[Ce]?.label||Ce},`${Ce}-${Bo}`));(0,zH.useEffect)(()=>{I&&ar.selectFirstOption()},[I,oi]);let ly=(0,Ao.jsx)(Ve.ClearButton,{...Mo,onClear:()=>{kl?.(),Fn([]),ji("")}}),i2=OH({data:mf,value:dt}),cy=hn&&dt.length>0&&!E&&!k;return(0,Ao.jsxs)(Ao.Fragment,{children:[(0,Ao.jsxs)(Ve,{store:ar,classNames:Rh,styles:Th,unstyled:s,size:c,readOnly:k,__staticSelector:"MultiSelect",onOptionSubmit:Ce=>{S?.(Ce),ji(""),ar.updateSelectedOptionIndex("selected"),dt.includes(Pl[Ce].value)?(Fn(dt.filter(Bo=>Bo!==Pl[Ce].value)),Dr?.(Pl[Ce].value)):dt.length<ge&&Fn([...dt,Pl[Ce].value])},...w,children:[(0,Ao.jsx)(Ve.DropdownTarget,{children:(0,Ao.jsx)(fc,{...e2,__staticSelector:"MultiSelect",classNames:Rh,styles:Th,unstyled:s,size:c,className:o,style:i,variant:p,disabled:E,radius:R,__defaultRightSection:(0,Ao.jsx)(Ve.Chevron,{size:c,error:co,unstyled:s,color:Ch}),__clearSection:ly,__clearable:cy,rightSection:N,rightSectionPointerEvents:G||(ly?"all":"none"),rightSectionWidth:U,rightSectionProps:re,leftSection:ve,leftSectionWidth:he,leftSectionPointerEvents:Q,leftSectionProps:ne,inputContainer:we,inputWrapperOrder:se,withAsterisk:Ae,labelProps:We,descriptionProps:et,errorProps:ct,wrapperProps:Ne,description:Yt,label:Jt,error:co,withErrorStyles:tt,__stylesApiProps:{...r,rightSectionPointerEvents:G||(cy?"all":"none"),multiline:!0},pointer:!me,onClick:()=>me?ar.openDropdown():ar.toggleDropdown(),"data-expanded":ar.dropdownOpened||void 0,id:Dh,required:df,mod:uf,children:(0,Ao.jsxs)(Ws.Group,{disabled:E,unstyled:s,...sd("pillsList"),children:[n2,(0,Ao.jsx)(Ve.EventsTarget,{autoComplete:t2,children:(0,Ao.jsx)(fc.Field,{...r2,ref:t,id:Dh,placeholder:Pr,type:!me&&!Pr?"hidden":"visible",...sd("inputField"),unstyled:s,onFocus:Ce=>{C?.(Ce),me&&ar.openDropdown()},onBlur:Ce=>{A?.(Ce),ar.closeDropdown(),ji("")},onKeyDown:sy,value:oi,onChange:Ce=>{ji(Ce.currentTarget.value),me&&ar.openDropdown(),I&&ar.selectFirstOption()},disabled:E,readOnly:k||!me,pointer:!me})})]})})}),(0,Ao.jsx)($m,{data:Me?i2:mf,hidden:k||E,filter:P,search:oi,limit:$,hiddenWhenEmpty:!ke,withScrollArea:B,maxDropdownHeight:W,filterOptions:me,value:dt,checkIconPosition:Ye,withCheckIcon:Oe,nothingFoundMessage:ke,unstyled:s,labelId:Jt?`${Dh}-label`:void 0,"aria-label":Jt?void 0:Ph["aria-label"],renderOption:ff,scrollAreaProps:Cl})]}),(0,Ao.jsx)(Ve.HiddenInput,{name:fe,valuesDivider:bs,value:dt,form:Te,disabled:E,...Ht})]})});tu.classes={...tr.classes,...Ve.classes};tu.displayName="@mantine/core/MultiSelect";var Cn=y(O(),1);var NQe=y(D(),1);var uR={root:"m_f0824112",description:"m_57492dcc",section:"m_690090b5",label:"m_1f6ac4c4",body:"m_f07af9d2",children:"m_e17b862f",chevron:"m_1fd8a00b"};var Kce={},qce=(e,{variant:t,color:r,childrenOffset:n,autoContrast:o})=>{let i=e.variantColorResolver({color:r||e.primaryColor,theme:e,variant:t||"light",autoContrast:o});return{root:{"--nl-bg":r||t?i.background:void 0,"--nl-hover":r||t?i.hover:void 0,"--nl-color":r||t?i.color:void 0},children:{"--nl-offset":At(n)}}},sa=nt((e,t)=>{let r=z("NavLink",Kce,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,opened:c,defaultOpened:d,onChange:u,children:f,onClick:m,active:p,disabled:g,leftSection:b,rightSection:v,label:x,description:_,disableRightSectionRotation:I,noWrap:S,childrenOffset:w,onKeyDown:P,autoContrast:$,mod:B,...W}=r,H=q({name:"NavLink",props:r,classes:uR,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:qce}),[K,T]=ot({value:c,defaultValue:d,finalValue:!1,onChange:u}),k=!!f,E=C=>{m?.(C),k&&(C.preventDefault(),T(!K))};return(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsxs)(_t,{...H("root"),component:"a",ref:t,onClick:E,onKeyDown:C=>{P?.(C),C.nativeEvent.code==="Space"&&k&&(C.preventDefault(),T(!K))},unstyled:s,mod:[{disabled:g,active:p,expanded:K},B],...W,children:[b&&(0,Cn.jsx)(F,{component:"span",...H("section"),mod:{position:"left"},children:b}),(0,Cn.jsxs)(F,{...H("body"),mod:{"no-wrap":S},children:[(0,Cn.jsx)(F,{component:"span",...H("label"),children:x}),(0,Cn.jsx)(F,{component:"span",mod:{active:p},...H("description"),children:_})]}),(k||v!==void 0)&&(0,Cn.jsx)(F,{...H("section"),component:"span",mod:{rotate:K&&!I,position:"right"},children:k?v!==void 0?v:(0,Cn.jsx)(I6,{...H("chevron")}):v})]}),k&&(0,Cn.jsx)(sm,{in:K,...H("collapse"),children:(0,Cn.jsx)("div",{...H("children"),children:f})})]})});sa.classes=uR;sa.displayName="@mantine/core/NavLink";var Zs=y(O(),1),qQe=y(D(),1);var fR={root:"m_a513464",icon:"m_a4ceffb",loader:"m_b0920b15",body:"m_a49ed24",title:"m_3feedf16",description:"m_3d733a3a",closeButton:"m_919a4d88"};var Xce={withCloseButton:!0},Qce=(e,{radius:t,color:r})=>({root:{"--notification-radius":t===void 0?void 0:Ee(t),"--notification-color":r?Ue(r,e):void 0}}),ru=M((e,t)=>{let r=z("Notification",Xce,e),{className:n,color:o,radius:i,loading:a,withCloseButton:s,withBorder:l,title:c,icon:d,children:u,onClose:f,closeButtonProps:m,classNames:p,style:g,styles:b,unstyled:v,variant:x,vars:_,mod:I,loaderProps:S,role:w,...P}=r,$=q({name:"Notification",classes:fR,props:r,className:n,style:g,classNames:p,styles:b,unstyled:v,vars:_,varsResolver:Qce});return(0,Zs.jsxs)(F,{...$("root"),mod:[{"data-with-icon":!!d||a,"data-with-border":l},I],ref:t,variant:x,role:w||"alert",...P,children:[d&&!a&&(0,Zs.jsx)("div",{...$("icon"),children:d}),a&&(0,Zs.jsx)(ho,{size:28,color:o,...S,...$("loader")}),(0,Zs.jsxs)("div",{...$("body"),children:[c&&(0,Zs.jsx)("div",{...$("title"),children:c}),(0,Zs.jsx)(F,{...$("description"),mod:{"data-with-title":!!c},children:u})]}),s&&(0,Zs.jsx)(gi,{iconSize:16,color:"gray",...m,unstyled:v,onClick:f,...$("closeButton")})]})});ru.classes=fR;ru.displayName="@mantine/core/Notification";var Mt=y(D());function jH(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}var Bm;(function(e){e.event="event",e.props="prop"})(Bm||(Bm={}));function mc(){}function Yce(e){var t,r=void 0;return function(){for(var n=[],o=arguments.length;o--;)n[o]=arguments[o];return t&&n.length===t.length&&n.every(function(i,a){return i===t[a]})||(t=n,r=e.apply(void 0,n)),r}}function kv(e){return!!(e||"").match(/\d/)}function pc(e){return e==null}function Jce(e){return typeof e=="number"&&isNaN(e)}function UH(e){return pc(e)||Jce(e)||typeof e=="number"&&!isFinite(e)}function VH(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function ede(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;default:return/(\d)(?=(\d{3})+(?!\d))/g}}function tde(e,t,r){var n=ede(r),o=e.search(/[1-9]/);return o=o===-1?e.length:o,e.substring(0,o)+e.substring(o,e.length).replace(n,"$1"+t)}function NH(e){var t=(0,Mt.useRef)(e);t.current=e;var r=(0,Mt.useRef)(function(){for(var n=[],o=arguments.length;o--;)n[o]=arguments[o];return t.current.apply(t,n)});return r.current}function pR(e,t){t===void 0&&(t=!0);var r=e[0]==="-",n=r&&t;e=e.replace("-","");var o=e.split("."),i=o[0],a=o[1]||"";return{beforeDecimal:i,afterDecimal:a,hasNegation:r,addNegation:n}}function rde(e){if(!e)return e;var t=e[0]==="-";t&&(e=e.substring(1,e.length));var r=e.split("."),n=r[0].replace(/^0+/,"")||"0",o=r[1]||"";return(t?"-":"")+n+(o?"."+o:"")}function HH(e,t,r){for(var n="",o=r?"0":"",i=0;i<=t-1;i++)n+=e[i]||o;return n}function FH(e,t){return Array(t+1).join(e)}function WH(e){var t=e+"",r=t[0]==="-"?"-":"";r&&(t=t.substring(1));var n=t.split(/[eE]/g),o=n[0],i=n[1];if(i=Number(i),!i)return r+o;o=o.replace(".","");var a=1+i,s=o.length;return a<0?o="0."+FH("0",Math.abs(a))+o:a>=s?o=o+FH("0",a-s):o=(o.substring(0,a)||"0")+"."+o.substring(a),r+o}function LH(e,t,r){if(["","-"].indexOf(e)!==-1)return e;var n=(e.indexOf(".")!==-1||r)&&t,o=pR(e),i=o.beforeDecimal,a=o.afterDecimal,s=o.hasNegation,l=parseFloat("0."+(a||"0")),c=a.length<=t?"0."+a:l.toFixed(t),d=c.split("."),u=i;i&&Number(d[0])&&(u=i.split("").reverse().reduce(function(g,b,v){return g.length>v?(Number(g[0])+Number(b)).toString()+g.substring(1,g.length):b+g},d[0]));var f=HH(d[1]||"",t,r),m=s?"-":"",p=n?".":"";return""+m+u+p+f}function ou(e,t){if(e.value=e.value,e!==null){if(e.createTextRange){var r=e.createTextRange();return r.move("character",t),r.select(),!0}return e.selectionStart||e.selectionStart===0?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}var ZH=Yce(function(e,t){for(var r=0,n=0,o=e.length,i=t.length;e[r]===t[r]&&r<o;)r++;for(;e[o-1-n]===t[i-1-n]&&i-n>r&&o-n>r;)n++;return{from:{start:r,end:o-n},to:{start:r,end:i-n}}}),ode=function(e,t){var r=Math.min(e.selectionStart,t);return{from:{start:r,end:e.selectionEnd},to:{start:r,end:t}}};function nde(e,t,r){return Math.min(Math.max(e,t),r)}function mR(e){return Math.max(e.selectionStart,e.selectionEnd)}function ide(){return typeof navigator<"u"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function ade(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function sde(e){var t=e.currentValue,r=e.formattedValue,n=e.currentValueIndex,o=e.formattedValueIndex;return t[n]===r[o]}function lde(e,t,r,n,o,i,a){a===void 0&&(a=sde);var s=o.findIndex(function(I){return I}),l=e.slice(0,s);!t&&!r.startsWith(l)&&(t=l,r=l+r,n=n+l.length);for(var c=r.length,d=e.length,u={},f=new Array(c),m=0;m<c;m++){f[m]=-1;for(var p=0,g=d;p<g;p++){var b=a({currentValue:r,lastValue:t,formattedValue:e,currentValueIndex:m,formattedValueIndex:p});if(b&&u[p]!==!0){f[m]=p,u[p]=!0;break}}}for(var v=n;v<c&&(f[v]===-1||!i(r[v]));)v++;var x=v===c||f[v]===-1?d:f[v];for(v=n-1;v>0&&f[v]===-1;)v--;var _=v===-1||f[v]===-1?0:f[v]+1;return _>x?x:n-_<x-n?_:x}function MH(e,t,r,n){var o=e.length;if(t=nde(t,0,o),n==="left"){for(;t>=0&&!r[t];)t--;t===-1&&(t=r.indexOf(!0))}else{for(;t<=o&&!r[t];)t++;t>o&&(t=r.lastIndexOf(!0))}return t===-1&&(t=o),t}function cde(e){for(var t=Array.from({length:e.length+1}).map(function(){return!0}),r=0,n=t.length;r<n;r++)t[r]=!!(kv(e[r])||kv(e[r-1]));return t}function GH(e,t,r,n,o,i){i===void 0&&(i=mc);var a=NH(function(p,g){var b,v;return UH(p)?(v="",b=""):typeof p=="number"||g?(v=typeof p=="number"?WH(p):p,b=n(v)):(v=o(p,void 0),b=n(v)),{formattedValue:b,numAsString:v}}),s=(0,Mt.useState)(function(){return a(pc(e)?t:e,r)}),l=s[0],c=s[1],d=NH(function(p,g){p.formattedValue!==l.formattedValue&&c({formattedValue:p.formattedValue,numAsString:p.value}),i(p,g)}),u=e,f=r;pc(e)&&(u=l.numAsString,f=!0);var m=a(u,f);return(0,Mt.useMemo)(function(){c(m)},[m.formattedValue]),(0,Mt.useEffect)(function(){if(!pc(t)&&pc(e)&&l.formattedValue!==""){var p=parseFloat(l.numAsString);d({formattedValue:l.formattedValue,value:l.numAsString,floatValue:isNaN(p)?void 0:p},{event:void 0,source:Bm.props})}},[]),[l,d]}function dde(e){return e.replace(/[^0-9]/g,"")}function ude(e){return e}function fde(e){var t=e.type;t===void 0&&(t="text");var r=e.displayType;r===void 0&&(r="input");var n=e.customInput,o=e.renderText,i=e.getInputRef,a=e.format;a===void 0&&(a=ude);var s=e.removeFormatting;s===void 0&&(s=dde);var l=e.defaultValue,c=e.valueIsNumericString,d=e.onValueChange,u=e.isAllowed,f=e.onChange;f===void 0&&(f=mc);var m=e.onKeyDown;m===void 0&&(m=mc);var p=e.onMouseUp;p===void 0&&(p=mc);var g=e.onFocus;g===void 0&&(g=mc);var b=e.onBlur;b===void 0&&(b=mc);var v=e.value,x=e.getCaretBoundary;x===void 0&&(x=cde);var _=e.isValidInputCharacter;_===void 0&&(_=kv);var I=e.isCharacterSame,S=jH(e,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter","isCharacterSame"]),w=GH(v,l,!!c,a,s,d),P=w[0],$=P.formattedValue,B=P.numAsString,W=w[1],H=(0,Mt.useRef)(),K=(0,Mt.useRef)({formattedValue:$,numAsString:B}),T=function(ge,me){K.current={formattedValue:ge.formattedValue,numAsString:ge.value},W(ge,me)},k=(0,Mt.useState)(!1),E=k[0],C=k[1],A=(0,Mt.useRef)(null),R=(0,Mt.useRef)({setCaretTimeout:null,focusTimeout:null});(0,Mt.useEffect)(function(){return C(!0),function(){clearTimeout(R.current.setCaretTimeout),clearTimeout(R.current.focusTimeout)}},[]);var N=a,U=function(ge,me){var ke=parseFloat(me);return{formattedValue:ge,value:me,floatValue:isNaN(ke)?void 0:ke}},G=function(ge,me,ke){ge.selectionStart===0&&ge.selectionEnd===ge.value.length||(ou(ge,me),R.current.setCaretTimeout=setTimeout(function(){ge.value===ke&&ge.selectionStart!==me&&ou(ge,me)},0))},re=function(ge,me,ke){return MH(ge,me,x(ge),ke)},ve=function(ge,me,ke){var Oe=x(me),Ye=lde(me,$,ge,ke,Oe,_,I);return Ye=MH(me,Ye,Oe),Ye},he=function(ge){var me=ge.formattedValue;me===void 0&&(me="");var ke=ge.input,Oe=ge.source,Ye=ge.event,Me=ge.numAsString,tt;if(ke){var fe=ge.inputValue||ke.value,Te=mR(ke);ke.value=me,tt=ve(fe,me,Te),tt!==void 0&&G(ke,tt,me)}me!==$&&T(U(me,Me),{event:Ye,source:Oe})};(0,Mt.useEffect)(function(){var ge=K.current,me=ge.formattedValue,ke=ge.numAsString;($!==me||B!==ke)&&T(U($,B),{event:void 0,source:Bm.props})},[$,B]);var Q=A.current?mR(A.current):void 0,ne=typeof window<"u"?Mt.useLayoutEffect:Mt.useEffect;ne(function(){var ge=A.current;if($!==K.current.formattedValue&&ge){var me=ve(K.current.formattedValue,$,Q);ge.value=$,G(ge,me,$)}},[$]);var we=function(ge,me,ke){var Oe=me.target,Ye=H.current?ode(H.current,Oe.selectionEnd):ZH($,ge),Me=Object.assign(Object.assign({},Ye),{lastValue:$}),tt=s(ge,Me),fe=N(tt);if(tt=s(fe,void 0),u&&!u(U(fe,tt))){var Te=me.target,yr=mR(Te),hn=ve(ge,$,yr);return Te.value=$,G(Te,hn,$),!1}return he({formattedValue:fe,numAsString:tt,inputValue:ge,event:me,source:ke,input:me.target}),!0},se=function(ge,me){me===void 0&&(me=0);var ke=ge.selectionStart,Oe=ge.selectionEnd;H.current={selectionStart:ke,selectionEnd:Oe+me}},Ae=function(ge){var me=ge.target,ke=me.value,Oe=we(ke,ge,Bm.event);Oe&&f(ge),H.current=void 0},We=function(ge){var me=ge.target,ke=ge.key,Oe=me.selectionStart,Ye=me.selectionEnd,Me=me.value;Me===void 0&&(Me="");var tt;ke==="ArrowLeft"||ke==="Backspace"?tt=Math.max(Oe-1,0):ke==="ArrowRight"?tt=Math.min(Oe+1,Me.length):ke==="Delete"&&(tt=Oe);var fe=0;ke==="Delete"&&Oe===Ye&&(fe=1);var Te=ke==="ArrowLeft"||ke==="ArrowRight";if(tt===void 0||Oe!==Ye&&!Te){m(ge),se(me,fe);return}var yr=tt;if(Te){var hn=ke==="ArrowLeft"?"left":"right";yr=re(Me,tt,hn),yr!==tt&&ge.preventDefault()}else ke==="Delete"&&!_(Me[tt])?yr=re(Me,tt,"right"):ke==="Backspace"&&!_(Me[tt])&&(yr=re(Me,tt,"left"));yr!==tt&&G(me,yr,Me),m(ge),se(me,fe)},et=function(ge){var me=ge.target,ke=function(){var Oe=me.selectionStart,Ye=me.selectionEnd,Me=me.value;if(Me===void 0&&(Me=""),Oe===Ye){var tt=re(Me,Oe);tt!==Oe&&G(me,tt,Me)}};ke(),requestAnimationFrame(function(){ke()}),p(ge),se(me)},ct=function(ge){ge.persist&&ge.persist();var me=ge.target,ke=ge.currentTarget;A.current=me,R.current.focusTimeout=setTimeout(function(){var Oe=me.selectionStart,Ye=me.selectionEnd,Me=me.value;Me===void 0&&(Me="");var tt=re(Me,Oe);tt!==Oe&&!(Oe===0&&Ye===Me.length)&&G(me,tt,Me),g(Object.assign(Object.assign({},ge),{currentTarget:ke}))},0)},Ne=function(ge){A.current=null,clearTimeout(R.current.focusTimeout),clearTimeout(R.current.setCaretTimeout),b(ge)},Yt=E&&ide()?"numeric":void 0,Jt=Object.assign({inputMode:Yt},S,{type:t,value:$,onChange:Ae,onKeyDown:We,onMouseUp:et,onFocus:ct,onBlur:Ne});if(r==="text")return o?Mt.default.createElement(Mt.default.Fragment,null,o($,S)||null):Mt.default.createElement("span",Object.assign({},S,{ref:i}),$);if(n){var co=n;return Mt.default.createElement(co,Object.assign({},Jt,{ref:i}))}return Mt.default.createElement("input",Object.assign({},Jt,{ref:i}))}function BH(e,t){var r=t.decimalScale,n=t.fixedDecimalScale,o=t.prefix;o===void 0&&(o="");var i=t.suffix;i===void 0&&(i="");var a=t.allowNegative,s=t.thousandsGroupStyle;if(s===void 0&&(s="thousand"),e===""||e==="-")return e;var l=H0(t),c=l.thousandSeparator,d=l.decimalSeparator,u=r!==0&&e.indexOf(".")!==-1||r&&n,f=pR(e,a),m=f.beforeDecimal,p=f.afterDecimal,g=f.addNegation;return r!==void 0&&(p=HH(p,r,!!n)),c&&(m=tde(m,c,s)),o&&(m=o+m),i&&(p=p+i),g&&(m="-"+m),e=m+(u&&d||"")+p,e}function H0(e){var t=e.decimalSeparator;t===void 0&&(t=".");var r=e.thousandSeparator,n=e.allowedDecimalSeparators;return r===!0&&(r=","),n||(n=[t,"."]),{decimalSeparator:t,thousandSeparator:r,allowedDecimalSeparators:n}}function mde(e,t){e===void 0&&(e="");var r=new RegExp("(-)"),n=new RegExp("(-)(.)*(-)"),o=r.test(e),i=n.test(e);return e=e.replace(/-/g,""),o&&!i&&t&&(e="-"+e),e}function pde(e,t){return new RegExp("(^-)|[0-9]|"+VH(e),t?"g":void 0)}function hde(e,t,r){return e===""?!0:!t?.match(/\d/)&&!r?.match(/\d/)&&typeof e=="string"&&!isNaN(Number(e))}function gde(e,t,r){var n;t===void 0&&(t=ade(e));var o=r.allowNegative,i=r.prefix;i===void 0&&(i="");var a=r.suffix;a===void 0&&(a="");var s=r.decimalScale,l=t.from,c=t.to,d=c.start,u=c.end,f=H0(r),m=f.allowedDecimalSeparators,p=f.decimalSeparator,g=e[u]===p;if(kv(e)&&(e===i||e===a)&&t.lastValue==="")return e;if(u-d===1&&m.indexOf(e[d])!==-1){var b=s===0?"":p;e=e.substring(0,d)+b+e.substring(d+1,e.length)}var v=function(A,R,N){var U=!1,G=!1;i.startsWith("-")?U=!1:A.startsWith("--")?(U=!1,G=!0):a.startsWith("-")&&A.length===a.length?U=!1:A[0]==="-"&&(U=!0);var re=U?1:0;return G&&(re=2),re&&(A=A.substring(re),R-=re,N-=re),{value:A,start:R,end:N,hasNegation:U}},x=v(e,d,u),_=x.hasNegation;n=x,e=n.value,d=n.start,u=n.end;var I=v(t.lastValue,l.start,l.end),S=I.start,w=I.end,P=I.value,$=e.substring(d,u);e.length&&P.length&&(S>P.length-a.length||w<i.length)&&!($&&a.startsWith($))&&(e=P);var B=0;e.startsWith(i)?B+=i.length:d<i.length&&(B=d),e=e.substring(B),u-=B;var W=e.length,H=e.length-a.length;e.endsWith(a)?W=H:(u>H||u>e.length-a.length)&&(W=u),e=e.substring(0,W),e=mde(_?"-"+e:e,o),e=(e.match(pde(p,!0))||[]).join("");var K=e.indexOf(p);e=e.replace(new RegExp(VH(p),"g"),function(A,R){return R===K?".":""});var T=pR(e,o),k=T.beforeDecimal,E=T.afterDecimal,C=T.addNegation;return c.end-c.start<l.end-l.start&&k===""&&g&&!parseFloat(E)&&(e=C?"-":""),e}function vde(e,t){var r=t.prefix;r===void 0&&(r="");var n=t.suffix;n===void 0&&(n="");var o=Array.from({length:e.length+1}).map(function(){return!0}),i=e[0]==="-";o.fill(!1,0,Math.min(r.length+(i?1:0),e.length));var a=e.length;return o.fill(!1,a-n.length+1,a+1),o}function xde(e){var t=H0(e),r=t.thousandSeparator,n=t.decimalSeparator,o=e.prefix;o===void 0&&(o="");var i=e.allowNegative;if(i===void 0&&(i=!0),r===n)throw new Error(`
|
|
52
|
+
Decimal separator can't be same as thousand separator.
|
|
53
|
+
thousandSeparator: `+r+` (thousandSeparator = {true} is same as thousandSeparator = ",")
|
|
54
|
+
decimalSeparator: `+n+` (default value for decimalSeparator is .)
|
|
55
|
+
`);return o.startsWith("-")&&i&&(console.error(`
|
|
56
|
+
Prefix can't start with '-' when allowNegative is true.
|
|
57
|
+
prefix: `+o+`
|
|
58
|
+
allowNegative: `+i+`
|
|
59
|
+
`),i=!1),Object.assign(Object.assign({},e),{allowNegative:i})}function bde(e){e=xde(e);var t=e.decimalSeparator,r=e.allowedDecimalSeparators,n=e.thousandsGroupStyle,o=e.suffix,i=e.allowNegative,a=e.allowLeadingZeros,s=e.onKeyDown;s===void 0&&(s=mc);var l=e.onBlur;l===void 0&&(l=mc);var c=e.thousandSeparator,d=e.decimalScale,u=e.fixedDecimalScale,f=e.prefix;f===void 0&&(f="");var m=e.defaultValue,p=e.value,g=e.valueIsNumericString,b=e.onValueChange,v=jH(e,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),x=H0(e),_=x.decimalSeparator,I=x.allowedDecimalSeparators,S=function(N){return BH(N,e)},w=function(N,U){return gde(N,U,e)},P=pc(p)?m:p,$=g??hde(P,f,o);pc(p)?pc(m)||($=$||typeof m=="number"):$=$||typeof p=="number";var B=function(N){return UH(N)?N:(typeof N=="number"&&(N=WH(N)),$&&typeof d=="number"?LH(N,d,!!u):N)},W=GH(B(p),B(m),!!$,S,w,b),H=W[0],K=H.numAsString,T=H.formattedValue,k=W[1],E=function(N){var U=N.target,G=N.key,re=U.selectionStart,ve=U.selectionEnd,he=U.value;if(he===void 0&&(he=""),(G==="Backspace"||G==="Delete")&&ve<f.length&&he!=="-"){N.preventDefault();return}if(re!==ve){s(N);return}G==="Backspace"&&he[0]==="-"&&re===f.length+1&&i&&ou(U,1),d&&u&&(G==="Backspace"&&he[re-1]===_?(ou(U,re-1),N.preventDefault()):G==="Delete"&&he[re]===_&&N.preventDefault()),I?.includes(G)&&he[re]===_&&ou(U,re+1);var Q=c===!0?",":c;G==="Backspace"&&he[re-1]===Q&&ou(U,re-1),G==="Delete"&&he[re]===Q&&ou(U,re+1),s(N)},C=function(N){var U=K;if(U.match(/\d/g)||(U=""),a||(U=rde(U)),u&&d&&(U=LH(U,d,u)),U!==K){var G=BH(U,e);k({formattedValue:G,value:U,floatValue:parseFloat(U)},{event:N,source:Bm.event})}l(N)},A=function(N){return N===_?!0:kv(N)},R=function(N){var U=N.currentValue,G=N.lastValue,re=N.formattedValue,ve=N.currentValueIndex,he=N.formattedValueIndex,Q=U[ve],ne=re[he],we=ZH(G,U),se=we.to,Ae=function(We){return w(We).indexOf(".")+f.length};return p===0&&u&&d&&U[se.start]===_&&Ae(U)<ve&&Ae(re)>he?!1:ve>=se.start&&ve<se.end&&I&&I.includes(Q)&&ne===_?!0:Q===ne};return Object.assign(Object.assign({},v),{value:T,valueIsNumericString:!1,isValidInputCharacter:A,isCharacterSame:R,onValueChange:k,format:S,removeFormatting:w,getCaretBoundary:function(N){return vde(N,e)},onKeyDown:E,onBlur:C})}function KH(e){var t=bde(e);return Mt.default.createElement(fde,Object.assign({},t))}var hc=y(O(),1),jm=y(D(),1);var hR=y(O(),1);function gR({direction:e,style:t,...r}){return(0,hR.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",...r,children:(0,hR.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 W0={root:"m_e2f5cd4e",controls:"m_95e17d22",control:"m_80b4b171"};var yde=/^(0\.0*|-0(\.0*)?)$/,_de=/^-?0\d+(\.\d+)?\.?$/;function xR(e){return typeof e=="string"&&e!==""&&!Number.isNaN(Number(e))}function vR(e){return typeof e=="number"?e<Number.MAX_SAFE_INTEGER:e===""||xR(e)&&Number(e)<Number.MAX_SAFE_INTEGER}function Ide(e){return e.toString().replace(".","").length}function wde(e,t){return(typeof e=="number"?e<Number.MAX_SAFE_INTEGER:!Number.isNaN(Number(e)))&&!Number.isNaN(e)&&Ide(t)<14&&t!==""}function qH(e,t,r){if(e===void 0)return!0;let n=t===void 0||e>=t,o=r===void 0||e<=r;return n&&o}var Sde={step:1,clampBehavior:"blur",allowDecimal:!0,allowNegative:!0,withKeyboardEvents:!0,allowLeadingZeros:!0,trimLeadingZeroesOnBlur:!0,startValue:0},kde=(e,{size:t})=>({controls:{"--ni-chevron-size":xe(t,"ni-chevron-size")}});function Cde(e,t,r){let n=e.toString().replace(/^0+/,""),o=parseFloat(n);return Number.isNaN(o)?n:o>Number.MAX_SAFE_INTEGER?t!==void 0?String(t):n:Rl(o,r,t)}var nu=M((e,t)=>{let r=z("NumberInput",Sde,e),{className:n,classNames:o,styles:i,unstyled:a,vars:s,onChange:l,onValueChange:c,value:d,defaultValue:u,max:f,min:m,step:p,hideControls:g,rightSection:b,isAllowed:v,clampBehavior:x,onBlur:_,allowDecimal:I,decimalScale:S,onKeyDown:w,onKeyDownCapture:P,handlersRef:$,startValue:B,disabled:W,rightSectionPointerEvents:H,allowNegative:K,readOnly:T,size:k,rightSectionWidth:E,stepHoldInterval:C,stepHoldDelay:A,allowLeadingZeros:R,withKeyboardEvents:N,trimLeadingZeroesOnBlur:U,...G}=r,re=q({name:"NumberInput",classes:W0,props:r,classNames:o,styles:i,unstyled:a,vars:s,varsResolver:kde}),{resolvedClassNames:ve,resolvedStyles:he}=Zr({classNames:o,styles:i,props:r}),[Q,ne]=ot({value:d,defaultValue:u,finalValue:"",onChange:l}),we=A!==void 0&&C!==void 0,se=(0,jm.useRef)(null),Ae=(0,jm.useRef)(null),We=(0,jm.useRef)(0),et=(fe,Te)=>{Te.source==="event"&&ne(wde(fe.floatValue,fe.value)&&!yde.test(fe.value)&&!(R&&_de.test(fe.value))?fe.floatValue:fe.value),c?.(fe,Te)},ct=fe=>{let Te=String(fe).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return Te?Math.max(0,(Te[1]?Te[1].length:0)-(Te[2]?+Te[2]:0)):0},Ne=fe=>{se.current&&typeof fe<"u"&&se.current.setSelectionRange(fe,fe)},Yt=(0,jm.useRef)(fd);Yt.current=()=>{if(!vR(Q))return;let fe,Te=ct(Q),yr=ct(p),hn=Math.max(Te,yr),Mo=10**hn;if(!xR(Q)&&(typeof Q!="number"||Number.isNaN(Q)))fe=Rl(B,m,f);else if(f!==void 0){let Pr=(Math.round(Number(Q)*Mo)+Math.round(p*Mo))/Mo;fe=Pr<=f?Pr:f}else fe=(Math.round(Number(Q)*Mo)+Math.round(p*Mo))/Mo;let Ht=fe.toFixed(hn);ne(parseFloat(Ht)),c?.({floatValue:parseFloat(Ht),formattedValue:Ht,value:Ht},{source:"increment"}),setTimeout(()=>Ne(se.current?.value.length),0)};let Jt=(0,jm.useRef)(fd);Jt.current=()=>{if(!vR(Q))return;let fe,Te=m!==void 0?m:K?Number.MIN_SAFE_INTEGER:0,yr=ct(Q),hn=ct(p),Mo=Math.max(yr,hn),Ht=10**Mo;if(!xR(Q)&&typeof Q!="number"||Number.isNaN(Q))fe=Rl(B,Te,f);else{let bs=(Math.round(Number(Q)*Ht)-Math.round(p*Ht))/Ht;fe=Te!==void 0&&bs<Te?Te:bs}let Pr=fe.toFixed(Mo);ne(parseFloat(Pr)),c?.({floatValue:parseFloat(Pr),formattedValue:Pr,value:Pr},{source:"decrement"}),setTimeout(()=>Ne(se.current?.value.length),0)};let co=fe=>{w?.(fe),!(T||!N)&&(fe.key==="ArrowUp"&&(fe.preventDefault(),Yt.current()),fe.key==="ArrowDown"&&(fe.preventDefault(),Jt.current()))},ge=fe=>{if(P?.(fe),fe.key==="Backspace"){let Te=se.current;Te.selectionStart===0&&Te.selectionStart===Te.selectionEnd&&(fe.preventDefault(),window.setTimeout(()=>Ne(0),0))}},me=fe=>{let Te=Q;x==="blur"&&typeof Te=="number"&&(Te=Rl(Te,m,f)),U&&typeof Te=="string"&&ct(Te)<15&&(Te=Cde(Te,f,m)),Q!==Te&&ne(Te),_?.(fe)};gd($,{increment:Yt.current,decrement:Jt.current});let ke=fe=>{fe?Yt.current():Jt.current(),We.current+=1},Oe=fe=>{if(ke(fe),we){let Te=typeof C=="number"?C:C(We.current);Ae.current=window.setTimeout(()=>Oe(fe),Te)}},Ye=(fe,Te)=>{fe.preventDefault(),se.current?.focus(),ke(Te),we&&(Ae.current=window.setTimeout(()=>Oe(Te),A))},Me=()=>{Ae.current&&window.clearTimeout(Ae.current),Ae.current=null,We.current=0},tt=(0,hc.jsxs)("div",{...re("controls"),children:[(0,hc.jsx)(_t,{...re("control"),tabIndex:-1,"aria-hidden":!0,disabled:W||typeof Q=="number"&&f!==void 0&&Q>=f,mod:{direction:"up"},onMouseDown:fe=>fe.preventDefault(),onPointerDown:fe=>{Ye(fe,!0)},onPointerUp:Me,onPointerLeave:Me,children:(0,hc.jsx)(gR,{direction:"up"})}),(0,hc.jsx)(_t,{...re("control"),tabIndex:-1,"aria-hidden":!0,disabled:W||typeof Q=="number"&&m!==void 0&&Q<=m,mod:{direction:"down"},onMouseDown:fe=>fe.preventDefault(),onPointerDown:fe=>{Ye(fe,!1)},onPointerUp:Me,onPointerLeave:Me,children:(0,hc.jsx)(gR,{direction:"down"})})]});return(0,hc.jsx)(tr,{component:KH,allowNegative:K,className:qe(W0.root,n),size:k,...G,readOnly:T,disabled:W,value:Q,getInputRef:Ze(t,se),onValueChange:et,rightSection:g||T||!vR(Q)?b:b||tt,classNames:ve,styles:he,unstyled:a,__staticSelector:"NumberInput",decimalScale:I?S:0,onKeyDown:co,onKeyDownCapture:ge,rightSectionPointerEvents:H??(W?"none":void 0),rightSectionWidth:E??`var(--ni-right-section-width-${k||"sm"})`,allowLeadingZeros:R,onBlur:me,isAllowed:fe=>x==="strict"?v?v(fe)&&qH(fe.floatValue,m,f):qH(fe.floatValue,m,f):v?v(fe):!0})});nu.classes={...tr.classes,...W0};nu.displayName="@mantine/core/NumberInput";var Um=y(O(),1);var DYe=y(D(),1);var bR=y(O(),1),XH=({reveal:e})=>(0,bR.jsx)("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{width:"var(--psi-icon-size)",height:"var(--psi-icon-size)"},children:(0,bR.jsx)("path",{d:e?"M13.3536 2.35355C13.5488 2.15829 13.5488 1.84171 13.3536 1.64645C13.1583 1.45118 12.8417 1.45118 12.6464 1.64645L10.6828 3.61012C9.70652 3.21671 8.63759 3 7.5 3C4.30786 3 1.65639 4.70638 0.0760002 7.23501C-0.0253338 7.39715 -0.0253334 7.60288 0.0760014 7.76501C0.902945 9.08812 2.02314 10.1861 3.36061 10.9323L1.64645 12.6464C1.45118 12.8417 1.45118 13.1583 1.64645 13.3536C1.84171 13.5488 2.15829 13.5488 2.35355 13.3536L4.31723 11.3899C5.29348 11.7833 6.36241 12 7.5 12C10.6921 12 13.3436 10.2936 14.924 7.76501C15.0253 7.60288 15.0253 7.39715 14.924 7.23501C14.0971 5.9119 12.9769 4.81391 11.6394 4.06771L13.3536 2.35355ZM9.90428 4.38861C9.15332 4.1361 8.34759 4 7.5 4C4.80285 4 2.52952 5.37816 1.09622 7.50001C1.87284 8.6497 2.89609 9.58106 4.09974 10.1931L9.90428 4.38861ZM5.09572 10.6114L10.9003 4.80685C12.1039 5.41894 13.1272 6.35031 13.9038 7.50001C12.4705 9.62183 10.1971 11 7.5 11C6.65241 11 5.84668 10.8639 5.09572 10.6114Z":"M7.5 11C4.80285 11 2.52952 9.62184 1.09622 7.50001C2.52952 5.37816 4.80285 4 7.5 4C10.1971 4 12.4705 5.37816 13.9038 7.50001C12.4705 9.62183 10.1971 11 7.5 11ZM7.5 3C4.30786 3 1.65639 4.70638 0.0760002 7.23501C-0.0253338 7.39715 -0.0253334 7.60288 0.0760014 7.76501C1.65639 10.2936 4.30786 12 7.5 12C10.6921 12 13.3436 10.2936 14.924 7.76501C15.0253 7.60288 15.0253 7.39715 14.924 7.23501C13.3436 4.70638 10.6921 3 7.5 3ZM7.5 9.5C8.60457 9.5 9.5 8.60457 9.5 7.5C9.5 6.39543 8.60457 5.5 7.5 5.5C6.39543 5.5 5.5 6.39543 5.5 7.5C5.5 8.60457 6.39543 9.5 7.5 9.5Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})});var Z0={root:"m_f61ca620",input:"m_ccf8da4c",innerInput:"m_f2d85dd2",visibilityToggle:"m_b1072d44"};var Pde={visibilityToggleIcon:XH},Dde=(e,{size:t})=>({root:{"--psi-icon-size":xe(t,"psi-icon-size"),"--psi-button-size":xe(t,"psi-button-size")}}),gc=M((e,t)=>{let r=z("PasswordInput",Pde,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,required:c,error:d,leftSection:u,disabled:f,id:m,variant:p,inputContainer:g,description:b,label:v,size:x,errorProps:_,descriptionProps:I,labelProps:S,withAsterisk:w,inputWrapperOrder:P,wrapperProps:$,radius:B,rightSection:W,rightSectionWidth:H,rightSectionPointerEvents:K,leftSectionWidth:T,visible:k,defaultVisible:E,onVisibilityChange:C,visibilityToggleIcon:A,visibilityToggleButtonProps:R,rightSectionProps:N,leftSectionProps:U,leftSectionPointerEvents:G,withErrorStyles:re,mod:ve,...he}=r,Q=gt(m),[ne,we]=ot({value:k,defaultValue:E,finalValue:!1,onChange:C}),se=()=>we(!ne),Ae=q({name:"PasswordInput",classes:Z0,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:Dde}),{resolvedClassNames:We,resolvedStyles:et}=Zr({classNames:n,styles:a,props:r}),{styleProps:ct,rest:Ne}=Gr(he),Yt=A,Jt=_?.id||`${Q}-error`,co=I?.id||`${Q}-description`,ke=`${!!d&&typeof d!="boolean"?Jt:""} ${!!b?co:""}`,Oe=ke.trim().length>0?ke.trim():void 0,Ye=(0,Um.jsx)(vt,{...Ae("visibilityToggle"),disabled:f,radius:B,"aria-hidden":!R,tabIndex:-1,...R,variant:R?.variant??"subtle",color:"gray",unstyled:s,onTouchEnd:Me=>{Me.preventDefault(),R?.onTouchEnd?.(Me),se()},onMouseDown:Me=>{Me.preventDefault(),R?.onMouseDown?.(Me),se()},onKeyDown:Me=>{R?.onKeyDown?.(Me),Me.key===" "&&(Me.preventDefault(),se())},children:(0,Um.jsx)(Yt,{reveal:ne})});return(0,Um.jsx)(ft.Wrapper,{required:c,id:Q,label:v,error:d,description:b,size:x,classNames:We,styles:et,__staticSelector:"PasswordInput",unstyled:s,withAsterisk:w,inputWrapperOrder:P,inputContainer:g,variant:p,labelProps:{...S,htmlFor:Q},descriptionProps:{...I,id:co},errorProps:{..._,id:Jt},mod:ve,...Ae("root"),...ct,...$,children:(0,Um.jsx)(ft,{component:"div",error:d,leftSection:u,size:x,classNames:{...We,input:qe(Z0.input,We.input)},styles:et,radius:B,disabled:f,__staticSelector:"PasswordInput",rightSectionWidth:H,rightSection:W??Ye,variant:p,unstyled:s,leftSectionWidth:T,rightSectionPointerEvents:K||"all",rightSectionProps:N,leftSectionProps:U,leftSectionPointerEvents:G,withAria:!1,withErrorStyles:re,children:(0,Um.jsx)("input",{required:c,"data-invalid":!!d||void 0,"data-with-left-section":!!u||void 0,...Ae("innerInput"),disabled:f,id:Q,ref:t,...Ne,"aria-describedby":Oe,autoComplete:Ne.autoComplete||"off",type:ne?"text":"password"})})})});gc.classes={...tr.classes,...Z0};gc.displayName="@mantine/core/PasswordInput";var _R=y(O(),1),wJe=y(D(),1);var YH=y(O(),1),GYe=y(D(),1);var jYe=y(D(),1);var VYe=y(O(),1);var[QH,G0]=Zt("Progress.Root component was not found in tree");var Gs={root:"m_db6d6462",section:"m_2242eb65","stripes-animation":"m_81a374bd",label:"m_91e40b74"};var Rde={},K0=M((e,t)=>{let{classNames:r,className:n,style:o,styles:i,vars:a,...s}=z("ProgressLabel",Rde,e),l=G0();return(0,YH.jsx)(F,{ref:t,...l.getStyles("label",{className:n,style:o,classNames:r,styles:i}),...s})});K0.classes=Gs;K0.displayName="@mantine/core/ProgressLabel";var yR=y(O(),1),tJe=y(D(),1);var Tde={},Ede=(e,{size:t,radius:r,transitionDuration:n})=>({root:{"--progress-size":xe(t,"progress-size"),"--progress-radius":r===void 0?void 0:Ee(r),"--progress-transition-duration":typeof n=="number"?`${n}ms`:void 0}}),Cv=M((e,t)=>{let r=z("ProgressRoot",Tde,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,autoContrast:c,transitionDuration:d,...u}=r,f=q({name:"Progress",classes:Gs,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:Ede});return(0,yR.jsx)(QH,{value:{getStyles:f,autoContrast:c},children:(0,yR.jsx)(F,{ref:t,...f("root"),...u})})});Cv.classes=Gs;Cv.displayName="@mantine/core/ProgressRoot";var JH=y(O(),1),uJe=y(D(),1);var $de={withAria:!0},Pv=M((e,t)=>{let{classNames:r,className:n,style:o,styles:i,vars:a,value:s,withAria:l,color:c,striped:d,animated:u,mod:f,...m}=z("ProgressSection",$de,e),p=G0(),g=ut(),b=l?{role:"progressbar","aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":s,"aria-valuetext":`${s}%`}:{};return(0,JH.jsx)(F,{ref:t,...p.getStyles("section",{className:n,classNames:r,styles:i,style:o}),...m,...b,mod:[{striped:d||u,animated:u},f],__vars:{"--progress-section-width":`${s}%`,"--progress-section-color":Ue(c,g),"--progress-label-color":Sa(p.autoContrast,g)?Mn({color:c,theme:g,autoContrast:p.autoContrast}):void 0}})});Pv.classes=Gs;Pv.displayName="@mantine/core/ProgressSection";var Ade={},vc=M((e,t)=>{let r=z("Progress",Ade,e),{value:n,classNames:o,styles:i,vars:a,color:s,striped:l,animated:c,"aria-label":d,...u}=r,{resolvedClassNames:f,resolvedStyles:m}=Zr({classNames:o,styles:i,props:r});return(0,_R.jsx)(Cv,{ref:t,classNames:f,styles:m,vars:a,...u,children:(0,_R.jsx)(Pv,{value:n,color:s,striped:l,animated:c,"aria-label":d})})});vc.classes=Gs;vc.displayName="@mantine/core/Progress";vc.Section=Pv;vc.Root=Cv;vc.Label=K0;var Vm=y(O(),1);var zet=y(D(),1);var wR=y(O(),1),HJe=y(D(),1);var AJe=y(D(),1),OJe=y(O(),1);var[eW,q0]=Co();var LJe=y(D(),1),MJe=y(O(),1);var[tW,rW]=Co();var IR={card:"m_9dc8ae12"};var Ode={withBorder:!0},zde=(e,{radius:t})=>({card:{"--card-radius":Ee(t)}}),X0=M((e,t)=>{let r=z("RadioCard",Ode,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,checked:c,mod:d,withBorder:u,value:f,onClick:m,name:p,onKeyDown:g,...b}=r,v=q({name:"RadioCard",classes:IR,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:zde,rootSelector:"card"}),{dir:x}=ii(),_=q0(),I=typeof c=="boolean"?c:_?.value===f||!1,S=p||_?.name,w=P=>{if(g?.(P),["ArrowDown","ArrowUp","ArrowLeft","ArrowRight"].includes(P.nativeEvent.code)){P.preventDefault();let $=Array.from(document.querySelectorAll(`[role="radio"][name="${S||"__mantine"}"]`)),B=$.findIndex(K=>K===P.target),W=B+1>=$.length?0:B+1,H=B-1<0?$.length-1:B-1;P.nativeEvent.code==="ArrowDown"&&($[W].focus(),$[W].click()),P.nativeEvent.code==="ArrowUp"&&($[H].focus(),$[H].click()),P.nativeEvent.code==="ArrowLeft"&&($[x==="ltr"?H:W].focus(),$[x==="ltr"?H:W].click()),P.nativeEvent.code==="ArrowRight"&&($[x==="ltr"?W:H].focus(),$[x==="ltr"?W:H].click())}};return(0,wR.jsx)(tW,{value:{checked:I},children:(0,wR.jsx)(_t,{ref:t,mod:[{"with-border":u,checked:I},d],...v("card"),...b,role:"radio","aria-checked":I,name:S,onClick:P=>{m?.(P),_?.onChange(f||"")},onKeyDown:w})})});X0.displayName="@mantine/core/RadioCard";X0.classes=IR;var Q0=y(O(),1);var oet=y(D(),1);var Nde={},Y0=M((e,t)=>{let{value:r,defaultValue:n,onChange:o,size:i,wrapperProps:a,children:s,name:l,readOnly:c,...d}=z("RadioGroup",Nde,e),u=gt(l),[f,m]=ot({value:r,defaultValue:n,finalValue:"",onChange:o});return(0,Q0.jsx)(eW,{value:{value:f,onChange:g=>!c&&m(typeof g=="string"?g:g.currentTarget.value),size:i,name:u},children:(0,Q0.jsx)(ft.Wrapper,{size:i,ref:t,...a,...d,labelElement:"div",__staticSelector:"RadioGroup",children:(0,Q0.jsx)(Rm,{role:"radiogroup",children:s})})})});Y0.classes=ft.Wrapper.classes;Y0.displayName="@mantine/core/RadioGroup";var SR=y(O(),1);var met=y(D(),1);function J0({size:e,style:t,...r}){return(0,SR.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 5 5",style:{width:Z(e),height:Z(e),...t},"aria-hidden":!0,...r,children:(0,SR.jsx)("circle",{cx:"2.5",cy:"2.5",r:"2.5",fill:"currentColor"})})}var CR=y(O(),1),vet=y(D(),1);var kR={indicator:"m_717d7ff6",icon:"m_3e4da632","indicator--outline":"m_2980836c"};var Fde={icon:J0},Lde=(e,{radius:t,color:r,size:n,iconColor:o,variant:i,autoContrast:a})=>{let s=Ir({color:r||e.primaryColor,theme:e}),l=s.isThemeColor&&s.shade===void 0?`var(--mantine-color-${s.color}-outline)`:s.color;return{indicator:{"--radio-size":xe(n,"radio-size"),"--radio-radius":t===void 0?void 0:Ee(t),"--radio-color":i==="outline"?l:Ue(r,e),"--radio-icon-size":xe(n,"radio-icon-size"),"--radio-icon-color":o?Ue(o,e):Sa(a,e)?Mn({color:r,theme:e,autoContrast:a}):void 0}}},ew=M((e,t)=>{let r=z("RadioIndicator",Fde,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,icon:c,radius:d,color:u,iconColor:f,autoContrast:m,checked:p,mod:g,variant:b,disabled:v,...x}=r,_=c,I=q({name:"RadioIndicator",classes:kR,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:Lde,rootSelector:"indicator"}),S=rW(),w=typeof p=="boolean"?p:S?.checked||!1;return(0,CR.jsx)(F,{ref:t,...I("indicator",{variant:b}),variant:b,mod:[{checked:w,disabled:v},g],...x,children:(0,CR.jsx)(_,{...I("icon")})})});ew.displayName="@mantine/core/RadioIndicator";ew.classes=kR;var PR={root:"m_f3f1af94",inner:"m_89c4f5e4",icon:"m_f3ed6b2b",radio:"m_8a3dbb89","radio--outline":"m_1bfe9d39"};var Mde={labelPosition:"right"},Bde=(e,{size:t,radius:r,color:n,iconColor:o,variant:i,autoContrast:a})=>{let s=Ir({color:n||e.primaryColor,theme:e}),l=s.isThemeColor&&s.shade===void 0?`var(--mantine-color-${s.color}-outline)`:s.color;return{root:{"--radio-size":xe(t,"radio-size"),"--radio-radius":r===void 0?void 0:Ee(r),"--radio-color":i==="outline"?l:Ue(n,e),"--radio-icon-color":o?Ue(o,e):Sa(a,e)?Mn({color:n,theme:e,autoContrast:a}):void 0,"--radio-icon-size":xe(t,"radio-icon-size")}}},Ks=M((e,t)=>{let r=z("Radio",Mde,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,id:c,size:d,label:u,labelPosition:f,description:m,error:p,radius:g,color:b,variant:v,disabled:x,wrapperProps:_,icon:I=J0,rootRef:S,iconColor:w,onChange:P,mod:$,...B}=r,W=q({name:"Radio",classes:PR,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:Bde}),H=q0(),K=H?.size??d,T=r.size?d:K,{styleProps:k,rest:E}=Gr(B),C=gt(c),A=H?{checked:H.value===E.value,name:E.name??H.name,onChange:R=>{H.onChange(R),P?.(R)}}:{};return(0,Vm.jsx)(Jd,{...W("root"),__staticSelector:"Radio",__stylesApiProps:r,id:C,size:T,labelPosition:f,label:u,description:m,error:p,disabled:x,classNames:n,styles:a,unstyled:s,"data-checked":A.checked||void 0,variant:v,ref:S,mod:$,...k,..._,children:(0,Vm.jsxs)(F,{...W("inner"),mod:{"label-position":f},children:[(0,Vm.jsx)(F,{...W("radio",{focusable:!0,variant:v}),onChange:P,...E,...A,component:"input",mod:{error:!!p},ref:t,id:C,disabled:x,type:"radio"}),(0,Vm.jsx)(I,{...W("icon"),"aria-hidden":!0})]})})});Ks.classes=PR;Ks.displayName="@mantine/core/Radio";Ks.Group=Y0;Ks.Card=X0;Ks.Indicator=ew;var qs=y(O(),1),iw=y(D(),1);var jde={duration:100,transition:"fade"};function oW(e,t){return{...jde,...t,...e}}var iu=y(O(),1),iW=y(D(),1);var xc=y(D(),1);function nW({offset:e,position:t,defaultOpened:r}){let[n,o]=(0,xc.useState)(r),i=(0,xc.useRef)(null),{x:a,y:s,elements:l,refs:c,update:d,placement:u}=mm({placement:t,middleware:[Vd({crossAxis:!0,padding:5,rootBoundary:"document"})]}),f=u.includes("right")?e:t.includes("left")?e*-1:0,m=u.includes("bottom")?e:t.includes("top")?e*-1:0,p=(0,xc.useCallback)(({clientX:g,clientY:b})=>{c.setPositionReference({getBoundingClientRect(){return{width:0,height:0,x:g,y:b,left:g+f,top:b+m,right:g,bottom:b}}})},[l.reference]);return(0,xc.useEffect)(()=>{if(c.floating.current){let g=i.current;g.addEventListener("mousemove",p);let b=Zo(c.floating.current);return b.forEach(v=>{v.addEventListener("scroll",d)}),()=>{g.removeEventListener("mousemove",p),b.forEach(v=>{v.removeEventListener("scroll",d)})}}},[l.reference,c.floating.current,d,p,n]),{handleMouseMove:p,x:a,y:s,opened:n,setOpened:o,boundaryRef:i,floating:c.setFloating}}var Hm={tooltip:"m_1b3c8819",arrow:"m_f898399f"};var Ude={refProp:"ref",withinPortal:!0,offset:10,defaultOpened:!1,position:"right",zIndex:Rt("popover")},Vde=(e,{radius:t,color:r})=>({tooltip:{"--tooltip-radius":t===void 0?void 0:Ee(t),"--tooltip-bg":r?Ue(r,e):void 0,"--tooltip-color":r?"var(--mantine-color-white)":void 0}}),tw=M((e,t)=>{let r=z("TooltipFloating",Ude,e),{children:n,refProp:o,withinPortal:i,style:a,className:s,classNames:l,styles:c,unstyled:d,radius:u,color:f,label:m,offset:p,position:g,multiline:b,zIndex:v,disabled:x,defaultOpened:_,variant:I,vars:S,portalProps:w,...P}=r,$=ut(),B=q({name:"TooltipFloating",props:r,classes:Hm,className:s,style:a,classNames:l,styles:c,unstyled:d,rootSelector:"tooltip",vars:S,varsResolver:Vde}),{handleMouseMove:W,x:H,y:K,opened:T,boundaryRef:k,floating:E,setOpened:C}=nW({offset:p,position:g,defaultOpened:_});if(!ko(n))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");let A=Ze(k,El(n),t),R=n.props,N=G=>{R.onMouseEnter?.(G),W(G),C(!0)},U=G=>{R.onMouseLeave?.(G),C(!1)};return(0,iu.jsxs)(iu.Fragment,{children:[(0,iu.jsx)(Sn,{...w,withinPortal:i,children:(0,iu.jsx)(F,{...P,...B("tooltip",{style:{...Xh(a,$),zIndex:v,display:!x&&T?"block":"none",top:(K&&Math.round(K))??"",left:(H&&Math.round(H))??""}}),variant:I,ref:E,mod:{multiline:b},children:m})}),(0,iW.cloneElement)(n,{...R,[o]:A,onMouseEnter:N,onMouseLeave:U})]})});tw.classes=Hm;tw.displayName="@mantine/core/TooltipFloating";var DR=y(O(),1);var Stt=y(D(),1);var rw=y(D(),1),aW=(0,rw.createContext)(!1),sW=aW.Provider,lW=()=>(0,rw.useContext)(aW);var Hde={openDelay:0,closeDelay:0};function ow(e){let{openDelay:t,closeDelay:r,children:n}=z("TooltipGroup",Hde,e);return(0,DR.jsx)(sW,{value:!0,children:(0,DR.jsx)(sj,{delay:{open:t,close:r},children:n})})}ow.displayName="@mantine/core/TooltipGroup";ow.extend=e=>e;var nw=y(D(),1);function Wde(e){if(e===void 0)return{shift:!0,flip:!0};let t={...e};return e.shift===void 0&&(t.shift=!0),e.flip===void 0&&(t.flip=!0),t}function Zde(e){let t=Wde(e.middlewares),r=[um(e.offset)];return t.shift&&r.push(Vd(typeof t.shift=="boolean"?{padding:8}:{padding:8,...t.shift})),t.flip&&r.push(typeof t.flip=="boolean"?Hd():Hd(t.flip)),r.push(Xg({element:e.arrowRef,padding:e.arrowOffset})),t.inline?r.push(typeof t.inline=="boolean"?nc():nc(t.inline)):e.inline&&r.push(nc()),r}function cW(e){let[t,r]=(0,nw.useState)(e.defaultOpened),o=typeof e.opened=="boolean"?e.opened:t,i=lW(),a=gt(),s=(0,nw.useCallback)(w=>{r(w),w&&x(a)},[a]),{x:l,y:c,context:d,refs:u,update:f,placement:m,middlewareData:{arrow:{x:p,y:g}={}}}=mm({strategy:e.strategy,placement:e.position,open:o,onOpenChange:s,middleware:Zde(e)}),{delay:b,currentId:v,setCurrentId:x}=lj(d,{id:a}),{getReferenceProps:_,getFloatingProps:I}=uj([ij(d,{enabled:e.events?.hover,delay:i?b:{open:e.openDelay,close:e.closeDelay},mouseOnly:!e.events?.touch}),dj(d,{enabled:e.events?.focus,visibleOnly:!0}),fj(d,{role:"tooltip"}),cj(d,{enabled:typeof e.opened>"u"})]);HI({opened:o,position:e.position,positionDependencies:e.positionDependencies,floating:{refs:u,update:f}}),_r(()=>{e.onPositionChange?.(m)},[m]);let S=o&&v&&v!==a;return{x:l,y:c,arrowX:p,arrowY:g,reference:u.setReference,floating:u.setFloating,getFloatingProps:I,getReferenceProps:_,isGroupPhase:S,opened:o,placement:m}}var dW={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:Rt("popover"),positionDependencies:[],middlewares:{flip:!0,shift:!0,inline:!1}},Gde=(e,{radius:t,color:r})=>({tooltip:{"--tooltip-radius":t===void 0?void 0:Ee(t),"--tooltip-bg":r?Ue(r,e):void 0,"--tooltip-color":r?"var(--mantine-color-white)":void 0}}),xt=M((e,t)=>{let r=z("Tooltip",dW,e),{children:n,position:o,refProp:i,label:a,openDelay:s,closeDelay:l,onPositionChange:c,opened:d,defaultOpened:u,withinPortal:f,radius:m,color:p,classNames:g,styles:b,unstyled:v,style:x,className:_,withArrow:I,arrowSize:S,arrowOffset:w,arrowRadius:P,arrowPosition:$,offset:B,transitionProps:W,multiline:H,events:K,zIndex:T,disabled:k,positionDependencies:E,onClick:C,onMouseEnter:A,onMouseLeave:R,inline:N,variant:U,keepMounted:G,vars:re,portalProps:ve,mod:he,floatingStrategy:Q,middlewares:ne,...we}=z("Tooltip",dW,r),{dir:se}=ii(),Ae=(0,iw.useRef)(null),We=cW({position:FI(se,o),closeDelay:l,openDelay:s,onPositionChange:c,opened:d,defaultOpened:u,events:K,arrowRef:Ae,arrowOffset:w,offset:typeof B=="number"?B+(I?S/2:0):B,positionDependencies:[...E,n],inline:N,strategy:Q,middlewares:ne}),et=q({name:"Tooltip",props:r,classes:Hm,className:_,style:x,classNames:g,styles:b,unstyled:v,rootSelector:"tooltip",vars:re,varsResolver:Gde});if(!ko(n))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");let ct=Ze(We.reference,El(n),t),Ne=oW(W,{duration:100,transition:"fade"}),Yt=n.props;return(0,qs.jsxs)(qs.Fragment,{children:[(0,qs.jsx)(Sn,{...ve,withinPortal:f,children:(0,qs.jsx)(Go,{...Ne,keepMounted:G,mounted:!k&&!!We.opened,duration:We.isGroupPhase?10:Ne.duration,children:Jt=>(0,qs.jsxs)(F,{...we,"data-fixed":Q==="fixed"||void 0,variant:U,mod:[{multiline:H},he],...We.getFloatingProps({ref:We.floating,className:et("tooltip").className,style:{...et("tooltip").style,...Jt,zIndex:T,top:We.y??0,left:We.x??0}}),children:[a,(0,qs.jsx)(Jg,{ref:Ae,arrowX:We.arrowX,arrowY:We.arrowY,visible:I,position:We.placement,arrowSize:S,arrowOffset:w,arrowRadius:P,arrowPosition:$,...et("arrow")})]})})}),(0,iw.cloneElement)(n,We.getReferenceProps({onClick:C,onMouseEnter:A,onMouseLeave:R,onMouseMove:r.onMouseMove,onPointerDown:r.onPointerDown,onPointerEnter:r.onPointerEnter,className:qe(_,Yt.className),...Yt,[i]:ct}))]})});xt.classes=Hm;xt.displayName="@mantine/core/Tooltip";xt.Floating=tw;xt.Group=ow;var Dv=y(O(),1),bc=y(D(),1);var RR={root:"m_cf365364",indicator:"m_9e182ccd",label:"m_1738fcb2",input:"m_1714d588",control:"m_69686b9b",innerLabel:"m_78882f40"};var Kde={withItemsBorders:!0},qde=(e,{radius:t,color:r,transitionDuration:n,size:o,transitionTimingFunction:i})=>({root:{"--sc-radius":t===void 0?void 0:Ee(t),"--sc-color":r?Ue(r,e):void 0,"--sc-shadow":r?void 0:"var(--mantine-shadow-xs)","--sc-transition-duration":n===void 0?void 0:`${n}ms`,"--sc-transition-timing-function":i,"--sc-padding":xe(o,"sc-padding"),"--sc-font-size":kt(o)}}),au=M((e,t)=>{let r=z("SegmentedControl",Kde,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,data:c,value:d,defaultValue:u,onChange:f,size:m,name:p,disabled:g,readOnly:b,fullWidth:v,orientation:x,radius:_,color:I,transitionDuration:S,transitionTimingFunction:w,variant:P,autoContrast:$,withItemsBorders:B,mod:W,...H}=r,K=q({name:"SegmentedControl",props:r,classes:RR,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:qde}),T=ut(),k=c.map(se=>typeof se=="string"?{label:se,value:se}:se),E=M2(),[C,A]=(0,bc.useState)(Po()),[R,N]=(0,bc.useState)(null),[U,G]=(0,bc.useState)({}),re=(se,Ae)=>{U[Ae]=se,G(U)},[ve,he]=ot({value:d,defaultValue:u,finalValue:Array.isArray(c)?k.find(se=>!se.disabled)?.value??c[0]?.value??null:null,onChange:f}),Q=gt(p),ne=k.map(se=>(0,bc.createElement)(F,{...K("control"),mod:{active:ve===se.value,orientation:x},key:se.value},(0,bc.createElement)("input",{...K("input"),disabled:g||se.disabled,type:"radio",name:Q,value:se.value,id:`${Q}-${se.value}`,checked:ve===se.value,onChange:()=>!b&&he(se.value),"data-focus-ring":T.focusRing,key:`${se.value}-input`}),(0,bc.createElement)(F,{component:"label",...K("label"),mod:{active:ve===se.value&&!(g||se.disabled),disabled:g||se.disabled,"read-only":b},htmlFor:`${Q}-${se.value}`,ref:Ae=>re(Ae,se.value),__vars:{"--sc-label-color":I!==void 0?Mn({color:I,theme:T,autoContrast:$}):void 0},key:`${se.value}-label`},(0,Dv.jsx)("span",{...K("innerLabel"),children:se.label})))),we=Ze(t,se=>N(se));return A2(()=>{A(Po())},[c.length]),c.length===0?null:(0,Dv.jsxs)(F,{...K("root"),variant:P,size:m,ref:we,mod:[{"full-width":v,orientation:x,initialized:E,"with-items-borders":B},W],...H,role:"radiogroup","data-disabled":g,children:[typeof ve=="string"&&(0,Dv.jsx)(JI,{target:U[ve],parent:R,component:"span",transitionDuration:"var(--sc-transition-duration)",...K("indicator")},C),ne]})});au.classes=RR;au.displayName="@mantine/core/SegmentedControl";var Ii=y(O(),1),su=y(D(),1);var Xde={searchable:!1,withCheckIcon:!0,allowDeselect:!0,checkIconPosition:"left"},la=M((e,t)=>{let r=z("Select",Xde,e),{classNames:n,styles:o,unstyled:i,vars:a,dropdownOpened:s,defaultDropdownOpened:l,onDropdownClose:c,onDropdownOpen:d,onFocus:u,onBlur:f,onClick:m,onChange:p,data:g,value:b,defaultValue:v,selectFirstOptionOnChange:x,onOptionSubmit:_,comboboxProps:I,readOnly:S,disabled:w,filter:P,limit:$,withScrollArea:B,maxDropdownHeight:W,size:H,searchable:K,rightSection:T,checkIconPosition:k,withCheckIcon:E,nothingFoundMessage:C,name:A,form:R,searchValue:N,defaultSearchValue:U,onSearchChange:G,allowDeselect:re,error:ve,rightSectionPointerEvents:he,id:Q,clearable:ne,clearButtonProps:we,hiddenInputProps:se,renderOption:Ae,onClear:We,autoComplete:et,scrollAreaProps:ct,__defaultRightSection:Ne,__clearSection:Yt,__clearable:Jt,chevronColor:co,...ge}=r,me=(0,su.useMemo)(()=>Pm(g),[g]),ke=(0,su.useMemo)(()=>Yd(me),[me]),Oe=gt(Q),[Ye,Me,tt]=ot({value:b,defaultValue:v,finalValue:null,onChange:p}),fe=typeof Ye=="string"?ke[Ye]:void 0,Te=F2(fe),[yr,hn,Mo]=ot({value:N,defaultValue:U,finalValue:fe?fe.label:"",onChange:G}),Ht=dc({opened:s,defaultOpened:l,onDropdownOpen:()=>{d?.(),Ht.updateSelectedOptionIndex("active",{scrollIntoView:!0})},onDropdownClose:()=>{c?.(),Ht.resetSelectedOption()}}),Pr=Dr=>{hn(Dr),Ht.resetSelectedOption()},{resolvedClassNames:bs,resolvedStyles:df}=Zr({props:r,styles:o,classNames:n});(0,su.useEffect)(()=>{x&&Ht.selectFirstOption()},[x,yr]),(0,su.useEffect)(()=>{b===null&&Pr(""),typeof b=="string"&&fe&&(Te?.value!==fe.value||Te?.label!==fe.label)&&Pr(fe.label)},[b,fe]),(0,su.useEffect)(()=>{!tt&&!Mo&&Pr(typeof Ye=="string"&&ke[Ye]?.label||"")},[g,Ye]);let uf=(0,Ii.jsx)(Ve.ClearButton,{...we,onClear:()=>{Me(null,null),Pr(""),We?.()}}),ff=ne&&!!Ye&&!w&&!S;return(0,Ii.jsxs)(Ii.Fragment,{children:[(0,Ii.jsxs)(Ve,{store:Ht,__staticSelector:"Select",classNames:bs,styles:df,unstyled:i,readOnly:S,onOptionSubmit:Dr=>{_?.(Dr);let kl=re&&ke[Dr].value===Ye?null:ke[Dr],Cl=kl?kl.value:null;Cl!==Ye&&Me(Cl,kl),!tt&&Pr(typeof Cl=="string"&&kl?.label||""),Ht.closeDropdown()},size:H,...I,children:[(0,Ii.jsx)(Ve.Target,{targetType:K?"input":"button",autoComplete:et,children:(0,Ii.jsx)(tr,{id:Oe,ref:t,__defaultRightSection:(0,Ii.jsx)(Ve.Chevron,{size:H,error:ve,unstyled:i,color:co}),__clearSection:uf,__clearable:ff,rightSection:T,rightSectionPointerEvents:he||(ff?"all":"none"),...ge,size:H,__staticSelector:"Select",disabled:w,readOnly:S||!K,value:yr,onChange:Dr=>{Pr(Dr.currentTarget.value),Ht.openDropdown(),x&&Ht.selectFirstOption()},onFocus:Dr=>{K&&Ht.openDropdown(),u?.(Dr)},onBlur:Dr=>{K&&Ht.closeDropdown(),Pr(Ye!=null&&ke[Ye]?.label||""),f?.(Dr)},onClick:Dr=>{K?Ht.openDropdown():Ht.toggleDropdown(),m?.(Dr)},classNames:bs,styles:df,unstyled:i,pointer:!K,error:ve})}),(0,Ii.jsx)($m,{data:me,hidden:S||w,filter:P,search:yr,limit:$,hiddenWhenEmpty:!C,withScrollArea:B,maxDropdownHeight:W,filterOptions:K&&fe?.label!==yr,value:Ye,checkIconPosition:k,withCheckIcon:E,nothingFoundMessage:C,unstyled:i,labelId:ge.label?`${Oe}-label`:void 0,"aria-label":ge.label?void 0:ge["aria-label"],renderOption:Ae,scrollAreaProps:ct})]}),(0,Ii.jsx)(Ve.HiddenInput,{value:Ye,name:A,form:R,disabled:w,...se})]})});la.classes={...tr.classes,...Ve.classes};la.displayName="@mantine/core/Select";var wi=y(O(),1),Brt=y(D(),1);var ER=y(O(),1);var Ert=y(D(),1);function uW({spacing:e,verticalSpacing:t,cols:r,selector:n}){let o=ut(),i=t===void 0?e:t,a=_s({"--sg-spacing-x":At(md(e)),"--sg-spacing-y":At(md(i)),"--sg-cols":md(r)?.toString()}),s=pt(o.breakpoints).reduce((d,u)=>(d[u]||(d[u]={}),typeof e=="object"&&e[u]!==void 0&&(d[u]["--sg-spacing-x"]=At(e[u])),typeof i=="object"&&i[u]!==void 0&&(d[u]["--sg-spacing-y"]=At(i[u])),typeof r=="object"&&r[u]!==void 0&&(d[u]["--sg-cols"]=r[u]),d),{}),c=Fh(pt(s),o.breakpoints).filter(d=>pt(s[d.value]).length>0).map(d=>({query:`(min-width: ${o.breakpoints[d.value]})`,styles:s[d.value]}));return(0,ER.jsx)(Id,{styles:a,media:c,selector:n})}function TR(e){return typeof e=="object"&&e!==null?pt(e):[]}function Qde(e){return e.sort((t,r)=>Dl(t)-Dl(r))}function Yde({spacing:e,verticalSpacing:t,cols:r}){let n=Array.from(new Set([...TR(e),...TR(t),...TR(r)]));return Qde(n)}function fW({spacing:e,verticalSpacing:t,cols:r,selector:n}){let o=t===void 0?e:t,i=_s({"--sg-spacing-x":At(md(e)),"--sg-spacing-y":At(md(o)),"--sg-cols":md(r)?.toString()}),a=Yde({spacing:e,verticalSpacing:t,cols:r}),s=a.reduce((c,d)=>(c[d]||(c[d]={}),typeof e=="object"&&e[d]!==void 0&&(c[d]["--sg-spacing-x"]=At(e[d])),typeof o=="object"&&o[d]!==void 0&&(c[d]["--sg-spacing-y"]=At(o[d])),typeof r=="object"&&r[d]!==void 0&&(c[d]["--sg-cols"]=r[d]),c),{}),l=a.map(c=>({query:`simple-grid (min-width: ${c})`,styles:s[c]}));return(0,ER.jsx)(Id,{styles:i,container:l,selector:n})}var $R={container:"m_925c2d2c",root:"m_2415a157"};var Jde={cols:1,spacing:"md",type:"media"},Rv=M((e,t)=>{let r=z("SimpleGrid",Jde,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,cols:c,verticalSpacing:d,spacing:u,type:f,...m}=r,p=q({name:"SimpleGrid",classes:$R,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l}),g=jy();return f==="container"?(0,wi.jsxs)(wi.Fragment,{children:[(0,wi.jsx)(fW,{...r,selector:`.${g}`}),(0,wi.jsx)("div",{...p("container"),children:(0,wi.jsx)(F,{ref:t,...p("root",{className:g}),...m})})]}):(0,wi.jsxs)(wi.Fragment,{children:[(0,wi.jsx)(uW,{...r,selector:`.${g}`}),(0,wi.jsx)(F,{ref:t,...p("root",{className:g}),...m})]})});Rv.classes=$R;Rv.displayName="@mantine/core/SimpleGrid";var mW=y(O(),1);var Yrt=y(D(),1);var AR={root:"m_18320242","skeleton-fade":"m_299c329c"};var eue={visible:!0,animate:!0},tue=(e,{width:t,height:r,radius:n,circle:o})=>({root:{"--skeleton-height":Z(r),"--skeleton-width":o?Z(r):Z(t),"--skeleton-radius":o?"1000px":n===void 0?void 0:Ee(n)}}),Pn=M((e,t)=>{let r=z("Skeleton",eue,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,width:c,height:d,circle:u,visible:f,radius:m,animate:p,mod:g,...b}=r,v=q({name:"Skeleton",classes:AR,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:tue});return(0,mW.jsx)(F,{ref:t,...v("root"),mod:[{visible:f,animate:p},g],...b})});Pn.classes=AR;Pn.displayName="@mantine/core/Skeleton";var pW=y(O(),1),lot=y(D(),1);var OR={root:"m_6d731127"};var rue={gap:"md",align:"stretch",justify:"flex-start"},oue=(e,{gap:t,align:r,justify:n})=>({root:{"--stack-gap":At(t),"--stack-align":r,"--stack-justify":n}}),Fe=M((e,t)=>{let r=z("Stack",rue,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,align:c,justify:d,gap:u,variant:f,...m}=r,p=q({name:"Stack",props:r,classes:OR,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:oue});return(0,pW.jsx)(F,{ref:t,...p("root"),variant:f,...m})});Fe.classes=OR;Fe.displayName="@mantine/core/Stack";var lu=y(O(),1);var Rot=y(D(),1);var aw=y(D(),1),hW=(0,aw.createContext)(null),gW=hW.Provider,vW=()=>(0,aw.useContext)(hW);var sw=y(O(),1);var bot=y(D(),1);var nue={},lw=M((e,t)=>{let{value:r,defaultValue:n,onChange:o,size:i,wrapperProps:a,children:s,readOnly:l,...c}=z("SwitchGroup",nue,e),[d,u]=ot({value:r,defaultValue:n,finalValue:[],onChange:o});return(0,sw.jsx)(gW,{value:{value:d,onChange:m=>{let p=m.currentTarget.value;!l&&u(d.includes(p)?d.filter(g=>g!==p):[...d,p])},size:i},children:(0,sw.jsx)(ft.Wrapper,{size:i,ref:t,...a,...c,labelElement:"div",__staticSelector:"SwitchGroup",children:(0,sw.jsx)(Rm,{role:"group",children:s})})})});lw.classes=ft.Wrapper.classes;lw.displayName="@mantine/core/SwitchGroup";var zR={root:"m_5f93f3bb",input:"m_926b4011",track:"m_9307d992",thumb:"m_93039a1d",trackLabel:"m_8277e082"};var iue={labelPosition:"right"},aue=(e,{radius:t,color:r,size:n})=>({root:{"--switch-radius":t===void 0?void 0:Ee(t),"--switch-height":xe(n,"switch-height"),"--switch-width":xe(n,"switch-width"),"--switch-thumb-size":xe(n,"switch-thumb-size"),"--switch-label-font-size":xe(n,"switch-label-font-size"),"--switch-track-label-padding":xe(n,"switch-track-label-padding"),"--switch-color":r?Ue(r,e):void 0}}),Ga=M((e,t)=>{let r=z("Switch",iue,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,color:c,label:d,offLabel:u,onLabel:f,id:m,size:p,radius:g,wrapperProps:b,thumbIcon:v,checked:x,defaultChecked:_,onChange:I,labelPosition:S,description:w,error:P,disabled:$,variant:B,rootRef:W,mod:H,...K}=r,T=vW(),k=p||T?.size,E=q({name:"Switch",props:r,classes:zR,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:aue}),{styleProps:C,rest:A}=Gr(K),R=gt(m),N=T?{checked:T.value.includes(A.value),onChange:T.onChange}:{},[U,G]=ot({value:N.checked??x,defaultValue:_,finalValue:!1});return(0,lu.jsxs)(Jd,{...E("root"),__staticSelector:"Switch",__stylesApiProps:r,id:R,size:k,labelPosition:S,label:d,description:w,error:P,disabled:$,bodyElement:"label",labelElement:"span",classNames:n,styles:a,unstyled:s,"data-checked":N.checked||x||void 0,variant:B,ref:W,mod:H,...C,...b,children:[(0,lu.jsx)("input",{...A,disabled:$,checked:U,"data-checked":N.checked||x||void 0,onChange:re=>{T?N.onChange?.(re):I?.(re),G(re.currentTarget.checked)},id:R,ref:t,type:"checkbox",role:"switch",...E("input")}),(0,lu.jsxs)(F,{"aria-hidden":"true",component:"span",mod:{error:P,"label-position":S,"without-labels":!f&&!u},...E("track"),children:[(0,lu.jsx)(F,{component:"span",mod:"reduce-motion",...E("thumb"),children:v}),(0,lu.jsx)("span",{...E("trackLabel"),children:U?f:u})]})]})});Ga.classes={...zR,...v0};Ga.displayName="@mantine/core/Switch";Ga.Group=lw;var gw=y(O(),1);var gnt=y(D(),1);var yW=y(O(),1),qot=y(D(),1);var Vot=y(D(),1);var Wot=y(O(),1);var[xW,bW]=Zt("Table component was not found in the tree");var yc={table:"m_b23fa0ef",th:"m_4e7aa4f3",tr:"m_4e7aa4fd",td:"m_4e7aa4ef",tbody:"m_b2404537",thead:"m_b242d975",caption:"m_9e5a3ac7",scrollContainer:"m_a100c15",scrollContainerInner:"m_62259741"};function sue(e,t){if(!t)return;let r={};return t.columnBorder&&e.withColumnBorders&&(r["data-with-column-border"]=!0),t.rowBorder&&e.withRowBorders&&(r["data-with-row-border"]=!0),t.striped&&e.striped&&(r["data-striped"]=e.striped),t.highlightOnHover&&e.highlightOnHover&&(r["data-hover"]=!0),t.captionSide&&e.captionSide&&(r["data-side"]=e.captionSide),t.stickyHeader&&e.stickyHeader&&(r["data-sticky"]=!0),r}function cu(e,t){let r=`Table${e.charAt(0).toUpperCase()}${e.slice(1)}`,n=M((o,i)=>{let a=z(r,{},o),{classNames:s,className:l,style:c,styles:d,...u}=a,f=bW();return(0,yW.jsx)(F,{component:e,ref:i,...sue(f,t),...f.getStyles(e,{className:l,classNames:s,style:c,styles:d,props:a}),...u})});return n.displayName=`@mantine/core/${r}`,n.classes=yc,n}var Tv=cu("th",{columnBorder:!0}),cw=cu("td",{columnBorder:!0}),Wm=cu("tr",{rowBorder:!0,striped:!0,highlightOnHover:!0}),dw=cu("thead",{stickyHeader:!0}),uw=cu("tbody"),fw=cu("tfoot"),mw=cu("caption",{captionSide:!0});var Yo=y(O(),1);function pw({data:e}){return(0,Yo.jsxs)(Yo.Fragment,{children:[e.caption&&(0,Yo.jsx)(mw,{children:e.caption}),e.head&&(0,Yo.jsx)(dw,{children:(0,Yo.jsx)(Wm,{children:e.head.map((t,r)=>(0,Yo.jsx)(Tv,{children:t},r))})}),e.body&&(0,Yo.jsx)(uw,{children:e.body.map((t,r)=>(0,Yo.jsx)(Wm,{children:t.map((n,o)=>(0,Yo.jsx)(cw,{children:n},o))},r))}),e.foot&&(0,Yo.jsx)(fw,{children:(0,Yo.jsx)(Wm,{children:e.foot.map((t,r)=>(0,Yo.jsx)(Tv,{children:t},r))})})]})}pw.displayName="@mantine/core/TableDataRenderer";var NR=y(O(),1);var ant=y(D(),1);var lue={type:"scrollarea"},cue=(e,{minWidth:t,maxHeight:r,type:n})=>({scrollContainer:{"--table-min-width":Z(t),"--table-max-height":Z(r),"--table-overflow":n==="native"?"auto":void 0}}),hw=M((e,t)=>{let r=z("TableScrollContainer",lue,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,children:c,minWidth:d,maxHeight:u,type:f,scrollAreaProps:m,...p}=r,g=q({name:"TableScrollContainer",classes:yc,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:cue,rootSelector:"scrollContainer"});return(0,NR.jsx)(F,{component:f==="scrollarea"?zr:"div",...f==="scrollarea"?u?{offsetScrollbars:"xy",...m}:{offsetScrollbars:"x",...m}:{},ref:t,...g("scrollContainer"),...p,children:(0,NR.jsx)("div",{...g("scrollContainerInner"),children:c})})});hw.classes=yc;hw.displayName="@mantine/core/TableScrollContainer";var due={withRowBorders:!0,verticalSpacing:7},uue=(e,{layout:t,captionSide:r,horizontalSpacing:n,verticalSpacing:o,borderColor:i,stripedColor:a,highlightOnHoverColor:s,striped:l,highlightOnHover:c,stickyHeaderOffset:d,stickyHeader:u})=>({table:{"--table-layout":t,"--table-caption-side":r,"--table-horizontal-spacing":At(n),"--table-vertical-spacing":At(o),"--table-border-color":i?Ue(i,e):void 0,"--table-striped-color":l&&a?Ue(a,e):void 0,"--table-highlight-on-hover-color":c&&s?Ue(s,e):void 0,"--table-sticky-header-offset":u?Z(d):void 0}}),ur=M((e,t)=>{let r=z("Table",due,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,horizontalSpacing:c,verticalSpacing:d,captionSide:u,stripedColor:f,highlightOnHoverColor:m,striped:p,highlightOnHover:g,withColumnBorders:b,withRowBorders:v,withTableBorder:x,borderColor:_,layout:I,variant:S,data:w,children:P,stickyHeader:$,stickyHeaderOffset:B,mod:W,tabularNums:H,...K}=r,T=q({name:"Table",props:r,className:o,style:i,classes:yc,classNames:n,styles:a,unstyled:s,rootSelector:"table",vars:l,varsResolver:uue});return(0,gw.jsx)(xW,{value:{getStyles:T,stickyHeader:$,striped:p===!0?"odd":p||void 0,highlightOnHover:g,withColumnBorders:b,withRowBorders:v,captionSide:u||"bottom"},children:(0,gw.jsx)(F,{component:"table",variant:S,ref:t,mod:[{"data-with-table-border":x,"data-tabular-nums":H},W],...T("table"),...K,children:P||!!w&&(0,gw.jsx)(pw,{data:w})})})});ur.classes=yc;ur.displayName="@mantine/core/Table";ur.Td=cw;ur.Th=Tv;ur.Tr=Wm;ur.Thead=dw;ur.Tbody=uw;ur.Tfoot=fw;ur.Caption=mw;ur.ScrollContainer=hw;ur.DataRenderer=pw;var Jo=y(O(),1),vw=y(D(),1);var Tnt=y(O(),1);var $nt=y(D(),1);function _W({data:e,value:t}){let r=t.map(o=>o.trim().toLowerCase());return e.reduce((o,i)=>(yi(i)?o.push({group:i.group,items:i.items.filter(a=>r.indexOf(a.label.toLowerCase().trim())===-1)}):r.indexOf(i.label.toLowerCase().trim())===-1&&o.push(i),o),[])}function fue(e,t){return e?t.split(new RegExp(`[${e.join("")}]`)).map(r=>r.trim()).filter(r=>r!==""):[t]}function FR({splitChars:e,allowDuplicates:t,maxTags:r,value:n,currentTags:o}){let i=fue(e,n),a=t?[...o,...i]:[...new Set([...o,...i])];return r?a.slice(0,r):a}var mue={maxTags:1/0,allowDuplicates:!1,acceptValueOnBlur:!0,splitChars:[","],hiddenInputValuesDivider:","},_c=M((e,t)=>{let r=z("TagsInput",mue,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,size:c,value:d,defaultValue:u,onChange:f,onKeyDown:m,maxTags:p,allowDuplicates:g,onDuplicate:b,variant:v,data:x,dropdownOpened:_,defaultDropdownOpened:I,onDropdownOpen:S,onDropdownClose:w,selectFirstOptionOnChange:P,onOptionSubmit:$,comboboxProps:B,filter:W,limit:H,withScrollArea:K,maxDropdownHeight:T,searchValue:k,defaultSearchValue:E,onSearchChange:C,readOnly:A,disabled:R,splitChars:N,onFocus:U,onBlur:G,onPaste:re,radius:ve,rightSection:he,rightSectionWidth:Q,rightSectionPointerEvents:ne,rightSectionProps:we,leftSection:se,leftSectionWidth:Ae,leftSectionPointerEvents:We,leftSectionProps:et,inputContainer:ct,inputWrapperOrder:Ne,withAsterisk:Yt,required:Jt,labelProps:co,descriptionProps:ge,errorProps:me,wrapperProps:ke,description:Oe,label:Ye,error:Me,withErrorStyles:tt,name:fe,form:Te,id:yr,clearable:hn,clearButtonProps:Mo,hiddenInputProps:Ht,hiddenInputValuesDivider:Pr,mod:bs,renderOption:df,onRemove:uf,onClear:ff,scrollAreaProps:Dr,acceptValueOnBlur:kl,...Cl}=r,Ch=gt(yr),Ph=Pm(x),Dh=Yd(Ph),mf=(0,vw.useRef)(null),Pl=Ze(mf,t),ar=dc({opened:_,defaultOpened:I,onDropdownOpen:S,onDropdownClose:()=>{w?.(),ar.resetSelectedOption()}}),{styleProps:e2,rest:{type:Cre,autoComplete:t2,...r2}}=Gr(Cl),[dt,Fn]=ot({value:d,defaultValue:u,finalValue:[],onChange:f}),[oi,o2]=ot({value:k,defaultValue:E,finalValue:"",onChange:C}),ji=Ce=>{o2(Ce),ar.resetSelectedOption()},sd=q({name:"TagsInput",classes:{},props:r,classNames:n,styles:a,unstyled:s}),{resolvedClassNames:Rh,resolvedStyles:Th}=Zr({props:r,styles:a,classNames:n}),sy=Ce=>{let Bo=dt.some(ba=>ba.toLowerCase()===Ce.toLowerCase());Bo&&b?.(Ce),(!Bo||Bo&&g)&&dt.length<p&&($?.(Ce),ji(""),Ce.length>0&&Fn([...dt,Ce]))},n2=Ce=>{if(m?.(Ce),Ce.isPropagationStopped())return;let Bo=oi.trim(),{length:ba}=Bo;if(N.includes(Ce.key)&&ba>0&&(Fn(FR({splitChars:N,allowDuplicates:g,maxTags:p,value:oi,currentTags:dt})),ji(""),Ce.preventDefault()),Ce.key==="Enter"&&ba>0&&!Ce.nativeEvent.isComposing){if(Ce.preventDefault(),!!document.querySelector(`#${ar.listId} [data-combobox-option][data-combobox-selected]`))return;sy(Bo)}Ce.key==="Backspace"&&ba===0&&dt.length>0&&!Ce.nativeEvent.isComposing&&(uf?.(dt[dt.length-1]),Fn(dt.slice(0,dt.length-1)))},ly=Ce=>{if(re?.(Ce),Ce.preventDefault(),Ce.clipboardData){let Bo=Ce.clipboardData.getData("text/plain");Fn(FR({splitChars:N,allowDuplicates:g,maxTags:p,value:`${oi}${Bo}`,currentTags:dt})),ji("")}},i2=dt.map((Ce,Bo)=>(0,Jo.jsx)(Ws,{withRemoveButton:!A,onRemove:()=>{let ba=dt.slice();ba.splice(Bo,1),Fn(ba),uf?.(Ce)},unstyled:s,disabled:R,...sd("pill"),children:Ce},`${Ce}-${Bo}`));(0,vw.useEffect)(()=>{P&&ar.selectFirstOption()},[P,dt,oi]);let cy=(0,Jo.jsx)(Ve.ClearButton,{...Mo,onClear:()=>{Fn([]),ji(""),mf.current?.focus(),ar.openDropdown(),ff?.()}});return(0,Jo.jsxs)(Jo.Fragment,{children:[(0,Jo.jsxs)(Ve,{store:ar,classNames:Rh,styles:Th,unstyled:s,size:c,readOnly:A,__staticSelector:"TagsInput",onOptionSubmit:Ce=>{$?.(Ce),ji(""),dt.length<p&&Fn([...dt,Dh[Ce].label]),ar.resetSelectedOption()},...B,children:[(0,Jo.jsx)(Ve.DropdownTarget,{children:(0,Jo.jsx)(fc,{...e2,__staticSelector:"TagsInput",classNames:Rh,styles:Th,unstyled:s,size:c,className:o,style:i,variant:v,disabled:R,radius:ve,rightSection:he,__clearSection:cy,__clearable:hn&&dt.length>0&&!R&&!A,rightSectionWidth:Q,rightSectionPointerEvents:ne,rightSectionProps:we,leftSection:se,leftSectionWidth:Ae,leftSectionPointerEvents:We,leftSectionProps:et,inputContainer:ct,inputWrapperOrder:Ne,withAsterisk:Yt,required:Jt,labelProps:co,descriptionProps:ge,errorProps:me,wrapperProps:ke,description:Oe,label:Ye,error:Me,withErrorStyles:tt,__stylesApiProps:{...r,multiline:!0},id:Ch,mod:bs,children:(0,Jo.jsxs)(Ws.Group,{disabled:R,unstyled:s,...sd("pillsList"),children:[i2,(0,Jo.jsx)(Ve.EventsTarget,{autoComplete:t2,children:(0,Jo.jsx)(fc.Field,{...r2,ref:Pl,...sd("inputField"),unstyled:s,onKeyDown:n2,onFocus:Ce=>{U?.(Ce),ar.openDropdown()},onBlur:Ce=>{G?.(Ce),kl&&sy(oi),ar.closeDropdown()},onPaste:ly,value:oi,onChange:Ce=>ji(Ce.currentTarget.value),required:Jt&&dt.length===0,disabled:R,readOnly:A,id:Ch})})]})})}),(0,Jo.jsx)($m,{data:_W({data:Ph,value:dt}),hidden:A||R,filter:W,search:oi,limit:H,hiddenWhenEmpty:!0,withScrollArea:K,maxDropdownHeight:T,unstyled:s,labelId:Ye?`${Ch}-label`:void 0,"aria-label":Ye?void 0:Cl["aria-label"],renderOption:df,scrollAreaProps:Dr})]}),(0,Jo.jsx)(Ve.HiddenInput,{name:fe,form:Te,value:dt,valuesDivider:Pr,disabled:R,...Ht})]})});_c.classes={...tr.classes,...Ve.classes};_c.displayName="@mantine/core/TagsInput";var IW=y(O(),1),eit=y(D(),1);var pue={},Pt=M((e,t)=>{let r=z("TextInput",pue,e);return(0,IW.jsx)(tr,{component:"input",ref:t,...r,__staticSelector:"TextInput"})});Pt.classes=tr.classes;Pt.displayName="@mantine/core/TextInput";var wW=y(O(),1),sit=y(D(),1);var LR={root:"m_7341320d"};var hue={},gue=(e,{size:t,radius:r,variant:n,gradient:o,color:i,autoContrast:a})=>{let s=e.variantColorResolver({color:i||e.primaryColor,theme:e,gradient:o,variant:n||"filled",autoContrast:a});return{root:{"--ti-size":xe(t,"ti-size"),"--ti-radius":r===void 0?void 0:Ee(r),"--ti-bg":i||n?s.background:void 0,"--ti-color":i||n?s.color:void 0,"--ti-bd":i||n?s.border:void 0}}},Ic=M((e,t)=>{let r=z("ThemeIcon",hue,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,autoContrast:c,...d}=r,u=q({name:"ThemeIcon",classes:LR,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:gue});return(0,wW.jsx)(F,{ref:t,...u("root"),...d})});Ic.classes=LR;Ic.displayName="@mantine/core/ThemeIcon";var kW=y(O(),1),Iit=y(D(),1);var vit=y(D(),1),xit=y(O(),1);var vue=["h1","h2","h3","h4","h5","h6"],xue=["xs","sm","md","lg","xl"];function SW(e,t){let r=t!==void 0?t:`h${e}`;return vue.includes(r)?{fontSize:`var(--mantine-${r}-font-size)`,fontWeight:`var(--mantine-${r}-font-weight)`,lineHeight:`var(--mantine-${r}-line-height)`}:xue.includes(r)?{fontSize:`var(--mantine-font-size-${r})`,fontWeight:`var(--mantine-h${e}-font-weight)`,lineHeight:`var(--mantine-h${e}-line-height)`}:{fontSize:Z(r),fontWeight:`var(--mantine-h${e}-font-weight)`,lineHeight:`var(--mantine-h${e}-line-height)`}}var MR={root:"m_8a5d1357"};var bue={order:1},yue=(e,{order:t,size:r,lineClamp:n,textWrap:o})=>{let i=SW(t,r);return{root:{"--title-fw":i.fontWeight,"--title-lh":i.lineHeight,"--title-fz":i.fontSize,"--title-line-clamp":typeof n=="number"?n.toString():void 0,"--title-text-wrap":o}}},Kn=M((e,t)=>{let r=z("Title",bue,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,order:l,vars:c,size:d,variant:u,lineClamp:f,textWrap:m,mod:p,...g}=r,b=q({name:"Title",props:r,classes:MR,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:c,varsResolver:yue});return[1,2,3,4,5,6].includes(l)?(0,kW.jsx)(F,{...b("root"),component:`h${l}`,variant:u,ref:t,mod:[{order:l,"data-line-clamp":typeof f=="number"},p],size:d,...g}):null});Kn.classes=MR;Kn.displayName="@mantine/core/Title";var Zm=y(O(),1),Si=y(D(),1);var Xs=y(O(),1);var PW=y(D(),1);var CW=y(D(),1),Ev=(0,CW.createContext)(null);Ev.displayName="@mantine/modals/ModalsContext";function DW(){let e=(0,PW.useContext)(Ev);if(!e)throw new Error("[@mantine/modals] useModals hook was called outside of context, wrap your app with ModalsProvider component");return e}function RW({id:e,cancelProps:t,confirmProps:r,labels:n={cancel:"",confirm:""},closeOnConfirm:o=!0,closeOnCancel:i=!0,groupProps:a,onCancel:s,onConfirm:l,children:c}){let{cancel:d,confirm:u}=n,f=DW(),m=g=>{typeof t?.onClick=="function"&&t?.onClick(g),typeof s=="function"&&s(),i&&f.closeModal(e)},p=g=>{typeof r?.onClick=="function"&&r?.onClick(g),typeof l=="function"&&l(),o&&f.closeModal(e)};return(0,Xs.jsxs)(Xs.Fragment,{children:[c&&(0,Xs.jsx)(F,{mb:"md",children:c}),(0,Xs.jsxs)(Se,{mt:c?0:"md",justify:"flex-end",...a,children:[(0,Xs.jsx)(st,{variant:"default",...t,onClick:m,children:t?.children||d}),(0,Xs.jsx)(st,{...r,onClick:p,children:r?.children||u})]})]})}var[TW,du]=B2("mantine-modals"),EW=e=>{let t=e.modalId||Po();return du("openModal")({...e,modalId:t}),t},$W=e=>{let t=e.modalId||Po();return du("openConfirmModal")({...e,modalId:t}),t},AW=e=>{let t=e.modalId||Po();return du("openContextModal")({...e,modalId:t}),t},OW=du("closeModal"),zW=du("closeAllModals"),NW=e=>du("updateModal")(e),FW=e=>du("updateContextModal")(e),Ka={open:EW,close:OW,closeAll:zW,openConfirmModal:$W,openContextModal:AW,updateModal:NW,updateContextModal:FW};function LW(e,t){t&&e.type==="confirm"&&e.props.onCancel?.(),e.props.onClose?.()}function MW(e,t){switch(t.type){case"OPEN":return{current:t.modal,modals:[...e.modals,t.modal]};case"CLOSE":{let r=e.modals.find(o=>o.id===t.modalId);if(!r)return e;LW(r,t.canceled);let n=e.modals.filter(o=>o.id!==t.modalId);return{current:n[n.length-1]||e.current,modals:n}}case"CLOSE_ALL":return e.modals.length?(e.modals.concat().reverse().forEach(r=>{LW(r,t.canceled)}),{current:e.current,modals:[]}):e;case"UPDATE":{let{modalId:r,newProps:n}=t,o=e.modals.map(a=>a.id!==r?a:a.type==="content"||a.type==="confirm"?{...a,props:{...a.props,...n}}:a.type==="context"?{...a,props:{...a.props,...n,innerProps:{...a.props.innerProps,...n.innerProps}}}:a),i=e.current?.id===r&&o.find(a=>a.id===r)||e.current;return{...e,modals:o,current:i}}default:return e}}function _ue(e){if(!e)return{confirmProps:{},modalProps:{}};let{id:t,children:r,onCancel:n,onConfirm:o,closeOnConfirm:i,closeOnCancel:a,cancelProps:s,confirmProps:l,groupProps:c,labels:d,...u}=e;return{confirmProps:{id:t,children:r,onCancel:n,onConfirm:o,closeOnConfirm:i,closeOnCancel:a,cancelProps:s,confirmProps:l,groupProps:c,labels:d},modalProps:{id:t,...u}}}function BR({children:e,modalProps:t,labels:r,modals:n}){let[o,i]=(0,Si.useReducer)(MW,{modals:[],current:null}),a=(0,Si.useRef)(o);a.current=o;let s=(0,Si.useCallback)(x=>{i({type:"CLOSE_ALL",canceled:x})},[a,i]),l=(0,Si.useCallback)(({modalId:x,..._})=>{let I=x||Po();return i({type:"OPEN",modal:{id:I,type:"content",props:_}}),I},[i]),c=(0,Si.useCallback)(({modalId:x,..._})=>{let I=x||Po();return i({type:"OPEN",modal:{id:I,type:"confirm",props:_}}),I},[i]),d=(0,Si.useCallback)((x,{modalId:_,...I})=>{let S=_||Po();return i({type:"OPEN",modal:{id:S,type:"context",props:I,ctx:x}}),S},[i]),u=(0,Si.useCallback)((x,_)=>{i({type:"CLOSE",modalId:x,canceled:_})},[a,i]),f=(0,Si.useCallback)(({modalId:x,..._})=>{i({type:"UPDATE",modalId:x,newProps:_})},[i]),m=(0,Si.useCallback)(({modalId:x,..._})=>{i({type:"UPDATE",modalId:x,newProps:_})},[i]);TW({openModal:l,openConfirmModal:c,openContextModal:({modal:x,..._})=>d(x,_),closeModal:u,closeContextModal:u,closeAllModals:s,updateModal:f,updateContextModal:m});let p={modalProps:t||{},modals:o.modals,openModal:l,openConfirmModal:c,openContextModal:d,closeModal:u,closeContextModal:u,closeAll:s,updateModal:f,updateContextModal:m},g=()=>{let x=a.current.current;switch(x?.type){case"context":{let{innerProps:_,...I}=x.props,S=n[x.ctx];return{modalProps:I,content:(0,Zm.jsx)(S,{innerProps:_,context:p,id:x.id})}}case"confirm":{let{modalProps:_,confirmProps:I}=_ue(x.props);return{modalProps:_,content:(0,Zm.jsx)(RW,{...I,id:x.id,labels:x.props.labels||r})}}case"content":{let{children:_,...I}=x.props;return{modalProps:I,content:_}}default:return{modalProps:{},content:null}}},{modalProps:b,content:v}=g();return(0,Zm.jsxs)(Ev.Provider,{value:p,children:[(0,Zm.jsx)(vo,{zIndex:Rt("modal")+1,...t,...b,opened:o.modals.length>0,onClose:()=>u(o.current?.id),children:v}),e]})}var BW=y(D(),1);function $v(e){let t=e,r=!1,n=new Set;return{getState(){return t},updateState(o){t=typeof o=="function"?o(t):o},setState(o){this.updateState(o),n.forEach(i=>i(t))},initialize(o){r||(t=o,r=!0)},subscribe(o){return n.add(o),()=>n.delete(o)}}}function Av(e){return(0,BW.useSyncExternalStore)(e.subscribe,()=>e.getState(),()=>e.getState())}function Iue(e,t,r){let n=[],o=[],i={};for(let a of e){let s=a.position||t;i[s]=i[s]||0,i[s]+=1,i[s]<=r?o.push(a):n.push(a)}return{notifications:o,queue:n}}var jW=()=>$v({notifications:[],queue:[],defaultPosition:"bottom-right",limit:5}),Qs=jW(),jR=(e=Qs)=>Av(e);function uu(e,t){let r=e.getState(),n=t([...r.notifications,...r.queue]),o=Iue(n,r.defaultPosition,r.limit);e.setState({notifications:o.notifications,queue:o.queue,limit:r.limit,defaultPosition:r.defaultPosition})}function UW(e,t=Qs){let r=e.id||Po();return uu(t,n=>e.id&&n.some(o=>o.id===e.id)?n:[...n,{...e,id:r}]),r}function xw(e,t=Qs){return uu(t,r=>r.filter(n=>n.id===e?(n.onClose?.(n),!1):!0)),e}function VW(e,t=Qs){return uu(t,r=>r.map(n=>n.id===e.id?{...n,...e}:n)),e.id}function HW(e=Qs){uu(e,()=>[])}function WW(e=Qs){uu(e,t=>t.slice(0,e.getState().limit))}var en={show:UW,hide:xw,update:VW,clean:HW,cleanQueue:WW,updateState:uu};var xo=y(O(),1),Lv=y(D(),1);function bw(e,t){return bw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},bw(e,t)}function yw(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,bw(e,t)}var Ov=y(D()),zv=y(tc());var UR={disabled:!1};var ZW=y(D()),Gm=ZW.default.createContext(null);var GW=function(t){return t.scrollTop};var Nv="unmounted",fu="exited",mu="entering",qm="entered",VR="exiting",Ys=(function(e){yw(t,e);function t(n,o){var i;i=e.call(this,n,o)||this;var a=o,s=a&&!a.isMounting?n.enter:n.appear,l;return i.appearStatus=null,n.in?s?(l=fu,i.appearStatus=mu):l=qm:n.unmountOnExit||n.mountOnEnter?l=Nv:l=fu,i.state={status:l},i.nextCallback=null,i}t.getDerivedStateFromProps=function(o,i){var a=o.in;return a&&i.status===Nv?{status:fu}:null};var r=t.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(o){var i=null;if(o!==this.props){var a=this.state.status;this.props.in?a!==mu&&a!==qm&&(i=mu):(a===mu||a===qm)&&(i=VR)}this.updateStatus(!1,i)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var o=this.props.timeout,i,a,s;return i=a=s=o,o!=null&&typeof o!="number"&&(i=o.exit,a=o.enter,s=o.appear!==void 0?o.appear:a),{exit:i,enter:a,appear:s}},r.updateStatus=function(o,i){if(o===void 0&&(o=!1),i!==null)if(this.cancelNextCallback(),i===mu){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:zv.default.findDOMNode(this);a&&GW(a)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===fu&&this.setState({status:Nv})},r.performEnter=function(o){var i=this,a=this.props.enter,s=this.context?this.context.isMounting:o,l=this.props.nodeRef?[s]:[zv.default.findDOMNode(this),s],c=l[0],d=l[1],u=this.getTimeouts(),f=s?u.appear:u.enter;if(!o&&!a||UR.disabled){this.safeSetState({status:qm},function(){i.props.onEntered(c)});return}this.props.onEnter(c,d),this.safeSetState({status:mu},function(){i.props.onEntering(c,d),i.onTransitionEnd(f,function(){i.safeSetState({status:qm},function(){i.props.onEntered(c,d)})})})},r.performExit=function(){var o=this,i=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:zv.default.findDOMNode(this);if(!i||UR.disabled){this.safeSetState({status:fu},function(){o.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:VR},function(){o.props.onExiting(s),o.onTransitionEnd(a.exit,function(){o.safeSetState({status:fu},function(){o.props.onExited(s)})})})},r.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(o,i){i=this.setNextCallback(i),this.setState(o,i)},r.setNextCallback=function(o){var i=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,i.nextCallback=null,o(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},r.onTransitionEnd=function(o,i){this.setNextCallback(i);var a=this.props.nodeRef?this.props.nodeRef.current:zv.default.findDOMNode(this),s=o==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],c=l[0],d=l[1];this.props.addEndListener(c,d)}o!=null&&setTimeout(this.nextCallback,o)},r.render=function(){var o=this.state.status;if(o===Nv)return null;var i=this.props,a=i.children,s=i.in,l=i.mountOnEnter,c=i.unmountOnExit,d=i.appear,u=i.enter,f=i.exit,m=i.timeout,p=i.addEndListener,g=i.onEnter,b=i.onEntering,v=i.onEntered,x=i.onExit,_=i.onExiting,I=i.onExited,S=i.nodeRef,w=Nm(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return Ov.default.createElement(Gm.Provider,{value:null},typeof a=="function"?a(o,w):Ov.default.cloneElement(Ov.default.Children.only(a),w))},t})(Ov.default.Component);Ys.contextType=Gm;Ys.propTypes={};function Km(){}Ys.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Km,onEntering:Km,onEntered:Km,onExit:Km,onExiting:Km,onExited:Km};Ys.UNMOUNTED=Nv;Ys.EXITED=fu;Ys.ENTERING=mu;Ys.ENTERED=qm;Ys.EXITING=VR;var HR=Ys;function KW(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var Fv=y(D());var ki=y(D());function _w(e,t){var r=function(i){return t&&(0,ki.isValidElement)(i)?t(i):i},n=Object.create(null);return e&&ki.Children.map(e,function(o){return o}).forEach(function(o){n[o.key]=r(o)}),n}function wue(e,t){e=e||{},t=t||{};function r(d){return d in t?t[d]:e[d]}var n=Object.create(null),o=[];for(var i in e)i in t?o.length&&(n[i]=o,o=[]):o.push(i);var a,s={};for(var l in t){if(n[l])for(a=0;a<n[l].length;a++){var c=n[l][a];s[n[l][a]]=r(c)}s[l]=r(l)}for(a=0;a<o.length;a++)s[o[a]]=r(o[a]);return s}function pu(e,t,r){return r[t]!=null?r[t]:e.props[t]}function qW(e,t){return _w(e.children,function(r){return(0,ki.cloneElement)(r,{onExited:t.bind(null,r),in:!0,appear:pu(r,"appear",e),enter:pu(r,"enter",e),exit:pu(r,"exit",e)})})}function XW(e,t,r){var n=_w(e.children),o=wue(t,n);return Object.keys(o).forEach(function(i){var a=o[i];if((0,ki.isValidElement)(a)){var s=i in t,l=i in n,c=t[i],d=(0,ki.isValidElement)(c)&&!c.props.in;l&&(!s||d)?o[i]=(0,ki.cloneElement)(a,{onExited:r.bind(null,a),in:!0,exit:pu(a,"exit",e),enter:pu(a,"enter",e)}):!l&&s&&!d?o[i]=(0,ki.cloneElement)(a,{in:!1}):l&&s&&(0,ki.isValidElement)(c)&&(o[i]=(0,ki.cloneElement)(a,{onExited:r.bind(null,a),in:c.props.in,exit:pu(a,"exit",e),enter:pu(a,"enter",e)}))}}),o}var Sue=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},kue={component:"div",childFactory:function(t){return t}},WR=(function(e){yw(t,e);function t(n,o){var i;i=e.call(this,n,o)||this;var a=i.handleExited.bind(KW(i));return i.state={contextValue:{isMounting:!0},handleExited:a,firstRender:!0},i}var r=t.prototype;return r.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},r.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(o,i){var a=i.children,s=i.handleExited,l=i.firstRender;return{children:l?qW(o,s):XW(o,a,s),firstRender:!1}},r.handleExited=function(o,i){var a=_w(this.props.children);o.key in a||(o.props.onExited&&o.props.onExited(i),this.mounted&&this.setState(function(s){var l=zm({},s.children);return delete l[o.key],{children:l}}))},r.render=function(){var o=this.props,i=o.component,a=o.childFactory,s=Nm(o,["component","childFactory"]),l=this.state.contextValue,c=Sue(this.state.children).map(a);return delete s.appear,delete s.enter,delete s.exit,i===null?Fv.default.createElement(Gm.Provider,{value:l},c):Fv.default.createElement(Gm.Provider,{value:l},Fv.default.createElement(i,s,c))},t})(Fv.default.Component);WR.propTypes={};WR.defaultProps=kue;var wc=WR;var ZR=["bottom-center","bottom-left","bottom-right","top-center","top-left","top-right"];function QW(e,t){return e.reduce((r,n)=>(r[n.position||t].push(n),r),ZR.reduce((r,n)=>(r[n]=[],r),{}))}var YW={left:"translateX(-100%)",right:"translateX(100%)","top-center":"translateY(-100%)","bottom-center":"translateY(100%)"},Cue={left:"translateX(0)",right:"translateX(0)","top-center":"translateY(0)","bottom-center":"translateY(0)"};function JW({state:e,maxHeight:t,position:r,transitionDuration:n}){let[o,i]=r.split("-"),a=i==="center"?`${o}-center`:i,s={opacity:0,maxHeight:t,transform:YW[a],transitionDuration:`${n}ms, ${n}ms, ${n}ms`,transitionTimingFunction:"cubic-bezier(.51,.3,0,1.21), cubic-bezier(.51,.3,0,1.21), linear",transitionProperty:"opacity, transform, max-height"},l={opacity:1,transform:Cue[a]},c={opacity:0,maxHeight:0,transform:YW[a]};return{...s,...{entering:l,entered:l,exiting:c,exited:c}[e]}}var tZ=y(O(),1),hu=y(D(),1);function eZ(e,t){return typeof t=="number"?t:t===!1||e===!1?!1:e}var GR=(0,hu.forwardRef)(({data:e,onHide:t,autoClose:r,...n},o)=>{let{autoClose:i,message:a,...s}=e,l=eZ(r,e.autoClose),c=(0,hu.useRef)(-1),d=()=>window.clearTimeout(c.current),u=()=>{t(e.id),d()},f=()=>{typeof l=="number"&&(c.current=window.setTimeout(u,l))};return(0,hu.useEffect)(()=>{e.onOpen?.(e)},[]),(0,hu.useEffect)(()=>(f(),d),[l]),(0,tZ.jsx)(ru,{...n,...s,onClose:u,ref:o,onMouseEnter:d,onMouseLeave:f,children:a})});GR.displayName="@mantine/notifications/NotificationContainer";var KR={root:"m_b37d9ac7",notification:"m_5ed0edd0"};var Pue=HR,Due={position:"bottom-right",autoClose:4e3,transitionDuration:250,containerWidth:440,notificationMaxHeight:200,limit:5,zIndex:Rt("overlay"),store:Qs,withinPortal:!0},Rue=(e,{zIndex:t,containerWidth:r})=>({root:{"--notifications-z-index":t?.toString(),"--notifications-container-width":Z(r)}}),ca=M((e,t)=>{let r=z("Notifications",Due,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,position:c,autoClose:d,transitionDuration:u,containerWidth:f,notificationMaxHeight:m,limit:p,zIndex:g,store:b,portalProps:v,withinPortal:x,..._}=r,I=ut(),S=jR(b),w=E2(),P=Ss(),$=(0,Lv.useRef)({}),B=(0,Lv.useRef)(0),H=(I.respectReducedMotion?P:!1)?1:u,K=q({name:"Notifications",classes:KR,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:Rue});(0,Lv.useEffect)(()=>{b?.updateState(E=>({...E,limit:p||5,defaultPosition:c}))},[p,c]),_r(()=>{S.notifications.length>B.current&&setTimeout(()=>w(),0),B.current=S.notifications.length},[S.notifications]);let T=QW(S.notifications,c),k=ZR.reduce((E,C)=>(E[C]=T[C].map(({style:A,...R})=>(0,xo.jsx)(Pue,{timeout:H,onEnter:()=>$.current[R.id].offsetHeight,nodeRef:{current:$.current[R.id]},children:N=>(0,xo.jsx)(GR,{ref:U=>{$.current[R.id]=U},data:R,onHide:U=>xw(U,b),autoClose:d,...K("notification",{style:{...JW({state:N,position:C,transitionDuration:H,maxHeight:m}),...A}})})},R.id)),E),{});return(0,xo.jsxs)(Sn,{withinPortal:x,...v,children:[(0,xo.jsx)(F,{...K("root"),"data-position":"top-center",ref:t,..._,children:(0,xo.jsx)(wc,{children:k["top-center"]})}),(0,xo.jsx)(F,{...K("root"),"data-position":"top-left",..._,children:(0,xo.jsx)(wc,{children:k["top-left"]})}),(0,xo.jsx)(F,{...K("root",{className:Ui.classNames.fullWidth}),"data-position":"top-right",..._,children:(0,xo.jsx)(wc,{children:k["top-right"]})}),(0,xo.jsx)(F,{...K("root",{className:Ui.classNames.fullWidth}),"data-position":"bottom-right",..._,children:(0,xo.jsx)(wc,{children:k["bottom-right"]})}),(0,xo.jsx)(F,{...K("root"),"data-position":"bottom-left",..._,children:(0,xo.jsx)(wc,{children:k["bottom-left"]})}),(0,xo.jsx)(F,{...K("root"),"data-position":"bottom-center",..._,children:(0,xo.jsx)(wc,{children:k["bottom-center"]})})]})});ca.classes=KR;ca.displayName="@mantine/notifications/Notifications";ca.show=en.show;ca.hide=en.hide;ca.update=en.update;ca.clean=en.clean;ca.cleanQueue=en.cleanQueue;ca.updateState=en.updateState;var Xm=y(D(),1),rZ=y(O(),1),qR=Xm.createContext(void 0),Qm=e=>{let t=Xm.useContext(qR);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},XR=({client:e,children:t})=>(Xm.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,rZ.jsx)(qR.Provider,{value:e,children:t}));var Tue={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Sc,QR,oZ,Eue=(oZ=class{constructor(){Re(this,Sc,Tue);Re(this,QR,!1)}setTimeoutProvider(e){pe(this,Sc,e)}setTimeout(e,t){return L(this,Sc).setTimeout(e,t)}clearTimeout(e){L(this,Sc).clearTimeout(e)}setInterval(e,t){return L(this,Sc).setInterval(e,t)}clearInterval(e){L(this,Sc).clearInterval(e)}},Sc=new WeakMap,QR=new WeakMap,oZ),qa=new Eue;function nZ(e){setTimeout(e,0)}var JR=typeof window>"u"||"Deno"in globalThis;function Sr(){}function sZ(e,t){return typeof e=="function"?e(t):e}function Iw(e){return typeof e=="number"&&e>=0&&e!==1/0}function ww(e,t){return Math.max(e+(t||0)-Date.now(),0)}function zt(e,t){return typeof e=="function"?e(t):e}function Sw(e,t){let{type:r="all",exact:n,fetchStatus:o,predicate:i,queryKey:a,stale:s}=e;if(a){if(n){if(t.queryHash!==Mv(a,t.options))return!1}else if(!kc(t.queryKey,a))return!1}if(r!=="all"){let l=t.isActive();if(r==="active"&&!l||r==="inactive"&&l)return!1}return!(typeof s=="boolean"&&t.isStale()!==s||o&&o!==t.state.fetchStatus||i&&!i(t))}function kw(e,t){let{exact:r,status:n,predicate:o,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(r){if(gu(t.options.mutationKey)!==gu(i))return!1}else if(!kc(t.options.mutationKey,i))return!1}return!(n&&t.state.status!==n||o&&!o(t))}function Mv(e,t){return(t?.queryKeyHashFn||gu)(e)}function gu(e){return JSON.stringify(e,(t,r)=>YR(r)?Object.keys(r).sort().reduce((n,o)=>(n[o]=r[o],n),{}):r)}function kc(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(Array.isArray(e)&&Array.isArray(t)){if(t.length>e.length)return!1;for(let n=0;n<t.length;n++)if(!kc(e[n],t[n]))return!1;return!0}let r=Object.keys(t);for(let n of r)if(!kc(e[n],t[n]))return!1;return!0}return!1}var $ue=Object.prototype.hasOwnProperty;function eT(e,t,r=0){if(e===t)return e;if(r>500)return t;let n=iZ(e)&&iZ(t);if(!n&&!(YR(e)&&YR(t)))return t;let o=(n?e:Object.keys(e)).length,i=n?t:Object.keys(t),a=i.length,s=n?new Array(a):{},l=0;for(let c=0;c<a;c++){let d=n?c:i[c],u=e[d],f=t[d];if(u===f){s[d]=u,(n?c<o:$ue.call(e,d))&&l++;continue}if(u===null||f===null||typeof u!="object"||typeof f!="object"){s[d]=f;continue}let m=eT(u,f,r+1);s[d]=m,m===u&&l++}return o===a&&l===o?e:s}function Cw(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let r in e)if(e[r]!==t[r])return!1;return!0}function iZ(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function YR(e){if(!aZ(e))return!1;let t=Object.getPrototypeOf(e),r=t?.constructor;if(r===void 0)return!0;if(typeof r!="function")return!1;let n=r.prototype;return!(!aZ(n)||!n.hasOwnProperty("isPrototypeOf")||t!==Object.prototype)}function aZ(e){return Object.prototype.toString.call(e)==="[object Object]"}function lZ(e){return new Promise(t=>{qa.setTimeout(t,e)})}function Bv(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?eT(e,t):t}function cZ(e,t,r=0){let n=[...e,t];return r&&n.length>r?n.slice(1):n}function dZ(e,t,r=0){let n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var Ym=Symbol();function Pw(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Ym?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Dw(e,t){return typeof e=="function"?e(...t):!!e}function uZ(e,t,r){let n=!1,o;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??(o=t()),n||(n=!0,o.aborted?r():o.addEventListener("abort",r,{once:!0})),o)}),e}var Aue=()=>JR,Jm=()=>Aue();var Xa=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}};var vu,Cc,ep,fZ,Oue=(fZ=class extends Xa{constructor(){super();Re(this,vu);Re(this,Cc);Re(this,ep);pe(this,ep,t=>{if(typeof window<"u"&&window.addEventListener){let r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){L(this,Cc)||this.setEventListener(L(this,ep))}onUnsubscribe(){var t;this.hasListeners()||((t=L(this,Cc))==null||t.call(this),pe(this,Cc,void 0))}setEventListener(t){var r;pe(this,ep,t),(r=L(this,Cc))==null||r.call(this),pe(this,Cc,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){L(this,vu)!==t&&(pe(this,vu,t),this.onFocus())}onFocus(){let t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){return typeof L(this,vu)=="boolean"?L(this,vu):globalThis.document?.visibilityState!=="hidden"}},vu=new WeakMap,Cc=new WeakMap,ep=new WeakMap,fZ),tp=new Oue;var mZ=nZ;function zue(){let e=[],t=0,r=s=>{s()},n=s=>{s()},o=mZ,i=s=>{t?e.push(s):o(()=>{r(s)})},a=()=>{let s=e;e=[],s.length&&o(()=>{n(()=>{s.forEach(l=>{r(l)})})})};return{batch:s=>{let l;t++;try{l=s()}finally{t--,t||a()}return l},batchCalls:s=>(...l)=>{i(()=>{s(...l)})},schedule:i,setNotifyFunction:s=>{r=s},setBatchNotifyFunction:s=>{n=s},setScheduler:s=>{o=s}}}var Xt=zue();var rp,Pc,op,pZ,Nue=(pZ=class extends Xa{constructor(){super();Re(this,rp,!0);Re(this,Pc);Re(this,op);pe(this,op,t=>{if(typeof window<"u"&&window.addEventListener){let r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){L(this,Pc)||this.setEventListener(L(this,op))}onUnsubscribe(){var t;this.hasListeners()||((t=L(this,Pc))==null||t.call(this),pe(this,Pc,void 0))}setEventListener(t){var r;pe(this,op,t),(r=L(this,Pc))==null||r.call(this),pe(this,Pc,t(this.setOnline.bind(this)))}setOnline(t){L(this,rp)!==t&&(pe(this,rp,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return L(this,rp)}},rp=new WeakMap,Pc=new WeakMap,op=new WeakMap,pZ),np=new Nue;function Fue(e){return Math.min(1e3*2**e,3e4)}function tT(e){return(e??"online")==="online"?np.isOnline():!0}var Rw=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function Tw(e){let t=!1,r=0,n,o="pending",i,a,s=new Promise((x,_)=>{i=x,a=_});s.catch(Sr);let l=()=>o!=="pending",c=x=>{if(!l()){let _=new Rw(x);g(_),e.onCancel?.(_)}},d=()=>{t=!0},u=()=>{t=!1},f=()=>tp.isFocused()&&(e.networkMode==="always"||np.isOnline())&&e.canRun(),m=()=>tT(e.networkMode)&&e.canRun(),p=x=>{l()||(n?.(),o="resolved",i(x))},g=x=>{l()||(n?.(),o="rejected",a(x))},b=x=>new Promise(_=>{n=I=>{(l()||x())&&_(I)},e.onPause?.()}).then(()=>{n=void 0,l()||e.onContinue?.()}),v=()=>{if(l())return;let x,_=r===0?e.initialPromise:void 0;try{x=_??e.fn()}catch(I){x=Promise.reject(I)}Promise.resolve(x).then(p).catch(I=>{if(l())return;let S=e.retry??(Jm()?0:3),w=e.retryDelay??Fue,P=typeof w=="function"?w(r,I):w,$=S===!0||typeof S=="number"&&r<S||typeof S=="function"&&S(r,I);if(t||!$){g(I);return}r++,e.onFail?.(r,I),lZ(P).then(()=>f()?void 0:b(f)).then(()=>{t?g(I):v()})})};return{promise:s,status:()=>o,cancel:c,continue:()=>(n?.(),s),cancelRetry:d,continueRetry:u,canStart:m,start:()=>(m()?v():b(m).then(v),s)}}var xu,hZ,Ew=(hZ=class{constructor(){Re(this,xu)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Iw(this.gcTime)&&pe(this,xu,qa.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Jm()?1/0:3e5))}clearGcTimeout(){L(this,xu)!==void 0&&(qa.clearTimeout(L(this,xu)),pe(this,xu,void 0))}},xu=new WeakMap,hZ);function vZ(e){return{onFetch:(t,r)=>{let n=t.options,o=t.fetchOptions?.meta?.fetchMore?.direction,i=t.state.data?.pages||[],a=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},l=0,c=async()=>{let d=!1,u=p=>{uZ(p,()=>t.signal,()=>d=!0)},f=Pw(t.options,t.fetchOptions),m=async(p,g,b)=>{if(d)return Promise.reject(t.signal.reason);if(g==null&&p.pages.length)return Promise.resolve(p);let x=(()=>{let w={client:t.client,queryKey:t.queryKey,pageParam:g,direction:b?"backward":"forward",meta:t.options.meta};return u(w),w})(),_=await f(x),{maxPages:I}=t.options,S=b?dZ:cZ;return{pages:S(p.pages,_,I),pageParams:S(p.pageParams,g,I)}};if(o&&i.length){let p=o==="backward",g=p?Lue:gZ,b={pages:i,pageParams:a};s=await m(b,g(n,b),p)}else{let p=e??i.length;do{let g=l===0?a[0]??n.initialPageParam:gZ(n,s);if(l>0&&g==null)break;s=await m(s,g),l++}while(l<p)}return s};t.options.persister?t.fetchFn=()=>t.options.persister?.(c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r):t.fetchFn=c}}}function gZ(e,{pages:t,pageParams:r}){let n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function Lue(e,{pages:t,pageParams:r}){return t.length>0?e.getPreviousPageParam?.(t[0],t,r[0],r):void 0}var ip,bu,ap,Ci,yu,Fr,jv,_u,da,Js,yZ,_Z=(yZ=class extends Ew{constructor(t){super();Re(this,da);Re(this,ip);Re(this,bu);Re(this,ap);Re(this,Ci);Re(this,yu);Re(this,Fr);Re(this,jv);Re(this,_u);pe(this,_u,!1),pe(this,jv,t.defaultOptions),this.setOptions(t.options),this.observers=[],pe(this,yu,t.client),pe(this,Ci,L(this,yu).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,pe(this,bu,bZ(this.options)),this.state=t.state??L(this,bu),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return L(this,ip)}get promise(){return L(this,Fr)?.promise}setOptions(t){if(this.options={...L(this,jv),...t},t?._type&&pe(this,ip,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let r=bZ(this.options);r.data!==void 0&&(this.setState(xZ(r.data,r.dataUpdatedAt)),pe(this,bu,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&L(this,Ci).remove(this)}setData(t,r){let n=Bv(this.state.data,t,this.options);return rt(this,da,Js).call(this,{data:n,type:"success",dataUpdatedAt:r?.updatedAt,manual:r?.manual}),n}setState(t){rt(this,da,Js).call(this,{type:"setState",state:t})}cancel(t){let r=L(this,Fr)?.promise;return L(this,Fr)?.cancel(t),r?r.then(Sr).catch(Sr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return L(this,bu)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>zt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Ym||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>zt(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!ww(this.state.dataUpdatedAt,t)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),L(this,Fr)?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),L(this,Fr)?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),L(this,Ci).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){let r=this.observers.indexOf(t);r!==-1&&(this.observers.splice(r,1),this.observers.length||(L(this,Fr)&&(L(this,_u)||this.state.fetchStatus==="paused"&&this.state.status==="pending"?L(this,Fr).cancel({revert:!0}):L(this,Fr).cancelRetry()),this.scheduleGc()),L(this,Ci).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||rt(this,da,Js).call(this,{type:"invalidate"})}async fetch(t,r){if(this.state.fetchStatus!=="idle"&&L(this,Fr)?.status()!=="rejected"){if(this.state.data!==void 0&&r?.cancelRefetch)this.cancel({silent:!0});else if(L(this,Fr))return L(this,Fr).continueRetry(),L(this,Fr).promise}if(t&&this.setOptions(t),!this.options.queryFn){let c=this.observers.find(d=>d.options.queryFn);c&&this.setOptions(c.options)}let n=new AbortController,o=c=>{Object.defineProperty(c,"signal",{enumerable:!0,get:()=>(pe(this,_u,!0),n.signal)})},i=()=>{let c=Pw(this.options,r),u=(()=>{let f={client:L(this,yu),queryKey:this.queryKey,meta:this.meta};return o(f),f})();return pe(this,_u,!1),this.options.persister?this.options.persister(c,u,this):c(u)},s=(()=>{let c={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:L(this,yu),state:this.state,fetchFn:i};return o(c),c})();(L(this,ip)==="infinite"?vZ(this.options.pages):this.options.behavior)?.onFetch(s,this),pe(this,ap,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==s.fetchOptions?.meta)&&rt(this,da,Js).call(this,{type:"fetch",meta:s.fetchOptions?.meta});let l=pe(this,Fr,Tw({initialPromise:r?.initialPromise,fn:s.fetchFn,onCancel:c=>{c instanceof Rw&&c.revert&&this.setState({...L(this,ap),fetchStatus:"idle"}),n.abort()},onFail:(c,d)=>{rt(this,da,Js).call(this,{type:"failed",failureCount:c,error:d})},onPause:()=>{rt(this,da,Js).call(this,{type:"pause"})},onContinue:()=>{rt(this,da,Js).call(this,{type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0}));try{let c=await l.start();if(c===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(c),L(this,Ci).config.onSuccess?.(c,this),L(this,Ci).config.onSettled?.(c,this.state.error,this),c}catch(c){if(c instanceof Rw){if(c.silent)return L(this,Fr).promise;if(c.revert){if(this.state.data===void 0)throw c;return this.state.data}}throw rt(this,da,Js).call(this,{type:"error",error:c}),L(this,Ci).config.onError?.(c,this),L(this,Ci).config.onSettled?.(this.state.data,c,this),c}finally{L(this,Fr)===l&&pe(this,Fr,void 0),this.scheduleGc()}}},ip=new WeakMap,bu=new WeakMap,ap=new WeakMap,Ci=new WeakMap,yu=new WeakMap,Fr=new WeakMap,jv=new WeakMap,_u=new WeakMap,da=new WeakSet,Js=function(t){let r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...rT(n.data,this.options),fetchMeta:t.meta??null};case"success":let o={...n,...xZ(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return pe(this,ap,t.manual?o:void 0),o;case"error":let i=t.error;return{...n,error:i,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),Xt.batch(()=>{this.observers.slice().forEach(n=>{n.onQueryUpdate()}),L(this,Ci).notify({query:this,type:"updated",action:t})})},yZ);function rT(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:tT(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function xZ(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function bZ(e){let t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var tn,mt,Vv,rn,Iu,sp,el,Hv,lp,cp,wu,Su,Dc,dp,bt,Uv,oT,nT,iT,aT,sT,lT,cT,dT,SZ,fT=(SZ=class extends Xa{constructor(t,r){super();Re(this,bt);Re(this,tn);Re(this,mt);Re(this,Vv);Re(this,rn);Re(this,Iu);Re(this,sp);Re(this,el);Re(this,Hv);Re(this,lp);Re(this,cp);Re(this,wu);Re(this,Su);Re(this,Dc);Re(this,dp,new Set);this.options=r,pe(this,tn,t),pe(this,el,null),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(L(this,mt).addObserver(this),IZ(L(this,mt),this.options)?rt(this,bt,Uv).call(this):this.updateResult(),rt(this,bt,sT).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return uT(L(this,mt),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return uT(L(this,mt),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,rt(this,bt,lT).call(this),rt(this,bt,cT).call(this),L(this,mt).removeObserver(this)}setOptions(t){let r=this.options,n=L(this,mt);if(this.options=L(this,tn).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof zt(this.options.enabled,L(this,mt))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");rt(this,bt,dT).call(this),L(this,mt).setOptions(this.options),r._defaulted&&!Cw(this.options,r)&&L(this,tn).getQueryCache().notify({type:"observerOptionsUpdated",query:L(this,mt),observer:this});let o=this.hasListeners();o&&wZ(L(this,mt),n,this.options,r)&&rt(this,bt,Uv).call(this),this.updateResult(),o&&(L(this,mt)!==n||zt(this.options.enabled,L(this,mt))!==zt(r.enabled,L(this,mt))||zt(this.options.staleTime,L(this,mt))!==zt(r.staleTime,L(this,mt)))&&rt(this,bt,nT).call(this);let i=rt(this,bt,iT).call(this);o&&(L(this,mt)!==n||zt(this.options.enabled,L(this,mt))!==zt(r.enabled,L(this,mt))||i!==L(this,Dc))&&rt(this,bt,aT).call(this,i)}getOptimisticResult(t){let r=L(this,tn).getQueryCache().build(L(this,tn),t),n=this.createResult(r,t);return Cw(this.getCurrentResult(),n)||(pe(this,rn,n),pe(this,sp,this.options),pe(this,Iu,L(this,mt).state)),n}getCurrentResult(){return L(this,rn)}trackResult(t,r){return new Proxy(t,{get:(n,o)=>(this.trackProp(o),r?.(o),Reflect.get(n,o))})}trackProp(t){L(this,dp).add(t)}getCurrentQuery(){return L(this,mt)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){let r=L(this,tn).defaultQueryOptions(t),n=L(this,tn).getQueryCache().build(L(this,tn),r),o=()=>{},i,a=new Promise(s=>{i=s,o=L(this,tn).getQueryCache().subscribe(l=>{l.type==="updated"&&l.query.queryHash===n.queryHash&&n.state.data!==void 0&&(o(),s(this.createResult(n,r)))})});return Promise.race([n.fetch().then(()=>{let s=this.createResult(n,r);return i?.(s),s}).finally(()=>{o()}),a])}fetch(t){return rt(this,bt,Uv).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),L(this,rn)))}createResult(t,r){let n=L(this,mt),o=this.options,i=L(this,rn),a=L(this,Iu),s=L(this,sp),l=t!==n?t.state:L(this,Vv),{state:c}=t,d={...c},u=!1,f;if(r._optimisticResults){let w=this.hasListeners(),P=!w&&IZ(t,r),$=w&&wZ(t,n,r,o);(P||$)&&(d={...d,...rT(c.data,t.options)}),r._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:m,errorUpdatedAt:p,status:g}=d;f=d.data;let b=!1;if(r.placeholderData!==void 0&&f===void 0&&g==="pending"){let w;i?.isPlaceholderData&&r.placeholderData===s?.placeholderData?(w=i.data,b=!0):w=typeof r.placeholderData=="function"?r.placeholderData(L(this,cp)?.state.data,L(this,cp)):r.placeholderData,w!==void 0&&(g="success",f=Bv(i?.data,w,r),u=!0)}if(r.select&&f!==void 0&&!b)if(i&&f===a?.data&&r.select===L(this,Hv))f=L(this,lp);else try{pe(this,Hv,r.select),f=r.select(f),f=Bv(i?.data,f,r),pe(this,lp,f),pe(this,el,null)}catch(w){pe(this,el,w)}else f===void 0&&pe(this,el,null);L(this,el)&&(m=L(this,el),f=L(this,lp),p=Date.now(),g="error",u=!1);let v=d.fetchStatus==="fetching",x=g==="pending",_=g==="error",I=x&&v,S=f!==void 0;return{status:g,fetchStatus:d.fetchStatus,isPending:x,isSuccess:g==="success",isError:_,isInitialLoading:I,isLoading:I,data:f,dataUpdatedAt:d.dataUpdatedAt,error:m,errorUpdatedAt:p,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:d.dataUpdateCount>l.dataUpdateCount||d.errorUpdateCount>l.errorUpdateCount,isFetching:v,isRefetching:v&&!x,isLoadingError:_&&!S,isPaused:d.fetchStatus==="paused",isPlaceholderData:u,isRefetchError:_&&S,isStale:mT(t,r),refetch:this.refetch,isEnabled:zt(r.enabled,t)!==!1}}updateResult(){let t=L(this,rn),r=this.createResult(L(this,mt),this.options);if(pe(this,Iu,L(this,mt).state),pe(this,sp,this.options),L(this,Iu).data!==void 0&&pe(this,cp,L(this,mt)),Cw(r,t))return;pe(this,rn,r);let o=(()=>{if(!t)return!0;let{notifyOnChangeProps:i}=this.options,a=typeof i=="function"?i():i;if(a==="all"||!a&&!L(this,dp).size)return!0;let s=new Set(a??L(this,dp));return this.options.throwOnError&&s.add("error"),Object.keys(L(this,rn)).some(l=>{let c=l;return L(this,rn)[c]!==t[c]&&s.has(c)})})();Xt.batch(()=>{o&&this.listeners.forEach(i=>{i(L(this,rn))}),L(this,tn).getQueryCache().notify({query:L(this,mt),type:"observerResultsUpdated"})})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&rt(this,bt,sT).call(this)}},tn=new WeakMap,mt=new WeakMap,Vv=new WeakMap,rn=new WeakMap,Iu=new WeakMap,sp=new WeakMap,el=new WeakMap,Hv=new WeakMap,lp=new WeakMap,cp=new WeakMap,wu=new WeakMap,Su=new WeakMap,Dc=new WeakMap,dp=new WeakMap,bt=new WeakSet,Uv=function(t){rt(this,bt,dT).call(this);let r=L(this,mt).fetch(this.options,t);return t?.throwOnError||(r=r.catch(Sr)),r},oT=function(t){return!Jm()&&zt(this.options.enabled,L(this,mt))!==!1&&Iw(t)},nT=function(){rt(this,bt,lT).call(this);let t=zt(this.options.staleTime,L(this,mt));if(L(this,rn).isStale||!rt(this,bt,oT).call(this,t))return;let r=ww(L(this,rn).dataUpdatedAt,t)+1;pe(this,wu,qa.setTimeout(()=>{L(this,rn).isStale||this.updateResult()},r))},iT=function(){return zt(this.options.refetchInterval,L(this,mt))??!1},aT=function(t){rt(this,bt,cT).call(this),pe(this,Dc,t),!(L(this,Dc)===0||!rt(this,bt,oT).call(this,L(this,Dc)))&&pe(this,Su,qa.setInterval(()=>{(this.options.refetchIntervalInBackground||tp.isFocused())&&rt(this,bt,Uv).call(this)},L(this,Dc)))},sT=function(){rt(this,bt,nT).call(this),rt(this,bt,aT).call(this,rt(this,bt,iT).call(this))},lT=function(){L(this,wu)!==void 0&&(qa.clearTimeout(L(this,wu)),pe(this,wu,void 0))},cT=function(){L(this,Su)!==void 0&&(qa.clearInterval(L(this,Su)),pe(this,Su,void 0))},dT=function(){let t=L(this,tn).getQueryCache().build(L(this,tn),this.options);if(t===L(this,mt))return;let r=L(this,mt);pe(this,mt,t),pe(this,Vv,t.state),this.hasListeners()&&(r?.removeObserver(this),t.addObserver(this))},SZ);function Mue(e,t){return zt(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&zt(t.retryOnMount,e)===!1)}function IZ(e,t){return Mue(e,t)||e.state.data!==void 0&&uT(e,t,t.refetchOnMount)}function uT(e,t,r){if(zt(t.enabled,e)!==!1&&zt(t.staleTime,e)!=="static"){let n=zt(r,e);return n==="always"||n!==!1&&mT(e,t)}return!1}function wZ(e,t,r,n){return(e!==t||zt(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&mT(e,r)}function mT(e,t){return zt(t.enabled,e)!==!1&&e.isStaleByTime(zt(t.staleTime,e))}var Wv,Qa,Oo,ku,Ya,Rc,kZ,CZ=(kZ=class extends Ew{constructor(t){super();Re(this,Ya);Re(this,Wv);Re(this,Qa);Re(this,Oo);Re(this,ku);pe(this,Wv,t.client),this.mutationId=t.mutationId,pe(this,Oo,t.mutationCache),pe(this,Qa,[]),this.state=t.state||Bue(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){L(this,Qa).includes(t)||(L(this,Qa).push(t),this.clearGcTimeout(),L(this,Oo).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){pe(this,Qa,L(this,Qa).filter(r=>r!==t)),this.scheduleGc(),L(this,Oo).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){L(this,Qa).length||(this.state.status==="pending"?this.scheduleGc():L(this,Oo).remove(this))}continue(){return L(this,ku)?.continue()??(this.state.status==="pending"?this.execute(this.state.variables):Promise.resolve())}async execute(t){let r=()=>{rt(this,Ya,Rc).call(this,{type:"continue"})},n={client:L(this,Wv),meta:this.options.meta,mutationKey:this.options.mutationKey},o=pe(this,ku,Tw({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(s,l)=>{rt(this,Ya,Rc).call(this,{type:"failed",failureCount:s,error:l})},onPause:()=>{rt(this,Ya,Rc).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>L(this,Oo).canRun(this)})),i=this.state.status==="pending",a=!o.canStart();try{if(i)r();else{rt(this,Ya,Rc).call(this,{type:"pending",variables:t,isPaused:a}),L(this,Oo).config.onMutate&&await L(this,Oo).config.onMutate(t,this,n);let l=await this.options.onMutate?.(t,n);l!==this.state.context&&rt(this,Ya,Rc).call(this,{type:"pending",context:l,variables:t,isPaused:a})}let s=await o.start();return await L(this,Oo).config.onSuccess?.(s,t,this.state.context,this,n),await this.options.onSuccess?.(s,t,this.state.context,n),await L(this,Oo).config.onSettled?.(s,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(s,null,t,this.state.context,n),rt(this,Ya,Rc).call(this,{type:"success",data:s}),s}catch(s){try{await L(this,Oo).config.onError?.(s,t,this.state.context,this,n)}catch(l){Promise.reject(l)}try{await this.options.onError?.(s,t,this.state.context,n)}catch(l){Promise.reject(l)}try{await L(this,Oo).config.onSettled?.(void 0,s,this.state.variables,this.state.context,this,n)}catch(l){Promise.reject(l)}try{await this.options.onSettled?.(void 0,s,t,this.state.context,n)}catch(l){Promise.reject(l)}throw rt(this,Ya,Rc).call(this,{type:"error",error:s}),s}finally{L(this,ku)===o&&pe(this,ku,void 0),L(this,Oo).runNext(this)}}},Wv=new WeakMap,Qa=new WeakMap,Oo=new WeakMap,ku=new WeakMap,Ya=new WeakSet,Rc=function(t){let r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),Xt.batch(()=>{L(this,Qa).forEach(n=>{n.onMutationUpdate(t)}),L(this,Oo).notify({mutation:this,type:"updated",action:t})})},kZ);function Bue(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var tl,ua,Zv,PZ,DZ=(PZ=class extends Xa{constructor(t={}){super();Re(this,tl);Re(this,ua);Re(this,Zv);this.config=t,pe(this,tl,new Set),pe(this,ua,new Map),pe(this,Zv,0)}build(t,r,n){let o=new CZ({client:t,mutationCache:this,mutationId:++Eh(this,Zv)._,options:t.defaultMutationOptions(r),state:n});return this.add(o),o}add(t){L(this,tl).add(t);let r=$w(t);if(typeof r=="string"){let n=L(this,ua).get(r);n?n.push(t):L(this,ua).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(L(this,tl).delete(t)){let r=$w(t);if(typeof r=="string"){let n=L(this,ua).get(r);if(n)if(n.length>1){let o=n.indexOf(t);o!==-1&&n.splice(o,1)}else n[0]===t&&L(this,ua).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){let r=$w(t);if(typeof r=="string"){let n=L(this,ua).get(r)?.find(o=>o.state.status==="pending");return!n||n===t}else return!0}runNext(t){let r=$w(t);return typeof r=="string"?L(this,ua).get(r)?.find(n=>n!==t&&n.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Xt.batch(()=>{L(this,tl).forEach(t=>{this.notify({type:"removed",mutation:t})}),L(this,tl).clear(),L(this,ua).clear()})}getAll(){return Array.from(L(this,tl))}find(t){let r={exact:!0,...t};return this.getAll().find(n=>kw(r,n))}findAll(t={}){return this.getAll().filter(r=>kw(t,r))}notify(t){Xt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){let t=this.getAll().filter(r=>r.state.isPaused);return Xt.batch(()=>Promise.all(t.map(r=>r.continue().catch(Sr))))}},tl=new WeakMap,ua=new WeakMap,Zv=new WeakMap,PZ);function $w(e){return e.options.scope?.id}var Ja,RZ,TZ=(RZ=class extends Xa{constructor(t={}){super();Re(this,Ja);this.config=t,pe(this,Ja,new Map)}build(t,r,n){let o=r.queryKey,i=r.queryHash??Mv(o,r),a=this.get(i);return a||(a=new _Z({client:t,queryKey:o,queryHash:i,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(o)}),this.add(a)),a}add(t){L(this,Ja).has(t.queryHash)||(L(this,Ja).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){L(this,Ja).get(t.queryHash)===t&&(t.destroy(),L(this,Ja).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Xt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return L(this,Ja).get(t)}getAll(){return[...L(this,Ja).values()]}find(t){let r={exact:!0,...t};return this.getAll().find(n=>Sw(r,n))}findAll(t={}){let r=this.getAll();return Object.keys(t).length>0?r.filter(n=>Sw(t,n)):r}notify(t){Xt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Xt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Xt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Ja=new WeakMap,RZ);var fr,Tc,Ec,up,fp,$c,mp,pp,EZ,pT=(EZ=class{constructor(e={}){Re(this,fr);Re(this,Tc);Re(this,Ec);Re(this,up);Re(this,fp);Re(this,$c);Re(this,mp);Re(this,pp);pe(this,fr,e.queryCache||new TZ),pe(this,Tc,e.mutationCache||new DZ),pe(this,Ec,e.defaultOptions||{}),pe(this,up,new Map),pe(this,fp,new Map),pe(this,$c,0)}mount(){Eh(this,$c)._++,L(this,$c)===1&&(pe(this,mp,tp.subscribe(async e=>{e&&(await this.resumePausedMutations(),L(this,fr).onFocus())})),pe(this,pp,np.subscribe(async e=>{e&&(await this.resumePausedMutations(),L(this,fr).onOnline())})))}unmount(){var e,t;Eh(this,$c)._--,L(this,$c)===0&&((e=L(this,mp))==null||e.call(this),pe(this,mp,void 0),(t=L(this,pp))==null||t.call(this),pe(this,pp,void 0))}isFetching(e){return L(this,fr).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return L(this,Tc).findAll({...e,status:"pending"}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return L(this,fr).get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),r=L(this,fr).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(zt(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return L(this,fr).findAll(e).map(({queryKey:t,state:r})=>[t,r.data])}setQueryData(e,t,r){let n=this.defaultQueryOptions({queryKey:e}),o=L(this,fr).get(n.queryHash)?.state.data,i=sZ(t,o);if(i!==void 0)return L(this,fr).build(this,n).setData(i,{...r,manual:!0})}setQueriesData(e,t,r){return Xt.batch(()=>L(this,fr).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return L(this,fr).get(t.queryHash)?.state}removeQueries(e){let t=L(this,fr);Xt.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){let r=L(this,fr);return Xt.batch(()=>{let n=r.findAll(e),o=new Set(n);return n.forEach(i=>{i.reset()}),this.refetchQueries({type:"active",predicate:i=>o.has(i)},t)})}cancelQueries(e,t={}){let r={revert:!0,...t},n=Xt.batch(()=>L(this,fr).findAll(e).map(o=>o.cancel(r)));return Promise.all(n).then(Sr).catch(Sr)}invalidateQueries(e,t={}){return Xt.batch(()=>(L(this,fr).findAll(e).forEach(r=>{r.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){let r={...t,cancelRefetch:t.cancelRefetch??!0},n=Xt.batch(()=>L(this,fr).findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let i=o.fetch(void 0,r);return r.throwOnError||(i=i.catch(Sr)),o.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(n).then(Sr)}async query(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let r=L(this,fr).build(this,t),n=r.isStaleByTime(zt(t.staleTime,r))?await r.fetch(t):r.state.data,o=t.select;return o?o(n):n}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let r=L(this,fr).build(this,t);return r.isStaleByTime(zt(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Sr).catch(Sr)}infiniteQuery(e){return e._type="infinite",this.query(e)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Sr).catch(Sr)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return np.isOnline()?L(this,Tc).resumePausedMutations():Promise.resolve()}getQueryCache(){return L(this,fr)}getMutationCache(){return L(this,Tc)}getDefaultOptions(){return L(this,Ec)}setDefaultOptions(e){pe(this,Ec,e)}setQueryDefaults(e,t){L(this,up).set(gu(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...L(this,up).values()],r={};return t.forEach(n=>{kc(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){L(this,fp).set(gu(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...L(this,fp).values()],r={};return t.forEach(n=>{kc(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;let t={...L(this,Ec).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Mv(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Ym&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...L(this,Ec).mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){L(this,fr).clear(),L(this,Tc).clear()}},fr=new WeakMap,Tc=new WeakMap,Ec=new WeakMap,up=new WeakMap,fp=new WeakMap,$c=new WeakMap,mp=new WeakMap,pp=new WeakMap,EZ);var Aw=y(D(),1),$Z=Aw.createContext(!1),AZ=()=>Aw.useContext($Z),Act=$Z.Provider;var Gv=y(D(),1),jue=y(O(),1);function Uue(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Vue=Gv.createContext(Uue()),OZ=()=>Gv.useContext(Vue);var zZ=y(D(),1);var NZ=(e,t,r)=>{let n=r?.state.error&&typeof e.throwOnError=="function"?Dw(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||n)&&(t.isReset()||(e.retryOnMount=!1))},FZ=e=>{zZ.useEffect(()=>{e.clearReset()},[e])},LZ=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(o&&e.data===void 0||Dw(r,[e.error,n]));var MZ=e=>{if(e.suspense){let r=o=>o==="static"?o:Math.max(o??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...o)=>r(n(...o)):r(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},BZ=(e,t)=>e?.suspense&&t.isPending,jZ=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});var Ac=y(D(),1);function UZ(e,t,r){let n=AZ(),o=OZ(),i=Qm(r),a=i.defaultQueryOptions(e),s=i.getQueryCache().get(a.queryHash),l=e.subscribed!==!1;a._optimisticResults=n?"isRestoring":l?"optimistic":void 0,MZ(a),NZ(a,o,s),FZ(o);let[c]=Ac.useState(()=>new t(i,a)),d=c.getOptimisticResult(a),u=!n&&l;if(Ac.useSyncExternalStore(Ac.useCallback(f=>{let m=u?c.subscribe(Xt.batchCalls(f)):Sr;return c.updateResult(),m},[c,u]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),Ac.useEffect(()=>{c.setOptions(a)},[a,c]),BZ(a,d))throw jZ(a,c,o);if(LZ({result:d,errorResetBoundary:o,throwOnError:a.throwOnError,query:s,suspense:a.suspense}))throw d.error;return a.notifyOnChangeProps?d:c.trackResult(d)}function hT(e,t){return UZ(e,fT,t)}var kre=y(HZ(),1);var QC=y(D(),1);var h={};ys(h,{$brand:()=>TT,$input:()=>eA,$output:()=>J$,INVALID:()=>an,NEVER:()=>RT,TimePrecision:()=>uA,ZodAny:()=>Y5,ZodArray:()=>rO,ZodBase64:()=>R1,ZodBase64URL:()=>T1,ZodBigInt:()=>Yp,ZodBigIntFormat:()=>A1,ZodBoolean:()=>Qp,ZodCIDRv4:()=>P1,ZodCIDRv6:()=>D1,ZodCUID:()=>y1,ZodCUID2:()=>_1,ZodCatch:()=>wO,ZodCodec:()=>Ux,ZodCompileAsyncError:()=>ma,ZodCompileUnsupportedError:()=>it,ZodCreditCard:()=>H5,ZodCustom:()=>Vx,ZodCustomStringFormat:()=>Vu,ZodDate:()=>Nx,ZodDefault:()=>vO,ZodDiscriminatedUnion:()=>nO,ZodE164:()=>E1,ZodEmail:()=>g1,ZodEmoji:()=>x1,ZodEnum:()=>Kp,ZodError:()=>ige,ZodExactOptional:()=>F1,ZodFile:()=>mO,ZodFirstPartyTypeKind:()=>FO,ZodFunction:()=>AO,ZodGUID:()=>v1,ZodIBAN:()=>W5,ZodIPv4:()=>k1,ZodIPv6:()=>C1,ZodISODate:()=>Vc,ZodISODateTime:()=>Uc,ZodISODuration:()=>Wc,ZodISOTime:()=>Hc,ZodInstanceOf:()=>NO,ZodIntersection:()=>iO,ZodIssueCode:()=>lge,ZodJWT:()=>$1,ZodKSUID:()=>S1,ZodLazy:()=>TO,ZodLiteral:()=>fO,ZodMAC:()=>V5,ZodMap:()=>dO,ZodNaN:()=>kO,ZodNanoID:()=>b1,ZodNever:()=>eO,ZodNonOptional:()=>L1,ZodNull:()=>X5,ZodNullable:()=>gO,ZodNumber:()=>Xp,ZodNumberFormat:()=>Hu,ZodObject:()=>Lx,ZodOptional:()=>Bx,ZodPipe:()=>jx,ZodPrefault:()=>bO,ZodPreprocess:()=>CO,ZodPromise:()=>$O,ZodReadonly:()=>PO,ZodRealError:()=>$n,ZodRecord:()=>Gp,ZodSet:()=>uO,ZodString:()=>qp,ZodStringFormat:()=>Dt,ZodSuccess:()=>IO,ZodSymbol:()=>K5,ZodTemplateLiteral:()=>RO,ZodTransform:()=>pO,ZodTuple:()=>sO,ZodType:()=>Ke,ZodULID:()=>I1,ZodURL:()=>zx,ZodUUID:()=>os,ZodUndefined:()=>q5,ZodUnion:()=>Mx,ZodUnknown:()=>J5,ZodVoid:()=>tO,ZodXID:()=>w1,ZodXor:()=>oO,_ZodString:()=>h1,_default:()=>xO,_function:()=>SX,any:()=>tX,array:()=>Fx,base64:()=>zq,base64url:()=>Nq,bigint:()=>Xq,boolean:()=>G5,catch:()=>SO,check:()=>kX,cidrv4:()=>Aq,cidrv6:()=>Oq,clone:()=>It,codec:()=>yX,coerce:()=>MO,compile:()=>nA,config:()=>vr,core:()=>al,creditCard:()=>Lq,cuid:()=>kq,cuid2:()=>Cq,currencyCode:()=>Hq,custom:()=>CX,date:()=>oX,decode:()=>N5,decodeAsync:()=>L5,deepPartial:()=>MX,describe:()=>PX,discriminatedUnion:()=>cX,e164:()=>Fq,email:()=>hq,emoji:()=>wq,encode:()=>z5,encodeAsync:()=>F5,endsWith:()=>Np,enum:()=>z1,exactOptional:()=>hO,file:()=>gX,flattenError:()=>nx,float32:()=>Zq,float64:()=>Gq,formatError:()=>ix,fromJSONSchema:()=>FX,function:()=>SX,getDiscriminatedOption:()=>P$,getErrorMap:()=>dge,globalRegistry:()=>yo,gt:()=>ts,gte:()=>Xn,guid:()=>gq,hash:()=>Wq,hex:()=>Vq,hostname:()=>Uq,httpUrl:()=>Iq,iban:()=>Mq,includes:()=>Op,input:()=>jX,instanceof:()=>RX,int:()=>m1,int32:()=>Kq,int64:()=>Qq,intersection:()=>aO,invertCodec:()=>_X,ipv4:()=>Tq,ipv6:()=>$q,iso:()=>Hx,json:()=>EX,jwt:()=>Bq,keyof:()=>nX,ksuid:()=>Rq,lazy:()=>EO,length:()=>Lu,literal:()=>hX,locales:()=>kx,looseObject:()=>sX,looseRecord:()=>uX,lowercase:()=>$p,lt:()=>es,lte:()=>qn,mac:()=>Eq,map:()=>fX,maxLength:()=>Fu,maxSize:()=>Lc,memoizer:()=>wx,meta:()=>DX,mime:()=>Lp,minLength:()=>il,minSize:()=>rs,multipleOf:()=>Fc,nan:()=>bX,nanoid:()=>Sq,nativeEnum:()=>pX,negative:()=>r1,never:()=>O1,nonnegative:()=>n1,nonoptional:()=>_O,nonpositive:()=>o1,normalize:()=>Mp,null:()=>Q5,nullable:()=>Ox,nullish:()=>vX,number:()=>Z5,object:()=>iX,optional:()=>ju,output:()=>UX,overwrite:()=>pa,parse:()=>E5,parseAsync:()=>$5,partialRecord:()=>dX,pipe:()=>p1,positive:()=>t1,prefault:()=>yO,preprocess:()=>$X,prettifyError:()=>OT,promise:()=>wX,properties:()=>Fp,property:()=>i1,readonly:()=>DO,record:()=>cO,refine:()=>OO,regex:()=>Ep,regexes:()=>Ri,registry:()=>TS,safeDecode:()=>B5,safeDecodeAsync:()=>U5,safeEncode:()=>M5,safeEncodeAsync:()=>j5,safeParse:()=>A5,safeParseAsync:()=>O5,set:()=>mX,setErrorMap:()=>cge,size:()=>Nu,slugify:()=>Vp,startsWith:()=>zp,strictObject:()=>aX,string:()=>Ax,stringFormat:()=>jq,stringbool:()=>TX,success:()=>xX,superRefine:()=>zO,symbol:()=>Jq,templateLiteral:()=>IX,toJSONSchema:()=>c1,toLowerCase:()=>jp,toUpperCase:()=>Up,toZod:()=>Kv,transform:()=>N1,treeifyError:()=>AT,trim:()=>Bp,tuple:()=>lO,uint32:()=>qq,uint64:()=>Yq,ulid:()=>Pq,undefined:()=>eX,union:()=>Jp,unknown:()=>Bu,uppercase:()=>Ap,url:()=>_q,util:()=>Y,uuid:()=>vq,uuidv4:()=>xq,uuidv6:()=>bq,uuidv7:()=>yq,validate:()=>ax,validateAsync:()=>sx,void:()=>rX,withParser:()=>ES,xid:()=>Dq,xor:()=>lX});var al={};ys(al,{$ZodAny:()=>b$,$ZodArray:()=>S$,$ZodAsyncError:()=>Tn,$ZodBase64:()=>s$,$ZodBase64URL:()=>l$,$ZodBigInt:()=>gS,$ZodBigIntFormat:()=>h$,$ZodBoolean:()=>vx,$ZodCIDRv4:()=>i$,$ZodCIDRv6:()=>a$,$ZodCUID:()=>GE,$ZodCUID2:()=>KE,$ZodCatch:()=>V$,$ZodCheck:()=>Tt,$ZodCheckBigIntFormat:()=>yE,$ZodCheckEndsWith:()=>$E,$ZodCheckGreaterThan:()=>eS,$ZodCheckIncludes:()=>TE,$ZodCheckLengthEquals:()=>CE,$ZodCheckLessThan:()=>Jw,$ZodCheckLowerCase:()=>DE,$ZodCheckMaxLength:()=>SE,$ZodCheckMaxSize:()=>_E,$ZodCheckMimeType:()=>zE,$ZodCheckMinLength:()=>kE,$ZodCheckMinSize:()=>IE,$ZodCheckMultipleOf:()=>xE,$ZodCheckNumberFormat:()=>bE,$ZodCheckOverwrite:()=>NE,$ZodCheckProperties:()=>OE,$ZodCheckProperty:()=>AE,$ZodCheckRegex:()=>PE,$ZodCheckSizeEquals:()=>wE,$ZodCheckStartsWith:()=>EE,$ZodCheckStringFormat:()=>Cp,$ZodCheckUpperCase:()=>RE,$ZodCodec:()=>bx,$ZodCreditCard:()=>d$,$ZodCustom:()=>X$,$ZodCustomStringFormat:()=>m$,$ZodCyclicError:()=>wS,$ZodDate:()=>w$,$ZodDefault:()=>M$,$ZodDiscriminatedUnion:()=>D$,$ZodE164:()=>c$,$ZodEmail:()=>jE,$ZodEmoji:()=>WE,$ZodEncodeError:()=>Nc,$ZodEnum:()=>A$,$ZodError:()=>ox,$ZodExactOptional:()=>F$,$ZodFile:()=>z$,$ZodFunction:()=>K$,$ZodGUID:()=>ME,$ZodIBAN:()=>u$,$ZodIPv4:()=>r$,$ZodIPv6:()=>o$,$ZodISODate:()=>JE,$ZodISODateTime:()=>YE,$ZodISODuration:()=>t$,$ZodISOTime:()=>e$,$ZodIntersection:()=>R$,$ZodJWT:()=>f$,$ZodKSUID:()=>QE,$ZodLazy:()=>yx,$ZodLiteral:()=>O$,$ZodMAC:()=>n$,$ZodMap:()=>E$,$ZodNaN:()=>H$,$ZodNanoID:()=>ZE,$ZodNever:()=>_$,$ZodNonOptional:()=>j$,$ZodNull:()=>x$,$ZodNullable:()=>L$,$ZodNumber:()=>hS,$ZodNumberFormat:()=>p$,$ZodObject:()=>kG,$ZodObjectJIT:()=>k$,$ZodOptional:()=>xS,$ZodPipe:()=>bS,$ZodPrefault:()=>B$,$ZodPreprocess:()=>W$,$ZodPromise:()=>q$,$ZodReadonly:()=>Z$,$ZodRealError:()=>En,$ZodRecord:()=>T$,$ZodRegistry:()=>RS,$ZodSet:()=>$$,$ZodString:()=>Eu,$ZodStringFormat:()=>wt,$ZodSuccess:()=>U$,$ZodSymbol:()=>g$,$ZodTemplateLiteral:()=>G$,$ZodTransform:()=>N$,$ZodTuple:()=>vS,$ZodType:()=>je,$ZodULID:()=>qE,$ZodURL:()=>HE,$ZodUUID:()=>BE,$ZodUndefined:()=>v$,$ZodUnion:()=>xx,$ZodUnknown:()=>y$,$ZodVoid:()=>I$,$ZodXID:()=>XE,$ZodXor:()=>C$,$brand:()=>TT,$constructor:()=>j,$input:()=>eA,$output:()=>J$,Doc:()=>Tu,INVALID:()=>an,JSONSchema:()=>fq,JSONSchemaGenerator:()=>d1,NEVER:()=>RT,TimePrecision:()=>uA,URL_BAD_FORMAT:()=>UE,URL_UNPARSEABLE:()=>fx,ZodCompileAsyncError:()=>ma,ZodCompileUnsupportedError:()=>it,_any:()=>DA,_array:()=>zA,_base64:()=>QS,_base64url:()=>YS,_bigint:()=>_A,_boolean:()=>bA,_catch:()=>Ghe,_check:()=>XK,_cidrv4:()=>qS,_cidrv6:()=>XS,_coercedBigint:()=>IA,_coercedBoolean:()=>yA,_coercedDate:()=>AA,_coercedNumber:()=>mA,_coercedString:()=>sA,_creditCard:()=>cA,_cuid:()=>US,_cuid2:()=>VS,_custom:()=>FA,_date:()=>$A,_decode:()=>Uw,_decodeAsync:()=>Hw,_default:()=>Hhe,_discriminatedUnion:()=>$he,_e164:()=>JS,_email:()=>OS,_emoji:()=>BS,_encode:()=>jw,_encodeAsync:()=>Vw,_endsWith:()=>Np,_enum:()=>Lhe,_file:()=>NA,_float32:()=>hA,_float64:()=>gA,_gt:()=>ts,_gte:()=>Xn,_guid:()=>zS,_iban:()=>dA,_includes:()=>Op,_int:()=>pA,_int32:()=>vA,_int64:()=>wA,_intersection:()=>Ahe,_ipv4:()=>GS,_ipv6:()=>KS,_isoDate:()=>Dx,_isoDateTime:()=>Px,_isoDuration:()=>Tx,_isoTime:()=>Rx,_jwt:()=>e1,_ksuid:()=>ZS,_lazy:()=>Qhe,_length:()=>Lu,_literal:()=>Bhe,_lowercase:()=>$p,_lt:()=>es,_lte:()=>qn,_mac:()=>lA,_map:()=>Nhe,_max:()=>qn,_maxLength:()=>Fu,_maxSize:()=>Lc,_mime:()=>Lp,_min:()=>Xn,_minLength:()=>il,_minSize:()=>rs,_multipleOf:()=>Fc,_nan:()=>OA,_nanoid:()=>jS,_nativeEnum:()=>Mhe,_negative:()=>r1,_never:()=>TA,_nonnegative:()=>n1,_nonoptional:()=>Whe,_nonpositive:()=>o1,_normalize:()=>Mp,_null:()=>PA,_nullable:()=>Vhe,_number:()=>fA,_optional:()=>Uhe,_overwrite:()=>pa,_parse:()=>_p,_parseAsync:()=>wp,_pipe:()=>Khe,_positive:()=>t1,_promise:()=>Yhe,_properties:()=>Fp,_property:()=>i1,_readonly:()=>qhe,_record:()=>zhe,_refine:()=>LA,_regex:()=>Ep,_safeDecode:()=>Zw,_safeDecodeAsync:()=>Kw,_safeEncode:()=>Ww,_safeEncodeAsync:()=>Gw,_safeParse:()=>Sp,_safeParseAsync:()=>kp,_set:()=>Fhe,_size:()=>Nu,_slugify:()=>Vp,_startsWith:()=>zp,_string:()=>aA,_stringFormat:()=>Mu,_stringbool:()=>UA,_success:()=>Zhe,_superRefine:()=>MA,_symbol:()=>kA,_templateLiteral:()=>Xhe,_toLowerCase:()=>jp,_toUpperCase:()=>Up,_transform:()=>jhe,_trim:()=>Bp,_tuple:()=>Ohe,_uint32:()=>xA,_uint64:()=>SA,_ulid:()=>HS,_undefined:()=>CA,_union:()=>The,_unknown:()=>RA,_uppercase:()=>Ap,_url:()=>Cx,_uuid:()=>NS,_uuidv4:()=>FS,_uuidv6:()=>LS,_uuidv7:()=>MS,_void:()=>EA,_xid:()=>WS,_xor:()=>Ehe,base64Charset:()=>dS,base64urlCharset:()=>gx,canParseURL:()=>VE,clone:()=>It,compile:()=>nA,compileFn:()=>$S,config:()=>vr,createStandardJSONSchemaMethod:()=>Hp,createToJSONSchemaMethod:()=>HA,decode:()=>Ofe,decodeAsync:()=>Nfe,describe:()=>BA,encode:()=>Afe,encodeAsync:()=>zfe,extractDefs:()=>Bc,finalize:()=>jc,flattenError:()=>nx,formatError:()=>ix,getDiscriminatedOption:()=>P$,globalConfig:()=>eo,globalRegistry:()=>yo,handleUnrepresentable:()=>Lr,initializeContext:()=>Mc,isBackEdge:()=>kS,isRecursiveSchema:()=>SS,isValidBase64:()=>hx,isValidBase64URL:()=>uS,isValidCIDRv6:()=>cS,isValidCreditCard:()=>fS,isValidIBAN:()=>mS,isValidIPv6:()=>px,isValidJWT:()=>pS,locales:()=>kx,memoizer:()=>wx,mergeValues:()=>Pp,meta:()=>jA,parse:()=>Ip,parseAsync:()=>Bw,parseURLObject:()=>IG,prettifyError:()=>OT,process:()=>St,processSchema:()=>St,regexes:()=>Ri,registry:()=>TS,safeDecode:()=>Lfe,safeDecodeAsync:()=>Bfe,safeEncode:()=>Ffe,safeEncodeAsync:()=>Mfe,safeParse:()=>Dfe,safeParseAsync:()=>Rfe,standardProps:()=>iS,stripTabAndNewline:()=>mx,toDotPath:()=>tG,toJSONSchema:()=>c1,toZod:()=>Kv,treeifyError:()=>AT,urlHostnameOk:()=>sS,urlProtocolOk:()=>lS,util:()=>Y,validate:()=>ax,validateAsync:()=>sx,validateURL:()=>aS,version:()=>FE,withParser:()=>ES});var Y={};ys(Y,{BIGINT_FORMAT_RANGES:()=>Jv,CONSTANT_CATCH:()=>Lw,Class:()=>bT,NUMBER_FORMAT_RANGES:()=>Yv,aborted:()=>nn,allowsEval:()=>IT,assert:()=>Kue,assertEqual:()=>Hue,assertIs:()=>Zue,assertNever:()=>Gue,assertNotEqual:()=>Wue,assignProp:()=>bo,attachSchema:()=>Fw,base64ToUint8Array:()=>qZ,base64urlToUint8Array:()=>mfe,cached:()=>xp,captureStackTrace:()=>zw,cleanEnum:()=>ffe,cleanRegex:()=>ol,clone:()=>It,cloneDef:()=>Que,codePointLength:()=>Du,constantCatch:()=>PT,createTransparentProxy:()=>ofe,defineLazy:()=>yT,defineLazyInternal:()=>Xe,derived:()=>vfe,esc:()=>on,escapeRegex:()=>Di,explicitlyAborted:()=>kT,extend:()=>afe,finalizeIssue:()=>Rn,floatSafeRemainder:()=>qv,getElementAtPath:()=>Yue,getEnumValues:()=>gp,getLengthableOrigin:()=>tx,getParsedType:()=>rfe,getSizableOrigin:()=>ex,hexToUint8Array:()=>hfe,hide:()=>rx,installLazyProp:()=>_fe,isObject:()=>Pu,isPlainObject:()=>Pi,issue:()=>yp,joinValues:()=>V,jsonStringifyReplacer:()=>vp,members:()=>CT,merge:()=>lfe,mergeDefs:()=>fa,normalizeParams:()=>ae,nullish:()=>Ow,numKeys:()=>tfe,objectClone:()=>que,omit:()=>ife,optionalKeys:()=>ST,own:()=>zc,parsedType:()=>ee,partial:()=>cfe,pick:()=>nfe,prefixIssues:()=>Dn,primitiveTypes:()=>wT,promiseAllObject:()=>Jue,propertyKeyTypes:()=>Qv,randomString:()=>efe,rawShape:()=>bp,required:()=>dfe,safeExtend:()=>sfe,shallowClone:()=>Xv,slugify:()=>_T,stringifyPrimitive:()=>J,toZod:()=>Kv,uint8ArrayToBase64:()=>XZ,uint8ArrayToBase64url:()=>pfe,uint8ArrayToHex:()=>gfe,unwrapMessage:()=>hp});function Hue(e){return e}function Wue(e){return e}function Kv(){return e=>e}function Zue(e){}function Gue(e){throw new Error("Unexpected value in exhaustive check")}function Kue(e){}function gp(e){let t=Object.values(e).filter(n=>typeof n=="number");return Object.entries(e).filter(([n,o])=>t.indexOf(+n)===-1).map(([n,o])=>o)}function V(e,t="|"){return e.map(r=>J(r)).join(t)}function vp(e,t){return typeof t=="bigint"?t.toString():t}var xT=class{constructor(t){this._getter=t,this._value=void 0}get value(){let t=this._getter;return t!==void 0&&(this._value=t(),this._getter=void 0),this._value}};function xp(e){return new xT(e)}function Ow(e){return e==null}function ol(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function qv(e,t){let r=e/t,n=Math.round(r),o=4*Number.EPSILON*Math.max(Math.abs(r),1);return Math.abs(r-n)<o?0:r-n}var WZ=Symbol("evaluating");function yT(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==WZ)return n===void 0&&(n=WZ,n=r()),n},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function que(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function bo(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function bp(e){let t=Object.getOwnPropertyDescriptor(e,"shape");return t?.get?t.get.raw:t?.value}function rl(e){return bp(e._zod.def)??e._zod.def.shape}function ZZ(e,t,r){Object.defineProperty(e,t,{get(){let n=r();return bo(this,t,n),n},enumerable:!0,configurable:!0})}function GZ(e,t,r){t in e?bo(e,t,r):e[t]=r}function Cu(e,t,r,n){let o=rl(t);for(let i of r){let a=Object.getOwnPropertyDescriptor(o,i);a.enumerable&&(a.get?ZZ(e,i,()=>{let s=t._zod.def.shape[i];return n?n(s,i):s}):GZ(e,i,n?n(a.value,i):a.value))}}function Xue(e,t){for(let r of Reflect.ownKeys(t)){let n=Object.getOwnPropertyDescriptor(t,r);n.enumerable&&(n.get?ZZ(e,r,()=>t[r]):GZ(e,r,n.value))}}function fa(...e){let t={};for(let r of e){let n=Object.getOwnPropertyDescriptors(r);Object.assign(t,n)}return Object.defineProperties({},t)}function Que(e){return fa(e._zod.def)}function Yue(e,t){return t?t.reduce((r,n)=>r?.[n],e):e}function Jue(e){let t=Object.keys(e),r=t.map(n=>e[n]);return Promise.all(r).then(n=>{let o={};for(let i=0;i<t.length;i++)o[t[i]]=n[i];return o})}function efe(e=10){let t="abcdefghijklmnopqrstuvwxyz",r="";for(let n=0;n<e;n++)r+=t[Math.floor(Math.random()*t.length)];return r}function on(e){return JSON.stringify(e)}function _T(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var zw="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Pu(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var IT=xp(()=>{if(eo.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function Pi(e){if(Pu(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(Pu(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function Xv(e){return Pi(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function tfe(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}var rfe=e=>{let t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},Qv=new Set(["string","number","symbol"]),wT=new Set(["string","number","bigint","boolean","symbol","undefined"]);function Di(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function It(e,t,r){let n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}function ae(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function ofe(e){let t;return new Proxy({},{get(r,n,o){return t??(t=e()),Reflect.get(t,n,o)},set(r,n,o,i){return t??(t=e()),Reflect.set(t,n,o,i)},has(r,n){return t??(t=e()),Reflect.has(t,n)},deleteProperty(r,n){return t??(t=e()),Reflect.deleteProperty(t,n)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,n){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,n)},defineProperty(r,n,o){return t??(t=e()),Reflect.defineProperty(t,n,o)}})}function J(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function ST(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout==="optional")}var Yv={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Jv={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function nfe(e,t){let r=e._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let i={};return Cu(i,e,Nw(e,t)),It(e,fa(r,{shape:i,checks:[]}))}function Nw(e,t){let r=rl(e),n=[];for(let o of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(r,o)?.enumerable)throw new Error(`Unrecognized key: "${String(o)}"`);t[o]&&n.push(o)}return n}function ife(e,t){let r=e._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let i=new Set(Nw(e,t)),a={};return Cu(a,e,Reflect.ownKeys(rl(e)).filter(s=>!i.has(s))),It(e,fa(r,{shape:a,checks:[]}))}function afe(e,t){if(!Pi(t))throw new Error("Invalid input to extend: expected a plain object");let r=e._zod.def.checks;if(r&&r.length>0){let o=rl(e);for(let i of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(o,i)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return It(e,fa(e._zod.def,{shape:KZ(e,t)}))}function KZ(e,t){let r={};return Cu(r,e,Reflect.ownKeys(rl(e))),Xue(r,t),r}function sfe(e,t){if(!Pi(t))throw new Error("Invalid input to safeExtend: expected a plain object");return It(e,fa(e._zod.def,{shape:KZ(e,t)}))}function lfe(e,t){if(!t?._zod?.def)throw new Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let r={};Cu(r,e,Reflect.ownKeys(rl(e))),Cu(r,t,Reflect.ownKeys(rl(t)));let n=fa(e._zod.def,{shape:r,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return It(e,n)}function cfe(e,t,r,n="partial"){let i=t._zod.def.checks;if(i&&i.length>0)throw new Error(`.${n}() cannot be used on object schemas containing refinements`);let s=r?new Set(Nw(t,r)):void 0,l={};return Cu(l,t,Reflect.ownKeys(rl(t)),e&&((c,d)=>s&&!s.has(d)?c:new e({type:"optional",innerType:c}))),It(t,fa(t._zod.def,{shape:l,checks:[]}))}function dfe(e,t,r){let n=r?new Set(Nw(t,r)):void 0,o={};return Cu(o,t,Reflect.ownKeys(rl(t)),(i,a)=>n&&!n.has(a)?i:new e({type:"nonoptional",innerType:i})),It(t,fa(t._zod.def,{shape:o}))}function nn(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function kT(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue===!1)return!0;return!1}function Dn(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}function hp(e){return typeof e=="string"?e:e?.message}function Fw(e,t,r){var n;for(let o=t;o<e.length;o++)(n=e[o]).schema??(n.schema=r)}function Rn(e,t,r){var n;let o=e.inst?._zod?.traits;o?.has("$ZodType")&&(o.has("$ZodCheck")?(n=e).schema??(n.schema=e.inst):e.schema=e.inst);let i=e.schema!==e.inst?e.schema?._zod.def?.error:void 0,a=e.message?e.message:hp(e.inst?._zod.def?.error?.(e))??hp(i?.(e))??hp(t?.error?.(e))??hp(r.customError?.(e))??hp(r.localeError?.(e))??"Invalid input",s={};for(let l of Object.keys(e))l==="inst"||l==="schema"||l==="continue"||l==="input"||l==="__proto__"||(s[l]=e[l]);return s.path??(s.path=[]),s.message=a,t?.reportInput&&(s.input=e.input),s}function ex(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}var ufe=/[\uD800-\uDBFF]/;function Du(e){let t=e.length;if(!ufe.test(e))return t;let r=t;for(let n=0;n<t-1;n++)(e.charCodeAt(n)&64512)===55296&&(e.charCodeAt(n+1)&64512)===56320&&(r--,n++);return r}function tx(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function ee(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let r=e;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return t}function yp(...e){let[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}function ffe(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function qZ(e){let t=atob(e),r=new Uint8Array(t.length);for(let n=0;n<t.length;n++)r[n]=t.charCodeAt(n);return r}function XZ(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function mfe(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-t.length%4)%4);return qZ(t+r)}function pfe(e){return XZ(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function hfe(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");let r=new Uint8Array(t.length/2);for(let n=0;n<t.length;n+=2)r[n/2]=Number.parseInt(t.slice(n,n+2),16);return r}function gfe(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var bT=class{constructor(...t){}};function CT(e,t){for(let r in t){let n=Object.getOwnPropertyDescriptor(t,r);n.get?Object.defineProperty(e,r,{...n,enumerable:!1}):xfe(e,r,n.value)}}function zc(e,t,r,n=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:n,value:r}),r}function rx(e,t,r){return zc(e,t,r,!1)}function vfe(e,t){for(let r in e){let n=e[r];Object.defineProperty(t,r,{configurable:!0,enumerable:!0,get(){return zc(this,r,n(this))},set(o){zc(this,r,o)}})}return t}function xfe(e,t,r){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?r:zc(this,t,r.bind(this))},set(n){zc(this,t,n)}})}function bfe(e,t){let r=Object.getPrototypeOf(e);return t in r?void 0:r}var vT,Oc=!1,yfe={configurable:!0,get(){Oc=!0}};function Xe(e,t,r){let n=Object.getPrototypeOf(e._zod);if(t in n&&vT!==e._zod){vT=void 0;return}vT=e._zod,Object.defineProperty(n,t,{configurable:!0,get(){Object.defineProperty(this,t,yfe);let o=Oc;Oc=!1;try{let i=r(this);return Oc?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:i}),Oc=Oc||o,i}catch(i){throw delete this[t],Oc=Oc||o,i}},set(o){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:o})}})}function _fe(e,t,r,n){let o=bfe(e,t);o&&Object.defineProperty(o,t,{configurable:!0,get(){let i={configurable:!0,writable:!0,enumerable:n,value:void 0};return Object.defineProperty(this,t,i),i.value=r(this),Object.defineProperty(this,t,i),i.value},set(i){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:n,value:i})}})}var Lw="~constantCatch";function PT(e){let t=()=>e;return t[Lw]=!0,t}var QZ,RT=Object.freeze({status:"aborted"}),DT={value:void 0,enumerable:!1},YZ="captureStackTrace"in Error?Error:null;function Ife(e){let t=YZ;if(t){let r=t.stackTraceLimit;if(typeof r=="number"){try{t.stackTraceLimit=0}catch{return YZ=null,new e}try{return new e}finally{t.stackTraceLimit=r}}}return new e}function j(e,t,r,n){let o={};function i(f){this.def=f,this.constr=u,this.traits=new Set}i.prototype=o;let a=r,s=a&&new WeakSet;function l(f,m){if(f._zod){if(f._zod.traits.has(e))return}else{DT.value=new i(m);try{Object.defineProperty(f,"_zod",DT)}finally{DT.value=void 0}}if(f._zod.traits.add(e),t(f,m),s){let g=Object.getPrototypeOf(f),b=f._zod.constr.prototype,v=g;for(;v&&v!==b;)v=Object.getPrototypeOf(v);let x=v??g;s.has(x)||(s.add(x),CT(x,a))}let p=u.prototype;for(let g in p)Object.prototype.hasOwnProperty.call(p,g)&&(g in f||(f[g]=p[g].bind(f)))}let c=n?.Parent??Object;class d extends c{}Object.defineProperty(d,"name",{value:e});function u(f){let m=n?.Parent?Ife(d):this;l(m,f);let p=m._zod.deferred;if(p){for(let b of p)b();m._zod.deferred=void 0}let g=globalThis.__zod_globalConfig?.postProcessor;return g&&g(m),m}return Object.defineProperty(u,"init",{value:l}),Object.defineProperty(u,Symbol.hasInstance,{value:f=>n?.Parent&&f instanceof n.Parent?!0:f?._zod?.traits?.has(e)}),Object.defineProperty(u,"name",{value:e}),u}var TT=Symbol("zod_brand"),Tn=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Nc=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}};(QZ=globalThis).__zod_globalConfig??(QZ.__zod_globalConfig={});var eo=globalThis.__zod_globalConfig;function vr(e){return e&&Object.assign(eo,e),eo}function wfe(){let e=this._zod;return e.message??(e.message=JSON.stringify(e.def,vp,2)),e.message}function Sfe(e){this._zod.message=e}var kfe={get:wfe,set:Sfe,enumerable:!0,configurable:!0},$T={value:void 0,enumerable:!1},JZ=new WeakSet([Object.prototype,Error.prototype]),eG=(e,t)=>{e.name="$ZodError",$T.value=t,Object.defineProperty(e,"issues",$T),$T.value=void 0,Object.defineProperty(e,"message",kfe);let r=Object.getPrototypeOf(e);JZ.has(r)||(JZ.add(r),Object.defineProperty(r,"toString",{configurable:!0,enumerable:!1,get(){let n=()=>this.message;return Object.defineProperty(this,"toString",{value:n,configurable:!0,writable:!0}),n},set(n){Object.defineProperty(this,"toString",{value:n,configurable:!0,writable:!0})}}))},ox=j("$ZodError",eG),En=j("$ZodError",eG,void 0,{Parent:Error});function Cfe(e,t,r){return Object.prototype.hasOwnProperty.call(e,t)||(t==="__proto__"?Object.defineProperty(e,t,{value:r(),writable:!0,enumerable:!0,configurable:!0}):e[t]=r()),e[t]}function nx(e,t=r=>r.message){let r={},n=[];for(let o of e.issues)o.path.length>0?Cfe(r,o.path[0],()=>[]).push(t(o)):n.push(t(o));return{formErrors:n,fieldErrors:r}}function ix(e,t=r=>r.message){let r={_errors:[]},n=(o,i=[])=>{for(let a of o.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(s=>n({issues:s},[...i,...a.path]));else if(a.code==="invalid_key")n({issues:a.issues},[...i,...a.path]);else if(a.code==="invalid_element")n({issues:a.issues},[...i,...a.path]);else{let s=[...i,...a.path];if(s.length===0)r._errors.push(t(a));else{let l=r,c=0;for(;c<s.length;){let d=s[c],u=c===s.length-1;if(d==="_errors"){u&&l._errors.push(t(a)),c++;continue}Object.prototype.hasOwnProperty.call(l,d)||Object.defineProperty(l,d,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let f=l[d];u&&f._errors.push(t(a)),l=f,c++}}}};return n(e),r}function AT(e,t=r=>r.message){let r={errors:[]},n=(o,i=[])=>{var a;for(let s of o.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(l=>n({issues:l},[...i,...s.path]));else if(s.code==="invalid_key")n({issues:s.issues},[...i,...s.path]);else if(s.code==="invalid_element")n({issues:s.issues},[...i,...s.path]);else{let l=[...i,...s.path];if(l.length===0){r.errors.push(t(s));continue}let c=r,d=0;for(;d<l.length;){let u=l[d],f=d===l.length-1;typeof u=="string"?(c.properties??(c.properties={}),Object.prototype.hasOwnProperty.call(c.properties,u)||Object.defineProperty(c.properties,u,{value:{errors:[]},enumerable:!0,writable:!0,configurable:!0}),c=c.properties[u]):(c.items??(c.items=[]),(a=c.items)[u]??(a[u]={errors:[]}),c=c.items[u]),f&&c.errors.push(t(s)),d++}}};return n(e),r}function tG(e){let t=[],r=e.map(n=>typeof n=="object"?n.key:n);for(let n of r)typeof n=="number"?t.push(`[${n}]`):typeof n=="symbol"?t.push(`[${JSON.stringify(String(n))}]`):/[^\w$]/.test(n)?t.push(`[${JSON.stringify(n)}]`):(t.length&&t.push("."),t.push(n));return t.join("")}function OT(e){let t=[],r=[...e.issues].sort((n,o)=>(n.path??[]).length-(o.path??[]).length);for(let n of r)t.push(`\u2716 ${n.message}`),n.path?.length&&t.push(` \u2192 at ${tG(n.path)}`);return t.join(`
|
|
60
|
+
`)}function Mw(e,t){return{callee:t?.callee??e,Err:t?.Err}}var _p=e=>{let t=(r,n,o,i)=>{let a=o?{...o,async:!1}:{async:!1},s=r._zod.run({value:n,issues:[]},a);if(s instanceof Promise)throw new Tn;if(s.issues.length){let l=new(i?.Err??e)(s.issues.map(c=>Rn(c,a,vr())));throw zw(l,i?.callee??t),l}return s.value};return t},Ip=_p(En),wp=e=>{let t=async(r,n,o,i)=>{let a=o?{...o,async:!0}:{async:!0},s=r._zod.run({value:n,issues:[]},a);if(s instanceof Promise&&(s=await s),s.issues.length){let l=new(i?.Err??e)(s.issues.map(c=>Rn(c,a,vr())));throw zw(l,i?.callee??t),l}return s.value};return t},Bw=wp(En),Sp=e=>(t,r,n)=>{let o=n?{...n,async:!1}:{async:!1},i=t._zod.run({value:r,issues:[]},o);if(i instanceof Promise)throw new Tn;return i.issues.length?rG(e,i.issues,o):{success:!0,data:i.value}},Dfe=Sp(En);function rG(e,t,r){let n;return{success:!1,get error(){return n||(n=new e(t.map(o=>Rn(o,r,vr()))),t=void 0,r=void 0),n},set error(o){n=o,t=void 0,r=void 0}}}var kp=e=>async(t,r,n)=>{let o=n?{...n,async:!0}:{async:!0},i=t._zod.run({value:r,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?rG(e,i.issues,o):{success:!0,data:i.value}},Rfe=kp(En),Tfe=Symbol.for("zod.compile.invalid"),Efe=Symbol.for("zod.compile.fallback"),ax=((e,t,r)=>{let n=e._zod.bag.validator;if(n!==void 0){if(n(t)!==Tfe)return!0;if(n.definite===!0&&r===void 0)return!1}return $fe(e,t,r)});function $fe(e,t,r){let n=r?{...r,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},o=e._zod.bag.fallbackRun,i;if(o?(n[Efe]=!0,i=o({value:t,issues:[]},n)):i=e._zod.run({value:t,issues:[]},n),i instanceof Promise)throw new Tn;return i.issues.length===0}var sx=async(e,t,r)=>{let n=r?{...r,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0},o=e._zod.run({value:t,issues:[]},n);return o instanceof Promise&&(o=await o),o.issues.length===0},jw=e=>{let t=_p(e),r=(n,o,i,a)=>{let s=i?{...i,direction:"backward"}:{direction:"backward"};return t(n,o,s,Mw(r,a))};return r},Afe=jw(En),Uw=e=>{let t=_p(e),r=(n,o,i,a)=>t(n,o,i,Mw(r,a));return r},Ofe=Uw(En),Vw=e=>{let t=wp(e),r=async(n,o,i,a)=>{let s=i?{...i,direction:"backward"}:{direction:"backward"};return await t(n,o,s,Mw(r,a))};return r},zfe=Vw(En),Hw=e=>{let t=wp(e),r=async(n,o,i,a)=>await t(n,o,i,Mw(r,a));return r},Nfe=Hw(En),Ww=e=>(t,r,n)=>{let o=n?{...n,direction:"backward"}:{direction:"backward"};return Sp(e)(t,r,o)},Ffe=Ww(En),Zw=e=>(t,r,n)=>Sp(e)(t,r,n),Lfe=Zw(En),Gw=e=>async(t,r,n)=>{let o=n?{...n,direction:"backward"}:{direction:"backward"};return kp(e)(t,r,o)},Mfe=Gw(En),Kw=e=>async(t,r,n)=>kp(e)(t,r,n),Bfe=Kw(En);var Ri={};ys(Ri,{anyString:()=>sE,base64:()=>YT,base64url:()=>JT,bigint:()=>cE,boolean:()=>dE,browserEmail:()=>Kfe,cidrv4:()=>XT,cidrv6:()=>QT,creditCard:()=>qw,cuid:()=>NT,cuid2:()=>FT,currencyCode:()=>oE,date:()=>nE,datetime:()=>aE,domain:()=>tE,duration:()=>VT,e164:()=>rE,email:()=>WT,emoji:()=>ZT,extendedDuration:()=>jfe,guid:()=>HT,hex:()=>hE,hostname:()=>eE,html5Email:()=>Wfe,httpProtocol:()=>lx,iban:()=>Xw,idnEmail:()=>Gfe,integer:()=>cx,ipv4:()=>GT,ipv6:()=>KT,ksuid:()=>BT,lowercase:()=>mE,mac:()=>qT,md5_base64:()=>Yfe,md5_base64url:()=>Jfe,md5_hex:()=>Qfe,nanoid:()=>jT,nanoidOfLength:()=>UT,null:()=>uE,number:()=>nl,rfc5322Email:()=>Zfe,sha1_base64:()=>tme,sha1_base64url:()=>rme,sha1_hex:()=>eme,sha256_base64:()=>nme,sha256_base64url:()=>ime,sha256_hex:()=>ome,sha384_base64:()=>sme,sha384_base64url:()=>lme,sha384_hex:()=>ame,sha512_base64:()=>dme,sha512_base64url:()=>ume,sha512_hex:()=>cme,string:()=>lE,time:()=>iE,ulid:()=>LT,undefined:()=>fE,unicodeEmail:()=>oG,uppercase:()=>pE,uuid:()=>Ru,uuid4:()=>Ufe,uuid6:()=>Vfe,uuid7:()=>Hfe,xid:()=>MT});var NT=/^[cC][0-9a-z]{6,}$/,FT=/^[0-9a-z]+$/,LT=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,MT=/^[0-9a-vA-V]{20}$/,BT=/^[A-Za-z0-9]{27}$/,jT=/^[a-zA-Z0-9_-]{21}$/;function UT(e){return new RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var VT=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,jfe=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,HT=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Ru=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Ufe=Ru(4),Vfe=Ru(6),Hfe=Ru(7),WT=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Wfe=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Zfe=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,oG=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,Gfe=oG,Kfe=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,qfe="^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$";function ZT(){return new RegExp(qfe,"u")}var GT=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,KT=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,qT=e=>{let t=Di(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},XT=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,QT=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,YT=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,JT=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,eE=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,tE=/^(?=.{1,253}$)([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,63}$/,lx=/^https?$/,rE=/^\+[1-9]\d{6,14}$/,qw=/^\d(?:[ -]?\d){11,18}$/,oE=/^(?:AED|AFN|ALL|AMD|AOA|ARS|AUD|AWG|AZN|BAM|BBD|BDT|BHD|BIF|BMD|BND|BOB|BOV|BRL|BSD|BTN|BWP|BYN|BZD|CAD|CDF|CHE|CHF|CHW|CLF|CLP|CNY|COP|COU|CRC|CUP|CVE|CZK|DJF|DKK|DOP|DZD|EGP|ERN|ETB|EUR|FJD|FKP|GBP|GEL|GHS|GIP|GMD|GNF|GTQ|GYD|HKD|HNL|HTG|HUF|IDR|ILS|INR|IQD|IRR|ISK|JMD|JOD|JPY|KES|KGS|KHR|KMF|KPW|KRW|KWD|KYD|KZT|LAK|LBP|LKR|LRD|LSL|LYD|MAD|MDL|MGA|MKD|MMK|MNT|MOP|MRU|MUR|MVR|MWK|MXN|MXV|MYR|MZN|NAD|NGN|NIO|NOK|NPR|NZD|OMR|PAB|PEN|PGK|PHP|PKR|PLN|PYG|QAR|RON|RSD|RUB|RWF|SAR|SBD|SCR|SDG|SEK|SGD|SHP|SLE|SOS|SRD|SSP|STN|SVC|SYP|SZL|THB|TJS|TMT|TND|TOP|TRY|TTD|TWD|TZS|UAH|UGX|USD|USN|UYI|UYU|UYW|UZS|VED|VES|VND|VUV|WST|XAD|XAF|XAG|XAU|XBA|XBB|XBC|XBD|XCD|XCG|XDR|XOF|XPD|XPF|XPT|XSU|XTS|XUA|XXX|YER|ZAR|ZMW|ZWG)$/,Xw=/^[A-Z]{2}(?!00|01|99)\d{2}[A-Z0-9]{11,30}$/,nG="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))";function Xfe(e){return new RegExp(`^${e}$`)}var nE=Xfe(nG);function zT(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function iE(e){return new RegExp(`^${zT(e)}$`)}function aE(e){let t=["Z"];e.offset&&t.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let r=`${zT({precision:e.precision,seconds:!0})}(?:${t.join("|")})`,n=e.local?`${r}|${zT({precision:e.precision})}`:r;return new RegExp(`^${nG}T(?:${n})$`)}var sE=/^[\s\S]{0,}$/,lE=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},cE=/^-?\d+n?$/,cx=/^-?\d+$/,nl=/^-?\d+(?:\.\d+)?$/,dE=/^(?:true|false)$/i,uE=/^null$/i;var fE=/^undefined$/i;var mE=/^[^A-Z]*$/,pE=/^[^a-z]*$/,hE=/^[0-9a-fA-F]*$/;function dx(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function ux(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var Qfe=/^[0-9a-fA-F]{32}$/,Yfe=dx(22,"=="),Jfe=ux(22),eme=/^[0-9a-fA-F]{40}$/,tme=dx(27,"="),rme=ux(27),ome=/^[0-9a-fA-F]{64}$/,nme=dx(43,"="),ime=ux(43),ame=/^[0-9a-fA-F]{96}$/,sme=dx(64,""),lme=ux(64),cme=/^[0-9a-fA-F]{128}$/,dme=dx(86,"=="),ume=ux(86);var Tt=j("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),gE=e=>{let t=e.value;return!Ow(t)&&t.size!==void 0},vE=e=>{let t=e.value;return!Ow(t)&&t.length!==void 0},Qw={number:"number",bigint:"bigint",object:"date"},Jw=j("$ZodCheckLessThan",(e,t)=>{Tt.init(e,t);let r=Qw[typeof t.value];e._zod.check=n=>{(t.inclusive?n.value<=t.value:n.value<t.value)||n.issues.push({origin:Qw[typeof n.value]??r,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),eS=j("$ZodCheckGreaterThan",(e,t)=>{Tt.init(e,t);let r=Qw[typeof t.value];e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:Qw[typeof n.value]??r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),xE=j("$ZodCheckMultipleOf",(e,t)=>{Tt.init(e,t),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?t.value!==BigInt(0)&&r.value%t.value===BigInt(0):qv(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),bE=j("$ZodCheckNumberFormat",(e,t)=>{Tt.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),n=r?"int":"number",[o,i]=Yv[t.format];e._zod.check=a=>{let s=a.value;if(r){if(!Number.isInteger(s)){a.issues.push({expected:n,format:t.format,code:"invalid_type",continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?a.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort}):a.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort});return}}s<o&&a.issues.push({origin:"number",input:s,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),s>i&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),yE=j("$ZodCheckBigIntFormat",(e,t)=>{Tt.init(e,t);let[r,n]=Jv[t.format];e._zod.check=o=>{let i=o.value;i<r&&o.issues.push({origin:"bigint",input:i,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),i>n&&o.issues.push({origin:"bigint",input:i,code:"too_big",maximum:n,inclusive:!0,inst:e,continue:!t.abort})}}),_E=j("$ZodCheckMaxSize",(e,t)=>{var r;Tt.init(e,t),(r=e._zod.def).when??(r.when=gE),e._zod.check=n=>{let o=n.value;o.size<=t.maximum||n.issues.push({origin:ex(o),code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),IE=j("$ZodCheckMinSize",(e,t)=>{var r;Tt.init(e,t),(r=e._zod.def).when??(r.when=gE),e._zod.check=n=>{let o=n.value;o.size>=t.minimum||n.issues.push({origin:ex(o),code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),wE=j("$ZodCheckSizeEquals",(e,t)=>{var r;Tt.init(e,t),(r=e._zod.def).when??(r.when=gE),e._zod.check=n=>{let o=n.value,i=o.size;if(i===t.size)return;let a=i>t.size;n.issues.push({origin:ex(o),...a?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),SE=j("$ZodCheckMaxLength",(e,t)=>{var r;Tt.init(e,t),(r=e._zod.def).when??(r.when=vE),e._zod.check=n=>{let o=n.value,i=o.length;if((typeof o=="string"&&i>t.maximum?Du(o):i)<=t.maximum)return;let s=tx(o);n.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),kE=j("$ZodCheckMinLength",(e,t)=>{var r;Tt.init(e,t),(r=e._zod.def).when??(r.when=vE),e._zod.check=n=>{let o=n.value,i=o.length;if((typeof o=="string"&&i>=t.minimum&&i<t.minimum*2?Du(o):i)>=t.minimum)return;let s=tx(o);n.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),CE=j("$ZodCheckLengthEquals",(e,t)=>{var r;Tt.init(e,t),(r=e._zod.def).when??(r.when=vE),e._zod.check=n=>{let o=n.value,i=o.length,a=typeof o=="string"&&i>=t.length&&i<=t.length*2?Du(o):i;if(a===t.length)return;let s=tx(o),l=a>t.length;n.issues.push({origin:s,...l?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Cp=j("$ZodCheckStringFormat",(e,t)=>{var r,n;Tt.init(e,t),t.pattern?(r=e._zod).check??(r.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),PE=j("$ZodCheckRegex",(e,t)=>{Cp.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),DE=j("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=mE),Cp.init(e,t)}),RE=j("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=pE),Cp.init(e,t)}),TE=j("$ZodCheckIncludes",(e,t)=>{Tt.init(e,t);let r=Di(t.includes),n=new RegExp(typeof t.position=="number"?`^.{${t.position},}${r}`:r);t.pattern=n,e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),EE=j("$ZodCheckStartsWith",(e,t)=>{Tt.init(e,t);let r=new RegExp(`^${Di(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),$E=j("$ZodCheckEndsWith",(e,t)=>{Tt.init(e,t);let r=new RegExp(`.*${Di(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}});function Yw(e,t,r){e.issues.length&&t.issues.push(...Dn(r,e.issues))}var AE=j("$ZodCheckProperty",(e,t)=>{Tt.init(e,t),e._zod.check=r=>{let n=t.schema._zod.run({value:r.value[t.property],issues:[]},{});if(n instanceof Promise)return n.then(o=>Yw(o,r,t.property));Yw(n,r,t.property)}}),OE=j("$ZodCheckProperties",(e,t)=>{Tt.init(e,t),rx(e,Symbol.iterator,function*(){yield e});let r;e._zod.check=n=>{if(n.value==null){n.issues.push({expected:"object",code:"invalid_type",input:n.value,inst:e});return}r??(r=Reflect.ownKeys(t.shape).map(a=>[a,t.shape[a]]));let o=n.value,i;for(let[a,s]of r){let l=s._zod.run({value:o[a],issues:[]},{});l instanceof Promise?(i??(i=[]),i.push(l.then(c=>Yw(c,n,a)))):Yw(l,n,a)}if(i)return Promise.all(i).then(()=>{})}}),zE=j("$ZodCheckMimeType",(e,t)=>{Tt.init(e,t);let r=new Set(t.mime);e._zod.check=n=>{r.has(n.value.type)||n.issues.push({code:"invalid_value",values:t.mime,input:n.value.type,inst:e,continue:!t.abort})}}),NE=j("$ZodCheckOverwrite",(e,t)=>{Tt.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});var Tu=class{constructor(t=[],r={}){this.content=[],this.indent=0,this.args=t,this.closed=r}indented(t){this.indent+=1;try{t(this)}finally{this.indent-=1}}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let n=t.split(`
|
|
61
|
+
`).filter(a=>a),o=Math.min(...n.map(a=>a.length-a.trimStart().length)),i=n.map(a=>a.slice(o)).map(a=>" ".repeat(this.indent*2)+a);for(let a of i)this.content.push(a)}compile(){let t=Function,r=this?.content??[""];return new t(...Object.keys(this.closed),`return function (${this.args.join(", ")}) {
|
|
62
|
+
${r.join(`
|
|
63
|
+
`)}
|
|
64
|
+
};`)(...Object.values(this.closed))}};var FE={major:4,minor:6,patch:5};var je=j("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=FE;let n=e._zod.def.checks,o=e._zod.traits.has("$ZodCheck")?[e,...n??[]]:n?.length?[...n]:[];for(let i of o)for(let a of i._zod.onattach)a(e);if(o.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let i=(s,l,c)=>{if(s.memo)return s;let d=nn(s),u;for(let f of l){if(f._zod.def.when){if(kT(s)||!f._zod.def.when(s))continue}else if(d)continue;let m=s.issues.length,p=f._zod.check(s);if(p instanceof Promise&&c?.async===!1)throw new Tn;if(u||p instanceof Promise)u=(u??Promise.resolve()).then(async()=>{await p,s.issues.length!==m&&(Fw(s.issues,m,e),d||(d=nn(s,m)))});else{if(s.issues.length===m)continue;Fw(s.issues,m,e),d||(d=nn(s,m))}}return u?u.then(()=>s):s},a=(s,l,c)=>{if(nn(s))return s.aborted=!0,s;let d=i(l,o,c);if(d instanceof Promise){if(c.async===!1)throw new Tn;return d.then(u=>e._zod.parse(u,c))}return e._zod.parse(d,c)};e._zod.run=(s,l)=>{if(l.skipChecks)return e._zod.parse(s,l);if(l.direction==="backward"){let d=e._zod.parse({value:s.value,issues:[]},{...l,skipChecks:!0});return d instanceof Promise?d.then(u=>a(u,s,l)):a(d,s,l)}let c=e._zod.parse(s,l);if(c instanceof Promise){if(l.async===!1)throw new Tn;return c.then(d=>i(d,o,l))}return i(c,o,l)}}},{get"~standard"(){return rx(this,"~standard",iS(this))},set"~standard"(e){zc(this,"~standard",e)}}),_G=(e,t)=>e.issues.length?{issues:e.issues.map(r=>Rn(r,t,vr()))}:{value:e.value};async function fme(e,t){let r={async:!0};return _G(await e._zod.run({value:t,issues:[]},r),r)}function iS(e){return{validate:t=>{let r={async:!1};try{let n=e._zod.run({value:t,issues:[]},r);if(!(n instanceof Promise))return _G(n,r)}catch{}return fme(e,t)},vendor:"zod",version:1}}var Eu=j("$ZodString",(e,t)=>{je.init(e,t),e._zod.pattern=t.pattern??sE,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),wt=j("$ZodStringFormat",(e,t)=>{Cp.init(e,t),Eu.init(e,t)}),ME=j("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=HT),wt.init(e,t)}),BE=j("$ZodUUID",(e,t)=>{if(t.version){let n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(n===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Ru(n))}else t.pattern??(t.pattern=Ru());wt.init(e,t)}),jE=j("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=WT),wt.init(e,t)}),UE=1,fx=2;function VE(e){try{return typeof URL<"u"&&typeof URL.canParse=="function"?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function aS(e,t){return!("normalize"in t)&&!("hostname"in t)&&!("protocol"in t)?VE(e)||fx:IG(e,t)}function IG(e,t){if(!t.normalize&&t.protocol?.source===lx.source&&!/^https?:\/\//i.test(e))return UE;try{if(typeof URL<"u"){let r=URL;if(typeof r.parse=="function")return r.parse(e)??fx}return new URL(e)}catch{return fx}}var mme=/[\t\n\r]/g;function mx(e){return e.replace(mme,"")}function sS(e,t){return t.lastIndex=0,t.test(e.hostname)}function lS(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(":")?e.protocol.slice(0,-1):e.protocol)}var HE=j("$ZodURL",(e,t)=>{wt.init(e,t),e._zod.check=r=>{try{let n=r.value.trim(),o=aS(n,t);if(o===UE){r.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:r.value,inst:e,continue:!t.abort});return}if(o===fx){r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort});return}if(o===!0){r.value=mx(n);return}t.hostname&&!sS(o,t.hostname)&&r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort}),t.protocol&&!lS(o,t.protocol)&&r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort}),r.value=t.normalize?o.href:mx(n);return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),WE=j("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=ZT()),wt.init(e,t)}),ZE=j("$ZodNanoID",(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw new Error(`Invalid nanoid length: ${t.length}`);t.pattern??(t.pattern=t.length===void 0?jT:UT(t.length)),wt.init(e,t)}),GE=j("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=NT),wt.init(e,t)}),KE=j("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=FT),wt.init(e,t)}),qE=j("$ZodULID",(e,t)=>{t.pattern??(t.pattern=LT),wt.init(e,t)}),XE=j("$ZodXID",(e,t)=>{t.pattern??(t.pattern=MT),wt.init(e,t)}),QE=j("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=BT),wt.init(e,t)}),YE=j("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=aE(t)),wt.init(e,t)}),JE=j("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=nE),wt.init(e,t)}),e$=j("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=iE(t)),wt.init(e,t)}),t$=j("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=VT),wt.init(e,t)}),r$=j("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=GT),wt.init(e,t)}),pme=/^[0-9a-fA-F:.]+$/;function px(e){return pme.test(e)?VE(`http://[${e}]`):!1}var o$=j("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=KT),wt.init(e,t),e._zod.check=r=>{px(r.value)||r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}),n$=j("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=qT(t.delimiter)),wt.init(e,t)}),i$=j("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=XT),wt.init(e,t)});function cS(e){let t=e.split("/");if(t.length!==2)return!1;let[r,n]=t;if(!n)return!1;let o=Number(n);return`${o}`!==n||o<0||o>128?!1:px(r)}var a$=j("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=QT),wt.init(e,t),e._zod.check=r=>{cS(r.value)||r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}});function hx(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var dS=/^[0-9a-zA-Z+/]*={0,2}$/,s$=j("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=dS),wt.init(e,t),e._zod.check=r=>{hx(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}}),gx=/^[A-Za-z0-9_-]*$/;function uS(e){if(!gx.test(e))return!1;let t=e.replace(/[-_]/g,n=>n==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return hx(r)}var l$=j("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=gx),wt.init(e,t),e._zod.check=r=>{uS(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),c$=j("$ZodE164",(e,t)=>{t.pattern??(t.pattern=rE),wt.init(e,t)}),hme=/[- ]/g;function gme(e){let t=e.length,r=1,n=0;for(;t;){let o=e.charCodeAt(--t)-48;r^=1,n+=r?[0,2,4,6,8,1,3,5,7,9][o]:o}return n%10===0}function fS(e){return qw.test(e)?gme(e.replace(hme,"")):!1}var d$=j("$ZodCreditCard",(e,t)=>{t.pattern??(t.pattern=qw),wt.init(e,t),e._zod.check=r=>{fS(r.value)||r.issues.push({code:"invalid_format",format:"credit_card",input:r.value,inst:e,continue:!t.abort})}});function vme(e){let t=0,r=e.length;for(let n=4;n<r;n++){let o=e.charCodeAt(n);t=(o>=65?t*100+(o-55):t*10+(o-48))%97}for(let n=0;n<4;n++){let o=e.charCodeAt(n);t=(o>=65?t*100+(o-55):t*10+(o-48))%97}return t===1}function mS(e){return Xw.test(e)?vme(e):!1}var u$=j("$ZodIBAN",(e,t)=>{t.pattern??(t.pattern=Xw),wt.init(e,t),e._zod.check=r=>{mS(r.value)||r.issues.push({code:"invalid_format",format:"iban",input:r.value,inst:e,continue:!t.abort})}});function pS(e,t=null){try{let r=e.split(".");if(r.length!==3)return!1;let[n]=r;if(!n)return!1;let o=JSON.parse(atob(n));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}}var f$=j("$ZodJWT",(e,t)=>{wt.init(e,t),e._zod.check=r=>{pS(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),m$=j("$ZodCustomStringFormat",(e,t)=>{wt.init(e,t),e._zod.check=r=>{t.fn(r.value)||r.issues.push({code:"invalid_format",format:t.format,input:r.value,inst:e,continue:!t.abort})}}),hS=j("$ZodNumber",(e,t)=>{je.init(e,t),e._zod.pattern=nl,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}let o=r.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return r;let i=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:String(o):void 0;return r.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...i?{received:i}:{}}),r}}),p$=j("$ZodNumberFormat",(e,t)=>{bE.init(e,t),hS.init(e,t)}),vx=j("$ZodBoolean",(e,t)=>{je.init(e,t),e._zod.pattern=dE,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=!!r.value}catch{}let o=r.value;return typeof o=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),r}}),gS=j("$ZodBigInt",(e,t)=>{je.init(e,t),e._zod.pattern=cE,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}}),h$=j("$ZodBigIntFormat",(e,t)=>{yE.init(e,t),gS.init(e,t)}),g$=j("$ZodSymbol",(e,t)=>{je.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;return typeof o=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:o,inst:e}),r}}),v$=j("$ZodUndefined",(e,t)=>{je.init(e,t),e._zod.pattern=fE,e._zod.values=new Set([void 0]),e._zod.parse=(r,n)=>{let o=r.value;return typeof o>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:o,inst:e}),r}}),x$=j("$ZodNull",(e,t)=>{je.init(e,t),e._zod.pattern=uE,e._zod.values=new Set([null]),e._zod.parse=(r,n)=>{let o=r.value;return o===null||r.issues.push({expected:"null",code:"invalid_type",input:o,inst:e}),r}}),b$=j("$ZodAny",(e,t)=>{je.init(e,t),e._zod.parse=r=>r}),y$=j("$ZodUnknown",(e,t)=>{je.init(e,t),e._zod.parse=r=>r}),_$=j("$ZodNever",(e,t)=>{je.init(e,t),e._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)}),I$=j("$ZodVoid",(e,t)=>{je.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;return typeof o>"u"||r.issues.push({expected:"void",code:"invalid_type",input:o,inst:e}),r}}),w$=j("$ZodDate",(e,t)=>{je.init(e,t),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}let o=r.value,i=o instanceof Date;return i&&!Number.isNaN(o.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:o,...i?{received:"Invalid Date"}:{},inst:e}),r}});function aG(e,t,r){e.issues.length&&t.issues.push(...Dn(r,e.issues)),t.value[r]=e.value}var S$=j("$ZodArray",(e,t)=>{je.init(e,t);let r=eo.memoizer;r?.attach(e),e._zod.parse=(n,o)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),n;n.value=r?r.alloc(e,n,Array(i.length),o):Array(i.length);let a=[],s=o?.abortEarly;for(let l=0;l<i.length;l++){let c=i[l],d=t.element._zod.run({value:c,issues:[]},o);if(d instanceof Promise)a.push(d.then(u=>aG(u,n,l)));else if(aG(d,n,l),s&&d.issues.length!==0&&nn(d))break}return a.length?Promise.all(a).then(()=>n):n}});function nS(e,t,r,n,o,i){let a=r in n,s=i==="optional";if(!(!a&&s&&o==="optional")){if(e.issues.length){if(o!==void 0&&s&&!a)return;t.issues.push(...Dn(r,e.issues))}if(!a&&o===void 0){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[r]});return}e.value===void 0?(a||o==="defaulted"&&!s)&&(t.value[r]=void 0):t.value[r]=e.value}}var xme=[];function wG(e){let t=Object.keys(e.shape),r=Object.getOwnPropertySymbols(e.shape),n=r.length?r:xme,o=n.length?[...t,...n]:t;for(let a of o)if(!e.shape?.[a]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${String(a)}": expected a Zod schema`);let i=ST(e.shape);return{...e,allKeys:o,symbolKeys:n,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(i)}}function SG(e,t,r,n,o,i,a){let s=[],l=o.keySet,c=o.catchall._zod,d=c.def.type,u=c.optin,f=c.optout,m=0;for(let p in t){if(a&&r.issues.length!==m){if(nn(r,m))break;m=r.issues.length}if(l.has(p))continue;if(p==="__proto__"){d==="never"&&s.push(p);continue}if(d==="never"){s.push(p);continue}let g=c.run({value:t[p],issues:[]},n);g instanceof Promise?e.push(g.then(b=>nS(b,r,p,t,u,f))):nS(g,r,p,t,u,f)}return s.length&&r.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:i,continue:!0}),e.length?Promise.all(e).then(()=>r):r}var kG=j("$ZodObject",(e,t)=>{je.init(e,t);let r=Object.getOwnPropertyDescriptor(t,"shape"),n=r?.get?r.get.raw:t.shape??{};if(n){let c=()=>{let d={...n};return Object.defineProperty(t,"shape",{value:d}),c.raw=d,d};c.raw=n,Object.defineProperty(t,"shape",{get:c})}let o=xp(()=>wG(t));Xe(e,"propValues",c=>{let d=c.def.shape,u={};for(let f in d){let m=d[f]._zod;if(m.values){Object.prototype.hasOwnProperty.call(u,f)||bo(u,f,new Set);for(let p of m.values)u[f].add(p);m.optin!==void 0&&u[f].add(void 0)}}return u});let i=Pu,a=t.catchall,s,l=eo.memoizer;l?.attach(e),e._zod.parse=(c,d)=>{s??(s=o.value);let u=c.value;if(!i(u))return c.issues.push({expected:"object",code:"invalid_type",input:u,inst:e}),c;c.value=l?l.alloc(e,c,{},d):{};let f=[],m=s.shape,p=d?.abortEarly,g=c.issues.length;for(let b of s.allKeys){if(p&&c.issues.length!==g){if(nn(c,g))break;g=c.issues.length}if(b==="__proto__")continue;let v=m[b],x=v._zod.optin,_=v._zod.optout,I=v._zod.run({value:u[b],issues:[]},d);I instanceof Promise?f.push(I.then(S=>nS(S,c,b,u,x,_))):nS(I,c,b,u,x,_)}return a?SG(f,u,c,d,o.value,e,p===!0):f.length?Promise.all(f).then(()=>c):c}}),k$=j("$ZodObjectJIT",(e,t)=>{kG.init(e,t);let r=e._zod.parse,n=xp(()=>wG(t)),o=eo.memoizer,i=m=>{let p=n.value,g=p.symbolKeys,b=new Tu(["payload","ctx"],{shape:m,inst:e,memo:o,syms:g}),v=S=>`shape[${S}]._zod.run({ value: input[${S}], issues: [] }, ctx)`,x=(S,w)=>`
|
|
65
|
+
let ${S}_ab = false;
|
|
66
|
+
for (let i = 0; i < ${S}.issues.length; i++) {
|
|
67
|
+
const iss = ${S}.issues[i];
|
|
68
|
+
iss.path = iss.path ? [${w}, ...iss.path] : [${w}];
|
|
69
|
+
payload.issues.push(iss);
|
|
70
|
+
if (iss.continue !== true) ${S}_ab = true;
|
|
71
|
+
}
|
|
72
|
+
if (${S}_ab && ctx && ctx.abortEarly) {
|
|
73
|
+
payload.value = newResult;
|
|
74
|
+
return payload;
|
|
75
|
+
}`;b.write("const input = payload.value;");let _=Object.create(null),I=0;for(let S of p.allKeys)_[S]=`key_${I++}`;b.write(o?"const newResult = memo.alloc(inst, payload, {}, ctx);":"const newResult = {};");for(let S of p.allKeys){if(S==="__proto__")continue;let w=_[S],P=typeof S=="symbol"?`syms[${g.indexOf(S)}]`:on(S),$=`${P} in input`,B=m[S],W=B?._zod?.optin,H=W!==void 0,K=B?._zod?.optout==="optional";if(b.write(`const ${w} = ${v(P)};`),H&&K){let T=W==="optional"?`${w}_present`:`${w}.value !== undefined || ${w}_present`;b.write(`
|
|
76
|
+
const ${w}_present = ${$};
|
|
77
|
+
if (!${w}.issues.length || ${w}_present) {
|
|
78
|
+
if (${w}.issues.length) {${x(w,P)}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
if (${T}) {
|
|
82
|
+
newResult[${P}] = ${w}.value;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
`)}else H?(b.write(`
|
|
87
|
+
if (${w}.issues.length) {${x(w,P)}
|
|
88
|
+
}
|
|
89
|
+
`),W==="defaulted"?b.write(`newResult[${P}] = ${w}.value;`):b.write(`
|
|
90
|
+
if (${w}.value !== undefined || ${$}) {
|
|
91
|
+
newResult[${P}] = ${w}.value;
|
|
92
|
+
}
|
|
93
|
+
`)):b.write(`
|
|
94
|
+
const ${w}_present = ${$};
|
|
95
|
+
if (${w}.issues.length) {${x(w,P)}
|
|
96
|
+
}
|
|
97
|
+
if (!${w}_present && !${w}.issues.length) {
|
|
98
|
+
payload.issues.push({
|
|
99
|
+
code: "invalid_type",
|
|
100
|
+
expected: "nonoptional",
|
|
101
|
+
input: undefined,
|
|
102
|
+
path: [${P}]
|
|
103
|
+
});
|
|
104
|
+
if (ctx && ctx.abortEarly) {
|
|
105
|
+
payload.value = newResult;
|
|
106
|
+
return payload;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
if (${w}_present) {
|
|
111
|
+
newResult[${P}] = ${w}.value;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
`)}return b.write("payload.value = newResult;"),b.write("return payload;"),b.compile()},a,s=Pu,l=!eo.jitless,d=l&&IT.value,u=t.catchall,f;e._zod.parse=(m,p)=>{f??(f=n.value);let g=m.value;return s(g)?l&&d&&p?.async===!1&&p.jitless!==!0?(a||(a=i(t.shape)),m=a(m,p),u?SG([],g,m,p,f,e,p?.abortEarly===!0):m):r(m,p):(m.issues.push({expected:"object",code:"invalid_type",input:g,inst:e}),m)}});function sG(e,t,r,n){for(let i of e)if(i.issues.length===0)return t.value=i.value,t;let o=e.filter(i=>!nn(i));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(i=>i.issues.map(a=>Rn(a,n,vr())))}),t)}var xx=j("$ZodUnion",(e,t)=>{je.init(e,t),Xe(e,"optin",n=>n.def.options.some(o=>o._zod.optin==="defaulted")?"defaulted":n.def.options.some(o=>o._zod.optin!==void 0)?"optional":void 0),Xe(e,"optout",n=>n.def.options.some(o=>o._zod.optout==="optional")?"optional":void 0),Xe(e,"values",n=>{if(n.def.options.every(o=>o._zod.values))return new Set(n.def.options.flatMap(o=>Array.from(o._zod.values)))}),Xe(e,"pattern",n=>{if(n.def.options.every(o=>o._zod.pattern)){let o=n.def.options.map(i=>i._zod.pattern);return new RegExp(`^(${o.map(i=>ol(i.source)).join("|")})$`)}});let r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(n,o)=>{if(r)return r(n,o);let i=!1,a=[];for(let s of t.options){let l=s._zod.run({value:n.value,issues:[]},o);if(l instanceof Promise)a.push(l),i=!0;else{if(l.issues.length===0)return l;a.push(l)}}return i?Promise.all(a).then(s=>sG(s,n,e,o)):sG(a,n,e,o)}});function lG(e,t,r,n){let o=[];for(let i=0;i<e.length;i++)e[i].issues.length===0&&o.push(i);return o.length===1?(t.value=e[o[0]].value,t):(o.length===0?t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(i=>i.issues.map(a=>Rn(a,n,vr())))}):t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:[],inclusive:!1,matches:o}),t)}var C$=j("$ZodXor",(e,t)=>{xx.init(e,t),t.inclusive=!1;let r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(n,o)=>{if(r)return r(n,o);let i=!1,a=[];for(let s of t.options){let l=s._zod.run({value:n.value,issues:[]},o);l instanceof Promise?(a.push(l),i=!0):a.push(l)}return i?Promise.all(a).then(s=>lG(s,n,e,o)):lG(a,n,e,o)}});function P$(e,t){let r=e._zod,n=r.bag.optionsMap;n||(n=CG(r.def),r.bag.optionsMap=n);let o=n.get(t);if(o===null)throw new Error(`Ambiguous discriminator value "${String(t)}"`);return o}function CG(e){let t=new Map;for(let r of e.options){let n=r._zod.propValues?.[e.discriminator];if(!n||n.size===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(r)}"`);for(let o of n)if(t.has(o)){if(o!==void 0)throw new Error(`Duplicate discriminator value "${String(o)}"`);t.set(o,null)}else t.set(o,r)}return t}var D$=j("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,xx.init(e,t);let r=e._zod.parse;Xe(e,"propValues",o=>{let i={},a=0;for(let s of o.def.options){let l=s._zod.propValues;if(!l||Object.keys(l).length===0)throw new Error(`Invalid discriminated union option at index "${o.def.options.indexOf(s)}"`);l[o.def.discriminator]?.has(void 0)&&a++;for(let[c,d]of Object.entries(l)){Object.prototype.hasOwnProperty.call(i,c)||bo(i,c,new Set);for(let u of d)i[c].add(u)}}return!o.def.unionFallback&&a>1&&i[o.def.discriminator]?.delete(void 0),i}),t.options.forEach((o,i)=>{let a=bp(o._zod.def);if(a&&!Object.prototype.hasOwnProperty.call(a,t.discriminator))throw new Error(`Invalid discriminated union option at index "${i}"`)});let n=xp(()=>CG(t));e._zod.parse=(o,i)=>{let a=o.value;if(!Pu(a))return o.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),o;let s=a?.[t.discriminator],l=n.value.get(s);return l&&(s!==void 0||i.direction!=="backward")?l._zod.run(o,i):t.unionFallback||i.direction==="backward"?r(o,i):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(n.value.keys()).filter(c=>n.value.get(c)!==null),input:a,path:[t.discriminator],inst:e}),o)}}),R$=j("$ZodIntersection",(e,t)=>{je.init(e,t),e._zod.parse=(r,n)=>{let o=r.value,i=t.left._zod.run({value:o,issues:[]},n),a=t.right._zod.run({value:o,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([l,c])=>cG(r,l,c)):cG(r,i,a)}});function Pp(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Pi(e)&&Pi(t)){let r=Object.keys(t),n=Object.keys(e).filter(i=>r.indexOf(i)!==-1),o={...e,...t};Object.prototype.hasOwnProperty.call(o,"__proto__")&&delete o.__proto__;for(let i of n){if(i==="__proto__")continue;let a=Pp(e[i],t[i]);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};o[i]=a.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let n=0;n<e.length;n++){let o=e[n],i=t[n],a=Pp(o,i);if(!a.valid)return{valid:!1,mergeErrorPath:[n,...a.mergeErrorPath]};r.push(a.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function cG(e,t,r){let n=new Map,o,i=new Map,a=(c,d)=>{let u;if(c.code==="unrecognized_keys"&&!c.path?.length)o??(o=c),u=c.keys;else if(c.code==="invalid_key"&&c.origin==="record"&&c.path?.length===1){let f=String(c.path[0]);i.has(f)||i.set(f,c),u=[f]}else return!1;for(let f of u)n.has(f)||n.set(f,{}),n.get(f)[d]=!0;return!0};for(let c of t.issues)a(c,"l")||e.issues.push(c);for(let c of r.issues)a(c,"r")||e.issues.push(c);let s=[...n].filter(([,c])=>c.l&&c.r).map(([c])=>c);if(s.length){let c=o?s.filter(d=>o.keys.includes(d)):[];c.length&&e.issues.push({...o,keys:c});for(let d of s)!c.includes(d)&&i.has(d)&&e.issues.push(i.get(d))}let l=Pp(t.value,r.value);if(!l.valid){if(nn(e))return e;throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(l.mergeErrorPath)}`)}return e.value=l.data,e}var vS=j("$ZodTuple",(e,t)=>{je.init(e,t);let r=t.items,n=eo.memoizer;n?.attach(e),e._zod.parse=(o,i)=>{let a=o.value;if(!Array.isArray(a))return o.issues.push({input:a,inst:e,expected:"tuple",code:"invalid_type"}),o;o.value=n?n.alloc(e,o,[],i):[];let s=[],l=dG(r,"optin"),c=dG(r,"optout");if(!t.rest){if(a.length<l)return o.issues.push({code:"too_small",minimum:l,inclusive:!0,input:a,inst:e,origin:"array"}),o;a.length>r.length&&o.issues.push({code:"too_big",maximum:r.length,inclusive:!0,input:a,inst:e,origin:"array"})}let d=new Array(r.length),u=t.rest?i?.abortEarly:void 0,f=!1;for(let m=0;m<r.length;m++){let p=r[m]._zod.run({value:a[m],issues:[]},i);p instanceof Promise?s.push(p.then(g=>{d[m]=g})):(d[m]=p,u&&!f&&p.issues.length&&(f=nn(p)))}if(t.rest&&!f){let m=r.length-1,p=a.slice(r.length),g=o.issues.length;for(let b of p){if(u&&o.issues.length!==g){if(nn(o,g))break;g=o.issues.length}m++;let v=t.rest._zod.run({value:b,issues:[]},i);v instanceof Promise?s.push(v.then(x=>uG(x,o,m))):uG(v,o,m)}}return s.length?Promise.all(s).then(()=>fG(d,o,r,a,c)):fG(d,o,r,a,c)}});function dG(e,t){for(let r=e.length-1;r>=0;r--)if(!(t==="optin"?e[r]._zod.optin!==void 0:e[r]._zod.optout==="optional"))return r+1;return 0}function uG(e,t,r){e.issues.length&&t.issues.push(...Dn(r,e.issues)),t.value[r]=e.value}function fG(e,t,r,n,o){for(let i=0;i<r.length;i++){let a=e[i],s=i<n.length;if(!s&&i>=o&&r[i]._zod.optin==="optional"){t.value.length=i;break}if(a.issues.length){if(!s&&i>=o){t.value.length=i;break}t.issues.push(...Dn(i,a.issues))}t.value[i]=a.value}for(let i=t.value.length-1;i>=n.length&&(r[i]._zod.optout==="optional"&&t.value[i]===void 0);i--)t.value.length=i;return t}var T$=j("$ZodRecord",(e,t)=>{je.init(e,t);let r=eo.memoizer;r?.attach(e),e._zod.parse=(n,o)=>{let i=n.value;if(!Pi(i))return n.issues.push({expected:"record",code:"invalid_type",input:i,inst:e}),n;let a=[],s=t.keyType._zod.values;if(s&&!t.partial){n.value=r?r.alloc(e,n,{},o):{};let l=new Set;for(let d of s)if(typeof d=="string"||typeof d=="number"||typeof d=="symbol"){if(l.add(typeof d=="number"?d.toString():d),d==="__proto__")continue;let u=t.keyType._zod.run({value:d,issues:[]},o);if(u instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(u.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:u.issues.map(p=>Rn(p,o,vr())),input:d,path:[d],inst:e});continue}let f=u.value;if(f==="__proto__")continue;let m=t.valueType._zod.run({value:i[d],issues:[]},o);m instanceof Promise?a.push(m.then(p=>{p.issues.length&&n.issues.push(...Dn(d,p.issues)),n.value[f]=p.value})):(m.issues.length&&n.issues.push(...Dn(d,m.issues)),n.value[f]=m.value)}let c;for(let d in i)if(!l.has(d))if(t.mode==="loose"){if(d==="__proto__")continue;n.value[d]=i[d]}else c=c??[],c.push(d);c&&c.length>0&&n.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:c,continue:!0})}else{n.value=r?r.alloc(e,n,{},o):{};let l;for(let c of Reflect.ownKeys(i)){if(c==="__proto__"||!Object.prototype.propertyIsEnumerable.call(i,c))continue;let d=t.keyType._zod.run({value:c,issues:[]},o);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof c=="string"&&nl.test(c)&&d.issues.length){let p=t.keyType._zod.run({value:Number(c),issues:[]},o);if(p instanceof Promise)throw new Error("Async schemas not supported in object keys currently");p.issues.length===0&&(d=p)}if(d.issues.length){t.mode==="loose"?n.value[c]=i[c]:s?(l=l??[],l.push(c)):n.issues.push({code:"invalid_key",origin:"record",issues:d.issues.map(p=>Rn(p,o,vr())),input:c,path:[c],inst:e});continue}let f=d.value;if(f==="__proto__")continue;let m=t.valueType._zod.run({value:i[c],issues:[]},o);m instanceof Promise?a.push(m.then(p=>{p.issues.length&&n.issues.push(...Dn(c,p.issues)),n.value[f]=p.value})):(m.issues.length&&n.issues.push(...Dn(c,m.issues)),n.value[f]=m.value)}l&&l.length>0&&n.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:l,continue:!0})}return a.length?Promise.all(a).then(()=>n):n}}),E$=j("$ZodMap",(e,t)=>{je.init(e,t);let r=eo.memoizer;r?.attach(e),e._zod.parse=(n,o)=>{let i=n.value;if(!(i instanceof Map))return n.issues.push({expected:"map",code:"invalid_type",input:i,inst:e}),n;let a=[];n.value=r?r.alloc(e,n,new Map,o):new Map;let s=o?.abortEarly,l=n.issues.length;for(let[c,d]of i){if(s&&n.issues.length!==l){if(nn(n,l))break;l=n.issues.length}let u=t.keyType._zod.run({value:c,issues:[]},o),f=t.valueType._zod.run({value:d,issues:[]},o);u instanceof Promise||f instanceof Promise?a.push(Promise.all([u,f]).then(([m,p])=>{mG(m,p,n,c,i,e,o)})):mG(u,f,n,c,i,e,o)}return a.length?Promise.all(a).then(()=>n):n}});function mG(e,t,r,n,o,i,a){e.issues.length&&(Qv.has(typeof n)?r.issues.push(...Dn(n,e.issues)):r.issues.push({code:"invalid_key",origin:"map",input:o,inst:i,issues:e.issues.map(s=>Rn(s,a,vr()))})),t.issues.length&&(Qv.has(typeof n)?r.issues.push(...Dn(n,t.issues)):r.issues.push({origin:"map",code:"invalid_element",input:o,inst:i,key:n,issues:t.issues.map(s=>Rn(s,a,vr()))})),r.value.set(e.value,t.value)}var $$=j("$ZodSet",(e,t)=>{je.init(e,t);let r=eo.memoizer;r?.attach(e),e._zod.parse=(n,o)=>{let i=n.value;if(!(i instanceof Set))return n.issues.push({input:i,inst:e,expected:"set",code:"invalid_type"}),n;let a=[];n.value=r?r.alloc(e,n,new Set,o):new Set;let s=o?.abortEarly,l=n.issues.length;for(let c of i){if(s&&n.issues.length!==l){if(nn(n,l))break;l=n.issues.length}let d=t.valueType._zod.run({value:c,issues:[]},o);d instanceof Promise?a.push(d.then(u=>pG(u,n))):pG(d,n)}return a.length?Promise.all(a).then(()=>n):n}});function pG(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}var A$=j("$ZodEnum",(e,t)=>{je.init(e,t);let r=gp(t.entries),n=new Set(r);e._zod.values=n,Xe(e,"pattern",o=>{let i=gp(o.def.entries).filter(a=>Qv.has(typeof a));return new RegExp(i.length?`^(${i.map(a=>Di(a.toString())).join("|")})$`:"^[^\\s\\S]$")}),e._zod.parse=(o,i)=>{let a=o.value;return n.has(a)||o.issues.push({code:"invalid_value",values:r,input:a,inst:e}),o}}),O$=j("$ZodLiteral",(e,t)=>{je.init(e,t);let r=new Set(t.values);e._zod.values=r,Xe(e,"pattern",n=>{let o=n.def.values;return new RegExp(o.length?`^(${o.map(i=>typeof i=="string"?Di(i):i?Di(i.toString()):String(i)).join("|")})$`:"^[^\\s\\S]$")}),e._zod.parse=(n,o)=>{let i=n.value;return r.has(i)||n.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),n}}),z$=j("$ZodFile",(e,t)=>{je.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;return o instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:o,inst:e}),r}}),N$=j("$ZodTransform",(e,t)=>{je.init(e,t),e._zod.optin="optional",eo.memoizer?.guard(e),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Nc(e.constructor.name);let o=t.transform(r.value,r);if(n.async)return(o instanceof Promise?o:Promise.resolve(o)).then(a=>(r.value=a,r));if(o instanceof Promise)throw new Tn;return r.value=o,r}});function hG(e,t){return e.value=t.issues.length?void 0:t.value,e}var xS=j("$ZodOptional",(e,t)=>{je.init(e,t),Xe(e,"optin",r=>r.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),e._zod.optout="optional",Xe(e,"values",r=>{let n=r.def.innerType._zod.values;return n?new Set([...n,void 0]):void 0}),Xe(e,"pattern",r=>{let n=r.def.innerType._zod.pattern;return n?new RegExp(`^(${ol(n.source)})?$`):void 0}),e._zod.parse=(r,n)=>{if(r.value===void 0){if(t.innerType._zod.optin!=="defaulted")return r;let o=t.innerType._zod.run({value:r.value,issues:[]},n);return o instanceof Promise?o.then(i=>hG(r,i)):hG(r,o)}return t.innerType._zod.run(r,n)}}),F$=j("$ZodExactOptional",(e,t)=>{xS.init(e,t),Xe(e,"values",r=>r.def.innerType._zod.values),Xe(e,"pattern",r=>r.def.innerType._zod.pattern),e._zod.parse=(r,n)=>t.innerType._zod.run(r,n)}),L$=j("$ZodNullable",(e,t)=>{je.init(e,t),Xe(e,"optin",r=>r.def.innerType._zod.optin),Xe(e,"optout",r=>r.def.innerType._zod.optout),Xe(e,"pattern",r=>{let n=r.def.innerType._zod.pattern;return n?new RegExp(`^(${ol(n.source)}|null)$`):void 0}),Xe(e,"values",r=>r.def.innerType._zod.values?new Set([...r.def.innerType._zod.values,null]):void 0),e._zod.parse=(r,n)=>r.value===null?r:t.innerType._zod.run(r,n)}),M$=j("$ZodDefault",(e,t)=>{je.init(e,t),e._zod.optin="defaulted",Xe(e,"values",r=>r.def.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);if(r.value===void 0)return r.value=t.defaultValue,r;let o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(i=>gG(i,t)):gG(o,t)}});function gG(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var B$=j("$ZodPrefault",(e,t)=>{je.init(e,t),e._zod.optin="defaulted",Xe(e,"values",r=>r.def.innerType._zod.values),e._zod.parse=(r,n)=>(n.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,n))}),j$=j("$ZodNonOptional",(e,t)=>{je.init(e,t),Xe(e,"values",r=>{let n=r.def.innerType._zod.values;return n?new Set([...n].filter(o=>o!==void 0)):void 0}),e._zod.parse=(r,n)=>{let o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(i=>vG(i,e)):vG(o,e)}});function vG(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}var U$=j("$ZodSuccess",(e,t)=>{je.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Nc("ZodSuccess");let o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(i=>(r.value=i.issues.length===0,r)):(r.value=o.issues.length===0,r)}});function xG(e,t,r,n){return t.issues.length?(e.value=r.catchValue({...t,value:e.value,error:{issues:t.issues.map(o=>Rn(o,n,vr()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}var V$=j("$ZodCatch",(e,t)=>{je.init(e,t),Xe(e,"optin",r=>r.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),Xe(e,"optout",r=>r.def.innerType._zod.optout),Xe(e,"values",r=>r.def.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);let o=t.innerType._zod.run({value:r.value,issues:[]},n);return o instanceof Promise?o.then(i=>xG(r,i,t,n)):xG(r,o,t,n)}}),H$=j("$ZodNaN",(e,t)=>{je.init(e,t),e._zod.parse=(r,n)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:e,expected:"nan",code:"invalid_type"}),r)}),bS=j("$ZodPipe",(e,t)=>{je.init(e,t),Xe(e,"values",r=>r.def.in._zod.values),Xe(e,"optin",r=>r.def.in._zod.optin),Xe(e,"optout",r=>r.def.out._zod.optout),Xe(e,"propValues",r=>r.def.in._zod.propValues),e._zod.parse=(r,n)=>{if(n.direction==="backward"){let i=t.out._zod.run(r,n);return i instanceof Promise?i.then(a=>tS(a,t.in,n)):tS(i,t.in,n)}let o=t.in._zod.run(r,n);return o instanceof Promise?o.then(i=>tS(i,t.out,n)):tS(o,t.out,n)}});function tS(e,t,r){return e.issues.some(n=>n.code!=="unrecognized_keys")?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}var bx=j("$ZodCodec",(e,t)=>{je.init(e,t),Xe(e,"values",r=>r.def.in._zod.values),Xe(e,"optin",r=>r.def.in._zod.optin),Xe(e,"optout",r=>r.def.out._zod.optout),Xe(e,"propValues",r=>r.def.in._zod.propValues),e._zod.parse=(r,n)=>{if((n.direction||"forward")==="forward"){let i=t.in._zod.run(r,n);return i instanceof Promise?i.then(a=>rS(a,t,n)):rS(i,t,n)}else{let i=t.out._zod.run(r,n);return i instanceof Promise?i.then(a=>rS(a,t,n)):rS(i,t,n)}}});function rS(e,t,r){if(e.issues.length)return e.aborted=!0,e;if((r.direction||"forward")==="forward"){let o=t.transform(e.value,e);return o instanceof Promise?o.then(i=>oS(e,i,t.out,r)):oS(e,o,t.out,r)}else{let o=t.reverseTransform(e.value,e);return o instanceof Promise?o.then(i=>oS(e,i,t.in,r)):oS(e,o,t.in,r)}}function oS(e,t,r,n){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:t,issues:e.issues},n)}var W$=j("$ZodPreprocess",(e,t)=>{bS.init(e,t)}),Z$=j("$ZodReadonly",(e,t)=>{je.init(e,t),Xe(e,"propValues",r=>r.def.innerType._zod.propValues),Xe(e,"values",r=>r.def.innerType._zod.values),Xe(e,"optin",r=>r.def.innerType?._zod?.optin),Xe(e,"optout",r=>r.def.innerType?._zod?.optout),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);let o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(bG):bG(o)}});function bG(e){return e.memo||(e.value=Object.freeze(e.value)),e}function bme(e){let t=e._zod.def,r=t.pattern,n=!!t.format?.includes("int"),o,i;for(let s of t.checks??[]){let l=s._zod.def;l.pattern&&(r=l.pattern),n||(n=!!l.format?.includes("int"));let c=l.minimum??l.length,d=l.maximum??l.length;c!==void 0&&(o===void 0||c>o)&&(o=c),d!==void 0&&(i===void 0||d<i)&&(i=d)}if(r)return r.source;if(o!==void 0&&i!==void 0&&o>i)return"(?!)";if(o!==void 0||i!==void 0)return lE({minimum:o,maximum:i}).source;let a=e._zod.pattern;return(n&&a===nl?cx:a)?.source}function LE(e){let t=e._zod.def,r=e._zod.pattern?.source,n=t.innerType??e._zod.innerType;if(n){let o=n._zod.pattern?.source,i=LE(n);return r&&o&&i&&i!==o?r.replace(ol(o),()=>ol(i)):r}if(t.options){let o=t.options.map(LE);if(o.every(Boolean))return`^(${o.map(i=>ol(i)).join("|")})$`}return bme(e)}var G$=j("$ZodTemplateLiteral",(e,t)=>{je.init(e,t);let r=[];for(let n of t.parts)if(typeof n=="object"&&n!==null){let o=LE(n);if(!o)throw new Error(`Invalid template literal part, no pattern found: ${[...n._zod.traits].shift()}`);r.push(ol(o))}else if(n===null||wT.has(typeof n))r.push(Di(`${n}`));else throw new Error(`Invalid template literal part: ${n}`);e._zod.pattern=new RegExp(`^${r.join("")}$`),e._zod.parse=(n,o)=>typeof n.value!="string"?(n.issues.push({input:n.value,inst:e,expected:"string",code:"invalid_type"}),n):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(n.value)||n.issues.push({input:n.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),n)}),K$=j("$ZodFunction",(e,t)=>(je.init(e,t),Object.defineProperty(e,"_def",{value:t}),e._zod.def=t,e.implement=r=>{if(typeof r!="function")throw new Error("implement() must be called with a function");return Object.defineProperty(function(...n){let o=e._def.input?Ip(e._def.input,n):n,i=Reflect.apply(r,this,o);return e._def.output?Ip(e._def.output,i):i},"_zod",{value:e._zod,enumerable:!1})},e.implementAsync=r=>{if(typeof r!="function")throw new Error("implementAsync() must be called with a function");return Object.defineProperty(async function(...n){let o=e._def.input?await Bw(e._def.input,n):n,i=await Reflect.apply(r,this,o);return e._def.output?await Bw(e._def.output,i):i},"_zod",{value:e._zod,enumerable:!1})},e._zod.parse=(r,n)=>typeof r.value!="function"?(r.issues.push({code:"invalid_type",expected:"function",input:r.value,inst:e}),r):(e._def.output&&e._def.output._zod.def.type==="promise"?r.value=e.implementAsync(r.value):r.value=e.implement(r.value),r),e.input=(...r)=>{let n=e.constructor;return Array.isArray(r[0])?new n({type:"function",input:new vS({type:"tuple",items:r[0],rest:r[1]}),output:e._def.output}):new n({type:"function",input:r[0],output:e._def.output})},e.output=r=>{let n=e.constructor;return new n({type:"function",input:e._def.input,output:r})},e)),q$=j("$ZodPromise",(e,t)=>{je.init(e,t),e._zod.parse=(r,n)=>Promise.resolve(r.value).then(o=>t.innerType._zod.run({value:o,issues:[]},n))}),yx=j("$ZodLazy",(e,t)=>{je.init(e,t),yT(e._zod,"innerType",()=>{let r=t;return r._cachedInner||(r._cachedInner=t.getter()),r._cachedInner}),Xe(e,"pattern",r=>r.innerType?._zod?.pattern),Xe(e,"propValues",r=>r.innerType?._zod?.propValues),Xe(e,"optin",r=>r.innerType?._zod?.optin??void 0),Xe(e,"optout",r=>r.innerType?._zod?.optout??void 0),e._zod.parse=(r,n)=>e._zod.innerType._zod.run(r,n)}),X$=j("$ZodCustom",(e,t)=>{Tt.init(e,t),je.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{let n=r.value,o=t.fn(n);if(o instanceof Promise)return o.then(i=>yG(i,r,n,e));yG(o,r,n,e)}});function yG(e,t,r,n){if(!e){let o={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(o.params=n._zod.def.params),t.issues.push(yp(o))}}var wS=class extends Error{constructor(){super("Cannot parse a reference cycle that closes through a transform"),this.name="ZodCyclicError"}},Y$="~memo",DG=[];function RG(e){return e!==null&&typeof e=="object"}function Q$(e){return e.map(t=>t.path?{...t,path:t.path.slice()}:{...t})}var TG=new WeakMap,Dp=0,IS=1,_x=2;function Ix(e,t,r){let n=TG.get(e);if(n!==void 0)return n?_x:Dp;if(t.has(e))return _x;t.add(e);let o=Dp,i=d=>{if(o!==_x&&d?._zod){let u=Ix(d,t,r);u>o&&(o=u)}},a=(d,u)=>{let f=Dp;for(let m of Reflect.ownKeys(d)){let p=Object.getOwnPropertyDescriptor(d,m);if(u&&!p.enumerable)continue;let g=p.get?IS:p.value?._zod?Ix(p.value,t,r):Dp;g>f&&(f=g)}return f},s=d=>{d>o&&(o=d)},l=e._zod.def,c=l.type;switch(c){case"object":{let d=bp(l);s(d?a(d,!0):IS),i(l.catchall);break}case"array":i(l.element);break;case"tuple":for(let d of l.items)i(d);i(l.rest);break;case"record":case"map":i(l.keyType),i(l.valueType);break;case"set":i(l.valueType);break;case"union":for(let d of l.options)i(d);break;case"intersection":i(l.left),i(l.right);break;case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":i(l.innerType);break;case"pipe":i(l.in),i(l.out);break;case"function":i(l.input),i(l.output);break;case"lazy":{let d=l._cachedInner??(r?e._zod.innerType:void 0);s(d?Ix(d,t,!1):IS);break}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":break;default:for(let d in l){let u=Object.getOwnPropertyDescriptor(l,d);if(!u||u.get)continue;let f=u.value;if(!(!f||typeof f!="object")){if(f._zod)i(f);else if(Array.isArray(f))for(let m of f)i(m)}}}return t.delete(e),yme(e,o)}function yme(e,t){return t!==IS&&TG.set(e,t===_x),t}function SS(e){return Ix(e,new Set,!0)!==Dp}function _me(e,t){let r=e.buckets.get(t);return r||(r=new WeakMap,e.buckets.set(t,r)),r}var yS,_S=[],Ime={alloc(e,t,r){let n=yS;if(!n)return r;yS=void 0;let o={value:r,issues:null};return n.set(t.value,o),_S.push(o),r},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let r=e._zod.parse,n=(o,i)=>{if(i.direction!=="backward"&&kS(i,o.value))throw new wS;return r(o,i)};e._zod.parse=n,e._zod.run===r&&(e._zod.run=n)})},attach(e){var t;let r,n=!1,o,i;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let a=e._zod.parse,s=(l,c)=>{if(r===void 0){let v=Ix(e,new Set,!1);if(v===Dp)return e._zod.parse=a,e._zod.run===s&&(e._zod.run=a),a(l,c);v===_x||n?r=!0:n=!0}let d=l.value;if(!RG(d))return a(l,c);let u=c[Y$];u||(u={buckets:new WeakMap,backEdges:void 0},c[Y$]=u);let f;o===c?f=i:(f=_me(u,e),o=c,i=f);let m=f.get(d);if(m)return l.value=m.value,m.issues?m.issues.length&&l.issues.push(...Q$(m.issues)):(l.memo=!0,u.backEdges??(u.backEdges=new WeakSet),u.backEdges.add(m.value)),l;yS=f;let p=_S.length,g=a(l,c);yS=void 0;let b=_S.length>p?_S.pop():void 0;return g instanceof Promise?g.then(v=>(b&&(b.issues=v.issues.length?Q$(v.issues):DG),v)):(b&&(b.issues=g.issues.length?Q$(g.issues):DG),g)};e._zod.parse=s,e._zod.run===a&&(e._zod.run=s)})}};function wx(){return Ime}function kS(e,t){let r=e[Y$]?.backEdges;return r!==void 0&&RG(t)&&r.has(t)}var kx={};ys(kx,{ar:()=>EG,az:()=>$G,be:()=>OG,bg:()=>zG,bn:()=>NG,ca:()=>FG,ckb:()=>LG,cs:()=>MG,da:()=>BG,de:()=>jG,el:()=>UG,en:()=>CS,eo:()=>VG,es:()=>HG,fa:()=>WG,fi:()=>ZG,fr:()=>GG,frCA:()=>KG,gu:()=>qG,he:()=>XG,hi:()=>QG,hr:()=>YG,hu:()=>JG,hy:()=>tK,id:()=>rK,is:()=>oK,it:()=>nK,ja:()=>iK,ka:()=>aK,kh:()=>sK,km:()=>PS,kn:()=>lK,ko:()=>cK,lt:()=>uK,mk:()=>fK,ms:()=>mK,ne:()=>pK,nl:()=>hK,nn:()=>gK,no:()=>vK,ota:()=>xK,pl:()=>yK,ps:()=>bK,pt:()=>_K,ptBR:()=>IK,ro:()=>wK,ru:()=>kK,sk:()=>CK,sl:()=>PK,sv:()=>DK,ta:()=>RK,tg:()=>TK,th:()=>EK,tk:()=>$K,tr:()=>AK,ua:()=>OK,uk:()=>DS,ur:()=>zK,uz:()=>NK,vi:()=>FK,yo:()=>BK,zhCN:()=>LK,zhTW:()=>MK});var wme=()=>{let e={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},map:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function t(o){return e[o]??null}let r={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",mac:"\u0639\u0646\u0648\u0627\u0646 MAC",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",credit_card:"\u0631\u0642\u0645 \u0628\u0637\u0627\u0642\u0629 \u0627\u0644\u0627\u0626\u062A\u0645\u0627\u0646",currency_code:"\u0631\u0645\u0632 \u0627\u0644\u0639\u0645\u0644\u0629",iban:"IBAN",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 instanceof ${o.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${s}`:`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${i}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${s}`}case"invalid_value":return o.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${J(o.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${o.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${o.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${o.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${o.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${o.minimum.toString()} ${a.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${o.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${o.prefix}"`:i.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${i.suffix}"`:i.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${i.includes}"`:i.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${i.pattern}`:`${r[i.format]??o.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case"not_multiple_of":return`\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${o.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${o.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${o.keys.length>1?"\u0629":""}: ${V(o.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${o.origin}`;case"invalid_union":return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case"invalid_element":return`\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${o.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}};function EG(){return{localeError:wme()}}var Sme=()=>{let e={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"},map:{unit:"element",verb:"olmal\u0131d\u0131r"}};function t(o){return e[o]??null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",credit_card:"kredit kart\u0131 n\xF6mr\u0259si",currency_code:"valyuta kodu",iban:"IBAN",jwt:"JWT",template_literal:"input"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${o.expected}, daxil olan ${s}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${i}, daxil olan ${s}`}case"invalid_value":return o.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${J(o.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${o.origin??"d\u0259y\u0259r"} ${i}${o.maximum.toString()} ${a.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${o.origin??"d\u0259y\u0259r"} ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${o.origin} ${i}${o.minimum.toString()} ${a.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${o.origin} ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${i.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:i.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${i.suffix}" il\u0259 bitm\u0259lidir`:i.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${i.includes}" daxil olmal\u0131d\u0131r`:i.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${i.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${r[i.format]??o.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${o.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${o.keys.length>1?"lar":""}: ${V(o.keys,", ")}`;case"invalid_key":return`${o.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${o.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}};function $G(){return{localeError:Sme()}}function AG(e,t,r,n){let o=Math.abs(e),i=o%10,a=o%100;return a>=11&&a<=19?n:i===1?t:i>=2&&i<=4?r:n}var kme=()=>{let e={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},map:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function t(o){return e[o]??null}let r={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",mac:"MAC \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",credit_card:"\u043D\u0443\u043C\u0430\u0440 \u043A\u0440\u044D\u0434\u044B\u0442\u043D\u0430\u0439 \u043A\u0430\u0440\u0442\u044B",currency_code:"\u043A\u043E\u0434 \u0432\u0430\u043B\u044E\u0442\u044B",iban:"IBAN",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"},n={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${o.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${s}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${i}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${s}`}case"invalid_value":return o.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${J(o.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);if(a){let s=Number(o.maximum),l=AG(s,a.unit.one,a.unit.few,a.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${o.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${i}${o.maximum.toString()} ${l}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${o.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);if(a){let s=Number(o.minimum),l=AG(s,a.unit.one,a.unit.few,a.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${o.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${i}${o.minimum.toString()} ${l}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${o.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${i.includes}"`:i.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${r[i.format]??o.format}`}case"not_multiple_of":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${o.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${o.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${V(o.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${o.origin}`;case"invalid_union":return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case"invalid_element":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${o.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}};function OG(){return{localeError:kme()}}var Cme=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},map:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function t(o){return e[o]??null}let r={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",mac:"MAC \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",credit_card:"\u043D\u043E\u043C\u0435\u0440 \u043D\u0430 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u0430 \u043A\u0430\u0440\u0442\u0430",currency_code:"\u043A\u043E\u0434 \u043D\u0430 \u0432\u0430\u043B\u0443\u0442\u0430",iban:"IBAN",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"},n={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${o.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${s}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${i}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${s}`}case"invalid_value":return o.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${J(o.values[0])}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${o.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${i}${o.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${o.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${o.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${i}${o.minimum.toString()} ${a.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${o.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;if(i.format==="starts_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${i.prefix}"`;if(i.format==="ends_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${i.suffix}"`;if(i.format==="includes")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${i.includes}"`;if(i.format==="regex")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${i.pattern}`;let a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return i.format==="emoji"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="datetime"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="date"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),i.format==="time"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="duration"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${a} ${r[i.format]??o.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${o.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${o.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${o.keys.length>1?"\u043E\u0432\u0435":""}: ${V(o.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${o.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434";case"invalid_element":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${o.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}};function zG(){return{localeError:Cme()}}var Pme=()=>{let e={string:{unit:"\u0985\u0995\u09CD\u09B7\u09B0",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"},file:{unit:"\u09AC\u09BE\u0987\u099F",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"},array:{unit:"\u0986\u0987\u099F\u09C7\u09AE",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"},set:{unit:"\u0986\u0987\u099F\u09C7\u09AE",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"},map:{unit:"\u098F\u09A8\u09CD\u099F\u09CD\u09B0\u09BF",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"}};function t(o){return e[o]??null}let r={regex:"\u0987\u09A8\u09AA\u09C1\u099F",email:"\u0987\u09AE\u09C7\u0987\u09B2 \u09A0\u09BF\u0995\u09BE\u09A8\u09BE",url:"URL",emoji:"\u0987\u09AE\u09CB\u099C\u09BF",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u09A4\u09BE\u09B0\u09BF\u0996 \u0993 \u09B8\u09AE\u09AF\u09BC",date:"ISO \u09A4\u09BE\u09B0\u09BF\u0996",time:"ISO \u09B8\u09AE\u09AF\u09BC",duration:"ISO \u09B8\u09AE\u09AF\u09BC\u0995\u09BE\u09B2",ipv4:"IPv4 \u09A0\u09BF\u0995\u09BE\u09A8\u09BE",ipv6:"IPv6 \u09A0\u09BF\u0995\u09BE\u09A8\u09BE",mac:"MAC \u09A0\u09BF\u0995\u09BE\u09A8\u09BE",cidrv4:"IPv4 \u09B0\u09C7\u099E\u09CD\u099C",cidrv6:"IPv6 \u09B0\u09C7\u099E\u09CD\u099C",base64:"base64-\u098F\u09A8\u0995\u09CB\u09A1\u09C7\u09A1 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982",base64url:"base64url-\u098F\u09A8\u0995\u09CB\u09A1\u09C7\u09A1 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982",json_string:"JSON \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982",e164:"E.164 \u09A8\u09AE\u09CD\u09AC\u09B0",credit_card:"\u0995\u09CD\u09B0\u09C7\u09A1\u09BF\u099F \u0995\u09BE\u09B0\u09CD\u09A1 \u09A8\u09AE\u09CD\u09AC\u09B0",currency_code:"\u09AE\u09C1\u09A6\u09CD\u09B0\u09BE \u0995\u09CB\u09A1",iban:"IBAN",jwt:"JWT",template_literal:"\u0987\u09A8\u09AA\u09C1\u099F"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return`\u0985\u09AC\u09C8\u09A7 \u0987\u09A8\u09AA\u09C1\u099F: \u09AA\u09CD\u09B0\u09A4\u09CD\u09AF\u09BE\u09B6\u09BF\u09A4 ${i}, \u09AA\u09CD\u09B0\u09BE\u09AA\u09CD\u09A4 ${s}`}case"invalid_value":return o.values.length===1?`\u0985\u09AC\u09C8\u09A7 \u0987\u09A8\u09AA\u09C1\u099F: \u09AA\u09CD\u09B0\u09A4\u09CD\u09AF\u09BE\u09B6\u09BF\u09A4 ${J(o.values[0])}`:`\u0985\u09AC\u09C8\u09A7 \u0985\u09AA\u09B6\u09A8: ${V(o.values," | ")} \u098F\u09B0 \u09AE\u09A7\u09CD\u09AF\u09C7 \u098F\u0995\u099F\u09BF \u09AA\u09CD\u09B0\u09A4\u09CD\u09AF\u09BE\u09B6\u09BF\u09A4`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\u0985\u09A8\u09C7\u0995 \u09AC\u09A1\u09BC: ${o.origin??"\u09AE\u09BE\u09A8"} ${i}${o.maximum.toString()} ${a.unit??"\u098F\u09B2\u09BF\u09AE\u09C7\u09A8\u09CD\u099F"} \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`:`\u0985\u09A8\u09C7\u0995 \u09AC\u09A1\u09BC: ${o.origin??"\u09AE\u09BE\u09A8"} ${i}${o.maximum.toString()} \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\u0985\u09A8\u09C7\u0995 \u099B\u09CB\u099F: ${o.origin} ${i}${o.minimum.toString()} ${a.unit} \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`:`\u0985\u09A8\u09C7\u0995 \u099B\u09CB\u099F: ${o.origin} ${i}${o.minimum.toString()} \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0985\u09AC\u09C8\u09A7 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982: "${i.prefix}" \u09A6\u09BF\u09AF\u09BC\u09C7 \u09B6\u09C1\u09B0\u09C1 \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`:i.format==="ends_with"?`\u0985\u09AC\u09C8\u09A7 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982: "${i.suffix}" \u09A6\u09BF\u09AF\u09BC\u09C7 \u09B6\u09C7\u09B7 \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`:i.format==="includes"?`\u0985\u09AC\u09C8\u09A7 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982: "${i.includes}" \u0985\u09A8\u09CD\u09A4\u09B0\u09CD\u09AD\u09C1\u0995\u09CD\u09A4 \u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7`:i.format==="regex"?`\u0985\u09AC\u09C8\u09A7 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982: ${i.pattern} \u09AA\u09CD\u09AF\u09BE\u099F\u09BE\u09B0\u09CD\u09A8 \u09AE\u09BF\u09B2\u09A4\u09C7 \u09B9\u09AC\u09C7`:`\u0985\u09AC\u09C8\u09A7 ${r[i.format]??o.format}`}case"not_multiple_of":return`\u0985\u09AC\u09C8\u09A7 \u09A8\u09AE\u09CD\u09AC\u09B0: ${o.divisor} \u098F\u09B0 \u0997\u09C1\u09A3\u09BF\u09A4\u0995 \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`;case"unrecognized_keys":return`\u0985\u099A\u09C7\u09A8\u09BE \u0995\u09C0${o.keys.length>1?"\u0997\u09C1\u09B2\u09CB":""}: ${V(o.keys,", ")}`;case"invalid_key":return`${o.origin} \u098F \u0985\u09AC\u09C8\u09A7 \u0995\u09C0`;case"invalid_union":return o.options&&Array.isArray(o.options)&&o.options.length>0?`\u0985\u09AC\u09C8\u09A7 \u09A1\u09BF\u09B8\u0995\u09CD\u09B0\u09BF\u09AE\u09BF\u09A8\u09C7\u099F\u09B0 \u09AE\u09BE\u09A8\u0964 \u09AA\u09CD\u09B0\u09A4\u09CD\u09AF\u09BE\u09B6\u09BF\u09A4 ${o.options.map(a=>`'${a}'`).join(" | ")}`:"\u0985\u09AC\u09C8\u09A7 \u0987\u09A8\u09AA\u09C1\u099F";case"invalid_element":return`${o.origin} \u098F \u0985\u09AC\u09C8\u09A7 \u09AE\u09BE\u09A8`;default:return"\u0985\u09AC\u09C8\u09A7 \u0987\u09A8\u09AA\u09C1\u099F"}}};function NG(){return{localeError:Pme()}}var Dme=()=>{let e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"},map:{unit:"elements",verb:"contenir"}};function t(o){return e[o]??null}let r={regex:"entrada",email:"adre\xE7a electr\xF2nica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",mac:"adre\xE7a MAC",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",credit_card:"n\xFAmero de targeta de cr\xE8dit",currency_code:"codi de moneda",iban:"IBAN",jwt:"JWT",template_literal:"entrada"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${o.expected}, s'ha rebut ${s}`:`Tipus inv\xE0lid: s'esperava ${i}, s'ha rebut ${s}`}case"invalid_value":return o.values.length===1?`Valor inv\xE0lid: s'esperava ${J(o.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${V(o.values," o ")}`;case"too_big":{let i=o.inclusive?"com a m\xE0xim":"menys de",a=t(o.origin);return a?`Massa gran: s'esperava que ${o.origin??"el valor"} contingu\xE9s ${i} ${o.maximum.toString()} ${a.unit??"elements"}`:`Massa gran: s'esperava que ${o.origin??"el valor"} fos ${i} ${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?"com a m\xEDnim":"m\xE9s de",a=t(o.origin);return a?`Massa petit: s'esperava que ${o.origin} contingu\xE9s ${i} ${o.minimum.toString()} ${a.unit}`:`Massa petit: s'esperava que ${o.origin} fos ${i} ${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${i.prefix}"`:i.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${i.suffix}"`:i.format==="includes"?`Format inv\xE0lid: ha d'incloure "${i.includes}"`:i.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${i.pattern}`:`Format inv\xE0lid per a ${r[i.format]??o.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${o.divisor}`;case"unrecognized_keys":return`Clau${o.keys.length>1?"s":""} no reconeguda${o.keys.length>1?"s":""}: ${V(o.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${o.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${o.origin}`;default:return"Entrada inv\xE0lida"}}};function FG(){return{localeError:Dme()}}var Rme=()=>{let e={string:{unit:"\u067E\u06CC\u062A",verb:"\u0628\u06CE\u062A"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u0628\u06CE\u062A"},array:{unit:"\u062F\u0627\u0646\u06D5",verb:"\u0628\u06CE\u062A"},set:{unit:"\u062F\u0627\u0646\u06D5",verb:"\u0628\u06CE\u062A"},map:{unit:"\u062F\u0627\u0646\u06D5",verb:"\u0628\u06CE\u062A"}};function t(o){return e[o]??null}let r={regex:"regex",email:"\u0626\u06CC\u0645\u06D5\u06CC\u06B5",url:"\u0628\u06D5\u0633\u062A\u06D5\u0631 (URL)",emoji:"\u0626\u06CC\u0645\u06C6\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0695\u06CE\u06A9\u06D5\u0648\u062A \u0648 \u06A9\u0627\u062A",date:"\u0695\u06CE\u06A9\u06D5\u0648\u062A",time:"\u06A9\u0627\u062A",duration:"\u0645\u0627\u0648\u06D5",ipv4:"\u0646\u0627\u0648\u0646\u06CC\u0634\u0627\u0646\u06CC IPv4",ipv6:"\u0646\u0627\u0648\u0646\u06CC\u0634\u0627\u0646\u06CC IPv6",mac:"\u0646\u0627\u0648\u0646\u06CC\u0634\u0627\u0646\u06CC MAC",cidrv4:"\u0645\u06D5\u0648\u062F\u0627\u06CC IPv4",cidrv6:"\u0645\u06D5\u0648\u062F\u0627\u06CC IPv6",base64:"\u062F\u06D5\u0642\u06CC base64",base64url:"\u062F\u06D5\u0642\u06CC base64url",json_string:"\u062F\u06D5\u0642\u06CC JSON",e164:"\u0698\u0645\u0627\u0631\u06D5\u06CC E.164",credit_card:"\u0698\u0645\u0627\u0631\u06D5\u06CC \u06A9\u0627\u0631\u062A\u06CC \u06A9\u0631\u06CE\u062F\u06CC\u062A",currency_code:"\u06A9\u06C6\u062F\u06CC \u062F\u0631\u0627\u0648",iban:"IBAN",jwt:"JWT",template_literal:"\u062A\u06CE\u06A9\u0631\u062F\u06D5"},n={nan:"NaN",string:"\u0646\u0648\u0648\u0633\u06CC\u0646",number:"\u0698\u0645\u0627\u0631\u06D5",boolean:"boolean",array:"array",object:"object",date:"\u0695\u06CE\u06A9\u06D5\u0648\u062A",integer:"\u0698\u0645\u0627\u0631\u06D5",float:"\u0698\u0645\u0627\u0631\u06D5",null:"null",undefined:"undefined",function:"function",symbol:"symbol",unknown:"unknown",promise:"promise",void:"void",never:"never",map:"map",set:"set"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a,l=["\u0627","\u0648","\u06C6","\u0648\u0648","\u06D5","\u06CC","\u06CE"].some(d=>s.endsWith(d))?"\u06CC\u06D5":"\u06D5",c=/^[a-zA-Z]+$/.test(s);return a==="null"||a==="undefined"?"\u062F\u0627\u0648\u0627\u06A9\u0631\u0627\u0648\u06D5":`\u0686\u0627\u0648\u06D5\u0695\u0648\u0627\u0646\u06A9\u0631\u0627\u0648\u06D5 ${i} \u0628\u06CE\u062A\u060C \u0628\u06D5\u06B5\u0627\u0645 ${s}${c?"":l}`}case"invalid_value":return o.values.length===1?`\u0628\u06D5\u0647\u0627\u06A9\u06D5 \u0646\u0627\u062F\u0631\u0648\u0648\u0633\u062A\u06D5: \u0686\u0627\u0648\u06D5\u0695\u0648\u0627\u0646\u06A9\u0631\u0627\u0648\u06D5 ${J(o.values[0])} \u0628\u06CE\u062A`:`\u0647\u06D5\u06B5\u0628\u0698\u0627\u0631\u062F\u06D5\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u0686\u0627\u0648\u06D5\u0695\u0648\u0627\u0646\u06A9\u0631\u0627\u0648\u06D5 \u06CC\u06D5\u06A9\u06CE\u06A9 \u0628\u06CE\u062A \u0644\u06D5 ${V(o.values,"|")}`;case"too_big":{let i=t(o.origin);return i?`\u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0628\u06D5 \u0644\u0627\u06CC\u06D5\u0646\u06CC \u0632\u06C6\u0631\u06D5\u0648\u06D5 ${o.maximum.toString()} ${i.unit} ${i.verb}`:`\u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0628\u06D5 \u0644\u0627\u06CC\u06D5\u0646\u06CC \u0632\u06C6\u0631\u06D5\u0648\u06D5 ${o.maximum.toString()} \u0628\u06CE\u062A`}case"too_small":{let i=t(o.origin);return i?`\u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0628\u06D5 \u0644\u0627\u06CC\u06D5\u0646\u06CC \u06A9\u06D5\u0645\u06D5\u0648\u06D5 ${o.minimum.toString()} ${i.unit} ${i.verb}`:`\u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0628\u06D5 \u0644\u0627\u06CC\u06D5\u0646\u06CC \u06A9\u06D5\u0645\u06D5\u0648\u06D5 ${o.minimum.toString()} \u0628\u06CE\u062A`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u062F\u06D5\u0642\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u062F\u06D5\u0633\u062A\u067E\u06CE\u0628\u06A9\u0627\u062A \u0628\u06D5 "${i.prefix}"`:i.format==="ends_with"?`\u062F\u06D5\u0642\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u06A9\u06C6\u062A\u0627\u06CC\u06CC\u0628\u06CE\u062A \u0628\u06D5 "${i.suffix}"`:i.format==="includes"?`\u062F\u06D5\u0642\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 "${i.includes}" \u0644\u06D5\u062E\u06C6\u0628\u06AF\u0631\u06CE\u062A`:i.format==="regex"?`\u062F\u06D5\u0642\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0644\u06D5\u06AF\u06D5\u06B5 \u067E\u0627\u062A\u06CE\u0631\u0646\u06CC ${i.pattern} \u0628\u06AF\u0648\u0646\u062C\u06CE\u062A`:`\u0628\u06D5\u0647\u0627\u06CC ${r[i.format]??o.format} \u0646\u0627\u062F\u0631\u0648\u0633\u062A\u06D5`}case"not_multiple_of":return`\u0698\u0645\u0627\u0631\u06D5\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u062F\u06D5\u0628\u06CE\u062A \u0686\u06D5\u0646\u062F \u0647\u06CE\u0646\u062F\u06D5 \u0628\u06CE\u062A \u0628\u06C6 ${o.divisor}`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u0644\u06CC \u0646\u06D5\u0646\u0627\u0633\u0631\u0627\u0648: ${V(o.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u0644\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A \u0644\u06D5 ${o.origin}`;case"invalid_union":return o.options&&Array.isArray(o.options)&&o.options.length>0?`\u0628\u06D5\u0647\u0627\u06CC \u0646\u06D5\u0646\u0627\u0633\u0631\u0627\u0648 \u0647\u06D5\u06CC\u06D5. \u0628\u06D5\u0647\u0627\u06CC \u0686\u0627\u0648\u06D5\u0695\u0648\u0627\u0646\u06A9\u0631\u0627\u0648: ${o.options.map(a=>`'${a}'`).join(" | ")}`:"\u06CC\u06D5\u06A9\u06AF\u0631\u062A\u0646\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A";case"invalid_element":return`${o.origin} \u0628\u06D5\u0647\u0627\u06A9\u06D5 \u0646\u0627\u062F\u0631\u0648\u0633\u062A\u06D5`;default:return"\u062A\u06CE\u06A9\u0631\u062F\u06D5\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A"}}};function LG(){return{localeError:Rme()}}var Tme=()=>{let e={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"},map:{unit:"prvk\u016F",verb:"m\xEDt"}};function t(o){return e[o]??null}let r={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",mac:"MAC adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",credit_card:"\u010D\xEDslo kreditn\xED karty",currency_code:"k\xF3d m\u011Bny",iban:"IBAN",jwt:"JWT",template_literal:"vstup"},n={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${o.expected}, obdr\u017Eeno ${s}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${i}, obdr\u017Eeno ${s}`}case"invalid_value":return o.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${J(o.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${o.origin??"hodnota"} mus\xED m\xEDt ${i}${o.maximum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${o.origin??"hodnota"} mus\xED b\xFDt ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${o.origin??"hodnota"} mus\xED m\xEDt ${i}${o.minimum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${o.origin??"hodnota"} mus\xED b\xFDt ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${i.prefix}"`:i.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${i.suffix}"`:i.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${i.includes}"`:i.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${i.pattern}`:`Neplatn\xFD form\xE1t ${r[i.format]??o.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${o.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${V(o.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${o.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${o.origin}`;default:return"Neplatn\xFD vstup"}}};function MG(){return{localeError:Tme()}}var Eme=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"},map:{unit:"elementer",verb:"indeholdt"}};function t(o){return e[o]??null}let r={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkesl\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-adresse",ipv6:"IPv6-adresse",mac:"MAC-adresse",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",credit_card:"kreditkortnummer",currency_code:"valutakode",iban:"IBAN",jwt:"JWT",template_literal:"input"},n={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Ugyldigt input: forventede instanceof ${o.expected}, fik ${s}`:`Ugyldigt input: forventede ${i}, fik ${s}`}case"invalid_value":return o.values.length===1?`Ugyldig v\xE6rdi: forventede ${J(o.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin),s=n[o.origin]??o.origin;return a?`For stor: forventede ${s??"value"} ${a.verb} ${i} ${o.maximum.toString()} ${a.unit??"elementer"}`:`For stor: forventede ${s??"value"} havde ${i} ${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin),s=n[o.origin]??o.origin;return a?`For lille: forventede ${s} ${a.verb} ${i} ${o.minimum.toString()} ${a.unit}`:`For lille: forventede ${s} havde ${i} ${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Ugyldig streng: skal starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: skal ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: skal indeholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${r[i.format]??o.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${o.divisor}`;case"unrecognized_keys":return`${o.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${V(o.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${o.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${o.origin}`;default:return"Ugyldigt input"}}};function BG(){return{localeError:Eme()}}var $me=()=>{let e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"},map:{unit:"Elemente",verb:"zu haben"}};function t(o){return e[o]??null}let r={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",mac:"MAC-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",credit_card:"Kreditkartennummer",currency_code:"W\xE4hrungscode",iban:"IBAN",jwt:"JWT",template_literal:"Eingabe"},n={nan:"NaN",number:"Zahl",array:"Array"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${o.expected}, erhalten ${s}`:`Ung\xFCltige Eingabe: erwartet ${i}, erhalten ${s}`}case"invalid_value":return o.values.length===1?`Ung\xFCltige Eingabe: erwartet ${J(o.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`Zu gro\xDF: erwartet, dass ${o.origin??"Wert"} ${i}${o.maximum.toString()} ${a.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${o.origin??"Wert"} ${i}${o.maximum.toString()} ist`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`Zu klein: erwartet, dass ${o.origin} ${i}${o.minimum.toString()} ${a.unit} hat`:`Zu klein: erwartet, dass ${o.origin} ${i}${o.minimum.toString()} ist`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Ung\xFCltiger String: muss mit "${i.prefix}" beginnen`:i.format==="ends_with"?`Ung\xFCltiger String: muss mit "${i.suffix}" enden`:i.format==="includes"?`Ung\xFCltiger String: muss "${i.includes}" enthalten`:i.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${i.pattern} entsprechen`:`Ung\xFCltig: ${r[i.format]??o.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${o.divisor} sein`;case"unrecognized_keys":return`${o.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${V(o.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${o.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${o.origin}`;default:return"Ung\xFCltige Eingabe"}}};function jG(){return{localeError:$me()}}var Ame=()=>{let e={string:{unit:"\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},file:{unit:"bytes",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},array:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},set:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},map:{unit:"\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"}};function t(o){return e[o]??null}let r={regex:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",email:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",date:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",time:"ISO \u03CE\u03C1\u03B1",duration:"ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",ipv4:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",ipv6:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",mac:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",cidrv4:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",cidrv6:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",base64:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64",base64url:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64url",json_string:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",e164:"\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",credit_card:"\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 \u03C0\u03B9\u03C3\u03C4\u03C9\u03C4\u03B9\u03BA\u03AE\u03C2 \u03BA\u03AC\u03C1\u03C4\u03B1\u03C2",currency_code:"\u03BA\u03C9\u03B4\u03B9\u03BA\u03CC\u03C2 \u03BD\u03BF\u03BC\u03AF\u03C3\u03BC\u03B1\u03C4\u03BF\u03C2",iban:"IBAN",jwt:"JWT",template_literal:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return typeof o.expected=="string"&&/^[A-Z]/.test(o.expected)?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD instanceof ${o.expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${s}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${i}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${s}`}case"invalid_value":return o.values.length===1?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${J(o.values[0])}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD \u03AD\u03BD\u03B1 \u03B1\u03C0\u03CC ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${o.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${i}${o.maximum.toString()} ${a.unit??"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1"}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${o.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${o.origin} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${i}${o.minimum.toString()} ${a.unit}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${o.origin} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03BE\u03B5\u03BA\u03B9\u03BD\u03AC \u03BC\u03B5 "${i.prefix}"`:i.format==="ends_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B5\u03BB\u03B5\u03B9\u03CE\u03BD\u03B5\u03B9 \u03BC\u03B5 "${i.suffix}"`:i.format==="includes"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C0\u03B5\u03C1\u03B9\u03AD\u03C7\u03B5\u03B9 "${i.includes}"`:i.format==="regex"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B1\u03B9\u03C1\u03B9\u03AC\u03B6\u03B5\u03B9 \u03BC\u03B5 \u03C4\u03BF \u03BC\u03BF\u03C4\u03AF\u03B2\u03BF ${i.pattern}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${r[i.format]??o.format}`}case"not_multiple_of":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF\u03C2 \u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03BF\u03BB\u03BB\u03B1\u03C0\u03BB\u03AC\u03C3\u03B9\u03BF \u03C4\u03BF\u03C5 ${o.divisor}`;case"unrecognized_keys":return`\u0386\u03B3\u03BD\u03C9\u03C3\u03C4${o.keys.length>1?"\u03B1":"\u03BF"} \u03BA\u03BB\u03B5\u03B9\u03B4${o.keys.length>1?"\u03B9\u03AC":"\u03AF"}: ${V(o.keys,", ")}`;case"invalid_key":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${o.origin}`;case"invalid_union":return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";case"invalid_element":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${o.origin}`;default:return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"}}};function UG(){return{localeError:Ame()}}var Ome=()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function t(i){return e[i]??null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",currency_code:"currency code",credit_card:"credit card number",iban:"IBAN",jwt:"JWT",template_literal:"input"},n={nan:"NaN"};function o(i,a){return i==="number"&&typeof a=="number"&&!Number.isFinite(a)?String(a):n[i]??i}return i=>{switch(i.code){case"invalid_type":{let a=o(i.expected),s=ee(i.input),l=o(s,i.input);return`Invalid input: expected ${a}, received ${l}`}case"invalid_value":return i.values.length===1?`Invalid input: expected ${J(i.values[0])}`:`Invalid option: expected one of ${V(i.values,"|")}`;case"too_big":{let a=i.exact?"exactly ":i.inclusive?"<=":"<",s=t(i.origin);return s?`Too big: expected ${i.origin??"value"} to have ${a}${i.maximum.toString()} ${s.unit??"elements"}`:`Too big: expected ${i.origin??"value"} to be ${a}${i.maximum.toString()}`}case"too_small":{let a=i.exact?"exactly ":i.inclusive?">=":">",s=t(i.origin);return s?`Too small: expected ${i.origin} to have ${a}${i.minimum.toString()} ${s.unit}`:`Too small: expected ${i.origin} to be ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`Invalid string: must start with "${a.prefix}"`:a.format==="ends_with"?`Invalid string: must end with "${a.suffix}"`:a.format==="includes"?`Invalid string: must include "${a.includes}"`:a.format==="regex"?`Invalid string: must match pattern ${a.pattern}`:`Invalid ${r[a.format]??i.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${i.divisor}`;case"unrecognized_keys":return`Unrecognized key${i.keys.length>1?"s":""}: ${V(i.keys,", ")}`;case"invalid_key":return`Invalid key in ${i.origin}`;case"invalid_union":return i.options&&Array.isArray(i.options)&&i.options.length>0?`Invalid discriminator value. Expected ${i.options.map(s=>`'${s}'`).join(" | ")}`:i.inclusive===!1?"Invalid input: more than one option matched":"Invalid input";case"invalid_element":return`Invalid value in ${i.origin}`;default:return"Invalid input"}}};function CS(){return{localeError:Ome()}}var zme=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"},map:{unit:"elementojn",verb:"havi"}};function t(o){return e[o]??null}let r={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",mac:"MAC-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",credit_card:"kreditkarta numero",currency_code:"valuta kodo",iban:"IBAN",jwt:"JWT",template_literal:"enigo"},n={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${o.expected}, ricevi\u011Dis ${s}`:`Nevalida enigo: atendi\u011Dis ${i}, ricevi\u011Dis ${s}`}case"invalid_value":return o.values.length===1?`Nevalida enigo: atendi\u011Dis ${J(o.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`Tro granda: atendi\u011Dis ke ${o.origin??"valoro"} havu ${i}${o.maximum.toString()} ${a.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${o.origin??"valoro"} havu ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`Tro malgranda: atendi\u011Dis ke ${o.origin} havu ${i}${o.minimum.toString()} ${a.unit}`:`Tro malgranda: atendi\u011Dis ke ${o.origin} estu ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${i.prefix}"`:i.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${i.suffix}"`:i.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${i.includes}"`:i.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${i.pattern}`:`Nevalida ${r[i.format]??o.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${o.divisor}`;case"unrecognized_keys":return`Nekonata${o.keys.length>1?"j":""} \u015Dlosilo${o.keys.length>1?"j":""}: ${V(o.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${o.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${o.origin}`;default:return"Nevalida enigo"}}};function VG(){return{localeError:zme()}}var Nme=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(o){return e[o]??null}let r={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",mac:"direcci\xF3n MAC",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",credit_card:"n\xFAmero de tarjeta de cr\xE9dito",currency_code:"c\xF3digo de moneda",iban:"IBAN",jwt:"JWT",template_literal:"entrada"},n={nan:"NaN",string:"texto",number:"n\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\xFAmero grande",symbol:"s\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\xF3n",union:"uni\xF3n",literal:"literal",promise:"promesa",void:"vac\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${o.expected}, recibido ${s}`:`Entrada inv\xE1lida: se esperaba ${i}, recibido ${s}`}case"invalid_value":return o.values.length===1?`Entrada inv\xE1lida: se esperaba ${J(o.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin),s=n[o.origin]??o.origin;return a?`Demasiado grande: se esperaba que ${s??"valor"} tuviera ${i}${o.maximum.toString()} ${a.unit??"elementos"}`:`Demasiado grande: se esperaba que ${s??"valor"} fuera ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin),s=n[o.origin]??o.origin;return a?`Demasiado peque\xF1o: se esperaba que ${s} tuviera ${i}${o.minimum.toString()} ${a.unit}`:`Demasiado peque\xF1o: se esperaba que ${s} fuera ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${i.prefix}"`:i.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${i.suffix}"`:i.format==="includes"?`Cadena inv\xE1lida: debe incluir "${i.includes}"`:i.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${i.pattern}`:`Inv\xE1lido ${r[i.format]??o.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${o.divisor}`;case"unrecognized_keys":return`Llave${o.keys.length>1?"s":""} desconocida${o.keys.length>1?"s":""}: ${V(o.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${n[o.origin]??o.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${n[o.origin]??o.origin}`;default:return"Entrada inv\xE1lida"}}};function HG(){return{localeError:Nme()}}var Fme=()=>{let e={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},map:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function t(o){return e[o]??null}let r={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",mac:"MAC \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",credit_card:"\u0634\u0645\u0627\u0631\u0647 \u06A9\u0627\u0631\u062A \u0627\u0639\u062A\u0628\u0627\u0631\u06CC",currency_code:"\u06A9\u062F \u0627\u0631\u0632",iban:"IBAN",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"},n={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${o.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${s} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`:`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${i} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${s} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":return o.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${J(o.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${V(o.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${o.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${o.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${o.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${o.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${o.origin} \u0628\u0627\u06CC\u062F ${i}${o.minimum.toString()} ${a.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${o.origin} \u0628\u0627\u06CC\u062F ${i}${o.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:i.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:i.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${i.includes}" \u0628\u0627\u0634\u062F`:i.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${i.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${r[i.format]??o.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case"not_multiple_of":return`\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${o.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${o.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${V(o.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${o.origin}`;case"invalid_union":return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case"invalid_element":return`\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${o.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}};function WG(){return{localeError:Fme()}}var Lme=()=>{let e={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},map:{unit:"alkiota",subject:"kuvauksen"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function t(o){return e[o]??null}let r={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",mac:"MAC-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",credit_card:"luottokortin numero",currency_code:"valuuttakoodi",iban:"IBAN",jwt:"JWT",template_literal:"templaattimerkkijono"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Virheellinen tyyppi: odotettiin instanceof ${o.expected}, oli ${s}`:`Virheellinen tyyppi: odotettiin ${i}, oli ${s}`}case"invalid_value":return o.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${J(o.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`Liian suuri: ${a.subject} t\xE4ytyy olla ${i}${o.maximum.toString()} ${a.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`Liian pieni: ${a.subject} t\xE4ytyy olla ${i}${o.minimum.toString()} ${a.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${i.prefix}"`:i.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${i.suffix}"`:i.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${i.includes}"`:i.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${i.pattern}`:`Virheellinen ${r[i.format]??o.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${o.divisor} monikerta`;case"unrecognized_keys":return`${o.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${V(o.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen sy\xF6te"}}};function ZG(){return{localeError:Lme()}}var Mme=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(o){return e[o]??null}let r={regex:"expression r\xE9guli\xE8re",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",mac:"adresse MAC",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne de caract\xE8res encod\xE9e en base64",base64url:"cha\xEEne de caract\xE8res encod\xE9e en base64url",json_string:"cha\xEEne de caract\xE8res JSON",e164:"num\xE9ro au format E.164",credit_card:"num\xE9ro de carte de cr\xE9dit",currency_code:"code de devise",iban:"IBAN",jwt:"JWT",template_literal:"entr\xE9e"},n={string:"cha\xEEne de caract\xE8res",number:"nombre",int:"entier",boolean:"bool\xE9en",bigint:"grand entier",symbol:"symbole",undefined:"ind\xE9fini",null:"null",never:"jamais",void:"vide",date:"date",array:"tableau",object:"objet",tuple:"tuple",record:"record",map:"map",set:"ensemble",file:"fichier",nonoptional:"non optionnel",nan:"NaN",function:"fonction"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Entr\xE9e invalide : instance de ${o.expected} attendu, ${s} re\xE7u`:`Entr\xE9e invalide : ${i} attendu, ${s} re\xE7u`}case"invalid_value":return o.values.length===1?`Entr\xE9e invalide : ${J(o.values[0])} attendu`:`Option invalide : une valeur parmi ${V(o.values,"|")} attendue`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`Trop grand : ${n[o.origin]??"valeur"} doit ${a.verb} ${i}${o.maximum.toString()} ${a.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${n[o.origin]??"valeur"} doit \xEAtre ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`Trop petit : ${n[o.origin]??"valeur"} doit ${a.verb} ${i}${o.minimum.toString()} ${a.unit}`:`Trop petit : ${n[o.origin]??"valeur"} doit \xEAtre ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Cha\xEEne de caract\xE8res invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne de caract\xE8res invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne de caract\xE8res invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne de caract\xE8res invalide : doit correspondre au motif ${i.pattern}`:`${r[i.format]??o.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${o.divisor}`;case"unrecognized_keys":return`Cl\xE9${o.keys.length>1?"s":""} non reconnue${o.keys.length>1?"s":""} : ${V(o.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${o.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${o.origin}`;default:return"Entr\xE9e invalide"}}};function GG(){return{localeError:Mme()}}var Bme=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"},map:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(o){return e[o]??null}let r={regex:"entr\xE9e",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",mac:"adresse MAC",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",credit_card:"num\xE9ro de carte de cr\xE9dit",currency_code:"code de devise",iban:"IBAN",jwt:"JWT",template_literal:"entr\xE9e"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Entr\xE9e invalide : attendu instanceof ${o.expected}, re\xE7u ${s}`:`Entr\xE9e invalide : attendu ${i}, re\xE7u ${s}`}case"invalid_value":return o.values.length===1?`Entr\xE9e invalide : attendu ${J(o.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"\u2264":"<",a=t(o.origin);return a?`Trop grand : attendu que ${o.origin??"la valeur"} ait ${i}${o.maximum.toString()} ${a.unit}`:`Trop grand : attendu que ${o.origin??"la valeur"} soit ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?"\u2265":">",a=t(o.origin);return a?`Trop petit : attendu que ${o.origin} ait ${i}${o.minimum.toString()} ${a.unit}`:`Trop petit : attendu que ${o.origin} soit ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${i.pattern}`:`${r[i.format]??o.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${o.divisor}`;case"unrecognized_keys":return`Cl\xE9${o.keys.length>1?"s":""} non reconnue${o.keys.length>1?"s":""} : ${V(o.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${o.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${o.origin}`;default:return"Entr\xE9e invalide"}}};function KG(){return{localeError:Bme()}}var jme=()=>{let e={string:{unit:"\u0A85\u0A95\u0ACD\u0AB7\u0AB0",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"},file:{unit:"\u0AAC\u0ABE\u0AAF\u0A9F",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"},array:{unit:"\u0A86\u0A87\u0A9F\u0AAE",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"},set:{unit:"\u0A86\u0A87\u0A9F\u0AAE",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"},map:{unit:"\u0A8F\u0AA8\u0ACD\u0A9F\u0ACD\u0AB0\u0AC0",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"}};function t(o){return e[o]??null}let r={regex:"\u0A87\u0AA8\u0AAA\u0AC1\u0A9F",email:"\u0A88\u0AAE\u0AC7\u0A87\u0AB2 \u0A8F\u0AA1\u0ACD\u0AB0\u0AC7\u0AB8",url:"URL",emoji:"\u0A87\u0AAE\u0ACB\u0A9C\u0AC0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0AA4\u0ABE\u0AB0\u0AC0\u0A96 \u0A85\u0AA8\u0AC7 \u0AB8\u0AAE\u0AAF",date:"ISO \u0AA4\u0ABE\u0AB0\u0AC0\u0A96",time:"ISO \u0AB8\u0AAE\u0AAF",duration:"ISO \u0A85\u0AB5\u0AA7\u0ABF",ipv4:"IPv4 \u0A8F\u0AA1\u0ACD\u0AB0\u0AC7\u0AB8",ipv6:"IPv6 \u0A8F\u0AA1\u0ACD\u0AB0\u0AC7\u0AB8",mac:"MAC \u0A8F\u0AA1\u0ACD\u0AB0\u0AC7\u0AB8",cidrv4:"IPv4 \u0AB6\u0ACD\u0AB0\u0AC7\u0AA3\u0AC0",cidrv6:"IPv6 \u0AB6\u0ACD\u0AB0\u0AC7\u0AA3\u0AC0",base64:"base64-\u0A8F\u0AA8\u0ACD\u0A95\u0ACB\u0AA1\u0AC7\u0AA1 \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97",base64url:"base64url-\u0A8F\u0AA8\u0ACD\u0A95\u0ACB\u0AA1\u0AC7\u0AA1 \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97",json_string:"JSON \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97",e164:"E.164 \u0AA8\u0A82\u0AAC\u0AB0",credit_card:"\u0A95\u0ACD\u0AB0\u0AC7\u0AA1\u0ABF\u0A9F \u0A95\u0ABE\u0AB0\u0ACD\u0AA1 \u0AA8\u0A82\u0AAC\u0AB0",currency_code:"\u0A9A\u0AB2\u0AA3 \u0A95\u0ACB\u0AA1",iban:"IBAN",jwt:"JWT",template_literal:"\u0A87\u0AA8\u0AAA\u0AC1\u0A9F"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A87\u0AA8\u0AAA\u0AC1\u0A9F: \u0A85\u0AAA\u0AC7\u0A95\u0ACD\u0AB7\u0ABF\u0AA4 ${i}, \u0AAA\u0ACD\u0AB0\u0ABE\u0AAA\u0ACD\u0AA4 ${s}`}case"invalid_value":return o.values.length===1?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A87\u0AA8\u0AAA\u0AC1\u0A9F: \u0A85\u0AAA\u0AC7\u0A95\u0ACD\u0AB7\u0ABF\u0AA4 ${J(o.values[0])}`:`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB5\u0ABF\u0A95\u0AB2\u0ACD\u0AAA: ${V(o.values," | ")} \u0AAE\u0ABE\u0AA7\u0ACD\u0AAF\u0AAE\u0AA5\u0AC0 \u0A8F\u0A95 \u0A85\u0AAA\u0AC7\u0A95\u0ACD\u0AB7\u0ABF\u0AA4`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\u0A96\u0AC2\u0AAC \u0AAE\u0ACB\u0A9F\u0AC1\u0A82: ${o.origin??"\u0AAE\u0AC2\u0AB2\u0ACD\u0AAF"} ${i}${o.maximum.toString()} ${a.unit??"\u0A8F\u0AB2\u0ABF\u0AAE\u0AC7\u0AA8\u0ACD\u0A9F"} \u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F`:`\u0A96\u0AC2\u0AAC \u0AAE\u0ACB\u0A9F\u0AC1\u0A82: ${o.origin??"\u0AAE\u0AC2\u0AB2\u0ACD\u0AAF"} ${i}${o.maximum.toString()} \u0AB9\u0ACB\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\u0A96\u0AC2\u0AAC \u0AA8\u0ABE\u0AA8\u0AC1\u0A82: ${o.origin} ${i}${o.minimum.toString()} ${a.unit} \u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F`:`\u0A96\u0AC2\u0AAC \u0AA8\u0ABE\u0AA8\u0AC1\u0A82: ${o.origin} ${i}${o.minimum.toString()} \u0AB9\u0ACB\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97: "${i.prefix}" \u0AA5\u0AC0 \u0AB6\u0AB0\u0AC2 \u0AA5\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`:i.format==="ends_with"?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97: "${i.suffix}" \u0AAA\u0AB0 \u0AB8\u0AAE\u0ABE\u0AAA\u0ACD\u0AA4 \u0AA5\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`:i.format==="includes"?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97: "${i.includes}" \u0AB6\u0ABE\u0AAE\u0AC7\u0AB2 \u0AB9\u0ACB\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`:i.format==="regex"?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97: \u0AAA\u0AC7\u0A9F\u0AB0\u0ACD\u0AA8 ${i.pattern} \u0AB8\u0ABE\u0AA5\u0AC7 \u0AAE\u0AC7\u0AB3 \u0A96\u0ABE\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`:`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF ${r[i.format]??o.format}`}case"not_multiple_of":return`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AA8\u0A82\u0AAC\u0AB0: ${o.divisor} \u0AA8\u0ACB \u0A97\u0AC1\u0AA3\u0ABE\u0A82\u0A95 \u0AB9\u0ACB\u0AB5\u0ACB \u0A9C\u0ACB\u0A88\u0A8F`;case"unrecognized_keys":return`\u0A93\u0AB3\u0A96\u0AC0 \u0AB6\u0A95\u0ABE\u0AA4\u0ABE \u0AA8\u0AB9\u0AC0\u0A82 \u0AA4\u0AC7 \u0A95\u0AC0${o.keys.length>1?"\u0A93":""}: ${V(o.keys,", ")}`;case"invalid_key":return`${o.origin} \u0AAE\u0ABE\u0A82 \u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A95\u0AC0`;case"invalid_union":return o.options&&Array.isArray(o.options)&&o.options.length>0?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AA1\u0ABF\u0AB8\u0ACD\u0A95\u0ACD\u0AB0\u0ABF\u0AAE\u0ABF\u0AA8\u0AC7\u0A9F\u0AB0 \u0AAE\u0AC2\u0AB2\u0ACD\u0AAF. \u0A85\u0AAA\u0AC7\u0A95\u0ACD\u0AB7\u0ABF\u0AA4 ${o.options.map(a=>`'${a}'`).join(" | ")}`:"\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A87\u0AA8\u0AAA\u0AC1\u0A9F";case"invalid_element":return`${o.origin} \u0AAE\u0ABE\u0A82 \u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AAE\u0AC2\u0AB2\u0ACD\u0AAF`;default:return"\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A87\u0AA8\u0AAA\u0AC1\u0A9F"}}};function qG(){return{localeError:jme()}}var Ume=()=>{let e={string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA",gender:"f"},number:{label:"\u05DE\u05E1\u05E4\u05E8",gender:"m"},boolean:{label:"\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA",gender:"m"},array:{label:"\u05DE\u05E2\u05E8\u05DA",gender:"m"},object:{label:"\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8",gender:"m"},null:{label:"\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)",gender:"m"},undefined:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)",gender:"m"},symbol:{label:"\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)",gender:"m"},function:{label:"\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4",gender:"f"},map:{label:"\u05DE\u05E4\u05D4 (Map)",gender:"f"},set:{label:"\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)",gender:"f"},file:{label:"\u05E7\u05D5\u05D1\u05E5",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2",gender:"m"},value:{label:"\u05E2\u05E8\u05DA",gender:"m"}},t={string:{unit:"\u05EA\u05D5\u05D5\u05D9\u05DD",shortLabel:"\u05E7\u05E6\u05E8",longLabel:"\u05D0\u05E8\u05D5\u05DA"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},number:{unit:"",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"}},r=c=>c?e[c]:void 0,n=c=>{let d=r(c);return d?d.label:c??e.unknown.label},o=c=>`\u05D4${n(c)}`,i=c=>(r(c)?.gender??"m")==="f"?"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA":"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA",a=c=>c?t[c]??null:null,s={regex:{label:"\u05E7\u05DC\u05D8",gender:"m"},email:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",gender:"f"},url:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",gender:"f"},emoji:{label:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",gender:"m"},uuid:{label:"UUID",gender:"m"},uuidv4:{label:"UUIDv4",gender:"m"},uuidv6:{label:"UUIDv6",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",gender:"m"},time:{label:"\u05D6\u05DE\u05DF ISO",gender:"m"},duration:{label:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",gender:"m"},ipv4:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",gender:"f"},ipv6:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",gender:"f"},mac:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA MAC",gender:"f"},cidrv4:{label:"\u05D8\u05D5\u05D5\u05D7 IPv4",gender:"m"},cidrv6:{label:"\u05D8\u05D5\u05D5\u05D7 IPv6",gender:"m"},base64:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",gender:"f"},base64url:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",gender:"f"},json_string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",gender:"f"},e164:{label:"\u05DE\u05E1\u05E4\u05E8 E.164",gender:"m"},credit_card:{label:"\u05DE\u05E1\u05E4\u05E8 \u05DB\u05E8\u05D8\u05D9\u05E1 \u05D0\u05E9\u05E8\u05D0\u05D9",gender:"m"},currency_code:{label:"\u05E7\u05D5\u05D3 \u05DE\u05D8\u05D1\u05E2",gender:"m"},iban:{label:"IBAN",gender:"m"},jwt:{label:"JWT",gender:"m"},template_literal:{label:"\u05E7\u05DC\u05D8",gender:"m"},ends_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},includes:{label:"\u05E7\u05DC\u05D8",gender:"m"},lowercase:{label:"\u05E7\u05DC\u05D8",gender:"m"},starts_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},uppercase:{label:"\u05E7\u05DC\u05D8",gender:"m"}},l={nan:"NaN"};return c=>{switch(c.code){case"invalid_type":{let d=c.expected,u=l[d??""]??n(d),f=ee(c.input),m=l[f]??e[f]?.label??f;return/^[A-Z]/.test(c.expected)?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${c.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${m}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${u}, \u05D4\u05EA\u05E7\u05D1\u05DC ${m}`}case"invalid_value":{if(c.values.length===1)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${J(c.values[0])}`;let d=c.values.map(m=>J(m));if(c.values.length===2)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${d[0]} \u05D0\u05D5 ${d[1]}`;let u=d[d.length-1];return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${d.slice(0,-1).join(", ")} \u05D0\u05D5 ${u}`}case"too_big":{let d=a(c.origin),u=o(c.origin??"value");if(c.origin==="string")return`${d?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${u} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${c.maximum.toString()} ${d?.unit??""} ${c.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(c.origin==="number"){let p=c.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${c.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${c.maximum}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${u} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${p}`}if(c.origin==="array"||c.origin==="set"){let p=c.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",g=c.inclusive?`${c.maximum} ${d?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${c.maximum} ${d?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${u} ${p} \u05DC\u05D4\u05DB\u05D9\u05DC ${g}`.trim()}let f=c.inclusive?"<=":"<",m=i(c.origin??"value");return d?.unit?`${d.longLabel} \u05DE\u05D3\u05D9: ${u} ${m} ${f}${c.maximum.toString()} ${d.unit}`:`${d?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${u} ${m} ${f}${c.maximum.toString()}`}case"too_small":{let d=a(c.origin),u=o(c.origin??"value");if(c.origin==="string")return`${d?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${u} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${c.minimum.toString()} ${d?.unit??""} ${c.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(c.origin==="number"){let p=c.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${c.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${c.minimum}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${u} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${p}`}if(c.origin==="array"||c.origin==="set"){let p=c.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(c.minimum===1&&c.inclusive){let b=(c.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${u} ${p} \u05DC\u05D4\u05DB\u05D9\u05DC ${b}`}let g=c.inclusive?`${c.minimum} ${d?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${c.minimum} ${d?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${u} ${p} \u05DC\u05D4\u05DB\u05D9\u05DC ${g}`.trim()}let f=c.inclusive?">=":">",m=i(c.origin??"value");return d?.unit?`${d.shortLabel} \u05DE\u05D3\u05D9: ${u} ${m} ${f}${c.minimum.toString()} ${d.unit}`:`${d?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${u} ${m} ${f}${c.minimum.toString()}`}case"invalid_format":{let d=c;if(d.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${d.prefix}"`;if(d.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${d.suffix}"`;if(d.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${d.includes}"`;if(d.format==="regex")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${d.pattern}`;let u=s[d.format],f=u?.label??d.format,p=(u?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${f} \u05DC\u05D0 ${p}`}case"not_multiple_of":return`\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${c.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${c.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${c.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${V(c.keys,", ")}`;case"invalid_key":return"\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8";case"invalid_union":return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case"invalid_element":return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${o(c.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}};function XG(){return{localeError:Ume()}}var Vme=()=>{let e={string:{unit:"\u0905\u0915\u094D\u0937\u0930",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"},file:{unit:"\u092C\u093E\u0907\u091F\u094D\u0938",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"},array:{unit:"\u0924\u0924\u094D\u0935",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"},set:{unit:"\u0924\u0924\u094D\u0935",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"},map:{unit:"\u092A\u094D\u0930\u0935\u093F\u0937\u094D\u091F\u093F\u092F\u093E\u0901",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"}};function t(o){return e[o]??null}let r={regex:"\u0907\u0928\u092A\u0941\u091F",email:"\u0908\u092E\u0947\u0932 \u092A\u0924\u093E",url:"URL",emoji:"\u0907\u092E\u094B\u091C\u0940",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0924\u093F\u0925\u093F \u0914\u0930 \u0938\u092E\u092F",date:"ISO \u0924\u093F\u0925\u093F",time:"ISO \u0938\u092E\u092F",duration:"ISO \u0905\u0935\u0927\u093F",ipv4:"IPv4 \u092A\u0924\u093E",ipv6:"IPv6 \u092A\u0924\u093E",mac:"MAC \u092A\u0924\u093E",cidrv4:"IPv4 \u0936\u094D\u0930\u0947\u0923\u0940",cidrv6:"IPv6 \u0936\u094D\u0930\u0947\u0923\u0940",base64:"Base64-\u090F\u0928\u094D\u0915\u094B\u0921\u0947\u0921 \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917",base64url:"Base64URL-\u090F\u0928\u094D\u0915\u094B\u0921\u0947\u0921 \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917",json_string:"JSON \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917",e164:"E.164 \u0938\u0902\u0916\u094D\u092F\u093E",credit_card:"\u0915\u094D\u0930\u0947\u0921\u093F\u091F \u0915\u093E\u0930\u094D\u0921 \u0938\u0902\u0916\u094D\u092F\u093E",currency_code:"\u092E\u0941\u0926\u094D\u0930\u093E \u0915\u094B\u0921",iban:"IBAN",jwt:"JWT",template_literal:"\u0907\u0928\u092A\u0941\u091F"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return`\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${i}, \u092A\u094D\u0930\u093E\u092A\u094D\u0924 ${s}`}case"invalid_value":return o.values.length===1?`\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${J(o.values[0])}`:`\u0905\u092E\u093E\u0928\u094D\u092F \u0935\u093F\u0915\u0932\u094D\u092A: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u092E\u093E\u0928\u094B\u0902 \u092E\u0947\u0902 \u0938\u0947 \u090F\u0915 ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\u092C\u0939\u0941\u0924 \u092C\u0921\u093C\u093E: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u0925\u093E \u0915\u093F ${o.origin??"\u092E\u093E\u0928"} \u092E\u0947\u0902 ${i}${o.maximum} ${a.unit} \u0939\u094B\u0902`:`\u092C\u0939\u0941\u0924 \u092C\u0921\u093C\u093E: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u0925\u093E \u0915\u093F ${o.origin??"\u092E\u093E\u0928"} ${i}${o.maximum} \u0939\u094B`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\u092C\u0939\u0941\u0924 \u091B\u094B\u091F\u093E: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u0925\u093E \u0915\u093F ${o.origin} \u092E\u0947\u0902 ${i}${o.minimum} ${a.unit} \u0939\u094B\u0902`:`\u092C\u0939\u0941\u0924 \u091B\u094B\u091F\u093E: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u0925\u093E \u0915\u093F ${o.origin} ${i}${o.minimum} \u0939\u094B`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917: "${i.prefix}" \u0938\u0947 \u0936\u0941\u0930\u0942 \u0939\u094B\u0928\u093E \u091A\u093E\u0939\u093F\u090F`:i.format==="ends_with"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917: "${i.suffix}" \u092A\u0930 \u0938\u092E\u093E\u092A\u094D\u0924 \u0939\u094B\u0928\u093E \u091A\u093E\u0939\u093F\u090F`:i.format==="includes"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917: \u0907\u0938\u092E\u0947\u0902 "${i.includes}" \u0936\u093E\u092E\u093F\u0932 \u0939\u094B\u0928\u093E \u091A\u093E\u0939\u093F\u090F`:i.format==="regex"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917: \u092A\u0948\u091F\u0930\u094D\u0928 ${i.pattern} \u0938\u0947 \u092E\u0947\u0932 \u0916\u093E\u0928\u093E \u091A\u093E\u0939\u093F\u090F`:`\u0905\u092E\u093E\u0928\u094D\u092F ${r[i.format]??o.format}`}case"not_multiple_of":return`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u0902\u0916\u094D\u092F\u093E: \u092F\u0939 ${o.divisor} \u0915\u093E \u0917\u0941\u0923\u091C \u0939\u094B\u0928\u093E \u091A\u093E\u0939\u093F\u090F`;case"unrecognized_keys":return`\u0905\u092A\u0930\u093F\u091A\u093F\u0924 \u0915\u0941\u0902\u091C\u0940${o.keys.length>1?"\u092F\u093E\u0901":""}: ${V(o.keys,", ")}`;case"invalid_key":return`\u0905\u092E\u093E\u0928\u094D\u092F \u0915\u0941\u0902\u091C\u0940: ${o.origin} \u092E\u0947\u0902`;case"invalid_union":return o.options&&Array.isArray(o.options)&&o.options.length>0?`\u0905\u092E\u093E\u0928\u094D\u092F \u0921\u093F\u0938\u094D\u0915\u094D\u0930\u093F\u092E\u093F\u0928\u0947\u091F\u0930 \u092E\u093E\u0928: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${o.options.map(a=>`'${a}'`).join(" | ")}`:"\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F";case"invalid_element":return`\u0905\u092E\u093E\u0928\u094D\u092F \u092E\u093E\u0928: ${o.origin} \u092E\u0947\u0902`;default:return"\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F"}}};function QG(){return{localeError:Vme()}}var Hme=()=>{let e={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function t(o){return e[o]??null}let r={regex:"unos",email:"email adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum i vrijeme",date:"ISO datum",time:"ISO vrijeme",duration:"ISO trajanje",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",mac:"MAC adresa",cidrv4:"IPv4 raspon",cidrv6:"IPv6 raspon",base64:"base64 kodirani tekst",base64url:"base64url kodirani tekst",json_string:"JSON tekst",e164:"E.164 broj",credit_card:"broj kreditne kartice",currency_code:"kod valute",iban:"IBAN",jwt:"JWT",template_literal:"unos"},n={nan:"NaN",string:"tekst",number:"broj",boolean:"boolean",array:"niz",object:"objekt",set:"skup",file:"datoteka",date:"datum",bigint:"bigint",symbol:"simbol",undefined:"undefined",null:"null",function:"funkcija",map:"mapa"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Neispravan unos: o\u010Dekuje se instanceof ${o.expected}, a primljeno je ${s}`:`Neispravan unos: o\u010Dekuje se ${i}, a primljeno je ${s}`}case"invalid_value":return o.values.length===1?`Neispravna vrijednost: o\u010Dekivano ${J(o.values[0])}`:`Neispravna opcija: o\u010Dekivano jedno od ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin),s=n[o.origin]??o.origin;return a?`Preveliko: o\u010Dekivano da ${s??"vrijednost"} ima ${i}${o.maximum.toString()} ${a.unit??"elemenata"}`:`Preveliko: o\u010Dekivano da ${s??"vrijednost"} bude ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin),s=n[o.origin]??o.origin;return a?`Premalo: o\u010Dekivano da ${s} ima ${i}${o.minimum.toString()} ${a.unit}`:`Premalo: o\u010Dekivano da ${s} bude ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Neispravan tekst: mora zapo\u010Dinjati s "${i.prefix}"`:i.format==="ends_with"?`Neispravan tekst: mora zavr\u0161avati s "${i.suffix}"`:i.format==="includes"?`Neispravan tekst: mora sadr\u017Eavati "${i.includes}"`:i.format==="regex"?`Neispravan tekst: mora odgovarati uzorku ${i.pattern}`:`Neispravna ${r[i.format]??o.format}`}case"not_multiple_of":return`Neispravan broj: mora biti vi\u0161ekratnik od ${o.divisor}`;case"unrecognized_keys":return`Neprepoznat${o.keys.length>1?"i klju\u010Devi":" klju\u010D"}: ${V(o.keys,", ")}`;case"invalid_key":return`Neispravan klju\u010D u ${n[o.origin]??o.origin}`;case"invalid_union":return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${n[o.origin]??o.origin}`;default:return"Neispravan unos"}}};function YG(){return{localeError:Hme()}}var Wme=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"},map:{unit:"elem",verb:"legyen"}};function t(o){return e[o]??null}let r={regex:"bemenet",email:"email c\xEDm",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",mac:"MAC c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",credit_card:"hitelk\xE1rtyasz\xE1m",currency_code:"p\xE9nznemk\xF3d",iban:"IBAN",jwt:"JWT",template_literal:"bemenet"},n={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${o.expected}, a kapott \xE9rt\xE9k ${s}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${i}, a kapott \xE9rt\xE9k ${s}`}case"invalid_value":return o.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${J(o.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`T\xFAl nagy: ${o.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${i}${o.maximum.toString()} ${a.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${o.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${o.origin} m\xE9rete t\xFAl kicsi ${i}${o.minimum.toString()} ${a.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${o.origin} t\xFAl kicsi ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\xC9rv\xE9nytelen string: "${i.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:i.format==="ends_with"?`\xC9rv\xE9nytelen string: "${i.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:i.format==="includes"?`\xC9rv\xE9nytelen string: "${i.includes}" \xE9rt\xE9ket kell tartalmaznia`:i.format==="regex"?`\xC9rv\xE9nytelen string: ${i.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${r[i.format]??o.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${o.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${o.keys.length>1?"s":""}: ${V(o.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${o.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${o.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}};function JG(){return{localeError:Wme()}}function eK(e,t,r){return Math.abs(e)===1?t:r}function Rp(e){if(!e)return"";let t=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],r=e[e.length-1];return e+(t.includes(r)?"\u0576":"\u0568")}var Zme=()=>{let e={string:{unit:{one:"\u0576\u0577\u0561\u0576",many:"\u0576\u0577\u0561\u0576\u0576\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},file:{unit:{one:"\u0562\u0561\u0575\u0569",many:"\u0562\u0561\u0575\u0569\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},array:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},set:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},map:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"}};function t(o){return e[o]??null}let r={regex:"\u0574\u0578\u0582\u057F\u0584",email:"\u0567\u056C. \u0570\u0561\u057D\u0581\u0565",url:"URL",emoji:"\u0567\u0574\u0578\u057B\u056B",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574",date:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E",time:"ISO \u056A\u0561\u0574",duration:"ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576",ipv4:"IPv4 \u0570\u0561\u057D\u0581\u0565",ipv6:"IPv6 \u0570\u0561\u057D\u0581\u0565",mac:"MAC \u0570\u0561\u057D\u0581\u0565",cidrv4:"IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",cidrv6:"IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",base64:"base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",base64url:"base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",json_string:"JSON \u057F\u0578\u0572",e164:"E.164 \u0570\u0561\u0574\u0561\u0580",credit_card:"\u056F\u0580\u0565\u0564\u056B\u057F \u0584\u0561\u0580\u057F\u056B \u0570\u0561\u0574\u0561\u0580",currency_code:"\u0561\u0580\u056A\u0578\u0582\u0575\u0569\u056B \u056F\u0578\u0564",iban:"IBAN",jwt:"JWT",template_literal:"\u0574\u0578\u0582\u057F\u0584"},n={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${o.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${s}`:`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${i}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${s}`}case"invalid_value":return o.values.length===1?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${J(o.values[1])}`:`\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);if(a){let s=Number(o.maximum),l=eK(s,a.unit.one,a.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Rp(o.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${o.maximum.toString()} ${l}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Rp(o.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);if(a){let s=Number(o.minimum),l=eK(s,a.unit.one,a.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Rp(o.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${o.minimum.toString()} ${l}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Rp(o.origin)} \u056C\u056B\u0576\u056B ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${i.prefix}"-\u0578\u057E`:i.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${i.suffix}"-\u0578\u057E`:i.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${i.includes}"`:i.format==="regex"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${i.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${r[i.format]??o.format}`}case"not_multiple_of":return`\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${o.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${o.keys.length>1?"\u0576\u0565\u0580":""}. ${V(o.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${Rp(o.origin)}-\u0578\u0582\u0574`;case"invalid_union":return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574";case"invalid_element":return`\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${Rp(o.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}};function tK(){return{localeError:Zme()}}var Gme=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"},map:{unit:"item",verb:"memiliki"}};function t(o){return e[o]??null}let r={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",mac:"alamat MAC",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",credit_card:"nomor kartu kredit",currency_code:"kode mata uang",iban:"IBAN",jwt:"JWT",template_literal:"input"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Input tidak valid: diharapkan instanceof ${o.expected}, diterima ${s}`:`Input tidak valid: diharapkan ${i}, diterima ${s}`}case"invalid_value":return o.values.length===1?`Input tidak valid: diharapkan ${J(o.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`Terlalu besar: diharapkan ${o.origin??"value"} memiliki ${i}${o.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: diharapkan ${o.origin??"value"} menjadi ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`Terlalu kecil: diharapkan ${o.origin} memiliki ${i}${o.minimum.toString()} ${a.unit}`:`Terlalu kecil: diharapkan ${o.origin} menjadi ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`String tidak valid: harus dimulai dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak valid: harus berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak valid: harus menyertakan "${i.includes}"`:i.format==="regex"?`String tidak valid: harus sesuai pola ${i.pattern}`:`${r[i.format]??o.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${o.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${o.keys.length>1?"s":""}: ${V(o.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${o.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${o.origin}`;default:return"Input tidak valid"}}};function rK(){return{localeError:Gme()}}var Kme=()=>{let e={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"},map:{unit:"hluti",verb:"a\xF0 hafa"}};function t(o){return e[o]??null}let r={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og t\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",credit_card:"kreditkortan\xFAmer",currency_code:"gjaldmi\xF0ilsk\xF3\xF0i",iban:"IBAN",jwt:"JWT",template_literal:"gildi"},n={nan:"NaN",number:"n\xFAmer",array:"fylki"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${s} \xFEar sem \xE1 a\xF0 vera instanceof ${o.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${s} \xFEar sem \xE1 a\xF0 vera ${i}`}case"invalid_value":return o.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${J(o.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${o.origin??"gildi"} hafi ${i}${o.maximum.toString()} ${a.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${o.origin??"gildi"} s\xE9 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${o.origin} hafi ${i}${o.minimum.toString()} ${a.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${o.origin} s\xE9 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${i.prefix}"`:i.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${i.suffix}"`:i.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${i.includes}"`:i.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${i.pattern}`:`Rangt ${r[i.format]??o.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${o.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${o.keys.length>1?"ir lyklar":"ur lykill"}: ${V(o.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${o.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${o.origin}`;default:return"Rangt gildi"}}};function oK(){return{localeError:Kme()}}var qme=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"},map:{unit:"elementi",verb:"avere"}};function t(o){return e[o]??null}let r={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",mac:"indirizzo MAC",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",credit_card:"numero di carta di credito",currency_code:"codice valuta",iban:"IBAN",jwt:"JWT",template_literal:"input"},n={nan:"NaN",number:"numero",array:"vettore"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Input non valido: atteso instanceof ${o.expected}, ricevuto ${s}`:`Input non valido: atteso ${i}, ricevuto ${s}`}case"invalid_value":return o.values.length===1?`Input non valido: atteso ${J(o.values[0])}`:`Opzione non valida: atteso uno tra ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`Troppo grande: ${o.origin??"valore"} deve avere ${i}${o.maximum.toString()} ${a.unit??"elementi"}`:`Troppo grande: ${o.origin??"valore"} deve essere ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`Troppo piccolo: ${o.origin} deve avere ${i}${o.minimum.toString()} ${a.unit}`:`Troppo piccolo: ${o.origin} deve essere ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Stringa non valida: deve iniziare con "${i.prefix}"`:i.format==="ends_with"?`Stringa non valida: deve terminare con "${i.suffix}"`:i.format==="includes"?`Stringa non valida: deve includere "${i.includes}"`:i.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${i.pattern}`:`Input non valido: ${r[i.format]??o.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${o.divisor}`;case"unrecognized_keys":return`Chiav${o.keys.length>1?"i":"e"} non riconosciut${o.keys.length>1?"e":"a"}: ${V(o.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${o.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${o.origin}`;default:return"Input non valido"}}};function nK(){return{localeError:qme()}}var Xme=()=>{let e={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},map:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function t(o){return e[o]??null}let r={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",mac:"MAC\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",credit_card:"\u30AF\u30EC\u30B8\u30C3\u30C8\u30AB\u30FC\u30C9\u756A\u53F7",currency_code:"\u901A\u8CA8\u30B3\u30FC\u30C9",iban:"IBAN",jwt:"JWT",template_literal:"\u5165\u529B\u5024"},n={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${o.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${s}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${i}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${s}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return o.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${J(o.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${V(o.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let i=o.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",a=t(o.origin);return a?`\u5927\u304D\u3059\u304E\u308B\u5024: ${o.origin??"\u5024"}\u306F${o.maximum.toString()}${a.unit??"\u8981\u7D20"}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${o.origin??"\u5024"}\u306F${o.maximum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let i=o.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",a=t(o.origin);return a?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${o.origin}\u306F${o.minimum.toString()}${a.unit}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${o.origin}\u306F${o.minimum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${i.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${r[i.format]??o.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${o.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"unrecognized_keys":return`\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${o.keys.length>1?"\u7FA4":""}: ${V(o.keys,"\u3001")}`;case"invalid_key":return`${o.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${o.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}};function iK(){return{localeError:Xme()}}var Qme=()=>{let e={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},map:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function t(o){return e[o]??null}let r={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",mac:"MAC \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",json_string:"JSON \u10D5\u10D4\u10DA\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",credit_card:"\u10E1\u10D0\u10D9\u10E0\u10D4\u10D3\u10D8\u10E2\u10DD \u10D1\u10D0\u10E0\u10D0\u10D7\u10D8\u10E1 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",currency_code:"\u10D5\u10D0\u10DA\u10E3\u10E2\u10D8\u10E1 \u10D9\u10DD\u10D3\u10D8",iban:"IBAN",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},n={nan:"NaN",number:"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",string:"\u10D5\u10D4\u10DA\u10D8",boolean:"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",function:"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",array:"\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 instanceof ${o.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${s}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${i}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${s}`}case"invalid_value":return o.values.length===1?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${J(o.values[0])}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${V(o.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${a.verb} ${i}${o.maximum.toString()} ${a.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.origin} ${a.verb} ${i}${o.minimum.toString()} ${a.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.origin} \u10D8\u10E7\u10DD\u10E1 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${i.prefix}"-\u10D8\u10D7`:i.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${i.suffix}"-\u10D8\u10D7`:i.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${i.includes}"-\u10E1`:i.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${i.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${r[i.format]??o.format}`}case"not_multiple_of":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${o.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;case"unrecognized_keys":return`\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${o.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${V(o.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${o.origin}-\u10E8\u10D8`;case"invalid_union":return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0";case"invalid_element":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${o.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}};function aK(){return{localeError:Qme()}}var Yme=()=>{let e={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},map:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function t(o){return e[o]??null}let r={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",mac:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 MAC",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",credit_card:"\u179B\u17C1\u1781\u1794\u17D0\u178E\u17D2\u178E\u17A5\u178E\u1791\u17B6\u1793",currency_code:"\u1780\u17BC\u178A\u179A\u17BC\u1794\u17B7\u1799\u1794\u17D0\u178E\u17D2\u178E",iban:"IBAN",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"},n={nan:"NaN",number:"\u179B\u17C1\u1781",array:"\u17A2\u17B6\u179A\u17C1 (Array)",null:"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A instanceof ${o.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${s}`:`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${s}`}case"invalid_value":return o.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${J(o.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${o.maximum.toString()} ${a.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o.origin} ${i} ${o.minimum.toString()} ${a.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o.origin} ${i} ${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${i.prefix}"`:i.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${i.suffix}"`:i.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${i.includes}"`:i.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${i.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${r[i.format]??o.format}`}case"not_multiple_of":return`\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${o.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${V(o.keys,", ")}`;case"invalid_key":return`\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${o.origin}`;case"invalid_union":return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case"invalid_element":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${o.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}};function PS(){return{localeError:Yme()}}function sK(){return PS()}var Jme=()=>{let e={string:{unit:"\u0C85\u0C95\u0CCD\u0CB7\u0CB0\u0C97\u0CB3\u0CC1",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"},file:{unit:"\u0CAC\u0CC8\u0C9F\u0CCD\u200C\u0C97\u0CB3\u0CC1",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"},array:{unit:"\u0CB5\u0CB8\u0CCD\u0CA4\u0CC1\u0C97\u0CB3\u0CC1",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"},set:{unit:"\u0CB5\u0CB8\u0CCD\u0CA4\u0CC1\u0C97\u0CB3\u0CC1",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"},map:{unit:"entries",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"}};function t(o){return e[o]??null}let r={regex:"\u0C87\u0CA8\u0CCD\u0CAA\u0CC1\u0C9F\u0CCD",email:"email \u0CB5\u0CBF\u0CB3\u0CBE\u0CB8",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0CA6\u0CBF\u0CA8\u0CBE\u0C82\u0C95\u0CA6 \u0CB8\u0CAE\u0CAF",date:"ISO \u0CA6\u0CBF\u0CA8\u0CBE\u0C82\u0C95",time:"ISO \u0CB8\u0CAE\u0CAF",duration:"ISO \u0C85\u0CB5\u0CA7\u0CBF",ipv4:"IPv4 \u0CB5\u0CBF\u0CB3\u0CBE\u0CB8",ipv6:"IPv6 \u0CB5\u0CBF\u0CB3\u0CBE\u0CB8",mac:"MAC \u0CB5\u0CBF\u0CB3\u0CBE\u0CB8",cidrv4:"IPv4 \u0CB5\u0CCD\u0CAF\u0CBE\u0CAA\u0CCD\u0CA4\u0CBF\u0CAF",cidrv6:"IPv6 \u0CB5\u0CCD\u0CAF\u0CBE\u0CAA\u0CCD\u0CA4\u0CBF\u0CAF",base64:"base64-encoded\u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD",base64url:"base64url-encoded\u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD",json_string:"JSON\u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD",e164:"E.164 \u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6",credit_card:"\u0C95\u0CCD\u0CB0\u0CC6\u0CA1\u0CBF\u0C9F\u0CCD \u0C95\u0CBE\u0CB0\u0CCD\u0CA1\u0CCD \u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6",currency_code:"\u0C95\u0CB0\u0CC6\u0CA8\u0CCD\u0CB8\u0CBF \u0C95\u0CCB\u0CA1\u0CCD",iban:"IBAN",jwt:"JWT",template_literal:"\u0C87\u0CA8\u0CCD\u0CAA\u0CC1\u0C9F\u0CCD"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C87\u0CA8\u0CCD\u200C\u0CAA\u0CC1\u0C9F\u0CCD: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${i}, \u0CB8\u0CCD\u0CB5\u0CC0\u0C95\u0CB0\u0CBF\u0CB8\u0CBF\u0CA6\u0CA8\u0CC1 ${s}`}case"invalid_value":return o.values.length===1?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C87\u0CA8\u0CCD\u200C\u0CAA\u0CC1\u0C9F\u0CCD: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${J(o.values[0])}`:`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C86\u0CAF\u0CCD\u0C95\u0CC6: \u0C87\u0CB5\u0CC1\u0C97\u0CB3\u0CB2\u0CCD\u0CB2\u0CBF \u0C92\u0C82\u0CA6\u0CA8\u0CCD\u0CA8\u0CC1 \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\u0CA4\u0CC1\u0C82\u0CAC\u0CBE \u0CA6\u0CCA\u0CA1\u0CCD\u0CA1\u0CA6\u0CC1: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${o.origin??"value"} \u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1 ${i}${o.maximum.toString()} ${a.unit??"\u0C85\u0C82\u0CB6\u0C97\u0CB3\u0CC1"}`:`\u0CA4\u0CC1\u0C82\u0CAC\u0CBE \u0CA6\u0CCA\u0CA1\u0CCD\u0CA1\u0CA6\u0CC1: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${o.origin??"value"} \u0C8E\u0C82\u0CA6\u0CC1 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\u0CA4\u0CC1\u0C82\u0CAC\u0CBE \u0C9A\u0CBF\u0C95\u0CCD\u0C95\u0CA6\u0CC1: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${o.origin} \u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1 ${i}${o.minimum.toString()} ${a.unit}`:`\u0CA4\u0CC1\u0C82\u0CAC\u0CBE \u0C9A\u0CBF\u0C95\u0CCD\u0C95\u0CA6\u0CC1: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${o.origin} \u0C8E\u0C82\u0CA6\u0CC1 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF\u0CB5\u0CBE\u0CA6 \u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD: \u0C87\u0CA6\u0CB0\u0CCA\u0C82\u0CA6\u0CBF\u0C97\u0CC6 \u0CAA\u0CCD\u0CB0\u0CBE\u0CB0\u0C82\u0CAD\u0CBF\u0CB8\u0CAC\u0CC7\u0C95\u0CC1 "${i.prefix}"`:i.format==="ends_with"?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF\u0CB5\u0CBE\u0CA6 \u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD: \u0C87\u0CA6\u0CB0\u0CCA\u0C82\u0CA6\u0CBF\u0C97\u0CC6 \u0C95\u0CCA\u0CA8\u0CC6\u0C97\u0CCA\u0CB3\u0CCD\u0CB3\u0CAC\u0CC7\u0C95\u0CC1 "${i.suffix}"`:i.format==="includes"?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD: \u0C92\u0CB3\u0C97\u0CCA\u0C82\u0CA1\u0CBF\u0CB0\u0CAC\u0CC7\u0C95\u0CC1 "${i.includes}"`:i.format==="regex"?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF\u0CB5\u0CBE\u0CA6 \u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD: \u0CAE\u0CBE\u0CA6\u0CB0\u0CBF\u0C97\u0CC6 \u0CB9\u0CCA\u0C82\u0CA6\u0CBF\u0C95\u0CC6\u0CAF\u0CBE\u0C97\u0CAC\u0CC7\u0C95\u0CC1 ${i.pattern}`:`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF ${r[i.format]??o.format}`}case"not_multiple_of":return`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6: \u0CAC\u0CB9\u0CC1\u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6\u0CAF\u0CBE\u0C97\u0CBF\u0CB0\u0CAC\u0CC7\u0C95\u0CC1 ${o.divisor}`;case"unrecognized_keys":return`\u0C97\u0CC1\u0CB0\u0CC1\u0CA4\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CA6 \u0C95\u0CC0 ${o.keys.length>1?"s":""}: ${V(o.keys,", ")}`;case"invalid_key":return`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF\u0CB5\u0CBE\u0CA6 \u0C95\u0CC0 \u0C87\u0CA8\u0CCD ${o.origin}`;case"invalid_union":return o.options&&Array.isArray(o.options)&&o.options.length>0?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0CA4\u0CBE\u0CB0\u0CA4\u0CAE\u0CCD\u0CAF \u0CAE\u0CCC\u0CB2\u0CCD\u0CAF. \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${o.options.map(a=>`'${a}'`).join(" | ")}`:"\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C87\u0CA8\u0CCD\u200C\u0CAA\u0CC1\u0C9F\u0CCD";case"invalid_element":return`\u0CB0\u0CB2\u0CCD\u0CB2\u0CBF \u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0CAE\u0CCC\u0CB2\u0CCD\u0CAF ${o.origin}`;default:return"\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C87\u0CA8\u0CCD\u200C\u0CAA\u0CC1\u0C9F\u0CCD"}}};function lK(){return{localeError:Jme()}}var epe=()=>{let e={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"},map:{unit:"\uAC1C",verb:"to have"}};function t(o){return e[o]??null}let r={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",mac:"MAC \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",credit_card:"\uC2E0\uC6A9\uCE74\uB4DC \uBC88\uD638",currency_code:"\uD1B5\uD654 \uCF54\uB4DC",iban:"IBAN",jwt:"JWT",template_literal:"\uC785\uB825"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${o.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${s}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${i}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${s}\uC785\uB2C8\uB2E4`}case"invalid_value":return o.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${J(o.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${V(o.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let i=o.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",a=i==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=t(o.origin),l=s?.unit??"\uC694\uC18C";return s?`${o.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${o.maximum.toString()}${l} ${i}${a}`:`${o.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${o.maximum.toString()} ${i}${a}`}case"too_small":{let i=o.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",a=i==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=t(o.origin),l=s?.unit??"\uC694\uC18C";return s?`${o.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${o.minimum.toString()}${l} ${i}${a}`:`${o.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${o.minimum.toString()} ${i}${a}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:i.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${i.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${r[i.format]??o.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${o.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${V(o.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${o.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${o.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}};function cK(){return{localeError:epe()}}var Sx=e=>e.charAt(0).toUpperCase()+e.slice(1);function dK(e){let t=Math.abs(e),r=t%10,n=t%100;return n>=11&&n<=19||r===0?"many":r===1?"one":"few"}var tpe=()=>{let e={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne ilgesn\u0117 kaip",notInclusive:"turi b\u016Bti trumpesn\u0117 kaip"},bigger:{inclusive:"turi b\u016Bti ne trumpesn\u0117 kaip",notInclusive:"turi b\u016Bti ilgesn\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne didesnis kaip",notInclusive:"turi b\u016Bti ma\u017Eesnis kaip"},bigger:{inclusive:"turi b\u016Bti ne ma\u017Eesnis kaip",notInclusive:"turi b\u016Bti didesnis kaip"}}},array:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}},set:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}}};function t(o,i,a,s){let l=e[o]??null;return l===null?l:{unit:l.unit[i],verb:l.verb[s][a?"inclusive":"notInclusive"]}}let r={regex:"\u012Fvestis",email:"el. pa\u0161to adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukm\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",mac:"MAC adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",credit_card:"kredito kortel\u0117s numeris",currency_code:"valiutos kodas",iban:"IBAN",jwt:"JWT",template_literal:"\u012Fvestis"},n={nan:"NaN",number:"skai\u010Dius",bigint:"sveikasis skai\u010Dius",string:"eilut\u0117",boolean:"login\u0117 reik\u0161m\u0117",undefined:"neapibr\u0117\u017Eta reik\u0161m\u0117",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulin\u0117 reik\u0161m\u0117"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Gautas tipas ${s}, o tik\u0117tasi - instanceof ${o.expected}`:`Gautas tipas ${s}, o tik\u0117tasi - ${i}`}case"invalid_value":return o.values.length===1?`Privalo b\u016Bti ${J(o.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${V(o.values,"|")} pasirinkim\u0173`;case"too_big":{let i=n[o.origin]??o.origin,a=t(o.origin,dK(Number(o.maximum)),o.inclusive??!1,"smaller");if(a?.verb)return`${Sx(i??o.origin??"reik\u0161m\u0117")} ${a.verb} ${o.maximum.toString()} ${a.unit??"element\u0173"}`;let s=o.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${Sx(i??o.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${o.maximum.toString()} ${a?.unit}`}case"too_small":{let i=n[o.origin]??o.origin,a=t(o.origin,dK(Number(o.minimum)),o.inclusive??!1,"bigger");if(a?.verb)return`${Sx(i??o.origin??"reik\u0161m\u0117")} ${a.verb} ${o.minimum.toString()} ${a.unit??"element\u0173"}`;let s=o.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${Sx(i??o.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${o.minimum.toString()} ${a?.unit}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${i.prefix}"`:i.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${i.suffix}"`:i.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${i.includes}"`:i.format==="regex"?`Eilut\u0117 privalo atitikti ${i.pattern}`:`Neteisingas ${r[i.format]??o.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${o.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${o.keys.length>1?"i":"as"} rakt${o.keys.length>1?"ai":"as"}: ${V(o.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let i=n[o.origin]??o.origin;return`${Sx(i??o.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}};function uK(){return{localeError:tpe()}}var rpe=()=>{let e={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},map:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function t(o){return e[o]??null}let r={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",mac:"MAC \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",credit_card:"\u0431\u0440\u043E\u0458 \u043D\u0430 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u0430 \u043A\u0430\u0440\u0442\u0438\u0447\u043A\u0430",currency_code:"\u043A\u043E\u0434 \u043D\u0430 \u0432\u0430\u043B\u0443\u0442\u0430",iban:"IBAN",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"},n={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${o.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${s}`:`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${i}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${s}`}case"invalid_value":return o.values.length===1?`Invalid input: expected ${J(o.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${i}${o.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o.origin} \u0434\u0430 \u0438\u043C\u0430 ${i}${o.minimum.toString()} ${a.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${i.pattern}`:`Invalid ${r[i.format]??o.format}`}case"not_multiple_of":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${o.divisor}`;case"unrecognized_keys":return`${o.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${V(o.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${o.origin}`;case"invalid_union":return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case"invalid_element":return`\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${o.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}};function fK(){return{localeError:rpe()}}var ope=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"},map:{unit:"elemen",verb:"mempunyai"}};function t(o){return e[o]??null}let r={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",mac:"alamat MAC",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",credit_card:"nombor kad kredit",currency_code:"kod mata wang",iban:"IBAN",jwt:"JWT",template_literal:"input"},n={nan:"NaN",number:"nombor"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Input tidak sah: dijangka instanceof ${o.expected}, diterima ${s}`:`Input tidak sah: dijangka ${i}, diterima ${s}`}case"invalid_value":return o.values.length===1?`Input tidak sah: dijangka ${J(o.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`Terlalu besar: dijangka ${o.origin??"nilai"} ${a.verb} ${i}${o.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: dijangka ${o.origin??"nilai"} adalah ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`Terlalu kecil: dijangka ${o.origin} ${a.verb} ${i}${o.minimum.toString()} ${a.unit}`:`Terlalu kecil: dijangka ${o.origin} adalah ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`String tidak sah: mesti bermula dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak sah: mesti mengandungi "${i.includes}"`:i.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${i.pattern}`:`${r[i.format]??o.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${o.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${V(o.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${o.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${o.origin}`;default:return"Input tidak sah"}}};function mK(){return{localeError:ope()}}var npe=()=>{let e={string:{unit:"\u0905\u0915\u094D\u0937\u0930",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"},file:{unit:"\u092C\u093E\u0907\u091F",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"},array:{unit:"\u0924\u0924\u094D\u0935",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"},set:{unit:"\u0924\u0924\u094D\u0935",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"},map:{unit:"\u092A\u094D\u0930\u0935\u093F\u0937\u094D\u091F\u093F",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"}};function t(o){return e[o]??null}let r={regex:"\u0907\u0928\u092A\u0941\u091F",email:"\u0907\u092E\u0947\u0932 \u0920\u0947\u0917\u093E\u0928\u093E",url:"URL",emoji:"\u0907\u092E\u094B\u091C\u0940",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u092E\u093F\u0924\u093F \u0930 \u0938\u092E\u092F",date:"ISO \u092E\u093F\u0924\u093F",time:"ISO \u0938\u092E\u092F",duration:"ISO \u0905\u0935\u0927\u093F",ipv4:"IPv4 \u0920\u0947\u0917\u093E\u0928\u093E",ipv6:"IPv6 \u0920\u0947\u0917\u093E\u0928\u093E",mac:"MAC \u0920\u0947\u0917\u093E\u0928\u093E",cidrv4:"IPv4 \u0926\u093E\u092F\u0930\u093E",cidrv6:"IPv6 \u0926\u093E\u092F\u0930\u093E",base64:"base64-\u0907\u0928\u094D\u0915\u094B\u0921 \u0917\u0930\u093F\u090F\u0915\u094B \u0938\u094D\u091F\u094D\u0930\u093F\u0919",base64url:"base64url-\u0907\u0928\u094D\u0915\u094B\u0921 \u0917\u0930\u093F\u090F\u0915\u094B \u0938\u094D\u091F\u094D\u0930\u093F\u0919",json_string:"JSON \u0938\u094D\u091F\u094D\u0930\u093F\u0919",e164:"E.164 \u0928\u092E\u094D\u092C\u0930",credit_card:"\u0915\u094D\u0930\u0947\u0921\u093F\u091F \u0915\u093E\u0930\u094D\u0921 \u0928\u092E\u094D\u092C\u0930",currency_code:"\u092E\u0941\u0926\u094D\u0930\u093E \u0915\u094B\u0921",iban:"IBAN",jwt:"JWT",template_literal:"\u0907\u0928\u092A\u0941\u091F"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return`\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${i}, \u092A\u094D\u0930\u093E\u092A\u094D\u0924 ${s}`}case"invalid_value":return o.values.length===1?`\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${J(o.values[0])}`:`\u0905\u092E\u093E\u0928\u094D\u092F \u0935\u093F\u0915\u0932\u094D\u092A: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u092E\u093E\u0928\u0939\u0930\u0942 \u092E\u0927\u094D\u092F\u0947 \u090F\u0915 ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\u0927\u0947\u0930\u0948 \u0920\u0942\u0932\u094B: ${o.origin??"\u092E\u093E\u0928"} \u092E\u093E ${i}${o.maximum.toString()} ${a.unit} ${a.verb}`:`\u0927\u0947\u0930\u0948 \u0920\u0942\u0932\u094B: ${o.origin??"\u092E\u093E\u0928"} ${i}${o.maximum.toString()} \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\u0927\u0947\u0930\u0948 \u0938\u093E\u0928\u094B: ${o.origin} \u092E\u093E ${i}${o.minimum.toString()} ${a.unit} ${a.verb}`:`\u0927\u0947\u0930\u0948 \u0938\u093E\u0928\u094B: ${o.origin} ${i}${o.minimum.toString()} \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0919: "${i.prefix}" \u092C\u093E\u091F \u0938\u0941\u0930\u0941 \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`:i.format==="ends_with"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0919: "${i.suffix}" \u092E\u093E \u0938\u092E\u093E\u092A\u094D\u0924 \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`:i.format==="includes"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0919: "${i.includes}" \u0938\u092E\u093E\u0935\u0947\u0936 \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`:i.format==="regex"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0919: \u0922\u093E\u0901\u091A\u093E ${i.pattern} \u0938\u0901\u0917 \u092E\u0947\u0932 \u0916\u093E\u0928\u0941\u092A\u0930\u094D\u091B`:`\u0905\u092E\u093E\u0928\u094D\u092F ${r[i.format]??o.format}`}case"not_multiple_of":return`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u0902\u0916\u094D\u092F\u093E: ${o.divisor} \u0915\u094B \u0917\u0941\u0923\u091C \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`;case"unrecognized_keys":return`\u0905\u092A\u0930\u093F\u091A\u093F\u0924 \u0915\u0941\u091E\u094D\u091C\u0940${o.keys.length>1?"\u0939\u0930\u0942":""}: ${V(o.keys,", ")}`;case"invalid_key":return`\u0905\u092E\u093E\u0928\u094D\u092F \u0915\u0941\u091E\u094D\u091C\u0940: ${o.origin} \u092E\u093E`;case"invalid_union":return o.options&&Array.isArray(o.options)&&o.options.length>0?`\u0905\u092E\u093E\u0928\u094D\u092F \u0921\u093F\u0938\u094D\u0915\u094D\u0930\u093F\u092E\u093F\u0928\u0947\u091F\u0930 \u092E\u093E\u0928: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${o.options.map(a=>`'${a}'`).join(" | ")}`:"\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F";case"invalid_element":return`\u0905\u092E\u093E\u0928\u094D\u092F \u092E\u093E\u0928: ${o.origin} \u092E\u093E`;default:return"\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F"}}};function pK(){return{localeError:npe()}}var ipe=()=>{let e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"},map:{unit:"elementen",verb:"heeft"}};function t(o){return e[o]??null}let r={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",mac:"MAC-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",credit_card:"creditcardnummer",currency_code:"valutacode",iban:"IBAN",jwt:"JWT",template_literal:"invoer"},n={nan:"NaN",number:"getal"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Ongeldige invoer: verwacht instanceof ${o.expected}, ontving ${s}`:`Ongeldige invoer: verwacht ${i}, ontving ${s}`}case"invalid_value":return o.values.length===1?`Ongeldige invoer: verwacht ${J(o.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin),s=o.origin==="date"?"laat":o.origin==="string"?"lang":"groot";return a?`Te ${s}: verwacht dat ${o.origin??"waarde"} ${i}${o.maximum.toString()} ${a.unit??"elementen"} ${a.verb}`:`Te ${s}: verwacht dat ${o.origin??"waarde"} ${i}${o.maximum.toString()} is`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin),s=o.origin==="date"?"vroeg":o.origin==="string"?"kort":"klein";return a?`Te ${s}: verwacht dat ${o.origin} ${i}${o.minimum.toString()} ${a.unit} ${a.verb}`:`Te ${s}: verwacht dat ${o.origin} ${i}${o.minimum.toString()} is`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Ongeldige tekst: moet met "${i.prefix}" beginnen`:i.format==="ends_with"?`Ongeldige tekst: moet op "${i.suffix}" eindigen`:i.format==="includes"?`Ongeldige tekst: moet "${i.includes}" bevatten`:i.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${i.pattern}`:`Ongeldig: ${r[i.format]??o.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${o.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${o.keys.length>1?"s":""}: ${V(o.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${o.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${o.origin}`;default:return"Ongeldige invoer"}}};function hK(){return{localeError:ipe()}}var ape=()=>{let e={string:{unit:"teikn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"element",verb:"\xE5 innehalde"},set:{unit:"element",verb:"\xE5 innehalde"},map:{unit:"element",verb:"\xE5 innehalde"}};function t(o){return e[o]??null}let r={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varigheit",ipv4:"IPv4-adresse",ipv6:"IPv6-adresse",mac:"MAC-adresse",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkoda streng",base64url:"base64url-enkoda streng",json_string:"JSON-streng",e164:"E.164-nummer",credit_card:"kredittkortnummer",currency_code:"valutakode",iban:"IBAN",jwt:"JWT",template_literal:"input"},n={nan:"NaN",number:"tal",array:"liste"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Ugyldig input: forventa instanceof ${o.expected}, fekk ${s}`:`Ugyldig input: forventa ${i}, fekk ${s}`}case"invalid_value":return o.values.length===1?`Ugyldig verdi: forventa ${J(o.values[0])}`:`Ugyldig val: forventa eitt av ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`For stor(t): forventa ${o.origin??"value"} til \xE5 ha ${i}${o.maximum.toString()} ${a.unit??"element"}`:`For stor(t): forventa ${o.origin??"value"} til \xE5 ha ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`For lite(n): forventa ${o.origin} til \xE5 ha ${i}${o.minimum.toString()} ${a.unit}`:`For lite(n): forventa ${o.origin} til \xE5 ha ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: m\xE5 slutte med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: m\xE5 innehalde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${r[i.format]??o.format}`}case"not_multiple_of":return`Ugyldig tal: m\xE5 vere eit multiplum av ${o.divisor}`;case"unrecognized_keys":return`${o.keys.length>1?"Ukjende n\xF8klar":"Ukjend n\xF8kkel"}: ${V(o.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${o.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${o.origin}`;default:return"Ugyldig input"}}};function gK(){return{localeError:ape()}}var spe=()=>{let e={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"},map:{unit:"elementer",verb:"\xE5 inneholde"}};function t(o){return e[o]??null}let r={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-adresse",ipv6:"IPv6-adresse",mac:"MAC-adresse",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",credit_card:"kredittkortnummer",currency_code:"valutakode",iban:"IBAN",jwt:"JWT",template_literal:"input"},n={nan:"NaN",number:"tall",array:"liste"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Ugyldig input: forventet instanceof ${o.expected}, fikk ${s}`:`Ugyldig input: forventet ${i}, fikk ${s}`}case"invalid_value":return o.values.length===1?`Ugyldig verdi: forventet ${J(o.values[0])}`:`Ugyldig valg: forventet en av ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`For stor(t): forventet ${o.origin??"value"} til \xE5 ha ${i}${o.maximum.toString()} ${a.unit??"elementer"}`:`For stor(t): forventet ${o.origin??"value"} til \xE5 ha ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`For lite(n): forventet ${o.origin} til \xE5 ha ${i}${o.minimum.toString()} ${a.unit}`:`For lite(n): forventet ${o.origin} til \xE5 ha ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${r[i.format]??o.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${o.divisor}`;case"unrecognized_keys":return`${o.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${V(o.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${o.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${o.origin}`;default:return"Ugyldig input"}}};function vK(){return{localeError:spe()}}var lpe=()=>{let e={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"},map:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function t(o){return e[o]??null}let r={regex:"giren",email:"epostag\xE2h",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",mac:"MAC ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",credit_card:"i'tib\xE2r kart\u0131 numaras\u0131",currency_code:"para birimi kodu",iban:"IBAN",jwt:"JWT",template_literal:"giren"},n={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`F\xE2sit giren: umulan instanceof ${o.expected}, al\u0131nan ${s}`:`F\xE2sit giren: umulan ${i}, al\u0131nan ${s}`}case"invalid_value":return o.values.length===1?`F\xE2sit giren: umulan ${J(o.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`Fazla b\xFCy\xFCk: ${o.origin??"value"}, ${i}${o.maximum.toString()} ${a.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${o.origin??"value"}, ${i}${o.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`Fazla k\xFC\xE7\xFCk: ${o.origin}, ${i}${o.minimum.toString()} ${a.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${o.origin}, ${i}${o.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let i=o;return i.format==="starts_with"?`F\xE2sit metin: "${i.prefix}" ile ba\u015Flamal\u0131.`:i.format==="ends_with"?`F\xE2sit metin: "${i.suffix}" ile bitmeli.`:i.format==="includes"?`F\xE2sit metin: "${i.includes}" ihtiv\xE2 etmeli.`:i.format==="regex"?`F\xE2sit metin: ${i.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${r[i.format]??o.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${o.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${o.keys.length>1?"s":""}: ${V(o.keys,", ")}`;case"invalid_key":return`${o.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${o.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}};function xK(){return{localeError:lpe()}}var cpe=()=>{let e={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},map:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function t(o){return e[o]??null}let r={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",mac:"\u062F MAC \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",credit_card:"\u062F \u06A9\u0631\u06CC\u0689\u06CC\u067C \u06A9\u0627\u0631\u062A \u0634\u0645\u06CC\u0631\u0647",currency_code:"\u062F \u0627\u0633\u0639\u0627\u0631\u0648 \u06A9\u0648\u0689",iban:"IBAN",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"},n={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${o.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${s} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`:`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${i} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${s} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":return o.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${J(o.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${V(o.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${o.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${o.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${o.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${o.maximum.toString()} \u0648\u064A`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${o.origin} \u0628\u0627\u06CC\u062F ${i}${o.minimum.toString()} ${a.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${o.origin} \u0628\u0627\u06CC\u062F ${i}${o.minimum.toString()} \u0648\u064A`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:i.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:i.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${i.includes}" \u0648\u0644\u0631\u064A`:i.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${i.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${r[i.format]??o.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${o.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${o.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${V(o.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${o.origin} \u06A9\u06D0`;case"invalid_union":return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case"invalid_element":return`\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${o.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}};function bK(){return{localeError:cpe()}}var dpe=()=>{let e={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"},map:{unit:"element\xF3w",verb:"mie\u0107"}};function t(o){return e[o]??null}let r={regex:"wyra\u017Cenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",mac:"adres MAC",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",credit_card:"numer karty kredytowej",currency_code:"kod waluty",iban:"IBAN",jwt:"JWT",template_literal:"wej\u015Bcie"},n={nan:"NaN",number:"liczba",array:"tablica"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${o.expected}, otrzymano ${s}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${i}, otrzymano ${s}`}case"invalid_value":return o.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${J(o.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${o.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${o.maximum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${o.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${o.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${o.minimum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${o.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${i.prefix}"`:i.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${i.suffix}"`:i.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${i.includes}"`:i.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${i.pattern}`:`Nieprawid\u0142ow(y/a/e) ${r[i.format]??o.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${o.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${o.keys.length>1?"s":""}: ${V(o.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${o.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${o.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}};function yK(){return{localeError:dpe()}}var upe=()=>{let e={string:{unit:"caracteres"},file:{unit:"bytes"},array:{unit:"elementos"},set:{unit:"elementos"},map:{unit:"entradas"}};function t(a){return e[a]??null}let r={regex:"a entrada",email:"o endere\xE7o de e-mail",url:"o URL",emoji:"o emoji",uuid:"o UUID",uuidv4:"o UUIDv4",uuidv6:"o UUIDv6",nanoid:"o nanoid",guid:"o GUID",cuid:"o cuid",cuid2:"o cuid2",ulid:"o ULID",xid:"o XID",ksuid:"o KSUID",datetime:"a data e hora ISO",date:"a data ISO",time:"a hora ISO",duration:"a dura\xE7\xE3o ISO",ipv4:"o endere\xE7o IPv4",ipv6:"o endere\xE7o IPv6",mac:"o endere\xE7o MAC",cidrv4:"o intervalo de endere\xE7os IPv4",cidrv6:"o intervalo de endere\xE7os IPv6",base64:"o texto codificado em base64",base64url:"o texto codificado em base64url",json_string:"o texto JSON",e164:"o n\xFAmero E.164",credit_card:"o n\xFAmero de cart\xE3o de cr\xE9dito",currency_code:"o c\xF3digo de moeda",iban:"o IBAN",jwt:"o JWT",template_literal:"a entrada"},n={masculine:{definite:"o",indefinite:"um"},feminine:{definite:"a",indefinite:"uma"}},o={string:{name:"texto",articles:n.masculine},number:{name:"n\xFAmero",articles:n.masculine},int:{name:"n\xFAmero inteiro",articles:n.masculine},boolean:{name:"valor booleano",articles:n.masculine},bigint:{name:"n\xFAmero bigint",articles:n.masculine},symbol:{name:"s\xEDmbolo",articles:n.masculine},undefined:{name:'valor "undefined"',articles:n.masculine},null:{name:'valor "nulo"',articles:n.masculine},never:{name:'valor "never"',articles:n.masculine},void:{name:'valor "void"',articles:n.masculine},date:{name:"data",articles:n.feminine},array:{name:"vetor",articles:n.masculine},object:{name:"objeto",articles:n.masculine},tuple:{name:"tuplo",articles:n.masculine},record:{name:"registo",articles:n.masculine},map:{name:"mapa",articles:n.masculine},set:{name:"conjunto",articles:n.masculine},file:{name:"ficheiro",articles:n.masculine},nonoptional:{name:"valor n\xE3o opcional",articles:n.masculine},nan:{name:'valor "NaN"',articles:n.masculine},function:{name:"fun\xE7\xE3o",articles:n.feminine}};function i(a,s){let l=o[a]??{name:`valor "${a}"`,articles:n.masculine};return`${l.articles[s]} ${l.name}`}return a=>{switch(a.code){case"invalid_type":{let s=i(a.expected,"indefinite"),l=ee(a.input),c=i(l,"indefinite");return`Entrada inv\xE1lida: esperava ${s}, recebeu ${c}`}case"invalid_value":return a.values.length===1?`Entrada inv\xE1lida: esperava ${J(a.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperava uma das seguintes op\xE7\xF5es: ${V(a.values,"|")}`;case"too_big":{let s=a.inclusive?"<=":"<",l=t(a.origin);return l?`Demasiado grande: esperava que ${i(a.origin,"definite")} tivesse ${s} ${a.maximum.toString()} ${l.unit??"elementos"}`:`Demasiado grande: esperava que ${i(a.origin,"definite")} fosse ${s} ${a.maximum.toString()}`}case"too_small":{let s=a.inclusive?">=":">",l=t(a.origin);return l?`Demasiado pequeno: esperava que ${i(a.origin,"definite")} tivesse ${s} ${a.minimum.toString()} ${l.unit??"elementos"}`:`Demasiado pequeno: esperava que ${i(a.origin,"definite")} fosse ${s} ${a.minimum.toString()}`}case"invalid_format":{let s=a;return s.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar por "${s.prefix}"`:s.format==="ends_with"?`Texto inv\xE1lido: deve terminar em "${s.suffix}"`:s.format==="includes"?`Texto inv\xE1lido: deve incluir "${s.includes}"`:s.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${s.pattern}`:`Formato d${r[s.format]??a.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${a.divisor}`;case"unrecognized_keys":{let s=a.keys.length>1?"s":"";return`Chave${s} inv\xE1lida${s}: ${V(a.keys,", ")}`}case"invalid_key":return`Entrada inv\xE1lida n${i(a.origin,"definite")}`;case"invalid_union":return a.options&&Array.isArray(a.options)&&a.options.length>0?`Valor de discrimina\xE7\xE3o inv\xE1lido. Esperava ${a.options.map(l=>`'${l}'`).join(" | ")}`:"Entrada inv\xE1lida";case"invalid_element":return`Entrada inv\xE1lida n${i(a.origin,"definite")}`;default:return"Entrada inv\xE1lida"}}};function _K(){return{localeError:upe()}}var fpe=()=>{let e={string:{unit:"caracteres"},file:{unit:"bytes"},array:{unit:"elementos"},set:{unit:"elementos"},map:{unit:"entradas"}};function t(a){return e[a]??null}let r={regex:"a entrada",email:"o endere\xE7o de e-mail",url:"o URL",emoji:"o emoji",uuid:"o UUID",uuidv4:"o UUIDv4",uuidv6:"o UUIDv6",nanoid:"o nanoid",guid:"o GUID",cuid:"o cuid",cuid2:"o cuid2",ulid:"o ULID",xid:"o XID",ksuid:"o KSUID",datetime:"a data e hora ISO",date:"a data ISO",time:"a hora ISO",duration:"a dura\xE7\xE3o ISO",ipv4:"o endere\xE7o IPv4",ipv6:"o endere\xE7o IPv6",mac:"o endere\xE7o MAC",cidrv4:"a faixa de endere\xE7os IPv4",cidrv6:"a faixa de endere\xE7os IPv6",base64:"o texto codificado em base64",base64url:"o texto codificado em base64url",json_string:"o texto JSON",e164:"o n\xFAmero E.164",credit_card:"o n\xFAmero de cart\xE3o de cr\xE9dito",currency_code:"o c\xF3digo de moeda",iban:"o IBAN",jwt:"o JWT",template_literal:"a entrada"},n={masculine:{definite:"o",indefinite:"um"},feminine:{definite:"a",indefinite:"uma"}},o={string:{name:"texto",articles:n.masculine},number:{name:"n\xFAmero",articles:n.masculine},int:{name:"n\xFAmero inteiro",articles:n.masculine},boolean:{name:"valor booleano",articles:n.masculine},bigint:{name:"n\xFAmero bigint",articles:n.masculine},symbol:{name:"s\xEDmbolo",articles:n.masculine},undefined:{name:'valor "undefined"',articles:n.masculine},null:{name:'valor "nulo"',articles:n.masculine},never:{name:'valor "never"',articles:n.masculine},void:{name:'valor "void"',articles:n.masculine},date:{name:"data",articles:n.feminine},array:{name:"vetor",articles:n.masculine},object:{name:"objeto",articles:n.masculine},tuple:{name:"tupla",articles:n.feminine},record:{name:"registro",articles:n.masculine},map:{name:"mapa",articles:n.masculine},set:{name:"conjunto",articles:n.masculine},file:{name:"arquivo",articles:n.masculine},nonoptional:{name:"valor n\xE3o opcional",articles:n.masculine},nan:{name:'valor "NaN"',articles:n.masculine},function:{name:"fun\xE7\xE3o",articles:n.feminine}};function i(a,s){let l=o[a]??{name:`valor "${a}"`,articles:n.masculine};return`${l.articles[s]} ${l.name}`}return a=>{switch(a.code){case"invalid_type":{let s=i(a.expected,"indefinite"),l=ee(a.input),c=i(l,"indefinite");return`Entrada inv\xE1lida: esperava ${s}, recebeu ${c}`}case"invalid_value":return a.values.length===1?`Entrada inv\xE1lida: esperava ${J(a.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperava uma das seguintes op\xE7\xF5es: ${V(a.values,"|")}`;case"too_big":{let s=a.inclusive?"<=":"<",l=t(a.origin);return l?`Grande demais: esperava que ${i(a.origin,"definite")} tivesse ${s} ${a.maximum.toString()} ${l.unit??"elementos"}`:`Grande demais: esperava que ${i(a.origin,"definite")} fosse ${s} ${a.maximum.toString()}`}case"too_small":{let s=a.inclusive?">=":">",l=t(a.origin);return l?`Pequeno demais: esperava que ${i(a.origin,"definite")} tivesse ${s} ${a.minimum.toString()} ${l.unit??"elementos"}`:`Pequeno demais: esperava que ${i(a.origin,"definite")} fosse ${s} ${a.minimum.toString()}`}case"invalid_format":{let s=a;return s.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${s.prefix}"`:s.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${s.suffix}"`:s.format==="includes"?`Texto inv\xE1lido: deve incluir "${s.includes}"`:s.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${s.pattern}`:`Formato d${r[s.format]??a.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${a.divisor}`;case"unrecognized_keys":{let s=a.keys.length>1?"s":"";return`Chave${s} inv\xE1lida${s}: ${V(a.keys,", ")}`}case"invalid_key":return`Entrada inv\xE1lida n${i(a.origin,"definite")}`;case"invalid_union":return a.options&&Array.isArray(a.options)&&a.options.length>0?`Valor de discrimina\xE7\xE3o inv\xE1lido. Esperava ${a.options.map(l=>`'${l}'`).join(" | ")}`:"Entrada inv\xE1lida";case"invalid_element":return`Entrada inv\xE1lida n${i(a.origin,"definite")}`;default:return"Entrada inv\xE1lida"}}};function IK(){return{localeError:fpe()}}var mpe=()=>{let e={string:{unit:"caractere",verb:"s\u0103 aib\u0103"},file:{unit:"octe\u021Bi",verb:"s\u0103 aib\u0103"},array:{unit:"elemente",verb:"s\u0103 aib\u0103"},set:{unit:"elemente",verb:"s\u0103 aib\u0103"},map:{unit:"intr\u0103ri",verb:"s\u0103 aib\u0103"}};function t(o){return e[o]??null}let r={regex:"intrare",email:"adres\u0103 de email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"dat\u0103 \u0219i or\u0103 ISO",date:"dat\u0103 ISO",time:"or\u0103 ISO",duration:"durat\u0103 ISO",ipv4:"adres\u0103 IPv4",ipv6:"adres\u0103 IPv6",mac:"adres\u0103 MAC",cidrv4:"interval IPv4",cidrv6:"interval IPv6",base64:"\u0219ir codat base64",base64url:"\u0219ir codat base64url",json_string:"\u0219ir JSON",e164:"num\u0103r E.164",credit_card:"num\u0103r de card de credit",currency_code:"cod valutar",iban:"IBAN",jwt:"JWT",template_literal:"intrare"},n={nan:"NaN",string:"\u0219ir",number:"num\u0103r",boolean:"boolean",function:"func\u021Bie",array:"matrice",object:"obiect",undefined:"nedefinit",symbol:"simbol",bigint:"num\u0103r mare",void:"void",never:"never",map:"hart\u0103",set:"set"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return`Intrare invalid\u0103: a\u0219teptat ${i}, primit ${s}`}case"invalid_value":return o.values.length===1?`Intrare invalid\u0103: a\u0219teptat ${J(o.values[0])}`:`Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`Prea mare: a\u0219teptat ca ${o.origin??"valoarea"} ${a.verb} ${i}${o.maximum.toString()} ${a.unit??"elemente"}`:`Prea mare: a\u0219teptat ca ${o.origin??"valoarea"} s\u0103 fie ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`Prea mic: a\u0219teptat ca ${o.origin} ${a.verb} ${i}${o.minimum.toString()} ${a.unit}`:`Prea mic: a\u0219teptat ca ${o.origin} s\u0103 fie ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${i.prefix}"`:i.format==="ends_with"?`\u0218ir invalid: trebuie s\u0103 se termine cu "${i.suffix}"`:i.format==="includes"?`\u0218ir invalid: trebuie s\u0103 includ\u0103 "${i.includes}"`:i.format==="regex"?`\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${i.pattern}`:`Format invalid: ${r[i.format]??o.format}`}case"not_multiple_of":return`Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${o.divisor}`;case"unrecognized_keys":return`Chei nerecunoscute: ${V(o.keys,", ")}`;case"invalid_key":return`Cheie invalid\u0103 \xEEn ${o.origin}`;case"invalid_union":return"Intrare invalid\u0103";case"invalid_element":return`Valoare invalid\u0103 \xEEn ${o.origin}`;default:return"Intrare invalid\u0103"}}};function wK(){return{localeError:mpe()}}function SK(e,t,r,n){let o=Math.abs(e),i=o%10,a=o%100;return a>=11&&a<=19?n:i===1?t:i>=2&&i<=4?r:n}var ppe=()=>{let e={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},map:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function t(o){return e[o]??null}let r={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",mac:"MAC \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",credit_card:"\u043D\u043E\u043C\u0435\u0440 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u043E\u0439 \u043A\u0430\u0440\u0442\u044B",currency_code:"\u043A\u043E\u0434 \u0432\u0430\u043B\u044E\u0442\u044B",iban:"IBAN",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"},n={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${o.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${s}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${i}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${s}`}case"invalid_value":return o.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${J(o.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);if(a){let s=Number(o.maximum),l=SK(s,a.unit.one,a.unit.few,a.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${o.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${o.maximum.toString()} ${l}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${o.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);if(a){let s=Number(o.minimum),l=SK(s,a.unit.one,a.unit.few,a.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${o.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${o.minimum.toString()} ${l}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${o.origin} \u0431\u0443\u0434\u0435\u0442 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${r[i.format]??o.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${o.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${o.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${o.keys.length>1?"\u0438":""}: ${V(o.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${o.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case"invalid_element":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${o.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}};function kK(){return{localeError:ppe()}}var hpe=()=>{let e={string:{unit:"znakov",verb:"ma\u0165"},file:{unit:"bajtov",verb:"ma\u0165"},array:{unit:"prvkov",verb:"ma\u0165"},set:{unit:"prvkov",verb:"ma\u0165"},map:{unit:"polo\u017Eiek",verb:"ma\u0165"}};function t(o){return e[o]??null}let r={regex:"regul\xE1rny v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"d\xE1tum a \u010Das vo form\xE1te ISO",date:"d\xE1tum vo form\xE1te ISO",time:"\u010Das vo form\xE1te ISO",duration:"doba trvania ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",mac:"MAC adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"re\u0165azec zak\xF3dovan\xFD vo form\xE1te base64",base64url:"re\u0165azec zak\xF3dovan\xFD vo form\xE1te base64url",json_string:"re\u0165azec vo form\xE1te JSON",e164:"\u010D\xEDslo E.164",credit_card:"\u010D\xEDslo kreditnej karty",currency_code:"k\xF3d meny",iban:"IBAN",jwt:"JWT",template_literal:"vstup"},n={nan:"NaN",number:"\u010D\xEDslo",string:"re\u0165azec",function:"funkcia",array:"pole"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Neplatn\xFD vstup: o\u010Dak\xE1van\xE9 instanceof ${o.expected}, obdr\u017Ean\xE9 ${s}`:`Neplatn\xFD vstup: o\u010Dak\xE1van\xE9 ${i}, obdr\u017Ean\xE9 ${s}`}case"invalid_value":return o.values.length===1?`Neplatn\xFD vstup: o\u010Dak\xE1van\xE9 ${J(o.values[0])}`:`Neplatn\xFD vstup: o\u010Dak\xE1van\xE1 jedna z hodn\xF4t ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`Hodnota je pr\xEDli\u0161 ve\u013Ek\xE1: ${o.origin??"hodnota"} mus\xED ma\u0165 ${i}${o.maximum.toString()} ${a.unit??"prvkov"}`:`Hodnota je pr\xEDli\u0161 ve\u013Ek\xE1: ${o.origin??"hodnota"} mus\xED by\u0165 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`Hodnota je pr\xEDli\u0161 mal\xE1: ${o.origin??"hodnota"} mus\xED ma\u0165 ${i}${o.minimum.toString()} ${a.unit??"prvkov"}`:`Hodnota je pr\xEDli\u0161 mal\xE1: ${o.origin??"hodnota"} mus\xED by\u0165 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Neplatn\xFD re\u0165azec: mus\xED za\u010D\xEDna\u0165 na "${i.prefix}"`:i.format==="ends_with"?`Neplatn\xFD re\u0165azec: mus\xED kon\u010Di\u0165 na "${i.suffix}"`:i.format==="includes"?`Neplatn\xFD re\u0165azec: mus\xED obsahova\u0165 "${i.includes}"`:i.format==="regex"?`Neplatn\xFD re\u0165azec: mus\xED zodpoveda\u0165 vzoru ${i.pattern}`:`Neplatn\xFD form\xE1t ${r[i.format]??o.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED by\u0165 n\xE1sobkom ${o.divisor}`;case"unrecognized_keys":return`Nezn\xE1me kl\xFA\u010De: ${V(o.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xFA\u010D v ${o.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${o.origin}`;default:return"Neplatn\xFD vstup"}}};function CK(){return{localeError:hpe()}}var gpe=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"},map:{unit:"elementov",verb:"imeti"}};function t(o){return e[o]??null}let r={regex:"vnos",email:"e-po\u0161tni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",mac:"MAC naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",credit_card:"\u0161tevilka kreditne kartice",currency_code:"koda valute",iban:"IBAN",jwt:"JWT",template_literal:"vnos"},n={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${o.expected}, prejeto ${s}`:`Neveljaven vnos: pri\u010Dakovano ${i}, prejeto ${s}`}case"invalid_value":return o.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${J(o.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`Preveliko: pri\u010Dakovano, da bo ${o.origin??"vrednost"} imelo ${i}${o.maximum.toString()} ${a.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${o.origin??"vrednost"} ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`Premajhno: pri\u010Dakovano, da bo ${o.origin} imelo ${i}${o.minimum.toString()} ${a.unit}`:`Premajhno: pri\u010Dakovano, da bo ${o.origin} ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${i.prefix}"`:i.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${i.suffix}"`:i.format==="includes"?`Neveljaven niz: mora vsebovati "${i.includes}"`:i.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${i.pattern}`:`Neveljaven ${r[i.format]??o.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${o.divisor}`;case"unrecognized_keys":return`Neprepoznan${o.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${V(o.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${o.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${o.origin}`;default:return"Neveljaven vnos"}}};function PK(){return{localeError:gpe()}}var vpe=()=>{let e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"},map:{unit:"objekt",verb:"att inneh\xE5lla"}};function t(o){return e[o]??null}let r={regex:"regulj\xE4rt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-adress",ipv6:"IPv6-adress",mac:"MAC-adress",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",credit_card:"kreditkortsnummer",currency_code:"valutakod",iban:"IBAN",jwt:"JWT",template_literal:"mall-literal"},n={nan:"NaN",number:"antal",array:"lista"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${o.expected}, fick ${s}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${i}, fick ${s}`}case"invalid_value":return o.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${J(o.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`F\xF6r stor(t): f\xF6rv\xE4ntade ${o.origin??"v\xE4rdet"} att ha ${i}${o.maximum.toString()} ${a.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${o.origin??"v\xE4rdet"} att ha ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`F\xF6r lite(t): f\xF6rv\xE4ntade ${o.origin??"v\xE4rdet"} att ha ${i}${o.minimum.toString()} ${a.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${o.origin??"v\xE4rdet"} att ha ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${i.prefix}"`:i.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${i.suffix}"`:i.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${i.includes}"`:i.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${i.pattern}"`:`Ogiltig(t) ${r[i.format]??o.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${o.divisor}`;case"unrecognized_keys":return`${o.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${V(o.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${o.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${o.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}};function DK(){return{localeError:vpe()}}var xpe=()=>{let e={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},map:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function t(o){return e[o]??null}let r={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",mac:"MAC \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",credit_card:"\u0B95\u0B9F\u0BA9\u0BCD \u0B85\u0B9F\u0BCD\u0B9F\u0BC8 \u0B8E\u0BA3\u0BCD",currency_code:"\u0BA8\u0BBE\u0BA3\u0BAF\u0B95\u0BCD \u0B95\u0BC1\u0BB1\u0BBF\u0BAF\u0BC0\u0B9F\u0BC1",iban:"IBAN",jwt:"JWT",template_literal:"input"},n={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 instanceof ${o.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${s}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${i}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${s}`}case"invalid_value":return o.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${J(o.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${V(o.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${o.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${o.maximum.toString()} ${a.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${o.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${o.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${o.origin} ${i}${o.minimum.toString()} ${a.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${o.origin} ${i}${o.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${i.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${r[i.format]??o.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${o.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case"unrecognized_keys":return`\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${o.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${V(o.keys,", ")}`;case"invalid_key":return`${o.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case"invalid_union":return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case"invalid_element":return`${o.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}};function RK(){return{localeError:xpe()}}var bpe=()=>{let e={string:{unit:"\u0430\u043B\u043E\u043C\u0430\u0442",verb:"\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434"},file:{unit:"\u0431\u0430\u0439\u0442",verb:"\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434"},array:{unit:"\u0443\u043D\u0441\u0443\u0440",verb:"\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434"},set:{unit:"\u0443\u043D\u0441\u0443\u0440",verb:"\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434"},map:{unit:"\u0441\u0430\u0431\u0442",verb:"\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434"}};function t(o){return e[o]??null}let r={regex:"\u0432\u0443\u0440\u0443\u0434",email:"\u0441\u0443\u0440\u043E\u0493\u0430\u0438 email",url:"URL",emoji:"\u044D\u043C\u043E\u04B7\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0441\u0430\u043D\u0430\u0432\u0443 \u0432\u0430\u049B\u0442\u0438 ISO",date:"\u0441\u0430\u043D\u0430\u0438 ISO",time:"\u0432\u0430\u049B\u0442\u0438 ISO",duration:"\u0434\u0430\u0432\u043E\u043C\u043D\u043E\u043A\u0438\u0438 ISO",ipv4:"\u0441\u0443\u0440\u043E\u0493\u0430\u0438 IPv4",ipv6:"\u0441\u0443\u0440\u043E\u0493\u0430\u0438 IPv6",mac:"\u0441\u0443\u0440\u043E\u0493\u0430\u0438 MAC",cidrv4:"\u043C\u0430\u04B3\u0434\u0443\u0434\u0430\u0438 IPv4",cidrv6:"\u043C\u0430\u04B3\u0434\u0443\u0434\u0430\u0438 IPv6",base64:"\u0441\u0430\u0442\u0440\u0438 \u0434\u0430\u0440 \u0444\u043E\u0440\u043C\u0430\u0442\u0438 base64",base64url:"\u0441\u0430\u0442\u0440\u0438 \u0434\u0430\u0440 \u0444\u043E\u0440\u043C\u0430\u0442\u0438 base64url",json_string:"\u0441\u0430\u0442\u0440\u0438 JSON",e164:"\u0440\u0430\u049B\u0430\u043C\u0438 E.164",credit_card:"\u0440\u0430\u049B\u0430\u043C\u0438 \u043A\u043E\u0440\u0442\u0438 \u043A\u0440\u0435\u0434\u0438\u0442\u04E3",currency_code:"\u0440\u0430\u043C\u0437\u0438 \u0430\u0441\u044A\u043E\u0440",iban:"IBAN",jwt:"JWT",template_literal:"\u0432\u0443\u0440\u0443\u0434"},n={nan:"NaN",number:"\u0440\u0430\u049B\u0430\u043C",string:"\u0441\u0430\u0442\u0440",array:"\u043C\u0430\u0441\u0441\u0438\u0432",object:"\u043E\u0431\u044A\u0435\u043A\u0442",date:"\u0441\u0430\u043D\u0430"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return`\u0412\u0443\u0440\u0443\u0434\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: ${i} \u0438\u043D\u0442\u0438\u0437\u043E\u0440 \u043C\u0435\u0440\u0430\u0444\u0442, ${s} \u0433\u0438\u0440\u0438\u0444\u0442\u0430 \u0448\u0443\u0434`}case"invalid_value":return o.values.length===1?`\u0412\u0443\u0440\u0443\u0434\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: ${J(o.values[0])} \u0438\u043D\u0442\u0438\u0437\u043E\u0440 \u043C\u0435\u0440\u0430\u0444\u0442`:`\u0418\u043D\u0442\u0438\u0445\u043E\u0431\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u044F\u043A\u0435 \u0430\u0437 ${V(o.values,"|")} \u0438\u043D\u0442\u0438\u0437\u043E\u0440 \u043C\u0435\u0440\u0430\u0444\u0442`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\u0425\u0435\u043B\u0435 \u043A\u0430\u043B\u043E\u043D: ${o.origin??"\u049B\u0438\u043C\u0430\u0442"} \u0431\u043E\u044F\u0434 ${i}${o.maximum.toString()} ${a.unit} ${a.verb}`:`\u0425\u0435\u043B\u0435 \u043A\u0430\u043B\u043E\u043D: ${o.origin??"\u049B\u0438\u043C\u0430\u0442"} \u0431\u043E\u044F\u0434 ${i}${o.maximum.toString()} \u0431\u043E\u0448\u0430\u0434`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\u0425\u0435\u043B\u0435 \u0445\u0443\u0440\u0434: ${o.origin} \u0431\u043E\u044F\u0434 ${i}${o.minimum.toString()} ${a.unit} ${a.verb}`:`\u0425\u0435\u043B\u0435 \u0445\u0443\u0440\u0434: ${o.origin} \u0431\u043E\u044F\u0434 ${i}${o.minimum.toString()} \u0431\u043E\u0448\u0430\u0434`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0421\u0430\u0442\u0440\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u0431\u043E\u044F\u0434 \u0431\u043E "${i.prefix}" \u043E\u0493\u043E\u0437 \u0448\u0430\u0432\u0430\u0434`:i.format==="ends_with"?`\u0421\u0430\u0442\u0440\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u0431\u043E\u044F\u0434 \u0431\u043E "${i.suffix}" \u0430\u043D\u04B7\u043E\u043C \u0451\u0431\u0430\u0434`:i.format==="includes"?`\u0421\u0430\u0442\u0440\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u0431\u043E\u044F\u0434 "${i.includes}"-\u0440\u043E \u0434\u0430\u0440 \u0431\u0430\u0440 \u0433\u0438\u0440\u0430\u0434`:i.format==="regex"?`\u0421\u0430\u0442\u0440\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u0431\u043E\u044F\u0434 \u0431\u0430 \u043D\u0430\u043C\u0443\u043D\u0430\u0438 ${i.pattern} \u043C\u0443\u0432\u043E\u0444\u0438\u049B\u0430\u0442 \u043A\u0443\u043D\u0430\u0434`:`${r[i.format]??o.format}-\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442`}case"not_multiple_of":return`\u0420\u0430\u049B\u0430\u043C\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u0431\u043E\u044F\u0434 \u0431\u0430 ${o.divisor} \u0431\u0435 \u0431\u0430\u049B\u0438\u044F \u0442\u0430\u049B\u0441\u0438\u043C \u0448\u0430\u0432\u0430\u0434`;case"unrecognized_keys":return`\u041A\u0430\u043B\u0438\u0434${o.keys.length>1?"\u04B3\u043E\u0438":"\u0438"} \u043D\u043E\u043C\u0430\u044A\u043B\u0443\u043C: ${V(o.keys,", ")}`;case"invalid_key":return`\u041A\u0430\u043B\u0438\u0434\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442 \u0434\u0430\u0440 ${o.origin}`;case"invalid_union":return o.options&&Array.isArray(o.options)&&o.options.length>0?`\u049A\u0438\u043C\u0430\u0442\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442\u0438 \u0434\u0438\u0441\u043A\u0440\u0438\u043C\u0438\u043D\u0430\u0442\u043E\u0440: ${o.options.map(a=>`'${a}'`).join(" | ")} \u0438\u043D\u0442\u0438\u0437\u043E\u0440 \u043C\u0435\u0440\u0430\u0444\u0442`:"\u0412\u0443\u0440\u0443\u0434\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442";case"invalid_element":return`\u049A\u0438\u043C\u0430\u0442\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442 \u0434\u0430\u0440 ${o.origin}`;default:return"\u0412\u0443\u0440\u0443\u0434\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442"}}};function TK(){return{localeError:bpe()}}var ype=()=>{let e={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},map:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function t(o){return e[o]??null}let r={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",mac:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 MAC",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",credit_card:"\u0E2B\u0E21\u0E32\u0E22\u0E40\u0E25\u0E02\u0E1A\u0E31\u0E15\u0E23\u0E40\u0E04\u0E23\u0E14\u0E34\u0E15",currency_code:"\u0E23\u0E2B\u0E31\u0E2A\u0E2A\u0E01\u0E38\u0E25\u0E40\u0E07\u0E34\u0E19",iban:"IBAN",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"},n={nan:"NaN",number:"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02",array:"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)",null:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${o.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${s}`:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${i} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${s}`}case"invalid_value":return o.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${J(o.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",a=t(o.origin);return a?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${o.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${o.maximum.toString()} ${a.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${o.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",a=t(o.origin);return a?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${o.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${o.minimum.toString()} ${a.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${o.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${i.prefix}"`:i.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${i.suffix}"`:i.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${i.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:i.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${i.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${r[i.format]??o.format}`}case"not_multiple_of":return`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${o.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case"unrecognized_keys":return`\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${V(o.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${o.origin}`;case"invalid_union":return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case"invalid_element":return`\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${o.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}};function EK(){return{localeError:ype()}}var _pe=()=>{let e={string:{unit:"simwol",verb:"bolmaly"},file:{unit:"ba\xFDt",verb:"bolmaly"},array:{unit:"elementler",verb:"bolmaly"},set:{unit:"elementler",verb:"bolmaly"},map:{unit:"elementler",verb:"bolmaly"}};function t(o){return e[o]??null}let r={regex:"giri\u015F",email:"e-po\xE7ta salgysy",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sene we wagt",date:"ISO sene",time:"ISO wagt",duration:"ISO wagt aralygy",ipv4:"IPv4 salgysy",ipv6:"IPv6 salgysy",mac:"MAC salgysy",cidrv4:"IPv4 aralygy",cidrv6:"IPv6 aralygy",base64:"base64 bilen \u015Fifrlenen setir",base64url:"base64url bilen \u015Fifrlenen setir",json_string:"JSON setiri",e164:"E.164 nomeri",credit_card:"kredit kartyny\u0148 nomeri",currency_code:"wal\xFDuta kody",iban:"IBAN",jwt:"JWT",template_literal:"\u015Fablon"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return`N\xE4dogry baha: gara\u015Fylan ${i} \xFDerine ${s} alyndy`}case"invalid_value":return o.values.length===1?`N\xE4dogry baha: ${J(o.values[0])} bolmaly`:`N\xE4dogry sa\xFDlaw: a\u015Fakdakylardan biri bolmaly: ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`Has uly: gara\u015Fyl\xFDan ${o.origin??"baha"} ${i} ${o.maximum.toString()} ${a.unit??"element"}`:`Has uly: gara\u015Fyl\xFDan ${o.origin??"baha"} ${i} ${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`Has ki\xE7i: gara\u015Fyl\xFDan ${o.origin} ${i} ${o.minimum.toString()} ${a.unit}`:`Has ki\xE7i: gara\u015Fyl\xFDan ${o.origin} ${i} ${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`N\xE4dogry setir: "${i.prefix}" bilen ba\u015Flamaly`:i.format==="ends_with"?`N\xE4dogry setir: "${i.suffix}" bilen gutarmaly`:i.format==="includes"?`N\xE4dogry setir: "${i.includes}" saklamaly`:i.format==="regex"?`N\xE4dogry setir: ${i.pattern} nusga la\xFDyk bolmaly`:`N\xE4dogry ${r[i.format]??o.format}`}case"not_multiple_of":return`N\xE4dogry san: ${o.divisor} bilen galyndysyz b\xF6l\xFCnmeli`;case"unrecognized_keys":return`Tanalma\xFDan a\xE7ar${o.keys.length>1?"lar":""}: ${V(o.keys,", ")}`;case"invalid_key":return`${o.origin} i\xE7inde n\xE4dogry a\xE7ar`;case"invalid_union":return"N\xE4dogry baha";case"invalid_element":return`${o.origin} i\xE7inde n\xE4dogry baha`;default:return"N\xE4dogry baha"}}};function $K(){return{localeError:_pe()}}var Ipe=()=>{let e={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},map:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function t(o){return e[o]??null}let r={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",mac:"MAC adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",credit_card:"kredi kart\u0131 numaras\u0131",currency_code:"para birimi kodu",iban:"IBAN",jwt:"JWT",template_literal:"\u015Eablon dizesi"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${o.expected}, al\u0131nan ${s}`:`Ge\xE7ersiz de\u011Fer: beklenen ${i}, al\u0131nan ${s}`}case"invalid_value":return o.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${J(o.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\xC7ok b\xFCy\xFCk: beklenen ${o.origin??"de\u011Fer"} ${i}${o.maximum.toString()} ${a.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${o.origin??"de\u011Fer"} ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\xC7ok k\xFC\xE7\xFCk: beklenen ${o.origin} ${i}${o.minimum.toString()} ${a.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${o.origin} ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Ge\xE7ersiz metin: "${i.prefix}" ile ba\u015Flamal\u0131`:i.format==="ends_with"?`Ge\xE7ersiz metin: "${i.suffix}" ile bitmeli`:i.format==="includes"?`Ge\xE7ersiz metin: "${i.includes}" i\xE7ermeli`:i.format==="regex"?`Ge\xE7ersiz metin: ${i.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${r[i.format]??o.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${o.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${o.keys.length>1?"lar":""}: ${V(o.keys,", ")}`;case"invalid_key":return`${o.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${o.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}};function AK(){return{localeError:Ipe()}}var wpe=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},map:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function t(o){return e[o]??null}let r={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",mac:"\u0430\u0434\u0440\u0435\u0441\u0430 MAC",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",credit_card:"\u043D\u043E\u043C\u0435\u0440 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u043E\u0457 \u043A\u0430\u0440\u0442\u043A\u0438",currency_code:"\u043A\u043E\u0434 \u0432\u0430\u043B\u044E\u0442\u0438",iban:"IBAN",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"},n={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F instanceof ${o.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${s}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${i}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${s}`}case"invalid_value":return o.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${J(o.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${o.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${a.verb} ${i}${o.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${o.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${o.origin} ${a.verb} ${i}${o.minimum.toString()} ${a.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${o.origin} \u0431\u0443\u0434\u0435 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${r[i.format]??o.format}`}case"not_multiple_of":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${o.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${o.keys.length>1?"\u0456":""}: ${V(o.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${o.origin}`;case"invalid_union":return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case"invalid_element":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${o.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}};function DS(){return{localeError:wpe()}}function OK(){return DS()}var Spe=()=>{let e={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},map:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function t(o){return e[o]??null}let r={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",mac:"\u0627\u06CC\u0645 \u0627\u06D2 \u0633\u06CC \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",credit_card:"\u06A9\u0631\u06CC\u0688\u0679 \u06A9\u0627\u0631\u0688 \u0646\u0645\u0628\u0631",currency_code:"\u06A9\u0631\u0646\u0633\u06CC \u06A9\u0648\u0688",iban:"IBAN",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"},n={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${o.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${s} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`:`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${i} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${s} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return o.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${J(o.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${V(o.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${o.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${i}${o.maximum.toString()} ${a.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${o.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${i}${o.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${o.origin} \u06A9\u06D2 ${i}${o.minimum.toString()} ${a.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${o.origin} \u06A9\u0627 ${i}${o.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${i.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${r[i.format]??o.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${o.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case"unrecognized_keys":return`\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${o.keys.length>1?"\u0632":""}: ${V(o.keys,"\u060C ")}`;case"invalid_key":return`${o.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${o.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}};function zK(){return{localeError:Spe()}}var kpe=()=>{let e={string:{unit:"belgi",verb:"bo\u2018lishi kerak"},file:{unit:"bayt",verb:"bo\u2018lishi kerak"},array:{unit:"element",verb:"bo\u2018lishi kerak"},set:{unit:"element",verb:"bo\u2018lishi kerak"},map:{unit:"yozuv",verb:"bo\u2018lishi kerak"}};function t(o){return e[o]??null}let r={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",credit_card:"kredit karta raqami",currency_code:"valyuta kodi",iban:"IBAN",jwt:"JWT",template_literal:"kirish"},n={nan:"NaN",number:"raqam",array:"massiv"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${o.expected}, qabul qilingan ${s}`:`Noto\u2018g\u2018ri kirish: kutilgan ${i}, qabul qilingan ${s}`}case"invalid_value":return o.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${J(o.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`Juda katta: kutilgan ${o.origin??"qiymat"} ${i}${o.maximum.toString()} ${a.unit} ${a.verb}`:`Juda katta: kutilgan ${o.origin??"qiymat"} ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`Juda kichik: kutilgan ${o.origin} ${i}${o.minimum.toString()} ${a.unit} ${a.verb}`:`Juda kichik: kutilgan ${o.origin} ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${i.prefix}" bilan boshlanishi kerak`:i.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${i.suffix}" bilan tugashi kerak`:i.format==="includes"?`Noto\u2018g\u2018ri satr: "${i.includes}" ni o\u2018z ichiga olishi kerak`:i.format==="regex"?`Noto\u2018g\u2018ri satr: ${i.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${r[i.format]??o.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${o.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${o.keys.length>1?"lar":""}: ${V(o.keys,", ")}`;case"invalid_key":return`${o.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${o.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}};function NK(){return{localeError:kpe()}}var Cpe=()=>{let e={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},map:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function t(o){return e[o]??null}let r={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",mac:"\u0111\u1ECBa ch\u1EC9 MAC",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",credit_card:"s\u1ED1 th\u1EBB t\xEDn d\u1EE5ng",currency_code:"m\xE3 ti\u1EC1n t\u1EC7",iban:"IBAN",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"},n={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${o.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${s}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${i}, nh\u1EADn \u0111\u01B0\u1EE3c ${s}`}case"invalid_value":return o.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${J(o.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${o.origin??"gi\xE1 tr\u1ECB"} ${a.verb} ${i}${o.maximum.toString()} ${a.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${o.origin??"gi\xE1 tr\u1ECB"} ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${o.origin} ${a.verb} ${i}${o.minimum.toString()} ${a.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${o.origin} ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${i.prefix}"`:i.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${i.suffix}"`:i.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${i.includes}"`:i.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${i.pattern}`:`${r[i.format]??o.format} kh\xF4ng h\u1EE3p l\u1EC7`}case"not_multiple_of":return`S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${o.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${V(o.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${o.origin}`;case"invalid_union":return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case"invalid_element":return`Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${o.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}};function FK(){return{localeError:Cpe()}}var Ppe=()=>{let e={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"},map:{unit:"\u9879",verb:"\u5305\u542B"}};function t(o){return e[o]??null}let r={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",mac:"MAC\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",credit_card:"\u4FE1\u7528\u5361\u53F7",currency_code:"\u8D27\u5E01\u4EE3\u7801",iban:"IBAN",jwt:"JWT",template_literal:"\u8F93\u5165"},n={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${o.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${s}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${i}\uFF0C\u5B9E\u9645\u63A5\u6536 ${s}`}case"invalid_value":return o.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${J(o.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${o.origin??"\u503C"} ${i}${o.maximum.toString()} ${a.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${o.origin??"\u503C"} ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${o.origin} ${i}${o.minimum.toString()} ${a.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${o.origin} ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.prefix}" \u5F00\u5934`:i.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.suffix}" \u7ED3\u5C3E`:i.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${i.pattern}`:`\u65E0\u6548${r[i.format]??o.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${o.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${V(o.keys,", ")}`;case"invalid_key":return`${o.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${o.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}};function LK(){return{localeError:Ppe()}}var Dpe=()=>{let e={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},map:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function t(o){return e[o]??null}let r={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",mac:"MAC \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",credit_card:"\u4FE1\u7528\u5361\u865F",currency_code:"\u8CA8\u5E63\u4EE3\u78BC",iban:"IBAN",jwt:"JWT",template_literal:"\u8F38\u5165"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${o.expected}\uFF0C\u4F46\u6536\u5230 ${s}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${i}\uFF0C\u4F46\u6536\u5230 ${s}`}case"invalid_value":return o.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${J(o.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${o.origin??"\u503C"} \u61C9\u70BA ${i}${o.maximum.toString()} ${a.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${o.origin??"\u503C"} \u61C9\u70BA ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${o.origin} \u61C9\u70BA ${i}${o.minimum.toString()} ${a.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${o.origin} \u61C9\u70BA ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.prefix}" \u958B\u982D`:i.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.suffix}" \u7D50\u5C3E`:i.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${i.pattern}`:`\u7121\u6548\u7684 ${r[i.format]??o.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${o.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${o.keys.length>1?"\u5011":""}\uFF1A${V(o.keys,"\u3001")}`;case"invalid_key":return`${o.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${o.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}};function MK(){return{localeError:Dpe()}}var Rpe=()=>{let e={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"},map:{unit:"nkan",verb:"n\xED"}};function t(o){return e[o]??null}let r={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",mac:"\xE0d\xEDr\u1EB9\u0301s\xEC MAC",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",credit_card:"n\u1ECDmba kaadi gbese",currency_code:"koodu ow\xF3",iban:"IBAN",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"},n={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${o.expected}, \xE0m\u1ECD\u0300 a r\xED ${s}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${i}, \xE0m\u1ECD\u0300 a r\xED ${s}`}case"invalid_value":return o.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${J(o.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${o.origin??"iye"} ${a.verb} ${i}${o.maximum} ${a.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${o.maximum}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${o.origin} ${a.verb} ${i}${o.minimum} ${a.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${o.minimum}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${i.prefix}"`:i.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${i.suffix}"`:i.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${i.includes}"`:i.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${i.pattern}`:`A\u1E63\xEC\u1E63e: ${r[i.format]??o.format}`}case"not_multiple_of":return`N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${o.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${V(o.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${o.origin}`;case"invalid_union":return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";case"invalid_element":return`Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${o.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}};function BK(){return{localeError:Rpe()}}var jK,J$=Symbol("ZodOutput"),eA=Symbol("ZodInput"),RS=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){let n=r[0];return this._map.set(t,n),n&&typeof n=="object"&&"id"in n&&this._idmap.set(n.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){let r=t._zod.parent;if(r){let n={...this.get(r)??{}};delete n.id;let o={...n,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function TS(){return new RS}(jK=globalThis).__zod_globalRegistry??(jK.__zod_globalRegistry=TS());var yo=globalThis.__zod_globalRegistry;var an=Symbol.for("zod.compile.invalid"),UK=Symbol.for("zod.compile.fallback"),ma=class extends Error{constructor(t="z.compile does not support async refinements, transforms, or checks"){super(t),this.name="ZodCompileAsyncError"}},it=class extends Error{constructor(t,r=!0){super(`z.compile does not support ${t}; this schema must use the runtime parser`),this.name="ZodCompileUnsupportedError",this.islandable=r}};function Epe(e,t){try{return $S(e,{assertOnly:!0})}catch{return t}}function nA(e,t){try{let r=$S(e),n=ES(e,r);return n._zod.bag.validator=Epe(e,r),n}catch(r){if(t?.strict)throw r;return e}}function ES(e,t){if(SS(e))throw new it("a schema whose subtree contains a reference cycle");let r=It(e),n=e._zod.run,o=n.__originalRun??n,i=(a,s)=>{if(s?.async||s?.direction==="backward"||s?.skipChecks||s?.[UK]||s&&kS(s,a.value))return o(a,s);let l=t(a.value);return l!==an?(a.value=l,a):(s&&(s[UK]=!0),o(a,s))};return i.__originalRun=o,r._zod.bag.fallbackRun=o,r._zod.bag.validator=t,r._zod.run=i,n.__originalRun||$pe(r,e,t),r}function $pe(e,t,r){let n=e,o=t;if(typeof o.safeParse=="function"){let i=o.safeParse;n.safeParse=(a,s)=>{let l=r(a);return l!==an?{success:!0,data:l}:i(a,s)}}if(typeof o.parse=="function"){let i=o.parse;n.parse=(a,s)=>{let l=r(a);return l!==an?l:i(a,s)}}}function $S(e,t){let r=!0;try{r=SS(e)}catch{}if(r)throw new it("a schema whose subtree contains a reference cycle");let n={constants:new Map,constantCounter:0,varCounter:0,definite:!0},o=new Tu(["input"]),i=or(o,n,e,"input",!t?.assertOnly);o.write(i===null?"return true;":`return ${i};`);let a=["INVALID",...n.constants.keys()],s=[an,...n.constants.values()],l=o.content.join(`
|
|
115
|
+
`),c=t?.debug?a.length>0?`// Constants: ${a.join(", ")}
|
|
116
|
+
${l}`:l:"",d=Function,u=`return (input) => {
|
|
117
|
+
${l}
|
|
118
|
+
}`,f;try{f=new d(...a,u)(...s)}catch(m){throw new it(`this schema (generated code failed to evaluate: ${m.message})`)}return t?.debug&&(f.code=c),f.definite=n.definite,f}function Le(e,t){for(let[n,o]of e.constants)if(o===t)return n;let r=`c${e.constantCounter++}`;return e.constants.set(r,t),r}function Ou(e,t){return e.definite=!1,Le(e,t)}function $e(e){return`v${e.varCounter++}`}function Ape(e,t){let r=e._zod.run({value:t,issues:[]},{});if(r&&typeof r.then=="function")return an;let n=r;return n.issues.length===0?n.value:an}function zo(e,t,r,n,o=!0){let i=e.content.length,a=t.constants.size,s=t.constantCounter,l=t.varCounter;try{return or(e,t,r,n,o)}catch(c){if(!(c instanceof it)||!c.islandable)throw c;if(e.content.length=i,t.constants.size>a){let d=Array.from(t.constants.keys()).slice(a);for(let u of d)t.constants.delete(u)}return t.constantCounter=s,t.varCounter=l,Ope(e,t,r,n)}}function Ope(e,t,r,n){t.definite=!1;let o=Le(t,r),i=Le(t,Ape),a=$e(t);return e.write(`const ${a} = ${i}(${o}, ${n});`),e.write(`if (${a} === INVALID) return INVALID;`),a}var zpe=new Set(["max_size","min_size","size_equals","max_length","min_length","length_equals"]);function Npe(e,t,r,n){let o=r._zod.def.checks;if(!o||o.length===0)return n;let i=n;for(let a of o){let s=a._zod.def;if(s.when&&!zpe.has(s.check))throw new it('check with a custom "when" condition');switch(s.check){case"greater_than":Fpe(e,t,s,i);break;case"less_than":Lpe(e,t,s,i);break;case"multiple_of":Mpe(e,t,s,i);break;case"number_format":KK(e,s,i);break;case"min_length":{let l=$u(s.minimum,"min_length"),c=tA(e,t,i,`${i}.length >= ${l} && ${i}.length < ${s.minimum*2}`);e.write(`if (${c} < ${l}) return INVALID;`);break}case"max_length":{let l=$u(s.maximum,"max_length"),c=tA(e,t,i,`${i}.length > ${l}`);e.write(`if (${c} > ${l}) return INVALID;`);break}case"length_equals":{let l=$u(s.length,"length_equals"),c=tA(e,t,i,`${i}.length >= ${l} && ${i}.length <= ${s.length*2}`);e.write(`if (${c} !== ${l}) return INVALID;`);break}case"min_size":e.write(`if (${i}.size < ${$u(s.minimum,"min_size")}) return INVALID;`);break;case"max_size":e.write(`if (${i}.size > ${$u(s.maximum,"max_size")}) return INVALID;`);break;case"size_equals":e.write(`if (${i}.size !== ${$u(s.size,"size_equals")}) return INVALID;`);break;case"string_format":i=qK(e,t,s,i);break;case"custom":i=Wpe(e,t,a,i);break;case"bigint_format":Bpe(e,s,i);break;case"mime_type":jpe(e,t,s,i);break;case"property":Vpe(e,t,s,i);break;case"properties":Upe(e,t,s,i);break;case"overwrite":{let l=$e(t);Hpe(e,t,a,i,l),i=l;break}default:throw new it(`check type ${s.check}`)}}return i}function tA(e,t,r,n){let o=Le(t,Du),i=$e(t);return e.write(`const ${i} = typeof ${r} === "string" && ${n} ? ${o}(${r}) : ${r}.length;`),i}function $u(e,t){if(typeof e!="number"||!Number.isFinite(e))throw new it(`${t} bound of type ${typeof e}`);return`${e}`}function GK(e,t){if(typeof t=="bigint")return`${t}n`;if(typeof t=="number"){if(Number.isNaN(t))throw new it("comparison check with NaN bound");return`${t}`}if(t instanceof Date){if(Number.isNaN(t.getTime()))throw new it("comparison check with Invalid Date bound");return Le(e,t)}throw new it(`comparison check bound of type ${typeof t}`)}function Fpe(e,t,r,n){let o=r.inclusive?"<":"<=";e.write(`if (${n} ${o} ${GK(t,r.value)}) return INVALID;`)}function Lpe(e,t,r,n){let o=r.inclusive?">":">=";e.write(`if (${n} ${o} ${GK(t,r.value)}) return INVALID;`)}function Mpe(e,t,r,n){if(typeof r.value=="bigint"){if(r.value===BigInt(0))throw new it("multiple_of check with a zero divisor");e.write(`if (${n} % ${r.value}n !== 0n) return INVALID;`)}else{let o=Le(t,qv);e.write(`if (${o}(${n}, ${$u(r.value,"multiple_of")}) !== 0) return INVALID;`)}}function KK(e,t,r){let n=t.format;switch(n){case"safeint":e.write(`if (!Number.isSafeInteger(${r})) return INVALID;`);break;case"int32":e.write(`if (!Number.isInteger(${r}) || ${r} < -2147483648 || ${r} > 2147483647) return INVALID;`);break;case"uint32":e.write(`if (!Number.isInteger(${r}) || ${r} < 0 || ${r} > 4294967295) return INVALID;`);break;case"float32":e.write(`if (!Number.isFinite(${r}) || ${r} < -3.4028234663852886e38 || ${r} > 3.4028234663852886e38) return INVALID;`);break;case"float64":e.write(`if (!Number.isFinite(${r})) return INVALID;`);break;default:throw new it(`number format ${n}`)}}function Bpe(e,t,r){let n=t.format;if(n)switch(n){case"int64":e.write(`if (${r} < -9223372036854775808n || ${r} > 9223372036854775807n) return INVALID;`);break;case"uint64":e.write(`if (${r} < 0n || ${r} > 18446744073709551615n) return INVALID;`);break;default:throw new it(`bigint format ${n}`)}}function jpe(e,t,r,n){let o=r.mime;if(o&&o.length>0){let i=Le(t,new Set(o));e.write(`if (!${i}.has(${n}.type)) return INVALID;`)}}function Upe(e,t,r,n){if(r.when)throw new it('check with a custom "when" condition');e.write(`if (${n} == null) return INVALID;`);let o=r.shape;for(let i of Reflect.ownKeys(o)){let a=typeof i=="symbol"?Le(t,i):on(i),s=$e(t);e.write(`const ${s} = ${n}[${a}];`),zo(e,t,o[i],s,!1)}}function Vpe(e,t,r,n){let o=`${n}[${JSON.stringify(r.property)}]`;or(e,t,r.schema,o)}function Hpe(e,t,r,n,o){let i=r._zod.def.tx;if(!i)throw new it("overwrite check without a transform function");if(zu(i))throw new ma("z.compile: async overwrite transforms are not supported");let a=Le(t,i);e.write(`const ${o} = ${a}(${n});`)}function rA(){throw new Tn}function iA(e){this.issues.push(e)}function Wpe(e,t,r,n){let o=r._zod.def;if(o.fn){if(zu(o.fn))throw new ma("z.compile: async .refine() predicates are not supported");let i=Ou(t,o.fn),a=Le(t,rA),s=$e(t);return e.write(`const ${s} = ${i}(${n});`),e.write(`if (${s} instanceof Promise) ${a}();`),e.write(`if (!${s}) return INVALID;`),n}if(r._zod.check){if(zu(r._zod.check))throw new ma("z.compile: async .superRefine() / check functions are not supported");let i=r._zod.check,s=Ou(t,c=>{let d={value:c,issues:[],addIssue:iA};return i(d)instanceof Promise&&rA(),d.issues.length===0?d.value:an}),l=$e(t);return e.write(`const ${l} = ${s}(${n});`),e.write(`if (${l} === INVALID) return INVALID;`),l}throw new it("custom check without a predicate or check function")}var Zpe=new Set(["cidrv4","cuid","cuid2","date","datetime","duration","e164","email","emoji","ends_with","guid","includes","ipv4","ksuid","lowercase","mac","nanoid","regex","starts_with","time","ulid","uppercase","uuid","xid"]);function qK(e,t,r,n,o=!0){let i=r.format;if(i==="base64"){let c=Le(t,hx);return e.write(`if (!${c}(${n})) return INVALID;`),n}if(i==="base64url"){let c=Le(t,uS);return e.write(`if (!${c}(${n})) return INVALID;`),n}if(i==="jwt"){let c=Le(t,pS),d=Le(t,r.alg??null);return e.write(`if (!${c}(${n}, ${d})) return INVALID;`),n}if(i==="ipv6"){let c=Le(t,px);return e.write(`if (!${c}(${n})) return INVALID;`),n}if(i==="cidrv6"){let c=Le(t,cS);return e.write(`if (!${c}(${n})) return INVALID;`),n}if(i==="credit_card"){let c=Le(t,fS);return e.write(`if (!${c}(${n})) return INVALID;`),n}if(i==="iban"){let c=Le(t,mS);return e.write(`if (!${c}(${n})) return INVALID;`),n}let a=r;if(i==="url"||i==="httpurl"||a.normalize||a.hostname!==void 0||a.protocol!==void 0){let c=Le(t,aS),d=Le(t,r),u=$e(t),f=$e(t);if(e.write(`const ${u} = ${n}.trim();`),e.write(`const ${f} = ${c}(${u}, ${d});`),e.write(`if (typeof ${f} === "number") return INVALID;`),a.hostname!==void 0){let g=Le(t,sS);e.write(`if (!${g}(${f}, ${d}.hostname)) return INVALID;`)}if(a.protocol!==void 0){let g=Le(t,lS);e.write(`if (!${g}(${f}, ${d}.protocol)) return INVALID;`)}if(!o)return null;let m=$e(t),p=a.normalize?`${f}.href`:`${Le(t,mx)}(${u})`;return e.write(`const ${m} = ${p};`),m}let s=r.fn;if(s){if(zu(s))throw new it(`async string format ${i}`);let c=Le(t,s);return e.write(`if (!${c}(${n})) return INVALID;`),n}if(Zpe.has(i)&&r.pattern){let c=Le(t,r.pattern);return e.write(`${c}.lastIndex = 0;`),e.write(`if (!${c}.test(${n})) return INVALID;`),n}let l=r.format;switch(l){case"regex":throw new it("regex format without a pattern");case"lowercase":e.write(`if (${n} !== ${n}.toLowerCase()) return INVALID;`);break;case"uppercase":e.write(`if (${n} !== ${n}.toUpperCase()) return INVALID;`);break;case"includes":e.write(`if (!${n}.includes(${on(r.includes)})) return INVALID;`);break;case"starts_with":{let c=r.prefix;e.write(`if (${n}.slice(0, ${c.length}) !== ${on(c)}) return INVALID;`);break}case"ends_with":{let c=r.suffix;e.write(`if (${n}.slice(-${c.length}) !== ${on(c)}) return INVALID;`);break}default:throw new it(`string format ${l}`)}return n}function or(e,t,r,n,o=!0){let i=r._zod.def,a=i.type;if(i.coerce)throw new it(`coercion (z.coerce.${a}())`);let s=o||!!i.checks?.length,l;switch(a){case"string":l=Gpe(e,t,r,n,s);break;case"number":l=Kpe(e,r,n);break;case"boolean":l=qpe(e,n);break;case"bigint":l=Xpe(e,r,n);break;case"symbol":l=Qpe(e,n);break;case"undefined":l=Ype(e,n);break;case"null":l=Jpe(e,n);break;case"any":case"unknown":l=n;break;case"never":e.write("return INVALID;"),l=n;break;case"void":l=ehe(e,n);break;case"nan":l=the(e,n);break;case"date":l=rhe(e,n);break;case"object":l=ohe(e,t,r,n,s);break;case"optional":l=nhe(e,t,r,n,s);break;case"nullable":l=she(e,t,r,n,s);break;case"array":l=lhe(e,t,r,n,s);break;case"literal":l=che(e,t,r,n);break;case"enum":l=dhe(e,t,r,n);break;case"readonly":{let c=HK(e,t,r,n),d=$e(t);e.write(`const ${d} = Object.freeze(${c});`),l=d;break}case"success":HK(e,t,r,n),l="true";break;case"default":case"prefault":l=uhe(e,t,r,n);break;case"nonoptional":l=fhe(e,t,r,n);break;case"tuple":l=mhe(e,t,r,n);break;case"union":l=phe(e,t,r,n);break;case"intersection":l=vhe(e,t,r,n);break;case"record":l=xhe(e,t,r,n);break;case"map":l=yhe(e,t,r,n);break;case"set":l=_he(e,t,r,n);break;case"file":l=Ihe(e,n);break;case"template_literal":l=whe(e,t,r,n);break;case"lazy":l=She(e,t,r,n);break;case"pipe":l=khe(e,t,r,n);break;case"custom":l=Che(e,t,r,n);break;case"transform":l=Rhe(e,t,r,n);break;case"catch":l=Dhe(e,t,r,n);break;default:throw new it(`schema type ${a}`)}return l===null?null:Npe(e,t,r,l)}function Gpe(e,t,r,n,o=!0){e.write(`if (typeof ${n} !== "string") return INVALID;`);let i=r._zod.def;return i.format===void 0?n:qK(e,t,i,n,o)}function Kpe(e,t,r){e.write(`if (typeof ${r} !== "number" || !Number.isFinite(${r})) return INVALID;`);let n=t._zod.def;return n.check==="number_format"&&n.format&&KK(e,{format:n.format},r),r}function qpe(e,t){return e.write(`if (typeof ${t} !== "boolean") return INVALID;`),t}function Xpe(e,t,r){e.write(`if (typeof ${r} !== "bigint") return INVALID;`);let n=t._zod.def;if(n.format)switch(n.format){case"int64":e.write(`if (${r} < -9223372036854775808n || ${r} > 9223372036854775807n) return INVALID;`);break;case"uint64":e.write(`if (${r} < 0n || ${r} > 18446744073709551615n) return INVALID;`);break}return r}function Qpe(e,t){return e.write(`if (typeof ${t} !== "symbol") return INVALID;`),t}function Ype(e,t){return e.write(`if (${t} !== undefined) return INVALID;`),t}function Jpe(e,t){return e.write(`if (${t} !== null) return INVALID;`),t}function ehe(e,t){return e.write(`if (${t} !== undefined) return INVALID;`),t}function the(e,t){return e.write(`if (typeof ${t} !== "number" || !Number.isNaN(${t})) return INVALID;`),t}function rhe(e,t){return e.write(`if (!(${t} instanceof Date) || Number.isNaN(${t}.getTime())) return INVALID;`),t}function ohe(e,t,r,n,o=!0){let i=r._zod.def;e.write(`if (typeof ${n} !== "object" || ${n} === null || Array.isArray(${n})) return INVALID;`);let a=i.shape,s=Object.keys(a),l=Object.getOwnPropertySymbols(a),c=l.length?[...s,...l]:s,d=x=>typeof x=="symbol"?Le(t,x):on(x),u=x=>typeof x=="symbol"?`[${d(x)}]`:on(x),f=a;if(s.includes("__proto__"))throw new it('object shape key "__proto__"');let m=new Map;for(let x of c){let _=f[x],I=d(x),S=$e(t);if(e.write(`const ${S} = ${n}[${I}];`),_._zod.optin!==void 0){let w=$e(t);e.write(`let ${w} = (() => {`),e.indented(P=>{let $=zo(P,t,_,S);P.write(`return ${$};`)}),e.write("})();"),_._zod.optout==="optional"?(e.write(`if (${w} === INVALID) {`),e.indented(P=>{P.write(`if (${I} in ${n}) return INVALID;`),P.write(`${w} = undefined;`)}),e.write("}")):e.write(`if (${w} === INVALID) return INVALID;`),m.set(x,w)}else{ahe(_)&&e.write(`if (!(${I} in ${n})) return INVALID;`);let w=zo(e,t,_,S,o);w!==null&&m.set(x,w)}}let p=i.catchall,g="none";if(p){let x=p._zod.def.type;if(x==="never"){let _=s.map(I=>`k !== ${on(I)}`).join(" && ")||"true";e.write(`for (const k in ${n}) {`),e.indented(I=>{I.write(`if (${_}) return INVALID;`)}),e.write("}")}else(x==="unknown"||x==="any")&&!p._zod.def.checks?.length?g="passthrough":g="schema"}let b=$e(t),v=c.some(x=>VK(f[x])||oA(f[x]));if(!o){if(g==="schema"){let x=s.length>0?Le(t,new Set(s)):null;e.write(`for (const k in ${n}) {`),e.indented(_=>{_.write('if (k === "__proto__") continue;'),x&&_.write(`if (${x}.has(k)) continue;`);let I=$e(t);_.write(`const ${I} = ${n}[k];`),zo(_,t,p,I,!1)}),e.write("}")}return null}if(v){e.write(`const ${b} = {};`);for(let x of c){let _=d(x),I=m.get(x);oA(f[x])?e.write(`if (${_} in ${n}) ${b}[${_}] = ${I};`):VK(f[x])?e.write(`if (${I} !== undefined || ${_} in ${n}) ${b}[${_}] = ${I};`):e.write(`${b}[${_}] = ${I};`)}}else{let x=c.map(_=>`${u(_)}: ${m.get(_)}`).join(", ");e.write(`const ${b} = { ${x} };`)}if(g!=="none"){let x=s.length>0?Le(t,new Set(s)):null;e.write(`for (const k in ${n}) {`),e.indented(_=>{if(_.write('if (k === "__proto__") continue;'),x&&_.write(`if (${x}.has(k)) continue;`),g==="passthrough")_.write(`${b}[k] = ${n}[k];`);else{let I=$e(t);_.write(`const ${I} = ${n}[k];`);let S=zo(_,t,p,I);_.write(`${b}[k] = ${S};`)}}),e.write("}")}return b}function nhe(e,t,r,n,o=!0){let i=r._zod.def;if(ihe(r))return or(e,t,i.innerType,n,o);if(i.innerType._zod.optin==="defaulted"){let s=$e(t),l=$e(t);return e.write(`let ${s};`),e.write(`if (${n} === undefined) {`),e.indented(c=>{c.write(`const ${l} = (() => {`),c.indented(d=>{let u=or(d,t,i.innerType,n);d.write(`return ${u};`)}),c.write("})();"),c.write(`if (${l} !== INVALID) ${s} = ${l};`)}),e.write("} else {"),e.indented(c=>{let d=or(c,t,i.innerType,n);c.write(`${s} = ${d};`)}),e.write("}"),s}let a=o?$e(t):null;return a&&e.write(`let ${a};`),e.write(`if (${n} !== undefined) {`),e.indented(s=>{let l=or(s,t,i.innerType,n,o);a&&l!==null&&s.write(`${a} = ${l};`)}),e.write("}"),a}function ihe(e){return e._zod.traits?.has("$ZodExactOptional")===!0}function ahe(e){return e._zod.optin===void 0&&Au(e)}function Au(e){if(e._zod.def.coerce)return!0;let t=e._zod.def;switch(t.type){case"any":case"unknown":case"undefined":case"void":case"default":case"prefault":case"transform":case"custom":case"lazy":return!0;case"string":case"number":case"boolean":case"bigint":case"symbol":case"null":case"never":case"nan":case"date":case"object":case"array":case"tuple":case"record":case"map":case"set":case"file":case"template_literal":return!1;case"nonoptional":return t.innerType?Au(t.innerType):!1;case"literal":return!!t.values?.includes(void 0);case"enum":return!!e._zod.values?.has(void 0);case"optional":case"nullable":case"readonly":case"success":return t.innerType?Au(t.innerType):!0;case"catch":return!0;case"union":return t.options?t.options.some(Au):!0;case"intersection":return!t.left||!t.right?!0:Au(t.left)&&Au(t.right);case"pipe":return t.in?Au(t.in):!0;default:return!0}}function oA(e){return e._zod.optin==="optional"&&e._zod.optout==="optional"}function VK(e){return(e._zod.optin!=="defaulted"||e._zod.optout==="optional")&&Tp(e)}function Tp(e){let t=e._zod.def;switch(t.type){case"string":case"number":case"boolean":case"bigint":case"symbol":case"null":case"nan":case"date":case"object":case"array":case"tuple":case"record":case"map":case"set":case"file":case"template_literal":case"never":case"success":return!1;case"literal":return!!t.values?.includes(void 0);case"enum":return!!e._zod.values?.has(void 0);case"optional":return!0;case"nullable":case"readonly":case"nonoptional":return t.innerType?Tp(t.innerType):!0;case"union":return t.options?t.options.some(Tp):!0;case"intersection":return!t.left||!t.right||Tp(t.left)||Tp(t.right);case"pipe":return t.out?Tp(t.out):!0;default:return!0}}function she(e,t,r,n,o=!0){let i=r._zod.def,a=o?$e(t):null;return a&&e.write(`let ${a} = null;`),e.write(`if (${n} !== null) {`),e.indented(s=>{let l=or(s,t,i.innerType,n,o);a&&l!==null&&s.write(`${a} = ${l};`)}),e.write("}"),a}function lhe(e,t,r,n,o=!0){let i=r._zod.def;e.write(`if (!Array.isArray(${n})) return INVALID;`);let a=o?$e(t):null,s=$e(t),l=$e(t);return a&&e.write(`const ${a} = new Array(${n}.length);`),e.write(`for (let ${s} = 0; ${s} < ${n}.length; ${s}++) {`),e.indented(c=>{c.write(`const ${l} = ${n}[${s}];`);let d=zo(c,t,i.element,l,o);a&&d!==null&&c.write(`${a}[${s}] = ${d};`)}),e.write("}"),a}function che(e,t,r,n){let i=r._zod.def.values;if(i.length!==1){let s=Le(t,new Set(i));return e.write(`if (!${s}.has(${n})) return INVALID;`),n}let a=i[0];if(typeof a=="number"&&Number.isNaN(a)){let s=Le(t,new Set(i));return e.write(`if (!${s}.has(${n})) return INVALID;`),n}if(typeof a=="string")e.write(`if (${n} !== ${on(a)}) return INVALID;`);else if(typeof a=="number"||typeof a=="boolean")e.write(`if (${n} !== ${a}) return INVALID;`);else if(a===null)e.write(`if (${n} !== null) return INVALID;`);else if(a===void 0)e.write(`if (${n} !== undefined) return INVALID;`);else if(typeof a=="bigint")e.write(`if (${n} !== ${a}n) return INVALID;`);else throw new it(`literal type ${typeof a}`);return n}function dhe(e,t,r,n){let o=r._zod.values;if(!o)throw new it("enum schema without enumerated values");let i=Le(t,o);return e.write(`if (!${i}.has(${n})) return INVALID;`),n}function HK(e,t,r,n){let o=r._zod.def;return or(e,t,o.innerType,n)}function uhe(e,t,r,n){let o=r._zod.def,a=Object.getOwnPropertyDescriptor(r._zod.def,"defaultValue")?()=>r._zod.def.defaultValue:void 0;if(r._zod.def.type==="prefault"){if(!a)return or(e,t,o.innerType,n);let l=Le(t,a),c=$e(t);return e.write(`let ${c} = ${n};`),e.write(`if (${n} === undefined) ${c} = ${l}();`),or(e,t,o.innerType,c)}let s=$e(t);if(a){let l=Le(t,a),c=Le(t,Xv);e.write(`let ${s};`),e.write(`if (${n} === undefined) {`),e.indented(d=>{d.write(`${s} = ${c}(${l}());`)}),e.write("} else {"),e.indented(d=>{let u=or(d,t,o.innerType,n);d.write(`${s} = ${u} === undefined ? ${c}(${l}()) : ${u};`)}),e.write("}")}else e.write(`let ${s};`),e.write(`if (${n} !== undefined) {`),e.indented(l=>{let c=or(l,t,o.innerType,n);l.write(`${s} = ${c};`)}),e.write("}");return s}function fhe(e,t,r,n){let o=r._zod.def,i=or(e,t,o.innerType,n),a=$e(t);return e.write(`const ${a} = ${i};`),e.write(`if (${a} === undefined) return INVALID;`),a}function mhe(e,t,r,n){let o=r._zod.def,i=o.items,a=o.rest;e.write(`if (!Array.isArray(${n})) return INVALID;`);let s=WK(i,"optin"),l=WK(i,"optout");a?e.write(`if (${n}.length < ${s}) return INVALID;`):e.write(`if (${n}.length < ${s} || ${n}.length > ${i.length}) return INVALID;`);let c=$e(t);e.write(`const ${c} = [];`);for(let d=0;d<i.length;d++){let u=i[d];if(d>=l)e.write(`if (${c}.length === ${d}) {`),e.indented(f=>{f.write(`if (${d} < ${n}.length) {`),f.indented(m=>{let p=$e(t);m.write(`const ${p} = ${n}[${d}];`);let g=zo(m,t,u,p);m.write(`${c}[${d}] = ${g};`)}),f.write("} else {"),f.indented(m=>{if(oA(u)){m.write(`${c}.length = ${d};`);return}let p=$e(t),g=$e(t);m.write(`const ${p} = undefined;`),m.write(`const ${g} = (() => {`),m.indented(b=>{let v=zo(b,t,u,p);b.write(`return ${v};`)}),m.write("})();"),m.write(`if (${g} === INVALID || ${g} === undefined) ${c}.length = ${d};`),m.write(`else ${c}[${d}] = ${g};`)}),f.write("}")}),e.write("}");else{let f=$e(t);e.write(`const ${f} = ${n}[${d}];`);let m=zo(e,t,u,f);e.write(`${c}[${d}] = ${m};`)}}if(a){let d=$e(t),u=$e(t);e.write(`for (let ${d} = ${i.length}; ${d} < ${n}.length; ${d}++) {`),e.indented(f=>{f.write(`const ${u} = ${n}[${d}];`);let m=zo(f,t,a,u);f.write(`${c}[${d}] = ${m};`)}),e.write("}")}return c}function WK(e,t){for(let r=e.length-1;r>=0;r--)if(!(t==="optin"?e[r]._zod.optin!==void 0:e[r]._zod.optout==="optional"))return r+1;return 0}function phe(e,t,r,n){let o=r._zod.def,i=o.options;if(o.discriminator)return hhe(e,t,o,n);if(o.inclusive===!1)throw new it("exclusive unions (z.xor)");if(i.length===0)return e.write("return INVALID;"),n;if(i.length===1)return or(e,t,i[0],n);if(i.every(l=>l._zod.def.type==="literal"&&!l._zod.def.checks?.length)){let l=new Set(i.flatMap(d=>d._zod.def.values)),c=Le(t,l);return e.write(`if (!${c}.has(${n})) return INVALID;`),n}let s=$e(t);e.write(`let ${s};`);for(let l=0;l<i.length;l++){let c=i[l];l===0?e.write(`${s} = (() => {`):e.write(`if (${s} === INVALID) ${s} = (() => {`),e.indented(d=>{let u=or(d,t,c,n);d.write(`return ${u};`)}),e.write("})();")}return e.write(`if (${s} === INVALID) return INVALID;`),s}function hhe(e,t,r,n){if(r.unionFallback)throw new it("discriminated union with unionFallback");if(r.options.length===0)return e.write("return INVALID;"),n;let o=$e(t),i=$e(t);e.write(`const ${o} = ${n}?.[${on(r.discriminator)}];`),e.write(`let ${i};`);let a=!0,s=new Set;for(let l of r.options){let c=l._zod.propValues?.[r.discriminator];if(!c||c.size===0)throw new it("discriminated union option without static discriminator values");for(let f of c){if(s.has(f))throw new it(`duplicate discriminator value ${String(f)}`);s.add(f)}let d=Array.from(c,f=>ghe(t,o,f)),u=a?"if":"else if";e.write(`${u} (${d.join(" || ")}) {`),e.indented(f=>{let m=or(f,t,l,n);f.write(`${i} = ${m};`)}),e.write("}"),a=!1}return e.write("else { return INVALID; }"),i}function ghe(e,t,r){if(typeof r=="string")return`${t} === ${on(r)}`;if(typeof r=="number")return Number.isNaN(r)?`Number.isNaN(${t})`:`${t} === ${r}`;if(typeof r=="boolean")return`${t} === ${r}`;if(r===null)return`${t} === null`;if(r===void 0)return`${t} === undefined`;if(typeof r=="bigint")return`${t} === ${r}n`;if(typeof r=="symbol"){let n=Le(e,r);return`${t} === ${n}`}throw new it(`literal discriminator value ${String(r)}`)}function vhe(e,t,r,n){let o=r._zod.def;t.definite=!1;let i=zo(e,t,o.left,n),a=zo(e,t,o.right,n),s=Le(t,Pp),l=$e(t);return e.write(`const ${l} = ${s}(${i}, ${a});`),e.write(`if (!${l}.valid) return INVALID;`),`${l}.data`}function xhe(e,t,r,n){let o=r._zod.def,i=Le(t,Pi);e.write(`if (!${i}(${n})) return INVALID;`);let a=$e(t),s=$e(t),l=$e(t);e.write(`const ${a} = {};`);let c=o,d=c.partial?void 0:o.keyType._zod.values;if(d){let m=[];for(let g of d){if(!(typeof g=="string"||typeof g=="number"||typeof g=="symbol"))throw new it(`record key value ${String(g)}`);let b=typeof g=="number"?g.toString():g;if(b==="__proto__")throw new it('record key "__proto__"');m.push(b);let v=Le(t,g),x=or(e,t,o.keyType,v),_=$e(t);e.write(`const ${_} = ${n}[${bhe(t,b)}];`);let I=zo(e,t,o.valueType,_);e.write(`${a}[${x}] = ${I};`)}let p=Le(t,new Set(m));return e.write(`for (const ${s} in ${n}) {`),e.indented(g=>{g.write(`if (${p}.has(${s})) continue;`),c.mode==="loose"?g.write(`if (${s} !== "__proto__") ${a}[${s}] = ${n}[${s}];`):g.write("return INVALID;")}),e.write("}"),a}let u=o.keyType._zod.def;if(!(u.type==="string"&&u.format===void 0&&!u.coerce&&(u.checks?.length??0)===0)){let m=o.mode==="loose",p=$S(o.keyType);p.definite===!1&&(t.definite=!1);let g=Le(t,p),b=Le(t,nl),v=$e(t);return ZK(e,t,n,s,x=>{x.write(`let ${v} = ${g}(${s});`),x.write(`if (${v} === INVALID && typeof ${s} === "string" && ${b}.test(${s})) ${v} = ${g}(Number(${s}));`),m?x.write(`if (${v} === INVALID) { ${a}[${s}] = ${n}[${s}]; continue; }`):x.write(`if (${v} === INVALID) return INVALID;`),x.write(`if (${v} === "__proto__") continue;`);let _=$e(t);x.write(`const ${_} = ${n}[${s}];`);let I=zo(x,t,o.valueType,_);x.write(`${a}[${v}] = ${I};`)}),a}return ZK(e,t,n,s,m=>{m.write(`const ${l} = ${n}[${s}];`);let p=zo(m,t,o.valueType,l);m.write(`${a}[${s}] = ${p};`)},"return INVALID;"),a}function ZK(e,t,r,n,o,i){let a=Le(t,Object.prototype.propertyIsEnumerable),s=$e(t),l=$e(t),c=$e(t);e.write(`const ${s} = Object.getOwnPropertySymbols(${r});`),e.write(`const ${l} = Object.getOwnPropertyNames(${r});`),e.write(`for (let ${c} = 0; ${c} < ${l}.length; ${c}++) {`),e.indented(d=>{d.write(`const ${n} = ${l}[${c}];`),d.write(`if (${n} === "__proto__" || !${a}.call(${r}, ${n})) continue;`),o(d)}),e.write("}"),e.write(`for (let ${c} = 0; ${c} < ${s}.length; ${c}++) {`),e.indented(d=>{d.write(`const ${n} = ${s}[${c}];`),d.write(`if (!${a}.call(${r}, ${n})) continue;`),i?d.write(i):o(d)}),e.write("}")}function bhe(e,t){return typeof t=="string"?on(t):Le(e,t)}function yhe(e,t,r,n){let o=r._zod.def;e.write(`if (!(${n} instanceof Map)) return INVALID;`);let i=$e(t),a=$e(t),s=$e(t);return e.write(`const ${i} = new Map();`),e.write(`for (const [${a}, ${s}] of ${n}) {`),e.indented(l=>{let c=or(l,t,o.keyType,a),d=or(l,t,o.valueType,s);l.write(`${i}.set(${c}, ${d});`)}),e.write("}"),i}function _he(e,t,r,n){let o=r._zod.def;e.write(`if (!(${n} instanceof Set)) return INVALID;`);let i=$e(t),a=$e(t);return e.write(`const ${i} = new Set();`),e.write(`for (const ${a} of ${n}) {`),e.indented(s=>{let l=or(s,t,o.valueType,a);s.write(`${i}.add(${l});`)}),e.write("}"),i}function Ihe(e,t){return e.write(`if (!(${t} instanceof File)) return INVALID;`),t}function whe(e,t,r,n){e.write(`if (typeof ${n} !== "string") return INVALID;`);let o=r._zod.pattern;if(o){let i=Le(t,o);e.write(`${i}.lastIndex = 0;`),e.write(`if (!${i}.test(${n})) return INVALID;`)}return n}function She(e,t,r,n){let o=r._zod.def,i=Ou(t,o.getter),a=Le(t,{parser:null});e.write(`if (!${a}.parser) {`),e.indented(l=>{l.write(`const inner = ${i}();`),l.write(`${a}.parser = function(input) {`),l.indented(c=>{c.write("const result = inner._zod.run({ value: input, issues: [] }, {});"),c.write("return result.issues.length === 0 ? result.value : INVALID;")}),l.write("};")}),e.write("}");let s=$e(t);return e.write(`const ${s} = ${a}.parser(${n});`),e.write(`if (${s} === INVALID) return INVALID;`),s}function khe(e,t,r,n){let o=r._zod.def,i=or(e,t,o.in,n);if(o.transform){if(zu(o.transform))throw new ma("z.compile: async transforms in pipes are not supported");let a=o.transform,l=Ou(t,d=>{let u={value:d,issues:[],addIssue:iA},f=a(d,u);return f instanceof Promise?an:u.issues.length===0?f:an}),c=$e(t);return e.write(`const ${c} = ${l}(${i});`),e.write(`if (${c} === INVALID) return INVALID;`),or(e,t,o.out,c)}else return or(e,t,o.out,i)}function zu(e){return typeof e=="function"&&(e.constructor.name==="AsyncFunction"||e[Symbol.toStringTag]==="AsyncFunction")}function Che(e,t,r,n){let o=r._zod.def;if(o.fn){if(zu(o.fn))throw new ma("z.compile: async custom predicates are not supported");let i=Ou(t,o.fn),a=Le(t,rA),s=$e(t);e.write(`const ${s} = ${i}(${n});`),e.write(`if (${s} instanceof Promise) ${a}();`),e.write(`if (!${s}) return INVALID;`)}else throw new it("custom schema without a predicate function");return n}function Phe(e,t,r){let n=e._zod.run({value:r,issues:[]},{});if(n&&typeof n.then=="function")return an;let o=n;return o.issues.length===0?o.value:t()}function Dhe(e,t,r,n){let o=r._zod.def;if(!o.catchValue[Lw])throw new it("catch with a callback (only a constant catch value compiles)",!1);let i=$e(t);e.write(`let ${i} = (() => {`),e.indented(c=>{let d=zo(c,t,o.innerType,n);c.write(`return ${d};`)}),e.write("})();");let a=Le(t,o.innerType),s=Ou(t,o.catchValue),l=Le(t,Phe);return e.write(`if (${i} === INVALID) {`),e.indented(c=>{c.write(`${i} = ${l}(${a}, ${s}, ${n});`),c.write(`if (${i} === INVALID) return INVALID;`)}),e.write("}"),i}function Rhe(e,t,r,n){let o=r._zod.def;if(o.transform){if(zu(o.transform))throw new ma("z.compile: async transforms are not supported");let i=o.transform,s=Ou(t,c=>{let d={value:c,issues:[],addIssue:iA},u=i(c,d);return u instanceof Promise?an:d.issues.length===0?u:an}),l=$e(t);return e.write(`const ${l} = ${s}(${n});`),e.write(`if (${l} === INVALID) return INVALID;`),l}return n}function AS(e){return e.checks&&(e.checks=[...e.checks]),e}function aA(e,t){return new e(AS({type:"string",...ae(t)}))}function sA(e,t){return new e(AS({type:"string",coerce:!0,...ae(t)}))}function OS(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...ae(t)})}function zS(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...ae(t)})}function NS(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...ae(t)})}function FS(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...ae(t)})}function LS(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...ae(t)})}function MS(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...ae(t)})}function Cx(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...ae(t)})}function BS(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...ae(t)})}function jS(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...ae(t)})}function US(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...ae(t)})}function VS(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...ae(t)})}function HS(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...ae(t)})}function WS(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...ae(t)})}function ZS(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...ae(t)})}function GS(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...ae(t)})}function KS(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...ae(t)})}function lA(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...ae(t)})}function qS(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...ae(t)})}function XS(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...ae(t)})}function QS(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...ae(t)})}function YS(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...ae(t)})}function JS(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...ae(t)})}function cA(e,t){return new e({type:"string",format:"credit_card",check:"string_format",abort:!1,...ae(t)})}function dA(e,t){return new e({type:"string",format:"iban",check:"string_format",abort:!1,...ae(t)})}function e1(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...ae(t)})}var uA={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function Px(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...ae(t)})}function Dx(e,t){return new e({type:"string",format:"date",check:"string_format",...ae(t)})}function Rx(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...ae(t)})}function Tx(e,t){return new e({type:"string",format:"duration",check:"string_format",...ae(t)})}function fA(e,t){return new e(AS({type:"number",checks:[],...ae(t)}))}function mA(e,t){return new e(AS({type:"number",coerce:!0,checks:[],...ae(t)}))}function pA(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...ae(t)})}function hA(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...ae(t)})}function gA(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...ae(t)})}function vA(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...ae(t)})}function xA(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...ae(t)})}function bA(e,t){return new e({type:"boolean",...ae(t)})}function yA(e,t){return new e({type:"boolean",coerce:!0,...ae(t)})}function _A(e,t){return new e({type:"bigint",...ae(t)})}function IA(e,t){return new e({type:"bigint",coerce:!0,...ae(t)})}function wA(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...ae(t)})}function SA(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...ae(t)})}function kA(e,t){return new e({type:"symbol",...ae(t)})}function CA(e,t){return new e({type:"undefined",...ae(t)})}function PA(e,t){return new e({type:"null",...ae(t)})}function DA(e){return new e({type:"any"})}function RA(e){return new e({type:"unknown"})}function TA(e,t){return new e({type:"never",...ae(t)})}function EA(e,t){return new e({type:"void",...ae(t)})}function $A(e,t){return new e({type:"date",...ae(t)})}function AA(e,t){return new e({type:"date",coerce:!0,...ae(t)})}function OA(e,t){return new e({type:"nan",...ae(t)})}function es(e,t){return new Jw({check:"less_than",...ae(t),value:e,inclusive:!1})}function qn(e,t){return new Jw({check:"less_than",...ae(t),value:e,inclusive:!0})}function ts(e,t){return new eS({check:"greater_than",...ae(t),value:e,inclusive:!1})}function Xn(e,t){return new eS({check:"greater_than",...ae(t),value:e,inclusive:!0})}function t1(e){return ts(0,e)}function r1(e){return es(0,e)}function o1(e){return qn(0,e)}function n1(e){return Xn(0,e)}function Fc(e,t){return new xE({check:"multiple_of",...ae(t),value:e})}function Lc(e,t){return new _E({check:"max_size",...ae(t),maximum:e})}function rs(e,t){return new IE({check:"min_size",...ae(t),minimum:e})}function Nu(e,t){return new wE({check:"size_equals",...ae(t),size:e})}function Fu(e,t){return new SE({check:"max_length",...ae(t),maximum:e})}function il(e,t){return new kE({check:"min_length",...ae(t),minimum:e})}function Lu(e,t){return new CE({check:"length_equals",...ae(t),length:e})}function Ep(e,t){return new PE({check:"string_format",format:"regex",...ae(t),pattern:e})}function $p(e){return new DE({check:"string_format",format:"lowercase",...ae(e)})}function Ap(e){return new RE({check:"string_format",format:"uppercase",...ae(e)})}function Op(e,t){return new TE({check:"string_format",format:"includes",...ae(t),includes:e})}function zp(e,t){return new EE({check:"string_format",format:"starts_with",...ae(t),prefix:e})}function Np(e,t){return new $E({check:"string_format",format:"ends_with",...ae(t),suffix:e})}function i1(e,t,r){return new AE({check:"property",property:e,schema:t,...ae(r)})}function Fp(e,t){return new OE({check:"properties",shape:e,...ae(t)})}function Lp(e,t){return new zE({check:"mime_type",mime:e,...ae(t)})}function pa(e){return new NE({check:"overwrite",tx:e})}function Mp(e){return pa(t=>t.normalize(e))}function Bp(){return pa(e=>e.trim())}function jp(){return pa(e=>e.toLowerCase())}function Up(){return pa(e=>e.toUpperCase())}function Vp(){return pa(e=>_T(e))}function zA(e,t,r){return new e({type:"array",element:t,...ae(r)})}function The(e,t,r){return new e({type:"union",options:t,...ae(r)})}function Ehe(e,t,r){return new e({type:"union",options:t,inclusive:!1,...ae(r)})}function $he(e,t,r,n){return new e({type:"union",options:r,discriminator:t,...ae(n)})}function Ahe(e,t,r){return new e({type:"intersection",left:t,right:r})}function Ohe(e,t,r,n){let o=r instanceof je,i=o?n:r,a=o?r:null;return new e({type:"tuple",items:t,rest:a,...ae(i)})}function zhe(e,t,r,n){return new e({type:"record",keyType:t,valueType:r,...ae(n)})}function Nhe(e,t,r,n){return new e({type:"map",keyType:t,valueType:r,...ae(n)})}function Fhe(e,t,r){return new e({type:"set",valueType:t,...ae(r)})}function Lhe(e,t,r){let n=Array.isArray(t)?Object.fromEntries(t.map(o=>[o,o])):t;return new e({type:"enum",entries:n,...ae(r)})}function Mhe(e,t,r){return new e({type:"enum",entries:t,...ae(r)})}function Bhe(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...ae(r)})}function NA(e,t){return new e({type:"file",...ae(t)})}function jhe(e,t){return new e({type:"transform",transform:t})}function Uhe(e,t){return new e({type:"optional",innerType:t})}function Vhe(e,t){return new e({type:"nullable",innerType:t})}function Hhe(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():Xv(r)}})}function Whe(e,t,r){return new e({type:"nonoptional",innerType:t,...ae(r)})}function Zhe(e,t){return new e({type:"success",innerType:t})}function Ghe(e,t,r){return new e({type:"catch",innerType:t,catchValue:typeof r=="function"?r:PT(r)})}function Khe(e,t,r){return new e({type:"pipe",in:t,out:r})}function qhe(e,t){return new e({type:"readonly",innerType:t})}function Xhe(e,t,r){return new e({type:"template_literal",parts:t,...ae(r)})}function Qhe(e,t){return new e({type:"lazy",getter:t})}function Yhe(e,t){return new e({type:"promise",innerType:t})}function FA(e,t,r){let n=ae(r);return n.abort??(n.abort=!0),new e({type:"custom",check:"custom",fn:t,...n})}function LA(e,t,r){return new e({type:"custom",check:"custom",fn:t,...ae(r)})}function MA(e,t){let r=XK(n=>(n.addIssue=o=>{if(typeof o=="string")n.issues.push(yp(o,n.value,r._zod.def));else{let i=o;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),"input"in i||(i.input=n.value),i.inst??(i.inst=r),i.continue??(i.continue=!r._zod.def.abort),n.issues.push(yp(i))}},e(n.value,n)),t);return r}function XK(e,t){let r=new Tt({check:"custom",...ae(t)});return r._zod.check=e,r}function BA(e){let t=new Tt({check:"describe"});return t._zod.onattach=[r=>{let n=yo.get(r)??{};yo.add(r,{...n,description:e})}],t._zod.check=()=>{},t}function jA(e){let t=new Tt({check:"meta"});return t._zod.onattach=[r=>{let n=yo.get(r)??{};yo.add(r,{...n,...e})}],t._zod.check=()=>{},t}function UA(e,t){let r=ae(t),n=r.truthy??["true","1","yes","on","y","enabled"],o=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(n=n.map(m=>typeof m=="string"?m.toLowerCase():m),o=o.map(m=>typeof m=="string"?m.toLowerCase():m));let i=new Set(n),a=new Set(o),s=e.Codec??bx,l=e.Boolean??vx,c=e.String??Eu,d=new c({type:"string",error:r.error}),u=new l({type:"boolean",error:r.error}),f=new s({type:"pipe",in:d,out:u,transform:((m,p)=>{let g=m;return r.case!=="sensitive"&&(g=g.toLowerCase()),i.has(g)?!0:a.has(g)?!1:(p.issues.push({code:"invalid_value",expected:"stringbool",values:[...i,...a],input:p.value,inst:f,continue:!1}),{})}),reverseTransform:((m,p)=>m===!0?n[0]||"true":o[0]||"false"),error:r.error});return f._zod.bag.truthy=n,f._zod.bag.falsy=o,f._zod.bag.case=r.case??"insensitive",f}function Mu(e,t,r,n={}){let o=ae(n),i={check:"string_format",type:"string",format:t,fn:typeof r=="function"?r:s=>r.test(s),...o};return r instanceof RegExp&&(i.pattern=r),new e(i)}function Ex(e,...t){for(let r of t)for(let n of Reflect.ownKeys(r))Object.prototype.propertyIsEnumerable.call(r,n)&&bo(e,n,r[n]);return e}function Mc(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??yo,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??"ref",reused:e?.reused??"inline",intersections:[],deferred:[],external:e?.external??void 0}}function Lr(e,t,r,n,o){let i=typeof t.unrepresentable=="function"?t.unrepresentable({zodSchema:e,path:n.path,message:o}):t.unrepresentable;if(i==="any")return!1;if(i===void 0||i==="throw")throw new Error(o);return Object.assign(r,i),!0}function St(e,t,r={path:[],schemaPath:[]}){var n;let o=e._zod.def,i=t.seen.get(e);if(i)return i.count++,r.schemaPath.includes(e)&&(i.cycle=r.path),i.schema;let a={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,a),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let s=e._zod.toJSONSchema?.();if(s)a.schema=s;else{let d={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,d);else{let f=a.schema,m=t.processors[o.type];if(!m)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);m(e,t,f,d)}let u=e._zod.parent;u&&(a.ref||(a.ref=u),St(u,t,d),t.seen.get(u).isParent=!0)}let l=t.metadataRegistry.get(e);return l&&Ex(a.schema,l),t.io==="input"&&sn(e)&&(delete a.schema.examples,delete a.schema.default),t.io==="input"&&"_prefault"in a.schema&&((n=a.schema).default??(n.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function QK(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function Bc(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");if(e.external&&e.sharedDefsExtractedFor===e.external)return;let n=new Map;for(let a of e.seen.entries()){let s=e.metadataRegistry.get(a[0])?.id;if(s){let l=n.get(s);if(l&&l!==a[0])throw new Error(`Duplicate schema id "${s}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);n.set(s,a[0])}}let o=a=>{let s=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let u=e.external.registry.get(a[0])?.id,f=e.external.uri??(p=>p);if(u)return{ref:f(u)};let m=a[1].defId??a[1].schema.id??`schema${e.counter++}`;return a[1].defId=m,{defId:m,ref:`${f("__shared")}#/${s}/${QK(m)}`}}let l="#",c=`${l}/${s}/`;if(a[1]===r&&!a[1].schema.id)return{ref:l};let d=a[1].schema.id??`__schema${e.counter++}`;return{defId:d,ref:c+QK(d)}},i=a=>{if(a[1].schema.$ref)return;let s=a[1],{ref:l,defId:c}=o(a);s.def={...s.schema},c&&(s.defId=c);let d=s.schema;for(let u in d)delete d[u];d.$ref=l};if(e.cycles==="throw")for(let a of e.seen.entries()){let s=a[1];if(s.cycle)throw new Error(`Cycle detected: #/${s.cycle?.join("/")}/<root>
|
|
119
|
+
|
|
120
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let a of e.seen.entries()){let s=a[1];if(t===a[0]){i(a);continue}if(e.external){let c=e.external.registry.get(a[0])?.id;if(t!==a[0]&&c){i(a);continue}}if(e.metadataRegistry.get(a[0])?.id){i(a);continue}if(s.cycle){i(a);continue}s.count>1&&e.reused==="ref"&&i(a)}e.external&&(e.sharedDefsExtractedFor=e.external)}function eq(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let r=[];for(let n of t){if(!n||typeof n!="object")return;eq(n);let o=Object.keys(n);if(o.length!==1||o[0]!=="type")return;let i=n.type;for(let a of Array.isArray(i)?i:[i]){if(typeof a!="string")return;r.includes(a)||r.push(a)}}delete e.anyOf,e.type=r.length===1?r[0]:r}var tq=new Set(["type","properties","required","additionalProperties"]),YK=["oneOf","anyOf"];function JK(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!="object"||t===null?null:Object.keys(t).length?t:null}function VA(e){let t=[];for(let i of e){if(typeof i!="object"||i.type!=="object")return null;for(let a in i)if(!tq.has(a))return null;t.push(i)}let r={},n=new Set;for(let i of t){for(let a in i.properties){if(Object.prototype.hasOwnProperty.call(r,a))continue;let s=[];for(let c of t){let d=c.properties?.[a]??JK(c);d!=null&&(s.some(u=>JSON.stringify(u)===JSON.stringify(d))||s.push(d))}let l=s.length===1?s[0]:VA(s)??{allOf:s};bo(r,a,l)}for(let a of i.required??[])n.add(a)}let o={type:"object",properties:r};if(n.size&&(o.required=[...n]),t.every(i=>i.additionalProperties===!1))o.additionalProperties=!1;else{let i=[];for(let a of t){let s=JK(a);s&&!i.some(l=>JSON.stringify(l)===JSON.stringify(s))&&i.push(s)}i.length===1?o.additionalProperties=i[0]:i.length>1&&(o.additionalProperties={allOf:i})}return o}function Jhe(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let o of tq)if(o in e)return;let r=t.filter(o=>YK.some(i=>Array.isArray(o[i]))),n=null;if(!r.length)n=VA(t);else{let o=r[0],i=YK.find(l=>Array.isArray(o[l]));if(Object.keys(o).length!==1)return;let a=t.filter(l=>l!==o),s=o[i].map(l=>VA([...a,l]));if(s.some(l=>!l))return;n={[i]:s}}n&&(delete e.allOf,Ex(e,n))}function jc(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let n=s=>{let l=e.seen.get(s);if(l.ref===null)return;let c=l.def??l.schema,d={...c},u=l.ref;if(l.ref=null,u){n(u);let m=e.seen.get(u),p=m.schema;if(p.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(p)):Ex(c,p),Ex(c,d),s._zod.parent===u)for(let b in c)b==="$ref"||b==="allOf"||b in d||delete c[b];if(p.$ref&&m.def)for(let b in c)b==="$ref"||b==="allOf"||b in m.def&&JSON.stringify(c[b])===JSON.stringify(m.def[b])&&delete c[b]}let f=s._zod.parent;if(f&&f!==u){n(f);let m=e.seen.get(f);if(m?.schema.$ref&&(c.$ref=m.schema.$ref,m.def))for(let p in c)p==="$ref"||p==="allOf"||p in m.def&&JSON.stringify(c[p])===JSON.stringify(m.def[p])&&delete c[p]}e.override({zodSchema:s,jsonSchema:c,path:l.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let s of[...e.seen.entries()].reverse())n(s[0]);if(e.target!=="openapi-3.0")for(let s of e.seen.entries())eq(s[1].def??s[1].schema);for(let s of e.deferred)s();if(e.intersections.length){let s=new Map;for(let l of e.seen.values())for(let c of[l.schema,l.def]){let d=c?.allOf;if(!Array.isArray(d))continue;let u=s.get(d);u?u.push(c):s.set(d,[c])}for(let l of e.intersections)for(let c of s.get(l)??[])Jhe(c)}}let o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let s=e.external.registry.get(t)?.id;if(!s)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(s)}Ex(o,r.defId?r.schema:r.def??r.schema);let i=e.metadataRegistry.get(t)?.id;i!==void 0&&o.id===i&&delete o.id;let a=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let s of e.seen.entries()){let l=s[1];l.def&&l.defId&&(l.def.id===l.defId&&delete l.def.id,bo(a,l.defId,l.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(a).length>0&&(e.target==="draft-2020-12"?o.$defs=a:o.definitions=a);try{let s=JSON.parse(JSON.stringify(o));return Object.defineProperty(s,"~standard",{value:{...t["~standard"],jsonSchema:{input:Hp(t,"input",e.processors),output:Hp(t,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}function sn(e,t){let r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);let n=e._zod.def;if(n.type==="transform")return!0;if(n.type==="array")return sn(n.element,r);if(n.type==="set")return sn(n.valueType,r);if(n.type==="lazy")return sn(n.getter(),r);if(n.type==="promise"||n.type==="optional"||n.type==="nonoptional"||n.type==="nullable"||n.type==="readonly"||n.type==="default"||n.type==="prefault"||n.type==="catch")return sn(n.innerType,r);if(n.type==="intersection")return sn(n.left,r)||sn(n.right,r);if(n.type==="record"||n.type==="map")return sn(n.keyType,r)||sn(n.valueType,r);if(n.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:sn(n.in,r)||sn(n.out,r);if(n.type==="object"){for(let o in n.shape)if(sn(n.shape[o],r))return!0;return!1}if(n.type==="union"){for(let o of n.options)if(sn(o,r))return!0;return!1}if(n.type==="tuple"){for(let o of n.items)if(sn(o,r))return!0;return!!(n.rest&&sn(n.rest,r))}return!1}var HA=(e,t={})=>r=>{let n=Mc({...r,processors:t});return St(e,n),Bc(n,e),jc(n,e)},Hp=(e,t,r={})=>n=>{let{libraryOptions:o,target:i}=n??{},a=Mc({...o??{},target:i,io:t,processors:r});return St(e,a),Bc(a,e),jc(a,e)};var Wp=(e,t,r)=>{(e[t]===void 0||r>e[t])&&(e[t]=r)},Zp=(e,t,r)=>{(e[t]===void 0||r<e[t])&&(e[t]=r)},rq=(e,t)=>{Wp(e,"minimum",t),Zp(e,"maximum",t)},aq=(e,t)=>{e.multipleOf??(e.multipleOf=[]),e.multipleOf.includes(t)||e.multipleOf.push(t)},sq=(e,t)=>{e.patterns??(e.patterns=new Set),e.patterns.add(t)},lq=(e,t)=>{e.mime=e.mime?e.mime.filter(r=>t.includes(r)):[...t]},cq=(e,t)=>{e.format=t,t.includes("int")&&(e.isInt=!0)},oq=(e,t)=>Wp(e,"minimum",t.minimum),nq=(e,t)=>Zp(e,"maximum",t.maximum),iq=e=>(t,r)=>{cq(t,r.format);let[n,o]=e[r.format];Wp(t,"minimum",n),Zp(t,"maximum",o)},ege={greater_than:(e,t)=>Wp(e,t.inclusive?"minimum":"exclusiveMinimum",t.value),less_than:(e,t)=>Zp(e,t.inclusive?"maximum":"exclusiveMaximum",t.value),multiple_of:(e,t)=>aq(e,t.value),number_format:iq(Yv),bigint_format:iq(Jv),min_length:oq,max_length:nq,length_equals:(e,t)=>rq(e,t.length),min_size:oq,max_size:nq,size_equals:(e,t)=>rq(e,t.size),string_format:(e,t)=>{cq(e,t.format),t.pattern&&sq(e,t.pattern),(t.format==="base64"||t.format==="base64url")&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,t)=>lq(e,t.mime)};function Mr(e){let t={},r=e._zod.def,n=e._zod.traits.has("$ZodCheck")?[e,...r.checks??[]]:r.checks??[];for(let i of n)ege[i._zod.def.check]?.(t,i._zod.def);let o=e._zod.bag;o.minimum!==void 0&&Wp(t,"minimum",o.minimum),o.exclusiveMinimum!==void 0&&Wp(t,"exclusiveMinimum",o.exclusiveMinimum),o.maximum!==void 0&&Zp(t,"maximum",o.maximum),o.exclusiveMaximum!==void 0&&Zp(t,"exclusiveMaximum",o.exclusiveMaximum),o.multipleOf!==void 0&&aq(t,o.multipleOf),o.format!==void 0&&(t.format??(t.format=o.format),o.format.includes("int")&&(t.isInt=!0)),o.mime&&lq(t,o.mime);for(let i of o.patterns??[])sq(t,i);return t}var tge={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},rge=new Map([[dS,YT],[gx,JT]]),dq=e=>rge.get(e)??e,GA=(e,t,r,n)=>{let o=r;o.type="string";let{minimum:i,maximum:a,format:s,patterns:l,contentEncoding:c,laxFormat:d}=Mr(e);if(typeof i=="number"&&(o.minLength=i),typeof a=="number"&&(o.maxLength=a),s&&(o.format=tge[s]??s,o.format===""&&delete o.format,(s==="time"||d)&&delete o.format),c&&(o.contentEncoding=c),l&&l.size>0){let u=[...l].map(dq);u.length===1?o.pattern=u[0].source:u.length>1&&(o.allOf=[...u.map(f=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:f.source}))])}},KA=(e,t,r,n)=>{let o=r,{minimum:i,maximum:a,multipleOf:s,exclusiveMaximum:l,exclusiveMinimum:c,isInt:d}=Mr(e);o.type=d?"integer":"number";let u=typeof c=="number"&&c>=(i??Number.NEGATIVE_INFINITY),f=typeof l=="number"&&l<=(a??Number.POSITIVE_INFINITY),m=t.target==="draft-04"||t.target==="openapi-3.0";if(u?m?(o.minimum=c,o.exclusiveMinimum=!0):o.exclusiveMinimum=c:typeof i=="number"&&(o.minimum=i),f?m?(o.maximum=l,o.exclusiveMaximum=!0):o.exclusiveMaximum=l:typeof a=="number"&&(o.maximum=a),s){let p=new Set;for(let v of s)Number.isFinite(v)&&v!==0?p.add(Math.abs(v)):Lr(e,t,o,n,`A multipleOf divisor of ${v} cannot be represented in JSON Schema`);let[g,...b]=p;g!==void 0&&(o.multipleOf=g),b.length&&(o.allOf=[...o.allOf??[],...b.map(v=>({multipleOf:v}))])}},qA=(e,t,r,n)=>{r.type="boolean"},XA=(e,t,r,n)=>{Lr(e,t,r,n,"BigInt cannot be represented in JSON Schema")},QA=(e,t,r,n)=>{Lr(e,t,r,n,"Symbols cannot be represented in JSON Schema")},YA=(e,t,r,n)=>{t.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},JA=(e,t,r,n)=>{Lr(e,t,r,n,"Undefined cannot be represented in JSON Schema")},e5=(e,t,r,n)=>{Lr(e,t,r,n,"Void cannot be represented in JSON Schema")},t5=(e,t,r,n)=>{r.not={}},r5=(e,t,r,n)=>{},o5=(e,t,r,n)=>{},n5=(e,t,r,n)=>{Lr(e,t,r,n,"Date cannot be represented in JSON Schema")},i5=(e,t,r,n)=>{let o=e._zod.def,i=gp(o.entries);if(i.length===0){r.not={};return}i.every(a=>typeof a=="number")&&(r.type="number"),i.every(a=>typeof a=="string")&&(r.type="string"),r.enum=i},a5=(e,t,r,n)=>{let o=e._zod.def;if(o.values.length===0){r.not={};return}let i=[];for(let a of o.values)if(a===void 0){if(Lr(e,t,r,n,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof a=="bigint"){if(Lr(e,t,r,n,"BigInt literals cannot be represented in JSON Schema"))return;i.push(Number(a))}else i.push(a);if(i.length!==0)if(i.length===1){let a=i[0];r.type=a===null?"null":typeof a,t.target==="draft-04"||t.target==="openapi-3.0"?r.enum=[a]:r.const=a}else i.every(a=>typeof a=="number")&&(r.type="number"),i.every(a=>typeof a=="string")&&(r.type="string"),i.every(a=>typeof a=="boolean")&&(r.type="boolean"),i.every(a=>a===null)&&(r.type="null"),r.enum=i},s5=(e,t,r,n)=>{Lr(e,t,r,n,"NaN cannot be represented in JSON Schema")},l5=(e,t,r,n)=>{let o=r,i=e._zod.pattern;if(!i)throw new Error("Pattern not found in template literal");o.type="string",o.pattern=i.source},c5=(e,t,r,n)=>{let o=r;o.type="string",o.format="binary",o.contentEncoding="binary";let{minimum:i,maximum:a,mime:s}=Mr(e);i!==void 0&&(o.minLength=i),a!==void 0&&(o.maxLength=a),s&&(s.length===0?o.not={}:s.length===1?o.contentMediaType=s[0]:o.anyOf=s.map(l=>({contentMediaType:l})))},d5=(e,t,r,n)=>{r.type="boolean"},u5=(e,t,r,n)=>{Lr(e,t,r,n,"Custom types cannot be represented in JSON Schema")},f5=(e,t,r,n)=>{Lr(e,t,r,n,"Function types cannot be represented in JSON Schema")},m5=(e,t,r,n)=>{Lr(e,t,r,n,"Transforms cannot be represented in JSON Schema")},p5=(e,t,r,n)=>{Lr(e,t,r,n,"Map cannot be represented in JSON Schema")},h5=(e,t,r,n)=>{Lr(e,t,r,n,"Set cannot be represented in JSON Schema")},g5=(e,t,r,n)=>{let o=r,i=e._zod.def,{minimum:a,maximum:s}=Mr(e);typeof a=="number"&&(o.minItems=a),typeof s=="number"&&(o.maxItems=s),o.type="array",o.items=St(i.element,t,{...n,path:[...n.path,"items"]})};function $x(e){let t=e._zod.def;return t.type==="pipe"&&t.in._zod.traits.has("$ZodTransform")?$x(t.out):t.type==="catch"?$x(t.innerType):e._zod.optin}var v5=(e,t,r,n)=>{let o=r,i=e._zod.def,a=i.shape;if(Object.getOwnPropertySymbols(a).length&&Lr(e,t,o,n,"Symbol keys cannot be represented in JSON Schema"))return;o.type="object",o.properties={};for(let c in a)bo(o.properties,c,St(a[c],t,{...n,path:[...n.path,"properties",c]}));let l=[];for(let c of Object.keys(a)){let d=i.shape[c];(t.io==="input"?$x(d)===void 0:d._zod.optout===void 0)&&l.push(c)}l.length>0&&(o.required=l),i.catchall?._zod.def.type==="never"?o.additionalProperties=!1:i.catchall?i.catchall&&(o.additionalProperties=St(i.catchall,t,{...n,path:[...n.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},s1=(e,t,r,n)=>{let o=e._zod.def,i=o.inclusive===!1,a=o.options.map((s,l)=>St(s,t,{...n,path:[...n.path,i?"oneOf":"anyOf",l]}));i?r.oneOf=a:r.anyOf=a},x5=(e,t,r,n)=>{let o=e._zod.def,i=St(o.left,t,{...n,path:[...n.path,"allOf",0]}),a=St(o.right,t,{...n,path:[...n.path,"allOf",1]}),s=c=>"allOf"in c&&Object.keys(c).length===1,l=[...s(i)?i.allOf:[i],...s(a)?a.allOf:[a]];r.allOf=l,t.intersections.push(l)},b5=(e,t,r,n)=>{let o=r,i=e._zod.def;o.type="array";let a=t.target==="draft-2020-12"?"prefixItems":"items",s=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",l=i.items.map((g,b)=>St(g,t,{...n,path:[...n.path,a,b]})),c=i.rest?St(i.rest,t,{...n,path:[...n.path,s,...t.target==="openapi-3.0"?[i.items.length]:[]]}):null,d=i.items.length;for(;d>0;){let g=i.items[d-1];if(!(t.io==="input"?$x(g)!==void 0:g._zod.optout==="optional"))break;d--}let u=i.items.length,f=!i.rest;t.target==="draft-2020-12"?(o.prefixItems=l,f?o.items=!1:c&&(o.items=c),d>0&&(o.minItems=d),f&&(o.maxItems=u)):t.target==="openapi-3.0"?(o.items={anyOf:l},c&&o.items.anyOf.push(c),d>0&&(o.minItems=d),f&&(o.maxItems=u)):(o.items=l,f?o.additionalItems=!1:c&&(o.additionalItems=c),d>0&&(o.minItems=d),f&&(o.maxItems=u));let{minimum:m,maximum:p}=Mr(e);typeof m=="number"&&(o.minItems=m),typeof p=="number"&&(o.maxItems=p)};function WA(e,t,r){if(t.$ref){if(r.has(t))return t;r.add(t);let p=e.get(t)?.def;if(!p)return t;let g=WA(e,p,r);return g===p?t:g}for(let p of["anyOf","oneOf"]){let g=t[p];if(!Array.isArray(g))continue;let b=g.map(v=>WA(e,v,r));b.some((v,x)=>v!==g[x])&&(t={...t,[p]:b})}let n=Array.isArray(t.type)?t.type:[t.type],o=!n.includes("string")&&n.some(p=>p==="number"||p==="integer"),i=t.enum??(t.const!==void 0?[t.const]:void 0);if(!o&&!i?.some(p=>typeof p=="number"))return t;let{minimum:a,maximum:s,exclusiveMinimum:l,exclusiveMaximum:c,multipleOf:d,format:u,id:f,...m}=t;return m.enum?m.enum=m.enum.map(p=>typeof p=="number"?String(p):p):typeof m.const=="number"&&(m.const=String(m.const)),o&&(m.type="string",i||(m.pattern=(n.includes("number")?nl:cx).source)),m}var ZA=new WeakMap;function oge(e){let t=new Map;for(let n of e.seen.values())n.def&&!t.has(n.schema)&&t.set(n.schema,n);let r=new Map;for(let n of ZA.get(e)??[]){let o=e.seen.get(n),i=(o?.def??o?.schema)?.propertyNames;if(!i||i===!0||r.has(i))continue;let a=WA(t,i,new Set);a!==i&&r.set(i,a)}if(r.size)for(let n of e.seen.values())for(let o of[n.schema,n.def]){let i=o&&r.get(o.propertyNames);i&&(o.propertyNames=i)}}var y5=(e,t,r,n)=>{let o=r,i=e._zod.def;o.type="object";let a=i.keyType,s=Mr(a).patterns;if(i.mode==="loose"&&s&&s.size>0){let d=St(i.valueType,t,{...n,path:[...n.path,"patternProperties","*"]});o.patternProperties={};for(let u of s)bo(o.patternProperties,dq(u).source,d)}else{if(t.target==="draft-07"||t.target==="draft-2020-12"){o.propertyNames=St(i.keyType,t,{...n,path:[...n.path,"propertyNames"]});let d=ZA.get(t);d||(d=[],ZA.set(t,d),t.deferred.push(()=>oge(t))),d.push(e)}o.additionalProperties=St(i.valueType,t,{...n,path:[...n.path,"additionalProperties"]})}let l=a._zod.values,c=t.io==="input"&&$x(i.valueType)!==void 0;if(l&&!i.partial&&!c){let d=[...l].filter(u=>typeof u=="string"||typeof u=="number");d.length>0&&(o.required=d.map(String))}},_5=(e,t,r,n)=>{let o=e._zod.def,i=St(o.innerType,t,n),a=t.seen.get(e);t.target==="openapi-3.0"?(a.ref=o.innerType,r.nullable=!0):r.anyOf=[i,{type:"null"}]},I5=(e,t,r,n)=>{let o=e._zod.def;St(o.innerType,t,n);let i=t.seen.get(e);i.ref=o.innerType},w5=Symbol();function uq(e,t,r,n,o){let i=!1,a=JSON.stringify(e,(s,l)=>typeof l!="bigint"?l:(i=!0,null));return i?(Lr(t,r,n,o,"BigInt defaults cannot be represented in JSON Schema"),w5):JSON.parse(a)}var S5=(e,t,r,n)=>{let o=e._zod.def;St(o.innerType,t,n);let i=t.seen.get(e);i.ref=o.innerType;let a=uq(o.defaultValue,e,t,r,n);a!==w5&&(r.default=a)},k5=(e,t,r,n)=>{let o=e._zod.def;St(o.innerType,t,n);let i=t.seen.get(e);if(i.ref=o.innerType,t.io!=="input")return;let a=uq(o.defaultValue,e,t,r,n);a!==w5&&(r._prefault=a)},C5=(e,t,r,n)=>{let o=e._zod.def;St(o.innerType,t,n);let i=t.seen.get(e);i.ref=o.innerType;let a;try{a=o.catchValue(void 0)}catch{Lr(e,t,r,n,"Dynamic catch values are not supported in JSON Schema");return}r.default=a},P5=(e,t,r,n)=>{let o=e._zod.def,i=o.in._zod.traits.has("$ZodTransform"),a=t.io==="input"?i?o.out:o.in:o.out;St(a,t,n);let s=t.seen.get(e);s.ref=a},D5=(e,t,r,n)=>{let o=e._zod.def;St(o.innerType,t,n);let i=t.seen.get(e);i.ref=o.innerType,r.readOnly=!0},R5=(e,t,r,n)=>{let o=e._zod.def;St(o.innerType,t,n);let i=t.seen.get(e);i.ref=o.innerType},l1=(e,t,r,n)=>{let o=e._zod.def;St(o.innerType,t,n);let i=t.seen.get(e);i.ref=o.innerType},T5=(e,t,r,n)=>{let o=e._zod.innerType;St(o,t,n);let i=t.seen.get(e);i.ref=o},a1={string:GA,number:KA,boolean:qA,bigint:XA,symbol:QA,null:YA,undefined:JA,void:e5,never:t5,any:r5,unknown:o5,date:n5,enum:i5,literal:a5,nan:s5,template_literal:l5,file:c5,success:d5,custom:u5,function:f5,transform:m5,map:p5,set:h5,array:g5,object:v5,union:s1,intersection:x5,tuple:b5,record:y5,nullable:_5,nonoptional:I5,default:S5,prefault:k5,catch:C5,pipe:P5,readonly:D5,promise:R5,optional:l1,lazy:T5};function c1(e,t){if("_idmap"in e){let n=e,o=Mc({...t,processors:a1}),i={};for(let l of n._idmap.entries()){let[c,d]=l;St(d,o)}let a={},s={registry:n,uri:t?.uri,defs:i};o.external=s;for(let l of n._idmap.entries()){let[c,d]=l;Bc(o,d),bo(a,c,jc(o,d))}if(Object.keys(i).length>0){let l=o.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[l]:i}}return{schemas:a}}let r=Mc({...t,processors:a1});return St(e,r),Bc(r,e),jc(r,e)}var d1=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(t){this.ctx.counter=t}get seen(){return this.ctx.seen}constructor(t){let r=t?.target??"draft-2020-12";r==="draft-4"&&(r="draft-04"),r==="draft-7"&&(r="draft-07"),this.ctx=Mc({processors:a1,target:r,...t?.metadata&&{metadata:t.metadata},...t?.unrepresentable&&{unrepresentable:t.unrepresentable},...t?.override&&{override:t.override},...t?.io&&{io:t.io}})}process(t,r={path:[],schemaPath:[]}){return St(t,this.ctx,r)}emit(t,r){r&&(r.cycles&&(this.ctx.cycles=r.cycles),r.reused&&(this.ctx.reused=r.reused),r.external&&(this.ctx.external=r.external)),this.ctx.sharedDefsExtractedFor=void 0,this.ctx.sharedEmitDoneFor=void 0,Bc(this.ctx,t);let n=jc(this.ctx,t),{"~standard":o,...i}=n;return i}};var fq={};var eh={};ys(eh,{ZodAny:()=>Y5,ZodArray:()=>rO,ZodBase64:()=>R1,ZodBase64URL:()=>T1,ZodBigInt:()=>Yp,ZodBigIntFormat:()=>A1,ZodBoolean:()=>Qp,ZodCIDRv4:()=>P1,ZodCIDRv6:()=>D1,ZodCUID:()=>y1,ZodCUID2:()=>_1,ZodCatch:()=>wO,ZodCodec:()=>Ux,ZodCreditCard:()=>H5,ZodCustom:()=>Vx,ZodCustomStringFormat:()=>Vu,ZodDate:()=>Nx,ZodDefault:()=>vO,ZodDiscriminatedUnion:()=>nO,ZodE164:()=>E1,ZodEmail:()=>g1,ZodEmoji:()=>x1,ZodEnum:()=>Kp,ZodExactOptional:()=>F1,ZodFile:()=>mO,ZodFunction:()=>AO,ZodGUID:()=>v1,ZodIBAN:()=>W5,ZodIPv4:()=>k1,ZodIPv6:()=>C1,ZodISODate:()=>Vc,ZodISODateTime:()=>Uc,ZodISODuration:()=>Wc,ZodISOTime:()=>Hc,ZodInstanceOf:()=>NO,ZodIntersection:()=>iO,ZodJWT:()=>$1,ZodKSUID:()=>S1,ZodLazy:()=>TO,ZodLiteral:()=>fO,ZodMAC:()=>V5,ZodMap:()=>dO,ZodNaN:()=>kO,ZodNanoID:()=>b1,ZodNever:()=>eO,ZodNonOptional:()=>L1,ZodNull:()=>X5,ZodNullable:()=>gO,ZodNumber:()=>Xp,ZodNumberFormat:()=>Hu,ZodObject:()=>Lx,ZodOptional:()=>Bx,ZodPipe:()=>jx,ZodPrefault:()=>bO,ZodPreprocess:()=>CO,ZodPromise:()=>$O,ZodReadonly:()=>PO,ZodRecord:()=>Gp,ZodSet:()=>uO,ZodString:()=>qp,ZodStringFormat:()=>Dt,ZodSuccess:()=>IO,ZodSymbol:()=>K5,ZodTemplateLiteral:()=>RO,ZodTransform:()=>pO,ZodTuple:()=>sO,ZodType:()=>Ke,ZodULID:()=>I1,ZodURL:()=>zx,ZodUUID:()=>os,ZodUndefined:()=>q5,ZodUnion:()=>Mx,ZodUnknown:()=>J5,ZodVoid:()=>tO,ZodXID:()=>w1,ZodXor:()=>oO,_ZodString:()=>h1,_default:()=>xO,_function:()=>SX,any:()=>tX,array:()=>Fx,base64:()=>zq,base64url:()=>Nq,bigint:()=>Xq,boolean:()=>G5,catch:()=>SO,check:()=>kX,cidrv4:()=>Aq,cidrv6:()=>Oq,codec:()=>yX,creditCard:()=>Lq,cuid:()=>kq,cuid2:()=>Cq,currencyCode:()=>Hq,custom:()=>CX,date:()=>oX,describe:()=>PX,discriminatedUnion:()=>cX,e164:()=>Fq,email:()=>hq,emoji:()=>wq,enum:()=>z1,exactOptional:()=>hO,file:()=>gX,float32:()=>Zq,float64:()=>Gq,function:()=>SX,guid:()=>gq,hash:()=>Wq,hex:()=>Vq,hostname:()=>Uq,httpUrl:()=>Iq,iban:()=>Mq,instanceof:()=>RX,int:()=>m1,int32:()=>Kq,int64:()=>Qq,intersection:()=>aO,invertCodec:()=>_X,ipv4:()=>Tq,ipv6:()=>$q,json:()=>EX,jwt:()=>Bq,keyof:()=>nX,ksuid:()=>Rq,lazy:()=>EO,literal:()=>hX,looseObject:()=>sX,looseRecord:()=>uX,mac:()=>Eq,map:()=>fX,meta:()=>DX,nan:()=>bX,nanoid:()=>Sq,nativeEnum:()=>pX,never:()=>O1,nonoptional:()=>_O,null:()=>Q5,nullable:()=>Ox,nullish:()=>vX,number:()=>Z5,object:()=>iX,optional:()=>ju,partialRecord:()=>dX,pipe:()=>p1,prefault:()=>yO,preprocess:()=>$X,promise:()=>wX,readonly:()=>DO,record:()=>cO,refine:()=>OO,set:()=>mX,strictObject:()=>aX,string:()=>Ax,stringFormat:()=>jq,stringbool:()=>TX,success:()=>xX,superRefine:()=>zO,symbol:()=>Jq,templateLiteral:()=>IX,transform:()=>N1,tuple:()=>lO,uint32:()=>qq,uint64:()=>Yq,ulid:()=>Pq,undefined:()=>eX,union:()=>Jp,unknown:()=>Bu,url:()=>_q,uuid:()=>vq,uuidv4:()=>xq,uuidv6:()=>bq,uuidv7:()=>yq,void:()=>rX,xid:()=>Dq,xor:()=>lX});var u1={};ys(u1,{endsWith:()=>Np,gt:()=>ts,gte:()=>Xn,includes:()=>Op,length:()=>Lu,lowercase:()=>$p,lt:()=>es,lte:()=>qn,maxLength:()=>Fu,maxSize:()=>Lc,mime:()=>Lp,minLength:()=>il,minSize:()=>rs,multipleOf:()=>Fc,negative:()=>r1,nonnegative:()=>n1,nonpositive:()=>o1,normalize:()=>Mp,overwrite:()=>pa,positive:()=>t1,properties:()=>Fp,property:()=>i1,regex:()=>Ep,size:()=>Nu,slugify:()=>Vp,startsWith:()=>zp,toLowerCase:()=>jp,toUpperCase:()=>Up,trim:()=>Bp,uppercase:()=>Ap});var mq=new WeakSet([Object.prototype,Error.prototype]);function f1(e,t,r){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let n=r(this);return Object.defineProperty(this,t,{value:n,configurable:!0,writable:!0}),n},set(n){Object.defineProperty(this,t,{value:n,configurable:!0,writable:!0})}})}var pq=(e,t)=>{ox.init(e,t),e.name="ZodError";let r=Object.getPrototypeOf(e);mq.has(r)||(mq.add(r),f1(r,"format",n=>o=>ix(n,o)),f1(r,"flatten",n=>o=>nx(n,o)),f1(r,"addIssue",n=>o=>{n.issues.push(o),n.message=JSON.stringify(n.issues,vp,2)}),f1(r,"addIssues",n=>o=>{n.issues.push(...o),n.message=JSON.stringify(n.issues,vp,2)}),Object.defineProperty(r,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},ige=j("ZodError",pq),$n=j("ZodError",pq,void 0,{Parent:Error});var E5=_p($n),$5=wp($n),A5=Sp($n),O5=kp($n),z5=jw($n),N5=Uw($n),F5=Vw($n),L5=Hw($n),M5=Ww($n),B5=Zw($n),j5=Gw($n),U5=Kw($n);function sge(){eo.localeError||vr(CS())}function Uu(){eo.memoizer||vr({memoizer:wx()})}var Ke=j("ZodType",(e,t)=>(sge(),je.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(Y.mergeDefs(t,{checks:[...t.checks??[],...e.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return It(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(OO(e,t))},superRefine(e,t){return this.check(zO(e,t))},overwrite(e){return this.check(pa(e))},optional(){return ju(this)},exactOptional(){return hO(this)},nullable(){return Ox(this)},nullish(){return ju(Ox(this))},nonoptional(e){return _O(this,e)},array(){return Fx(this)},or(e){return Jp([this,e])},and(e){return aO(this,e)},transform(e){return p1(this,N1(e))},default(e){return xO(this,e)},prefault(e){return yO(this,e)},catch(e){return SO(this,e)},pipe(e){return p1(this,e)},readonly(){return DO(this)},describe(e){let t=this.clone();return yo.add(t,{description:e}),t},meta(...e){if(e.length===0)return yo.get(this);let t=this.clone();return yo.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return Y.hide(this,"~standard",{...iS(this),jsonSchema:{input:Hp(this,"input"),output:Hp(this,"output")}})},set"~standard"(e){Y.own(this,"~standard",e)},parse:function e(t,r){return E5(this,t,r,{callee:e})},parseAsync:async function e(t,r){return await $5(this,t,r,{callee:e})},safeParse(e,t){return A5(this,e,t)},async safeParseAsync(e,t){return O5(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){Y.own(this,"spa",e)},validate(e,t){return ax(this,e,t)},validateAsync(e,t){return sx(this,e,t)},encode:function e(t,r){return z5(this,t,r,{callee:e})},decode:function e(t,r){return N5(this,t,r,{callee:e})},encodeAsync:async function e(t,r){return await F5(this,t,r,{callee:e})},decodeAsync:async function e(t,r){return await L5(this,t,r,{callee:e})},safeEncode(e,t){return M5(this,e,t)},safeDecode(e,t){return B5(this,e,t)},async safeEncodeAsync(e,t){return j5(this,e,t)},async safeDecodeAsync(e,t){return U5(this,e,t)},toJSONSchema(e){return HA(this,{})(e)},get description(){return yo.get(this)?.description},get _def(){return this._zod.def}}),h1=j("_ZodString",(e,t)=>{Eu.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>GA(e,r,n,o)},Y.derived({format:e=>Mr(e).format??null,minLength:e=>Mr(e).minimum??null,maxLength:e=>Mr(e).maximum??null},{regex(...e){return this.check(Ep(...e))},includes(...e){return this.check(Op(...e))},startsWith(...e){return this.check(zp(...e))},endsWith(...e){return this.check(Np(...e))},min(...e){return this.check(il(...e))},max(...e){return this.check(Fu(...e))},length(...e){return this.check(Lu(...e))},nonempty(...e){return this.check(il(1,...e))},lowercase(e){return this.check($p(e))},uppercase(e){return this.check(Ap(e))},trim(){return this.check(Bp())},normalize(...e){return this.check(Mp(...e))},toLowerCase(){return this.check(jp())},toUpperCase(){return this.check(Up())},slugify(){return this.check(Vp())}})),qp=j("ZodString",(e,t)=>{Eu.init(e,t),h1.init(e,t)},{email(e){return this.check(OS(g1,e))},url(e){return this.check(Cx(zx,e))},jwt(e){return this.check(e1($1,e))},emoji(e){return this.check(BS(x1,e))},guid(e){return this.check(zS(v1,e))},uuid(e){return this.check(NS(os,e))},uuidv4(e){return this.check(FS(os,e))},uuidv6(e){return this.check(LS(os,e))},uuidv7(e){return this.check(MS(os,e))},nanoid(e){return this.check(jS(b1,e))},cuid(e){return this.check(US(y1,e))},cuid2(e){return this.check(VS(_1,e))},ulid(e){return this.check(HS(I1,e))},base64(e){return this.check(QS(R1,e))},base64url(e){return this.check(YS(T1,e))},xid(e){return this.check(WS(w1,e))},ksuid(e){return this.check(ZS(S1,e))},ipv4(e){return this.check(GS(k1,e))},ipv6(e){return this.check(KS(C1,e))},cidrv4(e){return this.check(qS(P1,e))},cidrv6(e){return this.check(XS(D1,e))},e164(e){return this.check(JS(E1,e))},datetime(e){return this.check(Px(Uc,e))},date(e){return this.check(Dx(Vc,e))},time(e){return this.check(Rx(Hc,e))},duration(e){return this.check(Tx(Wc,e))}});function Ax(e){return aA(qp,e)}var Dt=j("ZodStringFormat",(e,t)=>{wt.init(e,t),h1.init(e,t)}),Uc=j("ZodISODateTime",(e,t)=>{YE.init(e,t),Dt.init(e,t)}),Vc=j("ZodISODate",(e,t)=>{JE.init(e,t),Dt.init(e,t)}),Hc=j("ZodISOTime",(e,t)=>{e$.init(e,t),Dt.init(e,t)}),Wc=j("ZodISODuration",(e,t)=>{t$.init(e,t),Dt.init(e,t)}),g1=j("ZodEmail",(e,t)=>{jE.init(e,t),Dt.init(e,t)});function hq(e){return OS(g1,e)}var v1=j("ZodGUID",(e,t)=>{ME.init(e,t),Dt.init(e,t)});function gq(e){return zS(v1,e)}var os=j("ZodUUID",(e,t)=>{BE.init(e,t),Dt.init(e,t)});function vq(e){return NS(os,e)}function xq(e){return FS(os,e)}function bq(e){return LS(os,e)}function yq(e){return MS(os,e)}var zx=j("ZodURL",(e,t)=>{HE.init(e,t),Dt.init(e,t)});function _q(e){return Cx(zx,e)}function Iq(e){return Cx(zx,{protocol:lx,hostname:tE,...Y.normalizeParams(e)})}var x1=j("ZodEmoji",(e,t)=>{WE.init(e,t),Dt.init(e,t)});function wq(e){return BS(x1,e)}var b1=j("ZodNanoID",(e,t)=>{ZE.init(e,t),Dt.init(e,t)});function Sq(e){return jS(b1,e)}var y1=j("ZodCUID",(e,t)=>{GE.init(e,t),Dt.init(e,t)});function kq(e){return US(y1,e)}var _1=j("ZodCUID2",(e,t)=>{KE.init(e,t),Dt.init(e,t)});function Cq(e){return VS(_1,e)}var I1=j("ZodULID",(e,t)=>{qE.init(e,t),Dt.init(e,t)});function Pq(e){return HS(I1,e)}var w1=j("ZodXID",(e,t)=>{XE.init(e,t),Dt.init(e,t)});function Dq(e){return WS(w1,e)}var S1=j("ZodKSUID",(e,t)=>{QE.init(e,t),Dt.init(e,t)});function Rq(e){return ZS(S1,e)}var k1=j("ZodIPv4",(e,t)=>{r$.init(e,t),Dt.init(e,t)});function Tq(e){return GS(k1,e)}var V5=j("ZodMAC",(e,t)=>{n$.init(e,t),Dt.init(e,t)});function Eq(e){return lA(V5,e)}var C1=j("ZodIPv6",(e,t)=>{o$.init(e,t),Dt.init(e,t)});function $q(e){return KS(C1,e)}var P1=j("ZodCIDRv4",(e,t)=>{i$.init(e,t),Dt.init(e,t)});function Aq(e){return qS(P1,e)}var D1=j("ZodCIDRv6",(e,t)=>{a$.init(e,t),Dt.init(e,t)});function Oq(e){return XS(D1,e)}var R1=j("ZodBase64",(e,t)=>{s$.init(e,t),Dt.init(e,t)});function zq(e){return QS(R1,e)}var T1=j("ZodBase64URL",(e,t)=>{l$.init(e,t),Dt.init(e,t)});function Nq(e){return YS(T1,e)}var E1=j("ZodE164",(e,t)=>{c$.init(e,t),Dt.init(e,t)});function Fq(e){return JS(E1,e)}var H5=j("ZodCreditCard",(e,t)=>{d$.init(e,t),Dt.init(e,t)});function Lq(e){return cA(H5,e)}var W5=j("ZodIBAN",(e,t)=>{u$.init(e,t),Dt.init(e,t)});function Mq(e){return dA(W5,e)}var $1=j("ZodJWT",(e,t)=>{f$.init(e,t),Dt.init(e,t)});function Bq(e){return e1($1,e)}var Vu=j("ZodCustomStringFormat",(e,t)=>{m$.init(e,t),Dt.init(e,t)});function jq(e,t,r={}){return Mu(Vu,e,t,r)}function Uq(e){return Mu(Vu,"hostname",eE,e)}function Vq(e){return Mu(Vu,"hex",hE,e)}function Hq(e){return Mu(Vu,"currency_code",oE,e)}function Wq(e,t){let r=t?.enc??"hex",n=`${e}_${r}`,o=Ri[n];if(!o)throw new Error(`Unrecognized hash format: ${n}`);return Mu(Vu,n,o,t)}var Xp=j("ZodNumber",(e,t)=>{hS.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>KA(e,r,n,o),e.isFinite=!0},Y.derived({minValue:e=>{let{minimum:t,exclusiveMinimum:r}=Mr(e);return Math.max(t??Number.NEGATIVE_INFINITY,r??Number.NEGATIVE_INFINITY)},maxValue:e=>{let{maximum:t,exclusiveMaximum:r}=Mr(e);return Math.min(t??Number.POSITIVE_INFINITY,r??Number.POSITIVE_INFINITY)},isInt:e=>{let{isInt:t,multipleOf:r}=Mr(e);return!!t||!!r?.some(Number.isSafeInteger)},format:e=>Mr(e).format??null},{gt(e,t){return this.check(ts(e,t))},gte(e,t){return this.check(Xn(e,t))},min(e,t){return this.check(Xn(e,t))},lt(e,t){return this.check(es(e,t))},lte(e,t){return this.check(qn(e,t))},max(e,t){return this.check(qn(e,t))},int(e){return this.check(m1(e))},safe(e){return this.check(m1(e))},positive(e){return this.check(ts(0,e))},nonnegative(e){return this.check(Xn(0,e))},negative(e){return this.check(es(0,e))},nonpositive(e){return this.check(qn(0,e))},multipleOf(e,t){return this.check(Fc(e,t))},step(e,t){return this.check(Fc(e,t))},finite(){return this}}));function Z5(e){return fA(Xp,e)}var Hu=j("ZodNumberFormat",(e,t)=>{p$.init(e,t),Xp.init(e,t)});function m1(e){return pA(Hu,e)}function Zq(e){return hA(Hu,e)}function Gq(e){return gA(Hu,e)}function Kq(e){return vA(Hu,e)}function qq(e){return xA(Hu,e)}var Qp=j("ZodBoolean",(e,t)=>{vx.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>qA(e,r,n,o)});function G5(e){return bA(Qp,e)}var Yp=j("ZodBigInt",(e,t)=>{gS.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>XA(e,r,n,o)},Y.derived({minValue:e=>Mr(e).minimum??null,maxValue:e=>Mr(e).maximum??null,format:e=>Mr(e).format??null},{gte(e,t){return this.check(Xn(e,t))},min(e,t){return this.check(Xn(e,t))},gt(e,t){return this.check(ts(e,t))},lt(e,t){return this.check(es(e,t))},lte(e,t){return this.check(qn(e,t))},max(e,t){return this.check(qn(e,t))},positive(e){return this.check(ts(BigInt(0),e))},negative(e){return this.check(es(BigInt(0),e))},nonpositive(e){return this.check(qn(BigInt(0),e))},nonnegative(e){return this.check(Xn(BigInt(0),e))},multipleOf(e,t){return this.check(Fc(e,t))}}));function Xq(e){return _A(Yp,e)}var A1=j("ZodBigIntFormat",(e,t)=>{h$.init(e,t),Yp.init(e,t)});function Qq(e){return wA(A1,e)}function Yq(e){return SA(A1,e)}var K5=j("ZodSymbol",(e,t)=>{g$.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>QA(e,r,n,o)});function Jq(e){return kA(K5,e)}var q5=j("ZodUndefined",(e,t)=>{v$.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>JA(e,r,n,o)});function eX(e){return CA(q5,e)}var X5=j("ZodNull",(e,t)=>{x$.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>YA(e,r,n,o)});function Q5(e){return PA(X5,e)}var Y5=j("ZodAny",(e,t)=>{b$.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>r5(e,r,n,o)});function tX(){return DA(Y5)}var J5=j("ZodUnknown",(e,t)=>{y$.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>o5(e,r,n,o)});function Bu(){return RA(J5)}var eO=j("ZodNever",(e,t)=>{_$.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>t5(e,r,n,o)});function O1(e){return TA(eO,e)}var tO=j("ZodVoid",(e,t)=>{I$.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>e5(e,r,n,o)});function rX(e){return EA(tO,e)}var Nx=j("ZodDate",(e,t)=>{w$.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>n5(e,r,n,o),e.min=(r,n)=>e.check(Xn(r,n)),e.max=(r,n)=>e.check(qn(r,n))},Y.derived({minDate:e=>{let{minimum:t}=Mr(e);return t?new Date(t):null},maxDate:e=>{let{maximum:t}=Mr(e);return t?new Date(t):null}},{}));function oX(e){return $A(Nx,e)}var rO=j("ZodArray",(e,t)=>{Uu(),S$.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>g5(e,r,n,o),e.element=t.element},{min(e,t){return this.check(il(e,t))},nonempty(e){return this.check(il(1,e))},max(e,t){return this.check(Fu(e,t))},length(e,t){return this.check(Lu(e,t))},unwrap(){return this.element}});function Fx(e,t){return zA(rO,e,t)}function nX(e){let t=e._zod.def.shape;return z1(Object.keys(t))}var Lx=j("ZodObject",(e,t)=>{Uu(),k$.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>v5(e,r,n,o),Y.installLazyProp(e,"shape",r=>r._zod.def.shape,!1)},{keyof(){return z1(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(Y.mergeDefs(this._zod.def,{catchall:e}))},passthrough(){return this.clone(Y.mergeDefs(this._zod.def,{catchall:Bu()}))},loose(){return this.clone(Y.mergeDefs(this._zod.def,{catchall:Bu()}))},strict(){return this.clone(Y.mergeDefs(this._zod.def,{catchall:O1()}))},strip(){return this.clone(Y.mergeDefs(this._zod.def,{catchall:void 0}))},extend(e){return Y.extend(this,e)},safeExtend(e){return Y.safeExtend(this,e)},merge(e){return Y.merge(this,e)},pick(e){return Y.pick(this,e)},omit(e){return Y.omit(this,e)},partial(...e){return Y.partial(Bx,this,e[0])},exactPartial(...e){return Y.partial(F1,this,e[0],"exactPartial")},required(...e){return Y.required(L1,this,e[0])}});function iX(e,t){let r={type:"object",shape:e??{},...Y.normalizeParams(t)};return new Lx(r)}function aX(e,t){return new Lx({type:"object",shape:e,catchall:O1(),...Y.normalizeParams(t)})}function sX(e,t){return new Lx({type:"object",shape:e,catchall:Bu(),...Y.normalizeParams(t)})}var Mx=j("ZodUnion",(e,t)=>{xx.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>s1(e,r,n,o),e.options=t.options});function Jp(e,t){return new Mx({type:"union",options:e,...Y.normalizeParams(t)})}var oO=j("ZodXor",(e,t)=>{Mx.init(e,t),C$.init(e,t),e._zod.processJSONSchema=(r,n,o)=>s1(e,r,n,o),e.options=t.options});function lX(e,t){return new oO({type:"union",options:e,inclusive:!1,...Y.normalizeParams(t)})}var nO=j("ZodDiscriminatedUnion",(e,t)=>{Mx.init(e,t),D$.init(e,t)});function cX(e,t,r){return new nO({type:"union",options:t,discriminator:e,...Y.normalizeParams(r)})}var iO=j("ZodIntersection",(e,t)=>{R$.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>x5(e,r,n,o)});function aO(e,t){return new iO({type:"intersection",left:e,right:t})}var sO=j("ZodTuple",(e,t)=>{Uu(),vS.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>b5(e,r,n,o)},{rest(e){return this.clone({...this._zod.def,rest:e})},partial(){let e=this._zod.def;if(e.checks?.length)throw new Error(".partial() cannot be used on tuple schemas containing refinements");return this.clone({...e,items:e.items.map(t=>new Bx({type:"optional",innerType:t}))})}});function lO(e,t,r){let n=t instanceof je,o=n?r:t,i=n?t:null;return new sO({type:"tuple",items:e,rest:i,...Y.normalizeParams(o)})}var Gp=j("ZodRecord",(e,t)=>{Uu(),T$.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>y5(e,r,n,o),e.keyType=t.keyType,e.valueType=t.valueType});function cO(e,t,r){return!t||!t._zod?new Gp({type:"record",keyType:Ax(),valueType:e,...Y.normalizeParams(t)}):new Gp({type:"record",keyType:e,valueType:t,...Y.normalizeParams(r)})}function dX(e,t,r){return new Gp({type:"record",keyType:e,valueType:t,...Y.normalizeParams(r),partial:!0})}function uX(e,t,r){return new Gp({type:"record",keyType:e,valueType:t,mode:"loose",...Y.normalizeParams(r)})}var dO=j("ZodMap",(e,t)=>{Uu(),E$.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>p5(e,r,n,o),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...r)=>e.check(rs(...r)),e.nonempty=r=>e.check(rs(1,r)),e.max=(...r)=>e.check(Lc(...r)),e.size=(...r)=>e.check(Nu(...r))});function fX(e,t,r){return new dO({type:"map",keyType:e,valueType:t,...Y.normalizeParams(r)})}var uO=j("ZodSet",(e,t)=>{Uu(),$$.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>h5(e,r,n,o),e.min=(...r)=>e.check(rs(...r)),e.nonempty=r=>e.check(rs(1,r)),e.max=(...r)=>e.check(Lc(...r)),e.size=(...r)=>e.check(Nu(...r))});function mX(e,t){return new uO({type:"set",valueType:e,...Y.normalizeParams(t)})}var Kp=j("ZodEnum",(e,t)=>{A$.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(n,o,i)=>i5(e,n,o,i),e.enum=t.entries,e.options=[...e._zod.values];let r=new Set(Object.keys(t.entries));e.extract=(n,o)=>{let i={};for(let a of n)if(r.has(a))i[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new Kp({...t,checks:[],...Y.normalizeParams(o),entries:i})},e.exclude=(n,o)=>{let i={...t.entries};for(let a of n)if(r.has(a))delete i[a];else throw new Error(`Key ${a} not found in enum`);return new Kp({...t,checks:[],...Y.normalizeParams(o),entries:i})}});function z1(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new Kp({type:"enum",entries:r,...Y.normalizeParams(t)})}function pX(e,t){return new Kp({type:"enum",entries:e,...Y.normalizeParams(t)})}var fO=j("ZodLiteral",(e,t)=>{O$.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>a5(e,r,n,o),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function hX(e,t){return new fO({type:"literal",values:Array.isArray(e)?e:[e],...Y.normalizeParams(t)})}var mO=j("ZodFile",(e,t)=>{z$.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>c5(e,r,n,o),e.min=(r,n)=>e.check(rs(r,n)),e.max=(r,n)=>e.check(Lc(r,n)),e.mime=(r,n)=>e.check(Lp(Array.isArray(r)?r:[r],n))});function gX(e){return NA(mO,e)}var pO=j("ZodTransform",(e,t)=>{Uu(),N$.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>m5(e,r,n,o),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Nc(e.constructor.name);r.addIssue=i=>{if(typeof i=="string")r.issues.push(Y.issue(i,r.value,t));else{let a=i;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),"input"in a||(a.input=r.value),a.inst??(a.inst=e),r.issues.push(Y.issue(a))}};let o=t.transform(r.value,r);return o instanceof Promise?o.then(i=>(r.value=i,r)):(r.value=o,r)}});function N1(e){return new pO({type:"transform",transform:e})}var Bx=j("ZodOptional",(e,t)=>{xS.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>l1(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function ju(e){return new Bx({type:"optional",innerType:e})}var F1=j("ZodExactOptional",(e,t)=>{F$.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>l1(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function hO(e){return new F1({type:"optional",innerType:e})}var gO=j("ZodNullable",(e,t)=>{L$.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>_5(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function Ox(e){return new gO({type:"nullable",innerType:e})}function vX(e){return ju(Ox(e))}var vO=j("ZodDefault",(e,t)=>{M$.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>S5(e,r,n,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function xO(e,t){return new vO({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Y.shallowClone(t)}})}var bO=j("ZodPrefault",(e,t)=>{B$.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>k5(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function yO(e,t){return new bO({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Y.shallowClone(t)}})}var L1=j("ZodNonOptional",(e,t)=>{j$.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>I5(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function _O(e,t){return new L1({type:"nonoptional",innerType:e,...Y.normalizeParams(t)})}var IO=j("ZodSuccess",(e,t)=>{U$.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>d5(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function xX(e){return new IO({type:"success",innerType:e})}var wO=j("ZodCatch",(e,t)=>{V$.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>C5(e,r,n,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function SO(e,t){return new wO({type:"catch",innerType:e,catchValue:typeof t=="function"?t:Y.constantCatch(t)})}var kO=j("ZodNaN",(e,t)=>{H$.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>s5(e,r,n,o)});function bX(e){return OA(kO,e)}var jx=j("ZodPipe",(e,t)=>{bS.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>P5(e,r,n,o),e.in=t.in,e.out=t.out});function p1(e,t){return new jx({type:"pipe",in:e,out:t})}var Ux=j("ZodCodec",(e,t)=>{jx.init(e,t),bx.init(e,t)});function yX(e,t,r){return new Ux({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}function _X(e){let t=e._zod.def;return new Ux({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}var CO=j("ZodPreprocess",(e,t)=>{jx.init(e,t),W$.init(e,t)}),PO=j("ZodReadonly",(e,t)=>{Z$.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>D5(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function DO(e){return new PO({type:"readonly",innerType:e})}var RO=j("ZodTemplateLiteral",(e,t)=>{G$.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>l5(e,r,n,o)});function IX(e,t){return new RO({type:"template_literal",parts:e,...Y.normalizeParams(t)})}var TO=j("ZodLazy",(e,t)=>{yx.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>T5(e,r,n,o),e.unwrap=()=>e._zod.def.getter()});function EO(e){return new TO({type:"lazy",getter:e})}var $O=j("ZodPromise",(e,t)=>{q$.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>R5(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function wX(e){return new $O({type:"promise",innerType:e})}var AO=j("ZodFunction",(e,t)=>{K$.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>f5(e,r,n,o)});function SX(e){return new AO({type:"function",input:Array.isArray(e?.input)?lO(e?.input):e?.input??Fx(Bu()),output:e?.output??Bu()})}var Vx=j("ZodCustom",(e,t)=>{X$.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>u5(e,r,n,o)});function kX(e){let t=new Tt({check:"custom"});return t._zod.check=e,t}function CX(e,t){return FA(Vx,e??(()=>!0),t)}function OO(e,t={}){return LA(Vx,e,t)}function zO(e,t){return MA(e,t)}var PX=BA,DX=jA,NO=j("ZodInstanceOf",(e,t)=>{Vx.init(e,t)},{properties(e,t){return this.check(Fp(e,t))}});function RX(e,t={}){let r=new NO({type:"custom",check:"custom",fn:n=>n instanceof e,abort:!0,...Y.normalizeParams(t)});return r._zod.bag.Class=e,r._zod.check=n=>{n.value instanceof e||n.issues.push({code:"invalid_type",expected:e.name,input:n.value,inst:r,path:[...r._zod.def.path??[]]})},r}var TX=(...e)=>UA({Codec:Ux,Boolean:Qp,String:qp},...e);function EX(e){let t=EO(()=>Jp([Ax(e),Z5(),G5(),Q5(),Fx(t),cO(Ax(),t)]));return t}function $X(e,t){return new CO({type:"pipe",in:N1(e),out:t})}var lge={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function cge(e){vr({customError:e})}function dge(){return vr().customError}var FO;FO||(FO={});var Hx={};ys(Hx,{ZodISODate:()=>Vc,ZodISODateTime:()=>Uc,ZodISODuration:()=>Wc,ZodISOTime:()=>Hc,date:()=>fge,datetime:()=>uge,duration:()=>pge,time:()=>mge});function uge(e){return Px(Uc,e)}function fge(e){return Dx(Vc,e)}function mge(e){return Rx(Hc,e)}function pge(e){return Tx(Wc,e)}var be={...eh,...u1,iso:Hx},hge=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function gge(e,t){let r=e.$schema;return r==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":r==="http://json-schema.org/draft-07/schema#"?"draft-7":r==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}function AX(e,t){return e.map((r,n)=>n<t?r:r.optional())}function vge(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function xge(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let r=e.slice(1).split("/").filter(Boolean);if(r.length===0)return t.rootSchema;let n=t.version==="draft-2020-12"?"$defs":"definitions";if(r[0]===n){let o=r[1]===void 0?void 0:vge(r[1]);if(!o||!t.defs[o])throw new Error(`Reference not found: ${e}`);return t.defs[o]}throw new Error(`Reference not found: ${e}`)}function bge(e,t){return be.transform(n=>n).check(n=>{let o=n.value;if(typeof o!="object"||o===null||Array.isArray(o))return;let i=Object.getOwnPropertyNames(o);if(t.minProperties!==void 0&&i.length<t.minProperties&&n.issues.push({origin:"object",code:"too_small",minimum:t.minProperties,inclusive:!0,message:`Too small: expected object to have >=${t.minProperties} properties`,input:o,inst:e,continue:!0}),t.maxProperties!==void 0&&i.length>t.maxProperties&&n.issues.push({origin:"object",code:"too_big",maximum:t.maxProperties,inclusive:!0,message:`Too big: expected object to have <=${t.maxProperties} properties`,input:o,inst:e,continue:!0}),t.keySchema)for(let a of i){let s=t.keySchema.safeParse(a);s.success||n.issues.push({code:"invalid_key",origin:"record",issues:s.error.issues,input:a,path:[a],continue:!0})}}).pipe(e)}function LO(e,t){if(e===null)return"z";let r=typeof e;if(r!=="object"){if(r==="number"&&Number.isNaN(e))return null;let n=String(e);return`${r[0]}${n.length}:${n}`}if(t.has(e))return null;t.add(e);try{if(Array.isArray(e)){let i=[];for(let a of e){let s=LO(a,t);if(s===null)return null;i.push(s)}return`a${i.length}:[${i.join(",")}]`}let n=Object.keys(e).sort(),o=[];for(let i of n){let a=LO(e[i],t);if(a===null)return null;o.push(`${i.length}:${i}=${a}`)}return`o${o.length}:{${o.join(",")}}`}finally{t.delete(e)}}var yge=new Set(["items","prefixItems","additionalItems","additionalProperties","contains","propertyNames","not","if","then","else","allOf","anyOf","oneOf","unevaluatedItems","unevaluatedProperties","contentSchema"]),_ge=new Set(["properties","patternProperties","dependentSchemas","dependencies","$defs","definitions"]);function Wx(e){return typeof e!="object"||e===null?!1:Array.isArray(e)?e.some(Wx):typeof e.$ref=="string"?!0:Object.entries(e).some(([t,r])=>yge.has(t)?Wx(r):!_ge.has(t)||typeof r!="object"||r===null?!1:Object.values(r).some(Wx))}function OX(e){return e===1?"element":"elements"}function Ige(e,t){return be.transform(n=>n).check(n=>{let o=n.value;if(Array.isArray(o)){if(t.uniqueItems===!0){let i=new Map;for(let a=0;a<o.length;a++){let s=LO(o[a],new Set);if(s===null)continue;let l=i.get(s);if(l===void 0){i.set(s,a);continue}n.issues.push({code:"custom",message:`Array items must be unique: element at index ${a} duplicates the one at index ${l}`,input:o,path:[a],continue:!0})}}if(t.containsSchema){let i=t.minContains??1,a=t.maxContains!==void 0?t.maxContains+1:Number.POSITIVE_INFINITY,s=0;for(let l of o)if(t.containsSchema.safeParse(l).success&&++s>=a)break;s<i&&n.issues.push({code:"custom",message:`Array must contain at least ${i} matching ${OX(i)}; found ${s}`,input:o,continue:!0}),t.maxContains!==void 0&&s>t.maxContains&&n.issues.push({code:"custom",message:`Array must contain at most ${t.maxContains} matching ${OX(t.maxContains)}`,input:o,continue:!0})}}}).pipe(e)}function zX(e,t){if(e!==!1)return e===void 0||e===!0?be.any():ln(e,t)}var wge=/^(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$/;function NX(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return be.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let o=e.$ref;if(t.refs.has(o))return t.refs.get(o);if(t.processing.has(o))return be.lazy(()=>{if(!t.refs.has(o))throw new Error(`Circular reference not resolved: ${o}`);return t.refs.get(o)});t.processing.add(o);let i=xge(o,t),a=ln(i,t);return t.refs.set(o,a),t.processing.delete(o),a}if(e.enum!==void 0){let o=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&o.length===1&&o[0]===null)return be.null();if(o.length===0)return be.never();if(o.length===1)return be.literal(o[0]);if(o.every(a=>typeof a=="string"))return be.enum(o);let i=o.map(a=>be.literal(a));return i.length<2?i[0]:be.union([i[0],i[1],...i.slice(2)])}if(e.const!==void 0)return be.literal(e.const);let r=e.type;if(Array.isArray(r)){let o=r.map(i=>{let a={...e,type:i};return NX(a,t)});return o.length===0?be.never():o.length===1?o[0]:be.union(o)}if(!r)return be.any();let n;switch(r){case"string":{let o=be.string();if(e.format){let i=e.format;i==="email"?o=o.check(be.email()):i==="uri"||i==="uri-reference"?o=o.check(be.url()):i==="uuid"||i==="guid"?o=o.check(be.uuid()):i==="date-time"?o=o.check(be.iso.datetime({offset:!0})):i==="date"?o=o.check(be.iso.date()):i==="time"?o=o.check(be.regex(wge)):i==="duration"?o=o.check(be.iso.duration()):i==="hostname"?o=o.check(be.hostname()):i==="ipv4"?o=o.check(be.ipv4()):i==="ipv6"?o=o.check(be.ipv6()):i==="mac"?o=o.check(be.mac()):i==="cidr"?o=o.check(be.cidrv4()):i==="cidr-v6"?o=o.check(be.cidrv6()):i==="base64"?o=o.check(be.base64()):i==="base64url"?o=o.check(be.base64url()):i==="e164"?o=o.check(be.e164()):i==="credit_card"?o=o.check(be.creditCard()):i==="iban"?o=o.check(be.iban()):i==="jwt"?o=o.check(be.jwt()):i==="emoji"?o=o.check(be.emoji()):i==="nanoid"?o=o.check(be.nanoid()):i==="cuid"?o=o.check(be.cuid()):i==="cuid2"?o=o.check(be.cuid2()):i==="ulid"?o=o.check(be.ulid()):i==="xid"?o=o.check(be.xid()):i==="ksuid"&&(o=o.check(be.ksuid()))}typeof e.minLength=="number"&&(o=o.min(e.minLength)),typeof e.maxLength=="number"&&(o=o.max(e.maxLength)),e.pattern&&(o=o.regex(new RegExp(e.pattern))),n=o;break}case"number":case"integer":{let o=r==="integer"?be.number().int():be.number();typeof e.minimum=="number"&&e.exclusiveMinimum!==!0&&(o=o.min(e.minimum)),typeof e.maximum=="number"&&e.exclusiveMaximum!==!0&&(o=o.max(e.maximum)),typeof e.exclusiveMinimum=="number"?o=o.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(o=o.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?o=o.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(o=o.lt(e.maximum)),typeof e.multipleOf=="number"&&(o=o.multipleOf(e.multipleOf)),n=o;break}case"boolean":{n=be.boolean();break}case"null":{n=be.null();break}case"object":{let o={},i=e.properties||{},a=new Set(e.required||[]),s=typeof e.additionalProperties=="object"?ln(e.additionalProperties,t):void 0;for(let[u,f]of Object.entries(i)){let m=ln(f,t);bo(o,u,a.has(u)?m:m.optional())}if(e.patternProperties){let u=e.patternProperties,f=Object.keys(u),m=[];for(let g of f){let b=ln(u[g],t),v=be.string().regex(new RegExp(g));m.push(be.looseRecord(v,b))}let p=[];if(Object.keys(o).length>0&&p.push(be.object(o).passthrough()),p.push(...m),p.length===0)n=be.object({}).passthrough();else if(p.length===1)n=p[0];else{let g=be.intersection(p[0],p[1]);for(let b=2;b<p.length;b++)g=be.intersection(g,p[b]);n=g}if(e.additionalProperties===!1){let g=Object.keys(o),b=f.map(x=>new RegExp(x)),v=n;n=n.check(x=>{if(!Pi(x.value))return;let _=[];for(let I of Object.keys(x.value))g.includes(I)||b.some(S=>S.test(I))||_.push(I);_.length&&x.issues.push({code:"unrecognized_keys",keys:_,input:x.value,inst:v})})}}else{let u=be.object(o);e.additionalProperties===!1?n=u.strict():s?n=u.catchall(s):n=u.passthrough()}let l=e.propertyNames!==void 0&&e.propertyNames!==!0,c=typeof e.minProperties=="number"?e.minProperties:void 0,d=typeof e.maxProperties=="number"?e.maxProperties:void 0;if(l||c!==void 0||d!==void 0){let u;if(l){let f=typeof e.propertyNames=="object"&&e.propertyNames.type===void 0?{type:"string",...e.propertyNames}:e.propertyNames;u=ln(f,t)}n=bge(n,{keySchema:u,minProperties:c,maxProperties:d})}break}case"array":{let o=e.prefixItems,i=e.items;if(o&&Array.isArray(o)){let a=typeof e.minItems=="number"?e.minItems:0,s=o.map(u=>ln(u,t)),l=AX(s,a),c=Array.isArray(i)?void 0:zX(i,t),d=be.tuple(l);n=c?d.rest(c):d,typeof e.minItems=="number"&&(n=n.check(be.minLength(e.minItems))),typeof e.maxItems=="number"&&(n=n.check(be.maxLength(e.maxItems)))}else if(Array.isArray(i)){let a=typeof e.minItems=="number"?e.minItems:0,s=i.map(u=>ln(u,t)),l=AX(s,a),c=zX(e.additionalItems,t),d=be.tuple(l);n=c?d.rest(c):d,typeof e.minItems=="number"&&(n=n.check(be.minLength(e.minItems))),typeof e.maxItems=="number"&&(n=n.check(be.maxLength(e.maxItems)))}else if(i!==void 0){let a=ln(i,t),s=be.array(a);typeof e.minItems=="number"&&(s=s.min(e.minItems)),typeof e.maxItems=="number"&&(s=s.max(e.maxItems)),n=s}else n=be.array(be.any());(e.uniqueItems===!0||e.contains!==void 0)&&(n=Ige(n,{uniqueItems:e.uniqueItems===!0,containsSchema:e.contains!==void 0?ln(e.contains,t):void 0,minContains:typeof e.minContains=="number"?e.minContains:void 0,maxContains:typeof e.maxContains=="number"?e.maxContains:void 0}));break}default:throw new Error(`Unsupported type: ${r}`)}return n}function ln(e,t){if(typeof e=="boolean")return e?be.any():be.never();let r=NX(e,t),n=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let s=e.anyOf.map(c=>ln(c,t)),l=be.union(s);r=n?be.intersection(r,l):l}if(e.oneOf&&Array.isArray(e.oneOf)){let s=e.oneOf.map(c=>ln(c,t)),l=be.xor(s);r=n?be.intersection(r,l):l}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)r=n?r:be.any();else{let s=n?r:ln(e.allOf[0],t),l=n?0:1;for(let c=l;c<e.allOf.length;c++)s=be.intersection(s,ln(e.allOf[c],t));r=s}e.nullable===!0&&t.version==="openapi-3.0"&&(r=be.nullable(r)),e.readOnly===!0&&(r=be.readonly(r)),e.default!==void 0&&(r=r.default(e.default));let o={},i=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let s of i)s in e&&(o[s]=e[s]);let a=["contentEncoding","contentMediaType","contentSchema"];for(let s of a)s in e&&(o[s]=e[s]);if(e.type==="object"&&e.$ref===void 0){e.propertyNames!==void 0&&!Wx(e.propertyNames)&&(o.propertyNames=e.propertyNames);for(let s of["minProperties","maxProperties"])e[s]!==void 0&&(o[s]=e[s])}if(e.type==="array"&&e.$ref===void 0){e.contains!==void 0&&!Wx(e.contains)&&(o.contains=e.contains);for(let s of["uniqueItems","minContains","maxContains"])e[s]!==void 0&&(o[s]=e[s])}for(let s of Object.keys(e))hge.has(s)||bo(o,s,e[s]);return Object.keys(o).length>0&&t.registry.add(r,o),e.description&&(r=r.describe(e.description)),r}function FX(e,t){if(typeof e=="boolean")return e?be.any():be.never();let r;try{r=JSON.parse(JSON.stringify(e))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let n=gge(r,t?.defaultTarget),o=r.$defs||r.definitions||{},i={version:n,defs:o,refs:new Map,processing:new Set,rootSchema:r,registry:t?.registry??yo};return ln(r,i)}var LX=Symbol("z.visit/resolving");function Zx(e,t){let r=typeof t=="function"?t:(a,s)=>{let l=t[a._zod.def.type];return l?l(a,s):a},n=new Map;function o(a){let s=n.get(a);if(s===LX)return new yx({type:"lazy",getter:()=>n.get(a)});if(s!==void 0)return s;n.set(a,LX);let l=i(a),c=r(l,l!==a);return n.set(a,c),c}function i(a){let s=a._zod.def,l=s.type;switch(l){case"object":{let c=s.shape,d=Object.keys(c),u=!1,f={};for(let p of d){let g=o(c[p]);g!==c[p]&&(u=!0),f[p]=g}let m=s.catchall;return s.catchall&&(m=o(s.catchall),m!==s.catchall&&(u=!0)),u?It(a,{...s,shape:f,catchall:m}):a}case"array":{let c=o(s.element);return c===s.element?a:It(a,{...s,element:c})}case"tuple":{let c=s.items,d=!1,u=[];for(let m of c){let p=o(m);p!==m&&(d=!0),u.push(p)}let f=s.rest;return s.rest&&(f=o(s.rest),f!==s.rest&&(d=!0)),d?It(a,{...s,items:u,rest:f}):a}case"record":case"map":{let c=o(s.keyType),d=o(s.valueType);return c===s.keyType&&d===s.valueType?a:It(a,{...s,keyType:c,valueType:d})}case"set":{let c=o(s.valueType);return c===s.valueType?a:It(a,{...s,valueType:c})}case"union":{let c=s.options,d=!1,u=[];for(let f of c){let m=o(f);m!==f&&(d=!0),u.push(m)}return d?It(a,{...s,options:u}):a}case"intersection":{let c=o(s.left),d=o(s.right);return c===s.left&&d===s.right?a:It(a,{...s,left:c,right:d})}case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":{let c=o(s.innerType);return c===s.innerType?a:It(a,{...s,innerType:c})}case"pipe":{let c=o(s.in),d=o(s.out);return c===s.in&&d===s.out?a:It(a,{...s,in:c,out:d})}case"function":{let c=o(s.input),d=o(s.output);return c===s.input&&d===s.output?a:It(a,{...s,input:c,output:d})}case"lazy":{let c=s.getter,{_cachedInner:d,...u}=s;return It(a,{...u,getter:()=>o(c())})}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":return a;default:return a}}return o(e)}function MX(e){return Zx(e,{object:t=>t.partial(),union:t=>{let r=t._zod.def;return r.discriminator===void 0?t:Jp(r.options)}})}function Sge(e,t){if(!t?.length)return e;let r=e._zod.def;return It(e,fa(r,{checks:[...r.checks??[],...t]}),{parent:!0})}function BX(e){return Sge(e.out,e.checks)}function kge(e){return e.in._zod.traits.has("$ZodTransform")?BX(e):e.in}function jX(e){return Zx(e,{pipe:t=>kge(t._zod.def),default:(t,r)=>r?ju(t._zod.def.innerType):t,catch:(t,r)=>r?t._zod.def.innerType:t})}function UX(e){return Zx(e,{pipe:t=>BX(t._zod.def),prefault:(t,r)=>r?t._zod.def.innerType:t})}var MO={};ys(MO,{bigint:()=>Rge,boolean:()=>Dge,date:()=>Tge,number:()=>Pge,string:()=>Cge});function Cge(e){return sA(qp,e)}function Pge(e){return mA(Xp,e)}function Dge(e){return yA(Qp,e)}function Rge(e){return IA(Yp,e)}function Tge(e){return AA(Nx,e)}var VX={view:0,control:1,owner:2};function Ege(e){return e.kind==="owner"?"owner":e.role}function BO(e,t){return VX[Ege(e)]>=VX[t]}function HX(e,t){let r=e.access;if(r===void 0)return e.kind==="query"?"view":"owner";if(typeof r=="string")return r;try{return r(t)}catch{return"owner"}}var Gx=class extends Error{constructor(r,n){super(r);$t(this,"fix",n);this.name="UserError"}},WX=(e,t)=>{throw new Gx(e,t)};var $ge=h.enum(["user","cancelled","invalid","bug"]),ZX=h.strictObject({kind:$ge,message:h.string().max(2e3),fix:h.string().max(2e3).optional()}),Kx=class extends Error{constructor(t="Nothing changed."){super(t),this.name="Cancelled"}};function jO(e){return e.kind==="cancelled"?new Kx(e.message):new Gx(e.message,e.fix)}function GX(e){return e.issues.map(t=>(t.path.length?t.path.join(".")+": ":"")+t.message).join("; ")}function _e(e){return{...e,cli:e.cli,kind:"operation"}}function Ge(e){return{...e,cli:e.cli,kind:"query"}}function lt(e){return{...e,kind:"view"}}function Age(e,t){let r=e.input.safeParse(t??{});return r.success||WX("That does not work for "+e.title.toLowerCase()+": "+GX(r.error)),r.data}function KX(e,t){let r=e.inputs?.(t)??{};return Object.fromEntries(Object.entries(e.queries).map(([n,o])=>[n,Age(o,r[n])]))}var Oge=new Set(["$schema"]),ha=class e{constructor(t){$t(this,"schema");this.schema=t}get inner(){let t=this.schema;for(;;){let r=t._zod.def;if(["optional","default","nullable","prefault","readonly"].includes(r.type)&&r.innerType)t=r.innerType;else if(r.type==="pipe"&&r.in)t=r.in;else return t}}get type(){return this.inner._zod.def.type}get isSection(){return this.type==="object"&&!!this.inner.shape}get description(){return this.schema.description??this.inner.description}get min(){return this.inner.minValue??void 0}get max(){return this.inner.maxValue??void 0}get integer(){return!!this.inner.isInt}get secret(){let t=r=>r.meta?.();return t(this.schema)?.secret===!0||t(this.inner)?.secret===!0}get optional(){return["optional","default"].includes(this.schema._zod.def.type)}rangeText(){let t=(this.inner._zod.def.checks??[]).map(l=>l._zod.def),r=t.find(l=>l.check==="greater_than"),n=t.find(l=>l.check==="less_than"),o=r?.value,i=n?.value;if(o!==void 0&&i!==void 0&&r?.inclusive!==!1&&n?.inclusive!==!1)return o+" to "+i;let a=o===void 0?"":(r?.inclusive===!1?"more than ":"at least ")+o,s=i===void 0?"":(n?.inclusive===!1?"less than ":"at most ")+i;return[a,s].filter(Boolean).join(" and ")}children(){return Object.entries(this.inner.shape??{}).filter(([t])=>!Oge.has(t)).map(([t,r])=>[t,new e(r)])}child(t){let r=this.inner.shape?.[t];return r?new e(r):void 0}leaves(t=[]){return this.children().flatMap(([r,n])=>n.isSection?n.leaves([...t,r]):[{key:[...t,r],node:n}])}get element(){let t=this.inner._zod.def;return t.type==="array"&&t.element?new e(t.element):t.type==="record"&&t.valueType?new e(t.valueType):void 0}get options(){return(this.inner._zod.def.options??[]).map(t=>new e(t))}get choices(){let t=this.inner._zod.def;return t.type==="enum"?Object.values(t.entries??{}):t.type==="literal"?t.values??[]:[]}get editor(){let t=this.type;if(t==="boolean")return"boolean";if(t==="enum"||t==="literal")return"choice";if(t==="union")return this.options.every(n=>["literal","enum","boolean"].includes(n.type))?"choice":"union";if(t==="number"||t==="string")return t;let r=this.element;return t==="array"&&r?r.type==="string"?"string-list":r.type==="enum"?"choice-list":r.type==="object"?"object-list":"json":t==="record"&&r?["string","number","boolean"].includes(r.type)?"string-map":r.type==="object"?"object-map":"json":t==="object"?"object":"json"}get choiceValues(){return this.type!=="union"?this.choices:this.options.flatMap(t=>t.type==="boolean"?[!0,!1]:t.choices)}get openOption(){return this.options.find(t=>!["literal","enum","boolean"].includes(t.type))}initial(){let t=this.schema._zod.def;if(t.type==="default")return structuredClone(t.defaultValue);switch(this.type){case"boolean":return!1;case"number":return this.min??0;case"string":return"";case"enum":case"literal":return this.choices[0];case"union":return this.options[0]?.initial();case"array":return[];case"record":return{};case"object":return Object.fromEntries(this.children().filter(([,r])=>!["optional","default"].includes(r.schema._zod.def.type)).map(([r,n])=>[r,n.initial()]));default:return null}}check(t){let r=this.schema.safeParse(t);return r.success?!0:r.error.issues.map(n=>(n.path.length?n.path.join(".")+": ":"")+n.message).join("; ")}};function _o(e,t=Date.now()){let r=Math.max(0,Math.round((t-new Date(e).getTime())/1e3));return Number.isNaN(r)?"":r<45?"just now":r<3600?Math.round(r/60)+" min ago":r<86400?Math.round(r/3600)+" h ago":Math.round(r/86400)+" d ago"}function Br(e,t,r=t+"s"){return e+" "+(e===1?t:r)}var zge=new Set(["mb","gb","cpu","gpu","jdk","sdk","id","url","ui","npm","msvc","uv","api","ssh","vm","io"]),Nge={harness:"agent",harnesses:"agents"};function Wu(e){let t=["B","KB","MB","GB","TB"],r=e<=0?0:Math.min(t.length-1,Math.floor(Math.log(e)/Math.log(1024))),n=e/1024**r;return(r===0?String(e):n.toFixed(n<10?1:0))+" "+t[r]}function qX(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/[_-]+/g," ").split(" ").filter(Boolean).map(r=>Nge[r.toLowerCase()]??r).map((r,n)=>{let o=r.toLowerCase();return zge.has(o)?r.toUpperCase():n===0?r[0].toUpperCase()+r.slice(1):o}).join(" ")}var Fge=["boolean","enum","number","text","secret","path","list","map","object","json"],Lge=h.union([h.string(),h.number(),h.boolean()]),Zc=h.lazy(()=>h.strictObject({name:h.string(),key:h.array(h.string()),kind:h.enum(Fge),label:h.string(),help:h.string().optional(),optional:h.boolean(),default:h.unknown().optional(),choices:h.array(h.strictObject({value:Lge,label:h.string()})).optional(),open:Zc.optional(),min:h.number().optional(),max:h.number().optional(),integer:h.boolean().optional(),range:h.string().optional(),pathKind:h.enum(["dir","file"]).optional(),literals:h.array(h.string()).optional(),element:Zc.optional(),fields:h.array(Zc).optional()})),XX={"storage.root":"dir","projects.roots":"dir","projects.exclude":"dir","projects.declinedRoots":"dir","claudeProfile.hostDir":"dir","claudeProfile.globalStateFile":"file",scripts:"file"};function Mge(e){let t=e.join("."),r=e[e.length-1]??"";if(XX[t])return XX[t];if(e[0]==="mappings"&&r==="host"||r==="hostDir"||/(Dir|Folder)$/.test(r))return"dir";if(/File$/.test(r))return"file"}function Bge(e){return/"auto"/.test(e.description??"")?["auto"]:[]}function jge(e){return e===!0?"On":e===!1?"Off":String(e)}function QX(e){return e!==void 0&&Number.isFinite(e)&&Math.abs(e)<Number.MAX_SAFE_INTEGER}function Uge(e){let t=e.schema._zod.def;return t.type==="default"?t.defaultValue:void 0}function ns(e,t=[],r){let n=e instanceof ha?e:new ha(e),o=t[t.length-1]??"",i={name:o,key:[...t],label:r??(o?qX(o):""),...n.description?{help:n.description}:{},optional:n.optional},a=Uge(n),s=l=>a===void 0?{}:{default:l?a===""?"":"***":a};switch(n.editor){case"boolean":return{...i,kind:"boolean",...s(!1)};case"choice":case"union":{let l=n.openOption;return{...i,kind:"enum",...s(!1),choices:n.choiceValues.filter(c=>["string","number","boolean"].includes(typeof c)).map(c=>({value:c,label:jge(c)})),...l?{open:ns(l,t,i.label)}:{}}}case"number":{let l=n.rangeText();return{...i,kind:"number",...s(!1),...QX(n.min)?{min:n.min}:{},...QX(n.max)?{max:n.max}:{},...n.integer?{integer:!0}:{},...l?{range:l}:{}}}case"string":{if(n.secret)return{...i,kind:"secret",...s(!0)};let l=Mge(t);return l?{...i,kind:"path",...s(!1),pathKind:l,literals:Bge(n)}:{...i,kind:"text",...s(!1)}}case"string-list":case"choice-list":case"object-list":return{...i,kind:"list",...s(!1),element:ns(n.element,t,"Entry")};case"string-map":case"object-map":return{...i,kind:"map",...s(n.element?.secret??!1),element:Vge(n,t)};case"object":return{...i,kind:"object",...s(!1),fields:M1(n,t)};default:return{...i,kind:"json",...s(!1)}}}function Vge(e,t){return ns(e.element,[...t,"*"],"Value")}function M1(e,t=[]){return(e instanceof ha?e:new ha(e)).children().map(([n,o])=>ns(o,[...t,n]))}function Hge(e){if(typeof e!="object"||e===null||Array.isArray(e))return String(e);let t=e;return typeof t.host=="string"&&typeof t.guest=="string"?t.host+" \u2192 "+t.guest+(t.readOnly?" (read-only)":""):Object.values(t).filter(n=>typeof n=="string"&&n!=="").slice(0,2).join(" \xB7 ")||"{ "+Object.keys(t).join(", ")+" }"}function UO(e,t){return e.length>t?e.slice(0,Math.max(0,t-1))+"\u2026":e}function B1(e,t,r=60){if(e===void 0)return{text:"not set",tone:"muted"};if(t?.kind==="secret")return e===""?{text:"(empty)",tone:"muted"}:{text:"***"};if(e===!0)return{text:"On",tone:"ok"};if(e===!1)return{text:"Off",tone:"muted"};if(e===null)return{text:"none",tone:"muted"};if(typeof e=="string")return e===""?{text:"(empty)",tone:"muted"}:{text:UO(e,r)};if(typeof e=="number")return{text:String(e)};if(Array.isArray(e))return e.length===0?{text:"none",tone:"muted"}:{text:UO(e.length+" \xB7 "+e.map(o=>typeof o=="object"?Hge(o):String(o)).join(", "),r)};let n=Object.keys(e);return n.length?{text:UO(n.length+" \xB7 "+n.join(", "),r)}:{text:"none",tone:"muted"}}function j1(e,t){if(t===void 0||t==="")return e.optional||e.kind==="text"?void 0:"Required.";if(e.kind==="number"){let r=typeof t=="number"?t:Number(t);if(!Number.isFinite(r))return"Enter a number.";if(e.integer&&!Number.isInteger(r))return"Enter a whole number.";if(e.min!==void 0&&r<e.min||e.max!==void 0&&r>e.max)return e.range?"Use "+e.range+".":"Out of range."}if(e.kind==="enum"&&!e.open&&!e.choices?.some(r=>r.value===t))return"Choose one."}var th=h.array(h.string()).optional(),YX=h.strictObject({value:h.string(),label:h.string(),description:h.string().optional()}),U1=h.strictObject({message:h.string(),fix:h.string()}),Wge=h.strictObject({kind:h.literal("confirm"),title:h.string(),lines:th,yes:h.string().optional(),danger:h.boolean().optional(),typed:h.string().optional(),implied:h.boolean().optional(),skipWithYes:h.boolean().optional(),noTerminal:h.strictObject({message:h.string(),fix:h.string()}).optional()}),Zge=h.strictObject({kind:h.literal("choose"),title:h.string(),lines:th,choices:h.array(YX).min(1),initial:h.string().optional(),noTerminal:U1.optional()}),Gge=h.strictObject({kind:h.literal("text"),title:h.string(),lines:th,initial:h.string().optional(),allowEmpty:h.boolean().optional(),problem:h.string().optional(),noTerminal:U1.optional()}),Kge=h.strictObject({kind:h.literal("secret"),title:h.string(),lines:th,problem:h.string().optional()}),qge=h.strictObject({kind:h.literal("path"),title:h.string(),lines:th,pathKind:h.enum(["dir","file"]),initial:h.string().optional(),literals:h.array(h.string()).optional(),problem:h.string().optional(),noTerminal:U1.optional()}),Xge=h.strictObject({kind:h.literal("checklist"),title:h.string(),lines:th,choices:h.array(YX),checked:h.array(h.string()).optional(),noTerminal:U1.optional()}),JX=h.discriminatedUnion("kind",[Wge,Zge,Gge,Kge,qge,Xge]),ipt={confirm:h.boolean(),choose:h.string().max(1e3).optional(),text:h.string().max(1e4).optional(),secret:h.string().max(1e4).optional(),path:h.string().max(2e3).optional(),checklist:h.array(h.string().max(1e3)).max(1e3).optional()};async function VO(e,t,r){for(let n=t;;){let o=await e(n);if(o===void 0||!r)return o;let i=r(o);if(i===!0)return o;n={...n,problem:i}}}function Qge(e,t){return{progress:r=>t.progress(r),log:(r,n)=>t.log(r,n),confirm:r=>e({...r,kind:"confirm"}),choose:r=>e({...r,kind:"choose"}),text:({validate:r,...n})=>VO(e,{...n,kind:"text"},r),secret:({validate:r,...n})=>VO(e,{...n,kind:"secret"},r),path:({validate:r,...n})=>VO(e,{...n,kind:"path"},r),checklist:r=>e({...r,kind:"checklist"})}}var apt=Qge(e=>Promise.reject(new Error("A query asked a question: "+e.title)),{progress:()=>{},log:()=>{}});var is=h.string().regex(/^[A-Za-z0-9_-]{1,64}$/),eQ=h.string().regex(/^[a-z][A-Za-z0-9]*(\.[a-z][A-Za-z0-9]*)+$/).max(80),Yge=h.enum(["ok","warn","danger","muted","accent"]),Jge=h.strictObject({t:h.literal("call"),id:is,op:eQ,input:h.unknown()}),eve=h.strictObject({t:h.literal("answer"),id:is,value:h.unknown()}),tve=h.strictObject({t:h.literal("subscribe"),id:is,query:eQ,input:h.unknown()}),rve=h.strictObject({t:h.literal("unsubscribe"),id:is}),upt=h.discriminatedUnion("t",[Jge,eve,tve,rve]),tQ=h.discriminatedUnion("t",[h.strictObject({t:h.literal("progress"),id:is,text:h.string()}),h.strictObject({t:h.literal("log"),id:is,text:h.string(),tone:Yge.optional()}),h.strictObject({t:h.literal("ask"),id:is,question:JX}),h.strictObject({t:h.literal("result"),id:is,output:h.unknown()}),h.strictObject({t:h.literal("error"),id:is,error:ZX}),h.strictObject({t:h.literal("data"),id:is,output:h.unknown()})]);function le(e,t,r={}){return{kind:"operation",op:e.id,input:t,label:e.title,...e.danger?{danger:!0}:{},...r}}function An(e,t,r={}){return{kind:"link",target:e,label:t,...r}}function rQ(e){return e.sections.some(t=>(t.facts?.length??0)>0||(t.items?.length??0)>0||(t.text?.length??0)>0)}var oQ=h.string().regex(/^[A-Za-z0-9_.-]{1,64}$/),ove=h.object({name:h.string().describe("The agent"),ready:h.boolean().describe("Installed in the sandbox already (starts without an install)"),isDefault:h.boolean().describe("The agent that starts by default"),removable:h.boolean().describe("You added it (built-in agents cannot be removed)")}),nve=h.object({folder:h.string().describe("The folder a start works on (the current folder)"),defaultAgent:h.string().describe("The default agent"),agents:h.array(ove).describe("Every agent in your settings, built in or added")}),HO=Ge({id:"agents.list",title:"Agents",summary:"the agents you can start, and which one is the default",input:h.object({}),output:nve,surfaces:{except:{cli:"sandbox config list shows the agents (harnesses) and the default (defaultHarness)"}}}),WO=_e({id:"agents.start",access:"control",title:"Start an agent",summary:"start an agent in a project of the running sandbox",input:h.object({agent:oQ.describe("The agent to start"),project:oQ.optional().describe("The project of the running sandbox (asked when there are several)")}),output:h.object({session:h.string().describe("The new session"),message:h.string().describe("What happened")}),text:e=>e.message,surfaces:{except:{cli:"sandbox <agent> and sandbox launch start agents on the command line (they boot the sandbox and can attach the terminal)",menu:"the menu starts agents with launch, which can boot the sandbox and attach this terminal"}}}),V1=_e({id:"agents.add",title:"Add an agent\u2026",summary:"add an agent by its npm or Python package, or a program on this PC",input:h.object({}),output:h.object({name:h.string().describe("The new agent"),message:h.string().describe("What happened")}),text:e=>e.message,surfaces:{except:{cli:"sandbox config set harnesses adds agents on the command line"}}}),H1=_e({id:"agents.makeDefault",title:"Make default",summary:"make an agent the one that starts by default",input:h.object({name:h.string().describe("The agent")}),output:h.object({message:h.string().describe("What happened")}),text:e=>e.message,surfaces:{except:{cli:"sandbox config set defaultHarness <name> does this on the command line"}}}),W1=_e({id:"agents.remove",title:"Remove",summary:"take an agent you added out of your settings",input:h.object({name:h.string().describe("The agent")}),output:h.object({message:h.string().describe("What happened")}),danger:!0,text:e=>e.message,surfaces:{except:{cli:"sandbox config set harnesses removes agents on the command line"}}});function ive(e){return e.split(/[\\/]/).pop()??e}function ave(e,t){let r=e.removable?e.isDefault?" You added it. Make another agent the default to remove it.":" You added it.":"";return"Starts "+e.name+" in "+t+"."+(e.isDefault?" It is the default agent.":"")+r}function sve(e){return e.removable&&!e.isDefault?"x removes it.":void 0}function lve(e,t){return{id:"agent:"+e.name,label:e.name,hint:e.ready?"ready":"installs on first start",tone:e.ready?"ok":"muted",icon:e.name,badges:e.isDefault?[{text:"default",tone:"accent"}]:[],description:ave(e,t),keys:sve(e),primary:An({kind:"start-agent",agent:e.name},"Start "+e.name,{verb:"start"}),actions:[...e.isDefault?[]:[le(H1,{name:e.name},{key:"d",verb:"make default",importance:1})],...e.removable&&!e.isDefault?[le(W1,{name:e.name},{key:"x",verb:"remove",importance:1})]:[]]}}function cve(e){let t=ive(e.folder),r=[...e.agents].sort((n,o)=>Number(o.isDefault)-Number(n.isDefault));return{title:"Agents",sections:[{id:"start",title:"Start in "+t,cards:!0,items:[...r.map(n=>lve(n,t)),{id:"add",label:"Add an agent\u2026",description:"Add another agent by its npm or Python package, or a program on this PC. It is saved in your settings and appears in this list.",primary:le(V1,{},{verb:"add"})}]}]}}var nQ=lt({id:"agents",title:"Agents",summary:"The agents you can start: start one, add one, choose the default.",queries:{agents:HO},operations:[WO,V1,H1,W1],build:({agents:e})=>cve(e)});var rh=h.string().default("claude").describe("whose login: an agent that keeps one (default: claude)"),Xx=h.string().optional().describe("account name"),dve=h.object({name:h.string().describe("The saved login"),email:h.string().nullable().describe("Its email, when the agent says"),isDefault:h.boolean().describe("New launches start with it"),isActive:h.boolean().describe("The sandbox uses it now"),savedAt:h.string().describe("When it was saved (ISO time)")}),uve=h.object({name:h.string().describe("The agent"),kept:h.boolean().describe("Its login can be saved and switched"),canSavePc:h.boolean().describe("This PC's login can be saved"),accounts:h.array(dve).describe("Its saved logins (empty when not kept)")}),fve=h.object({agent:h.string().describe("The agent asked for (the command line table shows only it)"),agents:h.array(uve).describe("Every agent, Claude first")}),ZO=h.object({message:h.string().describe("What happened")});function mve(e){let t=e.agents.find(i=>i.name===e.agent)?.accounts??[];if(!t.length)return e.agent==="claude"?"No saved accounts. Sign in inside the sandbox, then: sandbox account save <name> (or --from-host to save this PC's login)":"No saved "+e.agent+" accounts. Sign in inside the sandbox, then: sandbox account save <name> --agent "+e.agent;let r=[["","NAME","EMAIL","SAVED"],...t.map(i=>[(i.isActive?"*":" ")+(i.isDefault?"D":" "),i.name,i.email??"-",i.savedAt.slice(0,16).replace("T"," ")])],n=r[0].map((i,a)=>Math.max(...r.map(s=>s[a].length)));return[...r.map(i=>i.map((a,s)=>s===i.length-1?a:a.padEnd(n[s]+2)).join("")),"","* = active in the sandbox D = default for new launches"].join(`
|
|
121
|
+
`)}var GO=Ge({id:"accounts.list",title:"Accounts",summary:"Claude logins: list, save, use, set the default, remove",input:h.object({agent:rh}),output:fve,text:mve,cli:{name:"account",action:"list",json:!0,flags:{agent:{flag:"--agent",value:"name",choices:"harnesses",label:"Agent"}},shapeJson:e=>e.agents.find(t=>t.name===e.agent)?.accounts??[]}}),qx=_e({id:"accounts.save",title:"Save the sandbox's login",summary:"save the sandbox's (or this PC's) login under a name",input:h.object({agent:rh,name:Xx,fromHost:h.boolean().default(!1).describe("(save) save this PC's login instead of the sandbox's")}),output:h.object({name:h.string().describe("The saved login"),message:h.string().describe("What happened")}),text:e=>e.message,cli:{name:"account",action:"save",positional:["name"],flags:{agent:{flag:"--agent"},fromHost:{flag:"--from-host"}}}}),Z1=_e({id:"accounts.use",title:"Use this login",summary:"make the sandbox use a saved login (running sessions restart)",input:h.object({agent:rh,name:Xx,noRestart:h.boolean().default(!1).describe("(use) do not restart running sessions")}),output:h.object({lines:h.array(h.string()).describe("What happened, line by line")}),text:e=>e.lines.join(`
|
|
122
|
+
`),cli:{name:"account",action:"use",positional:["name"],flags:{agent:{flag:"--agent"},noRestart:{flag:"--no-restart"}}}}),G1=_e({id:"accounts.default",title:"Make default",summary:"the login new launches start with",input:h.object({agent:rh,name:Xx}),output:ZO,text:e=>e.message,cli:{name:"account",action:"default",positional:["name"],flags:{agent:{flag:"--agent"}}}}),K1=_e({id:"accounts.rename",title:"Rename\u2026",summary:"give a saved login another name (it keeps working)",input:h.object({agent:rh,name:Xx,to:h.string().optional().describe("(rename) the new name")}),output:ZO,text:e=>e.message,cli:{name:"account",action:"rename",positional:["name"],flags:{agent:{flag:"--agent"},to:{flag:"--to"}}}}),q1=_e({id:"accounts.remove",title:"Remove\u2026",summary:"delete a saved login (you would sign in again)",danger:!0,input:h.object({agent:rh,name:Xx}),output:ZO,text:e=>e.message,cli:{name:"account",action:"remove",positional:["name"],flags:{agent:{flag:"--agent"}},yes:"(remove) do not ask first"}});function pve(e){return[{id:"@save-sandbox",label:"+ Save the sandbox's login\u2026",group:"Save a login",description:"Saves the "+e.name+" login you signed in with inside the sandbox, under a name you choose.",primary:le(qx,{agent:e.name,fromHost:!1},{verb:"save",label:"Save the sandbox's login"})},...e.canSavePc?[{id:"@save-pc",label:"+ Save this PC's login\u2026",group:"Save a login",description:"Saves the "+e.name+" login of this PC, under a name you choose.",primary:le(qx,{agent:e.name,fromHost:!0},{verb:"save",label:"Save this PC's login"})}]:[]]}function hve(e,t){let r=[t.isActive?"in the sandbox":"",t.isDefault?"default":""].filter(Boolean).join(" \xB7 ");return{id:e.name+":"+t.name,label:t.name,group:"Saved logins",icon:e.name,hint:r,badges:[...t.isActive?[{text:"in the sandbox",tone:"ok"}]:[],...t.isDefault?[{text:"default",tone:"accent"}]:[]],description:"Choose it to make the sandbox use this login.",details:["Agent "+e.name,"Email "+(t.email??"-"),"Saved "+t.savedAt.slice(0,16).replace("T"," ")],primary:le(Z1,{agent:e.name,name:t.name},{verb:"use"}),actions:[le(G1,{agent:e.name,name:t.name},{key:"d",verb:"make default",importance:1}),le(K1,{agent:e.name,name:t.name},{key:"r",verb:"rename",importance:2}),le(q1,{agent:e.name,name:t.name},{key:"x",verb:"remove",importance:1})]}}function gve(e){return e.kept?{id:e.name,title:e.name,summary:e.accounts.length?Br(e.accounts.length,"saved login"):"no saved login yet",cards:!0,items:[...pve(e),...e.accounts.map(t=>hve(e,t))]}:{id:e.name,title:e.name,summary:"not kept between sandboxes",items:[{id:"info:"+e.name,label:"This agent's login is not kept between sandboxes",tone:"muted",description:"Sign in again in each new sandbox, or use an API key in the agent\u2019s environment."}]}}function vve(e){return{title:"Accounts",sections:e.agents.map(gve)}}var iQ=lt({id:"accounts",title:"Accounts",summary:"Logins saved on this PC, per agent. Use puts one into the sandbox; new launches start with the default.",queries:{accounts:GO},operations:[qx,Z1,G1,K1,q1],build:({accounts:e})=>vve(e)});var xve=h.object({name:h.string(),path:h.string(),kind:h.enum(["dir","file"])}),bve=h.object({path:h.string(),parent:h.string().nullable(),entries:h.array(xve),truncated:h.boolean(),places:h.array(h.object({label:h.string(),path:h.string()}))}),oh=Ge({id:"files.browse",access:"owner",title:"Browse folders",summary:"list what is in a folder of this PC, to pick a folder or a file",input:h.object({path:h.string().max(1024).optional().describe("The folder (none: only the places to start from)"),files:h.boolean().default(!1).describe("List files too, not only folders")}),output:bve,surfaces:{except:{cli:"a path is typed on the command line",menu:"the menu asks for a path as text and checks it"}}});var yve=h.object({bytes:h.number().describe("Bytes counted"),files:h.number().describe("Files counted"),partial:h.boolean().describe("The count stopped at its limit: there is at least this much")}),_ve=h.object({root:h.string().describe("The folder your saved data is in"),exists:h.boolean().describe("It exists"),holdsData:h.boolean().describe("Something is in it"),measured:yve.nullable().describe("Its size; null when not measured"),size:h.string().describe('Its size in words; "nothing in it yet" when empty; "not measured yet" when not counted'),defaultRoot:h.string().describe("The default folder"),defaultInUse:h.boolean().describe("The default folder is the one in use"),otherFoldersWithData:h.array(h.string()).describe("Other folders that hold data")}),KO=Ge({id:"storage.show",title:"Data folder",summary:"where your saved data lives",input:h.object({measure:h.boolean().default(!0).describe("add up its size (big folders take a moment)")}),output:_ve,text:e=>["Your saved data is in: "+e.root," "+e.size,"The default folder is: "+e.defaultRoot+(e.defaultInUse?" (in use)":""),...e.otherFoldersWithData.map(t=>"Another folder with data: "+t),"","Move it with: sandbox storage move <folder> (or switch without moving: sandbox storage use <folder>)","What takes the space: sandbox data"].join(`
|
|
123
|
+
`),cli:{name:"storage",action:"show",json:!0,shapeJson:e=>({root:e.root,exists:e.exists,...e.measured??{bytes:0,files:0,partial:!1},defaultRoot:e.defaultRoot,otherFoldersWithData:e.otherFoldersWithData})}}),Ive=h.object({from:h.string().describe("The old folder"),to:h.string().describe("The new folder"),copied:h.boolean().describe("It was copied (another drive)"),files:h.number().describe("Files moved"),bytes:h.number().describe("Bytes moved"),pinned:h.string().describe("What storage.root now says"),removedOld:h.boolean().describe("The old folder is gone"),notes:h.array(h.string()).describe("Extra notes"),message:h.string().describe("What happened")}),X1=_e({id:"storage.move",title:"Move the data\u2026",summary:"move your saved data to another folder",input:h.object({folder:h.string().optional().describe("the folder to move to"),keepOld:h.boolean().default(!1).describe("copy instead of moving: the old folder stays (needs room for both)")}),output:Ive,text:e=>e.message,cli:{name:"storage",action:"move",positional:["folder"],flags:{keepOld:{flag:"--keep-old"}},json:!0,shapeJson:({message:e,...t})=>t}}),Q1=_e({id:"storage.use",title:"Use another folder\u2026",summary:"use another folder for your saved data, without moving it",input:h.object({folder:h.string().optional().describe("the folder to use")}),output:h.object({message:h.string().describe("What happened")}),text:e=>e.message,cli:{name:"storage",action:"use",positional:["folder"]}}),nh=_e({id:"storage.change",title:"Data folder",summary:"pick another folder for your saved data, then move it there or switch to it",input:h.object({}),output:h.object({message:h.string().describe("What happened")}),text:e=>e.message,surfaces:{except:{cli:"the command line has storage move <folder> and storage use <folder>"}}}),wve=h.object({setting:h.enum(["off","vhdx"]).describe("storage.contained"),maxGb:h.number().describe("storage.containedMaxGb"),available:h.boolean().describe("This PC can use it"),reasons:h.array(h.string()).describe("Why not"),fixes:h.array(h.string()).describe("What would fix it"),image:h.string().describe("The disk image file"),imageExists:h.boolean().describe("It exists"),imageBytes:h.number().nullable().describe("Its size on disk"),mountFolder:h.string().describe("Where it is mounted"),recordedMounted:h.boolean().describe("The record says it is mounted"),holders:h.number().describe("Sandboxes using it"),mountedNow:h.boolean().nullable().describe("It is mounted now (null: not checked)")}),qO=Ge({id:"storage.containedStatus",title:"Contained storage (beta)",summary:"(beta) the disk image for tools, state and logs",input:h.object({}),output:wve,text:e=>["Contained storage (beta, untested on a real PC)"," setting: storage.contained = "+e.setting+" (limit "+e.maxGb+" GB)"," this PC: "+(e.available?"can use it":"cannot use it: "+e.reasons.join(" ")+" "+e.fixes.join(" "))," image: "+e.image+(e.imageExists?" ("+Wu(e.imageBytes??0)+" on disk)":" (not made yet)")," mount folder: "+e.mountFolder,...e.mountedNow===null?[]:[" mounted now: "+(e.mountedNow?"yes":"no")+(e.recordedMounted!==e.mountedNow?" (the record says "+(e.recordedMounted?"yes":"no")+"; sandbox doctor looks into it)":"")],"","Turn it on with: sandbox storage contained on Turn it off with: sandbox storage contained off"].join(`
|
|
124
|
+
`),cli:{name:"storage",action:"contained status",json:!0,shapeJson:({fixes:e,...t})=>t}}),Y1=_e({id:"storage.containedOn",title:"Turn contained storage on\u2026",summary:"(beta) keep tools, state and logs in a disk image",input:h.object({}),output:h.object({message:h.string().describe("What happened")}),text:e=>e.message,cli:{name:"storage",action:"contained on"}}),J1=_e({id:"storage.containedOff",title:"Turn contained storage off\u2026",summary:"(beta) move tools, state and logs back into plain folders",danger:!0,input:h.object({}),output:h.object({message:h.string().describe("What happened")}),text:e=>e.message,cli:{name:"storage",action:"contained off"}});function Sve(e,t){let r={id:"folder",title:"Data folder",description:"Where your tools, logins, history and logs are kept between sandboxes.",facts:[{id:"folder",label:"Folder",value:e.root},{id:"size",label:"Size",value:e.size},{id:"default",label:"Default folder",value:e.defaultRoot+(e.defaultInUse?" (in use)":"")},...e.otherFoldersWithData.map((o,i)=>({id:"other:"+i,label:"Other folder with data",value:o}))],actions:[le(X1,{}),le(Q1,{})]},n={id:"contained",title:"Contained storage (beta)",description:"Beta, and not yet tested on a real PC: keeps the sandbox tools, state and logs in one disk image file.",facts:[{id:"setting",label:"Turned on",value:t.setting==="vhdx"?"yes":"no",tone:t.setting==="vhdx"?"ok":"muted"},{id:"pc",label:"This PC",value:t.available?"can use it":"cannot use it",tone:t.available?"ok":"warn",...t.available?{}:{description:[...t.reasons,...t.fixes].join(" ")}},{id:"image",label:"Image",value:t.imageExists?Wu(t.imageBytes??0)+" on disk":"not made yet",description:t.image},{id:"mount",label:"Mount folder",value:t.mountFolder},{id:"mounted",label:"Mounted now",value:t.mountedNow===null?"not checked":t.mountedNow?"yes":"no"}],actions:t.setting==="off"?[le(Y1,{})]:[le(J1,{})]};return{title:"Storage",sections:[r,n]}}var aQ=lt({id:"storage",title:"Storage",summary:"Where your saved data lives: move it, switch folders, (beta) a disk image.",queries:{storage:KO,contained:qO},operations:[nh,X1,Q1,Y1,J1],pickers:[oh],inputs:()=>({storage:{measure:!0}}),build:({storage:e,contained:t})=>Sve(e,t)});var ek=h.enum(["user","project"]).describe("Your own settings (all projects) or this folder's .sandbox-config.json (this project)"),XO=h.string().regex(/^[A-Za-z0-9_$-]+(\.[A-Za-z0-9_$-]+)*$/).max(200).describe("The setting, e.g. sandbox.memoryMb"),kve=h.object({id:h.string().describe("The setting, e.g. sandbox.memoryMb"),key:h.array(h.string()),label:h.string(),category:h.string(),section:h.string().optional(),field:Zc,value:h.unknown(),set:h.boolean(),yours:h.unknown(),yoursSet:h.boolean(),inProject:h.unknown().optional(),default:h.unknown().optional(),locked:h.boolean()}),Cve=h.object({scope:ek,file:h.string().describe("The file this scope edits"),exists:h.boolean(),dataFolder:h.string().optional(),exportFile:h.string().optional().describe("Where an export goes by default (full path; your own settings only)"),categories:h.array(h.object({id:h.string(),label:h.string(),description:h.string()})),rows:h.array(kve)}),QO=Ge({id:"settings.list",title:"Settings",summary:"every setting with its value, by category",input:h.object({scope:ek.default("user")}),output:Cve,cli:{name:"config",action:"list",json:!0}}),lQ=Ge({id:"settings.get",title:"Get a setting",summary:"show one setting (secrets as ***)",input:h.object({key:XO}),output:h.object({key:h.string(),value:h.unknown()}),text:e=>typeof e.value=="string"?e.value:JSON.stringify(e.value,null,2),surfaces:{except:{menu:"Settings shows every value",web:"the Settings page shows every value"}},cli:{name:"config",action:"get",positional:["key"]}}),Pve=["attach.","resume."];function cQ(e){let t=e??{},r=typeof t.key=="string"?t.key:"";return(t.scope===void 0||t.scope==="user")&&Pve.some(o=>r.startsWith(o)&&r.length>o.length)?"control":"owner"}var Qn=_e({id:"settings.set",access:cQ,title:"Change a setting",summary:"change one setting (text is read like the command line: true/on, numbers, JSON)",input:h.object({scope:ek.default("user"),key:XO,value:h.unknown().describe("The new value")}),output:h.object({key:h.string(),changed:h.boolean(),message:h.string()}),text:e=>e.message,cli:{name:"config",action:"set",positional:["key","value"]}}),tk=_e({id:"settings.reset",access:cQ,title:"Reset a setting",summary:"put one setting back to its default (in a project file: remove it)",input:h.object({scope:ek.default("user"),key:XO}),output:h.object({key:h.string(),changed:h.boolean(),message:h.string()}),text:e=>e.message,cli:{name:"config",action:"reset",positional:["key"]}}),dQ=h.string().max(2e3).regex(/\.json$/i,"The file name should end in .json."),Qx=_e({id:"settings.export",title:"Export settings\u2026",summary:"write the settings you changed to a .json file to share (no secrets, no data folder, no paths of this PC)",input:h.object({settingsFile:dQ.optional().describe("(export, import) the .json file; default sandbox-settings.json in the current folder"),withPaths:h.boolean().default(!1).describe("(export) keep folders and files of this PC in the file")}),output:h.object({file:h.string().describe("The file written (full path)"),leftOut:h.array(h.string()).describe('What was left out, one "<key> (<why>)" each'),pathsLeftOut:h.boolean().describe("A folder or file of this PC was left out (and --with-paths was not given)")}),text:e=>["Wrote "+e.file+" (only what differs from the defaults).",...e.leftOut.length?["Left out:",...e.leftOut.map(t=>" "+t)]:[],...e.pathsLeftOut?["Keep this PC's folders and files in the file with --with-paths."]:[]].join(`
|
|
125
|
+
`),cli:{name:"config",action:"export",positional:["settingsFile"],flags:{withPaths:{flag:"--with-paths"}}}}),Yx=_e({id:"settings.import",title:"Import settings\u2026",summary:"read a shared settings file, show what it would change, and apply it after one yes",input:h.object({settingsFile:dQ.optional().describe("(export, import) the .json file")}),output:h.object({changed:h.number().describe("How many settings changed"),message:h.string().describe("What happened")}),text:e=>e.message,cli:{name:"config",action:"import",positional:["settingsFile"]}});function sQ(e,t){return{...ns(new ha(e.input).child("settingsFile"),["settingsFile"]),label:t,optional:!1}}function Dve(e,t){let r=n=>B1(n,e.field,40).text;return["Setting "+e.id,"All projects "+r(e.yours)+(e.yoursSet?" (your file)":" (built-in default)"),"This project "+(e.inProject===void 0?"not set":r(e.inProject)),...t==="user"?["Default "+r(e.default)]:[],...t==="project"&&e.locked?["A project can only make this stricter than your own setting."]:[]]}function Rve(e,t){let r=t==="project"&&!e.set?"all projects: "+B1(e.yours,e.field,40).text:B1(e.value,e.field).text,n=e.field.kind==="secret"?"":e.value;return{id:e.id,label:e.label,hint:r,...e.set?{tone:t==="project"?"accent":"ok",badges:[{text:"changed",tone:"accent"}]}:{},description:e.field.help,group:e.section,details:Dve(e,t),keywords:e.id,code:e.id,cells:{setting:e.id,value:r},primary:le(Qn,{scope:t,key:e.id},{label:"Change",verb:"edit",inline:!0,fields:[{...e.field,name:"value",label:e.label}],initial:{value:n}}),actions:e.set?[le(tk,{scope:t,key:e.id},{label:t==="project"?"Remove":"Reset to default",verb:"reset",key:"r"})]:[]}}function Tve(e){return{id:"@data-folder",label:"Data folder",hint:e,cells:{setting:"storage.root",value:e},description:"Where your tools, logins, history and logs are kept between sandboxes. Move it with sandbox storage move <folder>.",primary:le(nh,{},{label:"Data folder",verb:"change"})}}function Eve(e){let t=e.categories.map(r=>({id:r.id,title:r.label,description:r.description,columns:[{key:"setting",label:"SETTING"},{key:"value",label:"VALUE"}],columnsOn:"cli",items:[...e.rows.filter(n=>n.category===r.id).map(n=>Rve(n,e.scope)),...r.id==="general"&&e.dataFolder?[Tve(e.dataFolder)]:[]]}));return{title:"Settings",categories:!0,notice:{text:"Editing "+e.file+(e.exists?"":" (created when you save)")+(e.scope==="project"?": only what a project may set; needs your approval at the next launch":""),tone:e.scope==="project"?"accent":"muted"},sections:t,actions:e.scope==="user"?[le(Qx,{},{verb:"export",fields:[sQ(Qx,"Where to write the settings file")],initial:{settingsFile:e.exportFile},description:"Write the settings you changed to a .json file you can share with a team. Secrets, the data folder and folders or files of this PC are left out."}),le(Yx,{},{verb:"import",fields:[sQ(Yx,"Which settings file")],description:"Read a settings file someone shared, see what it would change, and apply it once you say yes. Secrets, the data folder and paths in it are never taken."})]:[]}}var uQ=lt({id:"settings",title:"Settings",summary:"Every setting, for all projects or just this project, with its value, default and description.",queries:{settings:QO},operations:[Qn,tk,Qx,Yx,nh],pickers:[oh],tabs:{param:"scope",choices:[{value:"user",label:"All projects"},{value:"project",label:"This project"}]},inputs:e=>({settings:{scope:e.scope}}),build:({settings:e})=>Eve(e)});var rk=h.enum(["user","project"]).describe("Your own settings (all projects) or this folder's .sandbox-config.json (this project)"),$ve=[{id:"agents",label:"Agent add-ons",description:"Plug-ins for the agents: rtk and Headroom save tokens, claude-mem gives Claude a memory, ccusage reports token use, Playwright, Context7 and REA add MCP servers. Only your own settings turn them on (except REA).",members:["agents"]},{id:"editors",label:"Editors & docs",description:"Code and text editors (VS Code is on by default), plus diagrams and document conversion.",members:["editors","diagrams"]},{id:"clients",label:"DB & API clients",description:"GUIs for the sandbox databases, tools to send HTTP, REST and GraphQL requests, and to inspect traffic.",members:["databases","api","network"]},{id:"tools",label:"Git & utilities",description:"Git GUIs and terminal UIs, archives, file search and comparing, process tools, and decompilers.",members:["git","utilities","reversing"]},{id:"cli",label:"Command-line & cloud",description:"Small developer tools (JSON, search, builds, media ...) and tools for clouds and Kubernetes.",members:["cli","cloud"]},{id:"play",label:"Browsers & games",description:"Browsers for testing web apps, and game engines and editors (they draw with OpenGL on the CPU).",members:["browsers","gamedev"]}];var Ave=h.object({id:h.string().describe("The app"),name:h.string().describe("Its name"),about:h.string().describe("What it is for"),group:h.string().describe("The group it is listed under (APP_GROUPS id)"),size:h.string().describe("Its download size"),cli:h.boolean().describe("A command-line tool (on PATH), not a desktop app"),mesa:h.boolean().describe("Needs OpenGL on the CPU (Mesa)"),fullGitOnly:h.boolean().describe("Only with full git access"),plugsInto:h.string().optional().describe("Which agents an add-on plugs into, and how"),service:h.boolean().optional().describe("Started by the sandbox or the agent (a proxy, an MCP server)"),setting:h.string().optional().describe("The setting it stands for (VS Code, Windows Terminal)"),settingField:Zc.optional(),settingValue:h.unknown().optional(),installed:h.boolean().describe("Downloaded already into the data folder"),on:h.boolean().describe("Installed in every sandbox of this scope")}),Ove=h.object({id:h.string().describe("Its key in apps.custom"),name:h.string().describe("Its name"),from:h.string().describe('"From the latest <repo> release." or "From <url>"'),cli:h.boolean().describe("A command-line tool")}),zve=h.object({scope:rk,file:h.string().describe("The file this scope edits"),exists:h.boolean().describe("The file exists already"),apps:h.array(Ave).describe("The catalogue entries this scope can change"),custom:h.array(Ove).describe("Your own programs (your own scope only)"),customValue:h.unknown().optional().describe("apps.custom as saved, to edit (your own scope only)"),customField:Zc.optional().describe("The Field of apps.custom (your own scope only)")}),YO=Ge({id:"apps.list",title:"Apps",summary:"the apps catalogue: what every sandbox installs",input:h.object({scope:rk.default("user")}),output:zve,surfaces:{except:{cli:"apps are settings: sandbox config set apps.install / apps.custom"}}}),ok=_e({id:"apps.toggle",title:"Install in every sandbox",summary:"turn an app of the catalogue on or off for this scope",input:h.object({scope:rk.default("user"),id:h.string().max(100).describe("The app"),on:h.boolean().describe("Install it (true) or not (false)")}),output:h.object({message:h.string().describe("What changed")}),text:e=>e.message,surfaces:{except:{cli:"apps are settings: sandbox config set apps.install / apps.custom"}}}),nk=_e({id:"apps.setCustom",title:"Your own programs",summary:"change your own programs (apps.custom)",input:h.object({scope:rk.default("user"),value:h.unknown().describe("Programs of your own: a GitHub release or a download link, and the program to start.")}),output:h.object({message:h.string().describe("What changed")}),text:e=>e.message,surfaces:{except:{cli:"apps are settings: sandbox config set apps.custom"}}}),ik=_e({id:"apps.request",access:"control",title:"Request an app\u2026",summary:"open a prefilled GitHub request for an app that is not in the list",input:h.object({}),output:h.object({url:h.string().describe("The request page")}),text:e=>"Opened the request form in your browser: "+e.url,surfaces:{except:{cli:"a request is filed on GitHub; the address is in docs"}}});function Nve(e){return[...e.size!==""?[{label:"Download",text:"~"+e.size+" once, kept in C:\\AgentData\\tools\\"+(e.setting?"":"apps\\")+e.id+(e.installed?" (downloaded already)":"")},{label:"Starts",text:e.service?"by the sandbox or the agent (no shortcut, not on PATH)":e.cli?"from a terminal (on PATH)":"from the desktop or Start > Sandbox apps"}]:[],...e.plugsInto?[{label:"Plugs in",text:e.plugsInto}]:[],...e.mesa?[{label:"Graphics",text:"OpenGL on the CPU (Mesa) is added for it"}]:[],...e.fullGitOnly?[{label:"",text:"Needs full git access (Settings > Projects & setup > Git): it pushes with its own git.",warn:!0}]:[],...e.setting?[{label:"Setting",text:e.setting}]:[]]}function Fve(e){return Nve(e).map(t=>(t.label?t.label.padEnd(10):"")+t.text)}function Lve(e){return{name:"on",key:["apps","install"],kind:"boolean",label:e.name,optional:!1}}function Mve(e,t){let r=e.setting&&e.settingField?le(Qn,{scope:"user",key:e.setting},{label:"Change",verb:"change",inline:!0,fields:[{...e.settingField,name:"value",label:e.name}],initial:{value:e.settingValue}}):le(ok,{scope:t,id:e.id},{label:e.on?"Turn off":"Turn on",verb:"tick",inline:!0,fields:[Lve(e)],initial:{on:e.on}});return{id:e.id,label:e.name,description:e.about,code:e.id,keywords:e.id,details:Fve(e),...e.on?{tone:"ok"}:{},primary:r}}function Bve(e){return{id:"custom-"+e.id,label:e.name,description:e.from,hint:e.cli?"command line":"desktop",disabled:"Your own programs are always installed; change or remove them with Your own programs."}}function jve(e){let t=$ve.map(n=>({id:n.id,title:n.label,description:n.description,items:e.apps.filter(o=>o.group===n.id).map(o=>Mve(o,e.scope))})).filter(n=>(n.items?.length??0)>0);e.scope==="user"&&t.push({id:"custom",title:"Your own programs",description:"Programs you added yourself, from a GitHub release or a download link.",items:e.custom.map(Bve)});let r=e.scope==="user";return{title:"Apps",categories:!0,notice:{text:"Editing "+e.file+(e.exists?"":" (created when you save)")+(e.scope==="project"?": only apps from the list; needs your approval at the next launch":""),tone:e.scope==="project"?"accent":"muted"},sections:t,actions:r?[...e.customField?[le(nk,{scope:"user"},{key:"c",verb:"your own programs",fields:[{...e.customField,name:"value",label:"Your own programs"}],initial:{value:e.customValue}})]:[],le(ik,{},{key:"r",verb:"request an app"})]:[]}}var fQ=lt({id:"apps",title:"Apps",summary:"Tick the apps every sandbox should have. Each downloads once and is kept.",queries:{apps:YO},operations:[ok,nk,ik,Qn],tabs:{param:"scope",choices:[{value:"user",label:"All projects"},{value:"project",label:"This project"}]},inputs:e=>({apps:{scope:e.scope}}),build:({apps:e})=>jve(e)});var Ti={desktop:"desktop window",gpu:"GPU",clipboard:"clipboard",audio:"audio",video:"camera",printers:"printers",liveFolderAdd:"add folders while running",attachedDisks:"attached disks",multipleInstances:"several at once",hvsocket:"Hyper-V sockets"},Uve=Object.keys(Ti),Vve="see docs/design/engines.md",mQ=h.enum(["windows-sandbox","hcs"]).describe("The engine"),Hve=h.object({desktop:h.boolean().describe(Ti.desktop),gpu:h.boolean().describe(Ti.gpu),clipboard:h.boolean().describe(Ti.clipboard),audio:h.boolean().describe(Ti.audio),video:h.boolean().describe(Ti.video),printers:h.boolean().describe(Ti.printers),liveFolderAdd:h.boolean().describe(Ti.liveFolderAdd),attachedDisks:h.boolean().describe(Ti.attachedDisks),multipleInstances:h.boolean().describe(Ti.multipleInstances),hvsocket:h.boolean().describe(Ti.hvsocket)}),Wve=h.object({available:h.boolean().describe("This PC can run it"),reasons:h.array(h.string()).describe("Why not, in plain words"),fixes:h.array(h.string()).describe("The command that fixes each reason (never run for you)")}).describe("Whether this PC can run it"),pQ=h.object({id:mQ,inUse:h.boolean().describe("The setting sandbox.engine names it"),capabilities:Hve.describe("What it can do"),check:Wve}),Zve=h.object({engine:mQ.describe("The engine in use (the setting sandbox.engine)"),engines:h.array(pQ).describe("Every engine")});function Gve(e){if(e.check.available){let r=[e.id+" can be used on this PC."];return e.id==="hcs"&&r.push("HCS is in alpha: starting it is not enabled yet (docs/design/engines.md)."),r.join(`
|
|
126
|
+
`)}let t=[e.id+" cannot be used on this PC yet:"];return e.check.reasons.forEach((r,n)=>{t.push(""," "+(n+1)+". "+r," To fix: "+(e.check.fixes[n]??Vve))}),t.push("","Nothing was changed. These commands change Windows, so they are yours to run (or not)."),t.join(`
|
|
127
|
+
`)}var JO=Ge({id:"engine.status",title:"Engine",summary:"the engine in use and what each engine can do on this PC",input:h.object({}),output:Zve,cli:{name:"engine",action:"show",json:!0}}),hQ=Ge({id:"engine.check",title:"Check an engine",summary:"what this PC lacks for an engine, and the commands that would fix it",input:h.object({engine:h.string().default("hcs").describe("the engine to check")}),output:pQ,surfaces:{except:{menu:"the Engine category shows every engine and its check with the fixes (engine.status)",web:"the Engine page shows every engine and its check with the fixes (engine.status)"}},text:Gve,cli:{name:"engine",action:"check",positional:["engine"],json:!0,exitCode:e=>e.check.available?0:1}}),Kve=h.object({id:h.string().describe("The compute system"),kind:h.string().describe("Container or VirtualMachine (the utility VM)"),state:h.string().describe("What it is doing"),since:h.string().nullable().describe("When it was created (ISO time), when HCS says")}),qve=h.object({available:h.boolean().describe("HCS could be asked"),message:h.string().describe("What was found, or why nothing is listed"),systems:h.array(Kve).describe("Ours that are running now")}),ez=Ge({id:"engine.leftovers",title:"HCS systems left running",summary:"list the HCS compute systems this tool left running (a crashed command can leave one up)",input:h.object({}),output:qve,cli:{name:"engine",action:"leftovers",json:!0}}),ak=_e({id:"engine.clean",title:"Stop the leftover systems\u2026",summary:"stop the HCS compute systems this tool left running (frees their memory; nothing else is touched)",input:h.object({}),output:h.object({available:h.boolean().describe("HCS could be asked"),stopped:h.number().describe("How many were stopped"),failed:h.number().describe("How many could not be stopped"),message:h.string().describe("What happened")}),danger:!0,text:e=>e.message,cli:{name:"engine",action:"clean"}});function Xve(e){return{id:"leftover:"+e.id,label:e.id,hint:e.state+(e.since?" started "+_o(e.since):""),tone:"warn",details:["System "+e.id,"Kind "+e.kind,"State "+e.state,...e.since?["Created "+e.since]:[]]}}function Qve(e){return e.systems.length?[{id:"leftovers",title:"HCS systems left running",summary:Br(e.systems.length,"system")+" (they hold memory; a sandbox running on purpose is listed too)",items:e.systems.map(Xve),actions:[le(ak,{},{key:"x",verb:"stop them",importance:1})]}]:[]}function Yve(e){let t=Uve.map(n=>{let o=e.capabilities[n];return{id:n,label:Ti[n],value:o?"yes":"no",...o?{}:{tone:"muted"}}}),r=[...e.check.reasons.map((n,o)=>({id:"reason:"+o,label:n,tone:"warn"})),...e.check.fixes.map((n,o)=>({id:"fix:"+o,label:"Fix: "+n}))];return{id:e.id,title:e.id+(e.id==="hcs"?" (alpha)":"")+(e.inUse?" (in use)":""),summary:e.check.available?"can be used on this PC":"cannot be used yet",facts:t,items:r}}function Jve(e,t){return{title:"Engine",notice:{text:"Engine in use: "+e.engine+" (setting: sandbox.engine)"},sections:[...e.engines.map(Yve),...t?Qve(t):[]]}}var gQ=lt({id:"engine",title:"Engine",summary:"What runs your sandbox, and what each engine can do on this PC.",queries:{engines:JO,leftovers:ez},operations:[ak],build:({engines:e,leftovers:t})=>Jve(e,t)});var xQ="sandbox doctor and sandbox repair are hand-written renderers of this run (lines redrawn in place, --json alone, repair before the settings load)",exe=h.enum(["ok","fixed","needs-you","warn","skipped"]).describe("What the check found"),txe=h.object({id:h.string().describe("The check"),group:h.string().describe("Its heading (This PC, Install ...)"),name:h.string().describe("What was checked"),status:exe,detail:h.string().describe("What was found"),means:h.string().optional().describe("What it means for you"),fix:h.string().optional().describe("What to do yourself"),plan:h.string().optional().describe("What repair would change"),lines:h.array(h.string()).optional().describe("More lines (a diff, folders)"),fixable:h.boolean().describe("Repair can mend it"),timedOut:h.boolean().optional().describe("It took too long"),applied:h.object({done:h.string(),before:h.string(),after:h.string()}).optional().describe("What a fix changed"),error:h.string().optional().describe("Why a fix did not work")}),bQ=h.object({total:h.number().describe("Checks that ran"),ok:h.number().describe("Checks that are fine"),fixed:h.number().describe("Problems repair fixed"),warn:h.number().describe("Warnings"),needsYou:h.number().describe("Problems you need to fix"),skipped:h.number().describe("Checks that did not run"),fixable:h.number().describe("Problems repair can still mend")}).describe("How many checks ended how"),rxe=h.object({name:h.string().describe("What was looked at"),status:h.enum(["ok","warn","action"]).describe("OK, a warning, or something to do"),detail:h.string().describe("What was found")}),oxe=h.object({at:h.string().describe("When it ran (ISO time)"),mode:h.enum(["check","repair"]).describe("A check or a repair"),checks:h.array(txe).describe("The results"),summary:bQ,details:h.array(h.tuple([h.string(),h.string()])).describe("The doctor details: name and value"),setup:h.object({checks:h.array(rxe),canEnable:h.boolean().describe("Windows Sandbox can be turned on from here"),error:h.string().nullable().describe("Why the setup could not be read")}).nullable().describe("What sandbox setup found"),log:h.string().nullable().describe("The repair log, if one was written")});function yQ(e){return[e.ok+" ok",e.fixed&&e.fixed+" fixed",e.needsYou&&e.needsYou+" "+(e.needsYou===1?"needs":"need")+" you",e.warn&&e.warn+(e.warn===1?" warning":" warnings"),e.skipped&&e.skipped+" skipped"].filter(Boolean).join(", ")}var nxe={ok:"[ok]",fixed:"[fixed]",warn:"[!]","needs-you":"[x]",skipped:"[-]"},ih={ok:void 0,fixed:"accent",warn:"warn","needs-you":"danger",skipped:"muted"},tz=6;function ixe(e){let t={text:" "+nxe[e.status]+" "+e.name+": "+e.detail+(e.timedOut?" (took too long)":""),...ih[e.status]?{tone:ih[e.status]}:{}};if(e.status==="ok")return[t];let r=[t];e.means&&r.push({text:" What it means: "+e.means}),e.fixable&&e.plan?r.push({text:" Fix: sandbox repair will "+e.plan}):e.fix&&r.push({text:" Fix: "+e.fix});let n=e.lines??[];for(let o of n.slice(0,tz))r.push({text:" "+o});return n.length>tz&&r.push({text:" ... and "+(n.length-tz)+" more"}),r}var vQ={ok:"OK",fixed:"FIXED","needs-you":"NEEDS YOU",warn:"WARNING",skipped:"SKIPPED"};function axe(e,t){return e.length<=t?e:e.slice(0,t-1)+"\u2026"}var _Q=h.object({summary:bQ,changed:h.boolean().describe("Fixes were applied"),log:h.string().nullable().describe("The repair log, if one was written")}),rz=Ge({id:"health.last",title:"Health",summary:"the last check or repair of this PC and the sandbox",input:h.object({}),output:h.object({last:oxe.nullable().describe("Nothing yet: no check has run")}),surfaces:{except:{cli:"the command line prints results as it checks (sandbox doctor)"}}}),Jx=_e({id:"health.check",access:"control",title:"Check this PC",summary:"check this PC, the install, your settings and the sandbox (changes nothing)",input:h.object({harness:h.string().optional().describe("agent to check")}),output:_Q,text:e=>"Summary: "+yQ(e.summary),surfaces:{except:{cli:xQ}}}),eb=_e({id:"health.repair",title:"Run the checks and fix what can be fixed",summary:"find and fix problems (install, data folder, settings, stale state, half-installed tools)",input:h.object({}),output:_Q,danger:!0,text:e=>"Summary: "+yQ(e.summary)+(e.log?". Log: "+e.log:". No log was written (the storage folder does not exist yet)."),surfaces:{except:{cli:xQ}}}),sk=_e({id:"health.enableSandbox",title:"Turn on Windows Sandbox",summary:"turn on the Windows Sandbox feature (Windows asks for admin permission; restart to finish)",input:h.object({}),output:h.object({message:h.string().describe("What happened")}),danger:!0,text:e=>e.message,surfaces:{except:{cli:"sandbox setup asks and turns it on (hand-written: it also offers to restart Windows)",web:"Windows asks for admin permission on this PC; use the menu or sandbox setup"}}});function sxe(e){return e.checks.map((t,r)=>{let n=t.detail+(t.timedOut?" (took too long)":""),o=ixe(t).slice(1).map(a=>a.text.trim()).filter(a=>!a.startsWith("What it means: ")),i=t.status==="ok"?[]:["Found: "+n,...o];return{id:"repair:"+r,label:t.name,hint:vQ[t.status],...ih[t.status]?{tone:ih[t.status]}:{},badges:[{text:vQ[t.status],...ih[t.status]?{tone:ih[t.status]}:{}}],description:t.means??(i.length?void 0:n),...i.length?{details:i}:{}}})}var lxe={ok:"OK",warn:"WARNING",action:"NEEDS YOU"};function cxe(e){let t=e.last,r=le(Jx,{},{verb:"check"}),n=le(eb,{},{verb:"check and fix"});if(!t)return{title:"Health",sections:[{id:"doctor",title:"Doctor",cards:!0,items:[{id:"health:check",label:"Check this PC",description:"Looks at this PC: Windows features, the install, the folders and the sandbox. It takes a few seconds, so it only runs when you ask.",primary:r}]},{id:"repair",title:"Repair",cards:!0,items:[{id:"repair:run",label:"Run the checks and fix what can be fixed",description:"Checks the install, data folder, settings and sandbox, lists what it would change, and asks before it fixes anything.",primary:n}]}]};let o=!!t.setup?.canEnable,i=[{id:"status",summary:(t.mode==="repair"?"Last repair ":"Last check ")+_o(t.at),...t.log?{notes:[{text:"Log: "+t.log,tone:"muted"}]}:{}},{id:"doctor",title:"Doctor",items:t.details.map(([a,s],l)=>({id:"doctor:"+l,label:a,hint:axe(s,50),...s.length>50?{description:s}:{}}))},{id:"repair",title:"Repair",items:sxe(t)}];if(t.setup){let a=t.setup;i.push({id:"setup",title:"Set up this PC",items:a.error?[{id:"setup:error",label:a.error}]:a.checks.map((s,l)=>({id:"setup:"+l,label:s.name,hint:s.detail,tone:s.status==="ok"?"ok":s.status==="warn"?"warn":"danger",badges:[{text:lxe[s.status],tone:s.status==="ok"?"ok":s.status==="warn"?"warn":"danger"}]})),notes:o?[{text:"Turn Windows Sandbox on from the menu or with sandbox setup.",tone:"muted",only:"web"}]:[]})}return{title:"Health",sections:i,actions:[le(eb,{},{key:"f",verb:"check and fix",importance:1}),le(Jx,{},{key:"l",verb:t?"check again":"check",importance:2}),...o?[le(sk,{},{key:"e",verb:"turn on Windows Sandbox",importance:3})]:[]]}}var IQ=lt({id:"health",title:"Health",summary:"Checks this PC and your settings, repairs problems, and sets up Windows Sandbox.",queries:{last:rz},operations:[Jx,eb,sk],build:({last:e})=>cxe(e)});var wQ=["tools","databases","state","logs","data","host"],dxe={tools:"Toolchains",databases:"Databases",state:"Agent state",logs:"Logs",data:"Other",host:"On this PC"},uxe=h.object({area:h.enum(wQ).describe("Which kind of data it is"),name:h.string().describe("The folder as listed (tools: its name; others: area/name)"),path:h.string().describe("Its full path on this PC"),bytes:h.number().describe("Its size in bytes (links count 0)"),size:h.string().describe("Its size in words, e.g. 1.5 KB"),target:h.string().nullable().describe("What sandbox data clean calls it; null when it is kept on purpose")}),fxe=h.object({drive:h.string().describe("The drive, e.g. C:\\"),totalBytes:h.number().describe("Its size in bytes"),freeBytes:h.number().describe("Free bytes"),usedBytes:h.number().describe("Used bytes"),holdsStorage:h.boolean().describe("The sandbox keeps its files on this drive"),used:h.string().describe("Used, in words"),usedPercent:h.number().describe("Used, in percent of the size (rounded)"),free:h.string().describe("Free, in words"),total:h.string().describe("Size, in words")}),mxe=h.object({dataPath:h.string().describe("The data folder (C:\\AgentData inside the sandbox)"),storageRoot:h.string().describe("The storage folder that holds it"),totalBytes:h.number().describe("Everything listed, in bytes"),total:h.string().describe("Everything listed, in words"),storageShare:h.string().describe('"<- sandbox storage (<total> of it)": the note on the storage drive'),areaTotals:h.record(h.string(),h.string()).describe("Each area's total in words"),entries:h.array(uxe).describe("What is stored, by area, biggest first"),disks:h.array(fxe).describe("This PC's drives")}),oz=Ge({id:"data.show",title:"Stored data",summary:"show what is kept between sandboxes (tools, databases, logins, logs), or delete some of it",input:h.object({}),output:mxe,cli:{name:"data",action:"show",json:!0,shapeJson:e=>({dataPath:e.dataPath,storageRoot:e.storageRoot,totalBytes:e.totalBytes,entries:e.entries.map(({area:t,name:r,path:n,bytes:o})=>({area:t,name:r,path:n,bytes:o})),disks:e.disks.map(({drive:t,totalBytes:r,freeBytes:n,usedBytes:o,holdsStorage:i})=>({drive:t,totalBytes:r,freeBytes:n,usedBytes:o,holdsStorage:i}))})}}),SQ=h.object({message:h.string().describe("What happened")}),lk=_e({id:"data.clean",title:"Delete stored data\u2026",summary:"delete chosen parts of what is kept between sandboxes",input:h.object({targets:h.array(h.string()).default([]).describe("what to clean, e.g. tools/go databases logs")}),output:SQ.extend({freedBytes:h.number().describe("Bytes freed (0 when nothing was removed)")}),danger:!0,text:e=>e.message,next:e=>e.freedBytes>0?"sandbox data (see what is left)":void 0,cli:{name:"data",action:"clean",positional:["targets"]}}),kQ=h.object({days:h.number().int().min(1).default(7).describe("launch folders older than this many days")}),ck=_e({id:"data.prune",title:"Clean up\u2026",summary:"delete old launch folders, logs and leftovers",input:kQ,output:SQ.extend({removed:h.boolean().describe("Something was deleted")}),text:e=>e.message,next:e=>e.removed?"sandbox data (see what else is saved, and clean it)":void 0,cli:{name:"clean",group:"Data",flags:{days:{flag:"--days",value:"n"}},yes:"do not ask before deleting"}}),pxe=ns(new ha(kQ).child("days"),["days"]);function hxe(e){let t={id:"disks",title:"Disks",columns:[{key:"drive",label:"DRIVE"},{key:"used",label:"USED"},{key:"free",label:"FREE"},{key:"size",label:"SIZE"},{key:"note",label:""}],columnsOn:"cli",items:e.disks.map(i=>({id:"disk:"+i.drive,label:i.drive,hint:i.used+" used \xB7 "+i.free+" free of "+i.total,...i.holdsStorage?{description:"The sandbox keeps its files on this drive."}:{},cells:{drive:i.drive,used:i.used+" ("+i.usedPercent+"%)",free:i.free,size:i.total,note:i.holdsStorage?e.storageShare:""}})),notes:[{text:"Persistent data for the sandbox: "+e.dataPath+" (C:\\AgentData inside)"}]},r=i=>wQ.indexOf(i),n=[...e.entries].sort((i,a)=>r(i.area)-r(a.area)||a.bytes-i.bytes),o={id:"kept",title:"What the sandbox keeps",summary:e.total+" in all",columns:[{key:"kind",label:"KIND"},{key:"name",label:"NAME"},{key:"size",label:"SIZE"},{key:"folder",label:"FOLDER"}],items:n.map(i=>{let a=i.target?le(lk,{targets:[i.target]},{label:"Delete",key:"x",verb:"delete"}):void 0;return{id:"entry:"+i.name,label:i.name,hint:i.size,cells:{kind:dxe[i.area],name:i.name,size:i.size,folder:i.path},...a?{primary:a}:{}}}),actions:[le(ck,{},{label:"Clean up\u2026",verb:"choose what",description:"Delete caches, old sandboxes and other leftovers (the clean command, with its options).",fields:[pxe]})],notes:[...e.entries.length?[]:[{text:"Nothing stored yet. Toolchains, databases and agent logins appear here after the first start."}],...gxe(e),{text:"Free space with: sandbox data clean <target...> (e.g. tools/go, databases/postgres-18, logs, launches)",tone:"muted",only:"cli"}]};return{title:"Data",sections:[t,o]}}function gxe(e){let t=e.entries.filter(r=>!r.target).map(r=>r.name);return t.length?[{text:"Kept on this PC on purpose, not deleted here: "+t.join(", ")+"."}]:[]}var CQ=lt({id:"data",title:"Data",summary:"What the sandbox keeps between runs, and deleting parts of it.",queries:{data:oz},operations:[lk,ck],build:({data:e})=>hxe(e)});var vxe=h.object({name:h.string().describe("The project"),host:h.string().describe("Its folder on this PC"),guest:h.string().describe("Its folder in the sandbox"),mechanism:h.string().describe("How it got into the sandbox (launch, root, boot or share)"),here:h.boolean().describe("The project of the current folder"),setup:h.object({phase:h.string(),message:h.string()}).describe("How far its setup is"),databases:h.array(h.object({database:h.string(),port:h.number(),state:h.string()})),sessions:h.array(h.object({id:h.string(),harness:h.string(),viewers:h.string(),started:h.string()})),repoGuard:h.array(h.string()).describe("Repo guard findings in its folder")}),xxe=h.object({running:h.boolean().describe("A Windows Sandbox is running"),phase:h.string().describe("What it is doing (ready, provisioning ...)"),message:h.string().optional().describe("Its last message"),headless:h.boolean().optional().describe("Its window is hidden"),startedAt:h.number().nullable().describe("When it started (ms), if known"),daemon:h.string().describe("The sandbox helper's answer"),account:h.string().nullable().describe("The Claude login it uses"),syncWatcher:h.boolean().describe("The background history sync runs")}),bxe=h.object({shared:h.object({line:h.string().describe('"Running, started by alice (shared with you)"'),limited:h.boolean().describe("Not shared with you: nothing more is shown"),startedBy:h.string().nullable().describe("Whose it is")}).optional(),sandbox:xxe,here:h.object({folder:h.string(),project:h.string().nullable(),guest:h.string().nullable()}),roots:h.array(h.object({host:h.string(),guest:h.string()})),projects:h.array(vxe),otherSessions:h.array(h.object({id:h.string(),harness:h.string(),cwd:h.string()})),repoGuard:h.object({guarded:h.number(),findings:h.array(h.string())})}),PQ=h.object({message:h.string().describe("What happened")});function yxe(e){let t=/^pong \((\d+) session/.exec(e);return t?"responding, "+Br(Number(t[1]),"session")+" running":e}function DQ(e){return e.running&&e.startedAt?_o(e.startedAt).replace(" ago",""):null}var nz=Ge({id:"sandbox.status",title:"Sandbox status",summary:"show what the sandbox is doing",input:h.object({}),output:bxe,live:{everyMs:2500},cli:{name:"status",group:"Sessions",json:!0,shapeJson:e=>{if(e.shared?.limited)return{sandbox:{running:!0,shared:!1,startedBy:e.shared.startedBy}};let t=e.sandbox;return{sandbox:{...e.shared?.startedBy?{startedBy:e.shared.startedBy,shared:!0}:{},running:t.running,phase:t.phase,message:t.message,headless:t.headless,uptime:DQ(t),daemon:t.daemon,account:t.account,syncWatcher:t.syncWatcher},here:e.here,roots:e.roots,projects:e.projects,otherSessions:e.otherSessions,repoGuard:e.repoGuard}}}}),dk=_e({id:"sandbox.showWindow",access:"control",title:"Show the window",summary:"show the sandbox window",input:h.object({}),output:PQ,text:e=>e.message,cli:{name:"show",group:"Sessions"}}),uk=_e({id:"sandbox.hideWindow",access:"control",title:"Hide the window",summary:"hide the sandbox window (it keeps running)",input:h.object({}),output:PQ,text:e=>e.message,cli:{name:"hide",group:"Sessions"}}),fk=_e({id:"sandbox.stop",access:"control",title:"Stop the sandbox\u2026",summary:"shut the sandbox down (every project's sessions end)",input:h.object({}),output:h.object({stopped:h.boolean().describe("It was asked to shut down"),message:h.string()}),danger:!0,text:e=>e.message,cli:{name:"stop",group:"Agents",yes:"do not ask when other projects' sessions would end"}}),_xe={launch:"started from here",root:"in a project root",boot:"mapped at start"};function Ixe(e){return{id:"project:"+e.name,label:e.name,icon:"project",hint:e.host+" -> "+e.guest+" ("+(_xe[e.mechanism]??"wsb share")+")",marked:e.here,details:["Setup: "+e.setup.phase+(e.setup.phase==="ready"?"":" - "+e.setup.message),...e.databases.length?["Databases: "+e.databases.map(t=>t.database+" :"+t.port+" "+t.state).join(", ")]:[],...e.sessions.map(t=>"Session: "+t.harness+" "+t.id+", "+t.viewers+", started "+_o(t.started)),...e.repoGuard.map(t=>"Guard: "+t)]}}function wxe(e){let t=e.sandbox,r=e.projects.reduce((o,i)=>o+i.sessions.length,0)+e.otherSessions.length,n=(o,i,a,s={})=>({id:o,label:i,value:a,...s});return[...e.shared?.startedBy?[n("owner","Started by",e.shared.startedBy)]:[],n("state","State",t.running?t.message||t.phase:"not running",{tone:t.running?t.phase==="ready"?"ok":"warn":"muted"}),...t.running?[n("window","Window",t.headless?"hidden (sandbox show opens it)":"shown"),n("uptime","Uptime",DQ(t)??"-"),n("helper","Helper",t.daemon==="-"?"-":yxe(t.daemon)),n("sessions","Sessions",String(r))]:[],n("account","Account",t.account??"none selected (sandbox account use)"),n("sync","Background sync",t.syncWatcher?"on":"off")]}function Sxe(e){let t=e.roots.map(n=>({id:"root:"+n.host,label:"root",icon:"folder",hint:n.host+" -> "+n.guest+" (every project in it opens without a restart)"})),r=e.projects.some(n=>n.here);return{id:"projects",title:"Projects",items:[...e.projects.map(Ixe),...t],notes:[r?{text:"* = the project of this folder",tone:"muted"}:{text:e.here.folder+" is not in this sandbox (start it here: sandbox claude)",tone:"muted"}]}}function kxe(e){let t=e.repoGuard.findings;return{id:"guard",title:"Repo guard",summary:e.repoGuard.guarded+" folder(s) guarded; "+(t.length?t.length+" change(s) neutralised:":"nothing from the sandbox needed neutralising"),items:t.slice(-10).map((r,n)=>({id:"guard:"+n,label:r,tone:"warn"}))}}function Cxe(e){let t=e.shared?{text:e.shared.line+(e.shared.limited?"":". Its window is on their desktop; use its agents here."),tone:"accent"}:void 0;if(e.shared?.limited)return{title:"Sandbox",notice:t,sections:[]};let r=e.sandbox.running,n={id:"status",title:"Status",facts:wxe(e),actions:r?[e.sandbox.headless?le(dk,{},{key:"w",verb:"show",importance:3}):le(uk,{},{key:"h",verb:"hide",importance:3}),le(fk,{},{key:"x",verb:"stop",importance:1})]:[]},o={id:"other-sessions",title:"Other sessions",items:e.otherSessions.map(i=>({id:"session:"+i.id,label:"session "+i.id,hint:i.harness+" "+i.cwd}))};return{title:"Sandbox",notice:t,sections:[n,...r?[Sxe(e)]:[],...o.items?.length?[o]:[],kxe(e)]}}var RQ=lt({id:"sandbox",title:"Sandbox",summary:"What the sandbox is doing, its window, and stopping it.",queries:{status:nz},operations:[dk,uk,fk],build:({status:e})=>Cxe(e)});var Pxe=h.object({folder:h.string().describe("The project folder on this PC"),here:h.boolean().describe("The folder you are in is inside it"),known:h.boolean().describe("Started with this tool before"),root:h.string().nullable().describe("The project root it is in, if any"),excluded:h.boolean().describe("Excluded from the projects mapped at every start"),mappedAtStart:h.boolean().describe("Mapped at every start"),running:h.string().nullable().describe("Its name and how it got into the running sandbox, if it is there")}),Dxe=h.object({all:h.boolean().describe("Every project is mapped at every start (except excluded ones)"),roots:h.array(h.string()).describe("Folders of projects, each opened without a restart"),exclude:h.array(h.string()).describe("Folders left out of the projects mapped at every start"),projects:h.array(Pxe).describe("Every project worth listing")}),ah=h.object({message:h.string().describe("What happened")}),mk=e=>h.string().optional().describe(e+" (. = this folder; asked when left out)"),iz=Ge({id:"projects.list",title:"Projects",summary:"list your projects, roots and the all-projects setting",input:h.object({}),output:Dxe,cli:{name:"projects",action:"list",json:!0}}),pk=_e({id:"projects.choose",title:"Choose the projects mapped at every start\u2026",summary:"tick the projects mapped at every start; the rest are excluded",input:h.object({}),output:ah,text:e=>e.message,cli:{name:"projects",action:"choose"}}),tb=_e({id:"projects.add",title:"Add a project\u2026",summary:"remember a project folder",input:h.object({projectFolder:mk("The project folder")}),output:h.object({message:h.string().describe("What happened"),next:h.string().optional().describe("What to do next, when mapping all projects is off")}),text:e=>e.next?e.message+`
|
|
128
|
+
`+e.next:e.message,cli:{name:"projects",action:"add",positional:["projectFolder"]}}),hk=_e({id:"projects.remove",title:"Forget project",summary:"forget a project (nothing in the folder is touched)",input:h.object({projectFolder:mk("The project folder")}),output:ah,danger:!0,text:e=>e.message,cli:{name:"projects",action:"remove",positional:["projectFolder"]}}),gk=_e({id:"projects.include",title:"Include",summary:"map a project at every start again",input:h.object({projectFolder:mk("The project folder")}),output:ah,text:e=>e.message,cli:{name:"projects",action:"include",positional:["projectFolder"]}}),vk=_e({id:"projects.exclude",title:"Exclude",summary:"leave a project out of the projects mapped at every start",input:h.object({projectFolder:mk("The project folder")}),output:ah,text:e=>e.message,cli:{name:"projects",action:"exclude",positional:["projectFolder"]}}),xk=_e({id:"projects.all",title:"Map all projects at every start",summary:"map every project at every start, or not",input:h.object({state:h.enum(["on","off"]).optional().describe("on or off (left out: say which it is)")}),output:ah,text:e=>e.message,cli:{name:"projects",action:"all",positional:["state"]}}),Zu=_e({id:"projects.roots",title:"Project roots",summary:"list, add or remove project roots",input:h.object({change:h.enum(["list","add","remove"]).default("list").describe("list, add or remove"),rootFolder:h.string().optional().describe("(add, remove) the folder that holds your projects")}),output:ah,text:e=>e.message,cli:{name:"projects",action:"roots",positional:["change","rootFolder"]}}),TQ=M1(Zu.input).find(e=>e.name==="rootFolder"),Rxe=M1(tb.input).find(e=>e.name==="projectFolder"),Txe="Every project in this folder (also new ones) opens without a restart.";function EQ(e){return e.root?"root":e.excluded?"excluded":e.mappedAtStart?"mapped":"-"}function Exe(e){return{id:"project:"+e.folder,label:e.folder,marked:e.here,icon:"project",hint:e.running??(e.root?"in a root":e.excluded?"excluded":e.mappedAtStart?"mapped":"-"),description:e.here?"This is the folder you started the menu in.":void 0,details:["At start: "+EQ(e),"In the sandbox: "+(e.running??"not open")],cells:{here:e.here?"*":"",folder:e.folder,atStart:EQ(e),running:e.running??"-"},actions:[le(hk,{projectFolder:e.folder},{key:"f",verb:"forget project",importance:1}),e.excluded?le(gk,{projectFolder:e.folder}):le(vk,{projectFolder:e.folder})]}}function $xe(e){return{id:"root:"+e,label:e,hint:"root",icon:"folder",description:Txe,keys:"f removes the root.",actions:[le(Zu,{change:"remove",rootFolder:e},{label:"Remove the root",key:"f",verb:"remove root",importance:1})]}}function Axe(e){let t={id:"settings",facts:[{id:"all",label:"All projects",value:e.all?"on (every project below is mapped at every start, except excluded ones)":"off"},{id:"roots",label:"Roots",value:e.roots.length?e.roots.join(", "):"none (sandbox projects roots add <folder>)"}],actions:[le(xk,{state:e.all?"off":"on"},{label:e.all?"Stop mapping all projects":"Map all projects at every start"})],notes:[{text:"sandbox projects all on|off",tone:"muted",only:"cli"}]},r={id:"roots",title:"Project roots",items:[{id:"@add-root",label:"+ Add a project root\u2026",description:"Pick a folder that holds your projects: every project in it (also new ones) opens without a restart.",primary:le(Zu,{change:"add"},{label:"Choose the folder\u2026",verb:"choose folder",fields:[TQ]})},...e.roots.map($xe)]},n={id:"projects",title:"Projects",columns:[{key:"here",label:""},{key:"folder",label:"FOLDER"},{key:"atStart",label:"AT START"},{key:"running",label:"RUNNING SANDBOX"}],columnsOn:"cli",items:e.projects.map(Exe),notes:e.projects.length===0?[{text:"No projects yet: start one with sandbox claude in its folder.",tone:"muted"}]:[{text:"* = this folder. Choose with: sandbox projects choose",tone:"muted",only:"cli"}]};return{title:"Projects",sections:[t,r,n],actions:[le(pk,{},{label:"Choose\u2026"}),le(tb,{},{fields:[Rxe]}),le(Zu,{change:"add"},{label:"Add a project root\u2026",key:"a",verb:"add root",importance:1,fields:[TQ]})]}}var $Q=lt({id:"projects",title:"Projects",summary:"The projects a sandbox opens without a restart: roots, your projects, all or chosen.",queries:{projects:iz},operations:[pk,tb,hk,gk,vk,xk,Zu],build:({projects:e})=>Axe(e)});var bk="@crash",Oxe=1e3,OQ="sandbox logs is hand-written: --follow prints new lines until Ctrl+C; it reads this same query (readQuery)",zxe=h.object({name:h.string().describe("The log file"),path:h.string().describe("Where it is on this PC"),bytes:h.number().describe("Its size in bytes"),modified:h.number().describe("When it was last written (ms)")}),Nxe=h.object({folder:h.string().describe("The folder the logs are in"),files:h.array(zxe).describe("The log files, newest first"),crash:h.boolean().describe("A crash report exists")}),Fxe=h.object({name:h.string().describe("The log shown, or @crash for the last crash report (empty: there are no logs)"),file:h.string().describe("Its full path (empty: there are no logs)"),text:h.string().describe("The text read, made safe for a terminal"),next:h.number().describe("Where to read on from next time (bytes)")}),az=Ge({id:"logs.list",title:"Logs",summary:"list the sandbox's own logs",input:h.object({}),output:Nxe,surfaces:{except:{cli:OQ}}}),sz=Ge({id:"logs.tail",title:"Log",summary:"the end of one log, followed as it grows",input:h.object({name:h.string().max(200).optional().describe("The log to show (default: the newest), or @crash for the last crash report"),from:h.number().int().min(0).default(0).describe("Read on from this byte (0: the end of the log)"),lines:h.number().int().min(1).max(1e3).default(120).describe("How many lines of the end to show")}),output:Fxe,live:{everyMs:1e3},surfaces:{except:{cli:OQ}}}),AQ={text:"showing",tone:"accent"};function Lxe(e){let t=e.split(`
|
|
129
|
+
`);return t.length&&t[t.length-1]===""&&t.pop(),t.slice(-Oxe)}function Mxe(e,t){let r=t?.file?t:void 0,n=e.files.map(i=>({id:"log:"+i.name,label:i.name,hint:Wu(i.bytes)+" "+_o(i.modified),keys:"Enter shows the end of this log in the terminal.",primary:An({kind:"view",view:"logs",params:{name:i.name}},"Show",{verb:"show"}),...r?.name===i.name?{badges:[AQ]}:{}}));e.crash&&n.push({id:"log:"+bk,label:"Last crash report",description:"What Windows logged, this PC and the sandbox memory when the sandbox last ended in a crash.",primary:An({kind:"view",view:"logs",params:{name:bk}},"Show",{verb:"show"}),...r?.name===bk?{badges:[AQ]}:{}});let o=r?[{id:"tail",title:r.name===bk?"Last crash report":r.name,summary:r.file,text:Lxe(r.text)}]:[];return{title:"Logs",sections:[{id:"files",items:n},...o],actions:[An({kind:"command",argv:["logs","--follow"]},"Follow the newest log",{key:"f",verb:"follow in the terminal",importance:2})],empty:{title:"No logs yet",text:"Logs appear after the first start.",cliText:"No sandbox logs yet."}}}var zQ=lt({id:"logs",title:"Logs",summary:"The sandbox's own logs: pick one to see its end as it grows.",queries:{files:az,tail:sz},operations:[],params:["name"],inputs:e=>({tail:e.name?{name:e.name}:{}}),build:({files:e,tail:t})=>Mxe(e,t)});var Bxe=["proc","file","commit","session","guard","note","remote"],uz=["all","proc","file","commit","session","guard","remote"],NQ=[1,3,7,14,30],yk="none",jxe=240,Uxe={proc:"command",file:"file",commit:"commit",session:"session",guard:"GUARD",note:"note",remote:"remote"},Vxe=h.object({time:h.string().describe("When it happened (ISO time)"),kind:h.enum(Bxe).describe("proc: a program started; file: changed in a project; commit; session; guard: the repo guard; note; remote: what another Windows user or a paired device did in the web UI"),what:h.string().describe("The program, the file, the commit message, the agent, or what happened"),command:h.string().optional().describe("A program's command line (secrets hidden)"),parent:h.string().optional().describe("The program that started it"),action:h.string().optional().describe("file: change or rename; session: start or end; commit: commit, amend, merge, cherry-pick ..."),folder:h.string().optional().describe("The project folder on this PC"),project:h.string().optional().describe("The project"),session:h.string().optional().describe("The agent session it belongs to (missing: not known)"),agent:h.string().optional().describe("That session's agent"),linked:h.enum(["process","only-session"]).optional().describe("How it was linked: process = by the programs the session started; only-session = the only session running in that project then (likely, not proven)"),count:h.number().int().describe("How many times it happened in that minute"),sha:h.string().optional().describe("A commit's id"),author:h.string().optional().describe("A commit's author; for remote: who did it")}),_k=h.object({commands:h.number().int().describe("Programs started"),files:h.number().int().describe("Files changed (each file once)"),commits:h.number().int().describe("Commits")}),Hxe=_k.extend({id:h.string().describe("The session"),agent:h.string().describe("Its agent"),project:h.string().describe("Its project"),started:h.string().describe("Its first event (ISO time)"),ended:h.string().optional().describe("When it ended, if that was recorded"),last:h.string().optional().describe("The last command it ran")}),Wxe=_k.extend({agent:h.string().describe("The agent"),sessions:h.number().int().describe("Its sessions")}),Zxe=h.object({enabled:h.boolean().describe("The audit log is on (audit.enabled)"),keepDays:h.number().int().describe("Days it is kept (audit.days)"),maxMb:h.number().int().describe("Most space it may take (audit.maxMb)"),bytes:h.number().describe("Space it takes now"),folder:h.string().describe("Where it is on this PC"),filter:h.object({days:h.number().int(),kind:h.enum(uz),session:h.string().optional(),agent:h.string().optional(),project:h.string().optional(),grep:h.string().optional()}),matched:h.number().int(),events:h.array(Vxe).describe("The events, newest first"),totals:_k.extend({events:h.number().int(),sessions:h.number().int()}),agents:h.array(Wxe),sessions:h.array(Hxe).describe("The sessions in the period, newest first"),unlinked:_k}),fz=Ge({id:"audit.list",title:"Activity",summary:"what your agents did: programs started, files changed, commits, sessions, repo guard",input:h.object({days:h.number().int().min(1).max(30).default(1).describe("the last n days (1: the last 24 hours)"),kind:h.enum(uz).default("all").describe("only proc, file, commit, session or guard events"),session:h.string().max(64).optional().describe("only the events of this session (its id or the start of it; none: not linked to a session)"),agent:h.string().max(64).optional().describe("only this agent's events"),project:h.string().max(128).optional().describe("only this project's events"),grep:h.string().max(200).optional().describe("only events containing this text"),limit:h.number().int().min(1).max(5e3).default(300).describe("show at most this many events (the newest)")}),output:Zxe,live:{everyMs:15e3},cli:{name:"audit",group:"Health",json:!0,flags:{days:{flag:"--days",value:"n"},kind:{flag:"--kind",value:"kind"},session:{flag:"--session",value:"id"},agent:{flag:"--agent",value:"name"},project:{flag:"--project",value:"name"},grep:{flag:"--grep",value:"text"},limit:{flag:"--limit",value:"n",advanced:!0}},shapeJson:e=>[...e.events].reverse(),examples:["sandbox audit --days 7 --kind commit",'sandbox audit --session 4f2c --grep "git push"']}});function cz(e,t=Date.now()){let r=new Date(e);if(Number.isNaN(r.getTime()))return e;let n=a=>String(a).padStart(2,"0");return new Date(t).toDateString()===r.toDateString()?n(r.getHours())+":"+n(r.getMinutes())+":"+n(r.getSeconds()):["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][r.getMonth()]+" "+r.getDate()+" "+n(r.getHours())+":"+n(r.getMinutes())}function LQ(e){return e.slice(0,8)}function Gxe(e){switch(e.kind){case"proc":return e.command||e.what;case"file":return(e.action==="rename"?"added/removed ":"changed ")+e.what;case"commit":return(e.sha?e.sha.slice(0,7)+" ":"")+e.what+(e.action&&e.action!=="commit"?" ("+e.action+")":"");case"session":return e.what+(e.action==="end"?" ended":" started")+(e.project?" in "+e.project:"");case"remote":return(e.author??"someone")+": "+e.what+(e.action&&e.action!=="ok"?" ("+e.action+")":"");default:return e.what}}function FQ(e){return e.agent?e.agent+(e.linked==="only-session"?"?":""):"-"}function dz(e,t=jxe){return e.length>t?e.slice(0,t-1)+"\u2026":e}function Kxe(e,t){let r=Gxe(e)+(e.count>1?" \xD7"+e.count:""),n=[...e.session?["Session "+e.session+(e.linked==="only-session"?" (likely)":"")]:[],...e.project?["Project "+e.project]:[],...e.kind==="proc"&&e.command&&e.what!==e.command?["Program "+e.what]:[],...e.parent?["Started by "+e.parent]:[],...e.author?["Author "+e.author]:[],...e.sha?["Commit "+e.sha]:[],...e.folder&&e.kind!=="session"?["Folder "+e.folder]:[]];return{id:"event:"+t,label:dz(r),hint:cz(e.time)+" "+FQ(e),tone:e.kind==="guard"?"warn":void 0,details:n,keywords:[e.session,e.project,e.agent,e.kind,e.author].filter(Boolean).join(" "),cells:{time:cz(e.time),agent:FQ(e),kind:Uxe[e.kind],what:dz(r)}}}function mz(e,t){return{days:String(e.filter.days),kind:e.filter.kind,...t}}function MQ(e){return Br(e.commands,"command")+", "+Br(e.files,"file")+", "+Br(e.commits,"commit")}function qxe(e,t){return{id:"session:"+t.id,label:t.agent+" "+t.project,icon:t.agent,hint:"started "+_o(t.started)+(t.ended?", ended "+_o(t.ended):""),badges:[...t.commits?[{text:Br(t.commits,"commit"),tone:"accent"}]:[],...t.ended?[{text:"ended",tone:"muted"}]:[]],details:["Did "+MQ(t),...t.last?["Last "+dz(t.last,120)]:[],"Session "+t.id],keywords:t.id,cells:{session:LQ(t.id),agent:t.agent,project:t.project,started:cz(t.started),commands:String(t.commands),files:String(t.files),commits:String(t.commits)},primary:An({kind:"view",view:"audit",params:mz(e,{session:t.id})},"Show",{verb:"show",description:"Only what this session did."})}}function Xxe(e){let t=e.unlinked;return{id:"session:"+yk,label:"Not linked to a session",icon:"session",description:"What the sandbox ran itself (setup, services), and changes made while no session or several ran in that project.",details:["Did "+MQ(t)],cells:{session:yk,agent:"-",project:"-",started:"",commands:String(t.commands),files:String(t.files),commits:String(t.commits)},primary:An({kind:"view",view:"audit",params:mz(e,{session:yk})},"Show",{verb:"show",description:"Only what no session can be linked to."})}}function lz(e){let t=e.filter,r=t.session?e.sessions.find(n=>n.id===t.session):void 0;return[t.session===yk?"not linked to a session":t.session?"session "+LQ(t.session)+(r?" ("+r.agent+", "+r.project+")":""):"",t.agent?"agent "+t.agent:"",t.project?"project "+t.project:"",t.grep?'containing "'+t.grep+'"':""].filter(Boolean).join(", ")}function Qxe(e,t,r){return t.length?[{id:"sessions",title:"Sessions",summary:Br(e.sessions.length,"session")+" "+r,cards:!0,columnsOn:"cli",columns:[{key:"session",label:"SESSION"},{key:"agent",label:"AGENT"},{key:"project",label:"PROJECT"},{key:"started",label:"STARTED"},{key:"commands",label:"COMMANDS"},{key:"files",label:"FILES"},{key:"commits",label:"COMMITS"}],items:t,notes:[{text:"Only one session: sandbox audit --session <id>",tone:"muted",only:"cli"}]}]:[]}function Yxe(e){let t=e.filter,r=t.days===1?"in the last 24 hours":"in the last "+t.days+" days",n=!!(t.session||t.agent||t.project||t.grep),o=An({kind:"view",view:"audit",params:mz(e,{})},"Show everything",{verb:"show"}),i=le(Qn,{key:"audit.enabled",value:!0},{label:"Turn the audit log on",verb:"start",key:"o",importance:1}),a=e.totals,s=a.events?[{id:"events",label:"Events",value:String(a.events)},{id:"commands",label:"Commands",value:String(a.commands)},{id:"files",label:"Files changed",value:String(a.files)},{id:"commits",label:"Commits",value:String(a.commits),...a.commits?{tone:"accent"}:{}},{id:"sessions",label:"Sessions",value:String(a.sessions)}]:[],l=t.session||e.agents.length<1?[]:e.agents.map(p=>({id:"agent:"+p.agent,label:p.agent,value:Br(p.commands,"command"),details:[Br(p.files,"file")+", "+Br(p.commits,"commit"),Br(p.sessions,"session")]})),c={text:"The log takes "+Wu(e.bytes)+" of "+e.maxMb+" MB and keeps "+Br(e.keepDays,"day")+", on this PC where the sandbox cannot reach it ("+e.folder+").",tone:"muted"},d=t.session!==void 0?[]:[...e.sessions.map(p=>qxe(e,p)),...e.unlinked.commands||e.unlinked.files||e.unlinked.commits?[Xxe(e)]:[]],u=e.events.map(Kxe),f=e.events.some(p=>p.linked==="only-session"),m=[...n?[{id:"filter",title:"Filtered",summary:lz(e),actions:[o]}]:[],{id:"summary",facts:s},...l.length?[{id:"agents",title:"By agent",facts:l}]:[],...Qxe(e,d,r),{id:"events",title:"Events",summary:e.matched>u.length?"the newest "+u.length+" of "+e.matched:Br(e.matched,"event")+" "+r,columns:[{key:"time",label:"TIME"},{key:"agent",label:"AGENT"},{key:"kind",label:"KIND"},{key:"what",label:"WHAT"}],items:u,notes:[c,...f?[{text:"? = the only session running in that project then (likely, not proven)",tone:"muted"}]:[],...e.matched>u.length?[{text:"More: sandbox audit --limit <n>, or narrow it down.",tone:"muted",only:"cli"}]:[]]}];return{title:"Activity",...e.enabled?{}:{notice:{text:"The audit log is off: nothing new is recorded.",tone:"warn"}},sections:m,actions:e.enabled?[]:[i],empty:{title:n?"Nothing matches":e.enabled?"Nothing recorded "+r:"The audit log is off",text:n?"No events "+r+" for "+lz(e)+".":e.enabled?"What your agents run, change and commit appears here while a sandbox runs.":"Turn it on to keep a record of what your agents run, change and commit (kept "+Br(e.keepDays,"day")+" on this PC).",action:n?o:e.enabled?void 0:i,cliText:e.enabled?"Nothing in the audit log "+r+(n?" for "+lz(e):"")+".":"The audit log is off. Turn it on in the menu (Settings > Security & privacy > Audit log) or with: sandbox config set audit.enabled true"}}}var BQ=lt({id:"audit",title:"Activity",summary:"What your agents ran, changed and committed, from the audit log on this PC.",queries:{audit:fz},operations:[Qn],filters:[{param:"kind",label:"Kind",choices:[{value:"all",label:"Everything"},{value:"proc",label:"Commands"},{value:"file",label:"Files"},{value:"commit",label:"Commits"},{value:"session",label:"Sessions"},{value:"guard",label:"Repo guard"}]},{param:"days",label:"Period",choices:NQ.map(e=>({value:String(e),label:e===1?"24 hours":e+" days"}))}],params:["session","agent","project","grep"],inputs:e=>({audit:{days:NQ.find(t=>String(t)===e.days)??1,kind:uz.find(t=>t===e.kind)??"all",...e.session?{session:e.session}:{},...e.agent?{agent:e.agent}:{},...e.project?{project:e.project}:{},...e.grep?{grep:e.grep}:{}}}),build:({audit:e})=>Yxe(e)});var Jxe=h.object({viewers:h.number(),remote:h.number()}),ebe=h.object({id:h.string().describe("The session"),launchId:h.string(),harness:h.string().describe("The agent, or the shell (pwsh, powershell, cmd)"),kind:h.enum(["agent","shell"]).optional(),cwd:h.string().describe("Its folder in the sandbox"),project:h.string().optional(),phase:h.enum(["starting","running","exited","failed"]).describe("What it is doing"),message:h.string(),updatedAt:h.string(),startedAt:h.string().describe("When it started"),conversation:h.string().optional(),exitCode:h.number().optional(),projectName:h.string().optional().describe("The project it runs in"),here:h.boolean().optional().describe("In the project of the current folder"),viewers:Jxe.nullable().optional(),canOpen:h.boolean()}),tbe=h.object({sandboxRunning:h.boolean(),defaultAgent:h.string(),wide:h.boolean(),owner:h.string().optional(),sessions:h.array(ebe)});function jQ(e){return e===void 0?"-":e===null?"unknown (older session)":e.remote+" here, "+(e.viewers-e.remote)+" in sandbox"}function rbe(e){let t=(r,n)=>r.startedAt<n.startedAt?1:-1;return[...e.filter(r=>r.here).sort(t),...e.filter(r=>!r.here).sort(t)]}var pz=Ge({id:"sessions.list",title:"Sessions",summary:"list sessions (agents and shells) and who is attached",input:h.object({wide:h.boolean().default(!1).describe("also show each session's folder")}),output:tbe,live:{everyMs:2500},cli:{name:"sessions",group:"Sessions",json:!0,flags:{wide:{flag:"--wide",noMenu:!0}},shapeJson:e=>e.sessions.map(({canOpen:t,...r})=>r)}}),Ik=_e({id:"sessions.restart",access:"control",title:"Restart agents",summary:"restart this project's running agents in place; they resume their conversation",input:h.object({harness:h.string().optional().describe("only this agent"),all:h.boolean().default(!1).describe("every project's sessions, not only this folder's")}),output:h.object({message:h.string().describe("The sandbox's answer")}),text:e=>e.message,cli:{name:"restart",group:"Agents",flags:{harness:{flag:"--harness",shownAs:"--agent",value:"name",choices:"harnesses"},all:{flag:"--all"}}}}),obe=h.string().regex(/^[A-Za-z0-9_.-]{1,64}$/),nbe=h.string().regex(/^[A-Za-z0-9_-]{1,64}$/),ibe=["auto","pwsh","powershell","cmd"];function abe(e){return{kind:"terminal",session:e.session}}var wk=_e({id:"sessions.shell",title:"New shell",summary:"open PowerShell or cmd in a project of the running sandbox, as a session you can attach to",input:h.object({project:obe.optional().describe("The project of the running sandbox (default: this folder's, else asked)"),shell:h.enum(ibe).default("auto").describe("The shell: pwsh, powershell or cmd (default: pwsh if present)")}),output:h.object({session:h.string().describe("The new session"),shell:h.string().describe("The shell it runs"),message:h.string().describe("What happened")}),access:"owner",text:e=>e.message,opens:abe,cli:{name:"shell",group:"Sessions",positional:["project"],flags:{shell:{flag:"--shell",value:"name",choices:["pwsh","powershell","cmd"]}},json:!0,examples:["sandbox shell PowerShell in this folder's project, in this terminal (Ctrl+] detaches)","sandbox shell api --shell cmd cmd in the project api"]}}),Sk=_e({id:"sessions.close",title:"Close",summary:"end a running session (an agent or a shell) and every program it started",input:h.object({session:nbe.describe("The session to close")}),output:h.object({message:h.string().describe("The sandbox's answer")}),access:"control",danger:!0,text:e=>e.message,cli:{name:"close",group:"Sessions",positional:["session"],examples:["sandbox close 4f2c9a"]}});function sbe(e,t){let r=e.phase+(e.exitCode!==void 0?" ("+e.exitCode+")":""),n=e.phase==="running";return{id:e.id,label:(e.kind==="shell"?e.harness+" (shell)":e.harness)+" "+(e.projectName??"-"),hint:r+" "+_o(e.startedAt),badges:[{text:e.phase,tone:n?"ok":e.phase==="failed"?"danger":"muted"}],group:e.here?"This folder's project":"Other sessions",marked:e.here,icon:e.harness,description:n?"Opens this session's terminal (in a terminal, Ctrl+] detaches; the session keeps running). x closes it.":void 0,details:["Session "+e.id,"Folder "+e.cwd,"Attached "+jQ(e.viewers)],cells:{here:e.here?"*":"",id:e.id,agent:e.harness,project:e.projectName??"-",state:r,attached:jQ(e.viewers),...t?{folder:e.cwd}:{},started:_o(e.startedAt)},...n&&e.canOpen?{primary:An({kind:"terminal",session:e.id},"Open",{verb:"attach"})}:{},...n?{actions:[le(Sk,{session:e.id},{key:"x",verb:"close",importance:1})]}:{},...n?{}:{disabled:"This session has ended."},...n&&!e.canOpen?{disabled:"Not reachable from this PC."}:{}}}function lbe(e){let t=rbe(e.sessions),r=e.defaultAgent,n=An({kind:"start-agent",agent:r},"Start "+r,{verb:"start"}),o=t.length&&!t.some(i=>i.phase==="running"||i.phase==="starting")?[{id:"start",actions:[{...n,description:"Starts "+r+" in this folder."}]}]:[];return{title:"Sessions",...e.owner?{notice:{text:e.owner,tone:"accent"}}:{},sections:[{id:"sessions",cards:!0,columns:[{key:"here",label:""},{key:"id",label:"ID"},{key:"agent",label:"AGENT"},{key:"project",label:"PROJECT"},{key:"state",label:"STATE"},{key:"attached",label:"ATTACHED"},...e.wide?[{key:"folder",label:"FOLDER"}]:[],{key:"started",label:"STARTED"}],items:t.map(i=>sbe(i,e.wide)),notes:[...t.some(i=>i.here)?[{text:"* = the project of this folder",tone:"muted"}]:[],...e.wide?[]:[{text:"Folders: sandbox sessions --wide",tone:"muted",only:"cli"}]]},...o],actions:[...e.sandboxRunning?[{...n,label:"New session",key:"n",verb:"new session",importance:1}]:[],...e.sandboxRunning?[le(wk,{shell:"auto"},{key:"s",verb:"new shell",importance:1,description:"Opens PowerShell in a project of the sandbox, as a session like the agents."})]:[],...t.length?[le(Ik,{all:!1},{key:"r",verb:"restart agents",importance:1})]:[],An({kind:"command",argv:["resume"]},"Reopen last sessions",{key:"o",verb:"reopen last sessions",importance:2})],empty:{title:e.sandboxRunning?"No sessions":"No sandbox is running",text:e.sandboxRunning?"No agent is running. Start "+r+" in this folder.":"Starting "+r+" starts the sandbox too; its session is listed here.",action:n,cliText:"No sessions. Start one with: sandbox claude"}}}var UQ=lt({id:"sessions",title:"Sessions",summary:"The sessions of the running sandbox: open one, restart the agents, open a shell, close one.",queries:{sessions:pz},operations:[Ik,wk,Sk],build:({sessions:e})=>lbe(e)});var cbe=h.enum(["nordvpn","openvpn-file","wireguard-file"]).describe("Which VPN (setting vpn.provider)"),dbe=h.enum(["none","saved","unreadable"]).describe("Whether a login is saved and can be opened by you"),ube=["The VPN is an alpha: a tunnel carrying traffic is not confirmed yet (docs/vpn.md lists what still needs checking).","The agent in the sandbox can read the VPN login (a service login you can revoke) and can turn the tunnel off, because it is the administrator there.","Free VPNs see all your traffic: use one you trust."];var fbe=h.object({enabled:h.boolean().describe("The VPN is on (setting vpn.enabled)"),provider:cbe,protocol:h.enum(["udp","tcp"]).describe("udp or tcp (setting vpn.protocol)"),country:h.string().describe("The NordVPN country; empty = the best server anywhere"),killSwitch:h.boolean().describe("No internet when the tunnel fails (setting vpn.killSwitch)"),login:dbe,loginSavedAt:h.string().nullable().describe("When the login was saved (the date and time, never the login)"),running:h.object({level:h.enum(["ok","warn","bad"]).describe("How the tunnel is doing"),text:h.string().describe("What the sandbox reported")}).nullable().describe("The running sandbox's tunnel, when one runs with the VPN on")}),hz=Ge({id:"vpn.status",title:"VPN",summary:"the VPN settings, whether a login is saved, and the running tunnel",input:h.object({tunnel:h.boolean().default(!0).describe("also ask the running sandbox how its tunnel is doing (one request to api.ipify.org)")}),output:fbe,cli:{name:"vpn",action:"status",json:!0}}),kk=_e({id:"vpn.login",title:"Save the VPN login\u2026",summary:"save the VPN login (typed hidden, kept encrypted, never printed)",input:h.object({}).strict(),output:h.object({message:h.string().describe("What happened")}),text:e=>e.message,cli:{name:"vpn",action:"login"}}),Ck=_e({id:"vpn.logout",title:"Delete the VPN login",summary:"delete the saved VPN login",input:h.object({}).strict(),output:h.object({deleted:h.boolean().describe("A login was saved and is gone"),message:h.string().describe("What happened")}),danger:!0,text:e=>e.message,cli:{name:"vpn",action:"logout"}}),mbe={nordvpn:"NordVPN","wireguard-file":"your own WireGuard .conf","openvpn-file":"your own .ovpn file"},pbe={none:"not saved",saved:"saved (encrypted)",unreadable:"cannot be read"},hbe={none:"warn",saved:"ok",unreadable:"danger"},gbe={ok:"ok",warn:"warn",bad:"danger"};function vbe(e){let t=e.provider==="wireguard-file",r=e.loginSavedAt?" "+e.loginSavedAt.slice(0,10):"",n=[e.enabled?{id:"vpn",label:"VPN",value:"on",tone:"ok"}:{id:"vpn",label:"VPN",value:"off (applies from the next start)",tone:"muted"},{id:"provider",label:"Provider",value:mbe[e.provider]},{id:"protocol",label:"Protocol",value:e.protocol},{id:"country",label:"Country",value:e.country||"best available"},e.killSwitch?{id:"killSwitch",label:"Kill switch",value:"on (no internet if the tunnel fails)"}:{id:"killSwitch",label:"Kill switch",value:"off",tone:"warn"},t?{id:"login",label:"Login",value:"not needed (the keys are in your config)",tone:"muted"}:{id:"login",label:"Login",value:pbe[e.login]+r,tone:hbe[e.login]},...e.running?[{id:"running",label:"Running now",value:e.running.text,tone:gbe[e.running.level]}]:[]],o=[...!t&&e.login==="none"?[{text:"Next: sandbox vpn login",tone:"muted",only:"cli"}]:[],...e.login==="unreadable"?[{text:"Only the Windows user that saved it can read it. Save it again: sandbox vpn login",tone:"muted"}]:[],...ube.map(l=>({text:l,tone:"warn"}))],a=[le(Qn,{scope:"user",key:"vpn.enabled",value:!e.enabled},{label:e.enabled?"Turn the VPN off":"Turn the VPN on",verb:e.enabled?"turn off":"turn on",key:"o"}),...t?[]:[le(kk,{},{key:"v",verb:"save login"}),...e.login!=="none"?[le(Ck,{},{key:"x",verb:"delete login"})]:[]]];return{title:"VPN",sections:[{id:"vpn",facts:n,notes:o,actions:a}]}}var VQ=lt({id:"vpn",title:"VPN",summary:"The sandbox's VPN: whether it is on, the saved login, and the tunnel.",queries:{status:hz},operations:[kk,Ck,Qn],build:({status:e})=>vbe(e)});var xbe="https://github.com/settings/personal-access-tokens/new",wht=["Open "+xbe+" (a fine-grained personal access token).",'Under "Repository access" choose "Only select repositories" and pick only the ones the agent should reach.',"Give only the permissions it needs, for example Contents (read and write), Pull requests (read and write) and Actions (read).","Set an expiry date, then generate the token and copy it."],bbe=["The agent in the sandbox can read the token and use it for everything it allows: limit it to some repositories and permissions.",'It is handed over only with github.shareToken on and git access "full". Revoke it on GitHub whenever you like.'],ybe=h.enum(["none","saved","unreadable"]).describe("Whether a token is saved and can be opened by you"),_be=h.object({shareToken:h.boolean().describe("Sandboxes get the token (setting github.shareToken)"),gitAccess:h.enum(["full","readonly","none"]).describe("Git access in your settings (provisioning.git.access)"),token:ybe,kind:h.enum(["fine-grained","classic"]).nullable().describe("What kind of token is saved (never the token)"),savedAt:h.string().nullable().describe("When the token was saved (the date and time, never the token)")}),gz=Ge({id:"github.status",title:"GitHub",summary:"whether sandboxes get your GitHub token, and whether one is saved (never the token)",input:h.object({}).strict(),output:_be,cli:{name:"github",action:"status",json:!0}}),Pk=_e({id:"github.login",title:"Save the GitHub token\u2026",summary:"save a GitHub token for sandboxes (typed hidden, kept encrypted, never printed)",input:h.object({}).strict(),output:h.object({message:h.string().describe("What happened")}),text:e=>e.message,cli:{name:"github",action:"login"}}),Dk=_e({id:"github.logout",title:"Delete the GitHub token",summary:"delete the saved GitHub token",input:h.object({}).strict(),output:h.object({deleted:h.boolean().describe("A token was saved and is gone"),message:h.string().describe("What happened")}),danger:!0,text:e=>e.message,cli:{name:"github",action:"logout"}}),Ibe={none:"not saved",saved:"saved (encrypted)",unreadable:"cannot be read"},wbe={none:"warn",saved:"ok",unreadable:"danger"},Sbe={"fine-grained":"fine-grained",classic:"classic (reaches every repository you can: a fine-grained token is safer)"};function kbe(e){let t=e.savedAt?" "+e.savedAt.slice(0,10):"",r=[e.shareToken?{id:"share",label:"Share with sandboxes",value:"on",tone:"ok"}:{id:"share",label:"Share with sandboxes",value:"off (turn on: sandbox config set github.shareToken true)"},e.gitAccess==="full"?{id:"gitAccess",label:"Git access",value:"full"}:{id:"gitAccess",label:"Git access",value:e.gitAccess+' (the token is only handed over with "full")',tone:"warn"},{id:"token",label:"Token",value:Ibe[e.token]+t,tone:wbe[e.token]},...e.kind?[{id:"kind",label:"Kind",value:Sbe[e.kind],...e.kind==="classic"?{tone:"warn"}:{}}]:[]],n=[...e.token==="none"?[{text:"Next: sandbox github login",tone:"muted",only:"cli"}]:[],...e.token==="unreadable"?[{text:"Only the Windows user that saved it can read it. Save it again: sandbox github login",tone:"muted"}]:[],...bbe.map(a=>({text:a,tone:"muted"}))],o=[le(Pk,{},{key:"g",verb:"save token"}),...e.token!=="none"?[le(Dk,{},{key:"x",verb:"delete token"})]:[]];return{title:"GitHub",sections:[{id:"github",facts:r,notes:n,actions:o}]}}var HQ=lt({id:"github",title:"GitHub",summary:"A GitHub token for sandboxes: whether they get it, and the saved token.",queries:{status:gz},operations:[Pk,Dk],build:({status:e})=>kbe(e)});var Cbe=h.object({version:h.string().describe("The version that failed"),reason:h.string().describe("Why it failed, in one sentence")}),Pbe=h.object({managed:h.boolean().describe("Installed by the installer, so it can update itself"),version:h.string().describe("The version installed"),scope:h.enum(["user","machine"]).nullable().describe("Installed for you, or for everyone on this PC"),autoUpdate:h.boolean().describe("New versions install by themselves"),autoOffText:h.string().nullable().describe("Why automatic updates were turned off, if they were"),previous:h.string().nullable().describe("The version an update replaced (roll back goes there)"),failed:Cbe.nullable().describe("The last update that failed"),npmCommand:h.string().describe("How an npm install is updated"),error:h.string().nullable().describe("Why the status could not be read"),settings:h.object({pending:h.array(h.string()).describe('Each change still to make, as "name: what it does"'),error:h.string().nullable().describe("Why your saved settings could not be read")}).describe("Changes still to make to your saved settings")}),vz=Ge({id:"updates.status",title:"Updates",summary:"which version is installed and what your saved settings still need",input:h.object({}),output:Pbe,surfaces:{except:{cli:"no command shows this page; sandbox update --check and --version cover the command line"}}}),WQ=h.object({line:h.string().describe("What happened, in one sentence")}),as=_e({id:"updates.update",title:"Update now",summary:"install the newest version, or check, go back, or switch automatic updates",input:h.object({check:h.boolean().default(!1).describe("only look whether a newer version exists"),rollback:h.boolean().default(!1).describe("go back to the version before the last update"),auto:h.enum(["on","off"]).optional().describe("install new versions by themselves (for everyone on this PC: needs an admin terminal)"),unattended:h.boolean().default(!1).describe("used by automatic updates: no questions, short output"),feed:h.string().optional().describe("take the release from this folder (a feed.json and the package) instead of GitHub")}),output:WQ.extend({latest:h.string().nullable().describe("The newer version a check found")}),danger:!0,text:e=>e.line,cli:{name:"update",group:"Health",flags:{check:{flag:"--check"},rollback:{flag:"--rollback"},auto:{flag:"--auto",value:"on|off"},unattended:{flag:"--unattended",noMenu:!0,advanced:!0},feed:{flag:"--feed",value:"folder",noMenu:!0,advanced:!0}},yes:"(--rollback) do not ask first"}}),rb=_e({id:"updates.migrate",title:"Update saved settings",summary:"bring your saved settings up to date with this version",input:h.object({dryRun:h.boolean().default(!1).describe("only list what would change"),restore:h.string().optional().describe("put back the files saved before an update (a folder under <storage>\\backups)")}),output:WQ,text:e=>e.line,cli:{name:"migrate",group:"Health",flags:{dryRun:{flag:"--dry-run"},restore:{flag:"--restore",value:"backup",advanced:!0}},yes:"(--restore) do not ask first"}}),Gc=(e,t,r={})=>({id:"updates:"+e,label:t,...r});function Dbe(e,t){let r=e.managed&&!e.error,n=e.scope==="machine",o=e.autoUpdate?"off":"on",i=le(as,{rollback:!0},{label:"Roll back",verb:"go back"}),a={id:"program",title:"This program",notes:[{text:"After an update this page still runs the version it started with; sandbox web open (or the next sandbox start) starts the new one.",tone:"muted",only:"web"}],items:e.error?[{id:"updates:error",label:e.error,tone:"danger"}]:e.managed?[Gc("version","Version",{hint:e.version,description:"Installed "+(n?"for everyone on this PC":"for you")+"."}),Gc("latest","Newest version",{hint:t??"not looked yet",tone:t?"warn":"muted",keys:t?"Enter installs it.":"Enter looks on GitHub for a newer version.",primary:t?le(as,{},{label:"Install "+t,verb:"install"}):le(as,{check:!0},{label:"Check now",verb:"look",danger:!1})}),Gc("auto","Automatic updates",{hint:e.autoUpdate?"on":"off",tone:e.autoUpdate?"ok":"muted",description:n?"For everyone: needs an admin terminal.":"A new version installs once a day, even while a sandbox runs (it keeps its version until it restarts).",keys:"Enter switches them.",primary:le(as,{auto:o},{label:"Automatic updates "+o,verb:"switch",danger:!1}),actions:[le(as,{auto:o},{key:"a",label:"Automatic updates "+o,verb:"automatic on/off",danger:!1})]}),...e.autoOffText?[Gc("autooff","Automatic updates turned off",{hint:"off",tone:"warn",description:e.autoOffText})]:[],...e.previous?[Gc("previous","Previous version",{hint:e.previous,keys:"Enter goes back to it.",primary:i,actions:[{...i,key:"r",verb:"roll back"}]})]:[],...e.failed?[Gc("failed","Last failed update",{hint:e.failed.version,tone:"danger",description:"It is not tried again until a newer version is released.",details:[e.failed.reason]})]:[]]:[Gc("version","Version",{hint:e.version,description:"Installed with npm, so npm updates it: "+e.npmCommand}),Gc("npm","Update",{hint:"with npm",tone:"muted",description:"Run "+e.npmCommand+" in a terminal."})]},s=e.settings.pending,c={id:"settings",title:"Saved settings",items:e.settings.error?[{id:"settings:error",label:e.settings.error,tone:"danger"}]:s.length?s.map((d,u)=>({id:"settings:"+u,label:d.split(":")[0],hint:"to update",tone:"warn",description:"A backup is kept first.",keys:"Enter updates your saved settings.",details:[d],primary:le(rb,{},{label:"Update saved settings",verb:"update"}),actions:[le(rb,{},{key:"s",label:"Update saved settings",verb:"update saved settings"})]})):[{id:"settings:none",label:"Up to date",hint:"OK",tone:"ok",description:"Nothing to update."}]};return{title:"Updates",sections:[a,c],actions:r?[le(as,{check:!0},{key:"c",label:"Check now",verb:"check now",danger:!1}),le(as,{},{key:"u",label:"Update now",verb:"update now"})]:[]}}var ZQ=lt({id:"updates",title:"Updates",summary:"Which version is installed, installing a newer one, and bringing your saved settings up to date.",queries:{status:vz},operations:[as,rb],build:({status:e})=>Dbe(e,null)});var Rk={except:{web:"the page is the web UI"}},Rbe=h.object({running:h.boolean().describe("The web UI server answers"),port:h.number().nullable().describe("Its port on 127.0.0.1, when it runs"),address:h.string().nullable().describe("Its address (without the login token), when it runs"),lanAddress:h.string().nullable().optional().describe("Its address on your network for paired devices (LAN mode), when it listens there"),lanFingerprint:h.string().nullable().optional().describe("The LAN certificate's SHA-256 fingerprint"),lanProblem:h.string().nullable().optional().describe("Why LAN mode is on but not listening")}),Tbe=h.object({message:h.string().describe("What happened")}),xz=Ge({id:"web.status",title:"Web UI",summary:"whether the web UI server runs, and its address",input:h.object({}),output:Rbe,surfaces:Rk,text:e=>e.running&&e.port?"The web UI is running at http://127.0.0.1:"+e.port+"/ (sandbox web open signs you in)."+(e.lanAddress?`
|
|
130
|
+
On your network: `+e.lanAddress+" (certificate "+e.lanFingerprint+")":"")+(e.lanProblem?`
|
|
131
|
+
LAN mode is on but not listening: `+e.lanProblem:""):"The web UI is not running (sandbox web start).",cli:{name:"web",action:"status",json:!0}}),Tk=_e({id:"web.start",title:"Start the web UI",summary:"start the web UI server in the background (this PC only)",input:h.object({}),output:h.object({port:h.number().describe("Its port"),message:h.string().describe("What happened")}),surfaces:Rk,text:e=>e.message,cli:{name:"web",action:"start"}}),Ek=_e({id:"web.open",title:"Open the web UI",summary:"start the web UI if needed and open it in your browser, signed in",input:h.object({}),output:Tbe,surfaces:Rk,text:e=>e.message,cli:{name:"web",action:"open"}}),$k=_e({id:"web.stop",title:"Stop the web UI",summary:"stop the web UI server",input:h.object({}),output:h.object({stopped:h.boolean().describe("It was running and stopped"),message:h.string().describe("What happened")}),surfaces:Rk,text:e=>e.message,cli:{name:"web",action:"stop"}});function Ebe(e){let t=le(Ek,{},{key:"o",verb:"open"}),r=le(Tk,{},{key:"s",verb:"start"}),n=le($k,{},{key:"x",verb:"stop"});return{title:"Web UI",sections:[{id:"web",facts:[{id:"running",label:"Running",value:e.running?"yes":"no",tone:e.running?"ok":"muted"},...e.address?[{id:"address",label:"Address",value:e.address+" (this PC only)"}]:[],...e.lanAddress?[{id:"lan",label:"On your network",value:e.lanAddress,description:"Type this into the phone, then enter the code from Remote access > Allow a new device.",details:e.lanFingerprint?["Certificate "+e.lanFingerprint]:void 0}]:[],...e.lanProblem?[{id:"lan-problem",label:"LAN mode",value:e.lanProblem,tone:"warn"}]:[]],actions:e.running?[t,n]:[r,t],notes:[{text:"Loopback only, behind a token. Open signs you in.",tone:"muted"}]}]}}var GQ=lt({id:"web",title:"Web UI",summary:"The web UI server on this PC: start, open, stop.",queries:{status:xz},operations:[Tk,Ek,$k],build:({status:e})=>Ebe(e)});var nb=h.enum(["view","control"]),$be=h.object({id:h.string().describe("Its id (for revoke)"),name:h.string().describe("The name it gave itself"),role:nb.describe("view or control"),address:h.string().describe("The address it was allowed from"),createdAt:h.string().describe("When it was allowed (ISO time)"),expiresAt:h.string().describe("When it is signed out (ISO time)"),lastSeen:h.string().nullable().describe("When it was last used (ISO time)")}),Abe=h.object({id:h.string().describe("Its id (for revoke)"),user:h.string().describe("The Windows user (DOMAIN\\name)"),createdAt:h.string().describe("When they signed in"),expiresAt:h.string().describe("When they are signed out")}),Obe=h.object({lan:h.object({enabled:h.boolean().describe("web.remote.lan.enabled"),running:h.boolean().describe("The web UI listens on your network now"),address:h.string().nullable().describe("What a phone types: https://<address>:<port>"),fingerprint:h.string().nullable().describe("The certificate's SHA-256 fingerprint"),problem:h.string().nullable().describe("Why it is on but not listening"),network:h.string().nullable().describe("The network it was turned on for")}),windowsSignIn:h.boolean().describe("web.remote.windowsSignIn"),users:h.array(h.object({name:h.string(),role:nb})).describe("web.remote.users"),rememberDays:h.number().describe("web.remote.rememberDays"),devices:h.array($be),windows:h.array(Abe).describe("Windows users signed in to the web UI now"),pending:h.object({role:nb,expiresAt:h.string()}).nullable().describe("A device code waiting to be typed (the code itself is never kept)"),codeVoided:h.boolean().describe("The last code was voided after too many wrong tries")}),yz=Ge({id:"access.status",title:"Remote access",summary:"devices on your network and other Windows users who may use your web UI",input:h.object({}),output:Obe,access:"owner",live:{everyMs:5e3},text:e=>(e.lan.running&&e.lan.address?"On your network: "+e.lan.address:"LAN mode is off")+". "+e.devices.length+" device"+(e.devices.length===1?"":"s")+", "+e.windows.length+" Windows sign-in"+(e.windows.length===1?"":"s")+".",cli:{name:"web",action:"devices",json:!0}}),ib=_e({id:"access.allowDevice",title:"Allow a new device",summary:"show a one-time code that a phone or tablet on your network types to sign in (5 minutes)",input:h.object({role:nb.default("view").describe("What the device may do: view (look) or control (everything but access)")}),output:h.object({code:h.string().describe("The one-time code (ABCD-EFGH)"),expiresAt:h.string().describe("When it runs out"),role:nb,address:h.string().nullable().describe("What the device opens"),fingerprint:h.string().nullable().describe("The certificate's fingerprint, to compare on the device")}),access:"owner",keepResult:!0,text:e=>"Code "+e.code+" (5 minutes, "+e.role+"). On the device open "+(e.address??"the address on your network")+" and type the code."+(e.fingerprint?" Its certificate should be "+e.fingerprint.slice(0,23)+"...":""),cli:{name:"web",action:"allow-device",flags:{role:{flag:"--role",value:"view|control",choices:["view","control"]}}}}),ab=_e({id:"access.revoke",title:"Sign out",summary:"sign out one device or Windows user now (its open pages close)",input:h.object({id:h.string().regex(/^[0-9a-f]{16}$/).describe("The id from sandbox web devices")}),output:h.object({message:h.string()}),access:"owner",text:e=>e.message,cli:{name:"web",action:"revoke",positional:["id"]}}),Ak=_e({id:"access.revokeAll",title:"Sign out everyone",summary:"sign out every device and Windows user now, and void a code that was not used",input:h.object({}),output:h.object({message:h.string()}),access:"owner",danger:!0,text:e=>e.message,cli:{name:"web",action:"revoke-all",yes:"sign everyone out without asking"}}),Ok=_e({id:"access.lanOn",title:"Turn on LAN mode",summary:"let devices you allow use the web UI on your network (adds a firewall rule; Windows asks once)",input:h.object({}),output:h.object({message:h.string(),address:h.string()}),access:"owner",text:e=>e.message,cli:{name:"web",action:"lan-on"}}),zk=_e({id:"access.lanOff",title:"Turn off LAN mode",summary:"stop listening on your network, remove the firewall rule and sign out every device",input:h.object({}),output:h.object({message:h.string()}),access:"owner",danger:!0,text:e=>e.message,cli:{name:"web",action:"lan-off",yes:"turn it off without asking"}}),KQ=864e5;function bz(e,t){let r=Date.parse(e)-t;return Number.isFinite(r)?r>=KQ?"in "+Math.round(r/KQ)+" days":r>=36e5?"in "+Math.round(r/36e5)+" hours":"in "+Math.max(1,Math.round(r/6e4))+" minutes":"?"}function ob(e){return e?e.slice(0,16).replace("T"," "):"not yet"}function zbe(e,t=Date.now()){let r=le(ib,{},{key:"a",verb:"allow",fields:[{...ns(ib.input.shape.role,["role"]),name:"role",label:"Role"}],initial:{role:"view"}}),n=e.devices.map(a=>({id:"device:"+a.id,label:a.name,hint:a.role,tone:a.role==="control"?"accent":void 0,icon:"device",description:"From "+a.address+", signed out "+bz(a.expiresAt,t)+".",details:["Allowed "+ob(a.createdAt),"Last seen "+ob(a.lastSeen),"Ends "+ob(a.expiresAt),"Id "+a.id],keys:"x signs it out.",actions:[le(ab,{id:a.id},{key:"x",verb:"sign out",label:"Sign out "+a.name})]})),o=e.windows.map(a=>({id:"windows:"+a.id,label:a.user,hint:e.users.find(s=>a.user.toLowerCase().endsWith("\\"+s.name.toLowerCase())||a.user.toLowerCase()===s.name.toLowerCase())?.role??"not on the list",description:"Signed in with Windows, signed out "+bz(a.expiresAt,t)+".",details:["Signed in "+ob(a.createdAt),"Ends "+ob(a.expiresAt),"Id "+a.id],keys:"x signs them out.",actions:[le(ab,{id:a.id},{key:"x",verb:"sign out",label:"Sign out "+a.user})]})),i=e.lan;return{title:"Remote access",notice:{text:"Anyone you let in acts as you: control can read what your agents can read, logins included. Local network only, never the internet.",tone:"warn"},sections:[{id:"lan",title:"Devices on your network",facts:[{id:"lan-mode",label:"LAN mode",value:i.running?"on":i.enabled?"on, not listening":"off",tone:i.running?"ok":i.enabled?"warn":"muted",description:i.problem??void 0},...i.address?[{id:"lan-address",label:"On your network",value:i.address,description:"Type this into the phone's browser. The first time it warns about the certificate: compare it with the one below. A warning after that means stop."}]:[],...i.fingerprint?[{id:"lan-cert",label:"Certificate",value:i.fingerprint}]:[],...e.pending?[{id:"pending",label:"Code waiting",value:"for a "+e.pending.role+" device, "+bz(e.pending.expiresAt,t),tone:"accent"}]:[],...e.codeVoided?[{id:"voided",label:"Last code",value:"voided after too many wrong tries",tone:"warn",description:"Someone on your network may have tried to guess it. Make a new one when you are ready."}]:[],{id:"remember",label:"Stays signed in",value:e.rememberDays+" days (web.remote.rememberDays)"}],items:n,actions:i.enabled?[r,le(zk,{},{key:"f",verb:"LAN off"})]:[le(Ok,{},{key:"n",verb:"LAN on"})],notes:n.length?[]:[{text:"No devices yet.",tone:"muted"}]},{id:"windows",title:"Other Windows users of this PC",facts:[{id:"windows-sign-in",label:"Windows sign-in",value:e.windowsSignIn?"on":"off",tone:e.windowsSignIn?"ok":"muted",description:"They run sandbox remote (or sandbox remote --browser) as themselves. Turn on web.remote.windowsSignIn and list them in web.remote.users (Settings)."},...e.users.map((a,s)=>({id:"user-"+s,label:a.name,value:a.role}))],items:o}],actions:[le(Ak,{},{key:"X",verb:"sign out all"})]}}var qQ=lt({id:"access",title:"Remote access",summary:"Devices on your network and other Windows users of this PC: allow, see, sign out.",queries:{status:yz},operations:[ib,ab,Ak,Ok,zk],build:({status:e})=>zbe(e)});var XQ=[ak,dk,uk,fk,Ik,wk,Sk,WO,V1,H1,W1,Qn,tk,Qx,Yx,qx,Z1,G1,K1,q1,ok,nk,ik,pk,tb,hk,gk,vk,xk,Zu,Jx,eb,sk,lk,ck,as,rb,X1,Q1,nh,Y1,J1,Tk,Ek,$k,kk,Ck,Pk,Dk,ib,ab,Ak,Ok,zk],QQ=[nz,pz,HO,QO,lQ,oh,GO,YO,iz,rz,oz,KO,qO,az,sz,fz,vz,JO,hQ,ez,xz,hz,gz,yz],Nbe=[RQ,UQ,nQ,uQ,iQ,fQ,$Q,IQ,CQ,aQ,zQ,BQ,ZQ,gQ,GQ,VQ,HQ,qQ],Jht=[...XQ,...QQ];function Kc(e){return XQ.find(t=>t.id===e)}function Gu(e){return QQ.find(t=>t.id===e)}function _z(e){return Nbe.find(t=>t.id===e)}function Ku(e){return e.flatMap(t=>[t,...Ku(t.children??[])])}function YQ(e){return Ku(e).flatMap(t=>[...t.view?[t.view]:[],...(t.embeds??[]).map(r=>r.view)])}function JQ(e,t){return Ku(e).find(r=>r.embeds?.some(n=>n.view===t))}var sl=[{label:"Agents",view:"agents"},{label:"Sessions",view:"sessions"},{label:"Activity",view:"audit"},{label:"Sandbox",children:[{label:"Status",view:"sandbox"},{label:"Projects",view:"projects"}]},{label:"Apps",view:"apps"},{label:"Settings",view:"settings",embeds:[{label:"VPN",view:"vpn"},{label:"GitHub",view:"github"}]},{label:"Accounts",view:"accounts"},{label:"Remote access",view:"access"},{label:"Maintenance",children:[{label:"Updates",view:"updates"},{label:"Data",view:"data"},{label:"Storage",view:"storage"},{label:"Health",view:"health"},{label:"Logs",view:"logs"},{label:"Engine",view:"engine"},{label:"More",elsewhere:"The less common commands are in the menu (sandbox > Maintenance)."}]}];var Nk={kind:"owner"};function eY(e){Nk=e==="owner"?{kind:"owner"}:{kind:"device",id:"",name:"",role:e}}function tY(){return Nk.kind==="owner"}function rY(e){if(e.kind==="link")return e.target.kind!=="start-agent"||BO(Nk,"control");let t=Kc(e.op);return t!==void 0&&BO(Nk,HX(t,e.input))}var oY="x-sandbox-web";var Iz=class extends Error{constructor(r,n){super(n);$t(this,"status",r)}};async function sh(e,t,r){let n=await fetch(t,{method:e,credentials:"same-origin",headers:{[oY]:"1",...r===void 0?{}:{"Content-Type":"application/json"}},body:r===void 0?void 0:JSON.stringify(r)}),o=await n.json().catch(()=>null);if(!n.ok){let i=o?.error;throw new Iz(n.status,typeof i=="string"?i:"The server said "+n.status)}return o}var lh={login:e=>sh("POST","/api/login",{token:e}),loginOnce:e=>sh("POST","/api/login/once",{token:e}),pair:(e,t)=>sh("POST","/api/pair",{code:e,name:t}),me:()=>sh("GET","/api/me"),info:()=>sh("GET","/api/info"),sessions:()=>sh("GET","/api/sessions")};var ch=y(D(),1);var nY={outline:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}};var oe=(e,t,r,n)=>{let o=(0,ch.forwardRef)(({color:i="currentColor",size:a=24,stroke:s=2,title:l,className:c,children:d,...u},f)=>(0,ch.createElement)("svg",{ref:f,...nY[e],width:a,height:a,className:["tabler-icon",`tabler-icon-${t}`,c].filter(Boolean).join(" "),...e==="filled"?{fill:i}:{strokeWidth:s,stroke:i},...u},[l&&(0,ch.createElement)("title",{key:"svg-title"},l),...n.map(([m,p])=>(0,ch.createElement)(m,p)),...Array.isArray(d)?d:[d]]));return o.displayName=`${r}`,o};var Lbe=[["path",{d:"M4 10a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-0"}],["path",{d:"M6 4v4",key:"svg-1"}],["path",{d:"M6 12v8",key:"svg-2"}],["path",{d:"M10 16a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-3"}],["path",{d:"M12 4v10",key:"svg-4"}],["path",{d:"M12 18v2",key:"svg-5"}],["path",{d:"M16 7a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-6"}],["path",{d:"M18 4v1",key:"svg-7"}],["path",{d:"M18 9v11",key:"svg-8"}]],wz=oe("outline","adjustments","Adjustments",Lbe);var Mbe=[["path",{d:"M12 9v4",key:"svg-0"}],["path",{d:"M10.363 3.591l-8.106 13.534a1.914 1.914 0 0 0 1.636 2.871h16.214a1.914 1.914 0 0 0 1.636 -2.87l-8.106 -13.536a1.914 1.914 0 0 0 -3.274 0",key:"svg-1"}],["path",{d:"M12 16h.01",key:"svg-2"}]],sb=oe("outline","alert-triangle","AlertTriangle",Mbe);var Bbe=[["path",{d:"M4 5a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1l0 -4",key:"svg-0"}],["path",{d:"M4 15a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1l0 -4",key:"svg-1"}],["path",{d:"M14 15a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1l0 -4",key:"svg-2"}],["path",{d:"M14 7l6 0",key:"svg-3"}],["path",{d:"M17 4l0 6",key:"svg-4"}]],Sz=oe("outline","apps","Apps",Bbe);var jbe=[["path",{d:"M5 12l14 0",key:"svg-0"}],["path",{d:"M5 12l6 6",key:"svg-1"}],["path",{d:"M5 12l6 -6",key:"svg-2"}]],kz=oe("outline","arrow-left","ArrowLeft",jbe);var Ube=[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M18 11l-6 -6",key:"svg-1"}],["path",{d:"M6 11l6 -6",key:"svg-2"}]],Cz=oe("outline","arrow-up","ArrowUp",Ube);var Vbe=[["path",{d:"M12 3l8 4.5l0 9l-8 4.5l-8 -4.5l0 -9l8 -4.5",key:"svg-0"}],["path",{d:"M12 12l8 -4.5",key:"svg-1"}],["path",{d:"M12 12l0 9",key:"svg-2"}],["path",{d:"M12 12l-8 -4.5",key:"svg-3"}]],dh=oe("outline","box","Box",Vbe);var Hbe=[["path",{d:"M5 12l5 5l10 -10",key:"svg-0"}]],Pz=oe("outline","check","Check",Hbe);var Wbe=[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]],lb=oe("outline","chevron-down","ChevronDown",Wbe);var Zbe=[["path",{d:"M9 6l6 6l-6 6",key:"svg-0"}]],Dz=oe("outline","chevron-right","ChevronRight",Zbe);var Gbe=[["path",{d:"M6 15l6 -6l6 6",key:"svg-0"}]],Rz=oe("outline","chevron-up","ChevronUp",Gbe);var Kbe=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M9 12l6 0",key:"svg-1"}]],Tz=oe("outline","circle-minus","CircleMinus",Kbe);var qbe=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M9 12h6",key:"svg-1"}],["path",{d:"M12 9v6",key:"svg-2"}]],Ez=oe("outline","circle-plus","CirclePlus",qbe);var Xbe=[["path",{d:"M4 6a8 3 0 1 0 16 0a8 3 0 1 0 -16 0",key:"svg-0"}],["path",{d:"M4 6v6a8 3 0 0 0 16 0v-6",key:"svg-1"}],["path",{d:"M4 12v6a8 3 0 0 0 16 0v-6",key:"svg-2"}]],$z=oe("outline","database","Database",Xbe);var Qbe=[["path",{d:"M6 4h10l4 4v10a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2",key:"svg-0"}],["path",{d:"M10 14a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-1"}],["path",{d:"M14 4l0 4l-6 0l0 -4",key:"svg-2"}]],cb=oe("outline","device-floppy","DeviceFloppy",Qbe);var Ybe=[["path",{d:"M6 5a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2v-14",key:"svg-0"}],["path",{d:"M11 4h2",key:"svg-1"}],["path",{d:"M12 17v.01",key:"svg-2"}]],Az=oe("outline","device-mobile","DeviceMobile",Ybe);var Jbe=[["path",{d:"M4 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M11 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M18 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}]],Oz=oe("outline","dots","Dots",Jbe);var eye=[["path",{d:"M10.585 10.587a2 2 0 0 0 2.829 2.828",key:"svg-0"}],["path",{d:"M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87",key:"svg-1"}],["path",{d:"M3 3l18 18",key:"svg-2"}]],zz=oe("outline","eye-off","EyeOff",eye);var tye=[["path",{d:"M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-0"}],["path",{d:"M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6",key:"svg-1"}]],Nz=oe("outline","eye","Eye",tye);var rye=[["path",{d:"M10 14a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-0"}],["path",{d:"M12 10.5v1.5",key:"svg-1"}],["path",{d:"M12 16v1.5",key:"svg-2"}],["path",{d:"M15.031 12.25l-1.299 .75",key:"svg-3"}],["path",{d:"M10.268 15l-1.3 .75",key:"svg-4"}],["path",{d:"M15 15.803l-1.285 -.773",key:"svg-5"}],["path",{d:"M10.285 12.97l-1.285 -.773",key:"svg-6"}],["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-7"}],["path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2",key:"svg-8"}]],Fz=oe("outline","file-settings","FileSettings",rye);var oye=[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2",key:"svg-1"}]],Lz=oe("outline","file","File",oye);var nye=[["path",{d:"M11 19h-6a2 2 0 0 1 -2 -2v-11a2 2 0 0 1 2 -2h4l3 3h7a2 2 0 0 1 2 2v4",key:"svg-0"}],["path",{d:"M20 21l2 -2l-2 -2",key:"svg-1"}],["path",{d:"M17 17l-2 2l2 2",key:"svg-2"}]],db=oe("outline","folder-code","FolderCode",nye);var iye=[["path",{d:"M5 19l2.757 -7.351a1 1 0 0 1 .936 -.649h12.307a1 1 0 0 1 .986 1.164l-.996 5.211a2 2 0 0 1 -1.964 1.625h-14.026a2 2 0 0 1 -2 -2v-11a2 2 0 0 1 2 -2h4l3 3h7a2 2 0 0 1 2 2v2",key:"svg-0"}]],ub=oe("outline","folder-open","FolderOpen",iye);var aye=[["path",{d:"M5 4h4l3 3h7a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-11a2 2 0 0 1 2 -2",key:"svg-0"}]],fb=oe("outline","folder","Folder",aye);var sye=[["path",{d:"M4 6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -12",key:"svg-0"}],["path",{d:"M4 13h3l3 3h4l3 -3h3",key:"svg-1"}]],Mz=oe("outline","inbox","Inbox",sye);var lye=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 9h.01",key:"svg-1"}],["path",{d:"M11 12h1v4h1",key:"svg-2"}]],mb=oe("outline","info-circle","InfoCircle",lye);var cye=[["path",{d:"M3.5 5.5l1.5 1.5l2.5 -2.5",key:"svg-0"}],["path",{d:"M3.5 11.5l1.5 1.5l2.5 -2.5",key:"svg-1"}],["path",{d:"M3.5 17.5l1.5 1.5l2.5 -2.5",key:"svg-2"}],["path",{d:"M11 6l9 0",key:"svg-3"}],["path",{d:"M11 12l9 0",key:"svg-4"}],["path",{d:"M11 18l9 0",key:"svg-5"}]],Bz=oe("outline","list-check","ListCheck",cye);var dye=[["path",{d:"M5 13a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-6",key:"svg-0"}],["path",{d:"M11 16a1 1 0 1 0 2 0a1 1 0 0 0 -2 0",key:"svg-1"}],["path",{d:"M8 11v-4a4 4 0 1 1 8 0v4",key:"svg-2"}]],jz=oe("outline","lock","Lock",dye);var uye=[["path",{d:"M4 8v-2a2 2 0 0 1 2 -2h2",key:"svg-0"}],["path",{d:"M4 16v2a2 2 0 0 0 2 2h2",key:"svg-1"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v2",key:"svg-2"}],["path",{d:"M16 20h2a2 2 0 0 0 2 -2v-2",key:"svg-3"}]],Uz=oe("outline","maximize","Maximize",uye);var fye=[["path",{d:"M15 19v-2a2 2 0 0 1 2 -2h2",key:"svg-0"}],["path",{d:"M15 5v2a2 2 0 0 0 2 2h2",key:"svg-1"}],["path",{d:"M5 15h2a2 2 0 0 1 2 2v2",key:"svg-2"}],["path",{d:"M5 9h2a2 2 0 0 0 2 -2v-2",key:"svg-3"}]],Vz=oe("outline","minimize","Minimize",fye);var mye=[["path",{d:"M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454l0 .008",key:"svg-0"}]],pb=oe("outline","moon","Moon",mye);var pye=[["path",{d:"M4 20h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4",key:"svg-0"}],["path",{d:"M13.5 6.5l4 4",key:"svg-1"}]],hb=oe("outline","pencil","Pencil",pye);var hye=[["path",{d:"M7 4v16l13 -8l-13 -8",key:"svg-0"}]],Hz=oe("outline","player-play","PlayerPlay",hye);var gye=[["path",{d:"M5 7a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2l0 -10",key:"svg-0"}]],Wz=oe("outline","player-stop","PlayerStop",gye);var vye=[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M5 12l14 0",key:"svg-1"}]],ll=oe("outline","plus","Plus",vye);var xye=[["path",{d:"M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4",key:"svg-0"}],["path",{d:"M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4",key:"svg-1"}]],Fk=oe("outline","refresh","Refresh",xye);var bye=[["path",{d:"M3.06 13a9 9 0 1 0 .49 -4.087",key:"svg-0"}],["path",{d:"M3 4.001v5h5",key:"svg-1"}],["path",{d:"M11 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}]],Zz=oe("outline","restore","Restore",bye);var yye=[["path",{d:"M6 6a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v4a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2l0 -4",key:"svg-0"}],["path",{d:"M12 2v2",key:"svg-1"}],["path",{d:"M9 12v9",key:"svg-2"}],["path",{d:"M15 12v9",key:"svg-3"}],["path",{d:"M5 16l4 -2",key:"svg-4"}],["path",{d:"M15 14l4 2",key:"svg-5"}],["path",{d:"M9 18h6",key:"svg-6"}],["path",{d:"M10 8v.01",key:"svg-7"}],["path",{d:"M14 8v.01",key:"svg-8"}]],Gz=oe("outline","robot","Robot",yye);var _ye=[["path",{d:"M3 10a7 7 0 1 0 14 0a7 7 0 1 0 -14 0",key:"svg-0"}],["path",{d:"M21 21l-6 -6",key:"svg-1"}]],On=oe("outline","search","Search",_ye);var Iye=[["path",{d:"M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065",key:"svg-0"}],["path",{d:"M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-1"}]],Kz=oe("outline","settings","Settings",Iye);var wye=[["path",{d:"M12 17.75l-6.172 3.245l1.179 -6.873l-5 -4.867l6.9 -1l3.086 -6.253l3.086 6.253l6.9 1l-5 4.867l1.179 6.873l-6.158 -3.245",key:"svg-0"}]],qz=oe("outline","star","Star",wye);var Sye=[["path",{d:"M8 12a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M3 12h1m8 -9v1m8 8h1m-9 8v1m-6.4 -15.4l.7 .7m12.1 -.7l-.7 .7m0 11.4l.7 .7m-12.1 -.7l-.7 .7",key:"svg-1"}]],Xz=oe("outline","sun","Sun",Sye);var kye=[["path",{d:"M8 9l3 3l-3 3",key:"svg-0"}],["path",{d:"M13 15l3 0",key:"svg-1"}],["path",{d:"M3 6a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2l0 -12",key:"svg-2"}]],Ei=oe("outline","terminal-2","Terminal2",kye);var Cye=[["path",{d:"M4 19v-10.5a3.5 3.5 0 1 1 7 0v10.5",key:"svg-0"}],["path",{d:"M4 13h7",key:"svg-1"}],["path",{d:"M21 12h-6",key:"svg-2"}]],Qz=oe("outline","text-decrease","TextDecrease",Cye);var Pye=[["path",{d:"M4 19v-10.5a3.5 3.5 0 1 1 7 0v10.5",key:"svg-0"}],["path",{d:"M4 13h7",key:"svg-1"}],["path",{d:"M18 9v6",key:"svg-2"}],["path",{d:"M21 12h-6",key:"svg-3"}]],Yz=oe("outline","text-increase","TextIncrease",Pye);var Dye=[["path",{d:"M7 10h3v-3l-3.5 -3.5a6 6 0 0 1 8 8l6 6a2 2 0 0 1 -3 3l-6 -6a6 6 0 0 1 -8 -8l3.5 3.5",key:"svg-0"}]],Jz=oe("outline","tool","Tool",Dye);var Rye=[["path",{d:"M4 7l16 0",key:"svg-0"}],["path",{d:"M10 11l0 6",key:"svg-1"}],["path",{d:"M14 11l0 6",key:"svg-2"}],["path",{d:"M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12",key:"svg-3"}],["path",{d:"M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3",key:"svg-4"}]],qu=oe("outline","trash","Trash",Rye);var Tye=[["path",{d:"M5 7a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2",key:"svg-1"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"svg-2"}],["path",{d:"M21 21v-2a4 4 0 0 0 -3 -3.85",key:"svg-3"}]],e3=oe("outline","users","Users",Tye);var Eye=[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]],uh=oe("outline","x","X",Eye);var gb=y(D(),1);var Bt=y(O(),1);function $ye(){let e=navigator.userAgent;return/iPhone/.test(e)?"iPhone":/iPad/.test(e)?"iPad":/Android/.test(e)?/Mobile/.test(e)?"Android phone":"Android tablet":/Macintosh/.test(e)?"Mac":/Windows/.test(e)?"Windows PC":"Device"}function Aye(){return(0,Bt.jsxs)(Fe,{gap:"sm",align:"center",ta:"center",children:[(0,Bt.jsx)(Ic,{size:52,radius:"xl",variant:"light",children:(0,Bt.jsx)(jz,{size:26,stroke:1.6})}),(0,Bt.jsx)(Kn,{order:2,children:"Not signed in"}),(0,Bt.jsxs)(ue,{c:"dimmed",size:"sm",children:["This page only opens from this PC. In a terminal, run"," ",(0,Bt.jsx)(ue,{span:!0,ff:"monospace",fw:600,children:"sandbox web open"})," ",": it opens the web UI already signed in."]}),(0,Bt.jsxs)(ue,{c:"dimmed",size:"xs",children:["Another Windows user of this PC, allowed by its owner, runs"," ",(0,Bt.jsx)(ue,{span:!0,ff:"monospace",fw:600,children:"sandbox remote --browser"})," ","instead."]})]})}function Oye({onSignedIn:e}){let[t,r]=(0,gb.useState)(""),[n,o]=(0,gb.useState)($ye),[i,a]=(0,gb.useState)(null),[s,l]=(0,gb.useState)(!1),c=async()=>{l(!0),a(null);try{await lh.pair(t,n),e()}catch(d){a(d instanceof Error?d.message:"That did not work.")}finally{l(!1)}};return(0,Bt.jsx)("form",{onSubmit:d=>{d.preventDefault(),c()},children:(0,Bt.jsxs)(Fe,{gap:"sm",children:[(0,Bt.jsxs)(Fe,{gap:4,align:"center",ta:"center",children:[(0,Bt.jsx)(Ic,{size:52,radius:"xl",variant:"light",children:(0,Bt.jsx)(Az,{size:26,stroke:1.6})}),(0,Bt.jsx)(Kn,{order:2,children:"Sign in this device"}),(0,Bt.jsx)(ue,{c:"dimmed",size:"sm",children:"On the PC, open Remote access and choose Allow a new device. Type the code it shows."})]}),(0,Bt.jsx)(Pt,{label:"Code",placeholder:"ABCD-EFGH",value:t,onChange:d=>r(d.currentTarget.value.toUpperCase()),autoCapitalize:"characters",autoComplete:"one-time-code",spellCheck:!1,maxLength:12,styles:{input:{fontFamily:"var(--mantine-font-family-monospace)",letterSpacing:2,fontSize:20}},"data-autofocus":!0}),(0,Bt.jsx)(Pt,{label:"Name for this device",description:"The PC lists it by this name.",value:n,onChange:d=>o(d.currentTarget.value),maxLength:40}),i&&(0,Bt.jsx)(xi,{color:"red",variant:"light",children:i}),(0,Bt.jsx)(st,{type:"submit",loading:s,disabled:t.replace(/[\s-]/g,"").length!==8,children:"Sign in"}),(0,Bt.jsx)(ue,{c:"dimmed",size:"xs",ta:"center",children:"Your browser warned about the certificate the first time: that is expected once. If it warns again later, stop and ask the owner of the PC."})]})})}function iY({onSignedIn:e}){let t=location.protocol==="https:"||location.hash==="#device";return(0,Bt.jsx)(Vs,{h:"100dvh",p:"md",style:{background:"var(--app-bg)"},children:(0,Bt.jsx)(gr,{maw:440,w:"100%",p:"xl",children:t?(0,Bt.jsx)(Oye,{onSignedIn:e}):(0,Bt.jsx)(Aye,{})})})}var Li=y(D(),1);var zY=y(D(),1);var Lk=y(D(),1),zye="sessions";function Nye(e,t=""){let r=/^\/s\/([A-Za-z0-9_-]{1,64})\/?$/.exec(e);if(r)return{page:"terminal",id:r[1]};let n=/^\/v\/([a-z][a-z0-9-]{0,40})\/?$/.exec(e),o=Object.fromEntries(new URLSearchParams(t));return{page:"view",view:n?n[1]:zye,params:o}}function Io(e,t={}){let r=new URLSearchParams(t).toString();return"/v/"+e+(r?"?"+r:"")}function Er(e){history.pushState(null,"",e),window.dispatchEvent(new PopStateEvent("popstate"))}function aY(){let[e,t]=(0,Lk.useState)({path:location.pathname,search:location.search});return(0,Lk.useEffect)(()=>{let r=()=>t({path:location.pathname,search:location.search});return window.addEventListener("popstate",r),()=>window.removeEventListener("popstate",r)},[]),Nye(e.path,e.search)}var ls=y(D(),1);var jk=y(D(),1);var ss=y(D(),1);var yt=y(O(),1),Fye={ask:()=>Promise.resolve(void 0)};function sY(e,t){if(!t||!/^[A-Za-z]:\\|^\\\\/.test(t))return;if(e==="dir")return t;let r=t.lastIndexOf("\\");return r>2?t.slice(0,r):t.slice(0,3)}function Lye({kind:e,initial:t,done:r}){let n=Bk(),[o,i]=(0,ss.useState)(null),[a,s]=(0,ss.useState)(sY(e,t)??""),[l,c]=(0,ss.useState)(e==="file"?t??null:null),[d,u]=(0,ss.useState)(null),[f,m]=(0,ss.useState)(!1),p=(0,ss.useCallback)(v=>{m(!0),u(null),Mye(n,v,e==="file").then(x=>{i(x),s(x.path),c(null),m(!1)},x=>{u(x instanceof Error?x.message:"That folder cannot be opened."),m(!1)})},[n,e]);(0,ss.useEffect)(()=>p(sY(e,t)),[p,e,t]);let g=e==="dir"?l??o?.path??"":l??"",b=v=>{v.key==="Enter"&&(v.preventDefault(),p(a.trim()||void 0))};return(0,yt.jsxs)(Fe,{gap:"sm",children:[(0,yt.jsxs)(Se,{gap:"xs",wrap:"nowrap",children:[(0,yt.jsx)(xt,{label:"Up one folder",children:(0,yt.jsx)(vt,{size:"lg",variant:"default","aria-label":"Up one folder",disabled:!o?.path,onClick:()=>p(o?.parent??void 0),children:(0,yt.jsx)(Cz,{size:16})})}),(0,yt.jsx)(Pt,{style:{flex:1},value:a,placeholder:"Type a path and press Enter",onChange:v=>s(v.currentTarget.value),onKeyDown:b,ff:"monospace","aria-label":"Folder",rightSection:f?(0,yt.jsx)(ho,{size:14}):null})]}),d&&(0,yt.jsx)(xi,{color:"red",variant:"light",p:"xs",children:d}),(0,yt.jsxs)(Se,{align:"stretch",gap:"sm",wrap:"nowrap",children:[(0,yt.jsxs)(Fe,{gap:2,w:170,visibleFrom:"xs",style:{flex:"none"},children:[(0,yt.jsx)(ue,{size:"xs",fw:650,c:"dimmed",tt:"uppercase",px:6,pb:4,children:"Places"}),(o?.places??[]).map(v=>(0,yt.jsxs)("div",{className:"picker-entry",onClick:()=>p(v.path),title:v.path,children:[v.label.endsWith(":")?(0,yt.jsx)(cb,{size:16}):(0,yt.jsx)(db,{size:16}),(0,yt.jsx)(ue,{size:"sm",truncate:!0,children:v.label})]},v.path))]}),(0,yt.jsxs)(zr,{className:"picker-list",style:{flex:1},type:"auto",children:[!o?.path&&(0,yt.jsx)(ue,{size:"sm",c:"dimmed",p:"md",children:"Pick a place on the left, or type a path."}),o?.path&&o.entries.length===0&&(0,yt.jsx)(ue,{size:"sm",c:"dimmed",p:"md",children:e==="dir"?"No folders in here.":"Nothing in here."}),o?.entries.map(v=>(0,yt.jsxs)("div",{className:"picker-entry","data-selected":l===v.path,onClick:()=>c(v.path),onDoubleClick:()=>v.kind==="dir"?p(v.path):r(v.path),children:[v.kind==="dir"?(0,yt.jsx)(fb,{size:16,color:"var(--mantine-color-yellow-6)"}):(0,yt.jsx)(Lz,{size:16,color:"var(--app-muted)"}),(0,yt.jsx)(ue,{size:"sm",truncate:!0,children:v.name})]},v.path)),o?.truncated&&(0,yt.jsx)(ue,{size:"xs",c:"dimmed",p:"sm",children:"Only the first entries are shown: type the rest of the path."})]})]}),(0,yt.jsxs)(Se,{justify:"space-between",wrap:"nowrap",gap:"sm",children:[(0,yt.jsx)(ue,{size:"xs",c:"dimmed",ff:"monospace",truncate:!0,style:{minWidth:0},children:g||(e==="file"?"Pick a file":"Pick a folder")}),(0,yt.jsxs)(Se,{gap:"xs",wrap:"nowrap",style:{flex:"none"},children:[(0,yt.jsx)(st,{variant:"default",onClick:()=>r(void 0),children:"Cancel"}),(0,yt.jsx)(st,{disabled:!g,onClick:()=>r(g),children:e==="dir"?"Choose this folder":"Choose"})]})]})]})}function Mye(e,t,r){return e.call("files.browse",{path:t,files:r},Fye)}function Mk(e,t,r){return new Promise(n=>{let o=!1,i=s=>{o||(o=!0,Ka.close(a),n(s))},a=Ka.open({title:r??(e==="dir"?"Choose a folder":"Choose a file"),size:"xl",onClose:()=>i(void 0),children:(0,yt.jsx)(Lye,{kind:e,initial:t,done:i})})})}var nr=y(O(),1);function lY(e){return e.kind==="confirm"?!1:void 0}function Bye({question:e,said:t,done:r}){let[n,o]=(0,jk.useState)(e.kind==="text"||e.kind==="path"?e.initial??"":""),[i,a]=(0,jk.useState)(e.kind==="choose"?e.initial??e.choices[0]?.value??"":""),[s,l]=(0,jk.useState)(e.kind==="checklist"?[...e.checked??[]]:[]),c=[...t,...e.lines??[]],d="problem"in e?e.problem:void 0,u=e.kind!=="confirm"||!e.typed||n.trim().toLowerCase()===e.typed;return(0,nr.jsx)("form",{onSubmit:m=>{m.preventDefault(),e.kind==="confirm"?r(u):e.kind==="choose"?r(i):e.kind==="checklist"?r(s):r(n===""&&e.kind==="text"&&!e.allowEmpty?void 0:n)},children:(0,nr.jsxs)(Fe,{gap:"sm",children:[c.map((m,p)=>(0,nr.jsx)(ue,{size:"sm",children:m},p)),d&&(0,nr.jsx)(xi,{color:"orange",variant:"light",p:"xs",children:d}),e.kind==="confirm"&&e.typed&&(0,nr.jsx)(Pt,{label:'Type "'+e.typed+'" to confirm',value:n,onChange:m=>o(m.currentTarget.value),"data-autofocus":!0}),e.kind==="choose"&&(0,nr.jsx)(Ks.Group,{value:i,onChange:a,children:(0,nr.jsx)(Fe,{gap:"xs",children:e.choices.map(m=>(0,nr.jsx)(Ks,{value:m.value,label:m.label,description:m.description},m.value))})}),e.kind==="checklist"&&(0,nr.jsx)(js.Group,{value:s,onChange:l,children:(0,nr.jsx)(Fe,{gap:"xs",children:e.choices.map(m=>(0,nr.jsx)(js,{value:m.value,label:m.label,description:m.description},m.value))})}),e.kind==="text"&&(0,nr.jsx)(Pt,{value:n,onChange:m=>o(m.currentTarget.value),"data-autofocus":!0}),e.kind==="path"&&(0,nr.jsxs)(Se,{gap:"xs",wrap:"nowrap",align:"flex-end",children:[(0,nr.jsx)(Pt,{style:{flex:1},ff:"monospace",value:n,onChange:m=>o(m.currentTarget.value),description:"The full path of a "+(e.pathKind==="file"?"file":"folder")+" on this PC","data-autofocus":!0}),(0,nr.jsx)(xt,{label:e.pathKind==="file"?"Choose a file":"Choose a folder",children:(0,nr.jsx)(vt,{variant:"default",size:36,"aria-label":"Browse",onClick:()=>{Mk(e.pathKind,n||void 0).then(m=>m&&o(m))},children:(0,nr.jsx)(ub,{size:18,stroke:1.6})})})]}),e.kind==="secret"&&(0,nr.jsx)(gc,{value:n,onChange:m=>o(m.currentTarget.value),autoComplete:"new-password","data-autofocus":!0}),(0,nr.jsxs)(Se,{justify:"flex-end",children:[(0,nr.jsx)(st,{variant:"default",onClick:()=>r(lY(e)),children:"Cancel"}),(0,nr.jsx)(st,{type:"submit",color:e.kind==="confirm"&&e.danger?"red":void 0,disabled:!u,children:e.kind==="confirm"?e.yes??"Yes":"OK"})]})]})})}function cY(e,t=[]){return new Promise(r=>{let n=!1,o=a=>{n||(n=!0,Ka.close(i),r(a))},i=Ka.open({title:e.title,centered:!0,onClose:()=>o(lY(e)),children:(0,nr.jsx)(Bye,{question:e,said:t,done:o})})})}var fY=y(O(),1),dY=(0,ls.createContext)(null);function uY({client:e,children:t}){return(0,fY.jsx)(dY.Provider,{value:e,children:t})}function Bk(){let e=(0,ls.useContext)(dY);if(!e)throw new Error("useRpc needs an RpcProvider");return e}var jye={ask:()=>Promise.resolve(void 0)};function cl(e,t){let r=Bk(),n=Qm(),o=e.live!==void 0,i=JSON.stringify(t??{}),[a,s]=(0,ls.useState)(null),l=hT({queryKey:[e.id,i],queryFn:()=>r.call(e.id,t,jye),enabled:!o});(0,ls.useEffect)(()=>{if(o)return r.subscribe(e.id,JSON.parse(i),d=>{s(null),n.setQueryData([e.id,i],d)},s)},[r,n,e.id,i,o]);let c=a??l.error;return{data:l.data,error:c,pending:l.data===void 0&&!c}}function Uk(){let e=Bk(),t=Qm();return(0,ls.useCallback)(async(r,n={},o={})=>{let i=Kc(r.op),a="op-"+Date.now(),s=[],l=!1;try{let c=await e.call(r.op,{...r.input,...n},{progress:f=>{let m={id:a,title:r.label,message:f,loading:!0,autoClose:!1};l?en.update(m):en.show(m),l=!0},log:f=>s.push(f),ask:f=>cY(f,s.splice(0))}),d=i?.text?.(c)??"Done.",u={id:a,title:o.inline?void 0:r.label,message:d,color:"green",loading:!1,autoClose:i?.keepResult?!1:o.inline?2500:5e3};return l?en.update(u):en.show(u),{ok:!0,text:d,output:c}}catch(c){if(l&&en.hide(a),c instanceof Kx)return{ok:!1,cancelled:!0,message:"Cancelled."};let d=c instanceof Error?c.message:"It did not work.",u=c.fix??(s.length?s.join(" "):void 0);return o.inline||en.show({title:d,message:u,color:"red",autoClose:1e4}),{ok:!1,message:d,fix:u}}finally{await t.invalidateQueries()}},[e,t])}var cn=y(D(),1);var Vk=y(D(),1);function Uye(e){if(!/^[0-9a-zA-Z-]+$/.test(e))throw new Error(`[@mantine/use-form] Form name "${e}" is invalid, it should contain only letters, numbers and dashes`)}var Vye=typeof window<"u"?Vk.useLayoutEffect:Vk.useEffect;function wo(e,t){Vye(()=>{if(e)return window.addEventListener(e,t),()=>window.removeEventListener(e,t)},[e])}function mY(e,t){e&&Uye(e),wo(`mantine-form:${e}:set-field-value`,r=>t.setFieldValue(r.detail.path,r.detail.value)),wo(`mantine-form:${e}:set-values`,r=>t.setValues(r.detail)),wo(`mantine-form:${e}:set-initial-values`,r=>t.setInitialValues(r.detail)),wo(`mantine-form:${e}:set-errors`,r=>t.setErrors(r.detail)),wo(`mantine-form:${e}:set-field-error`,r=>t.setFieldError(r.detail.path,r.detail.error)),wo(`mantine-form:${e}:clear-field-error`,r=>t.clearFieldError(r.detail)),wo(`mantine-form:${e}:clear-errors`,t.clearErrors),wo(`mantine-form:${e}:reset`,t.reset),wo(`mantine-form:${e}:validate`,t.validate),wo(`mantine-form:${e}:validate-field`,r=>t.validateField(r.detail)),wo(`mantine-form:${e}:reorder-list-item`,r=>t.reorderListItem(r.detail.path,r.detail.payload)),wo(`mantine-form:${e}:remove-list-item`,r=>t.removeListItem(r.detail.path,r.detail.index)),wo(`mantine-form:${e}:insert-list-item`,r=>t.insertListItem(r.detail.path,r.detail.item,r.detail.index)),wo(`mantine-form:${e}:set-dirty`,r=>t.setDirty(r.detail)),wo(`mantine-form:${e}:set-touched`,r=>t.setTouched(r.detail)),wo(`mantine-form:${e}:reset-dirty`,r=>t.resetDirty(r.detail)),wo(`mantine-form:${e}:reset-touched`,t.resetTouched)}function pY(e){return t=>{if(!t)e(t);else if(typeof t=="function")e(t);else if(typeof t=="object"&&"nativeEvent"in t){let{currentTarget:r}=t;r instanceof HTMLInputElement?r.type==="checkbox"?e(r.checked):e(r.value):(r instanceof HTMLTextAreaElement||r instanceof HTMLSelectElement)&&e(r.value)}else e(t)}}var dl=y(D(),1);function vb(e){return e===null||typeof e!="object"?{}:Object.keys(e).reduce((t,r)=>{let n=e[r];return n!=null&&n!==!1&&(t[r]=n),t},{})}function hY(e){let[t,r]=(0,dl.useState)(vb(e)),n=(0,dl.useRef)(t),o=(0,dl.useCallback)(l=>{r(c=>{let d=vb(typeof l=="function"?l(c):l);return n.current=d,d})},[]),i=(0,dl.useCallback)(()=>o({}),[]),a=(0,dl.useCallback)(l=>{n.current[l]!==void 0&&o(c=>{let d={...c};return delete d[l],d})},[t]),s=(0,dl.useCallback)((l,c)=>{c==null||c===!1?a(l):n.current[l]!==c&&o(d=>({...d,[l]:c}))},[t]);return{errorsState:t,setErrors:o,clearErrors:i,setFieldError:s,clearFieldError:a}}var bb=y(D(),1);function xb(e,t){if(t===null||typeof t!="object")return{};let r={...t};return Object.keys(t).forEach(n=>{n.includes(`${String(e)}.`)&&delete r[n]}),r}function gY(e,t){let r=e.substring(t.length+1).split(".")[0];return parseInt(r,10)}function t3(e,t,r,n){if(t===void 0)return r;let o=`${String(e)}`,i=r;n===-1&&(i=xb(`${o}.${t}`,i));let a={...i},s=new Set;return Object.entries(i).filter(([l])=>{if(!l.startsWith(`${o}.`))return!1;let c=gY(l,o);return Number.isNaN(c)?!1:c>=t}).forEach(([l,c])=>{let d=gY(l,o),u=l.replace(`${o}.${d}`,`${o}.${d+n}`);a[u]=c,s.add(u),s.has(l)||delete a[l]}),a}function vY(e,{from:t,to:r},n){let o=`${e}.${t}`,i=`${e}.${r}`,a={...n},s=new Set;return Object.keys(n).forEach(l=>{if(s.has(l))return;let c,d;if(l.startsWith(o)?(c=l,d=l.replace(o,i)):l.startsWith(i)&&(c=l.replace(i,o),d=l),c&&d){let u=a[c],f=a[d];f===void 0?delete a[c]:a[c]=f,u===void 0?delete a[d]:a[d]=u,s.add(c),s.add(d)}}),a}function xY(e,t,r){typeof r.value=="object"&&(r.value=Xu(r.value)),!r.enumerable||r.get||r.set||!r.configurable||!r.writable||t==="__proto__"?Object.defineProperty(e,t,r):e[t]=r.value}function Xu(e){if(typeof e!="object")return e;var t=0,r,n,o,i=Object.prototype.toString.call(e);if(i==="[object Object]"?o=Object.create(e.__proto__||null):i==="[object Array]"?o=Array(e.length):i==="[object Set]"?(o=new Set,e.forEach(function(a){o.add(Xu(a))})):i==="[object Map]"?(o=new Map,e.forEach(function(a,s){o.set(Xu(s),Xu(a))})):i==="[object Date]"?o=new Date(+e):i==="[object RegExp]"?o=new RegExp(e.source,e.flags):i==="[object DataView]"?o=new e.constructor(Xu(e.buffer)):i==="[object ArrayBuffer]"?o=e.slice(0):i.slice(-6)==="Array]"&&(o=new e.constructor(e)),o){for(n=Object.getOwnPropertySymbols(e);t<n.length;t++)xY(o,n[t],Object.getOwnPropertyDescriptor(e,n[t]));for(t=0,n=Object.getOwnPropertyNames(e);t<n.length;t++)Object.hasOwnProperty.call(o,r=n[t])&&o[r]===e[r]||xY(o,r,Object.getOwnPropertyDescriptor(e,r))}return o||e}function Hk(e){return typeof e!="string"?[]:e.split(".")}function jt(e,t){let r=Hk(e);if(r.length===0||typeof t!="object"||t===null)return;let n=t[r[0]];for(let o=1;o<r.length&&n!=null;o+=1)n=n[r[o]];return n}function cs(e,t,r){let n=Hk(e);if(n.length===0)return r;let o=Xu(r);if(n.length===1)return o[n[0]]=t,o;let i=o[n[0]];for(let a=1;a<n.length-1;a+=1){if(i===void 0)return o;i=i[n[a]]}return i[n[n.length-1]]=t,o}function bY(e,{from:t,to:r},n){let o=jt(e,n);if(!Array.isArray(o))return n;let i=[...o],a=o[t];return i.splice(t,1),i.splice(r,0,a),cs(e,i,n)}function yY(e,t,r,n){let o=jt(e,n);if(!Array.isArray(o))return n;let i=[...o];return i.splice(typeof r=="number"?r:i.length,0,t),cs(e,i,n)}function _Y(e,t,r){let n=jt(e,r);return Array.isArray(n)?cs(e,n.filter((o,i)=>i!==t),r):r}function IY(e,t,r,n){let o=jt(e,n);if(!Array.isArray(o)||o.length<=r)return n;let i=[...o];return i[r]=t,cs(e,i,n)}function wY({$values:e,$errors:t,$status:r}){let n=(0,bb.useCallback)((s,l)=>{r.clearFieldDirty(s),t.setErrors(c=>vY(s,l,c)),e.setValues({values:bY(s,l,e.refValues.current),updateState:!0})},[]),o=(0,bb.useCallback)((s,l)=>{r.clearFieldDirty(s),t.setErrors(c=>t3(s,l,c,-1)),e.setValues({values:_Y(s,l,e.refValues.current),updateState:!0})},[]),i=(0,bb.useCallback)((s,l,c)=>{r.clearFieldDirty(s),t.setErrors(d=>t3(s,c,d,1)),e.setValues({values:yY(s,l,c,e.refValues.current),updateState:!0})},[]),a=(0,bb.useCallback)((s,l,c)=>{r.clearFieldDirty(s),e.setValues({values:IY(s,c,l,e.refValues.current),updateState:!0})},[]);return{reorderListItem:n,removeListItem:o,insertListItem:i,replaceListItem:a}}var jr=y(D(),1),yb=y(kY(),1);function fh(e,t){let r=Object.keys(e);if(typeof t=="string"){let n=r.filter(o=>o.startsWith(`${t}.`));return e[t]||n.some(o=>e[o])||!1}return r.some(n=>e[n])}function CY({initialDirty:e,initialTouched:t,mode:r,$values:n}){let[o,i]=(0,jr.useState)(t),[a,s]=(0,jr.useState)(e),l=(0,jr.useRef)(t),c=(0,jr.useRef)(e),d=(0,jr.useCallback)(w=>{let P=typeof w=="function"?w(l.current):w;l.current=P,r==="controlled"&&i(P)},[]),u=(0,jr.useCallback)((w,P=!1)=>{let $=typeof w=="function"?w(c.current):w;c.current=$,(r==="controlled"||P)&&s($)},[]),f=(0,jr.useCallback)(()=>d({}),[]),m=(0,jr.useCallback)(w=>{let P=w?{...n.refValues.current,...w}:n.refValues.current;n.setValuesSnapshot(P),u({})},[]),p=(0,jr.useCallback)((w,P)=>{d($=>fh($,w)===P?$:{...$,[w]:P})},[]),g=(0,jr.useCallback)((w,P,$)=>{u(B=>fh(B,w)===P?B:{...B,[w]:P},$)},[]),b=(0,jr.useCallback)((w,P)=>{let $=fh(c.current,w),B=!(0,yb.default)(jt(w,n.getValuesSnapshot()),P),W=xb(w,c.current);W[w]=B,u(W,$!==B)},[]),v=(0,jr.useCallback)(w=>fh(l.current,w),[]),x=(0,jr.useCallback)(w=>u(P=>{if(typeof w!="string")return P;let $=xb(w,P);return delete $[w],(0,yb.default)($,P)?P:$}),[]),_=(0,jr.useCallback)(w=>{if(w){let $=jt(w,c.current);if(typeof $=="boolean")return $;let B=jt(w,n.refValues.current),W=jt(w,n.valuesSnapshot.current);return!(0,yb.default)(B,W)}return Object.keys(c.current).length>0?fh(c.current):!(0,yb.default)(n.refValues.current,n.valuesSnapshot.current)},[]),I=(0,jr.useCallback)(()=>c.current,[]),S=(0,jr.useCallback)(()=>l.current,[]);return{touchedState:o,dirtyState:a,touchedRef:l,dirtyRef:c,setTouched:d,setDirty:u,resetDirty:m,resetTouched:f,isTouched:v,setFieldTouched:p,setFieldDirty:g,setTouchedState:i,setDirtyState:s,clearFieldDirty:x,isDirty:_,getDirty:I,getTouched:S,setCalculatedFieldDirty:b}}var zn=y(D(),1);function PY({initialValues:e,onValuesChange:t,mode:r}){let n=(0,zn.useRef)(!1),[o,i]=(0,zn.useState)(e||{}),a=(0,zn.useRef)(o),s=(0,zn.useRef)(o),l=(0,zn.useCallback)(({values:g,subscribers:b,updateState:v=!0,mergeWithPreviousValues:x=!0})=>{let _=a.current,I=g instanceof Function?g(a.current):g,S=x?{..._,...I}:I;a.current=S,v&&i(S),t?.(S,_),b?.filter(Boolean).forEach(w=>w({updatedValues:S,previousValues:_}))},[t]),c=(0,zn.useCallback)(g=>{let b=jt(g.path,a.current),v=g.value instanceof Function?g.value(b):g.value;if(b!==v){let x=a.current,_=cs(g.path,v,a.current);l({values:_,updateState:g.updateState}),g.subscribers?.filter(Boolean).forEach(I=>I({path:g.path,updatedValues:_,previousValues:x}))}},[l]),d=(0,zn.useCallback)(g=>{s.current=g},[]),u=(0,zn.useCallback)((g,b)=>{n.current||(n.current=!0,l({values:g,updateState:r==="controlled"}),d(g),b())},[l]),f=(0,zn.useCallback)(()=>{l({values:s.current,updateState:!0,mergeWithPreviousValues:!1})},[l]),m=(0,zn.useCallback)(()=>a.current,[]),p=(0,zn.useCallback)(()=>s.current,[]);return{initialized:n,stateValues:o,refValues:a,valuesSnapshot:s,setValues:l,setFieldValue:c,resetValues:f,setValuesSnapshot:d,initialize:u,getValues:m,getValuesSnapshot:p}}var Qu=y(D(),1);function DY({$status:e}){let t=(0,Qu.useRef)({}),r=(0,Qu.useCallback)((o,i)=>{(0,Qu.useEffect)(()=>(t.current[o]=t.current[o]||[],t.current[o].push(i),()=>{t.current[o]=t.current[o].filter(a=>a!==i)}),[i])},[]),n=(0,Qu.useCallback)(o=>t.current[o]?t.current[o].map(i=>a=>i({previousValue:jt(o,a.previousValues),value:jt(o,a.updatedValues),touched:e.isTouched(o),dirty:e.isDirty(o)})):[],[]);return{subscribers:t,watch:r,getFieldSubscribers:n}}function r3(e,t){return e?`${e}-${t.toString()}`:t.toString()}var Wk=Symbol("root-rule");function RY(e){let t=vb(e);return{hasErrors:Object.keys(t).length>0,errors:t}}function o3(e,t,r="",n={}){return typeof e!="object"||e===null?n:Object.keys(e).reduce((o,i)=>{let a=e[i],s=`${r===""?"":`${r}.`}${i}`,l=jt(s,t),c=!1;return typeof a=="function"&&(o[s]=a(l,t,s)),typeof a=="object"&&Array.isArray(l)&&(c=!0,l.forEach((d,u)=>o3(a,t,`${s}.${u}`,o)),Wk in a&&(o[s]=a[Wk](l,t,s))),typeof a=="object"&&typeof l=="object"&&l!==null&&(c||o3(a,t,s,o),Wk in a&&(o[s]=a[Wk](l,t,s))),o},n)}function _b(e,t){return RY(typeof e=="function"?e(t):o3(e,t))}function Ib(e,t,r){if(typeof e!="string")return{hasError:!1,error:null};let n=_b(t,r),o=Object.keys(n.errors).find(i=>e.split(".").every((a,s)=>a===i.split(".")[s]));return{hasError:!!o,error:o?n.errors[o]:null}}var TY="__MANTINE_FORM_INDEX__";function n3(e,t){return t?typeof t=="boolean"?t:Array.isArray(t)?t.includes(e.replace(/[.][0-9]+/g,`.${TY}`)):!1:!1}function i3({name:e,mode:t="controlled",initialValues:r,initialErrors:n={},initialDirty:o={},initialTouched:i={},clearInputErrorOnChange:a=!0,validateInputOnChange:s=!1,validateInputOnBlur:l=!1,onValuesChange:c,transformValues:d=g=>g,enhanceGetInputProps:u,validate:f,onSubmitPreventDefault:m="always",touchTrigger:p="change"}={}){let g=hY(n),b=PY({initialValues:r,onValuesChange:c,mode:t}),v=CY({initialDirty:o,initialTouched:i,$values:b,mode:t}),x=wY({$values:b,$errors:g,$status:v}),_=DY({$status:v}),[I,S]=(0,cn.useState)(0),[w,P]=(0,cn.useState)({}),[$,B]=(0,cn.useState)(!1),W=(0,cn.useCallback)(()=>{b.resetValues(),g.clearErrors(),v.resetDirty(),v.resetTouched(),t==="uncontrolled"&&S(Q=>Q+1)},[]),H=(0,cn.useCallback)(Q=>{a&&g.clearErrors(),t==="uncontrolled"&&S(ne=>ne+1),Object.keys(_.subscribers.current).forEach(ne=>{let we=jt(ne,b.refValues.current),se=jt(ne,Q);we!==se&&_.getFieldSubscribers(ne).forEach(Ae=>Ae({previousValues:Q,updatedValues:b.refValues.current}))})},[a]),K=(0,cn.useCallback)(Q=>{let ne=b.refValues.current;b.initialize(Q,()=>t==="uncontrolled"&&S(we=>we+1)),H(ne)},[H]),T=(0,cn.useCallback)((Q,ne,we)=>{let se=n3(Q,s),Ae=ne instanceof Function?ne(jt(Q,b.refValues.current)):ne;v.setCalculatedFieldDirty(Q,Ae),p==="change"&&v.setFieldTouched(Q,!0),!se&&a&&g.clearFieldError(Q),b.setFieldValue({path:Q,value:ne,updateState:t==="controlled",subscribers:[..._.getFieldSubscribers(Q),se?We=>{let et=Ib(Q,f,We.updatedValues);et.hasError?g.setFieldError(Q,et.error):g.clearFieldError(Q)}:null,we?.forceUpdate!==!1&&t!=="controlled"?()=>P(We=>({...We,[Q]:(We[Q]||0)+1})):null]})},[c,f]),k=(0,cn.useCallback)(Q=>{let ne=b.refValues.current;b.setValues({values:Q,updateState:t==="controlled"}),H(ne)},[c,H]),E=(0,cn.useCallback)(()=>{let Q=_b(f,b.refValues.current);return g.setErrors(Q.errors),Q},[f]),C=(0,cn.useCallback)(Q=>{let ne=Ib(Q,f,b.refValues.current);return ne.hasError?g.setFieldError(Q,ne.error):g.clearFieldError(Q),ne},[f]),A=(Q,{type:ne="input",withError:we=!0,withFocus:se=!0,...Ae}={})=>{let et={onChange:pY(ct=>T(Q,ct,{forceUpdate:!1})),"data-path":r3(e,Q)};return we&&(et.error=g.errorsState[Q]),ne==="checkbox"?et[t==="controlled"?"checked":"defaultChecked"]=jt(Q,b.refValues.current):et[t==="controlled"?"value":"defaultValue"]=jt(Q,b.refValues.current),se&&(et.onFocus=()=>v.setFieldTouched(Q,!0),et.onBlur=()=>{if(n3(Q,l)){let ct=Ib(Q,f,b.refValues.current);ct.hasError?g.setFieldError(Q,ct.error):g.clearFieldError(Q)}}),Object.assign(et,u?.({inputProps:et,field:Q,options:{type:ne,withError:we,withFocus:se,...Ae},form:he}))},R=(Q,ne)=>we=>{m==="always"&&we?.preventDefault();let se=E();if(se.hasErrors)m==="validation-failed"&&we?.preventDefault(),ne?.(se.errors,b.refValues.current,we);else{let Ae=Q?.(d(b.refValues.current),we);Ae instanceof Promise&&(B(!0),Ae.finally(()=>B(!1)))}},N=Q=>d(Q||b.refValues.current),U=(0,cn.useCallback)(Q=>{Q.preventDefault(),W()},[]),G=(0,cn.useCallback)(Q=>Q?!Ib(Q,f,b.refValues.current).hasError:!_b(f,b.refValues.current).hasErrors,[f]),re=Q=>`${I}-${Q}-${w[Q]||0}`,ve=(0,cn.useCallback)(Q=>document.querySelector(`[data-path="${r3(e,Q)}"]`),[]),he={watch:_.watch,initialized:b.initialized.current,values:b.stateValues,getValues:b.getValues,getInitialValues:b.getValuesSnapshot,setInitialValues:b.setValuesSnapshot,initialize:K,setValues:k,setFieldValue:T,submitting:$,setSubmitting:B,errors:g.errorsState,setErrors:g.setErrors,setFieldError:g.setFieldError,clearFieldError:g.clearFieldError,clearErrors:g.clearErrors,resetDirty:v.resetDirty,setTouched:v.setTouched,setDirty:v.setDirty,isTouched:v.isTouched,resetTouched:v.resetTouched,isDirty:v.isDirty,getTouched:v.getTouched,getDirty:v.getDirty,reorderListItem:x.reorderListItem,insertListItem:x.insertListItem,removeListItem:x.removeListItem,replaceListItem:x.replaceListItem,reset:W,validate:E,validateField:C,getInputProps:A,onSubmit:R,onReset:U,isValid:G,getTransformedValues:N,key:re,getInputNode:ve};return mY(e,he),he}function EY(e,t){return r=>{try{return Ip(e,r),{}}catch(n){if(n instanceof ox){let o={};return t?.errorPriority==="first"&&n.issues.reverse(),n.issues.forEach(i=>{o[i.path.join(".")]=i.message}),o}throw n}}}var wb=y(D(),1);var Pe=y(O(),1),Zk="@custom";function $Y(e){return(e.choices??[]).map(t=>({value:String(t.value),label:t.label}))}function AY(e,t){return e.choices?.find(r=>String(r.value)===t)?.value}function Hye({field:e,value:t,onChange:r,error:n}){let o=e.choices?.some(l=>l.value===t)??!1,[i,a]=(0,wb.useState)(!o&&t!==void 0&&e.open!==void 0),s=[...$Y(e),...e.open?[{value:Zk,label:"Custom\u2026"}]:[]];return(0,Pe.jsxs)(Fe,{gap:"xs",children:[(0,Pe.jsx)(la,{label:e.label,description:e.help,data:s,value:i?Zk:o?String(t):null,error:i?void 0:n,allowDeselect:!1,onChange:l=>{a(l===Zk),l!==Zk&&r(AY(e,l))}}),i&&e.open&&(0,Pe.jsx)(Kk,{field:{...e.open,label:"Your own value",help:void 0},value:t,onChange:r,error:n})]})}function Sb({field:e,value:t,onPick:r}){let n=e.pathKind??e.element?.pathKind??"dir";return(0,Pe.jsx)(xt,{label:n==="file"?"Choose a file":"Choose a folder",children:(0,Pe.jsx)(vt,{variant:"default",size:32,"aria-label":"Browse",onClick:()=>{Mk(n,t,e.label).then(o=>o&&r(o))},children:(0,Pe.jsx)(ub,{size:18,stroke:1.6})})})}function OY({field:e,value:t,onChange:r}){let n=t&&typeof t=="object"&&!Array.isArray(t)?t:{};return(0,Pe.jsx)(Fe,{gap:"xs",children:(e.fields??[]).map(o=>(0,Pe.jsx)(Kk,{field:o,value:n[o.name],onChange:i=>{let a={...n};i===void 0||i===""?delete a[o.name]:a[o.name]=i,r(a)}},o.name))})}function Wye({field:e,value:t,onChange:r,error:n}){let o=Array.isArray(t)?t:[],i=e.element,a=s=>r(s);return(0,Pe.jsxs)(Fe,{gap:"xs",children:[(0,Pe.jsxs)("div",{children:[(0,Pe.jsx)(ue,{size:"sm",fw:500,children:e.label}),e.help&&(0,Pe.jsx)(ue,{size:"xs",c:"dimmed",children:e.help})]}),o.length===0&&(0,Pe.jsx)(ue,{size:"sm",c:"dimmed",fs:"italic",children:"None yet."}),o.map((s,l)=>(0,Pe.jsxs)(gr,{padding:"sm",withBorder:!0,children:[(0,Pe.jsxs)(Se,{justify:"space-between",align:"center",mb:6,children:[(0,Pe.jsxs)(ue,{size:"xs",c:"dimmed",fw:500,children:[i.label," ",l+1]}),(0,Pe.jsx)(st,{size:"compact-xs",variant:"subtle",color:"red",leftSection:(0,Pe.jsx)(qu,{size:13}),onClick:()=>a(o.filter((c,d)=>d!==l)),children:"Remove"})]}),(0,Pe.jsx)(OY,{field:i,value:s,onChange:c=>a(o.map((d,u)=>u===l?c:d))})]},l)),(0,Pe.jsx)(Se,{children:(0,Pe.jsx)(st,{size:"xs",variant:"default",leftSection:(0,Pe.jsx)(ll,{size:14}),onClick:()=>a([...o,{}]),children:"Add"})}),n&&(0,Pe.jsx)(ue,{size:"xs",c:"red",children:n})]})}function Zye({field:e,value:t,onChange:r,error:n}){let o=t&&typeof t=="object"&&!Array.isArray(t)?t:{},[i,a]=(0,wb.useState)(()=>Object.entries(o).map(([c,d])=>[c,String(d)])),s=e.element?.kind==="secret",l=c=>{a(c),r(Object.fromEntries(c.filter(([d])=>d.trim()!=="").map(([d,u])=>[d.trim(),u])))};return(0,Pe.jsxs)(Fe,{gap:"xs",children:[(0,Pe.jsxs)("div",{children:[(0,Pe.jsx)(ue,{size:"sm",fw:500,children:e.label}),e.help&&(0,Pe.jsx)(ue,{size:"xs",c:"dimmed",children:e.help})]}),i.map(([c,d],u)=>(0,Pe.jsxs)(Se,{gap:"xs",wrap:"nowrap",align:"center",children:[(0,Pe.jsx)(Pt,{placeholder:"NAME",value:c,style:{flex:"0 0 38%"},styles:{input:{fontFamily:"var(--mantine-font-family-monospace)"}},onChange:f=>l(i.map((m,p)=>p===u?[f.currentTarget.value,m[1]]:m))}),s?(0,Pe.jsx)(gc,{placeholder:"value",value:d,style:{flex:1},autoComplete:"off",onChange:f=>l(i.map((m,p)=>p===u?[m[0],f.currentTarget.value]:m))}):(0,Pe.jsx)(Pt,{placeholder:"value",value:d,style:{flex:1},onChange:f=>l(i.map((m,p)=>p===u?[m[0],f.currentTarget.value]:m))}),(0,Pe.jsx)(xt,{label:"Remove",children:(0,Pe.jsx)(vt,{color:"red","aria-label":"Remove",onClick:()=>l(i.filter((f,m)=>m!==u)),children:(0,Pe.jsx)(qu,{size:15})})})]},u)),(0,Pe.jsx)(Se,{children:(0,Pe.jsx)(st,{size:"xs",variant:"default",leftSection:(0,Pe.jsx)(ll,{size:14}),onClick:()=>a([...i,["",""]]),children:"Add"})}),n&&(0,Pe.jsx)(ue,{size:"xs",c:"red",children:n})]})}function Gk({field:e,value:t,onChange:r,error:n}){let[o,i]=(0,wb.useState)(t===void 0?"":JSON.stringify(t,null,2)),[a,s]=(0,wb.useState)();return(0,Pe.jsx)(gv,{label:e.label,description:e.help,value:o,error:a??n,formatOnBlur:!0,autosize:!0,minRows:3,onChange:l=>{i(l);try{r(l.trim()===""?void 0:JSON.parse(l)),s(void 0)}catch{s("This is not valid JSON yet.")}}})}function Kk(e){let{field:t,value:r,onChange:n,error:o}=e,i={label:t.label,description:t.help,error:o};switch(t.kind){case"boolean":return(0,Pe.jsx)(Ga,{label:t.label,description:t.help,checked:r===!0,error:o,onChange:a=>n(a.currentTarget.checked)});case"enum":return(0,Pe.jsx)(Hye,{...e});case"number":return(0,Pe.jsx)(nu,{...i,value:typeof r=="number"?r:"",min:t.min,max:t.max,allowDecimal:!t.integer,placeholder:t.range,onChange:a=>n(typeof a=="number"?a:void 0)});case"secret":return(0,Pe.jsx)(gc,{...i,value:typeof r=="string"?r:"",placeholder:"Type a new value",autoComplete:"off",onChange:a=>n(a.currentTarget.value)});case"path":return(0,Pe.jsxs)(Se,{gap:"xs",align:"flex-end",wrap:"nowrap",children:[(0,Pe.jsx)(Pt,{...i,style:{flex:1},styles:{input:{fontFamily:"var(--mantine-font-family-monospace)"}},placeholder:t.literals?.length?t.literals.join(" or ")+", or a path":"C:\\\u2026",value:typeof r=="string"?r:"",onChange:a=>n(a.currentTarget.value)}),(0,Pe.jsx)(Sb,{field:t,value:typeof r=="string"?r:void 0,onPick:n})]});case"text":return(0,Pe.jsx)(Pt,{...i,value:typeof r=="string"?r:"",onChange:a=>n(a.currentTarget.value)});case"list":{let a=Array.isArray(r)?r.map(s=>String(s)):[];return t.element?.kind==="enum"?(0,Pe.jsx)(tu,{...i,data:$Y(t.element),value:a,onChange:s=>n(s.map(l=>AY(t.element,l)??l))}):t.element?.kind==="path"?(0,Pe.jsxs)(Se,{gap:"xs",align:"flex-end",wrap:"nowrap",children:[(0,Pe.jsx)(_c,{...i,style:{flex:1},value:a,onChange:n,clearable:!0}),(0,Pe.jsx)(Sb,{field:t,value:void 0,onPick:s=>n(a.includes(s)?a:[...a,s])})]}):t.element?.kind==="text"?(0,Pe.jsx)(_c,{...i,value:a,onChange:n,clearable:!0}):t.element?.kind==="object"&&t.element.fields?.length?(0,Pe.jsx)(Wye,{...e}):(0,Pe.jsx)(Gk,{...e})}case"object":return t.fields?.length?(0,Pe.jsx)(OY,{...e}):(0,Pe.jsx)(Gk,{...e});case"map":return t.element?.kind==="text"||t.element?.kind==="secret"?(0,Pe.jsx)(Zye,{...e}):(0,Pe.jsx)(Gk,{...e});default:return(0,Pe.jsx)(Gk,{...e})}}var ul=y(O(),1);function Gye(e){let t=Kc(e.op)?.input,r=(e.fields??[]).map(o=>o.name);if(!(t instanceof h.ZodObject)||!r.length)return;let n=t.shape;return h.object(Object.fromEntries(r.filter(o=>n[o]).map(o=>[o,n[o]])))}function Kye({action:e,submit:t,cancel:r}){let n=e.fields??[],o=Gye(e),i=o?EY(o):void 0,a=i3({mode:"controlled",initialValues:{...e.initial},validate:s=>{let l={};for(let c of n){let d=j1(c,s[c.name]);d&&(l[c.name]=d)}return{...i?i(s):{},...l}}});return(0,ul.jsx)("form",{onSubmit:a.onSubmit(t),children:(0,ul.jsxs)(Fe,{gap:"md",children:[n.map(s=>(0,ul.jsx)(Kk,{field:s,value:a.values[s.name],error:a.errors[s.name],onChange:l=>a.setFieldValue(s.name,l)},s.name)),(0,ul.jsxs)(Se,{justify:"flex-end",children:[(0,ul.jsx)(st,{variant:"default",onClick:r,children:"Cancel"}),(0,ul.jsx)(st,{type:"submit",color:e.danger?"red":void 0,children:"Save"})]})]})})}function qk(e){return new Promise(t=>{let r=!1,n=a=>{r||(r=!0,Ka.close(i),t(a))},o=e.fields??[],i=Ka.open({title:o.length===1?o[0].label:e.label,centered:!0,onClose:()=>n(void 0),children:(0,ul.jsx)(Kye,{action:e,submit:n,cancel:()=>n(void 0)})})})}var No=y(O(),1),qye={attach:Ei,open:Ei,start:Hz,stop:Wz,restart:Fk,reopen:Fk,reset:Zz,make:qz,remove:qu,delete:qu,edit:hb,change:hb,show:Nz,hide:zz,add:ll,new:ll,forget:uh,include:Ez,exclude:Tz,rename:hb,use:Pz,save:cb,choose:Bz,close:uh};function Xye(e){let t=e?.session;return typeof t=="string"?t:void 0}function a3(e){let t=(e.verb??e.label).split(/\s+/)[0].toLowerCase();return qye[t]}function Xk(e){return e.kind==="operation"&&e.danger===!0}function $i(e){return e!==void 0&&!(e.kind==="link"&&e.target.kind==="command")&&rY(e)}function Yu(){let e=Uk();return(0,zY.useCallback)(async t=>{if(t.kind==="operation"){let n=t.fields?.length?await qk(t):{};if(!n)return;let o=await e(t,n),i=o.ok?Kc(t.op)?.opens?.(o.output):void 0;return i?.kind==="terminal"&&Er("/s/"+i.session),o}let r=t.target;if(r.kind==="terminal")Er("/s/"+r.session);else if(r.kind==="start-agent"){let n={kind:"operation",op:"agents.start",label:"Start "+r.agent,input:{agent:r.agent}},o=await e(n),i=o.ok?Xye(o.output):void 0;return i&&Er("/s/"+i),o}else r.kind==="view"&&Er(Io(r.view,r.params))},[e])}function fl({action:e,primary:t=!1,...r}){let n=Yu();if(!$i(e))return null;let o=Xk(e),i=a3(e),a=(0,No.jsx)(st,{variant:t?"filled":o?"light":"default",color:o?"red":void 0,leftSection:i?(0,No.jsx)(i,{size:16,stroke:1.8}):void 0,onClick:s=>{s.stopPropagation(),n(e)},...r,children:e.label});return e.description?(0,No.jsx)(xt,{label:e.description,children:a}):a}function NY({action:e}){let t=Yu();if(!$i(e))return null;let r=a3(e);return r?(0,No.jsx)(xt,{label:e.label,children:(0,No.jsx)(vt,{"aria-label":e.label,color:Xk(e)?"red":"gray",onClick:n=>{n.stopPropagation(),t(e)},children:(0,No.jsx)(r,{size:16,stroke:1.7})})}):(0,No.jsx)(st,{size:"compact-xs",variant:"subtle",color:Xk(e)?"red":"gray",onClick:n=>{n.stopPropagation(),t(e)},children:e.label})}function FY({actions:e}){let t=Yu(),r=e.filter($i);return r.length?(0,No.jsxs)(Jr,{position:"bottom-end",children:[(0,No.jsx)(Jr.Target,{children:(0,No.jsx)(vt,{"aria-label":"More actions",onClick:n=>n.stopPropagation(),children:(0,No.jsx)(Oz,{size:16})})}),(0,No.jsx)(Jr.Dropdown,{children:r.map((n,o)=>{let i=a3(n);return(0,No.jsx)(Jr.Item,{color:Xk(n)?"red":void 0,leftSection:i?(0,No.jsx)(i,{size:15}):void 0,onClick:()=>{t(n)},children:n.label},o)})})]}):null}var Qk=y(O(),1),Yk={Agents:Gz,Sessions:Ei,Sandbox:dh,Apps:Sz,Settings:Kz,Accounts:e3,Maintenance:Jz},Qye={project:db,folder:fb,database:$z,session:Ei,pwsh:Ei,powershell:Ei,cmd:Ei},Yye={claude:"orange",codex:"dark",gemini:"blue",opencode:"gray",qwen:"violet",crush:"pink",copilot:"teal",kilo:"yellow",amp:"red",cline:"cyan",continue:"grape",kimi:"indigo",aider:"green",deepseek:"blue",reasonix:"lime"};function Ju({name:e,size:t=36}){let r=Qye[e];return r?(0,Qk.jsx)(eu,{size:t,radius:"md",color:"indigo",variant:"light",children:(0,Qk.jsx)(r,{size:t*.55,stroke:1.6})}):(0,Qk.jsx)(eu,{size:t,radius:"md",color:Yye[e]??"indigo",variant:"filled",fw:700,children:e.slice(0,1).toUpperCase()})}var Jye=2,e_e=1,LY=class{activate(e){this._terminal=e}dispose(){}fit(){let e=this.proposeDimensions();if(!e||!this._terminal||isNaN(e.cols)||isNaN(e.rows))return;let t=this._terminal._core;(this._terminal.rows!==e.rows||this._terminal.cols!==e.cols)&&(t._renderService.clear(),this._terminal.resize(e.cols,e.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let e=this._terminal._core._renderService.dimensions;if(e.css.cell.width===0||e.css.cell.height===0)return;let t=this._terminal.options.scrollback===0?0:this._terminal.options.overviewRuler?.width||14,r=window.getComputedStyle(this._terminal.element.parentElement),n=parseInt(r.getPropertyValue("height")),o=Math.max(0,parseInt(r.getPropertyValue("width"))),i=window.getComputedStyle(this._terminal.element),a={top:parseInt(i.getPropertyValue("padding-top")),bottom:parseInt(i.getPropertyValue("padding-bottom")),right:parseInt(i.getPropertyValue("padding-right")),left:parseInt(i.getPropertyValue("padding-left"))},s=a.top+a.bottom,l=a.right+a.left,c=n-s,d=o-l-t;return{cols:Math.max(Jye,Math.floor(d/e.css.cell.width)),rows:Math.max(e_e,Math.floor(c/e.css.cell.height))}}};var t_e=class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?MY.isErrorNoTelemetry(e)?new MY(e.message+`
|
|
132
|
+
|
|
133
|
+
`+e.stack):new Error(e.message+`
|
|
134
|
+
|
|
135
|
+
`+e.stack):e},0)}}addListener(e){return this.listeners.push(e),()=>{this._removeListener(e)}}emit(e){this.listeners.forEach(t=>{t(e)})}_removeListener(e){this.listeners.splice(this.listeners.indexOf(e),1)}setUnexpectedErrorHandler(e){this.unexpectedErrorHandler=e}getUnexpectedErrorHandler(){return this.unexpectedErrorHandler}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}},r_e=new t_e;function s3(e){o_e(e)||r_e.onUnexpectedError(e)}var d3="Canceled";function o_e(e){return e instanceof n_e?!0:e instanceof Error&&e.name===d3&&e.message===d3}var n_e=class extends Error{constructor(){super(d3),this.name=this.message}},MY=class u3 extends Error{constructor(t){super(t),this.name="CodeExpectedError"}static fromError(t){if(t instanceof u3)return t;let r=new u3;return r.message=t.message,r.stack=t.stack,r}static isErrorNoTelemetry(t){return t.name==="CodeExpectedError"}};function i_e(e,t,r=0,n=e.length){let o=r,i=n;for(;o<i;){let a=Math.floor((o+i)/2);t(e[a])?o=a+1:i=a}return o-1}var a_e=class QY{constructor(t){this._array=t,this._findLastMonotonousLastIdx=0}findLastMonotonous(t){if(QY.assertInvariants){if(this._prevFindLastPredicate){for(let n of this._array)if(this._prevFindLastPredicate(n)&&!t(n))throw new Error("MonotonousArray: current predicate must be weaker than (or equal to) the previous predicate.")}this._prevFindLastPredicate=t}let r=i_e(this._array,t,this._findLastMonotonousLastIdx);return this._findLastMonotonousLastIdx=r+1,r===-1?void 0:this._array[r]}};a_e.assertInvariants=!1;var f3;(e=>{function t(i){return i<0}e.isLessThan=t;function r(i){return i<=0}e.isLessThanOrEqual=r;function n(i){return i>0}e.isGreaterThan=n;function o(i){return i===0}e.isNeitherLessOrGreaterThan=o,e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0})(f3||(f3={}));function s_e(e,t){return(r,n)=>t(e(r),e(n))}var l_e=(e,t)=>e-t,BY=class m3{constructor(t){this.iterate=t}forEach(t){this.iterate(r=>(t(r),!0))}toArray(){let t=[];return this.iterate(r=>(t.push(r),!0)),t}filter(t){return new m3(r=>this.iterate(n=>t(n)?r(n):!0))}map(t){return new m3(r=>this.iterate(n=>r(t(n))))}some(t){let r=!1;return this.iterate(n=>(r=t(n),!r)),r}findFirst(t){let r;return this.iterate(n=>t(n)?(r=n,!1):!0),r}findLast(t){let r;return this.iterate(n=>(t(n)&&(r=n),!0)),r}findLastMaxBy(t){let r,n=!0;return this.iterate(o=>((n||f3.isGreaterThan(t(o,r)))&&(n=!1,r=o),!0)),r}};BY.empty=new BY(e=>{});function c_e(e,t){let r=Object.create(null);for(let n of e){let o=t(n),i=r[o];i||(i=r[o]=[]),i.push(n)}return r}var jY,UY,f_t=class{constructor(e,t){this.toKey=t,this._map=new Map,this[jY]="SetWithKey";for(let r of e)this.add(r)}get size(){return this._map.size}add(e){let t=this.toKey(e);return this._map.set(t,e),this}delete(e){return this._map.delete(this.toKey(e))}has(e){return this._map.has(this.toKey(e))}*entries(){for(let e of this._map.values())yield[e,e]}keys(){return this.values()}*values(){for(let e of this._map.values())yield e}clear(){this._map.clear()}forEach(e,t){this._map.forEach(r=>e.call(t,r,r,this))}[(UY=Symbol.iterator,jY=Symbol.toStringTag,UY)](){return this.values()}},d_e=class{constructor(){this.map=new Map}add(e,t){let r=this.map.get(e);r||(r=new Set,this.map.set(e,r)),r.add(t)}delete(e,t){let r=this.map.get(e);r&&(r.delete(t),r.size===0&&this.map.delete(e))}forEach(e,t){let r=this.map.get(e);r&&r.forEach(t)}get(e){return this.map.get(e)||new Set}};function u_e(e,t){let r=this,n=!1,o;return function(){if(n)return o;if(n=!0,t)try{o=e.apply(r,arguments)}finally{t()}else o=e.apply(r,arguments);return o}}var p3;(e=>{function t(I){return I&&typeof I=="object"&&typeof I[Symbol.iterator]=="function"}e.is=t;let r=Object.freeze([]);function n(){return r}e.empty=n;function*o(I){yield I}e.single=o;function i(I){return t(I)?I:o(I)}e.wrap=i;function a(I){return I||r}e.from=a;function*s(I){for(let S=I.length-1;S>=0;S--)yield I[S]}e.reverse=s;function l(I){return!I||I[Symbol.iterator]().next().done===!0}e.isEmpty=l;function c(I){return I[Symbol.iterator]().next().value}e.first=c;function d(I,S){let w=0;for(let P of I)if(S(P,w++))return!0;return!1}e.some=d;function u(I,S){for(let w of I)if(S(w))return w}e.find=u;function*f(I,S){for(let w of I)S(w)&&(yield w)}e.filter=f;function*m(I,S){let w=0;for(let P of I)yield S(P,w++)}e.map=m;function*p(I,S){let w=0;for(let P of I)yield*S(P,w++)}e.flatMap=p;function*g(...I){for(let S of I)yield*S}e.concat=g;function b(I,S,w){let P=w;for(let $ of I)P=S(P,$);return P}e.reduce=b;function*v(I,S,w=I.length){for(S<0&&(S+=I.length),w<0?w+=I.length:w>I.length&&(w=I.length);S<w;S++)yield I[S]}e.slice=v;function x(I,S=Number.POSITIVE_INFINITY){let w=[];if(S===0)return[w,I];let P=I[Symbol.iterator]();for(let $=0;$<S;$++){let B=P.next();if(B.done)return[w,e.empty()];w.push(B.value)}return[w,{[Symbol.iterator](){return P}}]}e.consume=x;async function _(I){let S=[];for await(let w of I)S.push(w);return Promise.resolve(S)}e.asyncToArray=_})(p3||(p3={}));var f_e=!1,ph=null,m_e=class YY{constructor(){this.livingDisposables=new Map}getDisposableData(t){let r=this.livingDisposables.get(t);return r||(r={parent:null,source:null,isSingleton:!1,value:t,idx:YY.idx++},this.livingDisposables.set(t,r)),r}trackDisposable(t){let r=this.getDisposableData(t);r.source||(r.source=new Error().stack)}setParent(t,r){let n=this.getDisposableData(t);n.parent=r}markAsDisposed(t){this.livingDisposables.delete(t)}markAsSingleton(t){this.getDisposableData(t).isSingleton=!0}getRootParent(t,r){let n=r.get(t);if(n)return n;let o=t.parent?this.getRootParent(this.getDisposableData(t.parent),r):t;return r.set(t,o),o}getTrackedDisposables(){let t=new Map;return[...this.livingDisposables.entries()].filter(([,r])=>r.source!==null&&!this.getRootParent(r,t).isSingleton).flatMap(([r])=>r)}computeLeakingDisposables(t=10,r){let n;if(r)n=r;else{let l=new Map,c=[...this.livingDisposables.values()].filter(u=>u.source!==null&&!this.getRootParent(u,l).isSingleton);if(c.length===0)return;let d=new Set(c.map(u=>u.value));if(n=c.filter(u=>!(u.parent&&d.has(u.parent))),n.length===0)throw new Error("There are cyclic diposable chains!")}if(!n)return;function o(l){function c(u,f){for(;u.length>0&&f.some(m=>typeof m=="string"?m===u[0]:u[0].match(m));)u.shift()}let d=l.source.split(`
|
|
136
|
+
`).map(u=>u.trim().replace("at ","")).filter(u=>u!=="");return c(d,["Error",/^trackDisposable \(.*\)$/,/^DisposableTracker.trackDisposable \(.*\)$/]),d.reverse()}let i=new d_e;for(let l of n){let c=o(l);for(let d=0;d<=c.length;d++)i.add(c.slice(0,d).join(`
|
|
137
|
+
`),l)}n.sort(s_e(l=>l.idx,l_e));let a="",s=0;for(let l of n.slice(0,t)){s++;let c=o(l),d=[];for(let u=0;u<c.length;u++){let f=c[u];f=`(shared with ${i.get(c.slice(0,u+1).join(`
|
|
138
|
+
`)).size}/${n.length} leaks) at ${f}`;let m=i.get(c.slice(0,u).join(`
|
|
139
|
+
`)),p=c_e([...m].map(g=>o(g)[u]),g=>g);delete p[c[u]];for(let[g,b]of Object.entries(p))d.unshift(` - stacktraces of ${b.length} other leaks continue with ${g}`);d.unshift(f)}a+=`
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
==================== Leaking disposable ${s}/${n.length}: ${l.value.constructor.name} ====================
|
|
143
|
+
${d.join(`
|
|
144
|
+
`)}
|
|
145
|
+
============================================================
|
|
146
|
+
|
|
147
|
+
`}return n.length>t&&(a+=`
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
... and ${n.length-t} more leaking disposables
|
|
151
|
+
|
|
152
|
+
`),{leaks:n,details:a}}};m_e.idx=0;function p_e(e){ph=e}if(f_e){let e="__is_disposable_tracked__";p_e(new class{trackDisposable(t){let r=new Error("Potentially leaked disposable").stack;setTimeout(()=>{t[e]||console.log(r)},3e3)}setParent(t,r){if(t&&t!==us.None)try{t[e]=!0}catch{}}markAsDisposed(t){if(t&&t!==us.None)try{t[e]=!0}catch{}}markAsSingleton(t){}})}function aC(e){return ph?.trackDisposable(e),e}function sC(e){ph?.markAsDisposed(e)}function Cb(e,t){ph?.setParent(e,t)}function h_e(e,t){if(ph)for(let r of e)ph.setParent(r,t)}function kb(e){if(p3.is(e)){let t=[];for(let r of e)if(r)try{r.dispose()}catch(n){t.push(n)}if(t.length===1)throw t[0];if(t.length>1)throw new AggregateError(t,"Encountered errors while disposing of store");return Array.isArray(e)?[]:e}else if(e)return e.dispose(),e}function JY(...e){let t=hh(()=>kb(e));return h_e(e,t),t}function hh(e){let t=aC({dispose:u_e(()=>{sC(t),e()})});return t}var eJ=class tJ{constructor(){this._toDispose=new Set,this._isDisposed=!1,aC(this)}dispose(){this._isDisposed||(sC(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{kb(this._toDispose)}finally{this._toDispose.clear()}}add(t){if(!t)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return Cb(t,this),this._isDisposed?tJ.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(t),t}delete(t){if(t){if(t===this)throw new Error("Cannot dispose a disposable on itself!");this._toDispose.delete(t),t.dispose()}}deleteAndLeak(t){t&&this._toDispose.has(t)&&(this._toDispose.delete(t),Cb(t,null))}};eJ.DISABLE_DISPOSED_WARNING=!1;var _3=eJ,us=class{constructor(){this._store=new _3,aC(this),Cb(this._store,this)}dispose(){sC(this),this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}};us.None=Object.freeze({dispose(){}});var nC=class{constructor(){this._isDisposed=!1,aC(this)}get value(){return this._isDisposed?void 0:this._value}set value(e){this._isDisposed||e===this._value||(this._value?.dispose(),e&&Cb(e,this),this._value=e)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,sC(this),this._value?.dispose(),this._value=void 0}clearAndLeak(){let e=this._value;return this._value=void 0,e&&Cb(e,null),e}},VY=class h3{constructor(t){this.element=t,this.next=h3.Undefined,this.prev=h3.Undefined}};VY.Undefined=new VY(void 0);var g_e=globalThis.performance&&typeof globalThis.performance.now=="function",v_e=class rJ{static create(t){return new rJ(t)}constructor(t){this._now=g_e&&t===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}},x_e=!1,HY=!1,b_e=!1,iC;(e=>{e.None=()=>us.None;function t(T){if(b_e){let{onDidAddListener:k}=T,E=x3.create(),C=0;T.onDidAddListener=()=>{++C===2&&(console.warn("snapshotted emitter LIKELY used public and SHOULD HAVE BEEN created with DisposableStore. snapshotted here"),E.print()),k?.()}}}function r(T,k){return f(T,()=>{},0,void 0,!0,void 0,k)}e.defer=r;function n(T){return(k,E=null,C)=>{let A=!1,R;return R=T(N=>{if(!A)return R?R.dispose():A=!0,k.call(E,N)},null,C),A&&R.dispose(),R}}e.once=n;function o(T,k,E){return d((C,A=null,R)=>T(N=>C.call(A,k(N)),null,R),E)}e.map=o;function i(T,k,E){return d((C,A=null,R)=>T(N=>{k(N),C.call(A,N)},null,R),E)}e.forEach=i;function a(T,k,E){return d((C,A=null,R)=>T(N=>k(N)&&C.call(A,N),null,R),E)}e.filter=a;function s(T){return T}e.signal=s;function l(...T){return(k,E=null,C)=>{let A=JY(...T.map(R=>R(N=>k.call(E,N))));return u(A,C)}}e.any=l;function c(T,k,E,C){let A=E;return o(T,R=>(A=k(A,R),A),C)}e.reduce=c;function d(T,k){let E,C={onWillAddFirstListener(){E=T(A.fire,A)},onDidRemoveLastListener(){E?.dispose()}};k||t(C);let A=new ds(C);return k?.add(A),A.event}function u(T,k){return k instanceof Array?k.push(T):k&&k.add(T),T}function f(T,k,E=100,C=!1,A=!1,R,N){let U,G,re,ve=0,he,Q={leakWarningThreshold:R,onWillAddFirstListener(){U=T(we=>{ve++,G=k(G,we),C&&!re&&(ne.fire(G),G=void 0),he=()=>{let se=G;G=void 0,re=void 0,(!C||ve>1)&&ne.fire(se),ve=0},typeof E=="number"?(clearTimeout(re),re=setTimeout(he,E)):re===void 0&&(re=0,queueMicrotask(he))})},onWillRemoveListener(){A&&ve>0&&he?.()},onDidRemoveLastListener(){he=void 0,U.dispose()}};N||t(Q);let ne=new ds(Q);return N?.add(ne),ne.event}e.debounce=f;function m(T,k=0,E){return e.debounce(T,(C,A)=>C?(C.push(A),C):[A],k,void 0,!0,void 0,E)}e.accumulate=m;function p(T,k=(C,A)=>C===A,E){let C=!0,A;return a(T,R=>{let N=C||!k(R,A);return C=!1,A=R,N},E)}e.latch=p;function g(T,k,E){return[e.filter(T,k,E),e.filter(T,C=>!k(C),E)]}e.split=g;function b(T,k=!1,E=[],C){let A=E.slice(),R=T(G=>{A?A.push(G):U.fire(G)});C&&C.add(R);let N=()=>{A?.forEach(G=>U.fire(G)),A=null},U=new ds({onWillAddFirstListener(){R||(R=T(G=>U.fire(G)),C&&C.add(R))},onDidAddFirstListener(){A&&(k?setTimeout(N):N())},onDidRemoveLastListener(){R&&R.dispose(),R=null}});return C&&C.add(U),U.event}e.buffer=b;function v(T,k){return(E,C,A)=>{let R=k(new _);return T(function(N){let U=R.evaluate(N);U!==x&&E.call(C,U)},void 0,A)}}e.chain=v;let x=Symbol("HaltChainable");class _{constructor(){this.steps=[]}map(k){return this.steps.push(k),this}forEach(k){return this.steps.push(E=>(k(E),E)),this}filter(k){return this.steps.push(E=>k(E)?E:x),this}reduce(k,E){let C=E;return this.steps.push(A=>(C=k(C,A),C)),this}latch(k=(E,C)=>E===C){let E=!0,C;return this.steps.push(A=>{let R=E||!k(A,C);return E=!1,C=A,R?A:x}),this}evaluate(k){for(let E of this.steps)if(k=E(k),k===x)break;return k}}function I(T,k,E=C=>C){let C=(...U)=>N.fire(E(...U)),A=()=>T.on(k,C),R=()=>T.removeListener(k,C),N=new ds({onWillAddFirstListener:A,onDidRemoveLastListener:R});return N.event}e.fromNodeEventEmitter=I;function S(T,k,E=C=>C){let C=(...U)=>N.fire(E(...U)),A=()=>T.addEventListener(k,C),R=()=>T.removeEventListener(k,C),N=new ds({onWillAddFirstListener:A,onDidRemoveLastListener:R});return N.event}e.fromDOMEventEmitter=S;function w(T){return new Promise(k=>n(T)(k))}e.toPromise=w;function P(T){let k=new ds;return T.then(E=>{k.fire(E)},()=>{k.fire(void 0)}).finally(()=>{k.dispose()}),k.event}e.fromPromise=P;function $(T,k){return T(E=>k.fire(E))}e.forward=$;function B(T,k,E){return k(E),T(C=>k(C))}e.runAndSubscribe=B;class W{constructor(k,E){this._observable=k,this._counter=0,this._hasChanged=!1;let C={onWillAddFirstListener:()=>{k.addObserver(this)},onDidRemoveLastListener:()=>{k.removeObserver(this)}};E||t(C),this.emitter=new ds(C),E&&E.add(this.emitter)}beginUpdate(k){this._counter++}handlePossibleChange(k){}handleChange(k,E){this._hasChanged=!0}endUpdate(k){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function H(T,k){return new W(T,k).emitter.event}e.fromObservable=H;function K(T){return(k,E,C)=>{let A=0,R=!1,N={beginUpdate(){A++},endUpdate(){A--,A===0&&(T.reportChanges(),R&&(R=!1,k.call(E)))},handlePossibleChange(){},handleChange(){R=!0}};T.addObserver(N),T.reportChanges();let U={dispose(){T.removeObserver(N)}};return C instanceof _3?C.add(U):Array.isArray(C)&&C.push(U),U}}e.fromObservableLight=K})(iC||(iC={}));var g3=class v3{constructor(t){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${t}_${v3._idPool++}`,v3.all.add(this)}start(t){this._stopWatch=new v_e,this.listenerCount=t}stop(){if(this._stopWatch){let t=this._stopWatch.elapsed();this.durations.push(t),this.elapsedOverall+=t,this.invocationCount+=1,this._stopWatch=void 0}}};g3.all=new Set,g3._idPool=0;var y_e=g3,WY=-1,oJ=class nJ{constructor(t,r,n=(nJ._idPool++).toString(16).padStart(3,"0")){this._errorHandler=t,this.threshold=r,this.name=n,this._warnCountdown=0}dispose(){this._stacks?.clear()}check(t,r){let n=this.threshold;if(n<=0||r<n)return;this._stacks||(this._stacks=new Map);let o=this._stacks.get(t.value)||0;if(this._stacks.set(t.value,o+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=n*.5;let[i,a]=this.getMostFrequentStack(),s=`[${this.name}] potential listener LEAK detected, having ${r} listeners already. MOST frequent listener (${a}):`;console.warn(s),console.warn(i);let l=new I_e(s,i);this._errorHandler(l)}return()=>{let i=this._stacks.get(t.value)||0;this._stacks.set(t.value,i-1)}}getMostFrequentStack(){if(!this._stacks)return;let t,r=0;for(let[n,o]of this._stacks)(!t||r<o)&&(t=[n,o],r=o);return t}};oJ._idPool=1;var __e=oJ,x3=class iJ{constructor(t){this.value=t}static create(){let t=new Error;return new iJ(t.stack??"")}print(){console.warn(this.value.split(`
|
|
153
|
+
`).slice(2).join(`
|
|
154
|
+
`))}},I_e=class extends Error{constructor(e,t){super(e),this.name="ListenerLeakError",this.stack=t}},w_e=class extends Error{constructor(e,t){super(e),this.name="ListenerRefusalError",this.stack=t}},S_e=0,eC=class{constructor(e){this.value=e,this.id=S_e++}},k_e=2,C_e=(e,t)=>{if(e instanceof eC)t(e);else for(let r=0;r<e.length;r++){let n=e[r];n&&t(n)}},tC;if(x_e){let e=[];setInterval(()=>{e.length!==0&&(console.warn("[LEAKING LISTENERS] GC'ed these listeners that were NOT yet disposed:"),console.warn(e.join(`
|
|
155
|
+
`)),e.length=0)},3e3),tC=new FinalizationRegistry(t=>{typeof t=="string"&&e.push(t)})}var ds=class{constructor(e){this._size=0,this._options=e,this._leakageMon=WY>0||this._options?.leakWarningThreshold?new __e(e?.onListenerError??s3,this._options?.leakWarningThreshold??WY):void 0,this._perfMon=this._options?._profName?new y_e(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){if(!this._disposed){if(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners){if(HY){let e=this._listeners;queueMicrotask(()=>{C_e(e,t=>t.stack?.print())})}this._listeners=void 0,this._size=0}this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose()}}get event(){return this._event??(this._event=(e,t,r)=>{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){let s=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(s);let l=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],c=new w_e(`${s}. HINT: Stack shows most frequent listener (${l[1]}-times)`,l[0]);return(this._options?.onListenerError||s3)(c),us.None}if(this._disposed)return us.None;t&&(e=e.bind(t));let n=new eC(e),o,i;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(n.stack=x3.create(),o=this._leakageMon.check(n.stack,this._size+1)),HY&&(n.stack=i??x3.create()),this._listeners?this._listeners instanceof eC?(this._deliveryQueue??(this._deliveryQueue=new P_e),this._listeners=[this._listeners,n]):this._listeners.push(n):(this._options?.onWillAddFirstListener?.(this),this._listeners=n,this._options?.onDidAddFirstListener?.(this)),this._size++;let a=hh(()=>{tC?.unregister(a),o?.(),this._removeListener(n)});if(r instanceof _3?r.add(a):Array.isArray(r)&&r.push(a),tC){let s=new Error().stack.split(`
|
|
156
|
+
`).slice(2,3).join(`
|
|
157
|
+
`).trim(),l=/(file:|vscode-file:\/\/vscode-app)?(\/[^:]*:\d+:\d+)/.exec(s);tC.register(a,l?.[2]??s,a)}return a}),this._event}_removeListener(e){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}let t=this._listeners,r=t.indexOf(e);if(r===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,t[r]=void 0;let n=this._deliveryQueue.current===this;if(this._size*k_e<=t.length){let o=0;for(let i=0;i<t.length;i++)t[i]?t[o++]=t[i]:n&&(this._deliveryQueue.end--,o<this._deliveryQueue.i&&this._deliveryQueue.i--);t.length=o}}_deliver(e,t){if(!e)return;let r=this._options?.onListenerError||s3;if(!r){e.value(t);return}try{e.value(t)}catch(n){r(n)}}_deliverQueue(e){let t=e.current._listeners;for(;e.i<e.end;)this._deliver(t[e.i++],e.value);e.reset()}fire(e){if(this._deliveryQueue?.current&&(this._deliverQueue(this._deliveryQueue),this._perfMon?.stop()),this._perfMon?.start(this._size),this._listeners)if(this._listeners instanceof eC)this._deliver(this._listeners,e);else{let t=this._deliveryQueue;t.enqueue(this,e,this._listeners.length),this._deliverQueue(t)}this._perfMon?.stop()}hasListeners(){return this._size>0}},P_e=class{constructor(){this.i=-1,this.end=0}enqueue(e,t,r){this.i=0,this.end=r,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}},aJ=Object.freeze(function(e,t){let r=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(r)}}}),ZY;(e=>{function t(r){return r===e.None||r===e.Cancelled||r instanceof D_e?!0:!r||typeof r!="object"?!1:typeof r.isCancellationRequested=="boolean"&&typeof r.onCancellationRequested=="function"}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:iC.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:aJ})})(ZY||(ZY={}));var D_e=class{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?aJ:(this._emitter||(this._emitter=new ds),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}},mh="en",b3=!1,y3=!1,rC=!1,R_e=!1,T_e=!1,sJ=!1,E_e=!1,$_e=!1,A_e=!1,O_e=!1,Jk,oC=mh,GY=mh,z_e,ml,pl=globalThis,Yn;typeof pl.vscode<"u"&&typeof pl.vscode.process<"u"?Yn=pl.vscode.process:typeof process<"u"&&typeof process?.versions?.node=="string"&&(Yn=process);var lJ=typeof Yn?.versions?.electron=="string",N_e=lJ&&Yn?.type==="renderer";if(typeof Yn=="object"){b3=Yn.platform==="win32",y3=Yn.platform==="darwin",rC=Yn.platform==="linux",R_e=rC&&!!Yn.env.SNAP&&!!Yn.env.SNAP_REVISION,E_e=lJ,A_e=!!Yn.env.CI||!!Yn.env.BUILD_ARTIFACTSTAGINGDIRECTORY,Jk=mh,oC=mh;let e=Yn.env.VSCODE_NLS_CONFIG;if(e)try{let t=JSON.parse(e);Jk=t.userLocale,GY=t.osLocale,oC=t.resolvedLanguage||mh,z_e=t.languagePack?.translationsConfigFile}catch{}T_e=!0}else typeof navigator=="object"&&!N_e?(ml=navigator.userAgent,b3=ml.indexOf("Windows")>=0,y3=ml.indexOf("Macintosh")>=0,$_e=(ml.indexOf("Macintosh")>=0||ml.indexOf("iPad")>=0||ml.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,rC=ml.indexOf("Linux")>=0,O_e=ml?.indexOf("Mobi")>=0,sJ=!0,oC=globalThis._VSCODE_NLS_LANGUAGE||mh,Jk=navigator.language.toLowerCase(),GY=Jk):console.error("Unable to resolve platform.");var l3=0;y3?l3=1:b3?l3=3:rC&&(l3=2);var F_e=sJ&&typeof pl.importScripts=="function",m_t=F_e?pl.origin:void 0,fs=ml,qc=oC,KY;(e=>{function t(){return qc}e.value=t;function r(){return qc.length===2?qc==="en":qc.length>=3?qc[0]==="e"&&qc[1]==="n"&&qc[2]==="-":!1}e.isDefaultVariant=r;function n(){return qc==="en"}e.isDefault=n})(KY||(KY={}));var L_e=typeof pl.postMessage=="function"&&!pl.importScripts,M_e=(()=>{if(L_e){let e=[];pl.addEventListener("message",r=>{if(r.data&&r.data.vscodeScheduleAsyncWork)for(let n=0,o=e.length;n<o;n++){let i=e[n];if(i.id===r.data.vscodeScheduleAsyncWork){e.splice(n,1),i.callback();return}}});let t=0;return r=>{let n=++t;e.push({id:n,callback:r}),pl.postMessage({vscodeScheduleAsyncWork:n},"*")}}return e=>setTimeout(e)})(),B_e=!!(fs&&fs.indexOf("Chrome")>=0),p_t=!!(fs&&fs.indexOf("Firefox")>=0),h_t=!!(!B_e&&fs&&fs.indexOf("Safari")>=0),g_t=!!(fs&&fs.indexOf("Edg/")>=0),v_t=!!(fs&&fs.indexOf("Android")>=0);function cJ(e,t=0,r){let n=setTimeout(()=>{e(),r&&o.dispose()},t),o=hh(()=>{clearTimeout(n),r?.deleteAndLeak(o)});return r?.add(o),o}var j_e,c3;(function(){typeof globalThis.requestIdleCallback!="function"||typeof globalThis.cancelIdleCallback!="function"?c3=(e,t)=>{M_e(()=>{if(r)return;let n=Date.now()+15;t(Object.freeze({didTimeout:!0,timeRemaining(){return Math.max(0,n-Date.now())}}))});let r=!1;return{dispose(){r||(r=!0)}}}:c3=(e,t,r)=>{let n=e.requestIdleCallback(t,typeof r=="number"?{timeout:r}:void 0),o=!1;return{dispose(){o||(o=!0,e.cancelIdleCallback(n))}}},j_e=e=>c3(globalThis,e)})();var qY;(e=>{async function t(n){let o,i=await Promise.all(n.map(a=>a.then(s=>s,s=>{o||(o=s)})));if(typeof o<"u")throw o;return i}e.settled=t;function r(n){return new Promise(async(o,i)=>{try{await n(o,i)}catch(a){i(a)}})}e.withAsyncBody=r})(qY||(qY={}));var XY=class Ai{static fromArray(t){return new Ai(r=>{r.emitMany(t)})}static fromPromise(t){return new Ai(async r=>{r.emitMany(await t)})}static fromPromises(t){return new Ai(async r=>{await Promise.all(t.map(async n=>r.emitOne(await n)))})}static merge(t){return new Ai(async r=>{await Promise.all(t.map(async n=>{for await(let o of n)r.emitOne(o)}))})}constructor(t,r){this._state=0,this._results=[],this._error=null,this._onReturn=r,this._onStateChanged=new ds,queueMicrotask(async()=>{let n={emitOne:o=>this.emitOne(o),emitMany:o=>this.emitMany(o),reject:o=>this.reject(o)};try{await Promise.resolve(t(n)),this.resolve()}catch(o){this.reject(o)}finally{n.emitOne=void 0,n.emitMany=void 0,n.reject=void 0}})}[Symbol.asyncIterator](){let t=0;return{next:async()=>{do{if(this._state===2)throw this._error;if(t<this._results.length)return{done:!1,value:this._results[t++]};if(this._state===1)return{done:!0,value:void 0};await iC.toPromise(this._onStateChanged.event)}while(!0)},return:async()=>(this._onReturn?.(),{done:!0,value:void 0})}}static map(t,r){return new Ai(async n=>{for await(let o of t)n.emitOne(r(o))})}map(t){return Ai.map(this,t)}static filter(t,r){return new Ai(async n=>{for await(let o of t)r(o)&&n.emitOne(o)})}filter(t){return Ai.filter(this,t)}static coalesce(t){return Ai.filter(t,r=>!!r)}coalesce(){return Ai.coalesce(this)}static async toPromise(t){let r=[];for await(let n of t)r.push(n);return r}toPromise(){return Ai.toPromise(this)}emitOne(t){this._state===0&&(this._results.push(t),this._onStateChanged.fire())}emitMany(t){this._state===0&&(this._results=this._results.concat(t),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(t){this._state===0&&(this._state=2,this._error=t,this._onStateChanged.fire())}};XY.EMPTY=XY.fromArray([]);var U_e=class extends us{constructor(e){super(),this._terminal=e,this._linesCacheTimeout=this._register(new nC),this._linesCacheDisposables=this._register(new nC),this._register(hh(()=>this._destroyLinesCache()))}initLinesCache(){this._linesCache||(this._linesCache=new Array(this._terminal.buffer.active.length),this._linesCacheDisposables.value=JY(this._terminal.onLineFeed(()=>this._destroyLinesCache()),this._terminal.onCursorMove(()=>this._destroyLinesCache()),this._terminal.onResize(()=>this._destroyLinesCache()))),this._linesCacheTimeout.value=cJ(()=>this._destroyLinesCache(),15e3)}_destroyLinesCache(){this._linesCache=void 0,this._linesCacheDisposables.clear(),this._linesCacheTimeout.clear()}getLineFromCache(e){return this._linesCache?.[e]}setLineInCache(e,t){this._linesCache&&(this._linesCache[e]=t)}translateBufferLineToStringWithWrap(e,t){let r=[],n=[0],o=this._terminal.buffer.active.getLine(e);for(;o;){let i=this._terminal.buffer.active.getLine(e+1),a=i?i.isWrapped:!1,s=o.translateToString(!a&&t);if(a&&i){let l=o.getCell(o.length-1);l&&l.getCode()===0&&l.getWidth()===1&&i.getCell(0)?.getWidth()===2&&(s=s.slice(0,-1))}if(r.push(s),a)n.push(n[n.length-1]+s.length);else break;e++,o=i}return[r.join(""),n]}},V_e=class{get cachedSearchTerm(){return this._cachedSearchTerm}set cachedSearchTerm(e){this._cachedSearchTerm=e}get lastSearchOptions(){return this._lastSearchOptions}set lastSearchOptions(e){this._lastSearchOptions=e}isValidSearchTerm(e){return!!(e&&e.length>0)}didOptionsChange(e){return this._lastSearchOptions?e?this._lastSearchOptions.caseSensitive!==e.caseSensitive||this._lastSearchOptions.regex!==e.regex||this._lastSearchOptions.wholeWord!==e.wholeWord:!1:!0}shouldUpdateHighlighting(e,t){return t?.decorations?this._cachedSearchTerm===void 0||e!==this._cachedSearchTerm||this.didOptionsChange(t):!1}clearCachedTerm(){this._cachedSearchTerm=void 0}reset(){this._cachedSearchTerm=void 0,this._lastSearchOptions=void 0}},H_e=class{constructor(e,t){this._terminal=e,this._lineCache=t}find(e,t,r,n){if(!e||e.length===0){this._terminal.clearSelection();return}if(r>this._terminal.cols)throw new Error(`Invalid col: ${r} to search in terminal of ${this._terminal.cols} cols`);this._lineCache.initLinesCache();let o={startRow:t,startCol:r},i=this._findInLine(e,o,n);if(!i)for(let a=t+1;a<this._terminal.buffer.active.baseY+this._terminal.rows&&(o.startRow=a,o.startCol=0,i=this._findInLine(e,o,n),!i);a++);return i}findNextWithSelection(e,t,r){if(!e||e.length===0){this._terminal.clearSelection();return}let n=this._terminal.getSelectionPosition();this._terminal.clearSelection();let o=0,i=0;n&&(r===e?(o=n.end.x,i=n.end.y):(o=n.start.x,i=n.start.y)),this._lineCache.initLinesCache();let a={startRow:i,startCol:o},s=this._findInLine(e,a,t);if(!s)for(let l=i+1;l<this._terminal.buffer.active.baseY+this._terminal.rows&&(a.startRow=l,a.startCol=0,s=this._findInLine(e,a,t),!s);l++);if(!s&&i!==0)for(let l=0;l<i&&(a.startRow=l,a.startCol=0,s=this._findInLine(e,a,t),!s);l++);return!s&&n&&(a.startRow=n.start.y,a.startCol=0,s=this._findInLine(e,a,t)),s}findPreviousWithSelection(e,t,r){if(!e||e.length===0){this._terminal.clearSelection();return}let n=this._terminal.getSelectionPosition();this._terminal.clearSelection();let o=this._terminal.buffer.active.baseY+this._terminal.rows-1,i=this._terminal.cols,a=!0;this._lineCache.initLinesCache();let s={startRow:o,startCol:i},l;if(n&&(s.startRow=o=n.start.y,s.startCol=i=n.start.x,r!==e&&(l=this._findInLine(e,s,t,!1),l||(s.startRow=o=n.end.y,s.startCol=i=n.end.x))),l||(l=this._findInLine(e,s,t,a)),!l){s.startCol=Math.max(s.startCol,this._terminal.cols);for(let c=o-1;c>=0&&(s.startRow=c,l=this._findInLine(e,s,t,a),!l);c--);}if(!l&&o!==this._terminal.buffer.active.baseY+this._terminal.rows-1)for(let c=this._terminal.buffer.active.baseY+this._terminal.rows-1;c>=o&&(s.startRow=c,l=this._findInLine(e,s,t,a),!l);c--);return l}_isWholeWord(e,t,r){return(e===0||" ~!@#$%^&*()+`-=[]{}|\\;:\"',./<>?".includes(t[e-1]))&&(e+r.length===t.length||" ~!@#$%^&*()+`-=[]{}|\\;:\"',./<>?".includes(t[e+r.length]))}_findInLine(e,t,r={},n=!1){let o=t.startRow,i=t.startCol;if(this._terminal.buffer.active.getLine(o)?.isWrapped){if(n){t.startCol+=this._terminal.cols;return}return t.startRow--,t.startCol+=this._terminal.cols,this._findInLine(e,t,r)}let a=this._lineCache.getLineFromCache(o);a||(a=this._lineCache.translateBufferLineToStringWithWrap(o,!0),this._lineCache.setLineInCache(o,a));let[s,l]=a,c=this._bufferColsToStringOffset(o,i),d=e,u=s;r.regex||(d=r.caseSensitive?e:e.toLowerCase(),u=r.caseSensitive?s:s.toLowerCase());let f=-1;if(r.regex){let m=RegExp(d,r.caseSensitive?"g":"gi"),p;if(n)for(;p=m.exec(u.slice(0,c));)f=m.lastIndex-p[0].length,e=p[0],m.lastIndex-=e.length-1;else p=m.exec(u.slice(c)),p&&p[0].length>0&&(f=c+(m.lastIndex-p[0].length),e=p[0])}else n?c-d.length>=0&&(f=u.lastIndexOf(d,c-d.length)):f=u.indexOf(d,c);if(f>=0){if(r.wholeWord&&!this._isWholeWord(f,u,e))return;let m=0;for(;m<l.length-1&&f>=l[m+1];)m++;let p=m;for(;p<l.length-1&&f+e.length>=l[p+1];)p++;let g=f-l[m],b=f+e.length-l[p],v=this._stringLengthToBufferSize(o+m,g),x=this._stringLengthToBufferSize(o+p,b)-v+this._terminal.cols*(p-m);return{term:e,col:v,row:o+m,size:x}}}_stringLengthToBufferSize(e,t){let r=this._terminal.buffer.active.getLine(e);if(!r)return 0;for(let n=0;n<t;n++){let o=r.getCell(n);if(!o)break;let i=o.getChars();i.length>1&&(t-=i.length-1);let a=r.getCell(n+1);a&&a.getWidth()===0&&t++}return t}_bufferColsToStringOffset(e,t){let r=e,n=0,o=this._terminal.buffer.active.getLine(r);for(;t>0&&o;){for(let i=0;i<t&&i<this._terminal.cols;i++){let a=o.getCell(i);if(!a)break;a.getWidth()&&(n+=a.getCode()===0?1:a.getChars().length)}if(r++,o=this._terminal.buffer.active.getLine(r),o&&!o.isWrapped)break;t-=this._terminal.cols}return n}},W_e=class extends us{constructor(e){super(),this._terminal=e,this._highlightDecorations=[],this._highlightedLines=new Set,this._register(hh(()=>this.clearHighlightDecorations()))}createHighlightDecorations(e,t){this.clearHighlightDecorations();for(let r of e){let n=this._createResultDecorations(r,t,!1);if(n)for(let o of n)this._storeDecoration(o,r)}}createActiveDecoration(e,t){let r=this._createResultDecorations(e,t,!0);if(r)return{decorations:r,match:e,dispose(){kb(r)}}}clearHighlightDecorations(){kb(this._highlightDecorations),this._highlightDecorations=[],this._highlightedLines.clear()}_storeDecoration(e,t){this._highlightedLines.add(e.marker.line),this._highlightDecorations.push({decoration:e,match:t,dispose(){e.dispose()}})}_applyStyles(e,t,r){e.classList.contains("xterm-find-result-decoration")||(e.classList.add("xterm-find-result-decoration"),t&&(e.style.outline=`1px solid ${t}`)),r&&e.classList.add("xterm-find-active-result-decoration")}_createResultDecorations(e,t,r){let n=[],o=e.col,i=e.size,a=-this._terminal.buffer.active.baseY-this._terminal.buffer.active.cursorY+e.row;for(;i>0;){let l=Math.min(this._terminal.cols-o,i);n.push([a,o,l]),o=0,i-=l,a++}let s=[];for(let l of n){let c=this._terminal.registerMarker(l[0]),d=this._terminal.registerDecoration({marker:c,x:l[1],width:l[2],backgroundColor:r?t.activeMatchBackground:t.matchBackground,overviewRulerOptions:this._highlightedLines.has(c.line)?void 0:{color:r?t.activeMatchColorOverviewRuler:t.matchOverviewRuler,position:"center"}});if(d){let u=[];u.push(c),u.push(d.onRender(f=>this._applyStyles(f,r?t.activeMatchBorder:t.matchBorder,!1))),u.push(d.onDispose(()=>kb(u))),s.push(d)}}return s.length===0?void 0:s}},Z_e=class extends us{constructor(){super(...arguments),this._searchResults=[],this._onDidChangeResults=this._register(new ds)}get onDidChangeResults(){return this._onDidChangeResults.event}get searchResults(){return this._searchResults}get selectedDecoration(){return this._selectedDecoration}set selectedDecoration(e){this._selectedDecoration=e}updateResults(e,t){this._searchResults=e.slice(0,t)}clearResults(){this._searchResults=[]}clearSelectedDecoration(){this._selectedDecoration&&(this._selectedDecoration.dispose(),this._selectedDecoration=void 0)}findResultIndex(e){for(let t=0;t<this._searchResults.length;t++){let r=this._searchResults[t];if(r.row===e.row&&r.col===e.col&&r.size===e.size)return t}return-1}fireResultsChanged(e){if(!e)return;let t=-1;this._selectedDecoration&&(t=this.findResultIndex(this._selectedDecoration.match)),this._onDidChangeResults.fire({resultIndex:t,resultCount:this._searchResults.length})}reset(){this.clearSelectedDecoration(),this.clearResults()}},dJ=class extends us{constructor(e){super(),this._highlightTimeout=this._register(new nC),this._lineCache=this._register(new nC),this._state=new V_e,this._resultTracker=this._register(new Z_e),this._highlightLimit=e?.highlightLimit??1e3}get onDidChangeResults(){return this._resultTracker.onDidChangeResults}activate(e){this._terminal=e,this._lineCache.value=new U_e(e),this._engine=new H_e(e,this._lineCache.value),this._decorationManager=new W_e(e),this._register(this._terminal.onWriteParsed(()=>this._updateMatches())),this._register(this._terminal.onResize(()=>this._updateMatches())),this._register(hh(()=>this.clearDecorations()))}_updateMatches(){this._highlightTimeout.clear(),this._state.cachedSearchTerm&&this._state.lastSearchOptions?.decorations&&(this._highlightTimeout.value=cJ(()=>{let e=this._state.cachedSearchTerm;this._state.clearCachedTerm(),this.findPrevious(e,{...this._state.lastSearchOptions,incremental:!0},{noScroll:!0})},200))}clearDecorations(e){this._resultTracker.clearSelectedDecoration(),this._decorationManager?.clearHighlightDecorations(),this._resultTracker.clearResults(),e||this._state.clearCachedTerm()}clearActiveDecoration(){this._resultTracker.clearSelectedDecoration()}findNext(e,t,r){if(!this._terminal||!this._engine)throw new Error("Cannot use addon until it has been loaded");this._state.lastSearchOptions=t,this._state.shouldUpdateHighlighting(e,t)&&this._highlightAllMatches(e,t);let n=this._findNextAndSelect(e,t,r);return this._fireResults(t),this._state.cachedSearchTerm=e,n}_highlightAllMatches(e,t){if(!this._terminal||!this._engine||!this._decorationManager)throw new Error("Cannot use addon until it has been loaded");if(!this._state.isValidSearchTerm(e)){this.clearDecorations();return}this.clearDecorations(!0);let r=[],n,o=this._engine.find(e,0,0,t);for(;o&&(n?.row!==o.row||n?.col!==o.col)&&!(r.length>=this._highlightLimit);)n=o,r.push(n),o=this._engine.find(e,n.col+n.term.length>=this._terminal.cols?n.row+1:n.row,n.col+n.term.length>=this._terminal.cols?0:n.col+1,t);this._resultTracker.updateResults(r,this._highlightLimit),t.decorations&&this._decorationManager.createHighlightDecorations(r,t.decorations)}_findNextAndSelect(e,t,r){if(!this._terminal||!this._engine)return!1;if(!this._state.isValidSearchTerm(e))return this._terminal.clearSelection(),this.clearDecorations(),!1;let n=this._engine.findNextWithSelection(e,t,this._state.cachedSearchTerm);return this._selectResult(n,t?.decorations,r?.noScroll)}findPrevious(e,t,r){if(!this._terminal||!this._engine)throw new Error("Cannot use addon until it has been loaded");this._state.lastSearchOptions=t,this._state.shouldUpdateHighlighting(e,t)&&this._highlightAllMatches(e,t);let n=this._findPreviousAndSelect(e,t,r);return this._fireResults(t),this._state.cachedSearchTerm=e,n}_fireResults(e){this._resultTracker.fireResultsChanged(!!e?.decorations)}_findPreviousAndSelect(e,t,r){if(!this._terminal||!this._engine)return!1;if(!this._state.isValidSearchTerm(e))return this._terminal.clearSelection(),this.clearDecorations(),!1;let n=this._engine.findPreviousWithSelection(e,t,this._state.cachedSearchTerm);return this._selectResult(n,t?.decorations,r?.noScroll)}_selectResult(e,t,r){if(!this._terminal||!this._decorationManager)return!1;if(this._resultTracker.clearSelectedDecoration(),!e)return this._terminal.clearSelection(),!1;if(this._terminal.select(e.col,e.row,e.size),t){let n=this._decorationManager.createActiveDecoration(e,t);n&&(this._resultTracker.selectedDecoration=n)}if(!r&&(e.row>=this._terminal.buffer.active.viewportY+this._terminal.rows||e.row<this._terminal.buffer.active.viewportY)){let n=e.row-this._terminal.buffer.active.viewportY;n-=Math.floor(this._terminal.rows/2),this._terminal.scrollLines(n)}return!0}};var I3=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],G_e=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]],Ur;function K_e(e,t){let r=0,n=t.length-1,o;if(e<t[0][0]||e>t[n][1])return!1;for(;n>=r;)if(o=r+n>>1,e>t[o][1])r=o+1;else if(e<t[o][0])n=o-1;else return!0;return!1}var q_e=class{constructor(){if(this.version="6",!Ur){Ur=new Uint8Array(65536),Ur.fill(1),Ur[0]=0,Ur.fill(0,1,32),Ur.fill(0,127,160),Ur.fill(2,4352,4448),Ur[9001]=2,Ur[9002]=2,Ur.fill(2,11904,42192),Ur[12351]=1,Ur.fill(2,44032,55204),Ur.fill(2,63744,64256),Ur.fill(2,65040,65050),Ur.fill(2,65072,65136),Ur.fill(2,65280,65377),Ur.fill(2,65504,65511);for(let e=0;e<I3.length;++e)Ur.fill(0,I3[e][0],I3[e][1]+1)}}wcwidth(e){return e<32?0:e<127?1:e<65536?Ur[e]:K_e(e,G_e)?0:e>=131072&&e<=196605||e>=196608&&e<=262141?2:1}charProperties(e,t){let r=this.wcwidth(e),n=r===0&&t!==0;if(n){let o=uC.extractWidth(t);o===0?n=!1:o>r&&(r=o)}return uC.createPropertyValue(0,r,n)}},X_e=class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?uJ.isErrorNoTelemetry(e)?new uJ(e.message+`
|
|
158
|
+
|
|
159
|
+
`+e.stack):new Error(e.message+`
|
|
160
|
+
|
|
161
|
+
`+e.stack):e},0)}}addListener(e){return this.listeners.push(e),()=>{this._removeListener(e)}}emit(e){this.listeners.forEach(t=>{t(e)})}_removeListener(e){this.listeners.splice(this.listeners.indexOf(e),1)}setUnexpectedErrorHandler(e){this.unexpectedErrorHandler=e}getUnexpectedErrorHandler(){return this.unexpectedErrorHandler}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}},Q_e=new X_e;function w3(e){Y_e(e)||Q_e.onUnexpectedError(e)}var C3="Canceled";function Y_e(e){return e instanceof J_e?!0:e instanceof Error&&e.name===C3&&e.message===C3}var J_e=class extends Error{constructor(){super(C3),this.name=this.message}},uJ=class P3 extends Error{constructor(t){super(t),this.name="CodeExpectedError"}static fromError(t){if(t instanceof P3)return t;let r=new P3;return r.message=t.message,r.stack=t.stack,r}static isErrorNoTelemetry(t){return t.name==="CodeExpectedError"}};function eIe(e,t){let r=this,n=!1,o;return function(){if(n)return o;if(n=!0,t)try{o=e.apply(r,arguments)}finally{t()}else o=e.apply(r,arguments);return o}}function tIe(e,t,r=0,n=e.length){let o=r,i=n;for(;o<i;){let a=Math.floor((o+i)/2);t(e[a])?o=a+1:i=a}return o-1}var rIe=class yJ{constructor(t){this._array=t,this._findLastMonotonousLastIdx=0}findLastMonotonous(t){if(yJ.assertInvariants){if(this._prevFindLastPredicate){for(let n of this._array)if(this._prevFindLastPredicate(n)&&!t(n))throw new Error("MonotonousArray: current predicate must be weaker than (or equal to) the previous predicate.")}this._prevFindLastPredicate=t}let r=tIe(this._array,t,this._findLastMonotonousLastIdx);return this._findLastMonotonousLastIdx=r+1,r===-1?void 0:this._array[r]}};rIe.assertInvariants=!1;var D3;(e=>{function t(i){return i<0}e.isLessThan=t;function r(i){return i<=0}e.isLessThanOrEqual=r;function n(i){return i>0}e.isGreaterThan=n;function o(i){return i===0}e.isNeitherLessOrGreaterThan=o,e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0})(D3||(D3={}));function oIe(e,t){return(r,n)=>t(e(r),e(n))}var nIe=(e,t)=>e-t,fJ=class R3{constructor(t){this.iterate=t}forEach(t){this.iterate(r=>(t(r),!0))}toArray(){let t=[];return this.iterate(r=>(t.push(r),!0)),t}filter(t){return new R3(r=>this.iterate(n=>t(n)?r(n):!0))}map(t){return new R3(r=>this.iterate(n=>r(t(n))))}some(t){let r=!1;return this.iterate(n=>(r=t(n),!r)),r}findFirst(t){let r;return this.iterate(n=>t(n)?(r=n,!1):!0),r}findLast(t){let r;return this.iterate(n=>(t(n)&&(r=n),!0)),r}findLastMaxBy(t){let r,n=!0;return this.iterate(o=>((n||D3.isGreaterThan(t(o,r)))&&(n=!1,r=o),!0)),r}};fJ.empty=new fJ(e=>{});function iIe(e,t){let r=Object.create(null);for(let n of e){let o=t(n),i=r[o];i||(i=r[o]=[]),i.push(n)}return r}var mJ,pJ,L_t=class{constructor(e,t){this.toKey=t,this._map=new Map,this[mJ]="SetWithKey";for(let r of e)this.add(r)}get size(){return this._map.size}add(e){let t=this.toKey(e);return this._map.set(t,e),this}delete(e){return this._map.delete(this.toKey(e))}has(e){return this._map.has(this.toKey(e))}*entries(){for(let e of this._map.values())yield[e,e]}keys(){return this.values()}*values(){for(let e of this._map.values())yield e}clear(){this._map.clear()}forEach(e,t){this._map.forEach(r=>e.call(t,r,r,this))}[(pJ=Symbol.iterator,mJ=Symbol.toStringTag,pJ)](){return this.values()}},aIe=class{constructor(){this.map=new Map}add(e,t){let r=this.map.get(e);r||(r=new Set,this.map.set(e,r)),r.add(t)}delete(e,t){let r=this.map.get(e);r&&(r.delete(t),r.size===0&&this.map.delete(e))}forEach(e,t){let r=this.map.get(e);r&&r.forEach(t)}get(e){return this.map.get(e)||new Set}},T3;(e=>{function t(I){return I&&typeof I=="object"&&typeof I[Symbol.iterator]=="function"}e.is=t;let r=Object.freeze([]);function n(){return r}e.empty=n;function*o(I){yield I}e.single=o;function i(I){return t(I)?I:o(I)}e.wrap=i;function a(I){return I||r}e.from=a;function*s(I){for(let S=I.length-1;S>=0;S--)yield I[S]}e.reverse=s;function l(I){return!I||I[Symbol.iterator]().next().done===!0}e.isEmpty=l;function c(I){return I[Symbol.iterator]().next().value}e.first=c;function d(I,S){let w=0;for(let P of I)if(S(P,w++))return!0;return!1}e.some=d;function u(I,S){for(let w of I)if(S(w))return w}e.find=u;function*f(I,S){for(let w of I)S(w)&&(yield w)}e.filter=f;function*m(I,S){let w=0;for(let P of I)yield S(P,w++)}e.map=m;function*p(I,S){let w=0;for(let P of I)yield*S(P,w++)}e.flatMap=p;function*g(...I){for(let S of I)yield*S}e.concat=g;function b(I,S,w){let P=w;for(let $ of I)P=S(P,$);return P}e.reduce=b;function*v(I,S,w=I.length){for(S<0&&(S+=I.length),w<0?w+=I.length:w>I.length&&(w=I.length);S<w;S++)yield I[S]}e.slice=v;function x(I,S=Number.POSITIVE_INFINITY){let w=[];if(S===0)return[w,I];let P=I[Symbol.iterator]();for(let $=0;$<S;$++){let B=P.next();if(B.done)return[w,e.empty()];w.push(B.value)}return[w,{[Symbol.iterator](){return P}}]}e.consume=x;async function _(I){let S=[];for await(let w of I)S.push(w);return Promise.resolve(S)}e.asyncToArray=_})(T3||(T3={}));var sIe=!1,gh=null,lIe=class _J{constructor(){this.livingDisposables=new Map}getDisposableData(t){let r=this.livingDisposables.get(t);return r||(r={parent:null,source:null,isSingleton:!1,value:t,idx:_J.idx++},this.livingDisposables.set(t,r)),r}trackDisposable(t){let r=this.getDisposableData(t);r.source||(r.source=new Error().stack)}setParent(t,r){let n=this.getDisposableData(t);n.parent=r}markAsDisposed(t){this.livingDisposables.delete(t)}markAsSingleton(t){this.getDisposableData(t).isSingleton=!0}getRootParent(t,r){let n=r.get(t);if(n)return n;let o=t.parent?this.getRootParent(this.getDisposableData(t.parent),r):t;return r.set(t,o),o}getTrackedDisposables(){let t=new Map;return[...this.livingDisposables.entries()].filter(([,r])=>r.source!==null&&!this.getRootParent(r,t).isSingleton).flatMap(([r])=>r)}computeLeakingDisposables(t=10,r){let n;if(r)n=r;else{let l=new Map,c=[...this.livingDisposables.values()].filter(u=>u.source!==null&&!this.getRootParent(u,l).isSingleton);if(c.length===0)return;let d=new Set(c.map(u=>u.value));if(n=c.filter(u=>!(u.parent&&d.has(u.parent))),n.length===0)throw new Error("There are cyclic diposable chains!")}if(!n)return;function o(l){function c(u,f){for(;u.length>0&&f.some(m=>typeof m=="string"?m===u[0]:u[0].match(m));)u.shift()}let d=l.source.split(`
|
|
162
|
+
`).map(u=>u.trim().replace("at ","")).filter(u=>u!=="");return c(d,["Error",/^trackDisposable \(.*\)$/,/^DisposableTracker.trackDisposable \(.*\)$/]),d.reverse()}let i=new aIe;for(let l of n){let c=o(l);for(let d=0;d<=c.length;d++)i.add(c.slice(0,d).join(`
|
|
163
|
+
`),l)}n.sort(oIe(l=>l.idx,nIe));let a="",s=0;for(let l of n.slice(0,t)){s++;let c=o(l),d=[];for(let u=0;u<c.length;u++){let f=c[u];f=`(shared with ${i.get(c.slice(0,u+1).join(`
|
|
164
|
+
`)).size}/${n.length} leaks) at ${f}`;let m=i.get(c.slice(0,u).join(`
|
|
165
|
+
`)),p=iIe([...m].map(g=>o(g)[u]),g=>g);delete p[c[u]];for(let[g,b]of Object.entries(p))d.unshift(` - stacktraces of ${b.length} other leaks continue with ${g}`);d.unshift(f)}a+=`
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
==================== Leaking disposable ${s}/${n.length}: ${l.value.constructor.name} ====================
|
|
169
|
+
${d.join(`
|
|
170
|
+
`)}
|
|
171
|
+
============================================================
|
|
172
|
+
|
|
173
|
+
`}return n.length>t&&(a+=`
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
... and ${n.length-t} more leaking disposables
|
|
177
|
+
|
|
178
|
+
`),{leaks:n,details:a}}};lIe.idx=0;function cIe(e){gh=e}if(sIe){let e="__is_disposable_tracked__";cIe(new class{trackDisposable(t){let r=new Error("Potentially leaked disposable").stack;setTimeout(()=>{t[e]||console.log(r)},3e3)}setParent(t,r){if(t&&t!==vh.None)try{t[e]=!0}catch{}}markAsDisposed(t){if(t&&t!==vh.None)try{t[e]=!0}catch{}}markAsSingleton(t){}})}function N3(e){return gh?.trackDisposable(e),e}function F3(e){gh?.markAsDisposed(e)}function E3(e,t){gh?.setParent(e,t)}function dIe(e,t){if(gh)for(let r of e)gh.setParent(r,t)}function IJ(e){if(T3.is(e)){let t=[];for(let r of e)if(r)try{r.dispose()}catch(n){t.push(n)}if(t.length===1)throw t[0];if(t.length>1)throw new AggregateError(t,"Encountered errors while disposing of store");return Array.isArray(e)?[]:e}else if(e)return e.dispose(),e}function uIe(...e){let t=wJ(()=>IJ(e));return dIe(e,t),t}function wJ(e){let t=N3({dispose:eIe(()=>{F3(t),e()})});return t}var SJ=class kJ{constructor(){this._toDispose=new Set,this._isDisposed=!1,N3(this)}dispose(){this._isDisposed||(F3(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{IJ(this._toDispose)}finally{this._toDispose.clear()}}add(t){if(!t)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return E3(t,this),this._isDisposed?kJ.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(t),t}delete(t){if(t){if(t===this)throw new Error("Cannot dispose a disposable on itself!");this._toDispose.delete(t),t.dispose()}}deleteAndLeak(t){t&&this._toDispose.has(t)&&(this._toDispose.delete(t),E3(t,null))}};SJ.DISABLE_DISPOSED_WARNING=!1;var L3=SJ,vh=class{constructor(){this._store=new L3,N3(this),E3(this._store,this)}dispose(){F3(this),this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}};vh.None=Object.freeze({dispose(){}});var hJ=class $3{constructor(t){this.element=t,this.next=$3.Undefined,this.prev=$3.Undefined}};hJ.Undefined=new hJ(void 0);var fIe=globalThis.performance&&typeof globalThis.performance.now=="function",mIe=class CJ{static create(t){return new CJ(t)}constructor(t){this._now=fIe&&t===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}},pIe=!1,gJ=!1,hIe=!1,vJ;(e=>{e.None=()=>vh.None;function t(T){if(hIe){let{onDidAddListener:k}=T,E=z3.create(),C=0;T.onDidAddListener=()=>{++C===2&&(console.warn("snapshotted emitter LIKELY used public and SHOULD HAVE BEEN created with DisposableStore. snapshotted here"),E.print()),k?.()}}}function r(T,k){return f(T,()=>{},0,void 0,!0,void 0,k)}e.defer=r;function n(T){return(k,E=null,C)=>{let A=!1,R;return R=T(N=>{if(!A)return R?R.dispose():A=!0,k.call(E,N)},null,C),A&&R.dispose(),R}}e.once=n;function o(T,k,E){return d((C,A=null,R)=>T(N=>C.call(A,k(N)),null,R),E)}e.map=o;function i(T,k,E){return d((C,A=null,R)=>T(N=>{k(N),C.call(A,N)},null,R),E)}e.forEach=i;function a(T,k,E){return d((C,A=null,R)=>T(N=>k(N)&&C.call(A,N),null,R),E)}e.filter=a;function s(T){return T}e.signal=s;function l(...T){return(k,E=null,C)=>{let A=uIe(...T.map(R=>R(N=>k.call(E,N))));return u(A,C)}}e.any=l;function c(T,k,E,C){let A=E;return o(T,R=>(A=k(A,R),A),C)}e.reduce=c;function d(T,k){let E,C={onWillAddFirstListener(){E=T(A.fire,A)},onDidRemoveLastListener(){E?.dispose()}};k||t(C);let A=new Xc(C);return k?.add(A),A.event}function u(T,k){return k instanceof Array?k.push(T):k&&k.add(T),T}function f(T,k,E=100,C=!1,A=!1,R,N){let U,G,re,ve=0,he,Q={leakWarningThreshold:R,onWillAddFirstListener(){U=T(we=>{ve++,G=k(G,we),C&&!re&&(ne.fire(G),G=void 0),he=()=>{let se=G;G=void 0,re=void 0,(!C||ve>1)&&ne.fire(se),ve=0},typeof E=="number"?(clearTimeout(re),re=setTimeout(he,E)):re===void 0&&(re=0,queueMicrotask(he))})},onWillRemoveListener(){A&&ve>0&&he?.()},onDidRemoveLastListener(){he=void 0,U.dispose()}};N||t(Q);let ne=new Xc(Q);return N?.add(ne),ne.event}e.debounce=f;function m(T,k=0,E){return e.debounce(T,(C,A)=>C?(C.push(A),C):[A],k,void 0,!0,void 0,E)}e.accumulate=m;function p(T,k=(C,A)=>C===A,E){let C=!0,A;return a(T,R=>{let N=C||!k(R,A);return C=!1,A=R,N},E)}e.latch=p;function g(T,k,E){return[e.filter(T,k,E),e.filter(T,C=>!k(C),E)]}e.split=g;function b(T,k=!1,E=[],C){let A=E.slice(),R=T(G=>{A?A.push(G):U.fire(G)});C&&C.add(R);let N=()=>{A?.forEach(G=>U.fire(G)),A=null},U=new Xc({onWillAddFirstListener(){R||(R=T(G=>U.fire(G)),C&&C.add(R))},onDidAddFirstListener(){A&&(k?setTimeout(N):N())},onDidRemoveLastListener(){R&&R.dispose(),R=null}});return C&&C.add(U),U.event}e.buffer=b;function v(T,k){return(E,C,A)=>{let R=k(new _);return T(function(N){let U=R.evaluate(N);U!==x&&E.call(C,U)},void 0,A)}}e.chain=v;let x=Symbol("HaltChainable");class _{constructor(){this.steps=[]}map(k){return this.steps.push(k),this}forEach(k){return this.steps.push(E=>(k(E),E)),this}filter(k){return this.steps.push(E=>k(E)?E:x),this}reduce(k,E){let C=E;return this.steps.push(A=>(C=k(C,A),C)),this}latch(k=(E,C)=>E===C){let E=!0,C;return this.steps.push(A=>{let R=E||!k(A,C);return E=!1,C=A,R?A:x}),this}evaluate(k){for(let E of this.steps)if(k=E(k),k===x)break;return k}}function I(T,k,E=C=>C){let C=(...U)=>N.fire(E(...U)),A=()=>T.on(k,C),R=()=>T.removeListener(k,C),N=new Xc({onWillAddFirstListener:A,onDidRemoveLastListener:R});return N.event}e.fromNodeEventEmitter=I;function S(T,k,E=C=>C){let C=(...U)=>N.fire(E(...U)),A=()=>T.addEventListener(k,C),R=()=>T.removeEventListener(k,C),N=new Xc({onWillAddFirstListener:A,onDidRemoveLastListener:R});return N.event}e.fromDOMEventEmitter=S;function w(T){return new Promise(k=>n(T)(k))}e.toPromise=w;function P(T){let k=new Xc;return T.then(E=>{k.fire(E)},()=>{k.fire(void 0)}).finally(()=>{k.dispose()}),k.event}e.fromPromise=P;function $(T,k){return T(E=>k.fire(E))}e.forward=$;function B(T,k,E){return k(E),T(C=>k(C))}e.runAndSubscribe=B;class W{constructor(k,E){this._observable=k,this._counter=0,this._hasChanged=!1;let C={onWillAddFirstListener:()=>{k.addObserver(this)},onDidRemoveLastListener:()=>{k.removeObserver(this)}};E||t(C),this.emitter=new Xc(C),E&&E.add(this.emitter)}beginUpdate(k){this._counter++}handlePossibleChange(k){}handleChange(k,E){this._hasChanged=!0}endUpdate(k){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function H(T,k){return new W(T,k).emitter.event}e.fromObservable=H;function K(T){return(k,E,C)=>{let A=0,R=!1,N={beginUpdate(){A++},endUpdate(){A--,A===0&&(T.reportChanges(),R&&(R=!1,k.call(E)))},handlePossibleChange(){},handleChange(){R=!0}};T.addObserver(N),T.reportChanges();let U={dispose(){T.removeObserver(N)}};return C instanceof L3?C.add(U):Array.isArray(C)&&C.push(U),U}}e.fromObservableLight=K})(vJ||(vJ={}));var A3=class O3{constructor(t){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${t}_${O3._idPool++}`,O3.all.add(this)}start(t){this._stopWatch=new mIe,this.listenerCount=t}stop(){if(this._stopWatch){let t=this._stopWatch.elapsed();this.durations.push(t),this.elapsedOverall+=t,this.invocationCount+=1,this._stopWatch=void 0}}};A3.all=new Set,A3._idPool=0;var gIe=A3,xJ=-1,PJ=class DJ{constructor(t,r,n=(DJ._idPool++).toString(16).padStart(3,"0")){this._errorHandler=t,this.threshold=r,this.name=n,this._warnCountdown=0}dispose(){this._stacks?.clear()}check(t,r){let n=this.threshold;if(n<=0||r<n)return;this._stacks||(this._stacks=new Map);let o=this._stacks.get(t.value)||0;if(this._stacks.set(t.value,o+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=n*.5;let[i,a]=this.getMostFrequentStack(),s=`[${this.name}] potential listener LEAK detected, having ${r} listeners already. MOST frequent listener (${a}):`;console.warn(s),console.warn(i);let l=new xIe(s,i);this._errorHandler(l)}return()=>{let i=this._stacks.get(t.value)||0;this._stacks.set(t.value,i-1)}}getMostFrequentStack(){if(!this._stacks)return;let t,r=0;for(let[n,o]of this._stacks)(!t||r<o)&&(t=[n,o],r=o);return t}};PJ._idPool=1;var vIe=PJ,z3=class RJ{constructor(t){this.value=t}static create(){let t=new Error;return new RJ(t.stack??"")}print(){console.warn(this.value.split(`
|
|
179
|
+
`).slice(2).join(`
|
|
180
|
+
`))}},xIe=class extends Error{constructor(e,t){super(e),this.name="ListenerLeakError",this.stack=t}},bIe=class extends Error{constructor(e,t){super(e),this.name="ListenerRefusalError",this.stack=t}},yIe=0,lC=class{constructor(e){this.value=e,this.id=yIe++}},_Ie=2,IIe=(e,t)=>{if(e instanceof lC)t(e);else for(let r=0;r<e.length;r++){let n=e[r];n&&t(n)}},cC;if(pIe){let e=[];setInterval(()=>{e.length!==0&&(console.warn("[LEAKING LISTENERS] GC'ed these listeners that were NOT yet disposed:"),console.warn(e.join(`
|
|
181
|
+
`)),e.length=0)},3e3),cC=new FinalizationRegistry(t=>{typeof t=="string"&&e.push(t)})}var Xc=class{constructor(e){this._size=0,this._options=e,this._leakageMon=xJ>0||this._options?.leakWarningThreshold?new vIe(e?.onListenerError??w3,this._options?.leakWarningThreshold??xJ):void 0,this._perfMon=this._options?._profName?new gIe(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){if(!this._disposed){if(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners){if(gJ){let e=this._listeners;queueMicrotask(()=>{IIe(e,t=>t.stack?.print())})}this._listeners=void 0,this._size=0}this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose()}}get event(){return this._event??(this._event=(e,t,r)=>{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){let s=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(s);let l=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],c=new bIe(`${s}. HINT: Stack shows most frequent listener (${l[1]}-times)`,l[0]);return(this._options?.onListenerError||w3)(c),vh.None}if(this._disposed)return vh.None;t&&(e=e.bind(t));let n=new lC(e),o,i;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(n.stack=z3.create(),o=this._leakageMon.check(n.stack,this._size+1)),gJ&&(n.stack=i??z3.create()),this._listeners?this._listeners instanceof lC?(this._deliveryQueue??(this._deliveryQueue=new wIe),this._listeners=[this._listeners,n]):this._listeners.push(n):(this._options?.onWillAddFirstListener?.(this),this._listeners=n,this._options?.onDidAddFirstListener?.(this)),this._size++;let a=wJ(()=>{cC?.unregister(a),o?.(),this._removeListener(n)});if(r instanceof L3?r.add(a):Array.isArray(r)&&r.push(a),cC){let s=new Error().stack.split(`
|
|
182
|
+
`).slice(2,3).join(`
|
|
183
|
+
`).trim(),l=/(file:|vscode-file:\/\/vscode-app)?(\/[^:]*:\d+:\d+)/.exec(s);cC.register(a,l?.[2]??s,a)}return a}),this._event}_removeListener(e){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}let t=this._listeners,r=t.indexOf(e);if(r===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,t[r]=void 0;let n=this._deliveryQueue.current===this;if(this._size*_Ie<=t.length){let o=0;for(let i=0;i<t.length;i++)t[i]?t[o++]=t[i]:n&&(this._deliveryQueue.end--,o<this._deliveryQueue.i&&this._deliveryQueue.i--);t.length=o}}_deliver(e,t){if(!e)return;let r=this._options?.onListenerError||w3;if(!r){e.value(t);return}try{e.value(t)}catch(n){r(n)}}_deliverQueue(e){let t=e.current._listeners;for(;e.i<e.end;)this._deliver(t[e.i++],e.value);e.reset()}fire(e){if(this._deliveryQueue?.current&&(this._deliverQueue(this._deliveryQueue),this._perfMon?.stop()),this._perfMon?.start(this._size),this._listeners)if(this._listeners instanceof lC)this._deliver(this._listeners,e);else{let t=this._deliveryQueue;t.enqueue(this,e,this._listeners.length),this._deliverQueue(t)}this._perfMon?.stop()}hasListeners(){return this._size>0}},wIe=class{constructor(){this.i=-1,this.end=0}enqueue(e,t,r){this.i=0,this.end=r,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}},uC=class dC{constructor(){this._providers=Object.create(null),this._active="",this._onChange=new Xc,this.onChange=this._onChange.event;let t=new q_e;this.register(t),this._active=t.version,this._activeProvider=t}static extractShouldJoin(t){return(t&1)!==0}static extractWidth(t){return t>>1&3}static extractCharKind(t){return t>>3}static createPropertyValue(t,r,n=!1){return(t&16777215)<<3|(r&3)<<1|(n?1:0)}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(t){if(!this._providers[t])throw new Error(`unknown Unicode version "${t}"`);this._active=t,this._activeProvider=this._providers[t],this._onChange.fire(t)}register(t){this._providers[t.version]=t}wcwidth(t){return this._activeProvider.wcwidth(t)}getStringCellWidth(t){let r=0,n=0,o=t.length;for(let i=0;i<o;++i){let a=t.charCodeAt(i);if(55296<=a&&a<=56319){if(++i>=o)return r+this.wcwidth(a);let c=t.charCodeAt(i);56320<=c&&c<=57343?a=(a-55296)*1024+c-56320+65536:r+=this.wcwidth(c)}let s=this.charProperties(a,n),l=dC.extractWidth(s);dC.extractShouldJoin(s)&&(l-=dC.extractWidth(n)),r+=l,n=s}return r}charProperties(t,r){return this._activeProvider.charProperties(t,r)}},S3=[[768,879],[1155,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1541],[1552,1562],[1564,1564],[1611,1631],[1648,1648],[1750,1757],[1759,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2045,2045],[2070,2073],[2075,2083],[2085,2087],[2089,2093],[2137,2139],[2259,2306],[2362,2362],[2364,2364],[2369,2376],[2381,2381],[2385,2391],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2558,2558],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2641,2641],[2672,2673],[2677,2677],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2810,2815],[2817,2817],[2876,2876],[2879,2879],[2881,2884],[2893,2893],[2902,2902],[2914,2915],[2946,2946],[3008,3008],[3021,3021],[3072,3072],[3076,3076],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3170,3171],[3201,3201],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3328,3329],[3387,3388],[3393,3396],[3405,3405],[3426,3427],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3981,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4151],[4153,4154],[4157,4158],[4184,4185],[4190,4192],[4209,4212],[4226,4226],[4229,4230],[4237,4237],[4253,4253],[4448,4607],[4957,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6158],[6277,6278],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6683,6683],[6742,6742],[6744,6750],[6752,6752],[6754,6754],[6757,6764],[6771,6780],[6783,6783],[6832,6846],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7040,7041],[7074,7077],[7080,7081],[7083,7085],[7142,7142],[7144,7145],[7149,7149],[7151,7153],[7212,7219],[7222,7223],[7376,7378],[7380,7392],[7394,7400],[7405,7405],[7412,7412],[7416,7417],[7616,7673],[7675,7679],[8203,8207],[8234,8238],[8288,8292],[8294,8303],[8400,8432],[11503,11505],[11647,11647],[11744,11775],[12330,12333],[12441,12442],[42607,42610],[42612,42621],[42654,42655],[42736,42737],[43010,43010],[43014,43014],[43019,43019],[43045,43046],[43204,43205],[43232,43249],[43263,43263],[43302,43309],[43335,43345],[43392,43394],[43443,43443],[43446,43449],[43452,43453],[43493,43493],[43561,43566],[43569,43570],[43573,43574],[43587,43587],[43596,43596],[43644,43644],[43696,43696],[43698,43700],[43703,43704],[43710,43711],[43713,43713],[43756,43757],[43766,43766],[44005,44005],[44008,44008],[44013,44013],[64286,64286],[65024,65039],[65056,65071],[65279,65279],[65529,65531]],SIe=[[66045,66045],[66272,66272],[66422,66426],[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[68325,68326],[68900,68903],[69446,69456],[69633,69633],[69688,69702],[69759,69761],[69811,69814],[69817,69818],[69821,69821],[69837,69837],[69888,69890],[69927,69931],[69933,69940],[70003,70003],[70016,70017],[70070,70078],[70089,70092],[70191,70193],[70196,70196],[70198,70199],[70206,70206],[70367,70367],[70371,70378],[70400,70401],[70459,70460],[70464,70464],[70502,70508],[70512,70516],[70712,70719],[70722,70724],[70726,70726],[70750,70750],[70835,70840],[70842,70842],[70847,70848],[70850,70851],[71090,71093],[71100,71101],[71103,71104],[71132,71133],[71219,71226],[71229,71229],[71231,71232],[71339,71339],[71341,71341],[71344,71349],[71351,71351],[71453,71455],[71458,71461],[71463,71467],[71727,71735],[71737,71738],[72148,72151],[72154,72155],[72160,72160],[72193,72202],[72243,72248],[72251,72254],[72263,72263],[72273,72278],[72281,72283],[72330,72342],[72344,72345],[72752,72758],[72760,72765],[72767,72767],[72850,72871],[72874,72880],[72882,72883],[72885,72886],[73009,73014],[73018,73018],[73020,73021],[73023,73029],[73031,73031],[73104,73105],[73109,73109],[73111,73111],[73459,73460],[78896,78904],[92912,92916],[92976,92982],[94031,94031],[94095,94098],[113821,113822],[113824,113827],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[121344,121398],[121403,121452],[121461,121461],[121476,121476],[121499,121503],[121505,121519],[122880,122886],[122888,122904],[122907,122913],[122915,122916],[122918,122922],[123184,123190],[123628,123631],[125136,125142],[125252,125258],[917505,917505],[917536,917631],[917760,917999]],k3=[[4352,4447],[8986,8987],[9001,9002],[9193,9196],[9200,9200],[9203,9203],[9725,9726],[9748,9749],[9800,9811],[9855,9855],[9875,9875],[9889,9889],[9898,9899],[9917,9918],[9924,9925],[9934,9934],[9940,9940],[9962,9962],[9970,9971],[9973,9973],[9978,9978],[9981,9981],[9989,9989],[9994,9995],[10024,10024],[10060,10060],[10062,10062],[10067,10069],[10071,10071],[10133,10135],[10160,10160],[10175,10175],[11035,11036],[11088,11088],[11093,11093],[11904,11929],[11931,12019],[12032,12245],[12272,12283],[12288,12329],[12334,12350],[12353,12438],[12443,12543],[12549,12591],[12593,12686],[12688,12730],[12736,12771],[12784,12830],[12832,12871],[12880,19903],[19968,42124],[42128,42182],[43360,43388],[44032,55203],[63744,64255],[65040,65049],[65072,65106],[65108,65126],[65128,65131],[65281,65376],[65504,65510]],kIe=[[94176,94179],[94208,100343],[100352,101106],[110592,110878],[110928,110930],[110948,110951],[110960,111355],[126980,126980],[127183,127183],[127374,127374],[127377,127386],[127488,127490],[127504,127547],[127552,127560],[127568,127569],[127584,127589],[127744,127776],[127789,127797],[127799,127868],[127870,127891],[127904,127946],[127951,127955],[127968,127984],[127988,127988],[127992,128062],[128064,128064],[128066,128252],[128255,128317],[128331,128334],[128336,128359],[128378,128378],[128405,128406],[128420,128420],[128507,128591],[128640,128709],[128716,128716],[128720,128722],[128725,128725],[128747,128748],[128756,128762],[128992,129003],[129293,129393],[129395,129398],[129402,129442],[129445,129450],[129454,129482],[129485,129535],[129648,129651],[129656,129658],[129664,129666],[129680,129685],[131072,196605],[196608,262141]],hl;function bJ(e,t){let r=0,n=t.length-1,o;if(e<t[0][0]||e>t[n][1])return!1;for(;n>=r;)if(o=r+n>>1,e>t[o][1])r=o+1;else if(e<t[o][0])n=o-1;else return!0;return!1}var CIe=class{constructor(){if(this.version="11",!hl){hl=new Uint8Array(65536),hl.fill(1),hl[0]=0,hl.fill(0,1,32),hl.fill(0,127,160);for(let e=0;e<S3.length;++e)hl.fill(0,S3[e][0],S3[e][1]+1);for(let e=0;e<k3.length;++e)hl.fill(2,k3[e][0],k3[e][1]+1)}}wcwidth(e){return e<32?0:e<127?1:e<65536?hl[e]:bJ(e,SIe)?0:bJ(e,kIe)?2:1}charProperties(e,t){let r=this.wcwidth(e),n=r===0&&t!==0;if(n){let o=uC.extractWidth(t);o===0?n=!1:o>r&&(r=o)}return uC.createPropertyValue(0,r,n)}},TJ=class{activate(e){e.unicode.register(new CIe)}dispose(){}};var PIe=class{constructor(e,t,r,n={}){this._terminal=e,this._regex=t,this._handler=r,this._options=n}provideLinks(e,t){let r=RIe.computeLink(e,this._regex,this._terminal,this._handler);t(this._addCallbacks(r))}_addCallbacks(e){return e.map(t=>(t.leave=this._options.leave,t.hover=(r,n)=>{if(this._options.hover){let{range:o}=t;this._options.hover(r,n,o)}},t))}};function DIe(e){try{let t=new URL(e),r=t.password&&t.username?`${t.protocol}//${t.username}:${t.password}@${t.host}`:t.username?`${t.protocol}//${t.username}@${t.host}`:`${t.protocol}//${t.host}`;return e.toLocaleLowerCase().startsWith(r.toLocaleLowerCase())}catch{return!1}}var RIe=class fC{static computeLink(t,r,n,o){let i=new RegExp(r.source,(r.flags||"")+"g"),[a,s]=fC._getWindowedLineStrings(t-1,n),l=a.join(""),c,d=[];for(;c=i.exec(l);){let u=c[0];if(!DIe(u))continue;let[f,m]=fC._mapStrIdx(n,s,0,c.index),[p,g]=fC._mapStrIdx(n,f,m,u.length);if(f===-1||m===-1||p===-1||g===-1)continue;let b={start:{x:m+1,y:f+1},end:{x:g,y:p+1}};d.push({range:b,text:u,activate:o})}return d}static _getWindowedLineStrings(t,r){let n,o=t,i=t,a=0,s="",l=[];if(n=r.buffer.active.getLine(t)){let c=n.translateToString(!0);if(n.isWrapped&&c[0]!==" "){for(a=0;(n=r.buffer.active.getLine(--o))&&a<2048&&(s=n.translateToString(!0),a+=s.length,l.push(s),!(!n.isWrapped||s.indexOf(" ")!==-1)););l.reverse()}for(l.push(c),a=0;(n=r.buffer.active.getLine(++i))&&n.isWrapped&&a<2048&&(s=n.translateToString(!0),a+=s.length,l.push(s),s.indexOf(" ")===-1););}return[l,o]}static _mapStrIdx(t,r,n,o){let i=t.buffer.active,a=i.getNullCell(),s=n;for(;o;){let l=i.getLine(r);if(!l)return[-1,-1];for(let c=s;c<l.length;++c){l.getCell(c,a);let d=a.getChars();if(a.getWidth()&&(o-=d.length||1,c===l.length-1&&d==="")){let u=i.getLine(r+1);u&&u.isWrapped&&(u.getCell(0,a),a.getWidth()===2&&(o+=1))}if(o<0)return[r,c]}r++,s=0}return[r,s]}},TIe=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function EIe(e,t){let r=window.open();if(r){try{r.opener=null}catch{}r.location.href=t}else console.warn("Opening link blocked as opener could not be cleared")}var EJ=class{constructor(e=EIe,t={}){this._handler=e,this._options=t}activate(e){this._terminal=e;let t=this._options,r=t.urlRegex||TIe;this._linkProvider=this._terminal.registerLinkProvider(new PIe(this._terminal,r,this._handler,t))}dispose(){this._linkProvider?.dispose()}};var Lee=Object.defineProperty,$Ie=Object.getOwnPropertyDescriptor,AIe=(e,t)=>{for(var r in t)Lee(e,r,{get:t[r],enumerable:!0})},br=(e,t,r,n)=>{for(var o=n>1?void 0:n?$Ie(t,r):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(n?a(t,r,o):a(o))||o);return n&&o&&Lee(t,r,o),o},ye=(e,t)=>(r,n)=>t(r,n,e),$J="Terminal input",tN={get:()=>$J,set:e=>$J=e},AJ="Too much output to announce, navigate to rows manually to read",rN={get:()=>AJ,set:e=>AJ=e};function OIe(e){return e.replace(/\r?\n/g,"\r")}function zIe(e,t){return t?"\x1B[200~"+e+"\x1B[201~":e}function NIe(e,t){e.clipboardData&&e.clipboardData.setData("text/plain",t.selectionText),e.preventDefault()}function FIe(e,t,r,n){if(e.stopPropagation(),e.clipboardData){let o=e.clipboardData.getData("text/plain");Mee(o,t,r,n)}}function Mee(e,t,r,n){e=OIe(e),e=zIe(e,r.decPrivateModes.bracketedPasteMode&&n.rawOptions.ignoreBracketedPasteMode!==!0),r.triggerDataEvent(e,!0),t.value=""}function Bee(e,t,r){let n=r.getBoundingClientRect(),o=e.clientX-n.left-10,i=e.clientY-n.top-10;t.style.width="20px",t.style.height="20px",t.style.left=`${o}px`,t.style.top=`${i}px`,t.style.zIndex="1000",t.focus()}function OJ(e,t,r,n,o){Bee(e,t,r),o&&n.rightClickSelect(e),t.value=n.selectionText,t.select()}function td(e){return e>65535?(e-=65536,String.fromCharCode((e>>10)+55296)+String.fromCharCode(e%1024+56320)):String.fromCharCode(e)}function zC(e,t=0,r=e.length){let n="";for(let o=t;o<r;++o){let i=e[o];i>65535?(i-=65536,n+=String.fromCharCode((i>>10)+55296)+String.fromCharCode(i%1024+56320)):n+=String.fromCharCode(i)}return n}var LIe=class{constructor(){this._interim=0}clear(){this._interim=0}decode(e,t){let r=e.length;if(!r)return 0;let n=0,o=0;if(this._interim){let i=e.charCodeAt(o++);56320<=i&&i<=57343?t[n++]=(this._interim-55296)*1024+i-56320+65536:(t[n++]=this._interim,t[n++]=i),this._interim=0}for(let i=o;i<r;++i){let a=e.charCodeAt(i);if(55296<=a&&a<=56319){if(++i>=r)return this._interim=a,n;let s=e.charCodeAt(i);56320<=s&&s<=57343?t[n++]=(a-55296)*1024+s-56320+65536:(t[n++]=a,t[n++]=s);continue}a!==65279&&(t[n++]=a)}return n}},MIe=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(e,t){let r=e.length;if(!r)return 0;let n=0,o,i,a,s,l=0,c=0;if(this.interim[0]){let f=!1,m=this.interim[0];m&=(m&224)===192?31:(m&240)===224?15:7;let p=0,g;for(;(g=this.interim[++p]&63)&&p<4;)m<<=6,m|=g;let b=(this.interim[0]&224)===192?2:(this.interim[0]&240)===224?3:4,v=b-p;for(;c<v;){if(c>=r)return 0;if(g=e[c++],(g&192)!==128){c--,f=!0;break}else this.interim[p++]=g,m<<=6,m|=g&63}f||(b===2?m<128?c--:t[n++]=m:b===3?m<2048||m>=55296&&m<=57343||m===65279||(t[n++]=m):m<65536||m>1114111||(t[n++]=m)),this.interim.fill(0)}let d=r-4,u=c;for(;u<r;){for(;u<d&&!((o=e[u])&128)&&!((i=e[u+1])&128)&&!((a=e[u+2])&128)&&!((s=e[u+3])&128);)t[n++]=o,t[n++]=i,t[n++]=a,t[n++]=s,u+=4;if(o=e[u++],o<128)t[n++]=o;else if((o&224)===192){if(u>=r)return this.interim[0]=o,n;if(i=e[u++],(i&192)!==128){u--;continue}if(l=(o&31)<<6|i&63,l<128){u--;continue}t[n++]=l}else if((o&240)===224){if(u>=r)return this.interim[0]=o,n;if(i=e[u++],(i&192)!==128){u--;continue}if(u>=r)return this.interim[0]=o,this.interim[1]=i,n;if(a=e[u++],(a&192)!==128){u--;continue}if(l=(o&15)<<12|(i&63)<<6|a&63,l<2048||l>=55296&&l<=57343||l===65279)continue;t[n++]=l}else if((o&248)===240){if(u>=r)return this.interim[0]=o,n;if(i=e[u++],(i&192)!==128){u--;continue}if(u>=r)return this.interim[0]=o,this.interim[1]=i,n;if(a=e[u++],(a&192)!==128){u--;continue}if(u>=r)return this.interim[0]=o,this.interim[1]=i,this.interim[2]=a,n;if(s=e[u++],(s&192)!==128){u--;continue}if(l=(o&7)<<18|(i&63)<<12|(a&63)<<6|s&63,l<65536||l>1114111)continue;t[n++]=l}}return n}},jee="",rd=" ",Kb=class Uee{constructor(){this.fg=0,this.bg=0,this.extended=new CC}static toColorRGB(t){return[t>>>16&255,t>>>8&255,t&255]}static fromColorRGB(t){return(t[0]&255)<<16|(t[1]&255)<<8|t[2]&255}clone(){let t=new Uee;return t.fg=this.fg,t.bg=this.bg,t.extended=this.extended.clone(),t}isInverse(){return this.fg&67108864}isBold(){return this.fg&134217728}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:this.fg&268435456}isBlink(){return this.fg&536870912}isInvisible(){return this.fg&1073741824}isItalic(){return this.bg&67108864}isDim(){return this.bg&134217728}isStrikethrough(){return this.fg&2147483648}isProtected(){return this.bg&536870912}isOverline(){return this.bg&1073741824}getFgColorMode(){return this.fg&50331648}getBgColorMode(){return this.bg&50331648}isFgRGB(){return(this.fg&50331648)===50331648}isBgRGB(){return(this.bg&50331648)===50331648}isFgPalette(){return(this.fg&50331648)===16777216||(this.fg&50331648)===33554432}isBgPalette(){return(this.bg&50331648)===16777216||(this.bg&50331648)===33554432}isFgDefault(){return(this.fg&50331648)===0}isBgDefault(){return(this.bg&50331648)===0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(this.fg&50331648){case 16777216:case 33554432:return this.fg&255;case 50331648:return this.fg&16777215;default:return-1}}getBgColor(){switch(this.bg&50331648){case 16777216:case 33554432:return this.bg&255;case 50331648:return this.bg&16777215;default:return-1}}hasExtendedAttrs(){return this.bg&268435456}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(this.bg&268435456&&~this.extended.underlineColor)switch(this.extended.underlineColor&50331648){case 16777216:case 33554432:return this.extended.underlineColor&255;case 50331648:return this.extended.underlineColor&16777215;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return this.bg&268435456&&~this.extended.underlineColor?this.extended.underlineColor&50331648:this.getFgColorMode()}isUnderlineColorRGB(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===50331648:this.isFgRGB()}isUnderlineColorPalette(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===16777216||(this.extended.underlineColor&50331648)===33554432:this.isFgPalette()}isUnderlineColorDefault(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===0:this.isFgDefault()}getUnderlineStyle(){return this.fg&268435456?this.bg&268435456?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}},CC=class Vee{constructor(t=0,r=0){this._ext=0,this._urlId=0,this._ext=t,this._urlId=r}get ext(){return this._urlId?this._ext&-469762049|this.underlineStyle<<26:this._ext}set ext(t){this._ext=t}get underlineStyle(){return this._urlId?5:(this._ext&469762048)>>26}set underlineStyle(t){this._ext&=-469762049,this._ext|=t<<26&469762048}get underlineColor(){return this._ext&67108863}set underlineColor(t){this._ext&=-67108864,this._ext|=t&67108863}get urlId(){return this._urlId}set urlId(t){this._urlId=t}get underlineVariantOffset(){let t=(this._ext&3758096384)>>29;return t<0?t^4294967288:t}set underlineVariantOffset(t){this._ext&=536870911,this._ext|=t<<29&3758096384}clone(){return new Vee(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}},Fi=class Hee extends Kb{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new CC,this.combinedData=""}static fromCharData(t){let r=new Hee;return r.setFromCharData(t),r}isCombined(){return this.content&2097152}getWidth(){return this.content>>22}getChars(){return this.content&2097152?this.combinedData:this.content&2097151?td(this.content&2097151):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):this.content&2097151}setFromCharData(t){this.fg=t[0],this.bg=0;let r=!1;if(t[1].length>2)r=!0;else if(t[1].length===2){let n=t[1].charCodeAt(0);if(55296<=n&&n<=56319){let o=t[1].charCodeAt(1);56320<=o&&o<=57343?this.content=(n-55296)*1024+o-56320+65536|t[2]<<22:r=!0}else r=!0}else this.content=t[1].charCodeAt(0)|t[2]<<22;r&&(this.combinedData=t[1],this.content=2097152|t[2]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},zJ="di$target",oN="di$dependencies",M3=new Map;function BIe(e){return e[oN]||[]}function ao(e){if(M3.has(e))return M3.get(e);let t=function(r,n,o){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");jIe(t,r,o)};return t._id=e,M3.set(e,t),t}function jIe(e,t,r){t[zJ]===t?t[oN].push({id:e,index:r}):(t[oN]=[{id:e,index:r}],t[zJ]=t)}var dn=ao("BufferService"),Wee=ao("CoreMouseService"),lf=ao("CoreService"),UIe=ao("CharsetService"),VN=ao("InstantiationService"),Zee=ao("LogService"),un=ao("OptionsService"),Gee=ao("OscLinkService"),VIe=ao("UnicodeService"),qb=ao("DecorationService"),nN=class{constructor(e,t,r){this._bufferService=e,this._optionsService=t,this._oscLinkService=r}provideLinks(e,t){let r=this._bufferService.buffer.lines.get(e-1);if(!r){t(void 0);return}let n=[],o=this._optionsService.rawOptions.linkHandler,i=new Fi,a=r.getTrimmedLength(),s=-1,l=-1,c=!1;for(let d=0;d<a;d++)if(!(l===-1&&!r.hasContent(d))){if(r.loadCell(d,i),i.hasExtendedAttrs()&&i.extended.urlId)if(l===-1){l=d,s=i.extended.urlId;continue}else c=i.extended.urlId!==s;else l!==-1&&(c=!0);if(c||l!==-1&&d===a-1){let u=this._oscLinkService.getLinkData(s)?.uri;if(u){let f={start:{x:l+1,y:e},end:{x:d+(!c&&d===a-1?1:0),y:e}},m=!1;if(!o?.allowNonHttpProtocols)try{let p=new URL(u);["http:","https:"].includes(p.protocol)||(m=!0)}catch{m=!0}m||n.push({text:u,range:f,activate:(p,g)=>o?o.activate(p,g,f):HIe(p,g),hover:(p,g)=>o?.hover?.(p,g,f),leave:(p,g)=>o?.leave?.(p,g,f)})}c=!1,i.hasExtendedAttrs()&&i.extended.urlId?(l=d,s=i.extended.urlId):(l=-1,s=-1)}}t(n)}};nN=br([ye(0,dn),ye(1,un),ye(2,Gee)],nN);function HIe(e,t){if(confirm(`Do you want to navigate to ${t}?
|
|
184
|
+
|
|
185
|
+
WARNING: This link could potentially be dangerous`)){let r=window.open();if(r){try{r.opener=null}catch{}r.location.href=t}else console.warn("Opening link blocked as opener could not be cleared")}}var NC=ao("CharSizeService"),yl=ao("CoreBrowserService"),HN=ao("MouseService"),_l=ao("RenderService"),WIe=ao("SelectionService"),Kee=ao("CharacterJoinerService"),_h=ao("ThemeService"),qee=ao("LinkProviderService"),ZIe=class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?NJ.isErrorNoTelemetry(e)?new NJ(e.message+`
|
|
186
|
+
|
|
187
|
+
`+e.stack):new Error(e.message+`
|
|
188
|
+
|
|
189
|
+
`+e.stack):e},0)}}addListener(e){return this.listeners.push(e),()=>{this._removeListener(e)}}emit(e){this.listeners.forEach(t=>{t(e)})}_removeListener(e){this.listeners.splice(this.listeners.indexOf(e),1)}setUnexpectedErrorHandler(e){this.unexpectedErrorHandler=e}getUnexpectedErrorHandler(){return this.unexpectedErrorHandler}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}},GIe=new ZIe;function xC(e){KIe(e)||GIe.onUnexpectedError(e)}var iN="Canceled";function KIe(e){return e instanceof qIe?!0:e instanceof Error&&e.name===iN&&e.message===iN}var qIe=class extends Error{constructor(){super(iN),this.name=this.message}};function XIe(e){return e?new Error(`Illegal argument: ${e}`):new Error("Illegal argument")}var NJ=class aN extends Error{constructor(t){super(t),this.name="CodeExpectedError"}static fromError(t){if(t instanceof aN)return t;let r=new aN;return r.message=t.message,r.stack=t.stack,r}static isErrorNoTelemetry(t){return t.name==="CodeExpectedError"}},sN=class Xee extends Error{constructor(t){super(t||"An unexpected bug occurred."),Object.setPrototypeOf(this,Xee.prototype)}};function QIe(e,t,r=0,n=e.length){let o=r,i=n;for(;o<i;){let a=Math.floor((o+i)/2);t(e[a])?o=a+1:i=a}return o-1}var YIe=class Qee{constructor(t){this._array=t,this._findLastMonotonousLastIdx=0}findLastMonotonous(t){if(Qee.assertInvariants){if(this._prevFindLastPredicate){for(let n of this._array)if(this._prevFindLastPredicate(n)&&!t(n))throw new Error("MonotonousArray: current predicate must be weaker than (or equal to) the previous predicate.")}this._prevFindLastPredicate=t}let r=QIe(this._array,t,this._findLastMonotonousLastIdx);return this._findLastMonotonousLastIdx=r+1,r===-1?void 0:this._array[r]}};YIe.assertInvariants=!1;function Jn(e,t=0){return e[e.length-(1+t)]}var lN;(e=>{function t(i){return i<0}e.isLessThan=t;function r(i){return i<=0}e.isLessThanOrEqual=r;function n(i){return i>0}e.isGreaterThan=n;function o(i){return i===0}e.isNeitherLessOrGreaterThan=o,e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0})(lN||(lN={}));function JIe(e,t){return(r,n)=>t(e(r),e(n))}var e0e=(e,t)=>e-t,FJ=class cN{constructor(t){this.iterate=t}forEach(t){this.iterate(r=>(t(r),!0))}toArray(){let t=[];return this.iterate(r=>(t.push(r),!0)),t}filter(t){return new cN(r=>this.iterate(n=>t(n)?r(n):!0))}map(t){return new cN(r=>this.iterate(n=>r(t(n))))}some(t){let r=!1;return this.iterate(n=>(r=t(n),!r)),r}findFirst(t){let r;return this.iterate(n=>t(n)?(r=n,!1):!0),r}findLast(t){let r;return this.iterate(n=>(t(n)&&(r=n),!0)),r}findLastMaxBy(t){let r,n=!0;return this.iterate(o=>((n||lN.isGreaterThan(t(o,r)))&&(n=!1,r=o),!0)),r}};FJ.empty=new FJ(e=>{});function t0e(e,t){let r=Object.create(null);for(let n of e){let o=t(n),i=r[o];i||(i=r[o]=[]),i.push(n)}return r}var LJ,MJ,oIt=class{constructor(e,t){this.toKey=t,this._map=new Map,this[LJ]="SetWithKey";for(let r of e)this.add(r)}get size(){return this._map.size}add(e){let t=this.toKey(e);return this._map.set(t,e),this}delete(e){return this._map.delete(this.toKey(e))}has(e){return this._map.has(this.toKey(e))}*entries(){for(let e of this._map.values())yield[e,e]}keys(){return this.values()}*values(){for(let e of this._map.values())yield e}clear(){this._map.clear()}forEach(e,t){this._map.forEach(r=>e.call(t,r,r,this))}[(MJ=Symbol.iterator,LJ=Symbol.toStringTag,MJ)](){return this.values()}},r0e=class{constructor(){this.map=new Map}add(e,t){let r=this.map.get(e);r||(r=new Set,this.map.set(e,r)),r.add(t)}delete(e,t){let r=this.map.get(e);r&&(r.delete(t),r.size===0&&this.map.delete(e))}forEach(e,t){let r=this.map.get(e);r&&r.forEach(t)}get(e){return this.map.get(e)||new Set}};function o0e(e,t){let r=this,n=!1,o;return function(){if(n)return o;if(n=!0,t)try{o=e.apply(r,arguments)}finally{t()}else o=e.apply(r,arguments);return o}}var dN;(e=>{function t(I){return I&&typeof I=="object"&&typeof I[Symbol.iterator]=="function"}e.is=t;let r=Object.freeze([]);function n(){return r}e.empty=n;function*o(I){yield I}e.single=o;function i(I){return t(I)?I:o(I)}e.wrap=i;function a(I){return I||r}e.from=a;function*s(I){for(let S=I.length-1;S>=0;S--)yield I[S]}e.reverse=s;function l(I){return!I||I[Symbol.iterator]().next().done===!0}e.isEmpty=l;function c(I){return I[Symbol.iterator]().next().value}e.first=c;function d(I,S){let w=0;for(let P of I)if(S(P,w++))return!0;return!1}e.some=d;function u(I,S){for(let w of I)if(S(w))return w}e.find=u;function*f(I,S){for(let w of I)S(w)&&(yield w)}e.filter=f;function*m(I,S){let w=0;for(let P of I)yield S(P,w++)}e.map=m;function*p(I,S){let w=0;for(let P of I)yield*S(P,w++)}e.flatMap=p;function*g(...I){for(let S of I)yield*S}e.concat=g;function b(I,S,w){let P=w;for(let $ of I)P=S(P,$);return P}e.reduce=b;function*v(I,S,w=I.length){for(S<0&&(S+=I.length),w<0?w+=I.length:w>I.length&&(w=I.length);S<w;S++)yield I[S]}e.slice=v;function x(I,S=Number.POSITIVE_INFINITY){let w=[];if(S===0)return[w,I];let P=I[Symbol.iterator]();for(let $=0;$<S;$++){let B=P.next();if(B.done)return[w,e.empty()];w.push(B.value)}return[w,{[Symbol.iterator](){return P}}]}e.consume=x;async function _(I){let S=[];for await(let w of I)S.push(w);return Promise.resolve(S)}e.asyncToArray=_})(dN||(dN={}));var n0e=!1,nf=null,i0e=class Yee{constructor(){this.livingDisposables=new Map}getDisposableData(t){let r=this.livingDisposables.get(t);return r||(r={parent:null,source:null,isSingleton:!1,value:t,idx:Yee.idx++},this.livingDisposables.set(t,r)),r}trackDisposable(t){let r=this.getDisposableData(t);r.source||(r.source=new Error().stack)}setParent(t,r){let n=this.getDisposableData(t);n.parent=r}markAsDisposed(t){this.livingDisposables.delete(t)}markAsSingleton(t){this.getDisposableData(t).isSingleton=!0}getRootParent(t,r){let n=r.get(t);if(n)return n;let o=t.parent?this.getRootParent(this.getDisposableData(t.parent),r):t;return r.set(t,o),o}getTrackedDisposables(){let t=new Map;return[...this.livingDisposables.entries()].filter(([,r])=>r.source!==null&&!this.getRootParent(r,t).isSingleton).flatMap(([r])=>r)}computeLeakingDisposables(t=10,r){let n;if(r)n=r;else{let l=new Map,c=[...this.livingDisposables.values()].filter(u=>u.source!==null&&!this.getRootParent(u,l).isSingleton);if(c.length===0)return;let d=new Set(c.map(u=>u.value));if(n=c.filter(u=>!(u.parent&&d.has(u.parent))),n.length===0)throw new Error("There are cyclic diposable chains!")}if(!n)return;function o(l){function c(u,f){for(;u.length>0&&f.some(m=>typeof m=="string"?m===u[0]:u[0].match(m));)u.shift()}let d=l.source.split(`
|
|
190
|
+
`).map(u=>u.trim().replace("at ","")).filter(u=>u!=="");return c(d,["Error",/^trackDisposable \(.*\)$/,/^DisposableTracker.trackDisposable \(.*\)$/]),d.reverse()}let i=new r0e;for(let l of n){let c=o(l);for(let d=0;d<=c.length;d++)i.add(c.slice(0,d).join(`
|
|
191
|
+
`),l)}n.sort(JIe(l=>l.idx,e0e));let a="",s=0;for(let l of n.slice(0,t)){s++;let c=o(l),d=[];for(let u=0;u<c.length;u++){let f=c[u];f=`(shared with ${i.get(c.slice(0,u+1).join(`
|
|
192
|
+
`)).size}/${n.length} leaks) at ${f}`;let m=i.get(c.slice(0,u).join(`
|
|
193
|
+
`)),p=t0e([...m].map(g=>o(g)[u]),g=>g);delete p[c[u]];for(let[g,b]of Object.entries(p))d.unshift(` - stacktraces of ${b.length} other leaks continue with ${g}`);d.unshift(f)}a+=`
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
==================== Leaking disposable ${s}/${n.length}: ${l.value.constructor.name} ====================
|
|
197
|
+
${d.join(`
|
|
198
|
+
`)}
|
|
199
|
+
============================================================
|
|
200
|
+
|
|
201
|
+
`}return n.length>t&&(a+=`
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
... and ${n.length-t} more leaking disposables
|
|
205
|
+
|
|
206
|
+
`),{leaks:n,details:a}}};i0e.idx=0;function a0e(e){nf=e}if(n0e){let e="__is_disposable_tracked__";a0e(new class{trackDisposable(t){let r=new Error("Potentially leaked disposable").stack;setTimeout(()=>{t[e]||console.log(r)},3e3)}setParent(t,r){if(t&&t!==Qe.None)try{t[e]=!0}catch{}}markAsDisposed(t){if(t&&t!==Qe.None)try{t[e]=!0}catch{}}markAsSingleton(t){}})}function FC(e){return nf?.trackDisposable(e),e}function LC(e){nf?.markAsDisposed(e)}function Hb(e,t){nf?.setParent(e,t)}function s0e(e,t){if(nf)for(let r of e)nf.setParent(r,t)}function BJ(e){return nf?.markAsSingleton(e),e}function af(e){if(dN.is(e)){let t=[];for(let r of e)if(r)try{r.dispose()}catch(n){t.push(n)}if(t.length===1)throw t[0];if(t.length>1)throw new AggregateError(t,"Encountered errors while disposing of store");return Array.isArray(e)?[]:e}else if(e)return e.dispose(),e}function l0e(...e){let t=Qt(()=>af(e));return s0e(e,t),t}function Qt(e){let t=FC({dispose:o0e(()=>{LC(t),e()})});return t}var Jee=class ete{constructor(){this._toDispose=new Set,this._isDisposed=!1,FC(this)}dispose(){this._isDisposed||(LC(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{af(this._toDispose)}finally{this._toDispose.clear()}}add(t){if(!t)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return Hb(t,this),this._isDisposed?ete.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(t),t}delete(t){if(t){if(t===this)throw new Error("Cannot dispose a disposable on itself!");this._toDispose.delete(t),t.dispose()}}deleteAndLeak(t){t&&this._toDispose.has(t)&&(this._toDispose.delete(t),Hb(t,null))}};Jee.DISABLE_DISPOSED_WARNING=!1;var od=Jee,Qe=class{constructor(){this._store=new od,FC(this),Hb(this._store,this)}dispose(){LC(this),this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}};Qe.None=Object.freeze({dispose(){}});var yh=class{constructor(){this._isDisposed=!1,FC(this)}get value(){return this._isDisposed?void 0:this._value}set value(e){this._isDisposed||e===this._value||(this._value?.dispose(),e&&Hb(e,this),this._value=e)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,LC(this),this._value?.dispose(),this._value=void 0}clearAndLeak(){let e=this._value;return this._value=void 0,e&&Hb(e,null),e}},ri=typeof window=="object"?window:globalThis,uN=class fN{constructor(t){this.element=t,this.next=fN.Undefined,this.prev=fN.Undefined}};uN.Undefined=new uN(void 0);var mr=uN,jJ=class{constructor(){this._first=mr.Undefined,this._last=mr.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===mr.Undefined}clear(){let e=this._first;for(;e!==mr.Undefined;){let t=e.next;e.prev=mr.Undefined,e.next=mr.Undefined,e=t}this._first=mr.Undefined,this._last=mr.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){let r=new mr(e);if(this._first===mr.Undefined)this._first=r,this._last=r;else if(t){let o=this._last;this._last=r,r.prev=o,o.next=r}else{let o=this._first;this._first=r,r.next=o,o.prev=r}this._size+=1;let n=!1;return()=>{n||(n=!0,this._remove(r))}}shift(){if(this._first!==mr.Undefined){let e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==mr.Undefined){let e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==mr.Undefined&&e.next!==mr.Undefined){let t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===mr.Undefined&&e.next===mr.Undefined?(this._first=mr.Undefined,this._last=mr.Undefined):e.next===mr.Undefined?(this._last=this._last.prev,this._last.next=mr.Undefined):e.prev===mr.Undefined&&(this._first=this._first.next,this._first.prev=mr.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==mr.Undefined;)yield e.element,e=e.next}},c0e=globalThis.performance&&typeof globalThis.performance.now=="function",d0e=class tte{static create(t){return new tte(t)}constructor(t){this._now=c0e&&t===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}},u0e=!1,UJ=!1,f0e=!1,io;(e=>{e.None=()=>Qe.None;function t(T){if(f0e){let{onDidAddListener:k}=T,E=hN.create(),C=0;T.onDidAddListener=()=>{++C===2&&(console.warn("snapshotted emitter LIKELY used public and SHOULD HAVE BEEN created with DisposableStore. snapshotted here"),E.print()),k?.()}}}function r(T,k){return f(T,()=>{},0,void 0,!0,void 0,k)}e.defer=r;function n(T){return(k,E=null,C)=>{let A=!1,R;return R=T(N=>{if(!A)return R?R.dispose():A=!0,k.call(E,N)},null,C),A&&R.dispose(),R}}e.once=n;function o(T,k,E){return d((C,A=null,R)=>T(N=>C.call(A,k(N)),null,R),E)}e.map=o;function i(T,k,E){return d((C,A=null,R)=>T(N=>{k(N),C.call(A,N)},null,R),E)}e.forEach=i;function a(T,k,E){return d((C,A=null,R)=>T(N=>k(N)&&C.call(A,N),null,R),E)}e.filter=a;function s(T){return T}e.signal=s;function l(...T){return(k,E=null,C)=>{let A=l0e(...T.map(R=>R(N=>k.call(E,N))));return u(A,C)}}e.any=l;function c(T,k,E,C){let A=E;return o(T,R=>(A=k(A,R),A),C)}e.reduce=c;function d(T,k){let E,C={onWillAddFirstListener(){E=T(A.fire,A)},onDidRemoveLastListener(){E?.dispose()}};k||t(C);let A=new ce(C);return k?.add(A),A.event}function u(T,k){return k instanceof Array?k.push(T):k&&k.add(T),T}function f(T,k,E=100,C=!1,A=!1,R,N){let U,G,re,ve=0,he,Q={leakWarningThreshold:R,onWillAddFirstListener(){U=T(we=>{ve++,G=k(G,we),C&&!re&&(ne.fire(G),G=void 0),he=()=>{let se=G;G=void 0,re=void 0,(!C||ve>1)&&ne.fire(se),ve=0},typeof E=="number"?(clearTimeout(re),re=setTimeout(he,E)):re===void 0&&(re=0,queueMicrotask(he))})},onWillRemoveListener(){A&&ve>0&&he?.()},onDidRemoveLastListener(){he=void 0,U.dispose()}};N||t(Q);let ne=new ce(Q);return N?.add(ne),ne.event}e.debounce=f;function m(T,k=0,E){return e.debounce(T,(C,A)=>C?(C.push(A),C):[A],k,void 0,!0,void 0,E)}e.accumulate=m;function p(T,k=(C,A)=>C===A,E){let C=!0,A;return a(T,R=>{let N=C||!k(R,A);return C=!1,A=R,N},E)}e.latch=p;function g(T,k,E){return[e.filter(T,k,E),e.filter(T,C=>!k(C),E)]}e.split=g;function b(T,k=!1,E=[],C){let A=E.slice(),R=T(G=>{A?A.push(G):U.fire(G)});C&&C.add(R);let N=()=>{A?.forEach(G=>U.fire(G)),A=null},U=new ce({onWillAddFirstListener(){R||(R=T(G=>U.fire(G)),C&&C.add(R))},onDidAddFirstListener(){A&&(k?setTimeout(N):N())},onDidRemoveLastListener(){R&&R.dispose(),R=null}});return C&&C.add(U),U.event}e.buffer=b;function v(T,k){return(E,C,A)=>{let R=k(new _);return T(function(N){let U=R.evaluate(N);U!==x&&E.call(C,U)},void 0,A)}}e.chain=v;let x=Symbol("HaltChainable");class _{constructor(){this.steps=[]}map(k){return this.steps.push(k),this}forEach(k){return this.steps.push(E=>(k(E),E)),this}filter(k){return this.steps.push(E=>k(E)?E:x),this}reduce(k,E){let C=E;return this.steps.push(A=>(C=k(C,A),C)),this}latch(k=(E,C)=>E===C){let E=!0,C;return this.steps.push(A=>{let R=E||!k(A,C);return E=!1,C=A,R?A:x}),this}evaluate(k){for(let E of this.steps)if(k=E(k),k===x)break;return k}}function I(T,k,E=C=>C){let C=(...U)=>N.fire(E(...U)),A=()=>T.on(k,C),R=()=>T.removeListener(k,C),N=new ce({onWillAddFirstListener:A,onDidRemoveLastListener:R});return N.event}e.fromNodeEventEmitter=I;function S(T,k,E=C=>C){let C=(...U)=>N.fire(E(...U)),A=()=>T.addEventListener(k,C),R=()=>T.removeEventListener(k,C),N=new ce({onWillAddFirstListener:A,onDidRemoveLastListener:R});return N.event}e.fromDOMEventEmitter=S;function w(T){return new Promise(k=>n(T)(k))}e.toPromise=w;function P(T){let k=new ce;return T.then(E=>{k.fire(E)},()=>{k.fire(void 0)}).finally(()=>{k.dispose()}),k.event}e.fromPromise=P;function $(T,k){return T(E=>k.fire(E))}e.forward=$;function B(T,k,E){return k(E),T(C=>k(C))}e.runAndSubscribe=B;class W{constructor(k,E){this._observable=k,this._counter=0,this._hasChanged=!1;let C={onWillAddFirstListener:()=>{k.addObserver(this)},onDidRemoveLastListener:()=>{k.removeObserver(this)}};E||t(C),this.emitter=new ce(C),E&&E.add(this.emitter)}beginUpdate(k){this._counter++}handlePossibleChange(k){}handleChange(k,E){this._hasChanged=!0}endUpdate(k){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function H(T,k){return new W(T,k).emitter.event}e.fromObservable=H;function K(T){return(k,E,C)=>{let A=0,R=!1,N={beginUpdate(){A++},endUpdate(){A--,A===0&&(T.reportChanges(),R&&(R=!1,k.call(E)))},handlePossibleChange(){},handleChange(){R=!0}};T.addObserver(N),T.reportChanges();let U={dispose(){T.removeObserver(N)}};return C instanceof od?C.add(U):Array.isArray(C)&&C.push(U),U}}e.fromObservableLight=K})(io||(io={}));var mN=class pN{constructor(t){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${t}_${pN._idPool++}`,pN.all.add(this)}start(t){this._stopWatch=new d0e,this.listenerCount=t}stop(){if(this._stopWatch){let t=this._stopWatch.elapsed();this.durations.push(t),this.elapsedOverall+=t,this.invocationCount+=1,this._stopWatch=void 0}}};mN.all=new Set,mN._idPool=0;var m0e=mN,VJ=-1,rte=class ote{constructor(t,r,n=(ote._idPool++).toString(16).padStart(3,"0")){this._errorHandler=t,this.threshold=r,this.name=n,this._warnCountdown=0}dispose(){this._stacks?.clear()}check(t,r){let n=this.threshold;if(n<=0||r<n)return;this._stacks||(this._stacks=new Map);let o=this._stacks.get(t.value)||0;if(this._stacks.set(t.value,o+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=n*.5;let[i,a]=this.getMostFrequentStack(),s=`[${this.name}] potential listener LEAK detected, having ${r} listeners already. MOST frequent listener (${a}):`;console.warn(s),console.warn(i);let l=new h0e(s,i);this._errorHandler(l)}return()=>{let i=this._stacks.get(t.value)||0;this._stacks.set(t.value,i-1)}}getMostFrequentStack(){if(!this._stacks)return;let t,r=0;for(let[n,o]of this._stacks)(!t||r<o)&&(t=[n,o],r=o);return t}};rte._idPool=1;var p0e=rte,hN=class nte{constructor(t){this.value=t}static create(){let t=new Error;return new nte(t.stack??"")}print(){console.warn(this.value.split(`
|
|
207
|
+
`).slice(2).join(`
|
|
208
|
+
`))}},h0e=class extends Error{constructor(e,t){super(e),this.name="ListenerLeakError",this.stack=t}},g0e=class extends Error{constructor(e,t){super(e),this.name="ListenerRefusalError",this.stack=t}},v0e=0,bC=class{constructor(e){this.value=e,this.id=v0e++}},x0e=2,b0e=(e,t)=>{if(e instanceof bC)t(e);else for(let r=0;r<e.length;r++){let n=e[r];n&&t(n)}},yC;if(u0e){let e=[];setInterval(()=>{e.length!==0&&(console.warn("[LEAKING LISTENERS] GC'ed these listeners that were NOT yet disposed:"),console.warn(e.join(`
|
|
209
|
+
`)),e.length=0)},3e3),yC=new FinalizationRegistry(t=>{typeof t=="string"&&e.push(t)})}var ce=class{constructor(e){this._size=0,this._options=e,this._leakageMon=VJ>0||this._options?.leakWarningThreshold?new p0e(e?.onListenerError??xC,this._options?.leakWarningThreshold??VJ):void 0,this._perfMon=this._options?._profName?new m0e(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){if(!this._disposed){if(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners){if(UJ){let e=this._listeners;queueMicrotask(()=>{b0e(e,t=>t.stack?.print())})}this._listeners=void 0,this._size=0}this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose()}}get event(){return this._event??(this._event=(e,t,r)=>{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){let s=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(s);let l=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],c=new g0e(`${s}. HINT: Stack shows most frequent listener (${l[1]}-times)`,l[0]);return(this._options?.onListenerError||xC)(c),Qe.None}if(this._disposed)return Qe.None;t&&(e=e.bind(t));let n=new bC(e),o,i;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(n.stack=hN.create(),o=this._leakageMon.check(n.stack,this._size+1)),UJ&&(n.stack=i??hN.create()),this._listeners?this._listeners instanceof bC?(this._deliveryQueue??(this._deliveryQueue=new y0e),this._listeners=[this._listeners,n]):this._listeners.push(n):(this._options?.onWillAddFirstListener?.(this),this._listeners=n,this._options?.onDidAddFirstListener?.(this)),this._size++;let a=Qt(()=>{yC?.unregister(a),o?.(),this._removeListener(n)});if(r instanceof od?r.add(a):Array.isArray(r)&&r.push(a),yC){let s=new Error().stack.split(`
|
|
210
|
+
`).slice(2,3).join(`
|
|
211
|
+
`).trim(),l=/(file:|vscode-file:\/\/vscode-app)?(\/[^:]*:\d+:\d+)/.exec(s);yC.register(a,l?.[2]??s,a)}return a}),this._event}_removeListener(e){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}let t=this._listeners,r=t.indexOf(e);if(r===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,t[r]=void 0;let n=this._deliveryQueue.current===this;if(this._size*x0e<=t.length){let o=0;for(let i=0;i<t.length;i++)t[i]?t[o++]=t[i]:n&&(this._deliveryQueue.end--,o<this._deliveryQueue.i&&this._deliveryQueue.i--);t.length=o}}_deliver(e,t){if(!e)return;let r=this._options?.onListenerError||xC;if(!r){e.value(t);return}try{e.value(t)}catch(n){r(n)}}_deliverQueue(e){let t=e.current._listeners;for(;e.i<e.end;)this._deliver(t[e.i++],e.value);e.reset()}fire(e){if(this._deliveryQueue?.current&&(this._deliverQueue(this._deliveryQueue),this._perfMon?.stop()),this._perfMon?.start(this._size),this._listeners)if(this._listeners instanceof bC)this._deliver(this._listeners,e);else{let t=this._deliveryQueue;t.enqueue(this,e,this._listeners.length),this._deliverQueue(t)}this._perfMon?.stop()}hasListeners(){return this._size>0}},y0e=class{constructor(){this.i=-1,this.end=0}enqueue(e,t,r){this.i=0,this.end=r,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}},gN=class{constructor(){this.mapWindowIdToZoomLevel=new Map,this._onDidChangeZoomLevel=new ce,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event,this.mapWindowIdToZoomFactor=new Map,this._onDidChangeFullscreen=new ce,this.onDidChangeFullscreen=this._onDidChangeFullscreen.event,this.mapWindowIdToFullScreen=new Map}getZoomLevel(t){return this.mapWindowIdToZoomLevel.get(this.getWindowId(t))??0}setZoomLevel(t,r){if(this.getZoomLevel(r)===t)return;let n=this.getWindowId(r);this.mapWindowIdToZoomLevel.set(n,t),this._onDidChangeZoomLevel.fire(n)}getZoomFactor(t){return this.mapWindowIdToZoomFactor.get(this.getWindowId(t))??1}setZoomFactor(t,r){this.mapWindowIdToZoomFactor.set(this.getWindowId(r),t)}setFullscreen(t,r){if(this.isFullscreen(r)===t)return;let n=this.getWindowId(r);this.mapWindowIdToFullScreen.set(n,t),this._onDidChangeFullscreen.fire(n)}isFullscreen(t){return!!this.mapWindowIdToFullScreen.get(this.getWindowId(t))}getWindowId(t){return t.vscodeWindowId}};gN.INSTANCE=new gN;var WN=gN;function _0e(e,t,r){typeof t=="string"&&(t=e.matchMedia(t)),t.addEventListener("change",r)}var iIt=WN.INSTANCE.onDidChangeZoomLevel;function I0e(e){return WN.INSTANCE.getZoomFactor(e)}var aIt=WN.INSTANCE.onDidChangeFullscreen,Ih=typeof navigator=="object"?navigator.userAgent:"",vN=Ih.indexOf("Firefox")>=0,_C=Ih.indexOf("AppleWebKit")>=0,ZN=Ih.indexOf("Chrome")>=0,ite=!ZN&&Ih.indexOf("Safari")>=0,sIt=Ih.indexOf("Electron/")>=0,lIt=Ih.indexOf("Android")>=0,IC=!1;if(typeof ri.matchMedia=="function"){let e=ri.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"),t=ri.matchMedia("(display-mode: fullscreen)");IC=e.matches,_0e(ri,e,({matches:r})=>{IC&&t.matches||(IC=r)})}function w0e(){return IC}var bh="en",PC=!1,DC=!1,Bb=!1,S0e=!1,ate=!1,ste=!1,k0e=!1,C0e=!1,P0e=!1,D0e=!1,mC,wC=bh,HJ=bh,R0e,vl,bl=globalThis,ti;typeof bl.vscode<"u"&&typeof bl.vscode.process<"u"?ti=bl.vscode.process:typeof process<"u"&&typeof process?.versions?.node=="string"&&(ti=process);var lte=typeof ti?.versions?.electron=="string",T0e=lte&&ti?.type==="renderer";if(typeof ti=="object"){PC=ti.platform==="win32",DC=ti.platform==="darwin",Bb=ti.platform==="linux",S0e=Bb&&!!ti.env.SNAP&&!!ti.env.SNAP_REVISION,k0e=lte,P0e=!!ti.env.CI||!!ti.env.BUILD_ARTIFACTSTAGINGDIRECTORY,mC=bh,wC=bh;let e=ti.env.VSCODE_NLS_CONFIG;if(e)try{let t=JSON.parse(e);mC=t.userLocale,HJ=t.osLocale,wC=t.resolvedLanguage||bh,R0e=t.languagePack?.translationsConfigFile}catch{}ate=!0}else typeof navigator=="object"&&!T0e?(vl=navigator.userAgent,PC=vl.indexOf("Windows")>=0,DC=vl.indexOf("Macintosh")>=0,C0e=(vl.indexOf("Macintosh")>=0||vl.indexOf("iPad")>=0||vl.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,Bb=vl.indexOf("Linux")>=0,D0e=vl?.indexOf("Mobi")>=0,ste=!0,wC=globalThis._VSCODE_NLS_LANGUAGE||bh,mC=navigator.language.toLowerCase(),HJ=mC):console.error("Unable to resolve platform.");var B3=0;DC?B3=1:PC?B3=3:Bb&&(B3=2);var cte=PC,hs=DC,E0e=Bb,j3=ate,$0e=ste&&typeof bl.importScripts=="function",cIt=$0e?bl.origin:void 0,gs=vl,Qc=wC,WJ;(e=>{function t(){return Qc}e.value=t;function r(){return Qc.length===2?Qc==="en":Qc.length>=3?Qc[0]==="e"&&Qc[1]==="n"&&Qc[2]==="-":!1}e.isDefaultVariant=r;function n(){return Qc==="en"}e.isDefault=n})(WJ||(WJ={}));var A0e=typeof bl.postMessage=="function"&&!bl.importScripts,O0e=(()=>{if(A0e){let e=[];bl.addEventListener("message",r=>{if(r.data&&r.data.vscodeScheduleAsyncWork)for(let n=0,o=e.length;n<o;n++){let i=e[n];if(i.id===r.data.vscodeScheduleAsyncWork){e.splice(n,1),i.callback();return}}});let t=0;return r=>{let n=++t;e.push({id:n,callback:r}),bl.postMessage({vscodeScheduleAsyncWork:n},"*")}}return e=>setTimeout(e)})(),z0e=!!(gs&&gs.indexOf("Chrome")>=0),dIt=!!(gs&&gs.indexOf("Firefox")>=0),uIt=!!(!z0e&&gs&&gs.indexOf("Safari")>=0),fIt=!!(gs&&gs.indexOf("Edg/")>=0),mIt=!!(gs&&gs.indexOf("Android")>=0),Yc=typeof navigator=="object"?navigator:{},pIt={clipboard:{writeText:j3||document.queryCommandSupported&&document.queryCommandSupported("copy")||!!(Yc&&Yc.clipboard&&Yc.clipboard.writeText),readText:j3||!!(Yc&&Yc.clipboard&&Yc.clipboard.readText)},keyboard:j3||w0e()?0:Yc.keyboard||ite?1:2,touch:"ontouchstart"in ri||Yc.maxTouchPoints>0,pointerEvents:ri.PointerEvent&&("ontouchstart"in ri||navigator.maxTouchPoints>0)},GN=class{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}},U3=new GN,ZJ=new GN,GJ=new GN,N0e=new Array(230),xN;(e=>{function t(s){return U3.keyCodeToStr(s)}e.toString=t;function r(s){return U3.strToKeyCode(s)}e.fromString=r;function n(s){return ZJ.keyCodeToStr(s)}e.toUserSettingsUS=n;function o(s){return GJ.keyCodeToStr(s)}e.toUserSettingsGeneral=o;function i(s){return ZJ.strToKeyCode(s)||GJ.strToKeyCode(s)}e.fromUserSettings=i;function a(s){if(s>=98&&s<=113)return null;switch(s){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return U3.keyCodeToStr(s)}e.toElectronAccelerator=a})(xN||(xN={}));var F0e=class dte{constructor(t,r,n,o,i){this.ctrlKey=t,this.shiftKey=r,this.altKey=n,this.metaKey=o,this.keyCode=i}equals(t){return t instanceof dte&&this.ctrlKey===t.ctrlKey&&this.shiftKey===t.shiftKey&&this.altKey===t.altKey&&this.metaKey===t.metaKey&&this.keyCode===t.keyCode}getHashCode(){let t=this.ctrlKey?"1":"0",r=this.shiftKey?"1":"0",n=this.altKey?"1":"0",o=this.metaKey?"1":"0";return`K${t}${r}${n}${o}${this.keyCode}`}isModifierKey(){return this.keyCode===0||this.keyCode===5||this.keyCode===57||this.keyCode===6||this.keyCode===4}toKeybinding(){return new L0e([this])}isDuplicateModifierCase(){return this.ctrlKey&&this.keyCode===5||this.shiftKey&&this.keyCode===4||this.altKey&&this.keyCode===6||this.metaKey&&this.keyCode===57}},L0e=class{constructor(e){if(e.length===0)throw XIe("chords");this.chords=e}getHashCode(){let e="";for(let t=0,r=this.chords.length;t<r;t++)t!==0&&(e+=";"),e+=this.chords[t].getHashCode();return e}equals(e){if(e===null||this.chords.length!==e.chords.length)return!1;for(let t=0;t<this.chords.length;t++)if(!this.chords[t].equals(e.chords[t]))return!1;return!0}};function M0e(e){if(e.charCode){let r=String.fromCharCode(e.charCode).toUpperCase();return xN.fromString(r)}let t=e.keyCode;if(t===3)return 7;if(vN)switch(t){case 59:return 85;case 60:if(E0e)return 97;break;case 61:return 86;case 107:return 109;case 109:return 111;case 173:return 88;case 224:if(hs)return 57;break}else if(_C&&(hs&&t===93||!hs&&t===92))return 57;return N0e[t]||0}var B0e=hs?256:2048,j0e=512,U0e=1024,V0e=hs?2048:256,bN=class{constructor(e){this._standardKeyboardEventBrand=!0;let t=e;this.browserEvent=t,this.target=t.target,this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,this.altGraphKey=t.getModifierState?.("AltGraph"),this.keyCode=M0e(t),this.code=t.code,this.ctrlKey=this.ctrlKey||this.keyCode===5,this.altKey=this.altKey||this.keyCode===6,this.shiftKey=this.shiftKey||this.keyCode===4,this.metaKey=this.metaKey||this.keyCode===57,this._asKeybinding=this._computeKeybinding(),this._asKeyCodeChord=this._computeKeyCodeChord()}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()}toKeyCodeChord(){return this._asKeyCodeChord}equals(e){return this._asKeybinding===e}_computeKeybinding(){let e=0;this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(e=this.keyCode);let t=0;return this.ctrlKey&&(t|=B0e),this.altKey&&(t|=j0e),this.shiftKey&&(t|=U0e),this.metaKey&&(t|=V0e),t|=e,t}_computeKeyCodeChord(){let e=0;return this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(e=this.keyCode),new F0e(this.ctrlKey,this.shiftKey,this.altKey,this.metaKey,e)}},KJ=new WeakMap;function H0e(e){if(!e.parent||e.parent===e)return null;try{let t=e.location,r=e.parent.location;if(t.origin!=="null"&&r.origin!=="null"&&t.origin!==r.origin)return null}catch{return null}return e.parent}var W0e=class{static getSameOriginWindowChain(e){let t=KJ.get(e);if(!t){t=[],KJ.set(e,t);let r=e,n;do n=H0e(r),n?t.push({window:new WeakRef(r),iframeElement:r.frameElement||null}):t.push({window:new WeakRef(r),iframeElement:null}),r=n;while(r)}return t.slice(0)}static getPositionOfChildWindowRelativeToAncestorWindow(e,t){if(!t||e===t)return{top:0,left:0};let r=0,n=0,o=this.getSameOriginWindowChain(e);for(let i of o){let a=i.window.deref();if(r+=a?.scrollY??0,n+=a?.scrollX??0,a===t||!i.iframeElement)break;let s=i.iframeElement.getBoundingClientRect();r+=s.top,n+=s.left}return{top:r,left:n}}},Ob=class{constructor(e,t){this.timestamp=Date.now(),this.browserEvent=t,this.leftButton=t.button===0,this.middleButton=t.button===1,this.rightButton=t.button===2,this.buttons=t.buttons,this.target=t.target,this.detail=t.detail||1,t.type==="dblclick"&&(this.detail=2),this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,typeof t.pageX=="number"?(this.posx=t.pageX,this.posy=t.pageY):(this.posx=t.clientX+this.target.ownerDocument.body.scrollLeft+this.target.ownerDocument.documentElement.scrollLeft,this.posy=t.clientY+this.target.ownerDocument.body.scrollTop+this.target.ownerDocument.documentElement.scrollTop);let r=W0e.getPositionOfChildWindowRelativeToAncestorWindow(e,t.view);this.posx-=r.left,this.posy-=r.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}},qJ=class{constructor(e,t=0,r=0){this.browserEvent=e||null,this.target=e?e.target||e.targetNode||e.srcElement:null,this.deltaY=r,this.deltaX=t;let n=!1;if(ZN){let o=navigator.userAgent.match(/Chrome\/(\d+)/);n=(o?parseInt(o[1]):123)<=122}if(e){let o=e,i=e,a=e.view?.devicePixelRatio||1;if(typeof o.wheelDeltaY<"u")n?this.deltaY=o.wheelDeltaY/(120*a):this.deltaY=o.wheelDeltaY/120;else if(typeof i.VERTICAL_AXIS<"u"&&i.axis===i.VERTICAL_AXIS)this.deltaY=-i.detail/3;else if(e.type==="wheel"){let s=e;s.deltaMode===s.DOM_DELTA_LINE?vN&&!hs?this.deltaY=-e.deltaY/3:this.deltaY=-e.deltaY:this.deltaY=-e.deltaY/40}if(typeof o.wheelDeltaX<"u")ite&&cte?this.deltaX=-(o.wheelDeltaX/120):n?this.deltaX=o.wheelDeltaX/(120*a):this.deltaX=o.wheelDeltaX/120;else if(typeof i.HORIZONTAL_AXIS<"u"&&i.axis===i.HORIZONTAL_AXIS)this.deltaX=-e.detail/3;else if(e.type==="wheel"){let s=e;s.deltaMode===s.DOM_DELTA_LINE?vN&&!hs?this.deltaX=-e.deltaX/3:this.deltaX=-e.deltaX:this.deltaX=-e.deltaX/40}this.deltaY===0&&this.deltaX===0&&e.wheelDelta&&(n?this.deltaY=e.wheelDelta/(120*a):this.deltaY=e.wheelDelta/120)}}preventDefault(){this.browserEvent?.preventDefault()}stopPropagation(){this.browserEvent?.stopPropagation()}},ute=Object.freeze(function(e,t){let r=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(r)}}}),XJ;(e=>{function t(r){return r===e.None||r===e.Cancelled||r instanceof Z0e?!0:!r||typeof r!="object"?!1:typeof r.isCancellationRequested=="boolean"&&typeof r.onCancellationRequested=="function"}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:io.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:ute})})(XJ||(XJ={}));var Z0e=class{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?ute:(this._emitter||(this._emitter=new ce),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}};var KN=class{constructor(e,t){this._isDisposed=!1,this._token=-1,typeof e=="function"&&typeof t=="number"&&this.setIfNotSet(e,t)}dispose(){this.cancel(),this._isDisposed=!0}cancel(){this._token!==-1&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(e,t){if(this._isDisposed)throw new sN("Calling 'cancelAndSet' on a disposed TimeoutTimer");this.cancel(),this._token=setTimeout(()=>{this._token=-1,e()},t)}setIfNotSet(e,t){if(this._isDisposed)throw new sN("Calling 'setIfNotSet' on a disposed TimeoutTimer");this._token===-1&&(this._token=setTimeout(()=>{this._token=-1,e()},t))}},G0e=class{constructor(){this.disposable=void 0,this.isDisposed=!1}cancel(){this.disposable?.dispose(),this.disposable=void 0}cancelAndSet(e,t,r=globalThis){if(this.isDisposed)throw new sN("Calling 'cancelAndSet' on a disposed IntervalTimer");this.cancel();let n=r.setInterval(()=>{e()},t);this.disposable=Qt(()=>{r.clearInterval(n),this.disposable=void 0})}dispose(){this.cancel(),this.isDisposed=!0}},K0e,V3;(function(){typeof globalThis.requestIdleCallback!="function"||typeof globalThis.cancelIdleCallback!="function"?V3=(e,t)=>{O0e(()=>{if(r)return;let n=Date.now()+15;t(Object.freeze({didTimeout:!0,timeRemaining(){return Math.max(0,n-Date.now())}}))});let r=!1;return{dispose(){r||(r=!0)}}}:V3=(e,t,r)=>{let n=e.requestIdleCallback(t,typeof r=="number"?{timeout:r}:void 0),o=!1;return{dispose(){o||(o=!0,e.cancelIdleCallback(n))}}},K0e=e=>V3(globalThis,e)})();var QJ;(e=>{async function t(n){let o,i=await Promise.all(n.map(a=>a.then(s=>s,s=>{o||(o=s)})));if(typeof o<"u")throw o;return i}e.settled=t;function r(n){return new Promise(async(o,i)=>{try{await n(o,i)}catch(a){i(a)}})}e.withAsyncBody=r})(QJ||(QJ={}));var YJ=class zi{static fromArray(t){return new zi(r=>{r.emitMany(t)})}static fromPromise(t){return new zi(async r=>{r.emitMany(await t)})}static fromPromises(t){return new zi(async r=>{await Promise.all(t.map(async n=>r.emitOne(await n)))})}static merge(t){return new zi(async r=>{await Promise.all(t.map(async n=>{for await(let o of n)r.emitOne(o)}))})}constructor(t,r){this._state=0,this._results=[],this._error=null,this._onReturn=r,this._onStateChanged=new ce,queueMicrotask(async()=>{let n={emitOne:o=>this.emitOne(o),emitMany:o=>this.emitMany(o),reject:o=>this.reject(o)};try{await Promise.resolve(t(n)),this.resolve()}catch(o){this.reject(o)}finally{n.emitOne=void 0,n.emitMany=void 0,n.reject=void 0}})}[Symbol.asyncIterator](){let t=0;return{next:async()=>{do{if(this._state===2)throw this._error;if(t<this._results.length)return{done:!1,value:this._results[t++]};if(this._state===1)return{done:!0,value:void 0};await io.toPromise(this._onStateChanged.event)}while(!0)},return:async()=>(this._onReturn?.(),{done:!0,value:void 0})}}static map(t,r){return new zi(async n=>{for await(let o of t)n.emitOne(r(o))})}map(t){return zi.map(this,t)}static filter(t,r){return new zi(async n=>{for await(let o of t)r(o)&&n.emitOne(o)})}filter(t){return zi.filter(this,t)}static coalesce(t){return zi.filter(t,r=>!!r)}coalesce(){return zi.coalesce(this)}static async toPromise(t){let r=[];for await(let n of t)r.push(n);return r}toPromise(){return zi.toPromise(this)}emitOne(t){this._state===0&&(this._results.push(t),this._onStateChanged.fire())}emitMany(t){this._state===0&&(this._results=this._results.concat(t),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(t){this._state===0&&(this._state=2,this._error=t,this._onStateChanged.fire())}};YJ.EMPTY=YJ.fromArray([]);function q0e(e){return 55296<=e&&e<=56319}function JJ(e){return 56320<=e&&e<=57343}function X0e(e,t){return(e-55296<<10)+(t-56320)+65536}function Q0e(e){return qN(e,0)}function qN(e,t){switch(typeof e){case"object":return e===null?xl(349,t):Array.isArray(e)?J0e(e,t):ewe(e,t);case"string":return fte(e,t);case"boolean":return Y0e(e,t);case"number":return xl(e,t);case"undefined":return xl(937,t);default:return xl(617,t)}}function xl(e,t){return(t<<5)-t+e|0}function Y0e(e,t){return xl(e?433:863,t)}function fte(e,t){t=xl(149417,t);for(let r=0,n=e.length;r<n;r++)t=xl(e.charCodeAt(r),t);return t}function J0e(e,t){return t=xl(104579,t),e.reduce((r,n)=>qN(n,r),t)}function ewe(e,t){return t=xl(181387,t),Object.keys(e).sort().reduce((r,n)=>(r=fte(n,r),qN(e[n],r)),t)}function H3(e,t,r=32){let n=r-t,o=~((1<<n)-1);return(e<<t|(o&e)>>>n)>>>0}function eee(e,t=0,r=e.byteLength,n=0){for(let o=0;o<r;o++)e[t+o]=n}function twe(e,t,r="0"){for(;e.length<t;)e=r+e;return e}function Pb(e,t=32){return e instanceof ArrayBuffer?Array.from(new Uint8Array(e)).map(r=>r.toString(16).padStart(2,"0")).join(""):twe((e>>>0).toString(16),t/4)}var rwe=class mte{constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(67),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(t){let r=t.length;if(r===0)return;let n=this._buff,o=this._buffLen,i=this._leftoverHighSurrogate,a,s;for(i!==0?(a=i,s=-1,i=0):(a=t.charCodeAt(0),s=0);;){let l=a;if(q0e(a))if(s+1<r){let c=t.charCodeAt(s+1);JJ(c)?(s++,l=X0e(a,c)):l=65533}else{i=a;break}else JJ(a)&&(l=65533);if(o=this._push(n,o,l),s++,s<r)a=t.charCodeAt(s);else break}this._buffLen=o,this._leftoverHighSurrogate=i}_push(t,r,n){return n<128?t[r++]=n:n<2048?(t[r++]=192|(n&1984)>>>6,t[r++]=128|(n&63)>>>0):n<65536?(t[r++]=224|(n&61440)>>>12,t[r++]=128|(n&4032)>>>6,t[r++]=128|(n&63)>>>0):(t[r++]=240|(n&1835008)>>>18,t[r++]=128|(n&258048)>>>12,t[r++]=128|(n&4032)>>>6,t[r++]=128|(n&63)>>>0),r>=64&&(this._step(),r-=64,this._totalLen+=64,t[0]=t[64],t[1]=t[65],t[2]=t[66]),r}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),Pb(this._h0)+Pb(this._h1)+Pb(this._h2)+Pb(this._h3)+Pb(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,eee(this._buff,this._buffLen),this._buffLen>56&&(this._step(),eee(this._buff));let t=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(t/4294967296),!1),this._buffDV.setUint32(60,t%4294967296,!1),this._step()}_step(){let t=mte._bigBlock32,r=this._buffDV;for(let u=0;u<64;u+=4)t.setUint32(u,r.getUint32(u,!1),!1);for(let u=64;u<320;u+=4)t.setUint32(u,H3(t.getUint32(u-12,!1)^t.getUint32(u-32,!1)^t.getUint32(u-56,!1)^t.getUint32(u-64,!1),1),!1);let n=this._h0,o=this._h1,i=this._h2,a=this._h3,s=this._h4,l,c,d;for(let u=0;u<80;u++)u<20?(l=o&i|~o&a,c=1518500249):u<40?(l=o^i^a,c=1859775393):u<60?(l=o&i|o&a|i&a,c=2400959708):(l=o^i^a,c=3395469782),d=H3(n,5)+l+s+c+t.getUint32(u*4,!1)&4294967295,s=a,a=i,i=H3(o,30),o=n,n=d;this._h0=this._h0+n&4294967295,this._h1=this._h1+o&4294967295,this._h2=this._h2+i&4294967295,this._h3=this._h3+a&4294967295,this._h4=this._h4+s&4294967295}};rwe._bigBlock32=new DataView(new ArrayBuffer(320));var{registerWindow:hIt,getWindow:va,getDocument:gIt,getWindows:vIt,getWindowsCount:xIt,getWindowId:tee,getWindowById:bIt,hasWindow:yIt,onDidRegisterWindow:owe,onWillUnregisterWindow:_It,onDidUnregisterWindow:IIt}=(function(){let e=new Map,t={window:ri,disposables:new od};e.set(ri.vscodeWindowId,t);let r=new ce,n=new ce,o=new ce;function i(a,s){return(typeof a=="number"?e.get(a):void 0)??(s?t:void 0)}return{onDidRegisterWindow:r.event,onWillUnregisterWindow:o.event,onDidUnregisterWindow:n.event,registerWindow(a){if(e.has(a.vscodeWindowId))return Qe.None;let s=new od,l={window:a,disposables:s.add(new od)};return e.set(a.vscodeWindowId,l),s.add(Qt(()=>{e.delete(a.vscodeWindowId),n.fire(a)})),s.add(Be(a,to.BEFORE_UNLOAD,()=>{o.fire(a)})),r.fire(l),s},getWindows(){return e.values()},getWindowsCount(){return e.size},getWindowId(a){return a.vscodeWindowId},hasWindow(a){return e.has(a)},getWindowById:i,getWindow(a){let s=a;if(s?.ownerDocument?.defaultView)return s.ownerDocument.defaultView.window;let l=a;return l?.view?l.view.window:ri},getDocument(a){return va(a).document}}})(),nwe=class{constructor(e,t,r,n){this._node=e,this._type=t,this._handler=r,this._options=n||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){this._handler&&(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,this._handler=null)}};function Be(e,t,r,n){return new nwe(e,t,r,n)}function iwe(e,t){return function(r){return t(new Ob(e,r))}}function awe(e){return function(t){return e(new bN(t))}}var ree=function(e,t,r,n){let o=r;return t==="click"||t==="mousedown"||t==="contextmenu"?o=iwe(va(e),r):(t==="keydown"||t==="keypress"||t==="keyup")&&(o=awe(r)),Be(e,t,o,n)},swe,RC,lwe=class extends G0e{constructor(e){super(),this.defaultTarget=e&&va(e)}cancelAndSet(e,t,r){return super.cancelAndSet(e,t,r??this.defaultTarget)}},W3=class{constructor(e,t=0){this._runner=e,this.priority=t,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(!this._canceled)try{this._runner()}catch(e){xC(e)}}static sort(e,t){return t.priority-e.priority}};(function(){let e=new Map,t=new Map,r=new Map,n=new Map,o=i=>{r.set(i,!1);let a=e.get(i)??[];for(t.set(i,a),e.set(i,[]),n.set(i,!0);a.length>0;)a.sort(W3.sort),a.shift().execute();n.set(i,!1)};RC=(i,a,s=0)=>{let l=tee(i),c=new W3(a,s),d=e.get(l);return d||(d=[],e.set(l,d)),d.push(c),r.get(l)||(r.set(l,!0),i.requestAnimationFrame(()=>o(l))),c},swe=(i,a,s)=>{let l=tee(i);if(n.get(l)){let c=new W3(a,s),d=t.get(l);return d||(d=[],t.set(l,d)),d.push(c),c}else return RC(i,a,s)}})();var oee=class SC{constructor(t,r){this.width=t,this.height=r}with(t=this.width,r=this.height){return t!==this.width||r!==this.height?new SC(t,r):this}static is(t){return typeof t=="object"&&typeof t.height=="number"&&typeof t.width=="number"}static lift(t){return t instanceof SC?t:new SC(t.width,t.height)}static equals(t,r){return t===r?!0:!t||!r?!1:t.width===r.width&&t.height===r.height}};oee.None=new oee(0,0);function cwe(e){let t=e.getBoundingClientRect(),r=va(e);return{left:t.left+r.scrollX,top:t.top+r.scrollY,width:t.width,height:t.height}}var wIt=new class{constructor(){this.mutationObservers=new Map}observe(e,t,r){let n=this.mutationObservers.get(e);n||(n=new Map,this.mutationObservers.set(e,n));let o=Q0e(r),i=n.get(o);if(i)i.users+=1;else{let a=new ce,s=new MutationObserver(c=>a.fire(c));s.observe(e,r);let l=i={users:1,observer:s,onDidMutate:a.event};t.add(Qt(()=>{l.users-=1,l.users===0&&(a.dispose(),s.disconnect(),n?.delete(o),n?.size===0&&this.mutationObservers.delete(e))})),n.set(o,i)}return i.onDidMutate}},to={CLICK:"click",AUXCLICK:"auxclick",DBLCLICK:"dblclick",MOUSE_UP:"mouseup",MOUSE_DOWN:"mousedown",MOUSE_OVER:"mouseover",MOUSE_MOVE:"mousemove",MOUSE_OUT:"mouseout",MOUSE_ENTER:"mouseenter",MOUSE_LEAVE:"mouseleave",MOUSE_WHEEL:"wheel",POINTER_UP:"pointerup",POINTER_DOWN:"pointerdown",POINTER_MOVE:"pointermove",POINTER_LEAVE:"pointerleave",CONTEXT_MENU:"contextmenu",WHEEL:"wheel",KEY_DOWN:"keydown",KEY_PRESS:"keypress",KEY_UP:"keyup",LOAD:"load",BEFORE_UNLOAD:"beforeunload",UNLOAD:"unload",PAGE_SHOW:"pageshow",PAGE_HIDE:"pagehide",PASTE:"paste",ABORT:"abort",ERROR:"error",RESIZE:"resize",SCROLL:"scroll",FULLSCREEN_CHANGE:"fullscreenchange",WK_FULLSCREEN_CHANGE:"webkitfullscreenchange",SELECT:"select",CHANGE:"change",SUBMIT:"submit",RESET:"reset",FOCUS:"focus",FOCUS_IN:"focusin",FOCUS_OUT:"focusout",BLUR:"blur",INPUT:"input",STORAGE:"storage",DRAG_START:"dragstart",DRAG:"drag",DRAG_ENTER:"dragenter",DRAG_LEAVE:"dragleave",DRAG_OVER:"dragover",DROP:"drop",DRAG_END:"dragend",ANIMATION_START:_C?"webkitAnimationStart":"animationstart",ANIMATION_END:_C?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:_C?"webkitAnimationIteration":"animationiteration"},dwe=/([\w\-]+)?(#([\w\-]+))?((\.([\w\-]+))*)/;function pte(e,t,r,...n){let o=dwe.exec(t);if(!o)throw new Error("Bad use of emmet");let i=o[1]||"div",a;return e!=="http://www.w3.org/1999/xhtml"?a=document.createElementNS(e,i):a=document.createElement(i),o[3]&&(a.id=o[3]),o[4]&&(a.className=o[4].replace(/\./g," ").trim()),r&&Object.entries(r).forEach(([s,l])=>{typeof l>"u"||(/^on\w+$/.test(s)?a[s]=l:s==="selected"?l&&a.setAttribute(s,"true"):a.setAttribute(s,l))}),a.append(...n),a}function uwe(e,t,...r){return pte("http://www.w3.org/1999/xhtml",e,t,...r)}uwe.SVG=function(e,t,...r){return pte("http://www.w3.org/2000/svg",e,t,...r)};var fwe=class{constructor(e){this.domNode=e,this._maxWidth="",this._width="",this._height="",this._top="",this._left="",this._bottom="",this._right="",this._paddingTop="",this._paddingLeft="",this._paddingBottom="",this._paddingRight="",this._fontFamily="",this._fontWeight="",this._fontSize="",this._fontStyle="",this._fontFeatureSettings="",this._fontVariationSettings="",this._textDecoration="",this._lineHeight="",this._letterSpacing="",this._className="",this._display="",this._position="",this._visibility="",this._color="",this._backgroundColor="",this._layerHint=!1,this._contain="none",this._boxShadow=""}setMaxWidth(e){let t=Nn(e);this._maxWidth!==t&&(this._maxWidth=t,this.domNode.style.maxWidth=this._maxWidth)}setWidth(e){let t=Nn(e);this._width!==t&&(this._width=t,this.domNode.style.width=this._width)}setHeight(e){let t=Nn(e);this._height!==t&&(this._height=t,this.domNode.style.height=this._height)}setTop(e){let t=Nn(e);this._top!==t&&(this._top=t,this.domNode.style.top=this._top)}setLeft(e){let t=Nn(e);this._left!==t&&(this._left=t,this.domNode.style.left=this._left)}setBottom(e){let t=Nn(e);this._bottom!==t&&(this._bottom=t,this.domNode.style.bottom=this._bottom)}setRight(e){let t=Nn(e);this._right!==t&&(this._right=t,this.domNode.style.right=this._right)}setPaddingTop(e){let t=Nn(e);this._paddingTop!==t&&(this._paddingTop=t,this.domNode.style.paddingTop=this._paddingTop)}setPaddingLeft(e){let t=Nn(e);this._paddingLeft!==t&&(this._paddingLeft=t,this.domNode.style.paddingLeft=this._paddingLeft)}setPaddingBottom(e){let t=Nn(e);this._paddingBottom!==t&&(this._paddingBottom=t,this.domNode.style.paddingBottom=this._paddingBottom)}setPaddingRight(e){let t=Nn(e);this._paddingRight!==t&&(this._paddingRight=t,this.domNode.style.paddingRight=this._paddingRight)}setFontFamily(e){this._fontFamily!==e&&(this._fontFamily=e,this.domNode.style.fontFamily=this._fontFamily)}setFontWeight(e){this._fontWeight!==e&&(this._fontWeight=e,this.domNode.style.fontWeight=this._fontWeight)}setFontSize(e){let t=Nn(e);this._fontSize!==t&&(this._fontSize=t,this.domNode.style.fontSize=this._fontSize)}setFontStyle(e){this._fontStyle!==e&&(this._fontStyle=e,this.domNode.style.fontStyle=this._fontStyle)}setFontFeatureSettings(e){this._fontFeatureSettings!==e&&(this._fontFeatureSettings=e,this.domNode.style.fontFeatureSettings=this._fontFeatureSettings)}setFontVariationSettings(e){this._fontVariationSettings!==e&&(this._fontVariationSettings=e,this.domNode.style.fontVariationSettings=this._fontVariationSettings)}setTextDecoration(e){this._textDecoration!==e&&(this._textDecoration=e,this.domNode.style.textDecoration=this._textDecoration)}setLineHeight(e){let t=Nn(e);this._lineHeight!==t&&(this._lineHeight=t,this.domNode.style.lineHeight=this._lineHeight)}setLetterSpacing(e){let t=Nn(e);this._letterSpacing!==t&&(this._letterSpacing=t,this.domNode.style.letterSpacing=this._letterSpacing)}setClassName(e){this._className!==e&&(this._className=e,this.domNode.className=this._className)}toggleClassName(e,t){this.domNode.classList.toggle(e,t),this._className=this.domNode.className}setDisplay(e){this._display!==e&&(this._display=e,this.domNode.style.display=this._display)}setPosition(e){this._position!==e&&(this._position=e,this.domNode.style.position=this._position)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this.domNode.style.visibility=this._visibility)}setColor(e){this._color!==e&&(this._color=e,this.domNode.style.color=this._color)}setBackgroundColor(e){this._backgroundColor!==e&&(this._backgroundColor=e,this.domNode.style.backgroundColor=this._backgroundColor)}setLayerHinting(e){this._layerHint!==e&&(this._layerHint=e,this.domNode.style.transform=this._layerHint?"translate3d(0px, 0px, 0px)":"")}setBoxShadow(e){this._boxShadow!==e&&(this._boxShadow=e,this.domNode.style.boxShadow=e)}setContain(e){this._contain!==e&&(this._contain=e,this.domNode.style.contain=this._contain)}setAttribute(e,t){this.domNode.setAttribute(e,t)}removeAttribute(e){this.domNode.removeAttribute(e)}appendChild(e){this.domNode.appendChild(e.domNode)}removeChild(e){this.domNode.removeChild(e.domNode)}};function Nn(e){return typeof e=="number"?`${e}px`:e}function jb(e){return new fwe(e)}var hte=class{constructor(){this._hooks=new od,this._pointerMoveCallback=null,this._onStopCallback=null}dispose(){this.stopMonitoring(!1),this._hooks.dispose()}stopMonitoring(e,t){if(!this.isMonitoring())return;this._hooks.clear(),this._pointerMoveCallback=null;let r=this._onStopCallback;this._onStopCallback=null,e&&r&&r(t)}isMonitoring(){return!!this._pointerMoveCallback}startMonitoring(e,t,r,n,o){this.isMonitoring()&&this.stopMonitoring(!1),this._pointerMoveCallback=n,this._onStopCallback=o;let i=e;try{e.setPointerCapture(t),this._hooks.add(Qt(()=>{try{e.releasePointerCapture(t)}catch{}}))}catch{i=va(e)}this._hooks.add(Be(i,to.POINTER_MOVE,a=>{if(a.buttons!==r){this.stopMonitoring(!0);return}a.preventDefault(),this._pointerMoveCallback(a)})),this._hooks.add(Be(i,to.POINTER_UP,a=>this.stopMonitoring(!0)))}};function mwe(e,t,r){let n=null,o=null;if(typeof r.value=="function"?(n="value",o=r.value,o.length!==0&&console.warn("Memoize should only be used in functions with zero parameters")):typeof r.get=="function"&&(n="get",o=r.get),!o)throw new Error("not supported");let i=`$memoize$${t}`;r[n]=function(...a){return this.hasOwnProperty(i)||Object.defineProperty(this,i,{configurable:!1,enumerable:!1,writable:!1,value:o.apply(this,a)}),this[i]}}var ga;(e=>(e.Tap="-xterm-gesturetap",e.Change="-xterm-gesturechange",e.Start="-xterm-gesturestart",e.End="-xterm-gesturesend",e.Contextmenu="-xterm-gesturecontextmenu"))(ga||(ga={}));var zb=class Fo extends Qe{constructor(){super(),this.dispatched=!1,this.targets=new jJ,this.ignoreTargets=new jJ,this.activeTouches={},this.handle=null,this._lastSetTapCountTime=0,this._register(io.runAndSubscribe(owe,({window:t,disposables:r})=>{r.add(Be(t.document,"touchstart",n=>this.onTouchStart(n),{passive:!1})),r.add(Be(t.document,"touchend",n=>this.onTouchEnd(t,n))),r.add(Be(t.document,"touchmove",n=>this.onTouchMove(n),{passive:!1}))},{window:ri,disposables:this._store}))}static addTarget(t){if(!Fo.isTouchDevice())return Qe.None;Fo.INSTANCE||(Fo.INSTANCE=BJ(new Fo));let r=Fo.INSTANCE.targets.push(t);return Qt(r)}static ignoreTarget(t){if(!Fo.isTouchDevice())return Qe.None;Fo.INSTANCE||(Fo.INSTANCE=BJ(new Fo));let r=Fo.INSTANCE.ignoreTargets.push(t);return Qt(r)}static isTouchDevice(){return"ontouchstart"in ri||navigator.maxTouchPoints>0}dispose(){this.handle&&(this.handle.dispose(),this.handle=null),super.dispose()}onTouchStart(t){let r=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(let n=0,o=t.targetTouches.length;n<o;n++){let i=t.targetTouches.item(n);this.activeTouches[i.identifier]={id:i.identifier,initialTarget:i.target,initialTimeStamp:r,initialPageX:i.pageX,initialPageY:i.pageY,rollingTimestamps:[r],rollingPageX:[i.pageX],rollingPageY:[i.pageY]};let a=this.newGestureEvent(ga.Start,i.target);a.pageX=i.pageX,a.pageY=i.pageY,this.dispatchEvent(a)}this.dispatched&&(t.preventDefault(),t.stopPropagation(),this.dispatched=!1)}onTouchEnd(t,r){let n=Date.now(),o=Object.keys(this.activeTouches).length;for(let i=0,a=r.changedTouches.length;i<a;i++){let s=r.changedTouches.item(i);if(!this.activeTouches.hasOwnProperty(String(s.identifier))){console.warn("move of an UNKNOWN touch",s);continue}let l=this.activeTouches[s.identifier],c=Date.now()-l.initialTimeStamp;if(c<Fo.HOLD_DELAY&&Math.abs(l.initialPageX-Jn(l.rollingPageX))<30&&Math.abs(l.initialPageY-Jn(l.rollingPageY))<30){let d=this.newGestureEvent(ga.Tap,l.initialTarget);d.pageX=Jn(l.rollingPageX),d.pageY=Jn(l.rollingPageY),this.dispatchEvent(d)}else if(c>=Fo.HOLD_DELAY&&Math.abs(l.initialPageX-Jn(l.rollingPageX))<30&&Math.abs(l.initialPageY-Jn(l.rollingPageY))<30){let d=this.newGestureEvent(ga.Contextmenu,l.initialTarget);d.pageX=Jn(l.rollingPageX),d.pageY=Jn(l.rollingPageY),this.dispatchEvent(d)}else if(o===1){let d=Jn(l.rollingPageX),u=Jn(l.rollingPageY),f=Jn(l.rollingTimestamps)-l.rollingTimestamps[0],m=d-l.rollingPageX[0],p=u-l.rollingPageY[0],g=[...this.targets].filter(b=>l.initialTarget instanceof Node&&b.contains(l.initialTarget));this.inertia(t,g,n,Math.abs(m)/f,m>0?1:-1,d,Math.abs(p)/f,p>0?1:-1,u)}this.dispatchEvent(this.newGestureEvent(ga.End,l.initialTarget)),delete this.activeTouches[s.identifier]}this.dispatched&&(r.preventDefault(),r.stopPropagation(),this.dispatched=!1)}newGestureEvent(t,r){let n=document.createEvent("CustomEvent");return n.initEvent(t,!1,!0),n.initialTarget=r,n.tapCount=0,n}dispatchEvent(t){if(t.type===ga.Tap){let r=new Date().getTime(),n=0;r-this._lastSetTapCountTime>Fo.CLEAR_TAP_COUNT_TIME?n=1:n=2,this._lastSetTapCountTime=r,t.tapCount=n}else(t.type===ga.Change||t.type===ga.Contextmenu)&&(this._lastSetTapCountTime=0);if(t.initialTarget instanceof Node){for(let n of this.ignoreTargets)if(n.contains(t.initialTarget))return;let r=[];for(let n of this.targets)if(n.contains(t.initialTarget)){let o=0,i=t.initialTarget;for(;i&&i!==n;)o++,i=i.parentElement;r.push([o,n])}r.sort((n,o)=>n[0]-o[0]);for(let[n,o]of r)o.dispatchEvent(t),this.dispatched=!0}}inertia(t,r,n,o,i,a,s,l,c){this.handle=RC(t,()=>{let d=Date.now(),u=d-n,f=0,m=0,p=!0;o+=Fo.SCROLL_FRICTION*u,s+=Fo.SCROLL_FRICTION*u,o>0&&(p=!1,f=i*o*u),s>0&&(p=!1,m=l*s*u);let g=this.newGestureEvent(ga.Change);g.translationX=f,g.translationY=m,r.forEach(b=>b.dispatchEvent(g)),p||this.inertia(t,r,d,o,i,a+f,s,l,c+m)})}onTouchMove(t){let r=Date.now();for(let n=0,o=t.changedTouches.length;n<o;n++){let i=t.changedTouches.item(n);if(!this.activeTouches.hasOwnProperty(String(i.identifier))){console.warn("end of an UNKNOWN touch",i);continue}let a=this.activeTouches[i.identifier],s=this.newGestureEvent(ga.Change,a.initialTarget);s.translationX=i.pageX-Jn(a.rollingPageX),s.translationY=i.pageY-Jn(a.rollingPageY),s.pageX=i.pageX,s.pageY=i.pageY,this.dispatchEvent(s),a.rollingPageX.length>3&&(a.rollingPageX.shift(),a.rollingPageY.shift(),a.rollingTimestamps.shift()),a.rollingPageX.push(i.pageX),a.rollingPageY.push(i.pageY),a.rollingTimestamps.push(r)}this.dispatched&&(t.preventDefault(),t.stopPropagation(),this.dispatched=!1)}};zb.SCROLL_FRICTION=-.005,zb.HOLD_DELAY=700,zb.CLEAR_TAP_COUNT_TIME=400,br([mwe],zb,"isTouchDevice",1);var pwe=zb,XN=class extends Qe{onclick(e,t){this._register(Be(e,to.CLICK,r=>t(new Ob(va(e),r))))}onmousedown(e,t){this._register(Be(e,to.MOUSE_DOWN,r=>t(new Ob(va(e),r))))}onmouseover(e,t){this._register(Be(e,to.MOUSE_OVER,r=>t(new Ob(va(e),r))))}onmouseleave(e,t){this._register(Be(e,to.MOUSE_LEAVE,r=>t(new Ob(va(e),r))))}onkeydown(e,t){this._register(Be(e,to.KEY_DOWN,r=>t(new bN(r))))}onkeyup(e,t){this._register(Be(e,to.KEY_UP,r=>t(new bN(r))))}oninput(e,t){this._register(Be(e,to.INPUT,t))}onblur(e,t){this._register(Be(e,to.BLUR,t))}onfocus(e,t){this._register(Be(e,to.FOCUS,t))}onchange(e,t){this._register(Be(e,to.CHANGE,t))}ignoreGesture(e){return pwe.ignoreTarget(e)}},nee=11,hwe=class extends XN{constructor(e){super(),this._onActivate=e.onActivate,this.bgDomNode=document.createElement("div"),this.bgDomNode.className="arrow-background",this.bgDomNode.style.position="absolute",this.bgDomNode.style.width=e.bgWidth+"px",this.bgDomNode.style.height=e.bgHeight+"px",typeof e.top<"u"&&(this.bgDomNode.style.top="0px"),typeof e.left<"u"&&(this.bgDomNode.style.left="0px"),typeof e.bottom<"u"&&(this.bgDomNode.style.bottom="0px"),typeof e.right<"u"&&(this.bgDomNode.style.right="0px"),this.domNode=document.createElement("div"),this.domNode.className=e.className,this.domNode.style.position="absolute",this.domNode.style.width=nee+"px",this.domNode.style.height=nee+"px",typeof e.top<"u"&&(this.domNode.style.top=e.top+"px"),typeof e.left<"u"&&(this.domNode.style.left=e.left+"px"),typeof e.bottom<"u"&&(this.domNode.style.bottom=e.bottom+"px"),typeof e.right<"u"&&(this.domNode.style.right=e.right+"px"),this._pointerMoveMonitor=this._register(new hte),this._register(ree(this.bgDomNode,to.POINTER_DOWN,t=>this._arrowPointerDown(t))),this._register(ree(this.domNode,to.POINTER_DOWN,t=>this._arrowPointerDown(t))),this._pointerdownRepeatTimer=this._register(new lwe),this._pointerdownScheduleRepeatTimer=this._register(new KN)}_arrowPointerDown(e){if(!e.target||!(e.target instanceof Element))return;let t=()=>{this._pointerdownRepeatTimer.cancelAndSet(()=>this._onActivate(),1e3/24,va(e))};this._onActivate(),this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancelAndSet(t,200),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,r=>{},()=>{this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancel()}),e.preventDefault()}},gwe=class yN{constructor(t,r,n,o,i,a,s){this._forceIntegerValues=t,this._scrollStateBrand=void 0,this._forceIntegerValues&&(r=r|0,n=n|0,o=o|0,i=i|0,a=a|0,s=s|0),this.rawScrollLeft=o,this.rawScrollTop=s,r<0&&(r=0),o+r>n&&(o=n-r),o<0&&(o=0),i<0&&(i=0),s+i>a&&(s=a-i),s<0&&(s=0),this.width=r,this.scrollWidth=n,this.scrollLeft=o,this.height=i,this.scrollHeight=a,this.scrollTop=s}equals(t){return this.rawScrollLeft===t.rawScrollLeft&&this.rawScrollTop===t.rawScrollTop&&this.width===t.width&&this.scrollWidth===t.scrollWidth&&this.scrollLeft===t.scrollLeft&&this.height===t.height&&this.scrollHeight===t.scrollHeight&&this.scrollTop===t.scrollTop}withScrollDimensions(t,r){return new yN(this._forceIntegerValues,typeof t.width<"u"?t.width:this.width,typeof t.scrollWidth<"u"?t.scrollWidth:this.scrollWidth,r?this.rawScrollLeft:this.scrollLeft,typeof t.height<"u"?t.height:this.height,typeof t.scrollHeight<"u"?t.scrollHeight:this.scrollHeight,r?this.rawScrollTop:this.scrollTop)}withScrollPosition(t){return new yN(this._forceIntegerValues,this.width,this.scrollWidth,typeof t.scrollLeft<"u"?t.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,typeof t.scrollTop<"u"?t.scrollTop:this.rawScrollTop)}createScrollEvent(t,r){let n=this.width!==t.width,o=this.scrollWidth!==t.scrollWidth,i=this.scrollLeft!==t.scrollLeft,a=this.height!==t.height,s=this.scrollHeight!==t.scrollHeight,l=this.scrollTop!==t.scrollTop;return{inSmoothScrolling:r,oldWidth:t.width,oldScrollWidth:t.scrollWidth,oldScrollLeft:t.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:t.height,oldScrollHeight:t.scrollHeight,oldScrollTop:t.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:n,scrollWidthChanged:o,scrollLeftChanged:i,heightChanged:a,scrollHeightChanged:s,scrollTopChanged:l}}},vwe=class extends Qe{constructor(e){super(),this._scrollableBrand=void 0,this._onScroll=this._register(new ce),this.onScroll=this._onScroll.event,this._smoothScrollDuration=e.smoothScrollDuration,this._scheduleAtNextAnimationFrame=e.scheduleAtNextAnimationFrame,this._state=new gwe(e.forceIntegerValues,0,0,0,0,0,0),this._smoothScrolling=null}dispose(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),super.dispose()}setSmoothScrollDuration(e){this._smoothScrollDuration=e}validateScrollPosition(e){return this._state.withScrollPosition(e)}getScrollDimensions(){return this._state}setScrollDimensions(e,t){let r=this._state.withScrollDimensions(e,t);this._setState(r,!!this._smoothScrolling),this._smoothScrolling?.acceptScrollDimensions(this._state)}getFutureScrollPosition(){return this._smoothScrolling?this._smoothScrolling.to:this._state}getCurrentScrollPosition(){return this._state}setScrollPositionNow(e){let t=this._state.withScrollPosition(e);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(t,!1)}setScrollPositionSmooth(e,t){if(this._smoothScrollDuration===0)return this.setScrollPositionNow(e);if(this._smoothScrolling){e={scrollLeft:typeof e.scrollLeft>"u"?this._smoothScrolling.to.scrollLeft:e.scrollLeft,scrollTop:typeof e.scrollTop>"u"?this._smoothScrolling.to.scrollTop:e.scrollTop};let r=this._state.withScrollPosition(e);if(this._smoothScrolling.to.scrollLeft===r.scrollLeft&&this._smoothScrolling.to.scrollTop===r.scrollTop)return;let n;t?n=new aee(this._smoothScrolling.from,r,this._smoothScrolling.startTime,this._smoothScrolling.duration):n=this._smoothScrolling.combine(this._state,r,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=n}else{let r=this._state.withScrollPosition(e);this._smoothScrolling=aee.start(this._state,r,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}hasPendingScrollAnimation(){return!!this._smoothScrolling}_performSmoothScrolling(){if(!this._smoothScrolling)return;let e=this._smoothScrolling.tick(),t=this._state.withScrollPosition(e);if(this._setState(t,!0),!!this._smoothScrolling){if(e.isDone){this._smoothScrolling.dispose(),this._smoothScrolling=null;return}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}}_setState(e,t){let r=this._state;r.equals(e)||(this._state=e,this._onScroll.fire(this._state.createScrollEvent(r,t)))}},iee=class{constructor(e,t,r){this.scrollLeft=e,this.scrollTop=t,this.isDone=r}};function Z3(e,t){let r=t-e;return function(n){return e+r*ywe(n)}}function xwe(e,t,r){return function(n){return n<r?e(n/r):t((n-r)/(1-r))}}var aee=class _N{constructor(t,r,n,o){this.from=t,this.to=r,this.duration=o,this.startTime=n,this.animationFrameDisposable=null,this._initAnimations()}_initAnimations(){this.scrollLeft=this._initAnimation(this.from.scrollLeft,this.to.scrollLeft,this.to.width),this.scrollTop=this._initAnimation(this.from.scrollTop,this.to.scrollTop,this.to.height)}_initAnimation(t,r,n){if(Math.abs(t-r)>2.5*n){let o,i;return t<r?(o=t+.75*n,i=r-.75*n):(o=t-.75*n,i=r+.75*n),xwe(Z3(t,o),Z3(i,r),.33)}return Z3(t,r)}dispose(){this.animationFrameDisposable!==null&&(this.animationFrameDisposable.dispose(),this.animationFrameDisposable=null)}acceptScrollDimensions(t){this.to=t.withScrollPosition(this.to),this._initAnimations()}tick(){return this._tick(Date.now())}_tick(t){let r=(t-this.startTime)/this.duration;if(r<1){let n=this.scrollLeft(r),o=this.scrollTop(r);return new iee(n,o,!1)}return new iee(this.to.scrollLeft,this.to.scrollTop,!0)}combine(t,r,n){return _N.start(t,r,n)}static start(t,r,n){n=n+10;let o=Date.now()-10;return new _N(t,r,o,n)}};function bwe(e){return Math.pow(e,3)}function ywe(e){return 1-bwe(1-e)}var _we=class extends Qe{constructor(e,t,r){super(),this._visibility=e,this._visibleClassName=t,this._invisibleClassName=r,this._domNode=null,this._isVisible=!1,this._isNeeded=!1,this._rawShouldBeVisible=!1,this._shouldBeVisible=!1,this._revealTimer=this._register(new KN)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this._updateShouldBeVisible())}setShouldBeVisible(e){this._rawShouldBeVisible=e,this._updateShouldBeVisible()}_applyVisibilitySetting(){return this._visibility===2?!1:this._visibility===3?!0:this._rawShouldBeVisible}_updateShouldBeVisible(){let e=this._applyVisibilitySetting();this._shouldBeVisible!==e&&(this._shouldBeVisible=e,this.ensureVisibility())}setIsNeeded(e){this._isNeeded!==e&&(this._isNeeded=e,this.ensureVisibility())}setDomNode(e){this._domNode=e,this._domNode.setClassName(this._invisibleClassName),this.setShouldBeVisible(!1)}ensureVisibility(){if(!this._isNeeded){this._hide(!1);return}this._shouldBeVisible?this._reveal():this._hide(!0)}_reveal(){this._isVisible||(this._isVisible=!0,this._revealTimer.setIfNotSet(()=>{this._domNode?.setClassName(this._visibleClassName)},0))}_hide(e){this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,this._domNode?.setClassName(this._invisibleClassName+(e?" fade":"")))}},Iwe=140,gte=class extends XN{constructor(e){super(),this._lazyRender=e.lazyRender,this._host=e.host,this._scrollable=e.scrollable,this._scrollByPage=e.scrollByPage,this._scrollbarState=e.scrollbarState,this._visibilityController=this._register(new _we(e.visibility,"visible scrollbar "+e.extraScrollbarClassName,"invisible scrollbar "+e.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._pointerMoveMonitor=this._register(new hte),this._shouldRender=!0,this.domNode=jb(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this._visibilityController.setDomNode(this.domNode),this.domNode.setPosition("absolute"),this._register(Be(this.domNode.domNode,to.POINTER_DOWN,t=>this._domNodePointerDown(t)))}_createArrow(e){let t=this._register(new hwe(e));this.domNode.domNode.appendChild(t.bgDomNode),this.domNode.domNode.appendChild(t.domNode)}_createSlider(e,t,r,n){this.slider=jb(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(e),this.slider.setLeft(t),typeof r=="number"&&this.slider.setWidth(r),typeof n=="number"&&this.slider.setHeight(n),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this._register(Be(this.slider.domNode,to.POINTER_DOWN,o=>{o.button===0&&(o.preventDefault(),this._sliderPointerDown(o))})),this.onclick(this.slider.domNode,o=>{o.leftButton&&o.stopPropagation()})}_onElementSize(e){return this._scrollbarState.setVisibleSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollSize(e){return this._scrollbarState.setScrollSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollPosition(e){return this._scrollbarState.setScrollPosition(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}beginReveal(){this._visibilityController.setShouldBeVisible(!0)}beginHide(){this._visibilityController.setShouldBeVisible(!1)}render(){this._shouldRender&&(this._shouldRender=!1,this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize()),this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition()))}_domNodePointerDown(e){e.target===this.domNode.domNode&&this._onPointerDown(e)}delegatePointerDown(e){let t=this.domNode.domNode.getClientRects()[0].top,r=t+this._scrollbarState.getSliderPosition(),n=t+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),o=this._sliderPointerPosition(e);r<=o&&o<=n?e.button===0&&(e.preventDefault(),this._sliderPointerDown(e)):this._onPointerDown(e)}_onPointerDown(e){let t,r;if(e.target===this.domNode.domNode&&typeof e.offsetX=="number"&&typeof e.offsetY=="number")t=e.offsetX,r=e.offsetY;else{let o=cwe(this.domNode.domNode);t=e.pageX-o.left,r=e.pageY-o.top}let n=this._pointerDownRelativePosition(t,r);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(n):this._scrollbarState.getDesiredScrollPositionFromOffset(n)),e.button===0&&(e.preventDefault(),this._sliderPointerDown(e))}_sliderPointerDown(e){if(!e.target||!(e.target instanceof Element))return;let t=this._sliderPointerPosition(e),r=this._sliderOrthogonalPointerPosition(e),n=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,o=>{let i=this._sliderOrthogonalPointerPosition(o),a=Math.abs(i-r);if(cte&&a>Iwe){this._setDesiredScrollPositionNow(n.getScrollPosition());return}let s=this._sliderPointerPosition(o)-t;this._setDesiredScrollPositionNow(n.getDesiredScrollPositionFromDelta(s))},()=>{this.slider.toggleClassName("active",!1),this._host.onDragEnd()}),this._host.onDragStart()}_setDesiredScrollPositionNow(e){let t={};this.writeScrollPosition(t,e),this._scrollable.setScrollPositionNow(t)}updateScrollbarSize(e){this._updateScrollbarSize(e),this._scrollbarState.setScrollbarSize(e),this._shouldRender=!0,this._lazyRender||this.render()}isNeeded(){return this._scrollbarState.isNeeded()}},vte=class IN{constructor(t,r,n,o,i,a){this._scrollbarSize=Math.round(r),this._oppositeScrollbarSize=Math.round(n),this._arrowSize=Math.round(t),this._visibleSize=o,this._scrollSize=i,this._scrollPosition=a,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new IN(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)}setVisibleSize(t){let r=Math.round(t);return this._visibleSize!==r?(this._visibleSize=r,this._refreshComputedValues(),!0):!1}setScrollSize(t){let r=Math.round(t);return this._scrollSize!==r?(this._scrollSize=r,this._refreshComputedValues(),!0):!1}setScrollPosition(t){let r=Math.round(t);return this._scrollPosition!==r?(this._scrollPosition=r,this._refreshComputedValues(),!0):!1}setScrollbarSize(t){this._scrollbarSize=Math.round(t)}setOppositeScrollbarSize(t){this._oppositeScrollbarSize=Math.round(t)}static _computeValues(t,r,n,o,i){let a=Math.max(0,n-t),s=Math.max(0,a-2*r),l=o>0&&o>n;if(!l)return{computedAvailableSize:Math.round(a),computedIsNeeded:l,computedSliderSize:Math.round(s),computedSliderRatio:0,computedSliderPosition:0};let c=Math.round(Math.max(20,Math.floor(n*s/o))),d=(s-c)/(o-n),u=i*d;return{computedAvailableSize:Math.round(a),computedIsNeeded:l,computedSliderSize:Math.round(c),computedSliderRatio:d,computedSliderPosition:Math.round(u)}}_refreshComputedValues(){let t=IN._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=t.computedAvailableSize,this._computedIsNeeded=t.computedIsNeeded,this._computedSliderSize=t.computedSliderSize,this._computedSliderRatio=t.computedSliderRatio,this._computedSliderPosition=t.computedSliderPosition}getArrowSize(){return this._arrowSize}getScrollPosition(){return this._scrollPosition}getRectangleLargeSize(){return this._computedAvailableSize}getRectangleSmallSize(){return this._scrollbarSize}isNeeded(){return this._computedIsNeeded}getSliderSize(){return this._computedSliderSize}getSliderPosition(){return this._computedSliderPosition}getDesiredScrollPositionFromOffset(t){if(!this._computedIsNeeded)return 0;let r=t-this._arrowSize-this._computedSliderSize/2;return Math.round(r/this._computedSliderRatio)}getDesiredScrollPositionFromOffsetPaged(t){if(!this._computedIsNeeded)return 0;let r=t-this._arrowSize,n=this._scrollPosition;return r<this._computedSliderPosition?n-=this._visibleSize:n+=this._visibleSize,n}getDesiredScrollPositionFromDelta(t){if(!this._computedIsNeeded)return 0;let r=this._computedSliderPosition+t;return Math.round(r/this._computedSliderRatio)}},wwe=class extends gte{constructor(e,t,r){let n=e.getScrollDimensions(),o=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:r,scrollbarState:new vte(t.horizontalHasArrows?t.arrowSize:0,t.horizontal===2?0:t.horizontalScrollbarSize,t.vertical===2?0:t.verticalScrollbarSize,n.width,n.scrollWidth,o.scrollLeft),visibility:t.horizontal,extraScrollbarClassName:"horizontal",scrollable:e,scrollByPage:t.scrollByPage}),t.horizontalHasArrows)throw new Error("horizontalHasArrows is not supported in xterm.js");this._createSlider(Math.floor((t.horizontalScrollbarSize-t.horizontalSliderSize)/2),0,void 0,t.horizontalSliderSize)}_updateSlider(e,t){this.slider.setWidth(e),this.slider.setLeft(t)}_renderDomNode(e,t){this.domNode.setWidth(e),this.domNode.setHeight(t),this.domNode.setLeft(0),this.domNode.setBottom(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(e.width)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return e}_sliderPointerPosition(e){return e.pageX}_sliderOrthogonalPointerPosition(e){return e.pageY}_updateScrollbarSize(e){this.slider.setHeight(e)}writeScrollPosition(e,t){e.scrollLeft=t}updateOptions(e){this.updateScrollbarSize(e.horizontal===2?0:e.horizontalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(e.vertical===2?0:e.verticalScrollbarSize),this._visibilityController.setVisibility(e.horizontal),this._scrollByPage=e.scrollByPage}},Swe=class extends gte{constructor(e,t,r){let n=e.getScrollDimensions(),o=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:r,scrollbarState:new vte(t.verticalHasArrows?t.arrowSize:0,t.vertical===2?0:t.verticalScrollbarSize,0,n.height,n.scrollHeight,o.scrollTop),visibility:t.vertical,extraScrollbarClassName:"vertical",scrollable:e,scrollByPage:t.scrollByPage}),t.verticalHasArrows)throw new Error("horizontalHasArrows is not supported in xterm.js");this._createSlider(0,Math.floor((t.verticalScrollbarSize-t.verticalSliderSize)/2),t.verticalSliderSize,void 0)}_updateSlider(e,t){this.slider.setHeight(e),this.slider.setTop(t)}_renderDomNode(e,t){this.domNode.setWidth(t),this.domNode.setHeight(e),this.domNode.setRight(0),this.domNode.setTop(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(e.height)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return t}_sliderPointerPosition(e){return e.pageY}_sliderOrthogonalPointerPosition(e){return e.pageX}_updateScrollbarSize(e){this.slider.setWidth(e)}writeScrollPosition(e,t){e.scrollTop=t}updateOptions(e){this.updateScrollbarSize(e.vertical===2?0:e.verticalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(0),this._visibilityController.setVisibility(e.vertical),this._scrollByPage=e.scrollByPage}},kwe=500,see=50,lee=!0,Cwe=class{constructor(e,t,r){this.timestamp=e,this.deltaX=t,this.deltaY=r,this.score=0}},wN=class{constructor(){this._capacity=5,this._memory=[],this._front=-1,this._rear=-1}isPhysicalMouseWheel(){if(this._front===-1&&this._rear===-1)return!1;let t=1,r=0,n=1,o=this._rear;do{let i=o===this._front?t:Math.pow(2,-n);if(t-=i,r+=this._memory[o].score*i,o===this._front)break;o=(this._capacity+o-1)%this._capacity,n++}while(!0);return r<=.5}acceptStandardWheelEvent(t){if(ZN){let r=va(t.browserEvent),n=I0e(r);this.accept(Date.now(),t.deltaX*n,t.deltaY*n)}else this.accept(Date.now(),t.deltaX,t.deltaY)}accept(t,r,n){let o=null,i=new Cwe(t,r,n);this._front===-1&&this._rear===-1?(this._memory[0]=i,this._front=0,this._rear=0):(o=this._memory[this._rear],this._rear=(this._rear+1)%this._capacity,this._rear===this._front&&(this._front=(this._front+1)%this._capacity),this._memory[this._rear]=i),i.score=this._computeScore(i,o)}_computeScore(t,r){if(Math.abs(t.deltaX)>0&&Math.abs(t.deltaY)>0)return 1;let n=.5;if((!this._isAlmostInt(t.deltaX)||!this._isAlmostInt(t.deltaY))&&(n+=.25),r){let o=Math.abs(t.deltaX),i=Math.abs(t.deltaY),a=Math.abs(r.deltaX),s=Math.abs(r.deltaY),l=Math.max(Math.min(o,a),1),c=Math.max(Math.min(i,s),1),d=Math.max(o,a),u=Math.max(i,s);d%l===0&&u%c===0&&(n-=.5)}return Math.min(Math.max(n,0),1)}_isAlmostInt(t){return Math.abs(Math.round(t)-t)<.01}};wN.INSTANCE=new wN;var Pwe=wN,Dwe=class extends XN{constructor(e,t,r){super(),this._onScroll=this._register(new ce),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new ce),this.onWillScroll=this._onWillScroll.event,this._options=Twe(t),this._scrollable=r,this._register(this._scrollable.onScroll(o=>{this._onWillScroll.fire(o),this._onDidScroll(o),this._onScroll.fire(o)}));let n={onMouseWheel:o=>this._onMouseWheel(o),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new Swe(this._scrollable,this._options,n)),this._horizontalScrollbar=this._register(new wwe(this._scrollable,this._options,n)),this._domNode=document.createElement("div"),this._domNode.className="xterm-scrollable-element "+this._options.className,this._domNode.setAttribute("role","presentation"),this._domNode.style.position="relative",this._domNode.appendChild(e),this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode),this._domNode.appendChild(this._verticalScrollbar.domNode.domNode),this._options.useShadows?(this._leftShadowDomNode=jb(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=jb(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=jb(document.createElement("div")),this._topLeftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topLeftShadowDomNode.domNode)):(this._leftShadowDomNode=null,this._topShadowDomNode=null,this._topLeftShadowDomNode=null),this._listenOnDomNode=this._options.listenOnDomNode||this._domNode,this._mouseWheelToDispose=[],this._setListeningToMouseWheel(this._options.handleMouseWheel),this.onmouseover(this._listenOnDomNode,o=>this._onMouseOver(o)),this.onmouseleave(this._listenOnDomNode,o=>this._onMouseLeave(o)),this._hideTimeout=this._register(new KN),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}get options(){return this._options}dispose(){this._mouseWheelToDispose=af(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarPointerDown(e){this._verticalScrollbar.delegatePointerDown(e)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(e){this._scrollable.setScrollDimensions(e,!1)}updateClassName(e){this._options.className=e,hs&&(this._options.className+=" mac"),this._domNode.className="xterm-scrollable-element "+this._options.className}updateOptions(e){typeof e.handleMouseWheel<"u"&&(this._options.handleMouseWheel=e.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),typeof e.mouseWheelScrollSensitivity<"u"&&(this._options.mouseWheelScrollSensitivity=e.mouseWheelScrollSensitivity),typeof e.fastScrollSensitivity<"u"&&(this._options.fastScrollSensitivity=e.fastScrollSensitivity),typeof e.scrollPredominantAxis<"u"&&(this._options.scrollPredominantAxis=e.scrollPredominantAxis),typeof e.horizontal<"u"&&(this._options.horizontal=e.horizontal),typeof e.vertical<"u"&&(this._options.vertical=e.vertical),typeof e.horizontalScrollbarSize<"u"&&(this._options.horizontalScrollbarSize=e.horizontalScrollbarSize),typeof e.verticalScrollbarSize<"u"&&(this._options.verticalScrollbarSize=e.verticalScrollbarSize),typeof e.scrollByPage<"u"&&(this._options.scrollByPage=e.scrollByPage),this._horizontalScrollbar.updateOptions(this._options),this._verticalScrollbar.updateOptions(this._options),this._options.lazyRender||this._render()}setRevealOnScroll(e){this._revealOnScroll=e}delegateScrollFromMouseWheelEvent(e){this._onMouseWheel(new qJ(e))}_setListeningToMouseWheel(e){if(this._mouseWheelToDispose.length>0!==e&&(this._mouseWheelToDispose=af(this._mouseWheelToDispose),e)){let t=r=>{this._onMouseWheel(new qJ(r))};this._mouseWheelToDispose.push(Be(this._listenOnDomNode,to.MOUSE_WHEEL,t,{passive:!1}))}}_onMouseWheel(e){if(e.browserEvent?.defaultPrevented)return;let t=Pwe.INSTANCE;lee&&t.acceptStandardWheelEvent(e);let r=!1;if(e.deltaY||e.deltaX){let o=e.deltaY*this._options.mouseWheelScrollSensitivity,i=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(this._options.scrollYToX&&i+o===0?i=o=0:Math.abs(o)>=Math.abs(i)?i=0:o=0),this._options.flipAxes&&([o,i]=[i,o]);let a=!hs&&e.browserEvent&&e.browserEvent.shiftKey;(this._options.scrollYToX||a)&&!i&&(i=o,o=0),e.browserEvent&&e.browserEvent.altKey&&(i=i*this._options.fastScrollSensitivity,o=o*this._options.fastScrollSensitivity);let s=this._scrollable.getFutureScrollPosition(),l={};if(o){let c=see*o,d=s.scrollTop-(c<0?Math.floor(c):Math.ceil(c));this._verticalScrollbar.writeScrollPosition(l,d)}if(i){let c=see*i,d=s.scrollLeft-(c<0?Math.floor(c):Math.ceil(c));this._horizontalScrollbar.writeScrollPosition(l,d)}l=this._scrollable.validateScrollPosition(l),(s.scrollLeft!==l.scrollLeft||s.scrollTop!==l.scrollTop)&&(lee&&this._options.mouseWheelSmoothScroll&&t.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(l):this._scrollable.setScrollPositionNow(l),r=!0)}let n=r;!n&&this._options.alwaysConsumeMouseWheel&&(n=!0),!n&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())&&(n=!0),n&&(e.preventDefault(),e.stopPropagation())}_onDidScroll(e){this._shouldRender=this._horizontalScrollbar.onDidScroll(e)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(e)||this._shouldRender,this._options.useShadows&&(this._shouldRender=!0),this._revealOnScroll&&this._reveal(),this._options.lazyRender||this._render()}renderNow(){if(!this._options.lazyRender)throw new Error("Please use `lazyRender` together with `renderNow`!");this._render()}_render(){if(this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){let e=this._scrollable.getCurrentScrollPosition(),t=e.scrollTop>0,r=e.scrollLeft>0,n=r?" left":"",o=t?" top":"",i=r||t?" top-left-corner":"";this._leftShadowDomNode.setClassName(`shadow${n}`),this._topShadowDomNode.setClassName(`shadow${o}`),this._topLeftShadowDomNode.setClassName(`shadow${i}${o}${n}`)}}_onDragStart(){this._isDragging=!0,this._reveal()}_onDragEnd(){this._isDragging=!1,this._hide()}_onMouseLeave(e){this._mouseIsOver=!1,this._hide()}_onMouseOver(e){this._mouseIsOver=!0,this._reveal()}_reveal(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()}_hide(){!this._mouseIsOver&&!this._isDragging&&(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())}_scheduleHide(){!this._mouseIsOver&&!this._isDragging&&this._hideTimeout.cancelAndSet(()=>this._hide(),kwe)}},Rwe=class extends Dwe{constructor(e,t,r){super(e,t,r)}setScrollPosition(e){e.reuseAnimation?this._scrollable.setScrollPositionSmooth(e,e.reuseAnimation):this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}};function Twe(e){let t={lazyRender:typeof e.lazyRender<"u"?e.lazyRender:!1,className:typeof e.className<"u"?e.className:"",useShadows:typeof e.useShadows<"u"?e.useShadows:!0,handleMouseWheel:typeof e.handleMouseWheel<"u"?e.handleMouseWheel:!0,flipAxes:typeof e.flipAxes<"u"?e.flipAxes:!1,consumeMouseWheelIfScrollbarIsNeeded:typeof e.consumeMouseWheelIfScrollbarIsNeeded<"u"?e.consumeMouseWheelIfScrollbarIsNeeded:!1,alwaysConsumeMouseWheel:typeof e.alwaysConsumeMouseWheel<"u"?e.alwaysConsumeMouseWheel:!1,scrollYToX:typeof e.scrollYToX<"u"?e.scrollYToX:!1,mouseWheelScrollSensitivity:typeof e.mouseWheelScrollSensitivity<"u"?e.mouseWheelScrollSensitivity:1,fastScrollSensitivity:typeof e.fastScrollSensitivity<"u"?e.fastScrollSensitivity:5,scrollPredominantAxis:typeof e.scrollPredominantAxis<"u"?e.scrollPredominantAxis:!0,mouseWheelSmoothScroll:typeof e.mouseWheelSmoothScroll<"u"?e.mouseWheelSmoothScroll:!0,arrowSize:typeof e.arrowSize<"u"?e.arrowSize:11,listenOnDomNode:typeof e.listenOnDomNode<"u"?e.listenOnDomNode:null,horizontal:typeof e.horizontal<"u"?e.horizontal:1,horizontalScrollbarSize:typeof e.horizontalScrollbarSize<"u"?e.horizontalScrollbarSize:10,horizontalSliderSize:typeof e.horizontalSliderSize<"u"?e.horizontalSliderSize:0,horizontalHasArrows:typeof e.horizontalHasArrows<"u"?e.horizontalHasArrows:!1,vertical:typeof e.vertical<"u"?e.vertical:1,verticalScrollbarSize:typeof e.verticalScrollbarSize<"u"?e.verticalScrollbarSize:10,verticalHasArrows:typeof e.verticalHasArrows<"u"?e.verticalHasArrows:!1,verticalSliderSize:typeof e.verticalSliderSize<"u"?e.verticalSliderSize:0,scrollByPage:typeof e.scrollByPage<"u"?e.scrollByPage:!1};return t.horizontalSliderSize=typeof e.horizontalSliderSize<"u"?e.horizontalSliderSize:t.horizontalScrollbarSize,t.verticalSliderSize=typeof e.verticalSliderSize<"u"?e.verticalSliderSize:t.verticalScrollbarSize,hs&&(t.className+=" mac"),t}var SN=class extends Qe{constructor(e,t,r,n,o,i,a,s){super(),this._bufferService=r,this._optionsService=a,this._renderService=s,this._onRequestScrollLines=this._register(new ce),this.onRequestScrollLines=this._onRequestScrollLines.event,this._isSyncing=!1,this._isHandlingScroll=!1,this._suppressOnScrollHandler=!1;let l=this._register(new vwe({forceIntegerValues:!1,smoothScrollDuration:this._optionsService.rawOptions.smoothScrollDuration,scheduleAtNextAnimationFrame:c=>RC(n.window,c)}));this._register(this._optionsService.onSpecificOptionChange("smoothScrollDuration",()=>{l.setSmoothScrollDuration(this._optionsService.rawOptions.smoothScrollDuration)})),this._scrollableElement=this._register(new Rwe(t,{vertical:1,horizontal:2,useShadows:!1,mouseWheelSmoothScroll:!0,...this._getChangeOptions()},l)),this._register(this._optionsService.onMultipleOptionChange(["scrollSensitivity","fastScrollSensitivity","overviewRuler"],()=>this._scrollableElement.updateOptions(this._getChangeOptions()))),this._register(o.onProtocolChange(c=>{this._scrollableElement.updateOptions({handleMouseWheel:!(c&16)})})),this._scrollableElement.setScrollDimensions({height:0,scrollHeight:0}),this._register(io.runAndSubscribe(i.onChangeColors,()=>{this._scrollableElement.getDomNode().style.backgroundColor=i.colors.background.css})),e.appendChild(this._scrollableElement.getDomNode()),this._register(Qt(()=>this._scrollableElement.getDomNode().remove())),this._styleElement=n.mainDocument.createElement("style"),t.appendChild(this._styleElement),this._register(Qt(()=>this._styleElement.remove())),this._register(io.runAndSubscribe(i.onChangeColors,()=>{this._styleElement.textContent=[".xterm .xterm-scrollable-element > .scrollbar > .slider {",` background: ${i.colors.scrollbarSliderBackground.css};`,"}",".xterm .xterm-scrollable-element > .scrollbar > .slider:hover {",` background: ${i.colors.scrollbarSliderHoverBackground.css};`,"}",".xterm .xterm-scrollable-element > .scrollbar > .slider.active {",` background: ${i.colors.scrollbarSliderActiveBackground.css};`,"}"].join(`
|
|
212
|
+
`)})),this._register(this._bufferService.onResize(()=>this.queueSync())),this._register(this._bufferService.buffers.onBufferActivate(()=>{this._latestYDisp=void 0,this.queueSync()})),this._register(this._bufferService.onScroll(()=>this._sync())),this._register(this._scrollableElement.onScroll(c=>this._handleScroll(c)))}scrollLines(e){let t=this._scrollableElement.getScrollPosition();this._scrollableElement.setScrollPosition({reuseAnimation:!0,scrollTop:t.scrollTop+e*this._renderService.dimensions.css.cell.height})}scrollToLine(e,t){t&&(this._latestYDisp=e),this._scrollableElement.setScrollPosition({reuseAnimation:!t,scrollTop:e*this._renderService.dimensions.css.cell.height})}_getChangeOptions(){return{mouseWheelScrollSensitivity:this._optionsService.rawOptions.scrollSensitivity,fastScrollSensitivity:this._optionsService.rawOptions.fastScrollSensitivity,verticalScrollbarSize:this._optionsService.rawOptions.overviewRuler?.width||14}}queueSync(e){e!==void 0&&(this._latestYDisp=e),this._queuedAnimationFrame===void 0&&(this._queuedAnimationFrame=this._renderService.addRefreshCallback(()=>{this._queuedAnimationFrame=void 0,this._sync(this._latestYDisp)}))}_sync(e=this._bufferService.buffer.ydisp){!this._renderService||this._isSyncing||(this._isSyncing=!0,this._suppressOnScrollHandler=!0,this._scrollableElement.setScrollDimensions({height:this._renderService.dimensions.css.canvas.height,scrollHeight:this._renderService.dimensions.css.cell.height*this._bufferService.buffer.lines.length}),this._suppressOnScrollHandler=!1,e!==this._latestYDisp&&this._scrollableElement.setScrollPosition({scrollTop:e*this._renderService.dimensions.css.cell.height}),this._isSyncing=!1)}_handleScroll(e){if(!this._renderService||this._isHandlingScroll||this._suppressOnScrollHandler)return;this._isHandlingScroll=!0;let t=Math.round(e.scrollTop/this._renderService.dimensions.css.cell.height),r=t-this._bufferService.buffer.ydisp;r!==0&&(this._latestYDisp=t,this._onRequestScrollLines.fire(r)),this._isHandlingScroll=!1}};SN=br([ye(2,dn),ye(3,yl),ye(4,Wee),ye(5,_h),ye(6,un),ye(7,_l)],SN);var kN=class extends Qe{constructor(e,t,r,n,o){super(),this._screenElement=e,this._bufferService=t,this._coreBrowserService=r,this._decorationService=n,this._renderService=o,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement("div"),this._container.classList.add("xterm-decoration-container"),this._screenElement.appendChild(this._container),this._register(this._renderService.onRenderedViewportChange(()=>this._doRefreshDecorations())),this._register(this._renderService.onDimensionsChange(()=>{this._dimensionsChanged=!0,this._queueRefresh()})),this._register(this._coreBrowserService.onDprChange(()=>this._queueRefresh())),this._register(this._bufferService.buffers.onBufferActivate(()=>{this._altBufferIsActive=this._bufferService.buffer===this._bufferService.buffers.alt})),this._register(this._decorationService.onDecorationRegistered(()=>this._queueRefresh())),this._register(this._decorationService.onDecorationRemoved(i=>this._removeDecoration(i))),this._register(Qt(()=>{this._container.remove(),this._decorationElements.clear()}))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback(()=>{this._doRefreshDecorations(),this._animationFrame=void 0}))}_doRefreshDecorations(){for(let e of this._decorationService.decorations)this._renderDecoration(e);this._dimensionsChanged=!1}_renderDecoration(e){this._refreshStyle(e),this._dimensionsChanged&&this._refreshXPosition(e)}_createElement(e){let t=this._coreBrowserService.mainDocument.createElement("div");t.classList.add("xterm-decoration"),t.classList.toggle("xterm-decoration-top-layer",e?.options?.layer==="top"),t.style.width=`${Math.round((e.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,t.style.height=`${(e.options.height||1)*this._renderService.dimensions.css.cell.height}px`,t.style.top=`${(e.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height}px`,t.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;let r=e.options.x??0;return r&&r>this._bufferService.cols&&(t.style.display="none"),this._refreshXPosition(e,t),t}_refreshStyle(e){let t=e.marker.line-this._bufferService.buffers.active.ydisp;if(t<0||t>=this._bufferService.rows)e.element&&(e.element.style.display="none",e.onRenderEmitter.fire(e.element));else{let r=this._decorationElements.get(e);r||(r=this._createElement(e),e.element=r,this._decorationElements.set(e,r),this._container.appendChild(r),e.onDispose(()=>{this._decorationElements.delete(e),r.remove()})),r.style.display=this._altBufferIsActive?"none":"block",this._altBufferIsActive||(r.style.width=`${Math.round((e.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,r.style.height=`${(e.options.height||1)*this._renderService.dimensions.css.cell.height}px`,r.style.top=`${t*this._renderService.dimensions.css.cell.height}px`,r.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`),e.onRenderEmitter.fire(r)}}_refreshXPosition(e,t=e.element){if(!t)return;let r=e.options.x??0;(e.options.anchor||"left")==="right"?t.style.right=r?`${r*this._renderService.dimensions.css.cell.width}px`:"":t.style.left=r?`${r*this._renderService.dimensions.css.cell.width}px`:""}_removeDecoration(e){this._decorationElements.get(e)?.remove(),this._decorationElements.delete(e),e.dispose()}};kN=br([ye(1,dn),ye(2,yl),ye(3,qb),ye(4,_l)],kN);var Ewe=class{constructor(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}get zones(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones}clear(){this._zones.length=0,this._zonePoolIndex=0}addDecoration(e){if(e.options.overviewRulerOptions){for(let t of this._zones)if(t.color===e.options.overviewRulerOptions.color&&t.position===e.options.overviewRulerOptions.position){if(this._lineIntersectsZone(t,e.marker.line))return;if(this._lineAdjacentToZone(t,e.marker.line,e.options.overviewRulerOptions.position)){this._addLineToZone(t,e.marker.line);return}}if(this._zonePoolIndex<this._zonePool.length){this._zonePool[this._zonePoolIndex].color=e.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=e.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=e.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=e.marker.line,this._zones.push(this._zonePool[this._zonePoolIndex++]);return}this._zones.push({color:e.options.overviewRulerOptions.color,position:e.options.overviewRulerOptions.position,startBufferLine:e.marker.line,endBufferLine:e.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(e){this._linePadding=e}_lineIntersectsZone(e,t){return t>=e.startBufferLine&&t<=e.endBufferLine}_lineAdjacentToZone(e,t,r){return t>=e.startBufferLine-this._linePadding[r||"full"]&&t<=e.endBufferLine+this._linePadding[r||"full"]}_addLineToZone(e,t){e.startBufferLine=Math.min(e.startBufferLine,t),e.endBufferLine=Math.max(e.endBufferLine,t)}},ms={full:0,left:0,center:0,right:0},Jc={full:0,left:0,center:0,right:0},Db={full:0,left:0,center:0,right:0},TC=class extends Qe{constructor(e,t,r,n,o,i,a,s){super(),this._viewportElement=e,this._screenElement=t,this._bufferService=r,this._decorationService=n,this._renderService=o,this._optionsService=i,this._themeService=a,this._coreBrowserService=s,this._colorZoneStore=new Ewe,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add("xterm-decoration-overview-ruler"),this._refreshCanvasDimensions(),this._viewportElement.parentElement?.insertBefore(this._canvas,this._viewportElement),this._register(Qt(()=>this._canvas?.remove()));let l=this._canvas.getContext("2d");if(l)this._ctx=l;else throw new Error("Ctx cannot be null");this._register(this._decorationService.onDecorationRegistered(()=>this._queueRefresh(void 0,!0))),this._register(this._decorationService.onDecorationRemoved(()=>this._queueRefresh(void 0,!0))),this._register(this._renderService.onRenderedViewportChange(()=>this._queueRefresh())),this._register(this._bufferService.buffers.onBufferActivate(()=>{this._canvas.style.display=this._bufferService.buffer===this._bufferService.buffers.alt?"none":"block"})),this._register(this._bufferService.onScroll(()=>{this._lastKnownBufferLength!==this._bufferService.buffers.normal.lines.length&&(this._refreshDrawHeightConstants(),this._refreshColorZonePadding())})),this._register(this._renderService.onRender(()=>{(!this._containerHeight||this._containerHeight!==this._screenElement.clientHeight)&&(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)})),this._register(this._coreBrowserService.onDprChange(()=>this._queueRefresh(!0))),this._register(this._optionsService.onSpecificOptionChange("overviewRuler",()=>this._queueRefresh(!0))),this._register(this._themeService.onChangeColors(()=>this._queueRefresh())),this._queueRefresh(!0)}get _width(){return this._optionsService.options.overviewRuler?.width||0}_refreshDrawConstants(){let e=Math.floor((this._canvas.width-1)/3),t=Math.ceil((this._canvas.width-1)/3);Jc.full=this._canvas.width,Jc.left=e,Jc.center=t,Jc.right=e,this._refreshDrawHeightConstants(),Db.full=1,Db.left=1,Db.center=1+Jc.left,Db.right=1+Jc.left+Jc.center}_refreshDrawHeightConstants(){ms.full=Math.round(2*this._coreBrowserService.dpr);let e=this._canvas.height/this._bufferService.buffer.lines.length,t=Math.round(Math.max(Math.min(e,12),6)*this._coreBrowserService.dpr);ms.left=t,ms.center=t,ms.right=t}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*ms.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*ms.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*ms.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*ms.right)}),this._lastKnownBufferLength=this._bufferService.buffers.normal.lines.length}_refreshCanvasDimensions(){this._canvas.style.width=`${this._width}px`,this._canvas.width=Math.round(this._width*this._coreBrowserService.dpr),this._canvas.style.height=`${this._screenElement.clientHeight}px`,this._canvas.height=Math.round(this._screenElement.clientHeight*this._coreBrowserService.dpr),this._refreshDrawConstants(),this._refreshColorZonePadding()}_refreshDecorations(){this._shouldUpdateDimensions&&this._refreshCanvasDimensions(),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._colorZoneStore.clear();for(let t of this._decorationService.decorations)this._colorZoneStore.addDecoration(t);this._ctx.lineWidth=1,this._renderRulerOutline();let e=this._colorZoneStore.zones;for(let t of e)t.position!=="full"&&this._renderColorZone(t);for(let t of e)t.position==="full"&&this._renderColorZone(t);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderRulerOutline(){this._ctx.fillStyle=this._themeService.colors.overviewRulerBorder.css,this._ctx.fillRect(0,0,1,this._canvas.height),this._optionsService.rawOptions.overviewRuler.showTopBorder&&this._ctx.fillRect(1,0,this._canvas.width-1,1),this._optionsService.rawOptions.overviewRuler.showBottomBorder&&this._ctx.fillRect(1,this._canvas.height-1,this._canvas.width-1,this._canvas.height)}_renderColorZone(e){this._ctx.fillStyle=e.color,this._ctx.fillRect(Db[e.position||"full"],Math.round((this._canvas.height-1)*(e.startBufferLine/this._bufferService.buffers.active.lines.length)-ms[e.position||"full"]/2),Jc[e.position||"full"],Math.round((this._canvas.height-1)*((e.endBufferLine-e.startBufferLine)/this._bufferService.buffers.active.lines.length)+ms[e.position||"full"]))}_queueRefresh(e,t){this._shouldUpdateDimensions=e||this._shouldUpdateDimensions,this._shouldUpdateAnchor=t||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._refreshDecorations(),this._animationFrame=void 0}))}};TC=br([ye(2,dn),ye(3,qb),ye(4,_l),ye(5,un),ye(6,_h),ye(7,yl)],TC);var te;(e=>(e.NUL="\0",e.SOH="",e.STX="",e.ETX="",e.EOT="",e.ENQ="",e.ACK="",e.BEL="\x07",e.BS="\b",e.HT=" ",e.LF=`
|
|
213
|
+
`,e.VT="\v",e.FF="\f",e.CR="\r",e.SO="",e.SI="",e.DLE="",e.DC1="",e.DC2="",e.DC3="",e.DC4="",e.NAK="",e.SYN="",e.ETB="",e.CAN="",e.EM="",e.SUB="",e.ESC="\x1B",e.FS="",e.GS="",e.RS="",e.US="",e.SP=" ",e.DEL="\x7F"))(te||(te={}));var Ub;(e=>(e.PAD="\x80",e.HOP="\x81",e.BPH="\x82",e.NBH="\x83",e.IND="\x84",e.NEL="\x85",e.SSA="\x86",e.ESA="\x87",e.HTS="\x88",e.HTJ="\x89",e.VTS="\x8A",e.PLD="\x8B",e.PLU="\x8C",e.RI="\x8D",e.SS2="\x8E",e.SS3="\x8F",e.DCS="\x90",e.PU1="\x91",e.PU2="\x92",e.STS="\x93",e.CCH="\x94",e.MW="\x95",e.SPA="\x96",e.EPA="\x97",e.SOS="\x98",e.SGCI="\x99",e.SCI="\x9A",e.CSI="\x9B",e.ST="\x9C",e.OSC="\x9D",e.PM="\x9E",e.APC="\x9F"))(Ub||(Ub={}));var CN;(e=>e.ST=`${te.ESC}\\`)(CN||(CN={}));var PN=class{constructor(e,t,r,n,o,i){this._textarea=e,this._compositionView=t,this._bufferService=r,this._optionsService=n,this._coreService=o,this._renderService=i,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}get isComposing(){return this._isComposing}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")}compositionupdate(e){this._compositionView.textContent=e.data,this.updateCompositionElements(),setTimeout(()=>{this._compositionPosition.end=this._textarea.value.length},0)}compositionend(){this._finalizeComposition(!0)}keydown(e){if(this._isComposing||this._isSendingComposition){if(e.keyCode===20||e.keyCode===229||e.keyCode===16||e.keyCode===17||e.keyCode===18)return!1;this._finalizeComposition(!1)}return e.keyCode===229?(this._handleAnyTextareaChanges(),!1):!0}_finalizeComposition(e){if(this._compositionView.classList.remove("active"),this._isComposing=!1,e){let t={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(()=>{if(this._isSendingComposition){this._isSendingComposition=!1;let r;t.start+=this._dataAlreadySent.length,this._isComposing?r=this._textarea.value.substring(t.start,this._compositionPosition.start):r=this._textarea.value.substring(t.start),r.length>0&&this._coreService.triggerDataEvent(r,!0)}},0)}else{this._isSendingComposition=!1;let t=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(t,!0)}}_handleAnyTextareaChanges(){let e=this._textarea.value;setTimeout(()=>{if(!this._isComposing){let t=this._textarea.value,r=t.replace(e,"");this._dataAlreadySent=r,t.length>e.length?this._coreService.triggerDataEvent(r,!0):t.length<e.length?this._coreService.triggerDataEvent(`${te.DEL}`,!0):t.length===e.length&&t!==e&&this._coreService.triggerDataEvent(t,!0)}},0)}updateCompositionElements(e){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){let t=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),r=this._renderService.dimensions.css.cell.height,n=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,o=t*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=o+"px",this._compositionView.style.top=n+"px",this._compositionView.style.height=r+"px",this._compositionView.style.lineHeight=r+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";let i=this._compositionView.getBoundingClientRect();this._textarea.style.left=o+"px",this._textarea.style.top=n+"px",this._textarea.style.width=Math.max(i.width,1)+"px",this._textarea.style.height=Math.max(i.height,1)+"px",this._textarea.style.lineHeight=i.height+"px"}e||setTimeout(()=>this.updateCompositionElements(!0),0)}}};PN=br([ye(2,dn),ye(3,un),ye(4,lf),ye(5,_l)],PN);var ro=0,oo=0,no=0,xr=0,cee={css:"#00000000",rgba:0},Cr;(e=>{function t(o,i,a,s){return s!==void 0?`#${ef(o)}${ef(i)}${ef(a)}${ef(s)}`:`#${ef(o)}${ef(i)}${ef(a)}`}e.toCss=t;function r(o,i,a,s=255){return(o<<24|i<<16|a<<8|s)>>>0}e.toRgba=r;function n(o,i,a,s){return{css:e.toCss(o,i,a,s),rgba:e.toRgba(o,i,a,s)}}e.toColor=n})(Cr||(Cr={}));var Ut;(e=>{function t(l,c){if(xr=(c.rgba&255)/255,xr===1)return{css:c.css,rgba:c.rgba};let d=c.rgba>>24&255,u=c.rgba>>16&255,f=c.rgba>>8&255,m=l.rgba>>24&255,p=l.rgba>>16&255,g=l.rgba>>8&255;ro=m+Math.round((d-m)*xr),oo=p+Math.round((u-p)*xr),no=g+Math.round((f-g)*xr);let b=Cr.toCss(ro,oo,no),v=Cr.toRgba(ro,oo,no);return{css:b,rgba:v}}e.blend=t;function r(l){return(l.rgba&255)===255}e.isOpaque=r;function n(l,c,d){let u=Vb.ensureContrastRatio(l.rgba,c.rgba,d);if(u)return Cr.toColor(u>>24&255,u>>16&255,u>>8&255)}e.ensureContrastRatio=n;function o(l){let c=(l.rgba|255)>>>0;return[ro,oo,no]=Vb.toChannels(c),{css:Cr.toCss(ro,oo,no),rgba:c}}e.opaque=o;function i(l,c){return xr=Math.round(c*255),[ro,oo,no]=Vb.toChannels(l.rgba),{css:Cr.toCss(ro,oo,no,xr),rgba:Cr.toRgba(ro,oo,no,xr)}}e.opacity=i;function a(l,c){return xr=l.rgba&255,i(l,xr*c/255)}e.multiplyOpacity=a;function s(l){return[l.rgba>>24&255,l.rgba>>16&255,l.rgba>>8&255]}e.toColorRGB=s})(Ut||(Ut={}));var ir;(e=>{let t,r;try{let o=document.createElement("canvas");o.width=1,o.height=1;let i=o.getContext("2d",{willReadFrequently:!0});i&&(t=i,t.globalCompositeOperation="copy",r=t.createLinearGradient(0,0,1,1))}catch{}function n(o){if(o.match(/#[\da-f]{3,8}/i))switch(o.length){case 4:return ro=parseInt(o.slice(1,2).repeat(2),16),oo=parseInt(o.slice(2,3).repeat(2),16),no=parseInt(o.slice(3,4).repeat(2),16),Cr.toColor(ro,oo,no);case 5:return ro=parseInt(o.slice(1,2).repeat(2),16),oo=parseInt(o.slice(2,3).repeat(2),16),no=parseInt(o.slice(3,4).repeat(2),16),xr=parseInt(o.slice(4,5).repeat(2),16),Cr.toColor(ro,oo,no,xr);case 7:return{css:o,rgba:(parseInt(o.slice(1),16)<<8|255)>>>0};case 9:return{css:o,rgba:parseInt(o.slice(1),16)>>>0}}let i=o.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(i)return ro=parseInt(i[1]),oo=parseInt(i[2]),no=parseInt(i[3]),xr=Math.round((i[5]===void 0?1:parseFloat(i[5]))*255),Cr.toColor(ro,oo,no,xr);if(!t||!r)throw new Error("css.toColor: Unsupported css format");if(t.fillStyle=r,t.fillStyle=o,typeof t.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(t.fillRect(0,0,1,1),[ro,oo,no,xr]=t.getImageData(0,0,1,1).data,xr!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:Cr.toRgba(ro,oo,no,xr),css:o}}e.toColor=n})(ir||(ir={}));var Lo;(e=>{function t(n){return r(n>>16&255,n>>8&255,n&255)}e.relativeLuminance=t;function r(n,o,i){let a=n/255,s=o/255,l=i/255,c=a<=.03928?a/12.92:Math.pow((a+.055)/1.055,2.4),d=s<=.03928?s/12.92:Math.pow((s+.055)/1.055,2.4),u=l<=.03928?l/12.92:Math.pow((l+.055)/1.055,2.4);return c*.2126+d*.7152+u*.0722}e.relativeLuminance2=r})(Lo||(Lo={}));var Vb;(e=>{function t(a,s){if(xr=(s&255)/255,xr===1)return s;let l=s>>24&255,c=s>>16&255,d=s>>8&255,u=a>>24&255,f=a>>16&255,m=a>>8&255;return ro=u+Math.round((l-u)*xr),oo=f+Math.round((c-f)*xr),no=m+Math.round((d-m)*xr),Cr.toRgba(ro,oo,no)}e.blend=t;function r(a,s,l){let c=Lo.relativeLuminance(a>>8),d=Lo.relativeLuminance(s>>8);if(gl(c,d)<l){if(d<c){let m=n(a,s,l),p=gl(c,Lo.relativeLuminance(m>>8));if(p<l){let g=o(a,s,l),b=gl(c,Lo.relativeLuminance(g>>8));return p>b?m:g}return m}let u=o(a,s,l),f=gl(c,Lo.relativeLuminance(u>>8));if(f<l){let m=n(a,s,l),p=gl(c,Lo.relativeLuminance(m>>8));return f>p?u:m}return u}}e.ensureContrastRatio=r;function n(a,s,l){let c=a>>24&255,d=a>>16&255,u=a>>8&255,f=s>>24&255,m=s>>16&255,p=s>>8&255,g=gl(Lo.relativeLuminance2(f,m,p),Lo.relativeLuminance2(c,d,u));for(;g<l&&(f>0||m>0||p>0);)f-=Math.max(0,Math.ceil(f*.1)),m-=Math.max(0,Math.ceil(m*.1)),p-=Math.max(0,Math.ceil(p*.1)),g=gl(Lo.relativeLuminance2(f,m,p),Lo.relativeLuminance2(c,d,u));return(f<<24|m<<16|p<<8|255)>>>0}e.reduceLuminance=n;function o(a,s,l){let c=a>>24&255,d=a>>16&255,u=a>>8&255,f=s>>24&255,m=s>>16&255,p=s>>8&255,g=gl(Lo.relativeLuminance2(f,m,p),Lo.relativeLuminance2(c,d,u));for(;g<l&&(f<255||m<255||p<255);)f=Math.min(255,f+Math.ceil((255-f)*.1)),m=Math.min(255,m+Math.ceil((255-m)*.1)),p=Math.min(255,p+Math.ceil((255-p)*.1)),g=gl(Lo.relativeLuminance2(f,m,p),Lo.relativeLuminance2(c,d,u));return(f<<24|m<<16|p<<8|255)>>>0}e.increaseLuminance=o;function i(a){return[a>>24&255,a>>16&255,a>>8&255,a&255]}e.toChannels=i})(Vb||(Vb={}));function ef(e){let t=e.toString(16);return t.length<2?"0"+t:t}function gl(e,t){return e<t?(t+.05)/(e+.05):(e+.05)/(t+.05)}var $we=class extends Kb{constructor(e,t,r){super(),this.content=0,this.combinedData="",this.fg=e.fg,this.bg=e.bg,this.combinedData=t,this._width=r}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(e){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},EC=class{constructor(e){this._bufferService=e,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new Fi}register(e){let t={id:this._nextCharacterJoinerId++,handler:e};return this._characterJoiners.push(t),t.id}deregister(e){for(let t=0;t<this._characterJoiners.length;t++)if(this._characterJoiners[t].id===e)return this._characterJoiners.splice(t,1),!0;return!1}getJoinedCharacters(e){if(this._characterJoiners.length===0)return[];let t=this._bufferService.buffer.lines.get(e);if(!t||t.length===0)return[];let r=[],n=t.translateToString(!0),o=0,i=0,a=0,s=t.getFg(0),l=t.getBg(0);for(let c=0;c<t.getTrimmedLength();c++)if(t.loadCell(c,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==s||this._workCell.bg!==l){if(c-o>1){let d=this._getJoinedRanges(n,a,i,t,o);for(let u=0;u<d.length;u++)r.push(d[u])}o=c,a=i,s=this._workCell.fg,l=this._workCell.bg}i+=this._workCell.getChars().length||rd.length}if(this._bufferService.cols-o>1){let c=this._getJoinedRanges(n,a,i,t,o);for(let d=0;d<c.length;d++)r.push(c[d])}return r}_getJoinedRanges(e,t,r,n,o){let i=e.substring(t,r),a=[];try{a=this._characterJoiners[0].handler(i)}catch(s){console.error(s)}for(let s=1;s<this._characterJoiners.length;s++)try{let l=this._characterJoiners[s].handler(i);for(let c=0;c<l.length;c++)EC._mergeRanges(a,l[c])}catch(l){console.error(l)}return this._stringRangesToCellRanges(a,n,o),a}_stringRangesToCellRanges(e,t,r){let n=0,o=!1,i=0,a=e[n];if(a){for(let s=r;s<this._bufferService.cols;s++){let l=t.getWidth(s),c=t.getString(s).length||rd.length;if(l!==0){if(!o&&a[0]<=i&&(a[0]=s,o=!0),a[1]<=i){if(a[1]=s,a=e[++n],!a)break;a[0]<=i?(a[0]=s,o=!0):o=!1}i+=c}}a&&(a[1]=this._bufferService.cols)}}static _mergeRanges(e,t){let r=!1;for(let n=0;n<e.length;n++){let o=e[n];if(r){if(t[1]<=o[0])return e[n-1][1]=t[1],e;if(t[1]<=o[1])return e[n-1][1]=Math.max(t[1],o[1]),e.splice(n,1),e;e.splice(n,1),n--}else{if(t[1]<=o[0])return e.splice(n,0,t),e;if(t[1]<=o[1])return o[0]=Math.min(t[0],o[0]),e;t[0]<o[1]&&(o[0]=Math.min(t[0],o[0]),r=!0);continue}}return r?e[e.length-1][1]=t[1]:e.push(t),e}};EC=br([ye(0,dn)],EC);function Awe(e){return 57508<=e&&e<=57558}function Owe(e){return 9472<=e&&e<=9631}function zwe(e){return Awe(e)||Owe(e)}function Nwe(){return{css:{canvas:pC(),cell:pC()},device:{canvas:pC(),cell:pC(),char:{width:0,height:0,left:0,top:0}}}}function pC(){return{width:0,height:0}}var DN=class{constructor(e,t,r,n,o,i,a){this._document=e,this._characterJoinerService=t,this._optionsService=r,this._coreBrowserService=n,this._coreService=o,this._decorationService=i,this._themeService=a,this._workCell=new Fi,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(e,t,r){this._selectionStart=e,this._selectionEnd=t,this._columnSelectMode=r}createRow(e,t,r,n,o,i,a,s,l,c,d){let u=[],f=this._characterJoinerService.getJoinedCharacters(t),m=this._themeService.colors,p=e.getNoBgTrimmedLength();r&&p<i+1&&(p=i+1);let g,b=0,v="",x=0,_=0,I=0,S=0,w=!1,P=0,$=!1,B=0,W=0,H=[],K=c!==-1&&d!==-1;for(let T=0;T<p;T++){e.loadCell(T,this._workCell);let k=this._workCell.getWidth();if(k===0)continue;let E=!1,C=T>=W,A=T,R=this._workCell;if(f.length>0&&T===f[0][0]&&C){let Ne=f.shift(),Yt=this._isCellInSelection(Ne[0],t);for(x=Ne[0]+1;x<Ne[1];x++)C&&(C=Yt===this._isCellInSelection(x,t));C&&(C=!r||i<Ne[0]||i>=Ne[1]),C?(E=!0,R=new $we(this._workCell,e.translateToString(!0,Ne[0],Ne[1]),Ne[1]-Ne[0]),A=Ne[1]-1,k=R.getWidth()):W=Ne[1]}let N=this._isCellInSelection(T,t),U=r&&T===i,G=K&&T>=c&&T<=d,re=!1;this._decorationService.forEachDecorationAtCell(T,t,void 0,Ne=>{re=!0});let ve=R.getChars()||rd;if(ve===" "&&(R.isUnderline()||R.isOverline())&&(ve="\xA0"),B=k*s-l.get(ve,R.isBold(),R.isItalic()),!g)g=this._document.createElement("span");else if(b&&(N&&$||!N&&!$&&R.bg===_)&&(N&&$&&m.selectionForeground||R.fg===I)&&R.extended.ext===S&&G===w&&B===P&&!U&&!E&&!re&&C){R.isInvisible()?v+=rd:v+=ve,b++;continue}else b&&(g.textContent=v),g=this._document.createElement("span"),b=0,v="";if(_=R.bg,I=R.fg,S=R.extended.ext,w=G,P=B,$=N,E&&i>=T&&i<=A&&(i=T),!this._coreService.isCursorHidden&&U&&this._coreService.isCursorInitialized){if(H.push("xterm-cursor"),this._coreBrowserService.isFocused)a&&H.push("xterm-cursor-blink"),H.push(n==="bar"?"xterm-cursor-bar":n==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(o)switch(o){case"outline":H.push("xterm-cursor-outline");break;case"block":H.push("xterm-cursor-block");break;case"bar":H.push("xterm-cursor-bar");break;case"underline":H.push("xterm-cursor-underline");break;default:break}}if(R.isBold()&&H.push("xterm-bold"),R.isItalic()&&H.push("xterm-italic"),R.isDim()&&H.push("xterm-dim"),R.isInvisible()?v=rd:v=R.getChars()||rd,R.isUnderline()&&(H.push(`xterm-underline-${R.extended.underlineStyle}`),v===" "&&(v="\xA0"),!R.isUnderlineColorDefault()))if(R.isUnderlineColorRGB())g.style.textDecorationColor=`rgb(${Kb.toColorRGB(R.getUnderlineColor()).join(",")})`;else{let Ne=R.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&R.isBold()&&Ne<8&&(Ne+=8),g.style.textDecorationColor=m.ansi[Ne].css}R.isOverline()&&(H.push("xterm-overline"),v===" "&&(v="\xA0")),R.isStrikethrough()&&H.push("xterm-strikethrough"),G&&(g.style.textDecoration="underline");let he=R.getFgColor(),Q=R.getFgColorMode(),ne=R.getBgColor(),we=R.getBgColorMode(),se=!!R.isInverse();if(se){let Ne=he;he=ne,ne=Ne;let Yt=Q;Q=we,we=Yt}let Ae,We,et=!1;this._decorationService.forEachDecorationAtCell(T,t,void 0,Ne=>{Ne.options.layer!=="top"&&et||(Ne.backgroundColorRGB&&(we=50331648,ne=Ne.backgroundColorRGB.rgba>>8&16777215,Ae=Ne.backgroundColorRGB),Ne.foregroundColorRGB&&(Q=50331648,he=Ne.foregroundColorRGB.rgba>>8&16777215,We=Ne.foregroundColorRGB),et=Ne.options.layer==="top")}),!et&&N&&(Ae=this._coreBrowserService.isFocused?m.selectionBackgroundOpaque:m.selectionInactiveBackgroundOpaque,ne=Ae.rgba>>8&16777215,we=50331648,et=!0,m.selectionForeground&&(Q=50331648,he=m.selectionForeground.rgba>>8&16777215,We=m.selectionForeground)),et&&H.push("xterm-decoration-top");let ct;switch(we){case 16777216:case 33554432:ct=m.ansi[ne],H.push(`xterm-bg-${ne}`);break;case 50331648:ct=Cr.toColor(ne>>16,ne>>8&255,ne&255),this._addStyle(g,`background-color:#${dee((ne>>>0).toString(16),"0",6)}`);break;default:se?(ct=m.foreground,H.push("xterm-bg-257")):ct=m.background}switch(Ae||R.isDim()&&(Ae=Ut.multiplyOpacity(ct,.5)),Q){case 16777216:case 33554432:R.isBold()&&he<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(he+=8),this._applyMinimumContrast(g,ct,m.ansi[he],R,Ae,void 0)||H.push(`xterm-fg-${he}`);break;case 50331648:let Ne=Cr.toColor(he>>16&255,he>>8&255,he&255);this._applyMinimumContrast(g,ct,Ne,R,Ae,We)||this._addStyle(g,`color:#${dee(he.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(g,ct,m.foreground,R,Ae,We)||se&&H.push("xterm-fg-257")}H.length&&(g.className=H.join(" "),H.length=0),!U&&!E&&!re&&C?b++:g.textContent=v,B!==this.defaultSpacing&&(g.style.letterSpacing=`${B}px`),u.push(g),T=A}return g&&b&&(g.textContent=v),u}_applyMinimumContrast(e,t,r,n,o,i){if(this._optionsService.rawOptions.minimumContrastRatio===1||zwe(n.getCode()))return!1;let a=this._getContrastCache(n),s;if(!o&&!i&&(s=a.getColor(t.rgba,r.rgba)),s===void 0){let l=this._optionsService.rawOptions.minimumContrastRatio/(n.isDim()?2:1);s=Ut.ensureContrastRatio(o||t,i||r,l),a.setColor((o||t).rgba,(i||r).rgba,s??null)}return s?(this._addStyle(e,`color:${s.css}`),!0):!1}_getContrastCache(e){return e.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(e,t){e.setAttribute("style",`${e.getAttribute("style")||""}${t};`)}_isCellInSelection(e,t){let r=this._selectionStart,n=this._selectionEnd;return!r||!n?!1:this._columnSelectMode?r[0]<=n[0]?e>=r[0]&&t>=r[1]&&e<n[0]&&t<=n[1]:e<r[0]&&t>=r[1]&&e>=n[0]&&t<=n[1]:t>r[1]&&t<n[1]||r[1]===n[1]&&t===r[1]&&e>=r[0]&&e<n[0]||r[1]<n[1]&&t===n[1]&&e<n[0]||r[1]<n[1]&&t===r[1]&&e>=r[0]}};DN=br([ye(1,Kee),ye(2,un),ye(3,yl),ye(4,lf),ye(5,qb),ye(6,_h)],DN);function dee(e,t,r){for(;e.length<r;)e=t+e;return e}var Fwe=class{constructor(e,t){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=e.createElement("div"),this._container.classList.add("xterm-width-cache-measure-container"),this._container.setAttribute("aria-hidden","true"),this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";let r=e.createElement("span");r.classList.add("xterm-char-measure-element");let n=e.createElement("span");n.classList.add("xterm-char-measure-element"),n.style.fontWeight="bold";let o=e.createElement("span");o.classList.add("xterm-char-measure-element"),o.style.fontStyle="italic";let i=e.createElement("span");i.classList.add("xterm-char-measure-element"),i.style.fontWeight="bold",i.style.fontStyle="italic",this._measureElements=[r,n,o,i],this._container.appendChild(r),this._container.appendChild(n),this._container.appendChild(o),this._container.appendChild(i),t.appendChild(this._container),this.clear()}dispose(){this._container.remove(),this._measureElements.length=0,this._holey=void 0}clear(){this._flat.fill(-9999),this._holey=new Map}setFont(e,t,r,n){e===this._font&&t===this._fontSize&&r===this._weight&&n===this._weightBold||(this._font=e,this._fontSize=t,this._weight=r,this._weightBold=n,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${r}`,this._measureElements[1].style.fontWeight=`${n}`,this._measureElements[2].style.fontWeight=`${r}`,this._measureElements[3].style.fontWeight=`${n}`,this.clear())}get(e,t,r){let n=0;if(!t&&!r&&e.length===1&&(n=e.charCodeAt(0))<256){if(this._flat[n]!==-9999)return this._flat[n];let a=this._measure(e,0);return a>0&&(this._flat[n]=a),a}let o=e;t&&(o+="B"),r&&(o+="I");let i=this._holey.get(o);if(i===void 0){let a=0;t&&(a|=1),r&&(a|=2),i=this._measure(e,a),i>0&&this._holey.set(o,i)}return i}_measure(e,t){let r=this._measureElements[t];return r.textContent=e.repeat(32),r.offsetWidth/32}},Lwe=class{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(e,t,r,n=!1){if(this.selectionStart=t,this.selectionEnd=r,!t||!r||t[0]===r[0]&&t[1]===r[1]){this.clear();return}let o=e.buffers.active.ydisp,i=t[1]-o,a=r[1]-o,s=Math.max(i,0),l=Math.min(a,e.rows-1);if(s>=e.rows||l<0){this.clear();return}this.hasSelection=!0,this.columnSelectMode=n,this.viewportStartRow=i,this.viewportEndRow=a,this.viewportCappedStartRow=s,this.viewportCappedEndRow=l,this.startCol=t[0],this.endCol=r[0]}isCellSelected(e,t,r){return this.hasSelection?(r-=e.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?t>=this.startCol&&r>=this.viewportCappedStartRow&&t<this.endCol&&r<=this.viewportCappedEndRow:t<this.startCol&&r>=this.viewportCappedStartRow&&t>=this.endCol&&r<=this.viewportCappedEndRow:r>this.viewportStartRow&&r<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&r===this.viewportStartRow&&t>=this.startCol&&t<this.endCol||this.viewportStartRow<this.viewportEndRow&&r===this.viewportEndRow&&t<this.endCol||this.viewportStartRow<this.viewportEndRow&&r===this.viewportStartRow&&t>=this.startCol):!1}};function Mwe(){return new Lwe}var G3="xterm-dom-renderer-owner-",Oi="xterm-rows",hC="xterm-fg-",uee="xterm-bg-",Rb="xterm-focus",gC="xterm-selection",Bwe=1,RN=class extends Qe{constructor(e,t,r,n,o,i,a,s,l,c,d,u,f,m){super(),this._terminal=e,this._document=t,this._element=r,this._screenElement=n,this._viewportElement=o,this._helperContainer=i,this._linkifier2=a,this._charSizeService=l,this._optionsService=c,this._bufferService=d,this._coreService=u,this._coreBrowserService=f,this._themeService=m,this._terminalClass=Bwe++,this._rowElements=[],this._selectionRenderModel=Mwe(),this.onRequestRedraw=this._register(new ce).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(Oi),this._rowContainer.style.lineHeight="normal",this._rowContainer.setAttribute("aria-hidden","true"),this._refreshRowElements(this._bufferService.cols,this._bufferService.rows),this._selectionContainer=this._document.createElement("div"),this._selectionContainer.classList.add(gC),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=Nwe(),this._updateDimensions(),this._register(this._optionsService.onOptionChange(()=>this._handleOptionsChanged())),this._register(this._themeService.onChangeColors(p=>this._injectCss(p))),this._injectCss(this._themeService.colors),this._rowFactory=s.createInstance(DN,document),this._element.classList.add(G3+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this._register(this._linkifier2.onShowLinkUnderline(p=>this._handleLinkHover(p))),this._register(this._linkifier2.onHideLinkUnderline(p=>this._handleLinkLeave(p))),this._register(Qt(()=>{this._element.classList.remove(G3+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()})),this._widthCache=new Fwe(this._document,this._helperContainer),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){let e=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*e,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*e),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.left=0,this.dimensions.device.char.top=0,this.dimensions.device.canvas.width=this.dimensions.device.cell.width*this._bufferService.cols,this.dimensions.device.canvas.height=this.dimensions.device.cell.height*this._bufferService.rows,this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/e),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/e),this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols,this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows;for(let r of this._rowElements)r.style.width=`${this.dimensions.css.canvas.width}px`,r.style.height=`${this.dimensions.css.cell.height}px`,r.style.lineHeight=`${this.dimensions.css.cell.height}px`,r.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));let t=`${this._terminalSelector} .${Oi} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=t,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}_injectCss(e){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let t=`${this._terminalSelector} .${Oi} { pointer-events: none; color: ${e.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;t+=`${this._terminalSelector} .${Oi} .xterm-dim { color: ${Ut.multiplyOpacity(e.foreground,.5).css};}`,t+=`${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`;let r=`blink_underline_${this._terminalClass}`,n=`blink_bar_${this._terminalClass}`,o=`blink_block_${this._terminalClass}`;t+=`@keyframes ${r} { 50% { border-bottom-style: hidden; }}`,t+=`@keyframes ${n} { 50% { box-shadow: none; }}`,t+=`@keyframes ${o} { 0% { background-color: ${e.cursor.css}; color: ${e.cursorAccent.css}; } 50% { background-color: inherit; color: ${e.cursor.css}; }}`,t+=`${this._terminalSelector} .${Oi}.${Rb} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${r} 1s step-end infinite;}${this._terminalSelector} .${Oi}.${Rb} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${n} 1s step-end infinite;}${this._terminalSelector} .${Oi}.${Rb} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${o} 1s step-end infinite;}${this._terminalSelector} .${Oi} .xterm-cursor.xterm-cursor-block { background-color: ${e.cursor.css}; color: ${e.cursorAccent.css};}${this._terminalSelector} .${Oi} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${e.cursor.css} !important; color: ${e.cursorAccent.css} !important;}${this._terminalSelector} .${Oi} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${e.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${Oi} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${e.cursor.css} inset;}${this._terminalSelector} .${Oi} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${e.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,t+=`${this._terminalSelector} .${gC} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${gC} div { position: absolute; background-color: ${e.selectionBackgroundOpaque.css};}${this._terminalSelector} .${gC} div { position: absolute; background-color: ${e.selectionInactiveBackgroundOpaque.css};}`;for(let[i,a]of e.ansi.entries())t+=`${this._terminalSelector} .${hC}${i} { color: ${a.css}; }${this._terminalSelector} .${hC}${i}.xterm-dim { color: ${Ut.multiplyOpacity(a,.5).css}; }${this._terminalSelector} .${uee}${i} { background-color: ${a.css}; }`;t+=`${this._terminalSelector} .${hC}257 { color: ${Ut.opaque(e.background).css}; }${this._terminalSelector} .${hC}257.xterm-dim { color: ${Ut.multiplyOpacity(Ut.opaque(e.background),.5).css}; }${this._terminalSelector} .${uee}257 { background-color: ${e.foreground.css}; }`,this._themeStyleElement.textContent=t}_setDefaultSpacing(){let e=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${e}px`,this._rowFactory.defaultSpacing=e}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(e,t){for(let r=this._rowElements.length;r<=t;r++){let n=this._document.createElement("div");this._rowContainer.appendChild(n),this._rowElements.push(n)}for(;this._rowElements.length>t;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(e,t){this._refreshRowElements(e,t),this._updateDimensions(),this.handleSelectionChanged(this._selectionRenderModel.selectionStart,this._selectionRenderModel.selectionEnd,this._selectionRenderModel.columnSelectMode)}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(Rb),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(Rb),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(e,t,r){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(e,t,r),this.renderRows(0,this._bufferService.rows-1),!e||!t||(this._selectionRenderModel.update(this._terminal,e,t,r),!this._selectionRenderModel.hasSelection))return;let n=this._selectionRenderModel.viewportStartRow,o=this._selectionRenderModel.viewportEndRow,i=this._selectionRenderModel.viewportCappedStartRow,a=this._selectionRenderModel.viewportCappedEndRow,s=this._document.createDocumentFragment();if(r){let l=e[0]>t[0];s.appendChild(this._createSelectionElement(i,l?t[0]:e[0],l?e[0]:t[0],a-i+1))}else{let l=n===i?e[0]:0,c=i===o?t[0]:this._bufferService.cols;s.appendChild(this._createSelectionElement(i,l,c));let d=a-i-1;if(s.appendChild(this._createSelectionElement(i+1,0,this._bufferService.cols,d)),i!==a){let u=o===a?t[0]:this._bufferService.cols;s.appendChild(this._createSelectionElement(a,0,u))}}this._selectionContainer.appendChild(s)}_createSelectionElement(e,t,r,n=1){let o=this._document.createElement("div"),i=t*this.dimensions.css.cell.width,a=this.dimensions.css.cell.width*(r-t);return i+a>this.dimensions.css.canvas.width&&(a=this.dimensions.css.canvas.width-i),o.style.height=`${n*this.dimensions.css.cell.height}px`,o.style.top=`${e*this.dimensions.css.cell.height}px`,o.style.left=`${i}px`,o.style.width=`${a}px`,o}handleCursorMove(){}_handleOptionsChanged(){this._updateDimensions(),this._injectCss(this._themeService.colors),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}clear(){for(let e of this._rowElements)e.replaceChildren()}renderRows(e,t){let r=this._bufferService.buffer,n=r.ybase+r.y,o=Math.min(r.x,this._bufferService.cols-1),i=this._coreService.decPrivateModes.cursorBlink??this._optionsService.rawOptions.cursorBlink,a=this._coreService.decPrivateModes.cursorStyle??this._optionsService.rawOptions.cursorStyle,s=this._optionsService.rawOptions.cursorInactiveStyle;for(let l=e;l<=t;l++){let c=l+r.ydisp,d=this._rowElements[l],u=r.lines.get(c);if(!d||!u)break;d.replaceChildren(...this._rowFactory.createRow(u,c,c===n,a,s,o,i,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${G3}${this._terminalClass}`}_handleLinkHover(e){this._setCellUnderline(e.x1,e.x2,e.y1,e.y2,e.cols,!0)}_handleLinkLeave(e){this._setCellUnderline(e.x1,e.x2,e.y1,e.y2,e.cols,!1)}_setCellUnderline(e,t,r,n,o,i){r<0&&(e=0),n<0&&(t=0);let a=this._bufferService.rows-1;r=Math.max(Math.min(r,a),0),n=Math.max(Math.min(n,a),0),o=Math.min(o,this._bufferService.cols);let s=this._bufferService.buffer,l=s.ybase+s.y,c=Math.min(s.x,o-1),d=this._optionsService.rawOptions.cursorBlink,u=this._optionsService.rawOptions.cursorStyle,f=this._optionsService.rawOptions.cursorInactiveStyle;for(let m=r;m<=n;++m){let p=m+s.ydisp,g=this._rowElements[m],b=s.lines.get(p);if(!g||!b)break;g.replaceChildren(...this._rowFactory.createRow(b,p,p===l,u,f,c,d,this.dimensions.css.cell.width,this._widthCache,i?m===r?e:0:-1,i?(m===n?t:o)-1:-1))}}};RN=br([ye(7,VN),ye(8,NC),ye(9,un),ye(10,dn),ye(11,lf),ye(12,yl),ye(13,_h)],RN);var TN=class extends Qe{constructor(e,t,r){super(),this._optionsService=r,this.width=0,this.height=0,this._onCharSizeChange=this._register(new ce),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this._register(new Uwe(this._optionsService))}catch{this._measureStrategy=this._register(new jwe(e,t,this._optionsService))}this._register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],()=>this.measure()))}get hasValidSize(){return this.width>0&&this.height>0}measure(){let e=this._measureStrategy.measure();(e.width!==this.width||e.height!==this.height)&&(this.width=e.width,this.height=e.height,this._onCharSizeChange.fire())}};TN=br([ye(2,un)],TN);var xte=class extends Qe{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(e,t){e!==void 0&&e>0&&t!==void 0&&t>0&&(this._result.width=e,this._result.height=t)}},jwe=class extends xte{constructor(e,t,r){super(),this._document=e,this._parentElement=t,this._optionsService=r,this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W".repeat(32),this._measureElement.setAttribute("aria-hidden","true"),this._measureElement.style.whiteSpace="pre",this._measureElement.style.fontKerning="none",this._parentElement.appendChild(this._measureElement)}measure(){return this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`,this._validateAndSet(Number(this._measureElement.offsetWidth)/32,Number(this._measureElement.offsetHeight)),this._result}},Uwe=class extends xte{constructor(e){super(),this._optionsService=e,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");let t=this._ctx.measureText("W");if(!("width"in t&&"fontBoundingBoxAscent"in t&&"fontBoundingBoxDescent"in t))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;let e=this._ctx.measureText("W");return this._validateAndSet(e.width,e.fontBoundingBoxAscent+e.fontBoundingBoxDescent),this._result}},Vwe=class extends Qe{constructor(e,t,r){super(),this._textarea=e,this._window=t,this.mainDocument=r,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=this._register(new Hwe(this._window)),this._onDprChange=this._register(new ce),this.onDprChange=this._onDprChange.event,this._onWindowChange=this._register(new ce),this.onWindowChange=this._onWindowChange.event,this._register(this.onWindowChange(n=>this._screenDprMonitor.setWindow(n))),this._register(io.forward(this._screenDprMonitor.onDprChange,this._onDprChange)),this._register(Be(this._textarea,"focus",()=>this._isFocused=!0)),this._register(Be(this._textarea,"blur",()=>this._isFocused=!1))}get window(){return this._window}set window(e){this._window!==e&&(this._window=e,this._onWindowChange.fire(this._window))}get dpr(){return this.window.devicePixelRatio}get isFocused(){return this._cachedIsFocused===void 0&&(this._cachedIsFocused=this._isFocused&&this._textarea.ownerDocument.hasFocus(),queueMicrotask(()=>this._cachedIsFocused=void 0)),this._cachedIsFocused}},Hwe=class extends Qe{constructor(e){super(),this._parentWindow=e,this._windowResizeListener=this._register(new yh),this._onDprChange=this._register(new ce),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this._register(Qt(()=>this.clearListener()))}setWindow(e){this._parentWindow=e,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=Be(this._parentWindow,"resize",()=>this._setDprAndFireIfDiffers())}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){this._outerListener&&(this._resolutionMediaMatchList?.removeListener(this._outerListener),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._resolutionMediaMatchList=this._parentWindow.matchMedia(`screen and (resolution: ${this._parentWindow.devicePixelRatio}dppx)`),this._resolutionMediaMatchList.addListener(this._outerListener))}clearListener(){!this._resolutionMediaMatchList||!this._outerListener||(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._outerListener=void 0)}},Wwe=class extends Qe{constructor(){super(),this.linkProviders=[],this._register(Qt(()=>this.linkProviders.length=0))}registerLinkProvider(e){return this.linkProviders.push(e),{dispose:()=>{let t=this.linkProviders.indexOf(e);t!==-1&&this.linkProviders.splice(t,1)}}}};function QN(e,t,r){let n=r.getBoundingClientRect(),o=e.getComputedStyle(r),i=parseInt(o.getPropertyValue("padding-left")),a=parseInt(o.getPropertyValue("padding-top"));return[t.clientX-n.left-i,t.clientY-n.top-a]}function Zwe(e,t,r,n,o,i,a,s,l){if(!i)return;let c=QN(e,t,r);if(c)return c[0]=Math.ceil((c[0]+(l?a/2:0))/a),c[1]=Math.ceil(c[1]/s),c[0]=Math.min(Math.max(c[0],1),n+(l?1:0)),c[1]=Math.min(Math.max(c[1],1),o),c}var EN=class{constructor(e,t){this._renderService=e,this._charSizeService=t}getCoords(e,t,r,n,o){return Zwe(window,e,t,r,n,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,o)}getMouseReportCoords(e,t){let r=QN(window,e,t);if(this._charSizeService.hasValidSize)return r[0]=Math.min(Math.max(r[0],0),this._renderService.dimensions.css.canvas.width-1),r[1]=Math.min(Math.max(r[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(r[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(r[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(r[0]),y:Math.floor(r[1])}}};EN=br([ye(0,_l),ye(1,NC)],EN);var Gwe=class{constructor(e,t){this._renderCallback=e,this._coreBrowserService=t,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(e){return this._refreshCallbacks.push(e),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh())),this._animationFrame}refresh(e,t,r){this._rowCount=r,e=e!==void 0?e:0,t=t!==void 0?t:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,e):e,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,t):t,!this._animationFrame&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh()))}_innerRefresh(){if(this._animationFrame=void 0,this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0){this._runRefreshCallbacks();return}let e=Math.max(this._rowStart,0),t=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(e,t),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(let e of this._refreshCallbacks)e(0);this._refreshCallbacks=[]}},bte={};AIe(bte,{getSafariVersion:()=>qwe,isChromeOS:()=>wte,isFirefox:()=>yte,isIpad:()=>Xwe,isIphone:()=>Qwe,isLegacyEdge:()=>Kwe,isLinux:()=>YN,isMac:()=>$C,isNode:()=>MC,isSafari:()=>_te,isWindows:()=>Ite});var MC=typeof process<"u"&&"title"in process,Xb=MC?"node":navigator.userAgent,Qb=MC?"node":navigator.platform,yte=Xb.includes("Firefox"),Kwe=Xb.includes("Edge"),_te=/^((?!chrome|android).)*safari/i.test(Xb);function qwe(){if(!_te)return 0;let e=Xb.match(/Version\/(\d+)/);return e===null||e.length<2?0:parseInt(e[1])}var $C=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(Qb),Xwe=Qb==="iPad",Qwe=Qb==="iPhone",Ite=["Windows","Win16","Win32","WinCE"].includes(Qb),YN=Qb.indexOf("Linux")>=0,wte=/\bCrOS\b/.test(Xb),Ste=class{constructor(){this._tasks=[],this._i=0}enqueue(e){this._tasks.push(e),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(e){this._idleCallback=void 0;let t=0,r=0,n=e.timeRemaining(),o=0;for(;this._i<this._tasks.length;){if(t=performance.now(),this._tasks[this._i]()||this._i++,t=Math.max(1,performance.now()-t),r=Math.max(t,r),o=e.timeRemaining(),r*1.5>o){n-t<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(n-t))}ms`),this._start();return}n=o}this.clear()}},Ywe=class extends Ste{_requestCallback(e){return setTimeout(()=>e(this._createDeadline(16)))}_cancelCallback(e){clearTimeout(e)}_createDeadline(e){let t=performance.now()+e;return{timeRemaining:()=>Math.max(0,t-performance.now())}}},Jwe=class extends Ste{_requestCallback(e){return requestIdleCallback(e)}_cancelCallback(e){cancelIdleCallback(e)}},AC=!MC&&"requestIdleCallback"in window?Jwe:Ywe,eSe=class{constructor(){this._queue=new AC}set(e){this._queue.clear(),this._queue.enqueue(e)}flush(){this._queue.flush()}},$N=class extends Qe{constructor(e,t,r,n,o,i,a,s,l){super(),this._rowCount=e,this._optionsService=r,this._charSizeService=n,this._coreService=o,this._coreBrowserService=s,this._renderer=this._register(new yh),this._pausedResizeTask=new eSe,this._observerDisposable=this._register(new yh),this._isPaused=!1,this._needsFullRefresh=!1,this._isNextRenderRedrawOnly=!0,this._needsSelectionRefresh=!1,this._canvasWidth=0,this._canvasHeight=0,this._selectionState={start:void 0,end:void 0,columnSelectMode:!1},this._onDimensionsChange=this._register(new ce),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this._register(new ce),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this._register(new ce),this.onRender=this._onRender.event,this._onRefreshRequest=this._register(new ce),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new Gwe((c,d)=>this._renderRows(c,d),this._coreBrowserService),this._register(this._renderDebouncer),this._syncOutputHandler=new tSe(this._coreBrowserService,this._coreService,()=>this._fullRefresh()),this._register(Qt(()=>this._syncOutputHandler.dispose())),this._register(this._coreBrowserService.onDprChange(()=>this.handleDevicePixelRatioChange())),this._register(a.onResize(()=>this._fullRefresh())),this._register(a.buffers.onBufferActivate(()=>this._renderer.value?.clear())),this._register(this._optionsService.onOptionChange(()=>this._handleOptionsChanged())),this._register(this._charSizeService.onCharSizeChange(()=>this.handleCharSizeChanged())),this._register(i.onDecorationRegistered(()=>this._fullRefresh())),this._register(i.onDecorationRemoved(()=>this._fullRefresh())),this._register(this._optionsService.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],()=>{this.clear(),this.handleResize(a.cols,a.rows),this._fullRefresh()})),this._register(this._optionsService.onMultipleOptionChange(["cursorBlink","cursorStyle"],()=>this.refreshRows(a.buffer.y,a.buffer.y,!0))),this._register(l.onChangeColors(()=>this._fullRefresh())),this._registerIntersectionObserver(this._coreBrowserService.window,t),this._register(this._coreBrowserService.onWindowChange(c=>this._registerIntersectionObserver(c,t)))}get dimensions(){return this._renderer.value.dimensions}_registerIntersectionObserver(e,t){if("IntersectionObserver"in e){let r=new e.IntersectionObserver(n=>this._handleIntersectionChange(n[n.length-1]),{threshold:0});r.observe(t),this._observerDisposable.value=Qt(()=>r.disconnect())}}_handleIntersectionChange(e){this._isPaused=e.isIntersecting===void 0?e.intersectionRatio===0:!e.isIntersecting,!this._isPaused&&!this._charSizeService.hasValidSize&&this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this._pausedResizeTask.flush(),this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)}refreshRows(e,t,r=!1){if(this._isPaused){this._needsFullRefresh=!0;return}if(this._coreService.decPrivateModes.synchronizedOutput){this._syncOutputHandler.bufferRows(e,t);return}let n=this._syncOutputHandler.flush();n&&(e=Math.min(e,n.start),t=Math.max(t,n.end)),r||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(e,t,this._rowCount)}_renderRows(e,t){if(this._renderer.value){if(this._coreService.decPrivateModes.synchronizedOutput){this._syncOutputHandler.bufferRows(e,t);return}e=Math.min(e,this._rowCount-1),t=Math.min(t,this._rowCount-1),this._renderer.value.renderRows(e,t),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:e,end:t}),this._onRender.fire({start:e,end:t}),this._isNextRenderRedrawOnly=!0}}resize(e,t){this._rowCount=t,this._fireOnCanvasResize()}_handleOptionsChanged(){this._renderer.value&&(this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize())}_fireOnCanvasResize(){this._renderer.value&&(this._renderer.value.dimensions.css.canvas.width===this._canvasWidth&&this._renderer.value.dimensions.css.canvas.height===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.value.dimensions))}hasRenderer(){return!!this._renderer.value}setRenderer(e){this._renderer.value=e,this._renderer.value&&(this._renderer.value.onRequestRedraw(t=>this.refreshRows(t.start,t.end,!0)),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(e){return this._renderDebouncer.addRefreshCallback(e)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){this._renderer.value&&(this._renderer.value.clearTextureAtlas?.(),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(e,t){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set(()=>this._renderer.value?.handleResize(e,t)):this._renderer.value.handleResize(e,t),this._fullRefresh())}handleCharSizeChanged(){this._renderer.value?.handleCharSizeChanged()}handleBlur(){this._renderer.value?.handleBlur()}handleFocus(){this._renderer.value?.handleFocus()}handleSelectionChanged(e,t,r){this._selectionState.start=e,this._selectionState.end=t,this._selectionState.columnSelectMode=r,this._renderer.value?.handleSelectionChanged(e,t,r)}handleCursorMove(){this._renderer.value?.handleCursorMove()}clear(){this._renderer.value?.clear()}};$N=br([ye(2,un),ye(3,NC),ye(4,lf),ye(5,qb),ye(6,dn),ye(7,yl),ye(8,_h)],$N);var tSe=class{constructor(e,t,r){this._coreBrowserService=e,this._coreService=t,this._onTimeout=r,this._start=0,this._end=0,this._isBuffering=!1}bufferRows(e,t){this._isBuffering?(this._start=Math.min(this._start,e),this._end=Math.max(this._end,t)):(this._start=e,this._end=t,this._isBuffering=!0),this._timeout===void 0&&(this._timeout=this._coreBrowserService.window.setTimeout(()=>{this._timeout=void 0,this._coreService.decPrivateModes.synchronizedOutput=!1,this._onTimeout()},1e3))}flush(){if(this._timeout!==void 0&&(this._coreBrowserService.window.clearTimeout(this._timeout),this._timeout=void 0),!this._isBuffering)return;let e={start:this._start,end:this._end};return this._isBuffering=!1,e}dispose(){this._timeout!==void 0&&(this._coreBrowserService.window.clearTimeout(this._timeout),this._timeout=void 0)}};function rSe(e,t,r,n){let o=r.buffer.x,i=r.buffer.y;if(!r.buffer.hasScrollback)return iSe(o,i,e,t,r,n)+BC(i,t,r,n)+aSe(o,i,e,t,r,n);let a;if(i===t)return a=o>e?"D":"C",Zb(Math.abs(o-e),Wb(a,n));a=i>t?"D":"C";let s=Math.abs(i-t),l=nSe(i>t?e:o,r)+(s-1)*r.cols+1+oSe(i>t?o:e,r);return Zb(l,Wb(a,n))}function oSe(e,t){return e-1}function nSe(e,t){return t.cols-e}function iSe(e,t,r,n,o,i){return BC(t,n,o,i).length===0?"":Zb(Cte(e,t,e,t-sf(t,o),!1,o).length,Wb("D",i))}function BC(e,t,r,n){let o=e-sf(e,r),i=t-sf(t,r),a=Math.abs(o-i)-sSe(e,t,r);return Zb(a,Wb(kte(e,t),n))}function aSe(e,t,r,n,o,i){let a;BC(t,n,o,i).length>0?a=n-sf(n,o):a=t;let s=n,l=lSe(e,t,r,n,o,i);return Zb(Cte(e,a,r,s,l==="C",o).length,Wb(l,i))}function sSe(e,t,r){let n=0,o=e-sf(e,r),i=t-sf(t,r);for(let a=0;a<Math.abs(o-i);a++){let s=kte(e,t)==="A"?-1:1;r.buffer.lines.get(o+s*a)?.isWrapped&&n++}return n}function sf(e,t){let r=0,n=t.buffer.lines.get(e),o=n?.isWrapped;for(;o&&e>=0&&e<t.rows;)r++,n=t.buffer.lines.get(--e),o=n?.isWrapped;return r}function lSe(e,t,r,n,o,i){let a;return BC(r,n,o,i).length>0?a=n-sf(n,o):a=t,e<r&&a<=n||e>=r&&a<n?"C":"D"}function kte(e,t){return e>t?"A":"B"}function Cte(e,t,r,n,o,i){let a=e,s=t,l="";for(;(a!==r||s!==n)&&s>=0&&s<i.buffer.lines.length;)a+=o?1:-1,o&&a>i.cols-1?(l+=i.buffer.translateBufferLineToString(s,!1,e,a),a=0,e=0,s++):!o&&a<0&&(l+=i.buffer.translateBufferLineToString(s,!1,0,e+1),a=i.cols-1,e=a,s--);return l+i.buffer.translateBufferLineToString(s,!1,e,a)}function Wb(e,t){let r=t?"O":"[";return te.ESC+r+e}function Zb(e,t){e=Math.floor(e);let r="";for(let n=0;n<e;n++)r+=t;return r}var cSe=class{constructor(e){this._bufferService=e,this.isSelectAllActive=!1,this.selectionStartLength=0}clearSelection(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0}get finalSelectionStart(){return this.isSelectAllActive?[0,0]:!this.selectionEnd||!this.selectionStart?this.selectionStart:this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart}get finalSelectionEnd(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){let e=this.selectionStart[0]+this.selectionStartLength;return e>this._bufferService.cols?e%this._bufferService.cols===0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)-1]:[e%this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)]:[e,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){let e=this.selectionStart[0]+this.selectionStartLength;return e>this._bufferService.cols?[e%this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)]:[Math.max(e,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){let e=this.selectionStart,t=this.selectionEnd;return!e||!t?!1:e[1]>t[1]||e[1]===t[1]&&e[0]>t[0]}handleTrim(e){return this.selectionStart&&(this.selectionStart[1]-=e),this.selectionEnd&&(this.selectionEnd[1]-=e),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}};function fee(e,t){if(e.start.y>e.end.y)throw new Error(`Buffer range end (${e.end.x}, ${e.end.y}) cannot be before start (${e.start.x}, ${e.start.y})`);return t*(e.end.y-e.start.y)+(e.end.x-e.start.x+1)}var K3=50,dSe=15,uSe=50,fSe=500,mSe="\xA0",pSe=new RegExp(mSe,"g"),AN=class extends Qe{constructor(e,t,r,n,o,i,a,s,l){super(),this._element=e,this._screenElement=t,this._linkifier=r,this._bufferService=n,this._coreService=o,this._mouseService=i,this._optionsService=a,this._renderService=s,this._coreBrowserService=l,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new Fi,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this._register(new ce),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this._register(new ce),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this._register(new ce),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this._register(new ce),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=c=>this._handleMouseMove(c),this._mouseUpListener=c=>this._handleMouseUp(c),this._coreService.onUserInput(()=>{this.hasSelection&&this.clearSelection()}),this._trimListener=this._bufferService.buffer.lines.onTrim(c=>this._handleTrim(c)),this._register(this._bufferService.buffers.onBufferActivate(c=>this._handleBufferActivate(c))),this.enable(),this._model=new cSe(this._bufferService),this._activeSelectionMode=0,this._register(Qt(()=>{this._removeMouseDownListeners()})),this._register(this._bufferService.onResize(c=>{c.rowsChanged&&this.clearSelection()}))}reset(){this.clearSelection()}disable(){this.clearSelection(),this._enabled=!1}enable(){this._enabled=!0}get selectionStart(){return this._model.finalSelectionStart}get selectionEnd(){return this._model.finalSelectionEnd}get hasSelection(){let e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd;return!e||!t?!1:e[0]!==t[0]||e[1]!==t[1]}get selectionText(){let e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd;if(!e||!t)return"";let r=this._bufferService.buffer,n=[];if(this._activeSelectionMode===3){if(e[0]===t[0])return"";let o=e[0]<t[0]?e[0]:t[0],i=e[0]<t[0]?t[0]:e[0];for(let a=e[1];a<=t[1];a++){let s=r.translateBufferLineToString(a,!0,o,i);n.push(s)}}else{let o=e[1]===t[1]?t[0]:void 0;n.push(r.translateBufferLineToString(e[1],!0,e[0],o));for(let i=e[1]+1;i<=t[1]-1;i++){let a=r.lines.get(i),s=r.translateBufferLineToString(i,!0);a?.isWrapped?n[n.length-1]+=s:n.push(s)}if(e[1]!==t[1]){let i=r.lines.get(t[1]),a=r.translateBufferLineToString(t[1],!0,0,t[0]);i&&i.isWrapped?n[n.length-1]+=a:n.push(a)}}return n.map(o=>o.replace(pSe," ")).join(Ite?`\r
|
|
214
|
+
`:`
|
|
215
|
+
`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(e){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._refresh())),YN&&e&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(e){let t=this._getMouseBufferCoords(e),r=this._model.finalSelectionStart,n=this._model.finalSelectionEnd;return!r||!n||!t?!1:this._areCoordsInSelection(t,r,n)}isCellInSelection(e,t){let r=this._model.finalSelectionStart,n=this._model.finalSelectionEnd;return!r||!n?!1:this._areCoordsInSelection([e,t],r,n)}_areCoordsInSelection(e,t,r){return e[1]>t[1]&&e[1]<r[1]||t[1]===r[1]&&e[1]===t[1]&&e[0]>=t[0]&&e[0]<r[0]||t[1]<r[1]&&e[1]===r[1]&&e[0]<r[0]||t[1]<r[1]&&e[1]===t[1]&&e[0]>=t[0]}_selectWordAtCursor(e,t){let r=this._linkifier.currentLink?.link?.range;if(r)return this._model.selectionStart=[r.start.x-1,r.start.y-1],this._model.selectionStartLength=fee(r,this._bufferService.cols),this._model.selectionEnd=void 0,!0;let n=this._getMouseBufferCoords(e);return n?(this._selectWordAt(n,t),this._model.selectionEnd=void 0,!0):!1}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(e,t){this._model.clearSelection(),e=Math.max(e,0),t=Math.min(t,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,e],this._model.selectionEnd=[this._bufferService.cols,t],this.refresh(),this._onSelectionChange.fire()}_handleTrim(e){this._model.handleTrim(e)&&this.refresh()}_getMouseBufferCoords(e){let t=this._mouseService.getCoords(e,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(t)return t[0]--,t[1]--,t[1]+=this._bufferService.buffer.ydisp,t}_getMouseEventScrollAmount(e){let t=QN(this._coreBrowserService.window,e,this._screenElement)[1],r=this._renderService.dimensions.css.canvas.height;return t>=0&&t<=r?0:(t>r&&(t-=r),t=Math.min(Math.max(t,-K3),K3),t/=K3,t/Math.abs(t)+Math.round(t*(dSe-1)))}shouldForceSelection(e){return $C?e.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:e.shiftKey}handleMouseDown(e){if(this._mouseDownTimeStamp=e.timeStamp,!(e.button===2&&this.hasSelection)&&e.button===0){if(!this._enabled){if(!this.shouldForceSelection(e))return;e.stopPropagation()}e.preventDefault(),this._dragScrollAmount=0,this._enabled&&e.shiftKey?this._handleIncrementalClick(e):e.detail===1?this._handleSingleClick(e):e.detail===2?this._handleDoubleClick(e):e.detail===3&&this._handleTripleClick(e),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval(()=>this._dragScroll(),uSe)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(e){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(e))}_handleSingleClick(e){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(e)?3:0,this._model.selectionStart=this._getMouseBufferCoords(e),!this._model.selectionStart)return;this._model.selectionEnd=void 0;let t=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);t&&t.length!==this._model.selectionStart[0]&&t.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(e){this._selectWordAtCursor(e,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(e){let t=this._getMouseBufferCoords(e);t&&(this._activeSelectionMode=2,this._selectLineAt(t[1]))}shouldColumnSelect(e){return e.altKey&&!($C&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(e){if(e.stopImmediatePropagation(),!this._model.selectionStart)return;let t=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(e),!this._model.selectionEnd){this.refresh(!0);return}this._activeSelectionMode===2?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:this._activeSelectionMode===1&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(e),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));let r=this._bufferService.buffer;if(this._model.selectionEnd[1]<r.lines.length){let n=r.lines.get(this._model.selectionEnd[1]);n&&n.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}(!t||t[0]!==this._model.selectionEnd[0]||t[1]!==this._model.selectionEnd[1])&&this.refresh(!0)}_dragScroll(){if(!(!this._model.selectionEnd||!this._model.selectionStart)&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});let e=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(e.ydisp+this._bufferService.rows,e.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=e.ydisp),this.refresh()}}_handleMouseUp(e){let t=e.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&t<fSe&&e.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){let r=this._mouseService.getCoords(e,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(r&&r[0]!==void 0&&r[1]!==void 0){let n=rSe(r[0]-1,r[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(n,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){let e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd,r=!!e&&!!t&&(e[0]!==t[0]||e[1]!==t[1]);if(!r){this._oldHasSelection&&this._fireOnSelectionChange(e,t,r);return}!e||!t||(!this._oldSelectionStart||!this._oldSelectionEnd||e[0]!==this._oldSelectionStart[0]||e[1]!==this._oldSelectionStart[1]||t[0]!==this._oldSelectionEnd[0]||t[1]!==this._oldSelectionEnd[1])&&this._fireOnSelectionChange(e,t,r)}_fireOnSelectionChange(e,t,r){this._oldSelectionStart=e,this._oldSelectionEnd=t,this._oldHasSelection=r,this._onSelectionChange.fire()}_handleBufferActivate(e){this.clearSelection(),this._trimListener.dispose(),this._trimListener=e.activeBuffer.lines.onTrim(t=>this._handleTrim(t))}_convertViewportColToCharacterIndex(e,t){let r=t;for(let n=0;t>=n;n++){let o=e.loadCell(n,this._workCell).getChars().length;this._workCell.getWidth()===0?r--:o>1&&t!==n&&(r+=o-1)}return r}setSelection(e,t,r){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[e,t],this._model.selectionStartLength=r,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(e){this._isClickInSelection(e)||(this._selectWordAtCursor(e,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(e,t,r=!0,n=!0){if(e[0]>=this._bufferService.cols)return;let o=this._bufferService.buffer,i=o.lines.get(e[1]);if(!i)return;let a=o.translateBufferLineToString(e[1],!1),s=this._convertViewportColToCharacterIndex(i,e[0]),l=s,c=e[0]-s,d=0,u=0,f=0,m=0;if(a.charAt(s)===" "){for(;s>0&&a.charAt(s-1)===" ";)s--;for(;l<a.length&&a.charAt(l+1)===" ";)l++}else{let b=e[0],v=e[0];i.getWidth(b)===0&&(d++,b--),i.getWidth(v)===2&&(u++,v++);let x=i.getString(v).length;for(x>1&&(m+=x-1,l+=x-1);b>0&&s>0&&!this._isCharWordSeparator(i.loadCell(b-1,this._workCell));){i.loadCell(b-1,this._workCell);let _=this._workCell.getChars().length;this._workCell.getWidth()===0?(d++,b--):_>1&&(f+=_-1,s-=_-1),s--,b--}for(;v<i.length&&l+1<a.length&&!this._isCharWordSeparator(i.loadCell(v+1,this._workCell));){i.loadCell(v+1,this._workCell);let _=this._workCell.getChars().length;this._workCell.getWidth()===2?(u++,v++):_>1&&(m+=_-1,l+=_-1),l++,v++}}l++;let p=s+c-d+f,g=Math.min(this._bufferService.cols,l-s+d+u-f-m);if(!(!t&&a.slice(s,l).trim()==="")){if(r&&p===0&&i.getCodePoint(0)!==32){let b=o.lines.get(e[1]-1);if(b&&i.isWrapped&&b.getCodePoint(this._bufferService.cols-1)!==32){let v=this._getWordAt([this._bufferService.cols-1,e[1]-1],!1,!0,!1);if(v){let x=this._bufferService.cols-v.start;p-=x,g+=x}}}if(n&&p+g===this._bufferService.cols&&i.getCodePoint(this._bufferService.cols-1)!==32){let b=o.lines.get(e[1]+1);if(b?.isWrapped&&b.getCodePoint(0)!==32){let v=this._getWordAt([0,e[1]+1],!1,!1,!0);v&&(g+=v.length)}}return{start:p,length:g}}}_selectWordAt(e,t){let r=this._getWordAt(e,t);if(r){for(;r.start<0;)r.start+=this._bufferService.cols,e[1]--;this._model.selectionStart=[r.start,e[1]],this._model.selectionStartLength=r.length}}_selectToWordAt(e){let t=this._getWordAt(e,!0);if(t){let r=e[1];for(;t.start<0;)t.start+=this._bufferService.cols,r--;if(!this._model.areSelectionValuesReversed())for(;t.start+t.length>this._bufferService.cols;)t.length-=this._bufferService.cols,r++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?t.start:t.start+t.length,r]}}_isCharWordSeparator(e){return e.getWidth()===0?!1:this._optionsService.rawOptions.wordSeparator.indexOf(e.getChars())>=0}_selectLineAt(e){let t=this._bufferService.buffer.getWrappedRangeForLine(e),r={start:{x:0,y:t.first},end:{x:this._bufferService.cols-1,y:t.last}};this._model.selectionStart=[0,t.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=fee(r,this._bufferService.cols)}};AN=br([ye(3,dn),ye(4,lf),ye(5,HN),ye(6,un),ye(7,_l),ye(8,yl)],AN);var mee=class{constructor(){this._data={}}set(e,t,r){this._data[e]||(this._data[e]={}),this._data[e][t]=r}get(e,t){return this._data[e]?this._data[e][t]:void 0}clear(){this._data={}}},pee=class{constructor(){this._color=new mee,this._css=new mee}setCss(e,t,r){this._css.set(e,t,r)}getCss(e,t){return this._css.get(e,t)}setColor(e,t,r){this._color.set(e,t,r)}getColor(e,t){return this._color.get(e,t)}clear(){this._color.clear(),this._css.clear()}},Vr=Object.freeze((()=>{let e=[ir.toColor("#2e3436"),ir.toColor("#cc0000"),ir.toColor("#4e9a06"),ir.toColor("#c4a000"),ir.toColor("#3465a4"),ir.toColor("#75507b"),ir.toColor("#06989a"),ir.toColor("#d3d7cf"),ir.toColor("#555753"),ir.toColor("#ef2929"),ir.toColor("#8ae234"),ir.toColor("#fce94f"),ir.toColor("#729fcf"),ir.toColor("#ad7fa8"),ir.toColor("#34e2e2"),ir.toColor("#eeeeec")],t=[0,95,135,175,215,255];for(let r=0;r<216;r++){let n=t[r/36%6|0],o=t[r/6%6|0],i=t[r%6];e.push({css:Cr.toCss(n,o,i),rgba:Cr.toRgba(n,o,i)})}for(let r=0;r<24;r++){let n=8+r*10;e.push({css:Cr.toCss(n,n,n),rgba:Cr.toRgba(n,n,n)})}return e})()),tf=ir.toColor("#ffffff"),Nb=ir.toColor("#000000"),hee=ir.toColor("#ffffff"),gee=Nb,Tb={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117},hSe=tf,ON=class extends Qe{constructor(e){super(),this._optionsService=e,this._contrastCache=new pee,this._halfContrastCache=new pee,this._onChangeColors=this._register(new ce),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:tf,background:Nb,cursor:hee,cursorAccent:gee,selectionForeground:void 0,selectionBackgroundTransparent:Tb,selectionBackgroundOpaque:Ut.blend(Nb,Tb),selectionInactiveBackgroundTransparent:Tb,selectionInactiveBackgroundOpaque:Ut.blend(Nb,Tb),scrollbarSliderBackground:Ut.opacity(tf,.2),scrollbarSliderHoverBackground:Ut.opacity(tf,.4),scrollbarSliderActiveBackground:Ut.opacity(tf,.5),overviewRulerBorder:tf,ansi:Vr.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this._register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",()=>this._contrastCache.clear())),this._register(this._optionsService.onSpecificOptionChange("theme",()=>this._setTheme(this._optionsService.rawOptions.theme)))}get colors(){return this._colors}_setTheme(e={}){let t=this._colors;if(t.foreground=Et(e.foreground,tf),t.background=Et(e.background,Nb),t.cursor=Ut.blend(t.background,Et(e.cursor,hee)),t.cursorAccent=Ut.blend(t.background,Et(e.cursorAccent,gee)),t.selectionBackgroundTransparent=Et(e.selectionBackground,Tb),t.selectionBackgroundOpaque=Ut.blend(t.background,t.selectionBackgroundTransparent),t.selectionInactiveBackgroundTransparent=Et(e.selectionInactiveBackground,t.selectionBackgroundTransparent),t.selectionInactiveBackgroundOpaque=Ut.blend(t.background,t.selectionInactiveBackgroundTransparent),t.selectionForeground=e.selectionForeground?Et(e.selectionForeground,cee):void 0,t.selectionForeground===cee&&(t.selectionForeground=void 0),Ut.isOpaque(t.selectionBackgroundTransparent)&&(t.selectionBackgroundTransparent=Ut.opacity(t.selectionBackgroundTransparent,.3)),Ut.isOpaque(t.selectionInactiveBackgroundTransparent)&&(t.selectionInactiveBackgroundTransparent=Ut.opacity(t.selectionInactiveBackgroundTransparent,.3)),t.scrollbarSliderBackground=Et(e.scrollbarSliderBackground,Ut.opacity(t.foreground,.2)),t.scrollbarSliderHoverBackground=Et(e.scrollbarSliderHoverBackground,Ut.opacity(t.foreground,.4)),t.scrollbarSliderActiveBackground=Et(e.scrollbarSliderActiveBackground,Ut.opacity(t.foreground,.5)),t.overviewRulerBorder=Et(e.overviewRulerBorder,hSe),t.ansi=Vr.slice(),t.ansi[0]=Et(e.black,Vr[0]),t.ansi[1]=Et(e.red,Vr[1]),t.ansi[2]=Et(e.green,Vr[2]),t.ansi[3]=Et(e.yellow,Vr[3]),t.ansi[4]=Et(e.blue,Vr[4]),t.ansi[5]=Et(e.magenta,Vr[5]),t.ansi[6]=Et(e.cyan,Vr[6]),t.ansi[7]=Et(e.white,Vr[7]),t.ansi[8]=Et(e.brightBlack,Vr[8]),t.ansi[9]=Et(e.brightRed,Vr[9]),t.ansi[10]=Et(e.brightGreen,Vr[10]),t.ansi[11]=Et(e.brightYellow,Vr[11]),t.ansi[12]=Et(e.brightBlue,Vr[12]),t.ansi[13]=Et(e.brightMagenta,Vr[13]),t.ansi[14]=Et(e.brightCyan,Vr[14]),t.ansi[15]=Et(e.brightWhite,Vr[15]),e.extendedAnsi){let r=Math.min(t.ansi.length-16,e.extendedAnsi.length);for(let n=0;n<r;n++)t.ansi[n+16]=Et(e.extendedAnsi[n],Vr[n+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(e){this._restoreColor(e),this._onChangeColors.fire(this.colors)}_restoreColor(e){if(e===void 0){for(let t=0;t<this._restoreColors.ansi.length;++t)this._colors.ansi[t]=this._restoreColors.ansi[t];return}switch(e){case 256:this._colors.foreground=this._restoreColors.foreground;break;case 257:this._colors.background=this._restoreColors.background;break;case 258:this._colors.cursor=this._restoreColors.cursor;break;default:this._colors.ansi[e]=this._restoreColors.ansi[e]}}modifyColors(e){e(this._colors),this._onChangeColors.fire(this.colors)}_updateRestoreColors(){this._restoreColors={foreground:this._colors.foreground,background:this._colors.background,cursor:this._colors.cursor,ansi:this._colors.ansi.slice()}}};ON=br([ye(0,un)],ON);function Et(e,t){if(e!==void 0)try{return ir.toColor(e)}catch{}return t}var gSe=class{constructor(...e){this._entries=new Map;for(let[t,r]of e)this.set(t,r)}set(e,t){let r=this._entries.get(e);return this._entries.set(e,t),r}forEach(e){for(let[t,r]of this._entries.entries())e(t,r)}has(e){return this._entries.has(e)}get(e){return this._entries.get(e)}},vSe=class{constructor(){this._services=new gSe,this._services.set(VN,this)}setService(e,t){this._services.set(e,t)}getService(e){return this._services.get(e)}createInstance(e,...t){let r=BIe(e).sort((i,a)=>i.index-a.index),n=[];for(let i of r){let a=this._services.get(i.id);if(!a)throw new Error(`[createInstance] ${e.name} depends on UNKNOWN service ${i.id._id}.`);n.push(a)}let o=r.length>0?r[0].index:t.length;if(t.length!==o)throw new Error(`[createInstance] First service dependency of ${e.name} at position ${o+1} conflicts with ${t.length} static arguments`);return new e(...t,...n)}},xSe={trace:0,debug:1,info:2,warn:3,error:4,off:5},bSe="xterm.js: ",zN=class extends Qe{constructor(e){super(),this._optionsService=e,this._logLevel=5,this._updateLogLevel(),this._register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel())),ySe=this}get logLevel(){return this._logLevel}_updateLogLevel(){this._logLevel=xSe[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(e){for(let t=0;t<e.length;t++)typeof e[t]=="function"&&(e[t]=e[t]())}_log(e,t,r){this._evalLazyOptionalParams(r),e.call(console,(this._optionsService.options.logger?"":bSe)+t,...r)}trace(e,...t){this._logLevel<=0&&this._log(this._optionsService.options.logger?.trace.bind(this._optionsService.options.logger)??console.log,e,t)}debug(e,...t){this._logLevel<=1&&this._log(this._optionsService.options.logger?.debug.bind(this._optionsService.options.logger)??console.log,e,t)}info(e,...t){this._logLevel<=2&&this._log(this._optionsService.options.logger?.info.bind(this._optionsService.options.logger)??console.info,e,t)}warn(e,...t){this._logLevel<=3&&this._log(this._optionsService.options.logger?.warn.bind(this._optionsService.options.logger)??console.warn,e,t)}error(e,...t){this._logLevel<=4&&this._log(this._optionsService.options.logger?.error.bind(this._optionsService.options.logger)??console.error,e,t)}};zN=br([ye(0,un)],zN);var ySe,vee=class extends Qe{constructor(e){super(),this._maxLength=e,this.onDeleteEmitter=this._register(new ce),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this._register(new ce),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this._register(new ce),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(e){if(this._maxLength===e)return;let t=new Array(e);for(let r=0;r<Math.min(e,this.length);r++)t[r]=this._array[this._getCyclicIndex(r)];this._array=t,this._maxLength=e,this._startIndex=0}get length(){return this._length}set length(e){if(e>this._length)for(let t=this._length;t<e;t++)this._array[t]=void 0;this._length=e}get(e){return this._array[this._getCyclicIndex(e)]}set(e,t){this._array[this._getCyclicIndex(e)]=t}push(e){this._array[this._getCyclicIndex(this._length)]=e,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++}recycle(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]}get isFull(){return this._length===this._maxLength}pop(){return this._array[this._getCyclicIndex(this._length---1)]}splice(e,t,...r){if(t){for(let n=e;n<this._length-t;n++)this._array[this._getCyclicIndex(n)]=this._array[this._getCyclicIndex(n+t)];this._length-=t,this.onDeleteEmitter.fire({index:e,amount:t})}for(let n=this._length-1;n>=e;n--)this._array[this._getCyclicIndex(n+r.length)]=this._array[this._getCyclicIndex(n)];for(let n=0;n<r.length;n++)this._array[this._getCyclicIndex(e+n)]=r[n];if(r.length&&this.onInsertEmitter.fire({index:e,amount:r.length}),this._length+r.length>this._maxLength){let n=this._length+r.length-this._maxLength;this._startIndex+=n,this._length=this._maxLength,this.onTrimEmitter.fire(n)}else this._length+=r.length}trimStart(e){e>this._length&&(e=this._length),this._startIndex+=e,this._length-=e,this.onTrimEmitter.fire(e)}shiftElements(e,t,r){if(!(t<=0)){if(e<0||e>=this._length)throw new Error("start argument out of range");if(e+r<0)throw new Error("Cannot shift elements in list beyond index 0");if(r>0){for(let o=t-1;o>=0;o--)this.set(e+o+r,this.get(e+o));let n=e+t+r-this._length;if(n>0)for(this._length+=n;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let n=0;n<t;n++)this.set(e+n+r,this.get(e+n))}}_getCyclicIndex(e){return(this._startIndex+e)%this._maxLength}},Je=3,$r=Object.freeze(new Kb),vC=0,q3=2,Fb=class Pte{constructor(t,r,n=!1){this.isWrapped=n,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(t*Je);let o=r||Fi.fromCharData([0,jee,1,0]);for(let i=0;i<t;++i)this.setCell(i,o);this.length=t}get(t){let r=this._data[t*Je+0],n=r&2097151;return[this._data[t*Je+1],r&2097152?this._combined[t]:n?td(n):"",r>>22,r&2097152?this._combined[t].charCodeAt(this._combined[t].length-1):n]}set(t,r){this._data[t*Je+1]=r[0],r[1].length>1?(this._combined[t]=r[1],this._data[t*Je+0]=t|2097152|r[2]<<22):this._data[t*Je+0]=r[1].charCodeAt(0)|r[2]<<22}getWidth(t){return this._data[t*Je+0]>>22}hasWidth(t){return this._data[t*Je+0]&12582912}getFg(t){return this._data[t*Je+1]}getBg(t){return this._data[t*Je+2]}hasContent(t){return this._data[t*Je+0]&4194303}getCodePoint(t){let r=this._data[t*Je+0];return r&2097152?this._combined[t].charCodeAt(this._combined[t].length-1):r&2097151}isCombined(t){return this._data[t*Je+0]&2097152}getString(t){let r=this._data[t*Je+0];return r&2097152?this._combined[t]:r&2097151?td(r&2097151):""}isProtected(t){return this._data[t*Je+2]&536870912}loadCell(t,r){return vC=t*Je,r.content=this._data[vC+0],r.fg=this._data[vC+1],r.bg=this._data[vC+2],r.content&2097152&&(r.combinedData=this._combined[t]),r.bg&268435456&&(r.extended=this._extendedAttrs[t]),r}setCell(t,r){r.content&2097152&&(this._combined[t]=r.combinedData),r.bg&268435456&&(this._extendedAttrs[t]=r.extended),this._data[t*Je+0]=r.content,this._data[t*Je+1]=r.fg,this._data[t*Je+2]=r.bg}setCellFromCodepoint(t,r,n,o){o.bg&268435456&&(this._extendedAttrs[t]=o.extended),this._data[t*Je+0]=r|n<<22,this._data[t*Je+1]=o.fg,this._data[t*Je+2]=o.bg}addCodepointToCell(t,r,n){let o=this._data[t*Je+0];o&2097152?this._combined[t]+=td(r):o&2097151?(this._combined[t]=td(o&2097151)+td(r),o&=-2097152,o|=2097152):o=r|1<<22,n&&(o&=-12582913,o|=n<<22),this._data[t*Je+0]=o}insertCells(t,r,n){if(t%=this.length,t&&this.getWidth(t-1)===2&&this.setCellFromCodepoint(t-1,0,1,n),r<this.length-t){let o=new Fi;for(let i=this.length-t-r-1;i>=0;--i)this.setCell(t+r+i,this.loadCell(t+i,o));for(let i=0;i<r;++i)this.setCell(t+i,n)}else for(let o=t;o<this.length;++o)this.setCell(o,n);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,n)}deleteCells(t,r,n){if(t%=this.length,r<this.length-t){let o=new Fi;for(let i=0;i<this.length-t-r;++i)this.setCell(t+i,this.loadCell(t+r+i,o));for(let i=this.length-r;i<this.length;++i)this.setCell(i,n)}else for(let o=t;o<this.length;++o)this.setCell(o,n);t&&this.getWidth(t-1)===2&&this.setCellFromCodepoint(t-1,0,1,n),this.getWidth(t)===0&&!this.hasContent(t)&&this.setCellFromCodepoint(t,0,1,n)}replaceCells(t,r,n,o=!1){if(o){for(t&&this.getWidth(t-1)===2&&!this.isProtected(t-1)&&this.setCellFromCodepoint(t-1,0,1,n),r<this.length&&this.getWidth(r-1)===2&&!this.isProtected(r)&&this.setCellFromCodepoint(r,0,1,n);t<r&&t<this.length;)this.isProtected(t)||this.setCell(t,n),t++;return}for(t&&this.getWidth(t-1)===2&&this.setCellFromCodepoint(t-1,0,1,n),r<this.length&&this.getWidth(r-1)===2&&this.setCellFromCodepoint(r,0,1,n);t<r&&t<this.length;)this.setCell(t++,n)}resize(t,r){if(t===this.length)return this._data.length*4*q3<this._data.buffer.byteLength;let n=t*Je;if(t>this.length){if(this._data.buffer.byteLength>=n*4)this._data=new Uint32Array(this._data.buffer,0,n);else{let o=new Uint32Array(n);o.set(this._data),this._data=o}for(let o=this.length;o<t;++o)this.setCell(o,r)}else{this._data=this._data.subarray(0,n);let o=Object.keys(this._combined);for(let a=0;a<o.length;a++){let s=parseInt(o[a],10);s>=t&&delete this._combined[s]}let i=Object.keys(this._extendedAttrs);for(let a=0;a<i.length;a++){let s=parseInt(i[a],10);s>=t&&delete this._extendedAttrs[s]}}return this.length=t,n*4*q3<this._data.buffer.byteLength}cleanupMemory(){if(this._data.length*4*q3<this._data.buffer.byteLength){let t=new Uint32Array(this._data.length);return t.set(this._data),this._data=t,1}return 0}fill(t,r=!1){if(r){for(let n=0;n<this.length;++n)this.isProtected(n)||this.setCell(n,t);return}this._combined={},this._extendedAttrs={};for(let n=0;n<this.length;++n)this.setCell(n,t)}copyFrom(t){this.length!==t.length?this._data=new Uint32Array(t._data):this._data.set(t._data),this.length=t.length,this._combined={};for(let r in t._combined)this._combined[r]=t._combined[r];this._extendedAttrs={};for(let r in t._extendedAttrs)this._extendedAttrs[r]=t._extendedAttrs[r];this.isWrapped=t.isWrapped}clone(){let t=new Pte(0);t._data=new Uint32Array(this._data),t.length=this.length;for(let r in this._combined)t._combined[r]=this._combined[r];for(let r in this._extendedAttrs)t._extendedAttrs[r]=this._extendedAttrs[r];return t.isWrapped=this.isWrapped,t}getTrimmedLength(){for(let t=this.length-1;t>=0;--t)if(this._data[t*Je+0]&4194303)return t+(this._data[t*Je+0]>>22);return 0}getNoBgTrimmedLength(){for(let t=this.length-1;t>=0;--t)if(this._data[t*Je+0]&4194303||this._data[t*Je+2]&50331648)return t+(this._data[t*Je+0]>>22);return 0}copyCellsFrom(t,r,n,o,i){let a=t._data;if(i)for(let l=o-1;l>=0;l--){for(let c=0;c<Je;c++)this._data[(n+l)*Je+c]=a[(r+l)*Je+c];a[(r+l)*Je+2]&268435456&&(this._extendedAttrs[n+l]=t._extendedAttrs[r+l])}else for(let l=0;l<o;l++){for(let c=0;c<Je;c++)this._data[(n+l)*Je+c]=a[(r+l)*Je+c];a[(r+l)*Je+2]&268435456&&(this._extendedAttrs[n+l]=t._extendedAttrs[r+l])}let s=Object.keys(t._combined);for(let l=0;l<s.length;l++){let c=parseInt(s[l],10);c>=r&&(this._combined[c-r+n]=t._combined[c])}}translateToString(t,r,n,o){r=r??0,n=n??this.length,t&&(n=Math.min(n,this.getTrimmedLength())),o&&(o.length=0);let i="";for(;r<n;){let a=this._data[r*Je+0],s=a&2097151,l=a&2097152?this._combined[r]:s?td(s):rd;if(i+=l,o)for(let c=0;c<l.length;++c)o.push(r);r+=a>>22||1}return o&&o.push(r),i}};function _Se(e,t,r,n,o,i){let a=[];for(let s=0;s<e.length-1;s++){let l=s,c=e.get(++l);if(!c.isWrapped)continue;let d=[e.get(s)];for(;l<e.length&&c.isWrapped;)d.push(c),c=e.get(++l);if(!i&&n>=s&&n<l){s+=d.length-1;continue}let u=0,f=Gb(d,u,t),m=1,p=0;for(;m<d.length;){let b=Gb(d,m,t),v=b-p,x=r-f,_=Math.min(v,x);d[u].copyCellsFrom(d[m],p,f,_,!1),f+=_,f===r&&(u++,f=0),p+=_,p===b&&(m++,p=0),f===0&&u!==0&&d[u-1].getWidth(r-1)===2&&(d[u].copyCellsFrom(d[u-1],r-1,f++,1,!1),d[u-1].setCell(r-1,o))}d[u].replaceCells(f,r,o);let g=0;for(let b=d.length-1;b>0&&(b>u||d[b].getTrimmedLength()===0);b--)g++;g>0&&(a.push(s+d.length-g),a.push(g)),s+=d.length-1}return a}function ISe(e,t){let r=[],n=0,o=t[n],i=0;for(let a=0;a<e.length;a++)if(o===a){let s=t[++n];e.onDeleteEmitter.fire({index:a-i,amount:s}),a+=s-1,i+=s,o=t[++n]}else r.push(a);return{layout:r,countRemoved:i}}function wSe(e,t){let r=[];for(let n=0;n<t.length;n++)r.push(e.get(t[n]));for(let n=0;n<r.length;n++)e.set(n,r[n]);e.length=t.length}function SSe(e,t,r){let n=[],o=e.map((l,c)=>Gb(e,c,t)).reduce((l,c)=>l+c),i=0,a=0,s=0;for(;s<o;){if(o-s<r){n.push(o-s);break}i+=r;let l=Gb(e,a,t);i>l&&(i-=l,a++);let c=e[a].getWidth(i-1)===2;c&&i--;let d=c?r-1:r;n.push(d),s+=d}return n}function Gb(e,t,r){if(t===e.length-1)return e[t].getTrimmedLength();let n=!e[t].hasContent(r-1)&&e[t].getWidth(r-1)===1,o=e[t+1].getWidth(0)===2;return n&&o?r-1:r}var Dte=class Rte{constructor(t){this.line=t,this.isDisposed=!1,this._disposables=[],this._id=Rte._nextId++,this._onDispose=this.register(new ce),this.onDispose=this._onDispose.event}get id(){return this._id}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),af(this._disposables),this._disposables.length=0)}register(t){return this._disposables.push(t),t}};Dte._nextId=1;var kSe=Dte,Wr={},rf=Wr.B;Wr[0]={"`":"\u25C6",a:"\u2592",b:"\u2409",c:"\u240C",d:"\u240D",e:"\u240A",f:"\xB0",g:"\xB1",h:"\u2424",i:"\u240B",j:"\u2518",k:"\u2510",l:"\u250C",m:"\u2514",n:"\u253C",o:"\u23BA",p:"\u23BB",q:"\u2500",r:"\u23BC",s:"\u23BD",t:"\u251C",u:"\u2524",v:"\u2534",w:"\u252C",x:"\u2502",y:"\u2264",z:"\u2265","{":"\u03C0","|":"\u2260","}":"\xA3","~":"\xB7"};Wr.A={"#":"\xA3"};Wr.B=void 0;Wr[4]={"#":"\xA3","@":"\xBE","[":"ij","\\":"\xBD","]":"|","{":"\xA8","|":"f","}":"\xBC","~":"\xB4"};Wr.C=Wr[5]={"[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"};Wr.R={"#":"\xA3","@":"\xE0","[":"\xB0","\\":"\xE7","]":"\xA7","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xA8"};Wr.Q={"@":"\xE0","[":"\xE2","\\":"\xE7","]":"\xEA","^":"\xEE","`":"\xF4","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xFB"};Wr.K={"@":"\xA7","[":"\xC4","\\":"\xD6","]":"\xDC","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xDF"};Wr.Y={"#":"\xA3","@":"\xA7","[":"\xB0","\\":"\xE7","]":"\xE9","`":"\xF9","{":"\xE0","|":"\xF2","}":"\xE8","~":"\xEC"};Wr.E=Wr[6]={"@":"\xC4","[":"\xC6","\\":"\xD8","]":"\xC5","^":"\xDC","`":"\xE4","{":"\xE6","|":"\xF8","}":"\xE5","~":"\xFC"};Wr.Z={"#":"\xA3","@":"\xA7","[":"\xA1","\\":"\xD1","]":"\xBF","{":"\xB0","|":"\xF1","}":"\xE7"};Wr.H=Wr[7]={"@":"\xC9","[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"};Wr["="]={"#":"\xF9","@":"\xE0","[":"\xE9","\\":"\xE7","]":"\xEA","^":"\xEE",_:"\xE8","`":"\xF4","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xFB"};var xee=4294967295,bee=class{constructor(e,t,r){this._hasScrollback=e,this._optionsService=t,this._bufferService=r,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=$r.clone(),this.savedCharset=rf,this.markers=[],this._nullCell=Fi.fromCharData([0,jee,1,0]),this._whitespaceCell=Fi.fromCharData([0,rd,1,32]),this._isClearing=!1,this._memoryCleanupQueue=new AC,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new vee(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(e){return e?(this._nullCell.fg=e.fg,this._nullCell.bg=e.bg,this._nullCell.extended=e.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new CC),this._nullCell}getWhitespaceCell(e){return e?(this._whitespaceCell.fg=e.fg,this._whitespaceCell.bg=e.bg,this._whitespaceCell.extended=e.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new CC),this._whitespaceCell}getBlankLine(e,t){return new Fb(this._bufferService.cols,this.getNullCell(e),t)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){let e=this.ybase+this.y-this.ydisp;return e>=0&&e<this._rows}_getCorrectBufferLength(e){if(!this._hasScrollback)return e;let t=e+this._optionsService.rawOptions.scrollback;return t>xee?xee:t}fillViewportRows(e){if(this.lines.length===0){e===void 0&&(e=$r);let t=this._rows;for(;t--;)this.lines.push(this.getBlankLine(e))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new vee(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(e,t){let r=this.getNullCell($r),n=0,o=this._getCorrectBufferLength(t);if(o>this.lines.maxLength&&(this.lines.maxLength=o),this.lines.length>0){if(this._cols<e)for(let a=0;a<this.lines.length;a++)n+=+this.lines.get(a).resize(e,r);let i=0;if(this._rows<t)for(let a=this._rows;a<t;a++)this.lines.length<t+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new Fb(e,r)):this.ybase>0&&this.lines.length<=this.ybase+this.y+i+1?(this.ybase--,i++,this.ydisp>0&&this.ydisp--):this.lines.push(new Fb(e,r)));else for(let a=this._rows;a>t;a--)this.lines.length>t+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(o<this.lines.maxLength){let a=this.lines.length-o;a>0&&(this.lines.trimStart(a),this.ybase=Math.max(this.ybase-a,0),this.ydisp=Math.max(this.ydisp-a,0),this.savedY=Math.max(this.savedY-a,0)),this.lines.maxLength=o}this.x=Math.min(this.x,e-1),this.y=Math.min(this.y,t-1),i&&(this.y+=i),this.savedX=Math.min(this.savedX,e-1),this.scrollTop=0}if(this.scrollBottom=t-1,this._isReflowEnabled&&(this._reflow(e,t),this._cols>e))for(let i=0;i<this.lines.length;i++)n+=+this.lines.get(i).resize(e,r);this._cols=e,this._rows=t,this._memoryCleanupQueue.clear(),n>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue(()=>this._batchedMemoryCleanup()))}_batchedMemoryCleanup(){let e=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,e=!1);let t=0;for(;this._memoryCleanupPosition<this.lines.length;)if(t+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),t>100)return!0;return e}get _isReflowEnabled(){let e=this._optionsService.rawOptions.windowsPty;return e&&e.buildNumber?this._hasScrollback&&e.backend==="conpty"&&e.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(e,t){this._cols!==e&&(e>this._cols?this._reflowLarger(e,t):this._reflowSmaller(e,t))}_reflowLarger(e,t){let r=this._optionsService.rawOptions.reflowCursorLine,n=_Se(this.lines,this._cols,e,this.ybase+this.y,this.getNullCell($r),r);if(n.length>0){let o=ISe(this.lines,n);wSe(this.lines,o.layout),this._reflowLargerAdjustViewport(e,t,o.countRemoved)}}_reflowLargerAdjustViewport(e,t,r){let n=this.getNullCell($r),o=r;for(;o-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<t&&this.lines.push(new Fb(e,n))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-r,0)}_reflowSmaller(e,t){let r=this._optionsService.rawOptions.reflowCursorLine,n=this.getNullCell($r),o=[],i=0;for(let a=this.lines.length-1;a>=0;a--){let s=this.lines.get(a);if(!s||!s.isWrapped&&s.getTrimmedLength()<=e)continue;let l=[s];for(;s.isWrapped&&a>0;)s=this.lines.get(--a),l.unshift(s);if(!r){let _=this.ybase+this.y;if(_>=a&&_<a+l.length)continue}let c=l[l.length-1].getTrimmedLength(),d=SSe(l,this._cols,e),u=d.length-l.length,f;this.ybase===0&&this.y!==this.lines.length-1?f=Math.max(0,this.y-this.lines.maxLength+u):f=Math.max(0,this.lines.length-this.lines.maxLength+u);let m=[];for(let _=0;_<u;_++){let I=this.getBlankLine($r,!0);m.push(I)}m.length>0&&(o.push({start:a+l.length+i,newLines:m}),i+=m.length),l.push(...m);let p=d.length-1,g=d[p];g===0&&(p--,g=d[p]);let b=l.length-u-1,v=c;for(;b>=0;){let _=Math.min(v,g);if(l[p]===void 0)break;if(l[p].copyCellsFrom(l[b],v-_,g-_,_,!0),g-=_,g===0&&(p--,g=d[p]),v-=_,v===0){b--;let I=Math.max(b,0);v=Gb(l,I,this._cols)}}for(let _=0;_<l.length;_++)d[_]<e&&l[_].setCell(d[_],n);let x=u-f;for(;x-- >0;)this.ybase===0?this.y<t-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+i)-t&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+u,this.ybase+t-1)}if(o.length>0){let a=[],s=[];for(let g=0;g<this.lines.length;g++)s.push(this.lines.get(g));let l=this.lines.length,c=l-1,d=0,u=o[d];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+i);let f=0;for(let g=Math.min(this.lines.maxLength-1,l+i-1);g>=0;g--)if(u&&u.start>c+f){for(let b=u.newLines.length-1;b>=0;b--)this.lines.set(g--,u.newLines[b]);g++,a.push({index:c+1,amount:u.newLines.length}),f+=u.newLines.length,u=o[++d]}else this.lines.set(g,s[c--]);let m=0;for(let g=a.length-1;g>=0;g--)a[g].index+=m,this.lines.onInsertEmitter.fire(a[g]),m+=a[g].amount;let p=Math.max(0,l+i-this.lines.maxLength);p>0&&this.lines.onTrimEmitter.fire(p)}}translateBufferLineToString(e,t,r=0,n){let o=this.lines.get(e);return o?o.translateToString(t,r,n):""}getWrappedRangeForLine(e){let t=e,r=e;for(;t>0&&this.lines.get(t).isWrapped;)t--;for(;r+1<this.lines.length&&this.lines.get(r+1).isWrapped;)r++;return{first:t,last:r}}setupTabStops(e){for(e!=null?this.tabs[e]||(e=this.prevStop(e)):(this.tabs={},e=0);e<this._cols;e+=this._optionsService.rawOptions.tabStopWidth)this.tabs[e]=!0}prevStop(e){for(e==null&&(e=this.x);!this.tabs[--e]&&e>0;);return e>=this._cols?this._cols-1:e<0?0:e}nextStop(e){for(e==null&&(e=this.x);!this.tabs[++e]&&e<this._cols;);return e>=this._cols?this._cols-1:e<0?0:e}clearMarkers(e){this._isClearing=!0;for(let t=0;t<this.markers.length;t++)this.markers[t].line===e&&(this.markers[t].dispose(),this.markers.splice(t--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let e=0;e<this.markers.length;e++)this.markers[e].dispose();this.markers.length=0,this._isClearing=!1}addMarker(e){let t=new kSe(e);return this.markers.push(t),t.register(this.lines.onTrim(r=>{t.line-=r,t.line<0&&t.dispose()})),t.register(this.lines.onInsert(r=>{t.line>=r.index&&(t.line+=r.amount)})),t.register(this.lines.onDelete(r=>{t.line>=r.index&&t.line<r.index+r.amount&&t.dispose(),t.line>r.index&&(t.line-=r.amount)})),t.register(t.onDispose(()=>this._removeMarker(t))),t}_removeMarker(e){this._isClearing||this.markers.splice(this.markers.indexOf(e),1)}},CSe=class extends Qe{constructor(e,t){super(),this._optionsService=e,this._bufferService=t,this._onBufferActivate=this._register(new ce),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this._register(this._optionsService.onSpecificOptionChange("scrollback",()=>this.resize(this._bufferService.cols,this._bufferService.rows))),this._register(this._optionsService.onSpecificOptionChange("tabStopWidth",()=>this.setupTabStops()))}reset(){this._normal=new bee(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new bee(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(e){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(e),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))}resize(e,t){this._normal.resize(e,t),this._alt.resize(e,t),this.setupTabStops(e)}setupTabStops(e){this._normal.setupTabStops(e),this._alt.setupTabStops(e)}},Tte=2,Ete=1,NN=class extends Qe{constructor(e){super(),this.isUserScrolling=!1,this._onResize=this._register(new ce),this.onResize=this._onResize.event,this._onScroll=this._register(new ce),this.onScroll=this._onScroll.event,this.cols=Math.max(e.rawOptions.cols||0,Tte),this.rows=Math.max(e.rawOptions.rows||0,Ete),this.buffers=this._register(new CSe(e,this)),this._register(this.buffers.onBufferActivate(t=>{this._onScroll.fire(t.activeBuffer.ydisp)}))}get buffer(){return this.buffers.active}resize(e,t){let r=this.cols!==e,n=this.rows!==t;this.cols=e,this.rows=t,this.buffers.resize(e,t),this._onResize.fire({cols:e,rows:t,colsChanged:r,rowsChanged:n})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(e,t=!1){let r=this.buffer,n;n=this._cachedBlankLine,(!n||n.length!==this.cols||n.getFg(0)!==e.fg||n.getBg(0)!==e.bg)&&(n=r.getBlankLine(e,t),this._cachedBlankLine=n),n.isWrapped=t;let o=r.ybase+r.scrollTop,i=r.ybase+r.scrollBottom;if(r.scrollTop===0){let a=r.lines.isFull;i===r.lines.length-1?a?r.lines.recycle().copyFrom(n):r.lines.push(n.clone()):r.lines.splice(i+1,0,n.clone()),a?this.isUserScrolling&&(r.ydisp=Math.max(r.ydisp-1,0)):(r.ybase++,this.isUserScrolling||r.ydisp++)}else{let a=i-o+1;r.lines.shiftElements(o+1,a-1,-1),r.lines.set(i,n.clone())}this.isUserScrolling||(r.ydisp=r.ybase),this._onScroll.fire(r.ydisp)}scrollLines(e,t){let r=this.buffer;if(e<0){if(r.ydisp===0)return;this.isUserScrolling=!0}else e+r.ydisp>=r.ybase&&(this.isUserScrolling=!1);let n=r.ydisp;r.ydisp=Math.max(Math.min(r.ydisp+e,r.ybase),0),n!==r.ydisp&&(t||this._onScroll.fire(r.ydisp))}};NN=br([ye(0,un)],NN);var xh={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnEraseInDisplay:!1,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},reflowCursorLine:!1,rescaleOverlappingGlyphs:!1,rightClickSelectsWord:$C,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRuler:{}},PSe=["normal","bold","100","200","300","400","500","600","700","800","900"],DSe=class extends Qe{constructor(e){super(),this._onOptionChange=this._register(new ce),this.onOptionChange=this._onOptionChange.event;let t={...xh};for(let r in e)if(r in t)try{let n=e[r];t[r]=this._sanitizeAndValidateOption(r,n)}catch(n){console.error(n)}this.rawOptions=t,this.options={...t},this._setupOptions(),this._register(Qt(()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null}))}onSpecificOptionChange(e,t){return this.onOptionChange(r=>{r===e&&t(this.rawOptions[e])})}onMultipleOptionChange(e,t){return this.onOptionChange(r=>{e.indexOf(r)!==-1&&t()})}_setupOptions(){let e=r=>{if(!(r in xh))throw new Error(`No option with key "${r}"`);return this.rawOptions[r]},t=(r,n)=>{if(!(r in xh))throw new Error(`No option with key "${r}"`);n=this._sanitizeAndValidateOption(r,n),this.rawOptions[r]!==n&&(this.rawOptions[r]=n,this._onOptionChange.fire(r))};for(let r in this.rawOptions){let n={get:e.bind(this,r),set:t.bind(this,r)};Object.defineProperty(this.options,r,n)}}_sanitizeAndValidateOption(e,t){switch(e){case"cursorStyle":if(t||(t=xh[e]),!RSe(t))throw new Error(`"${t}" is not a valid value for ${e}`);break;case"wordSeparator":t||(t=xh[e]);break;case"fontWeight":case"fontWeightBold":if(typeof t=="number"&&1<=t&&t<=1e3)break;t=PSe.includes(t)?t:xh[e];break;case"cursorWidth":t=Math.floor(t);case"lineHeight":case"tabStopWidth":if(t<1)throw new Error(`${e} cannot be less than 1, value: ${t}`);break;case"minimumContrastRatio":t=Math.max(1,Math.min(21,Math.round(t*10)/10));break;case"scrollback":if(t=Math.min(t,4294967295),t<0)throw new Error(`${e} cannot be less than 0, value: ${t}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(t<=0)throw new Error(`${e} cannot be less than or equal to 0, value: ${t}`);break;case"rows":case"cols":if(!t&&t!==0)throw new Error(`${e} must be numeric, value: ${t}`);break;case"windowsPty":t=t??{};break}return t}};function RSe(e){return e==="block"||e==="underline"||e==="bar"}function Lb(e,t=5){if(typeof e!="object")return e;let r=Array.isArray(e)?[]:{};for(let n in e)r[n]=t<=1?e[n]:e[n]&&Lb(e[n],t-1);return r}var yee=Object.freeze({insertMode:!1}),_ee=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,cursorBlink:void 0,cursorStyle:void 0,origin:!1,reverseWraparound:!1,sendFocus:!1,synchronizedOutput:!1,wraparound:!0}),FN=class extends Qe{constructor(e,t,r){super(),this._bufferService=e,this._logService=t,this._optionsService=r,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this._register(new ce),this.onData=this._onData.event,this._onUserInput=this._register(new ce),this.onUserInput=this._onUserInput.event,this._onBinary=this._register(new ce),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this._register(new ce),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=Lb(yee),this.decPrivateModes=Lb(_ee)}reset(){this.modes=Lb(yee),this.decPrivateModes=Lb(_ee)}triggerDataEvent(e,t=!1){if(this._optionsService.rawOptions.disableStdin)return;let r=this._bufferService.buffer;t&&this._optionsService.rawOptions.scrollOnUserInput&&r.ybase!==r.ydisp&&this._onRequestScrollToBottom.fire(),t&&this._onUserInput.fire(),this._logService.debug(`sending data "${e}"`),this._logService.trace("sending data (codes)",()=>e.split("").map(n=>n.charCodeAt(0))),this._onData.fire(e)}triggerBinaryEvent(e){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${e}"`),this._logService.trace("sending binary (codes)",()=>e.split("").map(t=>t.charCodeAt(0))),this._onBinary.fire(e))}};FN=br([ye(0,dn),ye(1,Zee),ye(2,un)],FN);var Iee={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:e=>e.button===4||e.action!==1?!1:(e.ctrl=!1,e.alt=!1,e.shift=!1,!0)},VT200:{events:19,restrict:e=>e.action!==32},DRAG:{events:23,restrict:e=>!(e.action===32&&e.button===3)},ANY:{events:31,restrict:e=>!0}};function X3(e,t){let r=(e.ctrl?16:0)|(e.shift?4:0)|(e.alt?8:0);return e.button===4?(r|=64,r|=e.action):(r|=e.button&3,e.button&4&&(r|=64),e.button&8&&(r|=128),e.action===32?r|=32:e.action===0&&!t&&(r|=3)),r}var Q3=String.fromCharCode,wee={DEFAULT:e=>{let t=[X3(e,!1)+32,e.col+32,e.row+32];return t[0]>255||t[1]>255||t[2]>255?"":`\x1B[M${Q3(t[0])}${Q3(t[1])}${Q3(t[2])}`},SGR:e=>{let t=e.action===0&&e.button!==4?"m":"M";return`\x1B[<${X3(e,!0)};${e.col};${e.row}${t}`},SGR_PIXELS:e=>{let t=e.action===0&&e.button!==4?"m":"M";return`\x1B[<${X3(e,!0)};${e.x};${e.y}${t}`}},LN=class extends Qe{constructor(e,t,r){super(),this._bufferService=e,this._coreService=t,this._optionsService=r,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._wheelPartialScroll=0,this._onProtocolChange=this._register(new ce),this.onProtocolChange=this._onProtocolChange.event;for(let n of Object.keys(Iee))this.addProtocol(n,Iee[n]);for(let n of Object.keys(wee))this.addEncoding(n,wee[n]);this.reset()}addProtocol(e,t){this._protocols[e]=t}addEncoding(e,t){this._encodings[e]=t}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(e){if(!this._protocols[e])throw new Error(`unknown protocol "${e}"`);this._activeProtocol=e,this._onProtocolChange.fire(this._protocols[e].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(e){if(!this._encodings[e])throw new Error(`unknown encoding "${e}"`);this._activeEncoding=e}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null,this._wheelPartialScroll=0}consumeWheelEvent(e,t,r){if(e.deltaY===0||e.shiftKey||t===void 0||r===void 0)return 0;let n=t/r,o=this._applyScrollModifier(e.deltaY,e);return e.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(o/=n+0,Math.abs(e.deltaY)<50&&(o*=.3),this._wheelPartialScroll+=o,o=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):e.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(o*=this._bufferService.rows),o}_applyScrollModifier(e,t){return t.altKey||t.ctrlKey||t.shiftKey?e*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:e*this._optionsService.rawOptions.scrollSensitivity}triggerMouseEvent(e){if(e.col<0||e.col>=this._bufferService.cols||e.row<0||e.row>=this._bufferService.rows||e.button===4&&e.action===32||e.button===3&&e.action!==32||e.button!==4&&(e.action===2||e.action===3)||(e.col++,e.row++,e.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,e,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(e))return!1;let t=this._encodings[this._activeEncoding](e);return t&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(t):this._coreService.triggerDataEvent(t,!0)),this._lastEvent=e,!0}explainEvents(e){return{down:!!(e&1),up:!!(e&2),drag:!!(e&4),move:!!(e&8),wheel:!!(e&16)}}_equalEvents(e,t,r){if(r){if(e.x!==t.x||e.y!==t.y)return!1}else if(e.col!==t.col||e.row!==t.row)return!1;return!(e.button!==t.button||e.action!==t.action||e.ctrl!==t.ctrl||e.alt!==t.alt||e.shift!==t.shift)}};LN=br([ye(0,dn),ye(1,lf),ye(2,un)],LN);var Y3=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],TSe=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]],Hr;function ESe(e,t){let r=0,n=t.length-1,o;if(e<t[0][0]||e>t[n][1])return!1;for(;n>=r;)if(o=r+n>>1,e>t[o][1])r=o+1;else if(e<t[o][0])n=o-1;else return!0;return!1}var $Se=class{constructor(){if(this.version="6",!Hr){Hr=new Uint8Array(65536),Hr.fill(1),Hr[0]=0,Hr.fill(0,1,32),Hr.fill(0,127,160),Hr.fill(2,4352,4448),Hr[9001]=2,Hr[9002]=2,Hr.fill(2,11904,42192),Hr[12351]=1,Hr.fill(2,44032,55204),Hr.fill(2,63744,64256),Hr.fill(2,65040,65050),Hr.fill(2,65072,65136),Hr.fill(2,65280,65377),Hr.fill(2,65504,65511);for(let e=0;e<Y3.length;++e)Hr.fill(0,Y3[e][0],Y3[e][1]+1)}}wcwidth(e){return e<32?0:e<127?1:e<65536?Hr[e]:ESe(e,TSe)?0:e>=131072&&e<=196605||e>=196608&&e<=262141?2:1}charProperties(e,t){let r=this.wcwidth(e),n=r===0&&t!==0;if(n){let o=of.extractWidth(t);o===0?n=!1:o>r&&(r=o)}return of.createPropertyValue(0,r,n)}},of=class kC{constructor(){this._providers=Object.create(null),this._active="",this._onChange=new ce,this.onChange=this._onChange.event;let t=new $Se;this.register(t),this._active=t.version,this._activeProvider=t}static extractShouldJoin(t){return(t&1)!==0}static extractWidth(t){return t>>1&3}static extractCharKind(t){return t>>3}static createPropertyValue(t,r,n=!1){return(t&16777215)<<3|(r&3)<<1|(n?1:0)}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(t){if(!this._providers[t])throw new Error(`unknown Unicode version "${t}"`);this._active=t,this._activeProvider=this._providers[t],this._onChange.fire(t)}register(t){this._providers[t.version]=t}wcwidth(t){return this._activeProvider.wcwidth(t)}getStringCellWidth(t){let r=0,n=0,o=t.length;for(let i=0;i<o;++i){let a=t.charCodeAt(i);if(55296<=a&&a<=56319){if(++i>=o)return r+this.wcwidth(a);let c=t.charCodeAt(i);56320<=c&&c<=57343?a=(a-55296)*1024+c-56320+65536:r+=this.wcwidth(c)}let s=this.charProperties(a,n),l=kC.extractWidth(s);kC.extractShouldJoin(s)&&(l-=kC.extractWidth(n)),r+=l,n=s}return r}charProperties(t,r){return this._activeProvider.charProperties(t,r)}},ASe=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(e){this.glevel=e,this.charset=this._charsets[e]}setgCharset(e,t){this._charsets[e]=t,this.glevel===e&&(this.charset=t)}};function See(e){let t=e.buffer.lines.get(e.buffer.ybase+e.buffer.y-1)?.get(e.cols-1),r=e.buffer.lines.get(e.buffer.ybase+e.buffer.y);r&&t&&(r.isWrapped=t[3]!==0&&t[3]!==32)}var Eb=2147483647,OSe=256,$te=class MN{constructor(t=32,r=32){if(this.maxLength=t,this.maxSubParamsLength=r,r>OSe)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(t),this.length=0,this._subParams=new Int32Array(r),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(t),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}static fromArray(t){let r=new MN;if(!t.length)return r;for(let n=Array.isArray(t[0])?1:0;n<t.length;++n){let o=t[n];if(Array.isArray(o))for(let i=0;i<o.length;++i)r.addSubParam(o[i]);else r.addParam(o)}return r}clone(){let t=new MN(this.maxLength,this.maxSubParamsLength);return t.params.set(this.params),t.length=this.length,t._subParams.set(this._subParams),t._subParamsLength=this._subParamsLength,t._subParamsIdx.set(this._subParamsIdx),t._rejectDigits=this._rejectDigits,t._rejectSubDigits=this._rejectSubDigits,t._digitIsSub=this._digitIsSub,t}toArray(){let t=[];for(let r=0;r<this.length;++r){t.push(this.params[r]);let n=this._subParamsIdx[r]>>8,o=this._subParamsIdx[r]&255;o-n>0&&t.push(Array.prototype.slice.call(this._subParams,n,o))}return t}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(t){if(this._digitIsSub=!1,this.length>=this.maxLength){this._rejectDigits=!0;return}if(t<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=t>Eb?Eb:t}addSubParam(t){if(this._digitIsSub=!0,!!this.length){if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength){this._rejectSubDigits=!0;return}if(t<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=t>Eb?Eb:t,this._subParamsIdx[this.length-1]++}}hasSubParams(t){return(this._subParamsIdx[t]&255)-(this._subParamsIdx[t]>>8)>0}getSubParams(t){let r=this._subParamsIdx[t]>>8,n=this._subParamsIdx[t]&255;return n-r>0?this._subParams.subarray(r,n):null}getSubParamsAll(){let t={};for(let r=0;r<this.length;++r){let n=this._subParamsIdx[r]>>8,o=this._subParamsIdx[r]&255;o-n>0&&(t[r]=this._subParams.slice(n,o))}return t}addDigit(t){let r;if(this._rejectDigits||!(r=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;let n=this._digitIsSub?this._subParams:this.params,o=n[r-1];n[r-1]=~o?Math.min(o*10+t,Eb):t}},$b=[],zSe=class{constructor(){this._state=0,this._active=$b,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(e,t){this._handlers[e]===void 0&&(this._handlers[e]=[]);let r=this._handlers[e];return r.push(t),{dispose:()=>{let n=r.indexOf(t);n!==-1&&r.splice(n,1)}}}clearHandler(e){this._handlers[e]&&delete this._handlers[e]}setHandlerFallback(e){this._handlerFb=e}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=$b}reset(){if(this._state===2)for(let e=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;e>=0;--e)this._active[e].end(!1);this._stack.paused=!1,this._active=$b,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||$b,!this._active.length)this._handlerFb(this._id,"START");else for(let e=this._active.length-1;e>=0;e--)this._active[e].start()}_put(e,t,r){if(!this._active.length)this._handlerFb(this._id,"PUT",zC(e,t,r));else for(let n=this._active.length-1;n>=0;n--)this._active[n].put(e,t,r)}start(){this.reset(),this._state=1}put(e,t,r){if(this._state!==3){if(this._state===1)for(;t<r;){let n=e[t++];if(n===59){this._state=2,this._start();break}if(n<48||57<n){this._state=3;return}this._id===-1&&(this._id=0),this._id=this._id*10+n-48}this._state===2&&r-t>0&&this._put(e,t,r)}}end(e,t=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),!this._active.length)this._handlerFb(this._id,"END",e);else{let r=!1,n=this._active.length-1,o=!1;if(this._stack.paused&&(n=this._stack.loopPosition-1,r=t,o=this._stack.fallThrough,this._stack.paused=!1),!o&&r===!1){for(;n>=0&&(r=this._active[n].end(e),r!==!0);n--)if(r instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=n,this._stack.fallThrough=!1,r;n--}for(;n>=0;n--)if(r=this._active[n].end(!1),r instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=n,this._stack.fallThrough=!0,r}this._active=$b,this._id=-1,this._state=0}}},ei=class{constructor(e){this._handler=e,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(e,t,r){this._hitLimit||(this._data+=zC(e,t,r),this._data.length>1e7&&(this._data="",this._hitLimit=!0))}end(e){let t=!1;if(this._hitLimit)t=!1;else if(e&&(t=this._handler(this._data),t instanceof Promise))return t.then(r=>(this._data="",this._hitLimit=!1,r));return this._data="",this._hitLimit=!1,t}},Ab=[],NSe=class{constructor(){this._handlers=Object.create(null),this._active=Ab,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=Ab}registerHandler(e,t){this._handlers[e]===void 0&&(this._handlers[e]=[]);let r=this._handlers[e];return r.push(t),{dispose:()=>{let n=r.indexOf(t);n!==-1&&r.splice(n,1)}}}clearHandler(e){this._handlers[e]&&delete this._handlers[e]}setHandlerFallback(e){this._handlerFb=e}reset(){if(this._active.length)for(let e=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;e>=0;--e)this._active[e].unhook(!1);this._stack.paused=!1,this._active=Ab,this._ident=0}hook(e,t){if(this.reset(),this._ident=e,this._active=this._handlers[e]||Ab,!this._active.length)this._handlerFb(this._ident,"HOOK",t);else for(let r=this._active.length-1;r>=0;r--)this._active[r].hook(t)}put(e,t,r){if(!this._active.length)this._handlerFb(this._ident,"PUT",zC(e,t,r));else for(let n=this._active.length-1;n>=0;n--)this._active[n].put(e,t,r)}unhook(e,t=!0){if(!this._active.length)this._handlerFb(this._ident,"UNHOOK",e);else{let r=!1,n=this._active.length-1,o=!1;if(this._stack.paused&&(n=this._stack.loopPosition-1,r=t,o=this._stack.fallThrough,this._stack.paused=!1),!o&&r===!1){for(;n>=0&&(r=this._active[n].unhook(e),r!==!0);n--)if(r instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=n,this._stack.fallThrough=!1,r;n--}for(;n>=0;n--)if(r=this._active[n].unhook(!1),r instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=n,this._stack.fallThrough=!0,r}this._active=Ab,this._ident=0}},Mb=new $te;Mb.addParam(0);var kee=class{constructor(e){this._handler=e,this._data="",this._params=Mb,this._hitLimit=!1}hook(e){this._params=e.length>1||e.params[0]?e.clone():Mb,this._data="",this._hitLimit=!1}put(e,t,r){this._hitLimit||(this._data+=zC(e,t,r),this._data.length>1e7&&(this._data="",this._hitLimit=!0))}unhook(e){let t=!1;if(this._hitLimit)t=!1;else if(e&&(t=this._handler(this._data,this._params),t instanceof Promise))return t.then(r=>(this._params=Mb,this._data="",this._hitLimit=!1,r));return this._params=Mb,this._data="",this._hitLimit=!1,t}},FSe=class{constructor(e){this.table=new Uint8Array(e)}setDefault(e,t){this.table.fill(e<<4|t)}add(e,t,r,n){this.table[t<<8|e]=r<<4|n}addMany(e,t,r,n){for(let o=0;o<e.length;o++)this.table[t<<8|e[o]]=r<<4|n}},Ni=160,LSe=(function(){let e=new FSe(4095),t=Array.apply(null,Array(256)).map((s,l)=>l),r=(s,l)=>t.slice(s,l),n=r(32,127),o=r(0,24);o.push(25),o.push.apply(o,r(28,32));let i=r(0,14),a;e.setDefault(1,0),e.addMany(n,0,2,0);for(a in i)e.addMany([24,26,153,154],a,3,0),e.addMany(r(128,144),a,3,0),e.addMany(r(144,152),a,3,0),e.add(156,a,0,0),e.add(27,a,11,1),e.add(157,a,4,8),e.addMany([152,158,159],a,0,7),e.add(155,a,11,3),e.add(144,a,11,9);return e.addMany(o,0,3,0),e.addMany(o,1,3,1),e.add(127,1,0,1),e.addMany(o,8,0,8),e.addMany(o,3,3,3),e.add(127,3,0,3),e.addMany(o,4,3,4),e.add(127,4,0,4),e.addMany(o,6,3,6),e.addMany(o,5,3,5),e.add(127,5,0,5),e.addMany(o,2,3,2),e.add(127,2,0,2),e.add(93,1,4,8),e.addMany(n,8,5,8),e.add(127,8,5,8),e.addMany([156,27,24,26,7],8,6,0),e.addMany(r(28,32),8,0,8),e.addMany([88,94,95],1,0,7),e.addMany(n,7,0,7),e.addMany(o,7,0,7),e.add(156,7,0,0),e.add(127,7,0,7),e.add(91,1,11,3),e.addMany(r(64,127),3,7,0),e.addMany(r(48,60),3,8,4),e.addMany([60,61,62,63],3,9,4),e.addMany(r(48,60),4,8,4),e.addMany(r(64,127),4,7,0),e.addMany([60,61,62,63],4,0,6),e.addMany(r(32,64),6,0,6),e.add(127,6,0,6),e.addMany(r(64,127),6,0,0),e.addMany(r(32,48),3,9,5),e.addMany(r(32,48),5,9,5),e.addMany(r(48,64),5,0,6),e.addMany(r(64,127),5,7,0),e.addMany(r(32,48),4,9,5),e.addMany(r(32,48),1,9,2),e.addMany(r(32,48),2,9,2),e.addMany(r(48,127),2,10,0),e.addMany(r(48,80),1,10,0),e.addMany(r(81,88),1,10,0),e.addMany([89,90,92],1,10,0),e.addMany(r(96,127),1,10,0),e.add(80,1,11,9),e.addMany(o,9,0,9),e.add(127,9,0,9),e.addMany(r(28,32),9,0,9),e.addMany(r(32,48),9,9,12),e.addMany(r(48,60),9,8,10),e.addMany([60,61,62,63],9,9,10),e.addMany(o,11,0,11),e.addMany(r(32,128),11,0,11),e.addMany(r(28,32),11,0,11),e.addMany(o,10,0,10),e.add(127,10,0,10),e.addMany(r(28,32),10,0,10),e.addMany(r(48,60),10,8,10),e.addMany([60,61,62,63],10,0,11),e.addMany(r(32,48),10,9,12),e.addMany(o,12,0,12),e.add(127,12,0,12),e.addMany(r(28,32),12,0,12),e.addMany(r(32,48),12,9,12),e.addMany(r(48,64),12,0,11),e.addMany(r(64,127),12,12,13),e.addMany(r(64,127),10,12,13),e.addMany(r(64,127),9,12,13),e.addMany(o,13,13,13),e.addMany(n,13,13,13),e.add(127,13,0,13),e.addMany([27,156,24,26],13,14,0),e.add(Ni,0,2,0),e.add(Ni,8,5,8),e.add(Ni,6,0,6),e.add(Ni,11,0,11),e.add(Ni,13,13,13),e})(),MSe=class extends Qe{constructor(e=LSe){super(),this._transitions=e,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new $te,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(t,r,n)=>{},this._executeHandlerFb=t=>{},this._csiHandlerFb=(t,r)=>{},this._escHandlerFb=t=>{},this._errorHandlerFb=t=>t,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this._register(Qt(()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)})),this._oscParser=this._register(new zSe),this._dcsParser=this._register(new NSe),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},()=>!0)}_identifier(e,t=[64,126]){let r=0;if(e.prefix){if(e.prefix.length>1)throw new Error("only one byte as prefix supported");if(r=e.prefix.charCodeAt(0),r&&60>r||r>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(e.intermediates){if(e.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let o=0;o<e.intermediates.length;++o){let i=e.intermediates.charCodeAt(o);if(32>i||i>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");r<<=8,r|=i}}if(e.final.length!==1)throw new Error("final must be a single byte");let n=e.final.charCodeAt(0);if(t[0]>n||n>t[1])throw new Error(`final must be in range ${t[0]} .. ${t[1]}`);return r<<=8,r|=n,r}identToString(e){let t=[];for(;e;)t.push(String.fromCharCode(e&255)),e>>=8;return t.reverse().join("")}setPrintHandler(e){this._printHandler=e}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(e,t){let r=this._identifier(e,[48,126]);this._escHandlers[r]===void 0&&(this._escHandlers[r]=[]);let n=this._escHandlers[r];return n.push(t),{dispose:()=>{let o=n.indexOf(t);o!==-1&&n.splice(o,1)}}}clearEscHandler(e){this._escHandlers[this._identifier(e,[48,126])]&&delete this._escHandlers[this._identifier(e,[48,126])]}setEscHandlerFallback(e){this._escHandlerFb=e}setExecuteHandler(e,t){this._executeHandlers[e.charCodeAt(0)]=t}clearExecuteHandler(e){this._executeHandlers[e.charCodeAt(0)]&&delete this._executeHandlers[e.charCodeAt(0)]}setExecuteHandlerFallback(e){this._executeHandlerFb=e}registerCsiHandler(e,t){let r=this._identifier(e);this._csiHandlers[r]===void 0&&(this._csiHandlers[r]=[]);let n=this._csiHandlers[r];return n.push(t),{dispose:()=>{let o=n.indexOf(t);o!==-1&&n.splice(o,1)}}}clearCsiHandler(e){this._csiHandlers[this._identifier(e)]&&delete this._csiHandlers[this._identifier(e)]}setCsiHandlerFallback(e){this._csiHandlerFb=e}registerDcsHandler(e,t){return this._dcsParser.registerHandler(this._identifier(e),t)}clearDcsHandler(e){this._dcsParser.clearHandler(this._identifier(e))}setDcsHandlerFallback(e){this._dcsParser.setHandlerFallback(e)}registerOscHandler(e,t){return this._oscParser.registerHandler(e,t)}clearOscHandler(e){this._oscParser.clearHandler(e)}setOscHandlerFallback(e){this._oscParser.setHandlerFallback(e)}setErrorHandler(e){this._errorHandler=e}clearErrorHandler(){this._errorHandler=this._errorHandlerFb}reset(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(e,t,r,n,o){this._parseStack.state=e,this._parseStack.handlers=t,this._parseStack.handlerPos=r,this._parseStack.transition=n,this._parseStack.chunkPos=o}parse(e,t,r){let n=0,o=0,i=0,a;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,i=this._parseStack.chunkPos+1;else{if(r===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");let s=this._parseStack.handlers,l=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(r===!1&&l>-1){for(;l>=0&&(a=s[l](this._params),a!==!0);l--)if(a instanceof Promise)return this._parseStack.handlerPos=l,a}this._parseStack.handlers=[];break;case 4:if(r===!1&&l>-1){for(;l>=0&&(a=s[l](),a!==!0);l--)if(a instanceof Promise)return this._parseStack.handlerPos=l,a}this._parseStack.handlers=[];break;case 6:if(n=e[this._parseStack.chunkPos],a=this._dcsParser.unhook(n!==24&&n!==26,r),a)return a;n===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(n=e[this._parseStack.chunkPos],a=this._oscParser.end(n!==24&&n!==26,r),a)return a;n===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break}this._parseStack.state=0,i=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=this._parseStack.transition&15}for(let s=i;s<t;++s){switch(n=e[s],o=this._transitions.table[this.currentState<<8|(n<160?n:Ni)],o>>4){case 2:for(let f=s+1;;++f){if(f>=t||(n=e[f])<32||n>126&&n<Ni){this._printHandler(e,s,f),s=f-1;break}if(++f>=t||(n=e[f])<32||n>126&&n<Ni){this._printHandler(e,s,f),s=f-1;break}if(++f>=t||(n=e[f])<32||n>126&&n<Ni){this._printHandler(e,s,f),s=f-1;break}if(++f>=t||(n=e[f])<32||n>126&&n<Ni){this._printHandler(e,s,f),s=f-1;break}}break;case 3:this._executeHandlers[n]?this._executeHandlers[n]():this._executeHandlerFb(n),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:s,code:n,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:let l=this._csiHandlers[this._collect<<8|n],c=l?l.length-1:-1;for(;c>=0&&(a=l[c](this._params),a!==!0);c--)if(a instanceof Promise)return this._preserveStack(3,l,c,o,s),a;c<0&&this._csiHandlerFb(this._collect<<8|n,this._params),this.precedingJoinState=0;break;case 8:do switch(n){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(n-48)}while(++s<t&&(n=e[s])>47&&n<60);s--;break;case 9:this._collect<<=8,this._collect|=n;break;case 10:let d=this._escHandlers[this._collect<<8|n],u=d?d.length-1:-1;for(;u>=0&&(a=d[u](),a!==!0);u--)if(a instanceof Promise)return this._preserveStack(4,d,u,o,s),a;u<0&&this._escHandlerFb(this._collect<<8|n),this.precedingJoinState=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|n,this._params);break;case 13:for(let f=s+1;;++f)if(f>=t||(n=e[f])===24||n===26||n===27||n>127&&n<Ni){this._dcsParser.put(e,s,f),s=f-1;break}break;case 14:if(a=this._dcsParser.unhook(n!==24&&n!==26),a)return this._preserveStack(6,[],0,o,s),a;n===27&&(o|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0;break;case 4:this._oscParser.start();break;case 5:for(let f=s+1;;f++)if(f>=t||(n=e[f])<32||n>127&&n<Ni){this._oscParser.put(e,s,f),s=f-1;break}break;case 6:if(a=this._oscParser.end(n!==24&&n!==26),a)return this._preserveStack(5,[],0,o,s),a;n===27&&(o|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0;break}this.currentState=o&15}}},BSe=/^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,jSe=/^[\da-f]+$/;function Cee(e){if(!e)return;let t=e.toLowerCase();if(t.indexOf("rgb:")===0){t=t.slice(4);let r=BSe.exec(t);if(r){let n=r[1]?15:r[4]?255:r[7]?4095:65535;return[Math.round(parseInt(r[1]||r[4]||r[7]||r[10],16)/n*255),Math.round(parseInt(r[2]||r[5]||r[8]||r[11],16)/n*255),Math.round(parseInt(r[3]||r[6]||r[9]||r[12],16)/n*255)]}}else if(t.indexOf("#")===0&&(t=t.slice(1),jSe.exec(t)&&[3,6,9,12].includes(t.length))){let r=t.length/3,n=[0,0,0];for(let o=0;o<3;++o){let i=parseInt(t.slice(r*o,r*o+r),16);n[o]=r===1?i<<4:r===2?i:r===3?i>>4:i>>8}return n}}function J3(e,t){let r=e.toString(16),n=r.length<2?"0"+r:r;switch(t){case 4:return r[0];case 8:return n;case 12:return(n+n).slice(0,3);default:return n+n}}function USe(e,t=16){let[r,n,o]=e;return`rgb:${J3(r,t)}/${J3(n,t)}/${J3(o,t)}`}var VSe={"(":0,")":1,"*":2,"+":3,"-":1,".":2},ed=131072,Pee=10;function Dee(e,t){if(e>24)return t.setWinLines||!1;switch(e){case 1:return!!t.restoreWin;case 2:return!!t.minimizeWin;case 3:return!!t.setWinPosition;case 4:return!!t.setWinSizePixels;case 5:return!!t.raiseWin;case 6:return!!t.lowerWin;case 7:return!!t.refreshWin;case 8:return!!t.setWinSizeChars;case 9:return!!t.maximizeWin;case 10:return!!t.fullscreenWin;case 11:return!!t.getWinState;case 13:return!!t.getWinPosition;case 14:return!!t.getWinSizePixels;case 15:return!!t.getScreenSizePixels;case 16:return!!t.getCellSizePixels;case 18:return!!t.getWinSizeChars;case 19:return!!t.getScreenSizeChars;case 20:return!!t.getIconTitle;case 21:return!!t.getWinTitle;case 22:return!!t.pushTitle;case 23:return!!t.popTitle;case 24:return!!t.setWinLines}return!1}var Ree=5e3,Tee=0,HSe=class extends Qe{constructor(e,t,r,n,o,i,a,s,l=new MSe){super(),this._bufferService=e,this._charsetService=t,this._coreService=r,this._logService=n,this._optionsService=o,this._oscLinkService=i,this._coreMouseService=a,this._unicodeService=s,this._parser=l,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new LIe,this._utf8Decoder=new MIe,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=$r.clone(),this._eraseAttrDataInternal=$r.clone(),this._onRequestBell=this._register(new ce),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this._register(new ce),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this._register(new ce),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this._register(new ce),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this._register(new ce),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this._register(new ce),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this._register(new ce),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this._register(new ce),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this._register(new ce),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this._register(new ce),this.onLineFeed=this._onLineFeed.event,this._onScroll=this._register(new ce),this.onScroll=this._onScroll.event,this._onTitleChange=this._register(new ce),this.onTitleChange=this._onTitleChange.event,this._onColor=this._register(new ce),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this._register(this._parser),this._dirtyRowTracker=new BN(this._bufferService),this._activeBuffer=this._bufferService.buffer,this._register(this._bufferService.buffers.onBufferActivate(c=>this._activeBuffer=c.activeBuffer)),this._parser.setCsiHandlerFallback((c,d)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(c),params:d.toArray()})}),this._parser.setEscHandlerFallback(c=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(c)})}),this._parser.setExecuteHandlerFallback(c=>{this._logService.debug("Unknown EXECUTE code: ",{code:c})}),this._parser.setOscHandlerFallback((c,d,u)=>{this._logService.debug("Unknown OSC code: ",{identifier:c,action:d,data:u})}),this._parser.setDcsHandlerFallback((c,d,u)=>{d==="HOOK"&&(u=u.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(c),action:d,payload:u})}),this._parser.setPrintHandler((c,d,u)=>this.print(c,d,u)),this._parser.registerCsiHandler({final:"@"},c=>this.insertChars(c)),this._parser.registerCsiHandler({intermediates:" ",final:"@"},c=>this.scrollLeft(c)),this._parser.registerCsiHandler({final:"A"},c=>this.cursorUp(c)),this._parser.registerCsiHandler({intermediates:" ",final:"A"},c=>this.scrollRight(c)),this._parser.registerCsiHandler({final:"B"},c=>this.cursorDown(c)),this._parser.registerCsiHandler({final:"C"},c=>this.cursorForward(c)),this._parser.registerCsiHandler({final:"D"},c=>this.cursorBackward(c)),this._parser.registerCsiHandler({final:"E"},c=>this.cursorNextLine(c)),this._parser.registerCsiHandler({final:"F"},c=>this.cursorPrecedingLine(c)),this._parser.registerCsiHandler({final:"G"},c=>this.cursorCharAbsolute(c)),this._parser.registerCsiHandler({final:"H"},c=>this.cursorPosition(c)),this._parser.registerCsiHandler({final:"I"},c=>this.cursorForwardTab(c)),this._parser.registerCsiHandler({final:"J"},c=>this.eraseInDisplay(c,!1)),this._parser.registerCsiHandler({prefix:"?",final:"J"},c=>this.eraseInDisplay(c,!0)),this._parser.registerCsiHandler({final:"K"},c=>this.eraseInLine(c,!1)),this._parser.registerCsiHandler({prefix:"?",final:"K"},c=>this.eraseInLine(c,!0)),this._parser.registerCsiHandler({final:"L"},c=>this.insertLines(c)),this._parser.registerCsiHandler({final:"M"},c=>this.deleteLines(c)),this._parser.registerCsiHandler({final:"P"},c=>this.deleteChars(c)),this._parser.registerCsiHandler({final:"S"},c=>this.scrollUp(c)),this._parser.registerCsiHandler({final:"T"},c=>this.scrollDown(c)),this._parser.registerCsiHandler({final:"X"},c=>this.eraseChars(c)),this._parser.registerCsiHandler({final:"Z"},c=>this.cursorBackwardTab(c)),this._parser.registerCsiHandler({final:"`"},c=>this.charPosAbsolute(c)),this._parser.registerCsiHandler({final:"a"},c=>this.hPositionRelative(c)),this._parser.registerCsiHandler({final:"b"},c=>this.repeatPrecedingCharacter(c)),this._parser.registerCsiHandler({final:"c"},c=>this.sendDeviceAttributesPrimary(c)),this._parser.registerCsiHandler({prefix:">",final:"c"},c=>this.sendDeviceAttributesSecondary(c)),this._parser.registerCsiHandler({final:"d"},c=>this.linePosAbsolute(c)),this._parser.registerCsiHandler({final:"e"},c=>this.vPositionRelative(c)),this._parser.registerCsiHandler({final:"f"},c=>this.hVPosition(c)),this._parser.registerCsiHandler({final:"g"},c=>this.tabClear(c)),this._parser.registerCsiHandler({final:"h"},c=>this.setMode(c)),this._parser.registerCsiHandler({prefix:"?",final:"h"},c=>this.setModePrivate(c)),this._parser.registerCsiHandler({final:"l"},c=>this.resetMode(c)),this._parser.registerCsiHandler({prefix:"?",final:"l"},c=>this.resetModePrivate(c)),this._parser.registerCsiHandler({final:"m"},c=>this.charAttributes(c)),this._parser.registerCsiHandler({final:"n"},c=>this.deviceStatus(c)),this._parser.registerCsiHandler({prefix:"?",final:"n"},c=>this.deviceStatusPrivate(c)),this._parser.registerCsiHandler({intermediates:"!",final:"p"},c=>this.softReset(c)),this._parser.registerCsiHandler({intermediates:" ",final:"q"},c=>this.setCursorStyle(c)),this._parser.registerCsiHandler({final:"r"},c=>this.setScrollRegion(c)),this._parser.registerCsiHandler({final:"s"},c=>this.saveCursor(c)),this._parser.registerCsiHandler({final:"t"},c=>this.windowOptions(c)),this._parser.registerCsiHandler({final:"u"},c=>this.restoreCursor(c)),this._parser.registerCsiHandler({intermediates:"'",final:"}"},c=>this.insertColumns(c)),this._parser.registerCsiHandler({intermediates:"'",final:"~"},c=>this.deleteColumns(c)),this._parser.registerCsiHandler({intermediates:'"',final:"q"},c=>this.selectProtected(c)),this._parser.registerCsiHandler({intermediates:"$",final:"p"},c=>this.requestMode(c,!0)),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},c=>this.requestMode(c,!1)),this._parser.setExecuteHandler(te.BEL,()=>this.bell()),this._parser.setExecuteHandler(te.LF,()=>this.lineFeed()),this._parser.setExecuteHandler(te.VT,()=>this.lineFeed()),this._parser.setExecuteHandler(te.FF,()=>this.lineFeed()),this._parser.setExecuteHandler(te.CR,()=>this.carriageReturn()),this._parser.setExecuteHandler(te.BS,()=>this.backspace()),this._parser.setExecuteHandler(te.HT,()=>this.tab()),this._parser.setExecuteHandler(te.SO,()=>this.shiftOut()),this._parser.setExecuteHandler(te.SI,()=>this.shiftIn()),this._parser.setExecuteHandler(Ub.IND,()=>this.index()),this._parser.setExecuteHandler(Ub.NEL,()=>this.nextLine()),this._parser.setExecuteHandler(Ub.HTS,()=>this.tabSet()),this._parser.registerOscHandler(0,new ei(c=>(this.setTitle(c),this.setIconName(c),!0))),this._parser.registerOscHandler(1,new ei(c=>this.setIconName(c))),this._parser.registerOscHandler(2,new ei(c=>this.setTitle(c))),this._parser.registerOscHandler(4,new ei(c=>this.setOrReportIndexedColor(c))),this._parser.registerOscHandler(8,new ei(c=>this.setHyperlink(c))),this._parser.registerOscHandler(10,new ei(c=>this.setOrReportFgColor(c))),this._parser.registerOscHandler(11,new ei(c=>this.setOrReportBgColor(c))),this._parser.registerOscHandler(12,new ei(c=>this.setOrReportCursorColor(c))),this._parser.registerOscHandler(104,new ei(c=>this.restoreIndexedColor(c))),this._parser.registerOscHandler(110,new ei(c=>this.restoreFgColor(c))),this._parser.registerOscHandler(111,new ei(c=>this.restoreBgColor(c))),this._parser.registerOscHandler(112,new ei(c=>this.restoreCursorColor(c))),this._parser.registerEscHandler({final:"7"},()=>this.saveCursor()),this._parser.registerEscHandler({final:"8"},()=>this.restoreCursor()),this._parser.registerEscHandler({final:"D"},()=>this.index()),this._parser.registerEscHandler({final:"E"},()=>this.nextLine()),this._parser.registerEscHandler({final:"H"},()=>this.tabSet()),this._parser.registerEscHandler({final:"M"},()=>this.reverseIndex()),this._parser.registerEscHandler({final:"="},()=>this.keypadApplicationMode()),this._parser.registerEscHandler({final:">"},()=>this.keypadNumericMode()),this._parser.registerEscHandler({final:"c"},()=>this.fullReset()),this._parser.registerEscHandler({final:"n"},()=>this.setgLevel(2)),this._parser.registerEscHandler({final:"o"},()=>this.setgLevel(3)),this._parser.registerEscHandler({final:"|"},()=>this.setgLevel(3)),this._parser.registerEscHandler({final:"}"},()=>this.setgLevel(2)),this._parser.registerEscHandler({final:"~"},()=>this.setgLevel(1)),this._parser.registerEscHandler({intermediates:"%",final:"@"},()=>this.selectDefaultCharset()),this._parser.registerEscHandler({intermediates:"%",final:"G"},()=>this.selectDefaultCharset());for(let c in Wr)this._parser.registerEscHandler({intermediates:"(",final:c},()=>this.selectCharset("("+c)),this._parser.registerEscHandler({intermediates:")",final:c},()=>this.selectCharset(")"+c)),this._parser.registerEscHandler({intermediates:"*",final:c},()=>this.selectCharset("*"+c)),this._parser.registerEscHandler({intermediates:"+",final:c},()=>this.selectCharset("+"+c)),this._parser.registerEscHandler({intermediates:"-",final:c},()=>this.selectCharset("-"+c)),this._parser.registerEscHandler({intermediates:".",final:c},()=>this.selectCharset("."+c)),this._parser.registerEscHandler({intermediates:"/",final:c},()=>this.selectCharset("/"+c));this._parser.registerEscHandler({intermediates:"#",final:"8"},()=>this.screenAlignmentPattern()),this._parser.setErrorHandler(c=>(this._logService.error("Parsing error: ",c),c)),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new kee((c,d)=>this.requestStatusString(c,d)))}getAttrData(){return this._curAttrData}_preserveStack(e,t,r,n){this._parseStack.paused=!0,this._parseStack.cursorStartX=e,this._parseStack.cursorStartY=t,this._parseStack.decodedLength=r,this._parseStack.position=n}_logSlowResolvingAsync(e){this._logService.logLevel<=3&&Promise.race([e,new Promise((t,r)=>setTimeout(()=>r("#SLOW_TIMEOUT"),Ree))]).catch(t=>{if(t!=="#SLOW_TIMEOUT")throw t;console.warn(`async parser handler taking longer than ${Ree} ms`)})}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(e,t){let r,n=this._activeBuffer.x,o=this._activeBuffer.y,i=0,a=this._parseStack.paused;if(a){if(r=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,t))return this._logSlowResolvingAsync(r),r;n=this._parseStack.cursorStartX,o=this._parseStack.cursorStartY,this._parseStack.paused=!1,e.length>ed&&(i=this._parseStack.position+ed)}if(this._logService.logLevel<=1&&this._logService.debug(`parsing data ${typeof e=="string"?` "${e}"`:` "${Array.prototype.map.call(e,c=>String.fromCharCode(c)).join("")}"`}`),this._logService.logLevel===0&&this._logService.trace("parsing data (codes)",typeof e=="string"?e.split("").map(c=>c.charCodeAt(0)):e),this._parseBuffer.length<e.length&&this._parseBuffer.length<ed&&(this._parseBuffer=new Uint32Array(Math.min(e.length,ed))),a||this._dirtyRowTracker.clearRange(),e.length>ed)for(let c=i;c<e.length;c+=ed){let d=c+ed<e.length?c+ed:e.length,u=typeof e=="string"?this._stringDecoder.decode(e.substring(c,d),this._parseBuffer):this._utf8Decoder.decode(e.subarray(c,d),this._parseBuffer);if(r=this._parser.parse(this._parseBuffer,u))return this._preserveStack(n,o,u,c),this._logSlowResolvingAsync(r),r}else if(!a){let c=typeof e=="string"?this._stringDecoder.decode(e,this._parseBuffer):this._utf8Decoder.decode(e,this._parseBuffer);if(r=this._parser.parse(this._parseBuffer,c))return this._preserveStack(n,o,c,0),this._logSlowResolvingAsync(r),r}(this._activeBuffer.x!==n||this._activeBuffer.y!==o)&&this._onCursorMove.fire();let s=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),l=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);l<this._bufferService.rows&&this._onRequestRefreshRows.fire({start:Math.min(l,this._bufferService.rows-1),end:Math.min(s,this._bufferService.rows-1)})}print(e,t,r){let n,o,i=this._charsetService.charset,a=this._optionsService.rawOptions.screenReaderMode,s=this._bufferService.cols,l=this._coreService.decPrivateModes.wraparound,c=this._coreService.modes.insertMode,d=this._curAttrData,u=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&r-t>0&&u.getWidth(this._activeBuffer.x-1)===2&&u.setCellFromCodepoint(this._activeBuffer.x-1,0,1,d);let f=this._parser.precedingJoinState;for(let m=t;m<r;++m){if(n=e[m],n<127&&i){let v=i[String.fromCharCode(n)];v&&(n=v.charCodeAt(0))}let p=this._unicodeService.charProperties(n,f);o=of.extractWidth(p);let g=of.extractShouldJoin(p),b=g?of.extractWidth(f):0;if(f=p,a&&this._onA11yChar.fire(td(n)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+o-b>s){if(l){let v=u,x=this._activeBuffer.x-b;for(this._activeBuffer.x=b,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),u=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),b>0&&u instanceof Fb&&u.copyCellsFrom(v,x,0,b,!1);x<s;)v.setCellFromCodepoint(x++,0,1,d)}else if(this._activeBuffer.x=s-1,o===2)continue}if(g&&this._activeBuffer.x){let v=u.getWidth(this._activeBuffer.x-1)?1:2;u.addCodepointToCell(this._activeBuffer.x-v,n,o);for(let x=o-b;--x>=0;)u.setCellFromCodepoint(this._activeBuffer.x++,0,0,d);continue}if(c&&(u.insertCells(this._activeBuffer.x,o-b,this._activeBuffer.getNullCell(d)),u.getWidth(s-1)===2&&u.setCellFromCodepoint(s-1,0,1,d)),u.setCellFromCodepoint(this._activeBuffer.x++,n,o,d),o>0)for(;--o;)u.setCellFromCodepoint(this._activeBuffer.x++,0,0,d)}this._parser.precedingJoinState=f,this._activeBuffer.x<s&&r-t>0&&u.getWidth(this._activeBuffer.x)===0&&!u.hasContent(this._activeBuffer.x)&&u.setCellFromCodepoint(this._activeBuffer.x,0,1,d),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(e,t){return e.final==="t"&&!e.prefix&&!e.intermediates?this._parser.registerCsiHandler(e,r=>Dee(r.params[0],this._optionsService.rawOptions.windowOptions)?t(r):!0):this._parser.registerCsiHandler(e,t)}registerDcsHandler(e,t){return this._parser.registerDcsHandler(e,new kee(t))}registerEscHandler(e,t){return this._parser.registerEscHandler(e,t)}registerOscHandler(e,t){return this._parser.registerOscHandler(e,new ei(t))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(this._activeBuffer.x===0&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y)?.isWrapped){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;let e=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);e.hasWidth(this._activeBuffer.x)&&!e.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let e=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-e),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(e=this._bufferService.cols-1){this._activeBuffer.x=Math.min(e,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_setCursor(e,t){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=e,this._activeBuffer.y=this._activeBuffer.scrollTop+t):(this._activeBuffer.x=e,this._activeBuffer.y=t),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(e,t){this._restrictCursor(),this._setCursor(this._activeBuffer.x+e,this._activeBuffer.y+t)}cursorUp(e){let t=this._activeBuffer.y-this._activeBuffer.scrollTop;return t>=0?this._moveCursor(0,-Math.min(t,e.params[0]||1)):this._moveCursor(0,-(e.params[0]||1)),!0}cursorDown(e){let t=this._activeBuffer.scrollBottom-this._activeBuffer.y;return t>=0?this._moveCursor(0,Math.min(t,e.params[0]||1)):this._moveCursor(0,e.params[0]||1),!0}cursorForward(e){return this._moveCursor(e.params[0]||1,0),!0}cursorBackward(e){return this._moveCursor(-(e.params[0]||1),0),!0}cursorNextLine(e){return this.cursorDown(e),this._activeBuffer.x=0,!0}cursorPrecedingLine(e){return this.cursorUp(e),this._activeBuffer.x=0,!0}cursorCharAbsolute(e){return this._setCursor((e.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(e){return this._setCursor(e.length>=2?(e.params[1]||1)-1:0,(e.params[0]||1)-1),!0}charPosAbsolute(e){return this._setCursor((e.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(e){return this._moveCursor(e.params[0]||1,0),!0}linePosAbsolute(e){return this._setCursor(this._activeBuffer.x,(e.params[0]||1)-1),!0}vPositionRelative(e){return this._moveCursor(0,e.params[0]||1),!0}hVPosition(e){return this.cursorPosition(e),!0}tabClear(e){let t=e.params[0];return t===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:t===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(e){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let t=e.params[0]||1;for(;t--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(e){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let t=e.params[0]||1;for(;t--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(e){let t=e.params[0];return t===1&&(this._curAttrData.bg|=536870912),(t===2||t===0)&&(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(e,t,r,n=!1,o=!1){let i=this._activeBuffer.lines.get(this._activeBuffer.ybase+e);i.replaceCells(t,r,this._activeBuffer.getNullCell(this._eraseAttrData()),o),n&&(i.isWrapped=!1)}_resetBufferLine(e,t=!1){let r=this._activeBuffer.lines.get(this._activeBuffer.ybase+e);r&&(r.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),t),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+e),r.isWrapped=!1)}eraseInDisplay(e,t=!1){this._restrictCursor(this._bufferService.cols);let r;switch(e.params[0]){case 0:for(r=this._activeBuffer.y,this._dirtyRowTracker.markDirty(r),this._eraseInBufferLine(r++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,t);r<this._bufferService.rows;r++)this._resetBufferLine(r,t);this._dirtyRowTracker.markDirty(r);break;case 1:for(r=this._activeBuffer.y,this._dirtyRowTracker.markDirty(r),this._eraseInBufferLine(r,0,this._activeBuffer.x+1,!0,t),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(r+1).isWrapped=!1);r--;)this._resetBufferLine(r,t);this._dirtyRowTracker.markDirty(0);break;case 2:if(this._optionsService.rawOptions.scrollOnEraseInDisplay){for(r=this._bufferService.rows,this._dirtyRowTracker.markRangeDirty(0,r-1);r--&&!this._activeBuffer.lines.get(this._activeBuffer.ybase+r)?.getTrimmedLength(););for(;r>=0;r--)this._bufferService.scroll(this._eraseAttrData())}else{for(r=this._bufferService.rows,this._dirtyRowTracker.markDirty(r-1);r--;)this._resetBufferLine(r,t);this._dirtyRowTracker.markDirty(0)}break;case 3:let n=this._activeBuffer.lines.length-this._bufferService.rows;n>0&&(this._activeBuffer.lines.trimStart(n),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-n,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-n,0),this._onScroll.fire(0));break}return!0}eraseInLine(e,t=!1){switch(this._restrictCursor(this._bufferService.cols),e.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,t);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,t);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,t);break}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(e){this._restrictCursor();let t=e.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let r=this._activeBuffer.ybase+this._activeBuffer.y,n=this._bufferService.rows-1-this._activeBuffer.scrollBottom,o=this._bufferService.rows-1+this._activeBuffer.ybase-n+1;for(;t--;)this._activeBuffer.lines.splice(o-1,1),this._activeBuffer.lines.splice(r,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(e){this._restrictCursor();let t=e.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let r=this._activeBuffer.ybase+this._activeBuffer.y,n;for(n=this._bufferService.rows-1-this._activeBuffer.scrollBottom,n=this._bufferService.rows-1+this._activeBuffer.ybase-n;t--;)this._activeBuffer.lines.splice(r,1),this._activeBuffer.lines.splice(n,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(e){this._restrictCursor();let t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return t&&(t.insertCells(this._activeBuffer.x,e.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(e){this._restrictCursor();let t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return t&&(t.deleteCells(this._activeBuffer.x,e.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(e){let t=e.params[0]||1;for(;t--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollDown(e){let t=e.params[0]||1;for(;t--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,0,this._activeBuffer.getBlankLine($r));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let t=e.params[0]||1;for(let r=this._activeBuffer.scrollTop;r<=this._activeBuffer.scrollBottom;++r){let n=this._activeBuffer.lines.get(this._activeBuffer.ybase+r);n.deleteCells(0,t,this._activeBuffer.getNullCell(this._eraseAttrData())),n.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let t=e.params[0]||1;for(let r=this._activeBuffer.scrollTop;r<=this._activeBuffer.scrollBottom;++r){let n=this._activeBuffer.lines.get(this._activeBuffer.ybase+r);n.insertCells(0,t,this._activeBuffer.getNullCell(this._eraseAttrData())),n.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let t=e.params[0]||1;for(let r=this._activeBuffer.scrollTop;r<=this._activeBuffer.scrollBottom;++r){let n=this._activeBuffer.lines.get(this._activeBuffer.ybase+r);n.insertCells(this._activeBuffer.x,t,this._activeBuffer.getNullCell(this._eraseAttrData())),n.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let t=e.params[0]||1;for(let r=this._activeBuffer.scrollTop;r<=this._activeBuffer.scrollBottom;++r){let n=this._activeBuffer.lines.get(this._activeBuffer.ybase+r);n.deleteCells(this._activeBuffer.x,t,this._activeBuffer.getNullCell(this._eraseAttrData())),n.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(e){this._restrictCursor();let t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return t&&(t.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(e.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(e){let t=this._parser.precedingJoinState;if(!t)return!0;let r=e.params[0]||1,n=of.extractWidth(t),o=this._activeBuffer.x-n,i=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(o),a=new Uint32Array(i.length*r),s=0;for(let c=0;c<i.length;){let d=i.codePointAt(c)||0;a[s++]=d,c+=d>65535?2:1}let l=s;for(let c=1;c<r;++c)a.copyWithin(l,0,s),l+=s;return this.print(a,0,l),!0}sendDeviceAttributesPrimary(e){return e.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(te.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(te.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(e){return e.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(te.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(te.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(e.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(te.ESC+"[>83;40003;0c")),!0}_is(e){return(this._optionsService.rawOptions.termName+"").indexOf(e)===0}setMode(e){for(let t=0;t<e.length;t++)switch(e.params[t]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0;break}return!0}setModePrivate(e){for(let t=0;t<e.length;t++)switch(e.params[t]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,rf),this._charsetService.setgCharset(1,rf),this._charsetService.setgCharset(2,rf),this._charsetService.setgCharset(3,rf);break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:this._optionsService.options.cursorBlink=!0;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0,this._onRequestSendFocus.fire();break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="SGR_PIXELS";break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(void 0),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0;break;case 2026:this._coreService.decPrivateModes.synchronizedOutput=!0;break}return!0}resetMode(e){for(let t=0;t<e.length;t++)switch(e.params[t]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1;break}return!0}resetModePrivate(e){for(let t=0;t<e.length;t++)switch(e.params[t]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:this._optionsService.options.cursorBlink=!1;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="DEFAULT";break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),e.params[t]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(void 0),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1;break;case 2026:this._coreService.decPrivateModes.synchronizedOutput=!1,this._onRequestRefreshRows.fire(void 0);break}return!0}requestMode(e,t){let r;(g=>(g[g.NOT_RECOGNIZED=0]="NOT_RECOGNIZED",g[g.SET=1]="SET",g[g.RESET=2]="RESET",g[g.PERMANENTLY_SET=3]="PERMANENTLY_SET",g[g.PERMANENTLY_RESET=4]="PERMANENTLY_RESET"))(r||(r={}));let n=this._coreService.decPrivateModes,{activeProtocol:o,activeEncoding:i}=this._coreMouseService,a=this._coreService,{buffers:s,cols:l}=this._bufferService,{active:c,alt:d}=s,u=this._optionsService.rawOptions,f=(g,b)=>(a.triggerDataEvent(`${te.ESC}[${t?"":"?"}${g};${b}$y`),!0),m=g=>g?1:2,p=e.params[0];return t?p===2?f(p,4):p===4?f(p,m(a.modes.insertMode)):p===12?f(p,3):p===20?f(p,m(u.convertEol)):f(p,0):p===1?f(p,m(n.applicationCursorKeys)):p===3?f(p,u.windowOptions.setWinLines?l===80?2:l===132?1:0:0):p===6?f(p,m(n.origin)):p===7?f(p,m(n.wraparound)):p===8?f(p,3):p===9?f(p,m(o==="X10")):p===12?f(p,m(u.cursorBlink)):p===25?f(p,m(!a.isCursorHidden)):p===45?f(p,m(n.reverseWraparound)):p===66?f(p,m(n.applicationKeypad)):p===67?f(p,4):p===1e3?f(p,m(o==="VT200")):p===1002?f(p,m(o==="DRAG")):p===1003?f(p,m(o==="ANY")):p===1004?f(p,m(n.sendFocus)):p===1005?f(p,4):p===1006?f(p,m(i==="SGR")):p===1015?f(p,4):p===1016?f(p,m(i==="SGR_PIXELS")):p===1048?f(p,1):p===47||p===1047||p===1049?f(p,m(c===d)):p===2004?f(p,m(n.bracketedPasteMode)):p===2026?f(p,m(n.synchronizedOutput)):f(p,0)}_updateAttrColor(e,t,r,n,o){return t===2?(e|=50331648,e&=-16777216,e|=Kb.fromColorRGB([r,n,o])):t===5&&(e&=-50331904,e|=33554432|r&255),e}_extractColor(e,t,r){let n=[0,0,-1,0,0,0],o=0,i=0;do{if(n[i+o]=e.params[t+i],e.hasSubParams(t+i)){let a=e.getSubParams(t+i),s=0;do n[1]===5&&(o=1),n[i+s+1+o]=a[s];while(++s<a.length&&s+i+1+o<n.length);break}if(n[1]===5&&i+o>=2||n[1]===2&&i+o>=5)break;n[1]&&(o=1)}while(++i+t<e.length&&i+o<n.length);for(let a=2;a<n.length;++a)n[a]===-1&&(n[a]=0);switch(n[0]){case 38:r.fg=this._updateAttrColor(r.fg,n[1],n[3],n[4],n[5]);break;case 48:r.bg=this._updateAttrColor(r.bg,n[1],n[3],n[4],n[5]);break;case 58:r.extended=r.extended.clone(),r.extended.underlineColor=this._updateAttrColor(r.extended.underlineColor,n[1],n[3],n[4],n[5])}return i}_processUnderline(e,t){t.extended=t.extended.clone(),(!~e||e>5)&&(e=1),t.extended.underlineStyle=e,t.fg|=268435456,e===0&&(t.fg&=-268435457),t.updateExtended()}_processSGR0(e){e.fg=$r.fg,e.bg=$r.bg,e.extended=e.extended.clone(),e.extended.underlineStyle=0,e.extended.underlineColor&=-67108864,e.updateExtended()}charAttributes(e){if(e.length===1&&e.params[0]===0)return this._processSGR0(this._curAttrData),!0;let t=e.length,r,n=this._curAttrData;for(let o=0;o<t;o++)r=e.params[o],r>=30&&r<=37?(n.fg&=-50331904,n.fg|=16777216|r-30):r>=40&&r<=47?(n.bg&=-50331904,n.bg|=16777216|r-40):r>=90&&r<=97?(n.fg&=-50331904,n.fg|=16777216|r-90|8):r>=100&&r<=107?(n.bg&=-50331904,n.bg|=16777216|r-100|8):r===0?this._processSGR0(n):r===1?n.fg|=134217728:r===3?n.bg|=67108864:r===4?(n.fg|=268435456,this._processUnderline(e.hasSubParams(o)?e.getSubParams(o)[0]:1,n)):r===5?n.fg|=536870912:r===7?n.fg|=67108864:r===8?n.fg|=1073741824:r===9?n.fg|=2147483648:r===2?n.bg|=134217728:r===21?this._processUnderline(2,n):r===22?(n.fg&=-134217729,n.bg&=-134217729):r===23?n.bg&=-67108865:r===24?(n.fg&=-268435457,this._processUnderline(0,n)):r===25?n.fg&=-536870913:r===27?n.fg&=-67108865:r===28?n.fg&=-1073741825:r===29?n.fg&=2147483647:r===39?(n.fg&=-67108864,n.fg|=$r.fg&16777215):r===49?(n.bg&=-67108864,n.bg|=$r.bg&16777215):r===38||r===48||r===58?o+=this._extractColor(e,o,n):r===53?n.bg|=1073741824:r===55?n.bg&=-1073741825:r===59?(n.extended=n.extended.clone(),n.extended.underlineColor=-1,n.updateExtended()):r===100?(n.fg&=-67108864,n.fg|=$r.fg&16777215,n.bg&=-67108864,n.bg|=$r.bg&16777215):this._logService.debug("Unknown SGR attribute: %d.",r);return!0}deviceStatus(e){switch(e.params[0]){case 5:this._coreService.triggerDataEvent(`${te.ESC}[0n`);break;case 6:let t=this._activeBuffer.y+1,r=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${te.ESC}[${t};${r}R`);break}return!0}deviceStatusPrivate(e){switch(e.params[0]){case 6:let t=this._activeBuffer.y+1,r=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${te.ESC}[?${t};${r}R`);break;case 15:break;case 25:break;case 26:break;case 53:break}return!0}softReset(e){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=$r.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0}setCursorStyle(e){let t=e.length===0?1:e.params[0];if(t===0)this._coreService.decPrivateModes.cursorStyle=void 0,this._coreService.decPrivateModes.cursorBlink=void 0;else{switch(t){case 1:case 2:this._coreService.decPrivateModes.cursorStyle="block";break;case 3:case 4:this._coreService.decPrivateModes.cursorStyle="underline";break;case 5:case 6:this._coreService.decPrivateModes.cursorStyle="bar";break}let r=t%2===1;this._coreService.decPrivateModes.cursorBlink=r}return!0}setScrollRegion(e){let t=e.params[0]||1,r;return(e.length<2||(r=e.params[1])>this._bufferService.rows||r===0)&&(r=this._bufferService.rows),r>t&&(this._activeBuffer.scrollTop=t-1,this._activeBuffer.scrollBottom=r-1,this._setCursor(0,0)),!0}windowOptions(e){if(!Dee(e.params[0],this._optionsService.rawOptions.windowOptions))return!0;let t=e.length>1?e.params[1]:0;switch(e.params[0]){case 14:t!==2&&this._onRequestWindowsOptionsReport.fire(0);break;case 16:this._onRequestWindowsOptionsReport.fire(1);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${te.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:(t===0||t===2)&&(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>Pee&&this._windowTitleStack.shift()),(t===0||t===1)&&(this._iconNameStack.push(this._iconName),this._iconNameStack.length>Pee&&this._iconNameStack.shift());break;case 23:(t===0||t===2)&&this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),(t===0||t===1)&&this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop());break}return!0}saveCursor(e){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0}restoreCursor(e){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0}setTitle(e){return this._windowTitle=e,this._onTitleChange.fire(e),!0}setIconName(e){return this._iconName=e,!0}setOrReportIndexedColor(e){let t=[],r=e.split(";");for(;r.length>1;){let n=r.shift(),o=r.shift();if(/^\d+$/.exec(n)){let i=parseInt(n);if(Eee(i))if(o==="?")t.push({type:0,index:i});else{let a=Cee(o);a&&t.push({type:1,index:i,color:a})}}}return t.length&&this._onColor.fire(t),!0}setHyperlink(e){let t=e.indexOf(";");if(t===-1)return!0;let r=e.slice(0,t).trim(),n=e.slice(t+1);return n?this._createHyperlink(r,n):r.trim()?!1:this._finishHyperlink()}_createHyperlink(e,t){this._getCurrentLinkId()&&this._finishHyperlink();let r=e.split(":"),n,o=r.findIndex(i=>i.startsWith("id="));return o!==-1&&(n=r[o].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:n,uri:t}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(e,t){let r=e.split(";");for(let n=0;n<r.length&&!(t>=this._specialColors.length);++n,++t)if(r[n]==="?")this._onColor.fire([{type:0,index:this._specialColors[t]}]);else{let o=Cee(r[n]);o&&this._onColor.fire([{type:1,index:this._specialColors[t],color:o}])}return!0}setOrReportFgColor(e){return this._setOrReportSpecialColor(e,0)}setOrReportBgColor(e){return this._setOrReportSpecialColor(e,1)}setOrReportCursorColor(e){return this._setOrReportSpecialColor(e,2)}restoreIndexedColor(e){if(!e)return this._onColor.fire([{type:2}]),!0;let t=[],r=e.split(";");for(let n=0;n<r.length;++n)if(/^\d+$/.exec(r[n])){let o=parseInt(r[n]);Eee(o)&&t.push({type:2,index:o})}return t.length&&this._onColor.fire(t),!0}restoreFgColor(e){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(e){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(e){return this._onColor.fire([{type:2,index:258}]),!0}nextLine(){return this._activeBuffer.x=0,this.index(),!0}keypadApplicationMode(){return this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire(),!0}keypadNumericMode(){return this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire(),!0}selectDefaultCharset(){return this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,rf),!0}selectCharset(e){return e.length!==2?(this.selectDefaultCharset(),!0):(e[0]==="/"||this._charsetService.setgCharset(VSe[e[0]],Wr[e[1]]||rf),!0)}index(){return this._restrictCursor(),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){let e=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,e,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=$r.clone(),this._eraseAttrDataInternal=$r.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=this._curAttrData.bg&67108863,this._eraseAttrDataInternal}setgLevel(e){return this._charsetService.setgLevel(e),!0}screenAlignmentPattern(){let e=new Fi;e.content=1<<22|69,e.fg=this._curAttrData.fg,e.bg=this._curAttrData.bg,this._setCursor(0,0);for(let t=0;t<this._bufferService.rows;++t){let r=this._activeBuffer.ybase+this._activeBuffer.y+t,n=this._activeBuffer.lines.get(r);n&&(n.fill(e),n.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(e,t){let r=a=>(this._coreService.triggerDataEvent(`${te.ESC}${a}${te.ESC}\\`),!0),n=this._bufferService.buffer,o=this._optionsService.rawOptions;return r(e==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:e==='"p'?'P1$r61;1"p':e==="r"?`P1$r${n.scrollTop+1};${n.scrollBottom+1}r`:e==="m"?"P1$r0m":e===" q"?`P1$r${{block:2,underline:4,bar:6}[o.cursorStyle]-(o.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(e,t){this._dirtyRowTracker.markRangeDirty(e,t)}},BN=class{constructor(e){this._bufferService=e,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(e){e<this.start?this.start=e:e>this.end&&(this.end=e)}markRangeDirty(e,t){e>t&&(Tee=e,e=t,t=Tee),e<this.start&&(this.start=e),t>this.end&&(this.end=t)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};BN=br([ye(0,dn)],BN);function Eee(e){return 0<=e&&e<256}var WSe=5e7,$ee=12,ZSe=50,GSe=class extends Qe{constructor(e){super(),this._action=e,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this._register(new ce),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(e,t){if(t!==void 0&&this._syncCalls>t){this._syncCalls=0;return}if(this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;this._isSyncWriting=!0;let r;for(;r=this._writeBuffer.shift();){this._action(r);let n=this._callbacks.shift();n&&n()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(e,t){if(this._pendingData>WSe)throw new Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput){this._didUserInput=!1,this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(t),this._innerWrite();return}setTimeout(()=>this._innerWrite())}this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(t)}_innerWrite(e=0,t=!0){let r=e||performance.now();for(;this._writeBuffer.length>this._bufferOffset;){let n=this._writeBuffer[this._bufferOffset],o=this._action(n,t);if(o){let a=s=>performance.now()-r>=$ee?setTimeout(()=>this._innerWrite(0,s)):this._innerWrite(r,s);o.catch(s=>(queueMicrotask(()=>{throw s}),Promise.resolve(!1))).then(a);return}let i=this._callbacks[this._bufferOffset];if(i&&i(),this._bufferOffset++,this._pendingData-=n.length,performance.now()-r>=$ee)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>ZSe&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout(()=>this._innerWrite())):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()}},jN=class{constructor(e){this._bufferService=e,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(e){let t=this._bufferService.buffer;if(e.id===void 0){let s=t.addMarker(t.ybase+t.y),l={data:e,id:this._nextId++,lines:[s]};return s.onDispose(()=>this._removeMarkerFromLink(l,s)),this._dataByLinkId.set(l.id,l),l.id}let r=e,n=this._getEntryIdKey(r),o=this._entriesWithId.get(n);if(o)return this.addLineToLink(o.id,t.ybase+t.y),o.id;let i=t.addMarker(t.ybase+t.y),a={id:this._nextId++,key:this._getEntryIdKey(r),data:r,lines:[i]};return i.onDispose(()=>this._removeMarkerFromLink(a,i)),this._entriesWithId.set(a.key,a),this._dataByLinkId.set(a.id,a),a.id}addLineToLink(e,t){let r=this._dataByLinkId.get(e);if(r&&r.lines.every(n=>n.line!==t)){let n=this._bufferService.buffer.addMarker(t);r.lines.push(n),n.onDispose(()=>this._removeMarkerFromLink(r,n))}}getLinkData(e){return this._dataByLinkId.get(e)?.data}_getEntryIdKey(e){return`${e.id};;${e.uri}`}_removeMarkerFromLink(e,t){let r=e.lines.indexOf(t);r!==-1&&(e.lines.splice(r,1),e.lines.length===0&&(e.data.id!==void 0&&this._entriesWithId.delete(e.key),this._dataByLinkId.delete(e.id)))}};jN=br([ye(0,dn)],jN);var Aee=!1,KSe=class extends Qe{constructor(e){super(),this._windowsWrappingHeuristics=this._register(new yh),this._onBinary=this._register(new ce),this.onBinary=this._onBinary.event,this._onData=this._register(new ce),this.onData=this._onData.event,this._onLineFeed=this._register(new ce),this.onLineFeed=this._onLineFeed.event,this._onResize=this._register(new ce),this.onResize=this._onResize.event,this._onWriteParsed=this._register(new ce),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this._register(new ce),this._instantiationService=new vSe,this.optionsService=this._register(new DSe(e)),this._instantiationService.setService(un,this.optionsService),this._bufferService=this._register(this._instantiationService.createInstance(NN)),this._instantiationService.setService(dn,this._bufferService),this._logService=this._register(this._instantiationService.createInstance(zN)),this._instantiationService.setService(Zee,this._logService),this.coreService=this._register(this._instantiationService.createInstance(FN)),this._instantiationService.setService(lf,this.coreService),this.coreMouseService=this._register(this._instantiationService.createInstance(LN)),this._instantiationService.setService(Wee,this.coreMouseService),this.unicodeService=this._register(this._instantiationService.createInstance(of)),this._instantiationService.setService(VIe,this.unicodeService),this._charsetService=this._instantiationService.createInstance(ASe),this._instantiationService.setService(UIe,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(jN),this._instantiationService.setService(Gee,this._oscLinkService),this._inputHandler=this._register(new HSe(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this._register(io.forward(this._inputHandler.onLineFeed,this._onLineFeed)),this._register(this._inputHandler),this._register(io.forward(this._bufferService.onResize,this._onResize)),this._register(io.forward(this.coreService.onData,this._onData)),this._register(io.forward(this.coreService.onBinary,this._onBinary)),this._register(this.coreService.onRequestScrollToBottom(()=>this.scrollToBottom(!0))),this._register(this.coreService.onUserInput(()=>this._writeBuffer.handleUserInput())),this._register(this.optionsService.onMultipleOptionChange(["windowsMode","windowsPty"],()=>this._handleWindowsPtyOptionChange())),this._register(this._bufferService.onScroll(()=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)})),this._writeBuffer=this._register(new GSe((t,r)=>this._inputHandler.parse(t,r))),this._register(io.forward(this._writeBuffer.onWriteParsed,this._onWriteParsed))}get onScroll(){return this._onScrollApi||(this._onScrollApi=this._register(new ce),this._onScroll.event(e=>{this._onScrollApi?.fire(e.position)})),this._onScrollApi.event}get cols(){return this._bufferService.cols}get rows(){return this._bufferService.rows}get buffers(){return this._bufferService.buffers}get options(){return this.optionsService.options}set options(e){for(let t in e)this.optionsService.options[t]=e[t]}write(e,t){this._writeBuffer.write(e,t)}writeSync(e,t){this._logService.logLevel<=3&&!Aee&&(this._logService.warn("writeSync is unreliable and will be removed soon."),Aee=!0),this._writeBuffer.writeSync(e,t)}input(e,t=!0){this.coreService.triggerDataEvent(e,t)}resize(e,t){isNaN(e)||isNaN(t)||(e=Math.max(e,Tte),t=Math.max(t,Ete),this._bufferService.resize(e,t))}scroll(e,t=!1){this._bufferService.scroll(e,t)}scrollLines(e,t){this._bufferService.scrollLines(e,t)}scrollPages(e){this.scrollLines(e*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(e){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(e){let t=e-this._bufferService.buffer.ydisp;t!==0&&this.scrollLines(t)}registerEscHandler(e,t){return this._inputHandler.registerEscHandler(e,t)}registerDcsHandler(e,t){return this._inputHandler.registerDcsHandler(e,t)}registerCsiHandler(e,t){return this._inputHandler.registerCsiHandler(e,t)}registerOscHandler(e,t){return this._inputHandler.registerOscHandler(e,t)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let e=!1,t=this.optionsService.rawOptions.windowsPty;t&&t.buildNumber!==void 0&&t.buildNumber!==void 0?e=t.backend==="conpty"&&t.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(e=!0),e?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){let e=[];e.push(this.onLineFeed(See.bind(null,this._bufferService))),e.push(this.registerCsiHandler({final:"H"},()=>(See(this._bufferService),!1))),this._windowsWrappingHeuristics.value=Qt(()=>{for(let t of e)t.dispose()})}}},qSe={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};function XSe(e,t,r,n){let o={type:0,cancel:!1,key:void 0},i=(e.shiftKey?1:0)|(e.altKey?2:0)|(e.ctrlKey?4:0)|(e.metaKey?8:0);switch(e.keyCode){case 0:e.key==="UIKeyInputUpArrow"?t?o.key=te.ESC+"OA":o.key=te.ESC+"[A":e.key==="UIKeyInputLeftArrow"?t?o.key=te.ESC+"OD":o.key=te.ESC+"[D":e.key==="UIKeyInputRightArrow"?t?o.key=te.ESC+"OC":o.key=te.ESC+"[C":e.key==="UIKeyInputDownArrow"&&(t?o.key=te.ESC+"OB":o.key=te.ESC+"[B");break;case 8:o.key=e.ctrlKey?"\b":te.DEL,e.altKey&&(o.key=te.ESC+o.key);break;case 9:if(e.shiftKey){o.key=te.ESC+"[Z";break}o.key=te.HT,o.cancel=!0;break;case 13:o.key=e.altKey?te.ESC+te.CR:te.CR,o.cancel=!0;break;case 27:o.key=te.ESC,e.altKey&&(o.key=te.ESC+te.ESC),o.cancel=!0;break;case 37:if(e.metaKey)break;i?o.key=te.ESC+"[1;"+(i+1)+"D":t?o.key=te.ESC+"OD":o.key=te.ESC+"[D";break;case 39:if(e.metaKey)break;i?o.key=te.ESC+"[1;"+(i+1)+"C":t?o.key=te.ESC+"OC":o.key=te.ESC+"[C";break;case 38:if(e.metaKey)break;i?o.key=te.ESC+"[1;"+(i+1)+"A":t?o.key=te.ESC+"OA":o.key=te.ESC+"[A";break;case 40:if(e.metaKey)break;i?o.key=te.ESC+"[1;"+(i+1)+"B":t?o.key=te.ESC+"OB":o.key=te.ESC+"[B";break;case 45:!e.shiftKey&&!e.ctrlKey&&(o.key=te.ESC+"[2~");break;case 46:i?o.key=te.ESC+"[3;"+(i+1)+"~":o.key=te.ESC+"[3~";break;case 36:i?o.key=te.ESC+"[1;"+(i+1)+"H":t?o.key=te.ESC+"OH":o.key=te.ESC+"[H";break;case 35:i?o.key=te.ESC+"[1;"+(i+1)+"F":t?o.key=te.ESC+"OF":o.key=te.ESC+"[F";break;case 33:e.shiftKey?o.type=2:e.ctrlKey?o.key=te.ESC+"[5;"+(i+1)+"~":o.key=te.ESC+"[5~";break;case 34:e.shiftKey?o.type=3:e.ctrlKey?o.key=te.ESC+"[6;"+(i+1)+"~":o.key=te.ESC+"[6~";break;case 112:i?o.key=te.ESC+"[1;"+(i+1)+"P":o.key=te.ESC+"OP";break;case 113:i?o.key=te.ESC+"[1;"+(i+1)+"Q":o.key=te.ESC+"OQ";break;case 114:i?o.key=te.ESC+"[1;"+(i+1)+"R":o.key=te.ESC+"OR";break;case 115:i?o.key=te.ESC+"[1;"+(i+1)+"S":o.key=te.ESC+"OS";break;case 116:i?o.key=te.ESC+"[15;"+(i+1)+"~":o.key=te.ESC+"[15~";break;case 117:i?o.key=te.ESC+"[17;"+(i+1)+"~":o.key=te.ESC+"[17~";break;case 118:i?o.key=te.ESC+"[18;"+(i+1)+"~":o.key=te.ESC+"[18~";break;case 119:i?o.key=te.ESC+"[19;"+(i+1)+"~":o.key=te.ESC+"[19~";break;case 120:i?o.key=te.ESC+"[20;"+(i+1)+"~":o.key=te.ESC+"[20~";break;case 121:i?o.key=te.ESC+"[21;"+(i+1)+"~":o.key=te.ESC+"[21~";break;case 122:i?o.key=te.ESC+"[23;"+(i+1)+"~":o.key=te.ESC+"[23~";break;case 123:i?o.key=te.ESC+"[24;"+(i+1)+"~":o.key=te.ESC+"[24~";break;default:if(e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey)e.keyCode>=65&&e.keyCode<=90?o.key=String.fromCharCode(e.keyCode-64):e.keyCode===32?o.key=te.NUL:e.keyCode>=51&&e.keyCode<=55?o.key=String.fromCharCode(e.keyCode-51+27):e.keyCode===56?o.key=te.DEL:e.keyCode===219?o.key=te.ESC:e.keyCode===220?o.key=te.FS:e.keyCode===221&&(o.key=te.GS);else if((!r||n)&&e.altKey&&!e.metaKey){let a=qSe[e.keyCode]?.[e.shiftKey?1:0];if(a)o.key=te.ESC+a;else if(e.keyCode>=65&&e.keyCode<=90){let s=e.ctrlKey?e.keyCode-64:e.keyCode+32,l=String.fromCharCode(s);e.shiftKey&&(l=l.toUpperCase()),o.key=te.ESC+l}else if(e.keyCode===32)o.key=te.ESC+(e.ctrlKey?te.NUL:" ");else if(e.key==="Dead"&&e.code.startsWith("Key")){let s=e.code.slice(3,4);e.shiftKey||(s=s.toLowerCase()),o.key=te.ESC+s,o.cancel=!0}}else r&&!e.altKey&&!e.ctrlKey&&!e.shiftKey&&e.metaKey?e.keyCode===65&&(o.type=1):e.key&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&e.keyCode>=48&&e.key.length===1?o.key=e.key:e.key&&e.ctrlKey&&(e.key==="_"&&(o.key=te.US),e.key==="@"&&(o.key=te.NUL));break}return o}var kr=0,QSe=class{constructor(e){this._getKey=e,this._array=[],this._insertedValues=[],this._flushInsertedTask=new AC,this._isFlushingInserted=!1,this._deletedIndices=[],this._flushDeletedTask=new AC,this._isFlushingDeleted=!1}clear(){this._array.length=0,this._insertedValues.length=0,this._flushInsertedTask.clear(),this._isFlushingInserted=!1,this._deletedIndices.length=0,this._flushDeletedTask.clear(),this._isFlushingDeleted=!1}insert(e){this._flushCleanupDeleted(),this._insertedValues.length===0&&this._flushInsertedTask.enqueue(()=>this._flushInserted()),this._insertedValues.push(e)}_flushInserted(){let e=this._insertedValues.sort((o,i)=>this._getKey(o)-this._getKey(i)),t=0,r=0,n=new Array(this._array.length+this._insertedValues.length);for(let o=0;o<n.length;o++)r>=this._array.length||this._getKey(e[t])<=this._getKey(this._array[r])?(n[o]=e[t],t++):n[o]=this._array[r++];this._array=n,this._insertedValues.length=0}_flushCleanupInserted(){!this._isFlushingInserted&&this._insertedValues.length>0&&this._flushInsertedTask.flush()}delete(e){if(this._flushCleanupInserted(),this._array.length===0)return!1;let t=this._getKey(e);if(t===void 0||(kr=this._search(t),kr===-1)||this._getKey(this._array[kr])!==t)return!1;do if(this._array[kr]===e)return this._deletedIndices.length===0&&this._flushDeletedTask.enqueue(()=>this._flushDeleted()),this._deletedIndices.push(kr),!0;while(++kr<this._array.length&&this._getKey(this._array[kr])===t);return!1}_flushDeleted(){this._isFlushingDeleted=!0;let e=this._deletedIndices.sort((o,i)=>o-i),t=0,r=new Array(this._array.length-e.length),n=0;for(let o=0;o<this._array.length;o++)e[t]===o?t++:r[n++]=this._array[o];this._array=r,this._deletedIndices.length=0,this._isFlushingDeleted=!1}_flushCleanupDeleted(){!this._isFlushingDeleted&&this._deletedIndices.length>0&&this._flushDeletedTask.flush()}*getKeyIterator(e){if(this._flushCleanupInserted(),this._flushCleanupDeleted(),this._array.length!==0&&(kr=this._search(e),!(kr<0||kr>=this._array.length)&&this._getKey(this._array[kr])===e))do yield this._array[kr];while(++kr<this._array.length&&this._getKey(this._array[kr])===e)}forEachByKey(e,t){if(this._flushCleanupInserted(),this._flushCleanupDeleted(),this._array.length!==0&&(kr=this._search(e),!(kr<0||kr>=this._array.length)&&this._getKey(this._array[kr])===e))do t(this._array[kr]);while(++kr<this._array.length&&this._getKey(this._array[kr])===e)}values(){return this._flushCleanupInserted(),this._flushCleanupDeleted(),[...this._array].values()}_search(e){let t=0,r=this._array.length-1;for(;r>=t;){let n=t+r>>1,o=this._getKey(this._array[n]);if(o>e)r=n-1;else if(o<e)t=n+1;else{for(;n>0&&this._getKey(this._array[n-1])===e;)n--;return n}}return t}},eN=0,Oee=0,YSe=class extends Qe{constructor(){super(),this._decorations=new QSe(e=>e?.marker.line),this._onDecorationRegistered=this._register(new ce),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this._register(new ce),this.onDecorationRemoved=this._onDecorationRemoved.event,this._register(Qt(()=>this.reset()))}get decorations(){return this._decorations.values()}registerDecoration(e){if(e.marker.isDisposed)return;let t=new JSe(e);if(t){let r=t.marker.onDispose(()=>t.dispose()),n=t.onDispose(()=>{n.dispose(),t&&(this._decorations.delete(t)&&this._onDecorationRemoved.fire(t),r.dispose())});this._decorations.insert(t),this._onDecorationRegistered.fire(t)}return t}reset(){for(let e of this._decorations.values())e.dispose();this._decorations.clear()}*getDecorationsAtCell(e,t,r){let n=0,o=0;for(let i of this._decorations.getKeyIterator(t))n=i.options.x??0,o=n+(i.options.width??1),e>=n&&e<o&&(!r||(i.options.layer??"bottom")===r)&&(yield i)}forEachDecorationAtCell(e,t,r,n){this._decorations.forEachByKey(t,o=>{eN=o.options.x??0,Oee=eN+(o.options.width??1),e>=eN&&e<Oee&&(!r||(o.options.layer??"bottom")===r)&&n(o)})}},JSe=class extends od{constructor(e){super(),this.options=e,this.onRenderEmitter=this.add(new ce),this.onRender=this.onRenderEmitter.event,this._onDispose=this.add(new ce),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=e.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=ir.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=ir.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}dispose(){this._onDispose.fire(),super.dispose()}},e1e=1e3,t1e=class{constructor(e,t=e1e){this._renderCallback=e,this._debounceThresholdMS=t,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(e,t,r){this._rowCount=r,e=e!==void 0?e:0,t=t!==void 0?t:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,e):e,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,t):t;let n=performance.now();if(n-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=n,this._innerRefresh();else if(!this._additionalRefreshRequested){let o=n-this._lastRefreshMs,i=this._debounceThresholdMS-o;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout(()=>{this._lastRefreshMs=performance.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0},i)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;let e=Math.max(this._rowStart,0),t=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(e,t)}},zee=20,Nee=!1,OC=class extends Qe{constructor(e,t,r,n){super(),this._terminal=e,this._coreBrowserService=r,this._renderService=n,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="";let o=this._coreBrowserService.mainDocument;this._accessibilityContainer=o.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=o.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let i=0;i<this._terminal.rows;i++)this._rowElements[i]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[i]);if(this._topBoundaryFocusListener=i=>this._handleBoundaryFocus(i,0),this._bottomBoundaryFocusListener=i=>this._handleBoundaryFocus(i,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=o.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this._register(new t1e(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");Nee?(this._accessibilityContainer.classList.add("debug"),this._rowContainer.classList.add("debug"),this._debugRootContainer=o.createElement("div"),this._debugRootContainer.classList.add("xterm"),this._debugRootContainer.appendChild(o.createTextNode("------start a11y------")),this._debugRootContainer.appendChild(this._accessibilityContainer),this._debugRootContainer.appendChild(o.createTextNode("------end a11y------")),this._terminal.element.insertAdjacentElement("afterend",this._debugRootContainer)):this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this._register(this._terminal.onResize(i=>this._handleResize(i.rows))),this._register(this._terminal.onRender(i=>this._refreshRows(i.start,i.end))),this._register(this._terminal.onScroll(()=>this._refreshRows())),this._register(this._terminal.onA11yChar(i=>this._handleChar(i))),this._register(this._terminal.onLineFeed(()=>this._handleChar(`
|
|
216
|
+
`))),this._register(this._terminal.onA11yTab(i=>this._handleTab(i))),this._register(this._terminal.onKey(i=>this._handleKey(i.key))),this._register(this._terminal.onBlur(()=>this._clearLiveRegion())),this._register(this._renderService.onDimensionsChange(()=>this._refreshRowsDimensions())),this._register(Be(o,"selectionchange",()=>this._handleSelectionChange())),this._register(this._coreBrowserService.onDprChange(()=>this._refreshRowsDimensions())),this._refreshRowsDimensions(),this._refreshRows(),this._register(Qt(()=>{Nee?this._debugRootContainer.remove():this._accessibilityContainer.remove(),this._rowElements.length=0}))}_handleTab(e){for(let t=0;t<e;t++)this._handleChar(" ")}_handleChar(e){this._liveRegionLineCount<zee+1&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==e&&(this._charsToAnnounce+=e):this._charsToAnnounce+=e,e===`
|
|
217
|
+
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===zee+1&&(this._liveRegion.textContent+=rN.get())))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(e){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(e)||this._charsToConsume.push(e)}_refreshRows(e,t){this._liveRegionDebouncer.refresh(e,t,this._terminal.rows)}_renderRows(e,t){let r=this._terminal.buffer,n=r.lines.length.toString();for(let o=e;o<=t;o++){let i=r.lines.get(r.ydisp+o),a=[],s=i?.translateToString(!0,void 0,void 0,a)||"",l=(r.ydisp+o+1).toString(),c=this._rowElements[o];c&&(s.length===0?(c.textContent="\xA0",this._rowColumns.set(c,[0,1])):(c.textContent=s,this._rowColumns.set(c,a)),c.setAttribute("aria-posinset",l),c.setAttribute("aria-setsize",n),this._alignRowWidth(c))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(e,t){let r=e.target,n=this._rowElements[t===0?1:this._rowElements.length-2],o=r.getAttribute("aria-posinset"),i=t===0?"1":`${this._terminal.buffer.lines.length}`;if(o===i||e.relatedTarget!==n)return;let a,s;if(t===0?(a=r,s=this._rowElements.pop(),this._rowContainer.removeChild(s)):(a=this._rowElements.shift(),s=r,this._rowContainer.removeChild(a)),a.removeEventListener("focus",this._topBoundaryFocusListener),s.removeEventListener("focus",this._bottomBoundaryFocusListener),t===0){let l=this._createAccessibilityTreeNode();this._rowElements.unshift(l),this._rowContainer.insertAdjacentElement("afterbegin",l)}else{let l=this._createAccessibilityTreeNode();this._rowElements.push(l),this._rowContainer.appendChild(l)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(t===0?-1:1),this._rowElements[t===0?1:this._rowElements.length-2].focus(),e.preventDefault(),e.stopImmediatePropagation()}_handleSelectionChange(){if(this._rowElements.length===0)return;let e=this._coreBrowserService.mainDocument.getSelection();if(!e)return;if(e.isCollapsed){this._rowContainer.contains(e.anchorNode)&&this._terminal.clearSelection();return}if(!e.anchorNode||!e.focusNode){console.error("anchorNode and/or focusNode are null");return}let t={node:e.anchorNode,offset:e.anchorOffset},r={node:e.focusNode,offset:e.focusOffset};if((t.node.compareDocumentPosition(r.node)&Node.DOCUMENT_POSITION_PRECEDING||t.node===r.node&&t.offset>r.offset)&&([t,r]=[r,t]),t.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(t={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(t.node))return;let n=this._rowElements.slice(-1)[0];if(r.node.compareDocumentPosition(n)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(r={node:n,offset:n.textContent?.length??0}),!this._rowContainer.contains(r.node))return;let o=({node:s,offset:l})=>{let c=s instanceof Text?s.parentNode:s,d=parseInt(c?.getAttribute("aria-posinset"),10)-1;if(isNaN(d))return console.warn("row is invalid. Race condition?"),null;let u=this._rowColumns.get(c);if(!u)return console.warn("columns is null. Race condition?"),null;let f=l<u.length?u[l]:u.slice(-1)[0]+1;return f>=this._terminal.cols&&(++d,f=0),{row:d,column:f}},i=o(t),a=o(r);if(!(!i||!a)){if(i.row>a.row||i.row===a.row&&i.column>=a.column)throw new Error("invalid range");this._terminal.select(i.column,i.row,(a.row-i.row)*this._terminal.cols-i.column+a.column)}}_handleResize(e){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let t=this._rowContainer.children.length;t<this._terminal.rows;t++)this._rowElements[t]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[t]);for(;this._rowElements.length>e;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){let e=this._coreBrowserService.mainDocument.createElement("div");return e.setAttribute("role","listitem"),e.tabIndex=-1,this._refreshRowDimensions(e),e}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){Object.assign(this._accessibilityContainer.style,{width:`${this._renderService.dimensions.css.canvas.width}px`,fontSize:`${this._terminal.options.fontSize}px`}),this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let e=0;e<this._terminal.rows;e++)this._refreshRowDimensions(this._rowElements[e]),this._alignRowWidth(this._rowElements[e])}}_refreshRowDimensions(e){e.style.height=`${this._renderService.dimensions.css.cell.height}px`}_alignRowWidth(e){e.style.transform="";let t=e.getBoundingClientRect().width,r=this._rowColumns.get(e)?.slice(-1)?.[0];if(!r)return;let n=r*this._renderService.dimensions.css.cell.width;e.style.transform=`scaleX(${n/t})`}};OC=br([ye(1,VN),ye(2,yl),ye(3,_l)],OC);var UN=class extends Qe{constructor(e,t,r,n,o){super(),this._element=e,this._mouseService=t,this._renderService=r,this._bufferService=n,this._linkProviderService=o,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this._register(new ce),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this._register(new ce),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this._register(Qt(()=>{af(this._linkCacheDisposables),this._linkCacheDisposables.length=0,this._lastMouseEvent=void 0,this._activeProviderReplies?.clear()})),this._register(this._bufferService.onResize(()=>{this._clearCurrentLink(),this._wasResized=!0})),this._register(Be(this._element,"mouseleave",()=>{this._isMouseOut=!0,this._clearCurrentLink()})),this._register(Be(this._element,"mousemove",this._handleMouseMove.bind(this))),this._register(Be(this._element,"mousedown",this._handleMouseDown.bind(this))),this._register(Be(this._element,"mouseup",this._handleMouseUp.bind(this)))}get currentLink(){return this._currentLink}_handleMouseMove(e){this._lastMouseEvent=e;let t=this._positionFromMouseEvent(e,this._element,this._mouseService);if(!t)return;this._isMouseOut=!1;let r=e.composedPath();for(let n=0;n<r.length;n++){let o=r[n];if(o.classList.contains("xterm"))break;if(o.classList.contains("xterm-hover"))return}(!this._lastBufferCell||t.x!==this._lastBufferCell.x||t.y!==this._lastBufferCell.y)&&(this._handleHover(t),this._lastBufferCell=t)}_handleHover(e){if(this._activeLine!==e.y||this._wasResized){this._clearCurrentLink(),this._askForLink(e,!1),this._wasResized=!1;return}this._currentLink&&this._linkAtPosition(this._currentLink.link,e)||(this._clearCurrentLink(),this._askForLink(e,!0))}_askForLink(e,t){(!this._activeProviderReplies||!t)&&(this._activeProviderReplies?.forEach(n=>{n?.forEach(o=>{o.link.dispose&&o.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=e.y);let r=!1;for(let[n,o]of this._linkProviderService.linkProviders.entries())t?this._activeProviderReplies?.get(n)&&(r=this._checkLinkProviderResult(n,e,r)):o.provideLinks(e.y,i=>{if(this._isMouseOut)return;let a=i?.map(s=>({link:s}));this._activeProviderReplies?.set(n,a),r=this._checkLinkProviderResult(n,e,r),this._activeProviderReplies?.size===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(e.y,this._activeProviderReplies)})}_removeIntersectingLinks(e,t){let r=new Set;for(let n=0;n<t.size;n++){let o=t.get(n);if(o)for(let i=0;i<o.length;i++){let a=o[i],s=a.link.range.start.y<e?0:a.link.range.start.x,l=a.link.range.end.y>e?this._bufferService.cols:a.link.range.end.x;for(let c=s;c<=l;c++){if(r.has(c)){o.splice(i--,1);break}r.add(c)}}}}_checkLinkProviderResult(e,t,r){if(!this._activeProviderReplies)return r;let n=this._activeProviderReplies.get(e),o=!1;for(let i=0;i<e;i++)(!this._activeProviderReplies.has(i)||this._activeProviderReplies.get(i))&&(o=!0);if(!o&&n){let i=n.find(a=>this._linkAtPosition(a.link,t));i&&(r=!0,this._handleNewLink(i))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!r)for(let i=0;i<this._activeProviderReplies.size;i++){let a=this._activeProviderReplies.get(i)?.find(s=>this._linkAtPosition(s.link,t));if(a){r=!0,this._handleNewLink(a);break}}return r}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(e){if(!this._currentLink)return;let t=this._positionFromMouseEvent(e,this._element,this._mouseService);t&&this._mouseDownLink&&r1e(this._mouseDownLink.link,this._currentLink.link)&&this._linkAtPosition(this._currentLink.link,t)&&this._currentLink.link.activate(e,this._currentLink.link.text)}_clearCurrentLink(e,t){!this._currentLink||!this._lastMouseEvent||(!e||!t||this._currentLink.link.range.start.y>=e&&this._currentLink.link.range.end.y<=t)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,af(this._linkCacheDisposables),this._linkCacheDisposables.length=0)}_handleNewLink(e){if(!this._lastMouseEvent)return;let t=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);t&&this._linkAtPosition(e.link,t)&&(this._currentLink=e,this._currentLink.state={decorations:{underline:e.link.decorations===void 0?!0:e.link.decorations.underline,pointerCursor:e.link.decorations===void 0?!0:e.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,e.link,this._lastMouseEvent),e.link.decorations={},Object.defineProperties(e.link.decorations,{pointerCursor:{get:()=>this._currentLink?.state?.decorations.pointerCursor,set:r=>{this._currentLink?.state&&this._currentLink.state.decorations.pointerCursor!==r&&(this._currentLink.state.decorations.pointerCursor=r,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",r))}},underline:{get:()=>this._currentLink?.state?.decorations.underline,set:r=>{this._currentLink?.state&&this._currentLink?.state?.decorations.underline!==r&&(this._currentLink.state.decorations.underline=r,this._currentLink.state.isHovered&&this._fireUnderlineEvent(e.link,r))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(r=>{if(!this._currentLink)return;let n=r.start===0?0:r.start+1+this._bufferService.buffer.ydisp,o=this._bufferService.buffer.ydisp+1+r.end;if(this._currentLink.link.range.start.y>=n&&this._currentLink.link.range.end.y<=o&&(this._clearCurrentLink(n,o),this._lastMouseEvent)){let i=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);i&&this._askForLink(i,!1)}})))}_linkHover(e,t,r){this._currentLink?.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(t,!0),this._currentLink.state.decorations.pointerCursor&&e.classList.add("xterm-cursor-pointer")),t.hover&&t.hover(r,t.text)}_fireUnderlineEvent(e,t){let r=e.range,n=this._bufferService.buffer.ydisp,o=this._createLinkUnderlineEvent(r.start.x-1,r.start.y-n-1,r.end.x,r.end.y-n-1,void 0);(t?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(o)}_linkLeave(e,t,r){this._currentLink?.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(t,!1),this._currentLink.state.decorations.pointerCursor&&e.classList.remove("xterm-cursor-pointer")),t.leave&&t.leave(r,t.text)}_linkAtPosition(e,t){let r=e.range.start.y*this._bufferService.cols+e.range.start.x,n=e.range.end.y*this._bufferService.cols+e.range.end.x,o=t.y*this._bufferService.cols+t.x;return r<=o&&o<=n}_positionFromMouseEvent(e,t,r){let n=r.getCoords(e,t,this._bufferService.cols,this._bufferService.rows);if(n)return{x:n[0],y:n[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(e,t,r,n,o){return{x1:e,y1:t,x2:r,y2:n,cols:this._bufferService.cols,fg:o}}};UN=br([ye(1,HN),ye(2,_l),ye(3,dn),ye(4,qee)],UN);function r1e(e,t){return e.text===t.text&&e.range.start.x===t.range.start.x&&e.range.start.y===t.range.start.y&&e.range.end.x===t.range.end.x&&e.range.end.y===t.range.end.y}var o1e=class extends KSe{constructor(e={}){super(e),this._linkifier=this._register(new yh),this.browser=bte,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this._register(new yh),this._onCursorMove=this._register(new ce),this.onCursorMove=this._onCursorMove.event,this._onKey=this._register(new ce),this.onKey=this._onKey.event,this._onRender=this._register(new ce),this.onRender=this._onRender.event,this._onSelectionChange=this._register(new ce),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this._register(new ce),this.onTitleChange=this._onTitleChange.event,this._onBell=this._register(new ce),this.onBell=this._onBell.event,this._onFocus=this._register(new ce),this._onBlur=this._register(new ce),this._onA11yCharEmitter=this._register(new ce),this._onA11yTabEmitter=this._register(new ce),this._onWillOpen=this._register(new ce),this._setup(),this._decorationService=this._instantiationService.createInstance(YSe),this._instantiationService.setService(qb,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(Wwe),this._instantiationService.setService(qee,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(nN)),this._register(this._inputHandler.onRequestBell(()=>this._onBell.fire())),this._register(this._inputHandler.onRequestRefreshRows(t=>this.refresh(t?.start??0,t?.end??this.rows-1))),this._register(this._inputHandler.onRequestSendFocus(()=>this._reportFocus())),this._register(this._inputHandler.onRequestReset(()=>this.reset())),this._register(this._inputHandler.onRequestWindowsOptionsReport(t=>this._reportWindowsOptions(t))),this._register(this._inputHandler.onColor(t=>this._handleColorEvent(t))),this._register(io.forward(this._inputHandler.onCursorMove,this._onCursorMove)),this._register(io.forward(this._inputHandler.onTitleChange,this._onTitleChange)),this._register(io.forward(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this._register(io.forward(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this._register(this._bufferService.onResize(t=>this._afterResize(t.cols,t.rows))),this._register(Qt(()=>{this._customKeyEventHandler=void 0,this.element?.parentNode?.removeChild(this.element)}))}get linkifier(){return this._linkifier.value}get onFocus(){return this._onFocus.event}get onBlur(){return this._onBlur.event}get onA11yChar(){return this._onA11yCharEmitter.event}get onA11yTab(){return this._onA11yTabEmitter.event}get onWillOpen(){return this._onWillOpen.event}_handleColorEvent(e){if(this._themeService)for(let t of e){let r,n="";switch(t.index){case 256:r="foreground",n="10";break;case 257:r="background",n="11";break;case 258:r="cursor",n="12";break;default:r="ansi",n="4;"+t.index}switch(t.type){case 0:let o=Ut.toColorRGB(r==="ansi"?this._themeService.colors.ansi[t.index]:this._themeService.colors[r]);this.coreService.triggerDataEvent(`${te.ESC}]${n};${USe(o)}${CN.ST}`);break;case 1:if(r==="ansi")this._themeService.modifyColors(i=>i.ansi[t.index]=Cr.toColor(...t.color));else{let i=r;this._themeService.modifyColors(a=>a[i]=Cr.toColor(...t.color))}break;case 2:this._themeService.restoreColor(t.index);break}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(e){e?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(OC,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(e){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(te.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){return this.textarea?.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(te.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;let e=this.buffer.ybase+this.buffer.y,t=this.buffer.lines.get(e);if(!t)return;let r=Math.min(this.buffer.x,this.cols-1),n=this._renderService.dimensions.css.cell.height,o=t.getWidth(r),i=this._renderService.dimensions.css.cell.width*o,a=this.buffer.y*this._renderService.dimensions.css.cell.height,s=r*this._renderService.dimensions.css.cell.width;this.textarea.style.left=s+"px",this.textarea.style.top=a+"px",this.textarea.style.width=i+"px",this.textarea.style.height=n+"px",this.textarea.style.lineHeight=n+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this._register(Be(this.element,"copy",t=>{this.hasSelection()&&NIe(t,this._selectionService)}));let e=t=>FIe(t,this.textarea,this.coreService,this.optionsService);this._register(Be(this.textarea,"paste",e)),this._register(Be(this.element,"paste",e)),yte?this._register(Be(this.element,"mousedown",t=>{t.button===2&&OJ(t,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})):this._register(Be(this.element,"contextmenu",t=>{OJ(t,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})),YN&&this._register(Be(this.element,"auxclick",t=>{t.button===1&&Bee(t,this.textarea,this.screenElement)}))}_bindKeys(){this._register(Be(this.textarea,"keyup",e=>this._keyUp(e),!0)),this._register(Be(this.textarea,"keydown",e=>this._keyDown(e),!0)),this._register(Be(this.textarea,"keypress",e=>this._keyPress(e),!0)),this._register(Be(this.textarea,"compositionstart",()=>this._compositionHelper.compositionstart())),this._register(Be(this.textarea,"compositionupdate",e=>this._compositionHelper.compositionupdate(e))),this._register(Be(this.textarea,"compositionend",()=>this._compositionHelper.compositionend())),this._register(Be(this.textarea,"input",e=>this._inputEvent(e),!0)),this._register(this.onRender(()=>this._compositionHelper.updateCompositionElements()))}open(e){if(!e)throw new Error("Terminal requires a parent element.");if(e.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),this.element?.ownerDocument.defaultView&&this._coreBrowserService){this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView);return}this._document=e.ownerDocument,this.options.documentOverride&&this.options.documentOverride instanceof Document&&(this._document=this.optionsService.rawOptions.documentOverride),this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),e.appendChild(this.element);let t=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),t.appendChild(this._viewportElement),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._register(Be(this.screenElement,"mousemove",o=>this.updateCursorStyle(o))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),t.appendChild(this.screenElement);let r=this.textarea=this._document.createElement("textarea");this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",tN.get()),wte||this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this._register(this.optionsService.onSpecificOptionChange("disableStdin",()=>r.readOnly=this.optionsService.rawOptions.disableStdin)),this.textarea.readOnly=this.optionsService.rawOptions.disableStdin,this._coreBrowserService=this._register(this._instantiationService.createInstance(Vwe,this.textarea,e.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(yl,this._coreBrowserService),this._register(Be(this.textarea,"focus",o=>this._handleTextAreaFocus(o))),this._register(Be(this.textarea,"blur",()=>this._handleTextAreaBlur())),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(TN,this._document,this._helperContainer),this._instantiationService.setService(NC,this._charSizeService),this._themeService=this._instantiationService.createInstance(ON),this._instantiationService.setService(_h,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(EC),this._instantiationService.setService(Kee,this._characterJoinerService),this._renderService=this._register(this._instantiationService.createInstance($N,this.rows,this.screenElement)),this._instantiationService.setService(_l,this._renderService),this._register(this._renderService.onRenderedViewportChange(o=>this._onRender.fire(o))),this.onResize(o=>this._renderService.resize(o.cols,o.rows)),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(PN,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(EN),this._instantiationService.setService(HN,this._mouseService);let n=this._linkifier.value=this._register(this._instantiationService.createInstance(UN,this.screenElement));this.element.appendChild(t);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this._register(this.onCursorMove(()=>{this._renderService.handleCursorMove(),this._syncTextArea()})),this._register(this.onResize(()=>this._renderService.handleResize(this.cols,this.rows))),this._register(this.onBlur(()=>this._renderService.handleBlur())),this._register(this.onFocus(()=>this._renderService.handleFocus())),this._viewport=this._register(this._instantiationService.createInstance(SN,this.element,this.screenElement)),this._register(this._viewport.onRequestScrollLines(o=>{super.scrollLines(o,!1),this.refresh(0,this.rows-1)})),this._selectionService=this._register(this._instantiationService.createInstance(AN,this.element,this.screenElement,n)),this._instantiationService.setService(WIe,this._selectionService),this._register(this._selectionService.onRequestScrollLines(o=>this.scrollLines(o.amount,o.suppressScrollEvent))),this._register(this._selectionService.onSelectionChange(()=>this._onSelectionChange.fire())),this._register(this._selectionService.onRequestRedraw(o=>this._renderService.handleSelectionChanged(o.start,o.end,o.columnSelectMode))),this._register(this._selectionService.onLinuxMouseSelection(o=>{this.textarea.value=o,this.textarea.focus(),this.textarea.select()})),this._register(io.any(this._onScroll.event,this._inputHandler.onScroll)(()=>{this._selectionService.refresh(),this._viewport?.queueSync()})),this._register(this._instantiationService.createInstance(kN,this.screenElement)),this._register(Be(this.element,"mousedown",o=>this._selectionService.handleMouseDown(o))),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager.value=this._instantiationService.createInstance(OC,this)),this._register(this.optionsService.onSpecificOptionChange("screenReaderMode",o=>this._handleScreenReaderModeOptionChange(o))),this.options.overviewRuler.width&&(this._overviewRulerRenderer=this._register(this._instantiationService.createInstance(TC,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRuler",o=>{!this._overviewRulerRenderer&&o&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this._register(this._instantiationService.createInstance(TC,this._viewportElement,this.screenElement)))}),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(RN,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){let e=this,t=this.element;function r(i){let a=e._mouseService.getMouseReportCoords(i,e.screenElement);if(!a)return!1;let s,l;switch(i.overrideType||i.type){case"mousemove":l=32,i.buttons===void 0?(s=3,i.button!==void 0&&(s=i.button<3?i.button:3)):s=i.buttons&1?0:i.buttons&4?1:i.buttons&2?2:3;break;case"mouseup":l=0,s=i.button<3?i.button:3;break;case"mousedown":l=1,s=i.button<3?i.button:3;break;case"wheel":if(e._customWheelEventHandler&&e._customWheelEventHandler(i)===!1)return!1;let c=i.deltaY;if(c===0||e.coreMouseService.consumeWheelEvent(i,e._renderService?.dimensions?.device?.cell?.height,e._coreBrowserService?.dpr)===0)return!1;l=c<0?0:1,s=4;break;default:return!1}return l===void 0||s===void 0||s>4?!1:e.coreMouseService.triggerMouseEvent({col:a.col,row:a.row,x:a.x,y:a.y,button:s,action:l,ctrl:i.ctrlKey,alt:i.altKey,shift:i.shiftKey})}let n={mouseup:null,wheel:null,mousedrag:null,mousemove:null},o={mouseup:i=>(r(i),i.buttons||(this._document.removeEventListener("mouseup",n.mouseup),n.mousedrag&&this._document.removeEventListener("mousemove",n.mousedrag)),this.cancel(i)),wheel:i=>(r(i),this.cancel(i,!0)),mousedrag:i=>{i.buttons&&r(i)},mousemove:i=>{i.buttons||r(i)}};this._register(this.coreMouseService.onProtocolChange(i=>{i?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(i)),this.element.classList.add("enable-mouse-events"),this._selectionService.disable()):(this._logService.debug("Unbinding from mouse events."),this.element.classList.remove("enable-mouse-events"),this._selectionService.enable()),i&8?n.mousemove||(t.addEventListener("mousemove",o.mousemove),n.mousemove=o.mousemove):(t.removeEventListener("mousemove",n.mousemove),n.mousemove=null),i&16?n.wheel||(t.addEventListener("wheel",o.wheel,{passive:!1}),n.wheel=o.wheel):(t.removeEventListener("wheel",n.wheel),n.wheel=null),i&2?n.mouseup||(n.mouseup=o.mouseup):(this._document.removeEventListener("mouseup",n.mouseup),n.mouseup=null),i&4?n.mousedrag||(n.mousedrag=o.mousedrag):(this._document.removeEventListener("mousemove",n.mousedrag),n.mousedrag=null)})),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this._register(Be(t,"mousedown",i=>{if(i.preventDefault(),this.focus(),!(!this.coreMouseService.areMouseEventsActive||this._selectionService.shouldForceSelection(i)))return r(i),n.mouseup&&this._document.addEventListener("mouseup",n.mouseup),n.mousedrag&&this._document.addEventListener("mousemove",n.mousedrag),this.cancel(i)})),this._register(Be(t,"wheel",i=>{if(!n.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(i)===!1)return!1;if(!this.buffer.hasScrollback){if(i.deltaY===0)return!1;if(e.coreMouseService.consumeWheelEvent(i,e._renderService?.dimensions?.device?.cell?.height,e._coreBrowserService?.dpr)===0)return this.cancel(i,!0);let a=te.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(i.deltaY<0?"A":"B");return this.coreService.triggerDataEvent(a,!0),this.cancel(i,!0)}}},{passive:!1}))}refresh(e,t){this._renderService?.refreshRows(e,t)}updateCursorStyle(e){this._selectionService?.shouldColumnSelect(e)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")}_showCursor(){this.coreService.isCursorInitialized||(this.coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))}scrollLines(e,t){this._viewport?this._viewport.scrollLines(e):super.scrollLines(e,t),this.refresh(0,this.rows-1)}scrollPages(e){this.scrollLines(e*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(e){e&&this._viewport?this._viewport.scrollToLine(this.buffer.ybase,!0):this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(e){let t=e-this._bufferService.buffer.ydisp;t!==0&&this.scrollLines(t)}paste(e){Mee(e,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(e){this._customKeyEventHandler=e}attachCustomWheelEventHandler(e){this._customWheelEventHandler=e}registerLinkProvider(e){return this._linkProviderService.registerLinkProvider(e)}registerCharacterJoiner(e){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");let t=this._characterJoinerService.register(e);return this.refresh(0,this.rows-1),t}deregisterCharacterJoiner(e){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(e)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(e){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+e)}registerDecoration(e){return this._decorationService.registerDecoration(e)}hasSelection(){return this._selectionService?this._selectionService.hasSelection:!1}select(e,t,r){this._selectionService.setSelection(e,t,r)}getSelection(){return this._selectionService?this._selectionService.selectionText:""}getSelectionPosition(){if(!(!this._selectionService||!this._selectionService.hasSelection))return{start:{x:this._selectionService.selectionStart[0],y:this._selectionService.selectionStart[1]},end:{x:this._selectionService.selectionEnd[0],y:this._selectionService.selectionEnd[1]}}}clearSelection(){this._selectionService?.clearSelection()}selectAll(){this._selectionService?.selectAll()}selectLines(e,t){this._selectionService?.selectLines(e,t)}_keyDown(e){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(e)===!1)return!1;let t=this.browser.isMac&&this.options.macOptionIsMeta&&e.altKey;if(!t&&!this._compositionHelper.keydown(e))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(!0),!1;!t&&(e.key==="Dead"||e.key==="AltGraph")&&(this._unprocessedDeadKey=!0);let r=XSe(e,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(e),r.type===3||r.type===2){let n=this.rows-1;return this.scrollLines(r.type===2?-n:n),this.cancel(e,!0)}if(r.type===1&&this.selectAll(),this._isThirdLevelShift(this.browser,e)||(r.cancel&&this.cancel(e,!0),!r.key)||e.key&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&e.key.length===1&&e.key.charCodeAt(0)>=65&&e.key.charCodeAt(0)<=90)return!0;if(this._unprocessedDeadKey)return this._unprocessedDeadKey=!1,!0;if((r.key===te.ETX||r.key===te.CR)&&(this.textarea.value=""),this._onKey.fire({key:r.key,domEvent:e}),this._showCursor(),this.coreService.triggerDataEvent(r.key,!0),!this.optionsService.rawOptions.screenReaderMode||e.altKey||e.ctrlKey)return this.cancel(e,!0);this._keyDownHandled=!0}_isThirdLevelShift(e,t){let r=e.isMac&&!this.options.macOptionIsMeta&&t.altKey&&!t.ctrlKey&&!t.metaKey||e.isWindows&&t.altKey&&t.ctrlKey&&!t.metaKey||e.isWindows&&t.getModifierState("AltGraph");return t.type==="keypress"?r:r&&(!t.keyCode||t.keyCode>47)}_keyUp(e){this._keyDownSeen=!1,!(this._customKeyEventHandler&&this._customKeyEventHandler(e)===!1)&&(n1e(e)||this.focus(),this.updateCursorStyle(e),this._keyPressHandled=!1)}_keyPress(e){let t;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(e)===!1)return!1;if(this.cancel(e),e.charCode)t=e.charCode;else if(e.which===null||e.which===void 0)t=e.keyCode;else if(e.which!==0&&e.charCode!==0)t=e.which;else return!1;return!t||(e.altKey||e.ctrlKey||e.metaKey)&&!this._isThirdLevelShift(this.browser,e)?!1:(t=String.fromCharCode(t),this._onKey.fire({key:t,domEvent:e}),this._showCursor(),this.coreService.triggerDataEvent(t,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,!0)}_inputEvent(e){if(e.data&&e.inputType==="insertText"&&(!e.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;let t=e.data;return this.coreService.triggerDataEvent(t,!0),this.cancel(e),!0}return!1}resize(e,t){if(e===this.cols&&t===this.rows){this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure();return}super.resize(e,t)}_afterResize(e,t){this._charSizeService?.measure()}clear(){if(!(this.buffer.ybase===0&&this.buffer.y===0)){this.buffer.clearAllMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(let e=1;e<this.rows;e++)this.buffer.lines.push(this.buffer.getBlankLine($r));this._onScroll.fire({position:this.buffer.ydisp}),this.refresh(0,this.rows-1)}}reset(){this.options.rows=this.rows,this.options.cols=this.cols;let e=this._customKeyEventHandler;this._setup(),super.reset(),this._selectionService?.reset(),this._decorationService.reset(),this._customKeyEventHandler=e,this.refresh(0,this.rows-1)}clearTextureAtlas(){this._renderService?.clearTextureAtlas()}_reportFocus(){this.element?.classList.contains("focus")?this.coreService.triggerDataEvent(te.ESC+"[I"):this.coreService.triggerDataEvent(te.ESC+"[O")}_reportWindowsOptions(e){if(this._renderService)switch(e){case 0:let t=this._renderService.dimensions.css.canvas.width.toFixed(0),r=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${te.ESC}[4;${r};${t}t`);break;case 1:let n=this._renderService.dimensions.css.cell.width.toFixed(0),o=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${te.ESC}[6;${o};${n}t`);break}}cancel(e,t){if(!(!this.options.cancelEvents&&!t))return e.preventDefault(),e.stopPropagation(),!1}};function n1e(e){return e.keyCode===16||e.keyCode===17||e.keyCode===18}var i1e=class{constructor(){this._addons=[]}dispose(){for(let e=this._addons.length-1;e>=0;e--)this._addons[e].instance.dispose()}loadAddon(e,t){let r={instance:t,dispose:t.dispose,isDisposed:!1};this._addons.push(r),t.dispose=()=>this._wrappedAddonDispose(r),t.activate(e)}_wrappedAddonDispose(e){if(e.isDisposed)return;let t=-1;for(let r=0;r<this._addons.length;r++)if(this._addons[r]===e){t=r;break}if(t===-1)throw new Error("Could not dispose an addon that has not been loaded");e.isDisposed=!0,e.dispose.apply(e.instance),this._addons.splice(t,1)}},a1e=class{constructor(e){this._line=e}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(e,t){if(!(e<0||e>=this._line.length))return t?(this._line.loadCell(e,t),t):this._line.loadCell(e,new Fi)}translateToString(e,t,r){return this._line.translateToString(e,t,r)}},Fee=class{constructor(e,t){this._buffer=e,this.type=t}init(e){return this._buffer=e,this}get cursorY(){return this._buffer.y}get cursorX(){return this._buffer.x}get viewportY(){return this._buffer.ydisp}get baseY(){return this._buffer.ybase}get length(){return this._buffer.lines.length}getLine(e){let t=this._buffer.lines.get(e);if(t)return new a1e(t)}getNullCell(){return new Fi}},s1e=class extends Qe{constructor(e){super(),this._core=e,this._onBufferChange=this._register(new ce),this.onBufferChange=this._onBufferChange.event,this._normal=new Fee(this._core.buffers.normal,"normal"),this._alternate=new Fee(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate(()=>this._onBufferChange.fire(this.active))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}},l1e=class{constructor(e){this._core=e}registerCsiHandler(e,t){return this._core.registerCsiHandler(e,r=>t(r.toArray()))}addCsiHandler(e,t){return this.registerCsiHandler(e,t)}registerDcsHandler(e,t){return this._core.registerDcsHandler(e,(r,n)=>t(r,n.toArray()))}addDcsHandler(e,t){return this.registerDcsHandler(e,t)}registerEscHandler(e,t){return this._core.registerEscHandler(e,t)}addEscHandler(e,t){return this.registerEscHandler(e,t)}registerOscHandler(e,t){return this._core.registerOscHandler(e,t)}addOscHandler(e,t){return this.registerOscHandler(e,t)}},c1e=class{constructor(e){this._core=e}register(e){this._core.unicodeService.register(e)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(e){this._core.unicodeService.activeVersion=e}},d1e=["cols","rows"],ps=0,Ate=class extends Qe{constructor(e){super(),this._core=this._register(new o1e(e)),this._addonManager=this._register(new i1e),this._publicOptions={...this._core.options};let t=n=>this._core.options[n],r=(n,o)=>{this._checkReadonlyOptions(n),this._core.options[n]=o};for(let n in this._core.options){let o={get:t.bind(this,n),set:r.bind(this,n)};Object.defineProperty(this._publicOptions,n,o)}}_checkReadonlyOptions(e){if(d1e.includes(e))throw new Error(`Option "${e}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new l1e(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new c1e(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this._register(new s1e(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){let e=this._core.coreService.decPrivateModes,t="none";switch(this._core.coreMouseService.activeProtocol){case"X10":t="x10";break;case"VT200":t="vt200";break;case"DRAG":t="drag";break;case"ANY":t="any";break}return{applicationCursorKeysMode:e.applicationCursorKeys,applicationKeypadMode:e.applicationKeypad,bracketedPasteMode:e.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:t,originMode:e.origin,reverseWraparoundMode:e.reverseWraparound,sendFocusMode:e.sendFocus,synchronizedOutputMode:e.synchronizedOutput,wraparoundMode:e.wraparound}}get options(){return this._publicOptions}set options(e){for(let t in e)this._publicOptions[t]=e[t]}blur(){this._core.blur()}focus(){this._core.focus()}input(e,t=!0){this._core.input(e,t)}resize(e,t){this._verifyIntegers(e,t),this._core.resize(e,t)}open(e){this._core.open(e)}attachCustomKeyEventHandler(e){this._core.attachCustomKeyEventHandler(e)}attachCustomWheelEventHandler(e){this._core.attachCustomWheelEventHandler(e)}registerLinkProvider(e){return this._core.registerLinkProvider(e)}registerCharacterJoiner(e){return this._checkProposedApi(),this._core.registerCharacterJoiner(e)}deregisterCharacterJoiner(e){this._checkProposedApi(),this._core.deregisterCharacterJoiner(e)}registerMarker(e=0){return this._verifyIntegers(e),this._core.registerMarker(e)}registerDecoration(e){return this._checkProposedApi(),this._verifyPositiveIntegers(e.x??0,e.width??0,e.height??0),this._core.registerDecoration(e)}hasSelection(){return this._core.hasSelection()}select(e,t,r){this._verifyIntegers(e,t,r),this._core.select(e,t,r)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(e,t){this._verifyIntegers(e,t),this._core.selectLines(e,t)}dispose(){super.dispose()}scrollLines(e){this._verifyIntegers(e),this._core.scrollLines(e)}scrollPages(e){this._verifyIntegers(e),this._core.scrollPages(e)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(e){this._verifyIntegers(e),this._core.scrollToLine(e)}clear(){this._core.clear()}write(e,t){this._core.write(e,t)}writeln(e,t){this._core.write(e),this._core.write(`\r
|
|
218
|
+
`,t)}paste(e){this._core.paste(e)}refresh(e,t){this._verifyIntegers(e,t),this._core.refresh(e,t)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(e){this._addonManager.loadAddon(this,e)}static get strings(){return{get promptLabel(){return tN.get()},set promptLabel(e){tN.set(e)},get tooMuchOutput(){return rN.get()},set tooMuchOutput(e){rN.set(e)}}}_verifyIntegers(...e){for(ps of e)if(ps===1/0||isNaN(ps)||ps%1!==0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...e){for(ps of e)if(ps&&(ps===1/0||isNaN(ps)||ps%1!==0||ps<0))throw new Error("This API only accepts positive integers")}};var fn=y(D(),1);function Ote(e){try{let t=JSON.parse(e);switch(t.t){case"ready":case"restarting":return{t:t.t};case"exit":return typeof t.code=="number"?{t:"exit",code:t.code}:null;case"error":return typeof t.message=="string"?{t:"error",message:t.message.slice(0,500)}:null;default:return null}}catch{return null}}var zte=[500,1e3,2e3,4e3,8e3],jC=class{constructor(t,r){$t(this,"sessionId",t);$t(this,"events",r);$t(this,"socket",null);$t(this,"timer");$t(this,"attempt",0);$t(this,"closed",!1);$t(this,"finished",!1);$t(this,"suspended",!1);$t(this,"size",{cols:120,rows:30})}open(t,r){this.size={cols:t,rows:r},this.connect()}connect(){this.events.state(this.attempt===0?"connecting":"reconnecting");let r=(location.protocol==="https:"?"wss:":"ws:")+"//"+location.host+"/api/sessions/"+this.sessionId+"/terminal?cols="+this.size.cols+"&rows="+this.size.rows,n=new WebSocket(r);n.binaryType="arraybuffer",this.socket=n,n.onmessage=o=>{if(o.data instanceof ArrayBuffer){this.events.output(new Uint8Array(o.data));return}let i=typeof o.data=="string"?Ote(o.data):null;i&&(i.t==="ready"?(this.attempt=0,this.events.reset(),this.events.state("connected")):i.t==="exit"?(this.finished=!0,this.events.state("ended","The agent exited (code "+i.code+").")):i.t==="error"&&(this.finished=!0,this.events.state("failed",i.message)))},n.onclose=()=>{if(this.socket!==n||(this.socket=null,this.closed||this.finished||this.suspended))return;let o=zte[Math.min(this.attempt,zte.length-1)];this.attempt++,this.events.state("reconnecting"),this.timer=window.setTimeout(()=>this.connect(),o)}}send(t){this.socket?.readyState===WebSocket.OPEN&&this.socket.send(t)}resize(t,r){this.size={cols:t,rows:r},this.socket?.readyState===WebSocket.OPEN&&this.socket.send(JSON.stringify({t:"resize",cols:t,rows:r}))}claim(t,r){this.resize(t,r)}suspend(){if(this.closed||this.finished)return;this.suspended=!0,window.clearTimeout(this.timer);let t=this.socket;this.socket=null,t?.close(1e3)}resume(){!this.suspended||this.closed||this.finished||(this.suspended=!1,this.attempt=0,this.connect())}close(){this.closed=!0,window.clearTimeout(this.timer),this.socket?.close(1e3),this.socket=null}};var Bte=y(O(),1),Nte={background:"#0e1015",foreground:"#e6e8ee",cursor:"#e6e8ee",selectionBackground:"#3b4252",black:"#1a1d24",brightBlack:"#6c7383"},Fte={background:"#ffffff",foreground:"#1f2328",cursor:"#1f2328",selectionBackground:"#c7d2fe",black:"#1f2328",brightBlack:"#6e7781"},UC=[11,12,13,14,15,16,18,20],u1e=2*6e4,f1e=120;function Lte(e,t){/^https?:\/\//i.test(t)&&window.confirm(`Open this link in a new tab?
|
|
219
|
+
|
|
220
|
+
`+t.slice(0,300))&&window.open(t,"_blank","noopener,noreferrer")}var Mte=(0,fn.forwardRef)(function({sessionId:t,fontSize:r,onState:n,onReady:o},i){let a=(0,fn.useRef)(null),s=(0,fn.useRef)(null),l=(0,fn.useRef)(null),c=(0,fn.useRef)(null),d=(0,fn.useRef)(()=>{}),u=_d("dark")==="dark",f=(0,fn.useRef)(u),m=(0,fn.useRef)(r);return(0,fn.useImperativeHandle)(i,()=>({find:(p,g=!1)=>g?l.current?.findPrevious(p)??!1:l.current?.findNext(p)??!1,clearFind:()=>l.current?.clearDecorations(),type:p=>d.current(p),setFontSize:p=>{s.current&&(s.current.options.fontSize=p,c.current?.fit())},focus:()=>s.current?.focus()}),[]),(0,fn.useEffect)(()=>{let p=a.current;if(!p)return;let g=new LY,b=new dJ,v=new Ate({fontFamily:'"Cascadia Mono", "Cascadia Code", Consolas, ui-monospace, Menlo, monospace',fontSize:m.current,lineHeight:1.15,cursorBlink:!0,scrollback:1e4,allowProposedApi:!0,theme:f.current?Nte:Fte,linkHandler:{activate:Lte}});v.loadAddon(g),v.loadAddon(b),v.loadAddon(new EJ(Lte)),v.loadAddon(new TJ),v.unicode.activeVersion="11",v.open(p),v.attachCustomKeyEventHandler(H=>H.type!=="keydown"||!H.ctrlKey||H.shiftKey||H.altKey||H.key.toLowerCase()!=="c"||!v.hasSelection()?!0:(navigator.clipboard?.writeText(v.getSelection()).catch(()=>{}),v.clearSelection(),!1)),s.current=v,l.current=b,c.current=g,g.fit();let x=new jC(t,{state:n,output:H=>v.write(H),reset:()=>v.reset()}),_=new TextEncoder;d.current=H=>x.send(_.encode(H)),v.onData(H=>x.send(_.encode(H))),v.onBinary(H=>x.send(Uint8Array.from(H,K=>K.charCodeAt(0)))),v.onResize(({cols:H,rows:K})=>x.resize(H,K));let I,S=()=>{window.clearTimeout(I),I=window.setTimeout(()=>{let H=g.proposeDimensions();H&&(H.cols!==v.cols||H.rows!==v.rows)&&g.fit()},f1e)},w=new ResizeObserver(S);w.observe(p);let P=()=>x.claim(v.cols,v.rows);v.textarea?.addEventListener("focus",P);let $,B=()=>{window.clearTimeout($),document.hidden?$=window.setTimeout(()=>x.suspend(),u1e):x.resume()},W=()=>x.close();return document.addEventListener("visibilitychange",B),window.addEventListener("pagehide",W),o(()=>x.close()),x.open(v.cols,v.rows),v.focus(),()=>{window.clearTimeout($),window.clearTimeout(I),v.textarea?.removeEventListener("focus",P),document.removeEventListener("visibilitychange",B),window.removeEventListener("pagehide",W),w.disconnect(),x.close(),v.dispose(),s.current=null,l.current=null,c.current=null,d.current=()=>{}}},[t,n,o]),(0,fn.useEffect)(()=>{s.current&&(s.current.options.theme=u?Nte:Fte)},[u]),(0,Bte.jsx)("div",{ref:a,className:"terminal-host"})});var He=y(O(),1),m1e=Gu("sessions.list"),p1e={connecting:{text:"Connecting",color:"gray"},connected:{text:"Connected",color:"green"},reconnecting:{text:"Reconnecting",color:"orange"},ended:{text:"Ended",color:"gray"},failed:{text:"Cannot connect",color:"red"}},h1e=[{label:"Esc",bytes:"\x1B"},{label:"Tab",bytes:" "},{label:"Ctrl+C",bytes:""},{label:"\u2191",bytes:"\x1B[A"},{label:"\u2193",bytes:"\x1B[B"},{label:"\u2190",bytes:"\x1B[D"},{label:"\u2192",bytes:"\x1B[C"},{label:"Enter",bytes:"\r"},{label:"Shift+Tab",bytes:"\x1B[Z"}];function g1e({terminal:e,close:t}){let[r,n]=(0,Li.useState)(""),[o,i]=(0,Li.useState)(!1),a=l=>i(r!==""&&!e?.find(r,l)),s=()=>{e?.clearFind(),t(),e?.focus()};return(0,He.jsx)(oa,{className:"terminal-search",shadow:"md",p:6,withBorder:!0,children:(0,He.jsxs)(Se,{gap:4,wrap:"nowrap",children:[(0,He.jsx)(Pt,{size:"xs",w:220,autoFocus:!0,placeholder:"Find in the terminal",value:r,error:o,onChange:l=>n(l.currentTarget.value),onKeyDown:l=>{l.key==="Enter"&&a(l.shiftKey),l.key==="Escape"&&s()},"aria-label":"Find in the terminal"}),(0,He.jsx)(vt,{"aria-label":"Previous",onClick:()=>a(!0),children:(0,He.jsx)(Rz,{size:16})}),(0,He.jsx)(vt,{"aria-label":"Next",onClick:()=>a(!1),children:(0,He.jsx)(lb,{size:16})}),(0,He.jsx)(vt,{"aria-label":"Close search",onClick:s,children:(0,He.jsx)(uh,{size:16})})]})})}function jte({id:e}){let[t,r]=(0,Li.useState)("connecting"),[n,o]=(0,Li.useState)(),[i,a]=(0,Li.useState)(!1),[s,l]=$2({key:"terminal-font-size",defaultValue:window.matchMedia("(max-width: 36em)").matches?11:14}),c=(0,Li.useRef)(null),d=(0,Li.useRef)(()=>{}),{toggle:u,fullscreen:f}=O2(),m=hd("(pointer: coarse)"),g=cl(m1e,{}).data?.sessions.find(w=>w.id===e),b=(0,Li.useCallback)((w,P)=>{r(w),o(P)},[]),v=(0,Li.useCallback)(w=>{d.current=w},[]),x=w=>{let P=UC.indexOf(s),$=UC[Math.max(0,Math.min(UC.length-1,(P<0?3:P)+w))];l($),c.current?.setFontSize($)};Uh([["mod+shift+F",()=>a(!0)]],[],!0);let _=p1e[t],I={kind:"operation",op:"sessions.close",label:"Close",verb:"close",input:{session:e},danger:!0,description:"End this session and every program it started"},S=()=>{d.current(),Er(Io("sessions"))};return(0,He.jsxs)("div",{className:"terminal-page",style:{position:"relative"},children:[(0,He.jsxs)(Se,{gap:"sm",px:"sm",py:6,wrap:"nowrap",className:"terminal-toolbar",children:[(0,He.jsx)(xt,{label:"Back to sessions (the session keeps running)",children:(0,He.jsx)(vt,{size:"lg","aria-label":"Back",onClick:S,children:(0,He.jsx)(kz,{size:18})})}),g&&(0,He.jsx)(Ju,{name:g.harness,size:28}),(0,He.jsxs)(F,{style:{minWidth:0},children:[(0,He.jsx)(ue,{fw:650,size:"sm",truncate:!0,lh:1.2,children:g?g.harness+" \xB7 "+(g.projectName??g.cwd):"Session "+e}),(0,He.jsx)(ue,{size:"xs",c:"dimmed",truncate:!0,lh:1.2,ff:"monospace",children:n??e})]}),(0,He.jsx)(kn,{color:_.color,variant:"dot",style:{flex:"none"},visibleFrom:"sm",children:_.text}),(0,He.jsx)(xt,{label:_.text,children:(0,He.jsx)(F,{hiddenFrom:"sm",style:{flex:"none",display:"flex"},"aria-label":_.text,children:(0,He.jsx)("span",{className:"status-dot",style:{"--dot":"var(--mantine-color-"+_.color+"-6)"}})})}),(0,He.jsxs)(Se,{gap:2,ml:"auto",wrap:"nowrap",children:[(0,He.jsx)(xt,{label:"Find (Ctrl+Shift+F)",children:(0,He.jsx)(vt,{size:"lg","aria-label":"Find",onClick:()=>a(w=>!w),children:(0,He.jsx)(On,{size:18})})}),(0,He.jsx)(xt,{label:"Smaller text",children:(0,He.jsx)(vt,{size:"lg","aria-label":"Smaller text",onClick:()=>x(-1),visibleFrom:"xs",children:(0,He.jsx)(Qz,{size:18})})}),(0,He.jsx)(xt,{label:"Bigger text",children:(0,He.jsx)(vt,{size:"lg","aria-label":"Bigger text",onClick:()=>x(1),visibleFrom:"xs",children:(0,He.jsx)(Yz,{size:18})})}),(0,He.jsx)(xt,{label:f?"Leave full screen":"Full screen",children:(0,He.jsx)(vt,{size:"lg","aria-label":"Full screen",onClick:()=>{u()},children:f?(0,He.jsx)(Vz,{size:18}):(0,He.jsx)(Uz,{size:18})})}),g?.phase==="running"&&(0,He.jsx)(fl,{action:I,size:"xs",ml:6}),(0,He.jsx)(xt,{label:"Close this view; the session keeps running",children:(0,He.jsx)(st,{size:"xs",variant:"default",ml:6,onClick:S,children:"Detach"})})]})]}),i&&(0,He.jsx)(g1e,{terminal:c.current,close:()=>a(!1)}),(0,He.jsx)(Mte,{ref:c,sessionId:e,fontSize:s,onState:b,onReady:v}),m&&(0,He.jsx)("div",{className:"key-bar",role:"toolbar","aria-label":"Keys",children:h1e.map(w=>(0,He.jsx)(st,{size:"compact-sm",variant:"default",onClick:()=>{c.current?.type(w.bytes),c.current?.focus()},children:w.label},w.label))})]})}var Qte=y(D(),1);var xs=y(D(),1);var vs=y(D(),1);var wh=y(D(),1);var Vt=y(O(),1),JN="@custom";function v1e(e){return["boolean","enum","number","text","path"].includes(e.kind)?!0:e.kind==="list"&&["enum","text","path"].includes(e.element?.kind??"")}function VC({action:e,summary:t}){let r=Uk(),n=e.fields?.[0],o=e.initial?.[n?.name??""],[i,a]=(0,wh.useState)(o),[s,l]=(0,wh.useState)(!1),[c,d]=(0,wh.useState)(null),u=JSON.stringify(o??null);if((0,wh.useEffect)(()=>a(JSON.parse(u)),[u]),!n)return null;let f=async b=>{if(JSON.stringify(b??null)===u)return;let v=j1(n,b);if(v){d(v);return}l(!0),d(null);let x=await r(e,{[n.name]:b},{inline:!0});l(!1),!x.ok&&!("cancelled"in x)&&(d(x.message+(x.fix?" "+x.fix:"")),a(JSON.parse(u)))},m=b=>{b.key==="Enter"&&f(i),b.key==="Escape"&&a(JSON.parse(u))},p=s?(0,Vt.jsx)(ho,{size:14}):void 0,g=c??void 0;if(!v1e(n))return(0,Vt.jsxs)(Se,{justify:"flex-end",gap:"sm",wrap:"nowrap",children:[t&&(0,Vt.jsx)(ue,{size:"sm",c:"dimmed",truncate:!0,children:t}),(0,Vt.jsx)(st,{variant:"default",size:"xs",onClick:()=>{qk(e).then(async b=>{b&&await r(e,b,{inline:!0})})},children:n.kind==="secret"?"Set\u2026":"Edit\u2026"})]});switch(n.kind){case"boolean":return(0,Vt.jsxs)(Fe,{gap:4,align:"flex-end",children:[(0,Vt.jsxs)(Se,{gap:"xs",children:[p,(0,Vt.jsx)(Ga,{checked:i===!0,"aria-label":n.label,disabled:s,onChange:b=>{let v=b.currentTarget.checked;a(v),f(v)}})]}),g&&(0,Vt.jsx)(x1e,{text:g})]});case"enum":{let b=(n.choices??[]).map(_=>({value:String(_.value),label:_.label})),v=n.choices?.some(_=>_.value===i)??!1,x=!v&&i!==void 0&&n.open!==void 0;return(0,Vt.jsxs)(Fe,{gap:6,children:[(0,Vt.jsx)(la,{"aria-label":n.label,data:[...b,...n.open?[{value:JN,label:"Custom\u2026"}]:[]],value:x?JN:v?String(i):null,rightSection:p,error:x?void 0:g,disabled:s,onChange:_=>{if(_===JN){a(n.open?.kind==="number"?n.open.min??0:"");return}let I=n.choices?.find(S=>String(S.value)===_)?.value;a(I),f(I)}}),x&&n.open&&(0,Vt.jsx)(Ute,{field:n.open,value:i,error:g,onChange:a,onSave:f})]})}case"number":return(0,Vt.jsx)(Ute,{field:n,value:i,error:g,onChange:a,onSave:f,busy:s});case"path":return(0,Vt.jsxs)(Se,{gap:"xs",wrap:"nowrap",align:"flex-start",children:[(0,Vt.jsx)(Pt,{style:{flex:1},"aria-label":n.label,ff:"monospace",size:"sm",value:typeof i=="string"?i:"",placeholder:n.literals?.length?n.literals.join(" or ")+", or a path":"C:\\\u2026",rightSection:p,error:g,onChange:b=>a(b.currentTarget.value),onBlur:()=>{f(i)},onKeyDown:m}),(0,Vt.jsx)(Sb,{field:n,value:typeof i=="string"?i:void 0,onPick:b=>{a(b),f(b)}})]});case"list":{let b=Array.isArray(i)?i.map(_=>String(_)):[],v=n.element;if(v?.kind==="enum")return(0,Vt.jsx)(tu,{"aria-label":n.label,data:(v.choices??[]).map(_=>({value:String(_.value),label:_.label})),value:b,error:g,rightSection:p,onChange:_=>{let I=_.map(S=>v.choices?.find(w=>String(w.value)===S)?.value??S);a(I),f(I)}});let x=_=>{a(_),f(_)};return(0,Vt.jsxs)(Se,{gap:"xs",wrap:"nowrap",align:"flex-start",children:[(0,Vt.jsx)(_c,{style:{flex:1},"aria-label":n.label,value:b,placeholder:b.length?void 0:"Type and press Enter",error:g,rightSection:p,onChange:x,clearable:!0}),v?.kind==="path"&&(0,Vt.jsx)(Sb,{field:n,value:void 0,onPick:_=>x(b.includes(_)?b:[...b,_])})]})}default:return(0,Vt.jsx)(Pt,{"aria-label":n.label,value:typeof i=="string"?i:"",rightSection:p,error:g,onChange:b=>a(b.currentTarget.value),onBlur:()=>{f(i)},onKeyDown:m})}}function Ute({field:e,value:t,error:r,busy:n,onChange:o,onSave:i}){let a=s=>{s.key==="Enter"&&i(t)};return e.kind==="number"?(0,Vt.jsx)(nu,{"aria-label":e.label,value:typeof t=="number"?t:"",min:e.min,max:e.max,allowDecimal:!e.integer,thousandSeparator:",",placeholder:e.range,rightSection:n?(0,Vt.jsx)(ho,{size:14}):void 0,error:r,onChange:s=>o(typeof s=="number"?s:void 0),onBlur:()=>{i(t)},onKeyDown:a}):(0,Vt.jsx)(Pt,{"aria-label":e.label,value:typeof t=="string"?t:"",error:r,onChange:s=>o(s.currentTarget.value),onBlur:()=>{i(t)},onKeyDown:a})}function x1e({text:e}){return(0,Vt.jsx)(ue,{size:"xs",c:"red",ta:"right",children:e})}var pr=y(O(),1);function eF(){return(0,pr.jsxs)(Fe,{gap:"lg","aria-busy":"true","aria-label":"Loading",children:[(0,pr.jsxs)(Se,{justify:"space-between",children:[(0,pr.jsxs)(Fe,{gap:8,children:[(0,pr.jsx)(Pn,{h:26,w:180,radius:"md"}),(0,pr.jsx)(Pn,{h:14,w:320,radius:"md"})]}),(0,pr.jsx)(Pn,{h:34,w:120,radius:"md"})]}),[0,1].map(e=>(0,pr.jsx)(gr,{children:(0,pr.jsxs)(Fe,{gap:"sm",children:[(0,pr.jsx)(Pn,{h:16,w:140,radius:"md"}),(0,pr.jsx)(Pn,{h:12,radius:"md"}),(0,pr.jsx)(Pn,{h:12,w:"80%",radius:"md"}),(0,pr.jsx)(Pn,{h:12,w:"60%",radius:"md"})]})},e))]})}function Yb({title:e,text:t,icon:r=Mz,action:n,tone:o="neutral"}){return(0,pr.jsx)(gr,{py:48,children:(0,pr.jsx)(Vs,{children:(0,pr.jsxs)(Fe,{gap:"sm",align:"center",maw:440,ta:"center",children:[(0,pr.jsx)(Ic,{size:52,radius:"xl",variant:"light",color:o==="danger"?"red":"indigo",children:(0,pr.jsx)(r,{size:26,stroke:1.6})}),e&&(0,pr.jsx)(Kn,{order:3,children:e}),(0,pr.jsx)(ue,{c:"dimmed",size:"sm",children:t}),n]})})})}function tF({message:e,fix:t,retry:r}){return(0,pr.jsx)(Yb,{tone:"danger",icon:sb,title:e,text:t??"Try again in a moment.",action:r&&(0,pr.jsx)(st,{variant:"default",onClick:r,children:"Try again"})})}var De=y(O(),1);function Jb(e){return"item-"+e.replace(/[^A-Za-z0-9_-]/g,"_")}function b1e(e){return(e.items??[]).filter(t=>t.badges?.length).length}function y1e({item:e}){return!e.details?.length&&!e.code?null:(0,De.jsx)(xt,{label:(0,De.jsxs)(Fe,{gap:0,children:[e.code&&(0,De.jsx)(ue,{size:"xs",ff:"monospace",fw:700,children:e.code}),(e.details??[]).map((t,r)=>(0,De.jsx)(ue,{size:"xs",ff:"monospace",style:{whiteSpace:"pre"},children:t},r))]}),maw:480,position:"top-start",children:(0,De.jsx)(mb,{size:14,color:"var(--app-muted)",style:{flex:"none",cursor:"help"}})})}var _1e=150;function I1e({text:e}){let[t,r]=(0,vs.useState)(!1),n=e.length>_1e;return(0,De.jsxs)(F,{mt:4,children:[(0,De.jsx)(ue,{size:"xs",c:"dimmed",lh:1.5,lineClamp:n&&!t?2:void 0,children:e}),n&&(0,De.jsx)(iv,{component:"button",type:"button",size:"xs",onClick:()=>r(!t),children:t?"Less":"More"})]})}function w1e({item:e,flash:t}){let r=$i(e.primary)&&!e.disabled?e.primary:void 0,n=r?.kind==="operation"&&r.inline?r:void 0,o=!!e.badges?.length;return(0,De.jsxs)("div",{className:"setting-row"+(t?" flash":""),id:Jb(e.id),children:[(0,De.jsxs)(F,{style:{minWidth:0},children:[(0,De.jsxs)(Se,{gap:6,wrap:"nowrap",children:[o&&(0,De.jsx)("span",{className:"modified-dot",title:"Changed from the default"}),(0,De.jsx)(ue,{fw:600,size:"sm",truncate:!0,children:e.label}),(0,De.jsx)(y1e,{item:e})]}),e.description&&(0,De.jsx)(I1e,{text:e.description}),e.disabled&&(0,De.jsx)(ue,{size:"xs",c:"dimmed",fs:"italic",mt:4,children:e.disabled})]}),(0,De.jsxs)(Se,{gap:6,wrap:"nowrap",justify:"flex-end",align:"flex-start",children:[(0,De.jsx)(F,{style:{flex:1,minWidth:0},children:n?(0,De.jsx)(VC,{action:n,summary:e.hint}):(0,De.jsxs)(Se,{justify:"flex-end",gap:"sm",wrap:"nowrap",children:[e.hint&&(0,De.jsx)(xt,{label:nd(e.hint),openDelay:400,maw:480,multiline:!0,children:(0,De.jsx)(ue,{size:"sm",c:"dimmed",ff:"monospace",truncate:!0,style:{minWidth:0},children:nd(e.hint)})}),r&&(0,De.jsx)(F,{style:{flex:"none"},children:(0,De.jsx)(fl,{action:r,size:"xs"})})]})}),(0,De.jsx)(F,{w:28,style:{flex:"none"},children:(0,De.jsx)(ey,{actions:e.actions??[]})})]})]})}function S1e({text:e}){let t=/[A-Za-z]:\\[^\s]+|\/[^\s]+/.exec(e)?.[0],r=t?t.split(/[\\/]/).pop():void 0;return(0,De.jsx)(xt,{label:e,openDelay:300,maw:560,multiline:!0,children:(0,De.jsxs)(Se,{gap:6,wrap:"nowrap",mt:-8,style:{width:"fit-content",cursor:"default"},children:[(0,De.jsx)(Fz,{size:15,color:"var(--app-muted)",style:{flex:"none"}}),(0,De.jsx)(ue,{size:"xs",c:"dimmed",children:r?"Saved in "+r:e})]})})}function rF(e,t=[]){let r=decodeURIComponent(location.hash.slice(1));if(r.startsWith("item-"))for(let n of e){let o=n.items?.find(i=>Jb(i.id)===r);if(o)return{section:n.id,item:o.id}}return{section:e.find(n=>n.id===r)?.id??t.find(n=>n.id===r)?.id}}function Vte({page:e,summary:t,toolbar:r,extras:n=[]}){let o=(0,vs.useMemo)(()=>e.sections.filter(b=>b.items?.length),[e]),[i,a]=(0,vs.useState)(()=>rF(o,n).section??o[0]?.id),[s,l]=(0,vs.useState)(()=>rF(o).item),[c,d]=(0,vs.useState)("");(0,vs.useEffect)(()=>{let b=()=>{let v=rF(o,n);v.section&&a(v.section),v.item&&(d(""),l(v.item))};return window.addEventListener("hashchange",b),()=>window.removeEventListener("hashchange",b)},[o,n]),(0,vs.useEffect)(()=>{if(!s)return;document.getElementById(Jb(s))?.scrollIntoView({block:"center",behavior:"smooth"});let b=window.setTimeout(()=>l(void 0),1800);return()=>window.clearTimeout(b)},[s,i]);let u=n.find(b=>b.id===i),f=u?void 0:o.find(b=>b.id===i)??o[0],m=c.trim()?nF({...e,sections:o},c).sections:null,p=b=>{d(""),a(b),history.replaceState(null,"",location.pathname+location.search+"#"+b),window.scrollTo({top:0})},g=b=>(0,De.jsx)(w1e,{item:b,flash:s===b.id},b.id);return(0,De.jsxs)(Fe,{gap:"lg",children:[(0,De.jsx)(oF,{title:e.title,summary:t,toolbar:r,actions:e.actions}),e.notice&&(0,De.jsx)(S1e,{text:e.notice.text}),(0,De.jsxs)("div",{className:"category-layout",children:[(0,De.jsxs)(Fe,{gap:"sm",className:"category-nav",children:[(0,De.jsx)(Pt,{leftSection:(0,De.jsx)(On,{size:16}),placeholder:"Search "+e.title.toLowerCase(),value:c,onChange:b=>d(b.currentTarget.value),"aria-label":"Search "+e.title.toLowerCase()}),(0,De.jsxs)(Fe,{gap:2,visibleFrom:"md",children:[o.map(b=>{let v=b1e(b);return(0,De.jsx)(sa,{label:b.title,active:!m&&b.id===f?.id,onClick:()=>p(b.id),style:{borderRadius:"var(--mantine-radius-md)"},rightSection:v?(0,De.jsx)(kn,{size:"xs",circle:!0,variant:"light",children:v}):null},b.id)}),n.length>0&&(0,De.jsx)(mv,{my:6}),n.map(b=>(0,De.jsx)(sa,{label:b.label,active:!m&&b.id===u?.id,onClick:()=>p(b.id),style:{borderRadius:"var(--mantine-radius-md)"}},b.id))]}),(0,De.jsx)(F,{hiddenFrom:"md",children:(0,De.jsx)(Se,{gap:6,children:[...o.map(b=>({id:b.id,label:b.title??b.id})),...n].map(b=>{let v=!m&&b.id===(u?.id??f?.id);return(0,De.jsx)(kn,{size:"lg",variant:v?"filled":"light",color:v?"indigo":"gray",style:{cursor:"pointer"},onClick:()=>p(b.id),children:b.label},b.id)})})})]}),(0,De.jsx)(Fe,{gap:"lg",style:{minWidth:0},children:m?m.length?m.map(b=>(0,De.jsxs)(Fe,{gap:"xs",children:[(0,De.jsxs)(ue,{size:"xs",fw:650,tt:"uppercase",c:"dimmed",children:[b.title," \xB7 ",b.items?.length??0]}),(0,De.jsx)(gr,{className:"list-card",children:(0,De.jsx)(HC,{items:b.items??[],render:g})})]},b.id)):(0,De.jsx)(Yb,{icon:On,title:"Nothing found",text:'No setting matches "'+c+'".'}):u?(0,De.jsx)(F,{children:u.node},u.id):f&&(0,De.jsxs)(Fe,{gap:"sm",children:[(0,De.jsxs)(F,{children:[(0,De.jsx)(Kn,{order:2,children:f.title}),f.description&&(0,De.jsx)(ue,{size:"sm",c:"dimmed",mt:4,children:f.description})]}),(0,De.jsx)(gr,{className:"list-card",children:(0,De.jsx)(HC,{items:f.items??[],render:g})})]})})]})]})}var k1e={ok:"green",warn:"orange",danger:"red",muted:"gray",accent:"blue"};function cf(e){return e?k1e[e]:void 0}var X=y(O(),1),C1e=12,iF=3;function nd(e){return e.replace(/ +-> +/g," \u2192 ").replace(/\s{2,}/g," \xB7 ")}function Hte(e){if(!e.hint)return!1;let t=new Set((e.badges??[]).map(r=>r.text.toLowerCase()));return t.size?!nd(e.hint).split(" \xB7 ").every(r=>t.has(r.trim().toLowerCase())):!0}function Wte(e){return e.kind==="link"&&e.target.kind==="start-agent"}function oF({title:e,summary:t,toolbar:r,actions:n=[]}){let o=n.filter($i);return(0,X.jsxs)(Se,{justify:"space-between",align:"flex-start",gap:"md",wrap:"wrap",children:[(0,X.jsxs)(Fe,{gap:4,style:{minWidth:0},children:[(0,X.jsx)(Kn,{order:1,children:e}),t&&(0,X.jsx)(ue,{c:"dimmed",size:"sm",children:t})]}),(0,X.jsxs)(Se,{gap:"xs",children:[r,o.map((i,a)=>(0,X.jsx)(fl,{action:i,primary:Wte(i)},a))]})]})}function P1e({note:e}){return(0,X.jsx)(xi,{color:cf(e.tone)??"gray",variant:"light",p:"sm",radius:"md",icon:(0,X.jsx)(mb,{size:18}),styles:{message:{fontSize:"var(--mantine-font-size-sm)"}},children:e.text})}function D1e({fact:e}){let t=cf(e.tone);return(0,X.jsxs)("div",{className:"fact-tile",title:e.description,children:[(0,X.jsx)(ue,{size:"xs",c:"dimmed",fw:500,children:e.label}),(0,X.jsxs)(Se,{gap:6,wrap:"nowrap",mt:2,children:[t&&(0,X.jsx)("span",{className:"status-dot",style:{"--dot":`var(--mantine-color-${t}-6)`}}),(0,X.jsx)(ue,{size:"sm",fw:600,style:{wordBreak:"break-word"},children:e.value})]}),e.meter&&(0,X.jsx)(vc,{mt:8,size:"sm",radius:"xl",value:Math.min(100,e.meter.value/Math.max(1,e.meter.max)*100),color:t??"indigo"}),e.details?.map((r,n)=>(0,X.jsx)(ue,{size:"xs",c:"dimmed",mt:2,children:r},n))]})}function R1e({facts:e}){return(0,X.jsx)("div",{className:"facts-grid",children:e.map(t=>(0,X.jsx)(D1e,{fact:t},t.id))})}function aF(e,t){return!!e&&!!t&&e.trim().toLowerCase()===t.trim().toLowerCase()}function Zte(e){return{description:e.description&&!aF(e.description,e.hint)?e.description:void 0,details:(e.details??[]).filter(t=>!aF(t,e.hint)&&!aF(t,e.description))}}var T1e=/^([A-Z][A-Za-z ]{1,24}):\s+(.+)$/,E1e=/^([A-Z][A-Za-z]*(?: [A-Za-z]+){0,3}) {2,}(.+)$/,$1e=/[\\/]|^(sandbox|npm) /;function A1e(e){let t=T1e.exec(e)??E1e.exec(e);if(t)return{label:t[1].trim(),value:t[2].trim()}}function O1e({line:e}){let t=A1e(e);return t?(0,X.jsxs)(Se,{gap:8,wrap:"wrap",align:"flex-start",mt:2,children:[(0,X.jsx)(ue,{size:"xs",c:"dimmed",miw:72,style:{flex:"none"},children:t.label}),(0,X.jsx)(ue,{size:"xs",ff:$1e.test(t.value)?"monospace":void 0,style:{flex:"1 1 120px",minWidth:0,wordBreak:"break-word",whiteSpace:"pre-wrap"},children:t.value})]}):(0,X.jsx)(ue,{size:"xs",c:"dimmed",ff:"monospace",style:{wordBreak:"break-word",whiteSpace:"pre-wrap"},children:e})}function Gte({lines:e}){let[t,r]=(0,xs.useState)(!1);if(!e.length)return null;let n=e.slice(0,iF),o=e.slice(iF),i=(a,s)=>(0,X.jsx)(O1e,{line:a},s);return(0,X.jsxs)(F,{mt:4,children:[n.map(i),o.length>0&&(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(sm,{in:t,children:o.map((a,s)=>i(a,s+iF))}),(0,X.jsx)(_t,{onClick:()=>r(!t),mt:2,children:(0,X.jsxs)(Se,{gap:2,children:[t?(0,X.jsx)(lb,{size:12}):(0,X.jsx)(Dz,{size:12}),(0,X.jsx)(ue,{size:"xs",c:"indigo",children:t?"Less":o.length+" more"})]})})]})]})}function Kte({item:e}){return(0,X.jsx)(X.Fragment,{children:e.badges?.map(t=>(0,X.jsx)(kn,{size:"sm",color:cf(t.tone)??"gray",children:t.text},t.text))})}function z1e({tone:e}){let t=e&&e!=="muted"?cf(e):void 0;return t?(0,X.jsx)("span",{className:"status-dot","aria-hidden":"true",style:{"--dot":`var(--mantine-color-${t}-6)`}}):null}function ty(e){return $i(e.primary)&&!e.disabled?e.primary:void 0}function sF({action:e,hint:t,light:r}){return e.kind==="operation"&&e.inline?(0,X.jsx)(F,{miw:160,maw:300,onClick:n=>n.stopPropagation(),children:(0,X.jsx)(VC,{action:e,summary:t})}):(0,X.jsx)(fl,{action:e,size:"xs",variant:r?"light":"default"})}function N1e(e,t){return e.kind==="operation"&&t.kind==="operation"?e.op===t.op&&JSON.stringify(e.input)===JSON.stringify(t.input):e.kind==="link"&&t.kind==="link"?JSON.stringify(e.target)===JSON.stringify(t.target):!1}function lF(e,t){return(e??[]).filter(r=>!t||!N1e(r,t))}function ey({actions:e}){let t=e.filter($i);return t.length>2?(0,X.jsx)(FY,{actions:t}):(0,X.jsx)(X.Fragment,{children:t.map((r,n)=>(0,X.jsx)(NY,{action:r},n))})}function F1e({item:e}){let t=Yu(),r=ty(e),n=r?.kind==="link",{description:o,details:i}=Zte(e);return(0,X.jsx)("div",{className:"item-row"+(n?" clickable":""),tabIndex:n?0:void 0,role:n?"button":void 0,onClick:n?()=>{t(r)}:void 0,onKeyDown:n?a=>a.key==="Enter"&&void t(r):void 0,style:e.disabled?{opacity:.65}:void 0,children:(0,X.jsxs)(Se,{justify:"space-between",wrap:"wrap",align:"center",gap:"md",children:[(0,X.jsxs)(Se,{gap:"sm",wrap:"nowrap",align:"flex-start",style:{minWidth:0,flex:"1 1 240px"},children:[e.icon&&(0,X.jsx)(Ju,{name:e.icon,size:34}),(0,X.jsxs)(F,{style:{minWidth:0},children:[(0,X.jsxs)(Se,{gap:8,wrap:"wrap",children:[e.tone!=="muted"&&(0,X.jsx)(z1e,{tone:e.tone}),(0,X.jsx)(ue,{fw:600,size:"sm",c:e.tone==="muted"?cf(e.tone):void 0,children:nd(e.label)}),e.marked&&(0,X.jsx)(kn,{size:"xs",variant:"dot",color:"indigo",children:"this folder"}),(0,X.jsx)(Kte,{item:e})]}),Hte(e)&&(0,X.jsx)(ue,{size:"sm",c:"dimmed",style:{wordBreak:"break-word"},children:nd(e.hint??"")}),o&&(0,X.jsx)(ue,{size:"xs",c:"dimmed",mt:2,children:o}),(0,X.jsx)(Gte,{lines:i}),e.disabled&&(0,X.jsx)(ue,{size:"xs",c:"dimmed",fs:"italic",mt:2,children:e.disabled})]})]}),(0,X.jsxs)(Se,{gap:6,wrap:"nowrap",className:"row-actions",style:{flex:"none"},children:[(0,X.jsx)(ey,{actions:lF(e.actions,r)}),r&&(0,X.jsx)(sF,{action:r,hint:e.hint,light:n})]})]})})}function qte(e){return!!ty(e)&&!e.hint&&!e.details?.length&&!e.badges?.length&&!e.marked&&!e.icon}function L1e({item:e}){let t=Yu(),r=ty(e),n=r?.kind==="link";if(r&&qte(e))return(0,X.jsx)(gr,{padding:"md",title:e.description,style:{alignSelf:"start",borderStyle:"dashed",background:"transparent"},children:(0,X.jsxs)(Se,{justify:"center",gap:6,children:[(0,X.jsx)(ey,{actions:lF(e.actions,r)}),(0,X.jsx)(sF,{action:r,light:!0})]})});let{details:o}=Zte(e);return(0,X.jsx)(gr,{className:"item-card"+(n?" clickable":""),padding:"md",onClick:n?()=>{t(r)}:void 0,style:e.disabled?{opacity:.7}:void 0,children:(0,X.jsxs)(Fe,{gap:"sm",h:"100%",children:[(0,X.jsxs)(Se,{gap:"sm",wrap:"nowrap",align:"flex-start",children:[e.icon&&(0,X.jsx)(Ju,{name:e.icon}),(0,X.jsxs)(F,{style:{minWidth:0,flex:1},children:[(0,X.jsx)(ue,{fw:650,size:"sm",style:{overflowWrap:"anywhere"},children:nd(e.label)}),(e.marked||!!e.badges?.length)&&(0,X.jsxs)(Se,{gap:4,mt:4,wrap:"wrap",children:[e.marked&&(0,X.jsx)(kn,{size:"sm",variant:"dot",color:"indigo",children:"this folder"}),(0,X.jsx)(Kte,{item:e})]}),Hte(e)&&(0,X.jsx)(ue,{size:"xs",c:"dimmed",truncate:!0,mt:4,children:nd(e.hint??"")})]})]}),(0,X.jsx)(Gte,{lines:o}),e.disabled&&(0,X.jsx)(ue,{size:"xs",c:"dimmed",fs:"italic",children:e.disabled}),(r||e.actions?.length)&&(0,X.jsxs)(Se,{justify:"flex-end",gap:6,mt:"auto",children:[(0,X.jsx)(ey,{actions:lF(e.actions,r)}),r&&(0,X.jsx)(sF,{action:r,hint:e.hint,light:!0})]})]})})}function M1e({section:e}){let t=e.columns??[];return(0,X.jsx)(ur.ScrollContainer,{minWidth:560,children:(0,X.jsxs)(ur,{highlightOnHover:!0,verticalSpacing:8,horizontalSpacing:"md",fz:"sm",children:[(0,X.jsx)(ur.Thead,{children:(0,X.jsxs)(ur.Tr,{children:[t.map(r=>(0,X.jsx)(ur.Th,{fz:"xs",c:"dimmed",tt:"uppercase",children:r.label},r.key)),(0,X.jsx)(ur.Th,{})]})}),(0,X.jsx)(ur.Tbody,{children:(e.items??[]).map(r=>{let n=ty(r);return(0,X.jsxs)(ur.Tr,{style:r.disabled?{opacity:.6}:void 0,children:[t.map(o=>(0,X.jsx)(ur.Td,{children:r.cells?.[o.key]??""},o.key)),(0,X.jsx)(ur.Td,{ta:"right",children:n&&(0,X.jsx)(fl,{action:n,size:"compact-xs"})})]},r.id)})})]})})}function HC({items:e,render:t=r=>(0,X.jsx)(F1e,{item:r},r.id)}){let r=[],n;for(let o of e)o.group&&o.group!==n&&r.push((0,X.jsx)("div",{className:"group-heading",children:o.group},"g:"+o.group)),n=o.group,r.push(t(o));return(0,X.jsx)(X.Fragment,{children:r})}function B1e({section:e,more:t=[]}){let r=[...(e.actions??[]).filter($i),...t];return!e.title&&!e.summary&&!r.length?null:(0,X.jsxs)(Se,{justify:"space-between",align:"flex-end",gap:"sm",children:[(0,X.jsxs)(F,{style:{minWidth:0},children:[e.title&&(0,X.jsx)(Kn,{order:3,children:e.title}),e.summary&&(0,X.jsx)(ue,{size:"sm",c:"dimmed",children:e.summary})]}),r.length>0&&(0,X.jsx)(Se,{gap:"xs",children:r.map((n,o)=>(0,X.jsx)(fl,{action:n,primary:Wte(n),size:"xs"},o))})]})}function j1e({notes:e}){let t=e.filter(o=>(o.only===void 0||o.only==="web")&&!o.text.startsWith("* ="));if(!t.length)return null;let r=t.filter(o=>o.tone==="warn"||o.tone==="danger"),n=t.filter(o=>!r.includes(o));return(0,X.jsxs)(Fe,{gap:"xs",children:[r.length>0&&(0,X.jsx)(xi,{color:r.some(o=>o.tone==="danger")?"red":"yellow",variant:"light",radius:"md",p:"sm",icon:(0,X.jsx)(sb,{size:18}),children:(0,X.jsx)(Fe,{gap:4,children:r.map((o,i)=>(0,X.jsx)(ue,{size:"sm",children:o.text},i))})}),n.length>0&&(0,X.jsx)(Fe,{gap:2,children:n.map((o,i)=>(0,X.jsx)(ue,{size:"xs",c:cf(o.tone)??"dimmed",children:o.text},i))})]})}function U1e({lines:e}){let t=(0,xs.useRef)(null),r=e.join(`
|
|
221
|
+
`);return(0,xs.useEffect)(()=>{let n=t.current;n&&(n.scrollTop=n.scrollHeight)},[r]),(0,X.jsx)(gr,{children:(0,X.jsx)(zr,{h:400,viewportRef:t,type:"auto",children:(0,X.jsx)(fv,{block:!0,children:r})})})}function V1e({section:e}){let t=e.items??[],r=e.facts??[],n=(e.actions??[]).filter($i),o=e.text??[];if(!r.length&&!t.length&&!n.length&&!e.summary&&!o.length)return null;let i=e.columns&&e.columnsOn!=="cli",a=e.cards?t.filter(qte):[],s=a.length?t.filter(c=>!a.includes(c)):t,l=a.flatMap(c=>{let d=ty(c);return d?[d]:[]});return(0,X.jsxs)(Fe,{gap:"sm",children:[(0,X.jsx)(B1e,{section:e,more:l}),e.description&&(0,X.jsx)(ue,{size:"sm",c:"dimmed",mt:-4,children:e.description}),r.length>0&&(0,X.jsx)(gr,{padding:0,children:(0,X.jsx)(R1e,{facts:r})}),o.length>0&&(0,X.jsx)(U1e,{lines:o}),s.length>0&&(e.cards?(0,X.jsx)(Rv,{cols:{base:1,sm:2,lg:3},spacing:"md",children:s.map(c=>(0,X.jsx)(L1e,{item:c},c.id))}):(0,X.jsx)(gr,{className:"list-card",children:i?(0,X.jsx)(M1e,{section:e}):(0,X.jsx)(HC,{items:t})})),(0,X.jsx)(j1e,{notes:e.notes??[]})]})}function nF(e,t){let r=t.trim().toLowerCase();if(!r)return e;let n=o=>[o.label,o.hint,o.description,o.keywords,o.group,o.code].some(i=>i?.toLowerCase().includes(r));return{...e,sections:e.sections.map(o=>({...o,facts:[],actions:[],items:(o.items??[]).filter(n)})).filter(o=>o.items.length>0||(o.text?.length??0)>0)}}function Xte({page:e,summary:t,toolbar:r,extras:n}){return e.categories?(0,X.jsx)(Vte,{page:e,summary:t,toolbar:r,extras:n}):(0,X.jsx)(H1e,{page:e,summary:t,toolbar:r})}function H1e({page:e,summary:t,toolbar:r}){let n=Yu(),[o,i]=(0,xs.useState)(""),a=(0,xs.useMemo)(()=>e.sections.reduce((d,u)=>d+(u.items?.length??0),0),[e]),s=(0,xs.useMemo)(()=>nF(e,o),[e,o]),l=e.empty,c=$i(l?.action)?l?.action:void 0;return(0,X.jsxs)(Fe,{gap:"xl",children:[(0,X.jsx)(oF,{title:e.title,summary:t,toolbar:r,actions:e.actions}),e.notice&&(0,X.jsx)(P1e,{note:e.notice}),a>C1e&&(0,X.jsx)(Pt,{leftSection:(0,X.jsx)(On,{size:16}),placeholder:"Search "+e.title.toLowerCase(),value:o,onChange:d=>i(d.currentTarget.value),"aria-label":"Search this page"}),!rQ(e)&&l?(0,X.jsx)(Yb,{title:l.title,text:l.text,action:c&&(0,X.jsx)(st,{mt:"xs",onClick:()=>{n(c)},children:c.label})}):s.sections.map(d=>(0,X.jsx)(V1e,{section:d},d.id))]})}var so=y(O(),1),W1e=200;function Yte(e,t){let r={};for(let i of e.params??[]){let a=t[i];typeof a=="string"&&a.length<=W1e&&(r[i]=a)}for(let i of e.filters??[]){let a=t[i.param];r[i.param]=i.choices.some(s=>s.value===a)?a:i.choices[0].value}let n=e.tabs;if(!n)return r;let o=t[n.param];return{...r,[n.param]:n.choices.some(i=>i.value===o)?o:n.choices[0].value}}function Z1e({view:e,params:t}){return(0,so.jsx)(so.Fragment,{children:(e.filters??[]).map(r=>(0,so.jsx)(la,{size:"sm",w:150,"aria-label":r.label,allowDeselect:!1,comboboxProps:{withinPortal:!0},data:r.choices.map(n=>({value:n.value,label:n.label})),value:t[r.param],onChange:n=>n&&Er(Io(e.id,{...t,[r.param]:n}))},r.param))})}function Jte({view:e,params:t,extras:r}){let n=KX(e,t),i=Object.keys(e.queries).map(u=>[u,cl(e.queries[u],n[u])]),a=i.find(([,u])=>u.error);if(a){let u=a[1].error;return(0,so.jsx)(tF,{message:u.message,fix:u.fix,retry:()=>location.reload()})}if(i.some(([,u])=>u.pending))return(0,so.jsx)(eF,{});let s=e.build(Object.fromEntries(i.map(([u,f])=>[u,f.data])),t),l=e.tabs,c=e.filters?.length?(0,so.jsx)(Z1e,{view:e,params:t}):null,d=l||c?(0,so.jsxs)(so.Fragment,{children:[c,l&&(0,so.jsx)(au,{size:"sm",data:l.choices.map(u=>({value:u.value,label:u.label})),value:t[l.param],onChange:u=>Er(Io(e.id,{[l.param]:u}))})]}):void 0;return(0,so.jsx)(Xte,{page:s,summary:e.summary,toolbar:d,extras:r})}function G1e({id:e}){let t=_z(e);return t?(0,so.jsx)(Jte,{view:t,params:Yte(t,{})}):null}function ere({view:e,params:t}){let r=JQ(sl,e);if((0,Qte.useEffect)(()=>{r?.view&&Er(Io(r.view)+"#"+e)},[r,e]),r?.view)return(0,so.jsx)(eF,{});let n=_z(e);if(!n)return(0,so.jsx)(tF,{message:"There is no page called "+e+".",fix:"Pick a page on the left."});let o=Yte(n,t),a=(Ku(sl).find(s=>s.view===e)?.embeds??[]).map(s=>({id:s.view,label:s.label,node:(0,so.jsx)(G1e,{id:s.view})}));return(0,so.jsx)(Jte,{view:n,params:o,extras:a.length?a:void 0},e+JSON.stringify(o))}var tre=()=>$v({opened:!1,empty:!1,selected:-1,listId:"",query:"",registeredActions:new Set}),cF=e=>Av(e);function Sh(e,t){let r=t.getState();t.setState({...r,...e(t.getState())})}function rre(e){Sh(()=>({opened:!0,selected:-1}),e)}function ore(e){Sh(()=>({opened:!1}),e)}function nre(e){Sh(t=>({opened:!t.opened,selected:t.opened?t.selected:-1}),e)}function ire(e,t){t.updateState(r=>({...r,selected:e}))}function K1e(e,t){t.updateState(r=>({...r,listId:e}))}function WC(e,t=document){let r=t.querySelector(e);if(r)return r;let n=t instanceof ShadowRoot?t.host.children:t.children;for(let o=0;o<n.length;o+=1){let i=n[o];if(i.shadowRoot){let s=WC(e,i.shadowRoot);if(s)return s}let a=WC(e,i);if(a)return a}return null}function ZC(e,t){let r=t.getState(),n=r.listId?WC(`#${r.listId}`):null,o=n?.querySelector("[data-selected]"),i=n?.querySelectorAll("[data-action]")??[],a=e===-1?i.length-1:e===i.length?0:e,s=Rl(a,0,i.length-1);return o?.removeAttribute("data-selected"),i[s]?.scrollIntoView({block:"nearest"}),i[s]?.setAttribute("data-selected","true"),ire(s,t),s}function q1e(e){return ZC(e.getState().selected+1,e)}function X1e(e){return ZC(e.getState().selected-1,e)}function Q1e(e){let t=e.getState();WC(`#${t.listId} [data-selected]`)?.click()}function Y1e(e,t){let r=t.getState();return r.registeredActions.add(e),()=>{r.registeredActions.delete(e)}}function J1e(e,t){Sh(()=>({query:e}),t),Promise.resolve().then(()=>{ZC(0,t),Sh(r=>({empty:r.query.trim().length>0&&r.registeredActions.size===0||!1}),t)})}function eke({clearQuery:e},t){t.updateState(r=>({...r,selected:-1,query:e?"":r.query,empty:e?!1:r.empty}))}var mn={open:rre,close:ore,toggle:nre,updateState:Sh,setSelectedAction:ire,setListId:K1e,selectAction:ZC,selectNextAction:q1e,selectPreviousAction:X1e,triggerSelectedAction:Q1e,registerAction:Y1e,setQuery:J1e,clearSpotlightState:eke};function are(){let e=tre();return[e,{open:()=>rre(e),close:()=>ore(e),toggle:()=>nre(e)}]}var[GC,Il]=are(),{open:tke,close:rke,toggle:oke}=Il;function KC(e){let t=e;return t.group!==void 0&&Array.isArray(t.actions)}var wl=y(O(),1);function nke(e){return Array.isArray(e)?e.map(t=>t.trim()).join(",").toLowerCase().trim():typeof e=="string"?e.toLowerCase().trim():""}function ike(e){return e.reduce((t,r)=>"actions"in r?[...t,...r.actions.map(n=>({...n,group:r.group}))]:[...t,r],[])}function ake(e){let t={},r=[];return e.forEach(n=>{n.group?(t[n.group]||(t[n.group]={pushed:!1,data:{group:n.group,actions:[]}}),t[n.group].data.actions.push(n),t[n.group].pushed||(t[n.group].pushed=!0,r.push(t[n.group].data))):r.push(n)}),r}var sre=(e,t)=>{let r=e.trim().toLowerCase(),n=[[],[]];return ike(t).forEach(i=>{i.label?.toLowerCase().includes(r)?n[0].push(i):(i.description?.toLowerCase().includes(r)||nke(i.keywords).includes(r))&&n[1].push(i)}),ake(n.flat())};function dF(e,t){if(!Array.isArray(e))return[];let r=0;return e.reduce((n,o)=>{if(r>=t)return n;if(KC(o)){let i=dF(o.actions,t-r);n.push({group:o.group,actions:i}),r+=i.length}else n.push(o),r+=1;return n},[])}var Bi=y(O(),1);var[lre,Mi]=Zt("Spotlight component was not found in tree");var lo={root:"m_d2b315db",content:"m_3cd250e0",body:"m_d2abce9b",search:"m_f366a061",actionsList:"m_6e463822",action:"m_d49bb8ef",actionBody:"m_3d475731",actionSection:"m_832642f6",actionLabel:"m_6c2a1345",actionDescription:"m_a6d9d78d",empty:"m_82f78f74",footer:"m_ddcaf054",actionsGroup:"m_5a3e5f7b"};var ske={dimmedSections:!0,highlightQuery:!1},kh=M((e,t)=>{let r=z("SpotlightAction",ske,e),{className:n,style:o,classNames:i,styles:a,id:s,description:l,label:c,leftSection:d,rightSection:u,children:f,dimmedSections:m,highlightQuery:p,highlightColor:g,closeSpotlightOnTrigger:b,onClick:v,onMouseDown:x,keywords:_,vars:I,...S}=r,w=Mi(),P={classNames:i,styles:a},$=p&&typeof c=="string"?(0,Bi.jsx)(hv,{component:"span",highlight:w.query,color:g,...w.getStyles("actionLabel",P),children:c}):(0,Bi.jsx)("span",{...w.getStyles("actionLabel",P),children:c});return(0,Bi.jsx)(_t,{ref:t,"data-action":!0,...w.getStyles("action",{className:n,style:o,...P}),...S,onMouseDown:B=>{B.preventDefault(),x?.(B)},onClick:B=>{v?.(B),(b??w.closeOnActionTrigger)&&mn.close(w.store)},tabIndex:-1,children:f||(0,Bi.jsxs)(Bi.Fragment,{children:[d&&(0,Bi.jsx)(F,{component:"span",mod:{position:"left",dimmed:m},...w.getStyles("actionSection",P),children:d}),(0,Bi.jsxs)("span",{...w.getStyles("actionBody",P),children:[$,(0,Bi.jsx)("span",{...w.getStyles("actionDescription",P),children:l})]}),u&&(0,Bi.jsx)(F,{component:"span",mod:{position:"right",dimmed:m},...w.getStyles("actionSection",P),children:u})]})})});kh.classes=lo;kh.displayName="@mantine/spotlight/SpotlightAction";var cre=y(O(),1);var lke={},ry=M((e,t)=>{let{className:r,style:n,styles:o,classNames:i,label:a,children:s,...l}=z("SpotlightActionsGroup",lke,e),c=Mi();return(0,cre.jsx)(F,{...c.getStyles("actionsGroup",{className:r,style:n,classNames:i,styles:o}),ref:t,...l,__vars:{"--spotlight-label":`'${a?.replace(/'/g,"\\'")}'`},children:s})});ry.classes=lo;ry.displayName="@mantine/core/SpotlightActionsGroup";var dre=y(O(),1),qC=y(D(),1);var cke={},oy=M((e,t)=>{let{className:r,style:n,id:o,children:i,vars:a,classNames:s,styles:l,...c}=z("SpotlightActionsList",cke,e),d=Mi(),u=`mantine-${(0,qC.useId)().replace(/:/g,"")}`,f=o||u;return(0,qC.useEffect)(()=>(mn.setListId(f,d.store),()=>mn.setListId("",d.store)),[]),(0,dre.jsx)(zr.Autosize,{...d.getStyles("actionsList",{className:r,style:n,classNames:s,styles:l}),ref:t,type:"scroll",scrollbarSize:"var(--spotlight-actions-list-padding)",offsetScrollbars:"y",id:f,...c,children:i})});oy.classes=lo;oy.displayName="@mantine/spotlight/SpotlightActionsList";var ure=y(O(),1);var dke={},ny=M((e,t)=>{let{className:r,style:n,classNames:o,styles:i,...a}=z("SpotlightEmpty",dke,e),s=Mi();return(0,ure.jsx)(F,{ref:t,...s.getStyles("empty",{classNames:o,styles:i,className:r,style:n}),...a})});ny.classes=lo;ny.displayName="@mantine/spotlight/SpotlightEmpty";var fre=y(O(),1);var uke={},XC=M((e,t)=>{let{className:r,style:n,classNames:o,styles:i,...a}=z("SpotlightFooter",uke,e),s=Mi();return(0,fre.jsx)(F,{ref:t,...s.getStyles("footer",{className:r,classNames:o,style:n,styles:i}),...a})});XC.classes=lo;XC.displayName="@mantine/spotlight/SpotlightFooter";var uF=y(O(),1);function mre(e,t){if(!e)return[];let r=()=>mn.open(t);return Array.isArray(e)?e.map(n=>[n,r]):[[e,r]]}var fke={size:600,yOffset:80,zIndex:Rt("max"),overlayProps:{backgroundOpacity:.35,blur:7},transitionProps:{duration:200,transition:"pop"},store:GC,clearQueryOnClose:!0,closeOnActionTrigger:!0,shortcut:"mod + K",maxHeight:400,scrollable:!1},iy=M((e,t)=>{let r=z("SpotlightRoot",fke,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,store:c,children:d,query:u,onQueryChange:f,transitionProps:m,clearQueryOnClose:p,shortcut:g,tagsToIgnore:b,triggerOnContentEditable:v,disabled:x,onSpotlightOpen:_,onSpotlightClose:I,forceOpened:S,closeOnActionTrigger:w,maxHeight:P,scrollable:$,...B}=r,W=ut(),{opened:H,query:K}=cF(c),T=u||K,k=C=>{f?.(C),mn.setQuery(C,c)},E=q({name:"Spotlight",classes:lo,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s});return Uh(mre(g,c),b,v),_r(()=>{H?_?.():I?.()},[H]),x?null:(0,uF.jsx)(lre,{value:{getStyles:E,query:T,setQuery:k,store:c,closeOnActionTrigger:w},children:(0,uF.jsx)(vo,{ref:t,...B,withCloseButton:!1,opened:H||!!S,padding:0,onClose:()=>mn.close(c),className:o,style:i,classNames:Wi({theme:W,classNames:[lo,n],props:r,stylesCtx:void 0}),styles:_a({theme:W,styles:a,props:r,stylesCtx:void 0}),transitionProps:{...m,onExited:()=>{p&&k(""),mn.clearSpotlightState({clearQuery:p},c),m?.onExited?.()}},__vars:{"--spotlight-max-height":$?Z(P):void 0},__staticSelector:"Spotlight","data-scrollable":$||void 0,children:d})})});iy.classes=lo;iy.displayName="@mantine/spotlight/SpotlightRoot";var pre=y(O(),1),hre=y(D(),1);var mke={size:"lg"},ay=M((e,t)=>{let{classNames:r,styles:n,onKeyDown:o,onChange:i,vars:a,value:s,...l}=z("SpotlightSearch",mke,e),c=Mi(),d=c.getStyles("search"),[u,f]=(0,hre.useState)(!1),m=p=>{o?.(p),!u&&(p.nativeEvent.code==="ArrowDown"&&(p.preventDefault(),mn.selectNextAction(c.store)),p.nativeEvent.code==="ArrowUp"&&(p.preventDefault(),mn.selectPreviousAction(c.store)),(p.nativeEvent.code==="Enter"||p.nativeEvent.code==="NumpadEnter")&&(p.preventDefault(),mn.triggerSelectedAction(c.store)))};return(0,pre.jsx)(ft,{ref:t,classNames:[{input:d.className},r],styles:[{input:d.style},n],...l,value:s??c.query,onChange:p=>{c.setQuery(p.currentTarget.value),i?.(p)},onKeyDown:m,onCompositionStart:()=>f(!0),onCompositionEnd:()=>f(!1)})});ay.classes=lo;ay.displayName="@mantine/spotlight/SpotlightSearch";var pke={size:600,yOffset:80,limit:1/0,zIndex:Rt("max"),overlayProps:{backgroundOpacity:.35,blur:7},transitionProps:{duration:200,transition:"pop"},store:GC,filter:sre,clearQueryOnClose:!0,closeOnActionTrigger:!0,shortcut:"mod + K",highlightQuery:!1},pn=M((e,t)=>{let r=z("Spotlight",pke,e),{searchProps:n,filter:o,query:i,onQueryChange:a,actions:s,nothingFound:l,highlightQuery:c,limit:d,...u}=r,[f,m]=ot({value:i,defaultValue:"",finalValue:"",onChange:a}),p=dF(o(f,s),d).map(g=>{if(KC(g)){let b=g.actions.map(({id:v,...x})=>(0,wl.jsx)(kh,{highlightQuery:c,...x},v));return(0,wl.jsx)(ry,{label:g.group,children:b},g.group)}return(0,wl.jsx)(kh,{highlightQuery:c,...g},g.id)});return(0,wl.jsxs)(iy,{...u,query:f,onQueryChange:m,ref:t,children:[(0,wl.jsx)(ay,{...n}),(0,wl.jsxs)(oy,{children:[p,p.length===0&&l&&(0,wl.jsx)(ny,{children:l})]})]})});pn.classes=lo;pn.displayName="@mantine/spotlight/Spotlight";pn.Search=ay;pn.ActionsList=oy;pn.Action=kh;pn.Empty=ny;pn.ActionsGroup=ry;pn.Footer=XC;pn.Root=iy;pn.open=Il.open;pn.close=Il.close;pn.toggle=Il.toggle;var gre=y(D(),1);var Sl=y(O(),1),hke=Gu("sessions.list"),gke=Gu("settings.list");function vre(){let e=cl(hke,{}).data,t=cl(gke,{scope:"user"}).data,{setColorScheme:r}=yd(),n=_d("light")==="dark",o=(0,gre.useMemo)(()=>{let i=Ku(sl).filter(c=>c.view).map(c=>{let d=sl.find(m=>m.children?.includes(c))?.label,u=Yk[d??c.label]??On,f=d?d+" \xB7 "+c.label:c.label;return{id:"view:"+c.view,label:f,description:"Go to "+f,leftSection:(0,Sl.jsx)(u,{size:18,stroke:1.6}),onClick:()=>Er(Io(c.view))}}),a=[{id:"new-session",label:"New session",description:"Start an agent in a project of the sandbox",leftSection:(0,Sl.jsx)(ll,{size:18}),onClick:()=>Er(Io("agents"))},{id:"scheme",label:n?"Light mode":"Dark mode",description:"Switch the colours of this page",leftSection:(0,Sl.jsx)(pb,{size:18}),onClick:()=>r(n?"light":"dark")}],s=(e?.sessions??[]).filter(c=>c.phase==="running"&&c.canOpen).map(c=>({id:"session:"+c.id,label:c.harness+" \xB7 "+(c.projectName??c.cwd),description:"Open the terminal of session "+c.id,keywords:[c.id,c.cwd],leftSection:(0,Sl.jsx)(Ju,{name:c.harness,size:24}),rightSection:(0,Sl.jsx)(Ei,{size:16}),onClick:()=>Er("/s/"+c.id)})),l=(t?.rows??[]).map(c=>({id:"setting:"+c.id,label:c.label,description:c.id+(c.field.help?" \xB7 "+c.field.help:""),keywords:[c.id,c.category],leftSection:(0,Sl.jsx)(wz,{size:18,stroke:1.6}),onClick:()=>Er(Io("settings")+"#"+Jb(c.id))}));return[{group:"Pages",actions:i},{group:"Commands",actions:a},...s.length?[{group:"Sessions",actions:s}]:[],...l.length?[{group:"Settings",actions:l}]:[]]},[e,t,n,r]);return(0,Sl.jsx)(pn,{actions:o,shortcut:["mod + K","/"],limit:12,highlightQuery:!0,scrollable:!0,maxHeight:480,nothingFound:"Nothing matches",searchProps:{leftSection:(0,Sl.jsx)(On,{size:18}),placeholder:"Search pages, sessions and settings\u2026"}})}var xa=y(O(),1),vke=Gu("sandbox.status");function xke(e){let t=e.sandbox;if(e.shared?.limited)return{color:"gray",title:"Another user\u2019s sandbox",line:"Not shared",busy:!1};if(!t.running)return{color:"gray",title:"Stopped",line:"Start an agent to start it",busy:!1};let r=e.projects.reduce((i,a)=>i+a.sessions.length,0)+e.otherSessions.length,n=t.phase==="ready",o=t.startedAt?"up "+_o(t.startedAt).replace(" ago",""):"running";return{color:n?"green":"yellow",title:n?"Running":t.phase.charAt(0).toUpperCase()+t.phase.slice(1),line:o+" \xB7 "+r+(r===1?" agent":" agents"),busy:!n}}function xre(){let{data:e,error:t}=cl(vke,{}),r=e?xke(e):t?{color:"red",title:"Cannot reach the sandbox",line:"Is sandbox web still running?",busy:!1}:null;return(0,xa.jsx)(_t,{onClick:()=>Er(Io("sandbox")),p:"sm",w:"100%",style:{border:"1px solid var(--app-border)",borderRadius:"var(--mantine-radius-md)"},"aria-label":"Sandbox status",children:r?(0,xa.jsxs)(Se,{gap:"sm",wrap:"nowrap",children:[(0,xa.jsx)("span",{className:"status-dot"+(r.busy?" pulse":""),style:{"--dot":`var(--mantine-color-${r.color}-6)`}}),(0,xa.jsxs)(Fe,{gap:0,style:{minWidth:0},children:[(0,xa.jsx)(ue,{size:"sm",fw:600,truncate:!0,children:r.title}),(0,xa.jsx)(ue,{size:"xs",c:"dimmed",truncate:!0,children:r.line})]})]}):(0,xa.jsxs)(Fe,{gap:6,children:[(0,xa.jsx)(Pn,{h:12,w:"60%"}),(0,xa.jsx)(Pn,{h:10,w:"80%"})]})})}var ze=y(O(),1);function bre(){return(0,ze.jsxs)(Se,{gap:10,wrap:"nowrap",children:[(0,ze.jsx)("div",{className:"brand-mark",children:(0,ze.jsx)(dh,{size:17,stroke:2})}),(0,ze.jsxs)(F,{children:[(0,ze.jsx)(ue,{fw:700,size:"sm",lh:1.1,children:"Sandbox"}),(0,ze.jsx)(ue,{size:"xs",c:"dimmed",lh:1.1,children:"Development sandbox"})]})]})}function bke(){let{setColorScheme:e}=yd(),t=_d("light")==="dark";return(0,ze.jsx)(xt,{label:t?"Light mode":"Dark mode",children:(0,ze.jsx)(vt,{size:"lg","aria-label":"Switch dark or light",onClick:()=>e(t?"light":"dark"),children:t?(0,ze.jsx)(Xz,{size:18,stroke:1.6}):(0,ze.jsx)(pb,{size:18,stroke:1.6})})})}function yke(){return(0,ze.jsx)(_t,{onClick:()=>Il.open(),px:"sm",py:7,w:"100%",style:{border:"1px solid var(--app-border)",borderRadius:"var(--mantine-radius-md)",background:"var(--app-bg)"},"aria-label":"Search and commands",children:(0,ze.jsxs)(Se,{gap:8,wrap:"nowrap",children:[(0,ze.jsx)(On,{size:15,color:"var(--app-muted)"}),(0,ze.jsx)(ue,{size:"sm",c:"dimmed",style:{flex:1},children:"Search\u2026"}),(0,ze.jsx)("span",{className:"kbd-hint",children:"Ctrl K"})]})})}function _ke({active:e,onPick:t}){let r=sl.filter(i=>(i.view||i.children?.length)&&(i.view!=="access"||tY())),n=sl.filter(i=>!i.view&&!i.children?.length),o=(i,a=!1)=>{let s=Yk[i.label]??dh,l=a?void 0:(0,ze.jsx)(s,{size:17,stroke:1.7});if(i.children?.length)return(0,ze.jsx)(sa,{label:i.label,leftSection:l,childrenOffset:28,defaultOpened:YQ(i.children).includes(e),style:{borderRadius:"var(--mantine-radius-md)"},children:i.children.map(d=>o(d,!0))},i.label);let c=i.view;return(0,ze.jsx)(sa,{label:i.label,leftSection:l,active:c===e,href:Io(c),style:{borderRadius:"var(--mantine-radius-md)"},onClick:d=>{d.preventDefault(),t(),Er(Io(c))}},i.label)};return(0,ze.jsxs)(Fe,{gap:2,children:[(0,ze.jsx)("div",{className:"nav-group-label",children:"Workspace"}),r.map(i=>o(i)),n.length>0&&(0,ze.jsxs)(ze.Fragment,{children:[(0,ze.jsx)("div",{className:"nav-group-label",children:"In the terminal menu"}),(0,ze.jsxs)(ue,{size:"xs",c:"dimmed",px:12,lh:1.5,children:[n.map(i=>i.label).join(", "),": open"," ",(0,ze.jsx)(ue,{span:!0,ff:"monospace",size:"xs",children:"sandbox"})," ","in a terminal on this PC."]})]})]})}function fF({active:e,bare:t=!1,children:r}){let[n,{toggle:o,close:i}]=z2(!1);return(0,ze.jsxs)(Nr,{header:{height:{base:52,sm:0}},navbar:{width:240,breakpoint:"sm",collapsed:{mobile:!n}},padding:0,children:[(0,ze.jsx)(Nr.Header,{className:"app-header",hiddenFrom:"sm",children:(0,ze.jsxs)(Se,{h:"100%",px:"md",gap:"sm",justify:"space-between",children:[(0,ze.jsxs)(Se,{gap:"sm",children:[(0,ze.jsx)(cv,{opened:n,onClick:o,size:"sm","aria-label":"Navigation"}),(0,ze.jsx)(bre,{})]}),(0,ze.jsx)(vt,{size:"lg","aria-label":"Search",onClick:()=>Il.open(),children:(0,ze.jsx)(On,{size:18})})]})}),(0,ze.jsx)(Nr.Navbar,{className:"app-navbar","aria-label":"Main",children:(0,ze.jsxs)(F,{className:"app-navbar-sticky",children:[(0,ze.jsx)(Nr.Section,{p:"md",pb:"xs",visibleFrom:"sm",children:(0,ze.jsx)(bre,{})}),(0,ze.jsx)(Nr.Section,{px:"md",py:"xs",children:(0,ze.jsx)(xre,{})}),(0,ze.jsx)(Nr.Section,{px:"md",pb:"xs",visibleFrom:"sm",children:(0,ze.jsx)(yke,{})}),(0,ze.jsx)(Nr.Section,{grow:!0,component:zr,px:"xs",children:(0,ze.jsx)(_ke,{active:e,onPick:i})}),(0,ze.jsx)(Nr.Section,{p:"sm",style:{borderTop:"1px solid var(--app-border)"},children:(0,ze.jsxs)(Se,{justify:"space-between",children:[(0,ze.jsx)(ue,{size:"xs",c:"dimmed",pl:6,children:"Loopback only \xB7 signed in"}),(0,ze.jsx)(bke,{})]})})]})}),(0,ze.jsx)(Nr.Main,{className:"app-main",style:t?{display:"flex",height:"100dvh",paddingBottom:0}:void 0,children:t?r:(0,ze.jsx)("div",{className:"app-content",children:r})}),(0,ze.jsx)(vre,{})]})}var id=y(O(),1);function Ike(e){let t=/^#k=([0-9a-f]{64})$/.exec(e);return t?t[1]:null}function wke(e){let t=/^#w=([0-9a-f]{64})$/.exec(e);return t?t[1]:null}async function yre(){let e=Ike(location.hash),t=wke(location.hash);if(e||t){history.replaceState(null,"",location.pathname+location.search);try{e?await lh.login(e):t&&await lh.loginOnce(t)}catch{return"out"}}try{return eY((await lh.me()).access),"in"}catch{return"out"}}function _re(){let[e,t]=(0,QC.useState)("checking"),r=aY();return(0,QC.useEffect)(()=>{yre().then(t)},[]),e==="checking"?(0,id.jsx)(Vs,{h:"100dvh",children:(0,id.jsx)(ho,{})}):e==="out"?(0,id.jsx)(iY,{onSignedIn:()=>{yre().then(t)}}):r.page==="terminal"?(0,id.jsx)(fF,{active:"sessions",bare:!0,children:(0,id.jsx)(jte,{id:r.id})}):(0,id.jsx)(fF,{active:r.view,children:(0,id.jsx)(ere,{view:r.view,params:r.params})})}var Ire=[500,1e3,2e3,4e3,8e3],Ske=6e4,YC=class{constructor(){$t(this,"socket",null);$t(this,"attempt",0);$t(this,"next",1);$t(this,"queue",[]);$t(this,"calls",new Map);$t(this,"subscriptions",new Map);$t(this,"shared",new Map);$t(this,"listeners",new Set);$t(this,"hidden",!1);$t(this,"releaseTimer")}setHidden(t){if(t!==this.hidden){if(this.hidden=t,window.clearTimeout(this.releaseTimer),t){if(this.socket?.readyState===WebSocket.OPEN)for(let r of this.subscriptions.keys())this.send({t:"unsubscribe",id:r});this.releaseTimer=window.setTimeout(()=>{this.hidden&&this.calls.size===0&&this.release()},Ske);return}if(this.socket?.readyState===WebSocket.OPEN)for(let[r,n]of this.subscriptions)this.send({t:"subscribe",id:r,query:n.query,input:n.input});else this.subscriptions.size&&this.connect()}}release(){let t=this.socket;this.socket=null,t?.close(1e3),this.listeners.forEach(r=>r(!1))}onConnection(t){return this.listeners.add(t),()=>this.listeners.delete(t)}connect(){if(this.socket)return this.socket;let t=location.protocol==="https:"?"wss:":"ws:",r=new WebSocket(t+"//"+location.host+"/api/rpc");return this.socket=r,r.onopen=()=>{if(this.attempt=0,this.listeners.forEach(n=>n(!0)),!this.hidden)for(let[n,o]of this.subscriptions)this.send({t:"subscribe",id:n,query:o.query,input:o.input});for(let n of this.queue.splice(0))r.send(n)},r.onmessage=n=>{if(typeof n.data!="string")return;let o;try{o=JSON.parse(n.data)}catch{return}let i=tQ.safeParse(o);i.success&&this.receive(i.data)},r.onclose=()=>{if(this.socket!==r)return;this.socket=null,this.listeners.forEach(o=>o(!1));for(let o of this.calls.values())o.reject(new Error("The connection to the sandbox web server dropped."));this.calls.clear();let n=Ire[Math.min(this.attempt++,Ire.length-1)];this.subscriptions.size&&!this.hidden&&window.setTimeout(()=>this.connect(),n)},r}send(t){let r=JSON.stringify(t),n=this.connect();n.readyState===WebSocket.OPEN?n.send(r):this.queue.push(r)}async receive(t){let r=this.subscriptions.get(t.id);if(r){t.t==="data"&&r.data(t.output),t.t==="error"&&r.error(jO(t.error));return}let n=this.calls.get(t.id);if(n)switch(t.t){case"progress":n.handlers.progress?.(t.text);return;case"log":n.handlers.log?.(t.text,t.tone);return;case"ask":{let o=await n.handlers.ask(t.question);this.send({t:"answer",id:t.id,value:o});return}case"result":this.calls.delete(t.id),n.resolve(t.output);return;case"error":this.calls.delete(t.id),n.reject(jO(t.error));return}}call(t,r,n){let o="c"+this.next++;return new Promise((i,a)=>{this.calls.set(o,{handlers:n,resolve:i,reject:a}),this.send({t:"call",id:o,op:t,input:r})})}subscribe(t,r,n,o){let i=t+"\0"+JSON.stringify(r??null),a=this.shared.get(i);if(a)a.last&&n(a.last.output);else{let c={id:"s"+this.next++,listeners:new Set,last:void 0};if(a=c,this.shared.set(i,c),this.subscriptions.set(c.id,{query:t,input:r,data:d=>{c.last={output:d};for(let u of[...c.listeners])u.data(d)},error:d=>{c.last=void 0;for(let u of[...c.listeners])u.error(d)}}),!this.hidden){let d=this.connect();d.readyState===WebSocket.OPEN&&d.send(JSON.stringify({t:"subscribe",id:c.id,query:t,input:r}))}}let s={data:n,error:o},l=a;return l.listeners.add(s),()=>{l.listeners.delete(s),!l.listeners.size&&(this.shared.delete(i),this.subscriptions.delete(l.id),this.socket?.readyState===WebSocket.OPEN&&this.send({t:"unsubscribe",id:l.id}))}}};var kke=["#e6e8ee","#c4c8d2","#9aa0ad","#6c7383","#4a5060","#30343f","#22252e","#1a1d24","#14161c","#0e1015"],wre={primaryColor:"indigo",primaryShade:{light:6,dark:5},colors:{dark:kke},fontFamily:'"Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif',fontFamilyMonospace:'"Cascadia Mono", "Cascadia Code", Consolas, ui-monospace, "SF Mono", Menlo, monospace',fontSizes:{xs:"0.75rem",sm:"0.8125rem",md:"0.875rem",lg:"1rem",xl:"1.125rem"},lineHeights:{xs:"1.45",sm:"1.5",md:"1.55",lg:"1.55",xl:"1.5"},headings:{fontFamily:'"Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, sans-serif',fontWeight:"650",sizes:{h1:{fontSize:"1.375rem",lineHeight:"1.3"},h2:{fontSize:"1.125rem",lineHeight:"1.35"},h3:{fontSize:"0.9375rem",lineHeight:"1.4"}}},radius:{xs:"4px",sm:"6px",md:"8px",lg:"10px",xl:"14px"},defaultRadius:"md",cursorType:"pointer",focusRing:"auto",components:{Card:gr.extend({defaultProps:{withBorder:!0,radius:"lg",padding:"md",shadow:"none"}}),Paper:oa.extend({defaultProps:{radius:"lg"}}),Button:st.extend({defaultProps:{radius:"md",size:"sm"}}),ActionIcon:vt.extend({defaultProps:{variant:"subtle",color:"gray",radius:"md"}}),Badge:kn.extend({defaultProps:{radius:"sm",variant:"light",tt:"none",fw:600}}),Tooltip:xt.extend({defaultProps:{withArrow:!0,openDelay:300,multiline:!0,maw:320}}),Modal:vo.extend({defaultProps:{radius:"lg",centered:!0,padding:"lg",overlayProps:{blur:2,backgroundOpacity:.45},styles:{title:{fontWeight:650,fontSize:"var(--mantine-font-size-md)"}}}}),Menu:Jr.extend({defaultProps:{radius:"md",shadow:"md",withinPortal:!0}}),NavLink:sa.extend({defaultProps:{variant:"light"}}),Notification:ru.extend({defaultProps:{radius:"md",withBorder:!0}}),SegmentedControl:au.extend({defaultProps:{radius:"md"}}),Select:la.extend({defaultProps:{allowDeselect:!1,checkIconPosition:"right"}}),Switch:Ga.extend({defaultProps:{size:"sm"}}),TextInput:Pt.extend({defaultProps:{spellCheck:!1}})}};var ad=y(O(),1),Cke=new pT({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!1}}}),JC=new YC;document.addEventListener("visibilitychange",()=>JC.setHidden(document.hidden));window.addEventListener("pagehide",()=>JC.release());window.addEventListener("pageshow",e=>{e.persisted&&JC.setHidden(!1)});var Sre=document.getElementById("root");Sre&&(0,kre.createRoot)(Sre).render((0,ad.jsx)(Fy,{theme:wre,defaultColorScheme:"auto",children:(0,ad.jsx)(XR,{client:Cke,children:(0,ad.jsx)(uY,{client:JC,children:(0,ad.jsxs)(BR,{children:[(0,ad.jsx)(ca,{position:"bottom-right",limit:4}),(0,ad.jsx)(_re,{})]})})})}));
|