harperdb 4.7.18 → 4.7.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/README.md +1 -1
  2. package/bin/harperdb.js +57 -57
  3. package/bin/lite.js +54 -54
  4. package/components/EntryHandler.d.ts +2 -1
  5. package/components/Logger.d.ts +12 -0
  6. package/components/OptionsWatcher.d.ts +2 -1
  7. package/components/Scope.d.ts +16 -5
  8. package/index.d.ts +20 -9
  9. package/index.js +3 -0
  10. package/launchServiceScripts/launchNatsIngestService.js +54 -54
  11. package/launchServiceScripts/launchNatsReplyService.js +54 -54
  12. package/launchServiceScripts/launchUpdateNodes4-0-0.js +54 -54
  13. package/npm-shrinkwrap.json +346 -335
  14. package/package.json +1 -1
  15. package/resources/Table.d.ts +10 -4
  16. package/resources/databases.d.ts +12 -2
  17. package/server/jobs/jobProcess.js +54 -54
  18. package/server/threads/threadServer.js +54 -54
  19. package/studio/web/assets/{index-reMfz-PE.js → index-D-fcKyYx.js} +1 -1
  20. package/studio/web/assets/{index-C7BE1t1i.js → index-JYy8fJSs.js} +1 -1
  21. package/studio/web/assets/index-Zl65hD8K.css +1 -0
  22. package/studio/web/assets/index-oKJ2dNTo.js +234 -0
  23. package/studio/web/assets/{index.lazy-DG7DUk1C.js → index.lazy-C7Y8KaC7.js} +1 -1
  24. package/studio/web/assets/profiler-CxDJoqcP.js +1 -0
  25. package/studio/web/assets/{react-redux-4JeOy3fU.js → react-redux-LHAYowSO.js} +1 -1
  26. package/studio/web/assets/startRecording-CTUOSIln.js +2 -0
  27. package/studio/web/index.html +2 -2
  28. package/utility/scripts/restartHdb.js +54 -54
  29. package/v1.d.ts +8 -16
  30. package/v1.js +3 -0
  31. package/v2.d.ts +8 -16
  32. package/v2.js +41 -0
  33. package/studio/web/assets/index-BZ1HpJ7A.css +0 -1
  34. package/studio/web/assets/index-Bu-PphJh.js +0 -234
  35. package/studio/web/assets/profiler-B4vE9rPH.js +0 -1
  36. package/studio/web/assets/startRecording-B3i2VhSx.js +0 -2
@@ -0,0 +1,234 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index.lazy-C7Y8KaC7.js","assets/react-redux-LHAYowSO.js","assets/index-CVjGhoEG.css","assets/index-JYy8fJSs.js"])))=>i.map(i=>d[i]);
2
+ function FY(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var SPe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function hf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var p_={exports:{}},Dp={};var aD;function UY(){if(aD)return Dp;aD=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,i,o){var a=null;if(o!==void 0&&(a=""+o),i.key!==void 0&&(a=""+i.key),"key"in i){o={};for(var l in i)l!=="key"&&(o[l]=i[l])}else o=i;return i=o.ref,{$$typeof:e,type:r,key:a,ref:i!==void 0?i:null,props:o}}return Dp.Fragment=t,Dp.jsx=n,Dp.jsxs=n,Dp}var sD;function VY(){return sD||(sD=1,p_.exports=UY()),p_.exports}var c=VY();const ml=!0,BY="/",Vd=9925,nC="HDB_ADMIN",Ea="/",Gk="../",HY=1024*1024*1024,qY=100*1024*1024;function gz(e,t){return function(){return e.apply(t,arguments)}}const{toString:KY}=Object.prototype,{getPrototypeOf:Zk}=Object,{iterator:Ob,toStringTag:vz}=Symbol,Db=(e=>t=>{const n=KY.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),oa=e=>(e=e.toLowerCase(),t=>Db(t)===e),$b=e=>t=>typeof t===e,{isArray:gf}=Array,Bd=$b("undefined");function Xm(e){return e!==null&&!Bd(e)&&e.constructor!==null&&!Bd(e.constructor)&&Ci(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const yz=oa("ArrayBuffer");function GY(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&yz(e.buffer),t}const ZY=$b("string"),Ci=$b("function"),bz=$b("number"),Jm=e=>e!==null&&typeof e=="object",YY=e=>e===!0||e===!1,cy=e=>{if(Db(e)!=="object")return!1;const t=Zk(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(vz in e)&&!(Ob in e)},WY=e=>{if(!Jm(e)||Xm(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},XY=oa("Date"),JY=oa("File"),QY=oa("Blob"),eW=oa("FileList"),tW=e=>Jm(e)&&Ci(e.pipe),nW=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Ci(e.append)&&((t=Db(e))==="formdata"||t==="object"&&Ci(e.toString)&&e.toString()==="[object FormData]"))},rW=oa("URLSearchParams"),[iW,oW,aW,sW]=["ReadableStream","Request","Response","Headers"].map(oa),lW=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Qm(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),gf(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{if(Xm(e))return;const o=n?Object.getOwnPropertyNames(e):Object.keys(e),a=o.length;let l;for(r=0;r<a;r++)l=o[r],t.call(null,e[l],l,e)}}function xz(e,t){if(Xm(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const xc=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,wz=e=>!Bd(e)&&e!==xc;function rC(){const{caseless:e,skipUndefined:t}=wz(this)&&this||{},n={},r=(i,o)=>{if(o==="__proto__"||o==="constructor"||o==="prototype")return;const a=e&&xz(n,o)||o;cy(n[a])&&cy(i)?n[a]=rC(n[a],i):cy(i)?n[a]=rC({},i):gf(i)?n[a]=i.slice():(!t||!Bd(i))&&(n[a]=i)};for(let i=0,o=arguments.length;i<o;i++)arguments[i]&&Qm(arguments[i],r);return n}const cW=(e,t,n,{allOwnKeys:r}={})=>(Qm(t,(i,o)=>{n&&Ci(i)?Object.defineProperty(e,o,{value:gz(i,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,o,{value:i,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),uW=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),dW=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},fW=(e,t,n,r)=>{let i,o,a;const l={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)a=i[o],(!r||r(a,e,t))&&!l[a]&&(t[a]=e[a],l[a]=!0);e=n!==!1&&Zk(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},pW=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},mW=e=>{if(!e)return null;if(gf(e))return e;let t=e.length;if(!bz(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},hW=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Zk(Uint8Array)),gW=(e,t)=>{const r=(e&&e[Ob]).call(e);let i;for(;(i=r.next())&&!i.done;){const o=i.value;t.call(e,o[0],o[1])}},vW=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},yW=oa("HTMLFormElement"),bW=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),lD=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),xW=oa("RegExp"),Sz=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Qm(n,(i,o)=>{let a;(a=t(i,o,e))!==!1&&(r[o]=a||i)}),Object.defineProperties(e,r)},wW=e=>{Sz(e,(t,n)=>{if(Ci(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Ci(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},SW=(e,t)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return gf(e)?r(e):r(String(e).split(t)),n},_W=()=>{},CW=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function kW(e){return!!(e&&Ci(e.append)&&e[vz]==="FormData"&&e[Ob])}const EW=e=>{const t=new Array(10),n=(r,i)=>{if(Jm(r)){if(t.indexOf(r)>=0)return;if(Xm(r))return r;if(!("toJSON"in r)){t[i]=r;const o=gf(r)?[]:{};return Qm(r,(a,l)=>{const d=n(a,i+1);!Bd(d)&&(o[l]=d)}),t[i]=void 0,o}}return r};return n(e,0)},jW=oa("AsyncFunction"),RW=e=>e&&(Jm(e)||Ci(e))&&Ci(e.then)&&Ci(e.catch),_z=((e,t)=>e?setImmediate:t?((n,r)=>(xc.addEventListener("message",({source:i,data:o})=>{i===xc&&o===n&&r.length&&r.shift()()},!1),i=>{r.push(i),xc.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Ci(xc.postMessage)),IW=typeof queueMicrotask<"u"?queueMicrotask.bind(xc):typeof process<"u"&&process.nextTick||_z,TW=e=>e!=null&&Ci(e[Ob]),pe={isArray:gf,isArrayBuffer:yz,isBuffer:Xm,isFormData:nW,isArrayBufferView:GY,isString:ZY,isNumber:bz,isBoolean:YY,isObject:Jm,isPlainObject:cy,isEmptyObject:WY,isReadableStream:iW,isRequest:oW,isResponse:aW,isHeaders:sW,isUndefined:Bd,isDate:XY,isFile:JY,isBlob:QY,isRegExp:xW,isFunction:Ci,isStream:tW,isURLSearchParams:rW,isTypedArray:hW,isFileList:eW,forEach:Qm,merge:rC,extend:cW,trim:lW,stripBOM:uW,inherits:dW,toFlatObject:fW,kindOf:Db,kindOfTest:oa,endsWith:pW,toArray:mW,forEachEntry:gW,matchAll:vW,isHTMLForm:yW,hasOwnProperty:lD,hasOwnProp:lD,reduceDescriptors:Sz,freezeMethods:wW,toObjectSet:SW,toCamelCase:bW,noop:_W,toFiniteNumber:CW,findKey:xz,global:xc,isContextDefined:wz,isSpecCompliantForm:kW,toJSONObject:EW,isAsyncFn:jW,isThenable:RW,setImmediate:_z,asap:IW,isIterable:TW};let lt=class Cz extends Error{static from(t,n,r,i,o,a){const l=new Cz(t.message,n||t.code,r,i,o);return l.cause=t,l.name=t.name,a&&Object.assign(l,a),l}constructor(t,n,r,i,o){super(t),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),i&&(this.request=i),o&&(this.response=o,this.status=o.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:pe.toJSONObject(this.config),code:this.code,status:this.status}}};lt.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";lt.ERR_BAD_OPTION="ERR_BAD_OPTION";lt.ECONNABORTED="ECONNABORTED";lt.ETIMEDOUT="ETIMEDOUT";lt.ERR_NETWORK="ERR_NETWORK";lt.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";lt.ERR_DEPRECATED="ERR_DEPRECATED";lt.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";lt.ERR_BAD_REQUEST="ERR_BAD_REQUEST";lt.ERR_CANCELED="ERR_CANCELED";lt.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";lt.ERR_INVALID_URL="ERR_INVALID_URL";const NW=null;function iC(e){return pe.isPlainObject(e)||pe.isArray(e)}function kz(e){return pe.endsWith(e,"[]")?e.slice(0,-2):e}function cD(e,t,n){return e?e.concat(t).map(function(i,o){return i=kz(i),!n&&o?"["+i+"]":i}).join(n?".":""):t}function AW(e){return pe.isArray(e)&&!e.some(iC)}const OW=pe.toFlatObject(pe,{},null,function(t){return/^is[A-Z]/.test(t)});function Pb(e,t,n){if(!pe.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=pe.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(S,C){return!pe.isUndefined(C[S])});const r=n.metaTokens,i=n.visitor||m,o=n.dots,a=n.indexes,d=(n.Blob||typeof Blob<"u"&&Blob)&&pe.isSpecCompliantForm(t);if(!pe.isFunction(i))throw new TypeError("visitor must be a function");function f(x){if(x===null)return"";if(pe.isDate(x))return x.toISOString();if(pe.isBoolean(x))return x.toString();if(!d&&pe.isBlob(x))throw new lt("Blob is not supported. Use a Buffer instead.");return pe.isArrayBuffer(x)||pe.isTypedArray(x)?d&&typeof Blob=="function"?new Blob([x]):Buffer.from(x):x}function m(x,S,C){let k=x;if(x&&!C&&typeof x=="object"){if(pe.endsWith(S,"{}"))S=r?S:S.slice(0,-2),x=JSON.stringify(x);else if(pe.isArray(x)&&AW(x)||(pe.isFileList(x)||pe.endsWith(S,"[]"))&&(k=pe.toArray(x)))return S=kz(S),k.forEach(function(j,I){!(pe.isUndefined(j)||j===null)&&t.append(a===!0?cD([S],I,o):a===null?S:S+"[]",f(j))}),!1}return iC(x)?!0:(t.append(cD(C,S,o),f(x)),!1)}const h=[],v=Object.assign(OW,{defaultVisitor:m,convertValue:f,isVisitable:iC});function y(x,S){if(!pe.isUndefined(x)){if(h.indexOf(x)!==-1)throw Error("Circular reference detected in "+S.join("."));h.push(x),pe.forEach(x,function(k,E){(!(pe.isUndefined(k)||k===null)&&i.call(t,k,pe.isString(E)?E.trim():E,S,v))===!0&&y(k,S?S.concat(E):[E])}),h.pop()}}if(!pe.isObject(e))throw new TypeError("data must be an object");return y(e),t}function uD(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Yk(e,t){this._pairs=[],e&&Pb(e,this,t)}const Ez=Yk.prototype;Ez.append=function(t,n){this._pairs.push([t,n])};Ez.toString=function(t){const n=t?function(r){return t.call(this,r,uD)}:uD;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function DW(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function jz(e,t,n){if(!t)return e;const r=n&&n.encode||DW,i=pe.isFunction(n)?{serialize:n}:n,o=i&&i.serialize;let a;if(o?a=o(t,i):a=pe.isURLSearchParams(t)?t.toString():new Yk(t,i).toString(r),a){const l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class dD{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){pe.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Wk={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},$W=typeof URLSearchParams<"u"?URLSearchParams:Yk,PW=typeof FormData<"u"?FormData:null,MW=typeof Blob<"u"?Blob:null,zW={isBrowser:!0,classes:{URLSearchParams:$W,FormData:PW,Blob:MW},protocols:["http","https","file","blob","url","data"]},Xk=typeof window<"u"&&typeof document<"u",oC=typeof navigator=="object"&&navigator||void 0,LW=Xk&&(!oC||["ReactNative","NativeScript","NS"].indexOf(oC.product)<0),FW=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",UW=Xk&&window.location.href||"http://localhost",VW=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Xk,hasStandardBrowserEnv:LW,hasStandardBrowserWebWorkerEnv:FW,navigator:oC,origin:UW},Symbol.toStringTag,{value:"Module"})),Pr={...VW,...zW};function BW(e,t){return Pb(e,new Pr.classes.URLSearchParams,{visitor:function(n,r,i,o){return Pr.isNode&&pe.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}function HW(e){return pe.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function qW(e){const t={},n=Object.keys(e);let r;const i=n.length;let o;for(r=0;r<i;r++)o=n[r],t[o]=e[o];return t}function Rz(e){function t(n,r,i,o){let a=n[o++];if(a==="__proto__")return!0;const l=Number.isFinite(+a),d=o>=n.length;return a=!a&&pe.isArray(i)?i.length:a,d?(pe.hasOwnProp(i,a)?i[a]=[i[a],r]:i[a]=r,!l):((!i[a]||!pe.isObject(i[a]))&&(i[a]=[]),t(n,r,i[a],o)&&pe.isArray(i[a])&&(i[a]=qW(i[a])),!l)}if(pe.isFormData(e)&&pe.isFunction(e.entries)){const n={};return pe.forEachEntry(e,(r,i)=>{t(HW(r),i,n,0)}),n}return null}function KW(e,t,n){if(pe.isString(e))try{return(t||JSON.parse)(e),pe.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const eh={transitional:Wk,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=pe.isObject(t);if(o&&pe.isHTMLForm(t)&&(t=new FormData(t)),pe.isFormData(t))return i?JSON.stringify(Rz(t)):t;if(pe.isArrayBuffer(t)||pe.isBuffer(t)||pe.isStream(t)||pe.isFile(t)||pe.isBlob(t)||pe.isReadableStream(t))return t;if(pe.isArrayBufferView(t))return t.buffer;if(pe.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return BW(t,this.formSerializer).toString();if((l=pe.isFileList(t))||r.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return Pb(l?{"files[]":t}:t,d&&new d,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),KW(t)):t}],transformResponse:[function(t){const n=this.transitional||eh.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(pe.isResponse(t)||pe.isReadableStream(t))return t;if(t&&pe.isString(t)&&(r&&!this.responseType||i)){const a=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t,this.parseReviver)}catch(l){if(a)throw l.name==="SyntaxError"?lt.from(l,lt.ERR_BAD_RESPONSE,this,null,this.response):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Pr.classes.FormData,Blob:Pr.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};pe.forEach(["delete","get","head","post","put","patch"],e=>{eh.headers[e]={}});const GW=pe.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),ZW=e=>{const t={};let n,r,i;return e&&e.split(`
3
+ `).forEach(function(a){i=a.indexOf(":"),n=a.substring(0,i).trim().toLowerCase(),r=a.substring(i+1).trim(),!(!n||t[n]&&GW[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},fD=Symbol("internals");function $p(e){return e&&String(e).trim().toLowerCase()}function uy(e){return e===!1||e==null?e:pe.isArray(e)?e.map(uy):String(e)}function YW(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const WW=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function m_(e,t,n,r,i){if(pe.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!pe.isString(t)){if(pe.isString(r))return t.indexOf(r)!==-1;if(pe.isRegExp(r))return r.test(t)}}function XW(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function JW(e,t){const n=pe.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,o,a){return this[r].call(this,t,i,o,a)},configurable:!0})})}let ki=class{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function o(l,d,f){const m=$p(d);if(!m)throw new Error("header name must be a non-empty string");const h=pe.findKey(i,m);(!h||i[h]===void 0||f===!0||f===void 0&&i[h]!==!1)&&(i[h||d]=uy(l))}const a=(l,d)=>pe.forEach(l,(f,m)=>o(f,m,d));if(pe.isPlainObject(t)||t instanceof this.constructor)a(t,n);else if(pe.isString(t)&&(t=t.trim())&&!WW(t))a(ZW(t),n);else if(pe.isObject(t)&&pe.isIterable(t)){let l={},d,f;for(const m of t){if(!pe.isArray(m))throw TypeError("Object iterator must return a key-value pair");l[f=m[0]]=(d=l[f])?pe.isArray(d)?[...d,m[1]]:[d,m[1]]:m[1]}a(l,n)}else t!=null&&o(n,t,r);return this}get(t,n){if(t=$p(t),t){const r=pe.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return YW(i);if(pe.isFunction(n))return n.call(this,i,r);if(pe.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=$p(t),t){const r=pe.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||m_(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function o(a){if(a=$p(a),a){const l=pe.findKey(r,a);l&&(!n||m_(r,r[l],l,n))&&(delete r[l],i=!0)}}return pe.isArray(t)?t.forEach(o):o(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const o=n[r];(!t||m_(this,this[o],o,t,!0))&&(delete this[o],i=!0)}return i}normalize(t){const n=this,r={};return pe.forEach(this,(i,o)=>{const a=pe.findKey(r,o);if(a){n[a]=uy(i),delete n[o];return}const l=t?XW(o):String(o).trim();l!==o&&delete n[o],n[l]=uy(i),r[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return pe.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&pe.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
4
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[fD]=this[fD]={accessors:{}}).accessors,i=this.prototype;function o(a){const l=$p(a);r[l]||(JW(i,a),r[l]=!0)}return pe.isArray(t)?t.forEach(o):o(t),this}};ki.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);pe.reduceDescriptors(ki.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});pe.freezeMethods(ki);function h_(e,t){const n=this||eh,r=t||n,i=ki.from(r.headers);let o=r.data;return pe.forEach(e,function(l){o=l.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function Iz(e){return!!(e&&e.__CANCEL__)}let th=class extends lt{constructor(t,n,r){super(t??"canceled",lt.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function Tz(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new lt("Request failed with status code "+n.status,[lt.ERR_BAD_REQUEST,lt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function QW(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function eX(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,o=0,a;return t=t!==void 0?t:1e3,function(d){const f=Date.now(),m=r[o];a||(a=f),n[i]=d,r[i]=f;let h=o,v=0;for(;h!==i;)v+=n[h++],h=h%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),f-a<t)return;const y=m&&f-m;return y?Math.round(v*1e3/y):void 0}}function tX(e,t){let n=0,r=1e3/t,i,o;const a=(f,m=Date.now())=>{n=m,i=null,o&&(clearTimeout(o),o=null),e(...f)};return[(...f)=>{const m=Date.now(),h=m-n;h>=r?a(f,m):(i=f,o||(o=setTimeout(()=>{o=null,a(i)},r-h)))},()=>i&&a(i)]}const Iy=(e,t,n=3)=>{let r=0;const i=eX(50,250);return tX(o=>{const a=o.loaded,l=o.lengthComputable?o.total:void 0,d=a-r,f=i(d),m=a<=l;r=a;const h={loaded:a,total:l,progress:l?a/l:void 0,bytes:d,rate:f||void 0,estimated:f&&l&&m?(l-a)/f:void 0,event:o,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(h)},n)},pD=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},mD=e=>(...t)=>pe.asap(()=>e(...t)),nX=Pr.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Pr.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Pr.origin),Pr.navigator&&/(msie|trident)/i.test(Pr.navigator.userAgent)):()=>!0,rX=Pr.hasStandardBrowserEnv?{write(e,t,n,r,i,o,a){if(typeof document>"u")return;const l=[`${e}=${encodeURIComponent(t)}`];pe.isNumber(n)&&l.push(`expires=${new Date(n).toUTCString()}`),pe.isString(r)&&l.push(`path=${r}`),pe.isString(i)&&l.push(`domain=${i}`),o===!0&&l.push("secure"),pe.isString(a)&&l.push(`SameSite=${a}`),document.cookie=l.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function iX(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function oX(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Nz(e,t,n){let r=!iX(t);return e&&(r||n==!1)?oX(e,t):t}const hD=e=>e instanceof ki?{...e}:e;function $c(e,t){t=t||{};const n={};function r(f,m,h,v){return pe.isPlainObject(f)&&pe.isPlainObject(m)?pe.merge.call({caseless:v},f,m):pe.isPlainObject(m)?pe.merge({},m):pe.isArray(m)?m.slice():m}function i(f,m,h,v){if(pe.isUndefined(m)){if(!pe.isUndefined(f))return r(void 0,f,h,v)}else return r(f,m,h,v)}function o(f,m){if(!pe.isUndefined(m))return r(void 0,m)}function a(f,m){if(pe.isUndefined(m)){if(!pe.isUndefined(f))return r(void 0,f)}else return r(void 0,m)}function l(f,m,h){if(h in t)return r(f,m);if(h in e)return r(void 0,f)}const d={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:l,headers:(f,m,h)=>i(hD(f),hD(m),h,!0)};return pe.forEach(Object.keys({...e,...t}),function(m){if(m==="__proto__"||m==="constructor"||m==="prototype")return;const h=pe.hasOwnProp(d,m)?d[m]:i,v=h(e[m],t[m],m);pe.isUndefined(v)&&h!==l||(n[m]=v)}),n}const Az=e=>{const t=$c({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:o,headers:a,auth:l}=t;if(t.headers=a=ki.from(a),t.url=jz(Nz(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),l&&a.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):""))),pe.isFormData(n)){if(Pr.hasStandardBrowserEnv||Pr.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(pe.isFunction(n.getHeaders)){const d=n.getHeaders(),f=["content-type","content-length"];Object.entries(d).forEach(([m,h])=>{f.includes(m.toLowerCase())&&a.set(m,h)})}}if(Pr.hasStandardBrowserEnv&&(r&&pe.isFunction(r)&&(r=r(t)),r||r!==!1&&nX(t.url))){const d=i&&o&&rX.read(o);d&&a.set(i,d)}return t},aX=typeof XMLHttpRequest<"u",sX=aX&&function(e){return new Promise(function(n,r){const i=Az(e);let o=i.data;const a=ki.from(i.headers).normalize();let{responseType:l,onUploadProgress:d,onDownloadProgress:f}=i,m,h,v,y,x;function S(){y&&y(),x&&x(),i.cancelToken&&i.cancelToken.unsubscribe(m),i.signal&&i.signal.removeEventListener("abort",m)}let C=new XMLHttpRequest;C.open(i.method.toUpperCase(),i.url,!0),C.timeout=i.timeout;function k(){if(!C)return;const j=ki.from("getAllResponseHeaders"in C&&C.getAllResponseHeaders()),A={data:!l||l==="text"||l==="json"?C.responseText:C.response,status:C.status,statusText:C.statusText,headers:j,config:e,request:C};Tz(function(N){n(N),S()},function(N){r(N),S()},A),C=null}"onloadend"in C?C.onloadend=k:C.onreadystatechange=function(){!C||C.readyState!==4||C.status===0&&!(C.responseURL&&C.responseURL.indexOf("file:")===0)||setTimeout(k)},C.onabort=function(){C&&(r(new lt("Request aborted",lt.ECONNABORTED,e,C)),C=null)},C.onerror=function(I){const A=I&&I.message?I.message:"Network Error",T=new lt(A,lt.ERR_NETWORK,e,C);T.event=I||null,r(T),C=null},C.ontimeout=function(){let I=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const A=i.transitional||Wk;i.timeoutErrorMessage&&(I=i.timeoutErrorMessage),r(new lt(I,A.clarifyTimeoutError?lt.ETIMEDOUT:lt.ECONNABORTED,e,C)),C=null},o===void 0&&a.setContentType(null),"setRequestHeader"in C&&pe.forEach(a.toJSON(),function(I,A){C.setRequestHeader(A,I)}),pe.isUndefined(i.withCredentials)||(C.withCredentials=!!i.withCredentials),l&&l!=="json"&&(C.responseType=i.responseType),f&&([v,x]=Iy(f,!0),C.addEventListener("progress",v)),d&&C.upload&&([h,y]=Iy(d),C.upload.addEventListener("progress",h),C.upload.addEventListener("loadend",y)),(i.cancelToken||i.signal)&&(m=j=>{C&&(r(!j||j.type?new th(null,e,C):j),C.abort(),C=null)},i.cancelToken&&i.cancelToken.subscribe(m),i.signal&&(i.signal.aborted?m():i.signal.addEventListener("abort",m)));const E=QW(i.url);if(E&&Pr.protocols.indexOf(E)===-1){r(new lt("Unsupported protocol "+E+":",lt.ERR_BAD_REQUEST,e));return}C.send(o||null)})},lX=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,i;const o=function(f){if(!i){i=!0,l();const m=f instanceof Error?f:this.reason;r.abort(m instanceof lt?m:new th(m instanceof Error?m.message:m))}};let a=t&&setTimeout(()=>{a=null,o(new lt(`timeout of ${t}ms exceeded`,lt.ETIMEDOUT))},t);const l=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(f=>{f.unsubscribe?f.unsubscribe(o):f.removeEventListener("abort",o)}),e=null)};e.forEach(f=>f.addEventListener("abort",o));const{signal:d}=r;return d.unsubscribe=()=>pe.asap(l),d}},cX=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},uX=async function*(e,t){for await(const n of dX(e))yield*cX(n,t)},dX=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},gD=(e,t,n,r)=>{const i=uX(e,t);let o=0,a,l=d=>{a||(a=!0,r&&r(d))};return new ReadableStream({async pull(d){try{const{done:f,value:m}=await i.next();if(f){l(),d.close();return}let h=m.byteLength;if(n){let v=o+=h;n(v)}d.enqueue(new Uint8Array(m))}catch(f){throw l(f),f}},cancel(d){return l(d),i.return()}},{highWaterMark:2})},vD=64*1024,{isFunction:xv}=pe,fX=(({Request:e,Response:t})=>({Request:e,Response:t}))(pe.global),{ReadableStream:yD,TextEncoder:bD}=pe.global,xD=(e,...t)=>{try{return!!e(...t)}catch{return!1}},pX=e=>{e=pe.merge.call({skipUndefined:!0},fX,e);const{fetch:t,Request:n,Response:r}=e,i=t?xv(t):typeof fetch=="function",o=xv(n),a=xv(r);if(!i)return!1;const l=i&&xv(yD),d=i&&(typeof bD=="function"?(x=>S=>x.encode(S))(new bD):async x=>new Uint8Array(await new n(x).arrayBuffer())),f=o&&l&&xD(()=>{let x=!1;const S=new n(Pr.origin,{body:new yD,method:"POST",get duplex(){return x=!0,"half"}}).headers.has("Content-Type");return x&&!S}),m=a&&l&&xD(()=>pe.isReadableStream(new r("").body)),h={stream:m&&(x=>x.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(x=>{!h[x]&&(h[x]=(S,C)=>{let k=S&&S[x];if(k)return k.call(S);throw new lt(`Response type '${x}' is not supported`,lt.ERR_NOT_SUPPORT,C)})});const v=async x=>{if(x==null)return 0;if(pe.isBlob(x))return x.size;if(pe.isSpecCompliantForm(x))return(await new n(Pr.origin,{method:"POST",body:x}).arrayBuffer()).byteLength;if(pe.isArrayBufferView(x)||pe.isArrayBuffer(x))return x.byteLength;if(pe.isURLSearchParams(x)&&(x=x+""),pe.isString(x))return(await d(x)).byteLength},y=async(x,S)=>{const C=pe.toFiniteNumber(x.getContentLength());return C??v(S)};return async x=>{let{url:S,method:C,data:k,signal:E,cancelToken:j,timeout:I,onDownloadProgress:A,onUploadProgress:T,responseType:N,headers:D,withCredentials:L="same-origin",fetchOptions:H}=Az(x),ee=t||fetch;N=N?(N+"").toLowerCase():"text";let G=lX([E,j&&j.toAbortSignal()],I),K=null;const B=G&&G.unsubscribe&&(()=>{G.unsubscribe()});let q;try{if(T&&f&&C!=="get"&&C!=="head"&&(q=await y(D,k))!==0){let P=new n(S,{method:"POST",body:k,duplex:"half"}),V;if(pe.isFormData(k)&&(V=P.headers.get("content-type"))&&D.setContentType(V),P.body){const[O,X]=pD(q,Iy(mD(T)));k=gD(P.body,vD,O,X)}}pe.isString(L)||(L=L?"include":"omit");const z=o&&"credentials"in n.prototype,W={...H,signal:G,method:C.toUpperCase(),headers:D.normalize().toJSON(),body:k,duplex:"half",credentials:z?L:void 0};K=o&&new n(S,W);let F=await(o?ee(K,H):ee(S,W));const ne=m&&(N==="stream"||N==="response");if(m&&(A||ne&&B)){const P={};["status","statusText","headers"].forEach(de=>{P[de]=F[de]});const V=pe.toFiniteNumber(F.headers.get("content-length")),[O,X]=A&&pD(V,Iy(mD(A),!0))||[];F=new r(gD(F.body,vD,O,()=>{X&&X(),B&&B()}),P)}N=N||"text";let $=await h[pe.findKey(h,N)||"text"](F,x);return!ne&&B&&B(),await new Promise((P,V)=>{Tz(P,V,{data:$,headers:ki.from(F.headers),status:F.status,statusText:F.statusText,config:x,request:K})})}catch(z){throw B&&B(),z&&z.name==="TypeError"&&/Load failed|fetch/i.test(z.message)?Object.assign(new lt("Network Error",lt.ERR_NETWORK,x,K,z&&z.response),{cause:z.cause||z}):lt.from(z,z&&z.code,x,K,z&&z.response)}}},mX=new Map,Oz=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:i}=t,o=[r,i,n];let a=o.length,l=a,d,f,m=mX;for(;l--;)d=o[l],f=m.get(d),f===void 0&&m.set(d,f=l?new Map:pX(t)),m=f;return f};Oz();const Jk={http:NW,xhr:sX,fetch:{get:Oz}};pe.forEach(Jk,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const wD=e=>`- ${e}`,hX=e=>pe.isFunction(e)||e===null||e===!1;function gX(e,t){e=pe.isArray(e)?e:[e];const{length:n}=e;let r,i;const o={};for(let a=0;a<n;a++){r=e[a];let l;if(i=r,!hX(r)&&(i=Jk[(l=String(r)).toLowerCase()],i===void 0))throw new lt(`Unknown adapter '${l}'`);if(i&&(pe.isFunction(i)||(i=i.get(t))))break;o[l||"#"+a]=i}if(!i){const a=Object.entries(o).map(([d,f])=>`adapter ${d} `+(f===!1?"is not supported by the environment":"is not available in the build"));let l=n?a.length>1?`since :
5
+ `+a.map(wD).join(`
6
+ `):" "+wD(a[0]):"as no adapter specified";throw new lt("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return i}const Dz={getAdapter:gX,adapters:Jk};function g_(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new th(null,e)}function SD(e){return g_(e),e.headers=ki.from(e.headers),e.data=h_.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Dz.getAdapter(e.adapter||eh.adapter,e)(e).then(function(r){return g_(e),r.data=h_.call(e,e.transformResponse,r),r.headers=ki.from(r.headers),r},function(r){return Iz(r)||(g_(e),r&&r.response&&(r.response.data=h_.call(e,e.transformResponse,r.response),r.response.headers=ki.from(r.response.headers))),Promise.reject(r)})}const $z="1.13.5",Mb={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Mb[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const _D={};Mb.transitional=function(t,n,r){function i(o,a){return"[Axios v"+$z+"] Transitional option '"+o+"'"+a+(r?". "+r:"")}return(o,a,l)=>{if(t===!1)throw new lt(i(a," has been removed"+(n?" in "+n:"")),lt.ERR_DEPRECATED);return n&&!_D[a]&&(_D[a]=!0,console.warn(i(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,a,l):!0}};Mb.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function vX(e,t,n){if(typeof e!="object")throw new lt("options must be an object",lt.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],a=t[o];if(a){const l=e[o],d=l===void 0||a(l,o,e);if(d!==!0)throw new lt("option "+o+" must be "+d,lt.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new lt("Unknown option "+o,lt.ERR_BAD_OPTION)}}const dy={assertOptions:vX,validators:Mb},yo=dy.validators;let Ec=class{constructor(t){this.defaults=t||{},this.interceptors={request:new dD,response:new dD}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const o=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=`
7
+ `+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=$c(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&dy.assertOptions(r,{silentJSONParsing:yo.transitional(yo.boolean),forcedJSONParsing:yo.transitional(yo.boolean),clarifyTimeoutError:yo.transitional(yo.boolean),legacyInterceptorReqResOrdering:yo.transitional(yo.boolean)},!1),i!=null&&(pe.isFunction(i)?n.paramsSerializer={serialize:i}:dy.assertOptions(i,{encode:yo.function,serialize:yo.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),dy.assertOptions(n,{baseUrl:yo.spelling("baseURL"),withXsrfToken:yo.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=o&&pe.merge(o.common,o[n.method]);o&&pe.forEach(["delete","get","head","post","put","patch","common"],x=>{delete o[x]}),n.headers=ki.concat(a,o);const l=[];let d=!0;this.interceptors.request.forEach(function(S){if(typeof S.runWhen=="function"&&S.runWhen(n)===!1)return;d=d&&S.synchronous;const C=n.transitional||Wk;C&&C.legacyInterceptorReqResOrdering?l.unshift(S.fulfilled,S.rejected):l.push(S.fulfilled,S.rejected)});const f=[];this.interceptors.response.forEach(function(S){f.push(S.fulfilled,S.rejected)});let m,h=0,v;if(!d){const x=[SD.bind(this),void 0];for(x.unshift(...l),x.push(...f),v=x.length,m=Promise.resolve(n);h<v;)m=m.then(x[h++],x[h++]);return m}v=l.length;let y=n;for(;h<v;){const x=l[h++],S=l[h++];try{y=x(y)}catch(C){S.call(this,C);break}}try{m=SD.call(this,y)}catch(x){return Promise.reject(x)}for(h=0,v=f.length;h<v;)m=m.then(f[h++],f[h++]);return m}getUri(t){t=$c(this.defaults,t);const n=Nz(t.baseURL,t.url,t.allowAbsoluteUrls);return jz(n,t.params,t.paramsSerializer)}};pe.forEach(["delete","get","head","options"],function(t){Ec.prototype[t]=function(n,r){return this.request($c(r||{},{method:t,url:n,data:(r||{}).data}))}});pe.forEach(["post","put","patch"],function(t){function n(r){return function(o,a,l){return this.request($c(l||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:a}))}}Ec.prototype[t]=n(),Ec.prototype[t+"Form"]=n(!0)});let yX=class Pz{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(i=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const a=new Promise(l=>{r.subscribe(l),o=l}).then(i);return a.cancel=function(){r.unsubscribe(o)},a},t(function(o,a,l){r.reason||(r.reason=new th(o,a,l),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Pz(function(i){t=i}),cancel:t}}};function bX(e){return function(n){return e.apply(null,n)}}function xX(e){return pe.isObject(e)&&e.isAxiosError===!0}const aC={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(aC).forEach(([e,t])=>{aC[t]=e});function Mz(e){const t=new Ec(e),n=gz(Ec.prototype.request,t);return pe.extend(n,Ec.prototype,t,{allOwnKeys:!0}),pe.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return Mz($c(e,i))},n}const Hn=Mz(eh);Hn.Axios=Ec;Hn.CanceledError=th;Hn.CancelToken=yX;Hn.isCancel=Iz;Hn.VERSION=$z;Hn.toFormData=Pb;Hn.AxiosError=lt;Hn.Cancel=Hn.CanceledError;Hn.all=function(t){return Promise.all(t)};Hn.spread=bX;Hn.isAxiosError=xX;Hn.mergeConfig=$c;Hn.AxiosHeaders=ki;Hn.formToJSON=e=>Rz(pe.isHTMLForm(e)?new FormData(e):e);Hn.getAdapter=Dz.getAdapter;Hn.HttpStatusCode=aC;Hn.default=Hn;const{Axios:EPe,AxiosError:jPe,CanceledError:RPe,isCancel:IPe,CancelToken:TPe,VERSION:NPe,all:APe,Cancel:OPe,isAxiosError:DPe,spread:$Pe,toFormData:PPe,AxiosHeaders:MPe,HttpStatusCode:zPe,formToJSON:LPe,getAdapter:FPe,mergeConfig:UPe}=Hn,$t=Hn.create({withCredentials:!0,baseURL:"/",timeout:15e3,headers:{"Content-Type":"application/json"}});function Mr(e,t,n){return e===1||e==="1"?`${e} ${t}`:`${e} ${n}`}function wX(e){return e.replicated?.some(t=>zz(t))??!1}function SX(e){return e.status!=="failed"}function zz(e){return e.status==="failed"}function _X(e){if(wX(e.data)){const t=e.data.replicated.filter(SX),n=e.data.replicated.filter(zz),r=t.length?`The operation partially succeeded, but ${Mr(n.length,"node","nodes")} failed:`:n.length===1?"The operation failed on the single node:":`The operation failed on all ${n.length} nodes:`,i=n.map(o=>`${o.node}: ${o.reason}`).join(`
8
+ `);return Promise.reject(r+`
9
+ `+i)}return e}function Qc(e=1e3){return new Promise(t=>{setTimeout(()=>{t(!0)},e)})}function CX(e){return async t=>{const n=t?.response?.status,r=t?.config;if(!r||!(n===502||n===503||n===504))return Promise.reject(t);const o=3;if(r.__retryCount=r.__retryCount||0,r.__retryCount>=o)return Promise.reject(t);r.__retryCount+=1;const l=5e3*Math.pow(2,r.__retryCount-1);return await Qc(l),e.request(r)}}function ls({id:e=Mn,operationsUrl:t,port:n,secure:r,forceFabricConnect:i}={}){let o=t||Ct.getOperationsUrl(e);if(o&&(n||r!==void 0)){const f=new URL(o);n&&(f.port=String(n)),r!==void 0&&(f.protocol=r?"https:":"http:"),o=f.toString()}const a=i||Ct.checkForFabricConnect(e);a&&(e.startsWith("clu-")?o=$t.defaults.baseURL+`/Cluster/${e}/operation`:e.startsWith("ins-")&&(o=$t.defaults.baseURL+`/HDBInstance/${e}/operation`));const l=Ct.checkForBasicAuth(e),d=Hn.create({auth:a?void 0:l,withCredentials:a||!l,timeout:15e3,headers:{"Content-Type":"application/json"},baseURL:o});return d.interceptors.response.use(_X,CX(d)),d}var vf=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},kX={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},EX=class{#e=kX;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},wc=new EX;function jX(e){setTimeout(e,0)}var Pc=typeof window>"u"||"Deno"in globalThis;function Wr(){}function RX(e,t){return typeof e=="function"?e(t):e}function sC(e){return typeof e=="number"&&e>=0&&e!==1/0}function Lz(e,t){return Math.max(e+(t||0)-Date.now(),0)}function hl(e,t){return typeof e=="function"?e(t):e}function So(e,t){return typeof e=="function"?e(t):e}function CD(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:o,queryKey:a,stale:l}=e;if(a){if(r){if(t.queryHash!==Qk(a,t.options))return!1}else if(!Rm(t.queryKey,a))return!1}if(n!=="all"){const d=t.isActive();if(n==="active"&&!d||n==="inactive"&&d)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||i&&i!==t.state.fetchStatus||o&&!o(t))}function kD(e,t){const{exact:n,status:r,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(Mc(t.options.mutationKey)!==Mc(o))return!1}else if(!Rm(t.options.mutationKey,o))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Qk(e,t){return(t?.queryKeyHashFn||Mc)(e)}function Mc(e){return JSON.stringify(e,(t,n)=>lC(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Rm(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Rm(e[n],t[n])):!1}var IX=Object.prototype.hasOwnProperty;function Fz(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=ED(e)&&ED(t);if(!r&&!(lC(e)&&lC(t)))return t;const o=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),l=a.length,d=r?new Array(l):{};let f=0;for(let m=0;m<l;m++){const h=r?m:a[m],v=e[h],y=t[h];if(v===y){d[h]=v,(r?m<o:IX.call(e,h))&&f++;continue}if(v===null||y===null||typeof v!="object"||typeof y!="object"){d[h]=y;continue}const x=Fz(v,y,n+1);d[h]=x,x===v&&f++}return o===l&&f===o?e:d}function Ty(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function ED(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function lC(e){if(!jD(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!jD(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function jD(e){return Object.prototype.toString.call(e)==="[object Object]"}function TX(e){return new Promise(t=>{wc.setTimeout(t,e)})}function cC(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Fz(e,t):t}function NX(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function AX(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var eE=Symbol();function Uz(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===eE?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function tE(e,t){return typeof e=="function"?e(...t):!!e}function OX(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r||(r=!0,i.aborted?n():i.addEventListener("abort",n,{once:!0})),i)}),e}var DX=class extends vf{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!Pc&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},nE=new DX;function uC(){let e,t;const n=new Promise((i,o)=>{e=i,t=o});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}var $X=jX;function PX(){let e=[],t=0,n=l=>{l()},r=l=>{l()},i=$X;const o=l=>{t?e.push(l):i(()=>{n(l)})},a=()=>{const l=e;e=[],l.length&&i(()=>{r(()=>{l.forEach(d=>{n(d)})})})};return{batch:l=>{let d;t++;try{d=l()}finally{t--,t||a()}return d},batchCalls:l=>(...d)=>{o(()=>{l(...d)})},schedule:o,setNotifyFunction:l=>{n=l},setBatchNotifyFunction:l=>{r=l},setScheduler:l=>{i=l}}}var pr=PX(),MX=class extends vf{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!Pc&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(n=>{n(e)}))}isOnline(){return this.#e}},Ny=new MX;function zX(e){return Math.min(1e3*2**e,3e4)}function Vz(e){return(e??"online")==="online"?Ny.isOnline():!0}var dC=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function Bz(e){let t=!1,n=0,r;const i=uC(),o=()=>i.status!=="pending",a=S=>{if(!o()){const C=new dC(S);v(C),e.onCancel?.(C)}},l=()=>{t=!0},d=()=>{t=!1},f=()=>nE.isFocused()&&(e.networkMode==="always"||Ny.isOnline())&&e.canRun(),m=()=>Vz(e.networkMode)&&e.canRun(),h=S=>{o()||(r?.(),i.resolve(S))},v=S=>{o()||(r?.(),i.reject(S))},y=()=>new Promise(S=>{r=C=>{(o()||f())&&S(C)},e.onPause?.()}).then(()=>{r=void 0,o()||e.onContinue?.()}),x=()=>{if(o())return;let S;const C=n===0?e.initialPromise:void 0;try{S=C??e.fn()}catch(k){S=Promise.reject(k)}Promise.resolve(S).then(h).catch(k=>{if(o())return;const E=e.retry??(Pc?0:3),j=e.retryDelay??zX,I=typeof j=="function"?j(n,k):j,A=E===!0||typeof E=="number"&&n<E||typeof E=="function"&&E(n,k);if(t||!A){v(k);return}n++,e.onFail?.(n,k),TX(I).then(()=>f()?void 0:y()).then(()=>{t?v(k):x()})})};return{promise:i,status:()=>i.status,cancel:a,continue:()=>(r?.(),i),cancelRetry:l,continueRetry:d,canStart:m,start:()=>(m()?x():y().then(x),i)}}var Hz=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),sC(this.gcTime)&&(this.#e=wc.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Pc?1/0:300*1e3))}clearGcTimeout(){this.#e&&(wc.clearTimeout(this.#e),this.#e=void 0)}},LX=class extends Hz{#e;#t;#n;#i;#r;#a;#s;constructor(e){super(),this.#s=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#n=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=ID(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(e){if(this.options={...this.#a,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=ID(this.options);t.data!==void 0&&(this.setState(RD(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const n=cC(this.state.data,e,this.options);return this.#o({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#o({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#r?.promise;return this.#r?.cancel(e),t?t.then(Wr).catch(Wr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>So(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===eE||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>hl(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!Lz(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#r&&(this.#s?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#o({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(e&&this.setOptions(e),!this.options.queryFn){const l=this.observers.find(d=>d.options.queryFn);l&&this.setOptions(l.options)}const n=new AbortController,r=l=>{Object.defineProperty(l,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},i=()=>{const l=Uz(this.options,t),f=(()=>{const m={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(m),m})();return this.#s=!1,this.options.persister?this.options.persister(l,f,this):l(f)},a=(()=>{const l={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(l),l})();this.options.behavior?.onFetch(a,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#o({type:"fetch",meta:a.fetchOptions?.meta}),this.#r=Bz({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:l=>{l instanceof dC&&l.revert&&this.setState({...this.#t,fetchStatus:"idle"}),n.abort()},onFail:(l,d)=>{this.#o({type:"failed",failureCount:l,error:d})},onPause:()=>{this.#o({type:"pause"})},onContinue:()=>{this.#o({type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{const l=await this.#r.start();if(l===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(l),this.#n.config.onSuccess?.(l,this),this.#n.config.onSettled?.(l,this.state.error,this),l}catch(l){if(l instanceof dC){if(l.silent)return this.#r.promise;if(l.revert){if(this.state.data===void 0)throw l;return this.state.data}}throw this.#o({type:"error",error:l}),this.#n.config.onError?.(l,this),this.#n.config.onSettled?.(this.state.data,l,this),l}finally{this.scheduleGc()}}#o(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...qz(n.data,this.options),fetchMeta:e.meta??null};case"success":const r={...n,...RD(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?r:void 0,r;case"error":const i=e.error;return{...n,error:i,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),pr.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function qz(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Vz(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function RD(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function ID(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Kz=class extends vf{constructor(e,t){super(),this.options=t,this.#e=e,this.#o=null,this.#s=uC(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#i=void 0;#r;#a;#s;#o;#h;#f;#p;#c;#u;#l;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),TD(this.#t,this.options)?this.#d():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return fC(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return fC(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#x(),this.#w(),this.#t.removeObserver(this)}setOptions(e){const t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof So(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#S(),this.#t.setOptions(this.options),t._defaulted&&!Ty(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const r=this.hasListeners();r&&ND(this.#t,n,this.options,t)&&this.#d(),this.updateResult(),r&&(this.#t!==n||So(this.options.enabled,this.#t)!==So(t.enabled,this.#t)||hl(this.options.staleTime,this.#t)!==hl(t.staleTime,this.#t))&&this.#g();const i=this.#v();r&&(this.#t!==n||So(this.options.enabled,this.#t)!==So(t.enabled,this.#t)||i!==this.#l)&&this.#y(i)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return UX(this,n)&&(this.#i=n,this.#a=this.options,this.#r=this.#t.state),n}getCurrentResult(){return this.#i}trackResult(e,t){return new Proxy(e,{get:(n,r)=>(this.trackProp(r),t?.(r),r==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#s.status==="pending"&&this.#s.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,r))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#d({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#i))}#d(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Wr)),t}#g(){this.#x();const e=hl(this.options.staleTime,this.#t);if(Pc||this.#i.isStale||!sC(e))return;const n=Lz(this.#i.dataUpdatedAt,e)+1;this.#c=wc.setTimeout(()=>{this.#i.isStale||this.updateResult()},n)}#v(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#y(e){this.#w(),this.#l=e,!(Pc||So(this.options.enabled,this.#t)===!1||!sC(this.#l)||this.#l===0)&&(this.#u=wc.setInterval(()=>{(this.options.refetchIntervalInBackground||nE.isFocused())&&this.#d()},this.#l))}#b(){this.#g(),this.#y(this.#v())}#x(){this.#c&&(wc.clearTimeout(this.#c),this.#c=void 0)}#w(){this.#u&&(wc.clearInterval(this.#u),this.#u=void 0)}createResult(e,t){const n=this.#t,r=this.options,i=this.#i,o=this.#r,a=this.#a,d=e!==n?e.state:this.#n,{state:f}=e;let m={...f},h=!1,v;if(t._optimisticResults){const D=this.hasListeners(),L=!D&&TD(e,t),H=D&&ND(e,n,t,r);(L||H)&&(m={...m,...qz(f.data,e.options)}),t._optimisticResults==="isRestoring"&&(m.fetchStatus="idle")}let{error:y,errorUpdatedAt:x,status:S}=m;v=m.data;let C=!1;if(t.placeholderData!==void 0&&v===void 0&&S==="pending"){let D;i?.isPlaceholderData&&t.placeholderData===a?.placeholderData?(D=i.data,C=!0):D=typeof t.placeholderData=="function"?t.placeholderData(this.#p?.state.data,this.#p):t.placeholderData,D!==void 0&&(S="success",v=cC(i?.data,D,t),h=!0)}if(t.select&&v!==void 0&&!C)if(i&&v===o?.data&&t.select===this.#h)v=this.#f;else try{this.#h=t.select,v=t.select(v),v=cC(i?.data,v,t),this.#f=v,this.#o=null}catch(D){this.#o=D}this.#o&&(y=this.#o,v=this.#f,x=Date.now(),S="error");const k=m.fetchStatus==="fetching",E=S==="pending",j=S==="error",I=E&&k,A=v!==void 0,N={status:S,fetchStatus:m.fetchStatus,isPending:E,isSuccess:S==="success",isError:j,isInitialLoading:I,isLoading:I,data:v,dataUpdatedAt:m.dataUpdatedAt,error:y,errorUpdatedAt:x,failureCount:m.fetchFailureCount,failureReason:m.fetchFailureReason,errorUpdateCount:m.errorUpdateCount,isFetched:m.dataUpdateCount>0||m.errorUpdateCount>0,isFetchedAfterMount:m.dataUpdateCount>d.dataUpdateCount||m.errorUpdateCount>d.errorUpdateCount,isFetching:k,isRefetching:k&&!E,isLoadingError:j&&!A,isPaused:m.fetchStatus==="paused",isPlaceholderData:h,isRefetchError:j&&A,isStale:rE(e,t),refetch:this.refetch,promise:this.#s,isEnabled:So(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const D=N.data!==void 0,L=N.status==="error"&&!D,H=K=>{L?K.reject(N.error):D&&K.resolve(N.data)},ee=()=>{const K=this.#s=N.promise=uC();H(K)},G=this.#s;switch(G.status){case"pending":e.queryHash===n.queryHash&&H(G);break;case"fulfilled":(L||N.data!==G.value)&&ee();break;case"rejected":(!L||N.error!==G.reason)&&ee();break}}return N}updateResult(){const e=this.#i,t=this.createResult(this.#t,this.options);if(this.#r=this.#t.state,this.#a=this.options,this.#r.data!==void 0&&(this.#p=this.#t),Ty(t,e))return;this.#i=t;const n=()=>{if(!e)return!0;const{notifyOnChangeProps:r}=this.options,i=typeof r=="function"?r():r;if(i==="all"||!i&&!this.#m.size)return!0;const o=new Set(i??this.#m);return this.options.throwOnError&&o.add("error"),Object.keys(this.#i).some(a=>{const l=a;return this.#i[l]!==e[l]&&o.has(l)})};this.#_({listeners:n()})}#S(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#_(e){pr.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#i)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function FX(e,t){return So(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function TD(e,t){return FX(e,t)||e.state.data!==void 0&&fC(e,t,t.refetchOnMount)}function fC(e,t,n){if(So(t.enabled,e)!==!1&&hl(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&rE(e,t)}return!1}function ND(e,t,n,r){return(e!==t||So(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&rE(e,n)}function rE(e,t){return So(t.enabled,e)!==!1&&e.isStaleByTime(hl(t.staleTime,e))}function UX(e,t){return!Ty(e.getCurrentResult(),t)}function AD(e){return{onFetch:(t,n)=>{const r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,o=t.state.data?.pages||[],a=t.state.data?.pageParams||[];let l={pages:[],pageParams:[]},d=0;const f=async()=>{let m=!1;const h=x=>{OX(x,()=>t.signal,()=>m=!0)},v=Uz(t.options,t.fetchOptions),y=async(x,S,C)=>{if(m)return Promise.reject();if(S==null&&x.pages.length)return Promise.resolve(x);const E=(()=>{const T={client:t.client,queryKey:t.queryKey,pageParam:S,direction:C?"backward":"forward",meta:t.options.meta};return h(T),T})(),j=await v(E),{maxPages:I}=t.options,A=C?AX:NX;return{pages:A(x.pages,j,I),pageParams:A(x.pageParams,S,I)}};if(i&&o.length){const x=i==="backward",S=x?VX:OD,C={pages:o,pageParams:a},k=S(r,C);l=await y(C,k,x)}else{const x=e??o.length;do{const S=d===0?a[0]??r.initialPageParam:OD(r,l);if(d>0&&S==null)break;l=await y(l,S),d++}while(d<x)}return l};t.options.persister?t.fetchFn=()=>t.options.persister?.(f,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=f}}}function OD(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function VX(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var BX=class extends Hz{#e;#t;#n;#i;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||Gz(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#i?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#r({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#i=Bz({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(o,a)=>{this.#r({type:"failed",failureCount:o,error:a})},onPause:()=>{this.#r({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const r=this.state.status==="pending",i=!this.#i.canStart();try{if(r)t();else{this.#r({type:"pending",variables:e,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);const a=await this.options.onMutate?.(e,n);a!==this.state.context&&this.#r({type:"pending",context:a,variables:e,isPaused:i})}const o=await this.#i.start();return await this.#n.config.onSuccess?.(o,e,this.state.context,this,n),await this.options.onSuccess?.(o,e,this.state.context,n),await this.#n.config.onSettled?.(o,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(o,null,e,this.state.context,n),this.#r({type:"success",data:o}),o}catch(o){try{await this.#n.config.onError?.(o,e,this.state.context,this,n)}catch(a){Promise.reject(a)}try{await this.options.onError?.(o,e,this.state.context,n)}catch(a){Promise.reject(a)}try{await this.#n.config.onSettled?.(void 0,o,this.state.variables,this.state.context,this,n)}catch(a){Promise.reject(a)}try{await this.options.onSettled?.(void 0,o,e,this.state.context,n)}catch(a){Promise.reject(a)}throw this.#r({type:"error",error:o}),o}finally{this.#n.runNext(this)}}#r(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),pr.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function Gz(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Zz=class extends vf{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){const r=new BX({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);const t=wv(e);if(typeof t=="string"){const n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=wv(e);if(typeof t=="string"){const n=this.#t.get(t);if(n)if(n.length>1){const r=n.indexOf(e);r!==-1&&n.splice(r,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=wv(e);if(typeof t=="string"){const r=this.#t.get(t)?.find(i=>i.state.status==="pending");return!r||r===e}else return!0}runNext(e){const t=wv(e);return typeof t=="string"?this.#t.get(t)?.find(r=>r!==e&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){pr.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(n=>kD(t,n))}findAll(e={}){return this.getAll().filter(t=>kD(e,t))}notify(e){pr.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return pr.batch(()=>Promise.all(e.map(t=>t.continue().catch(Wr))))}};function wv(e){return e.options.scope?.id}var HX=class extends vf{#e;#t=void 0;#n;#i;constructor(t,n){super(),this.#e=t,this.setOptions(n),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const n=this.options;this.options=this.#e.defaultMutationOptions(t),Ty(this.options,n)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),n?.mutationKey&&this.options.mutationKey&&Mc(n.mutationKey)!==Mc(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(t){this.#r(),this.#a(t)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#r(),this.#a()}mutate(t,n){return this.#i=n,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(t)}#r(){const t=this.#n?.state??Gz();this.#t={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#a(t){pr.batch(()=>{if(this.#i&&this.hasListeners()){const n=this.#t.variables,r=this.#t.context,i={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#i.onSuccess?.(t.data,n,r,i)}catch(o){Promise.reject(o)}try{this.#i.onSettled?.(t.data,null,n,r,i)}catch(o){Promise.reject(o)}}else if(t?.type==="error"){try{this.#i.onError?.(t.error,n,r,i)}catch(o){Promise.reject(o)}try{this.#i.onSettled?.(void 0,t.error,n,r,i)}catch(o){Promise.reject(o)}}}this.listeners.forEach(n=>{n(this.#t)})})}},Yz=class extends vf{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const r=t.queryKey,i=t.queryHash??Qk(r,t);let o=this.get(i);return o||(o=new LX({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(o)),o}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){pr.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>CD(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>CD(e,n)):t}notify(e){pr.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){pr.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){pr.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},qX=class{#e;#t;#n;#i;#r;#a;#s;#o;constructor(e={}){this.#e=e.queryCache||new Yz,this.#t=e.mutationCache||new Zz,this.#n=e.defaultOptions||{},this.#i=new Map,this.#r=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#s=nE.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#o=Ny.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#s?.(),this.#s=void 0,this.#o?.(),this.#o=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(hl(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=this.#e.get(r.queryHash)?.state.data,a=RX(t,o);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return pr.batch(()=>this.#e.findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;pr.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return pr.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=pr.batch(()=>this.#e.findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(Wr).catch(Wr)}invalidateQueries(e,t={}){return pr.batch(()=>(this.#e.findAll(e).forEach(n=>{n.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=pr.batch(()=>this.#e.findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let o=i.fetch(void 0,n);return n.throwOnError||(o=o.catch(Wr)),i.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(Wr)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(hl(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Wr).catch(Wr)}fetchInfiniteQuery(e){return e.behavior=AD(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Wr).catch(Wr)}ensureInfiniteQueryData(e){return e.behavior=AD(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Ny.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#i.set(Mc(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#i.values()],n={};return t.forEach(r=>{Rm(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){this.#r.set(Mc(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(r=>{Rm(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Qk(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===eE&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},v_={exports:{}},mt={};var DD;function KX(){if(DD)return mt;DD=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),a=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),h=Symbol.for("react.activity"),v=Symbol.iterator;function y(P){return P===null||typeof P!="object"?null:(P=v&&P[v]||P["@@iterator"],typeof P=="function"?P:null)}var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,C={};function k(P,V,O){this.props=P,this.context=V,this.refs=C,this.updater=O||x}k.prototype.isReactComponent={},k.prototype.setState=function(P,V){if(typeof P!="object"&&typeof P!="function"&&P!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,P,V,"setState")},k.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function E(){}E.prototype=k.prototype;function j(P,V,O){this.props=P,this.context=V,this.refs=C,this.updater=O||x}var I=j.prototype=new E;I.constructor=j,S(I,k.prototype),I.isPureReactComponent=!0;var A=Array.isArray;function T(){}var N={H:null,A:null,T:null,S:null},D=Object.prototype.hasOwnProperty;function L(P,V,O){var X=O.ref;return{$$typeof:e,type:P,key:V,ref:X!==void 0?X:null,props:O}}function H(P,V){return L(P.type,V,P.props)}function ee(P){return typeof P=="object"&&P!==null&&P.$$typeof===e}function G(P){var V={"=":"=0",":":"=2"};return"$"+P.replace(/[=:]/g,function(O){return V[O]})}var K=/\/+/g;function B(P,V){return typeof P=="object"&&P!==null&&P.key!=null?G(""+P.key):V.toString(36)}function q(P){switch(P.status){case"fulfilled":return P.value;case"rejected":throw P.reason;default:switch(typeof P.status=="string"?P.then(T,T):(P.status="pending",P.then(function(V){P.status==="pending"&&(P.status="fulfilled",P.value=V)},function(V){P.status==="pending"&&(P.status="rejected",P.reason=V)})),P.status){case"fulfilled":return P.value;case"rejected":throw P.reason}}throw P}function z(P,V,O,X,de){var ge=typeof P;(ge==="undefined"||ge==="boolean")&&(P=null);var Q=!1;if(P===null)Q=!0;else switch(ge){case"bigint":case"string":case"number":Q=!0;break;case"object":switch(P.$$typeof){case e:case t:Q=!0;break;case m:return Q=P._init,z(Q(P._payload),V,O,X,de)}}if(Q)return de=de(P),Q=X===""?"."+B(P,0):X,A(de)?(O="",Q!=null&&(O=Q.replace(K,"$&/")+"/"),z(de,V,O,"",function(Ee){return Ee})):de!=null&&(ee(de)&&(de=H(de,O+(de.key==null||P&&P.key===de.key?"":(""+de.key).replace(K,"$&/")+"/")+Q)),V.push(de)),1;Q=0;var ve=X===""?".":X+":";if(A(P))for(var xe=0;xe<P.length;xe++)X=P[xe],ge=ve+B(X,xe),Q+=z(X,V,O,ge,de);else if(xe=y(P),typeof xe=="function")for(P=xe.call(P),xe=0;!(X=P.next()).done;)X=X.value,ge=ve+B(X,xe++),Q+=z(X,V,O,ge,de);else if(ge==="object"){if(typeof P.then=="function")return z(q(P),V,O,X,de);throw V=String(P),Error("Objects are not valid as a React child (found: "+(V==="[object Object]"?"object with keys {"+Object.keys(P).join(", ")+"}":V)+"). If you meant to render a collection of children, use an array instead.")}return Q}function W(P,V,O){if(P==null)return P;var X=[],de=0;return z(P,X,"","",function(ge){return V.call(O,ge,de++)}),X}function F(P){if(P._status===-1){var V=P._result;V=V(),V.then(function(O){(P._status===0||P._status===-1)&&(P._status=1,P._result=O)},function(O){(P._status===0||P._status===-1)&&(P._status=2,P._result=O)}),P._status===-1&&(P._status=0,P._result=V)}if(P._status===1)return P._result.default;throw P._result}var ne=typeof reportError=="function"?reportError:function(P){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var V=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof P=="object"&&P!==null&&typeof P.message=="string"?String(P.message):String(P),error:P});if(!window.dispatchEvent(V))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",P);return}console.error(P)},$={map:W,forEach:function(P,V,O){W(P,function(){V.apply(this,arguments)},O)},count:function(P){var V=0;return W(P,function(){V++}),V},toArray:function(P){return W(P,function(V){return V})||[]},only:function(P){if(!ee(P))throw Error("React.Children.only expected to receive a single React element child.");return P}};return mt.Activity=h,mt.Children=$,mt.Component=k,mt.Fragment=n,mt.Profiler=i,mt.PureComponent=j,mt.StrictMode=r,mt.Suspense=d,mt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=N,mt.__COMPILER_RUNTIME={__proto__:null,c:function(P){return N.H.useMemoCache(P)}},mt.cache=function(P){return function(){return P.apply(null,arguments)}},mt.cacheSignal=function(){return null},mt.cloneElement=function(P,V,O){if(P==null)throw Error("The argument must be a React element, but you passed "+P+".");var X=S({},P.props),de=P.key;if(V!=null)for(ge in V.key!==void 0&&(de=""+V.key),V)!D.call(V,ge)||ge==="key"||ge==="__self"||ge==="__source"||ge==="ref"&&V.ref===void 0||(X[ge]=V[ge]);var ge=arguments.length-2;if(ge===1)X.children=O;else if(1<ge){for(var Q=Array(ge),ve=0;ve<ge;ve++)Q[ve]=arguments[ve+2];X.children=Q}return L(P.type,de,X)},mt.createContext=function(P){return P={$$typeof:a,_currentValue:P,_currentValue2:P,_threadCount:0,Provider:null,Consumer:null},P.Provider=P,P.Consumer={$$typeof:o,_context:P},P},mt.createElement=function(P,V,O){var X,de={},ge=null;if(V!=null)for(X in V.key!==void 0&&(ge=""+V.key),V)D.call(V,X)&&X!=="key"&&X!=="__self"&&X!=="__source"&&(de[X]=V[X]);var Q=arguments.length-2;if(Q===1)de.children=O;else if(1<Q){for(var ve=Array(Q),xe=0;xe<Q;xe++)ve[xe]=arguments[xe+2];de.children=ve}if(P&&P.defaultProps)for(X in Q=P.defaultProps,Q)de[X]===void 0&&(de[X]=Q[X]);return L(P,ge,de)},mt.createRef=function(){return{current:null}},mt.forwardRef=function(P){return{$$typeof:l,render:P}},mt.isValidElement=ee,mt.lazy=function(P){return{$$typeof:m,_payload:{_status:-1,_result:P},_init:F}},mt.memo=function(P,V){return{$$typeof:f,type:P,compare:V===void 0?null:V}},mt.startTransition=function(P){var V=N.T,O={};N.T=O;try{var X=P(),de=N.S;de!==null&&de(O,X),typeof X=="object"&&X!==null&&typeof X.then=="function"&&X.then(T,ne)}catch(ge){ne(ge)}finally{V!==null&&O.types!==null&&(V.types=O.types),N.T=V}},mt.unstable_useCacheRefresh=function(){return N.H.useCacheRefresh()},mt.use=function(P){return N.H.use(P)},mt.useActionState=function(P,V,O){return N.H.useActionState(P,V,O)},mt.useCallback=function(P,V){return N.H.useCallback(P,V)},mt.useContext=function(P){return N.H.useContext(P)},mt.useDebugValue=function(){},mt.useDeferredValue=function(P,V){return N.H.useDeferredValue(P,V)},mt.useEffect=function(P,V){return N.H.useEffect(P,V)},mt.useEffectEvent=function(P){return N.H.useEffectEvent(P)},mt.useId=function(){return N.H.useId()},mt.useImperativeHandle=function(P,V,O){return N.H.useImperativeHandle(P,V,O)},mt.useInsertionEffect=function(P,V){return N.H.useInsertionEffect(P,V)},mt.useLayoutEffect=function(P,V){return N.H.useLayoutEffect(P,V)},mt.useMemo=function(P,V){return N.H.useMemo(P,V)},mt.useOptimistic=function(P,V){return N.H.useOptimistic(P,V)},mt.useReducer=function(P,V,O){return N.H.useReducer(P,V,O)},mt.useRef=function(P){return N.H.useRef(P)},mt.useState=function(P){return N.H.useState(P)},mt.useSyncExternalStore=function(P,V,O){return N.H.useSyncExternalStore(P,V,O)},mt.useTransition=function(){return N.H.useTransition()},mt.version="19.2.4",mt}var $D;function nh(){return $D||($D=1,v_.exports=KX()),v_.exports}var b=nh();const J=hf(b),iE=FY({__proto__:null,default:J},[b]);var Wz=b.createContext(void 0),sr=e=>{const t=b.useContext(Wz);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},GX=({client:e,children:t})=>(b.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),c.jsx(Wz.Provider,{value:e,children:t})),Xz=b.createContext(!1),ZX=()=>b.useContext(Xz);Xz.Provider;function YX(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var WX=b.createContext(YX()),XX=()=>b.useContext(WX),JX=(e,t,n)=>{const r=n?.state.error&&typeof e.throwOnError=="function"?tE(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},QX=e=>{b.useEffect(()=>{e.clearReset()},[e])},eJ=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||tE(n,[e.error,r])),tJ=(e,t)=>t.state.data===void 0,nJ=e=>{if(e.suspense){const n=i=>i==="static"?i:Math.max(i??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...i)=>n(r(...i)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},rJ=(e,t)=>e.isLoading&&e.isFetching&&!t,iJ=(e,t)=>e?.suspense&&t.isPending,PD=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Jz(e,t,n){const r=ZX(),i=XX(),o=sr(),a=o.defaultQueryOptions(e);o.getDefaultOptions().queries?._experimental_beforeQuery?.(a);const l=o.getQueryCache().get(a.queryHash);a._optimisticResults=r?"isRestoring":"optimistic",nJ(a),JX(a,i,l),QX(i);const d=!o.getQueryCache().get(a.queryHash),[f]=b.useState(()=>new t(o,a)),m=f.getOptimisticResult(a),h=!r&&e.subscribed!==!1;if(b.useSyncExternalStore(b.useCallback(v=>{const y=h?f.subscribe(pr.batchCalls(v)):Wr;return f.updateResult(),y},[f,h]),()=>f.getCurrentResult(),()=>f.getCurrentResult()),b.useEffect(()=>{f.setOptions(a)},[a,f]),iJ(a,m))throw PD(a,f,i);if(eJ({result:m,errorResetBoundary:i,throwOnError:a.throwOnError,query:l,suspense:a.suspense}))throw m.error;return o.getDefaultOptions().queries?._experimental_afterQuery?.(a,m),a.experimental_prefetchInRender&&!Pc&&rJ(m,r)&&(d?PD(a,f,i):l?.promise)?.catch(Wr).finally(()=>{f.updateResult()}),a.notifyOnChangeProps?m:f.trackResult(m)}function Dt(e,t){return Jz(e,Kz)}function Ri(e,t){return Jz({...e,enabled:!0,suspense:!0,throwOnError:tJ,placeholderData:void 0},Kz)}function BPe(e){return e}function ot(e,t){const n=sr(),[r]=b.useState(()=>new HX(n,e));b.useEffect(()=>{r.setOptions(e)},[r,e]);const i=b.useSyncExternalStore(b.useCallback(a=>r.subscribe(pr.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),o=b.useCallback((a,l)=>{r.mutate(a,l).catch(Wr)},[r]);if(i.error&&tE(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:o,mutateAsync:i.mutate}}async function Qz(){const{data:e}=await $t.get("/User/current");return e}const zb=["current-user"];function oJ(){return{queryKey:zb,queryFn:Qz,retry:!1}}async function rh({instanceClient:e,entityId:t}){const{data:n}=await e.post("/",{operation:"logout"});if(Ct.flagForBasicAuth(t,null),n)return n;throw new Error("Something went wrong")}async function gl({instanceClient:e,...t}){const{data:n}=await e.post("/",{operation:"user_info"},t);return n}function oE(e){let t=e?.fqdn;if(!t)return null;t.match(/^https?:\/\//i)||(t=`https://${t}`);const n=new URL(t);return t.match(/:\d+/)||(n.port=String(Vd)),t.includes("://")||(n.protocol="https:"),n.toString()}function aE(e){let t=e.instanceFqdn;t.match(/^https?:\/\//i)||(t=`https://${t}`);const n=new URL(t);return e.operationsApiPort&&(n.port=String(e.operationsApiPort)),e.operationsApiSecure!==void 0&&(n.protocol=e.operationsApiSecure?"https:":"http:"),n.toString()}const Mn="OverallAppSignIn";class aJ{broadListeners=[];specificListeners={};potentiallyAuthenticatedKey="Studio:PotentiallyAuthenticated";basicAuthKeyPrefix="Studio:BasicAuth:";fabricConnectKeyPrefix="Studio:FabricConnect:";potentiallyAuthenticated;checkedAuthentication={};allConnections={};constructor(){this.potentiallyAuthenticated=JSON.parse(localStorage.getItem(this.potentiallyAuthenticatedKey)||"{}")}getAllConnections(){return this.potentiallyAuthenticated.OverallAppSignIn||(this.allConnections[Mn]={user:null,isLoading:!1}),this.allConnections}getConnectionById(t){return this.allConnections[t]||(this.allConnections[t]={user:null,isLoading:!!this.potentiallyAuthenticated[t]}),this.allConnections[t]}listenToAllEntities(t){this.broadListeners.includes(t)||this.broadListeners.push(t);for(const n in this.potentiallyAuthenticated)this.ensureUserIsLoaded(n);return()=>{const n=this.broadListeners.indexOf(t);n>=0&&this.broadListeners.splice(n,1)}}listenToEntity(t,n){if(t)return this.specificListeners[t]||(this.specificListeners[t]=[]),this.specificListeners[t].includes(n)||this.specificListeners[t].push(n),this.ensureUserIsLoaded(t),()=>{const r=this.specificListeners[t].indexOf(n);r>=0&&this.specificListeners[t].splice(r,1)}}setUserForEntity(t,n){const r=this.calculateIdFromEntity(t),i=this.calculateKeyFromEntity(t);if(!(!r||!i))return this.setUserForIdAndKey(r,i,n)}setUserForIdAndKey(t,n,r){r?this.flagKeyAsSignedIn(t,n):this.flagKeyAsSignedOut(t),this.updateConnectionIfChanged(t,!1,r)}updateUserForEntity(t,n){const r=this.calculateIdFromEntity(t);if(!r)return;const i=this.getConnectionById(r);i.user&&this.updateConnectionIfChanged(r,!1,{...i.user,...n})}calculateIdFromEntity(t){return Mn}flagForBasicAuth(t,n){n!==null?localStorage.setItem(this.basicAuthKeyPrefix+t,btoa(JSON.stringify(n))):localStorage.removeItem(this.basicAuthKeyPrefix+t)}flagForFabricConnect(t,n){n?localStorage.setItem(this.fabricConnectKeyPrefix+t,"true"):localStorage.removeItem(this.fabricConnectKeyPrefix+t)}checkForBasicAuth(t){const n=localStorage.getItem(this.basicAuthKeyPrefix+t);return n?JSON.parse(atob(n)):void 0}checkForFabricConnect(t){return localStorage.getItem(this.fabricConnectKeyPrefix+t)==="true"}async signOutFromPotentiallyAuthenticatedInstances(){for(const t in this.potentiallyAuthenticated)if(this.allConnections[t].user=null,this.allConnections[t].isLoading=!1,this.flagKeyAsSignedOut(t),t!==Mn)try{const n=ls({id:t});await rh({entityId:t,instanceClient:n})}catch(n){console.error(`Failed to log out from ${t}, carrying on`,n)}}calculateKeyFromEntity(t){return Mn}updateConnectionIfChanged(t,n,r){this.checkedAuthentication[t]=!0;const i=this.getConnectionById(t);let o=!1;i.isLoading!==n&&(i.isLoading=n,o=!0),i.user!==r&&(i.user=r,o=!0),o&&this.updateListeners(t)}flagKeyAsSignedIn(t,n){this.potentiallyAuthenticated[t]!==n&&(this.potentiallyAuthenticated[t]=n,localStorage.setItem(this.potentiallyAuthenticatedKey,JSON.stringify(this.potentiallyAuthenticated)))}flagKeyAsSignedOut(t){this.potentiallyAuthenticated[t]&&(delete this.potentiallyAuthenticated[t],localStorage.setItem(this.potentiallyAuthenticatedKey,JSON.stringify(this.potentiallyAuthenticated)))}async updateListeners(t){if(await Qc(1),this.broadListeners)for(const n of this.broadListeners)this.updateListener(t,n);if(this.specificListeners[t])for(const n of this.specificListeners[t])this.updateListener(t,n)}updateListener(t,n){n(this.getConnectionById(t),t)}async ensureUserIsLoaded(t){this.checkedAuthentication[t]||await this.reloadUser(t)}getOperationsUrl(t){return BY}async reloadUser(t){return this.potentiallyAuthenticated[t]?this.loadUser(t):(this.updateConnectionIfChanged(t,!1,null),null)}async loadUser(t){const n=this.potentiallyAuthenticated[t];this.updateConnectionIfChanged(t,!0,null);let r=null;try{t===Mn?ml&&(r=await gl({instanceClient:ls()})):t&&(r=await gl({instanceClient:ls({id:t})}))}catch(i){console.error(i),r=null}return r?this.flagKeyAsSignedIn(t,n):this.flagKeyAsSignedOut(t),this.updateConnectionIfChanged(t,!1,r),r}}const Ct=new aJ,Od=new WeakMap,fy=new WeakMap,Ay={current:[]};let y_=!1,fm=0;const am=new Set,Sv=new Map;function e4(e){const t=Array.from(e).sort((n,r)=>n instanceof Dd&&n.options.deps.includes(r)?1:r instanceof Dd&&r.options.deps.includes(n)?-1:0);for(const n of t){if(Ay.current.includes(n))continue;Ay.current.push(n),n.recompute();const r=fy.get(n);if(r)for(const i of r){const o=Od.get(i);o&&e4(o)}}}function sJ(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function lJ(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function t4(e){if(fm>0&&!Sv.has(e)&&Sv.set(e,e.prevState),am.add(e),!(fm>0)&&!y_)try{for(y_=!0;am.size>0;){const t=Array.from(am);am.clear();for(const n of t){const r=Sv.get(n)??n.prevState;n.prevState=r,sJ(n)}for(const n of t){const r=Od.get(n);r&&(Ay.current.push(n),e4(r))}for(const n of t){const r=Od.get(n);if(r)for(const i of r)lJ(i)}}}finally{y_=!1,Ay.current=[],Sv.clear()}}function pm(e){fm++;try{e()}finally{if(fm--,fm===0){const t=am.values().next().value;t&&t4(t)}}}function cJ(e){return typeof e=="function"}class pC{constructor(t,n){this.listeners=new Set,this.subscribe=r=>{var i,o;this.listeners.add(r);const a=(o=(i=this.options)==null?void 0:i.onSubscribe)==null?void 0:o.call(i,r,this);return()=>{this.listeners.delete(r),a?.()}},this.prevState=t,this.state=t,this.options=n}setState(t){var n,r,i;this.prevState=this.state,(n=this.options)!=null&&n.updateFn?this.state=this.options.updateFn(this.prevState)(t):cJ(t)?this.state=t(this.prevState):this.state=t,(i=(r=this.options)==null?void 0:r.onUpdate)==null||i.call(r),t4(this)}}class Dd{constructor(t){this.listeners=new Set,this._subscriptions=[],this.lastSeenDepValues=[],this.getDepVals=()=>{const n=this.options.deps.length,r=new Array(n),i=new Array(n);for(let o=0;o<n;o++){const a=this.options.deps[o];r[o]=a.prevState,i[o]=a.state}return this.lastSeenDepValues=i,{prevDepVals:r,currDepVals:i,prevVal:this.prevState??void 0}},this.recompute=()=>{var n,r;this.prevState=this.state;const i=this.getDepVals();this.state=this.options.fn(i),(r=(n=this.options).onUpdate)==null||r.call(n)},this.checkIfRecalculationNeededDeeply=()=>{for(const o of this.options.deps)o instanceof Dd&&o.checkIfRecalculationNeededDeeply();let n=!1;const r=this.lastSeenDepValues,{currDepVals:i}=this.getDepVals();for(let o=0;o<i.length;o++)if(i[o]!==r[o]){n=!0;break}n&&this.recompute()},this.mount=()=>(this.registerOnGraph(),this.checkIfRecalculationNeededDeeply(),()=>{this.unregisterFromGraph();for(const n of this._subscriptions)n()}),this.subscribe=n=>{var r,i;this.listeners.add(n);const o=(i=(r=this.options).onSubscribe)==null?void 0:i.call(r,n,this);return()=>{this.listeners.delete(n),o?.()}},this.options=t,this.state=t.fn({prevDepVals:void 0,prevVal:void 0,currDepVals:this.getDepVals().currDepVals})}registerOnGraph(t=this.options.deps){for(const n of t)if(n instanceof Dd)n.registerOnGraph(),this.registerOnGraph(n.options.deps);else if(n instanceof pC){let r=Od.get(n);r||(r=new Set,Od.set(n,r)),r.add(this);let i=fy.get(this);i||(i=new Set,fy.set(this,i)),i.add(n)}}unregisterFromGraph(t=this.options.deps){for(const n of t)if(n instanceof Dd)this.unregisterFromGraph(n.options.deps);else if(n instanceof pC){const r=Od.get(n);r&&r.delete(this);const i=fy.get(this);i&&i.delete(n)}}}const vl="__TSR_index",MD="popstate",zD="beforeunload";function uJ(e){let t=e.getLocation();const n=new Set,r=a=>{t=e.getLocation(),n.forEach(l=>l({location:t,action:a}))},i=a=>{e.notifyOnIndexChange??!0?r(a):t=e.getLocation()},o=async({task:a,navigateOpts:l,...d})=>{if(l?.ignoreBlocker??!1){a();return}const m=e.getBlockers?.()??[],h=d.type==="PUSH"||d.type==="REPLACE";if(typeof document<"u"&&m.length&&h)for(const v of m){const y=Im(d.path,d.state);if(await v.blockerFn({currentLocation:t,nextLocation:y,action:d.type})){e.onBlocked?.();return}}a()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:a=>(n.add(a),()=>{n.delete(a)}),push:(a,l,d)=>{const f=t.state[vl];l=LD(f+1,l),o({task:()=>{e.pushState(a,l),r({type:"PUSH"})},navigateOpts:d,type:"PUSH",path:a,state:l})},replace:(a,l,d)=>{const f=t.state[vl];l=LD(f,l),o({task:()=>{e.replaceState(a,l),r({type:"REPLACE"})},navigateOpts:d,type:"REPLACE",path:a,state:l})},go:(a,l)=>{o({task:()=>{e.go(a),i({type:"GO",index:a})},navigateOpts:l,type:"GO"})},back:a=>{o({task:()=>{e.back(a?.ignoreBlocker??!1),i({type:"BACK"})},navigateOpts:a,type:"BACK"})},forward:a=>{o({task:()=>{e.forward(a?.ignoreBlocker??!1),i({type:"FORWARD"})},navigateOpts:a,type:"FORWARD"})},canGoBack:()=>t.state[vl]!==0,createHref:a=>e.createHref(a),block:a=>{if(!e.setBlockers)return()=>{};const l=e.getBlockers?.()??[];return e.setBlockers([...l,a]),()=>{const d=e.getBlockers?.()??[];e.setBlockers?.(d.filter(f=>f!==a))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r}}function LD(e,t){t||(t={});const n=sE();return{...t,key:n,__TSR_key:n,[vl]:e}}function n4(e){const t=e?.window??(typeof document<"u"?window:void 0),n=t.history.pushState,r=t.history.replaceState;let i=[];const o=()=>i,a=D=>i=D,l=e?.createHref??(D=>D),d=e?.parseLocation??(()=>Im(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const D=sE();t.history.replaceState({[vl]:0,key:D,__TSR_key:D},"")}let f=d(),m,h=!1,v=!1,y=!1,x=!1;const S=()=>f;let C,k;const E=()=>{C&&(N._ignoreSubscribers=!0,(C.isPush?t.history.pushState:t.history.replaceState)(C.state,"",C.href),N._ignoreSubscribers=!1,C=void 0,k=void 0,m=void 0)},j=(D,L,H)=>{const ee=l(L);k||(m=f),f=Im(L,H),C={href:ee,state:H,isPush:C?.isPush||D==="push"},k||(k=Promise.resolve().then(()=>E()))},I=D=>{f=d(),N.notify({type:D})},A=async()=>{if(v){v=!1;return}const D=d(),L=D.state[vl]-f.state[vl],H=L===1,ee=L===-1,G=!H&&!ee||h;h=!1;const K=G?"GO":ee?"BACK":"FORWARD",B=G?{type:"GO",index:L}:{type:ee?"BACK":"FORWARD"};if(y)y=!1;else{const q=o();if(typeof document<"u"&&q.length){for(const z of q)if(await z.blockerFn({currentLocation:f,nextLocation:D,action:K})){v=!0,t.history.go(1),N.notify(B);return}}}f=d(),N.notify(B)},T=D=>{if(x){x=!1;return}let L=!1;const H=o();if(typeof document<"u"&&H.length)for(const ee of H){const G=ee.enableBeforeUnload??!0;if(G===!0){L=!0;break}if(typeof G=="function"&&G()===!0){L=!0;break}}if(L)return D.preventDefault(),D.returnValue=""},N=uJ({getLocation:S,getLength:()=>t.history.length,pushState:(D,L)=>j("push",D,L),replaceState:(D,L)=>j("replace",D,L),back:D=>(D&&(y=!0),x=!0,t.history.back()),forward:D=>{D&&(y=!0),x=!0,t.history.forward()},go:D=>{h=!0,t.history.go(D)},createHref:D=>l(D),flush:E,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(zD,T,{capture:!0}),t.removeEventListener(MD,A)},onBlocked:()=>{m&&f!==m&&(f=m)},getBlockers:o,setBlockers:a,notifyOnIndexChange:!1});return t.addEventListener(zD,T,{capture:!0}),t.addEventListener(MD,A),t.history.pushState=function(...D){const L=n.apply(t.history,D);return N._ignoreSubscribers||I("PUSH"),L},t.history.replaceState=function(...D){const L=r.apply(t.history,D);return N._ignoreSubscribers||I("REPLACE"),L},N}function dJ(e){const t=typeof document<"u"?window:void 0;return n4({window:t,parseLocation:()=>{const n=t.location.hash.split("#").slice(1),r=n[0]??"/",i=t.location.search,o=n.slice(1),a=o.length===0?"":`#${o.join("#")}`,l=`${r}${i}${a}`;return Im(l,t.history.state)},createHref:n=>`${t.location.pathname}${t.location.search}#${n}`})}function Im(e,t){const n=e.indexOf("#"),r=e.indexOf("?"),i=sE();return{href:e,pathname:e.substring(0,n>0?r>0?Math.min(n,r):n:r>0?r:e.length),hash:n>-1?e.substring(n):"",search:r>-1?e.slice(r,n===-1?void 0:n):"",state:t||{[vl]:0,key:i,__TSR_key:i}}}function sE(){return(Math.random()+1).toString(36).substring(7)}function mC(e){return e[e.length-1]}function fJ(e){return typeof e=="function"}function jc(e,t){return fJ(e)?e(t):e}const pJ=Object.prototype.hasOwnProperty;function xo(e,t){if(e===t)return e;const n=t,r=VD(e)&&VD(n);if(!r&&!(Oy(e)&&Oy(n)))return n;const i=r?e:FD(e);if(!i)return n;const o=r?n:FD(n);if(!o)return n;const a=i.length,l=o.length,d=r?new Array(l):{};let f=0;for(let m=0;m<l;m++){const h=r?m:o[m],v=e[h],y=n[h];if(v===y){d[h]=v,(r?m<a:pJ.call(e,h))&&f++;continue}if(v===null||y===null||typeof v!="object"||typeof y!="object"){d[h]=y;continue}const x=xo(v,y);d[h]=x,x===v&&f++}return a===l&&f===a?e:d}function FD(e){const t=[],n=Object.getOwnPropertyNames(e);for(const i of n){if(!Object.prototype.propertyIsEnumerable.call(e,i))return!1;t.push(i)}const r=Object.getOwnPropertySymbols(e);for(const i of r){if(!Object.prototype.propertyIsEnumerable.call(e,i))return!1;t.push(i)}return t}function Oy(e){if(!UD(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!UD(n)||!n.hasOwnProperty("isPrototypeOf"))}function UD(e){return Object.prototype.toString.call(e)==="[object Object]"}function VD(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Rc(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let r=0,i=e.length;r<i;r++)if(!Rc(e[r],t[r],n))return!1;return!0}if(Oy(e)&&Oy(t)){const r=n?.ignoreUndefined??!0;if(n?.partial){for(const a in t)if((!r||t[a]!==void 0)&&!Rc(e[a],t[a],n))return!1;return!0}let i=0;if(!r)i=Object.keys(e).length;else for(const a in e)e[a]!==void 0&&i++;let o=0;for(const a in t)if((!r||t[a]!==void 0)&&(o++,o>i||!Rc(e[a],t[a],n)))return!1;return i===o}return!1}function Hd(e){let t,n;const r=new Promise((i,o)=>{t=i,n=o});return r.status="pending",r.resolve=i=>{r.status="resolved",r.value=i,t(i),e?.(i)},r.reject=i=>{r.status="rejected",n(i)},r}function mJ(e){return typeof e?.message!="string"?!1:e.message.startsWith("Failed to fetch dynamically imported module")||e.message.startsWith("error loading dynamically imported module")||e.message.startsWith("Importing a module script failed")}function yl(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}var hJ="Invariant failed";function ds(e,t){if(!e)throw new Error(hJ)}const xi="__root__",_a=0,zc=1,qd=2,Kd=3;function cs(e){return lE(e.filter(t=>t!==void 0).join("/"))}function lE(e){return e.replace(/\/{2,}/g,"/")}function cE(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function bl(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function py(e){return bl(cE(e))}function Dy(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function gJ(e,t,n){return Dy(e,n)===Dy(t,n)}function vJ(e){const{type:t,value:n}=e;if(t===_a)return n;const{prefixSegment:r,suffixSegment:i}=e;if(t===zc){const o=n.substring(1);if(r&&i)return`${r}{$${o}}${i}`;if(r)return`${r}{$${o}}`;if(i)return`{$${o}}${i}`}if(t===Kd){const o=n.substring(1);return r&&i?`${r}{-$${o}}${i}`:r?`${r}{-$${o}}`:i?`{-$${o}}${i}`:`{-$${o}}`}if(t===qd){if(r&&i)return`${r}{$}${i}`;if(r)return`${r}{$}`;if(i)return`{$}${i}`}return n}function yJ({base:e,to:t,trailingSlash:n="never",parseCache:r}){let i=r4(e,r).slice();const o=Lb(t,r);i.length>1&&mC(i)?.value==="/"&&i.pop();for(let d=0,f=o.length;d<f;d++){const m=o[d],h=m.value;h==="/"?d?d===f-1&&i.push(m):i=[m]:h===".."?i.pop():h==="."||i.push(m)}i.length>1&&(mC(i).value==="/"?n==="never"&&i.pop():n==="always"&&i.push({type:_a,value:"/"}));const a=i.map(vJ);return cs(a)}const r4=(e,t)=>i4(e,t,!0),Lb=(e,t)=>i4(e,t,!1),i4=(e,t,n)=>{if(!e)return[];const r=t?.get(e);if(r)return r;const i=CJ(e,n);return t?.set(e,i),i},bJ=/^\$.{1,}$/,xJ=/^(.*?)\{(\$[a-zA-Z_$][a-zA-Z0-9_$]*)\}(.*)$/,wJ=/^(.*?)\{-(\$[a-zA-Z_$][a-zA-Z0-9_$]*)\}(.*)$/,SJ=/^\$$/,_J=/^(.*?)\{\$\}(.*)$/;function CJ(e,t){e=lE(e);const n=[];if(e.slice(0,1)==="/"&&(e=e.substring(1),n.push({type:_a,value:"/"})),!e)return n;const r=e.split("/").filter(Boolean);return n.push(...r.map(i=>{const o=!t&&i!==xi&&i.slice(-1)==="_"?i.slice(0,-1):i,a=o.match(_J);if(a){const f=a[1],m=a[2];return{type:qd,value:"$",prefixSegment:f||void 0,suffixSegment:m||void 0}}const l=o.match(wJ);if(l){const f=l[1],m=l[2],h=l[3];return{type:Kd,value:m,prefixSegment:f||void 0,suffixSegment:h||void 0}}const d=o.match(xJ);if(d){const f=d[1],m=d[2],h=d[3];return{type:zc,value:""+m,prefixSegment:f||void 0,suffixSegment:h||void 0}}if(bJ.test(o)){const f=o.substring(1);return{type:zc,value:"$"+f,prefixSegment:void 0,suffixSegment:void 0}}return SJ.test(o)?{type:qd,value:"$",prefixSegment:void 0,suffixSegment:void 0}:{type:_a,value:o.includes("%25")?o.split("%25").map(f=>decodeURI(f)).join("%25"):decodeURI(o)}})),e.slice(-1)==="/"&&(e=e.substring(1),n.push({type:_a,value:"/"})),n}function _v({path:e,params:t,leaveWildcards:n,leaveParams:r,decodeCharMap:i,parseCache:o}){const a=Lb(e,o);function l(h){const v=t[h],y=typeof v=="string";return h==="*"||h==="_splat"?y?encodeURI(v):v:y?kJ(v,i):v}let d=!1;const f={},m=cs(a.map(h=>{if(h.type===_a)return h.value;if(h.type===qd){f._splat=t._splat,f["*"]=t._splat;const v=h.prefixSegment||"",y=h.suffixSegment||"";if(!t._splat)return d=!0,n?`${v}${h.value}${y}`:v||y?`${v}${y}`:void 0;const x=l("_splat");return n?`${v}${h.value}${x??""}${y}`:`${v}${x}${y}`}if(h.type===zc){const v=h.value.substring(1);!d&&!(v in t)&&(d=!0),f[v]=t[v];const y=h.prefixSegment||"",x=h.suffixSegment||"";if(r){const S=l(h.value);return`${y}${h.value}${S??""}${x}`}return`${y}${l(v)??"undefined"}${x}`}if(h.type===Kd){const v=h.value.substring(1),y=h.prefixSegment||"",x=h.suffixSegment||"";if(!(v in t)||t[v]==null)return n?`${y}${v}${x}`:y||x?`${y}${x}`:void 0;if(f[v]=t[v],r){const S=l(h.value);return`${y}${h.value}${S??""}${x}`}return n?`${y}${v}${l(v)??""}${x}`:`${y}${l(v)??""}${x}`}return h.value}));return{usedParams:f,interpolatedPath:m,isMissingParams:d}}function kJ(e,t){let n=encodeURIComponent(e);if(t)for(const[r,i]of t)n=n.replaceAll(r,i);return n}function hC(e,t,n){const r=EJ(e,t,n);if(!(t.to&&!r))return r??{}}function EJ(e,{to:t,fuzzy:n,caseSensitive:r},i){const o=t,a=r4(e.startsWith("/")?e:`/${e}`,i),l=Lb(o.startsWith("/")?o:`/${o}`,i),d={};return jJ(a,l,d,n,r)?d:void 0}function jJ(e,t,n,r,i){let o=0,a=0;for(;o<e.length||a<t.length;){const l=e[o],d=t[a];if(d){if(d.type===qd){const f=e.slice(o);let m;if(d.prefixSegment||d.suffixSegment){if(!l)return!1;const h=d.prefixSegment||"",v=d.suffixSegment||"",y=l.value;if("prefixSegment"in d&&!y.startsWith(h)||"suffixSegment"in d&&!e[e.length-1]?.value.endsWith(v))return!1;let x=decodeURI(cs(f.map(S=>S.value)));h&&x.startsWith(h)&&(x=x.slice(h.length)),v&&x.endsWith(v)&&(x=x.slice(0,x.length-v.length)),m=x}else m=decodeURI(cs(f.map(h=>h.value)));return n["*"]=m,n._splat=m,!0}if(d.type===_a){if(d.value==="/"&&!l?.value){a++;continue}if(l){if(i){if(d.value!==l.value)return!1}else if(d.value.toLowerCase()!==l.value.toLowerCase())return!1;o++,a++;continue}else return!1}if(d.type===zc){if(!l||l.value==="/")return!1;let f="",m=!1;if(d.prefixSegment||d.suffixSegment){const h=d.prefixSegment||"",v=d.suffixSegment||"",y=l.value;if(h&&!y.startsWith(h)||v&&!y.endsWith(v))return!1;let x=y;h&&x.startsWith(h)&&(x=x.slice(h.length)),v&&x.endsWith(v)&&(x=x.slice(0,x.length-v.length)),f=decodeURIComponent(x),m=!0}else f=decodeURIComponent(l.value),m=!0;m&&(n[d.value.substring(1)]=f,o++),a++;continue}if(d.type===Kd){if(!l){a++;continue}if(l.value==="/"){a++;continue}let f="",m=!1;if(d.prefixSegment||d.suffixSegment){const h=d.prefixSegment||"",v=d.suffixSegment||"",y=l.value;if((!h||y.startsWith(h))&&(!v||y.endsWith(v))){let x=y;h&&x.startsWith(h)&&(x=x.slice(h.length)),v&&x.endsWith(v)&&(x=x.slice(0,x.length-v.length)),f=decodeURIComponent(x),m=!0}}else{let h=!0;for(let v=a+1;v<t.length;v++){const y=t[v];if(y?.type===_a&&y.value===l.value){h=!1;break}if(y?.type===zc||y?.type===qd){e.length<t.length&&(h=!1);break}}h&&(f=decodeURIComponent(l.value),m=!0)}m&&(n[d.value.substring(1)]=f,o++),a++;continue}}if(o<e.length&&a>=t.length)return n["**"]=cs(e.slice(o).map(f=>f.value)),!!r&&t[t.length-1]?.value!=="/";if(a<t.length&&o>=e.length){for(let f=a;f<t.length;f++)if(t[f]?.type!==Kd)return!1;break}break}return!0}const RJ=.75,IJ=1,TJ=.5,NJ=.4,AJ=.25,OJ=.2,DJ=.05,$J=.02,PJ=.01,BD=2e-4,HD=1e-4;function qD(e,t){return e.prefixSegment&&e.suffixSegment?t+DJ+BD*e.prefixSegment.length+HD*e.suffixSegment.length:e.prefixSegment?t+$J+BD*e.prefixSegment.length:e.suffixSegment?t+PJ+HD*e.suffixSegment.length:t}function MJ(e){const t=[];return e.forEach((r,i)=>{if(r.isRoot||!r.path)return;const o=cE(r.fullPath);let a=Lb(o),l=0;for(;a.length>l+1&&a[l]?.value==="/";)l++;l>0&&(a=a.slice(l));let d=0,f=!1;const m=a.map((h,v)=>{if(h.value==="/")return RJ;if(h.type===_a)return IJ;let y;h.type===zc?y=TJ:h.type===Kd?(y=NJ,d++):y=AJ;for(let x=v+1;x<a.length;x++){const S=a[x];if(S.type===_a&&S.value!=="/")return f=!0,qD(h,y+OJ)}return qD(h,y)});t.push({child:r,trimmed:o,parsed:a,index:i,scores:m,optionalParamCount:d,hasStaticAfter:f})}),t.sort((r,i)=>{const o=Math.min(r.scores.length,i.scores.length);for(let a=0;a<o;a++)if(r.scores[a]!==i.scores[a])return i.scores[a]-r.scores[a];if(r.scores.length!==i.scores.length){if(r.optionalParamCount!==i.optionalParamCount){if(r.hasStaticAfter===i.hasStaticAfter)return r.optionalParamCount-i.optionalParamCount;if(r.hasStaticAfter&&!i.hasStaticAfter)return-1;if(!r.hasStaticAfter&&i.hasStaticAfter)return 1}return i.scores.length-r.scores.length}for(let a=0;a<o;a++)if(r.parsed[a].value!==i.parsed[a].value)return r.parsed[a].value>i.parsed[a].value?1:-1;return r.index-i.index}).map((r,i)=>(r.child.rank=i,r.child))}function zJ({routeTree:e,initRoute:t}){const n={},r={},i=a=>{a.forEach((l,d)=>{t?.(l,d);const f=n[l.id];if(ds(!f,`Duplicate routes found with id: ${String(l.id)}`),n[l.id]=l,!l.isRoot&&l.path){const h=bl(l.fullPath);(!r[h]||l.fullPath.endsWith("/"))&&(r[h]=l)}const m=l.children;m?.length&&i(m)})};i([e]);const o=MJ(Object.values(n));return{routesById:n,routesByPath:r,flatRoutes:o}}function Qo(e){return!!e?.isNotFound}function LJ(){try{if(typeof window<"u"&&typeof window.sessionStorage=="object")return window.sessionStorage}catch{}}const $y="tsr-scroll-restoration-v1_3",FJ=(e,t)=>{let n;return(...r)=>{n||(n=setTimeout(()=>{e(...r),n=null},t))}};function UJ(){const e=LJ();if(!e)return null;const t=e.getItem($y);let n=t?JSON.parse(t):{};return{state:n,set:r=>(n=jc(r,n)||n,e.setItem($y,JSON.stringify(n)))}}const Cv=UJ(),gC=e=>e.state.__TSR_key||e.href;function VJ(e){const t=[];let n;for(;n=e.parentNode;)t.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(n.children,e)+1})`),e=n;return`${t.reverse().join(" > ")}`.toLowerCase()}let Py=!1;function o4({storageKey:e,key:t,behavior:n,shouldScrollRestoration:r,scrollToTopSelectors:i,location:o}){let a;try{a=JSON.parse(sessionStorage.getItem(e)||"{}")}catch(f){console.error(f);return}const l=t||window.history.state?.__TSR_key,d=a[l];Py=!0;e:{if(r&&d&&Object.keys(d).length>0){for(const h in d){const v=d[h];if(h==="window")window.scrollTo({top:v.scrollY,left:v.scrollX,behavior:n});else if(h){const y=document.querySelector(h);y&&(y.scrollLeft=v.scrollX,y.scrollTop=v.scrollY)}}break e}const f=(o??window.location).hash.split("#",2)[1];if(f){const h=window.history.state?.__hashScrollIntoViewOptions??!0;if(h){const v=document.getElementById(f);v&&v.scrollIntoView(h)}break e}const m={top:0,left:0,behavior:n};if(window.scrollTo(m),i)for(const h of i){if(h==="window")continue;const v=typeof h=="function"?h():document.querySelector(h);v&&v.scrollTo(m)}}Py=!1}function BJ(e,t){if(!Cv&&!e.isServer||((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isServer||e.isScrollRestorationSetup||!Cv))return;e.isScrollRestorationSetup=!0,Py=!1;const r=e.options.getScrollRestorationKey||gC;window.history.scrollRestoration="manual";const i=o=>{if(Py||!e.isScrollRestoring)return;let a="";if(o.target===document||o.target===window)a="window";else{const d=o.target.getAttribute("data-scroll-restoration-id");d?a=`[data-scroll-restoration-id="${d}"]`:a=VJ(o.target)}const l=r(e.state.location);Cv.set(d=>{const f=d[l]||={},m=f[a]||={};if(a==="window")m.scrollX=window.scrollX||0,m.scrollY=window.scrollY||0;else if(a){const h=document.querySelector(a);h&&(m.scrollX=h.scrollLeft||0,m.scrollY=h.scrollTop||0)}return d})};typeof document<"u"&&document.addEventListener("scroll",FJ(i,100),!0),e.subscribe("onRendered",o=>{const a=r(o.toLocation);if(!e.resetNextScroll){e.resetNextScroll=!0;return}typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation})||(o4({storageKey:$y,key:a,behavior:e.options.scrollRestorationBehavior,shouldScrollRestoration:e.isScrollRestoring,scrollToTopSelectors:e.options.scrollToTopSelectors,location:e.history.location}),e.isScrollRestoring&&Cv.set(l=>(l[a]||={},l)))})}function HJ(e){if(typeof document<"u"&&document.querySelector){const t=e.state.location.state.__hashScrollIntoViewOptions??!0;if(t&&e.state.location.hash!==""){const n=document.getElementById(e.state.location.hash);n&&n.scrollIntoView(t)}}}function qJ(e,t=String){const n=new URLSearchParams;for(const r in e){const i=e[r];i!==void 0&&n.set(r,t(i))}return n.toString()}function b_(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function KJ(e){const t=new URLSearchParams(e),n={};for(const[r,i]of t.entries()){const o=n[r];o==null?n[r]=b_(i):Array.isArray(o)?o.push(b_(i)):n[r]=[o,b_(i)]}return n}const GJ=YJ(JSON.parse),ZJ=WJ(JSON.stringify,JSON.parse);function YJ(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=KJ(t);for(const r in n){const i=n[r];if(typeof i=="string")try{n[r]=e(i)}catch{}}return n}}function WJ(e,t){const n=typeof t=="function";function r(i){if(typeof i=="object"&&i!==null)try{return e(i)}catch{}else if(n&&typeof i=="string")try{return t(i),e(i)}catch{}return i}return i=>{const o=qJ(i,r);return o?`?${o}`:""}}function eu(e){if(e.statusCode=e.statusCode||e.code||307,!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const t=new Headers(e.headers);e.href&&t.get("Location")===null&&t.set("Location",e.href);const n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function ba(e){return e instanceof Response&&!!e.options}function XJ(e){const t=new Map;let n,r;const i=o=>{o.next&&(o.prev?(o.prev.next=o.next,o.next.prev=o.prev,o.next=void 0,r&&(r.next=o,o.prev=r)):(o.next.prev=void 0,n=o.next,o.next=void 0,r&&(o.prev=r,r.next=o)),r=o)};return{get(o){const a=t.get(o);if(a)return i(a),a.value},set(o,a){if(t.size>=e&&n){const d=n;t.delete(d.key),d.next&&(n=d.next,d.next.prev=void 0),d===r&&(r=void 0)}const l=t.get(o);if(l)l.value=a,i(l);else{const d={key:o,value:a,prev:r};r&&(r.next=d),r=d,n||(n=d),t.set(o,d)}}}}const my=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},Fb=(e,t)=>!!(e.preload&&!e.router.state.matches.some(n=>n.id===t)),a4=(e,t)=>{const n=e.router.routesById[t.routeId??""]??e.router.routeTree;!n.options.notFoundComponent&&e.router.options?.defaultNotFoundComponent&&(n.options.notFoundComponent=e.router.options.defaultNotFoundComponent),ds(n.options.notFoundComponent);const r=e.matches.find(i=>i.routeId===n.id);ds(r,"Could not find match for route: "+n.id),e.updateMatch(r.id,i=>({...i,status:"notFound",error:t,isFetching:!1})),t.routerCode==="BEFORE_LOAD"&&n.parentRoute&&(t.routeId=n.parentRoute.id,a4(e,t))},ul=(e,t,n)=>{if(!(!ba(n)&&!Qo(n))){if(ba(n)&&n.redirectHandled&&!n.options.reloadDocument)throw n;if(t){t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0;const r=ba(n)?"redirected":"notFound";e.updateMatch(t.id,i=>({...i,status:r,isFetching:!1,error:n})),Qo(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()}throw ba(n)?(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n),n):(a4(e,n),n)}},s4=(e,t)=>{const n=e.router.getMatch(t);return!!(!e.router.isServer&&n._nonReactive.dehydrated||e.router.isServer&&n.ssr===!1)},Pp=(e,t,n,r)=>{const{id:i,routeId:o}=e.matches[t],a=e.router.looseRoutesById[o];if(n instanceof Promise)throw n;n.routerCode=r,e.firstBadMatchIndex??=t,ul(e,e.router.getMatch(i),n);try{a.options.onError?.(n)}catch(l){n=l,ul(e,e.router.getMatch(i),n)}e.updateMatch(i,l=>(l._nonReactive.beforeLoadPromise?.resolve(),l._nonReactive.beforeLoadPromise=void 0,l._nonReactive.loadPromise?.resolve(),{...l,error:n,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}))},JJ=(e,t,n,r)=>{const i=e.router.getMatch(t),o=e.matches[n-1]?.id,a=o?e.router.getMatch(o):void 0;if(e.router.isShell()){i.ssr=t===xi;return}if(a?.ssr===!1){i.ssr=!1;return}const l=y=>y===!0&&a?.ssr==="data-only"?"data-only":y,d=e.router.options.defaultSsr??!0;if(r.options.ssr===void 0){i.ssr=l(d);return}if(typeof r.options.ssr!="function"){i.ssr=l(r.options.ssr);return}const{search:f,params:m}=i,h={search:kv(f,i.searchError),params:kv(m,i.paramsError),location:e.location,matches:e.matches.map(y=>({index:y.index,pathname:y.pathname,fullPath:y.fullPath,staticData:y.staticData,id:y.id,routeId:y.routeId,search:kv(y.search,y.searchError),params:kv(y.params,y.paramsError),ssr:y.ssr}))},v=r.options.ssr(h);if(yl(v))return v.then(y=>{i.ssr=l(y??d)});i.ssr=l(v??d)},l4=(e,t,n,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;const i=n.options.pendingMs??e.router.options.defaultPendingMs;if(!!(e.onReady&&!e.router.isServer&&!Fb(e,t)&&(n.options.loader||n.options.beforeLoad||d4(n))&&typeof i=="number"&&i!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent))){const a=setTimeout(()=>{my(e)},i);r._nonReactive.pendingTimeout=a}},QJ=(e,t,n)=>{const r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;l4(e,t,n,r);const i=()=>{const o=e.router.getMatch(t);o.preload&&(o.status==="redirected"||o.status==="notFound")&&ul(e,o,o.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(i):i()},eQ=(e,t,n,r)=>{const i=e.router.getMatch(t),o=i._nonReactive.loadPromise;i._nonReactive.loadPromise=Hd(()=>{o?.resolve()});const{paramsError:a,searchError:l}=i;a&&Pp(e,n,a,"PARSE_PARAMS"),l&&Pp(e,n,l,"VALIDATE_SEARCH"),l4(e,t,r,i);const d=new AbortController,f=e.matches[n-1]?.id,v={...(f?e.router.getMatch(f):void 0)?.context??e.router.options.context??void 0,...i.__routeContext};let y=!1;const x=()=>{y||(y=!0,e.updateMatch(t,N=>({...N,isFetching:"beforeLoad",fetchCount:N.fetchCount+1,abortController:d,context:v})))},S=()=>{i._nonReactive.beforeLoadPromise?.resolve(),i._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,N=>({...N,isFetching:!1}))};if(!r.options.beforeLoad){pm(()=>{x(),S()});return}i._nonReactive.beforeLoadPromise=Hd();const{search:C,params:k,cause:E}=i,j=Fb(e,t),I={search:C,abortController:d,params:k,preload:j,context:v,location:e.location,navigate:N=>e.router.navigate({...N,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:j?"preload":E,matches:e.matches,...e.router.options.additionalContext},A=N=>{if(N===void 0){pm(()=>{x(),S()});return}(ba(N)||Qo(N))&&(x(),Pp(e,n,N,"BEFORE_LOAD")),pm(()=>{x(),e.updateMatch(t,D=>({...D,__beforeLoadContext:N,context:{...D.context,...N}})),S()})};let T;try{if(T=r.options.beforeLoad(I),yl(T))return x(),T.catch(N=>{Pp(e,n,N,"BEFORE_LOAD")}).then(A)}catch(N){x(),Pp(e,n,N,"BEFORE_LOAD")}A(T)},tQ=(e,t)=>{const{id:n,routeId:r}=e.matches[t],i=e.router.looseRoutesById[r],o=()=>{if(e.router.isServer){const d=JJ(e,n,t,i);if(yl(d))return d.then(l)}return l()},a=()=>eQ(e,n,t,i),l=()=>{if(s4(e,n))return;const d=QJ(e,n,i);return yl(d)?d.then(a):a()};return o()},mm=(e,t,n)=>{const r=e.router.getMatch(t);if(!r||!n.options.head&&!n.options.scripts&&!n.options.headers)return;const i={matches:e.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([n.options.head?.(i),n.options.scripts?.(i),n.options.headers?.(i)]).then(([o,a,l])=>{const d=o?.meta,f=o?.links,m=o?.scripts,h=o?.styles;return{meta:d,links:f,headScripts:m,headers:l,scripts:a,styles:h}})},c4=(e,t,n,r)=>{const i=e.matchPromises[n-1],{params:o,loaderDeps:a,abortController:l,context:d,cause:f}=e.router.getMatch(t),m=Fb(e,t);return{params:o,deps:a,preload:!!m,parentMatchPromise:i,abortController:l,context:d,location:e.location,navigate:h=>e.router.navigate({...h,_fromLocation:e.location}),cause:m?"preload":f,route:r,...e.router.options.additionalContext}},KD=async(e,t,n,r)=>{try{const i=e.router.getMatch(t);try{(!e.router.isServer||i.ssr===!0)&&u4(r);const o=r.options.loader?.(c4(e,t,n,r)),a=r.options.loader&&yl(o);if((a||r._lazyPromise||r._componentsPromise||r.options.head||r.options.scripts||r.options.headers||i._nonReactive.minPendingPromise)&&e.updateMatch(t,h=>({...h,isFetching:"loader"})),r.options.loader){const h=a?await o:o;ul(e,e.router.getMatch(t),h),h!==void 0&&e.updateMatch(t,v=>({...v,loaderData:h}))}r._lazyPromise&&await r._lazyPromise;const d=mm(e,t,r),f=d?await d:void 0,m=i._nonReactive.minPendingPromise;m&&await m,r._componentsPromise&&await r._componentsPromise,e.updateMatch(t,h=>({...h,error:void 0,status:"success",isFetching:!1,updatedAt:Date.now(),...f}))}catch(o){let a=o;const l=i._nonReactive.minPendingPromise;l&&await l,Qo(o)&&await r.options.notFoundComponent?.preload?.(),ul(e,e.router.getMatch(t),o);try{r.options.onError?.(o)}catch(m){a=m,ul(e,e.router.getMatch(t),m)}const d=mm(e,t,r),f=d?await d:void 0;e.updateMatch(t,m=>({...m,error:a,status:"error",isFetching:!1,...f}))}}catch(i){const o=e.router.getMatch(t);if(o){const a=mm(e,t,r);if(a){const l=await a;e.updateMatch(t,d=>({...d,...l}))}o._nonReactive.loaderPromise=void 0}ul(e,o,i)}},nQ=async(e,t)=>{const{id:n,routeId:r}=e.matches[t];let i=!1,o=!1;const a=e.router.looseRoutesById[r];if(s4(e,n)){if(e.router.isServer){const f=mm(e,n,a);if(f){const m=await f;e.updateMatch(n,h=>({...h,...m}))}return e.router.getMatch(n)}}else{const f=e.router.getMatch(n);if(f._nonReactive.loaderPromise){if(f.status==="success"&&!e.sync&&!f.preload)return f;await f._nonReactive.loaderPromise;const m=e.router.getMatch(n);m.error&&ul(e,m,m.error)}else{const m=Date.now()-f.updatedAt,h=Fb(e,n),v=h?a.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:a.options.staleTime??e.router.options.defaultStaleTime??0,y=a.options.shouldReload,x=typeof y=="function"?y(c4(e,n,t,a)):y,S=!!h&&!e.router.state.matches.some(j=>j.id===n),C=e.router.getMatch(n);C._nonReactive.loaderPromise=Hd(),S!==C.preload&&e.updateMatch(n,j=>({...j,preload:S}));const{status:k,invalid:E}=C;if(i=k==="success"&&(E||(x??m>v)),!(h&&a.options.preload===!1))if(i&&!e.sync)o=!0,(async()=>{try{await KD(e,n,t,a);const j=e.router.getMatch(n);j._nonReactive.loaderPromise?.resolve(),j._nonReactive.loadPromise?.resolve(),j._nonReactive.loaderPromise=void 0}catch(j){ba(j)&&await e.router.navigate(j.options)}})();else if(k!=="success"||i&&e.sync)await KD(e,n,t,a);else{const j=mm(e,n,a);if(j){const I=await j;e.updateMatch(n,A=>({...A,...I}))}}}}const l=e.router.getMatch(n);o||(l._nonReactive.loaderPromise?.resolve(),l._nonReactive.loadPromise?.resolve()),clearTimeout(l._nonReactive.pendingTimeout),l._nonReactive.pendingTimeout=void 0,o||(l._nonReactive.loaderPromise=void 0),l._nonReactive.dehydrated=void 0;const d=o?l.isFetching:!1;return d!==l.isFetching||l.invalid!==!1?(e.updateMatch(n,f=>({...f,isFetching:d,invalid:!1})),e.router.getMatch(n)):l};async function GD(e){const t=Object.assign(e,{matchPromises:[]});!t.router.isServer&&t.router.state.matches.some(n=>n._forcePending)&&my(t);try{for(let i=0;i<t.matches.length;i++){const o=tQ(t,i);yl(o)&&await o}const n=t.firstBadMatchIndex??t.matches.length;for(let i=0;i<n;i++)t.matchPromises.push(nQ(t,i));await Promise.all(t.matchPromises);const r=my(t);yl(r)&&await r}catch(n){if(Qo(n)&&!t.preload){const r=my(t);throw yl(r)&&await r,n}if(ba(n))throw n}return t.matches}async function u4(e){if(!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(t=>{const{id:n,...r}=t.options;Object.assign(e.options,r),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0),!e._componentsLoaded&&e._componentsPromise===void 0){const t=()=>{const n=[];for(const r of f4){const i=e.options[r]?.preload;i&&n.push(i())}if(n.length)return Promise.all(n).then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0});e._componentsLoaded=!0,e._componentsPromise=void 0};e._componentsPromise=e._lazyPromise?e._lazyPromise.then(t):t()}return e._componentsPromise}function kv(e,t){return t?{status:"error",error:t}:{status:"success",value:e}}function d4(e){for(const t of f4)if(e.options[t]?.preload)return!0;return!1}const f4=["component","errorComponent","pendingComponent","notFoundComponent"];function rQ(e){return{input:({url:t})=>{for(const n of e)t=p4(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=m4(e[n],t);return t}}}function iQ(e){const t=py(e.basepath),n=`/${t}`,r=`${n}/`,i=e.caseSensitive?n:n.toLowerCase(),o=e.caseSensitive?r:r.toLowerCase();return{input:({url:a})=>{const l=e.caseSensitive?a.pathname:a.pathname.toLowerCase();return l===i?a.pathname="/":l.startsWith(o)&&(a.pathname=a.pathname.slice(n.length)),a},output:({url:a})=>(a.pathname=cs(["/",t,a.pathname]),a)}}function p4(e,t){const n=e?.input?.({url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function m4(e,t){const n=e?.output?.({url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function Ic(e){const t=e.resolvedLocation,n=e.location,r=t?.pathname!==n.pathname,i=t?.href!==n.href,o=t?.hash!==n.hash;return{fromLocation:t,toLocation:n,pathChanged:r,hrefChanged:i,hashChanged:o}}class oQ{constructor(t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=n=>n(),this.update=n=>{n.notFoundRoute&&console.warn("The notFoundRoute API is deprecated and will be removed in the next major version. See https://tanstack.com/router/v1/docs/framework/react/guide/not-found-errors#migrating-from-notfoundroute for more info.");const r=this.options,i=this.basepath??r?.basepath??"/",o=this.basepath===void 0,a=r?.rewrite;this.options={...r,...n},this.isServer=this.options.isServer??typeof document>"u",this.pathParamsDecodeCharMap=this.options.pathParamsAllowedCharacters?new Map(this.options.pathParamsAllowedCharacters.map(v=>[encodeURIComponent(v),v])):void 0,(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.isServer||(this.history=n4())),this.origin=this.options.origin,this.origin||(!this.isServer&&window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree&&(this.routeTree=this.options.routeTree,this.buildRouteTree()),!this.__store&&this.latestLocation&&(this.__store=new pC(sQ(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(v=>!["redirected"].includes(v.status))}}}),BJ(this));let l=!1;const d=this.options.basepath??"/",f=this.options.rewrite;if(o||i!==d||a!==f){this.basepath=d;const v=[];py(d)!==""&&v.push(iQ({basepath:d})),f&&v.push(f),this.rewrite=v.length===0?void 0:v.length===1?v[0]:rQ(v),this.history&&this.updateLatestLocation(),l=!0}l&&this.__store&&(this.__store.state={...this.state,location:this.latestLocation}),typeof window<"u"&&"CSS"in window&&typeof window.CSS?.supports=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const{routesById:n,routesByPath:r,flatRoutes:i}=zJ({routeTree:this.routeTree,initRoute:(a,l)=>{a.init({originalIndex:l})}});this.routesById=n,this.routesByPath=r,this.flatRoutes=i;const o=this.options.notFoundRoute;o&&(o.init({originalIndex:99999999999}),this.routesById[o.id]=o)},this.subscribe=(n,r)=>{const i={eventType:n,fn:r};return this.subscribers.add(i),()=>{this.subscribers.delete(i)}},this.emit=n=>{this.subscribers.forEach(r=>{r.eventType===n.type&&r.fn(n)})},this.parseLocation=(n,r)=>{const i=({href:d,state:f})=>{const m=new URL(d,this.origin),h=p4(this.rewrite,m),v=this.options.parseSearch(h.search),y=this.options.stringifySearch(v);h.search=y;const x=h.href.replace(h.origin,""),{pathname:S,hash:C}=h;return{href:x,publicHref:d,url:h.href,pathname:S,searchStr:y,search:xo(r?.search,v),hash:C.split("#").reverse()[0]??"",state:xo(r?.state,f)}},o=i(n),{__tempLocation:a,__tempKey:l}=o.state;if(a&&(!l||l===this.tempLocationKey)){const d=i(a);return d.state.key=o.state.key,d.state.__TSR_key=o.state.__TSR_key,delete d.state.__tempLocation,{...d,maskedLocation:o}}return o},this.resolvePathWithBase=(n,r)=>yJ({base:n,to:lE(r),trailingSlash:this.options.trailingSlash,parseCache:this.parsePathnameCache}),this.matchRoutes=(n,r,i)=>typeof n=="string"?this.matchRoutesInternal({pathname:n,search:r},i):this.matchRoutesInternal(n,r),this.parsePathnameCache=XJ(1e3),this.getMatchedRoutes=(n,r)=>lQ({pathname:n,routePathname:r,caseSensitive:this.options.caseSensitive,routesByPath:this.routesByPath,routesById:this.routesById,flatRoutes:this.flatRoutes,parseCache:this.parsePathnameCache}),this.cancelMatch=n=>{const r=this.getMatch(n);r&&(r.abortController.abort(),clearTimeout(r._nonReactive.pendingTimeout),r._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.state.pendingMatches?.forEach(n=>{this.cancelMatch(n.id)})},this.buildLocation=n=>{const r=(o={})=>{const a=o._fromLocation||this.latestLocation,l=this.matchRoutes(a,{_buildLocation:!0}),d=mC(l);o.from;const f=o.unsafeRelative==="path"?a.pathname:o.from??d.fullPath,m=this.resolvePathWithBase(f,"."),h=d.search,v={...d.params},y=o.to?this.resolvePathWithBase(m,`${o.to}`):this.resolvePathWithBase(m,"."),x=o.params===!1||o.params===null?{}:(o.params??!0)===!0?v:Object.assign(v,jc(o.params,v)),S=_v({path:y,params:x,parseCache:this.parsePathnameCache}).interpolatedPath,C=this.matchRoutes(S,void 0,{_buildLocation:!0}).map(H=>this.looseRoutesById[H.routeId]);if(Object.keys(x).length>0)for(const H of C){const ee=H.options.params?.stringify??H.options.stringifyParams;ee&&Object.assign(x,ee(x))}const k=_v({path:y,params:x,leaveWildcards:!1,leaveParams:n.leaveParams,decodeCharMap:this.pathParamsDecodeCharMap,parseCache:this.parsePathnameCache}).interpolatedPath;let E=h;if(n._includeValidateSearch&&this.options.search?.strict){const H={};C.forEach(ee=>{if(ee.options.validateSearch)try{Object.assign(H,vC(ee.options.validateSearch,{...H,...E}))}catch{}}),E=H}E=cQ({search:E,dest:o,destRoutes:C,_includeValidateSearch:n._includeValidateSearch}),E=xo(h,E);const j=this.options.stringifySearch(E),I=o.hash===!0?a.hash:o.hash?jc(o.hash,a.hash):void 0,A=I?`#${I}`:"";let T=o.state===!0?a.state:o.state?jc(o.state,a.state):{};T=xo(a.state,T);const N=`${k}${j}${A}`,D=new URL(N,this.origin),L=m4(this.rewrite,D);return{publicHref:L.pathname+L.search+L.hash,href:N,url:L.href,pathname:k,search:E,searchStr:j,state:T,hash:I??"",unmaskOnReload:o.unmaskOnReload}},i=(o={},a)=>{const l=r(o);let d=a?r(a):void 0;if(!d){let f={};const m=this.options.routeMasks?.find(h=>{const v=hC(l.pathname,{to:h.from,caseSensitive:!1,fuzzy:!1},this.parsePathnameCache);return v?(f=v,!0):!1});if(m){const{from:h,...v}=m;a={from:n.from,...v,params:f},d=r(a)}}return d&&(l.maskedLocation=d),l};return n.mask?i(n,{from:n.from,...n.mask}):i(n)},this.commitLocation=({viewTransition:n,ignoreBlocker:r,...i})=>{const o=()=>{const d=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];d.forEach(m=>{i.state[m]=this.latestLocation.state[m]});const f=Rc(i.state,this.latestLocation.state);return d.forEach(m=>{delete i.state[m]}),f},a=bl(this.latestLocation.href)===bl(i.href),l=this.commitLocationPromise;if(this.commitLocationPromise=Hd(()=>{l?.resolve()}),a&&o())this.load();else{let{maskedLocation:d,hashScrollIntoView:f,...m}=i;d&&(m={...d,state:{...d.state,__tempKey:void 0,__tempLocation:{...m,search:m.searchStr,state:{...m.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(m.unmaskOnReload??this.options.unmaskOnReload??!1)&&(m.state.__tempKey=this.tempLocationKey)),m.state.__hashScrollIntoViewOptions=f??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,this.history[i.replace?"replace":"push"](m.publicHref,m.state,{ignoreBlocker:r})}return this.resetNextScroll=i.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:r,hashScrollIntoView:i,viewTransition:o,ignoreBlocker:a,href:l,...d}={})=>{if(l){const m=this.history.location.state.__TSR_index,h=Im(l,{__TSR_index:n?m:m+1});d.to=h.pathname,d.search=this.options.parseSearch(h.search),d.hash=h.hash.slice(1)}const f=this.buildLocation({...d,_includeValidateSearch:!0});return this.commitLocation({...f,viewTransition:o,replace:n,resetScroll:r,hashScrollIntoView:i,ignoreBlocker:a})},this.navigate=({to:n,reloadDocument:r,href:i,...o})=>{if(!r&&i)try{new URL(`${i}`),r=!0}catch{}return r?(i||(i=this.buildLocation({to:n,...o}).url),o.replace?window.location.replace(i):window.location.href=i,Promise.resolve()):this.buildAndCommitLocation({...o,href:i,to:n,_isNavigate:!0})},this.beforeLoad=()=>{if(this.cancelMatches(),this.updateLatestLocation(),this.isServer){const r=this.buildLocation({to:this.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0}),i=o=>{try{return encodeURI(decodeURI(o))}catch{return o}};if(py(i(this.latestLocation.href))!==py(i(r.href))){let o=r.url;throw this.origin&&o.startsWith(this.origin)&&(o=o.replace(this.origin,"")||"/"),eu({href:o})}}const n=this.matchRoutes(this.latestLocation);this.__store.setState(r=>({...r,status:"pending",statusCode:200,isLoading:!0,location:this.latestLocation,pendingMatches:n,cachedMatches:r.cachedMatches.filter(i=>!n.some(o=>o.id===i.id))}))},this.load=async n=>{let r,i,o;for(o=new Promise(l=>{this.startTransition(async()=>{try{this.beforeLoad();const d=this.latestLocation,f=this.state.resolvedLocation;this.state.redirect||this.emit({type:"onBeforeNavigate",...Ic({resolvedLocation:f,location:d})}),this.emit({type:"onBeforeLoad",...Ic({resolvedLocation:f,location:d})}),await GD({router:this,sync:n?.sync,matches:this.state.pendingMatches,location:d,updateMatch:this.updateMatch,onReady:async()=>{this.startViewTransition(async()=>{let m,h,v;pm(()=>{this.__store.setState(y=>{const x=y.matches,S=y.pendingMatches||y.matches;return m=x.filter(C=>!S.some(k=>k.id===C.id)),h=S.filter(C=>!x.some(k=>k.id===C.id)),v=x.filter(C=>S.some(k=>k.id===C.id)),{...y,isLoading:!1,loadedAt:Date.now(),matches:S,pendingMatches:void 0,cachedMatches:[...y.cachedMatches,...m.filter(C=>C.status!=="error")]}}),this.clearExpiredCache()}),[[m,"onLeave"],[h,"onEnter"],[v,"onStay"]].forEach(([y,x])=>{y.forEach(S=>{this.looseRoutesById[S.routeId].options[x]?.(S)})})})}})}catch(d){ba(d)?(r=d,this.isServer||this.navigate({...r.options,replace:!0,ignoreBlocker:!0})):Qo(d)&&(i=d),this.__store.setState(f=>({...f,statusCode:r?r.status:i?404:f.matches.some(m=>m.status==="error")?500:200,redirect:r}))}this.latestLoadPromise===o&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),l()})}),this.latestLoadPromise=o,await o;this.latestLoadPromise&&o!==this.latestLoadPromise;)await this.latestLoadPromise;let a;this.hasNotFoundMatch()?a=404:this.__store.state.matches.some(l=>l.status==="error")&&(a=500),a!==void 0&&this.__store.setState(l=>({...l,statusCode:a}))},this.startViewTransition=n=>{const r=this.shouldViewTransition??this.options.defaultViewTransition;if(delete this.shouldViewTransition,r&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let i;if(typeof r=="object"&&this.isViewTransitionTypesSupported){const o=this.latestLocation,a=this.state.resolvedLocation,l=typeof r.types=="function"?r.types(Ic({resolvedLocation:a,location:o})):r.types;if(l===!1){n();return}i={update:n,types:l}}else i=n;document.startViewTransition(i)}else n()},this.updateMatch=(n,r)=>{const i=this.state.pendingMatches?.some(o=>o.id===n)?"pendingMatches":this.state.matches.some(o=>o.id===n)?"matches":this.state.cachedMatches.some(o=>o.id===n)?"cachedMatches":"";i&&this.__store.setState(o=>({...o,[i]:o[i]?.map(a=>a.id===n?r(a):a)}))},this.getMatch=n=>{const r=i=>i.id===n;return this.state.cachedMatches.find(r)??this.state.pendingMatches?.find(r)??this.state.matches.find(r)},this.invalidate=n=>{const r=i=>n?.filter?.(i)??!0?{...i,invalid:!0,...n?.forcePending||i.status==="error"?{status:"pending",error:void 0}:void 0}:i;return this.__store.setState(i=>({...i,matches:i.matches.map(r),cachedMatches:i.cachedMatches.map(r),pendingMatches:i.pendingMatches?.map(r)})),this.shouldViewTransition=!1,this.load({sync:n?.sync})},this.resolveRedirect=n=>{if(!n.options.href){const r=this.buildLocation(n.options);let i=r.url;this.origin&&i.startsWith(this.origin)&&(i=i.replace(this.origin,"")||"/"),n.options.href=r.href,n.headers.set("Location",i)}return n.headers.get("Location")||n.headers.set("Location",n.options.href),n},this.clearCache=n=>{const r=n?.filter;r!==void 0?this.__store.setState(i=>({...i,cachedMatches:i.cachedMatches.filter(o=>!r(o))})):this.__store.setState(i=>({...i,cachedMatches:[]}))},this.clearExpiredCache=()=>{const n=r=>{const i=this.looseRoutesById[r.routeId];if(!i.options.loader)return!0;const o=(r.preload?i.options.preloadGcTime??this.options.defaultPreloadGcTime:i.options.gcTime??this.options.defaultGcTime)??300*1e3;return r.status==="error"?!0:Date.now()-r.updatedAt>=o};this.clearCache({filter:n})},this.loadRouteChunk=u4,this.preloadRoute=async n=>{const r=this.buildLocation(n);let i=this.matchRoutes(r,{throwOnError:!0,preload:!0,dest:n});const o=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(l=>l.id)),a=new Set([...o,...this.state.cachedMatches.map(l=>l.id)]);pm(()=>{i.forEach(l=>{a.has(l.id)||this.__store.setState(d=>({...d,cachedMatches:[...d.cachedMatches,l]}))})});try{return i=await GD({router:this,matches:i,location:r,preload:!0,updateMatch:(l,d)=>{o.has(l)?i=i.map(f=>f.id===l?d(f):f):this.updateMatch(l,d)}}),i}catch(l){if(ba(l))return l.options.reloadDocument?void 0:await this.preloadRoute({...l.options,_fromLocation:r});Qo(l)||console.error(l);return}},this.matchRoute=(n,r)=>{const i={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},o=this.buildLocation(i);if(r?.pending&&this.state.status!=="pending")return!1;const l=(r?.pending===void 0?!this.state.isLoading:r.pending)?this.latestLocation:this.state.resolvedLocation||this.state.location,d=hC(l.pathname,{...r,to:o.pathname},this.parsePathnameCache);return!d||n.params&&!Rc(d,n.params,{partial:!0})?!1:d&&(r?.includeSearch??!0)?Rc(l.search,o.search,{partial:!0})?d:!1:d},this.hasNotFoundMatch=()=>this.__store.state.matches.some(n=>n.status==="notFound"||n.globalNotFound),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??ZJ,parseSearch:t.parseSearch??GJ}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.__store.state}get looseRoutesById(){return this.routesById}matchRoutesInternal(t,n){const{foundRoute:r,matchedRoutes:i,routeParams:o}=this.getMatchedRoutes(t.pathname,n?.dest?.to);let a=!1;(r?r.path!=="/"&&o["**"]:bl(t.pathname))&&(this.options.notFoundRoute?i.push(this.options.notFoundRoute):a=!0);const l=(()=>{if(a){if(this.options.notFoundMode!=="root")for(let m=i.length-1;m>=0;m--){const h=i[m];if(h.children)return h.id}return xi}})(),d=[],f=m=>m?.id?m.context??this.options.context??void 0:this.options.context??void 0;return i.forEach((m,h)=>{const v=d[h-1],[y,x,S]=(()=>{const G=v?.search??t.search,K=v?._strictSearch??void 0;try{const B=vC(m.options.validateSearch,{...G})??void 0;return[{...G,...B},{...K,...B},void 0]}catch(B){let q=B;if(B instanceof My||(q=new My(B.message,{cause:B})),n?.throwOnError)throw q;return[G,{},q]}})(),C=m.options.loaderDeps?.({search:y})??"",k=C?JSON.stringify(C):"",{interpolatedPath:E,usedParams:j}=_v({path:m.fullPath,params:o,decodeCharMap:this.pathParamsDecodeCharMap}),I=_v({path:m.id,params:o,leaveWildcards:!0,decodeCharMap:this.pathParamsDecodeCharMap,parseCache:this.parsePathnameCache}).interpolatedPath+k,A=this.getMatch(I),T=this.state.matches.find(G=>G.routeId===m.id),N=A?._strictParams??j;let D;if(!A){const G=m.options.params?.parse??m.options.parseParams;if(G)try{Object.assign(N,G(N))}catch(K){if(D=new aQ(K.message,{cause:K}),n?.throwOnError)throw D}}Object.assign(o,N);const L=T?"stay":"enter";let H;if(A)H={...A,cause:L,params:T?xo(T.params,o):o,_strictParams:N,search:xo(T?T.search:A.search,y),_strictSearch:x};else{const G=m.options.loader||m.options.beforeLoad||m.lazyFn||d4(m)?"pending":"success";H={id:I,index:h,routeId:m.id,params:T?xo(T.params,o):o,_strictParams:N,pathname:E,updatedAt:Date.now(),search:T?xo(T.search,y):y,_strictSearch:x,searchError:void 0,status:G,isFetching:!1,error:void 0,paramsError:D,__routeContext:void 0,_nonReactive:{loadPromise:Hd()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:L,loaderDeps:T?xo(T.loaderDeps,C):C,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:m.options.staticData||{},fullPath:m.fullPath}}n?.preload||(H.globalNotFound=l===m.id),H.searchError=S;const ee=f(v);H.context={...ee,...H.__routeContext,...H.__beforeLoadContext},d.push(H)}),d.forEach((m,h)=>{const v=this.looseRoutesById[m.routeId];if(!this.getMatch(m.id)&&n?._buildLocation!==!0){const x=d[h-1],S=f(x);if(v.options.context){const C={deps:m.loaderDeps,params:m.params,context:S??{},location:t,navigate:k=>this.navigate({...k,_fromLocation:t}),buildLocation:this.buildLocation,cause:m.cause,abortController:m.abortController,preload:!!m.preload,matches:d};m.__routeContext=v.options.context(C)??void 0}m.context={...S,...m.__routeContext,...m.__beforeLoadContext}}}),d}}class My extends Error{}class aQ extends Error{}function sQ(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function vC(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new My("Async validation not supported");if(n.issues)throw new My(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}function lQ({pathname:e,routePathname:t,caseSensitive:n,routesByPath:r,routesById:i,flatRoutes:o,parseCache:a}){let l={};const d=bl(e),f=y=>hC(d,{to:y.fullPath,caseSensitive:y.options?.caseSensitive??n,fuzzy:!0},a);let m=t!==void 0?r[t]:void 0;if(m)l=f(m);else{let y;for(const x of o){const S=f(x);if(S)if(x.path!=="/"&&S["**"])y||(y={foundRoute:x,routeParams:S});else{m=x,l=S;break}}!m&&y&&(m=y.foundRoute,l=y.routeParams)}let h=m||i[xi];const v=[h];for(;h.parentRoute;)h=h.parentRoute,v.push(h);return v.reverse(),{matchedRoutes:v,routeParams:l,foundRoute:m}}function cQ({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){const i=n.reduce((l,d)=>{const f=[];if("search"in d.options)d.options.search?.middlewares&&f.push(...d.options.search.middlewares);else if(d.options.preSearchFilters||d.options.postSearchFilters){const m=({search:h,next:v})=>{let y=h;"preSearchFilters"in d.options&&d.options.preSearchFilters&&(y=d.options.preSearchFilters.reduce((S,C)=>C(S),h));const x=v(y);return"postSearchFilters"in d.options&&d.options.postSearchFilters?d.options.postSearchFilters.reduce((S,C)=>C(S),x):x};f.push(m)}if(r&&d.options.validateSearch){const m=({search:h,next:v})=>{const y=v(h);try{return{...y,...vC(d.options.validateSearch,y)??void 0}}catch{return y}};f.push(m)}return l.concat(f)},[])??[],o=({search:l})=>t.search?t.search===!0?l:jc(t.search,l):{};i.push(o);const a=(l,d)=>{if(l>=i.length)return d;const f=i[l];return f({search:d,next:h=>a(l+1,h)})};return a(0,e)}const uQ="Error preloading route! ☝️";class h4{constructor(t){if(this.init=n=>{this.originalIndex=n.originalIndex;const r=this.options,i=!r?.path&&!r?.id;this.parentRoute=this.options.getParentRoute?.(),i?this._path=xi:this.parentRoute||ds(!1);let o=i?xi:r?.path;o&&o!=="/"&&(o=cE(o));const a=r?.id||o;let l=i?xi:cs([this.parentRoute.id===xi?"":this.parentRoute.id,a]);o===xi&&(o="/"),l!==xi&&(l=cs(["/",l]));const d=l===xi?"/":cs([this.parentRoute.fullPath,o]);this._path=o,this._id=l,this._fullPath=d,this._to=d},this.clone=n=>{this._path=n._path,this._id=n._id,this._fullPath=n._fullPath,this._to=n._to,this.options.getParentRoute=n.options.getParentRoute,this.children=n.children},this.addChildren=n=>this._addFileChildren(n),this._addFileChildren=n=>(Array.isArray(n)&&(this.children=n),typeof n=="object"&&n!==null&&(this.children=Object.values(n)),this),this._addFileTypes=()=>this,this.updateLoader=n=>(Object.assign(this.options,n),this),this.update=n=>(Object.assign(this.options,n),this),this.lazy=n=>(this.lazyFn=n,this),this.options=t||{},this.isRoot=!t?.getParentRoute,t?.id&&t?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}}class dQ extends h4{constructor(t){super(t)}}function uE(e){const t=e.errorComponent??Ub;return c.jsx(fQ,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?b.createElement(t,{error:n,reset:r}):e.children})}class fQ extends b.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromProps(t){return{resetKey:t.getResetKey()}}static getDerivedStateFromError(t){return{error:t}}reset(){this.setState({error:null})}componentDidUpdate(t,n){n.error&&n.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(t,n){this.props.onCatch&&this.props.onCatch(t,n)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}}function Ub({error:e}){const[t,n]=b.useState(!1);return c.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[c.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),c.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>n(r=>!r),children:t?"Hide Error":"Show Error"})]}),c.jsx("div",{style:{height:".25rem"}}),t?c.jsx("div",{children:c.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?c.jsx("code",{children:e.message}):null})}):null]})}function pQ({children:e,fallback:t=null}){return mQ()?c.jsx(J.Fragment,{children:e}):c.jsx(J.Fragment,{children:t})}function mQ(){return J.useSyncExternalStore(hQ,()=>!0,()=>!1)}function hQ(){return()=>{}}var x_={exports:{}},w_={},S_={exports:{}},__={};var ZD;function gQ(){if(ZD)return __;ZD=1;var e=nh();function t(h,v){return h===v&&(h!==0||1/h===1/v)||h!==h&&v!==v}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,o=e.useLayoutEffect,a=e.useDebugValue;function l(h,v){var y=v(),x=r({inst:{value:y,getSnapshot:v}}),S=x[0].inst,C=x[1];return o(function(){S.value=y,S.getSnapshot=v,d(S)&&C({inst:S})},[h,y,v]),i(function(){return d(S)&&C({inst:S}),h(function(){d(S)&&C({inst:S})})},[h]),a(y),y}function d(h){var v=h.getSnapshot;h=h.value;try{var y=v();return!n(h,y)}catch{return!0}}function f(h,v){return v()}var m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:l;return __.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m,__}var YD;function vQ(){return YD||(YD=1,S_.exports=gQ()),S_.exports}var WD;function yQ(){if(WD)return w_;WD=1;var e=nh(),t=vQ();function n(f,m){return f===m&&(f!==0||1/f===1/m)||f!==f&&m!==m}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,o=e.useRef,a=e.useEffect,l=e.useMemo,d=e.useDebugValue;return w_.useSyncExternalStoreWithSelector=function(f,m,h,v,y){var x=o(null);if(x.current===null){var S={hasValue:!1,value:null};x.current=S}else S=x.current;x=l(function(){function k(T){if(!E){if(E=!0,j=T,T=v(T),y!==void 0&&S.hasValue){var N=S.value;if(y(N,T))return I=N}return I=T}if(N=I,r(j,T))return N;var D=v(T);return y!==void 0&&y(N,D)?(j=T,N):(j=T,I=D)}var E=!1,j,I,A=h===void 0?null:h;return[function(){return k(m())},A===null?void 0:function(){return k(A())}]},[m,h,v,y]);var C=i(f,x[0],x[1]);return a(function(){S.hasValue=!0,S.value=C},[C]),d(C),C},w_}var XD;function bQ(){return XD||(XD=1,x_.exports=yQ()),x_.exports}var xQ=bQ();function wQ(e,t=n=>n){return xQ.useSyncExternalStoreWithSelector(e.subscribe,()=>e.state,()=>e.state,t,SQ)}function SQ(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[r,i]of e)if(!t.has(r)||!Object.is(i,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();const n=JD(e);if(n.length!==JD(t).length)return!1;for(let r=0;r<n.length;r++)if(!Object.prototype.hasOwnProperty.call(t,n[r])||!Object.is(e[n[r]],t[n[r]]))return!1;return!0}function JD(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}const C_=b.createContext(null);function g4(){return typeof document>"u"?C_:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=C_,C_)}function _n(e){const t=b.useContext(g4());return e?.warn,t}function Jr(e){const t=_n({warn:e?.router===void 0}),n=e?.router||t,r=b.useRef(void 0);return wQ(n.__store,i=>{if(e?.select){if(e.structuralSharing??n.options.defaultStructuralSharing){const o=xo(r.current,e.select(i));return r.current=o,o}return e.select(i)}return i})}const Vb=b.createContext(void 0),_Q=b.createContext(void 0);function ea(e){const t=b.useContext(e.from?_Q:Vb);return Jr({select:r=>{const i=r.matches.find(o=>e.from?e.from===o.routeId:o.id===t);if(ds(!((e.shouldThrow??!0)&&!i),`Could not find ${e.from?`an active match from "${e.from}"`:"a nearest match!"}`),i!==void 0)return e.select?e.select(i):i},structuralSharing:e.structuralSharing})}function yf(e){return ea({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function dE(e){const{select:t,...n}=e;return ea({...n,select:r=>t?t(r.loaderDeps):r.loaderDeps})}function nt(e){return ea({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{const n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function Nr(e){return ea({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function Cn(e){const t=_n();return b.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function Tc(e){const t=_n(),n=Cn(),r=b.useRef(null);return b.useEffect(()=>{r.current!==e&&(n(e),r.current=e)},[t,e,n]),null}var k_={exports:{}},Ar={};var QD;function CQ(){if(QD)return Ar;QD=1;var e=nh();function t(d){var f="https://react.dev/errors/"+d;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)f+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+d+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},i=Symbol.for("react.portal");function o(d,f,m){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:h==null?null:""+h,children:d,containerInfo:f,implementation:m}}var a=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(d,f){if(d==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return Ar.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Ar.createPortal=function(d,f){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(t(299));return o(d,f,null,m)},Ar.flushSync=function(d){var f=a.T,m=r.p;try{if(a.T=null,r.p=2,d)return d()}finally{a.T=f,r.p=m,r.d.f()}},Ar.preconnect=function(d,f){typeof d=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,r.d.C(d,f))},Ar.prefetchDNS=function(d){typeof d=="string"&&r.d.D(d)},Ar.preinit=function(d,f){if(typeof d=="string"&&f&&typeof f.as=="string"){var m=f.as,h=l(m,f.crossOrigin),v=typeof f.integrity=="string"?f.integrity:void 0,y=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;m==="style"?r.d.S(d,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:h,integrity:v,fetchPriority:y}):m==="script"&&r.d.X(d,{crossOrigin:h,integrity:v,fetchPriority:y,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},Ar.preinitModule=function(d,f){if(typeof d=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var m=l(f.as,f.crossOrigin);r.d.M(d,{crossOrigin:m,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&r.d.M(d)},Ar.preload=function(d,f){if(typeof d=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var m=f.as,h=l(m,f.crossOrigin);r.d.L(d,m,{crossOrigin:h,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},Ar.preloadModule=function(d,f){if(typeof d=="string")if(f){var m=l(f.as,f.crossOrigin);r.d.m(d,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:m,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else r.d.m(d)},Ar.requestFormReset=function(d){r.d.r(d)},Ar.unstable_batchedUpdates=function(d,f){return d(f)},Ar.useFormState=function(d,f,m){return a.H.useFormState(d,f,m)},Ar.useFormStatus=function(){return a.H.useHostTransitionStatus()},Ar.version="19.2.4",Ar}var e$;function v4(){if(e$)return k_.exports;e$=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),k_.exports=CQ(),k_.exports}var bf=v4();const fE=hf(bf),Ev=typeof window<"u"?b.useLayoutEffect:b.useEffect;function E_(e){const t=b.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function kQ(e,t,n={},r={}){b.useEffect(()=>{if(!e.current||r.disabled||typeof IntersectionObserver!="function")return;const i=new IntersectionObserver(([o])=>{t(o)},n);return i.observe(e.current),()=>{i.disconnect()}},[t,n,r.disabled,e])}function EQ(e){const t=b.useRef(null);return b.useImperativeHandle(e,()=>t.current,[]),t}function jQ(e,t){const n=_n(),[r,i]=b.useState(!1),o=b.useRef(!1),a=EQ(t),{activeProps:l,inactiveProps:d,activeOptions:f,to:m,preload:h,preloadDelay:v,hashScrollIntoView:y,replace:x,startTransition:S,resetScroll:C,viewTransition:k,children:E,target:j,disabled:I,style:A,className:T,onClick:N,onFocus:D,onMouseEnter:L,onMouseLeave:H,onTouchStart:ee,ignoreBlocker:G,params:K,search:B,hash:q,state:z,mask:W,reloadDocument:F,unsafeRelative:ne,from:$,_fromLocation:P,...V}=e,O=Jr({select:se=>se.location.search,structuralSharing:!0}),X=e.from,de=b.useMemo(()=>({...e,from:X}),[n,O,X,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),ge=b.useMemo(()=>n.buildLocation({...de}),[n,de]),Q=b.useMemo(()=>{if(I)return;let se=ge.maskedLocation?ge.maskedLocation.url:ge.url,Ce=!1;return n.origin&&(se.startsWith(n.origin)?se=n.history.createHref(se.replace(n.origin,""))||"/":Ce=!0),{href:se,external:Ce}},[I,ge.maskedLocation,ge.url,n.origin,n.history]),ve=b.useMemo(()=>{if(Q?.external)return Q.href;try{return new URL(m),m}catch{}},[m,Q]),xe=e.reloadDocument||ve?!1:h??n.options.defaultPreload,Ee=v??n.options.defaultPreloadDelay??0,Pe=Jr({select:se=>{if(ve)return!1;if(f?.exact){if(!gJ(se.location.pathname,ge.pathname,n.basepath))return!1}else{const Ce=Dy(se.location.pathname,n.basepath),oe=Dy(ge.pathname,n.basepath);if(!(Ce.startsWith(oe)&&(Ce.length===oe.length||Ce[oe.length]==="/")))return!1}return(f?.includeSearch??!0)&&!Rc(se.location.search,ge.search,{partial:!f?.exact,ignoreUndefined:!f?.explicitUndefined})?!1:f?.includeHash?se.location.hash===ge.hash:!0}}),Fe=b.useCallback(()=>{n.preloadRoute({...de}).catch(se=>{console.warn(se),console.warn(uQ)})},[n,de]),pt=b.useCallback(se=>{se?.isIntersecting&&Fe()},[Fe]);kQ(a,pt,AQ,{disabled:!!I||xe!=="viewport"}),b.useEffect(()=>{o.current||!I&&xe==="render"&&(Fe(),o.current=!0)},[I,Fe,xe]);const dt=se=>{const Ce=se.currentTarget.target,oe=j!==void 0?j:Ce;if(!I&&!OQ(se)&&!se.defaultPrevented&&(!oe||oe==="_self")&&se.button===0){se.preventDefault(),bf.flushSync(()=>{i(!0)});const U=n.subscribe("onResolved",()=>{U(),i(!1)});n.navigate({...de,replace:x,resetScroll:C,hashScrollIntoView:y,startTransition:S,viewTransition:k,ignoreBlocker:G})}};if(ve)return{...V,ref:a,href:ve,...E&&{children:E},...j&&{target:j},...I&&{disabled:I},...A&&{style:A},...T&&{className:T},...N&&{onClick:N},...D&&{onFocus:D},...L&&{onMouseEnter:L},...H&&{onMouseLeave:H},...ee&&{onTouchStart:ee}};const tt=se=>{I||xe&&Fe()},Vt=tt,mn=se=>{if(!(I||!xe))if(!Ee)Fe();else{const Ce=se.target;if(Mp.has(Ce))return;const oe=setTimeout(()=>{Mp.delete(Ce),Fe()},Ee);Mp.set(Ce,oe)}},qn=se=>{if(I||!xe||!Ee)return;const Ce=se.target,oe=Mp.get(Ce);oe&&(clearTimeout(oe),Mp.delete(Ce))},tn=Pe?jc(l,{})??RQ:j_,Pn=Pe?j_:jc(d,{})??j_,Z=[T,tn.className,Pn.className].filter(Boolean).join(" "),re=(A||tn.style||Pn.style)&&{...A,...tn.style,...Pn.style};return{...V,...tn,...Pn,href:Q?.href,ref:a,onClick:zp([N,dt]),onFocus:zp([D,tt]),onMouseEnter:zp([L,mn]),onMouseLeave:zp([H,qn]),onTouchStart:zp([ee,Vt]),disabled:!!I,target:j,...re&&{style:re},...Z&&{className:Z},...I&&IQ,...Pe&&TQ,...r&&NQ}}const j_={},RQ={className:"active"},IQ={role:"link","aria-disabled":!0},TQ={"data-status":"active","aria-current":"page"},NQ={"data-transitioning":"transitioning"},Mp=new WeakMap,AQ={rootMargin:"100px"},zp=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}},Ye=b.forwardRef((e,t)=>{const{_asChild:n,...r}=e,{type:i,ref:o,...a}=jQ(r,t),l=typeof r.children=="function"?r.children({isActive:a["data-status"]==="active"}):r.children;return n===void 0&&delete a.disabled,b.createElement(n||"a",{...a,ref:o},l)});function OQ(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}class DQ extends h4{constructor(t){super(t),this.useMatch=n=>ea({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>ea({...n,from:this.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>Nr({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>nt({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>dE({...n,from:this.id}),this.useLoaderData=n=>yf({...n,from:this.id}),this.useNavigate=()=>Cn({from:this.fullPath}),this.Link=J.forwardRef((n,r)=>c.jsx(Ye,{ref:r,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function Qe(e){return new DQ(e)}function $Q(){return e=>MQ(e)}class PQ extends dQ{constructor(t){super(t),this.useMatch=n=>ea({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>ea({...n,from:this.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>Nr({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>nt({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>dE({...n,from:this.id}),this.useLoaderData=n=>yf({...n,from:this.id}),this.useNavigate=()=>Cn({from:this.fullPath}),this.Link=J.forwardRef((n,r)=>c.jsx(Ye,{ref:r,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function MQ(e){return new PQ(e)}function t$(e){return typeof e=="object"?new n$(e,{silent:!0}).createRoute(e):new n$(e,{silent:!0}).createRoute}class n${constructor(t,n){this.path=t,this.createRoute=r=>{this.silent;const i=Qe(r);return i.isRoot=!1,i},this.silent=n?.silent}}class yC{constructor(t){this.useMatch=n=>ea({select:n?.select,from:this.options.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>ea({from:this.options.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>Nr({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useParams=n=>nt({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useLoaderDeps=n=>dE({...n,from:this.options.id}),this.useLoaderData=n=>yf({...n,from:this.options.id}),this.useNavigate=()=>{const n=_n();return Cn({from:n.routesById[this.options.id].fullPath})},this.options=t,this.$$typeof=Symbol.for("react.memo")}}function HPe(e){return t=>new yC({id:e,...t})}function r$(e){return typeof e=="object"?new yC(e):t=>new yC({id:e,...t})}function y4(e,t){let n,r,i,o;const a=()=>(n||(n=e().then(d=>{n=void 0,r=d[t??"default"]}).catch(d=>{if(i=d,mJ(i)&&i instanceof Error&&typeof window<"u"&&typeof sessionStorage<"u"){const f=`tanstack_router_reload:${i.message}`;sessionStorage.getItem(f)||(sessionStorage.setItem(f,"1"),o=!0)}})),n),l=function(f){if(o)throw window.location.reload(),new Promise(()=>{});if(i)throw i;if(!r)throw a();return b.createElement(r,f)};return l.preload=a,l}function zQ(){const e=_n(),t=b.useRef({router:e,mounted:!1}),[n,r]=b.useState(!1),{hasPendingMatches:i,isLoading:o}=Jr({select:h=>({isLoading:h.isLoading,hasPendingMatches:h.matches.some(v=>v.status==="pending")}),structuralSharing:!0}),a=E_(o),l=o||n||i,d=E_(l),f=o||i,m=E_(f);return e.startTransition=h=>{r(!0),b.startTransition(()=>{h(),r(!1)})},b.useEffect(()=>{const h=e.history.subscribe(e.load),v=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return bl(e.latestLocation.href)!==bl(v.href)&&e.commitLocation({...v,replace:!0}),()=>{h()}},[e,e.history]),Ev(()=>{if(typeof window<"u"&&e.ssr||t.current.router===e&&t.current.mounted)return;t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(v){console.error(v)}})()},[e]),Ev(()=>{a&&!o&&e.emit({type:"onLoad",...Ic(e.state)})},[a,e,o]),Ev(()=>{m&&!f&&e.emit({type:"onBeforeRouteMount",...Ic(e.state)})},[f,m,e]),Ev(()=>{d&&!l&&(e.emit({type:"onResolved",...Ic(e.state)}),e.__store.setState(h=>({...h,status:"idle",resolvedLocation:h.location})),HJ(e))},[l,d,e]),null}function LQ(e){const t=Jr({select:n=>`not-found-${n.location.pathname}-${n.status}`});return c.jsx(uE,{getResetKey:()=>t,onCatch:(n,r)=>{if(Qo(n))e.onCatch?.(n,r);else throw n},errorComponent:({error:n})=>{if(Qo(n))return e.fallback?.(n);throw n},children:e.children})}function FQ(){return c.jsx("p",{children:"Not Found"})}function yd(e){return c.jsx(c.Fragment,{children:e.children})}function b4(e,t,n){return t.options.notFoundComponent?c.jsx(t.options.notFoundComponent,{data:n}):e.options.defaultNotFoundComponent?c.jsx(e.options.defaultNotFoundComponent,{data:n}):c.jsx(FQ,{})}function UQ({children:e}){const t=_n();return t.isServer?c.jsx("script",{nonce:t.options.ssr?.nonce,className:"$tsr",dangerouslySetInnerHTML:{__html:[e].filter(Boolean).join(`
10
+ `)+";$_TSR.c()"}}):null}function VQ(){const e=_n();if(!e.isScrollRestoring||!e.isServer||typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))return null;const n=(e.options.getScrollRestorationKey||gC)(e.latestLocation),r=n!==gC(e.latestLocation)?n:void 0,i={storageKey:$y,shouldScrollRestoration:!0};return r&&(i.key=r),c.jsx(UQ,{children:`(${o4.toString()})(${JSON.stringify(i)})`})}const x4=b.memo(function({matchId:t}){const n=_n(),r=Jr({select:k=>{const E=k.matches.find(j=>j.id===t);return ds(E),{routeId:E.routeId,ssr:E.ssr,_displayPending:E._displayPending}},structuralSharing:!0}),i=n.routesById[r.routeId],o=i.options.pendingComponent??n.options.defaultPendingComponent,a=o?c.jsx(o,{}):null,l=i.options.errorComponent??n.options.defaultErrorComponent,d=i.options.onCatch??n.options.defaultOnCatch,f=i.isRoot?i.options.notFoundComponent??n.options.notFoundRoute?.options.component:i.options.notFoundComponent,m=r.ssr===!1||r.ssr==="data-only",h=(!i.isRoot||i.options.wrapInSuspense||m)&&(i.options.wrapInSuspense??o??(i.options.errorComponent?.preload||m))?b.Suspense:yd,v=l?uE:yd,y=f?LQ:yd,x=Jr({select:k=>k.loadedAt}),S=Jr({select:k=>{const E=k.matches.findIndex(j=>j.id===t);return k.matches[E-1]?.routeId}}),C=i.isRoot?i.options.shellComponent??yd:yd;return c.jsxs(C,{children:[c.jsx(Vb.Provider,{value:t,children:c.jsx(h,{fallback:a,children:c.jsx(v,{getResetKey:()=>x,errorComponent:l||Ub,onCatch:(k,E)=>{if(Qo(k))throw k;d?.(k,E)},children:c.jsx(y,{fallback:k=>{if(!f||k.routeId&&k.routeId!==r.routeId||!k.routeId&&!i.isRoot)throw k;return b.createElement(f,k)},children:m||r._displayPending?c.jsx(pQ,{fallback:a,children:c.jsx(i$,{matchId:t})}):c.jsx(i$,{matchId:t})})})})}),S===xi&&n.options.scrollRestoration?c.jsxs(c.Fragment,{children:[c.jsx(BQ,{}),c.jsx(VQ,{})]}):null]})});function BQ(){const e=_n(),t=b.useRef(void 0);return c.jsx("script",{suppressHydrationWarning:!0,ref:n=>{n&&(t.current===void 0||t.current.href!==e.latestLocation.href)&&(e.emit({type:"onRendered",...Ic(e.state)}),t.current=e.latestLocation)}},e.latestLocation.state.__TSR_key)}const i$=b.memo(function({matchId:t}){const n=_n(),{match:r,key:i,routeId:o}=Jr({select:d=>{const f=d.matches.find(x=>x.id===t),m=f.routeId,v=(n.routesById[m].options.remountDeps??n.options.defaultRemountDeps)?.({routeId:m,loaderDeps:f.loaderDeps,params:f._strictParams,search:f._strictSearch});return{key:v?JSON.stringify(v):void 0,routeId:m,match:{id:f.id,status:f.status,error:f.error,_forcePending:f._forcePending,_displayPending:f._displayPending}}},structuralSharing:!0}),a=n.routesById[o],l=b.useMemo(()=>{const d=a.options.component??n.options.defaultComponent;return d?c.jsx(d,{},i):c.jsx(Nl,{})},[i,a.options.component,n.options.defaultComponent]);if(r._displayPending)throw n.getMatch(r.id)?._nonReactive.displayPendingPromise;if(r._forcePending)throw n.getMatch(r.id)?._nonReactive.minPendingPromise;if(r.status==="pending"){const d=a.options.pendingMinMs??n.options.defaultPendingMinMs;if(d){const f=n.getMatch(r.id);if(f&&!f._nonReactive.minPendingPromise&&!n.isServer){const m=Hd();f._nonReactive.minPendingPromise=m,setTimeout(()=>{m.resolve(),f._nonReactive.minPendingPromise=void 0},d)}}throw n.getMatch(r.id)?._nonReactive.loadPromise}if(r.status==="notFound")return ds(Qo(r.error)),b4(n,a,r.error);if(r.status==="redirected")throw ds(ba(r.error)),n.getMatch(r.id)?._nonReactive.loadPromise;if(r.status==="error"){if(n.isServer){const d=(a.options.errorComponent??n.options.defaultErrorComponent)||Ub;return c.jsx(d,{error:r.error,reset:void 0,info:{componentStack:""}})}throw r.error}return l}),Nl=b.memo(function(){const t=_n(),n=b.useContext(Vb),r=Jr({select:f=>f.matches.find(m=>m.id===n)?.routeId}),i=t.routesById[r],o=Jr({select:f=>{const h=f.matches.find(v=>v.id===n);return ds(h),h.globalNotFound}}),a=Jr({select:f=>{const m=f.matches,h=m.findIndex(v=>v.id===n);return m[h+1]?.id}}),l=t.options.defaultPendingComponent?c.jsx(t.options.defaultPendingComponent,{}):null;if(o)return b4(t,i,void 0);if(!a)return null;const d=c.jsx(x4,{matchId:a});return n===xi?c.jsx(b.Suspense,{fallback:l,children:d}):d});function HQ(){const e=_n(),n=e.routesById[xi].options.pendingComponent??e.options.defaultPendingComponent,r=n?c.jsx(n,{}):null,i=e.isServer||typeof document<"u"&&e.ssr?yd:b.Suspense,o=c.jsxs(i,{fallback:r,children:[!e.isServer&&c.jsx(zQ,{}),c.jsx(qQ,{})]});return e.options.InnerWrap?c.jsx(e.options.InnerWrap,{children:o}):o}function qQ(){const e=_n(),t=Jr({select:i=>i.matches[0]?.id}),n=Jr({select:i=>i.loadedAt}),r=t?c.jsx(x4,{matchId:t}):null;return c.jsx(Vb.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:c.jsx(uE,{getResetKey:()=>n,errorComponent:Ub,onCatch:i=>{i.message||i.toString()},children:r})})}const KQ=e=>new GQ(e);class GQ extends oQ{constructor(t){super(t)}}typeof globalThis<"u"?(globalThis.createFileRoute=t$,globalThis.createLazyFileRoute=r$):typeof window<"u"&&(window.createFileRoute=t$,window.createLazyFileRoute=r$);function ZQ({router:e,children:t,...n}){Object.keys(n).length>0&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const r=g4(),i=c.jsx(r.Provider,{value:e,children:t});return e.options.Wrap?c.jsx(e.options.Wrap,{children:i}):i}function YQ({router:e,...t}){return c.jsx(ZQ,{router:e,...t,children:c.jsx(HQ,{})})}function Bb(e){return ea({...e,select:t=>e.select?e.select(t.context):t.context})}function WQ(e){return Jr({select:t=>t.location})}function XQ(){const[e,t]=b.useState(Ct.getAllConnections());return b.useEffect(()=>Ct.listenToAllEntities((n,r)=>{t({...e,[r]:n})}),[e]),e}function tu(){const e=Ct.calculateIdFromEntity(Mn),[t,n]=b.useState(Ct.getConnectionById(Mn));return b.useEffect(()=>Ct.listenToEntity(e,n),[e]),t}function Al(){return tu()}function _s(e){const t=Mn,{clusterId:n,instanceId:r}=nt({strict:!1}),[i,o]=b.useState(Ct.getConnectionById(t));return b.useEffect(()=>Ct.listenToEntity(t,o),[t]),i}function w4(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=w4(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function S4(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=w4(e))&&(r&&(r+=" "),r+=t);return r}const o$=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,xr=S4,Hb=(e,t)=>n=>{var r;if(t?.variants==null)return xr(e,n?.class,n?.className);const{variants:i,defaultVariants:o}=t,a=Object.keys(i).map(f=>{const m=n?.[f],h=o?.[f];if(m===null)return null;const v=o$(m)||o$(h);return i[f][v]}),l=n&&Object.entries(n).reduce((f,m)=>{let[h,v]=m;return v===void 0||(f[h]=v),f},{}),d=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((f,m)=>{let{class:h,className:v,...y}=m;return Object.entries(y).every(x=>{let[S,C]=x;return Array.isArray(C)?C.includes({...o,...l}[S]):{...o,...l}[S]===C})?[...f,h,v]:f},[]);return xr(e,a,d,n?.class,n?.className)},Lp="hover:-translate-y-1 transition duration-200",Fp="border bg-transparent border-2 text-white shadow-xs hover:bg-grey-700/40",JQ=Hb(`inline-flex
11
+ items-center
12
+ justify-center
13
+ gap-2
14
+ whitespace-nowrap
15
+ rounded-lg
16
+ text-sm
17
+ transition-[color,box-shadow]
18
+ disabled:pointer-events-none
19
+ disabled:opacity-50
20
+ [&_svg]:pointer-events-none
21
+ [&_svg:not([class*='size-'])]:size-4
22
+ [&_svg]:shrink-0
23
+ ring-ring/10
24
+ dark:ring-ring/20
25
+ dark:outline-ring/40
26
+ outline-ring/50
27
+ focus-visible:ring-1
28
+ focus-visible:outline-1
29
+ focus-visible:ring-purple-200
30
+ aria-invalid:focus-visible:ring-0`,{variants:{variant:{default:"bg-primary text-primary-foreground shadow-sm hover:bg-primary/90",submit:"bg-gradient-to-r from-blue-100 from-0% to-blue to-100% hover:bg-gradient-to-r hover:from-blue text-primary-foreground shadow-sm",destructive:"bg-destructive shadow-xs hover:bg-destructive/90",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-muted-foreground",destructiveGhost:"hover:bg-accent hover:text-red",link:"text-primary underline-offset-4 hover:underline",positive:"bg-green text-white shadow-xs hover:bg-green/90",warning:"bg-yellow text-white shadow-xs hover:bg-yellow/90",outline:`${Fp} ${Lp}`,ghostOutline:`${Fp} ${Lp} border-none`,positiveOutline:`${Fp} ${Lp} border-green`,destructiveOutline:`${Fp} ${Lp} border-destructive`,defaultOutline:`${Fp} ${Lp} border-primary`},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4 text-md",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}}),QQ=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},eee=(e,t)=>({classGroupId:e,validator:t}),_4=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),zy="-",a$=[],tee="arbitrary..",nee=e=>{const t=iee(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return ree(a);const l=a.split(zy),d=l[0]===""&&l.length>1?1:0;return C4(l,d,t)},getConflictingClassGroupIds:(a,l)=>{if(l){const d=r[a],f=n[a];return d?f?QQ(f,d):d:f||a$}return n[a]||a$}}},C4=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const i=e[t],o=n.nextPart.get(i);if(o){const f=C4(e,t+1,o);if(f)return f}const a=n.validators;if(a===null)return;const l=t===0?e.join(zy):e.slice(t).join(zy),d=a.length;for(let f=0;f<d;f++){const m=a[f];if(m.validator(l))return m.classGroupId}},ree=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?tee+r:void 0})(),iee=e=>{const{theme:t,classGroups:n}=e;return oee(n,t)},oee=(e,t)=>{const n=_4();for(const r in e){const i=e[r];pE(i,n,r,t)}return n},pE=(e,t,n,r)=>{const i=e.length;for(let o=0;o<i;o++){const a=e[o];aee(a,t,n,r)}},aee=(e,t,n,r)=>{if(typeof e=="string"){see(e,t,n);return}if(typeof e=="function"){lee(e,t,n,r);return}cee(e,t,n,r)},see=(e,t,n)=>{const r=e===""?t:k4(t,e);r.classGroupId=n},lee=(e,t,n,r)=>{if(uee(e)){pE(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(eee(n,e))},cee=(e,t,n,r)=>{const i=Object.entries(e),o=i.length;for(let a=0;a<o;a++){const[l,d]=i[a];pE(d,k4(t,l),n,r)}},k4=(e,t)=>{let n=e;const r=t.split(zy),i=r.length;for(let o=0;o<i;o++){const a=r[o];let l=n.nextPart.get(a);l||(l=_4(),n.nextPart.set(a,l)),n=l}return n},uee=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,dee=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const i=(o,a)=>{n[o]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(o){let a=n[o];if(a!==void 0)return a;if((a=r[o])!==void 0)return i(o,a),a},set(o,a){o in n?n[o]=a:i(o,a)}}},bC="!",s$=":",fee=[],l$=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),pee=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=i=>{const o=[];let a=0,l=0,d=0,f;const m=i.length;for(let S=0;S<m;S++){const C=i[S];if(a===0&&l===0){if(C===s$){o.push(i.slice(d,S)),d=S+1;continue}if(C==="/"){f=S;continue}}C==="["?a++:C==="]"?a--:C==="("?l++:C===")"&&l--}const h=o.length===0?i:i.slice(d);let v=h,y=!1;h.endsWith(bC)?(v=h.slice(0,-1),y=!0):h.startsWith(bC)&&(v=h.slice(1),y=!0);const x=f&&f>d?f-d:void 0;return l$(o,y,v,x)};if(t){const i=t+s$,o=r;r=a=>a.startsWith(i)?o(a.slice(i.length)):l$(fee,!1,a,void 0,!0)}if(n){const i=r;r=o=>n({className:o,parseClassName:i})}return r},mee=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let i=[];for(let o=0;o<n.length;o++){const a=n[o],l=a[0]==="[",d=t.has(a);l||d?(i.length>0&&(i.sort(),r.push(...i),i=[]),r.push(a)):i.push(a)}return i.length>0&&(i.sort(),r.push(...i)),r}},hee=e=>({cache:dee(e.cacheSize),parseClassName:pee(e),sortModifiers:mee(e),...nee(e)}),gee=/\s+/,vee=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:o}=t,a=[],l=e.trim().split(gee);let d="";for(let f=l.length-1;f>=0;f-=1){const m=l[f],{isExternal:h,modifiers:v,hasImportantModifier:y,baseClassName:x,maybePostfixModifierPosition:S}=n(m);if(h){d=m+(d.length>0?" "+d:d);continue}let C=!!S,k=r(C?x.substring(0,S):x);if(!k){if(!C){d=m+(d.length>0?" "+d:d);continue}if(k=r(x),!k){d=m+(d.length>0?" "+d:d);continue}C=!1}const E=v.length===0?"":v.length===1?v[0]:o(v).join(":"),j=y?E+bC:E,I=j+k;if(a.indexOf(I)>-1)continue;a.push(I);const A=i(k,C);for(let T=0;T<A.length;++T){const N=A[T];a.push(j+N)}d=m+(d.length>0?" "+d:d)}return d},yee=(...e)=>{let t=0,n,r,i="";for(;t<e.length;)(n=e[t++])&&(r=E4(n))&&(i&&(i+=" "),i+=r);return i},E4=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=E4(e[r]))&&(n&&(n+=" "),n+=t);return n},bee=(e,...t)=>{let n,r,i,o;const a=d=>{const f=t.reduce((m,h)=>h(m),e());return n=hee(f),r=n.cache.get,i=n.cache.set,o=l,l(d)},l=d=>{const f=r(d);if(f)return f;const m=vee(d,n);return i(d,m),m};return o=a,(...d)=>o(yee(...d))},xee=[],fr=e=>{const t=n=>n[e]||xee;return t.isThemeGetter=!0,t},j4=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,R4=/^\((?:(\w[\w-]*):)?(.+)\)$/i,wee=/^\d+\/\d+$/,See=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,_ee=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Cee=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,kee=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Eee=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,od=e=>wee.test(e),kt=e=>!!e&&!Number.isNaN(Number(e)),Js=e=>!!e&&Number.isInteger(Number(e)),R_=e=>e.endsWith("%")&&kt(e.slice(0,-1)),ns=e=>See.test(e),jee=()=>!0,Ree=e=>_ee.test(e)&&!Cee.test(e),I4=()=>!1,Iee=e=>kee.test(e),Tee=e=>Eee.test(e),Nee=e=>!qe(e)&&!Ke(e),Aee=e=>xf(e,A4,I4),qe=e=>j4.test(e),mc=e=>xf(e,O4,Ree),I_=e=>xf(e,Mee,kt),c$=e=>xf(e,T4,I4),Oee=e=>xf(e,N4,Tee),jv=e=>xf(e,D4,Iee),Ke=e=>R4.test(e),Up=e=>wf(e,O4),Dee=e=>wf(e,zee),u$=e=>wf(e,T4),$ee=e=>wf(e,A4),Pee=e=>wf(e,N4),Rv=e=>wf(e,D4,!0),xf=(e,t,n)=>{const r=j4.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},wf=(e,t,n=!1)=>{const r=R4.exec(e);return r?r[1]?t(r[1]):n:!1},T4=e=>e==="position"||e==="percentage",N4=e=>e==="image"||e==="url",A4=e=>e==="length"||e==="size"||e==="bg-size",O4=e=>e==="length",Mee=e=>e==="number",zee=e=>e==="family-name",D4=e=>e==="shadow",Lee=()=>{const e=fr("color"),t=fr("font"),n=fr("text"),r=fr("font-weight"),i=fr("tracking"),o=fr("leading"),a=fr("breakpoint"),l=fr("container"),d=fr("spacing"),f=fr("radius"),m=fr("shadow"),h=fr("inset-shadow"),v=fr("text-shadow"),y=fr("drop-shadow"),x=fr("blur"),S=fr("perspective"),C=fr("aspect"),k=fr("ease"),E=fr("animate"),j=()=>["auto","avoid","all","avoid-page","page","left","right","column"],I=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],A=()=>[...I(),Ke,qe],T=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto","contain","none"],D=()=>[Ke,qe,d],L=()=>[od,"full","auto",...D()],H=()=>[Js,"none","subgrid",Ke,qe],ee=()=>["auto",{span:["full",Js,Ke,qe]},Js,Ke,qe],G=()=>[Js,"auto",Ke,qe],K=()=>["auto","min","max","fr",Ke,qe],B=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],q=()=>["start","end","center","stretch","center-safe","end-safe"],z=()=>["auto",...D()],W=()=>[od,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...D()],F=()=>[e,Ke,qe],ne=()=>[...I(),u$,c$,{position:[Ke,qe]}],$=()=>["no-repeat",{repeat:["","x","y","space","round"]}],P=()=>["auto","cover","contain",$ee,Aee,{size:[Ke,qe]}],V=()=>[R_,Up,mc],O=()=>["","none","full",f,Ke,qe],X=()=>["",kt,Up,mc],de=()=>["solid","dashed","dotted","double"],ge=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Q=()=>[kt,R_,u$,c$],ve=()=>["","none",x,Ke,qe],xe=()=>["none",kt,Ke,qe],Ee=()=>["none",kt,Ke,qe],Pe=()=>[kt,Ke,qe],Fe=()=>[od,"full",...D()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ns],breakpoint:[ns],color:[jee],container:[ns],"drop-shadow":[ns],ease:["in","out","in-out"],font:[Nee],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ns],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ns],shadow:[ns],spacing:["px",kt],text:[ns],"text-shadow":[ns],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",od,qe,Ke,C]}],container:["container"],columns:[{columns:[kt,qe,Ke,l]}],"break-after":[{"break-after":j()}],"break-before":[{"break-before":j()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:A()}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:L()}],"inset-x":[{"inset-x":L()}],"inset-y":[{"inset-y":L()}],start:[{start:L()}],end:[{end:L()}],top:[{top:L()}],right:[{right:L()}],bottom:[{bottom:L()}],left:[{left:L()}],visibility:["visible","invisible","collapse"],z:[{z:[Js,"auto",Ke,qe]}],basis:[{basis:[od,"full","auto",l,...D()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[kt,od,"auto","initial","none",qe]}],grow:[{grow:["",kt,Ke,qe]}],shrink:[{shrink:["",kt,Ke,qe]}],order:[{order:[Js,"first","last","none",Ke,qe]}],"grid-cols":[{"grid-cols":H()}],"col-start-end":[{col:ee()}],"col-start":[{"col-start":G()}],"col-end":[{"col-end":G()}],"grid-rows":[{"grid-rows":H()}],"row-start-end":[{row:ee()}],"row-start":[{"row-start":G()}],"row-end":[{"row-end":G()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":K()}],"auto-rows":[{"auto-rows":K()}],gap:[{gap:D()}],"gap-x":[{"gap-x":D()}],"gap-y":[{"gap-y":D()}],"justify-content":[{justify:[...B(),"normal"]}],"justify-items":[{"justify-items":[...q(),"normal"]}],"justify-self":[{"justify-self":["auto",...q()]}],"align-content":[{content:["normal",...B()]}],"align-items":[{items:[...q(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...q(),{baseline:["","last"]}]}],"place-content":[{"place-content":B()}],"place-items":[{"place-items":[...q(),"baseline"]}],"place-self":[{"place-self":["auto",...q()]}],p:[{p:D()}],px:[{px:D()}],py:[{py:D()}],ps:[{ps:D()}],pe:[{pe:D()}],pt:[{pt:D()}],pr:[{pr:D()}],pb:[{pb:D()}],pl:[{pl:D()}],m:[{m:z()}],mx:[{mx:z()}],my:[{my:z()}],ms:[{ms:z()}],me:[{me:z()}],mt:[{mt:z()}],mr:[{mr:z()}],mb:[{mb:z()}],ml:[{ml:z()}],"space-x":[{"space-x":D()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":D()}],"space-y-reverse":["space-y-reverse"],size:[{size:W()}],w:[{w:[l,"screen",...W()]}],"min-w":[{"min-w":[l,"screen","none",...W()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[a]},...W()]}],h:[{h:["screen","lh",...W()]}],"min-h":[{"min-h":["screen","lh","none",...W()]}],"max-h":[{"max-h":["screen","lh",...W()]}],"font-size":[{text:["base",n,Up,mc]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Ke,I_]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",R_,qe]}],"font-family":[{font:[Dee,qe,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,Ke,qe]}],"line-clamp":[{"line-clamp":[kt,"none",Ke,I_]}],leading:[{leading:[o,...D()]}],"list-image":[{"list-image":["none",Ke,qe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Ke,qe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:F()}],"text-color":[{text:F()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...de(),"wavy"]}],"text-decoration-thickness":[{decoration:[kt,"from-font","auto",Ke,mc]}],"text-decoration-color":[{decoration:F()}],"underline-offset":[{"underline-offset":[kt,"auto",Ke,qe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ke,qe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ke,qe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ne()}],"bg-repeat":[{bg:$()}],"bg-size":[{bg:P()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Js,Ke,qe],radial:["",Ke,qe],conic:[Js,Ke,qe]},Pee,Oee]}],"bg-color":[{bg:F()}],"gradient-from-pos":[{from:V()}],"gradient-via-pos":[{via:V()}],"gradient-to-pos":[{to:V()}],"gradient-from":[{from:F()}],"gradient-via":[{via:F()}],"gradient-to":[{to:F()}],rounded:[{rounded:O()}],"rounded-s":[{"rounded-s":O()}],"rounded-e":[{"rounded-e":O()}],"rounded-t":[{"rounded-t":O()}],"rounded-r":[{"rounded-r":O()}],"rounded-b":[{"rounded-b":O()}],"rounded-l":[{"rounded-l":O()}],"rounded-ss":[{"rounded-ss":O()}],"rounded-se":[{"rounded-se":O()}],"rounded-ee":[{"rounded-ee":O()}],"rounded-es":[{"rounded-es":O()}],"rounded-tl":[{"rounded-tl":O()}],"rounded-tr":[{"rounded-tr":O()}],"rounded-br":[{"rounded-br":O()}],"rounded-bl":[{"rounded-bl":O()}],"border-w":[{border:X()}],"border-w-x":[{"border-x":X()}],"border-w-y":[{"border-y":X()}],"border-w-s":[{"border-s":X()}],"border-w-e":[{"border-e":X()}],"border-w-t":[{"border-t":X()}],"border-w-r":[{"border-r":X()}],"border-w-b":[{"border-b":X()}],"border-w-l":[{"border-l":X()}],"divide-x":[{"divide-x":X()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":X()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...de(),"hidden","none"]}],"divide-style":[{divide:[...de(),"hidden","none"]}],"border-color":[{border:F()}],"border-color-x":[{"border-x":F()}],"border-color-y":[{"border-y":F()}],"border-color-s":[{"border-s":F()}],"border-color-e":[{"border-e":F()}],"border-color-t":[{"border-t":F()}],"border-color-r":[{"border-r":F()}],"border-color-b":[{"border-b":F()}],"border-color-l":[{"border-l":F()}],"divide-color":[{divide:F()}],"outline-style":[{outline:[...de(),"none","hidden"]}],"outline-offset":[{"outline-offset":[kt,Ke,qe]}],"outline-w":[{outline:["",kt,Up,mc]}],"outline-color":[{outline:F()}],shadow:[{shadow:["","none",m,Rv,jv]}],"shadow-color":[{shadow:F()}],"inset-shadow":[{"inset-shadow":["none",h,Rv,jv]}],"inset-shadow-color":[{"inset-shadow":F()}],"ring-w":[{ring:X()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:F()}],"ring-offset-w":[{"ring-offset":[kt,mc]}],"ring-offset-color":[{"ring-offset":F()}],"inset-ring-w":[{"inset-ring":X()}],"inset-ring-color":[{"inset-ring":F()}],"text-shadow":[{"text-shadow":["none",v,Rv,jv]}],"text-shadow-color":[{"text-shadow":F()}],opacity:[{opacity:[kt,Ke,qe]}],"mix-blend":[{"mix-blend":[...ge(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ge()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[kt]}],"mask-image-linear-from-pos":[{"mask-linear-from":Q()}],"mask-image-linear-to-pos":[{"mask-linear-to":Q()}],"mask-image-linear-from-color":[{"mask-linear-from":F()}],"mask-image-linear-to-color":[{"mask-linear-to":F()}],"mask-image-t-from-pos":[{"mask-t-from":Q()}],"mask-image-t-to-pos":[{"mask-t-to":Q()}],"mask-image-t-from-color":[{"mask-t-from":F()}],"mask-image-t-to-color":[{"mask-t-to":F()}],"mask-image-r-from-pos":[{"mask-r-from":Q()}],"mask-image-r-to-pos":[{"mask-r-to":Q()}],"mask-image-r-from-color":[{"mask-r-from":F()}],"mask-image-r-to-color":[{"mask-r-to":F()}],"mask-image-b-from-pos":[{"mask-b-from":Q()}],"mask-image-b-to-pos":[{"mask-b-to":Q()}],"mask-image-b-from-color":[{"mask-b-from":F()}],"mask-image-b-to-color":[{"mask-b-to":F()}],"mask-image-l-from-pos":[{"mask-l-from":Q()}],"mask-image-l-to-pos":[{"mask-l-to":Q()}],"mask-image-l-from-color":[{"mask-l-from":F()}],"mask-image-l-to-color":[{"mask-l-to":F()}],"mask-image-x-from-pos":[{"mask-x-from":Q()}],"mask-image-x-to-pos":[{"mask-x-to":Q()}],"mask-image-x-from-color":[{"mask-x-from":F()}],"mask-image-x-to-color":[{"mask-x-to":F()}],"mask-image-y-from-pos":[{"mask-y-from":Q()}],"mask-image-y-to-pos":[{"mask-y-to":Q()}],"mask-image-y-from-color":[{"mask-y-from":F()}],"mask-image-y-to-color":[{"mask-y-to":F()}],"mask-image-radial":[{"mask-radial":[Ke,qe]}],"mask-image-radial-from-pos":[{"mask-radial-from":Q()}],"mask-image-radial-to-pos":[{"mask-radial-to":Q()}],"mask-image-radial-from-color":[{"mask-radial-from":F()}],"mask-image-radial-to-color":[{"mask-radial-to":F()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":I()}],"mask-image-conic-pos":[{"mask-conic":[kt]}],"mask-image-conic-from-pos":[{"mask-conic-from":Q()}],"mask-image-conic-to-pos":[{"mask-conic-to":Q()}],"mask-image-conic-from-color":[{"mask-conic-from":F()}],"mask-image-conic-to-color":[{"mask-conic-to":F()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ne()}],"mask-repeat":[{mask:$()}],"mask-size":[{mask:P()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Ke,qe]}],filter:[{filter:["","none",Ke,qe]}],blur:[{blur:ve()}],brightness:[{brightness:[kt,Ke,qe]}],contrast:[{contrast:[kt,Ke,qe]}],"drop-shadow":[{"drop-shadow":["","none",y,Rv,jv]}],"drop-shadow-color":[{"drop-shadow":F()}],grayscale:[{grayscale:["",kt,Ke,qe]}],"hue-rotate":[{"hue-rotate":[kt,Ke,qe]}],invert:[{invert:["",kt,Ke,qe]}],saturate:[{saturate:[kt,Ke,qe]}],sepia:[{sepia:["",kt,Ke,qe]}],"backdrop-filter":[{"backdrop-filter":["","none",Ke,qe]}],"backdrop-blur":[{"backdrop-blur":ve()}],"backdrop-brightness":[{"backdrop-brightness":[kt,Ke,qe]}],"backdrop-contrast":[{"backdrop-contrast":[kt,Ke,qe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",kt,Ke,qe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[kt,Ke,qe]}],"backdrop-invert":[{"backdrop-invert":["",kt,Ke,qe]}],"backdrop-opacity":[{"backdrop-opacity":[kt,Ke,qe]}],"backdrop-saturate":[{"backdrop-saturate":[kt,Ke,qe]}],"backdrop-sepia":[{"backdrop-sepia":["",kt,Ke,qe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":D()}],"border-spacing-x":[{"border-spacing-x":D()}],"border-spacing-y":[{"border-spacing-y":D()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Ke,qe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[kt,"initial",Ke,qe]}],ease:[{ease:["linear","initial",k,Ke,qe]}],delay:[{delay:[kt,Ke,qe]}],animate:[{animate:["none",E,Ke,qe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[S,Ke,qe]}],"perspective-origin":[{"perspective-origin":A()}],rotate:[{rotate:xe()}],"rotate-x":[{"rotate-x":xe()}],"rotate-y":[{"rotate-y":xe()}],"rotate-z":[{"rotate-z":xe()}],scale:[{scale:Ee()}],"scale-x":[{"scale-x":Ee()}],"scale-y":[{"scale-y":Ee()}],"scale-z":[{"scale-z":Ee()}],"scale-3d":["scale-3d"],skew:[{skew:Pe()}],"skew-x":[{"skew-x":Pe()}],"skew-y":[{"skew-y":Pe()}],transform:[{transform:[Ke,qe,"","none","gpu","cpu"]}],"transform-origin":[{origin:A()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Fe()}],"translate-x":[{"translate-x":Fe()}],"translate-y":[{"translate-y":Fe()}],"translate-z":[{"translate-z":Fe()}],"translate-none":["translate-none"],accent:[{accent:F()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:F()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ke,qe]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ke,qe]}],fill:[{fill:["none",...F()]}],"stroke-w":[{stroke:[kt,Up,mc,I_]}],stroke:[{stroke:["none",...F()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Fee=bee(Lee);function Ve(...e){return Fee(S4(e))}function d$(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Sf(...e){return t=>{let n=!1;const r=e.map(i=>{const o=d$(i,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i<r.length;i++){const o=r[i];typeof o=="function"?o():d$(e[i],null)}}}}function ft(...e){return b.useCallback(Sf(...e),e)}var Uee=Symbol.for("react.lazy"),Ly=iE[" use ".trim().toString()];function Vee(e){return typeof e=="object"&&e!==null&&"then"in e}function $4(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Uee&&"_payload"in e&&Vee(e._payload)}function P4(e){const t=Bee(e),n=b.forwardRef((r,i)=>{let{children:o,...a}=r;$4(o)&&typeof Ly=="function"&&(o=Ly(o._payload));const l=b.Children.toArray(o),d=l.find(qee);if(d){const f=d.props.children,m=l.map(h=>h===d?b.Children.count(f)>1?b.Children.only(null):b.isValidElement(f)?f.props.children:null:h);return c.jsx(t,{...a,ref:i,children:b.isValidElement(f)?b.cloneElement(f,void 0,m):null})}return c.jsx(t,{...a,ref:i,children:o})});return n.displayName=`${e}.Slot`,n}var mE=P4("Slot");function Bee(e){const t=b.forwardRef((n,r)=>{let{children:i,...o}=n;if($4(i)&&typeof Ly=="function"&&(i=Ly(i._payload)),b.isValidElement(i)){const a=Gee(i),l=Kee(o,i.props);return i.type!==b.Fragment&&(l.ref=r?Sf(r,a):a),b.cloneElement(i,l)}return b.Children.count(i)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Hee=Symbol("radix.slottable");function qee(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Hee}function Kee(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...l)=>{const d=o(...l);return i(...l),d}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function Gee(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function he({className:e,variant:t,size:n,asChild:r=!1,...i}){const o=r?mE:"button";return c.jsx(o,{"data-slot":"button",className:Ve(JQ({variant:t,size:n,className:e})),...i})}function Lc({className:e,...t}){return c.jsx("div",{"data-slot":"card",className:Ve("bg-card text-card-foreground flex flex-col gap-6 rounded-xl py-4 shadow-deep",e),...t})}function Ol({className:e,...t}){return c.jsx("div",{"data-slot":"card-header",className:Ve("flex flex-col gap-1.5 px-6",e),...t})}function Dl({className:e,...t}){return c.jsx("div",{"data-slot":"card-title",className:Ve("leading-none text-lg",e),...t})}function nu({className:e,...t}){return c.jsx("div",{"data-slot":"card-description",className:Ve("text-muted-foreground text-xs",e),...t})}function Cs({className:e,...t}){return c.jsx("div",{"data-slot":"card-content",className:Ve("px-6",e),...t})}function Zee(e){return e!==null&&!!e.username}function ru(e){if(e&&!Zee(e)){const t=Object.keys(e.roles);if(t.length===1)return`/${t[0]}`}return"/"}const M4=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();const Yee=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const Wee=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());const f$=e=>{const t=Wee(e);return t.charAt(0).toUpperCase()+t.slice(1)};var Xee={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"};const Jee=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const Qee=b.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:o,iconNode:a,...l},d)=>b.createElement("svg",{ref:d,...Xee,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:M4("lucide",i),...!o&&!Jee(l)&&{"aria-hidden":"true"},...l},[...a.map(([f,m])=>b.createElement(f,m)),...Array.isArray(o)?o:[o]]));const Ue=(e,t)=>{const n=b.forwardRef(({className:r,...i},o)=>b.createElement(Qee,{ref:o,iconNode:t,className:M4(`lucide-${Yee(f$(e))}`,`lucide-${e}`,r),...i}));return n.displayName=f$(e),n};const ete=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],tte=Ue("activity",ete);const nte=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],qb=Ue("arrow-down",nte);const rte=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],Fc=Ue("arrow-left",rte);const ite=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],wi=Ue("arrow-right",ite);const ote=[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]],ate=Ue("arrow-up-down",ote);const ste=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],lte=Ue("arrow-up",ste);const cte=[["path",{d:"M4.929 4.929 19.07 19.071",key:"196cmz"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],ute=Ue("ban",cte);const dte=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M16 12h2",key:"7q9ll5"}],["path",{d:"M16 8h2",key:"msurwy"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}],["path",{d:"M6 12h2",key:"32wvfc"}],["path",{d:"M6 8h2",key:"30oboj"}]],z4=Ue("book-open-text",dte);const fte=[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]],pte=Ue("boxes",fte);const mte=[["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z",key:"uouzyp"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M21 21a4 4 0 0 0-3.81-4",key:"1b0z45"}],["path",{d:"M21 5a4 4 0 0 1-3.55 3.97",key:"5cxbf6"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M3 21a4 4 0 0 1 3.81-4",key:"1fjd4g"}],["path",{d:"M3 5a4 4 0 0 0 3.55 3.97",key:"1d7oge"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M9 7.13V6a3 3 0 1 1 6 0v1.13",key:"1vgav8"}]],hte=Ue("bug",mte);const gte=[["path",{d:"M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z",key:"pzmjnu"}],["path",{d:"M21.21 15.89A10 10 0 1 1 8 2.83",key:"k2fpak"}]],L4=Ue("chart-pie",gte);const vte=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],hE=Ue("check",vte);const yte=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],F4=Ue("chevron-down",yte);const bte=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],xte=Ue("chevron-up",bte);const wte=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],Ste=Ue("circle-check-big",wte);const _te=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],U4=Ue("circle",_te);const Cte=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"m9 14 2 2 4-4",key:"df797q"}]],kte=Ue("clipboard-check",Cte);const Ete=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}]],p$=Ue("clipboard",Ete);const jte=[["path",{d:"M12 12v4",key:"tww15h"}],["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.128 16.949A7 7 0 1 1 15.71 8h1.79a1 1 0 0 1 0 9h-1.642",key:"1namsd"}]],Rte=Ue("cloud-alert",jte);const Ite=[["path",{d:"M12 13v8l-4-4",key:"1f5nwf"}],["path",{d:"m12 21 4-4",key:"1lfcce"}],["path",{d:"M4.393 15.269A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.436 8.284",key:"ui1hmy"}]],Tte=Ue("cloud-download",Ite);const Nte=[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]],V4=Ue("cloud-upload",Nte);const Ate=[["path",{d:"M10.5 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v5.5",key:"1g2yzs"}],["path",{d:"m14.3 19.6 1-.4",key:"11sv9r"}],["path",{d:"M15 3v7.5",key:"7lm50a"}],["path",{d:"m15.2 16.9-.9-.3",key:"1t7mvx"}],["path",{d:"m16.6 21.7.3-.9",key:"1j67ps"}],["path",{d:"m16.8 15.3-.4-1",key:"1ei7r6"}],["path",{d:"m19.1 15.2.3-.9",key:"18r7jp"}],["path",{d:"m19.6 21.7-.4-1",key:"z2vh2"}],["path",{d:"m20.7 16.8 1-.4",key:"19m87a"}],["path",{d:"m21.7 19.4-.9-.3",key:"1qgwi9"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}]],Ote=Ue("columns-3-cog",Ate);const Dte=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],Uc=Ue("copy",Dte);const $te=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],B4=Ue("credit-card",$te);const Pte=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],Mte=Ue("database",Pte);const zte=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],H4=Ue("download",zte);const Lte=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],gE=Ue("ellipsis",Lte);const Fte=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],Ute=Ue("external-link",Fte);const Vte=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]],Bte=Ue("file",Vte);const Hte=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],qte=Ue("folder",Hte);const Kte=[["path",{d:"M13.354 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14v6a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341l1.218-1.348",key:"8mvsmf"}],["path",{d:"M16 6h6",key:"1dogtp"}],["path",{d:"M19 3v6",key:"1ytpjt"}]],Gte=Ue("funnel-plus",Kte);const Zte=[["path",{d:"M12.531 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14v6a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341l.427-.473",key:"ol2ft2"}],["path",{d:"m16.5 3.5 5 5",key:"15e6fa"}],["path",{d:"m21.5 3.5-5 5",key:"m0lwru"}]],m$=Ue("funnel-x",Zte);const Yte=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],Wte=Ue("funnel",Yte);const Xte=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],Jte=Ue("gauge",Xte);const Qte=[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]],ene=Ue("git-branch",Qte);const tne=[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]],vE=Ue("github",tne);const nne=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],rne=Ue("grip-vertical",nne);const ine=[["path",{d:"m11 17 2 2a1 1 0 1 0 3-3",key:"efffak"}],["path",{d:"m14 14 2.5 2.5a1 1 0 1 0 3-3l-3.88-3.88a3 3 0 0 0-4.24 0l-.88.88a1 1 0 1 1-3-3l2.81-2.81a5.79 5.79 0 0 1 7.06-.87l.47.28a2 2 0 0 0 1.42.25L21 4",key:"9pr0kb"}],["path",{d:"m21 3 1 11h-2",key:"1tisrp"}],["path",{d:"M3 3 2 14l6.5 6.5a1 1 0 1 0 3-3",key:"1uvwmv"}],["path",{d:"M3 4h8",key:"1ep09j"}]],one=Ue("handshake",ine);const ane=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],sne=Ue("house",ane);const lne=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]],q4=Ue("key",lne);const cne=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],une=Ue("link",cne);const dne=[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["rect",{x:"3",y:"4",width:"6",height:"6",rx:"1",key:"cif1o7"}]],fne=Ue("list-todo",dne);const pne=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],K4=Ue("loader-circle",pne);const mne=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],hne=Ue("lock",mne);const gne=[["path",{d:"m10 17 5-5-5-5",key:"1bsop3"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}]],vne=Ue("log-in",gne);const yne=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],bne=Ue("log-out",yne);const xne=[["path",{d:"M22 10.5V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v12c0 1.1.9 2 2 2h12.5",key:"e61zoh"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}],["path",{d:"M20 14v4",key:"1hm744"}],["path",{d:"M20 22v.01",key:"12bgn6"}]],wne=Ue("mail-warning",xne);const Sne=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],G4=Ue("menu",Sne);const _ne=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"16",height:"18",x:"4",y:"4",rx:"2",key:"1u9h20"}],["path",{d:"M8 10h6",key:"3oa6kw"}],["path",{d:"M8 14h8",key:"1fgep2"}],["path",{d:"M8 18h5",key:"17enja"}]],Cne=Ue("notepad-text",_ne);const kne=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]],yE=Ue("package",kne);const Ene=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}],["path",{d:"m8 9 3 3-3 3",key:"12hl5m"}]],jne=Ue("panel-right-close",Ene);const Rne=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}],["path",{d:"m10 15-3-3 3-3",key:"1pgupc"}]],Ine=Ue("panel-right-open",Rne);const Tne=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],Z4=Ue("pencil",Tne);const Nne=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Tr=Ue("plus",Nne);const Ane=[["path",{d:"M13 16H8",key:"wsln4y"}],["path",{d:"M14 8H8",key:"1l3xfs"}],["path",{d:"M16 12H8",key:"1fr5h0"}],["path",{d:"M4 3a1 1 0 0 1 1-1 1.3 1.3 0 0 1 .7.2l.933.6a1.3 1.3 0 0 0 1.4 0l.934-.6a1.3 1.3 0 0 1 1.4 0l.933.6a1.3 1.3 0 0 0 1.4 0l.933-.6a1.3 1.3 0 0 1 1.4 0l.934.6a1.3 1.3 0 0 0 1.4 0l.933-.6A1.3 1.3 0 0 1 19 2a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1 1.3 1.3 0 0 1-.7-.2l-.933-.6a1.3 1.3 0 0 0-1.4 0l-.934.6a1.3 1.3 0 0 1-1.4 0l-.933-.6a1.3 1.3 0 0 0-1.4 0l-.933.6a1.3 1.3 0 0 1-1.4 0l-.934-.6a1.3 1.3 0 0 0-1.4 0l-.933.6a1.3 1.3 0 0 1-.7.2 1 1 0 0 1-1-1z",key:"ycz6yz"}]],Y4=Ue("receipt-text",Ane);const One=[["path",{d:"M4 2v20l2-1 2 1 2-1 2 1 2-1 2 1 2-1 2 1V2l-2 1-2-1-2 1-2-1-2 1-2-1-2 1Z",key:"q3az6g"}],["path",{d:"M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8",key:"1h4pet"}],["path",{d:"M12 17.5v-11",key:"1jc1ny"}]],Dne=Ue("receipt",One);const $ne=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],$o=Ue("refresh-cw",$ne);const Pne=[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]],W4=Ue("rocket",Pne);const Mne=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],zne=Ue("rotate-ccw",Mne);const Lne=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],Ii=Ue("save",Lne);const Fne=[["path",{d:"M12 3v18",key:"108xh3"}],["path",{d:"m19 8 3 8a5 5 0 0 1-6 0zV7",key:"zcdpyk"}],["path",{d:"M3 7h1a17 17 0 0 0 8-2 17 17 0 0 0 8 2h1",key:"1yorad"}],["path",{d:"m5 8 3 8a5 5 0 0 1-6 0zV7",key:"eua70x"}],["path",{d:"M7 21h10",key:"1b0cd5"}]],Une=Ue("scale",Fne);const Vne=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],X4=Ue("server",Vne);const Bne=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Hne=Ue("settings",Bne);const qne=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Kne=Ue("shield-check",qne);const Gne=[["path",{d:"M12 3v18",key:"108xh3"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}]],Zne=Ue("table",Gne);const Yne=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],J4=Ue("terminal",Yne);const Wne=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Xne=Ue("trash-2",Wne);const Jne=[["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],aa=Ue("trash",Jne);const Qne=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],ere=Ue("triangle-alert",Qne);const tre=[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]],nre=Ue("undo-2",tre);const rre=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],ire=Ue("users",rre);const ore=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Q4=Ue("x",ore);function Fy({className:e,error:t,title:n,showReturnToHome:r,children:i}){const{user:o,isLoading:a}=tu();return ru(o),c.jsxs(Lc,{className:Ve("text-red p-5 border border-red rounded-md m-12 mt-36",e),children:[c.jsxs(Ol,{children:[c.jsx(Dl,{className:"text-2xl",children:c.jsx("h2",{children:n??"Component Error"})}),c.jsx(nu,{children:t.message})]}),c.jsxs(Cs,{children:[i,r!==!1&&(o&&!a?c.jsx(Ye,{to:Ea,children:c.jsxs(he,{children:[" ",c.jsx(Fc,{})," Return to Home"]})}):c.jsx(Ye,{to:"/sign-in",children:c.jsxs(he,{children:[" ",c.jsx(Fc,{})," Go to Sign In Page"]})}))]})]})}function are(){const{user:e,isLoading:t}=tu();return ru(e),c.jsx("div",{className:"flex items-center justify-center h-screen px-3",children:c.jsxs(Lc,{className:"text-red p-5 border border-red rounded-md w-full max-w-md",children:[c.jsx(Ol,{children:c.jsx(Dl,{className:"text-2xl",children:c.jsx("h2",{children:"Sorry, Page Not Found"})})}),c.jsx(Cs,{children:e&&!t?c.jsx(Ye,{to:Ea,children:c.jsxs(he,{children:[" ",c.jsx(Fc,{})," Return to Home"]})}):c.jsx(Ye,{to:"/sign-in",children:c.jsxs(he,{children:[" ",c.jsx(Fc,{})," Go Sign In Page"]})})})]})})}function sre(){return"ontouchstart"in window||navigator.maxTouchPoints>0}function lre(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const cre=e=>{switch(e){case"success":return fre;case"info":return mre;case"warning":return pre;case"error":return hre;default:return null}},ure=Array(12).fill(0),dre=({visible:e,className:t})=>J.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},J.createElement("div",{className:"sonner-spinner"},ure.map((n,r)=>J.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),fre=J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},J.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),pre=J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},J.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),mre=J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},J.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),hre=J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},J.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),gre=J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},J.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),J.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),vre=()=>{const[e,t]=J.useState(document.hidden);return J.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let xC=1;class yre{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:r,...i}=t,o=typeof t?.id=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:xC++,a=this.toasts.find(d=>d.id===o),l=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),a?this.toasts=this.toasts.map(d=>d.id===o?(this.publish({...d,...t,id:o,title:r}),{...d,...t,id:o,dismissible:l,title:r}):d):this.addToast({title:r,...i,dismissible:l,id:o}),o},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const i=Promise.resolve(t instanceof Function?t():t);let o=r!==void 0,a;const l=i.then(async f=>{if(a=["resolve",f],J.isValidElement(f))o=!1,this.create({id:r,type:"default",message:f});else if(xre(f)&&!f.ok){o=!1;const h=typeof n.error=="function"?await n.error(`HTTP error! status: ${f.status}`):n.error,v=typeof n.description=="function"?await n.description(`HTTP error! status: ${f.status}`):n.description,x=typeof h=="object"&&!J.isValidElement(h)?h:{message:h};this.create({id:r,type:"error",description:v,...x})}else if(f instanceof Error){o=!1;const h=typeof n.error=="function"?await n.error(f):n.error,v=typeof n.description=="function"?await n.description(f):n.description,x=typeof h=="object"&&!J.isValidElement(h)?h:{message:h};this.create({id:r,type:"error",description:v,...x})}else if(n.success!==void 0){o=!1;const h=typeof n.success=="function"?await n.success(f):n.success,v=typeof n.description=="function"?await n.description(f):n.description,x=typeof h=="object"&&!J.isValidElement(h)?h:{message:h};this.create({id:r,type:"success",description:v,...x})}}).catch(async f=>{if(a=["reject",f],n.error!==void 0){o=!1;const m=typeof n.error=="function"?await n.error(f):n.error,h=typeof n.description=="function"?await n.description(f):n.description,y=typeof m=="object"&&!J.isValidElement(m)?m:{message:m};this.create({id:r,type:"error",description:h,...y})}}).finally(()=>{o&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),d=()=>new Promise((f,m)=>l.then(()=>a[0]==="reject"?m(a[1]):f(a[1])).catch(m));return typeof r!="string"&&typeof r!="number"?{unwrap:d}:Object.assign(r,{unwrap:d})},this.custom=(t,n)=>{const r=n?.id||xC++;return this.create({jsx:t(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const yi=new yre,bre=(e,t)=>{const n=t?.id||xC++;return yi.addToast({title:e,...t,id:n}),n},xre=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",wre=bre,Sre=()=>yi.toasts,_re=()=>yi.getActiveToasts(),ye=Object.assign(wre,{success:yi.success,info:yi.info,warning:yi.warning,error:yi.error,custom:yi.custom,message:yi.message,promise:yi.promise,dismiss:yi.dismiss,loading:yi.loading},{getHistory:Sre,getToasts:_re});lre("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Iv(e){return e.label!==void 0}const Cre=3,kre="24px",Ere="16px",h$=4e3,jre=356,Rre=14,Ire=45,Tre=200;function ma(...e){return e.filter(Boolean).join(" ")}function Nre(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const Are=e=>{var t,n,r,i,o,a,l,d,f;const{invert:m,toast:h,unstyled:v,interacting:y,setHeights:x,visibleToasts:S,heights:C,index:k,toasts:E,expanded:j,removeToast:I,defaultRichColors:A,closeButton:T,style:N,cancelButtonStyle:D,actionButtonStyle:L,className:H="",descriptionClassName:ee="",duration:G,position:K,gap:B,expandByDefault:q,classNames:z,icons:W,closeButtonAriaLabel:F="Close toast"}=e,[ne,$]=J.useState(null),[P,V]=J.useState(null),[O,X]=J.useState(!1),[de,ge]=J.useState(!1),[Q,ve]=J.useState(!1),[xe,Ee]=J.useState(!1),[Pe,Fe]=J.useState(!1),[pt,dt]=J.useState(0),[tt,Vt]=J.useState(0),mn=J.useRef(h.duration||G||h$),qn=J.useRef(null),tn=J.useRef(null),Pn=k===0,Z=k+1<=S,re=h.type,se=h.dismissible!==!1,Ce=h.className||"",oe=h.descriptionClassName||"",U=J.useMemo(()=>C.findIndex(We=>We.toastId===h.id)||0,[C,h.id]),le=J.useMemo(()=>{var We;return(We=h.closeButton)!=null?We:T},[h.closeButton,T]),ke=J.useMemo(()=>h.duration||G||h$,[h.duration,G]),De=J.useRef(0),Be=J.useRef(0),Nt=J.useRef(0),Kt=J.useRef(null),[kn,Gt]=K.split("-"),sn=J.useMemo(()=>C.reduce((We,ln,Qn)=>Qn>=U?We:We+ln.height,0),[C,U]),jt=vre(),ur=h.invert||m,Tn=re==="loading";Be.current=J.useMemo(()=>U*B+sn,[U,sn]),J.useEffect(()=>{mn.current=ke},[ke]),J.useEffect(()=>{X(!0)},[]),J.useEffect(()=>{const We=tn.current;if(We){const ln=We.getBoundingClientRect().height;return Vt(ln),x(Qn=>[{toastId:h.id,height:ln,position:h.position},...Qn]),()=>x(Qn=>Qn.filter(hr=>hr.toastId!==h.id))}},[x,h.id]),J.useLayoutEffect(()=>{if(!O)return;const We=tn.current,ln=We.style.height;We.style.height="auto";const Qn=We.getBoundingClientRect().height;We.style.height=ln,Vt(Qn),x(hr=>hr.find(hn=>hn.toastId===h.id)?hr.map(hn=>hn.toastId===h.id?{...hn,height:Qn}:hn):[{toastId:h.id,height:Qn,position:h.position},...hr])},[O,h.title,h.description,x,h.id,h.jsx,h.action,h.cancel]);const Jn=J.useCallback(()=>{ge(!0),dt(Be.current),x(We=>We.filter(ln=>ln.toastId!==h.id)),setTimeout(()=>{I(h)},Tre)},[h,I,x,Be]);J.useEffect(()=>{if(h.promise&&re==="loading"||h.duration===1/0||h.type==="loading")return;let We;return j||y||jt?(()=>{if(Nt.current<De.current){const hr=new Date().getTime()-De.current;mn.current=mn.current-hr}Nt.current=new Date().getTime()})():mn.current!==1/0&&(De.current=new Date().getTime(),We=setTimeout(()=>{h.onAutoClose==null||h.onAutoClose.call(h,h),Jn()},mn.current)),()=>clearTimeout(We)},[j,y,h,re,jt,Jn]),J.useEffect(()=>{h.delete&&(Jn(),h.onDismiss==null||h.onDismiss.call(h,h))},[Jn,h.delete]);function la(){var We;if(W?.loading){var ln;return J.createElement("div",{className:ma(z?.loader,h==null||(ln=h.classNames)==null?void 0:ln.loader,"sonner-loader"),"data-visible":re==="loading"},W.loading)}return J.createElement(dre,{className:ma(z?.loader,h==null||(We=h.classNames)==null?void 0:We.loader),visible:re==="loading"})}const js=h.icon||W?.[re]||cre(re);var Ma,Zt;return J.createElement("li",{tabIndex:0,ref:tn,className:ma(H,Ce,z?.toast,h==null||(t=h.classNames)==null?void 0:t.toast,z?.default,z?.[re],h==null||(n=h.classNames)==null?void 0:n[re]),"data-sonner-toast":"","data-rich-colors":(Ma=h.richColors)!=null?Ma:A,"data-styled":!(h.jsx||h.unstyled||v),"data-mounted":O,"data-promise":!!h.promise,"data-swiped":Pe,"data-removed":de,"data-visible":Z,"data-y-position":kn,"data-x-position":Gt,"data-index":k,"data-front":Pn,"data-swiping":Q,"data-dismissible":se,"data-type":re,"data-invert":ur,"data-swipe-out":xe,"data-swipe-direction":P,"data-expanded":!!(j||q&&O),"data-testid":h.testId,style:{"--index":k,"--toasts-before":k,"--z-index":E.length-k,"--offset":`${de?pt:Be.current}px`,"--initial-height":q?"auto":`${tt}px`,...N,...h.style},onDragEnd:()=>{ve(!1),$(null),Kt.current=null},onPointerDown:We=>{We.button!==2&&(Tn||!se||(qn.current=new Date,dt(Be.current),We.target.setPointerCapture(We.pointerId),We.target.tagName!=="BUTTON"&&(ve(!0),Kt.current={x:We.clientX,y:We.clientY})))},onPointerUp:()=>{var We,ln,Qn;if(xe||!se)return;Kt.current=null;const hr=Number(((We=tn.current)==null?void 0:We.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),ca=Number(((ln=tn.current)==null?void 0:ln.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),hn=new Date().getTime()-((Qn=qn.current)==null?void 0:Qn.getTime()),ai=ne==="x"?hr:ca,Wl=Math.abs(ai)/hn;if(Math.abs(ai)>=Ire||Wl>.11){dt(Be.current),h.onDismiss==null||h.onDismiss.call(h,h),V(ne==="x"?hr>0?"right":"left":ca>0?"down":"up"),Jn(),Ee(!0);return}else{var si,li;(si=tn.current)==null||si.style.setProperty("--swipe-amount-x","0px"),(li=tn.current)==null||li.style.setProperty("--swipe-amount-y","0px")}Fe(!1),ve(!1),$(null)},onPointerMove:We=>{var ln,Qn,hr;if(!Kt.current||!se||((ln=window.getSelection())==null?void 0:ln.toString().length)>0)return;const hn=We.clientY-Kt.current.y,ai=We.clientX-Kt.current.x;var Wl;const si=(Wl=e.swipeDirections)!=null?Wl:Nre(K);!ne&&(Math.abs(ai)>1||Math.abs(hn)>1)&&$(Math.abs(ai)>Math.abs(hn)?"x":"y");let li={x:0,y:0};const xu=Bo=>1/(1.5+Math.abs(Bo)/20);if(ne==="y"){if(si.includes("top")||si.includes("bottom"))if(si.includes("top")&&hn<0||si.includes("bottom")&&hn>0)li.y=hn;else{const Bo=hn*xu(hn);li.y=Math.abs(Bo)<Math.abs(hn)?Bo:hn}}else if(ne==="x"&&(si.includes("left")||si.includes("right")))if(si.includes("left")&&ai<0||si.includes("right")&&ai>0)li.x=ai;else{const Bo=ai*xu(ai);li.x=Math.abs(Bo)<Math.abs(ai)?Bo:ai}(Math.abs(li.x)>0||Math.abs(li.y)>0)&&Fe(!0),(Qn=tn.current)==null||Qn.style.setProperty("--swipe-amount-x",`${li.x}px`),(hr=tn.current)==null||hr.style.setProperty("--swipe-amount-y",`${li.y}px`)}},le&&!h.jsx&&re!=="loading"?J.createElement("button",{"aria-label":F,"data-disabled":Tn,"data-close-button":!0,onClick:Tn||!se?()=>{}:()=>{Jn(),h.onDismiss==null||h.onDismiss.call(h,h)},className:ma(z?.closeButton,h==null||(r=h.classNames)==null?void 0:r.closeButton)},(Zt=W?.close)!=null?Zt:gre):null,(re||h.icon||h.promise)&&h.icon!==null&&(W?.[re]!==null||h.icon)?J.createElement("div",{"data-icon":"",className:ma(z?.icon,h==null||(i=h.classNames)==null?void 0:i.icon)},h.promise||h.type==="loading"&&!h.icon?h.icon||la():null,h.type!=="loading"?js:null):null,J.createElement("div",{"data-content":"",className:ma(z?.content,h==null||(o=h.classNames)==null?void 0:o.content)},J.createElement("div",{"data-title":"",className:ma(z?.title,h==null||(a=h.classNames)==null?void 0:a.title)},h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title),h.description?J.createElement("div",{"data-description":"",className:ma(ee,oe,z?.description,h==null||(l=h.classNames)==null?void 0:l.description)},typeof h.description=="function"?h.description():h.description):null),J.isValidElement(h.cancel)?h.cancel:h.cancel&&Iv(h.cancel)?J.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||D,onClick:We=>{Iv(h.cancel)&&se&&(h.cancel.onClick==null||h.cancel.onClick.call(h.cancel,We),Jn())},className:ma(z?.cancelButton,h==null||(d=h.classNames)==null?void 0:d.cancelButton)},h.cancel.label):null,J.isValidElement(h.action)?h.action:h.action&&Iv(h.action)?J.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||L,onClick:We=>{Iv(h.action)&&(h.action.onClick==null||h.action.onClick.call(h.action,We),!We.defaultPrevented&&Jn())},className:ma(z?.actionButton,h==null||(f=h.classNames)==null?void 0:f.actionButton)},h.action.label):null)};function g$(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function Ore(e,t){const n={};return[e,t].forEach((r,i)=>{const o=i===1,a=o?"--mobile-offset":"--offset",l=o?Ere:kre;function d(f){["top","right","bottom","left"].forEach(m=>{n[`${a}-${m}`]=typeof f=="number"?`${f}px`:f})}typeof r=="number"||typeof r=="string"?d(r):typeof r=="object"?["top","right","bottom","left"].forEach(f=>{r[f]===void 0?n[`${a}-${f}`]=l:n[`${a}-${f}`]=typeof r[f]=="number"?`${r[f]}px`:r[f]}):d(l)}),n}const Dre=J.forwardRef(function(t,n){const{id:r,invert:i,position:o="bottom-right",hotkey:a=["altKey","KeyT"],expand:l,closeButton:d,className:f,offset:m,mobileOffset:h,theme:v="light",richColors:y,duration:x,style:S,visibleToasts:C=Cre,toastOptions:k,dir:E=g$(),gap:j=Rre,icons:I,containerAriaLabel:A="Notifications"}=t,[T,N]=J.useState([]),D=J.useMemo(()=>r?T.filter(O=>O.toasterId===r):T.filter(O=>!O.toasterId),[T,r]),L=J.useMemo(()=>Array.from(new Set([o].concat(D.filter(O=>O.position).map(O=>O.position)))),[D,o]),[H,ee]=J.useState([]),[G,K]=J.useState(!1),[B,q]=J.useState(!1),[z,W]=J.useState(v!=="system"?v:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),F=J.useRef(null),ne=a.join("+").replace(/Key/g,"").replace(/Digit/g,""),$=J.useRef(null),P=J.useRef(!1),V=J.useCallback(O=>{N(X=>{var de;return(de=X.find(ge=>ge.id===O.id))!=null&&de.delete||yi.dismiss(O.id),X.filter(({id:ge})=>ge!==O.id)})},[]);return J.useEffect(()=>yi.subscribe(O=>{if(O.dismiss){requestAnimationFrame(()=>{N(X=>X.map(de=>de.id===O.id?{...de,delete:!0}:de))});return}setTimeout(()=>{fE.flushSync(()=>{N(X=>{const de=X.findIndex(ge=>ge.id===O.id);return de!==-1?[...X.slice(0,de),{...X[de],...O},...X.slice(de+1)]:[O,...X]})})})}),[T]),J.useEffect(()=>{if(v!=="system"){W(v);return}if(v==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?W("dark"):W("light")),typeof window>"u")return;const O=window.matchMedia("(prefers-color-scheme: dark)");try{O.addEventListener("change",({matches:X})=>{W(X?"dark":"light")})}catch{O.addListener(({matches:de})=>{try{W(de?"dark":"light")}catch(ge){console.error(ge)}})}},[v]),J.useEffect(()=>{T.length<=1&&K(!1)},[T]),J.useEffect(()=>{const O=X=>{var de;if(a.every(ve=>X[ve]||X.code===ve)){var Q;K(!0),(Q=F.current)==null||Q.focus()}X.code==="Escape"&&(document.activeElement===F.current||(de=F.current)!=null&&de.contains(document.activeElement))&&K(!1)};return document.addEventListener("keydown",O),()=>document.removeEventListener("keydown",O)},[a]),J.useEffect(()=>{if(F.current)return()=>{$.current&&($.current.focus({preventScroll:!0}),$.current=null,P.current=!1)}},[F.current]),J.createElement("section",{ref:n,"aria-label":`${A} ${ne}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},L.map((O,X)=>{var de;const[ge,Q]=O.split("-");return D.length?J.createElement("ol",{key:O,dir:E==="auto"?g$():E,tabIndex:-1,ref:F,className:f,"data-sonner-toaster":!0,"data-sonner-theme":z,"data-y-position":ge,"data-x-position":Q,style:{"--front-toast-height":`${((de=H[0])==null?void 0:de.height)||0}px`,"--width":`${jre}px`,"--gap":`${j}px`,...S,...Ore(m,h)},onBlur:ve=>{P.current&&!ve.currentTarget.contains(ve.relatedTarget)&&(P.current=!1,$.current&&($.current.focus({preventScroll:!0}),$.current=null))},onFocus:ve=>{ve.target instanceof HTMLElement&&ve.target.dataset.dismissible==="false"||P.current||(P.current=!0,$.current=ve.relatedTarget)},onMouseEnter:()=>K(!0),onMouseMove:()=>K(!0),onMouseLeave:()=>{B||K(!1)},onDragEnd:()=>K(!1),onPointerDown:ve=>{ve.target instanceof HTMLElement&&ve.target.dataset.dismissible==="false"||q(!0)},onPointerUp:()=>q(!1)},D.filter(ve=>!ve.position&&X===0||ve.position===O).map((ve,xe)=>{var Ee,Pe;return J.createElement(Are,{key:ve.id,icons:I,index:xe,toast:ve,defaultRichColors:y,duration:(Ee=k?.duration)!=null?Ee:x,className:k?.className,descriptionClassName:k?.descriptionClassName,invert:i,visibleToasts:C,closeButton:(Pe=k?.closeButton)!=null?Pe:d,interacting:B,position:O,style:k?.style,unstyled:k?.unstyled,classNames:k?.classNames,cancelButtonStyle:k?.cancelButtonStyle,actionButtonStyle:k?.actionButtonStyle,closeButtonAriaLabel:k?.closeButtonAriaLabel,removeToast:V,toasts:D.filter(Fe=>Fe.position==ve.position),heights:H.filter(Fe=>Fe.position==ve.position),setHeights:ee,expandByDefault:l,gap:j,expanded:G,swipeDirections:t.swipeDirections})})):null}))});function v$(e){let t="Error",n="We had some trouble!";console.error(e);const r=e,i=e;if(typeof e=="string"?n=e:r?.response?.data?typeof r.response.data=="string"?n=r.response.data:r.response.data.error?n=r.response.data.error:r.response.data.message&&(n=r.response.data.message):i?.message&&(n=i.message),n.includes(":")){const o=n.split(":");t=o.shift(),n=o.join(":")}ye.error(t,{description:n,action:{label:"Dismiss",onClick:()=>ye.dismiss()}})}const Nc=new qX({queryCache:new Yz({onError:v$}),mutationCache:new Zz({onError:v$})});function Lo(e){return!!e}const Kb={log:"log",debug:"debug",info:"info",warn:"warn",error:"error"},as=console,bd={};Object.keys(Kb).forEach(e=>{bd[e]=as[e]});const Vp="Datadog Browser SDK:",yt={debug:bd.debug.bind(as,Vp),log:bd.log.bind(as,Vp),info:bd.info.bind(as,Vp),warn:bd.warn.bind(as,Vp),error:bd.error.bind(as,Vp)},Gb="https://docs.datadoghq.com",$re=`${Gb}/real_user_monitoring/browser/troubleshooting`,bE="More details:";function eL(e,t){return(...n)=>{try{return e(...n)}catch(r){yt.error(t,r)}}}function Sc(e){return e!==0&&Math.random()*100<=e}function _d(e,t){return+e.toFixed(t)}function Pre(e){return ih(e)&&e>=0&&e<=100}function ih(e){return typeof e=="number"}function Vc(e){return{...e}}function Uy(e,t){return Object.keys(e).some(n=>e[n]===t)}function $l(e){return Object.keys(e).length===0}function tL(e,t){const n={};for(const r of Object.keys(e))n[r]=t(e[r]);return n}function ti(){if(typeof globalThis=="object")return globalThis;Object.defineProperty(Object.prototype,"_dd_temp_",{get(){return this},configurable:!0});let e=_dd_temp_;return delete Object.prototype._dd_temp_,typeof e!="object"&&(typeof self=="object"?e=self:typeof window=="object"?e=window:e={}),e}const ja=ti(),oh="WorkerGlobalScope"in ja;function fs(e,t){const n=ti();let r;return n.Zone&&typeof n.Zone.__symbol__=="function"&&(r=e[n.Zone.__symbol__(t)]),r||(r=e[t]),r}let wC,nL=!1;function Mre(e){wC=e}function zre(e){nL=e}function Et(e){return function(...t){return Yo(e,this,t)}}function Yo(e,t,n){try{return e.apply(t,n)}catch(r){iu(r)}}function iu(e){if(SC(e),wC)try{wC(e)}catch(t){SC(t)}}function SC(...e){nL&&yt.error("[MONITOR]",...e)}function zr(e,t){return fs(ti(),"setTimeout")(Et(e),t)}function ko(e){fs(ti(),"clearTimeout")(e)}function _f(e,t){return fs(ti(),"setInterval")(Et(e),t)}function Zb(e){fs(ti(),"clearInterval")(e)}function y$(e){var t;const n=(t=ja.queueMicrotask)===null||t===void 0?void 0:t.bind(ja);typeof n=="function"?n(Et(e)):Promise.resolve().then(Et(e))}class Ft{constructor(t){this.onFirstSubscribe=t,this.observers=[]}subscribe(t){return this.addObserver(t),{unsubscribe:()=>this.removeObserver(t)}}notify(t){this.observers.forEach(n=>n(t))}addObserver(t){this.observers.push(t),this.observers.length===1&&this.onFirstSubscribe&&(this.onLastUnsubscribe=this.onFirstSubscribe(this)||void 0)}removeObserver(t){this.observers=this.observers.filter(n=>t!==n),!this.observers.length&&this.onLastUnsubscribe&&this.onLastUnsubscribe()}}function rL(...e){return new Ft(t=>{const n=e.map(r=>r.subscribe(i=>t.notify(i)));return()=>n.forEach(r=>r.unsubscribe())})}class iL extends Ft{constructor(t){super(),this.maxBufferSize=t,this.buffer=[]}notify(t){this.buffer.push(t),this.buffer.length>this.maxBufferSize&&this.buffer.shift(),super.notify(t)}subscribe(t){let n=!1;const r={unsubscribe:()=>{n=!0,this.removeObserver(t)}};return y$(()=>{for(const i of this.buffer){if(n)return;t(i)}n||this.addObserver(t)}),r}unbuffer(){y$(()=>{this.maxBufferSize=this.buffer.length=0})}}const Ur=1e3,ni=60*Ur,oL=60*ni,Lre=24*oL,aL=365*Lre;function Yb(e){return{relative:e,timeStamp:Fre(e)}}function sL(e){return{relative:cL(e),timeStamp:e}}function Fre(e){const t=Qr()-performance.now();return t>ah()?Math.round(Pl(t,e)):Vre(e)}function Ure(){return Math.round(Qr()-Pl(ah(),performance.now()))}function ht(e){return ih(e)?_d(e*1e6,0):e}function Qr(){return new Date().getTime()}function wr(){return Qr()}function Ji(){return performance.now()}function Bn(){return{relative:Ji(),timeStamp:wr()}}function lL(){return{relative:0,timeStamp:ah()}}function Xn(e,t){return t-e}function Pl(e,t){return e+t}function cL(e){return e-ah()}function Vre(e){return Math.round(Pl(ah(),e))}function Bre(e){return e<aL}let T_;function ah(){var e,t;return T_===void 0&&(T_=(t=(e=performance.timing)===null||e===void 0?void 0:e.navigationStart)!==null&&t!==void 0?t:performance.timeOrigin),T_}function Wb(e,t,n){const r=n&&n.leading!==void 0?n.leading:!0,i=n&&n.trailing!==void 0?n.trailing:!0;let o=!1,a,l;return{throttled:(...d)=>{if(o){a=d;return}r?e(...d):a=d,o=!0,l=zr(()=>{i&&a&&e(...a),o=!1,a=void 0},t)},cancel:()=>{ko(l),o=!1,a=void 0}}}function on(){}function ei(e){return e?(parseInt(e,10)^Math.random()*16>>parseInt(e,10)/4).toString(16):`10000000-1000-4000-8000-${1e11}`.replace(/[018]/g,ei)}const Gd=/(\S+?)\s*=\s*(.+?)(?:;|$)/g;function Tm(e,t){for(Gd.lastIndex=0;;){const n=Gd.exec(e);if(n){if(n[1]===t)return n[2]}else break}}function Hre(e){const t=new Map;for(Gd.lastIndex=0;;){const n=Gd.exec(e);if(n){const r=n[1],i=n[2];t.has(r)?t.get(r).push(i):t.set(r,[i])}else break}return t}function qre(e){const t=new Map;for(Gd.lastIndex=0;;){const n=Gd.exec(e);if(n)t.set(n[1],n[2]);else break}return t}function xE(e,t,n=""){const r=e.charCodeAt(t-1),o=r>=55296&&r<=56319?t+1:t;return e.length<=o?e:`${e.slice(0,o)}${n}`}function Kre(){return uL()===0}function qPe(){return uL()===1}let Tv;function uL(){return Tv??(Tv=Gre())}function Gre(e=window){var t;const n=e.navigator.userAgent;return e.chrome||/HeadlessChrome/.test(n)?0:((t=e.navigator.vendor)===null||t===void 0?void 0:t.indexOf("Apple"))===0||/safari/i.test(n)&&!/chrome|android/i.test(n)?1:2}function wE(e){return Xb(e,location.href).href}function Zre(e){try{return!!Xb(e)}catch{return!1}}function Yre(e){const t=Xb(e).pathname;return t[0]==="/"?t:`/${t}`}function Xb(e,t){const{URL:n}=Wre();try{return t!==void 0?new n(e,t):new n(e)}catch(r){throw new Error(`Failed to construct URL: ${String(r)}`)}}let N_;function Wre(){if(!N_){let e,t;try{e=document.createElement("iframe"),e.style.display="none",document.body.appendChild(e),t=e.contentWindow}catch{t=ja}N_={URL:t.URL},e?.remove()}return N_}function Jb(e,t,n=0,r){const i=new Date;i.setTime(i.getTime()+n);const o=`expires=${i.toUTCString()}`,a=r&&r.crossSite?"none":"strict",l=r&&r.domain?`;domain=${r.domain}`:"",d=r&&r.secure?";secure":"",f=r&&r.partitioned?";partitioned":"";document.cookie=`${e}=${t};${o};path=/;samesite=${a}${l}${d}${f}`}function Qb(e){return Tm(document.cookie,e)}function Xre(e){return Hre(document.cookie).get(e)||[]}let A_;function dl(e){return A_||(A_=qre(document.cookie)),A_.get(e)}function dL(e,t){Jb(e,"",0,t)}function Jre(e){if(document.cookie===void 0||document.cookie===null)return!1;try{const t=`dd_cookie_test_${ei()}`,n="test";Jb(t,n,ni,e);const r=Qb(t)===n;return dL(t,e),r}catch(t){return yt.error(t),!1}}let O_;function fL(e=location.hostname,t=document.referrer){if(O_===void 0){const n=Qre(e,t);if(n){const r=`dd_site_test_${ei()}`,i="test",o=n.split(".");let a=o.pop();for(;o.length&&!Qb(r);)a=`${o.pop()}.${a}`,Jb(r,i,Ur,{domain:a});dL(r,{domain:a}),O_=a}}return O_}function Qre(e,t){try{return e||Xb(t).hostname}catch{}}const ps="_dd_s";function SE(e,t){for(let n=e.length-1;n>=0;n-=1){const r=e[n];if(t(r,n,e))return r}}function pL(e){return Object.values(e)}function ex(e){return Object.entries(e)}const Ml=4*oL,mL=15*ni,eie=aL,hL="0",Ao={COOKIE:"cookie",MEMORY:"memory",LOCAL_STORAGE:"local-storage"},gL=/^([a-zA-Z]+)=([a-z0-9-]+)$/,_E="&";function tie(e){return!!e&&(e.indexOf(_E)!==-1||gL.test(e))}const nie="1";function ol(e,t){const n={isExpired:nie};return t.trackAnonymousUser&&e?.anonymousId&&(n.anonymousId=e?.anonymousId),n}function hy(e){return $l(e)}function vL(e){return!hy(e)}function hm(e){return e.isExpired!==void 0||!rie(e)}function rie(e){return(e.created===void 0||Qr()-Number(e.created)<Ml)&&(e.expire===void 0||Qr()<Number(e.expire))}function yL(e){e.expire=String(Qr()+mL)}function _C(e){return ex(e).map(([t,n])=>t==="anonymousId"?`aid=${n}`:`${t}=${n}`).join(_E)}function tx(e){const t={};return tie(e)&&e.split(_E).forEach(n=>{const r=gL.exec(n);if(r!==null){const[,i,o]=r;i==="aid"?t.anonymousId=o:t[i]=o}}),t}const iie="_dd",oie="_dd_r",aie="_dd_l",sie="rum",lie="logs";function cie(e){if(!dl(ps)){const n=dl(iie),r=dl(oie),i=dl(aie),o={};n&&(o.id=n),i&&/^[01]$/.test(i)&&(o[lie]=i),r&&/^[012]$/.test(r)&&(o[sie]=r),vL(o)&&(yL(o),e.persistSession(o))}}const uie=0;function die(e){const t=pie(e);return t&&Jre(t)?{type:Ao.COOKIE,cookieOptions:t}:void 0}function fie(e,t){const n={isLockEnabled:Kre(),persistSession:r=>b$(t,e,r,mL),retrieveSession:()=>bL(t,e),expireSession:r=>b$(t,e,ol(r,e),Ml)};return cie(n),n}function b$(e,t,n,r){let i=_C(n);t.betaEncodeCookieOptions&&(i=_C({...n,...$l(n)?{}:{c:xL(e)}})),Jb(ps,i,t.trackAnonymousUser?eie:r,e)}function bL(e,t){if(t.betaEncodeCookieOptions)return mie(e);const n=Qb(ps);return tx(n)}function pie(e){const t={};if(t.secure=!!e.useSecureSessionCookie||!!e.usePartitionedCrossSiteSessionCookie,t.crossSite=!!e.usePartitionedCrossSiteSessionCookie,t.partitioned=!!e.usePartitionedCrossSiteSessionCookie,e.trackSessionAcrossSubdomains){const n=fL();if(!n)return;t.domain=n}return t}function xL(e){const t=e.domain?e.domain.split(".").length-1:0;let n=0;return n|=uie<<5,n|=t<<1,n|=e.crossSite?1:0,n.toString(16)}function mie(e){const t=Xre(ps),n=xL(e);let r;for(const i of t.reverse())if(r=tx(i),r.c===n)break;return r==null||delete r.c,r??{}}const hie="_dd_test_";function gie(){try{const e=ei(),t=`${hie}${e}`;localStorage.setItem(t,e);const n=localStorage.getItem(t);return localStorage.removeItem(t),e===n?{type:Ao.LOCAL_STORAGE}:void 0}catch{return}}function vie(e){return{isLockEnabled:!1,persistSession:wL,retrieveSession:SL,expireSession:t=>yie(t,e)}}function wL(e){localStorage.setItem(ps,_C(e))}function SL(){const e=localStorage.getItem(ps);return tx(e)}function yie(e,t){wL(ol(e,t))}const bie=10,xie=100,wie=Ur,_L="--",CL=[];let gy;function gc(e,t,n=0){var r;const{isLockEnabled:i,persistSession:o,expireSession:a}=t,l=v=>o({...v,lock:f}),d=()=>{const{lock:v,...y}=t.retrieveSession();return{session:y,lock:v&&!_ie(v)?v:void 0}};if(gy||(gy=e),e!==gy){CL.push(e);return}if(i&&n>=xie){x$(t);return}let f,m=d();if(i){if(m.lock){Nv(e,t,n);return}if(f=Sie(),l(m.session),m=d(),m.lock!==f){Nv(e,t,n);return}}let h=e.process(m.session);if(i&&(m=d(),m.lock!==f)){Nv(e,t,n);return}if(h&&(hm(h)?a(h):(yL(h),i?l(h):o(h))),i&&!(h&&hm(h))){if(m=d(),m.lock!==f){Nv(e,t,n);return}o(m.session),h=m.session}(r=e.after)===null||r===void 0||r.call(e,h||m.session),x$(t)}function Nv(e,t,n){zr(()=>{gc(e,t,n+1)},bie)}function x$(e){gy=void 0;const t=CL.shift();t&&gc(t,e)}function Sie(){return ei()+_L+wr()}function _ie(e){const[,t]=e.split(_L);return!t||Xn(Number(t),wr())>wie}const vy="_DD_SESSION";function Cie(){return{type:Ao.MEMORY}}function kie(e){return{expireSession:t=>jie(t,e),isLockEnabled:!1,persistSession:kL,retrieveSession:Eie}}function Eie(){const e=ti();return e[vy]||(e[vy]={}),Vc(e[vy])}function kL(e){const t=ti();t[vy]=Vc(e)}function jie(e,t){kL(ol(e,t))}const w$=Ur;function Rie(e){const{sessionPersistence:t}=e,n=Iie(t,e);for(const r of n){const i=Tie(r,e);if(i!==void 0)return i}}function Iie(e,t){return Array.isArray(e)?e:e!==void 0?[e]:t.allowFallbackToLocalStorage?[Ao.COOKIE,Ao.LOCAL_STORAGE]:[Ao.COOKIE]}function Tie(e,t){switch(e){case Ao.COOKIE:return die(t);case Ao.LOCAL_STORAGE:return gie();case Ao.MEMORY:return Cie();default:yt.error(`Invalid session persistence '${String(e)}'`);return}}function Nie(e,t){return e.type===Ao.COOKIE?fie(t,e.cookieOptions):e.type===Ao.LOCAL_STORAGE?vie(t):kie(t)}function Aie(e,t,n,r,i=Nie(e,t)){const o=new Ft,a=new Ft,l=new Ft,d=_f(y,w$);let f;S();const{throttled:m,cancel:h}=Wb(()=>{gc({process:T=>{if(hy(T))return;const N=x(T);return C(N),N},after:T=>{vL(T)&&!k()&&I(T),f=T}},i)},w$);function v(){gc({process:T=>k()?x(T):void 0},i)}function y(){const T=i.retrieveSession();hm(T)?gc({process:N=>hm(N)?ol(N,t):void 0,after:x},i):x(T)}function x(T){return hm(T)&&(T=ol(T,t)),k()&&(E(T)?j():(l.notify({previousState:f,newState:T}),f=T)),T}function S(){gc({process:T=>{if(hy(T))return T.anonymousId=ei(),ol(T,t)},after:T=>{f=T}},i)}function C(T){if(hy(T))return!1;const N=r(T[n]);T[n]=N,delete T.isExpired,N!==hL&&!T.id&&(T.id=ei(),T.created=String(Qr()))}function k(){return f?.[n]!==void 0}function E(T){return f.id!==T.id||f[n]!==T[n]}function j(){f=ol(f,t),a.notify()}function I(T){f=T,o.notify()}function A(T){gc({process:N=>({...N,...T}),after:x},i)}return{expandOrRenewSession:m,expandSession:v,getSession:()=>f,renewObservable:o,expireObservable:a,sessionStateUpdateObservable:l,restartSession:S,expire:T=>{h(),T===!1&&f&&delete f.anonymousId,i.expireSession(f),x(ol(f,t))},stop:()=>{Zb(d)},updateSessionState:A}}const CC={GRANTED:"granted",NOT_GRANTED:"not-granted"};function Oie(e){const t=new Ft;return{tryToInit(n){e||(e=n)},update(n){e=n,t.notify()},isGranted(){return e===CC.GRANTED},observable:t}}function Cf(e){return e===null?"null":Array.isArray(e)?"array":typeof e}function ou(e){return Cf(e)==="object"}function Vy(e){const t=Cf(e);return t==="string"||t==="function"||e instanceof RegExp}function nx(e,t,n=!1){return e.some(r=>{try{if(typeof r=="function")return r(t);if(r instanceof RegExp)return r.test(t);if(typeof r=="string")return n?t.startsWith(r):r===t}catch(i){yt.error(i)}return!1})}const Die=["chrome-extension://","moz-extension://"];function S$(e){return Die.some(t=>e.includes(t))}function $ie(e,t=""){if(S$(e))return!1;const r=t.split(`
31
+ `).filter(i=>{const o=i.trim();return o.length&&/^at\s+|@/.test(o)})[1]||"";return S$(r)}const Pie="Running the Browser SDK in a Web extension content script is forbidden unless the `allowedTrackingOrigins` option is provided.",Mie="SDK initialized on a non-allowed domain.";function zie(e,t,n=typeof location<"u"?location.origin:""){const r=e.allowedTrackingOrigins;if(!r)return $ie(n,t)?(yt.error(Pie),!1):!0;const i=nx(r,n);return i||yt.error(Mie),i}const EL="datad0g.com",Lie="dd0g-gov.com",_c="datadoghq.com",Fie="datadoghq.eu",Uie="ddog-gov.com",Vie="pci.browser-intake-datadoghq.com",Bie=["ddsource","dd-api-key","dd-request-id"];function rl(e,t,n){const r=Hie(e,t);return{build(i,o){const a=qie(e,t,i,o,n);return r(a)},trackType:t}}function Hie(e,t){const n=`/api/v2/${t}`,r=e.proxy;if(typeof r=="string"){const o=wE(r);return a=>`${o}?ddforward=${encodeURIComponent(`${n}?${a}`)}`}if(typeof r=="function")return o=>r({path:n,parameters:o});const i=jL(t,e);return o=>`https://${i}${n}?${o}`}function jL(e,t){const{site:n=_c,internalAnalyticsSubdomain:r}=t;if(e==="logs"&&t.usePciIntake&&n===_c)return Vie;if(r&&n===_c)return`${r}.${_c}`;if(n===Lie)return`http-intake.logs.${n}`;const i=n.split("."),o=i.pop();return`browser-intake-${i.join("-")}.${o}`}function qie({clientToken:e,internalAnalyticsSubdomain:t,source:n="browser"},r,i,{retry:o,encoding:a},l=[]){const d=[`ddsource=${n}`,`dd-api-key=${e}`,`dd-evp-origin-version=${encodeURIComponent("6.27.1")}`,"dd-evp-origin=browser",`dd-request-id=${ei()}`].concat(l);return a&&d.push(`dd-evp-encoding=${a}`),r==="rum"&&(d.push(`batch_time=${wr()}`,`_dd.api=${i}`),o&&d.push(`_dd.retry_count=${o.count}`,`_dd.retry_after=${o.lastFailureStatus}`)),t&&d.reverse(),d.join("&")}function Kie(e){const t=e.site||_c,n=Gie(e.source),r=Zie({...e,site:t,source:n});return{replica:Yie({...e,site:t,source:n}),site:t,source:n,...r}}function Gie(e){return e==="flutter"||e==="unity"?e:"browser"}function Zie(e){return{logsEndpointBuilder:rl(e,"logs"),rumEndpointBuilder:rl(e,"rum"),profilingEndpointBuilder:rl(e,"profile"),sessionReplayEndpointBuilder:rl(e,"replay"),exposuresEndpointBuilder:rl(e,"exposures"),flagEvaluationEndpointBuilder:rl(e,"flagevaluation")}}function Yie(e){if(!e.replica)return;const t={...e,site:_c,clientToken:e.replica.clientToken};return{logsEndpointBuilder:rl(t,"logs"),rumEndpointBuilder:rl(t,"rum",[`application.id=${e.replica.applicationId}`])}}function Wie(e){return Bie.every(t=>e.includes(t))}const Cd={ALLOW:"allow",MASK:"mask",MASK_USER_INPUT:"mask-user-input",MASK_UNLESS_ALLOWLISTED:"mask-unless-allowlisted"},kC={ALL:"all",SAMPLED:"sampled"};function D_(e,t){return e!=null&&typeof e!="string"?(yt.error(`${t} must be defined as a string`),!1):!0}function Xie(e){return e&&typeof e=="string"&&!/(datadog|ddog|datad0g|dd0g)/.test(e)?(yt.error(`Site should be a valid Datadog site. ${bE} ${Gb}/getting_started/site/.`),!1):!0}function kd(e,t){return e!==void 0&&!Pre(e)?(yt.error(`${t} Sample Rate should be a number between 0 and 100`),!1):!0}function Jie(e,t){var n,r,i,o,a,l,d,f,m,h;if(!e||!e.clientToken){yt.error("Client Token is not configured, we will not send any data.");return}if(e.allowedTrackingOrigins!==void 0&&!Array.isArray(e.allowedTrackingOrigins)){yt.error("Allowed Tracking Origins must be an array");return}if(!(!Xie(e.site)||!kd(e.sessionSampleRate,"Session")||!kd(e.telemetrySampleRate,"Telemetry")||!kd(e.telemetryConfigurationSampleRate,"Telemetry Configuration")||!kd(e.telemetryUsageSampleRate,"Telemetry Usage")||!D_(e.version,"Version")||!D_(e.env,"Env")||!D_(e.service,"Service")||!zie(e,t??""))){if(e.trackingConsent!==void 0&&!Uy(CC,e.trackingConsent)){yt.error('Tracking Consent should be either "granted" or "not-granted"');return}return{beforeSend:e.beforeSend&&eL(e.beforeSend,"beforeSend threw an error:"),sessionStoreStrategyType:oh?void 0:Rie(e),sessionSampleRate:(n=e.sessionSampleRate)!==null&&n!==void 0?n:100,telemetrySampleRate:(r=e.telemetrySampleRate)!==null&&r!==void 0?r:20,telemetryConfigurationSampleRate:(i=e.telemetryConfigurationSampleRate)!==null&&i!==void 0?i:5,telemetryUsageSampleRate:(o=e.telemetryUsageSampleRate)!==null&&o!==void 0?o:5,service:(a=e.service)!==null&&a!==void 0?a:void 0,env:(l=e.env)!==null&&l!==void 0?l:void 0,version:(d=e.version)!==null&&d!==void 0?d:void 0,datacenter:(f=e.datacenter)!==null&&f!==void 0?f:void 0,silentMultipleInit:!!e.silentMultipleInit,allowUntrustedEvents:!!e.allowUntrustedEvents,trackingConsent:(m=e.trackingConsent)!==null&&m!==void 0?m:CC.GRANTED,trackAnonymousUser:(h=e.trackAnonymousUser)!==null&&h!==void 0?h:!0,storeContextsAcrossPages:!!e.storeContextsAcrossPages,betaEncodeCookieOptions:!!e.betaEncodeCookieOptions,variant:e.variant,sdkVersion:e.sdkVersion,...Kie(e)}}}function Qie(e){return{session_sample_rate:e.sessionSampleRate,telemetry_sample_rate:e.telemetrySampleRate,telemetry_configuration_sample_rate:e.telemetryConfigurationSampleRate,telemetry_usage_sample_rate:e.telemetryUsageSampleRate,use_before_send:!!e.beforeSend,use_partitioned_cross_site_session_cookie:e.usePartitionedCrossSiteSessionCookie,use_secure_session_cookie:e.useSecureSessionCookie,use_proxy:!!e.proxy,silent_multiple_init:e.silentMultipleInit,track_session_across_subdomains:e.trackSessionAcrossSubdomains,track_anonymous_user:e.trackAnonymousUser,session_persistence:Array.isArray(e.sessionPersistence)?e.sessionPersistence[0]:e.sessionPersistence,allow_fallback_to_local_storage:!!e.allowFallbackToLocalStorage,store_contexts_across_pages:!!e.storeContextsAcrossPages,allow_untrusted_events:!!e.allowUntrustedEvents,tracking_consent:e.trackingConsent,use_allowed_tracking_origins:Array.isArray(e.allowedTrackingOrigins),beta_encode_cookie_options:e.betaEncodeCookieOptions,source:e.source,sdk_version:e.sdkVersion,variant:e.variant}}var Po;(function(e){e.TRACK_INTAKE_REQUESTS="track_intake_requests",e.USE_TREE_WALKER_FOR_ACTION_NAME="use_tree_walker_for_action_name",e.FEATURE_OPERATION_VITAL="feature_operation_vital",e.SHORT_SESSION_INVESTIGATION="short_session_investigation",e.AVOID_FETCH_KEEPALIVE="avoid_fetch_keepalive",e.START_STOP_ACTION="start_stop_action",e.USE_CHANGE_RECORDS="use_change_records",e.SOURCE_CODE_CONTEXT="source_code_context",e.LCP_SUBPARTS="lcp_subparts"})(Po||(Po={}));const CE=new Set;function eoe(e){Array.isArray(e)&&toe(e.filter(t=>Uy(Po,t)))}function toe(e){e.forEach(t=>{CE.add(t)})}function ms(e){return CE.has(e)}function noe(){return CE}const Zd="?";function kf(e){var t,n;const r=[];let i=$_(e,"stack");const o=String(e);if(i&&i.startsWith(o)&&(i=i.slice(o.length)),i&&i.split(`
32
+ `).forEach(a=>{const l=ooe(a)||loe(a)||uoe(a)||poe(a);l&&(!l.func&&l.line&&(l.func=Zd),r.push(l))}),r.length>0&&voe()&&e instanceof Error){const a=[];let l=e;for(;(l=Object.getPrototypeOf(l))&&IL(l);){const d=((t=l.constructor)===null||t===void 0?void 0:t.name)||Zd;a.push(d)}for(let d=a.length-1;d>=0&&((n=r[0])===null||n===void 0?void 0:n.func)===a[d];d--)r.shift()}return{message:$_(e,"message"),name:$_(e,"name"),stack:r}}const RL="((?:file|https?|blob|chrome-extension|electron|native|eval|webpack|snippet|<anonymous>|\\w+\\.|\\/).*?)",Yd="(?::(\\d+))",roe=new RegExp(`^\\s*at (.*?) ?\\(${RL}${Yd}?${Yd}?\\)?\\s*$`,"i"),ioe=new RegExp(`\\((\\S*)${Yd}${Yd}\\)`);function ooe(e){const t=roe.exec(e);if(!t)return;const n=t[2]&&t[2].indexOf("native")===0,r=t[2]&&t[2].indexOf("eval")===0,i=ioe.exec(t[2]);return r&&i&&(t[2]=i[1],t[3]=i[2],t[4]=i[3]),{args:n?[t[2]]:[],column:t[4]?+t[4]:void 0,func:t[1]||Zd,line:t[3]?+t[3]:void 0,url:n?void 0:t[2]}}const aoe="(?:(.*)?(?: @))",soe=new RegExp(`^\\s*at\\s*${aoe}?\\s*${RL}${Yd}?${Yd}??\\s*$`,"i");function loe(e){const t=soe.exec(e);if(t)return{args:[],column:t[4]?+t[4]:void 0,func:t[1]||Zd,line:t[3]?+t[3]:void 0,url:t[2]}}const coe=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function uoe(e){const t=coe.exec(e);if(t)return{args:[],column:t[4]?+t[4]:void 0,func:t[1]||Zd,line:+t[3],url:t[2]}}const doe=/^\s*(.*?)(?:\((.*?)\))?(?:(?:(?:^|@)((?:file|https?|blob|chrome|webpack|resource|capacitor|\[native).*?|[^@]*bundle|\[wasm code\])(?::(\d+))?(?::(\d+))?)|@)\s*$/i,foe=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function poe(e){const t=doe.exec(e);if(!t)return;const n=t[3]&&t[3].indexOf(" > eval")>-1,r=foe.exec(t[3]);return n&&r&&(t[3]=r[1],t[4]=r[2],t[5]=void 0),{args:t[2]?t[2].split(","):[],column:t[5]?+t[5]:void 0,func:t[1]||Zd,line:t[4]?+t[4]:void 0,url:t[3]}}function $_(e,t){return ou(e)&&typeof e[t]=="string"?e[t]:void 0}function moe(e,t,n,r){if(t===void 0)return;const{name:i,message:o}=goe(e);return{name:i,message:o,stack:[{url:t,column:r,line:n}]}}const hoe=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?([\s\S]*)$/;function goe(e){let t,n;return{}.toString.call(e)==="[object String]"&&([,t,n]=hoe.exec(e)),{name:t,message:n}}function IL(e){return String(e.constructor).startsWith("class ")}let Av;function voe(){if(Av!==void 0)return Av;class e extends Error{constructor(){super(),this.name="Error"}}const[t,n]=[e,Error].map(r=>new r);return Av=IL(Object.getPrototypeOf(t))&&n.stack!==t.stack,Av}function al(e){const n=new Error(e);n.name="HandlingStack";let r;return Yo(()=>{const i=kf(n);i.stack=i.stack.slice(2),r=rx(i)}),r}function rx(e){let t=TL(e);return e.stack.forEach(n=>{const r=n.func==="?"?"<anonymous>":n.func,i=n.args&&n.args.length>0?`(${n.args.join(", ")})`:"",o=n.line?`:${n.line}`:"",a=n.line&&n.column?`:${n.column}`:"";t+=`
33
+ at ${r}${i} @ ${n.url}${o}${a}`}),t}function TL(e){return`${e.name||"Error"}: ${e.message}`}function Ca(e,t,n,{computeHandlingStack:r}={}){let i=e[t];if(typeof i!="function")if(t in e&&typeof t=="string"&&t.startsWith("on"))i=on;else return{stop:on};let o=!1;const a=function(){if(o)return i.apply(this,arguments);const l=Array.from(arguments);let d;Yo(n,null,[{target:this,parameters:l,onPostCall:m=>{d=m},handlingStack:r?al("instrumented method"):void 0}]);const f=i.apply(this,l);return d&&Yo(d,null,[f]),f};return e[t]=a,{stop:()=>{o=!0,e[t]===a&&(e[t]=i)}}}function KPe(e,t,n){const r=Object.getOwnPropertyDescriptor(e,t);if(!r||!r.set||!r.configurable)return{stop:on};const i=on;let o=(l,d)=>{zr(()=>{o!==i&&n(l,d)},0)};const a=function(l){r.set.call(this,l),o(this,l)};return Object.defineProperty(e,t,{set:a}),{stop:()=>{var l;((l=Object.getOwnPropertyDescriptor(e,t))===null||l===void 0?void 0:l.set)===a&&Object.defineProperty(e,t,r),o=i}}}const au=1024,NL=1024*au,yoe=/[^\u0000-\u007F]/;function AL(e){return yoe.test(e)?window.TextEncoder!==void 0?new TextEncoder().encode(e).length:new Blob([e]).size:e.length}function OL(e){if(e.length===1)return e[0];const t=e.reduce((i,o)=>i+o.length,0),n=new Uint8Array(t);let r=0;for(const i of e)n.set(i,r),r+=i.length;return n}function Wd(e,t,n){if(typeof e!="object"||e===null)return JSON.stringify(e);const r=Ed(Object.prototype),i=Ed(Array.prototype),o=Ed(Object.getPrototypeOf(e)),a=Ed(e);try{return JSON.stringify(e,t,n)}catch{return"<error: unable to serialize object>"}finally{r(),i(),o(),a()}}function Ed(e){const t=e,n=t.toJSON;return n?(delete t.toJSON,()=>{t.toJSON=n}):on}const boe=220*au,xoe="$",woe=3;function qt(e,t=boe){const n=Ed(Object.prototype),r=Ed(Array.prototype),i=[],o=new WeakMap,a=P_(e,xoe,void 0,i,o),l=JSON.stringify(a);let d=l?l.length:0;if(d>t){M_(t,"discarded",e);return}for(;i.length>0&&d<t;){const f=i.shift();let m=0;if(Array.isArray(f.source))for(let h=0;h<f.source.length;h++){const v=P_(f.source[h],f.path,h,i,o);if(v!==void 0?d+=JSON.stringify(v).length:d+=4,d+=m,m=1,d>t){M_(t,"truncated",e);break}f.target[h]=v}else for(const h in f.source)if(Object.prototype.hasOwnProperty.call(f.source,h)){const v=P_(f.source[h],f.path,h,i,o);if(v!==void 0&&(d+=JSON.stringify(v).length+m+h.length+woe,m=1),d>t){M_(t,"truncated",e);break}f.target[h]=v}}return n(),r(),a}function P_(e,t,n,r,i){const o=Coe(e);if(!o||typeof o!="object")return Soe(o);const a=EC(o);if(a!=="[Object]"&&a!=="[Array]"&&a!=="[Error]")return a;const l=e;if(i.has(l))return`[Reference seen at ${i.get(l)}]`;const d=n!==void 0?`${t}.${n}`:t,f=Array.isArray(o)?[]:{};return i.set(l,d),r.push({source:o,target:f,path:d}),f}function Soe(e){return typeof e=="bigint"?`[BigInt] ${e.toString()}`:typeof e=="function"?`[Function] ${e.name||"unknown"}`:typeof e=="symbol"?`[Symbol] ${e.description||e.toString()}`:e}function EC(e){try{if(e instanceof Event)return _oe(e);if(e instanceof RegExp)return`[RegExp] ${e.toString()}`;const n=Object.prototype.toString.call(e).match(/\[object (.*)\]/);if(n&&n[1])return`[${n[1]}]`}catch{}return"[Unserializable]"}function _oe(e){return{type:e.type,isTrusted:e.isTrusted,currentTarget:e.currentTarget?EC(e.currentTarget):null,target:e.target?EC(e.target):null}}function Coe(e){const t=e;if(t&&typeof t.toJSON=="function")try{return t.toJSON()}catch{}return e}function M_(e,t,n){yt.warn(`The data provided has been ${t} as it is over the limit of ${e} characters:`,n)}const DL="No stack, consider using an instance of Error";function $L({originalError:e,stackTrace:t,source:n,useFallbackStack:r=!0,nonErrorPrefix:i}){const o=zl(e);return!t&&o&&(t=kf(e)),{source:n,type:t?t.name:void 0,message:koe(t,o,i,e),stack:t?rx(t):r?DL:void 0}}function kE({stackTrace:e,originalError:t,handlingStack:n,componentStack:r,startClocks:i,nonErrorPrefix:o,useFallbackStack:a=!0,source:l,handling:d}){const f=$L({originalError:t,stackTrace:e,source:l,useFallbackStack:a,nonErrorPrefix:o});return{startClocks:i,handling:d,handlingStack:n,componentStack:r,originalError:t,...f,causes:zl(t)?Roe(t,l):void 0,fingerprint:Eoe(t),context:joe(t)}}function koe(e,t,n,r){return e?.message&&e?.name?e.message:t?"Empty message":n?`${n} ${Wd(qt(r))}`:Wd(qt(r))}function Eoe(e){return zl(e)&&"dd_fingerprint"in e?String(e.dd_fingerprint):void 0}function joe(e){if(ou(e))return e.dd_context}function zl(e){return e instanceof Error||Object.prototype.toString.call(e)==="[object Error]"}function Roe(e,t){const n=[];let r=e.cause;for(;r!=null&&n.length<10;){const i=$L({originalError:r,source:t,useFallbackStack:!1});n.push(i),r=zl(r)?r.cause:void 0}return n.length?n:void 0}const Ef={AGENT:"agent",CONSOLE:"console",CUSTOM:"custom",LOGGER:"logger",NETWORK:"network",SOURCE:"source",REPORT:"report"};function Ioe(){return new Ft(e=>{const t=(i,o)=>{const a=kE({stackTrace:o,originalError:i,startClocks:Bn(),nonErrorPrefix:"Uncaught",source:Ef.SOURCE,handling:"unhandled"});e.notify(a)},{stop:n}=Toe(t),{stop:r}=Noe(t);return()=>{n(),r()}})}function Toe(e){return Ca(ti(),"onerror",({parameters:[t,n,r,i,o]})=>{let a;zl(o)||(a=moe(t,n,r,i)),e(o??t,a)})}function Noe(e){return Ca(ti(),"onunhandledrejection",({parameters:[t]})=>{e(t.reason||"Empty reason")})}function Aoe(e){const t={version:"6.27.1",onReady(n){n()},...e};return Object.defineProperty(t,"_setDebug",{get(){return zre},enumerable:!1}),t}function Ooe(e,t,n){const r=e[t];r&&!r.q&&r.version&&yt.warn("SDK is loaded more than once. This is unsupported and might have unexpected behavior."),e[t]=n,r&&r.q&&r.q.forEach(i=>eL(i,"onReady callback threw an error:")())}function PL(e,t){t.silentMultipleInit||yt.error(`${e} is already initialized.`)}function zn(e,t,n,r,i){return Sl(e,t,[n],r,i)}function Sl(e,t,n,r,{once:i,capture:o,passive:a}={}){const l=Et(v=>{!v.isTrusted&&!v.__ddIsTrusted&&!e.allowUntrustedEvents||(i&&h(),r(v))}),d=a?{capture:o,passive:a}:o,f=window.EventTarget&&t instanceof EventTarget?window.EventTarget.prototype:t,m=fs(f,"addEventListener");n.forEach(v=>m.call(t,v,l,d));function h(){const v=fs(f,"removeEventListener");n.forEach(y=>v.call(t,y,l,d))}return{stop:h}}const Nm={intervention:"intervention",cspViolation:"csp_violation"};function Doe(e,t){const n=[];t.includes(Nm.cspViolation)&&n.push(Poe(e));const r=t.filter(i=>i!==Nm.cspViolation);return r.length&&n.push($oe(r)),rL(...n)}function $oe(e){return new Ft(t=>{if(!window.ReportingObserver)return;const n=Et((i,o)=>i.forEach(a=>t.notify(Moe(a)))),r=new window.ReportingObserver(n,{types:e,buffered:!0});return r.observe(),()=>{r.disconnect()}})}function Poe(e){return new Ft(t=>{const{stop:n}=zn(e,document,"securitypolicyviolation",r=>{t.notify(zoe(r))});return n})}function Moe(e){const{type:t,body:n}=e;return ML({type:n.id,message:`${t}: ${n.message}`,originalError:e,stack:zL(n.id,n.message,n.sourceFile,n.lineNumber,n.columnNumber)})}function zoe(e){const t=`'${e.blockedURI}' blocked by '${e.effectiveDirective}' directive`;return ML({type:e.effectiveDirective,message:`${Nm.cspViolation}: ${t}`,originalError:e,csp:{disposition:e.disposition},stack:zL(e.effectiveDirective,e.originalPolicy?`${t} of the policy "${xE(e.originalPolicy,100,"...")}"`:"no policy",e.sourceFile,e.lineNumber,e.columnNumber)})}function ML(e){return{startClocks:Bn(),source:Ef.REPORT,handling:"unhandled",...e}}function zL(e,t,n,r,i){return n?rx({name:e,message:t,stack:[{func:"?",url:n,line:r??void 0,column:i??void 0}]}):void 0}const Loe=200;function LL(e){const{env:t,service:n,version:r,datacenter:i,sdkVersion:o,variant:a}=e,l=[ad("sdk_version",o??"6.27.1")];return t&&l.push(ad("env",t)),n&&l.push(ad("service",n)),r&&l.push(ad("version",r)),i&&l.push(ad("datacenter",i)),a&&l.push(ad("variant",a)),l}function ad(e,t){const n=t?`${e}:${t}`:e;return(n.length>Loe||Uoe(n))&&yt.warn(`Tag ${n} doesn't meet tag requirements and will be sanitized. ${bE} ${Gb}/getting_started/tagging/#defining-tags`),Foe(n)}function Foe(e){return e.replace(/,/g,"_")}function Uoe(e){return Voe()?new RegExp("[^\\p{Ll}\\p{Lo}0-9_:./-]","u").test(e):!1}function Voe(){try{return new RegExp("[\\p{Ll}]","u"),!0}catch{return!1}}function FL(e,t){const n=ja.__ddBrowserSdkExtensionCallback;n&&n({type:e,payload:t})}function By(e,t,n=Boe()){if(t===void 0)return e;if(typeof t!="object"||t===null)return t;if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp){const i=t.flags||[t.global?"g":"",t.ignoreCase?"i":"",t.multiline?"m":"",t.sticky?"y":"",t.unicode?"u":""].join("");return new RegExp(t.source,i)}if(n.hasAlreadyBeenSeen(t))return;if(Array.isArray(t)){const i=Array.isArray(e)?e:[];for(let o=0;o<t.length;++o)i[o]=By(i[o],t[o],n);return i}const r=Cf(e)==="object"?e:{};for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=By(r[i],t[i],n));return r}function EE(e){return By(void 0,e)}function hs(...e){let t;for(const n of e)n!=null&&(t=By(t,n));return t}function Boe(){if(typeof WeakSet<"u"){const t=new WeakSet;return{hasAlreadyBeenSeen(n){const r=t.has(n);return r||t.add(n),r}}}const e=[];return{hasAlreadyBeenSeen(t){const n=e.indexOf(t)>=0;return n||e.push(t),n}}}function UL(){var e;const t=ja.navigator;return{status:t.onLine?"connected":"not_connected",interfaces:t.connection&&t.connection.type?[t.connection.type]:void 0,effective_type:(e=t.connection)===null||e===void 0?void 0:e.effectiveType}}function jE(e,t){return fs(ti(),"fetch")(e,t)}function Hoe(e){return e>=500}function qoe(e){try{return e.clone()}catch{return}}const Koe=80*au,Goe=32,VL=20*NL,Zoe=ni,BL=Ur;function HL(e,t,n,r,i,o){t.transportStatus===0&&t.queuedPayloads.size()===0&&t.bandwidthMonitor.canHandle(e)?KL(e,t,n,o,{onSuccess:()=>GL(0,t,n,r,i,o),onFailure:()=>{t.queuedPayloads.enqueue(e)||o.notify({type:"queue-full",bandwidth:t.bandwidthMonitor.stats(),payload:e}),qL(t,n,r,i,o)}}):t.queuedPayloads.enqueue(e)||o.notify({type:"queue-full",bandwidth:t.bandwidthMonitor.stats(),payload:e})}function qL(e,t,n,r,i){e.transportStatus===2&&zr(()=>{const o=e.queuedPayloads.first();KL(o,e,t,i,{onSuccess:()=>{e.queuedPayloads.dequeue(),e.currentBackoffTime=BL,GL(1,e,t,n,r,i)},onFailure:()=>{e.currentBackoffTime=Math.min(Zoe,e.currentBackoffTime*2),qL(e,t,n,r,i)}})},e.currentBackoffTime)}function KL(e,t,n,r,{onSuccess:i,onFailure:o}){t.bandwidthMonitor.add(e),n(e,a=>{t.bandwidthMonitor.remove(e),Yoe(a)?(t.transportStatus=t.bandwidthMonitor.ongoingRequestCount>0?1:2,e.retry={count:e.retry?e.retry.count+1:1,lastFailureStatus:a.status},r.notify({type:"failure",bandwidth:t.bandwidthMonitor.stats(),payload:e}),o()):(t.transportStatus=0,r.notify({type:"success",bandwidth:t.bandwidthMonitor.stats(),payload:e}),i())})}function GL(e,t,n,r,i,o){e===0&&t.queuedPayloads.isFull()&&!t.queueFullReported&&(i({message:`Reached max ${r} events size queued for upload: ${VL/NL}MiB`,source:Ef.AGENT,startClocks:Bn()}),t.queueFullReported=!0);const a=t.queuedPayloads;for(t.queuedPayloads=ZL();a.size()>0;)HL(a.dequeue(),t,n,r,i,o)}function Yoe(e){return e.type!=="opaque"&&(e.status===0&&!navigator.onLine||e.status===408||e.status===429||Hoe(e.status))}function Woe(){return{transportStatus:0,currentBackoffTime:BL,bandwidthMonitor:Xoe(),queuedPayloads:ZL(),queueFullReported:!1}}function ZL(){const e=[];return{bytesCount:0,enqueue(t){return this.isFull()?!1:(e.push(t),this.bytesCount+=t.bytesCount,!0)},first(){return e[0]},dequeue(){const t=e.shift();return t&&(this.bytesCount-=t.bytesCount),t},size(){return e.length},isFull(){return this.bytesCount>=VL}}}function Xoe(){return{ongoingRequestCount:0,ongoingByteCount:0,canHandle(e){return this.ongoingRequestCount===0||this.ongoingByteCount+e.bytesCount<=Koe&&this.ongoingRequestCount<Goe},add(e){this.ongoingRequestCount+=1,this.ongoingByteCount+=e.bytesCount},remove(e){this.ongoingRequestCount-=1,this.ongoingByteCount-=e.bytesCount},stats(){return{ongoingByteCount:this.ongoingByteCount,ongoingRequestCount:this.ongoingRequestCount}}}}const jC=16*au;function YL(e,t,n=jC){const r=new Ft,i=Woe();return{observable:r,send:o=>{for(const a of e)HL(o,i,(l,d)=>{ms(Po.AVOID_FETCH_KEEPALIVE)?Hy(a,l,d):eae(a,n,l,d)},a.trackType,t,r)},sendOnExit:o=>{for(const a of e)Joe(a,n,o)}}}function Joe(e,t,n){if(!!navigator.sendBeacon&&n.bytesCount<t)try{const i=e.build("beacon",n);if(navigator.sendBeacon(i,n.data))return}catch(i){Qoe(i)}Hy(e,n)}let _$=!1;function Qoe(e){_$||(_$=!0,iu(e))}function eae(e,t,n,r){if(tae()&&n.bytesCount<t){const o=e.build("fetch-keepalive",n);jE(o,{method:"POST",body:n.data,keepalive:!0,mode:"cors"}).then(Et(a=>r?.({status:a.status,type:a.type}))).catch(Et(()=>Hy(e,n,r)))}else Hy(e,n,r)}function Hy(e,t,n){const r=e.build("fetch",t);jE(r,{method:"POST",body:t.data,mode:"cors"}).then(Et(i=>n?.({status:i.status,type:i.type}))).catch(Et(()=>n?.({status:0})))}function tae(){try{return window.Request&&"keepalive"in new Request("http://a")}catch{return!1}}function sh(){const e=nae();if(e)return{getCapabilities(){var t;return JSON.parse(((t=e.getCapabilities)===null||t===void 0?void 0:t.call(e))||"[]")},getPrivacyLevel(){var t;return(t=e.getPrivacyLevel)===null||t===void 0?void 0:t.call(e)},getAllowedWebViewHosts(){return JSON.parse(e.getAllowedWebViewHosts())},send(t,n,r){const i=r?{id:r}:void 0;e.send(JSON.stringify({eventType:t,event:n,view:i}))}}}function WL(e){const t=sh();return!!t&&t.getCapabilities().includes(e)}function Xd(e){var t;e===void 0&&(e=(t=ti().location)===null||t===void 0?void 0:t.hostname);const n=sh();return!!n&&n.getAllowedWebViewHosts().some(r=>e===r||e.endsWith(`.${r}`))}function nae(){return ti().DatadogEventBridge}const gm={HIDDEN:"visibility_hidden",UNLOADING:"before_unload",PAGEHIDE:"page_hide",FROZEN:"page_frozen"};function XL(e){return new Ft(t=>{if(oh)return;const{stop:n}=Sl(e,window,["visibilitychange","freeze"],i=>{i.type==="visibilitychange"&&document.visibilityState==="hidden"?t.notify({reason:gm.HIDDEN}):i.type==="freeze"&&t.notify({reason:gm.FROZEN})},{capture:!0}),r=zn(e,window,"beforeunload",()=>{t.notify({reason:gm.UNLOADING})}).stop;return()=>{n(),r()}})}function rae(e){return pL(gm).includes(e)}const C$=256*au;function JL({encoder:e,request:t,flushController:n}){let r={};const i=n.flushObservable.subscribe(m=>f(m));function o(m,h,v){n.notifyBeforeAddMessage(h),v!==void 0?(r[v]=m,n.notifyAfterAddMessage()):e.write(e.isEmpty?m:`
34
+ ${m}`,y=>{n.notifyAfterAddMessage(y-h)})}function a(m){return m!==void 0&&r[m]!==void 0}function l(m){const h=r[m];delete r[m];const v=e.estimateEncodedBytesCount(h);n.notifyAfterRemoveMessage(v)}function d(m,h){const v=Wd(m),y=e.estimateEncodedBytesCount(v);if(y>=C$){yt.warn(`Discarded a message whose size was bigger than the maximum allowed size ${C$/au}KiB. ${bE} ${$re}/#technical-limitations`);return}a(h)&&l(h),o(v,y,h)}function f(m){const h=pL(r).join(`
35
+ `);r={};const v=rae(m.reason),y=v?t.sendOnExit:t.send;if(v&&e.isAsync){const x=e.finishSync();x.outputBytesCount&&y(k$(x));const S=[x.pendingData,h].filter(Boolean).join(`
36
+ `);S&&y({data:S,bytesCount:AL(S)})}else h&&e.write(e.isEmpty?h:`
37
+ ${h}`),e.finish(x=>{y(k$(x))})}return{flushController:n,add:d,upsert:d,stop:i.unsubscribe}}function k$(e){let t;return typeof e.output=="string"?t=e.output:t=new Blob([e.output],{type:"text/plain"}),{data:t,bytesCount:e.outputBytesCount,encoding:e.encoding}}const iae=30*Ur,oae=oh?1:50;function QL({pageMayExitObservable:e,sessionExpireObservable:t}){const n=e.subscribe(h=>l(h.reason)),r=t.subscribe(()=>l("session_expire")),i=new Ft(()=>()=>{n.unsubscribe(),r.unsubscribe()});let o=0,a=0;function l(h){if(a===0)return;const v=a,y=o;a=0,o=0,m(),i.notify({reason:h,messagesCount:v,bytesCount:y})}let d;function f(){d===void 0&&(d=zr(()=>{l("duration_limit")},iae))}function m(){ko(d),d=void 0}return{flushObservable:i,get messagesCount(){return a},notifyBeforeAddMessage(h){o+h>=jC&&l("bytes_limit"),a+=1,o+=h,f()},notifyAfterAddMessage(h=0){o+=h,a>=oae?l("messages_limit"):o>=jC&&l("bytes_limit")},notifyAfterRemoveMessage(h){o-=h,a-=1,a===0&&m()}}}function eF(){let e="",t=0;return{isAsync:!1,get isEmpty(){return!e},write(n,r){const i=AL(n);t+=i,e+=n,r&&r(i)},finish(n){n(this.finishSync())},finishSync(){const n={output:e,outputBytesCount:t,rawBytesCount:t,pendingData:""};return e="",t=0,n},estimateEncodedBytesCount(n){return n.length}}}const _l="DISCARDED",ji="SKIPPED";function aae(){const e={};return{register(t,n){return e[t]||(e[t]=[]),e[t].push(n),{unregister:()=>{e[t]=e[t].filter(r=>r!==n)}}},triggerHook(t,n){const r=e[t]||[],i=[];for(const o of r){const a=o(n);if(a===_l)return _l;a!==ji&&i.push(a)}return hs(...i)}}}const xl={LOG:"log",CONFIGURATION:"configuration",USAGE:"usage"},sae=["https://www.datadoghq-browser-agent.com","https://www.datad0g-browser-agent.com","https://d3uc069fcn7uxw.cloudfront.net","https://d20xtzwzcl0ceb.cloudfront.net","http://localhost","<anonymous>"],lae=1,cae=[Uie],uae=15;let z_;function jf(){return z_||(z_=new iL(100)),z_}function dae(e,t,n){const r=new Ft,{enabled:i,metricsEnabled:o}=fae(e,t,n,r),{stop:a}=pae(t,r);return{stop:a,enabled:i,metricsEnabled:o}}function fae(e,t,n,r,i=lae,o=uae){const a={},l=!cae.includes(t.site)&&Sc(t.telemetrySampleRate),d={[xl.LOG]:l,[xl.CONFIGURATION]:l&&Sc(t.telemetryConfigurationSampleRate),[xl.USAGE]:l&&Sc(t.telemetryUsageSampleRate),metric:l&&Sc(i)},f=mae(),m=jf();return m.subscribe(({rawEvent:v,metricName:y})=>{if(y&&!d.metric||!d[v.type])return;const x=y||v.status||v.type;let S=a[x];if(S||(S=a[x]=new Set),S.size>=o)return;const C=Wd(v);if(S.has(C))return;const k=n.triggerHook(1,{startTime:Bn().relative});if(k===_l)return;const E=h(k,e,v,f);r.notify(E),FL("telemetry",E),S.add(C)}),m.unbuffer(),Mre(ox),{enabled:l,metricsEnabled:d.metric};function h(v,y,x,S){const k={type:"telemetry",date:Bn().timeStamp,service:y,version:"6.27.1",source:"browser",_dd:{format_version:2},telemetry:hs(x,{runtime_env:S,connectivity:UL(),sdk_setup:"npm"}),ddtags:LL(t).join(","),experimental_features:Array.from(noe())};return hs(k,v)}}function pae(e,t){const n=[];if(Xd()){const r=sh(),i=t.subscribe(o=>r.send("internal_telemetry",o));n.push(i.unsubscribe)}else{const r=[e.rumEndpointBuilder];e.replica&&hae(e)&&r.push(e.replica.rumEndpointBuilder);const i=JL({encoder:eF(),request:YL(r,on),flushController:QL({pageMayExitObservable:XL(e),sessionExpireObservable:new Ft})});n.push(i.stop);const o=t.subscribe(i.add);n.push(o.unsubscribe)}return{stop:()=>n.forEach(r=>r())}}function mae(){var e;return{is_local_file:((e=ja.location)===null||e===void 0?void 0:e.protocol)==="file:",is_worker:oh}}function hae(e){return e.site===EL}function ix(e,t){SC(Kb.debug,e,t),jf().notify({rawEvent:{type:xl.LOG,message:e,status:"debug",...t}})}function ox(e,t){jf().notify({rawEvent:{type:xl.LOG,status:"error",...vae(e),...t}})}function gae(e){jf().notify({rawEvent:{type:xl.CONFIGURATION,configuration:e}})}function ax(e,t){jf().notify({rawEvent:{type:xl.LOG,message:e,status:"debug",...t},metricName:e})}function yr(e){jf().notify({rawEvent:{type:xl.USAGE,usage:e}})}function vae(e){if(zl(e)){const t=kf(e);return{error:{kind:t.name,stack:rx(yae(t))},message:t.message}}return{error:{stack:DL},message:`Uncaught ${Wd(e)}`}}function yae(e){return e.stack=e.stack.filter(t=>!t.url||sae.some(n=>t.url.startsWith(n))),e}function tF(e,t){const n=e.indexOf(t);n>=0&&e.splice(n,1)}function Ac(e){return Array.isArray(e)&&e.length>0}const Ov=1/0,bae=ni;let Bp;const yy=new Set;function xae(){yy.forEach(e=>e())}function su({expireDelay:e,maxEntries:t}){let n=[];Bp||(Bp=_f(()=>xae(),bae));const r=()=>{const m=Ji()-e;for(;n.length>0&&n[n.length-1].endTime<m;)n.pop()};yy.add(r);function i(m,h){const v={value:m,startTime:h,endTime:Ov,remove:()=>{tF(n,v)},close:y=>{v.endTime=y}};return t&&n.length>=t&&n.pop(),n.unshift(v),v}function o(m=Ov,h={returnInactive:!1}){for(const v of n)if(v.startTime<=m){if(h.returnInactive||m<=v.endTime)return v.value;break}}function a(m){const h=n[0];h&&h.endTime===Ov&&h.close(m)}function l(m=Ov,h=0){const v=Pl(m,h);return n.filter(y=>y.startTime<=v&&m<=y.endTime).map(y=>y.value)}function d(){n=[]}function f(){yy.delete(r),yy.size===0&&Bp&&(Zb(Bp),Bp=void 0)}return{add:i,find:o,closeActive:a,findAll:l,reset:d,stop:f}}const wae="datadog-synthetics-public-id",Sae="datadog-synthetics-result-id",_ae="datadog-synthetics-injects-rum";function nF(){return oh?!1:!!(ja._DATADOG_SYNTHETICS_INJECTS_RUM||dl(_ae))}function rF(){const e=window._DATADOG_SYNTHETICS_PUBLIC_ID||dl(wae);return typeof e=="string"?e:void 0}function iF(){const e=window._DATADOG_SYNTHETICS_RESULT_ID||dl(Sae);return typeof e=="string"?e:void 0}function oF(){return!!(rF()&&iF())}const Cae=ni,kae=Ml;function Eae(e,t,n,r){const i=new Ft,o=new Ft,a=Aie(e.sessionStoreStrategyType,e,t,n),l=su({expireDelay:kae});if(a.renewObservable.subscribe(()=>{l.add(d(),Ji()),i.notify()}),a.expireObservable.subscribe(()=>{o.notify(),l.closeActive(Ji())}),a.expandOrRenewSession(),l.add(d(),lL().relative),ms(Po.SHORT_SESSION_INVESTIGATION)){const f=a.getSession();f&&Nae(e,f)}r.observable.subscribe(()=>{r.isGranted()?a.expandOrRenewSession():a.expire(!1)}),jae(e,()=>{r.isGranted()&&a.expandOrRenewSession()}),Rae(e,()=>a.expandSession()),Iae(e,()=>a.restartSession());function d(){const f=a.getSession();return f?{id:f.id,trackingType:f[t],isReplayForced:!!f.forcedReplay,anonymousId:f.anonymousId}:(Tae(e).catch(()=>{}),{id:"invalid",trackingType:hL,isReplayForced:!1,anonymousId:void 0})}return{findSession:(f,m)=>l.find(f,m),renewObservable:i,expireObservable:o,sessionStateUpdateObservable:a.sessionStateUpdateObservable,expire:a.expire,updateSessionState:a.updateSessionState}}function jae(e,t){const{stop:n}=Sl(e,window,["click","touchstart","keydown","scroll"],t,{capture:!0,passive:!0})}function Rae(e,t){const n=()=>{document.visibilityState==="visible"&&t()},{stop:r}=zn(e,document,"visibilitychange",n);_f(n,Cae)}function Iae(e,t){const{stop:n}=zn(e,window,"resume",t,{capture:!0})}async function Tae(e){const t=e.sessionStoreStrategyType;if(!t)return;let n,r;t.type===Ao.COOKIE?(n=bL(t.cookieOptions,e),r={cookie:await aF(),currentDomain:`${window.location.protocol}//${window.location.hostname}`}):n=SL(),ix("Unexpected session state",{sessionStoreStrategyType:t.type,session:n,isSyntheticsTest:oF(),createdTimestamp:n?.created,expireTimestamp:n?.expire,...r})}function Nae(e,t){if(!window.cookieStore||!t.created)return;const n=Number(t.created),r=Qr(),{stop:i}=zn(e,cookieStore,"change",o);function o(a){const l=SE(a.changed,f=>f.name===ps);if(!l)return;const d=Qr()-n;if(d>14*ni)i();else{const f=tx(l.value);if(f.id&&f.id!==t.id){i();const m=Qr()-r;aF().then(h=>{ix("Session cookie changed",{time:m,session_age:d,old:t,new:f,cookie:h})}).catch(iu)}}}}async function aF(){let e;return"cookieStore"in window?e=await window.cookieStore.getAll(ps):e=document.cookie.split(/\s*;\s*/).filter(t=>t.startsWith(ps)),{count:e.length,domain:fL()||"undefined",...e}}class Aae{constructor(){this.callbacks={}}notify(t,n){const r=this.callbacks[t];r&&r.forEach(i=>i(n))}subscribe(t,n){return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(n),{unsubscribe:()=>{this.callbacks[t]=this.callbacks[t].filter(r=>n!==r)}}}}const Oae=3e3;function L_(e,t,n=Oae){let r=0,i=!1;return{isLimitReached(){if(r===0&&zr(()=>{r=0},ni),r+=1,r<=n||i)return i=!1,!1;if(r===n+1){i=!0;try{t({message:`Reached max number of ${e}s by minute: ${n}`,source:Ef.AGENT,startClocks:Bn()})}finally{i=!1}}return!0}}}function RE(e,t,n){return document.readyState===t||document.readyState==="complete"?(n(),{stop:on}):zn(e,window,t==="complete"?"load":"DOMContentLoaded",n,{once:!0})}function Dae(e,t){return new Promise(n=>{RE(e,t,n)})}let F_;const IE=new WeakMap;function $ae(e){return F_||(F_=Pae(e)),F_}function Pae(e){return new Ft(t=>{const{stop:n}=Ca(XMLHttpRequest.prototype,"open",Mae),{stop:r}=Ca(XMLHttpRequest.prototype,"send",o=>{zae(o,e,t)},{computeHandlingStack:!0}),{stop:i}=Ca(XMLHttpRequest.prototype,"abort",Lae);return()=>{n(),r(),i()}})}function Mae({target:e,parameters:[t,n]}){IE.set(e,{state:"open",method:String(t).toUpperCase(),url:wE(String(n))})}function zae({target:e,parameters:[t],handlingStack:n},r,i){const o=IE.get(e);if(!o)return;const a=o;a.state="start",a.startClocks=Bn(),a.isAborted=!1,a.xhr=e,a.handlingStack=n,a.requestBody=t;let l=!1;const{stop:d}=Ca(e,"onreadystatechange",()=>{e.readyState===XMLHttpRequest.DONE&&f()}),f=()=>{if(m(),d(),l)return;l=!0;const h=o;h.state="complete",h.duration=Xn(a.startClocks.timeStamp,wr()),h.status=e.status,typeof e.response=="string"&&(h.responseBody=e.response),i.notify(Vc(h))},{stop:m}=zn(r,e,"loadend",f);i.notify(a)}function Lae({target:e}){const t=IE.get(e);t&&(t.isAborted=!0)}async function Fae(e,t){const n=e.getReader(),r=[];for(;;){const i=await n.read();if(i.done)break;t.collectStreamBody&&r.push(i.value)}return n.cancel().catch(on),t.collectStreamBody?OL(r):void 0}let U_;const sF=[];function lF({responseBodyAction:e}={}){return e&&sF.push(e),U_||(U_=Uae()),U_}function Uae(){return new Ft(e=>{if(!ja.fetch)return;const{stop:t}=Ca(ja,"fetch",n=>Vae(n,e),{computeHandlingStack:!0});return t})}function Vae({parameters:e,onPostCall:t,handlingStack:n},r){const[i,o]=e;let a=o&&o.method;a===void 0&&i instanceof Request&&(a=i.method);const l=a!==void 0?String(a).toUpperCase():"GET",d=i instanceof Request?i.url:wE(String(i)),f=Bn(),m={state:"start",init:o,input:i,method:l,startClocks:f,url:d,handlingStack:n};r.notify(m),e[0]=m.input,e[1]=m.init,t(h=>{Bae(r,h,m).catch(iu)})}async function Bae(e,t,n){var r,i;const o=n;o.state="resolve";let a;try{a=await t}catch(d){o.status=0,o.isAborted=((i=(r=o.init)===null||r===void 0?void 0:r.signal)===null||i===void 0?void 0:i.aborted)||d instanceof DOMException&&d.code===DOMException.ABORT_ERR,o.error=d,e.notify(o);return}o.response=a,o.status=a.status,o.responseType=a.type,o.isAborted=!1;const l=sF.reduce((d,f)=>Math.max(d,f(o)),0);if(l!==0){const d=qoe(a);if(d&&d.body)try{const f=await Fae(d.body,{collectStreamBody:l===2});o.responseBody=f&&new TextDecoder().decode(f)}catch{}}e.notify(o)}function Hae(e,t){if(window.requestIdleCallback&&window.cancelIdleCallback){const n=window.requestIdleCallback(Et(e),t);return()=>window.cancelIdleCallback(n)}return Kae(e)}const qae=50;function Kae(e){const t=Qr(),n=zr(()=>{e({didTimeout:!1,timeRemaining:()=>Math.max(0,qae-(Qr()-t))})},0);return()=>ko(n)}const Gae=Ur,Zae=30;function Yae(){const e=[];function t(r){let i;if(r.didTimeout){const o=performance.now();i=()=>Zae-(performance.now()-o)}else i=r.timeRemaining.bind(r);for(;i()>0&&e.length;)e.shift()();e.length&&n()}function n(){Hae(t,{timeout:Gae})}return{push(r){e.push(r)===1&&n()},stop(){e.length=0}}}let V_={};function Wae(e){const t=e.map(n=>(V_[n]||(V_[n]=Xae(n)),V_[n]));return rL(...t)}function Xae(e){return new Ft(t=>{const n=as[e];return as[e]=(...r)=>{n.apply(console,r);const i=al("console error");Yo(()=>{t.notify(Jae(r,e,i))})},()=>{as[e]=n}})}function Jae(e,t,n){const r=e.map(i=>Qae(i)).join(" ");if(t===Kb.error){const i=e.find(zl),o=kE({originalError:i,handlingStack:n,startClocks:Bn(),source:Ef.CONSOLE,handling:"handled",nonErrorPrefix:"Provided",useFallbackStack:!1});return o.message=r,{api:t,message:r,handlingStack:n,error:o}}return{api:t,message:r,error:void 0,handlingStack:n}}function Qae(e){return typeof e=="string"?qt(e):zl(e)?TL(kf(e)):Wd(qt(e),void 0,2)}const ese=500;function tse(){const e=[];return{add:i=>{e.push(i)>ese&&e.splice(0,1)},remove:i=>{tF(e,i)},drain:i=>{e.forEach(o=>o(i)),e.length=0}}}function nse(e){const t=Cf(e)==="object";return t||yt.error("Unsupported context:",e),t}function B_(e,t,n){const r={...e};for(const[i,{required:o,type:a}]of Object.entries(t))a==="string"&&!E$(r[i])&&(r[i]=String(r[i])),o&&E$(r[i])&&yt.warn(`The property ${i} of ${n} is required; context will not be sent to the intake.`);return r}function E$(e){return e==null||e===""}function sx(e="",{propertiesConfig:t={}}={}){let n={};const r=new Ft,i={getContext:()=>EE(n),setContext:o=>{nse(o)?n=qt(B_(o,t,e)):i.clearContext(),r.notify()},setContextProperty:(o,a)=>{n=qt(B_({...n,[o]:a},t,e)),r.notify()},removeContextProperty:o=>{delete n[o],B_(n,t,e),r.notify()},clearContext:()=>{n={},r.notify()},changeObservable:r};return i}function qr(e,t,n,r){return Et((...i)=>(r&&yr({feature:r}),e()[t][n](...i)))}const rse="_dd_c",ise=[];function TE(e,t,n,r){const i=ose(n,r);ise.push(zn(e,window,"storage",({key:f})=>{i===f&&a()})),t.changeObservable.subscribe(l);const o=hs(d(),t.getContext());$l(o)||t.setContext(o);function a(){t.setContext(d())}function l(){localStorage.setItem(i,JSON.stringify(t.getContext()))}function d(){const f=localStorage.getItem(i);return f?JSON.parse(f):{}}}function ose(e,t){return`${rse}_${e}_${t}`}function ase(e,t,n){const r=cF();return t.storeContextsAcrossPages&&TE(t,r,n,4),e.register(0,()=>{const i=r.getContext();return $l(i)||!i.id?ji:{account:i}}),r}function cF(){return sx("account",{propertiesConfig:{id:{type:"string",required:!0},name:{type:"string"}}})}function sse(e,t,n,r){const i=uF();return t.storeContextsAcrossPages&&TE(t,i,n,2),e.register(0,()=>({context:i.getContext()})),i}function uF(){return sx("global context")}function lse(e,t,n,r){const i=dF();return t.storeContextsAcrossPages&&TE(t,i,r,1),e.register(0,({eventType:o,startTime:a})=>{const l=i.getContext(),d=n.findTrackedSession(a);return d&&d.anonymousId&&!l.anonymous_id&&t.trackAnonymousUser&&(l.anonymous_id=d.anonymousId),$l(l)?ji:{type:o,usr:l}}),e.register(1,({startTime:o})=>{var a;return{anonymous_id:(a=n.findTrackedSession(o))===null||a===void 0?void 0:a.anonymousId}}),i}function dF(){return sx("user",{propertiesConfig:{id:{type:"string"},name:{type:"string"},email:{type:"string"}}})}const br={userContext:"userContext",globalContext:"globalContext",accountContext:"accountContext"},Kr={getContext:"getContext",setContext:"setContext",setContextProperty:"setContextProperty",removeContextProperty:"removeContextProperty",clearContext:"clearContext"},Yr={DOCUMENT:"document",XHR:"xhr",BEACON:"beacon",FETCH:"fetch",CSS:"css",JS:"js",IMAGE:"image",FONT:"font",MEDIA:"media",OTHER:"other"},lx={FETCH:Yr.FETCH,XHR:Yr.XHR},cse=500;function use(e=Ioe){const t=new iL(cse),n=e().subscribe(r=>{t.notify({type:0,error:r})});return{observable:t,stop:()=>{n.unsubscribe()}}}function dse(){try{return new Intl.DateTimeFormat().resolvedOptions().timeZone}catch{return}}const St={ACTION:"action",ERROR:"error",LONG_TASK:"long_task",VIEW:"view",RESOURCE:"resource",VITAL:"vital"},j$={LONG_TASK:"long-task",LONG_ANIMATION_FRAME:"long-animation-frame"},ss={INITIAL_LOAD:"initial_load",ROUTE_CHANGE:"route_change",BF_CACHE:"bf_cache"},NE={CLICK:"click",CUSTOM:"custom"},xd={RAGE_CLICK:"rage_click",ERROR_CLICK:"error_click",DEAD_CLICK:"dead_click"},Am={DURATION:"duration",OPERATION_STEP:"operation_step"};function fse(){return{vitalsByName:new Map,vitalsByReference:new WeakMap}}function pse(e,t,n){function r(a){return!t.wasInPageStateDuringPeriod("frozen",a.startClocks.relative,a.duration)}function i(a){r(a)&&e.notify(12,R$(a))}function o(a,l,d,f){if(!ms(Po.FEATURE_OPERATION_VITAL))return;const{operationKey:m,context:h,description:v}=d||{},y={name:a,type:Am.OPERATION_STEP,operationKey:m,failureReason:f,stepType:l,startClocks:Bn(),context:qt(h),description:v};e.notify(12,R$(y))}return{addOperationStepVital:o,addDurationVital:i,startDurationVital:(a,l={})=>fF(n,a,l),stopDurationVital:(a,l={})=>{pF(i,n,a,l)}}}function fF({vitalsByName:e,vitalsByReference:t},n,r={}){const i={name:n,startClocks:Bn(),...r},o={__dd_vital_reference:!0};return e.set(n,i),t.set(o,i),o}function pF(e,{vitalsByName:t,vitalsByReference:n},r,i={}){const o=typeof r=="string"?t.get(r):n.get(r);o&&(e(mse(o,o.startClocks,i,Bn())),typeof r=="string"?t.delete(r):n.delete(r))}function mse(e,t,n,r){var i;return{name:e.name,type:Am.DURATION,startClocks:t,duration:Xn(t.timeStamp,r.timeStamp),context:hs(e.context,n.context),description:(i=n.description)!==null&&i!==void 0?i:e.description,handlingStack:e.handlingStack}}function R$(e){const{startClocks:t,type:n,name:r,description:i,context:o,handlingStack:a}=e,l={id:ei(),type:n,name:r,description:i,...n===Am.DURATION?{duration:ht(e.duration)}:{step_type:e.stepType,operation_key:e.operationKey,failure_reason:e.failureReason}};return{rawRumEvent:{date:t.timeStamp,vital:l,type:St.VITAL,context:o},startTime:t.relative,duration:n===Am.DURATION?e.duration:void 0,domainContext:a?{handlingStack:a}:{}}}function mF(e,t,n){if(e)for(const r of e){const i=r[t];i&&i(n)}}const hse=aae,I$=["tracecontext","datadog"];function gse(e,t){var n,r,i,o,a,l,d;if(e.trackFeatureFlagsForEvents!==void 0&&!Array.isArray(e.trackFeatureFlagsForEvents)&&yt.warn("trackFeatureFlagsForEvents should be an array"),!e.applicationId){yt.error("Application ID is not configured, no RUM data will be collected.");return}if(!kd(e.sessionReplaySampleRate,"Session Replay")||!kd(e.traceSampleRate,"Trace"))return;if(e.excludedActivityUrls!==void 0&&!Array.isArray(e.excludedActivityUrls)){yt.error("Excluded Activity Urls should be an array");return}const f=vse(e);if(!f)return;const m=Jie(e,t),h=bse(e);if(!m)return;const v=(n=e.sessionReplaySampleRate)!==null&&n!==void 0?n:0;return{applicationId:e.applicationId,actionNameAttribute:e.actionNameAttribute,betaTrackActionsInShadowDom:!!e.betaTrackActionsInShadowDom,sessionReplaySampleRate:v,startSessionReplayRecordingManually:e.startSessionReplayRecordingManually!==void 0?!!e.startSessionReplayRecordingManually:v===0,traceSampleRate:(r=e.traceSampleRate)!==null&&r!==void 0?r:100,rulePsr:ih(e.traceSampleRate)?e.traceSampleRate/100:void 0,allowedTracingUrls:f,excludedActivityUrls:(i=e.excludedActivityUrls)!==null&&i!==void 0?i:[],workerUrl:e.workerUrl,compressIntakeRequests:!!e.compressIntakeRequests,trackUserInteractions:!!(!((o=e.trackUserInteractions)!==null&&o!==void 0)||o),trackViewsManually:!!e.trackViewsManually,trackResources:!!(!((a=e.trackResources)!==null&&a!==void 0)||a),trackLongTasks:!!(!((l=e.trackLongTasks)!==null&&l!==void 0)||l),trackBfcacheViews:!!e.trackBfcacheViews,trackEarlyRequests:!!e.trackEarlyRequests,subdomain:e.subdomain,defaultPrivacyLevel:Uy(Cd,e.defaultPrivacyLevel)?e.defaultPrivacyLevel:Cd.MASK,enablePrivacyForActionName:!!e.enablePrivacyForActionName,traceContextInjection:Uy(kC,e.traceContextInjection)?e.traceContextInjection:kC.SAMPLED,plugins:e.plugins||[],trackFeatureFlagsForEvents:e.trackFeatureFlagsForEvents||[],profilingSampleRate:(d=e.profilingSampleRate)!==null&&d!==void 0?d:0,propagateTraceBaggage:!!e.propagateTraceBaggage,allowedGraphQlUrls:h,...m}}function vse(e){if(e.allowedTracingUrls===void 0)return[];if(!Array.isArray(e.allowedTracingUrls)){yt.error("Allowed Tracing URLs should be an array");return}if(e.allowedTracingUrls.length!==0&&e.service===void 0){yt.error("Service needs to be configured when tracing is enabled");return}const t=[];return e.allowedTracingUrls.forEach(n=>{const r=hF(n);r?t.push(r):yt.warn("Allowed Tracing Urls parameters should be a string, RegExp, function, or an object. Ignoring parameter",n)}),t}function yse(e){const t=new Set;return Ac(e.allowedTracingUrls)&&e.allowedTracingUrls.forEach(n=>{var r;(r=hF(n))===null||r===void 0||r.propagatorTypes.forEach(i=>t.add(i))}),Array.from(t)}function hF(e){if(Vy(e))return{match:e,propagatorTypes:I$};if(ou(e)&&Vy(e.match)&&(e.propagatorTypes===null||e.propagatorTypes===void 0||Array.isArray(e.propagatorTypes)))return{match:e.match,propagatorTypes:e.propagatorTypes||I$}}function bse(e){if(!e.allowedGraphQlUrls)return[];if(!Array.isArray(e.allowedGraphQlUrls))return yt.warn("allowedGraphQlUrls should be an array"),[];const t=[];return e.allowedGraphQlUrls.forEach(n=>{Vy(n)?t.push({match:n,trackPayload:!1,trackResponseErrors:!1}):ou(n)&&Vy(n.match)&&t.push({match:n.match,trackPayload:!!n.trackPayload,trackResponseErrors:!!n.trackResponseErrors})}),t}function xse(e){return Ac(e)&&e.some(t=>ou(t)&&t.trackPayload)}function wse(e){return Ac(e)&&e.some(t=>ou(t)&&t.trackResponseErrors)}function Sse(e){var t;const n=Qie(e);return{session_replay_sample_rate:e.sessionReplaySampleRate,start_session_replay_recording_manually:e.startSessionReplayRecordingManually,trace_sample_rate:e.traceSampleRate,trace_context_injection:e.traceContextInjection,propagate_trace_baggage:e.propagateTraceBaggage,action_name_attribute:e.actionNameAttribute,use_allowed_tracing_urls:Ac(e.allowedTracingUrls),use_allowed_graph_ql_urls:Ac(e.allowedGraphQlUrls),use_track_graph_ql_payload:xse(e.allowedGraphQlUrls),use_track_graph_ql_response_errors:wse(e.allowedGraphQlUrls),selected_tracing_propagators:yse(e),default_privacy_level:e.defaultPrivacyLevel,enable_privacy_for_action_name:e.enablePrivacyForActionName,use_excluded_activity_urls:Ac(e.excludedActivityUrls),use_worker_url:!!e.workerUrl,compress_intake_requests:e.compressIntakeRequests,track_views_manually:e.trackViewsManually,track_user_interactions:e.trackUserInteractions,track_resources:e.trackResources,track_long_task:e.trackLongTasks,track_bfcache_views:e.trackBfcacheViews,track_early_requests:e.trackEarlyRequests,plugins:(t=e.plugins)===null||t===void 0?void 0:t.map(r=>{var i;return{name:r.name,...(i=r.getConfigurationTelemetry)===null||i===void 0?void 0:i.call(r)}}),track_feature_flags_for_events:e.trackFeatureFlagsForEvents,remote_configuration_id:e.remoteConfigurationId,profiling_sample_rate:e.profilingSampleRate,use_remote_configuration_proxy:!!e.remoteConfigurationProxy,...n}}function _se(e){const t=[];let n=0,r;const i={quote:void 0,escapeSequence:void 0};let o="";for(const a of e){if(r=T$[n].find(l=>Ise[l](a,i)),!r)return[];if(i.escapeSequence!==void 0&&r!==12){if(!Ase(i.escapeSequence))return[];o+=Dse(i.escapeSequence),i.escapeSequence=void 0}Tse.includes(r)?o+=a:Nse.includes(r)&&o!==""?(t.push(o),o=""):r===12?i.escapeSequence=i.escapeSequence?`${i.escapeSequence}${a}`:a:r===8?i.quote=a:r===9&&(i.quote=void 0),n=r}return T$[n].includes(1)?(o!==""&&t.push(o),t):[]}const Cse=/[a-zA-Z_$]/,kse=/[a-zA-Z0-9_$]/,Ese=/[0-9]/,jse=/[a-fA-F0-9]/,Rse=`'"`,Ise={0:()=>!1,1:()=>!1,2:e=>Cse.test(e),3:e=>kse.test(e),4:e=>e===".",5:e=>e==="[",6:e=>e==="]",7:e=>Ese.test(e),8:e=>Rse.includes(e),9:(e,t)=>e===t.quote,10:()=>!0,11:e=>e==="\\",12:(e,t)=>t.escapeSequence===void 0?`${t.quote}/\\bfnrtu`.includes(e):t.escapeSequence.startsWith("u")&&t.escapeSequence.length<5?jse.test(e):!1},T$={0:[2,5],1:[],2:[3,4,5,1],3:[3,4,5,1],4:[2],5:[8,7],6:[4,5,1],7:[7,6],8:[11,9,10],9:[6],10:[11,9,10],11:[12],12:[12,11,9,10]},Tse=[2,3,7,10],Nse=[4,5,6];function Ase(e){return`"'/\\bfnrt`.includes(e)||e.startsWith("u")&&e.length===5}const Ose={'"':'"',"'":"'","/":"/","\\":"\\",b:"\b",f:"\f",n:`
38
+ `,r:"\r",t:" "};function Dse(e){return e.startsWith("u")?String.fromCharCode(parseInt(e.slice(1),16)):Ose[e]}const $se="v1",Pse=["applicationId","service","env","version","sessionSampleRate","sessionReplaySampleRate","defaultPrivacyLevel","enablePrivacyForActionName","traceSampleRate","trackSessionAcrossSubdomains","allowedTracingUrls","allowedTrackingOrigins"];async function Mse(e,t){let n;const r=Lse(),i=await Vse(e);return i.ok?(r.increment("fetch","success"),n=zse(e,i.value,t,r)):(r.increment("fetch","failure"),yt.error(i.error)),ax("remote configuration metrics",{metrics:r.get()}),n}function zse(e,t,n,r){const i={...e};return Pse.forEach(v=>{v in t&&(i[v]=o(t[v]))}),Object.keys(n).forEach(v=>{t[v]!==void 0&&a(n[v],t[v])}),i;function o(v){if(Array.isArray(v))return v.map(o);if(ou(v)){if(Fse(v)){const y=v.rcSerializedType;switch(y){case"string":return v.value;case"regex":return gF(v.value);case"dynamic":return l(v);default:yt.error(`Unsupported remote configuration: "rcSerializedType": "${y}"`);return}}return tL(v,o)}return v}function a(v,y){y.forEach(({key:x,value:S})=>{v.setContextProperty(x,o(S))})}function l(v){const y=v.strategy;let x;switch(y){case"cookie":x=d(v);break;case"dom":x=f(v);break;case"js":x=h(v);break;default:yt.error(`Unsupported remote configuration: "strategy": "${y}"`);return}const S=v.extractor;return S!==void 0&&typeof x=="string"?Use(S,x):x}function d({name:v}){const y=Qb(v);return r.increment("cookie",y!==void 0?"success":"missing"),y}function f({selector:v,attribute:y}){let x;try{x=document.querySelector(v)}catch{yt.error(`Invalid selector in the remote configuration: '${v}'`),r.increment("dom","failure");return}if(!x){r.increment("dom","missing");return}if(m(x,y)){yt.error(`Forbidden element selected by the remote configuration: '${v}'`),r.increment("dom","failure");return}const S=y!==void 0?x.getAttribute(y):x.textContent;if(S===null){r.increment("dom","missing");return}return r.increment("dom","success"),S}function m(v,y){return v.getAttribute("type")==="password"&&y==="value"}function h({path:v}){let y=window;const x=_se(v);if(x.length===0){yt.error(`Invalid JSON path in the remote configuration: '${v}'`),r.increment("js","failure");return}for(const S of x){if(!(S in y)){r.increment("js","missing");return}try{y=y[S]}catch(C){yt.error(`Error accessing: '${v}'`,C),r.increment("js","failure");return}}return r.increment("js","success"),y}}function Lse(){const e={fetch:{}};return{get:()=>e,increment:(t,n)=>{e[t]||(e[t]={}),e[t][n]||(e[t][n]=0),e[t][n]=e[t][n]+1}}}function Fse(e){return"rcSerializedType"in e}function gF(e){try{return new RegExp(e)}catch{yt.error(`Invalid regex in the remote configuration: '${e}'`)}}function Use(e,t){const n=gF(e.value);if(n===void 0)return;const r=n.exec(t);if(r===null)return;const[i,o]=r;return o||i}async function Vse(e){let t;try{t=await jE(Bse(e))}catch{t=void 0}if(!t||!t.ok)return{ok:!1,error:new Error("Error fetching the remote configuration.")};const n=await t.json();return n.rum?{ok:!0,value:n.rum}:{ok:!1,error:new Error("No remote configuration for RUM.")}}function Bse(e){return e.remoteConfigurationProxy?e.remoteConfigurationProxy:`https://sdk-configuration.${jL("rum",e)}/${$se}/${encodeURIComponent(e.remoteConfigurationId)}.json`}function Hse({ignoreInitIfSyntheticsWillInjectRum:e=!0,startDeflateWorker:t},n,r,i,o=dae){const a=tse(),l=uF();H_(l,br.globalContext,a);const d=dF();H_(d,br.userContext,a);const f=cF();H_(f,br.accountContext,a);let m,h,v,y,x;const S=hse(),C=n.observable.subscribe(E),k={};function E(){if(!v||!y||!n.isGranted())return;x||(x=o("browser-rum-sdk",y,S)),C.unsubscribe();let N;if(y.trackViewsManually){if(!m)return;a.remove(m.callback),N=m.options}const D=i(y,h,N,x,S);a.drain(D)}function j(N,D){const L=Xd();if(L&&(N=qse(N)),v=N,gae(Sse(N)),y){PL("DD_RUM",N);return}const H=gse(N,D);if(H){if(!L&&!H.sessionStoreStrategyType){yt.warn("No storage available for session. We will not send any data.");return}H.compressIntakeRequests&&!L&&t&&(h=t(H,"Datadog RUM",on),!h)||(y=H,lF().subscribe(on),n.tryToInit(H.trackingConsent),E())}}const I=N=>{a.add(D=>D.addDurationVital(N))};return{init(N,D,L){if(!N){yt.error("Missing configuration");return}eoe(N.enableExperimentalFeatures),v=N,!(e&&nF())&&(mF(N.plugins,"onInit",{initConfiguration:N,publicApi:D}),N.remoteConfigurationId?Mse(N,{user:d,context:l}).then(H=>{H&&j(H,L)}).catch(iu):j(N,L))},get initConfiguration(){return v},getInternalContext:on,stopSession:on,addTiming(N,D=wr()){a.add(L=>L.addTiming(N,D))},startView(N,D=Bn()){const L=H=>{H.startView(N,D)};a.add(L),m||(m={options:N,callback:L},E())},setViewName(N){a.add(D=>D.setViewName(N))},setViewContext(N){a.add(D=>D.setViewContext(N))},setViewContextProperty(N,D){a.add(L=>L.setViewContextProperty(N,D))},getViewContext:()=>k,globalContext:l,userContext:d,accountContext:f,addAction(N){a.add(D=>D.addAction(N))},startAction(N,D){const L=Bn();a.add(H=>H.startAction(N,D,L))},stopAction(N,D){const L=Bn();a.add(H=>H.stopAction(N,D,L))},addError(N){a.add(D=>D.addError(N))},addFeatureFlagEvaluation(N,D){a.add(L=>L.addFeatureFlagEvaluation(N,D))},startDurationVital(N,D){return fF(r,N,D)},stopDurationVital(N,D){pF(I,r,N,D)},addDurationVital:I,addOperationStepVital:(N,D,L,H)=>{a.add(ee=>ee.addOperationStepVital(qt(N),D,qt(L),qt(H)))}}}function qse(e){var t,n;return{...e,applicationId:"00000000-aaaa-0000-aaaa-000000000000",clientToken:"empty",sessionSampleRate:100,defaultPrivacyLevel:(t=e.defaultPrivacyLevel)!==null&&t!==void 0?t:(n=sh())===null||n===void 0?void 0:n.getPrivacyLevel()}}function H_(e,t,n){e.changeObservable.subscribe(()=>{const r=e.getContext();n.add(i=>i[t].setContext(r))})}function Kse(e,t,n,r={},i){const o=Oie(),a=fse(),l=use().observable;let d=Hse(r,o,a,(v,y,x,S,C)=>{const k=y&&r.createDeflateEncoder?j=>r.createDeflateEncoder(v,y,j):eF,E=e(v,t,n,x,k,o,a,l,S,C,r.sdkName);return t.onRumStart(E.lifeCycle,v,E.session,E.viewHistory,y,E.telemetry),n.onRumStart(E.lifeCycle,E.hooks,v,E.session,E.viewHistory,E.longTaskContexts,k),d=Gse(d,E),mF(v.plugins,"onRumStart",{strategy:d,addEvent:E.addEvent}),E},i);const f=()=>d,m=v=>{const y=al("view");Yo(()=>{const x=typeof v=="object"?v:{name:v};d.startView({...x,handlingStack:y}),yr({feature:"start-view"})})},h=Aoe({init:v=>{const y=new Error().stack;Yo(()=>d.init(v,h,y))},setTrackingConsent:Et(v=>{o.update(v),yr({feature:"set-tracking-consent",tracking_consent:v})}),setViewName:Et(v=>{d.setViewName(v),yr({feature:"set-view-name"})}),setViewContext:Et(v=>{d.setViewContext(v),yr({feature:"set-view-context"})}),setViewContextProperty:Et((v,y)=>{d.setViewContextProperty(v,y),yr({feature:"set-view-context-property"})}),getViewContext:Et(()=>(yr({feature:"set-view-context-property"}),d.getViewContext())),getInternalContext:Et(v=>d.getInternalContext(v)),getInitConfiguration:Et(()=>EE(d.initConfiguration)),addAction:(v,y)=>{const x=al("action");Yo(()=>{d.addAction({name:qt(v),context:qt(y),startClocks:Bn(),type:NE.CUSTOM,handlingStack:x}),yr({feature:"add-action"})})},startAction:Et((v,y)=>{d.initConfiguration&&!ms(Po.START_STOP_ACTION)||d.startAction(qt(v),{type:qt(y&&y.type),context:qt(y&&y.context),actionKey:y&&y.actionKey})}),stopAction:Et((v,y)=>{d.initConfiguration&&!ms(Po.START_STOP_ACTION)||d.stopAction(qt(v),{type:qt(y&&y.type),context:qt(y&&y.context),actionKey:y&&y.actionKey})}),addError:(v,y)=>{const x=al("error");Yo(()=>{d.addError({error:v,handlingStack:x,context:qt(y),startClocks:Bn()}),yr({feature:"add-error"})})},addTiming:Et((v,y)=>{d.addTiming(qt(v),y)}),setGlobalContext:qr(f,br.globalContext,Kr.setContext,"set-global-context"),getGlobalContext:qr(f,br.globalContext,Kr.getContext,"get-global-context"),setGlobalContextProperty:qr(f,br.globalContext,Kr.setContextProperty,"set-global-context-property"),removeGlobalContextProperty:qr(f,br.globalContext,Kr.removeContextProperty,"remove-global-context-property"),clearGlobalContext:qr(f,br.globalContext,Kr.clearContext,"clear-global-context"),setUser:qr(f,br.userContext,Kr.setContext,"set-user"),getUser:qr(f,br.userContext,Kr.getContext,"get-user"),setUserProperty:qr(f,br.userContext,Kr.setContextProperty,"set-user-property"),removeUserProperty:qr(f,br.userContext,Kr.removeContextProperty,"remove-user-property"),clearUser:qr(f,br.userContext,Kr.clearContext,"clear-user"),setAccount:qr(f,br.accountContext,Kr.setContext,"set-account"),getAccount:qr(f,br.accountContext,Kr.getContext,"get-account"),setAccountProperty:qr(f,br.accountContext,Kr.setContextProperty,"set-account-property"),removeAccountProperty:qr(f,br.accountContext,Kr.removeContextProperty,"remove-account-property"),clearAccount:qr(f,br.accountContext,Kr.clearContext,"clear-account"),startView:m,stopSession:Et(()=>{d.stopSession(),yr({feature:"stop-session"})}),addFeatureFlagEvaluation:Et((v,y)=>{d.addFeatureFlagEvaluation(qt(v),qt(y)),yr({feature:"add-feature-flag-evaluation"})}),getSessionReplayLink:Et(()=>t.getSessionReplayLink()),startSessionReplayRecording:Et(v=>{t.start(v),yr({feature:"start-session-replay-recording",force:v&&v.force})}),stopSessionReplayRecording:Et(()=>t.stop()),addDurationVital:(v,y)=>{const x=al("vital");Yo(()=>{yr({feature:"add-duration-vital"}),d.addDurationVital({name:qt(v),type:Am.DURATION,startClocks:sL(y.startTime),duration:y.duration,context:qt(y&&y.context),description:qt(y&&y.description),handlingStack:x})})},startDurationVital:(v,y)=>{const x=al("vital");return Yo(()=>(yr({feature:"start-duration-vital"}),d.startDurationVital(qt(v),{context:qt(y&&y.context),description:qt(y&&y.description),handlingStack:x})))},stopDurationVital:Et((v,y)=>{yr({feature:"stop-duration-vital"}),d.stopDurationVital(typeof v=="string"?qt(v):v,{context:qt(y&&y.context),description:qt(y&&y.description)})}),startFeatureOperation:Et((v,y)=>{yr({feature:"add-operation-step-vital",action_type:"start"}),d.addOperationStepVital(v,"start",y)}),succeedFeatureOperation:Et((v,y)=>{yr({feature:"add-operation-step-vital",action_type:"succeed"}),d.addOperationStepVital(v,"end",y)}),failFeatureOperation:Et((v,y,x)=>{yr({feature:"add-operation-step-vital",action_type:"fail"}),d.addOperationStepVital(v,"end",x,y)})});return h}function Gse(e,t){return{init:n=>{PL("DD_RUM",n)},initConfiguration:e.initConfiguration,...t}}function Zse(){const e=Yse();return new Ft(t=>{if(!e)return;const n=new e(Et(r=>t.notify(r)));return n.observe(document,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),()=>n.disconnect()})}function Yse(){let e;const t=window;if(t.Zone&&(e=fs(t,"MutationObserver"),t.MutationObserver&&e===t.MutationObserver)){const n=new t.MutationObserver(on),r=fs(n,"originalInstance");e=r&&r.constructor}return e||(e=t.MutationObserver),e}function Wse(){const e=new Ft,{stop:t}=Ca(window,"open",()=>e.notify());return{observable:e,stop:t}}function Xse(e,t,n,r,i){return{get:o=>{const a=n.findView(o),l=i.findUrl(o),d=t.findTrackedSession(o);if(d&&a&&l){const f=r.findActionId(o);return{application_id:e,session_id:d.id,user_action:f?{id:f}:void 0,view:{id:a.id,name:a.name,referrer:l.referrer,url:l.url}}}}}}const Jse=Aae,Qse=Ml;function ele(e){const t=su({expireDelay:Qse});e.subscribe(1,r=>{t.add(n(r),r.startClocks.relative)}),e.subscribe(6,({endClocks:r})=>{t.closeActive(r.relative)}),e.subscribe(3,r=>{const i=t.find(r.startClocks.relative);i&&(r.name&&(i.name=r.name),r.context&&(i.context=r.context),i.sessionIsActive=r.sessionIsActive)}),e.subscribe(10,()=>{t.reset()});function n(r){return{service:r.service,version:r.version,context:r.context,id:r.id,name:r.name,startClocks:r.startClocks}}return{findView:r=>t.find(r),stop:()=>{t.stop()}}}const vF="initial_document",tle=[[Yr.DOCUMENT,e=>vF===e],[Yr.XHR,e=>e==="xmlhttprequest"],[Yr.FETCH,e=>e==="fetch"],[Yr.BEACON,e=>e==="beacon"],[Yr.CSS,(e,t)=>/\.css$/i.test(t)],[Yr.JS,(e,t)=>/\.js$/i.test(t)],[Yr.IMAGE,(e,t)=>["image","img","icon"].includes(e)||/\.(gif|jpg|jpeg|tiff|png|svg|ico)$/i.exec(t)!==null],[Yr.FONT,(e,t)=>/\.(woff|eot|woff2|ttf)$/i.exec(t)!==null],[Yr.MEDIA,(e,t)=>["audio","video"].includes(e)||/\.(mp3|mp4)$/i.exec(t)!==null]];function nle(e){const t=e.name;if(!Zre(t))return Yr.OTHER;const n=Yre(t);for(const[r,i]of tle)if(i(e.initiatorType,n))return r;return Yr.OTHER}function N$(...e){for(let t=1;t<e.length;t+=1)if(e[t-1]>e[t])return!1;return!0}function yF(e){return e.initiatorType==="xmlhttprequest"||e.initiatorType==="fetch"}function rle(e){const{duration:t,startTime:n,responseEnd:r}=e;return t===0&&n<r?Xn(n,r):t}function ile(e){if(!xF(e))return;const{startTime:t,fetchStart:n,workerStart:r,redirectStart:i,redirectEnd:o,domainLookupStart:a,domainLookupEnd:l,connectStart:d,secureConnectionStart:f,connectEnd:m,requestStart:h,responseStart:v,responseEnd:y}=e,x={download:hc(t,v,y),first_byte:hc(t,h,v)};return 0<r&&r<n&&(x.worker=hc(t,r,n)),n<m&&(x.connect=hc(t,d,m),d<=f&&f<=m&&(x.ssl=hc(t,f,m))),n<l&&(x.dns=hc(t,a,l)),t<o&&(x.redirect=hc(t,i,o)),x}function bF(e){return e.duration>=0}function xF(e){const t=N$(e.startTime,e.fetchStart,e.domainLookupStart,e.domainLookupEnd,e.connectStart,e.connectEnd,e.requestStart,e.responseStart,e.responseEnd),n=ole(e)?N$(e.startTime,e.redirectStart,e.redirectEnd,e.fetchStart):!0;return t&&n}function ole(e){return e.redirectEnd>e.startTime}function hc(e,t,n){if(e<=t&&t<=n)return{duration:ht(Xn(t,n)),start:ht(Xn(e,t))}}function ale(e){return e.nextHopProtocol===""?void 0:e.nextHopProtocol}function sle(e){return e.deliveryType===""?"other":e.deliveryType}function lle(e){if(e.startTime<e.responseStart){const{encodedBodySize:t,decodedBodySize:n,transferSize:r}=e;return{size:n,encoded_body_size:t,decoded_body_size:n,transfer_size:r}}return{size:void 0,encoded_body_size:void 0,decoded_body_size:void 0,transfer_size:void 0}}function AE(e){return e&&(!Wie(e)||ms(Po.TRACK_INTAKE_REQUESTS))}const cle=/data:(.+)?(;base64)?,/g,ule=24e3;function dle(e,t=ule){if(e.length<=t||!e.startsWith("data:"))return e;const n=e.substring(0,100).match(cle);return n?`${n[0]}[...]`:e}const A$=new Map;function wF(e,t){if(t===100)return!0;if(t===0)return!1;const n=A$.get(t);if(n&&e===n.sessionId)return n.decision;let r;return window.BigInt?r=fle(BigInt(`0x${e.split("-")[4]}`),t):r=Sc(t),A$.set(t,{sessionId:e,decision:r}),r}function fle(e,t){const n=BigInt("1111111111111111111"),r=BigInt("0x10000000000000000"),i=e*n%r;return Number(i)<=t/100*Number(r)}function ple(){return _F(64)}function SF(){return _F(63)}function _F(e){const t=crypto.getRandomValues(new Uint32Array(2));return e===63&&(t[t.length-1]>>>=1),{toString(n=10){let r=t[1],i=t[0],o="";do{const a=r%n*4294967296+i;r=Math.floor(r/n),i=Math.floor(a/n),o=(a%n).toString(n)+o}while(r||i);return o}}}function sd(e){return e.toString(16).padStart(16,"0")}function mle(e){e.status===0&&!e.isAborted&&(e.traceId=void 0,e.spanId=void 0,e.traceSampled=void 0)}function hle(e,t,n,r){return{clearTracingIfNeeded:mle,traceFetch:i=>O$(e,i,t,n,r,o=>{var a;if(i.input instanceof Request&&!(!((a=i.init)===null||a===void 0)&&a.headers))i.input=new Request(i.input),Object.keys(o).forEach(l=>{i.input.headers.append(l,o[l])});else{i.init=Vc(i.init);const l=[];i.init.headers instanceof Headers?i.init.headers.forEach((d,f)=>{l.push([f,d])}):Array.isArray(i.init.headers)?i.init.headers.forEach(d=>{l.push(d)}):i.init.headers&&Object.keys(i.init.headers).forEach(d=>{l.push([d,i.init.headers[d]])}),i.init.headers=l.concat(ex(o))}}),traceXhr:(i,o)=>O$(e,i,t,n,r,a=>{Object.keys(a).forEach(l=>{o.setRequestHeader(l,a[l])})})}}function O$(e,t,n,r,i,o){const a=n.findTrackedSession();if(!a)return;const l=e.allowedTracingUrls.find(m=>nx([m.match],t.url,!0));if(!l)return;const d=wF(a.id,e.traceSampleRate);(d||e.traceContextInjection===kC.ALL)&&(t.traceSampled=d,t.traceId=ple(),t.spanId=SF(),o(gle(t.traceId,t.spanId,t.traceSampled,a.id,l.propagatorTypes,r,i,e)))}function gle(e,t,n,r,i,o,a,l){const d={};if(i.forEach(f=>{switch(f){case"datadog":{Object.assign(d,{"x-datadog-origin":"rum","x-datadog-parent-id":t.toString(),"x-datadog-sampling-priority":n?"1":"0","x-datadog-trace-id":e.toString()});break}case"tracecontext":{Object.assign(d,{traceparent:`00-0000000000000000${sd(e)}-${sd(t)}-0${n?"1":"0"}`,tracestate:`dd=s:${n?"1":"0"};o:rum`});break}case"b3":{Object.assign(d,{b3:`${sd(e)}-${sd(t)}-${n?"1":"0"}`});break}case"b3multi":{Object.assign(d,{"X-B3-TraceId":sd(e),"X-B3-SpanId":sd(t),"X-B3-Sampled":n?"1":"0"});break}}}),l.propagateTraceBaggage){const f={"session.id":r},m=o.getContext().id;typeof m=="string"&&(f["user.id"]=m);const h=a.getContext().id;typeof h=="string"&&(f["account.id"]=h);const v=Object.entries(f).map(([y,x])=>`${y}=${encodeURIComponent(x)}`).join(",");v&&(d.baggage=v)}return d}const vle=32*au;function yle(e,t){const n=xle(e.requestBody,t.trackPayload);if(n){if(t.trackResponseErrors&&e.responseBody){const r=ble(e.responseBody);r&&(n.error_count=r.length,n.errors=r)}return n}}function ble(e){let t;try{t=JSON.parse(e)}catch{return}if(!t||typeof t!="object")return;const n=t;return Ac(n.errors)?n.errors.map(i=>{var o;return{message:i.message,path:i.path,locations:i.locations,code:(o=i.extensions)===null||o===void 0?void 0:o.code}}):void 0}function CF(e,t){return t.allowedGraphQlUrls.find(n=>nx([n.match],e))}function xle(e,t=!1){if(!e||typeof e!="string")return;let n;try{n=JSON.parse(e)}catch{return}if(!n)return;let r,i;if(n.query){const l=n.query.trim();r=wle(l),t&&(i=xE(l,vle,"..."))}const o=n.operationName;let a;return n.variables&&(a=JSON.stringify(n.variables)),{operationType:r,operationName:o,variables:a,payload:i}}function wle(e){var t;return(t=e.match(/^\s*(query|mutation|subscription)\b/i))===null||t===void 0?void 0:t[1]}let D$=1;function Sle(e,t,n,r,i){const o=hle(t,n,r,i);_le(e,t,o),Cle(e,t,o)}function _le(e,t,n){const r=$ae(t).subscribe(i=>{const o=i;if(AE(o.url))switch(o.state){case"start":n.traceXhr(o,o.xhr),o.requestIndex=kF(),e.notify(7,{requestIndex:o.requestIndex,url:o.url});break;case"complete":n.clearTracingIfNeeded(o),e.notify(8,{duration:o.duration,method:o.method,requestIndex:o.requestIndex,spanId:o.spanId,startClocks:o.startClocks,status:o.status,traceId:o.traceId,traceSampled:o.traceSampled,type:lx.XHR,url:o.url,xhr:o.xhr,isAborted:o.isAborted,handlingStack:o.handlingStack,requestBody:o.requestBody,responseBody:o.responseBody});break}});return{stop:()=>r.unsubscribe()}}function Cle(e,t,n){const r=lF({responseBodyAction:i=>{var o;return!((o=CF(i.url,t))===null||o===void 0)&&o.trackResponseErrors?2:1}}).subscribe(i=>{var o;const a=i;if(AE(a.url))switch(a.state){case"start":n.traceFetch(a),a.requestIndex=kF(),e.notify(7,{requestIndex:a.requestIndex,url:a.url});break;case"resolve":n.clearTracingIfNeeded(a),e.notify(8,{duration:Xn(a.startClocks.timeStamp,wr()),method:a.method,requestIndex:a.requestIndex,responseType:a.responseType,spanId:a.spanId,startClocks:a.startClocks,status:a.status,traceId:a.traceId,traceSampled:a.traceSampled,type:lx.FETCH,url:a.url,response:a.response,init:a.init,input:a.input,isAborted:a.isAborted,handlingStack:a.handlingStack,requestBody:(o=a.init)===null||o===void 0?void 0:o.body,responseBody:a.responseBody});break}});return{stop:()=>r.unsubscribe()}}function kF(){const e=D$;return D$+=1,e}function EF(e){return ih(e)&&e<0?void 0:e}function RC(e){return e.nodeType===Node.TEXT_NODE}function kle(e){return e.nodeType===Node.COMMENT_NODE}function gs(e){return e.nodeType===Node.ELEMENT_NODE}function OE(e){return gs(e)&&!!e.shadowRoot}function jF(e){const t=e;return!!t.host&&t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&gs(t.host)}function GPe(e){return e.childNodes.length>0||OE(e)}function ZPe(e,t){let n=e.firstChild;for(;n;)t(n),n=n.nextSibling;OE(e)&&t(e.shadowRoot)}function Ele(e){return jF(e)?e.host:e.parentNode}function RF(e){if(e.parentElement)return e.parentElement;const t=e.parentNode;return t&&jF(t)?t.host:null}function jle(e,t){const n=Qr();let r=!1;const{stop:i}=Sl(e,window,["click","mousedown","keydown","touchstart","pointerdown"],l=>{if(!l.cancelable)return;const d={entryType:"first-input",processingStart:Ji(),processingEnd:Ji(),startTime:l.timeStamp,duration:0,name:"",cancelable:!1,target:null,toJSON:()=>({})};l.type==="pointerdown"?o(e,d):a(d)},{passive:!0,capture:!0});return{stop:i};function o(l,d){Sl(l,window,["pointerup","pointercancel"],f=>{f.type==="pointerup"&&a(d)},{once:!0})}function a(l){if(!r){r=!0,i();const d=l.processingStart-l.startTime;d>=0&&d<Qr()-n&&t(l)}}}var Lt;(function(e){e.EVENT="event",e.FIRST_INPUT="first-input",e.LARGEST_CONTENTFUL_PAINT="largest-contentful-paint",e.LAYOUT_SHIFT="layout-shift",e.LONG_TASK="longtask",e.LONG_ANIMATION_FRAME="long-animation-frame",e.NAVIGATION="navigation",e.PAINT="paint",e.RESOURCE="resource",e.VISIBILITY_STATE="visibility-state"})(Lt||(Lt={}));function vs(e,t){return new Ft(n=>{if(!window.PerformanceObserver)return;const r=d=>{const f=Tle(d);f.length>0&&n.notify(f)};let i,o=!0;const a=new PerformanceObserver(Et(d=>{o?i=zr(()=>r(d.getEntries())):r(d.getEntries())}));try{a.observe(t)}catch{if([Lt.RESOURCE,Lt.NAVIGATION,Lt.LONG_TASK,Lt.PAINT].includes(t.type)){t.buffered&&(i=zr(()=>r(performance.getEntriesByType(t.type))));try{a.observe({entryTypes:[t.type]})}catch{return}}}o=!1,Rle(e);let l;return!Ll(Lt.FIRST_INPUT)&&t.type===Lt.FIRST_INPUT&&({stop:l}=jle(e,d=>{r([d])})),()=>{a.disconnect(),l&&l(),ko(i)}})}let Hp;function Rle(e){return!Hp&&Ile()&&"addEventListener"in performance&&(Hp=zn(e,performance,"resourcetimingbufferfull",()=>{performance.clearResourceTimings()})),()=>{Hp?.stop()}}function Ile(){return window.performance!==void 0&&"getEntries"in performance}function Ll(e){return window.PerformanceObserver&&PerformanceObserver.supportedEntryTypes!==void 0&&PerformanceObserver.supportedEntryTypes.includes(e)}function Tle(e){return e.filter(t=>!Nle(t))}function Nle(e){return e.entryType===Lt.RESOURCE&&(!AE(e.name)||!bF(e))}const IF=100,Ale=100,$$="data-dd-excluded-activity-mutations";function DE(e,t,n,r,i,o){const a=Dle(e,t,n,r);return Ole(a,i,o)}function Ole(e,t,n){let r,i=!1;const o=zr(Et(()=>f({hadActivity:!1})),IF),a=n!==void 0?zr(Et(()=>f({hadActivity:!0,end:wr()})),n):void 0,l=e.subscribe(({isBusy:m})=>{ko(o),ko(r);const h=wr();m||(r=zr(Et(()=>f({hadActivity:!0,end:h})),Ale))}),d=()=>{i=!0,ko(o),ko(r),ko(a),l.unsubscribe()};function f(m){i||(d(),t(m))}return{stop:d}}function Dle(e,t,n,r){return new Ft(i=>{const o=[];let a,l=0;return o.push(t.subscribe(f=>{f.every($le)||d()}),n.subscribe(d),vs(r,{type:Lt.RESOURCE}).subscribe(f=>{f.some(m=>!q_(r,m.name))&&d()}),e.subscribe(7,f=>{q_(r,f.url)||(a===void 0&&(a=f.requestIndex),l+=1,d())}),e.subscribe(8,f=>{q_(r,f.url)||a===void 0||f.requestIndex<a||(l-=1,d())})),()=>{o.forEach(f=>f.unsubscribe())};function d(){i.notify({isBusy:l>0})}})}function q_(e,t){return nx(e.excludedActivityUrls,t)}function $le(e){const t=e.type==="characterData"?e.target.parentElement:e.target;return!!(t&&gs(t)&&t.matches(`[${$$}], [${$$}] *`))}const cx="data-dd-action-name",TF="Masked Element",NF=[cx,"data-testid","data-test","data-qa","data-cy","data-test-id","data-qa-id","data-testing","data-component","data-element","data-source-file"],Ple=[OF,zle],Mle=[OF,Lle,Fle];function lh(e,t){if(!e.isConnected)return;let n,r=e;for(;r&&r.nodeName!=="HTML";){const i=P$(r,Ple,Vle,t,n);if(i)return i;n=P$(r,Mle,Ble,t,n)||ux(Ule(r),n),r=r.parentElement}return n}function AF(e){return/[0-9]/.test(e)}function zle(e){if(e.id&&!AF(e.id))return`#${CSS.escape(e.id)}`}function Lle(e){if(e.tagName==="BODY")return;const t=e.classList;for(let n=0;n<t.length;n+=1){const r=t[n];if(!AF(r))return`${CSS.escape(e.tagName)}.${CSS.escape(r)}`}}function Fle(e){return CSS.escape(e.tagName)}function OF(e,t){if(t){const r=n(t);if(r)return r}for(const r of NF){const i=n(r);if(i)return i}function n(r){if(e.hasAttribute(r))return`${CSS.escape(e.tagName)}[${r}="${CSS.escape(e.getAttribute(r))}"]`}}function Ule(e){let t=e.parentElement.firstElementChild,n=1;for(;t&&t!==e;)t.tagName===e.tagName&&(n+=1),t=t.nextElementSibling;return`${CSS.escape(e.tagName)}:nth-of-type(${n})`}function P$(e,t,n,r,i){for(const o of t){const a=o(e,r);if(a&&n(e,a,i))return ux(a,i)}}function Vle(e,t,n){return e.ownerDocument.querySelectorAll(ux(t,n)).length===1}function Ble(e,t,n){let r;if(n===void 0)r=o=>o.matches(t);else{const o=ux(`${t}:scope`,n);r=a=>a.querySelector(o)!==null}let i=e.previousElementSibling;for(;i;){if(r(i))return!1;i=i.previousElementSibling}for(i=e.nextElementSibling;i;){if(r(i))return!1;i=i.nextElementSibling}return!0}function ux(e,t){return t?`${e}>${t}`:e}const Rt={IGNORE:"ignore",HIDDEN:"hidden",ALLOW:Cd.ALLOW,MASK:Cd.MASK,MASK_USER_INPUT:Cd.MASK_USER_INPUT,MASK_UNLESS_ALLOWLISTED:Cd.MASK_UNLESS_ALLOWLISTED},DF="data-dd-privacy",YPe="hidden",Hle="dd-privacy-",K_="***",WPe="data:image/gif;base64,R0lGODlhAQABAIAAAMLCwgAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==",qle={INPUT:!0,OUTPUT:!0,TEXTAREA:!0,SELECT:!0,OPTION:!0,DATALIST:!0,OPTGROUP:!0},Kle="x";function vc(e){return`[${DF}="${e}"], .${Hle}${e}`}function dx(e,t,n){if(n&&n.has(e))return n.get(e);const r=Ele(e),i=r?dx(r,t,n):t,o=Zle(e),a=Gle(o,i);return n&&n.set(e,a),a}function Gle(e,t){switch(t){case Rt.HIDDEN:case Rt.IGNORE:return t}switch(e){case Rt.ALLOW:case Rt.MASK:case Rt.MASK_USER_INPUT:case Rt.MASK_UNLESS_ALLOWLISTED:case Rt.HIDDEN:case Rt.IGNORE:return e;default:return t}}function Zle(e){if(gs(e)){if(e.tagName==="BASE")return Rt.ALLOW;if(e.tagName==="INPUT"){const t=e;if(t.type==="password"||t.type==="email"||t.type==="tel"||t.type==="hidden")return Rt.MASK;const n=t.getAttribute("autocomplete");if(n&&(n.startsWith("cc-")||n.endsWith("-password")))return Rt.MASK}if(e.matches(vc(Rt.HIDDEN)))return Rt.HIDDEN;if(e.matches(vc(Rt.MASK)))return Rt.MASK;if(e.matches(vc(Rt.MASK_UNLESS_ALLOWLISTED)))return Rt.MASK_UNLESS_ALLOWLISTED;if(e.matches(vc(Rt.MASK_USER_INPUT)))return Rt.MASK_USER_INPUT;if(e.matches(vc(Rt.ALLOW)))return Rt.ALLOW;if(Wle(e))return Rt.IGNORE}}function $F(e,t){switch(t){case Rt.MASK:case Rt.HIDDEN:case Rt.IGNORE:return!0;case Rt.MASK_UNLESS_ALLOWLISTED:return RC(e)?Dv(e.parentNode)?!0:!MF(e.textContent||""):Dv(e);case Rt.MASK_USER_INPUT:return RC(e)?Dv(e.parentNode):Dv(e);default:return!1}}function Yle(e,t,n,r,i){if(r!==Rt.MASK&&r!==Rt.MASK_UNLESS_ALLOWLISTED||t===DF||NF.includes(t)||t===i.actionNameAttribute)return!1;switch(t){case"title":case"alt":case"placeholder":case"aria-label":case"name":return!0}return!!(e==="A"&&t==="href"||e==="IFRAME"&&t==="srcdoc"||n&&t.startsWith("data-")||(e==="IMG"||e==="SOURCE")&&(t==="src"||t==="srcset"))}function Dv(e){if(!e||e.nodeType!==e.ELEMENT_NODE)return!1;const t=e;if(t.tagName==="INPUT")switch(t.type){case"button":case"color":case"reset":case"submit":return!1}return!!qle[t.tagName]}const PF=e=>e.replace(/\S/g,Kle);function XPe(e,t){var n;const r=(n=e.parentElement)===null||n===void 0?void 0:n.tagName;let i=e.textContent||"";if(r==="HEAD"&&!i.trim())return;const a=t;if(r==="SCRIPT")i=K_;else if(a===Rt.HIDDEN)i=K_;else if($F(e,a))if(r==="DATALIST"||r==="SELECT"||r==="OPTGROUP"){if(!i.trim())return}else r==="OPTION"?i=K_:a===Rt.MASK_UNLESS_ALLOWLISTED?i=zF(i):i=PF(i);return i}function Wle(e){if(e.nodeName==="SCRIPT")return!0;if(e.nodeName==="LINK"){const n=t("rel");return/preload|prefetch/i.test(n)&&t("as")==="script"||n==="shortcut icon"||n==="icon"}if(e.nodeName==="META"){const n=t("name"),r=t("rel"),i=t("property");return/^msapplication-tile(image|color)$/.test(n)||n==="application-name"||r==="icon"||r==="apple-touch-icon"||r==="shortcut icon"||n==="keywords"||n==="description"||/^(og|twitter|fb):/.test(i)||/^(og|twitter):/.test(n)||n==="pinterest"||n==="robots"||n==="googlebot"||n==="bingbot"||e.hasAttribute("http-equiv")||n==="author"||n==="generator"||n==="framework"||n==="publisher"||n==="progid"||/^article:/.test(i)||/^product:/.test(i)||n==="google-site-verification"||n==="yandex-verification"||n==="csrf-token"||n==="p:domain_verify"||n==="verify-v1"||n==="verification"||n==="shopify-checkout-api-token"}function t(n){return(e.getAttribute(n)||"").toLowerCase()}return!1}function MF(e){var t;return!e||!e.trim()?!0:((t=window.$DD_ALLOW)===null||t===void 0?void 0:t.has(e.toLocaleLowerCase()))||!1}function zF(e,t){return MF(e)?e:t||PF(e)}const LF=Ur,Xle=100;function Jle(e,t){const n=[];let r=0,i;o(e);function o(d){d.stopObservable.subscribe(a),n.push(d),ko(i),i=zr(l,LF)}function a(){r===1&&n.every(d=>d.isStopped())&&(r=2,t(n))}function l(){ko(i),r===0&&(r=1,a())}return{tryAppend:d=>r!==0?!1:n.length>0&&!Qle(n[n.length-1].event,d.event)?(l(),!1):(o(d),!0),stop:()=>{l()}}}function Qle(e,t){return e.target===t.target&&ece(e,t)<=Xle&&e.timeStamp-t.timeStamp<=LF}function ece(e,t){return Math.sqrt(Math.pow(e.clientX-t.clientX,2)+Math.pow(e.clientY-t.clientY,2))}function tce(e,t,n=Rt.ALLOW){const r=new Map,{actionNameAttribute:i}=t,o=M$(e,cx)||i&&M$(e,i);return o?{name:o,nameSource:"custom_attribute"}:n===Rt.MASK?{name:TF,nameSource:"mask_placeholder"}:z$(e,rce,t,r)||z$(e,ice,t,r)||{name:"",nameSource:"blank"}}function M$(e,t){const n=nce(e,`[${t}]`);if(!n)return;const r=n.getAttribute(t);return UF(FF(r.trim()))}function nce(e,t){let n=e;for(;n;){if(n.matches(t))return n;n=RF(n)}return null}const rce=[(e,t,n)=>{if("labels"in e&&e.labels&&e.labels.length>0)return by(e.labels[0],t,n)},e=>{if(e.nodeName==="INPUT"){const t=e,n=t.getAttribute("type");if(n==="button"||n==="submit"||n==="reset")return{name:t.value,nameSource:"text_content"}}},(e,t,n)=>{if(e.nodeName==="BUTTON"||e.nodeName==="LABEL"||e.getAttribute("role")==="button")return by(e,t,n)},(e,t,n)=>qp(e,"aria-label",t,n),(e,t,n)=>{const r=e.getAttribute("aria-labelledby");if(r)return{name:r.split(/\s+/).map(i=>ace(e,i)).filter(i=>!!i).map(i=>VF(i,t,n)).join(" "),nameSource:"text_content"}},(e,t,n)=>qp(e,"alt",t,n),(e,t,n)=>qp(e,"name",t,n),(e,t,n)=>qp(e,"title",t,n),(e,t,n)=>qp(e,"placeholder",t,n),(e,t,n)=>{if("options"in e&&e.options.length>0)return by(e.options[0],t,n)}],ice=[(e,t,n)=>by(e,t,n)],oce=10;function z$(e,t,n,r){let i=e,o=0;for(;o<=oce&&i&&i.nodeName!=="BODY"&&i.nodeName!=="HTML"&&i.nodeName!=="HEAD";){for(const a of t){const l=a(i,n,r);if(l){const{name:d,nameSource:f}=l,m=d&&d.trim();if(m)return{name:UF(FF(m)),nameSource:f}}}if(i.nodeName==="FORM")break;i=RF(i),o+=1}}function FF(e){return e.replace(/\s+/g," ")}function UF(e){return e.length>100?`${xE(e,100)} [...]`:e}function ace(e,t){const n=e.getRootNode();if(n instanceof ShadowRoot){const r=n.getElementById(t);if(r)return r}return e.ownerDocument?e.ownerDocument.getElementById(t):null}function qp(e,t,n,r){const{enablePrivacyForActionName:i,defaultPrivacyLevel:o}=n;let a=e.getAttribute(t);if(a&&i){const l=dx(e,o,r);Yle(e.tagName,t,a,l,n)&&(a=zF(a,TF))}else a||(a="");return{name:a,nameSource:"standard_attribute"}}function by(e,t,n){return{name:VF(e,t,n)||"",nameSource:"text_content"}}function VF(e,t,n){if(e.isContentEditable)return;const{enablePrivacyForActionName:r,actionNameAttribute:i,defaultPrivacyLevel:o}=t;if(ms(Po.USE_TREE_WALKER_FOR_ACTION_NAME))return sce(e,i,r,o,n);if("innerText"in e){let a=e.innerText;const l=d=>{const f=e.querySelectorAll(d);for(let m=0;m<f.length;m+=1){const h=f[m];if("innerText"in h){const v=h.innerText;v&&v.trim().length>0&&(a=a.replace(v,""))}}};return l(`[${cx}]`),i&&l(`[${i}]`),r&&l(`${vc(Rt.HIDDEN)}, ${vc(Rt.MASK)}`),a}return e.textContent}function sce(e,t,n,r,i){const o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT,l);let a="";for(;o.nextNode();){const d=o.currentNode;if(gs(d)){(d.nodeName==="BR"||d.nodeName==="P"||["block","flex","grid","list-item","table","table-caption"].includes(getComputedStyle(d).display))&&(a+=" ");continue}a+=d.textContent||""}return a.replace(/\s+/g," ").trim();function l(d){const f=dx(d,r,i);if(n&&f&&$F(d,f))return NodeFilter.FILTER_REJECT;if(gs(d)){if(d.hasAttribute(cx)||t&&d.hasAttribute(t))return NodeFilter.FILTER_REJECT;const m=getComputedStyle(d);if(m.visibility!=="visible"||m.display==="none"||m.contentVisibility&&m.contentVisibility!=="visible")return NodeFilter.FILTER_REJECT}return NodeFilter.FILTER_ACCEPT}}function lce(e,{onPointerDown:t,onPointerUp:n}){let r,i={selection:!1,input:!1,scroll:!1},o;const a=[zn(e,window,"pointerdown",l=>{F$(l)&&(r=L$(),i={selection:!1,input:!1,scroll:!1},o=t(l))},{capture:!0}),zn(e,window,"selectionchange",()=>{(!r||!L$())&&(i.selection=!0)},{capture:!0}),zn(e,window,"scroll",()=>{i.scroll=!0},{capture:!0,passive:!0}),zn(e,window,"pointerup",l=>{if(F$(l)&&o){const d=i;n(o,l,()=>d),o=void 0}},{capture:!0}),zn(e,window,"input",()=>{i.input=!0},{capture:!0})];return{stop:()=>{a.forEach(l=>l.stop())}}}function L$(){const e=window.getSelection();return!e||e.isCollapsed}function F$(e){return e.target instanceof Element&&e.isPrimary!==!1}const U$=3;function cce(e,t){if(uce(e))return t.addFrustration(xd.RAGE_CLICK),e.some(V$)&&t.addFrustration(xd.DEAD_CLICK),t.hasError&&t.addFrustration(xd.ERROR_CLICK),{isRage:!0};const n=e.some(r=>r.getUserActivity().selection);return e.forEach(r=>{r.hasError&&r.addFrustration(xd.ERROR_CLICK),V$(r)&&!n&&r.addFrustration(xd.DEAD_CLICK)}),{isRage:!1}}function uce(e){if(e.some(t=>t.getUserActivity().selection||t.getUserActivity().scroll))return!1;for(let t=0;t<e.length-(U$-1);t+=1)if(e[t+U$-1].event.timeStamp-e[t].event.timeStamp<=Ur)return!0;return!1}const dce='input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="range"]),textarea,select,[contenteditable],[contenteditable] *,canvas,a[href],a[href] *';function V$(e){if(e.hasPageActivity||e.getUserActivity().input||e.getUserActivity().scroll)return!1;let t=e.event.target;return t.tagName==="LABEL"&&t.hasAttribute("for")&&(t=document.getElementById(t.getAttribute("for"))),!t||!t.matches(dce)}const BF=10*Ur,vm=new Map;function fce(e){const t=vm.get(e);return vm.delete(e),t}function HF(e,t){vm.set(e,t),vm.forEach((n,r)=>{Xn(r,Ji())>BF&&vm.delete(r)})}function pce(e,t,n,r,i){const o=new Ft;let a;e.subscribe(5,f),e.subscribe(11,f);const{stop:l}=lce(r,{onPointerDown:m=>mce(r,e,t,m,n),onPointerUp:({clickActionBase:m,hadActivityOnPointerDown:h},v,y)=>{hce(r,e,t,n,i,o,d,m,v,y,h)}});return{stop:()=>{f(),o.notify(),l()}};function d(m){if(!a||!a.tryAppend(m)){const h=m.clone();a=Jle(m,v=>{vce(v,h),a=void 0})}}function f(){a&&a.stop()}}function mce(e,t,n,r,i){const o=e.betaTrackActionsInShadowDom?qF(r):r.target;let a;if(e.enablePrivacyForActionName?a=dx(o,e.defaultPrivacyLevel):a=Rt.ALLOW,a===Rt.HIDDEN)return;const l=gce(r,a,e);let d=!1;return DE(t,n,i,e,f=>{d=f.hadActivity},IF),{clickActionBase:l,hadActivityOnPointerDown:()=>d}}function hce(e,t,n,r,i,o,a,l,d,f,m){var h;const v=KF(t,i,f,l,d);a(v);const y=(h=l?.target)===null||h===void 0?void 0:h.selector;y&&HF(d.timeStamp,y);const{stop:x}=DE(t,n,r,e,E=>{E.hadActivity&&E.end<v.startClocks.timeStamp?v.discard():E.hadActivity?v.stop(E.end):m()?v.stop(v.startClocks.timeStamp):v.stop()},BF),S=t.subscribe(5,({endClocks:E})=>{v.stop(E.timeStamp)}),C=t.subscribe(11,()=>{v.stop(wr())}),k=o.subscribe(()=>{v.stop()});v.stopObservable.subscribe(()=>{C.unsubscribe(),S.unsubscribe(),x(),k.unsubscribe()})}function gce(e,t,n){const r=e.target,i=r.getBoundingClientRect(),o=lh(r,n.actionNameAttribute);o&&HF(e.timeStamp,o);const a=n.betaTrackActionsInShadowDom?qF(e):e.target,{name:l,nameSource:d}=tce(a,n,t);return{type:NE.CLICK,target:{width:Math.round(i.width),height:Math.round(i.height),selector:o},position:{x:Math.round(e.clientX-i.left),y:Math.round(e.clientY-i.top)},name:l,nameSource:d}}function qF(e){if(e.composed&&OE(e.target)&&typeof e.composedPath=="function"){const t=e.composedPath();if(t.length>0&&t[0]instanceof Element)return t[0]}return e.target}function KF(e,t,n,r,i){const o=t.createTrackedAction(Yb(i.timeStamp));let a=0,l;const d=[],f=new Ft;function m(h){a===0&&(l=h,a=1,l?o.stop(sL(l)):o.discard(),f.notify())}return{event:i,stop:m,stopObservable:f,get hasError(){return o.counts.errorCount>0},get hasPageActivity(){return l!==void 0},getUserActivity:n,addFrustration:h=>{d.push(h)},get startClocks(){return o.startClocks},isStopped:()=>a===1||a===2,clone:()=>KF(e,t,n,r,i),validate:h=>{if(m(),a!==1)return;const v={startClocks:o.startClocks,duration:o.duration,id:o.id,frustrationTypes:d,counts:o.counts,events:h??[i],event:i,...r};e.notify(0,v),a=2},discard:()=>{m(),a=2}}}function vce(e,t){const{isRage:n}=cce(e,t);n?(e.forEach(r=>r.discard()),t.stop(wr()),t.validate(e.map(r=>r.event))):(t.discard(),e.forEach(r=>r.validate()))}function GF({lifeCycle:e,isChildEvent:t,onChange:n=on}){const r={errorCount:0,longTaskCount:0,resourceCount:0,actionCount:0,frustrationCount:0},i=e.subscribe(13,o=>{var a;if(!(o.type==="view"||o.type==="vital"||!t(o)))switch(o.type){case St.ERROR:r.errorCount+=1,n();break;case St.ACTION:r.actionCount+=1,o.action.frustration&&(r.frustrationCount+=o.action.frustration.type.length),n();break;case St.LONG_TASK:r.longTaskCount+=1,n();break;case St.RESOURCE:!((a=o._dd)===null||a===void 0)&&a.discarded||(r.resourceCount+=1,n());break}});return{stop:()=>{i.unsubscribe()},eventCounts:r}}const yce=5*ni;function bce(e){const t=su({expireDelay:yce}),n=new Set,r=e.subscribe(10,()=>{t.reset(),n.forEach(l=>l.stop()),n.clear()});function i(l){const d=ei(),f=t.add(d,l.relative);let m;const h=GF({lifeCycle:e,isChildEvent:y=>y.action!==void 0&&(Array.isArray(y.action.id)?y.action.id.includes(d):y.action.id===d)});n.add(h);function v(){h.stop(),n.delete(h)}return{id:d,startClocks:l,get duration(){return m},get counts(){return h.eventCounts},stop(y){f.close(y.relative),m=Xn(l.timeStamp,y.timeStamp),v()},discard(){f.remove(),v()}}}function o(l){const d=t.findAll(l);return d.length?d:void 0}function a(){r.unsubscribe(),n.forEach(l=>l.stop()),n.clear(),t.reset(),t.stop()}return{createTrackedAction:i,findActionId:o,stop:a}}function xce(e,t,n){const r=new Map;e.subscribe(10,()=>r.clear());function i(d,f={},m=Bn()){var h;const v=(h=f.actionKey)!==null&&h!==void 0?h:d,y=r.get(v);y&&(y.trackedAction.discard(),r.delete(v));const x=t.createTrackedAction(m);r.set(v,{name:d,type:f.type,context:f.context,trackedAction:x})}function o(d,f={},m=Bn()){var h,v;const y=(h=f.actionKey)!==null&&h!==void 0?h:d,x=r.get(y);if(!x)return;x.trackedAction.stop(m);const S=[];x.trackedAction.counts.errorCount>0&&S.push(xd.ERROR_CLICK);const C={id:x.trackedAction.id,name:x.name,type:((v=f.type)!==null&&v!==void 0?v:x.type)||NE.CUSTOM,startClocks:x.trackedAction.startClocks,duration:x.trackedAction.duration,context:hs(x.context,f.context),counts:x.trackedAction.counts,frustrationTypes:S};n(C),r.delete(y)}function a(d){n({id:ei(),frustrationTypes:[],...d})}function l(){r.forEach(d=>d.trackedAction.discard()),r.clear()}return{addAction:a,startAction:i,stopAction:o,stop:l}}const wce=1;function Sce(e,t,n,r,i){const o=bce(e),{unsubscribe:a}=e.subscribe(0,m=>{e.notify(12,B$(m))});let l=on;i.trackUserInteractions&&({stop:l}=pce(e,n,r,i,o));const d=xce(e,o,m=>{e.notify(12,B$(m))}),f={findActionId:o.findActionId};return t.register(0,({startTime:m,eventType:h})=>{if(h!==St.ERROR&&h!==St.RESOURCE&&h!==St.LONG_TASK)return ji;const v=h===St.LONG_TASK?Pl(m,wce):m,y=f.findActionId(v);return y?{type:h,action:{id:y}}:ji}),t.register(1,({startTime:m})=>({action:{id:f.findActionId(m)}})),{addAction:d.addAction,startAction:d.startAction,stopAction:d.stopAction,actionContexts:f,stop:()=>{a(),l(),d.stop(),o.stop()}}}function B$(e){const t=_ce(e),n=EF(ht(e.duration));return{rawRumEvent:{type:St.ACTION,date:e.startClocks.timeStamp,action:{id:e.id,target:{name:e.name},type:e.type,...n!==void 0&&{loading_time:n},...e.counts&&{error:{count:e.counts.errorCount},long_task:{count:e.counts.longTaskCount},resource:{count:e.counts.resourceCount}},frustration:{type:e.frustrationTypes}},...t?{_dd:{action:{target:e.target,position:e.position,name_source:e.nameSource}}}:{context:e.context}},duration:e.duration,startTime:e.startClocks.relative,domainContext:t?{events:e.events}:{handlingStack:e.handlingStack}}}function _ce(e){return"events"in e}function Cce(e){const t=Wae([Kb.error]).subscribe(n=>e.notify(n.error));return{stop:()=>{t.unsubscribe()}}}function kce(e,t){const n=Doe(e,[Nm.cspViolation,Nm.intervention]).subscribe(r=>t.notify(r));return{stop:()=>{n.unsubscribe()}}}function Ece(e,t,n){const r=new Ft;return n.subscribe(i=>{i.type===0&&r.notify(i.error)}),Cce(r),kce(t,r),r.subscribe(i=>e.notify(14,{error:i})),jce(e)}function jce(e){return e.subscribe(14,({error:t})=>{e.notify(12,Rce(t))}),{addError:({error:t,handlingStack:n,componentStack:r,startClocks:i,context:o})=>{const a=kE({originalError:t,handlingStack:n,componentStack:r,startClocks:i,nonErrorPrefix:"Provided",source:Ef.CUSTOM,handling:"handled"});a.context=hs(a.context,o),e.notify(14,{error:a})}}}function Rce(e){const t={date:e.startClocks.timeStamp,error:{id:ei(),message:e.message,source:e.source,stack:e.stack,handling_stack:e.handlingStack,component_stack:e.componentStack,type:e.type,handling:e.handling,causes:e.causes,source_type:"browser",fingerprint:e.fingerprint,csp:e.csp},type:St.ERROR,context:e.context},n={error:e.originalError,handlingStack:e.handlingStack};return{rawRumEvent:t,startTime:e.startClocks.relative,domainContext:n}}const H$=new WeakSet;function Ice(e){if(!performance||!("getEntriesByName"in performance))return;const t=performance.getEntriesByName(e.url,"resource");if(!t.length||!("toJSON"in t[0]))return;const n=t.filter(r=>!H$.has(r)).filter(r=>bF(r)&&xF(r)).filter(r=>Tce(r,e.startClocks.relative,ZF({startTime:e.startClocks.relative,duration:e.duration})));if(n.length===1)return H$.add(n[0]),n[0].toJSON()}function ZF(e){return Pl(e.startTime,e.duration)}function Tce(e,t,n){return e.startTime>=t-1&&ZF(e)<=Pl(n,1)}const Nce=2*ni;function Ace(e){const t=Oce(e)||Dce(e);if(!(!t||t.traceTime<=Qr()-Nce))return t.traceId}function Oce(e){const t=e.querySelector("meta[name=dd-trace-id]"),n=e.querySelector("meta[name=dd-trace-time]");return YF(t&&t.content,n&&n.content)}function Dce(e){const t=$ce(e);if(t)return YF(Tm(t,"trace-id"),Tm(t,"trace-time"))}function YF(e,t){const n=t&&Number(t);if(!(!e||!n))return{traceId:e,traceTime:n}}function $ce(e){for(let t=0;t<e.childNodes.length;t+=1){const n=q$(e.childNodes[t]);if(n)return n}if(e.body)for(let t=e.body.childNodes.length-1;t>=0;t-=1){const n=e.body.childNodes[t],r=q$(n);if(r)return r;if(!RC(n))break}}function q$(e){if(e&&kle(e)){const t=/^\s*DATADOG;(.*?)\s*$/.exec(e.data);if(t)return t[1]}}function $E(){if(Ll(Lt.NAVIGATION)){const n=performance.getEntriesByType(Lt.NAVIGATION)[0];if(n)return n}const e=Pce(),t={entryType:Lt.NAVIGATION,initiatorType:"navigation",name:window.location.href,startTime:0,duration:e.loadEventEnd,decodedBodySize:0,encodedBodySize:0,transferSize:0,workerStart:0,toJSON:()=>({...t,toJSON:void 0}),...e};return t}function Pce(){const e={},t=performance.timing;for(const n in t)if(ih(t[n])){const r=n,i=t[r];e[r]=i===0?0:cL(i)}return e}function WF(e){return e.responseStart>=0&&e.responseStart<=Ji()?e.responseStart:void 0}function Mce(){if(Ll(Lt.RESOURCE))return performance.getEntriesByType(Lt.RESOURCE)}function zce(e,t){const n=Mce();if(n)return SE(n,r=>r.name===e&&r.startTime<=t)}function Lce(e,t,n=$E){RE(e,"interactive",()=>{const r=n(),i=Object.assign(r.toJSON(),{entryType:Lt.RESOURCE,initiatorType:vF,duration:r.responseEnd,traceId:Ace(document),toJSON:()=>({...i,toJSON:void 0})});t(i)})}const Fce=1e3;function Uce(e){const t=new Set,n=e.subscribe(8,r=>{t.add(r),t.size>Fce&&(ix("Too many requests"),t.delete(t.values().next().value))});return{getMatchingRequest(r){let i=1/0,o;for(const a of t){const l=r.startTime-a.startClocks.relative;0<=l&&l<i&&a.url===r.name&&(i=Math.abs(l),o=a)}return o&&t.delete(o),o},stop(){n.unsubscribe()}}}function Vce(e,t,n,r=Yae(),i=Lce){let o;const a=t.trackEarlyRequests;a?o=Uce(e):e.subscribe(8,f=>{d(()=>Bce(f,t,n))});const l=vs(t,{type:Lt.RESOURCE,buffered:!0}).subscribe(f=>{for(const m of f)(a||!yF(m))&&d(()=>K$(m,t,n,o))});i(t,f=>{d(()=>K$(f,t,n,o))});function d(f){r.push(()=>{const m=f();m&&e.notify(12,m)})}return{stop:()=>{r.stop(),l.unsubscribe()}}}function Bce(e,t,n){const r=Ice(e);return XF(r,e,n,t)}function K$(e,t,n,r){const i=yF(e)&&r?r.getMatchingRequest(e):void 0;return XF(e,i,n,t)}function XF(e,t,n,r){if(!e&&!t)return;const i=t?Gce(t,r):Zce(e,r);if(!r.trackResources&&!i)return;const o=e?Yb(e.startTime):t.startClocks,a=e?rle(e):Yce(n,o,t.duration),l=t&&Hce(t,r),d=hs({date:o.timeStamp,resource:{id:ei(),duration:ht(a),type:t?t.type===lx.XHR?Yr.XHR:Yr.FETCH:nle(e),method:t?t.method:void 0,status_code:t?t.status:Wce(e.responseStatus),url:t?dle(t.url):e.name,protocol:e&&ale(e),delivery_type:e&&sle(e),graphql:l},type:St.RESOURCE,_dd:{discarded:!r.trackResources}},i,e&&Kce(e));return{startTime:o.relative,duration:a,rawRumEvent:d,domainContext:qce(e,t)}}function Hce(e,t){const n=CF(e.url,t);if(n)return yle(e,n)}function qce(e,t){if(t){const n={performanceEntry:e,isAborted:t.isAborted,handlingStack:t.handlingStack};return t.type===lx.XHR?{xhr:t.xhr,...n}:{requestInput:t.input,requestInit:t.init,response:t.response,error:t.error,...n}}return{performanceEntry:e}}function Kce(e){const{renderBlockingStatus:t}=e;return{resource:{render_blocking_status:t,...lle(e),...ile(e)}}}function Gce(e,t){if(e.traceSampled&&e.traceId&&e.spanId)return{_dd:{span_id:e.spanId.toString(),trace_id:e.traceId.toString(),rule_psr:t.rulePsr}}}function Zce(e,t){if(e.traceId)return{_dd:{trace_id:e.traceId,span_id:SF().toString(),rule_psr:t.rulePsr}}}function Yce(e,t,n){return e.wasInPageStateDuringPeriod("frozen",t.relative,n)?void 0:n}function Wce(e){return e===0?void 0:e}function Xce(e,t,n){const{stop:r,eventCounts:i}=GF({lifeCycle:e,isChildEvent:o=>o.view.id===t,onChange:n});return{stop:r,eventCounts:i}}const Jce=10*ni;function Qce(e,t,n){return{stop:vs(e,{type:Lt.PAINT,buffered:!0}).subscribe(i=>{const o=i.find(a=>a.name==="first-contentful-paint"&&a.startTime<t.timeStamp&&a.startTime<Jce);o&&n(o.startTime)}).unsubscribe}}function eue(e,t){requestAnimationFrame(()=>{requestAnimationFrame(()=>{t(Xn(e,Ji()))})})}function tue(e,t,n){const r=vs(e,{type:Lt.FIRST_INPUT,buffered:!0}).subscribe(i=>{const o=i.find(a=>a.startTime<t.timeStamp);if(o){const a=Xn(o.startTime,o.processingStart);let l;o.target&&gs(o.target)&&(l=lh(o.target,e.actionNameAttribute)),n({delay:a>=0?a:0,time:o.startTime,targetSelector:l})}});return{stop:()=>{r.unsubscribe()}}}function nue(e,t,n=$E){return oue(e,()=>{const r=n();iue(r)||t(rue(r))})}function rue(e){return{domComplete:e.domComplete,domContentLoaded:e.domContentLoadedEventEnd,domInteractive:e.domInteractive,loadEvent:e.loadEventEnd,firstByte:WF(e)}}function iue(e){return e.loadEventEnd<=0}function oue(e,t){let n;const{stop:r}=RE(e,"complete",()=>{n=zr(()=>t())});return{stop:()=>{r(),ko(n)}}}const aue=10*ni;function sue(e,t,n,r){let i=1/0;const{stop:o}=Sl(e,n,["pointerdown","keydown"],d=>{i=d.timeStamp},{capture:!0,once:!0});let a=0;const l=vs(e,{type:Lt.LARGEST_CONTENTFUL_PAINT,buffered:!0}).subscribe(d=>{const f=SE(d,m=>m.entryType===Lt.LARGEST_CONTENTFUL_PAINT&&m.startTime<i&&m.startTime<t.timeStamp&&m.startTime<aue&&m.size>a);if(f){let m;f.element&&(m=lh(f.element,e.actionNameAttribute));const h=lue(f),v=f.startTime,y=ms(Po.LCP_SUBPARTS)?cue(h,v):void 0;r({value:v,targetSelector:m,resourceUrl:h,subParts:y}),a=f.size}});return{stop:()=>{o(),l.unsubscribe()}}}function lue(e){return e.url===""?void 0:e.url}function cue(e,t){const n=WF($E());if(n===void 0)return;const r=e?zce(e,t):void 0,i=r?Math.max(n,r.requestStart||r.startTime):n,o=Math.min(t,Math.max(i,r?.responseEnd||0));return{loadDelay:i-n,loadTime:o-i,renderDelay:t-o}}function JF(e,t,n=window){if(document.visibilityState==="hidden")return{timeStamp:0,stop:on};if(Ll(Lt.VISIBILITY_STATE)){const o=performance.getEntriesByType(Lt.VISIBILITY_STATE).filter(a=>a.name==="hidden").find(a=>a.startTime>=t.relative);if(o)return{timeStamp:o.startTime,stop:on}}let r=1/0;const{stop:i}=Sl(e,n,["pagehide","visibilitychange"],o=>{(o.type==="pagehide"||document.visibilityState==="hidden")&&(r=o.timeStamp,i())},{capture:!0});return{get timeStamp(){return r},stop:i}}function uue(e,t,n,r){const i={},{stop:o}=nue(e,h=>{n(h.loadEvent),i.navigationTimings=h,r()}),a=JF(e,t),{stop:l}=Qce(e,a,h=>{i.firstContentfulPaint=h,r()}),{stop:d}=sue(e,a,window,h=>{i.largestContentfulPaint=h,r()}),{stop:f}=tue(e,a,h=>{i.firstInput=h,r()});function m(){o(),l(),d(),f(),a.stop()}return{stop:m,initialViewMetrics:i}}const IC=(e,t)=>e*t,due=(e,t)=>{const n=Math.max(e.left,t.left),r=Math.max(e.top,t.top),i=Math.min(e.right,t.right),o=Math.min(e.bottom,t.bottom);return n>=i||r>=o?0:IC(i-n,o-r)},G$=e=>{const t=IC(e.previousRect.width,e.previousRect.height),n=IC(e.currentRect.width,e.currentRect.height),r=due(e.previousRect,e.currentRect);return t+n-r};function fue(e,t,n){if(!vue())return{stop:on};let r=0,i;n({value:0});const o=gue(),a=vs(e,{type:Lt.LAYOUT_SHIFT,buffered:!0}).subscribe(l=>{var d;for(const f of l){if(f.hadRecentInput||f.startTime<t)continue;const{cumulatedValue:m,isMaxValue:h}=o.update(f);if(h){const v=pue(f.sources);i={target:v?.node?new WeakRef(v.node):void 0,time:Xn(t,f.startTime),previousRect:v?.previousRect,currentRect:v?.currentRect,devicePixelRatio:window.devicePixelRatio}}if(m>r){r=m;const v=(d=i?.target)===null||d===void 0?void 0:d.deref();n({value:_d(r,4),targetSelector:v&&lh(v,e.actionNameAttribute),time:i?.time,previousRect:i?.previousRect?Z$(i.previousRect):void 0,currentRect:i?.currentRect?Z$(i.currentRect):void 0,devicePixelRatio:i?.devicePixelRatio})}}});return{stop:()=>{a.unsubscribe()}}}function pue(e){let t;for(const n of e)if(n.node&&gs(n.node)){const r=G$(n);(!t||G$(t)<r)&&(t=n)}return t}function Z$({x:e,y:t,width:n,height:r}){return{x:e,y:t,width:n,height:r}}const mue=5*Ur,hue=Ur;function gue(){let e=0,t,n,r=0;return{update:i=>{const o=t===void 0||i.startTime-n>=hue||i.startTime-t>=mue;let a;return o?(t=n=i.startTime,r=e=i.value,a=!0):(e+=i.value,n=i.startTime,a=i.value>r,a&&(r=i.value)),{cumulatedValue:e,isMaxValue:a}}}}function vue(){return Ll(Lt.LAYOUT_SHIFT)&&"WeakRef"in window}let xy,QF=0,G_=1/0,Z_=0;function yue(){"interactionCount"in performance||xy||(xy=new window.PerformanceObserver(Et(e=>{e.getEntries().forEach(t=>{const n=t;n.interactionId&&(G_=Math.min(G_,n.interactionId),Z_=Math.max(Z_,n.interactionId),QF=(Z_-G_)/7+1)})})),xy.observe({type:"event",buffered:!0,durationThreshold:0}))}const Y$=()=>xy?QF:window.performance.interactionCount||0,W$=10,bue=1*ni;function xue(e,t,n){if(!_ue())return{getInteractionToNextPaint:()=>{},setViewEnd:on,stop:on};const{getViewInteractionCount:r,stopViewInteractionCount:i}=Sue(n);let o=1/0;const a=wue(r);let l=-1,d,f;function m(y){for(const S of y)S.interactionId&&S.startTime>=t&&S.startTime<=o&&a.process(S);const x=a.estimateP98Interaction();x&&x.duration!==l&&(l=x.duration,f=Xn(t,x.startTime),d=fce(x.startTime),!d&&x.target&&gs(x.target)&&(d=lh(x.target,e.actionNameAttribute)))}const h=vs(e,{type:Lt.FIRST_INPUT,buffered:!0}).subscribe(m),v=vs(e,{type:Lt.EVENT,durationThreshold:40,buffered:!0}).subscribe(m);return{getInteractionToNextPaint:()=>{if(l>=0)return{value:Math.min(l,bue),targetSelector:d,time:f};if(r())return{value:0}},setViewEnd:y=>{o=y,i()},stop:()=>{v.unsubscribe(),h.unsubscribe()}}}function wue(e){const t=[];function n(){t.sort((r,i)=>i.duration-r.duration).splice(W$)}return{process(r){const i=t.findIndex(a=>r.interactionId===a.interactionId),o=t[t.length-1];i!==-1?r.duration>t[i].duration&&(t[i]=r,n()):(t.length<W$||r.duration>o.duration)&&(t.push(r),n())},estimateP98Interaction(){const r=Math.min(t.length-1,Math.floor(e()/50));return t[r]}}}function Sue(e){yue();const t=e===ss.INITIAL_LOAD?0:Y$();let n={stopped:!1};function r(){return Y$()-t}return{getViewInteractionCount:()=>n.stopped?n.interactionCount:r(),stopViewInteractionCount:()=>{n={stopped:!0,interactionCount:r()}}}}function _ue(){return Ll(Lt.EVENT)&&window.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype}function Cue(e,t,n,r,i,o,a){let l=i===ss.INITIAL_LOAD,d=!0;const f=[],m=JF(r,o);function h(){if(!d&&!l&&f.length>0){const y=Math.max(...f);y<m.timeStamp-o.relative&&a(y)}}const{stop:v}=DE(e,t,n,r,y=>{d&&(d=!1,y.hadActivity&&f.push(Xn(o.timeStamp,y.end)),h())});return{stop:()=>{v(),m.stop()},setLoadEvent:y=>{l&&(l=!1,f.push(y),h())}}}function JPe(){let e;const t=window.visualViewport;return t?e=t.pageLeft-t.offsetLeft:window.scrollX!==void 0?e=window.scrollX:e=window.pageXOffset||0,Math.round(e)}function kue(){let e;const t=window.visualViewport;return t?e=t.pageTop-t.offsetTop:window.scrollY!==void 0?e=window.scrollY:e=window.pageYOffset||0,Math.round(e)}let Y_;function Eue(e){return Y_||(Y_=jue(e)),Y_}function jue(e){return new Ft(t=>{const{throttled:n}=Wb(()=>{t.notify(PE())},200);return zn(e,window,"resize",n,{capture:!0,passive:!0}).stop})}function PE(){const e=window.visualViewport;return e?{width:Number(e.width*e.scale),height:Number(e.height*e.scale)}:{width:Number(window.innerWidth||0),height:Number(window.innerHeight||0)}}const Rue=Ur;function Iue(e,t,n,r=Nue(e)){let i=0,o=0,a=0;const l=r.subscribe(({scrollDepth:d,scrollTop:f,scrollHeight:m})=>{let h=!1;if(d>i&&(i=d,h=!0),m>o){o=m;const v=Ji();a=Xn(t.relative,v),h=!0}h&&n({maxDepth:Math.min(i,o),maxDepthScrollTop:f,maxScrollHeight:o,maxScrollHeightTime:a})});return{stop:()=>l.unsubscribe()}}function Tue(){const e=kue(),{height:t}=PE(),n=Math.round((document.scrollingElement||document.documentElement).scrollHeight),r=Math.round(t+e);return{scrollHeight:n,scrollDepth:r,scrollTop:e}}function Nue(e,t=Rue){return new Ft(n=>{function r(){n.notify(Tue())}if(window.ResizeObserver){const i=Wb(r,t,{leading:!1,trailing:!0}),o=document.scrollingElement||document.documentElement,a=new ResizeObserver(Et(i.throttled));o&&a.observe(o);const l=zn(e,window,"scroll",i.throttled,{passive:!0});return()=>{i.cancel(),a.disconnect(),l.stop()}}})}function Aue(e,t,n,r,i,o,a){const l={},{stop:d,setLoadEvent:f}=Cue(e,t,n,r,o,a,S=>{l.loadingTime=S,i()}),{stop:m}=Iue(r,a,S=>{l.scroll=S}),{stop:h}=fue(r,a.relative,S=>{l.cumulativeLayoutShift=S,i()}),{stop:v,getInteractionToNextPaint:y,setViewEnd:x}=xue(r,a.relative,o);return{stop:()=>{d(),h(),m()},stopINPTracking:v,setLoadEvent:f,setViewEnd:x,getCommonViewMetrics:()=>(l.interactionToNextPaint=y(),l)}}function Oue(e,t){const{stop:n}=zn(e,window,"pageshow",r=>{r.persisted&&t(r)},{capture:!0});return n}function Due(e,t,n){eue(e.relative,r=>{t.firstContentfulPaint=r,t.largestContentfulPaint={value:r},n()})}const $ue=3e3,Pue=5*ni,Mue=5*ni;function zue(e,t,n,r,i,o,a,l){const d=new Set;let f=v(ss.INITIAL_LOAD,lL(),l),m;y();let h;a&&(h=x(o),i.trackBfcacheViews&&(m=Oue(i,S=>{f.end();const C=Yb(S.timeStamp);f=v(ss.BF_CACHE,C,void 0)})));function v(S,C,k){const E=Lue(t,n,r,i,e,S,C,k);return d.add(E),E.stopObservable.subscribe(()=>{d.delete(E)}),E}function y(){t.subscribe(10,()=>{f=v(ss.ROUTE_CHANGE,void 0,{name:f.name,service:f.service,version:f.version,context:f.contextManager.getContext()})}),t.subscribe(9,()=>{f.end({sessionIsActive:!1})})}function x(S){return S.subscribe(({oldLocation:C,newLocation:k})=>{Uue(C,k)&&(f.end(),f=v(ss.ROUTE_CHANGE))})}return{addTiming:(S,C=wr())=>{f.addTiming(S,C)},startView:(S,C)=>{f.end({endClocks:C}),f=v(ss.ROUTE_CHANGE,C,S)},setViewContext:S=>{f.contextManager.setContext(S)},setViewContextProperty:(S,C)=>{f.contextManager.setContextProperty(S,C)},setViewName:S=>{f.setViewName(S)},getViewContext:()=>f.contextManager.getContext(),stop:()=>{h&&h.unsubscribe(),m&&m(),f.end(),d.forEach(S=>S.stop())}}}function Lue(e,t,n,r,i,o,a=Bn(),l){const d=ei(),f=new Ft,m={};let h=0,v;const y=Vc(i),x=sx();let S=!0,C=l?.name;const k=l?.service||r.service,E=l?.version||r.version,j=l?.context,I=l?.handlingStack;j&&x.setContext(j);const A={id:d,name:C,startClocks:a,service:k,version:E,context:j};e.notify(1,A),e.notify(2,A);const{throttled:T,cancel:N}=Wb(P,$ue,{leading:!1}),{setLoadEvent:D,setViewEnd:L,stop:H,stopINPTracking:ee,getCommonViewMetrics:G}=Aue(e,t,n,r,$,o,a),{stop:K,initialViewMetrics:B}=o===ss.INITIAL_LOAD?uue(r,a,D,$):{stop:on,initialViewMetrics:{}};o===ss.BF_CACHE&&Due(a,B,$);const{stop:q,eventCounts:z}=Xce(e,d,$),W=_f(P,Pue),F=e.subscribe(11,V=>{V.reason===gm.UNLOADING&&P()});P(),x.changeObservable.subscribe($);function ne(){e.notify(3,{id:d,name:C,context:x.getContext(),startClocks:a,sessionIsActive:S})}function $(){ne(),T()}function P(){N(),ne(),h+=1;const V=v===void 0?wr():v.timeStamp;e.notify(4,{customTimings:m,documentVersion:h,id:d,name:C,service:k,version:E,context:x.getContext(),loadingType:o,location:y,handlingStack:I,startClocks:a,commonViewMetrics:G(),initialViewMetrics:B,duration:Xn(a.timeStamp,V),isActive:v===void 0,sessionIsActive:S,eventCounts:z})}return{get name(){return C},service:k,version:E,contextManager:x,stopObservable:f,end(V={}){var O,X;v||(v=(O=V.endClocks)!==null&&O!==void 0?O:Bn(),S=(X=V.sessionIsActive)!==null&&X!==void 0?X:!0,e.notify(5,{endClocks:v}),e.notify(6,{endClocks:v}),Zb(W),L(v.relative),H(),F.unsubscribe(),P(),zr(()=>{this.stop()},Mue))},stop(){K(),q(),ee(),f.notify()},addTiming(V,O){if(v)return;const X=Bre(O)?O:Xn(a.timeStamp,O);m[Fue(V)]=X,$()},setViewName(V){C=V,P()}}}function Fue(e){const t=e.replace(/[^a-zA-Z0-9-_.@$]/g,"_");return t!==e&&yt.warn(`Invalid timing name: ${e}, sanitized to: ${t}`),t}function Uue(e,t){return e.pathname!==t.pathname||!Vue(t.hash)&&X$(t.hash)!==X$(e.hash)}function Vue(e){const t=e.substring(1);return t!==""&&!!document.getElementById(t)}function X$(e){const t=e.indexOf("?");return t<0?e:e.slice(0,t)}function Bue(e,t,n,r,i,o,a,l,d,f){return e.subscribe(4,m=>e.notify(12,Hue(m,n,l))),t.register(0,({startTime:m,eventType:h})=>{const v=d.findView(m);return v?{type:h,service:v.service,version:v.version,context:v.context,view:{id:v.id,name:v.name}}:_l}),t.register(1,({startTime:m})=>{var h;return{view:{id:(h=d.findView(m))===null||h===void 0?void 0:h.id}}}),zue(r,e,i,o,n,a,!n.trackViewsManually,f)}function Hue(e,t,n){var r,i,o,a,l,d,f,m,h,v,y,x,S,C,k,E,j,I;const A=n.getReplayStats(e.id),T=(i=(r=e.commonViewMetrics)===null||r===void 0?void 0:r.cumulativeLayoutShift)===null||i===void 0?void 0:i.devicePixelRatio,N={_dd:{document_version:e.documentVersion,replay_stats:A,cls:T?{device_pixel_ratio:T}:void 0,configuration:{start_session_replay_recording_manually:t.startSessionReplayRecordingManually}},date:e.startClocks.timeStamp,type:St.VIEW,view:{action:{count:e.eventCounts.actionCount},frustration:{count:e.eventCounts.frustrationCount},cumulative_layout_shift:(o=e.commonViewMetrics.cumulativeLayoutShift)===null||o===void 0?void 0:o.value,cumulative_layout_shift_time:ht((a=e.commonViewMetrics.cumulativeLayoutShift)===null||a===void 0?void 0:a.time),cumulative_layout_shift_target_selector:(l=e.commonViewMetrics.cumulativeLayoutShift)===null||l===void 0?void 0:l.targetSelector,first_byte:ht((d=e.initialViewMetrics.navigationTimings)===null||d===void 0?void 0:d.firstByte),dom_complete:ht((f=e.initialViewMetrics.navigationTimings)===null||f===void 0?void 0:f.domComplete),dom_content_loaded:ht((m=e.initialViewMetrics.navigationTimings)===null||m===void 0?void 0:m.domContentLoaded),dom_interactive:ht((h=e.initialViewMetrics.navigationTimings)===null||h===void 0?void 0:h.domInteractive),error:{count:e.eventCounts.errorCount},first_contentful_paint:ht(e.initialViewMetrics.firstContentfulPaint),first_input_delay:ht((v=e.initialViewMetrics.firstInput)===null||v===void 0?void 0:v.delay),first_input_time:ht((y=e.initialViewMetrics.firstInput)===null||y===void 0?void 0:y.time),first_input_target_selector:(x=e.initialViewMetrics.firstInput)===null||x===void 0?void 0:x.targetSelector,interaction_to_next_paint:ht((S=e.commonViewMetrics.interactionToNextPaint)===null||S===void 0?void 0:S.value),interaction_to_next_paint_time:ht((C=e.commonViewMetrics.interactionToNextPaint)===null||C===void 0?void 0:C.time),interaction_to_next_paint_target_selector:(k=e.commonViewMetrics.interactionToNextPaint)===null||k===void 0?void 0:k.targetSelector,is_active:e.isActive,name:e.name,largest_contentful_paint:ht((E=e.initialViewMetrics.largestContentfulPaint)===null||E===void 0?void 0:E.value),largest_contentful_paint_target_selector:(j=e.initialViewMetrics.largestContentfulPaint)===null||j===void 0?void 0:j.targetSelector,load_event:ht((I=e.initialViewMetrics.navigationTimings)===null||I===void 0?void 0:I.loadEvent),loading_time:EF(ht(e.commonViewMetrics.loadingTime)),loading_type:e.loadingType,long_task:{count:e.eventCounts.longTaskCount},performance:que(e.commonViewMetrics,e.initialViewMetrics),resource:{count:e.eventCounts.resourceCount},time_spent:ht(e.duration)},display:e.commonViewMetrics.scroll?{scroll:{max_depth:e.commonViewMetrics.scroll.maxDepth,max_depth_scroll_top:e.commonViewMetrics.scroll.maxDepthScrollTop,max_scroll_height:e.commonViewMetrics.scroll.maxScrollHeight,max_scroll_height_time:ht(e.commonViewMetrics.scroll.maxScrollHeightTime)}}:void 0,privacy:{replay_level:t.defaultPrivacyLevel},device:{locale:navigator.language,locales:navigator.languages,time_zone:dse()}};return $l(e.customTimings)||(N.view.custom_timings=tL(e.customTimings,ht)),{rawRumEvent:N,startTime:e.startClocks.relative,duration:e.duration,domainContext:{location:e.location,handlingStack:e.handlingStack}}}function que({cumulativeLayoutShift:e,interactionToNextPaint:t},{firstContentfulPaint:n,firstInput:r,largestContentfulPaint:i}){return{cls:e&&{score:e.value,timestamp:ht(e.time),target_selector:e.targetSelector,previous_rect:e.previousRect,current_rect:e.currentRect},fcp:n&&{timestamp:ht(n)},fid:r&&{duration:ht(r.delay),timestamp:ht(r.time),target_selector:r.targetSelector},inp:t&&{duration:ht(t.value),timestamp:ht(t.time),target_selector:t.targetSelector},lcp:i&&{timestamp:ht(i.value),target_selector:i.targetSelector,resource_url:i.resourceUrl,sub_parts:i.subParts?{load_delay:ht(i.subParts.loadDelay),load_time:ht(i.subParts.loadTime),render_delay:ht(i.subParts.renderDelay)}:void 0}}}const Kue="rum";function Gue(e,t,n){const r=Eae(e,Kue,i=>Yue(e,i),n);return r.expireObservable.subscribe(()=>{t.notify(9)}),r.renewObservable.subscribe(()=>{t.notify(10)}),r.sessionStateUpdateObservable.subscribe(({previousState:i,newState:o})=>{if(!i.forcedReplay&&o.forcedReplay){const a=r.findSession();a&&(a.isReplayForced=!0)}}),{findTrackedSession:i=>{const o=r.findSession(i);if(!(!o||o.trackingType==="0"))return{id:o.id,sessionReplay:o.trackingType==="1"?1:o.isReplayForced?2:0,anonymousId:o.anonymousId}},expire:r.expire,expireObservable:r.expireObservable,setForcedReplay:()=>r.updateSessionState({forcedReplay:"1"})}}function Zue(){const e={id:"00000000-aaaa-0000-aaaa-000000000000",sessionReplay:WL("records")?1:0};return{findTrackedSession:()=>e,expire:on,expireObservable:new Ft,setForcedReplay:on}}function Yue(e,t){return Wue(t)?t:Sc(e.sessionSampleRate)?Sc(e.sessionReplaySampleRate)?"1":"2":"0"}function Wue(e){return e==="0"||e==="1"||e==="2"}function Xue(e,t,n,r,i,o){const a=[e.rumEndpointBuilder];e.replica&&a.push(e.replica.rumEndpointBuilder);const l=JL({encoder:o(2),request:YL(a,n),flushController:QL({pageMayExitObservable:r,sessionExpireObservable:i})});return t.subscribe(13,d=>{d.type===St.VIEW?l.upsert(d,d.view.id):l.add(d)}),l}function Jue(e){const t=sh();e.subscribe(13,n=>{t.send("rum",n)})}const Que=Ml;function ede(e,t,n,r){const i=su({expireDelay:Que});let o;e.subscribe(1,({startClocks:d})=>{const f=r.href;i.add(l({url:f,referrer:o||document.referrer}),d.relative),o=f}),e.subscribe(6,({endClocks:d})=>{i.closeActive(d.relative)});const a=n.subscribe(({newLocation:d})=>{const f=i.find();if(f){const m=Ji();i.closeActive(m),i.add(l({url:d.href,referrer:f.referrer}),m)}});function l({url:d,referrer:f}){return{url:d,referrer:f}}return t.register(0,({startTime:d,eventType:f})=>{const m=i.find(d);return m?{type:f,view:{url:m.url,referrer:m.referrer}}:_l}),{findUrl:d=>i.find(d),stop:()=>{a.unsubscribe(),i.stop()}}}function tde(e,t){let n=Vc(t);return new Ft(r=>{const{stop:i}=nde(e,a),{stop:o}=rde(e,a);function a(){if(n.href===t.href)return;const l=Vc(t);r.notify({newLocation:l,oldLocation:n}),n=l}return()=>{i(),o()}})}function nde(e,t){const{stop:n}=Ca(J$("pushState"),"pushState",({onPostCall:o})=>{o(t)}),{stop:r}=Ca(J$("replaceState"),"replaceState",({onPostCall:o})=>{o(t)}),{stop:i}=zn(e,window,"popstate",t);return{stop:()=>{n(),r(),i()}}}function rde(e,t){return zn(e,window,"hashchange",t)}function J$(e){return Object.prototype.hasOwnProperty.call(history,e)?history:History.prototype}const ide=Ml;function ode(e,t,n){const r=su({expireDelay:ide});return e.subscribe(1,({startClocks:i})=>{r.add({},i.relative)}),e.subscribe(6,({endClocks:i})=>{r.closeActive(i.relative)}),t.register(0,({startTime:i,eventType:o})=>{if(!n.trackFeatureFlagsForEvents.concat([St.VIEW,St.ERROR]).includes(o))return ji;const l=r.find(i);return!l||$l(l)?ji:{type:o,feature_flags:l}}),{addFeatureFlagEvaluation:(i,o)=>{const a=r.find();a&&(a[i]=o)}}}const ade=10*Ur;let $d,$v;function sde(e,t,n){e.metricsEnabled&&(eU(),$v=!1,t.subscribe(13,()=>{$v=!0}),n.subscribe(({bytesCount:r,messagesCount:i})=>{$v&&($v=!1,$d.batchCount+=1,e2($d.batchBytesCount,r),e2($d.batchMessagesCount,i))}),_f(lde,ade))}function lde(){$d.batchCount!==0&&(ax("Customer data measures",$d),eU())}function Q$(){return{min:1/0,max:0,sum:0}}function e2(e,t){e.sum+=t,e.min=Math.min(e.min,t),e.max=Math.max(e.max,t)}function eU(){$d={batchCount:0,batchBytesCount:Q$(),batchMessagesCount:Q$()}}const cde=4e3,ude=500,dde=Ml;function fde(e,t,n=ude){const r=su({expireDelay:dde,maxEntries:cde});let i;Ll(Lt.VISIBILITY_STATE)&&performance.getEntriesByType(Lt.VISIBILITY_STATE).forEach(f=>{const m=f.name==="hidden"?"hidden":"active";a(m,f.startTime)}),a(tU(),Ji());const{stop:o}=Sl(t,window,["pageshow","focus","blur","visibilitychange","resume","freeze","pagehide"],d=>{a(mde(d),d.timeStamp)},{capture:!0});function a(d,f=Ji()){d!==i&&(i=d,r.closeActive(f),r.add({state:i,startTime:f},f))}function l(d,f,m){return r.findAll(f,m).some(h=>h.state===d)}return e.register(0,({startTime:d,duration:f=0,eventType:m})=>{if(m===St.VIEW){const h=r.findAll(d,f);return{type:m,_dd:{page_states:pde(h,d,n)}}}return m===St.ACTION||m===St.ERROR?{type:m,view:{in_foreground:l("active",d,0)}}:ji}),{wasInPageStateDuringPeriod:l,addPageState:a,stop:()=>{o(),r.stop()}}}function pde(e,t,n){if(e.length!==0)return e.slice(-n).reverse().map(({state:r,startTime:i})=>({state:r,start:ht(Xn(t,i))}))}function mde(e){return e.type==="freeze"?"frozen":e.type==="pagehide"?e.persisted?"frozen":"terminated":tU()}function tU(){return document.visibilityState==="hidden"?"hidden":document.hasFocus()?"active":"passive"}function hde(e,t){let n;const r=requestAnimationFrame(Et(()=>{n=PE()})),i=Eue(t).subscribe(o=>{n=o}).unsubscribe;return e.register(0,({eventType:o})=>({type:o,display:n?{viewport:n}:void 0})),{stop:()=>{i(),r&&cancelAnimationFrame(r)}}}function gde(e,t){const n=window.cookieStore?vde(e):bde;return new Ft(r=>n(t,i=>r.notify(i)))}function vde(e){return(t,n)=>zn(e,window.cookieStore,"change",i=>{const o=i.changed.find(a=>a.name===t)||i.deleted.find(a=>a.name===t);o&&n(o.value)}).stop}const yde=Ur;function bde(e,t){const n=Tm(document.cookie,e),r=_f(()=>{const i=Tm(document.cookie,e);i!==n&&t(i)},yde);return()=>{Zb(r)}}const t2="datadog-ci-visibility-test-execution-id";function xde(e,t,n=gde(e,t2)){var r;let i=dl(t2)||((r=window.Cypress)===null||r===void 0?void 0:r.env("traceId"));const o=n.subscribe(a=>{i=a});return t.register(0,({eventType:a})=>typeof i!="string"?ji:{type:a,session:{type:"ci_test"},ci_test:{test_execution_id:i}}),{stop:()=>{o.unsubscribe()}}}const wde=Ml;function Sde(e,t){const n=su({expireDelay:wde}),r=Ll(Lt.LONG_ANIMATION_FRAME)?Lt.LONG_ANIMATION_FRAME:Lt.LONG_TASK,i=vs(t,{type:r,buffered:!0}).subscribe(a=>{for(const l of a){if(!t.trackLongTasks)break;const d=Yb(l.startTime),f=ei(),m=_de(l,d,f);e.notify(12,{rawRumEvent:m,startTime:d.relative,duration:l.duration,domainContext:{performanceEntry:l}}),n.add({id:f,startClocks:d,duration:l.duration,entryType:r},d.relative),n.closeActive(Pl(d.relative,l.duration))}});return{stop:()=>{i.unsubscribe(),n.stop()},longTaskContexts:{findLongTasks:(a,l)=>n.findAll(a,l)}}}function _de(e,t,n){const r={date:t.timeStamp,type:St.LONG_TASK,_dd:{discarded:!1}};return e.entryType===Lt.LONG_TASK?{...r,long_task:{id:n,entry_type:j$.LONG_TASK,duration:ht(e.duration)}}:{...r,long_task:{id:n,entry_type:j$.LONG_ANIMATION_FRAME,duration:ht(e.duration),blocking_duration:ht(e.blockingDuration),first_ui_event_timestamp:ht(e.firstUIEventTimestamp),render_start:ht(e.renderStart),style_and_layout_start:ht(e.styleAndLayoutStart),start_time:ht(e.startTime),scripts:e.scripts.map(i=>({duration:ht(i.duration),pause_duration:ht(i.pauseDuration),forced_style_and_layout_duration:ht(i.forcedStyleAndLayoutDuration),start_time:ht(i.startTime),execution_start:ht(i.executionStart),source_url:i.sourceURL,source_function_name:i.sourceFunctionName,source_char_position:i.sourceCharPosition,invoker:i.invoker,invoker_type:i.invokerType,window_attribution:i.windowAttribution}))}}}function Cde(e){e.register(0,({eventType:t})=>{if(!oF())return ji;const n=rF(),r=iF();return{type:t,session:{type:"synthetics"},synthetics:{test_id:n,result_id:r,injected:nF()}}})}function kde(e,t,n){const r=EE(e),i=n(r);return ex(t).forEach(([o,a])=>TC(e,r,o.split(/\.|(?=\[\])/),a)),i}function TC(e,t,n,r){const[i,...o]=n;if(i==="[]"){Array.isArray(e)&&Array.isArray(t)&&e.forEach((a,l)=>TC(a,t[l],o,r));return}if(!(!n2(e)||!n2(t))){if(o.length>0)return TC(e[i],t[i],o,r);Ede(e,i,t[i],r)}}function Ede(e,t,n,r){const i=Cf(n);i===r?e[t]=qt(n):r==="object"&&(i==="undefined"||i==="null")&&(e[t]={})}function n2(e){return Cf(e)==="object"}const ld={"view.name":"string","view.url":"string","view.referrer":"string"},cd={context:"object"},ud={service:"string",version:"string"};let nU;function jde(e,t,n,r,i){nU={[St.VIEW]:{"view.performance.lcp.resource_url":"string",...cd,...ld,...ud},[St.ERROR]:{"error.message":"string","error.stack":"string","error.resource.url":"string","error.fingerprint":"string",...cd,...ld,...ud},[St.RESOURCE]:{"resource.url":"string","resource.graphql.variables":"string",...cd,...ld,...ud},[St.ACTION]:{"action.target.name":"string",...cd,...ld,...ud},[St.LONG_TASK]:{"long_task.scripts[].source_url":"string","long_task.scripts[].invoker":"string",...cd,...ld,...ud},[St.VITAL]:{...cd,...ld,...ud}};const o={[St.ERROR]:L_(St.ERROR,r,i),[St.ACTION]:L_(St.ACTION,r,i),[St.VITAL]:L_(St.VITAL,r,i)};t.subscribe(12,({startTime:a,duration:l,rawRumEvent:d,domainContext:f})=>{const m=n.triggerHook(0,{eventType:d.type,rawRumEvent:d,domainContext:f,startTime:a,duration:l});if(m===_l)return;const h=hs(m,d,{ddtags:LL(e).join(",")});Rde(h,e.beforeSend,f,o)&&($l(h.context)&&delete h.context,t.notify(13,h))})}function Rde(e,t,n,r){var i;if(t){const a=kde(e,nU[e.type],l=>t(l,n));if(a===!1&&e.type!==St.VIEW)return!1;a===!1&&yt.warn("Can't dismiss view events using beforeSend!")}return!((i=r[e.type])===null||i===void 0?void 0:i.isLimitReached())}function Ide(e,t,n,r){e.register(0,({eventType:i,startTime:o})=>{const a=t.findTrackedSession(o),l=r.findView(o);if(!a||!l)return _l;let d,f,m;return i===St.VIEW?(d=n.getReplayStats(l.id)?!0:void 0,f=a.sessionReplay===1,m=l.sessionIsActive?void 0:!1):d=n.isRecording()?!0:void 0,{type:i,session:{id:a.id,type:"user",has_replay:d,sampled_for_replay:f,is_active:m}}}),e.register(1,({startTime:i})=>{const o=t.findTrackedSession(i);return o?{session:{id:o.id}}:ji})}function Tde(e){e.register(0,({eventType:t})=>({type:t,connectivity:UL()}))}function Nde(e,t,n){e.register(0,({eventType:r})=>{const i=t.source;return{type:r,_dd:{format_version:2,drift:Ure(),configuration:{session_sample_rate:_d(t.sessionSampleRate,3),session_replay_sample_rate:_d(t.sessionReplaySampleRate,3),profiling_sample_rate:_d(t.profilingSampleRate,3),trace_sample_rate:_d(t.traceSampleRate,3),beta_encode_cookie_options:t.betaEncodeCookieOptions},browser_sdk_version:Xd()?"6.27.1":void 0,sdk_name:n},application:{id:t.applicationId},date:wr(),source:i}}),e.register(1,()=>({application:{id:t.applicationId}}))}function Ade(e,t){e.register(1,()=>t.isGranted()?ji:_l)}const Ode=[St.ACTION,St.ERROR,St.LONG_TASK,St.RESOURCE,St.VITAL];function Dde(e){return{addEvent:(t,n,r,i)=>{Ode.includes(n.type)&&e.notify(12,{startTime:t,rawRumEvent:n,domainContext:r,duration:i})}}}function $de(e,t){if(!t.metricsEnabled)return{stop:on};const{unsubscribe:n}=e.subscribe(4,({initialViewMetrics:r})=>{!r.largestContentfulPaint||!r.navigationTimings||(ax("Initial view metrics",{metrics:Pde(r.largestContentfulPaint,r.navigationTimings)}),n())});return{stop:n}}function Pde(e,t){return{lcp:{value:e.value},navigation:{domComplete:t.domComplete,domContentLoaded:t.domContentLoaded,domInteractive:t.domInteractive,firstByte:t.firstByte,loadEvent:t.loadEvent}}}function Mde(e){if(!ms(Po.SOURCE_CODE_CONTEXT))return;const t=window,n=new Map;function r(){t.DD_SOURCE_CODE_CONTEXT&&(ex(t.DD_SOURCE_CODE_CONTEXT).forEach(([i,o])=>{const l=kf({stack:i}).stack[0];if(!l.url){ox("Source code context: missing frame url",{stack:i});return}n.has(l.url)||n.set(l.url,o)}),t.DD_SOURCE_CODE_CONTEXT={})}r(),e.register(0,({domainContext:i,rawRumEvent:o})=>{r();const a=zde(i,o);if(a){const l=n.get(a);if(l)return{type:o.type,service:l.service,version:l.version}}return ji})}function zde(e,t){var n,r;if(t.type==="long_task"&&t.long_task.entry_type==="long-animation-frame")return(n=t.long_task.scripts[0])===null||n===void 0?void 0:n.source_url;let i;return"handlingStack"in e&&(i=e.handlingStack),t.type==="error"&&t.error.stack&&(i=t.error.stack),(r=kf({stack:i}).stack[0])===null||r===void 0?void 0:r.url}function Lde(e,t,n,r,i,o,a,l,d,f,m){const h=[],v=new Jse;v.subscribe(13,I=>FL("rum",I));const y=I=>{v.notify(14,{error:I}),ix("Error reported to customer",{"error.message":I.message})},x=XL(e),S=x.subscribe(I=>{v.notify(11,I)});h.push(()=>S.unsubscribe());const C=Xd()?Zue():Gue(e,v,o);if(Xd())Jue(v);else{const I=Xue(e,v,y,x,C.expireObservable,i);h.push(()=>I.stop()),sde(d,v,I.flushController.flushObservable)}Ade(f,o);const{stop:k}=$de(v,d);h.push(k);const{stop:E,...j}=Fde(v,f,e,C,t,r,a,l,m,y);return h.push(E),l.unbuffer(),h.push(()=>n.stop()),{...j,lifeCycle:v,session:C,stopSession:()=>C.expire(),telemetry:d,stop:()=>{h.forEach(I=>I())},hooks:f}}function Fde(e,t,n,r,i,o,a,l,d,f){const m=[],h=Zse(),v=tde(n,location),{observable:y,stop:x}=Wse();m.push(x),Nde(t,n,d);const S=fde(t,n);m.push(()=>S.stop());const C=ele(e);m.push(()=>C.stop());const k=ede(e,t,v,location);m.push(()=>k.stop());const E=ode(e,t,n);Ide(t,r,i,C),Tde(t);const j=sse(t,n,"rum"),I=lse(t,n,r,"rum"),A=ase(t,n,"rum"),T=Sce(e,t,h,y,n);m.push(T.stop);const N=Dde(e),D=hde(t,n);m.push(D.stop);const L=xde(n,t);m.push(L.stop),Cde(t),jde(n,e,t,f);const{addTiming:H,startView:ee,setViewName:G,setViewContext:K,setViewContextProperty:B,getViewContext:q,stop:z}=Bue(e,t,n,location,h,y,v,i,C,o);Mde(t),m.push(z);const{stop:W}=Vce(e,n,S);m.push(W);const{stop:F,longTaskContexts:ne}=Sde(e,n);m.push(F);const{addError:$}=Ece(e,n,l);Sle(e,n,r,I,A);const P=pse(e,S,a),V=Xse(n.applicationId,r,C,T.actionContexts,k);return{addAction:T.addAction,startAction:T.startAction,stopAction:T.stopAction,addEvent:N.addEvent,addError:$,addTiming:H,addFeatureFlagEvaluation:E.addFeatureFlagEvaluation,startView:ee,setViewContext:K,setViewContextProperty:B,getViewContext:q,setViewName:G,viewHistory:C,getInternalContext:V.get,startDurationVital:P.startDurationVital,stopDurationVital:P.stopDurationVital,addDurationVital:P.addDurationVital,addOperationStepVital:P.addOperationStepVital,globalContext:j,userContext:I,accountContext:A,longTaskContexts:ne,stop:()=>m.forEach(O=>O())}}function Ude(e,{session:t,viewContext:n,errorType:r}){const i=t?t.id:"no-session-id",o=[];r!==void 0&&o.push(`error-type=${r}`),n&&(o.push(`seed=${n.id}`),o.push(`from=${n.startClocks.timeStamp}`));const a=Vde(e),l=`/rum/replay/sessions/${i}`;return`${a}${l}?${o.join("&")}`}function Vde(e){const t=e.site,n=e.subdomain||Bde(e);return`https://${n?`${n}.`:""}${t}`}function Bde(e){switch(e.site){case _c:case Fie:return"app";case EL:return"dd";default:return}}const Hde=1e3;let _o;function QPe(e){return fx(e).segments_count}function eMe(e){fx(e).segments_count+=1}function tMe(e){fx(e).records_count+=1}function nMe(e,t){fx(e).segments_total_raw_size+=t}function qde(e){return _o?.get(e)}function fx(e){_o||(_o=new Map);let t;return _o.has(e)?t=_o.get(e):(t={records_count:0,segments_count:0,segments_total_raw_size:0},_o.set(e,t),_o.size>Hde&&Kde()),t}function Kde(){if(!_o)return;const e=_o.keys().next().value;e&&_o.delete(e)}function rU(e,t,n){let r=0,i=[],o,a=!0,l=0;const d=[],{stop:f}=zn(e,t,"message",({data:v})=>{if(v.type!=="wrote"||v.streamId!==n)return;const y=d[0];y&&(y.id===v.id?(d.shift(),r+=v.additionalBytesCount,i.push(v.result),o=v.trailer,y.writeCallback?y.writeCallback(v.result.byteLength):y.finishCallback&&y.finishCallback()):y.id<v.id&&f())});function m(){const v=i.length===0?new Uint8Array(0):OL(i.concat(o)),y={rawBytesCount:r,output:v,outputBytesCount:v.byteLength,encoding:"deflate"};return r=0,i=[],y}function h(){a||(t.postMessage({action:"reset",streamId:n}),a=!0)}return{isAsync:!0,get isEmpty(){return a},write(v,y){t.postMessage({action:"write",id:l,data:v,streamId:n}),d.push({id:l,writeCallback:y,data:v}),a=!1,l+=1},finish(v){h(),d.length?(d.forEach(y=>{delete y.writeCallback}),d[d.length-1].finishCallback=()=>v(m())):v(m())},finishSync(){h();const v=d.map(y=>y.data).join("");return d.length=0,{...m(),pendingData:v}},estimateEncodedBytesCount(v){return v.length/8},stop(){f()}}}function ME({configuredUrl:e,error:t,source:n,scriptType:r}){if(yt.error(`${n} failed to start: an error occurred while initializing the ${r}:`,t),t instanceof Event||t instanceof Error&&Gde(t.message)){let i;e?i=`Please make sure the ${r} URL ${e} is correct and CSP is correctly configured.`:i="Please make sure CSP is correctly configured.",yt.error(`${i} See documentation at ${Gb}/integrations/content_security_policy_logs/#use-csp-with-real-user-monitoring-and-session-replay`)}else r==="worker"&&ox(t)}function Gde(e){return e.includes("Content Security Policy")||e.includes("requires 'TrustedScriptURL'")}const Zde=30*Ur;function iU(e){return new Worker(e.workerUrl||URL.createObjectURL(new Blob(['(()=>{function t(t){if(1===t.length)return t[0];const e=t.reduce((t,e)=>t+e.length,0),a=new Uint8Array(e);let n=0;for(const e of t)a.set(e,n),n+=e.length;return a}function e(t){for(var e=t.length;--e>=0;)t[e]=0}var a=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),n=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),r=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),i=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=Array(576);e(s);var h=Array(60);e(h);var l=Array(512);e(l);var _=Array(256);e(_);var o=Array(29);e(o);var d,u,f,c=Array(30);function p(t,e,a,n,r){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=n,this.max_length=r,this.has_stree=t&&t.length}function g(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}e(c);var v=function(t){return t<256?l[t]:l[256+(t>>>7)]},w=function(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},m=function(t,e,a){t.bi_valid>16-a?(t.bi_buf|=e<<t.bi_valid&65535,w(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=a-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=a)},b=function(t,e,a){m(t,a[2*e],a[2*e+1])},y=function(t,e){var a=0;do{a|=1&t,t>>>=1,a<<=1}while(--e>0);return a>>>1},z=function(t,e,a){var n,r,i=Array(16),s=0;for(n=1;n<=15;n++)i[n]=s=s+a[n-1]<<1;for(r=0;r<=e;r++){var h=t[2*r+1];0!==h&&(t[2*r]=y(i[h]++,h))}},k=function(t){var e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0},x=function(t){t.bi_valid>8?w(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},A=function(t,e,a,n){var r=2*e,i=2*a;return t[r]<t[i]||t[r]===t[i]&&n[e]<=n[a]},U=function(t,e,a){for(var n=t.heap[a],r=a<<1;r<=t.heap_len&&(r<t.heap_len&&A(e,t.heap[r+1],t.heap[r],t.depth)&&r++,!A(e,n,t.heap[r],t.depth));)t.heap[a]=t.heap[r],a=r,r<<=1;t.heap[a]=n},B=function(t,e,r){var i,s,h,l,d=0;if(0!==t.last_lit)do{i=t.pending_buf[t.d_buf+2*d]<<8|t.pending_buf[t.d_buf+2*d+1],s=t.pending_buf[t.l_buf+d],d++,0===i?b(t,s,e):(h=_[s],b(t,h+256+1,e),0!==(l=a[h])&&(s-=o[h],m(t,s,l)),i--,h=v(i),b(t,h,r),0!==(l=n[h])&&(i-=c[h],m(t,i,l)))}while(d<t.last_lit);b(t,256,e)},I=function(t,e){var a,n,r,i=e.dyn_tree,s=e.stat_desc.static_tree,h=e.stat_desc.has_stree,l=e.stat_desc.elems,_=-1;for(t.heap_len=0,t.heap_max=573,a=0;a<l;a++)0!==i[2*a]?(t.heap[++t.heap_len]=_=a,t.depth[a]=0):i[2*a+1]=0;for(;t.heap_len<2;)i[2*(r=t.heap[++t.heap_len]=_<2?++_:0)]=1,t.depth[r]=0,t.opt_len--,h&&(t.static_len-=s[2*r+1]);for(e.max_code=_,a=t.heap_len>>1;a>=1;a--)U(t,i,a);r=l;do{a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],U(t,i,1),n=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=n,i[2*r]=i[2*a]+i[2*n],t.depth[r]=(t.depth[a]>=t.depth[n]?t.depth[a]:t.depth[n])+1,i[2*a+1]=i[2*n+1]=r,t.heap[1]=r++,U(t,i,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var a,n,r,i,s,h,l=e.dyn_tree,_=e.max_code,o=e.stat_desc.static_tree,d=e.stat_desc.has_stree,u=e.stat_desc.extra_bits,f=e.stat_desc.extra_base,c=e.stat_desc.max_length,p=0;for(i=0;i<=15;i++)t.bl_count[i]=0;for(l[2*t.heap[t.heap_max]+1]=0,a=t.heap_max+1;a<573;a++)(i=l[2*l[2*(n=t.heap[a])+1]+1]+1)>c&&(i=c,p++),l[2*n+1]=i,n>_||(t.bl_count[i]++,s=0,n>=f&&(s=u[n-f]),h=l[2*n],t.opt_len+=h*(i+s),d&&(t.static_len+=h*(o[2*n+1]+s)));if(0!==p){do{for(i=c-1;0===t.bl_count[i];)i--;t.bl_count[i]--,t.bl_count[i+1]+=2,t.bl_count[c]--,p-=2}while(p>0);for(i=c;0!==i;i--)for(n=t.bl_count[i];0!==n;)(r=t.heap[--a])>_||(l[2*r+1]!==i&&(t.opt_len+=(i-l[2*r+1])*l[2*r],l[2*r+1]=i),n--)}}(t,e),z(i,_,t.bl_count)},E=function(t,e,a){var n,r,i=-1,s=e[1],h=0,l=7,_=4;for(0===s&&(l=138,_=3),e[2*(a+1)+1]=65535,n=0;n<=a;n++)r=s,s=e[2*(n+1)+1],++h<l&&r===s||(h<_?t.bl_tree[2*r]+=h:0!==r?(r!==i&&t.bl_tree[2*r]++,t.bl_tree[32]++):h<=10?t.bl_tree[34]++:t.bl_tree[36]++,h=0,i=r,0===s?(l=138,_=3):r===s?(l=6,_=3):(l=7,_=4))},C=function(t,e,a){var n,r,i=-1,s=e[1],h=0,l=7,_=4;for(0===s&&(l=138,_=3),n=0;n<=a;n++)if(r=s,s=e[2*(n+1)+1],!(++h<l&&r===s)){if(h<_)do{b(t,r,t.bl_tree)}while(0!==--h);else 0!==r?(r!==i&&(b(t,r,t.bl_tree),h--),b(t,16,t.bl_tree),m(t,h-3,2)):h<=10?(b(t,17,t.bl_tree),m(t,h-3,3)):(b(t,18,t.bl_tree),m(t,h-11,7));h=0,i=r,0===s?(l=138,_=3):r===s?(l=6,_=3):(l=7,_=4)}},D=!1,M=function(t,e,a,n){m(t,0+(n?1:0),3),function(t,e,a){x(t),w(t,a),w(t,~a),t.pending_buf.set(t.window.subarray(e,e+a),t.pending),t.pending+=a}(t,e,a)},j=M,L=function(t,e,a,n){for(var r=65535&t,i=t>>>16&65535,s=0;0!==a;){a-=s=a>2e3?2e3:a;do{i=i+(r=r+e[n++]|0)|0}while(--s);r%=65521,i%=65521}return r|i<<16},S=new Uint32Array(function(){for(var t,e=[],a=0;a<256;a++){t=a;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[a]=t}return e}()),T=function(t,e,a,n){var r=S,i=n+a;t^=-1;for(var s=n;s<i;s++)t=t>>>8^r[255&(t^e[s])];return-1^t},O={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},q=j,F=function(t,e,a){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&a,t.last_lit++,0===e?t.dyn_ltree[2*a]++:(t.matches++,e--,t.dyn_ltree[2*(_[a]+256+1)]++,t.dyn_dtree[2*v(e)]++),t.last_lit===t.lit_bufsize-1},G=-2,H=258,J=262,K=103,N=113,P=666,Q=function(t,e){return t.msg=O[e],e},R=function(t){return(t<<1)-(t>4?9:0)},V=function(t){for(var e=t.length;--e>=0;)t[e]=0},W=function(t,e,a){return(e<<t.hash_shift^a)&t.hash_mask},X=function(t){var e=t.state,a=e.pending;a>t.avail_out&&(a=t.avail_out),0!==a&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+a),t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))},Y=function(t,e){(function(t,e,a,n){var r,l,_=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,a=4093624447;for(e=0;e<=31;e++,a>>>=1)if(1&a&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),I(t,t.l_desc),I(t,t.d_desc),_=function(t){var e;for(E(t,t.dyn_ltree,t.l_desc.max_code),E(t,t.dyn_dtree,t.d_desc.max_code),I(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*i[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),r=t.opt_len+3+7>>>3,(l=t.static_len+3+7>>>3)<=r&&(r=l)):r=l=a+5,a+4<=r&&-1!==e?M(t,e,a,n):4===t.strategy||l===r?(m(t,2+(n?1:0),3),B(t,s,h)):(m(t,4+(n?1:0),3),function(t,e,a,n){var r;for(m(t,e-257,5),m(t,a-1,5),m(t,n-4,4),r=0;r<n;r++)m(t,t.bl_tree[2*i[r]+1],3);C(t,t.dyn_ltree,e-1),C(t,t.dyn_dtree,a-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,_+1),B(t,t.dyn_ltree,t.dyn_dtree)),k(t),n&&x(t)})(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,X(t.strm)},Z=function(t,e){t.pending_buf[t.pending++]=e},$=function(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},tt=function(t,e,a,n){var r=t.avail_in;return r>n&&(r=n),0===r?0:(t.avail_in-=r,e.set(t.input.subarray(t.next_in,t.next_in+r),a),1===t.state.wrap?t.adler=L(t.adler,e,r,a):2===t.state.wrap&&(t.adler=T(t.adler,e,r,a)),t.next_in+=r,t.total_in+=r,r)},et=function(t,e){var a,n,r=t.max_chain_length,i=t.strstart,s=t.prev_length,h=t.nice_match,l=t.strstart>t.w_size-J?t.strstart-(t.w_size-J):0,_=t.window,o=t.w_mask,d=t.prev,u=t.strstart+H,f=_[i+s-1],c=_[i+s];t.prev_length>=t.good_match&&(r>>=2),h>t.lookahead&&(h=t.lookahead);do{if(_[(a=e)+s]===c&&_[a+s-1]===f&&_[a]===_[i]&&_[++a]===_[i+1]){i+=2,a++;do{}while(_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&i<u);if(n=H-(u-i),i=u-H,n>s){if(t.match_start=e,s=n,n>=h)break;f=_[i+s-1],c=_[i+s]}}}while((e=d[e&o])>l&&0!==--r);return s<=t.lookahead?s:t.lookahead},at=function(t){var e,a,n,r,i,s=t.w_size;do{if(r=t.window_size-t.lookahead-t.strstart,t.strstart>=s+(s-J)){t.window.set(t.window.subarray(s,s+s),0),t.match_start-=s,t.strstart-=s,t.block_start-=s,e=a=t.hash_size;do{n=t.head[--e],t.head[e]=n>=s?n-s:0}while(--a);e=a=s;do{n=t.prev[--e],t.prev[e]=n>=s?n-s:0}while(--a);r+=s}if(0===t.strm.avail_in)break;if(a=tt(t.strm,t.window,t.strstart+t.lookahead,r),t.lookahead+=a,t.lookahead+t.insert>=3)for(i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=W(t,t.ins_h,t.window[i+1]);t.insert&&(t.ins_h=W(t,t.ins_h,t.window[i+3-1]),t.prev[i&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=i,i++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<J&&0!==t.strm.avail_in)},nt=function(t,e){for(var a,n;;){if(t.lookahead<J){if(at(t),t.lookahead<J&&0===e)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==a&&t.strstart-a<=t.w_size-J&&(t.match_length=et(t,a)),t.match_length>=3)if(n=F(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!==--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=W(t,t.ins_h,t.window[t.strstart+1]);else n=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2},rt=function(t,e){for(var a,n,r;;){if(t.lookahead<J){if(at(t),t.lookahead<J&&0===e)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==a&&t.prev_length<t.max_lazy_match&&t.strstart-a<=t.w_size-J&&(t.match_length=et(t,a),t.match_length<=5&&(1===t.strategy||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){r=t.strstart+t.lookahead-3,n=F(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=r&&(t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!==--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(Y(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((n=F(t,0,t.window[t.strstart-1]))&&Y(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=F(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2};function it(t,e,a,n,r){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=n,this.func=r}var st=[new it(0,0,0,0,function(t,e){var a=65535;for(a>t.pending_buf_size-5&&(a=t.pending_buf_size-5);;){if(t.lookahead<=1){if(at(t),0===t.lookahead&&0===e)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+a;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,Y(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-J&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(Y(t,!1),t.strm.avail_out),1)}),new it(4,4,8,4,nt),new it(4,5,16,8,nt),new it(4,6,32,32,nt),new it(4,4,16,16,rt),new it(8,16,32,32,rt),new it(8,16,128,128,rt),new it(8,32,128,256,rt),new it(32,128,258,1024,rt),new it(32,258,258,4096,rt)];function ht(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),V(this.dyn_ltree),V(this.dyn_dtree),V(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),V(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),V(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}for(var lt=function(t){var e,i=function(t){if(!t||!t.state)return Q(t,G);t.total_in=t.total_out=0,t.data_type=2;var e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:N,t.adler=2===e.wrap?0:1,e.last_flush=0,function(t){D||(function(){var t,e,i,g,v,w=Array(16);for(i=0,g=0;g<28;g++)for(o[g]=i,t=0;t<1<<a[g];t++)_[i++]=g;for(_[i-1]=g,v=0,g=0;g<16;g++)for(c[g]=v,t=0;t<1<<n[g];t++)l[v++]=g;for(v>>=7;g<30;g++)for(c[g]=v<<7,t=0;t<1<<n[g]-7;t++)l[256+v++]=g;for(e=0;e<=15;e++)w[e]=0;for(t=0;t<=143;)s[2*t+1]=8,t++,w[8]++;for(;t<=255;)s[2*t+1]=9,t++,w[9]++;for(;t<=279;)s[2*t+1]=7,t++,w[7]++;for(;t<=287;)s[2*t+1]=8,t++,w[8]++;for(z(s,287,w),t=0;t<30;t++)h[2*t+1]=5,h[2*t]=y(t,5);d=new p(s,a,257,286,15),u=new p(h,n,0,30,15),f=new p([],r,0,19,7)}(),D=!0),t.l_desc=new g(t.dyn_ltree,d),t.d_desc=new g(t.dyn_dtree,u),t.bl_desc=new g(t.bl_tree,f),t.bi_buf=0,t.bi_valid=0,k(t)}(e),0}(t);return 0===i&&((e=t.state).window_size=2*e.w_size,V(e.head),e.max_lazy_match=st[e.level].max_lazy,e.good_match=st[e.level].good_length,e.nice_match=st[e.level].nice_length,e.max_chain_length=st[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0),i},_t=function(t,e){var a,n;if(!t||!t.state||e>5||e<0)return t?Q(t,G):G;var r=t.state;if(!t.output||!t.input&&0!==t.avail_in||r.status===P&&4!==e)return Q(t,0===t.avail_out?-5:G);r.strm=t;var i=r.last_flush;if(r.last_flush=e,42===r.status)if(2===r.wrap)t.adler=0,Z(r,31),Z(r,139),Z(r,8),r.gzhead?(Z(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),Z(r,255&r.gzhead.time),Z(r,r.gzhead.time>>8&255),Z(r,r.gzhead.time>>16&255),Z(r,r.gzhead.time>>24&255),Z(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),Z(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(Z(r,255&r.gzhead.extra.length),Z(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(t.adler=T(t.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69):(Z(r,0),Z(r,0),Z(r,0),Z(r,0),Z(r,0),Z(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),Z(r,3),r.status=N);else{var h=8+(r.w_bits-8<<4)<<8;h|=(r.strategy>=2||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(h|=32),h+=31-h%31,r.status=N,$(r,h),0!==r.strstart&&($(r,t.adler>>>16),$(r,65535&t.adler)),t.adler=1}if(69===r.status)if(r.gzhead.extra){for(a=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),X(t),a=r.pending,r.pending!==r.pending_buf_size));)Z(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=73)}else r.status=73;if(73===r.status)if(r.gzhead.name){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),X(t),a=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.name.length?255&r.gzhead.name.charCodeAt(r.gzindex++):0,Z(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),0===n&&(r.gzindex=0,r.status=91)}else r.status=91;if(91===r.status)if(r.gzhead.comment){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),X(t),a=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.comment.length?255&r.gzhead.comment.charCodeAt(r.gzindex++):0,Z(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),0===n&&(r.status=K)}else r.status=K;if(r.status===K&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&X(t),r.pending+2<=r.pending_buf_size&&(Z(r,255&t.adler),Z(r,t.adler>>8&255),t.adler=0,r.status=N)):r.status=N),0!==r.pending){if(X(t),0===t.avail_out)return r.last_flush=-1,0}else if(0===t.avail_in&&R(e)<=R(i)&&4!==e)return Q(t,-5);if(r.status===P&&0!==t.avail_in)return Q(t,-5);if(0!==t.avail_in||0!==r.lookahead||0!==e&&r.status!==P){var l=2===r.strategy?function(t,e){for(var a;;){if(0===t.lookahead&&(at(t),0===t.lookahead)){if(0===e)return 1;break}if(t.match_length=0,a=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2}(r,e):3===r.strategy?function(t,e){for(var a,n,r,i,s=t.window;;){if(t.lookahead<=H){if(at(t),t.lookahead<=H&&0===e)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=s[r=t.strstart-1])===s[++r]&&n===s[++r]&&n===s[++r]){i=t.strstart+H;do{}while(n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&r<i);t.match_length=H-(i-r),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(a=F(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2}(r,e):st[r.level].func(r,e);if(3!==l&&4!==l||(r.status=P),1===l||3===l)return 0===t.avail_out&&(r.last_flush=-1),0;if(2===l&&(1===e?function(t){m(t,2,3),b(t,256,s),function(t){16===t.bi_valid?(w(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}(r):5!==e&&(q(r,0,0,!1),3===e&&(V(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),X(t),0===t.avail_out))return r.last_flush=-1,0}return 4!==e?0:r.wrap<=0?1:(2===r.wrap?(Z(r,255&t.adler),Z(r,t.adler>>8&255),Z(r,t.adler>>16&255),Z(r,t.adler>>24&255),Z(r,255&t.total_in),Z(r,t.total_in>>8&255),Z(r,t.total_in>>16&255),Z(r,t.total_in>>24&255)):($(r,t.adler>>>16),$(r,65535&t.adler)),X(t),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?0:1)},ot=function(t){if(!t||!t.state)return G;var e=t.state.status;return 42!==e&&69!==e&&73!==e&&91!==e&&e!==K&&e!==N&&e!==P?Q(t,G):(t.state=null,e===N?Q(t,-3):0)},dt=new Uint8Array(256),ut=0;ut<256;ut++)dt[ut]=ut>=252?6:ut>=248?5:ut>=240?4:ut>=224?3:ut>=192?2:1;dt[254]=dt[254]=1;var ft=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0},ct=Object.prototype.toString;function pt(){this.options={level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0};var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new ft,this.strm.avail_out=0;var e,a,n=function(t,e,a,n,r,i){if(!t)return G;var s=1;if(-1===e&&(e=6),n<0?(s=0,n=-n):n>15&&(s=2,n-=16),r<1||r>9||8!==a||n<8||n>15||e<0||e>9||i<0||i>4)return Q(t,G);8===n&&(n=9);var h=new ht;return t.state=h,h.strm=t,h.wrap=s,h.gzhead=null,h.w_bits=n,h.w_size=1<<h.w_bits,h.w_mask=h.w_size-1,h.hash_bits=r+7,h.hash_size=1<<h.hash_bits,h.hash_mask=h.hash_size-1,h.hash_shift=~~((h.hash_bits+3-1)/3),h.window=new Uint8Array(2*h.w_size),h.head=new Uint16Array(h.hash_size),h.prev=new Uint16Array(h.w_size),h.lit_bufsize=1<<r+6,h.pending_buf_size=4*h.lit_bufsize,h.pending_buf=new Uint8Array(h.pending_buf_size),h.d_buf=1*h.lit_bufsize,h.l_buf=3*h.lit_bufsize,h.level=e,h.strategy=i,h.method=a,lt(t)}(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(0!==n)throw Error(O[n]);if(t.header&&(e=this.strm,a=t.header,e&&e.state&&(2!==e.state.wrap||(e.state.gzhead=a))),t.dictionary){var r;if(r="[object ArrayBuffer]"===ct.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,0!==(n=function(t,e){var a=e.length;if(!t||!t.state)return G;var n=t.state,r=n.wrap;if(2===r||1===r&&42!==n.status||n.lookahead)return G;if(1===r&&(t.adler=L(t.adler,e,a,0)),n.wrap=0,a>=n.w_size){0===r&&(V(n.head),n.strstart=0,n.block_start=0,n.insert=0);var i=new Uint8Array(n.w_size);i.set(e.subarray(a-n.w_size,a),0),e=i,a=n.w_size}var s=t.avail_in,h=t.next_in,l=t.input;for(t.avail_in=a,t.next_in=0,t.input=e,at(n);n.lookahead>=3;){var _=n.strstart,o=n.lookahead-2;do{n.ins_h=W(n,n.ins_h,n.window[_+3-1]),n.prev[_&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=_,_++}while(--o);n.strstart=_,n.lookahead=2,at(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,t.next_in=h,t.input=l,t.avail_in=s,n.wrap=r,0}(this.strm,r)))throw Error(O[n]);this._dict_set=!0}}function gt(t,e,a){try{t.postMessage({type:"errored",error:e,streamId:a})}catch(n){t.postMessage({type:"errored",error:e+"",streamId:a})}}function vt(t){const e=t.strm.adler;return new Uint8Array([3,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e])}pt.prototype.push=function(t,e){var a,n,r=this.strm,i=this.options.chunkSize;if(this.ended)return!1;for(n=e===~~e?e:!0===e?4:0,"[object ArrayBuffer]"===ct.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;)if(0===r.avail_out&&(r.output=new Uint8Array(i),r.next_out=0,r.avail_out=i),(2===n||3===n)&&r.avail_out<=6)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else{if(1===(a=_t(r,n)))return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),a=ot(this.strm),this.onEnd(a),this.ended=!0,0===a;if(0!==r.avail_out){if(n>0&&r.next_out>0)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else if(0===r.avail_in)break}else this.onData(r.output)}return!0},pt.prototype.onData=function(t){this.chunks.push(t)},pt.prototype.onEnd=function(t){0===t&&(this.result=function(t){for(var e=0,a=0,n=t.length;a<n;a++)e+=t[a].length;for(var r=new Uint8Array(e),i=0,s=0,h=t.length;i<h;i++){var l=t[i];r.set(l,s),s+=l.length}return r}(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},function(e=self){try{const a=new Map;e.addEventListener("message",n=>{try{const r=function(e,a){switch(a.action){case"init":return{type:"initialized",version:"6.27.1"};case"write":{let n=e.get(a.streamId);n||(n=new pt,e.set(a.streamId,n));const r=n.chunks.length,i=function(t){if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let e,a,n,r,i,s=t.length,h=0;for(r=0;r<s;r++)a=t.charCodeAt(r),55296==(64512&a)&&r+1<s&&(n=t.charCodeAt(r+1),56320==(64512&n)&&(a=65536+(a-55296<<10)+(n-56320),r++)),h+=a<128?1:a<2048?2:a<65536?3:4;for(e=new Uint8Array(h),i=0,r=0;i<h;r++)a=t.charCodeAt(r),55296==(64512&a)&&r+1<s&&(n=t.charCodeAt(r+1),56320==(64512&n)&&(a=65536+(a-55296<<10)+(n-56320),r++)),a<128?e[i++]=a:a<2048?(e[i++]=192|a>>>6,e[i++]=128|63&a):a<65536?(e[i++]=224|a>>>12,e[i++]=128|a>>>6&63,e[i++]=128|63&a):(e[i++]=240|a>>>18,e[i++]=128|a>>>12&63,e[i++]=128|a>>>6&63,e[i++]=128|63&a);return e}(a.data);return n.push(i,2),{type:"wrote",id:a.id,streamId:a.streamId,result:t(n.chunks.slice(r)),trailer:vt(n),additionalBytesCount:i.length}}case"reset":e.delete(a.streamId)}}(a,n.data);r&&e.postMessage(r)}catch(t){gt(e,t,n.data&&"streamId"in n.data?n.data.streamId:void 0)}})}catch(t){gt(e,t)}}()})();'])))}let Wn={status:0};function oU(e,t,n,r=iU){switch(Wn.status===0&&Yde(e,t,r),Wn.status){case 1:return Wn.initializationFailureCallbacks.push(n),Wn.worker;case 3:return Wn.worker}}function r2(){return Wn.status}function Yde(e,t,n=iU){try{const r=n(e),{stop:i}=zn(e,r,"error",l=>{W_(e,t,l)}),{stop:o}=zn(e,r,"message",({data:l})=>{l.type==="errored"?W_(e,t,l.error,l.streamId):l.type==="initialized"&&Xde(l.version)});r.postMessage({action:"init"}),zr(()=>Wde(t),Zde),Wn={status:1,worker:r,stop:()=>{i(),o()},initializationFailureCallbacks:[]}}catch(r){W_(e,t,r)}}function Wde(e){Wn.status===1&&(yt.error(`${e} failed to start: a timeout occurred while initializing the Worker`),Wn.initializationFailureCallbacks.forEach(t=>t()),Wn={status:2})}function Xde(e){Wn.status===1&&(Wn={status:3,worker:Wn.worker,stop:Wn.stop,version:e})}function W_(e,t,n,r){Wn.status===1||Wn.status===0?(ME({configuredUrl:e.workerUrl,error:n,source:t,scriptType:"worker"}),Wn.status===1&&Wn.initializationFailureCallbacks.forEach(i=>i()),Wn={status:2}):ox(n,{worker_version:Wn.status===3&&Wn.version,stream_id:r})}function aU(){return typeof Array.from=="function"&&typeof CSSSupportsRule=="function"&&typeof URL.createObjectURL=="function"&&"forEach"in NodeList.prototype}function Jde(e,t,n,r){const i=t.findTrackedSession(),o=Qde(i,r),a=n.findView();return Ude(e,{viewContext:a,errorType:o,session:i})}function Qde(e,t){if(!aU())return"browser-not-supported";if(!e)return"rum-not-tracked";if(e.sessionReplay===0)return"incorrect-session-plan";if(!t)return"replay-not-started"}function efe(e,t){if(!e.metricsEnabled)return{stop:on};let n,r,i;const{unsubscribe:o}=t.subscribe(a=>{switch(a.type){case"start":n={forced:a.forced,timestamp:wr()},r=void 0,i=void 0;break;case"document-ready":n&&(r=Xn(n.timestamp,wr()));break;case"recorder-settled":n&&(i=Xn(n.timestamp,wr()));break;case"aborted":case"deflate-encoder-load-failed":case"recorder-load-failed":case"succeeded":o(),n&&ax("Recorder init metrics",{metrics:tfe(n.forced,i,Xn(n.timestamp,wr()),a.type,r)});break}});return{stop:o}}function tfe(e,t,n,r,i){return{forced:e,loadRecorderModuleDuration:t,recorderInitDuration:n,result:r,waitForDocReadyDuration:i}}function nfe(e,t,n,r,i,o,a){let l=0,d;t.subscribe(9,()=>{(l===2||l===3)&&(v(),l=1)}),t.subscribe(10,()=>{l===1&&h()});const f=new Ft;efe(a,f);const m=async y=>{f.notify({type:"start",forced:y});const[x]=await Promise.all([i2(f,{type:"recorder-settled"},i()),i2(f,{type:"document-ready"},Dae(e,"interactive"))]);if(l!==2){f.notify({type:"aborted"});return}if(!x){l=0,f.notify({type:"recorder-load-failed"});return}const S=o();if(!S){l=0,f.notify({type:"deflate-encoder-load-failed"});return}({stop:d}=x(t,e,n,r,S,a)),l=3,f.notify({type:"succeeded"})};function h(y){const x=n.findTrackedSession();if(rfe(x,y)){l=1;return}if(ife(l))return;l=2;const S=ofe(x,y)||!1;m(S).catch(iu),S&&n.setForcedReplay()}function v(){l===3&&d?.(),l=0}return{start:h,stop:v,getSessionReplayLink(){return Jde(e,n,r,l!==0)},isRecording:()=>l===3}}function rfe(e,t){return!e||e.sessionReplay===0&&(!t||!t.force)}function ife(e){return e===2||e===3}function ofe(e,t){return t&&t.force&&e.sessionReplay===0}async function i2(e,t,n){try{return await n}finally{e.notify(t)}}function afe(){let e=0;return{strategy:{start(){e=1},stop(){e=2},isRecording:()=>!1,getSessionReplayLink:on},shouldStartImmediately(t){return e===1||e===0&&!t.startSessionReplayRecordingManually}}}function sfe(e,t){if(Xd()&&!WL("records")||!aU())return{start:on,stop:on,getReplayStats:()=>{},onRumStart:on,isRecording:()=>!1,getSessionReplayLink:()=>{}};let{strategy:n,shouldStartImmediately:r}=afe();return{start:o=>n.start(o),stop:()=>n.stop(),getSessionReplayLink:()=>n.getSessionReplayLink(),onRumStart:i,isRecording:()=>r2()===3&&n.isRecording(),getReplayStats:o=>r2()===3?qde(o):void 0};function i(o,a,l,d,f,m){let h;function v(){return h||(f??(f=oU(a,"Datadog Session Replay",()=>{n.stop()},t)),f&&(h=rU(a,f,1))),h}n=nfe(a,o,l,d,e,v,m),r(a)&&n.start()}}const lfe="modulepreload",cfe=function(e){return"/"+e},o2={},ch=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){let d=function(f){return Promise.all(f.map(m=>Promise.resolve(m).then(h=>({status:"fulfilled",value:h}),h=>({status:"rejected",reason:h}))))};document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),l=a?.nonce||a?.getAttribute("nonce");i=d(n.map(f=>{if(f=cfe(f),f in o2)return;o2[f]=!0;const m=f.endsWith(".css"),h=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${h}`))return;const v=document.createElement("link");if(v.rel=m?"stylesheet":lfe,m||(v.as="script"),v.crossOrigin="",v.href=f,l&&v.setAttribute("nonce",l),document.head.appendChild(v),m)return new Promise((y,x)=>{v.addEventListener("load",y),v.addEventListener("error",()=>x(new Error(`Unable to preload CSS for ${f}`)))})}))}function o(a){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=a,window.dispatchEvent(l),!l.defaultPrevented)throw a}return i.then(a=>{for(const l of a||[])l.status==="rejected"&&o(l.reason);return t().catch(o)})};async function ufe(e=dfe){try{return await e()}catch(t){ME({error:t,source:"Recorder",scriptType:"module"})}}async function dfe(){return(await ch(()=>import("./startRecording-CTUOSIln.js"),[])).startRecording}function ffe(){return ti().Profiler!==void 0}function pfe(e){let t={status:"starting"};return e.register(0,({eventType:n})=>n!==St.VIEW&&n!==St.LONG_TASK?ji:{type:n,_dd:{profiling:t}}),{get:()=>t,set:n=>{t=n}}}async function mfe(e=hfe){try{return await e()}catch(t){ME({error:t,source:"Profiler",scriptType:"module"})}}async function hfe(){return(await ch(()=>import("./profiler-CxDJoqcP.js"),[])).createRumProfiler}function gfe(){let e;function t(n,r,i,o,a,l,d){const f=o.findTrackedSession();if(!f||!wF(f.id,i.profilingSampleRate))return;const m=pfe(r);if(!ffe()){m.set({status:"error",error_reason:"not-supported-by-browser"});return}mfe().then(h=>{if(!h){m.set({status:"error",error_reason:"failed-to-lazy-load"});return}e=h(i,n,o,m,l,d,a,void 0),e.start()}).catch(iu)}return{onRumStart:t,stop:()=>{e?.stop()}}}const vfe=sfe(ufe),yfe=gfe(),bfe=Kse(Lde,vfe,yfe,{startDeflateWorker:oU,createDeflateEncoder:rU,sdkName:"rum"});Ooe(ti(),"DD_RUM",bfe);function wy(e,t){al("react error"),Bn()}const a2={didCatch:!1,error:null};class rMe extends J.Component{constructor(t){super(t),this.resetError=()=>{this.setState(a2)},this.state=a2}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}componentDidCatch(t,n){wy()}render(){return this.state.didCatch?J.createElement(this.props.fallback,{error:this.state.error,resetError:this.resetError}):this.props.children}}let s2=!1;function xfe(){b.useEffect(()=>{s2||(s2=!0)},[])}function wfe(){return c.jsx(c.Fragment,{children:c.jsx(Nl,{})})}const px=$Q()({component:wfe});function Sfe(){return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 126.644 96",width:24,height:24,children:c.jsx("path",{fill:"currentColor",d:"M81.15,0c-1.2376,2.1973-2.3489,4.4704-3.3591,6.794-9.5975-1.4396-19.3718-1.4396-28.9945,0-.985-2.3236-2.1216-4.5967-3.3591-6.794-9.0166,1.5407-17.8059,4.2431-26.1405,8.0568C2.779,32.5304-1.6914,56.3725.5312,79.8863c9.6732,7.1476,20.5083,12.603,32.0505,16.0884,2.6014-3.4854,4.8998-7.1981,6.8698-11.0623-3.738-1.3891-7.3497-3.1318-10.8098-5.1523.9092-.6567,1.7932-1.3386,2.6519-1.9953,20.281,9.547,43.7696,9.547,64.0758,0,.8587.7072,1.7427,1.3891,2.6519,1.9953-3.4601,2.0457-7.0718,3.7632-10.835,5.1776,1.97,3.8642,4.2683,7.5769,6.8698,11.0623,11.5419-3.4854,22.3769-8.9156,32.0509-16.0631,2.626-27.2771-4.496-50.9172-18.817-71.8548C98.9811,4.2684,90.1918,1.5659,81.1752.0505l-.0252-.0505ZM42.2802,65.4144c-6.2383,0-11.4159-5.6575-11.4159-12.6535s4.9755-12.6788,11.3907-12.6788,11.5169,5.708,11.4159,12.6788c-.101,6.9708-5.026,12.6535-11.3907,12.6535ZM84.3576,65.4144c-6.2637,0-11.3907-5.6575-11.3907-12.6535s4.9755-12.6788,11.3907-12.6788,11.4917,5.708,11.3906,12.6788c-.101,6.9708-5.026,12.6535-11.3906,12.6535Z"})})}function zE(){return c.jsxs(c.Fragment,{children:[c.jsx("img",{src:"/harper-studio_white.png",alt:"Harper Studio",className:"w-64 hidden md:inline-block"}),c.jsx("img",{src:"/HDBDogOnly.svg",width:"50px",height:"44px",alt:"Harper",className:"inline-block md:hidden"})]})}function _fe(e,t){const n=b.createContext(t),r=o=>{const{children:a,...l}=o,d=b.useMemo(()=>l,Object.values(l));return c.jsx(n.Provider,{value:d,children:a})};r.displayName=e+"Provider";function i(o){const a=b.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[r,i]}function Ti(e,t=[]){let n=[];function r(o,a){const l=b.createContext(a),d=n.length;n=[...n,a];const f=h=>{const{scope:v,children:y,...x}=h,S=v?.[e]?.[d]||l,C=b.useMemo(()=>x,Object.values(x));return c.jsx(S.Provider,{value:C,children:y})};f.displayName=o+"Provider";function m(h,v){const y=v?.[e]?.[d]||l,x=b.useContext(y);if(x)return x;if(a!==void 0)return a;throw new Error(`\`${h}\` must be used within \`${o}\``)}return[f,m]}const i=()=>{const o=n.map(a=>b.createContext(a));return function(l){const d=l?.[e]||o;return b.useMemo(()=>({[`__scope${e}`]:{...l,[e]:d}}),[l,d])}};return i.scopeName=e,[r,Cfe(i,...t)]}function Cfe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((l,{useScope:d,scopeName:f})=>{const h=d(o)[`__scope${f}`];return{...l,...h}},{});return b.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function Oe(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e?.(i),n===!1||!i.defaultPrevented)return t?.(i)}}function Jd(e){const t=kfe(e),n=b.forwardRef((r,i)=>{const{children:o,...a}=r,l=b.Children.toArray(o),d=l.find(jfe);if(d){const f=d.props.children,m=l.map(h=>h===d?b.Children.count(f)>1?b.Children.only(null):b.isValidElement(f)?f.props.children:null:h);return c.jsx(t,{...a,ref:i,children:b.isValidElement(f)?b.cloneElement(f,void 0,m):null})}return c.jsx(t,{...a,ref:i,children:o})});return n.displayName=`${e}.Slot`,n}function kfe(e){const t=b.forwardRef((n,r)=>{const{children:i,...o}=n;if(b.isValidElement(i)){const a=Ife(i),l=Rfe(o,i.props);return i.type!==b.Fragment&&(l.ref=r?Sf(r,a):a),b.cloneElement(i,l)}return b.Children.count(i)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var sU=Symbol("radix.slottable");function Efe(e){const t=({children:n})=>c.jsx(c.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=sU,t}function jfe(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===sU}function Rfe(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...l)=>{const d=o(...l);return i(...l),d}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function Ife(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Tfe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ge=Tfe.reduce((e,t)=>{const n=Jd(`Primitive.${t}`),r=b.forwardRef((i,o)=>{const{asChild:a,...l}=i,d=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(d,{...l,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function qy(e,t){e&&bf.flushSync(()=>e.dispatchEvent(t))}var ar=globalThis?.document?b.useLayoutEffect:()=>{},Nfe=iE[" useInsertionEffect ".trim().toString()]||ar;function Mo({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,o,a]=Afe({defaultProp:t,onChange:n}),l=e!==void 0,d=l?e:i;{const m=b.useRef(e!==void 0);b.useEffect(()=>{const h=m.current;h!==l&&console.warn(`${r} is changing from ${h?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. 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.`),m.current=l},[l,r])}const f=b.useCallback(m=>{if(l){const h=Ofe(m)?m(e):m;h!==e&&a.current?.(h)}else o(m)},[l,e,o,a]);return[d,f]}function Afe({defaultProp:e,onChange:t}){const[n,r]=b.useState(e),i=b.useRef(n),o=b.useRef(t);return Nfe(()=>{o.current=t},[t]),b.useEffect(()=>{i.current!==n&&(o.current?.(n),i.current=n)},[n,i]),[n,r,o]}function Ofe(e){return typeof e=="function"}var Dfe=b.createContext(void 0);function lu(e){const t=b.useContext(Dfe);return e||t||"ltr"}function $fe(e,t){return b.useReducer((n,r)=>t[n][r]??n,e)}var lr=e=>{const{present:t,children:n}=e,r=Pfe(t),i=typeof n=="function"?n({present:r.isPresent}):b.Children.only(n),o=ft(r.ref,Mfe(i));return typeof n=="function"||r.isPresent?b.cloneElement(i,{ref:o}):null};lr.displayName="Presence";function Pfe(e){const[t,n]=b.useState(),r=b.useRef(null),i=b.useRef(e),o=b.useRef("none"),a=e?"mounted":"unmounted",[l,d]=$fe(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return b.useEffect(()=>{const f=Pv(r.current);o.current=l==="mounted"?f:"none"},[l]),ar(()=>{const f=r.current,m=i.current;if(m!==e){const v=o.current,y=Pv(f);e?d("MOUNT"):y==="none"||f?.display==="none"?d("UNMOUNT"):d(m&&v!==y?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,d]),ar(()=>{if(t){let f;const m=t.ownerDocument.defaultView??window,h=y=>{const S=Pv(r.current).includes(CSS.escape(y.animationName));if(y.target===t&&S&&(d("ANIMATION_END"),!i.current)){const C=t.style.animationFillMode;t.style.animationFillMode="forwards",f=m.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=C)})}},v=y=>{y.target===t&&(o.current=Pv(r.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{m.clearTimeout(f),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:b.useCallback(f=>{r.current=f?getComputedStyle(f):null,n(f)},[])}}function Pv(e){return e?.animationName||"none"}function Mfe(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var zfe=iE[" useId ".trim().toString()]||(()=>{}),Lfe=0;function Zi(e){const[t,n]=b.useState(zfe());return ar(()=>{n(r=>r??String(Lfe++))},[e]),t?`radix-${t}`:""}function uh(e){const t=e+"CollectionProvider",[n,r]=Ti(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=S=>{const{scope:C,children:k}=S,E=J.useRef(null),j=J.useRef(new Map).current;return c.jsx(i,{scope:C,itemMap:j,collectionRef:E,children:k})};a.displayName=t;const l=e+"CollectionSlot",d=Jd(l),f=J.forwardRef((S,C)=>{const{scope:k,children:E}=S,j=o(l,k),I=ft(C,j.collectionRef);return c.jsx(d,{ref:I,children:E})});f.displayName=l;const m=e+"CollectionItemSlot",h="data-radix-collection-item",v=Jd(m),y=J.forwardRef((S,C)=>{const{scope:k,children:E,...j}=S,I=J.useRef(null),A=ft(C,I),T=o(m,k);return J.useEffect(()=>(T.itemMap.set(I,{ref:I,...j}),()=>{T.itemMap.delete(I)})),c.jsx(v,{[h]:"",ref:A,children:E})});y.displayName=m;function x(S){const C=o(e+"CollectionConsumer",S);return J.useCallback(()=>{const E=C.collectionRef.current;if(!E)return[];const j=Array.from(E.querySelectorAll(`[${h}]`));return Array.from(C.itemMap.values()).sort((T,N)=>j.indexOf(T.ref.current)-j.indexOf(N.ref.current))},[C.collectionRef,C.itemMap])}return[{Provider:a,Slot:f,ItemSlot:y},x,r]}function An(e){const t=b.useRef(e);return b.useEffect(()=>{t.current=e}),b.useMemo(()=>(...n)=>t.current?.(...n),[])}function Ffe(e,t=globalThis?.document){const n=An(e);b.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Ufe="DismissableLayer",NC="dismissableLayer.update",Vfe="dismissableLayer.pointerDownOutside",Bfe="dismissableLayer.focusOutside",l2,lU=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Rf=b.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:l,...d}=e,f=b.useContext(lU),[m,h]=b.useState(null),v=m?.ownerDocument??globalThis?.document,[,y]=b.useState({}),x=ft(t,N=>h(N)),S=Array.from(f.layers),[C]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),k=S.indexOf(C),E=m?S.indexOf(m):-1,j=f.layersWithOutsidePointerEventsDisabled.size>0,I=E>=k,A=Kfe(N=>{const D=N.target,L=[...f.branches].some(H=>H.contains(D));!I||L||(i?.(N),a?.(N),N.defaultPrevented||l?.())},v),T=Gfe(N=>{const D=N.target;[...f.branches].some(H=>H.contains(D))||(o?.(N),a?.(N),N.defaultPrevented||l?.())},v);return Ffe(N=>{E===f.layers.size-1&&(r?.(N),!N.defaultPrevented&&l&&(N.preventDefault(),l()))},v),b.useEffect(()=>{if(m)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(l2=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(m)),f.layers.add(m),c2(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=l2)}},[m,v,n,f]),b.useEffect(()=>()=>{m&&(f.layers.delete(m),f.layersWithOutsidePointerEventsDisabled.delete(m),c2())},[m,f]),b.useEffect(()=>{const N=()=>y({});return document.addEventListener(NC,N),()=>document.removeEventListener(NC,N)},[]),c.jsx(Ge.div,{...d,ref:x,style:{pointerEvents:j?I?"auto":"none":void 0,...e.style},onFocusCapture:Oe(e.onFocusCapture,T.onFocusCapture),onBlurCapture:Oe(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:Oe(e.onPointerDownCapture,A.onPointerDownCapture)})});Rf.displayName=Ufe;var Hfe="DismissableLayerBranch",qfe=b.forwardRef((e,t)=>{const n=b.useContext(lU),r=b.useRef(null),i=ft(t,r);return b.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),c.jsx(Ge.div,{...e,ref:i})});qfe.displayName=Hfe;function Kfe(e,t=globalThis?.document){const n=An(e),r=b.useRef(!1),i=b.useRef(()=>{});return b.useEffect(()=>{const o=l=>{if(l.target&&!r.current){let d=function(){cU(Vfe,n,f,{discrete:!0})};const f={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=d,t.addEventListener("click",i.current,{once:!0})):d()}else t.removeEventListener("click",i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Gfe(e,t=globalThis?.document){const n=An(e),r=b.useRef(!1);return b.useEffect(()=>{const i=o=>{o.target&&!r.current&&cU(Bfe,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function c2(){const e=new CustomEvent(NC);document.dispatchEvent(e)}function cU(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?qy(i,o):i.dispatchEvent(o)}function mx(e){const t=b.useRef({value:e,previous:e});return b.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var uU=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Zfe="VisuallyHidden",dU=b.forwardRef((e,t)=>c.jsx(Ge.span,{...e,ref:t,style:{...uU,...e.style}}));dU.displayName=Zfe;var fU=dU,cu="NavigationMenu",[LE,pU,Yfe]=uh(cu),[AC,Wfe,Xfe]=uh(cu),[FE]=Ti(cu,[Yfe,Xfe]),[Jfe,Fo]=FE(cu),[Qfe,epe]=FE(cu),mU=b.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,onValueChange:i,defaultValue:o,delayDuration:a=200,skipDelayDuration:l=300,orientation:d="horizontal",dir:f,...m}=e,[h,v]=b.useState(null),y=ft(t,L=>v(L)),x=lu(f),S=b.useRef(0),C=b.useRef(0),k=b.useRef(0),[E,j]=b.useState(!0),[I,A]=Mo({prop:r,onChange:L=>{const H=L!=="",ee=l>0;H?(window.clearTimeout(k.current),ee&&j(!1)):(window.clearTimeout(k.current),k.current=window.setTimeout(()=>j(!0),l)),i?.(L)},defaultProp:o??"",caller:cu}),T=b.useCallback(()=>{window.clearTimeout(C.current),C.current=window.setTimeout(()=>A(""),150)},[A]),N=b.useCallback(L=>{window.clearTimeout(C.current),A(L)},[A]),D=b.useCallback(L=>{I===L?window.clearTimeout(C.current):S.current=window.setTimeout(()=>{window.clearTimeout(C.current),A(L)},a)},[I,A,a]);return b.useEffect(()=>()=>{window.clearTimeout(S.current),window.clearTimeout(C.current),window.clearTimeout(k.current)},[]),c.jsx(hU,{scope:n,isRootMenu:!0,value:I,dir:x,orientation:d,rootNavigationMenu:h,onTriggerEnter:L=>{window.clearTimeout(S.current),E?D(L):N(L)},onTriggerLeave:()=>{window.clearTimeout(S.current),T()},onContentEnter:()=>window.clearTimeout(C.current),onContentLeave:T,onItemSelect:L=>{A(H=>H===L?"":L)},onItemDismiss:()=>A(""),children:c.jsx(Ge.nav,{"aria-label":"Main","data-orientation":d,dir:x,...m,ref:y})})});mU.displayName=cu;var OC="NavigationMenuSub",tpe=b.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,onValueChange:i,defaultValue:o,orientation:a="horizontal",...l}=e,d=Fo(OC,n),[f,m]=Mo({prop:r,onChange:i,defaultProp:o??"",caller:OC});return c.jsx(hU,{scope:n,isRootMenu:!1,value:f,dir:d.dir,orientation:a,rootNavigationMenu:d.rootNavigationMenu,onTriggerEnter:h=>m(h),onItemSelect:h=>m(h),onItemDismiss:()=>m(""),children:c.jsx(Ge.div,{"data-orientation":a,...l,ref:t})})});tpe.displayName=OC;var hU=e=>{const{scope:t,isRootMenu:n,rootNavigationMenu:r,dir:i,orientation:o,children:a,value:l,onItemSelect:d,onItemDismiss:f,onTriggerEnter:m,onTriggerLeave:h,onContentEnter:v,onContentLeave:y}=e,[x,S]=b.useState(null),[C,k]=b.useState(new Map),[E,j]=b.useState(null);return c.jsx(Jfe,{scope:t,isRootMenu:n,rootNavigationMenu:r,value:l,previousValue:mx(l),baseId:Zi(),dir:i,orientation:o,viewport:x,onViewportChange:S,indicatorTrack:E,onIndicatorTrackChange:j,onTriggerEnter:An(m),onTriggerLeave:An(h),onContentEnter:An(v),onContentLeave:An(y),onItemSelect:An(d),onItemDismiss:An(f),onViewportContentChange:b.useCallback((I,A)=>{k(T=>(T.set(I,A),new Map(T)))},[]),onViewportContentRemove:b.useCallback(I=>{k(A=>A.has(I)?(A.delete(I),new Map(A)):A)},[]),children:c.jsx(LE.Provider,{scope:t,children:c.jsx(Qfe,{scope:t,items:C,children:a})})})},gU="NavigationMenuList",vU=b.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,i=Fo(gU,n),o=c.jsx(Ge.ul,{"data-orientation":i.orientation,...r,ref:t});return c.jsx(Ge.div,{style:{position:"relative"},ref:i.onIndicatorTrackChange,children:c.jsx(LE.Slot,{scope:n,children:i.isRootMenu?c.jsx(CU,{asChild:!0,children:o}):o})})});vU.displayName=gU;var yU="NavigationMenuItem",[npe,bU]=FE(yU),xU=b.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,...i}=e,o=Zi(),a=r||o||"LEGACY_REACT_AUTO_VALUE",l=b.useRef(null),d=b.useRef(null),f=b.useRef(null),m=b.useRef(()=>{}),h=b.useRef(!1),v=b.useCallback((x="start")=>{if(l.current){m.current();const S=$C(l.current);S.length&&BE(x==="start"?S:S.reverse())}},[]),y=b.useCallback(()=>{if(l.current){const x=$C(l.current);x.length&&(m.current=fpe(x))}},[]);return c.jsx(npe,{scope:n,value:a,triggerRef:d,contentRef:l,focusProxyRef:f,wasEscapeCloseRef:h,onEntryKeyDown:v,onFocusProxyEnter:v,onRootContentClose:y,onContentFocusOutside:y,children:c.jsx(Ge.li,{...i,ref:t})})});xU.displayName=yU;var DC="NavigationMenuTrigger",rpe=b.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,disabled:r,...i}=e,o=Fo(DC,e.__scopeNavigationMenu),a=bU(DC,e.__scopeNavigationMenu),l=b.useRef(null),d=ft(l,a.triggerRef,t),f=EU(o.baseId,a.value),m=jU(o.baseId,a.value),h=b.useRef(!1),v=b.useRef(!1),y=a.value===o.value;return c.jsxs(c.Fragment,{children:[c.jsx(LE.ItemSlot,{scope:n,value:a.value,children:c.jsx(kU,{asChild:!0,children:c.jsx(Ge.button,{id:f,disabled:r,"data-disabled":r?"":void 0,"data-state":HE(y),"aria-expanded":y,"aria-controls":m,...i,ref:d,onPointerEnter:Oe(e.onPointerEnter,()=>{v.current=!1,a.wasEscapeCloseRef.current=!1}),onPointerMove:Oe(e.onPointerMove,Ky(()=>{r||v.current||a.wasEscapeCloseRef.current||h.current||(o.onTriggerEnter(a.value),h.current=!0)})),onPointerLeave:Oe(e.onPointerLeave,Ky(()=>{r||(o.onTriggerLeave(),h.current=!1)})),onClick:Oe(e.onClick,()=>{o.onItemSelect(a.value),v.current=y}),onKeyDown:Oe(e.onKeyDown,x=>{const C={horizontal:"ArrowDown",vertical:o.dir==="rtl"?"ArrowLeft":"ArrowRight"}[o.orientation];y&&x.key===C&&(a.onEntryKeyDown(),x.preventDefault())})})})}),y&&c.jsxs(c.Fragment,{children:[c.jsx(fU,{"aria-hidden":!0,tabIndex:0,ref:a.focusProxyRef,onFocus:x=>{const S=a.contentRef.current,C=x.relatedTarget,k=C===l.current,E=S?.contains(C);(k||!E)&&a.onFocusProxyEnter(k?"start":"end")}}),o.viewport&&c.jsx("span",{"aria-owns":m})]})]})});rpe.displayName=DC;var ipe="NavigationMenuLink",u2="navigationMenu.linkSelect",wU=b.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,active:r,onSelect:i,...o}=e;return c.jsx(kU,{asChild:!0,children:c.jsx(Ge.a,{"data-active":r?"":void 0,"aria-current":r?"page":void 0,...o,ref:t,onClick:Oe(e.onClick,a=>{const l=a.target,d=new CustomEvent(u2,{bubbles:!0,cancelable:!0});if(l.addEventListener(u2,f=>i?.(f),{once:!0}),qy(l,d),!d.defaultPrevented&&!a.metaKey){const f=new CustomEvent(Sy,{bubbles:!0,cancelable:!0});qy(l,f)}},{checkForDefaultPrevented:!1})})})});wU.displayName=ipe;var UE="NavigationMenuIndicator",ope=b.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=Fo(UE,e.__scopeNavigationMenu),o=!!i.value;return i.indicatorTrack?fE.createPortal(c.jsx(lr,{present:n||o,children:c.jsx(ape,{...r,ref:t})}),i.indicatorTrack):null});ope.displayName=UE;var ape=b.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,i=Fo(UE,n),o=pU(n),[a,l]=b.useState(null),[d,f]=b.useState(null),m=i.orientation==="horizontal",h=!!i.value;b.useEffect(()=>{const x=o().find(S=>S.value===i.value)?.ref.current;x&&l(x)},[o,i.value]);const v=()=>{a&&f({size:m?a.offsetWidth:a.offsetHeight,offset:m?a.offsetLeft:a.offsetTop})};return PC(a,v),PC(i.indicatorTrack,v),d?c.jsx(Ge.div,{"aria-hidden":!0,"data-state":h?"visible":"hidden","data-orientation":i.orientation,...r,ref:t,style:{position:"absolute",...m?{left:0,width:d.size+"px",transform:`translateX(${d.offset}px)`}:{top:0,height:d.size+"px",transform:`translateY(${d.offset}px)`},...r.style}}):null}),Qd="NavigationMenuContent",spe=b.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=Fo(Qd,e.__scopeNavigationMenu),o=bU(Qd,e.__scopeNavigationMenu),a=ft(o.contentRef,t),l=o.value===i.value,d={value:o.value,triggerRef:o.triggerRef,focusProxyRef:o.focusProxyRef,wasEscapeCloseRef:o.wasEscapeCloseRef,onContentFocusOutside:o.onContentFocusOutside,onRootContentClose:o.onRootContentClose,...r};return i.viewport?c.jsx(lpe,{forceMount:n,...d,ref:a}):c.jsx(lr,{present:n||l,children:c.jsx(SU,{"data-state":HE(l),...d,ref:a,onPointerEnter:Oe(e.onPointerEnter,i.onContentEnter),onPointerLeave:Oe(e.onPointerLeave,Ky(i.onContentLeave)),style:{pointerEvents:!l&&i.isRootMenu?"none":void 0,...d.style}})})});spe.displayName=Qd;var lpe=b.forwardRef((e,t)=>{const n=Fo(Qd,e.__scopeNavigationMenu),{onViewportContentChange:r,onViewportContentRemove:i}=n;return ar(()=>{r(e.value,{ref:t,...e})},[e,t,r]),ar(()=>()=>i(e.value),[e.value,i]),null}),Sy="navigationMenu.rootContentDismiss",SU=b.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,triggerRef:i,focusProxyRef:o,wasEscapeCloseRef:a,onRootContentClose:l,onContentFocusOutside:d,...f}=e,m=Fo(Qd,n),h=b.useRef(null),v=ft(h,t),y=EU(m.baseId,r),x=jU(m.baseId,r),S=pU(n),C=b.useRef(null),{onItemDismiss:k}=m;b.useEffect(()=>{const j=h.current;if(m.isRootMenu&&j){const I=()=>{k(),l(),j.contains(document.activeElement)&&i.current?.focus()};return j.addEventListener(Sy,I),()=>j.removeEventListener(Sy,I)}},[m.isRootMenu,e.value,i,k,l]);const E=b.useMemo(()=>{const I=S().map(H=>H.value);m.dir==="rtl"&&I.reverse();const A=I.indexOf(m.value),T=I.indexOf(m.previousValue),N=r===m.value,D=T===I.indexOf(r);if(!N&&!D)return C.current;const L=(()=>{if(A!==T){if(N&&T!==-1)return A>T?"from-end":"from-start";if(D&&A!==-1)return A>T?"to-start":"to-end"}return null})();return C.current=L,L},[m.previousValue,m.value,m.dir,S,r]);return c.jsx(CU,{asChild:!0,children:c.jsx(Rf,{id:x,"aria-labelledby":y,"data-motion":E,"data-orientation":m.orientation,...f,ref:v,disableOutsidePointerEvents:!1,onDismiss:()=>{const j=new Event(Sy,{bubbles:!0,cancelable:!0});h.current?.dispatchEvent(j)},onFocusOutside:Oe(e.onFocusOutside,j=>{d();const I=j.target;m.rootNavigationMenu?.contains(I)&&j.preventDefault()}),onPointerDownOutside:Oe(e.onPointerDownOutside,j=>{const I=j.target,A=S().some(N=>N.ref.current?.contains(I)),T=m.isRootMenu&&m.viewport?.contains(I);(A||T||!m.isRootMenu)&&j.preventDefault()}),onKeyDown:Oe(e.onKeyDown,j=>{const I=j.altKey||j.ctrlKey||j.metaKey;if(j.key==="Tab"&&!I){const T=$C(j.currentTarget),N=document.activeElement,D=T.findIndex(ee=>ee===N),H=j.shiftKey?T.slice(0,D).reverse():T.slice(D+1,T.length);BE(H)?j.preventDefault():o.current?.focus()}}),onEscapeKeyDown:Oe(e.onEscapeKeyDown,j=>{a.current=!0})})})}),VE="NavigationMenuViewport",_U=b.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=!!Fo(VE,e.__scopeNavigationMenu).value;return c.jsx(lr,{present:n||o,children:c.jsx(cpe,{...r,ref:t})})});_U.displayName=VE;var cpe=b.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,children:r,...i}=e,o=Fo(VE,n),a=ft(t,o.onViewportChange),l=epe(Qd,e.__scopeNavigationMenu),[d,f]=b.useState(null),[m,h]=b.useState(null),v=d?d?.width+"px":void 0,y=d?d?.height+"px":void 0,x=!!o.value,S=x?o.value:o.previousValue;return PC(m,()=>{m&&f({width:m.offsetWidth,height:m.offsetHeight})}),c.jsx(Ge.div,{"data-state":HE(x),"data-orientation":o.orientation,...i,ref:a,style:{pointerEvents:!x&&o.isRootMenu?"none":void 0,"--radix-navigation-menu-viewport-width":v,"--radix-navigation-menu-viewport-height":y,...i.style},onPointerEnter:Oe(e.onPointerEnter,o.onContentEnter),onPointerLeave:Oe(e.onPointerLeave,Ky(o.onContentLeave)),children:Array.from(l.items).map(([k,{ref:E,forceMount:j,...I}])=>{const A=S===k;return c.jsx(lr,{present:j||A,children:c.jsx(SU,{...I,ref:Sf(E,T=>{A&&T&&h(T)})})},k)})})}),upe="FocusGroup",CU=b.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,i=Fo(upe,n);return c.jsx(AC.Provider,{scope:n,children:c.jsx(AC.Slot,{scope:n,children:c.jsx(Ge.div,{dir:i.dir,...r,ref:t})})})}),d2=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"],dpe="FocusGroupItem",kU=b.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,i=Wfe(n),o=Fo(dpe,n);return c.jsx(AC.ItemSlot,{scope:n,children:c.jsx(Ge.button,{...r,ref:t,onKeyDown:Oe(e.onKeyDown,a=>{if(["Home","End",...d2].includes(a.key)){let d=i().map(h=>h.ref.current);if([o.dir==="rtl"?"ArrowRight":"ArrowLeft","ArrowUp","End"].includes(a.key)&&d.reverse(),d2.includes(a.key)){const h=d.indexOf(a.currentTarget);d=d.slice(h+1)}setTimeout(()=>BE(d)),a.preventDefault()}})})})});function $C(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function BE(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}function fpe(e){return e.forEach(t=>{t.dataset.tabindex=t.getAttribute("tabindex")||"",t.setAttribute("tabindex","-1")}),()=>{e.forEach(t=>{const n=t.dataset.tabindex;t.setAttribute("tabindex",n)})}}function PC(e,t){const n=An(t);ar(()=>{let r=0;if(e){const i=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return i.observe(e),()=>{window.cancelAnimationFrame(r),i.unobserve(e)}}},[e,n])}function HE(e){return e?"open":"closed"}function EU(e,t){return`${e}-trigger-${t}`}function jU(e,t){return`${e}-content-${t}`}function Ky(e){return t=>t.pointerType==="mouse"?e(t):void 0}var ppe=mU,mpe=vU,hpe=xU,gpe=wU,vpe=_U;function ype({className:e,...t}){return c.jsx("div",{className:Ve("absolute top-full left-0 isolate z-50 flex justify-center"),children:c.jsx(vpe,{"data-slot":"navigation-menu-viewport",className:Ve("origin-top-center bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border shadow md:w-[var(--radix-navigation-menu-viewport-width)]",e),...t})})}function RU({className:e,children:t,viewport:n=!0,...r}){return c.jsxs(ppe,{"data-slot":"navigation-menu","data-viewport":n,className:Ve("group/navigation-menu relative flex max-w-max flex-1 items-center justify-center",e),...r,children:[t,n&&c.jsx(ype,{})]})}function MC({className:e,...t}){return c.jsx(hpe,{"data-slot":"navigation-menu-item",className:Ve("relative",e),...t})}function zC({className:e,...t}){return c.jsx(gpe,{"data-slot":"navigation-menu-link",className:Ve("hover:text-white ring-ring/10 dark:ring-ring/20 dark:outline-ring/40 outline-ring/50 flex flex-col gap-1 rounded-sm p-2 text-sm transition-[color,box-shadow] focus-visible:ring-4 focus-visible:outline-1 [&_svg:not([class*='size-'])]:size-4",e),...t})}function IU({className:e,...t}){return c.jsx(mpe,{"data-slot":"navigation-menu-list",className:Ve("group flex flex-1 list-none items-center justify-center gap-1",e),...t})}const TU=Hb("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-auto",{variants:{variant:{default:"border-primary bg-primary/40 text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-secondary bg-secondary/40 text-secondary-foreground [a&]:hover:bg-secondary/90",warning:"border-yellow bg-yellow/40 text-white [a&]:hover:bg-yellow/90",success:"border-green bg-green/40 text-white [a&]:hover:bg-green/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40",outline:"text-white [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function qE(){return c.jsx("a",{href:"https://github.com/HarperFast/studio/releases",target:"_blank",rel:"noopener noreferrer",children:c.jsxs("span",{className:Ve(TU({variant:"default"}),"text-xs inline-block ml-2 align-text-top"),children:["v4.7.20"," BETA"]})})}function dh(e,t,n){const{instanceId:r,clusterId:i}=nt({strict:!1});return ls({id:Mn,operationsUrl:e,port:t,secure:n})}function hx(e,t,n){const{instanceId:r,clusterId:i}=nt({strict:!1});return{instanceClient:ls({id:Mn,operationsUrl:e,port:t,secure:n}),entityType:"instance"}}function Ut(e,t,n){const r=nt({strict:!1});return b.useMemo(()=>NU({...r,operationsUrl:e,port:t,secure:n}),[r,e,t,n])}function NU({instanceId:e,clusterId:t,operationsUrl:n,port:r,secure:i}){const o=Mn;return{instanceClient:ls({id:o,operationsUrl:n,port:r,secure:i}),entityId:o,entityType:"instance"}}function bpe(){localStorage.clear()}function xpe(){sessionStorage.clear()}async function wpe(){Ct.setUserForEntity(Mn,null),Nc.getQueryCache().clear(),bpe(),xpe(),await Nc.invalidateQueries({refetchType:"none"})}async function Spe(e){await Ct.signOutFromPotentiallyAuthenticatedInstances(),await rh({...e,entityId:Mn})}function _pe(){const e=dh();return ot({mutationFn:()=>Spe({instanceClient:e}),onSuccess:wpe})}function gx(e){const{user:t}=Al(),{organizationId:n}=nt({strict:!1}),r=t?.roles?.[e??n];return!r?.permission&&!r?.organization?{update:!1,remove:!1}:r.permission?.super_user?{update:!0,remove:!0}:{update:r.organization.update,remove:r.organization.delete}}function uu(e){const{user:t}=Al(),{organizationId:n}=nt({strict:!1}),r=t?.roles?.[e??n];if(!r?.permission&&!r?.organization?.roles)return{create:!1,remove:!1,update:!1,view:!1};if(r.permission?.super_user)return{create:!0,remove:!0,update:!0,view:!0};const i=r.organization.roles;return{create:i.create,remove:i.delete,update:i.update,view:i.view}}function vx(e,t){const{user:n}=Al(),{organizationId:r,clusterId:i}=nt({strict:!1});return AU(n,e??r,t??i)}function AU(e,t,n){const r=e?.roles?.[t];if(!r?.permission&&!r?.organization?.clusters)return{create:!1,remove:!1,update:!1,view:!1};if(r.permission?.super_user)return{create:!0,remove:!0,update:!0,view:!0};const i=r.organization.clusters.resources?.find(a=>a.id===n),o=r.organization.clusters;return{create:o.create,remove:i?i.delete:o.delete,update:i?i.update:o.update,view:i?i.view:o.view}}function Cpe(e,t){const{user:n}=Al(),{organizationId:r,clusterId:i}=nt({strict:!1});return OU(n,r,i)}function OU(e,t,n){const r=e?.roles?.[t];if(!r?.permission&&!r?.organization?.clusters)return{create:!1,remove:!1,update:!1,view:!1};if(r.permission?.super_user)return{create:!0,remove:!0,update:!0,view:!0};const i=r.organization.clusters.resources?.find(a=>a.id===n)?.instances,o=r.organization.clusters;return{create:i?i.create:o.create,remove:i?i.delete:o.delete,update:i?i.update:o.update,view:i?i.view:o.view}}function DU(e){const{clusterId:t,instanceId:n}=nt({strict:!1}),{user:r}=_s(),i=r?.role?.permission;return i?i.super_user===!0:!1}function If(e){const{clusterId:t,instanceId:n}=nt({strict:!1}),{user:r}=_s(),i=r?.role?.permission;return i?i.super_user===!0||i.structure_user===!0:!1}function X_(e,t,n,r){const{clusterId:i,instanceId:o}=nt({strict:!1}),{user:a}=_s(),l=a?.role?.permission;return l?l.super_user===!0||l.structure_user===!0?!0:l[t]?.tables?.[n][r]===!0:!1}const KE={className:"text-white"};function $U(){const{mutate:e}=_pe(),t=Cn(),{user:n}=tu(),r=_n(),{organizationId:i}=nt({strict:!1}),{update:o}=gx(i),{view:a}=uu(i),l=o,d=b.useCallback(()=>{e(void 0,{onSuccess:async()=>{ye.success("Success",{description:"You have been signed out successfully.",action:{label:"Dismiss",onClick:()=>ye.dismiss()}}),t({to:"/sign-in"}),r.invalidate()}})},[e,r,t]),f=b.useMemo(()=>[!ml,!ml,!ml,{to:"https://docs.harperdb.io/docs",target:"_blank",icon:c.jsx(z4,{}),text:"Docs",textBreakpoint:"md"},{to:"https://github.com/HarperFast/studio/issues",target:"_blank",icon:c.jsx(hte,{}),text:"Report an Issue",textBreakpoint:"lg"},{to:"https://discord.gg/VzZuaw3Xay",target:"_blank",icon:c.jsx(Sfe,{}),text:"Discord",textBreakpoint:"lg"},{onClick:d,icon:c.jsx(bne,{}),text:"Sign Out",textBreakpoint:"md"}].filter(Lo),[i,l,a,d]);return n?c.jsxs(c.Fragment,{children:[c.jsx(jpe,{menuItems:f}),c.jsx(Epe,{menuItems:f})]}):c.jsx(kpe,{})}function PU(e){return e.items!==void 0}function kpe(){return c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"inline-block",children:[c.jsx(Ye,{to:"/sign-in",children:c.jsx(zE,{})}),c.jsx(qE,{})]}),c.jsx(RU,{children:c.jsxs(IU,{className:"text-grey-400",children:[c.jsx(MC,{children:c.jsx(zC,{asChild:!0,children:c.jsxs(Ye,{to:"https://docs.harperdb.io/docs",target:"_blank",rel:"noreferrer noopener",className:"flex-row items-center",children:[c.jsx(z4,{})," ",c.jsx("span",{className:"hidden md:inline-block",children:"Docs"})]})})}),c.jsx(MC,{children:c.jsx(zC,{asChild:!0,children:c.jsxs(Ye,{to:"/sign-in",className:"flex-row items-center",activeProps:KE,children:[c.jsx(vne,{})," Sign In"]})})})]})})]})}function Epe({menuItems:e}){const{user:t}=tu();return ru(t),c.jsx("div",{className:"hidden md:block",children:c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"inline-block",children:[c.jsx(Ye,{to:Ea,children:c.jsx(zE,{})}),c.jsx(qE,{})]}),c.jsx(RU,{children:c.jsx(IU,{className:"text-grey-400",children:e.map(n=>PU(n)?!!n.items.length&&c.jsx("div",{className:"bg-black rounded-2xl flex",children:n.items.map(r=>c.jsx(f2,{menuItem:r},r.text))},n.text):c.jsx(f2,{menuItem:n},n.text))})})]})})}function f2({menuItem:e}){return c.jsx(MC,{className:"text-gray-400 hover:text-white",children:c.jsx(zC,{asChild:!0,children:c.jsxs(Ye,{to:e.to,onClick:e.onClick,className:"flex-row items-center",target:e.target,activeProps:e.to?KE:void 0,children:[e.icon,c.jsx("span",{className:`hidden ${e.textBreakpoint}:inline-block`,children:e.text}),c.jsx("span",{className:`${e.textBreakpoint}:hidden`,children:" "})]})})})}function jpe({menuItems:e}){const{user:t}=tu();ru(t);const[n,r]=b.useState(!1),i=b.useCallback(()=>r(a=>!a),[]),o=b.useCallback(()=>r(!1),[]);return c.jsxs("div",{className:"md:hidden",id:"mobile-menu",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx(Ye,{to:Ea,children:c.jsx(zE,{})}),c.jsx(qE,{}),c.jsxs("button",{type:"button",className:"shadow-xs text-grey-400 hover:text-white hover:bg-black-dark",onClick:i,children:[c.jsx("span",{className:"sr-only",children:n?"Close menu":"Open menu"}),n?c.jsx(Q4,{}):c.jsx(G4,{})]})]}),c.jsx("div",{className:`${n?"fixed":"hidden"} top-40 bottom-0 left-0 right-0 bg-black-dark opacity-70`,onClick:o}),c.jsx("div",{className:`${n?"block":"hidden"} md:hidden z-50 space-y-1 pb-3 bg-black-dark absolute left-0 top-full w-full rounded-b-md`,children:e.map(a=>PU(a)?!!a.items.length&&c.jsx("div",{className:"bg-black pl-10 pr-2 py-2",children:a.items.map(l=>c.jsx(p2,{menuItem:l,onClick:o},l.text))},a.text):c.jsx(p2,{menuItem:a,onClick:o},a.text))})]})}function p2({menuItem:e,onClick:t}){const n=b.useCallback(()=>{e.onClick?.(),t()},[e,t]);return c.jsxs(Ye,{to:e.to,onClick:n,target:e.target,className:"flex flex-row px-3 py-2 text-base font-medium rounded-md text-gray-400 hover:text-white",activeProps:e.to?KE:void 0,children:[e.icon,c.jsx("span",{className:"ml-4",children:e.text})]})}function Rpe(){return c.jsxs(c.Fragment,{children:[c.jsx("header",{className:"fixed top-0 z-40 w-full h-20 p-4 bg-black-dark dark:bg-black-dark dark:border-b dark:border-black md:px-12",children:c.jsx($U,{})}),c.jsxs("div",{className:"pt-20 grid h-screen grid-cols-1 md:grid-cols-2",children:[c.jsx("section",{className:"items-center justify-center hidden text-white md:flex px-6 fabricSignupTextContainer",children:c.jsx("img",{className:"object-scale-down max-h-[calc(100vh-80px-40px)] min-h-115",src:"/fabric-signup-text.png",alt:"One Runtime: App, database, Cache and Messaging. Distributed by design, free to deploy, and live in minutes. Deploy!"})}),c.jsx("section",{className:"flex items-center justify-center px-6 bg-linear-(--purple-gradient) dark:bg-linear-(--black-dark-gradient)",children:c.jsx(Nl,{})})]})]})}function Ipe(){b.useEffect(()=>{},[])}const Tpe=["gmail.com","yahoo.com","hotmail.com","outlook.com","icloud.com","aol.com","protonmail.com","mail.com","zoho.com","yandex.com","gmx.com","live.com","msn.com","me.com","inbox.com"];function GE(e){if(!e||!e.includes("@"))return null;const t=e.split("@").pop()||"";if(!t)return null;for(const n of Tpe)if(t===n||t.endsWith("."+n))return null;return t}let J_=null;function Npe(){const e=Cn(),t=_n(),n=sr(),{redirect:r}=Nr({strict:!1});return b.useEffect(()=>{J_||(J_=(async function(){const i=await Qz().catch(()=>null);if(!i)ye.error("We were not able to verify your sign-in. Please try signing in again.",{duration:1e4}),await e({to:"/sign-in"});else{Ct.setUserForEntity(Mn,i);const o=ru(i);GE(i.email),await n.invalidateQueries({queryKey:zb,refetchType:"none"}),await t.invalidate(),await e({to:r?.startsWith("/")?r:o})}J_=null})())},[]),c.jsxs("div",{className:"text-white w-lg flex flex-col gap-4",children:[c.jsxs("h1",{className:"text-3xl font-light",children:[c.jsx("span",{"aria-hidden":"true",className:"text-2xl animate-flower-dance mr-4",title:"Loading",children:"🌼"}),"Checking..."]}),c.jsx("div",{className:"underline flex gap-4",children:c.jsx(Ye,{className:"text-sm opacity-50 hover:text-blue-300",to:"/sign-in",children:"Try signing in again"})})]})}const Ape=["top","right","bottom","left"],Cl=Math.min,Hi=Math.max,Gy=Math.round,Mv=Math.floor,ka=e=>({x:e,y:e}),Ope={left:"right",right:"left",bottom:"top",top:"bottom"},Dpe={start:"end",end:"start"};function LC(e,t,n){return Hi(e,Cl(t,n))}function ys(e,t){return typeof e=="function"?e(t):e}function bs(e){return e.split("-")[0]}function Tf(e){return e.split("-")[1]}function ZE(e){return e==="x"?"y":"x"}function YE(e){return e==="y"?"height":"width"}const $pe=new Set(["top","bottom"]);function xa(e){return $pe.has(bs(e))?"y":"x"}function WE(e){return ZE(xa(e))}function Ppe(e,t,n){n===void 0&&(n=!1);const r=Tf(e),i=WE(e),o=YE(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=Zy(a)),[a,Zy(a)]}function Mpe(e){const t=Zy(e);return[FC(e),t,FC(t)]}function FC(e){return e.replace(/start|end/g,t=>Dpe[t])}const m2=["left","right"],h2=["right","left"],zpe=["top","bottom"],Lpe=["bottom","top"];function Fpe(e,t,n){switch(e){case"top":case"bottom":return n?t?h2:m2:t?m2:h2;case"left":case"right":return t?zpe:Lpe;default:return[]}}function Upe(e,t,n,r){const i=Tf(e);let o=Fpe(bs(e),n==="start",r);return i&&(o=o.map(a=>a+"-"+i),t&&(o=o.concat(o.map(FC)))),o}function Zy(e){return e.replace(/left|right|bottom|top/g,t=>Ope[t])}function Vpe(e){return{top:0,right:0,bottom:0,left:0,...e}}function MU(e){return typeof e!="number"?Vpe(e):{top:e,right:e,bottom:e,left:e}}function Yy(e){const{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 g2(e,t,n){let{reference:r,floating:i}=e;const o=xa(t),a=WE(t),l=YE(a),d=bs(t),f=o==="y",m=r.x+r.width/2-i.width/2,h=r.y+r.height/2-i.height/2,v=r[l]/2-i[l]/2;let y;switch(d){case"top":y={x:m,y:r.y-i.height};break;case"bottom":y={x:m,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:h};break;case"left":y={x:r.x-i.width,y:h};break;default:y={x:r.x,y:r.y}}switch(Tf(t)){case"start":y[a]-=v*(n&&f?-1:1);break;case"end":y[a]+=v*(n&&f?-1:1);break}return y}const Bpe=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,l=o.filter(Boolean),d=await(a.isRTL==null?void 0:a.isRTL(t));let f=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:m,y:h}=g2(f,r,d),v=r,y={},x=0;for(let S=0;S<l.length;S++){const{name:C,fn:k}=l[S],{x:E,y:j,data:I,reset:A}=await k({x:m,y:h,initialPlacement:r,placement:v,strategy:i,middlewareData:y,rects:f,platform:a,elements:{reference:e,floating:t}});m=E??m,h=j??h,y={...y,[C]:{...y[C],...I}},A&&x<=50&&(x++,typeof A=="object"&&(A.placement&&(v=A.placement),A.rects&&(f=A.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):A.rects),{x:m,y:h}=g2(f,v,d)),S=-1)}return{x:m,y:h,placement:v,strategy:i,middlewareData:y}};async function Om(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:o,rects:a,elements:l,strategy:d}=e,{boundary:f="clippingAncestors",rootBoundary:m="viewport",elementContext:h="floating",altBoundary:v=!1,padding:y=0}=ys(t,e),x=MU(y),C=l[v?h==="floating"?"reference":"floating":h],k=Yy(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(C)))==null||n?C:C.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(l.floating)),boundary:f,rootBoundary:m,strategy:d})),E=h==="floating"?{x:r,y:i,width:a.floating.width,height:a.floating.height}:a.reference,j=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l.floating)),I=await(o.isElement==null?void 0:o.isElement(j))?await(o.getScale==null?void 0:o.getScale(j))||{x:1,y:1}:{x:1,y:1},A=Yy(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:E,offsetParent:j,strategy:d}):E);return{top:(k.top-A.top+x.top)/I.y,bottom:(A.bottom-k.bottom+x.bottom)/I.y,left:(k.left-A.left+x.left)/I.x,right:(A.right-k.right+x.right)/I.x}}const Hpe=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:o,platform:a,elements:l,middlewareData:d}=t,{element:f,padding:m=0}=ys(e,t)||{};if(f==null)return{};const h=MU(m),v={x:n,y:r},y=WE(i),x=YE(y),S=await a.getDimensions(f),C=y==="y",k=C?"top":"left",E=C?"bottom":"right",j=C?"clientHeight":"clientWidth",I=o.reference[x]+o.reference[y]-v[y]-o.floating[x],A=v[y]-o.reference[y],T=await(a.getOffsetParent==null?void 0:a.getOffsetParent(f));let N=T?T[j]:0;(!N||!await(a.isElement==null?void 0:a.isElement(T)))&&(N=l.floating[j]||o.floating[x]);const D=I/2-A/2,L=N/2-S[x]/2-1,H=Cl(h[k],L),ee=Cl(h[E],L),G=H,K=N-S[x]-ee,B=N/2-S[x]/2+D,q=LC(G,B,K),z=!d.arrow&&Tf(i)!=null&&B!==q&&o.reference[x]/2-(B<G?H:ee)-S[x]/2<0,W=z?B<G?B-G:B-K:0;return{[y]:v[y]+W,data:{[y]:q,centerOffset:B-q-W,...z&&{alignmentOffset:W}},reset:z}}}),qpe=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:o,rects:a,initialPlacement:l,platform:d,elements:f}=t,{mainAxis:m=!0,crossAxis:h=!0,fallbackPlacements:v,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:S=!0,...C}=ys(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const k=bs(i),E=xa(l),j=bs(l)===l,I=await(d.isRTL==null?void 0:d.isRTL(f.floating)),A=v||(j||!S?[Zy(l)]:Mpe(l)),T=x!=="none";!v&&T&&A.push(...Upe(l,S,x,I));const N=[l,...A],D=await Om(t,C),L=[];let H=((r=o.flip)==null?void 0:r.overflows)||[];if(m&&L.push(D[k]),h){const B=Ppe(i,a,I);L.push(D[B[0]],D[B[1]])}if(H=[...H,{placement:i,overflows:L}],!L.every(B=>B<=0)){var ee,G;const B=(((ee=o.flip)==null?void 0:ee.index)||0)+1,q=N[B];if(q&&(!(h==="alignment"?E!==xa(q):!1)||H.every(F=>xa(F.placement)===E?F.overflows[0]>0:!0)))return{data:{index:B,overflows:H},reset:{placement:q}};let z=(G=H.filter(W=>W.overflows[0]<=0).sort((W,F)=>W.overflows[1]-F.overflows[1])[0])==null?void 0:G.placement;if(!z)switch(y){case"bestFit":{var K;const W=(K=H.filter(F=>{if(T){const ne=xa(F.placement);return ne===E||ne==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(ne=>ne>0).reduce((ne,$)=>ne+$,0)]).sort((F,ne)=>F[1]-ne[1])[0])==null?void 0:K[0];W&&(z=W);break}case"initialPlacement":z=l;break}if(i!==z)return{reset:{placement:z}}}return{}}}};function v2(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function y2(e){return Ape.some(t=>e[t]>=0)}const Kpe=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=ys(e,t);switch(r){case"referenceHidden":{const o=await Om(t,{...i,elementContext:"reference"}),a=v2(o,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:y2(a)}}}case"escaped":{const o=await Om(t,{...i,altBoundary:!0}),a=v2(o,n.floating);return{data:{escapedOffsets:a,escaped:y2(a)}}}default:return{}}}}},zU=new Set(["left","top"]);async function Gpe(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=bs(n),l=Tf(n),d=xa(n)==="y",f=zU.has(a)?-1:1,m=o&&d?-1:1,h=ys(t,e);let{mainAxis:v,crossAxis:y,alignmentAxis:x}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return l&&typeof x=="number"&&(y=l==="end"?x*-1:x),d?{x:y*m,y:v*f}:{x:v*f,y:y*m}}const Zpe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:a,middlewareData:l}=t,d=await Gpe(t,e);return a===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:i+d.x,y:o+d.y,data:{...d,placement:a}}}}},Ype=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:l={fn:C=>{let{x:k,y:E}=C;return{x:k,y:E}}},...d}=ys(e,t),f={x:n,y:r},m=await Om(t,d),h=xa(bs(i)),v=ZE(h);let y=f[v],x=f[h];if(o){const C=v==="y"?"top":"left",k=v==="y"?"bottom":"right",E=y+m[C],j=y-m[k];y=LC(E,y,j)}if(a){const C=h==="y"?"top":"left",k=h==="y"?"bottom":"right",E=x+m[C],j=x-m[k];x=LC(E,x,j)}const S=l.fn({...t,[v]:y,[h]:x});return{...S,data:{x:S.x-n,y:S.y-r,enabled:{[v]:o,[h]:a}}}}}},Wpe=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:a}=t,{offset:l=0,mainAxis:d=!0,crossAxis:f=!0}=ys(e,t),m={x:n,y:r},h=xa(i),v=ZE(h);let y=m[v],x=m[h];const S=ys(l,t),C=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(d){const j=v==="y"?"height":"width",I=o.reference[v]-o.floating[j]+C.mainAxis,A=o.reference[v]+o.reference[j]-C.mainAxis;y<I?y=I:y>A&&(y=A)}if(f){var k,E;const j=v==="y"?"width":"height",I=zU.has(bs(i)),A=o.reference[h]-o.floating[j]+(I&&((k=a.offset)==null?void 0:k[h])||0)+(I?0:C.crossAxis),T=o.reference[h]+o.reference[j]+(I?0:((E=a.offset)==null?void 0:E[h])||0)-(I?C.crossAxis:0);x<A?x=A:x>T&&(x=T)}return{[v]:y,[h]:x}}}},Xpe=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:o,platform:a,elements:l}=t,{apply:d=()=>{},...f}=ys(e,t),m=await Om(t,f),h=bs(i),v=Tf(i),y=xa(i)==="y",{width:x,height:S}=o.floating;let C,k;h==="top"||h==="bottom"?(C=h,k=v===(await(a.isRTL==null?void 0:a.isRTL(l.floating))?"start":"end")?"left":"right"):(k=h,C=v==="end"?"top":"bottom");const E=S-m.top-m.bottom,j=x-m.left-m.right,I=Cl(S-m[C],E),A=Cl(x-m[k],j),T=!t.middlewareData.shift;let N=I,D=A;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(D=j),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(N=E),T&&!v){const H=Hi(m.left,0),ee=Hi(m.right,0),G=Hi(m.top,0),K=Hi(m.bottom,0);y?D=x-2*(H!==0||ee!==0?H+ee:Hi(m.left,m.right)):N=S-2*(G!==0||K!==0?G+K:Hi(m.top,m.bottom))}await d({...t,availableWidth:D,availableHeight:N});const L=await a.getDimensions(l.floating);return x!==L.width||S!==L.height?{reset:{rects:!0}}:{}}}};function yx(){return typeof window<"u"}function Nf(e){return LU(e)?(e.nodeName||"").toLowerCase():"#document"}function Yi(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Na(e){var t;return(t=(LU(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function LU(e){return yx()?e instanceof Node||e instanceof Yi(e).Node:!1}function ta(e){return yx()?e instanceof Element||e instanceof Yi(e).Element:!1}function Ra(e){return yx()?e instanceof HTMLElement||e instanceof Yi(e).HTMLElement:!1}function b2(e){return!yx()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Yi(e).ShadowRoot}const Jpe=new Set(["inline","contents"]);function fh(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=na(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Jpe.has(i)}const Qpe=new Set(["table","td","th"]);function eme(e){return Qpe.has(Nf(e))}const tme=[":popover-open",":modal"];function bx(e){return tme.some(t=>{try{return e.matches(t)}catch{return!1}})}const nme=["transform","translate","scale","rotate","perspective"],rme=["transform","translate","scale","rotate","perspective","filter"],ime=["paint","layout","strict","content"];function XE(e){const t=JE(),n=ta(e)?na(e):e;return nme.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||rme.some(r=>(n.willChange||"").includes(r))||ime.some(r=>(n.contain||"").includes(r))}function ome(e){let t=kl(e);for(;Ra(t)&&!ef(t);){if(XE(t))return t;if(bx(t))return null;t=kl(t)}return null}function JE(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const ame=new Set(["html","body","#document"]);function ef(e){return ame.has(Nf(e))}function na(e){return Yi(e).getComputedStyle(e)}function xx(e){return ta(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function kl(e){if(Nf(e)==="html")return e;const t=e.assignedSlot||e.parentNode||b2(e)&&e.host||Na(e);return b2(t)?t.host:t}function FU(e){const t=kl(e);return ef(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ra(t)&&fh(t)?t:FU(t)}function Dm(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=FU(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),a=Yi(i);if(o){const l=UC(a);return t.concat(a,a.visualViewport||[],fh(i)?i:[],l&&n?Dm(l):[])}return t.concat(i,Dm(i,[],n))}function UC(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function UU(e){const t=na(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Ra(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,l=Gy(n)!==o||Gy(r)!==a;return l&&(n=o,r=a),{width:n,height:r,$:l}}function QE(e){return ta(e)?e:e.contextElement}function Pd(e){const t=QE(e);if(!Ra(t))return ka(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=UU(t);let a=(o?Gy(n.width):n.width)/r,l=(o?Gy(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!l||!Number.isFinite(l))&&(l=1),{x:a,y:l}}const sme=ka(0);function VU(e){const t=Yi(e);return!JE()||!t.visualViewport?sme:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function lme(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Yi(e)?!1:t}function Bc(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=QE(e);let a=ka(1);t&&(r?ta(r)&&(a=Pd(r)):a=Pd(e));const l=lme(o,n,r)?VU(o):ka(0);let d=(i.left+l.x)/a.x,f=(i.top+l.y)/a.y,m=i.width/a.x,h=i.height/a.y;if(o){const v=Yi(o),y=r&&ta(r)?Yi(r):r;let x=v,S=UC(x);for(;S&&r&&y!==x;){const C=Pd(S),k=S.getBoundingClientRect(),E=na(S),j=k.left+(S.clientLeft+parseFloat(E.paddingLeft))*C.x,I=k.top+(S.clientTop+parseFloat(E.paddingTop))*C.y;d*=C.x,f*=C.y,m*=C.x,h*=C.y,d+=j,f+=I,x=Yi(S),S=UC(x)}}return Yy({width:m,height:h,x:d,y:f})}function wx(e,t){const n=xx(e).scrollLeft;return t?t.left+n:Bc(Na(e)).left+n}function BU(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-wx(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function cme(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",a=Na(r),l=t?bx(t.floating):!1;if(r===a||l&&o)return n;let d={scrollLeft:0,scrollTop:0},f=ka(1);const m=ka(0),h=Ra(r);if((h||!h&&!o)&&((Nf(r)!=="body"||fh(a))&&(d=xx(r)),Ra(r))){const y=Bc(r);f=Pd(r),m.x=y.x+r.clientLeft,m.y=y.y+r.clientTop}const v=a&&!h&&!o?BU(a,d):ka(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-d.scrollLeft*f.x+m.x+v.x,y:n.y*f.y-d.scrollTop*f.y+m.y+v.y}}function ume(e){return Array.from(e.getClientRects())}function dme(e){const t=Na(e),n=xx(e),r=e.ownerDocument.body,i=Hi(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Hi(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+wx(e);const l=-n.scrollTop;return na(r).direction==="rtl"&&(a+=Hi(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:a,y:l}}const x2=25;function fme(e,t){const n=Yi(e),r=Na(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,l=0,d=0;if(i){o=i.width,a=i.height;const m=JE();(!m||m&&t==="fixed")&&(l=i.offsetLeft,d=i.offsetTop)}const f=wx(r);if(f<=0){const m=r.ownerDocument,h=m.body,v=getComputedStyle(h),y=m.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,x=Math.abs(r.clientWidth-h.clientWidth-y);x<=x2&&(o-=x)}else f<=x2&&(o+=f);return{width:o,height:a,x:l,y:d}}const pme=new Set(["absolute","fixed"]);function mme(e,t){const n=Bc(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=Ra(e)?Pd(e):ka(1),a=e.clientWidth*o.x,l=e.clientHeight*o.y,d=i*o.x,f=r*o.y;return{width:a,height:l,x:d,y:f}}function w2(e,t,n){let r;if(t==="viewport")r=fme(e,n);else if(t==="document")r=dme(Na(e));else if(ta(t))r=mme(t,n);else{const i=VU(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Yy(r)}function HU(e,t){const n=kl(e);return n===t||!ta(n)||ef(n)?!1:na(n).position==="fixed"||HU(n,t)}function hme(e,t){const n=t.get(e);if(n)return n;let r=Dm(e,[],!1).filter(l=>ta(l)&&Nf(l)!=="body"),i=null;const o=na(e).position==="fixed";let a=o?kl(e):e;for(;ta(a)&&!ef(a);){const l=na(a),d=XE(a);!d&&l.position==="fixed"&&(i=null),(o?!d&&!i:!d&&l.position==="static"&&!!i&&pme.has(i.position)||fh(a)&&!d&&HU(e,a))?r=r.filter(m=>m!==a):i=l,a=kl(a)}return t.set(e,r),r}function gme(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?bx(t)?[]:hme(t,this._c):[].concat(n),r],l=a[0],d=a.reduce((f,m)=>{const h=w2(t,m,i);return f.top=Hi(h.top,f.top),f.right=Cl(h.right,f.right),f.bottom=Cl(h.bottom,f.bottom),f.left=Hi(h.left,f.left),f},w2(t,l,i));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function vme(e){const{width:t,height:n}=UU(e);return{width:t,height:n}}function yme(e,t,n){const r=Ra(t),i=Na(t),o=n==="fixed",a=Bc(e,!0,o,t);let l={scrollLeft:0,scrollTop:0};const d=ka(0);function f(){d.x=wx(i)}if(r||!r&&!o)if((Nf(t)!=="body"||fh(i))&&(l=xx(t)),r){const y=Bc(t,!0,o,t);d.x=y.x+t.clientLeft,d.y=y.y+t.clientTop}else i&&f();o&&!r&&i&&f();const m=i&&!r&&!o?BU(i,l):ka(0),h=a.left+l.scrollLeft-d.x-m.x,v=a.top+l.scrollTop-d.y-m.y;return{x:h,y:v,width:a.width,height:a.height}}function Q_(e){return na(e).position==="static"}function S2(e,t){if(!Ra(e)||na(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Na(e)===n&&(n=n.ownerDocument.body),n}function qU(e,t){const n=Yi(e);if(bx(e))return n;if(!Ra(e)){let i=kl(e);for(;i&&!ef(i);){if(ta(i)&&!Q_(i))return i;i=kl(i)}return n}let r=S2(e,t);for(;r&&eme(r)&&Q_(r);)r=S2(r,t);return r&&ef(r)&&Q_(r)&&!XE(r)?n:r||ome(e)||n}const bme=async function(e){const t=this.getOffsetParent||qU,n=this.getDimensions,r=await n(e.floating);return{reference:yme(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function xme(e){return na(e).direction==="rtl"}const wme={convertOffsetParentRelativeRectToViewportRelativeRect:cme,getDocumentElement:Na,getClippingRect:gme,getOffsetParent:qU,getElementRects:bme,getClientRects:ume,getDimensions:vme,getScale:Pd,isElement:ta,isRTL:xme};function KU(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Sme(e,t){let n=null,r;const i=Na(e);function o(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function a(l,d){l===void 0&&(l=!1),d===void 0&&(d=1),o();const f=e.getBoundingClientRect(),{left:m,top:h,width:v,height:y}=f;if(l||t(),!v||!y)return;const x=Mv(h),S=Mv(i.clientWidth-(m+v)),C=Mv(i.clientHeight-(h+y)),k=Mv(m),j={rootMargin:-x+"px "+-S+"px "+-C+"px "+-k+"px",threshold:Hi(0,Cl(1,d))||1};let I=!0;function A(T){const N=T[0].intersectionRatio;if(N!==d){if(!I)return a();N?a(!1,N):r=setTimeout(()=>{a(!1,1e-7)},1e3)}N===1&&!KU(f,e.getBoundingClientRect())&&a(),I=!1}try{n=new IntersectionObserver(A,{...j,root:i.ownerDocument})}catch{n=new IntersectionObserver(A,j)}n.observe(e)}return a(!0),o}function _me(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,f=QE(e),m=i||o?[...f?Dm(f):[],...Dm(t)]:[];m.forEach(k=>{i&&k.addEventListener("scroll",n,{passive:!0}),o&&k.addEventListener("resize",n)});const h=f&&l?Sme(f,n):null;let v=-1,y=null;a&&(y=new ResizeObserver(k=>{let[E]=k;E&&E.target===f&&y&&(y.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var j;(j=y)==null||j.observe(t)})),n()}),f&&!d&&y.observe(f),y.observe(t));let x,S=d?Bc(e):null;d&&C();function C(){const k=Bc(e);S&&!KU(S,k)&&n(),S=k,x=requestAnimationFrame(C)}return n(),()=>{var k;m.forEach(E=>{i&&E.removeEventListener("scroll",n),o&&E.removeEventListener("resize",n)}),h?.(),(k=y)==null||k.disconnect(),y=null,d&&cancelAnimationFrame(x)}}const Cme=Zpe,kme=Ype,Eme=qpe,jme=Xpe,Rme=Kpe,_2=Hpe,Ime=Wpe,Tme=(e,t,n)=>{const r=new Map,i={platform:wme,...n},o={...i.platform,_c:r};return Bpe(e,t,{...i,platform:o})};var Nme=typeof document<"u",Ame=function(){},_y=Nme?b.useLayoutEffect:Ame;function Wy(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Wy(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!Wy(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function GU(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function C2(e,t){const n=GU(e);return Math.round(t*n)/n}function e1(e){const t=b.useRef(e);return _y(()=>{t.current=e}),t}function Ome(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:a}={},transform:l=!0,whileElementsMounted:d,open:f}=e,[m,h]=b.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[v,y]=b.useState(r);Wy(v,r)||y(r);const[x,S]=b.useState(null),[C,k]=b.useState(null),E=b.useCallback(F=>{F!==T.current&&(T.current=F,S(F))},[]),j=b.useCallback(F=>{F!==N.current&&(N.current=F,k(F))},[]),I=o||x,A=a||C,T=b.useRef(null),N=b.useRef(null),D=b.useRef(m),L=d!=null,H=e1(d),ee=e1(i),G=e1(f),K=b.useCallback(()=>{if(!T.current||!N.current)return;const F={placement:t,strategy:n,middleware:v};ee.current&&(F.platform=ee.current),Tme(T.current,N.current,F).then(ne=>{const $={...ne,isPositioned:G.current!==!1};B.current&&!Wy(D.current,$)&&(D.current=$,bf.flushSync(()=>{h($)}))})},[v,t,n,ee,G]);_y(()=>{f===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,h(F=>({...F,isPositioned:!1})))},[f]);const B=b.useRef(!1);_y(()=>(B.current=!0,()=>{B.current=!1}),[]),_y(()=>{if(I&&(T.current=I),A&&(N.current=A),I&&A){if(H.current)return H.current(I,A,K);K()}},[I,A,K,H,L]);const q=b.useMemo(()=>({reference:T,floating:N,setReference:E,setFloating:j}),[E,j]),z=b.useMemo(()=>({reference:I,floating:A}),[I,A]),W=b.useMemo(()=>{const F={position:n,left:0,top:0};if(!z.floating)return F;const ne=C2(z.floating,m.x),$=C2(z.floating,m.y);return l?{...F,transform:"translate("+ne+"px, "+$+"px)",...GU(z.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:ne,top:$}},[n,l,z.floating,m.x,m.y]);return b.useMemo(()=>({...m,update:K,refs:q,elements:z,floatingStyles:W}),[m,K,q,z,W])}const Dme=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?_2({element:r.current,padding:i}).fn(n):{}:r?_2({element:r,padding:i}).fn(n):{}}}},$me=(e,t)=>({...Cme(e),options:[e,t]}),Pme=(e,t)=>({...kme(e),options:[e,t]}),Mme=(e,t)=>({...Ime(e),options:[e,t]}),zme=(e,t)=>({...Eme(e),options:[e,t]}),Lme=(e,t)=>({...jme(e),options:[e,t]}),Fme=(e,t)=>({...Rme(e),options:[e,t]}),Ume=(e,t)=>({...Dme(e),options:[e,t]});var Vme="Arrow",ZU=b.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...o}=e;return c.jsx(Ge.svg,{...o,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:c.jsx("polygon",{points:"0,0 30,0 15,10"})})});ZU.displayName=Vme;var Bme=ZU;function ej(e){const[t,n]=b.useState(void 0);return ar(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let a,l;if("borderBoxSize"in o){const d=o.borderBoxSize,f=Array.isArray(d)?d[0]:d;a=f.inlineSize,l=f.blockSize}else a=e.offsetWidth,l=e.offsetHeight;n({width:a,height:l})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var tj="Popper",[YU,Af]=Ti(tj),[Hme,WU]=YU(tj),XU=e=>{const{__scopePopper:t,children:n}=e,[r,i]=b.useState(null);return c.jsx(Hme,{scope:t,anchor:r,onAnchorChange:i,children:n})};XU.displayName=tj;var JU="PopperAnchor",QU=b.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=WU(JU,n),a=b.useRef(null),l=ft(t,a),d=b.useRef(null);return b.useEffect(()=>{const f=d.current;d.current=r?.current||a.current,f!==d.current&&o.onAnchorChange(d.current)}),r?null:c.jsx(Ge.div,{...i,ref:l})});QU.displayName=JU;var nj="PopperContent",[qme,Kme]=YU(nj),e6=b.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:o="center",alignOffset:a=0,arrowPadding:l=0,avoidCollisions:d=!0,collisionBoundary:f=[],collisionPadding:m=0,sticky:h="partial",hideWhenDetached:v=!1,updatePositionStrategy:y="optimized",onPlaced:x,...S}=e,C=WU(nj,n),[k,E]=b.useState(null),j=ft(t,Q=>E(Q)),[I,A]=b.useState(null),T=ej(I),N=T?.width??0,D=T?.height??0,L=r+(o!=="center"?"-"+o:""),H=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},ee=Array.isArray(f)?f:[f],G=ee.length>0,K={padding:H,boundary:ee.filter(Zme),altBoundary:G},{refs:B,floatingStyles:q,placement:z,isPositioned:W,middlewareData:F}=Ome({strategy:"fixed",placement:L,whileElementsMounted:(...Q)=>_me(...Q,{animationFrame:y==="always"}),elements:{reference:C.anchor},middleware:[$me({mainAxis:i+D,alignmentAxis:a}),d&&Pme({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?Mme():void 0,...K}),d&&zme({...K}),Lme({...K,apply:({elements:Q,rects:ve,availableWidth:xe,availableHeight:Ee})=>{const{width:Pe,height:Fe}=ve.reference,pt=Q.floating.style;pt.setProperty("--radix-popper-available-width",`${xe}px`),pt.setProperty("--radix-popper-available-height",`${Ee}px`),pt.setProperty("--radix-popper-anchor-width",`${Pe}px`),pt.setProperty("--radix-popper-anchor-height",`${Fe}px`)}}),I&&Ume({element:I,padding:l}),Yme({arrowWidth:N,arrowHeight:D}),v&&Fme({strategy:"referenceHidden",...K})]}),[ne,$]=r6(z),P=An(x);ar(()=>{W&&P?.()},[W,P]);const V=F.arrow?.x,O=F.arrow?.y,X=F.arrow?.centerOffset!==0,[de,ge]=b.useState();return ar(()=>{k&&ge(window.getComputedStyle(k).zIndex)},[k]),c.jsx("div",{ref:B.setFloating,"data-radix-popper-content-wrapper":"",style:{...q,transform:W?q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:de,"--radix-popper-transform-origin":[F.transformOrigin?.x,F.transformOrigin?.y].join(" "),...F.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:c.jsx(qme,{scope:n,placedSide:ne,onArrowChange:A,arrowX:V,arrowY:O,shouldHideArrow:X,children:c.jsx(Ge.div,{"data-side":ne,"data-align":$,...S,ref:j,style:{...S.style,animation:W?void 0:"none"}})})})});e6.displayName=nj;var t6="PopperArrow",Gme={top:"bottom",right:"left",bottom:"top",left:"right"},n6=b.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,o=Kme(t6,r),a=Gme[o.placedSide];return c.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:c.jsx(Bme,{...i,ref:n,style:{...i.style,display:"block"}})})});n6.displayName=t6;function Zme(e){return e!==null}var Yme=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,l=a?0:e.arrowWidth,d=a?0:e.arrowHeight,[f,m]=r6(n),h={start:"0%",center:"50%",end:"100%"}[m],v=(i.arrow?.x??0)+l/2,y=(i.arrow?.y??0)+d/2;let x="",S="";return f==="bottom"?(x=a?h:`${v}px`,S=`${-d}px`):f==="top"?(x=a?h:`${v}px`,S=`${r.floating.height+d}px`):f==="right"?(x=`${-d}px`,S=a?h:`${y}px`):f==="left"&&(x=`${r.floating.width+d}px`,S=a?h:`${y}px`),{data:{x,y:S}}}});function r6(e){const[t,n="center"]=e.split("-");return[t,n]}var rj=XU,ij=QU,oj=e6,aj=n6,Wme="Portal",ph=b.forwardRef((e,t)=>{const{container:n,...r}=e,[i,o]=b.useState(!1);ar(()=>o(!0),[]);const a=n||i&&globalThis?.document?.body;return a?fE.createPortal(c.jsx(Ge.div,{...r,ref:t}),a):null});ph.displayName=Wme;var[Sx]=Ti("Tooltip",[Af]),_x=Af(),i6="TooltipProvider",Xme=700,VC="tooltip.open",[Jme,sj]=Sx(i6),o6=e=>{const{__scopeTooltip:t,delayDuration:n=Xme,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:o}=e,a=b.useRef(!0),l=b.useRef(!1),d=b.useRef(0);return b.useEffect(()=>{const f=d.current;return()=>window.clearTimeout(f)},[]),c.jsx(Jme,{scope:t,isOpenDelayedRef:a,delayDuration:n,onOpen:b.useCallback(()=>{window.clearTimeout(d.current),a.current=!1},[]),onClose:b.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>a.current=!0,r)},[r]),isPointerInTransitRef:l,onPointerInTransitChange:b.useCallback(f=>{l.current=f},[]),disableHoverableContent:i,children:o})};o6.displayName=i6;var $m="Tooltip",[Qme,mh]=Sx($m),a6=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:o,disableHoverableContent:a,delayDuration:l}=e,d=sj($m,e.__scopeTooltip),f=_x(t),[m,h]=b.useState(null),v=Zi(),y=b.useRef(0),x=a??d.disableHoverableContent,S=l??d.delayDuration,C=b.useRef(!1),[k,E]=Mo({prop:r,defaultProp:i??!1,onChange:N=>{N?(d.onOpen(),document.dispatchEvent(new CustomEvent(VC))):d.onClose(),o?.(N)},caller:$m}),j=b.useMemo(()=>k?C.current?"delayed-open":"instant-open":"closed",[k]),I=b.useCallback(()=>{window.clearTimeout(y.current),y.current=0,C.current=!1,E(!0)},[E]),A=b.useCallback(()=>{window.clearTimeout(y.current),y.current=0,E(!1)},[E]),T=b.useCallback(()=>{window.clearTimeout(y.current),y.current=window.setTimeout(()=>{C.current=!0,E(!0),y.current=0},S)},[S,E]);return b.useEffect(()=>()=>{y.current&&(window.clearTimeout(y.current),y.current=0)},[]),c.jsx(rj,{...f,children:c.jsx(Qme,{scope:t,contentId:v,open:k,stateAttribute:j,trigger:m,onTriggerChange:h,onTriggerEnter:b.useCallback(()=>{d.isOpenDelayedRef.current?T():I()},[d.isOpenDelayedRef,T,I]),onTriggerLeave:b.useCallback(()=>{x?A():(window.clearTimeout(y.current),y.current=0)},[A,x]),onOpen:I,onClose:A,disableHoverableContent:x,children:n})})};a6.displayName=$m;var BC="TooltipTrigger",s6=b.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=mh(BC,n),o=sj(BC,n),a=_x(n),l=b.useRef(null),d=ft(t,l,i.onTriggerChange),f=b.useRef(!1),m=b.useRef(!1),h=b.useCallback(()=>f.current=!1,[]);return b.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),c.jsx(ij,{asChild:!0,...a,children:c.jsx(Ge.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:d,onPointerMove:Oe(e.onPointerMove,v=>{v.pointerType!=="touch"&&!m.current&&!o.isPointerInTransitRef.current&&(i.onTriggerEnter(),m.current=!0)}),onPointerLeave:Oe(e.onPointerLeave,()=>{i.onTriggerLeave(),m.current=!1}),onPointerDown:Oe(e.onPointerDown,()=>{i.open&&i.onClose(),f.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:Oe(e.onFocus,()=>{f.current||i.onOpen()}),onBlur:Oe(e.onBlur,i.onClose),onClick:Oe(e.onClick,i.onClose)})})});s6.displayName=BC;var lj="TooltipPortal",[ehe,the]=Sx(lj,{forceMount:void 0}),l6=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,o=mh(lj,t);return c.jsx(ehe,{scope:t,forceMount:n,children:c.jsx(lr,{present:n||o.open,children:c.jsx(ph,{asChild:!0,container:i,children:r})})})};l6.displayName=lj;var tf="TooltipContent",c6=b.forwardRef((e,t)=>{const n=the(tf,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...o}=e,a=mh(tf,e.__scopeTooltip);return c.jsx(lr,{present:r||a.open,children:a.disableHoverableContent?c.jsx(u6,{side:i,...o,ref:t}):c.jsx(nhe,{side:i,...o,ref:t})})}),nhe=b.forwardRef((e,t)=>{const n=mh(tf,e.__scopeTooltip),r=sj(tf,e.__scopeTooltip),i=b.useRef(null),o=ft(t,i),[a,l]=b.useState(null),{trigger:d,onClose:f}=n,m=i.current,{onPointerInTransitChange:h}=r,v=b.useCallback(()=>{l(null),h(!1)},[h]),y=b.useCallback((x,S)=>{const C=x.currentTarget,k={x:x.clientX,y:x.clientY},E=ahe(k,C.getBoundingClientRect()),j=she(k,E),I=lhe(S.getBoundingClientRect()),A=uhe([...j,...I]);l(A),h(!0)},[h]);return b.useEffect(()=>()=>v(),[v]),b.useEffect(()=>{if(d&&m){const x=C=>y(C,m),S=C=>y(C,d);return d.addEventListener("pointerleave",x),m.addEventListener("pointerleave",S),()=>{d.removeEventListener("pointerleave",x),m.removeEventListener("pointerleave",S)}}},[d,m,y,v]),b.useEffect(()=>{if(a){const x=S=>{const C=S.target,k={x:S.clientX,y:S.clientY},E=d?.contains(C)||m?.contains(C),j=!che(k,a);E?v():j&&(v(),f())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[d,m,a,f,v]),c.jsx(u6,{...e,ref:o})}),[rhe,ihe]=Sx($m,{isInside:!1}),ohe=Efe("TooltipContent"),u6=b.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:o,onPointerDownOutside:a,...l}=e,d=mh(tf,n),f=_x(n),{onClose:m}=d;return b.useEffect(()=>(document.addEventListener(VC,m),()=>document.removeEventListener(VC,m)),[m]),b.useEffect(()=>{if(d.trigger){const h=v=>{v.target?.contains(d.trigger)&&m()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[d.trigger,m]),c.jsx(Rf,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:h=>h.preventDefault(),onDismiss:m,children:c.jsxs(oj,{"data-state":d.stateAttribute,...f,...l,ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[c.jsx(ohe,{children:r}),c.jsx(rhe,{scope:n,isInside:!0,children:c.jsx(fU,{id:d.contentId,role:"tooltip",children:i||r})})]})})});c6.displayName=tf;var d6="TooltipArrow",f6=b.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=_x(n);return ihe(d6,n).isInside?null:c.jsx(aj,{...i,...r,ref:t})});f6.displayName=d6;function ahe(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,i,o)){case o:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function she(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function lhe(e){const{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function che(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,a=t.length-1;o<t.length;a=o++){const l=t[o],d=t[a],f=l.x,m=l.y,h=d.x,v=d.y;m>r!=v>r&&n<(h-f)*(r-m)/(v-m)+f&&(i=!i)}return i}function uhe(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),dhe(t)}function dhe(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const i=e[r];for(;t.length>=2;){const o=t[t.length-1],a=t[t.length-2];if((o.x-a.x)*(i.y-a.y)>=(o.y-a.y)*(i.x-a.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const i=e[r];for(;n.length>=2;){const o=n[n.length-1],a=n[n.length-2];if((o.x-a.x)*(i.y-a.y)>=(o.y-a.y)*(i.x-a.x))n.pop();else break}n.push(i)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var fhe=o6,phe=a6,mhe=s6,hhe=l6,ghe=c6,vhe=f6;function yhe({delayDuration:e=0,...t}){return c.jsx(fhe,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function hh({...e}){return c.jsx(yhe,{children:c.jsx(phe,{"data-slot":"tooltip",...e})})}function gh({...e}){return c.jsx(mhe,{"data-slot":"tooltip-trigger",...e})}function vh({className:e,sideOffset:t=0,arrowClassName:n,children:r,...i}){return c.jsx(hhe,{children:c.jsxs(ghe,{"data-slot":"tooltip-content",sideOffset:t,className:Ve("bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",e),...i,children:[r,c.jsx(vhe,{className:Ve("bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]",n)})]})})}const Kp=new Map;function Eo(e){if(!e)return"";if(Kp.has(e))return Kp.get(e);const t=e.replace(/[-_]+/g," ").replace(/\s+/g," ").trim();if(!t)return Kp.set(e,""),"";const n=t.match(/([A-Z]+(?=[A-Z][a-z])|[A-Z]?[a-z]+|[A-Z]+|[0-9]+)/g);if(!n)return Kp.set(e,""),"";const r=[];for(let a=0;a<n.length;a++){const l=n[a],d=a+1<n.length?n[a+1]:void 0;/^[A-Z]{2,}$/.test(l)&&d&&/[A-Z]*s$/.test(d)||/^[A-Z]$/.test(l)&&d!==void 0&&/^[A-Z]s$/.test(d)?(r.push(l+d),a++):r.push(l)}const o=r.map(bhe).join(" ");return Kp.set(e,o),o}function bhe(e){return/^[A-Z]{2,3}s?$/.test(e)||/^[0-9]+$/.test(e)?e:e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()}function Cx({restartRequired:e}){const t=WQ(),{organization:n,instance:r,cluster:i}=Bb({strict:!1}),o="Instance",a=b.useMemo(()=>{const l=t.pathname.split("/").filter(f=>f&&f.length>0),d=[c.jsxs(Ye,{to:"/",children:[c.jsx(sne,{"aria-hidden":"true",className:"size-5 shrink-0"}),c.jsx("span",{className:"sr-only",children:"Home"})]},"home")];for(let f=0;f<l.length;f++){const m=l[f];if(m==="instance")continue;let h=`/${l.slice(0,f+1).join("/")}`,v=Eo(m),y;m==="databases"&&l.length===f+3?(v=l[f+2],f+=2):v.startsWith("Org ")?v=n?.name||"Org":v.startsWith("Clu ")?(v=i?.name||"Cluster",l[f+1]==="instance"&&(h+="/instances")):v.startsWith("Ins ")?v=r?.name?.split(".")?.shift()||"Instance":v==="Apis"&&(v="APIs"),d.push(c.jsx("svg",{fill:"currentColor",viewBox:"0 0 20 20","aria-hidden":"true",className:"size-5 shrink-0 text-grey",children:c.jsx("path",{d:"M5.555 17.776l8-16 .894.448-8 16-.894-.448z"})}),c.jsxs(Ye,{to:h,className:"text-xs md:text-sm font-medium hover:text-grey truncate max-w-48",children:[v,y]}))}return d},[t.pathname,i?.name,r?.name,n?.name]);return c.jsxs("div",{role:"list",className:"flex items-center space-x-2 xl:space-x-4 sm:max-w-9/10 max-w-[calc(100%-56px)]",children:[...a,e&&c.jsxs(hh,{children:[c.jsx(gh,{asChild:!0,children:c.jsxs("div",{className:"text-xs italic text-muted-foreground",children:["* Restart ",c.jsx("span",{className:"hidden lg:inline-block",children:"Requested"})]})}),c.jsxs(vh,{side:"bottom",children:["This ",o," is requesting a restart, when convenient, to apply your latest changes.",c.jsx("br",{}),"You can do this from the Apps or Config pages."]})]})]})}var yh=e=>e.type==="checkbox",Cc=e=>e instanceof Date,bi=e=>e==null;const p6=e=>typeof e=="object";var or=e=>!bi(e)&&!Array.isArray(e)&&p6(e)&&!Cc(e),m6=e=>or(e)&&e.target?yh(e.target)?e.target.checked:e.target.value:e,xhe=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,h6=(e,t)=>e.has(xhe(t)),whe=e=>{const t=e.constructor&&e.constructor.prototype;return or(t)&&t.hasOwnProperty("isPrototypeOf")},cj=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function xn(e){if(e instanceof Date)return new Date(e);const t=typeof FileList<"u"&&e instanceof FileList;if(cj&&(e instanceof Blob||t))return e;const n=Array.isArray(e);if(!n&&!(or(e)&&whe(e)))return e;const r=n?[]:Object.create(Object.getPrototypeOf(e));for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=xn(e[i]));return r}var kx=e=>/^\w*$/.test(e),fn=e=>e===void 0,Ex=e=>Array.isArray(e)?e.filter(Boolean):[],uj=e=>Ex(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Me=(e,t,n)=>{if(!t||!or(e))return n;const r=(kx(t)?[t]:uj(t)).reduce((i,o)=>bi(i)?i:i[o],e);return fn(r)||r===e?fn(e[t])?n:e[t]:r},Vi=e=>typeof e=="boolean",Xr=e=>typeof e=="function",Wt=(e,t,n)=>{let r=-1;const i=kx(t)?[t]:uj(t),o=i.length,a=o-1;for(;++r<o;){const l=i[r];let d=n;if(r!==a){const f=e[l];d=or(f)||Array.isArray(f)?f:isNaN(+i[r+1])?{}:[]}if(l==="__proto__"||l==="constructor"||l==="prototype")return;e[l]=d,e=e[l]}};const Xy={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},jo={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},rs={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},dj=J.createContext(null);dj.displayName="HookFormControlContext";const jx=()=>J.useContext(dj);var g6=(e,t,n,r=!0)=>{const i={defaultValues:t._defaultValues};for(const o in e)Object.defineProperty(i,o,{get:()=>{const a=o;return t._proxyFormState[a]!==jo.all&&(t._proxyFormState[a]=!r||jo.all),n&&(n[a]=!0),e[a]}});return i};const Rx=typeof window<"u"?J.useLayoutEffect:J.useEffect;function fj(e){const t=jx(),{control:n=t,disabled:r,name:i,exact:o}=e||{},[a,l]=J.useState(n._formState),d=J.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Rx(()=>n._subscribe({name:i,formState:d.current,exact:o,callback:f=>{!r&&l({...n._formState,...f})}}),[i,r,o]),J.useEffect(()=>{d.current.isValid&&n._setValid(!0)},[n]),J.useMemo(()=>g6(a,n,d.current,!1),[a,n])}var qi=e=>typeof e=="string",HC=(e,t,n,r,i)=>qi(e)?(r&&t.watch.add(e),Me(n,e,i)):Array.isArray(e)?e.map(o=>(r&&t.watch.add(o),Me(n,o))):(r&&(t.watchAll=!0),n),qC=e=>bi(e)||!p6(e);function Wo(e,t,n=new WeakSet){if(qC(e)||qC(t))return Object.is(e,t);if(Cc(e)&&Cc(t))return Object.is(e.getTime(),t.getTime());const r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;if(n.has(e)||n.has(t))return!0;n.add(e),n.add(t);for(const o of r){const a=e[o];if(!i.includes(o))return!1;if(o!=="ref"){const l=t[o];if(Cc(a)&&Cc(l)||or(a)&&or(l)||Array.isArray(a)&&Array.isArray(l)?!Wo(a,l,n):!Object.is(a,l))return!1}}return!0}function She(e){const t=jx(),{control:n=t,name:r,defaultValue:i,disabled:o,exact:a,compute:l}=e||{},d=J.useRef(i),f=J.useRef(l),m=J.useRef(void 0),h=J.useRef(n),v=J.useRef(r);f.current=l;const[y,x]=J.useState(()=>{const I=n._getWatch(r,d.current);return f.current?f.current(I):I}),S=J.useCallback(I=>{const A=HC(r,n._names,I||n._formValues,!1,d.current);return f.current?f.current(A):A},[n._formValues,n._names,r]),C=J.useCallback(I=>{if(!o){const A=HC(r,n._names,I||n._formValues,!1,d.current);if(f.current){const T=f.current(A);Wo(T,m.current)||(x(T),m.current=T)}else x(A)}},[n._formValues,n._names,o,r]);Rx(()=>((h.current!==n||!Wo(v.current,r))&&(h.current=n,v.current=r,C()),n._subscribe({name:r,formState:{values:!0},exact:a,callback:I=>{C(I.values)}})),[n,a,r,C]),J.useEffect(()=>n._removeUnmounted());const k=h.current!==n,E=v.current,j=J.useMemo(()=>{if(o)return null;const I=!k&&!Wo(E,r);return k||I?S():null},[o,k,r,E,S]);return j!==null?j:y}function _he(e){const t=jx(),{name:n,disabled:r,control:i=t,shouldUnregister:o,defaultValue:a,exact:l=!0}=e,d=h6(i._names.array,n),f=J.useMemo(()=>Me(i._formValues,n,Me(i._defaultValues,n,a)),[i,n,a]),m=She({control:i,name:n,defaultValue:f,exact:l}),h=fj({control:i,name:n,exact:l}),v=J.useRef(e),y=J.useRef(void 0),x=J.useRef(i.register(n,{...e.rules,value:m,...Vi(e.disabled)?{disabled:e.disabled}:{}}));v.current=e;const S=J.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Me(h.errors,n)},isDirty:{enumerable:!0,get:()=>!!Me(h.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!Me(h.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!Me(h.validatingFields,n)},error:{enumerable:!0,get:()=>Me(h.errors,n)}}),[h,n]),C=J.useCallback(I=>x.current.onChange({target:{value:m6(I),name:n},type:Xy.CHANGE}),[n]),k=J.useCallback(()=>x.current.onBlur({target:{value:Me(i._formValues,n),name:n},type:Xy.BLUR}),[n,i._formValues]),E=J.useCallback(I=>{const A=Me(i._fields,n);A&&A._f&&I&&(A._f.ref={focus:()=>Xr(I.focus)&&I.focus(),select:()=>Xr(I.select)&&I.select(),setCustomValidity:T=>Xr(I.setCustomValidity)&&I.setCustomValidity(T),reportValidity:()=>Xr(I.reportValidity)&&I.reportValidity()})},[i._fields,n]),j=J.useMemo(()=>({name:n,value:m,...Vi(r)||h.disabled?{disabled:h.disabled||r}:{},onChange:C,onBlur:k,ref:E}),[n,r,h.disabled,C,k,E,m]);return J.useEffect(()=>{const I=i._options.shouldUnregister||o,A=y.current;A&&A!==n&&!d&&i.unregister(A),i.register(n,{...v.current.rules,...Vi(v.current.disabled)?{disabled:v.current.disabled}:{}});const T=(N,D)=>{const L=Me(i._fields,N);L&&L._f&&(L._f.mount=D)};if(T(n,!0),I){const N=xn(Me(i._options.defaultValues,n,v.current.defaultValue));Wt(i._defaultValues,n,N),fn(Me(i._formValues,n))&&Wt(i._formValues,n,N)}return!d&&i.register(n),y.current=n,()=>{(d?I&&!i._state.action:I)?i.unregister(n):T(n,!1)}},[n,i,d,o]),J.useEffect(()=>{i._setDisabledField({disabled:r,name:n})},[r,n,i]),J.useMemo(()=>({field:j,formState:h,fieldState:S}),[j,h,S])}const Che=e=>e.render(_he(e)),pj=J.createContext(null);pj.displayName="HookFormContext";const khe=()=>J.useContext(pj),Ehe=e=>{const{children:t,watch:n,getValues:r,getFieldState:i,setError:o,clearErrors:a,setValue:l,trigger:d,formState:f,resetField:m,reset:h,handleSubmit:v,unregister:y,control:x,register:S,setFocus:C,subscribe:k}=e;return J.createElement(pj.Provider,{value:J.useMemo(()=>({watch:n,getValues:r,getFieldState:i,setError:o,clearErrors:a,setValue:l,trigger:d,formState:f,resetField:m,reset:h,handleSubmit:v,unregister:y,control:x,register:S,setFocus:C,subscribe:k}),[a,x,f,i,r,v,S,h,m,o,C,l,k,d,y,n])},J.createElement(dj.Provider,{value:x},t))};var mj=(e,t,n,r,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:i||!0}}:{},_i=e=>Array.isArray(e)?e:[e],k2=()=>{let e=[];return{get observers(){return e},next:i=>{for(const o of e)o.next&&o.next(i)},subscribe:i=>(e.push(i),{unsubscribe:()=>{e=e.filter(o=>o!==i)}}),unsubscribe:()=>{e=[]}}};function v6(e,t){const n={};for(const r in e)if(e.hasOwnProperty(r)){const i=e[r],o=t[r];if(i&&or(i)&&o){const a=v6(i,o);or(a)&&(n[r]=a)}else e[r]&&(n[r]=o)}return n}var Dr=e=>or(e)&&!Object.keys(e).length,hj=e=>e.type==="file",Jy=e=>{if(!cj)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},y6=e=>e.type==="select-multiple",gj=e=>e.type==="radio",jhe=e=>gj(e)||yh(e),t1=e=>Jy(e)&&e.isConnected;function Rhe(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=fn(e)?r++:e[t[r++]];return e}function Ihe(e){for(const t in e)if(e.hasOwnProperty(t)&&!fn(e[t]))return!1;return!0}function Yn(e,t){const n=Array.isArray(t)?t:kx(t)?[t]:uj(t),r=n.length===1?e:Rhe(e,n),i=n.length-1,o=n[i];return r&&delete r[o],i!==0&&(or(r)&&Dr(r)||Array.isArray(r)&&Ihe(r))&&Yn(e,n.slice(0,-1)),e}var The=e=>{for(const t in e)if(Xr(e[t]))return!0;return!1};function b6(e){return Array.isArray(e)||or(e)&&!The(e)}function KC(e,t={}){for(const n in e){const r=e[n];b6(r)?(t[n]=Array.isArray(r)?[]:{},KC(r,t[n])):fn(r)||(t[n]=!0)}return t}function wd(e,t,n){n||(n=KC(t));for(const r in e){const i=e[r];if(b6(i))fn(t)||qC(n[r])?n[r]=KC(i,Array.isArray(i)?[]:{}):wd(i,bi(t)?{}:t[r],n[r]);else{const o=t[r];n[r]=!Wo(i,o)}}return n}const E2={value:!1,isValid:!1},j2={value:!0,isValid:!0};var x6=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!fn(e[0].attributes.value)?fn(e[0].value)||e[0].value===""?j2:{value:e[0].value,isValid:!0}:j2:E2}return E2},w6=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>fn(e)?e:t?e===""?NaN:e&&+e:n&&qi(e)?new Date(e):r?r(e):e;const R2={isValid:!1,value:null};var S6=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,R2):R2;function I2(e){const t=e.ref;return hj(t)?t.files:gj(t)?S6(e.refs).value:y6(t)?[...t.selectedOptions].map(({value:n})=>n):yh(t)?x6(e.refs).value:w6(fn(t.value)?e.ref.value:t.value,e)}var Nhe=(e,t,n,r)=>{const i={};for(const o of e){const a=Me(t,o);a&&Wt(i,o,a._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}},Qy=e=>e instanceof RegExp,Gp=e=>fn(e)?e:Qy(e)?e.source:or(e)?Qy(e.value)?e.value.source:e.value:e,jd=e=>({isOnSubmit:!e||e===jo.onSubmit,isOnBlur:e===jo.onBlur,isOnChange:e===jo.onChange,isOnAll:e===jo.all,isOnTouch:e===jo.onTouched});const T2="AsyncFunction";var Ahe=e=>!!e&&!!e.validate&&!!(Xr(e.validate)&&e.validate.constructor.name===T2||or(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===T2)),Ohe=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),GC=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const Md=(e,t,n,r)=>{for(const i of n||Object.keys(e)){const o=Me(e,i);if(o){const{_f:a,...l}=o;if(a){if(a.refs&&a.refs[0]&&t(a.refs[0],i)&&!r)return!0;if(a.ref&&t(a.ref,a.name)&&!r)return!0;if(Md(l,t))break}else if(or(l)&&Md(l,t))break}}};function N2(e,t,n){const r=Me(e,n);if(r||kx(n))return{error:r,name:n};const i=n.split(".");for(;i.length;){const o=i.join("."),a=Me(t,o),l=Me(e,o);if(a&&!Array.isArray(a)&&n!==o)return{name:n};if(l&&l.type)return{name:o,error:l};if(l&&l.root&&l.root.type)return{name:`${o}.root`,error:l.root};i.pop()}return{name:n}}var Dhe=(e,t,n,r)=>{n(e);const{name:i,...o}=e;return Dr(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find(a=>t[a]===(!r||jo.all))},$he=(e,t,n)=>!e||!t||e===t||_i(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r))),Phe=(e,t,n,r,i)=>i.isOnAll?!1:!n&&i.isOnTouch?!(t||e):(n?r.isOnBlur:i.isOnBlur)?!e:(n?r.isOnChange:i.isOnChange)?e:!0,Mhe=(e,t)=>!Ex(Me(e,t)).length&&Yn(e,t),_6=(e,t,n)=>{const r=_i(Me(e,n));return Wt(r,"root",t[n]),Wt(e,n,r),e};function A2(e,t,n="validate"){if(qi(e)||Array.isArray(e)&&e.every(qi)||Vi(e)&&!e)return{type:n,message:qi(e)?e:"",ref:t}}var dd=e=>or(e)&&!Qy(e)?e:{value:e,message:""},ZC=async(e,t,n,r,i,o)=>{const{ref:a,refs:l,required:d,maxLength:f,minLength:m,min:h,max:v,pattern:y,validate:x,name:S,valueAsNumber:C,mount:k}=e._f,E=Me(n,S);if(!k||t.has(S))return{};const j=l?l[0]:a,I=G=>{i&&j.reportValidity&&(j.setCustomValidity(Vi(G)?"":G||""),j.reportValidity())},A={},T=gj(a),N=yh(a),D=T||N,L=(C||hj(a))&&fn(a.value)&&fn(E)||Jy(a)&&a.value===""||E===""||Array.isArray(E)&&!E.length,H=mj.bind(null,S,r,A),ee=(G,K,B,q=rs.maxLength,z=rs.minLength)=>{const W=G?K:B;A[S]={type:G?q:z,message:W,ref:a,...H(G?q:z,W)}};if(o?!Array.isArray(E)||!E.length:d&&(!D&&(L||bi(E))||Vi(E)&&!E||N&&!x6(l).isValid||T&&!S6(l).isValid)){const{value:G,message:K}=qi(d)?{value:!!d,message:d}:dd(d);if(G&&(A[S]={type:rs.required,message:K,ref:j,...H(rs.required,K)},!r))return I(K),A}if(!L&&(!bi(h)||!bi(v))){let G,K;const B=dd(v),q=dd(h);if(!bi(E)&&!isNaN(E)){const z=a.valueAsNumber||E&&+E;bi(B.value)||(G=z>B.value),bi(q.value)||(K=z<q.value)}else{const z=a.valueAsDate||new Date(E),W=$=>new Date(new Date().toDateString()+" "+$),F=a.type=="time",ne=a.type=="week";qi(B.value)&&E&&(G=F?W(E)>W(B.value):ne?E>B.value:z>new Date(B.value)),qi(q.value)&&E&&(K=F?W(E)<W(q.value):ne?E<q.value:z<new Date(q.value))}if((G||K)&&(ee(!!G,B.message,q.message,rs.max,rs.min),!r))return I(A[S].message),A}if((f||m)&&!L&&(qi(E)||o&&Array.isArray(E))){const G=dd(f),K=dd(m),B=!bi(G.value)&&E.length>+G.value,q=!bi(K.value)&&E.length<+K.value;if((B||q)&&(ee(B,G.message,K.message),!r))return I(A[S].message),A}if(y&&!L&&qi(E)){const{value:G,message:K}=dd(y);if(Qy(G)&&!E.match(G)&&(A[S]={type:rs.pattern,message:K,ref:a,...H(rs.pattern,K)},!r))return I(K),A}if(x){if(Xr(x)){const G=await x(E,n),K=A2(G,j);if(K&&(A[S]={...K,...H(rs.validate,K.message)},!r))return I(K.message),A}else if(or(x)){let G={};for(const K in x){if(!Dr(G)&&!r)break;const B=A2(await x[K](E,n),j,K);B&&(G={...B,...H(K,B.message)},I(B.message),r&&(A[S]=G))}if(!Dr(G)&&(A[S]={ref:j,...G},!r))return A}}return I(!0),A};const zhe={mode:jo.onSubmit,reValidateMode:jo.onChange,shouldFocusError:!0};function Lhe(e={}){let t={...zhe,...e},n={submitCount:0,isDirty:!1,isReady:!1,isLoading:Xr(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},i=or(t.defaultValues)||or(t.values)?xn(t.defaultValues||t.values)||{}:{},o=t.shouldUnregister?{}:xn(i),a={action:!1,mount:!1,watch:!1,keepIsValid:!1},l={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},d,f=0;const m={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},h={...m};let v={...h};const y={array:k2(),state:k2()},x=t.criteriaMode===jo.all,S=Z=>re=>{clearTimeout(f),f=setTimeout(Z,re)},C=async Z=>{if(!a.keepIsValid&&!t.disabled&&(h.isValid||v.isValid||Z)){let re;t.resolver?(re=Dr((await D()).errors),k()):re=await H(r,!0),re!==n.isValid&&y.state.next({isValid:re})}},k=(Z,re)=>{!t.disabled&&(h.isValidating||h.validatingFields||v.isValidating||v.validatingFields)&&((Z||Array.from(l.mount)).forEach(se=>{se&&(re?Wt(n.validatingFields,se,re):Yn(n.validatingFields,se))}),y.state.next({validatingFields:n.validatingFields,isValidating:!Dr(n.validatingFields)}))},E=(Z,re=[],se,Ce,oe=!0,U=!0)=>{if(Ce&&se&&!t.disabled){if(a.action=!0,U&&Array.isArray(Me(r,Z))){const le=se(Me(r,Z),Ce.argA,Ce.argB);oe&&Wt(r,Z,le)}if(U&&Array.isArray(Me(n.errors,Z))){const le=se(Me(n.errors,Z),Ce.argA,Ce.argB);oe&&Wt(n.errors,Z,le),Mhe(n.errors,Z)}if((h.touchedFields||v.touchedFields)&&U&&Array.isArray(Me(n.touchedFields,Z))){const le=se(Me(n.touchedFields,Z),Ce.argA,Ce.argB);oe&&Wt(n.touchedFields,Z,le)}(h.dirtyFields||v.dirtyFields)&&(n.dirtyFields=wd(i,o)),y.state.next({name:Z,isDirty:G(Z,re),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else Wt(o,Z,re)},j=(Z,re)=>{Wt(n.errors,Z,re),y.state.next({errors:n.errors})},I=Z=>{n.errors=Z,y.state.next({errors:n.errors,isValid:!1})},A=(Z,re,se,Ce)=>{const oe=Me(r,Z);if(oe){const U=Me(o,Z,fn(se)?Me(i,Z):se);fn(U)||Ce&&Ce.defaultChecked||re?Wt(o,Z,re?U:I2(oe._f)):q(Z,U),a.mount&&!a.action&&C()}},T=(Z,re,se,Ce,oe)=>{let U=!1,le=!1;const ke={name:Z};if(!t.disabled){if(!se||Ce){(h.isDirty||v.isDirty)&&(le=n.isDirty,n.isDirty=ke.isDirty=G(),U=le!==ke.isDirty);const De=Wo(Me(i,Z),re);le=!!Me(n.dirtyFields,Z),De?Yn(n.dirtyFields,Z):Wt(n.dirtyFields,Z,!0),ke.dirtyFields=n.dirtyFields,U=U||(h.dirtyFields||v.dirtyFields)&&le!==!De}if(se){const De=Me(n.touchedFields,Z);De||(Wt(n.touchedFields,Z,se),ke.touchedFields=n.touchedFields,U=U||(h.touchedFields||v.touchedFields)&&De!==se)}U&&oe&&y.state.next(ke)}return U?ke:{}},N=(Z,re,se,Ce)=>{const oe=Me(n.errors,Z),U=(h.isValid||v.isValid)&&Vi(re)&&n.isValid!==re;if(t.delayError&&se?(d=S(()=>j(Z,se)),d(t.delayError)):(clearTimeout(f),d=null,se?Wt(n.errors,Z,se):Yn(n.errors,Z)),(se?!Wo(oe,se):oe)||!Dr(Ce)||U){const le={...Ce,...U&&Vi(re)?{isValid:re}:{},errors:n.errors,name:Z};n={...n,...le},y.state.next(le)}},D=async Z=>(k(Z,!0),await t.resolver(o,t.context,Nhe(Z||l.mount,r,t.criteriaMode,t.shouldUseNativeValidation))),L=async Z=>{const{errors:re}=await D(Z);if(k(Z),Z)for(const se of Z){const Ce=Me(re,se);Ce?Wt(n.errors,se,Ce):Yn(n.errors,se)}else n.errors=re;return re},H=async(Z,re,se={valid:!0})=>{for(const Ce in Z){const oe=Z[Ce];if(oe){const{_f:U,...le}=oe;if(U){const ke=l.array.has(U.name),De=oe._f&&Ahe(oe._f);De&&h.validatingFields&&k([U.name],!0);const Be=await ZC(oe,l.disabled,o,x,t.shouldUseNativeValidation&&!re,ke);if(De&&h.validatingFields&&k([U.name]),Be[U.name]&&(se.valid=!1,re||e.shouldUseNativeValidation))break;!re&&(Me(Be,U.name)?ke?_6(n.errors,Be,U.name):Wt(n.errors,U.name,Be[U.name]):Yn(n.errors,U.name))}!Dr(le)&&await H(le,re,se)}}return se.valid},ee=()=>{for(const Z of l.unMount){const re=Me(r,Z);re&&(re._f.refs?re._f.refs.every(se=>!t1(se)):!t1(re._f.ref))&&ve(Z)}l.unMount=new Set},G=(Z,re)=>!t.disabled&&(Z&&re&&Wt(o,Z,re),!Wo(P(),i)),K=(Z,re,se)=>HC(Z,l,{...a.mount?o:fn(re)?i:qi(Z)?{[Z]:re}:re},se,re),B=Z=>Ex(Me(a.mount?o:i,Z,t.shouldUnregister?Me(i,Z,[]):[])),q=(Z,re,se={})=>{const Ce=Me(r,Z);let oe=re;if(Ce){const U=Ce._f;U&&(!U.disabled&&Wt(o,Z,w6(re,U)),oe=Jy(U.ref)&&bi(re)?"":re,y6(U.ref)?[...U.ref.options].forEach(le=>le.selected=oe.includes(le.value)):U.refs?yh(U.ref)?U.refs.forEach(le=>{(!le.defaultChecked||!le.disabled)&&(Array.isArray(oe)?le.checked=!!oe.find(ke=>ke===le.value):le.checked=oe===le.value||!!oe)}):U.refs.forEach(le=>le.checked=le.value===oe):hj(U.ref)?U.ref.value="":(U.ref.value=oe,U.ref.type||y.state.next({name:Z,values:xn(o)})))}(se.shouldDirty||se.shouldTouch)&&T(Z,oe,se.shouldTouch,se.shouldDirty,!0),se.shouldValidate&&$(Z)},z=(Z,re,se)=>{for(const Ce in re){if(!re.hasOwnProperty(Ce))return;const oe=re[Ce],U=Z+"."+Ce,le=Me(r,U);(l.array.has(Z)||or(oe)||le&&!le._f)&&!Cc(oe)?z(U,oe,se):q(U,oe,se)}},W=(Z,re,se={})=>{const Ce=Me(r,Z),oe=l.array.has(Z),U=xn(re);Wt(o,Z,U),oe?(y.array.next({name:Z,values:xn(o)}),(h.isDirty||h.dirtyFields||v.isDirty||v.dirtyFields)&&se.shouldDirty&&y.state.next({name:Z,dirtyFields:wd(i,o),isDirty:G(Z,U)})):Ce&&!Ce._f&&!bi(U)?z(Z,U,se):q(Z,U,se),GC(Z,l)?y.state.next({...n,name:Z,values:xn(o)}):y.state.next({name:a.mount?Z:void 0,values:xn(o)})},F=async Z=>{a.mount=!0;const re=Z.target;let se=re.name,Ce=!0;const oe=Me(r,se),U=De=>{Ce=Number.isNaN(De)||Cc(De)&&isNaN(De.getTime())||Wo(De,Me(o,se,De))},le=jd(t.mode),ke=jd(t.reValidateMode);if(oe){let De,Be;const Nt=re.type?I2(oe._f):m6(Z),Kt=Z.type===Xy.BLUR||Z.type===Xy.FOCUS_OUT,kn=!Ohe(oe._f)&&!t.resolver&&!Me(n.errors,se)&&!oe._f.deps||Phe(Kt,Me(n.touchedFields,se),n.isSubmitted,ke,le),Gt=GC(se,l,Kt);Wt(o,se,Nt),Kt?(!re||!re.readOnly)&&(oe._f.onBlur&&oe._f.onBlur(Z),d&&d(0)):oe._f.onChange&&oe._f.onChange(Z);const sn=T(se,Nt,Kt),jt=!Dr(sn)||Gt;if(!Kt&&y.state.next({name:se,type:Z.type,values:xn(o)}),kn)return(h.isValid||v.isValid)&&(t.mode==="onBlur"?Kt&&C():Kt||C()),jt&&y.state.next({name:se,...Gt?{}:sn});if(!Kt&&Gt&&y.state.next({...n}),t.resolver){const{errors:ur}=await D([se]);if(k([se]),U(Nt),Ce){const Tn=N2(n.errors,r,se),Jn=N2(ur,r,Tn.name||se);De=Jn.error,se=Jn.name,Be=Dr(ur)}}else k([se],!0),De=(await ZC(oe,l.disabled,o,x,t.shouldUseNativeValidation))[se],k([se]),U(Nt),Ce&&(De?Be=!1:(h.isValid||v.isValid)&&(Be=await H(r,!0)));Ce&&(oe._f.deps&&(!Array.isArray(oe._f.deps)||oe._f.deps.length>0)&&$(oe._f.deps),N(se,Be,De,sn))}},ne=(Z,re)=>{if(Me(n.errors,re)&&Z.focus)return Z.focus(),1},$=async(Z,re={})=>{let se,Ce;const oe=_i(Z);if(t.resolver){const U=await L(fn(Z)?Z:oe);se=Dr(U),Ce=Z?!oe.some(le=>Me(U,le)):se}else Z?(Ce=(await Promise.all(oe.map(async U=>{const le=Me(r,U);return await H(le&&le._f?{[U]:le}:le)}))).every(Boolean),!(!Ce&&!n.isValid)&&C()):Ce=se=await H(r);return y.state.next({...!qi(Z)||(h.isValid||v.isValid)&&se!==n.isValid?{}:{name:Z},...t.resolver||!Z?{isValid:se}:{},errors:n.errors}),re.shouldFocus&&!Ce&&Md(r,ne,Z?oe:l.mount),Ce},P=(Z,re)=>{let se={...a.mount?o:i};return re&&(se=v6(re.dirtyFields?n.dirtyFields:n.touchedFields,se)),fn(Z)?se:qi(Z)?Me(se,Z):Z.map(Ce=>Me(se,Ce))},V=(Z,re)=>({invalid:!!Me((re||n).errors,Z),isDirty:!!Me((re||n).dirtyFields,Z),error:Me((re||n).errors,Z),isValidating:!!Me(n.validatingFields,Z),isTouched:!!Me((re||n).touchedFields,Z)}),O=Z=>{Z&&_i(Z).forEach(re=>Yn(n.errors,re)),y.state.next({errors:Z?n.errors:{}})},X=(Z,re,se)=>{const Ce=(Me(r,Z,{_f:{}})._f||{}).ref,oe=Me(n.errors,Z)||{},{ref:U,message:le,type:ke,...De}=oe;Wt(n.errors,Z,{...De,...re,ref:Ce}),y.state.next({name:Z,errors:n.errors,isValid:!1}),se&&se.shouldFocus&&Ce&&Ce.focus&&Ce.focus()},de=(Z,re)=>Xr(Z)?y.state.subscribe({next:se=>"values"in se&&Z(K(void 0,re),se)}):K(Z,re,!0),ge=Z=>y.state.subscribe({next:re=>{$he(Z.name,re.name,Z.exact)&&Dhe(re,Z.formState||h,qn,Z.reRenderRoot)&&Z.callback({values:{...o},...n,...re,defaultValues:i})}}).unsubscribe,Q=Z=>(a.mount=!0,v={...v,...Z.formState},ge({...Z,formState:{...m,...Z.formState}})),ve=(Z,re={})=>{for(const se of Z?_i(Z):l.mount)l.mount.delete(se),l.array.delete(se),re.keepValue||(Yn(r,se),Yn(o,se)),!re.keepError&&Yn(n.errors,se),!re.keepDirty&&Yn(n.dirtyFields,se),!re.keepTouched&&Yn(n.touchedFields,se),!re.keepIsValidating&&Yn(n.validatingFields,se),!t.shouldUnregister&&!re.keepDefaultValue&&Yn(i,se);y.state.next({values:xn(o)}),y.state.next({...n,...re.keepDirty?{isDirty:G()}:{}}),!re.keepIsValid&&C()},xe=({disabled:Z,name:re})=>{if(Vi(Z)&&a.mount||Z||l.disabled.has(re)){const oe=l.disabled.has(re)!==!!Z;Z?l.disabled.add(re):l.disabled.delete(re),oe&&a.mount&&!a.action&&C()}},Ee=(Z,re={})=>{let se=Me(r,Z);const Ce=Vi(re.disabled)||Vi(t.disabled);return Wt(r,Z,{...se||{},_f:{...se&&se._f?se._f:{ref:{name:Z}},name:Z,mount:!0,...re}}),l.mount.add(Z),se?xe({disabled:Vi(re.disabled)?re.disabled:t.disabled,name:Z}):A(Z,!0,re.value),{...Ce?{disabled:re.disabled||t.disabled}:{},...t.progressive?{required:!!re.required,min:Gp(re.min),max:Gp(re.max),minLength:Gp(re.minLength),maxLength:Gp(re.maxLength),pattern:Gp(re.pattern)}:{},name:Z,onChange:F,onBlur:F,ref:oe=>{if(oe){Ee(Z,re),se=Me(r,Z);const U=fn(oe.value)&&oe.querySelectorAll&&oe.querySelectorAll("input,select,textarea")[0]||oe,le=jhe(U),ke=se._f.refs||[];if(le?ke.find(De=>De===U):U===se._f.ref)return;Wt(r,Z,{_f:{...se._f,...le?{refs:[...ke.filter(t1),U,...Array.isArray(Me(i,Z))?[{}]:[]],ref:{type:U.type,name:Z}}:{ref:U}}}),A(Z,!1,void 0,U)}else se=Me(r,Z,{}),se._f&&(se._f.mount=!1),(t.shouldUnregister||re.shouldUnregister)&&!(h6(l.array,Z)&&a.action)&&l.unMount.add(Z)}}},Pe=()=>t.shouldFocusError&&Md(r,ne,l.mount),Fe=Z=>{Vi(Z)&&(y.state.next({disabled:Z}),Md(r,(re,se)=>{const Ce=Me(r,se);Ce&&(re.disabled=Ce._f.disabled||Z,Array.isArray(Ce._f.refs)&&Ce._f.refs.forEach(oe=>{oe.disabled=Ce._f.disabled||Z}))},0,!1))},pt=(Z,re)=>async se=>{let Ce;se&&(se.preventDefault&&se.preventDefault(),se.persist&&se.persist());let oe=xn(o);if(y.state.next({isSubmitting:!0}),t.resolver){const{errors:U,values:le}=await D();k(),n.errors=U,oe=xn(le)}else await H(r);if(l.disabled.size)for(const U of l.disabled)Yn(oe,U);if(Yn(n.errors,"root"),Dr(n.errors)){y.state.next({errors:{}});try{await Z(oe,se)}catch(U){Ce=U}}else re&&await re({...n.errors},se),Pe(),setTimeout(Pe);if(y.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Dr(n.errors)&&!Ce,submitCount:n.submitCount+1,errors:n.errors}),Ce)throw Ce},dt=(Z,re={})=>{Me(r,Z)&&(fn(re.defaultValue)?W(Z,xn(Me(i,Z))):(W(Z,re.defaultValue),Wt(i,Z,xn(re.defaultValue))),re.keepTouched||Yn(n.touchedFields,Z),re.keepDirty||(Yn(n.dirtyFields,Z),n.isDirty=re.defaultValue?G(Z,xn(Me(i,Z))):G()),re.keepError||(Yn(n.errors,Z),h.isValid&&C()),y.state.next({...n}))},tt=(Z,re={})=>{const se=Z?xn(Z):i,Ce=xn(se),oe=Dr(Z),U=oe?i:Ce;if(re.keepDefaultValues||(i=se),!re.keepValues){if(re.keepDirtyValues){const le=new Set([...l.mount,...Object.keys(wd(i,o))]);for(const ke of Array.from(le)){const De=Me(n.dirtyFields,ke),Be=Me(o,ke),Nt=Me(U,ke);De&&!fn(Be)?Wt(U,ke,Be):!De&&!fn(Nt)&&W(ke,Nt)}}else{if(cj&&fn(Z))for(const le of l.mount){const ke=Me(r,le);if(ke&&ke._f){const De=Array.isArray(ke._f.refs)?ke._f.refs[0]:ke._f.ref;if(Jy(De)){const Be=De.closest("form");if(Be){Be.reset();break}}}}if(re.keepFieldsRef)for(const le of l.mount)W(le,Me(U,le));else r={}}o=t.shouldUnregister?re.keepDefaultValues?xn(i):{}:xn(U),y.array.next({values:{...U}}),y.state.next({values:{...U}})}l={mount:re.keepDirtyValues?l.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},a.mount=!h.isValid||!!re.keepIsValid||!!re.keepDirtyValues||!t.shouldUnregister&&!Dr(U),a.watch=!!t.shouldUnregister,a.keepIsValid=!!re.keepIsValid,a.action=!1,re.keepErrors||(n.errors={}),y.state.next({submitCount:re.keepSubmitCount?n.submitCount:0,isDirty:oe?!1:re.keepDirty?n.isDirty:!!(re.keepDefaultValues&&!Wo(Z,i)),isSubmitted:re.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:oe?{}:re.keepDirtyValues?re.keepDefaultValues&&o?wd(i,o):n.dirtyFields:re.keepDefaultValues&&Z?wd(i,Z):re.keepDirty?n.dirtyFields:{},touchedFields:re.keepTouched?n.touchedFields:{},errors:re.keepErrors?n.errors:{},isSubmitSuccessful:re.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:i})},Vt=(Z,re)=>tt(Xr(Z)?Z(o):Z,{...t.resetOptions,...re}),mn=(Z,re={})=>{const se=Me(r,Z),Ce=se&&se._f;if(Ce){const oe=Ce.refs?Ce.refs[0]:Ce.ref;oe.focus&&setTimeout(()=>{oe.focus(),re.shouldSelect&&Xr(oe.select)&&oe.select()})}},qn=Z=>{n={...n,...Z}},Pn={control:{register:Ee,unregister:ve,getFieldState:V,handleSubmit:pt,setError:X,_subscribe:ge,_runSchema:D,_updateIsValidating:k,_focusError:Pe,_getWatch:K,_getDirty:G,_setValid:C,_setFieldArray:E,_setDisabledField:xe,_setErrors:I,_getFieldArray:B,_reset:tt,_resetDefaultValues:()=>Xr(t.defaultValues)&&t.defaultValues().then(Z=>{Vt(Z,t.resetOptions),y.state.next({isLoading:!1})}),_removeUnmounted:ee,_disableForm:Fe,_subjects:y,_proxyFormState:h,get _fields(){return r},get _formValues(){return o},get _state(){return a},set _state(Z){a=Z},get _defaultValues(){return i},get _names(){return l},set _names(Z){l=Z},get _formState(){return n},get _options(){return t},set _options(Z){t={...t,...Z}}},subscribe:Q,trigger:$,register:Ee,handleSubmit:pt,watch:de,setValue:W,getValues:P,reset:Vt,resetField:dt,clearErrors:O,unregister:ve,setError:X,setFocus:mn,getFieldState:V};return{...Pn,formControl:Pn}}var Qs=()=>{if(typeof crypto<"u"&&crypto.randomUUID)return crypto.randomUUID();const e=typeof performance>"u"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const n=(Math.random()*16+e)%16|0;return(t=="x"?n:n&3|8).toString(16)})},n1=(e,t,n={})=>n.shouldFocus||fn(n.shouldFocus)?n.focusName||`${e}.${fn(n.focusIndex)?t:n.focusIndex}.`:"",r1=(e,t)=>[...e,..._i(t)],i1=e=>Array.isArray(e)?e.map(()=>{}):void 0;function o1(e,t,n){return[...e.slice(0,t),..._i(n),...e.slice(t)]}var a1=(e,t,n)=>Array.isArray(e)?(fn(e[n])&&(e[n]=void 0),e.splice(n,0,e.splice(t,1)[0]),e):[],s1=(e,t)=>[..._i(t),..._i(e)];function Fhe(e,t){let n=0;const r=[...e];for(const i of t)r.splice(i-n,1),n++;return Ex(r).length?r:[]}var l1=(e,t)=>fn(t)?[]:Fhe(e,_i(t).sort((n,r)=>n-r)),c1=(e,t,n)=>{[e[t],e[n]]=[e[n],e[t]]},O2=(e,t,n)=>(e[t]=n,e);function vj(e){const t=jx(),{control:n=t,name:r,keyName:i="id",shouldUnregister:o,rules:a}=e,[l,d]=J.useState(n._getFieldArray(r)),f=J.useRef(n._getFieldArray(r).map(Qs)),m=J.useRef(!1);n._names.array.add(r),J.useMemo(()=>a&&l.length>=0&&n.register(r,a),[n,r,l.length,a]),Rx(()=>n._subjects.array.subscribe({next:({values:I,name:A})=>{if(A===r||!A){const T=Me(I,r);Array.isArray(T)&&(d(T),f.current=T.map(Qs))}}}).unsubscribe,[n,r]);const h=J.useCallback(I=>{m.current=!0,n._setFieldArray(r,I)},[n,r]),v=(I,A)=>{const T=_i(xn(I)),N=r1(n._getFieldArray(r),T);n._names.focus=n1(r,N.length-1,A),f.current=r1(f.current,T.map(Qs)),h(N),d(N),n._setFieldArray(r,N,r1,{argA:i1(I)})},y=(I,A)=>{const T=_i(xn(I)),N=s1(n._getFieldArray(r),T);n._names.focus=n1(r,0,A),f.current=s1(f.current,T.map(Qs)),h(N),d(N),n._setFieldArray(r,N,s1,{argA:i1(I)})},x=I=>{const A=l1(n._getFieldArray(r),I);f.current=l1(f.current,I),h(A),d(A),!Array.isArray(Me(n._fields,r))&&Wt(n._fields,r,void 0),n._setFieldArray(r,A,l1,{argA:I})},S=(I,A,T)=>{const N=_i(xn(A)),D=o1(n._getFieldArray(r),I,N);n._names.focus=n1(r,I,T),f.current=o1(f.current,I,N.map(Qs)),h(D),d(D),n._setFieldArray(r,D,o1,{argA:I,argB:i1(A)})},C=(I,A)=>{const T=n._getFieldArray(r);c1(T,I,A),c1(f.current,I,A),h(T),d(T),n._setFieldArray(r,T,c1,{argA:I,argB:A},!1)},k=(I,A)=>{const T=n._getFieldArray(r);a1(T,I,A),a1(f.current,I,A),h(T),d(T),n._setFieldArray(r,T,a1,{argA:I,argB:A},!1)},E=(I,A)=>{const T=xn(A),N=O2(n._getFieldArray(r),I,T);f.current=[...N].map((D,L)=>!D||L===I?Qs():f.current[L]),h(N),d([...N]),n._setFieldArray(r,N,O2,{argA:I,argB:T},!0,!1)},j=I=>{const A=_i(xn(I));f.current=A.map(Qs),h([...A]),d([...A]),n._setFieldArray(r,[...A],T=>T,{},!0,!1)};return J.useEffect(()=>{if(n._state.action=!1,GC(r,n._names)&&n._subjects.state.next({...n._formState}),m.current&&(!jd(n._options.mode).isOnSubmit||n._formState.isSubmitted)&&!jd(n._options.reValidateMode).isOnSubmit)if(n._options.resolver)n._runSchema([r]).then(I=>{n._updateIsValidating([r]);const A=Me(I.errors,r),T=Me(n._formState.errors,r);(T?!A&&T.type||A&&(T.type!==A.type||T.message!==A.message):A&&A.type)&&(A?Wt(n._formState.errors,r,A):Yn(n._formState.errors,r),n._subjects.state.next({errors:n._formState.errors}))});else{const I=Me(n._fields,r);I&&I._f&&!(jd(n._options.reValidateMode).isOnSubmit&&jd(n._options.mode).isOnSubmit)&&ZC(I,n._names.disabled,n._formValues,n._options.criteriaMode===jo.all,n._options.shouldUseNativeValidation,!0).then(A=>!Dr(A)&&n._subjects.state.next({errors:_6(n._formState.errors,A,r)}))}n._subjects.state.next({name:r,values:xn(n._formValues)}),n._names.focus&&Md(n._fields,(I,A)=>{if(n._names.focus&&A.startsWith(n._names.focus)&&I.focus)return I.focus(),1}),n._names.focus="",n._setValid(),m.current=!1},[l,r,n]),J.useEffect(()=>(!Me(n._formValues,r)&&n._setFieldArray(r),()=>{const I=(A,T)=>{const N=Me(n._fields,A);N&&N._f&&(N._f.mount=T)};n._options.shouldUnregister||o?n.unregister(r):I(r,!1)}),[r,n,i,o]),{swap:J.useCallback(C,[h,r,n]),move:J.useCallback(k,[h,r,n]),prepend:J.useCallback(y,[h,r,n]),append:J.useCallback(v,[h,r,n]),remove:J.useCallback(x,[h,r,n]),insert:J.useCallback(S,[h,r,n]),update:J.useCallback(E,[h,r,n]),replace:J.useCallback(j,[h,r,n]),fields:J.useMemo(()=>l.map((I,A)=>({...I,[i]:f.current[A]||Qs()})),[l,i])}}function Qt(e={}){const t=J.useRef(void 0),n=J.useRef(void 0),[r,i]=J.useState({isDirty:!1,isValidating:!1,isLoading:Xr(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:Xr(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:r},e.defaultValues&&!Xr(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:a,...l}=Lhe(e);t.current={...l,formState:r}}const o=t.current.control;return o._options=e,Rx(()=>{const a=o._subscribe({formState:o._proxyFormState,callback:()=>i({...o._formState}),reRenderRoot:!0});return i(l=>({...l,isReady:!0})),o._formState.isReady=!0,a},[o]),J.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),J.useEffect(()=>{e.mode&&(o._options.mode=e.mode),e.reValidateMode&&(o._options.reValidateMode=e.reValidateMode)},[o,e.mode,e.reValidateMode]),J.useEffect(()=>{e.errors&&(o._setErrors(e.errors),o._focusError())},[o,e.errors]),J.useEffect(()=>{e.shouldUnregister&&o._subjects.state.next({values:o._getWatch()})},[o,e.shouldUnregister]),J.useEffect(()=>{if(o._proxyFormState.isDirty){const a=o._getDirty();a!==r.isDirty&&o._subjects.state.next({isDirty:a})}},[o,r.isDirty]),J.useEffect(()=>{var a;e.values&&!Wo(e.values,n.current)?(o._reset(e.values,{keepFieldsRef:!0,...o._options.resetOptions}),!((a=o._options.resetOptions)===null||a===void 0)&&a.keepIsValid||o._setValid(),n.current=e.values,i(l=>({...l}))):o._resetDefaultValues()},[o,e.values]),J.useEffect(()=>{o._state.mount||(o._setValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()}),t.current.formState=J.useMemo(()=>g6(r,o),[o,r]),t.current}const en=Ehe,C6=b.createContext({}),k6=b.createContext({});function Ix(){const e=b.useContext(C6),t=b.useContext(k6),{getFieldState:n}=khe(),r=fj({name:e.name}),i=n(e.name,r);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:o}=t;return{id:o,name:e.name,formItemId:`${o}-form-item`,formDescriptionId:`${o}-form-item-description`,formMessageId:`${o}-form-item-message`,...i}}function Te({...e}){const{error:t,formItemId:n,formDescriptionId:r,formMessageId:i}=Ix();return c.jsx(mE,{"data-slot":"form-control",id:n,"aria-describedby":t?`${r} ${i}`:`${r}`,"aria-invalid":!!t,...e})}function Ne({...e}){return c.jsx(C6,{value:{name:e.name},children:c.jsx(Che,{...e})})}function je({className:e,...t}){const n=b.useId();return c.jsx(k6,{value:{id:n},children:c.jsx("div",{"data-slot":"form-item",className:Ve("grid gap-2",e),...t})})}var Uhe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],E6=Uhe.reduce((e,t)=>{const n=P4(`Primitive.${t}`),r=b.forwardRef((i,o)=>{const{asChild:a,...l}=i,d=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(d,{...l,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Vhe="Label",j6=b.forwardRef((e,t)=>c.jsx(E6.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));j6.displayName=Vhe;var Bhe=j6;function Of({className:e,...t}){return c.jsx(Bhe,{"data-slot":"label",className:Ve("text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}function Re({className:e,...t}){const{error:n,formItemId:r}=Ix();return c.jsx(Of,{"data-slot":"form-label","data-error":!!n,className:Ve("data-[error=true]:text-destructive",e),htmlFor:r,...t})}function Ie({className:e,...t}){const{error:n,formMessageId:r}=Ix(),i=n?String(n?.message):t.children;return i?c.jsx("p",{"data-slot":"form-message",id:r,className:Ve("text-destructive text-sm",e),...t,children:i}):null}function ze({className:e,type:t,...n}){return c.jsx("input",{type:t,"data-slot":"input",className:Ve(`border-input file:text-foreground placeholder:text-muted-foreground selection:bg-purple
39
+ selection:text-primary-foreground
40
+ dark:aria-invalid:outline-destructive dark:aria-invalid:ring-destructive/50 ring-ring/10
41
+ dark:ring-ring/20 dark:outline-ring/40 outline-ring/50 aria-invalid:outline-destructive/60
42
+ aria-invalid:ring-destructive/20 aria-invalid:border-destructive/60 dark:aria-invalid:border-destructive
43
+ flex h-9 w-full min-w-0 rounded-md border bg-grey-700 px-3 py-1 text-base text-white
44
+ file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium
45
+ focus-visible:ring-1 focus-visible:outline-none focus-visible:ring-purple disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50
46
+ aria-invalid:focus-visible:ring-[1px] aria-invalid:focus-visible:outline-none md:text-sm dark:aria-invalid:focus-visible:ring-1`,e),...n})}const Tx=["RUNNING"],yj=["TERMINATING","TERMINATED","REMOVED"];function Hhe(){return"https://fabric.harper.fast/#/?createCluster="+encodeURIComponent(JSON.stringify({deploymentDescription:"Self-Hosted",performanceDescription:"Self Supported and Managed",instances:[{secure:String(location.protocol==="https:"),fqdn:location.hostname,port:parseInt(location.port,10)}]}))}async function YC({username:e,password:t,instanceClient:n,entityId:r}){const i={username:e,password:t};Ct.checkForBasicAuth(r)&&(n.defaults.auth=i,n.defaults.withCredentials=!1);const{data:{message:o}}=await n.post("/",{operation:"login",username:e,password:t});if(!Ct.checkForBasicAuth(r))try{const d=await gl({instanceClient:n});return{message:o,user:d}}catch(d){console.error("Failed to get user after login, trying basic auth",d)}try{n.defaults.auth=i,n.defaults.withCredentials=!1;const d=await gl({instanceClient:n,auth:i});return Ct.flagForBasicAuth(r,i),{message:o,user:d}}catch(d){throw n.defaults.auth=void 0,n.defaults.withCredentials=!0,d}const a=ls({id:r,forceFabricConnect:!0}),l=await gl({instanceClient:a});return Ct.flagForFabricConnect(r,!0),{message:o,user:l,instanceClient:a}}function qhe(){return ot({mutationFn:YC})}function Khe({cluster:e,instance:t,instanceParams:n}){const r=Cn(),i=_n(),{redirect:o}=Nr({strict:!1}),{mutate:a,isPending:l}=qhe(),d=b.useCallback(async f=>{a({...f,...n},{onSuccess:async({message:m,user:h})=>{if(ye.success(m),e?.instances?.length&&!t)for(const y of e.instances)Ct.setUserForEntity(y,h);const v=Mn;Ct.setUserForEntity(v,h),i.invalidate(),await r({to:o?.startsWith("/")?o:Ea})}})},[e,t,n,r,o,i,a]);return{isPending:l,submitForm:d}}async function bj(e){const{data:t}=await $t.get(`/Cluster/${e}`);return t}function Aa(e,t){return{queryKey:[e],queryFn:()=>bj(e),retry:!1,staleTime:1900,enabled:!!e,refetchInterval:t?t===!0?1e4:t:void 0}}const R6=Object.freeze({status:"aborted"});function ae(e,t,n){function r(l,d){if(l._zod||Object.defineProperty(l,"_zod",{value:{def:d,constr:a,traits:new Set},enumerable:!1}),l._zod.traits.has(e))return;l._zod.traits.add(e),t(l,d);const f=a.prototype,m=Object.keys(f);for(let h=0;h<m.length;h++){const v=m[h];v in l||(l[v]=f[v].bind(l))}}const i=n?.Parent??Object;class o extends i{}Object.defineProperty(o,"name",{value:e});function a(l){var d;const f=n?.Parent?new o:this;r(f,l),(d=f._zod).deferred??(d.deferred=[]);for(const m of f._zod.deferred)m();return f}return Object.defineProperty(a,"init",{value:r}),Object.defineProperty(a,Symbol.hasInstance,{value:l=>n?.Parent&&l instanceof n.Parent?!0:l?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}const I6=Symbol("zod_brand");class Oc extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Nx extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const eb={};function Fr(e){return e&&Object.assign(eb,e),eb}function Ghe(e){return e}function Zhe(e){return e}function Yhe(e){}function Whe(e){throw new Error("Unexpected value in exhaustive check")}function Xhe(e){}function xj(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,i])=>t.indexOf(+r)===-1).map(([r,i])=>i)}function Ae(e,t="|"){return e.map(n=>it(n)).join(t)}function tb(e,t){return typeof t=="bigint"?t.toString():t}function bh(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function du(e){return e==null}function Ax(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function T6(e,t){const n=(e.toString().split(".")[1]||"").length,r=t.toString();let i=(r.split(".")[1]||"").length;if(i===0&&/\d?e-\d?/.test(r)){const d=r.match(/\d?e-(\d?)/);d?.[1]&&(i=Number.parseInt(d[1]))}const o=n>i?n:i,a=Number.parseInt(e.toFixed(o).replace(".","")),l=Number.parseInt(t.toFixed(o).replace(".",""));return a%l/10**o}const D2=Symbol("evaluating");function _t(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==D2)return r===void 0&&(r=D2,r=n()),r},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}function Jhe(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function Fl(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Oa(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function Qhe(e){return Oa(e._zod.def)}function ege(e,t){return t?t.reduce((n,r)=>n?.[r],e):e}function tge(e){const t=Object.keys(e),n=t.map(r=>e[r]);return Promise.all(n).then(r=>{const i={};for(let o=0;o<t.length;o++)i[t[o]]=r[o];return i})}function nge(e=10){const t="abcdefghijklmnopqrstuvwxyz";let n="";for(let r=0;r<e;r++)n+=t[Math.floor(Math.random()*t.length)];return n}function WC(e){return JSON.stringify(e)}function N6(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const wj="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function nf(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const A6=bh(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Hc(e){if(nf(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(nf(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function Ox(e){return Hc(e)?{...e}:Array.isArray(e)?[...e]:e}function rge(e){let t=0;for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}const ige=e=>{const t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},nb=new Set(["string","number","symbol"]),O6=new Set(["string","number","bigint","boolean","symbol","undefined"]);function xs(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Uo(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function _e(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function oge(e){let t;return new Proxy({},{get(n,r,i){return t??(t=e()),Reflect.get(t,r,i)},set(n,r,i,o){return t??(t=e()),Reflect.set(t,r,i,o)},has(n,r){return t??(t=e()),Reflect.has(t,r)},deleteProperty(n,r){return t??(t=e()),Reflect.deleteProperty(t,r)},ownKeys(n){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,r){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,r)},defineProperty(n,r,i){return t??(t=e()),Reflect.defineProperty(t,r,i)}})}function it(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function D6(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const $6={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},P6={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function M6(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const o=Oa(e._zod.def,{get shape(){const a={};for(const l in t){if(!(l in n.shape))throw new Error(`Unrecognized key: "${l}"`);t[l]&&(a[l]=n.shape[l])}return Fl(this,"shape",a),a},checks:[]});return Uo(e,o)}function z6(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const o=Oa(e._zod.def,{get shape(){const a={...e._zod.def.shape};for(const l in t){if(!(l in n.shape))throw new Error(`Unrecognized key: "${l}"`);t[l]&&delete a[l]}return Fl(this,"shape",a),a},checks:[]});return Uo(e,o)}function L6(e,t){if(!Hc(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const o=e._zod.def.shape;for(const a in t)if(Object.getOwnPropertyDescriptor(o,a)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const i=Oa(e._zod.def,{get shape(){const o={...e._zod.def.shape,...t};return Fl(this,"shape",o),o}});return Uo(e,i)}function F6(e,t){if(!Hc(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=Oa(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return Fl(this,"shape",r),r}});return Uo(e,n)}function U6(e,t){const n=Oa(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return Fl(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:[]});return Uo(e,n)}function V6(e,t,n){const i=t._zod.def.checks;if(i&&i.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const a=Oa(t._zod.def,{get shape(){const l=t._zod.def.shape,d={...l};if(n)for(const f in n){if(!(f in l))throw new Error(`Unrecognized key: "${f}"`);n[f]&&(d[f]=e?new e({type:"optional",innerType:l[f]}):l[f])}else for(const f in l)d[f]=e?new e({type:"optional",innerType:l[f]}):l[f];return Fl(this,"shape",d),d},checks:[]});return Uo(t,a)}function B6(e,t,n){const r=Oa(t._zod.def,{get shape(){const i=t._zod.def.shape,o={...i};if(n)for(const a in n){if(!(a in o))throw new Error(`Unrecognized key: "${a}"`);n[a]&&(o[a]=new e({type:"nonoptional",innerType:i[a]}))}else for(const a in i)o[a]=new e({type:"nonoptional",innerType:i[a]});return Fl(this,"shape",o),o}});return Uo(t,r)}function kc(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Xo(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function sm(e){return typeof e=="string"?e:e?.message}function zo(e,t,n){const r={...e,path:e.path??[]};if(!e.message){const i=sm(e.inst?._zod.def?.error?.(e))??sm(t?.error?.(e))??sm(n.customError?.(e))??sm(n.localeError?.(e))??"Invalid input";r.message=i}return delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function Dx(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function $x(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function ct(e){const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";const n=e;if(n&&Object.getPrototypeOf(n)!==Object.prototype&&"constructor"in n&&n.constructor)return n.constructor.name}}return t}function rf(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}function age(e){return Object.entries(e).filter(([t,n])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function H6(e){const t=atob(e),n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return n}function q6(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function sge(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-t.length%4)%4);return H6(t+n)}function lge(e){return q6(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function cge(e){const t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");const n=new Uint8Array(t.length/2);for(let r=0;r<t.length;r+=2)n[r/2]=Number.parseInt(t.slice(r,r+2),16);return n}function uge(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}class dge{constructor(...t){}}const K6=Object.freeze(Object.defineProperty({__proto__:null,BIGINT_FORMAT_RANGES:P6,Class:dge,NUMBER_FORMAT_RANGES:$6,aborted:kc,allowsEval:A6,assert:Xhe,assertEqual:Ghe,assertIs:Yhe,assertNever:Whe,assertNotEqual:Zhe,assignProp:Fl,base64ToUint8Array:H6,base64urlToUint8Array:sge,cached:bh,captureStackTrace:wj,cleanEnum:age,cleanRegex:Ax,clone:Uo,cloneDef:Qhe,createTransparentProxy:oge,defineLazy:_t,esc:WC,escapeRegex:xs,extend:L6,finalizeIssue:zo,floatSafeRemainder:T6,getElementAtPath:ege,getEnumValues:xj,getLengthableOrigin:$x,getParsedType:ige,getSizableOrigin:Dx,hexToUint8Array:cge,isObject:nf,isPlainObject:Hc,issue:rf,joinValues:Ae,jsonStringifyReplacer:tb,merge:U6,mergeDefs:Oa,normalizeParams:_e,nullish:du,numKeys:rge,objectClone:Jhe,omit:z6,optionalKeys:D6,parsedType:ct,partial:V6,pick:M6,prefixIssues:Xo,primitiveTypes:O6,promiseAllObject:tge,propertyKeyTypes:nb,randomString:nge,required:B6,safeExtend:F6,shallowClone:Ox,slugify:N6,stringifyPrimitive:it,uint8ArrayToBase64:q6,uint8ArrayToBase64url:lge,uint8ArrayToHex:uge,unwrapMessage:sm},Symbol.toStringTag,{value:"Module"})),G6=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,tb,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Px=ae("$ZodError",G6),io=ae("$ZodError",G6,{Parent:Error});function Sj(e,t=n=>n.message){const n={},r=[];for(const i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function _j(e,t=n=>n.message){const n={_errors:[]},r=i=>{for(const o of i.issues)if(o.code==="invalid_union"&&o.errors.length)o.errors.map(a=>r({issues:a}));else if(o.code==="invalid_key")r({issues:o.issues});else if(o.code==="invalid_element")r({issues:o.issues});else if(o.path.length===0)n._errors.push(t(o));else{let a=n,l=0;for(;l<o.path.length;){const d=o.path[l];l===o.path.length-1?(a[d]=a[d]||{_errors:[]},a[d]._errors.push(t(o))):a[d]=a[d]||{_errors:[]},a=a[d],l++}}};return r(e),n}function Z6(e,t=n=>n.message){const n={errors:[]},r=(i,o=[])=>{var a,l;for(const d of i.issues)if(d.code==="invalid_union"&&d.errors.length)d.errors.map(f=>r({issues:f},d.path));else if(d.code==="invalid_key")r({issues:d.issues},d.path);else if(d.code==="invalid_element")r({issues:d.issues},d.path);else{const f=[...o,...d.path];if(f.length===0){n.errors.push(t(d));continue}let m=n,h=0;for(;h<f.length;){const v=f[h],y=h===f.length-1;typeof v=="string"?(m.properties??(m.properties={}),(a=m.properties)[v]??(a[v]={errors:[]}),m=m.properties[v]):(m.items??(m.items=[]),(l=m.items)[v]??(l[v]={errors:[]}),m=m.items[v]),y&&m.errors.push(t(d)),h++}}};return r(e),n}function Y6(e){const t=[],n=e.map(r=>typeof r=="object"?r.key:r);for(const r of n)typeof r=="number"?t.push(`[${r}]`):typeof r=="symbol"?t.push(`[${JSON.stringify(String(r))}]`):/[^\w$]/.test(r)?t.push(`[${JSON.stringify(r)}]`):(t.length&&t.push("."),t.push(r));return t.join("")}function W6(e){const t=[],n=[...e.issues].sort((r,i)=>(r.path??[]).length-(i.path??[]).length);for(const r of n)t.push(`✖ ${r.message}`),r.path?.length&&t.push(` → at ${Y6(r.path)}`);return t.join(`
47
+ `)}const xh=e=>(t,n,r,i)=>{const o=r?Object.assign(r,{async:!1}):{async:!1},a=t._zod.run({value:n,issues:[]},o);if(a instanceof Promise)throw new Oc;if(a.issues.length){const l=new(i?.Err??e)(a.issues.map(d=>zo(d,o,Fr())));throw wj(l,i?.callee),l}return a.value},rb=xh(io),wh=e=>async(t,n,r,i)=>{const o=r?Object.assign(r,{async:!0}):{async:!0};let a=t._zod.run({value:n,issues:[]},o);if(a instanceof Promise&&(a=await a),a.issues.length){const l=new(i?.Err??e)(a.issues.map(d=>zo(d,o,Fr())));throw wj(l,i?.callee),l}return a.value},ib=wh(io),Sh=e=>(t,n,r)=>{const i=r?{...r,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},i);if(o instanceof Promise)throw new Oc;return o.issues.length?{success:!1,error:new(e??Px)(o.issues.map(a=>zo(a,i,Fr())))}:{success:!0,data:o.value}},X6=Sh(io),_h=e=>async(t,n,r)=>{const i=r?Object.assign(r,{async:!0}):{async:!0};let o=t._zod.run({value:n,issues:[]},i);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map(a=>zo(a,i,Fr())))}:{success:!0,data:o.value}},J6=_h(io),Cj=e=>(t,n,r)=>{const i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return xh(e)(t,n,i)},fge=Cj(io),kj=e=>(t,n,r)=>xh(e)(t,n,r),pge=kj(io),Ej=e=>async(t,n,r)=>{const i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return wh(e)(t,n,i)},mge=Ej(io),jj=e=>async(t,n,r)=>wh(e)(t,n,r),hge=jj(io),Rj=e=>(t,n,r)=>{const i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Sh(e)(t,n,i)},gge=Rj(io),Ij=e=>(t,n,r)=>Sh(e)(t,n,r),vge=Ij(io),Tj=e=>async(t,n,r)=>{const i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return _h(e)(t,n,i)},yge=Tj(io),Nj=e=>async(t,n,r)=>_h(e)(t,n,r),bge=Nj(io),Q6=/^[cC][^\s-]{8,}$/,e3=/^[0-9a-z]+$/,t3=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,n3=/^[0-9a-vA-V]{20}$/,r3=/^[A-Za-z0-9]{27}$/,i3=/^[a-zA-Z0-9_-]{21}$/,o3=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,xge=/^[-+]?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)?)??$/,a3=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,of=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,wge=of(4),Sge=of(6),_ge=of(7),s3=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Cge=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,kge=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,l3=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,Ege=l3,jge=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Rge="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function c3(){return new RegExp(Rge,"u")}const u3=/^(?:(?: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])$/,d3=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,f3=e=>{const t=xs(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},p3=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,m3=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,h3=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Aj=/^[A-Za-z0-9_-]*$/,g3=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,v3=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,y3=/^\+[1-9]\d{6,14}$/,b3="(?:(?:\\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])))",x3=new RegExp(`^${b3}$`);function w3(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function S3(e){return new RegExp(`^${w3(e)}$`)}function _3(e){const t=w3({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${b3}T(?:${r})$`)}const C3=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},k3=/^-?\d+n?$/,E3=/^-?\d+$/,Oj=/^-?\d+(?:\.\d+)?$/,j3=/^(?:true|false)$/i,R3=/^null$/i,I3=/^undefined$/i,T3=/^[^A-Z]*$/,N3=/^[^a-z]*$/,A3=/^[0-9a-fA-F]*$/;function Ch(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function kh(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}const Ige=/^[0-9a-fA-F]{32}$/,Tge=Ch(22,"=="),Nge=kh(22),Age=/^[0-9a-fA-F]{40}$/,Oge=Ch(27,"="),Dge=kh(27),$ge=/^[0-9a-fA-F]{64}$/,Pge=Ch(43,"="),Mge=kh(43),zge=/^[0-9a-fA-F]{96}$/,Lge=Ch(64,""),Fge=kh(64),Uge=/^[0-9a-fA-F]{128}$/,Vge=Ch(86,"=="),Bge=kh(86),Dj=Object.freeze(Object.defineProperty({__proto__:null,base64:h3,base64url:Aj,bigint:k3,boolean:j3,browserEmail:jge,cidrv4:p3,cidrv6:m3,cuid:Q6,cuid2:e3,date:x3,datetime:_3,domain:v3,duration:o3,e164:y3,email:s3,emoji:c3,extendedDuration:xge,guid:a3,hex:A3,hostname:g3,html5Email:Cge,idnEmail:Ege,integer:E3,ipv4:u3,ipv6:d3,ksuid:r3,lowercase:T3,mac:f3,md5_base64:Tge,md5_base64url:Nge,md5_hex:Ige,nanoid:i3,null:R3,number:Oj,rfc5322Email:kge,sha1_base64:Oge,sha1_base64url:Dge,sha1_hex:Age,sha256_base64:Pge,sha256_base64url:Mge,sha256_hex:$ge,sha384_base64:Lge,sha384_base64url:Fge,sha384_hex:zge,sha512_base64:Vge,sha512_base64url:Bge,sha512_hex:Uge,string:C3,time:S3,ulid:t3,undefined:I3,unicodeEmail:l3,uppercase:N3,uuid:of,uuid4:wge,uuid6:Sge,uuid7:_ge,xid:n3},Symbol.toStringTag,{value:"Module"})),On=ae("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),O3={number:"number",bigint:"bigint",object:"date"},$j=ae("$ZodCheckLessThan",(e,t)=>{On.init(e,t);const n=O3[typeof t.value];e._zod.onattach.push(r=>{const i=r._zod.bag,o=(t.inclusive?i.maximum:i.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<o&&(t.inclusive?i.maximum=t.value:i.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Pj=ae("$ZodCheckGreaterThan",(e,t)=>{On.init(e,t);const n=O3[typeof t.value];e._zod.onattach.push(r=>{const i=r._zod.bag,o=(t.inclusive?i.minimum:i.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>o&&(t.inclusive?i.minimum=t.value:i.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),D3=ae("$ZodCheckMultipleOf",(e,t)=>{On.init(e,t),e._zod.onattach.push(n=>{var r;(r=n._zod.bag).multipleOf??(r.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):T6(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),$3=ae("$ZodCheckNumberFormat",(e,t)=>{On.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),r=n?"int":"number",[i,o]=$6[t.format];e._zod.onattach.push(a=>{const l=a._zod.bag;l.format=t.format,l.minimum=i,l.maximum=o,n&&(l.pattern=E3)}),e._zod.check=a=>{const l=a.value;if(n){if(!Number.isInteger(l)){a.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:l,inst:e});return}if(!Number.isSafeInteger(l)){l>0?a.issues.push({input:l,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}):a.issues.push({input:l,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}l<i&&a.issues.push({origin:"number",input:l,code:"too_small",minimum:i,inclusive:!0,inst:e,continue:!t.abort}),l>o&&a.issues.push({origin:"number",input:l,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),P3=ae("$ZodCheckBigIntFormat",(e,t)=>{On.init(e,t);const[n,r]=P6[t.format];e._zod.onattach.push(i=>{const o=i._zod.bag;o.format=t.format,o.minimum=n,o.maximum=r}),e._zod.check=i=>{const o=i.value;o<n&&i.issues.push({origin:"bigint",input:o,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),o>r&&i.issues.push({origin:"bigint",input:o,code:"too_big",maximum:r,inclusive:!0,inst:e,continue:!t.abort})}}),M3=ae("$ZodCheckMaxSize",(e,t)=>{var n;On.init(e,t),(n=e._zod.def).when??(n.when=r=>{const i=r.value;return!du(i)&&i.size!==void 0}),e._zod.onattach.push(r=>{const i=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<i&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const i=r.value;i.size<=t.maximum||r.issues.push({origin:Dx(i),code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),z3=ae("$ZodCheckMinSize",(e,t)=>{var n;On.init(e,t),(n=e._zod.def).when??(n.when=r=>{const i=r.value;return!du(i)&&i.size!==void 0}),e._zod.onattach.push(r=>{const i=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>i&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const i=r.value;i.size>=t.minimum||r.issues.push({origin:Dx(i),code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),L3=ae("$ZodCheckSizeEquals",(e,t)=>{var n;On.init(e,t),(n=e._zod.def).when??(n.when=r=>{const i=r.value;return!du(i)&&i.size!==void 0}),e._zod.onattach.push(r=>{const i=r._zod.bag;i.minimum=t.size,i.maximum=t.size,i.size=t.size}),e._zod.check=r=>{const i=r.value,o=i.size;if(o===t.size)return;const a=o>t.size;r.issues.push({origin:Dx(i),...a?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),F3=ae("$ZodCheckMaxLength",(e,t)=>{var n;On.init(e,t),(n=e._zod.def).when??(n.when=r=>{const i=r.value;return!du(i)&&i.length!==void 0}),e._zod.onattach.push(r=>{const i=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<i&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const i=r.value;if(i.length<=t.maximum)return;const a=$x(i);r.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),U3=ae("$ZodCheckMinLength",(e,t)=>{var n;On.init(e,t),(n=e._zod.def).when??(n.when=r=>{const i=r.value;return!du(i)&&i.length!==void 0}),e._zod.onattach.push(r=>{const i=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>i&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const i=r.value;if(i.length>=t.minimum)return;const a=$x(i);r.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),V3=ae("$ZodCheckLengthEquals",(e,t)=>{var n;On.init(e,t),(n=e._zod.def).when??(n.when=r=>{const i=r.value;return!du(i)&&i.length!==void 0}),e._zod.onattach.push(r=>{const i=r._zod.bag;i.minimum=t.length,i.maximum=t.length,i.length=t.length}),e._zod.check=r=>{const i=r.value,o=i.length;if(o===t.length)return;const a=$x(i),l=o>t.length;r.issues.push({origin:a,...l?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),Eh=ae("$ZodCheckStringFormat",(e,t)=>{var n,r;On.init(e,t),e._zod.onattach.push(i=>{const o=i._zod.bag;o.format=t.format,t.pattern&&(o.patterns??(o.patterns=new Set),o.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=i=>{t.pattern.lastIndex=0,!t.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:t.format,input:i.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),B3=ae("$ZodCheckRegex",(e,t)=>{Eh.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),H3=ae("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=T3),Eh.init(e,t)}),q3=ae("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=N3),Eh.init(e,t)}),K3=ae("$ZodCheckIncludes",(e,t)=>{On.init(e,t);const n=xs(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(i=>{const o=i._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(r)}),e._zod.check=i=>{i.value.includes(t.includes,t.position)||i.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:i.value,inst:e,continue:!t.abort})}}),G3=ae("$ZodCheckStartsWith",(e,t)=>{On.init(e,t);const n=new RegExp(`^${xs(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const i=r._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(n)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),Z3=ae("$ZodCheckEndsWith",(e,t)=>{On.init(e,t);const n=new RegExp(`.*${xs(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const i=r._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(n)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}});function $2(e,t,n){e.issues.length&&t.issues.push(...Xo(n,e.issues))}const Y3=ae("$ZodCheckProperty",(e,t)=>{On.init(e,t),e._zod.check=n=>{const r=t.schema._zod.run({value:n.value[t.property],issues:[]},{});if(r instanceof Promise)return r.then(i=>$2(i,n,t.property));$2(r,n,t.property)}}),W3=ae("$ZodCheckMimeType",(e,t)=>{On.init(e,t);const n=new Set(t.mime);e._zod.onattach.push(r=>{r._zod.bag.mime=t.mime}),e._zod.check=r=>{n.has(r.value.type)||r.issues.push({code:"invalid_value",values:t.mime,input:r.value.type,inst:e,continue:!t.abort})}}),X3=ae("$ZodCheckOverwrite",(e,t)=>{On.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class J3{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(`
48
+ `).filter(a=>a),i=Math.min(...r.map(a=>a.length-a.trimStart().length)),o=r.map(a=>a.slice(i)).map(a=>" ".repeat(this.indent*2)+a);for(const a of o)this.content.push(a)}compile(){const t=Function,n=this?.args,i=[...(this?.content??[""]).map(o=>` ${o}`)];return new t(...n,i.join(`
49
+ `))}}const Q3={major:4,minor:3,patch:6},gt=ae("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Q3;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const i of r)for(const o of i._zod.onattach)o(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const i=(a,l,d)=>{let f=kc(a),m;for(const h of l){if(h._zod.def.when){if(!h._zod.def.when(a))continue}else if(f)continue;const v=a.issues.length,y=h._zod.check(a);if(y instanceof Promise&&d?.async===!1)throw new Oc;if(m||y instanceof Promise)m=(m??Promise.resolve()).then(async()=>{await y,a.issues.length!==v&&(f||(f=kc(a,v)))});else{if(a.issues.length===v)continue;f||(f=kc(a,v))}}return m?m.then(()=>a):a},o=(a,l,d)=>{if(kc(a))return a.aborted=!0,a;const f=i(l,r,d);if(f instanceof Promise){if(d.async===!1)throw new Oc;return f.then(m=>e._zod.parse(m,d))}return e._zod.parse(f,d)};e._zod.run=(a,l)=>{if(l.skipChecks)return e._zod.parse(a,l);if(l.direction==="backward"){const f=e._zod.parse({value:a.value,issues:[]},{...l,skipChecks:!0});return f instanceof Promise?f.then(m=>o(m,a,l)):o(f,a,l)}const d=e._zod.parse(a,l);if(d instanceof Promise){if(l.async===!1)throw new Oc;return d.then(f=>i(f,r,l))}return i(d,r,l)}}_t(e,"~standard",()=>({validate:i=>{try{const o=X6(e,i);return o.success?{value:o.data}:{issues:o.error?.issues}}catch{return J6(e,i).then(a=>a.success?{value:a.data}:{issues:a.error?.issues})}},vendor:"zod",version:1}))}),jh=ae("$ZodString",(e,t)=>{gt.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??C3(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),vn=ae("$ZodStringFormat",(e,t)=>{Eh.init(e,t),jh.init(e,t)}),e5=ae("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=a3),vn.init(e,t)}),t5=ae("$ZodUUID",(e,t)=>{if(t.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=of(r))}else t.pattern??(t.pattern=of());vn.init(e,t)}),n5=ae("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=s3),vn.init(e,t)}),r5=ae("$ZodURL",(e,t)=>{vn.init(e,t),e._zod.check=n=>{try{const r=n.value.trim(),i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=i.href:n.value=r;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),i5=ae("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=c3()),vn.init(e,t)}),o5=ae("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=i3),vn.init(e,t)}),a5=ae("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Q6),vn.init(e,t)}),s5=ae("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=e3),vn.init(e,t)}),l5=ae("$ZodULID",(e,t)=>{t.pattern??(t.pattern=t3),vn.init(e,t)}),c5=ae("$ZodXID",(e,t)=>{t.pattern??(t.pattern=n3),vn.init(e,t)}),u5=ae("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=r3),vn.init(e,t)}),d5=ae("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=_3(t)),vn.init(e,t)}),f5=ae("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=x3),vn.init(e,t)}),p5=ae("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=S3(t)),vn.init(e,t)}),m5=ae("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=o3),vn.init(e,t)}),h5=ae("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=u3),vn.init(e,t),e._zod.bag.format="ipv4"}),g5=ae("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=d3),vn.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),v5=ae("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=f3(t.delimiter)),vn.init(e,t),e._zod.bag.format="mac"}),y5=ae("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=p3),vn.init(e,t)}),b5=ae("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=m3),vn.init(e,t),e._zod.check=n=>{const r=n.value.split("/");try{if(r.length!==2)throw new Error;const[i,o]=r;if(!o)throw new Error;const a=Number(o);if(`${a}`!==o)throw new Error;if(a<0||a>128)throw new Error;new URL(`http://[${i}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function Mj(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const x5=ae("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=h3),vn.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{Mj(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function w5(e){if(!Aj.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return Mj(n)}const S5=ae("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Aj),vn.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{w5(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),_5=ae("$ZodE164",(e,t)=>{t.pattern??(t.pattern=y3),vn.init(e,t)});function C5(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[r]=n;if(!r)return!1;const i=JSON.parse(atob(r));return!("typ"in i&&i?.typ!=="JWT"||!i.alg||t&&(!("alg"in i)||i.alg!==t))}catch{return!1}}const k5=ae("$ZodJWT",(e,t)=>{vn.init(e,t),e._zod.check=n=>{C5(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),E5=ae("$ZodCustomStringFormat",(e,t)=>{vn.init(e,t),e._zod.check=n=>{t.fn(n.value)||n.issues.push({code:"invalid_format",format:t.format,input:n.value,inst:e,continue:!t.abort})}}),zj=ae("$ZodNumber",(e,t)=>{gt.init(e,t),e._zod.pattern=e._zod.bag.pattern??Oj,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}const i=n.value;if(typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i))return n;const o=typeof i=="number"?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:i,inst:e,...o?{received:o}:{}}),n}}),j5=ae("$ZodNumberFormat",(e,t)=>{$3.init(e,t),zj.init(e,t)}),Lj=ae("$ZodBoolean",(e,t)=>{gt.init(e,t),e._zod.pattern=j3,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}const i=n.value;return typeof i=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:i,inst:e}),n}}),Fj=ae("$ZodBigInt",(e,t)=>{gt.init(e,t),e._zod.pattern=k3,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=BigInt(n.value)}catch{}return typeof n.value=="bigint"||n.issues.push({expected:"bigint",code:"invalid_type",input:n.value,inst:e}),n}}),R5=ae("$ZodBigIntFormat",(e,t)=>{P3.init(e,t),Fj.init(e,t)}),I5=ae("$ZodSymbol",(e,t)=>{gt.init(e,t),e._zod.parse=(n,r)=>{const i=n.value;return typeof i=="symbol"||n.issues.push({expected:"symbol",code:"invalid_type",input:i,inst:e}),n}}),T5=ae("$ZodUndefined",(e,t)=>{gt.init(e,t),e._zod.pattern=I3,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(n,r)=>{const i=n.value;return typeof i>"u"||n.issues.push({expected:"undefined",code:"invalid_type",input:i,inst:e}),n}}),N5=ae("$ZodNull",(e,t)=>{gt.init(e,t),e._zod.pattern=R3,e._zod.values=new Set([null]),e._zod.parse=(n,r)=>{const i=n.value;return i===null||n.issues.push({expected:"null",code:"invalid_type",input:i,inst:e}),n}}),A5=ae("$ZodAny",(e,t)=>{gt.init(e,t),e._zod.parse=n=>n}),O5=ae("$ZodUnknown",(e,t)=>{gt.init(e,t),e._zod.parse=n=>n}),D5=ae("$ZodNever",(e,t)=>{gt.init(e,t),e._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)}),$5=ae("$ZodVoid",(e,t)=>{gt.init(e,t),e._zod.parse=(n,r)=>{const i=n.value;return typeof i>"u"||n.issues.push({expected:"void",code:"invalid_type",input:i,inst:e}),n}}),P5=ae("$ZodDate",(e,t)=>{gt.init(e,t),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=new Date(n.value)}catch{}const i=n.value,o=i instanceof Date;return o&&!Number.isNaN(i.getTime())||n.issues.push({expected:"date",code:"invalid_type",input:i,...o?{received:"Invalid Date"}:{},inst:e}),n}});function P2(e,t,n){e.issues.length&&t.issues.push(...Xo(n,e.issues)),t.value[n]=e.value}const M5=ae("$ZodArray",(e,t)=>{gt.init(e,t),e._zod.parse=(n,r)=>{const i=n.value;if(!Array.isArray(i))return n.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),n;n.value=Array(i.length);const o=[];for(let a=0;a<i.length;a++){const l=i[a],d=t.element._zod.run({value:l,issues:[]},r);d instanceof Promise?o.push(d.then(f=>P2(f,n,a))):P2(d,n,a)}return o.length?Promise.all(o).then(()=>n):n}});function ob(e,t,n,r,i){if(e.issues.length){if(i&&!(n in r))return;t.issues.push(...Xo(n,e.issues))}e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function z5(e){const t=Object.keys(e.shape);for(const r of t)if(!e.shape?.[r]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${r}": expected a Zod schema`);const n=D6(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function L5(e,t,n,r,i,o){const a=[],l=i.keySet,d=i.catchall._zod,f=d.def.type,m=d.optout==="optional";for(const h in t){if(l.has(h))continue;if(f==="never"){a.push(h);continue}const v=d.run({value:t[h],issues:[]},r);v instanceof Promise?e.push(v.then(y=>ob(y,n,h,t,m))):ob(v,n,h,t,m)}return a.length&&n.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:o}),e.length?Promise.all(e).then(()=>n):n}const F5=ae("$ZodObject",(e,t)=>{if(gt.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const l=t.shape;Object.defineProperty(t,"shape",{get:()=>{const d={...l};return Object.defineProperty(t,"shape",{value:d}),d}})}const r=bh(()=>z5(t));_t(e._zod,"propValues",()=>{const l=t.shape,d={};for(const f in l){const m=l[f]._zod;if(m.values){d[f]??(d[f]=new Set);for(const h of m.values)d[f].add(h)}}return d});const i=nf,o=t.catchall;let a;e._zod.parse=(l,d)=>{a??(a=r.value);const f=l.value;if(!i(f))return l.issues.push({expected:"object",code:"invalid_type",input:f,inst:e}),l;l.value={};const m=[],h=a.shape;for(const v of a.keys){const y=h[v],x=y._zod.optout==="optional",S=y._zod.run({value:f[v],issues:[]},d);S instanceof Promise?m.push(S.then(C=>ob(C,l,v,f,x))):ob(S,l,v,f,x)}return o?L5(m,f,l,d,r.value,e):m.length?Promise.all(m).then(()=>l):l}}),U5=ae("$ZodObjectJIT",(e,t)=>{F5.init(e,t);const n=e._zod.parse,r=bh(()=>z5(t)),i=v=>{const y=new J3(["shape","payload","ctx"]),x=r.value,S=j=>{const I=WC(j);return`shape[${I}]._zod.run({ value: input[${I}], issues: [] }, ctx)`};y.write("const input = payload.value;");const C=Object.create(null);let k=0;for(const j of x.keys)C[j]=`key_${k++}`;y.write("const newResult = {};");for(const j of x.keys){const I=C[j],A=WC(j),N=v[j]?._zod?.optout==="optional";y.write(`const ${I} = ${S(j)};`),N?y.write(`
50
+ if (${I}.issues.length) {
51
+ if (${A} in input) {
52
+ payload.issues = payload.issues.concat(${I}.issues.map(iss => ({
53
+ ...iss,
54
+ path: iss.path ? [${A}, ...iss.path] : [${A}]
55
+ })));
56
+ }
57
+ }
58
+
59
+ if (${I}.value === undefined) {
60
+ if (${A} in input) {
61
+ newResult[${A}] = undefined;
62
+ }
63
+ } else {
64
+ newResult[${A}] = ${I}.value;
65
+ }
66
+
67
+ `):y.write(`
68
+ if (${I}.issues.length) {
69
+ payload.issues = payload.issues.concat(${I}.issues.map(iss => ({
70
+ ...iss,
71
+ path: iss.path ? [${A}, ...iss.path] : [${A}]
72
+ })));
73
+ }
74
+
75
+ if (${I}.value === undefined) {
76
+ if (${A} in input) {
77
+ newResult[${A}] = undefined;
78
+ }
79
+ } else {
80
+ newResult[${A}] = ${I}.value;
81
+ }
82
+
83
+ `)}y.write("payload.value = newResult;"),y.write("return payload;");const E=y.compile();return(j,I)=>E(v,j,I)};let o;const a=nf,l=!eb.jitless,f=l&&A6.value,m=t.catchall;let h;e._zod.parse=(v,y)=>{h??(h=r.value);const x=v.value;return a(x)?l&&f&&y?.async===!1&&y.jitless!==!0?(o||(o=i(t.shape)),v=o(v,y),m?L5([],x,v,y,h,e):v):n(v,y):(v.issues.push({expected:"object",code:"invalid_type",input:x,inst:e}),v)}});function M2(e,t,n,r){for(const o of e)if(o.issues.length===0)return t.value=o.value,t;const i=e.filter(o=>!kc(o));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(o=>o.issues.map(a=>zo(a,r,Fr())))}),t)}const Mx=ae("$ZodUnion",(e,t)=>{gt.init(e,t),_t(e._zod,"optin",()=>t.options.some(i=>i._zod.optin==="optional")?"optional":void 0),_t(e._zod,"optout",()=>t.options.some(i=>i._zod.optout==="optional")?"optional":void 0),_t(e._zod,"values",()=>{if(t.options.every(i=>i._zod.values))return new Set(t.options.flatMap(i=>Array.from(i._zod.values)))}),_t(e._zod,"pattern",()=>{if(t.options.every(i=>i._zod.pattern)){const i=t.options.map(o=>o._zod.pattern);return new RegExp(`^(${i.map(o=>Ax(o.source)).join("|")})$`)}});const n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(i,o)=>{if(n)return r(i,o);let a=!1;const l=[];for(const d of t.options){const f=d._zod.run({value:i.value,issues:[]},o);if(f instanceof Promise)l.push(f),a=!0;else{if(f.issues.length===0)return f;l.push(f)}}return a?Promise.all(l).then(d=>M2(d,i,e,o)):M2(l,i,e,o)}});function z2(e,t,n,r){const i=e.filter(o=>o.issues.length===0);return i.length===1?(t.value=i[0].value,t):(i.length===0?t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(o=>o.issues.map(a=>zo(a,r,Fr())))}):t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:[],inclusive:!1}),t)}const V5=ae("$ZodXor",(e,t)=>{Mx.init(e,t),t.inclusive=!1;const n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(i,o)=>{if(n)return r(i,o);let a=!1;const l=[];for(const d of t.options){const f=d._zod.run({value:i.value,issues:[]},o);f instanceof Promise?(l.push(f),a=!0):l.push(f)}return a?Promise.all(l).then(d=>z2(d,i,e,o)):z2(l,i,e,o)}}),B5=ae("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,Mx.init(e,t);const n=e._zod.parse;_t(e._zod,"propValues",()=>{const i={};for(const o of t.options){const a=o._zod.propValues;if(!a||Object.keys(a).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(o)}"`);for(const[l,d]of Object.entries(a)){i[l]||(i[l]=new Set);for(const f of d)i[l].add(f)}}return i});const r=bh(()=>{const i=t.options,o=new Map;for(const a of i){const l=a._zod.propValues?.[t.discriminator];if(!l||l.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(a)}"`);for(const d of l){if(o.has(d))throw new Error(`Duplicate discriminator value "${String(d)}"`);o.set(d,a)}}return o});e._zod.parse=(i,o)=>{const a=i.value;if(!nf(a))return i.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),i;const l=r.value.get(a?.[t.discriminator]);return l?l._zod.run(i,o):t.unionFallback?n(i,o):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:a,path:[t.discriminator],inst:e}),i)}}),H5=ae("$ZodIntersection",(e,t)=>{gt.init(e,t),e._zod.parse=(n,r)=>{const i=n.value,o=t.left._zod.run({value:i,issues:[]},r),a=t.right._zod.run({value:i,issues:[]},r);return o instanceof Promise||a instanceof Promise?Promise.all([o,a]).then(([d,f])=>L2(n,d,f)):L2(n,o,a)}});function XC(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Hc(e)&&Hc(t)){const n=Object.keys(t),r=Object.keys(e).filter(o=>n.indexOf(o)!==-1),i={...e,...t};for(const o of r){const a=XC(e[o],t[o]);if(!a.valid)return{valid:!1,mergeErrorPath:[o,...a.mergeErrorPath]};i[o]=a.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<e.length;r++){const i=e[r],o=t[r],a=XC(i,o);if(!a.valid)return{valid:!1,mergeErrorPath:[r,...a.mergeErrorPath]};n.push(a.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function L2(e,t,n){const r=new Map;let i;for(const l of t.issues)if(l.code==="unrecognized_keys"){i??(i=l);for(const d of l.keys)r.has(d)||r.set(d,{}),r.get(d).l=!0}else e.issues.push(l);for(const l of n.issues)if(l.code==="unrecognized_keys")for(const d of l.keys)r.has(d)||r.set(d,{}),r.get(d).r=!0;else e.issues.push(l);const o=[...r].filter(([,l])=>l.l&&l.r).map(([l])=>l);if(o.length&&i&&e.issues.push({...i,keys:o}),kc(e))return e;const a=XC(t.value,n.value);if(!a.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);return e.value=a.data,e}const Uj=ae("$ZodTuple",(e,t)=>{gt.init(e,t);const n=t.items;e._zod.parse=(r,i)=>{const o=r.value;if(!Array.isArray(o))return r.issues.push({input:o,inst:e,expected:"tuple",code:"invalid_type"}),r;r.value=[];const a=[],l=[...n].reverse().findIndex(m=>m._zod.optin!=="optional"),d=l===-1?0:n.length-l;if(!t.rest){const m=o.length>n.length,h=o.length<d-1;if(m||h)return r.issues.push({...m?{code:"too_big",maximum:n.length,inclusive:!0}:{code:"too_small",minimum:n.length},input:o,inst:e,origin:"array"}),r}let f=-1;for(const m of n){if(f++,f>=o.length&&f>=d)continue;const h=m._zod.run({value:o[f],issues:[]},i);h instanceof Promise?a.push(h.then(v=>zv(v,r,f))):zv(h,r,f)}if(t.rest){const m=o.slice(n.length);for(const h of m){f++;const v=t.rest._zod.run({value:h,issues:[]},i);v instanceof Promise?a.push(v.then(y=>zv(y,r,f))):zv(v,r,f)}}return a.length?Promise.all(a).then(()=>r):r}});function zv(e,t,n){e.issues.length&&t.issues.push(...Xo(n,e.issues)),t.value[n]=e.value}const q5=ae("$ZodRecord",(e,t)=>{gt.init(e,t),e._zod.parse=(n,r)=>{const i=n.value;if(!Hc(i))return n.issues.push({expected:"record",code:"invalid_type",input:i,inst:e}),n;const o=[],a=t.keyType._zod.values;if(a){n.value={};const l=new Set;for(const f of a)if(typeof f=="string"||typeof f=="number"||typeof f=="symbol"){l.add(typeof f=="number"?f.toString():f);const m=t.valueType._zod.run({value:i[f],issues:[]},r);m instanceof Promise?o.push(m.then(h=>{h.issues.length&&n.issues.push(...Xo(f,h.issues)),n.value[f]=h.value})):(m.issues.length&&n.issues.push(...Xo(f,m.issues)),n.value[f]=m.value)}let d;for(const f in i)l.has(f)||(d=d??[],d.push(f));d&&d.length>0&&n.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:d})}else{n.value={};for(const l of Reflect.ownKeys(i)){if(l==="__proto__")continue;let d=t.keyType._zod.run({value:l,issues:[]},r);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof l=="string"&&Oj.test(l)&&d.issues.length){const h=t.keyType._zod.run({value:Number(l),issues:[]},r);if(h instanceof Promise)throw new Error("Async schemas not supported in object keys currently");h.issues.length===0&&(d=h)}if(d.issues.length){t.mode==="loose"?n.value[l]=i[l]:n.issues.push({code:"invalid_key",origin:"record",issues:d.issues.map(h=>zo(h,r,Fr())),input:l,path:[l],inst:e});continue}const m=t.valueType._zod.run({value:i[l],issues:[]},r);m instanceof Promise?o.push(m.then(h=>{h.issues.length&&n.issues.push(...Xo(l,h.issues)),n.value[d.value]=h.value})):(m.issues.length&&n.issues.push(...Xo(l,m.issues)),n.value[d.value]=m.value)}}return o.length?Promise.all(o).then(()=>n):n}}),K5=ae("$ZodMap",(e,t)=>{gt.init(e,t),e._zod.parse=(n,r)=>{const i=n.value;if(!(i instanceof Map))return n.issues.push({expected:"map",code:"invalid_type",input:i,inst:e}),n;const o=[];n.value=new Map;for(const[a,l]of i){const d=t.keyType._zod.run({value:a,issues:[]},r),f=t.valueType._zod.run({value:l,issues:[]},r);d instanceof Promise||f instanceof Promise?o.push(Promise.all([d,f]).then(([m,h])=>{F2(m,h,n,a,i,e,r)})):F2(d,f,n,a,i,e,r)}return o.length?Promise.all(o).then(()=>n):n}});function F2(e,t,n,r,i,o,a){e.issues.length&&(nb.has(typeof r)?n.issues.push(...Xo(r,e.issues)):n.issues.push({code:"invalid_key",origin:"map",input:i,inst:o,issues:e.issues.map(l=>zo(l,a,Fr()))})),t.issues.length&&(nb.has(typeof r)?n.issues.push(...Xo(r,t.issues)):n.issues.push({origin:"map",code:"invalid_element",input:i,inst:o,key:r,issues:t.issues.map(l=>zo(l,a,Fr()))})),n.value.set(e.value,t.value)}const G5=ae("$ZodSet",(e,t)=>{gt.init(e,t),e._zod.parse=(n,r)=>{const i=n.value;if(!(i instanceof Set))return n.issues.push({input:i,inst:e,expected:"set",code:"invalid_type"}),n;const o=[];n.value=new Set;for(const a of i){const l=t.valueType._zod.run({value:a,issues:[]},r);l instanceof Promise?o.push(l.then(d=>U2(d,n))):U2(l,n)}return o.length?Promise.all(o).then(()=>n):n}});function U2(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}const Z5=ae("$ZodEnum",(e,t)=>{gt.init(e,t);const n=xj(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(i=>nb.has(typeof i)).map(i=>typeof i=="string"?xs(i):i.toString()).join("|")})$`),e._zod.parse=(i,o)=>{const a=i.value;return r.has(a)||i.issues.push({code:"invalid_value",values:n,input:a,inst:e}),i}}),Y5=ae("$ZodLiteral",(e,t)=>{if(gt.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(r=>typeof r=="string"?xs(r):r?xs(r.toString()):String(r)).join("|")})$`),e._zod.parse=(r,i)=>{const o=r.value;return n.has(o)||r.issues.push({code:"invalid_value",values:t.values,input:o,inst:e}),r}}),W5=ae("$ZodFile",(e,t)=>{gt.init(e,t),e._zod.parse=(n,r)=>{const i=n.value;return i instanceof File||n.issues.push({expected:"file",code:"invalid_type",input:i,inst:e}),n}}),X5=ae("$ZodTransform",(e,t)=>{gt.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new Nx(e.constructor.name);const i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(a=>(n.value=a,n));if(i instanceof Promise)throw new Oc;return n.value=i,n}});function V2(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const Vj=ae("$ZodOptional",(e,t)=>{gt.init(e,t),e._zod.optin="optional",e._zod.optout="optional",_t(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),_t(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Ax(n.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(t.innerType._zod.optin==="optional"){const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(o=>V2(o,n.value)):V2(i,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),J5=ae("$ZodExactOptional",(e,t)=>{Vj.init(e,t),_t(e._zod,"values",()=>t.innerType._zod.values),_t(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,r)=>t.innerType._zod.run(n,r)}),Q5=ae("$ZodNullable",(e,t)=>{gt.init(e,t),_t(e._zod,"optin",()=>t.innerType._zod.optin),_t(e._zod,"optout",()=>t.innerType._zod.optout),_t(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Ax(n.source)}|null)$`):void 0}),_t(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,r)=>n.value===null?n:t.innerType._zod.run(n,r)}),eV=ae("$ZodDefault",(e,t)=>{gt.init(e,t),e._zod.optin="optional",_t(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);if(n.value===void 0)return n.value=t.defaultValue,n;const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(o=>B2(o,t)):B2(i,t)}});function B2(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const tV=ae("$ZodPrefault",(e,t)=>{gt.init(e,t),e._zod.optin="optional",_t(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>(r.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,r))}),nV=ae("$ZodNonOptional",(e,t)=>{gt.init(e,t),_t(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(r=>r!==void 0)):void 0}),e._zod.parse=(n,r)=>{const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(o=>H2(o,e)):H2(i,e)}});function H2(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const rV=ae("$ZodSuccess",(e,t)=>{gt.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new Nx("ZodSuccess");const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(o=>(n.value=o.issues.length===0,n)):(n.value=i.issues.length===0,n)}}),iV=ae("$ZodCatch",(e,t)=>{gt.init(e,t),_t(e._zod,"optin",()=>t.innerType._zod.optin),_t(e._zod,"optout",()=>t.innerType._zod.optout),_t(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(o=>(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(a=>zo(a,r,Fr()))},input:n.value}),n.issues=[]),n)):(n.value=i.value,i.issues.length&&(n.value=t.catchValue({...n,error:{issues:i.issues.map(o=>zo(o,r,Fr()))},input:n.value}),n.issues=[]),n)}}),oV=ae("$ZodNaN",(e,t)=>{gt.init(e,t),e._zod.parse=(n,r)=>((typeof n.value!="number"||!Number.isNaN(n.value))&&n.issues.push({input:n.value,inst:e,expected:"nan",code:"invalid_type"}),n)}),aV=ae("$ZodPipe",(e,t)=>{gt.init(e,t),_t(e._zod,"values",()=>t.in._zod.values),_t(e._zod,"optin",()=>t.in._zod.optin),_t(e._zod,"optout",()=>t.out._zod.optout),_t(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{if(r.direction==="backward"){const o=t.out._zod.run(n,r);return o instanceof Promise?o.then(a=>Lv(a,t.in,r)):Lv(o,t.in,r)}const i=t.in._zod.run(n,r);return i instanceof Promise?i.then(o=>Lv(o,t.out,r)):Lv(i,t.out,r)}});function Lv(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const Bj=ae("$ZodCodec",(e,t)=>{gt.init(e,t),_t(e._zod,"values",()=>t.in._zod.values),_t(e._zod,"optin",()=>t.in._zod.optin),_t(e._zod,"optout",()=>t.out._zod.optout),_t(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{if((r.direction||"forward")==="forward"){const o=t.in._zod.run(n,r);return o instanceof Promise?o.then(a=>Fv(a,t,r)):Fv(o,t,r)}else{const o=t.out._zod.run(n,r);return o instanceof Promise?o.then(a=>Fv(a,t,r)):Fv(o,t,r)}}});function Fv(e,t,n){if(e.issues.length)return e.aborted=!0,e;if((n.direction||"forward")==="forward"){const i=t.transform(e.value,e);return i instanceof Promise?i.then(o=>Uv(e,o,t.out,n)):Uv(e,i,t.out,n)}else{const i=t.reverseTransform(e.value,e);return i instanceof Promise?i.then(o=>Uv(e,o,t.in,n)):Uv(e,i,t.in,n)}}function Uv(e,t,n,r){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},r)}const sV=ae("$ZodReadonly",(e,t)=>{gt.init(e,t),_t(e._zod,"propValues",()=>t.innerType._zod.propValues),_t(e._zod,"values",()=>t.innerType._zod.values),_t(e._zod,"optin",()=>t.innerType?._zod?.optin),_t(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(q2):q2(i)}});function q2(e){return e.value=Object.freeze(e.value),e}const lV=ae("$ZodTemplateLiteral",(e,t)=>{gt.init(e,t);const n=[];for(const r of t.parts)if(typeof r=="object"&&r!==null){if(!r._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...r._zod.traits].shift()}`);const i=r._zod.pattern instanceof RegExp?r._zod.pattern.source:r._zod.pattern;if(!i)throw new Error(`Invalid template literal part: ${r._zod.traits}`);const o=i.startsWith("^")?1:0,a=i.endsWith("$")?i.length-1:i.length;n.push(i.slice(o,a))}else if(r===null||O6.has(typeof r))n.push(xs(`${r}`));else throw new Error(`Invalid template literal part: ${r}`);e._zod.pattern=new RegExp(`^${n.join("")}$`),e._zod.parse=(r,i)=>typeof r.value!="string"?(r.issues.push({input:r.value,inst:e,expected:"string",code:"invalid_type"}),r):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(r.value)||r.issues.push({input:r.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),r)}),cV=ae("$ZodFunction",(e,t)=>(gt.init(e,t),e._def=t,e._zod.def=t,e.implement=n=>{if(typeof n!="function")throw new Error("implement() must be called with a function");return function(...r){const i=e._def.input?rb(e._def.input,r):r,o=Reflect.apply(n,this,i);return e._def.output?rb(e._def.output,o):o}},e.implementAsync=n=>{if(typeof n!="function")throw new Error("implementAsync() must be called with a function");return async function(...r){const i=e._def.input?await ib(e._def.input,r):r,o=await Reflect.apply(n,this,i);return e._def.output?await ib(e._def.output,o):o}},e._zod.parse=(n,r)=>typeof n.value!="function"?(n.issues.push({code:"invalid_type",expected:"function",input:n.value,inst:e}),n):(e._def.output&&e._def.output._zod.def.type==="promise"?n.value=e.implementAsync(n.value):n.value=e.implement(n.value),n),e.input=(...n)=>{const r=e.constructor;return Array.isArray(n[0])?new r({type:"function",input:new Uj({type:"tuple",items:n[0],rest:n[1]}),output:e._def.output}):new r({type:"function",input:n[0],output:e._def.output})},e.output=n=>{const r=e.constructor;return new r({type:"function",input:e._def.input,output:n})},e)),uV=ae("$ZodPromise",(e,t)=>{gt.init(e,t),e._zod.parse=(n,r)=>Promise.resolve(n.value).then(i=>t.innerType._zod.run({value:i,issues:[]},r))}),dV=ae("$ZodLazy",(e,t)=>{gt.init(e,t),_t(e._zod,"innerType",()=>t.getter()),_t(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),_t(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),_t(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),_t(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(n,r)=>e._zod.innerType._zod.run(n,r)}),fV=ae("$ZodCustom",(e,t)=>{On.init(e,t),gt.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{const r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(o=>K2(o,n,r,e));K2(i,n,r,e)}});function K2(e,t,n,r){if(!e){const i={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(i.params=r._zod.def.params),t.issues.push(rf(i))}}const Hge=()=>{const e={string:{unit:"حرف",verb:"أن يحوي"},file:{unit:"بايت",verb:"أن يحوي"},array:{unit:"عنصر",verb:"أن يحوي"},set:{unit:"عنصر",verb:"أن يحوي"}};function t(i){return e[i]??null}const n={regex:"مدخل",email:"بريد إلكتروني",url:"رابط",emoji:"إيموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاريخ ووقت بمعيار ISO",date:"تاريخ بمعيار ISO",time:"وقت بمعيار ISO",duration:"مدة بمعيار ISO",ipv4:"عنوان IPv4",ipv6:"عنوان IPv6",cidrv4:"مدى عناوين بصيغة IPv4",cidrv6:"مدى عناوين بصيغة IPv6",base64:"نَص بترميز base64-encoded",base64url:"نَص بترميز base64url-encoded",json_string:"نَص على هيئة JSON",e164:"رقم هاتف بمعيار E.164",jwt:"JWT",template_literal:"مدخل"},r={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{const o=r[i.expected]??i.expected,a=ct(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`مدخلات غير مقبولة: يفترض إدخال instanceof ${i.expected}، ولكن تم إدخال ${l}`:`مدخلات غير مقبولة: يفترض إدخال ${o}، ولكن تم إدخال ${l}`}case"invalid_value":return i.values.length===1?`مدخلات غير مقبولة: يفترض إدخال ${it(i.values[0])}`:`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${Ae(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",a=t(i.origin);return a?` أكبر من اللازم: يفترض أن تكون ${i.origin??"القيمة"} ${o} ${i.maximum.toString()} ${a.unit??"عنصر"}`:`أكبر من اللازم: يفترض أن تكون ${i.origin??"القيمة"} ${o} ${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?">=":">",a=t(i.origin);return a?`أصغر من اللازم: يفترض لـ ${i.origin} أن يكون ${o} ${i.minimum.toString()} ${a.unit}`:`أصغر من اللازم: يفترض لـ ${i.origin} أن يكون ${o} ${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`نَص غير مقبول: يجب أن يبدأ بـ "${i.prefix}"`:o.format==="ends_with"?`نَص غير مقبول: يجب أن ينتهي بـ "${o.suffix}"`:o.format==="includes"?`نَص غير مقبول: يجب أن يتضمَّن "${o.includes}"`:o.format==="regex"?`نَص غير مقبول: يجب أن يطابق النمط ${o.pattern}`:`${n[o.format]??i.format} غير مقبول`}case"not_multiple_of":return`رقم غير مقبول: يجب أن يكون من مضاعفات ${i.divisor}`;case"unrecognized_keys":return`معرف${i.keys.length>1?"ات":""} غريب${i.keys.length>1?"ة":""}: ${Ae(i.keys,"، ")}`;case"invalid_key":return`معرف غير مقبول في ${i.origin}`;case"invalid_union":return"مدخل غير مقبول";case"invalid_element":return`مدخل غير مقبول في ${i.origin}`;default:return"مدخل غير مقبول"}}};function qge(){return{localeError:Hge()}}const Kge=()=>{const e={string:{unit:"simvol",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"element",verb:"olmalıdır"},set:{unit:"element",verb:"olmalıdır"}};function t(i){return e[i]??null}const n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},r={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{const o=r[i.expected]??i.expected,a=ct(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`Yanlış dəyər: gözlənilən instanceof ${i.expected}, daxil olan ${l}`:`Yanlış dəyər: gözlənilən ${o}, daxil olan ${l}`}case"invalid_value":return i.values.length===1?`Yanlış dəyər: gözlənilən ${it(i.values[0])}`:`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${Ae(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",a=t(i.origin);return a?`Çox böyük: gözlənilən ${i.origin??"dəyər"} ${o}${i.maximum.toString()} ${a.unit??"element"}`:`Çox böyük: gözlənilən ${i.origin??"dəyər"} ${o}${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?">=":">",a=t(i.origin);return a?`Çox kiçik: gözlənilən ${i.origin} ${o}${i.minimum.toString()} ${a.unit}`:`Çox kiçik: gözlənilən ${i.origin} ${o}${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`Yanlış mətn: "${o.prefix}" ilə başlamalıdır`:o.format==="ends_with"?`Yanlış mətn: "${o.suffix}" ilə bitməlidir`:o.format==="includes"?`Yanlış mətn: "${o.includes}" daxil olmalıdır`:o.format==="regex"?`Yanlış mətn: ${o.pattern} şablonuna uyğun olmalıdır`:`Yanlış ${n[o.format]??i.format}`}case"not_multiple_of":return`Yanlış ədəd: ${i.divisor} ilə bölünə bilən olmalıdır`;case"unrecognized_keys":return`Tanınmayan açar${i.keys.length>1?"lar":""}: ${Ae(i.keys,", ")}`;case"invalid_key":return`${i.origin} daxilində yanlış açar`;case"invalid_union":return"Yanlış dəyər";case"invalid_element":return`${i.origin} daxilində yanlış dəyər`;default:return"Yanlış dəyər"}}};function Gge(){return{localeError:Kge()}}function G2(e,t,n,r){const i=Math.abs(e),o=i%10,a=i%100;return a>=11&&a<=19?r:o===1?t:o>=2&&o<=4?n:r}const Zge=()=>{const e={string:{unit:{one:"сімвал",few:"сімвалы",many:"сімвалаў"},verb:"мець"},array:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},set:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},file:{unit:{one:"байт",few:"байты",many:"байтаў"},verb:"мець"}};function t(i){return e[i]??null}const n={regex:"увод",email:"email адрас",url:"URL",emoji:"эмодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата і час",date:"ISO дата",time:"ISO час",duration:"ISO працягласць",ipv4:"IPv4 адрас",ipv6:"IPv6 адрас",cidrv4:"IPv4 дыяпазон",cidrv6:"IPv6 дыяпазон",base64:"радок у фармаце base64",base64url:"радок у фармаце base64url",json_string:"JSON радок",e164:"нумар E.164",jwt:"JWT",template_literal:"увод"},r={nan:"NaN",number:"лік",array:"масіў"};return i=>{switch(i.code){case"invalid_type":{const o=r[i.expected]??i.expected,a=ct(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`Няправільны ўвод: чакаўся instanceof ${i.expected}, атрымана ${l}`:`Няправільны ўвод: чакаўся ${o}, атрымана ${l}`}case"invalid_value":return i.values.length===1?`Няправільны ўвод: чакалася ${it(i.values[0])}`:`Няправільны варыянт: чакаўся адзін з ${Ae(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",a=t(i.origin);if(a){const l=Number(i.maximum),d=G2(l,a.unit.one,a.unit.few,a.unit.many);return`Занадта вялікі: чакалася, што ${i.origin??"значэнне"} павінна ${a.verb} ${o}${i.maximum.toString()} ${d}`}return`Занадта вялікі: чакалася, што ${i.origin??"значэнне"} павінна быць ${o}${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?">=":">",a=t(i.origin);if(a){const l=Number(i.minimum),d=G2(l,a.unit.one,a.unit.few,a.unit.many);return`Занадта малы: чакалася, што ${i.origin} павінна ${a.verb} ${o}${i.minimum.toString()} ${d}`}return`Занадта малы: чакалася, што ${i.origin} павінна быць ${o}${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`Няправільны радок: павінен пачынацца з "${o.prefix}"`:o.format==="ends_with"?`Няправільны радок: павінен заканчвацца на "${o.suffix}"`:o.format==="includes"?`Няправільны радок: павінен змяшчаць "${o.includes}"`:o.format==="regex"?`Няправільны радок: павінен адпавядаць шаблону ${o.pattern}`:`Няправільны ${n[o.format]??i.format}`}case"not_multiple_of":return`Няправільны лік: павінен быць кратным ${i.divisor}`;case"unrecognized_keys":return`Нераспазнаны ${i.keys.length>1?"ключы":"ключ"}: ${Ae(i.keys,", ")}`;case"invalid_key":return`Няправільны ключ у ${i.origin}`;case"invalid_union":return"Няправільны ўвод";case"invalid_element":return`Няправільнае значэнне ў ${i.origin}`;default:return"Няправільны ўвод"}}};function Yge(){return{localeError:Zge()}}const Wge=()=>{const e={string:{unit:"символа",verb:"да съдържа"},file:{unit:"байта",verb:"да съдържа"},array:{unit:"елемента",verb:"да съдържа"},set:{unit:"елемента",verb:"да съдържа"}};function t(i){return e[i]??null}const n={regex:"вход",email:"имейл адрес",url:"URL",emoji:"емоджи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO време",date:"ISO дата",time:"ISO време",duration:"ISO продължителност",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"base64-кодиран низ",base64url:"base64url-кодиран низ",json_string:"JSON низ",e164:"E.164 номер",jwt:"JWT",template_literal:"вход"},r={nan:"NaN",number:"число",array:"масив"};return i=>{switch(i.code){case"invalid_type":{const o=r[i.expected]??i.expected,a=ct(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`Невалиден вход: очакван instanceof ${i.expected}, получен ${l}`:`Невалиден вход: очакван ${o}, получен ${l}`}case"invalid_value":return i.values.length===1?`Невалиден вход: очакван ${it(i.values[0])}`:`Невалидна опция: очаквано едно от ${Ae(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",a=t(i.origin);return a?`Твърде голямо: очаква се ${i.origin??"стойност"} да съдържа ${o}${i.maximum.toString()} ${a.unit??"елемента"}`:`Твърде голямо: очаква се ${i.origin??"стойност"} да бъде ${o}${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?">=":">",a=t(i.origin);return a?`Твърде малко: очаква се ${i.origin} да съдържа ${o}${i.minimum.toString()} ${a.unit}`:`Твърде малко: очаква се ${i.origin} да бъде ${o}${i.minimum.toString()}`}case"invalid_format":{const o=i;if(o.format==="starts_with")return`Невалиден низ: трябва да започва с "${o.prefix}"`;if(o.format==="ends_with")return`Невалиден низ: трябва да завършва с "${o.suffix}"`;if(o.format==="includes")return`Невалиден низ: трябва да включва "${o.includes}"`;if(o.format==="regex")return`Невалиден низ: трябва да съвпада с ${o.pattern}`;let a="Невалиден";return o.format==="emoji"&&(a="Невалидно"),o.format==="datetime"&&(a="Невалидно"),o.format==="date"&&(a="Невалидна"),o.format==="time"&&(a="Невалидно"),o.format==="duration"&&(a="Невалидна"),`${a} ${n[o.format]??i.format}`}case"not_multiple_of":return`Невалидно число: трябва да бъде кратно на ${i.divisor}`;case"unrecognized_keys":return`Неразпознат${i.keys.length>1?"и":""} ключ${i.keys.length>1?"ове":""}: ${Ae(i.keys,", ")}`;case"invalid_key":return`Невалиден ключ в ${i.origin}`;case"invalid_union":return"Невалиден вход";case"invalid_element":return`Невалидна стойност в ${i.origin}`;default:return"Невалиден вход"}}};function Xge(){return{localeError:Wge()}}const Jge=()=>{const e={string:{unit:"caràcters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(i){return e[i]??null}const n={regex:"entrada",email:"adreça electrònica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adreça IPv4",ipv6:"adreça IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},r={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{const o=r[i.expected]??i.expected,a=ct(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`Tipus invàlid: s'esperava instanceof ${i.expected}, s'ha rebut ${l}`:`Tipus invàlid: s'esperava ${o}, s'ha rebut ${l}`}case"invalid_value":return i.values.length===1?`Valor invàlid: s'esperava ${it(i.values[0])}`:`Opció invàlida: s'esperava una de ${Ae(i.values," o ")}`;case"too_big":{const o=i.inclusive?"com a màxim":"menys de",a=t(i.origin);return a?`Massa gran: s'esperava que ${i.origin??"el valor"} contingués ${o} ${i.maximum.toString()} ${a.unit??"elements"}`:`Massa gran: s'esperava que ${i.origin??"el valor"} fos ${o} ${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?"com a mínim":"més de",a=t(i.origin);return a?`Massa petit: s'esperava que ${i.origin} contingués ${o} ${i.minimum.toString()} ${a.unit}`:`Massa petit: s'esperava que ${i.origin} fos ${o} ${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`Format invàlid: ha de començar amb "${o.prefix}"`:o.format==="ends_with"?`Format invàlid: ha d'acabar amb "${o.suffix}"`:o.format==="includes"?`Format invàlid: ha d'incloure "${o.includes}"`:o.format==="regex"?`Format invàlid: ha de coincidir amb el patró ${o.pattern}`:`Format invàlid per a ${n[o.format]??i.format}`}case"not_multiple_of":return`Número invàlid: ha de ser múltiple de ${i.divisor}`;case"unrecognized_keys":return`Clau${i.keys.length>1?"s":""} no reconeguda${i.keys.length>1?"s":""}: ${Ae(i.keys,", ")}`;case"invalid_key":return`Clau invàlida a ${i.origin}`;case"invalid_union":return"Entrada invàlida";case"invalid_element":return`Element invàlid a ${i.origin}`;default:return"Entrada invàlida"}}};function Qge(){return{localeError:Jge()}}const eve=()=>{const e={string:{unit:"znaků",verb:"mít"},file:{unit:"bajtů",verb:"mít"},array:{unit:"prvků",verb:"mít"},set:{unit:"prvků",verb:"mít"}};function t(i){return e[i]??null}const n={regex:"regulární výraz",email:"e-mailová adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a čas ve formátu ISO",date:"datum ve formátu ISO",time:"čas ve formátu ISO",duration:"doba trvání ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"řetězec zakódovaný ve formátu base64",base64url:"řetězec zakódovaný ve formátu base64url",json_string:"řetězec ve formátu JSON",e164:"číslo E.164",jwt:"JWT",template_literal:"vstup"},r={nan:"NaN",number:"číslo",string:"řetězec",function:"funkce",array:"pole"};return i=>{switch(i.code){case"invalid_type":{const o=r[i.expected]??i.expected,a=ct(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`Neplatný vstup: očekáváno instanceof ${i.expected}, obdrženo ${l}`:`Neplatný vstup: očekáváno ${o}, obdrženo ${l}`}case"invalid_value":return i.values.length===1?`Neplatný vstup: očekáváno ${it(i.values[0])}`:`Neplatná možnost: očekávána jedna z hodnot ${Ae(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",a=t(i.origin);return a?`Hodnota je příliš velká: ${i.origin??"hodnota"} musí mít ${o}${i.maximum.toString()} ${a.unit??"prvků"}`:`Hodnota je příliš velká: ${i.origin??"hodnota"} musí být ${o}${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?">=":">",a=t(i.origin);return a?`Hodnota je příliš malá: ${i.origin??"hodnota"} musí mít ${o}${i.minimum.toString()} ${a.unit??"prvků"}`:`Hodnota je příliš malá: ${i.origin??"hodnota"} musí být ${o}${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`Neplatný řetězec: musí začínat na "${o.prefix}"`:o.format==="ends_with"?`Neplatný řetězec: musí končit na "${o.suffix}"`:o.format==="includes"?`Neplatný řetězec: musí obsahovat "${o.includes}"`:o.format==="regex"?`Neplatný řetězec: musí odpovídat vzoru ${o.pattern}`:`Neplatný formát ${n[o.format]??i.format}`}case"not_multiple_of":return`Neplatné číslo: musí být násobkem ${i.divisor}`;case"unrecognized_keys":return`Neznámé klíče: ${Ae(i.keys,", ")}`;case"invalid_key":return`Neplatný klíč v ${i.origin}`;case"invalid_union":return"Neplatný vstup";case"invalid_element":return`Neplatná hodnota v ${i.origin}`;default:return"Neplatný vstup"}}};function tve(){return{localeError:eve()}}const nve=()=>{const e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function t(i){return e[i]??null}const n={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslæt",date:"ISO-dato",time:"ISO-klokkeslæt",duration:"ISO-varighed",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},r={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"sæt",file:"fil"};return i=>{switch(i.code){case"invalid_type":{const o=r[i.expected]??i.expected,a=ct(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`Ugyldigt input: forventede instanceof ${i.expected}, fik ${l}`:`Ugyldigt input: forventede ${o}, fik ${l}`}case"invalid_value":return i.values.length===1?`Ugyldig værdi: forventede ${it(i.values[0])}`:`Ugyldigt valg: forventede en af følgende ${Ae(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",a=t(i.origin),l=r[i.origin]??i.origin;return a?`For stor: forventede ${l??"value"} ${a.verb} ${o} ${i.maximum.toString()} ${a.unit??"elementer"}`:`For stor: forventede ${l??"value"} havde ${o} ${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?">=":">",a=t(i.origin),l=r[i.origin]??i.origin;return a?`For lille: forventede ${l} ${a.verb} ${o} ${i.minimum.toString()} ${a.unit}`:`For lille: forventede ${l} havde ${o} ${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`Ugyldig streng: skal starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: skal ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: skal indeholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: skal matche mønsteret ${o.pattern}`:`Ugyldig ${n[o.format]??i.format}`}case"not_multiple_of":return`Ugyldigt tal: skal være deleligt med ${i.divisor}`;case"unrecognized_keys":return`${i.keys.length>1?"Ukendte nøgler":"Ukendt nøgle"}: ${Ae(i.keys,", ")}`;case"invalid_key":return`Ugyldig nøgle i ${i.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig værdi i ${i.origin}`;default:return"Ugyldigt input"}}};function rve(){return{localeError:nve()}}const ive=()=>{const e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function t(i){return e[i]??null}const n={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},r={nan:"NaN",number:"Zahl",array:"Array"};return i=>{switch(i.code){case"invalid_type":{const o=r[i.expected]??i.expected,a=ct(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`Ungültige Eingabe: erwartet instanceof ${i.expected}, erhalten ${l}`:`Ungültige Eingabe: erwartet ${o}, erhalten ${l}`}case"invalid_value":return i.values.length===1?`Ungültige Eingabe: erwartet ${it(i.values[0])}`:`Ungültige Option: erwartet eine von ${Ae(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",a=t(i.origin);return a?`Zu groß: erwartet, dass ${i.origin??"Wert"} ${o}${i.maximum.toString()} ${a.unit??"Elemente"} hat`:`Zu groß: erwartet, dass ${i.origin??"Wert"} ${o}${i.maximum.toString()} ist`}case"too_small":{const o=i.inclusive?">=":">",a=t(i.origin);return a?`Zu klein: erwartet, dass ${i.origin} ${o}${i.minimum.toString()} ${a.unit} hat`:`Zu klein: erwartet, dass ${i.origin} ${o}${i.minimum.toString()} ist`}case"invalid_format":{const o=i;return o.format==="starts_with"?`Ungültiger String: muss mit "${o.prefix}" beginnen`:o.format==="ends_with"?`Ungültiger String: muss mit "${o.suffix}" enden`:o.format==="includes"?`Ungültiger String: muss "${o.includes}" enthalten`:o.format==="regex"?`Ungültiger String: muss dem Muster ${o.pattern} entsprechen`:`Ungültig: ${n[o.format]??i.format}`}case"not_multiple_of":return`Ungültige Zahl: muss ein Vielfaches von ${i.divisor} sein`;case"unrecognized_keys":return`${i.keys.length>1?"Unbekannte Schlüssel":"Unbekannter Schlüssel"}: ${Ae(i.keys,", ")}`;case"invalid_key":return`Ungültiger Schlüssel in ${i.origin}`;case"invalid_union":return"Ungültige Eingabe";case"invalid_element":return`Ungültiger Wert in ${i.origin}`;default:return"Ungültige Eingabe"}}};function ove(){return{localeError:ive()}}const ave=()=>{const e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function t(i){return e[i]??null}const n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},r={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{const o=r[i.expected]??i.expected,a=ct(i.input),l=r[a]??a;return`Invalid input: expected ${o}, received ${l}`}case"invalid_value":return i.values.length===1?`Invalid input: expected ${it(i.values[0])}`:`Invalid option: expected one of ${Ae(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",a=t(i.origin);return a?`Too big: expected ${i.origin??"value"} to have ${o}${i.maximum.toString()} ${a.unit??"elements"}`:`Too big: expected ${i.origin??"value"} to be ${o}${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?">=":">",a=t(i.origin);return a?`Too small: expected ${i.origin} to have ${o}${i.minimum.toString()} ${a.unit}`:`Too small: expected ${i.origin} to be ${o}${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`Invalid string: must start with "${o.prefix}"`:o.format==="ends_with"?`Invalid string: must end with "${o.suffix}"`:o.format==="includes"?`Invalid string: must include "${o.includes}"`:o.format==="regex"?`Invalid string: must match pattern ${o.pattern}`:`Invalid ${n[o.format]??i.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${i.divisor}`;case"unrecognized_keys":return`Unrecognized key${i.keys.length>1?"s":""}: ${Ae(i.keys,", ")}`;case"invalid_key":return`Invalid key in ${i.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${i.origin}`;default:return"Invalid input"}}};function pV(){return{localeError:ave()}}const sve=()=>{const e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(i){return e[i]??null}const n={regex:"enigo",email:"retadreso",url:"URL",emoji:"emoĝio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-daŭro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},r={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return i=>{switch(i.code){case"invalid_type":{const o=r[i.expected]??i.expected,a=ct(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`Nevalida enigo: atendiĝis instanceof ${i.expected}, riceviĝis ${l}`:`Nevalida enigo: atendiĝis ${o}, riceviĝis ${l}`}case"invalid_value":return i.values.length===1?`Nevalida enigo: atendiĝis ${it(i.values[0])}`:`Nevalida opcio: atendiĝis unu el ${Ae(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",a=t(i.origin);return a?`Tro granda: atendiĝis ke ${i.origin??"valoro"} havu ${o}${i.maximum.toString()} ${a.unit??"elementojn"}`:`Tro granda: atendiĝis ke ${i.origin??"valoro"} havu ${o}${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?">=":">",a=t(i.origin);return a?`Tro malgranda: atendiĝis ke ${i.origin} havu ${o}${i.minimum.toString()} ${a.unit}`:`Tro malgranda: atendiĝis ke ${i.origin} estu ${o}${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`Nevalida karaktraro: devas komenciĝi per "${o.prefix}"`:o.format==="ends_with"?`Nevalida karaktraro: devas finiĝi per "${o.suffix}"`:o.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${o.includes}"`:o.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${o.pattern}`:`Nevalida ${n[o.format]??i.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${i.divisor}`;case"unrecognized_keys":return`Nekonata${i.keys.length>1?"j":""} ŝlosilo${i.keys.length>1?"j":""}: ${Ae(i.keys,", ")}`;case"invalid_key":return`Nevalida ŝlosilo en ${i.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${i.origin}`;default:return"Nevalida enigo"}}};function lve(){return{localeError:sve()}}const cve=()=>{const e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(i){return e[i]??null}const n={regex:"entrada",email:"dirección de correo electrónico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duración ISO",ipv4:"dirección IPv4",ipv6:"dirección IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},r={nan:"NaN",string:"texto",number:"número",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"número grande",symbol:"símbolo",undefined:"indefinido",null:"nulo",function:"función",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeración",union:"unión",literal:"literal",promise:"promesa",void:"vacío",never:"nunca",unknown:"desconocido",any:"cualquiera"};return i=>{switch(i.code){case"invalid_type":{const o=r[i.expected]??i.expected,a=ct(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`Entrada inválida: se esperaba instanceof ${i.expected}, recibido ${l}`:`Entrada inválida: se esperaba ${o}, recibido ${l}`}case"invalid_value":return i.values.length===1?`Entrada inválida: se esperaba ${it(i.values[0])}`:`Opción inválida: se esperaba una de ${Ae(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",a=t(i.origin),l=r[i.origin]??i.origin;return a?`Demasiado grande: se esperaba que ${l??"valor"} tuviera ${o}${i.maximum.toString()} ${a.unit??"elementos"}`:`Demasiado grande: se esperaba que ${l??"valor"} fuera ${o}${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?">=":">",a=t(i.origin),l=r[i.origin]??i.origin;return a?`Demasiado pequeño: se esperaba que ${l} tuviera ${o}${i.minimum.toString()} ${a.unit}`:`Demasiado pequeño: se esperaba que ${l} fuera ${o}${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`Cadena inválida: debe comenzar con "${o.prefix}"`:o.format==="ends_with"?`Cadena inválida: debe terminar en "${o.suffix}"`:o.format==="includes"?`Cadena inválida: debe incluir "${o.includes}"`:o.format==="regex"?`Cadena inválida: debe coincidir con el patrón ${o.pattern}`:`Inválido ${n[o.format]??i.format}`}case"not_multiple_of":return`Número inválido: debe ser múltiplo de ${i.divisor}`;case"unrecognized_keys":return`Llave${i.keys.length>1?"s":""} desconocida${i.keys.length>1?"s":""}: ${Ae(i.keys,", ")}`;case"invalid_key":return`Llave inválida en ${r[i.origin]??i.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido en ${r[i.origin]??i.origin}`;default:return"Entrada inválida"}}};function uve(){return{localeError:cve()}}const dve=()=>{const e={string:{unit:"کاراکتر",verb:"داشته باشد"},file:{unit:"بایت",verb:"داشته باشد"},array:{unit:"آیتم",verb:"داشته باشد"},set:{unit:"آیتم",verb:"داشته باشد"}};function t(i){return e[i]??null}const n={regex:"ورودی",email:"آدرس ایمیل",url:"URL",emoji:"ایموجی",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاریخ و زمان ایزو",date:"تاریخ ایزو",time:"زمان ایزو",duration:"مدت زمان ایزو",ipv4:"IPv4 آدرس",ipv6:"IPv6 آدرس",cidrv4:"IPv4 دامنه",cidrv6:"IPv6 دامنه",base64:"base64-encoded رشته",base64url:"base64url-encoded رشته",json_string:"JSON رشته",e164:"E.164 عدد",jwt:"JWT",template_literal:"ورودی"},r={nan:"NaN",number:"عدد",array:"آرایه"};return i=>{switch(i.code){case"invalid_type":{const o=r[i.expected]??i.expected,a=ct(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`ورودی نامعتبر: می‌بایست instanceof ${i.expected} می‌بود، ${l} دریافت شد`:`ورودی نامعتبر: می‌بایست ${o} می‌بود، ${l} دریافت شد`}case"invalid_value":return i.values.length===1?`ورودی نامعتبر: می‌بایست ${it(i.values[0])} می‌بود`:`گزینه نامعتبر: می‌بایست یکی از ${Ae(i.values,"|")} می‌بود`;case"too_big":{const o=i.inclusive?"<=":"<",a=t(i.origin);return a?`خیلی بزرگ: ${i.origin??"مقدار"} باید ${o}${i.maximum.toString()} ${a.unit??"عنصر"} باشد`:`خیلی بزرگ: ${i.origin??"مقدار"} باید ${o}${i.maximum.toString()} باشد`}case"too_small":{const o=i.inclusive?">=":">",a=t(i.origin);return a?`خیلی کوچک: ${i.origin} باید ${o}${i.minimum.toString()} ${a.unit} باشد`:`خیلی کوچک: ${i.origin} باید ${o}${i.minimum.toString()} باشد`}case"invalid_format":{const o=i;return o.format==="starts_with"?`رشته نامعتبر: باید با "${o.prefix}" شروع شود`:o.format==="ends_with"?`رشته نامعتبر: باید با "${o.suffix}" تمام شود`:o.format==="includes"?`رشته نامعتبر: باید شامل "${o.includes}" باشد`:o.format==="regex"?`رشته نامعتبر: باید با الگوی ${o.pattern} مطابقت داشته باشد`:`${n[o.format]??i.format} نامعتبر`}case"not_multiple_of":return`عدد نامعتبر: باید مضرب ${i.divisor} باشد`;case"unrecognized_keys":return`کلید${i.keys.length>1?"های":""} ناشناس: ${Ae(i.keys,", ")}`;case"invalid_key":return`کلید ناشناس در ${i.origin}`;case"invalid_union":return"ورودی نامعتبر";case"invalid_element":return`مقدار نامعتبر در ${i.origin}`;default:return"ورودی نامعتبر"}}};function fve(){return{localeError:dve()}}const pve=()=>{const e={string:{unit:"merkkiä",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"päivämäärän"}};function t(i){return e[i]??null}const n={regex:"säännöllinen lauseke",email:"sähköpostiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-päivämäärä",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},r={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{const o=r[i.expected]??i.expected,a=ct(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`Virheellinen tyyppi: odotettiin instanceof ${i.expected}, oli ${l}`:`Virheellinen tyyppi: odotettiin ${o}, oli ${l}`}case"invalid_value":return i.values.length===1?`Virheellinen syöte: täytyy olla ${it(i.values[0])}`:`Virheellinen valinta: täytyy olla yksi seuraavista: ${Ae(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",a=t(i.origin);return a?`Liian suuri: ${a.subject} täytyy olla ${o}${i.maximum.toString()} ${a.unit}`.trim():`Liian suuri: arvon täytyy olla ${o}${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?">=":">",a=t(i.origin);return a?`Liian pieni: ${a.subject} täytyy olla ${o}${i.minimum.toString()} ${a.unit}`.trim():`Liian pieni: arvon täytyy olla ${o}${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`Virheellinen syöte: täytyy alkaa "${o.prefix}"`:o.format==="ends_with"?`Virheellinen syöte: täytyy loppua "${o.suffix}"`:o.format==="includes"?`Virheellinen syöte: täytyy sisältää "${o.includes}"`:o.format==="regex"?`Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${o.pattern}`:`Virheellinen ${n[o.format]??i.format}`}case"not_multiple_of":return`Virheellinen luku: täytyy olla luvun ${i.divisor} monikerta`;case"unrecognized_keys":return`${i.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${Ae(i.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen syöte"}}};function mve(){return{localeError:pve()}}const hve=()=>{const e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function t(i){return e[i]??null}const n={regex:"entrée",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"},r={nan:"NaN",number:"nombre",array:"tableau"};return i=>{switch(i.code){case"invalid_type":{const o=r[i.expected]??i.expected,a=ct(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`Entrée invalide : instanceof ${i.expected} attendu, ${l} reçu`:`Entrée invalide : ${o} attendu, ${l} reçu`}case"invalid_value":return i.values.length===1?`Entrée invalide : ${it(i.values[0])} attendu`:`Option invalide : une valeur parmi ${Ae(i.values,"|")} attendue`;case"too_big":{const o=i.inclusive?"<=":"<",a=t(i.origin);return a?`Trop grand : ${i.origin??"valeur"} doit ${a.verb} ${o}${i.maximum.toString()} ${a.unit??"élément(s)"}`:`Trop grand : ${i.origin??"valeur"} doit être ${o}${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?">=":">",a=t(i.origin);return a?`Trop petit : ${i.origin} doit ${a.verb} ${o}${i.minimum.toString()} ${a.unit}`:`Trop petit : ${i.origin} doit être ${o}${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`Chaîne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Chaîne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Chaîne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Chaîne invalide : doit correspondre au modèle ${o.pattern}`:`${n[o.format]??i.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${i.divisor}`;case"unrecognized_keys":return`Clé${i.keys.length>1?"s":""} non reconnue${i.keys.length>1?"s":""} : ${Ae(i.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${i.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${i.origin}`;default:return"Entrée invalide"}}};function gve(){return{localeError:hve()}}const vve=()=>{const e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function t(i){return e[i]??null}const n={regex:"entrée",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"},r={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{const o=r[i.expected]??i.expected,a=ct(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`Entrée invalide : attendu instanceof ${i.expected}, reçu ${l}`:`Entrée invalide : attendu ${o}, reçu ${l}`}case"invalid_value":return i.values.length===1?`Entrée invalide : attendu ${it(i.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${Ae(i.values,"|")}`;case"too_big":{const o=i.inclusive?"≤":"<",a=t(i.origin);return a?`Trop grand : attendu que ${i.origin??"la valeur"} ait ${o}${i.maximum.toString()} ${a.unit}`:`Trop grand : attendu que ${i.origin??"la valeur"} soit ${o}${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?"≥":">",a=t(i.origin);return a?`Trop petit : attendu que ${i.origin} ait ${o}${i.minimum.toString()} ${a.unit}`:`Trop petit : attendu que ${i.origin} soit ${o}${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`Chaîne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Chaîne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Chaîne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Chaîne invalide : doit correspondre au motif ${o.pattern}`:`${n[o.format]??i.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${i.divisor}`;case"unrecognized_keys":return`Clé${i.keys.length>1?"s":""} non reconnue${i.keys.length>1?"s":""} : ${Ae(i.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${i.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${i.origin}`;default:return"Entrée invalide"}}};function yve(){return{localeError:vve()}}const bve=()=>{const e={string:{label:"מחרוזת",gender:"f"},number:{label:"מספר",gender:"m"},boolean:{label:"ערך בוליאני",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"תאריך",gender:"m"},array:{label:"מערך",gender:"m"},object:{label:"אובייקט",gender:"m"},null:{label:"ערך ריק (null)",gender:"m"},undefined:{label:"ערך לא מוגדר (undefined)",gender:"m"},symbol:{label:"סימבול (Symbol)",gender:"m"},function:{label:"פונקציה",gender:"f"},map:{label:"מפה (Map)",gender:"f"},set:{label:"קבוצה (Set)",gender:"f"},file:{label:"קובץ",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"ערך לא ידוע",gender:"m"},value:{label:"ערך",gender:"m"}},t={string:{unit:"תווים",shortLabel:"קצר",longLabel:"ארוך"},file:{unit:"בייטים",shortLabel:"קטן",longLabel:"גדול"},array:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},set:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},number:{unit:"",shortLabel:"קטן",longLabel:"גדול"}},n=f=>f?e[f]:void 0,r=f=>{const m=n(f);return m?m.label:f??e.unknown.label},i=f=>`ה${r(f)}`,o=f=>(n(f)?.gender??"m")==="f"?"צריכה להיות":"צריך להיות",a=f=>f?t[f]??null:null,l={regex:{label:"קלט",gender:"m"},email:{label:"כתובת אימייל",gender:"f"},url:{label:"כתובת רשת",gender:"f"},emoji:{label:"אימוג'י",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"תאריך וזמן ISO",gender:"m"},date:{label:"תאריך ISO",gender:"m"},time:{label:"זמן ISO",gender:"m"},duration:{label:"משך זמן ISO",gender:"m"},ipv4:{label:"כתובת IPv4",gender:"f"},ipv6:{label:"כתובת IPv6",gender:"f"},cidrv4:{label:"טווח IPv4",gender:"m"},cidrv6:{label:"טווח IPv6",gender:"m"},base64:{label:"מחרוזת בבסיס 64",gender:"f"},base64url:{label:"מחרוזת בבסיס 64 לכתובות רשת",gender:"f"},json_string:{label:"מחרוזת JSON",gender:"f"},e164:{label:"מספר E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"קלט",gender:"m"},includes:{label:"קלט",gender:"m"},lowercase:{label:"קלט",gender:"m"},starts_with:{label:"קלט",gender:"m"},uppercase:{label:"קלט",gender:"m"}},d={nan:"NaN"};return f=>{switch(f.code){case"invalid_type":{const m=f.expected,h=d[m??""]??r(m),v=ct(f.input),y=d[v]??e[v]?.label??v;return/^[A-Z]/.test(f.expected)?`קלט לא תקין: צריך להיות instanceof ${f.expected}, התקבל ${y}`:`קלט לא תקין: צריך להיות ${h}, התקבל ${y}`}case"invalid_value":{if(f.values.length===1)return`ערך לא תקין: הערך חייב להיות ${it(f.values[0])}`;const m=f.values.map(y=>it(y));if(f.values.length===2)return`ערך לא תקין: האפשרויות המתאימות הן ${m[0]} או ${m[1]}`;const h=m[m.length-1];return`ערך לא תקין: האפשרויות המתאימות הן ${m.slice(0,-1).join(", ")} או ${h}`}case"too_big":{const m=a(f.origin),h=i(f.origin??"value");if(f.origin==="string")return`${m?.longLabel??"ארוך"} מדי: ${h} צריכה להכיל ${f.maximum.toString()} ${m?.unit??""} ${f.inclusive?"או פחות":"לכל היותר"}`.trim();if(f.origin==="number"){const x=f.inclusive?`קטן או שווה ל-${f.maximum}`:`קטן מ-${f.maximum}`;return`גדול מדי: ${h} צריך להיות ${x}`}if(f.origin==="array"||f.origin==="set"){const x=f.origin==="set"?"צריכה":"צריך",S=f.inclusive?`${f.maximum} ${m?.unit??""} או פחות`:`פחות מ-${f.maximum} ${m?.unit??""}`;return`גדול מדי: ${h} ${x} להכיל ${S}`.trim()}const v=f.inclusive?"<=":"<",y=o(f.origin??"value");return m?.unit?`${m.longLabel} מדי: ${h} ${y} ${v}${f.maximum.toString()} ${m.unit}`:`${m?.longLabel??"גדול"} מדי: ${h} ${y} ${v}${f.maximum.toString()}`}case"too_small":{const m=a(f.origin),h=i(f.origin??"value");if(f.origin==="string")return`${m?.shortLabel??"קצר"} מדי: ${h} צריכה להכיל ${f.minimum.toString()} ${m?.unit??""} ${f.inclusive?"או יותר":"לפחות"}`.trim();if(f.origin==="number"){const x=f.inclusive?`גדול או שווה ל-${f.minimum}`:`גדול מ-${f.minimum}`;return`קטן מדי: ${h} צריך להיות ${x}`}if(f.origin==="array"||f.origin==="set"){const x=f.origin==="set"?"צריכה":"צריך";if(f.minimum===1&&f.inclusive){const C=(f.origin==="set","לפחות פריט אחד");return`קטן מדי: ${h} ${x} להכיל ${C}`}const S=f.inclusive?`${f.minimum} ${m?.unit??""} או יותר`:`יותר מ-${f.minimum} ${m?.unit??""}`;return`קטן מדי: ${h} ${x} להכיל ${S}`.trim()}const v=f.inclusive?">=":">",y=o(f.origin??"value");return m?.unit?`${m.shortLabel} מדי: ${h} ${y} ${v}${f.minimum.toString()} ${m.unit}`:`${m?.shortLabel??"קטן"} מדי: ${h} ${y} ${v}${f.minimum.toString()}`}case"invalid_format":{const m=f;if(m.format==="starts_with")return`המחרוזת חייבת להתחיל ב "${m.prefix}"`;if(m.format==="ends_with")return`המחרוזת חייבת להסתיים ב "${m.suffix}"`;if(m.format==="includes")return`המחרוזת חייבת לכלול "${m.includes}"`;if(m.format==="regex")return`המחרוזת חייבת להתאים לתבנית ${m.pattern}`;const h=l[m.format],v=h?.label??m.format,x=(h?.gender??"m")==="f"?"תקינה":"תקין";return`${v} לא ${x}`}case"not_multiple_of":return`מספר לא תקין: חייב להיות מכפלה של ${f.divisor}`;case"unrecognized_keys":return`מפתח${f.keys.length>1?"ות":""} לא מזוה${f.keys.length>1?"ים":"ה"}: ${Ae(f.keys,", ")}`;case"invalid_key":return"שדה לא תקין באובייקט";case"invalid_union":return"קלט לא תקין";case"invalid_element":return`ערך לא תקין ב${i(f.origin??"array")}`;default:return"קלט לא תקין"}}};function xve(){return{localeError:bve()}}const wve=()=>{const e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(i){return e[i]??null}const n={regex:"bemenet",email:"email cím",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO időbélyeg",date:"ISO dátum",time:"ISO idő",duration:"ISO időintervallum",ipv4:"IPv4 cím",ipv6:"IPv6 cím",cidrv4:"IPv4 tartomány",cidrv6:"IPv6 tartomány",base64:"base64-kódolt string",base64url:"base64url-kódolt string",json_string:"JSON string",e164:"E.164 szám",jwt:"JWT",template_literal:"bemenet"},r={nan:"NaN",number:"szám",array:"tömb"};return i=>{switch(i.code){case"invalid_type":{const o=r[i.expected]??i.expected,a=ct(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`Érvénytelen bemenet: a várt érték instanceof ${i.expected}, a kapott érték ${l}`:`Érvénytelen bemenet: a várt érték ${o}, a kapott érték ${l}`}case"invalid_value":return i.values.length===1?`Érvénytelen bemenet: a várt érték ${it(i.values[0])}`:`Érvénytelen opció: valamelyik érték várt ${Ae(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",a=t(i.origin);return a?`Túl nagy: ${i.origin??"érték"} mérete túl nagy ${o}${i.maximum.toString()} ${a.unit??"elem"}`:`Túl nagy: a bemeneti érték ${i.origin??"érték"} túl nagy: ${o}${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?">=":">",a=t(i.origin);return a?`Túl kicsi: a bemeneti érték ${i.origin} mérete túl kicsi ${o}${i.minimum.toString()} ${a.unit}`:`Túl kicsi: a bemeneti érték ${i.origin} túl kicsi ${o}${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`Érvénytelen string: "${o.prefix}" értékkel kell kezdődnie`:o.format==="ends_with"?`Érvénytelen string: "${o.suffix}" értékkel kell végződnie`:o.format==="includes"?`Érvénytelen string: "${o.includes}" értéket kell tartalmaznia`:o.format==="regex"?`Érvénytelen string: ${o.pattern} mintának kell megfelelnie`:`Érvénytelen ${n[o.format]??i.format}`}case"not_multiple_of":return`Érvénytelen szám: ${i.divisor} többszörösének kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${i.keys.length>1?"s":""}: ${Ae(i.keys,", ")}`;case"invalid_key":return`Érvénytelen kulcs ${i.origin}`;case"invalid_union":return"Érvénytelen bemenet";case"invalid_element":return`Érvénytelen érték: ${i.origin}`;default:return"Érvénytelen bemenet"}}};function Sve(){return{localeError:wve()}}function Z2(e,t,n){return Math.abs(e)===1?t:n}function fd(e){if(!e)return"";const t=["ա","ե","ը","ի","ո","ու","օ"],n=e[e.length-1];return e+(t.includes(n)?"ն":"ը")}const _ve=()=>{const e={string:{unit:{one:"նշան",many:"նշաններ"},verb:"ունենալ"},file:{unit:{one:"բայթ",many:"բայթեր"},verb:"ունենալ"},array:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"},set:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"}};function t(i){return e[i]??null}const n={regex:"մուտք",email:"էլ. հասցե",url:"URL",emoji:"էմոջի",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO ամսաթիվ և ժամ",date:"ISO ամսաթիվ",time:"ISO ժամ",duration:"ISO տևողություն",ipv4:"IPv4 հասցե",ipv6:"IPv6 հասցե",cidrv4:"IPv4 միջակայք",cidrv6:"IPv6 միջակայք",base64:"base64 ձևաչափով տող",base64url:"base64url ձևաչափով տող",json_string:"JSON տող",e164:"E.164 համար",jwt:"JWT",template_literal:"մուտք"},r={nan:"NaN",number:"թիվ",array:"զանգված"};return i=>{switch(i.code){case"invalid_type":{const o=r[i.expected]??i.expected,a=ct(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`Սխալ մուտքագրում․ սպասվում էր instanceof ${i.expected}, ստացվել է ${l}`:`Սխալ մուտքագրում․ սպասվում էր ${o}, ստացվել է ${l}`}case"invalid_value":return i.values.length===1?`Սխալ մուտքագրում․ սպասվում էր ${it(i.values[1])}`:`Սխալ տարբերակ․ սպասվում էր հետևյալներից մեկը՝ ${Ae(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",a=t(i.origin);if(a){const l=Number(i.maximum),d=Z2(l,a.unit.one,a.unit.many);return`Չափազանց մեծ արժեք․ սպասվում է, որ ${fd(i.origin??"արժեք")} կունենա ${o}${i.maximum.toString()} ${d}`}return`Չափազանց մեծ արժեք․ սպասվում է, որ ${fd(i.origin??"արժեք")} լինի ${o}${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?">=":">",a=t(i.origin);if(a){const l=Number(i.minimum),d=Z2(l,a.unit.one,a.unit.many);return`Չափազանց փոքր արժեք․ սպասվում է, որ ${fd(i.origin)} կունենա ${o}${i.minimum.toString()} ${d}`}return`Չափազանց փոքր արժեք․ սպասվում է, որ ${fd(i.origin)} լինի ${o}${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`Սխալ տող․ պետք է սկսվի "${o.prefix}"-ով`:o.format==="ends_with"?`Սխալ տող․ պետք է ավարտվի "${o.suffix}"-ով`:o.format==="includes"?`Սխալ տող․ պետք է պարունակի "${o.includes}"`:o.format==="regex"?`Սխալ տող․ պետք է համապատասխանի ${o.pattern} ձևաչափին`:`Սխալ ${n[o.format]??i.format}`}case"not_multiple_of":return`Սխալ թիվ․ պետք է բազմապատիկ լինի ${i.divisor}-ի`;case"unrecognized_keys":return`Չճանաչված բանալի${i.keys.length>1?"ներ":""}. ${Ae(i.keys,", ")}`;case"invalid_key":return`Սխալ բանալի ${fd(i.origin)}-ում`;case"invalid_union":return"Սխալ մուտքագրում";case"invalid_element":return`Սխալ արժեք ${fd(i.origin)}-ում`;default:return"Սխալ մուտքագրում"}}};function Cve(){return{localeError:_ve()}}const kve=()=>{const e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(i){return e[i]??null}const n={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},r={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{const o=r[i.expected]??i.expected,a=ct(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`Input tidak valid: diharapkan instanceof ${i.expected}, diterima ${l}`:`Input tidak valid: diharapkan ${o}, diterima ${l}`}case"invalid_value":return i.values.length===1?`Input tidak valid: diharapkan ${it(i.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${Ae(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",a=t(i.origin);return a?`Terlalu besar: diharapkan ${i.origin??"value"} memiliki ${o}${i.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: diharapkan ${i.origin??"value"} menjadi ${o}${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?">=":">",a=t(i.origin);return a?`Terlalu kecil: diharapkan ${i.origin} memiliki ${o}${i.minimum.toString()} ${a.unit}`:`Terlalu kecil: diharapkan ${i.origin} menjadi ${o}${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`String tidak valid: harus dimulai dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak valid: harus berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak valid: harus menyertakan "${o.includes}"`:o.format==="regex"?`String tidak valid: harus sesuai pola ${o.pattern}`:`${n[o.format]??i.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${i.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${i.keys.length>1?"s":""}: ${Ae(i.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${i.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${i.origin}`;default:return"Input tidak valid"}}};function Eve(){return{localeError:kve()}}const jve=()=>{const e={string:{unit:"stafi",verb:"að hafa"},file:{unit:"bæti",verb:"að hafa"},array:{unit:"hluti",verb:"að hafa"},set:{unit:"hluti",verb:"að hafa"}};function t(i){return e[i]??null}const n={regex:"gildi",email:"netfang",url:"vefslóð",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og tími",date:"ISO dagsetning",time:"ISO tími",duration:"ISO tímalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 tölugildi",jwt:"JWT",template_literal:"gildi"},r={nan:"NaN",number:"númer",array:"fylki"};return i=>{switch(i.code){case"invalid_type":{const o=r[i.expected]??i.expected,a=ct(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`Rangt gildi: Þú slóst inn ${l} þar sem á að vera instanceof ${i.expected}`:`Rangt gildi: Þú slóst inn ${l} þar sem á að vera ${o}`}case"invalid_value":return i.values.length===1?`Rangt gildi: gert ráð fyrir ${it(i.values[0])}`:`Ógilt val: má vera eitt af eftirfarandi ${Ae(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",a=t(i.origin);return a?`Of stórt: gert er ráð fyrir að ${i.origin??"gildi"} hafi ${o}${i.maximum.toString()} ${a.unit??"hluti"}`:`Of stórt: gert er ráð fyrir að ${i.origin??"gildi"} sé ${o}${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?">=":">",a=t(i.origin);return a?`Of lítið: gert er ráð fyrir að ${i.origin} hafi ${o}${i.minimum.toString()} ${a.unit}`:`Of lítið: gert er ráð fyrir að ${i.origin} sé ${o}${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`Ógildur strengur: verður að byrja á "${o.prefix}"`:o.format==="ends_with"?`Ógildur strengur: verður að enda á "${o.suffix}"`:o.format==="includes"?`Ógildur strengur: verður að innihalda "${o.includes}"`:o.format==="regex"?`Ógildur strengur: verður að fylgja mynstri ${o.pattern}`:`Rangt ${n[o.format]??i.format}`}case"not_multiple_of":return`Röng tala: verður að vera margfeldi af ${i.divisor}`;case"unrecognized_keys":return`Óþekkt ${i.keys.length>1?"ir lyklar":"ur lykill"}: ${Ae(i.keys,", ")}`;case"invalid_key":return`Rangur lykill í ${i.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi í ${i.origin}`;default:return"Rangt gildi"}}};function Rve(){return{localeError:jve()}}const Ive=()=>{const e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(i){return e[i]??null}const n={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},r={nan:"NaN",number:"numero",array:"vettore"};return i=>{switch(i.code){case"invalid_type":{const o=r[i.expected]??i.expected,a=ct(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`Input non valido: atteso instanceof ${i.expected}, ricevuto ${l}`:`Input non valido: atteso ${o}, ricevuto ${l}`}case"invalid_value":return i.values.length===1?`Input non valido: atteso ${it(i.values[0])}`:`Opzione non valida: atteso uno tra ${Ae(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",a=t(i.origin);return a?`Troppo grande: ${i.origin??"valore"} deve avere ${o}${i.maximum.toString()} ${a.unit??"elementi"}`:`Troppo grande: ${i.origin??"valore"} deve essere ${o}${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?">=":">",a=t(i.origin);return a?`Troppo piccolo: ${i.origin} deve avere ${o}${i.minimum.toString()} ${a.unit}`:`Troppo piccolo: ${i.origin} deve essere ${o}${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`Stringa non valida: deve iniziare con "${o.prefix}"`:o.format==="ends_with"?`Stringa non valida: deve terminare con "${o.suffix}"`:o.format==="includes"?`Stringa non valida: deve includere "${o.includes}"`:o.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${o.pattern}`:`Invalid ${n[o.format]??i.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${i.divisor}`;case"unrecognized_keys":return`Chiav${i.keys.length>1?"i":"e"} non riconosciut${i.keys.length>1?"e":"a"}: ${Ae(i.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${i.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${i.origin}`;default:return"Input non valido"}}};function Tve(){return{localeError:Ive()}}const Nve=()=>{const e={string:{unit:"文字",verb:"である"},file:{unit:"バイト",verb:"である"},array:{unit:"要素",verb:"である"},set:{unit:"要素",verb:"である"}};function t(i){return e[i]??null}const n={regex:"入力値",email:"メールアドレス",url:"URL",emoji:"絵文字",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日時",date:"ISO日付",time:"ISO時刻",duration:"ISO期間",ipv4:"IPv4アドレス",ipv6:"IPv6アドレス",cidrv4:"IPv4範囲",cidrv6:"IPv6範囲",base64:"base64エンコード文字列",base64url:"base64urlエンコード文字列",json_string:"JSON文字列",e164:"E.164番号",jwt:"JWT",template_literal:"入力値"},r={nan:"NaN",number:"数値",array:"配列"};return i=>{switch(i.code){case"invalid_type":{const o=r[i.expected]??i.expected,a=ct(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`無効な入力: instanceof ${i.expected}が期待されましたが、${l}が入力されました`:`無効な入力: ${o}が期待されましたが、${l}が入力されました`}case"invalid_value":return i.values.length===1?`無効な入力: ${it(i.values[0])}が期待されました`:`無効な選択: ${Ae(i.values,"、")}のいずれかである必要があります`;case"too_big":{const o=i.inclusive?"以下である":"より小さい",a=t(i.origin);return a?`大きすぎる値: ${i.origin??"値"}は${i.maximum.toString()}${a.unit??"要素"}${o}必要があります`:`大きすぎる値: ${i.origin??"値"}は${i.maximum.toString()}${o}必要があります`}case"too_small":{const o=i.inclusive?"以上である":"より大きい",a=t(i.origin);return a?`小さすぎる値: ${i.origin}は${i.minimum.toString()}${a.unit}${o}必要があります`:`小さすぎる値: ${i.origin}は${i.minimum.toString()}${o}必要があります`}case"invalid_format":{const o=i;return o.format==="starts_with"?`無効な文字列: "${o.prefix}"で始まる必要があります`:o.format==="ends_with"?`無効な文字列: "${o.suffix}"で終わる必要があります`:o.format==="includes"?`無効な文字列: "${o.includes}"を含む必要があります`:o.format==="regex"?`無効な文字列: パターン${o.pattern}に一致する必要があります`:`無効な${n[o.format]??i.format}`}case"not_multiple_of":return`無効な数値: ${i.divisor}の倍数である必要があります`;case"unrecognized_keys":return`認識されていないキー${i.keys.length>1?"群":""}: ${Ae(i.keys,"、")}`;case"invalid_key":return`${i.origin}内の無効なキー`;case"invalid_union":return"無効な入力";case"invalid_element":return`${i.origin}内の無効な値`;default:return"無効な入力"}}};function Ave(){return{localeError:Nve()}}const Ove=()=>{const e={string:{unit:"სიმბოლო",verb:"უნდა შეიცავდეს"},file:{unit:"ბაიტი",verb:"უნდა შეიცავდეს"},array:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"},set:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"}};function t(i){return e[i]??null}const n={regex:"შეყვანა",email:"ელ-ფოსტის მისამართი",url:"URL",emoji:"ემოჯი",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"თარიღი-დრო",date:"თარიღი",time:"დრო",duration:"ხანგრძლივობა",ipv4:"IPv4 მისამართი",ipv6:"IPv6 მისამართი",cidrv4:"IPv4 დიაპაზონი",cidrv6:"IPv6 დიაპაზონი",base64:"base64-კოდირებული სტრინგი",base64url:"base64url-კოდირებული სტრინგი",json_string:"JSON სტრინგი",e164:"E.164 ნომერი",jwt:"JWT",template_literal:"შეყვანა"},r={nan:"NaN",number:"რიცხვი",string:"სტრინგი",boolean:"ბულეანი",function:"ფუნქცია",array:"მასივი"};return i=>{switch(i.code){case"invalid_type":{const o=r[i.expected]??i.expected,a=ct(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`არასწორი შეყვანა: მოსალოდნელი instanceof ${i.expected}, მიღებული ${l}`:`არასწორი შეყვანა: მოსალოდნელი ${o}, მიღებული ${l}`}case"invalid_value":return i.values.length===1?`არასწორი შეყვანა: მოსალოდნელი ${it(i.values[0])}`:`არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${Ae(i.values,"|")}-დან`;case"too_big":{const o=i.inclusive?"<=":"<",a=t(i.origin);return a?`ზედმეტად დიდი: მოსალოდნელი ${i.origin??"მნიშვნელობა"} ${a.verb} ${o}${i.maximum.toString()} ${a.unit}`:`ზედმეტად დიდი: მოსალოდნელი ${i.origin??"მნიშვნელობა"} იყოს ${o}${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?">=":">",a=t(i.origin);return a?`ზედმეტად პატარა: მოსალოდნელი ${i.origin} ${a.verb} ${o}${i.minimum.toString()} ${a.unit}`:`ზედმეტად პატარა: მოსალოდნელი ${i.origin} იყოს ${o}${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`არასწორი სტრინგი: უნდა იწყებოდეს "${o.prefix}"-ით`:o.format==="ends_with"?`არასწორი სტრინგი: უნდა მთავრდებოდეს "${o.suffix}"-ით`:o.format==="includes"?`არასწორი სტრინგი: უნდა შეიცავდეს "${o.includes}"-ს`:o.format==="regex"?`არასწორი სტრინგი: უნდა შეესაბამებოდეს შაბლონს ${o.pattern}`:`არასწორი ${n[o.format]??i.format}`}case"not_multiple_of":return`არასწორი რიცხვი: უნდა იყოს ${i.divisor}-ის ჯერადი`;case"unrecognized_keys":return`უცნობი გასაღებ${i.keys.length>1?"ები":"ი"}: ${Ae(i.keys,", ")}`;case"invalid_key":return`არასწორი გასაღები ${i.origin}-ში`;case"invalid_union":return"არასწორი შეყვანა";case"invalid_element":return`არასწორი მნიშვნელობა ${i.origin}-ში`;default:return"არასწორი შეყვანა"}}};function Dve(){return{localeError:Ove()}}const $ve=()=>{const e={string:{unit:"តួអក្សរ",verb:"គួរមាន"},file:{unit:"បៃ",verb:"គួរមាន"},array:{unit:"ធាតុ",verb:"គួរមាន"},set:{unit:"ធាតុ",verb:"គួរមាន"}};function t(i){return e[i]??null}const n={regex:"ទិន្នន័យបញ្ចូល",email:"អាសយដ្ឋានអ៊ីមែល",url:"URL",emoji:"សញ្ញាអារម្មណ៍",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"កាលបរិច្ឆេទ និងម៉ោង ISO",date:"កាលបរិច្ឆេទ ISO",time:"ម៉ោង ISO",duration:"រយៈពេល ISO",ipv4:"អាសយដ្ឋាន IPv4",ipv6:"អាសយដ្ឋាន IPv6",cidrv4:"ដែនអាសយដ្ឋាន IPv4",cidrv6:"ដែនអាសយដ្ឋាន IPv6",base64:"ខ្សែអក្សរអ៊ិកូដ base64",base64url:"ខ្សែអក្សរអ៊ិកូដ base64url",json_string:"ខ្សែអក្សរ JSON",e164:"លេខ E.164",jwt:"JWT",template_literal:"ទិន្នន័យបញ្ចូល"},r={nan:"NaN",number:"លេខ",array:"អារេ (Array)",null:"គ្មានតម្លៃ (null)"};return i=>{switch(i.code){case"invalid_type":{const o=r[i.expected]??i.expected,a=ct(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ instanceof ${i.expected} ប៉ុន្តែទទួលបាន ${l}`:`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${o} ប៉ុន្តែទទួលបាន ${l}`}case"invalid_value":return i.values.length===1?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${it(i.values[0])}`:`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${Ae(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",a=t(i.origin);return a?`ធំពេក៖ ត្រូវការ ${i.origin??"តម្លៃ"} ${o} ${i.maximum.toString()} ${a.unit??"ធាតុ"}`:`ធំពេក៖ ត្រូវការ ${i.origin??"តម្លៃ"} ${o} ${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?">=":">",a=t(i.origin);return a?`តូចពេក៖ ត្រូវការ ${i.origin} ${o} ${i.minimum.toString()} ${a.unit}`:`តូចពេក៖ ត្រូវការ ${i.origin} ${o} ${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${o.prefix}"`:o.format==="ends_with"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${o.suffix}"`:o.format==="includes"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${o.includes}"`:o.format==="regex"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${o.pattern}`:`មិនត្រឹមត្រូវ៖ ${n[o.format]??i.format}`}case"not_multiple_of":return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${i.divisor}`;case"unrecognized_keys":return`រកឃើញសោមិនស្គាល់៖ ${Ae(i.keys,", ")}`;case"invalid_key":return`សោមិនត្រឹមត្រូវនៅក្នុង ${i.origin}`;case"invalid_union":return"ទិន្នន័យមិនត្រឹមត្រូវ";case"invalid_element":return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${i.origin}`;default:return"ទិន្នន័យមិនត្រឹមត្រូវ"}}};function mV(){return{localeError:$ve()}}function Pve(){return mV()}const Mve=()=>{const e={string:{unit:"문자",verb:"to have"},file:{unit:"바이트",verb:"to have"},array:{unit:"개",verb:"to have"},set:{unit:"개",verb:"to have"}};function t(i){return e[i]??null}const n={regex:"입력",email:"이메일 주소",url:"URL",emoji:"이모지",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 날짜시간",date:"ISO 날짜",time:"ISO 시간",duration:"ISO 기간",ipv4:"IPv4 주소",ipv6:"IPv6 주소",cidrv4:"IPv4 범위",cidrv6:"IPv6 범위",base64:"base64 인코딩 문자열",base64url:"base64url 인코딩 문자열",json_string:"JSON 문자열",e164:"E.164 번호",jwt:"JWT",template_literal:"입력"},r={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{const o=r[i.expected]??i.expected,a=ct(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`잘못된 입력: 예상 타입은 instanceof ${i.expected}, 받은 타입은 ${l}입니다`:`잘못된 입력: 예상 타입은 ${o}, 받은 타입은 ${l}입니다`}case"invalid_value":return i.values.length===1?`잘못된 입력: 값은 ${it(i.values[0])} 이어야 합니다`:`잘못된 옵션: ${Ae(i.values,"또는 ")} 중 하나여야 합니다`;case"too_big":{const o=i.inclusive?"이하":"미만",a=o==="미만"?"이어야 합니다":"여야 합니다",l=t(i.origin),d=l?.unit??"요소";return l?`${i.origin??"값"}이 너무 큽니다: ${i.maximum.toString()}${d} ${o}${a}`:`${i.origin??"값"}이 너무 큽니다: ${i.maximum.toString()} ${o}${a}`}case"too_small":{const o=i.inclusive?"이상":"초과",a=o==="이상"?"이어야 합니다":"여야 합니다",l=t(i.origin),d=l?.unit??"요소";return l?`${i.origin??"값"}이 너무 작습니다: ${i.minimum.toString()}${d} ${o}${a}`:`${i.origin??"값"}이 너무 작습니다: ${i.minimum.toString()} ${o}${a}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`잘못된 문자열: "${o.prefix}"(으)로 시작해야 합니다`:o.format==="ends_with"?`잘못된 문자열: "${o.suffix}"(으)로 끝나야 합니다`:o.format==="includes"?`잘못된 문자열: "${o.includes}"을(를) 포함해야 합니다`:o.format==="regex"?`잘못된 문자열: 정규식 ${o.pattern} 패턴과 일치해야 합니다`:`잘못된 ${n[o.format]??i.format}`}case"not_multiple_of":return`잘못된 숫자: ${i.divisor}의 배수여야 합니다`;case"unrecognized_keys":return`인식할 수 없는 키: ${Ae(i.keys,", ")}`;case"invalid_key":return`잘못된 키: ${i.origin}`;case"invalid_union":return"잘못된 입력";case"invalid_element":return`잘못된 값: ${i.origin}`;default:return"잘못된 입력"}}};function zve(){return{localeError:Mve()}}const Zp=e=>e.charAt(0).toUpperCase()+e.slice(1);function Y2(e){const t=Math.abs(e),n=t%10,r=t%100;return r>=11&&r<=19||n===0?"many":n===1?"one":"few"}const Lve=()=>{const e={string:{unit:{one:"simbolis",few:"simboliai",many:"simbolių"},verb:{smaller:{inclusive:"turi būti ne ilgesnė kaip",notInclusive:"turi būti trumpesnė kaip"},bigger:{inclusive:"turi būti ne trumpesnė kaip",notInclusive:"turi būti ilgesnė kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"baitų"},verb:{smaller:{inclusive:"turi būti ne didesnis kaip",notInclusive:"turi būti mažesnis kaip"},bigger:{inclusive:"turi būti ne mažesnis kaip",notInclusive:"turi būti didesnis kaip"}}},array:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}},set:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}}};function t(i,o,a,l){const d=e[i]??null;return d===null?d:{unit:d.unit[o],verb:d.verb[l][a?"inclusive":"notInclusive"]}}const n={regex:"įvestis",email:"el. pašto adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukmė",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 užkoduota eilutė",base64url:"base64url užkoduota eilutė",json_string:"JSON eilutė",e164:"E.164 numeris",jwt:"JWT",template_literal:"įvestis"},r={nan:"NaN",number:"skaičius",bigint:"sveikasis skaičius",string:"eilutė",boolean:"loginė reikšmė",undefined:"neapibrėžta reikšmė",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulinė reikšmė"};return i=>{switch(i.code){case"invalid_type":{const o=r[i.expected]??i.expected,a=ct(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`Gautas tipas ${l}, o tikėtasi - instanceof ${i.expected}`:`Gautas tipas ${l}, o tikėtasi - ${o}`}case"invalid_value":return i.values.length===1?`Privalo būti ${it(i.values[0])}`:`Privalo būti vienas iš ${Ae(i.values,"|")} pasirinkimų`;case"too_big":{const o=r[i.origin]??i.origin,a=t(i.origin,Y2(Number(i.maximum)),i.inclusive??!1,"smaller");if(a?.verb)return`${Zp(o??i.origin??"reikšmė")} ${a.verb} ${i.maximum.toString()} ${a.unit??"elementų"}`;const l=i.inclusive?"ne didesnis kaip":"mažesnis kaip";return`${Zp(o??i.origin??"reikšmė")} turi būti ${l} ${i.maximum.toString()} ${a?.unit}`}case"too_small":{const o=r[i.origin]??i.origin,a=t(i.origin,Y2(Number(i.minimum)),i.inclusive??!1,"bigger");if(a?.verb)return`${Zp(o??i.origin??"reikšmė")} ${a.verb} ${i.minimum.toString()} ${a.unit??"elementų"}`;const l=i.inclusive?"ne mažesnis kaip":"didesnis kaip";return`${Zp(o??i.origin??"reikšmė")} turi būti ${l} ${i.minimum.toString()} ${a?.unit}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`Eilutė privalo prasidėti "${o.prefix}"`:o.format==="ends_with"?`Eilutė privalo pasibaigti "${o.suffix}"`:o.format==="includes"?`Eilutė privalo įtraukti "${o.includes}"`:o.format==="regex"?`Eilutė privalo atitikti ${o.pattern}`:`Neteisingas ${n[o.format]??i.format}`}case"not_multiple_of":return`Skaičius privalo būti ${i.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpažint${i.keys.length>1?"i":"as"} rakt${i.keys.length>1?"ai":"as"}: ${Ae(i.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga įvestis";case"invalid_element":{const o=r[i.origin]??i.origin;return`${Zp(o??i.origin??"reikšmė")} turi klaidingą įvestį`}default:return"Klaidinga įvestis"}}};function Fve(){return{localeError:Lve()}}const Uve=()=>{const e={string:{unit:"знаци",verb:"да имаат"},file:{unit:"бајти",verb:"да имаат"},array:{unit:"ставки",verb:"да имаат"},set:{unit:"ставки",verb:"да имаат"}};function t(i){return e[i]??null}const n={regex:"внес",email:"адреса на е-пошта",url:"URL",emoji:"емоџи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO датум и време",date:"ISO датум",time:"ISO време",duration:"ISO времетраење",ipv4:"IPv4 адреса",ipv6:"IPv6 адреса",cidrv4:"IPv4 опсег",cidrv6:"IPv6 опсег",base64:"base64-енкодирана низа",base64url:"base64url-енкодирана низа",json_string:"JSON низа",e164:"E.164 број",jwt:"JWT",template_literal:"внес"},r={nan:"NaN",number:"број",array:"низа"};return i=>{switch(i.code){case"invalid_type":{const o=r[i.expected]??i.expected,a=ct(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`Грешен внес: се очекува instanceof ${i.expected}, примено ${l}`:`Грешен внес: се очекува ${o}, примено ${l}`}case"invalid_value":return i.values.length===1?`Invalid input: expected ${it(i.values[0])}`:`Грешана опција: се очекува една ${Ae(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",a=t(i.origin);return a?`Премногу голем: се очекува ${i.origin??"вредноста"} да има ${o}${i.maximum.toString()} ${a.unit??"елементи"}`:`Премногу голем: се очекува ${i.origin??"вредноста"} да биде ${o}${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?">=":">",a=t(i.origin);return a?`Премногу мал: се очекува ${i.origin} да има ${o}${i.minimum.toString()} ${a.unit}`:`Премногу мал: се очекува ${i.origin} да биде ${o}${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`Неважечка низа: мора да започнува со "${o.prefix}"`:o.format==="ends_with"?`Неважечка низа: мора да завршува со "${o.suffix}"`:o.format==="includes"?`Неважечка низа: мора да вклучува "${o.includes}"`:o.format==="regex"?`Неважечка низа: мора да одгоара на патернот ${o.pattern}`:`Invalid ${n[o.format]??i.format}`}case"not_multiple_of":return`Грешен број: мора да биде делив со ${i.divisor}`;case"unrecognized_keys":return`${i.keys.length>1?"Непрепознаени клучеви":"Непрепознаен клуч"}: ${Ae(i.keys,", ")}`;case"invalid_key":return`Грешен клуч во ${i.origin}`;case"invalid_union":return"Грешен внес";case"invalid_element":return`Грешна вредност во ${i.origin}`;default:return"Грешен внес"}}};function Vve(){return{localeError:Uve()}}const Bve=()=>{const e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(i){return e[i]??null}const n={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},r={nan:"NaN",number:"nombor"};return i=>{switch(i.code){case"invalid_type":{const o=r[i.expected]??i.expected,a=ct(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`Input tidak sah: dijangka instanceof ${i.expected}, diterima ${l}`:`Input tidak sah: dijangka ${o}, diterima ${l}`}case"invalid_value":return i.values.length===1?`Input tidak sah: dijangka ${it(i.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${Ae(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",a=t(i.origin);return a?`Terlalu besar: dijangka ${i.origin??"nilai"} ${a.verb} ${o}${i.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: dijangka ${i.origin??"nilai"} adalah ${o}${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?">=":">",a=t(i.origin);return a?`Terlalu kecil: dijangka ${i.origin} ${a.verb} ${o}${i.minimum.toString()} ${a.unit}`:`Terlalu kecil: dijangka ${i.origin} adalah ${o}${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`String tidak sah: mesti bermula dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak sah: mesti mengandungi "${o.includes}"`:o.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${o.pattern}`:`${n[o.format]??i.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${i.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${Ae(i.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${i.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${i.origin}`;default:return"Input tidak sah"}}};function Hve(){return{localeError:Bve()}}const qve=()=>{const e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function t(i){return e[i]??null}const n={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},r={nan:"NaN",number:"getal"};return i=>{switch(i.code){case"invalid_type":{const o=r[i.expected]??i.expected,a=ct(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`Ongeldige invoer: verwacht instanceof ${i.expected}, ontving ${l}`:`Ongeldige invoer: verwacht ${o}, ontving ${l}`}case"invalid_value":return i.values.length===1?`Ongeldige invoer: verwacht ${it(i.values[0])}`:`Ongeldige optie: verwacht één van ${Ae(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",a=t(i.origin),l=i.origin==="date"?"laat":i.origin==="string"?"lang":"groot";return a?`Te ${l}: verwacht dat ${i.origin??"waarde"} ${o}${i.maximum.toString()} ${a.unit??"elementen"} ${a.verb}`:`Te ${l}: verwacht dat ${i.origin??"waarde"} ${o}${i.maximum.toString()} is`}case"too_small":{const o=i.inclusive?">=":">",a=t(i.origin),l=i.origin==="date"?"vroeg":i.origin==="string"?"kort":"klein";return a?`Te ${l}: verwacht dat ${i.origin} ${o}${i.minimum.toString()} ${a.unit} ${a.verb}`:`Te ${l}: verwacht dat ${i.origin} ${o}${i.minimum.toString()} is`}case"invalid_format":{const o=i;return o.format==="starts_with"?`Ongeldige tekst: moet met "${o.prefix}" beginnen`:o.format==="ends_with"?`Ongeldige tekst: moet op "${o.suffix}" eindigen`:o.format==="includes"?`Ongeldige tekst: moet "${o.includes}" bevatten`:o.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${o.pattern}`:`Ongeldig: ${n[o.format]??i.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${i.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${i.keys.length>1?"s":""}: ${Ae(i.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${i.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${i.origin}`;default:return"Ongeldige invoer"}}};function Kve(){return{localeError:qve()}}const Gve=()=>{const e={string:{unit:"tegn",verb:"å ha"},file:{unit:"bytes",verb:"å ha"},array:{unit:"elementer",verb:"å inneholde"},set:{unit:"elementer",verb:"å inneholde"}};function t(i){return e[i]??null}const n={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},r={nan:"NaN",number:"tall",array:"liste"};return i=>{switch(i.code){case"invalid_type":{const o=r[i.expected]??i.expected,a=ct(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`Ugyldig input: forventet instanceof ${i.expected}, fikk ${l}`:`Ugyldig input: forventet ${o}, fikk ${l}`}case"invalid_value":return i.values.length===1?`Ugyldig verdi: forventet ${it(i.values[0])}`:`Ugyldig valg: forventet en av ${Ae(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",a=t(i.origin);return a?`For stor(t): forventet ${i.origin??"value"} til å ha ${o}${i.maximum.toString()} ${a.unit??"elementer"}`:`For stor(t): forventet ${i.origin??"value"} til å ha ${o}${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?">=":">",a=t(i.origin);return a?`For lite(n): forventet ${i.origin} til å ha ${o}${i.minimum.toString()} ${a.unit}`:`For lite(n): forventet ${i.origin} til å ha ${o}${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`Ugyldig streng: må starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: må ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: må inneholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: må matche mønsteret ${o.pattern}`:`Ugyldig ${n[o.format]??i.format}`}case"not_multiple_of":return`Ugyldig tall: må være et multiplum av ${i.divisor}`;case"unrecognized_keys":return`${i.keys.length>1?"Ukjente nøkler":"Ukjent nøkkel"}: ${Ae(i.keys,", ")}`;case"invalid_key":return`Ugyldig nøkkel i ${i.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${i.origin}`;default:return"Ugyldig input"}}};function Zve(){return{localeError:Gve()}}const Yve=()=>{const e={string:{unit:"harf",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"unsur",verb:"olmalıdır"},set:{unit:"unsur",verb:"olmalıdır"}};function t(i){return e[i]??null}const n={regex:"giren",email:"epostagâh",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO hengâmı",date:"ISO tarihi",time:"ISO zamanı",duration:"ISO müddeti",ipv4:"IPv4 nişânı",ipv6:"IPv6 nişânı",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-şifreli metin",base64url:"base64url-şifreli metin",json_string:"JSON metin",e164:"E.164 sayısı",jwt:"JWT",template_literal:"giren"},r={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return i=>{switch(i.code){case"invalid_type":{const o=r[i.expected]??i.expected,a=ct(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`Fâsit giren: umulan instanceof ${i.expected}, alınan ${l}`:`Fâsit giren: umulan ${o}, alınan ${l}`}case"invalid_value":return i.values.length===1?`Fâsit giren: umulan ${it(i.values[0])}`:`Fâsit tercih: mûteberler ${Ae(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",a=t(i.origin);return a?`Fazla büyük: ${i.origin??"value"}, ${o}${i.maximum.toString()} ${a.unit??"elements"} sahip olmalıydı.`:`Fazla büyük: ${i.origin??"value"}, ${o}${i.maximum.toString()} olmalıydı.`}case"too_small":{const o=i.inclusive?">=":">",a=t(i.origin);return a?`Fazla küçük: ${i.origin}, ${o}${i.minimum.toString()} ${a.unit} sahip olmalıydı.`:`Fazla küçük: ${i.origin}, ${o}${i.minimum.toString()} olmalıydı.`}case"invalid_format":{const o=i;return o.format==="starts_with"?`Fâsit metin: "${o.prefix}" ile başlamalı.`:o.format==="ends_with"?`Fâsit metin: "${o.suffix}" ile bitmeli.`:o.format==="includes"?`Fâsit metin: "${o.includes}" ihtivâ etmeli.`:o.format==="regex"?`Fâsit metin: ${o.pattern} nakşına uymalı.`:`Fâsit ${n[o.format]??i.format}`}case"not_multiple_of":return`Fâsit sayı: ${i.divisor} katı olmalıydı.`;case"unrecognized_keys":return`Tanınmayan anahtar ${i.keys.length>1?"s":""}: ${Ae(i.keys,", ")}`;case"invalid_key":return`${i.origin} için tanınmayan anahtar var.`;case"invalid_union":return"Giren tanınamadı.";case"invalid_element":return`${i.origin} için tanınmayan kıymet var.`;default:return"Kıymet tanınamadı."}}};function Wve(){return{localeError:Yve()}}const Xve=()=>{const e={string:{unit:"توکي",verb:"ولري"},file:{unit:"بایټس",verb:"ولري"},array:{unit:"توکي",verb:"ولري"},set:{unit:"توکي",verb:"ولري"}};function t(i){return e[i]??null}const n={regex:"ورودي",email:"بریښنالیک",url:"یو آر ال",emoji:"ایموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"نیټه او وخت",date:"نېټه",time:"وخت",duration:"موده",ipv4:"د IPv4 پته",ipv6:"د IPv6 پته",cidrv4:"د IPv4 ساحه",cidrv6:"د IPv6 ساحه",base64:"base64-encoded متن",base64url:"base64url-encoded متن",json_string:"JSON متن",e164:"د E.164 شمېره",jwt:"JWT",template_literal:"ورودي"},r={nan:"NaN",number:"عدد",array:"ارې"};return i=>{switch(i.code){case"invalid_type":{const o=r[i.expected]??i.expected,a=ct(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`ناسم ورودي: باید instanceof ${i.expected} وای, مګر ${l} ترلاسه شو`:`ناسم ورودي: باید ${o} وای, مګر ${l} ترلاسه شو`}case"invalid_value":return i.values.length===1?`ناسم ورودي: باید ${it(i.values[0])} وای`:`ناسم انتخاب: باید یو له ${Ae(i.values,"|")} څخه وای`;case"too_big":{const o=i.inclusive?"<=":"<",a=t(i.origin);return a?`ډیر لوی: ${i.origin??"ارزښت"} باید ${o}${i.maximum.toString()} ${a.unit??"عنصرونه"} ولري`:`ډیر لوی: ${i.origin??"ارزښت"} باید ${o}${i.maximum.toString()} وي`}case"too_small":{const o=i.inclusive?">=":">",a=t(i.origin);return a?`ډیر کوچنی: ${i.origin} باید ${o}${i.minimum.toString()} ${a.unit} ولري`:`ډیر کوچنی: ${i.origin} باید ${o}${i.minimum.toString()} وي`}case"invalid_format":{const o=i;return o.format==="starts_with"?`ناسم متن: باید د "${o.prefix}" سره پیل شي`:o.format==="ends_with"?`ناسم متن: باید د "${o.suffix}" سره پای ته ورسيږي`:o.format==="includes"?`ناسم متن: باید "${o.includes}" ولري`:o.format==="regex"?`ناسم متن: باید د ${o.pattern} سره مطابقت ولري`:`${n[o.format]??i.format} ناسم دی`}case"not_multiple_of":return`ناسم عدد: باید د ${i.divisor} مضرب وي`;case"unrecognized_keys":return`ناسم ${i.keys.length>1?"کلیډونه":"کلیډ"}: ${Ae(i.keys,", ")}`;case"invalid_key":return`ناسم کلیډ په ${i.origin} کې`;case"invalid_union":return"ناسمه ورودي";case"invalid_element":return`ناسم عنصر په ${i.origin} کې`;default:return"ناسمه ورودي"}}};function Jve(){return{localeError:Xve()}}const Qve=()=>{const e={string:{unit:"znaków",verb:"mieć"},file:{unit:"bajtów",verb:"mieć"},array:{unit:"elementów",verb:"mieć"},set:{unit:"elementów",verb:"mieć"}};function t(i){return e[i]??null}const n={regex:"wyrażenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ciąg znaków zakodowany w formacie base64",base64url:"ciąg znaków zakodowany w formacie base64url",json_string:"ciąg znaków w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wejście"},r={nan:"NaN",number:"liczba",array:"tablica"};return i=>{switch(i.code){case"invalid_type":{const o=r[i.expected]??i.expected,a=ct(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`Nieprawidłowe dane wejściowe: oczekiwano instanceof ${i.expected}, otrzymano ${l}`:`Nieprawidłowe dane wejściowe: oczekiwano ${o}, otrzymano ${l}`}case"invalid_value":return i.values.length===1?`Nieprawidłowe dane wejściowe: oczekiwano ${it(i.values[0])}`:`Nieprawidłowa opcja: oczekiwano jednej z wartości ${Ae(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",a=t(i.origin);return a?`Za duża wartość: oczekiwano, że ${i.origin??"wartość"} będzie mieć ${o}${i.maximum.toString()} ${a.unit??"elementów"}`:`Zbyt duż(y/a/e): oczekiwano, że ${i.origin??"wartość"} będzie wynosić ${o}${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?">=":">",a=t(i.origin);return a?`Za mała wartość: oczekiwano, że ${i.origin??"wartość"} będzie mieć ${o}${i.minimum.toString()} ${a.unit??"elementów"}`:`Zbyt mał(y/a/e): oczekiwano, że ${i.origin??"wartość"} będzie wynosić ${o}${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`Nieprawidłowy ciąg znaków: musi zaczynać się od "${o.prefix}"`:o.format==="ends_with"?`Nieprawidłowy ciąg znaków: musi kończyć się na "${o.suffix}"`:o.format==="includes"?`Nieprawidłowy ciąg znaków: musi zawierać "${o.includes}"`:o.format==="regex"?`Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${o.pattern}`:`Nieprawidłow(y/a/e) ${n[o.format]??i.format}`}case"not_multiple_of":return`Nieprawidłowa liczba: musi być wielokrotnością ${i.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${i.keys.length>1?"s":""}: ${Ae(i.keys,", ")}`;case"invalid_key":return`Nieprawidłowy klucz w ${i.origin}`;case"invalid_union":return"Nieprawidłowe dane wejściowe";case"invalid_element":return`Nieprawidłowa wartość w ${i.origin}`;default:return"Nieprawidłowe dane wejściowe"}}};function eye(){return{localeError:Qve()}}const tye=()=>{const e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(i){return e[i]??null}const n={regex:"padrão",email:"endereço de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"duração ISO",ipv4:"endereço IPv4",ipv6:"endereço IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},r={nan:"NaN",number:"número",null:"nulo"};return i=>{switch(i.code){case"invalid_type":{const o=r[i.expected]??i.expected,a=ct(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`Tipo inválido: esperado instanceof ${i.expected}, recebido ${l}`:`Tipo inválido: esperado ${o}, recebido ${l}`}case"invalid_value":return i.values.length===1?`Entrada inválida: esperado ${it(i.values[0])}`:`Opção inválida: esperada uma das ${Ae(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",a=t(i.origin);return a?`Muito grande: esperado que ${i.origin??"valor"} tivesse ${o}${i.maximum.toString()} ${a.unit??"elementos"}`:`Muito grande: esperado que ${i.origin??"valor"} fosse ${o}${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?">=":">",a=t(i.origin);return a?`Muito pequeno: esperado que ${i.origin} tivesse ${o}${i.minimum.toString()} ${a.unit}`:`Muito pequeno: esperado que ${i.origin} fosse ${o}${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`Texto inválido: deve começar com "${o.prefix}"`:o.format==="ends_with"?`Texto inválido: deve terminar com "${o.suffix}"`:o.format==="includes"?`Texto inválido: deve incluir "${o.includes}"`:o.format==="regex"?`Texto inválido: deve corresponder ao padrão ${o.pattern}`:`${n[o.format]??i.format} inválido`}case"not_multiple_of":return`Número inválido: deve ser múltiplo de ${i.divisor}`;case"unrecognized_keys":return`Chave${i.keys.length>1?"s":""} desconhecida${i.keys.length>1?"s":""}: ${Ae(i.keys,", ")}`;case"invalid_key":return`Chave inválida em ${i.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido em ${i.origin}`;default:return"Campo inválido"}}};function nye(){return{localeError:tye()}}function W2(e,t,n,r){const i=Math.abs(e),o=i%10,a=i%100;return a>=11&&a<=19?r:o===1?t:o>=2&&o<=4?n:r}const rye=()=>{const e={string:{unit:{one:"символ",few:"символа",many:"символов"},verb:"иметь"},file:{unit:{one:"байт",few:"байта",many:"байт"},verb:"иметь"},array:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"},set:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"}};function t(i){return e[i]??null}const n={regex:"ввод",email:"email адрес",url:"URL",emoji:"эмодзи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата и время",date:"ISO дата",time:"ISO время",duration:"ISO длительность",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"строка в формате base64",base64url:"строка в формате base64url",json_string:"JSON строка",e164:"номер E.164",jwt:"JWT",template_literal:"ввод"},r={nan:"NaN",number:"число",array:"массив"};return i=>{switch(i.code){case"invalid_type":{const o=r[i.expected]??i.expected,a=ct(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`Неверный ввод: ожидалось instanceof ${i.expected}, получено ${l}`:`Неверный ввод: ожидалось ${o}, получено ${l}`}case"invalid_value":return i.values.length===1?`Неверный ввод: ожидалось ${it(i.values[0])}`:`Неверный вариант: ожидалось одно из ${Ae(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",a=t(i.origin);if(a){const l=Number(i.maximum),d=W2(l,a.unit.one,a.unit.few,a.unit.many);return`Слишком большое значение: ожидалось, что ${i.origin??"значение"} будет иметь ${o}${i.maximum.toString()} ${d}`}return`Слишком большое значение: ожидалось, что ${i.origin??"значение"} будет ${o}${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?">=":">",a=t(i.origin);if(a){const l=Number(i.minimum),d=W2(l,a.unit.one,a.unit.few,a.unit.many);return`Слишком маленькое значение: ожидалось, что ${i.origin} будет иметь ${o}${i.minimum.toString()} ${d}`}return`Слишком маленькое значение: ожидалось, что ${i.origin} будет ${o}${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`Неверная строка: должна начинаться с "${o.prefix}"`:o.format==="ends_with"?`Неверная строка: должна заканчиваться на "${o.suffix}"`:o.format==="includes"?`Неверная строка: должна содержать "${o.includes}"`:o.format==="regex"?`Неверная строка: должна соответствовать шаблону ${o.pattern}`:`Неверный ${n[o.format]??i.format}`}case"not_multiple_of":return`Неверное число: должно быть кратным ${i.divisor}`;case"unrecognized_keys":return`Нераспознанн${i.keys.length>1?"ые":"ый"} ключ${i.keys.length>1?"и":""}: ${Ae(i.keys,", ")}`;case"invalid_key":return`Неверный ключ в ${i.origin}`;case"invalid_union":return"Неверные входные данные";case"invalid_element":return`Неверное значение в ${i.origin}`;default:return"Неверные входные данные"}}};function iye(){return{localeError:rye()}}const oye=()=>{const e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(i){return e[i]??null}const n={regex:"vnos",email:"e-poštni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in čas",date:"ISO datum",time:"ISO čas",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 številka",jwt:"JWT",template_literal:"vnos"},r={nan:"NaN",number:"število",array:"tabela"};return i=>{switch(i.code){case"invalid_type":{const o=r[i.expected]??i.expected,a=ct(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`Neveljaven vnos: pričakovano instanceof ${i.expected}, prejeto ${l}`:`Neveljaven vnos: pričakovano ${o}, prejeto ${l}`}case"invalid_value":return i.values.length===1?`Neveljaven vnos: pričakovano ${it(i.values[0])}`:`Neveljavna možnost: pričakovano eno izmed ${Ae(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",a=t(i.origin);return a?`Preveliko: pričakovano, da bo ${i.origin??"vrednost"} imelo ${o}${i.maximum.toString()} ${a.unit??"elementov"}`:`Preveliko: pričakovano, da bo ${i.origin??"vrednost"} ${o}${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?">=":">",a=t(i.origin);return a?`Premajhno: pričakovano, da bo ${i.origin} imelo ${o}${i.minimum.toString()} ${a.unit}`:`Premajhno: pričakovano, da bo ${i.origin} ${o}${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`Neveljaven niz: mora se začeti z "${o.prefix}"`:o.format==="ends_with"?`Neveljaven niz: mora se končati z "${o.suffix}"`:o.format==="includes"?`Neveljaven niz: mora vsebovati "${o.includes}"`:o.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${o.pattern}`:`Neveljaven ${n[o.format]??i.format}`}case"not_multiple_of":return`Neveljavno število: mora biti večkratnik ${i.divisor}`;case"unrecognized_keys":return`Neprepoznan${i.keys.length>1?"i ključi":" ključ"}: ${Ae(i.keys,", ")}`;case"invalid_key":return`Neveljaven ključ v ${i.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${i.origin}`;default:return"Neveljaven vnos"}}};function aye(){return{localeError:oye()}}const sye=()=>{const e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att innehålla"},set:{unit:"objekt",verb:"att innehålla"}};function t(i){return e[i]??null}const n={regex:"reguljärt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad sträng",base64url:"base64url-kodad sträng",json_string:"JSON-sträng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},r={nan:"NaN",number:"antal",array:"lista"};return i=>{switch(i.code){case"invalid_type":{const o=r[i.expected]??i.expected,a=ct(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`Ogiltig inmatning: förväntat instanceof ${i.expected}, fick ${l}`:`Ogiltig inmatning: förväntat ${o}, fick ${l}`}case"invalid_value":return i.values.length===1?`Ogiltig inmatning: förväntat ${it(i.values[0])}`:`Ogiltigt val: förväntade en av ${Ae(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",a=t(i.origin);return a?`För stor(t): förväntade ${i.origin??"värdet"} att ha ${o}${i.maximum.toString()} ${a.unit??"element"}`:`För stor(t): förväntat ${i.origin??"värdet"} att ha ${o}${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?">=":">",a=t(i.origin);return a?`För lite(t): förväntade ${i.origin??"värdet"} att ha ${o}${i.minimum.toString()} ${a.unit}`:`För lite(t): förväntade ${i.origin??"värdet"} att ha ${o}${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`Ogiltig sträng: måste börja med "${o.prefix}"`:o.format==="ends_with"?`Ogiltig sträng: måste sluta med "${o.suffix}"`:o.format==="includes"?`Ogiltig sträng: måste innehålla "${o.includes}"`:o.format==="regex"?`Ogiltig sträng: måste matcha mönstret "${o.pattern}"`:`Ogiltig(t) ${n[o.format]??i.format}`}case"not_multiple_of":return`Ogiltigt tal: måste vara en multipel av ${i.divisor}`;case"unrecognized_keys":return`${i.keys.length>1?"Okända nycklar":"Okänd nyckel"}: ${Ae(i.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${i.origin??"värdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt värde i ${i.origin??"värdet"}`;default:return"Ogiltig input"}}};function lye(){return{localeError:sye()}}const cye=()=>{const e={string:{unit:"எழுத்துக்கள்",verb:"கொண்டிருக்க வேண்டும்"},file:{unit:"பைட்டுகள்",verb:"கொண்டிருக்க வேண்டும்"},array:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"},set:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"}};function t(i){return e[i]??null}const n={regex:"உள்ளீடு",email:"மின்னஞ்சல் முகவரி",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO தேதி நேரம்",date:"ISO தேதி",time:"ISO நேரம்",duration:"ISO கால அளவு",ipv4:"IPv4 முகவரி",ipv6:"IPv6 முகவரி",cidrv4:"IPv4 வரம்பு",cidrv6:"IPv6 வரம்பு",base64:"base64-encoded சரம்",base64url:"base64url-encoded சரம்",json_string:"JSON சரம்",e164:"E.164 எண்",jwt:"JWT",template_literal:"input"},r={nan:"NaN",number:"எண்",array:"அணி",null:"வெறுமை"};return i=>{switch(i.code){case"invalid_type":{const o=r[i.expected]??i.expected,a=ct(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது instanceof ${i.expected}, பெறப்பட்டது ${l}`:`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${o}, பெறப்பட்டது ${l}`}case"invalid_value":return i.values.length===1?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${it(i.values[0])}`:`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${Ae(i.values,"|")} இல் ஒன்று`;case"too_big":{const o=i.inclusive?"<=":"<",a=t(i.origin);return a?`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${i.origin??"மதிப்பு"} ${o}${i.maximum.toString()} ${a.unit??"உறுப்புகள்"} ஆக இருக்க வேண்டும்`:`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${i.origin??"மதிப்பு"} ${o}${i.maximum.toString()} ஆக இருக்க வேண்டும்`}case"too_small":{const o=i.inclusive?">=":">",a=t(i.origin);return a?`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${i.origin} ${o}${i.minimum.toString()} ${a.unit} ஆக இருக்க வேண்டும்`:`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${i.origin} ${o}${i.minimum.toString()} ஆக இருக்க வேண்டும்`}case"invalid_format":{const o=i;return o.format==="starts_with"?`தவறான சரம்: "${o.prefix}" இல் தொடங்க வேண்டும்`:o.format==="ends_with"?`தவறான சரம்: "${o.suffix}" இல் முடிவடைய வேண்டும்`:o.format==="includes"?`தவறான சரம்: "${o.includes}" ஐ உள்ளடக்க வேண்டும்`:o.format==="regex"?`தவறான சரம்: ${o.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`:`தவறான ${n[o.format]??i.format}`}case"not_multiple_of":return`தவறான எண்: ${i.divisor} இன் பலமாக இருக்க வேண்டும்`;case"unrecognized_keys":return`அடையாளம் தெரியாத விசை${i.keys.length>1?"கள்":""}: ${Ae(i.keys,", ")}`;case"invalid_key":return`${i.origin} இல் தவறான விசை`;case"invalid_union":return"தவறான உள்ளீடு";case"invalid_element":return`${i.origin} இல் தவறான மதிப்பு`;default:return"தவறான உள்ளீடு"}}};function uye(){return{localeError:cye()}}const dye=()=>{const e={string:{unit:"ตัวอักษร",verb:"ควรมี"},file:{unit:"ไบต์",verb:"ควรมี"},array:{unit:"รายการ",verb:"ควรมี"},set:{unit:"รายการ",verb:"ควรมี"}};function t(i){return e[i]??null}const n={regex:"ข้อมูลที่ป้อน",email:"ที่อยู่อีเมล",url:"URL",emoji:"อิโมจิ",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"วันที่เวลาแบบ ISO",date:"วันที่แบบ ISO",time:"เวลาแบบ ISO",duration:"ช่วงเวลาแบบ ISO",ipv4:"ที่อยู่ IPv4",ipv6:"ที่อยู่ IPv6",cidrv4:"ช่วง IP แบบ IPv4",cidrv6:"ช่วง IP แบบ IPv6",base64:"ข้อความแบบ Base64",base64url:"ข้อความแบบ Base64 สำหรับ URL",json_string:"ข้อความแบบ JSON",e164:"เบอร์โทรศัพท์ระหว่างประเทศ (E.164)",jwt:"โทเคน JWT",template_literal:"ข้อมูลที่ป้อน"},r={nan:"NaN",number:"ตัวเลข",array:"อาร์เรย์ (Array)",null:"ไม่มีค่า (null)"};return i=>{switch(i.code){case"invalid_type":{const o=r[i.expected]??i.expected,a=ct(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น instanceof ${i.expected} แต่ได้รับ ${l}`:`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${o} แต่ได้รับ ${l}`}case"invalid_value":return i.values.length===1?`ค่าไม่ถูกต้อง: ควรเป็น ${it(i.values[0])}`:`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${Ae(i.values,"|")}`;case"too_big":{const o=i.inclusive?"ไม่เกิน":"น้อยกว่า",a=t(i.origin);return a?`เกินกำหนด: ${i.origin??"ค่า"} ควรมี${o} ${i.maximum.toString()} ${a.unit??"รายการ"}`:`เกินกำหนด: ${i.origin??"ค่า"} ควรมี${o} ${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?"อย่างน้อย":"มากกว่า",a=t(i.origin);return a?`น้อยกว่ากำหนด: ${i.origin} ควรมี${o} ${i.minimum.toString()} ${a.unit}`:`น้อยกว่ากำหนด: ${i.origin} ควรมี${o} ${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${o.prefix}"`:o.format==="ends_with"?`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${o.suffix}"`:o.format==="includes"?`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${o.includes}" อยู่ในข้อความ`:o.format==="regex"?`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${o.pattern}`:`รูปแบบไม่ถูกต้อง: ${n[o.format]??i.format}`}case"not_multiple_of":return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${i.divisor} ได้ลงตัว`;case"unrecognized_keys":return`พบคีย์ที่ไม่รู้จัก: ${Ae(i.keys,", ")}`;case"invalid_key":return`คีย์ไม่ถูกต้องใน ${i.origin}`;case"invalid_union":return"ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้";case"invalid_element":return`ข้อมูลไม่ถูกต้องใน ${i.origin}`;default:return"ข้อมูลไม่ถูกต้อง"}}};function fye(){return{localeError:dye()}}const pye=()=>{const e={string:{unit:"karakter",verb:"olmalı"},file:{unit:"bayt",verb:"olmalı"},array:{unit:"öğe",verb:"olmalı"},set:{unit:"öğe",verb:"olmalı"}};function t(i){return e[i]??null}const n={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO süre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aralığı",cidrv6:"IPv6 aralığı",base64:"base64 ile şifrelenmiş metin",base64url:"base64url ile şifrelenmiş metin",json_string:"JSON dizesi",e164:"E.164 sayısı",jwt:"JWT",template_literal:"Şablon dizesi"},r={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{const o=r[i.expected]??i.expected,a=ct(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`Geçersiz değer: beklenen instanceof ${i.expected}, alınan ${l}`:`Geçersiz değer: beklenen ${o}, alınan ${l}`}case"invalid_value":return i.values.length===1?`Geçersiz değer: beklenen ${it(i.values[0])}`:`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${Ae(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",a=t(i.origin);return a?`Çok büyük: beklenen ${i.origin??"değer"} ${o}${i.maximum.toString()} ${a.unit??"öğe"}`:`Çok büyük: beklenen ${i.origin??"değer"} ${o}${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?">=":">",a=t(i.origin);return a?`Çok küçük: beklenen ${i.origin} ${o}${i.minimum.toString()} ${a.unit}`:`Çok küçük: beklenen ${i.origin} ${o}${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`Geçersiz metin: "${o.prefix}" ile başlamalı`:o.format==="ends_with"?`Geçersiz metin: "${o.suffix}" ile bitmeli`:o.format==="includes"?`Geçersiz metin: "${o.includes}" içermeli`:o.format==="regex"?`Geçersiz metin: ${o.pattern} desenine uymalı`:`Geçersiz ${n[o.format]??i.format}`}case"not_multiple_of":return`Geçersiz sayı: ${i.divisor} ile tam bölünebilmeli`;case"unrecognized_keys":return`Tanınmayan anahtar${i.keys.length>1?"lar":""}: ${Ae(i.keys,", ")}`;case"invalid_key":return`${i.origin} içinde geçersiz anahtar`;case"invalid_union":return"Geçersiz değer";case"invalid_element":return`${i.origin} içinde geçersiz değer`;default:return"Geçersiz değer"}}};function mye(){return{localeError:pye()}}const hye=()=>{const e={string:{unit:"символів",verb:"матиме"},file:{unit:"байтів",verb:"матиме"},array:{unit:"елементів",verb:"матиме"},set:{unit:"елементів",verb:"матиме"}};function t(i){return e[i]??null}const n={regex:"вхідні дані",email:"адреса електронної пошти",url:"URL",emoji:"емодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"дата та час ISO",date:"дата ISO",time:"час ISO",duration:"тривалість ISO",ipv4:"адреса IPv4",ipv6:"адреса IPv6",cidrv4:"діапазон IPv4",cidrv6:"діапазон IPv6",base64:"рядок у кодуванні base64",base64url:"рядок у кодуванні base64url",json_string:"рядок JSON",e164:"номер E.164",jwt:"JWT",template_literal:"вхідні дані"},r={nan:"NaN",number:"число",array:"масив"};return i=>{switch(i.code){case"invalid_type":{const o=r[i.expected]??i.expected,a=ct(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`Неправильні вхідні дані: очікується instanceof ${i.expected}, отримано ${l}`:`Неправильні вхідні дані: очікується ${o}, отримано ${l}`}case"invalid_value":return i.values.length===1?`Неправильні вхідні дані: очікується ${it(i.values[0])}`:`Неправильна опція: очікується одне з ${Ae(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",a=t(i.origin);return a?`Занадто велике: очікується, що ${i.origin??"значення"} ${a.verb} ${o}${i.maximum.toString()} ${a.unit??"елементів"}`:`Занадто велике: очікується, що ${i.origin??"значення"} буде ${o}${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?">=":">",a=t(i.origin);return a?`Занадто мале: очікується, що ${i.origin} ${a.verb} ${o}${i.minimum.toString()} ${a.unit}`:`Занадто мале: очікується, що ${i.origin} буде ${o}${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`Неправильний рядок: повинен починатися з "${o.prefix}"`:o.format==="ends_with"?`Неправильний рядок: повинен закінчуватися на "${o.suffix}"`:o.format==="includes"?`Неправильний рядок: повинен містити "${o.includes}"`:o.format==="regex"?`Неправильний рядок: повинен відповідати шаблону ${o.pattern}`:`Неправильний ${n[o.format]??i.format}`}case"not_multiple_of":return`Неправильне число: повинно бути кратним ${i.divisor}`;case"unrecognized_keys":return`Нерозпізнаний ключ${i.keys.length>1?"і":""}: ${Ae(i.keys,", ")}`;case"invalid_key":return`Неправильний ключ у ${i.origin}`;case"invalid_union":return"Неправильні вхідні дані";case"invalid_element":return`Неправильне значення у ${i.origin}`;default:return"Неправильні вхідні дані"}}};function hV(){return{localeError:hye()}}function gye(){return hV()}const vye=()=>{const e={string:{unit:"حروف",verb:"ہونا"},file:{unit:"بائٹس",verb:"ہونا"},array:{unit:"آئٹمز",verb:"ہونا"},set:{unit:"آئٹمز",verb:"ہونا"}};function t(i){return e[i]??null}const n={regex:"ان پٹ",email:"ای میل ایڈریس",url:"یو آر ایل",emoji:"ایموجی",uuid:"یو یو آئی ڈی",uuidv4:"یو یو آئی ڈی وی 4",uuidv6:"یو یو آئی ڈی وی 6",nanoid:"نینو آئی ڈی",guid:"جی یو آئی ڈی",cuid:"سی یو آئی ڈی",cuid2:"سی یو آئی ڈی 2",ulid:"یو ایل آئی ڈی",xid:"ایکس آئی ڈی",ksuid:"کے ایس یو آئی ڈی",datetime:"آئی ایس او ڈیٹ ٹائم",date:"آئی ایس او تاریخ",time:"آئی ایس او وقت",duration:"آئی ایس او مدت",ipv4:"آئی پی وی 4 ایڈریس",ipv6:"آئی پی وی 6 ایڈریس",cidrv4:"آئی پی وی 4 رینج",cidrv6:"آئی پی وی 6 رینج",base64:"بیس 64 ان کوڈڈ سٹرنگ",base64url:"بیس 64 یو آر ایل ان کوڈڈ سٹرنگ",json_string:"جے ایس او این سٹرنگ",e164:"ای 164 نمبر",jwt:"جے ڈبلیو ٹی",template_literal:"ان پٹ"},r={nan:"NaN",number:"نمبر",array:"آرے",null:"نل"};return i=>{switch(i.code){case"invalid_type":{const o=r[i.expected]??i.expected,a=ct(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`غلط ان پٹ: instanceof ${i.expected} متوقع تھا، ${l} موصول ہوا`:`غلط ان پٹ: ${o} متوقع تھا، ${l} موصول ہوا`}case"invalid_value":return i.values.length===1?`غلط ان پٹ: ${it(i.values[0])} متوقع تھا`:`غلط آپشن: ${Ae(i.values,"|")} میں سے ایک متوقع تھا`;case"too_big":{const o=i.inclusive?"<=":"<",a=t(i.origin);return a?`بہت بڑا: ${i.origin??"ویلیو"} کے ${o}${i.maximum.toString()} ${a.unit??"عناصر"} ہونے متوقع تھے`:`بہت بڑا: ${i.origin??"ویلیو"} کا ${o}${i.maximum.toString()} ہونا متوقع تھا`}case"too_small":{const o=i.inclusive?">=":">",a=t(i.origin);return a?`بہت چھوٹا: ${i.origin} کے ${o}${i.minimum.toString()} ${a.unit} ہونے متوقع تھے`:`بہت چھوٹا: ${i.origin} کا ${o}${i.minimum.toString()} ہونا متوقع تھا`}case"invalid_format":{const o=i;return o.format==="starts_with"?`غلط سٹرنگ: "${o.prefix}" سے شروع ہونا چاہیے`:o.format==="ends_with"?`غلط سٹرنگ: "${o.suffix}" پر ختم ہونا چاہیے`:o.format==="includes"?`غلط سٹرنگ: "${o.includes}" شامل ہونا چاہیے`:o.format==="regex"?`غلط سٹرنگ: پیٹرن ${o.pattern} سے میچ ہونا چاہیے`:`غلط ${n[o.format]??i.format}`}case"not_multiple_of":return`غلط نمبر: ${i.divisor} کا مضاعف ہونا چاہیے`;case"unrecognized_keys":return`غیر تسلیم شدہ کی${i.keys.length>1?"ز":""}: ${Ae(i.keys,"، ")}`;case"invalid_key":return`${i.origin} میں غلط کی`;case"invalid_union":return"غلط ان پٹ";case"invalid_element":return`${i.origin} میں غلط ویلیو`;default:return"غلط ان پٹ"}}};function yye(){return{localeError:vye()}}const bye=()=>{const e={string:{unit:"belgi",verb:"bo‘lishi kerak"},file:{unit:"bayt",verb:"bo‘lishi kerak"},array:{unit:"element",verb:"bo‘lishi kerak"},set:{unit:"element",verb:"bo‘lishi kerak"}};function t(i){return e[i]??null}const n={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},r={nan:"NaN",number:"raqam",array:"massiv"};return i=>{switch(i.code){case"invalid_type":{const o=r[i.expected]??i.expected,a=ct(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`Noto‘g‘ri kirish: kutilgan instanceof ${i.expected}, qabul qilingan ${l}`:`Noto‘g‘ri kirish: kutilgan ${o}, qabul qilingan ${l}`}case"invalid_value":return i.values.length===1?`Noto‘g‘ri kirish: kutilgan ${it(i.values[0])}`:`Noto‘g‘ri variant: quyidagilardan biri kutilgan ${Ae(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",a=t(i.origin);return a?`Juda katta: kutilgan ${i.origin??"qiymat"} ${o}${i.maximum.toString()} ${a.unit} ${a.verb}`:`Juda katta: kutilgan ${i.origin??"qiymat"} ${o}${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?">=":">",a=t(i.origin);return a?`Juda kichik: kutilgan ${i.origin} ${o}${i.minimum.toString()} ${a.unit} ${a.verb}`:`Juda kichik: kutilgan ${i.origin} ${o}${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`Noto‘g‘ri satr: "${o.prefix}" bilan boshlanishi kerak`:o.format==="ends_with"?`Noto‘g‘ri satr: "${o.suffix}" bilan tugashi kerak`:o.format==="includes"?`Noto‘g‘ri satr: "${o.includes}" ni o‘z ichiga olishi kerak`:o.format==="regex"?`Noto‘g‘ri satr: ${o.pattern} shabloniga mos kelishi kerak`:`Noto‘g‘ri ${n[o.format]??i.format}`}case"not_multiple_of":return`Noto‘g‘ri raqam: ${i.divisor} ning karralisi bo‘lishi kerak`;case"unrecognized_keys":return`Noma’lum kalit${i.keys.length>1?"lar":""}: ${Ae(i.keys,", ")}`;case"invalid_key":return`${i.origin} dagi kalit noto‘g‘ri`;case"invalid_union":return"Noto‘g‘ri kirish";case"invalid_element":return`${i.origin} da noto‘g‘ri qiymat`;default:return"Noto‘g‘ri kirish"}}};function xye(){return{localeError:bye()}}const wye=()=>{const e={string:{unit:"ký tự",verb:"có"},file:{unit:"byte",verb:"có"},array:{unit:"phần tử",verb:"có"},set:{unit:"phần tử",verb:"có"}};function t(i){return e[i]??null}const n={regex:"đầu vào",email:"địa chỉ email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ngày giờ ISO",date:"ngày ISO",time:"giờ ISO",duration:"khoảng thời gian ISO",ipv4:"địa chỉ IPv4",ipv6:"địa chỉ IPv6",cidrv4:"dải IPv4",cidrv6:"dải IPv6",base64:"chuỗi mã hóa base64",base64url:"chuỗi mã hóa base64url",json_string:"chuỗi JSON",e164:"số E.164",jwt:"JWT",template_literal:"đầu vào"},r={nan:"NaN",number:"số",array:"mảng"};return i=>{switch(i.code){case"invalid_type":{const o=r[i.expected]??i.expected,a=ct(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`Đầu vào không hợp lệ: mong đợi instanceof ${i.expected}, nhận được ${l}`:`Đầu vào không hợp lệ: mong đợi ${o}, nhận được ${l}`}case"invalid_value":return i.values.length===1?`Đầu vào không hợp lệ: mong đợi ${it(i.values[0])}`:`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${Ae(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",a=t(i.origin);return a?`Quá lớn: mong đợi ${i.origin??"giá trị"} ${a.verb} ${o}${i.maximum.toString()} ${a.unit??"phần tử"}`:`Quá lớn: mong đợi ${i.origin??"giá trị"} ${o}${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?">=":">",a=t(i.origin);return a?`Quá nhỏ: mong đợi ${i.origin} ${a.verb} ${o}${i.minimum.toString()} ${a.unit}`:`Quá nhỏ: mong đợi ${i.origin} ${o}${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`Chuỗi không hợp lệ: phải bắt đầu bằng "${o.prefix}"`:o.format==="ends_with"?`Chuỗi không hợp lệ: phải kết thúc bằng "${o.suffix}"`:o.format==="includes"?`Chuỗi không hợp lệ: phải bao gồm "${o.includes}"`:o.format==="regex"?`Chuỗi không hợp lệ: phải khớp với mẫu ${o.pattern}`:`${n[o.format]??i.format} không hợp lệ`}case"not_multiple_of":return`Số không hợp lệ: phải là bội số của ${i.divisor}`;case"unrecognized_keys":return`Khóa không được nhận dạng: ${Ae(i.keys,", ")}`;case"invalid_key":return`Khóa không hợp lệ trong ${i.origin}`;case"invalid_union":return"Đầu vào không hợp lệ";case"invalid_element":return`Giá trị không hợp lệ trong ${i.origin}`;default:return"Đầu vào không hợp lệ"}}};function Sye(){return{localeError:wye()}}const _ye=()=>{const e={string:{unit:"字符",verb:"包含"},file:{unit:"字节",verb:"包含"},array:{unit:"项",verb:"包含"},set:{unit:"项",verb:"包含"}};function t(i){return e[i]??null}const n={regex:"输入",email:"电子邮件",url:"URL",emoji:"表情符号",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日期时间",date:"ISO日期",time:"ISO时间",duration:"ISO时长",ipv4:"IPv4地址",ipv6:"IPv6地址",cidrv4:"IPv4网段",cidrv6:"IPv6网段",base64:"base64编码字符串",base64url:"base64url编码字符串",json_string:"JSON字符串",e164:"E.164号码",jwt:"JWT",template_literal:"输入"},r={nan:"NaN",number:"数字",array:"数组",null:"空值(null)"};return i=>{switch(i.code){case"invalid_type":{const o=r[i.expected]??i.expected,a=ct(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`无效输入:期望 instanceof ${i.expected},实际接收 ${l}`:`无效输入:期望 ${o},实际接收 ${l}`}case"invalid_value":return i.values.length===1?`无效输入:期望 ${it(i.values[0])}`:`无效选项:期望以下之一 ${Ae(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",a=t(i.origin);return a?`数值过大:期望 ${i.origin??"值"} ${o}${i.maximum.toString()} ${a.unit??"个元素"}`:`数值过大:期望 ${i.origin??"值"} ${o}${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?">=":">",a=t(i.origin);return a?`数值过小:期望 ${i.origin} ${o}${i.minimum.toString()} ${a.unit}`:`数值过小:期望 ${i.origin} ${o}${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`无效字符串:必须以 "${o.prefix}" 开头`:o.format==="ends_with"?`无效字符串:必须以 "${o.suffix}" 结尾`:o.format==="includes"?`无效字符串:必须包含 "${o.includes}"`:o.format==="regex"?`无效字符串:必须满足正则表达式 ${o.pattern}`:`无效${n[o.format]??i.format}`}case"not_multiple_of":return`无效数字:必须是 ${i.divisor} 的倍数`;case"unrecognized_keys":return`出现未知的键(key): ${Ae(i.keys,", ")}`;case"invalid_key":return`${i.origin} 中的键(key)无效`;case"invalid_union":return"无效输入";case"invalid_element":return`${i.origin} 中包含无效值(value)`;default:return"无效输入"}}};function Cye(){return{localeError:_ye()}}const kye=()=>{const e={string:{unit:"字元",verb:"擁有"},file:{unit:"位元組",verb:"擁有"},array:{unit:"項目",verb:"擁有"},set:{unit:"項目",verb:"擁有"}};function t(i){return e[i]??null}const n={regex:"輸入",email:"郵件地址",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 日期時間",date:"ISO 日期",time:"ISO 時間",duration:"ISO 期間",ipv4:"IPv4 位址",ipv6:"IPv6 位址",cidrv4:"IPv4 範圍",cidrv6:"IPv6 範圍",base64:"base64 編碼字串",base64url:"base64url 編碼字串",json_string:"JSON 字串",e164:"E.164 數值",jwt:"JWT",template_literal:"輸入"},r={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{const o=r[i.expected]??i.expected,a=ct(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`無效的輸入值:預期為 instanceof ${i.expected},但收到 ${l}`:`無效的輸入值:預期為 ${o},但收到 ${l}`}case"invalid_value":return i.values.length===1?`無效的輸入值:預期為 ${it(i.values[0])}`:`無效的選項:預期為以下其中之一 ${Ae(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",a=t(i.origin);return a?`數值過大:預期 ${i.origin??"值"} 應為 ${o}${i.maximum.toString()} ${a.unit??"個元素"}`:`數值過大:預期 ${i.origin??"值"} 應為 ${o}${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?">=":">",a=t(i.origin);return a?`數值過小:預期 ${i.origin} 應為 ${o}${i.minimum.toString()} ${a.unit}`:`數值過小:預期 ${i.origin} 應為 ${o}${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`無效的字串:必須以 "${o.prefix}" 開頭`:o.format==="ends_with"?`無效的字串:必須以 "${o.suffix}" 結尾`:o.format==="includes"?`無效的字串:必須包含 "${o.includes}"`:o.format==="regex"?`無效的字串:必須符合格式 ${o.pattern}`:`無效的 ${n[o.format]??i.format}`}case"not_multiple_of":return`無效的數字:必須為 ${i.divisor} 的倍數`;case"unrecognized_keys":return`無法識別的鍵值${i.keys.length>1?"們":""}:${Ae(i.keys,"、")}`;case"invalid_key":return`${i.origin} 中有無效的鍵值`;case"invalid_union":return"無效的輸入值";case"invalid_element":return`${i.origin} 中有無效的值`;default:return"無效的輸入值"}}};function Eye(){return{localeError:kye()}}const jye=()=>{const e={string:{unit:"àmi",verb:"ní"},file:{unit:"bytes",verb:"ní"},array:{unit:"nkan",verb:"ní"},set:{unit:"nkan",verb:"ní"}};function t(i){return e[i]??null}const n={regex:"ẹ̀rọ ìbáwọlé",email:"àdírẹ́sì ìmẹ́lì",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"àkókò ISO",date:"ọjọ́ ISO",time:"àkókò ISO",duration:"àkókò tó pé ISO",ipv4:"àdírẹ́sì IPv4",ipv6:"àdírẹ́sì IPv6",cidrv4:"àgbègbè IPv4",cidrv6:"àgbègbè IPv6",base64:"ọ̀rọ̀ tí a kọ́ ní base64",base64url:"ọ̀rọ̀ base64url",json_string:"ọ̀rọ̀ JSON",e164:"nọ́mbà E.164",jwt:"JWT",template_literal:"ẹ̀rọ ìbáwọlé"},r={nan:"NaN",number:"nọ́mbà",array:"akopọ"};return i=>{switch(i.code){case"invalid_type":{const o=r[i.expected]??i.expected,a=ct(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`Ìbáwọlé aṣìṣe: a ní láti fi instanceof ${i.expected}, àmọ̀ a rí ${l}`:`Ìbáwọlé aṣìṣe: a ní láti fi ${o}, àmọ̀ a rí ${l}`}case"invalid_value":return i.values.length===1?`Ìbáwọlé aṣìṣe: a ní láti fi ${it(i.values[0])}`:`Àṣàyàn aṣìṣe: yan ọ̀kan lára ${Ae(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",a=t(i.origin);return a?`Tó pọ̀ jù: a ní láti jẹ́ pé ${i.origin??"iye"} ${a.verb} ${o}${i.maximum} ${a.unit}`:`Tó pọ̀ jù: a ní láti jẹ́ ${o}${i.maximum}`}case"too_small":{const o=i.inclusive?">=":">",a=t(i.origin);return a?`Kéré ju: a ní láti jẹ́ pé ${i.origin} ${a.verb} ${o}${i.minimum} ${a.unit}`:`Kéré ju: a ní láti jẹ́ ${o}${i.minimum}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bẹ̀rẹ̀ pẹ̀lú "${o.prefix}"`:o.format==="ends_with"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ parí pẹ̀lú "${o.suffix}"`:o.format==="includes"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ ní "${o.includes}"`:o.format==="regex"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bá àpẹẹrẹ mu ${o.pattern}`:`Aṣìṣe: ${n[o.format]??i.format}`}case"not_multiple_of":return`Nọ́mbà aṣìṣe: gbọ́dọ̀ jẹ́ èyà pípín ti ${i.divisor}`;case"unrecognized_keys":return`Bọtìnì àìmọ̀: ${Ae(i.keys,", ")}`;case"invalid_key":return`Bọtìnì aṣìṣe nínú ${i.origin}`;case"invalid_union":return"Ìbáwọlé aṣìṣe";case"invalid_element":return`Iye aṣìṣe nínú ${i.origin}`;default:return"Ìbáwọlé aṣìṣe"}}};function Rye(){return{localeError:jye()}}const gV=Object.freeze(Object.defineProperty({__proto__:null,ar:qge,az:Gge,be:Yge,bg:Xge,ca:Qge,cs:tve,da:rve,de:ove,en:pV,eo:lve,es:uve,fa:fve,fi:mve,fr:gve,frCA:yve,he:xve,hu:Sve,hy:Cve,id:Eve,is:Rve,it:Tve,ja:Ave,ka:Dve,kh:Pve,km:mV,ko:zve,lt:Fve,mk:Vve,ms:Hve,nl:Kve,no:Zve,ota:Wve,pl:eye,ps:Jve,pt:nye,ru:iye,sl:aye,sv:lye,ta:uye,th:fye,tr:mye,ua:gye,uk:hV,ur:yye,uz:xye,vi:Sye,yo:Rye,zhCN:Cye,zhTW:Eye},Symbol.toStringTag,{value:"Module"}));var X2;const vV=Symbol("ZodOutput"),yV=Symbol("ZodInput");class bV{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const r=n[0];return this._map.set(t,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const r={...this.get(n)??{}};delete r.id;const i={...r,...this._map.get(t)};return Object.keys(i).length?i:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function Hj(){return new bV}(X2=globalThis).__zod_globalRegistry??(X2.__zod_globalRegistry=Hj());const To=globalThis.__zod_globalRegistry;function xV(e,t){return new e({type:"string",..._e(t)})}function wV(e,t){return new e({type:"string",coerce:!0,..._e(t)})}function qj(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,..._e(t)})}function ab(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,..._e(t)})}function Kj(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,..._e(t)})}function Gj(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",..._e(t)})}function Zj(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",..._e(t)})}function Yj(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",..._e(t)})}function zx(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,..._e(t)})}function Wj(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,..._e(t)})}function Xj(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,..._e(t)})}function Jj(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,..._e(t)})}function Qj(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,..._e(t)})}function eR(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,..._e(t)})}function tR(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,..._e(t)})}function nR(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,..._e(t)})}function rR(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,..._e(t)})}function iR(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,..._e(t)})}function SV(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,..._e(t)})}function oR(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,..._e(t)})}function aR(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,..._e(t)})}function sR(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,..._e(t)})}function lR(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,..._e(t)})}function cR(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,..._e(t)})}function uR(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,..._e(t)})}const _V={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function CV(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,..._e(t)})}function kV(e,t){return new e({type:"string",format:"date",check:"string_format",..._e(t)})}function EV(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,..._e(t)})}function jV(e,t){return new e({type:"string",format:"duration",check:"string_format",..._e(t)})}function RV(e,t){return new e({type:"number",checks:[],..._e(t)})}function IV(e,t){return new e({type:"number",coerce:!0,checks:[],..._e(t)})}function TV(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",..._e(t)})}function NV(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",..._e(t)})}function AV(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",..._e(t)})}function OV(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",..._e(t)})}function DV(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",..._e(t)})}function $V(e,t){return new e({type:"boolean",..._e(t)})}function PV(e,t){return new e({type:"boolean",coerce:!0,..._e(t)})}function MV(e,t){return new e({type:"bigint",..._e(t)})}function zV(e,t){return new e({type:"bigint",coerce:!0,..._e(t)})}function LV(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",..._e(t)})}function FV(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",..._e(t)})}function UV(e,t){return new e({type:"symbol",..._e(t)})}function VV(e,t){return new e({type:"undefined",..._e(t)})}function BV(e,t){return new e({type:"null",..._e(t)})}function HV(e){return new e({type:"any"})}function qV(e){return new e({type:"unknown"})}function KV(e,t){return new e({type:"never",..._e(t)})}function GV(e,t){return new e({type:"void",..._e(t)})}function ZV(e,t){return new e({type:"date",..._e(t)})}function YV(e,t){return new e({type:"date",coerce:!0,..._e(t)})}function WV(e,t){return new e({type:"nan",..._e(t)})}function El(e,t){return new $j({check:"less_than",..._e(t),value:e,inclusive:!1})}function Oo(e,t){return new $j({check:"less_than",..._e(t),value:e,inclusive:!0})}function jl(e,t){return new Pj({check:"greater_than",..._e(t),value:e,inclusive:!1})}function Si(e,t){return new Pj({check:"greater_than",..._e(t),value:e,inclusive:!0})}function dR(e){return jl(0,e)}function fR(e){return El(0,e)}function pR(e){return Oo(0,e)}function mR(e){return Si(0,e)}function af(e,t){return new D3({check:"multiple_of",..._e(t),value:e})}function Df(e,t){return new M3({check:"max_size",..._e(t),maximum:e})}function Rl(e,t){return new z3({check:"min_size",..._e(t),minimum:e})}function Rh(e,t){return new L3({check:"size_equals",..._e(t),size:e})}function Ih(e,t){return new F3({check:"max_length",..._e(t),maximum:e})}function qc(e,t){return new U3({check:"min_length",..._e(t),minimum:e})}function Th(e,t){return new V3({check:"length_equals",..._e(t),length:e})}function Lx(e,t){return new B3({check:"string_format",format:"regex",..._e(t),pattern:e})}function Fx(e){return new H3({check:"string_format",format:"lowercase",..._e(e)})}function Ux(e){return new q3({check:"string_format",format:"uppercase",..._e(e)})}function Vx(e,t){return new K3({check:"string_format",format:"includes",..._e(t),includes:e})}function Bx(e,t){return new G3({check:"string_format",format:"starts_with",..._e(t),prefix:e})}function Hx(e,t){return new Z3({check:"string_format",format:"ends_with",..._e(t),suffix:e})}function hR(e,t,n){return new Y3({check:"property",property:e,schema:t,..._e(n)})}function qx(e,t){return new W3({check:"mime_type",mime:e,..._e(t)})}function ks(e){return new X3({check:"overwrite",tx:e})}function Kx(e){return ks(t=>t.normalize(e))}function Gx(){return ks(e=>e.trim())}function Zx(){return ks(e=>e.toLowerCase())}function Yx(){return ks(e=>e.toUpperCase())}function Wx(){return ks(e=>N6(e))}function XV(e,t,n){return new e({type:"array",element:t,..._e(n)})}function Iye(e,t,n){return new e({type:"union",options:t,..._e(n)})}function Tye(e,t,n){return new e({type:"union",options:t,inclusive:!1,..._e(n)})}function Nye(e,t,n,r){return new e({type:"union",options:n,discriminator:t,..._e(r)})}function Aye(e,t,n){return new e({type:"intersection",left:t,right:n})}function Oye(e,t,n,r){const i=n instanceof gt,o=i?r:n,a=i?n:null;return new e({type:"tuple",items:t,rest:a,..._e(o)})}function Dye(e,t,n,r){return new e({type:"record",keyType:t,valueType:n,..._e(r)})}function $ye(e,t,n,r){return new e({type:"map",keyType:t,valueType:n,..._e(r)})}function Pye(e,t,n){return new e({type:"set",valueType:t,..._e(n)})}function Mye(e,t,n){const r=Array.isArray(t)?Object.fromEntries(t.map(i=>[i,i])):t;return new e({type:"enum",entries:r,..._e(n)})}function zye(e,t,n){return new e({type:"enum",entries:t,..._e(n)})}function Lye(e,t,n){return new e({type:"literal",values:Array.isArray(t)?t:[t],..._e(n)})}function JV(e,t){return new e({type:"file",..._e(t)})}function Fye(e,t){return new e({type:"transform",transform:t})}function Uye(e,t){return new e({type:"optional",innerType:t})}function Vye(e,t){return new e({type:"nullable",innerType:t})}function Bye(e,t,n){return new e({type:"default",innerType:t,get defaultValue(){return typeof n=="function"?n():Ox(n)}})}function Hye(e,t,n){return new e({type:"nonoptional",innerType:t,..._e(n)})}function qye(e,t){return new e({type:"success",innerType:t})}function Kye(e,t,n){return new e({type:"catch",innerType:t,catchValue:typeof n=="function"?n:()=>n})}function Gye(e,t,n){return new e({type:"pipe",in:t,out:n})}function Zye(e,t){return new e({type:"readonly",innerType:t})}function Yye(e,t,n){return new e({type:"template_literal",parts:t,..._e(n)})}function Wye(e,t){return new e({type:"lazy",getter:t})}function Xye(e,t){return new e({type:"promise",innerType:t})}function QV(e,t,n){const r=_e(n);return r.abort??(r.abort=!0),new e({type:"custom",check:"custom",fn:t,...r})}function eB(e,t,n){return new e({type:"custom",check:"custom",fn:t,..._e(n)})}function tB(e){const t=nB(n=>(n.addIssue=r=>{if(typeof r=="string")n.issues.push(rf(r,n.value,t._zod.def));else{const i=r;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=n.value),i.inst??(i.inst=t),i.continue??(i.continue=!t._zod.def.abort),n.issues.push(rf(i))}},e(n.value,n)));return t}function nB(e,t){const n=new On({check:"custom",..._e(t)});return n._zod.check=e,n}function rB(e){const t=new On({check:"describe"});return t._zod.onattach=[n=>{const r=To.get(n)??{};To.add(n,{...r,description:e})}],t._zod.check=()=>{},t}function iB(e){const t=new On({check:"meta"});return t._zod.onattach=[n=>{const r=To.get(n)??{};To.add(n,{...r,...e})}],t._zod.check=()=>{},t}function oB(e,t){const n=_e(t);let r=n.truthy??["true","1","yes","on","y","enabled"],i=n.falsy??["false","0","no","off","n","disabled"];n.case!=="sensitive"&&(r=r.map(y=>typeof y=="string"?y.toLowerCase():y),i=i.map(y=>typeof y=="string"?y.toLowerCase():y));const o=new Set(r),a=new Set(i),l=e.Codec??Bj,d=e.Boolean??Lj,f=e.String??jh,m=new f({type:"string",error:n.error}),h=new d({type:"boolean",error:n.error}),v=new l({type:"pipe",in:m,out:h,transform:((y,x)=>{let S=y;return n.case!=="sensitive"&&(S=S.toLowerCase()),o.has(S)?!0:a.has(S)?!1:(x.issues.push({code:"invalid_value",expected:"stringbool",values:[...o,...a],input:x.value,inst:v,continue:!1}),{})}),reverseTransform:((y,x)=>y===!0?r[0]||"true":i[0]||"false"),error:n.error});return v}function Nh(e,t,n,r={}){const i=_e(r),o={..._e(r),check:"string_format",type:"string",format:t,fn:typeof n=="function"?n:l=>n.test(l),...i};return n instanceof RegExp&&(o.pattern=n),new e(o)}function sf(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??To,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function pn(e,t,n={path:[],schemaPath:[]}){var r;const i=e._zod.def,o=t.seen.get(e);if(o)return o.count++,n.schemaPath.includes(e)&&(o.cycle=n.path),o.schema;const a={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,a);const l=e._zod.toJSONSchema?.();if(l)a.schema=l;else{const m={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,m);else{const v=a.schema,y=t.processors[i.type];if(!y)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);y(e,t,v,m)}const h=e._zod.parent;h&&(a.ref||(a.ref=h),pn(h,t,m),t.seen.get(h).isParent=!0)}const d=t.metadataRegistry.get(e);return d&&Object.assign(a.schema,d),t.io==="input"&&Zr(e)&&(delete a.schema.examples,delete a.schema.default),t.io==="input"&&a.schema._prefault&&((r=a.schema).default??(r.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function lf(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=new Map;for(const a of e.seen.entries()){const l=e.metadataRegistry.get(a[0])?.id;if(l){const d=r.get(l);if(d&&d!==a[0])throw new Error(`Duplicate schema id "${l}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(l,a[0])}}const i=a=>{const l=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const h=e.external.registry.get(a[0])?.id,v=e.external.uri??(x=>x);if(h)return{ref:v(h)};const y=a[1].defId??a[1].schema.id??`schema${e.counter++}`;return a[1].defId=y,{defId:y,ref:`${v("__shared")}#/${l}/${y}`}}if(a[1]===n)return{ref:"#"};const f=`#/${l}/`,m=a[1].schema.id??`__schema${e.counter++}`;return{defId:m,ref:f+m}},o=a=>{if(a[1].schema.$ref)return;const l=a[1],{ref:d,defId:f}=i(a);l.def={...l.schema},f&&(l.defId=f);const m=l.schema;for(const h in m)delete m[h];m.$ref=d};if(e.cycles==="throw")for(const a of e.seen.entries()){const l=a[1];if(l.cycle)throw new Error(`Cycle detected: #/${l.cycle?.join("/")}/<root>
84
+
85
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const a of e.seen.entries()){const l=a[1];if(t===a[0]){o(a);continue}if(e.external){const f=e.external.registry.get(a[0])?.id;if(t!==a[0]&&f){o(a);continue}}if(e.metadataRegistry.get(a[0])?.id){o(a);continue}if(l.cycle){o(a);continue}if(l.count>1&&e.reused==="ref"){o(a);continue}}}function cf(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=a=>{const l=e.seen.get(a);if(l.ref===null)return;const d=l.def??l.schema,f={...d},m=l.ref;if(l.ref=null,m){r(m);const v=e.seen.get(m),y=v.schema;if(y.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(d.allOf=d.allOf??[],d.allOf.push(y)):Object.assign(d,y),Object.assign(d,f),a._zod.parent===m)for(const S in d)S==="$ref"||S==="allOf"||S in f||delete d[S];if(y.$ref&&v.def)for(const S in d)S==="$ref"||S==="allOf"||S in v.def&&JSON.stringify(d[S])===JSON.stringify(v.def[S])&&delete d[S]}const h=a._zod.parent;if(h&&h!==m){r(h);const v=e.seen.get(h);if(v?.schema.$ref&&(d.$ref=v.schema.$ref,v.def))for(const y in d)y==="$ref"||y==="allOf"||y in v.def&&JSON.stringify(d[y])===JSON.stringify(v.def[y])&&delete d[y]}e.override({zodSchema:a,jsonSchema:d,path:l.path??[]})};for(const a of[...e.seen.entries()].reverse())r(a[0]);const i={};if(e.target==="draft-2020-12"?i.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?i.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?i.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const a=e.external.registry.get(t)?.id;if(!a)throw new Error("Schema is missing an `id` property");i.$id=e.external.uri(a)}Object.assign(i,n.def??n.schema);const o=e.external?.defs??{};for(const a of e.seen.entries()){const l=a[1];l.def&&l.defId&&(o[l.defId]=l.def)}e.external||Object.keys(o).length>0&&(e.target==="draft-2020-12"?i.$defs=o:i.definitions=o);try{const a=JSON.parse(JSON.stringify(i));return Object.defineProperty(a,"~standard",{value:{...t["~standard"],jsonSchema:{input:Pm(t,"input",e.processors),output:Pm(t,"output",e.processors)}},enumerable:!1,writable:!1}),a}catch{throw new Error("Error converting schema to JSON.")}}function Zr(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return Zr(r.element,n);if(r.type==="set")return Zr(r.valueType,n);if(r.type==="lazy")return Zr(r.getter(),n);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault")return Zr(r.innerType,n);if(r.type==="intersection")return Zr(r.left,n)||Zr(r.right,n);if(r.type==="record"||r.type==="map")return Zr(r.keyType,n)||Zr(r.valueType,n);if(r.type==="pipe")return Zr(r.in,n)||Zr(r.out,n);if(r.type==="object"){for(const i in r.shape)if(Zr(r.shape[i],n))return!0;return!1}if(r.type==="union"){for(const i of r.options)if(Zr(i,n))return!0;return!1}if(r.type==="tuple"){for(const i of r.items)if(Zr(i,n))return!0;return!!(r.rest&&Zr(r.rest,n))}return!1}const aB=(e,t={})=>n=>{const r=sf({...n,processors:t});return pn(e,r),lf(r,e),cf(r,e)},Pm=(e,t,n={})=>r=>{const{libraryOptions:i,target:o}=r??{},a=sf({...i??{},target:o,io:t,processors:n});return pn(e,a),lf(a,e),cf(a,e)},Jye={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},sB=(e,t,n,r)=>{const i=n;i.type="string";const{minimum:o,maximum:a,format:l,patterns:d,contentEncoding:f}=e._zod.bag;if(typeof o=="number"&&(i.minLength=o),typeof a=="number"&&(i.maxLength=a),l&&(i.format=Jye[l]??l,i.format===""&&delete i.format,l==="time"&&delete i.format),f&&(i.contentEncoding=f),d&&d.size>0){const m=[...d];m.length===1?i.pattern=m[0].source:m.length>1&&(i.allOf=[...m.map(h=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:h.source}))])}},lB=(e,t,n,r)=>{const i=n,{minimum:o,maximum:a,format:l,multipleOf:d,exclusiveMaximum:f,exclusiveMinimum:m}=e._zod.bag;typeof l=="string"&&l.includes("int")?i.type="integer":i.type="number",typeof m=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(i.minimum=m,i.exclusiveMinimum=!0):i.exclusiveMinimum=m),typeof o=="number"&&(i.minimum=o,typeof m=="number"&&t.target!=="draft-04"&&(m>=o?delete i.minimum:delete i.exclusiveMinimum)),typeof f=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(i.maximum=f,i.exclusiveMaximum=!0):i.exclusiveMaximum=f),typeof a=="number"&&(i.maximum=a,typeof f=="number"&&t.target!=="draft-04"&&(f<=a?delete i.maximum:delete i.exclusiveMaximum)),typeof d=="number"&&(i.multipleOf=d)},cB=(e,t,n,r)=>{n.type="boolean"},uB=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},dB=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},fB=(e,t,n,r)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},pB=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},mB=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},hB=(e,t,n,r)=>{n.not={}},gB=(e,t,n,r)=>{},vB=(e,t,n,r)=>{},yB=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},bB=(e,t,n,r)=>{const i=e._zod.def,o=xj(i.entries);o.every(a=>typeof a=="number")&&(n.type="number"),o.every(a=>typeof a=="string")&&(n.type="string"),n.enum=o},xB=(e,t,n,r)=>{const i=e._zod.def,o=[];for(const a of i.values)if(a===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof a=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");o.push(Number(a))}else o.push(a);if(o.length!==0)if(o.length===1){const a=o[0];n.type=a===null?"null":typeof a,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[a]:n.const=a}else o.every(a=>typeof a=="number")&&(n.type="number"),o.every(a=>typeof a=="string")&&(n.type="string"),o.every(a=>typeof a=="boolean")&&(n.type="boolean"),o.every(a=>a===null)&&(n.type="null"),n.enum=o},wB=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},SB=(e,t,n,r)=>{const i=n,o=e._zod.pattern;if(!o)throw new Error("Pattern not found in template literal");i.type="string",i.pattern=o.source},_B=(e,t,n,r)=>{const i=n,o={type:"string",format:"binary",contentEncoding:"binary"},{minimum:a,maximum:l,mime:d}=e._zod.bag;a!==void 0&&(o.minLength=a),l!==void 0&&(o.maxLength=l),d?d.length===1?(o.contentMediaType=d[0],Object.assign(i,o)):(Object.assign(i,o),i.anyOf=d.map(f=>({contentMediaType:f}))):Object.assign(i,o)},CB=(e,t,n,r)=>{n.type="boolean"},kB=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},EB=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},jB=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},RB=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},IB=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},TB=(e,t,n,r)=>{const i=n,o=e._zod.def,{minimum:a,maximum:l}=e._zod.bag;typeof a=="number"&&(i.minItems=a),typeof l=="number"&&(i.maxItems=l),i.type="array",i.items=pn(o.element,t,{...r,path:[...r.path,"items"]})},NB=(e,t,n,r)=>{const i=n,o=e._zod.def;i.type="object",i.properties={};const a=o.shape;for(const f in a)i.properties[f]=pn(a[f],t,{...r,path:[...r.path,"properties",f]});const l=new Set(Object.keys(a)),d=new Set([...l].filter(f=>{const m=o.shape[f]._zod;return t.io==="input"?m.optin===void 0:m.optout===void 0}));d.size>0&&(i.required=Array.from(d)),o.catchall?._zod.def.type==="never"?i.additionalProperties=!1:o.catchall?o.catchall&&(i.additionalProperties=pn(o.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(i.additionalProperties=!1)},gR=(e,t,n,r)=>{const i=e._zod.def,o=i.inclusive===!1,a=i.options.map((l,d)=>pn(l,t,{...r,path:[...r.path,o?"oneOf":"anyOf",d]}));o?n.oneOf=a:n.anyOf=a},AB=(e,t,n,r)=>{const i=e._zod.def,o=pn(i.left,t,{...r,path:[...r.path,"allOf",0]}),a=pn(i.right,t,{...r,path:[...r.path,"allOf",1]}),l=f=>"allOf"in f&&Object.keys(f).length===1,d=[...l(o)?o.allOf:[o],...l(a)?a.allOf:[a]];n.allOf=d},OB=(e,t,n,r)=>{const i=n,o=e._zod.def;i.type="array";const a=t.target==="draft-2020-12"?"prefixItems":"items",l=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",d=o.items.map((v,y)=>pn(v,t,{...r,path:[...r.path,a,y]})),f=o.rest?pn(o.rest,t,{...r,path:[...r.path,l,...t.target==="openapi-3.0"?[o.items.length]:[]]}):null;t.target==="draft-2020-12"?(i.prefixItems=d,f&&(i.items=f)):t.target==="openapi-3.0"?(i.items={anyOf:d},f&&i.items.anyOf.push(f),i.minItems=d.length,f||(i.maxItems=d.length)):(i.items=d,f&&(i.additionalItems=f));const{minimum:m,maximum:h}=e._zod.bag;typeof m=="number"&&(i.minItems=m),typeof h=="number"&&(i.maxItems=h)},DB=(e,t,n,r)=>{const i=n,o=e._zod.def;i.type="object";const a=o.keyType,d=a._zod.bag?.patterns;if(o.mode==="loose"&&d&&d.size>0){const m=pn(o.valueType,t,{...r,path:[...r.path,"patternProperties","*"]});i.patternProperties={};for(const h of d)i.patternProperties[h.source]=m}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(i.propertyNames=pn(o.keyType,t,{...r,path:[...r.path,"propertyNames"]})),i.additionalProperties=pn(o.valueType,t,{...r,path:[...r.path,"additionalProperties"]});const f=a._zod.values;if(f){const m=[...f].filter(h=>typeof h=="string"||typeof h=="number");m.length>0&&(i.required=m)}},$B=(e,t,n,r)=>{const i=e._zod.def,o=pn(i.innerType,t,r),a=t.seen.get(e);t.target==="openapi-3.0"?(a.ref=i.innerType,n.nullable=!0):n.anyOf=[o,{type:"null"}]},PB=(e,t,n,r)=>{const i=e._zod.def;pn(i.innerType,t,r);const o=t.seen.get(e);o.ref=i.innerType},MB=(e,t,n,r)=>{const i=e._zod.def;pn(i.innerType,t,r);const o=t.seen.get(e);o.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},zB=(e,t,n,r)=>{const i=e._zod.def;pn(i.innerType,t,r);const o=t.seen.get(e);o.ref=i.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},LB=(e,t,n,r)=>{const i=e._zod.def;pn(i.innerType,t,r);const o=t.seen.get(e);o.ref=i.innerType;let a;try{a=i.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=a},FB=(e,t,n,r)=>{const i=e._zod.def,o=t.io==="input"?i.in._zod.def.type==="transform"?i.out:i.in:i.out;pn(o,t,r);const a=t.seen.get(e);a.ref=o},UB=(e,t,n,r)=>{const i=e._zod.def;pn(i.innerType,t,r);const o=t.seen.get(e);o.ref=i.innerType,n.readOnly=!0},VB=(e,t,n,r)=>{const i=e._zod.def;pn(i.innerType,t,r);const o=t.seen.get(e);o.ref=i.innerType},vR=(e,t,n,r)=>{const i=e._zod.def;pn(i.innerType,t,r);const o=t.seen.get(e);o.ref=i.innerType},BB=(e,t,n,r)=>{const i=e._zod.innerType;pn(i,t,r);const o=t.seen.get(e);o.ref=i},JC={string:sB,number:lB,boolean:cB,bigint:uB,symbol:dB,null:fB,undefined:pB,void:mB,never:hB,any:gB,unknown:vB,date:yB,enum:bB,literal:xB,nan:wB,template_literal:SB,file:_B,success:CB,custom:kB,function:EB,transform:jB,map:RB,set:IB,array:TB,object:NB,union:gR,intersection:AB,tuple:OB,record:DB,nullable:$B,nonoptional:PB,default:MB,prefault:zB,catch:LB,pipe:FB,readonly:UB,promise:VB,optional:vR,lazy:BB};function HB(e,t){if("_idmap"in e){const r=e,i=sf({...t,processors:JC}),o={};for(const d of r._idmap.entries()){const[f,m]=d;pn(m,i)}const a={},l={registry:r,uri:t?.uri,defs:o};i.external=l;for(const d of r._idmap.entries()){const[f,m]=d;lf(i,m),a[f]=cf(i,m)}if(Object.keys(o).length>0){const d=i.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[d]:o}}return{schemas:a}}const n=sf({...t,processors:JC});return pn(e,n),lf(n,e),cf(n,e)}class Qye{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(t){this.ctx.counter=t}get seen(){return this.ctx.seen}constructor(t){let n=t?.target??"draft-2020-12";n==="draft-4"&&(n="draft-04"),n==="draft-7"&&(n="draft-07"),this.ctx=sf({processors:JC,target:n,...t?.metadata&&{metadata:t.metadata},...t?.unrepresentable&&{unrepresentable:t.unrepresentable},...t?.override&&{override:t.override},...t?.io&&{io:t.io}})}process(t,n={path:[],schemaPath:[]}){return pn(t,this.ctx,n)}emit(t,n){n&&(n.cycles&&(this.ctx.cycles=n.cycles),n.reused&&(this.ctx.reused=n.reused),n.external&&(this.ctx.external=n.external)),lf(this.ctx,t);const r=cf(this.ctx,t),{"~standard":i,...o}=r;return o}}const ebe=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),tbe=Object.freeze(Object.defineProperty({__proto__:null,$ZodAny:A5,$ZodArray:M5,$ZodAsyncError:Oc,$ZodBase64:x5,$ZodBase64URL:S5,$ZodBigInt:Fj,$ZodBigIntFormat:R5,$ZodBoolean:Lj,$ZodCIDRv4:y5,$ZodCIDRv6:b5,$ZodCUID:a5,$ZodCUID2:s5,$ZodCatch:iV,$ZodCheck:On,$ZodCheckBigIntFormat:P3,$ZodCheckEndsWith:Z3,$ZodCheckGreaterThan:Pj,$ZodCheckIncludes:K3,$ZodCheckLengthEquals:V3,$ZodCheckLessThan:$j,$ZodCheckLowerCase:H3,$ZodCheckMaxLength:F3,$ZodCheckMaxSize:M3,$ZodCheckMimeType:W3,$ZodCheckMinLength:U3,$ZodCheckMinSize:z3,$ZodCheckMultipleOf:D3,$ZodCheckNumberFormat:$3,$ZodCheckOverwrite:X3,$ZodCheckProperty:Y3,$ZodCheckRegex:B3,$ZodCheckSizeEquals:L3,$ZodCheckStartsWith:G3,$ZodCheckStringFormat:Eh,$ZodCheckUpperCase:q3,$ZodCodec:Bj,$ZodCustom:fV,$ZodCustomStringFormat:E5,$ZodDate:P5,$ZodDefault:eV,$ZodDiscriminatedUnion:B5,$ZodE164:_5,$ZodEmail:n5,$ZodEmoji:i5,$ZodEncodeError:Nx,$ZodEnum:Z5,$ZodError:Px,$ZodExactOptional:J5,$ZodFile:W5,$ZodFunction:cV,$ZodGUID:e5,$ZodIPv4:h5,$ZodIPv6:g5,$ZodISODate:f5,$ZodISODateTime:d5,$ZodISODuration:m5,$ZodISOTime:p5,$ZodIntersection:H5,$ZodJWT:k5,$ZodKSUID:u5,$ZodLazy:dV,$ZodLiteral:Y5,$ZodMAC:v5,$ZodMap:K5,$ZodNaN:oV,$ZodNanoID:o5,$ZodNever:D5,$ZodNonOptional:nV,$ZodNull:N5,$ZodNullable:Q5,$ZodNumber:zj,$ZodNumberFormat:j5,$ZodObject:F5,$ZodObjectJIT:U5,$ZodOptional:Vj,$ZodPipe:aV,$ZodPrefault:tV,$ZodPromise:uV,$ZodReadonly:sV,$ZodRealError:io,$ZodRecord:q5,$ZodRegistry:bV,$ZodSet:G5,$ZodString:jh,$ZodStringFormat:vn,$ZodSuccess:rV,$ZodSymbol:I5,$ZodTemplateLiteral:lV,$ZodTransform:X5,$ZodTuple:Uj,$ZodType:gt,$ZodULID:l5,$ZodURL:r5,$ZodUUID:t5,$ZodUndefined:T5,$ZodUnion:Mx,$ZodUnknown:O5,$ZodVoid:$5,$ZodXID:c5,$ZodXor:V5,$brand:I6,$constructor:ae,$input:yV,$output:vV,Doc:J3,JSONSchema:ebe,JSONSchemaGenerator:Qye,NEVER:R6,TimePrecision:_V,_any:HV,_array:XV,_base64:sR,_base64url:lR,_bigint:MV,_boolean:$V,_catch:Kye,_check:nB,_cidrv4:oR,_cidrv6:aR,_coercedBigint:zV,_coercedBoolean:PV,_coercedDate:YV,_coercedNumber:IV,_coercedString:wV,_cuid:Jj,_cuid2:Qj,_custom:QV,_date:ZV,_decode:kj,_decodeAsync:jj,_default:Bye,_discriminatedUnion:Nye,_e164:cR,_email:qj,_emoji:Wj,_encode:Cj,_encodeAsync:Ej,_endsWith:Hx,_enum:Mye,_file:JV,_float32:NV,_float64:AV,_gt:jl,_gte:Si,_guid:ab,_includes:Vx,_int:TV,_int32:OV,_int64:LV,_intersection:Aye,_ipv4:rR,_ipv6:iR,_isoDate:kV,_isoDateTime:CV,_isoDuration:jV,_isoTime:EV,_jwt:uR,_ksuid:nR,_lazy:Wye,_length:Th,_literal:Lye,_lowercase:Fx,_lt:El,_lte:Oo,_mac:SV,_map:$ye,_max:Oo,_maxLength:Ih,_maxSize:Df,_mime:qx,_min:Si,_minLength:qc,_minSize:Rl,_multipleOf:af,_nan:WV,_nanoid:Xj,_nativeEnum:zye,_negative:fR,_never:KV,_nonnegative:mR,_nonoptional:Hye,_nonpositive:pR,_normalize:Kx,_null:BV,_nullable:Vye,_number:RV,_optional:Uye,_overwrite:ks,_parse:xh,_parseAsync:wh,_pipe:Gye,_positive:dR,_promise:Xye,_property:hR,_readonly:Zye,_record:Dye,_refine:eB,_regex:Lx,_safeDecode:Ij,_safeDecodeAsync:Nj,_safeEncode:Rj,_safeEncodeAsync:Tj,_safeParse:Sh,_safeParseAsync:_h,_set:Pye,_size:Rh,_slugify:Wx,_startsWith:Bx,_string:xV,_stringFormat:Nh,_stringbool:oB,_success:qye,_superRefine:tB,_symbol:UV,_templateLiteral:Yye,_toLowerCase:Zx,_toUpperCase:Yx,_transform:Fye,_trim:Gx,_tuple:Oye,_uint32:DV,_uint64:FV,_ulid:eR,_undefined:VV,_union:Iye,_unknown:qV,_uppercase:Ux,_url:zx,_uuid:Kj,_uuidv4:Gj,_uuidv6:Zj,_uuidv7:Yj,_void:GV,_xid:tR,_xor:Tye,clone:Uo,config:Fr,createStandardJSONSchemaMethod:Pm,createToJSONSchemaMethod:aB,decode:pge,decodeAsync:hge,describe:rB,encode:fge,encodeAsync:mge,extractDefs:lf,finalize:cf,flattenError:Sj,formatError:_j,globalConfig:eb,globalRegistry:To,initializeContext:sf,isValidBase64:Mj,isValidBase64URL:w5,isValidJWT:C5,locales:gV,meta:iB,parse:rb,parseAsync:ib,prettifyError:W6,process:pn,regexes:Dj,registry:Hj,safeDecode:vge,safeDecodeAsync:bge,safeEncode:gge,safeEncodeAsync:yge,safeParse:X6,safeParseAsync:J6,toDotPath:Y6,toJSONSchema:HB,treeifyError:Z6,util:K6,version:Q3},Symbol.toStringTag,{value:"Module"})),nbe=Object.freeze(Object.defineProperty({__proto__:null,endsWith:Hx,gt:jl,gte:Si,includes:Vx,length:Th,lowercase:Fx,lt:El,lte:Oo,maxLength:Ih,maxSize:Df,mime:qx,minLength:qc,minSize:Rl,multipleOf:af,negative:fR,nonnegative:mR,nonpositive:pR,normalize:Kx,overwrite:ks,positive:dR,property:hR,regex:Lx,size:Rh,slugify:Wx,startsWith:Bx,toLowerCase:Zx,toUpperCase:Yx,trim:Gx,uppercase:Ux},Symbol.toStringTag,{value:"Module"})),yR=ae("ZodISODateTime",(e,t)=>{d5.init(e,t),yn.init(e,t)});function qB(e){return CV(yR,e)}const bR=ae("ZodISODate",(e,t)=>{f5.init(e,t),yn.init(e,t)});function KB(e){return kV(bR,e)}const xR=ae("ZodISOTime",(e,t)=>{p5.init(e,t),yn.init(e,t)});function GB(e){return EV(xR,e)}const wR=ae("ZodISODuration",(e,t)=>{m5.init(e,t),yn.init(e,t)});function ZB(e){return jV(wR,e)}const YB=Object.freeze(Object.defineProperty({__proto__:null,ZodISODate:bR,ZodISODateTime:yR,ZodISODuration:wR,ZodISOTime:xR,date:KB,datetime:qB,duration:ZB,time:GB},Symbol.toStringTag,{value:"Module"})),WB=(e,t)=>{Px.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>_j(e,n)},flatten:{value:n=>Sj(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,tb,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,tb,2)}},isEmpty:{get(){return e.issues.length===0}}})},rbe=ae("ZodError",WB),oo=ae("ZodError",WB,{Parent:Error}),XB=xh(oo),JB=wh(oo),QB=Sh(oo),eH=_h(oo),tH=Cj(oo),nH=kj(oo),rH=Ej(oo),iH=jj(oo),oH=Rj(oo),aH=Ij(oo),sH=Tj(oo),lH=Nj(oo),bt=ae("ZodType",(e,t)=>(gt.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Pm(e,"input"),output:Pm(e,"output")}}),e.toJSONSchema=aB(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(Oa(t,{checks:[...t.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0}),e.with=e.check,e.clone=(n,r)=>Uo(e,n,r),e.brand=()=>e,e.register=((n,r)=>(n.add(e,r),e)),e.parse=(n,r)=>XB(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>QB(e,n,r),e.parseAsync=async(n,r)=>JB(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>eH(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>tH(e,n,r),e.decode=(n,r)=>nH(e,n,r),e.encodeAsync=async(n,r)=>rH(e,n,r),e.decodeAsync=async(n,r)=>iH(e,n,r),e.safeEncode=(n,r)=>oH(e,n,r),e.safeDecode=(n,r)=>aH(e,n,r),e.safeEncodeAsync=async(n,r)=>sH(e,n,r),e.safeDecodeAsync=async(n,r)=>lH(e,n,r),e.refine=(n,r)=>e.check(dI(n,r)),e.superRefine=n=>e.check(fI(n)),e.overwrite=n=>e.check(ks(n)),e.optional=()=>zm(e),e.exactOptional=()=>GR(e),e.nullable=()=>Lm(e),e.nullish=()=>zm(Lm(e)),e.nonoptional=n=>QR(e,n),e.array=()=>ws(e),e.or=n=>Pf([e,n]),e.and=n=>zR(e,n),e.transform=n=>Fm(e,b0(n)),e.default=n=>WR(e,n),e.prefault=n=>JR(e,n),e.catch=n=>nI(e,n),e.pipe=n=>Fm(e,n),e.readonly=()=>oI(e),e.describe=n=>{const r=e.clone();return To.add(r,{description:n}),r},Object.defineProperty(e,"description",{get(){return To.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return To.get(e);const r=e.clone();return To.add(r,n[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),Xx=ae("_ZodString",(e,t)=>{jh.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(r,i,o)=>sB(e,r,i);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...r)=>e.check(Lx(...r)),e.includes=(...r)=>e.check(Vx(...r)),e.startsWith=(...r)=>e.check(Bx(...r)),e.endsWith=(...r)=>e.check(Hx(...r)),e.min=(...r)=>e.check(qc(...r)),e.max=(...r)=>e.check(Ih(...r)),e.length=(...r)=>e.check(Th(...r)),e.nonempty=(...r)=>e.check(qc(1,...r)),e.lowercase=r=>e.check(Fx(r)),e.uppercase=r=>e.check(Ux(r)),e.trim=()=>e.check(Gx()),e.normalize=(...r)=>e.check(Kx(...r)),e.toLowerCase=()=>e.check(Zx()),e.toUpperCase=()=>e.check(Yx()),e.slugify=()=>e.check(Wx())}),Ah=ae("ZodString",(e,t)=>{jh.init(e,t),Xx.init(e,t),e.email=n=>e.check(qj(Jx,n)),e.url=n=>e.check(zx(Oh,n)),e.jwt=n=>e.check(uR(p0,n)),e.emoji=n=>e.check(Wj(Qx,n)),e.guid=n=>e.check(ab(Mm,n)),e.uuid=n=>e.check(Kj(wa,n)),e.uuidv4=n=>e.check(Gj(wa,n)),e.uuidv6=n=>e.check(Zj(wa,n)),e.uuidv7=n=>e.check(Yj(wa,n)),e.nanoid=n=>e.check(Xj(e0,n)),e.guid=n=>e.check(ab(Mm,n)),e.cuid=n=>e.check(Jj(t0,n)),e.cuid2=n=>e.check(Qj(n0,n)),e.ulid=n=>e.check(eR(r0,n)),e.base64=n=>e.check(sR(u0,n)),e.base64url=n=>e.check(lR(d0,n)),e.xid=n=>e.check(tR(i0,n)),e.ksuid=n=>e.check(nR(o0,n)),e.ipv4=n=>e.check(rR(a0,n)),e.ipv6=n=>e.check(iR(s0,n)),e.cidrv4=n=>e.check(oR(l0,n)),e.cidrv6=n=>e.check(aR(c0,n)),e.e164=n=>e.check(cR(f0,n)),e.datetime=n=>e.check(qB(n)),e.date=n=>e.check(KB(n)),e.time=n=>e.check(GB(n)),e.duration=n=>e.check(ZB(n))});function Xe(e){return xV(Ah,e)}const yn=ae("ZodStringFormat",(e,t)=>{vn.init(e,t),Xx.init(e,t)}),Jx=ae("ZodEmail",(e,t)=>{n5.init(e,t),yn.init(e,t)});function SR(e){return qj(Jx,e)}const Mm=ae("ZodGUID",(e,t)=>{e5.init(e,t),yn.init(e,t)});function cH(e){return ab(Mm,e)}const wa=ae("ZodUUID",(e,t)=>{t5.init(e,t),yn.init(e,t)});function uH(e){return Kj(wa,e)}function dH(e){return Gj(wa,e)}function fH(e){return Zj(wa,e)}function pH(e){return Yj(wa,e)}const Oh=ae("ZodURL",(e,t)=>{r5.init(e,t),yn.init(e,t)});function mH(e){return zx(Oh,e)}function hH(e){return zx(Oh,{protocol:/^https?$/,hostname:v3,..._e(e)})}const Qx=ae("ZodEmoji",(e,t)=>{i5.init(e,t),yn.init(e,t)});function gH(e){return Wj(Qx,e)}const e0=ae("ZodNanoID",(e,t)=>{o5.init(e,t),yn.init(e,t)});function vH(e){return Xj(e0,e)}const t0=ae("ZodCUID",(e,t)=>{a5.init(e,t),yn.init(e,t)});function yH(e){return Jj(t0,e)}const n0=ae("ZodCUID2",(e,t)=>{s5.init(e,t),yn.init(e,t)});function bH(e){return Qj(n0,e)}const r0=ae("ZodULID",(e,t)=>{l5.init(e,t),yn.init(e,t)});function xH(e){return eR(r0,e)}const i0=ae("ZodXID",(e,t)=>{c5.init(e,t),yn.init(e,t)});function wH(e){return tR(i0,e)}const o0=ae("ZodKSUID",(e,t)=>{u5.init(e,t),yn.init(e,t)});function SH(e){return nR(o0,e)}const a0=ae("ZodIPv4",(e,t)=>{h5.init(e,t),yn.init(e,t)});function _H(e){return rR(a0,e)}const _R=ae("ZodMAC",(e,t)=>{v5.init(e,t),yn.init(e,t)});function CH(e){return SV(_R,e)}const s0=ae("ZodIPv6",(e,t)=>{g5.init(e,t),yn.init(e,t)});function kH(e){return iR(s0,e)}const l0=ae("ZodCIDRv4",(e,t)=>{y5.init(e,t),yn.init(e,t)});function EH(e){return oR(l0,e)}const c0=ae("ZodCIDRv6",(e,t)=>{b5.init(e,t),yn.init(e,t)});function jH(e){return aR(c0,e)}const u0=ae("ZodBase64",(e,t)=>{x5.init(e,t),yn.init(e,t)});function RH(e){return sR(u0,e)}const d0=ae("ZodBase64URL",(e,t)=>{S5.init(e,t),yn.init(e,t)});function IH(e){return lR(d0,e)}const f0=ae("ZodE164",(e,t)=>{_5.init(e,t),yn.init(e,t)});function TH(e){return cR(f0,e)}const p0=ae("ZodJWT",(e,t)=>{k5.init(e,t),yn.init(e,t)});function NH(e){return uR(p0,e)}const $f=ae("ZodCustomStringFormat",(e,t)=>{E5.init(e,t),yn.init(e,t)});function AH(e,t,n={}){return Nh($f,e,t,n)}function OH(e){return Nh($f,"hostname",g3,e)}function DH(e){return Nh($f,"hex",A3,e)}function $H(e,t){const n=t?.enc??"hex",r=`${e}_${n}`,i=Dj[r];if(!i)throw new Error(`Unrecognized hash format: ${r}`);return Nh($f,r,i,t)}const Dh=ae("ZodNumber",(e,t)=>{zj.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(r,i,o)=>lB(e,r,i),e.gt=(r,i)=>e.check(jl(r,i)),e.gte=(r,i)=>e.check(Si(r,i)),e.min=(r,i)=>e.check(Si(r,i)),e.lt=(r,i)=>e.check(El(r,i)),e.lte=(r,i)=>e.check(Oo(r,i)),e.max=(r,i)=>e.check(Oo(r,i)),e.int=r=>e.check(sb(r)),e.safe=r=>e.check(sb(r)),e.positive=r=>e.check(jl(0,r)),e.nonnegative=r=>e.check(Si(0,r)),e.negative=r=>e.check(El(0,r)),e.nonpositive=r=>e.check(Oo(0,r)),e.multipleOf=(r,i)=>e.check(af(r,i)),e.step=(r,i)=>e.check(af(r,i)),e.finite=()=>e;const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function m0(e){return RV(Dh,e)}const fu=ae("ZodNumberFormat",(e,t)=>{j5.init(e,t),Dh.init(e,t)});function sb(e){return TV(fu,e)}function PH(e){return NV(fu,e)}function MH(e){return AV(fu,e)}function CR(e){return OV(fu,e)}function zH(e){return DV(fu,e)}const $h=ae("ZodBoolean",(e,t)=>{Lj.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>cB(e,n,r)});function Xt(e){return $V($h,e)}const Ph=ae("ZodBigInt",(e,t)=>{Fj.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(r,i,o)=>uB(e,r),e.gte=(r,i)=>e.check(Si(r,i)),e.min=(r,i)=>e.check(Si(r,i)),e.gt=(r,i)=>e.check(jl(r,i)),e.gte=(r,i)=>e.check(Si(r,i)),e.min=(r,i)=>e.check(Si(r,i)),e.lt=(r,i)=>e.check(El(r,i)),e.lte=(r,i)=>e.check(Oo(r,i)),e.max=(r,i)=>e.check(Oo(r,i)),e.positive=r=>e.check(jl(BigInt(0),r)),e.negative=r=>e.check(El(BigInt(0),r)),e.nonpositive=r=>e.check(Oo(BigInt(0),r)),e.nonnegative=r=>e.check(Si(BigInt(0),r)),e.multipleOf=(r,i)=>e.check(af(r,i));const n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});function LH(e){return MV(Ph,e)}const h0=ae("ZodBigIntFormat",(e,t)=>{R5.init(e,t),Ph.init(e,t)});function FH(e){return LV(h0,e)}function UH(e){return FV(h0,e)}const kR=ae("ZodSymbol",(e,t)=>{I5.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>dB(e,n)});function VH(e){return UV(kR,e)}const ER=ae("ZodUndefined",(e,t)=>{T5.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>pB(e,n)});function Kc(e){return VV(ER,e)}const jR=ae("ZodNull",(e,t)=>{N5.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>fB(e,n,r)});function RR(e){return BV(jR,e)}const IR=ae("ZodAny",(e,t)=>{A5.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>gB()});function BH(){return HV(IR)}const TR=ae("ZodUnknown",(e,t)=>{O5.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>vB()});function Gc(){return qV(TR)}const NR=ae("ZodNever",(e,t)=>{D5.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>hB(e,n,r)});function g0(e){return KV(NR,e)}const AR=ae("ZodVoid",(e,t)=>{$5.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>mB(e,n)});function HH(e){return GV(AR,e)}const v0=ae("ZodDate",(e,t)=>{P5.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(r,i,o)=>yB(e,r),e.min=(r,i)=>e.check(Si(r,i)),e.max=(r,i)=>e.check(Oo(r,i));const n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function qH(e){return ZV(v0,e)}const OR=ae("ZodArray",(e,t)=>{M5.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>TB(e,n,r,i),e.element=t.element,e.min=(n,r)=>e.check(qc(n,r)),e.nonempty=n=>e.check(qc(1,n)),e.max=(n,r)=>e.check(Ih(n,r)),e.length=(n,r)=>e.check(Th(n,r)),e.unwrap=()=>e.element});function ws(e,t){return XV(OR,e,t)}function KH(e){const t=e._zod.def.shape;return Ul(Object.keys(t))}const Mh=ae("ZodObject",(e,t)=>{U5.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>NB(e,n,r,i),_t(e,"shape",()=>t.shape),e.keyof=()=>Ul(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Gc()}),e.loose=()=>e.clone({...e._zod.def,catchall:Gc()}),e.strict=()=>e.clone({...e._zod.def,catchall:g0()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>L6(e,n),e.safeExtend=n=>F6(e,n),e.merge=n=>U6(e,n),e.pick=n=>M6(e,n),e.omit=n=>z6(e,n),e.partial=(...n)=>V6(x0,e,n[0]),e.required=(...n)=>B6(w0,e,n[0])});function Mt(e,t){const n={type:"object",shape:e??{},..._e(t)};return new Mh(n)}function GH(e,t){return new Mh({type:"object",shape:e,catchall:g0(),..._e(t)})}function ZH(e,t){return new Mh({type:"object",shape:e,catchall:Gc(),..._e(t)})}const zh=ae("ZodUnion",(e,t)=>{Mx.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>gR(e,n,r,i),e.options=t.options});function Pf(e,t){return new zh({type:"union",options:e,..._e(t)})}const DR=ae("ZodXor",(e,t)=>{zh.init(e,t),V5.init(e,t),e._zod.processJSONSchema=(n,r,i)=>gR(e,n,r,i),e.options=t.options});function YH(e,t){return new DR({type:"union",options:e,inclusive:!1,..._e(t)})}const $R=ae("ZodDiscriminatedUnion",(e,t)=>{zh.init(e,t),B5.init(e,t)});function PR(e,t,n){return new $R({type:"union",options:t,discriminator:e,..._e(n)})}const MR=ae("ZodIntersection",(e,t)=>{H5.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>AB(e,n,r,i)});function zR(e,t){return new MR({type:"intersection",left:e,right:t})}const LR=ae("ZodTuple",(e,t)=>{Uj.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>OB(e,n,r,i),e.rest=n=>e.clone({...e._zod.def,rest:n})});function FR(e,t,n){const r=t instanceof gt,i=r?n:t,o=r?t:null;return new LR({type:"tuple",items:e,rest:o,..._e(i)})}const Lh=ae("ZodRecord",(e,t)=>{q5.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>DB(e,n,r,i),e.keyType=t.keyType,e.valueType=t.valueType});function y0(e,t,n){return new Lh({type:"record",keyType:e,valueType:t,..._e(n)})}function WH(e,t,n){const r=Uo(e);return r._zod.values=void 0,new Lh({type:"record",keyType:r,valueType:t,..._e(n)})}function XH(e,t,n){return new Lh({type:"record",keyType:e,valueType:t,mode:"loose",..._e(n)})}const UR=ae("ZodMap",(e,t)=>{K5.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>RB(e,n),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...n)=>e.check(Rl(...n)),e.nonempty=n=>e.check(Rl(1,n)),e.max=(...n)=>e.check(Df(...n)),e.size=(...n)=>e.check(Rh(...n))});function JH(e,t,n){return new UR({type:"map",keyType:e,valueType:t,..._e(n)})}const VR=ae("ZodSet",(e,t)=>{G5.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>IB(e,n),e.min=(...n)=>e.check(Rl(...n)),e.nonempty=n=>e.check(Rl(1,n)),e.max=(...n)=>e.check(Df(...n)),e.size=(...n)=>e.check(Rh(...n))});function QH(e,t){return new VR({type:"set",valueType:e,..._e(t)})}const uf=ae("ZodEnum",(e,t)=>{Z5.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(r,i,o)=>bB(e,r,i),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(r,i)=>{const o={};for(const a of r)if(n.has(a))o[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new uf({...t,checks:[],..._e(i),entries:o})},e.exclude=(r,i)=>{const o={...t.entries};for(const a of r)if(n.has(a))delete o[a];else throw new Error(`Key ${a} not found in enum`);return new uf({...t,checks:[],..._e(i),entries:o})}});function Ul(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new uf({type:"enum",entries:n,..._e(t)})}function e8(e,t){return new uf({type:"enum",entries:e,..._e(t)})}const BR=ae("ZodLiteral",(e,t)=>{Y5.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>xB(e,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Vl(e,t){return new BR({type:"literal",values:Array.isArray(e)?e:[e],..._e(t)})}const HR=ae("ZodFile",(e,t)=>{W5.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>_B(e,n,r),e.min=(n,r)=>e.check(Rl(n,r)),e.max=(n,r)=>e.check(Df(n,r)),e.mime=(n,r)=>e.check(qx(Array.isArray(n)?n:[n],r))});function t8(e){return JV(HR,e)}const qR=ae("ZodTransform",(e,t)=>{X5.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>jB(e,n),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new Nx(e.constructor.name);n.addIssue=o=>{if(typeof o=="string")n.issues.push(rf(o,n.value,t));else{const a=o;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=n.value),a.inst??(a.inst=e),n.issues.push(rf(a))}};const i=t.transform(n.value,n);return i instanceof Promise?i.then(o=>(n.value=o,n)):(n.value=i,n)}});function b0(e){return new qR({type:"transform",transform:e})}const x0=ae("ZodOptional",(e,t)=>{Vj.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>vR(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function zm(e){return new x0({type:"optional",innerType:e})}const KR=ae("ZodExactOptional",(e,t)=>{J5.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>vR(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function GR(e){return new KR({type:"optional",innerType:e})}const ZR=ae("ZodNullable",(e,t)=>{Q5.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>$B(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function Lm(e){return new ZR({type:"nullable",innerType:e})}function n8(e){return zm(Lm(e))}const YR=ae("ZodDefault",(e,t)=>{eV.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>MB(e,n,r,i),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function WR(e,t){return new YR({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Ox(t)}})}const XR=ae("ZodPrefault",(e,t)=>{tV.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>zB(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function JR(e,t){return new XR({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Ox(t)}})}const w0=ae("ZodNonOptional",(e,t)=>{nV.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>PB(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function QR(e,t){return new w0({type:"nonoptional",innerType:e,..._e(t)})}const eI=ae("ZodSuccess",(e,t)=>{rV.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>CB(e,n,r),e.unwrap=()=>e._zod.def.innerType});function r8(e){return new eI({type:"success",innerType:e})}const tI=ae("ZodCatch",(e,t)=>{iV.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>LB(e,n,r,i),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function nI(e,t){return new tI({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const rI=ae("ZodNaN",(e,t)=>{oV.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>wB(e,n)});function i8(e){return WV(rI,e)}const S0=ae("ZodPipe",(e,t)=>{aV.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>FB(e,n,r,i),e.in=t.in,e.out=t.out});function Fm(e,t){return new S0({type:"pipe",in:e,out:t})}const _0=ae("ZodCodec",(e,t)=>{S0.init(e,t),Bj.init(e,t)});function o8(e,t,n){return new _0({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}const iI=ae("ZodReadonly",(e,t)=>{sV.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>UB(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function oI(e){return new iI({type:"readonly",innerType:e})}const aI=ae("ZodTemplateLiteral",(e,t)=>{lV.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>SB(e,n,r)});function a8(e,t){return new aI({type:"template_literal",parts:e,..._e(t)})}const sI=ae("ZodLazy",(e,t)=>{dV.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>BB(e,n,r,i),e.unwrap=()=>e._zod.def.getter()});function lI(e){return new sI({type:"lazy",getter:e})}const cI=ae("ZodPromise",(e,t)=>{uV.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>VB(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function s8(e){return new cI({type:"promise",innerType:e})}const uI=ae("ZodFunction",(e,t)=>{cV.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>EB(e,n)});function lb(e){return new uI({type:"function",input:Array.isArray(e?.input)?FR(e?.input):e?.input??ws(Gc()),output:e?.output??Gc()})}const Fh=ae("ZodCustom",(e,t)=>{fV.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>kB(e,n)});function l8(e){const t=new On({check:"custom"});return t._zod.check=e,t}function c8(e,t){return QV(Fh,e??(()=>!0),t)}function dI(e,t={}){return eB(Fh,e,t)}function fI(e){return tB(e)}const u8=rB,d8=iB;function f8(e,t={}){const n=new Fh({type:"custom",check:"custom",fn:r=>r instanceof e,abort:!0,..._e(t)});return n._zod.bag.Class=e,n._zod.check=r=>{r.value instanceof e||r.issues.push({code:"invalid_type",expected:e.name,input:r.value,inst:n,path:[...n._zod.def.path??[]]})},n}const p8=(...e)=>oB({Codec:_0,Boolean:$h,String:Ah},...e);function m8(e){const t=lI(()=>Pf([Xe(e),m0(),Xt(),RR(),ws(t),y0(Xe(),t)]));return t}function h8(e,t){return Fm(b0(e),t)}const ibe=Object.freeze(Object.defineProperty({__proto__:null,ZodAny:IR,ZodArray:OR,ZodBase64:u0,ZodBase64URL:d0,ZodBigInt:Ph,ZodBigIntFormat:h0,ZodBoolean:$h,ZodCIDRv4:l0,ZodCIDRv6:c0,ZodCUID:t0,ZodCUID2:n0,ZodCatch:tI,ZodCodec:_0,ZodCustom:Fh,ZodCustomStringFormat:$f,ZodDate:v0,ZodDefault:YR,ZodDiscriminatedUnion:$R,ZodE164:f0,ZodEmail:Jx,ZodEmoji:Qx,ZodEnum:uf,ZodExactOptional:KR,ZodFile:HR,ZodFunction:uI,ZodGUID:Mm,ZodIPv4:a0,ZodIPv6:s0,ZodIntersection:MR,ZodJWT:p0,ZodKSUID:o0,ZodLazy:sI,ZodLiteral:BR,ZodMAC:_R,ZodMap:UR,ZodNaN:rI,ZodNanoID:e0,ZodNever:NR,ZodNonOptional:w0,ZodNull:jR,ZodNullable:ZR,ZodNumber:Dh,ZodNumberFormat:fu,ZodObject:Mh,ZodOptional:x0,ZodPipe:S0,ZodPrefault:XR,ZodPromise:cI,ZodReadonly:iI,ZodRecord:Lh,ZodSet:VR,ZodString:Ah,ZodStringFormat:yn,ZodSuccess:eI,ZodSymbol:kR,ZodTemplateLiteral:aI,ZodTransform:qR,ZodTuple:LR,ZodType:bt,ZodULID:r0,ZodURL:Oh,ZodUUID:wa,ZodUndefined:ER,ZodUnion:zh,ZodUnknown:TR,ZodVoid:AR,ZodXID:i0,ZodXor:DR,_ZodString:Xx,_default:WR,_function:lb,any:BH,array:ws,base64:RH,base64url:IH,bigint:LH,boolean:Xt,catch:nI,check:l8,cidrv4:EH,cidrv6:jH,codec:o8,cuid:yH,cuid2:bH,custom:c8,date:qH,describe:u8,discriminatedUnion:PR,e164:TH,email:SR,emoji:gH,enum:Ul,exactOptional:GR,file:t8,float32:PH,float64:MH,function:lb,guid:cH,hash:$H,hex:DH,hostname:OH,httpUrl:hH,instanceof:f8,int:sb,int32:CR,int64:FH,intersection:zR,ipv4:_H,ipv6:kH,json:m8,jwt:NH,keyof:KH,ksuid:SH,lazy:lI,literal:Vl,looseObject:ZH,looseRecord:XH,mac:CH,map:JH,meta:d8,nan:i8,nanoid:vH,nativeEnum:e8,never:g0,nonoptional:QR,null:RR,nullable:Lm,nullish:n8,number:m0,object:Mt,optional:zm,partialRecord:WH,pipe:Fm,prefault:JR,preprocess:h8,promise:s8,readonly:oI,record:y0,refine:dI,set:QH,strictObject:GH,string:Xe,stringFormat:AH,stringbool:p8,success:r8,superRefine:fI,symbol:VH,templateLiteral:a8,transform:b0,tuple:FR,uint32:zH,uint64:UH,ulid:xH,undefined:Kc,union:Pf,unknown:Gc,url:mH,uuid:uH,uuidv4:dH,uuidv6:fH,uuidv7:pH,void:HH,xid:wH,xor:YH},Symbol.toStringTag,{value:"Module"})),obe={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function abe(e){Fr({customError:e})}function sbe(){return Fr().customError}var QC;QC||(QC={});const Le={...ibe,...nbe,iso:YB},lbe=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function cbe(e,t){const n=e.$schema;return n==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":n==="http://json-schema.org/draft-07/schema#"?"draft-7":n==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}function ube(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");const n=e.slice(1).split("/").filter(Boolean);if(n.length===0)return t.rootSchema;const r=t.version==="draft-2020-12"?"$defs":"definitions";if(n[0]===r){const i=n[1];if(!i||!t.defs[i])throw new Error(`Reference not found: ${e}`);return t.defs[i]}throw new Error(`Reference not found: ${e}`)}function g8(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return Le.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){const i=e.$ref;if(t.refs.has(i))return t.refs.get(i);if(t.processing.has(i))return Le.lazy(()=>{if(!t.refs.has(i))throw new Error(`Circular reference not resolved: ${i}`);return t.refs.get(i)});t.processing.add(i);const o=ube(i,t),a=$r(o,t);return t.refs.set(i,a),t.processing.delete(i),a}if(e.enum!==void 0){const i=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&i.length===1&&i[0]===null)return Le.null();if(i.length===0)return Le.never();if(i.length===1)return Le.literal(i[0]);if(i.every(a=>typeof a=="string"))return Le.enum(i);const o=i.map(a=>Le.literal(a));return o.length<2?o[0]:Le.union([o[0],o[1],...o.slice(2)])}if(e.const!==void 0)return Le.literal(e.const);const n=e.type;if(Array.isArray(n)){const i=n.map(o=>{const a={...e,type:o};return g8(a,t)});return i.length===0?Le.never():i.length===1?i[0]:Le.union(i)}if(!n)return Le.any();let r;switch(n){case"string":{let i=Le.string();if(e.format){const o=e.format;o==="email"?i=i.check(Le.email()):o==="uri"||o==="uri-reference"?i=i.check(Le.url()):o==="uuid"||o==="guid"?i=i.check(Le.uuid()):o==="date-time"?i=i.check(Le.iso.datetime()):o==="date"?i=i.check(Le.iso.date()):o==="time"?i=i.check(Le.iso.time()):o==="duration"?i=i.check(Le.iso.duration()):o==="ipv4"?i=i.check(Le.ipv4()):o==="ipv6"?i=i.check(Le.ipv6()):o==="mac"?i=i.check(Le.mac()):o==="cidr"?i=i.check(Le.cidrv4()):o==="cidr-v6"?i=i.check(Le.cidrv6()):o==="base64"?i=i.check(Le.base64()):o==="base64url"?i=i.check(Le.base64url()):o==="e164"?i=i.check(Le.e164()):o==="jwt"?i=i.check(Le.jwt()):o==="emoji"?i=i.check(Le.emoji()):o==="nanoid"?i=i.check(Le.nanoid()):o==="cuid"?i=i.check(Le.cuid()):o==="cuid2"?i=i.check(Le.cuid2()):o==="ulid"?i=i.check(Le.ulid()):o==="xid"?i=i.check(Le.xid()):o==="ksuid"&&(i=i.check(Le.ksuid()))}typeof e.minLength=="number"&&(i=i.min(e.minLength)),typeof e.maxLength=="number"&&(i=i.max(e.maxLength)),e.pattern&&(i=i.regex(new RegExp(e.pattern))),r=i;break}case"number":case"integer":{let i=n==="integer"?Le.number().int():Le.number();typeof e.minimum=="number"&&(i=i.min(e.minimum)),typeof e.maximum=="number"&&(i=i.max(e.maximum)),typeof e.exclusiveMinimum=="number"?i=i.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(i=i.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?i=i.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(i=i.lt(e.maximum)),typeof e.multipleOf=="number"&&(i=i.multipleOf(e.multipleOf)),r=i;break}case"boolean":{r=Le.boolean();break}case"null":{r=Le.null();break}case"object":{const i={},o=e.properties||{},a=new Set(e.required||[]);for(const[d,f]of Object.entries(o)){const m=$r(f,t);i[d]=a.has(d)?m:m.optional()}if(e.propertyNames){const d=$r(e.propertyNames,t),f=e.additionalProperties&&typeof e.additionalProperties=="object"?$r(e.additionalProperties,t):Le.any();if(Object.keys(i).length===0){r=Le.record(d,f);break}const m=Le.object(i).passthrough(),h=Le.looseRecord(d,f);r=Le.intersection(m,h);break}if(e.patternProperties){const d=e.patternProperties,f=Object.keys(d),m=[];for(const v of f){const y=$r(d[v],t),x=Le.string().regex(new RegExp(v));m.push(Le.looseRecord(x,y))}const h=[];if(Object.keys(i).length>0&&h.push(Le.object(i).passthrough()),h.push(...m),h.length===0)r=Le.object({}).passthrough();else if(h.length===1)r=h[0];else{let v=Le.intersection(h[0],h[1]);for(let y=2;y<h.length;y++)v=Le.intersection(v,h[y]);r=v}break}const l=Le.object(i);e.additionalProperties===!1?r=l.strict():typeof e.additionalProperties=="object"?r=l.catchall($r(e.additionalProperties,t)):r=l.passthrough();break}case"array":{const i=e.prefixItems,o=e.items;if(i&&Array.isArray(i)){const a=i.map(d=>$r(d,t)),l=o&&typeof o=="object"&&!Array.isArray(o)?$r(o,t):void 0;l?r=Le.tuple(a).rest(l):r=Le.tuple(a),typeof e.minItems=="number"&&(r=r.check(Le.minLength(e.minItems))),typeof e.maxItems=="number"&&(r=r.check(Le.maxLength(e.maxItems)))}else if(Array.isArray(o)){const a=o.map(d=>$r(d,t)),l=e.additionalItems&&typeof e.additionalItems=="object"?$r(e.additionalItems,t):void 0;l?r=Le.tuple(a).rest(l):r=Le.tuple(a),typeof e.minItems=="number"&&(r=r.check(Le.minLength(e.minItems))),typeof e.maxItems=="number"&&(r=r.check(Le.maxLength(e.maxItems)))}else if(o!==void 0){const a=$r(o,t);let l=Le.array(a);typeof e.minItems=="number"&&(l=l.min(e.minItems)),typeof e.maxItems=="number"&&(l=l.max(e.maxItems)),r=l}else r=Le.array(Le.any());break}default:throw new Error(`Unsupported type: ${n}`)}return e.description&&(r=r.describe(e.description)),e.default!==void 0&&(r=r.default(e.default)),r}function $r(e,t){if(typeof e=="boolean")return e?Le.any():Le.never();let n=g8(e,t);const r=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){const l=e.anyOf.map(f=>$r(f,t)),d=Le.union(l);n=r?Le.intersection(n,d):d}if(e.oneOf&&Array.isArray(e.oneOf)){const l=e.oneOf.map(f=>$r(f,t)),d=Le.xor(l);n=r?Le.intersection(n,d):d}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)n=r?n:Le.any();else{let l=r?n:$r(e.allOf[0],t);const d=r?0:1;for(let f=d;f<e.allOf.length;f++)l=Le.intersection(l,$r(e.allOf[f],t));n=l}e.nullable===!0&&t.version==="openapi-3.0"&&(n=Le.nullable(n)),e.readOnly===!0&&(n=Le.readonly(n));const i={},o=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(const l of o)l in e&&(i[l]=e[l]);const a=["contentEncoding","contentMediaType","contentSchema"];for(const l of a)l in e&&(i[l]=e[l]);for(const l of Object.keys(e))lbe.has(l)||(i[l]=e[l]);return Object.keys(i).length>0&&t.registry.add(n,i),n}function dbe(e,t){if(typeof e=="boolean")return e?Le.any():Le.never();const n=cbe(e,t?.defaultTarget),r=e.$defs||e.definitions||{},i={version:n,defs:r,refs:new Map,processing:new Set,rootSchema:e,registry:t?.registry??To};return $r(e,i)}function fbe(e){return wV(Ah,e)}function pbe(e){return IV(Dh,e)}function mbe(e){return PV($h,e)}function hbe(e){return zV(Ph,e)}function gbe(e){return YV(v0,e)}const vbe=Object.freeze(Object.defineProperty({__proto__:null,bigint:hbe,boolean:mbe,date:gbe,number:pbe,string:fbe},Symbol.toStringTag,{value:"Module"}));Fr(pV());const Wi=Object.freeze(Object.defineProperty({__proto__:null,$brand:I6,$input:yV,$output:vV,NEVER:R6,TimePrecision:_V,ZodAny:IR,ZodArray:OR,ZodBase64:u0,ZodBase64URL:d0,ZodBigInt:Ph,ZodBigIntFormat:h0,ZodBoolean:$h,ZodCIDRv4:l0,ZodCIDRv6:c0,ZodCUID:t0,ZodCUID2:n0,ZodCatch:tI,ZodCodec:_0,ZodCustom:Fh,ZodCustomStringFormat:$f,ZodDate:v0,ZodDefault:YR,ZodDiscriminatedUnion:$R,ZodE164:f0,ZodEmail:Jx,ZodEmoji:Qx,ZodEnum:uf,ZodError:rbe,ZodExactOptional:KR,ZodFile:HR,get ZodFirstPartyTypeKind(){return QC},ZodFunction:uI,ZodGUID:Mm,ZodIPv4:a0,ZodIPv6:s0,ZodISODate:bR,ZodISODateTime:yR,ZodISODuration:wR,ZodISOTime:xR,ZodIntersection:MR,ZodIssueCode:obe,ZodJWT:p0,ZodKSUID:o0,ZodLazy:sI,ZodLiteral:BR,ZodMAC:_R,ZodMap:UR,ZodNaN:rI,ZodNanoID:e0,ZodNever:NR,ZodNonOptional:w0,ZodNull:jR,ZodNullable:ZR,ZodNumber:Dh,ZodNumberFormat:fu,ZodObject:Mh,ZodOptional:x0,ZodPipe:S0,ZodPrefault:XR,ZodPromise:cI,ZodReadonly:iI,ZodRealError:oo,ZodRecord:Lh,ZodSet:VR,ZodString:Ah,ZodStringFormat:yn,ZodSuccess:eI,ZodSymbol:kR,ZodTemplateLiteral:aI,ZodTransform:qR,ZodTuple:LR,ZodType:bt,ZodULID:r0,ZodURL:Oh,ZodUUID:wa,ZodUndefined:ER,ZodUnion:zh,ZodUnknown:TR,ZodVoid:AR,ZodXID:i0,ZodXor:DR,_ZodString:Xx,_default:WR,_function:lb,any:BH,array:ws,base64:RH,base64url:IH,bigint:LH,boolean:Xt,catch:nI,check:l8,cidrv4:EH,cidrv6:jH,clone:Uo,codec:o8,coerce:vbe,config:Fr,core:tbe,cuid:yH,cuid2:bH,custom:c8,date:qH,decode:nH,decodeAsync:iH,describe:u8,discriminatedUnion:PR,e164:TH,email:SR,emoji:gH,encode:tH,encodeAsync:rH,endsWith:Hx,enum:Ul,exactOptional:GR,file:t8,flattenError:Sj,float32:PH,float64:MH,formatError:_j,fromJSONSchema:dbe,function:lb,getErrorMap:sbe,globalRegistry:To,gt:jl,gte:Si,guid:cH,hash:$H,hex:DH,hostname:OH,httpUrl:hH,includes:Vx,instanceof:f8,int:sb,int32:CR,int64:FH,intersection:zR,ipv4:_H,ipv6:kH,iso:YB,json:m8,jwt:NH,keyof:KH,ksuid:SH,lazy:lI,length:Th,literal:Vl,locales:gV,looseObject:ZH,looseRecord:XH,lowercase:Fx,lt:El,lte:Oo,mac:CH,map:JH,maxLength:Ih,maxSize:Df,meta:d8,mime:qx,minLength:qc,minSize:Rl,multipleOf:af,nan:i8,nanoid:vH,nativeEnum:e8,negative:fR,never:g0,nonnegative:mR,nonoptional:QR,nonpositive:pR,normalize:Kx,null:RR,nullable:Lm,nullish:n8,number:m0,object:Mt,optional:zm,overwrite:ks,parse:XB,parseAsync:JB,partialRecord:WH,pipe:Fm,positive:dR,prefault:JR,preprocess:h8,prettifyError:W6,promise:s8,property:hR,readonly:oI,record:y0,refine:dI,regex:Lx,regexes:Dj,registry:Hj,safeDecode:aH,safeDecodeAsync:lH,safeEncode:oH,safeEncodeAsync:sH,safeParse:QB,safeParseAsync:eH,set:QH,setErrorMap:abe,size:Rh,slugify:Wx,startsWith:Bx,strictObject:GH,string:Xe,stringFormat:AH,stringbool:p8,success:r8,superRefine:fI,symbol:VH,templateLiteral:a8,toJSONSchema:HB,toLowerCase:Zx,toUpperCase:Yx,transform:b0,treeifyError:Z6,trim:Gx,tuple:FR,uint32:zH,uint64:UH,ulid:xH,undefined:Kc,union:Pf,unknown:Gc,uppercase:Ux,url:mH,util:K6,uuid:uH,uuidv4:dH,uuidv6:fH,uuidv7:pH,void:HH,xid:wH,xor:YH},Symbol.toStringTag,{value:"Module"})),Mf=SR({error:"Please enter a valid email address."}).toLowerCase().trim(),Uh=Xe().nonempty({error:"Please enter your password."}),pI=Xe().nonempty({error:"Please enter a username."}),ybe=Mt({username:pI,password:Uh}),bbe=Mt({email:Mf,password:Uh});function xbe({entityId:e,instanceClient:t}){return{queryKey:[e,"health"],queryFn:async()=>{try{return await t.get("/health"),!0}catch{return!1}},retry:2,refetchInterval:5e3}}const J2=["localhost","127.0.0.1"];var ek=(e=>(e.MixedLoopback="MixedLoopback",e.InsecureCookieOutsideChromeAndFirefox="InsecureCookieOutsideChromeAndFirefox",e))(ek||{});function wbe(e,t,n){if(!n||!t||!e)return null;const r=new URL(n).hostname,i=J2.includes(t),o=J2.includes(r);if(i&&o&&r!==t)return"MixedLoopback";if(!i&&o){const a=e.indexOf("Chrome")>=0,l=e.indexOf("Firefox")>=0;if(!a&&!l)return"InsecureCookieOutsideChromeAndFirefox"}return null}const Q2=(e,t,n)=>{if(e&&"reportValidity"in e){const r=Me(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},tk=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?Q2(r.ref,n,e):r&&r.refs&&r.refs.forEach(i=>Q2(i,n,e))}},eP=(e,t)=>{t.shouldUseNativeValidation&&tk(e,t);const n={};for(const r in e){const i=Me(t.fields,r),o=Object.assign(e[r]||{},{ref:i&&i.ref});if(Sbe(t.names||Object.keys(e),r)){const a=Object.assign({},Me(n,r));Wt(a,"root",o),Wt(n,r,a)}else Wt(n,r,o)}return n},Sbe=(e,t)=>{const n=tP(t);return e.some(r=>tP(r).match(`^${n}\\.\\d+`))};function tP(e){return e.replace(/\]|\[/g,"")}function nP(e,t){try{var n=e()}catch(r){return t(r)}return n&&n.then?n.then(void 0,t):n}function _be(e,t){for(var n={};e.length;){var r=e[0],i=r.code,o=r.message,a=r.path.join(".");if(!n[a])if("unionErrors"in r){var l=r.unionErrors[0].errors[0];n[a]={message:l.message,type:l.code}}else n[a]={message:o,type:i};if("unionErrors"in r&&r.unionErrors.forEach(function(m){return m.errors.forEach(function(h){return e.push(h)})}),t){var d=n[a].types,f=d&&d[r.code];n[a]=mj(a,t,n,i,f?[].concat(f,r.message):r.message)}e.shift()}return n}function Cbe(e,t){for(var n={};e.length;){var r=e[0],i=r.code,o=r.message,a=r.path.join(".");if(!n[a])if(r.code==="invalid_union"&&r.errors.length>0){var l=r.errors[0][0];n[a]={message:l.message,type:l.code}}else n[a]={message:o,type:i};if(r.code==="invalid_union"&&r.errors.forEach(function(m){return m.forEach(function(h){return e.push(h)})}),t){var d=n[a].types,f=d&&d[r.code];n[a]=mj(a,t,n,i,f?[].concat(f,r.message):r.message)}e.shift()}return n}function an(e,t,n){if(n===void 0&&(n={}),(function(r){return"_def"in r&&typeof r._def=="object"&&"typeName"in r._def})(e))return function(r,i,o){try{return Promise.resolve(nP(function(){return Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(a){return o.shouldUseNativeValidation&&tk({},o),{errors:{},values:n.raw?Object.assign({},r):a}})},function(a){if((function(l){return Array.isArray(l?.issues)})(a))return{values:{},errors:eP(_be(a.errors,!o.shouldUseNativeValidation&&o.criteriaMode==="all"),o)};throw a}))}catch(a){return Promise.reject(a)}};if((function(r){return"_zod"in r&&typeof r._zod=="object"})(e))return function(r,i,o){try{return Promise.resolve(nP(function(){return Promise.resolve((n.mode==="sync"?rb:ib)(e,r,t)).then(function(a){return o.shouldUseNativeValidation&&tk({},o),{errors:{},values:n.raw?Object.assign({},r):a}})},function(a){if((function(l){return l instanceof Px})(a))return{values:{},errors:eP(Cbe(a.issues,!o.shouldUseNativeValidation&&o.criteriaMode==="all"),o)};throw a}))}catch(a){return Promise.reject(a)}};throw new Error("Invalid input: not a Zod schema")}function mI(){const{clusterId:e,instanceId:t}=nt({strict:!1}),{data:n}=Dt(Aa(e,!0)),r=b.useMemo(()=>t&&n&&n?.instances?.find(k=>k.id===t)||void 0,[n,t]),i=b.useMemo(()=>n?.status&&Tx.includes(n.status),[n?.status]),o="Local",a="instance",l=b.useMemo(()=>n?r?(Ct.flagForFabricConnect(r.id,!1),aE(r)):(Ct.flagForFabricConnect(n.id,!1),oE(n)):null,[n,r]),d=Ut(l),f=b.useMemo(()=>l?.includes("localhost")||l?.includes("127.0.0.1"),[l]),m=b.useMemo(()=>wbe(navigator.userAgent,location.hostname,l),[l]),{data:h}=Dt(xbe(d)),v=Qt({resolver:an(ybe),defaultValues:{username:"",password:""}}),{control:y,handleSubmit:x}=v,{submitForm:S,isPending:C}=Khe({cluster:n,instance:r,instanceParams:d});return!t&&n&&!n?.fqdn?c.jsx(Tc,{to:"../instances",replace:!0}):i&&n?.resetPassword?c.jsx(Tc,{to:`/${n.organizationId}/${n.id}/finish-setup`,replace:!0}):!i&&n?.resetPassword?c.jsx(Tc,{to:`/${n.organizationId}/${n.id}/starting-up`,replace:!0}):c.jsxs(c.Fragment,{children:[!ml,c.jsx("div",{className:"h-screen items-center justify-center flex",children:c.jsxs("div",{className:"text-white w-xs",children:[c.jsxs("h2",{className:"text-2xl font-light",children:["Sign in to Harper ",o]}),c.jsx(en,{...v,children:c.jsxs("form",{onSubmit:x(S),className:"my-4",children:[c.jsx(Ne,{control:y,name:"username",render:({field:k})=>c.jsxs(je,{className:"my-4",children:[c.jsx(Re,{children:"Username"}),c.jsx(Te,{children:c.jsx(ze,{autoComplete:"username",autoFocus:!0,type:"text",...k})}),c.jsx(Ie,{})]})}),c.jsx(Ne,{control:y,name:"password",render:({field:k})=>c.jsxs(je,{className:"my-4",children:[c.jsx(Re,{children:"Password"}),c.jsx(Te,{children:c.jsx(ze,{type:"password",...k})}),c.jsx(Ie,{})]})}),c.jsx(he,{disabled:C,type:"submit",variant:"submit",className:"w-full my-2 rounded-full",children:"Sign In"}),h===!1&&c.jsxs("div",{className:"p-4 mt-4 text-sm text-yellow-800 rounded-lg bg-yellow-50 dark:bg-gray-800 dark:text-yellow-300",role:"alert",children:[c.jsx("span",{className:"font-medium",children:"Warning!"})," This ",a," is not responding to GET"," ",c.jsxs("a",{href:`${l}health`,className:"underline",target:"_blank",children:[l,"health"]})," ","checks.",c.jsxs("ol",{className:"list-decimal ml-8 mt-2",children:[c.jsx("li",{children:"Is the server running?"}),c.jsxs("li",{children:["Have you"," ",c.jsx("a",{href:"https://docs.harperdb.io/docs/developers/security/configuration#cors",target:"_blank",rel:"noreferrer",className:"underline",children:"enabled CORS"})," ","for the operations API?"]}),f&&c.jsxs("li",{children:["Have you allowed"," ",c.jsx("a",{href:"https://www.google.com/search?q=How+do+I+enable+local+network+access+in+my+browser%3F",className:"underline",target:"_blank",rel:"noreferrer",children:"local network access"})," ","in your browser?"]})]})]}),m===ek.MixedLoopback&&c.jsxs("div",{className:"p-4 mt-4 text-sm text-yellow-800 rounded-lg bg-yellow-50 dark:bg-gray-800 dark:text-yellow-300",role:"alert",children:[c.jsx("span",{className:"font-medium",children:"Warning!"})," ","Your login might not work because you're mixing 127.0.0.1 and localhost. Pick one or the other."]}),m===ek.InsecureCookieOutsideChromeAndFirefox&&c.jsxs("div",{className:"p-4 mt-4 text-sm text-yellow-800 rounded-lg bg-yellow-50 dark:bg-gray-800 dark:text-yellow-300",role:"alert",children:[c.jsx("span",{className:"font-medium",children:"Warning!"})," ","Your login might not work because your browser doesn't consider localhost to be secure, so it doesn't pass the cookies along. Firefox or Chromium based browsers should pass the cookies properly."]}),c.jsxs("div",{className:"p-4 mt-4 text-sm rounded-lg bg-purple-950",role:"alert",children:[c.jsx("span",{className:"font-medium",children:"Did you know?"})," ","You can add this instance to your Harper account to manage it remotely.",c.jsx("div",{className:"text-center pt-2",children:c.jsx(Ye,{to:Hhe(),target:"_blank",children:c.jsx(he,{type:"button",variant:"positive",children:"Connect to Harper Fabric"})})})]})]})})]})})]})}async function kbe({email:e}){const{data:t}=await $t.post("/ForgotPassword/",{email:e});if(t)return t;throw new Error("Something went wrong")}function Ebe(){return ot({mutationFn:e=>kbe(e)})}const jbe=Mt({email:Mf});function Rbe(){const e=Cn(),{me:t}=Nr({strict:!1}),n=Qt({resolver:an(jbe),defaultValues:{email:t||""}}),r=n.watch("email"),{setFocus:i,control:o,handleSubmit:a}=n;b.useEffect(()=>{i("email")},[i]);const{mutate:l,isPending:d}=Ebe(),f=async m=>{l(m,{onSuccess:h=>{ye.success("Success",{description:`${h}`,action:{label:"Dismiss",onClick:()=>ye.dismiss()}}),e({to:"/sign-in",search:{me:r}})}})};return c.jsxs("div",{className:"text-white w-xs",children:[c.jsx("h2",{className:"text-2xl font-light",children:"Enter your account email"}),c.jsx("p",{className:"text-sm pt-1",children:"If a matching account exists, we'll send you a password reset link."}),c.jsx(en,{...n,children:c.jsxs("form",{onSubmit:a(f),className:"my-4",children:[c.jsx(Ne,{control:o,name:"email",render:({field:m})=>c.jsxs(je,{className:"my-2",children:[c.jsx(Re,{children:"Email"}),c.jsx(Te,{children:c.jsx(ze,{disabled:d,type:"email",className:"bg-purple-400 border-purple-400 dark:bg-black dark:border-black",...m})}),c.jsx(Ie,{})]})}),c.jsx(he,{type:"submit",variant:"submit",disabled:d,className:"w-full my-2 rounded-full",children:"Send Password Reset Email"})]})}),c.jsxs("div",{className:"flex px-4 mt-4 underline place-content-between",children:[c.jsx(Ye,{className:"text-sm hover:text-blue-300",to:"/sign-in",search:{me:r},children:"Sign in to your account"}),c.jsx(Ye,{className:"text-sm hover:text-blue-300",to:"/sign-up",search:{me:r},children:"Sign up for free"})]})]})}const Ibe=async({token:e,password:t})=>{const{data:n}=await $t.put("/ResetPassword/",{token:e,newPassword:t});return n};function Tbe(){return ot({mutationFn:e=>Ibe(e)})}const Nbe=Mt({password:Uh.min(8,{error:"Password must be at least 8 characters long."}).max(50,{error:"Password cannot be longer than 50 characters."}),confirmPassword:Xe()}).refine(e=>e.password===e.confirmPassword,{error:"Passwords do not match.",path:["confirmPassword"]});function Abe(){const{token:e}=Nr({strict:!1}),t=Cn();b.useEffect(()=>{e||t({to:"/sign-in"})},[e,t]);const n=Qt({resolver:an(Nbe),defaultValues:{password:"",confirmPassword:""}}),{setFocus:r,control:i,handleSubmit:o}=n;b.useEffect(()=>{r("password")},[r]);const{mutate:a,isPending:l}=Tbe(),d=b.useCallback(async f=>{a({token:e,password:f.password},{onSuccess:()=>{ye.success("Success",{description:"Your password has been reset successfully.",action:{label:"Dismiss",onClick:()=>ye.dismiss()}}),t({to:"/sign-in"})}})},[t,a,e]);return c.jsxs("div",{className:"text-white w-xs",children:[c.jsx("h2",{className:"text-2xl font-light",children:"Reset Password"}),c.jsx(en,{...n,children:c.jsxs("form",{className:"my-4",onSubmit:o(d),children:[c.jsx(Ne,{control:i,name:"password",render:({field:f})=>c.jsxs(je,{className:"my-2",children:[c.jsx(Re,{children:"New Password"}),c.jsx(Te,{children:c.jsx(ze,{disabled:l,type:"password",className:"bg-purple-400 border-purple-400 dark:bg-black dark:border-black",...f})}),c.jsx(Ie,{})]})}),c.jsx(Ne,{control:i,name:"confirmPassword",render:({field:f})=>c.jsxs(je,{className:"my-2",children:[c.jsx(Re,{children:"Confirm Password"}),c.jsx(Te,{children:c.jsx(ze,{disabled:l,type:"password",className:"bg-purple-400 border-purple-400 dark:bg-black dark:border-black",...f})}),c.jsx(Ie,{})]})}),c.jsx(he,{variant:"submit",type:"submit",disabled:l,className:"w-full my-2 rounded-full",children:"Submit New Password"})]})})]})}function v8({text:e}){return c.jsx("a",{href:"/oauth/github/login?redirect=%2F%23%2Fcheck-oauth",children:c.jsxs("button",{className:"github-signin-btn",children:[c.jsx(vE,{className:"github-icon"}),e]})})}function y8({text:e}){return c.jsx("a",{href:"/oauth/google/login?redirect=%2F%23%2Fcheck-oauth",children:c.jsxs("button",{className:"gsi-material-button",children:[c.jsx("div",{className:"gsi-material-button-state"}),c.jsxs("div",{className:"gsi-material-button-content-wrapper",children:[c.jsx("div",{className:"gsi-material-button-icon",children:c.jsxs("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48",xmlnsXlink:"http://www.w3.org/1999/xlink",className:"block",children:[c.jsx("path",{fill:"#EA4335",d:"M24 9.5c3.54 0 6.71 1.22 9.21 3.6l6.85-6.85C35.9 2.38 30.47 0 24 0 14.62 0 6.51 5.38 2.56 13.22l7.98 6.19C12.43 13.72 17.74 9.5 24 9.5z"}),c.jsx("path",{fill:"#4285F4",d:"M46.98 24.55c0-1.57-.15-3.09-.38-4.55H24v9.02h12.94c-.58 2.96-2.26 5.48-4.78 7.18l7.73 6c4.51-4.18 7.09-10.36 7.09-17.65z"}),c.jsx("path",{fill:"#FBBC05",d:"M10.53 28.59c-.48-1.45-.76-2.99-.76-4.59s.27-3.14.76-4.59l-7.98-6.19C.92 16.46 0 20.12 0 24c0 3.88.92 7.54 2.56 10.78l7.97-6.19z"}),c.jsx("path",{fill:"#34A853",d:"M24 48c6.48 0 11.93-2.13 15.89-5.81l-7.73-6c-2.15 1.45-4.92 2.3-8.16 2.3-6.26 0-11.57-4.22-13.47-9.91l-7.98 6.19C6.51 42.62 14.62 48 24 48z"}),c.jsx("path",{fill:"none",d:"M0 0h48v48H0z"})]})}),c.jsx("span",{className:"gsi-material-button-contents",children:e}),c.jsx("span",{className:"hidden",children:e})]})]})})}function Obe(){const e=Cn(),t=sr(),n=_n(),{redirect:r}=Nr({strict:!1}),{mutate:i,isPending:o}=Dbe(),a=b.useCallback(l=>{i(l,{onSuccess:async d=>{Ct.setUserForEntity(Mn,d);const f=ru(d);GE(d.email),await t.invalidateQueries({queryKey:zb,refetchType:"none"}),n.invalidate(),await e({to:r?.startsWith("/")?r:f})}})},[e,t,r,n,i]);return{isPending:o,submitForm:a}}function Dbe(){return ot({mutationFn:e=>$be(e)})}async function $be({email:e,password:t}){const{data:n}=await $t.post("/Login/",{email:e,password:t});if(n)return n;throw new Error("Something went wrong")}function Pbe(){const{me:e}=Nr({strict:!1}),t=Qt({resolver:an(bbe),defaultValues:{email:e||"",password:""}}),{handleSubmit:n,control:r}=t,i=t.watch("email"),{submitForm:o,isPending:a}=Obe();return c.jsxs("div",{className:"text-white w-xs",children:[c.jsx("h2",{className:"text-2xl font-light",children:"Sign in to Harper Fabric"}),c.jsx(en,{...t,children:c.jsxs("form",{onSubmit:n(o),className:"my-4",children:[c.jsx(Ne,{control:r,name:"email",render:({field:l})=>c.jsxs(je,{className:"my-4",children:[c.jsx(Re,{children:"Email"}),c.jsx(Te,{children:c.jsx(ze,{type:"email",autoFocus:!0,className:"bg-purple-400 border-purple-400 dark:bg-black dark:border-black",...l})}),c.jsx(Ie,{})]})}),c.jsx(Ne,{control:r,name:"password",render:({field:l})=>c.jsxs(je,{className:"my-4",children:[c.jsx(Re,{children:"Password"}),c.jsx(Te,{children:c.jsx(ze,{type:"password",className:"bg-purple-400 border-purple-400 dark:bg-black dark:border-black",...l})}),c.jsx(Ie,{})]})}),c.jsx(he,{type:"submit",variant:"submit",className:"w-full my-2 rounded-full",disabled:a,children:"Sign In"}),c.jsxs("div",{className:"flex px-4 mt-4 underline place-content-between",children:[c.jsx(Ye,{className:"text-sm hover:text-blue-300",to:"/sign-up",search:{me:i},children:"Sign up for free"}),c.jsx(Ye,{className:"text-sm hover:text-blue-300",to:"/forgot-password",search:{me:i},children:"Forgot password?"})]})]})}),c.jsx("hr",{className:"border-gray-600 my-6"}),c.jsxs("div",{className:"flex flex-col gap-2",children:[c.jsx(y8,{text:"Sign in with Google"}),c.jsx(v8,{text:"Sign in with GitHub"})]})]})}const rP=/^[a-zA-ZàáâäãåąčćęèéêëėįìíîïłńòóôöõøùúûüųūÿýżźñçčšžæÀÁÂÄÃÅĄĆČĖĘÈÉÊËÌÍÎÏĮŁŃÒÓÔÖÕØÙÚÛÜŲŪŸÝŻŹÑßÇŒÆČŠŽ∂ð ,'-]+$/u;async function Mbe(e){const{data:t}=await $t.post("/User/",e);if(t)return t;throw new Error("Something went wrong")}function zbe(){return ot({mutationFn:e=>Mbe(e)})}const Lbe=Mt({email:Mf.max(80,{error:"Email cannot be longer than 80 characters."}),firstname:Xe().trim().min(2,{error:"Please enter your first name."}).regex(rP,{error:"First name can only contain letters, spaces, and hyphens."}).max(40,{error:"First name cannot be longer than 40 characters."}),lastname:Xe().trim().min(2,{error:"Please enter your last name."}).regex(rP,{error:"Last name can only contain letters, spaces, and hyphens."}).max(80,{error:"Last name cannot be longer than 80 characters."}),password:Uh.min(8,{error:"Password must be at least 8 characters long."}),confirmPassword:Xe()}).refine(e=>e.password===e.confirmPassword,{error:"Passwords do not match.",path:["confirmPassword"]});function Fbe(){const e=Cn(),{email:t,me:n}=Nr({strict:!1}),r=Qt({resolver:an(Lbe),defaultValues:{firstname:"",lastname:"",email:n||t||"",password:"",confirmPassword:""}}),i=r.watch("email"),{setFocus:o,control:a,handleSubmit:l}=r;b.useEffect(()=>{o("firstname")},[o]);const{mutate:d}=zbe(),f=b.useCallback(async m=>{const{confirmPassword:h,...v}=m;d(v,{onSuccess:()=>{GE(v.email),e({to:"/verifying?email="+encodeURIComponent(v.email)})}})},[e,d]);return c.jsxs("div",{className:"text-white w-xs",children:[c.jsx("h2",{className:"text-2xl font-light",children:"Sign up for Harper Fabric"}),c.jsxs("div",{className:"flex flex-col gap-2 my-6",children:[c.jsx(y8,{text:"Sign up with Google"}),c.jsx(v8,{text:"Sign up with GitHub"})]}),c.jsx("hr",{className:"border-gray-600"}),c.jsx(en,{...r,children:c.jsxs("form",{onSubmit:l(f),className:"grid gap-4 my-4",children:[c.jsx(Ne,{control:a,name:"firstname",render:({field:m})=>c.jsxs(je,{children:[c.jsx(Re,{className:"pb-1",children:"First Name"}),c.jsx(Te,{children:c.jsx(ze,{type:"text",className:"bg-purple-400 border-purple-400 dark:bg-black dark:border-black",autoCapitalize:"words",...m})}),c.jsx(Ie,{})]})}),c.jsx(Ne,{control:a,name:"lastname",render:({field:m})=>c.jsxs(je,{children:[c.jsx(Re,{className:"pb-1",children:"Last Name"}),c.jsx(Te,{children:c.jsx(ze,{type:"text",className:"bg-purple-400 border-purple-400 dark:bg-black dark:border-black",autoCapitalize:"words",...m})}),c.jsx(Ie,{})]})}),c.jsx(Ne,{control:a,name:"email",render:({field:m})=>c.jsxs(je,{children:[c.jsx(Re,{className:"pb-1",children:"Email"}),c.jsx(Te,{children:c.jsx(ze,{type:"email",readOnly:!!t,disabled:!!t,className:"bg-purple-400 border-purple-400 dark:bg-black dark:border-black",autoComplete:"email",autoCapitalize:"none",...m})}),c.jsx(Ie,{})]})}),c.jsx(Ne,{control:a,name:"password",render:({field:m})=>c.jsxs(je,{children:[c.jsx(Re,{className:"pb-1",children:"Password"}),c.jsx(Te,{children:c.jsx(ze,{type:"password",className:"bg-purple-400 border-purple-400 dark:bg-black dark:border-black",...m})}),c.jsx(Ie,{})]})}),c.jsx(Ne,{control:a,name:"confirmPassword",render:({field:m})=>c.jsxs(je,{children:[c.jsx(Re,{className:"pb-1",children:"Confirm Password"}),c.jsx(Te,{children:c.jsx(ze,{type:"password",className:"bg-purple-400 border-purple-400 dark:bg-black dark:border-black",...m})}),c.jsx(Ie,{})]})}),c.jsxs("p",{className:"text-xs",children:["By creating an account, you agree to the"," ",c.jsx("a",{href:"https://www.harper.fast/resources/privacy-policy",target:"_blank",rel:"noreferrer",className:"underline hover:text-blue-300",children:"Privacy Policy"})," ","and"," ",c.jsx("a",{href:"https://www.harper.fast/resources/paas-terms-of-service",target:"_blank",rel:"noreferrer",className:"underline hover:text-blue-300",children:"Terms of Service"})]}),c.jsx(he,{type:"submit",variant:"submit",className:"w-full rounded-full my-4",children:"Sign Up For Free"})]})}),c.jsx("div",{className:"flex px-4 mt-4 underline place-content-between",children:c.jsx(Ye,{className:"m-auto text-sm hover:text-blue-300",to:"/sign-in",search:{me:i},children:"Already have an account? Sign in instead."})})]})}const Ube=async({email:e})=>{const{data:t}=await $t.post("/ResendVerificationEmail/",{email:e});return t};function b8(){return ot({mutationFn:e=>Ube(e)})}const Vbe=async e=>{const{data:t}=await $t.put("/VerifyEmail/",{token:e.toString()});return t};function Bbe(){return ot({mutationFn:e=>Vbe(e)})}const Hbe=Mt({email:Mf});function qbe(){const e=Cn(),{mutate:t,isPending:n}=b8(),r=Qt({resolver:an(Hbe),defaultValues:{email:""}}),i=r.watch("email"),{setFocus:o,control:a,handleSubmit:l}=r;b.useEffect(()=>{o("email")},[o]);const d=b.useCallback(async f=>{t(f,{onSuccess:m=>{ye.success("Success",{description:`${m}`,action:{label:"Dismiss",onClick:()=>ye.dismiss()}}),e({to:"/sign-in",search:{me:i}})}})},[i,e,t]);return c.jsxs(en,{...r,children:[c.jsx("p",{className:"text-sm py-2",children:"Please Enter an Email"}),c.jsxs("form",{onSubmit:l(d),className:"my-4",children:[c.jsx(Ne,{control:a,name:"email",render:({field:f})=>c.jsxs(je,{className:"my-2",children:[c.jsx(Re,{children:"Email"}),c.jsx(Te,{children:c.jsx(ze,{disabled:n,type:"email",className:"bg-purple-400 border-purple-400 dark:bg-black dark:border-black",...f})}),c.jsx(Ie,{})]})}),c.jsx(he,{type:"submit",variant:"submit",disabled:n,className:"w-full my-2 rounded-full",children:"Send Verification Email"})]})]})}function Kbe(){const{token:e}=Nr({strict:!1}),t=Cn(),{mutate:n,isPending:r}=Bbe(),i=b.useCallback(o=>{n(o,{onSuccess:()=>{ye.success("Success",{description:"Email verified successfully",action:{label:"Dismiss",onClick:()=>ye.dismiss()}}),t({to:"/sign-in"})}})},[n,t]);return b.useEffect(()=>{e&&i(e)},[i,e]),c.jsxs("div",{className:"text-white w-xs",children:[c.jsx("h1",{className:"text-3xl font-light",children:"Verify Email"}),r?c.jsx("p",{className:"text-sm pt-1",children:"Verifying email..."}):c.jsx(qbe,{})]})}function Gbe(){const{email:e}=Nr({strict:!1}),{mutate:t,isPending:n}=b8(),r=b.useCallback(i=>(i.preventDefault(),e&&t({email:e},{onSuccess:o=>{ye.success("Code Sent",{description:`${o}`,action:{label:"Dismiss",onClick:()=>ye.dismiss()}})}}),!1),[e,t]);return c.jsxs("div",{className:"text-white w-lg flex flex-col gap-4",children:[c.jsxs("h1",{className:"text-3xl font-light",children:[c.jsx("span",{"aria-hidden":"true",className:"text-2xl animate-flower-dance mr-4",title:"Loading",children:"🌼"}),"Check your email!"]}),c.jsxs("p",{children:["Your account has been created! You should receive an email with a link to ",c.jsx("strong",{children:"[Verify My Email]"}),"!"]}),c.jsxs("p",{children:["From: ",c.jsx("strong",{children:"harper@notifications.harperfabric.com"})]}),c.jsxs("p",{children:["To: ",c.jsx("strong",{children:e||"your email"})]}),c.jsx("p",{children:"Can you click it? Then we can carry on to more fun things!"}),c.jsxs("div",{className:"underline flex gap-4",children:[c.jsx(Ye,{className:"text-sm hover:text-blue-300",to:"/sign-in",search:{me:e},children:"I did it, let me sign in!"}),c.jsx(Ye,{className:"text-sm opacity-50 hover:text-blue-300",to:void 0,onClick:r,disabled:n,children:"Send me another code, please."})]})]})}const Bl=Qe({getParentRoute:()=>px,id:"_authLayout",component:Rpe}),Zbe=Qe({getParentRoute:()=>Bl,path:"sign-in",component:Pbe,beforeLoad:({context:e,location:t})=>{const n=e.authentication[Mn]?.user;if(n){const r=t?.search,i=ru(n);throw eu({to:r?.redirect?.startsWith("/")?r.redirect:i})}}}),Ybe=Qe({getParentRoute:()=>px,path:"sign-in",component:mI,beforeLoad:({context:e,location:t})=>{if(e.authentication[Mn]?.user){const n=t?.search;throw eu({to:n?.redirect?.startsWith("/")?n.redirect:Ea})}}}),Wbe=Qe({getParentRoute:()=>Bl,path:"sign-up",component:Fbe}),Xbe=Qe({getParentRoute:()=>Bl,path:"forgot-password",component:Rbe}),Jbe=Qe({getParentRoute:()=>Bl,path:"verify-email",component:Kbe}),Qbe=Qe({getParentRoute:()=>Bl,path:"verifying",component:Gbe}),exe=Qe({getParentRoute:()=>Bl,path:"check-oauth",component:Npe}),txe=Qe({getParentRoute:()=>Bl,path:"reset-password",component:Abe});Bl.addChildren([Zbe,Wbe,exe,Xbe,Jbe,Qbe,txe]);const nxe=[Ybe];function Es({children:e}){return c.jsx("nav",{className:"fixed top-20 w-full h-12 z-39 py-2 px-4 md:px-12 bg-grey-700",children:c.jsxs("div",{className:"flex items-center h-full space-x-2",children:[c.jsx(Cx,{}),e]})})}function x8(e){if(nk(e)||rk(e))return"warning";if(hI(e))return"success";switch(e){case"STOPPED":return"secondary";case"TERMINATING":case"TERMINATED":case"FAILED":case"REMOVED":case"ERROR":return"destructive";default:return"default"}}function hI(e){switch(e){case"RUNNING":case"UPDATED":return!0;default:return!1}}function Vh(e){return e==="FAILED"}function gI(e){return e==="TERMINATED"}function nk(e){return e==="CLONE_PENDING"}function rk(e){switch(e){case"PROVISIONING":case"CLONING":case"CLONE_READY":case"UPDATING_HDB_NODES":case"UPDATING":return!0;default:return!1}}var u1="focusScope.autoFocusOnMount",d1="focusScope.autoFocusOnUnmount",iP={bubbles:!1,cancelable:!0},rxe="FocusScope",C0=b.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[l,d]=b.useState(null),f=An(i),m=An(o),h=b.useRef(null),v=ft(t,S=>d(S)),y=b.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;b.useEffect(()=>{if(r){let S=function(j){if(y.paused||!l)return;const I=j.target;l.contains(I)?h.current=I:nl(h.current,{select:!0})},C=function(j){if(y.paused||!l)return;const I=j.relatedTarget;I!==null&&(l.contains(I)||nl(h.current,{select:!0}))},k=function(j){if(document.activeElement===document.body)for(const A of j)A.removedNodes.length>0&&nl(l)};document.addEventListener("focusin",S),document.addEventListener("focusout",C);const E=new MutationObserver(k);return l&&E.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",S),document.removeEventListener("focusout",C),E.disconnect()}}},[r,l,y.paused]),b.useEffect(()=>{if(l){aP.add(y);const S=document.activeElement;if(!l.contains(S)){const k=new CustomEvent(u1,iP);l.addEventListener(u1,f),l.dispatchEvent(k),k.defaultPrevented||(ixe(cxe(w8(l)),{select:!0}),document.activeElement===S&&nl(l))}return()=>{l.removeEventListener(u1,f),setTimeout(()=>{const k=new CustomEvent(d1,iP);l.addEventListener(d1,m),l.dispatchEvent(k),k.defaultPrevented||nl(S??document.body,{select:!0}),l.removeEventListener(d1,m),aP.remove(y)},0)}}},[l,f,m,y]);const x=b.useCallback(S=>{if(!n&&!r||y.paused)return;const C=S.key==="Tab"&&!S.altKey&&!S.ctrlKey&&!S.metaKey,k=document.activeElement;if(C&&k){const E=S.currentTarget,[j,I]=oxe(E);j&&I?!S.shiftKey&&k===I?(S.preventDefault(),n&&nl(j,{select:!0})):S.shiftKey&&k===j&&(S.preventDefault(),n&&nl(I,{select:!0})):k===E&&S.preventDefault()}},[n,r,y.paused]);return c.jsx(Ge.div,{tabIndex:-1,...a,ref:v,onKeyDown:x})});C0.displayName=rxe;function ixe(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(nl(r,{select:t}),document.activeElement!==n)return}function oxe(e){const t=w8(e),n=oP(t,e),r=oP(t.reverse(),e);return[n,r]}function w8(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function oP(e,t){for(const n of e)if(!axe(n,{upTo:t}))return n}function axe(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function sxe(e){return e instanceof HTMLInputElement&&"select"in e}function nl(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&sxe(e)&&t&&e.select()}}var aP=lxe();function lxe(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=sP(e,t),e.unshift(t)},remove(t){e=sP(e,t),e[0]?.resume()}}}function sP(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function cxe(e){return e.filter(t=>t.tagName!=="A")}var f1=0;function vI(){b.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??lP()),document.body.insertAdjacentElement("beforeend",e[1]??lP()),f1++,()=>{f1===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),f1--}},[])}function lP(){const 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}var ik=function(e,t){return ik=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},ik(e,t)};function iMe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");ik(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var va=function(){return va=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},va.apply(this,arguments)};function S8(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function pu(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function l(m){try{f(r.next(m))}catch(h){a(h)}}function d(m){try{f(r.throw(m))}catch(h){a(h)}}function f(m){m.done?o(m.value):i(m.value).then(l,d)}f((r=r.apply(e,t||[])).next())})}function uxe(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}var Cy="right-scroll-bar-position",ky="width-before-scroll-bar",dxe="with-scroll-bars-hidden",fxe="--removed-body-scroll-bar-size";function p1(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function pxe(e,t){var n=b.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var mxe=typeof window<"u"?b.useLayoutEffect:b.useEffect,cP=new WeakMap;function hxe(e,t){var n=pxe(null,function(r){return e.forEach(function(i){return p1(i,r)})});return mxe(function(){var r=cP.get(n);if(r){var i=new Set(r),o=new Set(e),a=n.current;i.forEach(function(l){o.has(l)||p1(l,null)}),o.forEach(function(l){i.has(l)||p1(l,a)})}cP.set(n,e)},[e]),n}function gxe(e){return e}function vxe(e,t){t===void 0&&(t=gxe);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var a=t(o,r);return n.push(a),function(){n=n.filter(function(l){return l!==a})}},assignSyncMedium:function(o){for(r=!0;n.length;){var a=n;n=[],a.forEach(o)}n={push:function(l){return o(l)},filter:function(){return n}}},assignMedium:function(o){r=!0;var a=[];if(n.length){var l=n;n=[],l.forEach(o),a=n}var d=function(){var m=a;a=[],m.forEach(o)},f=function(){return Promise.resolve().then(d)};f(),n={push:function(m){a.push(m),f()},filter:function(m){return a=a.filter(m),n}}}};return i}function yxe(e){e===void 0&&(e={});var t=vxe(null);return t.options=va({async:!0,ssr:!1},e),t}var _8=function(e){var t=e.sideCar,n=S8(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return b.createElement(r,va({},n))};_8.isSideCarExport=!0;function bxe(e,t){return e.useMedium(t),_8}var C8=yxe(),m1=function(){},k0=b.forwardRef(function(e,t){var n=b.useRef(null),r=b.useState({onScrollCapture:m1,onWheelCapture:m1,onTouchMoveCapture:m1}),i=r[0],o=r[1],a=e.forwardProps,l=e.children,d=e.className,f=e.removeScrollBar,m=e.enabled,h=e.shards,v=e.sideCar,y=e.noRelative,x=e.noIsolation,S=e.inert,C=e.allowPinchZoom,k=e.as,E=k===void 0?"div":k,j=e.gapMode,I=S8(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),A=v,T=hxe([n,t]),N=va(va({},I),i);return b.createElement(b.Fragment,null,m&&b.createElement(A,{sideCar:C8,removeScrollBar:f,shards:h,noRelative:y,noIsolation:x,inert:S,setCallbacks:o,allowPinchZoom:!!C,lockRef:n,gapMode:j}),a?b.cloneElement(b.Children.only(l),va(va({},N),{ref:T})):b.createElement(E,va({},N,{className:d,ref:T}),l))});k0.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};k0.classNames={fullWidth:ky,zeroRight:Cy};var xxe=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function wxe(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=xxe();return t&&e.setAttribute("nonce",t),e}function Sxe(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function _xe(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Cxe=function(){var e=0,t=null;return{add:function(n){e==0&&(t=wxe())&&(Sxe(t,n),_xe(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},kxe=function(){var e=Cxe();return function(t,n){b.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},k8=function(){var e=kxe(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},Exe={left:0,top:0,right:0,gap:0},h1=function(e){return parseInt(e||"",10)||0},jxe=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[h1(n),h1(r),h1(i)]},Rxe=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Exe;var t=jxe(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])}},Ixe=k8(),zd="data-scroll-locked",Txe=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,l=e.gap;return n===void 0&&(n="margin"),`
86
+ .`.concat(dxe,` {
87
+ overflow: hidden `).concat(r,`;
88
+ padding-right: `).concat(l,"px ").concat(r,`;
89
+ }
90
+ body[`).concat(zd,`] {
91
+ overflow: hidden `).concat(r,`;
92
+ overscroll-behavior: contain;
93
+ `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
94
+ padding-left: `.concat(i,`px;
95
+ padding-top: `).concat(o,`px;
96
+ padding-right: `).concat(a,`px;
97
+ margin-left:0;
98
+ margin-top:0;
99
+ margin-right: `).concat(l,"px ").concat(r,`;
100
+ `),n==="padding"&&"padding-right: ".concat(l,"px ").concat(r,";")].filter(Boolean).join(""),`
101
+ }
102
+
103
+ .`).concat(Cy,` {
104
+ right: `).concat(l,"px ").concat(r,`;
105
+ }
106
+
107
+ .`).concat(ky,` {
108
+ margin-right: `).concat(l,"px ").concat(r,`;
109
+ }
110
+
111
+ .`).concat(Cy," .").concat(Cy,` {
112
+ right: 0 `).concat(r,`;
113
+ }
114
+
115
+ .`).concat(ky," .").concat(ky,` {
116
+ margin-right: 0 `).concat(r,`;
117
+ }
118
+
119
+ body[`).concat(zd,`] {
120
+ `).concat(fxe,": ").concat(l,`px;
121
+ }
122
+ `)},uP=function(){var e=parseInt(document.body.getAttribute(zd)||"0",10);return isFinite(e)?e:0},Nxe=function(){b.useEffect(function(){return document.body.setAttribute(zd,(uP()+1).toString()),function(){var e=uP()-1;e<=0?document.body.removeAttribute(zd):document.body.setAttribute(zd,e.toString())}},[])},Axe=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;Nxe();var o=b.useMemo(function(){return Rxe(i)},[i]);return b.createElement(Ixe,{styles:Txe(o,!t,i,n?"":"!important")})},ok=!1;if(typeof window<"u")try{var Vv=Object.defineProperty({},"passive",{get:function(){return ok=!0,!0}});window.addEventListener("test",Vv,Vv),window.removeEventListener("test",Vv,Vv)}catch{ok=!1}var pd=ok?{passive:!1}:!1,Oxe=function(e){return e.tagName==="TEXTAREA"},E8=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Oxe(e)&&n[t]==="visible")},Dxe=function(e){return E8(e,"overflowY")},$xe=function(e){return E8(e,"overflowX")},dP=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=j8(e,r);if(i){var o=R8(e,r),a=o[1],l=o[2];if(a>l)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Pxe=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Mxe=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},j8=function(e,t){return e==="v"?Dxe(t):$xe(t)},R8=function(e,t){return e==="v"?Pxe(t):Mxe(t)},zxe=function(e,t){return e==="h"&&t==="rtl"?-1:1},Lxe=function(e,t,n,r,i){var o=zxe(e,window.getComputedStyle(t).direction),a=o*r,l=n.target,d=t.contains(l),f=!1,m=a>0,h=0,v=0;do{if(!l)break;var y=R8(e,l),x=y[0],S=y[1],C=y[2],k=S-C-o*x;(x||k)&&j8(e,l)&&(h+=k,v+=x);var E=l.parentNode;l=E&&E.nodeType===Node.DOCUMENT_FRAGMENT_NODE?E.host:E}while(!d&&l!==document.body||d&&(t.contains(l)||t===l));return(m&&Math.abs(h)<1||!m&&Math.abs(v)<1)&&(f=!0),f},Bv=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},fP=function(e){return[e.deltaX,e.deltaY]},pP=function(e){return e&&"current"in e?e.current:e},Fxe=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Uxe=function(e){return`
123
+ .block-interactivity-`.concat(e,` {pointer-events: none;}
124
+ .allow-interactivity-`).concat(e,` {pointer-events: all;}
125
+ `)},Vxe=0,md=[];function Bxe(e){var t=b.useRef([]),n=b.useRef([0,0]),r=b.useRef(),i=b.useState(Vxe++)[0],o=b.useState(k8)[0],a=b.useRef(e);b.useEffect(function(){a.current=e},[e]),b.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var S=uxe([e.lockRef.current],(e.shards||[]).map(pP),!0).filter(Boolean);return S.forEach(function(C){return C.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),S.forEach(function(C){return C.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var l=b.useCallback(function(S,C){if("touches"in S&&S.touches.length===2||S.type==="wheel"&&S.ctrlKey)return!a.current.allowPinchZoom;var k=Bv(S),E=n.current,j="deltaX"in S?S.deltaX:E[0]-k[0],I="deltaY"in S?S.deltaY:E[1]-k[1],A,T=S.target,N=Math.abs(j)>Math.abs(I)?"h":"v";if("touches"in S&&N==="h"&&T.type==="range")return!1;var D=dP(N,T);if(!D)return!0;if(D?A=N:(A=N==="v"?"h":"v",D=dP(N,T)),!D)return!1;if(!r.current&&"changedTouches"in S&&(j||I)&&(r.current=A),!A)return!0;var L=r.current||A;return Lxe(L,C,S,L==="h"?j:I)},[]),d=b.useCallback(function(S){var C=S;if(!(!md.length||md[md.length-1]!==o)){var k="deltaY"in C?fP(C):Bv(C),E=t.current.filter(function(A){return A.name===C.type&&(A.target===C.target||C.target===A.shadowParent)&&Fxe(A.delta,k)})[0];if(E&&E.should){C.cancelable&&C.preventDefault();return}if(!E){var j=(a.current.shards||[]).map(pP).filter(Boolean).filter(function(A){return A.contains(C.target)}),I=j.length>0?l(C,j[0]):!a.current.noIsolation;I&&C.cancelable&&C.preventDefault()}}},[]),f=b.useCallback(function(S,C,k,E){var j={name:S,delta:C,target:k,should:E,shadowParent:Hxe(k)};t.current.push(j),setTimeout(function(){t.current=t.current.filter(function(I){return I!==j})},1)},[]),m=b.useCallback(function(S){n.current=Bv(S),r.current=void 0},[]),h=b.useCallback(function(S){f(S.type,fP(S),S.target,l(S,e.lockRef.current))},[]),v=b.useCallback(function(S){f(S.type,Bv(S),S.target,l(S,e.lockRef.current))},[]);b.useEffect(function(){return md.push(o),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:v}),document.addEventListener("wheel",d,pd),document.addEventListener("touchmove",d,pd),document.addEventListener("touchstart",m,pd),function(){md=md.filter(function(S){return S!==o}),document.removeEventListener("wheel",d,pd),document.removeEventListener("touchmove",d,pd),document.removeEventListener("touchstart",m,pd)}},[]);var y=e.removeScrollBar,x=e.inert;return b.createElement(b.Fragment,null,x?b.createElement(o,{styles:Uxe(i)}):null,y?b.createElement(Axe,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Hxe(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const qxe=bxe(C8,Bxe);var E0=b.forwardRef(function(e,t){return b.createElement(k0,va({},e,{ref:t,sideCar:qxe}))});E0.classNames=k0.classNames;var Kxe=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},hd=new WeakMap,Hv=new WeakMap,qv={},g1=0,I8=function(e){return e&&(e.host||I8(e.parentNode))},Gxe=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=I8(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Zxe=function(e,t,n,r){var i=Gxe(t,Array.isArray(e)?e:[e]);qv[n]||(qv[n]=new WeakMap);var o=qv[n],a=[],l=new Set,d=new Set(i),f=function(h){!h||l.has(h)||(l.add(h),f(h.parentNode))};i.forEach(f);var m=function(h){!h||d.has(h)||Array.prototype.forEach.call(h.children,function(v){if(l.has(v))m(v);else try{var y=v.getAttribute(r),x=y!==null&&y!=="false",S=(hd.get(v)||0)+1,C=(o.get(v)||0)+1;hd.set(v,S),o.set(v,C),a.push(v),S===1&&x&&Hv.set(v,!0),C===1&&v.setAttribute(n,"true"),x||v.setAttribute(r,"true")}catch(k){console.error("aria-hidden: cannot operate on ",v,k)}})};return m(t),l.clear(),g1++,function(){a.forEach(function(h){var v=hd.get(h)-1,y=o.get(h)-1;hd.set(h,v),o.set(h,y),v||(Hv.has(h)||h.removeAttribute(r),Hv.delete(h)),y||h.removeAttribute(n)}),g1--,g1||(hd=new WeakMap,hd=new WeakMap,Hv=new WeakMap,qv={})}},yI=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=Kxe(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live], script"))),Zxe(r,i,n,"aria-hidden")):function(){return null}},j0="Dialog",[T8]=Ti(j0),[Yxe,sa]=T8(j0),N8=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:a=!0}=e,l=b.useRef(null),d=b.useRef(null),[f,m]=Mo({prop:r,defaultProp:i??!1,onChange:o,caller:j0});return c.jsx(Yxe,{scope:t,triggerRef:l,contentRef:d,contentId:Zi(),titleId:Zi(),descriptionId:Zi(),open:f,onOpenChange:m,onOpenToggle:b.useCallback(()=>m(h=>!h),[m]),modal:a,children:n})};N8.displayName=j0;var A8="DialogTrigger",O8=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=sa(A8,n),o=ft(t,i.triggerRef);return c.jsx(Ge.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":wI(i.open),...r,ref:o,onClick:Oe(e.onClick,i.onOpenToggle)})});O8.displayName=A8;var bI="DialogPortal",[Wxe,D8]=T8(bI,{forceMount:void 0}),$8=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,o=sa(bI,t);return c.jsx(Wxe,{scope:t,forceMount:n,children:b.Children.map(r,a=>c.jsx(lr,{present:n||o.open,children:c.jsx(ph,{asChild:!0,container:i,children:a})}))})};$8.displayName=bI;var cb="DialogOverlay",P8=b.forwardRef((e,t)=>{const n=D8(cb,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=sa(cb,e.__scopeDialog);return o.modal?c.jsx(lr,{present:r||o.open,children:c.jsx(Jxe,{...i,ref:t})}):null});P8.displayName=cb;var Xxe=Jd("DialogOverlay.RemoveScroll"),Jxe=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=sa(cb,n);return c.jsx(E0,{as:Xxe,allowPinchZoom:!0,shards:[i.contentRef],children:c.jsx(Ge.div,{"data-state":wI(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Zc="DialogContent",M8=b.forwardRef((e,t)=>{const n=D8(Zc,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=sa(Zc,e.__scopeDialog);return c.jsx(lr,{present:r||o.open,children:o.modal?c.jsx(Qxe,{...i,ref:t}):c.jsx(e0e,{...i,ref:t})})});M8.displayName=Zc;var Qxe=b.forwardRef((e,t)=>{const n=sa(Zc,e.__scopeDialog),r=b.useRef(null),i=ft(t,n.contentRef,r);return b.useEffect(()=>{const o=r.current;if(o)return yI(o)},[]),c.jsx(z8,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Oe(e.onCloseAutoFocus,o=>{o.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:Oe(e.onPointerDownOutside,o=>{const a=o.detail.originalEvent,l=a.button===0&&a.ctrlKey===!0;(a.button===2||l)&&o.preventDefault()}),onFocusOutside:Oe(e.onFocusOutside,o=>o.preventDefault())})}),e0e=b.forwardRef((e,t)=>{const n=sa(Zc,e.__scopeDialog),r=b.useRef(!1),i=b.useRef(!1);return c.jsx(z8,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{e.onCloseAutoFocus?.(o),o.defaultPrevented||(r.current||n.triggerRef.current?.focus(),o.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:o=>{e.onInteractOutside?.(o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const a=o.target;n.triggerRef.current?.contains(a)&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}})}),z8=b.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,...a}=e,l=sa(Zc,n),d=b.useRef(null),f=ft(t,d);return vI(),c.jsxs(c.Fragment,{children:[c.jsx(C0,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o,children:c.jsx(Rf,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":wI(l.open),...a,ref:f,onDismiss:()=>l.onOpenChange(!1)})}),c.jsxs(c.Fragment,{children:[c.jsx(t0e,{titleId:l.titleId}),c.jsx(r0e,{contentRef:d,descriptionId:l.descriptionId})]})]})}),xI="DialogTitle",L8=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=sa(xI,n);return c.jsx(Ge.h2,{id:i.titleId,...r,ref:t})});L8.displayName=xI;var F8="DialogDescription",U8=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=sa(F8,n);return c.jsx(Ge.p,{id:i.descriptionId,...r,ref:t})});U8.displayName=F8;var V8="DialogClose",B8=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=sa(V8,n);return c.jsx(Ge.button,{type:"button",...r,ref:t,onClick:Oe(e.onClick,()=>i.onOpenChange(!1))})});B8.displayName=V8;function wI(e){return e?"open":"closed"}var H8="DialogTitleWarning",[oMe,q8]=_fe(H8,{contentName:Zc,titleName:xI,docsSlug:"dialog"}),t0e=({titleId:e})=>{const t=q8(H8),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
126
+
127
+ If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
128
+
129
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return b.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},n0e="DialogDescriptionWarning",r0e=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${q8(n0e).contentName}}.`;return b.useEffect(()=>{const i=e.current?.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},i0e=N8,o0e=O8,a0e=$8,s0e=P8,l0e=M8,c0e=L8,u0e=U8,d0e=B8;function Dn({...e}){return c.jsx(i0e,{"data-slot":"dialog",...e})}function K8({...e}){return c.jsx(o0e,{"data-slot":"dialog-trigger",...e})}function f0e({...e}){return c.jsx(a0e,{"data-slot":"dialog-portal",...e})}function p0e({className:e,...t}){return c.jsx(s0e,{"data-slot":"dialog-overlay",className:Ve("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black-dark/90",e),...t})}function $n({className:e,children:t,...n}){return c.jsxs(f0e,{"data-slot":"dialog-portal",children:[c.jsx(p0e,{}),c.jsxs(l0e,{"data-slot":"dialog-content",className:Ve("bg-black data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] lg:max-w-2xl max-h-screen overflow-y-auto translate-x-[-50%] translate-y-[-50%] gap-4 rounded-md p-6 shadow-lg duration-200",e),...n,children:[t,c.jsxs(d0e,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[c.jsx(Q4,{className:"text-white"}),c.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function cr({className:e,...t}){return c.jsx("div",{"data-slot":"dialog-header",className:Ve("flex flex-col gap-2 text-center sm:text-left",e),...t})}function Ln({className:e,...t}){return c.jsx("div",{"data-slot":"dialog-footer",className:Ve("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function In({className:e,...t}){return c.jsx(c0e,{"data-slot":"dialog-title",className:Ve("text-lg leading-none text-white font-semibold",e),...t})}function mr({className:e,...t}){return c.jsx(u0e,{"data-slot":"dialog-description",className:Ve("text-muted-foreground text-sm",e),...t})}function Bh({typeOfThingBeingDeleted:e,nameOfThingBeingDeleted:t,isModalOpen:n,hideDataLossWarning:r,setIsModalOpen:i,deletionConfirmed:o,deletionPending:a,trigger:l,presentParticiple:d="Deleting",transitiveVerb:f="Delete"}){return c.jsxs(Dn,{open:n,onOpenChange:i,children:[l&&c.jsx(K8,{asChild:!0,children:l}),c.jsxs($n,{className:"sm:max-w-[750px]",children:[c.jsxs(cr,{children:[c.jsxs(In,{children:["Are you sure you want to ",f.toLowerCase()," this ",e,"?"]}),c.jsx(mr,{children:"This action cannot be undone."})]}),!r&&c.jsxs("div",{className:"p-3 my-5 text-white rounded-md bg-amber-600",children:[c.jsxs("p",{className:"flex space-x-1 font-semibold align-baseline",children:[c.jsx(ere,{className:"inline-block size-5"})," ",c.jsx("span",{children:"Warning"})]}),c.jsxs("p",{className:"pt-2 text-base",children:["By ",d.toLowerCase()," ",e," ",c.jsx("span",{className:"font-semibold",children:t})," ","you will lose the data stored in it permanently."]})]}),c.jsx(Ln,{children:c.jsxs("div",{className:"flex justify-center space-x-5",children:[c.jsxs(he,{className:"rounded-full",onClick:()=>i(!1),children:[c.jsx(Fc,{})," Cancel"]}),c.jsxs(he,{variant:"destructive",className:"rounded-full",onClick:o,disabled:a,children:[c.jsx(aa,{})," ",f]})]})})]})]})}function ra({className:e,variant:t,asChild:n=!1,...r}){const i=n?mE:"span";return c.jsx(i,{"data-slot":"badge",className:Ve(TU({variant:t}),e),...r})}var v1="rovingFocusGroup.onEntryFocus",m0e={bubbles:!1,cancelable:!0},Hh="RovingFocusGroup",[ak,G8,h0e]=uh(Hh),[g0e,zf]=Ti(Hh,[h0e]),[v0e,y0e]=g0e(Hh),Z8=b.forwardRef((e,t)=>c.jsx(ak.Provider,{scope:e.__scopeRovingFocusGroup,children:c.jsx(ak.Slot,{scope:e.__scopeRovingFocusGroup,children:c.jsx(b0e,{...e,ref:t})})}));Z8.displayName=Hh;var b0e=b.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:a,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:d,onEntryFocus:f,preventScrollOnEntryFocus:m=!1,...h}=e,v=b.useRef(null),y=ft(t,v),x=lu(o),[S,C]=Mo({prop:a,defaultProp:l??null,onChange:d,caller:Hh}),[k,E]=b.useState(!1),j=An(f),I=G8(n),A=b.useRef(!1),[T,N]=b.useState(0);return b.useEffect(()=>{const D=v.current;if(D)return D.addEventListener(v1,j),()=>D.removeEventListener(v1,j)},[j]),c.jsx(v0e,{scope:n,orientation:r,dir:x,loop:i,currentTabStopId:S,onItemFocus:b.useCallback(D=>C(D),[C]),onItemShiftTab:b.useCallback(()=>E(!0),[]),onFocusableItemAdd:b.useCallback(()=>N(D=>D+1),[]),onFocusableItemRemove:b.useCallback(()=>N(D=>D-1),[]),children:c.jsx(Ge.div,{tabIndex:k||T===0?-1:0,"data-orientation":r,...h,ref:y,style:{outline:"none",...e.style},onMouseDown:Oe(e.onMouseDown,()=>{A.current=!0}),onFocus:Oe(e.onFocus,D=>{const L=!A.current;if(D.target===D.currentTarget&&L&&!k){const H=new CustomEvent(v1,m0e);if(D.currentTarget.dispatchEvent(H),!H.defaultPrevented){const ee=I().filter(z=>z.focusable),G=ee.find(z=>z.active),K=ee.find(z=>z.id===S),q=[G,K,...ee].filter(Boolean).map(z=>z.ref.current);X8(q,m)}}A.current=!1}),onBlur:Oe(e.onBlur,()=>E(!1))})})}),Y8="RovingFocusGroupItem",W8=b.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:o,children:a,...l}=e,d=Zi(),f=o||d,m=y0e(Y8,n),h=m.currentTabStopId===f,v=G8(n),{onFocusableItemAdd:y,onFocusableItemRemove:x,currentTabStopId:S}=m;return b.useEffect(()=>{if(r)return y(),()=>x()},[r,y,x]),c.jsx(ak.ItemSlot,{scope:n,id:f,focusable:r,active:i,children:c.jsx(Ge.span,{tabIndex:h?0:-1,"data-orientation":m.orientation,...l,ref:t,onMouseDown:Oe(e.onMouseDown,C=>{r?m.onItemFocus(f):C.preventDefault()}),onFocus:Oe(e.onFocus,()=>m.onItemFocus(f)),onKeyDown:Oe(e.onKeyDown,C=>{if(C.key==="Tab"&&C.shiftKey){m.onItemShiftTab();return}if(C.target!==C.currentTarget)return;const k=S0e(C,m.orientation,m.dir);if(k!==void 0){if(C.metaKey||C.ctrlKey||C.altKey||C.shiftKey)return;C.preventDefault();let j=v().filter(I=>I.focusable).map(I=>I.ref.current);if(k==="last")j.reverse();else if(k==="prev"||k==="next"){k==="prev"&&j.reverse();const I=j.indexOf(C.currentTarget);j=m.loop?_0e(j,I+1):j.slice(I+1)}setTimeout(()=>X8(j))}}),children:typeof a=="function"?a({isCurrentTabStop:h,hasTabStop:S!=null}):a})})});W8.displayName=Y8;var x0e={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function w0e(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function S0e(e,t,n){const r=w0e(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return x0e[r]}function X8(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function _0e(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var SI=Z8,_I=W8,sk=["Enter"," "],C0e=["ArrowDown","PageUp","Home"],J8=["ArrowUp","PageDown","End"],k0e=[...C0e,...J8],E0e={ltr:[...sk,"ArrowRight"],rtl:[...sk,"ArrowLeft"]},j0e={ltr:["ArrowLeft"],rtl:["ArrowRight"]},qh="Menu",[Um,R0e,I0e]=uh(qh),[mu,Q8]=Ti(qh,[I0e,Af,zf]),R0=Af(),e9=zf(),[T0e,hu]=mu(qh),[N0e,Kh]=mu(qh),t9=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:o,modal:a=!0}=e,l=R0(t),[d,f]=b.useState(null),m=b.useRef(!1),h=An(o),v=lu(i);return b.useEffect(()=>{const y=()=>{m.current=!0,document.addEventListener("pointerdown",x,{capture:!0,once:!0}),document.addEventListener("pointermove",x,{capture:!0,once:!0})},x=()=>m.current=!1;return document.addEventListener("keydown",y,{capture:!0}),()=>{document.removeEventListener("keydown",y,{capture:!0}),document.removeEventListener("pointerdown",x,{capture:!0}),document.removeEventListener("pointermove",x,{capture:!0})}},[]),c.jsx(rj,{...l,children:c.jsx(T0e,{scope:t,open:n,onOpenChange:h,content:d,onContentChange:f,children:c.jsx(N0e,{scope:t,onClose:b.useCallback(()=>h(!1),[h]),isUsingKeyboardRef:m,dir:v,modal:a,children:r})})})};t9.displayName=qh;var A0e="MenuAnchor",CI=b.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=R0(n);return c.jsx(ij,{...i,...r,ref:t})});CI.displayName=A0e;var kI="MenuPortal",[O0e,n9]=mu(kI,{forceMount:void 0}),r9=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:i}=e,o=hu(kI,t);return c.jsx(O0e,{scope:t,forceMount:n,children:c.jsx(lr,{present:n||o.open,children:c.jsx(ph,{asChild:!0,container:i,children:r})})})};r9.displayName=kI;var Do="MenuContent",[D0e,EI]=mu(Do),i9=b.forwardRef((e,t)=>{const n=n9(Do,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=hu(Do,e.__scopeMenu),a=Kh(Do,e.__scopeMenu);return c.jsx(Um.Provider,{scope:e.__scopeMenu,children:c.jsx(lr,{present:r||o.open,children:c.jsx(Um.Slot,{scope:e.__scopeMenu,children:a.modal?c.jsx($0e,{...i,ref:t}):c.jsx(P0e,{...i,ref:t})})})})}),$0e=b.forwardRef((e,t)=>{const n=hu(Do,e.__scopeMenu),r=b.useRef(null),i=ft(t,r);return b.useEffect(()=>{const o=r.current;if(o)return yI(o)},[]),c.jsx(jI,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Oe(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),P0e=b.forwardRef((e,t)=>{const n=hu(Do,e.__scopeMenu);return c.jsx(jI,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),M0e=Jd("MenuContent.ScrollLock"),jI=b.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:l,onEntryFocus:d,onEscapeKeyDown:f,onPointerDownOutside:m,onFocusOutside:h,onInteractOutside:v,onDismiss:y,disableOutsideScroll:x,...S}=e,C=hu(Do,n),k=Kh(Do,n),E=R0(n),j=e9(n),I=R0e(n),[A,T]=b.useState(null),N=b.useRef(null),D=ft(t,N,C.onContentChange),L=b.useRef(0),H=b.useRef(""),ee=b.useRef(0),G=b.useRef(null),K=b.useRef("right"),B=b.useRef(0),q=x?E0:b.Fragment,z=x?{as:M0e,allowPinchZoom:!0}:void 0,W=ne=>{const $=H.current+ne,P=I().filter(Q=>!Q.disabled),V=document.activeElement,O=P.find(Q=>Q.ref.current===V)?.textValue,X=P.map(Q=>Q.textValue),de=Y0e(X,$,O),ge=P.find(Q=>Q.textValue===de)?.ref.current;(function Q(ve){H.current=ve,window.clearTimeout(L.current),ve!==""&&(L.current=window.setTimeout(()=>Q(""),1e3))})($),ge&&setTimeout(()=>ge.focus())};b.useEffect(()=>()=>window.clearTimeout(L.current),[]),vI();const F=b.useCallback(ne=>K.current===G.current?.side&&X0e(ne,G.current?.area),[]);return c.jsx(D0e,{scope:n,searchRef:H,onItemEnter:b.useCallback(ne=>{F(ne)&&ne.preventDefault()},[F]),onItemLeave:b.useCallback(ne=>{F(ne)||(N.current?.focus(),T(null))},[F]),onTriggerLeave:b.useCallback(ne=>{F(ne)&&ne.preventDefault()},[F]),pointerGraceTimerRef:ee,onPointerGraceIntentChange:b.useCallback(ne=>{G.current=ne},[]),children:c.jsx(q,{...z,children:c.jsx(C0,{asChild:!0,trapped:i,onMountAutoFocus:Oe(o,ne=>{ne.preventDefault(),N.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:c.jsx(Rf,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:f,onPointerDownOutside:m,onFocusOutside:h,onInteractOutside:v,onDismiss:y,children:c.jsx(SI,{asChild:!0,...j,dir:k.dir,orientation:"vertical",loop:r,currentTabStopId:A,onCurrentTabStopIdChange:T,onEntryFocus:Oe(d,ne=>{k.isUsingKeyboardRef.current||ne.preventDefault()}),preventScrollOnEntryFocus:!0,children:c.jsx(oj,{role:"menu","aria-orientation":"vertical","data-state":x9(C.open),"data-radix-menu-content":"",dir:k.dir,...E,...S,ref:D,style:{outline:"none",...S.style},onKeyDown:Oe(S.onKeyDown,ne=>{const P=ne.target.closest("[data-radix-menu-content]")===ne.currentTarget,V=ne.ctrlKey||ne.altKey||ne.metaKey,O=ne.key.length===1;P&&(ne.key==="Tab"&&ne.preventDefault(),!V&&O&&W(ne.key));const X=N.current;if(ne.target!==X||!k0e.includes(ne.key))return;ne.preventDefault();const ge=I().filter(Q=>!Q.disabled).map(Q=>Q.ref.current);J8.includes(ne.key)&&ge.reverse(),G0e(ge)}),onBlur:Oe(e.onBlur,ne=>{ne.currentTarget.contains(ne.target)||(window.clearTimeout(L.current),H.current="")}),onPointerMove:Oe(e.onPointerMove,Vm(ne=>{const $=ne.target,P=B.current!==ne.clientX;if(ne.currentTarget.contains($)&&P){const V=ne.clientX>B.current?"right":"left";K.current=V,B.current=ne.clientX}}))})})})})})})});i9.displayName=Do;var z0e="MenuGroup",RI=b.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return c.jsx(Ge.div,{role:"group",...r,ref:t})});RI.displayName=z0e;var L0e="MenuLabel",o9=b.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return c.jsx(Ge.div,{...r,ref:t})});o9.displayName=L0e;var ub="MenuItem",mP="menu.itemSelect",I0=b.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,o=b.useRef(null),a=Kh(ub,e.__scopeMenu),l=EI(ub,e.__scopeMenu),d=ft(t,o),f=b.useRef(!1),m=()=>{const h=o.current;if(!n&&h){const v=new CustomEvent(mP,{bubbles:!0,cancelable:!0});h.addEventListener(mP,y=>r?.(y),{once:!0}),qy(h,v),v.defaultPrevented?f.current=!1:a.onClose()}};return c.jsx(a9,{...i,ref:d,disabled:n,onClick:Oe(e.onClick,m),onPointerDown:h=>{e.onPointerDown?.(h),f.current=!0},onPointerUp:Oe(e.onPointerUp,h=>{f.current||h.currentTarget?.click()}),onKeyDown:Oe(e.onKeyDown,h=>{const v=l.searchRef.current!=="";n||v&&h.key===" "||sk.includes(h.key)&&(h.currentTarget.click(),h.preventDefault())})})});I0.displayName=ub;var a9=b.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=e,a=EI(ub,n),l=e9(n),d=b.useRef(null),f=ft(t,d),[m,h]=b.useState(!1),[v,y]=b.useState("");return b.useEffect(()=>{const x=d.current;x&&y((x.textContent??"").trim())},[o.children]),c.jsx(Um.ItemSlot,{scope:n,disabled:r,textValue:i??v,children:c.jsx(_I,{asChild:!0,...l,focusable:!r,children:c.jsx(Ge.div,{role:"menuitem","data-highlighted":m?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...o,ref:f,onPointerMove:Oe(e.onPointerMove,Vm(x=>{r?a.onItemLeave(x):(a.onItemEnter(x),x.defaultPrevented||x.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Oe(e.onPointerLeave,Vm(x=>a.onItemLeave(x))),onFocus:Oe(e.onFocus,()=>h(!0)),onBlur:Oe(e.onBlur,()=>h(!1))})})})}),F0e="MenuCheckboxItem",s9=b.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...i}=e;return c.jsx(f9,{scope:e.__scopeMenu,checked:n,children:c.jsx(I0,{role:"menuitemcheckbox","aria-checked":db(n)?"mixed":n,...i,ref:t,"data-state":TI(n),onSelect:Oe(i.onSelect,()=>r?.(db(n)?!0:!n),{checkForDefaultPrevented:!1})})})});s9.displayName=F0e;var l9="MenuRadioGroup",[U0e,V0e]=mu(l9,{value:void 0,onValueChange:()=>{}}),c9=b.forwardRef((e,t)=>{const{value:n,onValueChange:r,...i}=e,o=An(r);return c.jsx(U0e,{scope:e.__scopeMenu,value:n,onValueChange:o,children:c.jsx(RI,{...i,ref:t})})});c9.displayName=l9;var u9="MenuRadioItem",d9=b.forwardRef((e,t)=>{const{value:n,...r}=e,i=V0e(u9,e.__scopeMenu),o=n===i.value;return c.jsx(f9,{scope:e.__scopeMenu,checked:o,children:c.jsx(I0,{role:"menuitemradio","aria-checked":o,...r,ref:t,"data-state":TI(o),onSelect:Oe(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});d9.displayName=u9;var II="MenuItemIndicator",[f9,B0e]=mu(II,{checked:!1}),p9=b.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...i}=e,o=B0e(II,n);return c.jsx(lr,{present:r||db(o.checked)||o.checked===!0,children:c.jsx(Ge.span,{...i,ref:t,"data-state":TI(o.checked)})})});p9.displayName=II;var H0e="MenuSeparator",m9=b.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return c.jsx(Ge.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});m9.displayName=H0e;var q0e="MenuArrow",h9=b.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=R0(n);return c.jsx(aj,{...i,...r,ref:t})});h9.displayName=q0e;var K0e="MenuSub",[aMe,g9]=mu(K0e),lm="MenuSubTrigger",v9=b.forwardRef((e,t)=>{const n=hu(lm,e.__scopeMenu),r=Kh(lm,e.__scopeMenu),i=g9(lm,e.__scopeMenu),o=EI(lm,e.__scopeMenu),a=b.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:d}=o,f={__scopeMenu:e.__scopeMenu},m=b.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return b.useEffect(()=>m,[m]),b.useEffect(()=>{const h=l.current;return()=>{window.clearTimeout(h),d(null)}},[l,d]),c.jsx(CI,{asChild:!0,...f,children:c.jsx(a9,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":i.contentId,"data-state":x9(n.open),...e,ref:Sf(t,i.onTriggerChange),onClick:h=>{e.onClick?.(h),!(e.disabled||h.defaultPrevented)&&(h.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Oe(e.onPointerMove,Vm(h=>{o.onItemEnter(h),!h.defaultPrevented&&!e.disabled&&!n.open&&!a.current&&(o.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{n.onOpenChange(!0),m()},100))})),onPointerLeave:Oe(e.onPointerLeave,Vm(h=>{m();const v=n.content?.getBoundingClientRect();if(v){const y=n.content?.dataset.side,x=y==="right",S=x?-5:5,C=v[x?"left":"right"],k=v[x?"right":"left"];o.onPointerGraceIntentChange({area:[{x:h.clientX+S,y:h.clientY},{x:C,y:v.top},{x:k,y:v.top},{x:k,y:v.bottom},{x:C,y:v.bottom}],side:y}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(h),h.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:Oe(e.onKeyDown,h=>{const v=o.searchRef.current!=="";e.disabled||v&&h.key===" "||E0e[r.dir].includes(h.key)&&(n.onOpenChange(!0),n.content?.focus(),h.preventDefault())})})})});v9.displayName=lm;var y9="MenuSubContent",b9=b.forwardRef((e,t)=>{const n=n9(Do,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=hu(Do,e.__scopeMenu),a=Kh(Do,e.__scopeMenu),l=g9(y9,e.__scopeMenu),d=b.useRef(null),f=ft(t,d);return c.jsx(Um.Provider,{scope:e.__scopeMenu,children:c.jsx(lr,{present:r||o.open,children:c.jsx(Um.Slot,{scope:e.__scopeMenu,children:c.jsx(jI,{id:l.contentId,"aria-labelledby":l.triggerId,...i,ref:f,align:"start",side:a.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:m=>{a.isUsingKeyboardRef.current&&d.current?.focus(),m.preventDefault()},onCloseAutoFocus:m=>m.preventDefault(),onFocusOutside:Oe(e.onFocusOutside,m=>{m.target!==l.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:Oe(e.onEscapeKeyDown,m=>{a.onClose(),m.preventDefault()}),onKeyDown:Oe(e.onKeyDown,m=>{const h=m.currentTarget.contains(m.target),v=j0e[a.dir].includes(m.key);h&&v&&(o.onOpenChange(!1),l.trigger?.focus(),m.preventDefault())})})})})})});b9.displayName=y9;function x9(e){return e?"open":"closed"}function db(e){return e==="indeterminate"}function TI(e){return db(e)?"indeterminate":e?"checked":"unchecked"}function G0e(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Z0e(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Y0e(e,t,n){const i=t.length>1&&Array.from(t).every(f=>f===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=Z0e(e,Math.max(o,0));i.length===1&&(a=a.filter(f=>f!==n));const d=a.find(f=>f.toLowerCase().startsWith(i.toLowerCase()));return d!==n?d:void 0}function W0e(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,a=t.length-1;o<t.length;a=o++){const l=t[o],d=t[a],f=l.x,m=l.y,h=d.x,v=d.y;m>r!=v>r&&n<(h-f)*(r-m)/(v-m)+f&&(i=!i)}return i}function X0e(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return W0e(n,t)}function Vm(e){return t=>t.pointerType==="mouse"?e(t):void 0}var J0e=t9,Q0e=CI,ewe=r9,twe=i9,nwe=RI,rwe=o9,iwe=I0,owe=s9,awe=c9,swe=d9,lwe=p9,cwe=m9,uwe=h9,dwe=v9,fwe=b9,T0="DropdownMenu",[pwe]=Ti(T0,[Q8]),ri=Q8(),[mwe,w9]=pwe(T0),S9=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:o,onOpenChange:a,modal:l=!0}=e,d=ri(t),f=b.useRef(null),[m,h]=Mo({prop:i,defaultProp:o??!1,onChange:a,caller:T0});return c.jsx(mwe,{scope:t,triggerId:Zi(),triggerRef:f,contentId:Zi(),open:m,onOpenChange:h,onOpenToggle:b.useCallback(()=>h(v=>!v),[h]),modal:l,children:c.jsx(J0e,{...d,open:m,onOpenChange:h,dir:r,modal:l,children:n})})};S9.displayName=T0;var _9="DropdownMenuTrigger",C9=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,o=w9(_9,n),a=ri(n);return c.jsx(Q0e,{asChild:!0,...a,children:c.jsx(Ge.button,{type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...i,ref:Sf(t,o.triggerRef),onPointerDown:Oe(e.onPointerDown,l=>{!r&&l.button===0&&l.ctrlKey===!1&&(o.onOpenToggle(),o.open||l.preventDefault())}),onKeyDown:Oe(e.onKeyDown,l=>{r||(["Enter"," "].includes(l.key)&&o.onOpenToggle(),l.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())})})})});C9.displayName=_9;var hwe="DropdownMenuPortal",k9=e=>{const{__scopeDropdownMenu:t,...n}=e,r=ri(t);return c.jsx(ewe,{...r,...n})};k9.displayName=hwe;var E9="DropdownMenuContent",j9=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=w9(E9,n),o=ri(n),a=b.useRef(!1);return c.jsx(twe,{id:i.contentId,"aria-labelledby":i.triggerId,...o,...r,ref:t,onCloseAutoFocus:Oe(e.onCloseAutoFocus,l=>{a.current||i.triggerRef.current?.focus(),a.current=!1,l.preventDefault()}),onInteractOutside:Oe(e.onInteractOutside,l=>{const d=l.detail.originalEvent,f=d.button===0&&d.ctrlKey===!0,m=d.button===2||f;(!i.modal||m)&&(a.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});j9.displayName=E9;var gwe="DropdownMenuGroup",vwe=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=ri(n);return c.jsx(nwe,{...i,...r,ref:t})});vwe.displayName=gwe;var ywe="DropdownMenuLabel",R9=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=ri(n);return c.jsx(rwe,{...i,...r,ref:t})});R9.displayName=ywe;var bwe="DropdownMenuItem",I9=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=ri(n);return c.jsx(iwe,{...i,...r,ref:t})});I9.displayName=bwe;var xwe="DropdownMenuCheckboxItem",T9=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=ri(n);return c.jsx(owe,{...i,...r,ref:t})});T9.displayName=xwe;var wwe="DropdownMenuRadioGroup",Swe=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=ri(n);return c.jsx(awe,{...i,...r,ref:t})});Swe.displayName=wwe;var _we="DropdownMenuRadioItem",Cwe=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=ri(n);return c.jsx(swe,{...i,...r,ref:t})});Cwe.displayName=_we;var kwe="DropdownMenuItemIndicator",N9=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=ri(n);return c.jsx(lwe,{...i,...r,ref:t})});N9.displayName=kwe;var Ewe="DropdownMenuSeparator",A9=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=ri(n);return c.jsx(cwe,{...i,...r,ref:t})});A9.displayName=Ewe;var jwe="DropdownMenuArrow",Rwe=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=ri(n);return c.jsx(uwe,{...i,...r,ref:t})});Rwe.displayName=jwe;var Iwe="DropdownMenuSubTrigger",Twe=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=ri(n);return c.jsx(dwe,{...i,...r,ref:t})});Twe.displayName=Iwe;var Nwe="DropdownMenuSubContent",Awe=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=ri(n);return c.jsx(fwe,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Awe.displayName=Nwe;var Owe=S9,Dwe=C9,$we=k9,Pwe=j9,Mwe=R9,zwe=I9,Lwe=T9,Fwe=N9,Uwe=A9;function Gh({...e}){return c.jsx(Owe,{"data-slot":"dropdown-menu",...e})}function Zh({...e}){return c.jsx(Dwe,{"data-slot":"dropdown-menu-trigger",...e})}function Yh({className:e,sideOffset:t=4,...n}){return c.jsx($we,{children:c.jsx(Pwe,{"data-slot":"dropdown-menu-content",sideOffset:t,className:Ve("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border border-grey-700 p-1 shadow-md",e),...n})})}function jr({className:e,inset:t,variant:n="default",...r}){return c.jsx(zwe,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:Ve("focus:bg-accent focus:text-grey data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r})}function Vwe({className:e,children:t,checked:n,...r}){return c.jsxs(Lwe,{"data-slot":"dropdown-menu-checkbox-item",className:Ve("focus:bg-primary relative flex cursor-pointer items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),checked:n,...r,children:[c.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:c.jsx(Fwe,{children:c.jsx(hE,{className:"size-4"})})}),t]})}function ym({className:e,inset:t,...n}){return c.jsx(Mwe,{"data-slot":"dropdown-menu-label","data-inset":t,className:Ve("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",e),...n})}function Bm({className:e,...t}){return c.jsx(Uwe,{"data-slot":"dropdown-menu-separator",className:Ve("bg-grey-700 -mx-1 my-1 h-px",e),...t})}function Wh(e){return!!e?.plans?.[0]?.planId?.startsWith("self-hosted")}function NI({cluster:e}){const t=_s(e.id),{view:n,update:r}=vx(e.organizationId,e.id),o=!Ct.checkForFabricConnect(e.id)&&!!t.user;if(n){if(!e.fqdn)return c.jsx(Ye,{to:`/${e.organizationId}/${e.id}/instances`,className:"text-sm text-nowrap","aria-label":`View ${e.name}`,title:`View ${e.name}`,children:c.jsxs("span",{className:"py-2 hover:border-b-2",children:["Instances ",c.jsx(wi,{className:"inline-block"})]})});if(e.resetPassword)return r?c.jsx(Ye,{to:`/${e.organizationId}/${e.id}/finish-setup`,className:"text-sm text-nowrap","aria-label":`Set Password on ${e.name}`,title:`Set Password on ${e.name}`,children:c.jsxs(he,{variant:"positive",className:"py-2 hover:border-b-2 animate-glow-pulse",children:["Finish Setup ",c.jsx(wi,{className:"inline-block"})]})}):c.jsx("span",{className:"py-2 text-nowrap",children:"Pending Owner Setup"});if(!t.isLoading)return o?c.jsx(Ye,{to:`/${e.organizationId}/${e.id}${Ea}`,className:"text-sm text-nowrap","aria-label":`View ${e.name}`,title:`View ${e.name}`,children:c.jsxs("span",{className:"py-2 hover:border-b-2",children:["Direct Connect ",c.jsx(wi,{className:"inline-block"})]})}):r&&!Wh(e)?c.jsx(Ye,{to:`/${e.organizationId}/${e.id}${Ea}`,className:"text-sm text-nowrap","aria-label":`Connect to ${e.name}`,title:`Connect to ${e.name}`,children:c.jsxs("span",{className:"py-2 hover:border-b-2",children:["Fabric Connect ",c.jsx(wi,{className:"inline-block"})]})}):c.jsx(Ye,{to:`/${e.organizationId}/${e.id}/sign-in`,className:"text-sm text-nowrap","aria-label":`Sign In to ${e.name}`,title:`Sign In to ${e.name}`,children:c.jsxs("span",{className:"py-2 hover:border-b-2",children:["Direct Sign In ",c.jsx(wi,{className:"inline-block"})]})})}}function Bwe(e,t){const n=[];if(e)for(const r of e)n.push(r[t]);return n}function Hm({cluster:e,forceProgressBarVisible:t}){const[n,r]=b.useState(t||!1),{data:i}=Dt(Aa(n&&e.id,2e3));b.useEffect(function(){(nk(e.status)||rk(e.status))&&r(!0)},[n,e.status,i?.instances]);const o=b.useMemo(()=>{const a=Bwe(i?.plans??[],"planId"),l=i?.instances??[];let d=0;const f={};let m=0;const h={};let v=0;const y={};let x=0;const S={};for(const k of l){const E=k.status;!E||gI(E)||(nk(E)?(d+=1,f[E]=`${d} ${Eo(E)}`):rk(E)?(m+=1,h[E]=`${m} ${Eo(E)}`):Vh(E)?(x+=1,S[E]=`${x} ${Eo(E)}`):!k.planId||!a.includes(k.planId)?(m+=1,h.DRAINING_TRAFFIC=`${m} ${Eo("Draining Traffic")}`):hI(E)&&(v+=1,y[E]=`${v} ${Eo(E)}`))}const C=d+m+v;return{pendingWidth:`${C===0?100:d===0?0:d/C*100}%`,updatingWidth:`${m===0?0:m/C*100}%`,failedWidth:`${x===0?0:x/C*100}%`,runningWidth:`${v===0?0:v/C*100}%`,text:[...Object.values(y).sort(),...Object.values(S).sort(),...Object.values(h).sort(),...Object.values(f).sort()].join(" · ")}},[i]);return n?c.jsxs("div",{className:"w-full text-center",children:[c.jsxs("div",{className:"w-full h-2.5 rounded-full overflow-clip flex shadow",children:[c.jsx("div",{style:{width:o.runningWidth},className:"grow bg-green/80 transition-[width] duration-1000 ease-in-out motion-reduce:transition-none"}),c.jsx("div",{style:{width:o.failedWidth},className:"grow bg-red/80 transition-[width] duration-1000 ease-in-out motion-reduce:transition-none"}),c.jsx("div",{style:{width:o.updatingWidth},className:"grow animate-pulse bg-yellow/80 transition-[width] duration-1000 ease-in-out motion-reduce:transition-none"}),c.jsx("div",{style:{width:o.pendingWidth},className:"grow bg-gray-600 transition-[width] duration-1000 ease-in-out motion-reduce:transition-none"})]}),o.text&&c.jsx("div",{className:"text-xs text-muted-foreground font-light mt-2",children:o.text})]}):null}async function O9(e){const{data:t}=await $t.delete(`/Cluster/${e}`,{timeout:0});return t}function Hwe(){return ot({mutationFn:e=>O9(e)})}function Xh(...e){return b.useMemo(()=>e.map(t=>(()=>{navigator.clipboard.writeText(t),ye.info("Copied to clipboard!",{icon:c.jsx(kte,{}),duration:1e3})})),e)}function Jh(e){try{return e==="null"||e==="undefined"||e===null||e===void 0?null:JSON.parse(e)}catch(t){return console.error("safeParse failed to parse value, returning null instead",t),null}}function qwe(e,t){return Jh(localStorage.getItem(e))??t}function Kwe(e,t){t==null?localStorage.removeItem(e):localStorage.setItem(e,JSON.stringify(t))}function Lf(e,t){const n=b.useState(qwe(e,t)),[r]=n;return b.useEffect(()=>Kwe(e,r),[e,r]),n}var gu=(e=>(e.SavedClusterState="SavedClusterState",e))(gu||{});function Gwe({cluster:e}){const t=_n(),n=sr(),r=b.useMemo(()=>oE(e),[e]),i=dh(r),o=_s(e.id),[,a]=Lf(gu.SavedClusterState,null),{view:l,update:d,remove:f,create:m}=vx(e.organizationId,e.id),{mutate:h,isPending:v}=Hwe(),[y,x]=b.useState(!1),[S,C]=b.useState(!1),k=b.useMemo(()=>e.status&&Tx.includes(e.status),[e.status]),E=Wh(e),j=Ct.checkForFabricConnect(e.id),I=!j&&!!o.user,A=b.useMemo(()=>e.status&&yj.includes(e.status),[e.status]),T=b.useMemo(()=>e.status&&Vh(e.status),[e.status]),N=b.useCallback(async()=>{x(!0);const z=await bj(e.id).catch(W=>(console.error("Failed to lookup cluster details, proceeding without checking instances.",W),null));if(await rh({entityId:e.id,instanceClient:i}),z?.instances?.length)for(const W of z.instances)Ct.setUserForEntity(W,null);Ct.setUserForEntity(e,null)},[e,i]),D=b.useCallback(()=>{a(e),t.navigate({to:`/${e.organizationId}/new-cluster`})},[e,t,a]),L=b.useCallback(()=>C(!0),[]),H=b.useCallback(()=>{const z=e.organizationId;h(e.id,{onSuccess:async()=>{await n.invalidateQueries({queryKey:[z],refetchType:"active"}),await t.invalidate(),ye.success("Success",{description:E?"Cluster successfully removed.":"Cluster successfully terminated.",duration:5e3,action:{label:"Dismiss",onClick:()=>ye.dismiss()}}),C(!1)},onError:()=>{ye.error("Error",{description:E?`Failed to remove cluster: ${e.name}`:`Failed to terminate cluster: ${e.name}.`,duration:5e3,action:{label:"Dismiss",onClick:()=>ye.dismiss()}}),C(!1)}})},[t,e.organizationId,e.id,e.name,h,E,n]),ee=e.domains?.[0]?.domain||e.fqdn,[G,K]=Xh(`${ee}`,`https://${ee}`),B=[k&&d&&!o.isLoading&&(!I||j)&&c.jsx(Ye,{to:`${e.id}/sign-in`,disabled:y,children:c.jsxs(jr,{children:[c.jsx(q4,{className:"text-green"})," Direct Sign In"]})},"sign-in"),k&&d&&c.jsx(Ye,{to:`${e.id}/edit`,disabled:y,children:c.jsxs(jr,{children:[c.jsx(Une,{className:"text-purple-600"})," Edit Scaling"]})},"edit"),k&&d&&!ml,k&&l&&c.jsx(Ye,{to:`${e.id}/instances`,disabled:y,children:c.jsxs(jr,{children:[c.jsx(X4,{className:"text-orange-300"})," Instances"]})},"instances"),k&&l&&e.fqdn&&c.jsxs(jr,{onClick:G,disabled:y,children:[c.jsx(p$,{})," Copy Host Name"]},"copy-host-name"),k&&l&&e.fqdn&&c.jsxs(jr,{onClick:K,disabled:y,children:[c.jsx(p$,{})," Copy API URL"]},"copy-api-url"),k&&l&&!!r&&!o.isLoading&&I&&c.jsx(jr,{onClick:N,disabled:y,children:"Direct Sign Out"},"direct-sign-out"),T&&m&&c.jsx(jr,{className:"focus:bg-green/70 focus:text-white",onClick:D,children:"Try Again"},"try-again"),!A&&f&&c.jsxs(c.Fragment,{children:[k&&c.jsx(Bm,{}),c.jsxs(jr,{className:"focus:bg-red/70 focus:text-white",onClick:L,children:[c.jsx(aa,{className:"text-red-300"})," ",E?"Remove":"Terminate"]},"remove")]})].filter(Lo),q=5;return c.jsxs(Lc,{className:"relative h-full justify-between",children:[c.jsxs(Ol,{children:[c.jsxs(nu,{className:"flex items-center justify-between",children:[ee?c.jsxs(c.Fragment,{children:[c.jsx("span",{className:"truncate max-w-48",children:ee}),c.jsx(Uc,{onClick:G,size:16,className:"cursor-pointer"}),c.jsx("span",{className:"grow"})]}):c.jsx("span",{children:"Self-Hosted"}),!A&&c.jsxs(Gh,{children:[c.jsx(Zh,{children:c.jsx(gE,{"aria-label":"Cluster options"})}),c.jsxs(Yh,{children:[...B,!T&&c.jsxs(c.Fragment,{children:[B.length>0&&c.jsx(Bm,{}),c.jsx(ym,{className:"text-gray-600 text-xs",children:"Plans"}),e.plans?.slice(0,q)?.map(z=>c.jsxs(ym,{children:[z.planId," / ",z.regionId,c.jsx("br",{}),"Auto Renewal ",c.jsx(ra,{variant:"success",children:"ON"})]},z.planId+z.regionId)),!!e.plans?.length&&e.plans?.length>q&&c.jsxs(ym,{className:"italic text-muted-foreground",children:[e.plans.length-q," additional plans"]})]})]})]})]}),c.jsx(Dl,{children:c.jsx("h2",{children:e.name})})]}),c.jsxs(Cs,{className:"flex items-center justify-between gap-2",children:[c.jsx(Hm,{cluster:e}),k&&l&&c.jsx(NI,{cluster:e}),T&&e.status&&c.jsxs(c.Fragment,{children:[c.jsx(ra,{variant:x8(e.status),children:Eo(e.status)}),c.jsx("span",{className:"text-xs",children:'Click "..." to choose how to proceed.'})]})]}),c.jsx(Bh,{typeOfThingBeingDeleted:"cluster",transitiveVerb:E?"Remove":"Terminate",presentParticiple:E?"Removing":"Terminating",nameOfThingBeingDeleted:e.name,isModalOpen:S,hideDataLossWarning:E,setIsModalOpen:z=>C(z),deletionConfirmed:H,deletionPending:v})]})}function Il({overEmail:e}){return c.jsx("a",{href:e?"mailto:support@harperdb.io":"https://discord.com/channels/1415002037439041710/1415002038286286994",target:"_blank",rel:"noreferrer",className:"underline",children:"Contact us"})}function ao({className:e,text:t,centered:n,...r}){const i=n?"flex flex-col items-center justify-center":"";return c.jsxs("div",{className:`text-white h-full w-full ${e||""} ${i}`,...r,children:[c.jsx("img",{src:"/HDBDogOnly.svg",width:"100px",height:"100px",alt:"HDB Dog Logo Loading",className:"inline-block"}),c.jsx("p",{className:"pt-4",children:t||"Loading..."})]})}function Kv({children:e}){return c.jsxs(c.Fragment,{children:[c.jsx(Es,{}),c.jsx("div",{className:"mt-32 px-4 pt-4 md:px-12 min-h-[calc(100vh-theme(spacing.32))] relative",children:e})]})}async function Zwe(e){const{data:t}=await $t.get("/Plan/",{params:{organizationId:e}});return t}function Ywe(e){return{queryKey:[e,"instancePlan"],queryFn:()=>Zwe(e),retry:!1}}async function Wwe({organizationId:e,availableHosts:t}={}){const{data:n}=await $t.get("/Region/",{params:{availableHosts:t,organizationId:e}});return n}function hP({organizationId:e,availableHosts:t}={}){return{queryKey:[e,"regionLocations",t],queryFn:()=>Wwe({organizationId:e,availableHosts:t}),retry:!1}}function lk(e){return(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1}function gP(e){const t=e.split(".").map(Number);return(t[0]<<24|t[1]<<16|t[2]<<8|t[3])>>>0}function vP(e){return typeof e!="string"?!1:/^(?:25[0-5]|2[0-4]\d|1?\d?\d)(?:\.(?:25[0-5]|2[0-4]\d|1?\d?\d)){3}$/.test(e)}function D9(e,t){return e.instanceFqdn===t.instanceFqdn?e.operationsApiPort-t.operationsApiPort:vP(e.instanceFqdn)&&vP(t.instanceFqdn)?gP(e.instanceFqdn)-gP(t.instanceFqdn):e.instanceFqdn>t.instanceFqdn?1:-1}function Xwe(e,t){const n={};for(const r of e){const i=r[t];if(i!==void 0)if(Array.isArray(i))for(const o of i)n[o]||(n[o]=[]),n[o].push(r);else n[i]||(n[i]=[]),n[i].push(r)}return n}function Qh(e,t){const n={};for(const r of e){const i=r[t];if(i!==void 0)if(Array.isArray(i))for(const o of i)n[o]=r;else n[i]=r}return n}function ck(e,t,n){const r=Xwe(e,t),i={};for(const o in r)i[o]=Qh(r[o],n);return i}function qm({width:e,className:t,animated:n,placeholder:r}){return c.jsxs("div",{className:xr("w-full bg-gray-200 rounded-full relative",r?"h-6":"h-2.5"),children:[r&&c.jsx("div",{className:"absolute top-0 h-full w-full font-bold text-xs flex flex-col items-center justify-center text-black/60 text-shadow-2xs",children:r}),c.jsx("div",{className:xr("rounded-full",r?"h-6":"h-2.5",!t?.includes("bg-")&&"bg-purple/40",n&&"transition-[width] duration-1000 ease-in-out motion-reduce:transition-none",t),style:{width:e}})]})}function Jwe({duration:e,message:t,lateMessage:n}){const r=b.useRef(0),i=b.useRef(0),[o,a]=b.useState(!1),l=5,[d,f]=b.useState(`${l}%`),m=b.useCallback(function h(v){i.current||(i.current=v);const y=v-i.current,x=Math.min(y/e,1);f(Math.max(l,x*100)+"%"),x<1?r.current=requestAnimationFrame(h):a(!0)},[e]);return b.useEffect(()=>(r.current=requestAnimationFrame(m),()=>cancelAnimationFrame(r.current)),[m]),c.jsxs(c.Fragment,{children:[o?n:t,c.jsx(qm,{width:d,animated:!1})]})}async function Qwe(e){const{data:t}=await $t.post("/Cluster/",e,{timeout:0});return t}function eSe(){return ot({mutationFn:e=>Qwe(e)})}async function tSe(e){const{data:t}=await $t.put(`/Cluster/${e.id}`,{regionPlans:e.regionPlans},{timeout:0});return t}function nSe(){return ot({mutationFn:e=>tSe(e)})}async function $9(e){const{data:t}=await $t.get(`/Organization/${e}`);return t}function vu(e){return{queryKey:[e],queryFn:()=>$9(e),retry:!1,refetchInterval:1e4}}const Km="ENTERPRISE";function P9(e,t){if(t<=0)return"";if(e.length<=t)return e;const n=e.split("-");if(n.length===1)return n[0].slice(0,t);const r=[n[0],...n.slice(1).map(d=>d.charAt(0))],i=r.join("-");if(i.length<=t)return i;const o=r.slice(1).join("").length,a=r.length-1,l=t-o-a;if(l>0)return r[0]=r[0].slice(0,l),r.join("-");{const d=[];let f=0;t>0&&(d.push(n[0].charAt(0)),f=1);for(let m=1;m<r.length&&f+2<=t;m++)d.push(r[m]),f+=2;return d.join("-")}}function rSe(e,t,n="-"){const r=t.split(n)[0];return e.findIndex(i=>i.startsWith(r))!==-1}function N0(e){return e.replace(/[^a-zA-Z0-9]/g,"-").replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase().replace(/-+/g,"-").replace(/^-+|-+$/g,"")}async function iSe(e){await $t.put("/Payment/",e)}function oSe(){return ot({mutationFn:e=>iSe(e)})}function M9(e){const{mutate:t}=oSe();return b.useCallback((n,r)=>{t({paymentMethodId:typeof n=="string"?n:n.id,organizationId:e},{onSuccess:()=>{ye.success("Success! Your payment method has been saved."),r(!0)},onError:()=>{ye.error("Failed to process payment method details. Please try another payment method."),r(!1)}})},[t,e])}const aSe=b.createContext(null);function sSe(){return b.useContext(aSe)}var y1={exports:{}},b1,yP;function lSe(){if(yP)return b1;yP=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return b1=e,b1}var x1,bP;function cSe(){if(bP)return x1;bP=1;var e=lSe();function t(){}function n(){}return n.resetWarningCache=t,x1=function(){function r(a,l,d,f,m,h){if(h!==e){var v=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw v.name="Invariant Violation",v}}r.isRequired=r;function i(){return r}var o={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return o.PropTypes=o,o},x1}var xP;function uSe(){return xP||(xP=1,y1.exports=cSe()()),y1.exports}var dSe=uSe();const et=hf(dSe);function wP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function SP(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?wP(Object(n),!0).forEach(function(r){z9(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wP(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ey(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ey=function(t){return typeof t}:Ey=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ey(e)}function z9(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fSe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function pSe(e,t){if(e==null)return{};var n=fSe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function mSe(e,t){return hSe(e)||gSe(e,t)||vSe(e,t)||ySe()}function hSe(e){if(Array.isArray(e))return e}function gSe(e,t){var n=e&&(typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"]);if(n!=null){var r=[],i=!0,o=!1,a,l;try{for(n=n.call(e);!(i=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));i=!0);}catch(d){o=!0,l=d}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw l}}return r}}function vSe(e,t){if(e){if(typeof e=="string")return _P(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _P(e,t)}}function _P(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ySe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
130
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Gr=function(t,n,r){var i=!!r,o=J.useRef(r);J.useEffect(function(){o.current=r},[r]),J.useEffect(function(){if(!i||!t)return function(){};var a=function(){o.current&&o.current.apply(o,arguments)};return t.on(n,a),function(){t.off(n,a)}},[i,n,t,o])},bSe=function(t){var n=J.useRef(t);return J.useEffect(function(){n.current=t},[t]),n.current},fb=function(t){return t!==null&&Ey(t)==="object"},CP="[object Object]",xSe=function e(t,n){if(!fb(t)||!fb(n))return t===n;var r=Array.isArray(t),i=Array.isArray(n);if(r!==i)return!1;var o=Object.prototype.toString.call(t)===CP,a=Object.prototype.toString.call(n)===CP;if(o!==a)return!1;if(!o&&!r)return t===n;var l=Object.keys(t),d=Object.keys(n);if(l.length!==d.length)return!1;for(var f={},m=0;m<l.length;m+=1)f[l[m]]=!0;for(var h=0;h<d.length;h+=1)f[d[h]]=!0;var v=Object.keys(f);if(v.length!==l.length)return!1;var y=t,x=n,S=function(k){return e(y[k],x[k])};return v.every(S)},wSe=function(t,n,r){return fb(t)?Object.keys(t).reduce(function(i,o){var a=!fb(n)||!xSe(t[o],n[o]);return r.includes(o)?(a&&console.warn("Unsupported prop change: options.".concat(o," is not a mutable property.")),i):a?SP(SP({},i||{}),{},z9({},o,t[o])):i},null):null},AI=J.createContext(null);AI.displayName="ElementsContext";var L9=function(t,n){if(!t)throw new Error("Could not find Elements context; You need to wrap the part of your app that ".concat(n," in an <Elements> provider."));return t};et.any,et.object;var SSe=function(t){var n=J.useContext(AI);return L9(n,t)},_Se=function(){var t=SSe("calls useElements()"),n=t.elements;return n};et.func.isRequired;var F9=J.createContext(null);F9.displayName="CheckoutContext";et.any,et.shape({clientSecret:et.oneOfType([et.string,et.instanceOf(Promise)]).isRequired,elementsOptions:et.object}).isRequired;var uk=function(t){var n=J.useContext(F9),r=J.useContext(AI);if(n){if(r)throw new Error("You cannot wrap the part of your app that ".concat(t," in both <CheckoutProvider> and <Elements> providers."));return n}else return L9(r,t)},CSe=["mode"],kSe=function(t){return t.charAt(0).toUpperCase()+t.slice(1)},Ni=function(t,n){var r="".concat(kSe(t),"Element"),i=function(d){var f=d.id,m=d.className,h=d.options,v=h===void 0?{}:h,y=d.onBlur,x=d.onFocus,S=d.onReady,C=d.onChange,k=d.onEscape,E=d.onClick,j=d.onLoadError,I=d.onLoaderStart,A=d.onNetworksChange,T=d.onConfirm,N=d.onCancel,D=d.onShippingAddressChange,L=d.onShippingRateChange,H=d.onSavedPaymentMethodRemove,ee=d.onSavedPaymentMethodUpdate,G=uk("mounts <".concat(r,">")),K="elements"in G?G.elements:null,B="checkoutState"in G?G.checkoutState:null,q=B?.type==="success"||B?.type==="loading"?B.sdk:null,z=J.useState(null),W=mSe(z,2),F=W[0],ne=W[1],$=J.useRef(null),P=J.useRef(null);Gr(F,"blur",y),Gr(F,"focus",x),Gr(F,"escape",k),Gr(F,"click",E),Gr(F,"loaderror",j),Gr(F,"loaderstart",I),Gr(F,"networkschange",A),Gr(F,"confirm",T),Gr(F,"cancel",N),Gr(F,"shippingaddresschange",D),Gr(F,"shippingratechange",L),Gr(F,"savedpaymentmethodremove",H),Gr(F,"savedpaymentmethodupdate",ee),Gr(F,"change",C);var V;S&&(t==="expressCheckout"?V=S:V=function(){S(F)}),Gr(F,"ready",V),J.useLayoutEffect(function(){if($.current===null&&P.current!==null&&(K||q)){var X=null;if(q)switch(t){case"paymentForm":X=q.createPaymentFormElement(v);break;case"payment":X=q.createPaymentElement(v);break;case"address":if("mode"in v){var de=v.mode,ge=pSe(v,CSe);if(de==="shipping")X=q.createShippingAddressElement(ge);else if(de==="billing")X=q.createBillingAddressElement(ge);else throw new Error("Invalid options.mode. mode must be 'billing' or 'shipping'.")}else throw new Error("You must supply options.mode. mode must be 'billing' or 'shipping'.");break;case"expressCheckout":X=q.createExpressCheckoutElement(v);break;case"currencySelector":X=q.createCurrencySelectorElement();break;case"taxId":X=q.createTaxIdElement(v);break;default:throw new Error("Invalid Element type ".concat(r,". You must use either the <PaymentElement />, <AddressElement options={{mode: 'shipping'}} />, <AddressElement options={{mode: 'billing'}} />, or <ExpressCheckoutElement />."))}else K&&(X=K.create(t,v));$.current=X,ne(X),X&&X.mount(P.current)}},[K,q,v]);var O=bSe(v);return J.useEffect(function(){if($.current){var X=wSe(v,O,["paymentRequest"]);X&&"update"in $.current&&$.current.update(X)}},[v,O]),J.useLayoutEffect(function(){return function(){if($.current&&typeof $.current.destroy=="function")try{$.current.destroy(),$.current=null}catch{}}},[]),J.createElement("div",{id:f,className:m,ref:P})},o=function(d){uk("mounts <".concat(r,">"));var f=d.id,m=d.className;return J.createElement("div",{id:f,className:m})},a=n?o:i;return a.propTypes={id:et.string,className:et.string,onChange:et.func,onBlur:et.func,onFocus:et.func,onReady:et.func,onEscape:et.func,onClick:et.func,onLoadError:et.func,onLoaderStart:et.func,onNetworksChange:et.func,onConfirm:et.func,onCancel:et.func,onShippingAddressChange:et.func,onShippingRateChange:et.func,onSavedPaymentMethodRemove:et.func,onSavedPaymentMethodUpdate:et.func,options:et.object},a.displayName=r,a.__elementType=t,a},Ai=typeof window>"u",ESe=J.createContext(null);ESe.displayName="EmbeddedCheckoutProviderContext";var U9=function(){var t=uk("calls useStripe()"),n=t.stripe;return n};Ni("auBankAccount",Ai);Ni("card",Ai);Ni("cardNumber",Ai);Ni("cardExpiry",Ai);Ni("cardCvc",Ai);Ni("iban",Ai);var jSe=Ni("payment",Ai);Ni("expressCheckout",Ai);Ni("paymentRequestButton",Ai);Ni("linkAuthentication",Ai);var RSe=Ni("address",Ai);Ni("shippingAddress",Ai);Ni("paymentMethodMessaging",Ai);Ni("taxId",Ai);function ISe({hasExistingBilling:e,onPaymentAdded:t,onSaveStateForBillingRedirect:n}){const{organizationId:r}=nt({strict:!1}),i=U9(),o=sSe(),a=_Se(),[l,d]=b.useState(!1),f=M9(r),m=b.useCallback(()=>{t(!1)},[t]),h=b.useCallback(async v=>{if(v.preventDefault(),!i||!a)return;d(!0),await a.submit(),n?.(!0);const y=await i.confirmSetup({clientSecret:o.clientSecret,elements:a,redirect:"if_required",confirmParams:{return_url:`${window.location.origin}/#/${r}/billing/confirm`}});y.error?(console.error(y.error.message),ye.error(y.error.message),d(!1),n?.(!1)):y.setupIntent.payment_method&&(f(y.setupIntent.payment_method,t),n?.(!1))},[a,t,n,r,f,i,o.clientSecret]);return c.jsxs("form",{onSubmit:h,className:"max-w-xl",children:[c.jsx(jSe,{}),c.jsx(RSe,{options:{mode:"billing"}}),c.jsxs("div",{className:"mt-4 flex gap-8 items-center",children:[c.jsxs(he,{disabled:!i||!a||l,variant:"submit",className:"rounded-full",children:[c.jsx(Ii,{})," Add Payment Method"]}),e&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"text-xs text-gray-600",children:"Your existing payment method will be overwritten."}),c.jsx(he,{variant:"defaultOutline",type:"button",onClick:m,children:"Cancel"})]})]})]})}var TSe="clover",V9="https://js.stripe.com",NSe="".concat(V9,"/").concat(TSe,"/stripe.js"),ASe=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,OSe=/^https:\/\/js\.stripe\.com\/(v3|[a-z]+)\/stripe\.js(\?.*)?$/;var DSe=function(t){return ASe.test(t)||OSe.test(t)},$Se=function(){for(var t=document.querySelectorAll('script[src^="'.concat(V9,'"]')),n=0;n<t.length;n++){var r=t[n];if(DSe(r.src))return r}return null},kP=function(t){var n="",r=document.createElement("script");r.src="".concat(NSe).concat(n);var i=document.head||document.body;if(!i)throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");return i.appendChild(r),r},Yp=null,Gv=null,Zv=null,PSe=function(t){return function(n){t(new Error("Failed to load Stripe.js",{cause:n}))}},MSe=function(t,n){return function(){window.Stripe?t(window.Stripe):n(new Error("Stripe.js not available"))}},zSe=function(t){return Yp!==null?Yp:(Yp=new Promise(function(n,r){if(typeof window>"u"||typeof document>"u"){n(null);return}if(window.Stripe){n(window.Stripe);return}try{var i=$Se();if(!(i&&t)){if(!i)i=kP(t);else if(i&&Zv!==null&&Gv!==null){var o;i.removeEventListener("load",Zv),i.removeEventListener("error",Gv),(o=i.parentNode)===null||o===void 0||o.removeChild(i),i=kP(t)}}Zv=MSe(n,r),Gv=PSe(r),i.addEventListener("load",Zv),i.addEventListener("error",Gv)}catch(a){r(a);return}}),Yp.catch(function(n){return Yp=null,Promise.reject(n)}))},Wp,LSe=function(){return Wp||(Wp=zSe(null).catch(function(t){return Wp=null,Promise.reject(t)}),Wp)};Promise.resolve().then(function(){return LSe()}).catch(function(e){console.warn(e)});async function FSe(e){const{data:t}=await $t.post("/StripeAccount/",e);return t}function USe(){return ot({mutationFn:e=>FSe(e)})}async function VSe(e){const{data:t}=await $t.post("/Payment/",{organizationId:e.organizationId});return t}function BSe(){return ot({mutationFn:e=>VSe(e)})}function HSe(e){const{enabled:t,existingStripeId:n,organizationId:r}=e,{mutate:i}=USe(),{mutate:o}=BSe(),[a,l]=b.useState(void 0),d=b.useCallback(f=>{l(f.clientSecret)},[]);return b.useEffect(()=>{},[i,t,n,o,d,r]),a}function B9({children:e}){const{organizationId:t}=nt({strict:!1}),{data:n}=Dt(vu(t)),r=HSe({organizationId:t,enabled:!!n,existingStripeId:n?.stripeId});return b.useMemo(()=>({clientSecret:r||"",appearance:{theme:"night"}}),[r]),console.error("No VITE_PUBLIC_STRIPE_KEY is configured for this environment."),c.jsx("div",{className:"mt-20 px-4 pt-4 md:px-12 min-h-[calc(100vh-theme(spacing.32))]",children:"Setting up your billing is currently disabled. Please check back again later."})}function qSe({onPaymentAdded:e,onSaveStateForBillingRedirect:t}){const{organizationId:n}=nt({strict:!1}),{data:r}=Dt(vu(n)),i=r?.billing,o=i?.paymentMethod;return c.jsxs(B9,{children:[c.jsx("div",{className:"mt-2 mb-6",children:!o&&"You currently have no payment method on file. Please fill out the secure form below."}),c.jsx(ISe,{hasExistingBilling:!!i,onSaveStateForBillingRedirect:t,onPaymentAdded:e})]})}var Sa=(e=>(e.PASS="pass",e.FAIL="fail",e.PENDING="pending",e.ERROR="error",e))(Sa||{});function KSe(e){switch(e){case Sa.PASS:return"success";case Sa.FAIL:case Sa.ERROR:return"destructive";case Sa.PENDING:default:return"default"}}function GSe(e){switch(e){case Sa.PASS:return"READY";case Sa.FAIL:case Sa.ERROR:case Sa.PENDING:default:return e.toUpperCase()}}function ZSe(e,t){const n=String(e).padStart(2,"0"),r=String(t%100).padStart(2,"0");return`${n}/${r}`}function H9(e){const{onSaveStateForBillingRedirect:t,onReplacingPaymentMethod:n}=e??{},{organizationId:r}=nt({strict:!1}),{update:i}=gx(r),{data:o,refetch:a}=Dt(vu(r)),d=o?.billing?.paymentMethod,[f,m]=b.useState(!1),h=b.useCallback(()=>{m(!f),n?.(!f)},[n,f]),v=b.useCallback(y=>{m(!1),n?.(!1),y&&a()},[n,a]);return o?.type===Km?c.jsxs("span",{children:["You are part of an enterprise organization! We don’t currently show your payment methods on this page. Want to explore your solution with Harper more? ",c.jsx(Il,{}),", we would love to talk!"]}):d&&!f?c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"mt-2",children:[d.brand?.toUpperCase()??"Card"," ending in ",d.last4??"••••",d.expMonth&&d.expYear?c.jsxs(c.Fragment,{children:["(exp ",ZSe(d.expMonth,d.expYear),")"]}):null,d.status?c.jsxs(c.Fragment,{children:["—"," ",c.jsx(ra,{variant:KSe(d.status),children:GSe(d.status)})]}):null]}),i&&c.jsx("div",{className:"mt-2 mb-6",children:c.jsx(he,{variant:"defaultOutline",type:"button",onClick:h,children:"Replace Payment Method"})})]}):i?c.jsx(qSe,{onSaveStateForBillingRedirect:t,onPaymentAdded:v}):c.jsx("div",{children:"This org doesn't have a payment method, and you don't have access to add one. Please contact your administrator."})}function Zn(e){return e!==void 0&&e>0}function YSe({clusterId:e,isPending:t,onGoBackToDetails:n,onSaveStateForBillingRedirect:r,onSubmit:i,organizationId:o,selectedPlan:a}){const{data:l}=Dt(vu(o)),d=l?.billing,f=l?.type===Km,m=f||d?.paymentMethod?.status===Sa.PASS,[h,v]=b.useState(!1),y=Zn(a?.planLimits?.expirationMonths)&&a.planLimits.expirationMonths<1e3&&a.planLimits.expirationMonths,x=c.jsx(c.Fragment,{children:c.jsxs("div",{className:"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end mt-3 max-w-xl",children:[c.jsxs(he,{type:"button",variant:"defaultOutline",className:"rounded-full",disabled:t,onClick:n,children:[c.jsx(Fc,{})," Back to Details"]}),c.jsxs(he,{disabled:t||!m||h,type:"submit",variant:"submit",className:"rounded-full",onClick:i,children:[e?"Edit Cluster":"Create New Cluster"," ",c.jsx(wi,{})]})]})});if(f)return c.jsxs(c.Fragment,{children:[c.jsxs("ul",{className:"list-disc ml-6 max-w-lg",children:[c.jsx("li",{children:"Reminder: you will be billed at your contracted rate for any additional infrastructure."}),c.jsxs("li",{children:["Your account representative can work with you to sort out more precise details, and to help accomplish your objectives with this cluster. ",c.jsx(Il,{overEmail:!0}),", we are here to help."]})]}),x]});const S=y&&`, or ${Mr(y,"month","months")} elapse`;return c.jsxs(c.Fragment,{children:[c.jsxs("ul",{className:"list-disc ml-6 mb-6",children:[c.jsx("li",{children:"You will be billed for this cluster today, and will receive a license for the block of usage you've requested."}),e&&c.jsx("li",{children:"If you scale up, you'll be charged for the additional blocks you've purchased now, and your next auto renewal will be for all purchased blocks."}),e&&c.jsx("li",{children:"If you remove a region, that region's usage block will not be used anymore (because it is specific to that region)."}),c.jsxs("li",{children:["When that block is used up",S,", you will be automatically renewed."]}),c.jsx("li",{children:"While refunds are not available, we’d be happy to assist you with troubleshooting."}),c.jsxs("li",{children:["We would love to work with you to sort out more precise details, and to help accomplish your objectives with this cluster. ",c.jsx(Il,{overEmail:!0}),", we are here to help."]})]}),c.jsx("p",{className:"text-muted-foreground text-sm mb-6",children:"Payment method:"}),c.jsx(H9,{onSaveStateForBillingRedirect:r,onReplacingPaymentMethod:v}),x]})}function Lr({className:e}={}){const t=b.useMemo(()=>xr("animate-pulse h-2.5 bg-gray-200 rounded-full dark:bg-gray-700",!e?.includes("mb-")&&"mb-4 ",!e?.includes("w-")&&"w-48 ",e),[e]);return c.jsx("div",{className:t})}function dk(e,[t,n]){return Math.min(n,Math.max(t,e))}var WSe=[" ","Enter","ArrowUp","ArrowDown"],XSe=[" ","Enter"],Yc="Select",[A0,O0,JSe]=uh(Yc),[Ff]=Ti(Yc,[JSe,Af]),D0=Af(),[QSe,Hl]=Ff(Yc),[e_e,t_e]=Ff(Yc),q9=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:o,value:a,defaultValue:l,onValueChange:d,dir:f,name:m,autoComplete:h,disabled:v,required:y,form:x}=e,S=D0(t),[C,k]=b.useState(null),[E,j]=b.useState(null),[I,A]=b.useState(!1),T=lu(f),[N,D]=Mo({prop:r,defaultProp:i??!1,onChange:o,caller:Yc}),[L,H]=Mo({prop:a,defaultProp:l,onChange:d,caller:Yc}),ee=b.useRef(null),G=C?x||!!C.closest("form"):!0,[K,B]=b.useState(new Set),q=Array.from(K).map(z=>z.props.value).join(";");return c.jsx(rj,{...S,children:c.jsxs(QSe,{required:y,scope:t,trigger:C,onTriggerChange:k,valueNode:E,onValueNodeChange:j,valueNodeHasChildren:I,onValueNodeHasChildrenChange:A,contentId:Zi(),value:L,onValueChange:H,open:N,onOpenChange:D,dir:T,triggerPointerDownPosRef:ee,disabled:v,children:[c.jsx(A0.Provider,{scope:t,children:c.jsx(e_e,{scope:e.__scopeSelect,onNativeOptionAdd:b.useCallback(z=>{B(W=>new Set(W).add(z))},[]),onNativeOptionRemove:b.useCallback(z=>{B(W=>{const F=new Set(W);return F.delete(z),F})},[]),children:n})}),G?c.jsxs(hq,{"aria-hidden":!0,required:y,tabIndex:-1,name:m,autoComplete:h,value:L,onChange:z=>H(z.target.value),disabled:v,form:x,children:[L===void 0?c.jsx("option",{value:""}):null,Array.from(K)]},q):null]})})};q9.displayName=Yc;var K9="SelectTrigger",G9=b.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...i}=e,o=D0(n),a=Hl(K9,n),l=a.disabled||r,d=ft(t,a.onTriggerChange),f=O0(n),m=b.useRef("touch"),[h,v,y]=vq(S=>{const C=f().filter(j=>!j.disabled),k=C.find(j=>j.value===a.value),E=yq(C,S,k);E!==void 0&&a.onValueChange(E.value)}),x=S=>{l||(a.onOpenChange(!0),y()),S&&(a.triggerPointerDownPosRef.current={x:Math.round(S.pageX),y:Math.round(S.pageY)})};return c.jsx(ij,{asChild:!0,...o,children:c.jsx(Ge.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":gq(a.value)?"":void 0,...i,ref:d,onClick:Oe(i.onClick,S=>{S.currentTarget.focus(),m.current!=="mouse"&&x(S)}),onPointerDown:Oe(i.onPointerDown,S=>{m.current=S.pointerType;const C=S.target;C.hasPointerCapture(S.pointerId)&&C.releasePointerCapture(S.pointerId),S.button===0&&S.ctrlKey===!1&&S.pointerType==="mouse"&&(x(S),S.preventDefault())}),onKeyDown:Oe(i.onKeyDown,S=>{const C=h.current!=="";!(S.ctrlKey||S.altKey||S.metaKey)&&S.key.length===1&&v(S.key),!(C&&S.key===" ")&&WSe.includes(S.key)&&(x(),S.preventDefault())})})})});G9.displayName=K9;var Z9="SelectValue",Y9=b.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,children:o,placeholder:a="",...l}=e,d=Hl(Z9,n),{onValueNodeHasChildrenChange:f}=d,m=o!==void 0,h=ft(t,d.onValueNodeChange);return ar(()=>{f(m)},[f,m]),c.jsx(Ge.span,{...l,ref:h,style:{pointerEvents:"none"},children:gq(d.value)?c.jsx(c.Fragment,{children:a}):o})});Y9.displayName=Z9;var n_e="SelectIcon",W9=b.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...i}=e;return c.jsx(Ge.span,{"aria-hidden":!0,...i,ref:t,children:r||"▼"})});W9.displayName=n_e;var r_e="SelectPortal",X9=e=>c.jsx(ph,{asChild:!0,...e});X9.displayName=r_e;var Wc="SelectContent",J9=b.forwardRef((e,t)=>{const n=Hl(Wc,e.__scopeSelect),[r,i]=b.useState();if(ar(()=>{i(new DocumentFragment)},[]),!n.open){const o=r;return o?bf.createPortal(c.jsx(Q9,{scope:e.__scopeSelect,children:c.jsx(A0.Slot,{scope:e.__scopeSelect,children:c.jsx("div",{children:e.children})})}),o):null}return c.jsx(eq,{...e,ref:t})});J9.displayName=Wc;var Go=10,[Q9,ql]=Ff(Wc),i_e="SelectContentImpl",o_e=Jd("SelectContent.RemoveScroll"),eq=b.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:o,onPointerDownOutside:a,side:l,sideOffset:d,align:f,alignOffset:m,arrowPadding:h,collisionBoundary:v,collisionPadding:y,sticky:x,hideWhenDetached:S,avoidCollisions:C,...k}=e,E=Hl(Wc,n),[j,I]=b.useState(null),[A,T]=b.useState(null),N=ft(t,Q=>I(Q)),[D,L]=b.useState(null),[H,ee]=b.useState(null),G=O0(n),[K,B]=b.useState(!1),q=b.useRef(!1);b.useEffect(()=>{if(j)return yI(j)},[j]),vI();const z=b.useCallback(Q=>{const[ve,...xe]=G().map(Fe=>Fe.ref.current),[Ee]=xe.slice(-1),Pe=document.activeElement;for(const Fe of Q)if(Fe===Pe||(Fe?.scrollIntoView({block:"nearest"}),Fe===ve&&A&&(A.scrollTop=0),Fe===Ee&&A&&(A.scrollTop=A.scrollHeight),Fe?.focus(),document.activeElement!==Pe))return},[G,A]),W=b.useCallback(()=>z([D,j]),[z,D,j]);b.useEffect(()=>{K&&W()},[K,W]);const{onOpenChange:F,triggerPointerDownPosRef:ne}=E;b.useEffect(()=>{if(j){let Q={x:0,y:0};const ve=Ee=>{Q={x:Math.abs(Math.round(Ee.pageX)-(ne.current?.x??0)),y:Math.abs(Math.round(Ee.pageY)-(ne.current?.y??0))}},xe=Ee=>{Q.x<=10&&Q.y<=10?Ee.preventDefault():j.contains(Ee.target)||F(!1),document.removeEventListener("pointermove",ve),ne.current=null};return ne.current!==null&&(document.addEventListener("pointermove",ve),document.addEventListener("pointerup",xe,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ve),document.removeEventListener("pointerup",xe,{capture:!0})}}},[j,F,ne]),b.useEffect(()=>{const Q=()=>F(!1);return window.addEventListener("blur",Q),window.addEventListener("resize",Q),()=>{window.removeEventListener("blur",Q),window.removeEventListener("resize",Q)}},[F]);const[$,P]=vq(Q=>{const ve=G().filter(Pe=>!Pe.disabled),xe=ve.find(Pe=>Pe.ref.current===document.activeElement),Ee=yq(ve,Q,xe);Ee&&setTimeout(()=>Ee.ref.current.focus())}),V=b.useCallback((Q,ve,xe)=>{const Ee=!q.current&&!xe;(E.value!==void 0&&E.value===ve||Ee)&&(L(Q),Ee&&(q.current=!0))},[E.value]),O=b.useCallback(()=>j?.focus(),[j]),X=b.useCallback((Q,ve,xe)=>{const Ee=!q.current&&!xe;(E.value!==void 0&&E.value===ve||Ee)&&ee(Q)},[E.value]),de=r==="popper"?fk:tq,ge=de===fk?{side:l,sideOffset:d,align:f,alignOffset:m,arrowPadding:h,collisionBoundary:v,collisionPadding:y,sticky:x,hideWhenDetached:S,avoidCollisions:C}:{};return c.jsx(Q9,{scope:n,content:j,viewport:A,onViewportChange:T,itemRefCallback:V,selectedItem:D,onItemLeave:O,itemTextRefCallback:X,focusSelectedItem:W,selectedItemText:H,position:r,isPositioned:K,searchRef:$,children:c.jsx(E0,{as:o_e,allowPinchZoom:!0,children:c.jsx(C0,{asChild:!0,trapped:E.open,onMountAutoFocus:Q=>{Q.preventDefault()},onUnmountAutoFocus:Oe(i,Q=>{E.trigger?.focus({preventScroll:!0}),Q.preventDefault()}),children:c.jsx(Rf,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:Q=>Q.preventDefault(),onDismiss:()=>E.onOpenChange(!1),children:c.jsx(de,{role:"listbox",id:E.contentId,"data-state":E.open?"open":"closed",dir:E.dir,onContextMenu:Q=>Q.preventDefault(),...k,...ge,onPlaced:()=>B(!0),ref:N,style:{display:"flex",flexDirection:"column",outline:"none",...k.style},onKeyDown:Oe(k.onKeyDown,Q=>{const ve=Q.ctrlKey||Q.altKey||Q.metaKey;if(Q.key==="Tab"&&Q.preventDefault(),!ve&&Q.key.length===1&&P(Q.key),["ArrowUp","ArrowDown","Home","End"].includes(Q.key)){let Ee=G().filter(Pe=>!Pe.disabled).map(Pe=>Pe.ref.current);if(["ArrowUp","End"].includes(Q.key)&&(Ee=Ee.slice().reverse()),["ArrowUp","ArrowDown"].includes(Q.key)){const Pe=Q.target,Fe=Ee.indexOf(Pe);Ee=Ee.slice(Fe+1)}setTimeout(()=>z(Ee)),Q.preventDefault()}})})})})})})});eq.displayName=i_e;var a_e="SelectItemAlignedPosition",tq=b.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...i}=e,o=Hl(Wc,n),a=ql(Wc,n),[l,d]=b.useState(null),[f,m]=b.useState(null),h=ft(t,N=>m(N)),v=O0(n),y=b.useRef(!1),x=b.useRef(!0),{viewport:S,selectedItem:C,selectedItemText:k,focusSelectedItem:E}=a,j=b.useCallback(()=>{if(o.trigger&&o.valueNode&&l&&f&&S&&C&&k){const N=o.trigger.getBoundingClientRect(),D=f.getBoundingClientRect(),L=o.valueNode.getBoundingClientRect(),H=k.getBoundingClientRect();if(o.dir!=="rtl"){const Pe=H.left-D.left,Fe=L.left-Pe,pt=N.left-Fe,dt=N.width+pt,tt=Math.max(dt,D.width),Vt=window.innerWidth-Go,mn=dk(Fe,[Go,Math.max(Go,Vt-tt)]);l.style.minWidth=dt+"px",l.style.left=mn+"px"}else{const Pe=D.right-H.right,Fe=window.innerWidth-L.right-Pe,pt=window.innerWidth-N.right-Fe,dt=N.width+pt,tt=Math.max(dt,D.width),Vt=window.innerWidth-Go,mn=dk(Fe,[Go,Math.max(Go,Vt-tt)]);l.style.minWidth=dt+"px",l.style.right=mn+"px"}const ee=v(),G=window.innerHeight-Go*2,K=S.scrollHeight,B=window.getComputedStyle(f),q=parseInt(B.borderTopWidth,10),z=parseInt(B.paddingTop,10),W=parseInt(B.borderBottomWidth,10),F=parseInt(B.paddingBottom,10),ne=q+z+K+F+W,$=Math.min(C.offsetHeight*5,ne),P=window.getComputedStyle(S),V=parseInt(P.paddingTop,10),O=parseInt(P.paddingBottom,10),X=N.top+N.height/2-Go,de=G-X,ge=C.offsetHeight/2,Q=C.offsetTop+ge,ve=q+z+Q,xe=ne-ve;if(ve<=X){const Pe=ee.length>0&&C===ee[ee.length-1].ref.current;l.style.bottom="0px";const Fe=f.clientHeight-S.offsetTop-S.offsetHeight,pt=Math.max(de,ge+(Pe?O:0)+Fe+W),dt=ve+pt;l.style.height=dt+"px"}else{const Pe=ee.length>0&&C===ee[0].ref.current;l.style.top="0px";const pt=Math.max(X,q+S.offsetTop+(Pe?V:0)+ge)+xe;l.style.height=pt+"px",S.scrollTop=ve-X+S.offsetTop}l.style.margin=`${Go}px 0`,l.style.minHeight=$+"px",l.style.maxHeight=G+"px",r?.(),requestAnimationFrame(()=>y.current=!0)}},[v,o.trigger,o.valueNode,l,f,S,C,k,o.dir,r]);ar(()=>j(),[j]);const[I,A]=b.useState();ar(()=>{f&&A(window.getComputedStyle(f).zIndex)},[f]);const T=b.useCallback(N=>{N&&x.current===!0&&(j(),E?.(),x.current=!1)},[j,E]);return c.jsx(l_e,{scope:n,contentWrapper:l,shouldExpandOnScrollRef:y,onScrollButtonChange:T,children:c.jsx("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:I},children:c.jsx(Ge.div,{...i,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});tq.displayName=a_e;var s_e="SelectPopperPosition",fk=b.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:i=Go,...o}=e,a=D0(n);return c.jsx(oj,{...a,...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)"}})});fk.displayName=s_e;var[l_e,OI]=Ff(Wc,{}),pk="SelectViewport",nq=b.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...i}=e,o=ql(pk,n),a=OI(pk,n),l=ft(t,o.onViewportChange),d=b.useRef(0);return c.jsxs(c.Fragment,{children:[c.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:r}),c.jsx(A0.Slot,{scope:n,children:c.jsx(Ge.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:Oe(i.onScroll,f=>{const m=f.currentTarget,{contentWrapper:h,shouldExpandOnScrollRef:v}=a;if(v?.current&&h){const y=Math.abs(d.current-m.scrollTop);if(y>0){const x=window.innerHeight-Go*2,S=parseFloat(h.style.minHeight),C=parseFloat(h.style.height),k=Math.max(S,C);if(k<x){const E=k+y,j=Math.min(x,E),I=E-j;h.style.height=j+"px",h.style.bottom==="0px"&&(m.scrollTop=I>0?I:0,h.style.justifyContent="flex-end")}}}d.current=m.scrollTop})})})]})});nq.displayName=pk;var rq="SelectGroup",[c_e,u_e]=Ff(rq),iq=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=Zi();return c.jsx(c_e,{scope:n,id:i,children:c.jsx(Ge.div,{role:"group","aria-labelledby":i,...r,ref:t})})});iq.displayName=rq;var oq="SelectLabel",aq=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=u_e(oq,n);return c.jsx(Ge.div,{id:i.id,...r,ref:t})});aq.displayName=oq;var pb="SelectItem",[d_e,sq]=Ff(pb),lq=b.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:i=!1,textValue:o,...a}=e,l=Hl(pb,n),d=ql(pb,n),f=l.value===r,[m,h]=b.useState(o??""),[v,y]=b.useState(!1),x=ft(t,E=>d.itemRefCallback?.(E,r,i)),S=Zi(),C=b.useRef("touch"),k=()=>{i||(l.onValueChange(r),l.onOpenChange(!1))};if(r==="")throw new 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 c.jsx(d_e,{scope:n,value:r,disabled:i,textId:S,isSelected:f,onItemTextChange:b.useCallback(E=>{h(j=>j||(E?.textContent??"").trim())},[]),children:c.jsx(A0.ItemSlot,{scope:n,value:r,disabled:i,textValue:m,children:c.jsx(Ge.div,{role:"option","aria-labelledby":S,"data-highlighted":v?"":void 0,"aria-selected":f&&v,"data-state":f?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...a,ref:x,onFocus:Oe(a.onFocus,()=>y(!0)),onBlur:Oe(a.onBlur,()=>y(!1)),onClick:Oe(a.onClick,()=>{C.current!=="mouse"&&k()}),onPointerUp:Oe(a.onPointerUp,()=>{C.current==="mouse"&&k()}),onPointerDown:Oe(a.onPointerDown,E=>{C.current=E.pointerType}),onPointerMove:Oe(a.onPointerMove,E=>{C.current=E.pointerType,i?d.onItemLeave?.():C.current==="mouse"&&E.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Oe(a.onPointerLeave,E=>{E.currentTarget===document.activeElement&&d.onItemLeave?.()}),onKeyDown:Oe(a.onKeyDown,E=>{d.searchRef?.current!==""&&E.key===" "||(XSe.includes(E.key)&&k(),E.key===" "&&E.preventDefault())})})})})});lq.displayName=pb;var cm="SelectItemText",cq=b.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,...o}=e,a=Hl(cm,n),l=ql(cm,n),d=sq(cm,n),f=t_e(cm,n),[m,h]=b.useState(null),v=ft(t,k=>h(k),d.onItemTextChange,k=>l.itemTextRefCallback?.(k,d.value,d.disabled)),y=m?.textContent,x=b.useMemo(()=>c.jsx("option",{value:d.value,disabled:d.disabled,children:y},d.value),[d.disabled,d.value,y]),{onNativeOptionAdd:S,onNativeOptionRemove:C}=f;return ar(()=>(S(x),()=>C(x)),[S,C,x]),c.jsxs(c.Fragment,{children:[c.jsx(Ge.span,{id:d.textId,...o,ref:v}),d.isSelected&&a.valueNode&&!a.valueNodeHasChildren?bf.createPortal(o.children,a.valueNode):null]})});cq.displayName=cm;var uq="SelectItemIndicator",dq=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return sq(uq,n).isSelected?c.jsx(Ge.span,{"aria-hidden":!0,...r,ref:t}):null});dq.displayName=uq;var mk="SelectScrollUpButton",fq=b.forwardRef((e,t)=>{const n=ql(mk,e.__scopeSelect),r=OI(mk,e.__scopeSelect),[i,o]=b.useState(!1),a=ft(t,r.onScrollButtonChange);return ar(()=>{if(n.viewport&&n.isPositioned){let l=function(){const f=d.scrollTop>0;o(f)};const d=n.viewport;return l(),d.addEventListener("scroll",l),()=>d.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),i?c.jsx(mq,{...e,ref:a,onAutoScroll:()=>{const{viewport:l,selectedItem:d}=n;l&&d&&(l.scrollTop=l.scrollTop-d.offsetHeight)}}):null});fq.displayName=mk;var hk="SelectScrollDownButton",pq=b.forwardRef((e,t)=>{const n=ql(hk,e.__scopeSelect),r=OI(hk,e.__scopeSelect),[i,o]=b.useState(!1),a=ft(t,r.onScrollButtonChange);return ar(()=>{if(n.viewport&&n.isPositioned){let l=function(){const f=d.scrollHeight-d.clientHeight,m=Math.ceil(d.scrollTop)<f;o(m)};const d=n.viewport;return l(),d.addEventListener("scroll",l),()=>d.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),i?c.jsx(mq,{...e,ref:a,onAutoScroll:()=>{const{viewport:l,selectedItem:d}=n;l&&d&&(l.scrollTop=l.scrollTop+d.offsetHeight)}}):null});pq.displayName=hk;var mq=b.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...i}=e,o=ql("SelectScrollButton",n),a=b.useRef(null),l=O0(n),d=b.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return b.useEffect(()=>()=>d(),[d]),ar(()=>{l().find(m=>m.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[l]),c.jsx(Ge.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:Oe(i.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(r,50))}),onPointerMove:Oe(i.onPointerMove,()=>{o.onItemLeave?.(),a.current===null&&(a.current=window.setInterval(r,50))}),onPointerLeave:Oe(i.onPointerLeave,()=>{d()})})}),f_e="SelectSeparator",p_e=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return c.jsx(Ge.div,{"aria-hidden":!0,...r,ref:t})});p_e.displayName=f_e;var gk="SelectArrow",m_e=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=D0(n),o=Hl(gk,n),a=ql(gk,n);return o.open&&a.position==="popper"?c.jsx(aj,{...i,...r,ref:t}):null});m_e.displayName=gk;var h_e="SelectBubbleInput",hq=b.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const i=b.useRef(null),o=ft(r,i),a=mx(t);return b.useEffect(()=>{const l=i.current;if(!l)return;const d=window.HTMLSelectElement.prototype,m=Object.getOwnPropertyDescriptor(d,"value").set;if(a!==t&&m){const h=new Event("change",{bubbles:!0});m.call(l,t),l.dispatchEvent(h)}},[a,t]),c.jsx(Ge.select,{...n,style:{...uU,...n.style},ref:o,defaultValue:t})});hq.displayName=h_e;function gq(e){return e===""||e===void 0}function vq(e){const t=An(e),n=b.useRef(""),r=b.useRef(0),i=b.useCallback(a=>{const l=n.current+a;t(l),(function d(f){n.current=f,window.clearTimeout(r.current),f!==""&&(r.current=window.setTimeout(()=>d(""),1e3))})(l)},[t]),o=b.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return b.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,o]}function yq(e,t,n){const i=t.length>1&&Array.from(t).every(f=>f===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=g_e(e,Math.max(o,0));i.length===1&&(a=a.filter(f=>f!==n));const d=a.find(f=>f.textValue.toLowerCase().startsWith(i.toLowerCase()));return d!==n?d:void 0}function g_e(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var v_e=q9,y_e=G9,b_e=Y9,x_e=W9,w_e=X9,S_e=J9,__e=nq,C_e=iq,k_e=aq,E_e=lq,j_e=cq,R_e=dq,I_e=fq,T_e=pq;function Qi({...e}){return c.jsx(v_e,{"data-slot":"select",...e})}function ia({...e}){return c.jsx(C_e,{"data-slot":"select-group",...e})}function eo({...e}){return c.jsx(b_e,{"data-slot":"select-value",...e})}function to({className:e,children:t,...n}){return c.jsxs(y_e,{"data-slot":"select-trigger",className:Ve("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive flex h-9 w-fit items-center justify-between gap-2 rounded-md border bg-grey-700 px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 *:data-[slot=select-value]:truncate *:data-[slot=select-value]:block *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...n,children:[t,c.jsx(x_e,{asChild:!0,children:c.jsx(F4,{className:"opacity-50 size-4"})})]})}function no({className:e,children:t,position:n="popper",...r}){return c.jsx(w_e,{children:c.jsxs(S_e,{"data-slot":"select-content",className:Ve("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border shadow-md",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[c.jsx(N_e,{}),c.jsx(__e,{className:Ve("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),c.jsx(A_e,{})]})})}function DI({className:e,...t}){return c.jsx(k_e,{"data-slot":"select-label",className:Ve("px-2 py-1.5 text-sm font-medium",e),...t})}function zt({className:e,children:t,...n}){return c.jsxs(E_e,{"data-slot":"select-item",className:Ve("focus:bg-grey-200 focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...n,children:[c.jsx(j_e,{children:t}),c.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:c.jsx(R_e,{children:c.jsx(hE,{className:"size-4"})})})]})}function N_e({className:e,...t}){return c.jsx(I_e,{"data-slot":"select-scroll-up-button",className:Ve("flex cursor-default items-center justify-center py-1",e),...t,children:c.jsx(xte,{className:"size-4"})})}function A_e({className:e,...t}){return c.jsx(T_e,{"data-slot":"select-scroll-down-button",className:Ve("flex cursor-default items-center justify-center py-1",e),...t,children:c.jsx(F4,{className:"size-4"})})}const EP=new RegExp(/^\d+/);function O_e(e,t){const n=parseInt(e.match(EP)?.[0]||"0",10),r=parseInt(t.match(EP)?.[0]||"0",10);return n===r?0:n>r?1:-1}const bq=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],xq=["secs","mins","hrs"],mb={bytes:1e3,secs:60};function D_e(e,t,n){let r,i;switch(t){case"bytes":{r=bq,i=mb.bytes;break}case"secs":{r=xq,i=mb.secs;break}default:return e}const o=r.indexOf(n);if(o===-1)return e;const a=i**o;return e/a}function $_e(e,t){let n,r;switch(e){case"bytes":n=bq,r=mb.bytes;break;case"secs":n=xq,r=mb.secs;break;default:return e}let i=0;for(;t>=r&&i<n.length-1;)t/=r,i++;return n[i]}function Zo(e,t=1){const n=e*t,r=$_e("bytes",n),i=D_e(n,"bytes",r);return`${new Intl.NumberFormat().format(Math.round(i))} ${r}`}function jy(e){return new Intl.NumberFormat().format(e)}const jP=["K","M","B","T","Qa","Qi","Sx","Sp","Oc","No","Dc"];function bo(e){let n=e;if(Math.abs(n)<1e3)return String(Math.round(n));let r=-1;const i=10;do n/=1e3,++r;while(Math.round(Math.abs(n)*i)/i>=1e3&&r<jP.length-1);return`${jy(Math.round(n))} ${jP[r]}`}function P_e({planLimits:e,resourcesPerInstance:t,selectedRegion:n,isEnterprise:r}){const[i,o]=b.useState(!1),a=b.useCallback(()=>{o(!i)},[i,o]),l=Zn(e?.expirationMonths)&&e.expirationMonths<1e3&&e.expirationMonths,d=n?.purchasedBlockMultiplier??1,f=b.useMemo(()=>e?[Zn(e.totalReadCount)&&{label:"Total Reads",value:`${bo(e.totalReadCount*d)} reads`},Zn(e.totalReadsBytes)&&{label:"Total Read Transfer",value:`${Zo(e.totalReadsBytes*d)}`},Zn(e.readsPerMinuteCount)&&{label:"Read Rate",value:`${bo(e.readsPerMinuteCount*60*d)}/min`},Zn(e.readsPerMinuteBytes)&&{label:"Read Bandwidth",value:`${Zo(e.readsPerMinuteBytes*60*d)}/min`},Zn(e.totalWriteCount)&&{label:"Total Writes",value:`${bo(e.totalWriteCount)} reads`},Zn(e.totalWritesBytes)&&{label:"Total Write Transfer",value:`${Zo(e.totalWritesBytes)}`},Zn(e.writesPerMinuteCount)&&{label:"Write Rate",value:`${bo(e.writesPerMinuteCount*60)}/min`},Zn(e.writesPerMinuteBytes)&&{label:"Write Bandwidth",value:`${Zo(e.writesPerMinuteBytes*60)}/min`},Zn(e.totalRealTimeMessageDeliveries)&&{label:"Total Real-Time Messages",value:`${bo(e.totalRealTimeMessageDeliveries*d)} messages`},Zn(e.totalRealTimeMessageDeliveryBytes)&&{label:"Total Real-Time Message Transfer",value:`${Zo(e.totalRealTimeMessageDeliveryBytes*d)}`},Zn(e.realTimeMessageDeliveriesPerMinute)&&{label:"Real-Time Message Rate",value:`${bo(e.realTimeMessageDeliveriesPerMinute*60*d)}/min`},Zn(e.realTimeMessageDeliveryBytesPerMinute)&&{label:"Real-Time Message Bandwidth",value:`${Zo(e.realTimeMessageDeliveryBytesPerMinute*60*d)}/min`},Zn(e.tlsHandshakes)&&{label:"TLS Handshakes",value:`${bo(e.tlsHandshakes*60*d)}`},Zn(e.applicationComputeHours)&&{label:"Application Compute Hours",value:`${bo(e.applicationComputeHours*60*d)}`},t&&Zn(t.storageGb)&&{label:"Storage",value:`${Zo(t.storageGb*1e9)}`},l&&{label:"Expiration",value:Mr(l,"month","months")}].filter(Lo):[],[l,e,t,d]);if(!e)return"";if(!Zn(e.totalReadCount))return"This plan has no usage limits.";const m=r?" Pricing subject to contracted rate.":" Beta pricing subject to change.",h=Zn(e.readsPerMinuteCount)?`${bo(e.readsPerMinuteCount*d)} reads/min & `:"",v=Zn(e.writesPerMinuteCount)?` ${bo(e.writesPerMinuteCount)} writes/min & `:" ",y=Zn(e.readsPerMinuteCount)?"in "+(n?.region??"")+" region":"per server",x=l?`, for ${Mr(l,"month","months")}`:"",S=r?"for the contracted rate":"for the price listed above",C=l?` in ${Mr(l,"month","months")} or`:"";return c.jsxs(je,{className:"basis-full",children:[c.jsxs(Re,{onClick:a,children:["Purchasing usage block for ",h,bo(e.totalReadCount*d)," total reads ",y,",",c.jsx("br",{className:"hidden sm:block"}),v," ",bo(e.totalWriteCount)," total writes",x,".",m,c.jsx("br",{className:"block sm:hidden"}),c.jsxs(he,{type:"button",variant:"link",className:"text-white",children:["Learn More ",i?c.jsx(qb,{}):c.jsx(wi,{})]})]}),c.jsx(Te,{children:c.jsxs("dl",{className:Ve("divide-y divide-black overflow-hidden transition-[max-height] duration-200 ease-in",i?"max-h-fit":"max-h-0"),children:[c.jsxs("div",{className:"text-sm mb-3 max-w-lg",children:["This plan licenses Harper for the usage limits below, ",S,". The usage license expires",C," ","when any usage limit is reached. New usage blocks are automatically purchased/billed as blocks are consumed."]}),f.map((k,E)=>c.jsxs("div",{className:Ve("px-4 py-1 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-3",E%2===0&&"bg-gray-700"),children:[c.jsx("dt",{className:"text-sm/6 font-medium text-gray-300",children:k.label}),c.jsx("dd",{className:"mt-1 text-sm/6 sm:col-span-2 sm:mt-0",children:k.value})]},k.label))]})}),c.jsx(Ie,{})]})}function M_e({control:e,fieldArray:t,form:n,index:r,regionNameToLatencyToRegion:i,selectedPlan:o,isEnterprise:a}){const l=b.useMemo(()=>Object.keys(i).sort(),[i]),d=n.watch("deploymentDescription")?.startsWith("Dedicated"),f=n.watch(`regionPlans.${r}.regionName`),m=n.watch(`regionPlans.${r}.latencyDescription`),h=b.useMemo(()=>Object.keys(i[f]||{}).sort(O_e).reverse(),[i,f]);b.useEffect(function(){if(f&&h?.length&&!h?.includes(m)){const x=m?.split(" ")[0].toLowerCase(),S=h.find(C=>x?C.split(" ")[0].toLowerCase()===x:!0)||h[0];n.setValue(`regionPlans.${r}.latencyDescription`,S),n.trigger()}},[h,n,r,m,f]);const v=b.useCallback(()=>{t?.remove(r),n.trigger()},[t,n,r]);return c.jsxs("div",{className:"md:col-span-6 col-span-3 p-4 rounded-md bg-accent gap-6 flex flex-wrap items-start",children:[c.jsx(Ne,{control:e,name:`regionPlans.${r}.regionName`,render:({field:y})=>c.jsxs(je,{className:"flex-1",children:[c.jsxs(Re,{children:["Region ",t.fields.length>1?r+1:""]}),c.jsx(Te,{children:c.jsxs(Qi,{onValueChange:x=>{y.onChange(x),n.trigger()},...y,children:[c.jsx(to,{className:"w-full",children:c.jsx(eo,{placeholder:"Choose Region"})}),c.jsx(no,{children:c.jsx(ia,{children:l.map(x=>c.jsx(zt,{value:x,children:x},x))})})]})}),c.jsx(Ie,{})]})}),c.jsx(Ne,{control:e,name:`regionPlans.${r}.latencyDescription`,render:({field:y})=>c.jsxs(je,{className:"flex-1",children:[c.jsxs(Re,{children:["Estimated ",d?"P95":"P90"," Latency, Distribution"]}),c.jsx(Te,{children:c.jsxs(Qi,{onValueChange:x=>{y.onChange(x),n.trigger()},...y,disabled:!h?.length,children:[c.jsx(to,{className:"w-full",children:c.jsx(eo,{placeholder:"Choose Latency Tier"})}),c.jsx(no,{children:c.jsx(ia,{children:h.map(x=>c.jsx(zt,{value:x,children:x},x))})})]})}),c.jsx(Ie,{})]})}),t?.fields?.length&&t?.fields?.length>1&&c.jsx("div",{className:"flex-none mt-6",children:c.jsxs(he,{type:"button",variant:"destructiveOutline",size:"sm",onClick:v,children:[c.jsx(aa,{})," ",c.jsx("span",{className:"sr-only",children:"Remove"})]})}),c.jsx(P_e,{planLimits:o?.planLimits,resourcesPerInstance:o?.resourcesPerInstance,selectedRegion:i[f]?.[m],isEnterprise:a})]})}function z_e({form:e,regionLocations:t,regionNameToLatencyToRegion:n,selectedPlan:r,totalPrice:i,isEnterprise:o}){const a=e.watch("regionPlans"),l=vj({control:e.control,name:"regionPlans"}),d=b.useMemo(()=>{const m=a.map(h=>n?.[h.regionName]?.[h.latencyDescription]?.region);return i?t?.find(h=>!m.includes(h.region)):null},[t,n,a,i]),f=b.useCallback(()=>{d&&(l.append({regionName:d.region,latencyDescription:d.latencyDescription}),e.trigger())},[e,d,l]);return t?.length?c.jsxs(c.Fragment,{children:[l.fields.map((m,h)=>c.jsx(M_e,{control:e.control,fieldArray:l,form:e,index:h,regionNameToLatencyToRegion:n,selectedPlan:r,isEnterprise:o},m.id)),d&&c.jsx("div",{className:"md:col-span-6 col-span-3",children:c.jsxs(he,{type:"button",variant:"positiveOutline",className:"rounded-full",onClick:f,children:[c.jsx(Tr,{}),"Add Additional Region Usage"]})})]}):c.jsx("div",{className:"md:col-span-6 col-span-3",children:c.jsx(Fy,{className:"mt-0 m-0",title:"No Regions Available",showReturnToHome:!1,error:{message:c.jsxs(c.Fragment,{children:["The deployment type you selected currently has no available regions. Please try a different deployment type, try again later, or ",c.jsx(Il,{}),"."]})}})})}const wq=0,Sq=65535;function L_e({control:e,fieldArray:t,form:n,index:r}){const i=b.useCallback(()=>{t?.remove(r)},[t,r]);return c.jsxs("div",{className:"md:col-span-6 col-span-3 p-4 rounded-md bg-accent gap-6 flex flex-wrap items-start",children:[c.jsx(Ne,{control:e,name:`instances.${r}.secure`,render:({field:o})=>c.jsxs(je,{children:[c.jsxs(Re,{children:["Instance ",t.fields.length>1?r+1:""]}),c.jsx(Te,{children:c.jsxs(Qi,{...o,onValueChange:a=>{o.onChange(a),n.trigger()},children:[c.jsx(to,{className:"w-full",children:c.jsx(eo,{placeholder:"https://"})}),c.jsx(no,{children:c.jsxs(ia,{children:[c.jsx(zt,{value:"true",children:"https://"}),c.jsx(zt,{value:"false",children:"http://"})]})})]})}),c.jsx(Ie,{})]})}),c.jsx(Ne,{control:e,name:`instances.${r}.fqdn`,render:({field:o})=>c.jsxs(je,{className:"flex-3",children:[c.jsx(Re,{children:"Host Name"}),c.jsx(Te,{children:c.jsx(ze,{...o,type:"text",autoCapitalize:"none",autoComplete:"off",autoCorrect:"off"})}),c.jsx(Ie,{})]})}),c.jsx(Ne,{control:e,name:`instances.${r}.port`,render:({field:o})=>c.jsxs(je,{children:[c.jsx(Re,{children:"Operations API Port"}),c.jsx(Te,{children:c.jsx(ze,{...o,type:"number",min:wq,max:Sq,autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",placeholder:String(Vd),onChange:a=>{o.onChange(a.target.value?parseInt(a.target.value,10):void 0),n.trigger()}})}),c.jsx(Ie,{})]})}),t?.fields?.length&&t?.fields?.length>1&&c.jsx("div",{className:"flex-none mt-6",children:c.jsxs(he,{type:"button",variant:"destructiveOutline",size:"sm",onClick:i,children:[c.jsx(aa,{})," ",c.jsx("span",{className:"sr-only",children:"Remove"})]})})]})}function F_e({form:e}){const t=vj({control:e.control,name:"instances"}),n=b.useCallback(()=>{t.append({secure:"true",fqdn:"",port:Vd})},[t]);return c.jsxs(c.Fragment,{children:[t.fields.map((r,i)=>c.jsx(L_e,{control:e.control,fieldArray:t,form:e,index:i},r.id)),c.jsx("div",{className:"md:col-span-6 col-span-3",children:c.jsxs(he,{type:"button",variant:"positiveOutline",className:"rounded-full",onClick:n,children:[c.jsx(Tr,{}),"Add Instance"]})})]})}const RP=/(^$|^(?:localhost|(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}|(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,})$)/i,$I=Xe().max(20,"Must be at most 20 characters long.").regex(/^[a-z0-9]([a-z0-9-]*[a-z0-9])?$/,"Can only contain lowercase letters, numbers and dashes. Must not start or end with a dash."),_q=Mt({clusterName:Xe().nonempty("Please enter a cluster name.").max(255,"Cluster name cannot be longer than 255 characters long."),abbreviatedName:Pf([Vl(""),Kc(),$I]),fqdn:Xe().regex(RP,"Please enter a valid host name without the port or any path.").optional(),deploymentDescription:Xe().nonempty("Please select a deployment tier."),performanceDescription:Xe().nonempty("Please select a performance tier."),regionPlans:ws(Mt({regionName:Xe().nonempty("Please select a region."),latencyDescription:Xe().nonempty("Please select a latency tier.")})).max(50,{error:"A maximum of 50 regions can be selected for each cluster. "}),instances:ws(Mt({secure:Ul(["true","false"]),fqdn:Xe().nonempty("Please enter the host name of your instance.").regex(RP,"Please enter a valid host name without the port or any path."),port:m0().min(wq,"Positive thinking only, please.").max(Sq,"That port number is too high.").optional()})).max(100,{error:"A maximum of 100 instances can be added to each cluster."}),skipToBilling:Xt().optional(),sourceClusterId:Xe().optional()}),IP={Colocated:"Shared infrastructure for optimized value",Dedicated:"Dedicated infrastructure for consistent performance","Self-Hosted":"Your own infrastructure"};function U_e({calculatedNames:e,clusterId:t,deploymentToPerformanceToPlan:n,form:r,isPending:i,regionLocations:o,regionNameToLatencyToRegion:a,selectedDeployment:l,selectedPerformance:d,selectedPlan:f,totalPrice:m,isEnterprise:h}){const{isDirty:v,isValid:y}=fj(),x=b.useMemo(()=>Object.keys(n[l]||{}).map(k=>{const E=k.slice(0,-1).split("(");if(E.length>1)return{performanceTier:k,name:E[0],description:E[1]};const j=k.split(" for ");return j.length>1?{performanceTier:k,name:j[0],description:"For "+j[1]}:{performanceTier:k,name:k,description:""}}),[n,l]),S=b.useMemo(()=>Object.keys(n).sort(),[n]);b.useEffect(function(){x?.length&&!x.find(E=>E.performanceTier===d)&&(r.setValue("performanceDescription",x[0].performanceTier),r.trigger())},[l,d,x,r]);const C=l==="Self-Hosted";return c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"grid grid-cols-3 gap-6 text-white md:grid-cols-6",children:[c.jsx(Ne,{control:r.control,name:"clusterName",render:({field:k})=>c.jsxs(je,{className:"col-span-3 md:col-span-6",children:[c.jsx(Re,{className:"pb-1",children:"Cluster Name"}),c.jsx(Te,{children:c.jsx(ze,{autoFocus:!0,type:"text",maxLength:_q.shape.clusterName.maxLength,autoCapitalize:"words",disabled:!!t,...k})}),c.jsx(Ie,{})]})}),c.jsx(Ne,{control:r.control,name:"deploymentDescription",render:({field:k})=>c.jsxs(je,{className:"col-span-3",children:[c.jsx(Re,{className:"pb-1",children:"Harper Deployment"}),c.jsx(b.Suspense,{fallback:c.jsx(Lr,{}),children:c.jsx(Te,{children:c.jsxs(Qi,{...k,disabled:!!t,onValueChange:E=>{k.onChange(E),r.trigger()},children:[c.jsx(to,{className:"w-full h-auto",children:c.jsx(eo,{placeholder:"Choose Tier"})}),c.jsx(no,{children:c.jsx(ia,{children:S.map(E=>c.jsxs(zt,{value:E,children:[c.jsx("dt",{className:"text-left font-bold text-sm/6",children:E}),IP[E]&&c.jsx("dd",{className:"font-light",children:IP[E]})]},E))})})]})})}),c.jsx(Ie,{})]})}),c.jsx(Ne,{control:r.control,name:"performanceDescription",render:({field:k})=>c.jsxs(je,{className:"col-span-3",children:[c.jsxs(Re,{className:"pb-1",children:[l.startsWith("Self")?"Support":"Performance"," & Usage"]}),c.jsx(b.Suspense,{fallback:c.jsx(Lr,{}),children:c.jsx(Te,{children:c.jsxs(Qi,{...k,onValueChange:E=>{k.onChange(E),r.trigger()},disabled:!x?.length,children:[c.jsx(to,{className:"w-full h-auto",children:c.jsx(eo,{placeholder:"Choose Tier"})}),c.jsx(no,{children:c.jsx(ia,{children:x.map(E=>c.jsxs(zt,{value:E.performanceTier,children:[c.jsx("dt",{className:"text-left font-bold text-sm/6",children:E.name}),E.description&&c.jsx("dd",{className:"font-light",children:E.description})]},E.name))})})]})})}),c.jsx(Ie,{})]})}),C?c.jsx(c.Fragment,{children:c.jsx(Ne,{control:r.control,name:"fqdn",render:({field:k})=>c.jsxs(je,{className:"md:col-span-6 col-span-3",children:[c.jsx(Re,{className:"pb-1",children:"Optional Cluster Load Balancer Host Name"}),c.jsx(Te,{children:c.jsx(ze,{...k,type:"text",autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",placeholder:"example.your-company.com",disabled:!!t})}),c.jsx(Ie,{})]})})}):c.jsxs(c.Fragment,{children:[c.jsx(Ne,{control:r.control,name:"abbreviatedName",render:({field:k})=>c.jsxs(je,{className:"col-span-3",children:[c.jsx(Re,{className:"pb-1",children:"Host Name"}),c.jsx(Te,{children:c.jsx(ze,{...k,type:"text",maxLength:$I.maxLength,autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",placeholder:e.suggestedAbbreviatedName,disabled:!!t})}),c.jsx(Ie,{})]})}),c.jsxs(je,{className:"col-span-3 ",children:[c.jsx(Re,{className:"pb-1",children:"Full Host Name"}),c.jsx(Te,{children:c.jsx("span",{children:e.fullHostName})}),c.jsx(Ie,{})]})]}),C?c.jsx(F_e,{form:r}):c.jsx(z_e,{form:r,regionLocations:o,regionNameToLatencyToRegion:a,selectedPlan:f,totalPrice:m,isEnterprise:h})]}),c.jsx(Ln,{className:"mt-3 mb-12",children:c.jsxs(he,{type:"submit",variant:"submit",className:"rounded-full",disabled:i||t&&!v||!y,children:[m>0?"Confirm Payment Details":t?"Edit Cluster":"Create New Cluster",c.jsx(wi,{})]})})]})}function Cq(e){const{fqdn:t}=e;let{secure:n,port:r}=e;return r||(r=Vd),r===443&&n==="false"&&(n="true"),r===80&&n==="true"&&(n="false"),`${n==="true"?"https":"http"}://${t}${r===443||r===80?"":":"+r}`.toLowerCase()}function kq(e,t,n){const r=e.find(o=>(n?!!o.priceUsd:!o.priceUsd)&&o.deploymentType==="colocated")||e.find(o=>o.deploymentType==="colocated")||e[0],i=r?.allowedRegionIds;if(r){const o=i?t.filter(l=>i.includes(l.id)):t,a=o.find(l=>l.region==="US")||o[0];if(a)return{deploymentDescription:r.deploymentDescription,performanceDescription:r.performanceDescription,regionPlans:[{regionName:a.region,latencyDescription:a.latencyDescription}]}}return null}function V_e(e,t,n){if(t&&n){const r=e.getValues();if(!r.deploymentDescription||!r.performanceDescription||!r.regionPlans.length){const i=kq(t,n);i&&(!r.deploymentDescription&&!r.performanceDescription&&(e.setValue("deploymentDescription",i.deploymentDescription),e.setValue("performanceDescription",i.performanceDescription)),r.regionPlans.length||e.setValue("regionPlans",i.regionPlans))}}}function B_e({price:e}){const n=new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).formatToParts(e||0);return c.jsx("span",{className:"text-4xl",children:n.map((r,i)=>c.jsx(H_e,{type:r.type,value:r.value},i))})}function H_e({type:e,value:t}){switch(e){case"currency":case"decimal":case"fraction":return c.jsx("sup",{className:"font-light text-xl",children:t});default:return t}}function q_e({alreadyUsingFree:e,clusterId:t,defaultValues:n,deploymentToPerformanceToPlan:r,organization:i,organizationId:o,planTypes:a,regionLocationsColocated:l,regionLocationsDedicated:d,setSavedClusterState:f,startOffOnBilling:m}){const h=Cn(),v=_n(),y=i?.type===Km,x=sr(),{mutate:S,isPending:C}=eSe(),{mutate:k,isPending:E}=nSe(),[j,I]=b.useState(m),A=b.useMemo(()=>ck(l?.sort(lk("latencyDescription"))||[],"region","latencyDescription"),[l]),T=b.useMemo(()=>ck(d?.sort(lk("latencyDescription"))||[],"region","latencyDescription"),[d]),N=b.useCallback((xe,Ee)=>{const Pe=new Set,Fe=r?.[xe.deploymentDescription]?.[xe.performanceDescription];if(xe.deploymentDescription==="Self-Hosted")for(let dt=0;dt<xe.instances.length;dt++){const tt=Cq(xe.instances[dt]);Pe.has(tt)?Ee.addIssue({code:"custom",path:[`instances.${dt}.fqdn`],message:"Every instance url must be unique!"}):Pe.add(tt)}else{Fe?.priceUsd===0&&e&&Ee.addIssue({code:"custom",path:["performanceDescription"],message:"Only one free cluster is allowed per organization."});const dt=Fe?.deploymentDescription!=="Dedicated"?A:T;for(let tt=0;tt<xe.regionPlans.length;tt++){const Vt=xe.regionPlans[tt],mn=dt[Vt.regionName]?.[Vt.latencyDescription];Pe.has(Vt.regionName)?Ee.addIssue({code:"custom",path:[`regionPlans.${tt}.regionName`],message:"You can only select a region once!"}):Pe.add(Vt.regionName),Fe?.allowedRegionIds?.length&&mn?.id&&(Fe.allowedRegionIds.includes(mn.id)?tt>=1&&Ee.addIssue({code:"custom",path:[`regionPlans.${tt}.regionName`],message:"You can only select one region with this performance tier!"}):rSe(Fe.allowedRegionIds,mn.id)?Ee.addIssue({code:"custom",path:[`regionPlans.${tt}.latencyDescription`],message:"This latency is not available with the selected performance tier!"}):Ee.addIssue({code:"custom",path:[`regionPlans.${tt}.regionName`],message:"This region is not available with the selected performance tier!"}))}}},[e,A,T,r]),D=Qt({mode:"onChange",resolver:an(_q.superRefine(N)),defaultValues:n}),[L,H]=b.useState(!0);b.useEffect(()=>{L&&n&&(f(null),H(!1))},[n,L,f]);const ee=D.watch("clusterName"),G=D.watch("abbreviatedName"),K=D.watch("deploymentDescription"),B=D.watch("performanceDescription"),q=D.watch("regionPlans"),z=D.watch("instances"),W=K!=="Dedicated"?A:T,F=K!=="Dedicated"?l:d;b.useEffect(function(){const Ee=D.getValues(),Pe=K==="Self-Hosted";K&&(Pe?(Ee.abbreviatedName&&D.setValue("abbreviatedName",""),Ee.regionPlans.length&&D.setValue("regionPlans",[]),Ee.instances.length||D.setValue("instances",[{secure:"true",fqdn:"",port:Vd}])):(Ee.fqdn&&D.setValue("fqdn",""),Ee.instances.length&&D.setValue("instances",[]),Ee.regionPlans.length||V_e(D,a,F)))},[D,a,F,K]);const ne=b.useMemo(()=>{const xe=P9(N0(ee),$I.maxLength);return{suggestedAbbreviatedName:xe,fullHostName:`${G||xe}.${i.subdomain||"your-org"}.harperfabric.com`}},[ee,G,i]),$=b.useMemo(()=>r?.[K]?.[B],[r,K,B]);b.useEffect(function(){const Ee=$?.allowedRegionIds;if(Ee?.length&&q?.length===1){const Pe=q[0],Fe=W?.[Pe.regionName]?.[Pe.latencyDescription];if(!Ee.includes(Fe?.id)){const pt=F?.filter(tt=>Ee.includes(tt.id)),dt=pt?.find(tt=>tt.region==="US")||pt?.[0];dt&&(D.setValue("regionPlans.0.regionName",dt.region),D.setValue("regionPlans.0.latencyDescription",dt.latencyDescription),D.trigger())}}},[$,q,D,W,F]),b.useEffect(function(){if(!(K==="Self-Hosted")&&Object.keys(W).length&&q.length)for(let Pe=0;Pe<q.length;Pe++){const Fe=q[Pe];W[Fe.regionName]||D.setValue(`regionPlans.${Pe}.regionName`,"")}},[D,W,K,q]);const P=$?.priceUsd?K==="Self-Hosted"?z.length*$.priceUsd:q.reduce((xe,Ee)=>{const Pe=W?.[Ee.regionName]?.[Ee.latencyDescription];return xe+(Pe?$.priceUsd*Pe.instanceCount/2:0)},0):0,V=b.useCallback(({creating:xe,deploymentDescription:Ee})=>ye.message(xe?"Creating Cluster":"Updating Cluster",{description:c.jsx(Jwe,{message:"This may take a little bit, hold tight!",lateMessage:"Still working on it... why don't you grab a coffee, and I'll let you know when it's done?",duration:Ee==="Dedicated"?6e4:5e3}),duration:12e4}),[]),O=b.useCallback(async({clusterId:xe,sourceClusterId:Ee,creating:Pe,toastId:Fe,isSelfManaged:pt})=>{if(Ee){const tt=(await $9(o)).clusters?.find(Vt=>Vt.id===Ee);Vh(tt?.status)&&await O9(Ee)}x.invalidateQueries({queryKey:[o],refetchType:"active"}),Pe||x.invalidateQueries({queryKey:[xe],refetchType:"active"}),v.invalidate(),h(pt?{to:`/${o}/${xe}/instances`}:Pe?{to:`/${o}/${xe}/starting-up`}:{to:`/${o}/${xe}/scaling`}),D.reset(),ye.success(Pe?"Cluster Created":"Cluster Updated",{id:Fe,description:pt?void 0:Pe?"It is being provisioned now.":"The updates are being provisioned now.",duration:5e3})},[x,v,h,o,D]),X=b.useCallback(async()=>{const xe=D.getValues(),Ee=[],Pe=r[xe.deploymentDescription][xe.performanceDescription],Fe=xe.deploymentDescription==="Self-Hosted";if(Fe)for(const tt of xe.instances)Ee.push({autoRenew:!0,instanceFqdn:tt.fqdn,operationsApiPort:tt.port||Vd,operationsApiSecure:tt.secure==="true",planId:Pe.id});else for(const tt of xe.regionPlans){const Vt=W[tt.regionName][tt.latencyDescription];Ee.push({autoRenew:!0,planId:Pe.id,regionId:Vt.id})}f(null);const pt=V({creating:!t,deploymentDescription:xe.deploymentDescription}),dt=()=>ye.dismiss(pt);t?k({id:t,regionPlans:Ee},{onSuccess:tt=>O({clusterId:tt.id,sourceClusterId:xe.sourceClusterId,isSelfManaged:Fe,creating:!1,toastId:pt}),onError:dt}):S({abbreviatedName:Fe?void 0:xe.abbreviatedName||ne.suggestedAbbreviatedName,autoRenew:!0,fqdn:Fe&&xe.fqdn||void 0,name:xe.clusterName,organizationId:o,regionPlans:Ee},{onSuccess:tt=>O({clusterId:tt.id,sourceClusterId:xe.sourceClusterId,isSelfManaged:Fe,creating:!0,toastId:pt}),onError:dt})},[ne.suggestedAbbreviatedName,t,r,D,O,V,o,W,f,k,S]),de=b.useCallback(()=>{if(P>0){I(!0);return}return X()},[X,P]),ge=b.useCallback(xe=>{f(xe?{clusterId:t,...D.getValues(),skipToBilling:!0}:null)},[t,D,f]),Q=b.useCallback(()=>{I(!1)},[]),ve=!y&&"mr-37.5";return c.jsxs(c.Fragment,{children:[!y&&c.jsxs("div",{className:"absolute top-3 right-4 md:right-12 text-right",children:[c.jsx("dt",{className:"font-light",children:"Total Price"}),c.jsx("dd",{className:"font-bold",children:c.jsx(B_e,{price:P})})]}),c.jsx(en,{...D,children:j?c.jsxs(c.Fragment,{children:[c.jsx("h1",{className:xr("text-lg leading-none text-white font-semibold mb-4",ve),children:"Cluster Billing"}),c.jsx("p",{className:xr("text-muted-foreground text-sm mb-2",ve),children:"Please confirm the following billing details:"}),c.jsx(YSe,{clusterId:t,isPending:C||E,onGoBackToDetails:Q,onSaveStateForBillingRedirect:ge,onSubmit:X,organizationId:o,selectedPlan:$})]}):c.jsxs(c.Fragment,{children:[c.jsx("h1",{className:xr("text-lg leading-none text-white font-semibold mb-4",ve),children:"Cluster Configuration"}),c.jsx("p",{className:xr("text-muted-foreground text-sm mb-6",ve),children:"Configure your Harper cluster and define deployment plans."}),c.jsx("form",{onSubmit:D.handleSubmit(de),children:c.jsx(U_e,{calculatedNames:ne,clusterId:t,deploymentToPerformanceToPlan:r,form:D,isPending:C||E,regionLocations:F,regionNameToLatencyToRegion:W,selectedDeployment:K,selectedPerformance:B,selectedPlan:$,totalPrice:P,isEnterprise:y})})]})})]})}function TP(e){return e?.clusterName!==void 0}function PI(){const{organizationId:e,clusterId:t}=nt({strict:!1}),{create:n,update:r}=vx(e),{organization:i,cluster:o}=Bb({strict:!1}),[a,l]=Lf(gu.SavedClusterState,null),{data:d}=Dt(Ywe(e)),{data:f}=Dt(hP({availableHosts:!0,organizationId:e})),{data:m}=Dt(hP({organizationId:e})),h=b.useMemo(()=>{for(const S of i?.clusters??[])if(S.id!==o?.id&&d&&!gI(S.status)&&!Vh(S.status)&&S.plans)for(const C of S.plans){const k=d.find(E=>E.id===C.planId);if(k?.priceUsd===0&&!k.id.startsWith("self-hosted"))return!0}return!1},[o?.id,i?.clusters,d]),v=b.useMemo(()=>ck(d?.sort(lk("priceUsd"))||[],"deploymentDescription","performanceDescription"),[d]),y=b.useMemo(()=>{if(!d||!f||!m||t&&!o)return null;let S=o;if(a){if(TP(a))return{...a,clusterName:a.clusterName||"",abbreviatedName:a.abbreviatedName||"",deploymentDescription:a.deploymentDescription||"",performanceDescription:a.performanceDescription||"",fqdn:a.fqdn||"",regionPlans:a.regionPlans||[],instances:a.instances||[]};S=a}const C=d?.find(T=>T.id===o?.plans?.[0].planId),k=[],E=[],j=C?.deploymentDescription!=="Dedicated"?f:m,I=kq(d,j,h);let A=!1;if(S){if(S.plans){for(const T of S.plans)if(T.regionId){const N=j.find(D=>D.id===T.regionId);N&&k.push({regionName:N.region,latencyDescription:N.latencyDescription})}}if(!k.length&&S.instances){const T=S.instances.filter(N=>N.status&&!yj.includes(N.status)).sort(D9);for(const N of T)A=!0,E.push({fqdn:N.instanceFqdn,port:N.operationsApiPort,secure:N.operationsApiSecure?"true":"false"})}}else I&&k.push(...I.regionPlans);return!A&&!k.length&&k.push({regionName:"",latencyDescription:""}),{sourceClusterId:S?.id,autoRenew:S?.plans?.[0]?.autoRenew??!0,clusterName:S?.name??"",abbreviatedName:S?.abbreviatedName??"",deploymentDescription:C?.deploymentDescription??I?.deploymentDescription??"",performanceDescription:C?.performanceDescription??I?.performanceDescription??"",fqdn:A?S?.fqdn??"":"",instances:E,regionPlans:k}},[h,o,t,d,f,m,a]);return!y||!i||!d||!f||!m?c.jsx(Kv,{children:c.jsx(ao,{centered:!0,text:"Loading..."})}):(o?.id?!r:!n)?c.jsx(Kv,{children:c.jsx(Fy,{title:"Not Allowed",error:{message:c.jsxs(c.Fragment,{children:["You do not have permission to ",o?.id?"update":"create"," clusters in this org."]})}})}):d.length===0?c.jsx(Kv,{children:c.jsx(Fy,{title:`Cluster ${t?"Modification":"Creation"} Not Currently Allowed`,error:{message:c.jsxs(c.Fragment,{children:["There are no available deployment types right now! Please try again later, or ",c.jsx(Il,{}),"."]})}})}):c.jsx(Kv,{children:c.jsx(q_e,{alreadyUsingFree:h,clusterId:t,defaultValues:y,deploymentToPerformanceToPlan:v,organization:i,organizationId:e,planTypes:d,regionLocationsColocated:f,regionLocationsDedicated:m,setSavedClusterState:l,startOffOnBilling:TP(a)&&a.skipToBilling===!0})})}const vk={FAILED:0,UPDATING:1,PROVISIONING:2,RUNNING:3,TERMINATED:4},Yv=vk.RUNNING;function K_e(e,t){if(e.status===t.status)return e.name.localeCompare(t.name);const n=e.status?vk[e.status]??Yv:Yv,r=t.status?vk[t.status]??Yv:Yv;return n-r}function Eq(e,t){const n=t.toLowerCase();return r=>{for(const i of e){const o=r[i];if(o!=null)if(typeof o=="string"){if(o.toLowerCase().includes(n))return!0}else if(typeof o=="boolean"){if(o&&(n==="yes"||n==="true"||n==="1")||!o&&(n==="no"||n==="false"||n==="0"))return!0}else throw new Error("curryFilterByFuzzySearch has not implemented support for "+typeof o+" fields yet!")}return!1}}function G_e(){const{organizationId:e}=nt({strict:!1}),{create:t}=vx(e),{data:n,isSuccess:r}=Ri(vu(e)),[i]=Lf(gu.SavedClusterState,null),[o,a]=b.useState(""),l=b.useCallback(()=>a(""),[]),d=b.useCallback(h=>{a(h.currentTarget.value?.toLowerCase()||"")},[]),f=b.useMemo(()=>n?.clusters?.slice().filter(h=>!gI(h.status)).sort(K_e)||[],[n?.clusters]),m=b.useMemo(()=>f.filter(Eq(["id","name"],o))||[],[o,f]);return n&&f.length===0&&t?c.jsx(PI,{}):i?c.jsx(Tc,{to:`/${e}/new-cluster`}):c.jsxs(c.Fragment,{children:[c.jsx(Es,{children:r?c.jsxs("div",{className:"flex w-full justify-end gap-2",children:[c.jsx(ze,{placeholder:"Filter by name",className:"inline-block w-full text-xs",value:o,onChange:d}),t&&c.jsx(Ye,{to:"new-cluster",children:c.jsxs(he,{variant:"positive",accessKey:"n",children:[c.jsx(Tr,{})," ",c.jsxs("span",{className:"hidden sm:inline-block",children:[c.jsx("u",{children:"N"}),"ew ",c.jsx("span",{className:"hidden md:inline-block",children:"Cluster"})]})]})})]}):null}),c.jsx("section",{className:"mt-32 px-4 pt-4 md:px-12 min-h-[calc(100vh-theme(spacing.32))]",children:c.jsxs("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-12 mb-4",children:[m.map(h=>c.jsx("div",{className:"col-span-1 md:col-span-4 lg:col-span-3 2xl:col-span-2",children:c.jsx(Gwe,{cluster:h})},h.id)),!m.length&&c.jsxs("div",{className:"col-span-1 md:col-span-12 text-center",children:[c.jsx("h2",{className:"my-4 text-xl",children:"No matches found."}),c.jsx(he,{variant:"outline",onClick:l,children:"Clear Filters"})]})]})})]})}function jq(){const e=URL.parse(location.href);return e?.hash?e.hash.startsWith("#/")?e.hash.slice(1):e.hash:"/"}function Rq(){return"/#"+jq()}function Z_e(){const{organizationId:e}=nt({strict:!1}),t=Cn(),r=new URLSearchParams(window.location.search).get("setup_intent_client_secret"),{setup_intent_client_secret:i}=Nr({strict:!1}),[o]=Lf(gu.SavedClusterState,null),a=r||i,l=U9(),d=M9(e),f=b.useCallback(()=>{const m=o?o.clusterId?`../../${o.clusterId}/edit`:"../../new-cluster":"../";window.history.replaceState(null,"",Rq()),t({search:void 0,to:m})},[t,o]);return b.useEffect(()=>{!l||!a||!d||!e||!f||(async function(){try{const{setupIntent:m}=await l.retrieveSetupIntent(a);switch(m?.status){case"succeeded":m.payment_method!==null?d(m.payment_method,f):(ye.error("Failed to process payment method details. Please try another payment method."),f());break;case"processing":ye.warning("Processing payment method. Please check back later."),f();break;case"requires_payment_method":ye.error("Failed to process payment method details. Please try another payment method."),f();break;default:ye.error("Failed to process payment method details. Please try another payment method."),f();break}}catch(m){console.error(m),ye.error("Failed to process payment method details. Please try another payment method."),f()}})()},[a,f,e,d,l]),c.jsx(ao,{centered:!0})}function Y_e(){return c.jsx(B9,{children:c.jsx(Z_e,{})})}function Rr({clusterId:e,instanceId:t,organizationId:n},r){return"/"+[n,e,t&&"instance",t,r].filter(Lo).join("/")}const bm="flex items-center p-2 rounded-lg group",hb={className:"text-white hover:bg-gray-700"},gb={className:"text-black bg-white pointer-events-none cursor-default"};function W_e(){const{organizationId:e}=nt({strict:!1}),{update:t}=gx(e);return t?c.jsxs(c.Fragment,{children:[c.jsx(Es,{}),c.jsx("div",{className:"mt-32 px-4 pt-4 md:px-12 min-h-[calc(100vh-theme(spacing.32))]",children:c.jsxs("div",{className:"md:grid gap-4 md:grid-cols-12 min-h-[calc(100vh-theme(spacing.36))] mb-12",children:[c.jsxs("section",{className:"col-span-1 text-white md:col-span-4 lg:col-span-3 md:border-r-1 border-b md:border-b-0 md:pr-4 border-gray-700",children:[c.jsx(X_e,{}),c.jsx(J_e,{})]}),c.jsx("section",{className:"col-span-1 text-white md:col-span-8 lg:col-span-9",children:c.jsx(Nl,{})})]})})]}):c.jsx("div",{className:"mt-32 px-4 pt-4 md:px-12 min-h-[calc(100vh-theme(spacing.32))]",children:"You don't have access to manage payments for this organization. Please contact your administrator."})}function X_e(){const e=nt({strict:!1});return c.jsxs("div",{className:"hidden md:block",children:[c.jsxs("span",{className:bm,children:[c.jsx(Dne,{className:"inline-block"}),c.jsx("h3",{className:"ms-3 text-2xl font-extrabold dark:text-white",children:"Billing"})]}),c.jsxs("ul",{className:"border-t border-gray-700 pt-4 mt-4 space-y-2",children:[c.jsx("li",{children:c.jsxs(Ye,{to:Rr(e,"billing"),className:bm,activeOptions:{exact:!0},inactiveProps:hb,activeProps:gb,children:[c.jsx(B4,{className:"inline-block"})," ",c.jsx("span",{className:"ms-3",children:"Payment Method"})]})}),c.jsx("li",{children:c.jsxs(Ye,{to:Rr(e,"billing/invoices"),className:bm,inactiveProps:hb,activeProps:gb,children:[c.jsx(Y4,{className:"inline-block"}),c.jsx("span",{className:"ms-3",children:"Invoices & Payments"})]})})]})]})}function J_e(){const e=nt({strict:!1});return c.jsxs("ul",{className:"flex space-x-4 md:hidden py-2",children:[c.jsx("li",{children:c.jsxs(Ye,{to:Rr(e,"billing"),className:bm,activeOptions:{exact:!0},inactiveProps:hb,activeProps:gb,children:[c.jsx(B4,{className:"inline-block"})," ",c.jsx("span",{className:"ms-3",children:"Payment Method"})]})}),c.jsx("li",{children:c.jsxs(Ye,{to:Rr(e,"billing/invoices"),className:bm,inactiveProps:hb,activeProps:gb,children:[c.jsx(Y4,{className:"inline-block"})," ",c.jsx("span",{className:"ms-3",children:"Invoices & Payments"})]})})]})}function Uf(){return{accessor:(e,t)=>typeof e=="function"?{...t,accessorFn:e}:{...t,accessorKey:e},display:e=>e,group:e=>e}}function fl(e,t){return typeof e=="function"?e(t):e}function ro(e,t){return n=>{t.setState(r=>({...r,[e]:fl(n,r[e])}))}}function $0(e){return e instanceof Function}function Q_e(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function e1e(e,t){const n=[],r=i=>{i.forEach(o=>{n.push(o);const a=t(o);a!=null&&a.length&&r(a)})};return r(e),n}function at(e,t,n){let r=[],i;return o=>{let a;n.key&&n.debug&&(a=Date.now());const l=e(o);if(!(l.length!==r.length||l.some((m,h)=>r[h]!==m)))return i;r=l;let f;if(n.key&&n.debug&&(f=Date.now()),i=t(...l),n==null||n.onChange==null||n.onChange(i),n.key&&n.debug&&n!=null&&n.debug()){const m=Math.round((Date.now()-a)*100)/100,h=Math.round((Date.now()-f)*100)/100,v=h/16,y=(x,S)=>{for(x=String(x);x.length<S;)x=" "+x;return x};console.info(`%c⏱ ${y(h,5)} /${y(m,5)} ms`,`
131
+ font-size: .6rem;
132
+ font-weight: bold;
133
+ color: hsl(${Math.max(0,Math.min(120-120*v,120))}deg 100% 31%);`,n?.key)}return i}}function st(e,t,n,r){return{debug:()=>{var i;return(i=e?.debugAll)!=null?i:e[t]},key:!1,onChange:r}}function t1e(e,t,n,r){const i=()=>{var a;return(a=o.getValue())!=null?a:e.options.renderFallbackValue},o={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:i,getContext:at(()=>[e,n,t,o],(a,l,d,f)=>({table:a,column:l,row:d,cell:f,getValue:f.getValue,renderValue:f.renderValue}),st(e.options,"debugCells"))};return e._features.forEach(a=>{a.createCell==null||a.createCell(o,n,t,e)},{}),o}function n1e(e,t,n,r){var i,o;const l={...e._getDefaultColumnDef(),...t},d=l.accessorKey;let f=(i=(o=l.id)!=null?o:d?typeof String.prototype.replaceAll=="function"?d.replaceAll(".","_"):d.replace(/\./g,"_"):void 0)!=null?i:typeof l.header=="string"?l.header:void 0,m;if(l.accessorFn?m=l.accessorFn:d&&(d.includes(".")?m=v=>{let y=v;for(const S of d.split(".")){var x;y=(x=y)==null?void 0:x[S]}return y}:m=v=>v[l.accessorKey]),!f)throw new Error;let h={id:`${String(f)}`,accessorFn:m,parent:r,depth:n,columnDef:l,columns:[],getFlatColumns:at(()=>[!0],()=>{var v;return[h,...(v=h.columns)==null?void 0:v.flatMap(y=>y.getFlatColumns())]},st(e.options,"debugColumns")),getLeafColumns:at(()=>[e._getOrderColumnsFn()],v=>{var y;if((y=h.columns)!=null&&y.length){let x=h.columns.flatMap(S=>S.getLeafColumns());return v(x)}return[h]},st(e.options,"debugColumns"))};for(const v of e._features)v.createColumn==null||v.createColumn(h,e);return h}const Or="debugHeaders";function NP(e,t,n){var r;let o={id:(r=n.id)!=null?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:()=>{const a=[],l=d=>{d.subHeaders&&d.subHeaders.length&&d.subHeaders.map(l),a.push(d)};return l(o),a},getContext:()=>({table:e,header:o,column:t})};return e._features.forEach(a=>{a.createHeader==null||a.createHeader(o,e)}),o}const r1e={createTable:e=>{e.getHeaderGroups=at(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>{var o,a;const l=(o=r?.map(h=>n.find(v=>v.id===h)).filter(Boolean))!=null?o:[],d=(a=i?.map(h=>n.find(v=>v.id===h)).filter(Boolean))!=null?a:[],f=n.filter(h=>!(r!=null&&r.includes(h.id))&&!(i!=null&&i.includes(h.id)));return Wv(t,[...l,...f,...d],e)},st(e.options,Or)),e.getCenterHeaderGroups=at(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>(n=n.filter(o=>!(r!=null&&r.includes(o.id))&&!(i!=null&&i.includes(o.id))),Wv(t,n,e,"center")),st(e.options,Or)),e.getLeftHeaderGroups=at(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,r)=>{var i;const o=(i=r?.map(a=>n.find(l=>l.id===a)).filter(Boolean))!=null?i:[];return Wv(t,o,e,"left")},st(e.options,Or)),e.getRightHeaderGroups=at(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,r)=>{var i;const o=(i=r?.map(a=>n.find(l=>l.id===a)).filter(Boolean))!=null?i:[];return Wv(t,o,e,"right")},st(e.options,Or)),e.getFooterGroups=at(()=>[e.getHeaderGroups()],t=>[...t].reverse(),st(e.options,Or)),e.getLeftFooterGroups=at(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),st(e.options,Or)),e.getCenterFooterGroups=at(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),st(e.options,Or)),e.getRightFooterGroups=at(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),st(e.options,Or)),e.getFlatHeaders=at(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),st(e.options,Or)),e.getLeftFlatHeaders=at(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),st(e.options,Or)),e.getCenterFlatHeaders=at(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),st(e.options,Or)),e.getRightFlatHeaders=at(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),st(e.options,Or)),e.getCenterLeafHeaders=at(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),st(e.options,Or)),e.getLeftLeafHeaders=at(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),st(e.options,Or)),e.getRightLeafHeaders=at(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),st(e.options,Or)),e.getLeafHeaders=at(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,r)=>{var i,o,a,l,d,f;return[...(i=(o=t[0])==null?void 0:o.headers)!=null?i:[],...(a=(l=n[0])==null?void 0:l.headers)!=null?a:[],...(d=(f=r[0])==null?void 0:f.headers)!=null?d:[]].map(m=>m.getLeafHeaders()).flat()},st(e.options,Or))}};function Wv(e,t,n,r){var i,o;let a=0;const l=function(v,y){y===void 0&&(y=1),a=Math.max(a,y),v.filter(x=>x.getIsVisible()).forEach(x=>{var S;(S=x.columns)!=null&&S.length&&l(x.columns,y+1)},0)};l(e);let d=[];const f=(v,y)=>{const x={depth:y,id:[r,`${y}`].filter(Boolean).join("_"),headers:[]},S=[];v.forEach(C=>{const k=[...S].reverse()[0],E=C.column.depth===x.depth;let j,I=!1;if(E&&C.column.parent?j=C.column.parent:(j=C.column,I=!0),k&&k?.column===j)k.subHeaders.push(C);else{const A=NP(n,j,{id:[r,y,j.id,C?.id].filter(Boolean).join("_"),isPlaceholder:I,placeholderId:I?`${S.filter(T=>T.column===j).length}`:void 0,depth:y,index:S.length});A.subHeaders.push(C),S.push(A)}x.headers.push(C),C.headerGroup=x}),d.push(x),y>0&&f(S,y-1)},m=t.map((v,y)=>NP(n,v,{depth:a,index:y}));f(m,a-1),d.reverse();const h=v=>v.filter(x=>x.column.getIsVisible()).map(x=>{let S=0,C=0,k=[0];x.subHeaders&&x.subHeaders.length?(k=[],h(x.subHeaders).forEach(j=>{let{colSpan:I,rowSpan:A}=j;S+=I,k.push(A)})):S=1;const E=Math.min(...k);return C=C+E,x.colSpan=S,x.rowSpan=C,{colSpan:S,rowSpan:C}});return h((i=(o=d[0])==null?void 0:o.headers)!=null?i:[]),d}const i1e=(e,t,n,r,i,o,a)=>{let l={id:t,index:r,original:n,depth:i,parentId:a,_valuesCache:{},_uniqueValuesCache:{},getValue:d=>{if(l._valuesCache.hasOwnProperty(d))return l._valuesCache[d];const f=e.getColumn(d);if(f!=null&&f.accessorFn)return l._valuesCache[d]=f.accessorFn(l.original,r),l._valuesCache[d]},getUniqueValues:d=>{if(l._uniqueValuesCache.hasOwnProperty(d))return l._uniqueValuesCache[d];const f=e.getColumn(d);if(f!=null&&f.accessorFn)return f.columnDef.getUniqueValues?(l._uniqueValuesCache[d]=f.columnDef.getUniqueValues(l.original,r),l._uniqueValuesCache[d]):(l._uniqueValuesCache[d]=[l.getValue(d)],l._uniqueValuesCache[d])},renderValue:d=>{var f;return(f=l.getValue(d))!=null?f:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>e1e(l.subRows,d=>d.subRows),getParentRow:()=>l.parentId?e.getRow(l.parentId,!0):void 0,getParentRows:()=>{let d=[],f=l;for(;;){const m=f.getParentRow();if(!m)break;d.push(m),f=m}return d.reverse()},getAllCells:at(()=>[e.getAllLeafColumns()],d=>d.map(f=>t1e(e,l,f,f.id)),st(e.options,"debugRows")),_getAllCellsByColumnId:at(()=>[l.getAllCells()],d=>d.reduce((f,m)=>(f[m.column.id]=m,f),{}),st(e.options,"debugRows"))};for(let d=0;d<e._features.length;d++){const f=e._features[d];f==null||f.createRow==null||f.createRow(l,e)}return l},o1e={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.id),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()}}},Iq=(e,t,n)=>{var r,i;const o=n==null||(r=n.toString())==null?void 0:r.toLowerCase();return!!(!((i=e.getValue(t))==null||(i=i.toString())==null||(i=i.toLowerCase())==null)&&i.includes(o))};Iq.autoRemove=e=>Jo(e);const Tq=(e,t,n)=>{var r;return!!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(n))};Tq.autoRemove=e=>Jo(e);const Nq=(e,t,n)=>{var r;return((r=e.getValue(t))==null||(r=r.toString())==null?void 0:r.toLowerCase())===n?.toLowerCase()};Nq.autoRemove=e=>Jo(e);const Aq=(e,t,n)=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(n)};Aq.autoRemove=e=>Jo(e);const Oq=(e,t,n)=>!n.some(r=>{var i;return!((i=e.getValue(t))!=null&&i.includes(r))});Oq.autoRemove=e=>Jo(e)||!(e!=null&&e.length);const Dq=(e,t,n)=>n.some(r=>{var i;return(i=e.getValue(t))==null?void 0:i.includes(r)});Dq.autoRemove=e=>Jo(e)||!(e!=null&&e.length);const $q=(e,t,n)=>e.getValue(t)===n;$q.autoRemove=e=>Jo(e);const Pq=(e,t,n)=>e.getValue(t)==n;Pq.autoRemove=e=>Jo(e);const MI=(e,t,n)=>{let[r,i]=n;const o=e.getValue(t);return o>=r&&o<=i};MI.resolveFilterValue=e=>{let[t,n]=e,r=typeof t!="number"?parseFloat(t):t,i=typeof n!="number"?parseFloat(n):n,o=t===null||Number.isNaN(r)?-1/0:r,a=n===null||Number.isNaN(i)?1/0:i;if(o>a){const l=o;o=a,a=l}return[o,a]};MI.autoRemove=e=>Jo(e)||Jo(e[0])&&Jo(e[1]);const is={includesString:Iq,includesStringSensitive:Tq,equalsString:Nq,arrIncludes:Aq,arrIncludesAll:Oq,arrIncludesSome:Dq,equals:$q,weakEquals:Pq,inNumberRange:MI};function Jo(e){return e==null||e===""}const a1e={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:ro("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n?.getValue(e.id);return typeof r=="string"?is.includesString:typeof r=="number"?is.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?is.equals:Array.isArray(r)?is.arrIncludes:is.weakEquals},e.getFilterFn=()=>{var n,r;return $0(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(n=(r=t.options.filterFns)==null?void 0:r[e.columnDef.filterFn])!=null?n:is[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,i;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((r=t.options.enableColumnFilters)!=null?r:!0)&&((i=t.options.enableFilters)!=null?i:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return(n=t.getState().columnFilters)==null||(n=n.find(r=>r.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>{var n,r;return(n=(r=t.getState().columnFilters)==null?void 0:r.findIndex(i=>i.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(r=>{const i=e.getFilterFn(),o=r?.find(m=>m.id===e.id),a=fl(n,o?o.value:void 0);if(AP(i,a,e)){var l;return(l=r?.filter(m=>m.id!==e.id))!=null?l:[]}const d={id:e.id,value:a};if(o){var f;return(f=r?.map(m=>m.id===e.id?d:m))!=null?f:[]}return r!=null&&r.length?[...r,d]:[d]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),r=i=>{var o;return(o=fl(t,i))==null?void 0:o.filter(a=>{const l=n.find(d=>d.id===a.id);if(l){const d=l.getFilterFn();if(AP(d,a.value,l))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(r)},e.resetColumnFilters=t=>{var n,r;e.setColumnFilters(t?[]:(n=(r=e.initialState)==null?void 0:r.columnFilters)!=null?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())}};function AP(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const s1e=(e,t,n)=>n.reduce((r,i)=>{const o=i.getValue(e);return r+(typeof o=="number"?o:0)},0),l1e=(e,t,n)=>{let r;return n.forEach(i=>{const o=i.getValue(e);o!=null&&(r>o||r===void 0&&o>=o)&&(r=o)}),r},c1e=(e,t,n)=>{let r;return n.forEach(i=>{const o=i.getValue(e);o!=null&&(r<o||r===void 0&&o>=o)&&(r=o)}),r},u1e=(e,t,n)=>{let r,i;return n.forEach(o=>{const a=o.getValue(e);a!=null&&(r===void 0?a>=a&&(r=i=a):(r>a&&(r=a),i<a&&(i=a)))}),[r,i]},d1e=(e,t)=>{let n=0,r=0;if(t.forEach(i=>{let o=i.getValue(e);o!=null&&(o=+o)>=o&&(++n,r+=o)}),n)return r/n},f1e=(e,t)=>{if(!t.length)return;const n=t.map(o=>o.getValue(e));if(!Q_e(n))return;if(n.length===1)return n[0];const r=Math.floor(n.length/2),i=n.sort((o,a)=>o-a);return n.length%2!==0?i[r]:(i[r-1]+i[r])/2},p1e=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),m1e=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,h1e=(e,t)=>t.length,w1={sum:s1e,min:l1e,max:c1e,extent:u1e,mean:d1e,median:f1e,unique:p1e,uniqueCount:m1e,count:h1e},g1e={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return(t=(n=e.getValue())==null||n.toString==null?void 0:n.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:ro("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(n=>n!=null&&n.includes(e.id)?n.filter(r=>r!==e.id):[...n??[],e.id])},e.getCanGroup=()=>{var n,r;return((n=e.columnDef.enableGrouping)!=null?n:!0)&&((r=t.options.enableGrouping)!=null?r:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const n=e.getCanGroup();return()=>{n&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n?.getValue(e.id);if(typeof r=="number")return w1.sum;if(Object.prototype.toString.call(r)==="[object Date]")return w1.extent},e.getAggregationFn=()=>{var n,r;if(!e)throw new Error;return $0(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(n=(r=t.options.aggregationFns)==null?void 0:r[e.columnDef.aggregationFn])!=null?n:w1[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,r;e.setGrouping(t?[]:(n=(r=e.initialState)==null?void 0:r.grouping)!=null?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];const r=t.getColumn(n);return r!=null&&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 i;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((i=n.subRows)!=null&&i.length)}}};function v1e(e,t,n){if(!(t!=null&&t.length)||!n)return e;const r=e.filter(o=>!t.includes(o.id));return n==="remove"?r:[...t.map(o=>e.find(a=>a.id===o)).filter(Boolean),...r]}const y1e={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:ro("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=at(n=>[xm(t,n)],n=>n.findIndex(r=>r.id===e.id),st(t.options,"debugColumns")),e.getIsFirstColumn=n=>{var r;return((r=xm(t,n)[0])==null?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;const i=xm(t,n);return((r=i[i.length-1])==null?void 0:r.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:(n=e.initialState.columnOrder)!=null?n:[])},e._getOrderColumnsFn=at(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,r)=>i=>{let o=[];if(!(t!=null&&t.length))o=i;else{const a=[...t],l=[...i];for(;l.length&&a.length;){const d=a.shift(),f=l.findIndex(m=>m.id===d);f>-1&&o.push(l.splice(f,1)[0])}o=[...o,...l]}return v1e(o,n,r)},st(e.options,"debugTable"))}},S1=()=>({left:[],right:[]}),b1e={getInitialState:e=>({columnPinning:S1(),...e}),getDefaultOptions:e=>({onColumnPinningChange:ro("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const r=e.getLeafColumns().map(i=>i.id).filter(Boolean);t.setColumnPinning(i=>{var o,a;if(n==="right"){var l,d;return{left:((l=i?.left)!=null?l:[]).filter(h=>!(r!=null&&r.includes(h))),right:[...((d=i?.right)!=null?d:[]).filter(h=>!(r!=null&&r.includes(h))),...r]}}if(n==="left"){var f,m;return{left:[...((f=i?.left)!=null?f:[]).filter(h=>!(r!=null&&r.includes(h))),...r],right:((m=i?.right)!=null?m:[]).filter(h=>!(r!=null&&r.includes(h)))}}return{left:((o=i?.left)!=null?o:[]).filter(h=>!(r!=null&&r.includes(h))),right:((a=i?.right)!=null?a:[]).filter(h=>!(r!=null&&r.includes(h)))}})},e.getCanPin=()=>e.getLeafColumns().some(r=>{var i,o,a;return((i=r.columnDef.enablePinning)!=null?i:!0)&&((o=(a=t.options.enableColumnPinning)!=null?a:t.options.enablePinning)!=null?o:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(l=>l.id),{left:r,right:i}=t.getState().columnPinning,o=n.some(l=>r?.includes(l)),a=n.some(l=>i?.includes(l));return o?"left":a?"right":!1},e.getPinnedIndex=()=>{var n,r;const i=e.getIsPinned();return i?(n=(r=t.getState().columnPinning)==null||(r=r[i])==null?void 0:r.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=at(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,r,i)=>{const o=[...r??[],...i??[]];return n.filter(a=>!o.includes(a.column.id))},st(t.options,"debugRows")),e.getLeftVisibleCells=at(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,r)=>(r??[]).map(o=>n.find(a=>a.column.id===o)).filter(Boolean).map(o=>({...o,position:"left"})),st(t.options,"debugRows")),e.getRightVisibleCells=at(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,r)=>(r??[]).map(o=>n.find(a=>a.column.id===o)).filter(Boolean).map(o=>({...o,position:"right"})),st(t.options,"debugRows"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,r;return e.setColumnPinning(t?S1():(n=(r=e.initialState)==null?void 0:r.columnPinning)!=null?n:S1())},e.getIsSomeColumnsPinned=t=>{var n;const r=e.getState().columnPinning;if(!t){var i,o;return!!((i=r.left)!=null&&i.length||(o=r.right)!=null&&o.length)}return!!((n=r[t])!=null&&n.length)},e.getLeftLeafColumns=at(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(r=>t.find(i=>i.id===r)).filter(Boolean),st(e.options,"debugColumns")),e.getRightLeafColumns=at(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(r=>t.find(i=>i.id===r)).filter(Boolean),st(e.options,"debugColumns")),e.getCenterLeafColumns=at(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r)=>{const i=[...n??[],...r??[]];return t.filter(o=>!i.includes(o.id))},st(e.options,"debugColumns"))}};function x1e(e){return e||(typeof document<"u"?document:null)}const Xv={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},_1=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),w1e={getDefaultColumnDef:()=>Xv,getInitialState:e=>({columnSizing:{},columnSizingInfo:_1(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:ro("columnSizing",e),onColumnSizingInfoChange:ro("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,i;const o=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:Xv.minSize,(r=o??e.columnDef.size)!=null?r:Xv.size),(i=e.columnDef.maxSize)!=null?i:Xv.maxSize)},e.getStart=at(n=>[n,xm(t,n),t.getState().columnSizing],(n,r)=>r.slice(0,e.getIndex(n)).reduce((i,o)=>i+o.getSize(),0),st(t.options,"debugColumns")),e.getAfter=at(n=>[n,xm(t,n),t.getState().columnSizing],(n,r)=>r.slice(e.getIndex(n)+1).reduce((i,o)=>i+o.getSize(),0),st(t.options,"debugColumns")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:r,...i}=n;return i})},e.getCanResize=()=>{var n,r;return((n=e.columnDef.enableResizing)!=null?n:!0)&&((r=t.options.enableColumnResizing)!=null?r:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let n=0;const r=i=>{if(i.subHeaders.length)i.subHeaders.forEach(r);else{var o;n+=(o=i.column.getSize())!=null?o:0}};return r(e),n},e.getStart=()=>{if(e.index>0){const n=e.headerGroup.headers[e.index-1];return n.getStart()+n.getSize()}return 0},e.getResizeHandler=n=>{const r=t.getColumn(e.column.id),i=r?.getCanResize();return o=>{if(!r||!i||(o.persist==null||o.persist(),C1(o)&&o.touches&&o.touches.length>1))return;const a=e.getSize(),l=e?e.getLeafHeaders().map(k=>[k.column.id,k.column.getSize()]):[[r.id,r.getSize()]],d=C1(o)?Math.round(o.touches[0].clientX):o.clientX,f={},m=(k,E)=>{typeof E=="number"&&(t.setColumnSizingInfo(j=>{var I,A;const T=t.options.columnResizeDirection==="rtl"?-1:1,N=(E-((I=j?.startOffset)!=null?I:0))*T,D=Math.max(N/((A=j?.startSize)!=null?A:0),-.999999);return j.columnSizingStart.forEach(L=>{let[H,ee]=L;f[H]=Math.round(Math.max(ee+ee*D,0)*100)/100}),{...j,deltaOffset:N,deltaPercentage:D}}),(t.options.columnResizeMode==="onChange"||k==="end")&&t.setColumnSizing(j=>({...j,...f})))},h=k=>m("move",k),v=k=>{m("end",k),t.setColumnSizingInfo(E=>({...E,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},y=x1e(n),x={moveHandler:k=>h(k.clientX),upHandler:k=>{y?.removeEventListener("mousemove",x.moveHandler),y?.removeEventListener("mouseup",x.upHandler),v(k.clientX)}},S={moveHandler:k=>(k.cancelable&&(k.preventDefault(),k.stopPropagation()),h(k.touches[0].clientX),!1),upHandler:k=>{var E;y?.removeEventListener("touchmove",S.moveHandler),y?.removeEventListener("touchend",S.upHandler),k.cancelable&&(k.preventDefault(),k.stopPropagation()),v((E=k.touches[0])==null?void 0:E.clientX)}},C=S1e()?{passive:!1}:!1;C1(o)?(y?.addEventListener("touchmove",S.moveHandler,C),y?.addEventListener("touchend",S.upHandler,C)):(y?.addEventListener("mousemove",x.moveHandler,C),y?.addEventListener("mouseup",x.upHandler,C)),t.setColumnSizingInfo(k=>({...k,startOffset:d,startSize:a,deltaOffset:0,deltaPercentage:0,columnSizingStart:l,isResizingColumn:r.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:(n=e.initialState.columnSizing)!=null?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?_1():(n=e.initialState.columnSizingInfo)!=null?n:_1())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0}}};let Jv=null;function S1e(){if(typeof Jv=="boolean")return Jv;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch{e=!1}return Jv=e,Jv}function C1(e){return e.type==="touchstart"}const _1e={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:ro("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(r=>({...r,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{var n,r;const i=e.columns;return(n=i.length?i.some(o=>o.getIsVisible()):(r=t.getState().columnVisibility)==null?void 0:r[e.id])!=null?n:!0},e.getCanHide=()=>{var n,r;return((n=e.columnDef.enableHiding)!=null?n:!0)&&((r=t.options.enableHiding)!=null?r:!0)},e.getToggleVisibilityHandler=()=>n=>{e.toggleVisibility==null||e.toggleVisibility(n.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=at(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(r=>r.column.getIsVisible()),st(t.options,"debugRows")),e.getVisibleCells=at(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,r,i)=>[...n,...r,...i],st(t.options,"debugRows"))},createTable:e=>{const t=(n,r)=>at(()=>[r(),r().filter(i=>i.getIsVisible()).map(i=>i.id).join("_")],i=>i.filter(o=>o.getIsVisible==null?void 0:o.getIsVisible()),st(e.options,"debugColumns"));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=n=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(n),e.resetColumnVisibility=n=>{var r;e.setColumnVisibility(n?{}:(r=e.initialState.columnVisibility)!=null?r:{})},e.toggleAllColumnsVisible=n=>{var r;n=(r=n)!=null?r:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((i,o)=>({...i,[o.id]:n||!(o.getCanHide!=null&&o.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>n=>{var r;e.toggleAllColumnsVisible((r=n.target)==null?void 0:r.checked)}}};function xm(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const C1e={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()}}},k1e={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:ro("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const r=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof r=="string"||typeof r=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,r,i,o;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((r=t.options.enableGlobalFilter)!=null?r:!0)&&((i=t.options.enableFilters)!=null?i:!0)&&((o=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?o:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>is.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:r}=e.options;return $0(r)?r:r==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[r])!=null?t:is[r]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},E1e={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:ro("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var r,i;if(!t){e._queue(()=>{t=!0});return}if((r=(i=e.options.autoResetAll)!=null?i:e.options.autoResetExpanded)!=null?r:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=r=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(r),e.toggleAllRowsExpanded=r=>{r??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=r=>{var i,o;e.setExpanded(r?{}:(i=(o=e.initialState)==null?void 0:o.expanded)!=null?i:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(r=>r.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>r=>{r.persist==null||r.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const r=e.getState().expanded;return r===!0||Object.values(r).some(Boolean)},e.getIsAllRowsExpanded=()=>{const r=e.getState().expanded;return typeof r=="boolean"?r===!0:!(!Object.keys(r).length||e.getRowModel().flatRows.some(i=>!i.getIsExpanded()))},e.getExpandedDepth=()=>{let r=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(o=>{const a=o.split(".");r=Math.max(r,a.length)}),r},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;const o=r===!0?!0:!!(r!=null&&r[e.id]);let a={};if(r===!0?Object.keys(t.getRowModel().rowsById).forEach(l=>{a[l]=!0}):a=r,n=(i=n)!=null?i:!o,!o&&n)return{...a,[e.id]:!0};if(o&&!n){const{[e.id]:l,...d}=a;return d}return r})},e.getIsExpanded=()=>{var n;const r=t.getState().expanded;return!!((n=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?n:r===!0||r?.[e.id])},e.getCanExpand=()=>{var n,r,i;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((r=t.options.enableExpanding)!=null?r:!0)&&!!((i=e.subRows)!=null&&i.length)},e.getIsAllParentsExpanded=()=>{let n=!0,r=e;for(;n&&r.parentId;)r=t.getRow(r.parentId,!0),n=r.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const n=e.getCanExpand();return()=>{n&&e.toggleExpanded()}}}},yk=0,bk=10,k1=()=>({pageIndex:yk,pageSize:bk}),j1e={getInitialState:e=>({...e,pagination:{...k1(),...e?.pagination}}),getDefaultOptions:e=>({onPaginationChange:ro("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var r,i;if(!t){e._queue(()=>{t=!0});return}if((r=(i=e.options.autoResetAll)!=null?i:e.options.autoResetPageIndex)!=null?r:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=r=>{const i=o=>fl(r,o);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(i)},e.resetPagination=r=>{var i;e.setPagination(r?k1():(i=e.initialState.pagination)!=null?i:k1())},e.setPageIndex=r=>{e.setPagination(i=>{let o=fl(r,i.pageIndex);const a=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return o=Math.max(0,Math.min(o,a)),{...i,pageIndex:o}})},e.resetPageIndex=r=>{var i,o;e.setPageIndex(r?yk:(i=(o=e.initialState)==null||(o=o.pagination)==null?void 0:o.pageIndex)!=null?i:yk)},e.resetPageSize=r=>{var i,o;e.setPageSize(r?bk:(i=(o=e.initialState)==null||(o=o.pagination)==null?void 0:o.pageSize)!=null?i:bk)},e.setPageSize=r=>{e.setPagination(i=>{const o=Math.max(1,fl(r,i.pageSize)),a=i.pageSize*i.pageIndex,l=Math.floor(a/o);return{...i,pageIndex:l,pageSize:o}})},e.setPageCount=r=>e.setPagination(i=>{var o;let a=fl(r,(o=e.options.pageCount)!=null?o:-1);return typeof a=="number"&&(a=Math.max(-1,a)),{...i,pageCount:a}}),e.getPageOptions=at(()=>[e.getPageCount()],r=>{let i=[];return r&&r>0&&(i=[...new Array(r)].fill(null).map((o,a)=>a)),i},st(e.options,"debugTable")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:r}=e.getState().pagination,i=e.getPageCount();return i===-1?!0:i===0?!1:r<i-1},e.previousPage=()=>e.setPageIndex(r=>r-1),e.nextPage=()=>e.setPageIndex(r=>r+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 r;return(r=e.options.pageCount)!=null?r:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var r;return(r=e.options.rowCount)!=null?r:e.getPrePaginationRowModel().rows.length}}},E1=()=>({top:[],bottom:[]}),R1e={getInitialState:e=>({rowPinning:E1(),...e}),getDefaultOptions:e=>({onRowPinningChange:ro("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,r,i)=>{const o=r?e.getLeafRows().map(d=>{let{id:f}=d;return f}):[],a=i?e.getParentRows().map(d=>{let{id:f}=d;return f}):[],l=new Set([...a,e.id,...o]);t.setRowPinning(d=>{var f,m;if(n==="bottom"){var h,v;return{top:((h=d?.top)!=null?h:[]).filter(S=>!(l!=null&&l.has(S))),bottom:[...((v=d?.bottom)!=null?v:[]).filter(S=>!(l!=null&&l.has(S))),...Array.from(l)]}}if(n==="top"){var y,x;return{top:[...((y=d?.top)!=null?y:[]).filter(S=>!(l!=null&&l.has(S))),...Array.from(l)],bottom:((x=d?.bottom)!=null?x:[]).filter(S=>!(l!=null&&l.has(S)))}}return{top:((f=d?.top)!=null?f:[]).filter(S=>!(l!=null&&l.has(S))),bottom:((m=d?.bottom)!=null?m:[]).filter(S=>!(l!=null&&l.has(S)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:r,enablePinning:i}=t.options;return typeof r=="function"?r(e):(n=r??i)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:r,bottom:i}=t.getState().rowPinning,o=n.some(l=>r?.includes(l)),a=n.some(l=>i?.includes(l));return o?"top":a?"bottom":!1},e.getPinnedIndex=()=>{var n,r;const i=e.getIsPinned();if(!i)return-1;const o=(n=i==="top"?t.getTopRows():t.getBottomRows())==null?void 0:n.map(a=>{let{id:l}=a;return l});return(r=o?.indexOf(e.id))!=null?r:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,r;return e.setRowPinning(t?E1():(n=(r=e.initialState)==null?void 0:r.rowPinning)!=null?n:E1())},e.getIsSomeRowsPinned=t=>{var n;const r=e.getState().rowPinning;if(!t){var i,o;return!!((i=r.top)!=null&&i.length||(o=r.bottom)!=null&&o.length)}return!!((n=r[t])!=null&&n.length)},e._getPinnedRows=(t,n,r)=>{var i;return((i=e.options.keepPinnedRows)==null||i?(n??[]).map(a=>{const l=e.getRow(a,!0);return l.getIsAllParentsExpanded()?l:null}):(n??[]).map(a=>t.find(l=>l.id===a))).filter(Boolean).map(a=>({...a,position:r}))},e.getTopRows=at(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),st(e.options,"debugRows")),e.getBottomRows=at(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),st(e.options,"debugRows")),e.getCenterRows=at(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,r)=>{const i=new Set([...n??[],...r??[]]);return t.filter(o=>!i.has(o.id))},st(e.options,"debugRows"))}},I1e={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:ro("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:(n=e.initialState.rowSelection)!=null?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const r={...n},i=e.getPreGroupedRowModel().flatRows;return t?i.forEach(o=>{o.getCanSelect()&&(r[o.id]=!0)}):i.forEach(o=>{delete r[o.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const r=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),i={...n};return e.getRowModel().rows.forEach(o=>{xk(i,o.id,r,!0,e)}),i}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=at(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?j1(e,n):{rows:[],flatRows:[],rowsById:{}},st(e.options,"debugTable")),e.getFilteredSelectedRowModel=at(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?j1(e,n):{rows:[],flatRows:[],rowsById:{}},st(e.options,"debugTable")),e.getGroupedSelectedRowModel=at(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?j1(e,n):{rows:[],flatRows:[],rowsById:{}},st(e.options,"debugTable")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let r=!!(t.length&&Object.keys(n).length);return r&&t.some(i=>i.getCanSelect()&&!n[i.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(i=>i.getCanSelect()),{rowSelection:n}=e.getState();let r=!!t.length;return r&&t.some(i=>!n[i.id])&&(r=!1),r},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return n>0&&n<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,r)=>{const i=e.getIsSelected();t.setRowSelection(o=>{var a;if(n=typeof n<"u"?n:!i,e.getCanSelect()&&i===n)return o;const l={...o};return xk(l,e.id,n,(a=r?.selectChildren)!=null?a:!0,t),l})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return zI(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return wk(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return wk(e,n)==="all"},e.getCanSelect=()=>{var n;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(n=t.options.enableRowSelection)!=null?n:!0},e.getCanSelectSubRows=()=>{var n;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(n=t.options.enableSubRowSelection)!=null?n:!0},e.getCanMultiSelect=()=>{var n;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(n=t.options.enableMultiRowSelection)!=null?n:!0},e.getToggleSelectedHandler=()=>{const n=e.getCanSelect();return r=>{var i;n&&e.toggleSelected((i=r.target)==null?void 0:i.checked)}}}},xk=(e,t,n,r,i)=>{var o;const a=i.getRow(t,!0);n?(a.getCanMultiSelect()||Object.keys(e).forEach(l=>delete e[l]),a.getCanSelect()&&(e[t]=!0)):delete e[t],r&&(o=a.subRows)!=null&&o.length&&a.getCanSelectSubRows()&&a.subRows.forEach(l=>xk(e,l.id,n,r,i))};function j1(e,t){const n=e.getState().rowSelection,r=[],i={},o=function(a,l){return a.map(d=>{var f;const m=zI(d,n);if(m&&(r.push(d),i[d.id]=d),(f=d.subRows)!=null&&f.length&&(d={...d,subRows:o(d.subRows)}),m)return d}).filter(Boolean)};return{rows:o(t.rows),flatRows:r,rowsById:i}}function zI(e,t){var n;return(n=t[e.id])!=null?n:!1}function wk(e,t,n){var r;if(!((r=e.subRows)!=null&&r.length))return!1;let i=!0,o=!1;return e.subRows.forEach(a=>{if(!(o&&!i)&&(a.getCanSelect()&&(zI(a,t)?o=!0:i=!1),a.subRows&&a.subRows.length)){const l=wk(a,t);l==="all"?o=!0:(l==="some"&&(o=!0),i=!1)}}),i?"all":o?"some":!1}const Sk=/([0-9]+)/gm,T1e=(e,t,n)=>Mq(Tl(e.getValue(n)).toLowerCase(),Tl(t.getValue(n)).toLowerCase()),N1e=(e,t,n)=>Mq(Tl(e.getValue(n)),Tl(t.getValue(n))),A1e=(e,t,n)=>LI(Tl(e.getValue(n)).toLowerCase(),Tl(t.getValue(n)).toLowerCase()),O1e=(e,t,n)=>LI(Tl(e.getValue(n)),Tl(t.getValue(n))),D1e=(e,t,n)=>{const r=e.getValue(n),i=t.getValue(n);return r>i?1:r<i?-1:0},$1e=(e,t,n)=>LI(e.getValue(n),t.getValue(n));function LI(e,t){return e===t?0:e>t?1:-1}function Tl(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function Mq(e,t){const n=e.split(Sk).filter(Boolean),r=t.split(Sk).filter(Boolean);for(;n.length&&r.length;){const i=n.shift(),o=r.shift(),a=parseInt(i,10),l=parseInt(o,10),d=[a,l].sort();if(isNaN(d[0])){if(i>o)return 1;if(o>i)return-1;continue}if(isNaN(d[1]))return isNaN(a)?-1:1;if(a>l)return 1;if(l>a)return-1}return n.length-r.length}const Xp={alphanumeric:T1e,alphanumericCaseSensitive:N1e,text:A1e,textCaseSensitive:O1e,datetime:D1e,basic:$1e},P1e={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:ro("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const i of n){const o=i?.getValue(e.id);if(Object.prototype.toString.call(o)==="[object Date]")return Xp.datetime;if(typeof o=="string"&&(r=!0,o.split(Sk).length>1))return Xp.alphanumeric}return r?Xp.text:Xp.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof n?.getValue(e.id)=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,r;if(!e)throw new Error;return $0(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(n=(r=t.options.sortingFns)==null?void 0:r[e.columnDef.sortingFn])!=null?n:Xp[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{const i=e.getNextSortingOrder(),o=typeof n<"u"&&n!==null;t.setSorting(a=>{const l=a?.find(y=>y.id===e.id),d=a?.findIndex(y=>y.id===e.id);let f=[],m,h=o?n:i==="desc";if(a!=null&&a.length&&e.getCanMultiSort()&&r?l?m="toggle":m="add":a!=null&&a.length&&d!==a.length-1?m="replace":l?m="toggle":m="replace",m==="toggle"&&(o||i||(m="remove")),m==="add"){var v;f=[...a,{id:e.id,desc:h}],f.splice(0,f.length-((v=t.options.maxMultiSortColCount)!=null?v:Number.MAX_SAFE_INTEGER))}else m==="toggle"?f=a.map(y=>y.id===e.id?{...y,desc:h}:y):m==="remove"?f=a.filter(y=>y.id!==e.id):f=[{id:e.id,desc:h}];return f})},e.getFirstSortDir=()=>{var n,r;return((n=(r=e.columnDef.sortDescFirst)!=null?r:t.options.sortDescFirst)!=null?n:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=n=>{var r,i;const o=e.getFirstSortDir(),a=e.getIsSorted();return a?a!==o&&((r=t.options.enableSortingRemoval)==null||r)&&(!(n&&(i=t.options.enableMultiRemove)!=null)||i)?!1:a==="desc"?"asc":"desc":o},e.getCanSort=()=>{var n,r;return((n=e.columnDef.enableSorting)!=null?n:!0)&&((r=t.options.enableSorting)!=null?r:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,r;return(n=(r=e.columnDef.enableMultiSort)!=null?r:t.options.enableMultiSort)!=null?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const r=(n=t.getState().sorting)==null?void 0:n.find(i=>i.id===e.id);return r?r.desc?"desc":"asc":!1},e.getSortIndex=()=>{var n,r;return(n=(r=t.getState().sorting)==null?void 0:r.findIndex(i=>i.id===e.id))!=null?n:-1},e.clearSorting=()=>{t.setSorting(n=>n!=null&&n.length?n.filter(r=>r.id!==e.id):[])},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return r=>{n&&(r.persist==null||r.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(r):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,r;e.setSorting(t?[]:(n=(r=e.initialState)==null?void 0:r.sorting)!=null?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())}},M1e=[r1e,_1e,y1e,b1e,o1e,a1e,C1e,k1e,P1e,g1e,E1e,j1e,R1e,I1e,w1e];function z1e(e){var t,n;const r=[...M1e,...(t=e._features)!=null?t:[]];let i={_features:r};const o=i._features.reduce((v,y)=>Object.assign(v,y.getDefaultOptions==null?void 0:y.getDefaultOptions(i)),{}),a=v=>i.options.mergeOptions?i.options.mergeOptions(o,v):{...o,...v};let d={...{},...(n=e.initialState)!=null?n:{}};i._features.forEach(v=>{var y;d=(y=v.getInitialState==null?void 0:v.getInitialState(d))!=null?y:d});const f=[];let m=!1;const h={_features:r,options:{...o,...e},initialState:d,_queue:v=>{f.push(v),m||(m=!0,Promise.resolve().then(()=>{for(;f.length;)f.shift()();m=!1}).catch(y=>setTimeout(()=>{throw y})))},reset:()=>{i.setState(i.initialState)},setOptions:v=>{const y=fl(v,i.options);i.options=a(y)},getState:()=>i.options.state,setState:v=>{i.options.onStateChange==null||i.options.onStateChange(v)},_getRowId:(v,y,x)=>{var S;return(S=i.options.getRowId==null?void 0:i.options.getRowId(v,y,x))!=null?S:`${x?[x.id,y].join("."):y}`},getCoreRowModel:()=>(i._getCoreRowModel||(i._getCoreRowModel=i.options.getCoreRowModel(i)),i._getCoreRowModel()),getRowModel:()=>i.getPaginationRowModel(),getRow:(v,y)=>{let x=(y?i.getPrePaginationRowModel():i.getRowModel()).rowsById[v];if(!x&&(x=i.getCoreRowModel().rowsById[v],!x))throw new Error;return x},_getDefaultColumnDef:at(()=>[i.options.defaultColumn],v=>{var y;return v=(y=v)!=null?y:{},{header:x=>{const S=x.header.column.columnDef;return S.accessorKey?S.accessorKey:S.accessorFn?S.id:null},cell:x=>{var S,C;return(S=(C=x.renderValue())==null||C.toString==null?void 0:C.toString())!=null?S:null},...i._features.reduce((x,S)=>Object.assign(x,S.getDefaultColumnDef==null?void 0:S.getDefaultColumnDef()),{}),...v}},st(e,"debugColumns")),_getColumnDefs:()=>i.options.columns,getAllColumns:at(()=>[i._getColumnDefs()],v=>{const y=function(x,S,C){return C===void 0&&(C=0),x.map(k=>{const E=n1e(i,k,C,S),j=k;return E.columns=j.columns?y(j.columns,E,C+1):[],E})};return y(v)},st(e,"debugColumns")),getAllFlatColumns:at(()=>[i.getAllColumns()],v=>v.flatMap(y=>y.getFlatColumns()),st(e,"debugColumns")),_getAllFlatColumnsById:at(()=>[i.getAllFlatColumns()],v=>v.reduce((y,x)=>(y[x.id]=x,y),{}),st(e,"debugColumns")),getAllLeafColumns:at(()=>[i.getAllColumns(),i._getOrderColumnsFn()],(v,y)=>{let x=v.flatMap(S=>S.getLeafColumns());return y(x)},st(e,"debugColumns")),getColumn:v=>i._getAllFlatColumnsById()[v]};Object.assign(i,h);for(let v=0;v<i._features.length;v++){const y=i._features[v];y==null||y.createTable==null||y.createTable(i)}return i}function P0(){return e=>at(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(i,o,a){o===void 0&&(o=0);const l=[];for(let f=0;f<i.length;f++){const m=i1e(e,e._getRowId(i[f],f,a),i[f],f,o,void 0,a?.id);if(n.flatRows.push(m),n.rowsById[m.id]=m,l.push(m),e.options.getSubRows){var d;m.originalSubRows=e.options.getSubRows(i[f],f),(d=m.originalSubRows)!=null&&d.length&&(m.subRows=r(m.originalSubRows,o+1,m))}}return l};return n.rows=r(t),n},st(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function L1e(e){const t=[],n=r=>{var i;t.push(r),(i=r.subRows)!=null&&i.length&&r.getIsExpanded()&&r.subRows.forEach(n)};return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}function F1e(e){return t=>at(()=>[t.getState().pagination,t.getPrePaginationRowModel(),t.options.paginateExpandedRows?void 0:t.getState().expanded],(n,r)=>{if(!r.rows.length)return r;const{pageSize:i,pageIndex:o}=n;let{rows:a,flatRows:l,rowsById:d}=r;const f=i*o,m=f+i;a=a.slice(f,m);let h;t.options.paginateExpandedRows?h={rows:a,flatRows:l,rowsById:d}:h=L1e({rows:a,flatRows:l,rowsById:d}),h.flatRows=[];const v=y=>{h.flatRows.push(y),y.subRows.length&&y.subRows.forEach(v)};return h.rows.forEach(v),h},st(t.options,"debugTable"))}function U1e(){return e=>at(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,n)=>{if(!n.rows.length||!(t!=null&&t.length))return n;const r=e.getState().sorting,i=[],o=r.filter(d=>{var f;return(f=e.getColumn(d.id))==null?void 0:f.getCanSort()}),a={};o.forEach(d=>{const f=e.getColumn(d.id);f&&(a[d.id]={sortUndefined:f.columnDef.sortUndefined,invertSorting:f.columnDef.invertSorting,sortingFn:f.getSortingFn()})});const l=d=>{const f=d.map(m=>({...m}));return f.sort((m,h)=>{for(let y=0;y<o.length;y+=1){var v;const x=o[y],S=a[x.id],C=S.sortUndefined,k=(v=x?.desc)!=null?v:!1;let E=0;if(C){const j=m.getValue(x.id),I=h.getValue(x.id),A=j===void 0,T=I===void 0;if(A||T){if(C==="first")return A?-1:1;if(C==="last")return A?1:-1;E=A&&T?0:A?C:-C}}if(E===0&&(E=S.sortingFn(m,h,x.id)),E!==0)return k&&(E*=-1),S.invertSorting&&(E*=-1),E}return m.index-h.index}),f.forEach(m=>{var h;i.push(m),(h=m.subRows)!=null&&h.length&&(m.subRows=l(m.subRows))}),f};return{rows:l(n.rows),flatRows:i,rowsById:n.rowsById}},st(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}function Xc(e,t){return e?V1e(e)?b.createElement(e,t):e:null}function V1e(e){return B1e(e)||typeof e=="function"||H1e(e)}function B1e(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function H1e(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function M0(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=b.useState(()=>({current:z1e(t)})),[r,i]=b.useState(()=>n.current.initialState);return n.current.setOptions(o=>({...o,...e,state:{...r,...e.state},onStateChange:a=>{i(a),e.onStateChange==null||e.onStateChange(a)}})),n.current}function z0({className:e,containerClassName:t,...n}){return c.jsx("div",{"data-slot":"table-container",className:Ve("relative w-full overflow-x-auto",t),children:c.jsx("table",{"data-slot":"table",className:Ve("w-full caption-bottom text-sm",e),...n})})}function eg({className:e,...t}){return c.jsx("thead",{"data-slot":"table-header",className:Ve("[&_tr]:border-b",e),...t})}function L0({className:e,...t}){return c.jsx("tbody",{"data-slot":"table-body",className:Ve("[&_tr:last-child]:border-0",e),...t})}function Xi({className:e,...t}){return c.jsx("tr",{"data-slot":"table-row",className:Ve("border-b border-grey-700 transition-colors",e),...t})}function FI({className:e,...t}){return c.jsx("th",{"data-slot":"table-head",className:Ve("h-10 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}function zq({header:e,onColumnClick:t,...n}){const r=b.useCallback(()=>{e.column.toggleSorting(e.column.getIsSorted()==="asc");const d=e.column.getIsSorted()===!1||e.column.getIsSorted()!=="asc";t?.(e.column.columnDef.accessorKey,d)},[e,t]),i=e.column.columnDef.enableSorting,o=e.column.columnDef.enableResizing,a=e.isPlaceholder?null:Xc(e.column.columnDef.header,e.getContext()),l=b.useCallback(()=>{e.column.resetSize()},[e]);return c.jsx(FI,{...n,style:{width:`${e.getSize()}px`},className:i?"px-0":"px-2",children:c.jsxs("div",{className:"flex items-center justify-between",children:[i?c.jsxs(he,{type:"button",variant:"ghost",className:Ve("rounded-none",!e.column.getIsSorted()||e.column.getIsSorted()==="asc"?"cursor-n-resize":"cursor-s-resize"),onClick:r,children:[a,e.column.getIsSorted()==="asc"?c.jsx(lte,{}):e.column.getIsSorted()==="desc"?c.jsx(qb,{}):c.jsx(ate,{className:"text-gray-600"})]}):a,o&&c.jsx(he,{type:"button",variant:"ghost",className:"cursor-col-resize",onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),onDoubleClick:l,style:{transform:e.column.getIsResizing()?`translateX(${e.getContext().table.getState().columnSizingInfo.deltaOffset}px)`:""},children:c.jsx(rne,{})})]})})}function Ss({className:e,...t}){return c.jsx("td",{"data-slot":"table-cell",className:Ve("align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}function Kl({columns:e,data:t,isFetching:n,onRowClick:r,onColumnClick:i,sortingState:o,children:a}){const l=M0({data:t,columns:e,getCoreRowModel:P0(),getSortedRowModel:U1e(),initialState:{sorting:o}});return c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"flex items-center justify-end space-x-2 pb-4",children:[c.jsx("div",{className:"grow lg:hidden"}),a,c.jsx("div",{className:"grow hidden lg:visible"})]}),c.jsxs(z0,{containerClassName:"rounded-md bg-black-dark",children:[c.jsx(eg,{children:l.getHeaderGroups().map(d=>c.jsx(Xi,{className:"border-none",children:d.headers.map(f=>c.jsx(zq,{header:f,onColumnClick:i},f.id))},d.id))}),c.jsx(L0,{className:"bg-black border border-grey-700",children:l.getRowModel().rows?.length?l.getRowModel().rows.map(d=>c.jsx(Xi,{"data-state":d.getIsSelected()&&"selected",onClick:()=>r?.(d),className:Ve("hover:bg-muted/10 data-[state=selected]:bg-muted",r&&"cursor-pointer"),children:d.getVisibleCells().map(f=>c.jsx(Ss,{className:"py-2 px-2 overflow-x-hidden max-w-32 text-ellipsis whitespace-nowrap",style:{width:`${f.column.getSize()}px`},children:Xc(f.column.columnDef.cell,f.getContext())},f.id))},d.id)):c.jsx(Xi,{children:c.jsx(Ss,{colSpan:e.length,className:"h-24 text-center",children:n?c.jsx("div",{children:c.jsx(ao,{className:"p-12"})}):c.jsx("span",{children:"No results."})})})})]})]})}function q1e(e){switch(e){case"paid":return"success";case"void":case"uncollectible":return"destructive";default:return"default"}}function R1(e){return new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(e)}function Dc(e,t){if(e<45)return"a few seconds ago";if(e<120)return"a minute ago";const n=Math.floor(e/60);if(n<60)return`${n} minutes ago`;if(n<120)return"an hour ago";const r=Math.floor(e/3600);return r>48?new Date(t).toLocaleString():`${r} hours ago`}const K1e=[{header:"Invoice Id",accessorKey:"id",enableSorting:!1},{header:"Status",accessorKey:"status",enableSorting:!1,cell:({cell:e})=>c.jsx(ra,{variant:q1e(e.getValue()),children:e.getValue()})},{header:"Date",accessorKey:"periodStart",enableSorting:!1,cell:({cell:e})=>{const t=e.row.original.periodStart*1e3,n=e.row.original.periodEnd*1e3,r=(Date.now()-t)/1e3,i=(Date.now()-n)/1e3;return Math.abs(r-i)<1e3?Dc(r,t):[t?Dc(r,t):"-",n?Dc(i,n):"-"].join(" to ")}},{header:"Amount Due",accessorKey:"amountDue",enableSorting:!1,cell:({cell:e})=>R1(e.getValue()?e.getValue()/100:0)},{header:"Amount Paid",accessorKey:"amountPaid",enableSorting:!1,cell:({cell:e})=>R1(e.getValue()?e.getValue()/100:0)},{header:"Lines",accessorKey:"lines",enableSorting:!1,cell:({cell:e})=>{const t=e.getValue(),n=[];for(const r of t)n.push(`${r.quantity}x ${r.description} @ ${R1(r.amount/100)}`);return n.join(`
134
+ `)}}];function Da(e){return b.useCallback(async()=>{ye.loading("Refreshing...",{id:"refreshing"});const t=Date.now();await e(),Date.now()-t<500&&await Qc(500),ye.success("Refreshed!",{id:"refreshing"})},[e])}async function G1e(e){const{data:t}=await $t.get(`/Invoice/${e}`);return t}function Z1e(e,t){return{queryKey:[e,"invoices"],queryFn:()=>G1e(e),retry:!1,enabled:!!e,refetchInterval:void 0}}function Y1e(){const{organizationId:e}=nt({strict:!1}),{data:t}=Dt(vu(e)),{data:n,refetch:r,isLoading:i,isFetching:o,isRefetching:a}=Dt(Z1e(t?.type!==Km&&t?.id)),l=Da(r);return t?.type===Km?c.jsxs("span",{children:["You are part of an enterprise organization! We don’t currently show your invoices on this page. Want to explore your solution with Harper more? ",c.jsx(Il,{}),", we would love to talk!"]}):i?c.jsx(ao,{centered:!0}):!n||!n.length?c.jsxs("span",{children:["Your invoices will be shown here once one is available! Want to explore your solution with Harper more?"," ",c.jsx(Il,{overEmail:!0}),", we would love to talk!"]}):c.jsx(Kl,{data:n,columns:K1e,children:c.jsxs(he,{variant:"defaultOutline",onClick:l,accessKey:"r",disabled:o||a,children:[c.jsx($o,{}),c.jsxs("span",{className:"hidden lg:inline-block",children:[c.jsx("u",{children:"R"}),"efresh"]})]})})}function W1e(e){const t=Qe({getParentRoute:()=>e,path:"billing",component:W_e}),n=Qe({getParentRoute:()=>t,path:"/",component:H9}),r=Qe({getParentRoute:()=>t,path:"invoices",component:Y1e}),i=Qe({getParentRoute:()=>t,path:"confirm",component:Y_e});return t.addChildren([n,r,i])}async function X1e(e){const{data:t}=await $t.get(`/OrganizationRole/${e}`);return t}function F0(e){return{queryKey:[e,"roles"],queryFn:()=>X1e(e),retry:!1,refetchInterval:10*1e3}}const J1e=Uf(),Q1e=[{header:"Role Name",accessorKey:"roleName",enableSorting:!1},J1e.display({header:"Users Assigned",enableSorting:!1,id:"userIds",cell:e=>!e.row.original.userIds||e.row.original.userIds.length===0?"No users assigned":e.row.original.userIds.length})];async function eCe(e){const{data:t}=await $t.post("/Role/",e);return t}function tCe(){return ot({mutationFn:eCe})}const Lq=Mt({name:Xe().nonempty({error:"Please enter a role name."}).regex(/^[a-zA-Z_]*$/,{error:"Role must contain only letters and underscores."}).max(30,{error:"Role name cannot be longer than 30 characters."}),update:Xt(),delete:Xt()});Mt({roles:Mt({create:Xt(),delete:Xt(),update:Xt(),view:Xt()}),clusters:Mt({create:Xt(),delete:Xt(),update:Xt(),view:Xt(),resources:ws(Mt({id:Xe(),delete:Xt(),update:Xt(),view:Xt(),instances:Mt({create:Xt(),delete:Xt(),update:Xt(),view:Xt()})}))})});function nCe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function OP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function DP(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?OP(Object(n),!0).forEach(function(r){nCe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):OP(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function rCe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function iCe(e,t){if(e==null)return{};var n=rCe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function oCe(e,t){return aCe(e)||sCe(e,t)||lCe(e,t)||cCe()}function aCe(e){if(Array.isArray(e))return e}function sCe(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,i=!1,o=void 0;try{for(var a=e[Symbol.iterator](),l;!(r=(l=a.next()).done)&&(n.push(l.value),!(t&&n.length===t));r=!0);}catch(d){i=!0,o=d}finally{try{!r&&a.return!=null&&a.return()}finally{if(i)throw o}}return n}}function lCe(e,t){if(e){if(typeof e=="string")return $P(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $P(e,t)}}function $P(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function cCe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
135
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function uCe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function PP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function MP(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?PP(Object(n),!0).forEach(function(r){uCe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PP(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function dCe(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){return t.reduceRight(function(i,o){return o(i)},r)}}function um(e){return function t(){for(var n=this,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return i.length>=e.length?e.apply(this,i):function(){for(var a=arguments.length,l=new Array(a),d=0;d<a;d++)l[d]=arguments[d];return t.apply(n,[].concat(i,l))}}}function vb(e){return{}.toString.call(e).includes("Object")}function fCe(e){return!Object.keys(e).length}function Gm(e){return typeof e=="function"}function pCe(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function mCe(e,t){return vb(t)||wl("changeType"),Object.keys(t).some(function(n){return!pCe(e,n)})&&wl("changeField"),t}function hCe(e){Gm(e)||wl("selectorType")}function gCe(e){Gm(e)||vb(e)||wl("handlerType"),vb(e)&&Object.values(e).some(function(t){return!Gm(t)})&&wl("handlersType")}function vCe(e){e||wl("initialIsRequired"),vb(e)||wl("initialType"),fCe(e)&&wl("initialContent")}function yCe(e,t){throw new Error(e[t]||e.default)}var bCe={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},wl=um(yCe)(bCe),Qv={changes:mCe,selector:hCe,handler:gCe,initial:vCe};function xCe(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Qv.initial(e),Qv.handler(t);var n={current:e},r=um(_Ce)(n,t),i=um(SCe)(n),o=um(Qv.changes)(e),a=um(wCe)(n);function l(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(m){return m};return Qv.selector(f),f(n.current)}function d(f){dCe(r,i,o,a)(f)}return[l,d]}function wCe(e,t){return Gm(t)?t(e.current):t}function SCe(e,t){return e.current=MP(MP({},e.current),t),t}function _Ce(e,t,n){return Gm(t)?t(e.current):Object.keys(n).forEach(function(r){var i;return(i=t[r])===null||i===void 0?void 0:i.call(t,e.current[r])}),n}var CCe={create:xCe},kCe={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/min/vs"}};function ECe(e){return function t(){for(var n=this,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return i.length>=e.length?e.apply(this,i):function(){for(var a=arguments.length,l=new Array(a),d=0;d<a;d++)l[d]=arguments[d];return t.apply(n,[].concat(i,l))}}}function jCe(e){return{}.toString.call(e).includes("Object")}function RCe(e){return e||zP("configIsRequired"),jCe(e)||zP("configType"),e.urls?(ICe(),{paths:{vs:e.urls.monacoBase}}):e}function ICe(){console.warn(Fq.deprecation)}function TCe(e,t){throw new Error(e[t]||e.default)}var Fq={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
136
+ You are using deprecated way of configuration.
137
+
138
+ Instead of using
139
+ monaco.config({ urls: { monacoBase: '...' } })
140
+ use
141
+ monaco.config({ paths: { vs: '...' } })
142
+
143
+ For more please check the link https://github.com/suren-atoyan/monaco-loader#config
144
+ `},zP=ECe(TCe)(Fq),NCe={config:RCe},ACe=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(i){return n.reduceRight(function(o,a){return a(o)},i)}};function Uq(e,t){return Object.keys(t).forEach(function(n){t[n]instanceof Object&&e[n]&&Object.assign(t[n],Uq(e[n],t[n]))}),DP(DP({},e),t)}var OCe={type:"cancelation",msg:"operation is manually canceled"};function I1(e){var t=!1,n=new Promise(function(r,i){e.then(function(o){return t?i(OCe):r(o)}),e.catch(i)});return n.cancel=function(){return t=!0},n}var DCe=CCe.create({config:kCe,isInitialized:!1,resolve:null,reject:null,monaco:null}),Vq=oCe(DCe,2),tg=Vq[0],U0=Vq[1];function $Ce(e){var t=NCe.config(e),n=t.monaco,r=iCe(t,["monaco"]);U0(function(i){return{config:Uq(i.config,r),monaco:n}})}function PCe(){var e=tg(function(t){var n=t.monaco,r=t.isInitialized,i=t.resolve;return{monaco:n,isInitialized:r,resolve:i}});if(!e.isInitialized){if(U0({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),I1(T1);if(window.monaco&&window.monaco.editor)return Bq(window.monaco),e.resolve(window.monaco),I1(T1);ACe(MCe,LCe)(FCe)}return I1(T1)}function MCe(e){return document.body.appendChild(e)}function zCe(e){var t=document.createElement("script");return e&&(t.src=e),t}function LCe(e){var t=tg(function(r){var i=r.config,o=r.reject;return{config:i,reject:o}}),n=zCe("".concat(t.config.paths.vs,"/loader.js"));return n.onload=function(){return e()},n.onerror=t.reject,n}function FCe(){var e=tg(function(n){var r=n.config,i=n.resolve,o=n.reject;return{config:r,resolve:i,reject:o}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(n){Bq(n),e.resolve(n)},function(n){e.reject(n)})}function Bq(e){tg().monaco||U0({monaco:e})}function UCe(){return tg(function(e){var t=e.monaco;return t})}var T1=new Promise(function(e,t){return U0({resolve:e,reject:t})}),Hq={config:$Ce,init:PCe,__getMonacoInstance:UCe},VCe={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},N1=VCe,BCe={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},HCe=BCe;function qCe({children:e}){return J.createElement("div",{style:HCe.container},e)}var KCe=qCe,GCe=KCe;function ZCe({width:e,height:t,isEditorReady:n,loading:r,_ref:i,className:o,wrapperProps:a}){return J.createElement("section",{style:{...N1.wrapper,width:e,height:t},...a},!n&&J.createElement(GCe,null,r),J.createElement("div",{ref:i,style:{...N1.fullWidth,...!n&&N1.hide},className:o}))}var YCe=ZCe,qq=b.memo(YCe);function WCe(e){b.useEffect(e,[])}var Kq=WCe;function XCe(e,t,n=!0){let r=b.useRef(!0);b.useEffect(r.current||!n?()=>{r.current=!1}:e,t)}var Bi=XCe;function wm(){}function Rd(e,t,n,r){return JCe(e,r)||QCe(e,t,n,r)}function JCe(e,t){return e.editor.getModel(Gq(e,t))}function QCe(e,t,n,r){return e.editor.createModel(t,n,r?Gq(e,r):void 0)}function Gq(e,t){return e.Uri.parse(t)}function eke({original:e,modified:t,language:n,originalLanguage:r,modifiedLanguage:i,originalModelPath:o,modifiedModelPath:a,keepCurrentOriginalModel:l=!1,keepCurrentModifiedModel:d=!1,theme:f="light",loading:m="Loading...",options:h={},height:v="100%",width:y="100%",className:x,wrapperProps:S={},beforeMount:C=wm,onMount:k=wm}){let[E,j]=b.useState(!1),[I,A]=b.useState(!0),T=b.useRef(null),N=b.useRef(null),D=b.useRef(null),L=b.useRef(k),H=b.useRef(C),ee=b.useRef(!1);Kq(()=>{let q=Hq.init();return q.then(z=>(N.current=z)&&A(!1)).catch(z=>z?.type!=="cancelation"&&console.error("Monaco initialization: error:",z)),()=>T.current?B():q.cancel()}),Bi(()=>{if(T.current&&N.current){let q=T.current.getOriginalEditor(),z=Rd(N.current,e||"",r||n||"text",o||"");z!==q.getModel()&&q.setModel(z)}},[o],E),Bi(()=>{if(T.current&&N.current){let q=T.current.getModifiedEditor(),z=Rd(N.current,t||"",i||n||"text",a||"");z!==q.getModel()&&q.setModel(z)}},[a],E),Bi(()=>{let q=T.current.getModifiedEditor();q.getOption(N.current.editor.EditorOption.readOnly)?q.setValue(t||""):t!==q.getValue()&&(q.executeEdits("",[{range:q.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),q.pushUndoStop())},[t],E),Bi(()=>{T.current?.getModel()?.original.setValue(e||"")},[e],E),Bi(()=>{let{original:q,modified:z}=T.current.getModel();N.current.editor.setModelLanguage(q,r||n||"text"),N.current.editor.setModelLanguage(z,i||n||"text")},[n,r,i],E),Bi(()=>{N.current?.editor.setTheme(f)},[f],E),Bi(()=>{T.current?.updateOptions(h)},[h],E);let G=b.useCallback(()=>{if(!N.current)return;H.current(N.current);let q=Rd(N.current,e||"",r||n||"text",o||""),z=Rd(N.current,t||"",i||n||"text",a||"");T.current?.setModel({original:q,modified:z})},[n,t,i,e,r,o,a]),K=b.useCallback(()=>{!ee.current&&D.current&&(T.current=N.current.editor.createDiffEditor(D.current,{automaticLayout:!0,...h}),G(),N.current?.editor.setTheme(f),j(!0),ee.current=!0)},[h,f,G]);b.useEffect(()=>{E&&L.current(T.current,N.current)},[E]),b.useEffect(()=>{!I&&!E&&K()},[I,E,K]);function B(){let q=T.current?.getModel();l||q?.original?.dispose(),d||q?.modified?.dispose(),T.current?.dispose()}return J.createElement(qq,{width:y,height:v,isEditorReady:E,loading:m,_ref:D,className:x,wrapperProps:S})}var tke=eke;b.memo(tke);function nke(e){let t=b.useRef();return b.useEffect(()=>{t.current=e},[e]),t.current}var rke=nke,ey=new Map;function ike({defaultValue:e,defaultLanguage:t,defaultPath:n,value:r,language:i,path:o,theme:a="light",line:l,loading:d="Loading...",options:f={},overrideServices:m={},saveViewState:h=!0,keepCurrentModel:v=!1,width:y="100%",height:x="100%",className:S,wrapperProps:C={},beforeMount:k=wm,onMount:E=wm,onChange:j,onValidate:I=wm}){let[A,T]=b.useState(!1),[N,D]=b.useState(!0),L=b.useRef(null),H=b.useRef(null),ee=b.useRef(null),G=b.useRef(E),K=b.useRef(k),B=b.useRef(),q=b.useRef(r),z=rke(o),W=b.useRef(!1),F=b.useRef(!1);Kq(()=>{let P=Hq.init();return P.then(V=>(L.current=V)&&D(!1)).catch(V=>V?.type!=="cancelation"&&console.error("Monaco initialization: error:",V)),()=>H.current?$():P.cancel()}),Bi(()=>{let P=Rd(L.current,e||r||"",t||i||"",o||n||"");P!==H.current?.getModel()&&(h&&ey.set(z,H.current?.saveViewState()),H.current?.setModel(P),h&&H.current?.restoreViewState(ey.get(o)))},[o],A),Bi(()=>{H.current?.updateOptions(f)},[f],A),Bi(()=>{!H.current||r===void 0||(H.current.getOption(L.current.editor.EditorOption.readOnly)?H.current.setValue(r):r!==H.current.getValue()&&(F.current=!0,H.current.executeEdits("",[{range:H.current.getModel().getFullModelRange(),text:r,forceMoveMarkers:!0}]),H.current.pushUndoStop(),F.current=!1))},[r],A),Bi(()=>{let P=H.current?.getModel();P&&i&&L.current?.editor.setModelLanguage(P,i)},[i],A),Bi(()=>{l!==void 0&&H.current?.revealLine(l)},[l],A),Bi(()=>{L.current?.editor.setTheme(a)},[a],A);let ne=b.useCallback(()=>{if(!(!ee.current||!L.current)&&!W.current){K.current(L.current);let P=o||n,V=Rd(L.current,r||e||"",t||i||"",P||"");H.current=L.current?.editor.create(ee.current,{model:V,automaticLayout:!0,...f},m),h&&H.current.restoreViewState(ey.get(P)),L.current.editor.setTheme(a),l!==void 0&&H.current.revealLine(l),T(!0),W.current=!0}},[e,t,n,r,i,o,f,m,h,a,l]);b.useEffect(()=>{A&&G.current(H.current,L.current)},[A]),b.useEffect(()=>{!N&&!A&&ne()},[N,A,ne]),q.current=r,b.useEffect(()=>{A&&j&&(B.current?.dispose(),B.current=H.current?.onDidChangeModelContent(P=>{F.current||j(H.current.getValue(),P)}))},[A,j]),b.useEffect(()=>{if(A){let P=L.current.editor.onDidChangeMarkers(V=>{let O=H.current.getModel()?.uri;if(O&&V.find(X=>X.path===O.path)){let X=L.current.editor.getModelMarkers({resource:O});I?.(X)}});return()=>{P?.dispose()}}return()=>{}},[A,I]);function $(){B.current?.dispose(),v?h&&ey.set(o,H.current.saveViewState()):H.current.getModel()?.dispose(),H.current.dispose()}return J.createElement(qq,{width:y,height:x,isEditorReady:A,loading:d,_ref:ee,className:S,wrapperProps:C})}var oke=ike,ng=b.memo(oke),V0=ng;const LP={roles:{create:!0,view:!0,update:!0,delete:!0},clusters:{create:!0,view:!0,update:!0,delete:!0,resources:[]}};function ake({isModalOpen:e,setIsModalOpen:t}){const n=sr(),{organizationId:r}=nt({strict:!1}),[i,o]=b.useState(!0),[a,l]=b.useState(JSON.stringify(LP,null,2)),{mutate:d,isPending:f}=tCe(),m=Qt({resolver:an(Lq),defaultValues:{name:"",update:!1,delete:!1}}),h=b.useCallback(y=>{o(y.length===0)},[o]),v=b.useCallback(async y=>{const x=Jh(a);if(!x)return;const S={...y,...x,organizationId:r};y&&i&&d(S,{onSuccess:()=>{ye.success("Organization role added successfully!"),t(!1),n.invalidateQueries({queryKey:[r,"roles"],refetchType:"active"}),m.reset()},onError:C=>{ye.error(`Failed to add organization role: ${C.message}`)}})},[i,a,d,m,n,t,r]);return c.jsx(Dn,{onOpenChange:t,open:e,children:c.jsxs($n,{children:[c.jsx(In,{children:"Add New Organization Role"}),c.jsx(mr,{children:"Set the new organization role permissions."}),c.jsx(en,{...m,children:c.jsxs("form",{className:"grid grid-cols-2 gap-4 my-4",onSubmit:m.handleSubmit(v),children:[c.jsx(Ne,{control:m.control,name:"name",render:({field:y})=>c.jsxs(je,{className:"col-span-2",children:[c.jsx(Re,{className:"pb-1",children:"Role Name"}),c.jsx(Te,{children:c.jsx(ze,{type:"text",className:"",...y})}),c.jsx(Ie,{})]})}),c.jsx(Ne,{control:m.control,name:"update",render:({field:y})=>c.jsxs(je,{children:[c.jsx(Re,{className:"pb-1",children:"Can Update Organization"}),c.jsx(Te,{children:c.jsx(ze,{type:"checkbox",className:"w-6 ml-2",checked:y.value,onChange:x=>y.onChange(x.target.checked)})}),c.jsx(Ie,{})]})}),c.jsx(Ne,{control:m.control,name:"delete",render:({field:y})=>c.jsxs(je,{children:[c.jsx(Re,{className:"pb-1",children:"Can Delete Organization"}),c.jsx(Te,{children:c.jsx(ze,{type:"checkbox",className:"w-6 ml-2",checked:y.value,onChange:x=>y.onChange(x.target.checked)})}),c.jsx(Ie,{})]})}),c.jsx("div",{className:"col-span-2",children:c.jsx(ng,{theme:"vs-dark",height:"300px",defaultLanguage:"json",onValidate:h,onChange:y=>{y&&l(y)},defaultValue:JSON.stringify(LP,null,2)})}),c.jsx(Ln,{className:"col-span-2",children:c.jsxs("div",{className:"flex justify-between w-full",children:[c.jsx(he,{variant:"destructiveOutline",className:"rounded-full",type:"button",onClick:()=>t(!1),disabled:f,children:"Cancel"}),c.jsx(he,{variant:"submit",className:"rounded-full",disabled:f||!i||!m.formState.isValid,children:"Save Changes"})]})})]})})]})})}async function ske({roleId:e}){const{data:t}=await $t.delete(`/Role/${e}`,{id:e,deleted:!0});return t}function lke(){return ot({mutationFn:({roleId:e})=>ske({roleId:e})})}async function cke({roleId:e,updatedRoleInfo:t}){const{data:n}=await $t.put(`/Role/${e}`,t);return n}function uke(){return ot({mutationFn:({roleId:e,updatedRoleInfo:t})=>cke({roleId:e,updatedRoleInfo:t})})}function dke({organizationId:e,roleId:t}){return{queryKey:[e,"roles",t],queryFn:()=>fke(t),refetchInterval:10*1e3}}async function fke(e){const{data:t}=await $t.get(`/Role/${e}`);return t}function pke({onRoleDeleteClick:e,setIsConfirmingRoleDeletion:t,isRoleDeletionPending:n}){return c.jsxs(c.Fragment,{children:[c.jsx(In,{children:"Confirm Role Deletion"}),c.jsx(mr,{children:"Are you sure you want to delete this role? This action cannot be undone."}),c.jsxs(Ln,{children:[c.jsx(he,{type:"button",variant:"defaultOutline",className:"rounded-full",onClick:()=>t(!1),children:"Cancel"}),c.jsx(he,{variant:"destructiveOutline",className:"rounded-full",onClick:e,disabled:n,children:n?"Deleting...":"Delete Role"})]})]})}function mke({data:e,isModalOpen:t,closeModal:n}){const r=sr(),{data:i}=Ri(dke({roleId:e.id,organizationId:e.organizationId})),o=Al(),a=o.user&&o.user?.roles?.[e.organizationId]?.role===e.roleName,{update:l,remove:d}=uu(e.organizationId),{mutate:f,isPending:m}=uke(),{mutate:h,isPending:v}=lke(),[y,x]=b.useState(!1),S=Qt({resolver:an(Lq),defaultValues:{name:e.roleName,update:i.organization.update||!1,delete:i.organization.delete||!1}}),C=b.useCallback(()=>{h({roleId:e.id},{onSuccess:()=>{ye.success("Role deleted successfully!"),n(!0),S.reset()},onError:D=>{ye.error("Error",{description:`Failed to delete role: ${D instanceof Error?D.message:String(D)}.`,action:{label:"Dismiss",onClick:()=>ye.dismiss()}})}})},[e.id,h,S,n]),[k,E]=b.useState(!0),[j,I]=b.useState(JSON.stringify({roles:{...i.organization.roles},clusters:{...i.organization.clusters}},null,2)),A=b.useCallback(D=>{E(D.length===0)},[E]),T=b.useCallback(async D=>{if(!l)return;const L=Jh(j);if(!L)return;const H={...D,...L,organizationId:e.organizationId};j&&k&&f({roleId:e.id,updatedRoleInfo:H},{onSuccess:async()=>{ye.success("Role updated successfully!"),await r.invalidateQueries({queryKey:[e.organizationId,"roles",e.id]}),n(!1),S.reset()},onError:ee=>{ye.error("Error",{description:`Failed to update role: ${ee instanceof Error?ee.message:String(ee)}.`,action:{label:"Dismiss",onClick:()=>ye.dismiss()}})}})},[n,e.id,e.organizationId,S,k,r,i,l,j,f]),N=b.useCallback(()=>n(!1),[n]);return c.jsx(Dn,{onOpenChange:N,open:t,children:c.jsx($n,{children:y?c.jsx(pke,{onRoleDeleteClick:C,setIsConfirmingRoleDeletion:x,isRoleDeletionPending:v}):c.jsxs(c.Fragment,{children:[c.jsxs(In,{children:[a||!l?"View":"Edit",' Organization Role "',e.roleName,'"']}),c.jsx(en,{...S,children:c.jsxs("form",{className:"grid grid-cols-2 gap-4 my-4",onSubmit:S.handleSubmit(T),children:[c.jsx(Ne,{control:S.control,name:"name",render:({field:D})=>c.jsxs(je,{className:"col-span-2",children:[c.jsx(Re,{className:"pb-1",children:"Role Name"}),c.jsx(Te,{children:c.jsx(ze,{type:"text",className:"",...D,disabled:!0,readOnly:!0})}),c.jsx(Ie,{})]})}),c.jsx(Ne,{control:S.control,name:"update",render:({field:D})=>c.jsxs(je,{children:[c.jsx(Re,{className:"pb-1",children:"Can Update Organization"}),c.jsx(Te,{children:c.jsx(ze,{type:"checkbox",className:"w-6 ml-2",disabled:a||!l,readOnly:a||!l,checked:D.value,onChange:L=>D.onChange(L.target.checked)})}),c.jsx(Ie,{})]})}),c.jsx(Ne,{control:S.control,name:"delete",render:({field:D})=>c.jsxs(je,{children:[c.jsx(Re,{className:"pb-1",children:"Can Delete Organization"}),c.jsx(Te,{children:c.jsx(ze,{type:"checkbox",className:"w-6 ml-2",disabled:a||!l,readOnly:a||!l,checked:D.value,onChange:L=>D.onChange(L.target.checked)})}),c.jsx(Ie,{})]})}),c.jsx("div",{className:"col-span-2",children:c.jsx(ng,{theme:"vs-dark",height:"300px",defaultLanguage:"json",onValidate:A,onChange:D=>{D&&I(D)},options:a||!l?{readOnly:!0}:void 0,defaultValue:j})}),!a&&(d||l)&&c.jsx(Ln,{className:"col-span-2",children:c.jsxs("div",{className:"flex justify-between w-full",children:[d&&c.jsx(he,{type:"button",variant:"destructiveOutline",className:"rounded-full",onClick:()=>x(!0),disabled:m,children:"Delete Role"}),l&&c.jsx(he,{variant:"submit",className:"rounded-full",disabled:!k||m||!S.formState.isValid||!S.formState.isDirty,children:"Save Changes"})]})})]})})]})})})}function Zq(){const e=Cn(),t=sr(),{organizationId:n,orgRoleId:r}=nt({strict:!1}),{create:i}=uu(n),{data:o,refetch:a,isFetching:l,isRefetching:d}=Ri(F0(n)),f=b.useMemo(()=>o&&o?.find(E=>E.id===r),[o,r]),m=!!r&&!!f,[h,v]=b.useState(!1),y=b.useCallback(async(E,j)=>{const I=[r?"..":"",E].filter(Boolean);await e({to:I.join("/")}),j&&await t.invalidateQueries({queryKey:[n,"roles"],refetchType:"active"})},[r,e,t]),x=b.useCallback(()=>{v(!0)},[v]),S=b.useCallback(E=>y(E.original.id,!1),[y]),C=b.useCallback(E=>y(void 0,E),[y]),k=Da(a);return c.jsxs(c.Fragment,{children:[c.jsx(Es,{}),c.jsx("div",{className:"mt-32 px-4 pt-4 md:px-12 min-h-[calc(100vh-(--spacing(32)))]",children:c.jsxs(b.Suspense,{fallback:c.jsx(ao,{className:"flex flex-col items-center justify-center h-full",text:"Loading..."}),children:[c.jsxs(Kl,{data:o,columns:Q1e,onRowClick:S,children:[c.jsxs(he,{variant:"defaultOutline",onClick:k,accessKey:"r",disabled:l||d,children:[c.jsx($o,{}),c.jsxs("span",{className:"hidden lg:inline-block",children:[c.jsx("u",{children:"R"}),"efresh"]})]}),i&&c.jsxs(he,{variant:"positiveOutline",onClick:x,accessKey:"a",disabled:h,children:[c.jsx(Tr,{}),c.jsxs("span",{children:[c.jsx("u",{children:"A"}),"dd"]})]})]}),i&&c.jsx(ake,{isModalOpen:h,setIsModalOpen:v}),m&&c.jsx(mke,{data:f,isModalOpen:m,closeModal:C})]})})]})}const hke=Uf(),gke=[{header:"User Id",accessorKey:"id",enableSorting:!1},{header:"Email",accessorKey:"email",enableSorting:!1},{header:"First Name",accessorKey:"firstname",enableSorting:!1},{header:"Last Name",accessorKey:"lastname",enableSorting:!1},hke.display({header:"Roles",enableSorting:!1,id:"roles",cell:e=>e.row.original.roles?.map(t=>t.roleName)?.sort()?.join(", ")}),{header:"Status",accessorKey:"status",enableSorting:!1},{header:"Verified",accessorKey:"isVerified",enableSorting:!1}],vke=Wi.object({email:Mf.max(80,{error:"Email cannot be longer than 80 characters."}),roleId:Wi.string().nonempty({error:"Please select a role."})});async function yke(e){const{data:t}=await $t.post("/OrganizationRole/",e);return t}function Yq(){return ot({mutationFn:e=>yke(e)})}Wi.object({email:Mf.max(80,{error:"Email cannot be longer than 80 characters."}),roleId:Wi.string().nonempty({error:"Please select a role."})});async function bke(e){const{data:t}=await $t.post("/UserInvite/",e);return t}function xke(){return ot({mutationFn:e=>bke(e)})}function wke({isModalOpen:e,onChangesSaved:t,setIsModalOpen:n}){const{organizationId:r}=nt({strict:!1}),{data:i}=Ri(F0(r)),[o,a]=b.useState(!1),l=Qt({resolver:an(vke),defaultValues:{email:"",roleId:""}}),{mutate:d,isPending:f}=Yq(),{mutate:m,isPending:h}=xke(),v=b.useCallback(async y=>{y&&(o?m:d)(y,{onSuccess:()=>{const x=y.roleId;l.reset(),l.setValue("roleId",x),t(),ye.success("User invited successfully!"),n(!1),a(!1)},onError:x=>{x?.status===404&&a(!0)}})},[d,l,m,t,n,o]);return c.jsx(Dn,{onOpenChange:()=>{n(!1),a(!1),l.reset()},open:e,children:c.jsx($n,{"aria-describedby":void 0,children:c.jsx(en,{...l,children:c.jsxs("form",{onSubmit:l.handleSubmit(v),className:"grid gap-4 my-4",children:[c.jsx(cr,{children:c.jsx(In,{children:o?"Invite User":"Add User"})}),c.jsx(Ne,{control:l.control,name:"email",render:({field:y})=>c.jsxs(je,{children:[c.jsx(Re,{className:"pb-1",children:"Email"}),c.jsx(Te,{children:c.jsx(ze,{type:"email",enterKeyHint:"next",autoComplete:"email",...y})}),c.jsx(Ie,{})]})}),c.jsx(Ne,{control:l.control,name:"roleId",render:({field:y})=>c.jsxs(je,{children:[c.jsx(Re,{className:"pb-1",children:"Roles"}),c.jsx(b.Suspense,{fallback:c.jsx(Lr,{}),children:c.jsx(Te,{children:c.jsxs(Qi,{...y,onValueChange:x=>y.onChange(x),children:[c.jsx(to,{className:"w-full",children:c.jsx(eo,{placeholder:"Choose Role"})}),c.jsx(no,{children:c.jsxs(ia,{children:[c.jsx(DI,{children:"Role"}),i?.map(x=>c.jsx(zt,{value:x.id,children:x.roleName},x.id))]})})]})})}),c.jsx(Ie,{})]})}),o&&c.jsxs(mr,{className:"p-3 my-5 text-white rounded-md bg-amber-600 flex",children:[c.jsx(wne,{className:"inline-block size-12 pr-2"}),c.jsx("span",{children:"This person doesn’t have a Fabric account. Do you want to invite them?"})]}),c.jsx(Ln,{children:c.jsx("div",{className:"flex justify-between w-full",children:c.jsxs(he,{type:"submit",variant:"submit",className:"rounded-full",disabled:f||h,children:[c.jsx(Ii,{})," ",o?"Invite User":"Add User"]})})})]})})})})}async function Ske({roleId:e,userId:t}){const{data:n}=await $t.delete(`/OrganizationRole/role/${e}/user/${t}`);return n}function _ke(){return ot({mutationFn:({roleId:e,userId:t})=>Ske({roleId:e,userId:t})})}function UI(e){const[t,n]=b.useState(e||!1),r=b.useCallback(i=>{n(typeof i=="boolean"?i:i.target.checked)},[]);return[t,r]}function Cke({data:e,readOnly:t,canRemove:n,orgRole:r,selectedRoles:i,setChangesMade:o}){const{mutate:a,isPending:l}=Yq(),{mutate:d,isPending:f}=_ke(),m=!!i[r.roleName],[h,v]=b.useState(m),[y,x]=UI(m);return b.useEffect(()=>{y!==h&&(y?a({email:e.email,roleId:r.id},{onSuccess:()=>{v(y),o(!0),ye.success("Role added successfully")}}):d({userId:e.id,roleId:r.id},{onSuccess:()=>{v(y),o(!0),ye.success("Role removed successfully")}}))},[a,e.email,e.id,y,r.id,d,o,h]),c.jsxs(Of,{className:"flex",children:[c.jsx(ze,{type:"checkbox",className:"w-6",disabled:t||l||f||!n&&y,checked:y,onChange:x}),c.jsx("span",{className:"pl-4 pr-8 flex-1 py-2.5",children:r.roleName})]},r.id)}function kke({closeModal:e,data:t,isModalOpen:n,onUserUpdated:r}){const{organizationId:i}=nt({strict:!1}),o=Al(),{update:a,remove:l}=uu(i),d=o.user?.email===t.email,{data:f}=Ri(F0(i)),m=b.useMemo(()=>t.roles?Qh(t.roles,"roleName"):{},[t]),[h,v]=b.useState(!1);return c.jsx(Dn,{onOpenChange:h?r:e,open:n,children:c.jsxs($n,{className:"sm:max-w-[750px]",children:[c.jsx(cr,{children:c.jsxs(In,{children:[a?"Edit ":"View "," ",t.email," ",d?"(yourself)":""]})}),a&&c.jsxs(mr,{children:["To remove ",d?"your self":"this user"," from the organization, uncheck all of the boxes below."]}),f.map(y=>c.jsx(Cke,{readOnly:!a,canRemove:l,data:t,orgRole:y,selectedRoles:m,setChangesMade:v},y.id))]})})}function Eke(e,t){return e.email>t.email?1:-1}function Wq(){const e=Cn(),{organizationId:t,orgUserId:n}=nt({strict:!1}),{update:r}=uu(t),{data:i,refetch:o,isFetching:a,isRefetching:l}=Ri(F0(t)),d=b.useMemo(()=>{const T={};for(const N of i)if(N.users)for(const D of N.users)T[D.id]||(T[D.id]={...D,roles:[]}),T[D.id].roles.push(N);return Object.values(T).sort(Eke)},[i]),f=b.useMemo(()=>d?.find(T=>T.id===n),[d,n]),m=b.useCallback(T=>{const N=[n?"..":"",T].filter(Boolean);e({to:N.join("/")})},[n,e]),h=!!n&&!!f,[v,y]=b.useState(!1),[x]=b.useState({attribute:"email",descending:!1}),S=b.useMemo(()=>[{desc:x.descending,id:x.attribute}],[x]),C=b.useCallback(()=>{y(!0)},[y]),k=b.useCallback(()=>{o(),y(!1)},[o,y]),E=b.useCallback(T=>{m(T.original.id)},[m]),j=b.useCallback(()=>{m(void 0)},[m]),I=b.useCallback(()=>{o(),m(void 0)},[m,o]),A=Da(o);return c.jsxs(c.Fragment,{children:[c.jsx(Es,{}),c.jsx("div",{className:"mt-32 px-4 pt-4 md:px-12 min-h-[calc(100vh-theme(spacing.32))]",children:c.jsxs(b.Suspense,{fallback:c.jsx(ao,{className:"flex flex-col items-center justify-center h-full",text:"Loading..."}),children:[c.jsxs(Kl,{data:d,isFetching:a||l,columns:gke,onRowClick:E,sortingState:S,children:[c.jsxs(he,{variant:"defaultOutline",onClick:A,accessKey:"r",disabled:a||l,children:[c.jsx($o,{})," ",c.jsxs("span",{className:"hidden lg:inline-block",children:[c.jsx("u",{children:"R"}),"efresh"]})]}),r&&c.jsxs(he,{variant:"positiveOutline",onClick:C,accessKey:"a",disabled:v,children:[c.jsx(Tr,{})," ",c.jsxs("span",{children:[c.jsx("u",{children:"A"}),"dd"]})]})]}),r&&c.jsx(wke,{isModalOpen:v,onChangesSaved:k,setIsModalOpen:y}),h&&c.jsx(kke,{closeModal:j,data:f,isModalOpen:h,onUserUpdated:I})]})})]})}function jke({organizationRole:e,onDeleteOrgModal:t}){const{organizationId:n,organizationName:r,roleName:i}=e,{remove:o,update:a}=gx(n),l=a,{view:d}=uu(n),f=b.useCallback(()=>{t(e)},[t,e]);return c.jsxs(Lc,{className:"relative h-full justify-between",children:[c.jsxs(Ol,{children:[c.jsxs(nu,{className:"flex items-center justify-between",children:[c.jsx("span",{className:"truncate",children:n}),o&&c.jsxs(Gh,{children:[c.jsx(Zh,{className:"p-4 -m-4 -mr-6 hover:text-white",children:c.jsx(gE,{"aria-label":"Options"})}),c.jsxs(Yh,{children:[c.jsx(ym,{className:"text-gray-600 text-xs",children:"Options"}),c.jsx(Bm,{}),c.jsx(Ye,{to:`${n}`,children:c.jsx(jr,{children:"Clusters"})}),d&&c.jsx(Ye,{to:`${n}/roles`,children:c.jsx(jr,{children:"Roles"})}),d&&c.jsx(Ye,{to:`${n}/users`,children:c.jsx(jr,{children:"Users"})}),l&&c.jsx(Ye,{to:`${n}/billing`,children:c.jsx(jr,{children:"Billing"})}),c.jsx(Bm,{}),o&&c.jsx(jr,{className:"focus:bg-red/70 focus:text-white",onClick:f,children:"Delete"})]})]})]}),c.jsx(Dl,{children:c.jsx("h2",{children:r})})]}),c.jsxs(Cs,{className:"flex justify-between",children:[c.jsx(ra,{children:Eo(i)}),c.jsx(Ye,{to:n,className:"text-sm","aria-label":`View ${r}`,title:`View ${r}`,children:c.jsxs("span",{className:"py-2 transition-all duration-100 ease-in-out border-0 hover:border-b-2",children:["View ",c.jsx(wi,{className:"inline-block"})]})})]})]})}async function Rke(e){const{data:t}=await $t.delete(`/Organization/${e}`);return t}function Ike(){return ot({mutationFn:e=>Rke(e)})}async function Tke(e){const{data:t}=await $t.post("/Organization/",{...e});return t}function Nke(){return ot({mutationFn:e=>Tke(e)})}const _k=Xe().max(62,{error:"Must be at most 62 characters long."}).regex(/^[a-z0-9]([a-z0-9-]*[a-z0-9])?$/,{error:"Please only use lowercase letters, digits and dashes (-) in the subdomain. Must not start or end with a dash."}),FP=Mt({name:Xe().max(255,{error:"Name cannot be longer than 255 characters."}),subdomain:Pf([Vl(""),Kc(),_k])});function Ake(){const{user:e}=Al(),t=Cn(),n=Qt({resolver:an(FP),defaultValues:{name:"",subdomain:""}}),{setFocus:r,watch:i}=n;b.useEffect(()=>{r("name")},[r]);const o=`${e?.firstname} ${e?.lastname} Org`,a=i("name")||o,l=i("subdomain"),d=b.useMemo(()=>{const y=P9(N0(a),_k.maxLength);return{suggestedSubdomain:y,fullHostName:`future-cluster-names.${l||y}.harperfabric.com`}},[a,l]),{mutate:f,isPending:m}=Nke(),h=sr(),v=b.useCallback(async y=>{f({name:y.name||o,subdomain:y.subdomain||d.suggestedSubdomain},{onSuccess:x=>{h.invalidateQueries({queryKey:zb,refetchType:"active"}),Ct.reloadUser(Mn),t({to:`/${x.id}`})}})},[d.suggestedSubdomain,h,f,o,t]);return c.jsx(c.Fragment,{children:c.jsx(en,{...n,children:c.jsxs("form",{onSubmit:n.handleSubmit(v),className:"grid gap-6 text-white max-w-xl",children:[c.jsx(Ne,{control:n.control,name:"name",render:({field:y})=>c.jsxs(je,{children:[c.jsx(Re,{className:"pb-1",children:"Name"}),c.jsx(Te,{children:c.jsx(ze,{type:"text",maxLength:FP.shape.name.maxLength,autoCapitalize:"words",placeholder:o,...y})}),c.jsx(Ie,{})]})}),c.jsx(Ne,{control:n.control,name:"subdomain",render:({field:y})=>c.jsxs(je,{children:[c.jsx(Re,{className:"pb-1",children:"Subdomain"}),c.jsx(Te,{children:c.jsx(ze,{type:"text",maxLength:_k.maxLength,autoCapitalize:"none",placeholder:d.suggestedSubdomain,...y})}),c.jsx(Ie,{})]})}),c.jsxs(je,{children:[c.jsx(Re,{className:"pb-1",children:"Full Host Name"}),c.jsx(Te,{children:c.jsx("span",{children:d.fullHostName})}),c.jsx(Ie,{})]}),c.jsx(Ln,{children:c.jsxs(he,{type:"submit",variant:"submit",className:"rounded-full",disabled:m,children:["Create New Organization ",c.jsx(wi,{})]})})]})})})}function Xq(){return c.jsxs(c.Fragment,{children:[c.jsx(Es,{}),c.jsx("section",{className:"mt-32 px-4 pt-4 md:px-12 min-h-[calc(100vh-theme(spacing.32))]",children:c.jsx(Ake,{})})]})}function Oke(){const e=sr(),{data:t}=Ri(oJ()),{mutate:n,isPending:r}=Ike(),[i,o]=b.useState(!1),[a,l]=b.useState(null),[d,f]=b.useState(""),m=b.useCallback(()=>f(""),[]),h=b.useMemo(()=>{const C=t?.roles||{},k=Object.values(C);return Object.keys(C).map((j,I)=>({organizationId:j,organizationName:k[I].organizationName,roleName:k[I].role})).filter(Eq(["organizationId","organizationName"],d)).sort((j,I)=>(j.organizationName||"")>(I.organizationName||"")?1:-1)||[]},[d,t?.roles]),v=b.useCallback(C=>{f(C.currentTarget.value?.toLowerCase()||"")},[]),y=b.useCallback(C=>{C?.organizationId&&n(C.organizationId,{onSuccess:()=>{ye.success("Success",{description:"Organization successfully deleted.",duration:5e3,action:{label:"Dismiss",onClick:()=>ye.dismiss()}}),e.invalidateQueries({queryKey:[]}),o(!1)},onError:()=>o(!1)})},[n,e,o]),x=b.useCallback(C=>{l(C),o(!0)},[]),{createCluster:S}=Nr({strict:!1});return h.length===1&&!d.length&&S?c.jsx(Tc,{to:`/${h[0].organizationId}/new-cluster`,replace:!0}):!h.length&&!d.length?c.jsx(Xq,{}):c.jsxs(c.Fragment,{children:[c.jsx(Es,{children:c.jsxs("div",{className:"flex w-full justify-end gap-2",children:[c.jsx(ze,{placeholder:"Filter by name",className:"inline-block w-full text-xs",value:d,onChange:v}),c.jsx(Ye,{to:"/new-org",children:c.jsxs(he,{variant:"positive",accessKey:"n",children:[c.jsx(Tr,{}),c.jsxs("span",{className:"hidden sm:inline-block",children:[c.jsx("u",{children:"N"}),"ew ",c.jsx("span",{className:"hidden md:inline-block",children:"Organization"})]})]})})]})}),c.jsx("section",{className:"mt-32 px-4 pt-4 md:px-12 min-h-[calc(100vh-theme(spacing.32))]",children:c.jsxs("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-12",children:[h.map(C=>c.jsx("div",{className:"col-span-1 md:col-span-4 lg:col-span-3 2xl:col-span-2",children:c.jsx(jke,{organizationRole:C,onDeleteOrgModal:x})},C.organizationId)),!h.length&&c.jsxs("div",{className:"col-span-1 md:col-span-12 text-center",children:[c.jsx("h2",{className:"my-4 text-xl",children:"No matches found."}),c.jsx(he,{variant:"outline",onClick:m,children:"Clear Filters"})]})]})}),a&&c.jsx(Bh,{typeOfThingBeingDeleted:"organization",nameOfThingBeingDeleted:a.organizationName,isModalOpen:i,setIsModalOpen:()=>o(!1),deletionConfirmed:()=>y(a),deletionPending:r})]})}function Dke(){const{isLoading:e}=tu(),{createCluster:t}=Nr({strict:!1}),[,n]=Lf(gu.SavedClusterState,null);return b.useEffect(()=>{t&&n(t)},[t,n]),e?c.jsx(ao,{className:"fixed z-50 translate-1/2"}):c.jsxs(c.Fragment,{children:[c.jsx("header",{className:"fixed top-0 z-40 w-full h-20 p-4 bg-black-dark dark:bg-black-dark dark:border-b dark:border-black md:px-12",children:c.jsx($U,{})}),c.jsx("main",{children:c.jsx(Nl,{})})]})}const $ke=["/","/forgot-password","/reset-password","/sign-in","/sign-up","/verify-email"];function Jq(){const e=jq();return!$ke.includes(e)&&{redirect:e}}const B0=Qe({getParentRoute:()=>px,id:"_dashboardLayout",component:Dke,beforeLoad:({context:e})=>{const t=e.authentication[Mn];if(t&&!t.isLoading&&!t.user)throw eu({to:"/sign-in",search:Jq()})}}),VI=Qe({getParentRoute:()=>B0,id:"_orgsLayout"});Qe({getParentRoute:()=>VI,path:"/",component:Oke});Qe({getParentRoute:()=>VI,path:"/new-org",component:Xq});const yu=Qe({getParentRoute:()=>VI,path:"$organizationId",beforeLoad:async e=>({organization:await e.context.queryClient.ensureQueryData(vu(e.params.organizationId))})}),Pke=Qe({getParentRoute:()=>yu,path:"/roles",component:Zq}),Mke=Qe({getParentRoute:()=>yu,path:"/roles/$orgRoleId",component:Zq}),zke=Qe({getParentRoute:()=>yu,path:"/users",component:Wq}),Lke=Qe({getParentRoute:()=>yu,path:"/users/$orgUserId",component:Wq});W1e(yu);const Qq=Qe({getParentRoute:()=>yu,id:"_clusterLayout"});Qe({getParentRoute:()=>Qq,path:"/",component:G_e});Qe({getParentRoute:()=>yu,path:"/new-cluster",component:PI});Qe({getParentRoute:()=>Ia,path:"/edit",component:PI});function Fke(){return c.jsx(Nl,{})}const Ia=Qe({getParentRoute:()=>Qq,path:"$clusterId",component:Fke,beforeLoad:async({context:e,params:t})=>({cluster:await e.queryClient.ensureQueryData(Aa(t.clusterId))})});function pl({children:e,className:t}){return c.jsxs(c.Fragment,{children:[c.jsx(Es,{}),c.jsx("div",{className:xr("mt-32 px-4 py-4 md:px-12 min-h-[calc(100vh-(--spacing(32)))] flex justify-center",t),children:e})]})}var H0="Switch",[Uke]=Ti(H0),[Vke,Bke]=Uke(H0),e7=b.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:i,defaultChecked:o,required:a,disabled:l,value:d="on",onCheckedChange:f,form:m,...h}=e,[v,y]=b.useState(null),x=ft(t,j=>y(j)),S=b.useRef(!1),C=v?m||!!v.closest("form"):!0,[k,E]=Mo({prop:i,defaultProp:o??!1,onChange:f,caller:H0});return c.jsxs(Vke,{scope:n,checked:k,disabled:l,children:[c.jsx(Ge.button,{type:"button",role:"switch","aria-checked":k,"aria-required":a,"data-state":i7(k),"data-disabled":l?"":void 0,disabled:l,value:d,...h,ref:x,onClick:Oe(e.onClick,j=>{E(I=>!I),C&&(S.current=j.isPropagationStopped(),S.current||j.stopPropagation())})}),C&&c.jsx(r7,{control:v,bubbles:!S.current,name:r,value:d,checked:k,required:a,disabled:l,form:m,style:{transform:"translateX(-100%)"}})]})});e7.displayName=H0;var t7="SwitchThumb",n7=b.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,i=Bke(t7,n);return c.jsx(Ge.span,{"data-state":i7(i.checked),"data-disabled":i.disabled?"":void 0,...r,ref:t})});n7.displayName=t7;var Hke="SwitchBubbleInput",r7=b.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...i},o)=>{const a=b.useRef(null),l=ft(a,o),d=mx(n),f=ej(t);return b.useEffect(()=>{const m=a.current;if(!m)return;const h=window.HTMLInputElement.prototype,y=Object.getOwnPropertyDescriptor(h,"checked").set;if(d!==n&&y){const x=new Event("click",{bubbles:r});y.call(m,n),m.dispatchEvent(x)}},[d,n,r]),c.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:l,style:{...i.style,...f,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});r7.displayName=Hke;function i7(e){return e?"checked":"unchecked"}var qke=e7,Kke=n7;function o7({className:e,...t}){return c.jsx(qke,{"data-slot":"switch",className:Ve("peer data-[state=checked]:bg-green data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:c.jsx(Kke,{"data-slot":"switch-thumb",className:Ve("bg-white dark:data-[state=unchecked]:bg-white dark:data-[state=checked]:bg-white pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")})})}const Gke=new Set(["com","co","org","net","edu","gov","mil","me","biz","info","ac","or","ne","go","lg","asn","id","nom","sch","ltd","plc"]);function Zke(e){const t=e.split(".");if(t.length<=2)return"@";const n=t[t.length-1],r=t[t.length-2],o=n.length===2&&Gke.has(r)?3:2;return t.length<=o?"@":t.slice(0,-o).join(".")}function Yke({cluster:{fqdn:e},disabled:t,domain:{domain:n,id:r},bindDomain:i}){const[o,a]=UI(!0),l=Zke(n),[d,f]=Xh(l,e||""),m=b.useCallback(()=>i(o),[i,o]);return c.jsxs("div",{className:"grid gap-4 grid-cols-1 md:grid-cols-[80px_1fr] pb-6",children:[c.jsx("div",{className:"text-muted-foreground md:col-span-2 text-wrap",children:"This domain has been verified! Now to associate it with this cluster, add the following to your DNS registrar:"}),c.jsx("div",{className:"col-span-1",children:"Type:"}),c.jsx("div",{className:"col-span-1",children:"CNAME or ALIAS"}),c.jsx("div",{className:"col-span-1",children:"Name:"}),c.jsxs("div",{className:"col-span-1 flex gap-2",children:[c.jsx("input",{className:"py-1 px-3 bg-gray-700 rounded-md w-full",type:"text",readOnly:!0,name:"recordName",value:l,onClick:d}),c.jsx(he,{type:"button",size:"sm",onClick:d,children:c.jsx(Uc,{className:"w-4 h-4"})})]}),c.jsx("div",{className:"col-span-1",children:"TTL:"}),c.jsx("div",{className:"col-span-1",children:"Auto"}),c.jsx("div",{className:"col-span-1",children:"Target:"}),c.jsxs("div",{className:"col-span-1 flex gap-2",children:[c.jsx("input",{className:"py-1 px-3 bg-gray-700 rounded-md w-full",type:"text",readOnly:!0,name:"recordTarget",value:e,onClick:f}),c.jsx(he,{type:"button",size:"sm",onClick:f,children:c.jsx(Uc,{className:"w-4 h-4"})})]}),c.jsx("div",{className:"text-muted-foreground md:col-span-2 text-wrap",children:"Once you've completed the above steps, you are ready to bind the domain to this cluster. A domain can only be bound to a single cluster."}),c.jsx("div",{className:"col-span-1",children:c.jsx("label",{htmlFor:"generateDomainCerts",children:"Certs:"})}),c.jsx("div",{className:"col-span-1",children:c.jsxs("label",{htmlFor:"generateDomainCerts",className:"-m-2 p-2",children:["Should we generate SSL certificates with LetsEncrypt?",c.jsxs("div",{className:"flex mt-2",children:[c.jsx(o7,{id:"generateDomainCerts",checked:o,className:"mr-2",onCheckedChange:a}),o?"Yes":"No, I will add my own certificates, thank you very much."]})]})}),c.jsx("div",{className:"col-span-1"}),c.jsx("div",{className:"col-span-1",children:c.jsxs(he,{type:"button",variant:"submit","data-id":r,onClick:m,disabled:t,children:[c.jsx(Ii,{})," Bind to This Cluster"]})})]})}function Wke({domain:{challengeToken:e,challengeTxtRecord:t}}){const[n,r]=Xh(t,e);return c.jsxs("div",{className:"grid gap-2 grid-cols-1 md:grid-cols-[80px_1fr] pb-6",children:[c.jsx("div",{className:"text-muted-foreground md:col-span-2 text-wrap",children:"Prove that you own this domain by adding the following to your DNS registrar:"}),c.jsx("div",{className:"col-span-1",children:"Type:"}),c.jsx("div",{className:"col-span-1",children:"TXT"}),c.jsx("div",{className:"col-span-1",children:"Name:"}),c.jsxs("div",{className:"col-span-1 flex gap-2",children:[c.jsx("input",{className:"py-1 px-3 bg-gray-700 rounded-md w-full",type:"text",readOnly:!0,name:"challengeName",value:t,onClick:n}),c.jsx(he,{type:"button",size:"sm",onClick:n,children:c.jsx(Uc,{className:"w-4 h-4"})})]}),c.jsx("div",{className:"col-span-1",children:"TTL:"}),c.jsx("div",{className:"col-span-1",children:"Auto"}),c.jsx("div",{className:"col-span-1",children:"Content:"}),c.jsxs("div",{className:"col-span-1 flex gap-2",children:[c.jsx("input",{className:"py-1 px-3 bg-gray-700 rounded-md w-full",type:"text",readOnly:!0,name:"challengeToken",value:e,onClick:r}),c.jsx(he,{type:"button",size:"sm",onClick:r,children:c.jsx(Uc,{className:"w-4 h-4"})})]}),c.jsx("div",{className:"text-muted-foreground md:col-span-2 text-wrap",children:'Then after your DNS TTL elapses, click the "Validate" button above.'})]})}async function Xke({clusterId:e,domainIds:t,generateDomainCerts:n}){const{data:r}=await $t.put(`/Cluster/${e}`,{domainIds:t,generateDomainCerts:n},{timeout:0});return r}function Jke(){return ot({mutationFn:e=>Xke(e)})}Wi.object({domainId:Wi.string()});async function Qke(e){const{data:t}=await $t.delete(`/Domain/${e.domainId}`);return t}function eEe(){return ot({mutationFn:e=>Qke(e)})}function tEe(e){return[...new Set(e)]}const UP=Uf();function nEe(e){const{mutate:t,isPending:n}=Jke(),{mutate:r,isPending:i}=eEe(),o=n||i,a=b.useCallback((f,m)=>{if(!hI(e.status)){ye.error("Cluster is currently "+e.status,{description:"To bind a domain, it must be running."});return}t({clusterId:e.id,domainIds:tEe((e.domainIds?.slice()||[]).concat([f])),generateDomainCerts:m},{onSuccess:()=>{Nc.invalidateQueries({queryKey:[e.organizationId],refetchType:"active"}),ye.success("Domain bound!"+(m?" Certificates are being generated in the background now.":""))}})},[t,e]),l=b.useCallback(f=>{r({domainId:f},{onSuccess:()=>{Nc.invalidateQueries({queryKey:[e.organizationId,"domains"],refetchType:"active"}),ye.success("Domain removed!")}})},[r]),d=b.useCallback(f=>{t({clusterId:e.id,domainIds:(e.domainIds?.slice()||[]).filter(m=>m!==f),generateDomainCerts:!1},{onSuccess:()=>{Nc.invalidateQueries({queryKey:[e.organizationId],refetchType:"active"}),ye.success("Domain unbound!")}})},[r]);return b.useMemo(()=>[UP.display({header:"Domains",id:"domain",enableSorting:!1,size:150,cell:f=>{const m=f.row.original;return c.jsxs(hh,{children:[c.jsx(gh,{asChild:!0,children:c.jsxs(c.Fragment,{children:[c.jsx("div",{children:m.domain}),c.jsx(he,{variant:"destructiveGhost",className:"text-muted-foreground text-xs",disabled:o||!!m.clusterId,onClick:()=>l(m.id),children:"Remove Domain"})]})}),c.jsx(vh,{side:"bottom",align:"center",children:m.clusterId?"To delete this domain, please unbind it from all clusters first.":"Remember to clean up your DNS records!"})]})}}),UP.display({header:"Next Steps",enableSorting:!1,size:500,id:"nextSteps",cell:f=>{const m=f.row.original;return m.status==="ACTIVE"&&m.clusterId?e.id===m.clusterId?c.jsxs(c.Fragment,{children:[c.jsx("div",{children:"Bound to this cluster"}),c.jsx(he,{variant:"destructiveGhost",className:"text-muted-foreground text-xs",disabled:o,onClick:()=>d(m.id),children:"Unbind Domain"})]}):`Bound to cluster ${m.clusterId}`:m.status==="PENDING_VALIDATION"?c.jsx(Wke,{domain:m}):Wh(e)?"Cannot be associated with this self-managed cluster.":m.status==="ACTIVE"&&!m.clusterId?c.jsx(Yke,{cluster:e,domain:m,bindDomain:h=>a(m.id,h),disabled:o}):m.status}})],[e,a,o])}const rEe=Wi.object({domain:Wi.string(),organizationId:Wi.string()});async function iEe(e){const{data:t}=await $t.post("/Domain/",e);return t}function oEe(){return ot({mutationFn:e=>iEe(e)})}async function aEe(e){const{data:t}=await $t.post(`/Domain/${e}/validate`);return t}async function sEe(e){const{data:t}=await $t.get(`/Domain/?organizationId=${e}`);return t}function lEe(e){return{queryKey:[e,"domains"],queryFn:()=>sEe(e)}}function a7(){const{organizationId:e,clusterId:t}=nt({strict:!1}),{data:n}=Ri(Aa(t,!0)),{update:r}=uu(e),{data:i,refetch:o,isFetching:a,isRefetching:l}=Dt(lEe(e)),d=b.useMemo(()=>i?.filter(E=>E.status==="PENDING_VALIDATION")||[],[i]),[f]=b.useState({attribute:"domain",descending:!1}),m=b.useMemo(()=>[{desc:f.descending,id:f.attribute}],[f]),h=Da(o),{mutate:v,isPending:y}=oEe(),x=Qt({resolver:an(rEe),defaultValues:{domain:"",organizationId:e}}),S=b.useCallback(async E=>{E&&v(E,{onSuccess:()=>{x.reset(),o(),ye.success("Domain added! Please add the txt record above to your domain registrar.")}})},[v,x,o]),C=b.useCallback(async()=>{const E=`Validating ${Mr(d.length,"domain","domains")}...`,j="validatingDomains";let I=0,A=0;for(const T of d)try{ye.loading(E,{description:`${I++} of ${d.length} checked`,id:j}),await aEe(T.id)}catch{A+=1}A>0?ye.error("Validation failed!",{description:"Please make sure the TXT record has been put in place. You may need to wait a bit for the DNS change to propagate.",id:j}):(await o(),ye.success("Validation succeeded!",{description:"Please take a look at the next steps for newly verified domains.",id:j}))},[d]),k=nEe(n);return c.jsx(Kl,{data:i||[],isFetching:a||l,columns:k,sortingState:m,children:c.jsxs("div",{className:"w-full flex flex-col md:flex-row justify-between md:items-center md:space-x-2 space-y-2 md:space-y-0",children:[r&&c.jsx(en,{...x,children:c.jsxs("form",{onSubmit:x.handleSubmit(S),className:"flex gap-1 flex-col md:flex-row",children:[c.jsx(Ne,{control:x.control,name:"domain",render:({field:E})=>c.jsxs(je,{className:"flex-1",children:[c.jsx(Re,{className:"pb-1",children:"New Domain Name"}),c.jsx(Te,{children:c.jsx(ze,{type:"text",enterKeyHint:"done",autoComplete:"off",...E})}),c.jsx(Ie,{children:c.jsx("span",{className:"text-muted-foreground italic",children:"Type in a domain like example.com or your.example.com, and you'll be guided through validating and binding your cluster to it."})})]})}),c.jsx("div",{className:"flex-0 self-start md:pt-6.5",children:c.jsxs(he,{type:"submit",variant:"submit",disabled:y,children:[c.jsx(Tr,{})," Add"]})})]})}),d.length>0&&c.jsxs(he,{variant:"positiveOutline",onClick:C,accessKey:"r",disabled:a||l,children:[c.jsx(fne,{})," ",c.jsxs("span",{children:[c.jsx("u",{children:"V"}),"alidate"]})]}),c.jsxs(he,{variant:"defaultOutline",onClick:h,accessKey:"r",disabled:a||l,children:[c.jsx($o,{})," ",c.jsxs("span",{className:"hidden lg:inline-block",children:[c.jsx("u",{children:"R"}),"efresh"]})]})]})})}function cEe(){return c.jsx(pl,{className:"flex flex-col justify-start max-w-4xl",children:c.jsx(a7,{})})}const Id=Mt({username:pI,role:Xe().nonempty({error:"Please select a role."}),password:Uh.min(8,{error:"Password must be at least 8 characters long."}),confirmPassword:Xe()}).refine(e=>e.password===e.confirmPassword,{error:"Passwords do not match.",path:["confirmPassword"]});async function uEe(e){await $t.patch(`/ResetPasswordUpdater/${e}`)}async function s7(e){const{instanceClient:t,...n}=e,{data:r}=await t.post("/",{operation:"add_user",...n});return r}function dEe(){return ot({mutationFn:s7})}async function l7({username:e,password:t,role:n,active:r,instanceClient:i}){const{data:o}=await i.post("/",{operation:"alter_user",username:e,password:t,role:n,active:r});return o}function fEe(){return ot({mutationFn:l7})}async function c7({username:e,instanceClient:t}){const{data:n}=await t.post("/",{operation:"drop_user",username:e});return n}function pEe(){return ot({mutationFn:c7})}async function mEe({clusterId:e,initialUsername:t,desiredUsername:n,newPassword:r,tempPassword:i,instanceClient:o}){if(!i)throw new Error("You may not have permission to set the password on this cluster.");let a=o;try{const l=await YC({username:t,password:i,instanceClient:a,entityId:e});return l.instanceClient&&(a=l.instanceClient),n===nC?await l7({username:n,password:r,instanceClient:a}):(await s7({username:n,password:r,role:"super_user",active:!0,instanceClient:a}),await YC({username:n,password:r,instanceClient:a,entityId:e}),await c7({username:nC,instanceClient:a})),await uEe(e),l}catch(l){throw await rh({entityId:e,instanceClient:a}),l}}function hEe(){return ot({mutationFn:mEe})}function gEe(){const{user:e}=Al(),{clusterId:t}=nt({strict:!1}),{data:n}=Dt(Aa(t,!0)),r=Cn(),i=b.useMemo(()=>oE(n),[n]),o=dh(i),{redirect:a}=Nr({strict:!1}),l=_n(),d=Qt({resolver:an(Id),defaultValues:{confirmPassword:"",password:"",role:"super_user",username:e?.email??""}}),{setFocus:f,control:m,handleSubmit:h}=d;b.useEffect(()=>{f("password")},[f]);const v=n?.instances?.find(C=>C.tempPassword)?.tempPassword,{mutate:y,isPending:x}=hEe(),S=b.useCallback(async C=>{if(!i){ye.error("Cluster is not yet fully loaded, please wait a moment before trying to sign in.");return}y({instanceClient:o,clusterId:t,newPassword:C.password,tempPassword:v,initialUsername:nC,desiredUsername:C.username},{onSuccess:async({message:k,user:E})=>{ye.success(k),Ct.setUserForEntity(n,E),l.invalidate(),await r({to:a?.startsWith("/")?a:Gk})}})},[n,t,o,r,i,a,l,y,v]);return n&&!n.resetPassword?c.jsx(Tc,{to:"../sign-in",replace:!0}):c.jsxs(c.Fragment,{children:[c.jsx("nav",{className:"fixed top-20 w-full h-12 z-39 px-4 md:px-12 bg-grey-700 flex items-center",children:c.jsx(Cx,{})}),c.jsx("div",{className:"items-center justify-center flex mt-32 py-4 min-h-[calc(100vh-theme(spacing.32))]",children:c.jsxs("div",{className:"text-white w-xs",children:[c.jsx("h2",{className:"text-2xl font-light",children:"Create Admin User"}),c.jsx("p",{className:"text-muted-foreground",children:"You are ready to create your first user in your new cluster. These credentials belong to you alone, and you can create more users and roles once you create this first one."}),c.jsx(en,{...d,children:c.jsxs("form",{onSubmit:h(S),className:"my-4",children:[c.jsx(Ne,{control:m,name:"username",render:({field:C})=>c.jsxs(je,{className:"my-4",children:[c.jsx(Re,{children:"Username"}),c.jsx(Te,{children:c.jsx(ze,{autoComplete:"username",type:"text",...C})}),c.jsx(Ie,{})]})}),c.jsx(Ne,{control:m,name:"password",render:({field:C})=>c.jsxs(je,{className:"my-4",children:[c.jsx(Re,{children:"Password"}),c.jsx(Te,{children:c.jsx(ze,{type:"password",...C})}),c.jsx(Ie,{})]})}),c.jsx(Ne,{control:m,name:"confirmPassword",render:({field:C})=>c.jsxs(je,{className:"my-4",children:[c.jsx(Re,{children:"Confirm Password"}),c.jsx(Te,{children:c.jsx(ze,{type:"password",...C})}),c.jsx(Ie,{})]})}),c.jsx(he,{disabled:x,type:"submit",variant:"submit",className:"w-full my-2 rounded-full",children:"Create Admin User"})]})}),c.jsxs("p",{className:"text-muted-foreground flex gap-2 align-middle",children:[c.jsx(tte,{size:36,className:"flex-none"}),c.jsx("span",{children:"These credentials will be used to sign into your cluster directly, providing you a secure connection from your browser to your cluster."})]})]})})]})}function vEe({columns:e,data:t}){const n=M0({data:t,columns:e,getCoreRowModel:P0()});return c.jsx("div",{className:"bg-black-dark rounded-md",children:c.jsxs(z0,{children:[c.jsx(eg,{children:n.getHeaderGroups().map(r=>c.jsx(Xi,{className:"border-none",children:r.headers.map(i=>c.jsx(FI,{className:"p-4",style:{width:`${i.getSize()}%`},children:i.isPlaceholder?null:Xc(i.column.columnDef.header,i.getContext())},i.id))},r.id))}),c.jsx(L0,{className:"bg-black",children:n.getRowModel().rows?.length?n.getRowModel().rows.map(r=>c.jsx(Xi,{"data-state":r.getIsSelected()&&"selected",className:"hover:bg-muted/10 data-[state=selected]:bg-muted",children:r.getVisibleCells().map(i=>c.jsx(Ss,{className:"p-4",style:{width:`${i.column.getSize()}%`},children:Xc(i.column.columnDef.cell,i.getContext())},i.id))},r.id)):c.jsx(Xi,{children:c.jsx(Ss,{colSpan:e.length,className:"h-24 text-center",children:"No results."})})})]})})}function yEe(){return c.jsx("div",{className:"flex-col items-center justify-center px-16 space-y-3 text-center pt-30",children:c.jsx("p",{children:"No instances found."})})}function bEe({isSelfManaged:e,instance:t}){const{user:n,isLoading:r}=_s(t.id),i=b.useMemo(()=>aE(t),[t]),o=dh(i),{update:a}=Cpe(),l=Ct.checkForFabricConnect(t.id),d=b.useCallback(async()=>{await rh({instanceClient:o,entityId:t.id}),Ct.setUserForEntity(t,null)},[t,o]);return r||!["CLONE_READY","RUNNING","UPDATED"].includes(t.status)?c.jsx(K4,{className:"animate-spin",color:"gray"}):!n||l?c.jsxs("span",{className:"flex gap-4",children:[a&&!e&&c.jsx(Ye,{to:`../instance/${t.id}${Ea}`,className:"text-sm","aria-label":`Connect to ${t.name} instance`,title:`Connect to ${t.name} instance`,children:c.jsx(he,{variant:"positiveOutline",children:"Fabric Connect"})}),c.jsx(Ye,{to:`../instance/${t.id}/sign-in`,className:"text-sm","aria-label":`Sign in to ${t.name} instance`,title:`Sign in to ${t.name} instance`,children:c.jsx(he,{variant:a?"defaultOutline":"positiveOutline",children:"Direct Sign In"})})]}):c.jsxs("span",{className:"flex gap-4",children:[c.jsx(Ye,{to:`../instance/${t.id}${Ea}`,className:"text-sm","aria-label":`Go to ${t.name} instance`,title:`Go to ${t.name} instance`,children:c.jsx(he,{variant:"positiveOutline",children:"Direct Connect"})}),c.jsx(he,{variant:"destructiveOutline",className:"text-sm","aria-label":`Sign out from ${t.name} instance`,title:`Sign out from ${t.name} instance`,onClick:d,children:"Direct Sign Out"})]})}function xEe(){const{clusterId:e}=nt({strict:!1}),{data:t,isLoading:n}=Dt(Aa(e,!0)),r=Wh(t),i=b.useMemo(()=>[{id:"instanceActions",size:1,minSize:1,cell:a=>c.jsx("div",{className:"flex justify-end",children:c.jsx(bEe,{isSelfManaged:r,instance:a.row.original})})},r&&{accessorKey:"instanceFqdn",size:90,header:"URL",cell:a=>Cq({secure:a.row.original.operationsApiSecure?"true":"false",port:a.row.original.operationsApiPort,fqdn:a.row.original.instanceFqdn})},!r&&{accessorKey:"name",size:90,header:"Name"},!r&&{accessorKey:"status",header:"Status",size:1,minSize:1,cell:a=>{const l=a.getValue();return c.jsx(ra,{variant:x8(l),children:Eo(l)})}},!r&&{accessorKey:"version",size:1,minSize:1,header:"Version"},!r&&{accessorKey:"storageGb",size:1,minSize:1,header:"Storage",cell:a=>{const l=a.getValue();return Zo(l,Math.pow(1024,3))}},!r&&{accessorKey:"cpuCores",size:1,minSize:1,header:"Cores/Threads",cell:a=>c.jsxs(c.Fragment,{children:[a.row.original.cpuCores," / ",a.row.original.threads]})},!r&&{accessorKey:"memoryMb",size:1,minSize:1,header:"Memory",cell:a=>{const l=a.getValue();return Zo(l,Math.pow(1024,2))}}].filter(Lo),[r]),o=b.useMemo(()=>t?.instances?t.instances.filter(a=>a.status&&!yj.includes(a.status)).sort(D9):[],[t]);return c.jsxs(c.Fragment,{children:[c.jsx(Es,{}),c.jsx("div",{className:"mt-32 px-4 pt-4 md:px-12 min-h-[calc(100vh-theme(spacing.32))]",children:c.jsx(Lc,{className:"p-0 mt-4 min-h-96",children:c.jsx(Cs,{className:"p-0 min-h-96",children:n?c.jsx(Lr,{}):o.length?c.jsx(vEe,{data:o,columns:i}):c.jsx(yEe,{})})})})]})}function wEe(){const{clusterId:e}=nt({strict:!1}),{data:t,isLoading:n}=Dt(Aa(e,2e3)),r=t?.status,i=b.useMemo(()=>r&&Tx.includes(r),[r]);return n||!t?c.jsx(pl,{className:"flex justify-center",children:c.jsx(Lr,{})}):i?c.jsx(pl,{className:"flex justify-center",children:c.jsxs("div",{className:"center w-2xl flex flex-col gap-4",children:[c.jsx("h1",{className:"text-xl text-center",children:"All done!"}),c.jsx(Hm,{cluster:t,forceProgressBarVisible:!0}),c.jsx("p",{children:"Your cluster finished updating, and is ready for interaction."}),c.jsx("div",{className:"text-center",children:c.jsx(NI,{cluster:t})})]})}):c.jsx(pl,{className:"flex justify-center",children:c.jsxs("div",{className:"center w-2xl flex flex-col gap-4",children:[c.jsx("h1",{className:"text-xl text-center",children:"Here we go!"}),c.jsx(Hm,{cluster:t,forceProgressBarVisible:!0}),c.jsxs("p",{children:["Your cluster is updating with the latest changes. This includes waiting several minutes to let traffic drain safely."," ",c.jsxs("span",{className:"text-muted-foreground",children:["We will let you know when we are ready for you to connect! In the meantime, join us on"," ",c.jsx("a",{href:"https://discord.gg/VzZuaw3Xay",target:"_blank",rel:"noreferrer",className:"underline hover:text-blue-300",children:"Discord"}),"! Get real-time help from our engineers, see feature drops early, and connect with others building on Fabric."]})]})]})})}function SEe(){const e=_n(),{clusterId:t}=nt({strict:!1}),{data:n,isLoading:r}=Dt(Aa(t,2e3)),i=n?.status,o=b.useMemo(()=>i&&Tx.includes(i),[i]),a=Vh(i),[,l]=Lf(gu.SavedClusterState,null),d=b.useCallback(()=>{l(n),e.navigate({to:`/${n.organizationId}/new-cluster`})},[n,e,l]);return r||!n?c.jsx(pl,{className:"flex justify-center",children:c.jsx(Lr,{})}):a?c.jsx(pl,{className:"flex justify-center",children:c.jsxs("div",{className:"center max-w-2xl flex flex-col gap-4 items-center",children:[c.jsx(Rte,{className:"w-24 h-24"}),c.jsxs("span",{children:["Your cluster failed to successfully start. This is usually caused by temporary communication problems. Would you like to try again? We also get notified about these failures. ",c.jsx(Il,{})," if you want more help."]}),c.jsx(he,{type:"button",variant:"positiveOutline",onClick:d,children:"Try Again"})]})}):o?c.jsx(pl,{className:"flex justify-center",children:c.jsxs("div",{className:"center max-w-2xl flex flex-col gap-4",children:[c.jsx("h1",{className:"text-xl text-center",children:"It's ready!"}),c.jsx(Hm,{cluster:n,forceProgressBarVisible:!0}),c.jsxs("p",{children:["Let's set up your secure, browser-to-cluster connection now."," ",c.jsxs("span",{className:"text-muted-foreground",children:["Did you know during this step, you connect straight to your cluster, providing a private secure connection? That's ",c.jsx("em",{children:"Direct Connect"}),"! Once you create your user, you will have the option to"," ",c.jsx("em",{children:"Fabric Connect"})," from your Fabric account without having to sign in again."]})]}),c.jsx("div",{className:"text-center",children:c.jsx(NI,{cluster:n})})]})}):c.jsx(pl,{className:"flex justify-center",children:c.jsxs("div",{className:"center max-w-2xl flex flex-col gap-4",children:[c.jsx("h1",{className:"text-xl text-center",children:"Here we go!"}),c.jsx(Hm,{cluster:n,forceProgressBarVisible:!0}),c.jsxs("p",{children:["Your cluster is spinning up with the latest changes, including your own DNS records and private connections. Please wait while we get everything going."," ",c.jsxs("span",{className:"text-muted-foreground",children:["We will let you know when we are ready for you to connect! In the meantime, join us on"," ",c.jsx("a",{href:"https://discord.gg/VzZuaw3Xay",target:"_blank",rel:"noreferrer",className:"underline hover:text-blue-300",children:"Discord"}),"! Get real-time help from our engineers, see feature drops early, and connect with others building on Fabric."]})]})]})})}Qe({getParentRoute:()=>Ia,path:"instances",component:xEe});Qe({getParentRoute:()=>Ia,path:"starting-up",component:SEe});Qe({getParentRoute:()=>Ia,path:"scaling",component:wEe});Qe({getParentRoute:()=>Ia,path:"domains",component:cEe});Qe({getParentRoute:()=>Ia,path:"sign-in",component:mI,beforeLoad:({context:e,location:t,params:n})=>{const r=Ct.checkForFabricConnect(n.clusterId);if(e.authentication[n.clusterId]?.user&&!r){const i=t?.search;throw eu({to:i?.redirect?.startsWith("/")?i.redirect:Gk})}}});Qe({getParentRoute:()=>Ia,path:"instance/$instanceId/sign-in",component:mI,beforeLoad:({context:e,location:t,params:n})=>{if(!(Ct.checkForFabricConnect(n.clusterId)||Ct.checkForFabricConnect(n.instanceId))&&e.authentication[n.instanceId]?.user){const i=t?.search;throw eu({to:i?.redirect?.startsWith("/")?i.redirect:Gk})}}});Qe({getParentRoute:()=>Ia,path:"finish-setup",component:gEe});function _Ee(e){return Qe({getParentRoute:()=>e,path:"apis"}).lazy(()=>ch(()=>import("./index.lazy-C7Y8KaC7.js"),__vite__mapDeps([0,1,2])).then(t=>t.route))}function VP(e,t){if(e===t)return!0;if(!e||!t)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const i of n)if(!r.includes(i)||e[i]!==t[i])return!1;return!0}function dm(e,t){const[n,r]=b.useState(t),[i,o]=b.useState(e);return b.useEffect(()=>{VP(n,t)||(r(t),o(e))},[n,t,e]),VP(n,t)?[i,o]:[e,o]}const Sd={};function yb(e,t,n){const r=b.useCallback((i,o)=>t(i,o),[n]);b.useEffect(()=>(Sd[e]||(Sd[e]=[]),Sd[e].push(r),function(){const o=Sd[e].indexOf(r);o>=0&&Sd[e].splice(o,1)}),[e,t,r])}function rg(e,t,n){const r=Sd[e];if(r)for(const i of r)i(t,n)}function u7(e,t,n){return r=>rg(e,t,r)}function A1(e,t,n){return b.useCallback(r=>rg(e,t,r),[e,t,n])}function BP(e,t){return Jh(sessionStorage.getItem(String(e)))??t}function CEe(e,t){t==null?sessionStorage.removeItem(String(e)):sessionStorage.setItem(String(e),JSON.stringify(t))}function Ld(e,t){const n=dm(BP(e,t),[e]),[r,i]=n;return b.useEffect(()=>{CEe(e,r),rg(`Session:${e}`,r)},[e,r]),yb(`Session:${e}`,function(a){r!==a&&i(a)},[r,e,t]),b.useEffect(function(){const a=l=>{l.key===e&&i(BP(e,t))};return window.addEventListener("storage",a),()=>{window.removeEventListener("storage",a)}},[e,i,t]),n}function kEe(e,t=!1){const[n,r]=Ld(e,t),i=b.useCallback(l=>{l?.preventDefault?.(),r(d=>!d)},[r]),o=b.useCallback(l=>{l?.preventDefault?.(),r(!0)},[r]),a=b.useCallback(l=>{l?.preventDefault?.(),r(!1)},[r]);return b.useMemo(()=>({toggled:n,setToggled:r,toggle:i,toggleOn:o,toggleOff:a}),[i,r,a,o,n])}const d7=b.createContext(null);function Vr(){return b.useContext(d7)}async function f7({file:e,project:t,entityType:n,instanceClient:r}){const{data:i}=await r.post("/",{operation:"drop_component",file:e||void 0,project:t,replicated:n==="cluster"});return i}function q0(e){const t=(e||"")?.split(".");return t.length>1?t.slice(-1)[0]:""}function p7(e){switch(q0(e).toLowerCase()){case"jpg":case"jpeg":case"gif":case"png":case"pneg":case"webp":return!0;default:return!1}}async function m7({instanceClient:e,file:t,project:n,encoding:r}){const{data:i}=await e.post("/",{operation:"get_component_file",file:t,project:n,encoding:r??(p7(t)?"base64":"utf8")});return{file:t,project:n,...i}}function EEe(e){return{queryKey:h7(e),queryFn:()=>m7(e),enabled:!!e.file&&!!e.project,retry:!1}}function h7(e){return[e.entityId,"get_component_file",e.file,e.project,e.encoding]}async function BI({file:e,payload:t,project:n,entityType:r,instanceClient:i,encoding:o}){const{data:a}=await i.post("/",{operation:"set_component_file",file:e,payload:t,project:n,encoding:o,replicated:r==="cluster"},{timeout:3e5});return a}function g7(){return ot({mutationFn:BI})}function v7(){const{reloadRootEntries:e,setFocusedItem:t,setSelectedItems:n}=Vr(),r=Ut();return b.useCallback(async i=>{let o=!1;const a=i.filter(y=>y.from!==y.to);if(a.length===0)return;const l=`Renaming ${Mr(a.length,"File","Files")}`,d={duration:6e4,action:{label:"Cancel",onClick:()=>{o=!0}}};d.id=ye.loading(l,{...d,description:c.jsx(qm,{animated:!0,width:"0%"})});const m=a.length*3;let h=0;function v(){h+=1,ye.loading(l,{...d,description:c.jsx(qm,{animated:!0,width:(h===0?0:h/m*100)+"%"})})}for(const y of a){const x=y.from.split("/"),S=x.shift(),C=x.join("/"),k=y.to.split("/"),E=k.shift(),j=k.join("/"),I=await m7({...r,file:C,project:S,encoding:"base64"});if(o||(v(),await BI({...r,file:j,project:E,encoding:"base64",payload:I.message}),o)||(v(),await f7({...r,file:C,project:S}),o))break;v()}h>=m?ye.success(`Renamed ${Mr(a.length,"File","Files")}`,{id:d.id,description:"All done!",duration:3e3,action:{label:"OK",onClick:()=>{}}}):ye.warning("Rename Cancelled",{id:d.id,description:`${h} of ${m} steps completed.`,duration:1e4,action:{label:"OK",onClick:()=>{}}}),e(),n(y=>{const x=y.slice();for(const S of a){const C=x.indexOf(S.from);C>=0?x.splice(C,1,S.to):x.push(S.to)}return x}),t(y=>{for(const x of a)if(y===x.from)return x.to;return y})},[r,e,t,n])}function jEe(e,t){return e[t]!==void 0}function y7(e){return t=>jEe(t,e)}function Gl(e,t){const[n,r]=b.useState({value:t});return yb(e,(i,o)=>r({value:i,trigger:o}),[r]),n}function ii(e,t,n){rg(e,t,n)}function K0(e,t,n){return r=>ii(e,t,r)}function os(e,t,n){return b.useCallback(r=>{ii(e,t,r)},[e,t,n])}const REe={handleGlobal(e,t){if((t.cmd||t.ctrl)&&e==="Delete")return ii("ShowDeleteDirectoryOrFileModal",!0),!0},addEditorAction(e){return{id:"delete-file",label:"Delete File",keybindings:[e.KeyMod.CtrlCmd|e.KeyCode.Delete],run:K0("ShowDeleteDirectoryOrFileModal",!0)}}},IEe={handleGlobal(e,t){if(t.ctrl&&t.alt&&t.shift&&e==="˜")return ii("ShowAddDirectoryOrFileModalType","directory"),!0},addEditorAction(e){return{id:"new-directory",label:"New Directory",keybindings:[e.KeyMod.WinCtrl|e.KeyMod.Alt|e.KeyMod.Shift|e.KeyCode.KeyN],run:K0("ShowAddDirectoryOrFileModalType","directory")}}},TEe={handleGlobal(e,t){if(t.ctrl&&e==="n")return ii("ShowAddDirectoryOrFileModalType","file"),!0},addEditorAction(e){return{id:"new-file",label:"New File",keybindings:[e.KeyMod.WinCtrl|e.KeyCode.KeyN],run:K0("ShowAddDirectoryOrFileModalType","file")}}},NEe={handleGlobal(e){if(e==="F2")return ii("ShowRenameFileModal","file"),!0},addEditorAction(e){return{id:"rename-file",label:"Rename File",keybindings:[e.KeyMod.WinCtrl|e.KeyMod.Alt|e.KeyCode.KeyR,e.KeyCode.F2],run:K0("ShowRenameFileModal",!0)}}},AEe={addEditorAction(){return{id:"revert-file",label:"Revert File",run:u7("RevertChanges",!0)}}},OEe={handleGlobal(e,t){if(t.cmd&&e==="s")return rg("SaveFile",!0),!0},addEditorAction(e){return{id:"save-file",label:"Save Changes",keybindings:[e.KeyMod.CtrlCmd|e.KeyCode.KeyS],run:u7("SaveFile",!0)}}},b7=[REe,IEe,TEe,NEe,AEe,OEe],DEe=b7.filter(y7("addEditorAction")),$Ee=b7.filter(y7("handleGlobal"));function PEe(e){const[t,n]=e,r=DEe.map(i=>t.addAction(i.addEditorAction(n)));return()=>{for(const i of r)i?.dispose()}}function MEe(){b.useEffect(()=>(document.addEventListener("keydown",HP),()=>{document.removeEventListener("keydown",HP)}),[])}function HP(e){const t=e.getModifierState("Meta"),n=e.getModifierState("Alt"),r=e.getModifierState("Shift"),i=e.getModifierState("Control"),o={cmd:t,alt:n,shift:r,ctrl:i};for(const a of $Ee)if(a.handleGlobal(e.key,o)){e.preventDefault();return}}function zEe(e){return e.split("/").pop()}function HI(...e){return e.flat(1).join("/")}var us;(function(e){e.DoubleClickItemToExpand="double-click-item-to-expand",e.ClickItemToExpand="click-item-to-expand",e.ClickArrowToExpand="click-arrow-to-expand"})(us||(us={}));var bb=function(){return bb=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},bb.apply(this,arguments)},LEe=function(e,t){return{mode:e.mode,createInteractiveElementProps:function(n,r,i,o){return bb(bb({},t.createInteractiveElementProps(n,r,i,o)),e.createInteractiveElementProps(n,r,i,o))}}},df=function(e){return e.ctrlKey||navigator.platform.toUpperCase().indexOf("MAC")>=0&&e.metaKey},FEe=(function(){function e(t){this.mode=us.DoubleClickItemToExpand,this.environment=t}return e.prototype.createInteractiveElementProps=function(t,n,r,i){var o=this;return{onClick:function(a){var l=a.detail===0;r.focusItem(),a.shiftKey&&!l?r.selectUpTo(!df(a)):df(a)&&!l?i.isSelected?r.unselectItem():r.addToSelectedItems():r.selectItem()},onDoubleClick:function(){r.focusItem(),r.selectItem(),t.isFolder&&r.toggleExpandedState(),(!t.isFolder||o.environment.canInvokePrimaryActionOnItemContainer)&&r.primaryAction()},onFocus:function(){r.focusItem()},onDragStart:function(a){a.dataTransfer.dropEffect="move",r.startDragging()},onDragOver:function(a){a.preventDefault()},draggable:i.canDrag&&!i.isRenaming,tabIndex:i.isRenaming?void 0:i.isFocused?0:-1}},e})(),UEe=(function(){function e(t){this.mode=us.ClickItemToExpand,this.environment=t}return e.prototype.createInteractiveElementProps=function(t,n,r,i){var o=this;return{onClick:function(a){var l=a.detail===0;r.focusItem(),a.shiftKey&&!l?r.selectUpTo(!df(a)):df(a)&&!l?i.isSelected?r.unselectItem():r.addToSelectedItems():(t.isFolder&&r.toggleExpandedState(),r.selectItem(),(!t.isFolder||o.environment.canInvokePrimaryActionOnItemContainer)&&r.primaryAction())},onFocus:function(){r.focusItem()},onDragStart:function(a){a.dataTransfer.dropEffect="move",r.startDragging()},onDragOver:function(a){a.preventDefault()},draggable:i.canDrag&&!i.isRenaming,tabIndex:i.isRenaming?void 0:i.isFocused?0:-1}},e})(),VEe=(function(){function e(t){this.mode=us.ClickItemToExpand,this.environment=t}return e.prototype.createInteractiveElementProps=function(t,n,r,i){var o=this;return{onClick:function(a){var l=a.detail===0;r.focusItem(),a.shiftKey&&!l?r.selectUpTo(!df(a)):df(a)&&!l?i.isSelected?r.unselectItem():r.addToSelectedItems():(r.selectItem(),(!t.isFolder||o.environment.canInvokePrimaryActionOnItemContainer)&&r.primaryAction())},onFocus:function(){r.focusItem()},onDragStart:function(a){a.dataTransfer.dropEffect="move",r.startDragging()},onDragOver:function(a){a.preventDefault()},draggable:i.canDrag&&!i.isRenaming,tabIndex:i.isRenaming?void 0:i.isFocused?0:-1}},e})(),qP=function(e,t){switch(e){case us.DoubleClickItemToExpand:return new FEe(t);case us.ClickItemToExpand:return new UEe(t);case us.ClickArrowToExpand:return new VEe(t);default:throw Error("Unknown interaction mode ".concat(e))}},x7=b.createContext(null),BEe=function(){return b.useContext(x7)},HEe=function(e){var t=e.children,n=bn(),r=n.defaultInteractionMode,i=b.useMemo(function(){var o;return r&&typeof r!="string"?r.extends?LEe(r,qP(r.extends,n)):r:qP((o=r)!==null&&o!==void 0?o:us.ClickItemToExpand,n)},[]);return b.createElement(x7.Provider,{value:i},t)},w7=function(){var e=bn();return b.useCallback(function(t,n){if(t.targetType==="between-items"){if(!e.canReorderItems)return!1}else if(t.targetType==="root"){if(!e.canDropOnFolder)return!1}else{var r=e.items[t.targetItem];if(!r||!e.canDropOnFolder&&r.isFolder||!e.canDropOnNonFolder&&!r.isFolder||n.some(function(i){return i.index===t.targetItem}))return!1}return!(e.canDropAt&&(!n||!e.canDropAt(n,t)))},[e])},S7=function(){var e=bn();return b.useCallback(function(t,n){for(var r=e.linearItems[n],i=r[t].depth,o=t;r[o]&&r[o].depth!==i-1;o-=1);var a=r[o];return a||(a={item:e.trees[n].rootItem,depth:0},o=0),{parent:a,parentLinearIndex:o}},[e.linearItems,e.trees])},qEe=function(){var e=bn(),t=S7(),n=w7(),r=b.useCallback(function(i,o,a){var l=t(o,i),d=l.parent,f=l.parentLinearIndex;return a.some(function(m){return m.index===d.item})?!0:d.depth===0?!1:r(i,f,a)},[t]);return b.useCallback(function(i,o){for(var a,l,d,f,m=e.linearItems[i],h=[],v=-1,y=0;y<m.length;y++){var x=m[y],S=x.item,C=x.depth;if(!(v!==-1&&C>v)){v=-1;var k=t(y,i).parent,E=e.items[k.item].children.indexOf(S);if(r(i,y,o)){v=C+1;continue}var j={targetType:"item",parentItem:k.item,targetItem:S,linearIndex:y,depth:C,treeId:i},I={targetType:"between-items",parentItem:k.item,linePosition:"top",childIndex:E,depth:C,treeId:i,linearIndex:y},A={targetType:"between-items",parentItem:k.item,linePosition:"bottom",linearIndex:y+1,childIndex:E+1,depth:C,treeId:i},T=(l=(a=m[y-1])===null||a===void 0?void 0:a.depth)!==null&&l!==void 0?l:-1,N=(f=(d=m[y+1])===null||d===void 0?void 0:d.depth)!==null&&f!==void 0?f:-1,D=C===T,L=C===N-1;!D&&n(I,o)&&h.push(I),n(j,o)&&h.push(j),!L&&n(A,o)&&h.push(A)}}return h},[n,e.items,e.linearItems,t,r])},ty=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},xb=function(e,t,n){var r=b.useRef();b.useEffect(function(){if(!r.current)r.current=ty([],n,!0),e();else{var i=r.current.some(function(o,a){return o!==n[a]});i&&(r.current=ty([],n,!0),e())}},ty(ty([],t,!0),n,!0))},wb=function(){return wb=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},wb.apply(this,arguments)},_7=function(e,t){return e.map(function(n){return[n,t(n)]}).reduce(function(n,r){var i,o=r[0],a=r[1];return wb(wb({},n),(i={},i[o]=a,i))},{})},Ro=function(){return typeof document<"u"?document:void 0};function Vf(e){e===void 0&&(e=!1);var t=b.useRef(new Array);return b.useEffect(function(){if(e)return function(){};var n=t.current;return function(){return n.forEach(function(r){return cancelAnimationFrame(r)})}},[e,t]),b.useCallback(function(n){var r=requestAnimationFrame(function(){t.current.splice(t.current.indexOf(r),1),n()});t.current.push(r)},[t])}var Sb=function(e){var t=b.useRef(e);return t.current=e,t},Io=function(e){var t=Sb(e);return b.useCallback((function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return t.current.apply(t,n)}),[t])},C7=function(){var e=bn();return Io(function(t,n){return n.map(function(r){return[r,e.linearItems[t].findIndex(function(i){return i.item===r.index})]}).sort(function(r,i){r[0];var o=r[1];i[0];var a=i[1];return o-a}).map(function(r){var i=r[0];return i})})},KEe=function(e){var t,n=(t=Ro())===null||t===void 0?void 0:t.querySelector('[data-rct-tree="'.concat(e,'"] [data-rct-item-container="true"]'));if(n){var r=getComputedStyle(n);return n.offsetHeight+Math.max(parseFloat(r.marginTop),parseFloat(r.marginBottom))}return 5},k7=function(e,t){return e.clientX<=t.left||e.clientX>=t.right||e.clientY<=t.top||e.clientY>=t.bottom},GEe=(function(){function e(t,n,r,i,o,a){this.env=t,this.e=n,this.treeId=r,this.linearIndex=i.linearIndex,this.offset=i.offset,this.indentation=i.indentation,this.targetItem=this.env.linearItems[this.treeId][this.linearIndex],this.getParentOfLinearItem=a,this.draggingItems=o}return e.prototype.getEmptyTreeDragPosition=function(){return{targetType:"root",treeId:this.treeId,depth:0,linearIndex:0,targetItem:this.env.trees[this.treeId].rootItem}},e.prototype.maybeRedirectToParent=function(){var t=!this.env.canReorderItems&&!this.env.canDropOnNonFolder&&!this.env.items[this.targetItem.item].isFolder;if(t){var n=this.getParentOfLinearItem(this.linearIndex,this.treeId),r=n.parentLinearIndex,i=n.parent;this.targetItem=i,this.linearIndex=r}},e.prototype.maybeReparentUpwards=function(){var t,n;if(this.indentation!==void 0){var r=this.env.linearItems[this.treeId],i=r[this.linearIndex].depth,o=i-((n=(t=r[this.linearIndex+1])===null||t===void 0?void 0:t.depth)!==null&&n!==void 0?n:0),a=this.offset==="bottom"&&o>0;if(a){for(var l=Math.max(i-o,this.indentation),d={parentLinearIndex:this.linearIndex,parent:this.targetItem},f,m=i;m>=l;m-=1)f=d,d=this.getParentOfLinearItem(d.parentLinearIndex,this.treeId);if(this.indentation!==r[this.linearIndex].depth&&f){var h=this.env.items[d.parent.item].children.indexOf(f.parent.item)+1;if(!(this.draggingItems&&this.isDescendant(this.treeId,d.parentLinearIndex+1,this.draggingItems)))return{targetType:"between-items",treeId:this.treeId,parentItem:d.parent.item,depth:l,linearIndex:this.linearIndex+1,childIndex:h,linePosition:"bottom"}}}}},e.prototype.maybeRedirectInsideOpenFolder=function(){var t=this.env.linearItems[this.treeId][this.linearIndex+1],n=!this.env.canDropBelowOpenFolders&&t&&this.targetItem.depth===t.depth-1&&this.offset==="bottom";n&&(this.targetItem=t,this.linearIndex+=1,this.offset="top")},e.prototype.maybeMapToBottomOffset=function(){var t=this.env.linearItems[this.treeId][this.linearIndex-1];if(!(!t||t?.depth===void 0)){var n=t.depth-this.targetItem.depth;this.offset==="top"&&(n===0||n>0&&this.indentation!==void 0)&&(this.offset="bottom",this.linearIndex-=1,this.targetItem=this.env.linearItems[this.treeId][this.linearIndex])}},e.prototype.canDropAtCurrentTarget=function(){var t=this,n,r=this.env.items[this.targetItem.item];return!(!this.offset&&!this.env.canDropOnNonFolder&&!r.isFolder||!this.offset&&!this.env.canDropOnFolder&&r.isFolder||this.offset&&!this.env.canReorderItems||!((n=this.draggingItems)===null||n===void 0)&&n.some(function(i){return i.index===t.targetItem.item}))},e.prototype.getDraggingPosition=function(){if(this.env.linearItems[this.treeId].length===0)return this.getEmptyTreeDragPosition();if(!(!this.draggingItems||this.linearIndex<0||this.linearIndex>=this.env.linearItems[this.treeId].length)){this.maybeRedirectToParent(),this.maybeRedirectInsideOpenFolder(),this.maybeMapToBottomOffset();var t=this.maybeReparentUpwards();if(t)return t;if(this.areDraggingItemsDescendantOfTarget()||!this.canDropAtCurrentTarget())return"invalid";var n=this.getParentOfLinearItem(this.linearIndex,this.treeId).parent,r=this.env.items[n.item].children.indexOf(this.targetItem.item)+(this.offset==="top"?0:1);return this.offset?{targetType:"between-items",treeId:this.treeId,parentItem:n.item,depth:this.targetItem.depth,linearIndex:this.linearIndex+(this.offset==="top"?0:1),childIndex:r,linePosition:this.offset}:{targetType:"item",treeId:this.treeId,parentItem:n.item,targetItem:this.targetItem.item,depth:this.targetItem.depth,linearIndex:this.linearIndex}}},e.prototype.isDescendant=function(t,n,r){var i=this.getParentOfLinearItem(n,t),o=i.parentLinearIndex,a=i.parent;return r.some(function(l){return l.index===a.item})?!0:a.depth===0?!1:this.isDescendant(t,o,r)},e.prototype.areDraggingItemsDescendantOfTarget=function(){return this.draggingItems&&this.isDescendant(this.treeId,this.linearIndex,this.draggingItems)},e})(),ZEe=function(){var e=b.useRef("initial"),t=b.useState(void 0),n=t[0],r=t[1],i=b.useRef(0),o=bn(),a=S7(),l=Io(function(v,y,x){if(!x)return!1;var S=x.offset,C=x.linearIndex,k="".concat(y,"__").concat(C,"__").concat(S??"","__").concat(x.indentation);return k!==e.current?(e.current=k,!0):!1}),d=Io(function(v,y,x){if(x.current){var S=x.current.getBoundingClientRect();if(!k7(v,S)){var C=(v.clientY-S.top)/i.current,k=o.linearItems[y],E=Math.min(Math.max(0,Math.floor(C)),k.length-1);if(k.length===0)return{linearIndex:0,offset:"bottom",indentation:0};var j=k[E],I=o.items[j.item],A=o.renderDepthOffset?Math.max(Math.floor((v.clientX-S.left)/o.renderDepthOffset),0):void 0,T,N=o.canReorderItems?I?.isFolder&&o.canDropOnFolder||o.canDropOnNonFolder?.2:.5:0;return C-.5>=k.length-1?T="bottom":C%1<N?T="top":C%1>1-N&&(T="bottom"),{linearIndex:E,offset:T,indentation:A}}}}),f=Io(function(v,y,x){var S=d(v,y,x);if(l(v,y,S))return!n||!o.canDragAndDrop||!S||v.clientX<0||v.clientY<0?"invalid":new GEe(o,v,y,S,n,a).getDraggingPosition()}),m=Io(function(v,y){r(y),e.current="initial",i.current=KEe(v)}),h=Io(function(){r(void 0),e.current="initial",i.current=0});return{initiateDraggingPosition:m,resetDraggingPosition:h,draggingItems:n,getDraggingPosition:f,itemHeight:i}},E7=b.createContext(null),$a=function(){return b.useContext(E7)},YEe=function(e){var t=e.children,n=bn(),r=b.useState(!1),i=r[0],o=r[1],a=b.useState({}),l=a[0],d=a[1],f=b.useState(0),m=f[0],h=f[1],v=b.useState(),y=v[0],x=v[1],S=qEe(),C=Vf(),k=C7(),E=ZEe(),j=E.initiateDraggingPosition,I=E.resetDraggingPosition,A=E.draggingItems,T=E.getDraggingPosition,N=E.itemHeight,D=b.useCallback(function(V,O){var X;if(n.activeTreeId&&(!((X=n.viewState[n.activeTreeId])===null||X===void 0)&&X.focusedItem)&&n.linearItems&&O){var de=n.viewState[n.activeTreeId].focusedItem,ge=S(n.activeTreeId,O),Q=ge.findIndex(function(ve){return ve.targetType==="item"?ve.targetItem===de:ve.targetType==="between-items"?n.items[ve.parentItem].children[ve.childIndex]===de:!1});h(Q?Math.min(Q+1,ge.length-1):0)}else h(0)},[n.activeTreeId,n.items,n.linearItems,n.viewState,S]),L=Io(function(){o(!1),d({}),h(0),x(void 0),I()});xb(function(){n.activeTreeId&&n.linearItems[n.activeTreeId]&&l[n.activeTreeId]&&D(l[n.activeTreeId],A)},[A,n.activeTreeId,n.linearItems,D,l],[n.activeTreeId]),xb(function(){i&&n.activeTreeId&&x(l[n.activeTreeId][m])},[m,n.activeTreeId,i,l],[m,n.activeTreeId]);var H=w7(),ee=function(V){var O;A&&!H(V,A)||(x(V),n.setActiveTree(V.treeId),A&&n.activeTreeId!==V.treeId&&((O=n.onSelectItems)===null||O===void 0||O.call(n,A.map(function(X){return X.index}),V.treeId)))},G=Io(function(V,O,X){if(A){var de=T(V,O,X);if(de){if(de==="invalid"){x(void 0);return}ee(de)}}}),K=Io(function(V,O){O.current&&k7(V,O.current.getBoundingClientRect())&&x(void 0)}),B=Io(function(){!A||!y||!n.onDrop||(n.onDrop(A,y),C(function(){var V;(V=n.onFocusItem)===null||V===void 0||V.call(n,A[0],y.treeId),L()}))}),q=b.useCallback(function(V,O){var X=_7(n.treeIds,function(de){return S(de,V)});j(O,V),d(X),n.activeTreeId&&D(X[n.activeTreeId],V)},[n.activeTreeId,n.treeIds,S,j,D]),z=b.useCallback(function(){var V,O,X;if(n.canDragAndDrop&&n.activeTreeId){var de=(O=(V=n.viewState[n.activeTreeId])===null||V===void 0?void 0:V.selectedItems)!==null&&O!==void 0?O:[(X=n.viewState[n.activeTreeId])===null||X===void 0?void 0:X.focusedItem];if(de.length===0||de[0]===void 0)return;var ge=k(n.activeTreeId,de.map(function(Q){return n.items[Q]}));if(n.canDrag&&!n.canDrag(ge))return;q(ge,n.activeTreeId),setTimeout(function(){o(!0)})}},[n,k,q]),W=b.useCallback(function(){L()},[L]),F=b.useCallback(function(){B(),L()},[B,L]),ne=b.useCallback(function(){h(function(V){return Math.max(0,V-1)})},[]),$=b.useCallback(function(){n.activeTreeId&&h(function(V){return Math.min(l[n.activeTreeId].length-1,V+1)})},[n.activeTreeId,l]),P=b.useMemo(function(){return{onStartDraggingItems:q,startProgrammaticDrag:z,abortProgrammaticDrag:W,completeProgrammaticDrag:F,programmaticDragUp:ne,programmaticDragDown:$,draggingItems:A,draggingPosition:y,itemHeight:N.current,isProgrammaticallyDragging:i,onDragOverTreeHandler:G,onDragLeaveContainerHandler:K,viableDragPositions:l}},[W,F,A,y,i,N,G,K,q,$,ne,z,l]);return b.useEffect(function(){return window.addEventListener("dragend",L),window.addEventListener("drop",B),function(){window.removeEventListener("dragend",L),window.removeEventListener("drop",B)}},[B,L]),b.createElement(E7.Provider,{value:P},t)},Sm=function(){return Sm=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Sm.apply(this,arguments)},WEe=function(e,t){var n=bn(),r=$a();b.useImperativeHandle(e,function(){return Sm(Sm(Sm({},t),n),{treeEnvironmentContext:n,dragAndDropContext:r})})},j7=function(e,t,n){return t===void 0&&(t=50),n===void 0&&(n=1e4),new Promise(function(r){e()&&r();var i,o=setInterval(function(){e()&&i()},t),a=setTimeout(function(){i()},n);i=function(){clearInterval(o),clearTimeout(a),r()}})},Ck=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function l(m){try{f(r.next(m))}catch(h){a(h)}}function d(m){try{f(r.throw(m))}catch(h){a(h)}}function f(m){m.done?o(m.value):i(m.value).then(l,d)}f((r=r.apply(e,t||[])).next())})},kk=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function l(f){return function(m){return d([f,m])}}function d(f){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,f[0]&&(n=0)),n;)try{if(r=1,i&&(o=f[0]&2?i.return:f[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,f[1])).done)return o;switch(i=0,o&&(f=[f[0]&2,o.value]),f[0]){case 0:case 1:o=f;break;case 4:return n.label++,{value:f[1],done:!1};case 5:n.label++,i=f[1],f=[0];continue;case 7:f=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(f[0]===6||f[0]===2)){n=0;continue}if(f[0]===3&&(!o||f[1]>o[0]&&f[1]<o[3])){n.label=f[1];break}if(f[0]===6&&n.label<o[1]){n.label=o[1],o=f;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(f);break}o[2]&&n.ops.pop(),n.trys.pop();continue}f=t.call(e,n)}catch(m){f=[6,m],i=0}finally{r=o=0}if(f[0]&5)throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}},KP=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},R7=b.createContext(null),XEe=function(){return b.useContext(R7)},I7=function(e,t,n){return Ck(void 0,void 0,void 0,function(){var r,i,o,a,l,d,f;return kk(this,function(m){for(r=function(h){j7(function(){var v;return!!(!((v=t.current)===null||v===void 0)&&v[h])}).then(function(){var v,y=(v=t.current)===null||v===void 0?void 0:v[h];y?.isFolder&&(n(y),I7(h,t,n))})},i=0,o=(f=(d=(l=t.current)===null||l===void 0?void 0:l[e])===null||d===void 0?void 0:d.children)!==null&&f!==void 0?f:[];i<o.length;i++)a=o[i],r(a);return[2]})})},JEe=b.forwardRef(function(e,t){var n=bn(),r=n.onCollapseItem,i=n.items,o=n.trees,a=n.viewState,l=n.onExpandItem,d=n.onFocusItem,f=n.setActiveTree,m=n.onRenameItem,h=n.onSelectItems,v=n.onPrimaryAction,y=n.linearItems,x=$a(),S=x.abortProgrammaticDrag,C=x.completeProgrammaticDrag,k=x.programmaticDragDown,E=x.programmaticDragUp,j=x.startProgrammaticDrag,I=Sb(i),A=b.useCallback(function($,P){r?.(i[$],P)},[i,r]),T=b.useCallback(function($,P){l?.(i[$],P)},[i,l]),N=b.useCallback(function($,P,V){V===void 0&&(V=!0),d?.(i[$],P,V)},[i,d]),D=b.useCallback(function($,P){P===void 0&&(P=!0),f($,P)},[f]),L=b.useCallback(function($){var P=y[$],V=P.findIndex(function(de){var ge,Q=de.item;return Q===((ge=a[$])===null||ge===void 0?void 0:ge.focusedItem)}),O=V!==void 0?Math.min(P.length-1,V+1):0,X=i[P[O].item];d?.(X,$)},[i,y,d,a]),H=b.useCallback(function($){var P=y[$],V=P.findIndex(function(de){var ge,Q=de.item;return Q===((ge=a[$])===null||ge===void 0?void 0:ge.focusedItem)}),O=V!==void 0?Math.max(0,V-1):0,X=i[P[O].item];d?.(X,$)},[i,y,d,a]),ee=b.useCallback(function($,P,V){m?.(i[$],P,V)},[i,m]),G=b.useCallback(function($,P){h?.($,P)},[h]),K=b.useCallback(function($,P){var V,O;!((O=(V=a[P])===null||V===void 0?void 0:V.expandedItems)===null||O===void 0)&&O.includes($)?r?.(i[$],P):l?.(i[$],P)},[i,r,l,a]),B=b.useCallback(function($,P){var V,O,X,de,ge;!((O=(V=a[P])===null||V===void 0?void 0:V.selectedItems)===null||O===void 0)&&O.includes($)?h?.((de=(X=a[P].selectedItems)===null||X===void 0?void 0:X.filter(function(Q){return Q!==$}))!==null&&de!==void 0?de:[],P):h?.(KP(KP([],(ge=a[P].selectedItems)!==null&&ge!==void 0?ge:[],!0),[$],!1),P)},[h,a]),q=b.useCallback(function($,P){v?.(i[$],P)},[i,v]),z=b.useCallback(function($,P){return Ck(void 0,void 0,void 0,function(){var V,O;return kk(this,function(X){switch(X.label){case 0:return V=P[0],O=P.slice(1),[4,j7(function(){var de;return!!(!((de=I.current)===null||de===void 0)&&de[V])}).then(function(){var de=I.current[V];return de?(l?.(de,$),O.length>0?z($,O):Promise.resolve()):Promise.resolve()})];case 1:return X.sent(),[2]}})})},[I,l]),W=b.useCallback(function($){return Ck(void 0,void 0,void 0,function(){return kk(this,function(P){switch(P.label){case 0:return[4,I7(o[$].rootItem,I,function(V){return l?.(V,$)})];case 1:return P.sent(),[2]}})})},[I,l,o]),F=b.useCallback(function($){for(var P,V,O=0,X=(V=(P=a[$])===null||P===void 0?void 0:P.expandedItems)!==null&&V!==void 0?V:[];O<X.length;O++){var de=X[O];r?.(i[de],$)}},[i,r,a]),ne=b.useMemo(function(){return{collapseItem:A,expandItem:T,focusItem:N,focusTree:D,moveFocusDown:L,moveFocusUp:H,renameItem:ee,selectItems:G,toggleItemExpandedState:K,toggleItemSelectStatus:B,invokePrimaryAction:q,expandAll:W,expandSubsequently:z,collapseAll:F,abortProgrammaticDrag:S,completeProgrammaticDrag:C,moveProgrammaticDragPositionDown:k,moveProgrammaticDragPositionUp:E,startProgrammaticDrag:j}},[A,T,N,D,L,H,ee,G,K,B,q,W,z,F,S,C,k,E,j]);return WEe(t,ne),b.createElement(R7.Provider,{value:ne},e.children)}),QEe=function(e){var t,n,r,i;if(e)if(e.scrollIntoViewIfNeeded)e.scrollIntoViewIfNeeded();else{var o=e.getBoundingClientRect(),a=o.top>=0&&o.left>=0&&o.bottom<=(window.innerHeight||!!(!((n=(t=Ro())===null||t===void 0?void 0:t.documentElement)===null||n===void 0)&&n.clientHeight))&&o.right<=(window.innerWidth||!!(!((i=(r=Ro())===null||r===void 0?void 0:r.documentElement)===null||i===void 0)&&i.clientWidth));a||e.scrollIntoView()}},vi=function(){return vi=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},vi.apply(this,arguments)},el=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.filter(function(n){return!!n}).join(" ")},eje=function(e,t){return{renderItemTitle:function(n){var r=n.title,i=n.context,o=n.info;if(!o.isSearching||!i.isSearchMatching)return r;var a=r.toLowerCase().indexOf(o.search.toLowerCase());return J.createElement(J.Fragment,null,a>0&&J.createElement("span",null,r.slice(0,a)),J.createElement("span",{className:"rct-tree-item-search-highlight"},r.slice(a,a+o.search.length)),a+o.search.length<r.length&&J.createElement("span",null,r.slice(a+o.search.length,r.length)))},renderItemArrow:function(n){var r=n.item,i=n.context;return J.createElement("div",vi({className:el(r.isFolder&&"rct-tree-item-arrow-isFolder",i.isExpanded&&"rct-tree-item-arrow-expanded","rct-tree-item-arrow")},i.arrowProps),r.isFolder&&(i.isExpanded?J.createElement("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 16 16",enableBackground:"new 0 0 16 16",xmlSpace:"preserve"},J.createElement("g",null,J.createElement("g",null,J.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z",className:"rct-tree-item-arrow-path"})))):J.createElement("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 16 16",enableBackground:"new 0 0 16 16",xmlSpace:"preserve"},J.createElement("g",null,J.createElement("g",null,J.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z",className:"rct-tree-item-arrow-path"}))))))},renderItem:function(n){var r=n.item,i=n.depth,o=n.children,a=n.title,l=n.context,d=n.arrow,f=l.isRenaming?"div":"button",m=l.isRenaming?void 0:"button";return J.createElement("li",vi({},l.itemContainerWithChildrenProps,{className:el("rct-tree-item-li",r.isFolder&&"rct-tree-item-li-isFolder",l.isSelected&&"rct-tree-item-li-selected",l.isExpanded&&"rct-tree-item-li-expanded",l.isFocused&&"rct-tree-item-li-focused",l.isDraggingOver&&"rct-tree-item-li-dragging-over",l.isSearchMatching&&"rct-tree-item-li-search-match")}),J.createElement("div",vi({},l.itemContainerWithoutChildrenProps,{style:{"--depthOffset":"".concat((i+1)*e,"px")},className:el("rct-tree-item-title-container",r.isFolder&&"rct-tree-item-title-container-isFolder",l.isSelected&&"rct-tree-item-title-container-selected",l.isExpanded&&"rct-tree-item-title-container-expanded",l.isFocused&&"rct-tree-item-title-container-focused",l.isDraggingOver&&"rct-tree-item-title-container-dragging-over",l.isSearchMatching&&"rct-tree-item-title-container-search-match")}),d,J.createElement(f,vi({type:m},l.interactiveElementProps,{className:el("rct-tree-item-button",r.isFolder&&"rct-tree-item-button-isFolder",l.isSelected&&"rct-tree-item-button-selected",l.isExpanded&&"rct-tree-item-button-expanded",l.isFocused&&"rct-tree-item-button-focused",l.isDraggingOver&&"rct-tree-item-button-dragging-over",l.isSearchMatching&&"rct-tree-item-button-search-match")}),a)),o)},renderRenameInput:function(n){var r=n.inputProps,i=n.inputRef,o=n.submitButtonProps,a=n.submitButtonRef,l=n.formProps;return J.createElement("form",vi({},l,{className:"rct-tree-item-renaming-form"}),J.createElement("input",vi({},r,{ref:i,className:"rct-tree-item-renaming-input"})),J.createElement("input",vi({},o,{ref:a,type:"submit",className:"rct-tree-item-renaming-submit-button",value:"🗸"})))},renderTreeContainer:function(n){var r=n.children,i=n.containerProps,o=n.info;return J.createElement("div",{className:el("rct-tree-root",o.isFocused&&"rct-tree-root-focus",o.isRenaming&&"rct-tree-root-renaming",o.areItemsSelected&&"rct-tree-root-itemsselected",t)},J.createElement("div",vi({},i,{style:vi({minHeight:"30px"},i.style)}),r))},renderItemsContainer:function(n){var r=n.children,i=n.containerProps;return J.createElement("ul",vi({},i,{className:"rct-tree-items-container"}),r)},renderDragBetweenLine:function(n){var r=n.draggingPosition,i=n.lineProps;return J.createElement("div",vi({},i,{style:{left:"".concat(r.depth*e,"px")},className:el("rct-tree-drag-between-line",r.targetType==="between-items"&&r.linePosition==="top"&&"rct-tree-drag-between-line-top",r.targetType==="between-items"&&r.linePosition==="bottom"&&"rct-tree-drag-between-line-bottom")}))},renderSearchInput:function(n){var r=n.inputProps;return J.createElement("div",{className:el("rct-tree-search-input-container")},J.createElement("span",{className:"rct-tree-input-icon"}),J.createElement("input",vi({},r,{className:el("rct-tree-search-input")})))},renderLiveDescriptorContainer:function(n){var r=n.tree,i=n.children;return J.createElement("div",{id:"rct-livedescription-".concat(r.treeId),style:{clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",overflow:"hidden",position:"absolute",whiteSpace:"nowrap",width:"1px"}},i)},renderDepthOffset:e}},tje=function(e){var t=e.renderItem,n=e.renderItemTitle,r=e.renderItemArrow,i=e.renderRenameInput,o=e.renderItemsContainer,a=e.renderTreeContainer,l=e.renderDragBetweenLine,d=e.renderSearchInput,f=e.renderLiveDescriptorContainer,m=e.renderDepthOffset,h=b.useMemo(function(){return eje(m??10)},[m]),v={renderItem:t,renderItemTitle:n,renderItemArrow:r,renderRenameInput:i,renderItemsContainer:o,renderTreeContainer:a,renderDragBetweenLine:l,renderSearchInput:d,renderLiveDescriptorContainer:f,renderDepthOffset:m},y=Object.entries(h).reduce(function(x,S){var C=S[0],k=S[1],E=C;return v[E]?x[E]=v[E]:x[E]=k,x},{});return y.renderItem.displayName="RenderItem",y.renderItemTitle.displayName="RenderItemTitle",y.renderItemArrow.displayName="RenderItemArrow",y.renderRenameInput.displayName="RenderRenameInput",y.renderItemsContainer.displayName="RenderItemsContainer",y.renderTreeContainer.displayName="RenderTreeContainer",y.renderDragBetweenLine.displayName="RenderDragBetweenLine",y.renderSearchInput.displayName="RenderSearchInput",y},qI=function(e,t,n,r){var i,o,a;r===void 0&&(r=0);for(var l=[],d=0,f=(o=(i=n[e])===null||i===void 0?void 0:i.children)!==null&&o!==void 0?o:[];d<f.length;d++){var m=f[d],h=n[m];l.push({item:m,depth:r}),h&&h.isFolder&&h.children&&(!((a=t.expandedItems)===null||a===void 0)&&a.includes(m))&&l.push.apply(l,qI(m,t,n,r+1))}return l},yc=function(){return yc=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},yc.apply(this,arguments)},nje=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},rje=function(e){var t=e.onExpandItem,n=e.onCollapseItem,r=e.onDrop,i=nje(e,["onExpandItem","onCollapseItem","onDrop"]),o=b.useState({}),a=o[0],l=o[1],d=b.useState(),f=d[0],m=d[1],h=b.useMemo(function(){return Object.keys(a)},[a]),v=i.onFocusItem,y=i.autoFocus,x=i.onRegisterTree,S=i.onUnregisterTree,C=i.items,k=i.viewState,E=Sb(v),j=Sb(k),I=b.useMemo(function(){return _7(h,function(B){var q;return qI(a[B].rootItem,(q=k[B])!==null&&q!==void 0?q:{},C)})},[a,C,h,k]),A=b.useCallback(function(B,q,z){var W,F,ne,$,P,V,O,X,de;if(z===void 0&&(z=!0),(y??!0)&&z){var ge=(F=(W=Ro())===null||W===void 0?void 0:W.querySelector('[data-rct-tree="'.concat(q,'"] [data-rct-item-id="').concat(B.index,'"]')))!==null&&F!==void 0?F:(ne=Ro())===null||ne===void 0?void 0:ne.querySelector('[data-rct-tree="'.concat(q,'"] [data-rct-item-id]'));((V=(P=($=Ro())===null||$===void 0?void 0:$.activeElement)===null||P===void 0?void 0:P.attributes.getNamedItem("data-rct-search-input"))===null||V===void 0?void 0:V.value)!=="true"?(O=ge?.focus)===null||O===void 0||O.call(ge):QEe(ge)}((X=j.current[q])===null||X===void 0?void 0:X.focusedItem)!==B.index&&((de=E.current)===null||de===void 0||de.call(E,B,q))},[y,E,j]),T=b.useCallback(function(B){l(function(q){var z;return yc(yc({},q),(z={},z[B.treeId]=B,z))}),x?.(B)},[x]),N=b.useCallback(function(B){S?.(a[B]),delete a[B],l(a)},[S,a]),D=b.useCallback(function(B,q){n?.(B,q),l(function(z){return z})},[n]),L=b.useCallback(function(B,q){t?.(B,q),l(function(z){return z})},[t]),H=b.useCallback(function(B,q){r?.(B,q),l(function(z){return z})},[r]),ee=b.useCallback(function(B){var q,z,W=(q=Ro())===null||q===void 0?void 0:q.querySelector('[data-rct-tree="'.concat(B,'"] [data-rct-item-focus="true"]'));(z=W?.focus)===null||z===void 0||z.call(W)},[]),G=b.useCallback(function(B,q){q===void 0&&(q=!0);var z=function(F){var ne,$;q&&(y??!0)&&F&&!(!(($=(ne=Ro())===null||ne===void 0?void 0:ne.querySelector('[data-rct-tree="'.concat(F,'"]')))===null||$===void 0)&&$.contains(document.activeElement))&&ee(F)};if(typeof B=="function")m(function(F){var ne=B(F);return ne!==F&&z(ne),ne});else{var W=B;m(W),z(W)}},[y,ee]),K=tje(i);return yc(yc(yc({},K),i),{onFocusItem:A,registerTree:T,unregisterTree:N,onExpandItem:L,onCollapseItem:D,onDrop:H,setActiveTree:G,treeIds:h,trees:a,activeTreeId:f,linearItems:I})},T7=b.createContext(null),bn=function(){return b.useContext(T7)},ije=b.forwardRef(function(e,t){var n=rje(e),r=e.viewState,i=e.onFocusItem;return b.useEffect(function(){for(var o,a,l,d=0,f=Object.keys(n.trees);d<f.length;d++){var m=f[d],h=(a=(o=e.items[n.trees[m].rootItem])===null||o===void 0?void 0:o.children)===null||a===void 0?void 0:a[0],v=h&&e.items[h];!(!((l=r[m])===null||l===void 0)&&l.focusedItem)&&n.trees[m]&&v&&i?.(v,m,!1)}},[n.trees,i,e.items,r]),b.createElement(T7.Provider,{value:n},b.createElement(HEe,null,b.createElement(YEe,null,b.createElement(JEe,{ref:t},e.children))))}),oje=function(e){var t,n=e.treeId,r=$a(),i=r.draggingPosition,o=r.itemHeight,a=oi().renderers,l=i&&i.targetType==="between-items"&&i.treeId===n;if(!l)return null;var d={onDragOver:function(f){return f.preventDefault()}};return b.createElement("div",{style:{position:"absolute",left:"0",right:"0",top:"".concat(((t=i?.linearIndex)!==null&&t!==void 0?t:0)*o,"px")}},a.renderDragBetweenLine({draggingPosition:i,lineProps:d}))},ff=function(e,t,n){var r=Io(n);b.useEffect(function(){return e?(e.addEventListener(t,r),function(){return e.removeEventListener(t,r)}):function(){}},[e,r,t])},aje=function(e,t,n){var r=b.useState(!1),i=r[0],o=r[1],a=b.useRef(!1),l=Vf();return ff(e,"focusin",function(){i||(o(!0),t?.()),a.current&&(a.current=!1)}),ff(e,"focusout",function(){a.current=!0,l(function(){a.current&&!e?.contains(document.activeElement)&&(n?.(),a.current=!1,o(!1))})}),i},ny=function(e,t,n){ff(Ro(),"keydown",function(r){n&&n&&e.toLowerCase()===r.key.toLowerCase()&&t(r)})},GP={expandSiblings:["control+*"],moveFocusToFirstItem:["home"],moveFocusToLastItem:["end"],primaryAction:["enter"],renameItem:["f2"],abortRenameItem:["escape"],toggleSelectItem:["control+ "],abortSearch:["escape","enter"],startSearch:[],selectAll:["control+a"],startProgrammaticDnd:["control+shift+d"],completeProgrammaticDnd:["enter"],abortProgrammaticDnd:["escape"]},_b=function(){return _b=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},_b.apply(this,arguments)},N7=function(){var e=bn();return b.useMemo(function(){return e.keyboardBindings?_b(_b({},GP),e.keyboardBindings):GP},[e.keyboardBindings])},sje=["input","textarea"],wo=function(e,t,n,r){r===void 0&&(r=!1);var i=b.useRef([]),o=N7(),a=Vf(),l=b.useMemo(function(){return o[e].map(function(d){return d.split("+")})},[e,o]);ff(Ro(),"keydown",function(d){var f;if(n!==!1&&!((sje.includes((f=d.target.tagName)===null||f===void 0?void 0:f.toLowerCase())||d.target.isContentEditable)&&!r)&&!i.current.includes(d.key)){i.current.push(d.key);var m=i.current.map(function(v){return v.toLowerCase()}),h=l.map(function(v){return m.map(function(y){return v.includes(y.toLowerCase())}).reduce(function(y,x){return y&&x},!0)}).reduce(function(v,y){return v||y},!1);h&&(i.current.length>1||!/^[a-zA-Z\s]$/.test(d.key))&&d.preventDefault()}}),ff(Ro(),"keyup",function(d){if(n!==!1){var f=i.current.map(function(h){return h.toLowerCase()}),m=l.map(function(h){return h.map(function(v){return f.includes(v.toLowerCase())}).reduce(function(v,y){return v&&y},!0)}).reduce(function(h,v){return h||v},!1);m&&a(function(){return t(d)}),i.current=i.current.filter(function(h){return h!==d.key})}})},ig=function(){var e,t=oi().treeId,n=bn().viewState;return(e=n[t])!==null&&e!==void 0?e:{}},G0=function(e){return bn().linearItems[e]},lje=function(){var e=oi().treeId,t=bn(),n=t.onFocusItem,r=t.items,i=G0(e),o=ig();return Io(function(a){var l,d=(l=i.findIndex(function(v){return v.item===o.focusedItem}))!==null&&l!==void 0?l:0,f=a(d,i),m=Math.max(0,Math.min(i.length-1,f)),h=r[i[m].item];return n?.(h,e),h})},ZP=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},cje=function(e){var t=b.useRef({target:e,previous:void 0});return t.current.target!==e&&(t.current.previous=t.current.target,t.current.target=e),t.current.previous},A7=function(e){var t=ig(),n=oi().treeId,r=G0(n),i=bn().onSelectItems,o=cje(t.focusedItem);return b.useCallback(function(a,l){var d,f;l===void 0&&(l=!1);var m=a.index,h=function(C,k){var E=ZP(ZP([],l?[]:C,!0),k.filter(function(j){return l||!C.includes(j)}),!0);i?.(E,n)};if(t&&t.selectedItems&&t.selectedItems.length>0){var v=t.focusedItem===m?o:t.focusedItem,y=e==="last-focus"?r.findIndex(function(C){return v===C.item}):r.findIndex(function(C){var k;return(k=t.selectedItems)===null||k===void 0?void 0:k.includes(C.item)}),x=r.findIndex(function(C){return C.item===m});if(y<x){var S=r.slice(y,x+1).map(function(C){var k=C.item;return k});h((d=t.selectedItems)!==null&&d!==void 0?d:[],S)}else{var S=r.slice(x,y+1).map(function(k){var E=k.item;return E});h((f=t.selectedItems)!==null&&f!==void 0?f:[],S)}}else i?.([m],n)},[t,i,n,e,r,o])},YP=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},uje=function(){var e,t=bn(),n=oi(),r=n.treeId,i=n.setRenamingItem,o=n.setSearch,a=n.renamingItem,l=G0(r),d=$a(),f=ig(),m=lje(),h=A7("first-selected"),v=t.activeTreeId===r,y=!!a,x=t.disableArrowKeys,S=!x&&v&&!y;ny("arrowdown",function(C){if(C.preventDefault(),d.isProgrammaticallyDragging)d.programmaticDragDown();else{var k=m(function(E){return E+1});C.shiftKey&&h(k)}},S),ny("arrowup",function(C){if(C.preventDefault(),d.isProgrammaticallyDragging)d.programmaticDragUp();else{var k=m(function(E){return E-1});C.shiftKey&&h(k)}},S),wo("moveFocusToFirstItem",function(C){C.preventDefault(),m(function(){return 0})},v&&!d.isProgrammaticallyDragging&&!y),wo("moveFocusToLastItem",function(C){C.preventDefault(),m(function(k,E){return E.length-1})},v&&!d.isProgrammaticallyDragging&&!y),ny("arrowright",function(C){C.preventDefault(),m(function(k,E){var j,I,A=t.items[E[k].item];if(A.isFolder){if(!((j=f.expandedItems)===null||j===void 0)&&j.includes(A.index))return k+1;(I=t.onExpandItem)===null||I===void 0||I.call(t,A,r)}return k})},S&&!d.isProgrammaticallyDragging),ny("arrowleft",function(C){C.preventDefault(),m(function(k,E){var j,I,A=t.items[E[k].item],T=E[k].depth;if(A.isFolder&&(!((j=f.expandedItems)===null||j===void 0)&&j.includes(A.index)))(I=t.onCollapseItem)===null||I===void 0||I.call(t,A,r);else if(T>0){var N=k;for(N;E[N].depth!==T-1;N-=1);return N}return k})},S&&!d.isProgrammaticallyDragging),wo("primaryAction",function(C){var k,E;C.preventDefault(),f.focusedItem!==void 0&&((k=t.onSelectItems)===null||k===void 0||k.call(t,[f.focusedItem],r),(E=t.onPrimaryAction)===null||E===void 0||E.call(t,t.items[f.focusedItem],r))},v&&!d.isProgrammaticallyDragging&&!y),wo("toggleSelectItem",function(C){var k,E,j;C.preventDefault(),C.stopPropagation(),f.focusedItem!==void 0&&(f.selectedItems&&f.selectedItems.includes(f.focusedItem)?(k=t.onSelectItems)===null||k===void 0||k.call(t,f.selectedItems.filter(function(I){return I!==f.focusedItem}),r):(E=t.onSelectItems)===null||E===void 0||E.call(t,YP(YP([],(j=f.selectedItems)!==null&&j!==void 0?j:[],!0),[f.focusedItem],!1),r))},v&&!d.isProgrammaticallyDragging&&!y),wo("selectAll",function(C){var k;C.preventDefault(),(k=t.onSelectItems)===null||k===void 0||k.call(t,l.map(function(E){var j=E.item;return j}),r)},v&&!d.isProgrammaticallyDragging&&!y),wo("renameItem",function(C){var k;if(f.focusedItem!==void 0){C.preventDefault();var E=t.items[f.focusedItem];E.canRename!==!1&&((k=t.onStartRenamingItem)===null||k===void 0||k.call(t,E,r),i(E.index))}},v&&((e=t.canRename)!==null&&e!==void 0?e:!0)&&!y),wo("startSearch",function(C){var k,E;C.preventDefault(),o(""),(E=(k=document.querySelector('[data-rct-search-input="true"]'))===null||k===void 0?void 0:k.focus)===null||E===void 0||E.call(k)},v&&!d.isProgrammaticallyDragging&&!y),wo("startProgrammaticDnd",function(C){C.preventDefault(),d.startProgrammaticDrag()},v&&!y),wo("completeProgrammaticDnd",function(C){C.preventDefault(),d.completeProgrammaticDrag()},v&&d.isProgrammaticallyDragging&&!y),wo("abortProgrammaticDnd",function(C){C.preventDefault(),d.abortProgrammaticDrag()},v&&d.isProgrammaticallyDragging&&!y)},O7=function(e,t,n){return n.toLowerCase().includes(e.toLowerCase())},dje=function(){var e=bn(),t=e.doesSearchMatchItem,n=e.items,r=e.getItemTitle,i=e.onFocusItem,o=oi(),a=o.search,l=o.treeId,d=G0(l),f=Vf();xb(function(){a&&a.length>0&&f(function(){var m=d.find(function(h){var v=h.item;return(t??O7)(a,n[v],r(n[v]))});m&&i?.(n[m.item],l)})},[t,r,d,n,i,a,l,f],[a])},Ek=function(){return Ek=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Ek.apply(this,arguments)},fje=function(e){var t,n=e.containerRef,r=oi(),i=r.search,o=r.setSearch,a=r.treeId,l=r.renderers,d=r.renamingItem,f=bn();ig();var m=f.activeTreeId===a,h=Vf();dje();var v=function(){var y,x,S;if(o(null),!((y=f.autoFocus)!==null&&y!==void 0)||y){var C=(x=Ro())===null||x===void 0?void 0:x.querySelector('[data-rct-tree="'.concat(a,'"] [data-rct-item-focus="true"]'));(S=C?.focus)===null||S===void 0||S.call(C)}};return wo("abortSearch",function(){h(function(){v()})},m&&i!==null,!0),ff(n,"keydown",function(y){var x,S,C=y.key.charCodeAt(0);(!((x=f.canSearch)!==null&&x!==void 0)||x)&&(!((S=f.canSearchByStartingTyping)!==null&&S!==void 0)||S)&&m&&i===null&&!d&&!y.ctrlKey&&!y.shiftKey&&!y.altKey&&!y.metaKey&&(C>=48&&C<=57||C>=97&&C<=122)&&o("")}),!(!((t=f.canSearch)!==null&&t!==void 0)||t)||i===null?null:l.renderSearchInput({inputProps:Ek({value:i,onChange:function(y){return o(y.target.value)},onBlur:function(){v()},ref:function(y){var x;(x=y?.focus)===null||x===void 0||x.call(y)},"aria-label":"Search for items"},{"data-rct-search-input":"true"})})},pje={introduction:`
145
+ <p>Accessibility guide for tree {treeLabel}.</p>
146
+ <p>
147
+ Navigate the tree with the arrow keys. Common tree hotkeys apply. Further keybindings are available:
148
+ </p>
149
+ <ul>
150
+ <li>{keybinding:primaryAction} to execute primary action on focused item</li>
151
+ <li>{keybinding:renameItem} to start renaming the focused item</li>
152
+ <li>{keybinding:abortRenameItem} to abort renaming an item</li>
153
+ <li>{keybinding:startProgrammaticDnd} to start dragging selected items</li>
154
+ </ul>
155
+ `,renamingItem:`
156
+ <p>Renaming the item {renamingItem}.</p>
157
+ <p>Use the keybinding {keybinding:abortRenameItem} to abort renaming.</p>
158
+ `,searching:`
159
+ <p>Searching</p>
160
+ `,programmaticallyDragging:`
161
+ <p>Dragging items {dragItems}.</p>
162
+ <p>Press the arrow keys to move the drag target.</p>
163
+ <p>Press {keybinding:completeProgrammaticDnd} to drop or {keybinding:abortProgrammaticDnd} to abort.</p>
164
+ `,programmaticallyDraggingTarget:`
165
+ <p>Drop target is {dropTarget}.</p>
166
+ `},Jp=function(e,t,n,r,i){var o=function(a){return t.getItemTitle(t.items[a])};return e.replace(/({[^\s}]+)}/g,function(a){var l,d,f,m=a.slice(1,-1);switch(m){case"treeLabel":return(l=r.treeLabel)!==null&&l!==void 0?l:"";case"renamingItem":return r.renamingItem?o(r.renamingItem):"None";case"dragItems":return(f=(d=n.draggingItems)===null||d===void 0?void 0:d.map(function(y){return t.getItemTitle(y)}).join(", "))!==null&&f!==void 0?f:"None";case"dropTarget":{if(!n.draggingPosition)return"None";if(n.draggingPosition.targetType==="item"||n.draggingPosition.targetType==="root")return"within ".concat(o(n.draggingPosition.targetItem));var h=t.items[n.draggingPosition.parentItem],v=t.getItemTitle(h);return n.draggingPosition.childIndex===0?"within ".concat(v," at the start"):"within ".concat(v," after ").concat(o(h.children[n.draggingPosition.childIndex-1]))}default:if(m.startsWith("keybinding:"))return i[m.slice(11)][0];throw Error("Unknown live descriptor variable {".concat(m,"}"))}})},Qp=function(e){var t=e.children,n=e.live;return b.createElement("div",{"aria-live":n,dangerouslySetInnerHTML:{__html:t}})},mje=function(){var e=bn(),t=oi(),n=$a(),r=N7(),i=b.useMemo(function(){var a;return(a=e.liveDescriptors)!==null&&a!==void 0?a:pje},[e.liveDescriptors]),o=t.renderers.renderLiveDescriptorContainer;return t.treeInformation.isRenaming?b.createElement(o,{tree:t},b.createElement(Qp,{live:"polite"},Jp(i.renamingItem,e,n,t,r))):t.treeInformation.isSearching?b.createElement(o,{tree:t},b.createElement(Qp,{live:"polite"},Jp(i.searching,e,n,t,r))):t.treeInformation.isProgrammaticallyDragging?b.createElement(o,{tree:t},b.createElement(Qp,{live:"polite"},Jp(i.programmaticallyDragging,e,n,t,r)),b.createElement(Qp,{live:"assertive"},Jp(i.programmaticallyDraggingTarget,e,n,t,r))):b.createElement(o,{tree:t},b.createElement(Qp,{live:"off"},Jp(i.introduction,e,n,t,r)))},hje=function(){var e,t=bn();return!((e=t.showLiveDescription)!==null&&e!==void 0)||e?b.createElement(mje,null):null},jk=function(){return jk=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},jk.apply(this,arguments)},gje=function(){var e=oi(),t=e.treeId,n=e.rootItem,r=e.renderers,i=e.treeInformation,o=bn(),a=b.useRef(),l=$a();uje(),aje(a.current,function(){o.setActiveTree(t)},function(){o.setActiveTree(function(h){return h===t?void 0:h})});var d=o.items[n].children,f=b.createElement(b.Fragment,null,b.createElement(hje,null),b.createElement($7,{depth:0,parentId:n},d??[]),b.createElement(oje,{treeId:t}),b.createElement(fje,{containerRef:a.current})),m=jk({onDragOver:function(h){h.preventDefault(),l.onDragOverTreeHandler(h,t,a)},onDragLeave:function(h){l.onDragLeaveContainerHandler(h,a)},onMouseDown:function(){return l.abortProgrammaticDrag()},ref:a,style:{position:"relative"},role:"tree","aria-label":i.treeLabelledBy?void 0:i.treeLabel,"aria-labelledby":i.treeLabelledBy},{"data-rct-tree":t});return r.renderTreeContainer({children:f,info:i,containerProps:m})},vje=function(e,t,n){var r,i=bn(),o=$a(),a=(r=i.viewState[e.treeId])===null||r===void 0?void 0:r.selectedItems;return b.useMemo(function(){var l,d;return{isFocused:i.activeTreeId===e.treeId,isRenaming:!!t,areItemsSelected:((l=a?.length)!==null&&l!==void 0?l:0)>0,isSearching:n!==null,search:n,isProgrammaticallyDragging:(d=o.isProgrammaticallyDragging)!==null&&d!==void 0?d:!1,treeId:e.treeId,rootItem:e.rootItem,treeLabel:e.treeLabel,treeLabelledBy:e.treeLabelledBy}},[i.activeTreeId,e.treeId,e.rootItem,e.treeLabel,e.treeLabelledBy,t,a?.length,n,o.isProgrammaticallyDragging])},_m=function(){return _m=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},_m.apply(this,arguments)},yje=function(e,t){var n=bn(),r=oi(),i=$a();b.useImperativeHandle(e,function(){return _m(_m(_m({},t),{treeEnvironmentContext:n,dragAndDropContext:i,treeContext:r}),r.treeInformation)})},bje=b.createContext(null),xje=b.forwardRef(function(e,t){bn();var n=oi();$a();var r=XEe(),i=b.useMemo(function(){return{abortRenamingItem:function(){n.setRenamingItem(null)},abortSearch:function(){n.setSearch(null)},collapseItem:function(o){r.collapseItem(o,n.treeId)},completeRenamingItem:function(){},expandItem:function(o){r.expandItem(o,n.treeId)},focusItem:function(o,a){a===void 0&&(a=!0),r.focusItem(o,n.treeId,a)},focusTree:function(o){o===void 0&&(o=!0),r.focusTree(n.treeId,o)},invokePrimaryAction:function(o){r.invokePrimaryAction(o,n.treeId)},moveFocusDown:function(){r.moveFocusDown(n.treeId)},moveFocusUp:function(){r.moveFocusUp(n.treeId)},renameItem:function(o,a){r.renameItem(o,a,n.treeId)},selectItems:function(o){r.selectItems(o,n.treeId)},setSearch:function(o){n.setSearch(o)},startRenamingItem:function(o){n.setRenamingItem(o)},stopRenamingItem:function(){n.setRenamingItem(null)},toggleItemExpandedState:function(o){r.toggleItemExpandedState(o,n.treeId)},toggleItemSelectStatus:function(o){r.toggleItemSelectStatus(o,n.treeId)},expandAll:function(){r.expandAll(n.treeId)},collapseAll:function(){r.collapseAll(n.treeId)},expandSubsequently:function(o){return r.expandSubsequently(n.treeId,o)}}},[r,n]);return yje(t,i),b.createElement(bje.Provider,{value:i},e.children)}),Cb=function(){return Cb=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Cb.apply(this,arguments)},D7=b.createContext(null),oi=function(){return b.useContext(D7)},wje=b.forwardRef(function(e,t){var n,r=bn(),i=b.useMemo(function(){return Cb(Cb({},r),e)},[e,r]),o=b.useState(null),a=o[0],l=o[1],d=b.useState(null),f=d[0],m=d[1],h=r.items[e.rootItem],v=r.viewState[e.treeId];b.useEffect(function(){return r.registerTree({treeId:e.treeId,rootItem:e.rootItem}),function(){return r.unregisterTree(e.treeId)}},[e.treeId,e.rootItem]);var y=vje(e,f,a),x=b.useMemo(function(){return{treeId:e.treeId,rootItem:e.rootItem,treeLabel:e.treeLabel,treeLabelledBy:e.treeLabelledBy,getItemsLinearly:function(){return qI(e.rootItem,v??{},r.items)},treeInformation:y,search:a,setSearch:l,renamingItem:f,setRenamingItem:m,renderers:i}},[r.items,e.rootItem,e.treeId,e.treeLabel,e.treeLabelledBy,f,i,a,y,v]);return h===void 0?((n=r.onMissingItems)===null||n===void 0||n.call(r,[e.rootItem]),null):b.createElement(D7.Provider,{value:x},b.createElement(xje,{ref:t},b.createElement(gje,null)))}),$7=function(e){for(var t=oi(),n=t.renderers,r=t.treeInformation,i=[],o=0,a=e.children;o<a.length;o++){var l=a[o];i.push(J.createElement(Cje,{key:l,itemIndex:l,depth:e.depth}))}if(i.length===0)return null;var d={role:e.depth!==0?"group":void 0};return n.renderItemsContainer({children:i,info:r,containerProps:d,depth:e.depth,parentId:e.parentId})},il=function(){return il=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},il.apply(this,arguments)},WP=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},Sje=function(e){var t,n,r,i,o=oi(),a=o.treeId,l=o.search,d=o.renamingItem,f=o.setRenamingItem,m=bn(),h=BEe(),v=$a(),y=A7("last-focus"),x=e&&m.getItemTitle(e),S=C7(),C=b.useMemo(function(){var I;return l===null||l.length===0||!e||!x?!1:((I=m.doesSearchMatchItem)!==null&&I!==void 0?I:O7)(l,e,x)},[l,e,x,m.doesSearchMatchItem]),k=e&&((n=(t=m.viewState[a])===null||t===void 0?void 0:t.selectedItems)===null||n===void 0?void 0:n.includes(e.index)),E=e&&((i=(r=m.viewState[a])===null||r===void 0?void 0:r.expandedItems)===null||i===void 0?void 0:i.includes(e.index)),j=e&&d===e.index;return b.useMemo(function(){var I,A,T,N,D,L,H,ee,G;if(e){var K=m.viewState[a],B=((A=(I=K?.selectedItems)===null||I===void 0?void 0:I.map(function(Q){return m.items[Q]}))!==null&&A!==void 0?A:K?.focusedItem?[m.items[K?.focusedItem]]:[]).filter(function(Q){return!!Q}),q=!!B.find(function(Q){return Q.index===e.index}),z=B&&((N=(T=m.canDrag)===null||T===void 0?void 0:T.call(m,B))!==null&&N!==void 0?N:!0)&&B.map(function(Q){var ve;return(ve=Q.canMove)!==null&&ve!==void 0?ve:!0}).reduce(function(Q,ve){return Q&&ve},!0),W=((L=(D=m.canDrag)===null||D===void 0?void 0:D.call(m,[e]))!==null&&L!==void 0?L:!0)&&((H=e.canMove)!==null&&H!==void 0?H:!0),F=m.canDragAndDrop&&(q&&z||!q&&W),ne=m.canDragAndDrop&&!!(!((G=(ee=v.viableDragPositions)===null||ee===void 0?void 0:ee[a])===null||G===void 0)&&G.find(function(Q){return Q.targetType==="item"&&Q.targetItem===e.index})),$={primaryAction:function(){var Q;(Q=m.onPrimaryAction)===null||Q===void 0||Q.call(m,m.items[e.index],a)},collapseItem:function(){var Q;(Q=m.onCollapseItem)===null||Q===void 0||Q.call(m,e,a)},expandItem:function(){var Q;(Q=m.onExpandItem)===null||Q===void 0||Q.call(m,e,a)},toggleExpandedState:function(){var Q,ve;E?(Q=m.onCollapseItem)===null||Q===void 0||Q.call(m,e,a):(ve=m.onExpandItem)===null||ve===void 0||ve.call(m,e,a)},selectItem:function(){var Q;(Q=m.onSelectItems)===null||Q===void 0||Q.call(m,[e.index],a)},addToSelectedItems:function(){var Q,ve;(Q=m.onSelectItems)===null||Q===void 0||Q.call(m,WP(WP([],(ve=K?.selectedItems)!==null&&ve!==void 0?ve:[],!0),[e.index],!1),a)},unselectItem:function(){var Q,ve,xe;(Q=m.onSelectItems)===null||Q===void 0||Q.call(m,(xe=(ve=K?.selectedItems)===null||ve===void 0?void 0:ve.filter(function(Ee){return Ee!==e.index}))!==null&&xe!==void 0?xe:[],a)},selectUpTo:function(Q){y(e,Q)},startRenamingItem:function(){f(e.index)},stopRenamingItem:function(){f(null)},focusItem:function(Q){var ve;Q===void 0&&(Q=!0),(ve=m.onFocusItem)===null||ve===void 0||ve.call(m,e,a,Q)},startDragging:function(){var Q,ve,xe=(Q=K?.selectedItems)!==null&&Q!==void 0?Q:[];if(xe.includes(e.index)||(xe=[e.index],(ve=m.onSelectItems)===null||ve===void 0||ve.call(m,xe,a)),F){var Ee=S(a,xe.map(function(Pe){return m.items[Pe]}));v.onStartDraggingItems(Ee,a)}}},P={isSelected:k,isExpanded:E,isFocused:K?.focusedItem===e.index,isRenaming:j,isDraggingOver:v.draggingPosition&&v.draggingPosition.targetType==="item"&&v.draggingPosition.targetItem===e.index&&v.draggingPosition.treeId===a,isDraggingOverParent:!1,isSearchMatching:C,canDrag:F,canDropOn:ne},V=il(il({},h.createInteractiveElementProps(e,a,$,P,K)),{"data-rct-item-interactive":!0,"data-rct-item-focus":P.isFocused?"true":"false","data-rct-item-id":e.index}),O=il({},{"data-rct-item-container":"true"}),X={role:"treeitem","aria-selected":P.isSelected,"aria-expanded":e.isFolder?P.isExpanded?"true":"false":void 0},de={onClick:function(){e.isFolder&&$.toggleExpandedState(),$.selectItem()},onFocus:function(){$.focusItem()},onDragOver:function(Q){Q.preventDefault()},"aria-hidden":!0,tabIndex:-1},ge=K?Object.entries(K).reduce(function(Q,ve){var xe=ve[0],Ee=ve[1];return Q[xe]=Array.isArray(Ee)?Ee.includes(e.index):Ee===e.index,Q},{}):{};return il(il(il({},$),P),{interactiveElementProps:V,itemContainerWithChildrenProps:X,itemContainerWithoutChildrenProps:O,arrowProps:de,viewStateFlags:ge})}},[e,m,a,v,k,E,j,C,h,y,f,S])},_je=function(e){var t=oi(),n=t.renderers,r=t.treeInformation,i=t.setRenamingItem,o=t.treeId,a=bn(),l=b.useRef(null),d=b.useRef(null),f=a.items[e.itemIndex],m=b.useState(a.getItemTitle(f)),h=m[0],v=m[1],y=Vf(!0),x=function(){var j;(j=a.onAbortRenamingItem)===null||j===void 0||j.call(a,f,r.treeId),i(null),y(function(){a.setActiveTree(o)})},S=function(){var j;(j=a.onRenameItem)===null||j===void 0||j.call(a,f,h,r.treeId),i(null),y(function(){a.setActiveTree(o)})};xb(function(){var j,I,A,T;a.setActiveTree(o),(!((j=a.autoFocus)!==null&&j!==void 0)||j)&&((I=l.current)===null||I===void 0||I.select(),(T=(A=l.current)===null||A===void 0?void 0:A.focus)===null||T===void 0||T.call(A))},[a,o],[]),wo("abortRenameItem",function(){x()},!0,!0);var C={value:h,onChange:function(j){v(j.target.value)},onBlur:function(j){(!j.relatedTarget||j.relatedTarget!==d.current)&&x()},"aria-label":"New item name",tabIndex:0},k={onClick:function(j){j.stopPropagation(),S()}},E={onSubmit:function(j){j.preventDefault(),S()}};return n.renderRenameInput({item:f,inputRef:l,submitButtonProps:k,submitButtonRef:d,formProps:E,inputProps:C})},Cje=function(e){var t,n,r,i,o=b.useState(!1),a=o[0],l=o[1],d=oi(),f=d.renderers,m=d.treeInformation,h=d.renamingItem,v=bn(),y=ig(),x=v.items[e.itemIndex],S=b.useMemo(function(){var T;return(T=y.expandedItems)===null||T===void 0?void 0:T.includes(e.itemIndex)},[e.itemIndex,y.expandedItems]),C=Sje(x);if(x===void 0||C===void 0)return a||(l(!0),(t=v.onMissingItems)===null||t===void 0||t.call(v,[e.itemIndex])),null;var k=(r=(n=v.shouldRenderChildren)===null||n===void 0?void 0:n.call(v,x,C))!==null&&r!==void 0?r:x.isFolder&&S,E=x.children&&k&&J.createElement($7,{depth:e.depth+1,parentId:e.itemIndex},x.children),j=v.getItemTitle(x),I=h===e.itemIndex?J.createElement(_je,{itemIndex:e.itemIndex}):f.renderItemTitle({info:m,context:C,title:j,item:x}),A=f.renderItemArrow({info:m,context:C,item:v.items[e.itemIndex]});return(i=f.renderItem({item:v.items[e.itemIndex],depth:e.depth,title:I,arrow:A,context:C,info:m,children:E}))!==null&&i!==void 0?i:null};function Ir(e){return!!e?.entries}const O1="__root__",sl="importedApplications",No="newApplication";function kje(e){const t={},n=[],r=[],i=[];for(const o of e)Ir(o)?o.package?r.push(o.path):n.push(o.path):i.push(o.path),P7(t,o);return t[O1]={index:O1,isFolder:!0,children:[No,sl,...n,...i],data:void 0,canMove:!1,canRename:!1},t[sl]={index:sl,isFolder:!0,children:r,data:{name:"Imported Applications",path:sl,package:sl,project:"",entries:[]},canMove:!1,canRename:!1},t[No]={index:No,isFolder:!1,data:{name:"New Application",path:No,project:""},canMove:!1,canRename:!1},{items:t,rootId:O1}}function P7(e,t){const n=t.path;if(Ir(t)){const r=t,i=[],o=[];for(const a of r.entries)Ir(a)?i.push(a.path):o.push(a.path);e[n]={index:n,isFolder:!0,children:[...i,...o],data:t,canMove:!1,canRename:!1};for(const a of r.entries)P7(e,a)}else e[n]={index:n,isFolder:!1,data:t,canMove:!t.package,canRename:!t.package}}function Eje(){const[e,t]=b.useState(!1),[n,r]=b.useState(void 0),i=b.useCallback(l=>{if(!l.dataTransfer?.types?.includes("Files"))return;const f=l.target;if(f instanceof Element&&f.classList.contains("rct-tree-item-button-isFolder")){const m=f.getAttribute("data-rct-item-id");!f.querySelector(".packageIsLocked")&&m&&m!==sl&&m!==No&&r(v=>v!==f?(v?.classList?.remove?.("rct-tree-item-title-container-dragging-over"),f.classList.add("rct-tree-item-title-container-dragging-over"),f):v)}t(!0)},[]),o=b.useCallback(()=>{t(!1),r(l=>{l&&l.classList.remove("rct-tree-item-title-container-dragging-over")})},[]),a=b.useCallback(l=>{if(!l.dataTransfer?.types?.includes("Files")||l.detail===1337)return;t(!1),n&&(n.classList.remove("rct-tree-item-title-container-dragging-over"),r(void 0));const f=document.getElementById("dropTarget");return f?f.dispatchEvent(new DragEvent("drop",{bubbles:!0,detail:1337,cancelable:!0,dataTransfer:l.dataTransfer})):!1},[n]);return b.useEffect(()=>(document.addEventListener("dragenter",i),document.addEventListener("dragover",i),document.addEventListener("dragleave",o),document.addEventListener("drop",a),()=>{document.removeEventListener("dragenter",i),document.removeEventListener("dragover",i),document.removeEventListener("dragleave",o),document.removeEventListener("drop",a)}),[i,a,o]),b.useMemo(()=>({dragging:e,dragTarget:n}),[e,n])}function jje(e){return new Promise((t,n)=>{const r=new FileReader;r.onabort=n,r.onerror=n,r.onload=t,r.readAsDataURL(e)})}const Rje=new Map([["1km","application/vnd.1000minds.decision-model+xml"],["3dml","text/vnd.in3d.3dml"],["3ds","image/x-3ds"],["3g2","video/3gpp2"],["3gp","video/3gp"],["3gpp","video/3gpp"],["3mf","model/3mf"],["7z","application/x-7z-compressed"],["7zip","application/x-7z-compressed"],["123","application/vnd.lotus-1-2-3"],["aab","application/x-authorware-bin"],["aac","audio/x-acc"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abw","application/x-abiword"],["ac","application/vnd.nokia.n-gage.ac+xml"],["ac3","audio/ac3"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acu","application/vnd.acucobol"],["acutc","application/vnd.acucorp"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afm","application/x-font-type1"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/pdf"],["aif","audio/x-aiff"],["aifc","audio/x-aiff"],["aiff","audio/x-aiff"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["amr","audio/amr"],["apk","application/vnd.android.package-archive"],["apng","image/apng"],["appcache","text/cache-manifest"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["arc","application/x-freearc"],["arj","application/x-arj"],["asc","application/pgp-signature"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asx","video/x-ms-asf"],["atc","application/vnd.acucorp"],["atom","application/atom+xml"],["atomcat","application/atomcat+xml"],["atomdeleted","application/atomdeleted+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au","audio/x-au"],["avi","video/x-msvideo"],["avif","image/avif"],["aw","application/applixware"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azv","image/vnd.airzip.accelerator.azv"],["azw","application/vnd.amazon.ebook"],["b16","image/vnd.pco.b16"],["bat","application/x-msdownload"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bdoc","application/x-bdoc"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin","application/octet-stream"],["blb","application/x-blorb"],["blorb","application/x-blorb"],["bmi","application/vnd.bmi"],["bmml","application/vnd.balsamiq.bmml+xml"],["bmp","image/bmp"],["book","application/vnd.framemaker"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bpk","application/octet-stream"],["bpmn","application/octet-stream"],["bsp","model/vnd.valve.source.compiled-map"],["btif","image/prs.btif"],["buffer","application/octet-stream"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c","text/x-c"],["c4d","application/vnd.clonk.c4group"],["c4f","application/vnd.clonk.c4group"],["c4g","application/vnd.clonk.c4group"],["c4p","application/vnd.clonk.c4group"],["c4u","application/vnd.clonk.c4group"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["cab","application/vnd.ms-cab-compressed"],["caf","audio/x-caf"],["cap","application/vnd.tcpdump.pcap"],["car","application/vnd.curl.car"],["cat","application/vnd.ms-pki.seccat"],["cb7","application/x-cbr"],["cba","application/x-cbr"],["cbr","application/x-cbr"],["cbt","application/x-cbr"],["cbz","application/x-cbr"],["cc","text/x-c"],["cco","application/x-cocoa"],["cct","application/x-director"],["ccxml","application/ccxml+xml"],["cdbcmsg","application/vnd.contact.cmsg"],["cda","application/x-cdf"],["cdf","application/x-netcdf"],["cdfx","application/cdfx+xml"],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdr","application/cdr"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer","application/pkix-cert"],["cfs","application/x-cfs-compressed"],["cgm","image/cgm"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cjs","application/node"],["cla","application/vnd.claymore"],["class","application/octet-stream"],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod","application/vnd.rim.cod"],["coffee","text/coffeescript"],["com","application/x-msdownload"],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt","application/mac-compactpro"],["crd","application/x-mscardfile"],["crl","application/pkix-crl"],["crt","application/x-x509-ca-cert"],["crx","application/x-chrome-extension"],["cryptonote","application/vnd.rig.cryptonote"],["csh","application/x-csh"],["csl","application/vnd.citationstyles.style+xml"],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["csr","application/octet-stream"],["css","text/css"],["cst","application/x-director"],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxt","application/x-director"],["cxx","text/x-c"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["dart","application/vnd.dart"],["dataless","application/vnd.fdsn.seed"],["davmount","application/davmount+xml"],["dbf","application/vnd.dbf"],["dbk","application/docbook+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["ddf","application/vnd.syncml.dmddf+xml"],["dds","image/vnd.ms-dds"],["deb","application/x-debian-package"],["def","text/plain"],["deploy","application/octet-stream"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dgc","application/x-dgc-compressed"],["dic","text/x-c"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["disposition-notification","message/disposition-notification"],["dist","application/octet-stream"],["distz","application/octet-stream"],["djv","image/vnd.djvu"],["djvu","image/vnd.djvu"],["dll","application/octet-stream"],["dmg","application/x-apple-diskimage"],["dmn","application/octet-stream"],["dmp","application/vnd.tcpdump.pcap"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.template.macroEnabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroEnabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp","application/vnd.osgi.dp"],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drle","image/dicom-rle"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dvb","video/vnd.dvb.file"],["dvi","application/x-dvi"],["dwd","application/atsc-dwd+xml"],["dwf","model/vnd.dwf"],["dwg","image/vnd.dwg"],["dxf","image/vnd.dxf"],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ear","application/java-archive"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["ecma","application/ecmascript"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["elc","application/octet-stream"],["emf","image/emf"],["eml","message/rfc822"],["emma","application/emma+xml"],["emotionml","application/emotionml+xml"],["emz","application/x-msmetafile"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es","application/ecmascript"],["es3","application/vnd.eszigno3+xml"],["esa","application/vnd.osgi.subsystem"],["esf","application/vnd.epson.esf"],["et3","application/vnd.eszigno3+xml"],["etx","text/x-setext"],["eva","application/x-eva"],["evy","application/x-envoy"],["exe","application/octet-stream"],["exi","application/exi"],["exp","application/express"],["exr","image/aces"],["ext","application/vnd.novadigm.ext"],["ez","application/andrew-inset"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f","text/x-fortran"],["f4v","video/mp4"],["f77","text/x-fortran"],["f90","text/x-fortran"],["fbs","image/vnd.fastbidsheet"],["fcdt","application/vnd.adobe.formscentral.fcdt"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fdt","application/fdt+xml"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fgd","application/x-director"],["fh","image/x-freehand"],["fh4","image/x-freehand"],["fh5","image/x-freehand"],["fh7","image/x-freehand"],["fhc","image/x-freehand"],["fig","application/x-xfig"],["fits","image/fits"],["flac","audio/x-flac"],["fli","video/x-fli"],["flo","application/vnd.micrografx.flo"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fnc","application/vnd.frogans.fnc"],["fo","application/vnd.software602.filler.form+xml"],["for","text/x-fortran"],["fpx","image/vnd.fpx"],["frame","application/vnd.framemaker"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fxpl","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gam","application/x-tads"],["gbr","application/rpki-ghostbusters"],["gca","application/x-gca-compressed"],["gdl","model/vnd.gdl"],["gdoc","application/vnd.google-apps.document"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["glb","model/gltf-binary"],["gltf","model/gltf+json"],["gml","application/gml+xml"],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gpg","application/gpg-keys"],["gph","application/vnd.flographit"],["gpx","application/gpx+xml"],["gqf","application/vnd.grafeq"],["gqs","application/vnd.grafeq"],["gram","application/srgs"],["gramps","application/x-gramps-xml"],["gre","application/vnd.geometry-explorer"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsf","application/x-font-ghostscript"],["gsheet","application/vnd.google-apps.spreadsheet"],["gslides","application/vnd.google-apps.presentation"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxf","application/gxf"],["gxt","application/vnd.geonext"],["gz","application/gzip"],["gzip","application/gzip"],["h","text/x-c"],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hbs","text/x-handlebars-template"],["hdd","application/x-virtualbox-hdd"],["hdf","application/x-hdf"],["heic","image/heic"],["heics","image/heic-sequence"],["heif","image/heif"],["heifs","image/heif-sequence"],["hej2","image/hej2k"],["held","application/atsc-held+xml"],["hh","text/x-c"],["hjson","application/hjson"],["hlp","application/winhlp"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx","application/mac-binhex40"],["hsj2","image/hsj2"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["icm","application/vnd.iccprofile"],["ico","image/x-icon"],["ics","text/calendar"],["ief","image/ief"],["ifb","text/calendar"],["ifm","application/vnd.shana.informed.formdata"],["iges","model/iges"],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs","model/iges"],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["img","application/octet-stream"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["in","text/plain"],["ini","text/plain"],["ink","application/inkml+xml"],["inkml","application/inkml+xml"],["install","application/x-install-instructions"],["iota","application/vnd.astraea-software.iota"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["iso","application/x-iso9660-image"],["itp","application/vnd.shana.informed.formtemplate"],["its","application/its+xml"],["ivp","application/vnd.immervision-ivp"],["ivu","application/vnd.immervision-ivu"],["jad","text/vnd.sun.j2me.app-descriptor"],["jade","text/jade"],["jam","application/vnd.jam"],["jar","application/java-archive"],["jardiff","application/x-java-archive-diff"],["java","text/x-java-source"],["jhc","image/jphc"],["jisp","application/vnd.jisp"],["jls","image/jls"],["jlt","application/vnd.hp-jlyt"],["jng","image/x-jng"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jp2","image/jp2"],["jpe","image/jpeg"],["jpeg","image/jpeg"],["jpf","image/jpx"],["jpg","image/jpeg"],["jpg2","image/jp2"],["jpgm","video/jpm"],["jpgv","video/jpeg"],["jph","image/jph"],["jpm","video/jpm"],["jpx","image/jpx"],["js","application/javascript"],["json","application/json"],["json5","application/json5"],["jsonld","application/ld+json"],["jsonl","application/jsonl"],["jsonml","application/jsonml+json"],["jsx","text/jsx"],["jxr","image/jxr"],["jxra","image/jxra"],["jxrs","image/jxrs"],["jxs","image/jxs"],["jxsc","image/jxsc"],["jxsi","image/jxsi"],["jxss","image/jxss"],["kar","audio/midi"],["karbon","application/vnd.kde.karbon"],["kdb","application/octet-stream"],["kdbx","application/x-keepass2"],["key","application/x-iwork-keynote-sffkey"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["knp","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["kpt","application/vnd.kde.kpresenter"],["kpxx","application/vnd.ds-keypoint"],["ksp","application/vnd.kde.kspread"],["ktr","application/vnd.kahootz"],["ktx","image/ktx"],["ktx2","image/ktx2"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["kwt","application/vnd.kde.kword"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["less","text/less"],["lgr","application/lgr+xml"],["lha","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["list3820","application/vnd.ibm.modcap"],["listafp","application/vnd.ibm.modcap"],["litcoffee","text/coffeescript"],["lnk","application/x-ms-shortcut"],["log","text/plain"],["lostxml","application/lost+xml"],["lrf","application/octet-stream"],["lrm","application/vnd.ms-lrm"],["ltf","application/vnd.frogans.ltf"],["lua","text/x-lua"],["luac","application/x-lua-bytecode"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh","application/octet-stream"],["m1v","video/mpeg"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3a","audio/mpeg"],["m3u","text/plain"],["m3u8","application/vnd.apple.mpegurl"],["m4a","audio/x-m4a"],["m4p","application/mp4"],["m4s","video/iso.segment"],["m4u","application/vnd.mpegurl"],["m4v","video/x-m4v"],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m21","application/mp21"],["ma","application/mathematica"],["mads","application/mads+xml"],["maei","application/mmt-aei+xml"],["mag","application/vnd.ecowin.chart"],["maker","application/vnd.framemaker"],["man","text/troff"],["manifest","text/cache-manifest"],["map","application/json"],["mar","application/octet-stream"],["markdown","text/markdown"],["mathml","application/mathml+xml"],["mb","application/mathematica"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc1","application/vnd.medcalcdata"],["mcd","application/vnd.mcd"],["mcurl","text/vnd.curl.mcurl"],["md","text/markdown"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["mdx","text/mdx"],["me","text/troff"],["mesh","model/mesh"],["meta4","application/metalink4+xml"],["metalink","application/metalink+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mft","application/rpki-manifest"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mid","audio/midi"],["midi","audio/midi"],["mie","application/x-mie"],["mif","application/vnd.mif"],["mime","message/rfc822"],["mj2","video/mj2"],["mjp2","video/mj2"],["mjs","application/javascript"],["mk3d","video/x-matroska"],["mka","audio/x-matroska"],["mkd","text/x-markdown"],["mks","video/x-matroska"],["mkv","video/x-matroska"],["mlp","application/vnd.dolby.mlp"],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mmf","application/vnd.smaf"],["mml","text/mathml"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mng","video/x-mng"],["mny","application/x-msmoney"],["mobi","application/x-mobipocket-ebook"],["mods","application/mods+xml"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2","audio/mpeg"],["mp2a","audio/mpeg"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mp4a","audio/mp4"],["mp4s","application/mp4"],["mp4v","video/mp4"],["mp21","application/mp21"],["mpc","application/vnd.mophun.certificate"],["mpd","application/dash+xml"],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg","video/mpeg"],["mpg4","video/mp4"],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/vnd.ms-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","text/troff"],["mscml","application/mediaservercontrol+xml"],["mseed","application/vnd.fdsn.mseed"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msi","application/x-msdownload"],["msl","application/vnd.mobius.msl"],["msm","application/octet-stream"],["msp","application/octet-stream"],["msty","application/vnd.muvee.style"],["mtl","model/mtl"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musd","application/mmt-usd+xml"],["musicxml","application/vnd.recordare.musicxml+xml"],["mvb","application/x-msmediaview"],["mvt","application/vnd.mapbox-vector-tile"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxmf","audio/mobile-xmf"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nb","application/mathematica"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncx","application/x-dtbncx+xml"],["nfo","text/x-nfo"],["ngdat","application/vnd.nokia.n-gage.data"],["nitf","application/vnd.nitf"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nq","application/n-quads"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nt","application/n-triples"],["ntf","application/vnd.nitf"],["numbers","application/x-iwork-numbers-sffnumbers"],["nzb","application/x-nzb"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["obgx","application/vnd.openblox.game+xml"],["obj","model/obj"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogex","model/vnd.opengex"],["ogg","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omdoc","application/omdoc+xml"],["onepkg","application/onenote"],["onetmp","application/onenote"],["onetoc","application/onenote"],["onetoc2","application/onenote"],["opf","application/oebps-package+xml"],["opml","text/x-opml"],["oprc","application/vnd.palm"],["opus","audio/ogg"],["org","text/x-org"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["osm","application/vnd.openstreetmap.data+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","font/otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["ova","application/x-virtualbox-ova"],["ovf","application/x-virtualbox-ovf"],["owl","application/rdf+xml"],["oxps","application/oxps"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c","application/pkcs7-mime"],["p7m","application/pkcs7-mime"],["p7r","application/x-pkcs7-certreqresp"],["p7s","application/pkcs7-signature"],["p8","application/pkcs8"],["p10","application/x-pkcs10"],["p12","application/x-pkcs12"],["pac","application/x-ns-proxy-autoconfig"],["pages","application/x-iwork-pages-sffpages"],["pas","text/x-pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcap","application/vnd.tcpdump.pcap"],["pcf","application/x-font-pcf"],["pcl","application/vnd.hp-pcl"],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb","application/x-pilot"],["pde","text/x-processing"],["pdf","application/pdf"],["pem","application/x-x509-user-cert"],["pfa","application/x-font-type1"],["pfb","application/x-font-type1"],["pfm","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfx","application/x-pkcs12"],["pgm","image/x-portable-graymap"],["pgn","application/x-chess-pgn"],["pgp","application/pgp"],["php","application/x-httpd-php"],["php3","application/x-httpd-php"],["php4","application/x-httpd-php"],["phps","application/x-httpd-php-source"],["phtml","application/x-httpd-php"],["pic","image/x-pict"],["pkg","application/octet-stream"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pkpass","application/vnd.apple.pkpass"],["pl","application/x-perl"],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["pm","application/x-perl"],["pml","application/vnd.ctc-posml"],["png","image/png"],["pnm","image/x-portable-anymap"],["portpkg","application/vnd.macports.portpkg"],["pot","application/vnd.ms-powerpoint"],["potm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps","application/vnd.ms-powerpoint"],["ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt","application/powerpoint"],["pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["pqa","application/vnd.palm"],["prc","application/x-pilot"],["pre","application/vnd.lotus-freelance"],["prf","application/pics-rules"],["provx","application/provenance+xml"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd","application/x-photoshop"],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["pti","image/prs.pti"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pwn","application/vnd.3m.post-it-notes"],["pya","audio/vnd.ms-playready.media.pya"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qfx","application/vnd.intu.qfx"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qwd","application/vnd.quark.quarkxpress"],["qwt","application/vnd.quark.quarkxpress"],["qxb","application/vnd.quark.quarkxpress"],["qxd","application/vnd.quark.quarkxpress"],["qxl","application/vnd.quark.quarkxpress"],["qxt","application/vnd.quark.quarkxpress"],["ra","audio/x-realaudio"],["ram","audio/x-pn-realaudio"],["raml","application/raml+yaml"],["rapd","application/route-apd+xml"],["rar","application/x-rar"],["ras","image/x-cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["relo","application/p2p-overlay+xml"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["ris","application/x-research-info-systems"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm","audio/x-pn-realaudio"],["rmi","audio/midi"],["rmp","audio/x-pn-realaudio-plugin"],["rms","application/vnd.jcp.javame.midlet-rms"],["rmvb","application/vnd.rn-realmedia-vbr"],["rnc","application/relax-ng-compact-syntax"],["rng","application/xml"],["roa","application/rpki-roa"],["roff","text/troff"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsa","application/x-pkcs7"],["rsat","application/atsc-rsat+xml"],["rsd","application/rsd+xml"],["rsheet","application/urc-ressheet+xml"],["rss","application/rss+xml"],["rtf","text/rtf"],["rtx","text/richtext"],["run","application/x-makeself"],["rusd","application/route-usd+xml"],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["sass","text/x-sass"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm","application/vnd.lotus-screencam"],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["scss","text/x-scss"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkd","application/vnd.solent.sdkm+xml"],["sdkm","application/vnd.solent.sdkm+xml"],["sdp","application/sdp"],["sdw","application/vnd.stardivision.writer"],["sea","application/octet-stream"],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["senmlx","application/senml+xml"],["sensmlx","application/sensml+xml"],["ser","application/java-serialized-object"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sfv","text/x-sfv"],["sgi","image/sgi"],["sgl","application/vnd.stardivision.writer-global"],["sgm","text/sgml"],["sgml","text/sgml"],["sh","application/x-sh"],["shar","application/x-shar"],["shex","text/shex"],["shf","application/shf+xml"],["shtml","text/html"],["sid","image/x-mrsid-image"],["sieve","application/sieve"],["sig","application/pgp-signature"],["sil","audio/silk"],["silo","model/mesh"],["sis","application/vnd.symbian.install"],["sisx","application/vnd.symbian.install"],["sit","application/x-stuffit"],["sitx","application/x-stuffitx"],["siv","application/sieve"],["skd","application/vnd.koan"],["skm","application/vnd.koan"],["skp","application/vnd.koan"],["skt","application/vnd.koan"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slim","text/slim"],["slm","text/slim"],["sls","application/route-s-tsid+xml"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi","application/smil"],["smil","application/smil"],["smv","video/x-smv"],["smzip","application/vnd.stepmania.package"],["snd","audio/basic"],["snf","application/x-font-snf"],["so","application/octet-stream"],["spc","application/x-pkcs7-certificates"],["spdx","text/spdx"],["spf","application/vnd.yamaha.smaf-phrase"],["spl","application/x-futuresplash"],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spx","audio/ogg"],["sql","application/x-sql"],["src","application/x-wais-source"],["srt","application/x-subrip"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["ssdl","application/ssdl+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssml","application/ssml+xml"],["sst","application/octet-stream"],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl","model/stl"],["stpx","model/step+xml"],["stpxz","model/step-xml+zip"],["stpz","model/step+zip"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["styl","text/stylus"],["stylus","text/stylus"],["sub","text/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["susp","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svg","image/svg+xml"],["svgz","image/svg+xml"],["swa","application/x-director"],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["swidtag","application/swid+xml"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t","text/troff"],["t3","application/x-t3vm-image"],["t38","image/t38"],["taglet","application/vnd.mynfc"],["tao","application/vnd.tao.intent-module-archive"],["tap","image/vnd.tencent.tap"],["tar","application/x-tar"],["tcap","application/vnd.3gpp2.tcap"],["tcl","application/x-tcl"],["td","application/urc-targetdesc+xml"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["teicorpus","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text","text/plain"],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tfx","image/tiff-fx"],["tga","image/x-tga"],["tgz","application/x-tar"],["thmx","application/vnd.ms-officetheme"],["tif","image/tiff"],["tiff","image/tiff"],["tk","application/x-tcl"],["tmo","application/vnd.tmobile-livetv"],["toml","application/toml"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","text/troff"],["tra","application/vnd.trueapp"],["trig","application/trig"],["trm","application/x-msterminal"],["ts","video/mp2t"],["tsd","application/timestamped-data"],["tsv","text/tab-separated-values"],["ttc","font/collection"],["ttf","font/ttf"],["ttl","text/turtle"],["ttml","application/ttml+xml"],["twd","application/vnd.simtech-mindmapper"],["twds","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["u8dsn","message/global-delivery-status"],["u8hdr","message/global-headers"],["u8mdn","message/global-disposition-notification"],["u8msg","message/global"],["u32","application/x-authorware-bin"],["ubj","application/ubjson"],["udeb","application/x-debian-package"],["ufd","application/vnd.ufdl"],["ufdl","application/vnd.ufdl"],["ulx","application/x-glulx"],["umj","application/vnd.umajin"],["unityweb","application/vnd.unity"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["urls","text/uri-list"],["usdz","model/vnd.usdz+zip"],["ustar","application/x-ustar"],["utz","application/vnd.uiq.theme"],["uu","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvd","application/vnd.dece.data"],["uvf","application/vnd.dece.data"],["uvg","image/vnd.dece.graphic"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvt","application/vnd.dece.ttml+xml"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["uvva","audio/vnd.dece.audio"],["uvvd","application/vnd.dece.data"],["uvvf","application/vnd.dece.data"],["uvvg","image/vnd.dece.graphic"],["uvvh","video/vnd.dece.hd"],["uvvi","image/vnd.dece.graphic"],["uvvm","video/vnd.dece.mobile"],["uvvp","video/vnd.dece.pd"],["uvvs","video/vnd.dece.sd"],["uvvt","application/vnd.dece.ttml+xml"],["uvvu","video/vnd.uvvu.mp4"],["uvvv","video/vnd.dece.video"],["uvvx","application/vnd.dece.unspecified"],["uvvz","application/vnd.dece.zip"],["uvx","application/vnd.dece.unspecified"],["uvz","application/vnd.dece.zip"],["vbox","application/x-virtualbox-vbox"],["vbox-extpack","application/x-virtualbox-vbox-extpack"],["vcard","text/vcard"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vdi","application/x-virtualbox-vdi"],["vds","model/vnd.sap.vds"],["vhd","application/x-virtualbox-vhd"],["vis","application/vnd.visionary"],["viv","video/vnd.vivo"],["vlc","application/videolan"],["vmdk","application/x-virtualbox-vmdk"],["vob","video/x-ms-vob"],["vor","application/vnd.stardivision.writer"],["vox","application/x-authorware-bin"],["vrml","model/vrml"],["vsd","application/vnd.visio"],["vsf","application/vnd.vsf"],["vss","application/vnd.visio"],["vst","application/vnd.visio"],["vsw","application/vnd.visio"],["vtf","image/vnd.valve.source.texture"],["vtt","text/vtt"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w3d","application/x-director"],["wad","application/x-doom"],["wadl","application/vnd.sun.wadl+xml"],["war","application/java-archive"],["wasm","application/wasm"],["wav","audio/x-wav"],["wax","audio/x-ms-wax"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["wdp","image/vnd.ms-photo"],["weba","audio/webm"],["webapp","application/x-web-app-manifest+json"],["webm","video/webm"],["webmanifest","application/manifest+json"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf","image/wmf"],["wml","text/vnd.wap.wml"],["wmlc","application/wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-msmetafile"],["woff","font/woff"],["woff2","font/woff2"],["word","application/msword"],["wpd","application/vnd.wordperfect"],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wqd","application/vnd.wqd"],["wri","application/x-mswrite"],["wrl","model/vrml"],["wsc","message/vnd.wfa.wsc"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wtb","application/vnd.webturbo"],["wvx","video/x-ms-wvx"],["x3d","model/x3d+xml"],["x3db","model/x3d+fastinfoset"],["x3dbz","model/x3d+binary"],["x3dv","model/x3d-vrml"],["x3dvz","model/x3d+vrml"],["x3dz","model/x3d+xml"],["x32","application/x-authorware-bin"],["x_b","model/vnd.parasolid.transmit.binary"],["x_t","model/vnd.parasolid.transmit.text"],["xaml","application/xaml+xml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xav","application/xcap-att+xml"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm","image/x-xbitmap"],["xca","application/xcap-caps+xml"],["xcs","application/calendar+xml"],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xel","application/xcap-el+xml"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xht","application/xhtml+xml"],["xhtml","application/xhtml+xml"],["xhvml","application/xv+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla","application/vnd.ms-excel"],["xlam","application/vnd.ms-excel.addin.macroEnabled.12"],["xlc","application/vnd.ms-excel"],["xlf","application/xliff+xml"],["xlm","application/vnd.ms-excel"],["xls","application/vnd.ms-excel"],["xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt","application/vnd.ms-excel"],["xltm","application/vnd.ms-excel.template.macroEnabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlw","application/vnd.ms-excel"],["xm","audio/xm"],["xml","application/xml"],["xns","application/xcap-ns+xml"],["xo","application/vnd.olpc-sugar"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpl","application/xproc+xml"],["xpm","image/x-xpixmap"],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xpx","application/vnd.intercon.formnet"],["xsd","application/xml"],["xsl","application/xml"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xul","application/vnd.mozilla.xul+xml"],["xvm","application/xv+xml"],["xvml","application/xv+xml"],["xwd","image/x-xwindowdump"],["xyz","chemical/x-xyz"],["xz","application/x-xz"],["yaml","text/yaml"],["yang","application/yang"],["yin","application/yin+xml"],["yml","text/yaml"],["ymp","text/x-suse-ymp"],["z","application/x-compress"],["z1","application/x-zmachine"],["z2","application/x-zmachine"],["z3","application/x-zmachine"],["z4","application/x-zmachine"],["z5","application/x-zmachine"],["z6","application/x-zmachine"],["z7","application/x-zmachine"],["z8","application/x-zmachine"],["zaz","application/vnd.zzazz.deck+xml"],["zip","application/zip"],["zir","application/vnd.zul"],["zirz","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zsh","text/x-scriptzsh"]]);function pf(e,t,n){const r=Ije(e),{webkitRelativePath:i}=e,o=typeof t=="string"?t:typeof i=="string"&&i.length>0?i:`./${e.name}`;return typeof r.path!="string"&&XP(r,"path",o),XP(r,"relativePath",o),r}function Ije(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const r=t.split(".").pop().toLowerCase(),i=Rje.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}function XP(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const Tje=[".DS_Store","Thumbs.db"];function Nje(e){return pu(this,void 0,void 0,function*(){return kb(e)&&Aje(e.dataTransfer)?Pje(e.dataTransfer,e.type):Oje(e)?Dje(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?$je(e):[]})}function Aje(e){return kb(e)}function Oje(e){return kb(e)&&kb(e.target)}function kb(e){return typeof e=="object"&&e!==null}function Dje(e){return Rk(e.target.files).map(t=>pf(t))}function $je(e){return pu(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>pf(n))})}function Pje(e,t){return pu(this,void 0,void 0,function*(){if(e.items){const n=Rk(e.items).filter(i=>i.kind==="file");if(t!=="drop")return n;const r=yield Promise.all(n.map(Mje));return JP(M7(r))}return JP(Rk(e.files).map(n=>pf(n)))})}function JP(e){return e.filter(t=>Tje.indexOf(t.name)===-1)}function Rk(e){if(e===null)return[];const t=[];for(let n=0;n<e.length;n++){const r=e[n];t.push(r)}return t}function Mje(e){if(typeof e.webkitGetAsEntry!="function")return QP(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?z7(t):QP(e,t)}function M7(e){return e.reduce((t,n)=>[...t,...Array.isArray(n)?M7(n):[n]],[])}function QP(e,t){return pu(this,void 0,void 0,function*(){var n;if(globalThis.isSecureContext&&typeof e.getAsFileSystemHandle=="function"){const o=yield e.getAsFileSystemHandle();if(o===null)throw new Error(`${e} is not a File`);if(o!==void 0){const a=yield o.getFile();return a.handle=o,pf(a)}}const r=e.getAsFile();if(!r)throw new Error(`${e} is not a File`);return pf(r,(n=t?.fullPath)!==null&&n!==void 0?n:void 0)})}function zje(e){return pu(this,void 0,void 0,function*(){return e.isDirectory?z7(e):Lje(e)})}function z7(e){const t=e.createReader();return new Promise((n,r)=>{const i=[];function o(){t.readEntries(a=>pu(this,void 0,void 0,function*(){if(a.length){const l=Promise.all(a.map(zje));i.push(l),o()}else try{const l=yield Promise.all(i);n(l)}catch(l){r(l)}}),a=>{r(a)})}o()})}function Lje(e){return pu(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(r=>{const i=pf(r,e.fullPath);t(i)},r=>{n(r)})})})}var ry={},eM;function Fje(){return eM||(eM=1,ry.__esModule=!0,ry.default=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(",");if(n.length===0)return!0;var r=e.name||"",i=(e.type||"").toLowerCase(),o=i.replace(/\/.*$/,"");return n.some(function(a){var l=a.trim().toLowerCase();return l.charAt(0)==="."?r.toLowerCase().endsWith(l):l.endsWith("/*")?o===l.replace(/\/.*$/,""):i===l})}return!0}),ry}var Uje=Fje();const D1=hf(Uje);function tM(e){return Hje(e)||Bje(e)||F7(e)||Vje()}function Vje(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
167
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Bje(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Hje(e){if(Array.isArray(e))return Ik(e)}function nM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function rM(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?nM(Object(n),!0).forEach(function(r){L7(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function L7(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zm(e,t){return Gje(e)||Kje(e,t)||F7(e,t)||qje()}function qje(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
168
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function F7(e,t){if(e){if(typeof e=="string")return Ik(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ik(e,t)}}function Ik(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Kje(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,a,l;try{for(n=n.call(e);!(i=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));i=!0);}catch(d){o=!0,l=d}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw l}}return r}}function Gje(e){if(Array.isArray(e))return e}var Zje=typeof D1=="function"?D1:D1.default,Yje="file-invalid-type",Wje="file-too-large",Xje="file-too-small",Jje="too-many-files",Qje=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=t.split(","),r=n.length>1?"one of ".concat(n.join(", ")):n[0];return{code:Yje,message:"File type must be ".concat(r)}},iM=function(t){return{code:Wje,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},oM=function(t){return{code:Xje,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},eRe={code:Jje,message:"Too many files"};function tRe(e){return e.type===""&&typeof e.getAsFile=="function"}function U7(e,t){var n=e.type==="application/x-moz-file"||Zje(e,t)||tRe(e);return[n,n?null:Qje(t)]}function V7(e,t,n){if(bc(e.size))if(bc(t)&&bc(n)){if(e.size>n)return[!1,iM(n)];if(e.size<t)return[!1,oM(t)]}else{if(bc(t)&&e.size<t)return[!1,oM(t)];if(bc(n)&&e.size>n)return[!1,iM(n)]}return[!0,null]}function bc(e){return e!=null}function nRe(e){var t=e.files,n=e.accept,r=e.minSize,i=e.maxSize,o=e.multiple,a=e.maxFiles,l=e.validator;return!o&&t.length>1||o&&a>=1&&t.length>a?!1:t.every(function(d){var f=U7(d,n),m=Zm(f,1),h=m[0],v=V7(d,r,i),y=Zm(v,1),x=y[0],S=l?l(d):null;return h&&x&&!S})}function Eb(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function em(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function aM(e){e.preventDefault()}function rRe(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function iRe(e){return e.indexOf("Edge/")!==-1}function oRe(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return rRe(e)||iRe(e)}function ha(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var i=arguments.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];return t.some(function(l){return!Eb(r)&&l&&l.apply(void 0,[r].concat(o)),Eb(r)})}}function aRe(){return"showOpenFilePicker"in window}function sRe(e){if(bc(e)){var t=Object.entries(e).filter(function(n){var r=Zm(n,2),i=r[0],o=r[1],a=!0;return B7(i)||(console.warn('Skipped "'.concat(i,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),a=!1),(!Array.isArray(o)||!o.every(H7))&&(console.warn('Skipped "'.concat(i,'" because an invalid file extension was provided.')),a=!1),a}).reduce(function(n,r){var i=Zm(r,2),o=i[0],a=i[1];return rM(rM({},n),{},L7({},o,a))},{});return[{description:"Files",accept:t}]}return e}function lRe(e){if(bc(e))return Object.entries(e).reduce(function(t,n){var r=Zm(n,2),i=r[0],o=r[1];return[].concat(tM(t),[i],tM(o))},[]).filter(function(t){return B7(t)||H7(t)}).join(",")}function cRe(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function uRe(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function B7(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function H7(e){return/^.*\.[\w]+$/.test(e)}var dRe=["children"],fRe=["open"],pRe=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],mRe=["refKey","onChange","onClick"];function sM(e){return vRe(e)||gRe(e)||q7(e)||hRe()}function hRe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
169
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gRe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function vRe(e){if(Array.isArray(e))return Tk(e)}function $1(e,t){return xRe(e)||bRe(e,t)||q7(e,t)||yRe()}function yRe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
170
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function q7(e,t){if(e){if(typeof e=="string")return Tk(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Tk(e,t)}}function Tk(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function bRe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,a,l;try{for(n=n.call(e);!(i=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));i=!0);}catch(d){o=!0,l=d}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw l}}return r}}function xRe(e){if(Array.isArray(e))return e}function lM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Rn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?lM(Object(n),!0).forEach(function(r){Nk(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Nk(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jb(e,t){if(e==null)return{};var n=wRe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function wRe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var KI=b.forwardRef(function(e,t){var n=e.children,r=jb(e,dRe),i=G7(r),o=i.open,a=jb(i,fRe);return b.useImperativeHandle(t,function(){return{open:o}},[o]),J.createElement(b.Fragment,null,n(Rn(Rn({},a),{},{open:o})))});KI.displayName="Dropzone";var K7={disabled:!1,getFilesFromEvent:Nje,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};KI.defaultProps=K7;KI.propTypes={children:et.func,accept:et.objectOf(et.arrayOf(et.string)),multiple:et.bool,preventDropOnDocument:et.bool,noClick:et.bool,noKeyboard:et.bool,noDrag:et.bool,noDragEventsBubbling:et.bool,minSize:et.number,maxSize:et.number,maxFiles:et.number,disabled:et.bool,getFilesFromEvent:et.func,onFileDialogCancel:et.func,onFileDialogOpen:et.func,useFsAccessApi:et.bool,autoFocus:et.bool,onDragEnter:et.func,onDragLeave:et.func,onDragOver:et.func,onDrop:et.func,onDropAccepted:et.func,onDropRejected:et.func,onError:et.func,validator:et.func};var Ak={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,isDragGlobal:!1,acceptedFiles:[],fileRejections:[]};function G7(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Rn(Rn({},K7),e),n=t.accept,r=t.disabled,i=t.getFilesFromEvent,o=t.maxSize,a=t.minSize,l=t.multiple,d=t.maxFiles,f=t.onDragEnter,m=t.onDragLeave,h=t.onDragOver,v=t.onDrop,y=t.onDropAccepted,x=t.onDropRejected,S=t.onFileDialogCancel,C=t.onFileDialogOpen,k=t.useFsAccessApi,E=t.autoFocus,j=t.preventDropOnDocument,I=t.noClick,A=t.noKeyboard,T=t.noDrag,N=t.noDragEventsBubbling,D=t.onError,L=t.validator,H=b.useMemo(function(){return lRe(n)},[n]),ee=b.useMemo(function(){return sRe(n)},[n]),G=b.useMemo(function(){return typeof C=="function"?C:cM},[C]),K=b.useMemo(function(){return typeof S=="function"?S:cM},[S]),B=b.useRef(null),q=b.useRef(null),z=b.useReducer(SRe,Ak),W=$1(z,2),F=W[0],ne=W[1],$=F.isFocused,P=F.isFileDialogActive,V=b.useRef(typeof window<"u"&&window.isSecureContext&&k&&aRe()),O=function(){!V.current&&P&&setTimeout(function(){if(q.current){var U=q.current.files;U.length||(ne({type:"closeDialog"}),K())}},300)};b.useEffect(function(){return window.addEventListener("focus",O,!1),function(){window.removeEventListener("focus",O,!1)}},[q,P,K,V]);var X=b.useRef([]),de=b.useRef([]),ge=function(U){B.current&&B.current.contains(U.target)||(U.preventDefault(),X.current=[])};b.useEffect(function(){return j&&(document.addEventListener("dragover",aM,!1),document.addEventListener("drop",ge,!1)),function(){j&&(document.removeEventListener("dragover",aM),document.removeEventListener("drop",ge))}},[B,j]),b.useEffect(function(){var oe=function(Be){de.current=[].concat(sM(de.current),[Be.target]),em(Be)&&ne({isDragGlobal:!0,type:"setDragGlobal"})},U=function(Be){de.current=de.current.filter(function(Nt){return Nt!==Be.target&&Nt!==null}),!(de.current.length>0)&&ne({isDragGlobal:!1,type:"setDragGlobal"})},le=function(){de.current=[],ne({isDragGlobal:!1,type:"setDragGlobal"})},ke=function(){de.current=[],ne({isDragGlobal:!1,type:"setDragGlobal"})};return document.addEventListener("dragenter",oe,!1),document.addEventListener("dragleave",U,!1),document.addEventListener("dragend",le,!1),document.addEventListener("drop",ke,!1),function(){document.removeEventListener("dragenter",oe),document.removeEventListener("dragleave",U),document.removeEventListener("dragend",le),document.removeEventListener("drop",ke)}},[B]),b.useEffect(function(){return!r&&E&&B.current&&B.current.focus(),function(){}},[B,E,r]);var Q=b.useCallback(function(oe){D?D(oe):console.error(oe)},[D]),ve=b.useCallback(function(oe){oe.preventDefault(),oe.persist(),Z(oe),X.current=[].concat(sM(X.current),[oe.target]),em(oe)&&Promise.resolve(i(oe)).then(function(U){if(!(Eb(oe)&&!N)){var le=U.length,ke=le>0&&nRe({files:U,accept:H,minSize:a,maxSize:o,multiple:l,maxFiles:d,validator:L}),De=le>0&&!ke;ne({isDragAccept:ke,isDragReject:De,isDragActive:!0,type:"setDraggedFiles"}),f&&f(oe)}}).catch(function(U){return Q(U)})},[i,f,Q,N,H,a,o,l,d,L]),xe=b.useCallback(function(oe){oe.preventDefault(),oe.persist(),Z(oe);var U=em(oe);if(U&&oe.dataTransfer)try{oe.dataTransfer.dropEffect="copy"}catch{}return U&&h&&h(oe),!1},[h,N]),Ee=b.useCallback(function(oe){oe.preventDefault(),oe.persist(),Z(oe);var U=X.current.filter(function(ke){return B.current&&B.current.contains(ke)}),le=U.indexOf(oe.target);le!==-1&&U.splice(le,1),X.current=U,!(U.length>0)&&(ne({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),em(oe)&&m&&m(oe))},[B,m,N]),Pe=b.useCallback(function(oe,U){var le=[],ke=[];oe.forEach(function(De){var Be=U7(De,H),Nt=$1(Be,2),Kt=Nt[0],kn=Nt[1],Gt=V7(De,a,o),sn=$1(Gt,2),jt=sn[0],ur=sn[1],Tn=L?L(De):null;if(Kt&&jt&&!Tn)le.push(De);else{var Jn=[kn,ur];Tn&&(Jn=Jn.concat(Tn)),ke.push({file:De,errors:Jn.filter(function(la){return la})})}}),(!l&&le.length>1||l&&d>=1&&le.length>d)&&(le.forEach(function(De){ke.push({file:De,errors:[eRe]})}),le.splice(0)),ne({acceptedFiles:le,fileRejections:ke,type:"setFiles"}),v&&v(le,ke,U),ke.length>0&&x&&x(ke,U),le.length>0&&y&&y(le,U)},[ne,l,H,a,o,d,v,y,x,L]),Fe=b.useCallback(function(oe){oe.preventDefault(),oe.persist(),Z(oe),X.current=[],em(oe)&&Promise.resolve(i(oe)).then(function(U){Eb(oe)&&!N||Pe(U,oe)}).catch(function(U){return Q(U)}),ne({type:"reset"})},[i,Pe,Q,N]),pt=b.useCallback(function(){if(V.current){ne({type:"openDialog"}),G();var oe={multiple:l,types:ee};window.showOpenFilePicker(oe).then(function(U){return i(U)}).then(function(U){Pe(U,null),ne({type:"closeDialog"})}).catch(function(U){cRe(U)?(K(U),ne({type:"closeDialog"})):uRe(U)?(V.current=!1,q.current?(q.current.value=null,q.current.click()):Q(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):Q(U)});return}q.current&&(ne({type:"openDialog"}),G(),q.current.value=null,q.current.click())},[ne,G,K,k,Pe,Q,ee,l]),dt=b.useCallback(function(oe){!B.current||!B.current.isEqualNode(oe.target)||(oe.key===" "||oe.key==="Enter"||oe.keyCode===32||oe.keyCode===13)&&(oe.preventDefault(),pt())},[B,pt]),tt=b.useCallback(function(){ne({type:"focus"})},[]),Vt=b.useCallback(function(){ne({type:"blur"})},[]),mn=b.useCallback(function(){I||(oRe()?setTimeout(pt,0):pt())},[I,pt]),qn=function(U){return r?null:U},tn=function(U){return A?null:qn(U)},Pn=function(U){return T?null:qn(U)},Z=function(U){N&&U.stopPropagation()},re=b.useMemo(function(){return function(){var oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},U=oe.refKey,le=U===void 0?"ref":U,ke=oe.role,De=oe.onKeyDown,Be=oe.onFocus,Nt=oe.onBlur,Kt=oe.onClick,kn=oe.onDragEnter,Gt=oe.onDragOver,sn=oe.onDragLeave,jt=oe.onDrop,ur=jb(oe,pRe);return Rn(Rn(Nk({onKeyDown:tn(ha(De,dt)),onFocus:tn(ha(Be,tt)),onBlur:tn(ha(Nt,Vt)),onClick:qn(ha(Kt,mn)),onDragEnter:Pn(ha(kn,ve)),onDragOver:Pn(ha(Gt,xe)),onDragLeave:Pn(ha(sn,Ee)),onDrop:Pn(ha(jt,Fe)),role:typeof ke=="string"&&ke!==""?ke:"presentation"},le,B),!r&&!A?{tabIndex:0}:{}),ur)}},[B,dt,tt,Vt,mn,ve,xe,Ee,Fe,A,T,r]),se=b.useCallback(function(oe){oe.stopPropagation()},[]),Ce=b.useMemo(function(){return function(){var oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},U=oe.refKey,le=U===void 0?"ref":U,ke=oe.onChange,De=oe.onClick,Be=jb(oe,mRe),Nt=Nk({accept:H,multiple:l,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:qn(ha(ke,Fe)),onClick:qn(ha(De,se)),tabIndex:-1},le,q);return Rn(Rn({},Nt),Be)}},[q,n,l,Fe,r]);return Rn(Rn({},F),{},{isFocused:$&&!r,getRootProps:re,getInputProps:Ce,rootRef:B,inputRef:q,open:qn(pt)})}function SRe(e,t){switch(t.type){case"focus":return Rn(Rn({},e),{},{isFocused:!0});case"blur":return Rn(Rn({},e),{},{isFocused:!1});case"openDialog":return Rn(Rn({},Ak),{},{isFileDialogActive:!0});case"closeDialog":return Rn(Rn({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Rn(Rn({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Rn(Rn({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:!1});case"setDragGlobal":return Rn(Rn({},e),{},{isDragGlobal:t.isDragGlobal});case"reset":return Rn({},Ak);default:return e}}function cM(){}function _Re(){const[e,t]=b.useState(""),{clusterId:n}=nt({strict:!1}),{openedEntry:r,restrictPackageModification:i,reloadRootEntries:o,entryExists:a}=Vr(),l=!!r&&!r.package&&!i,d=Ut(),{dragging:f,dragTarget:m}=Eje(),v=m?.getAttribute?.("data-rct-item-id")?.split?.("/")?.pop?.(),y=r?.project;let x=!1,S;if(r?.path){const I=r.path.split("/"),A=Ir(r);x=l&&(A?I.slice(1):I.slice(1,-1)).join("/"),S=I[I.length-(A?1:2)]}const C=b.useCallback(async(I,A)=>{const T=m?.getAttribute?.("data-rct-item-id")?.split?.("/"),N=T?.length?T[0]:l?y:!1,D=T?.length?T.slice(1).join("/"):l?x:!1;if(N===!1||N===void 0||D===!1||D===void 0)return;const L=[],H=A.slice();for(const F of I){const ne=uM(D,F);F.name.startsWith(".")||F.relativePath?.includes("/.")?H.push({file:F,errors:[{message:"Sensitive files and folders starting with . are skipped.",code:"dot-ignored"}]}):a(`${N}/${ne}`)?H.push({file:F,errors:[{message:`${ne} already exists`,code:"duplicate"}]}):L.push(F)}let ee=!1;const G="uploading-files",K={label:"Cancel",onClick:()=>{ee=!0}},B={label:"OK",onClick:()=>{}};t(`Uploading ${Mr(L.length,"file","files")}...`);const q=L.reduce((F,ne)=>F+ne.size,0);let z=0,W=0;for(const F of L){W+=1,ye.loading("Upload in progress...",{id:G,descriptionClassName:"whitespace-pre",description:`${W} of ${Mr(L.length,"file","files")}
171
+ ${F.name}
172
+ ${Zo(z)} of ${Zo(q)}`,action:K});const ne=uM(D,F),P=(await jje(F)).target.result,V="base64,",O=P.indexOf(V);ee?H.push({file:F,errors:[{message:`${ne} cancelled`,code:"cancelled"}]}):(await BI({...d,file:ne,project:N,encoding:"base64",payload:P.slice(O+V.length)}),z+=F.size)}ye.loading("Reloading sidebar...",{id:ee?void 0:G,action:B,description:""}),await o(),H.length===0?I.length>0&&ye.success(`Uploaded ${Mr(L.length,"file","files")}!`,{id:G,action:B,description:""}):(console.log(H),ye.error(ee?"Cancelled uploads":"Rejected uploads",{id:ee?void 0:G,action:B,descriptionClassName:"whitespace-pre overflow-y-auto",description:H.slice(0,5).map(F=>F.errors.map(ne=>ne.message).join(`
173
+ `)).join(`
174
+ `)+(H?.length>5?`
175
+ Check the console for the full list.`:"")})),t("")},[m,l,y,x,a,d,o]),k=!!n&&Ct.checkForFabricConnect(n),{getRootProps:E,getInputProps:j}=G7({multiple:!0,maxSize:k?qY:HY,onDrop:C});return!l&&!m?f?c.jsxs("div",{className:xr("border-3 border-dashed","pointer-events-auto","cursor-copy text-sm text-center","p-2 w-full fixed bottom-0 h-16","flex flex-col items-center justify-center","bg-red-950 border-red-600"),children:["You cannot upload into",c.jsx("br",{}),c.jsx("strong",{children:S})]}):null:c.jsxs("div",{...E(),className:f?"fixed top-0 bottom-0 w-full pointer-events-none":"",children:[c.jsx("input",{id:"dropTarget",...j()}),c.jsx("div",{className:xr("border-3 border-dashed","pointer-events-auto","cursor-copy text-sm text-center","p-2 w-full fixed bottom-0 h-16","flex flex-col items-center justify-center",f?"animate-glow-pulse bg-green-950 border-green-600":"bg-purple-950 border-purple-600"),children:e||(m?c.jsxs(c.Fragment,{children:["Drop to upload into",c.jsx("br",{}),c.jsx("strong",{children:v})]}):f?c.jsxs(c.Fragment,{children:["Drop to upload into",c.jsx("br",{}),c.jsx("strong",{children:S})]}):c.jsxs(c.Fragment,{children:["Drag and drop to upload",c.jsx("br",{}),"or click to select files."]}))})]})}function uM(e,t){const n=t.relativePath??t.name,r=n.indexOf("/"),i=r===0||r===1?n.slice(r+1):n;return e?`${e}/${i}`:i}function CRe(e){const t=e.data;return t&&"name"in t?t.name:"root"}function og(e){const{instanceId:t,clusterId:n}=nt({strict:!1}),r=Mn,[i,o]=Ld(`EditorFileContent/${r}}/${e}`,void 0);return b.useMemo(()=>({content:e?i:void 0,setContent:o}),[e,i,o])}const Vn="w-6 pointer-events-none ";function kRe({opened:e,pkg:t}){return t?e?c.jsx("i",{className:Vn+"fas fa-box-open text-orange-600"}):c.jsx("i",{className:Vn+"fas fa-box text-orange-600"}):e?c.jsx("i",{className:Vn+"fas fa-folder-open text-orange-400"}):c.jsx("i",{className:Vn+"fas fa-folder text-orange-400"})}function ERe({extension:e}){switch(e){case"js":return c.jsx("i",{className:Vn+"filetype-js fab fa-js text-yellow"});case"jsx":return c.jsx("i",{className:Vn+"filetype-jsx fab fa-js text-yellow"});case"cjs":return c.jsx("i",{className:Vn+"filetype-cjs fab fa-js text-yellow"});case"yaml":return c.jsx("i",{className:Vn+"filetype-yaml fas fa-file"});case"css":return c.jsx("i",{className:Vn+"filetype-css fas fa-file text-blue"});case"html":return c.jsx("i",{className:Vn+"filetype-unknown far fa-file-alt"});case"json":return c.jsx("i",{className:Vn+"filetype-json fas fa-cog"});case"ts":return c.jsx("i",{className:Vn+"filetype-ts fas fa-file text-blue"});case"tsx":return c.jsx("i",{className:Vn+"filetype-tsx fas fa-file text-blue"});case"png":return c.jsx("i",{className:Vn+"filetype-png fas fa-image"});case"jpg":return c.jsx("i",{className:Vn+"filetype-jpg fas fa-image"});case"jpeg":return c.jsx("i",{className:Vn+"filetype-jpeg fas fa-image"});case"gif":return c.jsx("i",{className:Vn+"filetype-gif fas fa-image"});case"svg":return c.jsx("i",{className:Vn+"filetype-svg fas fa-file-svg"});case"vue":return c.jsx("i",{className:Vn+"filetype-vue fab fa-vuejs text-green"});default:return c.jsx("i",{className:Vn+"filetype-unknown far fa-file-alt"})}}function jRe(){return c.jsx("i",{className:Vn+"fas fa-lock text-gray-400 ml-2 packageIsLocked"})}function RRe(){return c.jsx("i",{className:Vn+"fas fa-plus text-green"})}function IRe({title:e,item:t,context:n}){const{content:r}=og(t.data?.path);return c.jsxs(c.Fragment,{children:[t.data?.path===No?c.jsx(RRe,{}):Ir(t.data)?c.jsx(kRe,{opened:n.isExpanded,pkg:!!t.data?.package||t.data.path===sl}):c.jsx(ERe,{extension:q0(e)}),c.jsxs("span",{className:"text-nowrap pointer-events-none",children:[e,r?"*":""]}),t.data?.package&&c.jsx(jRe,{})]})}function TRe(){const{rootEntries:e,openedEntry:t,setOpenedEntry:n,focusedItem:r,setFocusedItem:i,expandedItems:o,setExpandedItems:a,selectedItems:l,setSelectedItems:d}=Vr(),{items:f,rootId:m}=b.useMemo(()=>kje(e),[e]);MEe(),b.useEffect(function(){if(t?.path!==r&&r){const S=f[r]?.data;S&&n(S)}},[r,f,t?.path,n]);const h=v7(),v=b.useCallback((y,x)=>{switch(x.targetType){case"item":if(f[x.targetItem]?.data?.package)ye.error("Read-Only Imported Application",{description:'To make changes to an application, please click the "Redeploy" button and update the reference.'});else return h(y.map(S=>({from:S.index,to:HI(x.targetItem,zEe(S.index))})));break;default:ye.error(`${x.targetType} drop not yet supported`);break}},[f,h]);return c.jsxs("div",{className:"h-full overflow-auto pr-1.5 pb-18",children:[c.jsx(ije,{canDragAndDrop:!0,canDropOnFolder:!0,canDropOnNonFolder:!1,canReorderItems:!1,canSearch:!0,canRename:!1,getItemTitle:CRe,items:f,onDrop:v,renderItemTitle:IRe,viewState:{applicationsTree:{focusedItem:r,expandedItems:o,selectedItems:l}},onFocusItem:y=>i(y.index),onExpandItem:y=>a([...o,y.index]),onCollapseItem:y=>a(o.filter(x=>x!==y.index)),onSelectItems:y=>d(y),children:c.jsx(wje,{treeId:"applicationsTree",rootItem:m,treeLabel:"Applications file tree"})}),c.jsx(_Re,{})]})}async function NRe(e,t=3,n=1e3){let r=0;if(t<=0)throw new Error("retries must be greater than 0");let i;for(;r<t;)try{return await e()}catch(o){if(r++,i=o,r===t)break;await Qc(n)}throw i}async function Z7({operation:e,replicated:t,instanceClient:n}){const{data:r}=await n.post("/",{operation:e,service:e==="restart_service"?"http":void 0,replicated:t});return await Qc(1e4),await NRe(()=>gl({instanceClient:n,timeout:3e3}),12,15e3),r}function ARe(){return ot({mutationFn:Z7})}function ORe({onRestartedSuccessfully:e}={}){const{clusterId:t}=nt({strict:!1}),n=sr(),[r,i]=b.useState(!1);return{onRestartClick:b.useCallback(async()=>{if(!t)throw new Error("clusterId must be set in the route to invoke useRestartClusterClick");i(!0);let a=!1;const l={duration:6e4,action:{label:"Cancel",onClick:()=>{a=!0}}},d=ye.loading("Restarting",{...l,description:c.jsx(qm,{animated:!0,width:"0%"})}),f=await bj(t),m=Ct.checkForFabricConnect(f.id),h=f?.instances??[],v=h.filter(x=>x.status==="RUNNING").map(x=>ls({id:x.id,forceFabricConnect:m,operationsUrl:aE(x)})).reverse();let y=0;if(v.length)for(let x=0;x<v.length;x++){const S=v[x];if(!a){ye.loading(`Restarting Instance ${x+1} of ${v.length}`,{...l,id:d,description:c.jsx(qm,{animated:!0,width:(x===0?0:x/v.length*100)+"%"})});try{await gl({instanceClient:S}),await Z7({operation:"restart",replicated:!1,instanceClient:S}),y+=1}catch{x+1!==v.length&&(ye.loading(`Failed Restarting Instance ${x+1} of ${v.length}`,{...l,id:d,description:"We will carry on momentarily."}),await Qc(3e3))}}}if(i(!1),n.invalidateQueries({queryKey:[t]}),a)ye.error("Cancelled",{id:d,description:"The restart was partially cancelled.",duration:1e4,action:{label:"Dismiss",onClick:()=>ye.dismiss()}});else if(h.length===y)e?.(),ye.success("Success",{id:d,description:"Cluster fully restarted!",duration:1e4,action:{label:"Dismiss",onClick:()=>ye.dismiss()}});else{const x=Mr(h.length,"instance","instances"),S=Mr(y,'"RUNNING" instance was','"RUNNING" instances were');ye.error("Error",{id:d,description:`Failed to fully restart cluster.
176
+ `+([h.length===0&&"No instances were found within the cluster to restart.",y===0&&`No instances were in a "RUNNING" state of ${x}.`,h.length!==y&&`Only ${S} restarted of ${x}.`].filter(Lo).shift()||""),duration:1e4,action:{label:"Dismiss",onClick:()=>ye.dismiss()}})}},[t,e,n]),isRestartPending:r}}function DRe({operation:e,instanceClient:t,onRestartedSuccessfully:n}){const{clusterId:r,instanceId:i}=nt({strict:!1}),o="Instance",{mutate:a,isPending:l}=ARe(),d=sr();return{onRestartClick:b.useCallback(()=>{const m=ye.loading("Restarting",{description:`Restarting ${o.toLowerCase()}. This may take up to 60 seconds.`,duration:18e4,action:{label:"Dismiss",onClick:()=>ye.dismiss()}});a({operation:e,replicated:e==="restart_service"&&o==="Cluster",instanceClient:t},{onSuccess:()=>{d.invalidateQueries({queryKey:[r]}),d.invalidateQueries({queryKey:[i]}),ye.dismiss(m),ye.success("Success",{description:`${o} restarted!`,action:{label:"Dismiss",onClick:()=>ye.dismiss()}}),n?.()},onError:()=>{ye.dismiss(m),ye.error("Error",{description:`Failed to restart ${o.toLowerCase()}.`,action:{label:"Dismiss",onClick:()=>ye.dismiss()}})}})},[r,t,i,n,e,d,a,o]),isRestartPending:l}}function Y7({className:e,disabled:t,hideText:n,instanceClient:r,operation:i,targetNoun:o,tooltip:a,variant:l}){const{onRestartClick:d,isRestartPending:f}=ORe(),{onRestartClick:m,isRestartPending:h}=DRe({operation:i,instanceClient:r});return c.jsxs(hh,{children:[c.jsx(gh,{asChild:!0,children:c.jsxs(he,{variant:l||"positiveOutline",className:xr("mx-0 md:mx-4 rounded-full",e),onClick:o==="Cluster"&&i==="restart"?d:m,disabled:t||h||f,title:`Restart ${o}`,children:[c.jsx(zne,{className:"pointer-events-none"}),n!==!0&&c.jsxs("span",{className:"hidden md:inline-block pointer-events-none",children:["Restart ",c.jsx("span",{className:"hidden 2xl:inline-block",children:o})]})]})}),c.jsx(vh,{side:"bottom",children:a||(i==="restart_service"?"Restarts all service threads to apply changes. No downtime expected. Performance may be briefly slower during restart.":"This fully restarts the Harper service and causes downtime.")})]})}function $Re({toggledSidebar:e,toggleSidebar:t}){const n=Ut(),{openedEntryContents:r,openedEntry:i,isSavingFile:o,restrictPackageModification:a}=Vr(),{content:l}=og(i?.path),d=If(),f=n.entityType==="instance"?"Instance":"Cluster",m=os("ShowAddDirectoryOrFileModalType","file"),h=os("ShowAddDirectoryOrFileModalType","directory"),v=os("ShowDownloadApplicationModal",!0),y=os("ShowRenameFileModal",!0),x=os("ShowDeleteDirectoryOrFileModal",!0),S=os("ShowRedeployApplicationModal",!0),C=A1("SaveFile",!0),k=A1("RevertChanges",!0),E=A1("ShowNewTableModal",!0),j=l===void 0||l===r;return c.jsxs("div",{className:"absolute top-0 right-0 left-0 backdrop-blur-sm bg-black-10 shadow-xl flex pr-4 md:pr-12",children:[c.jsxs(he,{variant:"ghost",className:(e?"toggled-sidebar-toggler":"hidden-sidebar-toggler")+" inline-flex text-sm md:hidden focus:outline-none focus:ring-2 text-white hover:text-grey focus:ring-gray-600 rounded-none",onClick:t,children:[c.jsxs("span",{className:"sr-only",children:[e?"Close":"Open"," sidebar"]}),e?c.jsx(Ine,{}):c.jsx(jne,{})]}),i&&i?.path!==No&&c.jsxs(c.Fragment,{children:[i.package&&c.jsxs(hh,{children:[c.jsx(gh,{asChild:!0,children:c.jsxs(he,{variant:"ghost",type:"button",className:"cursor-help",children:[c.jsx(hne,{width:16,height:16}),c.jsx("span",{className:"hidden md:inline-block",children:"Imported applications are read-only"})]})}),c.jsx(vh,{children:a?c.jsxs(c.Fragment,{children:["This application is read-only, and cannot be modified.",c.jsx("br",{}),"It helps govern clustering amongst your instances."]}):c.jsx(c.Fragment,{children:"This application is read-only, and cannot be directly modified. But you can re-deploy or remove it."})})]}),!Ir(i)&&!i.package&&d&&c.jsxs(he,{variant:"default",className:"rounded-none",onClick:C,disabled:j||o,title:"Save",children:[c.jsx(Ii,{className:"pointer-events-none"}),c.jsxs("span",{className:"hidden lg:inline-block pointer-events-none",children:[c.jsx("u",{children:"S"}),"ave"]})]}),!Ir(i)&&!i.package&&d&&c.jsxs(he,{variant:"ghost",className:"rounded-none",onClick:y,disabled:!j||o,title:"Rename",children:[c.jsx(Z4,{className:"pointer-events-none"}),c.jsxs("span",{className:"hidden lg:inline-block pointer-events-none",children:[c.jsx("u",{children:"R"}),"ename"]})]}),!i.package&&d&&c.jsxs(he,{variant:"ghost",className:"rounded-none",onClick:m,title:"New File",children:[c.jsx(Bte,{className:"pointer-events-none"}),c.jsxs("span",{className:"pointer-events-none hidden lg:inline-block",children:[c.jsx("u",{children:"N"}),"ew",c.jsx("span",{className:"hidden lg:inline-block",children:" File"})]})]}),!i.package&&d&&c.jsxs(he,{variant:"ghost",className:"rounded-none",onClick:h,title:"Add Directory",children:[c.jsx(qte,{className:"pointer-events-none"}),c.jsxs("span",{className:"pointer-events-none hidden lg:inline-block",children:[c.jsx("u",{children:"A"}),"dd",c.jsx("span",{className:"hidden xl:inline-block",children:" Directory"})]})]}),i.path.endsWith(".graphql")&&d&&c.jsxs(he,{variant:"ghost",className:"rounded-none",onClick:E,title:"New Table",children:[c.jsx(Tr,{className:"pointer-events-none"}),c.jsxs("span",{className:"hidden lg:inline-block pointer-events-none",children:[c.jsx("span",{className:"hidden xl:inline-block",children:"New"})," Table"]})]}),i.project&&c.jsxs(he,{variant:"ghost",className:"rounded-none",onClick:v,title:"Download Application",children:[c.jsx(H4,{className:"pointer-events-none"}),c.jsxs("span",{className:"hidden lg:inline-block pointer-events-none",children:["Download",c.jsx("span",{className:"hidden 2xl:inline-block",children:" Application"})]})]}),!!i.package&&d&&!a&&c.jsxs(he,{variant:"ghost",className:"rounded-none",onClick:S,title:"Redeploy Package",children:[c.jsx(yE,{className:"pointer-events-none"}),c.jsxs("span",{className:"pointer-events-none",children:["Redeploy ",c.jsx("u",{children:"P"}),"ackage"]})]}),c.jsx("div",{className:"grow"}),d&&c.jsx(Y7,{targetNoun:f,instanceClient:n.instanceClient,operation:"restart_service",variant:"ghost",className:"rounded-none mx-0 md:mx-0",disabled:!j||o}),!Ir(i)&&!i.package&&d&&c.jsxs(he,{variant:"ghost",className:"rounded-none",onClick:k,disabled:j||o,title:"Revert Changes",children:[c.jsx(nre,{className:"pointer-events-none"}),c.jsxs("span",{className:"hidden xl:inline-block pointer-events-none",children:["Revert ",c.jsx("span",{className:"hidden 2xl:inline-block",children:"Changes"})]})]}),!a&&d&&c.jsxs(he,{variant:"destructiveGhost",className:"rounded-none",onClick:x,title:"Delete",children:[c.jsx(aa,{className:"pointer-events-none"}),c.jsxs("span",{className:"hidden xl:inline-block pointer-events-none",children:[c.jsx("u",{children:"D"}),"elete"]})]})]})]})}function PRe(e){return b.useCallback((t,n,r)=>{if(n!=="href")return t;if(t.startsWith("http"))return r.properties.target="_blank",t;{const i=Rq().split("?")[0];switch(t){case"./apis":case"./config":case"./config/roles":case"./config/users":case"./databases":case"./logs":case"./status":return`${i}/${t.slice(2)}`}return`${i}?open=${e}/${t.slice(t.startsWith("../")?3:2)}`}},[e])}function MRe(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const zRe=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,LRe=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,FRe={};function dM(e,t){return(FRe.jsx?LRe:zRe).test(e)}const URe=/[ \t\n\f\r]/g;function VRe(e){return typeof e=="object"?e.type==="text"?fM(e.value):!1:fM(e)}function fM(e){return e.replace(URe,"")===""}class ag{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}ag.prototype.normal={};ag.prototype.property={};ag.prototype.space=void 0;function W7(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new ag(n,r,t)}function Ok(e){return e.toLowerCase()}class Oi{constructor(t,n){this.attribute=n,this.property=t}}Oi.prototype.attribute="";Oi.prototype.booleanish=!1;Oi.prototype.boolean=!1;Oi.prototype.commaOrSpaceSeparated=!1;Oi.prototype.commaSeparated=!1;Oi.prototype.defined=!1;Oi.prototype.mustUseProperty=!1;Oi.prototype.number=!1;Oi.prototype.overloadedBoolean=!1;Oi.prototype.property="";Oi.prototype.spaceSeparated=!1;Oi.prototype.space=void 0;let BRe=0;const wt=bu(),ir=bu(),Dk=bu(),$e=bu(),wn=bu(),Fd=bu(),Ui=bu();function bu(){return 2**++BRe}const $k=Object.freeze(Object.defineProperty({__proto__:null,boolean:wt,booleanish:ir,commaOrSpaceSeparated:Ui,commaSeparated:Fd,number:$e,overloadedBoolean:Dk,spaceSeparated:wn},Symbol.toStringTag,{value:"Module"})),P1=Object.keys($k);class GI extends Oi{constructor(t,n,r,i){let o=-1;if(super(t,n),pM(this,"space",i),typeof r=="number")for(;++o<P1.length;){const a=P1[o];pM(this,P1[o],(r&$k[a])===$k[a])}}}GI.prototype.defined=!0;function pM(e,t,n){n&&(e[t]=n)}function Bf(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const o=new GI(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[Ok(r)]=r,n[Ok(o.attribute)]=r}return new ag(t,n,e.space)}const X7=Bf({properties:{ariaActiveDescendant:null,ariaAtomic:ir,ariaAutoComplete:null,ariaBusy:ir,ariaChecked:ir,ariaColCount:$e,ariaColIndex:$e,ariaColSpan:$e,ariaControls:wn,ariaCurrent:null,ariaDescribedBy:wn,ariaDetails:null,ariaDisabled:ir,ariaDropEffect:wn,ariaErrorMessage:null,ariaExpanded:ir,ariaFlowTo:wn,ariaGrabbed:ir,ariaHasPopup:null,ariaHidden:ir,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:wn,ariaLevel:$e,ariaLive:null,ariaModal:ir,ariaMultiLine:ir,ariaMultiSelectable:ir,ariaOrientation:null,ariaOwns:wn,ariaPlaceholder:null,ariaPosInSet:$e,ariaPressed:ir,ariaReadOnly:ir,ariaRelevant:null,ariaRequired:ir,ariaRoleDescription:wn,ariaRowCount:$e,ariaRowIndex:$e,ariaRowSpan:$e,ariaSelected:ir,ariaSetSize:$e,ariaSort:null,ariaValueMax:$e,ariaValueMin:$e,ariaValueNow:$e,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function J7(e,t){return t in e?e[t]:t}function Q7(e,t){return J7(e,t.toLowerCase())}const HRe=Bf({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Fd,acceptCharset:wn,accessKey:wn,action:null,allow:null,allowFullScreen:wt,allowPaymentRequest:wt,allowUserMedia:wt,alt:null,as:null,async:wt,autoCapitalize:null,autoComplete:wn,autoFocus:wt,autoPlay:wt,blocking:wn,capture:null,charSet:null,checked:wt,cite:null,className:wn,cols:$e,colSpan:null,content:null,contentEditable:ir,controls:wt,controlsList:wn,coords:$e|Fd,crossOrigin:null,data:null,dateTime:null,decoding:null,default:wt,defer:wt,dir:null,dirName:null,disabled:wt,download:Dk,draggable:ir,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:wt,formTarget:null,headers:wn,height:$e,hidden:Dk,high:$e,href:null,hrefLang:null,htmlFor:wn,httpEquiv:wn,id:null,imageSizes:null,imageSrcSet:null,inert:wt,inputMode:null,integrity:null,is:null,isMap:wt,itemId:null,itemProp:wn,itemRef:wn,itemScope:wt,itemType:wn,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:wt,low:$e,manifest:null,max:null,maxLength:$e,media:null,method:null,min:null,minLength:$e,multiple:wt,muted:wt,name:null,nonce:null,noModule:wt,noValidate:wt,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:wt,optimum:$e,pattern:null,ping:wn,placeholder:null,playsInline:wt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:wt,referrerPolicy:null,rel:wn,required:wt,reversed:wt,rows:$e,rowSpan:$e,sandbox:wn,scope:null,scoped:wt,seamless:wt,selected:wt,shadowRootClonable:wt,shadowRootDelegatesFocus:wt,shadowRootMode:null,shape:null,size:$e,sizes:null,slot:null,span:$e,spellCheck:ir,src:null,srcDoc:null,srcLang:null,srcSet:null,start:$e,step:null,style:null,tabIndex:$e,target:null,title:null,translate:null,type:null,typeMustMatch:wt,useMap:null,value:ir,width:$e,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:wn,axis:null,background:null,bgColor:null,border:$e,borderColor:null,bottomMargin:$e,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:wt,declare:wt,event:null,face:null,frame:null,frameBorder:null,hSpace:$e,leftMargin:$e,link:null,longDesc:null,lowSrc:null,marginHeight:$e,marginWidth:$e,noResize:wt,noHref:wt,noShade:wt,noWrap:wt,object:null,profile:null,prompt:null,rev:null,rightMargin:$e,rules:null,scheme:null,scrolling:ir,standby:null,summary:null,text:null,topMargin:$e,valueType:null,version:null,vAlign:null,vLink:null,vSpace:$e,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:wt,disableRemotePlayback:wt,prefix:null,property:null,results:$e,security:null,unselectable:null},space:"html",transform:Q7}),qRe=Bf({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Ui,accentHeight:$e,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:$e,amplitude:$e,arabicForm:null,ascent:$e,attributeName:null,attributeType:null,azimuth:$e,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:$e,by:null,calcMode:null,capHeight:$e,className:wn,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:$e,diffuseConstant:$e,direction:null,display:null,dur:null,divisor:$e,dominantBaseline:null,download:wt,dx:null,dy:null,edgeMode:null,editable:null,elevation:$e,enableBackground:null,end:null,event:null,exponent:$e,externalResourcesRequired:null,fill:null,fillOpacity:$e,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Fd,g2:Fd,glyphName:Fd,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:$e,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:$e,horizOriginX:$e,horizOriginY:$e,id:null,ideographic:$e,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:$e,k:$e,k1:$e,k2:$e,k3:$e,k4:$e,kernelMatrix:Ui,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:$e,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:$e,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:$e,overlineThickness:$e,paintOrder:null,panose1:null,path:null,pathLength:$e,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:wn,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:$e,pointsAtY:$e,pointsAtZ:$e,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ui,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ui,rev:Ui,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ui,requiredFeatures:Ui,requiredFonts:Ui,requiredFormats:Ui,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:$e,specularExponent:$e,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:$e,strikethroughThickness:$e,string:null,stroke:null,strokeDashArray:Ui,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:$e,strokeOpacity:$e,strokeWidth:null,style:null,surfaceScale:$e,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ui,tabIndex:$e,tableValues:null,target:null,targetX:$e,targetY:$e,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ui,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:$e,underlineThickness:$e,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:$e,values:null,vAlphabetic:$e,vMathematical:$e,vectorEffect:null,vHanging:$e,vIdeographic:$e,version:null,vertAdvY:$e,vertOriginX:$e,vertOriginY:$e,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:$e,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:J7}),eK=Bf({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),tK=Bf({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Q7}),nK=Bf({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),KRe={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},GRe=/[A-Z]/g,mM=/-[a-z]/g,ZRe=/^data[-\w.:]+$/i;function YRe(e,t){const n=Ok(t);let r=t,i=Oi;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&ZRe.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(mM,XRe);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!mM.test(o)){let a=o.replace(GRe,WRe);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=GI}return new i(r,t)}function WRe(e){return"-"+e.toLowerCase()}function XRe(e){return e.charAt(1).toUpperCase()}const JRe=W7([X7,HRe,eK,tK,nK],"html"),ZI=W7([X7,qRe,eK,tK,nK],"svg");function QRe(e){return e.join(" ").trim()}var gd={},M1,hM;function eIe(){if(hM)return M1;hM=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,l=/^\s+|\s+$/g,d=`
177
+ `,f="/",m="*",h="",v="comment",y="declaration";M1=function(S,C){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];C=C||{};var k=1,E=1;function j(K){var B=K.match(t);B&&(k+=B.length);var q=K.lastIndexOf(d);E=~q?K.length-q:E+K.length}function I(){var K={line:k,column:E};return function(B){return B.position=new A(K),D(),B}}function A(K){this.start=K,this.end={line:k,column:E},this.source=C.source}A.prototype.content=S;function T(K){var B=new Error(C.source+":"+k+":"+E+": "+K);if(B.reason=K,B.filename=C.source,B.line=k,B.column=E,B.source=S,!C.silent)throw B}function N(K){var B=K.exec(S);if(B){var q=B[0];return j(q),S=S.slice(q.length),B}}function D(){N(n)}function L(K){var B;for(K=K||[];B=H();)B!==!1&&K.push(B);return K}function H(){var K=I();if(!(f!=S.charAt(0)||m!=S.charAt(1))){for(var B=2;h!=S.charAt(B)&&(m!=S.charAt(B)||f!=S.charAt(B+1));)++B;if(B+=2,h===S.charAt(B-1))return T("End of comment missing");var q=S.slice(2,B-2);return E+=2,j(q),S=S.slice(B),E+=2,K({type:v,comment:q})}}function ee(){var K=I(),B=N(r);if(B){if(H(),!N(i))return T("property missing ':'");var q=N(o),z=K({type:y,property:x(B[0].replace(e,h)),value:q?x(q[0].replace(e,h)):h});return N(a),z}}function G(){var K=[];L(K);for(var B;B=ee();)B!==!1&&(K.push(B),L(K));return K}return D(),G()};function x(S){return S?S.replace(l,h):h}return M1}var gM;function tIe(){if(gM)return gd;gM=1;var e=gd&&gd.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(gd,"__esModule",{value:!0}),gd.default=n;const t=e(eIe());function n(r,i){let o=null;if(!r||typeof r!="string")return o;const a=(0,t.default)(r),l=typeof i=="function";return a.forEach(d=>{if(d.type!=="declaration")return;const{property:f,value:m}=d;l?i(f,m,d):m&&(o=o||{},o[f]=m)}),o}return gd}var tm={},vM;function nIe(){if(vM)return tm;vM=1,Object.defineProperty(tm,"__esModule",{value:!0}),tm.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,o=function(f){return!f||n.test(f)||e.test(f)},a=function(f,m){return m.toUpperCase()},l=function(f,m){return"".concat(m,"-")},d=function(f,m){return m===void 0&&(m={}),o(f)?f:(f=f.toLowerCase(),m.reactCompat?f=f.replace(i,l):f=f.replace(r,l),f.replace(t,a))};return tm.camelCase=d,tm}var nm,yM;function rIe(){if(yM)return nm;yM=1;var e=nm&&nm.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(tIe()),n=nIe();function r(i,o){var a={};return!i||typeof i!="string"||(0,t.default)(i,function(l,d){l&&d&&(a[(0,n.camelCase)(l,o)]=d)}),a}return r.default=r,nm=r,nm}var iIe=rIe();const oIe=hf(iIe),rK=iK("end"),YI=iK("start");function iK(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function aIe(e){const t=YI(e),n=rK(e);if(t&&n)return{start:t,end:n}}function Cm(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?bM(e.position):"start"in e||"end"in e?bM(e):"line"in e||"column"in e?Pk(e):""}function Pk(e){return xM(e&&e.line)+":"+xM(e&&e.column)}function bM(e){return Pk(e&&e.start)+"-"+Pk(e&&e.end)}function xM(e){return e&&typeof e=="number"?e:1}class Br extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},a=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(a=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const d=r.indexOf(":");d===-1?o.ruleId=r:(o.source=r.slice(0,d),o.ruleId=r.slice(d+1))}if(!o.place&&o.ancestors&&o.ancestors){const d=o.ancestors[o.ancestors.length-1];d&&(o.place=d.position)}const l=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=l?l.line:void 0,this.name=Cm(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=a&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Br.prototype.file="";Br.prototype.name="";Br.prototype.reason="";Br.prototype.message="";Br.prototype.stack="";Br.prototype.column=void 0;Br.prototype.line=void 0;Br.prototype.ancestors=void 0;Br.prototype.cause=void 0;Br.prototype.fatal=void 0;Br.prototype.place=void 0;Br.prototype.ruleId=void 0;Br.prototype.source=void 0;const WI={}.hasOwnProperty,sIe=new Map,lIe=/[A-Z]/g,cIe=new Set(["table","tbody","thead","tfoot","tr"]),uIe=new Set(["td","th"]),oK="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function dIe(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=bIe(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=yIe(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?ZI:JRe,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=aK(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function aK(e,t,n){if(t.type==="element")return fIe(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return pIe(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return hIe(e,t,n);if(t.type==="mdxjsEsm")return mIe(e,t);if(t.type==="root")return gIe(e,t,n);if(t.type==="text")return vIe(e,t)}function fIe(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=ZI,e.schema=i),e.ancestors.push(t);const o=lK(e,t.tagName,!1),a=xIe(e,t);let l=JI(e,t);return cIe.has(t.tagName)&&(l=l.filter(function(d){return typeof d=="string"?!VRe(d):!0})),sK(e,a,o,t),XI(a,l),e.ancestors.pop(),e.schema=r,e.create(t,o,a,n)}function pIe(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Ym(e,t.position)}function mIe(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Ym(e,t.position)}function hIe(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=ZI,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:lK(e,t.name,!0),a=wIe(e,t),l=JI(e,t);return sK(e,a,o,t),XI(a,l),e.ancestors.pop(),e.schema=r,e.create(t,o,a,n)}function gIe(e,t,n){const r={};return XI(r,JI(e,t)),e.create(t,e.Fragment,r,n)}function vIe(e,t){return t.value}function sK(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function XI(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function yIe(e,t,n){return r;function r(i,o,a,l){const f=Array.isArray(a.children)?n:t;return l?f(o,a,l):f(o,a)}}function bIe(e,t){return n;function n(r,i,o,a){const l=Array.isArray(o.children),d=YI(r);return t(i,o,a,l,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function xIe(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&WI.call(t.properties,i)){const o=SIe(e,i,t.properties[i]);if(o){const[a,l]=o;e.tableCellAlignToStyle&&a==="align"&&typeof l=="string"&&uIe.has(t.tagName)?r=l:n[a]=l}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function wIe(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const a=o.expression;a.type;const l=a.properties[0];l.type,Object.assign(n,e.evaluater.evaluateExpression(l.argument))}else Ym(e,t.position);else{const i=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const l=r.value.data.estree.body[0];l.type,o=e.evaluater.evaluateExpression(l.expression)}else Ym(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function JI(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:sIe;for(;++r<t.children.length;){const o=t.children[r];let a;if(e.passKeys){const d=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(d){const f=i.get(d)||0;a=d+"-"+f,i.set(d,f+1)}}const l=aK(e,o,a);l!==void 0&&n.push(l)}return n}function SIe(e,t,n){const r=YRe(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?MRe(n):QRe(n)),r.property==="style"){let i=typeof n=="object"?n:_Ie(e,String(n));return e.stylePropertyNameCase==="css"&&(i=CIe(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?KRe[r.property]||r.property:r.attribute,n]}}function _Ie(e,t){try{return oIe(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new Br("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=oK+"#cannot-parse-style-attribute",i}}function lK(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let o=-1,a;for(;++o<i.length;){const l=dM(i[o])?{type:"Identifier",name:i[o]}:{type:"Literal",value:i[o]};a=a?{type:"MemberExpression",object:a,property:l,computed:!!(o&&l.type==="Literal"),optional:!1}:l}r=a}else r=dM(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return WI.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Ym(e)}function Ym(e,t){const n=new Br("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=oK+"#cannot-handle-mdx-estrees-without-createevaluater",n}function CIe(e){const t={};let n;for(n in e)WI.call(e,n)&&(t[kIe(n)]=e[n]);return t}function kIe(e){let t=e.replace(lIe,EIe);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function EIe(e){return"-"+e.toLowerCase()}const z1={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},jIe={};function RIe(e,t){const n=jIe,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return cK(e,r,i)}function cK(e,t,n){if(IIe(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return wM(e.children,t,n)}return Array.isArray(e)?wM(e,t,n):""}function wM(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=cK(e[i],t,n);return r.join("")}function IIe(e){return!!(e&&typeof e=="object")}const SM=document.createElement("i");function QI(e){const t="&"+e+";";SM.innerHTML=t;const n=SM.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Ta(e,t,n,r){const i=e.length;let o=0,a;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);o<r.length;)a=r.slice(o,o+1e4),a.unshift(t,0),e.splice(...a),o+=1e4,t+=1e4}function Co(e,t){return e.length>0?(Ta(e,e.length,0,t),e):t}const _M={}.hasOwnProperty;function TIe(e){const t={};let n=-1;for(;++n<e.length;)NIe(t,e[n]);return t}function NIe(e,t){let n;for(n in t){const i=(_M.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let a;if(o)for(a in o){_M.call(i,a)||(i[a]=[]);const l=o[a];AIe(i[a],Array.isArray(l)?l:l?[l]:[])}}}function AIe(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Ta(e,0,0,r)}function uK(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Ud(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ya=Zl(/[A-Za-z]/),Ki=Zl(/[\dA-Za-z]/),OIe=Zl(/[#-'*+\--9=?A-Z^-~]/);function Mk(e){return e!==null&&(e<32||e===127)}const zk=Zl(/\d/),DIe=Zl(/[\dA-Fa-f]/),$Ie=Zl(/[!-/:-@[-`{-~]/);function ut(e){return e!==null&&e<-2}function Ei(e){return e!==null&&(e<0||e===32)}function Jt(e){return e===-2||e===-1||e===32}const PIe=Zl(new RegExp("\\p{P}|\\p{S}","u")),MIe=Zl(/\s/);function Zl(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Hf(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let a="";if(o===37&&Ki(e.charCodeAt(n+1))&&Ki(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(a=String.fromCharCode(o));else if(o>55295&&o<57344){const l=e.charCodeAt(n+1);o<56320&&l>56319&&l<57344?(a=String.fromCharCode(o,l),i=1):a="�"}else a=String.fromCharCode(o);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+i+1,a=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function Sn(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return a;function a(d){return Jt(d)?(e.enter(n),l(d)):t(d)}function l(d){return Jt(d)&&o++<i?(e.consume(d),l):(e.exit(n),t(d))}}const zIe={tokenize:LIe};function LIe(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),Sn(e,t,"linePrefix")}function i(l){return e.enter("paragraph"),o(l)}function o(l){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,a(l)}function a(l){if(l===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(l);return}return ut(l)?(e.consume(l),e.exit("chunkText"),o):(e.consume(l),a)}}const FIe={tokenize:UIe},CM={tokenize:VIe};function UIe(e){const t=this,n=[];let r=0,i,o,a;return l;function l(j){if(r<n.length){const I=n[r];return t.containerState=I[1],e.attempt(I[0].continuation,d,f)(j)}return f(j)}function d(j){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&E();const I=t.events.length;let A=I,T;for(;A--;)if(t.events[A][0]==="exit"&&t.events[A][1].type==="chunkFlow"){T=t.events[A][1].end;break}k(r);let N=I;for(;N<t.events.length;)t.events[N][1].end={...T},N++;return Ta(t.events,A+1,0,t.events.slice(I)),t.events.length=N,f(j)}return l(j)}function f(j){if(r===n.length){if(!i)return v(j);if(i.currentConstruct&&i.currentConstruct.concrete)return x(j);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(CM,m,h)(j)}function m(j){return i&&E(),k(r),v(j)}function h(j){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,x(j)}function v(j){return t.containerState={},e.attempt(CM,y,x)(j)}function y(j){return r++,n.push([t.currentConstruct,t.containerState]),v(j)}function x(j){if(j===null){i&&E(),k(0),e.consume(j);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),S(j)}function S(j){if(j===null){C(e.exit("chunkFlow"),!0),k(0),e.consume(j);return}return ut(j)?(e.consume(j),C(e.exit("chunkFlow")),r=0,t.interrupt=void 0,l):(e.consume(j),S)}function C(j,I){const A=t.sliceStream(j);if(I&&A.push(null),j.previous=o,o&&(o.next=j),o=j,i.defineSkip(j.start),i.write(A),t.parser.lazy[j.start.line]){let T=i.events.length;for(;T--;)if(i.events[T][1].start.offset<a&&(!i.events[T][1].end||i.events[T][1].end.offset>a))return;const N=t.events.length;let D=N,L,H;for(;D--;)if(t.events[D][0]==="exit"&&t.events[D][1].type==="chunkFlow"){if(L){H=t.events[D][1].end;break}L=!0}for(k(r),T=N;T<t.events.length;)t.events[T][1].end={...H},T++;Ta(t.events,D+1,0,t.events.slice(N)),t.events.length=T}}function k(j){let I=n.length;for(;I-- >j;){const A=n[I];t.containerState=A[1],A[0].exit.call(t,e)}n.length=j}function E(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function VIe(e,t,n){return Sn(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function kM(e){if(e===null||Ei(e)||MIe(e))return 1;if(PIe(e))return 2}function eT(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const Lk={name:"attention",resolveAll:BIe,tokenize:HIe};function BIe(e,t){let n=-1,r,i,o,a,l,d,f,m;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;d=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const h={...e[r][1].end},v={...e[n][1].start};EM(h,-d),EM(v,d),a={type:d>1?"strongSequence":"emphasisSequence",start:h,end:{...e[r][1].end}},l={type:d>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:v},o={type:d>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:d>1?"strong":"emphasis",start:{...a.start},end:{...l.end}},e[r][1].end={...a.start},e[n][1].start={...l.end},f=[],e[r][1].end.offset-e[r][1].start.offset&&(f=Co(f,[["enter",e[r][1],t],["exit",e[r][1],t]])),f=Co(f,[["enter",i,t],["enter",a,t],["exit",a,t],["enter",o,t]]),f=Co(f,eT(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),f=Co(f,[["exit",o,t],["enter",l,t],["exit",l,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(m=2,f=Co(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):m=0,Ta(e,r-1,n-r+3,f),n=r+f.length-m-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function HIe(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=kM(r);let o;return a;function a(d){return o=d,e.enter("attentionSequence"),l(d)}function l(d){if(d===o)return e.consume(d),l;const f=e.exit("attentionSequence"),m=kM(d),h=!m||m===2&&i||n.includes(d),v=!i||i===2&&m||n.includes(r);return f._open=!!(o===42?h:h&&(i||!v)),f._close=!!(o===42?v:v&&(m||!h)),t(d)}}function EM(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const qIe={name:"autolink",tokenize:KIe};function KIe(e,t,n){let r=0;return i;function i(y){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(y){return ya(y)?(e.consume(y),a):y===64?n(y):f(y)}function a(y){return y===43||y===45||y===46||Ki(y)?(r=1,l(y)):f(y)}function l(y){return y===58?(e.consume(y),r=0,d):(y===43||y===45||y===46||Ki(y))&&r++<32?(e.consume(y),l):(r=0,f(y))}function d(y){return y===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):y===null||y===32||y===60||Mk(y)?n(y):(e.consume(y),d)}function f(y){return y===64?(e.consume(y),m):OIe(y)?(e.consume(y),f):n(y)}function m(y){return Ki(y)?h(y):n(y)}function h(y){return y===46?(e.consume(y),r=0,m):y===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):v(y)}function v(y){if((y===45||Ki(y))&&r++<63){const x=y===45?v:h;return e.consume(y),x}return n(y)}}const Z0={partial:!0,tokenize:GIe};function GIe(e,t,n){return r;function r(o){return Jt(o)?Sn(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||ut(o)?t(o):n(o)}}const dK={continuation:{tokenize:YIe},exit:WIe,name:"blockQuote",tokenize:ZIe};function ZIe(e,t,n){const r=this;return i;function i(a){if(a===62){const l=r.containerState;return l.open||(e.enter("blockQuote",{_container:!0}),l.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),o}return n(a)}function o(a){return Jt(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function YIe(e,t,n){const r=this;return i;function i(a){return Jt(a)?Sn(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):o(a)}function o(a){return e.attempt(dK,t,n)(a)}}function WIe(e){e.exit("blockQuote")}const fK={name:"characterEscape",tokenize:XIe};function XIe(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return $Ie(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const pK={name:"characterReference",tokenize:JIe};function JIe(e,t,n){const r=this;let i=0,o,a;return l;function l(h){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),d}function d(h){return h===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(h),e.exit("characterReferenceMarkerNumeric"),f):(e.enter("characterReferenceValue"),o=31,a=Ki,m(h))}function f(h){return h===88||h===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(h),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,a=DIe,m):(e.enter("characterReferenceValue"),o=7,a=zk,m(h))}function m(h){if(h===59&&i){const v=e.exit("characterReferenceValue");return a===Ki&&!QI(r.sliceSerialize(v))?n(h):(e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(h)&&i++<o?(e.consume(h),m):n(h)}}const jM={partial:!0,tokenize:eTe},RM={concrete:!0,name:"codeFenced",tokenize:QIe};function QIe(e,t,n){const r=this,i={partial:!0,tokenize:A};let o=0,a=0,l;return d;function d(T){return f(T)}function f(T){const N=r.events[r.events.length-1];return o=N&&N[1].type==="linePrefix"?N[2].sliceSerialize(N[1],!0).length:0,l=T,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),m(T)}function m(T){return T===l?(a++,e.consume(T),m):a<3?n(T):(e.exit("codeFencedFenceSequence"),Jt(T)?Sn(e,h,"whitespace")(T):h(T))}function h(T){return T===null||ut(T)?(e.exit("codeFencedFence"),r.interrupt?t(T):e.check(jM,S,I)(T)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),v(T))}function v(T){return T===null||ut(T)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),h(T)):Jt(T)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Sn(e,y,"whitespace")(T)):T===96&&T===l?n(T):(e.consume(T),v)}function y(T){return T===null||ut(T)?h(T):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),x(T))}function x(T){return T===null||ut(T)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),h(T)):T===96&&T===l?n(T):(e.consume(T),x)}function S(T){return e.attempt(i,I,C)(T)}function C(T){return e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),k}function k(T){return o>0&&Jt(T)?Sn(e,E,"linePrefix",o+1)(T):E(T)}function E(T){return T===null||ut(T)?e.check(jM,S,I)(T):(e.enter("codeFlowValue"),j(T))}function j(T){return T===null||ut(T)?(e.exit("codeFlowValue"),E(T)):(e.consume(T),j)}function I(T){return e.exit("codeFenced"),t(T)}function A(T,N,D){let L=0;return H;function H(q){return T.enter("lineEnding"),T.consume(q),T.exit("lineEnding"),ee}function ee(q){return T.enter("codeFencedFence"),Jt(q)?Sn(T,G,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(q):G(q)}function G(q){return q===l?(T.enter("codeFencedFenceSequence"),K(q)):D(q)}function K(q){return q===l?(L++,T.consume(q),K):L>=a?(T.exit("codeFencedFenceSequence"),Jt(q)?Sn(T,B,"whitespace")(q):B(q)):D(q)}function B(q){return q===null||ut(q)?(T.exit("codeFencedFence"),N(q)):D(q)}}}function eTe(e,t,n){const r=this;return i;function i(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o)}function o(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}const L1={name:"codeIndented",tokenize:nTe},tTe={partial:!0,tokenize:rTe};function nTe(e,t,n){const r=this;return i;function i(f){return e.enter("codeIndented"),Sn(e,o,"linePrefix",5)(f)}function o(f){const m=r.events[r.events.length-1];return m&&m[1].type==="linePrefix"&&m[2].sliceSerialize(m[1],!0).length>=4?a(f):n(f)}function a(f){return f===null?d(f):ut(f)?e.attempt(tTe,a,d)(f):(e.enter("codeFlowValue"),l(f))}function l(f){return f===null||ut(f)?(e.exit("codeFlowValue"),a(f)):(e.consume(f),l)}function d(f){return e.exit("codeIndented"),t(f)}}function rTe(e,t,n){const r=this;return i;function i(a){return r.parser.lazy[r.now().line]?n(a):ut(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):Sn(e,o,"linePrefix",5)(a)}function o(a){const l=r.events[r.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(a):ut(a)?i(a):n(a)}}const iTe={name:"codeText",previous:aTe,resolve:oTe,tokenize:sTe};function oTe(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function aTe(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function sTe(e,t,n){let r=0,i,o;return a;function a(h){return e.enter("codeText"),e.enter("codeTextSequence"),l(h)}function l(h){return h===96?(e.consume(h),r++,l):(e.exit("codeTextSequence"),d(h))}function d(h){return h===null?n(h):h===32?(e.enter("space"),e.consume(h),e.exit("space"),d):h===96?(o=e.enter("codeTextSequence"),i=0,m(h)):ut(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),d):(e.enter("codeTextData"),f(h))}function f(h){return h===null||h===32||h===96||ut(h)?(e.exit("codeTextData"),d(h)):(e.consume(h),f)}function m(h){return h===96?(e.consume(h),i++,m):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(h)):(o.type="codeTextData",f(h))}}class lTe{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&rm(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),rm(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),rm(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);rm(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);rm(this.left,n.reverse())}}}function rm(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function mK(e){const t={};let n=-1,r,i,o,a,l,d,f;const m=new lTe(e);for(;++n<m.length;){for(;n in t;)n=t[n];if(r=m.get(n),n&&r[1].type==="chunkFlow"&&m.get(n-1)[1].type==="listItemPrefix"&&(d=r[1]._tokenizer.events,o=0,o<d.length&&d[o][1].type==="lineEndingBlank"&&(o+=2),o<d.length&&d[o][1].type==="content"))for(;++o<d.length&&d[o][1].type!=="content";)d[o][1].type==="chunkText"&&(d[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,cTe(m,n)),n=t[n],f=!0);else if(r[1]._container){for(o=n,i=void 0;o--;)if(a=m.get(o),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(i&&(m.get(i)[1].type="lineEndingBlank"),a[1].type="lineEnding",i=o);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;i&&(r[1].end={...m.get(i)[1].start},l=m.slice(i,n),l.unshift(r),m.splice(i,n-i+1,l))}}return Ta(e,0,Number.POSITIVE_INFINITY,m.slice(0)),!f}function cTe(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const o=[];let a=n._tokenizer;a||(a=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const l=a.events,d=[],f={};let m,h,v=-1,y=n,x=0,S=0;const C=[S];for(;y;){for(;e.get(++i)[1]!==y;);o.push(i),y._tokenizer||(m=r.sliceStream(y),y.next||m.push(null),h&&a.defineSkip(y.start),y._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(m),y._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),h=y,y=y.next}for(y=n;++v<l.length;)l[v][0]==="exit"&&l[v-1][0]==="enter"&&l[v][1].type===l[v-1][1].type&&l[v][1].start.line!==l[v][1].end.line&&(S=v+1,C.push(S),y._tokenizer=void 0,y.previous=void 0,y=y.next);for(a.events=[],y?(y._tokenizer=void 0,y.previous=void 0):C.pop(),v=C.length;v--;){const k=l.slice(C[v],C[v+1]),E=o.pop();d.push([E,E+k.length-1]),e.splice(E,2,k)}for(d.reverse(),v=-1;++v<d.length;)f[x+d[v][0]]=x+d[v][1],x+=d[v][1]-d[v][0]-1;return f}const uTe={resolve:fTe,tokenize:pTe},dTe={partial:!0,tokenize:mTe};function fTe(e){return mK(e),e}function pTe(e,t){let n;return r;function r(l){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(l)}function i(l){return l===null?o(l):ut(l)?e.check(dTe,a,o)(l):(e.consume(l),i)}function o(l){return e.exit("chunkContent"),e.exit("content"),t(l)}function a(l){return e.consume(l),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function mTe(e,t,n){const r=this;return i;function i(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Sn(e,o,"linePrefix")}function o(a){if(a===null||ut(a))return n(a);const l=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}function hK(e,t,n,r,i,o,a,l,d){const f=d||Number.POSITIVE_INFINITY;let m=0;return h;function h(k){return k===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(k),e.exit(o),v):k===null||k===32||k===41||Mk(k)?n(k):(e.enter(r),e.enter(a),e.enter(l),e.enter("chunkString",{contentType:"string"}),S(k))}function v(k){return k===62?(e.enter(o),e.consume(k),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),y(k))}function y(k){return k===62?(e.exit("chunkString"),e.exit(l),v(k)):k===null||k===60||ut(k)?n(k):(e.consume(k),k===92?x:y)}function x(k){return k===60||k===62||k===92?(e.consume(k),y):y(k)}function S(k){return!m&&(k===null||k===41||Ei(k))?(e.exit("chunkString"),e.exit(l),e.exit(a),e.exit(r),t(k)):m<f&&k===40?(e.consume(k),m++,S):k===41?(e.consume(k),m--,S):k===null||k===32||k===40||Mk(k)?n(k):(e.consume(k),k===92?C:S)}function C(k){return k===40||k===41||k===92?(e.consume(k),S):S(k)}}function gK(e,t,n,r,i,o){const a=this;let l=0,d;return f;function f(y){return e.enter(r),e.enter(i),e.consume(y),e.exit(i),e.enter(o),m}function m(y){return l>999||y===null||y===91||y===93&&!d||y===94&&!l&&"_hiddenFootnoteSupport"in a.parser.constructs?n(y):y===93?(e.exit(o),e.enter(i),e.consume(y),e.exit(i),e.exit(r),t):ut(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),m):(e.enter("chunkString",{contentType:"string"}),h(y))}function h(y){return y===null||y===91||y===93||ut(y)||l++>999?(e.exit("chunkString"),m(y)):(e.consume(y),d||(d=!Jt(y)),y===92?v:h)}function v(y){return y===91||y===92||y===93?(e.consume(y),l++,h):h(y)}}function vK(e,t,n,r,i,o){let a;return l;function l(v){return v===34||v===39||v===40?(e.enter(r),e.enter(i),e.consume(v),e.exit(i),a=v===40?41:v,d):n(v)}function d(v){return v===a?(e.enter(i),e.consume(v),e.exit(i),e.exit(r),t):(e.enter(o),f(v))}function f(v){return v===a?(e.exit(o),d(a)):v===null?n(v):ut(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),Sn(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),m(v))}function m(v){return v===a||v===null||ut(v)?(e.exit("chunkString"),f(v)):(e.consume(v),v===92?h:m)}function h(v){return v===a||v===92?(e.consume(v),m):m(v)}}function km(e,t){let n;return r;function r(i){return ut(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):Jt(i)?Sn(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const hTe={name:"definition",tokenize:vTe},gTe={partial:!0,tokenize:yTe};function vTe(e,t,n){const r=this;let i;return o;function o(y){return e.enter("definition"),a(y)}function a(y){return gK.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function l(y){return i=Ud(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),y===58?(e.enter("definitionMarker"),e.consume(y),e.exit("definitionMarker"),d):n(y)}function d(y){return Ei(y)?km(e,f)(y):f(y)}function f(y){return hK(e,m,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function m(y){return e.attempt(gTe,h,h)(y)}function h(y){return Jt(y)?Sn(e,v,"whitespace")(y):v(y)}function v(y){return y===null||ut(y)?(e.exit("definition"),r.parser.defined.push(i),t(y)):n(y)}}function yTe(e,t,n){return r;function r(l){return Ei(l)?km(e,i)(l):n(l)}function i(l){return vK(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function o(l){return Jt(l)?Sn(e,a,"whitespace")(l):a(l)}function a(l){return l===null||ut(l)?t(l):n(l)}}const bTe={name:"hardBreakEscape",tokenize:xTe};function xTe(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return ut(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const wTe={name:"headingAtx",resolve:STe,tokenize:_Te};function STe(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Ta(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function _Te(e,t,n){let r=0;return i;function i(m){return e.enter("atxHeading"),o(m)}function o(m){return e.enter("atxHeadingSequence"),a(m)}function a(m){return m===35&&r++<6?(e.consume(m),a):m===null||Ei(m)?(e.exit("atxHeadingSequence"),l(m)):n(m)}function l(m){return m===35?(e.enter("atxHeadingSequence"),d(m)):m===null||ut(m)?(e.exit("atxHeading"),t(m)):Jt(m)?Sn(e,l,"whitespace")(m):(e.enter("atxHeadingText"),f(m))}function d(m){return m===35?(e.consume(m),d):(e.exit("atxHeadingSequence"),l(m))}function f(m){return m===null||m===35||Ei(m)?(e.exit("atxHeadingText"),l(m)):(e.consume(m),f)}}const CTe=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],IM=["pre","script","style","textarea"],kTe={concrete:!0,name:"htmlFlow",resolveTo:RTe,tokenize:ITe},ETe={partial:!0,tokenize:NTe},jTe={partial:!0,tokenize:TTe};function RTe(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function ITe(e,t,n){const r=this;let i,o,a,l,d;return f;function f(O){return m(O)}function m(O){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(O),h}function h(O){return O===33?(e.consume(O),v):O===47?(e.consume(O),o=!0,S):O===63?(e.consume(O),i=3,r.interrupt?t:$):ya(O)?(e.consume(O),a=String.fromCharCode(O),C):n(O)}function v(O){return O===45?(e.consume(O),i=2,y):O===91?(e.consume(O),i=5,l=0,x):ya(O)?(e.consume(O),i=4,r.interrupt?t:$):n(O)}function y(O){return O===45?(e.consume(O),r.interrupt?t:$):n(O)}function x(O){const X="CDATA[";return O===X.charCodeAt(l++)?(e.consume(O),l===X.length?r.interrupt?t:G:x):n(O)}function S(O){return ya(O)?(e.consume(O),a=String.fromCharCode(O),C):n(O)}function C(O){if(O===null||O===47||O===62||Ei(O)){const X=O===47,de=a.toLowerCase();return!X&&!o&&IM.includes(de)?(i=1,r.interrupt?t(O):G(O)):CTe.includes(a.toLowerCase())?(i=6,X?(e.consume(O),k):r.interrupt?t(O):G(O)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(O):o?E(O):j(O))}return O===45||Ki(O)?(e.consume(O),a+=String.fromCharCode(O),C):n(O)}function k(O){return O===62?(e.consume(O),r.interrupt?t:G):n(O)}function E(O){return Jt(O)?(e.consume(O),E):H(O)}function j(O){return O===47?(e.consume(O),H):O===58||O===95||ya(O)?(e.consume(O),I):Jt(O)?(e.consume(O),j):H(O)}function I(O){return O===45||O===46||O===58||O===95||Ki(O)?(e.consume(O),I):A(O)}function A(O){return O===61?(e.consume(O),T):Jt(O)?(e.consume(O),A):j(O)}function T(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),d=O,N):Jt(O)?(e.consume(O),T):D(O)}function N(O){return O===d?(e.consume(O),d=null,L):O===null||ut(O)?n(O):(e.consume(O),N)}function D(O){return O===null||O===34||O===39||O===47||O===60||O===61||O===62||O===96||Ei(O)?A(O):(e.consume(O),D)}function L(O){return O===47||O===62||Jt(O)?j(O):n(O)}function H(O){return O===62?(e.consume(O),ee):n(O)}function ee(O){return O===null||ut(O)?G(O):Jt(O)?(e.consume(O),ee):n(O)}function G(O){return O===45&&i===2?(e.consume(O),z):O===60&&i===1?(e.consume(O),W):O===62&&i===4?(e.consume(O),P):O===63&&i===3?(e.consume(O),$):O===93&&i===5?(e.consume(O),ne):ut(O)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(ETe,V,K)(O)):O===null||ut(O)?(e.exit("htmlFlowData"),K(O)):(e.consume(O),G)}function K(O){return e.check(jTe,B,V)(O)}function B(O){return e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),q}function q(O){return O===null||ut(O)?K(O):(e.enter("htmlFlowData"),G(O))}function z(O){return O===45?(e.consume(O),$):G(O)}function W(O){return O===47?(e.consume(O),a="",F):G(O)}function F(O){if(O===62){const X=a.toLowerCase();return IM.includes(X)?(e.consume(O),P):G(O)}return ya(O)&&a.length<8?(e.consume(O),a+=String.fromCharCode(O),F):G(O)}function ne(O){return O===93?(e.consume(O),$):G(O)}function $(O){return O===62?(e.consume(O),P):O===45&&i===2?(e.consume(O),$):G(O)}function P(O){return O===null||ut(O)?(e.exit("htmlFlowData"),V(O)):(e.consume(O),P)}function V(O){return e.exit("htmlFlow"),t(O)}}function TTe(e,t,n){const r=this;return i;function i(a){return ut(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o):n(a)}function o(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}function NTe(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Z0,t,n)}}const ATe={name:"htmlText",tokenize:OTe};function OTe(e,t,n){const r=this;let i,o,a;return l;function l($){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume($),d}function d($){return $===33?(e.consume($),f):$===47?(e.consume($),A):$===63?(e.consume($),j):ya($)?(e.consume($),D):n($)}function f($){return $===45?(e.consume($),m):$===91?(e.consume($),o=0,x):ya($)?(e.consume($),E):n($)}function m($){return $===45?(e.consume($),y):n($)}function h($){return $===null?n($):$===45?(e.consume($),v):ut($)?(a=h,W($)):(e.consume($),h)}function v($){return $===45?(e.consume($),y):h($)}function y($){return $===62?z($):$===45?v($):h($)}function x($){const P="CDATA[";return $===P.charCodeAt(o++)?(e.consume($),o===P.length?S:x):n($)}function S($){return $===null?n($):$===93?(e.consume($),C):ut($)?(a=S,W($)):(e.consume($),S)}function C($){return $===93?(e.consume($),k):S($)}function k($){return $===62?z($):$===93?(e.consume($),k):S($)}function E($){return $===null||$===62?z($):ut($)?(a=E,W($)):(e.consume($),E)}function j($){return $===null?n($):$===63?(e.consume($),I):ut($)?(a=j,W($)):(e.consume($),j)}function I($){return $===62?z($):j($)}function A($){return ya($)?(e.consume($),T):n($)}function T($){return $===45||Ki($)?(e.consume($),T):N($)}function N($){return ut($)?(a=N,W($)):Jt($)?(e.consume($),N):z($)}function D($){return $===45||Ki($)?(e.consume($),D):$===47||$===62||Ei($)?L($):n($)}function L($){return $===47?(e.consume($),z):$===58||$===95||ya($)?(e.consume($),H):ut($)?(a=L,W($)):Jt($)?(e.consume($),L):z($)}function H($){return $===45||$===46||$===58||$===95||Ki($)?(e.consume($),H):ee($)}function ee($){return $===61?(e.consume($),G):ut($)?(a=ee,W($)):Jt($)?(e.consume($),ee):L($)}function G($){return $===null||$===60||$===61||$===62||$===96?n($):$===34||$===39?(e.consume($),i=$,K):ut($)?(a=G,W($)):Jt($)?(e.consume($),G):(e.consume($),B)}function K($){return $===i?(e.consume($),i=void 0,q):$===null?n($):ut($)?(a=K,W($)):(e.consume($),K)}function B($){return $===null||$===34||$===39||$===60||$===61||$===96?n($):$===47||$===62||Ei($)?L($):(e.consume($),B)}function q($){return $===47||$===62||Ei($)?L($):n($)}function z($){return $===62?(e.consume($),e.exit("htmlTextData"),e.exit("htmlText"),t):n($)}function W($){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume($),e.exit("lineEnding"),F}function F($){return Jt($)?Sn(e,ne,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)($):ne($)}function ne($){return e.enter("htmlTextData"),a($)}}const tT={name:"labelEnd",resolveAll:MTe,resolveTo:zTe,tokenize:LTe},DTe={tokenize:FTe},$Te={tokenize:UTe},PTe={tokenize:VTe};function MTe(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&Ta(e,0,e.length,n),e}function zTe(e,t){let n=e.length,r=0,i,o,a,l;for(;n--;)if(i=e[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(a=n);const d={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},f={type:"label",start:{...e[o][1].start},end:{...e[a][1].end}},m={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[a-2][1].start}};return l=[["enter",d,t],["enter",f,t]],l=Co(l,e.slice(o+1,o+r+3)),l=Co(l,[["enter",m,t]]),l=Co(l,eT(t.parser.constructs.insideSpan.null,e.slice(o+r+4,a-3),t)),l=Co(l,[["exit",m,t],e[a-2],e[a-1],["exit",f,t]]),l=Co(l,e.slice(a+1)),l=Co(l,[["exit",d,t]]),Ta(e,o,e.length,l),e}function LTe(e,t,n){const r=this;let i=r.events.length,o,a;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return l;function l(v){return o?o._inactive?h(v):(a=r.parser.defined.includes(Ud(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(v),e.exit("labelMarker"),e.exit("labelEnd"),d):n(v)}function d(v){return v===40?e.attempt(DTe,m,a?m:h)(v):v===91?e.attempt($Te,m,a?f:h)(v):a?m(v):h(v)}function f(v){return e.attempt(PTe,m,h)(v)}function m(v){return t(v)}function h(v){return o._balanced=!0,n(v)}}function FTe(e,t,n){return r;function r(h){return e.enter("resource"),e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),i}function i(h){return Ei(h)?km(e,o)(h):o(h)}function o(h){return h===41?m(h):hK(e,a,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(h)}function a(h){return Ei(h)?km(e,d)(h):m(h)}function l(h){return n(h)}function d(h){return h===34||h===39||h===40?vK(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(h):m(h)}function f(h){return Ei(h)?km(e,m)(h):m(h)}function m(h){return h===41?(e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),e.exit("resource"),t):n(h)}}function UTe(e,t,n){const r=this;return i;function i(l){return gK.call(r,e,o,a,"reference","referenceMarker","referenceString")(l)}function o(l){return r.parser.defined.includes(Ud(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function a(l){return n(l)}}function VTe(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const BTe={name:"labelStartImage",resolveAll:tT.resolveAll,tokenize:HTe};function HTe(e,t,n){const r=this;return i;function i(l){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(l),e.exit("labelImageMarker"),o}function o(l){return l===91?(e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelImage"),a):n(l)}function a(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const qTe={name:"labelStartLink",resolveAll:tT.resolveAll,tokenize:KTe};function KTe(e,t,n){const r=this;return i;function i(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),o}function o(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const F1={name:"lineEnding",tokenize:GTe};function GTe(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Sn(e,t,"linePrefix")}}const Ry={name:"thematicBreak",tokenize:ZTe};function ZTe(e,t,n){let r=0,i;return o;function o(f){return e.enter("thematicBreak"),a(f)}function a(f){return i=f,l(f)}function l(f){return f===i?(e.enter("thematicBreakSequence"),d(f)):r>=3&&(f===null||ut(f))?(e.exit("thematicBreak"),t(f)):n(f)}function d(f){return f===i?(e.consume(f),r++,d):(e.exit("thematicBreakSequence"),Jt(f)?Sn(e,l,"whitespace")(f):l(f))}}const gi={continuation:{tokenize:JTe},exit:eNe,name:"list",tokenize:XTe},YTe={partial:!0,tokenize:tNe},WTe={partial:!0,tokenize:QTe};function XTe(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return l;function l(y){const x=r.containerState.type||(y===42||y===43||y===45?"listUnordered":"listOrdered");if(x==="listUnordered"?!r.containerState.marker||y===r.containerState.marker:zk(y)){if(r.containerState.type||(r.containerState.type=x,e.enter(x,{_container:!0})),x==="listUnordered")return e.enter("listItemPrefix"),y===42||y===45?e.check(Ry,n,f)(y):f(y);if(!r.interrupt||y===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(y)}return n(y)}function d(y){return zk(y)&&++a<10?(e.consume(y),d):(!r.interrupt||a<2)&&(r.containerState.marker?y===r.containerState.marker:y===41||y===46)?(e.exit("listItemValue"),f(y)):n(y)}function f(y){return e.enter("listItemMarker"),e.consume(y),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||y,e.check(Z0,r.interrupt?n:m,e.attempt(YTe,v,h))}function m(y){return r.containerState.initialBlankLine=!0,o++,v(y)}function h(y){return Jt(y)?(e.enter("listItemPrefixWhitespace"),e.consume(y),e.exit("listItemPrefixWhitespace"),v):n(y)}function v(y){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(y)}}function JTe(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Z0,i,o);function i(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Sn(e,t,"listItemIndent",r.containerState.size+1)(l)}function o(l){return r.containerState.furtherBlankLines||!Jt(l)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(l)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(WTe,t,a)(l))}function a(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,Sn(e,e.attempt(gi,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function QTe(e,t,n){const r=this;return Sn(e,i,"listItemIndent",r.containerState.size+1);function i(o){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(o):n(o)}}function eNe(e){e.exit(this.containerState.type)}function tNe(e,t,n){const r=this;return Sn(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const a=r.events[r.events.length-1];return!Jt(o)&&a&&a[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const TM={name:"setextUnderline",resolveTo:nNe,tokenize:rNe};function nNe(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const a={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",a,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=a,e.push(["exit",a,t]),e}function rNe(e,t,n){const r=this;let i;return o;function o(f){let m=r.events.length,h;for(;m--;)if(r.events[m][1].type!=="lineEnding"&&r.events[m][1].type!=="linePrefix"&&r.events[m][1].type!=="content"){h=r.events[m][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||h)?(e.enter("setextHeadingLine"),i=f,a(f)):n(f)}function a(f){return e.enter("setextHeadingLineSequence"),l(f)}function l(f){return f===i?(e.consume(f),l):(e.exit("setextHeadingLineSequence"),Jt(f)?Sn(e,d,"lineSuffix")(f):d(f))}function d(f){return f===null||ut(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const iNe={tokenize:oNe};function oNe(e){const t=this,n=e.attempt(Z0,r,e.attempt(this.parser.constructs.flowInitial,i,Sn(e,e.attempt(this.parser.constructs.flow,i,e.attempt(uTe,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const aNe={resolveAll:bK()},sNe=yK("string"),lNe=yK("text");function yK(e){return{resolveAll:bK(e==="text"?cNe:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,a,l);return a;function a(m){return f(m)?o(m):l(m)}function l(m){if(m===null){n.consume(m);return}return n.enter("data"),n.consume(m),d}function d(m){return f(m)?(n.exit("data"),o(m)):(n.consume(m),d)}function f(m){if(m===null)return!0;const h=i[m];let v=-1;if(h)for(;++v<h.length;){const y=h[v];if(!y.previous||y.previous.call(r,r.previous))return!0}return!1}}}function bK(e){return t;function t(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(n,r):n}}function cNe(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let o=i.length,a=-1,l=0,d;for(;o--;){const f=i[o];if(typeof f=="string"){for(a=f.length;f.charCodeAt(a-1)===32;)l++,a--;if(a)break;a=-1}else if(f===-2)d=!0,l++;else if(f!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){const f={type:n===e.length||d||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?a:r.start._bufferIndex+a,_index:r.start._index+o,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:{...r.end}};r.end={...f.start},r.start.offset===r.end.offset?Object.assign(r,f):(e.splice(n,0,["enter",f,t],["exit",f,t]),n+=2)}n++}return e}const uNe={42:gi,43:gi,45:gi,48:gi,49:gi,50:gi,51:gi,52:gi,53:gi,54:gi,55:gi,56:gi,57:gi,62:dK},dNe={91:hTe},fNe={[-2]:L1,[-1]:L1,32:L1},pNe={35:wTe,42:Ry,45:[TM,Ry],60:kTe,61:TM,95:Ry,96:RM,126:RM},mNe={38:pK,92:fK},hNe={[-5]:F1,[-4]:F1,[-3]:F1,33:BTe,38:pK,42:Lk,60:[qIe,ATe],91:qTe,92:[bTe,fK],93:tT,95:Lk,96:iTe},gNe={null:[Lk,aNe]},vNe={null:[42,95]},yNe={null:[]},bNe=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:vNe,contentInitial:dNe,disable:yNe,document:uNe,flow:pNe,flowInitial:fNe,insideSpan:gNe,string:mNe,text:hNe},Symbol.toStringTag,{value:"Module"}));function xNe(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},o=[];let a=[],l=[];const d={attempt:N(A),check:N(T),consume:E,enter:j,exit:I,interrupt:N(T,{interrupt:!0})},f={code:null,containerState:{},defineSkip:S,events:[],now:x,parser:e,previous:null,sliceSerialize:v,sliceStream:y,write:h};let m=t.tokenize.call(f,d);return t.resolveAll&&o.push(t),f;function h(ee){return a=Co(a,ee),C(),a[a.length-1]!==null?[]:(D(t,0),f.events=eT(o,f.events,f),f.events)}function v(ee,G){return SNe(y(ee),G)}function y(ee){return wNe(a,ee)}function x(){const{_bufferIndex:ee,_index:G,line:K,column:B,offset:q}=r;return{_bufferIndex:ee,_index:G,line:K,column:B,offset:q}}function S(ee){i[ee.line]=ee.column,H()}function C(){let ee;for(;r._index<a.length;){const G=a[r._index];if(typeof G=="string")for(ee=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===ee&&r._bufferIndex<G.length;)k(G.charCodeAt(r._bufferIndex));else k(G)}}function k(ee){m=m(ee)}function E(ee){ut(ee)?(r.line++,r.column=1,r.offset+=ee===-3?2:1,H()):ee!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),f.previous=ee}function j(ee,G){const K=G||{};return K.type=ee,K.start=x(),f.events.push(["enter",K,f]),l.push(K),K}function I(ee){const G=l.pop();return G.end=x(),f.events.push(["exit",G,f]),G}function A(ee,G){D(ee,G.from)}function T(ee,G){G.restore()}function N(ee,G){return K;function K(B,q,z){let W,F,ne,$;return Array.isArray(B)?V(B):"tokenize"in B?V([B]):P(B);function P(ge){return Q;function Q(ve){const xe=ve!==null&&ge[ve],Ee=ve!==null&&ge.null,Pe=[...Array.isArray(xe)?xe:xe?[xe]:[],...Array.isArray(Ee)?Ee:Ee?[Ee]:[]];return V(Pe)(ve)}}function V(ge){return W=ge,F=0,ge.length===0?z:O(ge[F])}function O(ge){return Q;function Q(ve){return $=L(),ne=ge,ge.partial||(f.currentConstruct=ge),ge.name&&f.parser.constructs.disable.null.includes(ge.name)?de():ge.tokenize.call(G?Object.assign(Object.create(f),G):f,d,X,de)(ve)}}function X(ge){return ee(ne,$),q}function de(ge){return $.restore(),++F<W.length?O(W[F]):z}}}function D(ee,G){ee.resolveAll&&!o.includes(ee)&&o.push(ee),ee.resolve&&Ta(f.events,G,f.events.length-G,ee.resolve(f.events.slice(G),f)),ee.resolveTo&&(f.events=ee.resolveTo(f.events,f))}function L(){const ee=x(),G=f.previous,K=f.currentConstruct,B=f.events.length,q=Array.from(l);return{from:B,restore:z};function z(){r=ee,f.previous=G,f.currentConstruct=K,f.events.length=B,l=q,H()}}function H(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function wNe(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let a;if(n===i)a=[e[n].slice(r,o)];else{if(a=e.slice(n,i),r>-1){const l=a[0];typeof l=="string"?a[0]=l.slice(r):a.shift()}o>0&&a.push(e[i].slice(0,o))}return a}function SNe(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let a;if(typeof o=="string")a=o;else switch(o){case-5:{a="\r";break}case-4:{a=`
178
+ `;break}case-3:{a=`\r
179
+ `;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&i)continue;a=" ";break}default:a=String.fromCharCode(o)}i=o===-2,r.push(a)}return r.join("")}function _Ne(e){const r={constructs:TIe([bNe,...(e||{}).extensions||[]]),content:i(zIe),defined:[],document:i(FIe),flow:i(iNe),lazy:{},string:i(sNe),text:i(lNe)};return r;function i(o){return a;function a(l){return xNe(r,o,l)}}}function CNe(e){for(;!mK(e););return e}const NM=/[\0\t\n\r]/g;function kNe(){let e=1,t="",n=!0,r;return i;function i(o,a,l){const d=[];let f,m,h,v,y;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(a||void 0).decode(o)),h=0,t="",n&&(o.charCodeAt(0)===65279&&h++,n=void 0);h<o.length;){if(NM.lastIndex=h,f=NM.exec(o),v=f&&f.index!==void 0?f.index:o.length,y=o.charCodeAt(v),!f){t=o.slice(h);break}if(y===10&&h===v&&r)d.push(-3),r=void 0;else switch(r&&(d.push(-5),r=void 0),h<v&&(d.push(o.slice(h,v)),e+=v-h),y){case 0:{d.push(65533),e++;break}case 9:{for(m=Math.ceil(e/4)*4,d.push(-2);e++<m;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:r=!0,e=1}h=v+1}return l&&(r&&d.push(-5),t&&d.push(t),d.push(null)),d}}const ENe=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function jNe(e){return e.replace(ENe,RNe)}function RNe(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return uK(n.slice(o?2:1),o?16:10)}return QI(n)||e}const xK={}.hasOwnProperty;function INe(e,t,n){return typeof t!="string"&&(n=t,t=void 0),TNe(n)(CNe(_Ne(n).document().write(kNe()(e,t,!0))))}function TNe(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(tn),autolinkProtocol:L,autolinkEmail:L,atxHeading:o(tt),blockQuote:o(Ee),characterEscape:L,characterReference:L,codeFenced:o(Pe),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:o(Pe,a),codeText:o(Fe,a),codeTextData:L,data:L,codeFlowValue:L,definition:o(pt),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:o(dt),hardBreakEscape:o(Vt),hardBreakTrailing:o(Vt),htmlFlow:o(mn,a),htmlFlowData:L,htmlText:o(mn,a),htmlTextData:L,image:o(qn),label:a,link:o(tn),listItem:o(Z),listItemValue:v,listOrdered:o(Pn,h),listUnordered:o(Pn),paragraph:o(re),reference:O,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:o(tt),strong:o(se),thematicBreak:o(oe)},exit:{atxHeading:d(),atxHeadingSequence:A,autolink:d(),autolinkEmail:xe,autolinkProtocol:ve,blockQuote:d(),characterEscapeValue:H,characterReferenceMarkerHexadecimal:de,characterReferenceMarkerNumeric:de,characterReferenceValue:ge,characterReference:Q,codeFenced:d(C),codeFencedFence:S,codeFencedFenceInfo:y,codeFencedFenceMeta:x,codeFlowValue:H,codeIndented:d(k),codeText:d(q),codeTextData:H,data:H,definition:d(),definitionDestinationString:I,definitionLabelString:E,definitionTitleString:j,emphasis:d(),hardBreakEscape:d(G),hardBreakTrailing:d(G),htmlFlow:d(K),htmlFlowData:H,htmlText:d(B),htmlTextData:H,image:d(W),label:ne,labelText:F,lineEnding:ee,link:d(z),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:X,resourceDestinationString:$,resourceTitleString:P,resource:V,setextHeading:d(D),setextHeadingLineSequence:N,setextHeadingText:T,strong:d(),thematicBreak:d()}};wK(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(U){let le={type:"root",children:[]};const ke={stack:[le],tokenStack:[],config:t,enter:l,exit:f,buffer:a,resume:m,data:n},De=[];let Be=-1;for(;++Be<U.length;)if(U[Be][1].type==="listOrdered"||U[Be][1].type==="listUnordered")if(U[Be][0]==="enter")De.push(Be);else{const Nt=De.pop();Be=i(U,Nt,Be)}for(Be=-1;++Be<U.length;){const Nt=t[U[Be][0]];xK.call(Nt,U[Be][1].type)&&Nt[U[Be][1].type].call(Object.assign({sliceSerialize:U[Be][2].sliceSerialize},ke),U[Be][1])}if(ke.tokenStack.length>0){const Nt=ke.tokenStack[ke.tokenStack.length-1];(Nt[1]||AM).call(ke,void 0,Nt[0])}for(le.position={start:tl(U.length>0?U[0][1].start:{line:1,column:1,offset:0}),end:tl(U.length>0?U[U.length-2][1].end:{line:1,column:1,offset:0})},Be=-1;++Be<t.transforms.length;)le=t.transforms[Be](le)||le;return le}function i(U,le,ke){let De=le-1,Be=-1,Nt=!1,Kt,kn,Gt,sn;for(;++De<=ke;){const jt=U[De];switch(jt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{jt[0]==="enter"?Be++:Be--,sn=void 0;break}case"lineEndingBlank":{jt[0]==="enter"&&(Kt&&!sn&&!Be&&!Gt&&(Gt=De),sn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:sn=void 0}if(!Be&&jt[0]==="enter"&&jt[1].type==="listItemPrefix"||Be===-1&&jt[0]==="exit"&&(jt[1].type==="listUnordered"||jt[1].type==="listOrdered")){if(Kt){let ur=De;for(kn=void 0;ur--;){const Tn=U[ur];if(Tn[1].type==="lineEnding"||Tn[1].type==="lineEndingBlank"){if(Tn[0]==="exit")continue;kn&&(U[kn][1].type="lineEndingBlank",Nt=!0),Tn[1].type="lineEnding",kn=ur}else if(!(Tn[1].type==="linePrefix"||Tn[1].type==="blockQuotePrefix"||Tn[1].type==="blockQuotePrefixWhitespace"||Tn[1].type==="blockQuoteMarker"||Tn[1].type==="listItemIndent"))break}Gt&&(!kn||Gt<kn)&&(Kt._spread=!0),Kt.end=Object.assign({},kn?U[kn][1].start:jt[1].end),U.splice(kn||De,0,["exit",Kt,jt[2]]),De++,ke++}if(jt[1].type==="listItemPrefix"){const ur={type:"listItem",_spread:!1,start:Object.assign({},jt[1].start),end:void 0};Kt=ur,U.splice(De,0,["enter",ur,jt[2]]),De++,ke++,Gt=void 0,sn=!0}}}return U[le][1]._spread=Nt,ke}function o(U,le){return ke;function ke(De){l.call(this,U(De),De),le&&le.call(this,De)}}function a(){this.stack.push({type:"fragment",children:[]})}function l(U,le,ke){this.stack[this.stack.length-1].children.push(U),this.stack.push(U),this.tokenStack.push([le,ke||void 0]),U.position={start:tl(le.start),end:void 0}}function d(U){return le;function le(ke){U&&U.call(this,ke),f.call(this,ke)}}function f(U,le){const ke=this.stack.pop(),De=this.tokenStack.pop();if(De)De[0].type!==U.type&&(le?le.call(this,U,De[0]):(De[1]||AM).call(this,U,De[0]));else throw new Error("Cannot close `"+U.type+"` ("+Cm({start:U.start,end:U.end})+"): it’s not open");ke.position.end=tl(U.end)}function m(){return RIe(this.stack.pop())}function h(){this.data.expectingFirstListItemValue=!0}function v(U){if(this.data.expectingFirstListItemValue){const le=this.stack[this.stack.length-2];le.start=Number.parseInt(this.sliceSerialize(U),10),this.data.expectingFirstListItemValue=void 0}}function y(){const U=this.resume(),le=this.stack[this.stack.length-1];le.lang=U}function x(){const U=this.resume(),le=this.stack[this.stack.length-1];le.meta=U}function S(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function C(){const U=this.resume(),le=this.stack[this.stack.length-1];le.value=U.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function k(){const U=this.resume(),le=this.stack[this.stack.length-1];le.value=U.replace(/(\r?\n|\r)$/g,"")}function E(U){const le=this.resume(),ke=this.stack[this.stack.length-1];ke.label=le,ke.identifier=Ud(this.sliceSerialize(U)).toLowerCase()}function j(){const U=this.resume(),le=this.stack[this.stack.length-1];le.title=U}function I(){const U=this.resume(),le=this.stack[this.stack.length-1];le.url=U}function A(U){const le=this.stack[this.stack.length-1];if(!le.depth){const ke=this.sliceSerialize(U).length;le.depth=ke}}function T(){this.data.setextHeadingSlurpLineEnding=!0}function N(U){const le=this.stack[this.stack.length-1];le.depth=this.sliceSerialize(U).codePointAt(0)===61?1:2}function D(){this.data.setextHeadingSlurpLineEnding=void 0}function L(U){const ke=this.stack[this.stack.length-1].children;let De=ke[ke.length-1];(!De||De.type!=="text")&&(De=Ce(),De.position={start:tl(U.start),end:void 0},ke.push(De)),this.stack.push(De)}function H(U){const le=this.stack.pop();le.value+=this.sliceSerialize(U),le.position.end=tl(U.end)}function ee(U){const le=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ke=le.children[le.children.length-1];ke.position.end=tl(U.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(le.type)&&(L.call(this,U),H.call(this,U))}function G(){this.data.atHardBreak=!0}function K(){const U=this.resume(),le=this.stack[this.stack.length-1];le.value=U}function B(){const U=this.resume(),le=this.stack[this.stack.length-1];le.value=U}function q(){const U=this.resume(),le=this.stack[this.stack.length-1];le.value=U}function z(){const U=this.stack[this.stack.length-1];if(this.data.inReference){const le=this.data.referenceType||"shortcut";U.type+="Reference",U.referenceType=le,delete U.url,delete U.title}else delete U.identifier,delete U.label;this.data.referenceType=void 0}function W(){const U=this.stack[this.stack.length-1];if(this.data.inReference){const le=this.data.referenceType||"shortcut";U.type+="Reference",U.referenceType=le,delete U.url,delete U.title}else delete U.identifier,delete U.label;this.data.referenceType=void 0}function F(U){const le=this.sliceSerialize(U),ke=this.stack[this.stack.length-2];ke.label=jNe(le),ke.identifier=Ud(le).toLowerCase()}function ne(){const U=this.stack[this.stack.length-1],le=this.resume(),ke=this.stack[this.stack.length-1];if(this.data.inReference=!0,ke.type==="link"){const De=U.children;ke.children=De}else ke.alt=le}function $(){const U=this.resume(),le=this.stack[this.stack.length-1];le.url=U}function P(){const U=this.resume(),le=this.stack[this.stack.length-1];le.title=U}function V(){this.data.inReference=void 0}function O(){this.data.referenceType="collapsed"}function X(U){const le=this.resume(),ke=this.stack[this.stack.length-1];ke.label=le,ke.identifier=Ud(this.sliceSerialize(U)).toLowerCase(),this.data.referenceType="full"}function de(U){this.data.characterReferenceType=U.type}function ge(U){const le=this.sliceSerialize(U),ke=this.data.characterReferenceType;let De;ke?(De=uK(le,ke==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):De=QI(le);const Be=this.stack[this.stack.length-1];Be.value+=De}function Q(U){const le=this.stack.pop();le.position.end=tl(U.end)}function ve(U){H.call(this,U);const le=this.stack[this.stack.length-1];le.url=this.sliceSerialize(U)}function xe(U){H.call(this,U);const le=this.stack[this.stack.length-1];le.url="mailto:"+this.sliceSerialize(U)}function Ee(){return{type:"blockquote",children:[]}}function Pe(){return{type:"code",lang:null,meta:null,value:""}}function Fe(){return{type:"inlineCode",value:""}}function pt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function dt(){return{type:"emphasis",children:[]}}function tt(){return{type:"heading",depth:0,children:[]}}function Vt(){return{type:"break"}}function mn(){return{type:"html",value:""}}function qn(){return{type:"image",title:null,url:"",alt:null}}function tn(){return{type:"link",title:null,url:"",children:[]}}function Pn(U){return{type:"list",ordered:U.type==="listOrdered",start:null,spread:U._spread,children:[]}}function Z(U){return{type:"listItem",spread:U._spread,checked:null,children:[]}}function re(){return{type:"paragraph",children:[]}}function se(){return{type:"strong",children:[]}}function Ce(){return{type:"text",value:""}}function oe(){return{type:"thematicBreak"}}}function tl(e){return{line:e.line,column:e.column,offset:e.offset}}function wK(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?wK(e,r):NNe(e,r)}}function NNe(e,t){let n;for(n in t)if(xK.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function AM(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Cm({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Cm({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Cm({start:t.start,end:t.end})+") is still open")}function ANe(e){const t=this;t.parser=n;function n(r){return INe(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function ONe(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function DNe(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
180
+ `}]}function $Ne(e,t){const n=t.value?t.value+`
181
+ `:"",r={};t.lang&&(r.className=["language-"+t.lang]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i=e.applyData(t,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(t,i),i}function PNe(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function MNe(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function zNe(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=Hf(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let a,l=e.footnoteCounts.get(r);l===void 0?(l=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=o+1,l+=1,e.footnoteCounts.set(r,l);const d={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,d);const f={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(t,f),e.applyData(t,f)}function LNe(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function FNe(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function SK(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const a=i[i.length-1];return a&&a.type==="text"?a.value+=r:i.push({type:"text",value:r}),i}function UNe(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return SK(e,t);const i={src:Hf(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,o),e.applyData(t,o)}function VNe(e,t){const n={src:Hf(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function BNe(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function HNe(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return SK(e,t);const i={href:Hf(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function qNe(e,t){const n={href:Hf(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function KNe(e,t,n){const r=e.all(t),i=n?GNe(n):_K(t),o={},a=[];if(typeof t.checked=="boolean"){const m=r[0];let h;m&&m.type==="element"&&m.tagName==="p"?h=m:(h={type:"element",tagName:"p",properties:{},children:[]},r.unshift(h)),h.children.length>0&&h.children.unshift({type:"text",value:" "}),h.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let l=-1;for(;++l<r.length;){const m=r[l];(i||l!==0||m.type!=="element"||m.tagName!=="p")&&a.push({type:"text",value:`
182
+ `}),m.type==="element"&&m.tagName==="p"&&!i?a.push(...m.children):a.push(m)}const d=r[r.length-1];d&&(i||d.type!=="element"||d.tagName!=="p")&&a.push({type:"text",value:`
183
+ `});const f={type:"element",tagName:"li",properties:o,children:a};return e.patch(t,f),e.applyData(t,f)}function GNe(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=_K(n[r])}return t}function _K(e){const t=e.spread;return t??e.children.length>1}function ZNe(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const a=r[i];if(a.type==="element"&&a.tagName==="li"&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)}function YNe(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function WNe(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function XNe(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function JNe(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],a),i.push(a)}if(n.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},l=YI(t.children[1]),d=rK(t.children[t.children.length-1]);l&&d&&(a.position={start:l,end:d}),i.push(a)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)}function QNe(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",a=n&&n.type==="table"?n.align:void 0,l=a?a.length:t.children.length;let d=-1;const f=[];for(;++d<l;){const h=t.children[d],v={},y=a?a[d]:void 0;y&&(v.align=y);let x={type:"element",tagName:o,properties:v,children:[]};h&&(x.children=e.all(h),e.patch(h,x),x=e.applyData(h,x)),f.push(x)}const m={type:"element",tagName:"tr",properties:{},children:e.wrap(f,!0)};return e.patch(t,m),e.applyData(t,m)}function eAe(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const OM=9,DM=32;function tAe(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const o=[];for(;r;)o.push($M(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push($M(t.slice(i),i>0,!1)),o.join("")}function $M(e,t,n){let r=0,i=e.length;if(t){let o=e.codePointAt(r);for(;o===OM||o===DM;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(i-1);for(;o===OM||o===DM;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function nAe(e,t){const n={type:"text",value:tAe(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function rAe(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const iAe={blockquote:ONe,break:DNe,code:$Ne,delete:PNe,emphasis:MNe,footnoteReference:zNe,heading:LNe,html:FNe,imageReference:UNe,image:VNe,inlineCode:BNe,linkReference:HNe,link:qNe,listItem:KNe,list:ZNe,paragraph:YNe,root:WNe,strong:XNe,table:JNe,tableCell:eAe,tableRow:QNe,text:nAe,thematicBreak:rAe,toml:iy,yaml:iy,definition:iy,footnoteDefinition:iy};function iy(){}const CK=-1,Y0=0,Em=1,Rb=2,nT=3,rT=4,iT=5,oT=6,kK=7,EK=8,PM=typeof self=="object"?self:globalThis,oAe=(e,t)=>{const n=(i,o)=>(e.set(o,i),i),r=i=>{if(e.has(i))return e.get(i);const[o,a]=t[i];switch(o){case Y0:case CK:return n(a,i);case Em:{const l=n([],i);for(const d of a)l.push(r(d));return l}case Rb:{const l=n({},i);for(const[d,f]of a)l[r(d)]=r(f);return l}case nT:return n(new Date(a),i);case rT:{const{source:l,flags:d}=a;return n(new RegExp(l,d),i)}case iT:{const l=n(new Map,i);for(const[d,f]of a)l.set(r(d),r(f));return l}case oT:{const l=n(new Set,i);for(const d of a)l.add(r(d));return l}case kK:{const{name:l,message:d}=a;return n(new PM[l](d),i)}case EK:return n(BigInt(a),i);case"BigInt":return n(Object(BigInt(a)),i);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:l}=new Uint8Array(a);return n(new DataView(l),a)}}return n(new PM[o](a),i)};return r},MM=e=>oAe(new Map,e)(0),vd="",{toString:aAe}={},{keys:sAe}=Object,im=e=>{const t=typeof e;if(t!=="object"||!e)return[Y0,t];const n=aAe.call(e).slice(8,-1);switch(n){case"Array":return[Em,vd];case"Object":return[Rb,vd];case"Date":return[nT,vd];case"RegExp":return[rT,vd];case"Map":return[iT,vd];case"Set":return[oT,vd];case"DataView":return[Em,n]}return n.includes("Array")?[Em,n]:n.includes("Error")?[kK,n]:[Rb,n]},oy=([e,t])=>e===Y0&&(t==="function"||t==="symbol"),lAe=(e,t,n,r)=>{const i=(a,l)=>{const d=r.push(a)-1;return n.set(l,d),d},o=a=>{if(n.has(a))return n.get(a);let[l,d]=im(a);switch(l){case Y0:{let m=a;switch(d){case"bigint":l=EK,m=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);m=null;break;case"undefined":return i([CK],a)}return i([l,m],a)}case Em:{if(d){let v=a;return d==="DataView"?v=new Uint8Array(a.buffer):d==="ArrayBuffer"&&(v=new Uint8Array(a)),i([d,[...v]],a)}const m=[],h=i([l,m],a);for(const v of a)m.push(o(v));return h}case Rb:{if(d)switch(d){case"BigInt":return i([d,a.toString()],a);case"Boolean":case"Number":case"String":return i([d,a.valueOf()],a)}if(t&&"toJSON"in a)return o(a.toJSON());const m=[],h=i([l,m],a);for(const v of sAe(a))(e||!oy(im(a[v])))&&m.push([o(v),o(a[v])]);return h}case nT:return i([l,a.toISOString()],a);case rT:{const{source:m,flags:h}=a;return i([l,{source:m,flags:h}],a)}case iT:{const m=[],h=i([l,m],a);for(const[v,y]of a)(e||!(oy(im(v))||oy(im(y))))&&m.push([o(v),o(y)]);return h}case oT:{const m=[],h=i([l,m],a);for(const v of a)(e||!oy(im(v)))&&m.push(o(v));return h}}const{message:f}=a;return i([l,{name:d,message:f}],a)};return o},zM=(e,{json:t,lossy:n}={})=>{const r=[];return lAe(!(t||n),!!t,new Map,r)(e),r},Ib=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?MM(zM(e,t)):structuredClone(e):(e,t)=>MM(zM(e,t));function cAe(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function uAe(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function dAe(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||cAe,r=e.options.footnoteBackLabel||uAe,i=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let d=-1;for(;++d<e.footnoteOrder.length;){const f=e.footnoteById.get(e.footnoteOrder[d]);if(!f)continue;const m=e.all(f),h=String(f.identifier).toUpperCase(),v=Hf(h.toLowerCase());let y=0;const x=[],S=e.footnoteCounts.get(h);for(;S!==void 0&&++y<=S;){x.length>0&&x.push({type:"text",value:" "});let E=typeof n=="string"?n:n(d,y);typeof E=="string"&&(E={type:"text",value:E}),x.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+v+(y>1?"-"+y:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(d,y),className:["data-footnote-backref"]},children:Array.isArray(E)?E:[E]})}const C=m[m.length-1];if(C&&C.type==="element"&&C.tagName==="p"){const E=C.children[C.children.length-1];E&&E.type==="text"?E.value+=" ":C.children.push({type:"text",value:" "}),C.children.push(...x)}else m.push(...x);const k={type:"element",tagName:"li",properties:{id:t+"fn-"+v},children:e.wrap(m,!0)};e.patch(f,k),l.push(k)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...Ib(a),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
184
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!0)},{type:"text",value:`
185
+ `}]}}const jK=(function(e){if(e==null)return hAe;if(typeof e=="function")return W0(e);if(typeof e=="object")return Array.isArray(e)?fAe(e):pAe(e);if(typeof e=="string")return mAe(e);throw new Error("Expected function, string, or object as test")});function fAe(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=jK(e[n]);return W0(r);function r(...i){let o=-1;for(;++o<t.length;)if(t[o].apply(this,i))return!0;return!1}}function pAe(e){const t=e;return W0(n);function n(r){const i=r;let o;for(o in e)if(i[o]!==t[o])return!1;return!0}}function mAe(e){return W0(t);function t(n){return n&&n.type===e}}function W0(e){return t;function t(n,r,i){return!!(gAe(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function hAe(){return!0}function gAe(e){return e!==null&&typeof e=="object"&&"type"in e}const RK=[],vAe=!0,LM=!1,yAe="skip";function bAe(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const o=jK(i),a=r?-1:1;l(e,void 0,[])();function l(d,f,m){const h=d&&typeof d=="object"?d:{};if(typeof h.type=="string"){const y=typeof h.tagName=="string"?h.tagName:typeof h.name=="string"?h.name:void 0;Object.defineProperty(v,"name",{value:"node ("+(d.type+(y?"<"+y+">":""))+")"})}return v;function v(){let y=RK,x,S,C;if((!t||o(d,f,m[m.length-1]||void 0))&&(y=xAe(n(d,m)),y[0]===LM))return y;if("children"in d&&d.children){const k=d;if(k.children&&y[0]!==yAe)for(S=(r?k.children.length:-1)+a,C=m.concat(k);S>-1&&S<k.children.length;){const E=k.children[S];if(x=l(E,S,C)(),x[0]===LM)return x;S=typeof x[1]=="number"?x[1]:S+a}}return y}}}function xAe(e){return Array.isArray(e)?e:typeof e=="number"?[vAe,e]:e==null?RK:[e]}function IK(e,t,n,r){let i,o,a;typeof t=="function"&&typeof n!="function"?(o=void 0,a=t,i=n):(o=t,a=n,i=r),bAe(e,o,l,i);function l(d,f){const m=f[f.length-1],h=m?m.children.indexOf(d):void 0;return a(d,h,m)}}const Fk={}.hasOwnProperty,wAe={};function SAe(e,t){const n=t||wAe,r=new Map,i=new Map,o=new Map,a={...iAe,...n.handlers},l={all:f,applyData:CAe,definitionById:r,footnoteById:i,footnoteCounts:o,footnoteOrder:[],handlers:a,one:d,options:n,patch:_Ae,wrap:EAe};return IK(e,function(m){if(m.type==="definition"||m.type==="footnoteDefinition"){const h=m.type==="definition"?r:i,v=String(m.identifier).toUpperCase();h.has(v)||h.set(v,m)}}),l;function d(m,h){const v=m.type,y=l.handlers[v];if(Fk.call(l.handlers,v)&&y)return y(l,m,h);if(l.options.passThrough&&l.options.passThrough.includes(v)){if("children"in m){const{children:S,...C}=m,k=Ib(C);return k.children=l.all(m),k}return Ib(m)}return(l.options.unknownHandler||kAe)(l,m,h)}function f(m){const h=[];if("children"in m){const v=m.children;let y=-1;for(;++y<v.length;){const x=l.one(v[y],m);if(x){if(y&&v[y-1].type==="break"&&(!Array.isArray(x)&&x.type==="text"&&(x.value=FM(x.value)),!Array.isArray(x)&&x.type==="element")){const S=x.children[0];S&&S.type==="text"&&(S.value=FM(S.value))}Array.isArray(x)?h.push(...x):h.push(x)}}}return h}}function _Ae(e,t){e.position&&(t.position=aIe(e))}function CAe(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,o=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const a="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:a}}n.type==="element"&&o&&Object.assign(n.properties,Ib(o)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function kAe(e,t){const n=t.data||{},r="value"in t&&!(Fk.call(n,"hProperties")||Fk.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function EAe(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
186
+ `});++r<e.length;)r&&n.push({type:"text",value:`
187
+ `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
188
+ `}),n}function FM(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function UM(e,t){const n=SAe(e,t),r=n.one(e,void 0),i=dAe(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:`
189
+ `},i),o}function jAe(e,t){return e&&"run"in e?async function(n,r){const i=UM(n,{file:r,...t});await e.run(i,r)}:function(n,r){return UM(n,{file:r,...e||t})}}function VM(e){if(e)throw e}var U1,BM;function RAe(){if(BM)return U1;BM=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(f){return typeof Array.isArray=="function"?Array.isArray(f):t.call(f)==="[object Array]"},o=function(f){if(!f||t.call(f)!=="[object Object]")return!1;var m=e.call(f,"constructor"),h=f.constructor&&f.constructor.prototype&&e.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!m&&!h)return!1;var v;for(v in f);return typeof v>"u"||e.call(f,v)},a=function(f,m){n&&m.name==="__proto__"?n(f,m.name,{enumerable:!0,configurable:!0,value:m.newValue,writable:!0}):f[m.name]=m.newValue},l=function(f,m){if(m==="__proto__")if(e.call(f,m)){if(r)return r(f,m).value}else return;return f[m]};return U1=function d(){var f,m,h,v,y,x,S=arguments[0],C=1,k=arguments.length,E=!1;for(typeof S=="boolean"&&(E=S,S=arguments[1]||{},C=2),(S==null||typeof S!="object"&&typeof S!="function")&&(S={});C<k;++C)if(f=arguments[C],f!=null)for(m in f)h=l(S,m),v=l(f,m),S!==v&&(E&&v&&(o(v)||(y=i(v)))?(y?(y=!1,x=h&&i(h)?h:[]):x=h&&o(h)?h:{},a(S,{name:m,newValue:d(E,x,v)})):typeof v<"u"&&a(S,{name:m,newValue:v}));return S},U1}var IAe=RAe();const V1=hf(IAe);function Uk(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function TAe(){const e=[],t={run:n,use:r};return t;function n(...i){let o=-1;const a=i.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);l(null,...i);function l(d,...f){const m=e[++o];let h=-1;if(d){a(d);return}for(;++h<i.length;)(f[h]===null||f[h]===void 0)&&(f[h]=i[h]);i=f,m?NAe(m,l)(...f):a(null,...f)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function NAe(e,t){let n;return r;function r(...a){const l=e.length>a.length;let d;l&&a.push(i);try{d=e.apply(this,a)}catch(f){const m=f;if(l&&n)throw m;return i(m)}l||(d&&d.then&&typeof d.then=="function"?d.then(o,i):d instanceof Error?i(d):o(d))}function i(a,...l){n||(n=!0,t(a,...l))}function o(a){i(null,a)}}const ga={basename:AAe,dirname:OAe,extname:DAe,join:$Ae,sep:"/"};function AAe(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');sg(e);let n=0,r=-1,i=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let a=-1,l=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else a<0&&(o=!0,a=i+1),l>-1&&(e.codePointAt(i)===t.codePointAt(l--)?l<0&&(r=i):(l=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function OAe(e){if(sg(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function DAe(e){sg(e);let t=e.length,n=-1,r=0,i=-1,o=0,a;for(;t--;){const l=e.codePointAt(t);if(l===47){if(a){r=t+1;break}continue}n<0&&(a=!0,n=t+1),l===46?i<0?i=t:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function $Ae(...e){let t=-1,n;for(;++t<e.length;)sg(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":PAe(n)}function PAe(e){sg(e);const t=e.codePointAt(0)===47;let n=MAe(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function MAe(e,t){let n="",r=0,i=-1,o=0,a=-1,l,d;for(;++a<=e.length;){if(a<e.length)l=e.codePointAt(a);else{if(l===47)break;l=47}if(l===47){if(!(i===a-1||o===1))if(i!==a-1&&o===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(d=n.lastIndexOf("/"),d!==n.length-1){d<0?(n="",r=0):(n=n.slice(0,d),r=n.length-1-n.lastIndexOf("/")),i=a,o=0;continue}}else if(n.length>0){n="",r=0,i=a,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,a):n=e.slice(i+1,a),r=a-i-1;i=a,o=0}else l===46&&o>-1?o++:o=-1}return n}function sg(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const zAe={cwd:LAe};function LAe(){return"/"}function Vk(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function FAe(e){if(typeof e=="string")e=new URL(e);else if(!Vk(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return UAe(e)}function UAe(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const B1=["history","path","basename","stem","extname","dirname"];class TK{constructor(t){let n;t?Vk(t)?n={path:t}:typeof t=="string"||VAe(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":zAe.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<B1.length;){const o=B1[r];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let i;for(i in n)B1.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?ga.basename(this.path):void 0}set basename(t){q1(t,"basename"),H1(t,"basename"),this.path=ga.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?ga.dirname(this.path):void 0}set dirname(t){HM(this.basename,"dirname"),this.path=ga.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?ga.extname(this.path):void 0}set extname(t){if(H1(t,"extname"),HM(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=ga.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Vk(t)&&(t=FAe(t)),q1(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?ga.basename(this.path,this.extname):void 0}set stem(t){q1(t,"stem"),H1(t,"stem"),this.path=ga.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new Br(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function H1(e,t){if(e&&e.includes(ga.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+ga.sep+"`")}function q1(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function HM(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function VAe(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const BAe=(function(e){const r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o}),HAe={}.hasOwnProperty;class aT extends BAe{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=TAe()}copy(){const t=new aT;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(V1(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Z1("data",this.frozen),this.namespace[t]=n,this):HAe.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Z1("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=ay(t),r=this.parser||this.Parser;return K1("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),K1("process",this.parser||this.Parser),G1("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(o,a){const l=ay(t),d=r.parse(l);r.run(d,l,function(m,h,v){if(m||!h||!v)return f(m);const y=h,x=r.stringify(y,v);GAe(x)?v.value=x:v.result=x,f(m,v)});function f(m,h){m||!h?a(m):o?o(h):n(void 0,h)}}}processSync(t){let n=!1,r;return this.freeze(),K1("processSync",this.parser||this.Parser),G1("processSync",this.compiler||this.Compiler),this.process(t,i),KM("processSync","process",n),r;function i(o,a){n=!0,VM(o),r=a}}run(t,n,r){qM(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?o(void 0,r):new Promise(o);function o(a,l){const d=ay(n);i.run(t,d,f);function f(m,h,v){const y=h||t;m?l(m):a?a(y):r(void 0,y,v)}}}runSync(t,n){let r=!1,i;return this.run(t,n,o),KM("runSync","run",r),i;function o(a,l){VM(a),i=l,r=!0}}stringify(t,n){this.freeze();const r=ay(n),i=this.compiler||this.Compiler;return G1("stringify",i),qM(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Z1("use",this.frozen),t!=null)if(typeof t=="function")d(t,n);else if(typeof t=="object")Array.isArray(t)?l(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(f){if(typeof f=="function")d(f,[]);else if(typeof f=="object")if(Array.isArray(f)){const[m,...h]=f;d(m,h)}else a(f);else throw new TypeError("Expected usable value, not `"+f+"`")}function a(f){if(!("plugins"in f)&&!("settings"in f))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");l(f.plugins),f.settings&&(i.settings=V1(!0,i.settings,f.settings))}function l(f){let m=-1;if(f!=null)if(Array.isArray(f))for(;++m<f.length;){const h=f[m];o(h)}else throw new TypeError("Expected a list of plugins, not `"+f+"`")}function d(f,m){let h=-1,v=-1;for(;++h<r.length;)if(r[h][0]===f){v=h;break}if(v===-1)r.push([f,...m]);else if(m.length>0){let[y,...x]=m;const S=r[v][1];Uk(S)&&Uk(y)&&(y=V1(!0,S,y)),r[v]=[f,y,...x]}}}}const qAe=new aT().freeze();function K1(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function G1(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Z1(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function qM(e){if(!Uk(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function KM(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function ay(e){return KAe(e)?e:new TK(e)}function KAe(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function GAe(e){return typeof e=="string"||ZAe(e)}function ZAe(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const YAe="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",GM=[],ZM={allowDangerousHtml:!0},WAe=/^(https?|ircs?|mailto|xmpp)$/i,XAe=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function JAe(e){const t=QAe(e),n=eOe(e);return tOe(t.runSync(t.parse(n),n),e)}function QAe(e){const t=e.rehypePlugins||GM,n=e.remarkPlugins||GM,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...ZM}:ZM;return qAe().use(ANe).use(n).use(jAe,r).use(t)}function eOe(e){const t=e.children||"",n=new TK;return typeof t=="string"&&(n.value=t),n}function tOe(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,o=t.disallowedElements,a=t.skipHtml,l=t.unwrapDisallowed,d=t.urlTransform||nOe;for(const m of XAe)Object.hasOwn(t,m.from)&&(""+m.from+(m.to?"use `"+m.to+"` instead":"remove it")+YAe+m.id,void 0);return IK(e,f),dIe(e,{Fragment:c.Fragment,components:i,ignoreInvalidStyle:!0,jsx:c.jsx,jsxs:c.jsxs,passKeys:!0,passNode:!0});function f(m,h,v){if(m.type==="raw"&&v&&typeof h=="number")return a?v.children.splice(h,1):v.children[h]={type:"text",value:m.value},h;if(m.type==="element"){let y;for(y in z1)if(Object.hasOwn(z1,y)&&Object.hasOwn(m.properties,y)){const x=m.properties[y],S=z1[y];(S===null||S.includes(m.tagName))&&(m.properties[y]=d(String(x||""),y,m))}}if(m.type==="element"){let y=n?!n.includes(m.tagName):o?o.includes(m.tagName):!1;if(!y&&r&&typeof h=="number"&&(y=!r(m,h,v)),y&&v&&typeof h=="number")return l&&m.children?v.children.splice(h,1,...m.children):v.children.splice(h,1),h}}}function nOe(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||WAe.test(e.slice(0,t))?e:""}var rOe="Separator",YM="horizontal",iOe=["horizontal","vertical"],NK=b.forwardRef((e,t)=>{const{decorative:n,orientation:r=YM,...i}=e,o=oOe(r)?r:YM,l=n?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return c.jsx(E6.div,{"data-orientation":o,...l,...i,ref:t})});NK.displayName=rOe;function oOe(e){return iOe.includes(e)}var aOe=NK;function X0({className:e,orientation:t="horizontal",decorative:n=!0,...r}){return c.jsx(aOe,{"data-slot":"separator-root",decorative:n,orientation:t,className:Ve("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...r})}var J0="Tabs",[sOe]=Ti(J0,[zf]),AK=zf(),[lOe,sT]=sOe(J0),OK=b.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:i,defaultValue:o,orientation:a="horizontal",dir:l,activationMode:d="automatic",...f}=e,m=lu(l),[h,v]=Mo({prop:r,onChange:i,defaultProp:o??"",caller:J0});return c.jsx(lOe,{scope:n,baseId:Zi(),value:h,onValueChange:v,orientation:a,dir:m,activationMode:d,children:c.jsx(Ge.div,{dir:m,"data-orientation":a,...f,ref:t})})});OK.displayName=J0;var DK="TabsList",$K=b.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...i}=e,o=sT(DK,n),a=AK(n);return c.jsx(SI,{asChild:!0,...a,orientation:o.orientation,dir:o.dir,loop:r,children:c.jsx(Ge.div,{role:"tablist","aria-orientation":o.orientation,...i,ref:t})})});$K.displayName=DK;var PK="TabsTrigger",MK=b.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:i=!1,...o}=e,a=sT(PK,n),l=AK(n),d=FK(a.baseId,r),f=UK(a.baseId,r),m=r===a.value;return c.jsx(_I,{asChild:!0,...l,focusable:!i,active:m,children:c.jsx(Ge.button,{type:"button",role:"tab","aria-selected":m,"aria-controls":f,"data-state":m?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:d,...o,ref:t,onMouseDown:Oe(e.onMouseDown,h=>{!i&&h.button===0&&h.ctrlKey===!1?a.onValueChange(r):h.preventDefault()}),onKeyDown:Oe(e.onKeyDown,h=>{[" ","Enter"].includes(h.key)&&a.onValueChange(r)}),onFocus:Oe(e.onFocus,()=>{const h=a.activationMode!=="manual";!m&&!i&&h&&a.onValueChange(r)})})})});MK.displayName=PK;var zK="TabsContent",LK=b.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:i,children:o,...a}=e,l=sT(zK,n),d=FK(l.baseId,r),f=UK(l.baseId,r),m=r===l.value,h=b.useRef(m);return b.useEffect(()=>{const v=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(v)},[]),c.jsx(lr,{present:i||m,children:({present:v})=>c.jsx(Ge.div,{"data-state":m?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":d,hidden:!v,id:f,tabIndex:0,...a,ref:t,style:{...e.style,animationDuration:h.current?"0s":void 0},children:v&&o})})});LK.displayName=zK;function FK(e,t){return`${e}-trigger-${t}`}function UK(e,t){return`${e}-content-${t}`}var cOe=OK,uOe=$K,dOe=MK,fOe=LK;function Bk({className:e,...t}){return c.jsx(cOe,{"data-slot":"tabs",className:Ve("flex flex-col gap-2",e),...t})}function Hk({className:e,...t}){return c.jsx(uOe,{"data-slot":"tabs-list",className:Ve("text-muted-foreground inline-flex w-fit items-center justify-center rounded-full bg-gray-950 p-1",e),...t})}function ll({className:e,...t}){return c.jsx(dOe,{"data-slot":"tabs-trigger",className:Ve("data-[state=active]:text-white data-[state=active]:bg-gray-600 dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring focus-visible:ring-[3px] focus-visible:outline-1 text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 border rounded-full border-transparent px-2 py-1 font-medium whitespace-nowrap transition-[color,box-shadow] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}function cl({className:e,...t}){return c.jsx(fOe,{"data-slot":"tabs-content",className:Ve("flex-1 outline-none",e),...t})}function VK(e,t,n){for(const r of e)if(r[t]===n)return r}function pOe(e){const{user:t}=_s(),n=hx(),{instance:r,cluster:i}=Bb({strict:!1}),o=n.instanceClient.defaults.baseURL;return b.useMemo(()=>{const a=N0(e),l=[t?.username&&` --deploymentUsername="${t?.username}"`,o&&` --deploymentURL="${o}"`].filter(Lo).join("");return[{title:"Install or update the Harper CLI",code:"npm install -g harperdb"},{title:"Create your awesome app",code:`npm create harper ${a}${l.length?" --":""}${l}`,note:"You will be asked some easy questions to get you started. To make deployments easy, enter your password for this cluster. It will get saved into your local .env file."},{title:"Start local Harper instance",code:"npm run dev",note:"You will be prompted to configure Harper."},{title:"Learn, make changes, grow!",code:"cat AGENTS.md"},{title:"Deploy!",code:"npm run deploy",note:"Remember that .env file? It makes this deployment easy!"}]},[e,o,t?.username])}function mOe({defaultApplicationName:e,formState:t,watch:n}){const r=n("applicationName")||e,i=pOe(r),o=Xh(...i.map(a=>a.code));return c.jsxs(c.Fragment,{children:[c.jsxs(Ol,{children:[c.jsx(Dl,{children:"Deploy with Harper CLI"}),c.jsx(nu,{children:"Follow these steps to deploy your application using the Harper CLI"})]}),c.jsxs(Cs,{className:"space-y-6",children:[i.map((a,l)=>c.jsxs("div",{className:"space-y-3",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("div",{className:"w-6 h-6 rounded-full bg-primary text-primary-foreground flex items-center justify-center shrink-0",children:l+1}),c.jsx("h3",{children:a.title})]}),c.jsxs("div",{className:"ml-8",children:[c.jsxs("div",{className:"bg-black rounded-lg p-4 flex items-center justify-between group",children:[c.jsx("code",{className:"text-sm overflow-auto pl-8 -indent-8 wrap-anywhere",children:a.code}),c.jsx(he,{type:"button",variant:"default",size:"sm",onClick:o[l],children:c.jsx(Uc,{className:"w-4 h-4"})})]}),a.note&&c.jsx("p",{className:"text-muted-foreground text-sm mt-2",children:a.note})]}),c.jsx(X0,{className:"bg-black"})]},a.title)),r&&c.jsxs("div",{className:"bg-accent rounded-lg p-4",children:[c.jsxs("p",{className:"text-sm",children:[c.jsx("strong",{children:"Application Name:"})," ",r]}),c.jsx("p",{className:"text-muted-foreground text-sm mt-2",children:"Your application will be deployed with this name"})]}),c.jsxs(he,{className:"w-full",variant:"secondary",disabled:!t.isValid,children:[c.jsx(hE,{className:"w-4 h-4 mr-2"}),"I Have Completed These Steps"]})]})]})}function hOe({control:e,defaultApplicationName:t}){return c.jsxs(c.Fragment,{children:[c.jsxs(Ol,{children:[c.jsx(Dl,{children:"Application Name"}),c.jsx(nu,{children:"Choose a name for your new API application"})]}),c.jsx(Cs,{children:c.jsxs("div",{className:"space-y-2",children:[c.jsx(Ne,{control:e,name:"applicationName",render:({field:n})=>c.jsxs(je,{children:[c.jsx(Re,{className:"pb-1",children:"Name"}),c.jsx(Te,{children:c.jsx(ze,{type:"text",autoCapitalize:"words",autoComplete:"off",autoFocus:!0,placeholder:t,...n})}),c.jsx(Ie,{})]})}),c.jsx("p",{className:"text-muted-foreground text-sm",children:"Use lowercase letters, numbers, underscores, and hyphens"})]})})]})}const gOe=Hb("relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90"}},defaultVariants:{variant:"default"}});function BK({className:e,variant:t,...n}){return c.jsx("div",{"data-slot":"alert",role:"alert",className:Ve(gOe({variant:t}),e),...n})}function vOe({className:e,...t}){return c.jsx("div",{"data-slot":"alert-title",className:Ve("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",e),...t})}function HK({className:e,...t}){return c.jsx("div",{"data-slot":"alert-description",className:Ve("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",e),...t})}function yOe({control:e,formState:t,isImportingApplication:n,setValue:r,watch:i}){const o=i("contents.source"),a=b.useCallback(l=>{r("contents.source",l)},[r]);return c.jsxs(c.Fragment,{children:[c.jsxs(Ol,{children:[c.jsx(Dl,{children:"Import Existing Application"}),c.jsx(nu,{children:"Import from Git, NPM, or a tarball URL"})]}),c.jsxs(Cs,{className:"space-y-6",children:[c.jsxs(Bk,{value:o,onValueChange:a,children:[c.jsxs(Hk,{className:"grid w-full grid-cols-3",children:[c.jsxs(ll,{value:"git",children:[c.jsx(vE,{className:"w-4 h-4 mr-2"}),"Git"]}),c.jsxs(ll,{value:"npm",children:[c.jsx(yE,{className:"w-4 h-4 mr-2"}),"NPM"]}),c.jsxs(ll,{value:"tarball",children:[c.jsx(une,{className:"w-4 h-4 mr-2"}),"Tarball"]})]}),c.jsx(cl,{value:"git",className:"space-y-4 mt-4",children:c.jsx("div",{className:"space-y-2",children:c.jsx(Ne,{control:e,name:"contents.ref",render:({field:l})=>c.jsxs(je,{children:[c.jsx(Re,{className:"pb-1",children:"Git Repository URL"}),c.jsx(Te,{children:c.jsx(ze,{type:"text",autoCapitalize:"none",autoComplete:"off",autoFocus:!0,...l})}),c.jsx(Ie,{})]})})})}),c.jsx(cl,{value:"npm",className:"space-y-4 mt-4",children:c.jsx("div",{className:"space-y-2",children:c.jsx(Ne,{control:e,name:"contents.ref",render:({field:l})=>c.jsxs(je,{children:[c.jsx(Re,{className:"pb-1",children:"NPM Package Reference"}),c.jsx(Te,{children:c.jsx(ze,{type:"text",autoCapitalize:"none",autoComplete:"off",autoFocus:!0,...l})}),c.jsx(Ie,{})]})})})}),c.jsx(cl,{value:"tarball",className:"space-y-4 mt-4",children:c.jsx("div",{className:"space-y-2",children:c.jsx(Ne,{control:e,name:"contents.ref",render:({field:l})=>c.jsxs(je,{children:[c.jsx(Re,{className:"pb-1",children:"Tarball URL"}),c.jsx(Te,{children:c.jsx(ze,{type:"url",autoCapitalize:"none",autoComplete:"off",autoFocus:!0,...l})}),c.jsx(Ie,{})]})})})})]}),c.jsx(Ne,{control:e,name:"contents.installCommand",render:({field:l})=>c.jsxs(je,{children:[c.jsx(Re,{className:"pb-1",children:"Install Command"}),c.jsx(Te,{children:c.jsx(ze,{type:"text",autoCapitalize:"none",autoComplete:"off",placeholder:"npm install",...l})}),c.jsx(Ie,{})]})}),c.jsx(Re,{children:"Authorization"}),c.jsx(Ne,{control:e,name:"contents.requiresAuth",render:({field:l})=>c.jsxs(Bk,{className:"w-full pt-2 pb-0 mb-0",value:String(l.value),onValueChange:d=>l.onChange(d==="true"),children:[c.jsxs(Hk,{className:"grid w-full grid-cols-2",children:[c.jsx(ll,{value:"false",children:"Public Access"}),c.jsx(ll,{value:"true",children:"Requires Auth"})]}),c.jsx(cl,{value:"false",className:"space-y-4 mt-4"}),c.jsx(cl,{value:"true",className:"space-y-4 mt-4",children:c.jsx(BK,{children:c.jsx(HK,{children:c.jsxs("span",{children:["You can manage your certificates over in"," ",c.jsx(Ye,{to:"config",className:"underline",children:"Config"})," ",">"," ",c.jsx(Ye,{to:"config/ssh-keys",className:"underline",children:"SSH Keys"}),". This enables SSH based auth for private repos, i.e. following the pattern of"," ",c.jsx("a",{href:"https://github.com/HarperFast/Studio",target:"_blank",rel:"noreferrer",className:"underline",children:"git@github.com:HarperFast/studio.git"}),". If you have more than one key, make sure to utilize unique hostnames!"]})})})})]})}),c.jsx(X0,{className:"bg-black"}),c.jsxs(he,{className:"w-full",disabled:!t.isValid||n,children:[c.jsx(W4,{className:"w-4 h-4 mr-2"}),"Import Application"]})]})]})}const lT=[{id:"harper",name:"Web + REST ORM",description:"Define your entities in schema.graphql, add your HTML/CSS/JS in web, and you're cooking!",tags:["Harper","ORM","REST","GraphQL"],npm:"@harperfast/template-vanilla-studio",githubUrl:"https://github.com/HarperFast/create-harper/tree/main/template-vanilla"},{id:"harper-ts",name:"TypeScript",description:"The same Web + REST ORM from the first template, but with TypeScript sprinkled in.",tags:["Harper","TypeScript","GraphQL"],npm:"@harperfast/template-vanilla-ts-studio",githubUrl:"https://github.com/HarperFast/create-harper/tree/main/template-vanilla-ts"}],bOe=Mt({type:Vl("template"),id:Xe("Please select a template.")}),xOe={type:"template",id:lT[0].id},wOe=Mt({type:Vl("import"),source:Ul(["git","npm","tarball"]),ref:Xe().nonempty("Please enter a URL or package reference."),installCommand:Xe(),requiresAuth:Xt()}),SOe={type:"import",source:"git",ref:"",requiresAuth:!1,installCommand:""},_Oe=Mt({type:Vl("cli")}),COe={type:"cli"},kOe=Mt({applicationName:Xe().trim().max(75,{error:"Application name cannot be longer than 75 characters."}).regex(/^[a-zA-Z0-9-_]*$/,{error:"Can only contain letters, numbers, dashes and underscores."}),contents:PR("type",[bOe,wOe,_Oe])});var cT="Radio",[EOe,qK]=Ti(cT),[jOe,ROe]=EOe(cT),KK=b.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:i=!1,required:o,disabled:a,value:l="on",onCheck:d,form:f,...m}=e,[h,v]=b.useState(null),y=ft(t,C=>v(C)),x=b.useRef(!1),S=h?f||!!h.closest("form"):!0;return c.jsxs(jOe,{scope:n,checked:i,disabled:a,children:[c.jsx(Ge.button,{type:"button",role:"radio","aria-checked":i,"data-state":WK(i),"data-disabled":a?"":void 0,disabled:a,value:l,...m,ref:y,onClick:Oe(e.onClick,C=>{i||d?.(),S&&(x.current=C.isPropagationStopped(),x.current||C.stopPropagation())})}),S&&c.jsx(YK,{control:h,bubbles:!x.current,name:r,value:l,checked:i,required:o,disabled:a,form:f,style:{transform:"translateX(-100%)"}})]})});KK.displayName=cT;var GK="RadioIndicator",ZK=b.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...i}=e,o=ROe(GK,n);return c.jsx(lr,{present:r||o.checked,children:c.jsx(Ge.span,{"data-state":WK(o.checked),"data-disabled":o.disabled?"":void 0,...i,ref:t})})});ZK.displayName=GK;var IOe="RadioBubbleInput",YK=b.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...i},o)=>{const a=b.useRef(null),l=ft(a,o),d=mx(n),f=ej(t);return b.useEffect(()=>{const m=a.current;if(!m)return;const h=window.HTMLInputElement.prototype,y=Object.getOwnPropertyDescriptor(h,"checked").set;if(d!==n&&y){const x=new Event("click",{bubbles:r});y.call(m,n),m.dispatchEvent(x)}},[d,n,r]),c.jsx(Ge.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:l,style:{...i.style,...f,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});YK.displayName=IOe;function WK(e){return e?"checked":"unchecked"}var TOe=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Q0="RadioGroup",[NOe]=Ti(Q0,[zf,qK]),XK=zf(),JK=qK(),[AOe,OOe]=NOe(Q0),QK=b.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:i,value:o,required:a=!1,disabled:l=!1,orientation:d,dir:f,loop:m=!0,onValueChange:h,...v}=e,y=XK(n),x=lu(f),[S,C]=Mo({prop:o,defaultProp:i??null,onChange:h,caller:Q0});return c.jsx(AOe,{scope:n,name:r,required:a,disabled:l,value:S,onValueChange:C,children:c.jsx(SI,{asChild:!0,...y,orientation:d,dir:x,loop:m,children:c.jsx(Ge.div,{role:"radiogroup","aria-required":a,"aria-orientation":d,"data-disabled":l?"":void 0,dir:x,...v,ref:t})})})});QK.displayName=Q0;var eG="RadioGroupItem",tG=b.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...i}=e,o=OOe(eG,n),a=o.disabled||r,l=XK(n),d=JK(n),f=b.useRef(null),m=ft(t,f),h=o.value===i.value,v=b.useRef(!1);return b.useEffect(()=>{const y=S=>{TOe.includes(S.key)&&(v.current=!0)},x=()=>v.current=!1;return document.addEventListener("keydown",y),document.addEventListener("keyup",x),()=>{document.removeEventListener("keydown",y),document.removeEventListener("keyup",x)}},[]),c.jsx(_I,{asChild:!0,...l,focusable:!a,active:h,children:c.jsx(KK,{disabled:a,required:o.required,checked:h,...d,...i,name:o.name,ref:m,onCheck:()=>o.onValueChange(i.value),onKeyDown:Oe(y=>{y.key==="Enter"&&y.preventDefault()}),onFocus:Oe(i.onFocus,()=>{v.current&&f.current?.click()})})})});tG.displayName=eG;var DOe="RadioGroupIndicator",nG=b.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,i=JK(n);return c.jsx(ZK,{...i,...r,ref:t})});nG.displayName=DOe;var $Oe=QK,POe=tG,MOe=nG;function zOe({className:e,...t}){return c.jsx($Oe,{"data-slot":"radio-group",className:Ve("grid gap-3",e),...t})}function LOe({className:e,...t}){return c.jsx(POe,{"data-slot":"radio-group-item",className:Ve("border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:c.jsx(MOe,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:c.jsx(U4,{className:"fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})})})}function rG(e){e.stopPropagation()}function FOe({control:e,formState:t,isCreatingFromTemplate:n}){return c.jsxs(c.Fragment,{children:[c.jsxs(Ol,{children:[c.jsx(Dl,{children:"Choose a Template"}),c.jsx(nu,{children:"Start with a pre-configured template for common use cases"})]}),c.jsxs(Cs,{children:[c.jsx(Ne,{control:e,name:"contents.id",render:({field:r})=>c.jsx(zOe,{value:r.value,onValueChange:r.onChange,children:c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:lT.map(i=>c.jsxs("div",{className:"relative",children:[c.jsx(LOe,{value:i.id,id:i.id,className:"peer sr-only"}),c.jsxs(Of,{htmlFor:i.id,className:"flex flex-col gap-3 p-4 border-2 rounded-lg cursor-pointer hover:bg-accent peer-data-[state=checked]:border-green peer-data-[state=checked]:bg-primary/5",children:[c.jsxs("div",{children:[c.jsxs("div",{className:"mb-1 flex items-center gap-2",children:[c.jsx("span",{children:i.name}),c.jsx("a",{href:i.githubUrl,target:"_blank",rel:"noopener noreferrer",onClick:rG,className:"text-muted-foreground hover:text-white transition-colors -m-4 p-4",children:c.jsx(vE,{className:"w-4 h-4"})})]}),c.jsx("p",{className:"text-muted-foreground text-sm",children:i.description})]}),c.jsx("div",{className:"flex flex-wrap gap-2",children:i.tags.map(o=>c.jsx(ra,{variant:"outline",children:o},o))})]})]},i.id))})})}),c.jsx(X0,{className:"my-6 bg-black"}),c.jsxs(he,{className:"w-full",disabled:!t.isValid||n,children:[c.jsx(W4,{className:"w-4 h-4 mr-2"}),"Create from Template"]})]})]})}function UOe(e){const t=hx(),{reloadRootEntries:n,setFocusedItem:r,setExpandedItems:i,setSelectedItems:o}=Vr(),a=b.useCallback(({project:l})=>{const d=ye.loading("Looking for application...",{description:"This may take a bit.",duration:3e5});e(!0),n().then(f=>{const m=f?.entries||[];for(const h of m)if(h.name.toLowerCase()===l.toLowerCase()){r(h.name),o([h.name]),i([h.name]),e(!1),ye.success("Imported successfully",{description:`${l} is now available in your ${t.entityType}!`,id:d,duration:5e3});return}ye.warning("Deployment Not Detected",{description:`I searched for ${l} but did not find it in the ${t.entityType} yet. Do you see it on the left? Did you use a different name, perhaps?`,id:d,duration:1e4}),e(!1)})},[t,e,n,r,i,o]);return b.useMemo(()=>({checkCLI:a}),[a])}async function VOe({instanceClient:e,project:t,template:n,entityType:r}){const{data:i}=await e.post("/",{operation:"add_component",project:t,template:n,replicated:r==="cluster"},{timeout:3e5});return i}function BOe(){return ot({mutationFn:VOe})}function HOe(e){const{mutate:t,isPending:n}=BOe(),r=hx(),{reloadRootEntries:i,setFocusedItem:o,setExpandedItems:a,setSelectedItems:l}=Vr(),d=b.useCallback(({contents:f,project:m})=>{const h=ye.loading("Creating from template...",{description:"This may take a bit.",duration:3e5}),v=VK(lT,"id",f.id);if(!v)return ye.error("Template Not Found",{description:"Please select a template",duration:1e4,id:h});t({project:m,template:v.npm||v.githubUrl,...r},{onSuccess:()=>{ye.success("Created successfully!",{description:`${m} will be available once you restart your ${r.entityType}!`,id:h,duration:5e3}),e(!0),i(),o(m),l([m]),a([m])}})},[t,r,e,i,o,a,l]);return b.useMemo(()=>({isCreatingFromTemplate:n,createFromTemplate:d}),[n,d])}async function qOe({applicationName:e,applicationUrl:t,installCommand:n,entityType:r,instanceClient:i}){const{data:o}=await i.post("/",{operation:"deploy_component",package:t,project:e,replicated:r==="cluster",install_command:n||void 0,restart:"rolling"},{timeout:3e5});return o}function iG(){return ot({mutationFn:qOe})}function KOe(e){const{mutate:t,isPending:n}=iG(),r=sr(),i=Ut(),{reloadRootEntries:o,setFocusedItem:a,setExpandedItems:l,setSelectedItems:d}=Vr(),f=b.useCallback(({contents:m,project:h})=>{const v=ye.loading("Importing application...",{description:"This may take a bit.",duration:3e5});t({applicationName:h,applicationUrl:m.ref,installCommand:m.installCommand,...i},{onSuccess:()=>{ye.success("Imported successfully",{description:`${h} will be available once you restart your ${i.entityType}!`,id:v,duration:5e3}),e(!0),r.invalidateQueries({queryKey:[i.entityId]}),o(),a(h),d([h]),l([h])},onError:()=>{ye.dismiss(v)}})},[t,r,i,e,o,a,l,d]);return b.useMemo(()=>({isImportingApplication:n,importApplication:f}),[n,f])}function GOe(){const{rootEntries:e}=Vr(),{organization:t,instance:n,cluster:r}=Bb({strict:!1}),i=b.useMemo(()=>{const N=N0(r?.name||n?.name||t?.name||"");if(N==="")return N;let D=N,L=1;for(;VK(e,"name",D);)L+=1,D=`${N}-${L}`;return D},[e,r,n,t]),o=b.useCallback((N,D)=>{!N.applicationName&&!i?D.addIssue({code:"custom",path:["applicationName"],message:"Please name your application!"}):e.find(L=>L.name===N.applicationName)&&D.addIssue({code:"custom",path:["applicationName"],message:"That application name is already in use!"})},[i,e]),a=Qt({resolver:an(kOe.superRefine(o)),defaultValues:{applicationName:"",contents:{...SOe,...COe,...xOe}}}),{watch:l,handleSubmit:d,control:f,setValue:m,formState:h,trigger:v}=a,[y,x]=b.useState(!1),{isCreatingFromTemplate:S,createFromTemplate:C}=HOe(x),{isImportingApplication:k,importApplication:E}=KOe(x),{checkCLI:j}=UOe(x),I=b.useCallback(N=>{const D=N.applicationName||i;switch(N.contents.type){case"template":{C({contents:N.contents,project:D});break}case"import":{E({contents:N.contents,project:D});break}case"cli":{j({contents:N.contents,project:D});break}}},[j,C,i,E]),A=l("contents.type"),T=b.useCallback(N=>{const D=h.isValid;m("contents.type",N),D||v()},[m,h,v]);return c.jsxs("div",{className:"mx-auto max-w-4xl mt-6",children:[c.jsxs("div",{className:"text-center",children:[c.jsx("h1",{className:"text-4xl pt-4 pb-2",children:"Bootstrap New API Application"}),c.jsx("p",{className:"text-muted-foreground",children:"Create a new application from templates, import existing code, or deploy with Harper CLI"})]}),c.jsx(en,{...a,children:c.jsx("form",{onSubmit:d(I),className:"flex flex-col gap-4 p-4",children:c.jsxs("fieldset",{disabled:k||S||y,children:[c.jsx(Lc,{className:"bg-black-dark",children:c.jsx(hOe,{control:f,defaultApplicationName:i})}),c.jsx(Lc,{className:"bg-black-dark mt-4 pt-0",children:c.jsxs(Bk,{defaultValue:A,onValueChange:T,children:[c.jsxs(Hk,{className:"w-full grid grid-cols-3 mt-0",children:[c.jsxs(ll,{value:"template",children:[c.jsx(pte,{}),c.jsx("span",{className:"hidden sm:inline-block",children:"Templates"})]}),c.jsxs(ll,{value:"import",children:[c.jsx(ene,{}),"Import"]}),c.jsxs(ll,{value:"cli",children:[c.jsx(J4,{}),c.jsx("span",{className:"hidden md:inline-block",children:"Harper"})," CLI"]})]}),c.jsx("div",{className:"mx-6 mt-1",children:c.jsx(X0,{className:"bg-black"})}),c.jsx(cl,{value:"template",className:"space-y-4",children:c.jsx(FOe,{control:f,formState:h,isCreatingFromTemplate:S})}),c.jsx(cl,{value:"import",className:"space-y-4",children:c.jsx(yOe,{control:f,formState:h,isImportingApplication:k,setValue:m,watch:l})}),c.jsx(cl,{value:"cli",className:"space-y-4",children:c.jsx(mOe,{defaultApplicationName:i,formState:h,watch:l})})]})})]})})})]})}const ZOe={js:"javascript",cjs:"javascript",jsx:"javascript",yaml:"yaml",ts:"typescript",tsx:"typescript",json:"json",md:"markdown",html:"html",css:"css",graphql:"graphql",mjs:"javascript"};function YOe(){const e=Ut(),{openedEntryContents:t,openedEntry:n,restrictPackageModification:r,isSavingFile:i,saveFile:o}=Vr(),{content:a,setContent:l}=og(!!n&&!n.package&&n.path),d=b.useCallback(C=>{l(C!==t?C:void 0)},[t,l]),f=If(),[m,h]=b.useState(null),v=q0(n?.path),y=ZOe[v]||"plaintext",x=b.useCallback((C,k)=>{h([C,k])},[]);if(b.useEffect(()=>{if(m&&f&&!n?.package&&!r)return PEe(m)},[m,f,n,r]),yb("SaveFile",()=>{n&&!i&&a!==void 0&&o({...e,file:n.path.split("/").slice(1).join("/"),payload:a,project:n.project},n.path)},[n,e,a]),yb("RevertChanges",()=>{if(t!==void 0&&m){const[C]=m;d(void 0),C.setValue(t)}},[t,m]),!n)return null;const S=i||!!n.package||!f;return c.jsx(ng,{className:"w-full min-h-full h-80",language:y,theme:"vs-dark",value:a??t,onMount:x,onChange:S?void 0:d,options:{automaticLayout:!0,minimap:{enabled:!1},readOnly:S,padding:{top:48}}})}function WOe(){const{openedEntry:e,openedEntryContents:t}=Vr(),n=PRe(e?.project);return e?.path===No?c.jsx(GOe,{}):Ir(e)?c.jsx("div",{className:"directoryReadMe max-w-3xl",children:c.jsx(JAe,{urlTransform:n,components:{code:XOe},children:t})}):p7(e?.name)?c.jsx("div",{className:"mt-9 absolute top-0 right-0 bottom-0 left-0",children:c.jsx("img",{className:"w-full h-full object-contain p-20",alt:e?.name,src:`data:image/${q0(e?.name)};base64,${t}`})}):c.jsx(YOe,{})}function XOe({inline:e,className:t,children:n}){const r=String(n??""),[i]=Xh(r);return e||!r.includes(`
190
+ `)?c.jsx("code",{className:t,children:n}):c.jsxs("code",{className:"relative",children:[c.jsx(he,{className:"absolute top-2 right-2",type:"button",variant:"default",size:"sm",onClick:i,children:c.jsx(Uc,{className:"w-4 h-4"})}),r]})}function WM(e){return new URL(e.match(/^https?:\/\//i)?e:`https://${e}`).toString()}function JOe(e){if(e?.domains){for(const t of e.domains)if(t.domain)return WM(t.domain)}return e?.fqdn?WM(e.fqdn):null}function QOe(){const{clusterId:e,instanceId:t}=nt({strict:!1}),n=dh(),{data:r}=Dt(Aa(e));return!!e&&Ct.checkForFabricConnect(e)||!!t&&Ct.checkForFabricConnect(t)||r&&!t?JOe(r):n.defaults.baseURL?n.defaults.baseURL.replace(/:9925\/?/,""):null}function eDe(e,t,n){const r=t,i=t.replace(/:9925/,"").replace(/\/?$/,"");return r&&(e=e.replaceAll(/https?:\/\/localhost:9926/g,i)),console.log("baseURL",t),console.log("operations9925URL",r),console.log("rest9926URL",i),n.project&&(e=e.replaceAll("Your New Harper Fabric App",n.project).replaceAll("your-project-name-here",n.project)),e}function tDe({entityId:e,instanceClient:t}){return{queryKey:[e,"get_components"],queryFn:async()=>{const{data:n}=await t.post("/",{operation:"get_components"});return n},retry:!1}}function oG(e,t,n,r=[]){const i=[];for(const o of e){const a=n(o,r);i.push(a);const l=o,d=l[t];d&&(a[t]=oG(d,t,n,[...r,l]))}return i}function nDe({children:e}){const t=Cn(),[n,r]=b.useState(void 0),[i,o]=b.useState(void 0),{setContent:a}=og(n?.path),l=Ut(),d=QOe(),f=sr(),{open:m}=Nr({strict:!1}),{data:h}=Ri(tDe(l)),v=b.useMemo(()=>{const F=new Set;return{rootEntries:oG(h.entries||[],"entries",($,P)=>{const V=Ir($)&&$.entries.find(X=>X.name.toLowerCase()==="readme.md"),O=[...P.map(X=>X.name),$.name].join("/");return F.add(O),{name:$.name,path:O,project:(P[0]||$)?.name,package:(P[0]||$)?.package,overviewEntry:V&&!Ir(V)&&{name:V.name,path:[...P.map(X=>X.name),$.name,V.name].join("/"),project:(P[0]||$)?.name,package:(P[0]||$)?.package}||void 0}}),pathsRegistry:F}},[h]),y=b.useCallback(async()=>f.fetchQuery({queryKey:[l.entityId,"get_components"],networkMode:"online"}),[f,l]),x=b.useCallback(F=>v.pathsRegistry.has(F),[v.pathsRegistry]),S=v.rootEntries.filter(F=>!F.package&&F.path!==No).map(F=>F.name);let C=S[0],k=S.slice(0,1);C||(C=No,k=[No]);const[E,j]=Ld(`FileFocused/${l.entityId}`,C),[I,A]=Ld(`FolderOpened/${l.entityId}`,S),[T,N]=Ld(`FileSelected/${l.entityId}`,k);b.useEffect(()=>{if(m?.length){const F=m.split("?"),ne=F[0],$=F[1],P=ne.split("/");if($){const V=$.split("=");ii(V[0],V[1]==="true"?!0:V[1]==="false"?!1:V[1])}A(V=>{const O=new Set(V);for(let X=1;X<P.length;X++)O.add(P.slice(0,X).join("/"));return[...O]}),N([ne]),j(ne),t({search:void 0})}},[t,m,A,j,N]);const D=n&&(Ir(n)?n.overviewEntry?.path:n.path)||"",L=n&&(Ir(n)?n.overviewEntry?.project:n.project)||"",H=n&&(Ir(n)?!!n.overviewEntry?.path:!1)||!1,ee=h7({file:D?.split("/").slice(1).join("/"),project:L,...l}),{data:G}=Dt(EEe({file:D?.split("/").slice(1).join("/"),project:L,...l}));b.useEffect(function(){const ne=G?.project+"/"+G?.file;let $=G?.message;ne===D&&$!==void 0?(H&&d&&G&&($=eDe($,d,G)),o($)):o(void 0)},[G,D,H,l]);const{mutate:K,isPending:B}=g7(),q=b.useCallback((F,ne)=>{K(F,{onSuccess:()=>{n?.path===ne&&F.payload!==void 0&&(a(void 0),o(F.payload||void 0),f.setQueryData(ee,{...G,message:F.payload}))},onError:$=>{console.error("Error saving file:",$)}})},[ee,G,n?.path,f,K,a]),z=b.useMemo(()=>n?n.package?.includes("github.com/HarperDB/status-check-fabric")||n.package?.includes("github.com/HarperFast/status-check-fabric")||n.path===sl||n.path===No:!1,[n]),W=b.useMemo(()=>({rootEntries:v.rootEntries,reloadRootEntries:y,entryExists:x,focusedItem:E,setFocusedItem:j,expandedItems:I,setExpandedItems:A,selectedItems:T,setSelectedItems:N,restrictPackageModification:z,openedEntry:n,setOpenedEntry:r,openedEntryContents:i,setOpenedEntryContents:o,saveFile:q,isSavingFile:B}),[v.rootEntries,y,x,E,j,I,A,T,N,z,n,r,i,o,q,B]);return c.jsx(d7.Provider,{value:W,children:e})}function Yl(e){const t=e;if(t?.focus)XM(t);else{const n=e;n?.target?.focus&&XM(n.target)}}function XM(e){Qc(1).then(()=>{e.focus?.()})}function rDe(){const{value:e,trigger:t}=Gl("ShowAddDirectoryOrFileModalType",!1),n=b.useCallback(()=>{ii("ShowAddDirectoryOrFileModalType",!1),Yl(t)},[t]),{openedEntry:r,entryExists:i,reloadRootEntries:o,setFocusedItem:a,setSelectedItems:l,setExpandedItems:d}=Vr(),f=Ut(),{mutate:m,isPending:h}=g7(),v=Wi.object({name:Wi.string().nonempty({error:"Please enter a valid name."}).regex(/^[a-zA-Z0-9_\- .]*$/,{error:"Names can only contain letters, numbers, underscores, hyphens, periods, and spaces."}).max(50,{error:"Names cannot be longer than 50 characters."}).trim()}),y=Qt({resolver:an(v),defaultValues:{name:""}}),x=b.useCallback(C=>{if(!r||!e)return;const k=r.path.split("/"),E=(Ir(r)?k.slice(1):k.slice(1,-1)).join("/"),j=E?`${E}/${C.name}`:C.name;if(i(r.project+"/"+j)){ye.error(`${Eo(e)} already exists!`,{description:j});return}m({file:j,project:r.project,payload:e==="directory"?void 0:"",...f},{onSuccess:()=>{o(),n(),y.reset();const I=[r.project,E,C.name].filter(Lo).join("/");a(I),l([I]),e==="directory"&&d(A=>[...A,I])}})},[m,y,n,f,r,i,o,d,a,l,e]),S=b.useCallback(()=>{n(),y.reset()},[n,y]);return c.jsx(Dn,{onOpenChange:n,open:!!e,children:c.jsx($n,{"aria-describedby":void 0,className:"text-white",children:c.jsx(en,{...y,children:c.jsxs("form",{onSubmit:y.handleSubmit(x),children:[c.jsxs(cr,{children:[c.jsxs(In,{children:["Add ",e]}),c.jsxs(mr,{children:["Enter the name of the ",e," you want to add",e==="file"?", don't forget the extension":"","!"]})]}),c.jsx(Ne,{control:y.control,name:"name",render:({field:C})=>c.jsxs(je,{className:"my-2",children:[c.jsx(Re,{children:"Name"}),c.jsx(Te,{children:c.jsx(ze,{disabled:h,type:"text",autoComplete:"off",autoCapitalize:"off",...C})}),c.jsx(Ie,{})]})}),c.jsx(Ln,{children:c.jsxs("div",{className:"flex justify-between w-full",children:[c.jsx(he,{type:"button",variant:"ghostOutline",className:"rounded-full",onClick:S,children:"Cancel"}),c.jsxs(he,{variant:"positiveOutline",type:"submit",className:"rounded-full",disabled:h,children:[c.jsx(Tr,{})," Add ",e]})]})})]})})})})}function iDe(){const{value:e,trigger:t}=Gl("ShowDeleteDirectoryOrFileModal",!1),n=Ut(),{openedEntry:r,reloadRootEntries:i,setFocusedItem:o,setSelectedItems:a,selectedItems:l}=Vr(),d=l.length>1,f=Ir(r),m=f&&r.path===r.project,h=!!r?.package,v=h?"Remove":"Delete",y=h?"Imported Application":m?"Application":f?"Directory":"File",x=b.useCallback(()=>{ii("ShowDeleteDirectoryOrFileModal",!1),Yl(t)},[t]),S=b.useCallback(async()=>{x();let k=[],E=0,j=!1;const I={label:"Cancel",onClick:()=>{j=!0}},A={label:"OK",onClick:()=>{}},T="deleting-files";for(const N of l.reverse()){k=N.split("/");const D=k[0],L=k.length>1?k.slice(1).join("/"):void 0;if(ye.loading(`${v} in progress...`,{id:T,description:`${E} of ${Mr(l.length,"item","items")}`,action:I}),await f7({file:L,project:D,...n}),j)break;E+=1}if(j?ye.warning(`${v} canceled!`,{id:T,description:"",action:A}):ye.success(`${v} completed!`,{id:T,description:"",action:A}),k.length){const N=k.slice(0,-1).join("/");o(N||void 0),a(N?[N]:[]),i()}},[v,x,n,i,l,o,a]),C=b.useCallback(k=>{k.preventDefault(),S()},[S]);return c.jsx(Dn,{onOpenChange:x,open:e,children:c.jsxs($n,{"aria-describedby":void 0,className:"text-white",children:[c.jsxs(cr,{children:[c.jsxs(In,{children:[v," ",y]}),c.jsxs(mr,{children:["Are you sure you want to ",v.toLowerCase()," ",d?`these ${l.length} items`:`this ${y.toLowerCase()}`,"?"]}),!h&&c.jsx(mr,{className:"whitespace-pre",children:d?l.join(`
191
+ `):r?.path})]}),c.jsxs("div",{className:"flex w-full gap-4",children:[c.jsx(he,{variant:"ghostOutline",className:"w-full rounded-full",onClick:x,children:"Cancel"}),c.jsxs(he,{variant:"destructiveOutline",type:"button",className:"w-full rounded-full",autoFocus:!0,onClick:C,children:[c.jsx(aa,{})," ",v," ",d?"items":y]})]})]})})}async function oDe({packageName:e,project:t,skipNodeModules:n,skipSymlinks:r,instanceClient:i}){const{data:o}=await i.post("/",{operation:"package_component",package:e,project:t,skip_node_modules:n,skip_symlinks:r},{timeout:3e5});return o}function aDe(){return ot({mutationFn:oDe})}function sDe(){const{value:e,trigger:t}=Gl("ShowDownloadApplicationModal",!1),n=Ut(),{openedEntry:r}=Vr(),{mutate:i,isPending:o,isSuccess:a}=aDe(),l=a?"Downloaded":o?"Downloading":"Download",[d,f]=b.useState(!1),m=b.useCallback(y=>{f(y.target.checked)},[]),h=b.useCallback(()=>{ii("ShowDownloadApplicationModal",!1),Yl(t)},[t]),v=b.useCallback(y=>{if(y.preventDefault(),!r)return;h();const x=ye.loading("Packaging...");i({packageName:r.package,project:r.project,skipNodeModules:!d,...n},{onSuccess:S=>{ye.success("Download ready!",{id:x});const C=document.createElement("a");C.setAttribute("class","invisible absolute top-0");const k=Uint8Array.from(atob(S.payload),j=>j.charCodeAt(0)),E=new Blob([k],{type:"application/gzip"});C.href=URL.createObjectURL(E),C.download=`${r.project}.gz`,document.body.appendChild(C),C.click(),document.body.removeChild(C)}})},[r,i,d,n,h]);return c.jsx(Dn,{onOpenChange:h,open:e,children:c.jsxs($n,{"aria-describedby":void 0,className:"text-white",children:[c.jsxs(cr,{children:[c.jsx(In,{children:"Download Application"}),c.jsxs(mr,{children:["This will package up the contents of ",c.jsx("strong",{children:r?.project})," into a gzipped file."]})]}),c.jsxs(Of,{className:"flex",children:[c.jsx(ze,{type:"checkbox",className:"w-6",disabled:o,checked:d,onChange:m}),c.jsx("span",{className:"pl-4 pr-8 flex-1 py-2.5",children:"Include Node Modules"})]}),c.jsxs("div",{className:"flex w-full gap-4",children:[c.jsx(he,{variant:"ghostOutline",className:"w-full rounded-full",onClick:h,children:"Cancel"}),c.jsxs(he,{variant:"positive",type:"button",className:"w-full rounded-full",disabled:o,autoFocus:!0,onClick:v,children:[c.jsx(H4,{})," ",l,o?"...":""]})]})]})})}function Gi({className:e,...t}){const{formDescriptionId:n}=Ix();return c.jsx("p",{"data-slot":"form-description",id:n,className:Ve("text-muted-foreground text-sm",e),...t})}function Wm(e=!1){const[t,n]=b.useState(e),r=b.useCallback(a=>{a?.preventDefault?.(),n(l=>!l)},[]),i=b.useCallback(a=>{a?.preventDefault?.(),n(!0)},[]),o=b.useCallback(a=>{a?.preventDefault?.(),n(!1)},[]);return b.useMemo(()=>({toggled:t,setToggled:n,toggle:r,toggleOn:i,toggleOff:o}),[r,n,o,i,t])}function lDe({field:e}){const{toggled:t,toggle:n}=Wm(!1);return c.jsxs(je,{className:"my-4",children:[c.jsxs(Re,{onClick:n,className:xr("flex items-center gap-2",t?"":"text-muted-foreground italic"),children:[t?c.jsx(qb,{}):c.jsx(wi,{})," Optional Database Name"]}),c.jsx(Gi,{className:t?"":"hidden",children:'"data" is the default recommended name'}),c.jsx(Te,{className:t?"":"hidden",children:c.jsx(ze,{type:"text",className:"my-1",...e})}),c.jsx(Ie,{})]})}var Tb=(e=>(e.Any="Any",e.BigInt="BigInt",e.Blob="Blob",e.Boolean="Boolean",e.Bytes="Bytes",e.Date="Date",e.Float="Float",e.ID="ID",e.Int="Int",e.Long="Long",e.String="String",e))(Tb||{});const ew=/^[\x20-\x2E|\x30-\x5F|\x61-\x7E]*$/,aG=Xe().regex(ew,{error:"Database name cannot include backticks or forward slashes."}).max(75,{error:"Database name cannot be longer than 75 characters."}),cDe=Xe().nonempty({error:"Field name is required."}).regex(ew,{error:"Field name cannot include backticks or forward slashes."}).max(250,{error:"Field name cannot be longer than 250 characters."}),sG=Xe().nonempty({error:"Table name is required."}).regex(ew,{error:"Table name cannot include backticks or forward slashes."}).max(250,{error:"Table name cannot be longer than 250 characters."}),uDe=Mt({tableName:sG,databaseName:aG,expiration:CR().or(Vl("")),enableRest:Xt(),sealed:Xt(),tableFields:ws(Mt({fieldName:cDe,fieldType:Ul(Tb),primaryKey:Xt(),nullable:Xt(),indexed:Xt(),array:Xt()})).min(1,{error:"Please add at least one field."})});function dDe({field:e}){const{toggled:t,toggle:n}=Wm(!1),r=b.useCallback(i=>e.onChange(i.target.value?parseInt(i.target.value,10):i.target.value),[]);return c.jsxs(je,{className:"my-4",children:[c.jsxs(Re,{onClick:n,className:xr("flex items-center gap-2",t?"":"text-muted-foreground italic"),children:[t?c.jsx(qb,{}):c.jsx(wi,{})," Optional Expiration"]}),c.jsx(Gi,{className:t?"":"hidden",children:"After how many seconds should records be automatically evicted? Leave blank or set to 0 to skip this feature. (It can be useful for cache records.)"}),c.jsx(Te,{className:t?"":"hidden",children:c.jsx(ze,{...e,type:"number",min:0,step:1,className:"my-1",onChange:r})}),c.jsx(Ie,{})]})}function fDe(){const e=os("ShowNewTableModal",!1),{openedEntry:t,openedEntryContents:n}=Vr(),{setContent:r}=og(!!t&&!t.package&&t.path),i=Qt({resolver:an(uDe),defaultValues:{tableName:"",databaseName:"data",expiration:"",enableRest:!0,sealed:!0,tableFields:[{fieldName:"id",fieldType:Tb.ID,primaryKey:!0,nullable:!0,indexed:!1,array:!1}]}}),{control:o,handleSubmit:a,formState:l}=i,{fields:d,append:f,remove:m}=vj({name:"tableFields",control:o}),h=b.useCallback(()=>{f({fieldName:"",fieldType:Tb.String,primaryKey:!1,nullable:!1,indexed:!1,array:!1})},[f]),v=b.useCallback(async y=>{r(x=>{const S=x||n||"",C=[!!y.databaseName&&y.databaseName!=="data"&&`database: "${y.databaseName}"`,!!y.expiration&&y.expiration>0&&`expiration: ${y.expiration}`].filter(Lo),k=C.length?`(${C.join(", ")})`:"",E=y.enableRest?" @export":"",j=y.sealed?" @sealed":"",I=y.tableFields.map(A=>{const T=A.array?`[${A.fieldType}]`:A.fieldType,N=A.nullable?"":"!",D=A.primaryKey?" @primaryKey":"",L=A.indexed?" @indexed":"";return`
192
+ ${A.fieldName}: ${T}${N}${D}${L}`}).join("");return`${S}
193
+ type ${y.tableName} @table${k}${E}${j} {${I}
194
+ }
195
+ `}),e()},[r,e,n]);return c.jsx(en,{...i,children:c.jsxs("form",{onSubmit:a(v),children:[c.jsx(Ne,{control:o,name:"tableName",render:({field:y})=>c.jsxs(je,{className:"my-4",children:[c.jsx(Re,{children:"Table Name"}),c.jsx(Te,{children:c.jsx(ze,{type:"text",className:"my-1",...y})}),c.jsx(Ie,{})]})}),c.jsx("h3",{className:"text-lg",children:"Table Fields"}),d.map((y,x)=>c.jsxs("div",{className:"p-4 my-2 border rounded-lg",children:[c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[c.jsx(Ne,{control:o,name:`tableFields.${x}.fieldName`,render:({field:S})=>c.jsxs(je,{children:[c.jsx(Re,{children:"Field Name"}),c.jsx(Te,{children:c.jsx(ze,{type:"text",...S})}),c.jsx(Ie,{})]})}),c.jsx(Ne,{control:o,name:`tableFields.${x}.fieldType`,render:({field:S})=>c.jsxs(je,{children:[c.jsx(Re,{children:"Type"}),c.jsx(Te,{children:c.jsxs(Qi,{...S,onValueChange:S.onChange,defaultValue:S.value,children:[c.jsx(to,{className:"w-full",children:c.jsx(eo,{})}),c.jsxs(no,{children:[c.jsx(zt,{value:"Any",children:"Any"}),c.jsx(zt,{value:"BigInt",children:"BigInt"}),c.jsx(zt,{value:"Blob",children:"Blob"}),c.jsx(zt,{value:"Boolean",children:"Boolean"}),c.jsx(zt,{value:"Bytes",children:"Bytes"}),c.jsx(zt,{value:"Date",children:"Date"}),c.jsx(zt,{value:"Float",children:"Float"}),c.jsx(zt,{value:"ID",children:"ID"}),c.jsx(zt,{value:"Int",children:"Int"}),c.jsx(zt,{value:"Long",children:"Long"}),c.jsx(zt,{value:"String",children:"String"})]})]})}),c.jsx(Ie,{})]})})]}),c.jsxs("div",{className:"flex flex-wrap items-center mt-2 gap-x-2 md:gap-x-4",children:[c.jsx(Ne,{control:o,name:`tableFields.${x}.indexed`,render:({field:S})=>c.jsxs(je,{className:"inline-flex",children:[c.jsx(Te,{children:c.jsx(ze,{type:"checkbox",className:"w-5",checked:S.value,onChange:C=>S.onChange(C.target.checked)})}),c.jsx(Re,{className:"flex-1 py-2.5",children:"Indexed"}),c.jsx(Ie,{})]})}),c.jsx(Ne,{control:o,name:`tableFields.${x}.primaryKey`,render:({field:S})=>c.jsxs(je,{className:"inline-flex",children:[c.jsx(Te,{children:c.jsx(ze,{type:"checkbox",className:"w-5",checked:S.value,onChange:C=>S.onChange(C.target.checked)})}),c.jsx(Re,{className:"flex-1 py-2.5",children:"Primary Key"}),c.jsx(Ie,{})]})}),c.jsx(Ne,{control:o,name:`tableFields.${x}.nullable`,render:({field:S})=>c.jsxs(je,{className:"inline-flex",children:[c.jsx(Te,{children:c.jsx(ze,{type:"checkbox",className:"w-5",checked:S.value,onChange:C=>S.onChange(C.target.checked)})}),c.jsx(Re,{className:"flex-1 py-2.5",children:"Nullable"}),c.jsx(Ie,{})]})}),c.jsx(Ne,{control:o,name:`tableFields.${x}.array`,render:({field:S})=>c.jsxs(je,{className:"inline-flex",children:[c.jsx(Te,{children:c.jsx(ze,{type:"checkbox",className:"w-5",checked:S.value,onChange:C=>S.onChange(C.target.checked)})}),c.jsx(Re,{className:"flex-1 py-2.5",children:"Array"}),c.jsx(Ie,{})]})}),c.jsx("div",{className:"grow"}),c.jsxs(he,{type:"button",variant:"destructiveGhost",className:"rounded-full",onClick:()=>m(x),children:[c.jsx(aa,{})," Remove Field"]})]})]},y.id)),c.jsxs(he,{variant:"ghost",type:"button",className:"w-full",onClick:h,children:[c.jsx(Tr,{})," Add Another Field"]}),c.jsx("hr",{className:"my-6 border-gray-600"}),c.jsx(Ne,{control:o,name:"databaseName",render:({field:y})=>c.jsx(lDe,{field:y})}),c.jsx(Ne,{control:o,name:"expiration",render:({field:y})=>c.jsx(dDe,{field:y})}),c.jsx(Ne,{control:o,name:"enableRest",render:({field:y})=>c.jsxs(je,{className:"flex",children:[c.jsx(Te,{children:c.jsx(ze,{type:"checkbox",className:"w-5",checked:y.value,onChange:x=>y.onChange(x.target.checked)})}),c.jsxs(Re,{className:"flex-1 py-2.5",children:["Make available as a REST endpoint (add"," ",c.jsx("code",{className:"text-muted-foreground italic ml-1",children:"@export"}),")"]}),c.jsx(Ie,{})]})}),c.jsx(Ne,{control:o,name:"sealed",render:({field:y})=>c.jsxs(je,{className:"flex",children:[c.jsx(Te,{children:c.jsx(ze,{type:"checkbox",className:"w-5",checked:y.value,onChange:x=>y.onChange(x.target.checked)})}),c.jsxs(Re,{className:"flex-1 py-2.5",children:["Sealed (add",c.jsx("code",{className:"text-muted-foreground italic ml-1",children:"@sealed"})," to ignore unspecified properties)"]}),c.jsx(Ie,{})]})}),c.jsxs("div",{className:"text-muted-foreground italic text-sm pb-2",children:["There are even more directives available to you when editing your schema.graphql by hand! You can read more about them"," ",c.jsx("a",{className:"underline",target:"_blank",rel:"noreferrer",href:"https://docs.harperdb.io/docs/developers/applications/defining-schemas",children:"in our documentation"}),"."]}),c.jsxs("div",{className:"flex w-full gap-4 sticky -bottom-6 pb-6 pt-4 bg-black",children:[c.jsxs(he,{variant:"ghost",className:"w-full rounded-full",onClick:e,children:[c.jsx(ute,{})," Cancel"]}),c.jsxs(he,{variant:"positive",type:"submit",className:"w-full rounded-full",disabled:!l.isValid,children:[c.jsx(Tr,{})," New Table"]})]})]})})}function pDe(){const{value:e,trigger:t}=Gl("ShowNewTableModal",!1),n=b.useCallback(()=>{ii("ShowNewTableModal",!1),Yl(t)},[t]);return c.jsx(Dn,{onOpenChange:n,open:e,children:c.jsxs($n,{"aria-describedby":void 0,className:"text-white",children:[c.jsxs(cr,{children:[c.jsx(In,{children:"New Table"}),c.jsx(mr,{children:"Creating a table is the basis of a data-driven application and can immediately be used as RESTful endpoints. This can also be configured as a caching table and extended and customized for specific endpoint behavior."})]}),c.jsx(fDe,{})]})})}function mDe(){const{value:e,trigger:t}=Gl("ShowRedeployApplicationModal",!1),n=sr(),r=Ut(),{openedEntry:i}=Vr(),o=i?.package,{mutate:a,isPending:l}=iG(),d=Qt({defaultValues:{applicationUrl:o,installCommand:""}}),{control:f,handleSubmit:m,reset:h}=d;b.useEffect(()=>{h({applicationUrl:o})},[h,o]);const v=b.useCallback(()=>{ii("ShowRedeployApplicationModal",!1),Yl(t),h({applicationUrl:o})},[h,o,t]),y=b.useCallback((S,C)=>{if(!i)return;v();const k=ye.loading("Redeploying...");a({applicationName:i.project,applicationUrl:S,installCommand:C,...r},{onSuccess:()=>{ye.success(`Application ${i.project} redeployed successfully`,{id:k}),n.invalidateQueries({queryKey:[r.entityId,"get_components"],refetchType:"active"})},onError:()=>{ye.dismiss(k)}})},[a,i,r,n,v]),x=({applicationUrl:S,installCommand:C})=>{S&&y(S,C)};return c.jsx(Dn,{onOpenChange:v,open:e,children:c.jsxs($n,{"aria-describedby":void 0,className:"text-white",children:[c.jsxs(cr,{children:[c.jsx(In,{children:"Redeploy Package"}),c.jsx(mr,{children:"Redeploy this package?"})]}),c.jsx("div",{children:c.jsx(en,{...d,children:c.jsxs("form",{className:"flex flex-col w-full gap-4",onSubmit:m(x),children:[c.jsx(Ne,{control:f,name:"applicationUrl",render:({field:S})=>c.jsxs(je,{children:[c.jsx(Re,{className:"pb-1",children:"Package Reference"}),c.jsx(Te,{children:c.jsx(ze,{type:"text",autoFocus:!0,...S})}),c.jsx(Ie,{})]})}),c.jsx(Ne,{control:f,name:"installCommand",render:({field:S})=>c.jsxs(je,{children:[c.jsx(Re,{className:"pb-1",children:"Install Command"}),c.jsx(Te,{children:c.jsx(ze,{type:"text",placeholder:"npm install",...S})}),c.jsx(Ie,{})]})}),c.jsxs(he,{variant:"positiveOutline",type:"submit",className:"w-full rounded-full",disabled:l,children:[c.jsx($o,{})," Redeploy Application"]}),c.jsx(he,{type:"button",variant:"ghostOutline",className:"w-full rounded-full",onClick:v,disabled:l,children:"Cancel"})]})})})]})})}function hDe(e){return HI(e.split("/").slice(0,-1))}function gDe(e,t){return HI(hDe(e),t)}function vDe(){const{value:e,trigger:t}=Gl("ShowRenameFileModal",!1),n=b.useCallback(()=>{ii("ShowRenameFileModal",!1),Yl(t)},[t]),{openedEntry:r,entryExists:i}=Vr(),o=Wi.object({name:Wi.string().nonempty({error:"Please enter a valid name."}).regex(/^[a-zA-Z0-9_\- .]*$/,{error:"Names can only contain letters, numbers, underscores, hyphens, periods, and spaces."}).max(50,{error:"Names cannot be longer than 50 characters."}).trim().refine(v=>v!==r?.name,{error:"Please enter a new name."})}),[a,l]=b.useState(!1),d=v7(),f=Qt({resolver:an(o)});b.useEffect(()=>{r?.name&&f.reset({name:r?.name})},[f,r?.name]);const m=b.useCallback(async v=>{if(!r)return;const y=gDe(r.path,v.name);if(i(y)){ye.error(`${Ir(r)?"Directory":"File"} already exists!`,{description:y});return}l(!0),await d([{from:r.path,to:y}]),n(),f.reset(),l(!1)},[n,i,f,r,d,l]),h=b.useCallback(()=>{n(),f.reset()},[n,f]);return c.jsx(Dn,{onOpenChange:n,open:e,children:c.jsx($n,{"aria-describedby":void 0,className:"text-white",children:c.jsx(en,{...f,children:c.jsxs("form",{onSubmit:f.handleSubmit(m),children:[c.jsxs(cr,{children:[c.jsx(In,{children:"Rename File"}),c.jsx(mr,{children:r?.path})]}),c.jsx(Ne,{control:f.control,name:"name",render:({field:v})=>c.jsxs(je,{className:"my-2",children:[c.jsx(Re,{children:"Name"}),c.jsx(Te,{children:c.jsx(ze,{disabled:a,type:"text",autoComplete:"off",autoCapitalize:"off",...v})}),c.jsx(Ie,{})]})}),c.jsx(Ln,{children:c.jsxs("div",{className:"flex justify-between w-full",children:[c.jsx(he,{type:"button",variant:"ghostOutline",className:"rounded-full",onClick:h,children:"Cancel"}),c.jsxs(he,{variant:"positiveOutline",type:"submit",className:"rounded-full",disabled:a||!f.formState.isDirty||!f.formState.isValid,children:[c.jsx(Z4,{})," Rename"]})]})})]})})})})}function yDe(){const{toggle:e,toggled:t}=kEe("ApplicationsSidebarOpened",!0);return c.jsxs(nDe,{children:[c.jsx("aside",{id:"file-explorer-sidebar",className:xr("pt-[calc(--spacing(32))] w-56 fixed top-0 left-0 bottom-0 z-30","bg-black-dark shadow shadow-black","transition-transform -translate-x-full",t?"translate-x-0":"md:translate-x-0"),"aria-label":"Sidebar",children:c.jsx(TRe,{})}),c.jsxs("div",{className:xr("applications-content","overflow-y-auto overflow-x-hidden","fixed top-32 right-0 bottom-0 left-0","transition-[left]","md:left-56",t&&"sm:left-56"),children:[c.jsx(WOe,{}),c.jsx($Re,{toggledSidebar:t,toggleSidebar:e})]}),c.jsx(rDe,{}),c.jsx(pDe,{}),c.jsx(iDe,{}),c.jsx(sDe,{}),c.jsx(mDe,{}),c.jsx(vDe,{})]})}function bDe(e){return[Qe({getParentRoute:()=>e,path:"/",component:yDe})]}async function xDe({instanceClient:e}){const{data:t}=await e.post("/",{operation:"list_certificates"});return t}function wDe(e){return{queryKey:[e.entityId,"list_certificates"],queryFn:()=>xDe(e)}}const SDe=Uf(),_De=[{header:"Certificate Name",accessorKey:"name",enableSorting:!0},{header:"Issuer",accessorKey:"details.issuer",enableSorting:!0},SDe.display({header:"Expires At",enableSorting:!1,id:"details.valid_to",cell:e=>e.row.original.details.valid_to?new Date(e.row.original.details.valid_to).toLocaleString():"N/A"})];function Jc({className:e,...t}){return c.jsx("textarea",{"data-slot":"input",className:Ve(`border-input file:text-foreground placeholder:text-muted-foreground selection:bg-purple
196
+ selection:text-primary-foreground
197
+ dark:aria-invalid:outline-destructive dark:aria-invalid:ring-destructive/50 ring-ring/10
198
+ dark:ring-ring/20 dark:outline-ring/40 outline-ring/50 aria-invalid:outline-destructive/60
199
+ aria-invalid:ring-destructive/20 aria-invalid:border-destructive/60 dark:aria-invalid:border-destructive
200
+ flex w-full min-w-0 rounded-md border bg-grey-700 px-3 py-1 text-base text-white
201
+ file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium
202
+ focus-visible:ring-1 focus-visible:outline-none focus-visible:ring-purple disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50
203
+ aria-invalid:focus-visible:ring-[1px] aria-invalid:focus-visible:outline-none md:text-sm dark:aria-invalid:focus-visible:ring-1`,e),...t})}async function CDe({instanceClient:e},t){const{data:n}=await e.post("/",{operation:"add_certificate",...t});return n}const kDe=Mt({name:Xe().min(1,"Name is required"),certificate:Xe().min(1,"Certificate is required"),private_key:Xe().optional(),is_authority:Xt().default(!1),hosts:Xe().optional(),uses:Xe().optional()});function EDe(){return ot({mutationFn:({instanceParams:e,certificateParams:t})=>CDe(e,t)})}function jDe({isModalOpen:e,onChangesSaved:t,setIsModalOpen:n}){const r=Qt({resolver:an(kDe),defaultValues:{name:"",certificate:"",private_key:"",is_authority:!1,hosts:"",uses:""}}),i=Ut(),{mutate:o,isPending:a}=EDe(),l=b.useCallback(async f=>{const{hosts:m,uses:h,private_key:v,...y}=f,x=m?m.split(",").map(C=>C.trim()).filter(Boolean):void 0,S=h?h.split(",").map(C=>C.trim()).filter(Boolean):void 0;o({instanceParams:i,certificateParams:{...y,private_key:v||void 0,hosts:x&&x.length>0?x:void 0,uses:S&&S.length>0?S:void 0}},{onSuccess:()=>{r.reset(),t(),ye.success("Certificate added successfully!"),n(!1)}})},[o,r,i,t,n]),d=b.useCallback(()=>{r.reset(),n(!1)},[r,n]);return c.jsx(Dn,{onOpenChange:n,open:e,children:c.jsx($n,{"aria-describedby":void 0,children:c.jsx(en,{...r,children:c.jsxs("form",{onSubmit:r.handleSubmit(l),className:"grid gap-4 my-4",children:[c.jsxs(cr,{children:[c.jsx(In,{children:"Add New Certificate"}),c.jsx(mr,{children:"Enter the details of your Certificate below."})]}),c.jsx(Ne,{control:r.control,name:"name",render:({field:f})=>c.jsxs(je,{children:[c.jsx(Re,{className:"pb-1",children:"Name"}),c.jsx(Te,{children:c.jsx(ze,{type:"text",autoComplete:"off",autoCapitalize:"off",autoFocus:!0,...f})}),c.jsx(Ie,{})]})}),c.jsx(Ne,{control:r.control,name:"is_authority",render:({field:f})=>c.jsxs(je,{className:"flex flex-row items-center justify-between rounded-lg border border-gray-800 p-3 shadow-sm",children:[c.jsx("div",{className:"space-y-0.5",children:c.jsx(Re,{children:"Is Authority"})}),c.jsx(Te,{children:c.jsx(o7,{checked:f.value,onCheckedChange:f.onChange})})]})}),c.jsx(Ne,{control:r.control,name:"certificate",render:({field:f})=>c.jsxs(je,{children:[c.jsx(Re,{className:"pb-1",children:"Certificate"}),c.jsx(Te,{children:c.jsx(Jc,{autoComplete:"off",autoCapitalize:"off",rows:5,...f})}),c.jsx(Ie,{})]})}),c.jsx(Ne,{control:r.control,name:"hosts",render:({field:f})=>c.jsxs(je,{children:[c.jsx(Re,{className:"pb-1",children:"Hosts (optional)"}),c.jsx(Gi,{children:"Comma-separated list of hostnames this certificate is valid for."}),c.jsx(Te,{children:c.jsx(ze,{type:"text",autoComplete:"off",autoCapitalize:"off",placeholder:"e.g. example.com, *.example.com",...f})}),c.jsx(Ie,{})]})}),c.jsx(Ne,{control:r.control,name:"uses",render:({field:f})=>c.jsxs(je,{children:[c.jsx(Re,{className:"pb-1",children:"Uses (optional)"}),c.jsx(Gi,{children:'Comma-separated list of intended uses, e.g. "https, operations, wss".'}),c.jsx(Te,{children:c.jsx(ze,{type:"text",autoComplete:"off",autoCapitalize:"off",placeholder:"e.g. https, operations, wss",...f})}),c.jsx(Ie,{})]})}),c.jsx(Ne,{control:r.control,name:"private_key",render:({field:f})=>c.jsxs(je,{children:[c.jsx(Re,{className:"pb-1",children:"Private Key (optional)"}),c.jsx(Gi,{children:"PEM formatted private key string."}),c.jsx(Te,{children:c.jsx(Jc,{autoComplete:"off",autoCapitalize:"off",rows:5,...f})}),c.jsx(Ie,{})]})}),c.jsx(Ln,{children:c.jsxs("div",{className:"flex justify-between w-full",children:[c.jsx(he,{variant:"destructiveOutline",type:"button",className:"rounded-full",onClick:d,disabled:a,children:"Cancel"}),c.jsxs(he,{type:"submit",variant:"submit",className:"rounded-full",disabled:a||!r.formState.isDirty||!r.formState.isValid,children:[c.jsx(Ii,{})," Add Certificate"]})]})})]})})})})}async function RDe({instanceClient:e},t){const{data:n}=await e.post("/",{operation:"remove_certificate",name:t});return n}function IDe(){return ot({mutationFn:({instanceParams:e,name:t})=>RDe(e,t)})}function TDe({data:e,isModalOpen:t,closeModal:n,onSelectCertificate:r,onChangesSaved:i}){const{name:o}=e,a=Ut(),{mutate:l,isPending:d}=IDe(),[f,m]=b.useState(!1),h=b.useCallback(()=>{m(!0)},[]),v=b.useCallback(()=>{l({instanceParams:a,name:o},{onSuccess:()=>{ye.success("Certificate removed successfully!"),r(void 0),i()}})},[o,l,a,i,r]);return c.jsxs(c.Fragment,{children:[c.jsx(Dn,{onOpenChange:n,open:t,children:c.jsx($n,{className:"sm:max-w-[800px] max-h-[90vh] overflow-y-auto","aria-describedby":void 0,children:c.jsxs("div",{className:"grid gap-4 my-4",children:[c.jsxs(cr,{children:[c.jsxs(In,{children:["View Certificate: ",o]}),c.jsx(mr,{children:"Details of the selected certificate."})]}),c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"grid grid-cols-2 gap-4 text-sm bg-gray-900/50 p-4 rounded-lg border border-gray-800",children:[c.jsxs("div",{className:"col-span-2",children:[c.jsx("p",{className:"font-semibold",children:"Issuer"}),c.jsx("p",{className:"text-gray-400 break-all",children:e.details.issuer||"N/A"})]}),c.jsxs("div",{className:"col-span-2",children:[c.jsx("p",{className:"font-semibold",children:"Subject"}),c.jsx("p",{className:"text-gray-400 break-all",children:e.details.subject||"N/A"})]}),e.details.subject_alt_name&&c.jsxs("div",{className:"col-span-2",children:[c.jsx("p",{className:"font-semibold",children:"Subject Alternative Name"}),c.jsx("p",{className:"text-gray-400 break-all",children:e.details.subject_alt_name})]}),c.jsxs("div",{children:[c.jsx("p",{className:"font-semibold",children:"Valid From"}),c.jsx("p",{className:"text-gray-400",children:e.details.valid_from?new Date(e.details.valid_from).toLocaleString():"N/A"})]}),c.jsxs("div",{children:[c.jsx("p",{className:"font-semibold",children:"Valid To (Expires At)"}),c.jsx("p",{className:"text-gray-400",children:e.details.valid_to?new Date(e.details.valid_to).toLocaleString():"N/A"})]}),c.jsxs("div",{children:[c.jsx("p",{className:"font-semibold",children:"Serial Number"}),c.jsx("p",{className:"text-gray-400 font-mono text-xs break-all",children:e.details.serial_number||"N/A"})]}),c.jsxs("div",{children:[c.jsx("p",{className:"font-semibold",children:"Private Key Name"}),c.jsx("p",{className:"text-gray-400",children:e.private_key_name||"N/A"})]}),c.jsxs("div",{children:[c.jsx("p",{className:"font-semibold",children:"Is Authority"}),c.jsx("p",{className:"text-gray-400",children:e.is_authority?"Yes":"No"})]}),c.jsxs("div",{children:[c.jsx("p",{className:"font-semibold",children:"Is Self-Signed"}),c.jsx("p",{className:"text-gray-400",children:e.is_self_signed?"Yes":"No"})]}),e.hosts&&e.hosts.length>0&&c.jsxs("div",{className:"col-span-2",children:[c.jsx("p",{className:"font-semibold",children:"Hosts"}),c.jsx("p",{className:"text-gray-400",children:e.hosts.join(", ")})]}),c.jsxs("div",{className:"col-span-2",children:[c.jsx("p",{className:"font-semibold",children:"Uses"}),c.jsx("p",{className:"text-gray-400",children:e.uses?.join(", ")||"N/A"})]})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsx(Of,{children:"Certificate Content"}),c.jsx(Jc,{autoComplete:"off",autoCapitalize:"off",rows:8,readOnly:!0,className:"font-mono text-xs",value:e.certificate})]})]}),c.jsx(Ln,{children:c.jsxs("div",{className:"flex justify-between w-full",children:[c.jsx(he,{type:"button",variant:"destructiveOutline",className:"rounded-full",onClick:h,disabled:d,children:"Remove Certificate"}),c.jsx(he,{type:"button",variant:"defaultOutline",className:"rounded-full",onClick:()=>n(),children:"Close"})]})})]})})}),c.jsx(Bh,{isModalOpen:f,setIsModalOpen:m,deletionConfirmed:v,deletionPending:d,typeOfThingBeingDeleted:"certificate",presentParticiple:"Removing",transitiveVerb:"Remove",nameOfThingBeingDeleted:o,hideDataLossWarning:!0})]})}function JM(){const e=Cn(),{certName:t}=nt({strict:!1}),n=Ut(),{data:r,refetch:i,isFetching:o,isRefetching:a}=Dt(wDe(n)),l=b.useMemo(()=>r?.find(x=>x.name===t),[r,t]),d=b.useCallback(x=>{const S=x?.original?.name,C=[t?"..":"",S].filter(Boolean);e({to:C.join("/")})},[t,e]),f=!!t&&!!l,[m,h]=b.useState(!1),v=b.useCallback(()=>{h(!0)},[h]),y=Da(i);return c.jsxs(c.Fragment,{children:[c.jsxs(Kl,{columns:_De,data:r||[],isFetching:o,onRowClick:d,children:[c.jsx(Ye,{className:"inline-block underline text-sm text-gray-400 hover:text-white",to:"https://docs.harperdb.io/docs/developers/operations-api/certificate-management",target:"_blank",children:"Certificate Management Docs"}),c.jsxs(he,{variant:"defaultOutline",onClick:y,accessKey:"r",disabled:o||a,children:[c.jsx($o,{}),c.jsxs("span",{className:"hidden lg:inline-block",children:[c.jsx("u",{children:"R"}),"efresh"]})]}),c.jsxs(he,{variant:"positiveOutline",onClick:v,accessKey:"a",disabled:m,children:[c.jsx(Tr,{}),c.jsxs("span",{children:[c.jsx("u",{children:"A"}),"dd"]})]})]}),m&&c.jsx(jDe,{isModalOpen:m,onChangesSaved:i,setIsModalOpen:h}),f&&c.jsx(TDe,{isModalOpen:f,closeModal:d,data:l,onSelectCertificate:d,onChangesSaved:i})]})}function NDe(){return c.jsx(a7,{})}function qk(e,t){const n=QM(e),r=QM(t);return!n||!r?!1:ODe(r,n)>=0}function QM(e){if(typeof e!="string")return null;const[t]=e.split("+",1).concat(""),n=t.indexOf("-"),r=n===-1?t:t.slice(0,n),i=n===-1?"":t.slice(n+1),o=r.split(".");if(o.length===0)return null;const a=Y1(o[0]),l=Y1(o[1]??"0"),d=Y1(o[2]??"0");if(a==null||l==null||d==null)return null;const f=i?i.split(".").map(m=>ADe(m)?Number(m):m):[];return{major:a,minor:l,patch:d,pre:f}}function Y1(e){return e==null||e===""||!/^\d+$/.test(e)?null:Number(e)}function ADe(e){return/^\d+$/.test(e)}function ODe(e,t){if(e.major!==t.major)return e.major<t.major?-1:1;if(e.minor!==t.minor)return e.minor<t.minor?-1:1;if(e.patch!==t.patch)return e.patch<t.patch?-1:1;const n=e.pre.length>0,r=t.pre.length>0;if(!n&&!r)return 0;if(!n&&r)return 1;if(n&&!r)return-1;const i=Math.min(e.pre.length,t.pre.length);for(let o=0;o<i;o++){const a=e.pre[o],l=t.pre[o],d=typeof a=="number",f=typeof l=="number";if(d&&f){if(a!==l)return a<l?-1:1;continue}if(d&&!f)return-1;if(!d&&f)return 1;if(a!==l)return String(a)<String(l)?-1:1}return e.pre.length!==t.pre.length?e.pre.length<t.pre.length?-1:1:0}const Td="flex items-center p-2 rounded-lg group",Nd={className:"text-white hover:bg-gray-700"},Ad={className:"text-black bg-white pointer-events-none cursor-default"};function DDe(){const e=nt({strict:!1}),{version:t}=yf({strict:!1}),n=qk("4.6.0",t),{clusterId:r}=e,i=DU(),{data:o}=Dt(Aa(r,!1));o===void 0||Wh(o);const a=i&&c.jsxs(c.Fragment,{children:[c.jsx("li",{children:c.jsxs(Ye,{to:Rr(e,"config/users"),className:Td,inactiveProps:Nd,activeProps:Ad,children:[c.jsx(ire,{className:"hidden md:inline-block"})," ",c.jsx("span",{className:"ms-3",children:"Users"})]})}),c.jsx("li",{children:c.jsxs(Ye,{to:Rr(e,"config/roles"),className:Td,inactiveProps:Nd,activeProps:Ad,children:[c.jsx(one,{className:"hidden md:inline-block"})," ",c.jsx("span",{className:"ms-3",children:"Roles"})]})}),!ml,n&&c.jsx("li",{children:c.jsxs(Ye,{to:Rr(e,"config/certificates"),className:Td,inactiveProps:Nd,activeProps:Ad,children:[c.jsx(Kne,{className:"hidden md:inline-block"})," ",c.jsx("span",{className:"ms-3",children:"Certificates"})]})}),n&&c.jsx("li",{children:c.jsxs(Ye,{to:Rr(e,"config/ssh-keys"),className:Td,inactiveProps:Nd,activeProps:Ad,children:[c.jsx(q4,{className:"hidden md:inline-block"})," ",c.jsx("span",{className:"ms-3",children:"SSH Keys"})]})})]});return c.jsxs("div",{className:"md:grid gap-4 md:grid-cols-12 min-h-[calc(100vh-(--spacing(36)))]",children:[c.jsxs("section",{className:"col-span-1 text-white md:col-span-4 lg:col-span-3 md:border-r border-b md:border-b-0 md:pr-4 border-gray-700",children:[c.jsx($De,{params:e,children:a}),c.jsx(PDe,{params:e,children:a})]}),c.jsx("section",{className:"col-span-1 text-white md:col-span-8 lg:col-span-9 md:pt-4",children:c.jsx(b.Suspense,{fallback:c.jsx(ao,{className:"flex flex-col items-center justify-center h-full",text:"Loading..."}),children:c.jsx(Nl,{})})})]})}function $De({params:e,children:t}){return c.jsxs("div",{className:"hidden md:block pl-4 pt-4",children:[c.jsxs(Ye,{to:Rr(e,"config"),className:Td,activeOptions:{exact:!0},inactiveProps:Nd,activeProps:Ad,children:[c.jsx(L4,{className:"hidden md:inline-block"})," ",c.jsx("span",{className:"ms-3",children:"Overview"})]}),t&&c.jsx("ul",{className:"border-t border-gray-700 pt-4 mt-4 space-y-2",children:t})]})}function PDe({params:e,children:t}){return c.jsxs("ul",{className:"flex space-x-2 md:hidden py-2 px-4",children:[c.jsx("li",{children:c.jsxs(Ye,{to:Rr(e,"config"),className:Td,activeOptions:{exact:!0},inactiveProps:Nd,activeProps:Ad,children:[c.jsx(L4,{className:"hidden md:inline-block"})," ",c.jsx("span",{className:"ms-3",children:"Overview"})]})}),t]})}async function MDe({clusterId:e,instanceId:t}){return null}function zDe(e){return{queryKey:[e.clusterId,e.instanceId],queryFn:()=>MDe(e),retry:!1}}const LDe=({loadingRegistration:e,registrationInfo:t})=>c.jsxs(c.Fragment,{children:[c.jsx("dt",{className:"font-bold text-sm/6",children:"Harper Version"}),c.jsx("dd",{className:"text-sm/6 sm:mt-2",children:e?c.jsx(Lr,{className:"w-10"}):t?.version||"Unknown"})]});function FDe({entityId:e,instanceClient:t}){return{queryKey:[e,"get_configuration"],queryFn:async()=>{const{data:n}=await t.post("/",{operation:"get_configuration"});return n}}}function uT({entityId:e,instanceClient:t}){return{queryKey:[e,"registration_info"],staleTime:6e4,gcTime:5e3,queryFn:async()=>{const{data:n}=await t.post("/",{operation:"registration_info"});return n}}}function UDe({entityId:e,instanceClient:t},n){return{queryKey:[e,"get_usage_licenses"],enabled:n,queryFn:async()=>{try{const{data:r}=await t.post("/",{operation:"get_usage_licenses"});return r}catch(r){return console.error(r),null}}}}const VDe=({children:e})=>c.jsx(c.Fragment,{children:e});function BDe(){const{clusterId:e,instanceId:t}=nt({strict:!1}),{data:n,isLoading:r}=Dt(zDe({clusterId:e,instanceId:t})),i="Instance",o=Ut(),{version:a}=yf({strict:!1}),l=!ml,{data:d}=Dt(UDe(o,l));n?.cluster;const f=n?.instance,{data:m,isLoading:h}=Dt(uT(o)),{data:v,isLoading:y}=Dt(FDe(o));return b.useMemo(()=>[],[e,t,d,f]),c.jsxs("div",{className:"h-full flex flex-col",children:[c.jsx(VDe,{children:c.jsxs("dl",{className:"grid grid-cols-1 sm:grid-cols-3",children:[c.jsx("div",{className:"px-4 pb-4 sm:col-span-2 sm:px-0",children:c.jsx(LDe,{loadingRegistration:h,registrationInfo:m})}),c.jsx("div",{className:"px-4 pb-4 text-right sm:col-span-1 sm:px-0",children:c.jsx(Y7,{targetNoun:i,instanceClient:o.instanceClient,operation:"restart"})})]})}),c.jsx("h3",{className:"flex-none font-bold text-sm/6",children:"Instance Config (read only)"}),!t&&c.jsx("p",{className:"text-muted-foreground italic text-sm mb-2",children:"You are viewing the config for one instance in your cluster, based on what the load balancer selected for you."}),c.jsx("div",{className:"grow",children:y?c.jsxs(c.Fragment,{children:[c.jsx(Lr,{className:"w-full"}),c.jsx(Lr,{className:"w-full"}),c.jsx(Lr,{className:"w-1/2"})]}):c.jsx(V0,{className:"w-full min-h-full h-96",language:"json",theme:"vs-dark",options:{readOnly:!0,scrollBeyondLastLine:!1},value:JSON.stringify(v,null,4)})})]})}const sy=Uf(),HDe=[{header:"Role",accessorKey:"role",enableSorting:!1},sy.display({header:"Created",enableSorting:!1,id:"__createdtime__",cell:e=>Dc((Date.now()-e.row.original.__createdtime__)/1e3,e.row.original.__createdtime__)}),sy.display({header:"Updated",id:"__updatedtime__",enableSorting:!1,cell:e=>Dc((Date.now()-e.row.original.__updatedtime__)/1e3,e.row.original.__updatedtime__)}),sy.display({header:"Super User",id:"super_user",enableSorting:!1,cell:e=>e.row.original.permission.super_user?"Yes":"No"}),sy.display({header:"Structure User",id:"structure_user",enableSorting:!1,cell:e=>e.row.original.permission.structure_user?"Yes":"No"})];async function qDe(e){const{role:t,super_user:n,structure_user:r,instanceClient:i}=e,{data:o}=await i.post("/",{operation:"add_role",role:t,permission:{super_user:n,structure_user:r}});return o}function KDe(){return ot({mutationFn:qDe})}const GDe=Mt({role:Xe().nonempty({error:"Please enter a role."}).regex(/^[a-zA-Z_]*$/,{error:"Role must contain only letters and underscores."}).max(30,{error:"Role cannot be longer than 30 characters."}),super_user:Xt(),structure_user:Xt()});function ZDe({isModalOpen:e,onChangesSaved:t,setIsModalOpen:n}){const r=Qt({resolver:an(GDe),defaultValues:{role:"",super_user:!1,structure_user:!1}}),i=Ut(),{mutate:o,isPending:a}=KDe(),l=b.useCallback(async f=>{f&&o({role:f.role,super_user:f.super_user,structure_user:f.structure_user,...i},{onSuccess:()=>{r.reset(),t(f.role),ye.success("Role added successfully!"),n(!1)}})},[o,r,i,t,n]),d=b.useCallback(()=>{r.reset(),n(!1)},[r,n]);return c.jsx(Dn,{onOpenChange:n,open:e,children:c.jsx($n,{"aria-describedby":void 0,children:c.jsx(en,{...r,children:c.jsxs("form",{onSubmit:r.handleSubmit(l),className:"grid gap-4 my-4 md:grid-cols-2",children:[c.jsxs(cr,{className:"md:col-span-2",children:[c.jsx(In,{children:"Add New Role"}),c.jsx(mr,{children:"After adding the role, you will be able to edit the per-table permissions."})]}),c.jsx(Ne,{control:r.control,name:"role",render:({field:f})=>c.jsxs(je,{className:"md:col-span-2",children:[c.jsx(Re,{className:"pb-1",children:"Name"}),c.jsx(Te,{children:c.jsx(ze,{type:"text",...f})}),c.jsx(Ie,{})]})}),c.jsx(Ne,{control:r.control,name:"super_user",render:({field:f})=>c.jsxs(je,{className:"flex",children:[c.jsx(Te,{children:c.jsx(ze,{type:"checkbox",className:"w-6",checked:f.value,onChange:m=>f.onChange(m.target.checked)})}),c.jsx(Re,{className:"pl-4 pr-8 flex-1 py-2.5",children:"Super User"}),c.jsx(Ie,{})]})}),c.jsx(Ne,{control:r.control,name:"structure_user",render:({field:f})=>c.jsxs(je,{className:"flex",children:[c.jsx(Te,{children:c.jsx(ze,{type:"checkbox",className:"w-6",checked:f.value,onChange:m=>f.onChange(m.target.checked)})}),c.jsx(Re,{className:"pl-4 pr-8 flex-1 py-2.5",children:"Structure User"}),c.jsx(Ie,{})]})}),c.jsx(Ln,{className:"md:col-span-2",children:c.jsxs("div",{className:"flex justify-between w-full",children:[c.jsx(he,{variant:"destructiveOutline",type:"button",className:"rounded-full",onClick:d,disabled:a,children:"Cancel"}),c.jsxs(he,{type:"submit",variant:"submit",className:"rounded-full",disabled:a,children:[c.jsx(Ii,{})," Add Role"]})]})})]})})})})}function dT({entityId:e,instanceClient:t}){return{queryKey:[e,"list_roles"],queryFn:()=>YDe({instanceClient:t}),refetchInterval:1e4}}async function YDe({instanceClient:e}){const{data:t}=await e.post("/",{operation:"list_roles"});return t}function WDe({instanceDatabaseMap:e,currentRolePermissions:t,version:n,showAttributes:r}){const i={...t};if(t.super_user||t.structure_user||t.cluster_user)return t;const[o,a,l]=n.split(".").map(f=>parseInt(f,10)),d=n!=="2.0.000"&&o<=2&&a<=1&&l<=2;for(const f in e){i[f]={tables:{}};for(const m in e[f]){const v=e[f][m].attributes.map(y=>y.attribute).sort();if(d){const y=t&&t[f]&&t[f].tables[m];i[f].tables[m]=XDe(y,v,r)}else{const y=t&&t[f]&&t[f].tables[m];i[f].tables[m]=JDe(y,v,r)}}}return i}function XDe(e,t,n){const r=e&&Qh(e.attribute_restrictions,"attribute_name");return{read:e?e.read:!0,insert:e?e.insert:!0,update:e?e.update:!0,delete:e?e.delete:!0,attribute_restrictions:t.filter(()=>n).map(i=>{const o=r?.[i];return{attribute_name:i,read:o?o.read:e?e.read:!0,insert:o?o.insert:e?e.insert:!0,update:o?o.update:e?e.update:!0,delete:o?o.delete:e?e.delete:!0}})}}function JDe(e,t,n){const r=e&&Qh(e.attribute_permissions||[],"attribute_name");return{read:e?e.read:!1,insert:e?e.insert:!1,update:e?e.update:!1,delete:e?e.delete:!1,attribute_permissions:n?t.map(i=>{const o=r?.[i];return{attribute_name:i,read:o?o.read:e?.attribute_permissions?.length?!1:e?.read||!1,insert:o?o.insert:e?.attribute_permissions?.length?!1:e?.insert||!1,update:o?o.update:e?.attribute_permissions?.length?!1:e?.update||!1}}):null}}async function QDe({id:e,permission:t,instanceClient:n}){const{data:r}=await n.post("/",{operation:"alter_role",id:e,permission:t});return r}function e$e(){return ot({mutationFn:QDe})}async function t$e({id:e,instanceClient:t}){const{data:n}=await t.post("/",{operation:"drop_role",id:e});return n}function n$e(){return ot({mutationFn:t$e})}function lG({entityId:e,instanceClient:t}){return{queryKey:[e,"describe_all"],queryFn:async()=>{const{data:n}=await t.post("/",{operation:"describe_all"});return n},staleTime:6e4,gcTime:5e3,retry:!1}}function r$e({data:e,instanceId:t,clusterId:n,isModalOpen:r,closeModal:i,onSelectRole:o,onChangesSaved:a}){const{role:l,permission:d}=e,[f,m]=b.useState(JSON.stringify(d,null,2)),h=Ut(),[v,y]=b.useState(!0),{data:x}=Dt(lG(h)),{data:S}=Dt(uT(h)),k=_s().user?.role?.role===e.role,[E,j]=UI(f?.includes("attribute_name")),{mutate:I,isPending:A}=e$e(),{mutate:T}=n$e(),N=b.useCallback(K=>{y(K.length===0)},[y]),D=b.useMemo(()=>JSON.stringify(x&&S&&WDe({instanceDatabaseMap:x,currentRolePermissions:f&&Jh(f)||d,version:S.version,showAttributes:E}),null,2),[d,x,S,E,f]);b.useEffect(()=>{m(D)},[D]);const L=b.useCallback(K=>{if(K){const B=JSON.parse(K);if(B.super_user||B.structure_user||B.cluster_user)for(const q in B)(q!=="super_user"&&q!=="structure_user"&&q!=="cluster_user"||B[q]===!1)&&delete B[q];I({id:e.id,permission:B,...h},{onSuccess:()=>{ye.success("Role updated successfully!"),o(void 0),a()}})}},[I,e.id,h,a,o]),H=b.useCallback(()=>{T({id:e.id,...h},{onSuccess:()=>{ye.success("Role deleted successfully!"),o(void 0),a()}})},[e.id,T,h,a,o]),ee=b.useCallback(()=>{f&&v&&L(f)},[f,L,v]),G=b.useCallback(()=>{H()},[H]);return c.jsx(Dn,{onOpenChange:i,open:r,children:c.jsxs($n,{className:"sm:max-w-[750px]",children:[c.jsxs(In,{children:[k?"View":"Edit",' Role "',l,'"']}),c.jsx(mr,{children:k?"You can view your own role, but you cannot edit it. Please assign yourself a different role to edit this role.":"Edit the role's permissions in JSON format or remove the role entirely."}),D?c.jsx(ng,{theme:"vs-dark",height:"400px",defaultLanguage:"json",value:f,options:k?{readOnly:!0}:void 0,onValidate:N,onChange:m,defaultValue:D}):c.jsx(Lr,{}),c.jsx(Ln,{children:!k&&c.jsxs("div",{className:"flex justify-between w-full",children:[c.jsx(he,{type:"button",variant:"destructiveOutline",className:"rounded-full",onClick:G,disabled:A,children:"Delete Role"}),c.jsx("div",{className:"grow"}),c.jsxs(Of,{className:"flex",children:[c.jsx(ze,{type:"checkbox",className:"w-6",checked:E,onChange:j}),c.jsx("span",{className:"pl-4 pr-8 flex-1 py-2.5",children:"Pick Attributes"})]}),c.jsx(he,{variant:"submit",className:"rounded-full",onClick:ee,disabled:A||!v,children:"Save Changes"})]})})]})})}function ez(){const e=Cn(),{clusterId:t,instanceId:n,roleId:r}=nt({strict:!1}),i=Ut(),{data:o,refetch:a,isFetching:l,isRefetching:d}=Ri(dT(i)),f=b.useMemo(()=>o?.find(j=>j.id===r),[o,r]),m=b.useCallback(j=>{const I=[r?"..":"",j].filter(Boolean);e({to:I.join("/")})},[r,e]),h=!!r&&!!f,[v,y]=b.useState(!1),x=b.useCallback(()=>{y(!0)},[y]),S=b.useCallback(j=>{a(),y(!1),m(j)},[m,a]),C=b.useCallback(j=>{m(j.original.role)},[m]),k=b.useCallback(()=>{m(void 0)},[m]),E=Da(a);return c.jsxs(b.Suspense,{fallback:c.jsx(ao,{className:"flex flex-col items-center justify-center h-full",text:"Loading..."}),children:[c.jsxs(Kl,{columns:HDe,data:o,isFetching:l,onRowClick:C,children:[c.jsxs(he,{variant:"defaultOutline",onClick:E,accessKey:"r",disabled:l||d,children:[c.jsx($o,{}),c.jsxs("span",{className:"hidden lg:inline-block",children:[c.jsx("u",{children:"R"}),"efresh"]})]}),c.jsxs(he,{variant:"positiveOutline",onClick:x,accessKey:"a",disabled:v,children:[c.jsx(Tr,{}),c.jsxs("span",{children:[c.jsx("u",{children:"A"}),"dd"]})]})]}),c.jsx(ZDe,{isModalOpen:v,onChangesSaved:S,setIsModalOpen:y}),h&&c.jsx(r$e,{instanceId:n,clusterId:t,isModalOpen:h,closeModal:k,data:f,onSelectRole:m,onChangesSaved:()=>a()})]})}async function i$e({instanceClient:e}){const{data:t}=await e.post("/",{operation:"list_ssh_keys"});return t}function o$e(e){return{queryKey:[e.entityId,"list_ssh_keys"],queryFn:()=>i$e(e)}}const a$e=[{header:"SSH Key Name",accessorKey:"name",enableSorting:!1}];async function s$e({instanceClient:e}){const{data:t}=await e.post("/",{operation:"get_ssh_known_hosts"});return t}function l$e(e){return{queryKey:[e.entityId,"get_ssh_known_hosts"],queryFn:()=>s$e(e)}}const c$e=Mt({known_hosts:Xe().trim()});async function u$e(e){const{instanceClient:t,entityType:n,...r}=e,{data:i}=await t.post("/",{operation:"set_ssh_known_hosts",replicated:n==="cluster",...r});return i}function d$e(){return ot({mutationFn:u$e})}function f$e(){const e=Ut(),{data:t}=Ri(l$e(e)),n=Qt({resolver:an(c$e),defaultValues:{known_hosts:t?.known_hosts||""}}),{mutate:r,isPending:i}=d$e(),o=b.useCallback(async a=>{const{known_hosts:l}=a;l&&r({known_hosts:l.trim()+`
204
+ `,...e},{onSuccess:()=>{n.reset(a),ye.success("Known hosts saved!")}})},[r,n,e]);return c.jsx(en,{...n,children:c.jsx("form",{onSubmit:n.handleSubmit(o),className:"grid my-4 md:grid-cols-2 overflow-x-auto rounded-md",children:c.jsx(Ne,{control:n.control,name:"known_hosts",render:({field:a})=>c.jsxs(je,{className:"md:col-span-2 gap-0",children:[c.jsx(Re,{className:"bg-black-dark py-3 px-2 m-0 text-left font-medium whitespace-nowrap",children:"Known Hosts"}),c.jsxs("div",{className:"border border-grey-700 p-2 pb-3",children:[c.jsx(Gi,{className:"pb-2",children:`Manage your known hosts here. When you add a SSH Key with a hostname of "github.com", we'll automatically attempt to resolve GitHub's known hosts for you.`}),c.jsx(Te,{children:c.jsx(Jc,{autoComplete:"off",autoCapitalize:"off",className:"whitespace-nowrap",rows:10,...a})}),c.jsx(Ie,{}),c.jsxs(he,{type:"submit",variant:"submit",className:"rounded-full mt-2",disabled:i||!n.formState.isDirty||!n.formState.isValid,children:[c.jsx(Ii,{})," ",i?"Saving":"Save"," Known Hosts",i?"...":""]})]})]})})})})}const p$e=Mt({name:Xe().trim().min(1).regex(/^[a-zA-Z0-9-_]*$/,{error:"Can only contain letters, numbers, dashes and underscores."}),key:Xe().min(1).trim(),host:Xe().min(1).trim(),hostname:Xe().min(1).trim(),known_hosts:Xe().trim().optional()});async function m$e(e){const{instanceClient:t,entityType:n,entityId:r,...i}=e,{data:o}=await t.post("/",{operation:"add_ssh_key",replicated:n==="cluster",...i});return o}function h$e(){return ot({mutationFn:m$e})}function g$e({isModalOpen:e,onChangesSaved:t,setIsModalOpen:n}){const r=Qt({resolver:an(p$e),defaultValues:{name:"",key:"",host:"",hostname:"",known_hosts:""}}),i=Ut(),{mutate:o,isPending:a}=h$e(),l=b.useCallback(async f=>{if(f){const{name:m,key:h,host:v,hostname:y,known_hosts:x}=f;o({name:m,key:h.trim()+`
205
+ `,host:v,hostname:y,known_hosts:x||void 0,...i},{onSuccess:()=>{r.reset(),t(),ye.success("SSH Key added successfully!"),n(!1)}})}},[o,r,i,t,n]),d=b.useCallback(()=>{r.reset(),n(!1)},[r,n]);return c.jsx(Dn,{onOpenChange:n,open:e,children:c.jsx($n,{"aria-describedby":void 0,children:c.jsx(en,{...r,children:c.jsxs("form",{onSubmit:r.handleSubmit(l),className:"grid gap-4 my-4 md:grid-cols-2",children:[c.jsxs(cr,{className:"md:col-span-2",children:[c.jsx(In,{children:"Add New SSH Key"}),c.jsx(mr,{children:"Enter the details of your SSH Key below."})]}),c.jsx(Ne,{control:r.control,name:"name",render:({field:f})=>c.jsxs(je,{className:"md:col-span-2",children:[c.jsx(Re,{className:"pb-1",children:"Name"}),c.jsx(Te,{children:c.jsx(ze,{type:"text",autoComplete:"off",autoCapitalize:"off",autoFocus:!0,...f})}),c.jsx(Ie,{})]})}),c.jsx(Ne,{control:r.control,name:"key",render:({field:f})=>c.jsxs(je,{className:"md:col-span-2",children:[c.jsx(Re,{className:"pb-1",children:"Key"}),c.jsx(Gi,{children:`Your private key. Don't have one? Try out "ssh-keygen"! You'll want to add your public key to your registry, i.e. GitHub.`}),c.jsx(Te,{children:c.jsx(Jc,{autoComplete:"off",autoCapitalize:"off",rows:3,...f})}),c.jsx(Ie,{})]})}),c.jsx(Ne,{control:r.control,name:"host",render:({field:f})=>c.jsxs(je,{className:"md:col-span-2",children:[c.jsx(Re,{className:"pb-1",children:"Host"}),c.jsx(Gi,{children:'A unique identifying name for the combination of this key and your hostname, i.e. "your-repo.github.com". You will use this instead of the direct hostname to pick your key when importing applications.'}),c.jsx(Te,{children:c.jsx(ze,{type:"text",autoComplete:"off",autoCapitalize:"off",...f})}),c.jsx(Ie,{})]})}),c.jsx(Ne,{control:r.control,name:"hostname",render:({field:f})=>c.jsxs(je,{className:"md:col-span-2",children:[c.jsx(Re,{className:"pb-1",children:"Hostname"}),c.jsx(Gi,{children:'When making the request, the actual hostname to use, i.e. "github.com".'}),c.jsx(Te,{children:c.jsx(ze,{type:"text",autoComplete:"off",autoCapitalize:"off",...f})}),c.jsx(Ie,{})]})}),c.jsx(Ne,{control:r.control,name:"known_hosts",render:({field:f})=>c.jsxs(je,{className:"md:col-span-2",children:[c.jsx(Re,{className:"pb-1",children:"Known Hosts"}),c.jsx(Gi,{children:"Optionally, append known hosts, one per line. GitHub known hosts should resolve automatically."}),c.jsx(Te,{children:c.jsx(Jc,{autoComplete:"off",autoCapitalize:"off",className:"whitespace-nowrap",rows:3,...f})}),c.jsx(Ie,{})]})}),c.jsx(Ln,{className:"md:col-span-2",children:c.jsxs("div",{className:"flex justify-between w-full",children:[c.jsx(he,{variant:"destructiveOutline",type:"button",className:"rounded-full",onClick:d,disabled:a,children:"Cancel"}),c.jsxs(he,{type:"submit",variant:"submit",className:"rounded-full",disabled:a||!r.formState.isDirty||!r.formState.isValid,children:[c.jsx(Ii,{})," Add SSH Key"]})]})})]})})})})}async function v$e(e){const{instanceClient:t,entityType:n,name:r}=e,{data:i}=await t.post("/",{operation:"delete_ssh_key",replicated:n==="cluster",name:r});return i}function y$e(){return ot({mutationFn:v$e})}async function b$e({name:e,instanceClient:t}){const{data:n}=await t.post("/",{operation:"get_ssh_key",name:e});return n}function x$e(e){return{queryKey:[e.entityId,"get_ssh_key"],queryFn:()=>b$e(e),refetchInterval:1e4}}const w$e=Mt({name:Xe().trim(),key:Xe().min(1).trim()});async function S$e(e){const{instanceClient:t,entityType:n,name:r,key:i}=e,{data:o}=await t.post("/",{operation:"update_ssh_key",replicated:n==="cluster",name:r,key:i});return o}function _$e(){return ot({mutationFn:S$e})}function C$e({data:e,isModalOpen:t,closeModal:n,onSelectSSHKey:r,onChangesSaved:i}){const{name:o}=e,a=Qt({resolver:an(w$e),defaultValues:{name:o,key:""}}),l=Ut(),{data:d}=Dt(x$e({...l,name:o})),{mutate:f,isPending:m}=_$e(),{mutate:h}=y$e(),v=b.useCallback(async({key:x})=>{x&&f({name:o,key:x.trim()+`
206
+ `,...l},{onSuccess:()=>{ye.success("SSH Key updated successfully!"),r(void 0),i()}})},[f,o,l,r,i]),y=b.useCallback(()=>{h({name:o,...l},{onSuccess:()=>{ye.success("SSH Key deleted successfully!"),r(void 0),i()}})},[o,h,l,i,r]);return c.jsx(Dn,{onOpenChange:n,open:t,children:c.jsx($n,{className:"sm:max-w-[750px]","aria-describedby":void 0,children:c.jsx(en,{...a,children:c.jsxs("form",{onSubmit:a.handleSubmit(v),className:"grid gap-4 my-4 md:grid-cols-2",children:[c.jsx(In,{children:"Edit SSH Key"}),c.jsx(Ne,{control:a.control,name:"name",render:({field:x})=>c.jsxs(je,{className:"md:col-span-2",children:[c.jsx(Re,{className:"pb-1",children:"Name"}),c.jsx(Te,{children:c.jsx(ze,{type:"text",autoComplete:"off",autoCapitalize:"off",readOnly:!0,disabled:!0,...x})}),c.jsx(Ie,{})]})}),c.jsx(Ne,{control:a.control,name:"key",render:({field:x})=>c.jsxs(je,{className:"md:col-span-2",children:[c.jsx(Re,{className:"pb-1",children:"Key"}),c.jsx(Gi,{children:`Replace your existing private key. Lost it? Try out "ssh-keygen"! You'll want to add your public key to your registry, i.e. GitHub.`}),c.jsx(Te,{children:c.jsx(Jc,{autoComplete:"off",autoCapitalize:"off",autoFocus:!0,rows:3,...x})}),c.jsx(Ie,{})]})}),c.jsxs(je,{className:"md:col-span-2",children:[c.jsx(Re,{className:"pb-1",children:"Host"}),c.jsx(Gi,{children:'A unique identifying name for the combination of this key and your hostname, i.e. "your-repo.github.com". You will use this instead of the direct hostname to pick your key when importing applications.'}),c.jsx(Te,{children:c.jsx(ze,{type:"text",autoComplete:"off",autoCapitalize:"off",value:d?.host||"",disabled:!0,readOnly:!0})}),c.jsx(Ie,{})]}),c.jsxs(je,{className:"md:col-span-2",children:[c.jsx(Re,{className:"pb-1",children:"Hostname"}),c.jsx(Gi,{children:'When making the request, the actual hostname to use, i.e. "github.com".'}),c.jsx(Te,{children:c.jsx(ze,{type:"text",autoComplete:"off",autoCapitalize:"off",value:d?.hostname||"",disabled:!0,readOnly:!0})}),c.jsx(Ie,{})]}),c.jsxs(Ln,{children:[c.jsx(he,{type:"button",variant:"destructiveOutline",className:"rounded-full",onClick:y,disabled:m,children:"Delete SSH Key"}),c.jsx("div",{className:"grow"}),c.jsx(he,{type:"submit",variant:"submit",className:"rounded-full",disabled:m||!a.formState.isValid,children:"Update SSH Key"})]})]})})})})}function tz(){const e=Cn(),{keyName:t}=nt({strict:!1}),n=Ut(),{data:r,refetch:i,isFetching:o,isRefetching:a}=Dt(o$e(n)),l=b.useMemo(()=>r?.find(x=>x.name===t),[r,t]),d=b.useCallback(x=>{const S=x?.original?.name,C=[t?"..":"",S].filter(Boolean);e({to:C.join("/")})},[t,e]),f=!!t&&!!l,[m,h]=b.useState(!1),v=b.useCallback(()=>{h(!0)},[h]),y=Da(i);return c.jsxs(c.Fragment,{children:[c.jsxs(Kl,{columns:a$e,data:r||[],isFetching:o,onRowClick:d,children:[c.jsx(Ye,{className:"inline-block underline text-sm text-gray-400 hover:text-white",to:"https://docs.harperdb.io/docs/developers/security/certificate-management",target:"_blank",children:"Certificate Management Docs"}),c.jsxs(he,{variant:"defaultOutline",onClick:y,accessKey:"r",disabled:o||a,children:[c.jsx($o,{}),c.jsxs("span",{className:"hidden lg:inline-block",children:[c.jsx("u",{children:"R"}),"efresh"]})]}),c.jsxs(he,{variant:"positiveOutline",onClick:v,accessKey:"a",disabled:m,children:[c.jsx(Tr,{}),c.jsxs("span",{children:[c.jsx("u",{children:"A"}),"dd"]})]})]}),m&&c.jsx(g$e,{isModalOpen:m,onChangesSaved:i,setIsModalOpen:h}),f&&c.jsx(C$e,{isModalOpen:f,closeModal:d,data:l,onSelectSSHKey:d,onChangesSaved:i}),c.jsx(b.Suspense,{fallback:c.jsx(ao,{text:"Loading..."}),children:c.jsx(f$e,{})})]})}const nz=Uf(),k$e=[{header:"Username",accessorKey:"username",enableSorting:!1},nz.display({header:"Role",enableSorting:!1,id:"role",cell:e=>e.row.original.role.role}),{header:"Active",accessorKey:"active",enableSorting:!1},nz.display({header:"Created",enableSorting:!1,id:"__createdtime__",cell:e=>Dc((Date.now()-e.row.original.__createdtime__)/1e3,e.row.original.__createdtime__)}),{header:"Updated",accessorKey:"__updatedtime__",enableSorting:!1,cell:e=>Dc((Date.now()-e.row.original.__updatedtime__)/1e3,e.row.original.__updatedtime__)}];function E$e({isModalOpen:e,onChangesSaved:t,setIsModalOpen:n}){const r=Ut(),{data:i}=Ri(dT(r)),o=Qt({resolver:an(Id),defaultValues:{username:"",role:"",password:"",confirmPassword:""}}),{mutate:a,isPending:l}=dEe(),d=b.useCallback(async f=>{f&&a({active:!0,password:f.password,role:f.role,username:f.username,...r},{onSuccess:()=>{const m=f.role;o.reset(),o.setValue("role",m),t(),ye.success("User added successfully!"),n(!1)}})},[a,o,r,t,n]);return c.jsx(Dn,{onOpenChange:n,open:e,children:c.jsx($n,{"aria-describedby":void 0,children:c.jsx(en,{...o,children:c.jsxs("form",{onSubmit:o.handleSubmit(d),className:"grid gap-4 my-4",children:[c.jsx(cr,{children:c.jsx(In,{children:"Add New User"})}),c.jsx(Ne,{control:o.control,name:"username",render:({field:f})=>c.jsxs(je,{children:[c.jsx(Re,{className:"pb-1",children:"Username"}),c.jsx(Te,{children:c.jsx(ze,{type:"text",enterKeyHint:"next",autoComplete:"username",...f})}),c.jsx(Ie,{})]})}),c.jsx(Ne,{control:o.control,name:"password",render:({field:f})=>c.jsxs(je,{children:[c.jsx(Re,{className:"pb-1",children:"Password"}),c.jsx(Te,{children:c.jsx(ze,{type:"password",enterKeyHint:"next",autoComplete:"new-password",...f})}),c.jsx(Ie,{})]})}),c.jsx(Ne,{control:o.control,name:"confirmPassword",render:({field:f})=>c.jsxs(je,{children:[c.jsx(Re,{className:"pb-1",children:"Confirm Password"}),c.jsx(Te,{children:c.jsx(ze,{type:"password",enterKeyHint:"next",autoComplete:"new-password",...f})}),c.jsx(Ie,{})]})}),c.jsx(Ne,{control:o.control,name:"role",render:({field:f})=>c.jsxs(je,{children:[c.jsx(Re,{className:"pb-1",children:"Role"}),c.jsx(b.Suspense,{fallback:c.jsx(Lr,{}),children:c.jsx(Te,{children:c.jsxs(Qi,{...f,onValueChange:m=>f.onChange(m),children:[c.jsx(to,{className:"w-full",children:c.jsx(eo,{placeholder:"Choose Role"})}),c.jsx(no,{children:c.jsxs(ia,{children:[c.jsx(DI,{children:"Role"}),i?.map(m=>c.jsx(zt,{value:m.id,children:m.role},m.id))]})})]})})}),c.jsx(Ie,{})]})}),c.jsx(Ln,{children:c.jsx("div",{className:"flex justify-between w-full",children:c.jsxs(he,{type:"submit",variant:"submit",className:"rounded-full",disabled:l,children:[c.jsx(Ii,{})," Add User"]})})})]})})})})}const j$e=Mt({username:Id.shape.username,role:Id.shape.role,newPassword:Id.shape.password.or(Kc()).optional(),confirmPassword:Id.shape.confirmPassword}).refine(e=>!e.newPassword||e.newPassword.length>=8,{error:"Password must be at least 8 characters long.",path:["password"]}).refine(e=>!e.newPassword||e.newPassword===e.confirmPassword,{error:"Passwords do not match.",path:["confirmPassword"]});function R$e({data:e,onUserUpdated:t}){const n=Ut(),{data:r}=Ri(dT(n)),{mutate:i,isPending:o}=fEe(),a=Qt({resolver:an(j$e),defaultValues:{username:e.username,role:e.role.role,newPassword:"",confirmPassword:""}}),l=b.useCallback(d=>{const f={username:e.username,role:d.role,...n};d.newPassword&&(f.password=d.newPassword),i(f,{onSuccess:()=>{a.reset(),ye.success("User edited successfully!"),t()}})},[a,i,e.username,n,t]);return c.jsx(en,{...a,children:c.jsxs("form",{onSubmit:a.handleSubmit(l),className:"grid gap-4 my-4",children:[c.jsx(cr,{children:c.jsx(In,{children:"Edit User"})}),c.jsx(Ne,{control:a.control,name:"username",render:({field:d})=>c.jsxs(je,{children:[c.jsx(Re,{className:"pb-1",children:"Username"}),c.jsx(Te,{children:c.jsx(ze,{type:"text",enterKeyHint:"next",autoComplete:"username",disabled:!0,readOnly:!0,...d})}),c.jsx(Ie,{})]})}),c.jsx(Ne,{control:a.control,name:"newPassword",render:({field:d})=>c.jsxs(je,{children:[c.jsx(Re,{className:"pb-1",children:"Change Password"}),c.jsx(Te,{children:c.jsx(ze,{type:"password",enterKeyHint:"next",autoComplete:"new-password",...d})}),c.jsx(Ie,{})]})}),c.jsx(Ne,{control:a.control,name:"confirmPassword",render:({field:d})=>c.jsxs(je,{children:[c.jsx(Re,{className:"pb-1",children:"Confirm Password"}),c.jsx(Te,{children:c.jsx(ze,{type:"password",enterKeyHint:"next",autoComplete:"new-password",...d})}),c.jsx(Ie,{})]})}),c.jsx(Ne,{control:a.control,name:"role",render:({field:d})=>c.jsxs(je,{children:[c.jsx(Re,{className:"pb-1",children:"Role"}),c.jsx(b.Suspense,{fallback:c.jsx(Lr,{}),children:c.jsx(Te,{children:c.jsxs(Qi,{...d,onValueChange:f=>d.onChange(f),children:[c.jsx(to,{className:"w-full",children:c.jsx(eo,{placeholder:"Choose Role"})}),c.jsx(no,{children:c.jsxs(ia,{children:[c.jsx(DI,{children:"Role"}),r?.map(f=>c.jsx(zt,{value:f.id,children:f.role},f.id))]})})]})})}),c.jsx(Ie,{})]})}),c.jsx(Ln,{children:c.jsx("div",{className:"flex justify-between w-full",children:c.jsxs(he,{variant:"submit",className:"rounded-full",disabled:o,children:[c.jsx(Ii,{})," Save Changes"]})})})]})})}const I$e=Mt({username:pI,confirmUsernameForDeletion:Xe().nonempty({error:"Please type the username again to confirm deletion."}).toLowerCase()}).refine(e=>e.username===e.confirmUsernameForDeletion,{error:"Username does not match.",path:["confirmUsernameForDeletion"]});function T$e({data:e,onUserDeleted:t}){const{mutate:n,isPending:r}=pEe(),i=Qt({resolver:an(I$e),defaultValues:{username:e.username,confirmUsernameForDeletion:""}}),o=hx(),a=b.useCallback(()=>{n({username:e.username,...o},{onSuccess:()=>{i.reset(),ye.success("User deleted successfully!"),t()}})},[e.username,i,n,o,t]);return c.jsx(en,{...i,children:c.jsxs("form",{onSubmit:i.handleSubmit(a),className:"grid gap-4 my-4",children:[c.jsx(Ne,{control:i.control,name:"confirmUsernameForDeletion",render:({field:l})=>c.jsxs(je,{children:[c.jsx(Re,{className:"pb-1",children:"Confirm Username"}),c.jsx(Te,{children:c.jsx(ze,{type:"text",enterKeyHint:"next",autoComplete:"username",...l})}),c.jsx(Ie,{})]})}),c.jsx(Ln,{children:c.jsx("div",{className:"flex justify-between w-full",children:c.jsxs(he,{variant:"destructive",className:"rounded-full",disabled:r||!i.formState.isValid,children:[c.jsx(aa,{})," Delete User"]})})})]})})}function N$e({closeModal:e,clusterId:t,instanceId:n,data:r,isModalOpen:i,onUserDeleted:o,onUserUpdated:a}){const f=!(_s().user?.username===r.username);return c.jsx(Dn,{onOpenChange:e,open:i,children:c.jsxs($n,{className:"sm:max-w-[750px]",children:[c.jsx(R$e,{data:r,onUserUpdated:a}),f&&c.jsx(T$e,{data:r,onUserDeleted:o})]})})}function A$e({entityId:e,instanceClient:t}){return{queryKey:[e,"list_users"],queryFn:()=>O$e({instanceClient:t}),refetchInterval:1e4}}async function O$e({instanceClient:e}){const{data:t}=await e.post("/",{operation:"list_users"});return t}function rz(){const e=Cn(),{instanceId:t,clusterId:n,username:r}=nt({strict:!1}),i=Ut(),{data:o,refetch:a,isFetching:l,isRefetching:d}=Ri(A$e(i)),f=b.useMemo(()=>o?.find(N=>N.username===r),[o,r]),m=b.useCallback(N=>{const D=[r?"..":"",N].filter(Boolean);e({to:D.join("/")})},[r,e]),h=!!r&&!!f,[v,y]=b.useState(!1),[x]=b.useState({attribute:"username",descending:!1}),S=b.useMemo(()=>[{desc:x.descending,id:x.attribute}],[x]),C=b.useCallback(()=>{y(!0)},[y]),k=b.useCallback(()=>{a(),y(!1)},[a,y]),E=b.useCallback(N=>{m(N.original.username)},[m]),j=b.useCallback(()=>{m(void 0)},[m]),I=b.useCallback(()=>{a(),m(void 0)},[m,a]),A=b.useCallback(()=>{a(),m(void 0)},[m,a]),T=Da(a);return c.jsxs(b.Suspense,{fallback:c.jsx(ao,{className:"flex flex-col items-center justify-center h-full",text:"Loading..."}),children:[c.jsxs(Kl,{data:o,isFetching:l||d,columns:k$e,onRowClick:E,sortingState:S,children:[c.jsxs(he,{variant:"defaultOutline",onClick:T,accessKey:"r",disabled:l||d,children:[c.jsx($o,{})," ",c.jsxs("span",{className:"hidden lg:inline-block",children:[c.jsx("u",{children:"R"}),"efresh"]})]}),c.jsxs(he,{variant:"positiveOutline",onClick:C,accessKey:"a",disabled:v,children:[c.jsx(Tr,{})," ",c.jsxs("span",{children:[c.jsx("u",{children:"A"}),"dd"]})]})]}),c.jsx(E$e,{isModalOpen:v,onChangesSaved:k,setIsModalOpen:y}),h&&c.jsx(N$e,{instanceId:t,clusterId:n,closeModal:j,data:f,isModalOpen:h,onUserDeleted:A,onUserUpdated:I})]})}function jm({context:e,params:t}){const n=NU(t);return e.queryClient.ensureQueryData(uT(n))}function D$e(e){const t=Qe({getParentRoute:()=>e,path:"config",component:DDe,loader:jm}),n=Qe({getParentRoute:()=>t,path:"/",component:BDe,loader:jm}),r=Qe({getParentRoute:()=>t,path:"roles",component:ez}),i=Qe({getParentRoute:()=>t,path:"roles/$roleId",component:ez}),o=Qe({getParentRoute:()=>t,path:"users",component:rz}),a=Qe({getParentRoute:()=>t,path:"users/$username",component:rz}),l=Qe({getParentRoute:()=>t,path:"domains",component:NDe}),d=Qe({getParentRoute:()=>t,path:"ssh-keys",component:tz}),f=Qe({getParentRoute:()=>t,path:"ssh-keys/$keyName",component:tz}),m=Qe({getParentRoute:()=>t,path:"certificates",component:JM}),h=Qe({getParentRoute:()=>t,path:"certificates/$certName",component:JM});return t.addChildren([n,r,i,o,a,l,d,f,m,h])}function Kk({clusterId:e,databaseName:t,instanceId:n,organizationId:r,tableName:i}){const o=["databases",t,i].filter(Lo).join("/");return Rr({organizationId:r,instanceId:n,clusterId:e},o)}function $$e(e,t){return b.useReducer((n,r)=>t[n][r]??n,e)}var fT="ScrollArea",[cG]=Ti(fT),[P$e,Vo]=cG(fT),uG=b.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:i,scrollHideDelay:o=600,...a}=e,[l,d]=b.useState(null),[f,m]=b.useState(null),[h,v]=b.useState(null),[y,x]=b.useState(null),[S,C]=b.useState(null),[k,E]=b.useState(0),[j,I]=b.useState(0),[A,T]=b.useState(!1),[N,D]=b.useState(!1),L=ft(t,ee=>d(ee)),H=lu(i);return c.jsx(P$e,{scope:n,type:r,dir:H,scrollHideDelay:o,scrollArea:l,viewport:f,onViewportChange:m,content:h,onContentChange:v,scrollbarX:y,onScrollbarXChange:x,scrollbarXEnabled:A,onScrollbarXEnabledChange:T,scrollbarY:S,onScrollbarYChange:C,scrollbarYEnabled:N,onScrollbarYEnabledChange:D,onCornerWidthChange:E,onCornerHeightChange:I,children:c.jsx(Ge.div,{dir:H,...a,ref:L,style:{position:"relative","--radix-scroll-area-corner-width":k+"px","--radix-scroll-area-corner-height":j+"px",...e.style}})})});uG.displayName=fT;var dG="ScrollAreaViewport",fG=b.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:i,...o}=e,a=Vo(dG,n),l=b.useRef(null),d=ft(t,l,a.onViewportChange);return c.jsxs(c.Fragment,{children:[c.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),c.jsx(Ge.div,{"data-radix-scroll-area-viewport":"",...o,ref:d,style:{overflowX:a.scrollbarXEnabled?"scroll":"hidden",overflowY:a.scrollbarYEnabled?"scroll":"hidden",...e.style},children:c.jsx("div",{ref:a.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});fG.displayName=dG;var Pa="ScrollAreaScrollbar",pG=b.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=Vo(Pa,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:a}=i,l=e.orientation==="horizontal";return b.useEffect(()=>(l?o(!0):a(!0),()=>{l?o(!1):a(!1)}),[l,o,a]),i.type==="hover"?c.jsx(M$e,{...r,ref:t,forceMount:n}):i.type==="scroll"?c.jsx(z$e,{...r,ref:t,forceMount:n}):i.type==="auto"?c.jsx(mG,{...r,ref:t,forceMount:n}):i.type==="always"?c.jsx(pT,{...r,ref:t}):null});pG.displayName=Pa;var M$e=b.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=Vo(Pa,e.__scopeScrollArea),[o,a]=b.useState(!1);return b.useEffect(()=>{const l=i.scrollArea;let d=0;if(l){const f=()=>{window.clearTimeout(d),a(!0)},m=()=>{d=window.setTimeout(()=>a(!1),i.scrollHideDelay)};return l.addEventListener("pointerenter",f),l.addEventListener("pointerleave",m),()=>{window.clearTimeout(d),l.removeEventListener("pointerenter",f),l.removeEventListener("pointerleave",m)}}},[i.scrollArea,i.scrollHideDelay]),c.jsx(lr,{present:n||o,children:c.jsx(mG,{"data-state":o?"visible":"hidden",...r,ref:t})})}),z$e=b.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=Vo(Pa,e.__scopeScrollArea),o=e.orientation==="horizontal",a=nw(()=>d("SCROLL_END"),100),[l,d]=$$e("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return b.useEffect(()=>{if(l==="idle"){const f=window.setTimeout(()=>d("HIDE"),i.scrollHideDelay);return()=>window.clearTimeout(f)}},[l,i.scrollHideDelay,d]),b.useEffect(()=>{const f=i.viewport,m=o?"scrollLeft":"scrollTop";if(f){let h=f[m];const v=()=>{const y=f[m];h!==y&&(d("SCROLL"),a()),h=y};return f.addEventListener("scroll",v),()=>f.removeEventListener("scroll",v)}},[i.viewport,o,d,a]),c.jsx(lr,{present:n||l!=="hidden",children:c.jsx(pT,{"data-state":l==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:Oe(e.onPointerEnter,()=>d("POINTER_ENTER")),onPointerLeave:Oe(e.onPointerLeave,()=>d("POINTER_LEAVE"))})})}),mG=b.forwardRef((e,t)=>{const n=Vo(Pa,e.__scopeScrollArea),{forceMount:r,...i}=e,[o,a]=b.useState(!1),l=e.orientation==="horizontal",d=nw(()=>{if(n.viewport){const f=n.viewport.offsetWidth<n.viewport.scrollWidth,m=n.viewport.offsetHeight<n.viewport.scrollHeight;a(l?f:m)}},10);return mf(n.viewport,d),mf(n.content,d),c.jsx(lr,{present:r||o,children:c.jsx(pT,{"data-state":o?"visible":"hidden",...i,ref:t})})}),pT=b.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,i=Vo(Pa,e.__scopeScrollArea),o=b.useRef(null),a=b.useRef(0),[l,d]=b.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),f=bG(l.viewport,l.content),m={...r,sizes:l,onSizesChange:d,hasThumb:f>0&&f<1,onThumbChange:v=>o.current=v,onThumbPointerUp:()=>a.current=0,onThumbPointerDown:v=>a.current=v};function h(v,y){return H$e(v,a.current,l,y)}return n==="horizontal"?c.jsx(L$e,{...m,ref:t,onThumbPositionChange:()=>{if(i.viewport&&o.current){const v=i.viewport.scrollLeft,y=iz(v,l,i.dir);o.current.style.transform=`translate3d(${y}px, 0, 0)`}},onWheelScroll:v=>{i.viewport&&(i.viewport.scrollLeft=v)},onDragScroll:v=>{i.viewport&&(i.viewport.scrollLeft=h(v,i.dir))}}):n==="vertical"?c.jsx(F$e,{...m,ref:t,onThumbPositionChange:()=>{if(i.viewport&&o.current){const v=i.viewport.scrollTop,y=iz(v,l);o.current.style.transform=`translate3d(0, ${y}px, 0)`}},onWheelScroll:v=>{i.viewport&&(i.viewport.scrollTop=v)},onDragScroll:v=>{i.viewport&&(i.viewport.scrollTop=h(v))}}):null}),L$e=b.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...i}=e,o=Vo(Pa,e.__scopeScrollArea),[a,l]=b.useState(),d=b.useRef(null),f=ft(t,d,o.onScrollbarXChange);return b.useEffect(()=>{d.current&&l(getComputedStyle(d.current))},[d]),c.jsx(gG,{"data-orientation":"horizontal",...i,ref:f,sizes:n,style:{bottom:0,left:o.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:o.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":tw(n)+"px",...e.style},onThumbPointerDown:m=>e.onThumbPointerDown(m.x),onDragScroll:m=>e.onDragScroll(m.x),onWheelScroll:(m,h)=>{if(o.viewport){const v=o.viewport.scrollLeft+m.deltaX;e.onWheelScroll(v),wG(v,h)&&m.preventDefault()}},onResize:()=>{d.current&&o.viewport&&a&&r({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:d.current.clientWidth,paddingStart:Ab(a.paddingLeft),paddingEnd:Ab(a.paddingRight)}})}})}),F$e=b.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...i}=e,o=Vo(Pa,e.__scopeScrollArea),[a,l]=b.useState(),d=b.useRef(null),f=ft(t,d,o.onScrollbarYChange);return b.useEffect(()=>{d.current&&l(getComputedStyle(d.current))},[d]),c.jsx(gG,{"data-orientation":"vertical",...i,ref:f,sizes:n,style:{top:0,right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":tw(n)+"px",...e.style},onThumbPointerDown:m=>e.onThumbPointerDown(m.y),onDragScroll:m=>e.onDragScroll(m.y),onWheelScroll:(m,h)=>{if(o.viewport){const v=o.viewport.scrollTop+m.deltaY;e.onWheelScroll(v),wG(v,h)&&m.preventDefault()}},onResize:()=>{d.current&&o.viewport&&a&&r({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:d.current.clientHeight,paddingStart:Ab(a.paddingTop),paddingEnd:Ab(a.paddingBottom)}})}})}),[U$e,hG]=cG(Pa),gG=b.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:i,onThumbChange:o,onThumbPointerUp:a,onThumbPointerDown:l,onThumbPositionChange:d,onDragScroll:f,onWheelScroll:m,onResize:h,...v}=e,y=Vo(Pa,n),[x,S]=b.useState(null),C=ft(t,L=>S(L)),k=b.useRef(null),E=b.useRef(""),j=y.viewport,I=r.content-r.viewport,A=An(m),T=An(d),N=nw(h,10);function D(L){if(k.current){const H=L.clientX-k.current.left,ee=L.clientY-k.current.top;f({x:H,y:ee})}}return b.useEffect(()=>{const L=H=>{const ee=H.target;x?.contains(ee)&&A(H,I)};return document.addEventListener("wheel",L,{passive:!1}),()=>document.removeEventListener("wheel",L,{passive:!1})},[j,x,I,A]),b.useEffect(T,[r,T]),mf(x,N),mf(y.content,N),c.jsx(U$e,{scope:n,scrollbar:x,hasThumb:i,onThumbChange:An(o),onThumbPointerUp:An(a),onThumbPositionChange:T,onThumbPointerDown:An(l),children:c.jsx(Ge.div,{...v,ref:C,style:{position:"absolute",...v.style},onPointerDown:Oe(e.onPointerDown,L=>{L.button===0&&(L.target.setPointerCapture(L.pointerId),k.current=x.getBoundingClientRect(),E.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",y.viewport&&(y.viewport.style.scrollBehavior="auto"),D(L))}),onPointerMove:Oe(e.onPointerMove,D),onPointerUp:Oe(e.onPointerUp,L=>{const H=L.target;H.hasPointerCapture(L.pointerId)&&H.releasePointerCapture(L.pointerId),document.body.style.webkitUserSelect=E.current,y.viewport&&(y.viewport.style.scrollBehavior=""),k.current=null})})})}),Nb="ScrollAreaThumb",vG=b.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=hG(Nb,e.__scopeScrollArea);return c.jsx(lr,{present:n||i.hasThumb,children:c.jsx(V$e,{ref:t,...r})})}),V$e=b.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...i}=e,o=Vo(Nb,n),a=hG(Nb,n),{onThumbPositionChange:l}=a,d=ft(t,h=>a.onThumbChange(h)),f=b.useRef(void 0),m=nw(()=>{f.current&&(f.current(),f.current=void 0)},100);return b.useEffect(()=>{const h=o.viewport;if(h){const v=()=>{if(m(),!f.current){const y=q$e(h,l);f.current=y,l()}};return l(),h.addEventListener("scroll",v),()=>h.removeEventListener("scroll",v)}},[o.viewport,m,l]),c.jsx(Ge.div,{"data-state":a.hasThumb?"visible":"hidden",...i,ref:d,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:Oe(e.onPointerDownCapture,h=>{const y=h.target.getBoundingClientRect(),x=h.clientX-y.left,S=h.clientY-y.top;a.onThumbPointerDown({x,y:S})}),onPointerUp:Oe(e.onPointerUp,a.onThumbPointerUp)})});vG.displayName=Nb;var mT="ScrollAreaCorner",yG=b.forwardRef((e,t)=>{const n=Vo(mT,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?c.jsx(B$e,{...e,ref:t}):null});yG.displayName=mT;var B$e=b.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,i=Vo(mT,n),[o,a]=b.useState(0),[l,d]=b.useState(0),f=!!(o&&l);return mf(i.scrollbarX,()=>{const m=i.scrollbarX?.offsetHeight||0;i.onCornerHeightChange(m),d(m)}),mf(i.scrollbarY,()=>{const m=i.scrollbarY?.offsetWidth||0;i.onCornerWidthChange(m),a(m)}),f?c.jsx(Ge.div,{...r,ref:t,style:{width:o,height:l,position:"absolute",right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Ab(e){return e?parseInt(e,10):0}function bG(e,t){const n=e/t;return isNaN(n)?0:n}function tw(e){const t=bG(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function H$e(e,t,n,r="ltr"){const i=tw(n),o=i/2,a=t||o,l=i-a,d=n.scrollbar.paddingStart+a,f=n.scrollbar.size-n.scrollbar.paddingEnd-l,m=n.content-n.viewport,h=r==="ltr"?[0,m]:[m*-1,0];return xG([d,f],h)(e)}function iz(e,t,n="ltr"){const r=tw(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-i,a=t.content-t.viewport,l=o-r,d=n==="ltr"?[0,a]:[a*-1,0],f=dk(e,d);return xG([0,a],[0,l])(f)}function xG(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function wG(e,t){return e>0&&e<t}var q$e=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return(function i(){const o={left:e.scrollLeft,top:e.scrollTop},a=n.left!==o.left,l=n.top!==o.top;(a||l)&&t(),n=o,r=window.requestAnimationFrame(i)})(),()=>window.cancelAnimationFrame(r)};function nw(e,t){const n=An(e),r=b.useRef(0);return b.useEffect(()=>()=>window.clearTimeout(r.current),[]),b.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function mf(e,t){const n=An(t);ar(()=>{let r=0;if(e){const i=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return i.observe(e),()=>{window.cancelAnimationFrame(r),i.unobserve(e)}}},[e,n])}var K$e=uG,G$e=fG,Z$e=yG;function Y$e({className:e,children:t,...n}){return c.jsxs(K$e,{"data-slot":"scroll-area",className:Ve("relative",e),...n,children:[c.jsx(G$e,{"data-slot":"scroll-area-viewport",className:"focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",children:t}),c.jsx(W$e,{}),c.jsx(Z$e,{})]})}function W$e({className:e,orientation:t="vertical",...n}){return c.jsx(pG,{"data-slot":"scroll-area-scrollbar",orientation:t,className:Ve("flex touch-none p-px transition-colors select-none",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",e),...n,children:c.jsx(vG,{"data-slot":"scroll-area-thumb",className:"bg-border relative flex-1 rounded-full"})})}async function X$e({databaseName:e,tableName:t,primaryKey:n,replicated:r,instanceClient:i}){const{data:o}=await i.post("/",{operation:"create_table",database:e,table:t,primary_key:n,replicated:r});return o}function J$e(){return ot({mutationFn:X$e})}const ly=Mt({databaseName:aG,tableName:sG,primaryKey:Xe().regex(ew,{error:"Primary key cannot include backticks or forward slashes."}).max(250,{error:"Primary key cannot be longer than 250 characters."})});function Q$e({databaseName:e,onSelectTable:t}){const n=sr(),r=Ut(),i=_n(),[o,a]=b.useState(!1),l=Qt({resolver:an(ly),defaultValues:{databaseName:e||"",tableName:"",primaryKey:""}}),{mutate:d}=J$e(),f=async m=>{const h=m.databaseName||"data",v=m.tableName;d({databaseName:h,tableName:v,primaryKey:m.primaryKey||"id",...r,replicated:r.entityType==="cluster"},{onSuccess:async()=>{await n.invalidateQueries({queryKey:[r.entityId,"describe_all"],refetchType:"all"}),ye.success(`Table ${v} created successfully`),a(!1),l.reset(),t(h,v),await i.invalidate()}})};return c.jsxs(Dn,{open:o,onOpenChange:a,children:[c.jsx(K8,{asChild:!0,children:c.jsx("div",{className:"sticky bottom-0 py-4 bg-black/70 backdrop-blur-xs",children:c.jsxs(he,{variant:"positiveOutline",className:"w-full rounded-full",size:"lg",accessKey:"t",children:[c.jsx(Tr,{}),c.jsxs("span",{children:["Create a ",c.jsx("u",{children:"T"}),"able"]})]})})}),c.jsxs($n,{className:"sm:max-w-[425px]",children:[c.jsxs(cr,{children:[c.jsx(In,{children:"Create a New Table"}),c.jsx(mr,{children:"What would you like to create?"})]}),c.jsx(en,{...l,children:c.jsxs("form",{onSubmit:l.handleSubmit(f),className:"grid gap-6 text-white",children:[c.jsx(Ne,{control:l.control,name:"tableName",render:({field:m})=>c.jsxs(je,{className:"",children:[c.jsx(Re,{className:"pb-1",children:"Table Name"}),c.jsx(Te,{children:c.jsx(ze,{...m,type:"text",maxLength:ly.shape.tableName.maxLength,autoFocus:!0,autoCapitalize:"off",autoComplete:"off",autoCorrect:"off"})}),c.jsx(Ie,{})]})}),c.jsx(Ne,{control:l.control,name:"primaryKey",render:({field:m})=>c.jsxs(je,{className:"",children:[c.jsx(Re,{className:"pb-1",children:"Primary Key"}),c.jsx(Te,{children:c.jsx(ze,{...m,placeholder:"id",type:"text",maxLength:ly.shape.primaryKey.maxLength,autoCapitalize:"off",autoComplete:"off",autoCorrect:"off"})}),c.jsx(Ie,{})]})}),c.jsx(Ne,{control:l.control,name:"databaseName",render:({field:m})=>c.jsxs(je,{className:"",children:[c.jsx(Re,{className:"pb-1",children:"Database Name"}),c.jsx(Te,{children:c.jsx(ze,{...m,type:"text",placeholder:"data",maxLength:ly.shape.databaseName.maxLength,autoCapitalize:"off",autoComplete:"off",autoCorrect:"off"})}),c.jsx(Ie,{})]})}),c.jsx(Ln,{children:c.jsxs(he,{type:"submit",variant:"submit",className:"rounded-full",children:[c.jsx(Zne,{}),"Create New Table"]})})]})})]})]})}function e2e({instanceDatabaseMap:e}){const t=_n(),n=!e,r=nt({strict:!1}),i=Cn(),o=If(),{databaseNames:a,tableNames:l}=b.useMemo(()=>{const m=Object.keys(e||{}).sort(),h=r.databaseName?Object.keys(e?.[r.databaseName]||[]).sort():[];return{databaseNames:m,tableNames:h}},[e,r.databaseName]),d=b.useCallback(m=>{const h=m?Object.keys(e?.[m]||[]).sort():[];r.databaseName?i({to:Kk({...r,databaseName:m,tableName:h[0]})}):t.invalidate()},[e,r,t,i]),f=b.useCallback((m,h)=>{i({to:Kk({...r,databaseName:m,tableName:h})})},[i,r]);return c.jsxs("div",{className:"pl-3",children:[c.jsx("h1",{className:"pt-3 pb-3 text-3xl",children:"Databases"}),n?c.jsx(Lr,{className:"w-full h-9 m-0 rounded-md bg-gray-700"}):c.jsx("div",{className:"flex space-x-2",children:c.jsxs(Qi,{name:"databaseSelect",value:r.databaseName||"",disabled:a.length===0,onValueChange:d,children:[c.jsx(to,{className:"w-full",children:c.jsx(eo,{placeholder:"Select a Database"})}),c.jsx(no,{children:c.jsx(ia,{children:a.map(m=>c.jsx(zt,{value:m,children:m},m))})})]})}),n?c.jsx(Lr,{className:"w-full min-h-80 rounded-md bg-gray-700 mb-0"}):c.jsxs(Y$e,{className:"border rounded-md min-h-80 border-grey-700 mt-4",children:[l.length===0&&r.databaseName?.length?c.jsxs("div",{className:"w-full h-full text-center",children:[c.jsx("p",{className:"py-6",children:"No tables found in this database."}),o&&c.jsx("p",{children:'Tap "Create a Table" below!'})]}):l.length===0&&!r.databaseName?.length?c.jsxs("p",{className:"pt-2 text-sm text-center",children:["Please ",a.length===0?"create":"select"," a table."]}):"",c.jsx("ul",{children:l.map(m=>c.jsx("li",{className:"flex items-center p-2 border-b hover:bg-grey-700/80 border-grey-700",children:c.jsxs(he,{onClick:()=>f(r.databaseName,m),size:"lg",className:"items-center justify-between w-full bg-transparent border-none shadow-none hover:bg-transparent",children:[m,c.jsx("span",{children:r.tableName===m&&c.jsx(wi,{})})]})},m))})]}),o&&c.jsx(Q$e,{databaseName:r.databaseName,onSelectTable:f})]})}function t2e(e){if(!e)return{dataTableColumns:[],hashAttribute:""};const{hash_attribute:t,attributes:n}=e,r=[],i=[],o=[],a=[];for(let l=n.length-1;l>=0;l--){const{attribute:d,type:f,is_primary_key:m,indexed:h}=n[l],v={header:d,accessorKey:d,enableSorting:!!(m||h),enableColumnFilter:!!(m||h),size:n2e(f)};m?r.push(v):d==="__createdtime__"||d==="__updatedtime__"?a.push(v):v.enableSorting?i.push(v):o.push(v)}return{dataTableColumns:[...r,...i,...o,...a],hashAttribute:t}}function n2e(e){switch(e){case"Id":case"ID":return 1;case"Boolean":return 1;case"Int":case"Long":case"Float":case"BigInt":return 1;default:return Math.round(window.innerWidth*.1)}}async function r2e({databaseName:e,tableName:t,records:n,instanceClient:r}){const{data:i}=await r.post("/",{operation:"insert",database:e,table:t,records:n});return i}function i2e(){return ot({mutationFn:r2e})}function o2e({isModalOpen:e,instanceTable:t,setIsModalOpen:n,refreshTable:r}){const{mutate:i,isPending:o}=i2e(),a=Ut(),[l,d]=b.useState(!0),[f,m]=b.useState(),[h,v]=b.useState(!1),[y,x]=b.useState([]),S=b.useMemo(()=>{const E={};for(const j of t.attributes)j.is_primary_key||j.attribute==="__createdtime__"||j.attribute==="__updatedtime__"||(E[j.attribute]=a2e(j.type));return JSON.stringify(E,null,4)},[t]),C=b.useCallback(E=>{v(!0),d(E.length===0)},[d]),k=b.useCallback(()=>{if(f&&l){const E=JSON.parse(f),j=Array.isArray(E)?E:[E],I=ye.loading(`Adding ${j.length} records...`);i({...a,databaseName:t.schema,tableName:t.name,records:j},{onSuccess:A=>{r(),A.skipped_hashes?.length||n(!1),x(A.skipped_hashes),(A.skipped_hashes?.length>0?ye.warning:ye.success)(A.skipped_hashes?.length>0?"Warning!":"Success!",{id:I,description:c.jsxs(c.Fragment,{children:[A.inserted_hashes.length>0&&c.jsxs("p",{children:["Added ",Mr(A.inserted_hashes.length,"record","records")]}),A.skipped_hashes.length>0&&c.jsxs("p",{children:["Skipped ",Mr(A.skipped_hashes.length,"record","records")]})]})})}})}},[f,i,a,t.name,t.schema,l,r,n]);return c.jsx(Dn,{onOpenChange:n,open:e,children:c.jsxs($n,{"aria-describedby":void 0,onEscapeKeyDown:E=>{h&&E.preventDefault()},children:[c.jsx(cr,{children:c.jsxs(In,{children:["Add New ",t.name]})}),t?.hash_attribute&&c.jsxs("div",{className:"text-sm text-gray-500",children:["The primary key for this table is"," ",c.jsxs("strong",{children:["“",t.hash_attribute,"”"]}),", and will auto-generate. You may manually add it if you want to specify its value."]}),c.jsx(V0,{className:"w-full h-96",language:"json",theme:"vs-dark",value:S,onValidate:C,onChange:m,options:{minimap:{enabled:!1}}}),c.jsxs("div",{className:"text-sm text-gray-500",children:[c.jsx("strong",{children:"Provide an [array]"})," if you want to add more than one record at a time."]}),y.length>0&&c.jsxs(BK,{className:"mt-2",children:[c.jsx(J4,{className:"w-4 h-4"}),c.jsxs(vOe,{children:["Skipped ",y.length===1?"Hash":"Hashes"," Detected"]}),c.jsx(HK,{className:"max-h-36 overflow-auto",children:c.jsx("ol",{children:y.map(E=>c.jsx("li",{children:E},E))})})]}),c.jsx(Ln,{children:c.jsx("div",{className:"flex justify-between w-full",children:c.jsxs(he,{variant:"submit",className:"rounded-full",onClick:k,accessKey:"s",disabled:!f||!l||o,children:[c.jsx(Ii,{})," ",c.jsxs("span",{children:[c.jsx("u",{children:"S"}),"ave Changes"]})]})})})]})})}function a2e(e){switch(e){case"Date":return new Date().toISOString();case"Id":case"ID":case"String":return"";case"Boolean":return!1;case"Int":case"Long":case"Float":case"BigInt":return 0;default:return null}}async function s2e({databaseName:e,replicated:t,instanceClient:n}){const{data:r}=await n.post("/",{operation:"drop_database",database:e,replicated:t});return r}function l2e(){return ot({mutationFn:s2e})}function c2e({databaseName:e,onDeleted:t}){const{value:n,trigger:r}=Gl("ShowDeleteDatabase",!1),i=b.useCallback(()=>{ii("ShowDeleteDatabase",!1),Yl(r)},[r]),o=If(),a=sr(),l=Ut(),d=_n(),{mutate:f,isPending:m}=l2e(),h=b.useCallback(()=>{f({databaseName:e,...l,replicated:l.entityType==="cluster"},{onSuccess:async()=>{i(),await a.invalidateQueries({queryKey:[l.entityId,"describe_all"],refetchType:"all"}),await d.invalidate(),ye.success(`Database ${e} dropped successfully`),t("database")}})},[i,e,f,l,t,a,d]);return!o||!e?c.jsx(c.Fragment,{}):c.jsx(Bh,{typeOfThingBeingDeleted:"database",nameOfThingBeingDeleted:e,transitiveVerb:"Drop",presentParticiple:"Dropping",isModalOpen:n,setIsModalOpen:i,deletionConfirmed:h,deletionPending:m})}async function u2e({databaseName:e,tableName:t,replicated:n,instanceClient:r}){const{data:i}=await r.post("/",{operation:"drop_table",database:e,table:t,replicated:n});return i}function d2e(){return ot({mutationFn:u2e})}function f2e({databaseName:e,tableName:t,onDeleted:n}){const{value:r,trigger:i}=Gl("ShowDeleteTable",!1),o=b.useCallback(()=>{ii("ShowDeleteTable",!1),Yl(i)},[i]),a=If(),l=sr(),d=Ut(),f=_n(),{mutate:m,isPending:h}=d2e(),v=b.useCallback(()=>{m({databaseName:e,tableName:t,...d,replicated:d.entityType==="cluster"},{onSuccess:async()=>{o(),await l.invalidateQueries({queryKey:[d.entityId,"describe_all"],refetchType:"all"}),await f.invalidate(),ye.success(`Table ${t} dropped successfully`),n("table")}})},[o,e,m,d,n,l,f,t]);return!a||!e?c.jsx(c.Fragment,{}):c.jsx(Bh,{typeOfThingBeingDeleted:"table",nameOfThingBeingDeleted:`${e} > ${t}`,transitiveVerb:"Drop",presentParticiple:"Dropping",isModalOpen:r,setIsModalOpen:o,deletionConfirmed:v,deletionPending:h})}function p2e({canEditRecords:e,canDeleteRecords:t,setIsModalOpen:n,isModalOpen:r,hashAttribute:i,data:o,onSaveChanges:a,onDeleteRecord:l,isUpdateTableRecordsPending:d,isDeleteTableRecordsPending:f}){const[m,h]=b.useState(!0),[v,y]=b.useState(!1),[x,S]=b.useState(),C=b.useMemo(()=>{const E=o?.map(({__createdtime__:j,__updatedtime__:I,...A})=>A);return JSON.stringify(E,null,4)},[o]),k=b.useCallback(E=>{y(!0),h(E.length===0)},[h]);return c.jsx(Dn,{onOpenChange:n,open:r,children:c.jsxs($n,{"aria-describedby":void 0,onEscapeKeyDown:e?E=>{v&&E.preventDefault()}:void 0,children:[c.jsx(cr,{children:c.jsxs(In,{children:[e?"Edit":"View"," Row"]})}),o?c.jsx(V0,{className:"w-full h-96",language:"json",theme:"vs-dark",options:e?void 0:{readOnly:!0},value:C,onValidate:k,onChange:E=>{S(E)}}):c.jsx(ao,{}),c.jsx(Ln,{children:c.jsxs("div",{className:"flex justify-between w-full",children:[t&&c.jsxs(he,{variant:"destructive",className:"rounded-full",onClick:()=>{const E=o[0]?.[i];E&&l([E])},disabled:f,children:[c.jsx(aa,{})," Delete Row"]}),e&&c.jsxs(he,{variant:"submit",className:"rounded-full",accessKey:"s",onClick:()=>{x&&m&&a(JSON.parse(x))},disabled:!x||!m||d,children:[c.jsx(Ii,{})," ",c.jsxs("span",{children:[c.jsx("u",{children:"S"}),"ave Changes"]})]})]})})]})})}async function m2e(e){const{database:t,table:n,fileData:r,instanceClient:i}=e,{data:o}=await i.post("/",{operation:"csv_data_load",database:t,action:"insert",table:n,data:r});return o}function h2e(){return ot({mutationFn:m2e})}const g2e=Mt({fileData:Xe(),database:Xe(),table:Xe()});function v2e({setIsModalOpen:e,isModalOpen:t,onSaveChanges:n,database:r,table:i}){const[o,a]=b.useState(null),l=Ut(),{mutate:d,isPending:f}=h2e(),m=y=>{if(!y.target.files)return;const x=y.target.files[0];if(x){const S=new FileReader;S.onload=C=>{const k=C.target?.result;typeof k=="string"&&(a(x),h.setValue("fileData",k))},S.readAsText(x)}},h=Qt({resolver:an(g2e),defaultValues:{database:r,table:i,fileData:""}}),v=y=>{d({fileData:y.fileData,database:r,table:i,...l},{onSuccess:({message:x})=>{h.reset(),a(null),n(x)}})};return c.jsx(Dn,{onOpenChange:()=>{e(!1),h.reset()},open:t,children:c.jsxs($n,{children:[c.jsxs(cr,{children:[c.jsx(In,{children:"Import CSV"}),c.jsx(mr,{children:"Upload a CSV file to import data into the table."})]}),c.jsx(en,{...h,children:c.jsxs("form",{onSubmit:h.handleSubmit(v),children:[c.jsx("div",{className:"w-full",children:c.jsx(Ne,{control:h.control,name:"fileData",render:({field:y})=>c.jsxs(je,{className:"relative",children:[c.jsx(Re,{htmlFor:"dropzone-file",className:"flex flex-col items-center justify-center w-full h-64 border-2 border-grey border-dashed rounded-lg cursor-pointer bg-grey-700 hover:bg-grey-700/80",children:c.jsx(Te,{children:c.jsxs("div",{children:[c.jsxs("div",{className:"flex flex-col items-center justify-center pt-5 pb-6",children:[c.jsx(V4,{className:"text-white",size:48}),c.jsx("p",{className:"mb-2 text-sm text-white",children:o?o.name:c.jsxs(c.Fragment,{children:[c.jsx("span",{className:"font-semibold",children:"Click to upload"})," or drag and drop a CSV File"]})})]}),c.jsx(ze,{id:"dropzone-file",type:"file",className:"opacity-0 w-full h-full absolute left-0 top-0 cursor-pointer",accept:".csv",name:y.name,ref:y.ref,onBlur:y.onBlur,disabled:y.disabled,onChange:m})]})})}),c.jsx(Ie,{})]})})}),c.jsx(Ln,{className:"mt-4",children:c.jsxs(he,{variant:"submit",className:"rounded-full",accessKey:"u",disabled:!o||f,children:[c.jsx(Ii,{}),c.jsxs("span",{children:[c.jsx("u",{children:"U"}),"pload CSV"]})]})})]})})]})})}async function y2e({databaseName:e,tableName:t,hashValues:n,instanceClient:r}){const{data:i}=await r.post("/",{operation:"delete",database:e,table:t,hash_values:n});return i}function b2e(){return ot({mutationFn:y2e})}function x2e({databaseName:e,tableName:t,entityId:n,instanceClient:r}){return{queryKey:[n,e,t,"describe_table"],queryFn:async()=>{const{data:i}=await r.post("/",{operation:"describe_table",database:e,table:t});return i},staleTime:6e4,gcTime:5e3,enabled:!!e&&!!t,retry:!1}}const w2e=["1","bet","k","ok","si","tru","true","yes","yup"];function S2e(e){const t=e.toLowerCase().trim();return w2e.includes(t)}function oz(e){return!isNaN(e)&&!isNaN(parseFloat(e))}function _2e(e){if(e.startsWith("0.")&&oz(e))return!0;const t=e.toUpperCase().includes("E");return!(e!=="0"&&e.startsWith("0"))&&!t&&oz(e)}const az={true:!0,TRUE:!0,false:!1,FALSE:!1,undefined:null,null:null,NULL:null,NaN:NaN},C2e=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/;function k2e(e){return e==null||e===""||typeof e!="string"?e:az[e]!==void 0?az[e]:_2e(e)?Number(e):C2e.test(e)?new Date(e):e}function E2e(e){const{enabled:t,entityId:n,databaseName:r,tableName:i,conditions:o,sort:a,pageIndex:l,pageSize:d,onlyIfCached:f}=e;return{enabled:t&&!!o,queryKey:[n,r,i,"search_by_conditions",o,a.attribute||"default",a.descending||!1,l||0,d||0,f],staleTime:6e4,gcTime:5e3,retry:!1,queryFn:()=>SG(e)}}function SG({instanceClient:e,databaseName:t,tableName:n,conditions:r,sort:i,pageIndex:o,pageSize:a,onlyIfCached:l,headers:d}){return e.post("/",{operation:"search_by_conditions",get_attributes:["*"],database:t,table:n,conditions:r,sort:i.attribute.length?i:void 0,offset:o*a,limit:a,onlyIfCached:l,noCacheStore:l},{timeout:0,headers:d})}function j2e(e,t,n){return t.split(/ & /).map(i=>R2e(e,i,n))}function R2e(e,t,n){t.startsWith(e)&&(t=t.substring(e.length));const{comparator:r,value:i}=T2e(t);switch(n?.type){case"ID":case"String":return{search_attribute:e,search_type:r,search_value:i};case"Int":case"BigInt":case"Long":case"Float":{const o=n.type.includes("Int")?parseInt(i,10):parseFloat(i);if(isNaN(o))throw new Error(`${i} does not appear to be a valid number.`);return{search_attribute:e,search_type:r,search_value:o}}case"Date":{const o=new Date(i).toISOString();return{search_attribute:e,search_type:r,search_value:o}}case"Boolean":return{search_attribute:e,search_type:r,search_value:S2e(i)};case"Blob":case"Bytes":return{search_attribute:e,search_type:r,search_value:i};default:return{search_attribute:e,search_type:r,search_value:k2e(i)}}}const sz={"=== ":"equals","== ":"eq","equals ":"equals","equal ":"equals","eq ":"eq","!== ":"not_equal","!= ":"ne","notequals ":"not_equal","notequal ":"not_equal","ne ":"ne"},I2e={">":"greater_than",g:"greater_than",gt:"greater_than","=gt":"greater_than",greater:"greater_than",greaterthan:"greater_than",">=":"greater_than_equal",ge:"greater_than_equal","=ge":"greater_than_equal",gte:"greater_than_equal",greaterorequal:"greater_than_equal",greaterthanequal:"greater_than_equal",greaterthanorequal:"greater_than_equal","<":"less_than",l:"less_than",lt:"less_than","=lt":"less_than",less:"less_than",lessthan:"less_than","<=":"less_than_equal",lte:"less_than_equal",le:"less_than_equal","=le":"less_than_equal",lessorequal:"less_than_equal",lessthanequal:"less_than_equal",lessthanorequal:"less_than_equal"};function T2e(e){const t=e.toLowerCase(),n=t.match(/^([>=<a-z_ ]+)([\d._TZ-]+)$/);if(n){const r=n[1].replace(/[_ ]+/g,"").replace(/^([a-z]+)=$/g,"$1"),i=n[2],o=I2e[r];if(o)return{comparator:o,value:i}}for(const r in sz)if(t.startsWith(r))return{comparator:sz[r],value:e.slice(r.length)};return t.endsWith("*")?{comparator:"starts_with",value:e.slice(0,-1)}:{comparator:"equals",value:e}}function N2e({enabled:e,entityId:t,instanceClient:n,databaseName:r,tableName:i,ids:o}){return{queryKey:[t,"search_by_id",r,i,o],queryFn:()=>n.post("/",{get_attributes:["*"],ids:o,noCacheStore:!0,onlyIfCached:!0,operation:"search_by_id",database:r,table:i}),enabled:e&&!!o?.length,retry:!1}}function A2e(e){const{enabled:t,entityId:n,databaseName:r,tableName:i,searchAttribute:o,sort:a,pageIndex:l,pageSize:d,onlyIfCached:f}=e;return{enabled:t,queryKey:[n,r,i,"search_by_value",o,a.attribute||"default",a.descending||!1,l||0,d||0,f],retry:!1,staleTime:6e4,gcTime:5e3,queryFn:()=>_G(e)}}function _G({instanceClient:e,databaseName:t,tableName:n,searchAttribute:r,sort:i,pageIndex:o,pageSize:a,onlyIfCached:l,headers:d}){const f=i.attribute.length&&!(i.attribute===r&&!i.descending);return e.post("/",{operation:"search_by_value",get_attributes:["*"],database:t,table:n,search_attribute:r,search_value:"*",sort:f?i:void 0,offset:o*a,limit:a,onlyIfCached:l,noCacheStore:l},{timeout:0,headers:d})}async function O2e(e){const{databaseName:t,tableName:n,records:r,instanceClient:i}=e,{data:o}=await i.post("/",{operation:"update",database:t,table:n,records:r});return o}function D2e(){return ot({mutationFn:O2e})}const $2e=y0(Xe(),Xe());function P2e({applyFilters:e,columnFiltersForm:t,headerGroups:n}){const r=b.useCallback(i=>{if(i.key==="Enter")return i.preventDefault(),e(),!1},[e]);return c.jsx(eg,{children:c.jsx(en,{...t,children:n.map(i=>c.jsx(Xi,{className:"border-none",children:i.headers.map(o=>c.jsx(Ss,{style:{width:`${o.column.getSize()}px`},children:o.column.columnDef.enableColumnFilter&&c.jsx(Ne,{control:t.control,name:o.id,render:({field:a})=>c.jsxs(je,{className:"border-r-1 border-r-black",children:[c.jsx(Te,{children:c.jsx(ze,{...a,type:"text",autoCapitalize:"none",autoComplete:"off",className:"rounded-none",onKeyDown:r,value:a.value??""})}),c.jsx(Ie,{})]})})},o.id))},i.id))})})}function M2e({columns:e,columnVisibility:t,setColumnVisibility:n}){const r=b.useMemo(()=>e.map(i=>i.header).filter(Lo),[e]);return c.jsxs(Gh,{children:[c.jsx(Zh,{asChild:!0,children:c.jsxs(he,{variant:"ghost",children:[c.jsx(Ote,{className:"inline-block "}),"Columns"]})}),c.jsx(Yh,{children:r.map(i=>c.jsx(z2e,{columnHeader:i,columnVisibility:t,setColumnVisibility:n},i))})]})}function z2e({columnHeader:e,columnVisibility:t,setColumnVisibility:n}){const{toggled:r,toggle:i}=Wm(t[e]??!0);return b.useEffect(()=>{t[e]!==r&&n({...t,[e]:r})},[e,t,r,n]),c.jsx(Vwe,{checked:r,onClick:i,children:e},e)}function L2e({className:e}){return c.jsx(K4,{className:xr("animate-spin",e)})}function F2e({applyFilters:e,columns:t,columnVisibility:n,columnFiltersForm:r,data:i,isFetching:o,onColumnClick:a,onRowClick:l,pageIndex:d,pageSize:f,setPageIndex:m,setPageSize:h,filtersToggled:v,totalPages:y,totalRecords:x}){const S=M0({data:i||[],columns:t,manualPagination:!0,enableColumnResizing:!0,columnResizeMode:"onEnd",pageCount:y,defaultColumn:{minSize:1},state:{columnVisibility:n},rowCount:x,getCoreRowModel:P0(),getPaginationRowModel:F1e()}),C=b.useCallback(()=>{m(d-1)},[d,m]),k=b.useCallback(()=>{m(d+1)},[d,m]);return c.jsxs(c.Fragment,{children:[c.jsxs(z0,{containerClassName:"rounded-md bg-black-dark grow max-h-[calc(100vh-128px-16px-112px-80px)]",children:[c.jsx(eg,{children:S.getHeaderGroups().map(E=>c.jsx(Xi,{className:"border-none",children:E.headers.map(j=>c.jsx(zq,{header:j,onColumnClick:a},j.id))},E.id))}),v&&c.jsx(P2e,{applyFilters:e,columnFiltersForm:r,headerGroups:S.getHeaderGroups()}),c.jsx(L0,{className:"bg-black border border-grey-700",children:S.getRowModel().rows?.length?S.getRowModel().rows.map(E=>c.jsx(Xi,{"data-state":E.getIsSelected()&&"selected",onClick:()=>l?.(E),className:Ve("hover:bg-muted/10 data-[state=selected]:bg-muted",l&&"cursor-pointer"),children:E.getVisibleCells().map(j=>c.jsx(Ss,{style:{width:`${j.column.getSize()}px`},className:"px-2 py-2 overflow-x-hidden max-w-32 text-ellipsis whitespace-nowrap",children:j.getValue()=="[object Object]"?JSON.stringify(j.getValue()):Xc(j.column.columnDef.cell,j.getContext())},j.id))},E.id)):c.jsx(Xi,{children:c.jsx(Ss,{colSpan:t.length,className:"h-24 text-center",children:o||i===void 0?c.jsx(L2e,{className:"opacity-50 inline-block"}):c.jsx("span",{children:"No results."})})})})]}),c.jsxs("div",{className:"flex items-center justify-end py-4 space-x-2 pr-4",children:[c.jsxs(he,{variant:"defaultOutline",size:"sm",onClick:C,className:"select-none",disabled:d===0,children:[c.jsx(Fc,{}),"Previous"]}),c.jsx("div",{className:"grow"}),c.jsxs("div",{className:"text-center",children:[c.jsx("dt",{className:"font-medium text-gray-500 text-sm/6 dark:text-gray-400",children:"Records"}),c.jsx("dd",{className:"font-semibold tracking-tight",children:x===void 0?c.jsx(Lr,{}):jy(x)})]}),x!==void 0&&x>0&&c.jsxs(c.Fragment,{children:[c.jsx("div",{children:c.jsxs(Qi,{defaultValue:f.toString(),onValueChange:E=>{h(Number(E))},children:[c.jsx(to,{className:"h-10 w-20",children:c.jsx(eo,{})}),c.jsx(no,{side:"top",children:[20,50,100,250].map(E=>c.jsx(zt,{value:`${E}`,children:E},E))})]})}),y!==void 0&&y>1&&c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"text-center",children:[c.jsx("dt",{className:"font-medium text-gray-500 text-sm/6 dark:text-gray-400",children:"Pages"}),c.jsx("dd",{className:"font-semibold tracking-tight",children:jy(y)})]}),c.jsxs("div",{className:"text-center",children:[c.jsx("dt",{className:"font-medium text-gray-500 text-sm/6 dark:text-gray-400",children:"Page"}),c.jsx("dd",{className:"font-semibold tracking-tight",children:jy(d+1)})]})]})]}),c.jsx("div",{className:"grow"}),c.jsxs(he,{variant:"defaultOutline",size:"sm",onClick:k,className:"select-none",disabled:y===void 0||d===y-1,children:["Next",c.jsx(wi,{})]})]})]})}function U2e({instanceDatabaseMap:e,databaseName:t,tableName:n}){const r=nt({strict:!1}),i=Cn(),o=Ut(),{clusterId:a,instanceId:l}=r,{toggled:d,toggle:f}=Wm(!0),m=X_(l??a,t,n,"insert"),h=X_(l??a,t,n,"update"),v=X_(l??a,t,n,"delete"),y=If(),{data:x}=Dt(x2e({...o,databaseName:t,tableName:n})),S=b.useMemo(()=>Qh(x?.attributes??[],"attribute"),[x]),[C,k]=dm(null,r),[E,j]=b.useState(!1),I=b.useMemo(()=>(t?Object.keys(e?.[t]||[]).sort():[]).length===1,[e,t]),{toggled:A,toggleOn:T,toggleOff:N}=Wm(!1),D=Qt({resolver:an($2e)}),{reset:L}=D,H=D.watch(),[ee,G]=dm(null,[r.clusterId,r.instanceId,t,n]),K=b.useCallback(()=>{const Zt=[];for(const We in H)if(H[We]?.length)try{Zt.push(...j2e(We,H[We],S[We]))}catch(ln){ye.error(String(ln))}G(Zt.length?Zt:null),L({...H})},[S,L,H]),B=b.useCallback(()=>{L({},{keepValues:!1,keepDirtyValues:!1,keepDefaultValues:!1}),L(),G(null),N()},[N,L]);b.useEffect(function(){return B()},[r,B]);const{dataTableColumns:q,hashAttribute:z}=t2e(x),[W,F]=b.useState(!1),[ne,$]=b.useState(!1),[P,V]=dm({attribute:z,descending:!1},r),[O,X]=dm(0,[t,n]),[de,ge]=b.useState(20),Q=x?.record_count,ve=x?.record_count?Math.ceil(x.record_count/de):0,xe=A&&!!ee,Ee={...o,enabled:!xe&&!!z,databaseName:t,tableName:n,searchAttribute:z,sort:P,pageSize:de,pageIndex:O,onlyIfCached:d},Pe=A2e(Ee),{data:Fe,isFetching:pt}=Dt(Pe),dt={...o,enabled:xe&&!!z,databaseName:t,tableName:n,conditions:ee,sort:P,pageSize:de,pageIndex:O,onlyIfCached:d},tt=E2e(dt),{data:Vt,isFetching:mn}=Dt(tt),qn=xe?Vt:Fe,tn=pt||mn,{data:Pn}=Dt(N2e({...o,enabled:E,databaseName:t,tableName:n,ids:C})),{mutate:Z,isPending:re}=D2e(),{mutate:se,isPending:Ce}=b2e(),oe=sr(),U=b.useCallback(()=>oe.invalidateQueries({queryKey:[o.entityId,t,n]}),[oe,o.entityId,t,n]),[le,ke]=b.useState(!1),De=b.useCallback(async()=>{if(!z)return;const Zt=ye.loading("Loading CSV...");ke(!0);const We={pageIndex:0,pageSize:1e6,headers:{Accept:"text/csv"}},ln=await(xe?SG({...dt,...We}):_G({...Ee,...We}));ye.loading("Preparing CSV...",{id:Zt});const Qn=ln.data,hr=new Blob([Qn],{type:"text/csv"}),ca=URL.createObjectURL(hr),hn=document.createElement("a");hn.href=ca,hn.setAttribute("download",`${t}.${n}.${new Date().toISOString()}.csv`),hn.click(),ye.success("CSV Exported!",{id:Zt}),ke(!1)},[t,n,Pe,tt]),Be=b.useCallback(Zt=>{Z({...o,databaseName:t,tableName:n,records:Zt},{onSuccess:()=>{U(),j(!1),ye.success("Record updated successfully")}})},[Z,o,t,n,U]),Nt=b.useCallback(Zt=>{se({...o,databaseName:t,tableName:n,hashValues:Zt},{onSuccess:()=>{U(),j(!1),ye.success("Record deleted successfully")}})},[se,o,t,n,U]),Kt=b.useCallback(Zt=>{U(),$(!1),ye.success(`${Zt}. Please wait a few moments then refresh the table.`)},[U]),kn=Zt=>{k([Zt.original[z]]),j(!E)},Gt=(Zt,We)=>{V({attribute:Zt,descending:!We})},sn=Da(U),jt=b.useCallback(()=>{F(!0)},[F]),ur=b.useCallback(()=>{$(!0)},[$]),Tn=b.useCallback(Zt=>{i({to:Zt==="table"?"../":"../../"})},[i]),[Jn,la]=Ld(`ColumnDisplayed/${t}}/${n}`,{}),js=os("ShowDeleteTable",!0),Ma=os("ShowDeleteDatabase",!0);return c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"flex flex-col md:flex-row items-center justify-between space-y-3 md:space-y-0 md:space-x-3 pt-15 pb-4 pr-4",children:[c.jsxs("div",{className:"flex space-x-2",children:[m&&c.jsxs(he,{variant:"positiveOutline",onClick:jt,disabled:W,accessKey:"n",children:[c.jsx(Tr,{}),c.jsxs("span",{children:["Add ",c.jsx("u",{children:"N"}),"ew Record(s)"]})]}),m&&c.jsxs(he,{variant:"positiveOutline",onClick:ur,disabled:ne,accessKey:"c",children:[c.jsx(V4,{}),c.jsxs("span",{children:["Import ",c.jsx("u",{children:"C"}),"SV"]})]}),c.jsxs(he,{variant:"positiveOutline",onClick:De,disabled:le,accessKey:"e",children:[c.jsx(Tte,{}),c.jsxs("span",{children:[c.jsx("u",{children:"E"}),"xport CSV"]})]})]}),c.jsxs("div",{className:"flex space-x-2",children:[A&&ee&&c.jsxs(he,{variant:"ghost",onClick:B,accessKey:"f",children:[c.jsx(m$,{className:"inline-block "}),c.jsxs("span",{children:["Clear ",c.jsx("u",{children:"F"}),"ilters"]})]}),A&&D.formState.isDirty&&c.jsxs(he,{variant:"default",onClick:K,children:[c.jsx(Gte,{className:"inline-block "}),"Apply Filters"]}),A&&!ee&&c.jsxs(he,{variant:"ghost",onClick:N,accessKey:"f",children:[c.jsx(m$,{className:"inline-block "}),c.jsxs("span",{children:["Hide ",c.jsx("u",{children:"F"}),"ilters"]})]}),!A&&c.jsxs(he,{variant:"ghost",onClick:T,accessKey:"f",children:[c.jsx(Wte,{className:"inline-block "}),c.jsxs("span",{children:["Show ",c.jsx("u",{children:"F"}),"ilters"]})]}),c.jsx(he,{variant:"defaultOutline",onClick:sn,disabled:tn,children:c.jsx($o,{})}),c.jsx(M2e,{columns:q,columnVisibility:Jn,setColumnVisibility:la}),c.jsxs(Gh,{children:[c.jsx(Zh,{disabled:!e,children:c.jsx(gE,{"aria-label":"Table options",color:e?"white":"gray"})}),c.jsxs(Yh,{side:"bottom",align:"end",children:[c.jsxs(jr,{className:"focus:bg-primary/70 focus:text-white",onClick:f,children:[d?c.jsx(Ste,{className:"text-green"}):c.jsx(U4,{}),"Only If Cached",c.jsx(Ye,{to:"https://docs.harperdb.io/docs/developers/applications/caching#cache-control-header",target:"_blank",rel:"noopener noreferrer",onClick:rG,children:c.jsx(Ute,{})})]}),y&&!I&&c.jsxs(jr,{className:"focus:bg-red/70 focus:text-white",onClick:js,children:[c.jsx(aa,{className:"inline-block "}),"Drop Table"]}),y&&c.jsxs(jr,{className:"focus:bg-red/70 focus:text-white",onClick:Ma,children:[c.jsx(Xne,{}),"Drop Database"]})]})]})]})]}),c.jsx(F2e,{data:qn?.data,isFetching:tn,filtersToggled:A,columns:q,columnVisibility:Jn,onRowClick:kn,onColumnClick:Gt,totalPages:ve,totalRecords:Q,pageIndex:O,pageSize:de,columnFiltersForm:D,applyFilters:K,setPageIndex:X,setPageSize:ge}),m&&x&&W&&c.jsx(o2e,{instanceTable:x,isModalOpen:W,refreshTable:U,setIsModalOpen:F}),c.jsx(p2e,{canEditRecords:h,canDeleteRecords:v,setIsModalOpen:j,isModalOpen:E,hashAttribute:z,data:Pn?.data,onSaveChanges:Be,onDeleteRecord:Nt,isUpdateTableRecordsPending:re,isDeleteTableRecordsPending:Ce}),c.jsx(c2e,{databaseName:t,onDeleted:Tn}),c.jsx(f2e,{databaseName:t,tableName:n,onDeleted:Tn}),c.jsx(v2e,{isModalOpen:ne,setIsModalOpen:$,onSaveChanges:Kt,database:t,table:n})]})}function V2e(){const e=nt({strict:!1}),t=Ut(),{data:n}=Dt(lG(t));let r,i;if(n){e.databaseName||(r=Object.keys(n).sort()[0]);const o=e.databaseName??r;!e.tableName&&o&&n[o]&&(i=Object.keys(n[o]).sort()[0])}return r||i?c.jsx(Tc,{to:Kk({...e,databaseName:r??e.databaseName,tableName:i}),replace:!0}):c.jsxs("main",{className:"grid grid-cols-1 gap-4 md:grid-cols-12 min-h-[calc(100vh-(--spacing(36)))]",children:[c.jsx("section",{className:"col-span-1 text-white md:col-span-4 lg:col-span-3",children:c.jsx(e2e,{instanceDatabaseMap:n})}),c.jsx("section",{className:"col-span-1 text-white md:col-span-8 lg:col-span-9 flex flex-col",children:e.databaseName&&e.tableName&&c.jsx(U2e,{instanceDatabaseMap:n,databaseName:e.databaseName,tableName:e.tableName})})]})}function B2e(e){return Qe({getParentRoute:()=>e,path:"/databases/{-$databaseName}/{-$tableName}",component:V2e})}function H2e({entityId:e,instanceClient:t},n){return{queryKey:[e,"get_status"],staleTime:9e3,refetchInterval:1e4,retryDelay:1e4,throwOnError:!1,enabled:n,queryFn:async()=>{const{data:r}=await t.post("/",{operation:"get_status"});return r}}}const CG={className:"text-white"};function q2e(){const e=DU(),t=nt({strict:!1}),{version:n}=yf({strict:!1}),r=qk("4.6.0",n),i=qk("4.7.0-beta.7",n),o=Ut(),{data:a}=Dt(H2e(o,r)),l=a?.restartRequired??!1,d=b.useMemo(()=>[{to:Rr(t),activeOptions:{exact:!0},name:"Applications",shortName:"Apps",icon:c.jsx(yE,{className:"inline-block"})},{to:Rr(t,"databases"),icon:c.jsx(Mte,{className:"inline-block"}),name:"Databases"},e&&i&&{to:Rr(t,"apis"),name:"APIs",icon:c.jsx(X4,{className:"inline-block"})},e&&r&&{to:Rr(t,"status"),icon:c.jsx(Jte,{className:"inline-block"}),name:"Status"},e&&{to:Rr(t,"logs"),icon:c.jsx(Cne,{className:"inline-block"}),name:"Logs"},e&&{to:Rr(t,"config"),icon:c.jsx(Hne,{className:"inline-block"}),name:"Config"}].filter(Lo),[e,t,i,r]);return c.jsxs(c.Fragment,{children:[c.jsx(K2e,{links:d,restartRequired:l}),c.jsx(G2e,{links:d,restartRequired:l})]})}function K2e({links:e,restartRequired:t}){return c.jsxs("div",{className:"hidden md:flex items-center justify-between h-full text-sm text-white",children:[c.jsx(Cx,{restartRequired:t}),c.jsx("div",{className:"flex space-x-2",children:e.map(({shortName:n,...r})=>c.jsxs(Ye,{className:"p-2 text-center text-gray-400 hover:text-white",activeProps:CG,...r,children:[r.icon,c.jsx("span",{className:"hidden xl:inline-block ml-1",children:r.name}),n&&c.jsx("span",{className:"visible xl:hidden ml-1",children:n})]},r.to))})]})}function G2e({links:e,restartRequired:t}){return c.jsx(c.Fragment,{children:c.jsxs("div",{className:"flex md:hidden items-center justify-between h-full px-2 text-white",children:[c.jsx(Cx,{restartRequired:t}),c.jsxs(Gh,{children:[c.jsx(Zh,{asChild:!0,children:c.jsx(he,{variant:"ghost",className:"p-0",children:c.jsx(G4,{className:"h-8 w-8"})})}),c.jsxs(Yh,{children:[c.jsx(ym,{children:"Instance Menu"}),c.jsx(Bm,{}),e.map(n=>c.jsx(jr,{asChild:!0,children:c.jsx(Ye,{to:n.to,activeProps:CG,children:n.name})},n.to))]})]})]})})}function W1(){return c.jsxs(c.Fragment,{children:[c.jsx("nav",{className:"fixed top-20 w-full z-39 h-12 md:px-12 bg-grey-700",children:c.jsx(q2e,{})}),c.jsx("div",{className:"mt-32 min-h-[calc(100vh-theme(spacing.32))]",children:c.jsx(Nl,{})})]})}function Z2e(e){switch(e){case"local":return Qe({getParentRoute:()=>B0,id:"_instanceLayout",component:W1,loader:jm});case"cluster":return Qe({getParentRoute:()=>Ia,id:"_instanceLayout",component:W1,beforeLoad:lz,loader:jm});case"instance":return Qe({getParentRoute:()=>Ia,path:"instance/$instanceId",component:W1,beforeLoad:lz,loader:jm})}}async function lz({context:e,params:t}){const n=e.authentication[t.instanceId||t.clusterId];if(n?.isLoading||n?.user)return;const r=e.authentication[Mn];if(r?.isLoading)return;const{update:i}=t.instanceId?OU(r.user,t.organizationId,t.clusterId):AU(r.user,t.organizationId,t.clusterId);if(i){const a=t.instanceId||t.clusterId,l=ls({id:a,forceFabricConnect:!0});try{const d=await gl({instanceClient:l});Ct.setUserForIdAndKey(a,l.defaults.baseURL,d),Ct.flagForFabricConnect(a,!0);return}catch(d){console.error("Fabric Connect not established",d)}}const o=`/${t.organizationId}/${t.clusterId}/`+(t.instanceId?`instance/${t.instanceId}`:"")+"/sign-in";throw eu({to:o,search:Jq()})}const Y2e=Hb(`inline-flex
207
+ items-center
208
+ justify-center
209
+ gap-2
210
+ whitespace-nowrap
211
+ rounded-lg
212
+ text-sm
213
+ transition-[color,box-shadow]
214
+ disabled:pointer-events-none
215
+ disabled:opacity-50
216
+ [&_svg]:pointer-events-none
217
+ [&_svg:not([class*='size-'])]:size-4
218
+ [&_svg]:shrink-0
219
+ ring-ring/10
220
+ dark:ring-ring/20
221
+ dark:outline-ring/40
222
+ outline-ring/50
223
+ focus-visible:ring-1
224
+ focus-visible:outline-1
225
+ focus-visible:ring-purple-200
226
+ aria-invalid:focus-visible:ring-0`,{variants:{variant:{default:"bg-primary text-primary-foreground shadow-sm hover:bg-primary/90",outline:"border bg-default border-primary border-2 text-white shadow-xs hover:-translate-y-1 transition duration-200 hover:bg-grey-700/40"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}});var kG="Toggle",EG=b.forwardRef((e,t)=>{const{pressed:n,defaultPressed:r,onPressedChange:i,...o}=e,[a,l]=Mo({prop:n,onChange:i,defaultProp:r??!1,caller:kG});return c.jsx(Ge.button,{type:"button","aria-pressed":a,"data-state":a?"on":"off","data-disabled":e.disabled?"":void 0,...o,ref:t,onClick:Oe(e.onClick,()=>{e.disabled||l(!a)})})});EG.displayName=kG;var W2e=EG;function X2e({className:e,variant:t,size:n,...r}){return c.jsx(W2e,{"data-slot":"toggle",className:Ve(Y2e({variant:t,size:n,className:e})),...r})}function jG(e){switch(e){case"warn":return"warning";case"notify":return"success";case"info":case"debug":case"trace":case void 0:case"stdout":return"secondary";case"stderr":case"error":return"destructive";default:return e}}const cz=["secondary","default","warning","outline","success","destructive"];let uz=0;const X1=new Map,RG=e=>{if(X1.has(e))return X1.get(e);uz++;const t=uz%cz.length,n=cz[t];return X1.set(e,n),n};function J2e({columns:e,data:t,onRowClick:n}){const r=M0({data:t,columns:e,getCoreRowModel:P0()});return c.jsx("div",{className:"rounded-md bg-black-dark logsTable",children:c.jsxs(z0,{className:"text-xs",children:[c.jsx(eg,{children:r.getHeaderGroups().map(i=>c.jsx(Xi,{className:"border-none",children:i.headers.map(o=>c.jsx(FI,{className:"p-4 max-w-96",children:o.isPlaceholder?null:Xc(o.column.columnDef.header,o.getContext())},o.id))},i.id))}),c.jsx(L0,{className:"bg-black",children:r.getRowModel().rows?.length?r.getRowModel().rows.map(i=>c.jsx(Xi,{"data-state":i.getIsSelected()&&"selected",className:Ve("hover:bg-muted/10 data-[state=selected]:bg-muted max-w-full",n&&"cursor-pointer"),onClick:()=>n?.(i),children:i.getVisibleCells().map(o=>c.jsx(Ss,{className:"p-1",children:Xc(o.column.columnDef.cell,o.getContext())},o.id))},i.id)):c.jsx(Xi,{children:c.jsx(Ss,{colSpan:e.length,className:"h-24 text-center",children:"No results."})})})]})})}function Q2e(e){try{JSON.parse(e)}catch{return!1}return!0}function ePe({setIsModalOpen:e,isModalOpen:t,data:n}){const r=n?RG(n.node):"default";return c.jsx(Dn,{onOpenChange:e,open:t,children:c.jsxs($n,{"aria-describedby":void 0,children:[c.jsx(cr,{children:c.jsx(In,{children:"Edit Row"})}),n?c.jsxs("div",{className:"flex flex-col gap-3 text-white",children:[c.jsxs("div",{children:[c.jsx("h3",{className:"inline-block pr-2",children:"Level:"}),c.jsx(ra,{variant:jG(n.level),children:Eo(n.level)})]}),c.jsxs("div",{children:[c.jsx("h3",{children:"Timestamp:"}),c.jsx("p",{className:"text-sm",children:n.timestamp})]}),c.jsxs("div",{children:[c.jsx("h3",{children:"Thread:"}),c.jsx("p",{className:"text-sm",children:n.thread})]}),c.jsxs("div",{children:[c.jsx("h3",{children:"Node:"}),c.jsx(ra,{variant:r,children:n.node})]}),c.jsxs("div",{children:[c.jsx("h3",{children:"Tags:"}),c.jsx("p",{className:"text-sm",children:n.tags&&n.tags.length>0?c.jsx("span",{children:n.tags}):"N/A"})]}),c.jsxs("div",{children:[c.jsx("h3",{className:"text-lg font-bold",children:"Message"}),c.jsx(V0,{className:"w-full h-72",language:Q2e(n.message)?"json":"text",theme:"vs-dark",value:n.message,options:{readOnly:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1}})]})]}):c.jsx(ao,{}),c.jsx(Ln,{children:c.jsxs("div",{className:"flex justify-between w-full",children:[c.jsxs(he,{type:"button",variant:"destructive",className:"rounded-full",children:[c.jsx(aa,{})," Delete Row"]}),c.jsxs(he,{variant:"submit",className:"rounded-full",children:[c.jsx(Ii,{})," Save Changes"]})]})})]})})}function tPe({entityId:e,instanceClient:t,logFilters:n,replicated:r,isAutoRefreshEnabled:i}){return{queryKey:[e,"read_log",n.limit,n.level,n.from,n.until,r],queryFn:async()=>{const{data:o}=await t.post("/",{operation:"read_log",start:0,replicated:r,limit:n.limit?parseInt(n.limit,10):void 0,level:n.level!=="undefined"?n.level:void 0,from:n.from?new Date(n.from).toISOString():void 0,until:n.until?new Date(n.until).toISOString():void 0,order:"desc"});return o},retry:!1,refetchInterval:i?5e3:!1}}const nPe=Mt({limit:Xe().optional(),level:Ul(["notify","error","warn","info","debug","trace","undefined"]).optional(),from:Xe().or(Kc()).optional(),until:Xe().or(Kc()).optional()});function rPe({form:e,resetFilters:t,submitFilters:n}){return c.jsx("div",{children:c.jsx(en,{...e,children:c.jsxs("form",{onSubmit:e.handleSubmit(n),className:"flex-col space-y-5",children:[c.jsx(Ne,{control:e.control,name:"limit",render:({field:r})=>c.jsxs(je,{children:[c.jsx(Re,{children:"Log Limit:"}),c.jsxs(Qi,{onValueChange:r.onChange,value:r.value,children:[c.jsx(to,{className:"w-full",children:c.jsx(eo,{placeholder:"Select log limit"})}),c.jsx(no,{children:c.jsxs(ia,{children:[c.jsx(zt,{value:"1000",children:"1000"}),c.jsx(zt,{value:"500",children:"500"}),c.jsx(zt,{value:"250",children:"250"}),c.jsx(zt,{value:"100",children:"100"}),c.jsx(zt,{value:"10",children:"10"})]})})]}),c.jsx(Ie,{})]})}),c.jsx(Ne,{control:e.control,name:"level",render:({field:r})=>c.jsxs(je,{children:[c.jsx(Re,{children:"Log Level:"}),c.jsxs(Qi,{onValueChange:r.onChange,value:r.value,children:[c.jsx(to,{className:"w-full",children:c.jsx(eo,{placeholder:"Select log level"})}),c.jsx(no,{children:c.jsxs(ia,{children:[c.jsx(zt,{value:"undefined",children:"All"}),c.jsx(zt,{value:"notify",children:"Notify"}),c.jsx(zt,{value:"error",children:"Error"}),c.jsx(zt,{value:"warn",children:"Warn"}),c.jsx(zt,{value:"info",children:"Info"}),c.jsx(zt,{value:"debug",children:"Debug"}),c.jsx(zt,{value:"trace",children:"Trace"})]})})]}),c.jsx(Ie,{})]})}),c.jsx(Ne,{control:e.control,name:"from",render:({field:r})=>c.jsxs(je,{children:[c.jsx(Re,{children:"Start Date:"}),c.jsx(Te,{children:c.jsx(ze,{type:"datetime-local",value:r.value,onChange:r.onChange})}),c.jsx(Ie,{})]})}),c.jsx(Ne,{control:e.control,name:"until",render:({field:r})=>c.jsxs(je,{children:[c.jsx(Re,{children:"End Date:"}),c.jsx(Te,{children:c.jsx(ze,{type:"datetime-local",value:r.value,onChange:r.onChange})}),c.jsx(Ie,{})]})}),c.jsxs("div",{className:"flex items-center justify-between space-x-2 mt-2",children:[c.jsx(he,{type:"submit",variant:"positiveOutline",className:"grow",children:"Apply Filters"}),c.jsx(he,{type:"reset",variant:"destructiveOutline",onClick:()=>t(),children:"Clear Filters"})]})]})})})}const J1={limit:"100",level:"undefined",from:"",until:""},iPe=[{accessorKey:"level",header:"Status",cell:({row:e})=>{const{level:t}=e.original;return c.jsx(ra,{variant:jG(t),children:Eo(t)})}},{accessorKey:"timestamp",header:"Date",cell:({row:e})=>{const{timestamp:t}=e.original;return c.jsx("span",{children:new Date(t).toLocaleDateString()})}},{accessorKey:"time",header:"Time",cell:({row:e})=>{const{timestamp:t}=e.original;return c.jsx("span",{children:new Date(t).toLocaleTimeString()})}},{accessorKey:"thread",header:"Thread"},{accessorKey:"node",header:"Node",cell:({row:e})=>{const{node:t}=e.original,n=RG(t);return c.jsx(c.Fragment,{children:t?c.jsxs(hh,{children:[c.jsx(gh,{asChild:!0,children:c.jsxs(ra,{variant:n,children:[t.split(".")[0],"..."]})}),c.jsx(vh,{className:"bg-grey-700",arrowClassName:"bg-grey-700 fill-grey-700",children:t})]}):null})}},{accessorKey:"tags",header:"Tags"},{accessorKey:"message",header:"Message",cell:({row:e})=>{const{message:t}=e.original;return e.getIsSelected(),c.jsx("pre",{children:c.jsx("code",{children:t})})}}],oPe=(e,t)=>{if(!e&&!t||!e||!t)return!0;const n=new Date(e),r=new Date(t);return n<=r};function aPe(){const[e,t]=b.useState(J1),[n,r]=b.useState(!1),[i,o]=b.useState(),[a,l]=b.useState(!1),d=Ut(),{data:f,isLoading:m,refetch:h,isFetching:v}=Dt(tPe({logFilters:e,...d,replicated:d.entityType==="cluster",isAutoRefreshEnabled:a})),y=Qt({resolver:an(nPe),defaultValues:J1,mode:"onChange"}),x=E=>{o(E.original),r(!0)},S=async E=>{if(!oPe(E.from,E.until)){y.setError("from",{type:"onChange",message:"Start date must be before end date"}),y.setError("until",{type:"onChange",message:"End date must be after start date"});return}t(E)},C=async()=>{y.reset(),t(J1)},k=Da(h);return c.jsxs("div",{className:"grid grid-cols-1 gap-4 text-white md:grid-cols-12",children:[c.jsxs("section",{className:"col-span-1 md:col-span-4 lg:col-span-3 px-2 pt-4 md:pt-12",children:[c.jsx(rPe,{form:y,resetFilters:C,submitFilters:S}),c.jsxs("div",{className:"flex items-center justify-between space-x-2 mt-2",children:[c.jsxs(he,{variant:"defaultOutline",onClick:k,disabled:v||m||a,className:"grow",children:[c.jsx($o,{}),"Refresh"]}),c.jsxs(X2e,{variant:"outline","aria-label":"Toggle Auto Refresh",onPressedChange:l,children:[c.jsx($o,{}),"Auto Refresh ",a?"On":"Off"]})]})]}),c.jsx("section",{className:"col-span-1 md:col-span-8 lg:col-span-9",children:m?c.jsx("div",{children:"Loading..."}):c.jsx("div",{children:c.jsx(J2e,{columns:iPe,data:f||[],onRowClick:x})})}),c.jsx(ePe,{isModalOpen:n,setIsModalOpen:r,data:i})]})}function sPe(e){return Qe({getParentRoute:()=>e,path:"logs",component:aPe})}function lPe(e){return Qe({getParentRoute:()=>e,path:"status",component:y4(async()=>ch(()=>import("./index-JYy8fJSs.js"),__vite__mapDeps([3,1])),"StatusIndex")})}function cPe(e){const t=Z2e(e),n=[sPe(t),...bDe(t),_Ee(t),lPe(t),D$e(t),B2e(t)];return t.addChildren(n)}Qe({getParentRoute:()=>B0,path:"profile",component:y4(async()=>ch(()=>import("./index-D-fcKyYx.js"),[]),"ProfileIndex")});const uPe=px.addChildren([...nxe,B0.addChildren([cPe("local")])]);function dPe({routeTree:e=uPe,authentication:t}){const n=dJ();return KQ({routeTree:e,history:n,defaultNotFoundComponent:are,defaultErrorComponent:Fy,defaultPreload:sre()?!1:"intent",trailingSlash:"never",defaultPreloadStaleTime:0,scrollRestoration:!0,context:{queryClient:Nc,authentication:t||{}}})}function fPe(){const e=XQ(),t=dPe({authentication:e});return c.jsxs(c.Fragment,{children:[c.jsx(YQ,{router:t,context:{authentication:e}}),!1]})}const pPe=({...e})=>c.jsx(Dre,{className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground font-medium",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground font-medium"}},...e});let dz=!1;function mPe(){b.useEffect(()=>{dz||(dz=!0)},[])}var hPe=function(){return null};function gPe(){return Ipe(),xfe(),mPe(),c.jsxs(c.Fragment,{children:[c.jsxs(GX,{client:Nc,children:[c.jsx(fPe,{}),c.jsx(hPe,{buttonPosition:"bottom-right"})]}),c.jsx(pPe,{richColors:!0})]})}var Q1={exports:{}},om={},eC={exports:{}},tC={};var fz;function vPe(){return fz||(fz=1,(function(e){function t(z,W){var F=z.length;z.push(W);e:for(;0<F;){var ne=F-1>>>1,$=z[ne];if(0<i($,W))z[ne]=W,z[F]=$,F=ne;else break e}}function n(z){return z.length===0?null:z[0]}function r(z){if(z.length===0)return null;var W=z[0],F=z.pop();if(F!==W){z[0]=F;e:for(var ne=0,$=z.length,P=$>>>1;ne<P;){var V=2*(ne+1)-1,O=z[V],X=V+1,de=z[X];if(0>i(O,F))X<$&&0>i(de,O)?(z[ne]=de,z[X]=F,ne=X):(z[ne]=O,z[V]=F,ne=V);else if(X<$&&0>i(de,F))z[ne]=de,z[X]=F,ne=X;else break e}}return W}function i(z,W){var F=z.sortIndex-W.sortIndex;return F!==0?F:z.id-W.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,l=a.now();e.unstable_now=function(){return a.now()-l}}var d=[],f=[],m=1,h=null,v=3,y=!1,x=!1,S=!1,C=!1,k=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,j=typeof setImmediate<"u"?setImmediate:null;function I(z){for(var W=n(f);W!==null;){if(W.callback===null)r(f);else if(W.startTime<=z)r(f),W.sortIndex=W.expirationTime,t(d,W);else break;W=n(f)}}function A(z){if(S=!1,I(z),!x)if(n(d)!==null)x=!0,T||(T=!0,G());else{var W=n(f);W!==null&&q(A,W.startTime-z)}}var T=!1,N=-1,D=5,L=-1;function H(){return C?!0:!(e.unstable_now()-L<D)}function ee(){if(C=!1,T){var z=e.unstable_now();L=z;var W=!0;try{e:{x=!1,S&&(S=!1,E(N),N=-1),y=!0;var F=v;try{t:{for(I(z),h=n(d);h!==null&&!(h.expirationTime>z&&H());){var ne=h.callback;if(typeof ne=="function"){h.callback=null,v=h.priorityLevel;var $=ne(h.expirationTime<=z);if(z=e.unstable_now(),typeof $=="function"){h.callback=$,I(z),W=!0;break t}h===n(d)&&r(d),I(z)}else r(d);h=n(d)}if(h!==null)W=!0;else{var P=n(f);P!==null&&q(A,P.startTime-z),W=!1}}break e}finally{h=null,v=F,y=!1}W=void 0}}finally{W?G():T=!1}}}var G;if(typeof j=="function")G=function(){j(ee)};else if(typeof MessageChannel<"u"){var K=new MessageChannel,B=K.port2;K.port1.onmessage=ee,G=function(){B.postMessage(null)}}else G=function(){k(ee,0)};function q(z,W){N=k(function(){z(e.unstable_now())},W)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(z){z.callback=null},e.unstable_forceFrameRate=function(z){0>z||125<z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<z?Math.floor(1e3/z):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_next=function(z){switch(v){case 1:case 2:case 3:var W=3;break;default:W=v}var F=v;v=W;try{return z()}finally{v=F}},e.unstable_requestPaint=function(){C=!0},e.unstable_runWithPriority=function(z,W){switch(z){case 1:case 2:case 3:case 4:case 5:break;default:z=3}var F=v;v=z;try{return W()}finally{v=F}},e.unstable_scheduleCallback=function(z,W,F){var ne=e.unstable_now();switch(typeof F=="object"&&F!==null?(F=F.delay,F=typeof F=="number"&&0<F?ne+F:ne):F=ne,z){case 1:var $=-1;break;case 2:$=250;break;case 5:$=1073741823;break;case 4:$=1e4;break;default:$=5e3}return $=F+$,z={id:m++,callback:W,priorityLevel:z,startTime:F,expirationTime:$,sortIndex:-1},F>ne?(z.sortIndex=F,t(f,z),n(d)===null&&z===n(f)&&(S?(E(N),N=-1):S=!0,q(A,F-ne))):(z.sortIndex=$,t(d,z),x||y||(x=!0,T||(T=!0,G()))),z},e.unstable_shouldYield=H,e.unstable_wrapCallback=function(z){var W=v;return function(){var F=v;v=W;try{return z.apply(this,arguments)}finally{v=F}}}})(tC)),tC}var pz;function yPe(){return pz||(pz=1,eC.exports=vPe()),eC.exports}var mz;function bPe(){if(mz)return om;mz=1;var e=yPe(),t=nh(),n=v4();function r(s){var u="https://react.dev/errors/"+s;if(1<arguments.length){u+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)u+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+s+"; visit "+u+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11)}function o(s){var u=s,p=s;if(s.alternate)for(;u.return;)u=u.return;else{s=u;do u=s,(u.flags&4098)!==0&&(p=u.return),s=u.return;while(s)}return u.tag===3?p:null}function a(s){if(s.tag===13){var u=s.memoizedState;if(u===null&&(s=s.alternate,s!==null&&(u=s.memoizedState)),u!==null)return u.dehydrated}return null}function l(s){if(s.tag===31){var u=s.memoizedState;if(u===null&&(s=s.alternate,s!==null&&(u=s.memoizedState)),u!==null)return u.dehydrated}return null}function d(s){if(o(s)!==s)throw Error(r(188))}function f(s){var u=s.alternate;if(!u){if(u=o(s),u===null)throw Error(r(188));return u!==s?null:s}for(var p=s,g=u;;){var w=p.return;if(w===null)break;var _=w.alternate;if(_===null){if(g=w.return,g!==null){p=g;continue}break}if(w.child===_.child){for(_=w.child;_;){if(_===p)return d(w),s;if(_===g)return d(w),u;_=_.sibling}throw Error(r(188))}if(p.return!==g.return)p=w,g=_;else{for(var R=!1,M=w.child;M;){if(M===p){R=!0,p=w,g=_;break}if(M===g){R=!0,g=w,p=_;break}M=M.sibling}if(!R){for(M=_.child;M;){if(M===p){R=!0,p=_,g=w;break}if(M===g){R=!0,g=_,p=w;break}M=M.sibling}if(!R)throw Error(r(189))}}if(p.alternate!==g)throw Error(r(190))}if(p.tag!==3)throw Error(r(188));return p.stateNode.current===p?s:u}function m(s){var u=s.tag;if(u===5||u===26||u===27||u===6)return s;for(s=s.child;s!==null;){if(u=m(s),u!==null)return u;s=s.sibling}return null}var h=Object.assign,v=Symbol.for("react.element"),y=Symbol.for("react.transitional.element"),x=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),E=Symbol.for("react.consumer"),j=Symbol.for("react.context"),I=Symbol.for("react.forward_ref"),A=Symbol.for("react.suspense"),T=Symbol.for("react.suspense_list"),N=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),L=Symbol.for("react.activity"),H=Symbol.for("react.memo_cache_sentinel"),ee=Symbol.iterator;function G(s){return s===null||typeof s!="object"?null:(s=ee&&s[ee]||s["@@iterator"],typeof s=="function"?s:null)}var K=Symbol.for("react.client.reference");function B(s){if(s==null)return null;if(typeof s=="function")return s.$$typeof===K?null:s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case S:return"Fragment";case k:return"Profiler";case C:return"StrictMode";case A:return"Suspense";case T:return"SuspenseList";case L:return"Activity"}if(typeof s=="object")switch(s.$$typeof){case x:return"Portal";case j:return s.displayName||"Context";case E:return(s._context.displayName||"Context")+".Consumer";case I:var u=s.render;return s=s.displayName,s||(s=u.displayName||u.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case N:return u=s.displayName||null,u!==null?u:B(s.type)||"Memo";case D:u=s._payload,s=s._init;try{return B(s(u))}catch{}}return null}var q=Array.isArray,z=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F={pending:!1,data:null,method:null,action:null},ne=[],$=-1;function P(s){return{current:s}}function V(s){0>$||(s.current=ne[$],ne[$]=null,$--)}function O(s,u){$++,ne[$]=s.current,s.current=u}var X=P(null),de=P(null),ge=P(null),Q=P(null);function ve(s,u){switch(O(ge,u),O(de,s),O(X,null),u.nodeType){case 9:case 11:s=(s=u.documentElement)&&(s=s.namespaceURI)?IO(s):0;break;default:if(s=u.tagName,u=u.namespaceURI)u=IO(u),s=TO(u,s);else switch(s){case"svg":s=1;break;case"math":s=2;break;default:s=0}}V(X),O(X,s)}function xe(){V(X),V(de),V(ge)}function Ee(s){s.memoizedState!==null&&O(Q,s);var u=X.current,p=TO(u,s.type);u!==p&&(O(de,s),O(X,p))}function Pe(s){de.current===s&&(V(X),V(de)),Q.current===s&&(V(Q),Tp._currentValue=F)}var Fe,pt;function dt(s){if(Fe===void 0)try{throw Error()}catch(p){var u=p.stack.trim().match(/\n( *(at )?)/);Fe=u&&u[1]||"",pt=-1<p.stack.indexOf(`
227
+ at`)?" (<anonymous>)":-1<p.stack.indexOf("@")?"@unknown:0:0":""}return`
228
+ `+Fe+s+pt}var tt=!1;function Vt(s,u){if(!s||tt)return"";tt=!0;var p=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var g={DetermineComponentFrameRoot:function(){try{if(u){var Se=function(){throw Error()};if(Object.defineProperty(Se.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Se,[])}catch(me){var fe=me}Reflect.construct(s,[],Se)}else{try{Se.call()}catch(me){fe=me}s.call(Se.prototype)}}else{try{throw Error()}catch(me){fe=me}(Se=s())&&typeof Se.catch=="function"&&Se.catch(function(){})}}catch(me){if(me&&fe&&typeof me.stack=="string")return[me.stack,fe.stack]}return[null,null]}};g.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var w=Object.getOwnPropertyDescriptor(g.DetermineComponentFrameRoot,"name");w&&w.configurable&&Object.defineProperty(g.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var _=g.DetermineComponentFrameRoot(),R=_[0],M=_[1];if(R&&M){var Y=R.split(`
229
+ `),ue=M.split(`
230
+ `);for(w=g=0;g<Y.length&&!Y[g].includes("DetermineComponentFrameRoot");)g++;for(;w<ue.length&&!ue[w].includes("DetermineComponentFrameRoot");)w++;if(g===Y.length||w===ue.length)for(g=Y.length-1,w=ue.length-1;1<=g&&0<=w&&Y[g]!==ue[w];)w--;for(;1<=g&&0<=w;g--,w--)if(Y[g]!==ue[w]){if(g!==1||w!==1)do if(g--,w--,0>w||Y[g]!==ue[w]){var be=`
231
+ `+Y[g].replace(" at new "," at ");return s.displayName&&be.includes("<anonymous>")&&(be=be.replace("<anonymous>",s.displayName)),be}while(1<=g&&0<=w);break}}}finally{tt=!1,Error.prepareStackTrace=p}return(p=s?s.displayName||s.name:"")?dt(p):""}function mn(s,u){switch(s.tag){case 26:case 27:case 5:return dt(s.type);case 16:return dt("Lazy");case 13:return s.child!==u&&u!==null?dt("Suspense Fallback"):dt("Suspense");case 19:return dt("SuspenseList");case 0:case 15:return Vt(s.type,!1);case 11:return Vt(s.type.render,!1);case 1:return Vt(s.type,!0);case 31:return dt("Activity");default:return""}}function qn(s){try{var u="",p=null;do u+=mn(s,p),p=s,s=s.return;while(s);return u}catch(g){return`
232
+ Error generating stack: `+g.message+`
233
+ `+g.stack}}var tn=Object.prototype.hasOwnProperty,Pn=e.unstable_scheduleCallback,Z=e.unstable_cancelCallback,re=e.unstable_shouldYield,se=e.unstable_requestPaint,Ce=e.unstable_now,oe=e.unstable_getCurrentPriorityLevel,U=e.unstable_ImmediatePriority,le=e.unstable_UserBlockingPriority,ke=e.unstable_NormalPriority,De=e.unstable_LowPriority,Be=e.unstable_IdlePriority,Nt=e.log,Kt=e.unstable_setDisableYieldValue,kn=null,Gt=null;function sn(s){if(typeof Nt=="function"&&Kt(s),Gt&&typeof Gt.setStrictMode=="function")try{Gt.setStrictMode(kn,s)}catch{}}var jt=Math.clz32?Math.clz32:Jn,ur=Math.log,Tn=Math.LN2;function Jn(s){return s>>>=0,s===0?32:31-(ur(s)/Tn|0)|0}var la=256,js=262144,Ma=4194304;function Zt(s){var u=s&42;if(u!==0)return u;switch(s&-s){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return s&261888;case 262144:case 524288:case 1048576:case 2097152:return s&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return s&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return s}}function We(s,u,p){var g=s.pendingLanes;if(g===0)return 0;var w=0,_=s.suspendedLanes,R=s.pingedLanes;s=s.warmLanes;var M=g&134217727;return M!==0?(g=M&~_,g!==0?w=Zt(g):(R&=M,R!==0?w=Zt(R):p||(p=M&~s,p!==0&&(w=Zt(p))))):(M=g&~_,M!==0?w=Zt(M):R!==0?w=Zt(R):p||(p=g&~s,p!==0&&(w=Zt(p)))),w===0?0:u!==0&&u!==w&&(u&_)===0&&(_=w&-w,p=u&-u,_>=p||_===32&&(p&4194048)!==0)?u:w}function ln(s,u){return(s.pendingLanes&~(s.suspendedLanes&~s.pingedLanes)&u)===0}function Qn(s,u){switch(s){case 1:case 2:case 4:case 8:case 64:return u+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return u+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function hr(){var s=Ma;return Ma<<=1,(Ma&62914560)===0&&(Ma=4194304),s}function ca(s){for(var u=[],p=0;31>p;p++)u.push(s);return u}function hn(s,u){s.pendingLanes|=u,u!==268435456&&(s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0)}function ai(s,u,p,g,w,_){var R=s.pendingLanes;s.pendingLanes=p,s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0,s.expiredLanes&=p,s.entangledLanes&=p,s.errorRecoveryDisabledLanes&=p,s.shellSuspendCounter=0;var M=s.entanglements,Y=s.expirationTimes,ue=s.hiddenUpdates;for(p=R&~p;0<p;){var be=31-jt(p),Se=1<<be;M[be]=0,Y[be]=-1;var fe=ue[be];if(fe!==null)for(ue[be]=null,be=0;be<fe.length;be++){var me=fe[be];me!==null&&(me.lane&=-536870913)}p&=~Se}g!==0&&Wl(s,g,0),_!==0&&w===0&&s.tag!==0&&(s.suspendedLanes|=_&~(R&~u))}function Wl(s,u,p){s.pendingLanes|=u,s.suspendedLanes&=~u;var g=31-jt(u);s.entangledLanes|=u,s.entanglements[g]=s.entanglements[g]|1073741824|p&261930}function si(s,u){var p=s.entangledLanes|=u;for(s=s.entanglements;p;){var g=31-jt(p),w=1<<g;w&u|s[g]&u&&(s[g]|=u),p&=~w}}function li(s,u){var p=u&-u;return p=(p&42)!==0?1:xu(p),(p&(s.suspendedLanes|u))!==0?0:p}function xu(s){switch(s){case 2:s=1;break;case 8:s=4;break;case 32:s=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:s=128;break;case 268435456:s=134217728;break;default:s=0}return s}function Bo(s){return s&=-s,2<s?8<s?(s&134217727)!==0?32:268435456:8:2}function rw(){var s=W.p;return s!==0?s:(s=window.event,s===void 0?32:QO(s.type))}function hT(s,u){var p=W.p;try{return W.p=s,u()}finally{W.p=p}}var Rs=Math.random().toString(36).slice(2),Sr="__reactFiber$"+Rs,ci="__reactProps$"+Rs,wu="__reactContainer$"+Rs,iw="__reactEvents$"+Rs,IG="__reactListeners$"+Rs,TG="__reactHandles$"+Rs,gT="__reactResources$"+Rs,qf="__reactMarker$"+Rs;function ow(s){delete s[Sr],delete s[ci],delete s[iw],delete s[IG],delete s[TG]}function Su(s){var u=s[Sr];if(u)return u;for(var p=s.parentNode;p;){if(u=p[wu]||p[Sr]){if(p=u.alternate,u.child!==null||p!==null&&p.child!==null)for(s=MO(s);s!==null;){if(p=s[Sr])return p;s=MO(s)}return u}s=p,p=s.parentNode}return null}function _u(s){if(s=s[Sr]||s[wu]){var u=s.tag;if(u===5||u===6||u===13||u===31||u===26||u===27||u===3)return s}return null}function Kf(s){var u=s.tag;if(u===5||u===26||u===27||u===6)return s.stateNode;throw Error(r(33))}function Cu(s){var u=s[gT];return u||(u=s[gT]={hoistableStyles:new Map,hoistableScripts:new Map}),u}function gr(s){s[qf]=!0}var vT=new Set,yT={};function Xl(s,u){ku(s,u),ku(s+"Capture",u)}function ku(s,u){for(yT[s]=u,s=0;s<u.length;s++)vT.add(u[s])}var NG=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),bT={},xT={};function AG(s){return tn.call(xT,s)?!0:tn.call(bT,s)?!1:NG.test(s)?xT[s]=!0:(bT[s]=!0,!1)}function lg(s,u,p){if(AG(u))if(p===null)s.removeAttribute(u);else{switch(typeof p){case"undefined":case"function":case"symbol":s.removeAttribute(u);return;case"boolean":var g=u.toLowerCase().slice(0,5);if(g!=="data-"&&g!=="aria-"){s.removeAttribute(u);return}}s.setAttribute(u,""+p)}}function cg(s,u,p){if(p===null)s.removeAttribute(u);else{switch(typeof p){case"undefined":case"function":case"symbol":case"boolean":s.removeAttribute(u);return}s.setAttribute(u,""+p)}}function za(s,u,p,g){if(g===null)s.removeAttribute(p);else{switch(typeof g){case"undefined":case"function":case"symbol":case"boolean":s.removeAttribute(p);return}s.setAttributeNS(u,p,""+g)}}function so(s){switch(typeof s){case"bigint":case"boolean":case"number":case"string":case"undefined":return s;case"object":return s;default:return""}}function wT(s){var u=s.type;return(s=s.nodeName)&&s.toLowerCase()==="input"&&(u==="checkbox"||u==="radio")}function OG(s,u,p){var g=Object.getOwnPropertyDescriptor(s.constructor.prototype,u);if(!s.hasOwnProperty(u)&&typeof g<"u"&&typeof g.get=="function"&&typeof g.set=="function"){var w=g.get,_=g.set;return Object.defineProperty(s,u,{configurable:!0,get:function(){return w.call(this)},set:function(R){p=""+R,_.call(this,R)}}),Object.defineProperty(s,u,{enumerable:g.enumerable}),{getValue:function(){return p},setValue:function(R){p=""+R},stopTracking:function(){s._valueTracker=null,delete s[u]}}}}function aw(s){if(!s._valueTracker){var u=wT(s)?"checked":"value";s._valueTracker=OG(s,u,""+s[u])}}function ST(s){if(!s)return!1;var u=s._valueTracker;if(!u)return!0;var p=u.getValue(),g="";return s&&(g=wT(s)?s.checked?"true":"false":s.value),s=g,s!==p?(u.setValue(s),!0):!1}function ug(s){if(s=s||(typeof document<"u"?document:void 0),typeof s>"u")return null;try{return s.activeElement||s.body}catch{return s.body}}var DG=/[\n"\\]/g;function lo(s){return s.replace(DG,function(u){return"\\"+u.charCodeAt(0).toString(16)+" "})}function sw(s,u,p,g,w,_,R,M){s.name="",R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"?s.type=R:s.removeAttribute("type"),u!=null?R==="number"?(u===0&&s.value===""||s.value!=u)&&(s.value=""+so(u)):s.value!==""+so(u)&&(s.value=""+so(u)):R!=="submit"&&R!=="reset"||s.removeAttribute("value"),u!=null?lw(s,R,so(u)):p!=null?lw(s,R,so(p)):g!=null&&s.removeAttribute("value"),w==null&&_!=null&&(s.defaultChecked=!!_),w!=null&&(s.checked=w&&typeof w!="function"&&typeof w!="symbol"),M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"?s.name=""+so(M):s.removeAttribute("name")}function _T(s,u,p,g,w,_,R,M){if(_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"&&(s.type=_),u!=null||p!=null){if(!(_!=="submit"&&_!=="reset"||u!=null)){aw(s);return}p=p!=null?""+so(p):"",u=u!=null?""+so(u):p,M||u===s.value||(s.value=u),s.defaultValue=u}g=g??w,g=typeof g!="function"&&typeof g!="symbol"&&!!g,s.checked=M?s.checked:!!g,s.defaultChecked=!!g,R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"&&(s.name=R),aw(s)}function lw(s,u,p){u==="number"&&ug(s.ownerDocument)===s||s.defaultValue===""+p||(s.defaultValue=""+p)}function Eu(s,u,p,g){if(s=s.options,u){u={};for(var w=0;w<p.length;w++)u["$"+p[w]]=!0;for(p=0;p<s.length;p++)w=u.hasOwnProperty("$"+s[p].value),s[p].selected!==w&&(s[p].selected=w),w&&g&&(s[p].defaultSelected=!0)}else{for(p=""+so(p),u=null,w=0;w<s.length;w++){if(s[w].value===p){s[w].selected=!0,g&&(s[w].defaultSelected=!0);return}u!==null||s[w].disabled||(u=s[w])}u!==null&&(u.selected=!0)}}function CT(s,u,p){if(u!=null&&(u=""+so(u),u!==s.value&&(s.value=u),p==null)){s.defaultValue!==u&&(s.defaultValue=u);return}s.defaultValue=p!=null?""+so(p):""}function kT(s,u,p,g){if(u==null){if(g!=null){if(p!=null)throw Error(r(92));if(q(g)){if(1<g.length)throw Error(r(93));g=g[0]}p=g}p==null&&(p=""),u=p}p=so(u),s.defaultValue=p,g=s.textContent,g===p&&g!==""&&g!==null&&(s.value=g),aw(s)}function ju(s,u){if(u){var p=s.firstChild;if(p&&p===s.lastChild&&p.nodeType===3){p.nodeValue=u;return}}s.textContent=u}var $G=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function ET(s,u,p){var g=u.indexOf("--")===0;p==null||typeof p=="boolean"||p===""?g?s.setProperty(u,""):u==="float"?s.cssFloat="":s[u]="":g?s.setProperty(u,p):typeof p!="number"||p===0||$G.has(u)?u==="float"?s.cssFloat=p:s[u]=(""+p).trim():s[u]=p+"px"}function jT(s,u,p){if(u!=null&&typeof u!="object")throw Error(r(62));if(s=s.style,p!=null){for(var g in p)!p.hasOwnProperty(g)||u!=null&&u.hasOwnProperty(g)||(g.indexOf("--")===0?s.setProperty(g,""):g==="float"?s.cssFloat="":s[g]="");for(var w in u)g=u[w],u.hasOwnProperty(w)&&p[w]!==g&&ET(s,w,g)}else for(var _ in u)u.hasOwnProperty(_)&&ET(s,_,u[_])}function cw(s){if(s.indexOf("-")===-1)return!1;switch(s){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var PG=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),MG=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function dg(s){return MG.test(""+s)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":s}function La(){}var uw=null;function dw(s){return s=s.target||s.srcElement||window,s.correspondingUseElement&&(s=s.correspondingUseElement),s.nodeType===3?s.parentNode:s}var Ru=null,Iu=null;function RT(s){var u=_u(s);if(u&&(s=u.stateNode)){var p=s[ci]||null;e:switch(s=u.stateNode,u.type){case"input":if(sw(s,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name),u=p.name,p.type==="radio"&&u!=null){for(p=s;p.parentNode;)p=p.parentNode;for(p=p.querySelectorAll('input[name="'+lo(""+u)+'"][type="radio"]'),u=0;u<p.length;u++){var g=p[u];if(g!==s&&g.form===s.form){var w=g[ci]||null;if(!w)throw Error(r(90));sw(g,w.value,w.defaultValue,w.defaultValue,w.checked,w.defaultChecked,w.type,w.name)}}for(u=0;u<p.length;u++)g=p[u],g.form===s.form&&ST(g)}break e;case"textarea":CT(s,p.value,p.defaultValue);break e;case"select":u=p.value,u!=null&&Eu(s,!!p.multiple,u,!1)}}}var fw=!1;function IT(s,u,p){if(fw)return s(u,p);fw=!0;try{var g=s(u);return g}finally{if(fw=!1,(Ru!==null||Iu!==null)&&(Jg(),Ru&&(u=Ru,s=Iu,Iu=Ru=null,RT(u),s)))for(u=0;u<s.length;u++)RT(s[u])}}function Gf(s,u){var p=s.stateNode;if(p===null)return null;var g=p[ci]||null;if(g===null)return null;p=g[u];e:switch(u){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(g=!g.disabled)||(s=s.type,g=!(s==="button"||s==="input"||s==="select"||s==="textarea")),s=!g;break e;default:s=!1}if(s)return null;if(p&&typeof p!="function")throw Error(r(231,u,typeof p));return p}var Fa=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),pw=!1;if(Fa)try{var Zf={};Object.defineProperty(Zf,"passive",{get:function(){pw=!0}}),window.addEventListener("test",Zf,Zf),window.removeEventListener("test",Zf,Zf)}catch{pw=!1}var Is=null,mw=null,fg=null;function TT(){if(fg)return fg;var s,u=mw,p=u.length,g,w="value"in Is?Is.value:Is.textContent,_=w.length;for(s=0;s<p&&u[s]===w[s];s++);var R=p-s;for(g=1;g<=R&&u[p-g]===w[_-g];g++);return fg=w.slice(s,1<g?1-g:void 0)}function pg(s){var u=s.keyCode;return"charCode"in s?(s=s.charCode,s===0&&u===13&&(s=13)):s=u,s===10&&(s=13),32<=s||s===13?s:0}function mg(){return!0}function NT(){return!1}function ui(s){function u(p,g,w,_,R){this._reactName=p,this._targetInst=w,this.type=g,this.nativeEvent=_,this.target=R,this.currentTarget=null;for(var M in s)s.hasOwnProperty(M)&&(p=s[M],this[M]=p?p(_):_[M]);return this.isDefaultPrevented=(_.defaultPrevented!=null?_.defaultPrevented:_.returnValue===!1)?mg:NT,this.isPropagationStopped=NT,this}return h(u.prototype,{preventDefault:function(){this.defaultPrevented=!0;var p=this.nativeEvent;p&&(p.preventDefault?p.preventDefault():typeof p.returnValue!="unknown"&&(p.returnValue=!1),this.isDefaultPrevented=mg)},stopPropagation:function(){var p=this.nativeEvent;p&&(p.stopPropagation?p.stopPropagation():typeof p.cancelBubble!="unknown"&&(p.cancelBubble=!0),this.isPropagationStopped=mg)},persist:function(){},isPersistent:mg}),u}var Jl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(s){return s.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},hg=ui(Jl),Yf=h({},Jl,{view:0,detail:0}),zG=ui(Yf),hw,gw,Wf,gg=h({},Yf,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:yw,button:0,buttons:0,relatedTarget:function(s){return s.relatedTarget===void 0?s.fromElement===s.srcElement?s.toElement:s.fromElement:s.relatedTarget},movementX:function(s){return"movementX"in s?s.movementX:(s!==Wf&&(Wf&&s.type==="mousemove"?(hw=s.screenX-Wf.screenX,gw=s.screenY-Wf.screenY):gw=hw=0,Wf=s),hw)},movementY:function(s){return"movementY"in s?s.movementY:gw}}),AT=ui(gg),LG=h({},gg,{dataTransfer:0}),FG=ui(LG),UG=h({},Yf,{relatedTarget:0}),vw=ui(UG),VG=h({},Jl,{animationName:0,elapsedTime:0,pseudoElement:0}),BG=ui(VG),HG=h({},Jl,{clipboardData:function(s){return"clipboardData"in s?s.clipboardData:window.clipboardData}}),qG=ui(HG),KG=h({},Jl,{data:0}),OT=ui(KG),GG={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ZG={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},YG={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function WG(s){var u=this.nativeEvent;return u.getModifierState?u.getModifierState(s):(s=YG[s])?!!u[s]:!1}function yw(){return WG}var XG=h({},Yf,{key:function(s){if(s.key){var u=GG[s.key]||s.key;if(u!=="Unidentified")return u}return s.type==="keypress"?(s=pg(s),s===13?"Enter":String.fromCharCode(s)):s.type==="keydown"||s.type==="keyup"?ZG[s.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:yw,charCode:function(s){return s.type==="keypress"?pg(s):0},keyCode:function(s){return s.type==="keydown"||s.type==="keyup"?s.keyCode:0},which:function(s){return s.type==="keypress"?pg(s):s.type==="keydown"||s.type==="keyup"?s.keyCode:0}}),JG=ui(XG),QG=h({},gg,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),DT=ui(QG),eZ=h({},Yf,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:yw}),tZ=ui(eZ),nZ=h({},Jl,{propertyName:0,elapsedTime:0,pseudoElement:0}),rZ=ui(nZ),iZ=h({},gg,{deltaX:function(s){return"deltaX"in s?s.deltaX:"wheelDeltaX"in s?-s.wheelDeltaX:0},deltaY:function(s){return"deltaY"in s?s.deltaY:"wheelDeltaY"in s?-s.wheelDeltaY:"wheelDelta"in s?-s.wheelDelta:0},deltaZ:0,deltaMode:0}),oZ=ui(iZ),aZ=h({},Jl,{newState:0,oldState:0}),sZ=ui(aZ),lZ=[9,13,27,32],bw=Fa&&"CompositionEvent"in window,Xf=null;Fa&&"documentMode"in document&&(Xf=document.documentMode);var cZ=Fa&&"TextEvent"in window&&!Xf,$T=Fa&&(!bw||Xf&&8<Xf&&11>=Xf),PT=" ",MT=!1;function zT(s,u){switch(s){case"keyup":return lZ.indexOf(u.keyCode)!==-1;case"keydown":return u.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function LT(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var Tu=!1;function uZ(s,u){switch(s){case"compositionend":return LT(u);case"keypress":return u.which!==32?null:(MT=!0,PT);case"textInput":return s=u.data,s===PT&&MT?null:s;default:return null}}function dZ(s,u){if(Tu)return s==="compositionend"||!bw&&zT(s,u)?(s=TT(),fg=mw=Is=null,Tu=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(u.ctrlKey||u.altKey||u.metaKey)||u.ctrlKey&&u.altKey){if(u.char&&1<u.char.length)return u.char;if(u.which)return String.fromCharCode(u.which)}return null;case"compositionend":return $T&&u.locale!=="ko"?null:u.data;default:return null}}var fZ={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function FT(s){var u=s&&s.nodeName&&s.nodeName.toLowerCase();return u==="input"?!!fZ[s.type]:u==="textarea"}function UT(s,u,p,g){Ru?Iu?Iu.push(g):Iu=[g]:Ru=g,u=ov(u,"onChange"),0<u.length&&(p=new hg("onChange","change",null,p,g),s.push({event:p,listeners:u}))}var Jf=null,Qf=null;function pZ(s){_O(s,0)}function vg(s){var u=Kf(s);if(ST(u))return s}function VT(s,u){if(s==="change")return u}var BT=!1;if(Fa){var xw;if(Fa){var ww="oninput"in document;if(!ww){var HT=document.createElement("div");HT.setAttribute("oninput","return;"),ww=typeof HT.oninput=="function"}xw=ww}else xw=!1;BT=xw&&(!document.documentMode||9<document.documentMode)}function qT(){Jf&&(Jf.detachEvent("onpropertychange",KT),Qf=Jf=null)}function KT(s){if(s.propertyName==="value"&&vg(Qf)){var u=[];UT(u,Qf,s,dw(s)),IT(pZ,u)}}function mZ(s,u,p){s==="focusin"?(qT(),Jf=u,Qf=p,Jf.attachEvent("onpropertychange",KT)):s==="focusout"&&qT()}function hZ(s){if(s==="selectionchange"||s==="keyup"||s==="keydown")return vg(Qf)}function gZ(s,u){if(s==="click")return vg(u)}function vZ(s,u){if(s==="input"||s==="change")return vg(u)}function yZ(s,u){return s===u&&(s!==0||1/s===1/u)||s!==s&&u!==u}var Di=typeof Object.is=="function"?Object.is:yZ;function ep(s,u){if(Di(s,u))return!0;if(typeof s!="object"||s===null||typeof u!="object"||u===null)return!1;var p=Object.keys(s),g=Object.keys(u);if(p.length!==g.length)return!1;for(g=0;g<p.length;g++){var w=p[g];if(!tn.call(u,w)||!Di(s[w],u[w]))return!1}return!0}function GT(s){for(;s&&s.firstChild;)s=s.firstChild;return s}function ZT(s,u){var p=GT(s);s=0;for(var g;p;){if(p.nodeType===3){if(g=s+p.textContent.length,s<=u&&g>=u)return{node:p,offset:u-s};s=g}e:{for(;p;){if(p.nextSibling){p=p.nextSibling;break e}p=p.parentNode}p=void 0}p=GT(p)}}function YT(s,u){return s&&u?s===u?!0:s&&s.nodeType===3?!1:u&&u.nodeType===3?YT(s,u.parentNode):"contains"in s?s.contains(u):s.compareDocumentPosition?!!(s.compareDocumentPosition(u)&16):!1:!1}function WT(s){s=s!=null&&s.ownerDocument!=null&&s.ownerDocument.defaultView!=null?s.ownerDocument.defaultView:window;for(var u=ug(s.document);u instanceof s.HTMLIFrameElement;){try{var p=typeof u.contentWindow.location.href=="string"}catch{p=!1}if(p)s=u.contentWindow;else break;u=ug(s.document)}return u}function Sw(s){var u=s&&s.nodeName&&s.nodeName.toLowerCase();return u&&(u==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||u==="textarea"||s.contentEditable==="true")}var bZ=Fa&&"documentMode"in document&&11>=document.documentMode,Nu=null,_w=null,tp=null,Cw=!1;function XT(s,u,p){var g=p.window===p?p.document:p.nodeType===9?p:p.ownerDocument;Cw||Nu==null||Nu!==ug(g)||(g=Nu,"selectionStart"in g&&Sw(g)?g={start:g.selectionStart,end:g.selectionEnd}:(g=(g.ownerDocument&&g.ownerDocument.defaultView||window).getSelection(),g={anchorNode:g.anchorNode,anchorOffset:g.anchorOffset,focusNode:g.focusNode,focusOffset:g.focusOffset}),tp&&ep(tp,g)||(tp=g,g=ov(_w,"onSelect"),0<g.length&&(u=new hg("onSelect","select",null,u,p),s.push({event:u,listeners:g}),u.target=Nu)))}function Ql(s,u){var p={};return p[s.toLowerCase()]=u.toLowerCase(),p["Webkit"+s]="webkit"+u,p["Moz"+s]="moz"+u,p}var Au={animationend:Ql("Animation","AnimationEnd"),animationiteration:Ql("Animation","AnimationIteration"),animationstart:Ql("Animation","AnimationStart"),transitionrun:Ql("Transition","TransitionRun"),transitionstart:Ql("Transition","TransitionStart"),transitioncancel:Ql("Transition","TransitionCancel"),transitionend:Ql("Transition","TransitionEnd")},kw={},JT={};Fa&&(JT=document.createElement("div").style,"AnimationEvent"in window||(delete Au.animationend.animation,delete Au.animationiteration.animation,delete Au.animationstart.animation),"TransitionEvent"in window||delete Au.transitionend.transition);function ec(s){if(kw[s])return kw[s];if(!Au[s])return s;var u=Au[s],p;for(p in u)if(u.hasOwnProperty(p)&&p in JT)return kw[s]=u[p];return s}var QT=ec("animationend"),eN=ec("animationiteration"),tN=ec("animationstart"),xZ=ec("transitionrun"),wZ=ec("transitionstart"),SZ=ec("transitioncancel"),nN=ec("transitionend"),rN=new Map,Ew="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Ew.push("scrollEnd");function Ho(s,u){rN.set(s,u),Xl(u,[s])}var yg=typeof reportError=="function"?reportError:function(s){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var u=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof s=="object"&&s!==null&&typeof s.message=="string"?String(s.message):String(s),error:s});if(!window.dispatchEvent(u))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",s);return}console.error(s)},co=[],Ou=0,jw=0;function bg(){for(var s=Ou,u=jw=Ou=0;u<s;){var p=co[u];co[u++]=null;var g=co[u];co[u++]=null;var w=co[u];co[u++]=null;var _=co[u];if(co[u++]=null,g!==null&&w!==null){var R=g.pending;R===null?w.next=w:(w.next=R.next,R.next=w),g.pending=w}_!==0&&iN(p,w,_)}}function xg(s,u,p,g){co[Ou++]=s,co[Ou++]=u,co[Ou++]=p,co[Ou++]=g,jw|=g,s.lanes|=g,s=s.alternate,s!==null&&(s.lanes|=g)}function Rw(s,u,p,g){return xg(s,u,p,g),wg(s)}function tc(s,u){return xg(s,null,null,u),wg(s)}function iN(s,u,p){s.lanes|=p;var g=s.alternate;g!==null&&(g.lanes|=p);for(var w=!1,_=s.return;_!==null;)_.childLanes|=p,g=_.alternate,g!==null&&(g.childLanes|=p),_.tag===22&&(s=_.stateNode,s===null||s._visibility&1||(w=!0)),s=_,_=_.return;return s.tag===3?(_=s.stateNode,w&&u!==null&&(w=31-jt(p),s=_.hiddenUpdates,g=s[w],g===null?s[w]=[u]:g.push(u),u.lane=p|536870912),_):null}function wg(s){if(50<_p)throw _p=0,MS=null,Error(r(185));for(var u=s.return;u!==null;)s=u,u=s.return;return s.tag===3?s.stateNode:null}var Du={};function _Z(s,u,p,g){this.tag=s,this.key=p,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=u,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=g,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function $i(s,u,p,g){return new _Z(s,u,p,g)}function Iw(s){return s=s.prototype,!(!s||!s.isReactComponent)}function Ua(s,u){var p=s.alternate;return p===null?(p=$i(s.tag,u,s.key,s.mode),p.elementType=s.elementType,p.type=s.type,p.stateNode=s.stateNode,p.alternate=s,s.alternate=p):(p.pendingProps=u,p.type=s.type,p.flags=0,p.subtreeFlags=0,p.deletions=null),p.flags=s.flags&65011712,p.childLanes=s.childLanes,p.lanes=s.lanes,p.child=s.child,p.memoizedProps=s.memoizedProps,p.memoizedState=s.memoizedState,p.updateQueue=s.updateQueue,u=s.dependencies,p.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext},p.sibling=s.sibling,p.index=s.index,p.ref=s.ref,p.refCleanup=s.refCleanup,p}function oN(s,u){s.flags&=65011714;var p=s.alternate;return p===null?(s.childLanes=0,s.lanes=u,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=p.childLanes,s.lanes=p.lanes,s.child=p.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=p.memoizedProps,s.memoizedState=p.memoizedState,s.updateQueue=p.updateQueue,s.type=p.type,u=p.dependencies,s.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext}),s}function Sg(s,u,p,g,w,_){var R=0;if(g=s,typeof s=="function")Iw(s)&&(R=1);else if(typeof s=="string")R=RY(s,p,X.current)?26:s==="html"||s==="head"||s==="body"?27:5;else e:switch(s){case L:return s=$i(31,p,u,w),s.elementType=L,s.lanes=_,s;case S:return nc(p.children,w,_,u);case C:R=8,w|=24;break;case k:return s=$i(12,p,u,w|2),s.elementType=k,s.lanes=_,s;case A:return s=$i(13,p,u,w),s.elementType=A,s.lanes=_,s;case T:return s=$i(19,p,u,w),s.elementType=T,s.lanes=_,s;default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case j:R=10;break e;case E:R=9;break e;case I:R=11;break e;case N:R=14;break e;case D:R=16,g=null;break e}R=29,p=Error(r(130,s===null?"null":typeof s,"")),g=null}return u=$i(R,p,u,w),u.elementType=s,u.type=g,u.lanes=_,u}function nc(s,u,p,g){return s=$i(7,s,g,u),s.lanes=p,s}function Tw(s,u,p){return s=$i(6,s,null,u),s.lanes=p,s}function aN(s){var u=$i(18,null,null,0);return u.stateNode=s,u}function Nw(s,u,p){return u=$i(4,s.children!==null?s.children:[],s.key,u),u.lanes=p,u.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},u}var sN=new WeakMap;function uo(s,u){if(typeof s=="object"&&s!==null){var p=sN.get(s);return p!==void 0?p:(u={value:s,source:u,stack:qn(u)},sN.set(s,u),u)}return{value:s,source:u,stack:qn(u)}}var $u=[],Pu=0,_g=null,np=0,fo=[],po=0,Ts=null,ua=1,da="";function Va(s,u){$u[Pu++]=np,$u[Pu++]=_g,_g=s,np=u}function lN(s,u,p){fo[po++]=ua,fo[po++]=da,fo[po++]=Ts,Ts=s;var g=ua;s=da;var w=32-jt(g)-1;g&=~(1<<w),p+=1;var _=32-jt(u)+w;if(30<_){var R=w-w%5;_=(g&(1<<R)-1).toString(32),g>>=R,w-=R,ua=1<<32-jt(u)+w|p<<w|g,da=_+s}else ua=1<<_|p<<w|g,da=s}function Aw(s){s.return!==null&&(Va(s,1),lN(s,1,0))}function Ow(s){for(;s===_g;)_g=$u[--Pu],$u[Pu]=null,np=$u[--Pu],$u[Pu]=null;for(;s===Ts;)Ts=fo[--po],fo[po]=null,da=fo[--po],fo[po]=null,ua=fo[--po],fo[po]=null}function cN(s,u){fo[po++]=ua,fo[po++]=da,fo[po++]=Ts,ua=u.id,da=u.overflow,Ts=s}var _r=null,En=null,Pt=!1,Ns=null,mo=!1,Dw=Error(r(519));function As(s){var u=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw rp(uo(u,s)),Dw}function uN(s){var u=s.stateNode,p=s.type,g=s.memoizedProps;switch(u[Sr]=s,u[ci]=g,p){case"dialog":Tt("cancel",u),Tt("close",u);break;case"iframe":case"object":case"embed":Tt("load",u);break;case"video":case"audio":for(p=0;p<kp.length;p++)Tt(kp[p],u);break;case"source":Tt("error",u);break;case"img":case"image":case"link":Tt("error",u),Tt("load",u);break;case"details":Tt("toggle",u);break;case"input":Tt("invalid",u),_T(u,g.value,g.defaultValue,g.checked,g.defaultChecked,g.type,g.name,!0);break;case"select":Tt("invalid",u);break;case"textarea":Tt("invalid",u),kT(u,g.value,g.defaultValue,g.children)}p=g.children,typeof p!="string"&&typeof p!="number"&&typeof p!="bigint"||u.textContent===""+p||g.suppressHydrationWarning===!0||jO(u.textContent,p)?(g.popover!=null&&(Tt("beforetoggle",u),Tt("toggle",u)),g.onScroll!=null&&Tt("scroll",u),g.onScrollEnd!=null&&Tt("scrollend",u),g.onClick!=null&&(u.onclick=La),u=!0):u=!1,u||As(s,!0)}function dN(s){for(_r=s.return;_r;)switch(_r.tag){case 5:case 31:case 13:mo=!1;return;case 27:case 3:mo=!0;return;default:_r=_r.return}}function Mu(s){if(s!==_r)return!1;if(!Pt)return dN(s),Pt=!0,!1;var u=s.tag,p;if((p=u!==3&&u!==27)&&((p=u===5)&&(p=s.type,p=!(p!=="form"&&p!=="button")||JS(s.type,s.memoizedProps)),p=!p),p&&En&&As(s),dN(s),u===13){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(317));En=PO(s)}else if(u===31){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(317));En=PO(s)}else u===27?(u=En,Ks(s.type)?(s=r_,r_=null,En=s):En=u):En=_r?go(s.stateNode.nextSibling):null;return!0}function rc(){En=_r=null,Pt=!1}function $w(){var s=Ns;return s!==null&&(mi===null?mi=s:mi.push.apply(mi,s),Ns=null),s}function rp(s){Ns===null?Ns=[s]:Ns.push(s)}var Pw=P(null),ic=null,Ba=null;function Os(s,u,p){O(Pw,u._currentValue),u._currentValue=p}function Ha(s){s._currentValue=Pw.current,V(Pw)}function Mw(s,u,p){for(;s!==null;){var g=s.alternate;if((s.childLanes&u)!==u?(s.childLanes|=u,g!==null&&(g.childLanes|=u)):g!==null&&(g.childLanes&u)!==u&&(g.childLanes|=u),s===p)break;s=s.return}}function zw(s,u,p,g){var w=s.child;for(w!==null&&(w.return=s);w!==null;){var _=w.dependencies;if(_!==null){var R=w.child;_=_.firstContext;e:for(;_!==null;){var M=_;_=w;for(var Y=0;Y<u.length;Y++)if(M.context===u[Y]){_.lanes|=p,M=_.alternate,M!==null&&(M.lanes|=p),Mw(_.return,p,s),g||(R=null);break e}_=M.next}}else if(w.tag===18){if(R=w.return,R===null)throw Error(r(341));R.lanes|=p,_=R.alternate,_!==null&&(_.lanes|=p),Mw(R,p,s),R=null}else R=w.child;if(R!==null)R.return=w;else for(R=w;R!==null;){if(R===s){R=null;break}if(w=R.sibling,w!==null){w.return=R.return,R=w;break}R=R.return}w=R}}function zu(s,u,p,g){s=null;for(var w=u,_=!1;w!==null;){if(!_){if((w.flags&524288)!==0)_=!0;else if((w.flags&262144)!==0)break}if(w.tag===10){var R=w.alternate;if(R===null)throw Error(r(387));if(R=R.memoizedProps,R!==null){var M=w.type;Di(w.pendingProps.value,R.value)||(s!==null?s.push(M):s=[M])}}else if(w===Q.current){if(R=w.alternate,R===null)throw Error(r(387));R.memoizedState.memoizedState!==w.memoizedState.memoizedState&&(s!==null?s.push(Tp):s=[Tp])}w=w.return}s!==null&&zw(u,s,p,g),u.flags|=262144}function Cg(s){for(s=s.firstContext;s!==null;){if(!Di(s.context._currentValue,s.memoizedValue))return!0;s=s.next}return!1}function oc(s){ic=s,Ba=null,s=s.dependencies,s!==null&&(s.firstContext=null)}function Cr(s){return fN(ic,s)}function kg(s,u){return ic===null&&oc(s),fN(s,u)}function fN(s,u){var p=u._currentValue;if(u={context:u,memoizedValue:p,next:null},Ba===null){if(s===null)throw Error(r(308));Ba=u,s.dependencies={lanes:0,firstContext:u},s.flags|=524288}else Ba=Ba.next=u;return p}var CZ=typeof AbortController<"u"?AbortController:function(){var s=[],u=this.signal={aborted:!1,addEventListener:function(p,g){s.push(g)}};this.abort=function(){u.aborted=!0,s.forEach(function(p){return p()})}},kZ=e.unstable_scheduleCallback,EZ=e.unstable_NormalPriority,er={$$typeof:j,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Lw(){return{controller:new CZ,data:new Map,refCount:0}}function ip(s){s.refCount--,s.refCount===0&&kZ(EZ,function(){s.controller.abort()})}var op=null,Fw=0,Lu=0,Fu=null;function jZ(s,u){if(op===null){var p=op=[];Fw=0,Lu=BS(),Fu={status:"pending",value:void 0,then:function(g){p.push(g)}}}return Fw++,u.then(pN,pN),u}function pN(){if(--Fw===0&&op!==null){Fu!==null&&(Fu.status="fulfilled");var s=op;op=null,Lu=0,Fu=null;for(var u=0;u<s.length;u++)(0,s[u])()}}function RZ(s,u){var p=[],g={status:"pending",value:null,reason:null,then:function(w){p.push(w)}};return s.then(function(){g.status="fulfilled",g.value=u;for(var w=0;w<p.length;w++)(0,p[w])(u)},function(w){for(g.status="rejected",g.reason=w,w=0;w<p.length;w++)(0,p[w])(void 0)}),g}var mN=z.S;z.S=function(s,u){XA=Ce(),typeof u=="object"&&u!==null&&typeof u.then=="function"&&jZ(s,u),mN!==null&&mN(s,u)};var ac=P(null);function Uw(){var s=ac.current;return s!==null?s:gn.pooledCache}function Eg(s,u){u===null?O(ac,ac.current):O(ac,u.pool)}function hN(){var s=Uw();return s===null?null:{parent:er._currentValue,pool:s}}var Uu=Error(r(460)),Vw=Error(r(474)),jg=Error(r(542)),Rg={then:function(){}};function gN(s){return s=s.status,s==="fulfilled"||s==="rejected"}function vN(s,u,p){switch(p=s[p],p===void 0?s.push(u):p!==u&&(u.then(La,La),u=p),u.status){case"fulfilled":return u.value;case"rejected":throw s=u.reason,bN(s),s;default:if(typeof u.status=="string")u.then(La,La);else{if(s=gn,s!==null&&100<s.shellSuspendCounter)throw Error(r(482));s=u,s.status="pending",s.then(function(g){if(u.status==="pending"){var w=u;w.status="fulfilled",w.value=g}},function(g){if(u.status==="pending"){var w=u;w.status="rejected",w.reason=g}})}switch(u.status){case"fulfilled":return u.value;case"rejected":throw s=u.reason,bN(s),s}throw lc=u,Uu}}function sc(s){try{var u=s._init;return u(s._payload)}catch(p){throw p!==null&&typeof p=="object"&&typeof p.then=="function"?(lc=p,Uu):p}}var lc=null;function yN(){if(lc===null)throw Error(r(459));var s=lc;return lc=null,s}function bN(s){if(s===Uu||s===jg)throw Error(r(483))}var Vu=null,ap=0;function Ig(s){var u=ap;return ap+=1,Vu===null&&(Vu=[]),vN(Vu,s,u)}function sp(s,u){u=u.props.ref,s.ref=u!==void 0?u:null}function Tg(s,u){throw u.$$typeof===v?Error(r(525)):(s=Object.prototype.toString.call(u),Error(r(31,s==="[object Object]"?"object with keys {"+Object.keys(u).join(", ")+"}":s)))}function xN(s){function u(ie,te){if(s){var ce=ie.deletions;ce===null?(ie.deletions=[te],ie.flags|=16):ce.push(te)}}function p(ie,te){if(!s)return null;for(;te!==null;)u(ie,te),te=te.sibling;return null}function g(ie){for(var te=new Map;ie!==null;)ie.key!==null?te.set(ie.key,ie):te.set(ie.index,ie),ie=ie.sibling;return te}function w(ie,te){return ie=Ua(ie,te),ie.index=0,ie.sibling=null,ie}function _(ie,te,ce){return ie.index=ce,s?(ce=ie.alternate,ce!==null?(ce=ce.index,ce<te?(ie.flags|=67108866,te):ce):(ie.flags|=67108866,te)):(ie.flags|=1048576,te)}function R(ie){return s&&ie.alternate===null&&(ie.flags|=67108866),ie}function M(ie,te,ce,we){return te===null||te.tag!==6?(te=Tw(ce,ie.mode,we),te.return=ie,te):(te=w(te,ce),te.return=ie,te)}function Y(ie,te,ce,we){var Je=ce.type;return Je===S?be(ie,te,ce.props.children,we,ce.key):te!==null&&(te.elementType===Je||typeof Je=="object"&&Je!==null&&Je.$$typeof===D&&sc(Je)===te.type)?(te=w(te,ce.props),sp(te,ce),te.return=ie,te):(te=Sg(ce.type,ce.key,ce.props,null,ie.mode,we),sp(te,ce),te.return=ie,te)}function ue(ie,te,ce,we){return te===null||te.tag!==4||te.stateNode.containerInfo!==ce.containerInfo||te.stateNode.implementation!==ce.implementation?(te=Nw(ce,ie.mode,we),te.return=ie,te):(te=w(te,ce.children||[]),te.return=ie,te)}function be(ie,te,ce,we,Je){return te===null||te.tag!==7?(te=nc(ce,ie.mode,we,Je),te.return=ie,te):(te=w(te,ce),te.return=ie,te)}function Se(ie,te,ce){if(typeof te=="string"&&te!==""||typeof te=="number"||typeof te=="bigint")return te=Tw(""+te,ie.mode,ce),te.return=ie,te;if(typeof te=="object"&&te!==null){switch(te.$$typeof){case y:return ce=Sg(te.type,te.key,te.props,null,ie.mode,ce),sp(ce,te),ce.return=ie,ce;case x:return te=Nw(te,ie.mode,ce),te.return=ie,te;case D:return te=sc(te),Se(ie,te,ce)}if(q(te)||G(te))return te=nc(te,ie.mode,ce,null),te.return=ie,te;if(typeof te.then=="function")return Se(ie,Ig(te),ce);if(te.$$typeof===j)return Se(ie,kg(ie,te),ce);Tg(ie,te)}return null}function fe(ie,te,ce,we){var Je=te!==null?te.key:null;if(typeof ce=="string"&&ce!==""||typeof ce=="number"||typeof ce=="bigint")return Je!==null?null:M(ie,te,""+ce,we);if(typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case y:return ce.key===Je?Y(ie,te,ce,we):null;case x:return ce.key===Je?ue(ie,te,ce,we):null;case D:return ce=sc(ce),fe(ie,te,ce,we)}if(q(ce)||G(ce))return Je!==null?null:be(ie,te,ce,we,null);if(typeof ce.then=="function")return fe(ie,te,Ig(ce),we);if(ce.$$typeof===j)return fe(ie,te,kg(ie,ce),we);Tg(ie,ce)}return null}function me(ie,te,ce,we,Je){if(typeof we=="string"&&we!==""||typeof we=="number"||typeof we=="bigint")return ie=ie.get(ce)||null,M(te,ie,""+we,Je);if(typeof we=="object"&&we!==null){switch(we.$$typeof){case y:return ie=ie.get(we.key===null?ce:we.key)||null,Y(te,ie,we,Je);case x:return ie=ie.get(we.key===null?ce:we.key)||null,ue(te,ie,we,Je);case D:return we=sc(we),me(ie,te,ce,we,Je)}if(q(we)||G(we))return ie=ie.get(ce)||null,be(te,ie,we,Je,null);if(typeof we.then=="function")return me(ie,te,ce,Ig(we),Je);if(we.$$typeof===j)return me(ie,te,ce,kg(te,we),Je);Tg(te,we)}return null}function He(ie,te,ce,we){for(var Je=null,Bt=null,Ze=te,xt=te=0,Ot=null;Ze!==null&&xt<ce.length;xt++){Ze.index>xt?(Ot=Ze,Ze=null):Ot=Ze.sibling;var Ht=fe(ie,Ze,ce[xt],we);if(Ht===null){Ze===null&&(Ze=Ot);break}s&&Ze&&Ht.alternate===null&&u(ie,Ze),te=_(Ht,te,xt),Bt===null?Je=Ht:Bt.sibling=Ht,Bt=Ht,Ze=Ot}if(xt===ce.length)return p(ie,Ze),Pt&&Va(ie,xt),Je;if(Ze===null){for(;xt<ce.length;xt++)Ze=Se(ie,ce[xt],we),Ze!==null&&(te=_(Ze,te,xt),Bt===null?Je=Ze:Bt.sibling=Ze,Bt=Ze);return Pt&&Va(ie,xt),Je}for(Ze=g(Ze);xt<ce.length;xt++)Ot=me(Ze,ie,xt,ce[xt],we),Ot!==null&&(s&&Ot.alternate!==null&&Ze.delete(Ot.key===null?xt:Ot.key),te=_(Ot,te,xt),Bt===null?Je=Ot:Bt.sibling=Ot,Bt=Ot);return s&&Ze.forEach(function(Xs){return u(ie,Xs)}),Pt&&Va(ie,xt),Je}function rt(ie,te,ce,we){if(ce==null)throw Error(r(151));for(var Je=null,Bt=null,Ze=te,xt=te=0,Ot=null,Ht=ce.next();Ze!==null&&!Ht.done;xt++,Ht=ce.next()){Ze.index>xt?(Ot=Ze,Ze=null):Ot=Ze.sibling;var Xs=fe(ie,Ze,Ht.value,we);if(Xs===null){Ze===null&&(Ze=Ot);break}s&&Ze&&Xs.alternate===null&&u(ie,Ze),te=_(Xs,te,xt),Bt===null?Je=Xs:Bt.sibling=Xs,Bt=Xs,Ze=Ot}if(Ht.done)return p(ie,Ze),Pt&&Va(ie,xt),Je;if(Ze===null){for(;!Ht.done;xt++,Ht=ce.next())Ht=Se(ie,Ht.value,we),Ht!==null&&(te=_(Ht,te,xt),Bt===null?Je=Ht:Bt.sibling=Ht,Bt=Ht);return Pt&&Va(ie,xt),Je}for(Ze=g(Ze);!Ht.done;xt++,Ht=ce.next())Ht=me(Ze,ie,xt,Ht.value,we),Ht!==null&&(s&&Ht.alternate!==null&&Ze.delete(Ht.key===null?xt:Ht.key),te=_(Ht,te,xt),Bt===null?Je=Ht:Bt.sibling=Ht,Bt=Ht);return s&&Ze.forEach(function(LY){return u(ie,LY)}),Pt&&Va(ie,xt),Je}function dn(ie,te,ce,we){if(typeof ce=="object"&&ce!==null&&ce.type===S&&ce.key===null&&(ce=ce.props.children),typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case y:e:{for(var Je=ce.key;te!==null;){if(te.key===Je){if(Je=ce.type,Je===S){if(te.tag===7){p(ie,te.sibling),we=w(te,ce.props.children),we.return=ie,ie=we;break e}}else if(te.elementType===Je||typeof Je=="object"&&Je!==null&&Je.$$typeof===D&&sc(Je)===te.type){p(ie,te.sibling),we=w(te,ce.props),sp(we,ce),we.return=ie,ie=we;break e}p(ie,te);break}else u(ie,te);te=te.sibling}ce.type===S?(we=nc(ce.props.children,ie.mode,we,ce.key),we.return=ie,ie=we):(we=Sg(ce.type,ce.key,ce.props,null,ie.mode,we),sp(we,ce),we.return=ie,ie=we)}return R(ie);case x:e:{for(Je=ce.key;te!==null;){if(te.key===Je)if(te.tag===4&&te.stateNode.containerInfo===ce.containerInfo&&te.stateNode.implementation===ce.implementation){p(ie,te.sibling),we=w(te,ce.children||[]),we.return=ie,ie=we;break e}else{p(ie,te);break}else u(ie,te);te=te.sibling}we=Nw(ce,ie.mode,we),we.return=ie,ie=we}return R(ie);case D:return ce=sc(ce),dn(ie,te,ce,we)}if(q(ce))return He(ie,te,ce,we);if(G(ce)){if(Je=G(ce),typeof Je!="function")throw Error(r(150));return ce=Je.call(ce),rt(ie,te,ce,we)}if(typeof ce.then=="function")return dn(ie,te,Ig(ce),we);if(ce.$$typeof===j)return dn(ie,te,kg(ie,ce),we);Tg(ie,ce)}return typeof ce=="string"&&ce!==""||typeof ce=="number"||typeof ce=="bigint"?(ce=""+ce,te!==null&&te.tag===6?(p(ie,te.sibling),we=w(te,ce),we.return=ie,ie=we):(p(ie,te),we=Tw(ce,ie.mode,we),we.return=ie,ie=we),R(ie)):p(ie,te)}return function(ie,te,ce,we){try{ap=0;var Je=dn(ie,te,ce,we);return Vu=null,Je}catch(Ze){if(Ze===Uu||Ze===jg)throw Ze;var Bt=$i(29,Ze,null,ie.mode);return Bt.lanes=we,Bt.return=ie,Bt}}}var cc=xN(!0),wN=xN(!1),Ds=!1;function Bw(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Hw(s,u){s=s.updateQueue,u.updateQueue===s&&(u.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,callbacks:null})}function $s(s){return{lane:s,tag:0,payload:null,callback:null,next:null}}function Ps(s,u,p){var g=s.updateQueue;if(g===null)return null;if(g=g.shared,(Yt&2)!==0){var w=g.pending;return w===null?u.next=u:(u.next=w.next,w.next=u),g.pending=u,u=wg(s),iN(s,null,p),u}return xg(s,g,u,p),wg(s)}function lp(s,u,p){if(u=u.updateQueue,u!==null&&(u=u.shared,(p&4194048)!==0)){var g=u.lanes;g&=s.pendingLanes,p|=g,u.lanes=p,si(s,p)}}function qw(s,u){var p=s.updateQueue,g=s.alternate;if(g!==null&&(g=g.updateQueue,p===g)){var w=null,_=null;if(p=p.firstBaseUpdate,p!==null){do{var R={lane:p.lane,tag:p.tag,payload:p.payload,callback:null,next:null};_===null?w=_=R:_=_.next=R,p=p.next}while(p!==null);_===null?w=_=u:_=_.next=u}else w=_=u;p={baseState:g.baseState,firstBaseUpdate:w,lastBaseUpdate:_,shared:g.shared,callbacks:g.callbacks},s.updateQueue=p;return}s=p.lastBaseUpdate,s===null?p.firstBaseUpdate=u:s.next=u,p.lastBaseUpdate=u}var Kw=!1;function cp(){if(Kw){var s=Fu;if(s!==null)throw s}}function up(s,u,p,g){Kw=!1;var w=s.updateQueue;Ds=!1;var _=w.firstBaseUpdate,R=w.lastBaseUpdate,M=w.shared.pending;if(M!==null){w.shared.pending=null;var Y=M,ue=Y.next;Y.next=null,R===null?_=ue:R.next=ue,R=Y;var be=s.alternate;be!==null&&(be=be.updateQueue,M=be.lastBaseUpdate,M!==R&&(M===null?be.firstBaseUpdate=ue:M.next=ue,be.lastBaseUpdate=Y))}if(_!==null){var Se=w.baseState;R=0,be=ue=Y=null,M=_;do{var fe=M.lane&-536870913,me=fe!==M.lane;if(me?(At&fe)===fe:(g&fe)===fe){fe!==0&&fe===Lu&&(Kw=!0),be!==null&&(be=be.next={lane:0,tag:M.tag,payload:M.payload,callback:null,next:null});e:{var He=s,rt=M;fe=u;var dn=p;switch(rt.tag){case 1:if(He=rt.payload,typeof He=="function"){Se=He.call(dn,Se,fe);break e}Se=He;break e;case 3:He.flags=He.flags&-65537|128;case 0:if(He=rt.payload,fe=typeof He=="function"?He.call(dn,Se,fe):He,fe==null)break e;Se=h({},Se,fe);break e;case 2:Ds=!0}}fe=M.callback,fe!==null&&(s.flags|=64,me&&(s.flags|=8192),me=w.callbacks,me===null?w.callbacks=[fe]:me.push(fe))}else me={lane:fe,tag:M.tag,payload:M.payload,callback:M.callback,next:null},be===null?(ue=be=me,Y=Se):be=be.next=me,R|=fe;if(M=M.next,M===null){if(M=w.shared.pending,M===null)break;me=M,M=me.next,me.next=null,w.lastBaseUpdate=me,w.shared.pending=null}}while(!0);be===null&&(Y=Se),w.baseState=Y,w.firstBaseUpdate=ue,w.lastBaseUpdate=be,_===null&&(w.shared.lanes=0),Us|=R,s.lanes=R,s.memoizedState=Se}}function SN(s,u){if(typeof s!="function")throw Error(r(191,s));s.call(u)}function _N(s,u){var p=s.callbacks;if(p!==null)for(s.callbacks=null,s=0;s<p.length;s++)SN(p[s],u)}var Bu=P(null),Ng=P(0);function CN(s,u){s=Qa,O(Ng,s),O(Bu,u),Qa=s|u.baseLanes}function Gw(){O(Ng,Qa),O(Bu,Bu.current)}function Zw(){Qa=Ng.current,V(Bu),V(Ng)}var Pi=P(null),ho=null;function Ms(s){var u=s.alternate;O(Kn,Kn.current&1),O(Pi,s),ho===null&&(u===null||Bu.current!==null||u.memoizedState!==null)&&(ho=s)}function Yw(s){O(Kn,Kn.current),O(Pi,s),ho===null&&(ho=s)}function kN(s){s.tag===22?(O(Kn,Kn.current),O(Pi,s),ho===null&&(ho=s)):zs()}function zs(){O(Kn,Kn.current),O(Pi,Pi.current)}function Mi(s){V(Pi),ho===s&&(ho=null),V(Kn)}var Kn=P(0);function Ag(s){for(var u=s;u!==null;){if(u.tag===13){var p=u.memoizedState;if(p!==null&&(p=p.dehydrated,p===null||t_(p)||n_(p)))return u}else if(u.tag===19&&(u.memoizedProps.revealOrder==="forwards"||u.memoizedProps.revealOrder==="backwards"||u.memoizedProps.revealOrder==="unstable_legacy-backwards"||u.memoizedProps.revealOrder==="together")){if((u.flags&128)!==0)return u}else if(u.child!==null){u.child.return=u,u=u.child;continue}if(u===s)break;for(;u.sibling===null;){if(u.return===null||u.return===s)return null;u=u.return}u.sibling.return=u.return,u=u.sibling}return null}var qa=0,vt=null,cn=null,tr=null,Og=!1,Hu=!1,uc=!1,Dg=0,dp=0,qu=null,IZ=0;function Fn(){throw Error(r(321))}function Ww(s,u){if(u===null)return!1;for(var p=0;p<u.length&&p<s.length;p++)if(!Di(s[p],u[p]))return!1;return!0}function Xw(s,u,p,g,w,_){return qa=_,vt=u,u.memoizedState=null,u.updateQueue=null,u.lanes=0,z.H=s===null||s.memoizedState===null?lA:fS,uc=!1,_=p(g,w),uc=!1,Hu&&(_=jN(u,p,g,w)),EN(s),_}function EN(s){z.H=mp;var u=cn!==null&&cn.next!==null;if(qa=0,tr=cn=vt=null,Og=!1,dp=0,qu=null,u)throw Error(r(300));s===null||nr||(s=s.dependencies,s!==null&&Cg(s)&&(nr=!0))}function jN(s,u,p,g){vt=s;var w=0;do{if(Hu&&(qu=null),dp=0,Hu=!1,25<=w)throw Error(r(301));if(w+=1,tr=cn=null,s.updateQueue!=null){var _=s.updateQueue;_.lastEffect=null,_.events=null,_.stores=null,_.memoCache!=null&&(_.memoCache.index=0)}z.H=cA,_=u(p,g)}while(Hu);return _}function TZ(){var s=z.H,u=s.useState()[0];return u=typeof u.then=="function"?fp(u):u,s=s.useState()[0],(cn!==null?cn.memoizedState:null)!==s&&(vt.flags|=1024),u}function Jw(){var s=Dg!==0;return Dg=0,s}function Qw(s,u,p){u.updateQueue=s.updateQueue,u.flags&=-2053,s.lanes&=~p}function eS(s){if(Og){for(s=s.memoizedState;s!==null;){var u=s.queue;u!==null&&(u.pending=null),s=s.next}Og=!1}qa=0,tr=cn=vt=null,Hu=!1,dp=Dg=0,qu=null}function Hr(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return tr===null?vt.memoizedState=tr=s:tr=tr.next=s,tr}function Gn(){if(cn===null){var s=vt.alternate;s=s!==null?s.memoizedState:null}else s=cn.next;var u=tr===null?vt.memoizedState:tr.next;if(u!==null)tr=u,cn=s;else{if(s===null)throw vt.alternate===null?Error(r(467)):Error(r(310));cn=s,s={memoizedState:cn.memoizedState,baseState:cn.baseState,baseQueue:cn.baseQueue,queue:cn.queue,next:null},tr===null?vt.memoizedState=tr=s:tr=tr.next=s}return tr}function $g(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function fp(s){var u=dp;return dp+=1,qu===null&&(qu=[]),s=vN(qu,s,u),u=vt,(tr===null?u.memoizedState:tr.next)===null&&(u=u.alternate,z.H=u===null||u.memoizedState===null?lA:fS),s}function Pg(s){if(s!==null&&typeof s=="object"){if(typeof s.then=="function")return fp(s);if(s.$$typeof===j)return Cr(s)}throw Error(r(438,String(s)))}function tS(s){var u=null,p=vt.updateQueue;if(p!==null&&(u=p.memoCache),u==null){var g=vt.alternate;g!==null&&(g=g.updateQueue,g!==null&&(g=g.memoCache,g!=null&&(u={data:g.data.map(function(w){return w.slice()}),index:0})))}if(u==null&&(u={data:[],index:0}),p===null&&(p=$g(),vt.updateQueue=p),p.memoCache=u,p=u.data[u.index],p===void 0)for(p=u.data[u.index]=Array(s),g=0;g<s;g++)p[g]=H;return u.index++,p}function Ka(s,u){return typeof u=="function"?u(s):u}function Mg(s){var u=Gn();return nS(u,cn,s)}function nS(s,u,p){var g=s.queue;if(g===null)throw Error(r(311));g.lastRenderedReducer=p;var w=s.baseQueue,_=g.pending;if(_!==null){if(w!==null){var R=w.next;w.next=_.next,_.next=R}u.baseQueue=w=_,g.pending=null}if(_=s.baseState,w===null)s.memoizedState=_;else{u=w.next;var M=R=null,Y=null,ue=u,be=!1;do{var Se=ue.lane&-536870913;if(Se!==ue.lane?(At&Se)===Se:(qa&Se)===Se){var fe=ue.revertLane;if(fe===0)Y!==null&&(Y=Y.next={lane:0,revertLane:0,gesture:null,action:ue.action,hasEagerState:ue.hasEagerState,eagerState:ue.eagerState,next:null}),Se===Lu&&(be=!0);else if((qa&fe)===fe){ue=ue.next,fe===Lu&&(be=!0);continue}else Se={lane:0,revertLane:ue.revertLane,gesture:null,action:ue.action,hasEagerState:ue.hasEagerState,eagerState:ue.eagerState,next:null},Y===null?(M=Y=Se,R=_):Y=Y.next=Se,vt.lanes|=fe,Us|=fe;Se=ue.action,uc&&p(_,Se),_=ue.hasEagerState?ue.eagerState:p(_,Se)}else fe={lane:Se,revertLane:ue.revertLane,gesture:ue.gesture,action:ue.action,hasEagerState:ue.hasEagerState,eagerState:ue.eagerState,next:null},Y===null?(M=Y=fe,R=_):Y=Y.next=fe,vt.lanes|=Se,Us|=Se;ue=ue.next}while(ue!==null&&ue!==u);if(Y===null?R=_:Y.next=M,!Di(_,s.memoizedState)&&(nr=!0,be&&(p=Fu,p!==null)))throw p;s.memoizedState=_,s.baseState=R,s.baseQueue=Y,g.lastRenderedState=_}return w===null&&(g.lanes=0),[s.memoizedState,g.dispatch]}function rS(s){var u=Gn(),p=u.queue;if(p===null)throw Error(r(311));p.lastRenderedReducer=s;var g=p.dispatch,w=p.pending,_=u.memoizedState;if(w!==null){p.pending=null;var R=w=w.next;do _=s(_,R.action),R=R.next;while(R!==w);Di(_,u.memoizedState)||(nr=!0),u.memoizedState=_,u.baseQueue===null&&(u.baseState=_),p.lastRenderedState=_}return[_,g]}function RN(s,u,p){var g=vt,w=Gn(),_=Pt;if(_){if(p===void 0)throw Error(r(407));p=p()}else p=u();var R=!Di((cn||w).memoizedState,p);if(R&&(w.memoizedState=p,nr=!0),w=w.queue,aS(NN.bind(null,g,w,s),[s]),w.getSnapshot!==u||R||tr!==null&&tr.memoizedState.tag&1){if(g.flags|=2048,Ku(9,{destroy:void 0},TN.bind(null,g,w,p,u),null),gn===null)throw Error(r(349));_||(qa&127)!==0||IN(g,u,p)}return p}function IN(s,u,p){s.flags|=16384,s={getSnapshot:u,value:p},u=vt.updateQueue,u===null?(u=$g(),vt.updateQueue=u,u.stores=[s]):(p=u.stores,p===null?u.stores=[s]:p.push(s))}function TN(s,u,p,g){u.value=p,u.getSnapshot=g,AN(u)&&ON(s)}function NN(s,u,p){return p(function(){AN(u)&&ON(s)})}function AN(s){var u=s.getSnapshot;s=s.value;try{var p=u();return!Di(s,p)}catch{return!0}}function ON(s){var u=tc(s,2);u!==null&&hi(u,s,2)}function iS(s){var u=Hr();if(typeof s=="function"){var p=s;if(s=p(),uc){sn(!0);try{p()}finally{sn(!1)}}}return u.memoizedState=u.baseState=s,u.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ka,lastRenderedState:s},u}function DN(s,u,p,g){return s.baseState=p,nS(s,cn,typeof g=="function"?g:Ka)}function NZ(s,u,p,g,w){if(Fg(s))throw Error(r(485));if(s=u.action,s!==null){var _={payload:w,action:s,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(R){_.listeners.push(R)}};z.T!==null?p(!0):_.isTransition=!1,g(_),p=u.pending,p===null?(_.next=u.pending=_,$N(u,_)):(_.next=p.next,u.pending=p.next=_)}}function $N(s,u){var p=u.action,g=u.payload,w=s.state;if(u.isTransition){var _=z.T,R={};z.T=R;try{var M=p(w,g),Y=z.S;Y!==null&&Y(R,M),PN(s,u,M)}catch(ue){oS(s,u,ue)}finally{_!==null&&R.types!==null&&(_.types=R.types),z.T=_}}else try{_=p(w,g),PN(s,u,_)}catch(ue){oS(s,u,ue)}}function PN(s,u,p){p!==null&&typeof p=="object"&&typeof p.then=="function"?p.then(function(g){MN(s,u,g)},function(g){return oS(s,u,g)}):MN(s,u,p)}function MN(s,u,p){u.status="fulfilled",u.value=p,zN(u),s.state=p,u=s.pending,u!==null&&(p=u.next,p===u?s.pending=null:(p=p.next,u.next=p,$N(s,p)))}function oS(s,u,p){var g=s.pending;if(s.pending=null,g!==null){g=g.next;do u.status="rejected",u.reason=p,zN(u),u=u.next;while(u!==g)}s.action=null}function zN(s){s=s.listeners;for(var u=0;u<s.length;u++)(0,s[u])()}function LN(s,u){return u}function FN(s,u){if(Pt){var p=gn.formState;if(p!==null){e:{var g=vt;if(Pt){if(En){t:{for(var w=En,_=mo;w.nodeType!==8;){if(!_){w=null;break t}if(w=go(w.nextSibling),w===null){w=null;break t}}_=w.data,w=_==="F!"||_==="F"?w:null}if(w){En=go(w.nextSibling),g=w.data==="F!";break e}}As(g)}g=!1}g&&(u=p[0])}}return p=Hr(),p.memoizedState=p.baseState=u,g={pending:null,lanes:0,dispatch:null,lastRenderedReducer:LN,lastRenderedState:u},p.queue=g,p=oA.bind(null,vt,g),g.dispatch=p,g=iS(!1),_=dS.bind(null,vt,!1,g.queue),g=Hr(),w={state:u,dispatch:null,action:s,pending:null},g.queue=w,p=NZ.bind(null,vt,w,_,p),w.dispatch=p,g.memoizedState=s,[u,p,!1]}function UN(s){var u=Gn();return VN(u,cn,s)}function VN(s,u,p){if(u=nS(s,u,LN)[0],s=Mg(Ka)[0],typeof u=="object"&&u!==null&&typeof u.then=="function")try{var g=fp(u)}catch(R){throw R===Uu?jg:R}else g=u;u=Gn();var w=u.queue,_=w.dispatch;return p!==u.memoizedState&&(vt.flags|=2048,Ku(9,{destroy:void 0},AZ.bind(null,w,p),null)),[g,_,s]}function AZ(s,u){s.action=u}function BN(s){var u=Gn(),p=cn;if(p!==null)return VN(u,p,s);Gn(),u=u.memoizedState,p=Gn();var g=p.queue.dispatch;return p.memoizedState=s,[u,g,!1]}function Ku(s,u,p,g){return s={tag:s,create:p,deps:g,inst:u,next:null},u=vt.updateQueue,u===null&&(u=$g(),vt.updateQueue=u),p=u.lastEffect,p===null?u.lastEffect=s.next=s:(g=p.next,p.next=s,s.next=g,u.lastEffect=s),s}function HN(){return Gn().memoizedState}function zg(s,u,p,g){var w=Hr();vt.flags|=s,w.memoizedState=Ku(1|u,{destroy:void 0},p,g===void 0?null:g)}function Lg(s,u,p,g){var w=Gn();g=g===void 0?null:g;var _=w.memoizedState.inst;cn!==null&&g!==null&&Ww(g,cn.memoizedState.deps)?w.memoizedState=Ku(u,_,p,g):(vt.flags|=s,w.memoizedState=Ku(1|u,_,p,g))}function qN(s,u){zg(8390656,8,s,u)}function aS(s,u){Lg(2048,8,s,u)}function OZ(s){vt.flags|=4;var u=vt.updateQueue;if(u===null)u=$g(),vt.updateQueue=u,u.events=[s];else{var p=u.events;p===null?u.events=[s]:p.push(s)}}function KN(s){var u=Gn().memoizedState;return OZ({ref:u,nextImpl:s}),function(){if((Yt&2)!==0)throw Error(r(440));return u.impl.apply(void 0,arguments)}}function GN(s,u){return Lg(4,2,s,u)}function ZN(s,u){return Lg(4,4,s,u)}function YN(s,u){if(typeof u=="function"){s=s();var p=u(s);return function(){typeof p=="function"?p():u(null)}}if(u!=null)return s=s(),u.current=s,function(){u.current=null}}function WN(s,u,p){p=p!=null?p.concat([s]):null,Lg(4,4,YN.bind(null,u,s),p)}function sS(){}function XN(s,u){var p=Gn();u=u===void 0?null:u;var g=p.memoizedState;return u!==null&&Ww(u,g[1])?g[0]:(p.memoizedState=[s,u],s)}function JN(s,u){var p=Gn();u=u===void 0?null:u;var g=p.memoizedState;if(u!==null&&Ww(u,g[1]))return g[0];if(g=s(),uc){sn(!0);try{s()}finally{sn(!1)}}return p.memoizedState=[g,u],g}function lS(s,u,p){return p===void 0||(qa&1073741824)!==0&&(At&261930)===0?s.memoizedState=u:(s.memoizedState=p,s=QA(),vt.lanes|=s,Us|=s,p)}function QN(s,u,p,g){return Di(p,u)?p:Bu.current!==null?(s=lS(s,p,g),Di(s,u)||(nr=!0),s):(qa&42)===0||(qa&1073741824)!==0&&(At&261930)===0?(nr=!0,s.memoizedState=p):(s=QA(),vt.lanes|=s,Us|=s,u)}function eA(s,u,p,g,w){var _=W.p;W.p=_!==0&&8>_?_:8;var R=z.T,M={};z.T=M,dS(s,!1,u,p);try{var Y=w(),ue=z.S;if(ue!==null&&ue(M,Y),Y!==null&&typeof Y=="object"&&typeof Y.then=="function"){var be=RZ(Y,g);pp(s,u,be,Fi(s))}else pp(s,u,g,Fi(s))}catch(Se){pp(s,u,{then:function(){},status:"rejected",reason:Se},Fi())}finally{W.p=_,R!==null&&M.types!==null&&(R.types=M.types),z.T=R}}function DZ(){}function cS(s,u,p,g){if(s.tag!==5)throw Error(r(476));var w=tA(s).queue;eA(s,w,u,F,p===null?DZ:function(){return nA(s),p(g)})}function tA(s){var u=s.memoizedState;if(u!==null)return u;u={memoizedState:F,baseState:F,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ka,lastRenderedState:F},next:null};var p={};return u.next={memoizedState:p,baseState:p,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ka,lastRenderedState:p},next:null},s.memoizedState=u,s=s.alternate,s!==null&&(s.memoizedState=u),u}function nA(s){var u=tA(s);u.next===null&&(u=s.alternate.memoizedState),pp(s,u.next.queue,{},Fi())}function uS(){return Cr(Tp)}function rA(){return Gn().memoizedState}function iA(){return Gn().memoizedState}function $Z(s){for(var u=s.return;u!==null;){switch(u.tag){case 24:case 3:var p=Fi();s=$s(p);var g=Ps(u,s,p);g!==null&&(hi(g,u,p),lp(g,u,p)),u={cache:Lw()},s.payload=u;return}u=u.return}}function PZ(s,u,p){var g=Fi();p={lane:g,revertLane:0,gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null},Fg(s)?aA(u,p):(p=Rw(s,u,p,g),p!==null&&(hi(p,s,g),sA(p,u,g)))}function oA(s,u,p){var g=Fi();pp(s,u,p,g)}function pp(s,u,p,g){var w={lane:g,revertLane:0,gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null};if(Fg(s))aA(u,w);else{var _=s.alternate;if(s.lanes===0&&(_===null||_.lanes===0)&&(_=u.lastRenderedReducer,_!==null))try{var R=u.lastRenderedState,M=_(R,p);if(w.hasEagerState=!0,w.eagerState=M,Di(M,R))return xg(s,u,w,0),gn===null&&bg(),!1}catch{}if(p=Rw(s,u,w,g),p!==null)return hi(p,s,g),sA(p,u,g),!0}return!1}function dS(s,u,p,g){if(g={lane:2,revertLane:BS(),gesture:null,action:g,hasEagerState:!1,eagerState:null,next:null},Fg(s)){if(u)throw Error(r(479))}else u=Rw(s,p,g,2),u!==null&&hi(u,s,2)}function Fg(s){var u=s.alternate;return s===vt||u!==null&&u===vt}function aA(s,u){Hu=Og=!0;var p=s.pending;p===null?u.next=u:(u.next=p.next,p.next=u),s.pending=u}function sA(s,u,p){if((p&4194048)!==0){var g=u.lanes;g&=s.pendingLanes,p|=g,u.lanes=p,si(s,p)}}var mp={readContext:Cr,use:Pg,useCallback:Fn,useContext:Fn,useEffect:Fn,useImperativeHandle:Fn,useLayoutEffect:Fn,useInsertionEffect:Fn,useMemo:Fn,useReducer:Fn,useRef:Fn,useState:Fn,useDebugValue:Fn,useDeferredValue:Fn,useTransition:Fn,useSyncExternalStore:Fn,useId:Fn,useHostTransitionStatus:Fn,useFormState:Fn,useActionState:Fn,useOptimistic:Fn,useMemoCache:Fn,useCacheRefresh:Fn};mp.useEffectEvent=Fn;var lA={readContext:Cr,use:Pg,useCallback:function(s,u){return Hr().memoizedState=[s,u===void 0?null:u],s},useContext:Cr,useEffect:qN,useImperativeHandle:function(s,u,p){p=p!=null?p.concat([s]):null,zg(4194308,4,YN.bind(null,u,s),p)},useLayoutEffect:function(s,u){return zg(4194308,4,s,u)},useInsertionEffect:function(s,u){zg(4,2,s,u)},useMemo:function(s,u){var p=Hr();u=u===void 0?null:u;var g=s();if(uc){sn(!0);try{s()}finally{sn(!1)}}return p.memoizedState=[g,u],g},useReducer:function(s,u,p){var g=Hr();if(p!==void 0){var w=p(u);if(uc){sn(!0);try{p(u)}finally{sn(!1)}}}else w=u;return g.memoizedState=g.baseState=w,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:w},g.queue=s,s=s.dispatch=PZ.bind(null,vt,s),[g.memoizedState,s]},useRef:function(s){var u=Hr();return s={current:s},u.memoizedState=s},useState:function(s){s=iS(s);var u=s.queue,p=oA.bind(null,vt,u);return u.dispatch=p,[s.memoizedState,p]},useDebugValue:sS,useDeferredValue:function(s,u){var p=Hr();return lS(p,s,u)},useTransition:function(){var s=iS(!1);return s=eA.bind(null,vt,s.queue,!0,!1),Hr().memoizedState=s,[!1,s]},useSyncExternalStore:function(s,u,p){var g=vt,w=Hr();if(Pt){if(p===void 0)throw Error(r(407));p=p()}else{if(p=u(),gn===null)throw Error(r(349));(At&127)!==0||IN(g,u,p)}w.memoizedState=p;var _={value:p,getSnapshot:u};return w.queue=_,qN(NN.bind(null,g,_,s),[s]),g.flags|=2048,Ku(9,{destroy:void 0},TN.bind(null,g,_,p,u),null),p},useId:function(){var s=Hr(),u=gn.identifierPrefix;if(Pt){var p=da,g=ua;p=(g&~(1<<32-jt(g)-1)).toString(32)+p,u="_"+u+"R_"+p,p=Dg++,0<p&&(u+="H"+p.toString(32)),u+="_"}else p=IZ++,u="_"+u+"r_"+p.toString(32)+"_";return s.memoizedState=u},useHostTransitionStatus:uS,useFormState:FN,useActionState:FN,useOptimistic:function(s){var u=Hr();u.memoizedState=u.baseState=s;var p={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return u.queue=p,u=dS.bind(null,vt,!0,p),p.dispatch=u,[s,u]},useMemoCache:tS,useCacheRefresh:function(){return Hr().memoizedState=$Z.bind(null,vt)},useEffectEvent:function(s){var u=Hr(),p={impl:s};return u.memoizedState=p,function(){if((Yt&2)!==0)throw Error(r(440));return p.impl.apply(void 0,arguments)}}},fS={readContext:Cr,use:Pg,useCallback:XN,useContext:Cr,useEffect:aS,useImperativeHandle:WN,useInsertionEffect:GN,useLayoutEffect:ZN,useMemo:JN,useReducer:Mg,useRef:HN,useState:function(){return Mg(Ka)},useDebugValue:sS,useDeferredValue:function(s,u){var p=Gn();return QN(p,cn.memoizedState,s,u)},useTransition:function(){var s=Mg(Ka)[0],u=Gn().memoizedState;return[typeof s=="boolean"?s:fp(s),u]},useSyncExternalStore:RN,useId:rA,useHostTransitionStatus:uS,useFormState:UN,useActionState:UN,useOptimistic:function(s,u){var p=Gn();return DN(p,cn,s,u)},useMemoCache:tS,useCacheRefresh:iA};fS.useEffectEvent=KN;var cA={readContext:Cr,use:Pg,useCallback:XN,useContext:Cr,useEffect:aS,useImperativeHandle:WN,useInsertionEffect:GN,useLayoutEffect:ZN,useMemo:JN,useReducer:rS,useRef:HN,useState:function(){return rS(Ka)},useDebugValue:sS,useDeferredValue:function(s,u){var p=Gn();return cn===null?lS(p,s,u):QN(p,cn.memoizedState,s,u)},useTransition:function(){var s=rS(Ka)[0],u=Gn().memoizedState;return[typeof s=="boolean"?s:fp(s),u]},useSyncExternalStore:RN,useId:rA,useHostTransitionStatus:uS,useFormState:BN,useActionState:BN,useOptimistic:function(s,u){var p=Gn();return cn!==null?DN(p,cn,s,u):(p.baseState=s,[s,p.queue.dispatch])},useMemoCache:tS,useCacheRefresh:iA};cA.useEffectEvent=KN;function pS(s,u,p,g){u=s.memoizedState,p=p(g,u),p=p==null?u:h({},u,p),s.memoizedState=p,s.lanes===0&&(s.updateQueue.baseState=p)}var mS={enqueueSetState:function(s,u,p){s=s._reactInternals;var g=Fi(),w=$s(g);w.payload=u,p!=null&&(w.callback=p),u=Ps(s,w,g),u!==null&&(hi(u,s,g),lp(u,s,g))},enqueueReplaceState:function(s,u,p){s=s._reactInternals;var g=Fi(),w=$s(g);w.tag=1,w.payload=u,p!=null&&(w.callback=p),u=Ps(s,w,g),u!==null&&(hi(u,s,g),lp(u,s,g))},enqueueForceUpdate:function(s,u){s=s._reactInternals;var p=Fi(),g=$s(p);g.tag=2,u!=null&&(g.callback=u),u=Ps(s,g,p),u!==null&&(hi(u,s,p),lp(u,s,p))}};function uA(s,u,p,g,w,_,R){return s=s.stateNode,typeof s.shouldComponentUpdate=="function"?s.shouldComponentUpdate(g,_,R):u.prototype&&u.prototype.isPureReactComponent?!ep(p,g)||!ep(w,_):!0}function dA(s,u,p,g){s=u.state,typeof u.componentWillReceiveProps=="function"&&u.componentWillReceiveProps(p,g),typeof u.UNSAFE_componentWillReceiveProps=="function"&&u.UNSAFE_componentWillReceiveProps(p,g),u.state!==s&&mS.enqueueReplaceState(u,u.state,null)}function dc(s,u){var p=u;if("ref"in u){p={};for(var g in u)g!=="ref"&&(p[g]=u[g])}if(s=s.defaultProps){p===u&&(p=h({},p));for(var w in s)p[w]===void 0&&(p[w]=s[w])}return p}function fA(s){yg(s)}function pA(s){console.error(s)}function mA(s){yg(s)}function Ug(s,u){try{var p=s.onUncaughtError;p(u.value,{componentStack:u.stack})}catch(g){setTimeout(function(){throw g})}}function hA(s,u,p){try{var g=s.onCaughtError;g(p.value,{componentStack:p.stack,errorBoundary:u.tag===1?u.stateNode:null})}catch(w){setTimeout(function(){throw w})}}function hS(s,u,p){return p=$s(p),p.tag=3,p.payload={element:null},p.callback=function(){Ug(s,u)},p}function gA(s){return s=$s(s),s.tag=3,s}function vA(s,u,p,g){var w=p.type.getDerivedStateFromError;if(typeof w=="function"){var _=g.value;s.payload=function(){return w(_)},s.callback=function(){hA(u,p,g)}}var R=p.stateNode;R!==null&&typeof R.componentDidCatch=="function"&&(s.callback=function(){hA(u,p,g),typeof w!="function"&&(Vs===null?Vs=new Set([this]):Vs.add(this));var M=g.stack;this.componentDidCatch(g.value,{componentStack:M!==null?M:""})})}function MZ(s,u,p,g,w){if(p.flags|=32768,g!==null&&typeof g=="object"&&typeof g.then=="function"){if(u=p.alternate,u!==null&&zu(u,p,w,!0),p=Pi.current,p!==null){switch(p.tag){case 31:case 13:return ho===null?Qg():p.alternate===null&&Un===0&&(Un=3),p.flags&=-257,p.flags|=65536,p.lanes=w,g===Rg?p.flags|=16384:(u=p.updateQueue,u===null?p.updateQueue=new Set([g]):u.add(g),FS(s,g,w)),!1;case 22:return p.flags|=65536,g===Rg?p.flags|=16384:(u=p.updateQueue,u===null?(u={transitions:null,markerInstances:null,retryQueue:new Set([g])},p.updateQueue=u):(p=u.retryQueue,p===null?u.retryQueue=new Set([g]):p.add(g)),FS(s,g,w)),!1}throw Error(r(435,p.tag))}return FS(s,g,w),Qg(),!1}if(Pt)return u=Pi.current,u!==null?((u.flags&65536)===0&&(u.flags|=256),u.flags|=65536,u.lanes=w,g!==Dw&&(s=Error(r(422),{cause:g}),rp(uo(s,p)))):(g!==Dw&&(u=Error(r(423),{cause:g}),rp(uo(u,p))),s=s.current.alternate,s.flags|=65536,w&=-w,s.lanes|=w,g=uo(g,p),w=hS(s.stateNode,g,w),qw(s,w),Un!==4&&(Un=2)),!1;var _=Error(r(520),{cause:g});if(_=uo(_,p),Sp===null?Sp=[_]:Sp.push(_),Un!==4&&(Un=2),u===null)return!0;g=uo(g,p),p=u;do{switch(p.tag){case 3:return p.flags|=65536,s=w&-w,p.lanes|=s,s=hS(p.stateNode,g,s),qw(p,s),!1;case 1:if(u=p.type,_=p.stateNode,(p.flags&128)===0&&(typeof u.getDerivedStateFromError=="function"||_!==null&&typeof _.componentDidCatch=="function"&&(Vs===null||!Vs.has(_))))return p.flags|=65536,w&=-w,p.lanes|=w,w=gA(w),vA(w,s,p,g),qw(p,w),!1}p=p.return}while(p!==null);return!1}var gS=Error(r(461)),nr=!1;function kr(s,u,p,g){u.child=s===null?wN(u,null,p,g):cc(u,s.child,p,g)}function yA(s,u,p,g,w){p=p.render;var _=u.ref;if("ref"in g){var R={};for(var M in g)M!=="ref"&&(R[M]=g[M])}else R=g;return oc(u),g=Xw(s,u,p,R,_,w),M=Jw(),s!==null&&!nr?(Qw(s,u,w),Ga(s,u,w)):(Pt&&M&&Aw(u),u.flags|=1,kr(s,u,g,w),u.child)}function bA(s,u,p,g,w){if(s===null){var _=p.type;return typeof _=="function"&&!Iw(_)&&_.defaultProps===void 0&&p.compare===null?(u.tag=15,u.type=_,xA(s,u,_,g,w)):(s=Sg(p.type,null,g,u,u.mode,w),s.ref=u.ref,s.return=u,u.child=s)}if(_=s.child,!CS(s,w)){var R=_.memoizedProps;if(p=p.compare,p=p!==null?p:ep,p(R,g)&&s.ref===u.ref)return Ga(s,u,w)}return u.flags|=1,s=Ua(_,g),s.ref=u.ref,s.return=u,u.child=s}function xA(s,u,p,g,w){if(s!==null){var _=s.memoizedProps;if(ep(_,g)&&s.ref===u.ref)if(nr=!1,u.pendingProps=g=_,CS(s,w))(s.flags&131072)!==0&&(nr=!0);else return u.lanes=s.lanes,Ga(s,u,w)}return vS(s,u,p,g,w)}function wA(s,u,p,g){var w=g.children,_=s!==null?s.memoizedState:null;if(s===null&&u.stateNode===null&&(u.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),g.mode==="hidden"){if((u.flags&128)!==0){if(_=_!==null?_.baseLanes|p:p,s!==null){for(g=u.child=s.child,w=0;g!==null;)w=w|g.lanes|g.childLanes,g=g.sibling;g=w&~_}else g=0,u.child=null;return SA(s,u,_,p,g)}if((p&536870912)!==0)u.memoizedState={baseLanes:0,cachePool:null},s!==null&&Eg(u,_!==null?_.cachePool:null),_!==null?CN(u,_):Gw(),kN(u);else return g=u.lanes=536870912,SA(s,u,_!==null?_.baseLanes|p:p,p,g)}else _!==null?(Eg(u,_.cachePool),CN(u,_),zs(),u.memoizedState=null):(s!==null&&Eg(u,null),Gw(),zs());return kr(s,u,w,p),u.child}function hp(s,u){return s!==null&&s.tag===22||u.stateNode!==null||(u.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),u.sibling}function SA(s,u,p,g,w){var _=Uw();return _=_===null?null:{parent:er._currentValue,pool:_},u.memoizedState={baseLanes:p,cachePool:_},s!==null&&Eg(u,null),Gw(),kN(u),s!==null&&zu(s,u,g,!0),u.childLanes=w,null}function Vg(s,u){return u=Hg({mode:u.mode,children:u.children},s.mode),u.ref=s.ref,s.child=u,u.return=s,u}function _A(s,u,p){return cc(u,s.child,null,p),s=Vg(u,u.pendingProps),s.flags|=2,Mi(u),u.memoizedState=null,s}function zZ(s,u,p){var g=u.pendingProps,w=(u.flags&128)!==0;if(u.flags&=-129,s===null){if(Pt){if(g.mode==="hidden")return s=Vg(u,g),u.lanes=536870912,hp(null,s);if(Yw(u),(s=En)?(s=$O(s,mo),s=s!==null&&s.data==="&"?s:null,s!==null&&(u.memoizedState={dehydrated:s,treeContext:Ts!==null?{id:ua,overflow:da}:null,retryLane:536870912,hydrationErrors:null},p=aN(s),p.return=u,u.child=p,_r=u,En=null)):s=null,s===null)throw As(u);return u.lanes=536870912,null}return Vg(u,g)}var _=s.memoizedState;if(_!==null){var R=_.dehydrated;if(Yw(u),w)if(u.flags&256)u.flags&=-257,u=_A(s,u,p);else if(u.memoizedState!==null)u.child=s.child,u.flags|=128,u=null;else throw Error(r(558));else if(nr||zu(s,u,p,!1),w=(p&s.childLanes)!==0,nr||w){if(g=gn,g!==null&&(R=li(g,p),R!==0&&R!==_.retryLane))throw _.retryLane=R,tc(s,R),hi(g,s,R),gS;Qg(),u=_A(s,u,p)}else s=_.treeContext,En=go(R.nextSibling),_r=u,Pt=!0,Ns=null,mo=!1,s!==null&&cN(u,s),u=Vg(u,g),u.flags|=4096;return u}return s=Ua(s.child,{mode:g.mode,children:g.children}),s.ref=u.ref,u.child=s,s.return=u,s}function Bg(s,u){var p=u.ref;if(p===null)s!==null&&s.ref!==null&&(u.flags|=4194816);else{if(typeof p!="function"&&typeof p!="object")throw Error(r(284));(s===null||s.ref!==p)&&(u.flags|=4194816)}}function vS(s,u,p,g,w){return oc(u),p=Xw(s,u,p,g,void 0,w),g=Jw(),s!==null&&!nr?(Qw(s,u,w),Ga(s,u,w)):(Pt&&g&&Aw(u),u.flags|=1,kr(s,u,p,w),u.child)}function CA(s,u,p,g,w,_){return oc(u),u.updateQueue=null,p=jN(u,g,p,w),EN(s),g=Jw(),s!==null&&!nr?(Qw(s,u,_),Ga(s,u,_)):(Pt&&g&&Aw(u),u.flags|=1,kr(s,u,p,_),u.child)}function kA(s,u,p,g,w){if(oc(u),u.stateNode===null){var _=Du,R=p.contextType;typeof R=="object"&&R!==null&&(_=Cr(R)),_=new p(g,_),u.memoizedState=_.state!==null&&_.state!==void 0?_.state:null,_.updater=mS,u.stateNode=_,_._reactInternals=u,_=u.stateNode,_.props=g,_.state=u.memoizedState,_.refs={},Bw(u),R=p.contextType,_.context=typeof R=="object"&&R!==null?Cr(R):Du,_.state=u.memoizedState,R=p.getDerivedStateFromProps,typeof R=="function"&&(pS(u,p,R,g),_.state=u.memoizedState),typeof p.getDerivedStateFromProps=="function"||typeof _.getSnapshotBeforeUpdate=="function"||typeof _.UNSAFE_componentWillMount!="function"&&typeof _.componentWillMount!="function"||(R=_.state,typeof _.componentWillMount=="function"&&_.componentWillMount(),typeof _.UNSAFE_componentWillMount=="function"&&_.UNSAFE_componentWillMount(),R!==_.state&&mS.enqueueReplaceState(_,_.state,null),up(u,g,_,w),cp(),_.state=u.memoizedState),typeof _.componentDidMount=="function"&&(u.flags|=4194308),g=!0}else if(s===null){_=u.stateNode;var M=u.memoizedProps,Y=dc(p,M);_.props=Y;var ue=_.context,be=p.contextType;R=Du,typeof be=="object"&&be!==null&&(R=Cr(be));var Se=p.getDerivedStateFromProps;be=typeof Se=="function"||typeof _.getSnapshotBeforeUpdate=="function",M=u.pendingProps!==M,be||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(M||ue!==R)&&dA(u,_,g,R),Ds=!1;var fe=u.memoizedState;_.state=fe,up(u,g,_,w),cp(),ue=u.memoizedState,M||fe!==ue||Ds?(typeof Se=="function"&&(pS(u,p,Se,g),ue=u.memoizedState),(Y=Ds||uA(u,p,Y,g,fe,ue,R))?(be||typeof _.UNSAFE_componentWillMount!="function"&&typeof _.componentWillMount!="function"||(typeof _.componentWillMount=="function"&&_.componentWillMount(),typeof _.UNSAFE_componentWillMount=="function"&&_.UNSAFE_componentWillMount()),typeof _.componentDidMount=="function"&&(u.flags|=4194308)):(typeof _.componentDidMount=="function"&&(u.flags|=4194308),u.memoizedProps=g,u.memoizedState=ue),_.props=g,_.state=ue,_.context=R,g=Y):(typeof _.componentDidMount=="function"&&(u.flags|=4194308),g=!1)}else{_=u.stateNode,Hw(s,u),R=u.memoizedProps,be=dc(p,R),_.props=be,Se=u.pendingProps,fe=_.context,ue=p.contextType,Y=Du,typeof ue=="object"&&ue!==null&&(Y=Cr(ue)),M=p.getDerivedStateFromProps,(ue=typeof M=="function"||typeof _.getSnapshotBeforeUpdate=="function")||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(R!==Se||fe!==Y)&&dA(u,_,g,Y),Ds=!1,fe=u.memoizedState,_.state=fe,up(u,g,_,w),cp();var me=u.memoizedState;R!==Se||fe!==me||Ds||s!==null&&s.dependencies!==null&&Cg(s.dependencies)?(typeof M=="function"&&(pS(u,p,M,g),me=u.memoizedState),(be=Ds||uA(u,p,be,g,fe,me,Y)||s!==null&&s.dependencies!==null&&Cg(s.dependencies))?(ue||typeof _.UNSAFE_componentWillUpdate!="function"&&typeof _.componentWillUpdate!="function"||(typeof _.componentWillUpdate=="function"&&_.componentWillUpdate(g,me,Y),typeof _.UNSAFE_componentWillUpdate=="function"&&_.UNSAFE_componentWillUpdate(g,me,Y)),typeof _.componentDidUpdate=="function"&&(u.flags|=4),typeof _.getSnapshotBeforeUpdate=="function"&&(u.flags|=1024)):(typeof _.componentDidUpdate!="function"||R===s.memoizedProps&&fe===s.memoizedState||(u.flags|=4),typeof _.getSnapshotBeforeUpdate!="function"||R===s.memoizedProps&&fe===s.memoizedState||(u.flags|=1024),u.memoizedProps=g,u.memoizedState=me),_.props=g,_.state=me,_.context=Y,g=be):(typeof _.componentDidUpdate!="function"||R===s.memoizedProps&&fe===s.memoizedState||(u.flags|=4),typeof _.getSnapshotBeforeUpdate!="function"||R===s.memoizedProps&&fe===s.memoizedState||(u.flags|=1024),g=!1)}return _=g,Bg(s,u),g=(u.flags&128)!==0,_||g?(_=u.stateNode,p=g&&typeof p.getDerivedStateFromError!="function"?null:_.render(),u.flags|=1,s!==null&&g?(u.child=cc(u,s.child,null,w),u.child=cc(u,null,p,w)):kr(s,u,p,w),u.memoizedState=_.state,s=u.child):s=Ga(s,u,w),s}function EA(s,u,p,g){return rc(),u.flags|=256,kr(s,u,p,g),u.child}var yS={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function bS(s){return{baseLanes:s,cachePool:hN()}}function xS(s,u,p){return s=s!==null?s.childLanes&~p:0,u&&(s|=Li),s}function jA(s,u,p){var g=u.pendingProps,w=!1,_=(u.flags&128)!==0,R;if((R=_)||(R=s!==null&&s.memoizedState===null?!1:(Kn.current&2)!==0),R&&(w=!0,u.flags&=-129),R=(u.flags&32)!==0,u.flags&=-33,s===null){if(Pt){if(w?Ms(u):zs(),(s=En)?(s=$O(s,mo),s=s!==null&&s.data!=="&"?s:null,s!==null&&(u.memoizedState={dehydrated:s,treeContext:Ts!==null?{id:ua,overflow:da}:null,retryLane:536870912,hydrationErrors:null},p=aN(s),p.return=u,u.child=p,_r=u,En=null)):s=null,s===null)throw As(u);return n_(s)?u.lanes=32:u.lanes=536870912,null}var M=g.children;return g=g.fallback,w?(zs(),w=u.mode,M=Hg({mode:"hidden",children:M},w),g=nc(g,w,p,null),M.return=u,g.return=u,M.sibling=g,u.child=M,g=u.child,g.memoizedState=bS(p),g.childLanes=xS(s,R,p),u.memoizedState=yS,hp(null,g)):(Ms(u),wS(u,M))}var Y=s.memoizedState;if(Y!==null&&(M=Y.dehydrated,M!==null)){if(_)u.flags&256?(Ms(u),u.flags&=-257,u=SS(s,u,p)):u.memoizedState!==null?(zs(),u.child=s.child,u.flags|=128,u=null):(zs(),M=g.fallback,w=u.mode,g=Hg({mode:"visible",children:g.children},w),M=nc(M,w,p,null),M.flags|=2,g.return=u,M.return=u,g.sibling=M,u.child=g,cc(u,s.child,null,p),g=u.child,g.memoizedState=bS(p),g.childLanes=xS(s,R,p),u.memoizedState=yS,u=hp(null,g));else if(Ms(u),n_(M)){if(R=M.nextSibling&&M.nextSibling.dataset,R)var ue=R.dgst;R=ue,g=Error(r(419)),g.stack="",g.digest=R,rp({value:g,source:null,stack:null}),u=SS(s,u,p)}else if(nr||zu(s,u,p,!1),R=(p&s.childLanes)!==0,nr||R){if(R=gn,R!==null&&(g=li(R,p),g!==0&&g!==Y.retryLane))throw Y.retryLane=g,tc(s,g),hi(R,s,g),gS;t_(M)||Qg(),u=SS(s,u,p)}else t_(M)?(u.flags|=192,u.child=s.child,u=null):(s=Y.treeContext,En=go(M.nextSibling),_r=u,Pt=!0,Ns=null,mo=!1,s!==null&&cN(u,s),u=wS(u,g.children),u.flags|=4096);return u}return w?(zs(),M=g.fallback,w=u.mode,Y=s.child,ue=Y.sibling,g=Ua(Y,{mode:"hidden",children:g.children}),g.subtreeFlags=Y.subtreeFlags&65011712,ue!==null?M=Ua(ue,M):(M=nc(M,w,p,null),M.flags|=2),M.return=u,g.return=u,g.sibling=M,u.child=g,hp(null,g),g=u.child,M=s.child.memoizedState,M===null?M=bS(p):(w=M.cachePool,w!==null?(Y=er._currentValue,w=w.parent!==Y?{parent:Y,pool:Y}:w):w=hN(),M={baseLanes:M.baseLanes|p,cachePool:w}),g.memoizedState=M,g.childLanes=xS(s,R,p),u.memoizedState=yS,hp(s.child,g)):(Ms(u),p=s.child,s=p.sibling,p=Ua(p,{mode:"visible",children:g.children}),p.return=u,p.sibling=null,s!==null&&(R=u.deletions,R===null?(u.deletions=[s],u.flags|=16):R.push(s)),u.child=p,u.memoizedState=null,p)}function wS(s,u){return u=Hg({mode:"visible",children:u},s.mode),u.return=s,s.child=u}function Hg(s,u){return s=$i(22,s,null,u),s.lanes=0,s}function SS(s,u,p){return cc(u,s.child,null,p),s=wS(u,u.pendingProps.children),s.flags|=2,u.memoizedState=null,s}function RA(s,u,p){s.lanes|=u;var g=s.alternate;g!==null&&(g.lanes|=u),Mw(s.return,u,p)}function _S(s,u,p,g,w,_){var R=s.memoizedState;R===null?s.memoizedState={isBackwards:u,rendering:null,renderingStartTime:0,last:g,tail:p,tailMode:w,treeForkCount:_}:(R.isBackwards=u,R.rendering=null,R.renderingStartTime=0,R.last=g,R.tail=p,R.tailMode=w,R.treeForkCount=_)}function IA(s,u,p){var g=u.pendingProps,w=g.revealOrder,_=g.tail;g=g.children;var R=Kn.current,M=(R&2)!==0;if(M?(R=R&1|2,u.flags|=128):R&=1,O(Kn,R),kr(s,u,g,p),g=Pt?np:0,!M&&s!==null&&(s.flags&128)!==0)e:for(s=u.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&RA(s,p,u);else if(s.tag===19)RA(s,p,u);else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===u)break e;for(;s.sibling===null;){if(s.return===null||s.return===u)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}switch(w){case"forwards":for(p=u.child,w=null;p!==null;)s=p.alternate,s!==null&&Ag(s)===null&&(w=p),p=p.sibling;p=w,p===null?(w=u.child,u.child=null):(w=p.sibling,p.sibling=null),_S(u,!1,w,p,_,g);break;case"backwards":case"unstable_legacy-backwards":for(p=null,w=u.child,u.child=null;w!==null;){if(s=w.alternate,s!==null&&Ag(s)===null){u.child=w;break}s=w.sibling,w.sibling=p,p=w,w=s}_S(u,!0,p,null,_,g);break;case"together":_S(u,!1,null,null,void 0,g);break;default:u.memoizedState=null}return u.child}function Ga(s,u,p){if(s!==null&&(u.dependencies=s.dependencies),Us|=u.lanes,(p&u.childLanes)===0)if(s!==null){if(zu(s,u,p,!1),(p&u.childLanes)===0)return null}else return null;if(s!==null&&u.child!==s.child)throw Error(r(153));if(u.child!==null){for(s=u.child,p=Ua(s,s.pendingProps),u.child=p,p.return=u;s.sibling!==null;)s=s.sibling,p=p.sibling=Ua(s,s.pendingProps),p.return=u;p.sibling=null}return u.child}function CS(s,u){return(s.lanes&u)!==0?!0:(s=s.dependencies,!!(s!==null&&Cg(s)))}function LZ(s,u,p){switch(u.tag){case 3:ve(u,u.stateNode.containerInfo),Os(u,er,s.memoizedState.cache),rc();break;case 27:case 5:Ee(u);break;case 4:ve(u,u.stateNode.containerInfo);break;case 10:Os(u,u.type,u.memoizedProps.value);break;case 31:if(u.memoizedState!==null)return u.flags|=128,Yw(u),null;break;case 13:var g=u.memoizedState;if(g!==null)return g.dehydrated!==null?(Ms(u),u.flags|=128,null):(p&u.child.childLanes)!==0?jA(s,u,p):(Ms(u),s=Ga(s,u,p),s!==null?s.sibling:null);Ms(u);break;case 19:var w=(s.flags&128)!==0;if(g=(p&u.childLanes)!==0,g||(zu(s,u,p,!1),g=(p&u.childLanes)!==0),w){if(g)return IA(s,u,p);u.flags|=128}if(w=u.memoizedState,w!==null&&(w.rendering=null,w.tail=null,w.lastEffect=null),O(Kn,Kn.current),g)break;return null;case 22:return u.lanes=0,wA(s,u,p,u.pendingProps);case 24:Os(u,er,s.memoizedState.cache)}return Ga(s,u,p)}function TA(s,u,p){if(s!==null)if(s.memoizedProps!==u.pendingProps)nr=!0;else{if(!CS(s,p)&&(u.flags&128)===0)return nr=!1,LZ(s,u,p);nr=(s.flags&131072)!==0}else nr=!1,Pt&&(u.flags&1048576)!==0&&lN(u,np,u.index);switch(u.lanes=0,u.tag){case 16:e:{var g=u.pendingProps;if(s=sc(u.elementType),u.type=s,typeof s=="function")Iw(s)?(g=dc(s,g),u.tag=1,u=kA(null,u,s,g,p)):(u.tag=0,u=vS(null,u,s,g,p));else{if(s!=null){var w=s.$$typeof;if(w===I){u.tag=11,u=yA(null,u,s,g,p);break e}else if(w===N){u.tag=14,u=bA(null,u,s,g,p);break e}}throw u=B(s)||s,Error(r(306,u,""))}}return u;case 0:return vS(s,u,u.type,u.pendingProps,p);case 1:return g=u.type,w=dc(g,u.pendingProps),kA(s,u,g,w,p);case 3:e:{if(ve(u,u.stateNode.containerInfo),s===null)throw Error(r(387));g=u.pendingProps;var _=u.memoizedState;w=_.element,Hw(s,u),up(u,g,null,p);var R=u.memoizedState;if(g=R.cache,Os(u,er,g),g!==_.cache&&zw(u,[er],p,!0),cp(),g=R.element,_.isDehydrated)if(_={element:g,isDehydrated:!1,cache:R.cache},u.updateQueue.baseState=_,u.memoizedState=_,u.flags&256){u=EA(s,u,g,p);break e}else if(g!==w){w=uo(Error(r(424)),u),rp(w),u=EA(s,u,g,p);break e}else for(s=u.stateNode.containerInfo,s.nodeType===9?s=s.body:s=s.nodeName==="HTML"?s.ownerDocument.body:s,En=go(s.firstChild),_r=u,Pt=!0,Ns=null,mo=!0,p=wN(u,null,g,p),u.child=p;p;)p.flags=p.flags&-3|4096,p=p.sibling;else{if(rc(),g===w){u=Ga(s,u,p);break e}kr(s,u,g,p)}u=u.child}return u;case 26:return Bg(s,u),s===null?(p=UO(u.type,null,u.pendingProps,null))?u.memoizedState=p:Pt||(p=u.type,s=u.pendingProps,g=av(ge.current).createElement(p),g[Sr]=u,g[ci]=s,Er(g,p,s),gr(g),u.stateNode=g):u.memoizedState=UO(u.type,s.memoizedProps,u.pendingProps,s.memoizedState),null;case 27:return Ee(u),s===null&&Pt&&(g=u.stateNode=zO(u.type,u.pendingProps,ge.current),_r=u,mo=!0,w=En,Ks(u.type)?(r_=w,En=go(g.firstChild)):En=w),kr(s,u,u.pendingProps.children,p),Bg(s,u),s===null&&(u.flags|=4194304),u.child;case 5:return s===null&&Pt&&((w=g=En)&&(g=hY(g,u.type,u.pendingProps,mo),g!==null?(u.stateNode=g,_r=u,En=go(g.firstChild),mo=!1,w=!0):w=!1),w||As(u)),Ee(u),w=u.type,_=u.pendingProps,R=s!==null?s.memoizedProps:null,g=_.children,JS(w,_)?g=null:R!==null&&JS(w,R)&&(u.flags|=32),u.memoizedState!==null&&(w=Xw(s,u,TZ,null,null,p),Tp._currentValue=w),Bg(s,u),kr(s,u,g,p),u.child;case 6:return s===null&&Pt&&((s=p=En)&&(p=gY(p,u.pendingProps,mo),p!==null?(u.stateNode=p,_r=u,En=null,s=!0):s=!1),s||As(u)),null;case 13:return jA(s,u,p);case 4:return ve(u,u.stateNode.containerInfo),g=u.pendingProps,s===null?u.child=cc(u,null,g,p):kr(s,u,g,p),u.child;case 11:return yA(s,u,u.type,u.pendingProps,p);case 7:return kr(s,u,u.pendingProps,p),u.child;case 8:return kr(s,u,u.pendingProps.children,p),u.child;case 12:return kr(s,u,u.pendingProps.children,p),u.child;case 10:return g=u.pendingProps,Os(u,u.type,g.value),kr(s,u,g.children,p),u.child;case 9:return w=u.type._context,g=u.pendingProps.children,oc(u),w=Cr(w),g=g(w),u.flags|=1,kr(s,u,g,p),u.child;case 14:return bA(s,u,u.type,u.pendingProps,p);case 15:return xA(s,u,u.type,u.pendingProps,p);case 19:return IA(s,u,p);case 31:return zZ(s,u,p);case 22:return wA(s,u,p,u.pendingProps);case 24:return oc(u),g=Cr(er),s===null?(w=Uw(),w===null&&(w=gn,_=Lw(),w.pooledCache=_,_.refCount++,_!==null&&(w.pooledCacheLanes|=p),w=_),u.memoizedState={parent:g,cache:w},Bw(u),Os(u,er,w)):((s.lanes&p)!==0&&(Hw(s,u),up(u,null,null,p),cp()),w=s.memoizedState,_=u.memoizedState,w.parent!==g?(w={parent:g,cache:g},u.memoizedState=w,u.lanes===0&&(u.memoizedState=u.updateQueue.baseState=w),Os(u,er,g)):(g=_.cache,Os(u,er,g),g!==w.cache&&zw(u,[er],p,!0))),kr(s,u,u.pendingProps.children,p),u.child;case 29:throw u.pendingProps}throw Error(r(156,u.tag))}function Za(s){s.flags|=4}function kS(s,u,p,g,w){if((u=(s.mode&32)!==0)&&(u=!1),u){if(s.flags|=16777216,(w&335544128)===w)if(s.stateNode.complete)s.flags|=8192;else if(rO())s.flags|=8192;else throw lc=Rg,Vw}else s.flags&=-16777217}function NA(s,u){if(u.type!=="stylesheet"||(u.state.loading&4)!==0)s.flags&=-16777217;else if(s.flags|=16777216,!KO(u))if(rO())s.flags|=8192;else throw lc=Rg,Vw}function qg(s,u){u!==null&&(s.flags|=4),s.flags&16384&&(u=s.tag!==22?hr():536870912,s.lanes|=u,Wu|=u)}function gp(s,u){if(!Pt)switch(s.tailMode){case"hidden":u=s.tail;for(var p=null;u!==null;)u.alternate!==null&&(p=u),u=u.sibling;p===null?s.tail=null:p.sibling=null;break;case"collapsed":p=s.tail;for(var g=null;p!==null;)p.alternate!==null&&(g=p),p=p.sibling;g===null?u||s.tail===null?s.tail=null:s.tail.sibling=null:g.sibling=null}}function jn(s){var u=s.alternate!==null&&s.alternate.child===s.child,p=0,g=0;if(u)for(var w=s.child;w!==null;)p|=w.lanes|w.childLanes,g|=w.subtreeFlags&65011712,g|=w.flags&65011712,w.return=s,w=w.sibling;else for(w=s.child;w!==null;)p|=w.lanes|w.childLanes,g|=w.subtreeFlags,g|=w.flags,w.return=s,w=w.sibling;return s.subtreeFlags|=g,s.childLanes=p,u}function FZ(s,u,p){var g=u.pendingProps;switch(Ow(u),u.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return jn(u),null;case 1:return jn(u),null;case 3:return p=u.stateNode,g=null,s!==null&&(g=s.memoizedState.cache),u.memoizedState.cache!==g&&(u.flags|=2048),Ha(er),xe(),p.pendingContext&&(p.context=p.pendingContext,p.pendingContext=null),(s===null||s.child===null)&&(Mu(u)?Za(u):s===null||s.memoizedState.isDehydrated&&(u.flags&256)===0||(u.flags|=1024,$w())),jn(u),null;case 26:var w=u.type,_=u.memoizedState;return s===null?(Za(u),_!==null?(jn(u),NA(u,_)):(jn(u),kS(u,w,null,g,p))):_?_!==s.memoizedState?(Za(u),jn(u),NA(u,_)):(jn(u),u.flags&=-16777217):(s=s.memoizedProps,s!==g&&Za(u),jn(u),kS(u,w,s,g,p)),null;case 27:if(Pe(u),p=ge.current,w=u.type,s!==null&&u.stateNode!=null)s.memoizedProps!==g&&Za(u);else{if(!g){if(u.stateNode===null)throw Error(r(166));return jn(u),null}s=X.current,Mu(u)?uN(u):(s=zO(w,g,p),u.stateNode=s,Za(u))}return jn(u),null;case 5:if(Pe(u),w=u.type,s!==null&&u.stateNode!=null)s.memoizedProps!==g&&Za(u);else{if(!g){if(u.stateNode===null)throw Error(r(166));return jn(u),null}if(_=X.current,Mu(u))uN(u);else{var R=av(ge.current);switch(_){case 1:_=R.createElementNS("http://www.w3.org/2000/svg",w);break;case 2:_=R.createElementNS("http://www.w3.org/1998/Math/MathML",w);break;default:switch(w){case"svg":_=R.createElementNS("http://www.w3.org/2000/svg",w);break;case"math":_=R.createElementNS("http://www.w3.org/1998/Math/MathML",w);break;case"script":_=R.createElement("div"),_.innerHTML="<script><\/script>",_=_.removeChild(_.firstChild);break;case"select":_=typeof g.is=="string"?R.createElement("select",{is:g.is}):R.createElement("select"),g.multiple?_.multiple=!0:g.size&&(_.size=g.size);break;default:_=typeof g.is=="string"?R.createElement(w,{is:g.is}):R.createElement(w)}}_[Sr]=u,_[ci]=g;e:for(R=u.child;R!==null;){if(R.tag===5||R.tag===6)_.appendChild(R.stateNode);else if(R.tag!==4&&R.tag!==27&&R.child!==null){R.child.return=R,R=R.child;continue}if(R===u)break e;for(;R.sibling===null;){if(R.return===null||R.return===u)break e;R=R.return}R.sibling.return=R.return,R=R.sibling}u.stateNode=_;e:switch(Er(_,w,g),w){case"button":case"input":case"select":case"textarea":g=!!g.autoFocus;break e;case"img":g=!0;break e;default:g=!1}g&&Za(u)}}return jn(u),kS(u,u.type,s===null?null:s.memoizedProps,u.pendingProps,p),null;case 6:if(s&&u.stateNode!=null)s.memoizedProps!==g&&Za(u);else{if(typeof g!="string"&&u.stateNode===null)throw Error(r(166));if(s=ge.current,Mu(u)){if(s=u.stateNode,p=u.memoizedProps,g=null,w=_r,w!==null)switch(w.tag){case 27:case 5:g=w.memoizedProps}s[Sr]=u,s=!!(s.nodeValue===p||g!==null&&g.suppressHydrationWarning===!0||jO(s.nodeValue,p)),s||As(u,!0)}else s=av(s).createTextNode(g),s[Sr]=u,u.stateNode=s}return jn(u),null;case 31:if(p=u.memoizedState,s===null||s.memoizedState!==null){if(g=Mu(u),p!==null){if(s===null){if(!g)throw Error(r(318));if(s=u.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(557));s[Sr]=u}else rc(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;jn(u),s=!1}else p=$w(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=p),s=!0;if(!s)return u.flags&256?(Mi(u),u):(Mi(u),null);if((u.flags&128)!==0)throw Error(r(558))}return jn(u),null;case 13:if(g=u.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(w=Mu(u),g!==null&&g.dehydrated!==null){if(s===null){if(!w)throw Error(r(318));if(w=u.memoizedState,w=w!==null?w.dehydrated:null,!w)throw Error(r(317));w[Sr]=u}else rc(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;jn(u),w=!1}else w=$w(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=w),w=!0;if(!w)return u.flags&256?(Mi(u),u):(Mi(u),null)}return Mi(u),(u.flags&128)!==0?(u.lanes=p,u):(p=g!==null,s=s!==null&&s.memoizedState!==null,p&&(g=u.child,w=null,g.alternate!==null&&g.alternate.memoizedState!==null&&g.alternate.memoizedState.cachePool!==null&&(w=g.alternate.memoizedState.cachePool.pool),_=null,g.memoizedState!==null&&g.memoizedState.cachePool!==null&&(_=g.memoizedState.cachePool.pool),_!==w&&(g.flags|=2048)),p!==s&&p&&(u.child.flags|=8192),qg(u,u.updateQueue),jn(u),null);case 4:return xe(),s===null&&GS(u.stateNode.containerInfo),jn(u),null;case 10:return Ha(u.type),jn(u),null;case 19:if(V(Kn),g=u.memoizedState,g===null)return jn(u),null;if(w=(u.flags&128)!==0,_=g.rendering,_===null)if(w)gp(g,!1);else{if(Un!==0||s!==null&&(s.flags&128)!==0)for(s=u.child;s!==null;){if(_=Ag(s),_!==null){for(u.flags|=128,gp(g,!1),s=_.updateQueue,u.updateQueue=s,qg(u,s),u.subtreeFlags=0,s=p,p=u.child;p!==null;)oN(p,s),p=p.sibling;return O(Kn,Kn.current&1|2),Pt&&Va(u,g.treeForkCount),u.child}s=s.sibling}g.tail!==null&&Ce()>Wg&&(u.flags|=128,w=!0,gp(g,!1),u.lanes=4194304)}else{if(!w)if(s=Ag(_),s!==null){if(u.flags|=128,w=!0,s=s.updateQueue,u.updateQueue=s,qg(u,s),gp(g,!0),g.tail===null&&g.tailMode==="hidden"&&!_.alternate&&!Pt)return jn(u),null}else 2*Ce()-g.renderingStartTime>Wg&&p!==536870912&&(u.flags|=128,w=!0,gp(g,!1),u.lanes=4194304);g.isBackwards?(_.sibling=u.child,u.child=_):(s=g.last,s!==null?s.sibling=_:u.child=_,g.last=_)}return g.tail!==null?(s=g.tail,g.rendering=s,g.tail=s.sibling,g.renderingStartTime=Ce(),s.sibling=null,p=Kn.current,O(Kn,w?p&1|2:p&1),Pt&&Va(u,g.treeForkCount),s):(jn(u),null);case 22:case 23:return Mi(u),Zw(),g=u.memoizedState!==null,s!==null?s.memoizedState!==null!==g&&(u.flags|=8192):g&&(u.flags|=8192),g?(p&536870912)!==0&&(u.flags&128)===0&&(jn(u),u.subtreeFlags&6&&(u.flags|=8192)):jn(u),p=u.updateQueue,p!==null&&qg(u,p.retryQueue),p=null,s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(p=s.memoizedState.cachePool.pool),g=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(g=u.memoizedState.cachePool.pool),g!==p&&(u.flags|=2048),s!==null&&V(ac),null;case 24:return p=null,s!==null&&(p=s.memoizedState.cache),u.memoizedState.cache!==p&&(u.flags|=2048),Ha(er),jn(u),null;case 25:return null;case 30:return null}throw Error(r(156,u.tag))}function UZ(s,u){switch(Ow(u),u.tag){case 1:return s=u.flags,s&65536?(u.flags=s&-65537|128,u):null;case 3:return Ha(er),xe(),s=u.flags,(s&65536)!==0&&(s&128)===0?(u.flags=s&-65537|128,u):null;case 26:case 27:case 5:return Pe(u),null;case 31:if(u.memoizedState!==null){if(Mi(u),u.alternate===null)throw Error(r(340));rc()}return s=u.flags,s&65536?(u.flags=s&-65537|128,u):null;case 13:if(Mi(u),s=u.memoizedState,s!==null&&s.dehydrated!==null){if(u.alternate===null)throw Error(r(340));rc()}return s=u.flags,s&65536?(u.flags=s&-65537|128,u):null;case 19:return V(Kn),null;case 4:return xe(),null;case 10:return Ha(u.type),null;case 22:case 23:return Mi(u),Zw(),s!==null&&V(ac),s=u.flags,s&65536?(u.flags=s&-65537|128,u):null;case 24:return Ha(er),null;case 25:return null;default:return null}}function AA(s,u){switch(Ow(u),u.tag){case 3:Ha(er),xe();break;case 26:case 27:case 5:Pe(u);break;case 4:xe();break;case 31:u.memoizedState!==null&&Mi(u);break;case 13:Mi(u);break;case 19:V(Kn);break;case 10:Ha(u.type);break;case 22:case 23:Mi(u),Zw(),s!==null&&V(ac);break;case 24:Ha(er)}}function vp(s,u){try{var p=u.updateQueue,g=p!==null?p.lastEffect:null;if(g!==null){var w=g.next;p=w;do{if((p.tag&s)===s){g=void 0;var _=p.create,R=p.inst;g=_(),R.destroy=g}p=p.next}while(p!==w)}}catch(M){rn(u,u.return,M)}}function Ls(s,u,p){try{var g=u.updateQueue,w=g!==null?g.lastEffect:null;if(w!==null){var _=w.next;g=_;do{if((g.tag&s)===s){var R=g.inst,M=R.destroy;if(M!==void 0){R.destroy=void 0,w=u;var Y=p,ue=M;try{ue()}catch(be){rn(w,Y,be)}}}g=g.next}while(g!==_)}}catch(be){rn(u,u.return,be)}}function OA(s){var u=s.updateQueue;if(u!==null){var p=s.stateNode;try{_N(u,p)}catch(g){rn(s,s.return,g)}}}function DA(s,u,p){p.props=dc(s.type,s.memoizedProps),p.state=s.memoizedState;try{p.componentWillUnmount()}catch(g){rn(s,u,g)}}function yp(s,u){try{var p=s.ref;if(p!==null){switch(s.tag){case 26:case 27:case 5:var g=s.stateNode;break;case 30:g=s.stateNode;break;default:g=s.stateNode}typeof p=="function"?s.refCleanup=p(g):p.current=g}}catch(w){rn(s,u,w)}}function fa(s,u){var p=s.ref,g=s.refCleanup;if(p!==null)if(typeof g=="function")try{g()}catch(w){rn(s,u,w)}finally{s.refCleanup=null,s=s.alternate,s!=null&&(s.refCleanup=null)}else if(typeof p=="function")try{p(null)}catch(w){rn(s,u,w)}else p.current=null}function $A(s){var u=s.type,p=s.memoizedProps,g=s.stateNode;try{e:switch(u){case"button":case"input":case"select":case"textarea":p.autoFocus&&g.focus();break e;case"img":p.src?g.src=p.src:p.srcSet&&(g.srcset=p.srcSet)}}catch(w){rn(s,s.return,w)}}function ES(s,u,p){try{var g=s.stateNode;cY(g,s.type,p,u),g[ci]=u}catch(w){rn(s,s.return,w)}}function PA(s){return s.tag===5||s.tag===3||s.tag===26||s.tag===27&&Ks(s.type)||s.tag===4}function jS(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||PA(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.tag===27&&Ks(s.type)||s.flags&2||s.child===null||s.tag===4)continue e;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function RS(s,u,p){var g=s.tag;if(g===5||g===6)s=s.stateNode,u?(p.nodeType===9?p.body:p.nodeName==="HTML"?p.ownerDocument.body:p).insertBefore(s,u):(u=p.nodeType===9?p.body:p.nodeName==="HTML"?p.ownerDocument.body:p,u.appendChild(s),p=p._reactRootContainer,p!=null||u.onclick!==null||(u.onclick=La));else if(g!==4&&(g===27&&Ks(s.type)&&(p=s.stateNode,u=null),s=s.child,s!==null))for(RS(s,u,p),s=s.sibling;s!==null;)RS(s,u,p),s=s.sibling}function Kg(s,u,p){var g=s.tag;if(g===5||g===6)s=s.stateNode,u?p.insertBefore(s,u):p.appendChild(s);else if(g!==4&&(g===27&&Ks(s.type)&&(p=s.stateNode),s=s.child,s!==null))for(Kg(s,u,p),s=s.sibling;s!==null;)Kg(s,u,p),s=s.sibling}function MA(s){var u=s.stateNode,p=s.memoizedProps;try{for(var g=s.type,w=u.attributes;w.length;)u.removeAttributeNode(w[0]);Er(u,g,p),u[Sr]=s,u[ci]=p}catch(_){rn(s,s.return,_)}}var Ya=!1,rr=!1,IS=!1,zA=typeof WeakSet=="function"?WeakSet:Set,vr=null;function VZ(s,u){if(s=s.containerInfo,WS=pv,s=WT(s),Sw(s)){if("selectionStart"in s)var p={start:s.selectionStart,end:s.selectionEnd};else e:{p=(p=s.ownerDocument)&&p.defaultView||window;var g=p.getSelection&&p.getSelection();if(g&&g.rangeCount!==0){p=g.anchorNode;var w=g.anchorOffset,_=g.focusNode;g=g.focusOffset;try{p.nodeType,_.nodeType}catch{p=null;break e}var R=0,M=-1,Y=-1,ue=0,be=0,Se=s,fe=null;t:for(;;){for(var me;Se!==p||w!==0&&Se.nodeType!==3||(M=R+w),Se!==_||g!==0&&Se.nodeType!==3||(Y=R+g),Se.nodeType===3&&(R+=Se.nodeValue.length),(me=Se.firstChild)!==null;)fe=Se,Se=me;for(;;){if(Se===s)break t;if(fe===p&&++ue===w&&(M=R),fe===_&&++be===g&&(Y=R),(me=Se.nextSibling)!==null)break;Se=fe,fe=Se.parentNode}Se=me}p=M===-1||Y===-1?null:{start:M,end:Y}}else p=null}p=p||{start:0,end:0}}else p=null;for(XS={focusedElem:s,selectionRange:p},pv=!1,vr=u;vr!==null;)if(u=vr,s=u.child,(u.subtreeFlags&1028)!==0&&s!==null)s.return=u,vr=s;else for(;vr!==null;){switch(u=vr,_=u.alternate,s=u.flags,u.tag){case 0:if((s&4)!==0&&(s=u.updateQueue,s=s!==null?s.events:null,s!==null))for(p=0;p<s.length;p++)w=s[p],w.ref.impl=w.nextImpl;break;case 11:case 15:break;case 1:if((s&1024)!==0&&_!==null){s=void 0,p=u,w=_.memoizedProps,_=_.memoizedState,g=p.stateNode;try{var He=dc(p.type,w);s=g.getSnapshotBeforeUpdate(He,_),g.__reactInternalSnapshotBeforeUpdate=s}catch(rt){rn(p,p.return,rt)}}break;case 3:if((s&1024)!==0){if(s=u.stateNode.containerInfo,p=s.nodeType,p===9)e_(s);else if(p===1)switch(s.nodeName){case"HEAD":case"HTML":case"BODY":e_(s);break;default:s.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((s&1024)!==0)throw Error(r(163))}if(s=u.sibling,s!==null){s.return=u.return,vr=s;break}vr=u.return}}function LA(s,u,p){var g=p.flags;switch(p.tag){case 0:case 11:case 15:Xa(s,p),g&4&&vp(5,p);break;case 1:if(Xa(s,p),g&4)if(s=p.stateNode,u===null)try{s.componentDidMount()}catch(R){rn(p,p.return,R)}else{var w=dc(p.type,u.memoizedProps);u=u.memoizedState;try{s.componentDidUpdate(w,u,s.__reactInternalSnapshotBeforeUpdate)}catch(R){rn(p,p.return,R)}}g&64&&OA(p),g&512&&yp(p,p.return);break;case 3:if(Xa(s,p),g&64&&(s=p.updateQueue,s!==null)){if(u=null,p.child!==null)switch(p.child.tag){case 27:case 5:u=p.child.stateNode;break;case 1:u=p.child.stateNode}try{_N(s,u)}catch(R){rn(p,p.return,R)}}break;case 27:u===null&&g&4&&MA(p);case 26:case 5:Xa(s,p),u===null&&g&4&&$A(p),g&512&&yp(p,p.return);break;case 12:Xa(s,p);break;case 31:Xa(s,p),g&4&&VA(s,p);break;case 13:Xa(s,p),g&4&&BA(s,p),g&64&&(s=p.memoizedState,s!==null&&(s=s.dehydrated,s!==null&&(p=XZ.bind(null,p),vY(s,p))));break;case 22:if(g=p.memoizedState!==null||Ya,!g){u=u!==null&&u.memoizedState!==null||rr,w=Ya;var _=rr;Ya=g,(rr=u)&&!_?Ja(s,p,(p.subtreeFlags&8772)!==0):Xa(s,p),Ya=w,rr=_}break;case 30:break;default:Xa(s,p)}}function FA(s){var u=s.alternate;u!==null&&(s.alternate=null,FA(u)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(u=s.stateNode,u!==null&&ow(u)),s.stateNode=null,s.return=null,s.dependencies=null,s.memoizedProps=null,s.memoizedState=null,s.pendingProps=null,s.stateNode=null,s.updateQueue=null}var Nn=null,di=!1;function Wa(s,u,p){for(p=p.child;p!==null;)UA(s,u,p),p=p.sibling}function UA(s,u,p){if(Gt&&typeof Gt.onCommitFiberUnmount=="function")try{Gt.onCommitFiberUnmount(kn,p)}catch{}switch(p.tag){case 26:rr||fa(p,u),Wa(s,u,p),p.memoizedState?p.memoizedState.count--:p.stateNode&&(p=p.stateNode,p.parentNode.removeChild(p));break;case 27:rr||fa(p,u);var g=Nn,w=di;Ks(p.type)&&(Nn=p.stateNode,di=!1),Wa(s,u,p),jp(p.stateNode),Nn=g,di=w;break;case 5:rr||fa(p,u);case 6:if(g=Nn,w=di,Nn=null,Wa(s,u,p),Nn=g,di=w,Nn!==null)if(di)try{(Nn.nodeType===9?Nn.body:Nn.nodeName==="HTML"?Nn.ownerDocument.body:Nn).removeChild(p.stateNode)}catch(_){rn(p,u,_)}else try{Nn.removeChild(p.stateNode)}catch(_){rn(p,u,_)}break;case 18:Nn!==null&&(di?(s=Nn,OO(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,p.stateNode),id(s)):OO(Nn,p.stateNode));break;case 4:g=Nn,w=di,Nn=p.stateNode.containerInfo,di=!0,Wa(s,u,p),Nn=g,di=w;break;case 0:case 11:case 14:case 15:Ls(2,p,u),rr||Ls(4,p,u),Wa(s,u,p);break;case 1:rr||(fa(p,u),g=p.stateNode,typeof g.componentWillUnmount=="function"&&DA(p,u,g)),Wa(s,u,p);break;case 21:Wa(s,u,p);break;case 22:rr=(g=rr)||p.memoizedState!==null,Wa(s,u,p),rr=g;break;default:Wa(s,u,p)}}function VA(s,u){if(u.memoizedState===null&&(s=u.alternate,s!==null&&(s=s.memoizedState,s!==null))){s=s.dehydrated;try{id(s)}catch(p){rn(u,u.return,p)}}}function BA(s,u){if(u.memoizedState===null&&(s=u.alternate,s!==null&&(s=s.memoizedState,s!==null&&(s=s.dehydrated,s!==null))))try{id(s)}catch(p){rn(u,u.return,p)}}function BZ(s){switch(s.tag){case 31:case 13:case 19:var u=s.stateNode;return u===null&&(u=s.stateNode=new zA),u;case 22:return s=s.stateNode,u=s._retryCache,u===null&&(u=s._retryCache=new zA),u;default:throw Error(r(435,s.tag))}}function Gg(s,u){var p=BZ(s);u.forEach(function(g){if(!p.has(g)){p.add(g);var w=JZ.bind(null,s,g);g.then(w,w)}})}function fi(s,u){var p=u.deletions;if(p!==null)for(var g=0;g<p.length;g++){var w=p[g],_=s,R=u,M=R;e:for(;M!==null;){switch(M.tag){case 27:if(Ks(M.type)){Nn=M.stateNode,di=!1;break e}break;case 5:Nn=M.stateNode,di=!1;break e;case 3:case 4:Nn=M.stateNode.containerInfo,di=!0;break e}M=M.return}if(Nn===null)throw Error(r(160));UA(_,R,w),Nn=null,di=!1,_=w.alternate,_!==null&&(_.return=null),w.return=null}if(u.subtreeFlags&13886)for(u=u.child;u!==null;)HA(u,s),u=u.sibling}var qo=null;function HA(s,u){var p=s.alternate,g=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:fi(u,s),pi(s),g&4&&(Ls(3,s,s.return),vp(3,s),Ls(5,s,s.return));break;case 1:fi(u,s),pi(s),g&512&&(rr||p===null||fa(p,p.return)),g&64&&Ya&&(s=s.updateQueue,s!==null&&(g=s.callbacks,g!==null&&(p=s.shared.hiddenCallbacks,s.shared.hiddenCallbacks=p===null?g:p.concat(g))));break;case 26:var w=qo;if(fi(u,s),pi(s),g&512&&(rr||p===null||fa(p,p.return)),g&4){var _=p!==null?p.memoizedState:null;if(g=s.memoizedState,p===null)if(g===null)if(s.stateNode===null){e:{g=s.type,p=s.memoizedProps,w=w.ownerDocument||w;t:switch(g){case"title":_=w.getElementsByTagName("title")[0],(!_||_[qf]||_[Sr]||_.namespaceURI==="http://www.w3.org/2000/svg"||_.hasAttribute("itemprop"))&&(_=w.createElement(g),w.head.insertBefore(_,w.querySelector("head > title"))),Er(_,g,p),_[Sr]=s,gr(_),g=_;break e;case"link":var R=HO("link","href",w).get(g+(p.href||""));if(R){for(var M=0;M<R.length;M++)if(_=R[M],_.getAttribute("href")===(p.href==null||p.href===""?null:p.href)&&_.getAttribute("rel")===(p.rel==null?null:p.rel)&&_.getAttribute("title")===(p.title==null?null:p.title)&&_.getAttribute("crossorigin")===(p.crossOrigin==null?null:p.crossOrigin)){R.splice(M,1);break t}}_=w.createElement(g),Er(_,g,p),w.head.appendChild(_);break;case"meta":if(R=HO("meta","content",w).get(g+(p.content||""))){for(M=0;M<R.length;M++)if(_=R[M],_.getAttribute("content")===(p.content==null?null:""+p.content)&&_.getAttribute("name")===(p.name==null?null:p.name)&&_.getAttribute("property")===(p.property==null?null:p.property)&&_.getAttribute("http-equiv")===(p.httpEquiv==null?null:p.httpEquiv)&&_.getAttribute("charset")===(p.charSet==null?null:p.charSet)){R.splice(M,1);break t}}_=w.createElement(g),Er(_,g,p),w.head.appendChild(_);break;default:throw Error(r(468,g))}_[Sr]=s,gr(_),g=_}s.stateNode=g}else qO(w,s.type,s.stateNode);else s.stateNode=BO(w,g,s.memoizedProps);else _!==g?(_===null?p.stateNode!==null&&(p=p.stateNode,p.parentNode.removeChild(p)):_.count--,g===null?qO(w,s.type,s.stateNode):BO(w,g,s.memoizedProps)):g===null&&s.stateNode!==null&&ES(s,s.memoizedProps,p.memoizedProps)}break;case 27:fi(u,s),pi(s),g&512&&(rr||p===null||fa(p,p.return)),p!==null&&g&4&&ES(s,s.memoizedProps,p.memoizedProps);break;case 5:if(fi(u,s),pi(s),g&512&&(rr||p===null||fa(p,p.return)),s.flags&32){w=s.stateNode;try{ju(w,"")}catch(He){rn(s,s.return,He)}}g&4&&s.stateNode!=null&&(w=s.memoizedProps,ES(s,w,p!==null?p.memoizedProps:w)),g&1024&&(IS=!0);break;case 6:if(fi(u,s),pi(s),g&4){if(s.stateNode===null)throw Error(r(162));g=s.memoizedProps,p=s.stateNode;try{p.nodeValue=g}catch(He){rn(s,s.return,He)}}break;case 3:if(cv=null,w=qo,qo=sv(u.containerInfo),fi(u,s),qo=w,pi(s),g&4&&p!==null&&p.memoizedState.isDehydrated)try{id(u.containerInfo)}catch(He){rn(s,s.return,He)}IS&&(IS=!1,qA(s));break;case 4:g=qo,qo=sv(s.stateNode.containerInfo),fi(u,s),pi(s),qo=g;break;case 12:fi(u,s),pi(s);break;case 31:fi(u,s),pi(s),g&4&&(g=s.updateQueue,g!==null&&(s.updateQueue=null,Gg(s,g)));break;case 13:fi(u,s),pi(s),s.child.flags&8192&&s.memoizedState!==null!=(p!==null&&p.memoizedState!==null)&&(Yg=Ce()),g&4&&(g=s.updateQueue,g!==null&&(s.updateQueue=null,Gg(s,g)));break;case 22:w=s.memoizedState!==null;var Y=p!==null&&p.memoizedState!==null,ue=Ya,be=rr;if(Ya=ue||w,rr=be||Y,fi(u,s),rr=be,Ya=ue,pi(s),g&8192)e:for(u=s.stateNode,u._visibility=w?u._visibility&-2:u._visibility|1,w&&(p===null||Y||Ya||rr||fc(s)),p=null,u=s;;){if(u.tag===5||u.tag===26){if(p===null){Y=p=u;try{if(_=Y.stateNode,w)R=_.style,typeof R.setProperty=="function"?R.setProperty("display","none","important"):R.display="none";else{M=Y.stateNode;var Se=Y.memoizedProps.style,fe=Se!=null&&Se.hasOwnProperty("display")?Se.display:null;M.style.display=fe==null||typeof fe=="boolean"?"":(""+fe).trim()}}catch(He){rn(Y,Y.return,He)}}}else if(u.tag===6){if(p===null){Y=u;try{Y.stateNode.nodeValue=w?"":Y.memoizedProps}catch(He){rn(Y,Y.return,He)}}}else if(u.tag===18){if(p===null){Y=u;try{var me=Y.stateNode;w?DO(me,!0):DO(Y.stateNode,!1)}catch(He){rn(Y,Y.return,He)}}}else if((u.tag!==22&&u.tag!==23||u.memoizedState===null||u===s)&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===s)break e;for(;u.sibling===null;){if(u.return===null||u.return===s)break e;p===u&&(p=null),u=u.return}p===u&&(p=null),u.sibling.return=u.return,u=u.sibling}g&4&&(g=s.updateQueue,g!==null&&(p=g.retryQueue,p!==null&&(g.retryQueue=null,Gg(s,p))));break;case 19:fi(u,s),pi(s),g&4&&(g=s.updateQueue,g!==null&&(s.updateQueue=null,Gg(s,g)));break;case 30:break;case 21:break;default:fi(u,s),pi(s)}}function pi(s){var u=s.flags;if(u&2){try{for(var p,g=s.return;g!==null;){if(PA(g)){p=g;break}g=g.return}if(p==null)throw Error(r(160));switch(p.tag){case 27:var w=p.stateNode,_=jS(s);Kg(s,_,w);break;case 5:var R=p.stateNode;p.flags&32&&(ju(R,""),p.flags&=-33);var M=jS(s);Kg(s,M,R);break;case 3:case 4:var Y=p.stateNode.containerInfo,ue=jS(s);RS(s,ue,Y);break;default:throw Error(r(161))}}catch(be){rn(s,s.return,be)}s.flags&=-3}u&4096&&(s.flags&=-4097)}function qA(s){if(s.subtreeFlags&1024)for(s=s.child;s!==null;){var u=s;qA(u),u.tag===5&&u.flags&1024&&u.stateNode.reset(),s=s.sibling}}function Xa(s,u){if(u.subtreeFlags&8772)for(u=u.child;u!==null;)LA(s,u.alternate,u),u=u.sibling}function fc(s){for(s=s.child;s!==null;){var u=s;switch(u.tag){case 0:case 11:case 14:case 15:Ls(4,u,u.return),fc(u);break;case 1:fa(u,u.return);var p=u.stateNode;typeof p.componentWillUnmount=="function"&&DA(u,u.return,p),fc(u);break;case 27:jp(u.stateNode);case 26:case 5:fa(u,u.return),fc(u);break;case 22:u.memoizedState===null&&fc(u);break;case 30:fc(u);break;default:fc(u)}s=s.sibling}}function Ja(s,u,p){for(p=p&&(u.subtreeFlags&8772)!==0,u=u.child;u!==null;){var g=u.alternate,w=s,_=u,R=_.flags;switch(_.tag){case 0:case 11:case 15:Ja(w,_,p),vp(4,_);break;case 1:if(Ja(w,_,p),g=_,w=g.stateNode,typeof w.componentDidMount=="function")try{w.componentDidMount()}catch(ue){rn(g,g.return,ue)}if(g=_,w=g.updateQueue,w!==null){var M=g.stateNode;try{var Y=w.shared.hiddenCallbacks;if(Y!==null)for(w.shared.hiddenCallbacks=null,w=0;w<Y.length;w++)SN(Y[w],M)}catch(ue){rn(g,g.return,ue)}}p&&R&64&&OA(_),yp(_,_.return);break;case 27:MA(_);case 26:case 5:Ja(w,_,p),p&&g===null&&R&4&&$A(_),yp(_,_.return);break;case 12:Ja(w,_,p);break;case 31:Ja(w,_,p),p&&R&4&&VA(w,_);break;case 13:Ja(w,_,p),p&&R&4&&BA(w,_);break;case 22:_.memoizedState===null&&Ja(w,_,p),yp(_,_.return);break;case 30:break;default:Ja(w,_,p)}u=u.sibling}}function TS(s,u){var p=null;s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(p=s.memoizedState.cachePool.pool),s=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(s=u.memoizedState.cachePool.pool),s!==p&&(s!=null&&s.refCount++,p!=null&&ip(p))}function NS(s,u){s=null,u.alternate!==null&&(s=u.alternate.memoizedState.cache),u=u.memoizedState.cache,u!==s&&(u.refCount++,s!=null&&ip(s))}function Ko(s,u,p,g){if(u.subtreeFlags&10256)for(u=u.child;u!==null;)KA(s,u,p,g),u=u.sibling}function KA(s,u,p,g){var w=u.flags;switch(u.tag){case 0:case 11:case 15:Ko(s,u,p,g),w&2048&&vp(9,u);break;case 1:Ko(s,u,p,g);break;case 3:Ko(s,u,p,g),w&2048&&(s=null,u.alternate!==null&&(s=u.alternate.memoizedState.cache),u=u.memoizedState.cache,u!==s&&(u.refCount++,s!=null&&ip(s)));break;case 12:if(w&2048){Ko(s,u,p,g),s=u.stateNode;try{var _=u.memoizedProps,R=_.id,M=_.onPostCommit;typeof M=="function"&&M(R,u.alternate===null?"mount":"update",s.passiveEffectDuration,-0)}catch(Y){rn(u,u.return,Y)}}else Ko(s,u,p,g);break;case 31:Ko(s,u,p,g);break;case 13:Ko(s,u,p,g);break;case 23:break;case 22:_=u.stateNode,R=u.alternate,u.memoizedState!==null?_._visibility&2?Ko(s,u,p,g):bp(s,u):_._visibility&2?Ko(s,u,p,g):(_._visibility|=2,Gu(s,u,p,g,(u.subtreeFlags&10256)!==0||!1)),w&2048&&TS(R,u);break;case 24:Ko(s,u,p,g),w&2048&&NS(u.alternate,u);break;default:Ko(s,u,p,g)}}function Gu(s,u,p,g,w){for(w=w&&((u.subtreeFlags&10256)!==0||!1),u=u.child;u!==null;){var _=s,R=u,M=p,Y=g,ue=R.flags;switch(R.tag){case 0:case 11:case 15:Gu(_,R,M,Y,w),vp(8,R);break;case 23:break;case 22:var be=R.stateNode;R.memoizedState!==null?be._visibility&2?Gu(_,R,M,Y,w):bp(_,R):(be._visibility|=2,Gu(_,R,M,Y,w)),w&&ue&2048&&TS(R.alternate,R);break;case 24:Gu(_,R,M,Y,w),w&&ue&2048&&NS(R.alternate,R);break;default:Gu(_,R,M,Y,w)}u=u.sibling}}function bp(s,u){if(u.subtreeFlags&10256)for(u=u.child;u!==null;){var p=s,g=u,w=g.flags;switch(g.tag){case 22:bp(p,g),w&2048&&TS(g.alternate,g);break;case 24:bp(p,g),w&2048&&NS(g.alternate,g);break;default:bp(p,g)}u=u.sibling}}var xp=8192;function Zu(s,u,p){if(s.subtreeFlags&xp)for(s=s.child;s!==null;)GA(s,u,p),s=s.sibling}function GA(s,u,p){switch(s.tag){case 26:Zu(s,u,p),s.flags&xp&&s.memoizedState!==null&&IY(p,qo,s.memoizedState,s.memoizedProps);break;case 5:Zu(s,u,p);break;case 3:case 4:var g=qo;qo=sv(s.stateNode.containerInfo),Zu(s,u,p),qo=g;break;case 22:s.memoizedState===null&&(g=s.alternate,g!==null&&g.memoizedState!==null?(g=xp,xp=16777216,Zu(s,u,p),xp=g):Zu(s,u,p));break;default:Zu(s,u,p)}}function ZA(s){var u=s.alternate;if(u!==null&&(s=u.child,s!==null)){u.child=null;do u=s.sibling,s.sibling=null,s=u;while(s!==null)}}function wp(s){var u=s.deletions;if((s.flags&16)!==0){if(u!==null)for(var p=0;p<u.length;p++){var g=u[p];vr=g,WA(g,s)}ZA(s)}if(s.subtreeFlags&10256)for(s=s.child;s!==null;)YA(s),s=s.sibling}function YA(s){switch(s.tag){case 0:case 11:case 15:wp(s),s.flags&2048&&Ls(9,s,s.return);break;case 3:wp(s);break;case 12:wp(s);break;case 22:var u=s.stateNode;s.memoizedState!==null&&u._visibility&2&&(s.return===null||s.return.tag!==13)?(u._visibility&=-3,Zg(s)):wp(s);break;default:wp(s)}}function Zg(s){var u=s.deletions;if((s.flags&16)!==0){if(u!==null)for(var p=0;p<u.length;p++){var g=u[p];vr=g,WA(g,s)}ZA(s)}for(s=s.child;s!==null;){switch(u=s,u.tag){case 0:case 11:case 15:Ls(8,u,u.return),Zg(u);break;case 22:p=u.stateNode,p._visibility&2&&(p._visibility&=-3,Zg(u));break;default:Zg(u)}s=s.sibling}}function WA(s,u){for(;vr!==null;){var p=vr;switch(p.tag){case 0:case 11:case 15:Ls(8,p,u);break;case 23:case 22:if(p.memoizedState!==null&&p.memoizedState.cachePool!==null){var g=p.memoizedState.cachePool.pool;g!=null&&g.refCount++}break;case 24:ip(p.memoizedState.cache)}if(g=p.child,g!==null)g.return=p,vr=g;else e:for(p=s;vr!==null;){g=vr;var w=g.sibling,_=g.return;if(FA(g),g===p){vr=null;break e}if(w!==null){w.return=_,vr=w;break e}vr=_}}}var HZ={getCacheForType:function(s){var u=Cr(er),p=u.data.get(s);return p===void 0&&(p=s(),u.data.set(s,p)),p},cacheSignal:function(){return Cr(er).controller.signal}},qZ=typeof WeakMap=="function"?WeakMap:Map,Yt=0,gn=null,It=null,At=0,nn=0,zi=null,Fs=!1,Yu=!1,AS=!1,Qa=0,Un=0,Us=0,pc=0,OS=0,Li=0,Wu=0,Sp=null,mi=null,DS=!1,Yg=0,XA=0,Wg=1/0,Xg=null,Vs=null,dr=0,Bs=null,Xu=null,es=0,$S=0,PS=null,JA=null,_p=0,MS=null;function Fi(){return(Yt&2)!==0&&At!==0?At&-At:z.T!==null?BS():rw()}function QA(){if(Li===0)if((At&536870912)===0||Pt){var s=js;js<<=1,(js&3932160)===0&&(js=262144),Li=s}else Li=536870912;return s=Pi.current,s!==null&&(s.flags|=32),Li}function hi(s,u,p){(s===gn&&(nn===2||nn===9)||s.cancelPendingCommit!==null)&&(Ju(s,0),Hs(s,At,Li,!1)),hn(s,p),((Yt&2)===0||s!==gn)&&(s===gn&&((Yt&2)===0&&(pc|=p),Un===4&&Hs(s,At,Li,!1)),pa(s))}function eO(s,u,p){if((Yt&6)!==0)throw Error(r(327));var g=!p&&(u&127)===0&&(u&s.expiredLanes)===0||ln(s,u),w=g?ZZ(s,u):LS(s,u,!0),_=g;do{if(w===0){Yu&&!g&&Hs(s,u,0,!1);break}else{if(p=s.current.alternate,_&&!KZ(p)){w=LS(s,u,!1),_=!1;continue}if(w===2){if(_=u,s.errorRecoveryDisabledLanes&_)var R=0;else R=s.pendingLanes&-536870913,R=R!==0?R:R&536870912?536870912:0;if(R!==0){u=R;e:{var M=s;w=Sp;var Y=M.current.memoizedState.isDehydrated;if(Y&&(Ju(M,R).flags|=256),R=LS(M,R,!1),R!==2){if(AS&&!Y){M.errorRecoveryDisabledLanes|=_,pc|=_,w=4;break e}_=mi,mi=w,_!==null&&(mi===null?mi=_:mi.push.apply(mi,_))}w=R}if(_=!1,w!==2)continue}}if(w===1){Ju(s,0),Hs(s,u,0,!0);break}e:{switch(g=s,_=w,_){case 0:case 1:throw Error(r(345));case 4:if((u&4194048)!==u)break;case 6:Hs(g,u,Li,!Fs);break e;case 2:mi=null;break;case 3:case 5:break;default:throw Error(r(329))}if((u&62914560)===u&&(w=Yg+300-Ce(),10<w)){if(Hs(g,u,Li,!Fs),We(g,0,!0)!==0)break e;es=u,g.timeoutHandle=NO(tO.bind(null,g,p,mi,Xg,DS,u,Li,pc,Wu,Fs,_,"Throttled",-0,0),w);break e}tO(g,p,mi,Xg,DS,u,Li,pc,Wu,Fs,_,null,-0,0)}}break}while(!0);pa(s)}function tO(s,u,p,g,w,_,R,M,Y,ue,be,Se,fe,me){if(s.timeoutHandle=-1,Se=u.subtreeFlags,Se&8192||(Se&16785408)===16785408){Se={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:La},GA(u,_,Se);var He=(_&62914560)===_?Yg-Ce():(_&4194048)===_?XA-Ce():0;if(He=TY(Se,He),He!==null){es=_,s.cancelPendingCommit=He(cO.bind(null,s,u,_,p,g,w,R,M,Y,be,Se,null,fe,me)),Hs(s,_,R,!ue);return}}cO(s,u,_,p,g,w,R,M,Y)}function KZ(s){for(var u=s;;){var p=u.tag;if((p===0||p===11||p===15)&&u.flags&16384&&(p=u.updateQueue,p!==null&&(p=p.stores,p!==null)))for(var g=0;g<p.length;g++){var w=p[g],_=w.getSnapshot;w=w.value;try{if(!Di(_(),w))return!1}catch{return!1}}if(p=u.child,u.subtreeFlags&16384&&p!==null)p.return=u,u=p;else{if(u===s)break;for(;u.sibling===null;){if(u.return===null||u.return===s)return!0;u=u.return}u.sibling.return=u.return,u=u.sibling}}return!0}function Hs(s,u,p,g){u&=~OS,u&=~pc,s.suspendedLanes|=u,s.pingedLanes&=~u,g&&(s.warmLanes|=u),g=s.expirationTimes;for(var w=u;0<w;){var _=31-jt(w),R=1<<_;g[_]=-1,w&=~R}p!==0&&Wl(s,p,u)}function Jg(){return(Yt&6)===0?(Cp(0),!1):!0}function zS(){if(It!==null){if(nn===0)var s=It.return;else s=It,Ba=ic=null,eS(s),Vu=null,ap=0,s=It;for(;s!==null;)AA(s.alternate,s),s=s.return;It=null}}function Ju(s,u){var p=s.timeoutHandle;p!==-1&&(s.timeoutHandle=-1,fY(p)),p=s.cancelPendingCommit,p!==null&&(s.cancelPendingCommit=null,p()),es=0,zS(),gn=s,It=p=Ua(s.current,null),At=u,nn=0,zi=null,Fs=!1,Yu=ln(s,u),AS=!1,Wu=Li=OS=pc=Us=Un=0,mi=Sp=null,DS=!1,(u&8)!==0&&(u|=u&32);var g=s.entangledLanes;if(g!==0)for(s=s.entanglements,g&=u;0<g;){var w=31-jt(g),_=1<<w;u|=s[w],g&=~_}return Qa=u,bg(),p}function nO(s,u){vt=null,z.H=mp,u===Uu||u===jg?(u=yN(),nn=3):u===Vw?(u=yN(),nn=4):nn=u===gS?8:u!==null&&typeof u=="object"&&typeof u.then=="function"?6:1,zi=u,It===null&&(Un=1,Ug(s,uo(u,s.current)))}function rO(){var s=Pi.current;return s===null?!0:(At&4194048)===At?ho===null:(At&62914560)===At||(At&536870912)!==0?s===ho:!1}function iO(){var s=z.H;return z.H=mp,s===null?mp:s}function oO(){var s=z.A;return z.A=HZ,s}function Qg(){Un=4,Fs||(At&4194048)!==At&&Pi.current!==null||(Yu=!0),(Us&134217727)===0&&(pc&134217727)===0||gn===null||Hs(gn,At,Li,!1)}function LS(s,u,p){var g=Yt;Yt|=2;var w=iO(),_=oO();(gn!==s||At!==u)&&(Xg=null,Ju(s,u)),u=!1;var R=Un;e:do try{if(nn!==0&&It!==null){var M=It,Y=zi;switch(nn){case 8:zS(),R=6;break e;case 3:case 2:case 9:case 6:Pi.current===null&&(u=!0);var ue=nn;if(nn=0,zi=null,Qu(s,M,Y,ue),p&&Yu){R=0;break e}break;default:ue=nn,nn=0,zi=null,Qu(s,M,Y,ue)}}GZ(),R=Un;break}catch(be){nO(s,be)}while(!0);return u&&s.shellSuspendCounter++,Ba=ic=null,Yt=g,z.H=w,z.A=_,It===null&&(gn=null,At=0,bg()),R}function GZ(){for(;It!==null;)aO(It)}function ZZ(s,u){var p=Yt;Yt|=2;var g=iO(),w=oO();gn!==s||At!==u?(Xg=null,Wg=Ce()+500,Ju(s,u)):Yu=ln(s,u);e:do try{if(nn!==0&&It!==null){u=It;var _=zi;t:switch(nn){case 1:nn=0,zi=null,Qu(s,u,_,1);break;case 2:case 9:if(gN(_)){nn=0,zi=null,sO(u);break}u=function(){nn!==2&&nn!==9||gn!==s||(nn=7),pa(s)},_.then(u,u);break e;case 3:nn=7;break e;case 4:nn=5;break e;case 7:gN(_)?(nn=0,zi=null,sO(u)):(nn=0,zi=null,Qu(s,u,_,7));break;case 5:var R=null;switch(It.tag){case 26:R=It.memoizedState;case 5:case 27:var M=It;if(R?KO(R):M.stateNode.complete){nn=0,zi=null;var Y=M.sibling;if(Y!==null)It=Y;else{var ue=M.return;ue!==null?(It=ue,ev(ue)):It=null}break t}}nn=0,zi=null,Qu(s,u,_,5);break;case 6:nn=0,zi=null,Qu(s,u,_,6);break;case 8:zS(),Un=6;break e;default:throw Error(r(462))}}YZ();break}catch(be){nO(s,be)}while(!0);return Ba=ic=null,z.H=g,z.A=w,Yt=p,It!==null?0:(gn=null,At=0,bg(),Un)}function YZ(){for(;It!==null&&!re();)aO(It)}function aO(s){var u=TA(s.alternate,s,Qa);s.memoizedProps=s.pendingProps,u===null?ev(s):It=u}function sO(s){var u=s,p=u.alternate;switch(u.tag){case 15:case 0:u=CA(p,u,u.pendingProps,u.type,void 0,At);break;case 11:u=CA(p,u,u.pendingProps,u.type.render,u.ref,At);break;case 5:eS(u);default:AA(p,u),u=It=oN(u,Qa),u=TA(p,u,Qa)}s.memoizedProps=s.pendingProps,u===null?ev(s):It=u}function Qu(s,u,p,g){Ba=ic=null,eS(u),Vu=null,ap=0;var w=u.return;try{if(MZ(s,w,u,p,At)){Un=1,Ug(s,uo(p,s.current)),It=null;return}}catch(_){if(w!==null)throw It=w,_;Un=1,Ug(s,uo(p,s.current)),It=null;return}u.flags&32768?(Pt||g===1?s=!0:Yu||(At&536870912)!==0?s=!1:(Fs=s=!0,(g===2||g===9||g===3||g===6)&&(g=Pi.current,g!==null&&g.tag===13&&(g.flags|=16384))),lO(u,s)):ev(u)}function ev(s){var u=s;do{if((u.flags&32768)!==0){lO(u,Fs);return}s=u.return;var p=FZ(u.alternate,u,Qa);if(p!==null){It=p;return}if(u=u.sibling,u!==null){It=u;return}It=u=s}while(u!==null);Un===0&&(Un=5)}function lO(s,u){do{var p=UZ(s.alternate,s);if(p!==null){p.flags&=32767,It=p;return}if(p=s.return,p!==null&&(p.flags|=32768,p.subtreeFlags=0,p.deletions=null),!u&&(s=s.sibling,s!==null)){It=s;return}It=s=p}while(s!==null);Un=6,It=null}function cO(s,u,p,g,w,_,R,M,Y){s.cancelPendingCommit=null;do tv();while(dr!==0);if((Yt&6)!==0)throw Error(r(327));if(u!==null){if(u===s.current)throw Error(r(177));if(_=u.lanes|u.childLanes,_|=jw,ai(s,p,_,R,M,Y),s===gn&&(It=gn=null,At=0),Xu=u,Bs=s,es=p,$S=_,PS=w,JA=g,(u.subtreeFlags&10256)!==0||(u.flags&10256)!==0?(s.callbackNode=null,s.callbackPriority=0,QZ(ke,function(){return mO(),null})):(s.callbackNode=null,s.callbackPriority=0),g=(u.flags&13878)!==0,(u.subtreeFlags&13878)!==0||g){g=z.T,z.T=null,w=W.p,W.p=2,R=Yt,Yt|=4;try{VZ(s,u,p)}finally{Yt=R,W.p=w,z.T=g}}dr=1,uO(),dO(),fO()}}function uO(){if(dr===1){dr=0;var s=Bs,u=Xu,p=(u.flags&13878)!==0;if((u.subtreeFlags&13878)!==0||p){p=z.T,z.T=null;var g=W.p;W.p=2;var w=Yt;Yt|=4;try{HA(u,s);var _=XS,R=WT(s.containerInfo),M=_.focusedElem,Y=_.selectionRange;if(R!==M&&M&&M.ownerDocument&&YT(M.ownerDocument.documentElement,M)){if(Y!==null&&Sw(M)){var ue=Y.start,be=Y.end;if(be===void 0&&(be=ue),"selectionStart"in M)M.selectionStart=ue,M.selectionEnd=Math.min(be,M.value.length);else{var Se=M.ownerDocument||document,fe=Se&&Se.defaultView||window;if(fe.getSelection){var me=fe.getSelection(),He=M.textContent.length,rt=Math.min(Y.start,He),dn=Y.end===void 0?rt:Math.min(Y.end,He);!me.extend&&rt>dn&&(R=dn,dn=rt,rt=R);var ie=ZT(M,rt),te=ZT(M,dn);if(ie&&te&&(me.rangeCount!==1||me.anchorNode!==ie.node||me.anchorOffset!==ie.offset||me.focusNode!==te.node||me.focusOffset!==te.offset)){var ce=Se.createRange();ce.setStart(ie.node,ie.offset),me.removeAllRanges(),rt>dn?(me.addRange(ce),me.extend(te.node,te.offset)):(ce.setEnd(te.node,te.offset),me.addRange(ce))}}}}for(Se=[],me=M;me=me.parentNode;)me.nodeType===1&&Se.push({element:me,left:me.scrollLeft,top:me.scrollTop});for(typeof M.focus=="function"&&M.focus(),M=0;M<Se.length;M++){var we=Se[M];we.element.scrollLeft=we.left,we.element.scrollTop=we.top}}pv=!!WS,XS=WS=null}finally{Yt=w,W.p=g,z.T=p}}s.current=u,dr=2}}function dO(){if(dr===2){dr=0;var s=Bs,u=Xu,p=(u.flags&8772)!==0;if((u.subtreeFlags&8772)!==0||p){p=z.T,z.T=null;var g=W.p;W.p=2;var w=Yt;Yt|=4;try{LA(s,u.alternate,u)}finally{Yt=w,W.p=g,z.T=p}}dr=3}}function fO(){if(dr===4||dr===3){dr=0,se();var s=Bs,u=Xu,p=es,g=JA;(u.subtreeFlags&10256)!==0||(u.flags&10256)!==0?dr=5:(dr=0,Xu=Bs=null,pO(s,s.pendingLanes));var w=s.pendingLanes;if(w===0&&(Vs=null),Bo(p),u=u.stateNode,Gt&&typeof Gt.onCommitFiberRoot=="function")try{Gt.onCommitFiberRoot(kn,u,void 0,(u.current.flags&128)===128)}catch{}if(g!==null){u=z.T,w=W.p,W.p=2,z.T=null;try{for(var _=s.onRecoverableError,R=0;R<g.length;R++){var M=g[R];_(M.value,{componentStack:M.stack})}}finally{z.T=u,W.p=w}}(es&3)!==0&&tv(),pa(s),w=s.pendingLanes,(p&261930)!==0&&(w&42)!==0?s===MS?_p++:(_p=0,MS=s):_p=0,Cp(0)}}function pO(s,u){(s.pooledCacheLanes&=u)===0&&(u=s.pooledCache,u!=null&&(s.pooledCache=null,ip(u)))}function tv(){return uO(),dO(),fO(),mO()}function mO(){if(dr!==5)return!1;var s=Bs,u=$S;$S=0;var p=Bo(es),g=z.T,w=W.p;try{W.p=32>p?32:p,z.T=null,p=PS,PS=null;var _=Bs,R=es;if(dr=0,Xu=Bs=null,es=0,(Yt&6)!==0)throw Error(r(331));var M=Yt;if(Yt|=4,YA(_.current),KA(_,_.current,R,p),Yt=M,Cp(0,!1),Gt&&typeof Gt.onPostCommitFiberRoot=="function")try{Gt.onPostCommitFiberRoot(kn,_)}catch{}return!0}finally{W.p=w,z.T=g,pO(s,u)}}function hO(s,u,p){u=uo(p,u),u=hS(s.stateNode,u,2),s=Ps(s,u,2),s!==null&&(hn(s,2),pa(s))}function rn(s,u,p){if(s.tag===3)hO(s,s,p);else for(;u!==null;){if(u.tag===3){hO(u,s,p);break}else if(u.tag===1){var g=u.stateNode;if(typeof u.type.getDerivedStateFromError=="function"||typeof g.componentDidCatch=="function"&&(Vs===null||!Vs.has(g))){s=uo(p,s),p=gA(2),g=Ps(u,p,2),g!==null&&(vA(p,g,u,s),hn(g,2),pa(g));break}}u=u.return}}function FS(s,u,p){var g=s.pingCache;if(g===null){g=s.pingCache=new qZ;var w=new Set;g.set(u,w)}else w=g.get(u),w===void 0&&(w=new Set,g.set(u,w));w.has(p)||(AS=!0,w.add(p),s=WZ.bind(null,s,u,p),u.then(s,s))}function WZ(s,u,p){var g=s.pingCache;g!==null&&g.delete(u),s.pingedLanes|=s.suspendedLanes&p,s.warmLanes&=~p,gn===s&&(At&p)===p&&(Un===4||Un===3&&(At&62914560)===At&&300>Ce()-Yg?(Yt&2)===0&&Ju(s,0):OS|=p,Wu===At&&(Wu=0)),pa(s)}function gO(s,u){u===0&&(u=hr()),s=tc(s,u),s!==null&&(hn(s,u),pa(s))}function XZ(s){var u=s.memoizedState,p=0;u!==null&&(p=u.retryLane),gO(s,p)}function JZ(s,u){var p=0;switch(s.tag){case 31:case 13:var g=s.stateNode,w=s.memoizedState;w!==null&&(p=w.retryLane);break;case 19:g=s.stateNode;break;case 22:g=s.stateNode._retryCache;break;default:throw Error(r(314))}g!==null&&g.delete(u),gO(s,p)}function QZ(s,u){return Pn(s,u)}var nv=null,ed=null,US=!1,rv=!1,VS=!1,qs=0;function pa(s){s!==ed&&s.next===null&&(ed===null?nv=ed=s:ed=ed.next=s),rv=!0,US||(US=!0,tY())}function Cp(s,u){if(!VS&&rv){VS=!0;do for(var p=!1,g=nv;g!==null;){if(s!==0){var w=g.pendingLanes;if(w===0)var _=0;else{var R=g.suspendedLanes,M=g.pingedLanes;_=(1<<31-jt(42|s)+1)-1,_&=w&~(R&~M),_=_&201326741?_&201326741|1:_?_|2:0}_!==0&&(p=!0,xO(g,_))}else _=At,_=We(g,g===gn?_:0,g.cancelPendingCommit!==null||g.timeoutHandle!==-1),(_&3)===0||ln(g,_)||(p=!0,xO(g,_));g=g.next}while(p);VS=!1}}function eY(){vO()}function vO(){rv=US=!1;var s=0;qs!==0&&dY()&&(s=qs);for(var u=Ce(),p=null,g=nv;g!==null;){var w=g.next,_=yO(g,u);_===0?(g.next=null,p===null?nv=w:p.next=w,w===null&&(ed=p)):(p=g,(s!==0||(_&3)!==0)&&(rv=!0)),g=w}dr!==0&&dr!==5||Cp(s),qs!==0&&(qs=0)}function yO(s,u){for(var p=s.suspendedLanes,g=s.pingedLanes,w=s.expirationTimes,_=s.pendingLanes&-62914561;0<_;){var R=31-jt(_),M=1<<R,Y=w[R];Y===-1?((M&p)===0||(M&g)!==0)&&(w[R]=Qn(M,u)):Y<=u&&(s.expiredLanes|=M),_&=~M}if(u=gn,p=At,p=We(s,s===u?p:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),g=s.callbackNode,p===0||s===u&&(nn===2||nn===9)||s.cancelPendingCommit!==null)return g!==null&&g!==null&&Z(g),s.callbackNode=null,s.callbackPriority=0;if((p&3)===0||ln(s,p)){if(u=p&-p,u===s.callbackPriority)return u;switch(g!==null&&Z(g),Bo(p)){case 2:case 8:p=le;break;case 32:p=ke;break;case 268435456:p=Be;break;default:p=ke}return g=bO.bind(null,s),p=Pn(p,g),s.callbackPriority=u,s.callbackNode=p,u}return g!==null&&g!==null&&Z(g),s.callbackPriority=2,s.callbackNode=null,2}function bO(s,u){if(dr!==0&&dr!==5)return s.callbackNode=null,s.callbackPriority=0,null;var p=s.callbackNode;if(tv()&&s.callbackNode!==p)return null;var g=At;return g=We(s,s===gn?g:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),g===0?null:(eO(s,g,u),yO(s,Ce()),s.callbackNode!=null&&s.callbackNode===p?bO.bind(null,s):null)}function xO(s,u){if(tv())return null;eO(s,u,!0)}function tY(){pY(function(){(Yt&6)!==0?Pn(U,eY):vO()})}function BS(){if(qs===0){var s=Lu;s===0&&(s=la,la<<=1,(la&261888)===0&&(la=256)),qs=s}return qs}function wO(s){return s==null||typeof s=="symbol"||typeof s=="boolean"?null:typeof s=="function"?s:dg(""+s)}function SO(s,u){var p=u.ownerDocument.createElement("input");return p.name=u.name,p.value=u.value,s.id&&p.setAttribute("form",s.id),u.parentNode.insertBefore(p,u),s=new FormData(s),p.parentNode.removeChild(p),s}function nY(s,u,p,g,w){if(u==="submit"&&p&&p.stateNode===w){var _=wO((w[ci]||null).action),R=g.submitter;R&&(u=(u=R[ci]||null)?wO(u.formAction):R.getAttribute("formAction"),u!==null&&(_=u,R=null));var M=new hg("action","action",null,g,w);s.push({event:M,listeners:[{instance:null,listener:function(){if(g.defaultPrevented){if(qs!==0){var Y=R?SO(w,R):new FormData(w);cS(p,{pending:!0,data:Y,method:w.method,action:_},null,Y)}}else typeof _=="function"&&(M.preventDefault(),Y=R?SO(w,R):new FormData(w),cS(p,{pending:!0,data:Y,method:w.method,action:_},_,Y))},currentTarget:w}]})}}for(var HS=0;HS<Ew.length;HS++){var qS=Ew[HS],rY=qS.toLowerCase(),iY=qS[0].toUpperCase()+qS.slice(1);Ho(rY,"on"+iY)}Ho(QT,"onAnimationEnd"),Ho(eN,"onAnimationIteration"),Ho(tN,"onAnimationStart"),Ho("dblclick","onDoubleClick"),Ho("focusin","onFocus"),Ho("focusout","onBlur"),Ho(xZ,"onTransitionRun"),Ho(wZ,"onTransitionStart"),Ho(SZ,"onTransitionCancel"),Ho(nN,"onTransitionEnd"),ku("onMouseEnter",["mouseout","mouseover"]),ku("onMouseLeave",["mouseout","mouseover"]),ku("onPointerEnter",["pointerout","pointerover"]),ku("onPointerLeave",["pointerout","pointerover"]),Xl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Xl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Xl("onBeforeInput",["compositionend","keypress","textInput","paste"]),Xl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Xl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Xl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var kp="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),oY=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(kp));function _O(s,u){u=(u&4)!==0;for(var p=0;p<s.length;p++){var g=s[p],w=g.event;g=g.listeners;e:{var _=void 0;if(u)for(var R=g.length-1;0<=R;R--){var M=g[R],Y=M.instance,ue=M.currentTarget;if(M=M.listener,Y!==_&&w.isPropagationStopped())break e;_=M,w.currentTarget=ue;try{_(w)}catch(be){yg(be)}w.currentTarget=null,_=Y}else for(R=0;R<g.length;R++){if(M=g[R],Y=M.instance,ue=M.currentTarget,M=M.listener,Y!==_&&w.isPropagationStopped())break e;_=M,w.currentTarget=ue;try{_(w)}catch(be){yg(be)}w.currentTarget=null,_=Y}}}}function Tt(s,u){var p=u[iw];p===void 0&&(p=u[iw]=new Set);var g=s+"__bubble";p.has(g)||(CO(u,s,2,!1),p.add(g))}function KS(s,u,p){var g=0;u&&(g|=4),CO(p,s,g,u)}var iv="_reactListening"+Math.random().toString(36).slice(2);function GS(s){if(!s[iv]){s[iv]=!0,vT.forEach(function(p){p!=="selectionchange"&&(oY.has(p)||KS(p,!1,s),KS(p,!0,s))});var u=s.nodeType===9?s:s.ownerDocument;u===null||u[iv]||(u[iv]=!0,KS("selectionchange",!1,u))}}function CO(s,u,p,g){switch(QO(u)){case 2:var w=OY;break;case 8:w=DY;break;default:w=l_}p=w.bind(null,u,p,s),w=void 0,!pw||u!=="touchstart"&&u!=="touchmove"&&u!=="wheel"||(w=!0),g?w!==void 0?s.addEventListener(u,p,{capture:!0,passive:w}):s.addEventListener(u,p,!0):w!==void 0?s.addEventListener(u,p,{passive:w}):s.addEventListener(u,p,!1)}function ZS(s,u,p,g,w){var _=g;if((u&1)===0&&(u&2)===0&&g!==null)e:for(;;){if(g===null)return;var R=g.tag;if(R===3||R===4){var M=g.stateNode.containerInfo;if(M===w)break;if(R===4)for(R=g.return;R!==null;){var Y=R.tag;if((Y===3||Y===4)&&R.stateNode.containerInfo===w)return;R=R.return}for(;M!==null;){if(R=Su(M),R===null)return;if(Y=R.tag,Y===5||Y===6||Y===26||Y===27){g=_=R;continue e}M=M.parentNode}}g=g.return}IT(function(){var ue=_,be=dw(p),Se=[];e:{var fe=rN.get(s);if(fe!==void 0){var me=hg,He=s;switch(s){case"keypress":if(pg(p)===0)break e;case"keydown":case"keyup":me=JG;break;case"focusin":He="focus",me=vw;break;case"focusout":He="blur",me=vw;break;case"beforeblur":case"afterblur":me=vw;break;case"click":if(p.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":me=AT;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":me=FG;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":me=tZ;break;case QT:case eN:case tN:me=BG;break;case nN:me=rZ;break;case"scroll":case"scrollend":me=zG;break;case"wheel":me=oZ;break;case"copy":case"cut":case"paste":me=qG;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":me=DT;break;case"toggle":case"beforetoggle":me=sZ}var rt=(u&4)!==0,dn=!rt&&(s==="scroll"||s==="scrollend"),ie=rt?fe!==null?fe+"Capture":null:fe;rt=[];for(var te=ue,ce;te!==null;){var we=te;if(ce=we.stateNode,we=we.tag,we!==5&&we!==26&&we!==27||ce===null||ie===null||(we=Gf(te,ie),we!=null&&rt.push(Ep(te,we,ce))),dn)break;te=te.return}0<rt.length&&(fe=new me(fe,He,null,p,be),Se.push({event:fe,listeners:rt}))}}if((u&7)===0){e:{if(fe=s==="mouseover"||s==="pointerover",me=s==="mouseout"||s==="pointerout",fe&&p!==uw&&(He=p.relatedTarget||p.fromElement)&&(Su(He)||He[wu]))break e;if((me||fe)&&(fe=be.window===be?be:(fe=be.ownerDocument)?fe.defaultView||fe.parentWindow:window,me?(He=p.relatedTarget||p.toElement,me=ue,He=He?Su(He):null,He!==null&&(dn=o(He),rt=He.tag,He!==dn||rt!==5&&rt!==27&&rt!==6)&&(He=null)):(me=null,He=ue),me!==He)){if(rt=AT,we="onMouseLeave",ie="onMouseEnter",te="mouse",(s==="pointerout"||s==="pointerover")&&(rt=DT,we="onPointerLeave",ie="onPointerEnter",te="pointer"),dn=me==null?fe:Kf(me),ce=He==null?fe:Kf(He),fe=new rt(we,te+"leave",me,p,be),fe.target=dn,fe.relatedTarget=ce,we=null,Su(be)===ue&&(rt=new rt(ie,te+"enter",He,p,be),rt.target=ce,rt.relatedTarget=dn,we=rt),dn=we,me&&He)t:{for(rt=aY,ie=me,te=He,ce=0,we=ie;we;we=rt(we))ce++;we=0;for(var Je=te;Je;Je=rt(Je))we++;for(;0<ce-we;)ie=rt(ie),ce--;for(;0<we-ce;)te=rt(te),we--;for(;ce--;){if(ie===te||te!==null&&ie===te.alternate){rt=ie;break t}ie=rt(ie),te=rt(te)}rt=null}else rt=null;me!==null&&kO(Se,fe,me,rt,!1),He!==null&&dn!==null&&kO(Se,dn,He,rt,!0)}}e:{if(fe=ue?Kf(ue):window,me=fe.nodeName&&fe.nodeName.toLowerCase(),me==="select"||me==="input"&&fe.type==="file")var Bt=VT;else if(FT(fe))if(BT)Bt=vZ;else{Bt=hZ;var Ze=mZ}else me=fe.nodeName,!me||me.toLowerCase()!=="input"||fe.type!=="checkbox"&&fe.type!=="radio"?ue&&cw(ue.elementType)&&(Bt=VT):Bt=gZ;if(Bt&&(Bt=Bt(s,ue))){UT(Se,Bt,p,be);break e}Ze&&Ze(s,fe,ue),s==="focusout"&&ue&&fe.type==="number"&&ue.memoizedProps.value!=null&&lw(fe,"number",fe.value)}switch(Ze=ue?Kf(ue):window,s){case"focusin":(FT(Ze)||Ze.contentEditable==="true")&&(Nu=Ze,_w=ue,tp=null);break;case"focusout":tp=_w=Nu=null;break;case"mousedown":Cw=!0;break;case"contextmenu":case"mouseup":case"dragend":Cw=!1,XT(Se,p,be);break;case"selectionchange":if(bZ)break;case"keydown":case"keyup":XT(Se,p,be)}var xt;if(bw)e:{switch(s){case"compositionstart":var Ot="onCompositionStart";break e;case"compositionend":Ot="onCompositionEnd";break e;case"compositionupdate":Ot="onCompositionUpdate";break e}Ot=void 0}else Tu?zT(s,p)&&(Ot="onCompositionEnd"):s==="keydown"&&p.keyCode===229&&(Ot="onCompositionStart");Ot&&($T&&p.locale!=="ko"&&(Tu||Ot!=="onCompositionStart"?Ot==="onCompositionEnd"&&Tu&&(xt=TT()):(Is=be,mw="value"in Is?Is.value:Is.textContent,Tu=!0)),Ze=ov(ue,Ot),0<Ze.length&&(Ot=new OT(Ot,s,null,p,be),Se.push({event:Ot,listeners:Ze}),xt?Ot.data=xt:(xt=LT(p),xt!==null&&(Ot.data=xt)))),(xt=cZ?uZ(s,p):dZ(s,p))&&(Ot=ov(ue,"onBeforeInput"),0<Ot.length&&(Ze=new OT("onBeforeInput","beforeinput",null,p,be),Se.push({event:Ze,listeners:Ot}),Ze.data=xt)),nY(Se,s,ue,p,be)}_O(Se,u)})}function Ep(s,u,p){return{instance:s,listener:u,currentTarget:p}}function ov(s,u){for(var p=u+"Capture",g=[];s!==null;){var w=s,_=w.stateNode;if(w=w.tag,w!==5&&w!==26&&w!==27||_===null||(w=Gf(s,p),w!=null&&g.unshift(Ep(s,w,_)),w=Gf(s,u),w!=null&&g.push(Ep(s,w,_))),s.tag===3)return g;s=s.return}return[]}function aY(s){if(s===null)return null;do s=s.return;while(s&&s.tag!==5&&s.tag!==27);return s||null}function kO(s,u,p,g,w){for(var _=u._reactName,R=[];p!==null&&p!==g;){var M=p,Y=M.alternate,ue=M.stateNode;if(M=M.tag,Y!==null&&Y===g)break;M!==5&&M!==26&&M!==27||ue===null||(Y=ue,w?(ue=Gf(p,_),ue!=null&&R.unshift(Ep(p,ue,Y))):w||(ue=Gf(p,_),ue!=null&&R.push(Ep(p,ue,Y)))),p=p.return}R.length!==0&&s.push({event:u,listeners:R})}var sY=/\r\n?/g,lY=/\u0000|\uFFFD/g;function EO(s){return(typeof s=="string"?s:""+s).replace(sY,`
234
+ `).replace(lY,"")}function jO(s,u){return u=EO(u),EO(s)===u}function un(s,u,p,g,w,_){switch(p){case"children":typeof g=="string"?u==="body"||u==="textarea"&&g===""||ju(s,g):(typeof g=="number"||typeof g=="bigint")&&u!=="body"&&ju(s,""+g);break;case"className":cg(s,"class",g);break;case"tabIndex":cg(s,"tabindex",g);break;case"dir":case"role":case"viewBox":case"width":case"height":cg(s,p,g);break;case"style":jT(s,g,_);break;case"data":if(u!=="object"){cg(s,"data",g);break}case"src":case"href":if(g===""&&(u!=="a"||p!=="href")){s.removeAttribute(p);break}if(g==null||typeof g=="function"||typeof g=="symbol"||typeof g=="boolean"){s.removeAttribute(p);break}g=dg(""+g),s.setAttribute(p,g);break;case"action":case"formAction":if(typeof g=="function"){s.setAttribute(p,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof _=="function"&&(p==="formAction"?(u!=="input"&&un(s,u,"name",w.name,w,null),un(s,u,"formEncType",w.formEncType,w,null),un(s,u,"formMethod",w.formMethod,w,null),un(s,u,"formTarget",w.formTarget,w,null)):(un(s,u,"encType",w.encType,w,null),un(s,u,"method",w.method,w,null),un(s,u,"target",w.target,w,null)));if(g==null||typeof g=="symbol"||typeof g=="boolean"){s.removeAttribute(p);break}g=dg(""+g),s.setAttribute(p,g);break;case"onClick":g!=null&&(s.onclick=La);break;case"onScroll":g!=null&&Tt("scroll",s);break;case"onScrollEnd":g!=null&&Tt("scrollend",s);break;case"dangerouslySetInnerHTML":if(g!=null){if(typeof g!="object"||!("__html"in g))throw Error(r(61));if(p=g.__html,p!=null){if(w.children!=null)throw Error(r(60));s.innerHTML=p}}break;case"multiple":s.multiple=g&&typeof g!="function"&&typeof g!="symbol";break;case"muted":s.muted=g&&typeof g!="function"&&typeof g!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(g==null||typeof g=="function"||typeof g=="boolean"||typeof g=="symbol"){s.removeAttribute("xlink:href");break}p=dg(""+g),s.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",p);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":g!=null&&typeof g!="function"&&typeof g!="symbol"?s.setAttribute(p,""+g):s.removeAttribute(p);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":g&&typeof g!="function"&&typeof g!="symbol"?s.setAttribute(p,""):s.removeAttribute(p);break;case"capture":case"download":g===!0?s.setAttribute(p,""):g!==!1&&g!=null&&typeof g!="function"&&typeof g!="symbol"?s.setAttribute(p,g):s.removeAttribute(p);break;case"cols":case"rows":case"size":case"span":g!=null&&typeof g!="function"&&typeof g!="symbol"&&!isNaN(g)&&1<=g?s.setAttribute(p,g):s.removeAttribute(p);break;case"rowSpan":case"start":g==null||typeof g=="function"||typeof g=="symbol"||isNaN(g)?s.removeAttribute(p):s.setAttribute(p,g);break;case"popover":Tt("beforetoggle",s),Tt("toggle",s),lg(s,"popover",g);break;case"xlinkActuate":za(s,"http://www.w3.org/1999/xlink","xlink:actuate",g);break;case"xlinkArcrole":za(s,"http://www.w3.org/1999/xlink","xlink:arcrole",g);break;case"xlinkRole":za(s,"http://www.w3.org/1999/xlink","xlink:role",g);break;case"xlinkShow":za(s,"http://www.w3.org/1999/xlink","xlink:show",g);break;case"xlinkTitle":za(s,"http://www.w3.org/1999/xlink","xlink:title",g);break;case"xlinkType":za(s,"http://www.w3.org/1999/xlink","xlink:type",g);break;case"xmlBase":za(s,"http://www.w3.org/XML/1998/namespace","xml:base",g);break;case"xmlLang":za(s,"http://www.w3.org/XML/1998/namespace","xml:lang",g);break;case"xmlSpace":za(s,"http://www.w3.org/XML/1998/namespace","xml:space",g);break;case"is":lg(s,"is",g);break;case"innerText":case"textContent":break;default:(!(2<p.length)||p[0]!=="o"&&p[0]!=="O"||p[1]!=="n"&&p[1]!=="N")&&(p=PG.get(p)||p,lg(s,p,g))}}function YS(s,u,p,g,w,_){switch(p){case"style":jT(s,g,_);break;case"dangerouslySetInnerHTML":if(g!=null){if(typeof g!="object"||!("__html"in g))throw Error(r(61));if(p=g.__html,p!=null){if(w.children!=null)throw Error(r(60));s.innerHTML=p}}break;case"children":typeof g=="string"?ju(s,g):(typeof g=="number"||typeof g=="bigint")&&ju(s,""+g);break;case"onScroll":g!=null&&Tt("scroll",s);break;case"onScrollEnd":g!=null&&Tt("scrollend",s);break;case"onClick":g!=null&&(s.onclick=La);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!yT.hasOwnProperty(p))e:{if(p[0]==="o"&&p[1]==="n"&&(w=p.endsWith("Capture"),u=p.slice(2,w?p.length-7:void 0),_=s[ci]||null,_=_!=null?_[p]:null,typeof _=="function"&&s.removeEventListener(u,_,w),typeof g=="function")){typeof _!="function"&&_!==null&&(p in s?s[p]=null:s.hasAttribute(p)&&s.removeAttribute(p)),s.addEventListener(u,g,w);break e}p in s?s[p]=g:g===!0?s.setAttribute(p,""):lg(s,p,g)}}}function Er(s,u,p){switch(u){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Tt("error",s),Tt("load",s);var g=!1,w=!1,_;for(_ in p)if(p.hasOwnProperty(_)){var R=p[_];if(R!=null)switch(_){case"src":g=!0;break;case"srcSet":w=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,u));default:un(s,u,_,R,p,null)}}w&&un(s,u,"srcSet",p.srcSet,p,null),g&&un(s,u,"src",p.src,p,null);return;case"input":Tt("invalid",s);var M=_=R=w=null,Y=null,ue=null;for(g in p)if(p.hasOwnProperty(g)){var be=p[g];if(be!=null)switch(g){case"name":w=be;break;case"type":R=be;break;case"checked":Y=be;break;case"defaultChecked":ue=be;break;case"value":_=be;break;case"defaultValue":M=be;break;case"children":case"dangerouslySetInnerHTML":if(be!=null)throw Error(r(137,u));break;default:un(s,u,g,be,p,null)}}_T(s,_,M,Y,ue,R,w,!1);return;case"select":Tt("invalid",s),g=R=_=null;for(w in p)if(p.hasOwnProperty(w)&&(M=p[w],M!=null))switch(w){case"value":_=M;break;case"defaultValue":R=M;break;case"multiple":g=M;default:un(s,u,w,M,p,null)}u=_,p=R,s.multiple=!!g,u!=null?Eu(s,!!g,u,!1):p!=null&&Eu(s,!!g,p,!0);return;case"textarea":Tt("invalid",s),_=w=g=null;for(R in p)if(p.hasOwnProperty(R)&&(M=p[R],M!=null))switch(R){case"value":g=M;break;case"defaultValue":w=M;break;case"children":_=M;break;case"dangerouslySetInnerHTML":if(M!=null)throw Error(r(91));break;default:un(s,u,R,M,p,null)}kT(s,g,w,_);return;case"option":for(Y in p)p.hasOwnProperty(Y)&&(g=p[Y],g!=null)&&(Y==="selected"?s.selected=g&&typeof g!="function"&&typeof g!="symbol":un(s,u,Y,g,p,null));return;case"dialog":Tt("beforetoggle",s),Tt("toggle",s),Tt("cancel",s),Tt("close",s);break;case"iframe":case"object":Tt("load",s);break;case"video":case"audio":for(g=0;g<kp.length;g++)Tt(kp[g],s);break;case"image":Tt("error",s),Tt("load",s);break;case"details":Tt("toggle",s);break;case"embed":case"source":case"link":Tt("error",s),Tt("load",s);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ue in p)if(p.hasOwnProperty(ue)&&(g=p[ue],g!=null))switch(ue){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,u));default:un(s,u,ue,g,p,null)}return;default:if(cw(u)){for(be in p)p.hasOwnProperty(be)&&(g=p[be],g!==void 0&&YS(s,u,be,g,p,void 0));return}}for(M in p)p.hasOwnProperty(M)&&(g=p[M],g!=null&&un(s,u,M,g,p,null))}function cY(s,u,p,g){switch(u){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var w=null,_=null,R=null,M=null,Y=null,ue=null,be=null;for(me in p){var Se=p[me];if(p.hasOwnProperty(me)&&Se!=null)switch(me){case"checked":break;case"value":break;case"defaultValue":Y=Se;default:g.hasOwnProperty(me)||un(s,u,me,null,g,Se)}}for(var fe in g){var me=g[fe];if(Se=p[fe],g.hasOwnProperty(fe)&&(me!=null||Se!=null))switch(fe){case"type":_=me;break;case"name":w=me;break;case"checked":ue=me;break;case"defaultChecked":be=me;break;case"value":R=me;break;case"defaultValue":M=me;break;case"children":case"dangerouslySetInnerHTML":if(me!=null)throw Error(r(137,u));break;default:me!==Se&&un(s,u,fe,me,g,Se)}}sw(s,R,M,Y,ue,be,_,w);return;case"select":me=R=M=fe=null;for(_ in p)if(Y=p[_],p.hasOwnProperty(_)&&Y!=null)switch(_){case"value":break;case"multiple":me=Y;default:g.hasOwnProperty(_)||un(s,u,_,null,g,Y)}for(w in g)if(_=g[w],Y=p[w],g.hasOwnProperty(w)&&(_!=null||Y!=null))switch(w){case"value":fe=_;break;case"defaultValue":M=_;break;case"multiple":R=_;default:_!==Y&&un(s,u,w,_,g,Y)}u=M,p=R,g=me,fe!=null?Eu(s,!!p,fe,!1):!!g!=!!p&&(u!=null?Eu(s,!!p,u,!0):Eu(s,!!p,p?[]:"",!1));return;case"textarea":me=fe=null;for(M in p)if(w=p[M],p.hasOwnProperty(M)&&w!=null&&!g.hasOwnProperty(M))switch(M){case"value":break;case"children":break;default:un(s,u,M,null,g,w)}for(R in g)if(w=g[R],_=p[R],g.hasOwnProperty(R)&&(w!=null||_!=null))switch(R){case"value":fe=w;break;case"defaultValue":me=w;break;case"children":break;case"dangerouslySetInnerHTML":if(w!=null)throw Error(r(91));break;default:w!==_&&un(s,u,R,w,g,_)}CT(s,fe,me);return;case"option":for(var He in p)fe=p[He],p.hasOwnProperty(He)&&fe!=null&&!g.hasOwnProperty(He)&&(He==="selected"?s.selected=!1:un(s,u,He,null,g,fe));for(Y in g)fe=g[Y],me=p[Y],g.hasOwnProperty(Y)&&fe!==me&&(fe!=null||me!=null)&&(Y==="selected"?s.selected=fe&&typeof fe!="function"&&typeof fe!="symbol":un(s,u,Y,fe,g,me));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var rt in p)fe=p[rt],p.hasOwnProperty(rt)&&fe!=null&&!g.hasOwnProperty(rt)&&un(s,u,rt,null,g,fe);for(ue in g)if(fe=g[ue],me=p[ue],g.hasOwnProperty(ue)&&fe!==me&&(fe!=null||me!=null))switch(ue){case"children":case"dangerouslySetInnerHTML":if(fe!=null)throw Error(r(137,u));break;default:un(s,u,ue,fe,g,me)}return;default:if(cw(u)){for(var dn in p)fe=p[dn],p.hasOwnProperty(dn)&&fe!==void 0&&!g.hasOwnProperty(dn)&&YS(s,u,dn,void 0,g,fe);for(be in g)fe=g[be],me=p[be],!g.hasOwnProperty(be)||fe===me||fe===void 0&&me===void 0||YS(s,u,be,fe,g,me);return}}for(var ie in p)fe=p[ie],p.hasOwnProperty(ie)&&fe!=null&&!g.hasOwnProperty(ie)&&un(s,u,ie,null,g,fe);for(Se in g)fe=g[Se],me=p[Se],!g.hasOwnProperty(Se)||fe===me||fe==null&&me==null||un(s,u,Se,fe,g,me)}function RO(s){switch(s){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function uY(){if(typeof performance.getEntriesByType=="function"){for(var s=0,u=0,p=performance.getEntriesByType("resource"),g=0;g<p.length;g++){var w=p[g],_=w.transferSize,R=w.initiatorType,M=w.duration;if(_&&M&&RO(R)){for(R=0,M=w.responseEnd,g+=1;g<p.length;g++){var Y=p[g],ue=Y.startTime;if(ue>M)break;var be=Y.transferSize,Se=Y.initiatorType;be&&RO(Se)&&(Y=Y.responseEnd,R+=be*(Y<M?1:(M-ue)/(Y-ue)))}if(--g,u+=8*(_+R)/(w.duration/1e3),s++,10<s)break}}if(0<s)return u/s/1e6}return navigator.connection&&(s=navigator.connection.downlink,typeof s=="number")?s:5}var WS=null,XS=null;function av(s){return s.nodeType===9?s:s.ownerDocument}function IO(s){switch(s){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function TO(s,u){if(s===0)switch(u){case"svg":return 1;case"math":return 2;default:return 0}return s===1&&u==="foreignObject"?0:s}function JS(s,u){return s==="textarea"||s==="noscript"||typeof u.children=="string"||typeof u.children=="number"||typeof u.children=="bigint"||typeof u.dangerouslySetInnerHTML=="object"&&u.dangerouslySetInnerHTML!==null&&u.dangerouslySetInnerHTML.__html!=null}var QS=null;function dY(){var s=window.event;return s&&s.type==="popstate"?s===QS?!1:(QS=s,!0):(QS=null,!1)}var NO=typeof setTimeout=="function"?setTimeout:void 0,fY=typeof clearTimeout=="function"?clearTimeout:void 0,AO=typeof Promise=="function"?Promise:void 0,pY=typeof queueMicrotask=="function"?queueMicrotask:typeof AO<"u"?function(s){return AO.resolve(null).then(s).catch(mY)}:NO;function mY(s){setTimeout(function(){throw s})}function Ks(s){return s==="head"}function OO(s,u){var p=u,g=0;do{var w=p.nextSibling;if(s.removeChild(p),w&&w.nodeType===8)if(p=w.data,p==="/$"||p==="/&"){if(g===0){s.removeChild(w),id(u);return}g--}else if(p==="$"||p==="$?"||p==="$~"||p==="$!"||p==="&")g++;else if(p==="html")jp(s.ownerDocument.documentElement);else if(p==="head"){p=s.ownerDocument.head,jp(p);for(var _=p.firstChild;_;){var R=_.nextSibling,M=_.nodeName;_[qf]||M==="SCRIPT"||M==="STYLE"||M==="LINK"&&_.rel.toLowerCase()==="stylesheet"||p.removeChild(_),_=R}}else p==="body"&&jp(s.ownerDocument.body);p=w}while(p);id(u)}function DO(s,u){var p=s;s=0;do{var g=p.nextSibling;if(p.nodeType===1?u?(p._stashedDisplay=p.style.display,p.style.display="none"):(p.style.display=p._stashedDisplay||"",p.getAttribute("style")===""&&p.removeAttribute("style")):p.nodeType===3&&(u?(p._stashedText=p.nodeValue,p.nodeValue=""):p.nodeValue=p._stashedText||""),g&&g.nodeType===8)if(p=g.data,p==="/$"){if(s===0)break;s--}else p!=="$"&&p!=="$?"&&p!=="$~"&&p!=="$!"||s++;p=g}while(p)}function e_(s){var u=s.firstChild;for(u&&u.nodeType===10&&(u=u.nextSibling);u;){var p=u;switch(u=u.nextSibling,p.nodeName){case"HTML":case"HEAD":case"BODY":e_(p),ow(p);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(p.rel.toLowerCase()==="stylesheet")continue}s.removeChild(p)}}function hY(s,u,p,g){for(;s.nodeType===1;){var w=p;if(s.nodeName.toLowerCase()!==u.toLowerCase()){if(!g&&(s.nodeName!=="INPUT"||s.type!=="hidden"))break}else if(g){if(!s[qf])switch(u){case"meta":if(!s.hasAttribute("itemprop"))break;return s;case"link":if(_=s.getAttribute("rel"),_==="stylesheet"&&s.hasAttribute("data-precedence"))break;if(_!==w.rel||s.getAttribute("href")!==(w.href==null||w.href===""?null:w.href)||s.getAttribute("crossorigin")!==(w.crossOrigin==null?null:w.crossOrigin)||s.getAttribute("title")!==(w.title==null?null:w.title))break;return s;case"style":if(s.hasAttribute("data-precedence"))break;return s;case"script":if(_=s.getAttribute("src"),(_!==(w.src==null?null:w.src)||s.getAttribute("type")!==(w.type==null?null:w.type)||s.getAttribute("crossorigin")!==(w.crossOrigin==null?null:w.crossOrigin))&&_&&s.hasAttribute("async")&&!s.hasAttribute("itemprop"))break;return s;default:return s}}else if(u==="input"&&s.type==="hidden"){var _=w.name==null?null:""+w.name;if(w.type==="hidden"&&s.getAttribute("name")===_)return s}else return s;if(s=go(s.nextSibling),s===null)break}return null}function gY(s,u,p){if(u==="")return null;for(;s.nodeType!==3;)if((s.nodeType!==1||s.nodeName!=="INPUT"||s.type!=="hidden")&&!p||(s=go(s.nextSibling),s===null))return null;return s}function $O(s,u){for(;s.nodeType!==8;)if((s.nodeType!==1||s.nodeName!=="INPUT"||s.type!=="hidden")&&!u||(s=go(s.nextSibling),s===null))return null;return s}function t_(s){return s.data==="$?"||s.data==="$~"}function n_(s){return s.data==="$!"||s.data==="$?"&&s.ownerDocument.readyState!=="loading"}function vY(s,u){var p=s.ownerDocument;if(s.data==="$~")s._reactRetry=u;else if(s.data!=="$?"||p.readyState!=="loading")u();else{var g=function(){u(),p.removeEventListener("DOMContentLoaded",g)};p.addEventListener("DOMContentLoaded",g),s._reactRetry=g}}function go(s){for(;s!=null;s=s.nextSibling){var u=s.nodeType;if(u===1||u===3)break;if(u===8){if(u=s.data,u==="$"||u==="$!"||u==="$?"||u==="$~"||u==="&"||u==="F!"||u==="F")break;if(u==="/$"||u==="/&")return null}}return s}var r_=null;function PO(s){s=s.nextSibling;for(var u=0;s;){if(s.nodeType===8){var p=s.data;if(p==="/$"||p==="/&"){if(u===0)return go(s.nextSibling);u--}else p!=="$"&&p!=="$!"&&p!=="$?"&&p!=="$~"&&p!=="&"||u++}s=s.nextSibling}return null}function MO(s){s=s.previousSibling;for(var u=0;s;){if(s.nodeType===8){var p=s.data;if(p==="$"||p==="$!"||p==="$?"||p==="$~"||p==="&"){if(u===0)return s;u--}else p!=="/$"&&p!=="/&"||u++}s=s.previousSibling}return null}function zO(s,u,p){switch(u=av(p),s){case"html":if(s=u.documentElement,!s)throw Error(r(452));return s;case"head":if(s=u.head,!s)throw Error(r(453));return s;case"body":if(s=u.body,!s)throw Error(r(454));return s;default:throw Error(r(451))}}function jp(s){for(var u=s.attributes;u.length;)s.removeAttributeNode(u[0]);ow(s)}var vo=new Map,LO=new Set;function sv(s){return typeof s.getRootNode=="function"?s.getRootNode():s.nodeType===9?s:s.ownerDocument}var ts=W.d;W.d={f:yY,r:bY,D:xY,C:wY,L:SY,m:_Y,X:kY,S:CY,M:EY};function yY(){var s=ts.f(),u=Jg();return s||u}function bY(s){var u=_u(s);u!==null&&u.tag===5&&u.type==="form"?nA(u):ts.r(s)}var td=typeof document>"u"?null:document;function FO(s,u,p){var g=td;if(g&&typeof u=="string"&&u){var w=lo(u);w='link[rel="'+s+'"][href="'+w+'"]',typeof p=="string"&&(w+='[crossorigin="'+p+'"]'),LO.has(w)||(LO.add(w),s={rel:s,crossOrigin:p,href:u},g.querySelector(w)===null&&(u=g.createElement("link"),Er(u,"link",s),gr(u),g.head.appendChild(u)))}}function xY(s){ts.D(s),FO("dns-prefetch",s,null)}function wY(s,u){ts.C(s,u),FO("preconnect",s,u)}function SY(s,u,p){ts.L(s,u,p);var g=td;if(g&&s&&u){var w='link[rel="preload"][as="'+lo(u)+'"]';u==="image"&&p&&p.imageSrcSet?(w+='[imagesrcset="'+lo(p.imageSrcSet)+'"]',typeof p.imageSizes=="string"&&(w+='[imagesizes="'+lo(p.imageSizes)+'"]')):w+='[href="'+lo(s)+'"]';var _=w;switch(u){case"style":_=nd(s);break;case"script":_=rd(s)}vo.has(_)||(s=h({rel:"preload",href:u==="image"&&p&&p.imageSrcSet?void 0:s,as:u},p),vo.set(_,s),g.querySelector(w)!==null||u==="style"&&g.querySelector(Rp(_))||u==="script"&&g.querySelector(Ip(_))||(u=g.createElement("link"),Er(u,"link",s),gr(u),g.head.appendChild(u)))}}function _Y(s,u){ts.m(s,u);var p=td;if(p&&s){var g=u&&typeof u.as=="string"?u.as:"script",w='link[rel="modulepreload"][as="'+lo(g)+'"][href="'+lo(s)+'"]',_=w;switch(g){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":_=rd(s)}if(!vo.has(_)&&(s=h({rel:"modulepreload",href:s},u),vo.set(_,s),p.querySelector(w)===null)){switch(g){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(p.querySelector(Ip(_)))return}g=p.createElement("link"),Er(g,"link",s),gr(g),p.head.appendChild(g)}}}function CY(s,u,p){ts.S(s,u,p);var g=td;if(g&&s){var w=Cu(g).hoistableStyles,_=nd(s);u=u||"default";var R=w.get(_);if(!R){var M={loading:0,preload:null};if(R=g.querySelector(Rp(_)))M.loading=5;else{s=h({rel:"stylesheet",href:s,"data-precedence":u},p),(p=vo.get(_))&&i_(s,p);var Y=R=g.createElement("link");gr(Y),Er(Y,"link",s),Y._p=new Promise(function(ue,be){Y.onload=ue,Y.onerror=be}),Y.addEventListener("load",function(){M.loading|=1}),Y.addEventListener("error",function(){M.loading|=2}),M.loading|=4,lv(R,u,g)}R={type:"stylesheet",instance:R,count:1,state:M},w.set(_,R)}}}function kY(s,u){ts.X(s,u);var p=td;if(p&&s){var g=Cu(p).hoistableScripts,w=rd(s),_=g.get(w);_||(_=p.querySelector(Ip(w)),_||(s=h({src:s,async:!0},u),(u=vo.get(w))&&o_(s,u),_=p.createElement("script"),gr(_),Er(_,"link",s),p.head.appendChild(_)),_={type:"script",instance:_,count:1,state:null},g.set(w,_))}}function EY(s,u){ts.M(s,u);var p=td;if(p&&s){var g=Cu(p).hoistableScripts,w=rd(s),_=g.get(w);_||(_=p.querySelector(Ip(w)),_||(s=h({src:s,async:!0,type:"module"},u),(u=vo.get(w))&&o_(s,u),_=p.createElement("script"),gr(_),Er(_,"link",s),p.head.appendChild(_)),_={type:"script",instance:_,count:1,state:null},g.set(w,_))}}function UO(s,u,p,g){var w=(w=ge.current)?sv(w):null;if(!w)throw Error(r(446));switch(s){case"meta":case"title":return null;case"style":return typeof p.precedence=="string"&&typeof p.href=="string"?(u=nd(p.href),p=Cu(w).hoistableStyles,g=p.get(u),g||(g={type:"style",instance:null,count:0,state:null},p.set(u,g)),g):{type:"void",instance:null,count:0,state:null};case"link":if(p.rel==="stylesheet"&&typeof p.href=="string"&&typeof p.precedence=="string"){s=nd(p.href);var _=Cu(w).hoistableStyles,R=_.get(s);if(R||(w=w.ownerDocument||w,R={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},_.set(s,R),(_=w.querySelector(Rp(s)))&&!_._p&&(R.instance=_,R.state.loading=5),vo.has(s)||(p={rel:"preload",as:"style",href:p.href,crossOrigin:p.crossOrigin,integrity:p.integrity,media:p.media,hrefLang:p.hrefLang,referrerPolicy:p.referrerPolicy},vo.set(s,p),_||jY(w,s,p,R.state))),u&&g===null)throw Error(r(528,""));return R}if(u&&g!==null)throw Error(r(529,""));return null;case"script":return u=p.async,p=p.src,typeof p=="string"&&u&&typeof u!="function"&&typeof u!="symbol"?(u=rd(p),p=Cu(w).hoistableScripts,g=p.get(u),g||(g={type:"script",instance:null,count:0,state:null},p.set(u,g)),g):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,s))}}function nd(s){return'href="'+lo(s)+'"'}function Rp(s){return'link[rel="stylesheet"]['+s+"]"}function VO(s){return h({},s,{"data-precedence":s.precedence,precedence:null})}function jY(s,u,p,g){s.querySelector('link[rel="preload"][as="style"]['+u+"]")?g.loading=1:(u=s.createElement("link"),g.preload=u,u.addEventListener("load",function(){return g.loading|=1}),u.addEventListener("error",function(){return g.loading|=2}),Er(u,"link",p),gr(u),s.head.appendChild(u))}function rd(s){return'[src="'+lo(s)+'"]'}function Ip(s){return"script[async]"+s}function BO(s,u,p){if(u.count++,u.instance===null)switch(u.type){case"style":var g=s.querySelector('style[data-href~="'+lo(p.href)+'"]');if(g)return u.instance=g,gr(g),g;var w=h({},p,{"data-href":p.href,"data-precedence":p.precedence,href:null,precedence:null});return g=(s.ownerDocument||s).createElement("style"),gr(g),Er(g,"style",w),lv(g,p.precedence,s),u.instance=g;case"stylesheet":w=nd(p.href);var _=s.querySelector(Rp(w));if(_)return u.state.loading|=4,u.instance=_,gr(_),_;g=VO(p),(w=vo.get(w))&&i_(g,w),_=(s.ownerDocument||s).createElement("link"),gr(_);var R=_;return R._p=new Promise(function(M,Y){R.onload=M,R.onerror=Y}),Er(_,"link",g),u.state.loading|=4,lv(_,p.precedence,s),u.instance=_;case"script":return _=rd(p.src),(w=s.querySelector(Ip(_)))?(u.instance=w,gr(w),w):(g=p,(w=vo.get(_))&&(g=h({},p),o_(g,w)),s=s.ownerDocument||s,w=s.createElement("script"),gr(w),Er(w,"link",g),s.head.appendChild(w),u.instance=w);case"void":return null;default:throw Error(r(443,u.type))}else u.type==="stylesheet"&&(u.state.loading&4)===0&&(g=u.instance,u.state.loading|=4,lv(g,p.precedence,s));return u.instance}function lv(s,u,p){for(var g=p.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),w=g.length?g[g.length-1]:null,_=w,R=0;R<g.length;R++){var M=g[R];if(M.dataset.precedence===u)_=M;else if(_!==w)break}_?_.parentNode.insertBefore(s,_.nextSibling):(u=p.nodeType===9?p.head:p,u.insertBefore(s,u.firstChild))}function i_(s,u){s.crossOrigin==null&&(s.crossOrigin=u.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=u.referrerPolicy),s.title==null&&(s.title=u.title)}function o_(s,u){s.crossOrigin==null&&(s.crossOrigin=u.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=u.referrerPolicy),s.integrity==null&&(s.integrity=u.integrity)}var cv=null;function HO(s,u,p){if(cv===null){var g=new Map,w=cv=new Map;w.set(p,g)}else w=cv,g=w.get(p),g||(g=new Map,w.set(p,g));if(g.has(s))return g;for(g.set(s,null),p=p.getElementsByTagName(s),w=0;w<p.length;w++){var _=p[w];if(!(_[qf]||_[Sr]||s==="link"&&_.getAttribute("rel")==="stylesheet")&&_.namespaceURI!=="http://www.w3.org/2000/svg"){var R=_.getAttribute(u)||"";R=s+R;var M=g.get(R);M?M.push(_):g.set(R,[_])}}return g}function qO(s,u,p){s=s.ownerDocument||s,s.head.insertBefore(p,u==="title"?s.querySelector("head > title"):null)}function RY(s,u,p){if(p===1||u.itemProp!=null)return!1;switch(s){case"meta":case"title":return!0;case"style":if(typeof u.precedence!="string"||typeof u.href!="string"||u.href==="")break;return!0;case"link":if(typeof u.rel!="string"||typeof u.href!="string"||u.href===""||u.onLoad||u.onError)break;return u.rel==="stylesheet"?(s=u.disabled,typeof u.precedence=="string"&&s==null):!0;case"script":if(u.async&&typeof u.async!="function"&&typeof u.async!="symbol"&&!u.onLoad&&!u.onError&&u.src&&typeof u.src=="string")return!0}return!1}function KO(s){return!(s.type==="stylesheet"&&(s.state.loading&3)===0)}function IY(s,u,p,g){if(p.type==="stylesheet"&&(typeof g.media!="string"||matchMedia(g.media).matches!==!1)&&(p.state.loading&4)===0){if(p.instance===null){var w=nd(g.href),_=u.querySelector(Rp(w));if(_){u=_._p,u!==null&&typeof u=="object"&&typeof u.then=="function"&&(s.count++,s=uv.bind(s),u.then(s,s)),p.state.loading|=4,p.instance=_,gr(_);return}_=u.ownerDocument||u,g=VO(g),(w=vo.get(w))&&i_(g,w),_=_.createElement("link"),gr(_);var R=_;R._p=new Promise(function(M,Y){R.onload=M,R.onerror=Y}),Er(_,"link",g),p.instance=_}s.stylesheets===null&&(s.stylesheets=new Map),s.stylesheets.set(p,u),(u=p.state.preload)&&(p.state.loading&3)===0&&(s.count++,p=uv.bind(s),u.addEventListener("load",p),u.addEventListener("error",p))}}var a_=0;function TY(s,u){return s.stylesheets&&s.count===0&&fv(s,s.stylesheets),0<s.count||0<s.imgCount?function(p){var g=setTimeout(function(){if(s.stylesheets&&fv(s,s.stylesheets),s.unsuspend){var _=s.unsuspend;s.unsuspend=null,_()}},6e4+u);0<s.imgBytes&&a_===0&&(a_=62500*uY());var w=setTimeout(function(){if(s.waitingForImages=!1,s.count===0&&(s.stylesheets&&fv(s,s.stylesheets),s.unsuspend)){var _=s.unsuspend;s.unsuspend=null,_()}},(s.imgBytes>a_?50:800)+u);return s.unsuspend=p,function(){s.unsuspend=null,clearTimeout(g),clearTimeout(w)}}:null}function uv(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)fv(this,this.stylesheets);else if(this.unsuspend){var s=this.unsuspend;this.unsuspend=null,s()}}}var dv=null;function fv(s,u){s.stylesheets=null,s.unsuspend!==null&&(s.count++,dv=new Map,u.forEach(NY,s),dv=null,uv.call(s))}function NY(s,u){if(!(u.state.loading&4)){var p=dv.get(s);if(p)var g=p.get(null);else{p=new Map,dv.set(s,p);for(var w=s.querySelectorAll("link[data-precedence],style[data-precedence]"),_=0;_<w.length;_++){var R=w[_];(R.nodeName==="LINK"||R.getAttribute("media")!=="not all")&&(p.set(R.dataset.precedence,R),g=R)}g&&p.set(null,g)}w=u.instance,R=w.getAttribute("data-precedence"),_=p.get(R)||g,_===g&&p.set(null,w),p.set(R,w),this.count++,g=uv.bind(this),w.addEventListener("load",g),w.addEventListener("error",g),_?_.parentNode.insertBefore(w,_.nextSibling):(s=s.nodeType===9?s.head:s,s.insertBefore(w,s.firstChild)),u.state.loading|=4}}var Tp={$$typeof:j,Provider:null,Consumer:null,_currentValue:F,_currentValue2:F,_threadCount:0};function AY(s,u,p,g,w,_,R,M,Y){this.tag=1,this.containerInfo=s,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ca(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ca(0),this.hiddenUpdates=ca(null),this.identifierPrefix=g,this.onUncaughtError=w,this.onCaughtError=_,this.onRecoverableError=R,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Y,this.incompleteTransitions=new Map}function GO(s,u,p,g,w,_,R,M,Y,ue,be,Se){return s=new AY(s,u,p,R,Y,ue,be,Se,M),u=1,_===!0&&(u|=24),_=$i(3,null,null,u),s.current=_,_.stateNode=s,u=Lw(),u.refCount++,s.pooledCache=u,u.refCount++,_.memoizedState={element:g,isDehydrated:p,cache:u},Bw(_),s}function ZO(s){return s?(s=Du,s):Du}function YO(s,u,p,g,w,_){w=ZO(w),g.context===null?g.context=w:g.pendingContext=w,g=$s(u),g.payload={element:p},_=_===void 0?null:_,_!==null&&(g.callback=_),p=Ps(s,g,u),p!==null&&(hi(p,s,u),lp(p,s,u))}function WO(s,u){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var p=s.retryLane;s.retryLane=p!==0&&p<u?p:u}}function s_(s,u){WO(s,u),(s=s.alternate)&&WO(s,u)}function XO(s){if(s.tag===13||s.tag===31){var u=tc(s,67108864);u!==null&&hi(u,s,67108864),s_(s,67108864)}}function JO(s){if(s.tag===13||s.tag===31){var u=Fi();u=xu(u);var p=tc(s,u);p!==null&&hi(p,s,u),s_(s,u)}}var pv=!0;function OY(s,u,p,g){var w=z.T;z.T=null;var _=W.p;try{W.p=2,l_(s,u,p,g)}finally{W.p=_,z.T=w}}function DY(s,u,p,g){var w=z.T;z.T=null;var _=W.p;try{W.p=8,l_(s,u,p,g)}finally{W.p=_,z.T=w}}function l_(s,u,p,g){if(pv){var w=c_(g);if(w===null)ZS(s,u,g,mv,p),eD(s,g);else if(PY(w,s,u,p,g))g.stopPropagation();else if(eD(s,g),u&4&&-1<$Y.indexOf(s)){for(;w!==null;){var _=_u(w);if(_!==null)switch(_.tag){case 3:if(_=_.stateNode,_.current.memoizedState.isDehydrated){var R=Zt(_.pendingLanes);if(R!==0){var M=_;for(M.pendingLanes|=2,M.entangledLanes|=2;R;){var Y=1<<31-jt(R);M.entanglements[1]|=Y,R&=~Y}pa(_),(Yt&6)===0&&(Wg=Ce()+500,Cp(0))}}break;case 31:case 13:M=tc(_,2),M!==null&&hi(M,_,2),Jg(),s_(_,2)}if(_=c_(g),_===null&&ZS(s,u,g,mv,p),_===w)break;w=_}w!==null&&g.stopPropagation()}else ZS(s,u,g,null,p)}}function c_(s){return s=dw(s),u_(s)}var mv=null;function u_(s){if(mv=null,s=Su(s),s!==null){var u=o(s);if(u===null)s=null;else{var p=u.tag;if(p===13){if(s=a(u),s!==null)return s;s=null}else if(p===31){if(s=l(u),s!==null)return s;s=null}else if(p===3){if(u.stateNode.current.memoizedState.isDehydrated)return u.tag===3?u.stateNode.containerInfo:null;s=null}else u!==s&&(s=null)}}return mv=s,null}function QO(s){switch(s){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(oe()){case U:return 2;case le:return 8;case ke:case De:return 32;case Be:return 268435456;default:return 32}default:return 32}}var d_=!1,Gs=null,Zs=null,Ys=null,Np=new Map,Ap=new Map,Ws=[],$Y="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function eD(s,u){switch(s){case"focusin":case"focusout":Gs=null;break;case"dragenter":case"dragleave":Zs=null;break;case"mouseover":case"mouseout":Ys=null;break;case"pointerover":case"pointerout":Np.delete(u.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ap.delete(u.pointerId)}}function Op(s,u,p,g,w,_){return s===null||s.nativeEvent!==_?(s={blockedOn:u,domEventName:p,eventSystemFlags:g,nativeEvent:_,targetContainers:[w]},u!==null&&(u=_u(u),u!==null&&XO(u)),s):(s.eventSystemFlags|=g,u=s.targetContainers,w!==null&&u.indexOf(w)===-1&&u.push(w),s)}function PY(s,u,p,g,w){switch(u){case"focusin":return Gs=Op(Gs,s,u,p,g,w),!0;case"dragenter":return Zs=Op(Zs,s,u,p,g,w),!0;case"mouseover":return Ys=Op(Ys,s,u,p,g,w),!0;case"pointerover":var _=w.pointerId;return Np.set(_,Op(Np.get(_)||null,s,u,p,g,w)),!0;case"gotpointercapture":return _=w.pointerId,Ap.set(_,Op(Ap.get(_)||null,s,u,p,g,w)),!0}return!1}function tD(s){var u=Su(s.target);if(u!==null){var p=o(u);if(p!==null){if(u=p.tag,u===13){if(u=a(p),u!==null){s.blockedOn=u,hT(s.priority,function(){JO(p)});return}}else if(u===31){if(u=l(p),u!==null){s.blockedOn=u,hT(s.priority,function(){JO(p)});return}}else if(u===3&&p.stateNode.current.memoizedState.isDehydrated){s.blockedOn=p.tag===3?p.stateNode.containerInfo:null;return}}}s.blockedOn=null}function hv(s){if(s.blockedOn!==null)return!1;for(var u=s.targetContainers;0<u.length;){var p=c_(s.nativeEvent);if(p===null){p=s.nativeEvent;var g=new p.constructor(p.type,p);uw=g,p.target.dispatchEvent(g),uw=null}else return u=_u(p),u!==null&&XO(u),s.blockedOn=p,!1;u.shift()}return!0}function nD(s,u,p){hv(s)&&p.delete(u)}function MY(){d_=!1,Gs!==null&&hv(Gs)&&(Gs=null),Zs!==null&&hv(Zs)&&(Zs=null),Ys!==null&&hv(Ys)&&(Ys=null),Np.forEach(nD),Ap.forEach(nD)}function gv(s,u){s.blockedOn===u&&(s.blockedOn=null,d_||(d_=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,MY)))}var vv=null;function rD(s){vv!==s&&(vv=s,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){vv===s&&(vv=null);for(var u=0;u<s.length;u+=3){var p=s[u],g=s[u+1],w=s[u+2];if(typeof g!="function"){if(u_(g||p)===null)continue;break}var _=_u(p);_!==null&&(s.splice(u,3),u-=3,cS(_,{pending:!0,data:w,method:p.method,action:g},g,w))}}))}function id(s){function u(Y){return gv(Y,s)}Gs!==null&&gv(Gs,s),Zs!==null&&gv(Zs,s),Ys!==null&&gv(Ys,s),Np.forEach(u),Ap.forEach(u);for(var p=0;p<Ws.length;p++){var g=Ws[p];g.blockedOn===s&&(g.blockedOn=null)}for(;0<Ws.length&&(p=Ws[0],p.blockedOn===null);)tD(p),p.blockedOn===null&&Ws.shift();if(p=(s.ownerDocument||s).$$reactFormReplay,p!=null)for(g=0;g<p.length;g+=3){var w=p[g],_=p[g+1],R=w[ci]||null;if(typeof _=="function")R||rD(p);else if(R){var M=null;if(_&&_.hasAttribute("formAction")){if(w=_,R=_[ci]||null)M=R.formAction;else if(u_(w)!==null)continue}else M=R.action;typeof M=="function"?p[g+1]=M:(p.splice(g,3),g-=3),rD(p)}}}function iD(){function s(_){_.canIntercept&&_.info==="react-transition"&&_.intercept({handler:function(){return new Promise(function(R){return w=R})},focusReset:"manual",scroll:"manual"})}function u(){w!==null&&(w(),w=null),g||setTimeout(p,20)}function p(){if(!g&&!navigation.transition){var _=navigation.currentEntry;_&&_.url!=null&&navigation.navigate(_.url,{state:_.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var g=!1,w=null;return navigation.addEventListener("navigate",s),navigation.addEventListener("navigatesuccess",u),navigation.addEventListener("navigateerror",u),setTimeout(p,100),function(){g=!0,navigation.removeEventListener("navigate",s),navigation.removeEventListener("navigatesuccess",u),navigation.removeEventListener("navigateerror",u),w!==null&&(w(),w=null)}}}function f_(s){this._internalRoot=s}yv.prototype.render=f_.prototype.render=function(s){var u=this._internalRoot;if(u===null)throw Error(r(409));var p=u.current,g=Fi();YO(p,g,s,u,null,null)},yv.prototype.unmount=f_.prototype.unmount=function(){var s=this._internalRoot;if(s!==null){this._internalRoot=null;var u=s.containerInfo;YO(s.current,2,null,s,null,null),Jg(),u[wu]=null}};function yv(s){this._internalRoot=s}yv.prototype.unstable_scheduleHydration=function(s){if(s){var u=rw();s={blockedOn:null,target:s,priority:u};for(var p=0;p<Ws.length&&u!==0&&u<Ws[p].priority;p++);Ws.splice(p,0,s),p===0&&tD(s)}};var oD=t.version;if(oD!=="19.2.4")throw Error(r(527,oD,"19.2.4"));W.findDOMNode=function(s){var u=s._reactInternals;if(u===void 0)throw typeof s.render=="function"?Error(r(188)):(s=Object.keys(s).join(","),Error(r(268,s)));return s=f(u),s=s!==null?m(s):null,s=s===null?null:s.stateNode,s};var zY={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:z,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var bv=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!bv.isDisabled&&bv.supportsFiber)try{kn=bv.inject(zY),Gt=bv}catch{}}return om.createRoot=function(s,u){if(!i(s))throw Error(r(299));var p=!1,g="",w=fA,_=pA,R=mA;return u!=null&&(u.unstable_strictMode===!0&&(p=!0),u.identifierPrefix!==void 0&&(g=u.identifierPrefix),u.onUncaughtError!==void 0&&(w=u.onUncaughtError),u.onCaughtError!==void 0&&(_=u.onCaughtError),u.onRecoverableError!==void 0&&(R=u.onRecoverableError)),u=GO(s,1,!1,null,null,p,g,null,w,_,R,iD),s[wu]=u.current,GS(s),new f_(u)},om.hydrateRoot=function(s,u,p){if(!i(s))throw Error(r(299));var g=!1,w="",_=fA,R=pA,M=mA,Y=null;return p!=null&&(p.unstable_strictMode===!0&&(g=!0),p.identifierPrefix!==void 0&&(w=p.identifierPrefix),p.onUncaughtError!==void 0&&(_=p.onUncaughtError),p.onCaughtError!==void 0&&(R=p.onCaughtError),p.onRecoverableError!==void 0&&(M=p.onRecoverableError),p.formState!==void 0&&(Y=p.formState)),u=GO(s,1,!0,u,p??null,g,w,Y,_,R,M,iD),u.context=ZO(null),p=u.current,g=Fi(),g=xu(g),w=$s(g),w.callback=null,Ps(p,w,g),p=g,u.current.lanes=p,hn(u,p),pa(u),s[wu]=u.current,GS(s),new yv(u)},om.version="19.2.4",om}var hz;function xPe(){if(hz)return Q1.exports;hz=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Q1.exports=bPe(),Q1.exports}var wPe=xPe();wPe.createRoot(document.getElementById("root"),{onUncaughtError:(e,t)=>{wy(),console.error("Uncaught error:",e,t)},onCaughtError:(e,t)=>{wy(),console.error("Caught error:",e,t)},onRecoverableError:(e,t)=>{wy(),console.warn("Recoverable error:",e,t)}}).render(c.jsx(b.StrictMode,{children:c.jsx(gPe,{})}));export{ot as $,on as A,Ca as B,K_ as C,NE as D,Po as E,KPe as F,Hae as G,Yse as H,Et as I,Ele as J,FL as K,tMe as L,QPe as M,Rt as N,eMe as O,YPe as P,nMe as Q,St as R,rae as S,ko as T,zr as U,Ur as V,ax as W,sh as X,YL as Y,Xd as Z,ix as _,Yle as a,Zo as a$,$t as a0,Mt as a1,Xe as a2,_n as a3,Cn as a4,Al as a5,Qt as a6,an as a7,b as a8,Ct as a9,ls as aA,aE as aB,gl as aC,Z7 as aD,Qc as aE,Mr as aF,Lo as aG,BPe as aH,hf as aI,SPe as aJ,nh as aK,J as aL,iMe as aM,va as aN,et as aO,fE as aP,nt as aQ,Dt as aR,FDe as aS,uT as aT,QOe as aU,ao as aV,qk as aW,Fy as aX,Tr as aY,HPe as aZ,Dc as a_,Mn as aa,ye as ab,wpe as ac,c as ad,en as ae,Ne as af,je as ag,Re as ah,Te as ai,ze as aj,Ie as ak,he as al,Ii as am,Wd as an,ex as ao,LL as ap,Ure as aq,ti as ar,yt as as,Bn as at,lL as au,iu as av,Ut as aw,sr as ax,qm as ay,bj as az,Xb as b,Ve as b0,S4 as b1,xQ as b2,bf as b3,iE as b4,$_e as b5,D_e as b6,Of as b7,Qi as b8,to as b9,eo as ba,no as bb,ia as bc,zt as bd,Ri as be,Lr as bf,WPe as c,dle as d,Zle as e,DF as f,XPe as g,GPe as h,qPe as i,jF as j,ZPe as k,gs as l,JPe as m,kue as n,Xn as o,PE as p,ms as q,Gle as r,$F as s,wr as t,OE as u,Wb as v,Sl as w,dx as x,zn as y,Eue as z};