1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5864],{27130:function(e,t,n){n.d(t,{Ry:function(){return u}});var r=new WeakMap,i=new WeakMap,o={},l=0,a=function(e){return e&&(e.host||a(e.parentNode))},s=function(e,t,n,s){var u=(Array.isArray(e)?e:[e]).map(function(e){if(t.contains(e))return e;var n=a(e);return n&&t.contains(n)?n:(console.error("aria-hidden",e,"in not contained inside",t,". Doing nothing"),null)}).filter(function(e){return!!e});o[n]||(o[n]=new WeakMap);var d=o[n],c=[],f=new Set,p=new Set(u),g=function(e){!e||f.has(e)||(f.add(e),g(e.parentNode))};u.forEach(g);var m=function(e){!e||p.has(e)||Array.prototype.forEach.call(e.children,function(e){if(f.has(e))m(e);else try{var t=e.getAttribute(s),o=null!==t&&"false"!==t,l=(r.get(e)||0)+1,a=(d.get(e)||0)+1;r.set(e,l),d.set(e,a),c.push(e),1===l&&o&&i.set(e,!0),1===a&&e.setAttribute(n,"true"),o||e.setAttribute(s,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}})};return m(t),f.clear(),l++,function(){c.forEach(function(e){var t=r.get(e)-1,o=d.get(e)-1;r.set(e,t),d.set(e,o),t||(i.has(e)||e.removeAttribute(s),i.delete(e)),o||e.removeAttribute(n)}),--l||(r=new WeakMap,r=new WeakMap,i=new WeakMap,o={})}},u=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||("undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),s(r,i,n,"aria-hidden")):function(){return null}}},2389:function(e,t,n){n.d(t,{Z:function(){return s}});var r=n(7653);let i=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),o=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter((e,t,n)=>!!e&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim()};var l={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"};let a=(0,r.forwardRef)((e,t)=>{let{color:n="currentColor",size:i=24,strokeWidth:a=2,absoluteStrokeWidth:s,className:u="",children:d,iconNode:c,...f}=e;return(0,r.createElement)("svg",{ref:t,...l,width:i,height:i,stroke:n,strokeWidth:s?24*Number(a)/Number(i):a,className:o("lucide",u),...f},[...c.map(e=>{let[t,n]=e;return(0,r.createElement)(t,n)}),...Array.isArray(d)?d:[d]])}),s=(e,t)=>{let n=(0,r.forwardRef)((n,l)=>{let{className:s,...u}=n;return(0,r.createElement)(a,{ref:l,iconNode:t,className:o("lucide-".concat(i(e)),s),...u})});return n.displayName="".concat(e),n}},87354:function(e,t,n){n.d(t,{Z:function(){return r}});let r=(0,n(2389).Z)("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},38983:function(e,t,n){n.d(t,{Z:function(){return r}});let r=(0,n(2389).Z)("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]])},95731:function(e,t,n){n.d(t,{Z:function(){return r}});let r=(0,n(2389).Z)("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]])},10269:function(e,t,n){n.d(t,{Z:function(){return r}});let r=(0,n(2389).Z)("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},81695:function(e,t,n){n.r(t);var r=n(21219),i={};for(var o in r)"default"!==o&&(i[o]=(function(e){return r[e]}).bind(0,o));n.d(t,i)},55571:function(e,t,n){n.d(t,{Z:function(){return K}});var r,i,o,l,a,s,u,d=n(83780),c=n(7653),f="right-scroll-bar-position",p="width-before-scroll-bar";function g(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var m="undefined"!=typeof window?c.useLayoutEffect:c.useEffect,h=new WeakMap,v=(void 0===r&&(r={}),(void 0===i&&(i=function(e){return e}),o=[],l=!1,a={read:function(){if(l)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return o.length?o[o.length-1]:null},useMedium:function(e){var t=i(e,l);return o.push(t),function(){o=o.filter(function(e){return e!==t})}},assignSyncMedium:function(e){for(l=!0;o.length;){var t=o;o=[],t.forEach(e)}o={push:function(t){return e(t)},filter:function(){return o}}},assignMedium:function(e){l=!0;var t=[];if(o.length){var n=o;
1o=[],n.forEach(e),t=o}var r=function(){var n=t;t=[],n.forEach(e)},i=function(){return Promise.resolve().then(r)};i(),o={push:function(e){t.push(e),i()},filter:function(e){return t=t.filter(e),o}}}}).options=(0,d.pi)({async:!0,ssr:!1},r),a),y=function(){},b=c.forwardRef(function(e,t){var n,r,i,o,l=c.useRef(null),a=c.useState({onScrollCapture:y,onWheelCapture:y,onTouchMoveCapture:y}),s=a[0],u=a[1],f=e.forwardProps,p=e.children,b=e.className,w=e.removeScrollBar,_=e.enabled,x=e.shards,C=e.sideCar,S=e.noRelative,R=e.noIsolation,E=e.inert,k=e.allowPinchZoom,A=e.as,F=e.gapMode,M=(0,d._T)(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),P=(n=[l,t],r=function(e){return n.forEach(function(t){return g(t,e)})},(i=(0,c.useState)(function(){return{value:null,callback:r,facade:{get current(){return i.value},set current(value){var e=i.value;e!==value&&(i.value=value,i.callback(value,e))}}}})[0]).callback=r,o=i.facade,m(function(){var e=h.get(o);if(e){var t=new Set(e),r=new Set(n),i=o.current;t.forEach(function(e){r.has(e)||g(e,null)}),r.forEach(function(e){t.has(e)||g(e,i)})}h.set(o,n)},[n]),o),O=(0,d.pi)((0,d.pi)({},M),s);return c.createElement(c.Fragment,null,_&&c.createElement(C,{sideCar:v,removeScrollBar:w,shards:x,noRelative:S,noIsolation:R,inert:E,setCallbacks:u,allowPinchZoom:!!k,lockRef:l,gapMode:F}),f?c.cloneElement(c.Children.only(p),(0,d.pi)((0,d.pi)({},O),{ref:P})):c.createElement(void 0===A?"div":A,(0,d.pi)({},O,{className:b,ref:P}),p))});b.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},b.classNames={fullWidth:p,zeroRight:f};var w=function(e){var t=e.sideCar,n=(0,d._T)(e,["sideCar"]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error("Sidecar medium not found");return c.createElement(r,(0,d.pi)({},n))};w.isSideCarExport=!0;var _=function(){var e=0,t=null;return{add:function(r){if(0==e&&(t=function(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=u||n.nc;return t&&e.setAttribute("nonce",t),e}())){var i,o;(i=t).styleSheet?i.styleSheet.cssText=r:i.appendChild(document.createTextNode(r)),o=t,(document.head||document.getElementsByTagName("head")[0]).appendChild(o)}e++},remove:function(){--e||!t||(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},x=function(){var e=_();return function(t,n){c.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},C=function(){var e=x();return function(t){return e(t.styles,t.dynamic),null}},S={left:0,top:0,right:0,gap:0},R=function(e){return parseInt(e||"",10)||0},E=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],i=t["padding"===e?"paddingRight":"marginRight"];return[R(n),R(r),R(i)]},k=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return S;var t=E(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},A=C(),F="data-scroll-locked",M=function(e,t,n,r){var i=e.left,o=e.top,l=e.right,a=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(a,"px ").concat(r,";\n }\n body[").concat(F,"] {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(i,"px;\n padding-top: ").concat(o,"px;\n padding-right: ").concat(l,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(a,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(f," {\n right: ").concat(a,"px ").concat(r,";\n }\n \n .").concat(p," {\n margin-right: ").concat(a,"px ").concat(r,";\n }\n \n .").concat(f," .").concat(f," {\n right: 0 ").concat(r,";\n }\n \n .").concat(p," .").concat(p," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(F,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(a,"px;\n }\n")},P=function(){var e=parseInt(document.body.getAttribute(F)||"0",10);return isFinite(e)?e:0},O=function(){c.useEffect(function(){return document.body.setAttribute(F,(P()+1).toString()),function(){var e=P()-1;e<=0?document.body.removeAttribute(F):document.body.setAttribute(F,e.toString())}},[])},V=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=void 0===r?"margin":r;O();var o=c.useMemo(function(){return k(i)},[i]);return c.createElement(A,{styles:M(o,!t,i,n?"":"!important")})},T=!1;if("undefined"!=typeof window)try{var I=Object.defineProperty({},"passive",{get:function(){return T=!0,!0}});window.addEventListener("test",I,I),window.removeEventListener("test",I,I)}catch(e){T=!1}var D=!!T&&{passive:!1},N=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&"TEXTAREA"!==e.tagName&&"visible"===n[t])},j=function(e,t){var n=t.ownerDocument,r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),L(e,r)){var i=Z(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},L=function(e,t){return"v"===e?N(t,"overflowY"):N(t,"overflowX")},Z=function(e,t){return"v"===e?[t.scrollTop,t.scrollHeight,t.clientHeight]:[t.scrollLeft,t.scrollWidth,t.clientWidth]},z=function(e,t,n,r,i){var o,l=(o=window.getComputedStyle(t).direction,"h"===e&&"rtl"===o?-1:1),a=l*r,s=n.target,u=t.contains(s),d=!1,c=a>0,f=0,p=0;
1do{if(!s)break;var g=Z(e,s),m=g[0],h=g[1]-g[2]-l*m;(m||h)&&L(e,s)&&(f+=h,p+=m);var v=s.parentNode;s=v&&v.nodeType===Node.DOCUMENT_FRAGMENT_NODE?v.host:v}while(!u&&s!==document.body||u&&(t.contains(s)||t===s));return c&&(i&&1>Math.abs(f)||!i&&a>f)?d=!0:!c&&(i&&1>Math.abs(p)||!i&&-a>p)&&(d=!0),d},W=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},H=function(e){return[e.deltaX,e.deltaY]},B=function(e){return e&&"current"in e?e.current:e},U=0,$=[],G=(s=function(e){var t=c.useRef([]),n=c.useRef([0,0]),r=c.useRef(),i=c.useState(U++)[0],o=c.useState(C)[0],l=c.useRef(e);c.useEffect(function(){l.current=e},[e]),c.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var t=(0,d.ev)([e.lockRef.current],(e.shards||[]).map(B),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var a=c.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!l.current.allowPinchZoom;var i,o=W(e),a=n.current,s="deltaX"in e?e.deltaX:a[0]-o[0],u="deltaY"in e?e.deltaY:a[1]-o[1],d=e.target,c=Math.abs(s)>Math.abs(u)?"h":"v";if("touches"in e&&"h"===c&&"range"===d.type)return!1;var f=j(c,d);if(!f)return!0;if(f?i=c:(i="v"===c?"h":"v",f=j(c,d)),!f)return!1;if(!r.current&&"changedTouches"in e&&(s||u)&&(r.current=i),!i)return!0;var p=r.current||i;return z(p,t,e,"h"===p?s:u,!0)},[]),s=c.useCallback(function(e){if($.length&&$[$.length-1]===o){var n="deltaY"in e?H(e):W(e),r=t.current.filter(function(t){var r;return t.name===e.type&&(t.target===e.target||e.target===t.shadowParent)&&(r=t.delta)[0]===n[0]&&r[1]===n[1]})[0];if(r&&r.should){e.cancelable&&e.preventDefault();return}if(!r){var i=(l.current.shards||[]).map(B).filter(Boolean).filter(function(t){return t.contains(e.target)});(i.length>0?a(e,i[0]):!l.current.noIsolation)&&e.cancelable&&e.preventDefault()}}},[]),u=c.useCallback(function(e,n,r,i){var o={name:e,delta:n,target:r,should:i,shadowParent:function(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}(r)};t.current.push(o),setTimeout(function(){t.current=t.current.filter(function(e){return e!==o})},1)},[]),f=c.useCallback(function(e){n.current=W(e),r.current=void 0},[]),p=c.useCallback(function(t){u(t.type,H(t),t.target,a(t,e.lockRef.current))},[]),g=c.useCallback(function(t){u(t.type,W(t),t.target,a(t,e.lockRef.current))},[]);c.useEffect(function(){return $.push(o),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:g}),document.addEventListener("wheel",s,D),document.addEventListener("touchmove",s,D),document.addEventListener("touchstart",f,D),function(){$=$.filter(function(e){return e!==o}),document.removeEventListener("wheel",s,D),document.removeEventListener("touchmove",s,D),document.removeEventListener("touchstart",f,D)}},[]);var m=e.removeScrollBar,h=e.inert;return c.createElement(c.Fragment,null,h?c.createElement(o,{styles:"\n .block-interactivity-".concat(i," {pointer-events: none;}\n .allow-interactivity-").concat(i," {pointer-events: all;}\n")}):null,m?c.createElement(V,{noRelative:e.noRelative,gapMode:e.gapMode}):null)},v.useMedium(s),w),q=c.forwardRef(function(e,t){return c.createElement(b,(0,d.pi)({},e,{ref:t,sideCar:G}))});q.classNames=b.classNames;var K=q},53394:function(e,t,n){n.d(t,{Z:function(){return u}});var r=n(7653),i={cm:!0,mm:!0,in:!0,px:!0,pt:!0,pc:!0,em:!0,ex:!0,ch:!0,rem:!0,vw:!0,vh:!0,vmin:!0,vmax:!0,"%":!0};function o(e){var t=function(e){if("number"==typeof e)return{value:e,unit:"px"};var t,n=(e.match(/^[0-9.]*/)||"").toString();t=n.includes(".")?parseFloat(n):parseInt(n,10);var r=(e.match(/[^0-9]*$/)||"").toString();return i[r]?{value:t,unit:r}:(console.warn("React Spinners: ".concat(e," is not a valid css value. Defaulting to ").concat(t,"px.")),{value:t,unit:"px"})}(e);return"".concat(t.value).concat(t.unit)}var l=function(){return(l=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},a=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)0>t.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},s=function(e,t,n){var r="react-spinners-".concat(e,"-").concat(n);if("undefined"==typeof window||!window.document)return r;var i=document.createElement("style");document.head.appendChild(i);var o=i.sheet,l="\n @keyframes ".concat(r," {\n ").concat(t,"\n }\n ");return o&&o.insertRule(l,0),r}("ClipLoader","0% {transform: rotate(0deg) scale(1)} 50% {transform: rotate(180deg) scale(0.8)} 100% {transform: rotate(360deg) scale(1)}
1","clip"),u=function(e){var t=e.loading,n=e.color,i=void 0===n?"#000000":n,u=e.speedMultiplier,d=e.cssOverride,c=e.size,f=void 0===c?35:c,p=a(e,["loading","color","speedMultiplier","cssOverride","size"]),g=l({background:"transparent !important",width:o(f),height:o(f),borderRadius:"100%",border:"2px solid",borderTopColor:i,borderBottomColor:"transparent",borderLeftColor:i,borderRightColor:i,display:"inline-block",animation:"".concat(s," ").concat(.75/(void 0===u?1:u),"s 0s infinite linear"),animationFillMode:"both"},void 0===d?{}:d);return void 0===t||t?r.createElement("span",l({style:g},p)):null}},27962:function(e,t,n){var r=n(7653),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=r.useState,l=r.useEffect,a=r.useLayoutEffect,s=r.useDebugValue;function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch(e){return!0}}var d="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=o({inst:{value:n,getSnapshot:t}}),i=r[0].inst,d=r[1];return a(function(){i.value=n,i.getSnapshot=t,u(i)&&d({inst:i})},[e,n,t]),l(function(){return u(i)&&d({inst:i}),e(function(){u(i)&&d({inst:i})})},[e]),s(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:d},96250:function(e,t,n){e.exports=n(27962)},75184:function(e,t,n){n.d(t,{x7:function(){return ef},Me:function(){return el},oo:function(){return eg},RR:function(){return eu},Cp:function(){return ec},dr:function(){return ep},cv:function(){return ea},uY:function(){return es},dp:function(){return ed}});let r=["top","right","bottom","left"],i=Math.min,o=Math.max,l=Math.round,a=Math.floor,s=e=>({x:e,y:e}),u={left:"right",right:"left",bottom:"top",top:"bottom"},d={start:"end",end:"start"};function c(e,t){return"function"==typeof e?e(t):e}function f(e){return e.split("-")[0]}function p(e){return e.split("-")[1]}function g(e){return"x"===e?"y":"x"}function m(e){return"y"===e?"height":"width"}function h(e){return["top","bottom"].includes(f(e))?"y":"x"}function v(e){return e.replace(/start|end/g,e=>d[e])}function y(e){return e.replace(/left|right|bottom|top/g,e=>u[e])}function b(e){return"number"!=typeof e?{top:0,right:0,bottom:0,left:0,...e}:{top:e,right:e,bottom:e,left:e}}function w(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function _(e,t,n){let r,{reference:i,floating:o}=e,l=h(t),a=g(h(t)),s=m(a),u=f(t),d="y"===l,c=i.x+i.width/2-o.width/2,v=i.y+i.height/2-o.height/2,y=i[s]/2-o[s]/2;switch(u){case"top":r={x:c,y:i.y-o.height};break;case"bottom":r={x:c,y:i.y+i.height};break;case"right":r={x:i.x+i.width,y:v};break;case"left":r={x:i.x-o.width,y:v};break;default:r={x:i.x,y:i.y}}switch(p(t)){case"start":r[a]-=y*(n&&d?-1:1);break;case"end":r[a]+=y*(n&&d?-1:1)}return r}let x=async(e,t,n)=>{let{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:l}=n,a=o.filter(Boolean),s=await (null==l.isRTL?void 0:l.isRTL(t)),u=await l.getElementRects({reference:e,floating:t,strategy:i}),{x:d,y:c}=_(u,r,s),f=r,p={},g=0;for(let n=0;n<a.length;n++){let{name:o,fn:m}=a[n],{x:h,y:v,data:y,reset:b}=await m({x:d,y:c,initialPlacement:r,placement:f,strategy:i,middlewareData:p,rects:u,platform:l,elements:{reference:e,floating:t}});d=null!=h?h:d,c=null!=v?v:c,p={...p,[o]:{...p[o],...y}},b&&g<=50&&(g++,"object"==typeof b&&(b.placement&&(f=b.placement),b.rects&&(u=!0===b.rects?await l.getElementRects({reference:e,floating:t,strategy:i}):b.rects),{x:d,y:c}=_(u,f,s)),n=-1)}return{x:d,y:c,placement:f,strategy:i,middlewareData:p}};async function C(e,t){var n;void 0===t&&(t={});let{x:r,y:i,platform:o,rects:l,elements:a,strategy:s}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:p=!1,padding:g=0}=c(t,e),m=b(g),h=a[p?"floating"===f?"reference":"floating":f],v=w(await o.getClippingRect({element:null==(n=await (null==o.isElement?void 0:o.isElement(h)))||n?h:h.contextElement||await (null==o.getDocumentElement?void 0:o.getDocumentElement(a.floating)),boundary:u,rootBoundary:d,strategy:s})),y="floating"===f?{x:r,y:i,width:l.floating.width,height:l.floating.height}:l.reference,_=await (null==o.getOffsetParent?void 0:o.getOffsetParent(a.floating)),x=await (null==o.isElement?void 0:o.isElement(_))&&await (null==o.getScale?void 0:o.getScale(_))||{x:1,y:1},C=w(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:_,strategy:s}):y);return{top:(v.top-C.top+m.top)/x.y,bottom:(C.bottom-v.bottom+m.bottom)/x.y,left:(v.left-C.left+m.left)/x.x,right:(C.right-v.right+m.right)/x.x}}function S(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function R(e){return r.some(t=>e[t]>=0)}async function E(e,t){let{placement:n,platform:r,elements:i}=e,o=await (null==r.isRTL?void 0:r.isRTL(i.floating)),l=f(n),a=p(n),s="y"===h(n),u=["left","top"].includes(l)?-1:1,d=o&&s?-1:1,g=c(t,e),{mainAxis:m,crossAxis:v,alignmentAxis:y}="number"==typeof g?{mainAxis:g,crossAxis:0,alignmentAxis:null}
1:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return a&&"number"==typeof y&&(v="end"===a?-1*y:y),s?{x:v*d,y:m*u}:{x:m*u,y:v*d}}function k(){return"undefined"!=typeof window}function A(e){return P(e)?(e.nodeName||"").toLowerCase():"#document"}function F(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function M(e){var t;return null==(t=(P(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function P(e){return!!k()&&(e instanceof Node||e instanceof F(e).Node)}function O(e){return!!k()&&(e instanceof Element||e instanceof F(e).Element)}function V(e){return!!k()&&(e instanceof HTMLElement||e instanceof F(e).HTMLElement)}function T(e){return!!k()&&"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof F(e).ShadowRoot)}function I(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Z(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function D(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch(e){return!1}})}function N(e){let t=j(),n=O(e)?Z(e):e;return["transform","translate","scale","rotate","perspective"].some(e=>!!n[e]&&"none"!==n[e])||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","translate","scale","rotate","perspective","filter"].some(e=>(n.willChange||"").includes(e))||["paint","layout","strict","content"].some(e=>(n.contain||"").includes(e))}function j(){return"undefined"!=typeof CSS&&!!CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")}function L(e){return["html","body","#document"].includes(A(e))}function Z(e){return F(e).getComputedStyle(e)}function z(e){return O(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function W(e){if("html"===A(e))return e;let t=e.assignedSlot||e.parentNode||T(e)&&e.host||M(e);return T(t)?t.host:t}function H(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);let i=function e(t){let n=W(t);return L(n)?t.ownerDocument?t.ownerDocument.body:t.body:V(n)&&I(n)?n:e(n)}(e),o=i===(null==(r=e.ownerDocument)?void 0:r.body),l=F(i);if(o){let e=B(l);return t.concat(l,l.visualViewport||[],I(i)?i:[],e&&n?H(e):[])}return t.concat(i,H(i,[],n))}function B(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function U(e){let t=Z(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=V(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,s=l(n)!==o||l(r)!==a;return s&&(n=o,r=a),{width:n,height:r,$:s}}function $(e){return O(e)?e:e.contextElement}function G(e){let t=$(e);if(!V(t))return s(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:o}=U(t),a=(o?l(n.width):n.width)/r,u=(o?l(n.height):n.height)/i;return a&&Number.isFinite(a)||(a=1),u&&Number.isFinite(u)||(u=1),{x:a,y:u}}let q=s(0);function K(e){let t=F(e);return j()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:q}function Y(e,t,n,r){var i;void 0===t&&(t=!1),void 0===n&&(n=!1);let o=e.getBoundingClientRect(),l=$(e),a=s(1);t&&(r?O(r)&&(a=G(r)):a=G(e));let u=(void 0===(i=n)&&(i=!1),r&&(!i||r===F(l))&&i)?K(l):s(0),d=(o.left+u.x)/a.x,c=(o.top+u.y)/a.y,f=o.width/a.x,p=o.height/a.y;if(l){let e=F(l),t=r&&O(r)?F(r):r,n=e,i=B(n);for(;i&&r&&t!==n;){let e=G(i),t=i.getBoundingClientRect(),r=Z(i),o=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,l=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;d*=e.x,c*=e.y,f*=e.x,p*=e.y,d+=o,c+=l,i=B(n=F(i))}}return w({width:f,height:p,x:d,y:c})}function X(e,t){let n=z(e).scrollLeft;return t?t.left+n:Y(M(e)).left+n}function J(e,t,n){void 0===n&&(n=!1);let r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-(n?0:X(e,r)),y:r.top+t.scrollTop}}function Q(e,t,n){let r;if("viewport"===t)r=function(e,t){let n=F(e),r=M(e),i=n.visualViewport,o=r.clientWidth,l=r.clientHeight,a=0,s=0;if(i){o=i.width,l=i.height;let e=j();(!e||e&&"fixed"===t)&&(a=i.offsetLeft,s=i.offsetTop)}return{width:o,height:l,x:a,y:s}}(e,n);else if("document"===t)r=function(e){let t=M(e),n=z(e),r=e.ownerDocument.body,i=o(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),l=o(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),a=-n.scrollLeft+X(e),s=-n.scrollTop;return"rtl"===Z(r).direction&&(a+=o(t.clientWidth,r.clientWidth)-i),{width:i,height:l,x:a,y:s}}(M(e));else if(O(t))r=function(e,t){let n=Y(e,!0,"fixed"===t),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=V(e)?G(e):s(1),l=e.clientWidth*o.x;return{width:l,height:e.clientHeight*o.y,x:i*o.x,y:r*o.y}}(t,n);else{let n=K(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return w(r)}function ee(e){return"static"===Z(e).position}function et(e,t){if(!V(e)||"fixed"===Z(e).position)return null;if(t)return t(e);let n=e.offsetParent;return M(e)===n&&(n=n.ownerDocument.body),n}function en(e,t){let n=F(e);if(D(e))return n;if(!V(e)){let t=W(e);for(;t&&!L(t);){if(O(t)&&!ee(t))return t;t=W(t)}return n}let r=et(e,t);for(;r&&["table","td","th"].includes(A(r))&&ee(r);)r=et(r,t);return r&&L(r)&&ee(r)&&!N(r)?n:r||function(e){let t=W(e);for(;V(t)&&!L(t);){if(N(t))return t;if(D(t))break;t=W(t)}return null}(e)||n}let er=async function(e){let t=this.getOffsetParent||en,n=this.getDimensions,r=await n(e.floating);return{reference:function(e,t,n){let r=V(t),i=M(t),o="fixed"===n,l=Y(e,!0,o,t),a={scrollLeft:0,scrollTop:0},u=s(0);if(r||!r&&!o){if(("body"!==A(t)||I(i))&&(a=z(t)),r){let e=Y(t,!0,o,t);u.x=e.x+t.clientLeft,u.y=e.y+t.clientTop}else i&&(u.x=X(i))}let d=!i||r||o?s(0):J(i,a);return{x:l.left+a.scrollLeft-u.x-d.x,y:l.top+a.scrollTop-u.y-d.y,width:l.width,height:l.height}}(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},ei={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,o="fixed"===i,l=M(r),a=!!t&&D(t.floating);if(r===l||a&&o)return n;let u={scrollLeft:0,scrollTop:0},d=s(1),c=s(0),f=V(r);if((f||!f&&!o)&&(("body"!==A(r)||I(l))&&(u=z(r)),V(r))){let e=Y(r);d=G(r),c.x=e.x+r.clientLeft,c.y=e.y+r.clientTop}let p=!l||f||o?s(0):J(l,u,!0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-u.scrollLeft*d.x+c.x+p.x,y:n.y*d.y-u.scrollTop*d.y+c.y+p.y}},getDocumentElement:M,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:l}=e,a=[..."clippingAncestors"===n?D(t)?[]:function(e,t){let n=t.get(e);if(n)return n;let r=H(e,[],!1).filter(e=>O(e)&&"body"!==A(e)),i=null,o="fixed"===Z(e).position,l=o?W(e):e;for(;O(l)&&!L(l);){let t=Z(l),n=N(l);n||"fixed"!==t.position||(i=null),(o?!n&&!i:!n&&"static"===t.position&&!!i&&["absolute","fixed"].includes(i.position)||I(l)&&!n&&function e(t,n){let r=W(t);return!(r===n||!O(r)||L(r))&&("fixed"===Z(r).position||e(r,n))}(e,l))?r=r.filter(e=>e!==l):i=t,l=W(l)}return t.set(e,r),r}(t,this._c):[].concat(n),r],s=a[0],u=a.reduce((e,n)=>{let r=Q(t,n,l);return e.top=o(r.top,e.top),e.right=i(r.right,e.right),e.bottom=i(r.bottom,e.bottom),e.left=o(r.left,e.left),e},Q(t,s,l));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}},getOffsetParent:en,getElementRects:er,getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:t,height:n}=U(e);return{width:t,height:n}},getScale:G,isElement:O,isRTL:function(e){return"rtl"===Z(e).direction}};function eo(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function el(e,t,n,r){let l;void 0===r&&(r={});let{ancestorScroll:s=!0,ancestorResize:u=!0,elementResize:d="function"==typeof ResizeObserver,layoutShift:c="function"==typeof IntersectionObserver,animationFrame:f=!1}=r,p=$(e),g=s||u?[...p?H(p):[],...H(t)]:[];
1g.forEach(e=>{s&&e.addEventListener("scroll",n,{passive:!0}),u&&e.addEventListener("resize",n)});let m=p&&c?function(e,t){let n,r=null,l=M(e);function s(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return!function u(d,c){void 0===d&&(d=!1),void 0===c&&(c=1),s();let f=e.getBoundingClientRect(),{left:p,top:g,width:m,height:h}=f;if(d||t(),!m||!h)return;let v=a(g),y=a(l.clientWidth-(p+m)),b={rootMargin:-v+"px "+-y+"px "+-a(l.clientHeight-(g+h))+"px "+-a(p)+"px",threshold:o(0,i(1,c))||1},w=!0;function _(t){let r=t[0].intersectionRatio;if(r!==c){if(!w)return u();r?u(!1,r):n=setTimeout(()=>{u(!1,1e-7)},1e3)}1!==r||eo(f,e.getBoundingClientRect())||u(),w=!1}try{r=new IntersectionObserver(_,{...b,root:l.ownerDocument})}catch(e){r=new IntersectionObserver(_,b)}r.observe(e)}(!0),s}(p,n):null,h=-1,v=null;d&&(v=new ResizeObserver(e=>{let[r]=e;r&&r.target===p&&v&&(v.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var e;null==(e=v)||e.observe(t)})),n()}),p&&!f&&v.observe(p),v.observe(t));let y=f?Y(e):null;return f&&function t(){let r=Y(e);y&&!eo(y,r)&&n(),y=r,l=requestAnimationFrame(t)}(),n(),()=>{var e;g.forEach(e=>{s&&e.removeEventListener("scroll",n),u&&e.removeEventListener("resize",n)}),null==m||m(),null==(e=v)||e.disconnect(),v=null,f&&cancelAnimationFrame(l)}}let ea=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;let{x:i,y:o,placement:l,middlewareData:a}=t,s=await E(t,e);return l===(null==(n=a.offset)?void 0:n.placement)&&null!=(r=a.arrow)&&r.alignmentOffset?{}:{x:i+s.x,y:o+s.y,data:{...s,placement:l}}}}},es=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){let{x:n,y:r,placement:l}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:u={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...d}=c(e,t),p={x:n,y:r},m=await C(t,d),v=h(f(l)),y=g(v),b=p[y],w=p[v];if(a){let e="y"===y?"top":"left",t="y"===y?"bottom":"right",n=b+m[e],r=b-m[t];b=o(n,i(b,r))}if(s){let e="y"===v?"top":"left",t="y"===v?"bottom":"right",n=w+m[e],r=w-m[t];w=o(n,i(w,r))}let _=u.fn({...t,[y]:b,[v]:w});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[y]:a,[v]:s}}}}}},eu=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r,i,o,l;let{placement:a,middlewareData:s,rects:u,initialPlacement:d,platform:b,elements:w}=t,{mainAxis:_=!0,crossAxis:x=!0,fallbackPlacements:S,fallbackStrategy:R="bestFit",fallbackAxisSideDirection:E="none",flipAlignment:k=!0,...A}=c(e,t);if(null!=(n=s.arrow)&&n.alignmentOffset)return{};let F=f(a),M=h(d),P=f(d)===d,O=await (null==b.isRTL?void 0:b.isRTL(w.floating)),V=S||(P||!k?[y(d)]:function(e){let t=y(e);return[v(e),t,v(t)]}(d)),T="none"!==E;!S&&T&&V.push(...function(e,t,n,r){let i=p(e),o=function(e,t,n){let r=["left","right"],i=["right","left"];switch(e){case"top":case"bottom":if(n)return t?i:r;return t?r:i;case"left":case"right":return t?["top","bottom"]:["bottom","top"];default:return[]}}(f(e),"start"===n,r);return i&&(o=o.map(e=>e+"-"+i),t&&(o=o.concat(o.map(v)))),o}(d,k,E,O));let I=[d,...V],D=await C(t,A),N=[],j=(null==(r=s.flip)?void 0:r.overflows)||[];if(_&&N.push(D[F]),x){let e=function(e,t,n){void 0===n&&(n=!1);let r=p(e),i=g(h(e)),o=m(i),l="x"===i?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[o]>t.floating[o]&&(l=y(l)),[l,y(l)]}(a,u,O);N.push(D[e[0]],D[e[1]])}if(j=[...j,{placement:a,overflows:N}],!N.every(e=>e<=0)){let e=((null==(i=s.flip)?void 0:i.index)||0)+1,t=I[e];if(t)return{data:{index:e,overflows:j},reset:{placement:t}};let n=null==(o=j.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:o.placement;if(!n)switch(R){case"bestFit":{let e=null==(l=j.filter(e=>{if(T){let t=h(e.placement);return t===M||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:l[0];e&&(n=e);break}case"initialPlacement":n=d}if(a!==n)return{reset:{placement:n}}}return{}}}},ed=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;let l,a;let{placement:s,rects:u,platform:d,elements:g}=t,{apply:m=()=>{},...v}=c(e,t),y=await C(t,v),b=f(s),w=p(s),_="y"===h(s),{width:x,height:S}=u.floating;"top"===b||"bottom"===b?(l=b,a=w===(await (null==d.isRTL?void 0:d.isRTL(g.floating))?"start":"end")?"left":"right"):(a=b,l="end"===w?"top":"bottom");let R=S-y.top-y.bottom,E=x-y.left-y.right,k=i(S-y[l],R),A=i(x-y[a],E),F=!t.middlewareData.shift,M=k,P=A;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(P=E),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(M=R),F&&!w){let e=o(y.left,0),t=o(y.right,0),n=o(y.top,0),r=o(y.bottom,0);_?P=x-2*(0!==e||0!==t?e+t:o(y.left,y.right)):M=S-2*(0!==n||0!==r?n+r:o(y.top,y.bottom))}await m({...t,availableWidth:P,availableHeight:M});let O=await d.getDimensions(g.floating);return x!==O.width||S!==O.height?{reset:{rects:!0}}:{}}}},ec=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){let{rects:n}=t,{strategy:r="referenceHidden",...i}=c(e,t);switch(r){case"referenceHidden":{let e=S(await C(t,{...i,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:R(e)}}}case"escaped":{let e=S(await C(t,{...i,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:R(e)}}}default:return{}}}}},ef=e=>({name:"arrow",options:e,async fn(t){let{x:n,y:r,placement:l,rects:a,platform:s,elements:u,middlewareData:d}=t,{element:f,padding:v=0}=c(e,t)||{};if(null==f)return{};let y=b(v),w={x:n,y:r},_=g(h(l)),x=m(_),C=await s.getDimensions(f),S="y"===_,R=S?"clientHeight":"clientWidth",E=a.reference[x]+a.reference[_]-w[_]-a.floating[x],k=w[_]-a.reference[_],A=await (null==s.getOffsetParent?void 0:s.getOffsetParent(f)),F=A?A[R]:0;F&&await (null==s.isElement?void 0:s.isElement(A))||(F=u.floating[R]||a.floating[x]);let M=F/2-C[x]/2-1,P=i(y[S?"top":"left"],M),O=i(y[S?"bottom":"right"],M),V=F-C[x]-O,T=F/2-C[x]/2+(E/2-k/2),I=o(P,i(T,V)),D=!d.arrow&&null!=p(l)&&T!==I&&a.reference[x]/2-(T<P?P:O)-C[x]/2<0,N=D?T<P?T-P:T-V:0;return{[_]:w[_]+N,data:{[_]:I,centerOffset:T-I-N,...D&&{alignmentOffset:N}},reset:D}}}),ep=function(e){return void 0===e&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:o,middlewareData:l}=t,{offset:a=0,mainAxis:s=!0,crossAxis:u=!0}=c(e,t),d={x:n,y:r},p=h(i),m=g(p),v=d[m],y=d[p],b=c(a,t),w="number"==typeof b?{mainAxis:b,crossAxis:0}:{mainAxis:0,crossAxis:0,...b};if(s){let e="y"===m?"height":"width",t=o.reference[m]-o.floating[e]+w.mainAxis,n=o.reference[m]+o.reference[e]-w.mainAxis;v<t?v=t:v>n&&(v=n)}if(u){var _,x;let e="y"===m?"width":"height",t=["top","left"].includes(f(i)),n=o.reference[p]-o.floating[e]+(t&&(null==(_=l.offset)?void 0:_[p])||0)+(t?0:w.crossAxis),r=o.reference[p]+o.reference[e]+(t?0:(null==(x=l.offset)?void 0:x[p])||0)-(t?w.crossAxis:0);y<n?y=n:y>r&&(y=r)}return{[m]:v,[p]:y}}}},eg=(e,t,n)=>{let r=new Map,i={platform:ei,...n},o={...i.platform,_c:r};return x(e,t,{...i,platform:o})}},24019:function(e,t,n){n.d(t,{Cp:function(){return y},RR:function(){return h},YF:function(){return c},cv:function(){return p},dp:function(){return v},dr:function(){return m},uY:function(){return g},x7:function(){return b}});var r=n(75184),i=n(7653),o=n(3458),l="undefined"!=typeof document?i.useLayoutEffect:i.useEffect;function a(e,t){let n,r,i;if(e===t)return!0;
1if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if((n=e.length)!==t.length)return!1;for(r=n;0!=r--;)if(!a(e[r],t[r]))return!1;return!0}if((n=(i=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!({}).hasOwnProperty.call(t,i[r]))return!1;for(r=n;0!=r--;){let n=i[r];if(("_owner"!==n||!e.$$typeof)&&!a(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function s(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function u(e,t){let n=s(e);return Math.round(t*n)/n}function d(e){let t=i.useRef(e);return l(()=>{t.current=e}),t}function c(e){void 0===e&&(e={});let{placement:t="bottom",strategy:n="absolute",middleware:c=[],platform:f,elements:{reference:p,floating:g}={},transform:m=!0,whileElementsMounted:h,open:v}=e,[y,b]=i.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[w,_]=i.useState(c);a(w,c)||_(c);let[x,C]=i.useState(null),[S,R]=i.useState(null),E=i.useCallback(e=>{e!==M.current&&(M.current=e,C(e))},[]),k=i.useCallback(e=>{e!==P.current&&(P.current=e,R(e))},[]),A=p||x,F=g||S,M=i.useRef(null),P=i.useRef(null),O=i.useRef(y),V=null!=h,T=d(h),I=d(f),D=d(v),N=i.useCallback(()=>{if(!M.current||!P.current)return;let e={placement:t,strategy:n,middleware:w};I.current&&(e.platform=I.current),(0,r.oo)(M.current,P.current,e).then(e=>{let t={...e,isPositioned:!1!==D.current};j.current&&!a(O.current,t)&&(O.current=t,o.flushSync(()=>{b(t)}))})},[w,t,n,I,D]);l(()=>{!1===v&&O.current.isPositioned&&(O.current.isPositioned=!1,b(e=>({...e,isPositioned:!1})))},[v]);let j=i.useRef(!1);l(()=>(j.current=!0,()=>{j.current=!1}),[]),l(()=>{if(A&&(M.current=A),F&&(P.current=F),A&&F){if(T.current)return T.current(A,F,N);N()}},[A,F,N,T,V]);let L=i.useMemo(()=>({reference:M,floating:P,setReference:E,setFloating:k}),[E,k]),Z=i.useMemo(()=>({reference:A,floating:F}),[A,F]),z=i.useMemo(()=>{let e={position:n,left:0,top:0};if(!Z.floating)return e;let t=u(Z.floating,y.x),r=u(Z.floating,y.y);return m?{...e,transform:"translate("+t+"px, "+r+"px)",...s(Z.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,m,Z.floating,y.x,y.y]);return i.useMemo(()=>({...y,update:N,refs:L,elements:Z,floatingStyles:z}),[y,N,L,Z,z])}let f=e=>({name:"arrow",options:e,fn(t){let{element:n,padding:i}="function"==typeof e?e(t):e;return n&&({}).hasOwnProperty.call(n,"current")?null!=n.current?(0,r.x7)({element:n.current,padding:i}).fn(t):{}:n?(0,r.x7)({element:n,padding:i}).fn(t):{}}}),p=(e,t)=>({...(0,r.cv)(e),options:[e,t]}),g=(e,t)=>({...(0,r.uY)(e),options:[e,t]}),m=(e,t)=>({...(0,r.dr)(e),options:[e,t]}),h=(e,t)=>({...(0,r.RR)(e),options:[e,t]}),v=(e,t)=>
1({...(0,r.dp)(e),options:[e,t]}),y=(e,t)=>({...(0,r.Cp)(e),options:[e,t]}),b=(e,t)=>({...f(e),options:[e,t]})},18113:function(e,t,n){n.d(t,{F:function(){return u}});var r=n(93351);let i=(e,t,n)=>{if(e&&"reportValidity"in e){let i=(0,r.U2)(n,t);e.setCustomValidity(i&&i.message||""),e.reportValidity()}},o=(e,t)=>{for(let n in t.fields){let r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?i(r.ref,n,e):r.refs&&r.refs.forEach(t=>i(t,n,e))}},l=(e,t)=>{t.shouldUseNativeValidation&&o(e,t);let n={};for(let i in e){let o=(0,r.U2)(t.fields,i),l=Object.assign(e[i]||{},{ref:o&&o.ref});if(a(t.names||Object.keys(e),i)){let e=Object.assign({},(0,r.U2)(n,i));(0,r.t8)(e,"root",l),(0,r.t8)(n,i,e)}else(0,r.t8)(n,i,l)}return n},a=(e,t)=>e.some(e=>e.startsWith(t+"."));var s=function(e,t){for(var n={};e.length;){var i=e[0],o=i.code,l=i.message,a=i.path.join(".");if(!n[a]){if("unionErrors"in i){var s=i.unionErrors[0].errors[0];n[a]={message:s.message,type:s.code}}else n[a]={message:l,type:o}}if("unionErrors"in i&&i.unionErrors.forEach(function(t){return t.errors.forEach(function(t){return e.push(t)})}),t){var u=n[a].types,d=u&&u[i.code];n[a]=(0,r.KN)(a,t,n,o,d?[].concat(d,i.message):i.message)}e.shift()}return n},u=function(e,t,n){return void 0===n&&(n={}),function(r,i,a){try{return Promise.resolve(function(i,l){try{var s=Promise.resolve(e["sync"===n.mode?"parse":"parseAsync"](r,t)).then(function(e){return a.shouldUseNativeValidation&&o({},a),{errors:{},values:n.raw?r:e}})}catch(e){return l(e)}return s&&s.then?s.then(void 0,l):s}(0,function(e){if(Array.isArray(null==e?void 0:e.errors))return{values:{},errors:l(s(e.errors,!a.shouldUseNativeValidation&&"all"===a.criteriaMode),a)};throw e}))}catch(e){return Promise.reject(e)}}}},46196:function(e,t,n){n.d(t,{M:function(){return r}});function r(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),!1===n||!r.defaultPrevented)return t?.(r)}}},51477:function(e,t,n){n.d(t,{B:function(){return c}});var r=n(7653),i=n(99933),o=n(94492),l=n(27573),a=r.forwardRef((e,t)=>{let{children:n,...i}=e,o=r.Children.toArray(n),a=o.find(d);if(a){let e=a.props.children,n=o.map(t=>t!==a?t:r.Children.count(e)>1?r.Children.only(null):r.isValidElement(e)?e.props.children:null);return(0,l.jsx)(s,{...i,ref:t,children:r.isValidElement(e)?r.cloneElement(e,void 0,n):null})}return(0,l.jsx)(s,{...i,ref:t,children:n})});a.displayName="Slot";var s=r.forwardRef((e,t)=>{let{children:n,...i}=e;if(r.isValidElement(n)){let e,l;let a=(e=Object.getOwnPropertyDescriptor(n.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning?n.ref:(e=Object.getOwnPropertyDescriptor(n,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning?n.props.ref:n.props.ref||n.ref;return r.cloneElement(n,{...function(e,t){let n={...t};for(let r in t){let i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...e)=>{o(...e),i(...e)}:i&&(n[r]=i):"style"===r?n[r]={...i,...o}:"className"===r&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}(i,n.props),ref:t?(0,o.F)(t,a):a})}return r.Children.count(n)>1?r.Children.only(null):null});s.displayName="SlotClone";var u=({children:e})=>(0,l.jsx)(l.Fragment,{children:e});function d(e){return r.isValidElement(e)&&e.type===u}function c(e){let t=e+"CollectionProvider",[n,s]=(0,i.b)(t),[u,d]=n(t,{collectionRef:{current:null},itemMap:new Map}),c=e=>{let{scope:t,children:n}=e,i=r.useRef(null),o=r.useRef(new Map).current;return(0,l.jsx)(u,{scope:t,itemMap:o,collectionRef:i,children:n})};c.displayName=t;let f=e+"CollectionSlot",p=r.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=d(f,n),s=(0,o.e)(t,i.collectionRef);return(0,l.jsx)(a,{ref:s,children:r})});p.displayName=f;let g=e+"CollectionItemSlot",m="data-radix-collection-item",h=r.forwardRef((e,t)=>{let{scope:n,children:i,...s}=e,u=r.useRef(null),c=(0,o.e)(t,u),f=d(g,n);return r.useEffect(()=>(f.itemMap.set(u,{ref:u,...s}),()=>void f.itemMap.delete(u))),(0,l.jsx)(a,{[m]:"",ref:c,children:i})});return h.displayName=g,[{Provider:c,Slot:p,ItemSlot:h},function(t){let n=d(e+"CollectionConsumer",t);return r.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll("[".concat(m,"]")));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])},s]}},94492:function(e,t,n){n.d(t,{F:function(){return o},e:function(){return l}});var r=n(7653);function i(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function o(...e){return t=>{let n=!1,r=e.map(e=>{let r=i(e,t);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];"function"==typeof n?n():i(e[t],null)}}}}function l(...e){return r.useCallback(o(...e),e)}},99933:function(e,t,n){n.d(t,{b:function(){return o}});var r=n(7653),i=n(27573);function o(e,t=[]){let n=[],o=()=>{let t=n.map(e=>r.createContext(e));return function(n){let i=n?.[e]||t;return r.useMemo(()=>({[`__scope${e}`]:{...n,[e]:i}}),[n,i])}};return o.scopeName=e,[function(t,o){let l=r.createContext(o),a=n.length;n=[...n,o];let s=t=>{let{scope:n,children:o,...s}=t,u=n?.[e]?.[a]||l,d=r.useMemo(()=>s,Object.values(s));return(0,i.jsx)(u.Provider,{value:d,children:o})};return s.displayName=t+"Provider",[s,function(n,i){let s=i?.[e]?.[a]||l,u=r.useContext(s);if(u)return u;if(void 0!==o)return o;throw Error(`\`${n}\` must be used within \`${t}\``)}]},function(...e){let t=e[0];if(1===e.length)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let i=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return r.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}(o,...t)]}},97103:function(e,t,n){let r;n.d(t,{x8:function(){return ek},VY:function(){return eS},dk:function(){return eE},aV:function(){return eC},h_:function(){return ex},fC:function(){return ew},Dx:function(){return eR},xz:function(){return e_}});var i,o=n(7653),l=n.t(o,2);function a(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),!1===n||!r.defaultPrevented)return t?.(r)}}function s(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function u(...e){return o.useCallback(function(...e){return t=>{let n=!1,r=e.map(e=>{let r=s(e,t);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];"function"==typeof n?n():s(e[t],null)}}}}(...e),e)}var d=n(27573),c=globalThis?.document?o.useLayoutEffect:()=>{},f=l[" useId ".trim().toString()]||(()=>void 0),p=0;function g(e){let[t,n]=o.useState(f());return c(()=>{e||n(e=>e??String(p++))},[e]),e||(t?`radix-${t}`:"")}var m=l[" useInsertionEffect ".trim().toString()]||c;Symbol("RADIX:SYNC_STATE");var h=n(3458),v=n(24880),y=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>
1{let n=(0,v.Z8)(`Primitive.${t}`),r=o.forwardRef((e,r)=>{let{asChild:i,...o}=e,l=i?n:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,d.jsx)(l,{...o,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function b(e){let t=o.useRef(e);return o.useEffect(()=>{t.current=e}),o.useMemo(()=>(...e)=>t.current?.(...e),[])}var w="dismissableLayer.update",_=o.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),x=o.forwardRef((e,t)=>{var n,r;let{disableOutsidePointerEvents:l=!1,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:f,onInteractOutside:p,onDismiss:g,...m}=e,h=o.useContext(_),[v,x]=o.useState(null),R=null!==(r=null==v?void 0:v.ownerDocument)&&void 0!==r?r:null===(n=globalThis)||void 0===n?void 0:n.document,[,E]=o.useState({}),k=u(t,e=>x(e)),A=Array.from(h.layers),[F]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),M=A.indexOf(F),P=v?A.indexOf(v):-1,O=h.layersWithOutsidePointerEventsDisabled.size>0,V=P>=M,T=function(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null===(t=globalThis)||void 0===t?void 0:t.document,r=b(e),i=o.useRef(!1),l=o.useRef(()=>{});return o.useEffect(()=>{let e=e=>{if(e.target&&!i.current){let t=function(){S("dismissableLayer.pointerDownOutside",r,i,{discrete:!0})},i={originalEvent:e};"touch"===e.pointerType?(n.removeEventListener("click",l.current),l.current=t,n.addEventListener("click",l.current,{once:!0})):t()}else n.removeEventListener("click",l.current);i.current=!1},t=window.setTimeout(()=>{n.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(t),n.removeEventListener("pointerdown",e),n.removeEventListener("click",l.current)}},[n,r]),{onPointerDownCapture:()=>i.current=!0}}(e=>{let t=e.target,n=[...h.branches].some(e=>e.contains(t));!V||n||(null==c||c(e),null==p||p(e),e.defaultPrevented||null==g||g())},R),I=function(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null===(t=globalThis)||void 0===t?void 0:t.document,r=b(e),i=o.useRef(!1);return o.useEffect(()=>{let e=e=>{e.target&&!i.current&&S("dismissableLayer.focusOutside",r,{originalEvent:e},{discrete:!1})};return n.addEventListener("focusin",e),()=>n.removeEventListener("focusin",e)},[n,r]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}(e=>{let t=e.target;[...h.branches].some(e=>e.contains(t))||(null==f||f(e),null==p||p(e),e.defaultPrevented||null==g||g())},R);return!function(e,t=globalThis?.document){let n=b(e);o.useEffect(()=>{let e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})},[n,t])}(e=>{P!==h.layers.size-1||(null==s||s(e),!e.defaultPrevented&&g&&(e.preventDefault(),g()))},R),o.useEffect(()=>{if(v)return l&&(0===h.layersWithOutsidePointerEventsDisabled.size&&(i=R.body.style.pointerEvents,R.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(v)),h.layers.add(v),C(),()=>{l&&1===h.layersWithOutsidePointerEventsDisabled.size&&(R.body.style.pointerEvents=i)}},[v,R,l,h]),o.useEffect(()=>()=>{v&&(h.layers.delete(v),h.layersWithOutsidePointerEventsDisabled.delete(v),C())},[v,h]),o.useEffect(()=>{let e=()=>E({});return document.addEventListener(w,e),()=>document.removeEventListener(w,e)},[]),(0,d.jsx)(y.div,{...m,ref:k,style:{pointerEvents:O?V?"auto":"none":void 0,...e.style},onFocusCapture:a(e.onFocusCapture,I.onFocusCapture),onBlurCapture:a(e.onBlurCapture,I.onBlurCapture),onPointerDownCapture:a(e.onPointerDownCapture,T.onPointerDownCapture)})});function C(){let e=new CustomEvent(w);document.dispatchEvent(e)}function S(e,t,n,r){let{discrete:i}=r,o=n.originalEvent.target,l=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});(t&&o.addEventListener(e,t,{once:!0}),i)?o&&h.flushSync(()=>o.dispatchEvent(l)):o.dispatchEvent(l)}x.displayName="DismissableLayer",o.forwardRef((e,t)=>{let n=o.useContext(_),r=o.useRef(null),i=u(t,r);return o.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,d.jsx)(y.div,{...e,ref:i})}).displayName="DismissableLayerBranch";var R="focusScope.autoFocusOnMount",E="focusScope.autoFocusOnUnmount",k={bubbles:!1,cancelable:!0},A=o.forwardRef((e,t)=>
1{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:l,...a}=e,[s,c]=o.useState(null),f=b(i),p=b(l),g=o.useRef(null),m=u(t,e=>c(e)),h=o.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;o.useEffect(()=>{if(r){let e=function(e){if(h.paused||!s)return;let t=e.target;s.contains(t)?g.current=t:P(g.current,{select:!0})},t=function(e){if(h.paused||!s)return;let t=e.relatedTarget;null===t||s.contains(t)||P(g.current,{select:!0})};document.addEventListener("focusin",e),document.addEventListener("focusout",t);let n=new MutationObserver(function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&P(s)});return s&&n.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),n.disconnect()}}},[r,s,h.paused]),o.useEffect(()=>{if(s){O.add(h);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(R,k);s.addEventListener(R,f),s.dispatchEvent(t),t.defaultPrevented||(function(e){let{select:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=document.activeElement;for(let r of e)if(P(r,{select:t}),document.activeElement!==n)return}(F(s).filter(e=>"A"!==e.tagName),{select:!0}),document.activeElement===e&&P(s))}return()=>{s.removeEventListener(R,f),setTimeout(()=>{let t=new CustomEvent(E,k);s.addEventListener(E,p),s.dispatchEvent(t),t.defaultPrevented||P(null!=e?e:document.body,{select:!0}),s.removeEventListener(E,p),O.remove(h)},0)}}},[s,f,p,h]);let v=o.useCallback(e=>{if(!n&&!r||h.paused)return;let t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,o]=function(e){let t=F(e);return[M(t,e),M(t.reverse(),e)]}(t);r&&o?e.shiftKey||i!==o?e.shiftKey&&i===r&&(e.preventDefault(),n&&P(o,{select:!0})):(e.preventDefault(),n&&P(r,{select:!0})):i===t&&e.preventDefault()}},[n,r,h.paused]);return(0,d.jsx)(y.div,{tabIndex:-1,...a,ref:m,onKeyDown:v})});function F(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function M(e,t){for(let n of e)if(!function(e,t){let{upTo:n}=t;if("hidden"===getComputedStyle(e).visibility)return!0;for(;e&&(void 0===n||e!==n);){if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}(n,{upTo:t}))return n}function P(e){let{select:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e&&e.focus){var n;let r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&(n=e)instanceof HTMLInputElement&&"select"in n&&t&&e.select()}}A.displayName="FocusScope";var O=(r=[],{add(e){let t=r[0];e!==t&&(null==t||t.pause()),(r=V(r,e)).unshift(e)},remove(e){var t;null===(t=(r=V(r,e))[0])||void 0===t||t.resume()}});function V(e,t){let n=[...e],r=n.indexOf(t);return -1!==r&&n.splice(r,1),n}var T=o.forwardRef((e,t)=>{var n,r;let{container:i,...l}=e,[a,s]=o.useState(!1);c(()=>s(!0),[]);let u=i||a&&(null===(r=globalThis)||void 0===r?void 0:null===(n=r.document)||void 0===n?void 0:n.body);return u?h.createPortal((0,d.jsx)(y.div,{...l,ref:t}),u):null});T.displayName="Portal";var I=e=>{var t,n;let r,i;let{present:l,children:a}=e,s=function(e){var t,n;let[r,i]=o.useState(),l=o.useRef(null),a=o.useRef(e),s=o.useRef("none"),[u,d]=(t=e?"mounted":"unmounted",n={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},o.useReducer((e,t)=>{let r=n[e][t];return null!=r?r:e},t));return o.useEffect(()=>{let e=D(l.current);s.current="mounted"===u?e:"none"},[u]),c(()=>{let t=l.current,n=a.current;if(n!==e){let r=s.current,i=D(t);e?d("MOUNT"):"none"===i||(null==t?void 0:t.display)==="none"?d("UNMOUNT"):n&&r!==i?d("ANIMATION_OUT"):d("UNMOUNT"),a.current=e}},[e,d]),c(()=>{if(r){var e;let t;let n=null!==(e=r.ownerDocument.defaultView)&&void 0!==e?e:window,i=e=>{let i=D(l.current).includes(e.animationName);if(e.target===r&&i&&(d("ANIMATION_END"),!a.current)){let e=r.style.animationFillMode;r.style.animationFillMode="forwards",t=n.setTimeout(()=>{"forwards"===r.style.animationFillMode&&(r.style.animationFillMode=e)})}},o=e=>{e.target===r&&(s.current=D(l.current))};return r.addEventListener("animationstart",o),r.addEventListener("animationcancel",i),r.addEventListener("animationend",i),()=>{n.clearTimeout(t),r.removeEventListener("animationstart",o),r.removeEventListener("animationcancel",i),r.removeEventListener("animationend",i)}}d("ANIMATION_END")},[r,d]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:o.useCallback(e=>{l.current=e?getComputedStyle(e):null,i(e)},[])}}(l),d="function"==typeof a?a({present:s.isPresent}):o.Children.only(a),f=u(s.ref,(r=null===(t=Object.getOwnPropertyDescriptor(d.props,"ref"))||void 0===t?void 0:t.get)&&"isReactWarning"in r&&r.isReactWarning?d.ref:(r=null===(n=Object.getOwnPropertyDescriptor(d,"ref"))||void 0===n?void 0:n.get)&&"isReactWarning"in r&&r.isReactWarning?d.props.ref:d.props.ref||d.ref);return"function"==typeof a||s.isPresent?o.cloneElement(d,{ref:f}):null};function D(e){return(null==e?void 0:e.animationName)||"none"}I.displayName="Presence";var N=0;function j(){let e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.
1style.position="fixed",e.style.pointerEvents="none",e}var L=n(55571),Z=n(27130),z="Dialog",[W,H]=function(e,t=[]){let n=[],r=()=>{let t=n.map(e=>o.createContext(e));return function(n){let r=n?.[e]||t;return o.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return r.scopeName=e,[function(t,r){let i=o.createContext(r),l=n.length;n=[...n,r];let a=t=>{let{scope:n,children:r,...a}=t,s=n?.[e]?.[l]||i,u=o.useMemo(()=>a,Object.values(a));return(0,d.jsx)(s.Provider,{value:u,children:r})};return a.displayName=t+"Provider",[a,function(n,a){let s=a?.[e]?.[l]||i,u=o.useContext(s);if(u)return u;if(void 0!==r)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}]},function(...e){let t=e[0];if(1===e.length)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return o.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}(r,...t)]}(z),[B,U]=W(z),$=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:l,modal:a=!0}=e,s=o.useRef(null),u=o.useRef(null),[c,f]=function({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,l,a]=function({defaultProp:e,onChange:t}){let[n,r]=o.useState(e),i=o.useRef(n),l=o.useRef(t);return m(()=>{l.current=t},[t]),o.useEffect(()=>{i.current!==n&&(l.current?.(n),i.current=n)},[n,i]),[n,r,l]}({defaultProp:t,onChange:n}),s=void 0!==e,u=s?e:i;{let t=o.useRef(void 0!==e);o.useEffect(()=>{let e=t.current;if(e!==s){let t=s?"controlled":"uncontrolled";console.warn(`${r} is changing from ${e?"controlled":"uncontrolled"} to ${t}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}t.current=s},[s,r])}return[u,o.useCallback(t=>{if(s){let n="function"==typeof t?t(e):t;n!==e&&a.current?.(n)}else l(t)},[s,e,l,a])]}({prop:r,defaultProp:null!=i&&i,onChange:l,caller:z});return(0,d.jsx)(B,{scope:t,triggerRef:s,contentRef:u,contentId:g(),titleId:g(),descriptionId:g(),open:c,onOpenChange:f,onOpenToggle:o.useCallback(()=>f(e=>!e),[f]),modal:a,children:n})};$.displayName=z;var G="DialogTrigger",q=o.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=U(G,n),o=u(t,i.triggerRef);return(0,d.jsx)(y.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":eg(i.open),...r,ref:o,onClick:a(e.onClick,i.onOpenToggle)})});q.displayName=G;var K="DialogPortal",[Y,X]=W(K,{forceMount:void 0}),J=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,l=U(K,t);return(0,d.jsx)(Y,{scope:t,forceMount:n,children:o.Children.map(r,e=>(0,d.jsx)(I,{present:n||l.open,children:(0,d.jsx)(T,{asChild:!0,container:i,children:e})}))})};J.displayName=K;var Q="DialogOverlay",ee=o.forwardRef((e,t)=>{let n=X(Q,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=U(Q,e.__scopeDialog);return o.modal?(0,d.jsx)(I,{present:r||o.open,children:(0,d.jsx)(en,{...i,ref:t})}):null});ee.displayName=Q;var et=(0,v.Z8)("DialogOverlay.RemoveScroll"),en=o.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=U(Q,n);return(0,d.jsx)(L.Z,{as:et,allowPinchZoom:!0,shards:[i.contentRef],children:(0,d.jsx)(y.div,{"data-state":eg(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),er="DialogContent",ei=o.forwardRef((e,t)=>{let n=X(er,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=U(er,e.__scopeDialog);return(0,d.jsx)(I,{present:r||o.open,children:o.modal?(0,d.jsx)(eo,{...i,ref:t}):(0,d.jsx)(el,{...i,ref:t})})});ei.displayName=er;var eo=o.forwardRef((e,t)=>{let n=U(er,e.__scopeDialog),r=o.useRef(null),i=u(t,n.contentRef,r);return o.useEffect(()=>{let e=r.current;if(e)return(0,Z.Ry)(e)},[]),(0,d.jsx)(ea,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:a(e.onCloseAutoFocus,e=>{var t;e.preventDefault(),null===(t=n.triggerRef.current)||void 0===t||t.focus()}),onPointerDownOutside:a(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()}),onFocusOutside:a(e.onFocusOutside,e=>e.preventDefault())})}),el=o.forwardRef((e,t)=>
1{let n=U(er,e.__scopeDialog),r=o.useRef(!1),i=o.useRef(!1);return(0,d.jsx)(ea,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var o,l;null===(o=e.onCloseAutoFocus)||void 0===o||o.call(e,t),t.defaultPrevented||(r.current||null===(l=n.triggerRef.current)||void 0===l||l.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{var o,l;null===(o=e.onInteractOutside)||void 0===o||o.call(e,t),t.defaultPrevented||(r.current=!0,"pointerdown"!==t.detail.originalEvent.type||(i.current=!0));let a=t.target;(null===(l=n.triggerRef.current)||void 0===l?void 0:l.contains(a))&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&i.current&&t.preventDefault()}})}),ea=o.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:l,...a}=e,s=U(er,n),c=o.useRef(null),f=u(t,c);return o.useEffect(()=>{var e,t;let n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",null!==(e=n[0])&&void 0!==e?e:j()),document.body.insertAdjacentElement("beforeend",null!==(t=n[1])&&void 0!==t?t:j()),N++,()=>{1===N&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),N--}},[]),(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(A,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:l,children:(0,d.jsx)(x,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":eg(s.open
1),...a,ref:f,onDismiss:()=>s.onOpenChange(!1)})}),(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(ey,{titleId:s.titleId}),(0,d.jsx)(eb,{contentRef:c,descriptionId:s.descriptionId})]})]})}),es="DialogTitle",eu=o.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=U(es,n);return(0,d.jsx)(y.h2,{id:i.titleId,...r,ref:t})});eu.displayName=es;var ed="DialogDescription",ec=o.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=U(ed,n);return(0,d.jsx)(y.p,{id:i.descriptionId,...r,ref:t})});ec.displayName=ed;var ef="DialogClose",ep=o.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=U(ef,n);return(0,d.jsx)(y.button,{type:"button",...r,ref:t,onClick:a(e.onClick,()=>i.onOpenChange(!1))})});function eg(e){return e?"open":"closed"}ep.displayName=ef;var em="DialogTitleWarning",[eh,ev]=function(e,t){let n=o.createContext(t),r=e=>{let{children:t,...r}=e,i=o.useMemo(()=>r,Object.values(r));return(0,d.jsx)(n.Provider,{value:i,children:t})};return r.displayName=e+"Provider",[r,function(r){let i=o.useContext(n);if(i)return i;if(void 0!==t)return t;throw Error(`\`${r}\` must be used within \`${e}\``)}]}(em,{contentName:er,titleName:es,docsSlug:"dialog"}),ey=e=>{let{titleId:t}=e,n=ev(em),r="`".concat(n.contentName,"` requires a `").concat(n.titleName,"` for the component to be accessible for screen reader users.\n\nIf you want to hide the `").concat(n.titleName,"`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/").concat(n.docsSlug);return o.useEffect(()=>{t&&!document.getElementById(t)&&console.error(r)},[r,t]),null},eb=e=>{let{contentRef:t,descriptionId:n}=e,r=ev("DialogDescriptionWarning"),i="Warning: Missing `Description` or `aria-describedby={undefined}` for {".concat(r.contentName,"}.");return o.useEffect(()=>{var e;let r=null===(e=t.current)||void 0===e?void 0:e.getAttribute("aria-describedby");n&&r&&!document.getElementById(n)&&console.warn(i)},[i,t,n]),null},ew=$,e_=q,ex=J,eC=ee,eS=ei,eR=eu,eE=ec,ek=ep},21004:function(e,t,n){n.d(t,{gm:function(){return o}});var r=n(7653);n(27573);var i=r.createContext(void 0);function o(e){let t=r.useContext(i);return e||t||"ltr"}},97256:function(e,t,n){n.d(t,{I0:function(){return v},XB:function(){return f},fC:function(){return h}});var r,i=n(7653),o=n(46196),l=n(56606),a=n(94492),s=n(523),u=n(27573),d="dismissableLayer.update",c=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),f=i.forwardRef((e,t)=>{var n,f;let{disableOutsidePointerEvents:p=!1,onEscapeKeyDown:h,onPointerDownOutside:v,onFocusOutside:y,onInteractOutside:b,onDismiss:w,..._}=e,x=i.useContext(c),[C,S]=i.useState(null),R=null!==(f=null==C?void 0:C.ownerDocument)&&void 0!==f?f:null===(n=globalThis)||void 0===n?void 0:n.document,[,E]=i.useState({}),k=(0,a.e)(t,e=>S(e)),A=Array.from(x.layers),[F]=[...x.layersWithOutsidePointerEventsDisabled].slice(-1),M=A.indexOf(F),P=C?A.indexOf(C):-1,O=x.layersWithOutsidePointerEventsDisabled.size>0,V=P>=M,T=function(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null===(t=globalThis)||void 0===t?void 0:t.document,r=(0,s.W)(e),o=i.useRef(!1),l=i.useRef(()=>{});return i.useEffect(()=>{let e=e=>{if(e.target&&!o.current){let t=function(){m("dismissableLayer.pointerDownOutside",r,i,{discrete:!0})},i={originalEvent:e};"touch"===e.pointerType?(n.removeEventListener("click",l.current),l.current=t,n.addEventListener("click",l.current,{once:!0})):t()}else n.removeEventListener("click",l.current);o.current=!1},t=window.setTimeout(()=>{n.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(t),n.removeEventListener("pointerdown",e),n.removeEventListener("click",l.current)}},[n,r]),{onPointerDownCapture:()=>o.current=!0}}(e=>{let t=e.target,n=[...x.branches].some(e=>e.contains(t));!V||n||(null==v||v(e),null==b||b(e),e.defaultPrevented||null==w||w())},R),I=function(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null===(t=globalThis)||void 0===t?void 0:t.document,r=(0,s.W)(e),o=i.useRef(!1);return i.useEffect(()=>{let e=e=>{e.target&&!o.current&&m("dismissableLayer.focusOutside",r,{originalEvent:e},{discrete:!1})};return n.addEventListener("focusin",e),()=>n.removeEventListener("focusin",e)},[n,r]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}(e=>{let t=e.target;[...x.branches].some(e=>e.contains(t))||(null==y||y(e),null==b||b(e),e.defaultPrevented||null==w||w())},R);return!function(e,t=globalThis?.document){let n=(0,s.W)(e);i.useEffect(()=>{let e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})},[n,t])}(e=>{P!==x.layers.size-1||(null==h||h(e),!e.defaultPrevented&&w&&(e.preventDefault(),w()))},R),i.useEffect(()=>{if(C)return p&&(0===x.layersWithOutsidePointerEventsDisabled.size&&(r=R.body.style.pointerEvents,R.body.style.pointerEvents="none"),x.layersWithOutsidePointerEventsDisabled.add(C)),x.layers.add(C),g(),()=>{p&&1===x.layersWithOutsidePointerEventsDisabled.size&&(R.body.style.pointerEvents=r)}},[C,R,p,x]),i.useEffect(()=>()=>{C&&(x.layers.delete(C),x.layersWithOutsidePointerEventsDisabled.delete(C),g())},[C,x]),i.useEffect(()=>{let e=()=>E({});return document.addEventListener(d,e),()=>document.removeEventListener(d,e)},[]),(0,u.jsx)(l.WV.div,{..._,ref:k,style:{pointerEvents:O?V?"auto":"none":void 0,...e.style},onFocusCapture:(0,o.M)(e.onFocusCapture,I.onFocusCapture),onBlurCapture:(0,o.M)(e.onBlurCapture,I.onBlurCapture),onPointerDownCapture:(0,o.M)(e.onPointerDownCapture,T.onPointerDownCapture)})});f.displayName="DismissableLayer";var p=i.forwardRef((e,t)=>
1{let n=i.useContext(c),r=i.useRef(null),o=(0,a.e)(t,r);return i.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,u.jsx)(l.WV.div,{...e,ref:o})});function g(){let e=new CustomEvent(d);document.dispatchEvent(e)}function m(e,t,n,r){let{discrete:i}=r,o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),i?(0,l.jH)(o,a):o.dispatchEvent(a)}p.displayName="DismissableLayerBranch";var h=f,v=p},60307:function(e,t,n){n.d(t,{EW:function(){return o}});var r=n(7653),i=0;function o(){r.useEffect(()=>{var e,t;let n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",null!==(e=n[0])&&void 0!==e?e:l()),document.body.insertAdjacentElement("beforeend",null!==(t=n[1])&&void 0!==t?t:l()),i++,()=>{1===i&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),i--}},[])}function l(){let e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}},42142:function(e,t,n){let r;n.d(t,{M:function(){return f}});var i=n(7653),o=n(94492),l=n(56606),a=n(523),s=n(27573),u="focusScope.autoFocusOnMount",d="focusScope.autoFocusOnUnmount",c={bubbles:!1,cancelable:!0},f=i.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:f,onUnmountAutoFocus:v,...y}=e,[b,w]=i.useState(null),_=(0,a.W)(f),x=(0,a.W)(v),C=i.useRef(null),S=(0,o.e)(t,e=>w(e)),R=i.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;i.useEffect(()=>{if(r){let e=function(e){if(R.paused||!b)return;let t=e.target;b.contains(t)?C.current=t:m(C.current,{select:!0})},t=function(e){if(R.paused||!b)return;let t=e.relatedTarget;null===t||b.contains(t)||m(C.current,{select:!0})};document.addEventListener("focusin",e),document.addEventListener("focusout",t);let n=new MutationObserver(function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&m(b)});return b&&n.observe(b,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),n.disconnect()}}},[r,b,R.paused]),i.useEffect(()=>{if(b){h.add(R);let e=document.activeElement;if(!b.contains(e)){let t=new CustomEvent(u,c);b.addEventListener(u,_),b.dispatchEvent(t),t.defaultPrevented||(function(e){let{select:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=document.activeElement;for(let r of e)if(m(r,{select:t}),document.activeElement!==n)return}(p(b).filter(e=>"A"!==e.tagName),{select:!0}),document.activeElement===e&&m(b))}return()=>{b.removeEventListener(u,_),setTimeout(()=>{let t=new CustomEvent(d,c);b.addEventListener(d,x),b.dispatchEvent(t),t.defaultPrevented||m(null!=e?e:document.body,{select:!0}),b.removeEventListener(d,x),h.remove(R)},0)}}},[b,_,x,R]);let E=i.useCallback(e=>{if(!n&&!r||R.paused)return;let t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,o]=function(e){let t=p(e);return[g(t,e),g(t.reverse(),e)]}(t);r&&o?e.shiftKey||i!==o?e.shiftKey&&i===r&&(e.preventDefault(),n&&m(o,{select:!0})):(e.preventDefault(),n&&m(r,{select:!0})):i===t&&e.preventDefault()}},[n,r,R.paused]);return(0,s.jsx)(l.WV.div,{tabIndex:-1,...y,ref:S,onKeyDown:E})});function p(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function g(e,t){for(let n of e)if(!function(e,t){let{upTo:n}=t;if("hidden"===getComputedStyle(e).visibility)return!0;for(;e&&(void 0===n||e!==n);){if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}(n,{upTo:t}))return n}function m(e){let{select:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e&&e.focus){var n;let r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&(n=e)instanceof HTMLInputElement&&"select"in n&&t&&e.select()}}f.displayName="FocusScope";var h=(r=[],{add(e){let t=r[0];e!==t&&(null==t||t.pause()),(r=v(r,e)).unshift(e)},remove(e){var t;null===(t=(r=v(r,e))[0])||void 0===t||t.resume()}});function v(e,t){let n=[...e],r=n.indexOf(t);return -1!==r&&n.splice(r,1),n}},17321:function(e,t,n){n.d(t,{M:function(){return s}});var r,i=n(7653),o=n(81523),l=(r||(r=n.t(i,2)))["useId".toString()]||(()=>void 0),a=0;function s(e){let[t,n]=i.useState(l());return(0,o.b)(()=>{e||n(e=>e??String(a++))},[e]),e||(t?`radix-${t}`:"")}},1001:function(e,t,n){n.d(t,{f:function(){return a}});var r=n(7653),i=n(56606),o=n(27573),l=r.forwardRef((e,t)=>
1(0,o.jsx)(i.WV.label,{...e,ref:t,onMouseDown:t=>{var n;t.target.closest("button, input, select, textarea")||(null===(n=e.onMouseDown)||void 0===n||n.call(e,t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));l.displayName="Label";var a=l},44595:function(e,t,n){n.d(t,{VY:function(){return G},h_:function(){return $},fC:function(){return B},xz:function(){return U}});var r=n(7653),i=n(46196),o=n(94492),l=n(99933),a=n(97256),s=n(60307),u=n(42142),d=n(17321),c=n(50833),f=n(20153),p=n(65622),g=n(56606),m=n(27573),h=r.forwardRef((e,t)=>{let{children:n,...i}=e,o=r.Children.toArray(n),l=o.find(b);if(l){let e=l.props.children,n=o.map(t=>t!==l?t:r.Children.count(e)>1?r.Children.only(null):r.isValidElement(e)?e.props.children:null);return(0,m.jsx)(v,{...i,ref:t,children:r.isValidElement(e)?r.cloneElement(e,void 0,n):null})}return(0,m.jsx)(v,{...i,ref:t,children:n})});h.displayName="Slot";var v=r.forwardRef((e,t)=>{let{children:n,...i}=e;if(r.isValidElement(n)){let e,l;let a=(e=Object.getOwnPropertyDescriptor(n.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning?n.ref:(e=Object.getOwnPropertyDescriptor(n,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning?n.props.ref:n.props.ref||n.ref;return r.cloneElement(n,{...function(e,t){let n={...t};for(let r in t){let i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...e)=>{o(...e),i(...e)}:i&&(n[r]=i):"style"===r?n[r]={...i,...o}:"className"===r&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}(i,n.props),ref:t?(0,o.F)(t,a):a})}return r.Children.count(n)>1?r.Children.only(null):null});v.displayName="SlotClone";var y=({children:e})=>(0,m.jsx)(m.Fragment,{children:e});function b(e){return r.isValidElement(e)&&e.type===y}var w=n(47178),_=n(27130),x=n(55571),C="Popover",[S,R]=(0,l.b)(C,[c.D7]),E=(0,c.D7)(),[k,A]=S(C),F=e=>{let{__scopePopover:t,children:n,open:i,defaultOpen:o,onOpenChange:l,modal:a=!1}=e,s=E(t),u=r.useRef(null),[f,p]=r.useState(!1),[g=!1,h]=(0,w.T)({prop:i,defaultProp:o,onChange:l});return(0,m.jsx)(c.fC,{...s,children:(0,m.jsx)(k,{scope:t,contentId:(0,d.M)(),triggerRef:u,open:g,onOpenChange:h,onOpenToggle:r.useCallback(()=>h(e=>!e),[h]),hasCustomAnchor:f,onCustomAnchorAdd:r.useCallback(()=>p(!0),[]),onCustomAnchorRemove:r.useCallback(()=>p(!1),[]),modal:a,children:n})})};F.displayName=C;var M="PopoverAnchor";r.forwardRef((e,t)=>{let{__scopePopover:n,...i}=e,o=A(M,n),l=E(n),{onCustomAnchorAdd:a,onCustomAnchorRemove:s}=o;return r.useEffect(()=>(a(),()=>s()),[a,s]),(0,m.jsx)(c.ee,{...l,...i,ref:t})}).displayName=M;var P="PopoverTrigger",O=r.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,l=A(P,n),a=E(n),s=(0,o.e)(t,l.triggerRef),u=(0,m.jsx)(g.WV.button,{type:"button","aria-haspopup":"dialog","aria-expanded":l.open,"aria-controls":l.contentId,"data-state":H(l.open),...r,ref:s,onClick:(0,i.M)(e.onClick,l.onOpenToggle)});return l.hasCustomAnchor?u:(0,m.jsx)(c.ee,{asChild:!0,...a,children:u})});O.displayName=P;var V="PopoverPortal",[T,I]=S(V,{forceMount:void 0}),D=e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,o=A(V,t);return(0,m.jsx)(T,{scope:t,forceMount:n,children:(0,m.jsx)(p.z,{present:n||o.open,children:(0,m.jsx)(f.h,{asChild:!0,container:i,children:r})})})};D.displayName=V;var N="PopoverContent",j=r.forwardRef((e,t)=>{let n=I(N,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,o=A(N,e.__scopePopover);return(0,m.jsx)(p.z,{present:r||o.open,children:o.modal?(0,m.jsx)(L,{...i,ref:t}):(0,m.jsx)(Z,{...i,ref:t})})});j.displayName=N;var L=r.forwardRef((e,t)=>{let n=A(N,e.__scopePopover),l=r.useRef(null),a=(0,o.e)(t,l),s=r.useRef(!1);return r.useEffect(()=>{let e=l.current;if(e)return(0,_.Ry)(e)},[]),(0,m.jsx)(x.Z,{as:h,allowPinchZoom:!0,children:(0,m.jsx)(z,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:(0,i.M)(e.onCloseAutoFocus,e=>{var t;e.preventDefault(),s.current||null===(t=n.triggerRef.current)||void 0===t||t.focus()}),onPointerDownOutside:(0,i.M)(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;s.current=r},{checkForDefaultPrevented:!1}),onFocusOutside:(0,i.M)(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),Z=r.forwardRef((e,t)=>
1{let n=A(N,e.__scopePopover),i=r.useRef(!1),o=r.useRef(!1);return(0,m.jsx)(z,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var r,l;null===(r=e.onCloseAutoFocus)||void 0===r||r.call(e,t),t.defaultPrevented||(i.current||null===(l=n.triggerRef.current)||void 0===l||l.focus(),t.preventDefault()),i.current=!1,o.current=!1},onInteractOutside:t=>{var r,l;null===(r=e.onInteractOutside)||void 0===r||r.call(e,t),t.defaultPrevented||(i.current=!0,"pointerdown"!==t.detail.originalEvent.type||(o.current=!0));let a=t.target;(null===(l=n.triggerRef.current)||void 0===l?void 0:l.contains(a))&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&o.current&&t.preventDefault()}})}),z=r.forwardRef((e,t)=>{let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,disableOutsidePointerEvents:l,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:p,onInteractOutside:g,...h}=e,v=A(N,n),y=E(n);return(0,s.EW)(),(0,m.jsx)(u.M,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o,children:(0,m.jsx)(a.XB,{asChild:!0,disableOutsidePointerEvents:l,onInteractOutside:g,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:p,onDismiss:()=>v.onOpenChange(!1),children:(0,m.jsx)(c.VY,{"data-state":H(v.open),role:"dialog",id:v.contentId,...y,...h,ref:t,style:{...h.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),W="PopoverClose";function H(e){return e?"open":"closed"}r.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,o=A(W,n);return(0,m.jsx)(g.WV.button,{type:"button",...r,ref:t,onClick:(0,i.M)(e.onClick,()=>o.onOpenChange(!1))})}).displayName=W,r.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=E(n);return(0,m.jsx)(c.Eh,{...i,...r,ref:t})}).displayName="PopoverArrow";var B=F,U=O,$=D,G=j},50833:function(e,t,n){n.d(t,{ee:function(){return V},Eh:function(){return I},VY:function(){return T},fC:function(){return O},D7:function(){return h}});var r=n(7653),i=n(24019),o=n(75184),l=n(56606),a=n(27573),s=r.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...o}=e;return(0,a.jsx)(l.WV.svg,{...o,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:(0,a.jsx)("polygon",{points:"0,0 30,0 15,10"})})});s.displayName="Arrow";var u=n(94492),d=n(99933),c=n(523),f=n(81523),p=n(35032),g="Popper",[m,h]=(0,d.b)(g),[v,y]=m(g),b=e=>{let{__scopePopper:t,children:n}=e,[i,o]=r.useState(null);return(0,a.jsx)(v,{scope:t,anchor:i,onAnchorChange:o,children:n})};b.displayName=g;var w="PopperAnchor",_=r.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:i,...o}=e,s=y(w,n),d=r.useRef(null),c=(0,u.e)(t,d);return r.useEffect(()=>{s.onAnchorChange((null==i?void 0:i.current)||d.current)}),i?null:(0,a.jsx)(l.WV.div,{...o,ref:c})});_.displayName=w;var x="PopperContent",[C,S]=m(x),R=r.forwardRef((e,t)=>{var n,s,d,g,m,h,v,b;let{__scopePopper:w,side:_="bottom",sideOffset:S=0,align:R="center",alignOffset:E=0,arrowPadding:k=0,avoidCollisions:A=!0,collisionBoundary:O=[],collisionPadding:V=0,sticky:T="partial",hideWhenDetached:I=!1,updatePositionStrategy:D="optimized",onPlaced:N,...j}=e,L=y(x,w),[Z,z]=r.useState(null),W=(0,u.e)(t,e=>z(e)),[H,B]=r.useState(null),U=(0,p.t)(H),$=null!==(v=null==U?void 0:U.width)&&void 0!==v?v:0,G=null!==(b=null==U?void 0:U.height)&&void 0!==b?b:0,q="number"==typeof V?V:{top:0,right:0,bottom:0,left:0,...V},K=Array.isArray(O)?O:[O],Y=K.length>0,X={padding:q,boundary:K.filter(F),altBoundary:Y},{refs:J,floatingStyles:Q,placement:ee,isPositioned:et,middlewareData:en}=(0,i.YF)({strategy:"fixed",placement:_+("center"!==R?"-"+R:""),whileElementsMounted:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,o.Me)(...t,{animationFrame:"always"===D})},elements:{reference:L.anchor},middleware:[(0,i.cv)({mainAxis:S+G,alignmentAxis:E}),A&&(0,i.uY)({mainAxis:!0,crossAxis:!1,limiter:"partial"===T?(0,i.dr)():void 0,...X}),A&&(0,i.RR)({...X}),(0,i.dp)({...X,apply:e=>{let{elements:t,rects:n,availableWidth:r,availableHeight:i}=e,{width:o,height:l}=n.reference,a=t.floating.style;a.setProperty("--radix-popper-available-width","".concat(r,"px")),a.setProperty("--radix-popper-available-height","".concat(i,"px")),a.setProperty("--radix-popper-anchor-width","".concat(o,"px")),a.setProperty("--radix-popper-anchor-height","".concat(l,"px"))}}),H&&(0,i.x7)({element:H,padding:k}),M({arrowWidth:$,arrowHeight:G}),I&&(0,i.Cp)({strategy:"referenceHidden",...X})]}),[er,ei]=P(ee),eo=(0,c.W)(N);(0,f.b)(()=>{et&&(null==eo||eo())},[et,eo]);let el=null===(n=en.arrow)||void 0===n?void 0:n.x,ea=null===(s=en.arrow)||void 0===s?void 0:s.y,es=(null===(d=en.arrow)||void 0===d?void 0:d.centerOffset)!==0,[eu,ed]=r.useState();return(0,f.b)(()=>{Z&&ed(window.getComputedStyle(Z).zIndex)},[Z]),(0,a.jsx)("div",{ref:J.setFloating,"data-radix-popper-content-wrapper":"",style:{...Q,transform:et?Q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:eu,"--radix-popper-transform-origin":[null===(g=en.transformOrigin)||void 0===g?void 0:g.x,null===(m=en.transformOrigin)||void 0===m?void 0:m.y].join(" "),...(null===(h=en.hide)||void 0===h?void 0:h.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,a.jsx)(C,{scope:w,placedSide:er,onArrowChange:B,arrowX:el,arrowY:ea,shouldHideArrow:es,children:(0,a.jsx)(l.WV.div,{"data-side":er,"data-align":ei,...j,ref:W,style:{...j.style,animation:et?void 0:"none"}})})})});R.displayName=x;var E="PopperArrow",k={top:"bottom",right:"left",bottom:"top",left:"r
1ight"},A=r.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=S(E,n),o=k[i.placedSide];return(0,a.jsx)("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:(0,a.jsx)(s,{...r,ref:t,style:{...r.style,display:"block"}})})});function F(e){return null!==e}A.displayName=E;var M=e=>({name:"transformOrigin",options:e,fn(t){var n,r,i,o,l;let{placement:a,rects:s,middlewareData:u}=t,d=(null===(n=u.arrow)||void 0===n?void 0:n.centerOffset)!==0,c=d?0:e.arrowWidth,f=d?0:e.arrowHeight,[p,g]=P(a),m={start:"0%",center:"50%",end:"100%"}[g],h=(null!==(o=null===(r=u.arrow)||void 0===r?void 0:r.x)&&void 0!==o?o:0)+c/2,v=(null!==(l=null===(i=u.arrow)||void 0===i?void 0:i.y)&&void 0!==l?l:0)+f/2,y="",b="";return"bottom"===p?(y=d?m:"".concat(h,"px"),b="".concat(-f,"px")):"top"===p?(y=d?m:"".concat(h,"px"),b="".concat(s.floating.height+f,"px")):"right"===p?(y="".concat(-f,"px"),b=d?m:"".concat(v,"px")):"left"===p&&(y="".concat(s.floating.width+f,"px"),b=d?m:"".concat(v,"px")),{data:{x:y,y:b}}}});function P(e){let[t,n="center"]=e.split("-");return[t,n]}var O=b,V=_,T=R,I=A},20153:function(e,t,n){n.d(t,{h:function(){return s}});var r=n(7653),i=n(3458),o=n(56606),l=n(81523),a=n(27573),s=r.forwardRef((e,t)=>{var n,s;let{container:u,...d}=e,[c,f]=r.useState(!1);(0,l.b)(()=>f(!0),[]);let p=u||c&&(null===(s=globalThis)||void 0===s?void 0:null===(n=s.document)||void 0===n?void 0:n.body);return p?i.createPortal((0,a.jsx)(o.WV.div,{...d,ref:t}),p):null});s.displayName="Portal"},65622:function(e,t,n){n.d(t,{z:function(){return l}});var r=n(7653),i=n(94492),o=n(81523),l=e=>{var t,n;let l,s;let{present:u,children:d}=e,c=function(e){var t,n;let[i,l]=r.useState(),s=r.useRef({}),u=r.useRef(e),d=r.useRef("none"),[c,f]=(t=e?"mounted":"unmounted",n={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},r.useReducer((e,t)=>{let r=n[e][t];return null!=r?r:e},t));return r.useEffect(()=>{let e=a(s.current);d.current="mounted"===c?e:"none"},[c]),(0,o.b)(()=>{let t=s.current,n=u.current;if(n!==e){let r=d.current,i=a(t);e?f("MOUNT"):"none"===i||(null==t?void 0:t.display)==="none"?f("UNMOUNT"):n&&r!==i?f("ANIMATION_OUT"):f("UNMOUNT"),u.current=e}},[e,f]),(0,o.b)(()=>{if(i){var e;let t;let n=null!==(e=i.ownerDocument.defaultView)&&void 0!==e?e:window,r=e=>{let r=a(s.current).includes(e.animationName);if(e.target===i&&r&&(f("ANIMATION_END"),!u.current)){let e=i.style.animationFillMode;i.style.animationFillMode="forwards",t=n.setTimeout(()=>{"forwards"===i.style.animationFillMode&&(i.style.animationFillMode=e)})}},o=e=>{e.target===i&&(d.current=a(s.current))};return i.addEventListener("animationstart",o),i.addEventListener("animationcancel",r),i.addEventListener("animationend",r),()=>{n.clearTimeout(t),i.removeEventListener("animationstart",o),i.removeEventListener("animationcancel",r),i.removeEventListener("animationend",r)}}f("ANIMATION_END")},[i,f]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:r.useCallback(e=>{e&&(s.current=getComputedStyle(e)),l(e)},[])}}(u),f="function"==typeof d?d({present:c.isPresent}):r.Children.only(d),p=(0,i.e)(c.ref,(l=null===(t=Object.getOwnPropertyDescriptor(f.props,"ref"))||void 0===t?void 0:t.get)&&"isReactWarning"in l&&l.isReactWarning?f.ref:(l=null===(n=Object.getOwnPropertyDescriptor(f,"ref"))||void 0===n?void 0:n.get)&&"isReactWarning"in l&&l.isReactWarning?f.props.ref:f.props.ref||f.ref);return"function"==typeof d||c.isPresent?r.cloneElement(f,{ref:p}):null};function a(e){return(null==e?void 0:e.animationName)||"none"}l.displayName="Presence"},56606:function(e,t,n){n.d(t,{WV:function(){return c},jH:function(){return f}});var r=n(7653),i=n(3458),o=n(94492),l=n(27573),a=r.forwardRef((e,t)=>
1{let{children:n,...i}=e,o=r.Children.toArray(n),a=o.find(d);if(a){let e=a.props.children,n=o.map(t=>t!==a?t:r.Children.count(e)>1?r.Children.only(null):r.isValidElement(e)?e.props.children:null);return(0,l.jsx)(s,{...i,ref:t,children:r.isValidElement(e)?r.cloneElement(e,void 0,n):null})}return(0,l.jsx)(s,{...i,ref:t,children:n})});a.displayName="Slot";var s=r.forwardRef((e,t)=>{let{children:n,...i}=e;if(r.isValidElement(n)){let e,l;let a=(e=Object.getOwnPropertyDescriptor(n.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning?n.ref:(e=Object.getOwnPropertyDescriptor(n,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning?n.props.ref:n.props.ref||n.ref;return r.cloneElement(n,{...function(e,t){let n={...t};for(let r in t){let i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...e)=>{o(...e),i(...e)}:i&&(n[r]=i):"style"===r?n[r]={...i,...o}:"className"===r&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}(i,n.props),ref:t?(0,o.F)(t,a):a})}return r.Children.count(n)>1?r.Children.only(null):null});s.displayName="SlotClone";var u=({children:e})=>(0,l.jsx)(l.Fragment,{children:e});function d(e){return r.isValidElement(e)&&e.type===u}var c=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{let n=r.forwardRef((e,n)=>{let{asChild:r,...i}=e,o=r?a:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,l.jsx)(o,{...i,ref:n})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function f(e,t){e&&i.flushSync(()=>e.dispatchEvent(t))}},8754:function(e,t,n){n.d(t,{VY:function(){return eI},ZA:function(){return eN},JO:function(){return eV},ck:function(){return eL},wU:function(){return ez},eT:function(){return eZ},__:function(){return ej},h_:function(){return eT},fC:function(){return eM},Z0:function(){return eW},xz:function(){return eP},B4:function(){return eO},l_:function(){return eD}});var r=n(7653),i=n(3458);function o(e,[t,n]){return Math.min(n,Math.max(t,e))}var l=n(46196),a=n(51477),s=n(94492),u=n(99933),d=n(21004),c=n(97256),f=n(60307),p=n(42142),g=n(17321),m=n(50833),h=n(20153),v=n(56606),y=n(27573),b=r.forwardRef((e,t)=>{let{children:n,...i}=e,o=r.Children.toArray(n),l=o.find(x);if(l){let e=l.props.children,n=o.map(t=>t!==l?t:r.Children.count(e)>1?r.Children.only(null):r.isValidElement(e)?e.props.children:null);return(0,y.jsx)(w,{...i,ref:t,children:r.isValidElement(e)?r.cloneElement(e,void 0,n):null})}return(0,y.jsx)(w,{...i,ref:t,children:n})});b.displayName="Slot";var w=r.forwardRef((e,t)=>{let{children:n,...i}=e;if(r.isValidElement(n)){let e,o;let l=(e=Object.getOwnPropertyDescriptor(n.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning?n.ref:(e=Object.getOwnPropertyDescriptor(n,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning?n.props.ref:n.props.ref||n.ref;return r.cloneElement(n,{...function(e,t){let n={...t};for(let r in t){let i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...e)=>{o(...e),i(...e)}:i&&(n[r]=i):"style"===r?n[r]={...i,...o}:"className"===r&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}(i,n.props),ref:t?(0,s.F)(t,l):l})}return r.Children.count(n)>1?r.Children.only(null):null});w.displayName="SlotClone";var _=({children:e})=>(0,y.jsx)(y.Fragment,{children:e});function x(e){return r.isValidElement(e)&&e.type===_}var C=n(523),S=n(47178),R=n(81523),E=n(1403),k=n(3336),A=n(27130),F=n(55571),M=[" ","Enter","ArrowUp","ArrowDown"],P=[" ","Enter"],O="Select",[V,T,I]=(0,a.B)(O),[D,N]=(0,u.b)(O,[I,m.D7]),j=(0,m.D7)(),[L,Z]=D(O),[z,W]=D(O),H=e=>{let{__scopeSelect:t,children:n,open:i,defaultOpen:o,onOpenChange:l,value:a,defaultValue:s,onValueChange:u,dir:c,name:f,autoComplete:p,disabled:h,required:v,form:b}=e,w=j(t),[_,x]=r.useState(null),[C,R]=r.useState(null),[E,k]=r.useState(!1),A=(0,d.gm)(c),[F=!1,M]=(0,S.T)({prop:i,defaultProp:o,onChange:l}),[P,O]=(0,S.T)({prop:a,defaultProp:s,onChange:u}),T=r.useRef(null),I=!_||b||!!_.closest("form"),[D,N]=r.useState(new Set),Z=Array.from(D).map(e=>e.props.value).join(";");return(0,y.jsx)(m.fC,{...w,children:(0,y.jsxs)(L,{required:v,scope:t,trigger:_,onTriggerChange:x,valueNode:C,onValueNodeChange:R,valueNodeHasChildren:E,onValueNodeHasChildrenChange:k,contentId:(0,g.M)(),value:P,onValueChange:O,open:F,onOpenChange:M,dir:A,triggerPointerDownPosRef:T,disabled:h,children:[(0,y.jsx)(V.Provider,{scope:t,children:(0,y.jsx)(z,{scope:e.__scopeSelect,onNativeOptionAdd:r.useCallback(e=>{N(t=>new Set(t).add(e))},[]),onNativeOptionRemove:r.useCallback(e=>{N(t=>{let n=new Set(t);return n.delete(e),n})},[]),children:n})}),I?(0,y.jsxs)(ek,{"aria-hidden":!0,required:v,tabIndex:-1,name:f,autoComplete:p,value:P,onChange:e=>O(e.target.value),disabled:h,form:b,children:[void 0===P?(0,y.jsx)("option",{value:""}):null,Array.from(D)]},Z):null]})})};H.displayName=O;var B="SelectTrigger",U=r.forwardRef((e,t)=>
1{let{__scopeSelect:n,disabled:i=!1,...o}=e,a=j(n),u=Z(B,n),d=u.disabled||i,c=(0,s.e)(t,u.onTriggerChange),f=T(n),p=r.useRef("touch"),[g,h,b]=eA(e=>{let t=f().filter(e=>!e.disabled),n=t.find(e=>e.value===u.value),r=eF(t,e,n);void 0!==r&&u.onValueChange(r.value)}),w=e=>{d||(u.onOpenChange(!0),b()),e&&(u.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,y.jsx)(m.ee,{asChild:!0,...a,children:(0,y.jsx)(v.WV.button,{type:"button",role:"combobox","aria-controls":u.contentId,"aria-expanded":u.open,"aria-required":u.required,"aria-autocomplete":"none",dir:u.dir,"data-state":u.open?"open":"closed",disabled:d,"data-disabled":d?"":void 0,"data-placeholder":eE(u.value)?"":void 0,...o,ref:c,onClick:(0,l.M)(o.onClick,e=>{e.currentTarget.focus(),"mouse"!==p.current&&w(e)}),onPointerDown:(0,l.M)(o.onPointerDown,e=>{p.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(w(e),e.preventDefault())}),onKeyDown:(0,l.M)(o.onKeyDown,e=>{let t=""!==g.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||h(e.key),(!t||" "!==e.key)&&M.includes(e.key)&&(w(),e.preventDefault())})})})});U.displayName=B;var $="SelectValue",G=r.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,children:o,placeholder:l="",...a}=e,u=Z($,n),{onValueNodeHasChildrenChange:d}=u,c=void 0!==o,f=(0,s.e)(t,u.onValueNodeChange);return(0,R.b)(()=>{d(c)},[d,c]),(0,y.jsx)(v.WV.span,{...a,ref:f,style:{pointerEvents:"none"},children:eE(u.value)?(0,y.jsx)(y.Fragment,{children:l}):o})});G.displayName=$;var q=r.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,...i}=e;return(0,y.jsx)(v.WV.span,{"aria-hidden":!0,...i,ref:t,children:r||"â¼"})});q.displayName="SelectIcon";var K=e=>(0,y.jsx)(h.h,{asChild:!0,...e});K.displayName="SelectPortal";var Y="SelectContent",X=r.forwardRef((e,t)=>{let n=Z(Y,e.__scopeSelect),[o,l]=r.useState();return((0,R.b)(()=>{l(new DocumentFragment)},[]),n.open)?(0,y.jsx)(ee,{...e,ref:t}):o?i.createPortal((0,y.jsx)(J,{scope:e.__scopeSelect,children:(0,y.jsx)(V.Slot,{scope:e.__scopeSelect,children:(0,y.jsx)("div",{children:e.children})})}),o):null});X.displayName=Y;var[J,Q]=D(Y),ee=r.forwardRef((e,t)=>{let{__scopeSelect:n,position:i="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:a,onPointerDownOutside:u,side:d,sideOffset:g,align:m,alignOffset:h,arrowPadding:v,collisionBoundary:w,collisionPadding:_,sticky:x,hideWhenDetached:C,avoidCollisions:S,...R}=e,E=Z(Y,n),[k,M]=r.useState(null),[P,O]=r.useState(null),V=(0,s.e)(t,e=>M(e)),[I,D]=r.useState(null),[N,j]=r.useState(null),L=T(n),[z,W]=r.useState(!1),H=r.useRef(!1);r.useEffect(()=>{if(k)return(0,A.Ry)(k)},[k]),(0,f.EW)();let B=r.useCallback(e=>{let[t,...n]=L().map(e=>e.ref.current),[r]=n.slice(-1),i=document.activeElement;for(let n of e)if(n===i||(null==n||n.scrollIntoView({block:"nearest"}),n===t&&P&&(P.scrollTop=0),n===r&&P&&(P.scrollTop=P.scrollHeight),null==n||n.focus(),document.activeElement!==i))return},[L,P]),U=r.useCallback(()=>B([I,k]),[B,I,k]);r.useEffect(()=>{z&&U()},[z,U]);let{onOpenChange:$,triggerPointerDownPosRef:G}=E;r.useEffect(()=>{if(k){let e={x:0,y:0},t=t=>{var n,r,i,o;e={x:Math.abs(Math.round(t.pageX)-(null!==(i=null===(n=G.current)||void 0===n?void 0:n.x)&&void 0!==i?i:0)),y:Math.abs(Math.round(t.pageY)-(null!==(o=null===(r=G.current)||void 0===r?void 0:r.y)&&void 0!==o?o:0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():k.contains(n.target)||$(!1),document.removeEventListener("pointermove",t),G.current=null};return null!==G.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}},[k,$,G]),r.useEffect(()=>{let e=()=>$(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[$]);let[q,K]=eA(e=>{let t=L().filter(e=>!e.disabled),n=t.find(e=>e.ref.current===document.activeElement),r=eF(t,e,n);r&&setTimeout(()=>r.ref.current.focus())}),X=r.useCallback((e,t,n)=>{let r=!H.current&&!n;(void 0!==E.value&&E.value===t||r)&&(D(e),r&&(H.current=!0))},[E.value]),Q=r.useCallback(()=>null==k?void 0:k.focus(),[k]),ee=r.useCallback((e,t,n)=>{let r=!H.current&&!n;(void 0!==E.value&&E.value===t||r)&&j(e)},[E.value]),er="popper"===i?en:et,ei=er===en?{side:d,sideOffset:g,align:m,alignOffset:h,arrowPadding:v,collisionBoundary:w,collisionPadding:_,sticky:x,hideWhenDetached:C,avoidCollisions:S}:{};return(0,y.jsx)(J,{scope:n,content:k,viewport:P,onViewportChange:O,itemRefCallback:X,selectedItem:I,onItemLeave:Q,itemTextRefCallback:ee,focusSelectedItem:U,selectedItemText:N,position:i,isPositioned:z,searchRef:q,children:(0,y.jsx)(F.Z,{as:b,allowPinchZoom:!0,children:(0,y.jsx)(p.M,{asChild:!0,trapped:E.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:(0,l.M)(o,e=>{var t;null===(t=E.trigger)||void 0===t||t.focus({preventScroll:!0}),e.preventDefault()}),children:(0,y.jsx)(c.XB,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:u,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>E.onOpenChange(!1),children:(0,y.jsx)(er,{role:"listbox",id:E.contentId,"data-state":E.open?"open":"closed",dir:E.dir,onContextMenu:e=>e.preventDefault(),...R,...ei,onPlaced:()=>W(!0),ref:V,style:{display:"flex",flexDirection:"column",outline:"none",...R.style},onKeyDown:(0,l.M)(R.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;
1if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||K(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=L().filter(e=>!e.disabled).map(e=>e.ref.current);if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>B(t)),e.preventDefault()}})})})})})})});ee.displayName="SelectContentImpl";var et=r.forwardRef((e,t)=>{let{__scopeSelect:n,onPlaced:i,...l}=e,a=Z(Y,n),u=Q(Y,n),[d,c]=r.useState(null),[f,p]=r.useState(null),g=(0,s.e)(t,e=>p(e)),m=T(n),h=r.useRef(!1),b=r.useRef(!0),{viewport:w,selectedItem:_,selectedItemText:x,focusSelectedItem:C}=u,S=r.useCallback(()=>{if(a.trigger&&a.valueNode&&d&&f&&w&&_&&x){let e=a.trigger.getBoundingClientRect(),t=f.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),r=x.getBoundingClientRect();if("rtl"!==a.dir){let i=r.left-t.left,l=n.left-i,a=e.left-l,s=e.width+a,u=Math.max(s,t.width),c=o(l,[10,Math.max(10,window.innerWidth-10-u)]);d.style.minWidth=s+"px",d.style.left=c+"px"}else{let i=t.right-r.right,l=window.innerWidth-n.right-i,a=window.innerWidth-e.right-l,s=e.width+a,u=Math.max(s,t.width),c=o(l,[10,Math.max(10,window.innerWidth-10-u)]);d.style.minWidth=s+"px",d.style.right=c+"px"}let l=m(),s=window.innerHeight-20,u=w.scrollHeight,c=window.getComputedStyle(f),p=parseInt(c.borderTopWidth,10),g=parseInt(c.paddingTop,10),v=parseInt(c.borderBottomWidth,10),y=p+g+u+parseInt(c.paddingBottom,10)+v,b=Math.min(5*_.offsetHeight,y),C=window.getComputedStyle(w),S=parseInt(C.paddingTop,10),R=parseInt(C.paddingBottom,10),E=e.top+e.height/2-10,k=_.offsetHeight/2,A=p+g+(_.offsetTop+k);if(A<=E){let e=l.length>0&&_===l[l.length-1].ref.current;d.style.bottom="0px";let t=f.clientHeight-w.offsetTop-w.offsetHeight;d.style.height=A+Math.max(s-E,k+(e?R:0)+t+v)+"px"}else{let e=l.length>0&&_===l[0].ref.current;d.style.top="0px";let t=Math.max(E,p+w.offsetTop+(e?S:0)+k);d.style.height=t+(y-A)+"px",w.scrollTop=A-E+w.offsetTop}d.style.margin="".concat(10,"px 0"),d.style.minHeight=b+"px",d.style.maxHeight=s+"px",null==i||i(),requestAnimationFrame(()=>h.current=!0)}},[m,a.trigger,a.valueNode,d,f,w,_,x,a.dir,i]);(0,R.b)(()=>S(),[S]);let[E,k]=r.useState();(0,R.b)(()=>{f&&k(window.getComputedStyle(f).zIndex)},[f]);let A=r.useCallback(e=>{e&&!0===b.current&&(S(),null==C||C(),b.current=!1)},[S,C]);return(0,y.jsx)(er,{scope:n,contentWrapper:d,shouldExpandOnScrollRef:h,onScrollButtonChange:A,children:(0,y.jsx)("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:E},children:(0,y.jsx)(v.WV.div,{...l,ref:g,style:{boxSizing:"border-box",maxHeight:"100%",...l.style}})})})});et.displayName="SelectItemAlignedPosition";var en=r.forwardRef((e,t)=>{let{__scopeSelect:n,align:r="start",collisionPadding:i=10,...o}=e,l=j(n);return(0,y.jsx)(m.VY,{...l,...o,ref:t,align:r,collisionPadding:i,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});en.displayName="SelectPopperPosition";var[er,ei]=D(Y,{}),eo="SelectViewport",el=r.forwardRef((e,t)=>{let{__scopeSelect:n,nonce:i,...o}=e,a=Q(eo,n),u=ei(eo,n),d=(0,s.e)(t,a.onViewportChange),c=r.useRef(0);return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),(0,y.jsx)(V.Slot,{scope:n,children:(0,y.jsx)(v.WV.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:d,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:(0,l.M)(o.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=u;if((null==r?void 0:r.current)&&n){let e=Math.abs(c.current-t.scrollTop);if(e>0){let r=window.innerHeight-20,i=Math.max(parseFloat(n.style.minHeight),parseFloat(n.style.height));if(i<r){let o=i+e,l=Math.min(r,o),a=o-l;n.style.height=l+"px","0px"===n.style.bottom&&(t.scrollTop=a>0?a:0,n.style.justifyContent="flex-end")}}}c.current=t.scrollTop})})})]})});el.displayName=eo;var ea="SelectGroup",[es,eu]=D(ea),ed=r.forwardRef((e,t)=>
1{let{__scopeSelect:n,...r}=e,i=(0,g.M)();return(0,y.jsx)(es,{scope:n,id:i,children:(0,y.jsx)(v.WV.div,{role:"group","aria-labelledby":i,...r,ref:t})})});ed.displayName=ea;var ec="SelectLabel",ef=r.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=eu(ec,n);return(0,y.jsx)(v.WV.div,{id:i.id,...r,ref:t})});ef.displayName=ec;var ep="SelectItem",[eg,em]=D(ep),eh=r.forwardRef((e,t)=>{let{__scopeSelect:n,value:i,disabled:o=!1,textValue:a,...u}=e,d=Z(ep,n),c=Q(ep,n),f=d.value===i,[p,m]=r.useState(null!=a?a:""),[h,b]=r.useState(!1),w=(0,s.e)(t,e=>{var t;return null===(t=c.itemRefCallback)||void 0===t?void 0:t.call(c,e,i,o)}),_=(0,g.M)(),x=r.useRef("touch"),C=()=>{o||(d.onValueChange(i),d.onOpenChange(!1))};if(""===i)throw Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return(0,y.jsx)(eg,{scope:n,value:i,disabled:o,textId:_,isSelected:f,onItemTextChange:r.useCallback(e=>{m(t=>{var n;return t||(null!==(n=null==e?void 0:e.textContent)&&void 0!==n?n:"").trim()})},[]),children:(0,y.jsx)(V.ItemSlot,{scope:n,value:i,disabled:o,textValue:p,children:(0,y.jsx)(v.WV.div,{role:"option","aria-labelledby":_,"data-highlighted":h?"":void 0,"aria-selected":f&&h,"data-state":f?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...u,ref:w,onFocus:(0,l.M)(u.onFocus,()=>b(!0)),onBlur:(0,l.M)(u.onBlur,()=>b(!1)),onClick:(0,l.M)(u.onClick,()=>{"mouse"!==x.current&&C()}),onPointerUp:(0,l.M)(u.onPointerUp,()=>{"mouse"===x.current&&C()}),onPointerDown:(0,l.M)(u.onPointerDown,e=>{x.current=e.pointerType}),onPointerMove:(0,l.M)(u.onPointerMove,e=>{if(x.current=e.pointerType,o){var t;null===(t=c.onItemLeave)||void 0===t||t.call(c)}else"mouse"===x.current&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:(0,l.M)(u.onPointerLeave,e=>{if(e.currentTarget===document.activeElement){var t;null===(t=c.onItemLeave)||void 0===t||t.call(c)}}),onKeyDown:(0,l.M)(u.onKeyDown,e=>{var t;(null===(t=c.searchRef)||void 0===t?void 0:t.current)!==""&&" "===e.key||(P.includes(e.key)&&C()," "===e.key&&e.preventDefault())})})})})});eh.displayName=ep;var ev="SelectItemText",ey=r.forwardRef((e,t)=>{let{__scopeSelect:n,className:o,style:l,...a}=e,u=Z(ev,n),d=Q(ev,n),c=em(ev,n),f=W(ev,n),[p,g]=r.useState(null),m=(0,s.e)(t,e=>g(e),c.onItemTextChange,e=>{var t;return null===(t=d.itemTextRefCallback)||void 0===t?void 0:t.call(d,e,c.value,c.disabled)}),h=null==p?void 0:p.textContent,b=r.useMemo(()=>(0,y.jsx)("option",{value:c.value,disabled:c.disabled,children:h},c.value),[c.disabled,c.value,h]),{onNativeOptionAdd:w,onNativeOptionRemove:_}=f;return(0,R.b)(()=>(w(b),()=>_(b)),[w,_,b]),(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(v.WV.span,{id:c.textId,...a,ref:m}),c.isSelected&&u.valueNode&&!u.valueNodeHasChildren?i.createPortal(a.children,u.valueNode):null]})});ey.displayName=ev;var eb="SelectItemIndicator",ew=r.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return em(eb,n).isSelected?(0,y.jsx)(v.WV.span,{"aria-hidden":!0,...r,ref:t}):null});ew.displayName=eb;var e_="SelectScrollUpButton";r.forwardRef((e,t)=>{let n=Q(e_,e.__scopeSelect),i=ei(e_,e.__scopeSelect),[o,l]=r.useState(!1),a=(0,s.e)(t,i.onScrollButtonChange);return(0,R.b)(()=>{if(n.viewport&&n.isPositioned){let e=function(){l(t.scrollTop>0)},t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[n.viewport,n.isPositioned]),o?(0,y.jsx)(eC,{...e,ref:a,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null}).displayName=e_;var ex="SelectScrollDownButton";r.forwardRef((e,t)=>{let n=Q(ex,e.__scopeSelect),i=ei(ex,e.__scopeSelect),[o,l]=r.useState(!1),a=(0,s.e)(t,i.onScrollButtonChange);return(0,R.b)(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;l(Math.ceil(t.scrollTop)<e)},t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[n.viewport,n.isPositioned]),o?(0,y.jsx)(eC,{...e,ref:a,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null}).displayName=ex;var eC=r.forwardRef((e,t)=>
1{let{__scopeSelect:n,onAutoScroll:i,...o}=e,a=Q("SelectScrollButton",n),s=r.useRef(null),u=T(n),d=r.useCallback(()=>{null!==s.current&&(window.clearInterval(s.current),s.current=null)},[]);return r.useEffect(()=>()=>d(),[d]),(0,R.b)(()=>{var e;let t=u().find(e=>e.ref.current===document.activeElement);null==t||null===(e=t.ref.current)||void 0===e||e.scrollIntoView({block:"nearest"})},[u]),(0,y.jsx)(v.WV.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:(0,l.M)(o.onPointerDown,()=>{null===s.current&&(s.current=window.setInterval(i,50))}),onPointerMove:(0,l.M)(o.onPointerMove,()=>{var e;null===(e=a.onItemLeave)||void 0===e||e.call(a),null===s.current&&(s.current=window.setInterval(i,50))}),onPointerLeave:(0,l.M)(o.onPointerLeave,()=>{d()})})}),eS=r.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return(0,y.jsx)(v.WV.div,{"aria-hidden":!0,...r,ref:t})});eS.displayName="SelectSeparator";var eR="SelectArrow";function eE(e){return""===e||void 0===e}r.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=j(n),o=Z(eR,n),l=Q(eR,n);return o.open&&"popper"===l.position?(0,y.jsx)(m.Eh,{...i,...r,ref:t}):null}).displayName=eR;var ek=r.forwardRef((e,t)=>{let{value:n,...i}=e,o=r.useRef(null),l=(0,s.e)(t,o),a=(0,E.D)(n);return r.useEffect(()=>{let e=o.current,t=Object.getOwnPropertyDescriptor(window.HTMLSelectElement.prototype,"value").set;if(a!==n&&t){let r=new Event("change",{bubbles:!0});t.call(e,n),e.dispatchEvent(r)}},[a,n]),(0,y.jsx)(k.T,{asChild:!0,children:(0,y.jsx)("select",{...i,ref:l,defaultValue:n})})});function eA(e){let t=(0,C.W)(e),n=r.useRef(""),i=r.useRef(0),o=r.useCallback(e=>{let r=n.current+e;t(r),function e(t){n.current=t,window.clearTimeout(i.current),""!==t&&(i.current=window.setTimeout(()=>e(""),1e3))}(r)},[t]),l=r.useCallback(()=>{n.current="",window.clearTimeout(i.current)},[]);return r.useEffect(()=>()=>window.clearTimeout(i.current),[]),[n,o,l]}function eF(e,t,n){var r;let i=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,o=(r=Math.max(n?e.indexOf(n):-1,0),e.map((t,n)=>e[(r+n)%e.length]));1===i.length&&(o=o.filter(e=>e!==n));let l=o.find(e=>e.textValue.toLowerCase().startsWith(i.toLowerCase()));return l!==n?l:void 0}ek.displayName="BubbleSelect";var eM=H,eP=U,eO=G,eV=q,eT=K,eI=X,eD=el,eN=ed,ej=ef,eL=eh,eZ=ey,ez=ew,eW=eS},32041:function(e,t,n){n.d(t,{f:function(){return u}});var r=n(7653),i=n(56606),o=n(27573),l="horizontal",a=["horizontal","vertical"],s=r.forwardRef((e,t)=>{let{decorative:n,orientation:r=l,...s}=e,u=a.includes(r)?r:l;return(0,o.jsx)(i.WV.div,{"data-orientation":u,...n?{role:"none"}:{"aria-orientation":"vertical"===u?u:void 0,role:"separator"},...s,ref:t})});s.displayName="Separator";var u=s},523:function(e,t,n){n.d(t,{W:function(){return i}});var r=n(7653);function i(e){let t=r.useRef(e);return r.useEffect(()=>{t.current=e}),r.useMemo(()=>(...e)=>t.current?.(...e),[])}},47178:function(e,t,n){n.d(t,{T:function(){return o}});var r=n(7653),i=n(523);function o({prop:e,defaultProp:t,onChange:n=()=>{}}){let[o,l]=function({defaultProp:e,onChange:t}){let n=r.useState(e),[o]=n,l=r.useRef(o),a=(0,i.W)(t);return r.useEffect(()=>{l.current!==o&&(a(o),l.current=o)},[o,l,a]),n}({defaultProp:t,onChange:n}),a=void 0!==e,s=a?e:o,u=(0,i.W)(n);return[s,r.useCallback(t=>{if(a){let n="function"==typeof t?t(e):t;n!==e&&u(n)}else l(t)},[a,e,l,u])]}},81523:function(e,t,n){n.d(t,{b:function(){return i}});var r=n(7653),i=globalThis?.document?r.useLayoutEffect:()=>{}},1403:function(e,t,n){n.d(t,{D:function(){return i}});var r=n(7653);function i(e){let t=r.useRef({value:e,previous:e});return r.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}},35032:function(e,t,n){n.d(t,{t:function(){return o}});var r=n(7653),i=n(81523);function o(e){let[t,n]=r.useState(void 0);return(0,i.b)(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{let r,i;if(!Array.isArray(t)||!t.length)return;let o=t[0];if("borderBoxSize"in o){let e=o.borderBoxSize,t=Array.isArray(e)?e[0]:e;r=t.inlineSize,i=t.blockSize}else r=e.offsetWidth,i=e.offsetHeight;n({width:r,height:i})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)},[e]),t}},3336:function(e,t,n){n.d(t,{T:function(){return l}});var r=n(7653),i=n(56606),o=n(27573),l=r.forwardRef((e,t)=>
1(0,o.jsx)(i.WV.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));l.displayName="VisuallyHidden"},58912:function(e,t,n){n.d(t,{b7:function(){return l},ie:function(){return o}});var r=n(7653),i=n(26492);function o(e,t){return e?"function"==typeof e&&(()=>{let t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()||"function"==typeof e||"object"==typeof e&&"symbol"==typeof e.$$typeof&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)?r.createElement(e,t):e:null}function l(e){let t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=r.useState(()=>({current:(0,i.W_)(t)})),[o,l]=r.useState(()=>n.current.initialState);return n.current.setOptions(t=>({...t,...e,state:{...o,...e.state},onStateChange:t=>{l(t),null==e.onStateChange||e.onStateChange(t)}})),n.current}},26492:function(e,t,n){function r(e,t){return"function"==typeof e?e(t):e}function i(e,t){return n=>{t.setState(t=>({...t,[e]:r(n,t[e])}))}}function o(e){return e instanceof Function}function l(e,t,n){let r,i=[];return o=>{let l,a;n.key&&n.debug&&(l=Date.now());let s=e(o);if(!(s.length!==i.length||s.some((e,t)=>i[t]!==e)))return r;if(i=s,n.key&&n.debug&&(a=Date.now()),r=t(...s),null==n||null==n.onChange||n.onChange(r),n.key&&n.debug&&null!=n&&n.debug()){let e=Math.round((Date.now()-l)*100)/100,t=Math.round((Date.now()-a)*100)/100,r=t/16,i=(e,t)=>{for(e=String(e);e.length<t;)e=" "+e;return e};console.info(`%câ± ${i(t,5)} /${i(e,5)} ms`,` 2 font-size: .6rem; 3 font-weight: bold; 4 color: hsl(${Math.max(0,Math.min(120-120*r,120))}deg 100% 31%);`,null==n?void 0:n.key)}return r}}function a(e,t,n,r){return{debug:()=>{var n;return null!=(n=null==e?void 0:e.debugAll)?n:e[t]},key:!1,onChange:r}}n.d(t,{G_:function(){return $},W_:function(){return H},sC:function(){return B},tj:function(){return G},vL:function(){return U}});let s="debugHeaders";function u(e,t,n){var r;let i={id:null!=(r=n.id)?r:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{let e=[],t=n=>{n.subHeaders&&n.subHeaders.length&&n.subHeaders.map(t),e.push(n)};return t(i),e},getContext:()=>({table:e,header:i,column:t})};return e._features.forEach(t=>{null==t.createHeader||t.createHeader(i,e)}),i}function d(e,t,n,r){var i,o;let l=0,a=function(e,t){void 0===t&&(t=1),l=Math.max(l,t),e.filter(e=>e.getIsVisible()).forEach(e=>{var n;null!=(n=e.columns)&&n.length&&a(e.columns,t+1)},0)};a(e);let s=[],d=(e,t)=>{let i={depth:t,id:[r,`${t}`].filter(Boolean).join("_"),headers:[]},o=[];e.forEach(e=>{let l;let a=[...o].reverse()[0],s=e.column.depth===i.depth,d=!1;if(s&&e.column.parent?l=e.column.parent:(l=e.column,d=!0),a&&(null==a?void 0:a.column)===l)a.subHeaders.push(e);else{let i=u(n,l,{id:[r,t,l.id,null==e?void 0:e.id].filter(Boolean).join("_"),isPlaceholder:d,placeholderId:d?`${o.filter(e=>e.column===l).length}`:void 0,depth:t,index:o.length});i.subHeaders.push(e),o.push(i)}i.headers.push(e),e.headerGroup=i}),s.push(i),t>0&&d(o,t-1)};d(t.map((e,t)=>u(n,e,{depth:l,index:t})),l-1),s.reverse();let c=e=>e.filter(e=>e.column.getIsVisible()).map(e=>{let t=0,n=0,r=[0];return e.subHeaders&&e.subHeaders.length?(r=[],c(e.subHeaders).forEach(e=>{let{colSpan:n,rowSpan:i}=e;t+=n,r.push(i)})):t=1,n+=Math.min(...r),e.colSpan=t,e.rowSpan=n,{colSpan:t,rowSpan:n}});return c(null!=(i=null==(o=s[0])?void 0:o.headers)?i:[]),s}let c=(e,t,n,r,i,o,s)=>{let u={id:t,index:r,original:n,depth:i,parentId:s,_valuesCache:{},_uniqueValuesCache:{},getValue:t=>{if(u._valuesCache.hasOwnProperty(t))return u._valuesCache[t];let n=e.getColumn(t);if(null!=n&&n.accessorFn)return u._valuesCache[t]=n.accessorFn(u.original,r),u._valuesCache[t]},getUniqueValues:t=>{if(u._uniqueValuesCache.hasOwnProperty(t))return u._uniqueValuesCache[t];let n=e.getColumn(t);return null!=n&&n.accessorFn?(n.columnDef.getUniqueValues?u._uniqueValuesCache[t]=n.columnDef.getUniqueValues(u.original,r):u._uniqueValuesCache[t]=[u.getValue(t)],u._uniqueValuesCache[t]):void 0},renderValue:t=>{var n;return null!=(n=u.getValue(t))?n:e.options.renderFallbackValue},subRows:null!=o?o:[],getLeafRows:()=>(function(e,t){let n=[],r=e=>
4{e.forEach(e=>{n.push(e);let i=t(e);null!=i&&i.length&&r(i)})};return r(e),n})(u.subRows,e=>e.subRows),getParentRow:()=>u.parentId?e.getRow(u.parentId,!0):void 0,getParentRows:()=>{let e=[],t=u;for(;;){let n=t.getParentRow();if(!n)break;e.push(n),t=n}return e.reverse()},getAllCells:l(()=>[e.getAllLeafColumns()],t=>t.map(t=>(function(e,t,n,r){let i={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:()=>{var t;return null!=(t=i.getValue())?t:e.options.renderFallbackValue},getContext:l(()=>[e,n,t,i],(e,t,n,r)=>({table:e,column:t,row:n,cell:r,getValue:r.getValue,renderValue:r.renderValue}),a(e.options,"debugCells","cell.getContext"))};return e._features.forEach(r=>{null==r.createCell||r.createCell(i,n,t,e)},{}),i})(e,u,t,t.id)),a(e.options,"debugRows","getAllCells")),_getAllCellsByColumnId:l(()=>[u.getAllCells()],e=>e.reduce((e,t)=>(e[t.column.id]=t,e),{}),a(e.options,"debugRows","getAllCellsByColumnId"))};for(let t=0;t<e._features.length;t++){let n=e._features[t];null==n||null==n.createRow||n.createRow(u,e)}return u},f=(e,t,n)=>{var r,i;let o=null==n||null==(r=n.toString())?void 0:r.toLowerCase();return!!(null==(i=e.getValue(t))||null==(i=i.toString())||null==(i=i.toLowerCase())?void 0:i.includes(o))};f.autoRemove=e=>x(e);let p=(e,t,n)=>{var r;return!!(null==(r=e.getValue(t))||null==(r=r.toString())?void 0:r.includes(n))};p.autoRemove=e=>x(e);let g=(e,t,n)=>{var r;return(null==(r=e.getValue(t))||null==(r=r.toString())?void 0:r.toLowerCase())===(null==n?void 0:n.toLowerCase())};g.autoRemove=e=>x(e);let m=(e,t,n)=>{var r;return null==(r=e.getValue(t))?void 0:r.includes(n)};m.autoRemove=e=>x(e)||!(null!=e&&e.length);let h=(e,t,n)=>!n.some(n=>{var r;return!(null!=(r=e.getValue(t))&&r.includes(n))});h.autoRemove=e=>x(e)||!(null!=e&&e.length);let v=(e,t,n)=>n.some(n=>{var r;return null==(r=e.getValue(t))?void 0:r.includes(n)});v.autoRemove=e=>x(e)||!(null!=e&&e.length);let y=(e,t,n)=>e.getValue(t)===n;y.autoRemove=e=>x(e);let b=(e,t,n)=>e.getValue(t)==n;b.autoRemove=e=>x(e);let w=(e,t,n)=>{let[r,i]=n,o=e.getValue(t);return o>=r&&o<=i};w.resolveFilterValue=e=>{let[t,n]=e,r="number"!=typeof t?parseFloat(t):t,i="number"!=typeof n?parseFloat(n):n,o=null===t||Number.isNaN(r)?-1/0:r,l=null===n||Number.isNaN(i)?1/0:i;if(o>l){let e=o;o=l,l=e}return[o,l]},w.autoRemove=e=>x(e)||x(e[0])&&x(e[1]);let _={includesString:f,includesStringSensitive:p,equalsString:g,arrIncludes:m,arrIncludesAll:h,arrIncludesSome:v,equals:y,weakEquals:b,inNumberRange:w};function x(e){return null==e||""===e}function C(e,t,n){return!!e&&!!e.autoRemove&&e.autoRemove(t,n)||void 0===t||"string"==typeof t&&!t}
4let S={sum:(e,t,n)=>n.reduce((t,n)=>{let r=n.getValue(e);return t+("number"==typeof r?r:0)},0),min:(e,t,n)=>{let r;return n.forEach(t=>{let n=t.getValue(e);null!=n&&(r>n||void 0===r&&n>=n)&&(r=n)}),r},max:(e,t,n)=>{let r;return n.forEach(t=>{let n=t.getValue(e);null!=n&&(r<n||void 0===r&&n>=n)&&(r=n)}),r},extent:(e,t,n)=>{let r,i;return n.forEach(t=>{let n=t.getValue(e);null!=n&&(void 0===r?n>=n&&(r=i=n):(r>n&&(r=n),i<n&&(i=n)))}),[r,i]},mean:(e,t)=>{let n=0,r=0;if(t.forEach(t=>{let i=t.getValue(e);null!=i&&(i=+i)>=i&&(++n,r+=i)}),n)return r/n},median:(e,t)=>{if(!t.length)return;let n=t.map(t=>t.getValue(e));if(!(Array.isArray(n)&&n.every(e=>"number"==typeof e)))return;if(1===n.length)return n[0];let r=Math.floor(n.length/2),i=n.sort((e,t)=>e-t);return n.length%2!=0?i[r]:(i[r-1]+i[r])/2},unique:(e,t)=>Array.from(new Set(t.map(t=>t.getValue(e))).values()),uniqueCount:(e,t)=>new Set(t.map(t=>t.getValue(e))).size,count:(e,t)=>t.length},R=()=>({left:[],right:[]}),E={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},k=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),A=null;function F(e){return"touchstart"===e.type}function M(e,t){return t?"center"===t?e.getCenterVisibleLeafColumns():"left"===t?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}let P=()=>({pageIndex:0,pageSize:10}),O=()=>({top:[],bottom:[]}),V=(e,t,n,r,i)=>{var o;let l=i.getRow(t,!0);n?(l.getCanMultiSelect()||Object.keys(e).forEach(t=>delete e[t]),l.getCanSelect()&&(e[t]=!0)):delete e[t],r&&null!=(o=l.subRows)&&o.length&&l.getCanSelectSubRows()&&l.subRows.forEach(t=>V(e,t.id,n,r,i))};function T(e,t){let n=e.getState().rowSelection,r=[],i={},o=function(e,t){return e.map(e=>{var t;let l=I(e,n);if(l&&(r.push(e),i[e.id]=e),null!=(t=e.subRows)&&t.length&&(e={...e,subRows:o(e.subRows)}),l)return e}).filter(Boolean)};return{rows:o(t.rows),flatRows:r,rowsById:i}}function I(e,t){var n;return null!=(n=t[e.id])&&n}function D(e,t,n){var r;if(!(null!=(r=e.subRows)&&r.length))return!1;let i=!0,o=!1;return e.subRows.forEach(e=>{if((!o||i)&&(e.getCanSelect()&&(I(e,t)?o=!0:i=!1),e.subRows&&e.subRows.length)){let n=D(e,t);"all"===n?o=!0:("some"===n&&(o=!0),i=!1)}}),i?"all":!!o&&"some"}let N=/([0-9]+)/gm;function j(e,t){return e===t?0:e>t?1:-1}function L(e){return"number"==typeof e?isNaN(e)||e===1/0||e===-1/0?"":String(e):"string"==typeof e?e:""}function Z(e,t){let n=e.split(N).filter(Boolean),r=t.split(N).filter(Boolean);for(;n.length&&r.length;){let e=n.shift(),t=r.shift(),i=parseInt(e,10),o=parseInt(t,10),l=[i,o].sort();if(isNaN(l[0])){if(e>t)return 1;if(t>e)return -1;continue}if(isNaN(l[1]))return isNaN(i)?-1:1;if(i>o)return 1;if(o>i)return -1}return n.length-r.length}let z={alphanumeric:(e,t,n)=>Z(L(e.getValue(n)).toLowerCase(),L(t.getValue(n)).toLowerCase()),alphanumericCaseSensitive:(e,t,n)=>Z(L(e.getValue(n)),L(t.getValue(n))),text:(e,t,n)=>j(L(e.getValue(n)).toLowerCase(),L(t.getValue(n)).toLowerCase()),textCaseSensitive:(e,t,n)=>j(L(e.getValue(n)),L(t.getValue(n))),datetime:(e,t,n)=>{let r=e.getValue(n),i=t.getValue(n);return r>i?1:r<i?-1:0},basic:(e,t,n)=>j(e.getValue(n),t.getValue(n))},W=[{createTable:e=>{e.getHeaderGroups=l(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>{var o,l;let a=null!=(o=null==r?void 0:r.map(e=>n.find(t=>t.id===e)).filter(Boolean))?o:[],s=null!=(l=null==i?void 0:i.map(e=>n.find(t=>t.id===e)).filter(Boolean))?l:[];return d(t,[...a,...n.filter(e=>!(null!=r&&r.includes(e.id))&&!(null!=i&&i.includes(e.id))),...s],e)},a(e.options,s,"getHeaderGroups")),e.getCenterHeaderGroups=l(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>d(t,n=n.filter(e=>!(null!=r&&r.includes(e.id))&&!(null!=i&&i.includes(e.id))),e,"center"),a(e.options,s,"getCenterHeaderGroups")),e.getLeftHeaderGroups=l(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,r)=>{var i;return d(t,null!=(i=null==r?void 0:r.map(e=>n.find(t=>
4t.id===e)).filter(Boolean))?i:[],e,"left")},a(e.options,s,"getLeftHeaderGroups")),e.getRightHeaderGroups=l(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,r)=>{var i;return d(t,null!=(i=null==r?void 0:r.map(e=>n.find(t=>t.id===e)).filter(Boolean))?i:[],e,"right")},a(e.options,s,"getRightHeaderGroups")),e.getFooterGroups=l(()=>[e.getHeaderGroups()],e=>[...e].reverse(),a(e.options,s,"getFooterGroups")),e.getLeftFooterGroups=l(()=>[e.getLeftHeaderGroups()],e=>[...e].reverse(),a(e.options,s,"getLeftFooterGroups")),e.getCenterFooterGroups=l(()=>[e.getCenterHeaderGroups()],e=>[...e].reverse(),a(e.options,s,"getCenterFooterGroups")),e.getRightFooterGroups=l(()=>[e.getRightHeaderGroups()],e=>[...e].reverse(),a(e.options,s,"getRightFooterGroups")),e.getFlatHeaders=l(()=>[e.getHeaderGroups()],e=>e.map(e=>e.headers).flat(),a(e.options,s,"getFlatHeaders")),e.getLeftFlatHeaders=l(()=>[e.getLeftHeaderGroups()],e=>e.map(e=>e.headers).flat(),a(e.options,s,"getLeftFlatHeaders")),e.getCenterFlatHeaders=l(()=>[e.getCenterHeaderGroups()],e=>e.map(e=>e.headers).flat(),a(e.options,s,"getCenterFlatHeaders")),e.getRightFlatHeaders=l(()=>[e.getRightHeaderGroups()],e=>e.map(e=>e.headers).flat(),a(e.options,s,"getRightFlatHeaders")),e.getCenterLeafHeaders=l(()=>[e.getCenterFlatHeaders()],e=>e.filter(e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}),a(e.options,s,"getCenterLeafHeaders")),e.getLeftLeafHeaders=l(()=>[e.getLeftFlatHeaders()],e=>e.filter(e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}),a(e.options,s,"getLeftLeafHeaders")),e.getRightLeafHeaders=l(()=>[e.getRightFlatHeaders()],e=>e.filter(e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}),a(e.options,s,"getRightLeafHeaders")),e.getLeafHeaders=l(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(e,t,n)=>{var r,i,o,l,a,s;return[...null!=(r=null==(i=e[0])?void 0:i.headers)?r:[],...null!=(o=null==(l=t[0])?void 0:l.headers)?o:[],...null!=(a=null==(s=n[0])?void 0:s.headers)?a:[]].map(e=>e.getLeafHeaders()).flat()},a(e.options,s,"getLeafHeaders"))}},{getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:i("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(t=>({...t,[e.id]:null!=n?n:!e.getIsVisible()}))},e.getIsVisible=()=>{var n,r;let i=e.columns;return null==(n=i.length?i.some(e=>e.getIsVisible()):null==(r=t.getState().columnVisibility)?void 0:r[e.id])||n},e.getCanHide=()=>{var n,r;return(null==(n=e.columnDef.enableHiding)||n)&&(null==(r=t.options.enableHiding)||r)},e.getToggleVisibilityHandler=()=>t=>{null==e.toggleVisibility||e.toggleVisibility(t.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=l(()=>[e.getAllCells(),t.getState().columnVisibility],e=>e.filter(e=>e.column.getIsVisible()),a(t.options,"debugRows","_getAllVisibleCells")),e.getVisibleCells=l(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(e,t,n)=>[...e,...t,...n],a(t.options,"debugRows","getVisibleCells"))},createTable:e=>{let t=(t,n)=>l(()=>[n(),n().filter(e=>e.getIsVisible()).map(e=>e.id).join("_")],e=>e.filter(e=>null==e.getIsVisible?void 0:e.getIsVisible()),a(e.options,"debugColumns",t));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=t=>null==e.options.onColumnVisibilityChange?void 0:e.options.onColumnVisibilityChange(t),e.resetColumnVisibility=t=>{var n;e.setColumnVisibility(t?{}:null!=(n=e.initialState.columnVisibility)?n:{})},e.toggleAllColumnsVisible=t=>{var n;t=null!=(n=t)?n:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((e,n)=>({...e,[n.id]:t||!(null!=n.getCanHide&&n.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(e=>!(null!=e.getIsVisible&&e.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(e=>null==e.getIsVisible?void 0:e.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>t=>{var n;e.toggleAllColumnsVisible(null==(n=t.target)?void 0:n.checked)}}},{getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:i("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=l(e=>[M(t,e)],t=>t.findIndex(t=>t.id===e.id),a(t.options,"debugColumns","getIndex")),e.getIsFirstColumn=n=>{var r;return(null==(r=M(t,n)[0])?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;let i=M(t,n);return(null==(r=i[i.length-1])?void 0:r.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>null==e.options.onColumnOrderChange?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:null!=(n=e.initialState.columnOrder)?n:[])},e._getOrderColumnsFn=l(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(e,t,n)=>r=>{let i=[];if(null!=e&&e.length){let t=[...e],n=[...r];for(;n.length&&t.length;){let e=t.shift(),r=n.findIndex(t=>t.id===e);r>-1&&i.push(n.splice(r,1)[0])}i=[...i,...n]}else i=r;return function(e,t,n){if(!(null!=t&&t.length)||!n)return e;let r=e.filter(e=>!t.includes(e.id));return"remove"===n?r:[...t.map(t=>e.find(e=>
4e.id===t)).filter(Boolean),...r]}(i,t,n)},a(e.options,"debugTable","_getOrderColumnsFn"))}},{getInitialState:e=>({columnPinning:R(),...e}),getDefaultOptions:e=>({onColumnPinningChange:i("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{let r=e.getLeafColumns().map(e=>e.id).filter(Boolean);t.setColumnPinning(e=>{var t,i,o,l,a,s;return"right"===n?{left:(null!=(o=null==e?void 0:e.left)?o:[]).filter(e=>!(null!=r&&r.includes(e))),right:[...(null!=(l=null==e?void 0:e.right)?l:[]).filter(e=>!(null!=r&&r.includes(e))),...r]}:"left"===n?{left:[...(null!=(a=null==e?void 0:e.left)?a:[]).filter(e=>!(null!=r&&r.includes(e))),...r],right:(null!=(s=null==e?void 0:e.right)?s:[]).filter(e=>!(null!=r&&r.includes(e)))}:{left:(null!=(t=null==e?void 0:e.left)?t:[]).filter(e=>!(null!=r&&r.includes(e))),right:(null!=(i=null==e?void 0:e.right)?i:[]).filter(e=>!(null!=r&&r.includes(e)))}})},e.getCanPin=()=>e.getLeafColumns().some(e=>{var n,r,i;return(null==(n=e.columnDef.enablePinning)||n)&&(null==(r=null!=(i=t.options.enableColumnPinning)?i:t.options.enablePinning)||r)}),e.getIsPinned=()=>{let n=e.getLeafColumns().map(e=>e.id),{left:r,right:i}=t.getState().columnPinning,o=n.some(e=>null==r?void 0:r.includes(e)),l=n.some(e=>null==i?void 0:i.includes(e));return o?"left":!!l&&"right"},e.getPinnedIndex=()=>{var n,r;let i=e.getIsPinned();return i?null!=(n=null==(r=t.getState().columnPinning)||null==(r=r[i])?void 0:r.indexOf(e.id))?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=l(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(e,t,n)=>{let r=[...null!=t?t:[],...null!=n?n:[]];return e.filter(e=>!r.includes(e.column.id))},a(t.options,"debugRows","getCenterVisibleCells")),e.getLeftVisibleCells=l(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(e,t)=>(null!=t?t:[]).map(t=>e.find(e=>e.column.id===t)).filter(Boolean).map(e=>({...e,position:"left"})),a(t.options,"debugRows","getLeftVisibleCells")),e.getRightVisibleCells=l(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(e,t)=>(null!=t?t:[]).map(t=>e.find(e=>e.column.id===t)).filter(Boolean).map(e=>({...e,position:"right"})),a(t.options,"debugRows","getRightVisibleCells"))},createTable:e=>{e.setColumnPinning=t=>null==e.options.onColumnPinningChange?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,r;return e.setColumnPinning(t?R():null!=(n=null==(r=e.initialState)?void 0:r.columnPinning)?n:R())},e.getIsSomeColumnsPinned=t=>{var n,r,i;let o=e.getState().columnPinning;return t?!!(null==(n=o[t])?void 0:n.length):!!((null==(r=o.left)?void 0:r.length)||(null==(i=o.right)?void 0:i.length))},e.getLeftLeafColumns=l(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(e,t)=>(null!=t?t:[]).map(t=>e.find(e=>e.id===t)).filter(Boolean),a(e.options,"debugColumns","getLeftLeafColumns")),e.getRightLeafColumns=l(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(e,t)=>(null!=t?t:[]).map(t=>e.find(e=>e.id===t)).filter(Boolean),a(e.options,"debugColumns","getRightLeafColumns")),e.getCenterLeafColumns=l(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(e,t,n)=>{let r=[...null!=t?t:[],...null!=n?n:[]];return e.filter(e=>!r.includes(e.id))},a(e.options,"debugColumns","getCenterLeafColumns"))}},{createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.i
4d),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},{getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:i("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{let n=t.getCoreRowModel().flatRows[0],r=null==n?void 0:n.getValue(e.id);return"string"==typeof r?_.includesString:"number"==typeof r?_.inNumberRange:"boolean"==typeof r||null!==r&&"object"==typeof r?_.equals:Array.isArray(r)?_.arrIncludes:_.weakEquals},e.getFilterFn=()=>{var n,r;return o(e.columnDef.filterFn)?e.columnDef.filterFn:"auto"===e.columnDef.filterFn?e.getAutoFilterFn():null!=(n=null==(r=t.options.filterFns)?void 0:r[e.columnDef.filterFn])?n:_[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,i;return(null==(n=e.columnDef.enableColumnFilter)||n)&&(null==(r=t.options.enableColumnFilters)||r)&&(null==(i=t.options.enableFilters)||i)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return null==(n=t.getState().columnFilters)||null==(n=n.find(t=>t.id===e.id))?void 0:n.value},e.getFilterIndex=()=>{var n,r;return null!=(n=null==(r=t.getState().columnFilters)?void 0:r.findIndex(t=>t.id===e.id))?n:-1},e.setFilterValue=n=>{t.setColumnFilters(t=>{var i,o;let l=e.getFilterFn(),a=null==t?void 0:t.find(t=>t.id===e.id),s=r(n,a?a.value:void 0);if(C(l,s,e))return null!=(i=null==t?void 0:t.filter(t=>t.id!==e.id))?i:[];let u={id:e.id,value:s};return a?null!=(o=null==t?void 0:t.map(t=>t.id===e.id?u:t))?o:[]:null!=t&&t.length?[...t,u]:[u]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{let n=e.getAllLeafColumns();null==e.options.onColumnFiltersChange||e.options.onColumnFiltersChange(e=>{var i;return null==(i=r(t,e))?void 0:i.filter(e=>{let t=n.find(t=>t.id===e.id);return!(t&&C(t.getFilterFn(),e.value,t))})})},e.resetColumnFilters=t=>{var n,r;e.setColumnFilters(t?[]:null!=(n=null==(r=e.initialState)?void 0:r.columnFilters)?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel)?e.getPreFilteredRowModel():e._getFilteredRowModel()}},{createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},{getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:i("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;let r=null==(n=e.getCoreRowModel().flatRows[0])||null==(n=n._getAllCellsByColumnId()[t.id])?void 0:n.getValue();return"string"==typeof r||"number"==typeof r}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,r,i,o;return(null==(n=e.columnDef.enableGlobalFilter)||n)&&(null==(r=t.options.enableGlobalFilter)||r)&&(null==(i=t.options.enableFilters)||i)&&(null==(o=null==t.options.getColumnCanGlobalFilter?void 0:t.options.getColumnCanGlobalFilter(e))||o)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>_.includesString,e.getGlobalFilterFn=()=>{var t,n;let{globalFilterFn:r}=e.options;return o(r)?r:"auto"===r?e.getGlobalAutoFilterFn():null!=(t=null==(n=e.options.filterFns)?void 0:n[r])?t:_[r]},e.setGlobalFilter=t=>{null==e.options.onGlobalFilterChange||e.options.onGlobalFilterChange(t)}
4,e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},{getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:i("sorting",e),isMultiSortEvent:e=>e.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{let n=t.getFilteredRowModel().flatRows.slice(10),r=!1;for(let t of n){let n=null==t?void 0:t.getValue(e.id);if("[object Date]"===Object.prototype.toString.call(n))return z.datetime;if("string"==typeof n&&(r=!0,n.split(N).length>1))return z.alphanumeric}return r?z.text:z.basic},e.getAutoSortDir=()=>{let n=t.getFilteredRowModel().flatRows[0];return"string"==typeof(null==n?void 0:n.getValue(e.id))?"asc":"desc"},e.getSortingFn=()=>{var n,r;if(!e)throw Error();return o(e.columnDef.sortingFn)?e.columnDef.sortingFn:"auto"===e.columnDef.sortingFn?e.getAutoSortingFn():null!=(n=null==(r=t.options.sortingFns)?void 0:r[e.columnDef.sortingFn])?n:z[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{let i=e.getNextSortingOrder(),o=null!=n;t.setSorting(l=>{let a;let s=null==l?void 0:l.find(t=>t.id===e.id),u=null==l?void 0:l.findIndex(t=>t.id===e.id),d=[],c=o?n:"desc"===i;if("toggle"!=(a=null!=l&&l.length&&e.getCanMultiSort()&&r?s?"toggle":"add":null!=l&&l.length&&u!==l.length-1?"replace":s?"toggle":"replace")||o||i||(a="remove"),"add"===a){var f;(d=[...l,{id:e.id,desc:c}]).splice(0,d.length-(null!=(f=t.options.maxMultiSortColCount)?f:Number.MAX_SAFE_INTEGER))}else d="toggle"===a?l.map(t=>t.id===e.id?{...t,desc:c}:t):"remove"===a?l.filter(t=>t.id!==e.id):[{id:e.id,desc:c}];return d})},e.getFirstSortDir=()=>{var n,r;return(null!=(n=null!=(r=e.columnDef.sortDescFirst)?r:t.options.sortDescFirst)?n:"desc"===e.getAutoSortDir())?"desc":"asc"},e.getNextSortingOrder=n=>{var r,i;let o=e.getFirstSortDir(),l=e.getIsSorted();return l?(l===o||null!=(r=t.options.enableSortingRemoval)&&!r||!!n&&null!=(i=t.options.enableMultiRemove)&&!i)&&("desc"===l?"asc":"desc"):o},e.getCanSort=()=>{var n,r;return(null==(n=e.columnDef.enableSorting)||n)&&(null==(r=t.options.enableSorting)||r)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,r;return null!=(n=null!=(r=e.columnDef.enableMultiSort)?r:t.options.enableMultiSort)?n:!!e.accessorFn},e.getIsSorted=()=>{var n;let r=null==(n=t.getState().sorting)?void 0:n.find(t=>t.id===e.id);return!!r&&(r.desc?"desc":"asc")},e.getSortIndex=()=>{var n,r;return null!=(n=null==(r=t.getState().sorting)?void 0:r.findIndex(t=>t.id===e.id))?n:-1},e.clearSorting=()=>{t.setSorting(t=>null!=t&&t.length?t.filter(t=>t.id!==e.id):[])},e.getToggleSortingHandler=()=>{let n=e.getCanSort();return r=>{n&&(null==r.persist||r.persist(),null==e.toggleSorting||e.toggleSorting(void 0,!!e.getCanMultiSort()&&(null==t.options.isMultiSortEvent?void 0:t.options.isMultiSortEvent(r))))}}},createTable:e=>{e.setSorting=t=>null==e.options.onSortingChange?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,r;e.setSorting(t?[]:null!=(n=null==(r=e.initialState)?void 0:r.sorting)?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel)?e.getPreSortedRowModel():e._getSortedRowModel()}},{getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return null!=(t=null==(n=e.getValue())||null==n.toString?void 0:n.toString())?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:i("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(t=>null!=t&&t.includes(e.id)?t.filter(t=>t!==e.id):[...null!=t?t:[],e.id])},e.getCanGroup=()=>{var n,r;return(null==(n=e.columnDef.enableGrouping)||n)&&(null==(r=t.options.enableGrouping)||r)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return null==(n=t.getState().grouping)?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return null==(n=t.getState().grouping)?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{let t=e.getCanGroup();return()=>{t&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{let n=t.getCoreRowModel().flatRows[0],r=null==n?void 0:n.getValue(e.id);return"number"==typeof r?S.sum:"[object Date]"===Object.prototype.toString.call(r)?S.extent:void 0},e.getAggregationFn=()=>{var n,r;if(!e)throw Error();return o(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:"auto"===e.columnDef.aggregationFn?e.getAutoAggregationFn():null!=(n=null==(r=t.options.aggregationFns)?void 0:r[e.columnDef.aggregationFn])?n:S[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>null==e.options.onGroupingChange?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,r;e.setGrouping(t?[]:null!=(n=null==(r=e.initialState)?void 0:r.grouping)?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel)?e.getPreGroupedRowModel():e._getGroupedRowModel()},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];let r=t.getColumn(n);return null!=r&&r.columnDef.getGroupingValue?(e._groupingValuesCache[n]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,r)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var t;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!(null!=(t=n.subRows)&&t.length)}}},{getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:i("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var r,i;if(!t){e._queue(()=>{t=!0});return}if(null!=(r=null!=(i=e.options.autoResetAll)?i:e.options.autoResetExpanded)?r:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=t=>null==e.options.onExpandedChange?void 0:e.options.onExpandedChange(t),e.toggleAllRowsExpanded=t=>{(null!=t?t:!e.getIsAllRowsExpanded())?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=t=>{var n,r;e.setExpanded(t?{}:null!=(n=null==(r=e.initialState)?void 0:r.expanded)?n:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(e=>e.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>t=>{null==t.persist||t.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{let t=e.getState().expanded;return!0===t||Object.values(t).some(Boolean)},e.getIsAllRowsExpanded=()=>{let t=e.getState().expanded;return"boolean"==typeof t?!0===t:!(!Object.keys(t).length||e.getRowModel().flatRows.some(e=>!e.getIsExpanded()))},e.getExpandedDepth=()=>{let t=0;return(!0===e.getState().expanded?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEac
4h(e=>{let n=e.split(".");t=Math.max(t,n.length)}),t},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel)?e.getPreExpandedRowModel():e._getExpandedRowModel()},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded(r=>{var i;let o=!0===r||!!(null!=r&&r[e.id]),l={};if(!0===r?Object.keys(t.getRowModel().rowsById).forEach(e=>{l[e]=!0}):l=r,n=null!=(i=n)?i:!o,!o&&n)return{...l,[e.id]:!0};if(o&&!n){let{[e.id]:t,...n}=l;return n}return r})},e.getIsExpanded=()=>{var n;let r=t.getState().expanded;return!!(null!=(n=null==t.options.getIsRowExpanded?void 0:t.options.getIsRowExpanded(e))?n:!0===r||(null==r?void 0:r[e.id]))},e.getCanExpand=()=>{var n,r,i;return null!=(n=null==t.options.getRowCanExpand?void 0:t.options.getRowCanExpand(e))?n:(null==(r=t.options.enableExpanding)||r)&&!!(null!=(i=e.subRows)&&i.length)},e.getIsAllParentsExpanded=()=>{let n=!0,r=e;for(;n&&r.parentId;)n=(r=t.getRow(r.parentId,!0)).getIsExpanded();return n},e.getToggleExpandedHandler=()=>{let t=e.getCanExpand();return()=>{t&&e.toggleExpanded()}}}},{getInitialState:e=>({...e,pagination:{...P(),...null==e?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:i("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var r,i;if(!t){e._queue(()=>{t=!0});return}if(null!=(r=null!=(i=e.options.autoResetAll)?i:e.options.autoResetPageIndex)?r:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=t=>null==e.options.onPaginationChange?void 0:e.options.onPaginationChange(e=>r(t,e)),e.resetPagination=t=>{var n;e.setPagination(t?P():null!=(n=e.initialState.pagination)?n:P())},e.setPageIndex=t=>{e.setPagination(n=>{let i=r(t,n.pageIndex);return i=Math.max(0,Math.min(i,void 0===e.options.pageCount||-1===e.options.pageCount?Number.MAX_SAFE_INTEGER:e.options.pageCount-1)),{...n,pageIndex:i}})},e.resetPageIndex=t=>{var n,r;e.setPageIndex(t?0:null!=(n=null==(r=e.initialState)||null==(r=r.pagination)?void 0:r.pageIndex)?n:0)},e.resetPageSize=t=>{var n,r;e.setPageSize(t?10:null!=(n=null==(r=e.initialState)||null==(r=r.pagination)?void 0:r.pageSize)?n:10)},e.setPageSize=t=>{e.setPagination(e=>{let n=Math.max(1,r(t,e.pageSize)),i=e.pageSize*e.pageIndex;return{...e,pageIndex:Math.floor(i/n),pageSize:n}})},e.setPageCount=t=>e.setPagination(n=>{var i;let o=r(t,null!=(i=e.options.pageCount)?i:-1);return"number"==typeof o&&(o=Math.max(-1,o)),{...n,pageCount:o}}),e.getPageOptions=l(()=>[e.getPageCount()],e=>{let t=[];return e&&e>0&&(t=[...Array(e)].fill(null).map((e,t)=>t)),t},a(e.options,"debugTable","getPageOptions")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{let{pageIndex:t}=e.getState().pagination,n=e.getPageCount();return -1===n||0!==n&&t<n-1},e.previousPage=()=>e.setPageIndex(e=>e-1),e.nextPage=()=>e.setPageIndex(e=>e+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel)?e.getPrePaginationRowModel():e._getPaginationRowModel(),e.getPageCount=()=>{var t;return null!=(t=e.options.pageCount)?t:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var t;return null!=(t=e.options.rowCount)?t:e.getPrePaginationRowModel().rows.length}}},{getInitialState:e=>({rowPinning:O(),...e}),getDefaultOptions:e=>({onRowPinningChange:i("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,r,i)=>{let o=r?e.getLeafRows().map(e=>{let{id:t}=e;return t}):[],l=new Set([...i?e.getParentRows().map(e=>{let{id:t}=e;return t}):[],e.id,...o]);t.setRowPinning(e=>{var t,r,i,o,a,s;return"bottom"===n?{top:(null!=(i=null==e?void 0:e.top)?i:[]).filter(e=>!(null!=l&&l.has(e))),bottom:[...(null!=(o=null==e?void 0:e.bottom)?o:[]).filter(e=>!(null!=l&&l.has(e))),...Array.from(l)]}:"top"===n?{top:[...(null!=(a=null==e?void 0:e.top)?a:[]).filter(e=>!(null!=l&&l.has(e))),...Array.from(l)],bottom:(null!=(s=null==e?void 0:e.bottom)?s:[]).filter(e=>!(null!=l&&l.has(e)))}:{top:(null!=(t=null==e?void 0:e.top)?t:[]).filter(e=>!(null!=l&&l.has(e))),bottom:(null!=(r=null==e?void 0:e.bottom)?r:[]).filter(e=>!(null!=l&&l.has(e)))}})},e.getCanPin=()=>{var n;let{enableRowPinning:r,enablePinning:i}=t.options;return"function"==typeof r?r(e):null==(n=null!=r?r:i)||n},e.getIsPinned=()=>{let n=[e.id],{top:r,bottom:i}=t.getState().rowPinning,o=n.some(e=>null==r?void 0:r.includes(e)),l=n.some(e=>null==i?void 0:i.includes(e));return o?"top":!!l&&"bottom"},e.getPinnedIndex=()=>{var n,r;let i=e.getIsPinned();if(!i)return -1;let o=null==(n="top"===i?t.getTopRows():t.getBottomRows())?void 0:n.map(e=>{let{id:t}=e;return t});return null!=(r=null==o?void 0:o.indexOf(e.id))?r:-1}},createTable:e=>{e.setRowPinning=t=>null==e.options.onRowPinningChange?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,r;return e.setRowPinning(t?O():null!=(n=null==(r=e.initialState)?void 0:r.rowPinning)?n:O())},e.getIsSomeRowsPinned=t=>{var n,r,i;let o=e.getState().rowPinning;return t?!!(null==(n=o[t])?void 0:n.length):!!((null==(r=o.top)?void 0:r.length)||(null==(i=o.bottom)?void 0:i.length))},e._getPinnedRows=(t,n,r)=>{var i;return(null==(i=e.options.keepPinnedRows)||i?(null!=n?n:[]).map(t=>{let n=e.getRow(t,!0);return n.getIsAllParentsExpanded()?n:null}):(null!=n?n:[]).map(e=>t.find(t=>
4t.id===e))).filter(Boolean).map(e=>({...e,position:r}))},e.getTopRows=l(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),a(e.options,"debugRows","getTopRows")),e.getBottomRows=l(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),a(e.options,"debugRows","getBottomRows")),e.getCenterRows=l(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(e,t,n)=>{let r=new Set([...null!=t?t:[],...null!=n?n:[]]);return e.filter(e=>!r.has(e.id))},a(e.options,"debugRows","getCenterRows"))}},{getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:i("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>null==e.options.onRowSelectionChange?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:null!=(n=e.initialState.rowSelection)?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=void 0!==t?t:!e.getIsAllRowsSelected();let r={...n},i=e.getPreGroupedRowModel().flatRows;return t?i.forEach(e=>{e.getCanSelect()&&(r[e.id]=!0)}):i.forEach(e=>{delete r[e.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{let r=void 0!==t?t:!e.getIsAllPageRowsSelected(),i={...n};return e.getRowModel().rows.forEach(t=>{V(i,t.id,r,!0,e)}),i}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=l(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?T(e,n):{rows:[],flatRows:[],rowsById:{}},a(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=l(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?T(e,n):{rows:[],flatRows:[],rowsById:{}},a(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=l(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?T(e,n):{rows:[],flatRows:[],rowsById:{}},a(e.options,"debugTable","getGroupedSelectedRowModel")),e.getIsAllRowsSelected=()=>{let t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState(),r=!!(t.length&&Object.keys(n).length);return r&&t.some(e=>e.getCanSelect()&&!n[e.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{let t=e.getPaginationRowModel().flatRows.filter(e=>e.getCanSelect()),{rowSelection:n}=e.getState(),r=!!t.length;return r&&t.some(e=>!n[e.id])&&(r=!1),r},e.getIsSomeRowsSelected=()=>{var t;let n=Object.keys(null!=(t=e.getState().rowSelection)?t:{}).length;return n>0&&n<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{let t=e.getPaginationRowModel().flatRows;return!e.getIsAllPageRowsSelected()&&t.filter(e=>e.getCanSelect()).some(e=>e.getIsSelected()||e.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,r)=>{let i=e.getIsSelected();t.setRowSelection(o=>{var l;if(n=void 0!==n?n:!i,e.getCanSelect()&&i===n)return o;let a={...o};return V(a,e.id,n,null==(l=null==r?void 0:r.selectChildren)||l,t),a})},e.getIsSelected=()=>{let{rowSelection:n}=t.getState();return I(e,n)},e.getIsSomeSelected=()=>{let{rowSelection:n}=t.getState();return"some"===D(e,n)},e.getIsAllSubRowsSelected=()=>{let{rowSelection:n}=t.getState();return"all"===D(e,n)},e.getCanSelect=()=>{var n;return"function"==typeof t.options.enableRowSelection?t.options.enableRowSelection(e):null==(n=t.options.enableRowSelection)||n},e.getCanSelectSubRows=()=>{var n;return"function"==typeof t.options.enableSubRowSelection?t.options.enableSubRowSelection(e):null==(n=t.options.enableSubRowSelection)||n},e.getCanMultiSelect=()=>{var n;return"function"==typeof t.options.enableMultiRowSelection?t.options.enableMultiRowSelection(e):null==(n=t.options.enableMultiRowSelection)||n},e.getToggleSelectedHandler=()=>{let t=e.getCanSelect();return n=>{var r;t&&e.toggleSelected(null==(r=n.target)?void 0:r.checked)}}}},{getDefaultColumnDef:()=>E,getInitialState:e=>({columnSizing:{},columnSizingInfo:k(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:i("columnSizing",e),onColumnSizingInfoChange:i("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,i;let o=t.getState().columnSizing[e.id];return Math.min(Math.max(null!=(n=e.columnDef.minSize)?n:E.minSize,null!=(r=null!=o?o:e.columnDef.size)?r:E.size),null!=(i=e.columnDef.maxSize)?i:E.maxSize)},e.getStart=l(e=>[e,M(t,e),t.getState().columnSizing],(t,n)=>n.slice(0,e.getIndex(t)).reduce((e,t)=>
4e+t.getSize(),0),a(t.options,"debugColumns","getStart")),e.getAfter=l(e=>[e,M(t,e),t.getState().columnSizing],(t,n)=>n.slice(e.getIndex(t)+1).reduce((e,t)=>e+t.getSize(),0),a(t.options,"debugColumns","getAfter")),e.resetSize=()=>{t.setColumnSizing(t=>{let{[e.id]:n,...r}=t;return r})},e.getCanResize=()=>{var n,r;return(null==(n=e.columnDef.enableResizing)||n)&&(null==(r=t.options.enableColumnResizing)||r)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let t=0,n=e=>{if(e.subHeaders.length)e.subHeaders.forEach(n);else{var r;t+=null!=(r=e.column.getSize())?r:0}};return n(e),t},e.getStart=()=>{if(e.index>0){let t=e.headerGroup.headers[e.index-1];return t.getStart()+t.getSize()}return 0},e.getResizeHandler=n=>{let r=t.getColumn(e.column.id),i=null==r?void 0:r.getCanResize();return o=>{if(!r||!i||(null==o.persist||o.persist(),F(o)&&o.touches&&o.touches.length>1))return;let l=e.getSize(),a=e?e.getLeafHeaders().map(e=>[e.column.id,e.column.getSize()]):[[r.id,r.getSize()]],s=F(o)?Math.round(o.touches[0].clientX):o.clientX,u={},d=(e,n)=>{"number"==typeof n&&(t.setColumnSizingInfo(e=>{var r,i;let o="rtl"===t.options.columnResizeDirection?-1:1,l=(n-(null!=(r=null==e?void 0:e.startOffset)?r:0))*o,a=Math.max(l/(null!=(i=null==e?void 0:e.startSize)?i:0),-.999999);return e.columnSizingStart.forEach(e=>{let[t,n]=e;u[t]=Math.round(100*Math.max(n+n*a,0))/100}),{...e,deltaOffset:l,deltaPercentage:a}}),("onChange"===t.options.columnResizeMode||"end"===e)&&t.setColumnSizing(e=>({...e,...u})))},c=e=>d("move",e),f=e=>{d("end",e),t.setColumnSizingInfo(e=>({...e,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},p=n||"undefined"!=typeof document?document:null,g={moveHandler:e=>c(e.clientX),upHandler:e=>{null==p||p.removeEventListener("mousemove",g.moveHandler),null==p||p.removeEventListener("mouseup",g.upHandler),f(e.clientX)}},m={moveHandler:e=>(e.cancelable&&(e.preventDefault(),e.stopPropagation()),c(e.touches[0].clientX),!1),upHandler:e=>{var t;null==p||p.removeEventListener("touchmove",m.moveHandler),null==p||p.removeEventListener("touchend",m.upHandler),e.cancelable&&(e.preventDefault(),e.stopPropagation()),f(null==(t=e.touches[0])?void 0:t.clientX)}},h=!!function(){if("boolean"==typeof A)return A;let e=!1;try{let t=()=>{};window.addEventListener("test",t,{get passive(){return e=!0,!1}}),window.removeEventListener("test",t)}catch(t){e=!1}return A=e}()&&{passive:!1};F(o)?(null==p||p.addEventListener("touchmove",m.moveHandler,h),null==p||p.addEventListener("touchend",m.upHandler,h)):(null==p||p.addEventListener("mousemove",g.moveHandler,h),null==p||p.addEventListener("mouseup",g.upHandler,h)),t.setColumnSizingInfo(e=>({...e,startOffset:s,startSize:l,deltaOffset:0,deltaPercentage:0,columnSizingStart:a,isResizingColumn:r.id}))}}},createTable:e=>{e.setColumnSizing=t=>null==e.options.onColumnSizingChange?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>null==e.options.onColumnSizingInfoChange?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:null!=(n=e.initialState.columnSizing)?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?k():null!=(n=e.initialState.columnSizingInfo)?n:k())},e.getTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getHeaderGroups()[0])?void 0:n.headers.reduce((e,t)=>e+t.getSize(),0))?t:0},e.getLeftTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getLeftHeaderGroups()[0])?void 0:n.headers.reduce((e,t)=>e+t.getSize(),0))?t:0},e.getCenterTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getCenterHeaderGroups()[0])?void 0:n.headers.reduce((e,t)=>e+t.getSize(),0))?t:0},e.getRightTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getRightHeaderGroups()[0])?void 0:n.headers.reduce((e,t)=>e+t.getSize(),0))?t:0}}}];function H(e){var t,n;let i=[...W,...null!=(t=e._features)?t:[]],o={_features:i},s=o._features.reduce((e,t)=>Object.assign(e,null==t.getDefaultOptions?void 0:t.getDefaultOptions(o)),{}),u=e=>o.options.mergeOptions?o.options.mergeOptions(s,e):{...s,...e},d={...null!=(n=e.initialState)?n:{}};
4o._features.forEach(e=>{var t;d=null!=(t=null==e.getInitialState?void 0:e.getInitialState(d))?t:d});let c=[],f=!1,p={_features:i,options:{...s,...e},initialState:d,_queue:e=>{c.push(e),f||(f=!0,Promise.resolve().then(()=>{for(;c.length;)c.shift()();f=!1}).catch(e=>setTimeout(()=>{throw e})))},reset:()=>{o.setState(o.initialState)},setOptions:e=>{let t=r(e,o.options);o.options=u(t)},getState:()=>o.options.state,setState:e=>{null==o.options.onStateChange||o.options.onStateChange(e)},_getRowId:(e,t,n)=>{var r;return null!=(r=null==o.options.getRowId?void 0:o.options.getRowId(e,t,n))?r:`${n?[n.id,t].join("."):t}`},getCoreRowModel:()=>(o._getCoreRowModel||(o._getCoreRowModel=o.options.getCoreRowModel(o)),o._getCoreRowModel()),getRowModel:()=>o.getPaginationRowModel(),getRow:(e,t)=>{let n=(t?o.getPrePaginationRowModel():o.getRowModel()).rowsById[e];if(!n&&!(n=o.getCoreRowModel().rowsById[e]))throw Error();return n},_getDefaultColumnDef:l(()=>[o.options.defaultColumn],e=>{var t;return e=null!=(t=e)?t:{},{header:e=>{let t=e.header.column.columnDef;return t.accessorKey?t.accessorKey:t.accessorFn?t.id:null},cell:e=>{var t,n;return null!=(t=null==(n=e.renderValue())||null==n.toString?void 0:n.toString())?t:null},...o._features.reduce((e,t)=>Object.assign(e,null==t.getDefaultColumnDef?void 0:t.getDefaultColumnDef()),{}),...e}},a(e,"debugColumns","_getDefaultColumnDef")),_getColumnDefs:()=>o.options.columns,getAllColumns:l(()=>[o._getColumnDefs()],e=>{let t=function(e,n,r){return void 0===r&&(r=0),e.map(e=>{let i=function(e,t,n,r){var i,o;let s;let u={...e._getDefaultColumnDef(),...t},d=u.accessorKey,c=null!=(i=null!=(o=u.id)?o:d?"function"==typeof String.prototype.replaceAll?d.replaceAll(".","_"):d.replace(/\./g,"_"):void 0)?i:"string"==typeof u.header?u.header:void 0;if(u.accessorFn?s=u.accessorFn:d&&(s=d.includes(".")?e=>{let t=e;for(let e of d.split(".")){var n;t=null==(n=t)?void 0:n[e]}return t}:e=>e[u.accessorKey]),!c)throw Error();let f={id:`${String(c)}`,accessorFn:s,parent:r,depth:n,columnDef:u,columns:[],getFlatColumns:l(()=>[!0],()=>{var e;return[f,...null==(e=f.columns)?void 0:e.flatMap(e=>e.getFlatColumns())]},a(e.options,"debugColumns","column.getFlatColumns")),getLeafColumns:l(()=>[e._getOrderColumnsFn()],e=>{var t;return null!=(t=f.columns)&&t.length?e(f.columns.flatMap(e=>e.getLeafColumns())):[f]},a(e.options,"debugColumns","column.getLeafColumns"))};for(let t of e._features)null==t.createColumn||t.createColumn(f,e);return f}(o,e,r,n);return i.columns=e.columns?t(e.columns,i,r+1):[],i})};return t(e)},a(e,"debugColumns","getAllColumns")),getAllFlatColumns:l(()=>[o.getAllColumns()],e=>e.flatMap(e=>e.getFlatColumns()),a(e,"debugColumns","getAllFlatColumns")),_getAllFlatColumnsById:l(()=>[o.getAllFlatColumns()],e=>e.reduce((e,t)=>(e[t.id]=t,e),{}),a(e,"debugColumns","getAllFlatColumnsById")),getAllLeafColumns:l(()=>[o.getAllColumns(),o._getOrderColumnsFn()],(e,t)=>t(e.flatMap(e=>e.getLeafColumns())),a(e,"debugColumns","getAllLeafColumns")),getColumn:e=>o._getAllFlatColumnsById()[e]};Object.assign(o,p);for(let e=0;e<o._features.length;e++){let t=o._features[e];null==t||null==t.createTable||t.createTable(o)}return o}function B(){return e=>l(()=>[e.options.data],t=>{let n={rows:[],flatRows:[],rowsById:{}},r=function(t,i,o){void 0===i&&(i=0);let l=[];for(let s=0;s<t.length;s++){let u=c(e,e._getRowId(t[s],s,o),t[s],s,i,void 0,null==o?void 0:o.id);if(n.flatRows.push(u),n.rowsById[u.id]=u,l.push(u),e.options.getSubRows){var a;u.originalSubRows=e.options.getSubRows(t[s],s),null!=(a=u.originalSubRows)&&a.length&&(u.subRows=r(u.originalSubRows,i+1,u))}}return l};return n.rows=r(t),n},a(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function U(){return e=>l(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter],(t,n,r)=>{var i,o;let l,a;if(!t.rows.length||!(null!=n&&n.length)&&!r){for(let e=0;e<t.flatRows.length;e++)t.flatRows[e].columnFilters={},t.flatRows[e].columnFiltersMeta={};return t}let s=[],u=[];(null!=n?n:[]).forEach(t=>{var n;let r=e.getColumn(t.id);if(!r)return;let i=r.getFilterFn();i&&s.push({id:t.id,filterFn:i,resolvedValue:null!=(n=null==i.resolveFilterValue?void 0:i.resolveFilterValue(t.value))?n:t.value})});let d=(null!=n?n:[]).map(e=>e.id),f=e.getGlobalFilterFn(),p=e.getAllLeafColumns().filter(e=>e.getCanGlobalFilter());
4r&&f&&p.length&&(d.push("__global__"),p.forEach(e=>{var t;u.push({id:e.id,filterFn:f,resolvedValue:null!=(t=null==f.resolveFilterValue?void 0:f.resolveFilterValue(r))?t:r})}));for(let e=0;e<t.flatRows.length;e++){let n=t.flatRows[e];if(n.columnFilters={},s.length)for(let e=0;e<s.length;e++){let t=(l=s[e]).id;n.columnFilters[t]=l.filterFn(n,t,l.resolvedValue,e=>{n.columnFiltersMeta[t]=e})}if(u.length){for(let e=0;e<u.length;e++){let t=(a=u[e]).id;if(a.filterFn(n,t,a.resolvedValue,e=>{n.columnFiltersMeta[t]=e})){n.columnFilters.__global__=!0;break}}!0!==n.columnFilters.__global__&&(n.columnFilters.__global__=!1)}}return i=t.rows,o=e=>{for(let t=0;t<d.length;t++)if(!1===e.columnFilters[d[t]])return!1;return!0},e.options.filterFromLeafRows?function(e,t,n){var r;let i=[],o={},l=null!=(r=n.options.maxLeafRowFilterDepth)?r:100,a=function(e,r){void 0===r&&(r=0);let s=[];for(let d=0;d<e.length;d++){var u;let f=e[d],p=c(n,f.id,f.original,f.index,f.depth,void 0,f.parentId);if(p.columnFilters=f.columnFilters,null!=(u=f.subRows)&&u.length&&r<l){if(p.subRows=a(f.subRows,r+1),t(f=p)&&!p.subRows.length||t(f)||p.subRows.length){s.push(f),o[f.id]=f,i.push(f);continue}}else t(f=p)&&(s.push(f),o[f.id]=f,i.push(f))}return s};return{rows:a(e),flatRows:i,rowsById:o}}(i,o,e):function(e,t,n){var r;let i=[],o={},l=null!=(r=n.options.maxLeafRowFilterDepth)?r:100,a=function(e,r){void 0===r&&(r=0);let s=[];for(let d=0;d<e.length;d++){let f=e[d];if(t(f)){var u;if(null!=(u=f.subRows)&&u.length&&r<l){let e=c(n,f.id,f.original,f.index,f.depth,void 0,f.parentId);e.subRows=a(f.subRows,r+1),f=e}s.push(f),i.push(f),o[f.id]=f}}return s};return{rows:a(e),flatRows:i,rowsById:o}}(i,o,e)},a(e.options,"debugTable","getFilteredRowModel",()=>e._autoResetPageIndex()))}function $(e){return e=>l(()=>[e.getState().pagination,e.getPrePaginationRowModel(),e.options.paginateExpandedRows?void 0:e.getState().expanded],(t,n)=>{let r;if(!n.rows.length)return n;let{pageSize:i,pageIndex:o}=t,{rows:l,flatRows:a,rowsById:s}=n,u=i*o;l=l.slice(u,u+i),(r=e.options.paginateExpandedRows?{rows:l,flatRows:a,rowsById:s}:function(e){let t=[],n=e=>{var r;t.push(e),null!=(r=e.subRows)&&r.length&&e.getIsExpanded()&&e.subRows.forEach(n)};return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}({rows:l,flatRows:a,rowsById:s})).flatRows=[];let d=e=>{r.flatRows.push(e),e.subRows.length&&e.subRows.forEach(d)};return r.rows.forEach(d),r},a(e.options,"debugTable","getPaginationRowModel"))}function G(){return e=>l(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,n)=>{if(!n.rows.length||!(null!=t&&t.length))return n;let r=e.getState().sorting,i=[],o=r.filter(t=>{var n;return null==(n=e.getColumn(t.id))?void 0:n.getCanSort()}),l={};o.forEach(t=>{let n=e.getColumn(t.id);n&&(l[t.id]={sortUndefined:n.columnDef.sortUndefined,invertSorting:n.columnDef.invertSorting,sortingFn:n.getSortingFn()})});let a=e=>{let t=e.map(e=>({...e}));return t.sort((e,t)=>{for(let r=0;r<o.length;r+=1){var n;let i=o[r],a=l[i.id],s=a.sortUndefined,u=null!=(n=null==i?void 0:i.desc)&&n,d=0;if(s){let n=e.getValue(i.id),r=t.getValue(i.id),o=void 0===n,l=void 0===r;if(o||l){if("first"===s)return o?-1:1;if("last"===s)return o?1:-1;d=o&&l?0:o?s:-s}}if(0===d&&(d=a.sortingFn(e,t,i.id)),0!==d)return u&&(d*=-1),a.invertSorting&&(d*=-1),d}return e.index-t.index}),t.forEach(e=>{var t;i.push(e),null!=(t=e.subRows)&&t.length&&(e.subRows=a(e.subRows))}),t};return{rows:a(n.rows),flatRows:i,rowsById:n.rowsById}},a(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}},9890:function(e,t,n){n.d(t,{mY:function(){return O}});var r=/[\\\/_+.#"@\[\(\{&]/,i=/[\\\/_+.#"@\[\(\{&]/g,o=/[\s-]/,l=/[\s-]/g;function a(e){return e.toLowerCase().replace(l," ")}var s=n(97103),u=n(7653),d=n(56606),c=n(17321),f=n(96250),p='[cmdk-group=""]',g='[cmdk-group-items=""]',m='[cmdk-item=""]',h="".concat(m,':not([aria-disabled="true"])'),v="cmdk-item-select",y="data-value",b=(e,t,n)=>{var s;return s=e,function e(t,n,a,s,u,d,c){if(d===n.length)return u===t.length?1:.99;var f=`${u},${d}`;if(void 0!==c[f])return c[f];for(var p,g,m,h,v=s.charAt(d),y=a.indexOf(v,u),b=0;y>=0;)(p=e(t,n,a,s,y+1,d+1,c))>b&&(y===u?p*=1:r.test(t.charAt(y-1))?(p*=.8,(m=t.slice(u,y-1).match(i))&&u>0&&(p*=Math.pow(.999,m.length))):o.test(t.charAt(y-1))?(p*=.9,(h=t.slice(u,y-1).match(l))&&u>0&&(p*=Math.pow(.999,h.length))):(p*=.17,u>0&&(p*=Math.pow(.999,y-u))),t.charAt(y)!==n.charAt(d)&&(p*=.9999)),(p<.1&&a.charAt(y-1)===s.charAt(d+1)||s.charAt(d+1)===s.charAt(d)&&a.charAt(y-1)!==s.charAt(d))&&.1*(g=e(t,n,a,s,y+1,d+2,c))>p&&(p=.1*g),p>b&&(b=p),y=a.indexOf(v,y+1);return c[f]=b,b}(s=n&&n.length>0?`${s+" "+n.join(" ")}`:s,t,a(s),a(t),0,0,{})},w=u.createContext(void 0),_=()=>u.useContext(w),x=u.createContext(void 0),C=()=>u.useContext(x),S=u.createContext(void 0),R=u.forwardRef((e,t)=>
4{let n=I(()=>{var t,n;return{search:"",value:null!=(n=null!=(t=e.value)?t:e.defaultValue)?n:"",filtered:{count:0,items:new Map,groups:new Set}}}),r=I(()=>new Set),i=I(()=>new Map),o=I(()=>new Map),l=I(()=>new Set),a=V(e),{label:s,children:f,value:_,onValueChange:C,filter:S,shouldFilter:R,loop:E,disablePointerSelection:k=!1,vimBindings:A=!0,...F}=e,M=(0,c.M)(),P=(0,c.M)(),O=(0,c.M)(),D=u.useRef(null),N=L();T(()=>{if(void 0!==_){let e=_.trim();n.current.value=e,j.emit()}},[_]),T(()=>{N(6,G)},[]);let j=u.useMemo(()=>({subscribe:e=>(l.current.add(e),()=>l.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var i,o,l;if(!Object.is(n.current[e],t)){if(n.current[e]=t,"search"===e)$(),B(),N(1,U);else if("value"===e&&(r||N(5,G),(null==(i=a.current)?void 0:i.value)!==void 0)){null==(l=(o=a.current).onValueChange)||l.call(o,null!=t?t:"");return}j.emit()}},emit:()=>{l.current.forEach(e=>e())}}),[]),W=u.useMemo(()=>({value:(e,t,r)=>{var i;t!==(null==(i=o.current.get(e))?void 0:i.value)&&(o.current.set(e,{value:t,keywords:r}),n.current.filtered.items.set(e,H(t,r)),N(2,()=>{B(),j.emit()}))},item:(e,t)=>(r.current.add(e),t&&(i.current.has(t)?i.current.get(t).add(e):i.current.set(t,new Set([e]))),N(3,()=>{$(),B(),n.current.value||U(),j.emit()}),()=>{o.current.delete(e),r.current.delete(e),n.current.filtered.items.delete(e);let t=q();N(4,()=>{$(),(null==t?void 0:t.getAttribute("id"))===e&&U(),j.emit()})}),group:e=>(i.current.has(e)||i.current.set(e,new Set),()=>{o.current.delete(e),i.current.delete(e)}),filter:()=>a.current.shouldFilter,label:s||e["aria-label"],getDisablePointerSelection:()=>a.current.disablePointerSelection,listId:M,inputId:O,labelId:P,listInnerRef:D}),[]);function H(e,t){var r,i;let o=null!=(i=null==(r=a.current)?void 0:r.filter)?i:b;return e?o(e,n.current.search,t):0}function B(){if(!n.current.search||!1===a.current.shouldFilter)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach(n=>{let r=i.current.get(n),o=0;r.forEach(t=>{o=Math.max(e.get(t),o)}),t.push([n,o])});let r=D.current;K().sort((t,n)=>{var r,i;let o=t.getAttribute("id"),l=n.getAttribute("id");return(null!=(r=e.get(l))?r:0)-(null!=(i=e.get(o))?i:0)}).forEach(e=>{let t=e.closest(g);t?t.appendChild(e.parentElement===t?e:e.closest("".concat(g," > *"))):r.appendChild(e.parentElement===r?e:e.closest("".concat(g," > *")))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{var t;let n=null==(t=D.current)?void 0:t.querySelector("".concat(p,"[").concat(y,'="').concat(encodeURIComponent(e[0]),'"]'));null==n||n.parentElement.appendChild(n)})}function U(){let e=K().find(e=>"true"!==e.getAttribute("aria-disabled")),t=null==e?void 0:e.getAttribute(y);j.setState("value",t||void 0)}function $(){var e,t,l,s;if(!n.current.search||!1===a.current.shouldFilter){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let u=0;for(let i of r.current){let r=H(null!=(t=null==(e=o.current.get(i))?void 0:e.value)?t:"",null!=(s=null==(l=o.current.get(i))?void 0:l.keywords)?s:[]);n.current.filtered.items.set(i,r),r>0&&u++}for(let[e,t]of i.current)for(let r of t)if(n.current.filtered.items.get(r)>0){n.current.filtered.groups.add(e);break}n.current.filtered.count=u}function G(){var e,t,n;let r=q();r&&((null==(e=r.parentElement)?void 0:e.firstChild)===r&&(null==(n=null==(t=r.closest(p))?void 0:t.querySelector('[cmdk-group-heading=""]'))||n.scrollIntoView({block:"nearest"})),r.scrollIntoView({block:"nearest"}))}function q(){var e;return null==(e=D.current)?void 0:e.querySelector("".concat(m,'[aria-selected="true"]'))}function K(){var e;return Array.from((null==(e=D.current)?void 0:e.querySelectorAll(h))||[])}function Y(e){let t=K()[e];t&&j.setState("value",t.getAttribute(y))}function X(e){var t;let n=q(),r=K(),i=r.findIndex(e=>e===n),o=r[i+e];null!=(t=a.current)&&t.loop&&(o=i+e<0?r[r.length-1]:i+e===r.length?r[0]:r[i+e]),o&&j.setState("value",o.getAttribute(y))}function J(e){let t=q(),n=null==t?void 0:t.closest(p),r;for(;n&&!r;)r=null==(n=e>0?function(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}(n,p):function(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}(n,p))?void 0:n.querySelector(h);r?j.setState("value",r.getAttribute(y)):X(e)}let Q=()=>Y(K().length-1),ee=e=>{e.preventDefault(),e.metaKey?Q():e.altKey?J(1):X(1)},et=e=>{e.preventDefault(),e.metaKey?Y(0):e.altKey?J(-1):X(-1)};return u.createElement(d.WV.div,{ref:t,tabIndex:-1,...F,"cmdk-root":"",onKeyDown:e=>{var t;if(null==(t=F.onKeyDown)||t.call(F,e),!e.defaultPrevented)switch(e.key){case"n":case"j":A&&e.ctrlKey&&ee(e);break;case"ArrowDown":ee(e);break;case"p":case"k":A&&e.ctrlKey&&et(e);break;case"ArrowUp":et(e);break;case"Home":e.preventDefault(),Y(0);break;case"End":e.preventDefault(),Q();break;case"Enter":if(!e.nativeEvent.isComposing&&229!==e.keyCode){e.preventDefault();let t=q();if(t){let e=new Event(v);t.dispatchEvent(e)}}}}},u.createElement("label",{"cmdk-label":"",htmlFor:W.inputId,id:W.labelId,style:z},s),Z(e,e=>u.createElement(x.Provider,{value:j},u.createElement(w.Provider,{value:W},e))))}),E=u.forwardRef((e,t)=>
4{var n,r;let i=(0,c.M)(),o=u.useRef(null),l=u.useContext(S),a=_(),s=V(e),f=null!=(r=null==(n=s.current)?void 0:n.forceMount)?r:null==l?void 0:l.forceMount;T(()=>{if(!f)return a.item(i,null==l?void 0:l.id)},[f]);let p=j(i,o,[e.value,e.children,o],e.keywords),g=C(),m=N(e=>e.value&&e.value===p.current),h=N(e=>!!f||!1===a.filter()||!e.search||e.filtered.items.get(i)>0);function y(){var e,t;b(),null==(t=(e=s.current).onSelect)||t.call(e,p.current)}function b(){g.setState("value",p.current,!0)}if(u.useEffect(()=>{let t=o.current;if(!(!t||e.disabled))return t.addEventListener(v,y),()=>t.removeEventListener(v,y)},[h,e.onSelect,e.disabled]),!h)return null;let{disabled:w,value:x,onSelect:R,forceMount:E,keywords:k,...A}=e;return u.createElement(d.WV.div,{ref:D([o,t]),...A,id:i,"cmdk-item":"",role:"option","aria-disabled":!!w,"aria-selected":!!m,"data-disabled":!!w,"data-selected":!!m,onPointerMove:w||a.getDisablePointerSelection()?void 0:b,onClick:w?void 0:y},e.children)}),k=u.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...o}=e,l=(0,c.M)(),a=u.useRef(null),s=u.useRef(null),f=(0,c.M)(),p=_(),g=N(e=>!!i||!1===p.filter()||!e.search||e.filtered.groups.has(l));T(()=>p.group(l),[]),j(l,a,[e.value,e.heading,s]);let m=u.useMemo(()=>({id:l,forceMount:i}),[i]);return u.createElement(d.WV.div,{ref:D([a,t]),...o,"cmdk-group":"",role:"presentation",hidden:!g||void 0},n&&u.createElement("div",{ref:s,"cmdk-group-heading":"","aria-hidden":!0,id:f},n),Z(e,e=>u.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?f:void 0},u.createElement(S.Provider,{value:m},e))))}),A=u.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=u.useRef(null),o=N(e=>!e.search);return n||o?u.createElement(d.WV.div,{ref:D([i,t]),...r,"cmdk-separator":"",role:"separator"}):null}),F=u.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=null!=e.value,o=C(),l=N(e=>e.search),a=N(e=>e.value),s=_(),c=u.useMemo(()=>{var e;let t=null==(e=s.listInnerRef.current)?void 0:e.querySelector("".concat(m,"[").concat(y,'="').concat(encodeURIComponent(a),'"]'));return null==t?void 0:t.getAttribute("id")},[]);return u.useEffect(()=>{null!=e.value&&o.setState("search",e.value)},[e.value]),u.createElement(d.WV.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":s.listId,"aria-labelledby":s.labelId,"aria-activedescendant":c,id:s.inputId,type:"text",value:i?e.value:l,onChange:e=>{i||o.setState("search",e.target.value),null==n||n(e.target.value)}})}),M=u.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...i}=e,o=u.useRef(null),l=u.useRef(null),a=_();return u.useEffect(()=>{if(l.current&&o.current){let e=l.current,t=o.current,n,r=new ResizeObserver(()=>{n=requestAnimationFrame(()=>{let n=e.offsetHeight;t.style.setProperty("--cmdk-list-height",n.toFixed(1)+"px")})});return r.observe(e),()=>{cancelAnimationFrame(n),r.unobserve(e)}}},[]),u.createElement(d.WV.div,{ref:D([o,t]),...i,"cmdk-list":"",role:"listbox","aria-label":r,id:a.listId},Z(e,e=>u.createElement("div",{ref:D([l,a.listInnerRef]),"cmdk-list-sizer":""},e)))}),P=u.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:o,container:l,...a}=e;return u.createElement(s.fC,{open:n,onOpenChange:r},u.createElement(s.h_,{container:l},u.createElement(s.aV,{"cmdk-overlay":"",className:i}),u.createElement(s.VY,{"aria-label":e.label,"cmdk-dialog":"",className:o},u.createElement(R,{ref:t,...a}))))}),O=Object.assign(R,{List:M,Item:E,Input:F,Group:k,Separator:A,Dialog:P,Empty:u.forwardRef((e,t)=>N(e=>0===e.filtered.count)?u.createElement(d.WV.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),Loading:u.forwardRef((e,t)=>{let{progress:n,children:r,label:i="Loading...",...o}=e;return u.createElement(d.WV.div,{ref:t,...o,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},Z(e,e=>u.createElement("div",{"aria-hidden":!0},e)))})});function V(e){let t=u.useRef(e);return T(()=>{t.current=e}),t}var T="undefined"==typeof window?u.useEffect:u.useLayoutEffect;function I(e){let t=u.useRef();return void 0===t.current&&(t.current=e()),t}function D(e){return t=>
4{e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}}function N(e){let t=C(),n=()=>e(t.snapshot());return(0,f.useSyncExternalStore)(t.subscribe,n,n)}function j(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i=u.useRef(),o=_();return T(()=>{var l;let a=(()=>{var e;for(let t of n){if("string"==typeof t)return t.trim();if("object"==typeof t&&"current"in t)return t.current?null==(e=t.current.textContent)?void 0:e.trim():i.current}})(),s=r.map(e=>e.trim());o.value(e,a,s),null==(l=t.current)||l.setAttribute(y,a),i.current=a}),i}var L=()=>{let[e,t]=u.useState(),n=I(()=>new Map);return T(()=>{n.current.forEach(e=>e()),n.current=new Map},[e]),(e,r)=>{n.current.set(e,r),t({})}};function Z(e,t){let n,{asChild:r,children:i}=e;return r&&u.isValidElement(i)?u.cloneElement("function"==typeof(n=i.type)?n(i.props):"render"in n?n.render(i.props):i,{ref:i.ref},t(i.props.children)):t(i)}var z={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"}},93351:function(e,t,n){n.d(t,{Dq:function(){return ep},Gc:function(){return E},KN:function(){return N},Qr:function(){return D},RV:function(){return k},U2:function(){return v},cI:function(){return eT},t8:function(){return _}});var r=n(7653),i=e=>"checkbox"===e.type,o=e=>e instanceof Date,l=e=>null==e;let a=e=>"object"==typeof e;var s=e=>!l(e)&&!Array.isArray(e)&&a(e)&&!o(e),u=e=>s(e)&&e.target?i(e.target)?e.target.checked:e.target.value:e,d=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,c=(e,t)=>e.has(d(t)),f=e=>{let t=e.constructor&&e.constructor.prototype;return s(t)&&t.hasOwnProperty("isPrototypeOf")},p="undefined"!=typeof window&&void 0!==window.HTMLElement&&"undefined"!=typeof document;function g(e){let t;let n=Array.isArray(e),r="undefined"!=typeof FileList&&e instanceof FileList;if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(!(p&&(e instanceof Blob||r))&&(n||s(e))))return e;else if(t=n?[]:{},n||f(e))for(let n in e)e.hasOwnProperty(n)&&(t[n]=g(e[n]));else t=e;return t}var m=e=>Array.isArray(e)?e.filter(Boolean):[],h=e=>void 0===e,v=(e,t,n)=>{if(!t||!s(e))return n;let r=m(t.split(/[,[\].]+?/)).reduce((e,t)=>l(e)?e:e[t],e);return h(r)||r===e?h(e[t])?n:e[t]:r},y=e=>"boolean"==typeof e,b=e=>/^\w*$/.test(e),w=e=>m(e.replace(/["|']|\]/g,"").split(/\.|\[/)),_=(e,t,n)=>{let r=-1,i=b(t)?[t]:w(t),o=i.length,l=o-1;for(;++r<o;){let t=i[r],o=n;if(r!==l){let n=e[t];o=s(n)||Array.isArray(n)?n:isNaN(+i[r+1])?{}:[]}if("__proto__"===t||"constructor"===t||"prototype"===t)return;e[t]=o,e=e[t]}return e};let x={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},C={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},S={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},R=r.createContext(null),E=()=>r.useContext(R),k=e=>{let{children:t,...n}=e;return r.createElement(R.Provider,{value:n},t)};var A=(e,t,n,r=!0)=>{let i={defaultValues:t._defaultValues};for(let o in e)Object.defineProperty(i,o,{get:()=>(t._proxyFormState[o]!==C.all&&(t._proxyFormState[o]=!r||C.all),n&&(n[o]=!0),e[o])});return i},F=e=>s(e)&&!Object.keys(e).length,M=(e,t,n,r)=>{n(e);let{name:i,...o}=e;return F(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find(e=>t[e]===(!r||C.all))},P=e=>Array.isArray(e)?e:[e],O=(e,t,n)=>!e||!t||e===t||P(e).some(e=>e&&(n?e===t:e.startsWith(t)||t.startsWith(e)));function V(e){let t=r.useRef(e);t.current=e,r.useEffect(()=>{let n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}var T=e=>"string"==typeof e,I=(e,t,n,r,i)=>T(e)?(r&&t.watch.add(e),v(n,e,i)):Array.isArray(e)?e.map(e=>(r&&t.watch.add(e),v(n,e))):(r&&(t.watchAll=!0),n);let D=e=>e.render(function(e){let t=E(),{name:n,disabled:i,control:o=t.control,shouldUnregister:l}=e,a=c(o._names.array,n),s=function(e){let t=E(),{control:n=t.control,name:i,defaultValue:o,disabled:l,exact:a}=e||{},s=r.useRef(i);s.current=i,V({disabled:l,subject:n._subjects.values,next:e=>{O(s.current,e.name,a)&&d(g(I(s.current,n._names,e.values||n._formValues,!1,o)))}});let[u,d]=r.useState(n._getWatch(i,o));return r.useEffect(()=>n._removeUnmounted()),u}({control:o,name:n,defaultValue:v(o._formValues,n,v(o._defaultValues,n,e.defaultValue)),exact:!0}),d=function(e){let t=E(),{control:n=t.control,disabled:i,name:o,exact:l}=e||{},[a,s]=r.useState(n._formState),u=r.useRef(!0),d=r.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),c=r.useRef(o);return c.current=o,V({disabled:i,next:e=>u.current&&O(c.current,e.name,l)&&M(e,d.current,n._updateFormState)&&s({...n._formState,...e}),subject:n._subjects.state}),r.useEffect(()=>
4(u.current=!0,d.current.isValid&&n._updateValid(!0),()=>{u.current=!1}),[n]),r.useMemo(()=>A(a,n,d.current,!1),[a,n])}({control:o,name:n,exact:!0}),f=r.useRef(o.register(n,{...e.rules,value:s,...y(e.disabled)?{disabled:e.disabled}:{}})),p=r.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!v(d.errors,n)},isDirty:{enumerable:!0,get:()=>!!v(d.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!v(d.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!v(d.validatingFields,n)},error:{enumerable:!0,get:()=>v(d.errors,n)}}),[d,n]),m=r.useMemo(()=>({name:n,value:s,...y(i)||d.disabled?{disabled:d.disabled||i}:{},onChange:e=>f.current.onChange({target:{value:u(e),name:n},type:x.CHANGE}),onBlur:()=>f.current.onBlur({target:{value:v(o._formValues,n),name:n},type:x.BLUR}),ref:e=>{let t=v(o._fields,n);t&&e&&(t._f.ref={focus:()=>e.focus(),select:()=>e.select(),setCustomValidity:t=>e.setCustomValidity(t),reportValidity:()=>e.reportValidity()})}}),[n,o._formValues,i,d.disabled,s,o._fields]);return r.useEffect(()=>{let e=o._options.shouldUnregister||l,t=(e,t)=>{let n=v(o._fields,e);n&&n._f&&(n._f.mount=t)};if(t(n,!0),e){let e=g(v(o._options.defaultValues,n));_(o._defaultValues,n,e),h(v(o._formValues,n))&&_(o._formValues,n,e)}return a||o.register(n),()=>{(a?e&&!o._state.action:e)?o.unregister(n):t(n,!1)}},[n,o,a,l]),r.useEffect(()=>{o._updateDisabledField({disabled:i,fields:o._fields,name:n})},[i,n,o]),r.useMemo(()=>({field:m,formState:d,fieldState:p}),[m,d,p])}(e));var N=(e,t,n,r,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:i||!0}}:{},j=()=>{let e="undefined"==typeof performance?Date.now():1e3*performance.now();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{let n=(16*Math.random()+e)%16|0;return("x"==t?n:3&n|8).toString(16)})},L=(e,t,n={})=>n.shouldFocus||h(n.shouldFocus)?n.focusName||`${e}.${h(n.focusIndex)?t:n.focusIndex}.`:"",Z=e=>({isOnSubmit:!e||e===C.onSubmit,isOnBlur:e===C.onBlur,isOnChange:e===C.onChange,isOnAll:e===C.all,isOnTouch:e===C.onTouched}),z=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length))));let W=(e,t,n,r)=>{for(let i of n||Object.keys(e)){let n=v(e,i);if(n){let{_f:e,...o}=n;if(e){if(e.refs&&e.refs[0]&&t(e.refs[0],i)&&!r||e.ref&&t(e.ref,e.name)&&!r)return!0;if(W(o,t))break}else if(s(o)&&W(o,t))break}}};var H=(e,t,n)=>{let r=P(v(e,n));return _(r,"root",t[n]),_(e,n,r),e},B=e=>"file"===e.type,U=e=>"function"==typeof e,$=e=>{if(!p)return!1;let t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},G=e=>T(e),q=e=>"radio"===e.type,K=e=>e instanceof RegExp;let Y={value:!1,isValid:!1},X={value:!0,isValid:!0};var J=e=>{if(Array.isArray(e)){if(e.length>1){let t=e.filter(e=>e&&e.checked&&!e.disabled).map(e=>e.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!h(e[0].attributes.value)?h(e[0].value)||""===e[0].value?X:{value:e[0].value,isValid:!0}:X:Y}return Y};let Q={isValid:!1,value:null};var ee=e=>Array.isArray(e)?e.reduce((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e,Q):Q;function et(e,t,n="validate"){if(G(e)||Array.isArray(e)&&e.every(G)||y(e)&&!e)return{type:n,message:G(e)?e:"",ref:t}}var en=e=>s(e)&&!K(e)?e:{value:e,message:""},er=async(e,t,n,r,o,a)=>{let{ref:u,refs:d,required:c,maxLength:f,minLength:p,min:g,max:m,pattern:b,validate:w,name:_,valueAsNumber:x,mount:C}=e._f,R=v(n,_);if(!C||t.has(_))return{};let E=d?d[0]:u,k=e=>{o&&E.reportValidity&&(E.setCustomValidity(y(e)?"":e||""),E.reportValidity())},A={},M=q(u),P=i(u),O=(x||B(u))&&h(u.value)&&h(R)||$(u)&&""===u.value||""===R||Array.isArray(R)&&!R.length,V=N.bind(null,_,r,A),I=(e,t,n,r=S.maxLength,i=S.minLength)=>{let o=e?t:n;A[_]={type:e?r:i,message:o,ref:u,...V(e?r:i,o)}};if(a?!Array.isArray(R)||!R.length:c&&(!(M||P)&&(O||l(R))||y(R)&&!R||P&&!J(d).isValid||M&&!ee(d).isValid)){let{value:e,message:t}=G(c)?{value:!!c,message:c}:en(c);if(e&&(A[_]={type:S.required,message:t,ref:E,...V(S.required,t)},!r))return k(t),A}if(!O&&(!l(g)||!l(m))){let e,t;let n=en(m),i=en(g);if(l(R)||isNaN(R)){let r=u.valueAsDate||new Date(R),o=e=>new Date(new Date().toDateString()+" "+e),l="time"==u.type,a="week"==u.type;T(n.value)&&R&&(e=l?o(R)>o(n.value):a?R>n.value:r>new Date(n.value)),T(i.value)&&R&&(t=l?o(R)<o(i.value):a?R<i.value:r<new Date(i.value))}else{let r=u.valueAsNumber||(R?+R:R);l(n.value)||(e=r>n.value),l(i.value)||(t=r<i.value)}if((e||t)&&(I(!!e,n.message,i.message,S.max,S.min),!r))return k(A[_].message),A}if((f||p)&&!O&&(T(R)||a&&Array.isArray(R))){let e=en(f),t=en(p),n=!l(e.value)&&R.length>+e.value,i=!l(t.value)&&R.length<+t.value;if((n||i)&&(I(n,e.message,t.message),!r))return k(A[_].message),A}if(b&&!O&&T(R)){let{value:e,message:t}=en(b);if(K(e)&&!R.match(e)&&(A[_]={type:S.pattern,message:t,ref:u,...V(S.pattern,t)},!r))return k(t),A}if(w){if(U(w)){let e=et(await w(R,n),E);if(e&&(A[_]={...e,...V(S.validate,e.message)},!r))return k(e.message),A}else if(s(w)){let e={};for(let t in w){if(!F(e)&&!r)break;let i=et(await w[t](R,n),E,t);
vendor: 6,086 bytes, line 4
4i&&(e={...i,...V(t,i.message)},k(i.message),r&&(A[_]=e))}if(!F(e)&&(A[_]={ref:E,...e},!r))return A}}return k(!0),A},ei=(e,t)=>[...e,...P(t)],eo=e=>Array.isArray(e)?e.map(()=>void 0):void 0;function el(e,t,n){return[...e.slice(0,t),...P(n),...e.slice(t)]}var ea=(e,t,n)=>Array.isArray(e)?(h(e[n])&&(e[n]=void 0),e.splice(n,0,e.splice(t,1)[0]),e):[],es=(e,t)=>[...P(t),...P(e)],eu=(e,t)=>h(t)?[]:function(e,t){let n=0,r=[...e];for(let e of t)r.splice(e-n,1),n++;return m(r).length?r:[]}(e,P(t).sort((e,t)=>e-t)),ed=(e,t,n)=>{[e[t],e[n]]=[e[n],e[t]]};function ec(e,t){let n=Array.isArray(t)?t:b(t)?[t]:w(t),r=1===n.length?e:function(e,t){let n=t.slice(0,-1).length,r=0;for(;r<n;)e=h(e)?r++:e[t[r++]];return e}(e,n),i=n.length-1,o=n[i];return r&&delete r[o],0!==i&&(s(r)&&F(r)||Array.isArray(r)&&function(e){for(let t in e)if(e.hasOwnProperty(t)&&!h(e[t]))return!1;return!0}(r))&&ec(e,n.slice(0,-1)),e}var ef=(e,t,n)=>(e[t]=n,e);function ep(e){let t=E(),{control:n=t.control,name:i,keyName:o="id",shouldUnregister:l,rules:a}=e,[s,u]=r.useState(n._getFieldArray(i)),d=r.useRef(n._getFieldArray(i).map(j)),c=r.useRef(s),f=r.useRef(i),p=r.useRef(!1);f.current=i,c.current=s,n._names.array.add(i),a&&n.register(i,a),V({next:({values:e,name:t})=>{if(t===f.current||!t){let t=v(e,f.current);Array.isArray(t)&&(u(t),d.current=t.map(j))}},subject:n._subjects.array});let m=r.useCallback(e=>{p.current=!0,n._updateFieldArray(i,e)},[n,i]);return r.useEffect(()=>{if(n._state.action=!1,z(i,n._names)&&n._subjects.state.next({...n._formState}),p.current&&(!Z(n._options.mode).isOnSubmit||n._formState.isSubmitted)){if(n._options.resolver)n._executeSchema([i]).then(e=>{let t=v(e.errors,i),r=v(n._formState.errors,i);(r?!t&&r.type||t&&(r.type!==t.type||r.message!==t.message):t&&t.type)&&(t?_(n._formState.errors,i,t):ec(n._formState.errors,i),n._subjects.state.next({errors:n._formState.errors}))});else{let e=v(n._fields,i);e&&e._f&&!(Z(n._options.reValidateMode).isOnSubmit&&Z(n._options.mode).isOnSubmit)&&er(e,n._names.disabled,n._formValues,n._options.criteriaMode===C.all,n._options.shouldUseNativeValidation,!0).then(e=>!F(e)&&n._subjects.state.next({errors:H(n._formState.errors,e,i)}))}}n._subjects.values.next({name:i,values:{...n._formValues}}),n._names.focus&&W(n._fields,(e,t)=>{if(n._names.focus&&t.startsWith(n._names.focus)&&e.focus)return e.focus(),1}),n._names.focus="",n._updateValid(),p.current=!1},[s,i,n]),r.useEffect(()=>(v(n._formValues,i)||n._updateFieldArray(i),()=>{(n._options.shouldUnregister||l)&&n.unregister(i)}),[i,n,o,l]),{swap:r.useCallback((e,t)=>{let r=n._getFieldArray(i);ed(r,e,t),ed(d.current,e,t),m(r),u(r),n._updateFieldArray(i,r,ed,{argA:e,argB:t},!1)},[m,i,n]),move:r.useCallback((e,t)=>{let r=n._getFieldArray(i);ea(r,e,t),ea(d.current,e,t),m(r),u(r),n._updateFieldArray(i,r,ea,{argA:e,argB:t},!1)},[m,i,n]),prepend:r.useCallback((e,t)=>{let r=P(g(e)),o=es(n._getFieldArray(i),r);n._names.focus=L(i,0,t),d.current=es(d.current,r.map(j)),m(o),u(o),n._updateFieldArray(i,o,es,{argA:eo(e)})},[m,i,n]),append:r.useCallback((e,t)=>{let r=P(g(e)),o=ei(n._getFieldArray(i),r);n._names.focus=L(i,o.length-1,t),d.current=ei(d.current,r.map(j)),m(o),u(o),n._updateFieldArray(i,o,ei,{argA:eo(e)})},[m,i,n]),remove:r.useCallback(e=>{let t=eu(n._getFieldArray(i),e);d.current=eu(d.current,e),m(t),u(t),Array.isArray(v(n._fields,i))||_(n._fields,i,void 0),n._updateFieldArray(i,t,eu,{argA:e})},[m,i,n]),insert:r.useCallback((e,t,r)=>{let o=P(g(t)),l=el(n._getFieldArray(i),e,o);n._names.focus=L(i,e,r),d.current=el(d.current,e,o.map(j)),m(l),u(l),n._updateFieldArray(i,l,el,{argA:e,argB:eo(t)})},[m,i,n]),update:r.useCallback((e,t)=>{let r=g(t),o=ef(n._getFieldArray(i),e,r);d.current=[...o].map((t,n)=>t&&n!==e?d.current[n]:j()),m(o),u([...o]),n._updateFieldArray(i,o,ef,{argA:e,argB:r},!0,!1)},[m,i,n]),replace:r.useCallback(e=>{let t=P(g(e));d.current=t.map(j),m([...t]),u([...t]),n._updateFieldArray(i,[...t],e=>e,{},!0,!1)},[m,i,n]),fields:r.useMemo(()=>s.map((e,t)=>({...e,[o]:d.current[t]||j()})),[s,o])}}var eg=()=>{let e=[];return{get observers(){return e},next:t=>{for(let n of e)n.next&&n.next(t)},subscribe:t=>(e.push(t),{unsubscribe:()=>{e=e.filter(e=>e!==t)}}),unsubscribe:()=>{e=[]}}},em=e=>l(e)||!a(e);function eh(e,t){if(em(e)||em(t))return e===t;if(o(e)&&o(t))return e.getTime()===t.getTime();let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let i of n){let n=e[i];if(!r.includes(i))return!1;if("ref"!==i){let e=t[i];if(o(n)&&o(e)||s(n)&&s(e)||Array.isArray(n)&&Array.isArray(e)?!eh(n,e):n!==e)return!1}}return!0}var ev=e=>"select-multiple"===e.type,ey=e=>q(e)||i(e),eb=e=>$(e)&&e.isConnected,ew=e=>{for(let t in e)if(U(e[t]))return!0;return!1};function e_(e,t={}){let n=Array.isArray(e);if(s(e)||n)for(let n in e)Array.isArray(e[n])||s(e[n])&&!ew(e[n])?(t[n]=Array.isArray(e[n])?[]:{},e_(e[n],t[n])):l(e[n])||(t[n]=!0);return t}var ex=(e,t)=>(function e(t,n,r){let i=Array.isArray(t);if(s(t)||i)for(let i in t)Array.isArray(t[i])||s(t[i])&&!ew(t[i])?h(n)||em(r[i])?r[i]=Array.isArray(t[i])?e_(t[i],[]):{...e_(t[i])}:e(t[i],l(n)?{}:n[i],r[i]):r[i]=!eh(t[i],n[i]);return r})(e,t,e_(t)),eC=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>h(e)?e:t?""===e?NaN:e?+e:e:n&&T(e)?new Date(e):r?r(e):e;function eS(e){let t=e.ref;return B(t)?t.files:q(t)?ee(e.refs).value:ev(t)?[...t.selectedOptions].map(({value:e})=>e):i(t)?J(e.refs).value:eC(h(t.value)?e.ref.value:t.value,e)}var eR=(e,t,n,r)=>{let i={};for(let n of e){let e=v(t,n);e&&_(i,n,e._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}},eE=e=>h(e)?e:K(e)?e.source:s(e)?K(e.value)?e.value.source:e.value:e;let ek="AsyncFunction";var eA=e=>!!e&&!!e.validate&&!!(U(e.validate)&&e.validate.constructor.name===ek||s(e.validate)&&Object.values(e.validate).find(e=>e.constructor.name===ek)),eF=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function eM(e,t,n){let r=v(e,n);if(r||b(n))return{error:r,name:n};let i=n.split(".");for(;i.length;){let r=i.join("."),o=v(t,r),l=v(e,r);if(o&&!Array.isArray(o)&&n!==r)break;
4if(l&&l.type)return{name:r,error:l};i.pop()}return{name:n}}var eP=(e,t,n,r,i)=>!i.isOnAll&&(!n&&i.isOnTouch?!(t||e):(n?r.isOnBlur:i.isOnBlur)?!e:(n?!r.isOnChange:!i.isOnChange)||e),eO=(e,t)=>!m(v(e,t)).length&&ec(e,t);let eV={mode:C.onSubmit,reValidateMode:C.onChange,shouldFocusError:!0};function eT(e={}){let t=r.useRef(void 0),n=r.useRef(void 0),[a,d]=r.useState({isDirty:!1,isValidating:!1,isLoading:U(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:U(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...function(e={}){let t,n={...eV,...e},r={submitCount:0,isDirty:!1,isLoading:U(n.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:n.errors||{},disabled:n.disabled||!1},a={},d=(s(n.defaultValues)||s(n.values))&&g(n.defaultValues||n.values)||{},f=n.shouldUnregister?{}:g(d),b={action:!1,mount:!1,watch:!1},w={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},S=0,R={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},E={values:eg(),array:eg(),state:eg()},k=Z(n.mode),A=Z(n.reValidateMode),M=n.criteriaMode===C.all,O=e=>t=>{clearTimeout(S),S=setTimeout(e,t)},V=async e=>{if(!n.disabled&&(R.isValid||e)){let e=n.resolver?F((await q()).errors):await Y(a,!0);e!==r.isValid&&E.state.next({isValid:e})}},D=(e,t)=>{!n.disabled&&(R.isValidating||R.validatingFields)&&((e||Array.from(w.mount)).forEach(e=>{e&&(t?_(r.validatingFields,e,t):ec(r.validatingFields,e))}),E.state.next({validatingFields:r.validatingFields,isValidating:!F(r.validatingFields)}))},N=(e,t)=>{_(r.errors,e,t),E.state.next({errors:r.errors})},j=(e,t,n,r)=>{let i=v(a,e);if(i){let o=v(f,e,h(n)?v(d,e):n);h(o)||r&&r.defaultChecked||t?_(f,e,t?o:eS(i._f)):Q(e,o),b.mount&&V()}},L=(e,t,i,o,l)=>{let s=!1,u=!1,c={name:e};if(!n.disabled){let n=!!(v(a,e)&&v(a,e)._f&&v(a,e)._f.disabled);if(!i||o){R.isDirty&&(u=r.isDirty,r.isDirty=c.isDirty=X(),s=u!==c.isDirty);let i=n||eh(v(d,e),t);u=!!(!n&&v(r.dirtyFields,e)),i||n?ec(r.dirtyFields,e):_(r.dirtyFields,e,!0),c.dirtyFields=r.dirtyFields,s=s||R.dirtyFields&&!i!==u}if(i){let t=v(r.touchedFields,e);t||(_(r.touchedFields,e,i),c.touchedFields=r.touchedFields,s=s||R.touchedFields&&t!==i)}s&&l&&E.state.next(c)}return s?c:{}},G=(e,i,o,l)=>{let a=v(r.errors,e),s=R.isValid&&y(i)&&r.isValid!==i;if(n.delayError&&o?(t=O(()=>N(e,o)))(n.delayError):(clearTimeout(S),t=null,o?_(r.errors,e,o):ec(r.errors,e)),(o?!eh(a,o):a)||!F(l)||s){let t={...l,...s&&y(i)?{isValid:i}:{},errors:r.errors,name:e};r={...r,...t},E.state.next(t)}},q=async e=>{D(e,!0);let t=await n.resolver(f,n.context,eR(e||w.mount,a,n.criteriaMode,n.shouldUseNativeValidation));return D(e),t},K=async e=>{let{errors:t}=await q(e);if(e)for(let n of e){let e=v(t,n);e?_(r.errors,n,e):ec(r.errors,n)}else r.errors=t;return t},Y=async(e,t,i={valid:!0})=>{for(let o in e){let l=e[o];if(l){let{_f:e,...a}=l;if(e){let a=w.array.has(e.name),s=l._f&&eA(l._f);s&&R.validatingFields&&D([o],!0);let u=await er(l,w.disabled,f,M,n.shouldUseNativeValidation&&!t,a);if(s&&R.validatingFields&&D([o]),u[e.name]&&(i.valid=!1,t))break;t||(v(u,e.name)?a?H(r.errors,u,e.name):_(r.errors,e.name,u[e.name]):ec(r.errors,e.name))}F(a)||await Y(a,t,i)}}return i.valid},X=(e,t)=>!n.disabled&&(e&&t&&_(f,e,t),!eh(el(),d)),J=(e,t,n)=>I(e,w,{...b.mount?f:h(t)?d:T(e)?{[e]:t}:t},n,t),Q=(e,t,n={})=>{let r=v(a,e),o=t;if(r){let n=r._f;n&&(n.disabled||_(f,e,eC(t,n)),o=$(n.ref)&&l(t)?"":t,ev(n.ref)?[...n.ref.options].forEach(e=>e.selected=o.includes(e.value)):n.refs?i(n.ref)?n.refs.length>1?n.refs.forEach(e=>(!e.defaultChecked||!e.disabled)&&(e.checked=Array.isArray(o)?!!o.find(t=>t===e.value):o===e.value)):n.refs[0]&&(n.refs[0].checked=!!o):n.refs.forEach(e=>e.checked=e.value===o):B(n.ref)?n.ref.value="":(n.ref.value=o,n.ref.type||E.values.next({name:e,values:{...f}})))}(n.shouldDirty||n.shouldTouch)&&L(e,o,n.shouldTouch,n.shouldDirty,!0),n.shouldValidate&&eo(e)}
4,ee=(e,t,n)=>{for(let r in t){let i=t[r],l=`${e}.${r}`,u=v(a,l);(w.array.has(e)||s(i)||u&&!u._f)&&!o(i)?ee(l,i,n):Q(l,i,n)}},et=(e,t,n={})=>{let i=v(a,e),o=w.array.has(e),s=g(t);_(f,e,s),o?(E.array.next({name:e,values:{...f}}),(R.isDirty||R.dirtyFields)&&n.shouldDirty&&E.state.next({name:e,dirtyFields:ex(d,f),isDirty:X(e,s)})):!i||i._f||l(s)?Q(e,s,n):ee(e,s,n),z(e,w)&&E.state.next({...r}),E.values.next({name:b.mount?e:void 0,values:{...f}})},en=async e=>{b.mount=!0;let i=e.target,l=i.name,s=!0,d=v(a,l),c=e=>{s=Number.isNaN(e)||o(e)&&isNaN(e.getTime())||eh(e,v(f,l,e))};if(d){let o,p;let g=i.type?eS(d._f):u(e),m=e.type===x.BLUR||e.type===x.FOCUS_OUT,h=!eF(d._f)&&!n.resolver&&!v(r.errors,l)&&!d._f.deps||eP(m,v(r.touchedFields,l),r.isSubmitted,A,k),y=z(l,w,m);_(f,l,g),m?(d._f.onBlur&&d._f.onBlur(e),t&&t(0)):d._f.onChange&&d._f.onChange(e);let b=L(l,g,m,!1),C=!F(b)||y;if(m||E.values.next({name:l,type:e.type,values:{...f}}),h)return R.isValid&&("onBlur"===n.mode&&m?V():m||V()),C&&E.state.next({name:l,...y?{}:b});if(!m&&y&&E.state.next({...r}),n.resolver){let{errors:e}=await q([l]);if(c(g),s){let t=eM(r.errors,a,l),n=eM(e,a,t.name||l);o=n.error,l=n.name,p=F(e)}}else D([l],!0),o=(await er(d,w.disabled,f,M,n.shouldUseNativeValidation))[l],D([l]),c(g),s&&(o?p=!1:R.isValid&&(p=await Y(a,!0)));s&&(d._f.deps&&eo(d._f.deps),G(l,p,o,b))}},ei=(e,t)=>{if(v(r.errors,t)&&e.focus)return e.focus(),1},eo=async(e,t={})=>{let i,o;let l=P(e);if(n.resolver){let t=await K(h(e)?e:l);i=F(t),o=e?!l.some(e=>v(t,e)):i}else e?((o=(await Promise.all(l.map(async e=>{let t=v(a,e);return await Y(t&&t._f?{[e]:t}:t)}))).every(Boolean))||r.isValid)&&V():o=i=await Y(a);return E.state.next({...!T(e)||R.isValid&&i!==r.isValid?{}:{name:e},...n.resolver||!e?{isValid:i}:{},errors:r.errors}),t.shouldFocus&&!o&&W(a,ei,e?l:w.mount),o},el=e=>{let t={...b.mount?f:d};return h(e)?t:T(e)?v(t,e):e.map(e=>v(t,e))},ea=(e,t)=>({invalid:!!v((t||r).errors,e),isDirty:!!v((t||r).dirtyFields,e),error:v((t||r).errors,e),isValidating:!!v(r.validatingFields,e),isTouched:!!v((t||r).touchedFields,e)}),es=(e,t,n)=>{let i=(v(a,e,{_f:{}})._f||{}).ref,{ref:o,message:l,type:s,...u}=v(r.errors,e)||{};_(r.errors,e,{...u,...t,ref:i}),E.state.next({name:e,errors:r.errors,isValid:!1}),n&&n.shouldFocus&&i&&i.focus&&i.focus()},eu=(e,t={})=>{for(let i of e?P(e):w.mount)w.mount.delete(i),w.array.delete(i),t.keepValue||(ec(a,i),ec(f,i)),t.keepError||ec(r.errors,i),t.keepDirty||ec(r.dirtyFields,i),t.keepTouched||ec(r.touchedFields,i),t.keepIsValidating||ec(r.validatingFields,i),n.shouldUnregister||t.keepDefaultValue||ec(d,i);E.values.next({values:{...f}}),E.state.next({...r,...t.keepDirty?{isDirty:X()}:{}}),t.keepIsValid||V()},ed=({disabled:e,name:t,field:n,fields:r})=>{(y(e)&&b.mount||e||w.disabled.has(t))&&(e?w.disabled.add(t):w.disabled.delete(t),L(t,eS(n?n._f:v(r,t)._f),!1,!1,!0))},ef=(e,t={})=>{let r=v(a,e),i=y(t.disabled)||y(n.disabled);return _(a,e,{...r||{},_f:{...r&&r._f?r._f:{ref:{name:e}},name:e,mount:!0,...t}}),w.mount.add(e),r?ed({field:r,disabled:y(t.disabled)?t.disabled:n.disabled,name:e}):j(e,!0,t.value),{...i?{disabled:t.disabled||n.disabled}:{},...n.progressive?{required:!!t.required,min:eE(t.min),max:eE(t.max),minLength:eE(t.minLength),maxLength:eE(t.maxLength),pattern:eE(t.pattern)}:{},name:e,onChange:en,onBlur:en,ref:i=>{if(i){ef(e,t),r=v(a,e);let n=h(i.value)&&i.querySelectorAll&&i.querySelectorAll("input,select,textarea")[0]||i,o=ey(n),l=r._f.refs||[];(o?l.find(e=>e===n):n===r._f.ref)||(_(a,e,{_f:{...r._f,...o?{refs:[...l.filter(eb),n,...Array.isArray(v(d,e))?[{}]:[]],ref:{type:n.type,name:e}}:{ref:n}}}),j(e,!1,void 0,n))}else(r=v(a,e,{}))._f&&(r._f.mount=!1),(n.shouldUnregister||t.shouldUnregister)&&!(c(w.array,e)&&b.action)&&w.unMount.add(e)}}},ep=()=>n.shouldFocusError&&W(a,ei,w.mount),em=(e,t)=>async i=>{let o;i&&(i.preventDefault&&i.preventDefault(),i.persist&&i.persist());let l=g(f);if(w.disabled.size)for(let e of w.disabled)_(l,e,void 0);if(E.state.next({isSubmitting:!0}),n.resolver){let{errors:e,values:t}=await q();r.errors=e,l=t}else await Y(a);if(ec(r.errors,"root"),F(r.errors)){E.state.next({errors:{}});try{await e(l,i)}catch(e){o=e}}else t&&await t({...r.errors},i),ep(),setTimeout(ep);if(E.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:F(r.errors)&&!o,submitCount:r.submitCount+1,errors:r.errors}),o)throw o},ew=(e,t={})=>{let i=e?g(e):d,o=g(i),l=F(e),s=l?d:o;if(t.keepDefaultValues||(d=i),!t.keepValues){if(t.keepDirtyValues)for(let e of Array.from(new Set([...w.mount,...Object.keys(ex(d,f))])))v(r.dirtyFields,e)?_(s,e,v(f,e)):et(e,v(s,e));else{if(p&&h(e))for(let e of w.mount){let t=v(a,e);
4if(t&&t._f){let e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if($(e)){let t=e.closest("form");if(t){t.reset();break}}}}a={}}f=n.shouldUnregister?t.keepDefaultValues?g(d):{}:g(s),E.array.next({values:{...s}}),E.values.next({values:{...s}})}w={mount:t.keepDirtyValues?w.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},b.mount=!R.isValid||!!t.keepIsValid||!!t.keepDirtyValues,b.watch=!!n.shouldUnregister,E.state.next({submitCount:t.keepSubmitCount?r.submitCount:0,isDirty:!l&&(t.keepDirty?r.isDirty:!!(t.keepDefaultValues&&!eh(e,d))),isSubmitted:!!t.keepIsSubmitted&&r.isSubmitted,dirtyFields:l?{}:t.keepDirtyValues?t.keepDefaultValues&&f?ex(d,f):r.dirtyFields:t.keepDefaultValues&&e?ex(d,e):t.keepDirty?r.dirtyFields:{},touchedFields:t.keepTouched?r.touchedFields:{},errors:t.keepErrors?r.errors:{},isSubmitSuccessful:!!t.keepIsSubmitSuccessful&&r.isSubmitSuccessful,isSubmitting:!1})},e_=(e,t)=>ew(U(e)?e(f):e,t);return{control:{register:ef,unregister:eu,getFieldState:ea,handleSubmit:em,setError:es,_executeSchema:q,_getWatch:J,_getDirty:X,_updateValid:V,_removeUnmounted:()=>{for(let e of w.unMount){let t=v(a,e);t&&(t._f.refs?t._f.refs.every(e=>!eb(e)):!eb(t._f.ref))&&eu(e)}w.unMount=new Set},_updateFieldArray:(e,t=[],i,o,l=!0,s=!0)=>{if(o&&i&&!n.disabled){if(b.action=!0,s&&Array.isArray(v(a,e))){let t=i(v(a,e),o.argA,o.argB);l&&_(a,e,t)}if(s&&Array.isArray(v(r.errors,e))){let t=i(v(r.errors,e),o.argA,o.argB);l&&_(r.errors,e,t),eO(r.errors,e)}if(R.touchedFields&&s&&Array.isArray(v(r.touchedFields,e))){let t=i(v(r.touchedFields,e),o.argA,o.argB);l&&_(r.touchedFields,e,t)}R.dirtyFields&&(r.dirtyFields=ex(d,f)),E.state.next({name:e,isDirty:X(e,t),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else _(f,e,t)},_updateDisabledField:ed,_getFieldArray:e=>m(v(b.mount?f:d,e,n.shouldUnregister?v(d,e,[]):[])),_reset:ew,_resetDefaultValues:()=>U(n.defaultValues)&&n.defaultValues().then(e=>{e_(e,n.resetOptions),E.state.next({isLoading:!1})}),_updateFormState:e=>{r={...r,...e}},_disableForm:e=>{y(e)&&(E.state.next({disabled:e}),W(a,(t,n)=>{let r=v(a,n);r&&(t.disabled=r._f.disabled||e,Array.isArray(r._f.refs)&&r._f.refs.forEach(t=>{t.disabled=r._f.disabled||e}))},0,!1))},_subjects:E,_proxyFormState:R,_setErrors:e=>{r.errors=e,E.state.next({errors:r.errors,isValid:!1})},get _fields(){return a},get _formValues(){return f},get _state(){return b},set _state(value){b=value},get _defaultValues(){return d},get _names(){return w},set _names(value){w=value},get _formState(){return r},set _formState(value){r=value},get _options(){return n},set _options(value){n={...n,...value}}},trigger:eo,register:ef,handleSubmit:em,watch:(e,t)=>U(e)?E.values.subscribe({next:n=>e(J(void 0,t),n)}):J(e,t,!0),setValue:et,getValues:el,reset:e_,resetField:(e,t={})=>{v(a,e)&&(h(t.defaultValue)?et(e,g(v(d,e))):(et(e,t.defaultValue),_(d,e,g(t.defaultValue))),t.keepTouched||ec(r.touchedFields,e),t.keepDirty||(ec(r.dirtyFields,e),r.isDirty=t.defaultValue?X(e,g(v(d,e))):X()),!t.keepError&&(ec(r.errors,e),R.isValid&&V()),E.state.next({...r}))},clearErrors:e=>{e&&P(e).forEach(e=>ec(r.errors,e)),E.state.next({errors:e?r.errors:{}})},unregister:eu,setError:es,setFocus:(e,t={})=>{let n=v(a,e),r=n&&n._f;if(r){let e=r.refs?r.refs[0]:r.ref;e.focus&&(e.focus(),t.shouldSelect&&U(e.select)&&e.select())}},getFieldState:ea}}(e),formState:a});let f=t.current.control;return f._options=e,V({subject:f._subjects.state,next:e=>{M(e,f._proxyFormState,f._updateFormState,!0)&&d({...f._formState})}}),r.useEffect(()=>f._disableForm(e.disabled),[f,e.disabled]),r.useEffect(()=>{if(f._proxyFormState.isDirty){let e=f._getDirty();e!==a.isDirty&&f._subjects.state.next({isDirty:e})}},[f,a.isDirty]),r.useEffect(()=>{e.values&&!eh(e.values,n.current)?(f._reset(e.values,f._options.resetOptions),n.current=e.values,d(e=>({...e}))):f._resetDefaultValues()},[e.values,f]),r.useEffect(()=>{e.errors&&f._setErrors(e.errors)},[e.errors,f]),r.useEffect(()=>{f._state.mount||(f._updateValid(),f._state.mount=!0),f._state.watch&&(f._state.watch=!1,f._subjects.state.next({...f._formState})),f._removeUnmounted()}),r.useEffect(()=>{e.shouldUnregister&&f._subjects.values.next({values:f._getWatch()})},[e.shouldUnregister,f]),t.current.formState=A(a,f),t.current}},83780:function(e,t,n){n.d(t,{ZT:function(){return i},_T:function(){return l},ev:function(){return a},pi:function(){return o}});var r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]}
4)instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function l(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)0>t.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function a(e,t,n){if(n||2==arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError},41270:function(e,t,n){let r;n.d(t,{IX:function(){return eU},Rx:function(){return eV},Ry:function(){return e$},Yj:function(){return ez},Z_:function(){return eO},hT:function(){return eN},oQ:function(){return tn},z:function(){return tf}}),(tr=tl||(tl={})).assertEqual=e=>e,tr.assertIs=function(e){},tr.assertNever=function(e){throw Error()},tr.arrayToEnum=e=>{let t={};for(let n of e)t[n]=n;return t},tr.getValidEnumValues=e=>{let t=tr.objectKeys(e).filter(t=>"number"!=typeof e[e[t]]),n={};for(let r of t)n[r]=e[r];return tr.objectValues(n)},tr.objectValues=e=>tr.objectKeys(e).map(function(t){return e[t]}),tr.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{let t=[];for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},tr.find=(e,t)=>{for(let n of e)if(t(n))return n},tr.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&isFinite(e)&&Math.floor(e)===e,tr.joinValues=function(e,t=" | "){return e.map(e=>"string"==typeof e?`'${e}'`:e).join(t)},tr.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t,(ta||(ta={})).mergeShapes=(e,t)=>({...e,...t});let i=tl.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),o=e=>{switch(typeof e){case"undefined":return i.undefined;case"string":return i.string;case"number":return isNaN(e)?i.nan:i.number;case"boolean":return i.boolean;case"function":return i.function;case"bigint":return i.bigint;case"symbol":return i.symbol;case"object":if(Array.isArray(e))return i.array;if(null===e)return i.null;if(e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch)return i.promise;if("undefined"!=typeof Map&&e instanceof Map)return i.map;if("undefined"!=typeof Set&&e instanceof Set)return i.set;if("undefined"!=typeof Date&&e instanceof Date)return i.date;return i.object;default:return i.unknown}}
vendor: 4,182 bytes, line 4
4,l=tl.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class a extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};let t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){let t=e||function(e){return e.message},n={_errors:[]},r=e=>{for(let i of e.issues)if("invalid_union"===i.code)i.unionErrors.map(r);else if("invalid_return_type"===i.code)r(i.returnTypeError);else if("invalid_arguments"===i.code)r(i.argumentsError);else if(0===i.path.length)n._errors.push(t(i));else{let e=n,r=0;for(;r<i.path.length;){let n=i.path[r];r===i.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(i))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(this),n}static assert(e){if(!(e instanceof a))throw Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,tl.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=e=>e.message){let t={},n=[];for(let r of this.issues)r.path.length>0?(t[r.path[0]]=t[r.path[0]]||[],t[r.path[0]].push(e(r))):n.push(e(r));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}}a.create=e=>new a(e);let s=(e,t)=>{let n;switch(e.code){case l.invalid_type:n=e.received===i.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case l.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,tl.jsonStringifyReplacer)}`;break;case l.unrecognized_keys:n=`Unrecognized key(s) in object: ${tl.joinValues(e.keys,", ")}`;break;case l.invalid_union:n="Invalid input";break;case l.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${tl.joinValues(e.options)}`;break;case l.invalid_enum_value:n=`Invalid enum value. Expected ${tl.joinValues(e.options)}, received '${e.received}'`;break;case l.invalid_arguments:n="Invalid function arguments";break;case l.invalid_return_type:n="Invalid function return type";break;case l.invalid_date:n="Invalid date";break;case l.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:tl.assertNever(e.validation):n="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case l.too_small:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case l.too_big:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case l.custom:n="Invalid input";break;
4case l.invalid_intersection_types:n="Intersection results could not be merged";break;case l.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case l.not_finite:n="Number must be finite";break;default:n=t.defaultError,tl.assertNever(e)}return{message:n}},u=s;function d(){return u}let c=e=>{let{data:t,path:n,errorMaps:r,issueData:i}=e,o=[...n,...i.path||[]],l={...i,path:o};if(void 0!==i.message)return{...i,path:o,message:i.message};let a="";for(let e of r.filter(e=>!!e).slice().reverse())a=e(l,{data:t,defaultError:a}).message;return{...i,path:o,message:a}};function f(e,t){let n=d(),r=c({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===s?void 0:s].filter(e=>!!e)});e.common.issues.push(r)}class p{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){let n=[];for(let r of t){if("aborted"===r.status)return g;"dirty"===r.status&&e.dirty(),n.push(r.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,t){let n=[];for(let e of t){let t=await e.key,r=await e.value;n.push({key:t,value:r})}return p.mergeObjectSync(e,n)}static mergeObjectSync(e,t){let n={};for(let r of t){let{key:t,value:i}=r;if("aborted"===t.status||"aborted"===i.status)return g;"dirty"===t.status&&e.dirty(),"dirty"===i.status&&e.dirty(),"__proto__"!==t.value&&(void 0!==i.value||r.alwaysSet)&&(n[t.value]=i.value)}return{status:e.value,value:n}}}let g=Object.freeze({status:"aborted"}),m=e=>({status:"dirty",value:e}),h=e=>({status:"valid",value:e}),v=e=>"aborted"===e.status,y=e=>"dirty"===e.status,b=e=>"valid"===e.status,w=e=>"undefined"!=typeof Promise&&e instanceof Promise;function _(e,t,n,r){if("a"===n&&!r)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}function x(e,t,n,r,i){if("m"===r)throw TypeError("Private method is not writable");if("a"===r&&!i)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n}"function"==typeof SuppressedError&&SuppressedError,(ti=ts||(ts={})).errToObj=e=>"string"==typeof e?{message:e}:e||{},ti.toString=e=>"string"==typeof e?e:null==e?void 0:e.message;class C{constructor(e,t,n,r){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=r}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}let S=(e,t)=>{if(b(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let t=new a(e.common.issues);return this._error=t,this._error}}};function R(e){if(!e)return{};let{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return t?{errorMap:t,description:i}:{errorMap:(t,i)=>{var o,l;let{message:a}=e;return"invalid_enum_value"===t.code?{message:null!=a?a:i.defaultError}:void 0===i.data?{message:null!==(o=null!=a?a:r)&&void 0!==o?o:i.defaultError}:"invalid_type"!==t.code?{message:i.defaultError}:{message:null!==(l=null!=a?a:n)&&void 0!==l?l:i.defaultError}},description:i}}class E{get description(){return this._def.description}_getType(e){return o(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:o(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new p,ctx:{common:e.parent.common,data:e.data,parsedType:o(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(w(t))throw Error("Synchronous parse encountered promise.");return t}_parseAsync(e){return Promise.resolve(this._parse(e))}parse(e,t){let n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){var n;let r={common:{issues:[],async:null!==(n=null==t?void 0:t.async)&&void 0!==n&&n,contextualErrorMap:null==t?void 0:t.errorMap},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:o(e)},i=this._parseSync({data:e,path:r.path,parent:r});return S(r,i)}"~validate"(e){var t,n;let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:o(e)};if(!this["~standard"].async)try{let t=this._parseSync({data:e,path:[],parent:r});return b(t)?{value:t.value}:{issues:r.common.issues}}catch(e){(null===(n=null===(t=null==e?void 0:e.message)||void 0===t?void 0:t.toLowerCase())||void 0===n?void 0:n.includes("encountered"))&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:r}).then(e=>b(e)?{value:e.value}:{issues:r.common.issues})}async parseAsync(e,t){let n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){let n={common:{issues:[],contextualErrorMap:null==t?void 0:t.errorMap,async:!0},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:o(e)},r=this._parse({data:e,path:n.path,parent:n});return S(n,await (w(r)?r:Promise.resolve(r)))}refine(e,t){let n=e=>"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t;return this._refinement((t,r)=>{let i=e(t),o=()=>r.addIssue({code:l.custom,...n(t)});return"undefined"!=typeof Promise&&i instanceof Promise?i.then(e=>!!e||(o(),!1)):!!i||(o(),!1)})}refinement(e,t){return this._refinement((n,r)=>!!e(n)||(r.addIssue("function"==typeof t?t(n,r):t),!1))}_refinement(e){return new ew({schema:this,typeName:tc.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:e=>this["~validate"](e)}}optional(){return e_.create(this,this._def)}nullable(){return ex.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return er.create(this)}promise(){return eb.create(this,this._def)}or(e){return eo.create([this,e],this._def)}and(e){return es.create(this,e,this._def)}transform(e){return new ew({...R(this._def),schema:this,typeName:tc.ZodEffects,effect:{type:"transform",transform:e}})}default(e){return new eC({...R(this._def),innerType:this,defaultValue:"function"==typeof e?e:()=>e,typeName:tc.ZodDefault})}brand(){return new ek({typeName:tc.ZodBranded,type:this,...R(this._def)})}catch(e){return new eS({...R(this._def),innerType:this,catchValue:"function"==typeof e?e:()=>e,typeName:tc.ZodCatch})}describe(e){return new this.constructor({...this._def,description:e})}pipe(e){return eA.create(this,e)}readonly(){return eF.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}let k=/^c[^\s-]{8,}
vendor: 6,718 bytes, line 4
4$/i,A=/^[0-9a-z]+$/,F=/^[0-9A-HJKMNP-TV-Z]{26}$/i,M=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,P=/^[a-z0-9_-]{21}$/i,O=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,V=/^[-+]?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)?)??$/,T=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,I=/^(?:(?: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])$/,D=/^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/,N=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,j=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,L=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Z=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,z="((\\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])))",W=RegExp(`^${z}$`);function H(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:null==e.precision&&(t=`${t}(\\.\\d+)?`),t}function B(e){let t=`${z}T${H(e)}`,n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,RegExp(`^${t}$`)}class U extends E{_parse(e){var t,n,o,a;let s;if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==i.string){let t=this._getOrReturnCtx(e);return f(t,{code:l.invalid_type,expected:i.string,received:t.parsedType}),g}let u=new p;for(let i of this._def.checks)if("min"===i.kind)e.data.length<i.value&&(f(s=this._getOrReturnCtx(e,s),{code:l.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),u.dirty());else if("max"===i.kind)e.data.length>i.value&&(f(s=this._getOrReturnCtx(e,s),{code:l.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),u.dirty());else if("length"===i.kind){let t=e.data.length>i.value,n=e.data.length<i.value;(t||n)&&(s=this._getOrReturnCtx(e,s),t?f(s,{code:l.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):n&&f(s,{code:l.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),u.dirty())}else if("email"===i.kind)T.test(e.data)||(f(s=this._getOrReturnCtx(e,s),{validation:"email",code:l.invalid_string,message:i.message}),u.dirty());else if("emoji"===i.kind)r||(r=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),r.test(e.data)||(f(s=this._getOrReturnCtx(e,s),{validation:"emoji",code:l.invalid_string,message:i.message}),u.dirty());else if("uuid"===i.kind)M.test(e.data)||(f(s=this._getOrReturnCtx(e,s),{validation:"uuid",code:l.invalid_string,message:i.message}),u.dirty());else if("nanoid"===i.kind)P.test(e.data)||(f(s=this._getOrReturnCtx(e,s),{validation:"nanoid",code:l.invalid_string,message:i.message}),u.dirty());else if("cuid"===i.kind)k.test(e.data)||(f(s=this._getOrReturnCtx(e,s),{validation:"cuid",code:l.invalid_string,message:i.message}),u.dirty());else if("cuid2"===i.kind)A.test(e.data)||(f(s=this._getOrReturnCtx(e,s),{validation:"cuid2",code:l.invalid_string,message:i.message}),u.dirty());else if("ulid"===i.kind)F.test(e.data)||(f(s=this._getOrReturnCtx(e,s),{validation:"ulid",code:l.invalid_string,message:i.message}),u.dirty());else if("url"===i.kind)try{new URL(e.data)}catch(t){f(s=this._getOrReturnCtx(e,s),{validation:"url",code:l.invalid_string,message:i.message}),u.dirty()}else"regex"===i.kind?(i.regex.lastIndex=0,i.regex.test(e.data)||(f(s=this._getOrReturnCtx(e,s),{validation:"regex",code:l.invalid_string,message:i.message}),u.dirty())):"trim"===i.kind?e.data=e.data.trim():"includes"===i.kind?e.data.includes(i.value,i.position)||(f(s=this._getOrReturnCtx(e,s),{code:l.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),u.dirty()):"toLowerCase"===i.kind?e.data=e.data.toLowerCase():"toUpperCase"===i.kind?e.data=e.data.toUpperCase():"startsWith"===i.kind?e.data.startsWith(i.value)||(f(s=this._getOrReturnCtx(e,s),{code:l.invalid_string,validation:{startsWith:i.value},message:i.message}),u.dirty()):"endsWith"===i.kind?e.data.endsWith(i.value)||(f(s=this._getOrReturnCtx(e,s),{code:l.invalid_string,validation:{endsWith:i.value},message:i.message}),u.dirty()):"datetime"===i.kind?B(i).test(e.data)||(f(s=this._getOrReturnCtx(e,s),{code:l.invalid_string,validation:"datetime",message:i.message}),u.dirty()):"date"===i.kind?W.test(e.data)||(f(s=this._getOrReturnCtx(e,s),{code:l.invalid_string,validation:"date",message:i.message}),u.dirty()):"time"===i.kind?RegExp(`^${H(i)}$`).test(e.data)||(f(s=this._getOrReturnCtx(e,s),{code:l.invalid_string,validation:"time",message:i.message}),u.dirty()):"duration"===i.kind?V.test(e.data)||(f(s=this._getOrReturnCtx(e,s),{validation:"duration",code:l.invalid_string,message:i.message}),u.dirty()):"ip"===i.kind?(t=e.data,("v4"===(n=i.version)||!n)&&I.test(t)||("v6"===n||!n)&&N.test(t)||(f(s=this._getOrReturnCtx(e,s),{validation:"ip",code:l.invalid_string,message:i.message}),u.dirty())):"jwt"===i.kind?!function(e,t){if(!O.test(e))return!1;
4try{let[n]=e.split("."),r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),i=JSON.parse(atob(r));if("object"!=typeof i||null===i||!i.typ||!i.alg||t&&i.alg!==t)return!1;return!0}catch(e){return!1}}(e.data,i.alg)&&(f(s=this._getOrReturnCtx(e,s),{validation:"jwt",code:l.invalid_string,message:i.message}),u.dirty()):"cidr"===i.kind?(o=e.data,("v4"===(a=i.version)||!a)&&D.test(o)||("v6"===a||!a)&&j.test(o)||(f(s=this._getOrReturnCtx(e,s),{validation:"cidr",code:l.invalid_string,message:i.message}),u.dirty())):"base64"===i.kind?L.test(e.data)||(f(s=this._getOrReturnCtx(e,s),{validation:"base64",code:l.invalid_string,message:i.message}),u.dirty()):"base64url"===i.kind?Z.test(e.data)||(f(s=this._getOrReturnCtx(e,s),{validation:"base64url",code:l.invalid_string,message:i.message}),u.dirty()):tl.assertNever(i);return{status:u.value,value:e.data}}_regex(e,t,n){return this.refinement(t=>e.test(t),{validation:t,code:l.invalid_string,...ts.errToObj(n)})}_addCheck(e){return new U({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...ts.errToObj(e)})}url(e){return this._addCheck({kind:"url",...ts.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...ts.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...ts.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...ts.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...ts.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...ts.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...ts.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...ts.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...ts.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...ts.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...ts.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...ts.errToObj(e)})}datetime(e){var t,n;return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,offset:null!==(t=null==e?void 0:e.offset)&&void 0!==t&&t,local:null!==(n=null==e?void 0:e.local)&&void 0!==n&&n,...ts.errToObj(null==e?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return"string"==typeof e?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,...ts.errToObj(null==e?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...ts.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...ts.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:null==t?void 0:t.position,...ts.errToObj(null==t?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...ts.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...ts.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...ts.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...ts.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...ts.errToObj(t)})}nonempty(e){return this.min(1,ts.errToObj(e))}trim(){return new U({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new U({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new U({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>"datetime"===e.kind)}get isDate(){return!!this._def.checks.find(e=>"date"===e.kind)}get isTime(){return!!this._def.checks.find(e=>"time"===e.kind)}get isDuration(){return!!this._def.checks.find(e=>"duration"===e.kind)}get isEmail(){return!!this._def.checks.find(e=>"email"===e.kind)}get isURL(){return!!this._def.checks.find(e=>"url"===e.kind)}get isEmoji(){return!!this._def.checks.find(e=>"emoji"===e.kind)}get isUUID(){return!!this._def.checks.find(e=>"uuid"===e.kind)}get isNANOID(){return!!this._def.checks.find(e=>"nanoid"===e.kind)}get isCUID(){return!!this._def.checks.find(e=>"cuid"===e.kind)}get isCUID2(){return!!this._def.checks.find(e=>"cuid2"===e.kind)}get isULID(){return!!this._def.checks.find(e=>"ulid"===e.kind)}get isIP(){return!!this._def.checks.find(e=>"ip"===e.kind)}get isCIDR(){return!!this._def.checks.find(e=>"cidr"===e.kind)}get isBase64(){return!!this._def.checks.find(e=>"base64"===e.kind)}get isBase64url(){return!!this._def.checks.find(e=>"base64url"===e.kind)}get minLength(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}U.create=e=>{var t;return new U({checks:[],typeName:tc.ZodString,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...R(e)})};
4class $ extends E{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){let t;if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==i.number){let t=this._getOrReturnCtx(e);return f(t,{code:l.invalid_type,expected:i.number,received:t.parsedType}),g}let n=new p;for(let r of this._def.checks)"int"===r.kind?tl.isInteger(e.data)||(f(t=this._getOrReturnCtx(e,t),{code:l.invalid_type,expected:"integer",received:"float",message:r.message}),n.dirty()):"min"===r.kind?(r.inclusive?e.data<r.value:e.data<=r.value)&&(f(t=this._getOrReturnCtx(e,t),{code:l.too_small,minimum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):"max"===r.kind?(r.inclusive?e.data>r.value:e.data>=r.value)&&(f(t=this._getOrReturnCtx(e,t),{code:l.too_big,maximum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):"multipleOf"===r.kind?0!==function(e,t){let n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r;return parseInt(e.toFixed(i).replace(".",""))%parseInt(t.toFixed(i).replace(".",""))/Math.pow(10,i)}(e.data,r.value)&&(f(t=this._getOrReturnCtx(e,t),{code:l.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):"finite"===r.kind?Number.isFinite(e.data)||(f(t=this._getOrReturnCtx(e,t),{code:l.not_finite,message:r.message}),n.dirty()):tl.assertNever(r);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,ts.toString(t))}gt(e,t){return this.setLimit("min",e,!1,ts.toString(t))}lte(e,t){return this.setLimit("max",e,!0,ts.toString(t))}lt(e,t){return this.setLimit("max",e,!1,ts.toString(t))}setLimit(e,t,n,r){return new $({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:ts.toString(r)}]})}_addCheck(e){return new $({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:ts.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ts.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ts.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ts.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ts.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:ts.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:ts.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ts.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ts.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>"int"===e.kind||"multipleOf"===e.kind&&tl.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let n of this._def.checks){if("finite"===n.kind||"int"===n.kind||"multipleOf"===n.kind)return!0;"min"===n.kind?(null===t||n.value>t)&&(t=n.value):"max"===n.kind&&(null===e||n.value<e)&&(e=n.value)}return Number.isFinite(t)&&Number.isFinite(e)}}$.create=e=>new $({checks:[],typeName:tc.ZodNumber,coerce:(null==e?void 0:e.coerce)||!1,...R(e)});class G extends E{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){let t;if(this._def.coerce)try{e.data=BigInt(e.data)}catch(t){return this._getInvalidInput(e)}if(this._getType(e)!==i.bigint)return this._getInvalidInput(e);let n=new p;for(let r of this._def.checks)"min"===r.kind?(r.inclusive?e.data<r.value:e.data<=r.value)&&(f(t=this._getOrReturnCtx(e,t),{code:l.too_small,type:"bigint",minimum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty()):"max"===r.kind?(r.inclusive?e.data>r.value:e.data>=r.value)&&(f(t=this._getOrReturnCtx(e,t),{code:l.too_big,type:"bigint",maximum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty()):"multipleOf"===r.kind?e.data%r.value!==BigInt(0)&&(f(t=this._getOrReturnCtx(e,t),{code:l.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):tl.assertNever(r);return{status:n.value,value:e.data}}_getInvalidInput(e){let t=this._getOrReturnCtx(e);return f(t,{code:l.invalid_type,expected:i.bigint,received:t.parsedType}),g}gte(e,t){return this.setLimit("min",e,!0,ts.toString(t))}gt(e,t){return this.setLimit("min",e,!1,ts.toString(t))}lte(e,t){return this.setLimit("max",e,!0,ts.toString(t))}lt(e,t){return this.setLimit("max",e,!1,ts.toString(t))}setLimit(e,t,n,r){return new G({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:ts.toString(r)}]})}_addCheck(e){return new G({...this._def,checks:[...this._def.checks,e]})}
4positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ts.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ts.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ts.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ts.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:ts.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}G.create=e=>{var t;return new G({checks:[],typeName:tc.ZodBigInt,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...R(e)})};class q extends E{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==i.boolean){let t=this._getOrReturnCtx(e);return f(t,{code:l.invalid_type,expected:i.boolean,received:t.parsedType}),g}return h(e.data)}}q.create=e=>new q({typeName:tc.ZodBoolean,coerce:(null==e?void 0:e.coerce)||!1,...R(e)});class K extends E{_parse(e){let t;if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==i.date){let t=this._getOrReturnCtx(e);return f(t,{code:l.invalid_type,expected:i.date,received:t.parsedType}),g}if(isNaN(e.data.getTime()))return f(this._getOrReturnCtx(e),{code:l.invalid_date}),g;let n=new p;for(let r of this._def.checks)"min"===r.kind?e.data.getTime()<r.value&&(f(t=this._getOrReturnCtx(e,t),{code:l.too_small,message:r.message,inclusive:!0,exact:!1,minimum:r.value,type:"date"}),n.dirty()):"max"===r.kind?e.data.getTime()>r.value&&(f(t=this._getOrReturnCtx(e,t),{code:l.too_big,message:r.message,inclusive:!0,exact:!1,maximum:r.value,type:"date"}),n.dirty()):tl.assertNever(r);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new K({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:ts.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:ts.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}K.create=e=>new K({checks:[],coerce:(null==e?void 0:e.coerce)||!1,typeName:tc.ZodDate,...R(e)});class Y extends E{_parse(e){if(this._getType(e)!==i.symbol){let t=this._getOrReturnCtx(e);return f(t,{code:l.invalid_type,expected:i.symbol,received:t.parsedType}),g}return h(e.data)}}Y.create=e=>new Y({typeName:tc.ZodSymbol,...R(e)});class X extends E{_parse(e){if(this._getType(e)!==i.undefined){let t=this._getOrReturnCtx(e);return f(t,{code:l.invalid_type,expected:i.undefined,received:t.parsedType}),g}return h(e.data)}}X.create=e=>new X({typeName:tc.ZodUndefined,...R(e)});class J extends E{_parse(e){if(this._getType(e)!==i.null){let t=this._getOrReturnCtx(e);return f(t,{code:l.invalid_type,expected:i.null,received:t.parsedType}),g}return h(e.data)}}J.create=e=>new J({typeName:tc.ZodNull,...R(e)});class Q extends E{constructor(){super(...arguments),this._any=!0}_parse(e){return h(e.data)}}Q.create=e=>new Q({typeName:tc.ZodAny,...R(e)});class ee extends E{constructor(){super(...arguments),this._unknown=!0}_parse(e){return h(e.data)}}ee.create=e=>new ee({typeName:tc.ZodUnknown,...R(e)});class et extends E{_parse(e){let t=this._getOrReturnCtx(e);return f(t,{code:l.invalid_type,expected:i.never,received:t.parsedType}),g}}et.create=e=>new et({typeName:tc.ZodNever,...R(e)});class en extends E{_parse(e){if(this._getType(e)!==i.undefined){let t=this._getOrReturnCtx(e);return f(t,{code:l.invalid_type,expected:i.void,received:t.parsedType}),g}return h(e.data)}}en.create=e=>new en({typeName:tc.ZodVoid,...R(e)});class er extends E{_parse(e){let{ctx:t,status:n}=this._processInputParams(e),r=this._def;if(t.parsedType!==i.array)return f(t,{code:l.invalid_type,expected:i.array,received:t.parsedType}),g;if(null!==r.exactLength){let e=t.data.length>r.exactLength.value,i=t.data.length<r.exactLength.value;(e||i)&&(f(t,{code:e?l.too_big:l.too_small,minimum:i?r.exactLength.value:void 0,maximum:e?r.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:r.exactLength.message}),n.dirty())}if(null!==r.minLength&&t.data.length<r.minLength.value&&(f(t,{code:l.too_small,minimum:r.minLength.value,type:"array",inclusive:!0,exact:!1,message:r.minLength.message}),n.dirty()),null!==r.maxLength&&t.data.length>r.maxLength.value&&(f(t,{code:l.too_big,maximum:r.maxLength.value,type:"array",inclusive:!0,exact:!1,message:r.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map((e,n)=>r.type._parseAsync(new C(t,e,t.path,n)))).then(e=>p.mergeArray(n,e));let o=[...t.data].map((e,n)=>r.type._parseSync(new C(t,e,t.path,n)));return p.mergeArray(n,o)}
4get element(){return this._def.type}min(e,t){return new er({...this._def,minLength:{value:e,message:ts.toString(t)}})}max(e,t){return new er({...this._def,maxLength:{value:e,message:ts.toString(t)}})}length(e,t){return new er({...this._def,exactLength:{value:e,message:ts.toString(t)}})}nonempty(e){return this.min(1,e)}}er.create=(e,t)=>new er({type:e,minLength:null,maxLength:null,exactLength:null,typeName:tc.ZodArray,...R(t)});class ei extends E{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;let e=this._def.shape(),t=tl.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==i.object){let t=this._getOrReturnCtx(e);return f(t,{code:l.invalid_type,expected:i.object,received:t.parsedType}),g}let{status:t,ctx:n}=this._processInputParams(e),{shape:r,keys:o}=this._getCached(),a=[];if(!(this._def.catchall instanceof et&&"strip"===this._def.unknownKeys))for(let e in n.data)o.includes(e)||a.push(e);let s=[];for(let e of o){let t=r[e],i=n.data[e];s.push({key:{status:"valid",value:e},value:t._parse(new C(n,i,n.path,e)),alwaysSet:e in n.data})}if(this._def.catchall instanceof et){let e=this._def.unknownKeys;if("passthrough"===e)for(let e of a)s.push({key:{status:"valid",value:e},value:{status:"valid",value:n.data[e]}});else if("strict"===e)a.length>0&&(f(n,{code:l.unrecognized_keys,keys:a}),t.dirty());else if("strip"===e);else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let e=this._def.catchall;for(let t of a){let r=n.data[t];s.push({key:{status:"valid",value:t},value:e._parse(new C(n,r,n.path,t)),alwaysSet:t in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let e=[];for(let t of s){let n=await t.key,r=await t.value;e.push({key:n,value:r,alwaysSet:t.alwaysSet})}return e}).then(e=>p.mergeObjectSync(t,e)):p.mergeObjectSync(t,s)}get shape(){return this._def.shape()}strict(e){return ts.errToObj,new ei({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,n)=>{var r,i,o,l;let a=null!==(o=null===(i=(r=this._def).errorMap)||void 0===i?void 0:i.call(r,t,n).message)&&void 0!==o?o:n.defaultError;return"unrecognized_keys"===t.code?{message:null!==(l=ts.errToObj(e).message)&&void 0!==l?l:a}:{message:a}}}:{}})}strip(){return new ei({...this._def,unknownKeys:"strip"})}passthrough(){return new ei({...this._def,unknownKeys:"passthrough"})}extend(e){return new ei({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new ei({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:tc.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new ei({...this._def,catchall:e})}pick(e){let t={};return tl.objectKeys(e).forEach(n=>{e[n]&&this.shape[n]&&(t[n]=this.shape[n])}),new ei({...this._def,shape:()=>t})}omit(e){let t={};return tl.objectKeys(this.shape).forEach(n=>{e[n]||(t[n]=this.shape[n])}),new ei({...this._def,shape:()=>t})}deepPartial(){return function e(t){if(t instanceof ei){let n={};for(let r in t.shape){let i=t.shape[r];n[r]=e_.create(e(i))}return new ei({...t._def,shape:()=>n})}return t instanceof er?new er({...t._def,type:e(t.element)}):t instanceof e_?e_.create(e(t.unwrap())):t instanceof ex?ex.create(e(t.unwrap())):t instanceof eu?eu.create(t.items.map(t=>e(t))):t}(this)}partial(e){let t={};return tl.objectKeys(this.shape).forEach(n=>{let r=this.shape[n];e&&!e[n]?t[n]=r:t[n]=r.optional()}),new ei({...this._def,shape:()=>t})}required(e){let t={};return tl.objectKeys(this.shape).forEach(n=>{if(e&&!e[n])t[n]=this.shape[n];else{let e=this.shape[n];for(;e instanceof e_;)e=e._def.innerType;t[n]=e}}),new ei({...this._def,shape:()=>t})}keyof(){return eh(tl.objectKeys(this.shape))}}ei.create=(e,t)=>new ei({shape:()=>e,unknownKeys:"strip",catchall:et.create(),typeName:tc.ZodObject,...R(t)}),ei.strictCreate=(e,t)=>new ei({shape:()=>e,unknownKeys:"strict",catchall:et.create(),typeName:tc.ZodObject,...R(t)}),ei.lazycreate=(e,t)=>new ei({shape:e,unknownKeys:"strip",catchall:et.create(),typeName:tc.ZodObject,...R(t)});
4class eo extends E{_parse(e){let{ctx:t}=this._processInputParams(e),n=this._def.options;if(t.common.async)return Promise.all(n.map(async e=>{let n={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:n}),ctx:n}})).then(function(e){for(let t of e)if("valid"===t.result.status)return t.result;for(let n of e)if("dirty"===n.result.status)return t.common.issues.push(...n.ctx.common.issues),n.result;let n=e.map(e=>new a(e.ctx.common.issues));return f(t,{code:l.invalid_union,unionErrors:n}),g});{let e;let r=[];for(let i of n){let n={...t,common:{...t.common,issues:[]},parent:null},o=i._parseSync({data:t.data,path:t.path,parent:n});if("valid"===o.status)return o;"dirty"!==o.status||e||(e={result:o,ctx:n}),n.common.issues.length&&r.push(n.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;let i=r.map(e=>new a(e));return f(t,{code:l.invalid_union,unionErrors:i}),g}}get options(){return this._def.options}}eo.create=(e,t)=>new eo({options:e,typeName:tc.ZodUnion,...R(t)});let el=e=>{if(e instanceof eg)return el(e.schema);if(e instanceof ew)return el(e.innerType());if(e instanceof em)return[e.value];if(e instanceof ev)return e.options;if(e instanceof ey)return tl.objectValues(e.enum);if(e instanceof eC)return el(e._def.innerType);if(e instanceof X)return[void 0];else if(e instanceof J)return[null];else if(e instanceof e_)return[void 0,...el(e.unwrap())];else if(e instanceof ex)return[null,...el(e.unwrap())];else if(e instanceof ek)return el(e.unwrap());else if(e instanceof eF)return el(e.unwrap());else if(e instanceof eS)return el(e._def.innerType);else return[]};
4class ea extends E{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==i.object)return f(t,{code:l.invalid_type,expected:i.object,received:t.parsedType}),g;let n=this.discriminator,r=t.data[n],o=this.optionsMap.get(r);return o?t.common.async?o._parseAsync({data:t.data,path:t.path,parent:t}):o._parseSync({data:t.data,path:t.path,parent:t}):(f(t,{code:l.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),g)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,n){let r=new Map;for(let n of t){let t=el(n.shape[e]);if(!t.length)throw Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let i of t){if(r.has(i))throw Error(`Discriminator property ${String(e)} has duplicate value ${String(i)}`);r.set(i,n)}}return new ea({typeName:tc.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:r,...R(n)})}}class es extends E{_parse(e){let{status:t,ctx:n}=this._processInputParams(e),r=(e,r)=>{if(v(e)||v(r))return g;let a=function e(t,n){let r=o(t),l=o(n);if(t===n)return{valid:!0,data:t};if(r===i.object&&l===i.object){let r=tl.objectKeys(n),i=tl.objectKeys(t).filter(e=>-1!==r.indexOf(e)),o={...t,...n};for(let r of i){let i=e(t[r],n[r]);if(!i.valid)return{valid:!1};o[r]=i.data}return{valid:!0,data:o}}if(r===i.array&&l===i.array){if(t.length!==n.length)return{valid:!1};let r=[];for(let i=0;i<t.length;i++){let o=e(t[i],n[i]);if(!o.valid)return{valid:!1};r.push(o.data)}return{valid:!0,data:r}}return r===i.date&&l===i.date&&+t==+n?{valid:!0,data:t}:{valid:!1}}(e.value,r.value);return a.valid?((y(e)||y(r))&&t.dirty(),{status:t.value,value:a.data}):(f(n,{code:l.invalid_intersection_types}),g)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([e,t])=>r(e,t)):r(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}es.create=(e,t,n)=>new es({left:e,right:t,typeName:tc.ZodIntersection,...R(n)});class eu extends E{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==i.array)return f(n,{code:l.invalid_type,expected:i.array,received:n.parsedType}),g;if(n.data.length<this._def.items.length)return f(n,{code:l.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),g;!this._def.rest&&n.data.length>this._def.items.length&&(f(n,{code:l.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());let r=[...n.data].map((e,t)=>{let r=this._def.items[t]||this._def.rest;return r?r._parse(new C(n,e,n.path,t)):null}).filter(e=>!!e);return n.common.async?Promise.all(r).then(e=>p.mergeArray(t,e)):p.mergeArray(t,r)}get items(){return this._def.items}rest(e){return new eu({...this._def,rest:e})}}eu.create=(e,t)=>{if(!Array.isArray(e))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new eu({items:e,typeName:tc.ZodTuple,rest:null,...R(t)})};
4class ed extends E{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==i.object)return f(n,{code:l.invalid_type,expected:i.object,received:n.parsedType}),g;let r=[],o=this._def.keyType,a=this._def.valueType;for(let e in n.data)r.push({key:o._parse(new C(n,e,n.path,e)),value:a._parse(new C(n,n.data[e],n.path,e)),alwaysSet:e in n.data});return n.common.async?p.mergeObjectAsync(t,r):p.mergeObjectSync(t,r)}get element(){return this._def.valueType}static create(e,t,n){return new ed(t instanceof E?{keyType:e,valueType:t,typeName:tc.ZodRecord,...R(n)}:{keyType:U.create(),valueType:e,typeName:tc.ZodRecord,...R(t)})}}class ec extends E{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==i.map)return f(n,{code:l.invalid_type,expected:i.map,received:n.parsedType}),g;let r=this._def.keyType,o=this._def.valueType,a=[...n.data.entries()].map(([e,t],i)=>({key:r._parse(new C(n,e,n.path,[i,"key"])),value:o._parse(new C(n,t,n.path,[i,"value"]))}));if(n.common.async){let e=new Map;return Promise.resolve().then(async()=>{for(let n of a){let r=await n.key,i=await n.value;if("aborted"===r.status||"aborted"===i.status)return g;("dirty"===r.status||"dirty"===i.status)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}})}{let e=new Map;for(let n of a){let r=n.key,i=n.value;if("aborted"===r.status||"aborted"===i.status)return g;("dirty"===r.status||"dirty"===i.status)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}}}}ec.create=(e,t,n)=>new ec({valueType:t,keyType:e,typeName:tc.ZodMap,...R(n)});class ef extends E{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==i.set)return f(n,{code:l.invalid_type,expected:i.set,received:n.parsedType}),g;let r=this._def;null!==r.minSize&&n.data.size<r.minSize.value&&(f(n,{code:l.too_small,minimum:r.minSize.value,type:"set",inclusive:!0,exact:!1,message:r.minSize.message}),t.dirty()),null!==r.maxSize&&n.data.size>r.maxSize.value&&(f(n,{code:l.too_big,maximum:r.maxSize.value,type:"set",inclusive:!0,exact:!1,message:r.maxSize.message}),t.dirty());let o=this._def.valueType;function a(e){let n=new Set;for(let r of e){if("aborted"===r.status)return g;"dirty"===r.status&&t.dirty(),n.add(r.value)}return{status:t.value,value:n}}let s=[...n.data.values()].map((e,t)=>o._parse(new C(n,e,n.path,t)));return n.common.async?Promise.all(s).then(e=>a(e)):a(s)}min(e,t){return new ef({...this._def,minSize:{value:e,message:ts.toString(t)}})}max(e,t){return new ef({...this._def,maxSize:{value:e,message:ts.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}ef.create=(e,t)=>new ef({valueType:e,minSize:null,maxSize:null,typeName:tc.ZodSet,...R(t)});class ep extends E{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==i.function)return f(t,{code:l.invalid_type,expected:i.function,received:t.parsedType}),g;function n(e,n){return c({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,d(),s].filter(e=>!!e),issueData:{code:l.invalid_arguments,argumentsError:n}})}function r(e,n){return c({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,d(),s].filter(e=>!!e),issueData:{code:l.invalid_return_type,returnTypeError:n}})}let o={errorMap:t.common.contextualErrorMap},u=t.data;if(this._def.returns instanceof eb){let e=this;return h(async function(...t){let i=new a([]),l=await e._def.args.parseAsync(t,o).catch(e=>{throw i.addIssue(n(t,e)),i}),s=await Reflect.apply(u,this,l);return await e._def.returns._def.type.parseAsync(s,o).catch(e=>{throw i.addIssue(r(s,e)),i})})}{let e=this;return h(function(...t){let i=e._def.args.safeParse(t,o);if(!i.success)throw new a([n(t,i.error)]);let l=Reflect.apply(u,this,i.data),s=e._def.returns.safeParse(l,o);if(!s.success)throw new a([r(l,s.error)]);return s.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new ep({...this._def,args:eu.create(e).rest(ee.create())})}returns(e){return new ep({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,n){return new ep({args:e||eu.create([]).rest(ee.create()),returns:t||ee.create(),typeName:tc.ZodFunction,...R(n)})}}
4class eg extends E{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}eg.create=(e,t)=>new eg({getter:e,typeName:tc.ZodLazy,...R(t)});class em extends E{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return f(t,{received:t.data,code:l.invalid_literal,expected:this._def.value}),g}return{status:"valid",value:e.data}}get value(){return this._def.value}}function eh(e,t){return new ev({values:e,typeName:tc.ZodEnum,...R(t)})}em.create=(e,t)=>new em({value:e,typeName:tc.ZodLiteral,...R(t)});class ev extends E{constructor(){super(...arguments),tu.set(this,void 0)}_parse(e){if("string"!=typeof e.data){let t=this._getOrReturnCtx(e),n=this._def.values;return f(t,{expected:tl.joinValues(n),received:t.parsedType,code:l.invalid_type}),g}if(_(this,tu,"f")||x(this,tu,new Set(this._def.values),"f"),!_(this,tu,"f").has(e.data)){let t=this._getOrReturnCtx(e),n=this._def.values;return f(t,{received:t.data,code:l.invalid_enum_value,options:n}),g}return h(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return ev.create(e,{...this._def,...t})}exclude(e,t=this._def){return ev.create(this.options.filter(t=>!e.includes(t)),{...this._def,...t})}}tu=new WeakMap,ev.create=eh;class ey extends E{constructor(){super(...arguments),td.set(this,void 0)}_parse(e){let t=tl.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==i.string&&n.parsedType!==i.number){let e=tl.objectValues(t);return f(n,{expected:tl.joinValues(e),received:n.parsedType,code:l.invalid_type}),g}if(_(this,td,"f")||x(this,td,new Set(tl.getValidEnumValues(this._def.values)),"f"),!_(this,td,"f").has(e.data)){let e=tl.objectValues(t);return f(n,{received:n.data,code:l.invalid_enum_value,options:e}),g}return h(e.data)}get enum(){return this._def.values}}td=new WeakMap,ey.create=(e,t)=>new ey({values:e,typeName:tc.ZodNativeEnum,...R(t)});class eb extends E{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);return t.parsedType!==i.promise&&!1===t.common.async?(f(t,{code:l.invalid_type,expected:i.promise,received:t.parsedType}),g):h((t.parsedType===i.promise?t.data:Promise.resolve(t.data)).then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}}eb.create=(e,t)=>new eb({type:e,typeName:tc.ZodPromise,...R(t)});class ew extends E{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===tc.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:n}=this._processInputParams(e),r=this._def.effect||null,i={addIssue:e=>{f(n,e),e.fatal?t.abort():t.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),"preprocess"===r.type){let e=r.transform(n.data,i);if(n.common.async)return Promise.resolve(e).then(async e=>{if("aborted"===t.value)return g;let r=await this._def.schema._parseAsync({data:e,path:n.path,parent:n});return"aborted"===r.status?g:"dirty"===r.status||"dirty"===t.value?m(r.value):r});{if("aborted"===t.value)return g;let r=this._def.schema._parseSync({data:e,path:n.path,parent:n});return"aborted"===r.status?g:"dirty"===r.status||"dirty"===t.value?m(r.value):r}}if("refinement"===r.type){let e=e=>{let t=r.refinement(e,i);if(n.common.async)return Promise.resolve(t);if(t instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1!==n.common.async)return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(n=>"aborted"===n.status?g:("dirty"===n.status&&t.dirty(),e(n.value).then(()=>({status:t.value,value:n.value}))));{let r=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===r.status?g:("dirty"===r.status&&t.dirty(),e(r.value),{status:t.value,value:r.value})}}if("transform"===r.type){if(!1!==n.common.async)return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(e=>b(e)?Promise.resolve(r.transform(e.value,i)).then(e=>({status:t.value,value:e})):e);{let e=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!b(e))return e;let o=r.transform(e.value,i);if(o instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:o}}}tl.assertNever(r)}}
vendor: 1,633 bytes, line 4
4ew.create=(e,t,n)=>new ew({schema:e,typeName:tc.ZodEffects,effect:t,...R(n)}),ew.createWithPreprocess=(e,t,n)=>new ew({schema:t,effect:{type:"preprocess",transform:e},typeName:tc.ZodEffects,...R(n)});class e_ extends E{_parse(e){return this._getType(e)===i.undefined?h(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}e_.create=(e,t)=>new e_({innerType:e,typeName:tc.ZodOptional,...R(t)});class ex extends E{_parse(e){return this._getType(e)===i.null?h(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}ex.create=(e,t)=>new ex({innerType:e,typeName:tc.ZodNullable,...R(t)});class eC extends E{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return t.parsedType===i.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}eC.create=(e,t)=>new eC({innerType:e,typeName:tc.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...R(t)});class eS extends E{_parse(e){let{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},r=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return w(r)?r.then(e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new a(n.common.issues)},input:n.data})})):{status:"valid",value:"valid"===r.status?r.value:this._def.catchValue({get error(){return new a(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}eS.create=(e,t)=>new eS({innerType:e,typeName:tc.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...R(t)});
4class eR extends E{_parse(e){if(this._getType(e)!==i.nan){let t=this._getOrReturnCtx(e);return f(t,{code:l.invalid_type,expected:i.nan,received:t.parsedType}),g}return{status:"valid",value:e.data}}}eR.create=e=>new eR({typeName:tc.ZodNaN,...R(e)});let eE=Symbol("zod_brand");class ek extends E{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}}class eA extends E{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let e=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?g:"dirty"===e.status?(t.dirty(),m(e.value)):this._def.out._parseAsync({data:e.value,path:n.path,parent:n})})();{let e=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?g:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:n.path,parent:n})}}static create(e,t){return new eA({in:e,out:t,typeName:tc.ZodPipeline})}}class eF extends E{_parse(e){let t=this._def.innerType._parse(e),n=e=>(b(e)&&(e.value=Object.freeze(e.value)),e);return w(t)?t.then(e=>n(e)):n(t)}unwrap(){return this._def.innerType}}function eM(e,t={},n){return e?Q.create().superRefine((r,i)=>{var o,l;if(!e(r)){let e="function"==typeof t?t(r):"string"==typeof t?{message:t}:t,a=null===(l=null!==(o=e.fatal)&&void 0!==o?o:n)||void 0===l||l;i.addIssue({code:"custom",..."string"==typeof e?{message:e}:e,fatal:a})}}):Q.create()}eF.create=(e,t)=>new eF({innerType:e,typeName:tc.ZodReadonly,...R(t)});let eP={object:ei.lazycreate};(to=tc||(tc={})).ZodString="ZodString",to.ZodNumber="ZodNumber",to.ZodNaN="ZodNaN",to.ZodBigInt="ZodBigInt",to.ZodBoolean="ZodBoolean",to.ZodDate="ZodDate",to.ZodSymbol="ZodSymbol",to.ZodUndefined="ZodUndefined",to.ZodNull="ZodNull",to.ZodAny="ZodAny",to.ZodUnknown="ZodUnknown",to.ZodNever="ZodNever",to.ZodVoid="ZodVoid",to.ZodArray="ZodArray",to.ZodObject="ZodObject",to.ZodUnion="ZodUnion",to.ZodDiscriminatedUnion="ZodDiscriminatedUnion",to.ZodIntersection="ZodIntersection",to.ZodTuple="ZodTuple",to.ZodRecord="ZodRecord",to.ZodMap="ZodMap",to.ZodSet="ZodSet",to.ZodFunction="ZodFunction",to.ZodLazy="ZodLazy",to.ZodLiteral="ZodLiteral",to.ZodEnum="ZodEnum",to.ZodEffects="ZodEffects",to.ZodNativeEnum="ZodNativeEnum",to.ZodOptional="ZodOptional",to.ZodNullable="ZodNullable",to.ZodDefault="ZodDefault",to.ZodCatch="ZodCatch",to.ZodPromise="ZodPromise",to.ZodBranded="ZodBranded",to.ZodPipeline="ZodPipeline",to.ZodReadonly="ZodReadonly";let eO=U.create,eV=$.create,eT=eR.create,eI=G.create,eD=q.create,eN=K.create,ej=Y.create,eL=X.create,eZ=J.create,ez=Q.create,eW=ee.create,eH=et.create,eB=en.create,eU=er.create,e$=ei.create,eG=ei.strictCreate,eq=eo.create,eK=ea.create,eY=es.create,eX=eu.create,eJ=ed.create,eQ=ec.create,e0=ef.create,e1=ep.create,e2=eg.create,e9=em.create,e5=ev.create,e3=ey.create,e4=eb.create,e6=ew.create,e7=e_.create,e8=ex.create,te=ew.createWithPreprocess,tt=eA.create,tn={string:e=>U.create({...e,coerce:!0}),number:e=>$.create({...e,coerce:!0}),boolean:e=>q.create({...e,coerce:!0}),bigint:e=>G.create({...e,coerce:!0}),date:e=>K.create({...e,coerce:!0})};var tr,ti,to,tl,ta,ts,tu,td,tc,tf=Object.freeze({__proto__:null,defaultErrorMap:s,setErrorMap:function(e){u=e},getErrorMap:d,makeIssue:c,EMPTY_PATH:[],addIssueToContext:f,ParseStatus:p,INVALID:g,DIRTY:m,OK:h,isAborted:v,isDirty:y,isValid:b,isAsync:w,get util(){return tl},get objectUtil(){return ta},ZodParsedType:i,getParsedType:o,ZodType:E,datetimeRegex:B,ZodString:U,ZodNumber:$,ZodBigInt:G,ZodBoolean:q,ZodDate:K,ZodSymbol:Y,ZodUndefined:X,ZodNull:J,ZodAny:Q,ZodUnknown:ee,ZodNever:et,ZodVoid:en,ZodArray:er,ZodObject:ei,ZodUnion:eo,ZodDiscriminatedUnion:ea,ZodIntersection:es,ZodTuple:eu,ZodRecord:ed,ZodMap:ec,ZodSet:ef,ZodFunction:ep,ZodLazy:eg,ZodLiteral:em,ZodEnum:ev,ZodNativeEnum:ey,ZodPromise:eb,ZodEffects:ew,ZodTransformer:ew,ZodOptional:e_,ZodNullable:ex,ZodDefault:eC,ZodCatch:eS,ZodNaN:eR,BRAND:eE,ZodBranded:ek,ZodPipeline:eA,ZodReadonly:eF,custom:eM,Schema:E,ZodSchema:E,late:eP,get ZodFirstPartyTypeKind(){return tc},coerce:tn,any:ez,array:eU,bigint:eI,boolean:eD,date:eN,discriminatedUnion:eK,effect:e6,enum:e5,function:e1,instanceof:(e,t={message:`Input not instance of ${e.name}`})=>eM(t=>t instanceof e,t),intersection:eY,lazy:e2,literal:e9,map:eQ,nan:eT,nativeEnum:e3,never:eH,null:eZ,nullable:e8,number:eV,object:e$,oboolean:()=>eD().optional(),onumber:()=>eV().optional(),optional:e7,ostring:()=>eO().optional(),pipeline:tt,preprocess:te,promise:e4,record:eJ,set:e0,str
4ictObject:eG,string:eO,symbol:ej,transformer:e6,tuple:eX,undefined:eL,union:eq,unknown:eW,void:eB,NEVER:g,ZodIssueCode:l,quotelessJson:e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),ZodError:a})}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.