mirror of
https://github.com/GlueOps/autoglue.git
synced 2026-02-13 12:50:05 +01:00
4168 lines
1.8 MiB
4168 lines
1.8 MiB
import{r as R,R as Je,a as B3,b as U3,c as hY,d as R_,e as mC,u as T_,L as OR,N as LE,O as K3,f as pY,g as Um,h as fY,i as mY,j as ps,B as gY}from"./react-B7S5QDrv.js";(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))o(d);new MutationObserver(d=>{for(const p of d)if(p.type==="childList")for(const m of p.addedNodes)m.tagName==="LINK"&&m.rel==="modulepreload"&&o(m)}).observe(document,{childList:!0,subtree:!0});function s(d){const p={};return d.integrity&&(p.integrity=d.integrity),d.referrerPolicy&&(p.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?p.credentials="include":d.crossOrigin==="anonymous"?p.credentials="omit":p.credentials="same-origin",p}function o(d){if(d.ep)return;d.ep=!0;const p=s(d);fetch(d.href,p)}})();var kR={exports:{}},tb={};var pM;function yY(){if(pM)return tb;pM=1;var e=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function s(o,d,p){var m=null;if(p!==void 0&&(m=""+p),d.key!==void 0&&(m=""+d.key),"key"in d){p={};for(var g in d)g!=="key"&&(p[g]=d[g])}else p=d;return d=p.ref,{$$typeof:e,type:o,key:m,ref:d!==void 0?d:null,props:p}}return tb.Fragment=r,tb.jsx=s,tb.jsxs=s,tb}var fM;function vY(){return fM||(fM=1,kR.exports=yY()),kR.exports}var u=vY(),xY=(e,r,s,o,d,p,m,g)=>{let b=document.documentElement,S=["light","dark"];function E(T){(Array.isArray(e)?e:[e]).forEach(M=>{let I=M==="class",q=I&&p?d.map(G=>p[G]||G):d;I?(b.classList.remove(...q),b.classList.add(p&&p[T]?p[T]:T)):b.setAttribute(M,T)}),A(T)}function A(T){g&&S.includes(T)&&(b.style.colorScheme=T)}function k(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(o)E(o);else try{let T=localStorage.getItem(r)||s,M=m&&T==="system"?k():T;E(M)}catch{}},mM=["light","dark"],V3="(prefers-color-scheme: dark)",bY=typeof window>"u",__=R.createContext(void 0),wY={setTheme:e=>{},themes:[]},$_=()=>{var e;return(e=R.useContext(__))!=null?e:wY},SY=e=>R.useContext(__)?R.createElement(R.Fragment,null,e.children):R.createElement(jY,{...e}),EY=["light","dark"],jY=({forcedTheme:e,disableTransitionOnChange:r=!1,enableSystem:s=!0,enableColorScheme:o=!0,storageKey:d="theme",themes:p=EY,defaultTheme:m=s?"system":"light",attribute:g="data-theme",value:b,children:S,nonce:E,scriptProps:A})=>{let[k,T]=R.useState(()=>AY(d,m)),[M,I]=R.useState(()=>k==="system"?RR():k),q=b?Object.values(b):p,G=R.useCallback(ee=>{let oe=ee;if(!oe)return;ee==="system"&&s&&(oe=RR());let Q=b?b[oe]:oe,ne=r?OY(E):null,de=document.documentElement,Ce=xe=>{xe==="class"?(de.classList.remove(...q),Q&&de.classList.add(Q)):xe.startsWith("data-")&&(Q?de.setAttribute(xe,Q):de.removeAttribute(xe))};if(Array.isArray(g)?g.forEach(Ce):Ce(g),o){let xe=mM.includes(m)?m:null,le=mM.includes(oe)?oe:xe;de.style.colorScheme=le}ne?.()},[E]),K=R.useCallback(ee=>{let oe=typeof ee=="function"?ee(k):ee;T(oe);try{localStorage.setItem(d,oe)}catch{}},[k]),X=R.useCallback(ee=>{let oe=RR(ee);I(oe),k==="system"&&s&&!e&&G("system")},[k,e]);R.useEffect(()=>{let ee=window.matchMedia(V3);return ee.addListener(X),X(ee),()=>ee.removeListener(X)},[X]),R.useEffect(()=>{let ee=oe=>{oe.key===d&&(oe.newValue?T(oe.newValue):K(m))};return window.addEventListener("storage",ee),()=>window.removeEventListener("storage",ee)},[K]),R.useEffect(()=>{G(e??k)},[e,k]);let z=R.useMemo(()=>({theme:k,setTheme:K,forcedTheme:e,resolvedTheme:k==="system"?M:k,themes:s?[...p,"system"]:p,systemTheme:s?M:void 0}),[k,K,e,M,s,p]);return R.createElement(__.Provider,{value:z},R.createElement(CY,{forcedTheme:e,storageKey:d,attribute:g,enableSystem:s,enableColorScheme:o,defaultTheme:m,value:b,themes:p,nonce:E,scriptProps:A}),S)},CY=R.memo(({forcedTheme:e,storageKey:r,attribute:s,enableSystem:o,enableColorScheme:d,defaultTheme:p,value:m,themes:g,nonce:b,scriptProps:S})=>{let E=JSON.stringify([s,r,p,e,g,m,o,d]).slice(1,-1);return R.createElement("script",{...S,suppressHydrationWarning:!0,nonce:typeof window>"u"?b:"",dangerouslySetInnerHTML:{__html:`(${xY.toString()})(${E})`}})}),AY=(e,r)=>{if(bY)return;let s;try{s=localStorage.getItem(e)||void 0}catch{}return s||r},OY=e=>{let r=document.createElement("style");return e&&r.setAttribute("nonce",e),r.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(r),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(r)},1)}},RR=e=>(e||(e=window.matchMedia(V3)),e.matches?"dark":"light");function kY({children:e,defaultTheme:r="system",storageKey:s="vite-ui-theme"}){return u.jsx(SY,{attribute:"class",defaultTheme:r,enableSystem:!0,storageKey:s,disableTransitionOnChange:!0,children:e})}var jg=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(){}},RY={setTimeout:(e,r)=>setTimeout(e,r),clearTimeout:e=>clearTimeout(e),setInterval:(e,r)=>setInterval(e,r),clearInterval:e=>clearInterval(e)},TY=class{#e=RY;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,r){return this.#e.setTimeout(e,r)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,r){return this.#e.setInterval(e,r)}clearInterval(e){this.#e.clearInterval(e)}},vp=new TY;function _Y(e){setTimeout(e,0)}var Cp=typeof window>"u"||"Deno"in globalThis;function Pi(){}function $Y(e,r){return typeof e=="function"?e(r):e}function ST(e){return typeof e=="number"&&e>=0&&e!==1/0}function H3(e,r){return Math.max(e+(r||0)-Date.now(),0)}function zd(e,r){return typeof e=="function"?e(r):e}function ro(e,r){return typeof e=="function"?e(r):e}function gM(e,r){const{type:s="all",exact:o,fetchStatus:d,predicate:p,queryKey:m,stale:g}=e;if(m){if(o){if(r.queryHash!==N_(m,r.options))return!1}else if(!Ib(r.queryKey,m))return!1}if(s!=="all"){const b=r.isActive();if(s==="active"&&!b||s==="inactive"&&b)return!1}return!(typeof g=="boolean"&&r.isStale()!==g||d&&d!==r.state.fetchStatus||p&&!p(r))}function yM(e,r){const{exact:s,status:o,predicate:d,mutationKey:p}=e;if(p){if(!r.options.mutationKey)return!1;if(s){if(Ap(r.options.mutationKey)!==Ap(p))return!1}else if(!Ib(r.options.mutationKey,p))return!1}return!(o&&r.state.status!==o||d&&!d(r))}function N_(e,r){return(r?.queryKeyHashFn||Ap)(e)}function Ap(e){return JSON.stringify(e,(r,s)=>ET(s)?Object.keys(s).sort().reduce((o,d)=>(o[d]=s[d],o),{}):s)}function Ib(e,r){return e===r?!0:typeof e!=typeof r?!1:e&&r&&typeof e=="object"&&typeof r=="object"?Object.keys(r).every(s=>Ib(e[s],r[s])):!1}var NY=Object.prototype.hasOwnProperty;function G3(e,r){if(e===r)return e;const s=vM(e)&&vM(r);if(!s&&!(ET(e)&&ET(r)))return r;const d=(s?e:Object.keys(e)).length,p=s?r:Object.keys(r),m=p.length,g=s?new Array(m):{};let b=0;for(let S=0;S<m;S++){const E=s?S:p[S],A=e[E],k=r[E];if(A===k){g[E]=A,(s?S<d:NY.call(e,E))&&b++;continue}if(A===null||k===null||typeof A!="object"||typeof k!="object"){g[E]=k;continue}const T=G3(A,k);g[E]=T,T===A&&b++}return d===m&&b===d?e:g}function kj(e,r){if(!r||Object.keys(e).length!==Object.keys(r).length)return!1;for(const s in e)if(e[s]!==r[s])return!1;return!0}function vM(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ET(e){if(!xM(e))return!1;const r=e.constructor;if(r===void 0)return!0;const s=r.prototype;return!(!xM(s)||!s.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function xM(e){return Object.prototype.toString.call(e)==="[object Object]"}function DY(e){return new Promise(r=>{vp.setTimeout(r,e)})}function jT(e,r,s){return typeof s.structuralSharing=="function"?s.structuralSharing(e,r):s.structuralSharing!==!1?G3(e,r):r}function PY(e,r,s=0){const o=[...e,r];return s&&o.length>s?o.slice(1):o}function MY(e,r,s=0){const o=[r,...e];return s&&o.length>s?o.slice(0,-1):o}var D_=Symbol();function X3(e,r){return!e.queryFn&&r?.initialPromise?()=>r.initialPromise:!e.queryFn||e.queryFn===D_?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Y3(e,r){return typeof e=="function"?e(...r):!!e}var IY=class extends jg{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!Cp&&window.addEventListener){const r=()=>e();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}}}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(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(r=>{r(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},P_=new IY;function CT(){let e,r;const s=new Promise((d,p)=>{e=d,r=p});s.status="pending",s.catch(()=>{});function o(d){Object.assign(s,d),delete s.resolve,delete s.reject}return s.resolve=d=>{o({status:"fulfilled",value:d}),e(d)},s.reject=d=>{o({status:"rejected",reason:d}),r(d)},s}var zY=_Y;function LY(){let e=[],r=0,s=g=>{g()},o=g=>{g()},d=zY;const p=g=>{r?e.push(g):d(()=>{s(g)})},m=()=>{const g=e;e=[],g.length&&d(()=>{o(()=>{g.forEach(b=>{s(b)})})})};return{batch:g=>{let b;r++;try{b=g()}finally{r--,r||m()}return b},batchCalls:g=>(...b)=>{p(()=>{g(...b)})},schedule:p,setNotifyFunction:g=>{s=g},setBatchNotifyFunction:g=>{o=g},setScheduler:g=>{d=g}}}var Cs=LY(),FY=class extends jg{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!Cp&&window.addEventListener){const r=()=>e(!0),s=()=>e(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",s)}}}}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(s=>{s(e)}))}isOnline(){return this.#e}},Rj=new FY;function qY(e){return Math.min(1e3*2**e,3e4)}function Z3(e){return(e??"online")==="online"?Rj.isOnline():!0}var AT=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function W3(e){let r=!1,s=0,o;const d=CT(),p=()=>d.status!=="pending",m=I=>{if(!p()){const q=new AT(I);k(q),e.onCancel?.(q)}},g=()=>{r=!0},b=()=>{r=!1},S=()=>P_.isFocused()&&(e.networkMode==="always"||Rj.isOnline())&&e.canRun(),E=()=>Z3(e.networkMode)&&e.canRun(),A=I=>{p()||(o?.(),d.resolve(I))},k=I=>{p()||(o?.(),d.reject(I))},T=()=>new Promise(I=>{o=q=>{(p()||S())&&I(q)},e.onPause?.()}).then(()=>{o=void 0,p()||e.onContinue?.()}),M=()=>{if(p())return;let I;const q=s===0?e.initialPromise:void 0;try{I=q??e.fn()}catch(G){I=Promise.reject(G)}Promise.resolve(I).then(A).catch(G=>{if(p())return;const K=e.retry??(Cp?0:3),X=e.retryDelay??qY,z=typeof X=="function"?X(s,G):X,ee=K===!0||typeof K=="number"&&s<K||typeof K=="function"&&K(s,G);if(r||!ee){k(G);return}s++,e.onFail?.(s,G),DY(z).then(()=>S()?void 0:T()).then(()=>{r?k(G):M()})})};return{promise:d,status:()=>d.status,cancel:m,continue:()=>(o?.(),d),cancelRetry:g,continueRetry:b,canStart:E,start:()=>(E()?M():T().then(M),d)}}var J3=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ST(this.gcTime)&&(this.#e=vp.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Cp?1/0:300*1e3))}clearGcTimeout(){this.#e&&(vp.clearTimeout(this.#e),this.#e=void 0)}},BY=class extends J3{#e;#t;#n;#s;#r;#a;#o;constructor(e){super(),this.#o=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#s=e.client,this.#n=this.#s.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=wM(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 r=wM(this.options);r.data!==void 0&&(this.setState(bM(r.data,r.dataUpdatedAt)),this.#e=r)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,r){const s=jT(this.state.data,e,this.options);return this.#i({data:s,type:"success",dataUpdatedAt:r?.updatedAt,manual:r?.manual}),s}setState(e,r){this.#i({type:"setState",state:e,setStateOptions:r})}cancel(e){const r=this.#r?.promise;return this.#r?.cancel(e),r?r.then(Pi).catch(Pi):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>ro(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===D_||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>zd(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:!H3(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(r=>r.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(r=>r.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(r=>r!==e),this.observers.length||(this.#r&&(this.#o?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.#i({type:"invalidate"})}async fetch(e,r){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&r?.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 g=this.observers.find(b=>b.options.queryFn);g&&this.setOptions(g.options)}const s=new AbortController,o=g=>{Object.defineProperty(g,"signal",{enumerable:!0,get:()=>(this.#o=!0,s.signal)})},d=()=>{const g=X3(this.options,r),S=(()=>{const E={client:this.#s,queryKey:this.queryKey,meta:this.meta};return o(E),E})();return this.#o=!1,this.options.persister?this.options.persister(g,S,this):g(S)},m=(()=>{const g={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:this.#s,state:this.state,fetchFn:d};return o(g),g})();this.options.behavior?.onFetch(m,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==m.fetchOptions?.meta)&&this.#i({type:"fetch",meta:m.fetchOptions?.meta}),this.#r=W3({initialPromise:r?.initialPromise,fn:m.fetchFn,onCancel:g=>{g instanceof AT&&g.revert&&this.setState({...this.#t,fetchStatus:"idle"}),s.abort()},onFail:(g,b)=>{this.#i({type:"failed",failureCount:g,error:b})},onPause:()=>{this.#i({type:"pause"})},onContinue:()=>{this.#i({type:"continue"})},retry:m.options.retry,retryDelay:m.options.retryDelay,networkMode:m.options.networkMode,canRun:()=>!0});try{const g=await this.#r.start();if(g===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(g),this.#n.config.onSuccess?.(g,this),this.#n.config.onSettled?.(g,this.state.error,this),g}catch(g){if(g instanceof AT){if(g.silent)return this.#r.promise;if(g.revert){if(this.state.data===void 0)throw g;return this.state.data}}throw this.#i({type:"error",error:g}),this.#n.config.onError?.(g,this),this.#n.config.onSettled?.(this.state.data,g,this),g}finally{this.scheduleGc()}}#i(e){const r=s=>{switch(e.type){case"failed":return{...s,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...Q3(s.data,this.options),fetchMeta:e.meta??null};case"success":const o={...s,...bM(e.data,e.dataUpdatedAt),dataUpdateCount:s.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?o:void 0,o;case"error":const d=e.error;return{...s,error:d,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:d,fetchStatus:"idle",status:"error"};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...e.state}}};this.state=r(this.state),Cs.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function Q3(e,r){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Z3(r.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function bM(e,r){return{data:e,dataUpdatedAt:r??Date.now(),error:null,isInvalidated:!1,status:"success"}}function wM(e){const r=typeof e.initialData=="function"?e.initialData():e.initialData,s=r!==void 0,o=s?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:r,dataUpdateCount:0,dataUpdatedAt:s?o??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var UY=class extends jg{constructor(e,r){super(),this.options=r,this.#e=e,this.#i=null,this.#o=CT(),this.bindMethods(),this.setOptions(r)}#e;#t=void 0;#n=void 0;#s=void 0;#r;#a;#o;#i;#m;#h;#p;#c;#u;#l;#f=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),SM(this.#t,this.options)?this.#d():this.updateResult(),this.#x())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return OT(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return OT(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#w(),this.#t.removeObserver(this)}setOptions(e){const r=this.options,s=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 ro(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),r._defaulted&&!kj(this.options,r)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const o=this.hasListeners();o&&EM(this.#t,s,this.options,r)&&this.#d(),this.updateResult(),o&&(this.#t!==s||ro(this.options.enabled,this.#t)!==ro(r.enabled,this.#t)||zd(this.options.staleTime,this.#t)!==zd(r.staleTime,this.#t))&&this.#g();const d=this.#y();o&&(this.#t!==s||ro(this.options.enabled,this.#t)!==ro(r.enabled,this.#t)||d!==this.#l)&&this.#v(d)}getOptimisticResult(e){const r=this.#e.getQueryCache().build(this.#e,e),s=this.createResult(r,e);return VY(this,s)&&(this.#s=s,this.#a=this.options,this.#r=this.#t.state),s}getCurrentResult(){return this.#s}trackResult(e,r){return new Proxy(e,{get:(s,o)=>(this.trackProp(o),r?.(o),o==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#o.status==="pending"&&this.#o.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(s,o))})}trackProp(e){this.#f.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const r=this.#e.defaultQueryOptions(e),s=this.#e.getQueryCache().build(this.#e,r);return s.fetch().then(()=>this.createResult(s,r))}fetch(e){return this.#d({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#s))}#d(e){this.#S();let r=this.#t.fetch(this.options,e);return e?.throwOnError||(r=r.catch(Pi)),r}#g(){this.#b();const e=zd(this.options.staleTime,this.#t);if(Cp||this.#s.isStale||!ST(e))return;const s=H3(this.#s.dataUpdatedAt,e)+1;this.#c=vp.setTimeout(()=>{this.#s.isStale||this.updateResult()},s)}#y(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#w(),this.#l=e,!(Cp||ro(this.options.enabled,this.#t)===!1||!ST(this.#l)||this.#l===0)&&(this.#u=vp.setInterval(()=>{(this.options.refetchIntervalInBackground||P_.isFocused())&&this.#d()},this.#l))}#x(){this.#g(),this.#v(this.#y())}#b(){this.#c&&(vp.clearTimeout(this.#c),this.#c=void 0)}#w(){this.#u&&(vp.clearInterval(this.#u),this.#u=void 0)}createResult(e,r){const s=this.#t,o=this.options,d=this.#s,p=this.#r,m=this.#a,b=e!==s?e.state:this.#n,{state:S}=e;let E={...S},A=!1,k;if(r._optimisticResults){const ne=this.hasListeners(),de=!ne&&SM(e,r),Ce=ne&&EM(e,s,r,o);(de||Ce)&&(E={...E,...Q3(S.data,e.options)}),r._optimisticResults==="isRestoring"&&(E.fetchStatus="idle")}let{error:T,errorUpdatedAt:M,status:I}=E;k=E.data;let q=!1;if(r.placeholderData!==void 0&&k===void 0&&I==="pending"){let ne;d?.isPlaceholderData&&r.placeholderData===m?.placeholderData?(ne=d.data,q=!0):ne=typeof r.placeholderData=="function"?r.placeholderData(this.#p?.state.data,this.#p):r.placeholderData,ne!==void 0&&(I="success",k=jT(d?.data,ne,r),A=!0)}if(r.select&&k!==void 0&&!q)if(d&&k===p?.data&&r.select===this.#m)k=this.#h;else try{this.#m=r.select,k=r.select(k),k=jT(d?.data,k,r),this.#h=k,this.#i=null}catch(ne){this.#i=ne}this.#i&&(T=this.#i,k=this.#h,M=Date.now(),I="error");const G=E.fetchStatus==="fetching",K=I==="pending",X=I==="error",z=K&&G,ee=k!==void 0,Q={status:I,fetchStatus:E.fetchStatus,isPending:K,isSuccess:I==="success",isError:X,isInitialLoading:z,isLoading:z,data:k,dataUpdatedAt:E.dataUpdatedAt,error:T,errorUpdatedAt:M,failureCount:E.fetchFailureCount,failureReason:E.fetchFailureReason,errorUpdateCount:E.errorUpdateCount,isFetched:E.dataUpdateCount>0||E.errorUpdateCount>0,isFetchedAfterMount:E.dataUpdateCount>b.dataUpdateCount||E.errorUpdateCount>b.errorUpdateCount,isFetching:G,isRefetching:G&&!K,isLoadingError:X&&!ee,isPaused:E.fetchStatus==="paused",isPlaceholderData:A,isRefetchError:X&&ee,isStale:M_(e,r),refetch:this.refetch,promise:this.#o,isEnabled:ro(r.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const ne=xe=>{Q.status==="error"?xe.reject(Q.error):Q.data!==void 0&&xe.resolve(Q.data)},de=()=>{const xe=this.#o=Q.promise=CT();ne(xe)},Ce=this.#o;switch(Ce.status){case"pending":e.queryHash===s.queryHash&&ne(Ce);break;case"fulfilled":(Q.status==="error"||Q.data!==Ce.value)&&de();break;case"rejected":(Q.status!=="error"||Q.error!==Ce.reason)&&de();break}}return Q}updateResult(){const e=this.#s,r=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),kj(r,e))return;this.#s=r;const s=()=>{if(!e)return!0;const{notifyOnChangeProps:o}=this.options,d=typeof o=="function"?o():o;if(d==="all"||!d&&!this.#f.size)return!0;const p=new Set(d??this.#f);return this.options.throwOnError&&p.add("error"),Object.keys(this.#s).some(m=>{const g=m;return this.#s[g]!==e[g]&&p.has(g)})};this.#E({listeners:s()})}#S(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const r=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(r?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#x()}#E(e){Cs.batch(()=>{e.listeners&&this.listeners.forEach(r=>{r(this.#s)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function KY(e,r){return ro(r.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&r.retryOnMount===!1)}function SM(e,r){return KY(e,r)||e.state.data!==void 0&&OT(e,r,r.refetchOnMount)}function OT(e,r,s){if(ro(r.enabled,e)!==!1&&zd(r.staleTime,e)!=="static"){const o=typeof s=="function"?s(e):s;return o==="always"||o!==!1&&M_(e,r)}return!1}function EM(e,r,s,o){return(e!==r||ro(o.enabled,e)===!1)&&(!s.suspense||e.state.status!=="error")&&M_(e,s)}function M_(e,r){return ro(r.enabled,e)!==!1&&e.isStaleByTime(zd(r.staleTime,e))}function VY(e,r){return!kj(e.getCurrentResult(),r)}function jM(e){return{onFetch:(r,s)=>{const o=r.options,d=r.fetchOptions?.meta?.fetchMore?.direction,p=r.state.data?.pages||[],m=r.state.data?.pageParams||[];let g={pages:[],pageParams:[]},b=0;const S=async()=>{let E=!1;const A=M=>{Object.defineProperty(M,"signal",{enumerable:!0,get:()=>(r.signal.aborted?E=!0:r.signal.addEventListener("abort",()=>{E=!0}),r.signal)})},k=X3(r.options,r.fetchOptions),T=async(M,I,q)=>{if(E)return Promise.reject();if(I==null&&M.pages.length)return Promise.resolve(M);const K=(()=>{const oe={client:r.client,queryKey:r.queryKey,pageParam:I,direction:q?"backward":"forward",meta:r.options.meta};return A(oe),oe})(),X=await k(K),{maxPages:z}=r.options,ee=q?MY:PY;return{pages:ee(M.pages,X,z),pageParams:ee(M.pageParams,I,z)}};if(d&&p.length){const M=d==="backward",I=M?HY:CM,q={pages:p,pageParams:m},G=I(o,q);g=await T(q,G,M)}else{const M=e??p.length;do{const I=b===0?m[0]??o.initialPageParam:CM(o,g);if(b>0&&I==null)break;g=await T(g,I),b++}while(b<M)}return g};r.options.persister?r.fetchFn=()=>r.options.persister?.(S,{client:r.client,queryKey:r.queryKey,meta:r.options.meta,signal:r.signal},s):r.fetchFn=S}}}function CM(e,{pages:r,pageParams:s}){const o=r.length-1;return r.length>0?e.getNextPageParam(r[o],r,s[o],s):void 0}function HY(e,{pages:r,pageParams:s}){return r.length>0?e.getPreviousPageParam?.(r[0],r,s[0],s):void 0}var GY=class extends J3{#e;#t;#n;#s;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||ez(),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(r=>r!==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.#s?.continue()??this.execute(this.state.variables)}async execute(e){const r=()=>{this.#r({type:"continue"})},s={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#s=W3({fn:()=>this.options.mutationFn?this.options.mutationFn(e,s):Promise.reject(new Error("No mutationFn found")),onFail:(p,m)=>{this.#r({type:"failed",failureCount:p,error:m})},onPause:()=>{this.#r({type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const o=this.state.status==="pending",d=!this.#s.canStart();try{if(o)r();else{this.#r({type:"pending",variables:e,isPaused:d}),await this.#n.config.onMutate?.(e,this,s);const m=await this.options.onMutate?.(e,s);m!==this.state.context&&this.#r({type:"pending",context:m,variables:e,isPaused:d})}const p=await this.#s.start();return await this.#n.config.onSuccess?.(p,e,this.state.context,this,s),await this.options.onSuccess?.(p,e,this.state.context,s),await this.#n.config.onSettled?.(p,null,this.state.variables,this.state.context,this,s),await this.options.onSettled?.(p,null,e,this.state.context,s),this.#r({type:"success",data:p}),p}catch(p){try{throw await this.#n.config.onError?.(p,e,this.state.context,this,s),await this.options.onError?.(p,e,this.state.context,s),await this.#n.config.onSettled?.(void 0,p,this.state.variables,this.state.context,this,s),await this.options.onSettled?.(void 0,p,e,this.state.context,s),p}finally{this.#r({type:"error",error:p})}}finally{this.#n.runNext(this)}}#r(e){const r=s=>{switch(e.type){case"failed":return{...s,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,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{...s,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:e.error,failureCount:s.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=r(this.state),Cs.batch(()=>{this.#t.forEach(s=>{s.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function ez(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var XY=class extends jg{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,r,s){const o=new GY({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(r),state:s});return this.add(o),o}add(e){this.#e.add(e);const r=FE(e);if(typeof r=="string"){const s=this.#t.get(r);s?s.push(e):this.#t.set(r,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const r=FE(e);if(typeof r=="string"){const s=this.#t.get(r);if(s)if(s.length>1){const o=s.indexOf(e);o!==-1&&s.splice(o,1)}else s[0]===e&&this.#t.delete(r)}}this.notify({type:"removed",mutation:e})}canRun(e){const r=FE(e);if(typeof r=="string"){const o=this.#t.get(r)?.find(d=>d.state.status==="pending");return!o||o===e}else return!0}runNext(e){const r=FE(e);return typeof r=="string"?this.#t.get(r)?.find(o=>o!==e&&o.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Cs.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 r={exact:!0,...e};return this.getAll().find(s=>yM(r,s))}findAll(e={}){return this.getAll().filter(r=>yM(e,r))}notify(e){Cs.batch(()=>{this.listeners.forEach(r=>{r(e)})})}resumePausedMutations(){const e=this.getAll().filter(r=>r.state.isPaused);return Cs.batch(()=>Promise.all(e.map(r=>r.continue().catch(Pi))))}};function FE(e){return e.options.scope?.id}var YY=class extends jg{#e;#t=void 0;#n;#s;constructor(r,s){super(),this.#e=r,this.setOptions(s),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(r){const s=this.options;this.options=this.#e.defaultMutationOptions(r),kj(this.options,s)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),s?.mutationKey&&this.options.mutationKey&&Ap(s.mutationKey)!==Ap(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(r){this.#r(),this.#a(r)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#r(),this.#a()}mutate(r,s){return this.#s=s,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(r)}#r(){const r=this.#n?.state??ez();this.#t={...r,isPending:r.status==="pending",isSuccess:r.status==="success",isError:r.status==="error",isIdle:r.status==="idle",mutate:this.mutate,reset:this.reset}}#a(r){Cs.batch(()=>{if(this.#s&&this.hasListeners()){const s=this.#t.variables,o=this.#t.context,d={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};r?.type==="success"?(this.#s.onSuccess?.(r.data,s,o,d),this.#s.onSettled?.(r.data,null,s,o,d)):r?.type==="error"&&(this.#s.onError?.(r.error,s,o,d),this.#s.onSettled?.(void 0,r.error,s,o,d))}this.listeners.forEach(s=>{s(this.#t)})})}},ZY=class extends jg{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,r,s){const o=r.queryKey,d=r.queryHash??N_(o,r);let p=this.get(d);return p||(p=new BY({client:e,queryKey:o,queryHash:d,options:e.defaultQueryOptions(r),state:s,defaultOptions:e.getQueryDefaults(o)}),this.add(p)),p}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const r=this.#e.get(e.queryHash);r&&(e.destroy(),r===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Cs.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const r={exact:!0,...e};return this.getAll().find(s=>gM(r,s))}findAll(e={}){const r=this.getAll();return Object.keys(e).length>0?r.filter(s=>gM(e,s)):r}notify(e){Cs.batch(()=>{this.listeners.forEach(r=>{r(e)})})}onFocus(){Cs.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Cs.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},WY=class{#e;#t;#n;#s;#r;#a;#o;#i;constructor(e={}){this.#e=e.queryCache||new ZY,this.#t=e.mutationCache||new XY,this.#n=e.defaultOptions||{},this.#s=new Map,this.#r=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=P_.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#i=Rj.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#i?.(),this.#i=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 r=this.defaultQueryOptions({queryKey:e});return this.#e.get(r.queryHash)?.state.data}ensureQueryData(e){const r=this.defaultQueryOptions(e),s=this.#e.build(this,r),o=s.state.data;return o===void 0?this.fetchQuery(e):(e.revalidateIfStale&&s.isStaleByTime(zd(r.staleTime,s))&&this.prefetchQuery(r),Promise.resolve(o))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:r,state:s})=>{const o=s.data;return[r,o]})}setQueryData(e,r,s){const o=this.defaultQueryOptions({queryKey:e}),p=this.#e.get(o.queryHash)?.state.data,m=$Y(r,p);if(m!==void 0)return this.#e.build(this,o).setData(m,{...s,manual:!0})}setQueriesData(e,r,s){return Cs.batch(()=>this.#e.findAll(e).map(({queryKey:o})=>[o,this.setQueryData(o,r,s)]))}getQueryState(e){const r=this.defaultQueryOptions({queryKey:e});return this.#e.get(r.queryHash)?.state}removeQueries(e){const r=this.#e;Cs.batch(()=>{r.findAll(e).forEach(s=>{r.remove(s)})})}resetQueries(e,r){const s=this.#e;return Cs.batch(()=>(s.findAll(e).forEach(o=>{o.reset()}),this.refetchQueries({type:"active",...e},r)))}cancelQueries(e,r={}){const s={revert:!0,...r},o=Cs.batch(()=>this.#e.findAll(e).map(d=>d.cancel(s)));return Promise.all(o).then(Pi).catch(Pi)}invalidateQueries(e,r={}){return Cs.batch(()=>(this.#e.findAll(e).forEach(s=>{s.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},r)))}refetchQueries(e,r={}){const s={...r,cancelRefetch:r.cancelRefetch??!0},o=Cs.batch(()=>this.#e.findAll(e).filter(d=>!d.isDisabled()&&!d.isStatic()).map(d=>{let p=d.fetch(void 0,s);return s.throwOnError||(p=p.catch(Pi)),d.state.fetchStatus==="paused"?Promise.resolve():p}));return Promise.all(o).then(Pi)}fetchQuery(e){const r=this.defaultQueryOptions(e);r.retry===void 0&&(r.retry=!1);const s=this.#e.build(this,r);return s.isStaleByTime(zd(r.staleTime,s))?s.fetch(r):Promise.resolve(s.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Pi).catch(Pi)}fetchInfiniteQuery(e){return e.behavior=jM(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Pi).catch(Pi)}ensureInfiniteQueryData(e){return e.behavior=jM(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Rj.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,r){this.#s.set(Ap(e),{queryKey:e,defaultOptions:r})}getQueryDefaults(e){const r=[...this.#s.values()],s={};return r.forEach(o=>{Ib(e,o.queryKey)&&Object.assign(s,o.defaultOptions)}),s}setMutationDefaults(e,r){this.#r.set(Ap(e),{mutationKey:e,defaultOptions:r})}getMutationDefaults(e){const r=[...this.#r.values()],s={};return r.forEach(o=>{Ib(e,o.mutationKey)&&Object.assign(s,o.defaultOptions)}),s}defaultQueryOptions(e){if(e._defaulted)return e;const r={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return r.queryHash||(r.queryHash=N_(r.queryKey,r)),r.refetchOnReconnect===void 0&&(r.refetchOnReconnect=r.networkMode!=="always"),r.throwOnError===void 0&&(r.throwOnError=!!r.suspense),!r.networkMode&&r.persister&&(r.networkMode="offlineFirst"),r.queryFn===D_&&(r.enabled=!1),r}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()}},tz=R.createContext(void 0),Hs=e=>{const r=R.useContext(tz);if(!r)throw new Error("No QueryClient set, use QueryClientProvider to set one");return r},JY=({client:e,children:r})=>(R.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),u.jsx(tz.Provider,{value:e,children:r})),nz=R.createContext(!1),QY=()=>R.useContext(nz);nz.Provider;function eZ(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var tZ=R.createContext(eZ()),nZ=()=>R.useContext(tZ),rZ=(e,r)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(r.isReset()||(e.retryOnMount=!1))},sZ=e=>{R.useEffect(()=>{e.clearReset()},[e])},iZ=({result:e,errorResetBoundary:r,throwOnError:s,query:o,suspense:d})=>e.isError&&!r.isReset()&&!e.isFetching&&o&&(d&&e.data===void 0||Y3(s,[e.error,o])),aZ=e=>{if(e.suspense){const s=d=>d==="static"?d:Math.max(d??1e3,1e3),o=e.staleTime;e.staleTime=typeof o=="function"?(...d)=>s(o(...d)):s(o),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},oZ=(e,r)=>e.isLoading&&e.isFetching&&!r,lZ=(e,r)=>e?.suspense&&r.isPending,AM=(e,r,s)=>r.fetchOptimistic(e).catch(()=>{s.clearReset()});function cZ(e,r,s){const o=QY(),d=nZ(),p=Hs(),m=p.defaultQueryOptions(e);p.getDefaultOptions().queries?._experimental_beforeQuery?.(m),m._optimisticResults=o?"isRestoring":"optimistic",aZ(m),rZ(m,d),sZ(d);const g=!p.getQueryCache().get(m.queryHash),[b]=R.useState(()=>new r(p,m)),S=b.getOptimisticResult(m),E=!o&&e.subscribed!==!1;if(R.useSyncExternalStore(R.useCallback(A=>{const k=E?b.subscribe(Cs.batchCalls(A)):Pi;return b.updateResult(),k},[b,E]),()=>b.getCurrentResult(),()=>b.getCurrentResult()),R.useEffect(()=>{b.setOptions(m)},[m,b]),lZ(m,S))throw AM(m,b,d);if(iZ({result:S,errorResetBoundary:d,throwOnError:m.throwOnError,query:p.getQueryCache().get(m.queryHash),suspense:m.suspense}))throw S.error;return p.getDefaultOptions().queries?._experimental_afterQuery?.(m,S),m.experimental_prefetchInRender&&!Cp&&oZ(S,o)&&(g?AM(m,b,d):p.getQueryCache().get(m.queryHash)?.promise)?.catch(Pi).finally(()=>{b.updateResult()}),m.notifyOnChangeProps?S:b.trackResult(S)}function rr(e,r){return cZ(e,UY)}function nn(e,r){const s=Hs(),[o]=R.useState(()=>new YY(s,e));R.useEffect(()=>{o.setOptions(e)},[o,e]);const d=R.useSyncExternalStore(R.useCallback(m=>o.subscribe(Cs.batchCalls(m)),[o]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),p=R.useCallback((m,g)=>{o.mutate(m,g).catch(Pi)},[o]);if(d.error&&Y3(o.options.throwOnError,[d.error]))throw d.error;return{...d,mutate:p,mutateAsync:d.mutate}}const uZ=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),dZ=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(r,s,o)=>o?o.toUpperCase():s.toLowerCase()),OM=e=>{const r=dZ(e);return r.charAt(0).toUpperCase()+r.slice(1)},rz=(...e)=>e.filter((r,s,o)=>!!r&&r.trim()!==""&&o.indexOf(r)===s).join(" ").trim(),hZ=e=>{for(const r in e)if(r.startsWith("aria-")||r==="role"||r==="title")return!0};var pZ={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 fZ=R.forwardRef(({color:e="currentColor",size:r=24,strokeWidth:s=2,absoluteStrokeWidth:o,className:d="",children:p,iconNode:m,...g},b)=>R.createElement("svg",{ref:b,...pZ,width:r,height:r,stroke:e,strokeWidth:o?Number(s)*24/Number(r):s,className:rz("lucide",d),...!p&&!hZ(g)&&{"aria-hidden":"true"},...g},[...m.map(([S,E])=>R.createElement(S,E)),...Array.isArray(p)?p:[p]]));const ln=(e,r)=>{const s=R.forwardRef(({className:o,...d},p)=>R.createElement(fZ,{ref:p,iconNode:r,className:rz(`lucide-${uZ(OM(e))}`,`lucide-${e}`,o),...d}));return s.displayName=OM(e),s};const mZ=[["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"}]],gZ=ln("boxes",mZ);const yZ=[["path",{d:"M10 12h4",key:"a56b0p"}],["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M14 21v-3a2 2 0 0 0-4 0v3",key:"1rgiei"}],["path",{d:"M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2",key:"secmi2"}],["path",{d:"M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16",key:"16ra0t"}]],sz=ln("building-2",yZ);const vZ=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],iz=ln("check",vZ);const xZ=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],az=ln("chevron-down",xZ);const bZ=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],wZ=ln("chevron-right",bZ);const SZ=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],EZ=ln("chevron-up",SZ);const jZ=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],CZ=ln("chevrons-up-down",jZ);const AZ=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],kM=ln("circle-alert",AZ);const OZ=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],I_=ln("circle-check",OZ);const kZ=[["path",{d:"M22 2 2 22",key:"y4kqgn"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],ew=ln("circle-slash-2",kZ);const RZ=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],TZ=ln("circle",RZ);const _Z=[["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"}]],$Z=ln("clipboard",_Z);const NZ=[["path",{d:"M15.536 11.293a1 1 0 0 0 0 1.414l2.376 2.377a1 1 0 0 0 1.414 0l2.377-2.377a1 1 0 0 0 0-1.414l-2.377-2.377a1 1 0 0 0-1.414 0z",key:"1uwlt4"}],["path",{d:"M2.297 11.293a1 1 0 0 0 0 1.414l2.377 2.377a1 1 0 0 0 1.414 0l2.377-2.377a1 1 0 0 0 0-1.414L6.088 8.916a1 1 0 0 0-1.414 0z",key:"10291m"}],["path",{d:"M8.916 17.912a1 1 0 0 0 0 1.415l2.377 2.376a1 1 0 0 0 1.414 0l2.377-2.376a1 1 0 0 0 0-1.415l-2.377-2.376a1 1 0 0 0-1.414 0z",key:"1tqoq1"}],["path",{d:"M8.916 4.674a1 1 0 0 0 0 1.414l2.377 2.376a1 1 0 0 0 1.414 0l2.377-2.376a1 1 0 0 0 0-1.414l-2.377-2.377a1 1 0 0 0-1.414 0z",key:"1x6lto"}]],DZ=ln("component",NZ);const PZ=[["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"}]],MZ=ln("download",PZ);const IZ=[["path",{d:"M21.54 15H17a2 2 0 0 0-2 2v4.54",key:"1djwo0"}],["path",{d:"M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17",key:"1tzkfa"}],["path",{d:"M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05",key:"14pb5j"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],zZ=ln("earth",IZ);const LZ=[["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"}]],z_=ln("ellipsis",LZ);const FZ=[["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"}]],qZ=ln("external-link",FZ);const BZ=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],kT=ln("eye",BZ);const UZ=[["path",{d:"M4 12.15V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3.35",key:"1wthlu"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m5 16-3 3 3 3",key:"331omg"}],["path",{d:"m9 22 3-3-3-3",key:"lsp7cz"}]],KZ=ln("file-code-corner",UZ);const VZ=[["path",{d:"M10.65 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v10.1",key:"1a2hbp"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m10 15 1 1",key:"1h4vmv"}],["path",{d:"m11 14-4.586 4.586",key:"maylof"}],["circle",{cx:"5",cy:"20",r:"2",key:"860zyv"}]],HZ=ln("file-key",VZ);const GZ=[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]],XZ=ln("git-commit-horizontal",GZ);const YZ=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],oz=ln("info",YZ);const ZZ=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]],WZ=ln("key-round",ZZ);const JZ=[["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"}]],qE=ln("link",JZ);const QZ=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Ds=ln("loader-circle",QZ);const eW=[["circle",{cx:"12",cy:"16",r:"1",key:"1au0dj"}],["rect",{x:"3",y:"10",width:"18",height:"12",rx:"2",key:"6s8ecr"}],["path",{d:"M7 10V7a5 5 0 0 1 10 0v3",key:"1pqi11"}]],tW=ln("lock-keyhole",eW);const nW=[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]],rW=ln("map-pin",nW);const sW=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],iW=ln("monitor",sW);const aW=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],oW=ln("moon",aW);const lW=[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]],cW=ln("network",lW);const uW=[["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],dW=ln("octagon-x",uW);const hW=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],pW=ln("panel-left",hW);const fW=[["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"}]],pu=ln("pencil",fW);const mW=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],lo=ln("plus",mW);const gW=[["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"}]],yW=ln("refresh-cw",gW);const vW=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Pa=ln("search",vW);const xW=[["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"}]],L_=ln("server",xW);const bW=[["path",{d:"M3 3h.01",key:"159qn6"}],["path",{d:"M7 5h.01",key:"1hq22a"}],["path",{d:"M11 7h.01",key:"1osv80"}],["path",{d:"M3 7h.01",key:"1xzrh3"}],["path",{d:"M7 9h.01",key:"19b3jx"}],["path",{d:"M3 11h.01",key:"1eifu7"}],["rect",{width:"4",height:"4",x:"15",y:"5",key:"mri9e4"}],["path",{d:"m19 9 2 2v10c0 .6-.4 1-1 1h-6c-.6 0-1-.4-1-1V11l2-2",key:"aib6hk"}],["path",{d:"m13 14 8-2",key:"1d7bmk"}],["path",{d:"m13 19 8-2",key:"1y2vml"}]],wW=ln("spray-can",bW);const SW=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],EW=ln("sun",SW);const jW=[["path",{d:"M13.172 2a2 2 0 0 1 1.414.586l6.71 6.71a2.4 2.4 0 0 1 0 3.408l-4.592 4.592a2.4 2.4 0 0 1-3.408 0l-6.71-6.71A2 2 0 0 1 6 9.172V3a1 1 0 0 1 1-1z",key:"16rjxf"}],["path",{d:"M2 7v6.172a2 2 0 0 0 .586 1.414l6.71 6.71a2.4 2.4 0 0 0 3.191.193",key:"178nd4"}],["circle",{cx:"10.5",cy:"6.5",r:".5",fill:"currentColor",key:"12ikhr"}]],gC=ln("tags",jW);const CW=[["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"}]],zb=ln("trash-2",CW);const AW=[["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"}]],Tj=ln("triangle-alert",AW);const OW=[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]],kW=ln("user-round",OW);const RW=[["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"}]],lz=ln("users",RW);const TW=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],_W=ln("wrench",TW);const $W=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],F_=ln("x",$W);function NW(e){if(typeof document>"u")return;let r=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css",r.appendChild(s),s.styleSheet?s.styleSheet.cssText=e:s.appendChild(document.createTextNode(e))}const DW=e=>{switch(e){case"success":return IW;case"info":return LW;case"warning":return zW;case"error":return FW;default:return null}},PW=Array(12).fill(0),MW=({visible:e,className:r})=>Je.createElement("div",{className:["sonner-loading-wrapper",r].filter(Boolean).join(" "),"data-visible":e},Je.createElement("div",{className:"sonner-spinner"},PW.map((s,o)=>Je.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${o}`})))),IW=Je.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},Je.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"})),zW=Je.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},Je.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"})),LW=Je.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},Je.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"})),FW=Je.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},Je.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"})),qW=Je.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"},Je.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),Je.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),BW=()=>{const[e,r]=Je.useState(document.hidden);return Je.useEffect(()=>{const s=()=>{r(document.hidden)};return document.addEventListener("visibilitychange",s),()=>window.removeEventListener("visibilitychange",s)},[]),e};let RT=1;class UW{constructor(){this.subscribe=r=>(this.subscribers.push(r),()=>{const s=this.subscribers.indexOf(r);this.subscribers.splice(s,1)}),this.publish=r=>{this.subscribers.forEach(s=>s(r))},this.addToast=r=>{this.publish(r),this.toasts=[...this.toasts,r]},this.create=r=>{var s;const{message:o,...d}=r,p=typeof r?.id=="number"||((s=r.id)==null?void 0:s.length)>0?r.id:RT++,m=this.toasts.find(b=>b.id===p),g=r.dismissible===void 0?!0:r.dismissible;return this.dismissedToasts.has(p)&&this.dismissedToasts.delete(p),m?this.toasts=this.toasts.map(b=>b.id===p?(this.publish({...b,...r,id:p,title:o}),{...b,...r,id:p,dismissible:g,title:o}):b):this.addToast({title:o,...d,dismissible:g,id:p}),p},this.dismiss=r=>(r?(this.dismissedToasts.add(r),requestAnimationFrame(()=>this.subscribers.forEach(s=>s({id:r,dismiss:!0})))):this.toasts.forEach(s=>{this.subscribers.forEach(o=>o({id:s.id,dismiss:!0}))}),r),this.message=(r,s)=>this.create({...s,message:r}),this.error=(r,s)=>this.create({...s,message:r,type:"error"}),this.success=(r,s)=>this.create({...s,type:"success",message:r}),this.info=(r,s)=>this.create({...s,type:"info",message:r}),this.warning=(r,s)=>this.create({...s,type:"warning",message:r}),this.loading=(r,s)=>this.create({...s,type:"loading",message:r}),this.promise=(r,s)=>{if(!s)return;let o;s.loading!==void 0&&(o=this.create({...s,promise:r,type:"loading",message:s.loading,description:typeof s.description!="function"?s.description:void 0}));const d=Promise.resolve(r instanceof Function?r():r);let p=o!==void 0,m;const g=d.then(async S=>{if(m=["resolve",S],Je.isValidElement(S))p=!1,this.create({id:o,type:"default",message:S});else if(VW(S)&&!S.ok){p=!1;const A=typeof s.error=="function"?await s.error(`HTTP error! status: ${S.status}`):s.error,k=typeof s.description=="function"?await s.description(`HTTP error! status: ${S.status}`):s.description,M=typeof A=="object"&&!Je.isValidElement(A)?A:{message:A};this.create({id:o,type:"error",description:k,...M})}else if(S instanceof Error){p=!1;const A=typeof s.error=="function"?await s.error(S):s.error,k=typeof s.description=="function"?await s.description(S):s.description,M=typeof A=="object"&&!Je.isValidElement(A)?A:{message:A};this.create({id:o,type:"error",description:k,...M})}else if(s.success!==void 0){p=!1;const A=typeof s.success=="function"?await s.success(S):s.success,k=typeof s.description=="function"?await s.description(S):s.description,M=typeof A=="object"&&!Je.isValidElement(A)?A:{message:A};this.create({id:o,type:"success",description:k,...M})}}).catch(async S=>{if(m=["reject",S],s.error!==void 0){p=!1;const E=typeof s.error=="function"?await s.error(S):s.error,A=typeof s.description=="function"?await s.description(S):s.description,T=typeof E=="object"&&!Je.isValidElement(E)?E:{message:E};this.create({id:o,type:"error",description:A,...T})}}).finally(()=>{p&&(this.dismiss(o),o=void 0),s.finally==null||s.finally.call(s)}),b=()=>new Promise((S,E)=>g.then(()=>m[0]==="reject"?E(m[1]):S(m[1])).catch(E));return typeof o!="string"&&typeof o!="number"?{unwrap:b}:Object.assign(o,{unwrap:b})},this.custom=(r,s)=>{const o=s?.id||RT++;return this.create({jsx:r(o),id:o,...s}),o},this.getActiveToasts=()=>this.toasts.filter(r=>!this.dismissedToasts.has(r.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const ca=new UW,KW=(e,r)=>{const s=r?.id||RT++;return ca.addToast({title:e,...r,id:s}),s},VW=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",HW=KW,GW=()=>ca.toasts,XW=()=>ca.getActiveToasts(),Ze=Object.assign(HW,{success:ca.success,info:ca.info,warning:ca.warning,error:ca.error,custom:ca.custom,message:ca.message,promise:ca.promise,dismiss:ca.dismiss,loading:ca.loading},{getHistory:GW,getToasts:XW});NW("[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 BE(e){return e.label!==void 0}const YW=3,ZW="24px",WW="16px",RM=4e3,JW=356,QW=14,eJ=45,tJ=200;function Wl(...e){return e.filter(Boolean).join(" ")}function nJ(e){const[r,s]=e.split("-"),o=[];return r&&o.push(r),s&&o.push(s),o}const rJ=e=>{var r,s,o,d,p,m,g,b,S;const{invert:E,toast:A,unstyled:k,interacting:T,setHeights:M,visibleToasts:I,heights:q,index:G,toasts:K,expanded:X,removeToast:z,defaultRichColors:ee,closeButton:oe,style:Q,cancelButtonStyle:ne,actionButtonStyle:de,className:Ce="",descriptionClassName:xe="",duration:le,position:be,gap:je,expandByDefault:Ke,classNames:ce,icons:re,closeButtonAriaLabel:ue="Close toast"}=e,[_e,fe]=Je.useState(null),[He,Oe]=Je.useState(null),[ke,Ve]=Je.useState(!1),[ie,Ne]=Je.useState(!1),[ze,tt]=Je.useState(!1),[ft,Ot]=Je.useState(!1),[Ft,kt]=Je.useState(!1),[Jt,Le]=Je.useState(0),[Lt,Rt]=Je.useState(0),V=Je.useRef(A.duration||le||RM),Nn=Je.useRef(null),cn=Je.useRef(null),ve=G===0,De=G+1<=I,Ge=A.type,D=A.dismissible!==!1,L=A.className||"",H=A.descriptionClassName||"",W=Je.useMemo(()=>q.findIndex(zt=>zt.toastId===A.id)||0,[q,A.id]),we=Je.useMemo(()=>{var zt;return(zt=A.closeButton)!=null?zt:oe},[A.closeButton,oe]),Re=Je.useMemo(()=>A.duration||le||RM,[A.duration,le]),st=Je.useRef(0),Kt=Je.useRef(0),Qt=Je.useRef(0),Fn=Je.useRef(null),[dn,Ht]=be.split("-"),wi=Je.useMemo(()=>q.reduce((zt,vr,Yr)=>Yr>=W?zt:zt+vr.height,0),[q,W]),Xr=BW(),fa=A.invert||E,ho=Ge==="loading";Kt.current=Je.useMemo(()=>W*je+wi,[W,wi]),Je.useEffect(()=>{V.current=Re},[Re]),Je.useEffect(()=>{Ve(!0)},[]),Je.useEffect(()=>{const zt=cn.current;if(zt){const vr=zt.getBoundingClientRect().height;return Rt(vr),M(Yr=>[{toastId:A.id,height:vr,position:A.position},...Yr]),()=>M(Yr=>Yr.filter(Os=>Os.toastId!==A.id))}},[M,A.id]),Je.useLayoutEffect(()=>{if(!ke)return;const zt=cn.current,vr=zt.style.height;zt.style.height="auto";const Yr=zt.getBoundingClientRect().height;zt.style.height=vr,Rt(Yr),M(Os=>Os.find(Er=>Er.toastId===A.id)?Os.map(Er=>Er.toastId===A.id?{...Er,height:Yr}:Er):[{toastId:A.id,height:Yr,position:A.position},...Os])},[ke,A.title,A.description,M,A.id,A.jsx,A.action,A.cancel]);const Ma=Je.useCallback(()=>{Ne(!0),Le(Kt.current),M(zt=>zt.filter(vr=>vr.toastId!==A.id)),setTimeout(()=>{z(A)},tJ)},[A,z,M,Kt]);Je.useEffect(()=>{if(A.promise&&Ge==="loading"||A.duration===1/0||A.type==="loading")return;let zt;return X||T||Xr?(()=>{if(Qt.current<st.current){const Os=new Date().getTime()-st.current;V.current=V.current-Os}Qt.current=new Date().getTime()})():(()=>{V.current!==1/0&&(st.current=new Date().getTime(),zt=setTimeout(()=>{A.onAutoClose==null||A.onAutoClose.call(A,A),Ma()},V.current))})(),()=>clearTimeout(zt)},[X,T,A,Ge,Xr,Ma]),Je.useEffect(()=>{A.delete&&(Ma(),A.onDismiss==null||A.onDismiss.call(A,A))},[Ma,A.delete]);function cc(){var zt;if(re?.loading){var vr;return Je.createElement("div",{className:Wl(ce?.loader,A==null||(vr=A.classNames)==null?void 0:vr.loader,"sonner-loader"),"data-visible":Ge==="loading"},re.loading)}return Je.createElement(MW,{className:Wl(ce?.loader,A==null||(zt=A.classNames)==null?void 0:zt.loader),visible:Ge==="loading"})}const xu=A.icon||re?.[Ge]||DW(Ge);var uc,ma;return Je.createElement("li",{tabIndex:0,ref:cn,className:Wl(Ce,L,ce?.toast,A==null||(r=A.classNames)==null?void 0:r.toast,ce?.default,ce?.[Ge],A==null||(s=A.classNames)==null?void 0:s[Ge]),"data-sonner-toast":"","data-rich-colors":(uc=A.richColors)!=null?uc:ee,"data-styled":!(A.jsx||A.unstyled||k),"data-mounted":ke,"data-promise":!!A.promise,"data-swiped":Ft,"data-removed":ie,"data-visible":De,"data-y-position":dn,"data-x-position":Ht,"data-index":G,"data-front":ve,"data-swiping":ze,"data-dismissible":D,"data-type":Ge,"data-invert":fa,"data-swipe-out":ft,"data-swipe-direction":He,"data-expanded":!!(X||Ke&&ke),"data-testid":A.testId,style:{"--index":G,"--toasts-before":G,"--z-index":K.length-G,"--offset":`${ie?Jt:Kt.current}px`,"--initial-height":Ke?"auto":`${Lt}px`,...Q,...A.style},onDragEnd:()=>{tt(!1),fe(null),Fn.current=null},onPointerDown:zt=>{zt.button!==2&&(ho||!D||(Nn.current=new Date,Le(Kt.current),zt.target.setPointerCapture(zt.pointerId),zt.target.tagName!=="BUTTON"&&(tt(!0),Fn.current={x:zt.clientX,y:zt.clientY})))},onPointerUp:()=>{var zt,vr,Yr;if(ft||!D)return;Fn.current=null;const Os=Number(((zt=cn.current)==null?void 0:zt.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Dn=Number(((vr=cn.current)==null?void 0:vr.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Er=new Date().getTime()-((Yr=Nn.current)==null?void 0:Yr.getTime()),Ys=_e==="x"?Os:Dn,ll=Math.abs(Ys)/Er;if(Math.abs(Ys)>=eJ||ll>.11){Le(Kt.current),A.onDismiss==null||A.onDismiss.call(A,A),Oe(_e==="x"?Os>0?"right":"left":Dn>0?"down":"up"),Ma(),Ot(!0);return}else{var ys,Zs;(ys=cn.current)==null||ys.style.setProperty("--swipe-amount-x","0px"),(Zs=cn.current)==null||Zs.style.setProperty("--swipe-amount-y","0px")}kt(!1),tt(!1),fe(null)},onPointerMove:zt=>{var vr,Yr,Os;if(!Fn.current||!D||((vr=window.getSelection())==null?void 0:vr.toString().length)>0)return;const Er=zt.clientY-Fn.current.y,Ys=zt.clientX-Fn.current.x;var ll;const ys=(ll=e.swipeDirections)!=null?ll:nJ(be);!_e&&(Math.abs(Ys)>1||Math.abs(Er)>1)&&fe(Math.abs(Ys)>Math.abs(Er)?"x":"y");let Zs={x:0,y:0};const bu=ga=>1/(1.5+Math.abs(ga)/20);if(_e==="y"){if(ys.includes("top")||ys.includes("bottom"))if(ys.includes("top")&&Er<0||ys.includes("bottom")&&Er>0)Zs.y=Er;else{const ga=Er*bu(Er);Zs.y=Math.abs(ga)<Math.abs(Er)?ga:Er}}else if(_e==="x"&&(ys.includes("left")||ys.includes("right")))if(ys.includes("left")&&Ys<0||ys.includes("right")&&Ys>0)Zs.x=Ys;else{const ga=Ys*bu(Ys);Zs.x=Math.abs(ga)<Math.abs(Ys)?ga:Ys}(Math.abs(Zs.x)>0||Math.abs(Zs.y)>0)&&kt(!0),(Yr=cn.current)==null||Yr.style.setProperty("--swipe-amount-x",`${Zs.x}px`),(Os=cn.current)==null||Os.style.setProperty("--swipe-amount-y",`${Zs.y}px`)}},we&&!A.jsx&&Ge!=="loading"?Je.createElement("button",{"aria-label":ue,"data-disabled":ho,"data-close-button":!0,onClick:ho||!D?()=>{}:()=>{Ma(),A.onDismiss==null||A.onDismiss.call(A,A)},className:Wl(ce?.closeButton,A==null||(o=A.classNames)==null?void 0:o.closeButton)},(ma=re?.close)!=null?ma:qW):null,(Ge||A.icon||A.promise)&&A.icon!==null&&(re?.[Ge]!==null||A.icon)?Je.createElement("div",{"data-icon":"",className:Wl(ce?.icon,A==null||(d=A.classNames)==null?void 0:d.icon)},A.promise||A.type==="loading"&&!A.icon?A.icon||cc():null,A.type!=="loading"?xu:null):null,Je.createElement("div",{"data-content":"",className:Wl(ce?.content,A==null||(p=A.classNames)==null?void 0:p.content)},Je.createElement("div",{"data-title":"",className:Wl(ce?.title,A==null||(m=A.classNames)==null?void 0:m.title)},A.jsx?A.jsx:typeof A.title=="function"?A.title():A.title),A.description?Je.createElement("div",{"data-description":"",className:Wl(xe,H,ce?.description,A==null||(g=A.classNames)==null?void 0:g.description)},typeof A.description=="function"?A.description():A.description):null),Je.isValidElement(A.cancel)?A.cancel:A.cancel&&BE(A.cancel)?Je.createElement("button",{"data-button":!0,"data-cancel":!0,style:A.cancelButtonStyle||ne,onClick:zt=>{BE(A.cancel)&&D&&(A.cancel.onClick==null||A.cancel.onClick.call(A.cancel,zt),Ma())},className:Wl(ce?.cancelButton,A==null||(b=A.classNames)==null?void 0:b.cancelButton)},A.cancel.label):null,Je.isValidElement(A.action)?A.action:A.action&&BE(A.action)?Je.createElement("button",{"data-button":!0,"data-action":!0,style:A.actionButtonStyle||de,onClick:zt=>{BE(A.action)&&(A.action.onClick==null||A.action.onClick.call(A.action,zt),!zt.defaultPrevented&&Ma())},className:Wl(ce?.actionButton,A==null||(S=A.classNames)==null?void 0:S.actionButton)},A.action.label):null)};function TM(){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 sJ(e,r){const s={};return[e,r].forEach((o,d)=>{const p=d===1,m=p?"--mobile-offset":"--offset",g=p?WW:ZW;function b(S){["top","right","bottom","left"].forEach(E=>{s[`${m}-${E}`]=typeof S=="number"?`${S}px`:S})}typeof o=="number"||typeof o=="string"?b(o):typeof o=="object"?["top","right","bottom","left"].forEach(S=>{o[S]===void 0?s[`${m}-${S}`]=g:s[`${m}-${S}`]=typeof o[S]=="number"?`${o[S]}px`:o[S]}):b(g)}),s}const iJ=Je.forwardRef(function(r,s){const{id:o,invert:d,position:p="bottom-right",hotkey:m=["altKey","KeyT"],expand:g,closeButton:b,className:S,offset:E,mobileOffset:A,theme:k="light",richColors:T,duration:M,style:I,visibleToasts:q=YW,toastOptions:G,dir:K=TM(),gap:X=QW,icons:z,containerAriaLabel:ee="Notifications"}=r,[oe,Q]=Je.useState([]),ne=Je.useMemo(()=>o?oe.filter(ke=>ke.toasterId===o):oe.filter(ke=>!ke.toasterId),[oe,o]),de=Je.useMemo(()=>Array.from(new Set([p].concat(ne.filter(ke=>ke.position).map(ke=>ke.position)))),[ne,p]),[Ce,xe]=Je.useState([]),[le,be]=Je.useState(!1),[je,Ke]=Je.useState(!1),[ce,re]=Je.useState(k!=="system"?k:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),ue=Je.useRef(null),_e=m.join("+").replace(/Key/g,"").replace(/Digit/g,""),fe=Je.useRef(null),He=Je.useRef(!1),Oe=Je.useCallback(ke=>{Q(Ve=>{var ie;return(ie=Ve.find(Ne=>Ne.id===ke.id))!=null&&ie.delete||ca.dismiss(ke.id),Ve.filter(({id:Ne})=>Ne!==ke.id)})},[]);return Je.useEffect(()=>ca.subscribe(ke=>{if(ke.dismiss){requestAnimationFrame(()=>{Q(Ve=>Ve.map(ie=>ie.id===ke.id?{...ie,delete:!0}:ie))});return}setTimeout(()=>{B3.flushSync(()=>{Q(Ve=>{const ie=Ve.findIndex(Ne=>Ne.id===ke.id);return ie!==-1?[...Ve.slice(0,ie),{...Ve[ie],...ke},...Ve.slice(ie+1)]:[ke,...Ve]})})})}),[oe]),Je.useEffect(()=>{if(k!=="system"){re(k);return}if(k==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?re("dark"):re("light")),typeof window>"u")return;const ke=window.matchMedia("(prefers-color-scheme: dark)");try{ke.addEventListener("change",({matches:Ve})=>{re(Ve?"dark":"light")})}catch{ke.addListener(({matches:ie})=>{try{re(ie?"dark":"light")}catch(Ne){console.error(Ne)}})}},[k]),Je.useEffect(()=>{oe.length<=1&&be(!1)},[oe]),Je.useEffect(()=>{const ke=Ve=>{var ie;if(m.every(tt=>Ve[tt]||Ve.code===tt)){var ze;be(!0),(ze=ue.current)==null||ze.focus()}Ve.code==="Escape"&&(document.activeElement===ue.current||(ie=ue.current)!=null&&ie.contains(document.activeElement))&&be(!1)};return document.addEventListener("keydown",ke),()=>document.removeEventListener("keydown",ke)},[m]),Je.useEffect(()=>{if(ue.current)return()=>{fe.current&&(fe.current.focus({preventScroll:!0}),fe.current=null,He.current=!1)}},[ue.current]),Je.createElement("section",{ref:s,"aria-label":`${ee} ${_e}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},de.map((ke,Ve)=>{var ie;const[Ne,ze]=ke.split("-");return ne.length?Je.createElement("ol",{key:ke,dir:K==="auto"?TM():K,tabIndex:-1,ref:ue,className:S,"data-sonner-toaster":!0,"data-sonner-theme":ce,"data-y-position":Ne,"data-x-position":ze,style:{"--front-toast-height":`${((ie=Ce[0])==null?void 0:ie.height)||0}px`,"--width":`${JW}px`,"--gap":`${X}px`,...I,...sJ(E,A)},onBlur:tt=>{He.current&&!tt.currentTarget.contains(tt.relatedTarget)&&(He.current=!1,fe.current&&(fe.current.focus({preventScroll:!0}),fe.current=null))},onFocus:tt=>{tt.target instanceof HTMLElement&&tt.target.dataset.dismissible==="false"||He.current||(He.current=!0,fe.current=tt.relatedTarget)},onMouseEnter:()=>be(!0),onMouseMove:()=>be(!0),onMouseLeave:()=>{je||be(!1)},onDragEnd:()=>be(!1),onPointerDown:tt=>{tt.target instanceof HTMLElement&&tt.target.dataset.dismissible==="false"||Ke(!0)},onPointerUp:()=>Ke(!1)},ne.filter(tt=>!tt.position&&Ve===0||tt.position===ke).map((tt,ft)=>{var Ot,Ft;return Je.createElement(rJ,{key:tt.id,icons:z,index:ft,toast:tt,defaultRichColors:T,duration:(Ot=G?.duration)!=null?Ot:M,className:G?.className,descriptionClassName:G?.descriptionClassName,invert:d,visibleToasts:q,closeButton:(Ft=G?.closeButton)!=null?Ft:b,interacting:je,position:ke,style:G?.style,unstyled:G?.unstyled,classNames:G?.classNames,cancelButtonStyle:G?.cancelButtonStyle,actionButtonStyle:G?.actionButtonStyle,closeButtonAriaLabel:G?.closeButtonAriaLabel,removeToast:Oe,toasts:ne.filter(kt=>kt.position==tt.position),heights:Ce.filter(kt=>kt.position==tt.position),setHeights:xe,expandByDefault:g,gap:X,expanded:le,swipeDirections:r.swipeDirections})})):null}))}),aJ=({...e})=>{const{theme:r="system"}=$_();return u.jsx(iJ,{theme:r,className:"toaster group",icons:{success:u.jsx(I_,{className:"size-4"}),info:u.jsx(oz,{className:"size-4"}),warning:u.jsx(Tj,{className:"size-4"}),error:u.jsx(dW,{className:"size-4"}),loading:u.jsx(Ds,{className:"size-4 animate-spin"})},style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)","--border-radius":"var(--radius)"},...e})},oJ=new WY,lJ=({children:e})=>u.jsx(JY,{client:oJ,children:u.jsxs(kY,{defaultTheme:"system",storageKey:"dragon-theme",children:[e,u.jsx(aJ,{richColors:!0,expand:!0,position:"top-center"})]})});var TR={exports:{}},nb={},_R={exports:{}},$R={};var _M;function cJ(){return _M||(_M=1,(function(e){function r(ce,re){var ue=ce.length;ce.push(re);e:for(;0<ue;){var _e=ue-1>>>1,fe=ce[_e];if(0<d(fe,re))ce[_e]=re,ce[ue]=fe,ue=_e;else break e}}function s(ce){return ce.length===0?null:ce[0]}function o(ce){if(ce.length===0)return null;var re=ce[0],ue=ce.pop();if(ue!==re){ce[0]=ue;e:for(var _e=0,fe=ce.length,He=fe>>>1;_e<He;){var Oe=2*(_e+1)-1,ke=ce[Oe],Ve=Oe+1,ie=ce[Ve];if(0>d(ke,ue))Ve<fe&&0>d(ie,ke)?(ce[_e]=ie,ce[Ve]=ue,_e=Ve):(ce[_e]=ke,ce[Oe]=ue,_e=Oe);else if(Ve<fe&&0>d(ie,ue))ce[_e]=ie,ce[Ve]=ue,_e=Ve;else break e}}return re}function d(ce,re){var ue=ce.sortIndex-re.sortIndex;return ue!==0?ue:ce.id-re.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var p=performance;e.unstable_now=function(){return p.now()}}else{var m=Date,g=m.now();e.unstable_now=function(){return m.now()-g}}var b=[],S=[],E=1,A=null,k=3,T=!1,M=!1,I=!1,q=!1,G=typeof setTimeout=="function"?setTimeout:null,K=typeof clearTimeout=="function"?clearTimeout:null,X=typeof setImmediate<"u"?setImmediate:null;function z(ce){for(var re=s(S);re!==null;){if(re.callback===null)o(S);else if(re.startTime<=ce)o(S),re.sortIndex=re.expirationTime,r(b,re);else break;re=s(S)}}function ee(ce){if(I=!1,z(ce),!M)if(s(b)!==null)M=!0,oe||(oe=!0,le());else{var re=s(S);re!==null&&Ke(ee,re.startTime-ce)}}var oe=!1,Q=-1,ne=5,de=-1;function Ce(){return q?!0:!(e.unstable_now()-de<ne)}function xe(){if(q=!1,oe){var ce=e.unstable_now();de=ce;var re=!0;try{e:{M=!1,I&&(I=!1,K(Q),Q=-1),T=!0;var ue=k;try{t:{for(z(ce),A=s(b);A!==null&&!(A.expirationTime>ce&&Ce());){var _e=A.callback;if(typeof _e=="function"){A.callback=null,k=A.priorityLevel;var fe=_e(A.expirationTime<=ce);if(ce=e.unstable_now(),typeof fe=="function"){A.callback=fe,z(ce),re=!0;break t}A===s(b)&&o(b),z(ce)}else o(b);A=s(b)}if(A!==null)re=!0;else{var He=s(S);He!==null&&Ke(ee,He.startTime-ce),re=!1}}break e}finally{A=null,k=ue,T=!1}re=void 0}}finally{re?le():oe=!1}}}var le;if(typeof X=="function")le=function(){X(xe)};else if(typeof MessageChannel<"u"){var be=new MessageChannel,je=be.port2;be.port1.onmessage=xe,le=function(){je.postMessage(null)}}else le=function(){G(xe,0)};function Ke(ce,re){Q=G(function(){ce(e.unstable_now())},re)}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(ce){ce.callback=null},e.unstable_forceFrameRate=function(ce){0>ce||125<ce?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ne=0<ce?Math.floor(1e3/ce):5},e.unstable_getCurrentPriorityLevel=function(){return k},e.unstable_next=function(ce){switch(k){case 1:case 2:case 3:var re=3;break;default:re=k}var ue=k;k=re;try{return ce()}finally{k=ue}},e.unstable_requestPaint=function(){q=!0},e.unstable_runWithPriority=function(ce,re){switch(ce){case 1:case 2:case 3:case 4:case 5:break;default:ce=3}var ue=k;k=ce;try{return re()}finally{k=ue}},e.unstable_scheduleCallback=function(ce,re,ue){var _e=e.unstable_now();switch(typeof ue=="object"&&ue!==null?(ue=ue.delay,ue=typeof ue=="number"&&0<ue?_e+ue:_e):ue=_e,ce){case 1:var fe=-1;break;case 2:fe=250;break;case 5:fe=1073741823;break;case 4:fe=1e4;break;default:fe=5e3}return fe=ue+fe,ce={id:E++,callback:re,priorityLevel:ce,startTime:ue,expirationTime:fe,sortIndex:-1},ue>_e?(ce.sortIndex=ue,r(S,ce),s(b)===null&&ce===s(S)&&(I?(K(Q),Q=-1):I=!0,Ke(ee,ue-_e))):(ce.sortIndex=fe,r(b,ce),M||T||(M=!0,oe||(oe=!0,le()))),ce},e.unstable_shouldYield=Ce,e.unstable_wrapCallback=function(ce){var re=k;return function(){var ue=k;k=re;try{return ce.apply(this,arguments)}finally{k=ue}}}})($R)),$R}var $M;function uJ(){return $M||($M=1,_R.exports=cJ()),_R.exports}var NM;function dJ(){if(NM)return nb;NM=1;var e=uJ(),r=U3(),s=hY();function o(a){var c="https://react.dev/errors/"+a;if(1<arguments.length){c+="?args[]="+encodeURIComponent(arguments[1]);for(var f=2;f<arguments.length;f++)c+="&args[]="+encodeURIComponent(arguments[f])}return"Minified React error #"+a+"; visit "+c+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function d(a){return!(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11)}function p(a){var c=a,f=a;if(a.alternate)for(;c.return;)c=c.return;else{a=c;do c=a,(c.flags&4098)!==0&&(f=c.return),a=c.return;while(a)}return c.tag===3?f:null}function m(a){if(a.tag===13){var c=a.memoizedState;if(c===null&&(a=a.alternate,a!==null&&(c=a.memoizedState)),c!==null)return c.dehydrated}return null}function g(a){if(a.tag===31){var c=a.memoizedState;if(c===null&&(a=a.alternate,a!==null&&(c=a.memoizedState)),c!==null)return c.dehydrated}return null}function b(a){if(p(a)!==a)throw Error(o(188))}function S(a){var c=a.alternate;if(!c){if(c=p(a),c===null)throw Error(o(188));return c!==a?null:a}for(var f=a,y=c;;){var j=f.return;if(j===null)break;var O=j.alternate;if(O===null){if(y=j.return,y!==null){f=y;continue}break}if(j.child===O.child){for(O=j.child;O;){if(O===f)return b(j),a;if(O===y)return b(j),c;O=O.sibling}throw Error(o(188))}if(f.return!==y.return)f=j,y=O;else{for(var B=!1,te=j.child;te;){if(te===f){B=!0,f=j,y=O;break}if(te===y){B=!0,y=j,f=O;break}te=te.sibling}if(!B){for(te=O.child;te;){if(te===f){B=!0,f=O,y=j;break}if(te===y){B=!0,y=O,f=j;break}te=te.sibling}if(!B)throw Error(o(189))}}if(f.alternate!==y)throw Error(o(190))}if(f.tag!==3)throw Error(o(188));return f.stateNode.current===f?a:c}function E(a){var c=a.tag;if(c===5||c===26||c===27||c===6)return a;for(a=a.child;a!==null;){if(c=E(a),c!==null)return c;a=a.sibling}return null}var A=Object.assign,k=Symbol.for("react.element"),T=Symbol.for("react.transitional.element"),M=Symbol.for("react.portal"),I=Symbol.for("react.fragment"),q=Symbol.for("react.strict_mode"),G=Symbol.for("react.profiler"),K=Symbol.for("react.consumer"),X=Symbol.for("react.context"),z=Symbol.for("react.forward_ref"),ee=Symbol.for("react.suspense"),oe=Symbol.for("react.suspense_list"),Q=Symbol.for("react.memo"),ne=Symbol.for("react.lazy"),de=Symbol.for("react.activity"),Ce=Symbol.for("react.memo_cache_sentinel"),xe=Symbol.iterator;function le(a){return a===null||typeof a!="object"?null:(a=xe&&a[xe]||a["@@iterator"],typeof a=="function"?a:null)}var be=Symbol.for("react.client.reference");function je(a){if(a==null)return null;if(typeof a=="function")return a.$$typeof===be?null:a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case I:return"Fragment";case G:return"Profiler";case q:return"StrictMode";case ee:return"Suspense";case oe:return"SuspenseList";case de:return"Activity"}if(typeof a=="object")switch(a.$$typeof){case M:return"Portal";case X:return a.displayName||"Context";case K:return(a._context.displayName||"Context")+".Consumer";case z:var c=a.render;return a=a.displayName,a||(a=c.displayName||c.name||"",a=a!==""?"ForwardRef("+a+")":"ForwardRef"),a;case Q:return c=a.displayName||null,c!==null?c:je(a.type)||"Memo";case ne:c=a._payload,a=a._init;try{return je(a(c))}catch{}}return null}var Ke=Array.isArray,ce=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,re=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ue={pending:!1,data:null,method:null,action:null},_e=[],fe=-1;function He(a){return{current:a}}function Oe(a){0>fe||(a.current=_e[fe],_e[fe]=null,fe--)}function ke(a,c){fe++,_e[fe]=a.current,a.current=c}var Ve=He(null),ie=He(null),Ne=He(null),ze=He(null);function tt(a,c){switch(ke(Ne,c),ke(ie,a),ke(Ve,null),c.nodeType){case 9:case 11:a=(a=c.documentElement)&&(a=a.namespaceURI)?gd(a):0;break;default:if(a=c.tagName,c=c.namespaceURI)c=gd(c),a=qh(c,a);else switch(a){case"svg":a=1;break;case"math":a=2;break;default:a=0}}Oe(Ve),ke(Ve,a)}function ft(){Oe(Ve),Oe(ie),Oe(Ne)}function Ot(a){a.memoizedState!==null&&ke(ze,a);var c=Ve.current,f=qh(c,a.type);c!==f&&(ke(ie,a),ke(Ve,f))}function Ft(a){ie.current===a&&(Oe(Ve),Oe(ie)),ze.current===a&&(Oe(ze),bd._currentValue=ue)}var kt,Jt;function Le(a){if(kt===void 0)try{throw Error()}catch(f){var c=f.stack.trim().match(/\n( *(at )?)/);kt=c&&c[1]||"",Jt=-1<f.stack.indexOf(`
|
||
at`)?" (<anonymous>)":-1<f.stack.indexOf("@")?"@unknown:0:0":""}return`
|
||
`+kt+a+Jt}var Lt=!1;function Rt(a,c){if(!a||Lt)return"";Lt=!0;var f=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var y={DetermineComponentFrameRoot:function(){try{if(c){var rt=function(){throw Error()};if(Object.defineProperty(rt.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(rt,[])}catch(Xe){var Ue=Xe}Reflect.construct(a,[],rt)}else{try{rt.call()}catch(Xe){Ue=Xe}a.call(rt.prototype)}}else{try{throw Error()}catch(Xe){Ue=Xe}(rt=a())&&typeof rt.catch=="function"&&rt.catch(function(){})}}catch(Xe){if(Xe&&Ue&&typeof Xe.stack=="string")return[Xe.stack,Ue.stack]}return[null,null]}};y.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var j=Object.getOwnPropertyDescriptor(y.DetermineComponentFrameRoot,"name");j&&j.configurable&&Object.defineProperty(y.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var O=y.DetermineComponentFrameRoot(),B=O[0],te=O[1];if(B&&te){var ye=B.split(`
|
||
`),Be=te.split(`
|
||
`);for(j=y=0;y<ye.length&&!ye[y].includes("DetermineComponentFrameRoot");)y++;for(;j<Be.length&&!Be[j].includes("DetermineComponentFrameRoot");)j++;if(y===ye.length||j===Be.length)for(y=ye.length-1,j=Be.length-1;1<=y&&0<=j&&ye[y]!==Be[j];)j--;for(;1<=y&&0<=j;y--,j--)if(ye[y]!==Be[j]){if(y!==1||j!==1)do if(y--,j--,0>j||ye[y]!==Be[j]){var We=`
|
||
`+ye[y].replace(" at new "," at ");return a.displayName&&We.includes("<anonymous>")&&(We=We.replace("<anonymous>",a.displayName)),We}while(1<=y&&0<=j);break}}}finally{Lt=!1,Error.prepareStackTrace=f}return(f=a?a.displayName||a.name:"")?Le(f):""}function V(a,c){switch(a.tag){case 26:case 27:case 5:return Le(a.type);case 16:return Le("Lazy");case 13:return a.child!==c&&c!==null?Le("Suspense Fallback"):Le("Suspense");case 19:return Le("SuspenseList");case 0:case 15:return Rt(a.type,!1);case 11:return Rt(a.type.render,!1);case 1:return Rt(a.type,!0);case 31:return Le("Activity");default:return""}}function Nn(a){try{var c="",f=null;do c+=V(a,f),f=a,a=a.return;while(a);return c}catch(y){return`
|
||
Error generating stack: `+y.message+`
|
||
`+y.stack}}var cn=Object.prototype.hasOwnProperty,ve=e.unstable_scheduleCallback,De=e.unstable_cancelCallback,Ge=e.unstable_shouldYield,D=e.unstable_requestPaint,L=e.unstable_now,H=e.unstable_getCurrentPriorityLevel,W=e.unstable_ImmediatePriority,we=e.unstable_UserBlockingPriority,Re=e.unstable_NormalPriority,st=e.unstable_LowPriority,Kt=e.unstable_IdlePriority,Qt=e.log,Fn=e.unstable_setDisableYieldValue,dn=null,Ht=null;function wi(a){if(typeof Qt=="function"&&Fn(a),Ht&&typeof Ht.setStrictMode=="function")try{Ht.setStrictMode(dn,a)}catch{}}var Xr=Math.clz32?Math.clz32:Ma,fa=Math.log,ho=Math.LN2;function Ma(a){return a>>>=0,a===0?32:31-(fa(a)/ho|0)|0}var cc=256,xu=262144,uc=4194304;function ma(a){var c=a&42;if(c!==0)return c;switch(a&-a){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 a&261888;case 262144:case 524288:case 1048576:case 2097152:return a&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return a&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return a}}function zt(a,c,f){var y=a.pendingLanes;if(y===0)return 0;var j=0,O=a.suspendedLanes,B=a.pingedLanes;a=a.warmLanes;var te=y&134217727;return te!==0?(y=te&~O,y!==0?j=ma(y):(B&=te,B!==0?j=ma(B):f||(f=te&~a,f!==0&&(j=ma(f))))):(te=y&~O,te!==0?j=ma(te):B!==0?j=ma(B):f||(f=y&~a,f!==0&&(j=ma(f)))),j===0?0:c!==0&&c!==j&&(c&O)===0&&(O=j&-j,f=c&-c,O>=f||O===32&&(f&4194048)!==0)?c:j}function vr(a,c){return(a.pendingLanes&~(a.suspendedLanes&~a.pingedLanes)&c)===0}function Yr(a,c){switch(a){case 1:case 2:case 4:case 8:case 64:return c+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 c+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 Os(){var a=uc;return uc<<=1,(uc&62914560)===0&&(uc=4194304),a}function Dn(a){for(var c=[],f=0;31>f;f++)c.push(a);return c}function Er(a,c){a.pendingLanes|=c,c!==268435456&&(a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0)}function Ys(a,c,f,y,j,O){var B=a.pendingLanes;a.pendingLanes=f,a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0,a.expiredLanes&=f,a.entangledLanes&=f,a.errorRecoveryDisabledLanes&=f,a.shellSuspendCounter=0;var te=a.entanglements,ye=a.expirationTimes,Be=a.hiddenUpdates;for(f=B&~f;0<f;){var We=31-Xr(f),rt=1<<We;te[We]=0,ye[We]=-1;var Ue=Be[We];if(Ue!==null)for(Be[We]=null,We=0;We<Ue.length;We++){var Xe=Ue[We];Xe!==null&&(Xe.lane&=-536870913)}f&=~rt}y!==0&&ll(a,y,0),O!==0&&j===0&&a.tag!==0&&(a.suspendedLanes|=O&~(B&~c))}function ll(a,c,f){a.pendingLanes|=c,a.suspendedLanes&=~c;var y=31-Xr(c);a.entangledLanes|=c,a.entanglements[y]=a.entanglements[y]|1073741824|f&261930}function ys(a,c){var f=a.entangledLanes|=c;for(a=a.entanglements;f;){var y=31-Xr(f),j=1<<y;j&c|a[y]&c&&(a[y]|=c),f&=~j}}function Zs(a,c){var f=c&-c;return f=(f&42)!==0?1:bu(f),(f&(a.suspendedLanes|c))!==0?0:f}function bu(a){switch(a){case 2:a=1;break;case 8:a=4;break;case 32:a=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:a=128;break;case 268435456:a=134217728;break;default:a=0}return a}function ga(a){return a&=-a,2<a?8<a?(a&134217727)!==0?32:268435456:8:2}function wu(){var a=re.p;return a!==0?a:(a=window.event,a===void 0?32:HS(a.type))}function Ig(a,c){var f=re.p;try{return re.p=a,c()}finally{re.p=f}}var ya=Math.random().toString(36).slice(2),is="__reactFiber$"+ya,Ps="__reactProps$"+ya,cl="__reactContainer$"+ya,Gt="__reactEvents$"+ya,Nt="__reactListeners$"+ya,tA="__reactHandles$"+ya,zg="__reactResources$"+ya,Vi="__reactMarker$"+ya;function Qd(a){delete a[is],delete a[Ps],delete a[Gt],delete a[Nt],delete a[tA]}function dc(a){var c=a[is];if(c)return c;for(var f=a.parentNode;f;){if(c=f[cl]||f[is]){if(f=c.alternate,c.child!==null||f!==null&&f.child!==null)for(a=_S(a);a!==null;){if(f=a[is])return f;a=_S(a)}return c}a=f,f=a.parentNode}return null}function hc(a){if(a=a[is]||a[cl]){var c=a.tag;if(c===5||c===6||c===13||c===31||c===26||c===27||c===3)return a}return null}function Hi(a){var c=a.tag;if(c===5||c===26||c===27||c===6)return a.stateNode;throw Error(o(33))}function ul(a){var c=a[zg];return c||(c=a[zg]={hoistableStyles:new Map,hoistableScripts:new Map}),c}function Zr(a){a[Vi]=!0}var dt=new Set,ww={};function sr(a,c){Si(a,c),Si(a+"Capture",c)}function Si(a,c){for(ww[a]=c,a=0;a<c.length;a++)dt.add(c[a])}var Su=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]*$"),Eu={},ju={};function Lg(a){return cn.call(ju,a)?!0:cn.call(Eu,a)?!1:Su.test(a)?ju[a]=!0:(Eu[a]=!0,!1)}function pc(a,c,f){if(Lg(c))if(f===null)a.removeAttribute(c);else{switch(typeof f){case"undefined":case"function":case"symbol":a.removeAttribute(c);return;case"boolean":var y=c.toLowerCase().slice(0,5);if(y!=="data-"&&y!=="aria-"){a.removeAttribute(c);return}}a.setAttribute(c,""+f)}}function dl(a,c,f){if(f===null)a.removeAttribute(c);else{switch(typeof f){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(c);return}a.setAttribute(c,""+f)}}function va(a,c,f,y){if(y===null)a.removeAttribute(f);else{switch(typeof y){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(f);return}a.setAttributeNS(c,f,""+y)}}function Ws(a){switch(typeof a){case"bigint":case"boolean":case"number":case"string":case"undefined":return a;case"object":return a;default:return""}}function fc(a){var c=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(c==="checkbox"||c==="radio")}function eh(a,c,f){var y=Object.getOwnPropertyDescriptor(a.constructor.prototype,c);if(!a.hasOwnProperty(c)&&typeof y<"u"&&typeof y.get=="function"&&typeof y.set=="function"){var j=y.get,O=y.set;return Object.defineProperty(a,c,{configurable:!0,get:function(){return j.call(this)},set:function(B){f=""+B,O.call(this,B)}}),Object.defineProperty(a,c,{enumerable:y.enumerable}),{getValue:function(){return f},setValue:function(B){f=""+B},stopTracking:function(){a._valueTracker=null,delete a[c]}}}}function po(a){if(!a._valueTracker){var c=fc(a)?"checked":"value";a._valueTracker=eh(a,c,""+a[c])}}function Cu(a){if(!a)return!1;var c=a._valueTracker;if(!c)return!0;var f=c.getValue(),y="";return a&&(y=fc(a)?a.checked?"true":"false":a.value),a=y,a!==f?(c.setValue(a),!0):!1}function hl(a){if(a=a||(typeof document<"u"?document:void 0),typeof a>"u")return null;try{return a.activeElement||a.body}catch{return a.body}}var th=/[\n"\\]/g;function Js(a){return a.replace(th,function(c){return"\\"+c.charCodeAt(0).toString(16)+" "})}function zp(a,c,f,y,j,O,B,te){a.name="",B!=null&&typeof B!="function"&&typeof B!="symbol"&&typeof B!="boolean"?a.type=B:a.removeAttribute("type"),c!=null?B==="number"?(c===0&&a.value===""||a.value!=c)&&(a.value=""+Ws(c)):a.value!==""+Ws(c)&&(a.value=""+Ws(c)):B!=="submit"&&B!=="reset"||a.removeAttribute("value"),c!=null?Lp(a,B,Ws(c)):f!=null?Lp(a,B,Ws(f)):y!=null&&a.removeAttribute("value"),j==null&&O!=null&&(a.defaultChecked=!!O),j!=null&&(a.checked=j&&typeof j!="function"&&typeof j!="symbol"),te!=null&&typeof te!="function"&&typeof te!="symbol"&&typeof te!="boolean"?a.name=""+Ws(te):a.removeAttribute("name")}function Fg(a,c,f,y,j,O,B,te){if(O!=null&&typeof O!="function"&&typeof O!="symbol"&&typeof O!="boolean"&&(a.type=O),c!=null||f!=null){if(!(O!=="submit"&&O!=="reset"||c!=null)){po(a);return}f=f!=null?""+Ws(f):"",c=c!=null?""+Ws(c):f,te||c===a.value||(a.value=c),a.defaultValue=c}y=y??j,y=typeof y!="function"&&typeof y!="symbol"&&!!y,a.checked=te?a.checked:!!y,a.defaultChecked=!!y,B!=null&&typeof B!="function"&&typeof B!="symbol"&&typeof B!="boolean"&&(a.name=B),po(a)}function Lp(a,c,f){c==="number"&&hl(a.ownerDocument)===a||a.defaultValue===""+f||(a.defaultValue=""+f)}function Au(a,c,f,y){if(a=a.options,c){c={};for(var j=0;j<f.length;j++)c["$"+f[j]]=!0;for(f=0;f<a.length;f++)j=c.hasOwnProperty("$"+a[f].value),a[f].selected!==j&&(a[f].selected=j),j&&y&&(a[f].defaultSelected=!0)}else{for(f=""+Ws(f),c=null,j=0;j<a.length;j++){if(a[j].value===f){a[j].selected=!0,y&&(a[j].defaultSelected=!0);return}c!==null||a[j].disabled||(c=a[j])}c!==null&&(c.selected=!0)}}function Sw(a,c,f){if(c!=null&&(c=""+Ws(c),c!==a.value&&(a.value=c),f==null)){a.defaultValue!==c&&(a.defaultValue=c);return}a.defaultValue=f!=null?""+Ws(f):""}function Ew(a,c,f,y){if(c==null){if(y!=null){if(f!=null)throw Error(o(92));if(Ke(y)){if(1<y.length)throw Error(o(93));y=y[0]}f=y}f==null&&(f=""),c=f}f=Ws(c),a.defaultValue=f,y=a.textContent,y===f&&y!==""&&y!==null&&(a.value=y),po(a)}function Ou(a,c){if(c){var f=a.firstChild;if(f&&f===a.lastChild&&f.nodeType===3){f.nodeValue=c;return}}a.textContent=c}var nA=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 jw(a,c,f){var y=c.indexOf("--")===0;f==null||typeof f=="boolean"||f===""?y?a.setProperty(c,""):c==="float"?a.cssFloat="":a[c]="":y?a.setProperty(c,f):typeof f!="number"||f===0||nA.has(c)?c==="float"?a.cssFloat=f:a[c]=(""+f).trim():a[c]=f+"px"}function Cw(a,c,f){if(c!=null&&typeof c!="object")throw Error(o(62));if(a=a.style,f!=null){for(var y in f)!f.hasOwnProperty(y)||c!=null&&c.hasOwnProperty(y)||(y.indexOf("--")===0?a.setProperty(y,""):y==="float"?a.cssFloat="":a[y]="");for(var j in c)y=c[j],c.hasOwnProperty(j)&&f[j]!==y&&jw(a,j,y)}else for(var O in c)c.hasOwnProperty(O)&&jw(a,O,c[O])}function nh(a){if(a.indexOf("-")===-1)return!1;switch(a){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 Aw=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"]]),qg=/^[\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 rh(a){return qg.test(""+a)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":a}function xa(){}var as=null;function Bg(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var ku=null,mc=null;function Ug(a){var c=hc(a);if(c&&(a=c.stateNode)){var f=a[Ps]||null;e:switch(a=c.stateNode,c.type){case"input":if(zp(a,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name),c=f.name,f.type==="radio"&&c!=null){for(f=a;f.parentNode;)f=f.parentNode;for(f=f.querySelectorAll('input[name="'+Js(""+c)+'"][type="radio"]'),c=0;c<f.length;c++){var y=f[c];if(y!==a&&y.form===a.form){var j=y[Ps]||null;if(!j)throw Error(o(90));zp(y,j.value,j.defaultValue,j.defaultValue,j.checked,j.defaultChecked,j.type,j.name)}}for(c=0;c<f.length;c++)y=f[c],y.form===a.form&&Cu(y)}break e;case"textarea":Sw(a,f.value,f.defaultValue);break e;case"select":c=f.value,c!=null&&Au(a,!!f.multiple,c,!1)}}}var Fp=!1;function qp(a,c,f){if(Fp)return a(c,f);Fp=!0;try{var y=a(c);return y}finally{if(Fp=!1,(ku!==null||mc!==null)&&(zf(),ku&&(c=ku,a=mc,mc=ku=null,Ug(c),a)))for(c=0;c<a.length;c++)Ug(a[c])}}function Ru(a,c){var f=a.stateNode;if(f===null)return null;var y=f[Ps]||null;if(y===null)return null;f=y[c];e:switch(c){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(y=!y.disabled)||(a=a.type,y=!(a==="button"||a==="input"||a==="select"||a==="textarea")),a=!y;break e;default:a=!1}if(a)return null;if(f&&typeof f!="function")throw Error(o(231,c,typeof f));return f}var ar=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Bp=!1;if(ar)try{var fo={};Object.defineProperty(fo,"passive",{get:function(){Bp=!0}}),window.addEventListener("test",fo,fo),window.removeEventListener("test",fo,fo)}catch{Bp=!1}var Rr=null,sh=null,Tu=null;function Ow(){if(Tu)return Tu;var a,c=sh,f=c.length,y,j="value"in Rr?Rr.value:Rr.textContent,O=j.length;for(a=0;a<f&&c[a]===j[a];a++);var B=f-a;for(y=1;y<=B&&c[f-y]===j[O-y];y++);return Tu=j.slice(a,1<y?1-y:void 0)}function Up(a){var c=a.keyCode;return"charCode"in a?(a=a.charCode,a===0&&c===13&&(a=13)):a=c,a===10&&(a=13),32<=a||a===13?a:0}function Kp(){return!0}function os(){return!1}function Ms(a){function c(f,y,j,O,B){this._reactName=f,this._targetInst=j,this.type=y,this.nativeEvent=O,this.target=B,this.currentTarget=null;for(var te in a)a.hasOwnProperty(te)&&(f=a[te],this[te]=f?f(O):O[te]);return this.isDefaultPrevented=(O.defaultPrevented!=null?O.defaultPrevented:O.returnValue===!1)?Kp:os,this.isPropagationStopped=os,this}return A(c.prototype,{preventDefault:function(){this.defaultPrevented=!0;var f=this.nativeEvent;f&&(f.preventDefault?f.preventDefault():typeof f.returnValue!="unknown"&&(f.returnValue=!1),this.isDefaultPrevented=Kp)},stopPropagation:function(){var f=this.nativeEvent;f&&(f.stopPropagation?f.stopPropagation():typeof f.cancelBubble!="unknown"&&(f.cancelBubble=!0),this.isPropagationStopped=Kp)},persist:function(){},isPersistent:Kp}),c}var mo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ih=Ms(mo),_u=A({},mo,{view:0,detail:0}),kw=Ms(_u),Vp,Hp,$u,ah=A({},_u,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Gg,button:0,buttons:0,relatedTarget:function(a){return a.relatedTarget===void 0?a.fromElement===a.srcElement?a.toElement:a.fromElement:a.relatedTarget},movementX:function(a){return"movementX"in a?a.movementX:(a!==$u&&($u&&a.type==="mousemove"?(Vp=a.screenX-$u.screenX,Hp=a.screenY-$u.screenY):Hp=Vp=0,$u=a),Vp)},movementY:function(a){return"movementY"in a?a.movementY:Hp}}),Rw=Ms(ah),rA=A({},ah,{dataTransfer:0}),Tw=Ms(rA),sA=A({},_u,{relatedTarget:0}),Kg=Ms(sA),_w=A({},mo,{animationName:0,elapsedTime:0,pseudoElement:0}),$w=Ms(_w),Nw=A({},mo,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),Dw=Ms(Nw),Pw=A({},mo,{data:0}),Vg=Ms(Pw),Mw={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Hg={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"},Iw={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function iA(a){var c=this.nativeEvent;return c.getModifierState?c.getModifierState(a):(a=Iw[a])?!!c[a]:!1}function Gg(){return iA}var zw=A({},_u,{key:function(a){if(a.key){var c=Mw[a.key]||a.key;if(c!=="Unidentified")return c}return a.type==="keypress"?(a=Up(a),a===13?"Enter":String.fromCharCode(a)):a.type==="keydown"||a.type==="keyup"?Hg[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Gg,charCode:function(a){return a.type==="keypress"?Up(a):0},keyCode:function(a){return a.type==="keydown"||a.type==="keyup"?a.keyCode:0},which:function(a){return a.type==="keypress"?Up(a):a.type==="keydown"||a.type==="keyup"?a.keyCode:0}}),aA=Ms(zw),Lw=A({},ah,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Fw=Ms(Lw),qw=A({},_u,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Gg}),Xg=Ms(qw),pl=A({},mo,{propertyName:0,elapsedTime:0,pseudoElement:0}),oA=Ms(pl),lA=A({},ah,{deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:0,deltaMode:0}),cA=Ms(lA),Bw=A({},mo,{newState:0,oldState:0}),Uw=Ms(Bw),Kw=[9,13,27,32],Gi=ar&&"CompositionEvent"in window,ba=null;ar&&"documentMode"in document&&(ba=document.documentMode);var Qs=ar&&"TextEvent"in window&&!ba,gc=ar&&(!Gi||ba&&8<ba&&11>=ba),Vw=" ",Yg=!1;function Hw(a,c){switch(a){case"keyup":return Kw.indexOf(c.keyCode)!==-1;case"keydown":return c.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Zg(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var yc=!1;function Nu(a,c){switch(a){case"compositionend":return Zg(c);case"keypress":return c.which!==32?null:(Yg=!0,Vw);case"textInput":return a=c.data,a===Vw&&Yg?null:a;default:return null}}function uA(a,c){if(yc)return a==="compositionend"||!Gi&&Hw(a,c)?(a=Ow(),Tu=sh=Rr=null,yc=!1,a):null;switch(a){case"paste":return null;case"keypress":if(!(c.ctrlKey||c.altKey||c.metaKey)||c.ctrlKey&&c.altKey){if(c.char&&1<c.char.length)return c.char;if(c.which)return String.fromCharCode(c.which)}return null;case"compositionend":return gc&&c.locale!=="ko"?null:c.data;default:return null}}var Gw={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 Bt(a){var c=a&&a.nodeName&&a.nodeName.toLowerCase();return c==="input"?!!Gw[a.type]:c==="textarea"}function oh(a,c,f,y){ku?mc?mc.push(y):mc=[y]:ku=y,c=Yf(c,"onChange"),0<c.length&&(f=new ih("onChange","change",null,f,y),a.push({event:f,listeners:c}))}var Du=null,Xi=null;function Xw(a){jS(a,0)}function go(a){var c=Hi(a);if(Cu(c))return a}function Gp(a,c){if(a==="change")return c}var Nr=!1;if(ar){var Pu;if(ar){var lh="oninput"in document;if(!lh){var Wg=document.createElement("div");Wg.setAttribute("oninput","return;"),lh=typeof Wg.oninput=="function"}Pu=lh}else Pu=!1;Nr=Pu&&(!document.documentMode||9<document.documentMode)}function Yw(){Du&&(Du.detachEvent("onpropertychange",Zw),Xi=Du=null)}function Zw(a){if(a.propertyName==="value"&&go(Xi)){var c=[];oh(c,Xi,a,Bg(a)),qp(Xw,c)}}function Mu(a,c,f){a==="focusin"?(Yw(),Du=c,Xi=f,Du.attachEvent("onpropertychange",Zw)):a==="focusout"&&Yw()}function dA(a){if(a==="selectionchange"||a==="keyup"||a==="keydown")return go(Xi)}function Ww(a,c){if(a==="click")return go(c)}function hA(a,c){if(a==="input"||a==="change")return go(c)}function pA(a,c){return a===c&&(a!==0||1/a===1/c)||a!==a&&c!==c}var ei=typeof Object.is=="function"?Object.is:pA;function Iu(a,c){if(ei(a,c))return!0;if(typeof a!="object"||a===null||typeof c!="object"||c===null)return!1;var f=Object.keys(a),y=Object.keys(c);if(f.length!==y.length)return!1;for(y=0;y<f.length;y++){var j=f[y];if(!cn.call(c,j)||!ei(a[j],c[j]))return!1}return!0}function Jw(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function Qw(a,c){var f=Jw(a);a=0;for(var y;f;){if(f.nodeType===3){if(y=a+f.textContent.length,a<=c&&y>=c)return{node:f,offset:c-a};a=y}e:{for(;f;){if(f.nextSibling){f=f.nextSibling;break e}f=f.parentNode}f=void 0}f=Jw(f)}}function e0(a,c){return a&&c?a===c?!0:a&&a.nodeType===3?!1:c&&c.nodeType===3?e0(a,c.parentNode):"contains"in a?a.contains(c):a.compareDocumentPosition?!!(a.compareDocumentPosition(c)&16):!1:!1}function t0(a){a=a!=null&&a.ownerDocument!=null&&a.ownerDocument.defaultView!=null?a.ownerDocument.defaultView:window;for(var c=hl(a.document);c instanceof a.HTMLIFrameElement;){try{var f=typeof c.contentWindow.location.href=="string"}catch{f=!1}if(f)a=c.contentWindow;else break;c=hl(a.document)}return c}function Jg(a){var c=a&&a.nodeName&&a.nodeName.toLowerCase();return c&&(c==="input"&&(a.type==="text"||a.type==="search"||a.type==="tel"||a.type==="url"||a.type==="password")||c==="textarea"||a.contentEditable==="true")}var n0=ar&&"documentMode"in document&&11>=document.documentMode,fl=null,zu=null,yo=null,Xp=!1;function Qg(a,c,f){var y=f.window===f?f.document:f.nodeType===9?f:f.ownerDocument;Xp||fl==null||fl!==hl(y)||(y=fl,"selectionStart"in y&&Jg(y)?y={start:y.selectionStart,end:y.selectionEnd}:(y=(y.ownerDocument&&y.ownerDocument.defaultView||window).getSelection(),y={anchorNode:y.anchorNode,anchorOffset:y.anchorOffset,focusNode:y.focusNode,focusOffset:y.focusOffset}),yo&&Iu(yo,y)||(yo=y,y=Yf(zu,"onSelect"),0<y.length&&(c=new ih("onSelect","select",null,c,f),a.push({event:c,listeners:y}),c.target=fl)))}function wa(a,c){var f={};return f[a.toLowerCase()]=c.toLowerCase(),f["Webkit"+a]="webkit"+c,f["Moz"+a]="moz"+c,f}var vc={animationend:wa("Animation","AnimationEnd"),animationiteration:wa("Animation","AnimationIteration"),animationstart:wa("Animation","AnimationStart"),transitionrun:wa("Transition","TransitionRun"),transitionstart:wa("Transition","TransitionStart"),transitioncancel:wa("Transition","TransitionCancel"),transitionend:wa("Transition","TransitionEnd")},ey={},ty={};ar&&(ty=document.createElement("div").style,"AnimationEvent"in window||(delete vc.animationend.animation,delete vc.animationiteration.animation,delete vc.animationstart.animation),"TransitionEvent"in window||delete vc.transitionend.transition);function ml(a){if(ey[a])return ey[a];if(!vc[a])return a;var c=vc[a],f;for(f in c)if(c.hasOwnProperty(f)&&f in ty)return ey[a]=c[f];return a}var ny=ml("animationend"),ry=ml("animationiteration"),sy=ml("animationstart"),vo=ml("transitionrun"),fA=ml("transitionstart"),iy=ml("transitioncancel"),Yp=ml("transitionend"),r0=new Map,ay="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(" ");ay.push("scrollEnd");function Sa(a,c){r0.set(a,c),sr(c,[a])}var xc=typeof reportError=="function"?reportError:function(a){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var c=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof a=="object"&&a!==null&&typeof a.message=="string"?String(a.message):String(a),error:a});if(!window.dispatchEvent(c))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",a);return}console.error(a)},Yi=[],Lu=0,oy=0;function Zp(){for(var a=Lu,c=oy=Lu=0;c<a;){var f=Yi[c];Yi[c++]=null;var y=Yi[c];Yi[c++]=null;var j=Yi[c];Yi[c++]=null;var O=Yi[c];if(Yi[c++]=null,y!==null&&j!==null){var B=y.pending;B===null?j.next=j:(j.next=B.next,B.next=j),y.pending=j}O!==0&&s0(f,j,O)}}function Wp(a,c,f,y){Yi[Lu++]=a,Yi[Lu++]=c,Yi[Lu++]=f,Yi[Lu++]=y,oy|=y,a.lanes|=y,a=a.alternate,a!==null&&(a.lanes|=y)}function ly(a,c,f,y){return Wp(a,c,f,y),Jp(a)}function bc(a,c){return Wp(a,null,null,c),Jp(a)}function s0(a,c,f){a.lanes|=f;var y=a.alternate;y!==null&&(y.lanes|=f);for(var j=!1,O=a.return;O!==null;)O.childLanes|=f,y=O.alternate,y!==null&&(y.childLanes|=f),O.tag===22&&(a=O.stateNode,a===null||a._visibility&1||(j=!0)),a=O,O=O.return;return a.tag===3?(O=a.stateNode,j&&c!==null&&(j=31-Xr(f),a=O.hiddenUpdates,y=a[j],y===null?a[j]=[c]:y.push(c),c.lane=f|536870912),O):null}function Jp(a){if(50<Dh)throw Dh=0,bv=null,Error(o(185));for(var c=a.return;c!==null;)a=c,c=a.return;return a.tag===3?a.stateNode:null}var Fu={};function qu(a,c,f,y){this.tag=a,this.key=f,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=c,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=y,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ti(a,c,f,y){return new qu(a,c,f,y)}function Qp(a){return a=a.prototype,!(!a||!a.isReactComponent)}function ni(a,c){var f=a.alternate;return f===null?(f=ti(a.tag,c,a.key,a.mode),f.elementType=a.elementType,f.type=a.type,f.stateNode=a.stateNode,f.alternate=a,a.alternate=f):(f.pendingProps=c,f.type=a.type,f.flags=0,f.subtreeFlags=0,f.deletions=null),f.flags=a.flags&65011712,f.childLanes=a.childLanes,f.lanes=a.lanes,f.child=a.child,f.memoizedProps=a.memoizedProps,f.memoizedState=a.memoizedState,f.updateQueue=a.updateQueue,c=a.dependencies,f.dependencies=c===null?null:{lanes:c.lanes,firstContext:c.firstContext},f.sibling=a.sibling,f.index=a.index,f.ref=a.ref,f.refCleanup=a.refCleanup,f}function cy(a,c){a.flags&=65011714;var f=a.alternate;return f===null?(a.childLanes=0,a.lanes=c,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=f.childLanes,a.lanes=f.lanes,a.child=f.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=f.memoizedProps,a.memoizedState=f.memoizedState,a.updateQueue=f.updateQueue,a.type=f.type,c=f.dependencies,a.dependencies=c===null?null:{lanes:c.lanes,firstContext:c.firstContext}),a}function Bu(a,c,f,y,j,O){var B=0;if(y=a,typeof a=="function")Qp(a)&&(B=1);else if(typeof a=="string")B=UA(a,f,Ve.current)?26:a==="html"||a==="head"||a==="body"?27:5;else e:switch(a){case de:return a=ti(31,f,c,j),a.elementType=de,a.lanes=O,a;case I:return gl(f.children,j,O,c);case q:B=8,j|=24;break;case G:return a=ti(12,f,c,j|2),a.elementType=G,a.lanes=O,a;case ee:return a=ti(13,f,c,j),a.elementType=ee,a.lanes=O,a;case oe:return a=ti(19,f,c,j),a.elementType=oe,a.lanes=O,a;default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case X:B=10;break e;case K:B=9;break e;case z:B=11;break e;case Q:B=14;break e;case ne:B=16,y=null;break e}B=29,f=Error(o(130,a===null?"null":typeof a,"")),y=null}return c=ti(B,f,c,j),c.elementType=a,c.type=y,c.lanes=O,c}function gl(a,c,f,y){return a=ti(7,a,y,c),a.lanes=f,a}function Uu(a,c,f){return a=ti(6,a,null,c),a.lanes=f,a}function i0(a){var c=ti(18,null,null,0);return c.stateNode=a,c}function uy(a,c,f){return c=ti(4,a.children!==null?a.children:[],a.key,c),c.lanes=f,c.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},c}var ef=new WeakMap;function ri(a,c){if(typeof a=="object"&&a!==null){var f=ef.get(a);return f!==void 0?f:(c={value:a,source:c,stack:Nn(c)},ef.set(a,c),c)}return{value:a,source:c,stack:Nn(c)}}var ls=[],yl=0,Ia=null,Ku=0,si=[],Ei=0,xo=null,Kn=1,za="";function ii(a,c){ls[yl++]=Ku,ls[yl++]=Ia,Ia=a,Ku=c}function a0(a,c,f){si[Ei++]=Kn,si[Ei++]=za,si[Ei++]=xo,xo=a;var y=Kn;a=za;var j=32-Xr(y)-1;y&=~(1<<j),f+=1;var O=32-Xr(c)+j;if(30<O){var B=j-j%5;O=(y&(1<<B)-1).toString(32),y>>=B,j-=B,Kn=1<<32-Xr(c)+j|f<<j|y,za=O+a}else Kn=1<<O|f<<j|y,za=a}function wc(a){a.return!==null&&(ii(a,1),a0(a,1,0))}function bo(a){for(;a===Ia;)Ia=ls[--yl],ls[yl]=null,Ku=ls[--yl],ls[yl]=null;for(;a===xo;)xo=si[--Ei],si[Ei]=null,za=si[--Ei],si[Ei]=null,Kn=si[--Ei],si[Ei]=null}function wo(a,c){si[Ei++]=Kn,si[Ei++]=za,si[Ei++]=xo,Kn=c.id,za=c.overflow,xo=a}var Fr=null,hr=null,vn=!1,vl=null,ai=!1,dy=Error(o(519));function xl(a){var c=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ch(ri(c,a)),dy}function tf(a){var c=a.stateNode,f=a.type,y=a.memoizedProps;switch(c[is]=a,c[Ps]=y,f){case"dialog":En("cancel",c),En("close",c);break;case"iframe":case"object":case"embed":En("load",c);break;case"video":case"audio":for(f=0;f<md.length;f++)En(md[f],c);break;case"source":En("error",c);break;case"img":case"image":case"link":En("error",c),En("load",c);break;case"details":En("toggle",c);break;case"input":En("invalid",c),Fg(c,y.value,y.defaultValue,y.checked,y.defaultChecked,y.type,y.name,!0);break;case"select":En("invalid",c);break;case"textarea":En("invalid",c),Ew(c,y.value,y.defaultValue,y.children)}f=y.children,typeof f!="string"&&typeof f!="number"&&typeof f!="bigint"||c.textContent===""+f||y.suppressHydrationWarning===!0||Lh(c.textContent,f)?(y.popover!=null&&(En("beforetoggle",c),En("toggle",c)),y.onScroll!=null&&En("scroll",c),y.onScrollEnd!=null&&En("scrollend",c),y.onClick!=null&&(c.onclick=xa),c=!0):c=!1,c||xl(a,!0)}function nf(a){for(Fr=a.return;Fr;)switch(Fr.tag){case 5:case 31:case 13:ai=!1;return;case 27:case 3:ai=!0;return;default:Fr=Fr.return}}function Vu(a){if(a!==Fr)return!1;if(!vn)return nf(a),vn=!0,!1;var c=a.tag,f;if((f=c!==3&&c!==27)&&((f=c===5)&&(f=a.type,f=!(f!=="form"&&f!=="button")||zv(a.type,a.memoizedProps)),f=!f),f&&hr&&xl(a),nf(a),c===13){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(o(317));hr=Kv(a)}else if(c===31){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(o(317));hr=Kv(a)}else c===27?(c=hr,Il(a.type)?(a=Uv,Uv=null,hr=a):hr=c):hr=Fr?hi(a.stateNode.nextSibling):null;return!0}function La(){hr=Fr=null,vn=!1}function hy(){var a=vl;return a!==null&&(di===null?di=a:di.push.apply(di,a),vl=null),a}function ch(a){vl===null?vl=[a]:vl.push(a)}var Sc=He(null),Ec=null,Fa=null;function So(a,c,f){ke(Sc,c._currentValue),c._currentValue=f}function oi(a){a._currentValue=Sc.current,Oe(Sc)}function py(a,c,f){for(;a!==null;){var y=a.alternate;if((a.childLanes&c)!==c?(a.childLanes|=c,y!==null&&(y.childLanes|=c)):y!==null&&(y.childLanes&c)!==c&&(y.childLanes|=c),a===f)break;a=a.return}}function qn(a,c,f,y){var j=a.child;for(j!==null&&(j.return=a);j!==null;){var O=j.dependencies;if(O!==null){var B=j.child;O=O.firstContext;e:for(;O!==null;){var te=O;O=j;for(var ye=0;ye<c.length;ye++)if(te.context===c[ye]){O.lanes|=f,te=O.alternate,te!==null&&(te.lanes|=f),py(O.return,f,a),y||(B=null);break e}O=te.next}}else if(j.tag===18){if(B=j.return,B===null)throw Error(o(341));B.lanes|=f,O=B.alternate,O!==null&&(O.lanes|=f),py(B,f,a),B=null}else B=j.child;if(B!==null)B.return=j;else for(B=j;B!==null;){if(B===a){B=null;break}if(j=B.sibling,j!==null){j.return=B.return,B=j;break}B=B.return}j=B}}function jc(a,c,f,y){a=null;for(var j=c,O=!1;j!==null;){if(!O){if((j.flags&524288)!==0)O=!0;else if((j.flags&262144)!==0)break}if(j.tag===10){var B=j.alternate;if(B===null)throw Error(o(387));if(B=B.memoizedProps,B!==null){var te=j.type;ei(j.pendingProps.value,B.value)||(a!==null?a.push(te):a=[te])}}else if(j===ze.current){if(B=j.alternate,B===null)throw Error(o(387));B.memoizedState.memoizedState!==j.memoizedState.memoizedState&&(a!==null?a.push(bd):a=[bd])}j=j.return}a!==null&&qn(c,a,f,y),c.flags|=262144}function Cc(a){for(a=a.firstContext;a!==null;){if(!ei(a.context._currentValue,a.memoizedValue))return!0;a=a.next}return!1}function bl(a){Ec=a,Fa=null,a=a.dependencies,a!==null&&(a.firstContext=null)}function Wr(a){return fy(Ec,a)}function Hu(a,c){return Ec===null&&bl(a),fy(a,c)}function fy(a,c){var f=c._currentValue;if(c={context:c,memoizedValue:f,next:null},Fa===null){if(a===null)throw Error(o(308));Fa=c,a.dependencies={lanes:0,firstContext:c},a.flags|=524288}else Fa=Fa.next=c;return f}var uh=typeof AbortController<"u"?AbortController:function(){var a=[],c=this.signal={aborted:!1,addEventListener:function(f,y){a.push(y)}};this.abort=function(){c.aborted=!0,a.forEach(function(f){return f()})}},o0=e.unstable_scheduleCallback,Ac=e.unstable_NormalPriority,Dr={$$typeof:X,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function rf(){return{controller:new uh,data:new Map,refCount:0}}function Gu(a){a.refCount--,a.refCount===0&&o0(Ac,function(){a.controller.abort()})}var wl=null,Xu=0,Sl=0,qa=null;function ji(a,c){if(wl===null){var f=wl=[];Xu=0,Sl=$v(),qa={status:"pending",value:void 0,then:function(y){f.push(y)}}}return Xu++,c.then(Zi,Zi),c}function Zi(){if(--Xu===0&&wl!==null){qa!==null&&(qa.status="fulfilled");var a=wl;wl=null,Sl=0,qa=null;for(var c=0;c<a.length;c++)(0,a[c])()}}function sf(a,c){var f=[],y={status:"pending",value:null,reason:null,then:function(j){f.push(j)}};return a.then(function(){y.status="fulfilled",y.value=c;for(var j=0;j<f.length;j++)(0,f[j])(c)},function(j){for(y.status="rejected",y.reason=j,j=0;j<f.length;j++)(0,f[j])(void 0)}),y}var l0=ce.S;ce.S=function(a,c){iS=L(),typeof c=="object"&&c!==null&&typeof c.then=="function"&&ji(a,c),l0!==null&&l0(a,c)};var El=He(null);function af(){var a=El.current;return a!==null?a:lr.pooledCache}function dh(a,c){c===null?ke(El,El.current):ke(El,c.pool)}function of(){var a=af();return a===null?null:{parent:Dr._currentValue,pool:a}}var Oc=Error(o(460)),lf=Error(o(474)),Yu=Error(o(542)),cf={then:function(){}};function Wi(a){return a=a.status,a==="fulfilled"||a==="rejected"}function my(a,c,f){switch(f=a[f],f===void 0?a.push(c):f!==c&&(c.then(xa,xa),c=f),c.status){case"fulfilled":return c.value;case"rejected":throw a=c.reason,c0(a),a;default:if(typeof c.status=="string")c.then(xa,xa);else{if(a=lr,a!==null&&100<a.shellSuspendCounter)throw Error(o(482));a=c,a.status="pending",a.then(function(y){if(c.status==="pending"){var j=c;j.status="fulfilled",j.value=y}},function(y){if(c.status==="pending"){var j=c;j.status="rejected",j.reason=y}})}switch(c.status){case"fulfilled":return c.value;case"rejected":throw a=c.reason,c0(a),a}throw Rc=c,Oc}}function kc(a){try{var c=a._init;return c(a._payload)}catch(f){throw f!==null&&typeof f=="object"&&typeof f.then=="function"?(Rc=f,Oc):f}}var Rc=null;function uf(){if(Rc===null)throw Error(o(459));var a=Rc;return Rc=null,a}function c0(a){if(a===Oc||a===Yu)throw Error(o(483))}var Zu=null,Tc=0;function Wu(a){var c=Tc;return Tc+=1,Zu===null&&(Zu=[]),my(Zu,a,c)}function ks(a,c){c=c.props.ref,a.ref=c!==void 0?c:null}function Ju(a,c){throw c.$$typeof===k?Error(o(525)):(a=Object.prototype.toString.call(c),Error(o(31,a==="[object Object]"?"object with keys {"+Object.keys(c).join(", ")+"}":a)))}function Eo(a){function c($e,Ee){if(a){var Pe=$e.deletions;Pe===null?($e.deletions=[Ee],$e.flags|=16):Pe.push(Ee)}}function f($e,Ee){if(!a)return null;for(;Ee!==null;)c($e,Ee),Ee=Ee.sibling;return null}function y($e){for(var Ee=new Map;$e!==null;)$e.key!==null?Ee.set($e.key,$e):Ee.set($e.index,$e),$e=$e.sibling;return Ee}function j($e,Ee){return $e=ni($e,Ee),$e.index=0,$e.sibling=null,$e}function O($e,Ee,Pe){return $e.index=Pe,a?(Pe=$e.alternate,Pe!==null?(Pe=Pe.index,Pe<Ee?($e.flags|=67108866,Ee):Pe):($e.flags|=67108866,Ee)):($e.flags|=1048576,Ee)}function B($e){return a&&$e.alternate===null&&($e.flags|=67108866),$e}function te($e,Ee,Pe,nt){return Ee===null||Ee.tag!==6?(Ee=Uu(Pe,$e.mode,nt),Ee.return=$e,Ee):(Ee=j(Ee,Pe),Ee.return=$e,Ee)}function ye($e,Ee,Pe,nt){var Ut=Pe.type;return Ut===I?We($e,Ee,Pe.props.children,nt,Pe.key):Ee!==null&&(Ee.elementType===Ut||typeof Ut=="object"&&Ut!==null&&Ut.$$typeof===ne&&kc(Ut)===Ee.type)?(Ee=j(Ee,Pe.props),ks(Ee,Pe),Ee.return=$e,Ee):(Ee=Bu(Pe.type,Pe.key,Pe.props,null,$e.mode,nt),ks(Ee,Pe),Ee.return=$e,Ee)}function Be($e,Ee,Pe,nt){return Ee===null||Ee.tag!==4||Ee.stateNode.containerInfo!==Pe.containerInfo||Ee.stateNode.implementation!==Pe.implementation?(Ee=uy(Pe,$e.mode,nt),Ee.return=$e,Ee):(Ee=j(Ee,Pe.children||[]),Ee.return=$e,Ee)}function We($e,Ee,Pe,nt,Ut){return Ee===null||Ee.tag!==7?(Ee=gl(Pe,$e.mode,nt,Ut),Ee.return=$e,Ee):(Ee=j(Ee,Pe),Ee.return=$e,Ee)}function rt($e,Ee,Pe){if(typeof Ee=="string"&&Ee!==""||typeof Ee=="number"||typeof Ee=="bigint")return Ee=Uu(""+Ee,$e.mode,Pe),Ee.return=$e,Ee;if(typeof Ee=="object"&&Ee!==null){switch(Ee.$$typeof){case T:return Pe=Bu(Ee.type,Ee.key,Ee.props,null,$e.mode,Pe),ks(Pe,Ee),Pe.return=$e,Pe;case M:return Ee=uy(Ee,$e.mode,Pe),Ee.return=$e,Ee;case ne:return Ee=kc(Ee),rt($e,Ee,Pe)}if(Ke(Ee)||le(Ee))return Ee=gl(Ee,$e.mode,Pe,null),Ee.return=$e,Ee;if(typeof Ee.then=="function")return rt($e,Wu(Ee),Pe);if(Ee.$$typeof===X)return rt($e,Hu($e,Ee),Pe);Ju($e,Ee)}return null}function Ue($e,Ee,Pe,nt){var Ut=Ee!==null?Ee.key:null;if(typeof Pe=="string"&&Pe!==""||typeof Pe=="number"||typeof Pe=="bigint")return Ut!==null?null:te($e,Ee,""+Pe,nt);if(typeof Pe=="object"&&Pe!==null){switch(Pe.$$typeof){case T:return Pe.key===Ut?ye($e,Ee,Pe,nt):null;case M:return Pe.key===Ut?Be($e,Ee,Pe,nt):null;case ne:return Pe=kc(Pe),Ue($e,Ee,Pe,nt)}if(Ke(Pe)||le(Pe))return Ut!==null?null:We($e,Ee,Pe,nt,null);if(typeof Pe.then=="function")return Ue($e,Ee,Wu(Pe),nt);if(Pe.$$typeof===X)return Ue($e,Ee,Hu($e,Pe),nt);Ju($e,Pe)}return null}function Xe($e,Ee,Pe,nt,Ut){if(typeof nt=="string"&&nt!==""||typeof nt=="number"||typeof nt=="bigint")return $e=$e.get(Pe)||null,te(Ee,$e,""+nt,Ut);if(typeof nt=="object"&&nt!==null){switch(nt.$$typeof){case T:return $e=$e.get(nt.key===null?Pe:nt.key)||null,ye(Ee,$e,nt,Ut);case M:return $e=$e.get(nt.key===null?Pe:nt.key)||null,Be(Ee,$e,nt,Ut);case ne:return nt=kc(nt),Xe($e,Ee,Pe,nt,Ut)}if(Ke(nt)||le(nt))return $e=$e.get(Pe)||null,We(Ee,$e,nt,Ut,null);if(typeof nt.then=="function")return Xe($e,Ee,Pe,Wu(nt),Ut);if(nt.$$typeof===X)return Xe($e,Ee,Pe,Hu(Ee,nt),Ut);Ju(Ee,nt)}return null}function Dt($e,Ee,Pe,nt){for(var Ut=null,pn=null,Pt=Ee,rn=Ee=0,wn=null;Pt!==null&&rn<Pe.length;rn++){Pt.index>rn?(wn=Pt,Pt=null):wn=Pt.sibling;var On=Ue($e,Pt,Pe[rn],nt);if(On===null){Pt===null&&(Pt=wn);break}a&&Pt&&On.alternate===null&&c($e,Pt),Ee=O(On,Ee,rn),pn===null?Ut=On:pn.sibling=On,pn=On,Pt=wn}if(rn===Pe.length)return f($e,Pt),vn&&ii($e,rn),Ut;if(Pt===null){for(;rn<Pe.length;rn++)Pt=rt($e,Pe[rn],nt),Pt!==null&&(Ee=O(Pt,Ee,rn),pn===null?Ut=Pt:pn.sibling=Pt,pn=Pt);return vn&&ii($e,rn),Ut}for(Pt=y(Pt);rn<Pe.length;rn++)wn=Xe(Pt,$e,rn,Pe[rn],nt),wn!==null&&(a&&wn.alternate!==null&&Pt.delete(wn.key===null?rn:wn.key),Ee=O(wn,Ee,rn),pn===null?Ut=wn:pn.sibling=wn,pn=wn);return a&&Pt.forEach(function(Bl){return c($e,Bl)}),vn&&ii($e,rn),Ut}function Xt($e,Ee,Pe,nt){if(Pe==null)throw Error(o(151));for(var Ut=null,pn=null,Pt=Ee,rn=Ee=0,wn=null,On=Pe.next();Pt!==null&&!On.done;rn++,On=Pe.next()){Pt.index>rn?(wn=Pt,Pt=null):wn=Pt.sibling;var Bl=Ue($e,Pt,On.value,nt);if(Bl===null){Pt===null&&(Pt=wn);break}a&&Pt&&Bl.alternate===null&&c($e,Pt),Ee=O(Bl,Ee,rn),pn===null?Ut=Bl:pn.sibling=Bl,pn=Bl,Pt=wn}if(On.done)return f($e,Pt),vn&&ii($e,rn),Ut;if(Pt===null){for(;!On.done;rn++,On=Pe.next())On=rt($e,On.value,nt),On!==null&&(Ee=O(On,Ee,rn),pn===null?Ut=On:pn.sibling=On,pn=On);return vn&&ii($e,rn),Ut}for(Pt=y(Pt);!On.done;rn++,On=Pe.next())On=Xe(Pt,$e,rn,On.value,nt),On!==null&&(a&&On.alternate!==null&&Pt.delete(On.key===null?rn:On.key),Ee=O(On,Ee,rn),pn===null?Ut=On:pn.sibling=On,pn=On);return a&&Pt.forEach(function(YS){return c($e,YS)}),vn&&ii($e,rn),Ut}function Qn($e,Ee,Pe,nt){if(typeof Pe=="object"&&Pe!==null&&Pe.type===I&&Pe.key===null&&(Pe=Pe.props.children),typeof Pe=="object"&&Pe!==null){switch(Pe.$$typeof){case T:e:{for(var Ut=Pe.key;Ee!==null;){if(Ee.key===Ut){if(Ut=Pe.type,Ut===I){if(Ee.tag===7){f($e,Ee.sibling),nt=j(Ee,Pe.props.children),nt.return=$e,$e=nt;break e}}else if(Ee.elementType===Ut||typeof Ut=="object"&&Ut!==null&&Ut.$$typeof===ne&&kc(Ut)===Ee.type){f($e,Ee.sibling),nt=j(Ee,Pe.props),ks(nt,Pe),nt.return=$e,$e=nt;break e}f($e,Ee);break}else c($e,Ee);Ee=Ee.sibling}Pe.type===I?(nt=gl(Pe.props.children,$e.mode,nt,Pe.key),nt.return=$e,$e=nt):(nt=Bu(Pe.type,Pe.key,Pe.props,null,$e.mode,nt),ks(nt,Pe),nt.return=$e,$e=nt)}return B($e);case M:e:{for(Ut=Pe.key;Ee!==null;){if(Ee.key===Ut)if(Ee.tag===4&&Ee.stateNode.containerInfo===Pe.containerInfo&&Ee.stateNode.implementation===Pe.implementation){f($e,Ee.sibling),nt=j(Ee,Pe.children||[]),nt.return=$e,$e=nt;break e}else{f($e,Ee);break}else c($e,Ee);Ee=Ee.sibling}nt=uy(Pe,$e.mode,nt),nt.return=$e,$e=nt}return B($e);case ne:return Pe=kc(Pe),Qn($e,Ee,Pe,nt)}if(Ke(Pe))return Dt($e,Ee,Pe,nt);if(le(Pe)){if(Ut=le(Pe),typeof Ut!="function")throw Error(o(150));return Pe=Ut.call(Pe),Xt($e,Ee,Pe,nt)}if(typeof Pe.then=="function")return Qn($e,Ee,Wu(Pe),nt);if(Pe.$$typeof===X)return Qn($e,Ee,Hu($e,Pe),nt);Ju($e,Pe)}return typeof Pe=="string"&&Pe!==""||typeof Pe=="number"||typeof Pe=="bigint"?(Pe=""+Pe,Ee!==null&&Ee.tag===6?(f($e,Ee.sibling),nt=j(Ee,Pe),nt.return=$e,$e=nt):(f($e,Ee),nt=Uu(Pe,$e.mode,nt),nt.return=$e,$e=nt),B($e)):f($e,Ee)}return function($e,Ee,Pe,nt){try{Tc=0;var Ut=Qn($e,Ee,Pe,nt);return Zu=null,Ut}catch(Pt){if(Pt===Oc||Pt===Yu)throw Pt;var pn=ti(29,Pt,null,$e.mode);return pn.lanes=nt,pn.return=$e,pn}finally{}}}var _c=Eo(!0),hh=Eo(!1),li=!1;function df(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function hf(a,c){a=a.updateQueue,c.updateQueue===a&&(c.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,callbacks:null})}function jo(a){return{lane:a,tag:0,payload:null,callback:null,next:null}}function jl(a,c,f){var y=a.updateQueue;if(y===null)return null;if(y=y.shared,(Hn&2)!==0){var j=y.pending;return j===null?c.next=c:(c.next=j.next,j.next=c),y.pending=c,c=Jp(a),s0(a,null,f),c}return Wp(a,y,c,f),Jp(a)}function Ji(a,c,f){if(c=c.updateQueue,c!==null&&(c=c.shared,(f&4194048)!==0)){var y=c.lanes;y&=a.pendingLanes,f|=y,c.lanes=f,ys(a,f)}}function Qu(a,c){var f=a.updateQueue,y=a.alternate;if(y!==null&&(y=y.updateQueue,f===y)){var j=null,O=null;if(f=f.firstBaseUpdate,f!==null){do{var B={lane:f.lane,tag:f.tag,payload:f.payload,callback:null,next:null};O===null?j=O=B:O=O.next=B,f=f.next}while(f!==null);O===null?j=O=c:O=O.next=c}else j=O=c;f={baseState:y.baseState,firstBaseUpdate:j,lastBaseUpdate:O,shared:y.shared,callbacks:y.callbacks},a.updateQueue=f;return}a=f.lastBaseUpdate,a===null?f.firstBaseUpdate=c:a.next=c,f.lastBaseUpdate=c}var $c=!1;function ph(){if($c){var a=qa;if(a!==null)throw a}}function fh(a,c,f,y){$c=!1;var j=a.updateQueue;li=!1;var O=j.firstBaseUpdate,B=j.lastBaseUpdate,te=j.shared.pending;if(te!==null){j.shared.pending=null;var ye=te,Be=ye.next;ye.next=null,B===null?O=Be:B.next=Be,B=ye;var We=a.alternate;We!==null&&(We=We.updateQueue,te=We.lastBaseUpdate,te!==B&&(te===null?We.firstBaseUpdate=Be:te.next=Be,We.lastBaseUpdate=ye))}if(O!==null){var rt=j.baseState;B=0,We=Be=ye=null,te=O;do{var Ue=te.lane&-536870913,Xe=Ue!==te.lane;if(Xe?(An&Ue)===Ue:(y&Ue)===Ue){Ue!==0&&Ue===Sl&&($c=!0),We!==null&&(We=We.next={lane:0,tag:te.tag,payload:te.payload,callback:null,next:null});e:{var Dt=a,Xt=te;Ue=c;var Qn=f;switch(Xt.tag){case 1:if(Dt=Xt.payload,typeof Dt=="function"){rt=Dt.call(Qn,rt,Ue);break e}rt=Dt;break e;case 3:Dt.flags=Dt.flags&-65537|128;case 0:if(Dt=Xt.payload,Ue=typeof Dt=="function"?Dt.call(Qn,rt,Ue):Dt,Ue==null)break e;rt=A({},rt,Ue);break e;case 2:li=!0}}Ue=te.callback,Ue!==null&&(a.flags|=64,Xe&&(a.flags|=8192),Xe=j.callbacks,Xe===null?j.callbacks=[Ue]:Xe.push(Ue))}else Xe={lane:Ue,tag:te.tag,payload:te.payload,callback:te.callback,next:null},We===null?(Be=We=Xe,ye=rt):We=We.next=Xe,B|=Ue;if(te=te.next,te===null){if(te=j.shared.pending,te===null)break;Xe=te,te=Xe.next,Xe.next=null,j.lastBaseUpdate=Xe,j.shared.pending=null}}while(!0);We===null&&(ye=rt),j.baseState=ye,j.firstBaseUpdate=Be,j.lastBaseUpdate=We,O===null&&(j.shared.lanes=0),Ga|=B,a.lanes=B,a.memoizedState=rt}}function pf(a,c){if(typeof a!="function")throw Error(o(191,a));a.call(c)}function u0(a,c){var f=a.callbacks;if(f!==null)for(a.callbacks=null,a=0;a<f.length;a++)pf(f[a],c)}var ed=He(null),td=He(0);function d0(a,c){a=No,ke(td,a),ke(ed,c),No=a|c.baseLanes}function gy(){ke(td,No),ke(ed,ed.current)}function nd(){No=td.current,Oe(ed),Oe(td)}var Ci=He(null),Qi=null;function ea(a){var c=a.alternate;ke(jr,jr.current&1),ke(Ci,a),Qi===null&&(c===null||ed.current!==null||c.memoizedState!==null)&&(Qi=a)}function yy(a){ke(jr,jr.current),ke(Ci,a),Qi===null&&(Qi=a)}function Ea(a){a.tag===22?(ke(jr,jr.current),ke(Ci,a),Qi===null&&(Qi=a)):Ba()}function Ba(){ke(jr,jr.current),ke(Ci,Ci.current)}function Is(a){Oe(Ci),Qi===a&&(Qi=null),Oe(jr)}var jr=He(0);function ff(a){for(var c=a;c!==null;){if(c.tag===13){var f=c.memoizedState;if(f!==null&&(f=f.dehydrated,f===null||em(f)||tm(f)))return c}else if(c.tag===19&&(c.memoizedProps.revealOrder==="forwards"||c.memoizedProps.revealOrder==="backwards"||c.memoizedProps.revealOrder==="unstable_legacy-backwards"||c.memoizedProps.revealOrder==="together")){if((c.flags&128)!==0)return c}else if(c.child!==null){c.child.return=c,c=c.child;continue}if(c===a)break;for(;c.sibling===null;){if(c.return===null||c.return===a)return null;c=c.return}c.sibling.return=c.return,c=c.sibling}return null}var Ua=0,en=null,Vn=null,Pr=null,mh=!1,Nc=!1,Co=!1,gh=0,rd=0,Dc=null,h0=0;function Cr(){throw Error(o(321))}function vy(a,c){if(c===null)return!1;for(var f=0;f<c.length&&f<a.length;f++)if(!ei(a[f],c[f]))return!1;return!0}function xy(a,c,f,y,j,O){return Ua=O,en=c,c.memoizedState=null,c.updateQueue=null,c.lanes=0,ce.H=a===null||a.memoizedState===null?T0:bf,Co=!1,O=f(y,j),Co=!1,Nc&&(O=wy(c,f,y,j)),by(a),O}function by(a){ce.H=Sh;var c=Vn!==null&&Vn.next!==null;if(Ua=0,Pr=Vn=en=null,mh=!1,rd=0,Dc=null,c)throw Error(o(300));a===null||qr||(a=a.dependencies,a!==null&&Cc(a)&&(qr=!0))}function wy(a,c,f,y){en=a;var j=0;do{if(Nc&&(Dc=null),rd=0,Nc=!1,25<=j)throw Error(o(301));if(j+=1,Pr=Vn=null,a.updateQueue!=null){var O=a.updateQueue;O.lastEffect=null,O.events=null,O.stores=null,O.memoCache!=null&&(O.memoCache.index=0)}ce.H=_0,O=c(f,y)}while(Nc);return O}function mA(){var a=ce.H,c=a.useState()[0];return c=typeof c.then=="function"?yh(c):c,a=a.useState()[0],(Vn!==null?Vn.memoizedState:null)!==a&&(en.flags|=1024),c}function Sy(){var a=gh!==0;return gh=0,a}function Ey(a,c,f){c.updateQueue=a.updateQueue,c.flags&=-2053,a.lanes&=~f}function jy(a){if(mh){for(a=a.memoizedState;a!==null;){var c=a.queue;c!==null&&(c.pending=null),a=a.next}mh=!1}Ua=0,Pr=Vn=en=null,Nc=!1,rd=gh=0,Dc=null}function Rs(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Pr===null?en.memoizedState=Pr=a:Pr=Pr.next=a,Pr}function Mr(){if(Vn===null){var a=en.alternate;a=a!==null?a.memoizedState:null}else a=Vn.next;var c=Pr===null?en.memoizedState:Pr.next;if(c!==null)Pr=c,Vn=a;else{if(a===null)throw en.alternate===null?Error(o(467)):Error(o(310));Vn=a,a={memoizedState:Vn.memoizedState,baseState:Vn.baseState,baseQueue:Vn.baseQueue,queue:Vn.queue,next:null},Pr===null?en.memoizedState=Pr=a:Pr=Pr.next=a}return Pr}function sd(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function yh(a){var c=rd;return rd+=1,Dc===null&&(Dc=[]),a=my(Dc,a,c),c=en,(Pr===null?c.memoizedState:Pr.next)===null&&(c=c.alternate,ce.H=c===null||c.memoizedState===null?T0:bf),a}function mf(a){if(a!==null&&typeof a=="object"){if(typeof a.then=="function")return yh(a);if(a.$$typeof===X)return Wr(a)}throw Error(o(438,String(a)))}function Cy(a){var c=null,f=en.updateQueue;if(f!==null&&(c=f.memoCache),c==null){var y=en.alternate;y!==null&&(y=y.updateQueue,y!==null&&(y=y.memoCache,y!=null&&(c={data:y.data.map(function(j){return j.slice()}),index:0})))}if(c==null&&(c={data:[],index:0}),f===null&&(f=sd(),en.updateQueue=f),f.memoCache=c,f=c.data[c.index],f===void 0)for(f=c.data[c.index]=Array(a),y=0;y<a;y++)f[y]=Ce;return c.index++,f}function ta(a,c){return typeof c=="function"?c(a):c}function gf(a){var c=Mr();return Ay(c,Vn,a)}function Ay(a,c,f){var y=a.queue;if(y===null)throw Error(o(311));y.lastRenderedReducer=f;var j=a.baseQueue,O=y.pending;if(O!==null){if(j!==null){var B=j.next;j.next=O.next,O.next=B}c.baseQueue=j=O,y.pending=null}if(O=a.baseState,j===null)a.memoizedState=O;else{c=j.next;var te=B=null,ye=null,Be=c,We=!1;do{var rt=Be.lane&-536870913;if(rt!==Be.lane?(An&rt)===rt:(Ua&rt)===rt){var Ue=Be.revertLane;if(Ue===0)ye!==null&&(ye=ye.next={lane:0,revertLane:0,gesture:null,action:Be.action,hasEagerState:Be.hasEagerState,eagerState:Be.eagerState,next:null}),rt===Sl&&(We=!0);else if((Ua&Ue)===Ue){Be=Be.next,Ue===Sl&&(We=!0);continue}else rt={lane:0,revertLane:Be.revertLane,gesture:null,action:Be.action,hasEagerState:Be.hasEagerState,eagerState:Be.eagerState,next:null},ye===null?(te=ye=rt,B=O):ye=ye.next=rt,en.lanes|=Ue,Ga|=Ue;rt=Be.action,Co&&f(O,rt),O=Be.hasEagerState?Be.eagerState:f(O,rt)}else Ue={lane:rt,revertLane:Be.revertLane,gesture:Be.gesture,action:Be.action,hasEagerState:Be.hasEagerState,eagerState:Be.eagerState,next:null},ye===null?(te=ye=Ue,B=O):ye=ye.next=Ue,en.lanes|=rt,Ga|=rt;Be=Be.next}while(Be!==null&&Be!==c);if(ye===null?B=O:ye.next=te,!ei(O,a.memoizedState)&&(qr=!0,We&&(f=qa,f!==null)))throw f;a.memoizedState=O,a.baseState=B,a.baseQueue=ye,y.lastRenderedState=O}return j===null&&(y.lanes=0),[a.memoizedState,y.dispatch]}function vh(a){var c=Mr(),f=c.queue;if(f===null)throw Error(o(311));f.lastRenderedReducer=a;var y=f.dispatch,j=f.pending,O=c.memoizedState;if(j!==null){f.pending=null;var B=j=j.next;do O=a(O,B.action),B=B.next;while(B!==j);ei(O,c.memoizedState)||(qr=!0),c.memoizedState=O,c.baseQueue===null&&(c.baseState=O),f.lastRenderedState=O}return[O,y]}function Oy(a,c,f){var y=en,j=Mr(),O=vn;if(O){if(f===void 0)throw Error(o(407));f=f()}else f=c();var B=!ei((Vn||j).memoizedState,f);if(B&&(j.memoizedState=f,qr=!0),j=j.queue,Ly(p0.bind(null,y,j,a),[a]),j.getSnapshot!==c||B||Pr!==null&&Pr.memoizedState.tag&1){if(y.flags|=2048,id(9,{destroy:void 0},Ry.bind(null,y,j,f,c),null),lr===null)throw Error(o(349));O||(Ua&127)!==0||ky(y,c,f)}return f}function ky(a,c,f){a.flags|=16384,a={getSnapshot:c,value:f},c=en.updateQueue,c===null?(c=sd(),en.updateQueue=c,c.stores=[a]):(f=c.stores,f===null?c.stores=[a]:f.push(a))}function Ry(a,c,f,y){c.value=f,c.getSnapshot=y,Ty(c)&&_y(a)}function p0(a,c,f){return f(function(){Ty(c)&&_y(a)})}function Ty(a){var c=a.getSnapshot;a=a.value;try{var f=c();return!ei(a,f)}catch{return!0}}function _y(a){var c=bc(a,2);c!==null&&_s(c,a,2)}function $y(a){var c=Rs();if(typeof a=="function"){var f=a;if(a=f(),Co){wi(!0);try{f()}finally{wi(!1)}}}return c.memoizedState=c.baseState=a,c.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ta,lastRenderedState:a},c}function f0(a,c,f,y){return a.baseState=f,Ay(a,Vn,typeof y=="function"?y:ta)}function m0(a,c,f,y,j){if(xf(a))throw Error(o(485));if(a=c.action,a!==null){var O={payload:j,action:a,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(B){O.listeners.push(B)}};ce.T!==null?f(!0):O.isTransition=!1,y(O),f=c.pending,f===null?(O.next=c.pending=O,Ny(c,O)):(O.next=f.next,c.pending=f.next=O)}}function Ny(a,c){var f=c.action,y=c.payload,j=a.state;if(c.isTransition){var O=ce.T,B={};ce.T=B;try{var te=f(j,y),ye=ce.S;ye!==null&&ye(B,te),Dy(a,c,te)}catch(Be){My(a,c,Be)}finally{O!==null&&B.types!==null&&(O.types=B.types),ce.T=O}}else try{O=f(j,y),Dy(a,c,O)}catch(Be){My(a,c,Be)}}function Dy(a,c,f){f!==null&&typeof f=="object"&&typeof f.then=="function"?f.then(function(y){Py(a,c,y)},function(y){return My(a,c,y)}):Py(a,c,f)}function Py(a,c,f){c.status="fulfilled",c.value=f,g0(c),a.state=f,c=a.pending,c!==null&&(f=c.next,f===c?a.pending=null:(f=f.next,c.next=f,Ny(a,f)))}function My(a,c,f){var y=a.pending;if(a.pending=null,y!==null){y=y.next;do c.status="rejected",c.reason=f,g0(c),c=c.next;while(c!==y)}a.action=null}function g0(a){a=a.listeners;for(var c=0;c<a.length;c++)(0,a[c])()}function Iy(a,c){return c}function y0(a,c){if(vn){var f=lr.formState;if(f!==null){e:{var y=en;if(vn){if(hr){t:{for(var j=hr,O=ai;j.nodeType!==8;){if(!O){j=null;break t}if(j=hi(j.nextSibling),j===null){j=null;break t}}O=j.data,j=O==="F!"||O==="F"?j:null}if(j){hr=hi(j.nextSibling),y=j.data==="F!";break e}}xl(y)}y=!1}y&&(c=f[0])}}return f=Rs(),f.memoizedState=f.baseState=c,y={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Iy,lastRenderedState:c},f.queue=y,f=O0.bind(null,en,y),y.dispatch=f,y=$y(!1),O=Xy.bind(null,en,!1,y.queue),y=Rs(),j={state:c,dispatch:null,action:a,pending:null},y.queue=j,f=m0.bind(null,en,j,O,f),j.dispatch=f,y.memoizedState=a,[c,f,!1]}function v0(a){var c=Mr();return Ka(c,Vn,a)}function Ka(a,c,f){if(c=Ay(a,c,Iy)[0],a=gf(ta)[0],typeof c=="object"&&c!==null&&typeof c.then=="function")try{var y=yh(c)}catch(B){throw B===Oc?Yu:B}else y=c;c=Mr();var j=c.queue,O=j.dispatch;return f!==c.memoizedState&&(en.flags|=2048,id(9,{destroy:void 0},gA.bind(null,j,f),null)),[y,O,a]}function gA(a,c){a.action=c}function x0(a){var c=Mr(),f=Vn;if(f!==null)return Ka(c,f,a);Mr(),c=c.memoizedState,f=Mr();var y=f.queue.dispatch;return f.memoizedState=a,[c,y,!1]}function id(a,c,f,y){return a={tag:a,create:f,deps:y,inst:c,next:null},c=en.updateQueue,c===null&&(c=sd(),en.updateQueue=c),f=c.lastEffect,f===null?c.lastEffect=a.next=a:(y=f.next,f.next=a,a.next=y,c.lastEffect=a),a}function b0(){return Mr().memoizedState}function xh(a,c,f,y){var j=Rs();en.flags|=a,j.memoizedState=id(1|c,{destroy:void 0},f,y===void 0?null:y)}function yf(a,c,f,y){var j=Mr();y=y===void 0?null:y;var O=j.memoizedState.inst;Vn!==null&&y!==null&&vy(y,Vn.memoizedState.deps)?j.memoizedState=id(c,O,f,y):(en.flags|=a,j.memoizedState=id(1|c,O,f,y))}function zy(a,c){xh(8390656,8,a,c)}function Ly(a,c){yf(2048,8,a,c)}function yA(a){en.flags|=4;var c=en.updateQueue;if(c===null)c=sd(),en.updateQueue=c,c.events=[a];else{var f=c.events;f===null?c.events=[a]:f.push(a)}}function w0(a){var c=Mr().memoizedState;return yA({ref:c,nextImpl:a}),function(){if((Hn&2)!==0)throw Error(o(440));return c.impl.apply(void 0,arguments)}}function Pc(a,c){return yf(4,2,a,c)}function vf(a,c){return yf(4,4,a,c)}function S0(a,c){if(typeof c=="function"){a=a();var f=c(a);return function(){typeof f=="function"?f():c(null)}}if(c!=null)return a=a(),c.current=a,function(){c.current=null}}function Va(a,c,f){f=f!=null?f.concat([a]):null,yf(4,4,S0.bind(null,c,a),f)}function Fy(){}function qy(a,c){var f=Mr();c=c===void 0?null:c;var y=f.memoizedState;return c!==null&&vy(c,y[1])?y[0]:(f.memoizedState=[a,c],a)}function By(a,c){var f=Mr();c=c===void 0?null:c;var y=f.memoizedState;if(c!==null&&vy(c,y[1]))return y[0];if(y=a(),Co){wi(!0);try{a()}finally{wi(!1)}}return f.memoizedState=[y,c],y}function Uy(a,c,f){return f===void 0||(Ua&1073741824)!==0&&(An&261930)===0?a.memoizedState=c:(a.memoizedState=f,a=wv(),en.lanes|=a,Ga|=a,f)}function E0(a,c,f,y){return ei(f,c)?f:ed.current!==null?(a=Uy(a,f,y),ei(a,c)||(qr=!0),a):(Ua&42)===0||(Ua&1073741824)!==0&&(An&261930)===0?(qr=!0,a.memoizedState=f):(a=wv(),en.lanes|=a,Ga|=a,c)}function j0(a,c,f,y,j){var O=re.p;re.p=O!==0&&8>O?O:8;var B=ce.T,te={};ce.T=te,Xy(a,!1,c,f);try{var ye=j(),Be=ce.S;if(Be!==null&&Be(te,ye),ye!==null&&typeof ye=="object"&&typeof ye.then=="function"){var We=sf(ye,y);wh(a,c,We,ki(a))}else wh(a,c,y,ki(a))}catch(rt){wh(a,c,{then:function(){},status:"rejected",reason:rt},ki())}finally{re.p=O,B!==null&&te.types!==null&&(B.types=te.types),ce.T=B}}function vA(){}function Ky(a,c,f,y){if(a.tag!==5)throw Error(o(476));var j=Vy(a).queue;j0(a,j,c,ue,f===null?vA:function(){return Hy(a),f(y)})}function Vy(a){var c=a.memoizedState;if(c!==null)return c;c={memoizedState:ue,baseState:ue,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ta,lastRenderedState:ue},next:null};var f={};return c.next={memoizedState:f,baseState:f,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ta,lastRenderedState:f},next:null},a.memoizedState=c,a=a.alternate,a!==null&&(a.memoizedState=c),c}function Hy(a){var c=Vy(a);c.next===null&&(c=a.alternate.memoizedState),wh(a,c.next.queue,{},ki())}function bh(){return Wr(bd)}function C0(){return Mr().memoizedState}function Gy(){return Mr().memoizedState}function xA(a){for(var c=a.return;c!==null;){switch(c.tag){case 24:case 3:var f=ki();a=jo(f);var y=jl(c,a,f);y!==null&&(_s(y,c,f),Ji(y,c,f)),c={cache:rf()},a.payload=c;return}c=c.return}}function A0(a,c,f){var y=ki();f={lane:y,revertLane:0,gesture:null,action:f,hasEagerState:!1,eagerState:null,next:null},xf(a)?k0(c,f):(f=ly(a,c,f,y),f!==null&&(_s(f,a,y),R0(f,c,y)))}function O0(a,c,f){var y=ki();wh(a,c,f,y)}function wh(a,c,f,y){var j={lane:y,revertLane:0,gesture:null,action:f,hasEagerState:!1,eagerState:null,next:null};if(xf(a))k0(c,j);else{var O=a.alternate;if(a.lanes===0&&(O===null||O.lanes===0)&&(O=c.lastRenderedReducer,O!==null))try{var B=c.lastRenderedState,te=O(B,f);if(j.hasEagerState=!0,j.eagerState=te,ei(te,B))return Wp(a,c,j,0),lr===null&&Zp(),!1}catch{}finally{}if(f=ly(a,c,j,y),f!==null)return _s(f,a,y),R0(f,c,y),!0}return!1}function Xy(a,c,f,y){if(y={lane:2,revertLane:$v(),gesture:null,action:y,hasEagerState:!1,eagerState:null,next:null},xf(a)){if(c)throw Error(o(479))}else c=ly(a,f,y,2),c!==null&&_s(c,a,2)}function xf(a){var c=a.alternate;return a===en||c!==null&&c===en}function k0(a,c){Nc=mh=!0;var f=a.pending;f===null?c.next=c:(c.next=f.next,f.next=c),a.pending=c}function R0(a,c,f){if((f&4194048)!==0){var y=c.lanes;y&=a.pendingLanes,f|=y,c.lanes=f,ys(a,f)}}var Sh={readContext:Wr,use:mf,useCallback:Cr,useContext:Cr,useEffect:Cr,useImperativeHandle:Cr,useLayoutEffect:Cr,useInsertionEffect:Cr,useMemo:Cr,useReducer:Cr,useRef:Cr,useState:Cr,useDebugValue:Cr,useDeferredValue:Cr,useTransition:Cr,useSyncExternalStore:Cr,useId:Cr,useHostTransitionStatus:Cr,useFormState:Cr,useActionState:Cr,useOptimistic:Cr,useMemoCache:Cr,useCacheRefresh:Cr};Sh.useEffectEvent=Cr;var T0={readContext:Wr,use:mf,useCallback:function(a,c){return Rs().memoizedState=[a,c===void 0?null:c],a},useContext:Wr,useEffect:zy,useImperativeHandle:function(a,c,f){f=f!=null?f.concat([a]):null,xh(4194308,4,S0.bind(null,c,a),f)},useLayoutEffect:function(a,c){return xh(4194308,4,a,c)},useInsertionEffect:function(a,c){xh(4,2,a,c)},useMemo:function(a,c){var f=Rs();c=c===void 0?null:c;var y=a();if(Co){wi(!0);try{a()}finally{wi(!1)}}return f.memoizedState=[y,c],y},useReducer:function(a,c,f){var y=Rs();if(f!==void 0){var j=f(c);if(Co){wi(!0);try{f(c)}finally{wi(!1)}}}else j=c;return y.memoizedState=y.baseState=j,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:j},y.queue=a,a=a.dispatch=A0.bind(null,en,a),[y.memoizedState,a]},useRef:function(a){var c=Rs();return a={current:a},c.memoizedState=a},useState:function(a){a=$y(a);var c=a.queue,f=O0.bind(null,en,c);return c.dispatch=f,[a.memoizedState,f]},useDebugValue:Fy,useDeferredValue:function(a,c){var f=Rs();return Uy(f,a,c)},useTransition:function(){var a=$y(!1);return a=j0.bind(null,en,a.queue,!0,!1),Rs().memoizedState=a,[!1,a]},useSyncExternalStore:function(a,c,f){var y=en,j=Rs();if(vn){if(f===void 0)throw Error(o(407));f=f()}else{if(f=c(),lr===null)throw Error(o(349));(An&127)!==0||ky(y,c,f)}j.memoizedState=f;var O={value:f,getSnapshot:c};return j.queue=O,zy(p0.bind(null,y,O,a),[a]),y.flags|=2048,id(9,{destroy:void 0},Ry.bind(null,y,O,f,c),null),f},useId:function(){var a=Rs(),c=lr.identifierPrefix;if(vn){var f=za,y=Kn;f=(y&~(1<<32-Xr(y)-1)).toString(32)+f,c="_"+c+"R_"+f,f=gh++,0<f&&(c+="H"+f.toString(32)),c+="_"}else f=h0++,c="_"+c+"r_"+f.toString(32)+"_";return a.memoizedState=c},useHostTransitionStatus:bh,useFormState:y0,useActionState:y0,useOptimistic:function(a){var c=Rs();c.memoizedState=c.baseState=a;var f={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return c.queue=f,c=Xy.bind(null,en,!0,f),f.dispatch=c,[a,c]},useMemoCache:Cy,useCacheRefresh:function(){return Rs().memoizedState=xA.bind(null,en)},useEffectEvent:function(a){var c=Rs(),f={impl:a};return c.memoizedState=f,function(){if((Hn&2)!==0)throw Error(o(440));return f.impl.apply(void 0,arguments)}}},bf={readContext:Wr,use:mf,useCallback:qy,useContext:Wr,useEffect:Ly,useImperativeHandle:Va,useInsertionEffect:Pc,useLayoutEffect:vf,useMemo:By,useReducer:gf,useRef:b0,useState:function(){return gf(ta)},useDebugValue:Fy,useDeferredValue:function(a,c){var f=Mr();return E0(f,Vn.memoizedState,a,c)},useTransition:function(){var a=gf(ta)[0],c=Mr().memoizedState;return[typeof a=="boolean"?a:yh(a),c]},useSyncExternalStore:Oy,useId:C0,useHostTransitionStatus:bh,useFormState:v0,useActionState:v0,useOptimistic:function(a,c){var f=Mr();return f0(f,Vn,a,c)},useMemoCache:Cy,useCacheRefresh:Gy};bf.useEffectEvent=w0;var _0={readContext:Wr,use:mf,useCallback:qy,useContext:Wr,useEffect:Ly,useImperativeHandle:Va,useInsertionEffect:Pc,useLayoutEffect:vf,useMemo:By,useReducer:vh,useRef:b0,useState:function(){return vh(ta)},useDebugValue:Fy,useDeferredValue:function(a,c){var f=Mr();return Vn===null?Uy(f,a,c):E0(f,Vn.memoizedState,a,c)},useTransition:function(){var a=vh(ta)[0],c=Mr().memoizedState;return[typeof a=="boolean"?a:yh(a),c]},useSyncExternalStore:Oy,useId:C0,useHostTransitionStatus:bh,useFormState:x0,useActionState:x0,useOptimistic:function(a,c){var f=Mr();return Vn!==null?f0(f,Vn,a,c):(f.baseState=a,[a,f.queue.dispatch])},useMemoCache:Cy,useCacheRefresh:Gy};_0.useEffectEvent=w0;function Yy(a,c,f,y){c=a.memoizedState,f=f(y,c),f=f==null?c:A({},c,f),a.memoizedState=f,a.lanes===0&&(a.updateQueue.baseState=f)}var Zy={enqueueSetState:function(a,c,f){a=a._reactInternals;var y=ki(),j=jo(y);j.payload=c,f!=null&&(j.callback=f),c=jl(a,j,y),c!==null&&(_s(c,a,y),Ji(c,a,y))},enqueueReplaceState:function(a,c,f){a=a._reactInternals;var y=ki(),j=jo(y);j.tag=1,j.payload=c,f!=null&&(j.callback=f),c=jl(a,j,y),c!==null&&(_s(c,a,y),Ji(c,a,y))},enqueueForceUpdate:function(a,c){a=a._reactInternals;var f=ki(),y=jo(f);y.tag=2,c!=null&&(y.callback=c),c=jl(a,y,f),c!==null&&(_s(c,a,f),Ji(c,a,f))}};function ad(a,c,f,y,j,O,B){return a=a.stateNode,typeof a.shouldComponentUpdate=="function"?a.shouldComponentUpdate(y,O,B):c.prototype&&c.prototype.isPureReactComponent?!Iu(f,y)||!Iu(j,O):!0}function $0(a,c,f,y){a=c.state,typeof c.componentWillReceiveProps=="function"&&c.componentWillReceiveProps(f,y),typeof c.UNSAFE_componentWillReceiveProps=="function"&&c.UNSAFE_componentWillReceiveProps(f,y),c.state!==a&&Zy.enqueueReplaceState(c,c.state,null)}function Mc(a,c){var f=c;if("ref"in c){f={};for(var y in c)y!=="ref"&&(f[y]=c[y])}if(a=a.defaultProps){f===c&&(f=A({},f));for(var j in a)f[j]===void 0&&(f[j]=a[j])}return f}function N0(a){xc(a)}function D0(a){console.error(a)}function P0(a){xc(a)}function wf(a,c){try{var f=a.onUncaughtError;f(c.value,{componentStack:c.stack})}catch(y){setTimeout(function(){throw y})}}function M0(a,c,f){try{var y=a.onCaughtError;y(f.value,{componentStack:f.stack,errorBoundary:c.tag===1?c.stateNode:null})}catch(j){setTimeout(function(){throw j})}}function Wy(a,c,f){return f=jo(f),f.tag=3,f.payload={element:null},f.callback=function(){wf(a,c)},f}function Jy(a){return a=jo(a),a.tag=3,a}function Cl(a,c,f,y){var j=f.type.getDerivedStateFromError;if(typeof j=="function"){var O=y.value;a.payload=function(){return j(O)},a.callback=function(){M0(c,f,y)}}var B=f.stateNode;B!==null&&typeof B.componentDidCatch=="function"&&(a.callback=function(){M0(c,f,y),typeof j!="function"&&(Nl===null?Nl=new Set([this]):Nl.add(this));var te=y.stack;this.componentDidCatch(y.value,{componentStack:te!==null?te:""})})}function I0(a,c,f,y,j){if(f.flags|=32768,y!==null&&typeof y=="object"&&typeof y.then=="function"){if(c=f.alternate,c!==null&&jc(c,f,j,!0),f=Ci.current,f!==null){switch(f.tag){case 31:case 13:return Qi===null?Lf():f.alternate===null&&Ar===0&&(Ar=3),f.flags&=-257,f.flags|=65536,f.lanes=j,y===cf?f.flags|=16384:(c=f.updateQueue,c===null?f.updateQueue=new Set([y]):c.add(y),Av(a,y,j)),!1;case 22:return f.flags|=65536,y===cf?f.flags|=16384:(c=f.updateQueue,c===null?(c={transitions:null,markerInstances:null,retryQueue:new Set([y])},f.updateQueue=c):(f=c.retryQueue,f===null?c.retryQueue=new Set([y]):f.add(y)),Av(a,y,j)),!1}throw Error(o(435,f.tag))}return Av(a,y,j),Lf(),!1}if(vn)return c=Ci.current,c!==null?((c.flags&65536)===0&&(c.flags|=256),c.flags|=65536,c.lanes=j,y!==dy&&(a=Error(o(422),{cause:y}),ch(ri(a,f)))):(y!==dy&&(c=Error(o(423),{cause:y}),ch(ri(c,f))),a=a.current.alternate,a.flags|=65536,j&=-j,a.lanes|=j,y=ri(y,f),j=Wy(a.stateNode,y,j),Qu(a,j),Ar!==4&&(Ar=2)),!1;var O=Error(o(520),{cause:y});if(O=ri(O,f),_h===null?_h=[O]:_h.push(O),Ar!==4&&(Ar=2),c===null)return!0;y=ri(y,f),f=c;do{switch(f.tag){case 3:return f.flags|=65536,a=j&-j,f.lanes|=a,a=Wy(f.stateNode,y,a),Qu(f,a),!1;case 1:if(c=f.type,O=f.stateNode,(f.flags&128)===0&&(typeof c.getDerivedStateFromError=="function"||O!==null&&typeof O.componentDidCatch=="function"&&(Nl===null||!Nl.has(O))))return f.flags|=65536,j&=-j,f.lanes|=j,j=Jy(j),Cl(j,a,f,y),Qu(f,j),!1}f=f.return}while(f!==null);return!1}var Qy=Error(o(461)),qr=!1;function vs(a,c,f,y){c.child=a===null?hh(c,null,f,y):_c(c,a.child,f,y)}function Al(a,c,f,y,j){f=f.render;var O=c.ref;if("ref"in y){var B={};for(var te in y)te!=="ref"&&(B[te]=y[te])}else B=y;return bl(c),y=xy(a,c,f,B,O,j),te=Sy(),a!==null&&!qr?(Ey(a,c,j),Oo(a,c,j)):(vn&&te&&wc(c),c.flags|=1,vs(a,c,y,j),c.child)}function z0(a,c,f,y,j){if(a===null){var O=f.type;return typeof O=="function"&&!Qp(O)&&O.defaultProps===void 0&&f.compare===null?(c.tag=15,c.type=O,L0(a,c,O,y,j)):(a=Bu(f.type,null,y,c,c.mode,j),a.ref=c.ref,a.return=c,c.child=a)}if(O=a.child,!Af(a,j)){var B=O.memoizedProps;if(f=f.compare,f=f!==null?f:Iu,f(B,y)&&a.ref===c.ref)return Oo(a,c,j)}return c.flags|=1,a=ni(O,y),a.ref=c.ref,a.return=c,c.child=a}function L0(a,c,f,y,j){if(a!==null){var O=a.memoizedProps;if(Iu(O,y)&&a.ref===c.ref)if(qr=!1,c.pendingProps=y=O,Af(a,j))(a.flags&131072)!==0&&(qr=!0);else return c.lanes=a.lanes,Oo(a,c,j)}return tv(a,c,f,y,j)}function F0(a,c,f,y){var j=y.children,O=a!==null?a.memoizedState:null;if(a===null&&c.stateNode===null&&(c.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),y.mode==="hidden"){if((c.flags&128)!==0){if(O=O!==null?O.baseLanes|f:f,a!==null){for(y=c.child=a.child,j=0;y!==null;)j=j|y.lanes|y.childLanes,y=y.sibling;y=j&~O}else y=0,c.child=null;return ev(a,c,O,f,y)}if((f&536870912)!==0)c.memoizedState={baseLanes:0,cachePool:null},a!==null&&dh(c,O!==null?O.cachePool:null),O!==null?d0(c,O):gy(),Ea(c);else return y=c.lanes=536870912,ev(a,c,O!==null?O.baseLanes|f:f,f,y)}else O!==null?(dh(c,O.cachePool),d0(c,O),Ba(),c.memoizedState=null):(a!==null&&dh(c,null),gy(),Ba());return vs(a,c,j,f),c.child}function Ol(a,c){return a!==null&&a.tag===22||c.stateNode!==null||(c.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),c.sibling}function ev(a,c,f,y,j){var O=af();return O=O===null?null:{parent:Dr._currentValue,pool:O},c.memoizedState={baseLanes:f,cachePool:O},a!==null&&dh(c,null),gy(),Ea(c),a!==null&&jc(a,c,y,!0),c.childLanes=j,null}function Sf(a,c){return c=Cf({mode:c.mode,children:c.children},a.mode),c.ref=a.ref,a.child=c,c.return=a,c}function Ef(a,c,f){return _c(c,a.child,null,f),a=Sf(c,c.pendingProps),a.flags|=2,Is(c),c.memoizedState=null,a}function bA(a,c,f){var y=c.pendingProps,j=(c.flags&128)!==0;if(c.flags&=-129,a===null){if(vn){if(y.mode==="hidden")return a=Sf(c,y),c.lanes=536870912,Ol(null,a);if(yy(c),(a=hr)?(a=zl(a,ai),a=a!==null&&a.data==="&"?a:null,a!==null&&(c.memoizedState={dehydrated:a,treeContext:xo!==null?{id:Kn,overflow:za}:null,retryLane:536870912,hydrationErrors:null},f=i0(a),f.return=c,c.child=f,Fr=c,hr=null)):a=null,a===null)throw xl(c);return c.lanes=536870912,null}return Sf(c,y)}var O=a.memoizedState;if(O!==null){var B=O.dehydrated;if(yy(c),j)if(c.flags&256)c.flags&=-257,c=Ef(a,c,f);else if(c.memoizedState!==null)c.child=a.child,c.flags|=128,c=null;else throw Error(o(558));else if(qr||jc(a,c,f,!1),j=(f&a.childLanes)!==0,qr||j){if(y=lr,y!==null&&(B=Zs(y,f),B!==0&&B!==O.retryLane))throw O.retryLane=B,bc(a,B),_s(y,a,B),Qy;Lf(),c=Ef(a,c,f)}else a=O.treeContext,hr=hi(B.nextSibling),Fr=c,vn=!0,vl=null,ai=!1,a!==null&&wo(c,a),c=Sf(c,y),c.flags|=4096;return c}return a=ni(a.child,{mode:y.mode,children:y.children}),a.ref=c.ref,c.child=a,a.return=c,a}function jf(a,c){var f=c.ref;if(f===null)a!==null&&a.ref!==null&&(c.flags|=4194816);else{if(typeof f!="function"&&typeof f!="object")throw Error(o(284));(a===null||a.ref!==f)&&(c.flags|=4194816)}}function tv(a,c,f,y,j){return bl(c),f=xy(a,c,f,y,void 0,j),y=Sy(),a!==null&&!qr?(Ey(a,c,j),Oo(a,c,j)):(vn&&y&&wc(c),c.flags|=1,vs(a,c,f,j),c.child)}function Ao(a,c,f,y,j,O){return bl(c),c.updateQueue=null,f=wy(c,y,f,j),by(a),y=Sy(),a!==null&&!qr?(Ey(a,c,O),Oo(a,c,O)):(vn&&y&&wc(c),c.flags|=1,vs(a,c,f,O),c.child)}function od(a,c,f,y,j){if(bl(c),c.stateNode===null){var O=Fu,B=f.contextType;typeof B=="object"&&B!==null&&(O=Wr(B)),O=new f(y,O),c.memoizedState=O.state!==null&&O.state!==void 0?O.state:null,O.updater=Zy,c.stateNode=O,O._reactInternals=c,O=c.stateNode,O.props=y,O.state=c.memoizedState,O.refs={},df(c),B=f.contextType,O.context=typeof B=="object"&&B!==null?Wr(B):Fu,O.state=c.memoizedState,B=f.getDerivedStateFromProps,typeof B=="function"&&(Yy(c,f,B,y),O.state=c.memoizedState),typeof f.getDerivedStateFromProps=="function"||typeof O.getSnapshotBeforeUpdate=="function"||typeof O.UNSAFE_componentWillMount!="function"&&typeof O.componentWillMount!="function"||(B=O.state,typeof O.componentWillMount=="function"&&O.componentWillMount(),typeof O.UNSAFE_componentWillMount=="function"&&O.UNSAFE_componentWillMount(),B!==O.state&&Zy.enqueueReplaceState(O,O.state,null),fh(c,y,O,j),ph(),O.state=c.memoizedState),typeof O.componentDidMount=="function"&&(c.flags|=4194308),y=!0}else if(a===null){O=c.stateNode;var te=c.memoizedProps,ye=Mc(f,te);O.props=ye;var Be=O.context,We=f.contextType;B=Fu,typeof We=="object"&&We!==null&&(B=Wr(We));var rt=f.getDerivedStateFromProps;We=typeof rt=="function"||typeof O.getSnapshotBeforeUpdate=="function",te=c.pendingProps!==te,We||typeof O.UNSAFE_componentWillReceiveProps!="function"&&typeof O.componentWillReceiveProps!="function"||(te||Be!==B)&&$0(c,O,y,B),li=!1;var Ue=c.memoizedState;O.state=Ue,fh(c,y,O,j),ph(),Be=c.memoizedState,te||Ue!==Be||li?(typeof rt=="function"&&(Yy(c,f,rt,y),Be=c.memoizedState),(ye=li||ad(c,f,ye,y,Ue,Be,B))?(We||typeof O.UNSAFE_componentWillMount!="function"&&typeof O.componentWillMount!="function"||(typeof O.componentWillMount=="function"&&O.componentWillMount(),typeof O.UNSAFE_componentWillMount=="function"&&O.UNSAFE_componentWillMount()),typeof O.componentDidMount=="function"&&(c.flags|=4194308)):(typeof O.componentDidMount=="function"&&(c.flags|=4194308),c.memoizedProps=y,c.memoizedState=Be),O.props=y,O.state=Be,O.context=B,y=ye):(typeof O.componentDidMount=="function"&&(c.flags|=4194308),y=!1)}else{O=c.stateNode,hf(a,c),B=c.memoizedProps,We=Mc(f,B),O.props=We,rt=c.pendingProps,Ue=O.context,Be=f.contextType,ye=Fu,typeof Be=="object"&&Be!==null&&(ye=Wr(Be)),te=f.getDerivedStateFromProps,(Be=typeof te=="function"||typeof O.getSnapshotBeforeUpdate=="function")||typeof O.UNSAFE_componentWillReceiveProps!="function"&&typeof O.componentWillReceiveProps!="function"||(B!==rt||Ue!==ye)&&$0(c,O,y,ye),li=!1,Ue=c.memoizedState,O.state=Ue,fh(c,y,O,j),ph();var Xe=c.memoizedState;B!==rt||Ue!==Xe||li||a!==null&&a.dependencies!==null&&Cc(a.dependencies)?(typeof te=="function"&&(Yy(c,f,te,y),Xe=c.memoizedState),(We=li||ad(c,f,We,y,Ue,Xe,ye)||a!==null&&a.dependencies!==null&&Cc(a.dependencies))?(Be||typeof O.UNSAFE_componentWillUpdate!="function"&&typeof O.componentWillUpdate!="function"||(typeof O.componentWillUpdate=="function"&&O.componentWillUpdate(y,Xe,ye),typeof O.UNSAFE_componentWillUpdate=="function"&&O.UNSAFE_componentWillUpdate(y,Xe,ye)),typeof O.componentDidUpdate=="function"&&(c.flags|=4),typeof O.getSnapshotBeforeUpdate=="function"&&(c.flags|=1024)):(typeof O.componentDidUpdate!="function"||B===a.memoizedProps&&Ue===a.memoizedState||(c.flags|=4),typeof O.getSnapshotBeforeUpdate!="function"||B===a.memoizedProps&&Ue===a.memoizedState||(c.flags|=1024),c.memoizedProps=y,c.memoizedState=Xe),O.props=y,O.state=Xe,O.context=ye,y=We):(typeof O.componentDidUpdate!="function"||B===a.memoizedProps&&Ue===a.memoizedState||(c.flags|=4),typeof O.getSnapshotBeforeUpdate!="function"||B===a.memoizedProps&&Ue===a.memoizedState||(c.flags|=1024),y=!1)}return O=y,jf(a,c),y=(c.flags&128)!==0,O||y?(O=c.stateNode,f=y&&typeof f.getDerivedStateFromError!="function"?null:O.render(),c.flags|=1,a!==null&&y?(c.child=_c(c,a.child,null,j),c.child=_c(c,null,f,j)):vs(a,c,f,j),c.memoizedState=O.state,a=c.child):a=Oo(a,c,j),a}function q0(a,c,f,y){return La(),c.flags|=256,vs(a,c,f,y),c.child}var nv={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function rv(a){return{baseLanes:a,cachePool:of()}}function sv(a,c,f){return a=a!==null?a.childLanes&~f:0,c&&(a|=Ts),a}function B0(a,c,f){var y=c.pendingProps,j=!1,O=(c.flags&128)!==0,B;if((B=O)||(B=a!==null&&a.memoizedState===null?!1:(jr.current&2)!==0),B&&(j=!0,c.flags&=-129),B=(c.flags&32)!==0,c.flags&=-33,a===null){if(vn){if(j?ea(c):Ba(),(a=hr)?(a=zl(a,ai),a=a!==null&&a.data!=="&"?a:null,a!==null&&(c.memoizedState={dehydrated:a,treeContext:xo!==null?{id:Kn,overflow:za}:null,retryLane:536870912,hydrationErrors:null},f=i0(a),f.return=c,c.child=f,Fr=c,hr=null)):a=null,a===null)throw xl(c);return tm(a)?c.lanes=32:c.lanes=536870912,null}var te=y.children;return y=y.fallback,j?(Ba(),j=c.mode,te=Cf({mode:"hidden",children:te},j),y=gl(y,j,f,null),te.return=c,y.return=c,te.sibling=y,c.child=te,y=c.child,y.memoizedState=rv(f),y.childLanes=sv(a,B,f),c.memoizedState=nv,Ol(null,y)):(ea(c),kl(c,te))}var ye=a.memoizedState;if(ye!==null&&(te=ye.dehydrated,te!==null)){if(O)c.flags&256?(ea(c),c.flags&=-257,c=Rl(a,c,f)):c.memoizedState!==null?(Ba(),c.child=a.child,c.flags|=128,c=null):(Ba(),te=y.fallback,j=c.mode,y=Cf({mode:"visible",children:y.children},j),te=gl(te,j,f,null),te.flags|=2,y.return=c,te.return=c,y.sibling=te,c.child=y,_c(c,a.child,null,f),y=c.child,y.memoizedState=rv(f),y.childLanes=sv(a,B,f),c.memoizedState=nv,c=Ol(null,y));else if(ea(c),tm(te)){if(B=te.nextSibling&&te.nextSibling.dataset,B)var Be=B.dgst;B=Be,y=Error(o(419)),y.stack="",y.digest=B,ch({value:y,source:null,stack:null}),c=Rl(a,c,f)}else if(qr||jc(a,c,f,!1),B=(f&a.childLanes)!==0,qr||B){if(B=lr,B!==null&&(y=Zs(B,f),y!==0&&y!==ye.retryLane))throw ye.retryLane=y,bc(a,y),_s(B,a,y),Qy;em(te)||Lf(),c=Rl(a,c,f)}else em(te)?(c.flags|=192,c.child=a.child,c=null):(a=ye.treeContext,hr=hi(te.nextSibling),Fr=c,vn=!0,vl=null,ai=!1,a!==null&&wo(c,a),c=kl(c,y.children),c.flags|=4096);return c}return j?(Ba(),te=y.fallback,j=c.mode,ye=a.child,Be=ye.sibling,y=ni(ye,{mode:"hidden",children:y.children}),y.subtreeFlags=ye.subtreeFlags&65011712,Be!==null?te=ni(Be,te):(te=gl(te,j,f,null),te.flags|=2),te.return=c,y.return=c,y.sibling=te,c.child=y,Ol(null,y),y=c.child,te=a.child.memoizedState,te===null?te=rv(f):(j=te.cachePool,j!==null?(ye=Dr._currentValue,j=j.parent!==ye?{parent:ye,pool:ye}:j):j=of(),te={baseLanes:te.baseLanes|f,cachePool:j}),y.memoizedState=te,y.childLanes=sv(a,B,f),c.memoizedState=nv,Ol(a.child,y)):(ea(c),f=a.child,a=f.sibling,f=ni(f,{mode:"visible",children:y.children}),f.return=c,f.sibling=null,a!==null&&(B=c.deletions,B===null?(c.deletions=[a],c.flags|=16):B.push(a)),c.child=f,c.memoizedState=null,f)}function kl(a,c){return c=Cf({mode:"visible",children:c},a.mode),c.return=a,a.child=c}function Cf(a,c){return a=ti(22,a,null,c),a.lanes=0,a}function Rl(a,c,f){return _c(c,a.child,null,f),a=kl(c,c.pendingProps.children),a.flags|=2,c.memoizedState=null,a}function iv(a,c,f){a.lanes|=c;var y=a.alternate;y!==null&&(y.lanes|=c),py(a.return,c,f)}function av(a,c,f,y,j,O){var B=a.memoizedState;B===null?a.memoizedState={isBackwards:c,rendering:null,renderingStartTime:0,last:y,tail:f,tailMode:j,treeForkCount:O}:(B.isBackwards=c,B.rendering=null,B.renderingStartTime=0,B.last=y,B.tail=f,B.tailMode=j,B.treeForkCount=O)}function Eh(a,c,f){var y=c.pendingProps,j=y.revealOrder,O=y.tail;y=y.children;var B=jr.current,te=(B&2)!==0;if(te?(B=B&1|2,c.flags|=128):B&=1,ke(jr,B),vs(a,c,y,f),y=vn?Ku:0,!te&&a!==null&&(a.flags&128)!==0)e:for(a=c.child;a!==null;){if(a.tag===13)a.memoizedState!==null&&iv(a,f,c);else if(a.tag===19)iv(a,f,c);else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===c)break e;for(;a.sibling===null;){if(a.return===null||a.return===c)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}switch(j){case"forwards":for(f=c.child,j=null;f!==null;)a=f.alternate,a!==null&&ff(a)===null&&(j=f),f=f.sibling;f=j,f===null?(j=c.child,c.child=null):(j=f.sibling,f.sibling=null),av(c,!1,j,f,O,y);break;case"backwards":case"unstable_legacy-backwards":for(f=null,j=c.child,c.child=null;j!==null;){if(a=j.alternate,a!==null&&ff(a)===null){c.child=j;break}a=j.sibling,j.sibling=f,f=j,j=a}av(c,!0,f,null,O,y);break;case"together":av(c,!1,null,null,void 0,y);break;default:c.memoizedState=null}return c.child}function Oo(a,c,f){if(a!==null&&(c.dependencies=a.dependencies),Ga|=c.lanes,(f&c.childLanes)===0)if(a!==null){if(jc(a,c,f,!1),(f&c.childLanes)===0)return null}else return null;if(a!==null&&c.child!==a.child)throw Error(o(153));if(c.child!==null){for(a=c.child,f=ni(a,a.pendingProps),c.child=f,f.return=c;a.sibling!==null;)a=a.sibling,f=f.sibling=ni(a,a.pendingProps),f.return=c;f.sibling=null}return c.child}function Af(a,c){return(a.lanes&c)!==0?!0:(a=a.dependencies,!!(a!==null&&Cc(a)))}function ov(a,c,f){switch(c.tag){case 3:tt(c,c.stateNode.containerInfo),So(c,Dr,a.memoizedState.cache),La();break;case 27:case 5:Ot(c);break;case 4:tt(c,c.stateNode.containerInfo);break;case 10:So(c,c.type,c.memoizedProps.value);break;case 31:if(c.memoizedState!==null)return c.flags|=128,yy(c),null;break;case 13:var y=c.memoizedState;if(y!==null)return y.dehydrated!==null?(ea(c),c.flags|=128,null):(f&c.child.childLanes)!==0?B0(a,c,f):(ea(c),a=Oo(a,c,f),a!==null?a.sibling:null);ea(c);break;case 19:var j=(a.flags&128)!==0;if(y=(f&c.childLanes)!==0,y||(jc(a,c,f,!1),y=(f&c.childLanes)!==0),j){if(y)return Eh(a,c,f);c.flags|=128}if(j=c.memoizedState,j!==null&&(j.rendering=null,j.tail=null,j.lastEffect=null),ke(jr,jr.current),y)break;return null;case 22:return c.lanes=0,F0(a,c,f,c.pendingProps);case 24:So(c,Dr,a.memoizedState.cache)}return Oo(a,c,f)}function U0(a,c,f){if(a!==null)if(a.memoizedProps!==c.pendingProps)qr=!0;else{if(!Af(a,f)&&(c.flags&128)===0)return qr=!1,ov(a,c,f);qr=(a.flags&131072)!==0}else qr=!1,vn&&(c.flags&1048576)!==0&&a0(c,Ku,c.index);switch(c.lanes=0,c.tag){case 16:e:{var y=c.pendingProps;if(a=kc(c.elementType),c.type=a,typeof a=="function")Qp(a)?(y=Mc(a,y),c.tag=1,c=od(null,c,a,y,f)):(c.tag=0,c=tv(null,c,a,y,f));else{if(a!=null){var j=a.$$typeof;if(j===z){c.tag=11,c=Al(null,c,a,y,f);break e}else if(j===Q){c.tag=14,c=z0(null,c,a,y,f);break e}}throw c=je(a)||a,Error(o(306,c,""))}}return c;case 0:return tv(a,c,c.type,c.pendingProps,f);case 1:return y=c.type,j=Mc(y,c.pendingProps),od(a,c,y,j,f);case 3:e:{if(tt(c,c.stateNode.containerInfo),a===null)throw Error(o(387));y=c.pendingProps;var O=c.memoizedState;j=O.element,hf(a,c),fh(c,y,null,f);var B=c.memoizedState;if(y=B.cache,So(c,Dr,y),y!==O.cache&&qn(c,[Dr],f,!0),ph(),y=B.element,O.isDehydrated)if(O={element:y,isDehydrated:!1,cache:B.cache},c.updateQueue.baseState=O,c.memoizedState=O,c.flags&256){c=q0(a,c,y,f);break e}else if(y!==j){j=ri(Error(o(424)),c),ch(j),c=q0(a,c,y,f);break e}else{switch(a=c.stateNode.containerInfo,a.nodeType){case 9:a=a.body;break;default:a=a.nodeName==="HTML"?a.ownerDocument.body:a}for(hr=hi(a.firstChild),Fr=c,vn=!0,vl=null,ai=!0,f=hh(c,null,y,f),c.child=f;f;)f.flags=f.flags&-3|4096,f=f.sibling}else{if(La(),y===j){c=Oo(a,c,f);break e}vs(a,c,y,f)}c=c.child}return c;case 26:return jf(a,c),a===null?(f=PS(c.type,null,c.pendingProps,null))?c.memoizedState=f:vn||(f=c.type,a=c.pendingProps,y=qc(Ne.current).createElement(f),y[is]=c,y[Ps]=a,xs(y,f,a),Zr(y),c.stateNode=y):c.memoizedState=PS(c.type,a.memoizedProps,c.pendingProps,a.memoizedState),null;case 27:return Ot(c),a===null&&vn&&(y=c.stateNode=Vv(c.type,c.pendingProps,Ne.current),Fr=c,ai=!0,j=hr,Il(c.type)?(Uv=j,hr=hi(y.firstChild)):hr=j),vs(a,c,c.pendingProps.children,f),jf(a,c),a===null&&(c.flags|=4194304),c.child;case 5:return a===null&&vn&&((j=y=hr)&&(y=Za(y,c.type,c.pendingProps,ai),y!==null?(c.stateNode=y,Fr=c,hr=hi(y.firstChild),ai=!1,j=!0):j=!1),j||xl(c)),Ot(c),j=c.type,O=c.pendingProps,B=a!==null?a.memoizedProps:null,y=O.children,zv(j,O)?y=null:B!==null&&zv(j,B)&&(c.flags|=32),c.memoizedState!==null&&(j=xy(a,c,mA,null,null,f),bd._currentValue=j),jf(a,c),vs(a,c,y,f),c.child;case 6:return a===null&&vn&&((a=f=hr)&&(f=yd(f,c.pendingProps,ai),f!==null?(c.stateNode=f,Fr=c,hr=null,a=!0):a=!1),a||xl(c)),null;case 13:return B0(a,c,f);case 4:return tt(c,c.stateNode.containerInfo),y=c.pendingProps,a===null?c.child=_c(c,null,y,f):vs(a,c,y,f),c.child;case 11:return Al(a,c,c.type,c.pendingProps,f);case 7:return vs(a,c,c.pendingProps,f),c.child;case 8:return vs(a,c,c.pendingProps.children,f),c.child;case 12:return vs(a,c,c.pendingProps.children,f),c.child;case 10:return y=c.pendingProps,So(c,c.type,y.value),vs(a,c,y.children,f),c.child;case 9:return j=c.type._context,y=c.pendingProps.children,bl(c),j=Wr(j),y=y(j),c.flags|=1,vs(a,c,y,f),c.child;case 14:return z0(a,c,c.type,c.pendingProps,f);case 15:return L0(a,c,c.type,c.pendingProps,f);case 19:return Eh(a,c,f);case 31:return bA(a,c,f);case 22:return F0(a,c,f,c.pendingProps);case 24:return bl(c),y=Wr(Dr),a===null?(j=af(),j===null&&(j=lr,O=rf(),j.pooledCache=O,O.refCount++,O!==null&&(j.pooledCacheLanes|=f),j=O),c.memoizedState={parent:y,cache:j},df(c),So(c,Dr,j)):((a.lanes&f)!==0&&(hf(a,c),fh(c,null,null,f),ph()),j=a.memoizedState,O=c.memoizedState,j.parent!==y?(j={parent:y,cache:y},c.memoizedState=j,c.lanes===0&&(c.memoizedState=c.updateQueue.baseState=j),So(c,Dr,y)):(y=O.cache,So(c,Dr,y),y!==j.cache&&qn(c,[Dr],f,!0))),vs(a,c,c.pendingProps.children,f),c.child;case 29:throw c.pendingProps}throw Error(o(156,c.tag))}function ko(a){a.flags|=4}function lv(a,c,f,y,j){if((c=(a.mode&32)!==0)&&(c=!1),c){if(a.flags|=16777216,(j&335544128)===j)if(a.stateNode.complete)a.flags|=8192;else if(Ev())a.flags|=8192;else throw Rc=cf,lf}else a.flags&=-16777217}function K0(a,c){if(c.type!=="stylesheet"||(c.state.loading&4)!==0)a.flags&=-16777217;else if(a.flags|=16777216,!qS(c))if(Ev())a.flags|=8192;else throw Rc=cf,lf}function Of(a,c){c!==null&&(a.flags|=4),a.flags&16384&&(c=a.tag!==22?Os():536870912,a.lanes|=c,$l|=c)}function ld(a,c){if(!vn)switch(a.tailMode){case"hidden":c=a.tail;for(var f=null;c!==null;)c.alternate!==null&&(f=c),c=c.sibling;f===null?a.tail=null:f.sibling=null;break;case"collapsed":f=a.tail;for(var y=null;f!==null;)f.alternate!==null&&(y=f),f=f.sibling;y===null?c||a.tail===null?a.tail=null:a.tail.sibling=null:y.sibling=null}}function or(a){var c=a.alternate!==null&&a.alternate.child===a.child,f=0,y=0;if(c)for(var j=a.child;j!==null;)f|=j.lanes|j.childLanes,y|=j.subtreeFlags&65011712,y|=j.flags&65011712,j.return=a,j=j.sibling;else for(j=a.child;j!==null;)f|=j.lanes|j.childLanes,y|=j.subtreeFlags,y|=j.flags,j.return=a,j=j.sibling;return a.subtreeFlags|=y,a.childLanes=f,c}function wA(a,c,f){var y=c.pendingProps;switch(bo(c),c.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return or(c),null;case 1:return or(c),null;case 3:return f=c.stateNode,y=null,a!==null&&(y=a.memoizedState.cache),c.memoizedState.cache!==y&&(c.flags|=2048),oi(Dr),ft(),f.pendingContext&&(f.context=f.pendingContext,f.pendingContext=null),(a===null||a.child===null)&&(Vu(c)?ko(c):a===null||a.memoizedState.isDehydrated&&(c.flags&256)===0||(c.flags|=1024,hy())),or(c),null;case 26:var j=c.type,O=c.memoizedState;return a===null?(ko(c),O!==null?(or(c),K0(c,O)):(or(c),lv(c,j,null,y,f))):O?O!==a.memoizedState?(ko(c),or(c),K0(c,O)):(or(c),c.flags&=-16777217):(a=a.memoizedProps,a!==y&&ko(c),or(c),lv(c,j,a,y,f)),null;case 27:if(Ft(c),f=Ne.current,j=c.type,a!==null&&c.stateNode!=null)a.memoizedProps!==y&&ko(c);else{if(!y){if(c.stateNode===null)throw Error(o(166));return or(c),null}a=Ve.current,Vu(c)?tf(c):(a=Vv(j,y,f),c.stateNode=a,ko(c))}return or(c),null;case 5:if(Ft(c),j=c.type,a!==null&&c.stateNode!=null)a.memoizedProps!==y&&ko(c);else{if(!y){if(c.stateNode===null)throw Error(o(166));return or(c),null}if(O=Ve.current,Vu(c))tf(c);else{var B=qc(Ne.current);switch(O){case 1:O=B.createElementNS("http://www.w3.org/2000/svg",j);break;case 2:O=B.createElementNS("http://www.w3.org/1998/Math/MathML",j);break;default:switch(j){case"svg":O=B.createElementNS("http://www.w3.org/2000/svg",j);break;case"math":O=B.createElementNS("http://www.w3.org/1998/Math/MathML",j);break;case"script":O=B.createElement("div"),O.innerHTML="<script><\/script>",O=O.removeChild(O.firstChild);break;case"select":O=typeof y.is=="string"?B.createElement("select",{is:y.is}):B.createElement("select"),y.multiple?O.multiple=!0:y.size&&(O.size=y.size);break;default:O=typeof y.is=="string"?B.createElement(j,{is:y.is}):B.createElement(j)}}O[is]=c,O[Ps]=y;e:for(B=c.child;B!==null;){if(B.tag===5||B.tag===6)O.appendChild(B.stateNode);else if(B.tag!==4&&B.tag!==27&&B.child!==null){B.child.return=B,B=B.child;continue}if(B===c)break e;for(;B.sibling===null;){if(B.return===null||B.return===c)break e;B=B.return}B.sibling.return=B.return,B=B.sibling}c.stateNode=O;e:switch(xs(O,j,y),j){case"button":case"input":case"select":case"textarea":y=!!y.autoFocus;break e;case"img":y=!0;break e;default:y=!1}y&&ko(c)}}return or(c),lv(c,c.type,a===null?null:a.memoizedProps,c.pendingProps,f),null;case 6:if(a&&c.stateNode!=null)a.memoizedProps!==y&&ko(c);else{if(typeof y!="string"&&c.stateNode===null)throw Error(o(166));if(a=Ne.current,Vu(c)){if(a=c.stateNode,f=c.memoizedProps,y=null,j=Fr,j!==null)switch(j.tag){case 27:case 5:y=j.memoizedProps}a[is]=c,a=!!(a.nodeValue===f||y!==null&&y.suppressHydrationWarning===!0||Lh(a.nodeValue,f)),a||xl(c,!0)}else a=qc(a).createTextNode(y),a[is]=c,c.stateNode=a}return or(c),null;case 31:if(f=c.memoizedState,a===null||a.memoizedState!==null){if(y=Vu(c),f!==null){if(a===null){if(!y)throw Error(o(318));if(a=c.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(o(557));a[is]=c}else La(),(c.flags&128)===0&&(c.memoizedState=null),c.flags|=4;or(c),a=!1}else f=hy(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=f),a=!0;if(!a)return c.flags&256?(Is(c),c):(Is(c),null);if((c.flags&128)!==0)throw Error(o(558))}return or(c),null;case 13:if(y=c.memoizedState,a===null||a.memoizedState!==null&&a.memoizedState.dehydrated!==null){if(j=Vu(c),y!==null&&y.dehydrated!==null){if(a===null){if(!j)throw Error(o(318));if(j=c.memoizedState,j=j!==null?j.dehydrated:null,!j)throw Error(o(317));j[is]=c}else La(),(c.flags&128)===0&&(c.memoizedState=null),c.flags|=4;or(c),j=!1}else j=hy(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=j),j=!0;if(!j)return c.flags&256?(Is(c),c):(Is(c),null)}return Is(c),(c.flags&128)!==0?(c.lanes=f,c):(f=y!==null,a=a!==null&&a.memoizedState!==null,f&&(y=c.child,j=null,y.alternate!==null&&y.alternate.memoizedState!==null&&y.alternate.memoizedState.cachePool!==null&&(j=y.alternate.memoizedState.cachePool.pool),O=null,y.memoizedState!==null&&y.memoizedState.cachePool!==null&&(O=y.memoizedState.cachePool.pool),O!==j&&(y.flags|=2048)),f!==a&&f&&(c.child.flags|=8192),Of(c,c.updateQueue),or(c),null);case 4:return ft(),a===null&&Xf(c.stateNode.containerInfo),or(c),null;case 10:return oi(c.type),or(c),null;case 19:if(Oe(jr),y=c.memoizedState,y===null)return or(c),null;if(j=(c.flags&128)!==0,O=y.rendering,O===null)if(j)ld(y,!1);else{if(Ar!==0||a!==null&&(a.flags&128)!==0)for(a=c.child;a!==null;){if(O=ff(a),O!==null){for(c.flags|=128,ld(y,!1),a=O.updateQueue,c.updateQueue=a,Of(c,a),c.subtreeFlags=0,a=f,f=c.child;f!==null;)cy(f,a),f=f.sibling;return ke(jr,jr.current&1|2),vn&&ii(c,y.treeForkCount),c.child}a=a.sibling}y.tail!==null&&L()>Df&&(c.flags|=128,j=!0,ld(y,!1),c.lanes=4194304)}else{if(!j)if(a=ff(O),a!==null){if(c.flags|=128,j=!0,a=a.updateQueue,c.updateQueue=a,Of(c,a),ld(y,!0),y.tail===null&&y.tailMode==="hidden"&&!O.alternate&&!vn)return or(c),null}else 2*L()-y.renderingStartTime>Df&&f!==536870912&&(c.flags|=128,j=!0,ld(y,!1),c.lanes=4194304);y.isBackwards?(O.sibling=c.child,c.child=O):(a=y.last,a!==null?a.sibling=O:c.child=O,y.last=O)}return y.tail!==null?(a=y.tail,y.rendering=a,y.tail=a.sibling,y.renderingStartTime=L(),a.sibling=null,f=jr.current,ke(jr,j?f&1|2:f&1),vn&&ii(c,y.treeForkCount),a):(or(c),null);case 22:case 23:return Is(c),nd(),y=c.memoizedState!==null,a!==null?a.memoizedState!==null!==y&&(c.flags|=8192):y&&(c.flags|=8192),y?(f&536870912)!==0&&(c.flags&128)===0&&(or(c),c.subtreeFlags&6&&(c.flags|=8192)):or(c),f=c.updateQueue,f!==null&&Of(c,f.retryQueue),f=null,a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(f=a.memoizedState.cachePool.pool),y=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(y=c.memoizedState.cachePool.pool),y!==f&&(c.flags|=2048),a!==null&&Oe(El),null;case 24:return f=null,a!==null&&(f=a.memoizedState.cache),c.memoizedState.cache!==f&&(c.flags|=2048),oi(Dr),or(c),null;case 25:return null;case 30:return null}throw Error(o(156,c.tag))}function cv(a,c){switch(bo(c),c.tag){case 1:return a=c.flags,a&65536?(c.flags=a&-65537|128,c):null;case 3:return oi(Dr),ft(),a=c.flags,(a&65536)!==0&&(a&128)===0?(c.flags=a&-65537|128,c):null;case 26:case 27:case 5:return Ft(c),null;case 31:if(c.memoizedState!==null){if(Is(c),c.alternate===null)throw Error(o(340));La()}return a=c.flags,a&65536?(c.flags=a&-65537|128,c):null;case 13:if(Is(c),a=c.memoizedState,a!==null&&a.dehydrated!==null){if(c.alternate===null)throw Error(o(340));La()}return a=c.flags,a&65536?(c.flags=a&-65537|128,c):null;case 19:return Oe(jr),null;case 4:return ft(),null;case 10:return oi(c.type),null;case 22:case 23:return Is(c),nd(),a!==null&&Oe(El),a=c.flags,a&65536?(c.flags=a&-65537|128,c):null;case 24:return oi(Dr),null;case 25:return null;default:return null}}function V0(a,c){switch(bo(c),c.tag){case 3:oi(Dr),ft();break;case 26:case 27:case 5:Ft(c);break;case 4:ft();break;case 31:c.memoizedState!==null&&Is(c);break;case 13:Is(c);break;case 19:Oe(jr);break;case 10:oi(c.type);break;case 22:case 23:Is(c),nd(),a!==null&&Oe(El);break;case 24:oi(Dr)}}function jh(a,c){try{var f=c.updateQueue,y=f!==null?f.lastEffect:null;if(y!==null){var j=y.next;f=j;do{if((f.tag&a)===a){y=void 0;var O=f.create,B=f.inst;y=O(),B.destroy=y}f=f.next}while(f!==j)}}catch(te){Xn(c,c.return,te)}}function Tl(a,c,f){try{var y=c.updateQueue,j=y!==null?y.lastEffect:null;if(j!==null){var O=j.next;y=O;do{if((y.tag&a)===a){var B=y.inst,te=B.destroy;if(te!==void 0){B.destroy=void 0,j=c;var ye=f,Be=te;try{Be()}catch(We){Xn(j,ye,We)}}}y=y.next}while(y!==O)}}catch(We){Xn(c,c.return,We)}}function H0(a){var c=a.updateQueue;if(c!==null){var f=a.stateNode;try{u0(c,f)}catch(y){Xn(a,a.return,y)}}}function G0(a,c,f){f.props=Mc(a.type,a.memoizedProps),f.state=a.memoizedState;try{f.componentWillUnmount()}catch(y){Xn(a,c,y)}}function Ch(a,c){try{var f=a.ref;if(f!==null){switch(a.tag){case 26:case 27:case 5:var y=a.stateNode;break;case 30:y=a.stateNode;break;default:y=a.stateNode}typeof f=="function"?a.refCleanup=f(y):f.current=y}}catch(j){Xn(a,c,j)}}function Ha(a,c){var f=a.ref,y=a.refCleanup;if(f!==null)if(typeof y=="function")try{y()}catch(j){Xn(a,c,j)}finally{a.refCleanup=null,a=a.alternate,a!=null&&(a.refCleanup=null)}else if(typeof f=="function")try{f(null)}catch(j){Xn(a,c,j)}else f.current=null}function X0(a){var c=a.type,f=a.memoizedProps,y=a.stateNode;try{e:switch(c){case"button":case"input":case"select":case"textarea":f.autoFocus&&y.focus();break e;case"img":f.src?y.src=f.src:f.srcSet&&(y.srcset=f.srcSet)}}catch(j){Xn(a,a.return,j)}}function Ah(a,c,f){try{var y=a.stateNode;NA(y,a.type,f,c),y[Ps]=c}catch(j){Xn(a,a.return,j)}}function uv(a){return a.tag===5||a.tag===3||a.tag===26||a.tag===27&&Il(a.type)||a.tag===4}function dv(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||uv(a.return))return null;a=a.return}for(a.sibling.return=a.return,a=a.sibling;a.tag!==5&&a.tag!==6&&a.tag!==18;){if(a.tag===27&&Il(a.type)||a.flags&2||a.child===null||a.tag===4)continue e;a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}function hv(a,c,f){var y=a.tag;if(y===5||y===6)a=a.stateNode,c?(f.nodeType===9?f.body:f.nodeName==="HTML"?f.ownerDocument.body:f).insertBefore(a,c):(c=f.nodeType===9?f.body:f.nodeName==="HTML"?f.ownerDocument.body:f,c.appendChild(a),f=f._reactRootContainer,f!=null||c.onclick!==null||(c.onclick=xa));else if(y!==4&&(y===27&&Il(a.type)&&(f=a.stateNode,c=null),a=a.child,a!==null))for(hv(a,c,f),a=a.sibling;a!==null;)hv(a,c,f),a=a.sibling}function kf(a,c,f){var y=a.tag;if(y===5||y===6)a=a.stateNode,c?f.insertBefore(a,c):f.appendChild(a);else if(y!==4&&(y===27&&Il(a.type)&&(f=a.stateNode),a=a.child,a!==null))for(kf(a,c,f),a=a.sibling;a!==null;)kf(a,c,f),a=a.sibling}function Rf(a){var c=a.stateNode,f=a.memoizedProps;try{for(var y=a.type,j=c.attributes;j.length;)c.removeAttributeNode(j[0]);xs(c,y,f),c[is]=a,c[Ps]=f}catch(O){Xn(a,a.return,O)}}var Ro=!1,Br=!1,pv=!1,Y0=typeof WeakSet=="function"?WeakSet:Set,cs=null;function Z0(a,c){if(a=a.containerInfo,Zf=lm,a=t0(a),Jg(a)){if("selectionStart"in a)var f={start:a.selectionStart,end:a.selectionEnd};else e:{f=(f=a.ownerDocument)&&f.defaultView||window;var y=f.getSelection&&f.getSelection();if(y&&y.rangeCount!==0){f=y.anchorNode;var j=y.anchorOffset,O=y.focusNode;y=y.focusOffset;try{f.nodeType,O.nodeType}catch{f=null;break e}var B=0,te=-1,ye=-1,Be=0,We=0,rt=a,Ue=null;t:for(;;){for(var Xe;rt!==f||j!==0&&rt.nodeType!==3||(te=B+j),rt!==O||y!==0&&rt.nodeType!==3||(ye=B+y),rt.nodeType===3&&(B+=rt.nodeValue.length),(Xe=rt.firstChild)!==null;)Ue=rt,rt=Xe;for(;;){if(rt===a)break t;if(Ue===f&&++Be===j&&(te=B),Ue===O&&++We===y&&(ye=B),(Xe=rt.nextSibling)!==null)break;rt=Ue,Ue=rt.parentNode}rt=Xe}f=te===-1||ye===-1?null:{start:te,end:ye}}else f=null}f=f||{start:0,end:0}}else f=null;for(Wf={focusedElem:a,selectionRange:f},lm=!1,cs=c;cs!==null;)if(c=cs,a=c.child,(c.subtreeFlags&1028)!==0&&a!==null)a.return=c,cs=a;else for(;cs!==null;){switch(c=cs,O=c.alternate,a=c.flags,c.tag){case 0:if((a&4)!==0&&(a=c.updateQueue,a=a!==null?a.events:null,a!==null))for(f=0;f<a.length;f++)j=a[f],j.ref.impl=j.nextImpl;break;case 11:case 15:break;case 1:if((a&1024)!==0&&O!==null){a=void 0,f=c,j=O.memoizedProps,O=O.memoizedState,y=f.stateNode;try{var Dt=Mc(f.type,j);a=y.getSnapshotBeforeUpdate(Dt,O),y.__reactInternalSnapshotBeforeUpdate=a}catch(Xt){Xn(f,f.return,Xt)}}break;case 3:if((a&1024)!==0){if(a=c.stateNode.containerInfo,f=a.nodeType,f===9)Bv(a);else if(f===1)switch(a.nodeName){case"HEAD":case"HTML":case"BODY":Bv(a);break;default:a.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((a&1024)!==0)throw Error(o(163))}if(a=c.sibling,a!==null){a.return=c.return,cs=a;break}cs=c.return}}function W0(a,c,f){var y=f.flags;switch(f.tag){case 0:case 11:case 15:To(a,f),y&4&&jh(5,f);break;case 1:if(To(a,f),y&4)if(a=f.stateNode,c===null)try{a.componentDidMount()}catch(B){Xn(f,f.return,B)}else{var j=Mc(f.type,c.memoizedProps);c=c.memoizedState;try{a.componentDidUpdate(j,c,a.__reactInternalSnapshotBeforeUpdate)}catch(B){Xn(f,f.return,B)}}y&64&&H0(f),y&512&&Ch(f,f.return);break;case 3:if(To(a,f),y&64&&(a=f.updateQueue,a!==null)){if(c=null,f.child!==null)switch(f.child.tag){case 27:case 5:c=f.child.stateNode;break;case 1:c=f.child.stateNode}try{u0(a,c)}catch(B){Xn(f,f.return,B)}}break;case 27:c===null&&y&4&&Rf(f);case 26:case 5:To(a,f),c===null&&y&4&&X0(f),y&512&&Ch(f,f.return);break;case 12:To(a,f);break;case 31:To(a,f),y&4&&Q0(a,f);break;case 13:To(a,f),y&4&&eS(a,f),y&64&&(a=f.memoizedState,a!==null&&(a=a.dehydrated,a!==null&&(f=kA.bind(null,f),TS(a,f))));break;case 22:if(y=f.memoizedState!==null||Ro,!y){c=c!==null&&c.memoizedState!==null||Br,j=Ro;var O=Br;Ro=y,(Br=c)&&!O?_o(a,f,(f.subtreeFlags&8772)!==0):To(a,f),Ro=j,Br=O}break;case 30:break;default:To(a,f)}}function J0(a){var c=a.alternate;c!==null&&(a.alternate=null,J0(c)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(c=a.stateNode,c!==null&&Qd(c)),a.stateNode=null,a.return=null,a.dependencies=null,a.memoizedProps=null,a.memoizedState=null,a.pendingProps=null,a.stateNode=null,a.updateQueue=null}var xr=null,ci=!1;function ja(a,c,f){for(f=f.child;f!==null;)Tf(a,c,f),f=f.sibling}function Tf(a,c,f){if(Ht&&typeof Ht.onCommitFiberUnmount=="function")try{Ht.onCommitFiberUnmount(dn,f)}catch{}switch(f.tag){case 26:Br||Ha(f,c),ja(a,c,f),f.memoizedState?f.memoizedState.count--:f.stateNode&&(f=f.stateNode,f.parentNode.removeChild(f));break;case 27:Br||Ha(f,c);var y=xr,j=ci;Il(f.type)&&(xr=f.stateNode,ci=!1),ja(a,c,f),Bh(f.stateNode),xr=y,ci=j;break;case 5:Br||Ha(f,c);case 6:if(y=xr,j=ci,xr=null,ja(a,c,f),xr=y,ci=j,xr!==null)if(ci)try{(xr.nodeType===9?xr.body:xr.nodeName==="HTML"?xr.ownerDocument.body:xr).removeChild(f.stateNode)}catch(O){Xn(f,c,O)}else try{xr.removeChild(f.stateNode)}catch(O){Xn(f,c,O)}break;case 18:xr!==null&&(ci?(a=xr,RS(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,f.stateNode),pi(a)):RS(xr,f.stateNode));break;case 4:y=xr,j=ci,xr=f.stateNode.containerInfo,ci=!0,ja(a,c,f),xr=y,ci=j;break;case 0:case 11:case 14:case 15:Tl(2,f,c),Br||Tl(4,f,c),ja(a,c,f);break;case 1:Br||(Ha(f,c),y=f.stateNode,typeof y.componentWillUnmount=="function"&&G0(f,c,y)),ja(a,c,f);break;case 21:ja(a,c,f);break;case 22:Br=(y=Br)||f.memoizedState!==null,ja(a,c,f),Br=y;break;default:ja(a,c,f)}}function Q0(a,c){if(c.memoizedState===null&&(a=c.alternate,a!==null&&(a=a.memoizedState,a!==null))){a=a.dehydrated;try{pi(a)}catch(f){Xn(c,c.return,f)}}}function eS(a,c){if(c.memoizedState===null&&(a=c.alternate,a!==null&&(a=a.memoizedState,a!==null&&(a=a.dehydrated,a!==null))))try{pi(a)}catch(f){Xn(c,c.return,f)}}function SA(a){switch(a.tag){case 31:case 13:case 19:var c=a.stateNode;return c===null&&(c=a.stateNode=new Y0),c;case 22:return a=a.stateNode,c=a._retryCache,c===null&&(c=a._retryCache=new Y0),c;default:throw Error(o(435,a.tag))}}function Oh(a,c){var f=SA(a);c.forEach(function(y){if(!f.has(y)){f.add(y);var j=RA.bind(null,a,y);y.then(j,j)}})}function zs(a,c){var f=c.deletions;if(f!==null)for(var y=0;y<f.length;y++){var j=f[y],O=a,B=c,te=B;e:for(;te!==null;){switch(te.tag){case 27:if(Il(te.type)){xr=te.stateNode,ci=!1;break e}break;case 5:xr=te.stateNode,ci=!1;break e;case 3:case 4:xr=te.stateNode.containerInfo,ci=!0;break e}te=te.return}if(xr===null)throw Error(o(160));Tf(O,B,j),xr=null,ci=!1,O=j.alternate,O!==null&&(O.return=null),j.return=null}if(c.subtreeFlags&13886)for(c=c.child;c!==null;)tS(c,a),c=c.sibling}var Ai=null;function tS(a,c){var f=a.alternate,y=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:zs(c,a),ui(a),y&4&&(Tl(3,a,a.return),jh(3,a),Tl(5,a,a.return));break;case 1:zs(c,a),ui(a),y&512&&(Br||f===null||Ha(f,f.return)),y&64&&Ro&&(a=a.updateQueue,a!==null&&(y=a.callbacks,y!==null&&(f=a.shared.hiddenCallbacks,a.shared.hiddenCallbacks=f===null?y:f.concat(y))));break;case 26:var j=Ai;if(zs(c,a),ui(a),y&512&&(Br||f===null||Ha(f,f.return)),y&4){var O=f!==null?f.memoizedState:null;if(y=a.memoizedState,f===null)if(y===null)if(a.stateNode===null){e:{y=a.type,f=a.memoizedProps,j=j.ownerDocument||j;t:switch(y){case"title":O=j.getElementsByTagName("title")[0],(!O||O[Vi]||O[is]||O.namespaceURI==="http://www.w3.org/2000/svg"||O.hasAttribute("itemprop"))&&(O=j.createElement(y),j.head.insertBefore(O,j.querySelector("head > title"))),xs(O,y,f),O[is]=a,Zr(O),y=O;break e;case"link":var B=LS("link","href",j).get(y+(f.href||""));if(B){for(var te=0;te<B.length;te++)if(O=B[te],O.getAttribute("href")===(f.href==null||f.href===""?null:f.href)&&O.getAttribute("rel")===(f.rel==null?null:f.rel)&&O.getAttribute("title")===(f.title==null?null:f.title)&&O.getAttribute("crossorigin")===(f.crossOrigin==null?null:f.crossOrigin)){B.splice(te,1);break t}}O=j.createElement(y),xs(O,y,f),j.head.appendChild(O);break;case"meta":if(B=LS("meta","content",j).get(y+(f.content||""))){for(te=0;te<B.length;te++)if(O=B[te],O.getAttribute("content")===(f.content==null?null:""+f.content)&&O.getAttribute("name")===(f.name==null?null:f.name)&&O.getAttribute("property")===(f.property==null?null:f.property)&&O.getAttribute("http-equiv")===(f.httpEquiv==null?null:f.httpEquiv)&&O.getAttribute("charset")===(f.charSet==null?null:f.charSet)){B.splice(te,1);break t}}O=j.createElement(y),xs(O,y,f),j.head.appendChild(O);break;default:throw Error(o(468,y))}O[is]=a,Zr(O),y=O}a.stateNode=y}else FS(j,a.type,a.stateNode);else a.stateNode=zS(j,y,a.memoizedProps);else O!==y?(O===null?f.stateNode!==null&&(f=f.stateNode,f.parentNode.removeChild(f)):O.count--,y===null?FS(j,a.type,a.stateNode):zS(j,y,a.memoizedProps)):y===null&&a.stateNode!==null&&Ah(a,a.memoizedProps,f.memoizedProps)}break;case 27:zs(c,a),ui(a),y&512&&(Br||f===null||Ha(f,f.return)),f!==null&&y&4&&Ah(a,a.memoizedProps,f.memoizedProps);break;case 5:if(zs(c,a),ui(a),y&512&&(Br||f===null||Ha(f,f.return)),a.flags&32){j=a.stateNode;try{Ou(j,"")}catch(Dt){Xn(a,a.return,Dt)}}y&4&&a.stateNode!=null&&(j=a.memoizedProps,Ah(a,j,f!==null?f.memoizedProps:j)),y&1024&&(pv=!0);break;case 6:if(zs(c,a),ui(a),y&4){if(a.stateNode===null)throw Error(o(162));y=a.memoizedProps,f=a.stateNode;try{f.nodeValue=y}catch(Dt){Xn(a,a.return,Dt)}}break;case 3:if(sm=null,j=Ai,Ai=nm(c.containerInfo),zs(c,a),Ai=j,ui(a),y&4&&f!==null&&f.memoizedState.isDehydrated)try{pi(c.containerInfo)}catch(Dt){Xn(a,a.return,Dt)}pv&&(pv=!1,fv(a));break;case 4:y=Ai,Ai=nm(a.stateNode.containerInfo),zs(c,a),ui(a),Ai=y;break;case 12:zs(c,a),ui(a);break;case 31:zs(c,a),ui(a),y&4&&(y=a.updateQueue,y!==null&&(a.updateQueue=null,Oh(a,y)));break;case 13:zs(c,a),ui(a),a.child.flags&8192&&a.memoizedState!==null!=(f!==null&&f.memoizedState!==null)&&($h=L()),y&4&&(y=a.updateQueue,y!==null&&(a.updateQueue=null,Oh(a,y)));break;case 22:j=a.memoizedState!==null;var ye=f!==null&&f.memoizedState!==null,Be=Ro,We=Br;if(Ro=Be||j,Br=We||ye,zs(c,a),Br=We,Ro=Be,ui(a),y&8192)e:for(c=a.stateNode,c._visibility=j?c._visibility&-2:c._visibility|1,j&&(f===null||ye||Ro||Br||Ic(a)),f=null,c=a;;){if(c.tag===5||c.tag===26){if(f===null){ye=f=c;try{if(O=ye.stateNode,j)B=O.style,typeof B.setProperty=="function"?B.setProperty("display","none","important"):B.display="none";else{te=ye.stateNode;var rt=ye.memoizedProps.style,Ue=rt!=null&&rt.hasOwnProperty("display")?rt.display:null;te.style.display=Ue==null||typeof Ue=="boolean"?"":(""+Ue).trim()}}catch(Dt){Xn(ye,ye.return,Dt)}}}else if(c.tag===6){if(f===null){ye=c;try{ye.stateNode.nodeValue=j?"":ye.memoizedProps}catch(Dt){Xn(ye,ye.return,Dt)}}}else if(c.tag===18){if(f===null){ye=c;try{var Xe=ye.stateNode;j?Qf(Xe,!0):Qf(ye.stateNode,!1)}catch(Dt){Xn(ye,ye.return,Dt)}}}else if((c.tag!==22&&c.tag!==23||c.memoizedState===null||c===a)&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===a)break e;for(;c.sibling===null;){if(c.return===null||c.return===a)break e;f===c&&(f=null),c=c.return}f===c&&(f=null),c.sibling.return=c.return,c=c.sibling}y&4&&(y=a.updateQueue,y!==null&&(f=y.retryQueue,f!==null&&(y.retryQueue=null,Oh(a,f))));break;case 19:zs(c,a),ui(a),y&4&&(y=a.updateQueue,y!==null&&(a.updateQueue=null,Oh(a,y)));break;case 30:break;case 21:break;default:zs(c,a),ui(a)}}function ui(a){var c=a.flags;if(c&2){try{for(var f,y=a.return;y!==null;){if(uv(y)){f=y;break}y=y.return}if(f==null)throw Error(o(160));switch(f.tag){case 27:var j=f.stateNode,O=dv(a);kf(a,O,j);break;case 5:var B=f.stateNode;f.flags&32&&(Ou(B,""),f.flags&=-33);var te=dv(a);kf(a,te,B);break;case 3:case 4:var ye=f.stateNode.containerInfo,Be=dv(a);hv(a,Be,ye);break;default:throw Error(o(161))}}catch(We){Xn(a,a.return,We)}a.flags&=-3}c&4096&&(a.flags&=-4097)}function fv(a){if(a.subtreeFlags&1024)for(a=a.child;a!==null;){var c=a;fv(c),c.tag===5&&c.flags&1024&&c.stateNode.reset(),a=a.sibling}}function To(a,c){if(c.subtreeFlags&8772)for(c=c.child;c!==null;)W0(a,c.alternate,c),c=c.sibling}function Ic(a){for(a=a.child;a!==null;){var c=a;switch(c.tag){case 0:case 11:case 14:case 15:Tl(4,c,c.return),Ic(c);break;case 1:Ha(c,c.return);var f=c.stateNode;typeof f.componentWillUnmount=="function"&&G0(c,c.return,f),Ic(c);break;case 27:Bh(c.stateNode);case 26:case 5:Ha(c,c.return),Ic(c);break;case 22:c.memoizedState===null&&Ic(c);break;case 30:Ic(c);break;default:Ic(c)}a=a.sibling}}function _o(a,c,f){for(f=f&&(c.subtreeFlags&8772)!==0,c=c.child;c!==null;){var y=c.alternate,j=a,O=c,B=O.flags;switch(O.tag){case 0:case 11:case 15:_o(j,O,f),jh(4,O);break;case 1:if(_o(j,O,f),y=O,j=y.stateNode,typeof j.componentDidMount=="function")try{j.componentDidMount()}catch(Be){Xn(y,y.return,Be)}if(y=O,j=y.updateQueue,j!==null){var te=y.stateNode;try{var ye=j.shared.hiddenCallbacks;if(ye!==null)for(j.shared.hiddenCallbacks=null,j=0;j<ye.length;j++)pf(ye[j],te)}catch(Be){Xn(y,y.return,Be)}}f&&B&64&&H0(O),Ch(O,O.return);break;case 27:Rf(O);case 26:case 5:_o(j,O,f),f&&y===null&&B&4&&X0(O),Ch(O,O.return);break;case 12:_o(j,O,f);break;case 31:_o(j,O,f),f&&B&4&&Q0(j,O);break;case 13:_o(j,O,f),f&&B&4&&eS(j,O);break;case 22:O.memoizedState===null&&_o(j,O,f),Ch(O,O.return);break;case 30:break;default:_o(j,O,f)}c=c.sibling}}function mv(a,c){var f=null;a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(f=a.memoizedState.cachePool.pool),a=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(a=c.memoizedState.cachePool.pool),a!==f&&(a!=null&&a.refCount++,f!=null&&Gu(f))}function gv(a,c){a=null,c.alternate!==null&&(a=c.alternate.memoizedState.cache),c=c.memoizedState.cache,c!==a&&(c.refCount++,a!=null&&Gu(a))}function Ca(a,c,f,y){if(c.subtreeFlags&10256)for(c=c.child;c!==null;)yv(a,c,f,y),c=c.sibling}function yv(a,c,f,y){var j=c.flags;switch(c.tag){case 0:case 11:case 15:Ca(a,c,f,y),j&2048&&jh(9,c);break;case 1:Ca(a,c,f,y);break;case 3:Ca(a,c,f,y),j&2048&&(a=null,c.alternate!==null&&(a=c.alternate.memoizedState.cache),c=c.memoizedState.cache,c!==a&&(c.refCount++,a!=null&&Gu(a)));break;case 12:if(j&2048){Ca(a,c,f,y),a=c.stateNode;try{var O=c.memoizedProps,B=O.id,te=O.onPostCommit;typeof te=="function"&&te(B,c.alternate===null?"mount":"update",a.passiveEffectDuration,-0)}catch(ye){Xn(c,c.return,ye)}}else Ca(a,c,f,y);break;case 31:Ca(a,c,f,y);break;case 13:Ca(a,c,f,y);break;case 23:break;case 22:O=c.stateNode,B=c.alternate,c.memoizedState!==null?O._visibility&2?Ca(a,c,f,y):kh(a,c):O._visibility&2?Ca(a,c,f,y):(O._visibility|=2,cd(a,c,f,y,(c.subtreeFlags&10256)!==0||!1)),j&2048&&mv(B,c);break;case 24:Ca(a,c,f,y),j&2048&&gv(c.alternate,c);break;default:Ca(a,c,f,y)}}function cd(a,c,f,y,j){for(j=j&&((c.subtreeFlags&10256)!==0||!1),c=c.child;c!==null;){var O=a,B=c,te=f,ye=y,Be=B.flags;switch(B.tag){case 0:case 11:case 15:cd(O,B,te,ye,j),jh(8,B);break;case 23:break;case 22:var We=B.stateNode;B.memoizedState!==null?We._visibility&2?cd(O,B,te,ye,j):kh(O,B):(We._visibility|=2,cd(O,B,te,ye,j)),j&&Be&2048&&mv(B.alternate,B);break;case 24:cd(O,B,te,ye,j),j&&Be&2048&&gv(B.alternate,B);break;default:cd(O,B,te,ye,j)}c=c.sibling}}function kh(a,c){if(c.subtreeFlags&10256)for(c=c.child;c!==null;){var f=a,y=c,j=y.flags;switch(y.tag){case 22:kh(f,y),j&2048&&mv(y.alternate,y);break;case 24:kh(f,y),j&2048&&gv(y.alternate,y);break;default:kh(f,y)}c=c.sibling}}var Rh=8192;function zc(a,c,f){if(a.subtreeFlags&Rh)for(a=a.child;a!==null;)vv(a,c,f),a=a.sibling}function vv(a,c,f){switch(a.tag){case 26:zc(a,c,f),a.flags&Rh&&a.memoizedState!==null&&BS(f,Ai,a.memoizedState,a.memoizedProps);break;case 5:zc(a,c,f);break;case 3:case 4:var y=Ai;Ai=nm(a.stateNode.containerInfo),zc(a,c,f),Ai=y;break;case 22:a.memoizedState===null&&(y=a.alternate,y!==null&&y.memoizedState!==null?(y=Rh,Rh=16777216,zc(a,c,f),Rh=y):zc(a,c,f));break;default:zc(a,c,f)}}function nS(a){var c=a.alternate;if(c!==null&&(a=c.child,a!==null)){c.child=null;do c=a.sibling,a.sibling=null,a=c;while(a!==null)}}function Th(a){var c=a.deletions;if((a.flags&16)!==0){if(c!==null)for(var f=0;f<c.length;f++){var y=c[f];cs=y,sS(y,a)}nS(a)}if(a.subtreeFlags&10256)for(a=a.child;a!==null;)rS(a),a=a.sibling}function rS(a){switch(a.tag){case 0:case 11:case 15:Th(a),a.flags&2048&&Tl(9,a,a.return);break;case 3:Th(a);break;case 12:Th(a);break;case 22:var c=a.stateNode;a.memoizedState!==null&&c._visibility&2&&(a.return===null||a.return.tag!==13)?(c._visibility&=-3,_f(a)):Th(a);break;default:Th(a)}}function _f(a){var c=a.deletions;if((a.flags&16)!==0){if(c!==null)for(var f=0;f<c.length;f++){var y=c[f];cs=y,sS(y,a)}nS(a)}for(a=a.child;a!==null;){switch(c=a,c.tag){case 0:case 11:case 15:Tl(8,c,c.return),_f(c);break;case 22:f=c.stateNode,f._visibility&2&&(f._visibility&=-3,_f(c));break;default:_f(c)}a=a.sibling}}function sS(a,c){for(;cs!==null;){var f=cs;switch(f.tag){case 0:case 11:case 15:Tl(8,f,c);break;case 23:case 22:if(f.memoizedState!==null&&f.memoizedState.cachePool!==null){var y=f.memoizedState.cachePool.pool;y!=null&&y.refCount++}break;case 24:Gu(f.memoizedState.cache)}if(y=f.child,y!==null)y.return=f,cs=y;else e:for(f=a;cs!==null;){y=cs;var j=y.sibling,O=y.return;if(J0(y),y===f){cs=null;break e}if(j!==null){j.return=O,cs=j;break e}cs=O}}}var EA={getCacheForType:function(a){var c=Wr(Dr),f=c.data.get(a);return f===void 0&&(f=a(),c.data.set(a,f)),f},cacheSignal:function(){return Wr(Dr).controller.signal}},jA=typeof WeakMap=="function"?WeakMap:Map,Hn=0,lr=null,hn=null,An=0,Wn=0,Oi=null,$o=!1,ud=!1,xv=!1,No=0,Ar=0,Ga=0,_l=0,$f=0,Ts=0,$l=0,_h=null,di=null,Nf=!1,$h=0,iS=0,Df=1/0,Nh=null,Nl=null,Jr=0,Dl=null,dd=null,Do=0,Pf=0,Mf=null,Lc=null,Dh=0,bv=null;function ki(){return(Hn&2)!==0&&An!==0?An&-An:ce.T!==null?$v():wu()}function wv(){if(Ts===0)if((An&536870912)===0||vn){var a=xu;xu<<=1,(xu&3932160)===0&&(xu=262144),Ts=a}else Ts=536870912;return a=Ci.current,a!==null&&(a.flags|=32),Ts}function _s(a,c,f){(a===lr&&(Wn===2||Wn===9)||a.cancelPendingCommit!==null)&&(Ml(a,0),Pl(a,An,Ts,!1)),Er(a,f),((Hn&2)===0||a!==lr)&&(a===lr&&((Hn&2)===0&&(_l|=f),Ar===4&&Pl(a,An,Ts,!1)),Xa(a))}function aS(a,c,f){if((Hn&6)!==0)throw Error(o(327));var y=!f&&(c&127)===0&&(c&a.expiredLanes)===0||vr(a,c),j=y?AA(a,c):Ff(a,c,!0),O=y;do{if(j===0){ud&&!y&&Pl(a,c,0,!1);break}else{if(f=a.current.alternate,O&&!If(f)){j=Ff(a,c,!1),O=!1;continue}if(j===2){if(O=c,a.errorRecoveryDisabledLanes&O)var B=0;else B=a.pendingLanes&-536870913,B=B!==0?B:B&536870912?536870912:0;if(B!==0){c=B;e:{var te=a;j=_h;var ye=te.current.memoizedState.isDehydrated;if(ye&&(Ml(te,B).flags|=256),B=Ff(te,B,!1),B!==2){if(xv&&!ye){te.errorRecoveryDisabledLanes|=O,_l|=O,j=4;break e}O=di,di=j,O!==null&&(di===null?di=O:di.push.apply(di,O))}j=B}if(O=!1,j!==2)continue}}if(j===1){Ml(a,0),Pl(a,c,0,!0);break}e:{switch(y=a,O=j,O){case 0:case 1:throw Error(o(345));case 4:if((c&4194048)!==c)break;case 6:Pl(y,c,Ts,!$o);break e;case 2:di=null;break;case 3:case 5:break;default:throw Error(o(329))}if((c&62914560)===c&&(j=$h+300-L(),10<j)){if(Pl(y,c,Ts,!$o),zt(y,0,!0)!==0)break e;Do=c,y.timeoutHandle=Lv(oS.bind(null,y,f,di,Nh,Nf,c,Ts,_l,$l,$o,O,"Throttled",-0,0),j);break e}oS(y,f,di,Nh,Nf,c,Ts,_l,$l,$o,O,null,-0,0)}}break}while(!0);Xa(a)}function oS(a,c,f,y,j,O,B,te,ye,Be,We,rt,Ue,Xe){if(a.timeoutHandle=-1,rt=c.subtreeFlags,rt&8192||(rt&16785408)===16785408){rt={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:xa},vv(c,O,rt);var Dt=(O&62914560)===O?$h-L():(O&4194048)===O?iS-L():0;if(Dt=KA(rt,Dt),Dt!==null){Do=O,a.cancelPendingCommit=Dt(pS.bind(null,a,c,O,f,y,j,B,te,ye,We,rt,null,Ue,Xe)),Pl(a,O,B,!Be);return}}pS(a,c,O,f,y,j,B,te,ye)}function If(a){for(var c=a;;){var f=c.tag;if((f===0||f===11||f===15)&&c.flags&16384&&(f=c.updateQueue,f!==null&&(f=f.stores,f!==null)))for(var y=0;y<f.length;y++){var j=f[y],O=j.getSnapshot;j=j.value;try{if(!ei(O(),j))return!1}catch{return!1}}if(f=c.child,c.subtreeFlags&16384&&f!==null)f.return=c,c=f;else{if(c===a)break;for(;c.sibling===null;){if(c.return===null||c.return===a)return!0;c=c.return}c.sibling.return=c.return,c=c.sibling}}return!0}function Pl(a,c,f,y){c&=~$f,c&=~_l,a.suspendedLanes|=c,a.pingedLanes&=~c,y&&(a.warmLanes|=c),y=a.expirationTimes;for(var j=c;0<j;){var O=31-Xr(j),B=1<<O;y[O]=-1,j&=~B}f!==0&&ll(a,f,c)}function zf(){return(Hn&6)===0?(pd(0),!1):!0}function Sv(){if(hn!==null){if(Wn===0)var a=hn.return;else a=hn,Fa=Ec=null,jy(a),Zu=null,Tc=0,a=hn;for(;a!==null;)V0(a.alternate,a),a=a.return;hn=null}}function Ml(a,c){var f=a.timeoutHandle;f!==-1&&(a.timeoutHandle=-1,MA(f)),f=a.cancelPendingCommit,f!==null&&(a.cancelPendingCommit=null,f()),Do=0,Sv(),lr=a,hn=f=ni(a.current,null),An=c,Wn=0,Oi=null,$o=!1,ud=vr(a,c),xv=!1,$l=Ts=$f=_l=Ga=Ar=0,di=_h=null,Nf=!1,(c&8)!==0&&(c|=c&32);var y=a.entangledLanes;if(y!==0)for(a=a.entanglements,y&=c;0<y;){var j=31-Xr(y),O=1<<j;c|=a[j],y&=~O}return No=c,Zp(),f}function lS(a,c){en=null,ce.H=Sh,c===Oc||c===Yu?(c=uf(),Wn=3):c===lf?(c=uf(),Wn=4):Wn=c===Qy?8:c!==null&&typeof c=="object"&&typeof c.then=="function"?6:1,Oi=c,hn===null&&(Ar=1,wf(a,ri(c,a.current)))}function Ev(){var a=Ci.current;return a===null?!0:(An&4194048)===An?Qi===null:(An&62914560)===An||(An&536870912)!==0?a===Qi:!1}function cS(){var a=ce.H;return ce.H=Sh,a===null?Sh:a}function uS(){var a=ce.A;return ce.A=EA,a}function Lf(){Ar=4,$o||(An&4194048)!==An&&Ci.current!==null||(ud=!0),(Ga&134217727)===0&&(_l&134217727)===0||lr===null||Pl(lr,An,Ts,!1)}function Ff(a,c,f){var y=Hn;Hn|=2;var j=cS(),O=uS();(lr!==a||An!==c)&&(Nh=null,Ml(a,c)),c=!1;var B=Ar;e:do try{if(Wn!==0&&hn!==null){var te=hn,ye=Oi;switch(Wn){case 8:Sv(),B=6;break e;case 3:case 2:case 9:case 6:Ci.current===null&&(c=!0);var Be=Wn;if(Wn=0,Oi=null,hd(a,te,ye,Be),f&&ud){B=0;break e}break;default:Be=Wn,Wn=0,Oi=null,hd(a,te,ye,Be)}}CA(),B=Ar;break}catch(We){lS(a,We)}while(!0);return c&&a.shellSuspendCounter++,Fa=Ec=null,Hn=y,ce.H=j,ce.A=O,hn===null&&(lr=null,An=0,Zp()),B}function CA(){for(;hn!==null;)dS(hn)}function AA(a,c){var f=Hn;Hn|=2;var y=cS(),j=uS();lr!==a||An!==c?(Nh=null,Df=L()+500,Ml(a,c)):ud=vr(a,c);e:do try{if(Wn!==0&&hn!==null){c=hn;var O=Oi;t:switch(Wn){case 1:Wn=0,Oi=null,hd(a,c,O,1);break;case 2:case 9:if(Wi(O)){Wn=0,Oi=null,hS(c);break}c=function(){Wn!==2&&Wn!==9||lr!==a||(Wn=7),Xa(a)},O.then(c,c);break e;case 3:Wn=7;break e;case 4:Wn=5;break e;case 7:Wi(O)?(Wn=0,Oi=null,hS(c)):(Wn=0,Oi=null,hd(a,c,O,7));break;case 5:var B=null;switch(hn.tag){case 26:B=hn.memoizedState;case 5:case 27:var te=hn;if(B?qS(B):te.stateNode.complete){Wn=0,Oi=null;var ye=te.sibling;if(ye!==null)hn=ye;else{var Be=te.return;Be!==null?(hn=Be,qf(Be)):hn=null}break t}}Wn=0,Oi=null,hd(a,c,O,5);break;case 6:Wn=0,Oi=null,hd(a,c,O,6);break;case 8:Sv(),Ar=6;break e;default:throw Error(o(462))}}OA();break}catch(We){lS(a,We)}while(!0);return Fa=Ec=null,ce.H=y,ce.A=j,Hn=f,hn!==null?0:(lr=null,An=0,Zp(),Ar)}function OA(){for(;hn!==null&&!Ge();)dS(hn)}function dS(a){var c=U0(a.alternate,a,No);a.memoizedProps=a.pendingProps,c===null?qf(a):hn=c}function hS(a){var c=a,f=c.alternate;switch(c.tag){case 15:case 0:c=Ao(f,c,c.pendingProps,c.type,void 0,An);break;case 11:c=Ao(f,c,c.pendingProps,c.type.render,c.ref,An);break;case 5:jy(c);default:V0(f,c),c=hn=cy(c,No),c=U0(f,c,No)}a.memoizedProps=a.pendingProps,c===null?qf(a):hn=c}function hd(a,c,f,y){Fa=Ec=null,jy(c),Zu=null,Tc=0;var j=c.return;try{if(I0(a,j,c,f,An)){Ar=1,wf(a,ri(f,a.current)),hn=null;return}}catch(O){if(j!==null)throw hn=j,O;Ar=1,wf(a,ri(f,a.current)),hn=null;return}c.flags&32768?(vn||y===1?a=!0:ud||(An&536870912)!==0?a=!1:($o=a=!0,(y===2||y===9||y===3||y===6)&&(y=Ci.current,y!==null&&y.tag===13&&(y.flags|=16384))),jv(c,a)):qf(c)}function qf(a){var c=a;do{if((c.flags&32768)!==0){jv(c,$o);return}a=c.return;var f=wA(c.alternate,c,No);if(f!==null){hn=f;return}if(c=c.sibling,c!==null){hn=c;return}hn=c=a}while(c!==null);Ar===0&&(Ar=5)}function jv(a,c){do{var f=cv(a.alternate,a);if(f!==null){f.flags&=32767,hn=f;return}if(f=a.return,f!==null&&(f.flags|=32768,f.subtreeFlags=0,f.deletions=null),!c&&(a=a.sibling,a!==null)){hn=a;return}hn=a=f}while(a!==null);Ar=6,hn=null}function pS(a,c,f,y,j,O,B,te,ye){a.cancelPendingCommit=null;do Bf();while(Jr!==0);if((Hn&6)!==0)throw Error(o(327));if(c!==null){if(c===a.current)throw Error(o(177));if(O=c.lanes|c.childLanes,O|=oy,Ys(a,f,O,B,te,ye),a===lr&&(hn=lr=null,An=0),dd=c,Dl=a,Do=f,Pf=O,Mf=j,Lc=y,(c.subtreeFlags&10256)!==0||(c.flags&10256)!==0?(a.callbackNode=null,a.callbackPriority=0,kv(Re,function(){return Cv(),null})):(a.callbackNode=null,a.callbackPriority=0),y=(c.flags&13878)!==0,(c.subtreeFlags&13878)!==0||y){y=ce.T,ce.T=null,j=re.p,re.p=2,B=Hn,Hn|=4;try{Z0(a,c,f)}finally{Hn=B,re.p=j,ce.T=y}}Jr=1,fS(),mS(),gS()}}function fS(){if(Jr===1){Jr=0;var a=Dl,c=dd,f=(c.flags&13878)!==0;if((c.subtreeFlags&13878)!==0||f){f=ce.T,ce.T=null;var y=re.p;re.p=2;var j=Hn;Hn|=4;try{tS(c,a);var O=Wf,B=t0(a.containerInfo),te=O.focusedElem,ye=O.selectionRange;if(B!==te&&te&&te.ownerDocument&&e0(te.ownerDocument.documentElement,te)){if(ye!==null&&Jg(te)){var Be=ye.start,We=ye.end;if(We===void 0&&(We=Be),"selectionStart"in te)te.selectionStart=Be,te.selectionEnd=Math.min(We,te.value.length);else{var rt=te.ownerDocument||document,Ue=rt&&rt.defaultView||window;if(Ue.getSelection){var Xe=Ue.getSelection(),Dt=te.textContent.length,Xt=Math.min(ye.start,Dt),Qn=ye.end===void 0?Xt:Math.min(ye.end,Dt);!Xe.extend&&Xt>Qn&&(B=Qn,Qn=Xt,Xt=B);var $e=Qw(te,Xt),Ee=Qw(te,Qn);if($e&&Ee&&(Xe.rangeCount!==1||Xe.anchorNode!==$e.node||Xe.anchorOffset!==$e.offset||Xe.focusNode!==Ee.node||Xe.focusOffset!==Ee.offset)){var Pe=rt.createRange();Pe.setStart($e.node,$e.offset),Xe.removeAllRanges(),Xt>Qn?(Xe.addRange(Pe),Xe.extend(Ee.node,Ee.offset)):(Pe.setEnd(Ee.node,Ee.offset),Xe.addRange(Pe))}}}}for(rt=[],Xe=te;Xe=Xe.parentNode;)Xe.nodeType===1&&rt.push({element:Xe,left:Xe.scrollLeft,top:Xe.scrollTop});for(typeof te.focus=="function"&&te.focus(),te=0;te<rt.length;te++){var nt=rt[te];nt.element.scrollLeft=nt.left,nt.element.scrollTop=nt.top}}lm=!!Zf,Wf=Zf=null}finally{Hn=j,re.p=y,ce.T=f}}a.current=c,Jr=2}}function mS(){if(Jr===2){Jr=0;var a=Dl,c=dd,f=(c.flags&8772)!==0;if((c.subtreeFlags&8772)!==0||f){f=ce.T,ce.T=null;var y=re.p;re.p=2;var j=Hn;Hn|=4;try{W0(a,c.alternate,c)}finally{Hn=j,re.p=y,ce.T=f}}Jr=3}}function gS(){if(Jr===4||Jr===3){Jr=0,D();var a=Dl,c=dd,f=Do,y=Lc;(c.subtreeFlags&10256)!==0||(c.flags&10256)!==0?Jr=5:(Jr=0,dd=Dl=null,yS(a,a.pendingLanes));var j=a.pendingLanes;if(j===0&&(Nl=null),ga(f),c=c.stateNode,Ht&&typeof Ht.onCommitFiberRoot=="function")try{Ht.onCommitFiberRoot(dn,c,void 0,(c.current.flags&128)===128)}catch{}if(y!==null){c=ce.T,j=re.p,re.p=2,ce.T=null;try{for(var O=a.onRecoverableError,B=0;B<y.length;B++){var te=y[B];O(te.value,{componentStack:te.stack})}}finally{ce.T=c,re.p=j}}(Do&3)!==0&&Bf(),Xa(a),j=a.pendingLanes,(f&261930)!==0&&(j&42)!==0?a===bv?Dh++:(Dh=0,bv=a):Dh=0,pd(0)}}function yS(a,c){(a.pooledCacheLanes&=c)===0&&(c=a.pooledCache,c!=null&&(a.pooledCache=null,Gu(c)))}function Bf(){return fS(),mS(),gS(),Cv()}function Cv(){if(Jr!==5)return!1;var a=Dl,c=Pf;Pf=0;var f=ga(Do),y=ce.T,j=re.p;try{re.p=32>f?32:f,ce.T=null,f=Mf,Mf=null;var O=Dl,B=Do;if(Jr=0,dd=Dl=null,Do=0,(Hn&6)!==0)throw Error(o(331));var te=Hn;if(Hn|=4,rS(O.current),yv(O,O.current,B,f),Hn=te,pd(0,!1),Ht&&typeof Ht.onPostCommitFiberRoot=="function")try{Ht.onPostCommitFiberRoot(dn,O)}catch{}return!0}finally{re.p=j,ce.T=y,yS(a,c)}}function vS(a,c,f){c=ri(f,c),c=Wy(a.stateNode,c,2),a=jl(a,c,2),a!==null&&(Er(a,2),Xa(a))}function Xn(a,c,f){if(a.tag===3)vS(a,a,f);else for(;c!==null;){if(c.tag===3){vS(c,a,f);break}else if(c.tag===1){var y=c.stateNode;if(typeof c.type.getDerivedStateFromError=="function"||typeof y.componentDidCatch=="function"&&(Nl===null||!Nl.has(y))){a=ri(f,a),f=Jy(2),y=jl(c,f,2),y!==null&&(Cl(f,y,c,a),Er(y,2),Xa(y));break}}c=c.return}}function Av(a,c,f){var y=a.pingCache;if(y===null){y=a.pingCache=new jA;var j=new Set;y.set(c,j)}else j=y.get(c),j===void 0&&(j=new Set,y.set(c,j));j.has(f)||(xv=!0,j.add(f),a=Uf.bind(null,a,c,f),c.then(a,a))}function Uf(a,c,f){var y=a.pingCache;y!==null&&y.delete(c),a.pingedLanes|=a.suspendedLanes&f,a.warmLanes&=~f,lr===a&&(An&f)===f&&(Ar===4||Ar===3&&(An&62914560)===An&&300>L()-$h?(Hn&2)===0&&Ml(a,0):$f|=f,$l===An&&($l=0)),Xa(a)}function Ov(a,c){c===0&&(c=Os()),a=bc(a,c),a!==null&&(Er(a,c),Xa(a))}function kA(a){var c=a.memoizedState,f=0;c!==null&&(f=c.retryLane),Ov(a,f)}function RA(a,c){var f=0;switch(a.tag){case 31:case 13:var y=a.stateNode,j=a.memoizedState;j!==null&&(f=j.retryLane);break;case 19:y=a.stateNode;break;case 22:y=a.stateNode._retryCache;break;default:throw Error(o(314))}y!==null&&y.delete(c),Ov(a,f)}function kv(a,c){return ve(a,c)}var Kf=null,Fc=null,Rv=!1,Vf=!1,Tv=!1,Aa=0;function Xa(a){a!==Fc&&a.next===null&&(Fc===null?Kf=Fc=a:Fc=Fc.next=a),Vf=!0,Rv||(Rv=!0,TA())}function pd(a,c){if(!Tv&&Vf){Tv=!0;do for(var f=!1,y=Kf;y!==null;){if(a!==0){var j=y.pendingLanes;if(j===0)var O=0;else{var B=y.suspendedLanes,te=y.pingedLanes;O=(1<<31-Xr(42|a)+1)-1,O&=j&~(B&~te),O=O&201326741?O&201326741|1:O?O|2:0}O!==0&&(f=!0,wS(y,O))}else O=An,O=zt(y,y===lr?O:0,y.cancelPendingCommit!==null||y.timeoutHandle!==-1),(O&3)===0||vr(y,O)||(f=!0,wS(y,O));y=y.next}while(f);Tv=!1}}function _v(){Hf()}function Hf(){Vf=Rv=!1;var a=0;Aa!==0&&PA()&&(a=Aa);for(var c=L(),f=null,y=Kf;y!==null;){var j=y.next,O=xS(y,c);O===0?(y.next=null,f===null?Kf=j:f.next=j,j===null&&(Fc=f)):(f=y,(a!==0||(O&3)!==0)&&(Vf=!0)),y=j}Jr!==0&&Jr!==5||pd(a),Aa!==0&&(Aa=0)}function xS(a,c){for(var f=a.suspendedLanes,y=a.pingedLanes,j=a.expirationTimes,O=a.pendingLanes&-62914561;0<O;){var B=31-Xr(O),te=1<<B,ye=j[B];ye===-1?((te&f)===0||(te&y)!==0)&&(j[B]=Yr(te,c)):ye<=c&&(a.expiredLanes|=te),O&=~te}if(c=lr,f=An,f=zt(a,a===c?f:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),y=a.callbackNode,f===0||a===c&&(Wn===2||Wn===9)||a.cancelPendingCommit!==null)return y!==null&&y!==null&&De(y),a.callbackNode=null,a.callbackPriority=0;if((f&3)===0||vr(a,f)){if(c=f&-f,c===a.callbackPriority)return c;switch(y!==null&&De(y),ga(f)){case 2:case 8:f=we;break;case 32:f=Re;break;case 268435456:f=Kt;break;default:f=Re}return y=bS.bind(null,a),f=ve(f,y),a.callbackPriority=c,a.callbackNode=f,c}return y!==null&&y!==null&&De(y),a.callbackPriority=2,a.callbackNode=null,2}function bS(a,c){if(Jr!==0&&Jr!==5)return a.callbackNode=null,a.callbackPriority=0,null;var f=a.callbackNode;if(Bf()&&a.callbackNode!==f)return null;var y=An;return y=zt(a,a===lr?y:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),y===0?null:(aS(a,y,c),xS(a,L()),a.callbackNode!=null&&a.callbackNode===f?bS.bind(null,a):null)}function wS(a,c){if(Bf())return null;aS(a,c,!0)}function TA(){Fv(function(){(Hn&6)!==0?ve(W,_v):Hf()})}function $v(){if(Aa===0){var a=Sl;a===0&&(a=cc,cc<<=1,(cc&261888)===0&&(cc=256)),Aa=a}return Aa}function Ph(a){return a==null||typeof a=="symbol"||typeof a=="boolean"?null:typeof a=="function"?a:rh(""+a)}function SS(a,c){var f=c.ownerDocument.createElement("input");return f.name=c.name,f.value=c.value,a.id&&f.setAttribute("form",a.id),c.parentNode.insertBefore(f,c),a=new FormData(a),f.parentNode.removeChild(f),a}function fd(a,c,f,y,j){if(c==="submit"&&f&&f.stateNode===j){var O=Ph((j[Ps]||null).action),B=y.submitter;B&&(c=(c=B[Ps]||null)?Ph(c.formAction):B.getAttribute("formAction"),c!==null&&(O=c,B=null));var te=new ih("action","action",null,y,j);a.push({event:te,listeners:[{instance:null,listener:function(){if(y.defaultPrevented){if(Aa!==0){var ye=B?SS(j,B):new FormData(j);Ky(f,{pending:!0,data:ye,method:j.method,action:O},null,ye)}}else typeof O=="function"&&(te.preventDefault(),ye=B?SS(j,B):new FormData(j),Ky(f,{pending:!0,data:ye,method:j.method,action:O},O,ye))},currentTarget:j}]})}}for(var Mh=0;Mh<ay.length;Mh++){var Nv=ay[Mh],_A=Nv.toLowerCase(),$A=Nv[0].toUpperCase()+Nv.slice(1);Sa(_A,"on"+$A)}Sa(ny,"onAnimationEnd"),Sa(ry,"onAnimationIteration"),Sa(sy,"onAnimationStart"),Sa("dblclick","onDoubleClick"),Sa("focusin","onFocus"),Sa("focusout","onBlur"),Sa(vo,"onTransitionRun"),Sa(fA,"onTransitionStart"),Sa(iy,"onTransitionCancel"),Sa(Yp,"onTransitionEnd"),Si("onMouseEnter",["mouseout","mouseover"]),Si("onMouseLeave",["mouseout","mouseover"]),Si("onPointerEnter",["pointerout","pointerover"]),Si("onPointerLeave",["pointerout","pointerover"]),sr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),sr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),sr("onBeforeInput",["compositionend","keypress","textInput","paste"]),sr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),sr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),sr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var md="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(" "),ES=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(md));function jS(a,c){c=(c&4)!==0;for(var f=0;f<a.length;f++){var y=a[f],j=y.event;y=y.listeners;e:{var O=void 0;if(c)for(var B=y.length-1;0<=B;B--){var te=y[B],ye=te.instance,Be=te.currentTarget;if(te=te.listener,ye!==O&&j.isPropagationStopped())break e;O=te,j.currentTarget=Be;try{O(j)}catch(We){xc(We)}j.currentTarget=null,O=ye}else for(B=0;B<y.length;B++){if(te=y[B],ye=te.instance,Be=te.currentTarget,te=te.listener,ye!==O&&j.isPropagationStopped())break e;O=te,j.currentTarget=Be;try{O(j)}catch(We){xc(We)}j.currentTarget=null,O=ye}}}}function En(a,c){var f=c[Gt];f===void 0&&(f=c[Gt]=new Set);var y=a+"__bubble";f.has(y)||(CS(c,a,2,!1),f.add(y))}function Gf(a,c,f){var y=0;c&&(y|=4),CS(f,a,y,c)}var Ih="_reactListening"+Math.random().toString(36).slice(2);function Xf(a){if(!a[Ih]){a[Ih]=!0,dt.forEach(function(f){f!=="selectionchange"&&(ES.has(f)||Gf(f,!1,a),Gf(f,!0,a))});var c=a.nodeType===9?a:a.ownerDocument;c===null||c[Ih]||(c[Ih]=!0,Gf("selectionchange",!1,c))}}function CS(a,c,f,y){switch(HS(c)){case 2:var j=HA;break;case 8:j=GA;break;default:j=Qv}f=j.bind(null,c,f,a),j=void 0,!Bp||c!=="touchstart"&&c!=="touchmove"&&c!=="wheel"||(j=!0),y?j!==void 0?a.addEventListener(c,f,{capture:!0,passive:j}):a.addEventListener(c,f,!0):j!==void 0?a.addEventListener(c,f,{passive:j}):a.addEventListener(c,f,!1)}function Dv(a,c,f,y,j){var O=y;if((c&1)===0&&(c&2)===0&&y!==null)e:for(;;){if(y===null)return;var B=y.tag;if(B===3||B===4){var te=y.stateNode.containerInfo;if(te===j)break;if(B===4)for(B=y.return;B!==null;){var ye=B.tag;if((ye===3||ye===4)&&B.stateNode.containerInfo===j)return;B=B.return}for(;te!==null;){if(B=dc(te),B===null)return;if(ye=B.tag,ye===5||ye===6||ye===26||ye===27){y=O=B;continue e}te=te.parentNode}}y=y.return}qp(function(){var Be=O,We=Bg(f),rt=[];e:{var Ue=r0.get(a);if(Ue!==void 0){var Xe=ih,Dt=a;switch(a){case"keypress":if(Up(f)===0)break e;case"keydown":case"keyup":Xe=aA;break;case"focusin":Dt="focus",Xe=Kg;break;case"focusout":Dt="blur",Xe=Kg;break;case"beforeblur":case"afterblur":Xe=Kg;break;case"click":if(f.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Xe=Rw;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Xe=Tw;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Xe=Xg;break;case ny:case ry:case sy:Xe=$w;break;case Yp:Xe=oA;break;case"scroll":case"scrollend":Xe=kw;break;case"wheel":Xe=cA;break;case"copy":case"cut":case"paste":Xe=Dw;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Xe=Fw;break;case"toggle":case"beforetoggle":Xe=Uw}var Xt=(c&4)!==0,Qn=!Xt&&(a==="scroll"||a==="scrollend"),$e=Xt?Ue!==null?Ue+"Capture":null:Ue;Xt=[];for(var Ee=Be,Pe;Ee!==null;){var nt=Ee;if(Pe=nt.stateNode,nt=nt.tag,nt!==5&&nt!==26&&nt!==27||Pe===null||$e===null||(nt=Ru(Ee,$e),nt!=null&&Xt.push(zh(Ee,nt,Pe))),Qn)break;Ee=Ee.return}0<Xt.length&&(Ue=new Xe(Ue,Dt,null,f,We),rt.push({event:Ue,listeners:Xt}))}}if((c&7)===0){e:{if(Ue=a==="mouseover"||a==="pointerover",Xe=a==="mouseout"||a==="pointerout",Ue&&f!==as&&(Dt=f.relatedTarget||f.fromElement)&&(dc(Dt)||Dt[cl]))break e;if((Xe||Ue)&&(Ue=We.window===We?We:(Ue=We.ownerDocument)?Ue.defaultView||Ue.parentWindow:window,Xe?(Dt=f.relatedTarget||f.toElement,Xe=Be,Dt=Dt?dc(Dt):null,Dt!==null&&(Qn=p(Dt),Xt=Dt.tag,Dt!==Qn||Xt!==5&&Xt!==27&&Xt!==6)&&(Dt=null)):(Xe=null,Dt=Be),Xe!==Dt)){if(Xt=Rw,nt="onMouseLeave",$e="onMouseEnter",Ee="mouse",(a==="pointerout"||a==="pointerover")&&(Xt=Fw,nt="onPointerLeave",$e="onPointerEnter",Ee="pointer"),Qn=Xe==null?Ue:Hi(Xe),Pe=Dt==null?Ue:Hi(Dt),Ue=new Xt(nt,Ee+"leave",Xe,f,We),Ue.target=Qn,Ue.relatedTarget=Pe,nt=null,dc(We)===Be&&(Xt=new Xt($e,Ee+"enter",Dt,f,We),Xt.target=Pe,Xt.relatedTarget=Qn,nt=Xt),Qn=nt,Xe&&Dt)t:{for(Xt=AS,$e=Xe,Ee=Dt,Pe=0,nt=$e;nt;nt=Xt(nt))Pe++;nt=0;for(var Ut=Ee;Ut;Ut=Xt(Ut))nt++;for(;0<Pe-nt;)$e=Xt($e),Pe--;for(;0<nt-Pe;)Ee=Xt(Ee),nt--;for(;Pe--;){if($e===Ee||Ee!==null&&$e===Ee.alternate){Xt=$e;break t}$e=Xt($e),Ee=Xt(Ee)}Xt=null}else Xt=null;Xe!==null&&Pv(rt,Ue,Xe,Xt,!1),Dt!==null&&Qn!==null&&Pv(rt,Qn,Dt,Xt,!0)}}e:{if(Ue=Be?Hi(Be):window,Xe=Ue.nodeName&&Ue.nodeName.toLowerCase(),Xe==="select"||Xe==="input"&&Ue.type==="file")var pn=Gp;else if(Bt(Ue))if(Nr)pn=hA;else{pn=dA;var Pt=Mu}else Xe=Ue.nodeName,!Xe||Xe.toLowerCase()!=="input"||Ue.type!=="checkbox"&&Ue.type!=="radio"?Be&&nh(Be.elementType)&&(pn=Gp):pn=Ww;if(pn&&(pn=pn(a,Be))){oh(rt,pn,f,We);break e}Pt&&Pt(a,Ue,Be),a==="focusout"&&Be&&Ue.type==="number"&&Be.memoizedProps.value!=null&&Lp(Ue,"number",Ue.value)}switch(Pt=Be?Hi(Be):window,a){case"focusin":(Bt(Pt)||Pt.contentEditable==="true")&&(fl=Pt,zu=Be,yo=null);break;case"focusout":yo=zu=fl=null;break;case"mousedown":Xp=!0;break;case"contextmenu":case"mouseup":case"dragend":Xp=!1,Qg(rt,f,We);break;case"selectionchange":if(n0)break;case"keydown":case"keyup":Qg(rt,f,We)}var rn;if(Gi)e:{switch(a){case"compositionstart":var wn="onCompositionStart";break e;case"compositionend":wn="onCompositionEnd";break e;case"compositionupdate":wn="onCompositionUpdate";break e}wn=void 0}else yc?Hw(a,f)&&(wn="onCompositionEnd"):a==="keydown"&&f.keyCode===229&&(wn="onCompositionStart");wn&&(gc&&f.locale!=="ko"&&(yc||wn!=="onCompositionStart"?wn==="onCompositionEnd"&&yc&&(rn=Ow()):(Rr=We,sh="value"in Rr?Rr.value:Rr.textContent,yc=!0)),Pt=Yf(Be,wn),0<Pt.length&&(wn=new Vg(wn,a,null,f,We),rt.push({event:wn,listeners:Pt}),rn?wn.data=rn:(rn=Zg(f),rn!==null&&(wn.data=rn)))),(rn=Qs?Nu(a,f):uA(a,f))&&(wn=Yf(Be,"onBeforeInput"),0<wn.length&&(Pt=new Vg("onBeforeInput","beforeinput",null,f,We),rt.push({event:Pt,listeners:wn}),Pt.data=rn)),fd(rt,a,Be,f,We)}jS(rt,c)})}function zh(a,c,f){return{instance:a,listener:c,currentTarget:f}}function Yf(a,c){for(var f=c+"Capture",y=[];a!==null;){var j=a,O=j.stateNode;if(j=j.tag,j!==5&&j!==26&&j!==27||O===null||(j=Ru(a,f),j!=null&&y.unshift(zh(a,j,O)),j=Ru(a,c),j!=null&&y.push(zh(a,j,O))),a.tag===3)return y;a=a.return}return[]}function AS(a){if(a===null)return null;do a=a.return;while(a&&a.tag!==5&&a.tag!==27);return a||null}function Pv(a,c,f,y,j){for(var O=c._reactName,B=[];f!==null&&f!==y;){var te=f,ye=te.alternate,Be=te.stateNode;if(te=te.tag,ye!==null&&ye===y)break;te!==5&&te!==26&&te!==27||Be===null||(ye=Be,j?(Be=Ru(f,O),Be!=null&&B.unshift(zh(f,Be,ye))):j||(Be=Ru(f,O),Be!=null&&B.push(zh(f,Be,ye)))),f=f.return}B.length!==0&&a.push({event:c,listeners:B})}var Ya=/\r\n?/g,OS=/\u0000|\uFFFD/g;function Mv(a){return(typeof a=="string"?a:""+a).replace(Ya,`
|
||
`).replace(OS,"")}function Lh(a,c){return c=Mv(c),Mv(a)===c}function Pn(a,c,f,y,j,O){switch(f){case"children":typeof y=="string"?c==="body"||c==="textarea"&&y===""||Ou(a,y):(typeof y=="number"||typeof y=="bigint")&&c!=="body"&&Ou(a,""+y);break;case"className":dl(a,"class",y);break;case"tabIndex":dl(a,"tabindex",y);break;case"dir":case"role":case"viewBox":case"width":case"height":dl(a,f,y);break;case"style":Cw(a,y,O);break;case"data":if(c!=="object"){dl(a,"data",y);break}case"src":case"href":if(y===""&&(c!=="a"||f!=="href")){a.removeAttribute(f);break}if(y==null||typeof y=="function"||typeof y=="symbol"||typeof y=="boolean"){a.removeAttribute(f);break}y=rh(""+y),a.setAttribute(f,y);break;case"action":case"formAction":if(typeof y=="function"){a.setAttribute(f,"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 O=="function"&&(f==="formAction"?(c!=="input"&&Pn(a,c,"name",j.name,j,null),Pn(a,c,"formEncType",j.formEncType,j,null),Pn(a,c,"formMethod",j.formMethod,j,null),Pn(a,c,"formTarget",j.formTarget,j,null)):(Pn(a,c,"encType",j.encType,j,null),Pn(a,c,"method",j.method,j,null),Pn(a,c,"target",j.target,j,null)));if(y==null||typeof y=="symbol"||typeof y=="boolean"){a.removeAttribute(f);break}y=rh(""+y),a.setAttribute(f,y);break;case"onClick":y!=null&&(a.onclick=xa);break;case"onScroll":y!=null&&En("scroll",a);break;case"onScrollEnd":y!=null&&En("scrollend",a);break;case"dangerouslySetInnerHTML":if(y!=null){if(typeof y!="object"||!("__html"in y))throw Error(o(61));if(f=y.__html,f!=null){if(j.children!=null)throw Error(o(60));a.innerHTML=f}}break;case"multiple":a.multiple=y&&typeof y!="function"&&typeof y!="symbol";break;case"muted":a.muted=y&&typeof y!="function"&&typeof y!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(y==null||typeof y=="function"||typeof y=="boolean"||typeof y=="symbol"){a.removeAttribute("xlink:href");break}f=rh(""+y),a.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",f);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":y!=null&&typeof y!="function"&&typeof y!="symbol"?a.setAttribute(f,""+y):a.removeAttribute(f);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":y&&typeof y!="function"&&typeof y!="symbol"?a.setAttribute(f,""):a.removeAttribute(f);break;case"capture":case"download":y===!0?a.setAttribute(f,""):y!==!1&&y!=null&&typeof y!="function"&&typeof y!="symbol"?a.setAttribute(f,y):a.removeAttribute(f);break;case"cols":case"rows":case"size":case"span":y!=null&&typeof y!="function"&&typeof y!="symbol"&&!isNaN(y)&&1<=y?a.setAttribute(f,y):a.removeAttribute(f);break;case"rowSpan":case"start":y==null||typeof y=="function"||typeof y=="symbol"||isNaN(y)?a.removeAttribute(f):a.setAttribute(f,y);break;case"popover":En("beforetoggle",a),En("toggle",a),pc(a,"popover",y);break;case"xlinkActuate":va(a,"http://www.w3.org/1999/xlink","xlink:actuate",y);break;case"xlinkArcrole":va(a,"http://www.w3.org/1999/xlink","xlink:arcrole",y);break;case"xlinkRole":va(a,"http://www.w3.org/1999/xlink","xlink:role",y);break;case"xlinkShow":va(a,"http://www.w3.org/1999/xlink","xlink:show",y);break;case"xlinkTitle":va(a,"http://www.w3.org/1999/xlink","xlink:title",y);break;case"xlinkType":va(a,"http://www.w3.org/1999/xlink","xlink:type",y);break;case"xmlBase":va(a,"http://www.w3.org/XML/1998/namespace","xml:base",y);break;case"xmlLang":va(a,"http://www.w3.org/XML/1998/namespace","xml:lang",y);break;case"xmlSpace":va(a,"http://www.w3.org/XML/1998/namespace","xml:space",y);break;case"is":pc(a,"is",y);break;case"innerText":case"textContent":break;default:(!(2<f.length)||f[0]!=="o"&&f[0]!=="O"||f[1]!=="n"&&f[1]!=="N")&&(f=Aw.get(f)||f,pc(a,f,y))}}function Fh(a,c,f,y,j,O){switch(f){case"style":Cw(a,y,O);break;case"dangerouslySetInnerHTML":if(y!=null){if(typeof y!="object"||!("__html"in y))throw Error(o(61));if(f=y.__html,f!=null){if(j.children!=null)throw Error(o(60));a.innerHTML=f}}break;case"children":typeof y=="string"?Ou(a,y):(typeof y=="number"||typeof y=="bigint")&&Ou(a,""+y);break;case"onScroll":y!=null&&En("scroll",a);break;case"onScrollEnd":y!=null&&En("scrollend",a);break;case"onClick":y!=null&&(a.onclick=xa);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!ww.hasOwnProperty(f))e:{if(f[0]==="o"&&f[1]==="n"&&(j=f.endsWith("Capture"),c=f.slice(2,j?f.length-7:void 0),O=a[Ps]||null,O=O!=null?O[f]:null,typeof O=="function"&&a.removeEventListener(c,O,j),typeof y=="function")){typeof O!="function"&&O!==null&&(f in a?a[f]=null:a.hasAttribute(f)&&a.removeAttribute(f)),a.addEventListener(c,y,j);break e}f in a?a[f]=y:y===!0?a.setAttribute(f,""):pc(a,f,y)}}}function xs(a,c,f){switch(c){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":En("error",a),En("load",a);var y=!1,j=!1,O;for(O in f)if(f.hasOwnProperty(O)){var B=f[O];if(B!=null)switch(O){case"src":y=!0;break;case"srcSet":j=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,c));default:Pn(a,c,O,B,f,null)}}j&&Pn(a,c,"srcSet",f.srcSet,f,null),y&&Pn(a,c,"src",f.src,f,null);return;case"input":En("invalid",a);var te=O=B=j=null,ye=null,Be=null;for(y in f)if(f.hasOwnProperty(y)){var We=f[y];if(We!=null)switch(y){case"name":j=We;break;case"type":B=We;break;case"checked":ye=We;break;case"defaultChecked":Be=We;break;case"value":O=We;break;case"defaultValue":te=We;break;case"children":case"dangerouslySetInnerHTML":if(We!=null)throw Error(o(137,c));break;default:Pn(a,c,y,We,f,null)}}Fg(a,O,te,ye,Be,B,j,!1);return;case"select":En("invalid",a),y=B=O=null;for(j in f)if(f.hasOwnProperty(j)&&(te=f[j],te!=null))switch(j){case"value":O=te;break;case"defaultValue":B=te;break;case"multiple":y=te;default:Pn(a,c,j,te,f,null)}c=O,f=B,a.multiple=!!y,c!=null?Au(a,!!y,c,!1):f!=null&&Au(a,!!y,f,!0);return;case"textarea":En("invalid",a),O=j=y=null;for(B in f)if(f.hasOwnProperty(B)&&(te=f[B],te!=null))switch(B){case"value":y=te;break;case"defaultValue":j=te;break;case"children":O=te;break;case"dangerouslySetInnerHTML":if(te!=null)throw Error(o(91));break;default:Pn(a,c,B,te,f,null)}Ew(a,y,j,O);return;case"option":for(ye in f)if(f.hasOwnProperty(ye)&&(y=f[ye],y!=null))switch(ye){case"selected":a.selected=y&&typeof y!="function"&&typeof y!="symbol";break;default:Pn(a,c,ye,y,f,null)}return;case"dialog":En("beforetoggle",a),En("toggle",a),En("cancel",a),En("close",a);break;case"iframe":case"object":En("load",a);break;case"video":case"audio":for(y=0;y<md.length;y++)En(md[y],a);break;case"image":En("error",a),En("load",a);break;case"details":En("toggle",a);break;case"embed":case"source":case"link":En("error",a),En("load",a);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Be in f)if(f.hasOwnProperty(Be)&&(y=f[Be],y!=null))switch(Be){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,c));default:Pn(a,c,Be,y,f,null)}return;default:if(nh(c)){for(We in f)f.hasOwnProperty(We)&&(y=f[We],y!==void 0&&Fh(a,c,We,y,f,void 0));return}}for(te in f)f.hasOwnProperty(te)&&(y=f[te],y!=null&&Pn(a,c,te,y,f,null))}function NA(a,c,f,y){switch(c){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var j=null,O=null,B=null,te=null,ye=null,Be=null,We=null;for(Xe in f){var rt=f[Xe];if(f.hasOwnProperty(Xe)&&rt!=null)switch(Xe){case"checked":break;case"value":break;case"defaultValue":ye=rt;default:y.hasOwnProperty(Xe)||Pn(a,c,Xe,null,y,rt)}}for(var Ue in y){var Xe=y[Ue];if(rt=f[Ue],y.hasOwnProperty(Ue)&&(Xe!=null||rt!=null))switch(Ue){case"type":O=Xe;break;case"name":j=Xe;break;case"checked":Be=Xe;break;case"defaultChecked":We=Xe;break;case"value":B=Xe;break;case"defaultValue":te=Xe;break;case"children":case"dangerouslySetInnerHTML":if(Xe!=null)throw Error(o(137,c));break;default:Xe!==rt&&Pn(a,c,Ue,Xe,y,rt)}}zp(a,B,te,ye,Be,We,O,j);return;case"select":Xe=B=te=Ue=null;for(O in f)if(ye=f[O],f.hasOwnProperty(O)&&ye!=null)switch(O){case"value":break;case"multiple":Xe=ye;default:y.hasOwnProperty(O)||Pn(a,c,O,null,y,ye)}for(j in y)if(O=y[j],ye=f[j],y.hasOwnProperty(j)&&(O!=null||ye!=null))switch(j){case"value":Ue=O;break;case"defaultValue":te=O;break;case"multiple":B=O;default:O!==ye&&Pn(a,c,j,O,y,ye)}c=te,f=B,y=Xe,Ue!=null?Au(a,!!f,Ue,!1):!!y!=!!f&&(c!=null?Au(a,!!f,c,!0):Au(a,!!f,f?[]:"",!1));return;case"textarea":Xe=Ue=null;for(te in f)if(j=f[te],f.hasOwnProperty(te)&&j!=null&&!y.hasOwnProperty(te))switch(te){case"value":break;case"children":break;default:Pn(a,c,te,null,y,j)}for(B in y)if(j=y[B],O=f[B],y.hasOwnProperty(B)&&(j!=null||O!=null))switch(B){case"value":Ue=j;break;case"defaultValue":Xe=j;break;case"children":break;case"dangerouslySetInnerHTML":if(j!=null)throw Error(o(91));break;default:j!==O&&Pn(a,c,B,j,y,O)}Sw(a,Ue,Xe);return;case"option":for(var Dt in f)if(Ue=f[Dt],f.hasOwnProperty(Dt)&&Ue!=null&&!y.hasOwnProperty(Dt))switch(Dt){case"selected":a.selected=!1;break;default:Pn(a,c,Dt,null,y,Ue)}for(ye in y)if(Ue=y[ye],Xe=f[ye],y.hasOwnProperty(ye)&&Ue!==Xe&&(Ue!=null||Xe!=null))switch(ye){case"selected":a.selected=Ue&&typeof Ue!="function"&&typeof Ue!="symbol";break;default:Pn(a,c,ye,Ue,y,Xe)}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 Xt in f)Ue=f[Xt],f.hasOwnProperty(Xt)&&Ue!=null&&!y.hasOwnProperty(Xt)&&Pn(a,c,Xt,null,y,Ue);for(Be in y)if(Ue=y[Be],Xe=f[Be],y.hasOwnProperty(Be)&&Ue!==Xe&&(Ue!=null||Xe!=null))switch(Be){case"children":case"dangerouslySetInnerHTML":if(Ue!=null)throw Error(o(137,c));break;default:Pn(a,c,Be,Ue,y,Xe)}return;default:if(nh(c)){for(var Qn in f)Ue=f[Qn],f.hasOwnProperty(Qn)&&Ue!==void 0&&!y.hasOwnProperty(Qn)&&Fh(a,c,Qn,void 0,y,Ue);for(We in y)Ue=y[We],Xe=f[We],!y.hasOwnProperty(We)||Ue===Xe||Ue===void 0&&Xe===void 0||Fh(a,c,We,Ue,y,Xe);return}}for(var $e in f)Ue=f[$e],f.hasOwnProperty($e)&&Ue!=null&&!y.hasOwnProperty($e)&&Pn(a,c,$e,null,y,Ue);for(rt in y)Ue=y[rt],Xe=f[rt],!y.hasOwnProperty(rt)||Ue===Xe||Ue==null&&Xe==null||Pn(a,c,rt,Ue,y,Xe)}function Iv(a){switch(a){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function DA(){if(typeof performance.getEntriesByType=="function"){for(var a=0,c=0,f=performance.getEntriesByType("resource"),y=0;y<f.length;y++){var j=f[y],O=j.transferSize,B=j.initiatorType,te=j.duration;if(O&&te&&Iv(B)){for(B=0,te=j.responseEnd,y+=1;y<f.length;y++){var ye=f[y],Be=ye.startTime;if(Be>te)break;var We=ye.transferSize,rt=ye.initiatorType;We&&Iv(rt)&&(ye=ye.responseEnd,B+=We*(ye<te?1:(te-Be)/(ye-Be)))}if(--y,c+=8*(O+B)/(j.duration/1e3),a++,10<a)break}}if(0<a)return c/a/1e6}return navigator.connection&&(a=navigator.connection.downlink,typeof a=="number")?a:5}var Zf=null,Wf=null;function qc(a){return a.nodeType===9?a:a.ownerDocument}function gd(a){switch(a){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function qh(a,c){if(a===0)switch(c){case"svg":return 1;case"math":return 2;default:return 0}return a===1&&c==="foreignObject"?0:a}function zv(a,c){return a==="textarea"||a==="noscript"||typeof c.children=="string"||typeof c.children=="number"||typeof c.children=="bigint"||typeof c.dangerouslySetInnerHTML=="object"&&c.dangerouslySetInnerHTML!==null&&c.dangerouslySetInnerHTML.__html!=null}var Jf=null;function PA(){var a=window.event;return a&&a.type==="popstate"?a===Jf?!1:(Jf=a,!0):(Jf=null,!1)}var Lv=typeof setTimeout=="function"?setTimeout:void 0,MA=typeof clearTimeout=="function"?clearTimeout:void 0,kS=typeof Promise=="function"?Promise:void 0,Fv=typeof queueMicrotask=="function"?queueMicrotask:typeof kS<"u"?function(a){return kS.resolve(null).then(a).catch(qv)}:Lv;function qv(a){setTimeout(function(){throw a})}function Il(a){return a==="head"}function RS(a,c){var f=c,y=0;do{var j=f.nextSibling;if(a.removeChild(f),j&&j.nodeType===8)if(f=j.data,f==="/$"||f==="/&"){if(y===0){a.removeChild(j),pi(c);return}y--}else if(f==="$"||f==="$?"||f==="$~"||f==="$!"||f==="&")y++;else if(f==="html")Bh(a.ownerDocument.documentElement);else if(f==="head"){f=a.ownerDocument.head,Bh(f);for(var O=f.firstChild;O;){var B=O.nextSibling,te=O.nodeName;O[Vi]||te==="SCRIPT"||te==="STYLE"||te==="LINK"&&O.rel.toLowerCase()==="stylesheet"||f.removeChild(O),O=B}}else f==="body"&&Bh(a.ownerDocument.body);f=j}while(f);pi(c)}function Qf(a,c){var f=a;a=0;do{var y=f.nextSibling;if(f.nodeType===1?c?(f._stashedDisplay=f.style.display,f.style.display="none"):(f.style.display=f._stashedDisplay||"",f.getAttribute("style")===""&&f.removeAttribute("style")):f.nodeType===3&&(c?(f._stashedText=f.nodeValue,f.nodeValue=""):f.nodeValue=f._stashedText||""),y&&y.nodeType===8)if(f=y.data,f==="/$"){if(a===0)break;a--}else f!=="$"&&f!=="$?"&&f!=="$~"&&f!=="$!"||a++;f=y}while(f)}function Bv(a){var c=a.firstChild;for(c&&c.nodeType===10&&(c=c.nextSibling);c;){var f=c;switch(c=c.nextSibling,f.nodeName){case"HTML":case"HEAD":case"BODY":Bv(f),Qd(f);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(f.rel.toLowerCase()==="stylesheet")continue}a.removeChild(f)}}function Za(a,c,f,y){for(;a.nodeType===1;){var j=f;if(a.nodeName.toLowerCase()!==c.toLowerCase()){if(!y&&(a.nodeName!=="INPUT"||a.type!=="hidden"))break}else if(y){if(!a[Vi])switch(c){case"meta":if(!a.hasAttribute("itemprop"))break;return a;case"link":if(O=a.getAttribute("rel"),O==="stylesheet"&&a.hasAttribute("data-precedence"))break;if(O!==j.rel||a.getAttribute("href")!==(j.href==null||j.href===""?null:j.href)||a.getAttribute("crossorigin")!==(j.crossOrigin==null?null:j.crossOrigin)||a.getAttribute("title")!==(j.title==null?null:j.title))break;return a;case"style":if(a.hasAttribute("data-precedence"))break;return a;case"script":if(O=a.getAttribute("src"),(O!==(j.src==null?null:j.src)||a.getAttribute("type")!==(j.type==null?null:j.type)||a.getAttribute("crossorigin")!==(j.crossOrigin==null?null:j.crossOrigin))&&O&&a.hasAttribute("async")&&!a.hasAttribute("itemprop"))break;return a;default:return a}}else if(c==="input"&&a.type==="hidden"){var O=j.name==null?null:""+j.name;if(j.type==="hidden"&&a.getAttribute("name")===O)return a}else return a;if(a=hi(a.nextSibling),a===null)break}return null}function yd(a,c,f){if(c==="")return null;for(;a.nodeType!==3;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!f||(a=hi(a.nextSibling),a===null))return null;return a}function zl(a,c){for(;a.nodeType!==8;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!c||(a=hi(a.nextSibling),a===null))return null;return a}function em(a){return a.data==="$?"||a.data==="$~"}function tm(a){return a.data==="$!"||a.data==="$?"&&a.ownerDocument.readyState!=="loading"}function TS(a,c){var f=a.ownerDocument;if(a.data==="$~")a._reactRetry=c;else if(a.data!=="$?"||f.readyState!=="loading")c();else{var y=function(){c(),f.removeEventListener("DOMContentLoaded",y)};f.addEventListener("DOMContentLoaded",y),a._reactRetry=y}}function hi(a){for(;a!=null;a=a.nextSibling){var c=a.nodeType;if(c===1||c===3)break;if(c===8){if(c=a.data,c==="$"||c==="$!"||c==="$?"||c==="$~"||c==="&"||c==="F!"||c==="F")break;if(c==="/$"||c==="/&")return null}}return a}var Uv=null;function Kv(a){a=a.nextSibling;for(var c=0;a;){if(a.nodeType===8){var f=a.data;if(f==="/$"||f==="/&"){if(c===0)return hi(a.nextSibling);c--}else f!=="$"&&f!=="$!"&&f!=="$?"&&f!=="$~"&&f!=="&"||c++}a=a.nextSibling}return null}function _S(a){a=a.previousSibling;for(var c=0;a;){if(a.nodeType===8){var f=a.data;if(f==="$"||f==="$!"||f==="$?"||f==="$~"||f==="&"){if(c===0)return a;c--}else f!=="/$"&&f!=="/&"||c++}a=a.previousSibling}return null}function Vv(a,c,f){switch(c=qc(f),a){case"html":if(a=c.documentElement,!a)throw Error(o(452));return a;case"head":if(a=c.head,!a)throw Error(o(453));return a;case"body":if(a=c.body,!a)throw Error(o(454));return a;default:throw Error(o(451))}}function Bh(a){for(var c=a.attributes;c.length;)a.removeAttributeNode(c[0]);Qd(a)}var na=new Map,Hv=new Set;function nm(a){return typeof a.getRootNode=="function"?a.getRootNode():a.nodeType===9?a:a.ownerDocument}var Po=re.d;re.d={f:IA,r:zA,D:Gv,C:NS,L:LA,m:DS,X:qA,S:FA,M:BA};function IA(){var a=Po.f(),c=zf();return a||c}function zA(a){var c=hc(a);c!==null&&c.tag===5&&c.type==="form"?Hy(c):Po.r(a)}var Bc=typeof document>"u"?null:document;function $S(a,c,f){var y=Bc;if(y&&typeof c=="string"&&c){var j=Js(c);j='link[rel="'+a+'"][href="'+j+'"]',typeof f=="string"&&(j+='[crossorigin="'+f+'"]'),Hv.has(j)||(Hv.add(j),a={rel:a,crossOrigin:f,href:c},y.querySelector(j)===null&&(c=y.createElement("link"),xs(c,"link",a),Zr(c),y.head.appendChild(c)))}}function Gv(a){Po.D(a),$S("dns-prefetch",a,null)}function NS(a,c){Po.C(a,c),$S("preconnect",a,c)}function LA(a,c,f){Po.L(a,c,f);var y=Bc;if(y&&a&&c){var j='link[rel="preload"][as="'+Js(c)+'"]';c==="image"&&f&&f.imageSrcSet?(j+='[imagesrcset="'+Js(f.imageSrcSet)+'"]',typeof f.imageSizes=="string"&&(j+='[imagesizes="'+Js(f.imageSizes)+'"]')):j+='[href="'+Js(a)+'"]';var O=j;switch(c){case"style":O=vd(a);break;case"script":O=Ll(a)}na.has(O)||(a=A({rel:"preload",href:c==="image"&&f&&f.imageSrcSet?void 0:a,as:c},f),na.set(O,a),y.querySelector(j)!==null||c==="style"&&y.querySelector(Uh(O))||c==="script"&&y.querySelector(Kh(O))||(c=y.createElement("link"),xs(c,"link",a),Zr(c),y.head.appendChild(c)))}}function DS(a,c){Po.m(a,c);var f=Bc;if(f&&a){var y=c&&typeof c.as=="string"?c.as:"script",j='link[rel="modulepreload"][as="'+Js(y)+'"][href="'+Js(a)+'"]',O=j;switch(y){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":O=Ll(a)}if(!na.has(O)&&(a=A({rel:"modulepreload",href:a},c),na.set(O,a),f.querySelector(j)===null)){switch(y){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(f.querySelector(Kh(O)))return}y=f.createElement("link"),xs(y,"link",a),Zr(y),f.head.appendChild(y)}}}function FA(a,c,f){Po.S(a,c,f);var y=Bc;if(y&&a){var j=ul(y).hoistableStyles,O=vd(a);c=c||"default";var B=j.get(O);if(!B){var te={loading:0,preload:null};if(B=y.querySelector(Uh(O)))te.loading=5;else{a=A({rel:"stylesheet",href:a,"data-precedence":c},f),(f=na.get(O))&&Xv(a,f);var ye=B=y.createElement("link");Zr(ye),xs(ye,"link",a),ye._p=new Promise(function(Be,We){ye.onload=Be,ye.onerror=We}),ye.addEventListener("load",function(){te.loading|=1}),ye.addEventListener("error",function(){te.loading|=2}),te.loading|=4,rm(B,c,y)}B={type:"stylesheet",instance:B,count:1,state:te},j.set(O,B)}}}function qA(a,c){Po.X(a,c);var f=Bc;if(f&&a){var y=ul(f).hoistableScripts,j=Ll(a),O=y.get(j);O||(O=f.querySelector(Kh(j)),O||(a=A({src:a,async:!0},c),(c=na.get(j))&&Yv(a,c),O=f.createElement("script"),Zr(O),xs(O,"link",a),f.head.appendChild(O)),O={type:"script",instance:O,count:1,state:null},y.set(j,O))}}function BA(a,c){Po.M(a,c);var f=Bc;if(f&&a){var y=ul(f).hoistableScripts,j=Ll(a),O=y.get(j);O||(O=f.querySelector(Kh(j)),O||(a=A({src:a,async:!0,type:"module"},c),(c=na.get(j))&&Yv(a,c),O=f.createElement("script"),Zr(O),xs(O,"link",a),f.head.appendChild(O)),O={type:"script",instance:O,count:1,state:null},y.set(j,O))}}function PS(a,c,f,y){var j=(j=Ne.current)?nm(j):null;if(!j)throw Error(o(446));switch(a){case"meta":case"title":return null;case"style":return typeof f.precedence=="string"&&typeof f.href=="string"?(c=vd(f.href),f=ul(j).hoistableStyles,y=f.get(c),y||(y={type:"style",instance:null,count:0,state:null},f.set(c,y)),y):{type:"void",instance:null,count:0,state:null};case"link":if(f.rel==="stylesheet"&&typeof f.href=="string"&&typeof f.precedence=="string"){a=vd(f.href);var O=ul(j).hoistableStyles,B=O.get(a);if(B||(j=j.ownerDocument||j,B={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},O.set(a,B),(O=j.querySelector(Uh(a)))&&!O._p&&(B.instance=O,B.state.loading=5),na.has(a)||(f={rel:"preload",as:"style",href:f.href,crossOrigin:f.crossOrigin,integrity:f.integrity,media:f.media,hrefLang:f.hrefLang,referrerPolicy:f.referrerPolicy},na.set(a,f),O||IS(j,a,f,B.state))),c&&y===null)throw Error(o(528,""));return B}if(c&&y!==null)throw Error(o(529,""));return null;case"script":return c=f.async,f=f.src,typeof f=="string"&&c&&typeof c!="function"&&typeof c!="symbol"?(c=Ll(f),f=ul(j).hoistableScripts,y=f.get(c),y||(y={type:"script",instance:null,count:0,state:null},f.set(c,y)),y):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,a))}}function vd(a){return'href="'+Js(a)+'"'}function Uh(a){return'link[rel="stylesheet"]['+a+"]"}function MS(a){return A({},a,{"data-precedence":a.precedence,precedence:null})}function IS(a,c,f,y){a.querySelector('link[rel="preload"][as="style"]['+c+"]")?y.loading=1:(c=a.createElement("link"),y.preload=c,c.addEventListener("load",function(){return y.loading|=1}),c.addEventListener("error",function(){return y.loading|=2}),xs(c,"link",f),Zr(c),a.head.appendChild(c))}function Ll(a){return'[src="'+Js(a)+'"]'}function Kh(a){return"script[async]"+a}function zS(a,c,f){if(c.count++,c.instance===null)switch(c.type){case"style":var y=a.querySelector('style[data-href~="'+Js(f.href)+'"]');if(y)return c.instance=y,Zr(y),y;var j=A({},f,{"data-href":f.href,"data-precedence":f.precedence,href:null,precedence:null});return y=(a.ownerDocument||a).createElement("style"),Zr(y),xs(y,"style",j),rm(y,f.precedence,a),c.instance=y;case"stylesheet":j=vd(f.href);var O=a.querySelector(Uh(j));if(O)return c.state.loading|=4,c.instance=O,Zr(O),O;y=MS(f),(j=na.get(j))&&Xv(y,j),O=(a.ownerDocument||a).createElement("link"),Zr(O);var B=O;return B._p=new Promise(function(te,ye){B.onload=te,B.onerror=ye}),xs(O,"link",y),c.state.loading|=4,rm(O,f.precedence,a),c.instance=O;case"script":return O=Ll(f.src),(j=a.querySelector(Kh(O)))?(c.instance=j,Zr(j),j):(y=f,(j=na.get(O))&&(y=A({},f),Yv(y,j)),a=a.ownerDocument||a,j=a.createElement("script"),Zr(j),xs(j,"link",y),a.head.appendChild(j),c.instance=j);case"void":return null;default:throw Error(o(443,c.type))}else c.type==="stylesheet"&&(c.state.loading&4)===0&&(y=c.instance,c.state.loading|=4,rm(y,f.precedence,a));return c.instance}function rm(a,c,f){for(var y=f.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),j=y.length?y[y.length-1]:null,O=j,B=0;B<y.length;B++){var te=y[B];if(te.dataset.precedence===c)O=te;else if(O!==j)break}O?O.parentNode.insertBefore(a,O.nextSibling):(c=f.nodeType===9?f.head:f,c.insertBefore(a,c.firstChild))}function Xv(a,c){a.crossOrigin==null&&(a.crossOrigin=c.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=c.referrerPolicy),a.title==null&&(a.title=c.title)}function Yv(a,c){a.crossOrigin==null&&(a.crossOrigin=c.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=c.referrerPolicy),a.integrity==null&&(a.integrity=c.integrity)}var sm=null;function LS(a,c,f){if(sm===null){var y=new Map,j=sm=new Map;j.set(f,y)}else j=sm,y=j.get(f),y||(y=new Map,j.set(f,y));if(y.has(a))return y;for(y.set(a,null),f=f.getElementsByTagName(a),j=0;j<f.length;j++){var O=f[j];if(!(O[Vi]||O[is]||a==="link"&&O.getAttribute("rel")==="stylesheet")&&O.namespaceURI!=="http://www.w3.org/2000/svg"){var B=O.getAttribute(c)||"";B=a+B;var te=y.get(B);te?te.push(O):y.set(B,[O])}}return y}function FS(a,c,f){a=a.ownerDocument||a,a.head.insertBefore(f,c==="title"?a.querySelector("head > title"):null)}function UA(a,c,f){if(f===1||c.itemProp!=null)return!1;switch(a){case"meta":case"title":return!0;case"style":if(typeof c.precedence!="string"||typeof c.href!="string"||c.href==="")break;return!0;case"link":if(typeof c.rel!="string"||typeof c.href!="string"||c.href===""||c.onLoad||c.onError)break;switch(c.rel){case"stylesheet":return a=c.disabled,typeof c.precedence=="string"&&a==null;default:return!0}case"script":if(c.async&&typeof c.async!="function"&&typeof c.async!="symbol"&&!c.onLoad&&!c.onError&&c.src&&typeof c.src=="string")return!0}return!1}function qS(a){return!(a.type==="stylesheet"&&(a.state.loading&3)===0)}function BS(a,c,f,y){if(f.type==="stylesheet"&&(typeof y.media!="string"||matchMedia(y.media).matches!==!1)&&(f.state.loading&4)===0){if(f.instance===null){var j=vd(y.href),O=c.querySelector(Uh(j));if(O){c=O._p,c!==null&&typeof c=="object"&&typeof c.then=="function"&&(a.count++,a=Uc.bind(a),c.then(a,a)),f.state.loading|=4,f.instance=O,Zr(O);return}O=c.ownerDocument||c,y=MS(y),(j=na.get(j))&&Xv(y,j),O=O.createElement("link"),Zr(O);var B=O;B._p=new Promise(function(te,ye){B.onload=te,B.onerror=ye}),xs(O,"link",y),f.instance=O}a.stylesheets===null&&(a.stylesheets=new Map),a.stylesheets.set(f,c),(c=f.state.preload)&&(f.state.loading&3)===0&&(a.count++,f=Uc.bind(a),c.addEventListener("load",f),c.addEventListener("error",f))}}var im=0;function KA(a,c){return a.stylesheets&&a.count===0&&am(a,a.stylesheets),0<a.count||0<a.imgCount?function(f){var y=setTimeout(function(){if(a.stylesheets&&am(a,a.stylesheets),a.unsuspend){var O=a.unsuspend;a.unsuspend=null,O()}},6e4+c);0<a.imgBytes&&im===0&&(im=62500*DA());var j=setTimeout(function(){if(a.waitingForImages=!1,a.count===0&&(a.stylesheets&&am(a,a.stylesheets),a.unsuspend)){var O=a.unsuspend;a.unsuspend=null,O()}},(a.imgBytes>im?50:800)+c);return a.unsuspend=f,function(){a.unsuspend=null,clearTimeout(y),clearTimeout(j)}}:null}function Uc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)am(this,this.stylesheets);else if(this.unsuspend){var a=this.unsuspend;this.unsuspend=null,a()}}}var xd=null;function am(a,c){a.stylesheets=null,a.unsuspend!==null&&(a.count++,xd=new Map,c.forEach(US,a),xd=null,Uc.call(a))}function US(a,c){if(!(c.state.loading&4)){var f=xd.get(a);if(f)var y=f.get(null);else{f=new Map,xd.set(a,f);for(var j=a.querySelectorAll("link[data-precedence],style[data-precedence]"),O=0;O<j.length;O++){var B=j[O];(B.nodeName==="LINK"||B.getAttribute("media")!=="not all")&&(f.set(B.dataset.precedence,B),y=B)}y&&f.set(null,y)}j=c.instance,B=j.getAttribute("data-precedence"),O=f.get(B)||y,O===y&&f.set(null,j),f.set(B,j),this.count++,y=Uc.bind(this),j.addEventListener("load",y),j.addEventListener("error",y),O?O.parentNode.insertBefore(j,O.nextSibling):(a=a.nodeType===9?a.head:a,a.insertBefore(j,a.firstChild)),c.state.loading|=4}}var bd={$$typeof:X,Provider:null,Consumer:null,_currentValue:ue,_currentValue2:ue,_threadCount:0};function VA(a,c,f,y,j,O,B,te,ye){this.tag=1,this.containerInfo=a,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=Dn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Dn(0),this.hiddenUpdates=Dn(null),this.identifierPrefix=y,this.onUncaughtError=j,this.onCaughtError=O,this.onRecoverableError=B,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=ye,this.incompleteTransitions=new Map}function Zv(a,c,f,y,j,O,B,te,ye,Be,We,rt){return a=new VA(a,c,f,B,ye,Be,We,rt,te),c=1,O===!0&&(c|=24),O=ti(3,null,null,c),a.current=O,O.stateNode=a,c=rf(),c.refCount++,a.pooledCache=c,c.refCount++,O.memoizedState={element:y,isDehydrated:f,cache:c},df(O),a}function Wv(a){return a?(a=Fu,a):Fu}function KS(a,c,f,y,j,O){j=Wv(j),y.context===null?y.context=j:y.pendingContext=j,y=jo(c),y.payload={element:f},O=O===void 0?null:O,O!==null&&(y.callback=O),f=jl(a,y,c),f!==null&&(_s(f,a,c),Ji(f,a,c))}function Vh(a,c){if(a=a.memoizedState,a!==null&&a.dehydrated!==null){var f=a.retryLane;a.retryLane=f!==0&&f<c?f:c}}function Jv(a,c){Vh(a,c),(a=a.alternate)&&Vh(a,c)}function VS(a){if(a.tag===13||a.tag===31){var c=bc(a,67108864);c!==null&&_s(c,a,67108864),Jv(a,67108864)}}function om(a){if(a.tag===13||a.tag===31){var c=ki();c=bu(c);var f=bc(a,c);f!==null&&_s(f,a,c),Jv(a,c)}}var lm=!0;function HA(a,c,f,y){var j=ce.T;ce.T=null;var O=re.p;try{re.p=2,Qv(a,c,f,y)}finally{re.p=O,ce.T=j}}function GA(a,c,f,y){var j=ce.T;ce.T=null;var O=re.p;try{re.p=8,Qv(a,c,f,y)}finally{re.p=O,ce.T=j}}function Qv(a,c,f,y){if(lm){var j=cm(y);if(j===null)Dv(a,c,y,um,f),GS(a,y);else if(nx(j,a,c,f,y))y.stopPropagation();else if(GS(a,y),c&4&&-1<XA.indexOf(a)){for(;j!==null;){var O=hc(j);if(O!==null)switch(O.tag){case 3:if(O=O.stateNode,O.current.memoizedState.isDehydrated){var B=ma(O.pendingLanes);if(B!==0){var te=O;for(te.pendingLanes|=2,te.entangledLanes|=2;B;){var ye=1<<31-Xr(B);te.entanglements[1]|=ye,B&=~ye}Xa(O),(Hn&6)===0&&(Df=L()+500,pd(0))}}break;case 31:case 13:te=bc(O,2),te!==null&&_s(te,O,2),zf(),Jv(O,2)}if(O=cm(y),O===null&&Dv(a,c,y,um,f),O===j)break;j=O}j!==null&&y.stopPropagation()}else Dv(a,c,y,null,f)}}function cm(a){return a=Bg(a),ex(a)}var um=null;function ex(a){if(um=null,a=dc(a),a!==null){var c=p(a);if(c===null)a=null;else{var f=c.tag;if(f===13){if(a=m(c),a!==null)return a;a=null}else if(f===31){if(a=g(c),a!==null)return a;a=null}else if(f===3){if(c.stateNode.current.memoizedState.isDehydrated)return c.tag===3?c.stateNode.containerInfo:null;a=null}else c!==a&&(a=null)}}return um=a,null}function HS(a){switch(a){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(H()){case W:return 2;case we:return 8;case Re:case st:return 32;case Kt:return 268435456;default:return 32}default:return 32}}var tx=!1,Mo=null,Fl=null,Io=null,Hh=new Map,Gh=new Map,ql=[],XA="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 GS(a,c){switch(a){case"focusin":case"focusout":Mo=null;break;case"dragenter":case"dragleave":Fl=null;break;case"mouseover":case"mouseout":Io=null;break;case"pointerover":case"pointerout":Hh.delete(c.pointerId);break;case"gotpointercapture":case"lostpointercapture":Gh.delete(c.pointerId)}}function wd(a,c,f,y,j,O){return a===null||a.nativeEvent!==O?(a={blockedOn:c,domEventName:f,eventSystemFlags:y,nativeEvent:O,targetContainers:[j]},c!==null&&(c=hc(c),c!==null&&VS(c)),a):(a.eventSystemFlags|=y,c=a.targetContainers,j!==null&&c.indexOf(j)===-1&&c.push(j),a)}function nx(a,c,f,y,j){switch(c){case"focusin":return Mo=wd(Mo,a,c,f,y,j),!0;case"dragenter":return Fl=wd(Fl,a,c,f,y,j),!0;case"mouseover":return Io=wd(Io,a,c,f,y,j),!0;case"pointerover":var O=j.pointerId;return Hh.set(O,wd(Hh.get(O)||null,a,c,f,y,j)),!0;case"gotpointercapture":return O=j.pointerId,Gh.set(O,wd(Gh.get(O)||null,a,c,f,y,j)),!0}return!1}function XS(a){var c=dc(a.target);if(c!==null){var f=p(c);if(f!==null){if(c=f.tag,c===13){if(c=m(f),c!==null){a.blockedOn=c,Ig(a.priority,function(){om(f)});return}}else if(c===31){if(c=g(f),c!==null){a.blockedOn=c,Ig(a.priority,function(){om(f)});return}}else if(c===3&&f.stateNode.current.memoizedState.isDehydrated){a.blockedOn=f.tag===3?f.stateNode.containerInfo:null;return}}}a.blockedOn=null}function dm(a){if(a.blockedOn!==null)return!1;for(var c=a.targetContainers;0<c.length;){var f=cm(a.nativeEvent);if(f===null){f=a.nativeEvent;var y=new f.constructor(f.type,f);as=y,f.target.dispatchEvent(y),as=null}else return c=hc(f),c!==null&&VS(c),a.blockedOn=f,!1;c.shift()}return!0}function br(a,c,f){dm(a)&&f.delete(c)}function Oa(){tx=!1,Mo!==null&&dm(Mo)&&(Mo=null),Fl!==null&&dm(Fl)&&(Fl=null),Io!==null&&dm(Io)&&(Io=null),Hh.forEach(br),Gh.forEach(br)}function Ur(a,c){a.blockedOn===c&&(a.blockedOn=null,tx||(tx=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,Oa)))}var Sd=null;function hm(a){Sd!==a&&(Sd=a,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Sd===a&&(Sd=null);for(var c=0;c<a.length;c+=3){var f=a[c],y=a[c+1],j=a[c+2];if(typeof y!="function"){if(ex(y||f)===null)continue;break}var O=hc(f);O!==null&&(a.splice(c,3),c-=3,Ky(O,{pending:!0,data:j,method:f.method,action:y},y,j))}}))}function pi(a){function c(ye){return Ur(ye,a)}Mo!==null&&Ur(Mo,a),Fl!==null&&Ur(Fl,a),Io!==null&&Ur(Io,a),Hh.forEach(c),Gh.forEach(c);for(var f=0;f<ql.length;f++){var y=ql[f];y.blockedOn===a&&(y.blockedOn=null)}for(;0<ql.length&&(f=ql[0],f.blockedOn===null);)XS(f),f.blockedOn===null&&ql.shift();if(f=(a.ownerDocument||a).$$reactFormReplay,f!=null)for(y=0;y<f.length;y+=3){var j=f[y],O=f[y+1],B=j[Ps]||null;if(typeof O=="function")B||hm(f);else if(B){var te=null;if(O&&O.hasAttribute("formAction")){if(j=O,B=O[Ps]||null)te=B.formAction;else if(ex(j)!==null)continue}else te=B.action;typeof te=="function"?f[y+1]=te:(f.splice(y,3),y-=3),hm(f)}}}function pr(){function a(O){O.canIntercept&&O.info==="react-transition"&&O.intercept({handler:function(){return new Promise(function(B){return j=B})},focusReset:"manual",scroll:"manual"})}function c(){j!==null&&(j(),j=null),y||setTimeout(f,20)}function f(){if(!y&&!navigation.transition){var O=navigation.currentEntry;O&&O.url!=null&&navigation.navigate(O.url,{state:O.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var y=!1,j=null;return navigation.addEventListener("navigate",a),navigation.addEventListener("navigatesuccess",c),navigation.addEventListener("navigateerror",c),setTimeout(f,100),function(){y=!0,navigation.removeEventListener("navigate",a),navigation.removeEventListener("navigatesuccess",c),navigation.removeEventListener("navigateerror",c),j!==null&&(j(),j=null)}}}function Bn(a){this._internalRoot=a}Zt.prototype.render=Bn.prototype.render=function(a){var c=this._internalRoot;if(c===null)throw Error(o(409));var f=c.current,y=ki();KS(f,y,a,c,null,null)},Zt.prototype.unmount=Bn.prototype.unmount=function(){var a=this._internalRoot;if(a!==null){this._internalRoot=null;var c=a.containerInfo;KS(a.current,2,null,a,null,null),zf(),c[cl]=null}};function Zt(a){this._internalRoot=a}Zt.prototype.unstable_scheduleHydration=function(a){if(a){var c=wu();a={blockedOn:null,target:a,priority:c};for(var f=0;f<ql.length&&c!==0&&c<ql[f].priority;f++);ql.splice(f,0,a),f===0&&XS(a)}};var Xh=r.version;if(Xh!=="19.2.0")throw Error(o(527,Xh,"19.2.0"));re.findDOMNode=function(a){var c=a._reactInternals;if(c===void 0)throw typeof a.render=="function"?Error(o(188)):(a=Object.keys(a).join(","),Error(o(268,a)));return a=S(c),a=a!==null?E(a):null,a=a===null?null:a.stateNode,a};var rx={bundleType:0,version:"19.2.0",rendererPackageName:"react-dom",currentDispatcherRef:ce,reconcilerVersion:"19.2.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Jn=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Jn.isDisabled&&Jn.supportsFiber)try{dn=Jn.inject(rx),Ht=Jn}catch{}}return nb.createRoot=function(a,c){if(!d(a))throw Error(o(299));var f=!1,y="",j=N0,O=D0,B=P0;return c!=null&&(c.unstable_strictMode===!0&&(f=!0),c.identifierPrefix!==void 0&&(y=c.identifierPrefix),c.onUncaughtError!==void 0&&(j=c.onUncaughtError),c.onCaughtError!==void 0&&(O=c.onCaughtError),c.onRecoverableError!==void 0&&(B=c.onRecoverableError)),c=Zv(a,1,!1,null,null,f,y,null,j,O,B,pr),a[cl]=c.current,Xf(a),new Bn(c)},nb.hydrateRoot=function(a,c,f){if(!d(a))throw Error(o(299));var y=!1,j="",O=N0,B=D0,te=P0,ye=null;return f!=null&&(f.unstable_strictMode===!0&&(y=!0),f.identifierPrefix!==void 0&&(j=f.identifierPrefix),f.onUncaughtError!==void 0&&(O=f.onUncaughtError),f.onCaughtError!==void 0&&(B=f.onCaughtError),f.onRecoverableError!==void 0&&(te=f.onRecoverableError),f.formState!==void 0&&(ye=f.formState)),c=Zv(a,1,!0,c,f??null,y,j,ye,O,B,te,pr),c.context=Wv(null),f=c.current,y=ki(),y=bu(y),j=jo(y),j.callback=null,jl(f,j,y),f=y,c.current.lanes=f,Er(c,f),Xa(c),a[cl]=c.current,Xf(a),new Zt(c)},nb.version="19.2.0",nb}var DM;function hJ(){if(DM)return TR.exports;DM=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(r){console.error(r)}}return e(),TR.exports=dJ(),TR.exports}var pJ=hJ();const _j="autoglue.tokens",TT="autoglue.auth-change";let Jl=_T();function _T(){try{const e=localStorage.getItem(_j);return e?JSON.parse(e):null}catch{return null}}function fJ(e){e?localStorage.setItem(_j,JSON.stringify(e)):localStorage.removeItem(_j)}function mJ(e){window.dispatchEvent(new CustomEvent(TT,{detail:e}))}const Ks={get(){return Jl},set(e){Jl=e,fJ(e),mJ(e)},reload(){return Jl=_T(),Jl},isAuthed(){return!!Jl?.access_token},getAccessToken(){return Jl?.access_token??null},isExpired(e=Math.floor(Date.now()/1e3)){const r=PM(Jl?.access_token);return r!==null?e>=r:!0},willExpireSoon(e=60,r=Math.floor(Date.now()/1e3)){const s=PM(Jl?.access_token);return s!==null?s-r<=e:!0},logout(){Ks.set(null)},subscribe(e){const r=o=>e(o.detail??null),s=o=>{o.key===_j&&(Jl=_T(),e(Jl))};return window.addEventListener(TT,r),window.addEventListener("storage",s),()=>{window.removeEventListener(TT,r),window.removeEventListener("storage",s)}}};function PM(e){if(!e)return null;const r=e.split(".");if(r.length<2)return null;try{const s=JSON.parse(atob(gJ(r[1])));return(typeof s?.exp=="number"?s.exp:null)??null}catch{return null}}function gJ(e){return e.replace(/-/g,"+").replace(/_/g,"/")+"==".slice((2-e.length*3%4)%4)}const $T="autoglue.org";let UE=localStorage.getItem($T);const Qo={get(){return UE},set(e){UE=e,localStorage.setItem($T,e),window.dispatchEvent(new CustomEvent("autoglue:org-change",{detail:e}))},subscribe(e){const r=o=>e(o.detail??null),s=o=>{o.key===$T&&(UE=o.newValue,e(UE))};return window.addEventListener("autoglue:org-change",r),window.addEventListener("storage",s),()=>{window.removeEventListener("autoglue:org-change",r),window.removeEventListener("storage",s)}}},yJ="https://autoglue.onglueops.rocks/api/v1".replace(/\/+$/,"");class cz{constructor(r={}){this.configuration=r}set config(r){this.configuration=r}get basePath(){return this.configuration.basePath!=null?this.configuration.basePath:yJ}get fetchApi(){return this.configuration.fetchApi}get middleware(){return this.configuration.middleware||[]}get queryParamsStringify(){return this.configuration.queryParamsStringify||uz}get username(){return this.configuration.username}get password(){return this.configuration.password}get apiKey(){const r=this.configuration.apiKey;if(r)return typeof r=="function"?r:()=>r}get accessToken(){const r=this.configuration.accessToken;if(r)return typeof r=="function"?r:async()=>r}get headers(){return this.configuration.headers}get credentials(){return this.configuration.credentials}}const vJ=new cz;class Gs{constructor(r=vJ){this.configuration=r,this.middleware=r.middleware}static jsonRegex=new RegExp("^(:?application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(:?;.*)?$","i");middleware;withMiddleware(...r){const s=this.clone();return s.middleware=s.middleware.concat(...r),s}withPreMiddleware(...r){const s=r.map(o=>({pre:o}));return this.withMiddleware(...s)}withPostMiddleware(...r){const s=r.map(o=>({post:o}));return this.withMiddleware(...s)}isJsonMime(r){return r?Gs.jsonRegex.test(r):!1}async request(r,s){const{url:o,init:d}=await this.createFetchParams(r,s),p=await this.fetchApi(o,d);if(p&&p.status>=200&&p.status<300)return p;throw new wJ(p,"Response returned an error code")}async createFetchParams(r,s){let o=this.configuration.basePath+r.path;r.query!==void 0&&Object.keys(r.query).length!==0&&(o+="?"+this.configuration.queryParamsStringify(r.query));const d=Object.assign({},this.configuration.headers,r.headers);Object.keys(d).forEach(E=>d[E]===void 0?delete d[E]:{});const p=typeof s=="function"?s:async()=>s,m={method:r.method,headers:d,body:r.body,credentials:this.configuration.credentials},g={...m,...await p({init:m,context:r})};let b;bJ(g.body)||g.body instanceof URLSearchParams||xJ(g.body)?b=g.body:this.isJsonMime(d["Content-Type"])?b=JSON.stringify(g.body):b=g.body;const S={...g,body:b};return{url:o,init:S}}fetchApi=async(r,s)=>{let o={url:r,init:s};for(const p of this.middleware)p.pre&&(o=await p.pre({fetch:this.fetchApi,...o})||o);let d;try{d=await(this.configuration.fetchApi||fetch)(o.url,o.init)}catch(p){for(const m of this.middleware)m.onError&&(d=await m.onError({fetch:this.fetchApi,url:o.url,init:o.init,error:p,response:d?d.clone():void 0})||d);if(d===void 0)throw p instanceof Error?new SJ(p,"The request failed and the interceptors did not return an alternative response"):p}for(const p of this.middleware)p.post&&(d=await p.post({fetch:this.fetchApi,url:o.url,init:o.init,response:d.clone()})||d);return d};clone(){const r=this.constructor,s=new r(this.configuration);return s.middleware=this.middleware.slice(),s}}function xJ(e){return typeof Blob<"u"&&e instanceof Blob}function bJ(e){return typeof FormData<"u"&&e instanceof FormData}class wJ extends Error{constructor(r,s){super(s),this.response=r}name="ResponseError"}class SJ extends Error{constructor(r,s){super(s),this.cause=r}name="FetchError"}class et extends Error{constructor(r,s){super(s),this.field=r}name="RequiredError"}function uz(e,r=""){return Object.keys(e).map(s=>dz(s,e[s],r)).filter(s=>s.length>0).join("&")}function dz(e,r,s=""){const o=s+(s.length?`[${e}]`:e);if(r instanceof Array){const d=r.map(p=>encodeURIComponent(String(p))).join(`&${encodeURIComponent(o)}=`);return`${encodeURIComponent(o)}=${d}`}if(r instanceof Set){const d=Array.from(r);return dz(e,d,s)}return r instanceof Date?`${encodeURIComponent(o)}=${encodeURIComponent(r.toISOString())}`:r instanceof Object?uz(r,o):`${encodeURIComponent(o)}=${encodeURIComponent(String(r))}`}class pt{constructor(r,s=o=>o){this.raw=r,this.transformer=s}async value(){return this.transformer(await this.raw.json())}}class Ii{constructor(r){this.raw=r}async value(){}}class ec{constructor(r){this.raw=r}async value(){return await this.raw.text()}}function tg(e){return EJ(e)}function EJ(e,r){return e==null?e:{created_at:e.created_at==null?void 0:e.created_at,id:e.id==null?void 0:e.id,key:e.key==null?void 0:e.key,organization_id:e.organization_id==null?void 0:e.organization_id,updated_at:e.updated_at==null?void 0:e.updated_at,value:e.value==null?void 0:e.value}}function jJ(e){return CJ(e,!1)}function CJ(e,r=!1){return e==null?e:{annotation_ids:e.annotation_ids}}function AJ(e){return OJ(e,!1)}function OJ(e,r=!1){return e==null?e:{server_id:e.server_id}}function kJ(e){return RJ(e,!1)}function RJ(e,r=!1){return e==null?e:{domain_id:e.domain_id}}function TJ(e){return _J(e,!1)}function _J(e,r=!1){return e==null?e:{label_ids:e.label_ids}}function MM(e){return $J(e,!1)}function $J(e,r=!1){return e==null?e:{load_balancer_id:e.load_balancer_id}}function NJ(e){return DJ(e,!1)}function DJ(e,r=!1){return e==null?e:{node_pool_id:e.node_pool_id}}function PJ(e){return MJ(e,!1)}function MJ(e,r=!1){return e==null?e:{record_set_id:e.record_set_id}}function IJ(e){return zJ(e,!1)}function zJ(e,r=!1){return e==null?e:{server_ids:e.server_ids}}function LJ(e){return FJ(e,!1)}function FJ(e,r=!1){return e==null?e:{taint_ids:e.taint_ids}}function qJ(e){return BJ(e)}function BJ(e,r){return e==null?e:{auth_url:e.auth_url==null?void 0:e.auth_url}}function yb(e){return UJ(e)}function UJ(e,r){return e==null?e:{created_at:e.created_at==null?void 0:e.created_at,credential_id:e.credential_id==null?void 0:e.credential_id,domain_name:e.domain_name==null?void 0:e.domain_name,id:e.id==null?void 0:e.id,last_error:e.last_error==null?void 0:e.last_error,organization_id:e.organization_id==null?void 0:e.organization_id,status:e.status==null?void 0:e.status,updated_at:e.updated_at==null?void 0:e.updated_at,zone_id:e.zone_id==null?void 0:e.zone_id}}function ng(e){return KJ(e)}function KJ(e,r){return e==null?e:{created_at:e.created_at==null?void 0:e.created_at,id:e.id==null?void 0:e.id,kind:e.kind==null?void 0:e.kind,name:e.name==null?void 0:e.name,organization_id:e.organization_id==null?void 0:e.organization_id,private_ip_address:e.private_ip_address==null?void 0:e.private_ip_address,public_ip_address:e.public_ip_address==null?void 0:e.public_ip_address,updated_at:e.updated_at==null?void 0:e.updated_at}}function rg(e){return VJ(e)}function VJ(e,r){return e==null?e:{created_at:e.created_at==null?void 0:e.created_at,effect:e.effect==null?void 0:e.effect,id:e.id==null?void 0:e.id,key:e.key==null?void 0:e.key,organization_id:e.organization_id==null?void 0:e.organization_id,updated_at:e.updated_at==null?void 0:e.updated_at,value:e.value==null?void 0:e.value}}function sg(e){return HJ(e)}function HJ(e,r){return e==null?e:{created_at:e.created_at==null?void 0:e.created_at,id:e.id==null?void 0:e.id,key:e.key==null?void 0:e.key,organization_id:e.organization_id==null?void 0:e.organization_id,updated_at:e.updated_at==null?void 0:e.updated_at,value:e.value==null?void 0:e.value}}function Id(e){return GJ(e)}function GJ(e,r){return e==null?e:{created_at:e.created_at==null?void 0:e.created_at,hostname:e.hostname==null?void 0:e.hostname,id:e.id==null?void 0:e.id,organization_id:e.organization_id==null?void 0:e.organization_id,private_ip_address:e.private_ip_address==null?void 0:e.private_ip_address,public_ip_address:e.public_ip_address==null?void 0:e.public_ip_address,role:e.role==null?void 0:e.role,ssh_key_id:e.ssh_key_id==null?void 0:e.ssh_key_id,ssh_user:e.ssh_user==null?void 0:e.ssh_user,status:e.status==null?void 0:e.status,updated_at:e.updated_at==null?void 0:e.updated_at}}function vb(e){return XJ(e)}function XJ(e,r){return e==null?e:{annotations:e.annotations==null?void 0:e.annotations.map(tg),created_at:e.created_at==null?void 0:e.created_at,id:e.id==null?void 0:e.id,labels:e.labels==null?void 0:e.labels.map(sg),name:e.name==null?void 0:e.name,organization_id:e.organization_id==null?void 0:e.organization_id,role:e.role==null?void 0:e.role,servers:e.servers==null?void 0:e.servers.map(Id),taints:e.taints==null?void 0:e.taints.map(rg),updated_at:e.updated_at==null?void 0:e.updated_at}}function mj(e){return YJ(e)}function YJ(e,r){return e==null?e:{created_at:e.created_at==null?void 0:e.created_at,domain_id:e.domain_id==null?void 0:e.domain_id,fingerprint:e.fingerprint==null?void 0:e.fingerprint,id:e.id==null?void 0:e.id,last_error:e.last_error==null?void 0:e.last_error,name:e.name==null?void 0:e.name,owner:e.owner==null?void 0:e.owner,status:e.status==null?void 0:e.status,ttl:e.ttl==null?void 0:e.ttl,type:e.type==null?void 0:e.type,updated_at:e.updated_at==null?void 0:e.updated_at,values:e.values==null?void 0:e.values}}function Ns(e){return ZJ(e)}function ZJ(e,r){return e==null?e:{apps_load_balancer:e.apps_load_balancer==null?void 0:ng(e.apps_load_balancer),bastion_server:e.bastion_server==null?void 0:Id(e.bastion_server),captain_domain:e.captain_domain==null?void 0:yb(e.captain_domain),certificate_key:e.certificate_key==null?void 0:e.certificate_key,control_plane_record_set:e.control_plane_record_set==null?void 0:mj(e.control_plane_record_set),created_at:e.created_at==null?void 0:e.created_at,glueops_load_balancer:e.glueops_load_balancer==null?void 0:ng(e.glueops_load_balancer),id:e.id==null?void 0:e.id,last_error:e.last_error==null?void 0:e.last_error,name:e.name==null?void 0:e.name,node_pools:e.node_pools==null?void 0:e.node_pools.map(vb),provider:e.provider==null?void 0:e.provider,random_token:e.random_token==null?void 0:e.random_token,region:e.region==null?void 0:e.region,status:e.status==null?void 0:e.status,updated_at:e.updated_at==null?void 0:e.updated_at}}function WJ(e){return JJ(e,!1)}function JJ(e,r=!1){return e==null?e:{key:e.key,value:e.value}}function QJ(e){return eQ(e,!1)}function eQ(e,r=!1){return e==null?e:{name:e.name,provider:e.provider,region:e.region}}function tQ(e){return nQ(e,!1)}function nQ(e,r=!1){return e==null?e:{account_id:e.account_id,kind:e.kind,name:e.name,provider:e.provider,region:e.region,schema_version:e.schema_version,scope:e.scope,scope_kind:e.scope_kind,scope_version:e.scope_version,secret:e.secret}}function rQ(e){return sQ(e,!1)}function sQ(e,r=!1){return e==null?e:{credential_id:e.credential_id,domain_name:e.domain_name,zone_id:e.zone_id}}function iQ(e){return aQ(e,!1)}function aQ(e,r=!1){return e==null?e:{key:e.key,value:e.value}}function oQ(e){return lQ(e,!1)}function lQ(e,r=!1){return e==null?e:{kind:e.kind,name:e.name,private_ip_address:e.private_ip_address,public_ip_address:e.public_ip_address}}function cQ(e){return uQ(e,!1)}function uQ(e,r=!1){return e==null?e:{name:e.name,role:e.role}}function dQ(e){return hQ(e,!1)}function hQ(e,r=!1){return e==null?e:{name:e.name,ttl:e.ttl,type:e.type,values:e.values}}function pQ(e){return fQ(e,!1)}function fQ(e,r=!1){return e==null?e:{bits:e.bits,comment:e.comment,name:e.name,type:e.type}}function mQ(e){return gQ(e,!1)}function gQ(e,r=!1){return e==null?e:{hostname:e.hostname,private_ip_address:e.private_ip_address,public_ip_address:e.public_ip_address,role:e.role,ssh_key_id:e.ssh_key_id,ssh_user:e.ssh_user,status:e.status}}function yQ(e){return vQ(e,!1)}function vQ(e,r=!1){return e==null?e:{effect:e.effect,key:e.key,value:e.value}}function KE(e){return xQ(e)}function xQ(e,r){return e==null?e:{account_id:e.account_id==null?void 0:e.account_id,created_at:e.created_at==null?void 0:e.created_at,id:e.id==null?void 0:e.id,kind:e.kind==null?void 0:e.kind,name:e.name==null?void 0:e.name,provider:e.provider==null?void 0:e.provider,region:e.region==null?void 0:e.region,schema_version:e.schema_version==null?void 0:e.schema_version,scope:e.scope==null?void 0:e.scope,scope_kind:e.scope_kind==null?void 0:e.scope_kind,scope_version:e.scope_version==null?void 0:e.scope_version,updated_at:e.updated_at==null?void 0:e.updated_at}}function bQ(e){return wQ(e,!1)}function wQ(e,r=!1){return e==null?e:{payload:e.payload,queue:e.queue,run_at:e.run_at,type:e.type}}function SQ(e){return EQ(e)}function EQ(e,r){return e==null?e:{alg:e.alg==null?void 0:e.alg,e:e.e==null?void 0:e.e,kid:e.kid==null?void 0:e.kid,kty:e.kty==null?void 0:e.kty,n:e.n==null?void 0:e.n,use:e.use==null?void 0:e.use,x:e.x==null?void 0:e.x}}function jQ(e){return CQ(e)}function CQ(e,r){return e==null?e:{keys:e.keys==null?void 0:e.keys.map(SQ)}}function AQ(e){return OQ(e)}function OQ(e,r){return e}function gj(e){return kQ(e)}function kQ(e,r){return e==null?e:{attempts:e.attempts==null?void 0:e.attempts,created_at:e.created_at==null?void 0:e.created_at,id:e.id==null?void 0:e.id,last_error:e.last_error==null?void 0:e.last_error,max_attempts:e.max_attempts==null?void 0:e.max_attempts,payload:e.payload==null?void 0:e.payload,queue:e.queue==null?void 0:e.queue,run_at:e.run_at==null?void 0:e.run_at,status:e.status==null?void 0:AQ(e.status),type:e.type==null?void 0:e.type,updated_at:e.updated_at==null?void 0:e.updated_at}}function RQ(e){return TQ(e,!1)}function TQ(e,r=!1){return e==null?e:{refresh_token:e.refresh_token}}function _Q(e){return $Q(e)}function $Q(e,r){return e==null?e:{items:e.items==null?void 0:e.items.map(gj),page:e.page==null?void 0:e.page,page_size:e.page_size==null?void 0:e.page_size,total:e.total==null?void 0:e.total}}function NQ(e){return DQ(e)}function DQ(e,r){return e==null?e:{failed:e.failed==null?void 0:e.failed,name:e.name==null?void 0:e.name,pending:e.pending==null?void 0:e.pending,running:e.running==null?void 0:e.running,scheduled:e.scheduled==null?void 0:e.scheduled}}function PQ(e){return MQ(e,!1)}function MQ(e,r=!1){return e==null?e:{refresh_token:e.refresh_token}}function IQ(e){return zQ(e,!1)}function zQ(e,r=!1){return e==null?e:{kubeconfig:e.kubeconfig}}function IM(e){return hz(e)}function hz(e,r){return e==null?e:{created_at:e.created_at==null?void 0:e.created_at,fingerprint:e.fingerprint==null?void 0:e.fingerprint,id:e.id==null?void 0:e.id,name:e.name==null?void 0:e.name,organization_id:e.organization_id==null?void 0:e.organization_id,public_key:e.public_key==null?void 0:e.public_key,updated_at:e.updated_at==null?void 0:e.updated_at}}function zM(e){return LQ(e)}function LQ(e,r){return e==null?e:{access_token:e.access_token==null?void 0:e.access_token,expires_in:e.expires_in==null?void 0:e.expires_in,refresh_token:e.refresh_token==null?void 0:e.refresh_token,token_type:e.token_type==null?void 0:e.token_type}}function FQ(e){return qQ(e,!1)}function qQ(e,r=!1){return e==null?e:{key:e.key,value:e.value}}function BQ(e){return UQ(e,!1)}function UQ(e,r=!1){return e==null?e:{name:e.name,provider:e.provider,region:e.region}}function KQ(e){return VQ(e,!1)}function VQ(e,r=!1){return e==null?e:{account_id:e.account_id,name:e.name,region:e.region,scope:e.scope,scope_kind:e.scope_kind,scope_version:e.scope_version,secret:e.secret}}function HQ(e){return GQ(e,!1)}function GQ(e,r=!1){return e==null?e:{credential_id:e.credential_id,domain_name:e.domain_name,status:e.status,zone_id:e.zone_id}}function XQ(e){return YQ(e,!1)}function YQ(e,r=!1){return e==null?e:{key:e.key,value:e.value}}function ZQ(e){return WQ(e,!1)}function WQ(e,r=!1){return e==null?e:{kind:e.kind,name:e.name,private_ip_address:e.private_ip_address,public_ip_address:e.public_ip_address}}function JQ(e){return QQ(e,!1)}function QQ(e,r=!1){return e==null?e:{name:e.name,role:e.role}}function eee(e){return tee(e,!1)}function tee(e,r=!1){return e==null?e:{name:e.name,status:e.status,ttl:e.ttl,type:e.type,values:e.values}}function nee(e){return ree(e,!1)}function ree(e,r=!1){return e==null?e:{hostname:e.hostname,private_ip_address:e.private_ip_address,public_ip_address:e.public_ip_address,role:e.role,ssh_key_id:e.ssh_key_id,ssh_user:e.ssh_user,status:e.status}}function see(e){return iee(e,!1)}function iee(e,r=!1){return e==null?e:{effect:e.effect,key:e.key,value:e.value}}function aee(e){return oee(e)}function oee(e,r){return e==null||typeof e!="object"?e:hz(e)}function lee(e){return cee(e,!1)}function cee(e,r=!1){return e==null?e:{expires_in_hours:e.expires_in_hours,name:e.name}}function pz(e){return uee(e)}function uee(e,r){return e==null?e:{avatar_url:e.avatar_url==null?void 0:e.avatar_url,created_at:e.created_at==null?void 0:new Date(e.created_at),display_name:e.display_name==null?void 0:e.display_name,id:e.id==null?void 0:e.id,is_admin:e.is_admin==null?void 0:e.is_admin,is_disabled:e.is_disabled==null?void 0:e.is_disabled,primary_email:e.primary_email==null?void 0:e.primary_email,updated_at:e.updated_at==null?void 0:new Date(e.updated_at)}}function dee(e){return hee(e)}function hee(e,r){return e==null?e:{created_at:e.created_at==null?void 0:new Date(e.created_at),email:e.email==null?void 0:e.email,id:e.id==null?void 0:e.id,is_primary:e.is_primary==null?void 0:e.is_primary,is_verified:e.is_verified==null?void 0:e.is_verified,updated_at:e.updated_at==null?void 0:new Date(e.updated_at),user:e.user==null?void 0:pz(e.user),user_id:e.user_id==null?void 0:e.user_id}}function xb(e){return pee(e)}function pee(e,r){return e==null?e:{created_at:e.created_at==null?void 0:new Date(e.created_at),domain:e.domain==null?void 0:e.domain,id:e.id==null?void 0:e.id,name:e.name==null?void 0:e.name,updated_at:e.updated_at==null?void 0:new Date(e.updated_at)}}function fee(e){return mee(e)}function mee(e,r){return e==null?e:{avatar_url:e.avatar_url==null?void 0:e.avatar_url,created_at:e.created_at==null?void 0:new Date(e.created_at),display_name:e.display_name==null?void 0:e.display_name,emails:e.emails==null?void 0:e.emails.map(dee),id:e.id==null?void 0:e.id,is_admin:e.is_admin==null?void 0:e.is_admin,is_disabled:e.is_disabled==null?void 0:e.is_disabled,organizations:e.organizations==null?void 0:e.organizations.map(xb),primary_email:e.primary_email==null?void 0:e.primary_email,updated_at:e.updated_at==null?void 0:new Date(e.updated_at)}}function LM(e){return gee(e)}function gee(e,r){return e==null?e:{email:e.email==null?void 0:e.email,role:e.role==null?void 0:e.role,user_id:e.user_id==null?void 0:e.user_id}}function yee(e){return vee(e,!1)}function vee(e,r=!1){return e==null?e:{role:e.role,user_id:e.user_id}}function xee(e){return bee(e,!1)}function bee(e,r=!1){return e==null?e:{domain:e.domain,name:e.name}}function wee(e){return See(e,!1)}function See(e,r=!1){return e==null?e:{expires_in_hours:e.expires_in_hours,name:e.name}}function Eee(e){return jee(e)}function jee(e,r){return e==null?e:{created_at:e.created_at==null?void 0:e.created_at,expires_at:e.expires_at==null?void 0:e.expires_at,id:e.id==null?void 0:e.id,name:e.name==null?void 0:e.name,org_key:e.org_key==null?void 0:e.org_key,org_secret:e.org_secret==null?void 0:e.org_secret,scope:e.scope==null?void 0:e.scope}}function Cee(e){return Aee(e,!1)}function Aee(e,r=!1){return e==null?e:{domain:e.domain,name:e.name}}function Oee(e){return kee(e,!1)}function kee(e,r=!1){return e==null?e:{display_name:e.display_name}}function FM(e){return Ree(e)}function Ree(e,r){return e==null?e:{created_at:e.created_at==null?void 0:e.created_at,expires_at:e.expires_at==null?void 0:e.expires_at,id:e.id==null?void 0:e.id,last_used_at:e.last_used_at==null?void 0:e.last_used_at,name:e.name==null?void 0:e.name,plain:e.plain==null?void 0:e.plain,scope:e.scope==null?void 0:e.scope}}function Tee(e){return _ee(e)}function _ee(e,r){return e==null?e:{created_at:e.created_at==null?void 0:new Date(e.created_at),expires_at:e.expires_at==null?void 0:new Date(e.expires_at),id:e.id==null?void 0:e.id,last_used_at:e.last_used_at==null?void 0:new Date(e.last_used_at),name:e.name==null?void 0:e.name,org_id:e.org_id==null?void 0:e.org_id,prefix:e.prefix==null?void 0:e.prefix,revoked:e.revoked==null?void 0:e.revoked,scope:e.scope==null?void 0:e.scope,updated_at:e.updated_at==null?void 0:new Date(e.updated_at),user_id:e.user_id==null?void 0:e.user_id}}class $ee extends Gs{async createAnnotationRaw(r,s){if(r.dtoCreateAnnotationRequest==null)throw new et("dtoCreateAnnotationRequest",'Required parameter "dtoCreateAnnotationRequest" was null or undefined when calling createAnnotation().');const o={},d={};d["Content-Type"]="application/json",r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));const m=await this.request({path:"/annotations",method:"POST",headers:d,query:o,body:WJ(r.dtoCreateAnnotationRequest)},s);return new pt(m,g=>tg(g))}async createAnnotation(r,s){return await(await this.createAnnotationRaw(r,s)).value()}async deleteAnnotationRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling deleteAnnotation().');const o={},d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/annotations/{id}";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"DELETE",headers:d,query:o},s);return new Ii(m)}async deleteAnnotation(r,s){await this.deleteAnnotationRaw(r,s)}async getAnnotationRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling getAnnotation().');const o={},d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/annotations/{id}";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"GET",headers:d,query:o},s);return new pt(m,g=>tg(g))}async getAnnotation(r,s){return await(await this.getAnnotationRaw(r,s)).value()}async listAnnotationsRaw(r,s){const o={};r.key!=null&&(o.key=r.key),r.value!=null&&(o.value=r.value),r.q!=null&&(o.q=r.q);const d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));const m=await this.request({path:"/annotations",method:"GET",headers:d,query:o},s);return new pt(m,g=>g.map(tg))}async listAnnotations(r={},s){return await(await this.listAnnotationsRaw(r,s)).value()}async updateAnnotationRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling updateAnnotation().');if(r.dtoUpdateAnnotationRequest==null)throw new et("dtoUpdateAnnotationRequest",'Required parameter "dtoUpdateAnnotationRequest" was null or undefined when calling updateAnnotation().');const o={},d={};d["Content-Type"]="application/json",r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/annotations/{id}";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"PATCH",headers:d,query:o,body:FQ(r.dtoUpdateAnnotationRequest)},s);return new pt(m,g=>tg(g))}async updateAnnotation(r,s){return await(await this.updateAnnotationRaw(r,s)).value()}}class Nee extends Gs{async adminCancelArcherJobRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling adminCancelArcherJob().');const o={},d={};d["Content-Type"]="application/json",this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/admin/archer/jobs/{id}/cancel";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"POST",headers:d,query:o,body:r.body},s);return new pt(m,g=>gj(g))}async adminCancelArcherJob(r,s){return await(await this.adminCancelArcherJobRaw(r,s)).value()}async adminEnqueueArcherJobRaw(r,s){if(r.dtoEnqueueRequest==null)throw new et("dtoEnqueueRequest",'Required parameter "dtoEnqueueRequest" was null or undefined when calling adminEnqueueArcherJob().');const o={},d={};d["Content-Type"]="application/json",this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));const m=await this.request({path:"/admin/archer/jobs",method:"POST",headers:d,query:o,body:bQ(r.dtoEnqueueRequest)},s);return new pt(m,g=>gj(g))}async adminEnqueueArcherJob(r,s){return await(await this.adminEnqueueArcherJobRaw(r,s)).value()}async adminListArcherJobsRaw(r,s){const o={};r.status!=null&&(o.status=r.status),r.queue!=null&&(o.queue=r.queue),r.q!=null&&(o.q=r.q),r.page!=null&&(o.page=r.page),r.pageSize!=null&&(o.page_size=r.pageSize);const d={};this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));const m=await this.request({path:"/admin/archer/jobs",method:"GET",headers:d,query:o},s);return new pt(m,g=>_Q(g))}async adminListArcherJobs(r={},s){return await(await this.adminListArcherJobsRaw(r,s)).value()}async adminListArcherQueuesRaw(r){const s={},o={};this.configuration&&this.configuration.apiKey&&(o.Authorization=await this.configuration.apiKey("Authorization"));const p=await this.request({path:"/admin/archer/queues",method:"GET",headers:o,query:s},r);return new pt(p,m=>m.map(NQ))}async adminListArcherQueues(r){return await(await this.adminListArcherQueuesRaw(r)).value()}async adminRetryArcherJobRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling adminRetryArcherJob().');const o={},d={};d["Content-Type"]="application/json",this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/admin/archer/jobs/{id}/retry";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"POST",headers:d,query:o,body:r.body},s);return new pt(m,g=>gj(g))}async adminRetryArcherJob(r,s){return await(await this.adminRetryArcherJobRaw(r,s)).value()}}const Ra={queued:"queued",running:"running",succeeded:"succeeded",failed:"failed",canceled:"canceled",retrying:"retrying",scheduled:"scheduled"};class Dee extends Gs{async authCallbackRaw(r,s){if(r.provider==null)throw new et("provider",'Required parameter "provider" was null or undefined when calling authCallback().');const o={},d={};let p="/auth/{provider}/callback";p=p.replace("{provider}",encodeURIComponent(String(r.provider)));const m=await this.request({path:p,method:"GET",headers:d,query:o},s);return new pt(m,g=>zM(g))}async authCallback(r,s){return await(await this.authCallbackRaw(r,s)).value()}async authStartRaw(r,s){if(r.provider==null)throw new et("provider",'Required parameter "provider" was null or undefined when calling authStart().');const o={},d={};let p="/auth/{provider}/start";p=p.replace("{provider}",encodeURIComponent(String(r.provider)));const m=await this.request({path:p,method:"POST",headers:d,query:o},s);return new pt(m,g=>qJ(g))}async authStart(r,s){return await(await this.authStartRaw(r,s)).value()}async getJWKSRaw(r){const s={},o={},p=await this.request({path:"/.well-known/jwks.json",method:"GET",headers:o,query:s},r);return new pt(p,m=>jQ(m))}async getJWKS(r){return await(await this.getJWKSRaw(r)).value()}async logoutRaw(r,s){if(r.dtoLogoutRequest==null)throw new et("dtoLogoutRequest",'Required parameter "dtoLogoutRequest" was null or undefined when calling logout().');const o={},d={};d["Content-Type"]="application/json";const m=await this.request({path:"/auth/logout",method:"POST",headers:d,query:o,body:RQ(r.dtoLogoutRequest)},s);return new Ii(m)}async logout(r,s){await this.logoutRaw(r,s)}async refreshRaw(r,s){if(r.dtoRefreshRequest==null)throw new et("dtoRefreshRequest",'Required parameter "dtoRefreshRequest" was null or undefined when calling refresh().');const o={},d={};d["Content-Type"]="application/json";const m=await this.request({path:"/auth/refresh",method:"POST",headers:d,query:o,body:PQ(r.dtoRefreshRequest)},s);return new pt(m,g=>zM(g))}async refresh(r,s){return await(await this.refreshRaw(r,s)).value()}}class Pee extends Gs{async attachAppsLoadBalancerRaw(r,s){if(r.clusterID==null)throw new et("clusterID",'Required parameter "clusterID" was null or undefined when calling attachAppsLoadBalancer().');if(r.dtoAttachLoadBalancerRequest==null)throw new et("dtoAttachLoadBalancerRequest",'Required parameter "dtoAttachLoadBalancerRequest" was null or undefined when calling attachAppsLoadBalancer().');const o={},d={};d["Content-Type"]="application/json",r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/clusters/{clusterID}/apps-load-balancer";p=p.replace("{clusterID}",encodeURIComponent(String(r.clusterID)));const m=await this.request({path:p,method:"POST",headers:d,query:o,body:MM(r.dtoAttachLoadBalancerRequest)},s);return new pt(m,g=>Ns(g))}async attachAppsLoadBalancer(r,s){return await(await this.attachAppsLoadBalancerRaw(r,s)).value()}async attachBastionServerRaw(r,s){if(r.clusterID==null)throw new et("clusterID",'Required parameter "clusterID" was null or undefined when calling attachBastionServer().');if(r.dtoAttachBastionRequest==null)throw new et("dtoAttachBastionRequest",'Required parameter "dtoAttachBastionRequest" was null or undefined when calling attachBastionServer().');const o={},d={};d["Content-Type"]="application/json",r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/clusters/{clusterID}/bastion";p=p.replace("{clusterID}",encodeURIComponent(String(r.clusterID)));const m=await this.request({path:p,method:"POST",headers:d,query:o,body:AJ(r.dtoAttachBastionRequest)},s);return new pt(m,g=>Ns(g))}async attachBastionServer(r,s){return await(await this.attachBastionServerRaw(r,s)).value()}async attachCaptainDomainRaw(r,s){if(r.clusterID==null)throw new et("clusterID",'Required parameter "clusterID" was null or undefined when calling attachCaptainDomain().');if(r.dtoAttachCaptainDomainRequest==null)throw new et("dtoAttachCaptainDomainRequest",'Required parameter "dtoAttachCaptainDomainRequest" was null or undefined when calling attachCaptainDomain().');const o={},d={};d["Content-Type"]="application/json",r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/clusters/{clusterID}/captain-domain";p=p.replace("{clusterID}",encodeURIComponent(String(r.clusterID)));const m=await this.request({path:p,method:"POST",headers:d,query:o,body:kJ(r.dtoAttachCaptainDomainRequest)},s);return new pt(m,g=>Ns(g))}async attachCaptainDomain(r,s){return await(await this.attachCaptainDomainRaw(r,s)).value()}async attachControlPlaneRecordSetRaw(r,s){if(r.clusterID==null)throw new et("clusterID",'Required parameter "clusterID" was null or undefined when calling attachControlPlaneRecordSet().');if(r.dtoAttachRecordSetRequest==null)throw new et("dtoAttachRecordSetRequest",'Required parameter "dtoAttachRecordSetRequest" was null or undefined when calling attachControlPlaneRecordSet().');const o={},d={};d["Content-Type"]="application/json",r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/clusters/{clusterID}/control-plane-record-set";p=p.replace("{clusterID}",encodeURIComponent(String(r.clusterID)));const m=await this.request({path:p,method:"POST",headers:d,query:o,body:PJ(r.dtoAttachRecordSetRequest)},s);return new pt(m,g=>Ns(g))}async attachControlPlaneRecordSet(r,s){return await(await this.attachControlPlaneRecordSetRaw(r,s)).value()}async attachGlueOpsLoadBalancerRaw(r,s){if(r.clusterID==null)throw new et("clusterID",'Required parameter "clusterID" was null or undefined when calling attachGlueOpsLoadBalancer().');if(r.dtoAttachLoadBalancerRequest==null)throw new et("dtoAttachLoadBalancerRequest",'Required parameter "dtoAttachLoadBalancerRequest" was null or undefined when calling attachGlueOpsLoadBalancer().');const o={},d={};d["Content-Type"]="application/json",r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/clusters/{clusterID}/glueops-load-balancer";p=p.replace("{clusterID}",encodeURIComponent(String(r.clusterID)));const m=await this.request({path:p,method:"POST",headers:d,query:o,body:MM(r.dtoAttachLoadBalancerRequest)},s);return new pt(m,g=>Ns(g))}async attachGlueOpsLoadBalancer(r,s){return await(await this.attachGlueOpsLoadBalancerRaw(r,s)).value()}async attachNodePoolRaw(r,s){if(r.clusterID==null)throw new et("clusterID",'Required parameter "clusterID" was null or undefined when calling attachNodePool().');if(r.dtoAttachNodePoolRequest==null)throw new et("dtoAttachNodePoolRequest",'Required parameter "dtoAttachNodePoolRequest" was null or undefined when calling attachNodePool().');const o={},d={};d["Content-Type"]="application/json",r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/clusters/{clusterID}/node-pools";p=p.replace("{clusterID}",encodeURIComponent(String(r.clusterID)));const m=await this.request({path:p,method:"POST",headers:d,query:o,body:NJ(r.dtoAttachNodePoolRequest)},s);return new pt(m,g=>Ns(g))}async attachNodePool(r,s){return await(await this.attachNodePoolRaw(r,s)).value()}async clearClusterKubeconfigRaw(r,s){if(r.clusterID==null)throw new et("clusterID",'Required parameter "clusterID" was null or undefined when calling clearClusterKubeconfig().');const o={},d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/clusters/{clusterID}/kubeconfig";p=p.replace("{clusterID}",encodeURIComponent(String(r.clusterID)));const m=await this.request({path:p,method:"DELETE",headers:d,query:o},s);return new pt(m,g=>Ns(g))}async clearClusterKubeconfig(r,s){return await(await this.clearClusterKubeconfigRaw(r,s)).value()}async createClusterRaw(r,s){if(r.dtoCreateClusterRequest==null)throw new et("dtoCreateClusterRequest",'Required parameter "dtoCreateClusterRequest" was null or undefined when calling createCluster().');const o={},d={};d["Content-Type"]="application/json",r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));const m=await this.request({path:"/clusters",method:"POST",headers:d,query:o,body:QJ(r.dtoCreateClusterRequest)},s);return new pt(m,g=>Ns(g))}async createCluster(r,s){return await(await this.createClusterRaw(r,s)).value()}async deleteClusterRaw(r,s){if(r.clusterID==null)throw new et("clusterID",'Required parameter "clusterID" was null or undefined when calling deleteCluster().');const o={},d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/clusters/{clusterID}";p=p.replace("{clusterID}",encodeURIComponent(String(r.clusterID)));const m=await this.request({path:p,method:"DELETE",headers:d,query:o},s);return this.isJsonMime(m.headers.get("content-type"))?new pt(m):new ec(m)}async deleteCluster(r,s){return await(await this.deleteClusterRaw(r,s)).value()}async detachAppsLoadBalancerRaw(r,s){if(r.clusterID==null)throw new et("clusterID",'Required parameter "clusterID" was null or undefined when calling detachAppsLoadBalancer().');const o={},d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/clusters/{clusterID}/apps-load-balancer";p=p.replace("{clusterID}",encodeURIComponent(String(r.clusterID)));const m=await this.request({path:p,method:"DELETE",headers:d,query:o},s);return new pt(m,g=>Ns(g))}async detachAppsLoadBalancer(r,s){return await(await this.detachAppsLoadBalancerRaw(r,s)).value()}async detachBastionServerRaw(r,s){if(r.clusterID==null)throw new et("clusterID",'Required parameter "clusterID" was null or undefined when calling detachBastionServer().');const o={},d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/clusters/{clusterID}/bastion";p=p.replace("{clusterID}",encodeURIComponent(String(r.clusterID)));const m=await this.request({path:p,method:"DELETE",headers:d,query:o},s);return new pt(m,g=>Ns(g))}async detachBastionServer(r,s){return await(await this.detachBastionServerRaw(r,s)).value()}async detachCaptainDomainRaw(r,s){if(r.clusterID==null)throw new et("clusterID",'Required parameter "clusterID" was null or undefined when calling detachCaptainDomain().');const o={},d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/clusters/{clusterID}/captain-domain";p=p.replace("{clusterID}",encodeURIComponent(String(r.clusterID)));const m=await this.request({path:p,method:"DELETE",headers:d,query:o},s);return new pt(m,g=>Ns(g))}async detachCaptainDomain(r,s){return await(await this.detachCaptainDomainRaw(r,s)).value()}async detachControlPlaneRecordSetRaw(r,s){if(r.clusterID==null)throw new et("clusterID",'Required parameter "clusterID" was null or undefined when calling detachControlPlaneRecordSet().');const o={},d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/clusters/{clusterID}/control-plane-record-set";p=p.replace("{clusterID}",encodeURIComponent(String(r.clusterID)));const m=await this.request({path:p,method:"DELETE",headers:d,query:o},s);return new pt(m,g=>Ns(g))}async detachControlPlaneRecordSet(r,s){return await(await this.detachControlPlaneRecordSetRaw(r,s)).value()}async detachGlueOpsLoadBalancerRaw(r,s){if(r.clusterID==null)throw new et("clusterID",'Required parameter "clusterID" was null or undefined when calling detachGlueOpsLoadBalancer().');const o={},d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/clusters/{clusterID}/glueops-load-balancer";p=p.replace("{clusterID}",encodeURIComponent(String(r.clusterID)));const m=await this.request({path:p,method:"DELETE",headers:d,query:o},s);return new pt(m,g=>Ns(g))}async detachGlueOpsLoadBalancer(r,s){return await(await this.detachGlueOpsLoadBalancerRaw(r,s)).value()}async detachNodePoolRaw(r,s){if(r.clusterID==null)throw new et("clusterID",'Required parameter "clusterID" was null or undefined when calling detachNodePool().');if(r.nodePoolID==null)throw new et("nodePoolID",'Required parameter "nodePoolID" was null or undefined when calling detachNodePool().');const o={},d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/clusters/{clusterID}/node-pools/{nodePoolID}";p=p.replace("{clusterID}",encodeURIComponent(String(r.clusterID))),p=p.replace("{nodePoolID}",encodeURIComponent(String(r.nodePoolID)));const m=await this.request({path:p,method:"DELETE",headers:d,query:o},s);return new pt(m,g=>Ns(g))}async detachNodePool(r,s){return await(await this.detachNodePoolRaw(r,s)).value()}async getClusterRaw(r,s){if(r.clusterID==null)throw new et("clusterID",'Required parameter "clusterID" was null or undefined when calling getCluster().');const o={},d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/clusters/{clusterID}";p=p.replace("{clusterID}",encodeURIComponent(String(r.clusterID)));const m=await this.request({path:p,method:"GET",headers:d,query:o},s);return new pt(m,g=>Ns(g))}async getCluster(r,s){return await(await this.getClusterRaw(r,s)).value()}async listClustersRaw(r,s){const o={};r.q!=null&&(o.q=r.q);const d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));const m=await this.request({path:"/clusters",method:"GET",headers:d,query:o},s);return new pt(m,g=>g.map(Ns))}async listClusters(r={},s){return await(await this.listClustersRaw(r,s)).value()}async setClusterKubeconfigRaw(r,s){if(r.clusterID==null)throw new et("clusterID",'Required parameter "clusterID" was null or undefined when calling setClusterKubeconfig().');if(r.dtoSetKubeconfigRequest==null)throw new et("dtoSetKubeconfigRequest",'Required parameter "dtoSetKubeconfigRequest" was null or undefined when calling setClusterKubeconfig().');const o={},d={};d["Content-Type"]="application/json",r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/clusters/{clusterID}/kubeconfig";p=p.replace("{clusterID}",encodeURIComponent(String(r.clusterID)));const m=await this.request({path:p,method:"POST",headers:d,query:o,body:IQ(r.dtoSetKubeconfigRequest)},s);return new pt(m,g=>Ns(g))}async setClusterKubeconfig(r,s){return await(await this.setClusterKubeconfigRaw(r,s)).value()}async updateClusterRaw(r,s){if(r.clusterID==null)throw new et("clusterID",'Required parameter "clusterID" was null or undefined when calling updateCluster().');if(r.dtoUpdateClusterRequest==null)throw new et("dtoUpdateClusterRequest",'Required parameter "dtoUpdateClusterRequest" was null or undefined when calling updateCluster().');const o={},d={};d["Content-Type"]="application/json",r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/clusters/{clusterID}";p=p.replace("{clusterID}",encodeURIComponent(String(r.clusterID)));const m=await this.request({path:p,method:"PATCH",headers:d,query:o,body:BQ(r.dtoUpdateClusterRequest)},s);return new pt(m,g=>Ns(g))}async updateCluster(r,s){return await(await this.updateClusterRaw(r,s)).value()}}class Mee extends Gs{async createCredentialRaw(r,s){if(r.dtoCreateCredentialRequest==null)throw new et("dtoCreateCredentialRequest",'Required parameter "dtoCreateCredentialRequest" was null or undefined when calling createCredential().');const o={},d={};d["Content-Type"]="application/json",r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));const m=await this.request({path:"/credentials",method:"POST",headers:d,query:o,body:tQ(r.dtoCreateCredentialRequest)},s);return new pt(m,g=>KE(g))}async createCredential(r,s){return await(await this.createCredentialRaw(r,s)).value()}async deleteCredentialRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling deleteCredential().');const o={},d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/credentials/{id}";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"DELETE",headers:d,query:o},s);return new Ii(m)}async deleteCredential(r,s){await this.deleteCredentialRaw(r,s)}async getCredentialRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling getCredential().');const o={},d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/credentials/{id}";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"GET",headers:d,query:o},s);return new pt(m,g=>KE(g))}async getCredential(r,s){return await(await this.getCredentialRaw(r,s)).value()}async listCredentialsRaw(r,s){const o={};r.provider!=null&&(o.provider=r.provider),r.kind!=null&&(o.kind=r.kind),r.scopeKind!=null&&(o.scope_kind=r.scopeKind);const d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));const m=await this.request({path:"/credentials",method:"GET",headers:d,query:o},s);return new pt(m,g=>g.map(KE))}async listCredentials(r={},s){return await(await this.listCredentialsRaw(r,s)).value()}async revealCredentialRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling revealCredential().');const o={},d={};d["Content-Type"]="application/json",r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/credentials/{id}/reveal";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"POST",headers:d,query:o,body:r.body},s);return new pt(m)}async revealCredential(r,s){return await(await this.revealCredentialRaw(r,s)).value()}async updateCredentialRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling updateCredential().');if(r.dtoUpdateCredentialRequest==null)throw new et("dtoUpdateCredentialRequest",'Required parameter "dtoUpdateCredentialRequest" was null or undefined when calling updateCredential().');const o={},d={};d["Content-Type"]="application/json",r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/credentials/{id}";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"PATCH",headers:d,query:o,body:KQ(r.dtoUpdateCredentialRequest)},s);return new pt(m,g=>KE(g))}async updateCredential(r,s){return await(await this.updateCredentialRaw(r,s)).value()}}class Iee extends Gs{async createDomainRaw(r,s){if(r.dtoCreateDomainRequest==null)throw new et("dtoCreateDomainRequest",'Required parameter "dtoCreateDomainRequest" was null or undefined when calling createDomain().');const o={},d={};d["Content-Type"]="application/json",r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));const m=await this.request({path:"/dns/domains",method:"POST",headers:d,query:o,body:rQ(r.dtoCreateDomainRequest)},s);return new pt(m,g=>yb(g))}async createDomain(r,s){return await(await this.createDomainRaw(r,s)).value()}async createRecordSetRaw(r,s){if(r.domainId==null)throw new et("domainId",'Required parameter "domainId" was null or undefined when calling createRecordSet().');if(r.dtoCreateRecordSetRequest==null)throw new et("dtoCreateRecordSetRequest",'Required parameter "dtoCreateRecordSetRequest" was null or undefined when calling createRecordSet().');const o={},d={};d["Content-Type"]="application/json",r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/dns/domains/{domain_id}/records";p=p.replace("{domain_id}",encodeURIComponent(String(r.domainId)));const m=await this.request({path:p,method:"POST",headers:d,query:o,body:dQ(r.dtoCreateRecordSetRequest)},s);return new pt(m,g=>mj(g))}async createRecordSet(r,s){return await(await this.createRecordSetRaw(r,s)).value()}async deleteDomainRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling deleteDomain().');const o={},d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/dns/domains/{id}";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"DELETE",headers:d,query:o},s);return new Ii(m)}async deleteDomain(r,s){await this.deleteDomainRaw(r,s)}async deleteRecordSetRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling deleteRecordSet().');const o={},d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/dns/records/{id}";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"DELETE",headers:d,query:o},s);return new Ii(m)}async deleteRecordSet(r,s){await this.deleteRecordSetRaw(r,s)}async getDomainRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling getDomain().');const o={},d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/dns/domains/{id}";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"GET",headers:d,query:o},s);return new pt(m,g=>yb(g))}async getDomain(r,s){return await(await this.getDomainRaw(r,s)).value()}async listDomainsRaw(r,s){const o={};r.domainName!=null&&(o.domain_name=r.domainName),r.status!=null&&(o.status=r.status),r.q!=null&&(o.q=r.q);const d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));const m=await this.request({path:"/dns/domains",method:"GET",headers:d,query:o},s);return new pt(m,g=>g.map(yb))}async listDomains(r={},s){return await(await this.listDomainsRaw(r,s)).value()}async listRecordSetsRaw(r,s){if(r.domainId==null)throw new et("domainId",'Required parameter "domainId" was null or undefined when calling listRecordSets().');const o={};r.name!=null&&(o.name=r.name),r.type!=null&&(o.type=r.type),r.status!=null&&(o.status=r.status);const d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/dns/domains/{domain_id}/records";p=p.replace("{domain_id}",encodeURIComponent(String(r.domainId)));const m=await this.request({path:p,method:"GET",headers:d,query:o},s);return new pt(m,g=>g.map(mj))}async listRecordSets(r,s){return await(await this.listRecordSetsRaw(r,s)).value()}async updateDomainRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling updateDomain().');if(r.dtoUpdateDomainRequest==null)throw new et("dtoUpdateDomainRequest",'Required parameter "dtoUpdateDomainRequest" was null or undefined when calling updateDomain().');const o={},d={};d["Content-Type"]="application/json",r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/dns/domains/{id}";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"PATCH",headers:d,query:o,body:HQ(r.dtoUpdateDomainRequest)},s);return new pt(m,g=>yb(g))}async updateDomain(r,s){return await(await this.updateDomainRaw(r,s)).value()}async updateRecordSetRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling updateRecordSet().');if(r.dtoUpdateRecordSetRequest==null)throw new et("dtoUpdateRecordSetRequest",'Required parameter "dtoUpdateRecordSetRequest" was null or undefined when calling updateRecordSet().');const o={},d={};d["Content-Type"]="application/json",r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/dns/records/{id}";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"PATCH",headers:d,query:o,body:eee(r.dtoUpdateRecordSetRequest)},s);return new pt(m,g=>mj(g))}async updateRecordSet(r,s){return await(await this.updateRecordSetRaw(r,s)).value()}}class zee extends Gs{async createLabelRaw(r,s){if(r.dtoCreateLabelRequest==null)throw new et("dtoCreateLabelRequest",'Required parameter "dtoCreateLabelRequest" was null or undefined when calling createLabel().');const o={},d={};d["Content-Type"]="application/json",r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));const m=await this.request({path:"/labels",method:"POST",headers:d,query:o,body:iQ(r.dtoCreateLabelRequest)},s);return new pt(m,g=>sg(g))}async createLabel(r,s){return await(await this.createLabelRaw(r,s)).value()}async deleteLabelRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling deleteLabel().');const o={},d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/labels/{id}";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"DELETE",headers:d,query:o},s);return new Ii(m)}async deleteLabel(r,s){await this.deleteLabelRaw(r,s)}async getLabelRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling getLabel().');const o={},d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/labels/{id}";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"GET",headers:d,query:o},s);return new pt(m,g=>sg(g))}async getLabel(r,s){return await(await this.getLabelRaw(r,s)).value()}async listLabelsRaw(r,s){const o={};r.key!=null&&(o.key=r.key),r.value!=null&&(o.value=r.value),r.q!=null&&(o.q=r.q);const d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));const m=await this.request({path:"/labels",method:"GET",headers:d,query:o},s);return new pt(m,g=>g.map(sg))}async listLabels(r={},s){return await(await this.listLabelsRaw(r,s)).value()}async updateLabelRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling updateLabel().');if(r.dtoUpdateLabelRequest==null)throw new et("dtoUpdateLabelRequest",'Required parameter "dtoUpdateLabelRequest" was null or undefined when calling updateLabel().');const o={},d={};d["Content-Type"]="application/json",r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/labels/{id}";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"PATCH",headers:d,query:o,body:XQ(r.dtoUpdateLabelRequest)},s);return new pt(m,g=>sg(g))}async updateLabel(r,s){return await(await this.updateLabelRaw(r,s)).value()}}class Lee extends Gs{async createLoadBalancerRaw(r,s){if(r.dtoCreateLoadBalancerRequest==null)throw new et("dtoCreateLoadBalancerRequest",'Required parameter "dtoCreateLoadBalancerRequest" was null or undefined when calling createLoadBalancer().');const o={},d={};d["Content-Type"]="application/json",r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));const m=await this.request({path:"/load-balancers",method:"POST",headers:d,query:o,body:oQ(r.dtoCreateLoadBalancerRequest)},s);return new pt(m,g=>ng(g))}async createLoadBalancer(r,s){return await(await this.createLoadBalancerRaw(r,s)).value()}async deleteLoadBalancerRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling deleteLoadBalancer().');const o={},d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/load-balancers/{id}";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"DELETE",headers:d,query:o},s);return new Ii(m)}async deleteLoadBalancer(r,s){await this.deleteLoadBalancerRaw(r,s)}async getLoadBalancersRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling getLoadBalancers().');const o={},d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/load-balancers/{id}";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"GET",headers:d,query:o},s);return new pt(m,g=>g.map(ng))}async getLoadBalancers(r,s){return await(await this.getLoadBalancersRaw(r,s)).value()}async listLoadBalancersRaw(r,s){const o={},d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));const m=await this.request({path:"/load-balancers",method:"GET",headers:d,query:o},s);return new pt(m,g=>g.map(ng))}async listLoadBalancers(r={},s){return await(await this.listLoadBalancersRaw(r,s)).value()}async updateLoadBalancerRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling updateLoadBalancer().');if(r.dtoUpdateLoadBalancerRequest==null)throw new et("dtoUpdateLoadBalancerRequest",'Required parameter "dtoUpdateLoadBalancerRequest" was null or undefined when calling updateLoadBalancer().');const o={},d={};d["Content-Type"]="application/json",r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/load-balancers/{id}";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"PATCH",headers:d,query:o,body:ZQ(r.dtoUpdateLoadBalancerRequest)},s);return new pt(m,g=>ng(g))}async updateLoadBalancer(r,s){return await(await this.updateLoadBalancerRaw(r,s)).value()}}class Fee extends Gs{async getMeRaw(r){const s={},o={};this.configuration&&this.configuration.apiKey&&(o["X-API-KEY"]=await this.configuration.apiKey("X-API-KEY")),this.configuration&&this.configuration.apiKey&&(o.Authorization=await this.configuration.apiKey("Authorization"));const p=await this.request({path:"/me",method:"GET",headers:o,query:s},r);return new pt(p,m=>fee(m))}async getMe(r){return await(await this.getMeRaw(r)).value()}async updateMeRaw(r,s){if(r.handlersUpdateMeRequest==null)throw new et("handlersUpdateMeRequest",'Required parameter "handlersUpdateMeRequest" was null or undefined when calling updateMe().');const o={},d={};d["Content-Type"]="application/json",this.configuration&&this.configuration.apiKey&&(d["X-API-KEY"]=await this.configuration.apiKey("X-API-KEY")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));const m=await this.request({path:"/me",method:"PATCH",headers:d,query:o,body:Oee(r.handlersUpdateMeRequest)},s);return new pt(m,g=>pz(g))}async updateMe(r,s){return await(await this.updateMeRaw(r,s)).value()}}class qee extends Gs{async createUserAPIKeyRaw(r,s){if(r.handlersCreateUserKeyRequest==null)throw new et("handlersCreateUserKeyRequest",'Required parameter "handlersCreateUserKeyRequest" was null or undefined when calling createUserAPIKey().');const o={},d={};d["Content-Type"]="application/json",this.configuration&&this.configuration.apiKey&&(d["X-API-KEY"]=await this.configuration.apiKey("X-API-KEY")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));const m=await this.request({path:"/me/api-keys",method:"POST",headers:d,query:o,body:lee(r.handlersCreateUserKeyRequest)},s);return new pt(m,g=>FM(g))}async createUserAPIKey(r,s){return await(await this.createUserAPIKeyRaw(r,s)).value()}async deleteUserAPIKeyRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling deleteUserAPIKey().');const o={},d={};this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/me/api-keys/{id}";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"DELETE",headers:d,query:o},s);return new Ii(m)}async deleteUserAPIKey(r,s){await this.deleteUserAPIKeyRaw(r,s)}async listUserAPIKeysRaw(r){const s={},o={};this.configuration&&this.configuration.apiKey&&(o["X-API-KEY"]=await this.configuration.apiKey("X-API-KEY")),this.configuration&&this.configuration.apiKey&&(o.Authorization=await this.configuration.apiKey("Authorization"));const p=await this.request({path:"/me/api-keys",method:"GET",headers:o,query:s},r);return new pt(p,m=>m.map(FM))}async listUserAPIKeys(r){return await(await this.listUserAPIKeysRaw(r)).value()}}class Bee extends Gs{async attachNodePoolAnnotationsRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling attachNodePoolAnnotations().');if(r.dtoAttachAnnotationsRequest==null)throw new et("dtoAttachAnnotationsRequest",'Required parameter "dtoAttachAnnotationsRequest" was null or undefined when calling attachNodePoolAnnotations().');const o={},d={};d["Content-Type"]="application/json",r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/node-pools/{id}/annotations";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"POST",headers:d,query:o,body:jJ(r.dtoAttachAnnotationsRequest)},s);return this.isJsonMime(m.headers.get("content-type"))?new pt(m):new ec(m)}async attachNodePoolAnnotations(r,s){return await(await this.attachNodePoolAnnotationsRaw(r,s)).value()}async attachNodePoolLabelsRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling attachNodePoolLabels().');if(r.dtoAttachLabelsRequest==null)throw new et("dtoAttachLabelsRequest",'Required parameter "dtoAttachLabelsRequest" was null or undefined when calling attachNodePoolLabels().');const o={},d={};d["Content-Type"]="application/json",r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/node-pools/{id}/labels";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"POST",headers:d,query:o,body:TJ(r.dtoAttachLabelsRequest)},s);return this.isJsonMime(m.headers.get("content-type"))?new pt(m):new ec(m)}async attachNodePoolLabels(r,s){return await(await this.attachNodePoolLabelsRaw(r,s)).value()}async attachNodePoolServersRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling attachNodePoolServers().');if(r.dtoAttachServersRequest==null)throw new et("dtoAttachServersRequest",'Required parameter "dtoAttachServersRequest" was null or undefined when calling attachNodePoolServers().');const o={},d={};d["Content-Type"]="application/json",r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/node-pools/{id}/servers";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"POST",headers:d,query:o,body:IJ(r.dtoAttachServersRequest)},s);return this.isJsonMime(m.headers.get("content-type"))?new pt(m):new ec(m)}async attachNodePoolServers(r,s){return await(await this.attachNodePoolServersRaw(r,s)).value()}async attachNodePoolTaintsRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling attachNodePoolTaints().');if(r.dtoAttachTaintsRequest==null)throw new et("dtoAttachTaintsRequest",'Required parameter "dtoAttachTaintsRequest" was null or undefined when calling attachNodePoolTaints().');const o={},d={};d["Content-Type"]="application/json",r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/node-pools/{id}/taints";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"POST",headers:d,query:o,body:LJ(r.dtoAttachTaintsRequest)},s);return this.isJsonMime(m.headers.get("content-type"))?new pt(m):new ec(m)}async attachNodePoolTaints(r,s){return await(await this.attachNodePoolTaintsRaw(r,s)).value()}async createNodePoolRaw(r,s){if(r.dtoCreateNodePoolRequest==null)throw new et("dtoCreateNodePoolRequest",'Required parameter "dtoCreateNodePoolRequest" was null or undefined when calling createNodePool().');const o={},d={};d["Content-Type"]="application/json",r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));const m=await this.request({path:"/node-pools",method:"POST",headers:d,query:o,body:cQ(r.dtoCreateNodePoolRequest)},s);return new pt(m,g=>vb(g))}async createNodePool(r,s){return await(await this.createNodePoolRaw(r,s)).value()}async deleteNodePoolRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling deleteNodePool().');const o={},d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/node-pools/{id}";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"DELETE",headers:d,query:o},s);return new Ii(m)}async deleteNodePool(r,s){await this.deleteNodePoolRaw(r,s)}async detachNodePoolAnnotationRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling detachNodePoolAnnotation().');if(r.annotationId==null)throw new et("annotationId",'Required parameter "annotationId" was null or undefined when calling detachNodePoolAnnotation().');const o={},d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/node-pools/{id}/annotations/{annotationId}";p=p.replace("{id}",encodeURIComponent(String(r.id))),p=p.replace("{annotationId}",encodeURIComponent(String(r.annotationId)));const m=await this.request({path:p,method:"DELETE",headers:d,query:o},s);return this.isJsonMime(m.headers.get("content-type"))?new pt(m):new ec(m)}async detachNodePoolAnnotation(r,s){return await(await this.detachNodePoolAnnotationRaw(r,s)).value()}async detachNodePoolLabelRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling detachNodePoolLabel().');if(r.labelId==null)throw new et("labelId",'Required parameter "labelId" was null or undefined when calling detachNodePoolLabel().');const o={},d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/node-pools/{id}/labels/{labelId}";p=p.replace("{id}",encodeURIComponent(String(r.id))),p=p.replace("{labelId}",encodeURIComponent(String(r.labelId)));const m=await this.request({path:p,method:"DELETE",headers:d,query:o},s);return this.isJsonMime(m.headers.get("content-type"))?new pt(m):new ec(m)}async detachNodePoolLabel(r,s){return await(await this.detachNodePoolLabelRaw(r,s)).value()}async detachNodePoolServerRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling detachNodePoolServer().');if(r.serverId==null)throw new et("serverId",'Required parameter "serverId" was null or undefined when calling detachNodePoolServer().');const o={},d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/node-pools/{id}/servers/{serverId}";p=p.replace("{id}",encodeURIComponent(String(r.id))),p=p.replace("{serverId}",encodeURIComponent(String(r.serverId)));const m=await this.request({path:p,method:"DELETE",headers:d,query:o},s);return this.isJsonMime(m.headers.get("content-type"))?new pt(m):new ec(m)}async detachNodePoolServer(r,s){return await(await this.detachNodePoolServerRaw(r,s)).value()}async detachNodePoolTaintRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling detachNodePoolTaint().');if(r.taintId==null)throw new et("taintId",'Required parameter "taintId" was null or undefined when calling detachNodePoolTaint().');const o={},d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/node-pools/{id}/taints/{taintId}";p=p.replace("{id}",encodeURIComponent(String(r.id))),p=p.replace("{taintId}",encodeURIComponent(String(r.taintId)));const m=await this.request({path:p,method:"DELETE",headers:d,query:o},s);return this.isJsonMime(m.headers.get("content-type"))?new pt(m):new ec(m)}async detachNodePoolTaint(r,s){return await(await this.detachNodePoolTaintRaw(r,s)).value()}async getNodePoolRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling getNodePool().');const o={},d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/node-pools/{id}";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"GET",headers:d,query:o},s);return new pt(m,g=>vb(g))}async getNodePool(r,s){return await(await this.getNodePoolRaw(r,s)).value()}async listNodePoolAnnotationsRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling listNodePoolAnnotations().');const o={},d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/node-pools/{id}/annotations";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"GET",headers:d,query:o},s);return new pt(m,g=>g.map(tg))}async listNodePoolAnnotations(r,s){return await(await this.listNodePoolAnnotationsRaw(r,s)).value()}async listNodePoolLabelsRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling listNodePoolLabels().');const o={},d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/node-pools/{id}/labels";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"GET",headers:d,query:o},s);return new pt(m,g=>g.map(sg))}async listNodePoolLabels(r,s){return await(await this.listNodePoolLabelsRaw(r,s)).value()}async listNodePoolServersRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling listNodePoolServers().');const o={},d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/node-pools/{id}/servers";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"GET",headers:d,query:o},s);return new pt(m,g=>g.map(Id))}async listNodePoolServers(r,s){return await(await this.listNodePoolServersRaw(r,s)).value()}async listNodePoolTaintsRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling listNodePoolTaints().');const o={},d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/node-pools/{id}/taints";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"GET",headers:d,query:o},s);return new pt(m,g=>g.map(rg))}async listNodePoolTaints(r,s){return await(await this.listNodePoolTaintsRaw(r,s)).value()}async listNodePoolsRaw(r,s){const o={};r.q!=null&&(o.q=r.q);const d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));const m=await this.request({path:"/node-pools",method:"GET",headers:d,query:o},s);return new pt(m,g=>g.map(vb))}async listNodePools(r={},s){return await(await this.listNodePoolsRaw(r,s)).value()}async updateNodePoolRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling updateNodePool().');if(r.dtoUpdateNodePoolRequest==null)throw new et("dtoUpdateNodePoolRequest",'Required parameter "dtoUpdateNodePoolRequest" was null or undefined when calling updateNodePool().');const o={},d={};d["Content-Type"]="application/json",r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/node-pools/{id}";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"PATCH",headers:d,query:o,body:JQ(r.dtoUpdateNodePoolRequest)},s);return new pt(m,g=>vb(g))}async updateNodePool(r,s){return await(await this.updateNodePoolRaw(r,s)).value()}}class Uee extends Gs{async addOrUpdateMemberRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling addOrUpdateMember().');if(r.handlersMemberUpsertReq==null)throw new et("handlersMemberUpsertReq",'Required parameter "handlersMemberUpsertReq" was null or undefined when calling addOrUpdateMember().');const o={},d={};d["Content-Type"]="application/json",this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/orgs/{id}/members";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"POST",headers:d,query:o,body:yee(r.handlersMemberUpsertReq)},s);return new pt(m,g=>LM(g))}async addOrUpdateMember(r,s){return await(await this.addOrUpdateMemberRaw(r,s)).value()}async createOrgRaw(r,s){if(r.handlersOrgCreateReq==null)throw new et("handlersOrgCreateReq",'Required parameter "handlersOrgCreateReq" was null or undefined when calling createOrg().');const o={},d={};d["Content-Type"]="application/json",this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));const m=await this.request({path:"/orgs",method:"POST",headers:d,query:o,body:xee(r.handlersOrgCreateReq)},s);return new pt(m,g=>xb(g))}async createOrg(r,s){return await(await this.createOrgRaw(r,s)).value()}async createOrgKeyRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling createOrgKey().');if(r.handlersOrgKeyCreateReq==null)throw new et("handlersOrgKeyCreateReq",'Required parameter "handlersOrgKeyCreateReq" was null or undefined when calling createOrgKey().');const o={},d={};d["Content-Type"]="application/json",this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/orgs/{id}/api-keys";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"POST",headers:d,query:o,body:wee(r.handlersOrgKeyCreateReq)},s);return new pt(m,g=>Eee(g))}async createOrgKey(r,s){return await(await this.createOrgKeyRaw(r,s)).value()}async deleteOrgRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling deleteOrg().');const o={},d={};this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/orgs/{id}";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"DELETE",headers:d,query:o},s);return new Ii(m)}async deleteOrg(r,s){await this.deleteOrgRaw(r,s)}async deleteOrgKeyRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling deleteOrgKey().');if(r.keyId==null)throw new et("keyId",'Required parameter "keyId" was null or undefined when calling deleteOrgKey().');const o={},d={};this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/orgs/{id}/api-keys/{key_id}";p=p.replace("{id}",encodeURIComponent(String(r.id))),p=p.replace("{key_id}",encodeURIComponent(String(r.keyId)));const m=await this.request({path:p,method:"DELETE",headers:d,query:o},s);return new Ii(m)}async deleteOrgKey(r,s){await this.deleteOrgKeyRaw(r,s)}async getOrgRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling getOrg().');const o={},d={};this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/orgs/{id}";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"GET",headers:d,query:o},s);return new pt(m,g=>xb(g))}async getOrg(r,s){return await(await this.getOrgRaw(r,s)).value()}async listMembersRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling listMembers().');const o={},d={};this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/orgs/{id}/members";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"GET",headers:d,query:o},s);return new pt(m,g=>g.map(LM))}async listMembers(r,s){return await(await this.listMembersRaw(r,s)).value()}async listMyOrgsRaw(r){const s={},o={};this.configuration&&this.configuration.apiKey&&(o.Authorization=await this.configuration.apiKey("Authorization"));const p=await this.request({path:"/orgs",method:"GET",headers:o,query:s},r);return new pt(p,m=>m.map(xb))}async listMyOrgs(r){return await(await this.listMyOrgsRaw(r)).value()}async listOrgKeysRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling listOrgKeys().');const o={},d={};this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/orgs/{id}/api-keys";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"GET",headers:d,query:o},s);return new pt(m,g=>g.map(Tee))}async listOrgKeys(r,s){return await(await this.listOrgKeysRaw(r,s)).value()}async removeMemberRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling removeMember().');if(r.userId==null)throw new et("userId",'Required parameter "userId" was null or undefined when calling removeMember().');const o={},d={};this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/orgs/{id}/members/{user_id}";p=p.replace("{id}",encodeURIComponent(String(r.id))),p=p.replace("{user_id}",encodeURIComponent(String(r.userId)));const m=await this.request({path:p,method:"DELETE",headers:d,query:o},s);return new Ii(m)}async removeMember(r,s){await this.removeMemberRaw(r,s)}async updateOrgRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling updateOrg().');if(r.handlersOrgUpdateReq==null)throw new et("handlersOrgUpdateReq",'Required parameter "handlersOrgUpdateReq" was null or undefined when calling updateOrg().');const o={},d={};d["Content-Type"]="application/json",this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/orgs/{id}";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"PATCH",headers:d,query:o,body:Cee(r.handlersOrgUpdateReq)},s);return new pt(m,g=>xb(g))}async updateOrg(r,s){return await(await this.updateOrgRaw(r,s)).value()}}class Kee extends Gs{async createServerRaw(r,s){if(r.dtoCreateServerRequest==null)throw new et("dtoCreateServerRequest",'Required parameter "dtoCreateServerRequest" was null or undefined when calling createServer().');const o={},d={};d["Content-Type"]="application/json",r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));const m=await this.request({path:"/servers",method:"POST",headers:d,query:o,body:mQ(r.dtoCreateServerRequest)},s);return new pt(m,g=>Id(g))}async createServer(r,s){return await(await this.createServerRaw(r,s)).value()}async deleteServerRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling deleteServer().');const o={},d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/servers/{id}";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"DELETE",headers:d,query:o},s);return new Ii(m)}async deleteServer(r,s){await this.deleteServerRaw(r,s)}async getServerRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling getServer().');const o={},d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/servers/{id}";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"GET",headers:d,query:o},s);return new pt(m,g=>Id(g))}async getServer(r,s){return await(await this.getServerRaw(r,s)).value()}async listServersRaw(r,s){const o={};r.status!=null&&(o.status=r.status),r.role!=null&&(o.role=r.role);const d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));const m=await this.request({path:"/servers",method:"GET",headers:d,query:o},s);return new pt(m,g=>g.map(Id))}async listServers(r={},s){return await(await this.listServersRaw(r,s)).value()}async resetServerHostKeyRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling resetServerHostKey().');const o={},d={};d["Content-Type"]="application/json",r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/servers/{id}/reset-hostkey";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"POST",headers:d,query:o,body:r.body},s);return new pt(m,g=>Id(g))}async resetServerHostKey(r,s){return await(await this.resetServerHostKeyRaw(r,s)).value()}async updateServerRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling updateServer().');if(r.dtoUpdateServerRequest==null)throw new et("dtoUpdateServerRequest",'Required parameter "dtoUpdateServerRequest" was null or undefined when calling updateServer().');const o={},d={};d["Content-Type"]="application/json",r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/servers/{id}";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"PATCH",headers:d,query:o,body:nee(r.dtoUpdateServerRequest)},s);return new pt(m,g=>Id(g))}async updateServer(r,s){return await(await this.updateServerRaw(r,s)).value()}}class Vee extends Gs{async createSSHKeyRaw(r,s){if(r.dtoCreateSSHRequest==null)throw new et("dtoCreateSSHRequest",'Required parameter "dtoCreateSSHRequest" was null or undefined when calling createSSHKey().');const o={},d={};d["Content-Type"]="application/json",r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));const m=await this.request({path:"/ssh",method:"POST",headers:d,query:o,body:pQ(r.dtoCreateSSHRequest)},s);return new pt(m,g=>IM(g))}async createSSHKey(r,s){return await(await this.createSSHKeyRaw(r,s)).value()}async deleteSSHKeyRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling deleteSSHKey().');const o={},d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/ssh/{id}";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"DELETE",headers:d,query:o},s);return new Ii(m)}async deleteSSHKey(r,s){await this.deleteSSHKeyRaw(r,s)}async downloadSSHKeyRaw(r,s){if(r.xOrgID==null)throw new et("xOrgID",'Required parameter "xOrgID" was null or undefined when calling downloadSSHKey().');if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling downloadSSHKey().');if(r.part==null)throw new et("part",'Required parameter "part" was null or undefined when calling downloadSSHKey().');const o={};r.part!=null&&(o.part=r.part);const d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/ssh/{id}/download";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"GET",headers:d,query:o},s);return this.isJsonMime(m.headers.get("content-type"))?new pt(m):new ec(m)}async downloadSSHKey(r,s){return await(await this.downloadSSHKeyRaw(r,s)).value()}async getSSHKeyRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling getSSHKey().');const o={};r.reveal!=null&&(o.reveal=r.reveal);const d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/ssh/{id}";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"GET",headers:d,query:o},s);return new pt(m,g=>aee(g))}async getSSHKey(r,s){return await(await this.getSSHKeyRaw(r,s)).value()}async listPublicSshKeysRaw(r,s){const o={},d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));const m=await this.request({path:"/ssh",method:"GET",headers:d,query:o},s);return new pt(m,g=>g.map(IM))}async listPublicSshKeys(r={},s){return await(await this.listPublicSshKeysRaw(r,s)).value()}}class Hee extends Gs{async createTaintRaw(r,s){if(r.dtoCreateTaintRequest==null)throw new et("dtoCreateTaintRequest",'Required parameter "dtoCreateTaintRequest" was null or undefined when calling createTaint().');const o={},d={};d["Content-Type"]="application/json",r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));const m=await this.request({path:"/taints",method:"POST",headers:d,query:o,body:yQ(r.dtoCreateTaintRequest)},s);return new pt(m,g=>rg(g))}async createTaint(r,s){return await(await this.createTaintRaw(r,s)).value()}async deleteTaintRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling deleteTaint().');const o={},d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/taints/{id}";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"DELETE",headers:d,query:o},s);return new Ii(m)}async deleteTaint(r,s){await this.deleteTaintRaw(r,s)}async getTaintRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling getTaint().');const o={},d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/taints/{id}";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"GET",headers:d,query:o},s);return new pt(m,g=>rg(g))}async getTaint(r,s){return await(await this.getTaintRaw(r,s)).value()}async listTaintsRaw(r,s){const o={};r.key!=null&&(o.key=r.key),r.value!=null&&(o.value=r.value),r.q!=null&&(o.q=r.q);const d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));const m=await this.request({path:"/taints",method:"GET",headers:d,query:o},s);return new pt(m,g=>g.map(rg))}async listTaints(r={},s){return await(await this.listTaintsRaw(r,s)).value()}async updateTaintRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling updateTaint().');if(r.dtoUpdateTaintRequest==null)throw new et("dtoUpdateTaintRequest",'Required parameter "dtoUpdateTaintRequest" was null or undefined when calling updateTaint().');const o={},d={};d["Content-Type"]="application/json",r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/taints/{id}";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"PATCH",headers:d,query:o,body:see(r.dtoUpdateTaintRequest)},s);return new pt(m,g=>rg(g))}async updateTaint(r,s){return await(await this.updateTaintRaw(r,s)).value()}}const q_="/api/v1";function Gee(){return new cz({basePath:q_,accessToken:async()=>Ks.getAccessToken()??"",middleware:[{async pre(e){const r=new Headers(e.init?.headers??{});e.init?.body!=null&&!(e.init.body instanceof FormData)&&!(e.init.body instanceof Blob)&&!r.has("Content-Type")&&r.set("Content-Type","application/json");const o=Ks.getAccessToken();o&&r.set("Authorization",`Bearer ${o}`);const d=Qo.get();return d&&r.set("X-Org-ID",d),{...e,init:{...e.init,headers:r}}},async post(e){return e.response}}]})}function Ui(e){return new e(Gee())}function Xee(){return Ui(Dee)}function Yee(){return Ui(Fee)}function Zee(){return Ui(qee)}function yC(){return Ui(Uee)}function Wee(){return Ui(Vee)}function Jee(){return Ui(Kee)}function Qee(){return Ui(Hee)}function ete(){return Ui(zee)}function tte(){return Ui($ee)}function nte(){return Ui(Nee)}function rte(){return Ui(Bee)}function ste(){return Ui(Mee)}function ite(){return Ui(Iee)}function ate(){return Ui(Lee)}function ote(){return Ui(Pee)}let VE=null;async function lte(){const e=Ks.get();if(!e?.refresh_token)return!1;try{const r=await fetch(`${q_}/auth/refresh`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({refresh_token:e.refresh_token})});if(!r.ok)return!1;const s=await r.json();return Ks.set(s),!0}catch{return!1}}async function qM(){return VE||(VE=lte().finally(()=>{VE=null})),VE}function cte(e){return e?.status===401||e?.cause?.status===401||e?.response?.status===401||e instanceof Response&&e.status===401}async function ut(e){Ks.willExpireSoon?.(30)&&await qM();try{return await e()}catch(r){if(!cte(r)||!await qM())throw r;return await e()}}const BM=Yee(),NR=Zee(),yp={getMe:()=>ut(async()=>await BM.getMe()),updateMe:e=>ut(async()=>await BM.updateMe({handlersUpdateMeRequest:e})),listKeys:()=>ut(async()=>await NR.listUserAPIKeys()),createKey:e=>ut(async()=>await NR.createUserAPIKey({handlersCreateUserKeyRequest:e})),deleteKey:e=>ut(async()=>(await NR.deleteUserAPIKey({id:e}),!0))},ute={footer:async()=>{const e=await fetch("/api/v1/version",{cache:"no-store"});if(!e.ok)throw new Error("failed to fetch version");return await e.json()}};function UM(e,r){if(typeof e=="function")return e(r);e!=null&&(e.current=r)}function zi(...e){return r=>{let s=!1;const o=e.map(d=>{const p=UM(d,r);return!s&&typeof p=="function"&&(s=!0),p});if(s)return()=>{for(let d=0;d<o.length;d++){const p=o[d];typeof p=="function"?p():UM(e[d],null)}}}}function Ln(...e){return R.useCallback(zi(...e),e)}var dte=Symbol.for("react.lazy"),$j=R_[" use ".trim().toString()];function hte(e){return typeof e=="object"&&e!==null&&"then"in e}function fz(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===dte&&"_payload"in e&&hte(e._payload)}function tw(e){const r=pte(e),s=R.forwardRef((o,d)=>{let{children:p,...m}=o;fz(p)&&typeof $j=="function"&&(p=$j(p._payload));const g=R.Children.toArray(p),b=g.find(mte);if(b){const S=b.props.children,E=g.map(A=>A===b?R.Children.count(S)>1?R.Children.only(null):R.isValidElement(S)?S.props.children:null:A);return u.jsx(r,{...m,ref:d,children:R.isValidElement(S)?R.cloneElement(S,void 0,E):null})}return u.jsx(r,{...m,ref:d,children:p})});return s.displayName=`${e}.Slot`,s}var Cg=tw("Slot");function pte(e){const r=R.forwardRef((s,o)=>{let{children:d,...p}=s;if(fz(d)&&typeof $j=="function"&&(d=$j(d._payload)),R.isValidElement(d)){const m=yte(d),g=gte(p,d.props);return d.type!==R.Fragment&&(g.ref=o?zi(o,m):m),R.cloneElement(d,g)}return R.Children.count(d)>1?R.Children.only(null):null});return r.displayName=`${e}.SlotClone`,r}var fte=Symbol("radix.slottable");function mte(e){return R.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===fte}function gte(e,r){const s={...r};for(const o in r){const d=e[o],p=r[o];/^on[A-Z]/.test(o)?d&&p?s[o]=(...g)=>{const b=p(...g);return d(...g),b}:d&&(s[o]=d):o==="style"?s[o]={...d,...p}:o==="className"&&(s[o]=[d,p].filter(Boolean).join(" "))}return{...e,...s}}function yte(e){let r=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning;return s?e.ref:(r=Object.getOwnPropertyDescriptor(e,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning,s?e.props.ref:e.props.ref||e.ref)}function mz(e){var r,s,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var d=e.length;for(r=0;r<d;r++)e[r]&&(s=mz(e[r]))&&(o&&(o+=" "),o+=s)}else for(s in e)e[s]&&(o&&(o+=" "),o+=s);return o}function gz(){for(var e,r,s=0,o="",d=arguments.length;s<d;s++)(e=arguments[s])&&(r=mz(e))&&(o&&(o+=" "),o+=r);return o}const KM=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,VM=gz,B_=(e,r)=>s=>{var o;if(r?.variants==null)return VM(e,s?.class,s?.className);const{variants:d,defaultVariants:p}=r,m=Object.keys(d).map(S=>{const E=s?.[S],A=p?.[S];if(E===null)return null;const k=KM(E)||KM(A);return d[S][k]}),g=s&&Object.entries(s).reduce((S,E)=>{let[A,k]=E;return k===void 0||(S[A]=k),S},{}),b=r==null||(o=r.compoundVariants)===null||o===void 0?void 0:o.reduce((S,E)=>{let{class:A,className:k,...T}=E;return Object.entries(T).every(M=>{let[I,q]=M;return Array.isArray(q)?q.includes({...p,...g}[I]):{...p,...g}[I]===q})?[...S,A,k]:S},[]);return VM(e,m,b,s?.class,s?.className)},vte=(e,r)=>{const s=new Array(e.length+r.length);for(let o=0;o<e.length;o++)s[o]=e[o];for(let o=0;o<r.length;o++)s[e.length+o]=r[o];return s},xte=(e,r)=>({classGroupId:e,validator:r}),yz=(e=new Map,r=null,s)=>({nextPart:e,validators:r,classGroupId:s}),Nj="-",HM=[],bte="arbitrary..",wte=e=>{const r=Ete(e),{conflictingClassGroups:s,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:m=>{if(m.startsWith("[")&&m.endsWith("]"))return Ste(m);const g=m.split(Nj),b=g[0]===""&&g.length>1?1:0;return vz(g,b,r)},getConflictingClassGroupIds:(m,g)=>{if(g){const b=o[m],S=s[m];return b?S?vte(S,b):b:S||HM}return s[m]||HM}}},vz=(e,r,s)=>{if(e.length-r===0)return s.classGroupId;const d=e[r],p=s.nextPart.get(d);if(p){const S=vz(e,r+1,p);if(S)return S}const m=s.validators;if(m===null)return;const g=r===0?e.join(Nj):e.slice(r).join(Nj),b=m.length;for(let S=0;S<b;S++){const E=m[S];if(E.validator(g))return E.classGroupId}},Ste=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const r=e.slice(1,-1),s=r.indexOf(":"),o=r.slice(0,s);return o?bte+o:void 0})(),Ete=e=>{const{theme:r,classGroups:s}=e;return jte(s,r)},jte=(e,r)=>{const s=yz();for(const o in e){const d=e[o];U_(d,s,o,r)}return s},U_=(e,r,s,o)=>{const d=e.length;for(let p=0;p<d;p++){const m=e[p];Cte(m,r,s,o)}},Cte=(e,r,s,o)=>{if(typeof e=="string"){Ate(e,r,s);return}if(typeof e=="function"){Ote(e,r,s,o);return}kte(e,r,s,o)},Ate=(e,r,s)=>{const o=e===""?r:xz(r,e);o.classGroupId=s},Ote=(e,r,s,o)=>{if(Rte(e)){U_(e(o),r,s,o);return}r.validators===null&&(r.validators=[]),r.validators.push(xte(s,e))},kte=(e,r,s,o)=>{const d=Object.entries(e),p=d.length;for(let m=0;m<p;m++){const[g,b]=d[m];U_(b,xz(r,g),s,o)}},xz=(e,r)=>{let s=e;const o=r.split(Nj),d=o.length;for(let p=0;p<d;p++){const m=o[p];let g=s.nextPart.get(m);g||(g=yz(),s.nextPart.set(m,g)),s=g}return s},Rte=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Tte=e=>{if(e<1)return{get:()=>{},set:()=>{}};let r=0,s=Object.create(null),o=Object.create(null);const d=(p,m)=>{s[p]=m,r++,r>e&&(r=0,o=s,s=Object.create(null))};return{get(p){let m=s[p];if(m!==void 0)return m;if((m=o[p])!==void 0)return d(p,m),m},set(p,m){p in s?s[p]=m:d(p,m)}}},NT="!",GM=":",_te=[],XM=(e,r,s,o,d)=>({modifiers:e,hasImportantModifier:r,baseClassName:s,maybePostfixModifierPosition:o,isExternal:d}),$te=e=>{const{prefix:r,experimentalParseClassName:s}=e;let o=d=>{const p=[];let m=0,g=0,b=0,S;const E=d.length;for(let I=0;I<E;I++){const q=d[I];if(m===0&&g===0){if(q===GM){p.push(d.slice(b,I)),b=I+1;continue}if(q==="/"){S=I;continue}}q==="["?m++:q==="]"?m--:q==="("?g++:q===")"&&g--}const A=p.length===0?d:d.slice(b);let k=A,T=!1;A.endsWith(NT)?(k=A.slice(0,-1),T=!0):A.startsWith(NT)&&(k=A.slice(1),T=!0);const M=S&&S>b?S-b:void 0;return XM(p,T,k,M)};if(r){const d=r+GM,p=o;o=m=>m.startsWith(d)?p(m.slice(d.length)):XM(_te,!1,m,void 0,!0)}if(s){const d=o;o=p=>s({className:p,parseClassName:d})}return o},Nte=e=>{const r=new Map;return e.orderSensitiveModifiers.forEach((s,o)=>{r.set(s,1e6+o)}),s=>{const o=[];let d=[];for(let p=0;p<s.length;p++){const m=s[p],g=m[0]==="[",b=r.has(m);g||b?(d.length>0&&(d.sort(),o.push(...d),d=[]),o.push(m)):d.push(m)}return d.length>0&&(d.sort(),o.push(...d)),o}},Dte=e=>({cache:Tte(e.cacheSize),parseClassName:$te(e),sortModifiers:Nte(e),...wte(e)}),Pte=/\s+/,Mte=(e,r)=>{const{parseClassName:s,getClassGroupId:o,getConflictingClassGroupIds:d,sortModifiers:p}=r,m=[],g=e.trim().split(Pte);let b="";for(let S=g.length-1;S>=0;S-=1){const E=g[S],{isExternal:A,modifiers:k,hasImportantModifier:T,baseClassName:M,maybePostfixModifierPosition:I}=s(E);if(A){b=E+(b.length>0?" "+b:b);continue}let q=!!I,G=o(q?M.substring(0,I):M);if(!G){if(!q){b=E+(b.length>0?" "+b:b);continue}if(G=o(M),!G){b=E+(b.length>0?" "+b:b);continue}q=!1}const K=k.length===0?"":k.length===1?k[0]:p(k).join(":"),X=T?K+NT:K,z=X+G;if(m.indexOf(z)>-1)continue;m.push(z);const ee=d(G,q);for(let oe=0;oe<ee.length;++oe){const Q=ee[oe];m.push(X+Q)}b=E+(b.length>0?" "+b:b)}return b},Ite=(...e)=>{let r=0,s,o,d="";for(;r<e.length;)(s=e[r++])&&(o=bz(s))&&(d&&(d+=" "),d+=o);return d},bz=e=>{if(typeof e=="string")return e;let r,s="";for(let o=0;o<e.length;o++)e[o]&&(r=bz(e[o]))&&(s&&(s+=" "),s+=r);return s},zte=(e,...r)=>{let s,o,d,p;const m=b=>{const S=r.reduce((E,A)=>A(E),e());return s=Dte(S),o=s.cache.get,d=s.cache.set,p=g,g(b)},g=b=>{const S=o(b);if(S)return S;const E=Mte(b,s);return d(b,E),E};return p=m,(...b)=>p(Ite(...b))},Lte=[],ws=e=>{const r=s=>s[e]||Lte;return r.isThemeGetter=!0,r},wz=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Sz=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Fte=/^\d+\/\d+$/,qte=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Bte=/\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$/,Ute=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Kte=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Vte=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Km=e=>Fte.test(e),jn=e=>!!e&&!Number.isNaN(Number(e)),Nd=e=>!!e&&Number.isInteger(Number(e)),DR=e=>e.endsWith("%")&&jn(e.slice(0,-1)),lu=e=>qte.test(e),Hte=()=>!0,Gte=e=>Bte.test(e)&&!Ute.test(e),Ez=()=>!1,Xte=e=>Kte.test(e),Yte=e=>Vte.test(e),Zte=e=>!Mt(e)&&!It(e),Wte=e=>Ag(e,Az,Ez),Mt=e=>wz.test(e),fp=e=>Ag(e,Oz,Gte),PR=e=>Ag(e,nne,jn),YM=e=>Ag(e,jz,Ez),Jte=e=>Ag(e,Cz,Yte),HE=e=>Ag(e,kz,Xte),It=e=>Sz.test(e),rb=e=>Og(e,Oz),Qte=e=>Og(e,rne),ZM=e=>Og(e,jz),ene=e=>Og(e,Az),tne=e=>Og(e,Cz),GE=e=>Og(e,kz,!0),Ag=(e,r,s)=>{const o=wz.exec(e);return o?o[1]?r(o[1]):s(o[2]):!1},Og=(e,r,s=!1)=>{const o=Sz.exec(e);return o?o[1]?r(o[1]):s:!1},jz=e=>e==="position"||e==="percentage",Cz=e=>e==="image"||e==="url",Az=e=>e==="length"||e==="size"||e==="bg-size",Oz=e=>e==="length",nne=e=>e==="number",rne=e=>e==="family-name",kz=e=>e==="shadow",sne=()=>{const e=ws("color"),r=ws("font"),s=ws("text"),o=ws("font-weight"),d=ws("tracking"),p=ws("leading"),m=ws("breakpoint"),g=ws("container"),b=ws("spacing"),S=ws("radius"),E=ws("shadow"),A=ws("inset-shadow"),k=ws("text-shadow"),T=ws("drop-shadow"),M=ws("blur"),I=ws("perspective"),q=ws("aspect"),G=ws("ease"),K=ws("animate"),X=()=>["auto","avoid","all","avoid-page","page","left","right","column"],z=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],ee=()=>[...z(),It,Mt],oe=()=>["auto","hidden","clip","visible","scroll"],Q=()=>["auto","contain","none"],ne=()=>[It,Mt,b],de=()=>[Km,"full","auto",...ne()],Ce=()=>[Nd,"none","subgrid",It,Mt],xe=()=>["auto",{span:["full",Nd,It,Mt]},Nd,It,Mt],le=()=>[Nd,"auto",It,Mt],be=()=>["auto","min","max","fr",It,Mt],je=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Ke=()=>["start","end","center","stretch","center-safe","end-safe"],ce=()=>["auto",...ne()],re=()=>[Km,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...ne()],ue=()=>[e,It,Mt],_e=()=>[...z(),ZM,YM,{position:[It,Mt]}],fe=()=>["no-repeat",{repeat:["","x","y","space","round"]}],He=()=>["auto","cover","contain",ene,Wte,{size:[It,Mt]}],Oe=()=>[DR,rb,fp],ke=()=>["","none","full",S,It,Mt],Ve=()=>["",jn,rb,fp],ie=()=>["solid","dashed","dotted","double"],Ne=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ze=()=>[jn,DR,ZM,YM],tt=()=>["","none",M,It,Mt],ft=()=>["none",jn,It,Mt],Ot=()=>["none",jn,It,Mt],Ft=()=>[jn,It,Mt],kt=()=>[Km,"full",...ne()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[lu],breakpoint:[lu],color:[Hte],container:[lu],"drop-shadow":[lu],ease:["in","out","in-out"],font:[Zte],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[lu],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[lu],shadow:[lu],spacing:["px",jn],text:[lu],"text-shadow":[lu],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Km,Mt,It,q]}],container:["container"],columns:[{columns:[jn,Mt,It,g]}],"break-after":[{"break-after":X()}],"break-before":[{"break-before":X()}],"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:ee()}],overflow:[{overflow:oe()}],"overflow-x":[{"overflow-x":oe()}],"overflow-y":[{"overflow-y":oe()}],overscroll:[{overscroll:Q()}],"overscroll-x":[{"overscroll-x":Q()}],"overscroll-y":[{"overscroll-y":Q()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:de()}],"inset-x":[{"inset-x":de()}],"inset-y":[{"inset-y":de()}],start:[{start:de()}],end:[{end:de()}],top:[{top:de()}],right:[{right:de()}],bottom:[{bottom:de()}],left:[{left:de()}],visibility:["visible","invisible","collapse"],z:[{z:[Nd,"auto",It,Mt]}],basis:[{basis:[Km,"full","auto",g,...ne()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[jn,Km,"auto","initial","none",Mt]}],grow:[{grow:["",jn,It,Mt]}],shrink:[{shrink:["",jn,It,Mt]}],order:[{order:[Nd,"first","last","none",It,Mt]}],"grid-cols":[{"grid-cols":Ce()}],"col-start-end":[{col:xe()}],"col-start":[{"col-start":le()}],"col-end":[{"col-end":le()}],"grid-rows":[{"grid-rows":Ce()}],"row-start-end":[{row:xe()}],"row-start":[{"row-start":le()}],"row-end":[{"row-end":le()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":be()}],"auto-rows":[{"auto-rows":be()}],gap:[{gap:ne()}],"gap-x":[{"gap-x":ne()}],"gap-y":[{"gap-y":ne()}],"justify-content":[{justify:[...je(),"normal"]}],"justify-items":[{"justify-items":[...Ke(),"normal"]}],"justify-self":[{"justify-self":["auto",...Ke()]}],"align-content":[{content:["normal",...je()]}],"align-items":[{items:[...Ke(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Ke(),{baseline:["","last"]}]}],"place-content":[{"place-content":je()}],"place-items":[{"place-items":[...Ke(),"baseline"]}],"place-self":[{"place-self":["auto",...Ke()]}],p:[{p:ne()}],px:[{px:ne()}],py:[{py:ne()}],ps:[{ps:ne()}],pe:[{pe:ne()}],pt:[{pt:ne()}],pr:[{pr:ne()}],pb:[{pb:ne()}],pl:[{pl:ne()}],m:[{m:ce()}],mx:[{mx:ce()}],my:[{my:ce()}],ms:[{ms:ce()}],me:[{me:ce()}],mt:[{mt:ce()}],mr:[{mr:ce()}],mb:[{mb:ce()}],ml:[{ml:ce()}],"space-x":[{"space-x":ne()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":ne()}],"space-y-reverse":["space-y-reverse"],size:[{size:re()}],w:[{w:[g,"screen",...re()]}],"min-w":[{"min-w":[g,"screen","none",...re()]}],"max-w":[{"max-w":[g,"screen","none","prose",{screen:[m]},...re()]}],h:[{h:["screen","lh",...re()]}],"min-h":[{"min-h":["screen","lh","none",...re()]}],"max-h":[{"max-h":["screen","lh",...re()]}],"font-size":[{text:["base",s,rb,fp]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,It,PR]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",DR,Mt]}],"font-family":[{font:[Qte,Mt,r]}],"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:[d,It,Mt]}],"line-clamp":[{"line-clamp":[jn,"none",It,PR]}],leading:[{leading:[p,...ne()]}],"list-image":[{"list-image":["none",It,Mt]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",It,Mt]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:ue()}],"text-color":[{text:ue()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ie(),"wavy"]}],"text-decoration-thickness":[{decoration:[jn,"from-font","auto",It,fp]}],"text-decoration-color":[{decoration:ue()}],"underline-offset":[{"underline-offset":[jn,"auto",It,Mt]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:ne()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",It,Mt]}],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",It,Mt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:_e()}],"bg-repeat":[{bg:fe()}],"bg-size":[{bg:He()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Nd,It,Mt],radial:["",It,Mt],conic:[Nd,It,Mt]},tne,Jte]}],"bg-color":[{bg:ue()}],"gradient-from-pos":[{from:Oe()}],"gradient-via-pos":[{via:Oe()}],"gradient-to-pos":[{to:Oe()}],"gradient-from":[{from:ue()}],"gradient-via":[{via:ue()}],"gradient-to":[{to:ue()}],rounded:[{rounded:ke()}],"rounded-s":[{"rounded-s":ke()}],"rounded-e":[{"rounded-e":ke()}],"rounded-t":[{"rounded-t":ke()}],"rounded-r":[{"rounded-r":ke()}],"rounded-b":[{"rounded-b":ke()}],"rounded-l":[{"rounded-l":ke()}],"rounded-ss":[{"rounded-ss":ke()}],"rounded-se":[{"rounded-se":ke()}],"rounded-ee":[{"rounded-ee":ke()}],"rounded-es":[{"rounded-es":ke()}],"rounded-tl":[{"rounded-tl":ke()}],"rounded-tr":[{"rounded-tr":ke()}],"rounded-br":[{"rounded-br":ke()}],"rounded-bl":[{"rounded-bl":ke()}],"border-w":[{border:Ve()}],"border-w-x":[{"border-x":Ve()}],"border-w-y":[{"border-y":Ve()}],"border-w-s":[{"border-s":Ve()}],"border-w-e":[{"border-e":Ve()}],"border-w-t":[{"border-t":Ve()}],"border-w-r":[{"border-r":Ve()}],"border-w-b":[{"border-b":Ve()}],"border-w-l":[{"border-l":Ve()}],"divide-x":[{"divide-x":Ve()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Ve()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ie(),"hidden","none"]}],"divide-style":[{divide:[...ie(),"hidden","none"]}],"border-color":[{border:ue()}],"border-color-x":[{"border-x":ue()}],"border-color-y":[{"border-y":ue()}],"border-color-s":[{"border-s":ue()}],"border-color-e":[{"border-e":ue()}],"border-color-t":[{"border-t":ue()}],"border-color-r":[{"border-r":ue()}],"border-color-b":[{"border-b":ue()}],"border-color-l":[{"border-l":ue()}],"divide-color":[{divide:ue()}],"outline-style":[{outline:[...ie(),"none","hidden"]}],"outline-offset":[{"outline-offset":[jn,It,Mt]}],"outline-w":[{outline:["",jn,rb,fp]}],"outline-color":[{outline:ue()}],shadow:[{shadow:["","none",E,GE,HE]}],"shadow-color":[{shadow:ue()}],"inset-shadow":[{"inset-shadow":["none",A,GE,HE]}],"inset-shadow-color":[{"inset-shadow":ue()}],"ring-w":[{ring:Ve()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:ue()}],"ring-offset-w":[{"ring-offset":[jn,fp]}],"ring-offset-color":[{"ring-offset":ue()}],"inset-ring-w":[{"inset-ring":Ve()}],"inset-ring-color":[{"inset-ring":ue()}],"text-shadow":[{"text-shadow":["none",k,GE,HE]}],"text-shadow-color":[{"text-shadow":ue()}],opacity:[{opacity:[jn,It,Mt]}],"mix-blend":[{"mix-blend":[...Ne(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Ne()}],"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":[jn]}],"mask-image-linear-from-pos":[{"mask-linear-from":ze()}],"mask-image-linear-to-pos":[{"mask-linear-to":ze()}],"mask-image-linear-from-color":[{"mask-linear-from":ue()}],"mask-image-linear-to-color":[{"mask-linear-to":ue()}],"mask-image-t-from-pos":[{"mask-t-from":ze()}],"mask-image-t-to-pos":[{"mask-t-to":ze()}],"mask-image-t-from-color":[{"mask-t-from":ue()}],"mask-image-t-to-color":[{"mask-t-to":ue()}],"mask-image-r-from-pos":[{"mask-r-from":ze()}],"mask-image-r-to-pos":[{"mask-r-to":ze()}],"mask-image-r-from-color":[{"mask-r-from":ue()}],"mask-image-r-to-color":[{"mask-r-to":ue()}],"mask-image-b-from-pos":[{"mask-b-from":ze()}],"mask-image-b-to-pos":[{"mask-b-to":ze()}],"mask-image-b-from-color":[{"mask-b-from":ue()}],"mask-image-b-to-color":[{"mask-b-to":ue()}],"mask-image-l-from-pos":[{"mask-l-from":ze()}],"mask-image-l-to-pos":[{"mask-l-to":ze()}],"mask-image-l-from-color":[{"mask-l-from":ue()}],"mask-image-l-to-color":[{"mask-l-to":ue()}],"mask-image-x-from-pos":[{"mask-x-from":ze()}],"mask-image-x-to-pos":[{"mask-x-to":ze()}],"mask-image-x-from-color":[{"mask-x-from":ue()}],"mask-image-x-to-color":[{"mask-x-to":ue()}],"mask-image-y-from-pos":[{"mask-y-from":ze()}],"mask-image-y-to-pos":[{"mask-y-to":ze()}],"mask-image-y-from-color":[{"mask-y-from":ue()}],"mask-image-y-to-color":[{"mask-y-to":ue()}],"mask-image-radial":[{"mask-radial":[It,Mt]}],"mask-image-radial-from-pos":[{"mask-radial-from":ze()}],"mask-image-radial-to-pos":[{"mask-radial-to":ze()}],"mask-image-radial-from-color":[{"mask-radial-from":ue()}],"mask-image-radial-to-color":[{"mask-radial-to":ue()}],"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":z()}],"mask-image-conic-pos":[{"mask-conic":[jn]}],"mask-image-conic-from-pos":[{"mask-conic-from":ze()}],"mask-image-conic-to-pos":[{"mask-conic-to":ze()}],"mask-image-conic-from-color":[{"mask-conic-from":ue()}],"mask-image-conic-to-color":[{"mask-conic-to":ue()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:_e()}],"mask-repeat":[{mask:fe()}],"mask-size":[{mask:He()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",It,Mt]}],filter:[{filter:["","none",It,Mt]}],blur:[{blur:tt()}],brightness:[{brightness:[jn,It,Mt]}],contrast:[{contrast:[jn,It,Mt]}],"drop-shadow":[{"drop-shadow":["","none",T,GE,HE]}],"drop-shadow-color":[{"drop-shadow":ue()}],grayscale:[{grayscale:["",jn,It,Mt]}],"hue-rotate":[{"hue-rotate":[jn,It,Mt]}],invert:[{invert:["",jn,It,Mt]}],saturate:[{saturate:[jn,It,Mt]}],sepia:[{sepia:["",jn,It,Mt]}],"backdrop-filter":[{"backdrop-filter":["","none",It,Mt]}],"backdrop-blur":[{"backdrop-blur":tt()}],"backdrop-brightness":[{"backdrop-brightness":[jn,It,Mt]}],"backdrop-contrast":[{"backdrop-contrast":[jn,It,Mt]}],"backdrop-grayscale":[{"backdrop-grayscale":["",jn,It,Mt]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[jn,It,Mt]}],"backdrop-invert":[{"backdrop-invert":["",jn,It,Mt]}],"backdrop-opacity":[{"backdrop-opacity":[jn,It,Mt]}],"backdrop-saturate":[{"backdrop-saturate":[jn,It,Mt]}],"backdrop-sepia":[{"backdrop-sepia":["",jn,It,Mt]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":ne()}],"border-spacing-x":[{"border-spacing-x":ne()}],"border-spacing-y":[{"border-spacing-y":ne()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",It,Mt]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[jn,"initial",It,Mt]}],ease:[{ease:["linear","initial",G,It,Mt]}],delay:[{delay:[jn,It,Mt]}],animate:[{animate:["none",K,It,Mt]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[I,It,Mt]}],"perspective-origin":[{"perspective-origin":ee()}],rotate:[{rotate:ft()}],"rotate-x":[{"rotate-x":ft()}],"rotate-y":[{"rotate-y":ft()}],"rotate-z":[{"rotate-z":ft()}],scale:[{scale:Ot()}],"scale-x":[{"scale-x":Ot()}],"scale-y":[{"scale-y":Ot()}],"scale-z":[{"scale-z":Ot()}],"scale-3d":["scale-3d"],skew:[{skew:Ft()}],"skew-x":[{"skew-x":Ft()}],"skew-y":[{"skew-y":Ft()}],transform:[{transform:[It,Mt,"","none","gpu","cpu"]}],"transform-origin":[{origin:ee()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:kt()}],"translate-x":[{"translate-x":kt()}],"translate-y":[{"translate-y":kt()}],"translate-z":[{"translate-z":kt()}],"translate-none":["translate-none"],accent:[{accent:ue()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:ue()}],"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",It,Mt]}],"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":ne()}],"scroll-mx":[{"scroll-mx":ne()}],"scroll-my":[{"scroll-my":ne()}],"scroll-ms":[{"scroll-ms":ne()}],"scroll-me":[{"scroll-me":ne()}],"scroll-mt":[{"scroll-mt":ne()}],"scroll-mr":[{"scroll-mr":ne()}],"scroll-mb":[{"scroll-mb":ne()}],"scroll-ml":[{"scroll-ml":ne()}],"scroll-p":[{"scroll-p":ne()}],"scroll-px":[{"scroll-px":ne()}],"scroll-py":[{"scroll-py":ne()}],"scroll-ps":[{"scroll-ps":ne()}],"scroll-pe":[{"scroll-pe":ne()}],"scroll-pt":[{"scroll-pt":ne()}],"scroll-pr":[{"scroll-pr":ne()}],"scroll-pb":[{"scroll-pb":ne()}],"scroll-pl":[{"scroll-pl":ne()}],"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",It,Mt]}],fill:[{fill:["none",...ue()]}],"stroke-w":[{stroke:[jn,rb,fp,PR]}],stroke:[{stroke:["none",...ue()]}],"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"]}},ine=zte(sne);function ht(...e){return ine(gz(e))}function el(e,r=24){return!e||e.length<=r*2+3?e:`${e.slice(0,r)}…${e.slice(-r)}`}const ane=B_("inline-flex items-center justify-center rounded-full 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-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function rs({className:e,variant:r,asChild:s=!1,...o}){const d=s?Cg:"span";return u.jsx(d,{"data-slot":"badge",className:ht(ane({variant:r}),e),...o})}const K_=B_("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-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",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function Fe({className:e,variant:r,size:s,asChild:o=!1,...d}){const p=o?Cg:"button";return u.jsx(p,{"data-slot":"button",className:ht(K_({variant:r,size:s,className:e})),...d})}var one=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],lne=one.reduce((e,r)=>{const s=tw(`Primitive.${r}`),o=R.forwardRef((d,p)=>{const{asChild:m,...g}=d,b=m?s:r;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(b,{...g,ref:p})});return o.displayName=`Primitive.${r}`,{...e,[r]:o}},{}),cne="Separator",WM="horizontal",une=["horizontal","vertical"],Rz=R.forwardRef((e,r)=>{const{decorative:s,orientation:o=WM,...d}=e,p=dne(o)?o:WM,g=s?{role:"none"}:{"aria-orientation":p==="vertical"?p:void 0,role:"separator"};return u.jsx(lne.div,{"data-orientation":p,...g,...d,ref:r})});Rz.displayName=cne;function dne(e){return une.includes(e)}var hne=Rz;function bb({className:e,orientation:r="horizontal",decorative:s=!0,...o}){return u.jsx(hne,{"data-slot":"separator",decorative:s,orientation:r,className:ht("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),...o})}function $t(e,r,{checkForDefaultPrevented:s=!0}={}){return function(d){if(e?.(d),s===!1||!d.defaultPrevented)return r?.(d)}}function pne(e,r){const s=R.createContext(r),o=p=>{const{children:m,...g}=p,b=R.useMemo(()=>g,Object.values(g));return u.jsx(s.Provider,{value:b,children:m})};o.displayName=e+"Provider";function d(p){const m=R.useContext(s);if(m)return m;if(r!==void 0)return r;throw new Error(`\`${p}\` must be used within \`${e}\``)}return[o,d]}function al(e,r=[]){let s=[];function o(p,m){const g=R.createContext(m),b=s.length;s=[...s,m];const S=A=>{const{scope:k,children:T,...M}=A,I=k?.[e]?.[b]||g,q=R.useMemo(()=>M,Object.values(M));return u.jsx(I.Provider,{value:q,children:T})};S.displayName=p+"Provider";function E(A,k){const T=k?.[e]?.[b]||g,M=R.useContext(T);if(M)return M;if(m!==void 0)return m;throw new Error(`\`${A}\` must be used within \`${p}\``)}return[S,E]}const d=()=>{const p=s.map(m=>R.createContext(m));return function(g){const b=g?.[e]||p;return R.useMemo(()=>({[`__scope${e}`]:{...g,[e]:b}}),[g,b])}};return d.scopeName=e,[o,fne(d,...r)]}function fne(...e){const r=e[0];if(e.length===1)return r;const s=()=>{const o=e.map(d=>({useScope:d(),scopeName:d.scopeName}));return function(p){const m=o.reduce((g,{useScope:b,scopeName:S})=>{const A=b(p)[`__scope${S}`];return{...g,...A}},{});return R.useMemo(()=>({[`__scope${r.scopeName}`]:m}),[m])}};return s.scopeName=r.scopeName,s}function mne(e){const r=gne(e),s=R.forwardRef((o,d)=>{const{children:p,...m}=o,g=R.Children.toArray(p),b=g.find(vne);if(b){const S=b.props.children,E=g.map(A=>A===b?R.Children.count(S)>1?R.Children.only(null):R.isValidElement(S)?S.props.children:null:A);return u.jsx(r,{...m,ref:d,children:R.isValidElement(S)?R.cloneElement(S,void 0,E):null})}return u.jsx(r,{...m,ref:d,children:p})});return s.displayName=`${e}.Slot`,s}function gne(e){const r=R.forwardRef((s,o)=>{const{children:d,...p}=s;if(R.isValidElement(d)){const m=bne(d),g=xne(p,d.props);return d.type!==R.Fragment&&(g.ref=o?zi(o,m):m),R.cloneElement(d,g)}return R.Children.count(d)>1?R.Children.only(null):null});return r.displayName=`${e}.SlotClone`,r}var yne=Symbol("radix.slottable");function vne(e){return R.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===yne}function xne(e,r){const s={...r};for(const o in r){const d=e[o],p=r[o];/^on[A-Z]/.test(o)?d&&p?s[o]=(...g)=>{const b=p(...g);return d(...g),b}:d&&(s[o]=d):o==="style"?s[o]={...d,...p}:o==="className"&&(s[o]=[d,p].filter(Boolean).join(" "))}return{...e,...s}}function bne(e){let r=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning;return s?e.ref:(r=Object.getOwnPropertyDescriptor(e,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning,s?e.props.ref:e.props.ref||e.ref)}var wne=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Cn=wne.reduce((e,r)=>{const s=mne(`Primitive.${r}`),o=R.forwardRef((d,p)=>{const{asChild:m,...g}=d,b=m?s:r;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(b,{...g,ref:p})});return o.displayName=`Primitive.${r}`,{...e,[r]:o}},{});function Tz(e,r){e&&mC.flushSync(()=>e.dispatchEvent(r))}function tl(e){const r=R.useRef(e);return R.useEffect(()=>{r.current=e}),R.useMemo(()=>(...s)=>r.current?.(...s),[])}function Sne(e,r=globalThis?.document){const s=tl(e);R.useEffect(()=>{const o=d=>{d.key==="Escape"&&s(d)};return r.addEventListener("keydown",o,{capture:!0}),()=>r.removeEventListener("keydown",o,{capture:!0})},[s,r])}var Ene="DismissableLayer",DT="dismissableLayer.update",jne="dismissableLayer.pointerDownOutside",Cne="dismissableLayer.focusOutside",JM,_z=R.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),kg=R.forwardRef((e,r)=>{const{disableOutsidePointerEvents:s=!1,onEscapeKeyDown:o,onPointerDownOutside:d,onFocusOutside:p,onInteractOutside:m,onDismiss:g,...b}=e,S=R.useContext(_z),[E,A]=R.useState(null),k=E?.ownerDocument??globalThis?.document,[,T]=R.useState({}),M=Ln(r,Q=>A(Q)),I=Array.from(S.layers),[q]=[...S.layersWithOutsidePointerEventsDisabled].slice(-1),G=I.indexOf(q),K=E?I.indexOf(E):-1,X=S.layersWithOutsidePointerEventsDisabled.size>0,z=K>=G,ee=kne(Q=>{const ne=Q.target,de=[...S.branches].some(Ce=>Ce.contains(ne));!z||de||(d?.(Q),m?.(Q),Q.defaultPrevented||g?.())},k),oe=Rne(Q=>{const ne=Q.target;[...S.branches].some(Ce=>Ce.contains(ne))||(p?.(Q),m?.(Q),Q.defaultPrevented||g?.())},k);return Sne(Q=>{K===S.layers.size-1&&(o?.(Q),!Q.defaultPrevented&&g&&(Q.preventDefault(),g()))},k),R.useEffect(()=>{if(E)return s&&(S.layersWithOutsidePointerEventsDisabled.size===0&&(JM=k.body.style.pointerEvents,k.body.style.pointerEvents="none"),S.layersWithOutsidePointerEventsDisabled.add(E)),S.layers.add(E),QM(),()=>{s&&S.layersWithOutsidePointerEventsDisabled.size===1&&(k.body.style.pointerEvents=JM)}},[E,k,s,S]),R.useEffect(()=>()=>{E&&(S.layers.delete(E),S.layersWithOutsidePointerEventsDisabled.delete(E),QM())},[E,S]),R.useEffect(()=>{const Q=()=>T({});return document.addEventListener(DT,Q),()=>document.removeEventListener(DT,Q)},[]),u.jsx(Cn.div,{...b,ref:M,style:{pointerEvents:X?z?"auto":"none":void 0,...e.style},onFocusCapture:$t(e.onFocusCapture,oe.onFocusCapture),onBlurCapture:$t(e.onBlurCapture,oe.onBlurCapture),onPointerDownCapture:$t(e.onPointerDownCapture,ee.onPointerDownCapture)})});kg.displayName=Ene;var Ane="DismissableLayerBranch",One=R.forwardRef((e,r)=>{const s=R.useContext(_z),o=R.useRef(null),d=Ln(r,o);return R.useEffect(()=>{const p=o.current;if(p)return s.branches.add(p),()=>{s.branches.delete(p)}},[s.branches]),u.jsx(Cn.div,{...e,ref:d})});One.displayName=Ane;function kne(e,r=globalThis?.document){const s=tl(e),o=R.useRef(!1),d=R.useRef(()=>{});return R.useEffect(()=>{const p=g=>{if(g.target&&!o.current){let b=function(){$z(jne,s,S,{discrete:!0})};const S={originalEvent:g};g.pointerType==="touch"?(r.removeEventListener("click",d.current),d.current=b,r.addEventListener("click",d.current,{once:!0})):b()}else r.removeEventListener("click",d.current);o.current=!1},m=window.setTimeout(()=>{r.addEventListener("pointerdown",p)},0);return()=>{window.clearTimeout(m),r.removeEventListener("pointerdown",p),r.removeEventListener("click",d.current)}},[r,s]),{onPointerDownCapture:()=>o.current=!0}}function Rne(e,r=globalThis?.document){const s=tl(e),o=R.useRef(!1);return R.useEffect(()=>{const d=p=>{p.target&&!o.current&&$z(Cne,s,{originalEvent:p},{discrete:!1})};return r.addEventListener("focusin",d),()=>r.removeEventListener("focusin",d)},[r,s]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function QM(){const e=new CustomEvent(DT);document.dispatchEvent(e)}function $z(e,r,s,{discrete:o}){const d=s.originalEvent.target,p=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:s});r&&d.addEventListener(e,r,{once:!0}),o?Tz(d,p):d.dispatchEvent(p)}var As=globalThis?.document?R.useLayoutEffect:()=>{},Tne=R_[" useId ".trim().toString()]||(()=>{}),_ne=0;function Vs(e){const[r,s]=R.useState(Tne());return As(()=>{s(o=>o??String(_ne++))},[e]),r?`radix-${r}`:""}const $ne=["top","right","bottom","left"],Ld=Math.min,_a=Math.max,Dj=Math.round,XE=Math.floor,sc=e=>({x:e,y:e}),Nne={left:"right",right:"left",bottom:"top",top:"bottom"},Dne={start:"end",end:"start"};function PT(e,r,s){return _a(e,Ld(r,s))}function fu(e,r){return typeof e=="function"?e(r):e}function mu(e){return e.split("-")[0]}function Rg(e){return e.split("-")[1]}function V_(e){return e==="x"?"y":"x"}function H_(e){return e==="y"?"height":"width"}const Pne=new Set(["top","bottom"]);function rc(e){return Pne.has(mu(e))?"y":"x"}function G_(e){return V_(rc(e))}function Mne(e,r,s){s===void 0&&(s=!1);const o=Rg(e),d=G_(e),p=H_(d);let m=d==="x"?o===(s?"end":"start")?"right":"left":o==="start"?"bottom":"top";return r.reference[p]>r.floating[p]&&(m=Pj(m)),[m,Pj(m)]}function Ine(e){const r=Pj(e);return[MT(e),r,MT(r)]}function MT(e){return e.replace(/start|end/g,r=>Dne[r])}const eI=["left","right"],tI=["right","left"],zne=["top","bottom"],Lne=["bottom","top"];function Fne(e,r,s){switch(e){case"top":case"bottom":return s?r?tI:eI:r?eI:tI;case"left":case"right":return r?zne:Lne;default:return[]}}function qne(e,r,s,o){const d=Rg(e);let p=Fne(mu(e),s==="start",o);return d&&(p=p.map(m=>m+"-"+d),r&&(p=p.concat(p.map(MT)))),p}function Pj(e){return e.replace(/left|right|bottom|top/g,r=>Nne[r])}function Bne(e){return{top:0,right:0,bottom:0,left:0,...e}}function Nz(e){return typeof e!="number"?Bne(e):{top:e,right:e,bottom:e,left:e}}function Mj(e){const{x:r,y:s,width:o,height:d}=e;return{width:o,height:d,top:s,left:r,right:r+o,bottom:s+d,x:r,y:s}}function nI(e,r,s){let{reference:o,floating:d}=e;const p=rc(r),m=G_(r),g=H_(m),b=mu(r),S=p==="y",E=o.x+o.width/2-d.width/2,A=o.y+o.height/2-d.height/2,k=o[g]/2-d[g]/2;let T;switch(b){case"top":T={x:E,y:o.y-d.height};break;case"bottom":T={x:E,y:o.y+o.height};break;case"right":T={x:o.x+o.width,y:A};break;case"left":T={x:o.x-d.width,y:A};break;default:T={x:o.x,y:o.y}}switch(Rg(r)){case"start":T[m]-=k*(s&&S?-1:1);break;case"end":T[m]+=k*(s&&S?-1:1);break}return T}const Une=async(e,r,s)=>{const{placement:o="bottom",strategy:d="absolute",middleware:p=[],platform:m}=s,g=p.filter(Boolean),b=await(m.isRTL==null?void 0:m.isRTL(r));let S=await m.getElementRects({reference:e,floating:r,strategy:d}),{x:E,y:A}=nI(S,o,b),k=o,T={},M=0;for(let I=0;I<g.length;I++){const{name:q,fn:G}=g[I],{x:K,y:X,data:z,reset:ee}=await G({x:E,y:A,initialPlacement:o,placement:k,strategy:d,middlewareData:T,rects:S,platform:m,elements:{reference:e,floating:r}});E=K??E,A=X??A,T={...T,[q]:{...T[q],...z}},ee&&M<=50&&(M++,typeof ee=="object"&&(ee.placement&&(k=ee.placement),ee.rects&&(S=ee.rects===!0?await m.getElementRects({reference:e,floating:r,strategy:d}):ee.rects),{x:E,y:A}=nI(S,k,b)),I=-1)}return{x:E,y:A,placement:k,strategy:d,middlewareData:T}};async function Lb(e,r){var s;r===void 0&&(r={});const{x:o,y:d,platform:p,rects:m,elements:g,strategy:b}=e,{boundary:S="clippingAncestors",rootBoundary:E="viewport",elementContext:A="floating",altBoundary:k=!1,padding:T=0}=fu(r,e),M=Nz(T),q=g[k?A==="floating"?"reference":"floating":A],G=Mj(await p.getClippingRect({element:(s=await(p.isElement==null?void 0:p.isElement(q)))==null||s?q:q.contextElement||await(p.getDocumentElement==null?void 0:p.getDocumentElement(g.floating)),boundary:S,rootBoundary:E,strategy:b})),K=A==="floating"?{x:o,y:d,width:m.floating.width,height:m.floating.height}:m.reference,X=await(p.getOffsetParent==null?void 0:p.getOffsetParent(g.floating)),z=await(p.isElement==null?void 0:p.isElement(X))?await(p.getScale==null?void 0:p.getScale(X))||{x:1,y:1}:{x:1,y:1},ee=Mj(p.convertOffsetParentRelativeRectToViewportRelativeRect?await p.convertOffsetParentRelativeRectToViewportRelativeRect({elements:g,rect:K,offsetParent:X,strategy:b}):K);return{top:(G.top-ee.top+M.top)/z.y,bottom:(ee.bottom-G.bottom+M.bottom)/z.y,left:(G.left-ee.left+M.left)/z.x,right:(ee.right-G.right+M.right)/z.x}}const Kne=e=>({name:"arrow",options:e,async fn(r){const{x:s,y:o,placement:d,rects:p,platform:m,elements:g,middlewareData:b}=r,{element:S,padding:E=0}=fu(e,r)||{};if(S==null)return{};const A=Nz(E),k={x:s,y:o},T=G_(d),M=H_(T),I=await m.getDimensions(S),q=T==="y",G=q?"top":"left",K=q?"bottom":"right",X=q?"clientHeight":"clientWidth",z=p.reference[M]+p.reference[T]-k[T]-p.floating[M],ee=k[T]-p.reference[T],oe=await(m.getOffsetParent==null?void 0:m.getOffsetParent(S));let Q=oe?oe[X]:0;(!Q||!await(m.isElement==null?void 0:m.isElement(oe)))&&(Q=g.floating[X]||p.floating[M]);const ne=z/2-ee/2,de=Q/2-I[M]/2-1,Ce=Ld(A[G],de),xe=Ld(A[K],de),le=Ce,be=Q-I[M]-xe,je=Q/2-I[M]/2+ne,Ke=PT(le,je,be),ce=!b.arrow&&Rg(d)!=null&&je!==Ke&&p.reference[M]/2-(je<le?Ce:xe)-I[M]/2<0,re=ce?je<le?je-le:je-be:0;return{[T]:k[T]+re,data:{[T]:Ke,centerOffset:je-Ke-re,...ce&&{alignmentOffset:re}},reset:ce}}}),Vne=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(r){var s,o;const{placement:d,middlewareData:p,rects:m,initialPlacement:g,platform:b,elements:S}=r,{mainAxis:E=!0,crossAxis:A=!0,fallbackPlacements:k,fallbackStrategy:T="bestFit",fallbackAxisSideDirection:M="none",flipAlignment:I=!0,...q}=fu(e,r);if((s=p.arrow)!=null&&s.alignmentOffset)return{};const G=mu(d),K=rc(g),X=mu(g)===g,z=await(b.isRTL==null?void 0:b.isRTL(S.floating)),ee=k||(X||!I?[Pj(g)]:Ine(g)),oe=M!=="none";!k&&oe&&ee.push(...qne(g,I,M,z));const Q=[g,...ee],ne=await Lb(r,q),de=[];let Ce=((o=p.flip)==null?void 0:o.overflows)||[];if(E&&de.push(ne[G]),A){const je=Mne(d,m,z);de.push(ne[je[0]],ne[je[1]])}if(Ce=[...Ce,{placement:d,overflows:de}],!de.every(je=>je<=0)){var xe,le;const je=(((xe=p.flip)==null?void 0:xe.index)||0)+1,Ke=Q[je];if(Ke&&(!(A==="alignment"?K!==rc(Ke):!1)||Ce.every(ue=>rc(ue.placement)===K?ue.overflows[0]>0:!0)))return{data:{index:je,overflows:Ce},reset:{placement:Ke}};let ce=(le=Ce.filter(re=>re.overflows[0]<=0).sort((re,ue)=>re.overflows[1]-ue.overflows[1])[0])==null?void 0:le.placement;if(!ce)switch(T){case"bestFit":{var be;const re=(be=Ce.filter(ue=>{if(oe){const _e=rc(ue.placement);return _e===K||_e==="y"}return!0}).map(ue=>[ue.placement,ue.overflows.filter(_e=>_e>0).reduce((_e,fe)=>_e+fe,0)]).sort((ue,_e)=>ue[1]-_e[1])[0])==null?void 0:be[0];re&&(ce=re);break}case"initialPlacement":ce=g;break}if(d!==ce)return{reset:{placement:ce}}}return{}}}};function rI(e,r){return{top:e.top-r.height,right:e.right-r.width,bottom:e.bottom-r.height,left:e.left-r.width}}function sI(e){return $ne.some(r=>e[r]>=0)}const Hne=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(r){const{rects:s}=r,{strategy:o="referenceHidden",...d}=fu(e,r);switch(o){case"referenceHidden":{const p=await Lb(r,{...d,elementContext:"reference"}),m=rI(p,s.reference);return{data:{referenceHiddenOffsets:m,referenceHidden:sI(m)}}}case"escaped":{const p=await Lb(r,{...d,altBoundary:!0}),m=rI(p,s.floating);return{data:{escapedOffsets:m,escaped:sI(m)}}}default:return{}}}}},Dz=new Set(["left","top"]);async function Gne(e,r){const{placement:s,platform:o,elements:d}=e,p=await(o.isRTL==null?void 0:o.isRTL(d.floating)),m=mu(s),g=Rg(s),b=rc(s)==="y",S=Dz.has(m)?-1:1,E=p&&b?-1:1,A=fu(r,e);let{mainAxis:k,crossAxis:T,alignmentAxis:M}=typeof A=="number"?{mainAxis:A,crossAxis:0,alignmentAxis:null}:{mainAxis:A.mainAxis||0,crossAxis:A.crossAxis||0,alignmentAxis:A.alignmentAxis};return g&&typeof M=="number"&&(T=g==="end"?M*-1:M),b?{x:T*E,y:k*S}:{x:k*S,y:T*E}}const Xne=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(r){var s,o;const{x:d,y:p,placement:m,middlewareData:g}=r,b=await Gne(r,e);return m===((s=g.offset)==null?void 0:s.placement)&&(o=g.arrow)!=null&&o.alignmentOffset?{}:{x:d+b.x,y:p+b.y,data:{...b,placement:m}}}}},Yne=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(r){const{x:s,y:o,placement:d}=r,{mainAxis:p=!0,crossAxis:m=!1,limiter:g={fn:q=>{let{x:G,y:K}=q;return{x:G,y:K}}},...b}=fu(e,r),S={x:s,y:o},E=await Lb(r,b),A=rc(mu(d)),k=V_(A);let T=S[k],M=S[A];if(p){const q=k==="y"?"top":"left",G=k==="y"?"bottom":"right",K=T+E[q],X=T-E[G];T=PT(K,T,X)}if(m){const q=A==="y"?"top":"left",G=A==="y"?"bottom":"right",K=M+E[q],X=M-E[G];M=PT(K,M,X)}const I=g.fn({...r,[k]:T,[A]:M});return{...I,data:{x:I.x-s,y:I.y-o,enabled:{[k]:p,[A]:m}}}}}},Zne=function(e){return e===void 0&&(e={}),{options:e,fn(r){const{x:s,y:o,placement:d,rects:p,middlewareData:m}=r,{offset:g=0,mainAxis:b=!0,crossAxis:S=!0}=fu(e,r),E={x:s,y:o},A=rc(d),k=V_(A);let T=E[k],M=E[A];const I=fu(g,r),q=typeof I=="number"?{mainAxis:I,crossAxis:0}:{mainAxis:0,crossAxis:0,...I};if(b){const X=k==="y"?"height":"width",z=p.reference[k]-p.floating[X]+q.mainAxis,ee=p.reference[k]+p.reference[X]-q.mainAxis;T<z?T=z:T>ee&&(T=ee)}if(S){var G,K;const X=k==="y"?"width":"height",z=Dz.has(mu(d)),ee=p.reference[A]-p.floating[X]+(z&&((G=m.offset)==null?void 0:G[A])||0)+(z?0:q.crossAxis),oe=p.reference[A]+p.reference[X]+(z?0:((K=m.offset)==null?void 0:K[A])||0)-(z?q.crossAxis:0);M<ee?M=ee:M>oe&&(M=oe)}return{[k]:T,[A]:M}}}},Wne=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(r){var s,o;const{placement:d,rects:p,platform:m,elements:g}=r,{apply:b=()=>{},...S}=fu(e,r),E=await Lb(r,S),A=mu(d),k=Rg(d),T=rc(d)==="y",{width:M,height:I}=p.floating;let q,G;A==="top"||A==="bottom"?(q=A,G=k===(await(m.isRTL==null?void 0:m.isRTL(g.floating))?"start":"end")?"left":"right"):(G=A,q=k==="end"?"top":"bottom");const K=I-E.top-E.bottom,X=M-E.left-E.right,z=Ld(I-E[q],K),ee=Ld(M-E[G],X),oe=!r.middlewareData.shift;let Q=z,ne=ee;if((s=r.middlewareData.shift)!=null&&s.enabled.x&&(ne=X),(o=r.middlewareData.shift)!=null&&o.enabled.y&&(Q=K),oe&&!k){const Ce=_a(E.left,0),xe=_a(E.right,0),le=_a(E.top,0),be=_a(E.bottom,0);T?ne=M-2*(Ce!==0||xe!==0?Ce+xe:_a(E.left,E.right)):Q=I-2*(le!==0||be!==0?le+be:_a(E.top,E.bottom))}await b({...r,availableWidth:ne,availableHeight:Q});const de=await m.getDimensions(g.floating);return M!==de.width||I!==de.height?{reset:{rects:!0}}:{}}}};function vC(){return typeof window<"u"}function Tg(e){return Pz(e)?(e.nodeName||"").toLowerCase():"#document"}function Na(e){var r;return(e==null||(r=e.ownerDocument)==null?void 0:r.defaultView)||window}function lc(e){var r;return(r=(Pz(e)?e.ownerDocument:e.document)||window.document)==null?void 0:r.documentElement}function Pz(e){return vC()?e instanceof Node||e instanceof Na(e).Node:!1}function nl(e){return vC()?e instanceof Element||e instanceof Na(e).Element:!1}function oc(e){return vC()?e instanceof HTMLElement||e instanceof Na(e).HTMLElement:!1}function iI(e){return!vC()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Na(e).ShadowRoot}const Jne=new Set(["inline","contents"]);function nw(e){const{overflow:r,overflowX:s,overflowY:o,display:d}=rl(e);return/auto|scroll|overlay|hidden|clip/.test(r+o+s)&&!Jne.has(d)}const Qne=new Set(["table","td","th"]);function ere(e){return Qne.has(Tg(e))}const tre=[":popover-open",":modal"];function xC(e){return tre.some(r=>{try{return e.matches(r)}catch{return!1}})}const nre=["transform","translate","scale","rotate","perspective"],rre=["transform","translate","scale","rotate","perspective","filter"],sre=["paint","layout","strict","content"];function X_(e){const r=Y_(),s=nl(e)?rl(e):e;return nre.some(o=>s[o]?s[o]!=="none":!1)||(s.containerType?s.containerType!=="normal":!1)||!r&&(s.backdropFilter?s.backdropFilter!=="none":!1)||!r&&(s.filter?s.filter!=="none":!1)||rre.some(o=>(s.willChange||"").includes(o))||sre.some(o=>(s.contain||"").includes(o))}function ire(e){let r=Fd(e);for(;oc(r)&&!vg(r);){if(X_(r))return r;if(xC(r))return null;r=Fd(r)}return null}function Y_(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const are=new Set(["html","body","#document"]);function vg(e){return are.has(Tg(e))}function rl(e){return Na(e).getComputedStyle(e)}function bC(e){return nl(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Fd(e){if(Tg(e)==="html")return e;const r=e.assignedSlot||e.parentNode||iI(e)&&e.host||lc(e);return iI(r)?r.host:r}function Mz(e){const r=Fd(e);return vg(r)?e.ownerDocument?e.ownerDocument.body:e.body:oc(r)&&nw(r)?r:Mz(r)}function Fb(e,r,s){var o;r===void 0&&(r=[]),s===void 0&&(s=!0);const d=Mz(e),p=d===((o=e.ownerDocument)==null?void 0:o.body),m=Na(d);if(p){const g=IT(m);return r.concat(m,m.visualViewport||[],nw(d)?d:[],g&&s?Fb(g):[])}return r.concat(d,Fb(d,[],s))}function IT(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Iz(e){const r=rl(e);let s=parseFloat(r.width)||0,o=parseFloat(r.height)||0;const d=oc(e),p=d?e.offsetWidth:s,m=d?e.offsetHeight:o,g=Dj(s)!==p||Dj(o)!==m;return g&&(s=p,o=m),{width:s,height:o,$:g}}function Z_(e){return nl(e)?e:e.contextElement}function pg(e){const r=Z_(e);if(!oc(r))return sc(1);const s=r.getBoundingClientRect(),{width:o,height:d,$:p}=Iz(r);let m=(p?Dj(s.width):s.width)/o,g=(p?Dj(s.height):s.height)/d;return(!m||!Number.isFinite(m))&&(m=1),(!g||!Number.isFinite(g))&&(g=1),{x:m,y:g}}const ore=sc(0);function zz(e){const r=Na(e);return!Y_()||!r.visualViewport?ore:{x:r.visualViewport.offsetLeft,y:r.visualViewport.offsetTop}}function lre(e,r,s){return r===void 0&&(r=!1),!s||r&&s!==Na(e)?!1:r}function Op(e,r,s,o){r===void 0&&(r=!1),s===void 0&&(s=!1);const d=e.getBoundingClientRect(),p=Z_(e);let m=sc(1);r&&(o?nl(o)&&(m=pg(o)):m=pg(e));const g=lre(p,s,o)?zz(p):sc(0);let b=(d.left+g.x)/m.x,S=(d.top+g.y)/m.y,E=d.width/m.x,A=d.height/m.y;if(p){const k=Na(p),T=o&&nl(o)?Na(o):o;let M=k,I=IT(M);for(;I&&o&&T!==M;){const q=pg(I),G=I.getBoundingClientRect(),K=rl(I),X=G.left+(I.clientLeft+parseFloat(K.paddingLeft))*q.x,z=G.top+(I.clientTop+parseFloat(K.paddingTop))*q.y;b*=q.x,S*=q.y,E*=q.x,A*=q.y,b+=X,S+=z,M=Na(I),I=IT(M)}}return Mj({width:E,height:A,x:b,y:S})}function wC(e,r){const s=bC(e).scrollLeft;return r?r.left+s:Op(lc(e)).left+s}function Lz(e,r){const s=e.getBoundingClientRect(),o=s.left+r.scrollLeft-wC(e,s),d=s.top+r.scrollTop;return{x:o,y:d}}function cre(e){let{elements:r,rect:s,offsetParent:o,strategy:d}=e;const p=d==="fixed",m=lc(o),g=r?xC(r.floating):!1;if(o===m||g&&p)return s;let b={scrollLeft:0,scrollTop:0},S=sc(1);const E=sc(0),A=oc(o);if((A||!A&&!p)&&((Tg(o)!=="body"||nw(m))&&(b=bC(o)),oc(o))){const T=Op(o);S=pg(o),E.x=T.x+o.clientLeft,E.y=T.y+o.clientTop}const k=m&&!A&&!p?Lz(m,b):sc(0);return{width:s.width*S.x,height:s.height*S.y,x:s.x*S.x-b.scrollLeft*S.x+E.x+k.x,y:s.y*S.y-b.scrollTop*S.y+E.y+k.y}}function ure(e){return Array.from(e.getClientRects())}function dre(e){const r=lc(e),s=bC(e),o=e.ownerDocument.body,d=_a(r.scrollWidth,r.clientWidth,o.scrollWidth,o.clientWidth),p=_a(r.scrollHeight,r.clientHeight,o.scrollHeight,o.clientHeight);let m=-s.scrollLeft+wC(e);const g=-s.scrollTop;return rl(o).direction==="rtl"&&(m+=_a(r.clientWidth,o.clientWidth)-d),{width:d,height:p,x:m,y:g}}const aI=25;function hre(e,r){const s=Na(e),o=lc(e),d=s.visualViewport;let p=o.clientWidth,m=o.clientHeight,g=0,b=0;if(d){p=d.width,m=d.height;const E=Y_();(!E||E&&r==="fixed")&&(g=d.offsetLeft,b=d.offsetTop)}const S=wC(o);if(S<=0){const E=o.ownerDocument,A=E.body,k=getComputedStyle(A),T=E.compatMode==="CSS1Compat"&&parseFloat(k.marginLeft)+parseFloat(k.marginRight)||0,M=Math.abs(o.clientWidth-A.clientWidth-T);M<=aI&&(p-=M)}else S<=aI&&(p+=S);return{width:p,height:m,x:g,y:b}}const pre=new Set(["absolute","fixed"]);function fre(e,r){const s=Op(e,!0,r==="fixed"),o=s.top+e.clientTop,d=s.left+e.clientLeft,p=oc(e)?pg(e):sc(1),m=e.clientWidth*p.x,g=e.clientHeight*p.y,b=d*p.x,S=o*p.y;return{width:m,height:g,x:b,y:S}}function oI(e,r,s){let o;if(r==="viewport")o=hre(e,s);else if(r==="document")o=dre(lc(e));else if(nl(r))o=fre(r,s);else{const d=zz(e);o={x:r.x-d.x,y:r.y-d.y,width:r.width,height:r.height}}return Mj(o)}function Fz(e,r){const s=Fd(e);return s===r||!nl(s)||vg(s)?!1:rl(s).position==="fixed"||Fz(s,r)}function mre(e,r){const s=r.get(e);if(s)return s;let o=Fb(e,[],!1).filter(g=>nl(g)&&Tg(g)!=="body"),d=null;const p=rl(e).position==="fixed";let m=p?Fd(e):e;for(;nl(m)&&!vg(m);){const g=rl(m),b=X_(m);!b&&g.position==="fixed"&&(d=null),(p?!b&&!d:!b&&g.position==="static"&&!!d&&pre.has(d.position)||nw(m)&&!b&&Fz(e,m))?o=o.filter(E=>E!==m):d=g,m=Fd(m)}return r.set(e,o),o}function gre(e){let{element:r,boundary:s,rootBoundary:o,strategy:d}=e;const m=[...s==="clippingAncestors"?xC(r)?[]:mre(r,this._c):[].concat(s),o],g=m[0],b=m.reduce((S,E)=>{const A=oI(r,E,d);return S.top=_a(A.top,S.top),S.right=Ld(A.right,S.right),S.bottom=Ld(A.bottom,S.bottom),S.left=_a(A.left,S.left),S},oI(r,g,d));return{width:b.right-b.left,height:b.bottom-b.top,x:b.left,y:b.top}}function yre(e){const{width:r,height:s}=Iz(e);return{width:r,height:s}}function vre(e,r,s){const o=oc(r),d=lc(r),p=s==="fixed",m=Op(e,!0,p,r);let g={scrollLeft:0,scrollTop:0};const b=sc(0);function S(){b.x=wC(d)}if(o||!o&&!p)if((Tg(r)!=="body"||nw(d))&&(g=bC(r)),o){const T=Op(r,!0,p,r);b.x=T.x+r.clientLeft,b.y=T.y+r.clientTop}else d&&S();p&&!o&&d&&S();const E=d&&!o&&!p?Lz(d,g):sc(0),A=m.left+g.scrollLeft-b.x-E.x,k=m.top+g.scrollTop-b.y-E.y;return{x:A,y:k,width:m.width,height:m.height}}function MR(e){return rl(e).position==="static"}function lI(e,r){if(!oc(e)||rl(e).position==="fixed")return null;if(r)return r(e);let s=e.offsetParent;return lc(e)===s&&(s=s.ownerDocument.body),s}function qz(e,r){const s=Na(e);if(xC(e))return s;if(!oc(e)){let d=Fd(e);for(;d&&!vg(d);){if(nl(d)&&!MR(d))return d;d=Fd(d)}return s}let o=lI(e,r);for(;o&&ere(o)&&MR(o);)o=lI(o,r);return o&&vg(o)&&MR(o)&&!X_(o)?s:o||ire(e)||s}const xre=async function(e){const r=this.getOffsetParent||qz,s=this.getDimensions,o=await s(e.floating);return{reference:vre(e.reference,await r(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function bre(e){return rl(e).direction==="rtl"}const wre={convertOffsetParentRelativeRectToViewportRelativeRect:cre,getDocumentElement:lc,getClippingRect:gre,getOffsetParent:qz,getElementRects:xre,getClientRects:ure,getDimensions:yre,getScale:pg,isElement:nl,isRTL:bre};function Bz(e,r){return e.x===r.x&&e.y===r.y&&e.width===r.width&&e.height===r.height}function Sre(e,r){let s=null,o;const d=lc(e);function p(){var g;clearTimeout(o),(g=s)==null||g.disconnect(),s=null}function m(g,b){g===void 0&&(g=!1),b===void 0&&(b=1),p();const S=e.getBoundingClientRect(),{left:E,top:A,width:k,height:T}=S;if(g||r(),!k||!T)return;const M=XE(A),I=XE(d.clientWidth-(E+k)),q=XE(d.clientHeight-(A+T)),G=XE(E),X={rootMargin:-M+"px "+-I+"px "+-q+"px "+-G+"px",threshold:_a(0,Ld(1,b))||1};let z=!0;function ee(oe){const Q=oe[0].intersectionRatio;if(Q!==b){if(!z)return m();Q?m(!1,Q):o=setTimeout(()=>{m(!1,1e-7)},1e3)}Q===1&&!Bz(S,e.getBoundingClientRect())&&m(),z=!1}try{s=new IntersectionObserver(ee,{...X,root:d.ownerDocument})}catch{s=new IntersectionObserver(ee,X)}s.observe(e)}return m(!0),p}function Ere(e,r,s,o){o===void 0&&(o={});const{ancestorScroll:d=!0,ancestorResize:p=!0,elementResize:m=typeof ResizeObserver=="function",layoutShift:g=typeof IntersectionObserver=="function",animationFrame:b=!1}=o,S=Z_(e),E=d||p?[...S?Fb(S):[],...Fb(r)]:[];E.forEach(G=>{d&&G.addEventListener("scroll",s,{passive:!0}),p&&G.addEventListener("resize",s)});const A=S&&g?Sre(S,s):null;let k=-1,T=null;m&&(T=new ResizeObserver(G=>{let[K]=G;K&&K.target===S&&T&&(T.unobserve(r),cancelAnimationFrame(k),k=requestAnimationFrame(()=>{var X;(X=T)==null||X.observe(r)})),s()}),S&&!b&&T.observe(S),T.observe(r));let M,I=b?Op(e):null;b&&q();function q(){const G=Op(e);I&&!Bz(I,G)&&s(),I=G,M=requestAnimationFrame(q)}return s(),()=>{var G;E.forEach(K=>{d&&K.removeEventListener("scroll",s),p&&K.removeEventListener("resize",s)}),A?.(),(G=T)==null||G.disconnect(),T=null,b&&cancelAnimationFrame(M)}}const jre=Xne,Cre=Yne,Are=Vne,Ore=Wne,kre=Hne,cI=Kne,Rre=Zne,Tre=(e,r,s)=>{const o=new Map,d={platform:wre,...s},p={...d.platform,_c:o};return Une(e,r,{...d,platform:p})};var _re=typeof document<"u",$re=function(){},yj=_re?R.useLayoutEffect:$re;function Ij(e,r){if(e===r)return!0;if(typeof e!=typeof r)return!1;if(typeof e=="function"&&e.toString()===r.toString())return!0;let s,o,d;if(e&&r&&typeof e=="object"){if(Array.isArray(e)){if(s=e.length,s!==r.length)return!1;for(o=s;o--!==0;)if(!Ij(e[o],r[o]))return!1;return!0}if(d=Object.keys(e),s=d.length,s!==Object.keys(r).length)return!1;for(o=s;o--!==0;)if(!{}.hasOwnProperty.call(r,d[o]))return!1;for(o=s;o--!==0;){const p=d[o];if(!(p==="_owner"&&e.$$typeof)&&!Ij(e[p],r[p]))return!1}return!0}return e!==e&&r!==r}function Uz(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function uI(e,r){const s=Uz(e);return Math.round(r*s)/s}function IR(e){const r=R.useRef(e);return yj(()=>{r.current=e}),r}function Nre(e){e===void 0&&(e={});const{placement:r="bottom",strategy:s="absolute",middleware:o=[],platform:d,elements:{reference:p,floating:m}={},transform:g=!0,whileElementsMounted:b,open:S}=e,[E,A]=R.useState({x:0,y:0,strategy:s,placement:r,middlewareData:{},isPositioned:!1}),[k,T]=R.useState(o);Ij(k,o)||T(o);const[M,I]=R.useState(null),[q,G]=R.useState(null),K=R.useCallback(ue=>{ue!==oe.current&&(oe.current=ue,I(ue))},[]),X=R.useCallback(ue=>{ue!==Q.current&&(Q.current=ue,G(ue))},[]),z=p||M,ee=m||q,oe=R.useRef(null),Q=R.useRef(null),ne=R.useRef(E),de=b!=null,Ce=IR(b),xe=IR(d),le=IR(S),be=R.useCallback(()=>{if(!oe.current||!Q.current)return;const ue={placement:r,strategy:s,middleware:k};xe.current&&(ue.platform=xe.current),Tre(oe.current,Q.current,ue).then(_e=>{const fe={..._e,isPositioned:le.current!==!1};je.current&&!Ij(ne.current,fe)&&(ne.current=fe,mC.flushSync(()=>{A(fe)}))})},[k,r,s,xe,le]);yj(()=>{S===!1&&ne.current.isPositioned&&(ne.current.isPositioned=!1,A(ue=>({...ue,isPositioned:!1})))},[S]);const je=R.useRef(!1);yj(()=>(je.current=!0,()=>{je.current=!1}),[]),yj(()=>{if(z&&(oe.current=z),ee&&(Q.current=ee),z&&ee){if(Ce.current)return Ce.current(z,ee,be);be()}},[z,ee,be,Ce,de]);const Ke=R.useMemo(()=>({reference:oe,floating:Q,setReference:K,setFloating:X}),[K,X]),ce=R.useMemo(()=>({reference:z,floating:ee}),[z,ee]),re=R.useMemo(()=>{const ue={position:s,left:0,top:0};if(!ce.floating)return ue;const _e=uI(ce.floating,E.x),fe=uI(ce.floating,E.y);return g?{...ue,transform:"translate("+_e+"px, "+fe+"px)",...Uz(ce.floating)>=1.5&&{willChange:"transform"}}:{position:s,left:_e,top:fe}},[s,g,ce.floating,E.x,E.y]);return R.useMemo(()=>({...E,update:be,refs:Ke,elements:ce,floatingStyles:re}),[E,be,Ke,ce,re])}const Dre=e=>{function r(s){return{}.hasOwnProperty.call(s,"current")}return{name:"arrow",options:e,fn(s){const{element:o,padding:d}=typeof e=="function"?e(s):e;return o&&r(o)?o.current!=null?cI({element:o.current,padding:d}).fn(s):{}:o?cI({element:o,padding:d}).fn(s):{}}}},Pre=(e,r)=>({...jre(e),options:[e,r]}),Mre=(e,r)=>({...Cre(e),options:[e,r]}),Ire=(e,r)=>({...Rre(e),options:[e,r]}),zre=(e,r)=>({...Are(e),options:[e,r]}),Lre=(e,r)=>({...Ore(e),options:[e,r]}),Fre=(e,r)=>({...kre(e),options:[e,r]}),qre=(e,r)=>({...Dre(e),options:[e,r]});var Bre="Arrow",Kz=R.forwardRef((e,r)=>{const{children:s,width:o=10,height:d=5,...p}=e;return u.jsx(Cn.svg,{...p,ref:r,width:o,height:d,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?s:u.jsx("polygon",{points:"0,0 30,0 15,10"})})});Kz.displayName=Bre;var Ure=Kz;function Vz(e){const[r,s]=R.useState(void 0);return As(()=>{if(e){s({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(d=>{if(!Array.isArray(d)||!d.length)return;const p=d[0];let m,g;if("borderBoxSize"in p){const b=p.borderBoxSize,S=Array.isArray(b)?b[0]:b;m=S.inlineSize,g=S.blockSize}else m=e.offsetWidth,g=e.offsetHeight;s({width:m,height:g})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else s(void 0)},[e]),r}var W_="Popper",[Hz,Hd]=al(W_),[Kre,Gz]=Hz(W_),Xz=e=>{const{__scopePopper:r,children:s}=e,[o,d]=R.useState(null);return u.jsx(Kre,{scope:r,anchor:o,onAnchorChange:d,children:s})};Xz.displayName=W_;var Yz="PopperAnchor",Zz=R.forwardRef((e,r)=>{const{__scopePopper:s,virtualRef:o,...d}=e,p=Gz(Yz,s),m=R.useRef(null),g=Ln(r,m),b=R.useRef(null);return R.useEffect(()=>{const S=b.current;b.current=o?.current||m.current,S!==b.current&&p.onAnchorChange(b.current)}),o?null:u.jsx(Cn.div,{...d,ref:g})});Zz.displayName=Yz;var J_="PopperContent",[Vre,Hre]=Hz(J_),Wz=R.forwardRef((e,r)=>{const{__scopePopper:s,side:o="bottom",sideOffset:d=0,align:p="center",alignOffset:m=0,arrowPadding:g=0,avoidCollisions:b=!0,collisionBoundary:S=[],collisionPadding:E=0,sticky:A="partial",hideWhenDetached:k=!1,updatePositionStrategy:T="optimized",onPlaced:M,...I}=e,q=Gz(J_,s),[G,K]=R.useState(null),X=Ln(r,ze=>K(ze)),[z,ee]=R.useState(null),oe=Vz(z),Q=oe?.width??0,ne=oe?.height??0,de=o+(p!=="center"?"-"+p:""),Ce=typeof E=="number"?E:{top:0,right:0,bottom:0,left:0,...E},xe=Array.isArray(S)?S:[S],le=xe.length>0,be={padding:Ce,boundary:xe.filter(Xre),altBoundary:le},{refs:je,floatingStyles:Ke,placement:ce,isPositioned:re,middlewareData:ue}=Nre({strategy:"fixed",placement:de,whileElementsMounted:(...ze)=>Ere(...ze,{animationFrame:T==="always"}),elements:{reference:q.anchor},middleware:[Pre({mainAxis:d+ne,alignmentAxis:m}),b&&Mre({mainAxis:!0,crossAxis:!1,limiter:A==="partial"?Ire():void 0,...be}),b&&zre({...be}),Lre({...be,apply:({elements:ze,rects:tt,availableWidth:ft,availableHeight:Ot})=>{const{width:Ft,height:kt}=tt.reference,Jt=ze.floating.style;Jt.setProperty("--radix-popper-available-width",`${ft}px`),Jt.setProperty("--radix-popper-available-height",`${Ot}px`),Jt.setProperty("--radix-popper-anchor-width",`${Ft}px`),Jt.setProperty("--radix-popper-anchor-height",`${kt}px`)}}),z&&qre({element:z,padding:g}),Yre({arrowWidth:Q,arrowHeight:ne}),k&&Fre({strategy:"referenceHidden",...be})]}),[_e,fe]=eL(ce),He=tl(M);As(()=>{re&&He?.()},[re,He]);const Oe=ue.arrow?.x,ke=ue.arrow?.y,Ve=ue.arrow?.centerOffset!==0,[ie,Ne]=R.useState();return As(()=>{G&&Ne(window.getComputedStyle(G).zIndex)},[G]),u.jsx("div",{ref:je.setFloating,"data-radix-popper-content-wrapper":"",style:{...Ke,transform:re?Ke.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ie,"--radix-popper-transform-origin":[ue.transformOrigin?.x,ue.transformOrigin?.y].join(" "),...ue.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:u.jsx(Vre,{scope:s,placedSide:_e,onArrowChange:ee,arrowX:Oe,arrowY:ke,shouldHideArrow:Ve,children:u.jsx(Cn.div,{"data-side":_e,"data-align":fe,...I,ref:X,style:{...I.style,animation:re?void 0:"none"}})})})});Wz.displayName=J_;var Jz="PopperArrow",Gre={top:"bottom",right:"left",bottom:"top",left:"right"},Qz=R.forwardRef(function(r,s){const{__scopePopper:o,...d}=r,p=Hre(Jz,o),m=Gre[p.placedSide];return u.jsx("span",{ref:p.onArrowChange,style:{position:"absolute",left:p.arrowX,top:p.arrowY,[m]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[p.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[p.placedSide],visibility:p.shouldHideArrow?"hidden":void 0},children:u.jsx(Ure,{...d,ref:s,style:{...d.style,display:"block"}})})});Qz.displayName=Jz;function Xre(e){return e!==null}var Yre=e=>({name:"transformOrigin",options:e,fn(r){const{placement:s,rects:o,middlewareData:d}=r,m=d.arrow?.centerOffset!==0,g=m?0:e.arrowWidth,b=m?0:e.arrowHeight,[S,E]=eL(s),A={start:"0%",center:"50%",end:"100%"}[E],k=(d.arrow?.x??0)+g/2,T=(d.arrow?.y??0)+b/2;let M="",I="";return S==="bottom"?(M=m?A:`${k}px`,I=`${-b}px`):S==="top"?(M=m?A:`${k}px`,I=`${o.floating.height+b}px`):S==="right"?(M=`${-b}px`,I=m?A:`${T}px`):S==="left"&&(M=`${o.floating.width+b}px`,I=m?A:`${T}px`),{data:{x:M,y:I}}}});function eL(e){const[r,s="center"]=e.split("-");return[r,s]}var SC=Xz,rw=Zz,EC=Wz,jC=Qz,Zre="Portal",_g=R.forwardRef((e,r)=>{const{container:s,...o}=e,[d,p]=R.useState(!1);As(()=>p(!0),[]);const m=s||d&&globalThis?.document?.body;return m?B3.createPortal(u.jsx(Cn.div,{...o,ref:r}),m):null});_g.displayName=Zre;function Wre(e,r){return R.useReducer((s,o)=>r[s][o]??s,e)}var co=e=>{const{present:r,children:s}=e,o=Jre(r),d=typeof s=="function"?s({present:o.isPresent}):R.Children.only(s),p=Ln(o.ref,Qre(d));return typeof s=="function"||o.isPresent?R.cloneElement(d,{ref:p}):null};co.displayName="Presence";function Jre(e){const[r,s]=R.useState(),o=R.useRef(null),d=R.useRef(e),p=R.useRef("none"),m=e?"mounted":"unmounted",[g,b]=Wre(m,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return R.useEffect(()=>{const S=YE(o.current);p.current=g==="mounted"?S:"none"},[g]),As(()=>{const S=o.current,E=d.current;if(E!==e){const k=p.current,T=YE(S);e?b("MOUNT"):T==="none"||S?.display==="none"?b("UNMOUNT"):b(E&&k!==T?"ANIMATION_OUT":"UNMOUNT"),d.current=e}},[e,b]),As(()=>{if(r){let S;const E=r.ownerDocument.defaultView??window,A=T=>{const I=YE(o.current).includes(CSS.escape(T.animationName));if(T.target===r&&I&&(b("ANIMATION_END"),!d.current)){const q=r.style.animationFillMode;r.style.animationFillMode="forwards",S=E.setTimeout(()=>{r.style.animationFillMode==="forwards"&&(r.style.animationFillMode=q)})}},k=T=>{T.target===r&&(p.current=YE(o.current))};return r.addEventListener("animationstart",k),r.addEventListener("animationcancel",A),r.addEventListener("animationend",A),()=>{E.clearTimeout(S),r.removeEventListener("animationstart",k),r.removeEventListener("animationcancel",A),r.removeEventListener("animationend",A)}}else b("ANIMATION_END")},[r,b]),{isPresent:["mounted","unmountSuspended"].includes(g),ref:R.useCallback(S=>{o.current=S?getComputedStyle(S):null,s(S)},[])}}function YE(e){return e?.animationName||"none"}function Qre(e){let r=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning;return s?e.ref:(r=Object.getOwnPropertyDescriptor(e,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning,s?e.props.ref:e.props.ref||e.ref)}var ese=Symbol("radix.slottable");function tse(e){const r=({children:s})=>u.jsx(u.Fragment,{children:s});return r.displayName=`${e}.Slottable`,r.__radixId=ese,r}var nse=R_[" useInsertionEffect ".trim().toString()]||As;function qd({prop:e,defaultProp:r,onChange:s=()=>{},caller:o}){const[d,p,m]=rse({defaultProp:r,onChange:s}),g=e!==void 0,b=g?e:d;{const E=R.useRef(e!==void 0);R.useEffect(()=>{const A=E.current;A!==g&&console.warn(`${o} is changing from ${A?"controlled":"uncontrolled"} to ${g?"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.`),E.current=g},[g,o])}const S=R.useCallback(E=>{if(g){const A=sse(E)?E(e):E;A!==e&&m.current?.(A)}else p(E)},[g,e,p,m]);return[b,S]}function rse({defaultProp:e,onChange:r}){const[s,o]=R.useState(e),d=R.useRef(s),p=R.useRef(r);return nse(()=>{p.current=r},[r]),R.useEffect(()=>{d.current!==s&&(p.current?.(s),d.current=s)},[s,d]),[s,o,p]}function sse(e){return typeof e=="function"}var tL=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"}),ise="VisuallyHidden",nL=R.forwardRef((e,r)=>u.jsx(Cn.span,{...e,ref:r,style:{...tL,...e.style}}));nL.displayName=ise;var ase=nL,[CC]=al("Tooltip",[Hd]),AC=Hd(),rL="TooltipProvider",ose=700,zT="tooltip.open",[lse,Q_]=CC(rL),sL=e=>{const{__scopeTooltip:r,delayDuration:s=ose,skipDelayDuration:o=300,disableHoverableContent:d=!1,children:p}=e,m=R.useRef(!0),g=R.useRef(!1),b=R.useRef(0);return R.useEffect(()=>{const S=b.current;return()=>window.clearTimeout(S)},[]),u.jsx(lse,{scope:r,isOpenDelayedRef:m,delayDuration:s,onOpen:R.useCallback(()=>{window.clearTimeout(b.current),m.current=!1},[]),onClose:R.useCallback(()=>{window.clearTimeout(b.current),b.current=window.setTimeout(()=>m.current=!0,o)},[o]),isPointerInTransitRef:g,onPointerInTransitChange:R.useCallback(S=>{g.current=S},[]),disableHoverableContent:d,children:p})};sL.displayName=rL;var qb="Tooltip",[cse,sw]=CC(qb),iL=e=>{const{__scopeTooltip:r,children:s,open:o,defaultOpen:d,onOpenChange:p,disableHoverableContent:m,delayDuration:g}=e,b=Q_(qb,e.__scopeTooltip),S=AC(r),[E,A]=R.useState(null),k=Vs(),T=R.useRef(0),M=m??b.disableHoverableContent,I=g??b.delayDuration,q=R.useRef(!1),[G,K]=qd({prop:o,defaultProp:d??!1,onChange:Q=>{Q?(b.onOpen(),document.dispatchEvent(new CustomEvent(zT))):b.onClose(),p?.(Q)},caller:qb}),X=R.useMemo(()=>G?q.current?"delayed-open":"instant-open":"closed",[G]),z=R.useCallback(()=>{window.clearTimeout(T.current),T.current=0,q.current=!1,K(!0)},[K]),ee=R.useCallback(()=>{window.clearTimeout(T.current),T.current=0,K(!1)},[K]),oe=R.useCallback(()=>{window.clearTimeout(T.current),T.current=window.setTimeout(()=>{q.current=!0,K(!0),T.current=0},I)},[I,K]);return R.useEffect(()=>()=>{T.current&&(window.clearTimeout(T.current),T.current=0)},[]),u.jsx(SC,{...S,children:u.jsx(cse,{scope:r,contentId:k,open:G,stateAttribute:X,trigger:E,onTriggerChange:A,onTriggerEnter:R.useCallback(()=>{b.isOpenDelayedRef.current?oe():z()},[b.isOpenDelayedRef,oe,z]),onTriggerLeave:R.useCallback(()=>{M?ee():(window.clearTimeout(T.current),T.current=0)},[ee,M]),onOpen:z,onClose:ee,disableHoverableContent:M,children:s})})};iL.displayName=qb;var LT="TooltipTrigger",aL=R.forwardRef((e,r)=>{const{__scopeTooltip:s,...o}=e,d=sw(LT,s),p=Q_(LT,s),m=AC(s),g=R.useRef(null),b=Ln(r,g,d.onTriggerChange),S=R.useRef(!1),E=R.useRef(!1),A=R.useCallback(()=>S.current=!1,[]);return R.useEffect(()=>()=>document.removeEventListener("pointerup",A),[A]),u.jsx(rw,{asChild:!0,...m,children:u.jsx(Cn.button,{"aria-describedby":d.open?d.contentId:void 0,"data-state":d.stateAttribute,...o,ref:b,onPointerMove:$t(e.onPointerMove,k=>{k.pointerType!=="touch"&&!E.current&&!p.isPointerInTransitRef.current&&(d.onTriggerEnter(),E.current=!0)}),onPointerLeave:$t(e.onPointerLeave,()=>{d.onTriggerLeave(),E.current=!1}),onPointerDown:$t(e.onPointerDown,()=>{d.open&&d.onClose(),S.current=!0,document.addEventListener("pointerup",A,{once:!0})}),onFocus:$t(e.onFocus,()=>{S.current||d.onOpen()}),onBlur:$t(e.onBlur,d.onClose),onClick:$t(e.onClick,d.onClose)})})});aL.displayName=LT;var e2="TooltipPortal",[use,dse]=CC(e2,{forceMount:void 0}),oL=e=>{const{__scopeTooltip:r,forceMount:s,children:o,container:d}=e,p=sw(e2,r);return u.jsx(use,{scope:r,forceMount:s,children:u.jsx(co,{present:s||p.open,children:u.jsx(_g,{asChild:!0,container:d,children:o})})})};oL.displayName=e2;var xg="TooltipContent",lL=R.forwardRef((e,r)=>{const s=dse(xg,e.__scopeTooltip),{forceMount:o=s.forceMount,side:d="top",...p}=e,m=sw(xg,e.__scopeTooltip);return u.jsx(co,{present:o||m.open,children:m.disableHoverableContent?u.jsx(cL,{side:d,...p,ref:r}):u.jsx(hse,{side:d,...p,ref:r})})}),hse=R.forwardRef((e,r)=>{const s=sw(xg,e.__scopeTooltip),o=Q_(xg,e.__scopeTooltip),d=R.useRef(null),p=Ln(r,d),[m,g]=R.useState(null),{trigger:b,onClose:S}=s,E=d.current,{onPointerInTransitChange:A}=o,k=R.useCallback(()=>{g(null),A(!1)},[A]),T=R.useCallback((M,I)=>{const q=M.currentTarget,G={x:M.clientX,y:M.clientY},K=gse(G,q.getBoundingClientRect()),X=yse(G,K),z=vse(I.getBoundingClientRect()),ee=bse([...X,...z]);g(ee),A(!0)},[A]);return R.useEffect(()=>()=>k(),[k]),R.useEffect(()=>{if(b&&E){const M=q=>T(q,E),I=q=>T(q,b);return b.addEventListener("pointerleave",M),E.addEventListener("pointerleave",I),()=>{b.removeEventListener("pointerleave",M),E.removeEventListener("pointerleave",I)}}},[b,E,T,k]),R.useEffect(()=>{if(m){const M=I=>{const q=I.target,G={x:I.clientX,y:I.clientY},K=b?.contains(q)||E?.contains(q),X=!xse(G,m);K?k():X&&(k(),S())};return document.addEventListener("pointermove",M),()=>document.removeEventListener("pointermove",M)}},[b,E,m,S,k]),u.jsx(cL,{...e,ref:p})}),[pse,fse]=CC(qb,{isInside:!1}),mse=tse("TooltipContent"),cL=R.forwardRef((e,r)=>{const{__scopeTooltip:s,children:o,"aria-label":d,onEscapeKeyDown:p,onPointerDownOutside:m,...g}=e,b=sw(xg,s),S=AC(s),{onClose:E}=b;return R.useEffect(()=>(document.addEventListener(zT,E),()=>document.removeEventListener(zT,E)),[E]),R.useEffect(()=>{if(b.trigger){const A=k=>{k.target?.contains(b.trigger)&&E()};return window.addEventListener("scroll",A,{capture:!0}),()=>window.removeEventListener("scroll",A,{capture:!0})}},[b.trigger,E]),u.jsx(kg,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:p,onPointerDownOutside:m,onFocusOutside:A=>A.preventDefault(),onDismiss:E,children:u.jsxs(EC,{"data-state":b.stateAttribute,...S,...g,ref:r,style:{...g.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:[u.jsx(mse,{children:o}),u.jsx(pse,{scope:s,isInside:!0,children:u.jsx(ase,{id:b.contentId,role:"tooltip",children:d||o})})]})})});lL.displayName=xg;var uL="TooltipArrow",dL=R.forwardRef((e,r)=>{const{__scopeTooltip:s,...o}=e,d=AC(s);return fse(uL,s).isInside?null:u.jsx(jC,{...d,...o,ref:r})});dL.displayName=uL;function gse(e,r){const s=Math.abs(r.top-e.y),o=Math.abs(r.bottom-e.y),d=Math.abs(r.right-e.x),p=Math.abs(r.left-e.x);switch(Math.min(s,o,d,p)){case p:return"left";case d:return"right";case s:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function yse(e,r,s=5){const o=[];switch(r){case"top":o.push({x:e.x-s,y:e.y+s},{x:e.x+s,y:e.y+s});break;case"bottom":o.push({x:e.x-s,y:e.y-s},{x:e.x+s,y:e.y-s});break;case"left":o.push({x:e.x+s,y:e.y-s},{x:e.x+s,y:e.y+s});break;case"right":o.push({x:e.x-s,y:e.y-s},{x:e.x-s,y:e.y+s});break}return o}function vse(e){const{top:r,right:s,bottom:o,left:d}=e;return[{x:d,y:r},{x:s,y:r},{x:s,y:o},{x:d,y:o}]}function xse(e,r){const{x:s,y:o}=e;let d=!1;for(let p=0,m=r.length-1;p<r.length;m=p++){const g=r[p],b=r[m],S=g.x,E=g.y,A=b.x,k=b.y;E>o!=k>o&&s<(A-S)*(o-E)/(k-E)+S&&(d=!d)}return d}function bse(e){const r=e.slice();return r.sort((s,o)=>s.x<o.x?-1:s.x>o.x?1:s.y<o.y?-1:s.y>o.y?1:0),wse(r)}function wse(e){if(e.length<=1)return e.slice();const r=[];for(let o=0;o<e.length;o++){const d=e[o];for(;r.length>=2;){const p=r[r.length-1],m=r[r.length-2];if((p.x-m.x)*(d.y-m.y)>=(p.y-m.y)*(d.x-m.x))r.pop();else break}r.push(d)}r.pop();const s=[];for(let o=e.length-1;o>=0;o--){const d=e[o];for(;s.length>=2;){const p=s[s.length-1],m=s[s.length-2];if((p.x-m.x)*(d.y-m.y)>=(p.y-m.y)*(d.x-m.x))s.pop();else break}s.push(d)}return s.pop(),r.length===1&&s.length===1&&r[0].x===s[0].x&&r[0].y===s[0].y?r:r.concat(s)}var Sse=sL,Ese=iL,jse=aL,Cse=oL,Ase=lL,Ose=dL;function iw({delayDuration:e=0,...r}){return u.jsx(Sse,{"data-slot":"tooltip-provider",delayDuration:e,...r})}function zj({...e}){return u.jsx(iw,{children:u.jsx(Ese,{"data-slot":"tooltip",...e})})}function Lj({...e}){return u.jsx(jse,{"data-slot":"tooltip-trigger",...e})}function Fj({className:e,sideOffset:r=0,children:s,...o}){return u.jsx(Cse,{children:u.jsxs(Ase,{"data-slot":"tooltip-content",sideOffset:r,className:ht("bg-foreground text-background 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),...o,children:[s,u.jsx(Ose,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}function hL(e){return e&&e!=="none"?e.slice(0,7):"none"}function kse(e){if(!e||e==="unknown")return"unknown";const r=new Date(e);return isNaN(+r)?e:r.toLocaleString()}function Rse(e){return e?`v${e.version} (${hL(e.commit)}) • built ${e.built} • ${e.go} ${e.goOS}/${e.goArch}`:""}const Tse=R.memo(function(){const r=rr({queryKey:["footer"],queryFn:()=>ute.footer(),staleTime:6e4,refetchOnWindowFocus:!1}),s=r.data,o=R.useMemo(()=>Rse(s),[s]);return u.jsx("footer",{className:"bg-background text-muted-foreground w-full border-t px-3 py-2 text-xs sm:text-sm",children:u.jsxs("div",{className:"mx-auto flex max-w-screen-2xl items-center justify-between",children:[u.jsxs("div",{className:"flex items-center gap-2 text-xs sm:text-sm",children:[u.jsxs("span",{children:["© ",new Date().getFullYear()," GlueOps"]}),u.jsx(bb,{orientation:"vertical",className:"hidden h-4 sm:block"}),u.jsx("span",{className:"hidden sm:block",children:"All systems nominal."})]}),u.jsx("div",{className:"flex flex-wrap items-center gap-2 text-xs sm:text-sm",children:r.isLoading?u.jsx("span",{className:"animate-pulse",children:"loading version…"}):r.isError?u.jsx("span",{className:"text-destructive",children:"version unavailable"}):s?u.jsx(iw,{children:u.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[u.jsx(rs,{variant:"secondary",className:"font-mono",children:s.version}),u.jsxs(zj,{children:[u.jsx(Lj,{asChild:!0,children:u.jsxs("span",{className:"inline-flex items-center gap-1",children:[u.jsx(XZ,{className:"h-3.5 w-3.5"}),u.jsx("span",{className:"font-mono",children:hL(s.commit)})]})}),u.jsx(Fj,{side:"top",children:u.jsx("div",{className:"font-mono text-xs",children:s.commit})})]}),u.jsx(bb,{orientation:"vertical",className:"h-4"}),u.jsxs(zj,{children:[u.jsx(Lj,{asChild:!0,children:u.jsxs("span",{className:"inline-flex items-center gap-1",children:[u.jsx(oz,{className:"h-3.5 w-3.5"}),u.jsx("span",{children:s.go})]})}),u.jsx(Fj,{side:"top",children:u.jsxs("div",{className:"font-mono text-xs",children:[s.goOS,"/",s.goArch]})})]}),u.jsx(bb,{orientation:"vertical",className:"hidden h-4 sm:block"}),u.jsxs("span",{className:"hidden sm:inline",children:["built ",u.jsx("span",{className:"font-mono",children:kse(s.built)})]}),u.jsx(bb,{orientation:"vertical",className:"hidden h-4 sm:block"}),u.jsx(Fe,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>{navigator.clipboard?.writeText(o).catch(()=>{})},title:"Copy version details",children:u.jsx($Z,{className:"h-4 w-4"})}),u.jsxs("a",{href:"/api/v1/version",target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 text-xs underline-offset-4 hover:underline",title:"Open raw version JSON",children:["JSON ",u.jsx(qZ,{className:"h-3.5 w-3.5"})]})]})}):null})]})})});var pL={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},dI=Je.createContext&&Je.createContext(pL),_se=["attr","size","title"];function $se(e,r){if(e==null)return{};var s=Nse(e,r),o,d;if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(e);for(d=0;d<p.length;d++)o=p[d],!(r.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(e,o)&&(s[o]=e[o])}return s}function Nse(e,r){if(e==null)return{};var s={};for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){if(r.indexOf(o)>=0)continue;s[o]=e[o]}return s}function qj(){return qj=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var s=arguments[r];for(var o in s)Object.prototype.hasOwnProperty.call(s,o)&&(e[o]=s[o])}return e},qj.apply(this,arguments)}function hI(e,r){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(d){return Object.getOwnPropertyDescriptor(e,d).enumerable})),s.push.apply(s,o)}return s}function Bj(e){for(var r=1;r<arguments.length;r++){var s=arguments[r]!=null?arguments[r]:{};r%2?hI(Object(s),!0).forEach(function(o){Dse(e,o,s[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):hI(Object(s)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(s,o))})}return e}function Dse(e,r,s){return r=Pse(r),r in e?Object.defineProperty(e,r,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[r]=s,e}function Pse(e){var r=Mse(e,"string");return typeof r=="symbol"?r:r+""}function Mse(e,r){if(typeof e!="object"||!e)return e;var s=e[Symbol.toPrimitive];if(s!==void 0){var o=s.call(e,r);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function fL(e){return e&&e.map((r,s)=>Je.createElement(r.tag,Bj({key:s},r.attr),fL(r.child)))}function aw(e){return r=>Je.createElement(Ise,qj({attr:Bj({},e.attr)},r),fL(e.child))}function Ise(e){var r=s=>{var{attr:o,size:d,title:p}=e,m=$se(e,_se),g=d||s.size||"1em",b;return s.className&&(b=s.className),e.className&&(b=(b?b+" ":"")+e.className),Je.createElement("svg",qj({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},s.attr,o,m,{className:b,style:Bj(Bj({color:e.color||s.color},s.style),e.style),height:g,width:g,xmlns:"http://www.w3.org/2000/svg"}),p&&Je.createElement("title",null,p),e.children)};return dI!==void 0?Je.createElement(dI.Consumer,null,s=>r(s)):r(pL)}function zse(e){return aw({attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M888 680h-54V540H546v-92h238c8.8 0 16-7.2 16-16V168c0-8.8-7.2-16-16-16H240c-8.8 0-16 7.2-16 16v264c0 8.8 7.2 16 16 16h238v92H190v140h-54c-4.4 0-8 3.6-8 8v176c0 4.4 3.6 8 8 8h176c4.4 0 8-3.6 8-8V688c0-4.4-3.6-8-8-8h-54v-72h220v72h-54c-4.4 0-8 3.6-8 8v176c0 4.4 3.6 8 8 8h176c4.4 0 8-3.6 8-8V688c0-4.4-3.6-8-8-8h-54v-72h220v72h-54c-4.4 0-8 3.6-8 8v176c0 4.4 3.6 8 8 8h176c4.4 0 8-3.6 8-8V688c0-4.4-3.6-8-8-8zM256 805.3c0 1.5-1.2 2.7-2.7 2.7h-58.7c-1.5 0-2.7-1.2-2.7-2.7v-58.7c0-1.5 1.2-2.7 2.7-2.7h58.7c1.5 0 2.7 1.2 2.7 2.7v58.7zm288 0c0 1.5-1.2 2.7-2.7 2.7h-58.7c-1.5 0-2.7-1.2-2.7-2.7v-58.7c0-1.5 1.2-2.7 2.7-2.7h58.7c1.5 0 2.7 1.2 2.7 2.7v58.7zM288 384V216h448v168H288zm544 421.3c0 1.5-1.2 2.7-2.7 2.7h-58.7c-1.5 0-2.7-1.2-2.7-2.7v-58.7c0-1.5 1.2-2.7 2.7-2.7h58.7c1.5 0 2.7 1.2 2.7 2.7v58.7zM360 300a40 40 0 1 0 80 0 40 40 0 1 0-80 0z"},child:[]}]})(e)}function Lse(e){return aw({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",strokeWidth:"2",d:"M3,6 L21,6 L3,6 Z M10,2 L10,4 M14,2 L14,4 M16,12 C18.3736719,13.1826446 20,15.6506255 20,19 L20,23 L4,23 L4,19 C4,15.6457258 5.6310898,13.1754259 8,12 M12,16.5 L12,23 M12,13 C15.3137085,13 18,10.3137085 18,7 C18,3.6862915 15.3137085,1 12,1 C8.6862915,1 6,3.6862915 6,7 C6,10.3137085 8.6862915,13 12,13 Z M8,12 C8,14.209139 9.790861,16 12,16 L12,16 C14.209139,16 16,14.209139 16,12"},child:[]}]})(e)}function Fse(e){return aw({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M19 15v4H5v-4h14m1-2H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h16c.55 0 1-.45 1-1v-6c0-.55-.45-1-1-1zM7 18.5c-.82 0-1.5-.67-1.5-1.5s.68-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zM19 5v4H5V5h14m1-2H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h16c.55 0 1-.45 1-1V4c0-.55-.45-1-1-1zM7 8.5c-.82 0-1.5-.67-1.5-1.5S6.18 5.5 7 5.5s1.5.68 1.5 1.5S7.83 8.5 7 8.5z"},child:[]}]})(e)}function qse(e){return aw({attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M12 0C5.383 0 0 5.383 0 12s5.383 12 12 12c6.616 0 12-5.383 12-12S18.616 0 12 0zm0 1.144c5.995 0 10.856 4.86 10.856 10.856 0 5.995-4.86 10.856-10.856 10.856-5.996 0-10.856-4.86-10.856-10.856C1.144 6.004 6.004 1.144 12 1.144zM8.37 5.868a6.707 6.707 0 0 0-.423.005c-.983.056-1.573.517-1.735 1.472-.115.665-.096 1.348-.143 2.017-.013.35-.05.697-.115 1.038-.134.609-.397.798-1.016.83a2.65 2.65 0 0 0-.244.042v1.463c1.126.055 1.278.452 1.37 1.629.033.429-.013.858.015 1.287.018.406.073.808.156 1.2.259 1.075 1.307 1.435 2.575 1.218v-1.283c-.203 0-.383.005-.558 0-.43-.013-.591-.12-.632-.535-.056-.535-.042-1.08-.075-1.62-.064-1.001-.175-1.988-1.153-2.625.503-.37.868-.812.983-1.398.083-.41.134-.821.166-1.237.028-.415-.023-.84.014-1.25.06-.665.102-.937.9-.91.12 0 .235-.017.369-.027v-1.31c-.16 0-.31-.004-.454-.006zm7.593.009a4.247 4.247 0 0 0-.813.06v1.274c.245 0 .434 0 .623.005.328.004.577.13.61.494.032.332.031.669.064 1.006.065.669.101 1.347.217 2.007.102.544.475.95.941 1.283-.817.549-1.057 1.333-1.098 2.215-.023.604-.037 1.213-.069 1.822-.028.554-.222.734-.78.748-.157.004-.31.018-.484.028v1.305c.327 0 .627.019.927 0 .932-.055 1.495-.507 1.68-1.412.078-.498.124-1 .138-1.504.032-.461.028-.927.074-1.384.069-.715.397-1.01 1.112-1.057a.972.972 0 0 0 .199-.046v-1.463c-.12-.014-.204-.027-.291-.032-.536-.023-.804-.203-.937-.71a5.146 5.146 0 0 1-.152-.993c-.037-.618-.033-1.241-.074-1.86-.08-1.192-.794-1.753-1.887-1.786zm-6.89 5.28a.844.844 0 0 0-.083 1.684h.055a.83.83 0 0 0 .877-.78v-.046a.845.845 0 0 0-.83-.858zm2.911 0a.808.808 0 0 0-.834.78c0 .027 0 .05.004.078 0 .503.342.826.859.826.507 0 .826-.332.826-.853-.005-.503-.342-.836-.855-.831zm2.963 0a.861.861 0 0 0-.876.835c0 .47.378.849.849.849h.009c.425.074.853-.337.881-.83.023-.457-.392-.854-.863-.854z"},child:[]}]})(e)}function Bse(e){return aw({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M12 13m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"},child:[]},{tag:"path",attr:{d:"M12 20m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},child:[]},{tag:"path",attr:{d:"M12 16v3"},child:[]},{tag:"path",attr:{d:"M12 10v-7"},child:[]},{tag:"path",attr:{d:"M9 6l3 -3l3 3"},child:[]},{tag:"path",attr:{d:"M12 10v-7"},child:[]},{tag:"path",attr:{d:"M9 6l3 -3l3 3"},child:[]},{tag:"path",attr:{d:"M14.894 12.227l6.11 -2.224"},child:[]},{tag:"path",attr:{d:"M17.159 8.21l3.845 1.793l-1.793 3.845"},child:[]},{tag:"path",attr:{d:"M9.101 12.214l-6.075 -2.211"},child:[]},{tag:"path",attr:{d:"M6.871 8.21l-3.845 1.793l1.793 3.845"},child:[]}]})(e)}const Use=[{to:"/clusters",label:"Clusters",icon:zse},{to:"/load-balancers",label:"Load Balancers",icon:Bse},{to:"/dns",label:"DNS",icon:Fse},{to:"/node-pools",label:"Node Pools",icon:gZ},{to:"/annotations",label:"Annotations",icon:DZ},{to:"/labels",label:"Labels",icon:gC},{to:"/taints",label:"Taints",icon:wW},{to:"/servers",label:"Servers",icon:L_},{to:"/ssh",label:"SSH Keys",icon:HZ},{to:"/credentials",label:"Credentials",icon:tW}],Kse=[{to:"/org/members",label:"Members",icon:lz},{to:"/org/api-keys",label:"Org API Keys",icon:WZ},{to:"/org/settings",label:"Org Settings",icon:sz}],Vse=[{to:"/me",label:"Profile",icon:kW}],Hse=[{to:"/admin/users",label:"Users Admin",icon:lz},{to:"/admin/jobs",label:"Jobs Admin",icon:Lse},{to:"/docs",label:"API Docs ",icon:qse,target:"_blank"}];var pI=1,Gse=.9,Xse=.8,Yse=.17,zR=.1,LR=.999,Zse=.9999,Wse=.99,Jse=/[\\\/_+.#"@\[\(\{&]/,Qse=/[\\\/_+.#"@\[\(\{&]/g,eie=/[\s-]/,mL=/[\s-]/g;function FT(e,r,s,o,d,p,m){if(p===r.length)return d===e.length?pI:Wse;var g=`${d},${p}`;if(m[g]!==void 0)return m[g];for(var b=o.charAt(p),S=s.indexOf(b,d),E=0,A,k,T,M;S>=0;)A=FT(e,r,s,o,S+1,p+1,m),A>E&&(S===d?A*=pI:Jse.test(e.charAt(S-1))?(A*=Xse,T=e.slice(d,S-1).match(Qse),T&&d>0&&(A*=Math.pow(LR,T.length))):eie.test(e.charAt(S-1))?(A*=Gse,M=e.slice(d,S-1).match(mL),M&&d>0&&(A*=Math.pow(LR,M.length))):(A*=Yse,d>0&&(A*=Math.pow(LR,S-d))),e.charAt(S)!==r.charAt(p)&&(A*=Zse)),(A<zR&&s.charAt(S-1)===o.charAt(p+1)||o.charAt(p+1)===o.charAt(p)&&s.charAt(S-1)!==o.charAt(p))&&(k=FT(e,r,s,o,S+1,p+2,m),k*zR>A&&(A=k*zR)),A>E&&(E=A),S=s.indexOf(b,S+1);return m[g]=E,E}function fI(e){return e.toLowerCase().replace(mL," ")}function tie(e,r,s){return e=s&&s.length>0?`${e+" "+s.join(" ")}`:e,FT(e,r,fI(e),fI(r),0,0,{})}var FR="focusScope.autoFocusOnMount",qR="focusScope.autoFocusOnUnmount",mI={bubbles:!1,cancelable:!0},nie="FocusScope",ow=R.forwardRef((e,r)=>{const{loop:s=!1,trapped:o=!1,onMountAutoFocus:d,onUnmountAutoFocus:p,...m}=e,[g,b]=R.useState(null),S=tl(d),E=tl(p),A=R.useRef(null),k=Ln(r,I=>b(I)),T=R.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;R.useEffect(()=>{if(o){let I=function(X){if(T.paused||!g)return;const z=X.target;g.contains(z)?A.current=z:Pd(A.current,{select:!0})},q=function(X){if(T.paused||!g)return;const z=X.relatedTarget;z!==null&&(g.contains(z)||Pd(A.current,{select:!0}))},G=function(X){if(document.activeElement===document.body)for(const ee of X)ee.removedNodes.length>0&&Pd(g)};document.addEventListener("focusin",I),document.addEventListener("focusout",q);const K=new MutationObserver(G);return g&&K.observe(g,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",I),document.removeEventListener("focusout",q),K.disconnect()}}},[o,g,T.paused]),R.useEffect(()=>{if(g){yI.add(T);const I=document.activeElement;if(!g.contains(I)){const G=new CustomEvent(FR,mI);g.addEventListener(FR,S),g.dispatchEvent(G),G.defaultPrevented||(rie(lie(gL(g)),{select:!0}),document.activeElement===I&&Pd(g))}return()=>{g.removeEventListener(FR,S),setTimeout(()=>{const G=new CustomEvent(qR,mI);g.addEventListener(qR,E),g.dispatchEvent(G),G.defaultPrevented||Pd(I??document.body,{select:!0}),g.removeEventListener(qR,E),yI.remove(T)},0)}}},[g,S,E,T]);const M=R.useCallback(I=>{if(!s&&!o||T.paused)return;const q=I.key==="Tab"&&!I.altKey&&!I.ctrlKey&&!I.metaKey,G=document.activeElement;if(q&&G){const K=I.currentTarget,[X,z]=sie(K);X&&z?!I.shiftKey&&G===z?(I.preventDefault(),s&&Pd(X,{select:!0})):I.shiftKey&&G===X&&(I.preventDefault(),s&&Pd(z,{select:!0})):G===K&&I.preventDefault()}},[s,o,T.paused]);return u.jsx(Cn.div,{tabIndex:-1,...m,ref:k,onKeyDown:M})});ow.displayName=nie;function rie(e,{select:r=!1}={}){const s=document.activeElement;for(const o of e)if(Pd(o,{select:r}),document.activeElement!==s)return}function sie(e){const r=gL(e),s=gI(r,e),o=gI(r.reverse(),e);return[s,o]}function gL(e){const r=[],s=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const d=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||d?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;s.nextNode();)r.push(s.currentNode);return r}function gI(e,r){for(const s of e)if(!iie(s,{upTo:r}))return s}function iie(e,{upTo:r}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(r!==void 0&&e===r)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function aie(e){return e instanceof HTMLInputElement&&"select"in e}function Pd(e,{select:r=!1}={}){if(e&&e.focus){const s=document.activeElement;e.focus({preventScroll:!0}),e!==s&&aie(e)&&r&&e.select()}}var yI=oie();function oie(){let e=[];return{add(r){const s=e[0];r!==s&&s?.pause(),e=vI(e,r),e.unshift(r)},remove(r){e=vI(e,r),e[0]?.resume()}}}function vI(e,r){const s=[...e],o=s.indexOf(r);return o!==-1&&s.splice(o,1),s}function lie(e){return e.filter(r=>r.tagName!=="A")}var BR=0;function OC(){R.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??xI()),document.body.insertAdjacentElement("beforeend",e[1]??xI()),BR++,()=>{BR===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),BR--}},[])}function xI(){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 nc=function(){return nc=Object.assign||function(r){for(var s,o=1,d=arguments.length;o<d;o++){s=arguments[o];for(var p in s)Object.prototype.hasOwnProperty.call(s,p)&&(r[p]=s[p])}return r},nc.apply(this,arguments)};function yL(e,r){var s={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&r.indexOf(o)<0&&(s[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var d=0,o=Object.getOwnPropertySymbols(e);d<o.length;d++)r.indexOf(o[d])<0&&Object.prototype.propertyIsEnumerable.call(e,o[d])&&(s[o[d]]=e[o[d]]);return s}function cie(e,r,s){if(s||arguments.length===2)for(var o=0,d=r.length,p;o<d;o++)(p||!(o in r))&&(p||(p=Array.prototype.slice.call(r,0,o)),p[o]=r[o]);return e.concat(p||Array.prototype.slice.call(r))}var vj="right-scroll-bar-position",xj="width-before-scroll-bar",uie="with-scroll-bars-hidden",die="--removed-body-scroll-bar-size";function UR(e,r){return typeof e=="function"?e(r):e&&(e.current=r),e}function hie(e,r){var s=R.useState(function(){return{value:e,callback:r,facade:{get current(){return s.value},set current(o){var d=s.value;d!==o&&(s.value=o,s.callback(o,d))}}}})[0];return s.callback=r,s.facade}var pie=typeof window<"u"?R.useLayoutEffect:R.useEffect,bI=new WeakMap;function fie(e,r){var s=hie(null,function(o){return e.forEach(function(d){return UR(d,o)})});return pie(function(){var o=bI.get(s);if(o){var d=new Set(o),p=new Set(e),m=s.current;d.forEach(function(g){p.has(g)||UR(g,null)}),p.forEach(function(g){d.has(g)||UR(g,m)})}bI.set(s,e)},[e]),s}function mie(e){return e}function gie(e,r){r===void 0&&(r=mie);var s=[],o=!1,d={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return s.length?s[s.length-1]:e},useMedium:function(p){var m=r(p,o);return s.push(m),function(){s=s.filter(function(g){return g!==m})}},assignSyncMedium:function(p){for(o=!0;s.length;){var m=s;s=[],m.forEach(p)}s={push:function(g){return p(g)},filter:function(){return s}}},assignMedium:function(p){o=!0;var m=[];if(s.length){var g=s;s=[],g.forEach(p),m=s}var b=function(){var E=m;m=[],E.forEach(p)},S=function(){return Promise.resolve().then(b)};S(),s={push:function(E){m.push(E),S()},filter:function(E){return m=m.filter(E),s}}}};return d}function yie(e){e===void 0&&(e={});var r=gie(null);return r.options=nc({async:!0,ssr:!1},e),r}var vL=function(e){var r=e.sideCar,s=yL(e,["sideCar"]);if(!r)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=r.read();if(!o)throw new Error("Sidecar medium not found");return R.createElement(o,nc({},s))};vL.isSideCarExport=!0;function vie(e,r){return e.useMedium(r),vL}var xL=yie(),KR=function(){},kC=R.forwardRef(function(e,r){var s=R.useRef(null),o=R.useState({onScrollCapture:KR,onWheelCapture:KR,onTouchMoveCapture:KR}),d=o[0],p=o[1],m=e.forwardProps,g=e.children,b=e.className,S=e.removeScrollBar,E=e.enabled,A=e.shards,k=e.sideCar,T=e.noRelative,M=e.noIsolation,I=e.inert,q=e.allowPinchZoom,G=e.as,K=G===void 0?"div":G,X=e.gapMode,z=yL(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),ee=k,oe=fie([s,r]),Q=nc(nc({},z),d);return R.createElement(R.Fragment,null,E&&R.createElement(ee,{sideCar:xL,removeScrollBar:S,shards:A,noRelative:T,noIsolation:M,inert:I,setCallbacks:p,allowPinchZoom:!!q,lockRef:s,gapMode:X}),m?R.cloneElement(R.Children.only(g),nc(nc({},Q),{ref:oe})):R.createElement(K,nc({},Q,{className:b,ref:oe}),g))});kC.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};kC.classNames={fullWidth:xj,zeroRight:vj};var xie=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function bie(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var r=xie();return r&&e.setAttribute("nonce",r),e}function wie(e,r){e.styleSheet?e.styleSheet.cssText=r:e.appendChild(document.createTextNode(r))}function Sie(e){var r=document.head||document.getElementsByTagName("head")[0];r.appendChild(e)}var Eie=function(){var e=0,r=null;return{add:function(s){e==0&&(r=bie())&&(wie(r,s),Sie(r)),e++},remove:function(){e--,!e&&r&&(r.parentNode&&r.parentNode.removeChild(r),r=null)}}},jie=function(){var e=Eie();return function(r,s){R.useEffect(function(){return e.add(r),function(){e.remove()}},[r&&s])}},bL=function(){var e=jie(),r=function(s){var o=s.styles,d=s.dynamic;return e(o,d),null};return r},Cie={left:0,top:0,right:0,gap:0},VR=function(e){return parseInt(e||"",10)||0},Aie=function(e){var r=window.getComputedStyle(document.body),s=r[e==="padding"?"paddingLeft":"marginLeft"],o=r[e==="padding"?"paddingTop":"marginTop"],d=r[e==="padding"?"paddingRight":"marginRight"];return[VR(s),VR(o),VR(d)]},Oie=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Cie;var r=Aie(e),s=document.documentElement.clientWidth,o=window.innerWidth;return{left:r[0],top:r[1],right:r[2],gap:Math.max(0,o-s+r[2]-r[0])}},kie=bL(),fg="data-scroll-locked",Rie=function(e,r,s,o){var d=e.left,p=e.top,m=e.right,g=e.gap;return s===void 0&&(s="margin"),`
|
||
.`.concat(uie,` {
|
||
overflow: hidden `).concat(o,`;
|
||
padding-right: `).concat(g,"px ").concat(o,`;
|
||
}
|
||
body[`).concat(fg,`] {
|
||
overflow: hidden `).concat(o,`;
|
||
overscroll-behavior: contain;
|
||
`).concat([r&&"position: relative ".concat(o,";"),s==="margin"&&`
|
||
padding-left: `.concat(d,`px;
|
||
padding-top: `).concat(p,`px;
|
||
padding-right: `).concat(m,`px;
|
||
margin-left:0;
|
||
margin-top:0;
|
||
margin-right: `).concat(g,"px ").concat(o,`;
|
||
`),s==="padding"&&"padding-right: ".concat(g,"px ").concat(o,";")].filter(Boolean).join(""),`
|
||
}
|
||
|
||
.`).concat(vj,` {
|
||
right: `).concat(g,"px ").concat(o,`;
|
||
}
|
||
|
||
.`).concat(xj,` {
|
||
margin-right: `).concat(g,"px ").concat(o,`;
|
||
}
|
||
|
||
.`).concat(vj," .").concat(vj,` {
|
||
right: 0 `).concat(o,`;
|
||
}
|
||
|
||
.`).concat(xj," .").concat(xj,` {
|
||
margin-right: 0 `).concat(o,`;
|
||
}
|
||
|
||
body[`).concat(fg,`] {
|
||
`).concat(die,": ").concat(g,`px;
|
||
}
|
||
`)},wI=function(){var e=parseInt(document.body.getAttribute(fg)||"0",10);return isFinite(e)?e:0},Tie=function(){R.useEffect(function(){return document.body.setAttribute(fg,(wI()+1).toString()),function(){var e=wI()-1;e<=0?document.body.removeAttribute(fg):document.body.setAttribute(fg,e.toString())}},[])},_ie=function(e){var r=e.noRelative,s=e.noImportant,o=e.gapMode,d=o===void 0?"margin":o;Tie();var p=R.useMemo(function(){return Oie(d)},[d]);return R.createElement(kie,{styles:Rie(p,!r,d,s?"":"!important")})},qT=!1;if(typeof window<"u")try{var ZE=Object.defineProperty({},"passive",{get:function(){return qT=!0,!0}});window.addEventListener("test",ZE,ZE),window.removeEventListener("test",ZE,ZE)}catch{qT=!1}var Vm=qT?{passive:!1}:!1,$ie=function(e){return e.tagName==="TEXTAREA"},wL=function(e,r){if(!(e instanceof Element))return!1;var s=window.getComputedStyle(e);return s[r]!=="hidden"&&!(s.overflowY===s.overflowX&&!$ie(e)&&s[r]==="visible")},Nie=function(e){return wL(e,"overflowY")},Die=function(e){return wL(e,"overflowX")},SI=function(e,r){var s=r.ownerDocument,o=r;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var d=SL(e,o);if(d){var p=EL(e,o),m=p[1],g=p[2];if(m>g)return!0}o=o.parentNode}while(o&&o!==s.body);return!1},Pie=function(e){var r=e.scrollTop,s=e.scrollHeight,o=e.clientHeight;return[r,s,o]},Mie=function(e){var r=e.scrollLeft,s=e.scrollWidth,o=e.clientWidth;return[r,s,o]},SL=function(e,r){return e==="v"?Nie(r):Die(r)},EL=function(e,r){return e==="v"?Pie(r):Mie(r)},Iie=function(e,r){return e==="h"&&r==="rtl"?-1:1},zie=function(e,r,s,o,d){var p=Iie(e,window.getComputedStyle(r).direction),m=p*o,g=s.target,b=r.contains(g),S=!1,E=m>0,A=0,k=0;do{if(!g)break;var T=EL(e,g),M=T[0],I=T[1],q=T[2],G=I-q-p*M;(M||G)&&SL(e,g)&&(A+=G,k+=M);var K=g.parentNode;g=K&&K.nodeType===Node.DOCUMENT_FRAGMENT_NODE?K.host:K}while(!b&&g!==document.body||b&&(r.contains(g)||r===g));return(E&&Math.abs(A)<1||!E&&Math.abs(k)<1)&&(S=!0),S},WE=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},EI=function(e){return[e.deltaX,e.deltaY]},jI=function(e){return e&&"current"in e?e.current:e},Lie=function(e,r){return e[0]===r[0]&&e[1]===r[1]},Fie=function(e){return`
|
||
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
||
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
||
`)},qie=0,Hm=[];function Bie(e){var r=R.useRef([]),s=R.useRef([0,0]),o=R.useRef(),d=R.useState(qie++)[0],p=R.useState(bL)[0],m=R.useRef(e);R.useEffect(function(){m.current=e},[e]),R.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(d));var I=cie([e.lockRef.current],(e.shards||[]).map(jI),!0).filter(Boolean);return I.forEach(function(q){return q.classList.add("allow-interactivity-".concat(d))}),function(){document.body.classList.remove("block-interactivity-".concat(d)),I.forEach(function(q){return q.classList.remove("allow-interactivity-".concat(d))})}}},[e.inert,e.lockRef.current,e.shards]);var g=R.useCallback(function(I,q){if("touches"in I&&I.touches.length===2||I.type==="wheel"&&I.ctrlKey)return!m.current.allowPinchZoom;var G=WE(I),K=s.current,X="deltaX"in I?I.deltaX:K[0]-G[0],z="deltaY"in I?I.deltaY:K[1]-G[1],ee,oe=I.target,Q=Math.abs(X)>Math.abs(z)?"h":"v";if("touches"in I&&Q==="h"&&oe.type==="range")return!1;var ne=SI(Q,oe);if(!ne)return!0;if(ne?ee=Q:(ee=Q==="v"?"h":"v",ne=SI(Q,oe)),!ne)return!1;if(!o.current&&"changedTouches"in I&&(X||z)&&(o.current=ee),!ee)return!0;var de=o.current||ee;return zie(de,q,I,de==="h"?X:z)},[]),b=R.useCallback(function(I){var q=I;if(!(!Hm.length||Hm[Hm.length-1]!==p)){var G="deltaY"in q?EI(q):WE(q),K=r.current.filter(function(ee){return ee.name===q.type&&(ee.target===q.target||q.target===ee.shadowParent)&&Lie(ee.delta,G)})[0];if(K&&K.should){q.cancelable&&q.preventDefault();return}if(!K){var X=(m.current.shards||[]).map(jI).filter(Boolean).filter(function(ee){return ee.contains(q.target)}),z=X.length>0?g(q,X[0]):!m.current.noIsolation;z&&q.cancelable&&q.preventDefault()}}},[]),S=R.useCallback(function(I,q,G,K){var X={name:I,delta:q,target:G,should:K,shadowParent:Uie(G)};r.current.push(X),setTimeout(function(){r.current=r.current.filter(function(z){return z!==X})},1)},[]),E=R.useCallback(function(I){s.current=WE(I),o.current=void 0},[]),A=R.useCallback(function(I){S(I.type,EI(I),I.target,g(I,e.lockRef.current))},[]),k=R.useCallback(function(I){S(I.type,WE(I),I.target,g(I,e.lockRef.current))},[]);R.useEffect(function(){return Hm.push(p),e.setCallbacks({onScrollCapture:A,onWheelCapture:A,onTouchMoveCapture:k}),document.addEventListener("wheel",b,Vm),document.addEventListener("touchmove",b,Vm),document.addEventListener("touchstart",E,Vm),function(){Hm=Hm.filter(function(I){return I!==p}),document.removeEventListener("wheel",b,Vm),document.removeEventListener("touchmove",b,Vm),document.removeEventListener("touchstart",E,Vm)}},[]);var T=e.removeScrollBar,M=e.inert;return R.createElement(R.Fragment,null,M?R.createElement(p,{styles:Fie(d)}):null,T?R.createElement(_ie,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Uie(e){for(var r=null;e!==null;)e instanceof ShadowRoot&&(r=e.host,e=e.host),e=e.parentNode;return r}const Kie=vie(xL,Bie);var lw=R.forwardRef(function(e,r){return R.createElement(kC,nc({},e,{ref:r,sideCar:Kie}))});lw.classNames=kC.classNames;var Vie=function(e){if(typeof document>"u")return null;var r=Array.isArray(e)?e[0]:e;return r.ownerDocument.body},Gm=new WeakMap,JE=new WeakMap,QE={},HR=0,jL=function(e){return e&&(e.host||jL(e.parentNode))},Hie=function(e,r){return r.map(function(s){if(e.contains(s))return s;var o=jL(s);return o&&e.contains(o)?o:(console.error("aria-hidden",s,"in not contained inside",e,". Doing nothing"),null)}).filter(function(s){return!!s})},Gie=function(e,r,s,o){var d=Hie(r,Array.isArray(e)?e:[e]);QE[s]||(QE[s]=new WeakMap);var p=QE[s],m=[],g=new Set,b=new Set(d),S=function(A){!A||g.has(A)||(g.add(A),S(A.parentNode))};d.forEach(S);var E=function(A){!A||b.has(A)||Array.prototype.forEach.call(A.children,function(k){if(g.has(k))E(k);else try{var T=k.getAttribute(o),M=T!==null&&T!=="false",I=(Gm.get(k)||0)+1,q=(p.get(k)||0)+1;Gm.set(k,I),p.set(k,q),m.push(k),I===1&&M&&JE.set(k,!0),q===1&&k.setAttribute(s,"true"),M||k.setAttribute(o,"true")}catch(G){console.error("aria-hidden: cannot operate on ",k,G)}})};return E(r),g.clear(),HR++,function(){m.forEach(function(A){var k=Gm.get(A)-1,T=p.get(A)-1;Gm.set(A,k),p.set(A,T),k||(JE.has(A)||A.removeAttribute(o),JE.delete(A)),T||A.removeAttribute(s)}),HR--,HR||(Gm=new WeakMap,Gm=new WeakMap,JE=new WeakMap,QE={})}},RC=function(e,r,s){s===void 0&&(s="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),d=Vie(e);return d?(o.push.apply(o,Array.from(d.querySelectorAll("[aria-live], script"))),Gie(o,d,s,"aria-hidden")):function(){return null}};function Xie(e){const r=Yie(e),s=R.forwardRef((o,d)=>{const{children:p,...m}=o,g=R.Children.toArray(p),b=g.find(Wie);if(b){const S=b.props.children,E=g.map(A=>A===b?R.Children.count(S)>1?R.Children.only(null):R.isValidElement(S)?S.props.children:null:A);return u.jsx(r,{...m,ref:d,children:R.isValidElement(S)?R.cloneElement(S,void 0,E):null})}return u.jsx(r,{...m,ref:d,children:p})});return s.displayName=`${e}.Slot`,s}function Yie(e){const r=R.forwardRef((s,o)=>{const{children:d,...p}=s;if(R.isValidElement(d)){const m=Qie(d),g=Jie(p,d.props);return d.type!==R.Fragment&&(g.ref=o?zi(o,m):m),R.cloneElement(d,g)}return R.Children.count(d)>1?R.Children.only(null):null});return r.displayName=`${e}.SlotClone`,r}var Zie=Symbol("radix.slottable");function Wie(e){return R.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Zie}function Jie(e,r){const s={...r};for(const o in r){const d=e[o],p=r[o];/^on[A-Z]/.test(o)?d&&p?s[o]=(...g)=>{const b=p(...g);return d(...g),b}:d&&(s[o]=d):o==="style"?s[o]={...d,...p}:o==="className"&&(s[o]=[d,p].filter(Boolean).join(" "))}return{...e,...s}}function Qie(e){let r=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning;return s?e.ref:(r=Object.getOwnPropertyDescriptor(e,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning,s?e.props.ref:e.props.ref||e.ref)}var TC="Dialog",[CL,AL]=al(TC),[eae,ol]=CL(TC),OL=e=>{const{__scopeDialog:r,children:s,open:o,defaultOpen:d,onOpenChange:p,modal:m=!0}=e,g=R.useRef(null),b=R.useRef(null),[S,E]=qd({prop:o,defaultProp:d??!1,onChange:p,caller:TC});return u.jsx(eae,{scope:r,triggerRef:g,contentRef:b,contentId:Vs(),titleId:Vs(),descriptionId:Vs(),open:S,onOpenChange:E,onOpenToggle:R.useCallback(()=>E(A=>!A),[E]),modal:m,children:s})};OL.displayName=TC;var kL="DialogTrigger",RL=R.forwardRef((e,r)=>{const{__scopeDialog:s,...o}=e,d=ol(kL,s),p=Ln(r,d.triggerRef);return u.jsx(Cn.button,{type:"button","aria-haspopup":"dialog","aria-expanded":d.open,"aria-controls":d.contentId,"data-state":r2(d.open),...o,ref:p,onClick:$t(e.onClick,d.onOpenToggle)})});RL.displayName=kL;var t2="DialogPortal",[tae,TL]=CL(t2,{forceMount:void 0}),_L=e=>{const{__scopeDialog:r,forceMount:s,children:o,container:d}=e,p=ol(t2,r);return u.jsx(tae,{scope:r,forceMount:s,children:R.Children.map(o,m=>u.jsx(co,{present:s||p.open,children:u.jsx(_g,{asChild:!0,container:d,children:m})}))})};_L.displayName=t2;var Uj="DialogOverlay",$L=R.forwardRef((e,r)=>{const s=TL(Uj,e.__scopeDialog),{forceMount:o=s.forceMount,...d}=e,p=ol(Uj,e.__scopeDialog);return p.modal?u.jsx(co,{present:o||p.open,children:u.jsx(rae,{...d,ref:r})}):null});$L.displayName=Uj;var nae=Xie("DialogOverlay.RemoveScroll"),rae=R.forwardRef((e,r)=>{const{__scopeDialog:s,...o}=e,d=ol(Uj,s);return u.jsx(lw,{as:nae,allowPinchZoom:!0,shards:[d.contentRef],children:u.jsx(Cn.div,{"data-state":r2(d.open),...o,ref:r,style:{pointerEvents:"auto",...o.style}})})}),kp="DialogContent",NL=R.forwardRef((e,r)=>{const s=TL(kp,e.__scopeDialog),{forceMount:o=s.forceMount,...d}=e,p=ol(kp,e.__scopeDialog);return u.jsx(co,{present:o||p.open,children:p.modal?u.jsx(sae,{...d,ref:r}):u.jsx(iae,{...d,ref:r})})});NL.displayName=kp;var sae=R.forwardRef((e,r)=>{const s=ol(kp,e.__scopeDialog),o=R.useRef(null),d=Ln(r,s.contentRef,o);return R.useEffect(()=>{const p=o.current;if(p)return RC(p)},[]),u.jsx(DL,{...e,ref:d,trapFocus:s.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:$t(e.onCloseAutoFocus,p=>{p.preventDefault(),s.triggerRef.current?.focus()}),onPointerDownOutside:$t(e.onPointerDownOutside,p=>{const m=p.detail.originalEvent,g=m.button===0&&m.ctrlKey===!0;(m.button===2||g)&&p.preventDefault()}),onFocusOutside:$t(e.onFocusOutside,p=>p.preventDefault())})}),iae=R.forwardRef((e,r)=>{const s=ol(kp,e.__scopeDialog),o=R.useRef(!1),d=R.useRef(!1);return u.jsx(DL,{...e,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:p=>{e.onCloseAutoFocus?.(p),p.defaultPrevented||(o.current||s.triggerRef.current?.focus(),p.preventDefault()),o.current=!1,d.current=!1},onInteractOutside:p=>{e.onInteractOutside?.(p),p.defaultPrevented||(o.current=!0,p.detail.originalEvent.type==="pointerdown"&&(d.current=!0));const m=p.target;s.triggerRef.current?.contains(m)&&p.preventDefault(),p.detail.originalEvent.type==="focusin"&&d.current&&p.preventDefault()}})}),DL=R.forwardRef((e,r)=>{const{__scopeDialog:s,trapFocus:o,onOpenAutoFocus:d,onCloseAutoFocus:p,...m}=e,g=ol(kp,s),b=R.useRef(null),S=Ln(r,b);return OC(),u.jsxs(u.Fragment,{children:[u.jsx(ow,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:d,onUnmountAutoFocus:p,children:u.jsx(kg,{role:"dialog",id:g.contentId,"aria-describedby":g.descriptionId,"aria-labelledby":g.titleId,"data-state":r2(g.open),...m,ref:S,onDismiss:()=>g.onOpenChange(!1)})}),u.jsxs(u.Fragment,{children:[u.jsx(oae,{titleId:g.titleId}),u.jsx(cae,{contentRef:b,descriptionId:g.descriptionId})]})]})}),n2="DialogTitle",PL=R.forwardRef((e,r)=>{const{__scopeDialog:s,...o}=e,d=ol(n2,s);return u.jsx(Cn.h2,{id:d.titleId,...o,ref:r})});PL.displayName=n2;var ML="DialogDescription",IL=R.forwardRef((e,r)=>{const{__scopeDialog:s,...o}=e,d=ol(ML,s);return u.jsx(Cn.p,{id:d.descriptionId,...o,ref:r})});IL.displayName=ML;var zL="DialogClose",LL=R.forwardRef((e,r)=>{const{__scopeDialog:s,...o}=e,d=ol(zL,s);return u.jsx(Cn.button,{type:"button",...o,ref:r,onClick:$t(e.onClick,()=>d.onOpenChange(!1))})});LL.displayName=zL;function r2(e){return e?"open":"closed"}var FL="DialogTitleWarning",[aae,qL]=pne(FL,{contentName:kp,titleName:n2,docsSlug:"dialog"}),oae=({titleId:e})=>{const r=qL(FL),s=`\`${r.contentName}\` requires a \`${r.titleName}\` for the component to be accessible for screen reader users.
|
||
|
||
If you want to hide the \`${r.titleName}\`, you can wrap it with our VisuallyHidden component.
|
||
|
||
For more information, see https://radix-ui.com/primitives/docs/components/${r.docsSlug}`;return R.useEffect(()=>{e&&(document.getElementById(e)||console.error(s))},[s,e]),null},lae="DialogDescriptionWarning",cae=({contentRef:e,descriptionId:r})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${qL(lae).contentName}}.`;return R.useEffect(()=>{const d=e.current?.getAttribute("aria-describedby");r&&d&&(document.getElementById(r)||console.warn(o))},[o,e,r]),null},_C=OL,BL=RL,$C=_L,NC=$L,DC=NL,s2=PL,i2=IL,cw=LL,uae=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Gd=uae.reduce((e,r)=>{const s=tw(`Primitive.${r}`),o=R.forwardRef((d,p)=>{const{asChild:m,...g}=d,b=m?s:r;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(b,{...g,ref:p})});return o.displayName=`Primitive.${r}`,{...e,[r]:o}},{}),sb='[cmdk-group=""]',GR='[cmdk-group-items=""]',dae='[cmdk-group-heading=""]',UL='[cmdk-item=""]',CI=`${UL}:not([aria-disabled="true"])`,BT="cmdk-item-select",Zm="data-value",hae=(e,r,s)=>tie(e,r,s),KL=R.createContext(void 0),uw=()=>R.useContext(KL),VL=R.createContext(void 0),a2=()=>R.useContext(VL),HL=R.createContext(void 0),GL=R.forwardRef((e,r)=>{let s=Wm(()=>{var Oe,ke;return{search:"",value:(ke=(Oe=e.value)!=null?Oe:e.defaultValue)!=null?ke:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),o=Wm(()=>new Set),d=Wm(()=>new Map),p=Wm(()=>new Map),m=Wm(()=>new Set),g=XL(e),{label:b,children:S,value:E,onValueChange:A,filter:k,shouldFilter:T,loop:M,disablePointerSelection:I=!1,vimBindings:q=!0,...G}=e,K=Vs(),X=Vs(),z=Vs(),ee=R.useRef(null),oe=Eae();Rp(()=>{if(E!==void 0){let Oe=E.trim();s.current.value=Oe,Q.emit()}},[E]),Rp(()=>{oe(6,be)},[]);let Q=R.useMemo(()=>({subscribe:Oe=>(m.current.add(Oe),()=>m.current.delete(Oe)),snapshot:()=>s.current,setState:(Oe,ke,Ve)=>{var ie,Ne,ze,tt;if(!Object.is(s.current[Oe],ke)){if(s.current[Oe]=ke,Oe==="search")le(),Ce(),oe(1,xe);else if(Oe==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let ft=document.getElementById(z);ft?ft.focus():(ie=document.getElementById(K))==null||ie.focus()}if(oe(7,()=>{var ft;s.current.selectedItemId=(ft=je())==null?void 0:ft.id,Q.emit()}),Ve||oe(5,be),((Ne=g.current)==null?void 0:Ne.value)!==void 0){let ft=ke??"";(tt=(ze=g.current).onValueChange)==null||tt.call(ze,ft);return}}Q.emit()}},emit:()=>{m.current.forEach(Oe=>Oe())}}),[]),ne=R.useMemo(()=>({value:(Oe,ke,Ve)=>{var ie;ke!==((ie=p.current.get(Oe))==null?void 0:ie.value)&&(p.current.set(Oe,{value:ke,keywords:Ve}),s.current.filtered.items.set(Oe,de(ke,Ve)),oe(2,()=>{Ce(),Q.emit()}))},item:(Oe,ke)=>(o.current.add(Oe),ke&&(d.current.has(ke)?d.current.get(ke).add(Oe):d.current.set(ke,new Set([Oe]))),oe(3,()=>{le(),Ce(),s.current.value||xe(),Q.emit()}),()=>{p.current.delete(Oe),o.current.delete(Oe),s.current.filtered.items.delete(Oe);let Ve=je();oe(4,()=>{le(),Ve?.getAttribute("id")===Oe&&xe(),Q.emit()})}),group:Oe=>(d.current.has(Oe)||d.current.set(Oe,new Set),()=>{p.current.delete(Oe),d.current.delete(Oe)}),filter:()=>g.current.shouldFilter,label:b||e["aria-label"],getDisablePointerSelection:()=>g.current.disablePointerSelection,listId:K,inputId:z,labelId:X,listInnerRef:ee}),[]);function de(Oe,ke){var Ve,ie;let Ne=(ie=(Ve=g.current)==null?void 0:Ve.filter)!=null?ie:hae;return Oe?Ne(Oe,s.current.search,ke):0}function Ce(){if(!s.current.search||g.current.shouldFilter===!1)return;let Oe=s.current.filtered.items,ke=[];s.current.filtered.groups.forEach(ie=>{let Ne=d.current.get(ie),ze=0;Ne.forEach(tt=>{let ft=Oe.get(tt);ze=Math.max(ft,ze)}),ke.push([ie,ze])});let Ve=ee.current;Ke().sort((ie,Ne)=>{var ze,tt;let ft=ie.getAttribute("id"),Ot=Ne.getAttribute("id");return((ze=Oe.get(Ot))!=null?ze:0)-((tt=Oe.get(ft))!=null?tt:0)}).forEach(ie=>{let Ne=ie.closest(GR);Ne?Ne.appendChild(ie.parentElement===Ne?ie:ie.closest(`${GR} > *`)):Ve.appendChild(ie.parentElement===Ve?ie:ie.closest(`${GR} > *`))}),ke.sort((ie,Ne)=>Ne[1]-ie[1]).forEach(ie=>{var Ne;let ze=(Ne=ee.current)==null?void 0:Ne.querySelector(`${sb}[${Zm}="${encodeURIComponent(ie[0])}"]`);ze?.parentElement.appendChild(ze)})}function xe(){let Oe=Ke().find(Ve=>Ve.getAttribute("aria-disabled")!=="true"),ke=Oe?.getAttribute(Zm);Q.setState("value",ke||void 0)}function le(){var Oe,ke,Ve,ie;if(!s.current.search||g.current.shouldFilter===!1){s.current.filtered.count=o.current.size;return}s.current.filtered.groups=new Set;let Ne=0;for(let ze of o.current){let tt=(ke=(Oe=p.current.get(ze))==null?void 0:Oe.value)!=null?ke:"",ft=(ie=(Ve=p.current.get(ze))==null?void 0:Ve.keywords)!=null?ie:[],Ot=de(tt,ft);s.current.filtered.items.set(ze,Ot),Ot>0&&Ne++}for(let[ze,tt]of d.current)for(let ft of tt)if(s.current.filtered.items.get(ft)>0){s.current.filtered.groups.add(ze);break}s.current.filtered.count=Ne}function be(){var Oe,ke,Ve;let ie=je();ie&&(((Oe=ie.parentElement)==null?void 0:Oe.firstChild)===ie&&((Ve=(ke=ie.closest(sb))==null?void 0:ke.querySelector(dae))==null||Ve.scrollIntoView({block:"nearest"})),ie.scrollIntoView({block:"nearest"}))}function je(){var Oe;return(Oe=ee.current)==null?void 0:Oe.querySelector(`${UL}[aria-selected="true"]`)}function Ke(){var Oe;return Array.from(((Oe=ee.current)==null?void 0:Oe.querySelectorAll(CI))||[])}function ce(Oe){let ke=Ke()[Oe];ke&&Q.setState("value",ke.getAttribute(Zm))}function re(Oe){var ke;let Ve=je(),ie=Ke(),Ne=ie.findIndex(tt=>tt===Ve),ze=ie[Ne+Oe];(ke=g.current)!=null&&ke.loop&&(ze=Ne+Oe<0?ie[ie.length-1]:Ne+Oe===ie.length?ie[0]:ie[Ne+Oe]),ze&&Q.setState("value",ze.getAttribute(Zm))}function ue(Oe){let ke=je(),Ve=ke?.closest(sb),ie;for(;Ve&&!ie;)Ve=Oe>0?wae(Ve,sb):Sae(Ve,sb),ie=Ve?.querySelector(CI);ie?Q.setState("value",ie.getAttribute(Zm)):re(Oe)}let _e=()=>ce(Ke().length-1),fe=Oe=>{Oe.preventDefault(),Oe.metaKey?_e():Oe.altKey?ue(1):re(1)},He=Oe=>{Oe.preventDefault(),Oe.metaKey?ce(0):Oe.altKey?ue(-1):re(-1)};return R.createElement(Gd.div,{ref:r,tabIndex:-1,...G,"cmdk-root":"",onKeyDown:Oe=>{var ke;(ke=G.onKeyDown)==null||ke.call(G,Oe);let Ve=Oe.nativeEvent.isComposing||Oe.keyCode===229;if(!(Oe.defaultPrevented||Ve))switch(Oe.key){case"n":case"j":{q&&Oe.ctrlKey&&fe(Oe);break}case"ArrowDown":{fe(Oe);break}case"p":case"k":{q&&Oe.ctrlKey&&He(Oe);break}case"ArrowUp":{He(Oe);break}case"Home":{Oe.preventDefault(),ce(0);break}case"End":{Oe.preventDefault(),_e();break}case"Enter":{Oe.preventDefault();let ie=je();if(ie){let Ne=new Event(BT);ie.dispatchEvent(Ne)}}}}},R.createElement("label",{"cmdk-label":"",htmlFor:ne.inputId,id:ne.labelId,style:Cae},b),PC(e,Oe=>R.createElement(VL.Provider,{value:Q},R.createElement(KL.Provider,{value:ne},Oe))))}),pae=R.forwardRef((e,r)=>{var s,o;let d=Vs(),p=R.useRef(null),m=R.useContext(HL),g=uw(),b=XL(e),S=(o=(s=b.current)==null?void 0:s.forceMount)!=null?o:m?.forceMount;Rp(()=>{if(!S)return g.item(d,m?.id)},[S]);let E=YL(d,p,[e.value,e.children,p],e.keywords),A=a2(),k=Bd(oe=>oe.value&&oe.value===E.current),T=Bd(oe=>S||g.filter()===!1?!0:oe.search?oe.filtered.items.get(d)>0:!0);R.useEffect(()=>{let oe=p.current;if(!(!oe||e.disabled))return oe.addEventListener(BT,M),()=>oe.removeEventListener(BT,M)},[T,e.onSelect,e.disabled]);function M(){var oe,Q;I(),(Q=(oe=b.current).onSelect)==null||Q.call(oe,E.current)}function I(){A.setState("value",E.current,!0)}if(!T)return null;let{disabled:q,value:G,onSelect:K,forceMount:X,keywords:z,...ee}=e;return R.createElement(Gd.div,{ref:zi(p,r),...ee,id:d,"cmdk-item":"",role:"option","aria-disabled":!!q,"aria-selected":!!k,"data-disabled":!!q,"data-selected":!!k,onPointerMove:q||g.getDisablePointerSelection()?void 0:I,onClick:q?void 0:M},e.children)}),fae=R.forwardRef((e,r)=>{let{heading:s,children:o,forceMount:d,...p}=e,m=Vs(),g=R.useRef(null),b=R.useRef(null),S=Vs(),E=uw(),A=Bd(T=>d||E.filter()===!1?!0:T.search?T.filtered.groups.has(m):!0);Rp(()=>E.group(m),[]),YL(m,g,[e.value,e.heading,b]);let k=R.useMemo(()=>({id:m,forceMount:d}),[d]);return R.createElement(Gd.div,{ref:zi(g,r),...p,"cmdk-group":"",role:"presentation",hidden:A?void 0:!0},s&&R.createElement("div",{ref:b,"cmdk-group-heading":"","aria-hidden":!0,id:S},s),PC(e,T=>R.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":s?S:void 0},R.createElement(HL.Provider,{value:k},T))))}),mae=R.forwardRef((e,r)=>{let{alwaysRender:s,...o}=e,d=R.useRef(null),p=Bd(m=>!m.search);return!s&&!p?null:R.createElement(Gd.div,{ref:zi(d,r),...o,"cmdk-separator":"",role:"separator"})}),gae=R.forwardRef((e,r)=>{let{onValueChange:s,...o}=e,d=e.value!=null,p=a2(),m=Bd(S=>S.search),g=Bd(S=>S.selectedItemId),b=uw();return R.useEffect(()=>{e.value!=null&&p.setState("search",e.value)},[e.value]),R.createElement(Gd.input,{ref:r,...o,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":b.listId,"aria-labelledby":b.labelId,"aria-activedescendant":g,id:b.inputId,type:"text",value:d?e.value:m,onChange:S=>{d||p.setState("search",S.target.value),s?.(S.target.value)}})}),yae=R.forwardRef((e,r)=>{let{children:s,label:o="Suggestions",...d}=e,p=R.useRef(null),m=R.useRef(null),g=Bd(S=>S.selectedItemId),b=uw();return R.useEffect(()=>{if(m.current&&p.current){let S=m.current,E=p.current,A,k=new ResizeObserver(()=>{A=requestAnimationFrame(()=>{let T=S.offsetHeight;E.style.setProperty("--cmdk-list-height",T.toFixed(1)+"px")})});return k.observe(S),()=>{cancelAnimationFrame(A),k.unobserve(S)}}},[]),R.createElement(Gd.div,{ref:zi(p,r),...d,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":g,"aria-label":o,id:b.listId},PC(e,S=>R.createElement("div",{ref:zi(m,b.listInnerRef),"cmdk-list-sizer":""},S)))}),vae=R.forwardRef((e,r)=>{let{open:s,onOpenChange:o,overlayClassName:d,contentClassName:p,container:m,...g}=e;return R.createElement(_C,{open:s,onOpenChange:o},R.createElement($C,{container:m},R.createElement(NC,{"cmdk-overlay":"",className:d}),R.createElement(DC,{"aria-label":e.label,"cmdk-dialog":"",className:p},R.createElement(GL,{ref:r,...g}))))}),xae=R.forwardRef((e,r)=>Bd(s=>s.filtered.count===0)?R.createElement(Gd.div,{ref:r,...e,"cmdk-empty":"",role:"presentation"}):null),bae=R.forwardRef((e,r)=>{let{progress:s,children:o,label:d="Loading...",...p}=e;return R.createElement(Gd.div,{ref:r,...p,"cmdk-loading":"",role:"progressbar","aria-valuenow":s,"aria-valuemin":0,"aria-valuemax":100,"aria-label":d},PC(e,m=>R.createElement("div",{"aria-hidden":!0},m)))}),$g=Object.assign(GL,{List:yae,Item:pae,Input:gae,Group:fae,Separator:mae,Dialog:vae,Empty:xae,Loading:bae});function wae(e,r){let s=e.nextElementSibling;for(;s;){if(s.matches(r))return s;s=s.nextElementSibling}}function Sae(e,r){let s=e.previousElementSibling;for(;s;){if(s.matches(r))return s;s=s.previousElementSibling}}function XL(e){let r=R.useRef(e);return Rp(()=>{r.current=e}),r}var Rp=typeof window>"u"?R.useEffect:R.useLayoutEffect;function Wm(e){let r=R.useRef();return r.current===void 0&&(r.current=e()),r}function Bd(e){let r=a2(),s=()=>e(r.snapshot());return R.useSyncExternalStore(r.subscribe,s,s)}function YL(e,r,s,o=[]){let d=R.useRef(),p=uw();return Rp(()=>{var m;let g=(()=>{var S;for(let E of s){if(typeof E=="string")return E.trim();if(typeof E=="object"&&"current"in E)return E.current?(S=E.current.textContent)==null?void 0:S.trim():d.current}})(),b=o.map(S=>S.trim());p.value(e,g,b),(m=r.current)==null||m.setAttribute(Zm,g),d.current=g}),d}var Eae=()=>{let[e,r]=R.useState(),s=Wm(()=>new Map);return Rp(()=>{s.current.forEach(o=>o()),s.current=new Map},[e]),(o,d)=>{s.current.set(o,d),r({})}};function jae(e){let r=e.type;return typeof r=="function"?r(e.props):"render"in r?r.render(e.props):e}function PC({asChild:e,children:r},s){return e&&R.isValidElement(r)?R.cloneElement(jae(r),{ref:r.ref},s(r.props.children)):s(r)}var Cae={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function fn({...e}){return u.jsx(_C,{"data-slot":"dialog",...e})}function Li({...e}){return u.jsx(BL,{"data-slot":"dialog-trigger",...e})}function Aae({...e}){return u.jsx($C,{"data-slot":"dialog-portal",...e})}function Kj({...e}){return u.jsx(cw,{"data-slot":"dialog-close",...e})}function Oae({className:e,...r}){return u.jsx(NC,{"data-slot":"dialog-overlay",className:ht("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/50",e),...r})}function mn({className:e,children:r,showCloseButton:s=!0,...o}){return u.jsxs(Aae,{"data-slot":"dialog-portal",children:[u.jsx(Oae,{}),u.jsxs(DC,{"data-slot":"dialog-content",className:ht("bg-background 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)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",e),...o,children:[r,s&&u.jsxs(cw,{"data-slot":"dialog-close",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:[u.jsx(F_,{}),u.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function gn({className:e,...r}){return u.jsx("div",{"data-slot":"dialog-header",className:ht("flex flex-col gap-2 text-center sm:text-left",e),...r})}function Sn({className:e,...r}){return u.jsx("div",{"data-slot":"dialog-footer",className:ht("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...r})}function yn({className:e,...r}){return u.jsx(s2,{"data-slot":"dialog-title",className:ht("text-lg leading-none font-semibold",e),...r})}function XR({className:e,...r}){return u.jsx(i2,{"data-slot":"dialog-description",className:ht("text-muted-foreground text-sm",e),...r})}function kae({className:e,...r}){return u.jsx($g,{"data-slot":"command",className:ht("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...r})}function Rae({className:e,...r}){return u.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-9 items-center gap-2 border-b px-3",children:[u.jsx(Pa,{className:"size-4 shrink-0 opacity-50"}),u.jsx($g.Input,{"data-slot":"command-input",className:ht("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",e),...r})]})}function Tae({className:e,...r}){return u.jsx($g.List,{"data-slot":"command-list",className:ht("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",e),...r})}function _ae({...e}){return u.jsx($g.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...e})}function $ae({className:e,...r}){return u.jsx($g.Group,{"data-slot":"command-group",className:ht("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",e),...r})}function Nae({className:e,...r}){return u.jsx($g.Item,{"data-slot":"command-item",className:ht("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r})}function Dae(e){const r=Pae(e),s=R.forwardRef((o,d)=>{const{children:p,...m}=o,g=R.Children.toArray(p),b=g.find(Iae);if(b){const S=b.props.children,E=g.map(A=>A===b?R.Children.count(S)>1?R.Children.only(null):R.isValidElement(S)?S.props.children:null:A);return u.jsx(r,{...m,ref:d,children:R.isValidElement(S)?R.cloneElement(S,void 0,E):null})}return u.jsx(r,{...m,ref:d,children:p})});return s.displayName=`${e}.Slot`,s}function Pae(e){const r=R.forwardRef((s,o)=>{const{children:d,...p}=s;if(R.isValidElement(d)){const m=Lae(d),g=zae(p,d.props);return d.type!==R.Fragment&&(g.ref=o?zi(o,m):m),R.cloneElement(d,g)}return R.Children.count(d)>1?R.Children.only(null):null});return r.displayName=`${e}.SlotClone`,r}var Mae=Symbol("radix.slottable");function Iae(e){return R.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Mae}function zae(e,r){const s={...r};for(const o in r){const d=e[o],p=r[o];/^on[A-Z]/.test(o)?d&&p?s[o]=(...g)=>{const b=p(...g);return d(...g),b}:d&&(s[o]=d):o==="style"?s[o]={...d,...p}:o==="className"&&(s[o]=[d,p].filter(Boolean).join(" "))}return{...e,...s}}function Lae(e){let r=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning;return s?e.ref:(r=Object.getOwnPropertyDescriptor(e,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning,s?e.props.ref:e.props.ref||e.ref)}var MC="Popover",[ZL]=al(MC,[Hd]),dw=Hd(),[Fae,Xd]=ZL(MC),WL=e=>{const{__scopePopover:r,children:s,open:o,defaultOpen:d,onOpenChange:p,modal:m=!1}=e,g=dw(r),b=R.useRef(null),[S,E]=R.useState(!1),[A,k]=qd({prop:o,defaultProp:d??!1,onChange:p,caller:MC});return u.jsx(SC,{...g,children:u.jsx(Fae,{scope:r,contentId:Vs(),triggerRef:b,open:A,onOpenChange:k,onOpenToggle:R.useCallback(()=>k(T=>!T),[k]),hasCustomAnchor:S,onCustomAnchorAdd:R.useCallback(()=>E(!0),[]),onCustomAnchorRemove:R.useCallback(()=>E(!1),[]),modal:m,children:s})})};WL.displayName=MC;var JL="PopoverAnchor",qae=R.forwardRef((e,r)=>{const{__scopePopover:s,...o}=e,d=Xd(JL,s),p=dw(s),{onCustomAnchorAdd:m,onCustomAnchorRemove:g}=d;return R.useEffect(()=>(m(),()=>g()),[m,g]),u.jsx(rw,{...p,...o,ref:r})});qae.displayName=JL;var QL="PopoverTrigger",e5=R.forwardRef((e,r)=>{const{__scopePopover:s,...o}=e,d=Xd(QL,s),p=dw(s),m=Ln(r,d.triggerRef),g=u.jsx(Cn.button,{type:"button","aria-haspopup":"dialog","aria-expanded":d.open,"aria-controls":d.contentId,"data-state":i5(d.open),...o,ref:m,onClick:$t(e.onClick,d.onOpenToggle)});return d.hasCustomAnchor?g:u.jsx(rw,{asChild:!0,...p,children:g})});e5.displayName=QL;var o2="PopoverPortal",[Bae,Uae]=ZL(o2,{forceMount:void 0}),t5=e=>{const{__scopePopover:r,forceMount:s,children:o,container:d}=e,p=Xd(o2,r);return u.jsx(Bae,{scope:r,forceMount:s,children:u.jsx(co,{present:s||p.open,children:u.jsx(_g,{asChild:!0,container:d,children:o})})})};t5.displayName=o2;var bg="PopoverContent",n5=R.forwardRef((e,r)=>{const s=Uae(bg,e.__scopePopover),{forceMount:o=s.forceMount,...d}=e,p=Xd(bg,e.__scopePopover);return u.jsx(co,{present:o||p.open,children:p.modal?u.jsx(Vae,{...d,ref:r}):u.jsx(Hae,{...d,ref:r})})});n5.displayName=bg;var Kae=Dae("PopoverContent.RemoveScroll"),Vae=R.forwardRef((e,r)=>{const s=Xd(bg,e.__scopePopover),o=R.useRef(null),d=Ln(r,o),p=R.useRef(!1);return R.useEffect(()=>{const m=o.current;if(m)return RC(m)},[]),u.jsx(lw,{as:Kae,allowPinchZoom:!0,children:u.jsx(r5,{...e,ref:d,trapFocus:s.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:$t(e.onCloseAutoFocus,m=>{m.preventDefault(),p.current||s.triggerRef.current?.focus()}),onPointerDownOutside:$t(e.onPointerDownOutside,m=>{const g=m.detail.originalEvent,b=g.button===0&&g.ctrlKey===!0,S=g.button===2||b;p.current=S},{checkForDefaultPrevented:!1}),onFocusOutside:$t(e.onFocusOutside,m=>m.preventDefault(),{checkForDefaultPrevented:!1})})})}),Hae=R.forwardRef((e,r)=>{const s=Xd(bg,e.__scopePopover),o=R.useRef(!1),d=R.useRef(!1);return u.jsx(r5,{...e,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:p=>{e.onCloseAutoFocus?.(p),p.defaultPrevented||(o.current||s.triggerRef.current?.focus(),p.preventDefault()),o.current=!1,d.current=!1},onInteractOutside:p=>{e.onInteractOutside?.(p),p.defaultPrevented||(o.current=!0,p.detail.originalEvent.type==="pointerdown"&&(d.current=!0));const m=p.target;s.triggerRef.current?.contains(m)&&p.preventDefault(),p.detail.originalEvent.type==="focusin"&&d.current&&p.preventDefault()}})}),r5=R.forwardRef((e,r)=>{const{__scopePopover:s,trapFocus:o,onOpenAutoFocus:d,onCloseAutoFocus:p,disableOutsidePointerEvents:m,onEscapeKeyDown:g,onPointerDownOutside:b,onFocusOutside:S,onInteractOutside:E,...A}=e,k=Xd(bg,s),T=dw(s);return OC(),u.jsx(ow,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:d,onUnmountAutoFocus:p,children:u.jsx(kg,{asChild:!0,disableOutsidePointerEvents:m,onInteractOutside:E,onEscapeKeyDown:g,onPointerDownOutside:b,onFocusOutside:S,onDismiss:()=>k.onOpenChange(!1),children:u.jsx(EC,{"data-state":i5(k.open),role:"dialog",id:k.contentId,...T,...A,ref:r,style:{...A.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),s5="PopoverClose",Gae=R.forwardRef((e,r)=>{const{__scopePopover:s,...o}=e,d=Xd(s5,s);return u.jsx(Cn.button,{type:"button",...o,ref:r,onClick:$t(e.onClick,()=>d.onOpenChange(!1))})});Gae.displayName=s5;var Xae="PopoverArrow",Yae=R.forwardRef((e,r)=>{const{__scopePopover:s,...o}=e,d=dw(s);return u.jsx(jC,{...d,...o,ref:r})});Yae.displayName=Xae;function i5(e){return e?"open":"closed"}var Zae=WL,Wae=e5,Jae=t5,Qae=n5;function eoe({...e}){return u.jsx(Zae,{"data-slot":"popover",...e})}function toe({...e}){return u.jsx(Wae,{"data-slot":"popover-trigger",...e})}function noe({className:e,align:r="center",sideOffset:s=4,...o}){return u.jsx(Jae,{children:u.jsx(Qae,{"data-slot":"popover-content",align:r,sideOffset:s,className:ht("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 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",e),...o})})}const roe=({orgs:e})=>{const[r,s]=R.useState(!1),[o,d]=R.useState(Qo.get()??"");R.useEffect(()=>Qo.subscribe(m=>d(m??"")),[]);const p=e.find(m=>m.id===o);return u.jsxs(eoe,{open:r,onOpenChange:s,children:[u.jsx(toe,{asChild:!0,children:u.jsxs(Fe,{variant:"ghost",className:"h-9 w-full justify-between px-2","aria-label":"Switch organization",children:[u.jsxs("span",{className:"flex items-center gap-2 truncate",children:[u.jsx(sz,{className:"h-4 w-4"}),u.jsx("span",{className:"truncate",children:p?.name??"Select org"})]}),u.jsx(CZ,{className:"ml-2 h-4 w-4 opacity-50"})]})}),u.jsx(noe,{className:"w-[280px] p-0",align:"start",children:u.jsxs(kae,{children:[u.jsx(Rae,{placeholder:"Search orgs..."}),u.jsxs(Tae,{children:[u.jsx(_ae,{children:"No orgs found."}),u.jsx($ae,{heading:"Organizations",children:e.map(m=>u.jsxs(Nae,{value:m.id,onSelect:g=>{Qo.set(g),s(!1)},children:[u.jsx(iz,{className:ht("mr-2 h-4 w-4",o===m.id?"opacity-100":"opacity-0")}),u.jsx("span",{className:"truncate",children:m.name})]},m.id))})]})]})})]})},a5=R.createContext({});function soe(e){const r=R.useRef(null);return r.current===null&&(r.current=e()),r.current}const l2=typeof window<"u",ioe=l2?R.useLayoutEffect:R.useEffect,c2=R.createContext(null);function u2(e,r){e.indexOf(r)===-1&&e.push(r)}function d2(e,r){const s=e.indexOf(r);s>-1&&e.splice(s,1)}const gu=(e,r,s)=>s>r?r:s<e?e:s;let h2=()=>{};const yu={},o5=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function l5(e){return typeof e=="object"&&e!==null}const c5=e=>/^0[^.\s]+$/u.test(e);function p2(e){let r;return()=>(r===void 0&&(r=e()),r)}const io=e=>e,aoe=(e,r)=>s=>r(e(s)),hw=(...e)=>e.reduce(aoe),Bb=(e,r,s)=>{const o=r-e;return o===0?1:(s-e)/o};class f2{constructor(){this.subscriptions=[]}add(r){return u2(this.subscriptions,r),()=>d2(this.subscriptions,r)}notify(r,s,o){const d=this.subscriptions.length;if(d)if(d===1)this.subscriptions[0](r,s,o);else for(let p=0;p<d;p++){const m=this.subscriptions[p];m&&m(r,s,o)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const ic=e=>e*1e3,so=e=>e/1e3;function u5(e,r){return r?e*(1e3/r):0}const d5=(e,r,s)=>(((1-3*s+3*r)*e+(3*s-6*r))*e+3*r)*e,ooe=1e-7,loe=12;function coe(e,r,s,o,d){let p,m,g=0;do m=r+(s-r)/2,p=d5(m,o,d)-e,p>0?s=m:r=m;while(Math.abs(p)>ooe&&++g<loe);return m}function pw(e,r,s,o){if(e===r&&s===o)return io;const d=p=>coe(p,0,1,e,s);return p=>p===0||p===1?p:d5(d(p),r,o)}const h5=e=>r=>r<=.5?e(2*r)/2:(2-e(2*(1-r)))/2,p5=e=>r=>1-e(1-r),f5=pw(.33,1.53,.69,.99),m2=p5(f5),m5=h5(m2),g5=e=>(e*=2)<1?.5*m2(e):.5*(2-Math.pow(2,-10*(e-1))),g2=e=>1-Math.sin(Math.acos(e)),y5=p5(g2),v5=h5(g2),uoe=pw(.42,0,1,1),doe=pw(0,0,.58,1),x5=pw(.42,0,.58,1),hoe=e=>Array.isArray(e)&&typeof e[0]!="number",b5=e=>Array.isArray(e)&&typeof e[0]=="number",poe={linear:io,easeIn:uoe,easeInOut:x5,easeOut:doe,circIn:g2,circInOut:v5,circOut:y5,backIn:m2,backInOut:m5,backOut:f5,anticipate:g5},foe=e=>typeof e=="string",AI=e=>{if(b5(e)){h2(e.length===4);const[r,s,o,d]=e;return pw(r,s,o,d)}else if(foe(e))return poe[e];return e},ej=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function moe(e,r){let s=new Set,o=new Set,d=!1,p=!1;const m=new WeakSet;let g={delta:0,timestamp:0,isProcessing:!1};function b(E){m.has(E)&&(S.schedule(E),e()),E(g)}const S={schedule:(E,A=!1,k=!1)=>{const M=k&&d?s:o;return A&&m.add(E),M.has(E)||M.add(E),E},cancel:E=>{o.delete(E),m.delete(E)},process:E=>{if(g=E,d){p=!0;return}d=!0,[s,o]=[o,s],s.forEach(b),s.clear(),d=!1,p&&(p=!1,S.process(E))}};return S}const goe=40;function w5(e,r){let s=!1,o=!0;const d={delta:0,timestamp:0,isProcessing:!1},p=()=>s=!0,m=ej.reduce((X,z)=>(X[z]=moe(p),X),{}),{setup:g,read:b,resolveKeyframes:S,preUpdate:E,update:A,preRender:k,render:T,postRender:M}=m,I=()=>{const X=yu.useManualTiming?d.timestamp:performance.now();s=!1,yu.useManualTiming||(d.delta=o?1e3/60:Math.max(Math.min(X-d.timestamp,goe),1)),d.timestamp=X,d.isProcessing=!0,g.process(d),b.process(d),S.process(d),E.process(d),A.process(d),k.process(d),T.process(d),M.process(d),d.isProcessing=!1,s&&r&&(o=!1,e(I))},q=()=>{s=!0,o=!0,d.isProcessing||e(I)};return{schedule:ej.reduce((X,z)=>{const ee=m[z];return X[z]=(oe,Q=!1,ne=!1)=>(s||q(),ee.schedule(oe,Q,ne)),X},{}),cancel:X=>{for(let z=0;z<ej.length;z++)m[ej[z]].cancel(X)},state:d,steps:m}}const{schedule:_r,cancel:Ud,state:Us,steps:YR}=w5(typeof requestAnimationFrame<"u"?requestAnimationFrame:io,!0);let bj;function yoe(){bj=void 0}const da={now:()=>(bj===void 0&&da.set(Us.isProcessing||yu.useManualTiming?Us.timestamp:performance.now()),bj),set:e=>{bj=e,queueMicrotask(yoe)}},S5=e=>r=>typeof r=="string"&&r.startsWith(e),y2=S5("--"),voe=S5("var(--"),v2=e=>voe(e)?xoe.test(e.split("/*")[0].trim()):!1,xoe=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Ng={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ub={...Ng,transform:e=>gu(0,1,e)},tj={...Ng,default:1},Tb=e=>Math.round(e*1e5)/1e5,x2=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function boe(e){return e==null}const woe=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,b2=(e,r)=>s=>!!(typeof s=="string"&&woe.test(s)&&s.startsWith(e)||r&&!boe(s)&&Object.prototype.hasOwnProperty.call(s,r)),E5=(e,r,s)=>o=>{if(typeof o!="string")return o;const[d,p,m,g]=o.match(x2);return{[e]:parseFloat(d),[r]:parseFloat(p),[s]:parseFloat(m),alpha:g!==void 0?parseFloat(g):1}},Soe=e=>gu(0,255,e),ZR={...Ng,transform:e=>Math.round(Soe(e))},xp={test:b2("rgb","red"),parse:E5("red","green","blue"),transform:({red:e,green:r,blue:s,alpha:o=1})=>"rgba("+ZR.transform(e)+", "+ZR.transform(r)+", "+ZR.transform(s)+", "+Tb(Ub.transform(o))+")"};function Eoe(e){let r="",s="",o="",d="";return e.length>5?(r=e.substring(1,3),s=e.substring(3,5),o=e.substring(5,7),d=e.substring(7,9)):(r=e.substring(1,2),s=e.substring(2,3),o=e.substring(3,4),d=e.substring(4,5),r+=r,s+=s,o+=o,d+=d),{red:parseInt(r,16),green:parseInt(s,16),blue:parseInt(o,16),alpha:d?parseInt(d,16)/255:1}}const UT={test:b2("#"),parse:Eoe,transform:xp.transform},fw=e=>({test:r=>typeof r=="string"&&r.endsWith(e)&&r.split(" ").length===1,parse:parseFloat,transform:r=>`${r}${e}`}),Md=fw("deg"),ac=fw("%"),tn=fw("px"),joe=fw("vh"),Coe=fw("vw"),OI={...ac,parse:e=>ac.parse(e)/100,transform:e=>ac.transform(e*100)},ig={test:b2("hsl","hue"),parse:E5("hue","saturation","lightness"),transform:({hue:e,saturation:r,lightness:s,alpha:o=1})=>"hsla("+Math.round(e)+", "+ac.transform(Tb(r))+", "+ac.transform(Tb(s))+", "+Tb(Ub.transform(o))+")"},ms={test:e=>xp.test(e)||UT.test(e)||ig.test(e),parse:e=>xp.test(e)?xp.parse(e):ig.test(e)?ig.parse(e):UT.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?xp.transform(e):ig.transform(e),getAnimatableNone:e=>{const r=ms.parse(e);return r.alpha=0,ms.transform(r)}},Aoe=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Ooe(e){return isNaN(e)&&typeof e=="string"&&(e.match(x2)?.length||0)+(e.match(Aoe)?.length||0)>0}const j5="number",C5="color",koe="var",Roe="var(",kI="${}",Toe=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Kb(e){const r=e.toString(),s=[],o={color:[],number:[],var:[]},d=[];let p=0;const g=r.replace(Toe,b=>(ms.test(b)?(o.color.push(p),d.push(C5),s.push(ms.parse(b))):b.startsWith(Roe)?(o.var.push(p),d.push(koe),s.push(b)):(o.number.push(p),d.push(j5),s.push(parseFloat(b))),++p,kI)).split(kI);return{values:s,split:g,indexes:o,types:d}}function A5(e){return Kb(e).values}function O5(e){const{split:r,types:s}=Kb(e),o=r.length;return d=>{let p="";for(let m=0;m<o;m++)if(p+=r[m],d[m]!==void 0){const g=s[m];g===j5?p+=Tb(d[m]):g===C5?p+=ms.transform(d[m]):p+=d[m]}return p}}const _oe=e=>typeof e=="number"?0:ms.test(e)?ms.getAnimatableNone(e):e;function $oe(e){const r=A5(e);return O5(e)(r.map(_oe))}const Kd={test:Ooe,parse:A5,createTransformer:O5,getAnimatableNone:$oe};function WR(e,r,s){return s<0&&(s+=1),s>1&&(s-=1),s<1/6?e+(r-e)*6*s:s<1/2?r:s<2/3?e+(r-e)*(2/3-s)*6:e}function Noe({hue:e,saturation:r,lightness:s,alpha:o}){e/=360,r/=100,s/=100;let d=0,p=0,m=0;if(!r)d=p=m=s;else{const g=s<.5?s*(1+r):s+r-s*r,b=2*s-g;d=WR(b,g,e+1/3),p=WR(b,g,e),m=WR(b,g,e-1/3)}return{red:Math.round(d*255),green:Math.round(p*255),blue:Math.round(m*255),alpha:o}}function Vj(e,r){return s=>s>0?r:e}const zr=(e,r,s)=>e+(r-e)*s,JR=(e,r,s)=>{const o=e*e,d=s*(r*r-o)+o;return d<0?0:Math.sqrt(d)},Doe=[UT,xp,ig],Poe=e=>Doe.find(r=>r.test(e));function RI(e){const r=Poe(e);if(!r)return!1;let s=r.parse(e);return r===ig&&(s=Noe(s)),s}const TI=(e,r)=>{const s=RI(e),o=RI(r);if(!s||!o)return Vj(e,r);const d={...s};return p=>(d.red=JR(s.red,o.red,p),d.green=JR(s.green,o.green,p),d.blue=JR(s.blue,o.blue,p),d.alpha=zr(s.alpha,o.alpha,p),xp.transform(d))},KT=new Set(["none","hidden"]);function Moe(e,r){return KT.has(e)?s=>s<=0?e:r:s=>s>=1?r:e}function Ioe(e,r){return s=>zr(e,r,s)}function w2(e){return typeof e=="number"?Ioe:typeof e=="string"?v2(e)?Vj:ms.test(e)?TI:Foe:Array.isArray(e)?k5:typeof e=="object"?ms.test(e)?TI:zoe:Vj}function k5(e,r){const s=[...e],o=s.length,d=e.map((p,m)=>w2(p)(p,r[m]));return p=>{for(let m=0;m<o;m++)s[m]=d[m](p);return s}}function zoe(e,r){const s={...e,...r},o={};for(const d in s)e[d]!==void 0&&r[d]!==void 0&&(o[d]=w2(e[d])(e[d],r[d]));return d=>{for(const p in o)s[p]=o[p](d);return s}}function Loe(e,r){const s=[],o={color:0,var:0,number:0};for(let d=0;d<r.values.length;d++){const p=r.types[d],m=e.indexes[p][o[p]],g=e.values[m]??0;s[d]=g,o[p]++}return s}const Foe=(e,r)=>{const s=Kd.createTransformer(r),o=Kb(e),d=Kb(r);return o.indexes.var.length===d.indexes.var.length&&o.indexes.color.length===d.indexes.color.length&&o.indexes.number.length>=d.indexes.number.length?KT.has(e)&&!d.values.length||KT.has(r)&&!o.values.length?Moe(e,r):hw(k5(Loe(o,d),d.values),s):Vj(e,r)};function R5(e,r,s){return typeof e=="number"&&typeof r=="number"&&typeof s=="number"?zr(e,r,s):w2(e)(e,r)}const qoe=e=>{const r=({timestamp:s})=>e(s);return{start:(s=!0)=>_r.update(r,s),stop:()=>Ud(r),now:()=>Us.isProcessing?Us.timestamp:da.now()}},T5=(e,r,s=10)=>{let o="";const d=Math.max(Math.round(r/s),2);for(let p=0;p<d;p++)o+=Math.round(e(p/(d-1))*1e4)/1e4+", ";return`linear(${o.substring(0,o.length-2)})`},Hj=2e4;function S2(e){let r=0;const s=50;let o=e.next(r);for(;!o.done&&r<Hj;)r+=s,o=e.next(r);return r>=Hj?1/0:r}function Boe(e,r=100,s){const o=s({...e,keyframes:[0,r]}),d=Math.min(S2(o),Hj);return{type:"keyframes",ease:p=>o.next(d*p).value/r,duration:so(d)}}const Uoe=5;function _5(e,r,s){const o=Math.max(r-Uoe,0);return u5(s-e(o),r-o)}const Vr={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},QR=.001;function Koe({duration:e=Vr.duration,bounce:r=Vr.bounce,velocity:s=Vr.velocity,mass:o=Vr.mass}){let d,p,m=1-r;m=gu(Vr.minDamping,Vr.maxDamping,m),e=gu(Vr.minDuration,Vr.maxDuration,so(e)),m<1?(d=S=>{const E=S*m,A=E*e,k=E-s,T=VT(S,m),M=Math.exp(-A);return QR-k/T*M},p=S=>{const A=S*m*e,k=A*s+s,T=Math.pow(m,2)*Math.pow(S,2)*e,M=Math.exp(-A),I=VT(Math.pow(S,2),m);return(-d(S)+QR>0?-1:1)*((k-T)*M)/I}):(d=S=>{const E=Math.exp(-S*e),A=(S-s)*e+1;return-QR+E*A},p=S=>{const E=Math.exp(-S*e),A=(s-S)*(e*e);return E*A});const g=5/e,b=Hoe(d,p,g);if(e=ic(e),isNaN(b))return{stiffness:Vr.stiffness,damping:Vr.damping,duration:e};{const S=Math.pow(b,2)*o;return{stiffness:S,damping:m*2*Math.sqrt(o*S),duration:e}}}const Voe=12;function Hoe(e,r,s){let o=s;for(let d=1;d<Voe;d++)o=o-e(o)/r(o);return o}function VT(e,r){return e*Math.sqrt(1-r*r)}const Goe=["duration","bounce"],Xoe=["stiffness","damping","mass"];function _I(e,r){return r.some(s=>e[s]!==void 0)}function Yoe(e){let r={velocity:Vr.velocity,stiffness:Vr.stiffness,damping:Vr.damping,mass:Vr.mass,isResolvedFromDuration:!1,...e};if(!_I(e,Xoe)&&_I(e,Goe))if(e.visualDuration){const s=e.visualDuration,o=2*Math.PI/(s*1.2),d=o*o,p=2*gu(.05,1,1-(e.bounce||0))*Math.sqrt(d);r={...r,mass:Vr.mass,stiffness:d,damping:p}}else{const s=Koe(e);r={...r,...s,mass:Vr.mass},r.isResolvedFromDuration=!0}return r}function Gj(e=Vr.visualDuration,r=Vr.bounce){const s=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:r}:e;let{restSpeed:o,restDelta:d}=s;const p=s.keyframes[0],m=s.keyframes[s.keyframes.length-1],g={done:!1,value:p},{stiffness:b,damping:S,mass:E,duration:A,velocity:k,isResolvedFromDuration:T}=Yoe({...s,velocity:-so(s.velocity||0)}),M=k||0,I=S/(2*Math.sqrt(b*E)),q=m-p,G=so(Math.sqrt(b/E)),K=Math.abs(q)<5;o||(o=K?Vr.restSpeed.granular:Vr.restSpeed.default),d||(d=K?Vr.restDelta.granular:Vr.restDelta.default);let X;if(I<1){const ee=VT(G,I);X=oe=>{const Q=Math.exp(-I*G*oe);return m-Q*((M+I*G*q)/ee*Math.sin(ee*oe)+q*Math.cos(ee*oe))}}else if(I===1)X=ee=>m-Math.exp(-G*ee)*(q+(M+G*q)*ee);else{const ee=G*Math.sqrt(I*I-1);X=oe=>{const Q=Math.exp(-I*G*oe),ne=Math.min(ee*oe,300);return m-Q*((M+I*G*q)*Math.sinh(ne)+ee*q*Math.cosh(ne))/ee}}const z={calculatedDuration:T&&A||null,next:ee=>{const oe=X(ee);if(T)g.done=ee>=A;else{let Q=ee===0?M:0;I<1&&(Q=ee===0?ic(M):_5(X,ee,oe));const ne=Math.abs(Q)<=o,de=Math.abs(m-oe)<=d;g.done=ne&&de}return g.value=g.done?m:oe,g},toString:()=>{const ee=Math.min(S2(z),Hj),oe=T5(Q=>z.next(ee*Q).value,ee,30);return ee+"ms "+oe},toTransition:()=>{}};return z}Gj.applyToOptions=e=>{const r=Boe(e,100,Gj);return e.ease=r.ease,e.duration=ic(r.duration),e.type="keyframes",e};function HT({keyframes:e,velocity:r=0,power:s=.8,timeConstant:o=325,bounceDamping:d=10,bounceStiffness:p=500,modifyTarget:m,min:g,max:b,restDelta:S=.5,restSpeed:E}){const A=e[0],k={done:!1,value:A},T=ne=>g!==void 0&&ne<g||b!==void 0&&ne>b,M=ne=>g===void 0?b:b===void 0||Math.abs(g-ne)<Math.abs(b-ne)?g:b;let I=s*r;const q=A+I,G=m===void 0?q:m(q);G!==q&&(I=G-A);const K=ne=>-I*Math.exp(-ne/o),X=ne=>G+K(ne),z=ne=>{const de=K(ne),Ce=X(ne);k.done=Math.abs(de)<=S,k.value=k.done?G:Ce};let ee,oe;const Q=ne=>{T(k.value)&&(ee=ne,oe=Gj({keyframes:[k.value,M(k.value)],velocity:_5(X,ne,k.value),damping:d,stiffness:p,restDelta:S,restSpeed:E}))};return Q(0),{calculatedDuration:null,next:ne=>{let de=!1;return!oe&&ee===void 0&&(de=!0,z(ne),Q(ne)),ee!==void 0&&ne>=ee?oe.next(ne-ee):(!de&&z(ne),k)}}}function Zoe(e,r,s){const o=[],d=s||yu.mix||R5,p=e.length-1;for(let m=0;m<p;m++){let g=d(e[m],e[m+1]);if(r){const b=Array.isArray(r)?r[m]||io:r;g=hw(b,g)}o.push(g)}return o}function Woe(e,r,{clamp:s=!0,ease:o,mixer:d}={}){const p=e.length;if(h2(p===r.length),p===1)return()=>r[0];if(p===2&&r[0]===r[1])return()=>r[1];const m=e[0]===e[1];e[0]>e[p-1]&&(e=[...e].reverse(),r=[...r].reverse());const g=Zoe(r,o,d),b=g.length,S=E=>{if(m&&E<e[0])return r[0];let A=0;if(b>1)for(;A<e.length-2&&!(E<e[A+1]);A++);const k=Bb(e[A],e[A+1],E);return g[A](k)};return s?E=>S(gu(e[0],e[p-1],E)):S}function Joe(e,r){const s=e[e.length-1];for(let o=1;o<=r;o++){const d=Bb(0,r,o);e.push(zr(s,1,d))}}function Qoe(e){const r=[0];return Joe(r,e.length-1),r}function ele(e,r){return e.map(s=>s*r)}function tle(e,r){return e.map(()=>r||x5).splice(0,e.length-1)}function _b({duration:e=300,keyframes:r,times:s,ease:o="easeInOut"}){const d=hoe(o)?o.map(AI):AI(o),p={done:!1,value:r[0]},m=ele(s&&s.length===r.length?s:Qoe(r),e),g=Woe(m,r,{ease:Array.isArray(d)?d:tle(r,d)});return{calculatedDuration:e,next:b=>(p.value=g(b),p.done=b>=e,p)}}const nle=e=>e!==null;function E2(e,{repeat:r,repeatType:s="loop"},o,d=1){const p=e.filter(nle),g=d<0||r&&s!=="loop"&&r%2===1?0:p.length-1;return!g||o===void 0?p[g]:o}const rle={decay:HT,inertia:HT,tween:_b,keyframes:_b,spring:Gj};function $5(e){typeof e.type=="string"&&(e.type=rle[e.type])}class j2{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(r=>{this.resolve=r})}notifyFinished(){this.resolve()}then(r,s){return this.finished.then(r,s)}}const sle=e=>e/100;class C2 extends j2{constructor(r){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:s}=this.options;s&&s.updatedAt!==da.now()&&this.tick(da.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=r,this.initAnimation(),this.play(),r.autoplay===!1&&this.pause()}initAnimation(){const{options:r}=this;$5(r);const{type:s=_b,repeat:o=0,repeatDelay:d=0,repeatType:p,velocity:m=0}=r;let{keyframes:g}=r;const b=s||_b;b!==_b&&typeof g[0]!="number"&&(this.mixKeyframes=hw(sle,R5(g[0],g[1])),g=[0,100]);const S=b({...r,keyframes:g});p==="mirror"&&(this.mirroredGenerator=b({...r,keyframes:[...g].reverse(),velocity:-m})),S.calculatedDuration===null&&(S.calculatedDuration=S2(S));const{calculatedDuration:E}=S;this.calculatedDuration=E,this.resolvedDuration=E+d,this.totalDuration=this.resolvedDuration*(o+1)-d,this.generator=S}updateTime(r){const s=Math.round(r-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=s}tick(r,s=!1){const{generator:o,totalDuration:d,mixKeyframes:p,mirroredGenerator:m,resolvedDuration:g,calculatedDuration:b}=this;if(this.startTime===null)return o.next(0);const{delay:S=0,keyframes:E,repeat:A,repeatType:k,repeatDelay:T,type:M,onUpdate:I,finalKeyframe:q}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,r):this.speed<0&&(this.startTime=Math.min(r-d/this.speed,this.startTime)),s?this.currentTime=r:this.updateTime(r);const G=this.currentTime-S*(this.playbackSpeed>=0?1:-1),K=this.playbackSpeed>=0?G<0:G>d;this.currentTime=Math.max(G,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=d);let X=this.currentTime,z=o;if(A){const ne=Math.min(this.currentTime,d)/g;let de=Math.floor(ne),Ce=ne%1;!Ce&&ne>=1&&(Ce=1),Ce===1&&de--,de=Math.min(de,A+1),!!(de%2)&&(k==="reverse"?(Ce=1-Ce,T&&(Ce-=T/g)):k==="mirror"&&(z=m)),X=gu(0,1,Ce)*g}const ee=K?{done:!1,value:E[0]}:z.next(X);p&&(ee.value=p(ee.value));let{done:oe}=ee;!K&&b!==null&&(oe=this.playbackSpeed>=0?this.currentTime>=d:this.currentTime<=0);const Q=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&oe);return Q&&M!==HT&&(ee.value=E2(E,this.options,q,this.speed)),I&&I(ee.value),Q&&this.finish(),ee}then(r,s){return this.finished.then(r,s)}get duration(){return so(this.calculatedDuration)}get iterationDuration(){const{delay:r=0}=this.options||{};return this.duration+so(r)}get time(){return so(this.currentTime)}set time(r){r=ic(r),this.currentTime=r,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=r:this.driver&&(this.startTime=this.driver.now()-r/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(r){this.updateTime(da.now());const s=this.playbackSpeed!==r;this.playbackSpeed=r,s&&(this.time=so(this.currentTime))}play(){if(this.isStopped)return;const{driver:r=qoe,startTime:s}=this.options;this.driver||(this.driver=r(d=>this.tick(d))),this.options.onPlay?.();const o=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=o):this.holdTime!==null?this.startTime=o-this.holdTime:this.startTime||(this.startTime=s??o),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(da.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(r){return this.startTime=0,this.tick(r,!0)}attachTimeline(r){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),r.observe(this)}}function ile(e){for(let r=1;r<e.length;r++)e[r]??(e[r]=e[r-1])}const bp=e=>e*180/Math.PI,GT=e=>{const r=bp(Math.atan2(e[1],e[0]));return XT(r)},ale={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:GT,rotateZ:GT,skewX:e=>bp(Math.atan(e[1])),skewY:e=>bp(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},XT=e=>(e=e%360,e<0&&(e+=360),e),$I=GT,NI=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),DI=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),ole={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:NI,scaleY:DI,scale:e=>(NI(e)+DI(e))/2,rotateX:e=>XT(bp(Math.atan2(e[6],e[5]))),rotateY:e=>XT(bp(Math.atan2(-e[2],e[0]))),rotateZ:$I,rotate:$I,skewX:e=>bp(Math.atan(e[4])),skewY:e=>bp(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function YT(e){return e.includes("scale")?1:0}function ZT(e,r){if(!e||e==="none")return YT(r);const s=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let o,d;if(s)o=ole,d=s;else{const g=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);o=ale,d=g}if(!d)return YT(r);const p=o[r],m=d[1].split(",").map(cle);return typeof p=="function"?p(m):m[p]}const lle=(e,r)=>{const{transform:s="none"}=getComputedStyle(e);return ZT(s,r)};function cle(e){return parseFloat(e.trim())}const Dg=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Pg=new Set(Dg),PI=e=>e===Ng||e===tn,ule=new Set(["x","y","z"]),dle=Dg.filter(e=>!ule.has(e));function hle(e){const r=[];return dle.forEach(s=>{const o=e.getValue(s);o!==void 0&&(r.push([s,o.get()]),o.set(s.startsWith("scale")?1:0))}),r}const Sp={width:({x:e},{paddingLeft:r="0",paddingRight:s="0"})=>e.max-e.min-parseFloat(r)-parseFloat(s),height:({y:e},{paddingTop:r="0",paddingBottom:s="0"})=>e.max-e.min-parseFloat(r)-parseFloat(s),top:(e,{top:r})=>parseFloat(r),left:(e,{left:r})=>parseFloat(r),bottom:({y:e},{top:r})=>parseFloat(r)+(e.max-e.min),right:({x:e},{left:r})=>parseFloat(r)+(e.max-e.min),x:(e,{transform:r})=>ZT(r,"x"),y:(e,{transform:r})=>ZT(r,"y")};Sp.translateX=Sp.x;Sp.translateY=Sp.y;const Ep=new Set;let WT=!1,JT=!1,QT=!1;function N5(){if(JT){const e=Array.from(Ep).filter(o=>o.needsMeasurement),r=new Set(e.map(o=>o.element)),s=new Map;r.forEach(o=>{const d=hle(o);d.length&&(s.set(o,d),o.render())}),e.forEach(o=>o.measureInitialState()),r.forEach(o=>{o.render();const d=s.get(o);d&&d.forEach(([p,m])=>{o.getValue(p)?.set(m)})}),e.forEach(o=>o.measureEndState()),e.forEach(o=>{o.suspendedScrollY!==void 0&&window.scrollTo(0,o.suspendedScrollY)})}JT=!1,WT=!1,Ep.forEach(e=>e.complete(QT)),Ep.clear()}function D5(){Ep.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(JT=!0)})}function ple(){QT=!0,D5(),N5(),QT=!1}class A2{constructor(r,s,o,d,p,m=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...r],this.onComplete=s,this.name=o,this.motionValue=d,this.element=p,this.isAsync=m}scheduleResolve(){this.state="scheduled",this.isAsync?(Ep.add(this),WT||(WT=!0,_r.read(D5),_r.resolveKeyframes(N5))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:r,name:s,element:o,motionValue:d}=this;if(r[0]===null){const p=d?.get(),m=r[r.length-1];if(p!==void 0)r[0]=p;else if(o&&s){const g=o.readValue(s,m);g!=null&&(r[0]=g)}r[0]===void 0&&(r[0]=m),d&&p===void 0&&d.set(r[0])}ile(r)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(r=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,r),Ep.delete(this)}cancel(){this.state==="scheduled"&&(Ep.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const fle=e=>e.startsWith("--");function mle(e,r,s){fle(r)?e.style.setProperty(r,s):e.style[r]=s}const gle=p2(()=>window.ScrollTimeline!==void 0),yle={};function vle(e,r){const s=p2(e);return()=>yle[r]??s()}const P5=vle(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),wb=([e,r,s,o])=>`cubic-bezier(${e}, ${r}, ${s}, ${o})`,MI={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:wb([0,.65,.55,1]),circOut:wb([.55,0,1,.45]),backIn:wb([.31,.01,.66,-.59]),backOut:wb([.33,1.53,.69,.99])};function M5(e,r){if(e)return typeof e=="function"?P5()?T5(e,r):"ease-out":b5(e)?wb(e):Array.isArray(e)?e.map(s=>M5(s,r)||MI.easeOut):MI[e]}function xle(e,r,s,{delay:o=0,duration:d=300,repeat:p=0,repeatType:m="loop",ease:g="easeOut",times:b}={},S=void 0){const E={[r]:s};b&&(E.offset=b);const A=M5(g,d);Array.isArray(A)&&(E.easing=A);const k={delay:o,duration:d,easing:Array.isArray(A)?"linear":A,fill:"both",iterations:p+1,direction:m==="reverse"?"alternate":"normal"};return S&&(k.pseudoElement=S),e.animate(E,k)}function I5(e){return typeof e=="function"&&"applyToOptions"in e}function ble({type:e,...r}){return I5(e)&&P5()?e.applyToOptions(r):(r.duration??(r.duration=300),r.ease??(r.ease="easeOut"),r)}class wle extends j2{constructor(r){if(super(),this.finishedTime=null,this.isStopped=!1,!r)return;const{element:s,name:o,keyframes:d,pseudoElement:p,allowFlatten:m=!1,finalKeyframe:g,onComplete:b}=r;this.isPseudoElement=!!p,this.allowFlatten=m,this.options=r,h2(typeof r.type!="string");const S=ble(r);this.animation=xle(s,o,d,S,p),S.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!p){const E=E2(d,this.options,g,this.speed);this.updateMotionValue?this.updateMotionValue(E):mle(s,o,E),this.animation.cancel()}b?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:r}=this;r==="idle"||r==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const r=this.animation.effect?.getComputedTiming?.().duration||0;return so(Number(r))}get iterationDuration(){const{delay:r=0}=this.options||{};return this.duration+so(r)}get time(){return so(Number(this.animation.currentTime)||0)}set time(r){this.finishedTime=null,this.animation.currentTime=ic(r)}get speed(){return this.animation.playbackRate}set speed(r){r<0&&(this.finishedTime=null),this.animation.playbackRate=r}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(r){this.animation.startTime=r}attachTimeline({timeline:r,observe:s}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,r&&gle()?(this.animation.timeline=r,io):s(this)}}const z5={anticipate:g5,backInOut:m5,circInOut:v5};function Sle(e){return e in z5}function Ele(e){typeof e.ease=="string"&&Sle(e.ease)&&(e.ease=z5[e.ease])}const II=10;class jle extends wle{constructor(r){Ele(r),$5(r),super(r),r.startTime&&(this.startTime=r.startTime),this.options=r}updateMotionValue(r){const{motionValue:s,onUpdate:o,onComplete:d,element:p,...m}=this.options;if(!s)return;if(r!==void 0){s.set(r);return}const g=new C2({...m,autoplay:!1}),b=ic(this.finishedTime??this.time);s.setWithVelocity(g.sample(b-II).value,g.sample(b).value,II),g.stop()}}const zI=(e,r)=>r==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Kd.test(e)||e==="0")&&!e.startsWith("url("));function Cle(e){const r=e[0];if(e.length===1)return!0;for(let s=0;s<e.length;s++)if(e[s]!==r)return!0}function Ale(e,r,s,o){const d=e[0];if(d===null)return!1;if(r==="display"||r==="visibility")return!0;const p=e[e.length-1],m=zI(d,r),g=zI(p,r);return!m||!g?!1:Cle(e)||(s==="spring"||I5(s))&&o}function e_(e){e.duration=0,e.type="keyframes"}const Ole=new Set(["opacity","clipPath","filter","transform"]),kle=p2(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Rle(e){const{motionValue:r,name:s,repeatDelay:o,repeatType:d,damping:p,type:m}=e;if(!(r?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:b,transformTemplate:S}=r.owner.getProps();return kle()&&s&&Ole.has(s)&&(s!=="transform"||!S)&&!b&&!o&&d!=="mirror"&&p!==0&&m!=="inertia"}const Tle=40;class _le extends j2{constructor({autoplay:r=!0,delay:s=0,type:o="keyframes",repeat:d=0,repeatDelay:p=0,repeatType:m="loop",keyframes:g,name:b,motionValue:S,element:E,...A}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=da.now();const k={autoplay:r,delay:s,type:o,repeat:d,repeatDelay:p,repeatType:m,name:b,motionValue:S,element:E,...A},T=E?.KeyframeResolver||A2;this.keyframeResolver=new T(g,(M,I,q)=>this.onKeyframesResolved(M,I,k,!q),b,S,E),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(r,s,o,d){this.keyframeResolver=void 0;const{name:p,type:m,velocity:g,delay:b,isHandoff:S,onUpdate:E}=o;this.resolvedAt=da.now(),Ale(r,p,m,g)||((yu.instantAnimations||!b)&&E?.(E2(r,o,s)),r[0]=r[r.length-1],e_(o),o.repeat=0);const k={startTime:d?this.resolvedAt?this.resolvedAt-this.createdAt>Tle?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:s,...o,keyframes:r},T=!S&&Rle(k)?new jle({...k,element:k.motionValue.owner.current}):new C2(k);T.finished.then(()=>this.notifyFinished()).catch(io),this.pendingTimeline&&(this.stopTimeline=T.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=T}get finished(){return this._animation?this.animation.finished:this._finished}then(r,s){return this.finished.finally(r).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),ple()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(r){this.animation.time=r}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(r){this.animation.speed=r}get startTime(){return this.animation.startTime}attachTimeline(r){return this._animation?this.stopTimeline=this.animation.attachTimeline(r):this.pendingTimeline=r,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const $le=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Nle(e){const r=$le.exec(e);if(!r)return[,];const[,s,o,d]=r;return[`--${s??o}`,d]}function L5(e,r,s=1){const[o,d]=Nle(e);if(!o)return;const p=window.getComputedStyle(r).getPropertyValue(o);if(p){const m=p.trim();return o5(m)?parseFloat(m):m}return v2(d)?L5(d,r,s+1):d}function O2(e,r){return e?.[r]??e?.default??e}const F5=new Set(["width","height","top","left","right","bottom",...Dg]),Dle={test:e=>e==="auto",parse:e=>e},q5=e=>r=>r.test(e),B5=[Ng,tn,ac,Md,Coe,joe,Dle],LI=e=>B5.find(q5(e));function Ple(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||c5(e):!0}const Mle=new Set(["brightness","contrast","saturate","opacity"]);function Ile(e){const[r,s]=e.slice(0,-1).split("(");if(r==="drop-shadow")return e;const[o]=s.match(x2)||[];if(!o)return e;const d=s.replace(o,"");let p=Mle.has(r)?1:0;return o!==s&&(p*=100),r+"("+p+d+")"}const zle=/\b([a-z-]*)\(.*?\)/gu,t_={...Kd,getAnimatableNone:e=>{const r=e.match(zle);return r?r.map(Ile).join(" "):e}},FI={...Ng,transform:Math.round},Lle={rotate:Md,rotateX:Md,rotateY:Md,rotateZ:Md,scale:tj,scaleX:tj,scaleY:tj,scaleZ:tj,skew:Md,skewX:Md,skewY:Md,distance:tn,translateX:tn,translateY:tn,translateZ:tn,x:tn,y:tn,z:tn,perspective:tn,transformPerspective:tn,opacity:Ub,originX:OI,originY:OI,originZ:tn},k2={borderWidth:tn,borderTopWidth:tn,borderRightWidth:tn,borderBottomWidth:tn,borderLeftWidth:tn,borderRadius:tn,radius:tn,borderTopLeftRadius:tn,borderTopRightRadius:tn,borderBottomRightRadius:tn,borderBottomLeftRadius:tn,width:tn,maxWidth:tn,height:tn,maxHeight:tn,top:tn,right:tn,bottom:tn,left:tn,padding:tn,paddingTop:tn,paddingRight:tn,paddingBottom:tn,paddingLeft:tn,margin:tn,marginTop:tn,marginRight:tn,marginBottom:tn,marginLeft:tn,backgroundPositionX:tn,backgroundPositionY:tn,...Lle,zIndex:FI,fillOpacity:Ub,strokeOpacity:Ub,numOctaves:FI},Fle={...k2,color:ms,backgroundColor:ms,outlineColor:ms,fill:ms,stroke:ms,borderColor:ms,borderTopColor:ms,borderRightColor:ms,borderBottomColor:ms,borderLeftColor:ms,filter:t_,WebkitFilter:t_},U5=e=>Fle[e];function K5(e,r){let s=U5(e);return s!==t_&&(s=Kd),s.getAnimatableNone?s.getAnimatableNone(r):void 0}const qle=new Set(["auto","none","0"]);function Ble(e,r,s){let o=0,d;for(;o<e.length&&!d;){const p=e[o];typeof p=="string"&&!qle.has(p)&&Kb(p).values.length&&(d=e[o]),o++}if(d&&s)for(const p of r)e[p]=K5(s,d)}class Ule extends A2{constructor(r,s,o,d,p){super(r,s,o,d,p,!0)}readKeyframes(){const{unresolvedKeyframes:r,element:s,name:o}=this;if(!s||!s.current)return;super.readKeyframes();for(let b=0;b<r.length;b++){let S=r[b];if(typeof S=="string"&&(S=S.trim(),v2(S))){const E=L5(S,s.current);E!==void 0&&(r[b]=E),b===r.length-1&&(this.finalKeyframe=S)}}if(this.resolveNoneKeyframes(),!F5.has(o)||r.length!==2)return;const[d,p]=r,m=LI(d),g=LI(p);if(m!==g)if(PI(m)&&PI(g))for(let b=0;b<r.length;b++){const S=r[b];typeof S=="string"&&(r[b]=parseFloat(S))}else Sp[o]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:r,name:s}=this,o=[];for(let d=0;d<r.length;d++)(r[d]===null||Ple(r[d]))&&o.push(d);o.length&&Ble(r,o,s)}measureInitialState(){const{element:r,unresolvedKeyframes:s,name:o}=this;if(!r||!r.current)return;o==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Sp[o](r.measureViewportBox(),window.getComputedStyle(r.current)),s[0]=this.measuredOrigin;const d=s[s.length-1];d!==void 0&&r.getValue(o,d).jump(d,!1)}measureEndState(){const{element:r,name:s,unresolvedKeyframes:o}=this;if(!r||!r.current)return;const d=r.getValue(s);d&&d.jump(this.measuredOrigin,!1);const p=o.length-1,m=o[p];o[p]=Sp[s](r.measureViewportBox(),window.getComputedStyle(r.current)),m!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=m),this.removedTransforms?.length&&this.removedTransforms.forEach(([g,b])=>{r.getValue(g).set(b)}),this.resolveNoneKeyframes()}}function Kle(e,r,s){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let o=document;const d=s?.[e]??o.querySelectorAll(e);return d?Array.from(d):[]}return Array.from(e)}const V5=(e,r)=>r&&typeof e=="number"?r.transform(e):e;function Vle(e){return l5(e)&&"offsetHeight"in e}const qI=30,Hle=e=>!isNaN(parseFloat(e));class Gle{constructor(r,s={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=o=>{const d=da.now();if(this.updatedAt!==d&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(o),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const p of this.dependents)p.dirty()},this.hasAnimated=!1,this.setCurrent(r),this.owner=s.owner}setCurrent(r){this.current=r,this.updatedAt=da.now(),this.canTrackVelocity===null&&r!==void 0&&(this.canTrackVelocity=Hle(this.current))}setPrevFrameValue(r=this.current){this.prevFrameValue=r,this.prevUpdatedAt=this.updatedAt}onChange(r){return this.on("change",r)}on(r,s){this.events[r]||(this.events[r]=new f2);const o=this.events[r].add(s);return r==="change"?()=>{o(),_r.read(()=>{this.events.change.getSize()||this.stop()})}:o}clearListeners(){for(const r in this.events)this.events[r].clear()}attach(r,s){this.passiveEffect=r,this.stopPassiveEffect=s}set(r){this.passiveEffect?this.passiveEffect(r,this.updateAndNotify):this.updateAndNotify(r)}setWithVelocity(r,s,o){this.set(s),this.prev=void 0,this.prevFrameValue=r,this.prevUpdatedAt=this.updatedAt-o}jump(r,s=!0){this.updateAndNotify(r),this.prev=r,this.prevUpdatedAt=this.prevFrameValue=void 0,s&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(r){this.dependents||(this.dependents=new Set),this.dependents.add(r)}removeDependent(r){this.dependents&&this.dependents.delete(r)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const r=da.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||r-this.updatedAt>qI)return 0;const s=Math.min(this.updatedAt-this.prevUpdatedAt,qI);return u5(parseFloat(this.current)-parseFloat(this.prevFrameValue),s)}start(r){return this.stop(),new Promise(s=>{this.hasAnimated=!0,this.animation=r(s),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function wg(e,r){return new Gle(e,r)}const{schedule:R2}=w5(queueMicrotask,!1),Xo={x:!1,y:!1};function H5(){return Xo.x||Xo.y}function Xle(e){return e==="x"||e==="y"?Xo[e]?null:(Xo[e]=!0,()=>{Xo[e]=!1}):Xo.x||Xo.y?null:(Xo.x=Xo.y=!0,()=>{Xo.x=Xo.y=!1})}function G5(e,r){const s=Kle(e),o=new AbortController,d={passive:!0,...r,signal:o.signal};return[s,d,()=>o.abort()]}function BI(e){return!(e.pointerType==="touch"||H5())}function Yle(e,r,s={}){const[o,d,p]=G5(e,s),m=g=>{if(!BI(g))return;const{target:b}=g,S=r(b,g);if(typeof S!="function"||!b)return;const E=A=>{BI(A)&&(S(A),b.removeEventListener("pointerleave",E))};b.addEventListener("pointerleave",E,d)};return o.forEach(g=>{g.addEventListener("pointerenter",m,d)}),p}const X5=(e,r)=>r?e===r?!0:X5(e,r.parentElement):!1,T2=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Zle=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Wle(e){return Zle.has(e.tagName)||e.tabIndex!==-1}const wj=new WeakSet;function UI(e){return r=>{r.key==="Enter"&&e(r)}}function eT(e,r){e.dispatchEvent(new PointerEvent("pointer"+r,{isPrimary:!0,bubbles:!0}))}const Jle=(e,r)=>{const s=e.currentTarget;if(!s)return;const o=UI(()=>{if(wj.has(s))return;eT(s,"down");const d=UI(()=>{eT(s,"up")}),p=()=>eT(s,"cancel");s.addEventListener("keyup",d,r),s.addEventListener("blur",p,r)});s.addEventListener("keydown",o,r),s.addEventListener("blur",()=>s.removeEventListener("keydown",o),r)};function KI(e){return T2(e)&&!H5()}function Qle(e,r,s={}){const[o,d,p]=G5(e,s),m=g=>{const b=g.currentTarget;if(!KI(g))return;wj.add(b);const S=r(b,g),E=(T,M)=>{window.removeEventListener("pointerup",A),window.removeEventListener("pointercancel",k),wj.has(b)&&wj.delete(b),KI(T)&&typeof S=="function"&&S(T,{success:M})},A=T=>{E(T,b===window||b===document||s.useGlobalTarget||X5(b,T.target))},k=T=>{E(T,!1)};window.addEventListener("pointerup",A,d),window.addEventListener("pointercancel",k,d)};return o.forEach(g=>{(s.useGlobalTarget?window:g).addEventListener("pointerdown",m,d),Vle(g)&&(g.addEventListener("focus",S=>Jle(S,d)),!Wle(g)&&!g.hasAttribute("tabindex")&&(g.tabIndex=0))}),p}function Y5(e){return l5(e)&&"ownerSVGElement"in e}function ece(e){return Y5(e)&&e.tagName==="svg"}const bi=e=>!!(e&&e.getVelocity),tce=[...B5,ms,Kd],nce=e=>tce.find(q5(e)),Z5=R.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function rce(e=!0){const r=R.useContext(c2);if(r===null)return[!0,null];const{isPresent:s,onExitComplete:o,register:d}=r,p=R.useId();R.useEffect(()=>{if(e)return d(p)},[e]);const m=R.useCallback(()=>e&&o&&o(p),[p,o,e]);return!s&&o?[!1,m]:[!0]}const W5=R.createContext({strict:!1}),VI={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Sg={};for(const e in VI)Sg[e]={isEnabled:r=>VI[e].some(s=>!!r[s])};function sce(e){for(const r in e)Sg[r]={...Sg[r],...e[r]}}const ice=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Xj(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||ice.has(e)}let J5=e=>!Xj(e);function ace(e){typeof e=="function"&&(J5=r=>r.startsWith("on")?!Xj(r):e(r))}try{ace(require("@emotion/is-prop-valid").default)}catch{}function oce(e,r,s){const o={};for(const d in e)d==="values"&&typeof e.values=="object"||(J5(d)||s===!0&&Xj(d)||!r&&!Xj(d)||e.draggable&&d.startsWith("onDrag"))&&(o[d]=e[d]);return o}const IC=R.createContext({});function zC(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Vb(e){return typeof e=="string"||Array.isArray(e)}const _2=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],$2=["initial",..._2];function LC(e){return zC(e.animate)||$2.some(r=>Vb(e[r]))}function Q5(e){return!!(LC(e)||e.variants)}function lce(e,r){if(LC(e)){const{initial:s,animate:o}=e;return{initial:s===!1||Vb(s)?s:void 0,animate:Vb(o)?o:void 0}}return e.inherit!==!1?r:{}}function cce(e){const{initial:r,animate:s}=lce(e,R.useContext(IC));return R.useMemo(()=>({initial:r,animate:s}),[HI(r),HI(s)])}function HI(e){return Array.isArray(e)?e.join(" "):e}const Hb={};function uce(e){for(const r in e)Hb[r]=e[r],y2(r)&&(Hb[r].isCSSVariable=!0)}function eF(e,{layout:r,layoutId:s}){return Pg.has(e)||e.startsWith("origin")||(r||s!==void 0)&&(!!Hb[e]||e==="opacity")}const dce={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},hce=Dg.length;function pce(e,r,s){let o="",d=!0;for(let p=0;p<hce;p++){const m=Dg[p],g=e[m];if(g===void 0)continue;let b=!0;if(typeof g=="number"?b=g===(m.startsWith("scale")?1:0):b=parseFloat(g)===0,!b||s){const S=V5(g,k2[m]);if(!b){d=!1;const E=dce[m]||m;o+=`${E}(${S}) `}s&&(r[m]=S)}}return o=o.trim(),s?o=s(r,d?"":o):d&&(o="none"),o}function N2(e,r,s){const{style:o,vars:d,transformOrigin:p}=e;let m=!1,g=!1;for(const b in r){const S=r[b];if(Pg.has(b)){m=!0;continue}else if(y2(b)){d[b]=S;continue}else{const E=V5(S,k2[b]);b.startsWith("origin")?(g=!0,p[b]=E):o[b]=E}}if(r.transform||(m||s?o.transform=pce(r,e.transform,s):o.transform&&(o.transform="none")),g){const{originX:b="50%",originY:S="50%",originZ:E=0}=p;o.transformOrigin=`${b} ${S} ${E}`}}const D2=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function tF(e,r,s){for(const o in r)!bi(r[o])&&!eF(o,s)&&(e[o]=r[o])}function fce({transformTemplate:e},r){return R.useMemo(()=>{const s=D2();return N2(s,r,e),Object.assign({},s.vars,s.style)},[r])}function mce(e,r){const s=e.style||{},o={};return tF(o,s,e),Object.assign(o,fce(e,r)),o}function gce(e,r){const s={},o=mce(e,r);return e.drag&&e.dragListener!==!1&&(s.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(s.tabIndex=0),s.style=o,s}const yce={offset:"stroke-dashoffset",array:"stroke-dasharray"},vce={offset:"strokeDashoffset",array:"strokeDasharray"};function xce(e,r,s=1,o=0,d=!0){e.pathLength=1;const p=d?yce:vce;e[p.offset]=tn.transform(-o);const m=tn.transform(r),g=tn.transform(s);e[p.array]=`${m} ${g}`}function nF(e,{attrX:r,attrY:s,attrScale:o,pathLength:d,pathSpacing:p=1,pathOffset:m=0,...g},b,S,E){if(N2(e,g,S),b){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:A,style:k}=e;A.transform&&(k.transform=A.transform,delete A.transform),(k.transform||A.transformOrigin)&&(k.transformOrigin=A.transformOrigin??"50% 50%",delete A.transformOrigin),k.transform&&(k.transformBox=E?.transformBox??"fill-box",delete A.transformBox),r!==void 0&&(A.x=r),s!==void 0&&(A.y=s),o!==void 0&&(A.scale=o),d!==void 0&&xce(A,d,p,m,!1)}const rF=()=>({...D2(),attrs:{}}),sF=e=>typeof e=="string"&&e.toLowerCase()==="svg";function bce(e,r,s,o){const d=R.useMemo(()=>{const p=rF();return nF(p,r,sF(o),e.transformTemplate,e.style),{...p.attrs,style:{...p.style}}},[r]);if(e.style){const p={};tF(p,e.style,e),d.style={...p,...d.style}}return d}const wce=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function P2(e){return typeof e!="string"||e.includes("-")?!1:!!(wce.indexOf(e)>-1||/[A-Z]/u.test(e))}function Sce(e,r,s,{latestValues:o},d,p=!1){const g=(P2(e)?bce:gce)(r,o,d,e),b=oce(r,typeof e=="string",p),S=e!==R.Fragment?{...b,...g,ref:s}:{},{children:E}=r,A=R.useMemo(()=>bi(E)?E.get():E,[E]);return R.createElement(e,{...S,children:A})}function GI(e){const r=[{},{}];return e?.values.forEach((s,o)=>{r[0][o]=s.get(),r[1][o]=s.getVelocity()}),r}function M2(e,r,s,o){if(typeof r=="function"){const[d,p]=GI(o);r=r(s!==void 0?s:e.custom,d,p)}if(typeof r=="string"&&(r=e.variants&&e.variants[r]),typeof r=="function"){const[d,p]=GI(o);r=r(s!==void 0?s:e.custom,d,p)}return r}function Sj(e){return bi(e)?e.get():e}function Ece({scrapeMotionValuesFromProps:e,createRenderState:r},s,o,d){return{latestValues:jce(s,o,d,e),renderState:r()}}function jce(e,r,s,o){const d={},p=o(e,{});for(const k in p)d[k]=Sj(p[k]);let{initial:m,animate:g}=e;const b=LC(e),S=Q5(e);r&&S&&!b&&e.inherit!==!1&&(m===void 0&&(m=r.initial),g===void 0&&(g=r.animate));let E=s?s.initial===!1:!1;E=E||m===!1;const A=E?g:m;if(A&&typeof A!="boolean"&&!zC(A)){const k=Array.isArray(A)?A:[A];for(let T=0;T<k.length;T++){const M=M2(e,k[T]);if(M){const{transitionEnd:I,transition:q,...G}=M;for(const K in G){let X=G[K];if(Array.isArray(X)){const z=E?X.length-1:0;X=X[z]}X!==null&&(d[K]=X)}for(const K in I)d[K]=I[K]}}}return d}const iF=e=>(r,s)=>{const o=R.useContext(IC),d=R.useContext(c2),p=()=>Ece(e,r,o,d);return s?p():soe(p)};function I2(e,r,s){const{style:o}=e,d={};for(const p in o)(bi(o[p])||r.style&&bi(r.style[p])||eF(p,e)||s?.getValue(p)?.liveStyle!==void 0)&&(d[p]=o[p]);return d}const Cce=iF({scrapeMotionValuesFromProps:I2,createRenderState:D2});function aF(e,r,s){const o=I2(e,r,s);for(const d in e)if(bi(e[d])||bi(r[d])){const p=Dg.indexOf(d)!==-1?"attr"+d.charAt(0).toUpperCase()+d.substring(1):d;o[p]=e[d]}return o}const Ace=iF({scrapeMotionValuesFromProps:aF,createRenderState:rF}),Oce=Symbol.for("motionComponentSymbol");function ag(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function kce(e,r,s){return R.useCallback(o=>{o&&e.onMount&&e.onMount(o),r&&(o?r.mount(o):r.unmount()),s&&(typeof s=="function"?s(o):ag(s)&&(s.current=o))},[r])}const z2=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Rce="framerAppearId",oF="data-"+z2(Rce),lF=R.createContext({});function Tce(e,r,s,o,d){const{visualElement:p}=R.useContext(IC),m=R.useContext(W5),g=R.useContext(c2),b=R.useContext(Z5).reducedMotion,S=R.useRef(null);o=o||m.renderer,!S.current&&o&&(S.current=o(e,{visualState:r,parent:p,props:s,presenceContext:g,blockInitialAnimation:g?g.initial===!1:!1,reducedMotionConfig:b}));const E=S.current,A=R.useContext(lF);E&&!E.projection&&d&&(E.type==="html"||E.type==="svg")&&_ce(S.current,s,d,A);const k=R.useRef(!1);R.useInsertionEffect(()=>{E&&k.current&&E.update(s,g)});const T=s[oF],M=R.useRef(!!T&&!window.MotionHandoffIsComplete?.(T)&&window.MotionHasOptimisedAnimation?.(T));return ioe(()=>{E&&(k.current=!0,window.MotionIsMounted=!0,E.updateFeatures(),E.scheduleRenderMicrotask(),M.current&&E.animationState&&E.animationState.animateChanges())}),R.useEffect(()=>{E&&(!M.current&&E.animationState&&E.animationState.animateChanges(),M.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(T)}),M.current=!1),E.enteringChildren=void 0)}),E}function _ce(e,r,s,o){const{layoutId:d,layout:p,drag:m,dragConstraints:g,layoutScroll:b,layoutRoot:S,layoutCrossfade:E}=r;e.projection=new s(e.latestValues,r["data-framer-portal-id"]?void 0:cF(e.parent)),e.projection.setOptions({layoutId:d,layout:p,alwaysMeasureLayout:!!m||g&&ag(g),visualElement:e,animationType:typeof p=="string"?p:"both",initialPromotionConfig:o,crossfade:E,layoutScroll:b,layoutRoot:S})}function cF(e){if(e)return e.options.allowProjection!==!1?e.projection:cF(e.parent)}function tT(e,{forwardMotionProps:r=!1}={},s,o){s&&sce(s);const d=P2(e)?Ace:Cce;function p(g,b){let S;const E={...R.useContext(Z5),...g,layoutId:$ce(g)},{isStatic:A}=E,k=cce(g),T=d(g,A);if(!A&&l2){Nce();const M=Dce(E);S=M.MeasureLayout,k.visualElement=Tce(e,T,E,o,M.ProjectionNode)}return u.jsxs(IC.Provider,{value:k,children:[S&&k.visualElement?u.jsx(S,{visualElement:k.visualElement,...E}):null,Sce(e,g,kce(T,k.visualElement,b),T,A,r)]})}p.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const m=R.forwardRef(p);return m[Oce]=e,m}function $ce({layoutId:e}){const r=R.useContext(a5).id;return r&&e!==void 0?r+"-"+e:e}function Nce(e,r){R.useContext(W5).strict}function Dce(e){const{drag:r,layout:s}=Sg;if(!r&&!s)return{};const o={...r,...s};return{MeasureLayout:r?.isEnabled(e)||s?.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function Pce(e,r){if(typeof Proxy>"u")return tT;const s=new Map,o=(p,m)=>tT(p,m,e,r),d=(p,m)=>o(p,m);return new Proxy(d,{get:(p,m)=>m==="create"?o:(s.has(m)||s.set(m,tT(m,void 0,e,r)),s.get(m))})}function uF({top:e,left:r,right:s,bottom:o}){return{x:{min:r,max:s},y:{min:e,max:o}}}function Mce({x:e,y:r}){return{top:r.min,right:e.max,bottom:r.max,left:e.min}}function Ice(e,r){if(!r)return e;const s=r({x:e.left,y:e.top}),o=r({x:e.right,y:e.bottom});return{top:s.y,left:s.x,bottom:o.y,right:o.x}}function nT(e){return e===void 0||e===1}function n_({scale:e,scaleX:r,scaleY:s}){return!nT(e)||!nT(r)||!nT(s)}function gp(e){return n_(e)||dF(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function dF(e){return XI(e.x)||XI(e.y)}function XI(e){return e&&e!=="0%"}function Yj(e,r,s){const o=e-s,d=r*o;return s+d}function YI(e,r,s,o,d){return d!==void 0&&(e=Yj(e,d,o)),Yj(e,s,o)+r}function r_(e,r=0,s=1,o,d){e.min=YI(e.min,r,s,o,d),e.max=YI(e.max,r,s,o,d)}function hF(e,{x:r,y:s}){r_(e.x,r.translate,r.scale,r.originPoint),r_(e.y,s.translate,s.scale,s.originPoint)}const ZI=.999999999999,WI=1.0000000000001;function zce(e,r,s,o=!1){const d=s.length;if(!d)return;r.x=r.y=1;let p,m;for(let g=0;g<d;g++){p=s[g],m=p.projectionDelta;const{visualElement:b}=p.options;b&&b.props.style&&b.props.style.display==="contents"||(o&&p.options.layoutScroll&&p.scroll&&p!==p.root&&lg(e,{x:-p.scroll.offset.x,y:-p.scroll.offset.y}),m&&(r.x*=m.x.scale,r.y*=m.y.scale,hF(e,m)),o&&gp(p.latestValues)&&lg(e,p.latestValues))}r.x<WI&&r.x>ZI&&(r.x=1),r.y<WI&&r.y>ZI&&(r.y=1)}function og(e,r){e.min=e.min+r,e.max=e.max+r}function JI(e,r,s,o,d=.5){const p=zr(e.min,e.max,d);r_(e,r,s,p,o)}function lg(e,r){JI(e.x,r.x,r.scaleX,r.scale,r.originX),JI(e.y,r.y,r.scaleY,r.scale,r.originY)}function pF(e,r){return uF(Ice(e.getBoundingClientRect(),r))}function Lce(e,r,s){const o=pF(e,s),{scroll:d}=r;return d&&(og(o.x,d.offset.x),og(o.y,d.offset.y)),o}const QI=()=>({translate:0,scale:1,origin:0,originPoint:0}),cg=()=>({x:QI(),y:QI()}),e4=()=>({min:0,max:0}),ns=()=>({x:e4(),y:e4()}),s_={current:null},fF={current:!1};function Fce(){if(fF.current=!0,!!l2)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),r=()=>s_.current=e.matches;e.addEventListener("change",r),r()}else s_.current=!1}const qce=new WeakMap;function Bce(e,r,s){for(const o in r){const d=r[o],p=s[o];if(bi(d))e.addValue(o,d);else if(bi(p))e.addValue(o,wg(d,{owner:e}));else if(p!==d)if(e.hasValue(o)){const m=e.getValue(o);m.liveStyle===!0?m.jump(d):m.hasAnimated||m.set(d)}else{const m=e.getStaticValue(o);e.addValue(o,wg(m!==void 0?m:d,{owner:e}))}}for(const o in s)r[o]===void 0&&e.removeValue(o);return r}const t4=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Uce{scrapeMotionValuesFromProps(r,s,o){return{}}constructor({parent:r,props:s,presenceContext:o,reducedMotionConfig:d,blockInitialAnimation:p,visualState:m},g={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=A2,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const k=da.now();this.renderScheduledAt<k&&(this.renderScheduledAt=k,_r.render(this.render,!1,!0))};const{latestValues:b,renderState:S}=m;this.latestValues=b,this.baseTarget={...b},this.initialValues=s.initial?{...b}:{},this.renderState=S,this.parent=r,this.props=s,this.presenceContext=o,this.depth=r?r.depth+1:0,this.reducedMotionConfig=d,this.options=g,this.blockInitialAnimation=!!p,this.isControllingVariants=LC(s),this.isVariantNode=Q5(s),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(r&&r.current);const{willChange:E,...A}=this.scrapeMotionValuesFromProps(s,{},this);for(const k in A){const T=A[k];b[k]!==void 0&&bi(T)&&T.set(b[k])}}mount(r){this.current=r,qce.set(r,this),this.projection&&!this.projection.instance&&this.projection.mount(r),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((s,o)=>this.bindToMotionValue(o,s)),fF.current||Fce(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:s_.current,this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Ud(this.notifyUpdate),Ud(this.render),this.valueSubscriptions.forEach(r=>r()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const r in this.events)this.events[r].clear();for(const r in this.features){const s=this.features[r];s&&(s.unmount(),s.isMounted=!1)}this.current=null}addChild(r){this.children.add(r),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(r)}removeChild(r){this.children.delete(r),this.enteringChildren&&this.enteringChildren.delete(r)}bindToMotionValue(r,s){this.valueSubscriptions.has(r)&&this.valueSubscriptions.get(r)();const o=Pg.has(r);o&&this.onBindTransform&&this.onBindTransform();const d=s.on("change",m=>{this.latestValues[r]=m,this.props.onUpdate&&_r.preRender(this.notifyUpdate),o&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let p;window.MotionCheckAppearSync&&(p=window.MotionCheckAppearSync(this,r,s)),this.valueSubscriptions.set(r,()=>{d(),p&&p(),s.owner&&s.stop()})}sortNodePosition(r){return!this.current||!this.sortInstanceNodePosition||this.type!==r.type?0:this.sortInstanceNodePosition(this.current,r.current)}updateFeatures(){let r="animation";for(r in Sg){const s=Sg[r];if(!s)continue;const{isEnabled:o,Feature:d}=s;if(!this.features[r]&&d&&o(this.props)&&(this.features[r]=new d(this)),this.features[r]){const p=this.features[r];p.isMounted?p.update():(p.mount(),p.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):ns()}getStaticValue(r){return this.latestValues[r]}setStaticValue(r,s){this.latestValues[r]=s}update(r,s){(r.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=r,this.prevPresenceContext=this.presenceContext,this.presenceContext=s;for(let o=0;o<t4.length;o++){const d=t4[o];this.propEventSubscriptions[d]&&(this.propEventSubscriptions[d](),delete this.propEventSubscriptions[d]);const p="on"+d,m=r[p];m&&(this.propEventSubscriptions[d]=this.on(d,m))}this.prevMotionValues=Bce(this,this.scrapeMotionValuesFromProps(r,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(r){return this.props.variants?this.props.variants[r]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(r){const s=this.getClosestVariantNode();if(s)return s.variantChildren&&s.variantChildren.add(r),()=>s.variantChildren.delete(r)}addValue(r,s){const o=this.values.get(r);s!==o&&(o&&this.removeValue(r),this.bindToMotionValue(r,s),this.values.set(r,s),this.latestValues[r]=s.get())}removeValue(r){this.values.delete(r);const s=this.valueSubscriptions.get(r);s&&(s(),this.valueSubscriptions.delete(r)),delete this.latestValues[r],this.removeValueFromRenderState(r,this.renderState)}hasValue(r){return this.values.has(r)}getValue(r,s){if(this.props.values&&this.props.values[r])return this.props.values[r];let o=this.values.get(r);return o===void 0&&s!==void 0&&(o=wg(s===null?void 0:s,{owner:this}),this.addValue(r,o)),o}readValue(r,s){let o=this.latestValues[r]!==void 0||!this.current?this.latestValues[r]:this.getBaseTargetFromProps(this.props,r)??this.readValueFromInstance(this.current,r,this.options);return o!=null&&(typeof o=="string"&&(o5(o)||c5(o))?o=parseFloat(o):!nce(o)&&Kd.test(s)&&(o=K5(r,s)),this.setBaseTarget(r,bi(o)?o.get():o)),bi(o)?o.get():o}setBaseTarget(r,s){this.baseTarget[r]=s}getBaseTarget(r){const{initial:s}=this.props;let o;if(typeof s=="string"||typeof s=="object"){const p=M2(this.props,s,this.presenceContext?.custom);p&&(o=p[r])}if(s&&o!==void 0)return o;const d=this.getBaseTargetFromProps(this.props,r);return d!==void 0&&!bi(d)?d:this.initialValues[r]!==void 0&&o===void 0?void 0:this.baseTarget[r]}on(r,s){return this.events[r]||(this.events[r]=new f2),this.events[r].add(s)}notify(r,...s){this.events[r]&&this.events[r].notify(...s)}scheduleRenderMicrotask(){R2.render(this.render)}}class mF extends Uce{constructor(){super(...arguments),this.KeyframeResolver=Ule}sortInstanceNodePosition(r,s){return r.compareDocumentPosition(s)&2?1:-1}getBaseTargetFromProps(r,s){return r.style?r.style[s]:void 0}removeValueFromRenderState(r,{vars:s,style:o}){delete s[r],delete o[r]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:r}=this.props;bi(r)&&(this.childSubscription=r.on("change",s=>{this.current&&(this.current.textContent=`${s}`)}))}}function gF(e,{style:r,vars:s},o,d){const p=e.style;let m;for(m in r)p[m]=r[m];d?.applyProjectionStyles(p,o);for(m in s)p.setProperty(m,s[m])}function Kce(e){return window.getComputedStyle(e)}class Vce extends mF{constructor(){super(...arguments),this.type="html",this.renderInstance=gF}readValueFromInstance(r,s){if(Pg.has(s))return this.projection?.isProjecting?YT(s):lle(r,s);{const o=Kce(r),d=(y2(s)?o.getPropertyValue(s):o[s])||0;return typeof d=="string"?d.trim():d}}measureInstanceViewportBox(r,{transformPagePoint:s}){return pF(r,s)}build(r,s,o){N2(r,s,o.transformTemplate)}scrapeMotionValuesFromProps(r,s,o){return I2(r,s,o)}}const yF=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Hce(e,r,s,o){gF(e,r,void 0,o);for(const d in r.attrs)e.setAttribute(yF.has(d)?d:z2(d),r.attrs[d])}class Gce extends mF{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=ns}getBaseTargetFromProps(r,s){return r[s]}readValueFromInstance(r,s){if(Pg.has(s)){const o=U5(s);return o&&o.default||0}return s=yF.has(s)?s:z2(s),r.getAttribute(s)}scrapeMotionValuesFromProps(r,s,o){return aF(r,s,o)}build(r,s,o){nF(r,s,this.isSVGTag,o.transformTemplate,o.style)}renderInstance(r,s,o,d){Hce(r,s,o,d)}mount(r){this.isSVGTag=sF(r.tagName),super.mount(r)}}const Xce=(e,r)=>P2(e)?new Gce(r):new Vce(r,{allowProjection:e!==R.Fragment});function mg(e,r,s){const o=e.getProps();return M2(o,r,s!==void 0?s:o.custom,e)}const i_=e=>Array.isArray(e);function Yce(e,r,s){e.hasValue(r)?e.getValue(r).set(s):e.addValue(r,wg(s))}function Zce(e){return i_(e)?e[e.length-1]||0:e}function Wce(e,r){const s=mg(e,r);let{transitionEnd:o={},transition:d={},...p}=s||{};p={...p,...o};for(const m in p){const g=Zce(p[m]);Yce(e,m,g)}}function Jce(e){return!!(bi(e)&&e.add)}function a_(e,r){const s=e.getValue("willChange");if(Jce(s))return s.add(r);if(!s&&yu.WillChange){const o=new yu.WillChange("auto");e.addValue("willChange",o),o.add(r)}}function vF(e){return e.props[oF]}const Qce=e=>e!==null;function eue(e,{repeat:r,repeatType:s="loop"},o){const d=e.filter(Qce),p=r&&s!=="loop"&&r%2===1?0:d.length-1;return d[p]}const tue={type:"spring",stiffness:500,damping:25,restSpeed:10},nue=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),rue={type:"keyframes",duration:.8},sue={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},iue=(e,{keyframes:r})=>r.length>2?rue:Pg.has(e)?e.startsWith("scale")?nue(r[1]):tue:sue;function aue({when:e,delay:r,delayChildren:s,staggerChildren:o,staggerDirection:d,repeat:p,repeatType:m,repeatDelay:g,from:b,elapsed:S,...E}){return!!Object.keys(E).length}const L2=(e,r,s,o={},d,p)=>m=>{const g=O2(o,e)||{},b=g.delay||o.delay||0;let{elapsed:S=0}=o;S=S-ic(b);const E={keyframes:Array.isArray(s)?s:[null,s],ease:"easeOut",velocity:r.getVelocity(),...g,delay:-S,onUpdate:k=>{r.set(k),g.onUpdate&&g.onUpdate(k)},onComplete:()=>{m(),g.onComplete&&g.onComplete()},name:e,motionValue:r,element:p?void 0:d};aue(g)||Object.assign(E,iue(e,E)),E.duration&&(E.duration=ic(E.duration)),E.repeatDelay&&(E.repeatDelay=ic(E.repeatDelay)),E.from!==void 0&&(E.keyframes[0]=E.from);let A=!1;if((E.type===!1||E.duration===0&&!E.repeatDelay)&&(e_(E),E.delay===0&&(A=!0)),(yu.instantAnimations||yu.skipAnimations)&&(A=!0,e_(E),E.delay=0),E.allowFlatten=!g.type&&!g.ease,A&&!p&&r.get()!==void 0){const k=eue(E.keyframes,g);if(k!==void 0){_r.update(()=>{E.onUpdate(k),E.onComplete()});return}}return g.isSync?new C2(E):new _le(E)};function oue({protectedKeys:e,needsAnimating:r},s){const o=e.hasOwnProperty(s)&&r[s]!==!0;return r[s]=!1,o}function xF(e,r,{delay:s=0,transitionOverride:o,type:d}={}){let{transition:p=e.getDefaultTransition(),transitionEnd:m,...g}=r;o&&(p=o);const b=[],S=d&&e.animationState&&e.animationState.getState()[d];for(const E in g){const A=e.getValue(E,e.latestValues[E]??null),k=g[E];if(k===void 0||S&&oue(S,E))continue;const T={delay:s,...O2(p||{},E)},M=A.get();if(M!==void 0&&!A.isAnimating&&!Array.isArray(k)&&k===M&&!T.velocity)continue;let I=!1;if(window.MotionHandoffAnimation){const G=vF(e);if(G){const K=window.MotionHandoffAnimation(G,E,_r);K!==null&&(T.startTime=K,I=!0)}}a_(e,E),A.start(L2(E,A,k,e.shouldReduceMotion&&F5.has(E)?{type:!1}:T,e,I));const q=A.animation;q&&b.push(q)}return m&&Promise.all(b).then(()=>{_r.update(()=>{m&&Wce(e,m)})}),b}function bF(e,r,s,o=0,d=1){const p=Array.from(e).sort((S,E)=>S.sortNodePosition(E)).indexOf(r),m=e.size,g=(m-1)*o;return typeof s=="function"?s(p,m):d===1?p*o:g-p*o}function o_(e,r,s={}){const o=mg(e,r,s.type==="exit"?e.presenceContext?.custom:void 0);let{transition:d=e.getDefaultTransition()||{}}=o||{};s.transitionOverride&&(d=s.transitionOverride);const p=o?()=>Promise.all(xF(e,o,s)):()=>Promise.resolve(),m=e.variantChildren&&e.variantChildren.size?(b=0)=>{const{delayChildren:S=0,staggerChildren:E,staggerDirection:A}=d;return lue(e,r,b,S,E,A,s)}:()=>Promise.resolve(),{when:g}=d;if(g){const[b,S]=g==="beforeChildren"?[p,m]:[m,p];return b().then(()=>S())}else return Promise.all([p(),m(s.delay)])}function lue(e,r,s=0,o=0,d=0,p=1,m){const g=[];for(const b of e.variantChildren)b.notify("AnimationStart",r),g.push(o_(b,r,{...m,delay:s+(typeof o=="function"?0:o)+bF(e.variantChildren,b,o,d,p)}).then(()=>b.notify("AnimationComplete",r)));return Promise.all(g)}function cue(e,r,s={}){e.notify("AnimationStart",r);let o;if(Array.isArray(r)){const d=r.map(p=>o_(e,p,s));o=Promise.all(d)}else if(typeof r=="string")o=o_(e,r,s);else{const d=typeof r=="function"?mg(e,r,s.custom):r;o=Promise.all(xF(e,d,s))}return o.then(()=>{e.notify("AnimationComplete",r)})}function wF(e,r){if(!Array.isArray(r))return!1;const s=r.length;if(s!==e.length)return!1;for(let o=0;o<s;o++)if(r[o]!==e[o])return!1;return!0}const uue=$2.length;function SF(e){if(!e)return;if(!e.isControllingVariants){const s=e.parent?SF(e.parent)||{}:{};return e.props.initial!==void 0&&(s.initial=e.props.initial),s}const r={};for(let s=0;s<uue;s++){const o=$2[s],d=e.props[o];(Vb(d)||d===!1)&&(r[o]=d)}return r}const due=[..._2].reverse(),hue=_2.length;function pue(e){return r=>Promise.all(r.map(({animation:s,options:o})=>cue(e,s,o)))}function fue(e){let r=pue(e),s=n4(),o=!0;const d=b=>(S,E)=>{const A=mg(e,E,b==="exit"?e.presenceContext?.custom:void 0);if(A){const{transition:k,transitionEnd:T,...M}=A;S={...S,...M,...T}}return S};function p(b){r=b(e)}function m(b){const{props:S}=e,E=SF(e.parent)||{},A=[],k=new Set;let T={},M=1/0;for(let q=0;q<hue;q++){const G=due[q],K=s[G],X=S[G]!==void 0?S[G]:E[G],z=Vb(X),ee=G===b?K.isActive:null;ee===!1&&(M=q);let oe=X===E[G]&&X!==S[G]&&z;if(oe&&o&&e.manuallyAnimateOnMount&&(oe=!1),K.protectedKeys={...T},!K.isActive&&ee===null||!X&&!K.prevProp||zC(X)||typeof X=="boolean")continue;const Q=mue(K.prevProp,X);let ne=Q||G===b&&K.isActive&&!oe&&z||q>M&&z,de=!1;const Ce=Array.isArray(X)?X:[X];let xe=Ce.reduce(d(G),{});ee===!1&&(xe={});const{prevResolvedValues:le={}}=K,be={...le,...xe},je=re=>{ne=!0,k.has(re)&&(de=!0,k.delete(re)),K.needsAnimating[re]=!0;const ue=e.getValue(re);ue&&(ue.liveStyle=!1)};for(const re in be){const ue=xe[re],_e=le[re];if(T.hasOwnProperty(re))continue;let fe=!1;i_(ue)&&i_(_e)?fe=!wF(ue,_e):fe=ue!==_e,fe?ue!=null?je(re):k.add(re):ue!==void 0&&k.has(re)?je(re):K.protectedKeys[re]=!0}K.prevProp=X,K.prevResolvedValues=xe,K.isActive&&(T={...T,...xe}),o&&e.blockInitialAnimation&&(ne=!1);const Ke=oe&&Q;ne&&(!Ke||de)&&A.push(...Ce.map(re=>{const ue={type:G};if(typeof re=="string"&&o&&!Ke&&e.manuallyAnimateOnMount&&e.parent){const{parent:_e}=e,fe=mg(_e,re);if(_e.enteringChildren&&fe){const{delayChildren:He}=fe.transition||{};ue.delay=bF(_e.enteringChildren,e,He)}}return{animation:re,options:ue}}))}if(k.size){const q={};if(typeof S.initial!="boolean"){const G=mg(e,Array.isArray(S.initial)?S.initial[0]:S.initial);G&&G.transition&&(q.transition=G.transition)}k.forEach(G=>{const K=e.getBaseTarget(G),X=e.getValue(G);X&&(X.liveStyle=!0),q[G]=K??null}),A.push({animation:q})}let I=!!A.length;return o&&(S.initial===!1||S.initial===S.animate)&&!e.manuallyAnimateOnMount&&(I=!1),o=!1,I?r(A):Promise.resolve()}function g(b,S){if(s[b].isActive===S)return Promise.resolve();e.variantChildren?.forEach(A=>A.animationState?.setActive(b,S)),s[b].isActive=S;const E=m(b);for(const A in s)s[A].protectedKeys={};return E}return{animateChanges:m,setActive:g,setAnimateFunction:p,getState:()=>s,reset:()=>{s=n4()}}}function mue(e,r){return typeof r=="string"?r!==e:Array.isArray(r)?!wF(r,e):!1}function mp(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function n4(){return{animate:mp(!0),whileInView:mp(),whileHover:mp(),whileTap:mp(),whileDrag:mp(),whileFocus:mp(),exit:mp()}}class Yd{constructor(r){this.isMounted=!1,this.node=r}update(){}}class gue extends Yd{constructor(r){super(r),r.animationState||(r.animationState=fue(r))}updateAnimationControlsSubscription(){const{animate:r}=this.node.getProps();zC(r)&&(this.unmountControls=r.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:r}=this.node.getProps(),{animate:s}=this.node.prevProps||{};r!==s&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let yue=0;class vue extends Yd{constructor(){super(...arguments),this.id=yue++}update(){if(!this.node.presenceContext)return;const{isPresent:r,onExitComplete:s}=this.node.presenceContext,{isPresent:o}=this.node.prevPresenceContext||{};if(!this.node.animationState||r===o)return;const d=this.node.animationState.setActive("exit",!r);s&&!r&&d.then(()=>{s(this.id)})}mount(){const{register:r,onExitComplete:s}=this.node.presenceContext||{};s&&s(this.id),r&&(this.unmount=r(this.id))}unmount(){}}const xue={animation:{Feature:gue},exit:{Feature:vue}};function Gb(e,r,s,o={passive:!0}){return e.addEventListener(r,s,o),()=>e.removeEventListener(r,s)}function mw(e){return{point:{x:e.pageX,y:e.pageY}}}const bue=e=>r=>T2(r)&&e(r,mw(r));function $b(e,r,s,o){return Gb(e,r,bue(s),o)}const EF=1e-4,wue=1-EF,Sue=1+EF,jF=.01,Eue=0-jF,jue=0+jF;function Mi(e){return e.max-e.min}function Cue(e,r,s){return Math.abs(e-r)<=s}function r4(e,r,s,o=.5){e.origin=o,e.originPoint=zr(r.min,r.max,e.origin),e.scale=Mi(s)/Mi(r),e.translate=zr(s.min,s.max,e.origin)-e.originPoint,(e.scale>=wue&&e.scale<=Sue||isNaN(e.scale))&&(e.scale=1),(e.translate>=Eue&&e.translate<=jue||isNaN(e.translate))&&(e.translate=0)}function Nb(e,r,s,o){r4(e.x,r.x,s.x,o?o.originX:void 0),r4(e.y,r.y,s.y,o?o.originY:void 0)}function s4(e,r,s){e.min=s.min+r.min,e.max=e.min+Mi(r)}function Aue(e,r,s){s4(e.x,r.x,s.x),s4(e.y,r.y,s.y)}function i4(e,r,s){e.min=r.min-s.min,e.max=e.min+Mi(r)}function Db(e,r,s){i4(e.x,r.x,s.x),i4(e.y,r.y,s.y)}function no(e){return[e("x"),e("y")]}const CF=({current:e})=>e?e.ownerDocument.defaultView:null,a4=(e,r)=>Math.abs(e-r);function Oue(e,r){const s=a4(e.x,r.x),o=a4(e.y,r.y);return Math.sqrt(s**2+o**2)}class AF{constructor(r,s,{transformPagePoint:o,contextWindow:d=window,dragSnapToOrigin:p=!1,distanceThreshold:m=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const k=sT(this.lastMoveEventInfo,this.history),T=this.startEvent!==null,M=Oue(k.offset,{x:0,y:0})>=this.distanceThreshold;if(!T&&!M)return;const{point:I}=k,{timestamp:q}=Us;this.history.push({...I,timestamp:q});const{onStart:G,onMove:K}=this.handlers;T||(G&&G(this.lastMoveEvent,k),this.startEvent=this.lastMoveEvent),K&&K(this.lastMoveEvent,k)},this.handlePointerMove=(k,T)=>{this.lastMoveEvent=k,this.lastMoveEventInfo=rT(T,this.transformPagePoint),_r.update(this.updatePoint,!0)},this.handlePointerUp=(k,T)=>{this.end();const{onEnd:M,onSessionEnd:I,resumeAnimation:q}=this.handlers;if(this.dragSnapToOrigin&&q&&q(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const G=sT(k.type==="pointercancel"?this.lastMoveEventInfo:rT(T,this.transformPagePoint),this.history);this.startEvent&&M&&M(k,G),I&&I(k,G)},!T2(r))return;this.dragSnapToOrigin=p,this.handlers=s,this.transformPagePoint=o,this.distanceThreshold=m,this.contextWindow=d||window;const g=mw(r),b=rT(g,this.transformPagePoint),{point:S}=b,{timestamp:E}=Us;this.history=[{...S,timestamp:E}];const{onSessionStart:A}=s;A&&A(r,sT(b,this.history)),this.removeListeners=hw($b(this.contextWindow,"pointermove",this.handlePointerMove),$b(this.contextWindow,"pointerup",this.handlePointerUp),$b(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(r){this.handlers=r}end(){this.removeListeners&&this.removeListeners(),Ud(this.updatePoint)}}function rT(e,r){return r?{point:r(e.point)}:e}function o4(e,r){return{x:e.x-r.x,y:e.y-r.y}}function sT({point:e},r){return{point:e,delta:o4(e,OF(r)),offset:o4(e,kue(r)),velocity:Rue(r,.1)}}function kue(e){return e[0]}function OF(e){return e[e.length-1]}function Rue(e,r){if(e.length<2)return{x:0,y:0};let s=e.length-1,o=null;const d=OF(e);for(;s>=0&&(o=e[s],!(d.timestamp-o.timestamp>ic(r)));)s--;if(!o)return{x:0,y:0};const p=so(d.timestamp-o.timestamp);if(p===0)return{x:0,y:0};const m={x:(d.x-o.x)/p,y:(d.y-o.y)/p};return m.x===1/0&&(m.x=0),m.y===1/0&&(m.y=0),m}function Tue(e,{min:r,max:s},o){return r!==void 0&&e<r?e=o?zr(r,e,o.min):Math.max(e,r):s!==void 0&&e>s&&(e=o?zr(s,e,o.max):Math.min(e,s)),e}function l4(e,r,s){return{min:r!==void 0?e.min+r:void 0,max:s!==void 0?e.max+s-(e.max-e.min):void 0}}function _ue(e,{top:r,left:s,bottom:o,right:d}){return{x:l4(e.x,s,d),y:l4(e.y,r,o)}}function c4(e,r){let s=r.min-e.min,o=r.max-e.max;return r.max-r.min<e.max-e.min&&([s,o]=[o,s]),{min:s,max:o}}function $ue(e,r){return{x:c4(e.x,r.x),y:c4(e.y,r.y)}}function Nue(e,r){let s=.5;const o=Mi(e),d=Mi(r);return d>o?s=Bb(r.min,r.max-o,e.min):o>d&&(s=Bb(e.min,e.max-d,r.min)),gu(0,1,s)}function Due(e,r){const s={};return r.min!==void 0&&(s.min=r.min-e.min),r.max!==void 0&&(s.max=r.max-e.min),s}const l_=.35;function Pue(e=l_){return e===!1?e=0:e===!0&&(e=l_),{x:u4(e,"left","right"),y:u4(e,"top","bottom")}}function u4(e,r,s){return{min:d4(e,r),max:d4(e,s)}}function d4(e,r){return typeof e=="number"?e:e[r]||0}const Mue=new WeakMap;class Iue{constructor(r){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=ns(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=r}start(r,{snapToCursor:s=!1,distanceThreshold:o}={}){const{presenceContext:d}=this.visualElement;if(d&&d.isPresent===!1)return;const p=A=>{const{dragSnapToOrigin:k}=this.getProps();k?this.pauseAnimation():this.stopAnimation(),s&&this.snapToCursor(mw(A).point)},m=(A,k)=>{const{drag:T,dragPropagation:M,onDragStart:I}=this.getProps();if(T&&!M&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Xle(T),!this.openDragLock))return;this.latestPointerEvent=A,this.latestPanInfo=k,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),no(G=>{let K=this.getAxisMotionValue(G).get()||0;if(ac.test(K)){const{projection:X}=this.visualElement;if(X&&X.layout){const z=X.layout.layoutBox[G];z&&(K=Mi(z)*(parseFloat(K)/100))}}this.originPoint[G]=K}),I&&_r.postRender(()=>I(A,k)),a_(this.visualElement,"transform");const{animationState:q}=this.visualElement;q&&q.setActive("whileDrag",!0)},g=(A,k)=>{this.latestPointerEvent=A,this.latestPanInfo=k;const{dragPropagation:T,dragDirectionLock:M,onDirectionLock:I,onDrag:q}=this.getProps();if(!T&&!this.openDragLock)return;const{offset:G}=k;if(M&&this.currentDirection===null){this.currentDirection=zue(G),this.currentDirection!==null&&I&&I(this.currentDirection);return}this.updateAxis("x",k.point,G),this.updateAxis("y",k.point,G),this.visualElement.render(),q&&q(A,k)},b=(A,k)=>{this.latestPointerEvent=A,this.latestPanInfo=k,this.stop(A,k),this.latestPointerEvent=null,this.latestPanInfo=null},S=()=>no(A=>this.getAnimationState(A)==="paused"&&this.getAxisMotionValue(A).animation?.play()),{dragSnapToOrigin:E}=this.getProps();this.panSession=new AF(r,{onSessionStart:p,onStart:m,onMove:g,onSessionEnd:b,resumeAnimation:S},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:E,distanceThreshold:o,contextWindow:CF(this.visualElement)})}stop(r,s){const o=r||this.latestPointerEvent,d=s||this.latestPanInfo,p=this.isDragging;if(this.cancel(),!p||!d||!o)return;const{velocity:m}=d;this.startAnimation(m);const{onDragEnd:g}=this.getProps();g&&_r.postRender(()=>g(o,d))}cancel(){this.isDragging=!1;const{projection:r,animationState:s}=this.visualElement;r&&(r.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:o}=this.getProps();!o&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),s&&s.setActive("whileDrag",!1)}updateAxis(r,s,o){const{drag:d}=this.getProps();if(!o||!nj(r,d,this.currentDirection))return;const p=this.getAxisMotionValue(r);let m=this.originPoint[r]+o[r];this.constraints&&this.constraints[r]&&(m=Tue(m,this.constraints[r],this.elastic[r])),p.set(m)}resolveConstraints(){const{dragConstraints:r,dragElastic:s}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,d=this.constraints;r&&ag(r)?this.constraints||(this.constraints=this.resolveRefConstraints()):r&&o?this.constraints=_ue(o.layoutBox,r):this.constraints=!1,this.elastic=Pue(s),d!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&no(p=>{this.constraints!==!1&&this.getAxisMotionValue(p)&&(this.constraints[p]=Due(o.layoutBox[p],this.constraints[p]))})}resolveRefConstraints(){const{dragConstraints:r,onMeasureDragConstraints:s}=this.getProps();if(!r||!ag(r))return!1;const o=r.current,{projection:d}=this.visualElement;if(!d||!d.layout)return!1;const p=Lce(o,d.root,this.visualElement.getTransformPagePoint());let m=$ue(d.layout.layoutBox,p);if(s){const g=s(Mce(m));this.hasMutatedConstraints=!!g,g&&(m=uF(g))}return m}startAnimation(r){const{drag:s,dragMomentum:o,dragElastic:d,dragTransition:p,dragSnapToOrigin:m,onDragTransitionEnd:g}=this.getProps(),b=this.constraints||{},S=no(E=>{if(!nj(E,s,this.currentDirection))return;let A=b&&b[E]||{};m&&(A={min:0,max:0});const k=d?200:1e6,T=d?40:1e7,M={type:"inertia",velocity:o?r[E]:0,bounceStiffness:k,bounceDamping:T,timeConstant:750,restDelta:1,restSpeed:10,...p,...A};return this.startAxisValueAnimation(E,M)});return Promise.all(S).then(g)}startAxisValueAnimation(r,s){const o=this.getAxisMotionValue(r);return a_(this.visualElement,r),o.start(L2(r,o,0,s,this.visualElement,!1))}stopAnimation(){no(r=>this.getAxisMotionValue(r).stop())}pauseAnimation(){no(r=>this.getAxisMotionValue(r).animation?.pause())}getAnimationState(r){return this.getAxisMotionValue(r).animation?.state}getAxisMotionValue(r){const s=`_drag${r.toUpperCase()}`,o=this.visualElement.getProps(),d=o[s];return d||this.visualElement.getValue(r,(o.initial?o.initial[r]:void 0)||0)}snapToCursor(r){no(s=>{const{drag:o}=this.getProps();if(!nj(s,o,this.currentDirection))return;const{projection:d}=this.visualElement,p=this.getAxisMotionValue(s);if(d&&d.layout){const{min:m,max:g}=d.layout.layoutBox[s];p.set(r[s]-zr(m,g,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:r,dragConstraints:s}=this.getProps(),{projection:o}=this.visualElement;if(!ag(s)||!o||!this.constraints)return;this.stopAnimation();const d={x:0,y:0};no(m=>{const g=this.getAxisMotionValue(m);if(g&&this.constraints!==!1){const b=g.get();d[m]=Nue({min:b,max:b},this.constraints[m])}});const{transformTemplate:p}=this.visualElement.getProps();this.visualElement.current.style.transform=p?p({},""):"none",o.root&&o.root.updateScroll(),o.updateLayout(),this.resolveConstraints(),no(m=>{if(!nj(m,r,null))return;const g=this.getAxisMotionValue(m),{min:b,max:S}=this.constraints[m];g.set(zr(b,S,d[m]))})}addListeners(){if(!this.visualElement.current)return;Mue.set(this.visualElement,this);const r=this.visualElement.current,s=$b(r,"pointerdown",b=>{const{drag:S,dragListener:E=!0}=this.getProps();S&&E&&this.start(b)}),o=()=>{const{dragConstraints:b}=this.getProps();ag(b)&&b.current&&(this.constraints=this.resolveRefConstraints())},{projection:d}=this.visualElement,p=d.addEventListener("measure",o);d&&!d.layout&&(d.root&&d.root.updateScroll(),d.updateLayout()),_r.read(o);const m=Gb(window,"resize",()=>this.scalePositionWithinConstraints()),g=d.addEventListener("didUpdate",(({delta:b,hasLayoutChanged:S})=>{this.isDragging&&S&&(no(E=>{const A=this.getAxisMotionValue(E);A&&(this.originPoint[E]+=b[E].translate,A.set(A.get()+b[E].translate))}),this.visualElement.render())}));return()=>{m(),s(),p(),g&&g()}}getProps(){const r=this.visualElement.getProps(),{drag:s=!1,dragDirectionLock:o=!1,dragPropagation:d=!1,dragConstraints:p=!1,dragElastic:m=l_,dragMomentum:g=!0}=r;return{...r,drag:s,dragDirectionLock:o,dragPropagation:d,dragConstraints:p,dragElastic:m,dragMomentum:g}}}function nj(e,r,s){return(r===!0||r===e)&&(s===null||s===e)}function zue(e,r=10){let s=null;return Math.abs(e.y)>r?s="y":Math.abs(e.x)>r&&(s="x"),s}class Lue extends Yd{constructor(r){super(r),this.removeGroupControls=io,this.removeListeners=io,this.controls=new Iue(r)}mount(){const{dragControls:r}=this.node.getProps();r&&(this.removeGroupControls=r.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||io}unmount(){this.removeGroupControls(),this.removeListeners()}}const h4=e=>(r,s)=>{e&&_r.postRender(()=>e(r,s))};class Fue extends Yd{constructor(){super(...arguments),this.removePointerDownListener=io}onPointerDown(r){this.session=new AF(r,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:CF(this.node)})}createPanHandlers(){const{onPanSessionStart:r,onPanStart:s,onPan:o,onPanEnd:d}=this.node.getProps();return{onSessionStart:h4(r),onStart:h4(s),onMove:o,onEnd:(p,m)=>{delete this.session,d&&_r.postRender(()=>d(p,m))}}}mount(){this.removePointerDownListener=$b(this.node.current,"pointerdown",r=>this.onPointerDown(r))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Ej={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function p4(e,r){return r.max===r.min?0:e/(r.max-r.min)*100}const ib={correct:(e,r)=>{if(!r.target)return e;if(typeof e=="string")if(tn.test(e))e=parseFloat(e);else return e;const s=p4(e,r.target.x),o=p4(e,r.target.y);return`${s}% ${o}%`}},que={correct:(e,{treeScale:r,projectionDelta:s})=>{const o=e,d=Kd.parse(e);if(d.length>5)return o;const p=Kd.createTransformer(e),m=typeof d[0]!="number"?1:0,g=s.x.scale*r.x,b=s.y.scale*r.y;d[0+m]/=g,d[1+m]/=b;const S=zr(g,b,.5);return typeof d[2+m]=="number"&&(d[2+m]/=S),typeof d[3+m]=="number"&&(d[3+m]/=S),p(d)}};let iT=!1;class Bue extends R.Component{componentDidMount(){const{visualElement:r,layoutGroup:s,switchLayoutGroup:o,layoutId:d}=this.props,{projection:p}=r;uce(Uue),p&&(s.group&&s.group.add(p),o&&o.register&&d&&o.register(p),iT&&p.root.didUpdate(),p.addEventListener("animationComplete",()=>{this.safeToRemove()}),p.setOptions({...p.options,onExitComplete:()=>this.safeToRemove()})),Ej.hasEverUpdated=!0}getSnapshotBeforeUpdate(r){const{layoutDependency:s,visualElement:o,drag:d,isPresent:p}=this.props,{projection:m}=o;return m&&(m.isPresent=p,iT=!0,d||r.layoutDependency!==s||s===void 0||r.isPresent!==p?m.willUpdate():this.safeToRemove(),r.isPresent!==p&&(p?m.promote():m.relegate()||_r.postRender(()=>{const g=m.getStack();(!g||!g.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:r}=this.props.visualElement;r&&(r.root.didUpdate(),R2.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:r,layoutGroup:s,switchLayoutGroup:o}=this.props,{projection:d}=r;iT=!0,d&&(d.scheduleCheckAfterUnmount(),s&&s.group&&s.group.remove(d),o&&o.deregister&&o.deregister(d))}safeToRemove(){const{safeToRemove:r}=this.props;r&&r()}render(){return null}}function kF(e){const[r,s]=rce(),o=R.useContext(a5);return u.jsx(Bue,{...e,layoutGroup:o,switchLayoutGroup:R.useContext(lF),isPresent:r,safeToRemove:s})}const Uue={borderRadius:{...ib,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ib,borderTopRightRadius:ib,borderBottomLeftRadius:ib,borderBottomRightRadius:ib,boxShadow:que};function Kue(e,r,s){const o=bi(e)?e:wg(e);return o.start(L2("",o,r,s)),o.animation}const Vue=(e,r)=>e.depth-r.depth;class Hue{constructor(){this.children=[],this.isDirty=!1}add(r){u2(this.children,r),this.isDirty=!0}remove(r){d2(this.children,r),this.isDirty=!0}forEach(r){this.isDirty&&this.children.sort(Vue),this.isDirty=!1,this.children.forEach(r)}}function Gue(e,r){const s=da.now(),o=({timestamp:d})=>{const p=d-s;p>=r&&(Ud(o),e(p-r))};return _r.setup(o,!0),()=>Ud(o)}const RF=["TopLeft","TopRight","BottomLeft","BottomRight"],Xue=RF.length,f4=e=>typeof e=="string"?parseFloat(e):e,m4=e=>typeof e=="number"||tn.test(e);function Yue(e,r,s,o,d,p){d?(e.opacity=zr(0,s.opacity??1,Zue(o)),e.opacityExit=zr(r.opacity??1,0,Wue(o))):p&&(e.opacity=zr(r.opacity??1,s.opacity??1,o));for(let m=0;m<Xue;m++){const g=`border${RF[m]}Radius`;let b=g4(r,g),S=g4(s,g);if(b===void 0&&S===void 0)continue;b||(b=0),S||(S=0),b===0||S===0||m4(b)===m4(S)?(e[g]=Math.max(zr(f4(b),f4(S),o),0),(ac.test(S)||ac.test(b))&&(e[g]+="%")):e[g]=S}(r.rotate||s.rotate)&&(e.rotate=zr(r.rotate||0,s.rotate||0,o))}function g4(e,r){return e[r]!==void 0?e[r]:e.borderRadius}const Zue=TF(0,.5,y5),Wue=TF(.5,.95,io);function TF(e,r,s){return o=>o<e?0:o>r?1:s(Bb(e,r,o))}function y4(e,r){e.min=r.min,e.max=r.max}function to(e,r){y4(e.x,r.x),y4(e.y,r.y)}function v4(e,r){e.translate=r.translate,e.scale=r.scale,e.originPoint=r.originPoint,e.origin=r.origin}function x4(e,r,s,o,d){return e-=r,e=Yj(e,1/s,o),d!==void 0&&(e=Yj(e,1/d,o)),e}function Jue(e,r=0,s=1,o=.5,d,p=e,m=e){if(ac.test(r)&&(r=parseFloat(r),r=zr(m.min,m.max,r/100)-m.min),typeof r!="number")return;let g=zr(p.min,p.max,o);e===p&&(g-=r),e.min=x4(e.min,r,s,g,d),e.max=x4(e.max,r,s,g,d)}function b4(e,r,[s,o,d],p,m){Jue(e,r[s],r[o],r[d],r.scale,p,m)}const Que=["x","scaleX","originX"],ede=["y","scaleY","originY"];function w4(e,r,s,o){b4(e.x,r,Que,s?s.x:void 0,o?o.x:void 0),b4(e.y,r,ede,s?s.y:void 0,o?o.y:void 0)}function S4(e){return e.translate===0&&e.scale===1}function _F(e){return S4(e.x)&&S4(e.y)}function E4(e,r){return e.min===r.min&&e.max===r.max}function tde(e,r){return E4(e.x,r.x)&&E4(e.y,r.y)}function j4(e,r){return Math.round(e.min)===Math.round(r.min)&&Math.round(e.max)===Math.round(r.max)}function $F(e,r){return j4(e.x,r.x)&&j4(e.y,r.y)}function C4(e){return Mi(e.x)/Mi(e.y)}function A4(e,r){return e.translate===r.translate&&e.scale===r.scale&&e.originPoint===r.originPoint}class nde{constructor(){this.members=[]}add(r){u2(this.members,r),r.scheduleRender()}remove(r){if(d2(this.members,r),r===this.prevLead&&(this.prevLead=void 0),r===this.lead){const s=this.members[this.members.length-1];s&&this.promote(s)}}relegate(r){const s=this.members.findIndex(d=>r===d);if(s===0)return!1;let o;for(let d=s;d>=0;d--){const p=this.members[d];if(p.isPresent!==!1){o=p;break}}return o?(this.promote(o),!0):!1}promote(r,s){const o=this.lead;if(r!==o&&(this.prevLead=o,this.lead=r,r.show(),o)){o.instance&&o.scheduleRender(),r.scheduleRender(),r.resumeFrom=o,s&&(r.resumeFrom.preserveOpacity=!0),o.snapshot&&(r.snapshot=o.snapshot,r.snapshot.latestValues=o.animationValues||o.latestValues),r.root&&r.root.isUpdating&&(r.isLayoutDirty=!0);const{crossfade:d}=r.options;d===!1&&o.hide()}}exitAnimationComplete(){this.members.forEach(r=>{const{options:s,resumingFrom:o}=r;s.onExitComplete&&s.onExitComplete(),o&&o.options.onExitComplete&&o.options.onExitComplete()})}scheduleRender(){this.members.forEach(r=>{r.instance&&r.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function rde(e,r,s){let o="";const d=e.x.translate/r.x,p=e.y.translate/r.y,m=s?.z||0;if((d||p||m)&&(o=`translate3d(${d}px, ${p}px, ${m}px) `),(r.x!==1||r.y!==1)&&(o+=`scale(${1/r.x}, ${1/r.y}) `),s){const{transformPerspective:S,rotate:E,rotateX:A,rotateY:k,skewX:T,skewY:M}=s;S&&(o=`perspective(${S}px) ${o}`),E&&(o+=`rotate(${E}deg) `),A&&(o+=`rotateX(${A}deg) `),k&&(o+=`rotateY(${k}deg) `),T&&(o+=`skewX(${T}deg) `),M&&(o+=`skewY(${M}deg) `)}const g=e.x.scale*r.x,b=e.y.scale*r.y;return(g!==1||b!==1)&&(o+=`scale(${g}, ${b})`),o||"none"}const aT=["","X","Y","Z"],sde=1e3;let ide=0;function oT(e,r,s,o){const{latestValues:d}=r;d[e]&&(s[e]=d[e],r.setStaticValue(e,0),o&&(o[e]=0))}function NF(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:r}=e.options;if(!r)return;const s=vF(r);if(window.MotionHasOptimisedAnimation(s,"transform")){const{layout:d,layoutId:p}=e.options;window.MotionCancelOptimisedAnimation(s,"transform",_r,!(d||p))}const{parent:o}=e;o&&!o.hasCheckedOptimisedAppear&&NF(o)}function DF({attachResizeListener:e,defaultParent:r,measureScroll:s,checkIsScrollRoot:o,resetTransform:d}){return class{constructor(m={},g=r?.()){this.id=ide++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(lde),this.nodes.forEach(hde),this.nodes.forEach(pde),this.nodes.forEach(cde)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=m,this.root=g?g.root||g:this,this.path=g?[...g.path,g]:[],this.parent=g,this.depth=g?g.depth+1:0;for(let b=0;b<this.path.length;b++)this.path[b].shouldResetTransform=!0;this.root===this&&(this.nodes=new Hue)}addEventListener(m,g){return this.eventHandlers.has(m)||this.eventHandlers.set(m,new f2),this.eventHandlers.get(m).add(g)}notifyListeners(m,...g){const b=this.eventHandlers.get(m);b&&b.notify(...g)}hasListeners(m){return this.eventHandlers.has(m)}mount(m){if(this.instance)return;this.isSVG=Y5(m)&&!ece(m),this.instance=m;const{layoutId:g,layout:b,visualElement:S}=this.options;if(S&&!S.current&&S.mount(m),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(b||g)&&(this.isLayoutDirty=!0),e){let E,A=0;const k=()=>this.root.updateBlockedByResize=!1;_r.read(()=>{A=window.innerWidth}),e(m,()=>{const T=window.innerWidth;T!==A&&(A=T,this.root.updateBlockedByResize=!0,E&&E(),E=Gue(k,250),Ej.hasAnimatedSinceResize&&(Ej.hasAnimatedSinceResize=!1,this.nodes.forEach(R4)))})}g&&this.root.registerSharedNode(g,this),this.options.animate!==!1&&S&&(g||b)&&this.addEventListener("didUpdate",({delta:E,hasLayoutChanged:A,hasRelativeLayoutChanged:k,layout:T})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const M=this.options.transition||S.getDefaultTransition()||vde,{onLayoutAnimationStart:I,onLayoutAnimationComplete:q}=S.getProps(),G=!this.targetLayout||!$F(this.targetLayout,T),K=!A&&k;if(this.options.layoutRoot||this.resumeFrom||K||A&&(G||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const X={...O2(M,"layout"),onPlay:I,onComplete:q};(S.shouldReduceMotion||this.options.layoutRoot)&&(X.delay=0,X.type=!1),this.startAnimation(X),this.setAnimationOrigin(E,K)}else A||R4(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=T})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const m=this.getStack();m&&m.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Ud(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(fde),this.animationId++)}getTransformTemplate(){const{visualElement:m}=this.options;return m&&m.getProps().transformTemplate}willUpdate(m=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&NF(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let E=0;E<this.path.length;E++){const A=this.path[E];A.shouldResetTransform=!0,A.updateScroll("snapshot"),A.options.layoutRoot&&A.willUpdate(!1)}const{layoutId:g,layout:b}=this.options;if(g===void 0&&!b)return;const S=this.getTransformTemplate();this.prevTransformTemplateValue=S?S(this.latestValues,""):void 0,this.updateSnapshot(),m&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(O4);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(k4);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(dde),this.nodes.forEach(ade),this.nodes.forEach(ode)):this.nodes.forEach(k4),this.clearAllSnapshots();const g=da.now();Us.delta=gu(0,1e3/60,g-Us.timestamp),Us.timestamp=g,Us.isProcessing=!0,YR.update.process(Us),YR.preRender.process(Us),YR.render.process(Us),Us.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,R2.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(ude),this.sharedNodes.forEach(mde)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,_r.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){_r.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Mi(this.snapshot.measuredBox.x)&&!Mi(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let b=0;b<this.path.length;b++)this.path[b].updateScroll();const m=this.layout;this.layout=this.measure(!1),this.layoutCorrected=ns(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:g}=this.options;g&&g.notify("LayoutMeasure",this.layout.layoutBox,m?m.layoutBox:void 0)}updateScroll(m="measure"){let g=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===m&&(g=!1),g&&this.instance){const b=o(this.instance);this.scroll={animationId:this.root.animationId,phase:m,isRoot:b,offset:s(this.instance),wasRoot:this.scroll?this.scroll.isRoot:b}}}resetTransform(){if(!d)return;const m=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,g=this.projectionDelta&&!_F(this.projectionDelta),b=this.getTransformTemplate(),S=b?b(this.latestValues,""):void 0,E=S!==this.prevTransformTemplateValue;m&&this.instance&&(g||gp(this.latestValues)||E)&&(d(this.instance,S),this.shouldResetTransform=!1,this.scheduleRender())}measure(m=!0){const g=this.measurePageBox();let b=this.removeElementScroll(g);return m&&(b=this.removeTransform(b)),xde(b),{animationId:this.root.animationId,measuredBox:g,layoutBox:b,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:m}=this.options;if(!m)return ns();const g=m.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(bde))){const{scroll:S}=this.root;S&&(og(g.x,S.offset.x),og(g.y,S.offset.y))}return g}removeElementScroll(m){const g=ns();if(to(g,m),this.scroll?.wasRoot)return g;for(let b=0;b<this.path.length;b++){const S=this.path[b],{scroll:E,options:A}=S;S!==this.root&&E&&A.layoutScroll&&(E.wasRoot&&to(g,m),og(g.x,E.offset.x),og(g.y,E.offset.y))}return g}applyTransform(m,g=!1){const b=ns();to(b,m);for(let S=0;S<this.path.length;S++){const E=this.path[S];!g&&E.options.layoutScroll&&E.scroll&&E!==E.root&&lg(b,{x:-E.scroll.offset.x,y:-E.scroll.offset.y}),gp(E.latestValues)&&lg(b,E.latestValues)}return gp(this.latestValues)&&lg(b,this.latestValues),b}removeTransform(m){const g=ns();to(g,m);for(let b=0;b<this.path.length;b++){const S=this.path[b];if(!S.instance||!gp(S.latestValues))continue;n_(S.latestValues)&&S.updateSnapshot();const E=ns(),A=S.measurePageBox();to(E,A),w4(g,S.latestValues,S.snapshot?S.snapshot.layoutBox:void 0,E)}return gp(this.latestValues)&&w4(g,this.latestValues),g}setTargetDelta(m){this.targetDelta=m,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(m){this.options={...this.options,...m,crossfade:m.crossfade!==void 0?m.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Us.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(m=!1){const g=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=g.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=g.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=g.isSharedProjectionDirty);const b=!!this.resumingFrom||this!==g;if(!(m||b&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:E,layoutId:A}=this.options;if(!(!this.layout||!(E||A))){if(this.resolvedRelativeTargetAt=Us.timestamp,!this.targetDelta&&!this.relativeTarget){const k=this.getClosestProjectingParent();k&&k.layout&&this.animationProgress!==1?(this.relativeParent=k,this.forceRelativeParentToResolveTarget(),this.relativeTarget=ns(),this.relativeTargetOrigin=ns(),Db(this.relativeTargetOrigin,this.layout.layoutBox,k.layout.layoutBox),to(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=ns(),this.targetWithTransforms=ns()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Aue(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):to(this.target,this.layout.layoutBox),hF(this.target,this.targetDelta)):to(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const k=this.getClosestProjectingParent();k&&!!k.resumingFrom==!!this.resumingFrom&&!k.options.layoutScroll&&k.target&&this.animationProgress!==1?(this.relativeParent=k,this.forceRelativeParentToResolveTarget(),this.relativeTarget=ns(),this.relativeTargetOrigin=ns(),Db(this.relativeTargetOrigin,this.target,k.target),to(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||n_(this.parent.latestValues)||dF(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){const m=this.getLead(),g=!!this.resumingFrom||this!==m;let b=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(b=!1),g&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(b=!1),this.resolvedRelativeTargetAt===Us.timestamp&&(b=!1),b)return;const{layout:S,layoutId:E}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(S||E))return;to(this.layoutCorrected,this.layout.layoutBox);const A=this.treeScale.x,k=this.treeScale.y;zce(this.layoutCorrected,this.treeScale,this.path,g),m.layout&&!m.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(m.target=m.layout.layoutBox,m.targetWithTransforms=ns());const{target:T}=m;if(!T){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(v4(this.prevProjectionDelta.x,this.projectionDelta.x),v4(this.prevProjectionDelta.y,this.projectionDelta.y)),Nb(this.projectionDelta,this.layoutCorrected,T,this.latestValues),(this.treeScale.x!==A||this.treeScale.y!==k||!A4(this.projectionDelta.x,this.prevProjectionDelta.x)||!A4(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",T))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(m=!0){if(this.options.visualElement?.scheduleRender(),m){const g=this.getStack();g&&g.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=cg(),this.projectionDelta=cg(),this.projectionDeltaWithTransform=cg()}setAnimationOrigin(m,g=!1){const b=this.snapshot,S=b?b.latestValues:{},E={...this.latestValues},A=cg();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!g;const k=ns(),T=b?b.source:void 0,M=this.layout?this.layout.source:void 0,I=T!==M,q=this.getStack(),G=!q||q.members.length<=1,K=!!(I&&!G&&this.options.crossfade===!0&&!this.path.some(yde));this.animationProgress=0;let X;this.mixTargetDelta=z=>{const ee=z/1e3;T4(A.x,m.x,ee),T4(A.y,m.y,ee),this.setTargetDelta(A),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Db(k,this.layout.layoutBox,this.relativeParent.layout.layoutBox),gde(this.relativeTarget,this.relativeTargetOrigin,k,ee),X&&tde(this.relativeTarget,X)&&(this.isProjectionDirty=!1),X||(X=ns()),to(X,this.relativeTarget)),I&&(this.animationValues=E,Yue(E,S,this.latestValues,ee,K,G)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=ee},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(m){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Ud(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=_r.update(()=>{Ej.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=wg(0)),this.currentAnimation=Kue(this.motionValue,[0,1e3],{...m,velocity:0,isSync:!0,onUpdate:g=>{this.mixTargetDelta(g),m.onUpdate&&m.onUpdate(g)},onStop:()=>{},onComplete:()=>{m.onComplete&&m.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const m=this.getStack();m&&m.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(sde),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const m=this.getLead();let{targetWithTransforms:g,target:b,layout:S,latestValues:E}=m;if(!(!g||!b||!S)){if(this!==m&&this.layout&&S&&PF(this.options.animationType,this.layout.layoutBox,S.layoutBox)){b=this.target||ns();const A=Mi(this.layout.layoutBox.x);b.x.min=m.target.x.min,b.x.max=b.x.min+A;const k=Mi(this.layout.layoutBox.y);b.y.min=m.target.y.min,b.y.max=b.y.min+k}to(g,b),lg(g,E),Nb(this.projectionDeltaWithTransform,this.layoutCorrected,g,E)}}registerSharedNode(m,g){this.sharedNodes.has(m)||this.sharedNodes.set(m,new nde),this.sharedNodes.get(m).add(g);const S=g.options.initialPromotionConfig;g.promote({transition:S?S.transition:void 0,preserveFollowOpacity:S&&S.shouldPreserveFollowOpacity?S.shouldPreserveFollowOpacity(g):void 0})}isLead(){const m=this.getStack();return m?m.lead===this:!0}getLead(){const{layoutId:m}=this.options;return m?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:m}=this.options;return m?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:m}=this.options;if(m)return this.root.sharedNodes.get(m)}promote({needsReset:m,transition:g,preserveFollowOpacity:b}={}){const S=this.getStack();S&&S.promote(this,b),m&&(this.projectionDelta=void 0,this.needsReset=!0),g&&this.setOptions({transition:g})}relegate(){const m=this.getStack();return m?m.relegate(this):!1}resetSkewAndRotation(){const{visualElement:m}=this.options;if(!m)return;let g=!1;const{latestValues:b}=m;if((b.z||b.rotate||b.rotateX||b.rotateY||b.rotateZ||b.skewX||b.skewY)&&(g=!0),!g)return;const S={};b.z&&oT("z",m,S,this.animationValues);for(let E=0;E<aT.length;E++)oT(`rotate${aT[E]}`,m,S,this.animationValues),oT(`skew${aT[E]}`,m,S,this.animationValues);m.render();for(const E in S)m.setStaticValue(E,S[E]),this.animationValues&&(this.animationValues[E]=S[E]);m.scheduleRender()}applyProjectionStyles(m,g){if(!this.instance||this.isSVG)return;if(!this.isVisible){m.visibility="hidden";return}const b=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,m.visibility="",m.opacity="",m.pointerEvents=Sj(g?.pointerEvents)||"",m.transform=b?b(this.latestValues,""):"none";return}const S=this.getLead();if(!this.projectionDelta||!this.layout||!S.target){this.options.layoutId&&(m.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,m.pointerEvents=Sj(g?.pointerEvents)||""),this.hasProjected&&!gp(this.latestValues)&&(m.transform=b?b({},""):"none",this.hasProjected=!1);return}m.visibility="";const E=S.animationValues||S.latestValues;this.applyTransformsToTarget();let A=rde(this.projectionDeltaWithTransform,this.treeScale,E);b&&(A=b(E,A)),m.transform=A;const{x:k,y:T}=this.projectionDelta;m.transformOrigin=`${k.origin*100}% ${T.origin*100}% 0`,S.animationValues?m.opacity=S===this?E.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:E.opacityExit:m.opacity=S===this?E.opacity!==void 0?E.opacity:"":E.opacityExit!==void 0?E.opacityExit:0;for(const M in Hb){if(E[M]===void 0)continue;const{correct:I,applyTo:q,isCSSVariable:G}=Hb[M],K=A==="none"?E[M]:I(E[M],S);if(q){const X=q.length;for(let z=0;z<X;z++)m[q[z]]=K}else G?this.options.visualElement.renderState.vars[M]=K:m[M]=K}this.options.layoutId&&(m.pointerEvents=S===this?Sj(g?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(m=>m.currentAnimation?.stop()),this.root.nodes.forEach(O4),this.root.sharedNodes.clear()}}}function ade(e){e.updateLayout()}function ode(e){const r=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&r&&e.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:o}=e.layout,{animationType:d}=e.options,p=r.source!==e.layout.source;d==="size"?no(E=>{const A=p?r.measuredBox[E]:r.layoutBox[E],k=Mi(A);A.min=s[E].min,A.max=A.min+k}):PF(d,r.layoutBox,s)&&no(E=>{const A=p?r.measuredBox[E]:r.layoutBox[E],k=Mi(s[E]);A.max=A.min+k,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[E].max=e.relativeTarget[E].min+k)});const m=cg();Nb(m,s,r.layoutBox);const g=cg();p?Nb(g,e.applyTransform(o,!0),r.measuredBox):Nb(g,s,r.layoutBox);const b=!_F(m);let S=!1;if(!e.resumeFrom){const E=e.getClosestProjectingParent();if(E&&!E.resumeFrom){const{snapshot:A,layout:k}=E;if(A&&k){const T=ns();Db(T,r.layoutBox,A.layoutBox);const M=ns();Db(M,s,k.layoutBox),$F(T,M)||(S=!0),E.options.layoutRoot&&(e.relativeTarget=M,e.relativeTargetOrigin=T,e.relativeParent=E)}}}e.notifyListeners("didUpdate",{layout:s,snapshot:r,delta:g,layoutDelta:m,hasLayoutChanged:b,hasRelativeLayoutChanged:S})}else if(e.isLead()){const{onExitComplete:s}=e.options;s&&s()}e.options.transition=void 0}function lde(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function cde(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function ude(e){e.clearSnapshot()}function O4(e){e.clearMeasurements()}function k4(e){e.isLayoutDirty=!1}function dde(e){const{visualElement:r}=e.options;r&&r.getProps().onBeforeLayoutMeasure&&r.notify("BeforeLayoutMeasure"),e.resetTransform()}function R4(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function hde(e){e.resolveTargetDelta()}function pde(e){e.calcProjection()}function fde(e){e.resetSkewAndRotation()}function mde(e){e.removeLeadSnapshot()}function T4(e,r,s){e.translate=zr(r.translate,0,s),e.scale=zr(r.scale,1,s),e.origin=r.origin,e.originPoint=r.originPoint}function _4(e,r,s,o){e.min=zr(r.min,s.min,o),e.max=zr(r.max,s.max,o)}function gde(e,r,s,o){_4(e.x,r.x,s.x,o),_4(e.y,r.y,s.y,o)}function yde(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const vde={duration:.45,ease:[.4,0,.1,1]},$4=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),N4=$4("applewebkit/")&&!$4("chrome/")?Math.round:io;function D4(e){e.min=N4(e.min),e.max=N4(e.max)}function xde(e){D4(e.x),D4(e.y)}function PF(e,r,s){return e==="position"||e==="preserve-aspect"&&!Cue(C4(r),C4(s),.2)}function bde(e){return e!==e.root&&e.scroll?.wasRoot}const wde=DF({attachResizeListener:(e,r)=>Gb(e,"resize",r),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),lT={current:void 0},MF=DF({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!lT.current){const e=new wde({});e.mount(window),e.setOptions({layoutScroll:!0}),lT.current=e}return lT.current},resetTransform:(e,r)=>{e.style.transform=r!==void 0?r:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Sde={pan:{Feature:Fue},drag:{Feature:Lue,ProjectionNode:MF,MeasureLayout:kF}};function P4(e,r,s){const{props:o}=e;e.animationState&&o.whileHover&&e.animationState.setActive("whileHover",s==="Start");const d="onHover"+s,p=o[d];p&&_r.postRender(()=>p(r,mw(r)))}class Ede extends Yd{mount(){const{current:r}=this.node;r&&(this.unmount=Yle(r,(s,o)=>(P4(this.node,o,"Start"),d=>P4(this.node,d,"End"))))}unmount(){}}class jde extends Yd{constructor(){super(...arguments),this.isActive=!1}onFocus(){let r=!1;try{r=this.node.current.matches(":focus-visible")}catch{r=!0}!r||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=hw(Gb(this.node.current,"focus",()=>this.onFocus()),Gb(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function M4(e,r,s){const{props:o}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&o.whileTap&&e.animationState.setActive("whileTap",s==="Start");const d="onTap"+(s==="End"?"":s),p=o[d];p&&_r.postRender(()=>p(r,mw(r)))}class Cde extends Yd{mount(){const{current:r}=this.node;r&&(this.unmount=Qle(r,(s,o)=>(M4(this.node,o,"Start"),(d,{success:p})=>M4(this.node,d,p?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const c_=new WeakMap,cT=new WeakMap,Ade=e=>{const r=c_.get(e.target);r&&r(e)},Ode=e=>{e.forEach(Ade)};function kde({root:e,...r}){const s=e||document;cT.has(s)||cT.set(s,{});const o=cT.get(s),d=JSON.stringify(r);return o[d]||(o[d]=new IntersectionObserver(Ode,{root:e,...r})),o[d]}function Rde(e,r,s){const o=kde(r);return c_.set(e,s),o.observe(e),()=>{c_.delete(e),o.unobserve(e)}}const Tde={some:0,all:1};class _de extends Yd{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:r={}}=this.node.getProps(),{root:s,margin:o,amount:d="some",once:p}=r,m={root:s?s.current:void 0,rootMargin:o,threshold:typeof d=="number"?d:Tde[d]},g=b=>{const{isIntersecting:S}=b;if(this.isInView===S||(this.isInView=S,p&&!S&&this.hasEnteredView))return;S&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",S);const{onViewportEnter:E,onViewportLeave:A}=this.node.getProps(),k=S?E:A;k&&k(b)};return Rde(this.node.current,m,g)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:r,prevProps:s}=this.node;["amount","margin","root"].some($de(r,s))&&this.startObserver()}unmount(){}}function $de({viewport:e={}},{viewport:r={}}={}){return s=>e[s]!==r[s]}const Nde={inView:{Feature:_de},tap:{Feature:Cde},focus:{Feature:jde},hover:{Feature:Ede}},Dde={layout:{ProjectionNode:MF,MeasureLayout:kF}},Pde={...xue,...Nde,...Sde,...Dde},Mde=Pce(Pde,Xce),Ide=[{id:"light",icon:EW,label:"Light"},{id:"dark",icon:oW,label:"Dark"},{id:"system",icon:iW,label:"System"}],IF=({className:e="",variant:r="pill",ariaLabel:s="Toggle theme"})=>{const{theme:o,setTheme:d}=$_(),p=o??"system",m=r==="pill";return u.jsx("div",{className:ht("inline-flex items-center",m&&"bg-muted/70 rounded-full p-1 text-xs shadow-sm",!m&&"gap-2",e),"aria-label":s,role:"radiogroup",children:Ide.map(({id:g,icon:b,label:S})=>{const E=p===g;return u.jsxs("button",{type:"button",role:"radio","aria-checked":E,onClick:()=>d(g),"aria-label":m?S:void 0,className:ht("focus-visible:ring-ring focus-visible:ring-offset-background relative flex items-center justify-center rounded-full transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",E?"text-foreground border":"text-muted-foreground hover:text-foreground",m&&"h-8 w-8",!m&&"h-8 gap-2 px-3 text-sm font-medium"),children:[E&&u.jsx(Mde.span,{layoutId:"theme-switcher-pill",className:"bg-background absolute inset-0 rounded-full shadow-sm",transition:{type:"spring",stiffness:350,damping:26}}),u.jsx(b,{className:"relative z-10 h-4 w-4"}),!m&&u.jsx("span",{className:"relative z-10",children:S})]},g)})})};function zde(){return rr({queryKey:["me"],queryFn:()=>yp.getMe(),staleTime:300*1e3})}function Lde(e,r=[]){let s=[];function o(p,m){const g=R.createContext(m);g.displayName=p+"Context";const b=s.length;s=[...s,m];const S=A=>{const{scope:k,children:T,...M}=A,I=k?.[e]?.[b]||g,q=R.useMemo(()=>M,Object.values(M));return u.jsx(I.Provider,{value:q,children:T})};S.displayName=p+"Provider";function E(A,k){const T=k?.[e]?.[b]||g,M=R.useContext(T);if(M)return M;if(m!==void 0)return m;throw new Error(`\`${A}\` must be used within \`${p}\``)}return[S,E]}const d=()=>{const p=s.map(m=>R.createContext(m));return function(g){const b=g?.[e]||p;return R.useMemo(()=>({[`__scope${e}`]:{...g,[e]:b}}),[g,b])}};return d.scopeName=e,[o,Fde(d,...r)]}function Fde(...e){const r=e[0];if(e.length===1)return r;const s=()=>{const o=e.map(d=>({useScope:d(),scopeName:d.scopeName}));return function(p){const m=o.reduce((g,{useScope:b,scopeName:S})=>{const A=b(p)[`__scope${S}`];return{...g,...A}},{});return R.useMemo(()=>({[`__scope${r.scopeName}`]:m}),[m])}};return s.scopeName=r.scopeName,s}var qde=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],F2=qde.reduce((e,r)=>{const s=tw(`Primitive.${r}`),o=R.forwardRef((d,p)=>{const{asChild:m,...g}=d,b=m?s:r;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(b,{...g,ref:p})});return o.displayName=`Primitive.${r}`,{...e,[r]:o}},{}),uT={exports:{}},dT={};var I4;function Bde(){if(I4)return dT;I4=1;var e=U3();function r(A,k){return A===k&&(A!==0||1/A===1/k)||A!==A&&k!==k}var s=typeof Object.is=="function"?Object.is:r,o=e.useState,d=e.useEffect,p=e.useLayoutEffect,m=e.useDebugValue;function g(A,k){var T=k(),M=o({inst:{value:T,getSnapshot:k}}),I=M[0].inst,q=M[1];return p(function(){I.value=T,I.getSnapshot=k,b(I)&&q({inst:I})},[A,T,k]),d(function(){return b(I)&&q({inst:I}),A(function(){b(I)&&q({inst:I})})},[A]),m(T),T}function b(A){var k=A.getSnapshot;A=A.value;try{var T=k();return!s(A,T)}catch{return!0}}function S(A,k){return k()}var E=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?S:g;return dT.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:E,dT}var z4;function Ude(){return z4||(z4=1,uT.exports=Bde()),uT.exports}var Kde=Ude();function Vde(){return Kde.useSyncExternalStore(Hde,()=>!0,()=>!1)}function Hde(){return()=>{}}var q2="Avatar",[Gde]=Lde(q2),[Xde,zF]=Gde(q2),LF=R.forwardRef((e,r)=>{const{__scopeAvatar:s,...o}=e,[d,p]=R.useState("idle");return u.jsx(Xde,{scope:s,imageLoadingStatus:d,onImageLoadingStatusChange:p,children:u.jsx(F2.span,{...o,ref:r})})});LF.displayName=q2;var FF="AvatarImage",Yde=R.forwardRef((e,r)=>{const{__scopeAvatar:s,src:o,onLoadingStatusChange:d=()=>{},...p}=e,m=zF(FF,s),g=Zde(o,p),b=tl(S=>{d(S),m.onImageLoadingStatusChange(S)});return As(()=>{g!=="idle"&&b(g)},[g,b]),g==="loaded"?u.jsx(F2.img,{...p,ref:r,src:o}):null});Yde.displayName=FF;var qF="AvatarFallback",BF=R.forwardRef((e,r)=>{const{__scopeAvatar:s,delayMs:o,...d}=e,p=zF(qF,s),[m,g]=R.useState(o===void 0);return R.useEffect(()=>{if(o!==void 0){const b=window.setTimeout(()=>g(!0),o);return()=>window.clearTimeout(b)}},[o]),m&&p.imageLoadingStatus!=="loaded"?u.jsx(F2.span,{...d,ref:r}):null});BF.displayName=qF;function L4(e,r){return e?r?(e.src!==r&&(e.src=r),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function Zde(e,{referrerPolicy:r,crossOrigin:s}){const o=Vde(),d=R.useRef(null),p=o?(d.current||(d.current=new window.Image),d.current):null,[m,g]=R.useState(()=>L4(p,e));return As(()=>{g(L4(p,e))},[p,e]),As(()=>{const b=A=>()=>{g(A)};if(!p)return;const S=b("loaded"),E=b("error");return p.addEventListener("load",S),p.addEventListener("error",E),r&&(p.referrerPolicy=r),typeof s=="string"&&(p.crossOrigin=s),()=>{p.removeEventListener("load",S),p.removeEventListener("error",E)}},[p,s,r]),m}var Wde=LF,Jde=BF;function Qde({className:e,...r}){return u.jsx(Wde,{"data-slot":"avatar",className:ht("relative flex size-8 shrink-0 overflow-hidden rounded-full",e),...r})}function ehe({className:e,...r}){return u.jsx(Jde,{"data-slot":"avatar-fallback",className:ht("bg-muted flex size-full items-center justify-center rounded-full",e),...r})}function the({...e}){return u.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",...e})}function nhe({className:e,...r}){return u.jsx("ol",{"data-slot":"breadcrumb-list",className:ht("text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5",e),...r})}function F4({className:e,...r}){return u.jsx("li",{"data-slot":"breadcrumb-item",className:ht("inline-flex items-center gap-1.5",e),...r})}function q4({asChild:e,className:r,...s}){const o=e?Cg:"a";return u.jsx(o,{"data-slot":"breadcrumb-link",className:ht("hover:text-foreground transition-colors",r),...s})}function rhe({className:e,...r}){return u.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:ht("text-foreground font-normal",e),...r})}function she({children:e,className:r,...s}){return u.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:ht("[&>svg]:size-3.5",r),...s,children:e??u.jsx(wZ,{})})}const hT=768;function ihe(){const[e,r]=R.useState(void 0);return R.useEffect(()=>{const s=window.matchMedia(`(max-width: ${hT-1}px)`),o=()=>{r(window.innerWidth<hT)};return s.addEventListener("change",o),r(window.innerWidth<hT),()=>s.removeEventListener("change",o)},[]),!!e}function xt({className:e,type:r,...s}){return u.jsx("input",{type:r,"data-slot":"input",className:ht("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","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",e),...s})}function ahe({...e}){return u.jsx(_C,{"data-slot":"sheet",...e})}function ohe({...e}){return u.jsx($C,{"data-slot":"sheet-portal",...e})}function lhe({className:e,...r}){return u.jsx(NC,{"data-slot":"sheet-overlay",className:ht("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/50",e),...r})}function che({className:e,children:r,side:s="right",...o}){return u.jsxs(ohe,{children:[u.jsx(lhe,{}),u.jsxs(DC,{"data-slot":"sheet-content",className:ht("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",s==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",s==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",s==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",s==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",e),...o,children:[r,u.jsxs(cw,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary 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",children:[u.jsx(F_,{className:"size-4"}),u.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function uhe({className:e,...r}){return u.jsx("div",{"data-slot":"sheet-header",className:ht("flex flex-col gap-1.5 p-4",e),...r})}function dhe({className:e,...r}){return u.jsx(s2,{"data-slot":"sheet-title",className:ht("text-foreground font-semibold",e),...r})}function hhe({className:e,...r}){return u.jsx(i2,{"data-slot":"sheet-description",className:ht("text-muted-foreground text-sm",e),...r})}const phe="sidebar_state",fhe=3600*24*7,mhe="16rem",ghe="18rem",yhe="3rem",vhe="b",UF=R.createContext(null);function B2(){const e=R.useContext(UF);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}function xhe({defaultOpen:e=!0,open:r,onOpenChange:s,className:o,style:d,children:p,...m}){const g=ihe(),[b,S]=R.useState(!1),[E,A]=R.useState(e),k=r??E,T=R.useCallback(G=>{const K=typeof G=="function"?G(k):G;s?s(K):A(K),document.cookie=`${phe}=${K}; path=/; max-age=${fhe}`},[s,k]),M=R.useCallback(()=>g?S(G=>!G):T(G=>!G),[g,T,S]);R.useEffect(()=>{const G=K=>{K.key===vhe&&(K.metaKey||K.ctrlKey)&&(K.preventDefault(),M())};return window.addEventListener("keydown",G),()=>window.removeEventListener("keydown",G)},[M]);const I=k?"expanded":"collapsed",q=R.useMemo(()=>({state:I,open:k,setOpen:T,isMobile:g,openMobile:b,setOpenMobile:S,toggleSidebar:M}),[I,k,T,g,b,S,M]);return u.jsx(UF.Provider,{value:q,children:u.jsx(iw,{delayDuration:0,children:u.jsx("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":mhe,"--sidebar-width-icon":yhe,...d},className:ht("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",o),...m,children:p})})})}function bhe({side:e="left",variant:r="sidebar",collapsible:s="offcanvas",className:o,children:d,...p}){const{isMobile:m,state:g,openMobile:b,setOpenMobile:S}=B2();return s==="none"?u.jsx("div",{"data-slot":"sidebar",className:ht("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",o),...p,children:d}):m?u.jsx(ahe,{open:b,onOpenChange:S,...p,children:u.jsxs(che,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:{"--sidebar-width":ghe},side:e,children:[u.jsxs(uhe,{className:"sr-only",children:[u.jsx(dhe,{children:"Sidebar"}),u.jsx(hhe,{children:"Displays the mobile sidebar."})]}),u.jsx("div",{className:"flex h-full w-full flex-col",children:d})]})}):u.jsxs("div",{className:"group peer text-sidebar-foreground hidden md:block","data-state":g,"data-collapsible":g==="collapsed"?s:"","data-variant":r,"data-side":e,"data-slot":"sidebar",children:[u.jsx("div",{"data-slot":"sidebar-gap",className:ht("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",r==="floating"||r==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),u.jsx("div",{"data-slot":"sidebar-container",className:ht("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",r==="floating"||r==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",o),...p,children:u.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",children:d})})]})}function whe({className:e,onClick:r,...s}){const{toggleSidebar:o}=B2();return u.jsxs(Fe,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:ht("size-7",e),onClick:d=>{r?.(d),o()},...s,children:[u.jsx(pW,{}),u.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})}function She({className:e,...r}){return u.jsx("main",{"data-slot":"sidebar-inset",className:ht("bg-background relative flex w-full flex-1 flex-col","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",e),...r})}function Ehe({className:e,...r}){return u.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:ht("flex flex-col gap-2 p-2",e),...r})}function jhe({className:e,...r}){return u.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:ht("flex flex-col gap-2 p-2",e),...r})}function Che({className:e,...r}){return u.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:ht("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...r})}function rj({className:e,...r}){return u.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:ht("relative flex w-full min-w-0 flex-col p-2",e),...r})}function sj({className:e,asChild:r=!1,...s}){const o=r?Cg:"div";return u.jsx(o,{"data-slot":"sidebar-group-label","data-sidebar":"group-label",className:ht("text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...s})}function ij({className:e,...r}){return u.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:ht("w-full text-sm",e),...r})}function aj({className:e,...r}){return u.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:ht("flex w-full min-w-0 flex-col gap-1",e),...r})}function oj({className:e,...r}){return u.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:ht("group/menu-item relative",e),...r})}const Ahe=B_("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function lj({asChild:e=!1,isActive:r=!1,variant:s="default",size:o="default",tooltip:d,className:p,...m}){const g=e?Cg:"button",{isMobile:b,state:S}=B2(),E=u.jsx(g,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":o,"data-active":r,className:ht(Ahe({variant:s,size:o}),p),...m});return d?(typeof d=="string"&&(d={children:d}),u.jsxs(zj,{children:[u.jsx(Lj,{asChild:!0,children:E}),u.jsx(Fj,{side:"right",align:"center",hidden:S!=="collapsed"||b,...d})]})):E}const Ohe=()=>{const e=T_(),{data:r,isLoading:s}=zde(),o=R.useMemo(()=>{const p=e.pathname.split("/").filter(Boolean),m=[];let g="";for(const b of p)g+=`/${b}`,m.push({to:g,label:b});return m},[e.pathname]),d=R.useMemo(()=>{if(!r)return"U";const m=(r.display_name||r.primary_email||"").trim().split(/\s+/);return m.length>=2?(m[0][0]+m[1][0]).toUpperCase():m.length===1&&m[0]?m[0][0].toUpperCase():"U"},[r]);return u.jsxs("div",{className:"flex h-12 items-center gap-2 border-b px-3",children:[u.jsx(whe,{}),u.jsx("div",{className:"flex-1",children:u.jsx(the,{children:u.jsxs(nhe,{children:[u.jsx(F4,{children:u.jsx(q4,{asChild:!0,children:u.jsx(OR,{to:"/",children:"Home"})})}),o.map((p,m)=>u.jsxs("span",{className:"flex items-center",children:[u.jsx(she,{}),u.jsx(F4,{children:m===o.length-1?u.jsx(rhe,{className:"capitalize",children:p.label}):u.jsx(q4,{asChild:!0,children:u.jsx(OR,{to:p.to,className:"capitalize",children:p.label})})})]},p.to))]})})}),u.jsx(IF,{variant:"wide"}),u.jsx(Fe,{variant:"ghost",size:"sm",asChild:!0,children:u.jsx(OR,{to:"/me",children:s?"…":r?.display_name||"Profile"})}),u.jsx(Qde,{className:"h-7 w-7",children:u.jsx(ehe,{children:d})})]})};async function khe(){const e=Ks.get();if(!e?.refresh_token){Ks.logout();return}try{const r={refresh_token:e.refresh_token};await Xee().logout({dtoLogoutRequest:r})}catch(r){console.warn("Logout API failed; clearing local state anyway",r)}finally{Ks.logout()}}function Rhe(){return{logout:R.useCallback(()=>khe(),[])}}const The=()=>{const[e,r]=R.useState([]),{logout:s}=Rhe();return R.useEffect(()=>{let o=!0;return(async()=>{try{const p=((await yp.getMe()).organizations??[]).map(m=>({id:m.id,name:m.name??m.id}));if(!o)return;r(p),!Qo.get()&&p.length>0&&Qo.set(p[0].id)}catch{}})(),()=>{o=!1}},[]),u.jsxs(xhe,{defaultOpen:!0,children:[u.jsxs(bhe,{collapsible:"icon",variant:"floating",children:[u.jsx(Ehe,{children:u.jsx("div",{className:"px-2 py-2",children:u.jsx(roe,{orgs:e})})}),u.jsxs(Che,{children:[u.jsxs(rj,{children:[u.jsx(sj,{children:"Navigation"}),u.jsx(ij,{children:u.jsx(aj,{children:Use.map(o=>u.jsx(oj,{children:u.jsx(lj,{asChild:!0,tooltip:o.label,children:u.jsxs(LE,{to:o.to,className:({isActive:d})=>ht("flex items-center gap-2",d&&"text-primary"),children:[u.jsx(o.icon,{className:"h-4 w-4"}),u.jsx("span",{children:o.label})]})})},o.to))})})]}),u.jsxs(rj,{children:[u.jsx(sj,{children:"Organization"}),u.jsx(ij,{children:u.jsx(aj,{children:Kse.map(o=>u.jsx(oj,{children:u.jsx(lj,{asChild:!0,tooltip:o.label,children:u.jsxs(LE,{to:o.to,className:({isActive:d})=>ht("flex items-center gap-2",d&&"text-primary"),children:[u.jsx(o.icon,{className:"h-4 w-4"}),u.jsx("span",{children:o.label})]})})},o.to))})})]}),u.jsxs(rj,{children:[u.jsx(sj,{children:"User"}),u.jsx(ij,{children:u.jsx(aj,{children:Vse.map(o=>u.jsx(oj,{children:u.jsx(lj,{asChild:!0,tooltip:o.label,children:u.jsxs(LE,{to:o.to,className:({isActive:d})=>ht("flex items-center gap-2",d&&"text-primary"),children:[u.jsx(o.icon,{className:"h-4 w-4"}),u.jsx("span",{children:o.label})]})})},o.to))})})]}),u.jsxs(rj,{children:[u.jsx(sj,{children:"Admin"}),u.jsx(ij,{children:u.jsx(aj,{children:Hse.map(o=>u.jsx(oj,{children:u.jsx(lj,{asChild:!0,tooltip:o.label,children:u.jsxs(LE,{to:o.to,target:o.target?o.target:"_self",className:({isActive:d})=>ht("flex items-center gap-2",d&&"text-primary"),children:[u.jsx(o.icon,{className:"h-4 w-4"}),u.jsx("span",{children:o.label})]})})},o.to))})})]}),u.jsx("div",{className:"mt-auto flex items-center justify-center p-3",children:u.jsx(IF,{})})]}),u.jsx(jhe,{children:u.jsx("div",{className:"px-2 py-2",children:u.jsx(Fe,{variant:"ghost",size:"sm",className:"w-full",onClick:()=>void s(),children:"Sign out"})})})]}),u.jsxs(She,{className:"flex min-h-screen flex-col",children:[u.jsx(Ohe,{}),u.jsx("main",{className:"p-4",children:u.jsx(K3,{})}),u.jsx(Tse,{})]})]})},_he=()=>{const e=R.useSyncExternalStore(r=>Ks.subscribe(r),()=>Ks.get(),()=>Ks.get());return{tokens:e,authed:!!e?.access_token,isExpired:Ks.isExpired(),willExpireSoon:Ks.willExpireSoon()}},$he=()=>{const{authed:e}=_he(),r=T_();return e?u.jsx(K3,{}):u.jsx(pY,{to:`/login?to=${encodeURIComponent(r.pathname+r.search)}`,replace:!0})},ab=tte(),Sb={listAnnotations:()=>ut(async()=>await ab.listAnnotations()),createAnnotation:e=>ut(async()=>await ab.createAnnotation({dtoCreateAnnotationRequest:e})),getAnnotation:e=>ut(async()=>await ab.getAnnotation({id:e})),deleteAnnotation:e=>ut(async()=>{await ab.deleteAnnotation({id:e})}),updateAnnotation:(e,r)=>ut(async()=>await ab.updateAnnotation({id:e,dtoUpdateAnnotationRequest:r}))};var gw=e=>e.type==="checkbox",wp=e=>e instanceof Date,ua=e=>e==null;const KF=e=>typeof e=="object";var gs=e=>!ua(e)&&!Array.isArray(e)&&KF(e)&&!wp(e),VF=e=>gs(e)&&e.target?gw(e.target)?e.target.checked:e.target.value:e,Nhe=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,HF=(e,r)=>e.has(Nhe(r)),Dhe=e=>{const r=e.constructor&&e.constructor.prototype;return gs(r)&&r.hasOwnProperty("isPrototypeOf")},U2=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function js(e){let r;const s=Array.isArray(e),o=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)r=new Date(e);else if(!(U2&&(e instanceof Blob||o))&&(s||gs(e)))if(r=s?[]:Object.create(Object.getPrototypeOf(e)),!s&&!Dhe(e))r=e;else for(const d in e)e.hasOwnProperty(d)&&(r[d]=js(e[d]));else return e;return r}var FC=e=>/^\w*$/.test(e),Hr=e=>e===void 0,K2=e=>Array.isArray(e)?e.filter(Boolean):[],V2=e=>K2(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Et=(e,r,s)=>{if(!r||!gs(e))return s;const o=(FC(r)?[r]:V2(r)).reduce((d,p)=>ua(d)?d:d[p],e);return Hr(o)||o===e?Hr(e[r])?s:e[r]:o},Ta=e=>typeof e=="boolean",dr=(e,r,s)=>{let o=-1;const d=FC(r)?[r]:V2(r),p=d.length,m=p-1;for(;++o<p;){const g=d[o];let b=s;if(o!==m){const S=e[g];b=gs(S)||Array.isArray(S)?S:isNaN(+d[o+1])?{}:[]}if(g==="__proto__"||g==="constructor"||g==="prototype")return;e[g]=b,e=e[g]}};const Zj={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Zo={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},cu={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},H2=Je.createContext(null);H2.displayName="HookFormContext";const qC=()=>Je.useContext(H2),Phe=e=>{const{children:r,...s}=e;return Je.createElement(H2.Provider,{value:s},r)};var GF=(e,r,s,o=!0)=>{const d={defaultValues:r._defaultValues};for(const p in e)Object.defineProperty(d,p,{get:()=>{const m=p;return r._proxyFormState[m]!==Zo.all&&(r._proxyFormState[m]=!o||Zo.all),s&&(s[m]=!0),e[m]}});return d};const G2=typeof window<"u"?Je.useLayoutEffect:Je.useEffect;function XF(e){const r=qC(),{control:s=r.control,disabled:o,name:d,exact:p}=e||{},[m,g]=Je.useState(s._formState),b=Je.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return G2(()=>s._subscribe({name:d,formState:b.current,exact:p,callback:S=>{!o&&g({...s._formState,...S})}}),[d,o,p]),Je.useEffect(()=>{b.current.isValid&&s._setValid(!0)},[s]),Je.useMemo(()=>GF(m,s,b.current,!1),[m,s])}var $a=e=>typeof e=="string",u_=(e,r,s,o,d)=>$a(e)?(o&&r.watch.add(e),Et(s,e,d)):Array.isArray(e)?e.map(p=>(o&&r.watch.add(p),Et(s,p))):(o&&(r.watchAll=!0),s),d_=e=>ua(e)||!KF(e);function Wo(e,r,s=new WeakSet){if(d_(e)||d_(r))return e===r;if(wp(e)&&wp(r))return e.getTime()===r.getTime();const o=Object.keys(e),d=Object.keys(r);if(o.length!==d.length)return!1;if(s.has(e)||s.has(r))return!0;s.add(e),s.add(r);for(const p of o){const m=e[p];if(!d.includes(p))return!1;if(p!=="ref"){const g=r[p];if(wp(m)&&wp(g)||gs(m)&&gs(g)||Array.isArray(m)&&Array.isArray(g)?!Wo(m,g,s):m!==g)return!1}}return!0}function ug(e){const r=qC(),{control:s=r.control,name:o,defaultValue:d,disabled:p,exact:m,compute:g}=e||{},b=Je.useRef(d),S=Je.useRef(g),E=Je.useRef(void 0),A=Je.useRef(s),k=Je.useRef(o);S.current=g;const[T,M]=Je.useState(()=>{const z=s._getWatch(o,b.current);return S.current?S.current(z):z}),I=Je.useCallback(z=>{const ee=u_(o,s._names,z||s._formValues,!1,b.current);return S.current?S.current(ee):ee},[s._formValues,s._names,o]),q=Je.useCallback(z=>{if(!p){const ee=u_(o,s._names,z||s._formValues,!1,b.current);if(S.current){const oe=S.current(ee);Wo(oe,E.current)||(M(oe),E.current=oe)}else M(ee)}},[s._formValues,s._names,p,o]);G2(()=>((A.current!==s||!Wo(k.current,o))&&(A.current=s,k.current=o,q()),s._subscribe({name:o,formState:{values:!0},exact:m,callback:z=>{q(z.values)}})),[s,m,o,q]),Je.useEffect(()=>s._removeUnmounted());const G=A.current!==s,K=k.current,X=Je.useMemo(()=>{if(p)return null;const z=!G&&!Wo(K,o);return G||z?I():null},[p,G,o,K,I]);return X!==null?X:T}function Mhe(e){const r=qC(),{name:s,disabled:o,control:d=r.control,shouldUnregister:p,defaultValue:m}=e,g=HF(d._names.array,s),b=Je.useMemo(()=>Et(d._formValues,s,Et(d._defaultValues,s,m)),[d,s,m]),S=ug({control:d,name:s,defaultValue:b,exact:!0}),E=XF({control:d,name:s,exact:!0}),A=Je.useRef(e),k=Je.useRef(void 0),T=Je.useRef(d.register(s,{...e.rules,value:S,...Ta(e.disabled)?{disabled:e.disabled}:{}}));A.current=e;const M=Je.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Et(E.errors,s)},isDirty:{enumerable:!0,get:()=>!!Et(E.dirtyFields,s)},isTouched:{enumerable:!0,get:()=>!!Et(E.touchedFields,s)},isValidating:{enumerable:!0,get:()=>!!Et(E.validatingFields,s)},error:{enumerable:!0,get:()=>Et(E.errors,s)}}),[E,s]),I=Je.useCallback(X=>T.current.onChange({target:{value:VF(X),name:s},type:Zj.CHANGE}),[s]),q=Je.useCallback(()=>T.current.onBlur({target:{value:Et(d._formValues,s),name:s},type:Zj.BLUR}),[s,d._formValues]),G=Je.useCallback(X=>{const z=Et(d._fields,s);z&&X&&(z._f.ref={focus:()=>X.focus&&X.focus(),select:()=>X.select&&X.select(),setCustomValidity:ee=>X.setCustomValidity(ee),reportValidity:()=>X.reportValidity()})},[d._fields,s]),K=Je.useMemo(()=>({name:s,value:S,...Ta(o)||E.disabled?{disabled:E.disabled||o}:{},onChange:I,onBlur:q,ref:G}),[s,o,E.disabled,I,q,G,S]);return Je.useEffect(()=>{const X=d._options.shouldUnregister||p,z=k.current;z&&z!==s&&!g&&d.unregister(z),d.register(s,{...A.current.rules,...Ta(A.current.disabled)?{disabled:A.current.disabled}:{}});const ee=(oe,Q)=>{const ne=Et(d._fields,oe);ne&&ne._f&&(ne._f.mount=Q)};if(ee(s,!0),X){const oe=js(Et(d._options.defaultValues,s,A.current.defaultValue));dr(d._defaultValues,s,oe),Hr(Et(d._formValues,s))&&dr(d._formValues,s,oe)}return!g&&d.register(s),k.current=s,()=>{(g?X&&!d._state.action:X)?d.unregister(s):ee(s,!1)}},[s,d,g,p]),Je.useEffect(()=>{d._setDisabledField({disabled:o,name:s})},[o,s,d]),Je.useMemo(()=>({field:K,formState:E,fieldState:M}),[K,E,M])}const Go=e=>e.render(Mhe(e));var X2=(e,r,s,o,d)=>r?{...s[e],types:{...s[e]&&s[e].types?s[e].types:{},[o]:d||!0}}:{},Pb=e=>Array.isArray(e)?e:[e],B4=()=>{let e=[];return{get observers(){return e},next:d=>{for(const p of e)p.next&&p.next(d)},subscribe:d=>(e.push(d),{unsubscribe:()=>{e=e.filter(p=>p!==d)}}),unsubscribe:()=>{e=[]}}};function YF(e,r){const s={};for(const o in e)if(e.hasOwnProperty(o)){const d=e[o],p=r[o];if(d&&gs(d)&&p){const m=YF(d,p);gs(m)&&(s[o]=m)}else e[o]&&(s[o]=p)}return s}var Di=e=>gs(e)&&!Object.keys(e).length,Y2=e=>e.type==="file",Jo=e=>typeof e=="function",Wj=e=>{if(!U2)return!1;const r=e?e.ownerDocument:0;return e instanceof(r&&r.defaultView?r.defaultView.HTMLElement:HTMLElement)},ZF=e=>e.type==="select-multiple",Z2=e=>e.type==="radio",Ihe=e=>Z2(e)||gw(e),pT=e=>Wj(e)&&e.isConnected;function zhe(e,r){const s=r.slice(0,-1).length;let o=0;for(;o<s;)e=Hr(e)?o++:e[r[o++]];return e}function Lhe(e){for(const r in e)if(e.hasOwnProperty(r)&&!Hr(e[r]))return!1;return!0}function fs(e,r){const s=Array.isArray(r)?r:FC(r)?[r]:V2(r),o=s.length===1?e:zhe(e,s),d=s.length-1,p=s[d];return o&&delete o[p],d!==0&&(gs(o)&&Di(o)||Array.isArray(o)&&Lhe(o))&&fs(e,s.slice(0,-1)),e}var Fhe=e=>{for(const r in e)if(Jo(e[r]))return!0;return!1};function WF(e){return Array.isArray(e)||gs(e)&&!Fhe(e)}function h_(e,r={}){for(const s in e)WF(e[s])?(r[s]=Array.isArray(e[s])?[]:{},h_(e[s],r[s])):Hr(e[s])||(r[s]=!0);return r}function Jm(e,r,s){s||(s=h_(r));for(const o in e)WF(e[o])?Hr(r)||d_(s[o])?s[o]=h_(e[o],Array.isArray(e[o])?[]:{}):Jm(e[o],ua(r)?{}:r[o],s[o]):s[o]=!Wo(e[o],r[o]);return s}const U4={value:!1,isValid:!1},K4={value:!0,isValid:!0};var JF=e=>{if(Array.isArray(e)){if(e.length>1){const r=e.filter(s=>s&&s.checked&&!s.disabled).map(s=>s.value);return{value:r,isValid:!!r.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Hr(e[0].attributes.value)?Hr(e[0].value)||e[0].value===""?K4:{value:e[0].value,isValid:!0}:K4:U4}return U4},QF=(e,{valueAsNumber:r,valueAsDate:s,setValueAs:o})=>Hr(e)?e:r?e===""?NaN:e&&+e:s&&$a(e)?new Date(e):o?o(e):e;const V4={isValid:!1,value:null};var e6=e=>Array.isArray(e)?e.reduce((r,s)=>s&&s.checked&&!s.disabled?{isValid:!0,value:s.value}:r,V4):V4;function H4(e){const r=e.ref;return Y2(r)?r.files:Z2(r)?e6(e.refs).value:ZF(r)?[...r.selectedOptions].map(({value:s})=>s):gw(r)?JF(e.refs).value:QF(Hr(r.value)?e.ref.value:r.value,e)}var qhe=(e,r,s,o)=>{const d={};for(const p of e){const m=Et(r,p);m&&dr(d,p,m._f)}return{criteriaMode:s,names:[...e],fields:d,shouldUseNativeValidation:o}},Jj=e=>e instanceof RegExp,ob=e=>Hr(e)?e:Jj(e)?e.source:gs(e)?Jj(e.value)?e.value.source:e.value:e,G4=e=>({isOnSubmit:!e||e===Zo.onSubmit,isOnBlur:e===Zo.onBlur,isOnChange:e===Zo.onChange,isOnAll:e===Zo.all,isOnTouch:e===Zo.onTouched});const X4="AsyncFunction";var Bhe=e=>!!e&&!!e.validate&&!!(Jo(e.validate)&&e.validate.constructor.name===X4||gs(e.validate)&&Object.values(e.validate).find(r=>r.constructor.name===X4)),Uhe=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),Y4=(e,r,s)=>!s&&(r.watchAll||r.watch.has(e)||[...r.watch].some(o=>e.startsWith(o)&&/^\.\w+/.test(e.slice(o.length))));const Mb=(e,r,s,o)=>{for(const d of s||Object.keys(e)){const p=Et(e,d);if(p){const{_f:m,...g}=p;if(m){if(m.refs&&m.refs[0]&&r(m.refs[0],d)&&!o)return!0;if(m.ref&&r(m.ref,m.name)&&!o)return!0;if(Mb(g,r))break}else if(gs(g)&&Mb(g,r))break}}};function Z4(e,r,s){const o=Et(e,s);if(o||FC(s))return{error:o,name:s};const d=s.split(".");for(;d.length;){const p=d.join("."),m=Et(r,p),g=Et(e,p);if(m&&!Array.isArray(m)&&s!==p)return{name:s};if(g&&g.type)return{name:p,error:g};if(g&&g.root&&g.root.type)return{name:`${p}.root`,error:g.root};d.pop()}return{name:s}}var Khe=(e,r,s,o)=>{s(e);const{name:d,...p}=e;return Di(p)||Object.keys(p).length>=Object.keys(r).length||Object.keys(p).find(m=>r[m]===(!o||Zo.all))},Vhe=(e,r,s)=>!e||!r||e===r||Pb(e).some(o=>o&&(s?o===r:o.startsWith(r)||r.startsWith(o))),Hhe=(e,r,s,o,d)=>d.isOnAll?!1:!s&&d.isOnTouch?!(r||e):(s?o.isOnBlur:d.isOnBlur)?!e:(s?o.isOnChange:d.isOnChange)?e:!0,Ghe=(e,r)=>!K2(Et(e,r)).length&&fs(e,r),Xhe=(e,r,s)=>{const o=Pb(Et(e,s));return dr(o,"root",r[s]),dr(e,s,o),e};function W4(e,r,s="validate"){if($a(e)||Array.isArray(e)&&e.every($a)||Ta(e)&&!e)return{type:s,message:$a(e)?e:"",ref:r}}var Xm=e=>gs(e)&&!Jj(e)?e:{value:e,message:""},J4=async(e,r,s,o,d,p)=>{const{ref:m,refs:g,required:b,maxLength:S,minLength:E,min:A,max:k,pattern:T,validate:M,name:I,valueAsNumber:q,mount:G}=e._f,K=Et(s,I);if(!G||r.has(I))return{};const X=g?g[0]:m,z=le=>{d&&X.reportValidity&&(X.setCustomValidity(Ta(le)?"":le||""),X.reportValidity())},ee={},oe=Z2(m),Q=gw(m),ne=oe||Q,de=(q||Y2(m))&&Hr(m.value)&&Hr(K)||Wj(m)&&m.value===""||K===""||Array.isArray(K)&&!K.length,Ce=X2.bind(null,I,o,ee),xe=(le,be,je,Ke=cu.maxLength,ce=cu.minLength)=>{const re=le?be:je;ee[I]={type:le?Ke:ce,message:re,ref:m,...Ce(le?Ke:ce,re)}};if(p?!Array.isArray(K)||!K.length:b&&(!ne&&(de||ua(K))||Ta(K)&&!K||Q&&!JF(g).isValid||oe&&!e6(g).isValid)){const{value:le,message:be}=$a(b)?{value:!!b,message:b}:Xm(b);if(le&&(ee[I]={type:cu.required,message:be,ref:X,...Ce(cu.required,be)},!o))return z(be),ee}if(!de&&(!ua(A)||!ua(k))){let le,be;const je=Xm(k),Ke=Xm(A);if(!ua(K)&&!isNaN(K)){const ce=m.valueAsNumber||K&&+K;ua(je.value)||(le=ce>je.value),ua(Ke.value)||(be=ce<Ke.value)}else{const ce=m.valueAsDate||new Date(K),re=fe=>new Date(new Date().toDateString()+" "+fe),ue=m.type=="time",_e=m.type=="week";$a(je.value)&&K&&(le=ue?re(K)>re(je.value):_e?K>je.value:ce>new Date(je.value)),$a(Ke.value)&&K&&(be=ue?re(K)<re(Ke.value):_e?K<Ke.value:ce<new Date(Ke.value))}if((le||be)&&(xe(!!le,je.message,Ke.message,cu.max,cu.min),!o))return z(ee[I].message),ee}if((S||E)&&!de&&($a(K)||p&&Array.isArray(K))){const le=Xm(S),be=Xm(E),je=!ua(le.value)&&K.length>+le.value,Ke=!ua(be.value)&&K.length<+be.value;if((je||Ke)&&(xe(je,le.message,be.message),!o))return z(ee[I].message),ee}if(T&&!de&&$a(K)){const{value:le,message:be}=Xm(T);if(Jj(le)&&!K.match(le)&&(ee[I]={type:cu.pattern,message:be,ref:m,...Ce(cu.pattern,be)},!o))return z(be),ee}if(M){if(Jo(M)){const le=await M(K,s),be=W4(le,X);if(be&&(ee[I]={...be,...Ce(cu.validate,be.message)},!o))return z(be.message),ee}else if(gs(M)){let le={};for(const be in M){if(!Di(le)&&!o)break;const je=W4(await M[be](K,s),X,be);je&&(le={...je,...Ce(be,je.message)},z(je.message),o&&(ee[I]=le))}if(!Di(le)&&(ee[I]={ref:X,...le},!o))return ee}}return z(!0),ee};const Yhe={mode:Zo.onSubmit,reValidateMode:Zo.onChange,shouldFocusError:!0};function Zhe(e={}){let r={...Yhe,...e},s={submitCount:0,isDirty:!1,isReady:!1,isLoading:Jo(r.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:r.errors||{},disabled:r.disabled||!1},o={},d=gs(r.defaultValues)||gs(r.values)?js(r.defaultValues||r.values)||{}:{},p=r.shouldUnregister?{}:js(d),m={action:!1,mount:!1,watch:!1},g={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},b,S=0;const E={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let A={...E};const k={array:B4(),state:B4()},T=r.criteriaMode===Zo.all,M=ve=>De=>{clearTimeout(S),S=setTimeout(ve,De)},I=async ve=>{if(!r.disabled&&(E.isValid||A.isValid||ve)){const De=r.resolver?Di((await Q()).errors):await de(o,!0);De!==s.isValid&&k.state.next({isValid:De})}},q=(ve,De)=>{!r.disabled&&(E.isValidating||E.validatingFields||A.isValidating||A.validatingFields)&&((ve||Array.from(g.mount)).forEach(Ge=>{Ge&&(De?dr(s.validatingFields,Ge,De):fs(s.validatingFields,Ge))}),k.state.next({validatingFields:s.validatingFields,isValidating:!Di(s.validatingFields)}))},G=(ve,De=[],Ge,D,L=!0,H=!0)=>{if(D&&Ge&&!r.disabled){if(m.action=!0,H&&Array.isArray(Et(o,ve))){const W=Ge(Et(o,ve),D.argA,D.argB);L&&dr(o,ve,W)}if(H&&Array.isArray(Et(s.errors,ve))){const W=Ge(Et(s.errors,ve),D.argA,D.argB);L&&dr(s.errors,ve,W),Ghe(s.errors,ve)}if((E.touchedFields||A.touchedFields)&&H&&Array.isArray(Et(s.touchedFields,ve))){const W=Ge(Et(s.touchedFields,ve),D.argA,D.argB);L&&dr(s.touchedFields,ve,W)}(E.dirtyFields||A.dirtyFields)&&(s.dirtyFields=Jm(d,p)),k.state.next({name:ve,isDirty:xe(ve,De),dirtyFields:s.dirtyFields,errors:s.errors,isValid:s.isValid})}else dr(p,ve,De)},K=(ve,De)=>{dr(s.errors,ve,De),k.state.next({errors:s.errors})},X=ve=>{s.errors=ve,k.state.next({errors:s.errors,isValid:!1})},z=(ve,De,Ge,D)=>{const L=Et(o,ve);if(L){const H=Et(p,ve,Hr(Ge)?Et(d,ve):Ge);Hr(H)||D&&D.defaultChecked||De?dr(p,ve,De?H:H4(L._f)):je(ve,H),m.mount&&I()}},ee=(ve,De,Ge,D,L)=>{let H=!1,W=!1;const we={name:ve};if(!r.disabled){if(!Ge||D){(E.isDirty||A.isDirty)&&(W=s.isDirty,s.isDirty=we.isDirty=xe(),H=W!==we.isDirty);const Re=Wo(Et(d,ve),De);W=!!Et(s.dirtyFields,ve),Re?fs(s.dirtyFields,ve):dr(s.dirtyFields,ve,!0),we.dirtyFields=s.dirtyFields,H=H||(E.dirtyFields||A.dirtyFields)&&W!==!Re}if(Ge){const Re=Et(s.touchedFields,ve);Re||(dr(s.touchedFields,ve,Ge),we.touchedFields=s.touchedFields,H=H||(E.touchedFields||A.touchedFields)&&Re!==Ge)}H&&L&&k.state.next(we)}return H?we:{}},oe=(ve,De,Ge,D)=>{const L=Et(s.errors,ve),H=(E.isValid||A.isValid)&&Ta(De)&&s.isValid!==De;if(r.delayError&&Ge?(b=M(()=>K(ve,Ge)),b(r.delayError)):(clearTimeout(S),b=null,Ge?dr(s.errors,ve,Ge):fs(s.errors,ve)),(Ge?!Wo(L,Ge):L)||!Di(D)||H){const W={...D,...H&&Ta(De)?{isValid:De}:{},errors:s.errors,name:ve};s={...s,...W},k.state.next(W)}},Q=async ve=>{q(ve,!0);const De=await r.resolver(p,r.context,qhe(ve||g.mount,o,r.criteriaMode,r.shouldUseNativeValidation));return q(ve),De},ne=async ve=>{const{errors:De}=await Q(ve);if(ve)for(const Ge of ve){const D=Et(De,Ge);D?dr(s.errors,Ge,D):fs(s.errors,Ge)}else s.errors=De;return De},de=async(ve,De,Ge={valid:!0})=>{for(const D in ve){const L=ve[D];if(L){const{_f:H,...W}=L;if(H){const we=g.array.has(H.name),Re=L._f&&Bhe(L._f);Re&&E.validatingFields&&q([H.name],!0);const st=await J4(L,g.disabled,p,T,r.shouldUseNativeValidation&&!De,we);if(Re&&E.validatingFields&&q([H.name]),st[H.name]&&(Ge.valid=!1,De))break;!De&&(Et(st,H.name)?we?Xhe(s.errors,st,H.name):dr(s.errors,H.name,st[H.name]):fs(s.errors,H.name))}!Di(W)&&await de(W,De,Ge)}}return Ge.valid},Ce=()=>{for(const ve of g.unMount){const De=Et(o,ve);De&&(De._f.refs?De._f.refs.every(Ge=>!pT(Ge)):!pT(De._f.ref))&&ze(ve)}g.unMount=new Set},xe=(ve,De)=>!r.disabled&&(ve&&De&&dr(p,ve,De),!Wo(fe(),d)),le=(ve,De,Ge)=>u_(ve,g,{...m.mount?p:Hr(De)?d:$a(ve)?{[ve]:De}:De},Ge,De),be=ve=>K2(Et(m.mount?p:d,ve,r.shouldUnregister?Et(d,ve,[]):[])),je=(ve,De,Ge={})=>{const D=Et(o,ve);let L=De;if(D){const H=D._f;H&&(!H.disabled&&dr(p,ve,QF(De,H)),L=Wj(H.ref)&&ua(De)?"":De,ZF(H.ref)?[...H.ref.options].forEach(W=>W.selected=L.includes(W.value)):H.refs?gw(H.ref)?H.refs.forEach(W=>{(!W.defaultChecked||!W.disabled)&&(Array.isArray(L)?W.checked=!!L.find(we=>we===W.value):W.checked=L===W.value||!!L)}):H.refs.forEach(W=>W.checked=W.value===L):Y2(H.ref)?H.ref.value="":(H.ref.value=L,H.ref.type||k.state.next({name:ve,values:js(p)})))}(Ge.shouldDirty||Ge.shouldTouch)&&ee(ve,L,Ge.shouldTouch,Ge.shouldDirty,!0),Ge.shouldValidate&&_e(ve)},Ke=(ve,De,Ge)=>{for(const D in De){if(!De.hasOwnProperty(D))return;const L=De[D],H=ve+"."+D,W=Et(o,H);(g.array.has(ve)||gs(L)||W&&!W._f)&&!wp(L)?Ke(H,L,Ge):je(H,L,Ge)}},ce=(ve,De,Ge={})=>{const D=Et(o,ve),L=g.array.has(ve),H=js(De);dr(p,ve,H),L?(k.array.next({name:ve,values:js(p)}),(E.isDirty||E.dirtyFields||A.isDirty||A.dirtyFields)&&Ge.shouldDirty&&k.state.next({name:ve,dirtyFields:Jm(d,p),isDirty:xe(ve,H)})):D&&!D._f&&!ua(H)?Ke(ve,H,Ge):je(ve,H,Ge),Y4(ve,g)&&k.state.next({...s,name:ve}),k.state.next({name:m.mount?ve:void 0,values:js(p)})},re=async ve=>{m.mount=!0;const De=ve.target;let Ge=De.name,D=!0;const L=Et(o,Ge),H=Re=>{D=Number.isNaN(Re)||wp(Re)&&isNaN(Re.getTime())||Wo(Re,Et(p,Ge,Re))},W=G4(r.mode),we=G4(r.reValidateMode);if(L){let Re,st;const Kt=De.type?H4(L._f):VF(ve),Qt=ve.type===Zj.BLUR||ve.type===Zj.FOCUS_OUT,Fn=!Uhe(L._f)&&!r.resolver&&!Et(s.errors,Ge)&&!L._f.deps||Hhe(Qt,Et(s.touchedFields,Ge),s.isSubmitted,we,W),dn=Y4(Ge,g,Qt);dr(p,Ge,Kt),Qt?(!De||!De.readOnly)&&(L._f.onBlur&&L._f.onBlur(ve),b&&b(0)):L._f.onChange&&L._f.onChange(ve);const Ht=ee(Ge,Kt,Qt),wi=!Di(Ht)||dn;if(!Qt&&k.state.next({name:Ge,type:ve.type,values:js(p)}),Fn)return(E.isValid||A.isValid)&&(r.mode==="onBlur"?Qt&&I():Qt||I()),wi&&k.state.next({name:Ge,...dn?{}:Ht});if(!Qt&&dn&&k.state.next({...s}),r.resolver){const{errors:Xr}=await Q([Ge]);if(H(Kt),D){const fa=Z4(s.errors,o,Ge),ho=Z4(Xr,o,fa.name||Ge);Re=ho.error,Ge=ho.name,st=Di(Xr)}}else q([Ge],!0),Re=(await J4(L,g.disabled,p,T,r.shouldUseNativeValidation))[Ge],q([Ge]),H(Kt),D&&(Re?st=!1:(E.isValid||A.isValid)&&(st=await de(o,!0)));D&&(L._f.deps&&(!Array.isArray(L._f.deps)||L._f.deps.length>0)&&_e(L._f.deps),oe(Ge,st,Re,Ht))}},ue=(ve,De)=>{if(Et(s.errors,De)&&ve.focus)return ve.focus(),1},_e=async(ve,De={})=>{let Ge,D;const L=Pb(ve);if(r.resolver){const H=await ne(Hr(ve)?ve:L);Ge=Di(H),D=ve?!L.some(W=>Et(H,W)):Ge}else ve?(D=(await Promise.all(L.map(async H=>{const W=Et(o,H);return await de(W&&W._f?{[H]:W}:W)}))).every(Boolean),!(!D&&!s.isValid)&&I()):D=Ge=await de(o);return k.state.next({...!$a(ve)||(E.isValid||A.isValid)&&Ge!==s.isValid?{}:{name:ve},...r.resolver||!ve?{isValid:Ge}:{},errors:s.errors}),De.shouldFocus&&!D&&Mb(o,ue,ve?L:g.mount),D},fe=(ve,De)=>{let Ge={...m.mount?p:d};return De&&(Ge=YF(De.dirtyFields?s.dirtyFields:s.touchedFields,Ge)),Hr(ve)?Ge:$a(ve)?Et(Ge,ve):ve.map(D=>Et(Ge,D))},He=(ve,De)=>({invalid:!!Et((De||s).errors,ve),isDirty:!!Et((De||s).dirtyFields,ve),error:Et((De||s).errors,ve),isValidating:!!Et(s.validatingFields,ve),isTouched:!!Et((De||s).touchedFields,ve)}),Oe=ve=>{ve&&Pb(ve).forEach(De=>fs(s.errors,De)),k.state.next({errors:ve?s.errors:{}})},ke=(ve,De,Ge)=>{const D=(Et(o,ve,{_f:{}})._f||{}).ref,L=Et(s.errors,ve)||{},{ref:H,message:W,type:we,...Re}=L;dr(s.errors,ve,{...Re,...De,ref:D}),k.state.next({name:ve,errors:s.errors,isValid:!1}),Ge&&Ge.shouldFocus&&D&&D.focus&&D.focus()},Ve=(ve,De)=>Jo(ve)?k.state.subscribe({next:Ge=>"values"in Ge&&ve(le(void 0,De),Ge)}):le(ve,De,!0),ie=ve=>k.state.subscribe({next:De=>{Vhe(ve.name,De.name,ve.exact)&&Khe(De,ve.formState||E,V,ve.reRenderRoot)&&ve.callback({values:{...p},...s,...De,defaultValues:d})}}).unsubscribe,Ne=ve=>(m.mount=!0,A={...A,...ve.formState},ie({...ve,formState:A})),ze=(ve,De={})=>{for(const Ge of ve?Pb(ve):g.mount)g.mount.delete(Ge),g.array.delete(Ge),De.keepValue||(fs(o,Ge),fs(p,Ge)),!De.keepError&&fs(s.errors,Ge),!De.keepDirty&&fs(s.dirtyFields,Ge),!De.keepTouched&&fs(s.touchedFields,Ge),!De.keepIsValidating&&fs(s.validatingFields,Ge),!r.shouldUnregister&&!De.keepDefaultValue&&fs(d,Ge);k.state.next({values:js(p)}),k.state.next({...s,...De.keepDirty?{isDirty:xe()}:{}}),!De.keepIsValid&&I()},tt=({disabled:ve,name:De})=>{(Ta(ve)&&m.mount||ve||g.disabled.has(De))&&(ve?g.disabled.add(De):g.disabled.delete(De))},ft=(ve,De={})=>{let Ge=Et(o,ve);const D=Ta(De.disabled)||Ta(r.disabled);return dr(o,ve,{...Ge||{},_f:{...Ge&&Ge._f?Ge._f:{ref:{name:ve}},name:ve,mount:!0,...De}}),g.mount.add(ve),Ge?tt({disabled:Ta(De.disabled)?De.disabled:r.disabled,name:ve}):z(ve,!0,De.value),{...D?{disabled:De.disabled||r.disabled}:{},...r.progressive?{required:!!De.required,min:ob(De.min),max:ob(De.max),minLength:ob(De.minLength),maxLength:ob(De.maxLength),pattern:ob(De.pattern)}:{},name:ve,onChange:re,onBlur:re,ref:L=>{if(L){ft(ve,De),Ge=Et(o,ve);const H=Hr(L.value)&&L.querySelectorAll&&L.querySelectorAll("input,select,textarea")[0]||L,W=Ihe(H),we=Ge._f.refs||[];if(W?we.find(Re=>Re===H):H===Ge._f.ref)return;dr(o,ve,{_f:{...Ge._f,...W?{refs:[...we.filter(pT),H,...Array.isArray(Et(d,ve))?[{}]:[]],ref:{type:H.type,name:ve}}:{ref:H}}}),z(ve,!1,void 0,H)}else Ge=Et(o,ve,{}),Ge._f&&(Ge._f.mount=!1),(r.shouldUnregister||De.shouldUnregister)&&!(HF(g.array,ve)&&m.action)&&g.unMount.add(ve)}}},Ot=()=>r.shouldFocusError&&Mb(o,ue,g.mount),Ft=ve=>{Ta(ve)&&(k.state.next({disabled:ve}),Mb(o,(De,Ge)=>{const D=Et(o,Ge);D&&(De.disabled=D._f.disabled||ve,Array.isArray(D._f.refs)&&D._f.refs.forEach(L=>{L.disabled=D._f.disabled||ve}))},0,!1))},kt=(ve,De)=>async Ge=>{let D;Ge&&(Ge.preventDefault&&Ge.preventDefault(),Ge.persist&&Ge.persist());let L=js(p);if(k.state.next({isSubmitting:!0}),r.resolver){const{errors:H,values:W}=await Q();s.errors=H,L=js(W)}else await de(o);if(g.disabled.size)for(const H of g.disabled)fs(L,H);if(fs(s.errors,"root"),Di(s.errors)){k.state.next({errors:{}});try{await ve(L,Ge)}catch(H){D=H}}else De&&await De({...s.errors},Ge),Ot(),setTimeout(Ot);if(k.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Di(s.errors)&&!D,submitCount:s.submitCount+1,errors:s.errors}),D)throw D},Jt=(ve,De={})=>{Et(o,ve)&&(Hr(De.defaultValue)?ce(ve,js(Et(d,ve))):(ce(ve,De.defaultValue),dr(d,ve,js(De.defaultValue))),De.keepTouched||fs(s.touchedFields,ve),De.keepDirty||(fs(s.dirtyFields,ve),s.isDirty=De.defaultValue?xe(ve,js(Et(d,ve))):xe()),De.keepError||(fs(s.errors,ve),E.isValid&&I()),k.state.next({...s}))},Le=(ve,De={})=>{const Ge=ve?js(ve):d,D=js(Ge),L=Di(ve),H=L?d:D;if(De.keepDefaultValues||(d=Ge),!De.keepValues){if(De.keepDirtyValues){const W=new Set([...g.mount,...Object.keys(Jm(d,p))]);for(const we of Array.from(W))Et(s.dirtyFields,we)?dr(H,we,Et(p,we)):ce(we,Et(H,we))}else{if(U2&&Hr(ve))for(const W of g.mount){const we=Et(o,W);if(we&&we._f){const Re=Array.isArray(we._f.refs)?we._f.refs[0]:we._f.ref;if(Wj(Re)){const st=Re.closest("form");if(st){st.reset();break}}}}if(De.keepFieldsRef)for(const W of g.mount)ce(W,Et(H,W));else o={}}p=r.shouldUnregister?De.keepDefaultValues?js(d):{}:js(H),k.array.next({values:{...H}}),k.state.next({values:{...H}})}g={mount:De.keepDirtyValues?g.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},m.mount=!E.isValid||!!De.keepIsValid||!!De.keepDirtyValues||!r.shouldUnregister&&!Di(H),m.watch=!!r.shouldUnregister,k.state.next({submitCount:De.keepSubmitCount?s.submitCount:0,isDirty:L?!1:De.keepDirty?s.isDirty:!!(De.keepDefaultValues&&!Wo(ve,d)),isSubmitted:De.keepIsSubmitted?s.isSubmitted:!1,dirtyFields:L?{}:De.keepDirtyValues?De.keepDefaultValues&&p?Jm(d,p):s.dirtyFields:De.keepDefaultValues&&ve?Jm(d,ve):De.keepDirty?s.dirtyFields:{},touchedFields:De.keepTouched?s.touchedFields:{},errors:De.keepErrors?s.errors:{},isSubmitSuccessful:De.keepIsSubmitSuccessful?s.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:d})},Lt=(ve,De)=>Le(Jo(ve)?ve(p):ve,De),Rt=(ve,De={})=>{const Ge=Et(o,ve),D=Ge&&Ge._f;if(D){const L=D.refs?D.refs[0]:D.ref;L.focus&&(L.focus(),De.shouldSelect&&Jo(L.select)&&L.select())}},V=ve=>{s={...s,...ve}},cn={control:{register:ft,unregister:ze,getFieldState:He,handleSubmit:kt,setError:ke,_subscribe:ie,_runSchema:Q,_focusError:Ot,_getWatch:le,_getDirty:xe,_setValid:I,_setFieldArray:G,_setDisabledField:tt,_setErrors:X,_getFieldArray:be,_reset:Le,_resetDefaultValues:()=>Jo(r.defaultValues)&&r.defaultValues().then(ve=>{Lt(ve,r.resetOptions),k.state.next({isLoading:!1})}),_removeUnmounted:Ce,_disableForm:Ft,_subjects:k,_proxyFormState:E,get _fields(){return o},get _formValues(){return p},get _state(){return m},set _state(ve){m=ve},get _defaultValues(){return d},get _names(){return g},set _names(ve){g=ve},get _formState(){return s},get _options(){return r},set _options(ve){r={...r,...ve}}},subscribe:Ne,trigger:_e,register:ft,handleSubmit:kt,watch:Ve,setValue:ce,getValues:fe,reset:Lt,resetField:Jt,clearErrors:Oe,unregister:ze,setError:ke,setFocus:Rt,getFieldState:He};return{...cn,formControl:cn}}function mr(e={}){const r=Je.useRef(void 0),s=Je.useRef(void 0),[o,d]=Je.useState({isDirty:!1,isValidating:!1,isLoading:Jo(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:Jo(e.defaultValues)?void 0:e.defaultValues});if(!r.current)if(e.formControl)r.current={...e.formControl,formState:o},e.defaultValues&&!Jo(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:m,...g}=Zhe(e);r.current={...g,formState:o}}const p=r.current.control;return p._options=e,G2(()=>{const m=p._subscribe({formState:p._proxyFormState,callback:()=>d({...p._formState}),reRenderRoot:!0});return d(g=>({...g,isReady:!0})),p._formState.isReady=!0,m},[p]),Je.useEffect(()=>p._disableForm(e.disabled),[p,e.disabled]),Je.useEffect(()=>{e.mode&&(p._options.mode=e.mode),e.reValidateMode&&(p._options.reValidateMode=e.reValidateMode)},[p,e.mode,e.reValidateMode]),Je.useEffect(()=>{e.errors&&(p._setErrors(e.errors),p._focusError())},[p,e.errors]),Je.useEffect(()=>{e.shouldUnregister&&p._subjects.state.next({values:p._getWatch()})},[p,e.shouldUnregister]),Je.useEffect(()=>{if(p._proxyFormState.isDirty){const m=p._getDirty();m!==o.isDirty&&p._subjects.state.next({isDirty:m})}},[p,o.isDirty]),Je.useEffect(()=>{e.values&&!Wo(e.values,s.current)?(p._reset(e.values,{keepFieldsRef:!0,...p._options.resetOptions}),s.current=e.values,d(m=>({...m}))):p._resetDefaultValues()},[p,e.values]),Je.useEffect(()=>{p._state.mount||(p._setValid(),p._state.mount=!0),p._state.watch&&(p._state.watch=!1,p._subjects.state.next({...p._formState})),p._removeUnmounted()}),r.current.formState=GF(o,p),r.current}const Q4=(e,r,s)=>{if(e&&"reportValidity"in e){const o=Et(s,r);e.setCustomValidity(o&&o.message||""),e.reportValidity()}},p_=(e,r)=>{for(const s in r.fields){const o=r.fields[s];o&&o.ref&&"reportValidity"in o.ref?Q4(o.ref,s,e):o&&o.refs&&o.refs.forEach(d=>Q4(d,s,e))}},e3=(e,r)=>{r.shouldUseNativeValidation&&p_(e,r);const s={};for(const o in e){const d=Et(r.fields,o),p=Object.assign(e[o]||{},{ref:d&&d.ref});if(Whe(r.names||Object.keys(e),o)){const m=Object.assign({},Et(s,o));dr(m,"root",p),dr(s,o,m)}else dr(s,o,p)}return s},Whe=(e,r)=>{const s=t3(r);return e.some(o=>t3(o).match(`^${s}\\.\\d+`))};function t3(e){return e.replace(/\]|\[/g,"")}function at(e,r,s){function o(g,b){var S;Object.defineProperty(g,"_zod",{value:g._zod??{},enumerable:!1}),(S=g._zod).traits??(S.traits=new Set),g._zod.traits.add(e),r(g,b);for(const E in m.prototype)E in g||Object.defineProperty(g,E,{value:m.prototype[E].bind(g)});g._zod.constr=m,g._zod.def=b}const d=s?.Parent??Object;class p extends d{}Object.defineProperty(p,"name",{value:e});function m(g){var b;const S=s?.Parent?new p:this;o(S,g),(b=S._zod).deferred??(b.deferred=[]);for(const E of S._zod.deferred)E();return S}return Object.defineProperty(m,"init",{value:o}),Object.defineProperty(m,Symbol.hasInstance,{value:g=>s?.Parent&&g instanceof s.Parent?!0:g?._zod?.traits?.has(e)}),Object.defineProperty(m,"name",{value:e}),m}class gg extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class t6 extends Error{constructor(r){super(`Encountered unidirectional transform during encode: ${r}`),this.name="ZodEncodeError"}}const n6={};function Tp(e){return n6}function Jhe(e){const r=Object.values(e).filter(o=>typeof o=="number");return Object.entries(e).filter(([o,d])=>r.indexOf(+o)===-1).map(([o,d])=>d)}function f_(e,r){return typeof r=="bigint"?r.toString():r}function W2(e){return{get value(){{const r=e();return Object.defineProperty(this,"value",{value:r}),r}}}}function J2(e){return e==null}function Q2(e){const r=e.startsWith("^")?1:0,s=e.endsWith("$")?e.length-1:e.length;return e.slice(r,s)}function Qhe(e,r){const s=(e.toString().split(".")[1]||"").length,o=r.toString();let d=(o.split(".")[1]||"").length;if(d===0&&/\d?e-\d?/.test(o)){const b=o.match(/\d?e-(\d?)/);b?.[1]&&(d=Number.parseInt(b[1]))}const p=s>d?s:d,m=Number.parseInt(e.toFixed(p).replace(".","")),g=Number.parseInt(r.toFixed(p).replace(".",""));return m%g/10**p}const n3=Symbol("evaluating");function Sr(e,r,s){let o;Object.defineProperty(e,r,{get(){if(o!==n3)return o===void 0&&(o=n3,o=s()),o},set(d){Object.defineProperty(e,r,{value:d})},configurable:!0})}function Dp(e,r,s){Object.defineProperty(e,r,{value:s,writable:!0,enumerable:!0,configurable:!0})}function Pp(...e){const r={};for(const s of e){const o=Object.getOwnPropertyDescriptors(s);Object.assign(r,o)}return Object.defineProperties({},r)}function r3(e){return JSON.stringify(e)}const r6="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Qj(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const epe=W2(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Xb(e){if(Qj(e)===!1)return!1;const r=e.constructor;if(r===void 0)return!0;const s=r.prototype;return!(Qj(s)===!1||Object.prototype.hasOwnProperty.call(s,"isPrototypeOf")===!1)}function s6(e){return Xb(e)?{...e}:Array.isArray(e)?[...e]:e}const tpe=new Set(["string","number","symbol"]);function Eg(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Zd(e,r,s){const o=new e._zod.constr(r??e._zod.def);return(!r||s?.parent)&&(o._zod.parent=e),o}function Yt(e){const r=e;if(!r)return{};if(typeof r=="string")return{error:()=>r};if(r?.message!==void 0){if(r?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");r.error=r.message}return delete r.message,typeof r.error=="string"?{...r,error:()=>r.error}:r}function npe(e){return Object.keys(e).filter(r=>e[r]._zod.optin==="optional"&&e[r]._zod.optout==="optional")}const rpe={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]};function spe(e,r){const s=e._zod.def,o=Pp(e._zod.def,{get shape(){const d={};for(const p in r){if(!(p in s.shape))throw new Error(`Unrecognized key: "${p}"`);r[p]&&(d[p]=s.shape[p])}return Dp(this,"shape",d),d},checks:[]});return Zd(e,o)}function ipe(e,r){const s=e._zod.def,o=Pp(e._zod.def,{get shape(){const d={...e._zod.def.shape};for(const p in r){if(!(p in s.shape))throw new Error(`Unrecognized key: "${p}"`);r[p]&&delete d[p]}return Dp(this,"shape",d),d},checks:[]});return Zd(e,o)}function ape(e,r){if(!Xb(r))throw new Error("Invalid input to extend: expected a plain object");const s=e._zod.def.checks;if(s&&s.length>0)throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");const d=Pp(e._zod.def,{get shape(){const p={...e._zod.def.shape,...r};return Dp(this,"shape",p),p},checks:[]});return Zd(e,d)}function ope(e,r){if(!Xb(r))throw new Error("Invalid input to safeExtend: expected a plain object");const s={...e._zod.def,get shape(){const o={...e._zod.def.shape,...r};return Dp(this,"shape",o),o},checks:e._zod.def.checks};return Zd(e,s)}function lpe(e,r){const s=Pp(e._zod.def,{get shape(){const o={...e._zod.def.shape,...r._zod.def.shape};return Dp(this,"shape",o),o},get catchall(){return r._zod.def.catchall},checks:[]});return Zd(e,s)}function cpe(e,r,s){const o=Pp(r._zod.def,{get shape(){const d=r._zod.def.shape,p={...d};if(s)for(const m in s){if(!(m in d))throw new Error(`Unrecognized key: "${m}"`);s[m]&&(p[m]=e?new e({type:"optional",innerType:d[m]}):d[m])}else for(const m in d)p[m]=e?new e({type:"optional",innerType:d[m]}):d[m];return Dp(this,"shape",p),p},checks:[]});return Zd(r,o)}function upe(e,r,s){const o=Pp(r._zod.def,{get shape(){const d=r._zod.def.shape,p={...d};if(s)for(const m in s){if(!(m in p))throw new Error(`Unrecognized key: "${m}"`);s[m]&&(p[m]=new e({type:"nonoptional",innerType:d[m]}))}else for(const m in d)p[m]=new e({type:"nonoptional",innerType:d[m]});return Dp(this,"shape",p),p},checks:[]});return Zd(r,o)}function dg(e,r=0){if(e.aborted===!0)return!0;for(let s=r;s<e.issues.length;s++)if(e.issues[s]?.continue!==!0)return!0;return!1}function i6(e,r){return r.map(s=>{var o;return(o=s).path??(o.path=[]),s.path.unshift(e),s})}function cj(e){return typeof e=="string"?e:e?.message}function _p(e,r,s){const o={...e,path:e.path??[]};if(!e.message){const d=cj(e.inst?._zod.def?.error?.(e))??cj(r?.error?.(e))??cj(s.customError?.(e))??cj(s.localeError?.(e))??"Invalid input";o.message=d}return delete o.inst,delete o.continue,r?.reportInput||delete o.input,o}function e$(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Yb(...e){const[r,s,o]=e;return typeof r=="string"?{message:r,code:"custom",input:s,inst:o}:{...r}}const a6=(e,r)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:r,enumerable:!1}),e.message=JSON.stringify(r,f_,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},t$=at("$ZodError",a6),BC=at("$ZodError",a6,{Parent:Error});function dpe(e,r=s=>s.message){const s={},o=[];for(const d of e.issues)d.path.length>0?(s[d.path[0]]=s[d.path[0]]||[],s[d.path[0]].push(r(d))):o.push(r(d));return{formErrors:o,fieldErrors:s}}function hpe(e,r=s=>s.message){const s={_errors:[]},o=d=>{for(const p of d.issues)if(p.code==="invalid_union"&&p.errors.length)p.errors.map(m=>o({issues:m}));else if(p.code==="invalid_key")o({issues:p.issues});else if(p.code==="invalid_element")o({issues:p.issues});else if(p.path.length===0)s._errors.push(r(p));else{let m=s,g=0;for(;g<p.path.length;){const b=p.path[g];g===p.path.length-1?(m[b]=m[b]||{_errors:[]},m[b]._errors.push(r(p))):m[b]=m[b]||{_errors:[]},m=m[b],g++}}};return o(e),s}const UC=e=>(r,s,o,d)=>{const p=o?Object.assign(o,{async:!1}):{async:!1},m=r._zod.run({value:s,issues:[]},p);if(m instanceof Promise)throw new gg;if(m.issues.length){const g=new(d?.Err??e)(m.issues.map(b=>_p(b,p,Tp())));throw r6(g,d?.callee),g}return m.value},ppe=UC(BC),KC=e=>async(r,s,o,d)=>{const p=o?Object.assign(o,{async:!0}):{async:!0};let m=r._zod.run({value:s,issues:[]},p);if(m instanceof Promise&&(m=await m),m.issues.length){const g=new(d?.Err??e)(m.issues.map(b=>_p(b,p,Tp())));throw r6(g,d?.callee),g}return m.value},fpe=KC(BC),VC=e=>(r,s,o)=>{const d=o?{...o,async:!1}:{async:!1},p=r._zod.run({value:s,issues:[]},d);if(p instanceof Promise)throw new gg;return p.issues.length?{success:!1,error:new(e??t$)(p.issues.map(m=>_p(m,d,Tp())))}:{success:!0,data:p.value}},mpe=VC(BC),HC=e=>async(r,s,o)=>{const d=o?Object.assign(o,{async:!0}):{async:!0};let p=r._zod.run({value:s,issues:[]},d);return p instanceof Promise&&(p=await p),p.issues.length?{success:!1,error:new e(p.issues.map(m=>_p(m,d,Tp())))}:{success:!0,data:p.value}},gpe=HC(BC),ype=e=>(r,s,o)=>{const d=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return UC(e)(r,s,d)},vpe=e=>(r,s,o)=>UC(e)(r,s,o),xpe=e=>async(r,s,o)=>{const d=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return KC(e)(r,s,d)},bpe=e=>async(r,s,o)=>KC(e)(r,s,o),wpe=e=>(r,s,o)=>{const d=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return VC(e)(r,s,d)},Spe=e=>(r,s,o)=>VC(e)(r,s,o),Epe=e=>async(r,s,o)=>{const d=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return HC(e)(r,s,d)},jpe=e=>async(r,s,o)=>HC(e)(r,s,o),Cpe=/^[cC][^\s-]{8,}$/,Ape=/^[0-9a-z]+$/,Ope=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,kpe=/^[0-9a-vA-V]{20}$/,Rpe=/^[A-Za-z0-9]{27}$/,Tpe=/^[a-zA-Z0-9_-]{21}$/,_pe=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,$pe=/^([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})$/,s3=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)$/,Npe=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Dpe="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Ppe(){return new RegExp(Dpe,"u")}const Mpe=/^(?:(?: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])$/,Ipe=/^(([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}|:))$/,zpe=/^((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])$/,Lpe=/^(([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])$/,Fpe=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,o6=/^[A-Za-z0-9_-]*$/,qpe=/^(?=.{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])?)*\.?$/,Bpe=/^\+(?:[0-9]){6,14}[0-9]$/,l6="(?:(?:\\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])))",Upe=new RegExp(`^${l6}$`);function c6(e){const r="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${r}`:e.precision===0?`${r}:[0-5]\\d`:`${r}:[0-5]\\d\\.\\d{${e.precision}}`:`${r}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Kpe(e){return new RegExp(`^${c6(e)}$`)}function Vpe(e){const r=c6({precision:e.precision}),s=["Z"];e.local&&s.push(""),e.offset&&s.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const o=`${r}(?:${s.join("|")})`;return new RegExp(`^${l6}T(?:${o})$`)}const Hpe=e=>{const r=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${r}$`)},Gpe=/^-?\d+$/,Xpe=/^-?\d+(?:\.\d+)?/,Ype=/^[^A-Z]*$/,Zpe=/^[^a-z]*$/,pa=at("$ZodCheck",(e,r)=>{var s;e._zod??(e._zod={}),e._zod.def=r,(s=e._zod).onattach??(s.onattach=[])}),u6={number:"number",bigint:"bigint",object:"date"},d6=at("$ZodCheckLessThan",(e,r)=>{pa.init(e,r);const s=u6[typeof r.value];e._zod.onattach.push(o=>{const d=o._zod.bag,p=(r.inclusive?d.maximum:d.exclusiveMaximum)??Number.POSITIVE_INFINITY;r.value<p&&(r.inclusive?d.maximum=r.value:d.exclusiveMaximum=r.value)}),e._zod.check=o=>{(r.inclusive?o.value<=r.value:o.value<r.value)||o.issues.push({origin:s,code:"too_big",maximum:r.value,input:o.value,inclusive:r.inclusive,inst:e,continue:!r.abort})}}),h6=at("$ZodCheckGreaterThan",(e,r)=>{pa.init(e,r);const s=u6[typeof r.value];e._zod.onattach.push(o=>{const d=o._zod.bag,p=(r.inclusive?d.minimum:d.exclusiveMinimum)??Number.NEGATIVE_INFINITY;r.value>p&&(r.inclusive?d.minimum=r.value:d.exclusiveMinimum=r.value)}),e._zod.check=o=>{(r.inclusive?o.value>=r.value:o.value>r.value)||o.issues.push({origin:s,code:"too_small",minimum:r.value,input:o.value,inclusive:r.inclusive,inst:e,continue:!r.abort})}}),Wpe=at("$ZodCheckMultipleOf",(e,r)=>{pa.init(e,r),e._zod.onattach.push(s=>{var o;(o=s._zod.bag).multipleOf??(o.multipleOf=r.value)}),e._zod.check=s=>{if(typeof s.value!=typeof r.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof s.value=="bigint"?s.value%r.value===BigInt(0):Qhe(s.value,r.value)===0)||s.issues.push({origin:typeof s.value,code:"not_multiple_of",divisor:r.value,input:s.value,inst:e,continue:!r.abort})}}),Jpe=at("$ZodCheckNumberFormat",(e,r)=>{pa.init(e,r),r.format=r.format||"float64";const s=r.format?.includes("int"),o=s?"int":"number",[d,p]=rpe[r.format];e._zod.onattach.push(m=>{const g=m._zod.bag;g.format=r.format,g.minimum=d,g.maximum=p,s&&(g.pattern=Gpe)}),e._zod.check=m=>{const g=m.value;if(s){if(!Number.isInteger(g)){m.issues.push({expected:o,format:r.format,code:"invalid_type",continue:!1,input:g,inst:e});return}if(!Number.isSafeInteger(g)){g>0?m.issues.push({input:g,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,continue:!r.abort}):m.issues.push({input:g,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,continue:!r.abort});return}}g<d&&m.issues.push({origin:"number",input:g,code:"too_small",minimum:d,inclusive:!0,inst:e,continue:!r.abort}),g>p&&m.issues.push({origin:"number",input:g,code:"too_big",maximum:p,inst:e})}}),Qpe=at("$ZodCheckMaxLength",(e,r)=>{var s;pa.init(e,r),(s=e._zod.def).when??(s.when=o=>{const d=o.value;return!J2(d)&&d.length!==void 0}),e._zod.onattach.push(o=>{const d=o._zod.bag.maximum??Number.POSITIVE_INFINITY;r.maximum<d&&(o._zod.bag.maximum=r.maximum)}),e._zod.check=o=>{const d=o.value;if(d.length<=r.maximum)return;const m=e$(d);o.issues.push({origin:m,code:"too_big",maximum:r.maximum,inclusive:!0,input:d,inst:e,continue:!r.abort})}}),efe=at("$ZodCheckMinLength",(e,r)=>{var s;pa.init(e,r),(s=e._zod.def).when??(s.when=o=>{const d=o.value;return!J2(d)&&d.length!==void 0}),e._zod.onattach.push(o=>{const d=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;r.minimum>d&&(o._zod.bag.minimum=r.minimum)}),e._zod.check=o=>{const d=o.value;if(d.length>=r.minimum)return;const m=e$(d);o.issues.push({origin:m,code:"too_small",minimum:r.minimum,inclusive:!0,input:d,inst:e,continue:!r.abort})}}),tfe=at("$ZodCheckLengthEquals",(e,r)=>{var s;pa.init(e,r),(s=e._zod.def).when??(s.when=o=>{const d=o.value;return!J2(d)&&d.length!==void 0}),e._zod.onattach.push(o=>{const d=o._zod.bag;d.minimum=r.length,d.maximum=r.length,d.length=r.length}),e._zod.check=o=>{const d=o.value,p=d.length;if(p===r.length)return;const m=e$(d),g=p>r.length;o.issues.push({origin:m,...g?{code:"too_big",maximum:r.length}:{code:"too_small",minimum:r.length},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!r.abort})}}),GC=at("$ZodCheckStringFormat",(e,r)=>{var s,o;pa.init(e,r),e._zod.onattach.push(d=>{const p=d._zod.bag;p.format=r.format,r.pattern&&(p.patterns??(p.patterns=new Set),p.patterns.add(r.pattern))}),r.pattern?(s=e._zod).check??(s.check=d=>{r.pattern.lastIndex=0,!r.pattern.test(d.value)&&d.issues.push({origin:"string",code:"invalid_format",format:r.format,input:d.value,...r.pattern?{pattern:r.pattern.toString()}:{},inst:e,continue:!r.abort})}):(o=e._zod).check??(o.check=()=>{})}),nfe=at("$ZodCheckRegex",(e,r)=>{GC.init(e,r),e._zod.check=s=>{r.pattern.lastIndex=0,!r.pattern.test(s.value)&&s.issues.push({origin:"string",code:"invalid_format",format:"regex",input:s.value,pattern:r.pattern.toString(),inst:e,continue:!r.abort})}}),rfe=at("$ZodCheckLowerCase",(e,r)=>{r.pattern??(r.pattern=Ype),GC.init(e,r)}),sfe=at("$ZodCheckUpperCase",(e,r)=>{r.pattern??(r.pattern=Zpe),GC.init(e,r)}),ife=at("$ZodCheckIncludes",(e,r)=>{pa.init(e,r);const s=Eg(r.includes),o=new RegExp(typeof r.position=="number"?`^.{${r.position}}${s}`:s);r.pattern=o,e._zod.onattach.push(d=>{const p=d._zod.bag;p.patterns??(p.patterns=new Set),p.patterns.add(o)}),e._zod.check=d=>{d.value.includes(r.includes,r.position)||d.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:r.includes,input:d.value,inst:e,continue:!r.abort})}}),afe=at("$ZodCheckStartsWith",(e,r)=>{pa.init(e,r);const s=new RegExp(`^${Eg(r.prefix)}.*`);r.pattern??(r.pattern=s),e._zod.onattach.push(o=>{const d=o._zod.bag;d.patterns??(d.patterns=new Set),d.patterns.add(s)}),e._zod.check=o=>{o.value.startsWith(r.prefix)||o.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:r.prefix,input:o.value,inst:e,continue:!r.abort})}}),ofe=at("$ZodCheckEndsWith",(e,r)=>{pa.init(e,r);const s=new RegExp(`.*${Eg(r.suffix)}$`);r.pattern??(r.pattern=s),e._zod.onattach.push(o=>{const d=o._zod.bag;d.patterns??(d.patterns=new Set),d.patterns.add(s)}),e._zod.check=o=>{o.value.endsWith(r.suffix)||o.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:r.suffix,input:o.value,inst:e,continue:!r.abort})}}),lfe=at("$ZodCheckOverwrite",(e,r)=>{pa.init(e,r),e._zod.check=s=>{s.value=r.tx(s.value)}});class cfe{constructor(r=[]){this.content=[],this.indent=0,this&&(this.args=r)}indented(r){this.indent+=1,r(this),this.indent-=1}write(r){if(typeof r=="function"){r(this,{execution:"sync"}),r(this,{execution:"async"});return}const o=r.split(`
|
||
`).filter(m=>m),d=Math.min(...o.map(m=>m.length-m.trimStart().length)),p=o.map(m=>m.slice(d)).map(m=>" ".repeat(this.indent*2)+m);for(const m of p)this.content.push(m)}compile(){const r=Function,s=this?.args,d=[...(this?.content??[""]).map(p=>` ${p}`)];return new r(...s,d.join(`
|
||
`))}}const ufe={major:4,minor:1,patch:12},Gr=at("$ZodType",(e,r)=>{var s;e??(e={}),e._zod.def=r,e._zod.bag=e._zod.bag||{},e._zod.version=ufe;const o=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&o.unshift(e);for(const d of o)for(const p of d._zod.onattach)p(e);if(o.length===0)(s=e._zod).deferred??(s.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const d=(m,g,b)=>{let S=dg(m),E;for(const A of g){if(A._zod.def.when){if(!A._zod.def.when(m))continue}else if(S)continue;const k=m.issues.length,T=A._zod.check(m);if(T instanceof Promise&&b?.async===!1)throw new gg;if(E||T instanceof Promise)E=(E??Promise.resolve()).then(async()=>{await T,m.issues.length!==k&&(S||(S=dg(m,k)))});else{if(m.issues.length===k)continue;S||(S=dg(m,k))}}return E?E.then(()=>m):m},p=(m,g,b)=>{if(dg(m))return m.aborted=!0,m;const S=d(g,o,b);if(S instanceof Promise){if(b.async===!1)throw new gg;return S.then(E=>e._zod.parse(E,b))}return e._zod.parse(S,b)};e._zod.run=(m,g)=>{if(g.skipChecks)return e._zod.parse(m,g);if(g.direction==="backward"){const S=e._zod.parse({value:m.value,issues:[]},{...g,skipChecks:!0});return S instanceof Promise?S.then(E=>p(E,m,g)):p(S,m,g)}const b=e._zod.parse(m,g);if(b instanceof Promise){if(g.async===!1)throw new gg;return b.then(S=>d(S,o,g))}return d(b,o,g)}}e["~standard"]={validate:d=>{try{const p=mpe(e,d);return p.success?{value:p.data}:{issues:p.error?.issues}}catch{return gpe(e,d).then(m=>m.success?{value:m.data}:{issues:m.error?.issues})}},vendor:"zod",version:1}}),n$=at("$ZodString",(e,r)=>{Gr.init(e,r),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Hpe(e._zod.bag),e._zod.parse=(s,o)=>{if(r.coerce)try{s.value=String(s.value)}catch{}return typeof s.value=="string"||s.issues.push({expected:"string",code:"invalid_type",input:s.value,inst:e}),s}}),$r=at("$ZodStringFormat",(e,r)=>{GC.init(e,r),n$.init(e,r)}),dfe=at("$ZodGUID",(e,r)=>{r.pattern??(r.pattern=$pe),$r.init(e,r)}),hfe=at("$ZodUUID",(e,r)=>{if(r.version){const o={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[r.version];if(o===void 0)throw new Error(`Invalid UUID version: "${r.version}"`);r.pattern??(r.pattern=s3(o))}else r.pattern??(r.pattern=s3());$r.init(e,r)}),pfe=at("$ZodEmail",(e,r)=>{r.pattern??(r.pattern=Npe),$r.init(e,r)}),ffe=at("$ZodURL",(e,r)=>{$r.init(e,r),e._zod.check=s=>{try{const o=s.value.trim(),d=new URL(o);r.hostname&&(r.hostname.lastIndex=0,r.hostname.test(d.hostname)||s.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:qpe.source,input:s.value,inst:e,continue:!r.abort})),r.protocol&&(r.protocol.lastIndex=0,r.protocol.test(d.protocol.endsWith(":")?d.protocol.slice(0,-1):d.protocol)||s.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:r.protocol.source,input:s.value,inst:e,continue:!r.abort})),r.normalize?s.value=d.href:s.value=o;return}catch{s.issues.push({code:"invalid_format",format:"url",input:s.value,inst:e,continue:!r.abort})}}}),mfe=at("$ZodEmoji",(e,r)=>{r.pattern??(r.pattern=Ppe()),$r.init(e,r)}),gfe=at("$ZodNanoID",(e,r)=>{r.pattern??(r.pattern=Tpe),$r.init(e,r)}),yfe=at("$ZodCUID",(e,r)=>{r.pattern??(r.pattern=Cpe),$r.init(e,r)}),vfe=at("$ZodCUID2",(e,r)=>{r.pattern??(r.pattern=Ape),$r.init(e,r)}),xfe=at("$ZodULID",(e,r)=>{r.pattern??(r.pattern=Ope),$r.init(e,r)}),bfe=at("$ZodXID",(e,r)=>{r.pattern??(r.pattern=kpe),$r.init(e,r)}),wfe=at("$ZodKSUID",(e,r)=>{r.pattern??(r.pattern=Rpe),$r.init(e,r)}),Sfe=at("$ZodISODateTime",(e,r)=>{r.pattern??(r.pattern=Vpe(r)),$r.init(e,r)}),Efe=at("$ZodISODate",(e,r)=>{r.pattern??(r.pattern=Upe),$r.init(e,r)}),jfe=at("$ZodISOTime",(e,r)=>{r.pattern??(r.pattern=Kpe(r)),$r.init(e,r)}),Cfe=at("$ZodISODuration",(e,r)=>{r.pattern??(r.pattern=_pe),$r.init(e,r)}),Afe=at("$ZodIPv4",(e,r)=>{r.pattern??(r.pattern=Mpe),$r.init(e,r),e._zod.onattach.push(s=>{const o=s._zod.bag;o.format="ipv4"})}),Ofe=at("$ZodIPv6",(e,r)=>{r.pattern??(r.pattern=Ipe),$r.init(e,r),e._zod.onattach.push(s=>{const o=s._zod.bag;o.format="ipv6"}),e._zod.check=s=>{try{new URL(`http://[${s.value}]`)}catch{s.issues.push({code:"invalid_format",format:"ipv6",input:s.value,inst:e,continue:!r.abort})}}}),kfe=at("$ZodCIDRv4",(e,r)=>{r.pattern??(r.pattern=zpe),$r.init(e,r)}),Rfe=at("$ZodCIDRv6",(e,r)=>{r.pattern??(r.pattern=Lpe),$r.init(e,r),e._zod.check=s=>{const o=s.value.split("/");try{if(o.length!==2)throw new Error;const[d,p]=o;if(!p)throw new Error;const m=Number(p);if(`${m}`!==p)throw new Error;if(m<0||m>128)throw new Error;new URL(`http://[${d}]`)}catch{s.issues.push({code:"invalid_format",format:"cidrv6",input:s.value,inst:e,continue:!r.abort})}}});function p6(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const Tfe=at("$ZodBase64",(e,r)=>{r.pattern??(r.pattern=Fpe),$r.init(e,r),e._zod.onattach.push(s=>{s._zod.bag.contentEncoding="base64"}),e._zod.check=s=>{p6(s.value)||s.issues.push({code:"invalid_format",format:"base64",input:s.value,inst:e,continue:!r.abort})}});function _fe(e){if(!o6.test(e))return!1;const r=e.replace(/[-_]/g,o=>o==="-"?"+":"/"),s=r.padEnd(Math.ceil(r.length/4)*4,"=");return p6(s)}const $fe=at("$ZodBase64URL",(e,r)=>{r.pattern??(r.pattern=o6),$r.init(e,r),e._zod.onattach.push(s=>{s._zod.bag.contentEncoding="base64url"}),e._zod.check=s=>{_fe(s.value)||s.issues.push({code:"invalid_format",format:"base64url",input:s.value,inst:e,continue:!r.abort})}}),Nfe=at("$ZodE164",(e,r)=>{r.pattern??(r.pattern=Bpe),$r.init(e,r)});function Dfe(e,r=null){try{const s=e.split(".");if(s.length!==3)return!1;const[o]=s;if(!o)return!1;const d=JSON.parse(atob(o));return!("typ"in d&&d?.typ!=="JWT"||!d.alg||r&&(!("alg"in d)||d.alg!==r))}catch{return!1}}const Pfe=at("$ZodJWT",(e,r)=>{$r.init(e,r),e._zod.check=s=>{Dfe(s.value,r.alg)||s.issues.push({code:"invalid_format",format:"jwt",input:s.value,inst:e,continue:!r.abort})}}),f6=at("$ZodNumber",(e,r)=>{Gr.init(e,r),e._zod.pattern=e._zod.bag.pattern??Xpe,e._zod.parse=(s,o)=>{if(r.coerce)try{s.value=Number(s.value)}catch{}const d=s.value;if(typeof d=="number"&&!Number.isNaN(d)&&Number.isFinite(d))return s;const p=typeof d=="number"?Number.isNaN(d)?"NaN":Number.isFinite(d)?void 0:"Infinity":void 0;return s.issues.push({expected:"number",code:"invalid_type",input:d,inst:e,...p?{received:p}:{}}),s}}),Mfe=at("$ZodNumber",(e,r)=>{Jpe.init(e,r),f6.init(e,r)}),Ife=at("$ZodAny",(e,r)=>{Gr.init(e,r),e._zod.parse=s=>s}),zfe=at("$ZodUnknown",(e,r)=>{Gr.init(e,r),e._zod.parse=s=>s}),Lfe=at("$ZodNever",(e,r)=>{Gr.init(e,r),e._zod.parse=(s,o)=>(s.issues.push({expected:"never",code:"invalid_type",input:s.value,inst:e}),s)});function i3(e,r,s){e.issues.length&&r.issues.push(...i6(s,e.issues)),r.value[s]=e.value}const Ffe=at("$ZodArray",(e,r)=>{Gr.init(e,r),e._zod.parse=(s,o)=>{const d=s.value;if(!Array.isArray(d))return s.issues.push({expected:"array",code:"invalid_type",input:d,inst:e}),s;s.value=Array(d.length);const p=[];for(let m=0;m<d.length;m++){const g=d[m],b=r.element._zod.run({value:g,issues:[]},o);b instanceof Promise?p.push(b.then(S=>i3(S,s,m))):i3(b,s,m)}return p.length?Promise.all(p).then(()=>s):s}});function eC(e,r,s,o){e.issues.length&&r.issues.push(...i6(s,e.issues)),e.value===void 0?s in o&&(r.value[s]=void 0):r.value[s]=e.value}function m6(e){const r=Object.keys(e.shape);for(const o of r)if(!e.shape?.[o]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${o}": expected a Zod schema`);const s=npe(e.shape);return{...e,keys:r,keySet:new Set(r),numKeys:r.length,optionalKeys:new Set(s)}}function g6(e,r,s,o,d,p){const m=[],g=d.keySet,b=d.catchall._zod,S=b.def.type;for(const E of Object.keys(r)){if(g.has(E))continue;if(S==="never"){m.push(E);continue}const A=b.run({value:r[E],issues:[]},o);A instanceof Promise?e.push(A.then(k=>eC(k,s,E,r))):eC(A,s,E,r)}return m.length&&s.issues.push({code:"unrecognized_keys",keys:m,input:r,inst:p}),e.length?Promise.all(e).then(()=>s):s}const qfe=at("$ZodObject",(e,r)=>{if(Gr.init(e,r),!Object.getOwnPropertyDescriptor(r,"shape")?.get){const g=r.shape;Object.defineProperty(r,"shape",{get:()=>{const b={...g};return Object.defineProperty(r,"shape",{value:b}),b}})}const o=W2(()=>m6(r));Sr(e._zod,"propValues",()=>{const g=r.shape,b={};for(const S in g){const E=g[S]._zod;if(E.values){b[S]??(b[S]=new Set);for(const A of E.values)b[S].add(A)}}return b});const d=Qj,p=r.catchall;let m;e._zod.parse=(g,b)=>{m??(m=o.value);const S=g.value;if(!d(S))return g.issues.push({expected:"object",code:"invalid_type",input:S,inst:e}),g;g.value={};const E=[],A=m.shape;for(const k of m.keys){const M=A[k]._zod.run({value:S[k],issues:[]},b);M instanceof Promise?E.push(M.then(I=>eC(I,g,k,S))):eC(M,g,k,S)}return p?g6(E,S,g,b,o.value,e):E.length?Promise.all(E).then(()=>g):g}}),Bfe=at("$ZodObjectJIT",(e,r)=>{qfe.init(e,r);const s=e._zod.parse,o=W2(()=>m6(r)),d=k=>{const T=new cfe(["shape","payload","ctx"]),M=o.value,I=X=>{const z=r3(X);return`shape[${z}]._zod.run({ value: input[${z}], issues: [] }, ctx)`};T.write("const input = payload.value;");const q=Object.create(null);let G=0;for(const X of M.keys)q[X]=`key_${G++}`;T.write("const newResult = {};");for(const X of M.keys){const z=q[X],ee=r3(X);T.write(`const ${z} = ${I(X)};`),T.write(`
|
||
if (${z}.issues.length) {
|
||
payload.issues = payload.issues.concat(${z}.issues.map(iss => ({
|
||
...iss,
|
||
path: iss.path ? [${ee}, ...iss.path] : [${ee}]
|
||
})));
|
||
}
|
||
|
||
|
||
if (${z}.value === undefined) {
|
||
if (${ee} in input) {
|
||
newResult[${ee}] = undefined;
|
||
}
|
||
} else {
|
||
newResult[${ee}] = ${z}.value;
|
||
}
|
||
|
||
`)}T.write("payload.value = newResult;"),T.write("return payload;");const K=T.compile();return(X,z)=>K(k,X,z)};let p;const m=Qj,g=!n6.jitless,S=g&&epe.value,E=r.catchall;let A;e._zod.parse=(k,T)=>{A??(A=o.value);const M=k.value;return m(M)?g&&S&&T?.async===!1&&T.jitless!==!0?(p||(p=d(r.shape)),k=p(k,T),E?g6([],M,k,T,A,e):k):s(k,T):(k.issues.push({expected:"object",code:"invalid_type",input:M,inst:e}),k)}});function a3(e,r,s,o){for(const p of e)if(p.issues.length===0)return r.value=p.value,r;const d=e.filter(p=>!dg(p));return d.length===1?(r.value=d[0].value,d[0]):(r.issues.push({code:"invalid_union",input:r.value,inst:s,errors:e.map(p=>p.issues.map(m=>_p(m,o,Tp())))}),r)}const Ufe=at("$ZodUnion",(e,r)=>{Gr.init(e,r),Sr(e._zod,"optin",()=>r.options.some(d=>d._zod.optin==="optional")?"optional":void 0),Sr(e._zod,"optout",()=>r.options.some(d=>d._zod.optout==="optional")?"optional":void 0),Sr(e._zod,"values",()=>{if(r.options.every(d=>d._zod.values))return new Set(r.options.flatMap(d=>Array.from(d._zod.values)))}),Sr(e._zod,"pattern",()=>{if(r.options.every(d=>d._zod.pattern)){const d=r.options.map(p=>p._zod.pattern);return new RegExp(`^(${d.map(p=>Q2(p.source)).join("|")})$`)}});const s=r.options.length===1,o=r.options[0]._zod.run;e._zod.parse=(d,p)=>{if(s)return o(d,p);let m=!1;const g=[];for(const b of r.options){const S=b._zod.run({value:d.value,issues:[]},p);if(S instanceof Promise)g.push(S),m=!0;else{if(S.issues.length===0)return S;g.push(S)}}return m?Promise.all(g).then(b=>a3(b,d,e,p)):a3(g,d,e,p)}}),Kfe=at("$ZodIntersection",(e,r)=>{Gr.init(e,r),e._zod.parse=(s,o)=>{const d=s.value,p=r.left._zod.run({value:d,issues:[]},o),m=r.right._zod.run({value:d,issues:[]},o);return p instanceof Promise||m instanceof Promise?Promise.all([p,m]).then(([b,S])=>o3(s,b,S)):o3(s,p,m)}});function m_(e,r){if(e===r)return{valid:!0,data:e};if(e instanceof Date&&r instanceof Date&&+e==+r)return{valid:!0,data:e};if(Xb(e)&&Xb(r)){const s=Object.keys(r),o=Object.keys(e).filter(p=>s.indexOf(p)!==-1),d={...e,...r};for(const p of o){const m=m_(e[p],r[p]);if(!m.valid)return{valid:!1,mergeErrorPath:[p,...m.mergeErrorPath]};d[p]=m.data}return{valid:!0,data:d}}if(Array.isArray(e)&&Array.isArray(r)){if(e.length!==r.length)return{valid:!1,mergeErrorPath:[]};const s=[];for(let o=0;o<e.length;o++){const d=e[o],p=r[o],m=m_(d,p);if(!m.valid)return{valid:!1,mergeErrorPath:[o,...m.mergeErrorPath]};s.push(m.data)}return{valid:!0,data:s}}return{valid:!1,mergeErrorPath:[]}}function o3(e,r,s){if(r.issues.length&&e.issues.push(...r.issues),s.issues.length&&e.issues.push(...s.issues),dg(e))return e;const o=m_(r.value,s.value);if(!o.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}const Vfe=at("$ZodEnum",(e,r)=>{Gr.init(e,r);const s=Jhe(r.entries),o=new Set(s);e._zod.values=o,e._zod.pattern=new RegExp(`^(${s.filter(d=>tpe.has(typeof d)).map(d=>typeof d=="string"?Eg(d):d.toString()).join("|")})$`),e._zod.parse=(d,p)=>{const m=d.value;return o.has(m)||d.issues.push({code:"invalid_value",values:s,input:m,inst:e}),d}}),Hfe=at("$ZodLiteral",(e,r)=>{if(Gr.init(e,r),r.values.length===0)throw new Error("Cannot create literal schema with no valid values");e._zod.values=new Set(r.values),e._zod.pattern=new RegExp(`^(${r.values.map(s=>typeof s=="string"?Eg(s):s?Eg(s.toString()):String(s)).join("|")})$`),e._zod.parse=(s,o)=>{const d=s.value;return e._zod.values.has(d)||s.issues.push({code:"invalid_value",values:r.values,input:d,inst:e}),s}}),Gfe=at("$ZodTransform",(e,r)=>{Gr.init(e,r),e._zod.parse=(s,o)=>{if(o.direction==="backward")throw new t6(e.constructor.name);const d=r.transform(s.value,s);if(o.async)return(d instanceof Promise?d:Promise.resolve(d)).then(m=>(s.value=m,s));if(d instanceof Promise)throw new gg;return s.value=d,s}});function l3(e,r){return e.issues.length&&r===void 0?{issues:[],value:void 0}:e}const Xfe=at("$ZodOptional",(e,r)=>{Gr.init(e,r),e._zod.optin="optional",e._zod.optout="optional",Sr(e._zod,"values",()=>r.innerType._zod.values?new Set([...r.innerType._zod.values,void 0]):void 0),Sr(e._zod,"pattern",()=>{const s=r.innerType._zod.pattern;return s?new RegExp(`^(${Q2(s.source)})?$`):void 0}),e._zod.parse=(s,o)=>{if(r.innerType._zod.optin==="optional"){const d=r.innerType._zod.run(s,o);return d instanceof Promise?d.then(p=>l3(p,s.value)):l3(d,s.value)}return s.value===void 0?s:r.innerType._zod.run(s,o)}}),Yfe=at("$ZodNullable",(e,r)=>{Gr.init(e,r),Sr(e._zod,"optin",()=>r.innerType._zod.optin),Sr(e._zod,"optout",()=>r.innerType._zod.optout),Sr(e._zod,"pattern",()=>{const s=r.innerType._zod.pattern;return s?new RegExp(`^(${Q2(s.source)}|null)$`):void 0}),Sr(e._zod,"values",()=>r.innerType._zod.values?new Set([...r.innerType._zod.values,null]):void 0),e._zod.parse=(s,o)=>s.value===null?s:r.innerType._zod.run(s,o)}),Zfe=at("$ZodDefault",(e,r)=>{Gr.init(e,r),e._zod.optin="optional",Sr(e._zod,"values",()=>r.innerType._zod.values),e._zod.parse=(s,o)=>{if(o.direction==="backward")return r.innerType._zod.run(s,o);if(s.value===void 0)return s.value=r.defaultValue,s;const d=r.innerType._zod.run(s,o);return d instanceof Promise?d.then(p=>c3(p,r)):c3(d,r)}});function c3(e,r){return e.value===void 0&&(e.value=r.defaultValue),e}const Wfe=at("$ZodPrefault",(e,r)=>{Gr.init(e,r),e._zod.optin="optional",Sr(e._zod,"values",()=>r.innerType._zod.values),e._zod.parse=(s,o)=>(o.direction==="backward"||s.value===void 0&&(s.value=r.defaultValue),r.innerType._zod.run(s,o))}),Jfe=at("$ZodNonOptional",(e,r)=>{Gr.init(e,r),Sr(e._zod,"values",()=>{const s=r.innerType._zod.values;return s?new Set([...s].filter(o=>o!==void 0)):void 0}),e._zod.parse=(s,o)=>{const d=r.innerType._zod.run(s,o);return d instanceof Promise?d.then(p=>u3(p,e)):u3(d,e)}});function u3(e,r){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:r}),e}const Qfe=at("$ZodCatch",(e,r)=>{Gr.init(e,r),Sr(e._zod,"optin",()=>r.innerType._zod.optin),Sr(e._zod,"optout",()=>r.innerType._zod.optout),Sr(e._zod,"values",()=>r.innerType._zod.values),e._zod.parse=(s,o)=>{if(o.direction==="backward")return r.innerType._zod.run(s,o);const d=r.innerType._zod.run(s,o);return d instanceof Promise?d.then(p=>(s.value=p.value,p.issues.length&&(s.value=r.catchValue({...s,error:{issues:p.issues.map(m=>_p(m,o,Tp()))},input:s.value}),s.issues=[]),s)):(s.value=d.value,d.issues.length&&(s.value=r.catchValue({...s,error:{issues:d.issues.map(p=>_p(p,o,Tp()))},input:s.value}),s.issues=[]),s)}}),eme=at("$ZodPipe",(e,r)=>{Gr.init(e,r),Sr(e._zod,"values",()=>r.in._zod.values),Sr(e._zod,"optin",()=>r.in._zod.optin),Sr(e._zod,"optout",()=>r.out._zod.optout),Sr(e._zod,"propValues",()=>r.in._zod.propValues),e._zod.parse=(s,o)=>{if(o.direction==="backward"){const p=r.out._zod.run(s,o);return p instanceof Promise?p.then(m=>uj(m,r.in,o)):uj(p,r.in,o)}const d=r.in._zod.run(s,o);return d instanceof Promise?d.then(p=>uj(p,r.out,o)):uj(d,r.out,o)}});function uj(e,r,s){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:e.value,issues:e.issues},s)}const tme=at("$ZodReadonly",(e,r)=>{Gr.init(e,r),Sr(e._zod,"propValues",()=>r.innerType._zod.propValues),Sr(e._zod,"values",()=>r.innerType._zod.values),Sr(e._zod,"optin",()=>r.innerType._zod.optin),Sr(e._zod,"optout",()=>r.innerType._zod.optout),e._zod.parse=(s,o)=>{if(o.direction==="backward")return r.innerType._zod.run(s,o);const d=r.innerType._zod.run(s,o);return d instanceof Promise?d.then(d3):d3(d)}});function d3(e){return e.value=Object.freeze(e.value),e}const nme=at("$ZodCustom",(e,r)=>{pa.init(e,r),Gr.init(e,r),e._zod.parse=(s,o)=>s,e._zod.check=s=>{const o=s.value,d=r.fn(o);if(d instanceof Promise)return d.then(p=>h3(p,s,o,e));h3(d,s,o,e)}});function h3(e,r,s,o){if(!e){const d={code:"custom",input:s,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};o._zod.def.params&&(d.params=o._zod.def.params),r.issues.push(Yb(d))}}class rme{constructor(){this._map=new WeakMap,this._idmap=new Map}add(r,...s){const o=s[0];if(this._map.set(r,o),o&&typeof o=="object"&&"id"in o){if(this._idmap.has(o.id))throw new Error(`ID ${o.id} already exists in the registry`);this._idmap.set(o.id,r)}return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(r){const s=this._map.get(r);return s&&typeof s=="object"&&"id"in s&&this._idmap.delete(s.id),this._map.delete(r),this}get(r){const s=r._zod.parent;if(s){const o={...this.get(s)??{}};delete o.id;const d={...o,...this._map.get(r)};return Object.keys(d).length?d:void 0}return this._map.get(r)}has(r){return this._map.has(r)}}function sme(){return new rme}const dj=sme();function ime(e,r){return new e({type:"string",...Yt(r)})}function ame(e,r){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Yt(r)})}function p3(e,r){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Yt(r)})}function y6(e,r){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Yt(r)})}function ome(e,r){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Yt(r)})}function lme(e,r){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Yt(r)})}function cme(e,r){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Yt(r)})}function ume(e,r){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Yt(r)})}function dme(e,r){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Yt(r)})}function hme(e,r){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Yt(r)})}function pme(e,r){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Yt(r)})}function fme(e,r){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Yt(r)})}function mme(e,r){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Yt(r)})}function gme(e,r){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Yt(r)})}function yme(e,r){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Yt(r)})}function vme(e,r){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Yt(r)})}function xme(e,r){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Yt(r)})}function bme(e,r){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Yt(r)})}function wme(e,r){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Yt(r)})}function Sme(e,r){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Yt(r)})}function Eme(e,r){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Yt(r)})}function jme(e,r){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Yt(r)})}function Cme(e,r){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Yt(r)})}function Ame(e,r){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Yt(r)})}function Ome(e,r){return new e({type:"string",format:"date",check:"string_format",...Yt(r)})}function kme(e,r){return new e({type:"string",format:"time",check:"string_format",precision:null,...Yt(r)})}function Rme(e,r){return new e({type:"string",format:"duration",check:"string_format",...Yt(r)})}function Tme(e,r){return new e({type:"number",checks:[],...Yt(r)})}function _me(e,r){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...Yt(r)})}function $me(e){return new e({type:"any"})}function Nme(e){return new e({type:"unknown"})}function Dme(e,r){return new e({type:"never",...Yt(r)})}function f3(e,r){return new d6({check:"less_than",...Yt(r),value:e,inclusive:!1})}function fT(e,r){return new d6({check:"less_than",...Yt(r),value:e,inclusive:!0})}function m3(e,r){return new h6({check:"greater_than",...Yt(r),value:e,inclusive:!1})}function mT(e,r){return new h6({check:"greater_than",...Yt(r),value:e,inclusive:!0})}function g3(e,r){return new Wpe({check:"multiple_of",...Yt(r),value:e})}function v6(e,r){return new Qpe({check:"max_length",...Yt(r),maximum:e})}function tC(e,r){return new efe({check:"min_length",...Yt(r),minimum:e})}function x6(e,r){return new tfe({check:"length_equals",...Yt(r),length:e})}function Pme(e,r){return new nfe({check:"string_format",format:"regex",...Yt(r),pattern:e})}function Mme(e){return new rfe({check:"string_format",format:"lowercase",...Yt(e)})}function Ime(e){return new sfe({check:"string_format",format:"uppercase",...Yt(e)})}function zme(e,r){return new ife({check:"string_format",format:"includes",...Yt(r),includes:e})}function Lme(e,r){return new afe({check:"string_format",format:"starts_with",...Yt(r),prefix:e})}function Fme(e,r){return new ofe({check:"string_format",format:"ends_with",...Yt(r),suffix:e})}function yw(e){return new lfe({check:"overwrite",tx:e})}function qme(e){return yw(r=>r.normalize(e))}function Bme(){return yw(e=>e.trim())}function Ume(){return yw(e=>e.toLowerCase())}function Kme(){return yw(e=>e.toUpperCase())}function Vme(e,r,s){return new e({type:"array",element:r,...Yt(s)})}function Hme(e,r,s){return new e({type:"custom",check:"custom",fn:r,...Yt(s)})}function Gme(e){const r=Xme(s=>(s.addIssue=o=>{if(typeof o=="string")s.issues.push(Yb(o,s.value,r._zod.def));else{const d=o;d.fatal&&(d.continue=!1),d.code??(d.code="custom"),d.input??(d.input=s.value),d.inst??(d.inst=r),d.continue??(d.continue=!r._zod.def.abort),s.issues.push(Yb(d))}},e(s.value,s)));return r}function Xme(e,r){const s=new pa({check:"custom",...Yt(r)});return s._zod.check=e,s}function y3(e,r){try{var s=e()}catch(o){return r(o)}return s&&s.then?s.then(void 0,r):s}function Yme(e,r){for(var s={};e.length;){var o=e[0],d=o.code,p=o.message,m=o.path.join(".");if(!s[m])if("unionErrors"in o){var g=o.unionErrors[0].errors[0];s[m]={message:g.message,type:g.code}}else s[m]={message:p,type:d};if("unionErrors"in o&&o.unionErrors.forEach(function(E){return E.errors.forEach(function(A){return e.push(A)})}),r){var b=s[m].types,S=b&&b[o.code];s[m]=X2(m,r,s,d,S?[].concat(S,o.message):o.message)}e.shift()}return s}function Zme(e,r){for(var s={};e.length;){var o=e[0],d=o.code,p=o.message,m=o.path.join(".");if(!s[m])if(o.code==="invalid_union"&&o.errors.length>0){var g=o.errors[0][0];s[m]={message:g.message,type:g.code}}else s[m]={message:p,type:d};if(o.code==="invalid_union"&&o.errors.forEach(function(E){return E.forEach(function(A){return e.push(A)})}),r){var b=s[m].types,S=b&&b[o.code];s[m]=X2(m,r,s,d,S?[].concat(S,o.message):o.message)}e.shift()}return s}function gr(e,r,s){if(s===void 0&&(s={}),(function(o){return"_def"in o&&typeof o._def=="object"&&"typeName"in o._def})(e))return function(o,d,p){try{return Promise.resolve(y3(function(){return Promise.resolve(e[s.mode==="sync"?"parse":"parseAsync"](o,r)).then(function(m){return p.shouldUseNativeValidation&&p_({},p),{errors:{},values:s.raw?Object.assign({},o):m}})},function(m){if((function(g){return Array.isArray(g?.issues)})(m))return{values:{},errors:e3(Yme(m.errors,!p.shouldUseNativeValidation&&p.criteriaMode==="all"),p)};throw m}))}catch(m){return Promise.reject(m)}};if((function(o){return"_zod"in o&&typeof o._zod=="object"})(e))return function(o,d,p){try{return Promise.resolve(y3(function(){return Promise.resolve((s.mode==="sync"?ppe:fpe)(e,o,r)).then(function(m){return p.shouldUseNativeValidation&&p_({},p),{errors:{},values:s.raw?Object.assign({},o):m}})},function(m){if((function(g){return g instanceof t$})(m))return{values:{},errors:e3(Zme(m.issues,!p.shouldUseNativeValidation&&p.criteriaMode==="all"),p)};throw m}))}catch(m){return Promise.reject(m)}};throw new Error("Invalid input: not a Zod schema")}const Wme=at("ZodISODateTime",(e,r)=>{Sfe.init(e,r),Lr.init(e,r)});function Jme(e){return Ame(Wme,e)}const Qme=at("ZodISODate",(e,r)=>{Efe.init(e,r),Lr.init(e,r)});function ege(e){return Ome(Qme,e)}const tge=at("ZodISOTime",(e,r)=>{jfe.init(e,r),Lr.init(e,r)});function nge(e){return kme(tge,e)}const rge=at("ZodISODuration",(e,r)=>{Cfe.init(e,r),Lr.init(e,r)});function sge(e){return Rme(rge,e)}const ige=(e,r)=>{t$.init(e,r),e.name="ZodError",Object.defineProperties(e,{format:{value:s=>hpe(e,s)},flatten:{value:s=>dpe(e,s)},addIssue:{value:s=>{e.issues.push(s),e.message=JSON.stringify(e.issues,f_,2)}},addIssues:{value:s=>{e.issues.push(...s),e.message=JSON.stringify(e.issues,f_,2)}},isEmpty:{get(){return e.issues.length===0}}})},uo=at("ZodError",ige,{Parent:Error}),age=UC(uo),oge=KC(uo),lge=VC(uo),cge=HC(uo),uge=ype(uo),dge=vpe(uo),hge=xpe(uo),pge=bpe(uo),fge=wpe(uo),mge=Spe(uo),gge=Epe(uo),yge=jpe(uo),ss=at("ZodType",(e,r)=>(Gr.init(e,r),e.def=r,e.type=r.type,Object.defineProperty(e,"_def",{value:r}),e.check=(...s)=>e.clone(Pp(r,{checks:[...r.checks??[],...s.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]})),e.clone=(s,o)=>Zd(e,s,o),e.brand=()=>e,e.register=((s,o)=>(s.add(e,o),e)),e.parse=(s,o)=>age(e,s,o,{callee:e.parse}),e.safeParse=(s,o)=>lge(e,s,o),e.parseAsync=async(s,o)=>oge(e,s,o,{callee:e.parseAsync}),e.safeParseAsync=async(s,o)=>cge(e,s,o),e.spa=e.safeParseAsync,e.encode=(s,o)=>uge(e,s,o),e.decode=(s,o)=>dge(e,s,o),e.encodeAsync=async(s,o)=>hge(e,s,o),e.decodeAsync=async(s,o)=>pge(e,s,o),e.safeEncode=(s,o)=>fge(e,s,o),e.safeDecode=(s,o)=>mge(e,s,o),e.safeEncodeAsync=async(s,o)=>gge(e,s,o),e.safeDecodeAsync=async(s,o)=>yge(e,s,o),e.refine=(s,o)=>e.check(lye(s,o)),e.superRefine=s=>e.check(cye(s)),e.overwrite=s=>e.check(yw(s)),e.optional=()=>S3(e),e.nullable=()=>E3(e),e.nullish=()=>S3(E3(e)),e.nonoptional=s=>tye(e,s),e.array=()=>Bge(e),e.or=s=>E6([e,s]),e.and=s=>Hge(e,s),e.transform=s=>j3(e,Yge(s)),e.default=s=>Jge(e,s),e.prefault=s=>eye(e,s),e.catch=s=>rye(e,s),e.pipe=s=>j3(e,s),e.readonly=()=>aye(e),e.describe=s=>{const o=e.clone();return dj.add(o,{description:s}),o},Object.defineProperty(e,"description",{get(){return dj.get(e)?.description},configurable:!0}),e.meta=(...s)=>{if(s.length===0)return dj.get(e);const o=e.clone();return dj.add(o,s[0]),o},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),b6=at("_ZodString",(e,r)=>{n$.init(e,r),ss.init(e,r);const s=e._zod.bag;e.format=s.format??null,e.minLength=s.minimum??null,e.maxLength=s.maximum??null,e.regex=(...o)=>e.check(Pme(...o)),e.includes=(...o)=>e.check(zme(...o)),e.startsWith=(...o)=>e.check(Lme(...o)),e.endsWith=(...o)=>e.check(Fme(...o)),e.min=(...o)=>e.check(tC(...o)),e.max=(...o)=>e.check(v6(...o)),e.length=(...o)=>e.check(x6(...o)),e.nonempty=(...o)=>e.check(tC(1,...o)),e.lowercase=o=>e.check(Mme(o)),e.uppercase=o=>e.check(Ime(o)),e.trim=()=>e.check(Bme()),e.normalize=(...o)=>e.check(qme(...o)),e.toLowerCase=()=>e.check(Ume()),e.toUpperCase=()=>e.check(Kme())}),vge=at("ZodString",(e,r)=>{n$.init(e,r),b6.init(e,r),e.email=s=>e.check(ame(xge,s)),e.url=s=>e.check(ume(bge,s)),e.jwt=s=>e.check(Cme(Pge,s)),e.emoji=s=>e.check(dme(wge,s)),e.guid=s=>e.check(p3(v3,s)),e.uuid=s=>e.check(y6(Eb,s)),e.uuidv4=s=>e.check(ome(Eb,s)),e.uuidv6=s=>e.check(lme(Eb,s)),e.uuidv7=s=>e.check(cme(Eb,s)),e.nanoid=s=>e.check(hme(Sge,s)),e.guid=s=>e.check(p3(v3,s)),e.cuid=s=>e.check(pme(Ege,s)),e.cuid2=s=>e.check(fme(jge,s)),e.ulid=s=>e.check(mme(Cge,s)),e.base64=s=>e.check(Sme($ge,s)),e.base64url=s=>e.check(Eme(Nge,s)),e.xid=s=>e.check(gme(Age,s)),e.ksuid=s=>e.check(yme(Oge,s)),e.ipv4=s=>e.check(vme(kge,s)),e.ipv6=s=>e.check(xme(Rge,s)),e.cidrv4=s=>e.check(bme(Tge,s)),e.cidrv6=s=>e.check(wme(_ge,s)),e.e164=s=>e.check(jme(Dge,s)),e.datetime=s=>e.check(Jme(s)),e.date=s=>e.check(ege(s)),e.time=s=>e.check(nge(s)),e.duration=s=>e.check(sge(s))});function zn(e){return ime(vge,e)}const Lr=at("ZodStringFormat",(e,r)=>{$r.init(e,r),b6.init(e,r)}),xge=at("ZodEmail",(e,r)=>{pfe.init(e,r),Lr.init(e,r)}),v3=at("ZodGUID",(e,r)=>{dfe.init(e,r),Lr.init(e,r)}),Eb=at("ZodUUID",(e,r)=>{hfe.init(e,r),Lr.init(e,r)});function w6(e){return y6(Eb,e)}const bge=at("ZodURL",(e,r)=>{ffe.init(e,r),Lr.init(e,r)}),wge=at("ZodEmoji",(e,r)=>{mfe.init(e,r),Lr.init(e,r)}),Sge=at("ZodNanoID",(e,r)=>{gfe.init(e,r),Lr.init(e,r)}),Ege=at("ZodCUID",(e,r)=>{yfe.init(e,r),Lr.init(e,r)}),jge=at("ZodCUID2",(e,r)=>{vfe.init(e,r),Lr.init(e,r)}),Cge=at("ZodULID",(e,r)=>{xfe.init(e,r),Lr.init(e,r)}),Age=at("ZodXID",(e,r)=>{bfe.init(e,r),Lr.init(e,r)}),Oge=at("ZodKSUID",(e,r)=>{wfe.init(e,r),Lr.init(e,r)}),kge=at("ZodIPv4",(e,r)=>{Afe.init(e,r),Lr.init(e,r)}),Rge=at("ZodIPv6",(e,r)=>{Ofe.init(e,r),Lr.init(e,r)}),Tge=at("ZodCIDRv4",(e,r)=>{kfe.init(e,r),Lr.init(e,r)}),_ge=at("ZodCIDRv6",(e,r)=>{Rfe.init(e,r),Lr.init(e,r)}),$ge=at("ZodBase64",(e,r)=>{Tfe.init(e,r),Lr.init(e,r)}),Nge=at("ZodBase64URL",(e,r)=>{$fe.init(e,r),Lr.init(e,r)}),Dge=at("ZodE164",(e,r)=>{Nfe.init(e,r),Lr.init(e,r)}),Pge=at("ZodJWT",(e,r)=>{Pfe.init(e,r),Lr.init(e,r)}),S6=at("ZodNumber",(e,r)=>{f6.init(e,r),ss.init(e,r),e.gt=(o,d)=>e.check(m3(o,d)),e.gte=(o,d)=>e.check(mT(o,d)),e.min=(o,d)=>e.check(mT(o,d)),e.lt=(o,d)=>e.check(f3(o,d)),e.lte=(o,d)=>e.check(fT(o,d)),e.max=(o,d)=>e.check(fT(o,d)),e.int=o=>e.check(x3(o)),e.safe=o=>e.check(x3(o)),e.positive=o=>e.check(m3(0,o)),e.nonnegative=o=>e.check(mT(0,o)),e.negative=o=>e.check(f3(0,o)),e.nonpositive=o=>e.check(fT(0,o)),e.multipleOf=(o,d)=>e.check(g3(o,d)),e.step=(o,d)=>e.check(g3(o,d)),e.finite=()=>e;const s=e._zod.bag;e.minValue=Math.max(s.minimum??Number.NEGATIVE_INFINITY,s.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(s.maximum??Number.POSITIVE_INFINITY,s.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(s.format??"").includes("int")||Number.isSafeInteger(s.multipleOf??.5),e.isFinite=!0,e.format=s.format??null});function Zb(e){return Tme(S6,e)}const Mge=at("ZodNumberFormat",(e,r)=>{Mfe.init(e,r),S6.init(e,r)});function x3(e){return _me(Mge,e)}const Ige=at("ZodAny",(e,r)=>{Ife.init(e,r),ss.init(e,r)});function b3(){return $me(Ige)}const zge=at("ZodUnknown",(e,r)=>{zfe.init(e,r),ss.init(e,r)});function w3(){return Nme(zge)}const Lge=at("ZodNever",(e,r)=>{Lfe.init(e,r),ss.init(e,r)});function Fge(e){return Dme(Lge,e)}const qge=at("ZodArray",(e,r)=>{Ffe.init(e,r),ss.init(e,r),e.element=r.element,e.min=(s,o)=>e.check(tC(s,o)),e.nonempty=s=>e.check(tC(1,s)),e.max=(s,o)=>e.check(v6(s,o)),e.length=(s,o)=>e.check(x6(s,o)),e.unwrap=()=>e.element});function Bge(e,r){return Vme(qge,e,r)}const Uge=at("ZodObject",(e,r)=>{Bfe.init(e,r),ss.init(e,r),Sr(e,"shape",()=>r.shape),e.keyof=()=>Da(Object.keys(e._zod.def.shape)),e.catchall=s=>e.clone({...e._zod.def,catchall:s}),e.passthrough=()=>e.clone({...e._zod.def,catchall:w3()}),e.loose=()=>e.clone({...e._zod.def,catchall:w3()}),e.strict=()=>e.clone({...e._zod.def,catchall:Fge()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=s=>ape(e,s),e.safeExtend=s=>ope(e,s),e.merge=s=>lpe(e,s),e.pick=s=>spe(e,s),e.omit=s=>ipe(e,s),e.partial=(...s)=>cpe(j6,e,s[0]),e.required=(...s)=>upe(C6,e,s[0])});function Xs(e,r){const s={type:"object",shape:e??{},...Yt(r)};return new Uge(s)}const Kge=at("ZodUnion",(e,r)=>{Ufe.init(e,r),ss.init(e,r),e.options=r.options});function E6(e,r){return new Kge({type:"union",options:e,...Yt(r)})}const Vge=at("ZodIntersection",(e,r)=>{Kfe.init(e,r),ss.init(e,r)});function Hge(e,r){return new Vge({type:"intersection",left:e,right:r})}const g_=at("ZodEnum",(e,r)=>{Vfe.init(e,r),ss.init(e,r),e.enum=r.entries,e.options=Object.values(r.entries);const s=new Set(Object.keys(r.entries));e.extract=(o,d)=>{const p={};for(const m of o)if(s.has(m))p[m]=r.entries[m];else throw new Error(`Key ${m} not found in enum`);return new g_({...r,checks:[],...Yt(d),entries:p})},e.exclude=(o,d)=>{const p={...r.entries};for(const m of o)if(s.has(m))delete p[m];else throw new Error(`Key ${m} not found in enum`);return new g_({...r,checks:[],...Yt(d),entries:p})}});function Da(e,r){const s=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new g_({type:"enum",entries:s,...Yt(r)})}const Gge=at("ZodLiteral",(e,r)=>{Hfe.init(e,r),ss.init(e,r),e.values=new Set(r.values),Object.defineProperty(e,"value",{get(){if(r.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return r.values[0]}})});function Wb(e,r){return new Gge({type:"literal",values:Array.isArray(e)?e:[e],...Yt(r)})}const Xge=at("ZodTransform",(e,r)=>{Gfe.init(e,r),ss.init(e,r),e._zod.parse=(s,o)=>{if(o.direction==="backward")throw new t6(e.constructor.name);s.addIssue=p=>{if(typeof p=="string")s.issues.push(Yb(p,s.value,r));else{const m=p;m.fatal&&(m.continue=!1),m.code??(m.code="custom"),m.input??(m.input=s.value),m.inst??(m.inst=e),s.issues.push(Yb(m))}};const d=r.transform(s.value,s);return d instanceof Promise?d.then(p=>(s.value=p,s)):(s.value=d,s)}});function Yge(e){return new Xge({type:"transform",transform:e})}const j6=at("ZodOptional",(e,r)=>{Xfe.init(e,r),ss.init(e,r),e.unwrap=()=>e._zod.def.innerType});function S3(e){return new j6({type:"optional",innerType:e})}const Zge=at("ZodNullable",(e,r)=>{Yfe.init(e,r),ss.init(e,r),e.unwrap=()=>e._zod.def.innerType});function E3(e){return new Zge({type:"nullable",innerType:e})}const Wge=at("ZodDefault",(e,r)=>{Zfe.init(e,r),ss.init(e,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Jge(e,r){return new Wge({type:"default",innerType:e,get defaultValue(){return typeof r=="function"?r():s6(r)}})}const Qge=at("ZodPrefault",(e,r)=>{Wfe.init(e,r),ss.init(e,r),e.unwrap=()=>e._zod.def.innerType});function eye(e,r){return new Qge({type:"prefault",innerType:e,get defaultValue(){return typeof r=="function"?r():s6(r)}})}const C6=at("ZodNonOptional",(e,r)=>{Jfe.init(e,r),ss.init(e,r),e.unwrap=()=>e._zod.def.innerType});function tye(e,r){return new C6({type:"nonoptional",innerType:e,...Yt(r)})}const nye=at("ZodCatch",(e,r)=>{Qfe.init(e,r),ss.init(e,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function rye(e,r){return new nye({type:"catch",innerType:e,catchValue:typeof r=="function"?r:()=>r})}const sye=at("ZodPipe",(e,r)=>{eme.init(e,r),ss.init(e,r),e.in=r.in,e.out=r.out});function j3(e,r){return new sye({type:"pipe",in:e,out:r})}const iye=at("ZodReadonly",(e,r)=>{tme.init(e,r),ss.init(e,r),e.unwrap=()=>e._zod.def.innerType});function aye(e){return new iye({type:"readonly",innerType:e})}const oye=at("ZodCustom",(e,r)=>{nme.init(e,r),ss.init(e,r)});function lye(e,r={}){return Hme(oye,e,r)}function cye(e){return Gme(e)}const Dd={custom:"custom"};var uye=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],dye=uye.reduce((e,r)=>{const s=tw(`Primitive.${r}`),o=R.forwardRef((d,p)=>{const{asChild:m,...g}=d,b=m?s:r;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(b,{...g,ref:p})});return o.displayName=`Primitive.${r}`,{...e,[r]:o}},{}),hye="Label",A6=R.forwardRef((e,r)=>u.jsx(dye.label,{...e,ref:r,onMouseDown:s=>{s.target.closest("button, input, select, textarea")||(e.onMouseDown?.(s),!s.defaultPrevented&&s.detail>1&&s.preventDefault())}}));A6.displayName=hye;var pye=A6;function xi({className:e,...r}){return u.jsx(pye,{"data-slot":"label",className:ht("flex items-center gap-2 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),...r})}const yr=Phe,O6=R.createContext({}),yt=({...e})=>u.jsx(O6.Provider,{value:{name:e.name},children:u.jsx(Go,{...e})}),r$=()=>{const e=R.useContext(O6),r=R.useContext(k6),{getFieldState:s}=qC(),o=XF({name:e.name}),d=s(e.name,o);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:p}=r;return{id:p,name:e.name,formItemId:`${p}-form-item`,formDescriptionId:`${p}-form-item-description`,formMessageId:`${p}-form-item-message`,...d}},k6=R.createContext({});function lt({className:e,...r}){const s=R.useId();return u.jsx(k6.Provider,{value:{id:s},children:u.jsx("div",{"data-slot":"form-item",className:ht("grid gap-2",e),...r})})}function ct({className:e,...r}){const{error:s,formItemId:o}=r$();return u.jsx(xi,{"data-slot":"form-label","data-error":!!s,className:ht("data-[error=true]:text-destructive",e),htmlFor:o,...r})}function wt({...e}){const{error:r,formItemId:s,formDescriptionId:o,formMessageId:d}=r$();return u.jsx(Cg,{"data-slot":"form-control",id:s,"aria-describedby":r?`${o} ${d}`:`${o}`,"aria-invalid":!!r,...e})}function mt({className:e,...r}){const{error:s,formMessageId:o}=r$(),d=s?String(s?.message??""):r.children;return d?u.jsx("p",{"data-slot":"form-message",id:o,className:ht("text-destructive text-sm",e),...r,children:d}):null}function Fi({className:e,...r}){return u.jsx("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:u.jsx("table",{"data-slot":"table",className:ht("w-full caption-bottom text-sm",e),...r})})}function qi({className:e,...r}){return u.jsx("thead",{"data-slot":"table-header",className:ht("[&_tr]:border-b",e),...r})}function Bi({className:e,...r}){return u.jsx("tbody",{"data-slot":"table-body",className:ht("[&_tr:last-child]:border-0",e),...r})}function an({className:e,...r}){return u.jsx("tr",{"data-slot":"table-row",className:ht("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",e),...r})}function At({className:e,...r}){return u.jsx("th",{"data-slot":"table-head",className:ht("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...r})}function vt({className:e,...r}){return u.jsx("td",{"data-slot":"table-cell",className:ht("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...r})}function fye({className:e,...r}){return u.jsx("caption",{"data-slot":"table-caption",className:ht("text-muted-foreground mt-4 text-sm",e),...r})}const R6=Xs({key:zn().trim().min(1,"Key is required").max(120,"Max 120 chars"),value:zn().trim().optional()}),mye=R6.partial();function gye({t:e}){const r=`${e.key}${e.value?`=${e.value}`:""}`;return u.jsxs(rs,{variant:"secondary",className:"font-mono text-xs",children:[u.jsx(gC,{className:"mr-1 h-3 w-3"}),r]})}const yye=()=>{const[e,r]=R.useState(""),[s,o]=R.useState(!1),[d,p]=R.useState(!1),[m,g]=R.useState(null),[b,S]=R.useState(null),E=Hs(),A=rr({queryKey:["annotations"],queryFn:()=>Sb.listAnnotations()}),k=mr({resolver:gr(R6),defaultValues:{key:"",value:""}}),T=nn({mutationFn:z=>Sb.createAnnotation(z),onSuccess:async()=>{await E.invalidateQueries({queryKey:["annotations"]}),k.reset(),o(!1),Ze.success("Annotation Created Successfully.")},onError:z=>{Ze.error(z.message??"There was an error while creating Annotation")}}),M=z=>{T.mutate(z)},I=mr({resolver:gr(mye),defaultValues:{}}),q=nn({mutationFn:({id:z,values:ee})=>Sb.updateAnnotation(z,ee),onSuccess:async()=>{await E.invalidateQueries({queryKey:["annotations"]}),I.reset(),p(!1),Ze.success("Annotation Updated Successfully.")},onError:z=>{Ze.error(z.message??"There was an error while updating Annotation")}}),G=z=>{S(z.id),I.reset({key:z.key,value:z.value}),p(!0)},K=nn({mutationFn:z=>Sb.deleteAnnotation(z),onSuccess:async()=>{await E.invalidateQueries({queryKey:["annotations"]}),g(null),Ze.success("Annotation Deleted Successfully.")},onError:z=>{Ze.error(z.message??"There was an error while deleting Annotation")}}),X=R.useMemo(()=>{const z=A.data??[],ee=e.trim().toLowerCase();return ee?z.filter(oe=>oe.key?.toLowerCase().includes(ee)||oe.value?.toLowerCase().includes(ee)):z},[e,A.data]);return A.isLoading?u.jsx("div",{className:"p-6",children:"Loading annotations…"}):A.error?u.jsxs("div",{className:"p-6 text-red-500",children:["Error loading annotations.",u.jsx("pre",{children:JSON.stringify(A,null,2)})]}):u.jsxs("div",{className:"space-y-4 p-6",children:[u.jsxs("div",{className:"flex flex-col gap-3 md:flex-row md:items-center md:justify-between",children:[u.jsx("h1",{className:"mb-4 text-2xl font-bold",children:"Annotations"}),u.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[u.jsxs("div",{className:"relative",children:[u.jsx(Pa,{className:"absolute top-2.5 left-2 h-4 w-4 opacity-60"}),u.jsx(xt,{value:e,onChange:z=>r(z.target.value),placeholder:"Search annotations",className:"w-64 pl-8"})]}),u.jsxs(fn,{open:s,onOpenChange:o,children:[u.jsx(Li,{asChild:!0,children:u.jsxs(Fe,{onClick:()=>o(!0),children:[u.jsx(lo,{className:"mr-2 h-4 w-4"}),"Create Annotation"]})}),u.jsxs(mn,{className:"sm:max-w-lg",children:[u.jsx(gn,{children:u.jsx(yn,{children:"Create Label"})}),u.jsx(yr,{...k,children:u.jsxs("form",{className:"space-y-4",onSubmit:k.handleSubmit(M),children:[u.jsx(yt,{control:k.control,name:"key",render:({field:z})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Key"}),u.jsx(wt,{children:u.jsx(xt,{placeholder:"environment",...z})}),u.jsx(mt,{})]})}),u.jsx(yt,{control:k.control,name:"value",render:({field:z})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Value"}),u.jsx(wt,{children:u.jsx(xt,{placeholder:"dev",...z})}),u.jsx(mt,{})]})}),u.jsxs(Sn,{className:"gap-2",children:[u.jsx(Fe,{type:"button",variant:"outline",onClick:()=>o(!1),children:"Cancel"}),u.jsx(Fe,{type:"submit",disabled:k.formState.isSubmitting,children:k.formState.isSubmitting?"Creating…":"Create"})]})]})})]})]})]})]}),u.jsx("div",{className:"bg-background overflow-hidden rounded-2xl border shadow-sm",children:u.jsx("div",{className:"overflow-x-auto",children:u.jsxs(Fi,{children:[u.jsx(qi,{children:u.jsxs(an,{children:[u.jsx(At,{children:"Key"}),u.jsx(At,{children:"Value"}),u.jsx(At,{children:"Annotation"}),u.jsx(At,{className:"w-[180px] text-right",children:"Actions"})]})}),u.jsxs(Bi,{children:[X.map(z=>u.jsxs(an,{children:[u.jsx(vt,{children:z.key}),u.jsx(vt,{children:z.value}),u.jsx(vt,{children:u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(gye,{t:z}),u.jsx("code",{className:"text-muted-foreground text-xs",children:el(z.id,6)})]})}),u.jsx(vt,{children:u.jsxs("div",{className:"flex justify-end gap-2",children:[u.jsxs(Fe,{variant:"outline",size:"sm",onClick:()=>G(z),children:[u.jsx(pu,{className:"mr-2 h-4 w-4"})," Edit"]}),u.jsx(Fe,{variant:"destructive",size:"sm",onClick:()=>g(z.id),disabled:K.isPending&&m===z.id,children:K.isPending&&m===z.id?"Deleting…":"Delete"})]})})]},z.id)),X.length===0&&u.jsx(an,{children:u.jsxs(vt,{colSpan:4,className:"text-muted-foreground py-10 text-center",children:[u.jsx(ew,{className:"mx-auto mb-2 h-6 w-6 opacity-60"}),"No labels match your search."]})})]})]})})}),u.jsx(fn,{open:d,onOpenChange:p,children:u.jsxs(mn,{className:"sm:max-w-lg",children:[u.jsx(gn,{children:u.jsx(yn,{children:"Edit Annotation"})}),u.jsx(yr,{...I,children:u.jsxs("form",{className:"space-y-4",onSubmit:I.handleSubmit(z=>{b&&q.mutate({id:b,values:z})}),children:[u.jsx(yt,{control:I.control,name:"key",render:({field:z})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Key"}),u.jsx(wt,{children:u.jsx(xt,{placeholder:"dedicated",...z})}),u.jsx(mt,{})]})}),u.jsx(yt,{control:I.control,name:"value",render:({field:z})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Value (optional)"}),u.jsx(wt,{children:u.jsx(xt,{placeholder:"gpu",...z})}),u.jsx(mt,{})]})}),u.jsxs(Sn,{className:"gap-2",children:[u.jsx(Fe,{type:"button",variant:"outline",onClick:()=>p(!1),children:"Cancel"}),u.jsx(Fe,{type:"submit",disabled:q.isPending,children:q.isPending?"Saving…":"Save changes"})]})]})})]})}),u.jsx(fn,{open:!!m,onOpenChange:z=>!z&&g(null),children:u.jsxs(mn,{className:"sm:max-w-md",children:[u.jsx(gn,{children:u.jsx(yn,{children:"Delete annotation"})}),u.jsx("p",{className:"text-muted-foreground text-sm",children:"This action cannot be undone. Are you sure you want to delete this annotation?"}),u.jsxs(Sn,{className:"gap-2",children:[u.jsx(Fe,{variant:"outline",onClick:()=>g(null),children:"Cancel"}),u.jsx(Fe,{variant:"destructive",onClick:()=>m&&K.mutate(m),disabled:K.isPending,children:K.isPending?"Deleting…":"Delete"})]})]})})]})},Ss=ote(),Es={listClusters:e=>ut(async()=>await Ss.listClusters(e?{q:e}:{})),getCluster:e=>ut(async()=>await Ss.getCluster({clusterID:e})),createCluster:e=>ut(async()=>await Ss.createCluster({dtoCreateClusterRequest:e})),updateCluster:(e,r)=>ut(async()=>await Ss.updateCluster({clusterID:e,dtoUpdateClusterRequest:r})),deleteCluster:e=>ut(async()=>await Ss.deleteCluster({clusterID:e})),setKubeconfig:(e,r)=>ut(async()=>await Ss.setClusterKubeconfig({clusterID:e,dtoSetKubeconfigRequest:r})),clearKubeconfig:e=>ut(async()=>await Ss.clearClusterKubeconfig({clusterID:e})),attachCaptainDomain:(e,r)=>ut(async()=>await Ss.attachCaptainDomain({clusterID:e,dtoAttachCaptainDomainRequest:r})),detachCaptainDomain:e=>ut(async()=>await Ss.detachCaptainDomain({clusterID:e})),attachControlPlaneRecordSet:(e,r)=>ut(async()=>await Ss.attachControlPlaneRecordSet({clusterID:e,dtoAttachRecordSetRequest:r})),detachControlPlaneRecordSet:e=>ut(async()=>await Ss.detachControlPlaneRecordSet({clusterID:e})),attachAppsLoadBalancer:(e,r)=>ut(async()=>await Ss.attachAppsLoadBalancer({clusterID:e,dtoAttachLoadBalancerRequest:r})),detachAppsLoadBalancer:e=>ut(async()=>await Ss.detachAppsLoadBalancer({clusterID:e})),attachGlueOpsLoadBalancer:(e,r)=>ut(async()=>await Ss.attachGlueOpsLoadBalancer({clusterID:e,dtoAttachLoadBalancerRequest:r})),detachGlueOpsLoadBalancer:e=>ut(async()=>await Ss.detachGlueOpsLoadBalancer({clusterID:e})),attachBastion:(e,r)=>ut(async()=>await Ss.attachBastionServer({clusterID:e,dtoAttachBastionRequest:r})),detachBastion:e=>ut(async()=>await Ss.detachBastionServer({clusterID:e})),attachNodePool:(e,r)=>ut(async()=>await Ss.attachNodePool({clusterID:e,dtoAttachNodePoolRequest:{node_pool_id:r}})),detachNodePool:(e,r)=>ut(async()=>await Ss.detachNodePool({clusterID:e,nodePoolID:r}))},uu=ite(),tc={listDomains:()=>ut(async()=>await uu.listDomains()),getDomain:e=>ut(async()=>await uu.getDomain({id:e})),createDomain:async e=>ut(async()=>await uu.createDomain({dtoCreateDomainRequest:e})),updateDomain:async(e,r)=>ut(async()=>await uu.updateDomain({id:e,dtoUpdateDomainRequest:r})),deleteDomain:async e=>ut(async()=>await uu.deleteDomain({id:e})),listRecordSetsByDomain:async e=>ut(async()=>await uu.listRecordSets({domainId:e})),createRecordSetsByDomain:async(e,r)=>ut(async()=>await uu.createRecordSet({domainId:e,dtoCreateRecordSetRequest:r})),updateRecordSetsByDomain:async(e,r)=>ut(async()=>await uu.updateRecordSet({id:e,dtoUpdateRecordSetRequest:r})),deleteRecordSetsByDomain:async e=>ut(async()=>await uu.deleteRecordSet({id:e}))},lb=ate(),jb={listLoadBalancers:()=>ut(async()=>await lb.listLoadBalancers()),getLoadBalancer:e=>ut(async()=>await lb.getLoadBalancers({id:e})),createLoadBalancer:e=>ut(async()=>await lb.createLoadBalancer({dtoCreateLoadBalancerRequest:e})),updateLoadBalancer:(e,r)=>ut(async()=>await lb.updateLoadBalancer({id:e,dtoUpdateLoadBalancerRequest:r})),deleteLoadBalancer:e=>ut(async()=>await lb.deleteLoadBalancer({id:e}))},Bs=rte(),vye=(e,r)=>e?e===r:!0,ka={listNodePools:()=>ut(async()=>await Bs.listNodePools({})),createNodePool:e=>ut(async()=>await Bs.createNodePool({dtoCreateNodePoolRequest:e})),getNodePool:e=>ut(async()=>await Bs.getNodePool({id:e})),deleteNodePool:e=>ut(async()=>{await Bs.deleteNodePool({id:e})}),updateNodePool:(e,r)=>ut(async()=>await Bs.updateNodePool({id:e,dtoUpdateNodePoolRequest:r})),listNodePoolServers:e=>ut(async()=>await Bs.listNodePoolServers({id:e})),attachNodePoolServer:(e,r)=>ut(async()=>await Bs.attachNodePoolServers({id:e,dtoAttachServersRequest:r})),detachNodePoolServers:(e,r)=>ut(async()=>await Bs.detachNodePoolServer({id:e,serverId:r})),listNodePoolTaints:e=>ut(async()=>await Bs.listNodePoolTaints({id:e})),attachNodePoolTaints:(e,r)=>ut(async()=>await Bs.attachNodePoolTaints({id:e,dtoAttachTaintsRequest:r})),detachNodePoolTaints:(e,r)=>ut(async()=>await Bs.detachNodePoolTaint({id:e,taintId:r})),listNodePoolLabels:e=>ut(async()=>await Bs.listNodePoolLabels({id:e})),attachNodePoolLabels:(e,r)=>ut(async()=>await Bs.attachNodePoolLabels({id:e,dtoAttachLabelsRequest:r})),detachNodePoolLabels:(e,r)=>ut(async()=>await Bs.detachNodePoolLabel({id:e,labelId:r})),listNodePoolAnnotations:e=>ut(async()=>await Bs.listNodePoolAnnotations({id:e})),attachNodePoolAnnotations:(e,r)=>ut(async()=>await Bs.attachNodePoolAnnotations({id:e,dtoAttachAnnotationsRequest:r})),detachNodePoolAnnotations:(e,r)=>ut(async()=>await Bs.detachNodePoolAnnotation({id:e,annotationId:r}))},cb=Jee(),hg={listServers:()=>ut(async()=>await cb.listServers()),createServer:e=>ut(async()=>await cb.createServer({dtoCreateServerRequest:e})),getServer:e=>ut(async()=>await cb.getServer({id:e})),updateServer:(e,r)=>ut(async()=>await cb.updateServer({id:e,dtoUpdateServerRequest:r})),deleteServer:e=>ut(async()=>{await cb.deleteServer({id:e})})};function C3(e,[r,s]){return Math.min(s,Math.max(r,e))}function A3(e){const r=xye(e),s=R.forwardRef((o,d)=>{const{children:p,...m}=o,g=R.Children.toArray(p),b=g.find(wye);if(b){const S=b.props.children,E=g.map(A=>A===b?R.Children.count(S)>1?R.Children.only(null):R.isValidElement(S)?S.props.children:null:A);return u.jsx(r,{...m,ref:d,children:R.isValidElement(S)?R.cloneElement(S,void 0,E):null})}return u.jsx(r,{...m,ref:d,children:p})});return s.displayName=`${e}.Slot`,s}function xye(e){const r=R.forwardRef((s,o)=>{const{children:d,...p}=s;if(R.isValidElement(d)){const m=Eye(d),g=Sye(p,d.props);return d.type!==R.Fragment&&(g.ref=o?zi(o,m):m),R.cloneElement(d,g)}return R.Children.count(d)>1?R.Children.only(null):null});return r.displayName=`${e}.SlotClone`,r}var bye=Symbol("radix.slottable");function wye(e){return R.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===bye}function Sye(e,r){const s={...r};for(const o in r){const d=e[o],p=r[o];/^on[A-Z]/.test(o)?d&&p?s[o]=(...g)=>{const b=p(...g);return d(...g),b}:d&&(s[o]=d):o==="style"?s[o]={...d,...p}:o==="className"&&(s[o]=[d,p].filter(Boolean).join(" "))}return{...e,...s}}function Eye(e){let r=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning;return s?e.ref:(r=Object.getOwnPropertyDescriptor(e,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning,s?e.props.ref:e.props.ref||e.ref)}function s$(e){const r=e+"CollectionProvider",[s,o]=al(r),[d,p]=s(r,{collectionRef:{current:null},itemMap:new Map}),m=I=>{const{scope:q,children:G}=I,K=Je.useRef(null),X=Je.useRef(new Map).current;return u.jsx(d,{scope:q,itemMap:X,collectionRef:K,children:G})};m.displayName=r;const g=e+"CollectionSlot",b=A3(g),S=Je.forwardRef((I,q)=>{const{scope:G,children:K}=I,X=p(g,G),z=Ln(q,X.collectionRef);return u.jsx(b,{ref:z,children:K})});S.displayName=g;const E=e+"CollectionItemSlot",A="data-radix-collection-item",k=A3(E),T=Je.forwardRef((I,q)=>{const{scope:G,children:K,...X}=I,z=Je.useRef(null),ee=Ln(q,z),oe=p(E,G);return Je.useEffect(()=>(oe.itemMap.set(z,{ref:z,...X}),()=>void oe.itemMap.delete(z))),u.jsx(k,{[A]:"",ref:ee,children:K})});T.displayName=E;function M(I){const q=p(e+"CollectionConsumer",I);return Je.useCallback(()=>{const K=q.collectionRef.current;if(!K)return[];const X=Array.from(K.querySelectorAll(`[${A}]`));return Array.from(q.itemMap.values()).sort((oe,Q)=>X.indexOf(oe.ref.current)-X.indexOf(Q.ref.current))},[q.collectionRef,q.itemMap])}return[{Provider:m,Slot:S,ItemSlot:T},M,o]}var jye=R.createContext(void 0);function i$(e){const r=R.useContext(jye);return e||r||"ltr"}function Cye(e){const r=Aye(e),s=R.forwardRef((o,d)=>{const{children:p,...m}=o,g=R.Children.toArray(p),b=g.find(kye);if(b){const S=b.props.children,E=g.map(A=>A===b?R.Children.count(S)>1?R.Children.only(null):R.isValidElement(S)?S.props.children:null:A);return u.jsx(r,{...m,ref:d,children:R.isValidElement(S)?R.cloneElement(S,void 0,E):null})}return u.jsx(r,{...m,ref:d,children:p})});return s.displayName=`${e}.Slot`,s}function Aye(e){const r=R.forwardRef((s,o)=>{const{children:d,...p}=s;if(R.isValidElement(d)){const m=Tye(d),g=Rye(p,d.props);return d.type!==R.Fragment&&(g.ref=o?zi(o,m):m),R.cloneElement(d,g)}return R.Children.count(d)>1?R.Children.only(null):null});return r.displayName=`${e}.SlotClone`,r}var Oye=Symbol("radix.slottable");function kye(e){return R.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Oye}function Rye(e,r){const s={...r};for(const o in r){const d=e[o],p=r[o];/^on[A-Z]/.test(o)?d&&p?s[o]=(...g)=>{const b=p(...g);return d(...g),b}:d&&(s[o]=d):o==="style"?s[o]={...d,...p}:o==="className"&&(s[o]=[d,p].filter(Boolean).join(" "))}return{...e,...s}}function Tye(e){let r=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning;return s?e.ref:(r=Object.getOwnPropertyDescriptor(e,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning,s?e.props.ref:e.props.ref||e.ref)}function T6(e){const r=R.useRef({value:e,previous:e});return R.useMemo(()=>(r.current.value!==e&&(r.current.previous=r.current.value,r.current.value=e),r.current.previous),[e])}var _ye=[" ","Enter","ArrowUp","ArrowDown"],$ye=[" ","Enter"],$p="Select",[XC,YC,Nye]=s$($p),[Mg]=al($p,[Nye,Hd]),ZC=Hd(),[Dye,Wd]=Mg($p),[Pye,Mye]=Mg($p),_6=e=>{const{__scopeSelect:r,children:s,open:o,defaultOpen:d,onOpenChange:p,value:m,defaultValue:g,onValueChange:b,dir:S,name:E,autoComplete:A,disabled:k,required:T,form:M}=e,I=ZC(r),[q,G]=R.useState(null),[K,X]=R.useState(null),[z,ee]=R.useState(!1),oe=i$(S),[Q,ne]=qd({prop:o,defaultProp:d??!1,onChange:p,caller:$p}),[de,Ce]=qd({prop:m,defaultProp:g,onChange:b,caller:$p}),xe=R.useRef(null),le=q?M||!!q.closest("form"):!0,[be,je]=R.useState(new Set),Ke=Array.from(be).map(ce=>ce.props.value).join(";");return u.jsx(SC,{...I,children:u.jsxs(Dye,{required:T,scope:r,trigger:q,onTriggerChange:G,valueNode:K,onValueNodeChange:X,valueNodeHasChildren:z,onValueNodeHasChildrenChange:ee,contentId:Vs(),value:de,onValueChange:Ce,open:Q,onOpenChange:ne,dir:oe,triggerPointerDownPosRef:xe,disabled:k,children:[u.jsx(XC.Provider,{scope:r,children:u.jsx(Pye,{scope:e.__scopeSelect,onNativeOptionAdd:R.useCallback(ce=>{je(re=>new Set(re).add(ce))},[]),onNativeOptionRemove:R.useCallback(ce=>{je(re=>{const ue=new Set(re);return ue.delete(ce),ue})},[]),children:s})}),le?u.jsxs(Q6,{"aria-hidden":!0,required:T,tabIndex:-1,name:E,autoComplete:A,value:de,onChange:ce=>Ce(ce.target.value),disabled:k,form:M,children:[de===void 0?u.jsx("option",{value:""}):null,Array.from(be)]},Ke):null]})})};_6.displayName=$p;var $6="SelectTrigger",N6=R.forwardRef((e,r)=>{const{__scopeSelect:s,disabled:o=!1,...d}=e,p=ZC(s),m=Wd($6,s),g=m.disabled||o,b=Ln(r,m.onTriggerChange),S=YC(s),E=R.useRef("touch"),[A,k,T]=tq(I=>{const q=S().filter(X=>!X.disabled),G=q.find(X=>X.value===m.value),K=nq(q,I,G);K!==void 0&&m.onValueChange(K.value)}),M=I=>{g||(m.onOpenChange(!0),T()),I&&(m.triggerPointerDownPosRef.current={x:Math.round(I.pageX),y:Math.round(I.pageY)})};return u.jsx(rw,{asChild:!0,...p,children:u.jsx(Cn.button,{type:"button",role:"combobox","aria-controls":m.contentId,"aria-expanded":m.open,"aria-required":m.required,"aria-autocomplete":"none",dir:m.dir,"data-state":m.open?"open":"closed",disabled:g,"data-disabled":g?"":void 0,"data-placeholder":eq(m.value)?"":void 0,...d,ref:b,onClick:$t(d.onClick,I=>{I.currentTarget.focus(),E.current!=="mouse"&&M(I)}),onPointerDown:$t(d.onPointerDown,I=>{E.current=I.pointerType;const q=I.target;q.hasPointerCapture(I.pointerId)&&q.releasePointerCapture(I.pointerId),I.button===0&&I.ctrlKey===!1&&I.pointerType==="mouse"&&(M(I),I.preventDefault())}),onKeyDown:$t(d.onKeyDown,I=>{const q=A.current!=="";!(I.ctrlKey||I.altKey||I.metaKey)&&I.key.length===1&&k(I.key),!(q&&I.key===" ")&&_ye.includes(I.key)&&(M(),I.preventDefault())})})})});N6.displayName=$6;var D6="SelectValue",P6=R.forwardRef((e,r)=>{const{__scopeSelect:s,className:o,style:d,children:p,placeholder:m="",...g}=e,b=Wd(D6,s),{onValueNodeHasChildrenChange:S}=b,E=p!==void 0,A=Ln(r,b.onValueNodeChange);return As(()=>{S(E)},[S,E]),u.jsx(Cn.span,{...g,ref:A,style:{pointerEvents:"none"},children:eq(b.value)?u.jsx(u.Fragment,{children:m}):p})});P6.displayName=D6;var Iye="SelectIcon",M6=R.forwardRef((e,r)=>{const{__scopeSelect:s,children:o,...d}=e;return u.jsx(Cn.span,{"aria-hidden":!0,...d,ref:r,children:o||"▼"})});M6.displayName=Iye;var zye="SelectPortal",I6=e=>u.jsx(_g,{asChild:!0,...e});I6.displayName=zye;var Np="SelectContent",z6=R.forwardRef((e,r)=>{const s=Wd(Np,e.__scopeSelect),[o,d]=R.useState();if(As(()=>{d(new DocumentFragment)},[]),!s.open){const p=o;return p?mC.createPortal(u.jsx(L6,{scope:e.__scopeSelect,children:u.jsx(XC.Slot,{scope:e.__scopeSelect,children:u.jsx("div",{children:e.children})})}),p):null}return u.jsx(F6,{...e,ref:r})});z6.displayName=Np;var Yo=10,[L6,Jd]=Mg(Np),Lye="SelectContentImpl",Fye=Cye("SelectContent.RemoveScroll"),F6=R.forwardRef((e,r)=>{const{__scopeSelect:s,position:o="item-aligned",onCloseAutoFocus:d,onEscapeKeyDown:p,onPointerDownOutside:m,side:g,sideOffset:b,align:S,alignOffset:E,arrowPadding:A,collisionBoundary:k,collisionPadding:T,sticky:M,hideWhenDetached:I,avoidCollisions:q,...G}=e,K=Wd(Np,s),[X,z]=R.useState(null),[ee,oe]=R.useState(null),Q=Ln(r,ze=>z(ze)),[ne,de]=R.useState(null),[Ce,xe]=R.useState(null),le=YC(s),[be,je]=R.useState(!1),Ke=R.useRef(!1);R.useEffect(()=>{if(X)return RC(X)},[X]),OC();const ce=R.useCallback(ze=>{const[tt,...ft]=le().map(kt=>kt.ref.current),[Ot]=ft.slice(-1),Ft=document.activeElement;for(const kt of ze)if(kt===Ft||(kt?.scrollIntoView({block:"nearest"}),kt===tt&&ee&&(ee.scrollTop=0),kt===Ot&&ee&&(ee.scrollTop=ee.scrollHeight),kt?.focus(),document.activeElement!==Ft))return},[le,ee]),re=R.useCallback(()=>ce([ne,X]),[ce,ne,X]);R.useEffect(()=>{be&&re()},[be,re]);const{onOpenChange:ue,triggerPointerDownPosRef:_e}=K;R.useEffect(()=>{if(X){let ze={x:0,y:0};const tt=Ot=>{ze={x:Math.abs(Math.round(Ot.pageX)-(_e.current?.x??0)),y:Math.abs(Math.round(Ot.pageY)-(_e.current?.y??0))}},ft=Ot=>{ze.x<=10&&ze.y<=10?Ot.preventDefault():X.contains(Ot.target)||ue(!1),document.removeEventListener("pointermove",tt),_e.current=null};return _e.current!==null&&(document.addEventListener("pointermove",tt),document.addEventListener("pointerup",ft,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",tt),document.removeEventListener("pointerup",ft,{capture:!0})}}},[X,ue,_e]),R.useEffect(()=>{const ze=()=>ue(!1);return window.addEventListener("blur",ze),window.addEventListener("resize",ze),()=>{window.removeEventListener("blur",ze),window.removeEventListener("resize",ze)}},[ue]);const[fe,He]=tq(ze=>{const tt=le().filter(Ft=>!Ft.disabled),ft=tt.find(Ft=>Ft.ref.current===document.activeElement),Ot=nq(tt,ze,ft);Ot&&setTimeout(()=>Ot.ref.current.focus())}),Oe=R.useCallback((ze,tt,ft)=>{const Ot=!Ke.current&&!ft;(K.value!==void 0&&K.value===tt||Ot)&&(de(ze),Ot&&(Ke.current=!0))},[K.value]),ke=R.useCallback(()=>X?.focus(),[X]),Ve=R.useCallback((ze,tt,ft)=>{const Ot=!Ke.current&&!ft;(K.value!==void 0&&K.value===tt||Ot)&&xe(ze)},[K.value]),ie=o==="popper"?y_:q6,Ne=ie===y_?{side:g,sideOffset:b,align:S,alignOffset:E,arrowPadding:A,collisionBoundary:k,collisionPadding:T,sticky:M,hideWhenDetached:I,avoidCollisions:q}:{};return u.jsx(L6,{scope:s,content:X,viewport:ee,onViewportChange:oe,itemRefCallback:Oe,selectedItem:ne,onItemLeave:ke,itemTextRefCallback:Ve,focusSelectedItem:re,selectedItemText:Ce,position:o,isPositioned:be,searchRef:fe,children:u.jsx(lw,{as:Fye,allowPinchZoom:!0,children:u.jsx(ow,{asChild:!0,trapped:K.open,onMountAutoFocus:ze=>{ze.preventDefault()},onUnmountAutoFocus:$t(d,ze=>{K.trigger?.focus({preventScroll:!0}),ze.preventDefault()}),children:u.jsx(kg,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:p,onPointerDownOutside:m,onFocusOutside:ze=>ze.preventDefault(),onDismiss:()=>K.onOpenChange(!1),children:u.jsx(ie,{role:"listbox",id:K.contentId,"data-state":K.open?"open":"closed",dir:K.dir,onContextMenu:ze=>ze.preventDefault(),...G,...Ne,onPlaced:()=>je(!0),ref:Q,style:{display:"flex",flexDirection:"column",outline:"none",...G.style},onKeyDown:$t(G.onKeyDown,ze=>{const tt=ze.ctrlKey||ze.altKey||ze.metaKey;if(ze.key==="Tab"&&ze.preventDefault(),!tt&&ze.key.length===1&&He(ze.key),["ArrowUp","ArrowDown","Home","End"].includes(ze.key)){let Ot=le().filter(Ft=>!Ft.disabled).map(Ft=>Ft.ref.current);if(["ArrowUp","End"].includes(ze.key)&&(Ot=Ot.slice().reverse()),["ArrowUp","ArrowDown"].includes(ze.key)){const Ft=ze.target,kt=Ot.indexOf(Ft);Ot=Ot.slice(kt+1)}setTimeout(()=>ce(Ot)),ze.preventDefault()}})})})})})})});F6.displayName=Lye;var qye="SelectItemAlignedPosition",q6=R.forwardRef((e,r)=>{const{__scopeSelect:s,onPlaced:o,...d}=e,p=Wd(Np,s),m=Jd(Np,s),[g,b]=R.useState(null),[S,E]=R.useState(null),A=Ln(r,Q=>E(Q)),k=YC(s),T=R.useRef(!1),M=R.useRef(!0),{viewport:I,selectedItem:q,selectedItemText:G,focusSelectedItem:K}=m,X=R.useCallback(()=>{if(p.trigger&&p.valueNode&&g&&S&&I&&q&&G){const Q=p.trigger.getBoundingClientRect(),ne=S.getBoundingClientRect(),de=p.valueNode.getBoundingClientRect(),Ce=G.getBoundingClientRect();if(p.dir!=="rtl"){const Ft=Ce.left-ne.left,kt=de.left-Ft,Jt=Q.left-kt,Le=Q.width+Jt,Lt=Math.max(Le,ne.width),Rt=window.innerWidth-Yo,V=C3(kt,[Yo,Math.max(Yo,Rt-Lt)]);g.style.minWidth=Le+"px",g.style.left=V+"px"}else{const Ft=ne.right-Ce.right,kt=window.innerWidth-de.right-Ft,Jt=window.innerWidth-Q.right-kt,Le=Q.width+Jt,Lt=Math.max(Le,ne.width),Rt=window.innerWidth-Yo,V=C3(kt,[Yo,Math.max(Yo,Rt-Lt)]);g.style.minWidth=Le+"px",g.style.right=V+"px"}const xe=k(),le=window.innerHeight-Yo*2,be=I.scrollHeight,je=window.getComputedStyle(S),Ke=parseInt(je.borderTopWidth,10),ce=parseInt(je.paddingTop,10),re=parseInt(je.borderBottomWidth,10),ue=parseInt(je.paddingBottom,10),_e=Ke+ce+be+ue+re,fe=Math.min(q.offsetHeight*5,_e),He=window.getComputedStyle(I),Oe=parseInt(He.paddingTop,10),ke=parseInt(He.paddingBottom,10),Ve=Q.top+Q.height/2-Yo,ie=le-Ve,Ne=q.offsetHeight/2,ze=q.offsetTop+Ne,tt=Ke+ce+ze,ft=_e-tt;if(tt<=Ve){const Ft=xe.length>0&&q===xe[xe.length-1].ref.current;g.style.bottom="0px";const kt=S.clientHeight-I.offsetTop-I.offsetHeight,Jt=Math.max(ie,Ne+(Ft?ke:0)+kt+re),Le=tt+Jt;g.style.height=Le+"px"}else{const Ft=xe.length>0&&q===xe[0].ref.current;g.style.top="0px";const Jt=Math.max(Ve,Ke+I.offsetTop+(Ft?Oe:0)+Ne)+ft;g.style.height=Jt+"px",I.scrollTop=tt-Ve+I.offsetTop}g.style.margin=`${Yo}px 0`,g.style.minHeight=fe+"px",g.style.maxHeight=le+"px",o?.(),requestAnimationFrame(()=>T.current=!0)}},[k,p.trigger,p.valueNode,g,S,I,q,G,p.dir,o]);As(()=>X(),[X]);const[z,ee]=R.useState();As(()=>{S&&ee(window.getComputedStyle(S).zIndex)},[S]);const oe=R.useCallback(Q=>{Q&&M.current===!0&&(X(),K?.(),M.current=!1)},[X,K]);return u.jsx(Uye,{scope:s,contentWrapper:g,shouldExpandOnScrollRef:T,onScrollButtonChange:oe,children:u.jsx("div",{ref:b,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:z},children:u.jsx(Cn.div,{...d,ref:A,style:{boxSizing:"border-box",maxHeight:"100%",...d.style}})})})});q6.displayName=qye;var Bye="SelectPopperPosition",y_=R.forwardRef((e,r)=>{const{__scopeSelect:s,align:o="start",collisionPadding:d=Yo,...p}=e,m=ZC(s);return u.jsx(EC,{...m,...p,ref:r,align:o,collisionPadding:d,style:{boxSizing:"border-box",...p.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)"}})});y_.displayName=Bye;var[Uye,a$]=Mg(Np,{}),v_="SelectViewport",B6=R.forwardRef((e,r)=>{const{__scopeSelect:s,nonce:o,...d}=e,p=Jd(v_,s),m=a$(v_,s),g=Ln(r,p.onViewportChange),b=R.useRef(0);return u.jsxs(u.Fragment,{children:[u.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:o}),u.jsx(XC.Slot,{scope:s,children:u.jsx(Cn.div,{"data-radix-select-viewport":"",role:"presentation",...d,ref:g,style:{position:"relative",flex:1,overflow:"hidden auto",...d.style},onScroll:$t(d.onScroll,S=>{const E=S.currentTarget,{contentWrapper:A,shouldExpandOnScrollRef:k}=m;if(k?.current&&A){const T=Math.abs(b.current-E.scrollTop);if(T>0){const M=window.innerHeight-Yo*2,I=parseFloat(A.style.minHeight),q=parseFloat(A.style.height),G=Math.max(I,q);if(G<M){const K=G+T,X=Math.min(M,K),z=K-X;A.style.height=X+"px",A.style.bottom==="0px"&&(E.scrollTop=z>0?z:0,A.style.justifyContent="flex-end")}}}b.current=E.scrollTop})})})]})});B6.displayName=v_;var U6="SelectGroup",[Kye,Vye]=Mg(U6),Hye=R.forwardRef((e,r)=>{const{__scopeSelect:s,...o}=e,d=Vs();return u.jsx(Kye,{scope:s,id:d,children:u.jsx(Cn.div,{role:"group","aria-labelledby":d,...o,ref:r})})});Hye.displayName=U6;var K6="SelectLabel",Gye=R.forwardRef((e,r)=>{const{__scopeSelect:s,...o}=e,d=Vye(K6,s);return u.jsx(Cn.div,{id:d.id,...o,ref:r})});Gye.displayName=K6;var nC="SelectItem",[Xye,V6]=Mg(nC),H6=R.forwardRef((e,r)=>{const{__scopeSelect:s,value:o,disabled:d=!1,textValue:p,...m}=e,g=Wd(nC,s),b=Jd(nC,s),S=g.value===o,[E,A]=R.useState(p??""),[k,T]=R.useState(!1),M=Ln(r,K=>b.itemRefCallback?.(K,o,d)),I=Vs(),q=R.useRef("touch"),G=()=>{d||(g.onValueChange(o),g.onOpenChange(!1))};if(o==="")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 u.jsx(Xye,{scope:s,value:o,disabled:d,textId:I,isSelected:S,onItemTextChange:R.useCallback(K=>{A(X=>X||(K?.textContent??"").trim())},[]),children:u.jsx(XC.ItemSlot,{scope:s,value:o,disabled:d,textValue:E,children:u.jsx(Cn.div,{role:"option","aria-labelledby":I,"data-highlighted":k?"":void 0,"aria-selected":S&&k,"data-state":S?"checked":"unchecked","aria-disabled":d||void 0,"data-disabled":d?"":void 0,tabIndex:d?void 0:-1,...m,ref:M,onFocus:$t(m.onFocus,()=>T(!0)),onBlur:$t(m.onBlur,()=>T(!1)),onClick:$t(m.onClick,()=>{q.current!=="mouse"&&G()}),onPointerUp:$t(m.onPointerUp,()=>{q.current==="mouse"&&G()}),onPointerDown:$t(m.onPointerDown,K=>{q.current=K.pointerType}),onPointerMove:$t(m.onPointerMove,K=>{q.current=K.pointerType,d?b.onItemLeave?.():q.current==="mouse"&&K.currentTarget.focus({preventScroll:!0})}),onPointerLeave:$t(m.onPointerLeave,K=>{K.currentTarget===document.activeElement&&b.onItemLeave?.()}),onKeyDown:$t(m.onKeyDown,K=>{b.searchRef?.current!==""&&K.key===" "||($ye.includes(K.key)&&G(),K.key===" "&&K.preventDefault())})})})})});H6.displayName=nC;var Cb="SelectItemText",G6=R.forwardRef((e,r)=>{const{__scopeSelect:s,className:o,style:d,...p}=e,m=Wd(Cb,s),g=Jd(Cb,s),b=V6(Cb,s),S=Mye(Cb,s),[E,A]=R.useState(null),k=Ln(r,G=>A(G),b.onItemTextChange,G=>g.itemTextRefCallback?.(G,b.value,b.disabled)),T=E?.textContent,M=R.useMemo(()=>u.jsx("option",{value:b.value,disabled:b.disabled,children:T},b.value),[b.disabled,b.value,T]),{onNativeOptionAdd:I,onNativeOptionRemove:q}=S;return As(()=>(I(M),()=>q(M)),[I,q,M]),u.jsxs(u.Fragment,{children:[u.jsx(Cn.span,{id:b.textId,...p,ref:k}),b.isSelected&&m.valueNode&&!m.valueNodeHasChildren?mC.createPortal(p.children,m.valueNode):null]})});G6.displayName=Cb;var X6="SelectItemIndicator",Y6=R.forwardRef((e,r)=>{const{__scopeSelect:s,...o}=e;return V6(X6,s).isSelected?u.jsx(Cn.span,{"aria-hidden":!0,...o,ref:r}):null});Y6.displayName=X6;var x_="SelectScrollUpButton",Z6=R.forwardRef((e,r)=>{const s=Jd(x_,e.__scopeSelect),o=a$(x_,e.__scopeSelect),[d,p]=R.useState(!1),m=Ln(r,o.onScrollButtonChange);return As(()=>{if(s.viewport&&s.isPositioned){let g=function(){const S=b.scrollTop>0;p(S)};const b=s.viewport;return g(),b.addEventListener("scroll",g),()=>b.removeEventListener("scroll",g)}},[s.viewport,s.isPositioned]),d?u.jsx(J6,{...e,ref:m,onAutoScroll:()=>{const{viewport:g,selectedItem:b}=s;g&&b&&(g.scrollTop=g.scrollTop-b.offsetHeight)}}):null});Z6.displayName=x_;var b_="SelectScrollDownButton",W6=R.forwardRef((e,r)=>{const s=Jd(b_,e.__scopeSelect),o=a$(b_,e.__scopeSelect),[d,p]=R.useState(!1),m=Ln(r,o.onScrollButtonChange);return As(()=>{if(s.viewport&&s.isPositioned){let g=function(){const S=b.scrollHeight-b.clientHeight,E=Math.ceil(b.scrollTop)<S;p(E)};const b=s.viewport;return g(),b.addEventListener("scroll",g),()=>b.removeEventListener("scroll",g)}},[s.viewport,s.isPositioned]),d?u.jsx(J6,{...e,ref:m,onAutoScroll:()=>{const{viewport:g,selectedItem:b}=s;g&&b&&(g.scrollTop=g.scrollTop+b.offsetHeight)}}):null});W6.displayName=b_;var J6=R.forwardRef((e,r)=>{const{__scopeSelect:s,onAutoScroll:o,...d}=e,p=Jd("SelectScrollButton",s),m=R.useRef(null),g=YC(s),b=R.useCallback(()=>{m.current!==null&&(window.clearInterval(m.current),m.current=null)},[]);return R.useEffect(()=>()=>b(),[b]),As(()=>{g().find(E=>E.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[g]),u.jsx(Cn.div,{"aria-hidden":!0,...d,ref:r,style:{flexShrink:0,...d.style},onPointerDown:$t(d.onPointerDown,()=>{m.current===null&&(m.current=window.setInterval(o,50))}),onPointerMove:$t(d.onPointerMove,()=>{p.onItemLeave?.(),m.current===null&&(m.current=window.setInterval(o,50))}),onPointerLeave:$t(d.onPointerLeave,()=>{b()})})}),Yye="SelectSeparator",Zye=R.forwardRef((e,r)=>{const{__scopeSelect:s,...o}=e;return u.jsx(Cn.div,{"aria-hidden":!0,...o,ref:r})});Zye.displayName=Yye;var w_="SelectArrow",Wye=R.forwardRef((e,r)=>{const{__scopeSelect:s,...o}=e,d=ZC(s),p=Wd(w_,s),m=Jd(w_,s);return p.open&&m.position==="popper"?u.jsx(jC,{...d,...o,ref:r}):null});Wye.displayName=w_;var Jye="SelectBubbleInput",Q6=R.forwardRef(({__scopeSelect:e,value:r,...s},o)=>{const d=R.useRef(null),p=Ln(o,d),m=T6(r);return R.useEffect(()=>{const g=d.current;if(!g)return;const b=window.HTMLSelectElement.prototype,E=Object.getOwnPropertyDescriptor(b,"value").set;if(m!==r&&E){const A=new Event("change",{bubbles:!0});E.call(g,r),g.dispatchEvent(A)}},[m,r]),u.jsx(Cn.select,{...s,style:{...tL,...s.style},ref:p,defaultValue:r})});Q6.displayName=Jye;function eq(e){return e===""||e===void 0}function tq(e){const r=tl(e),s=R.useRef(""),o=R.useRef(0),d=R.useCallback(m=>{const g=s.current+m;r(g),(function b(S){s.current=S,window.clearTimeout(o.current),S!==""&&(o.current=window.setTimeout(()=>b(""),1e3))})(g)},[r]),p=R.useCallback(()=>{s.current="",window.clearTimeout(o.current)},[]);return R.useEffect(()=>()=>window.clearTimeout(o.current),[]),[s,d,p]}function nq(e,r,s){const d=r.length>1&&Array.from(r).every(S=>S===r[0])?r[0]:r,p=s?e.indexOf(s):-1;let m=Qye(e,Math.max(p,0));d.length===1&&(m=m.filter(S=>S!==s));const b=m.find(S=>S.textValue.toLowerCase().startsWith(d.toLowerCase()));return b!==s?b:void 0}function Qye(e,r){return e.map((s,o)=>e[(r+o)%e.length])}var eve=_6,tve=N6,nve=P6,rve=M6,sve=I6,ive=z6,ave=B6,ove=H6,lve=G6,cve=Y6,uve=Z6,dve=W6;function Rn({...e}){return u.jsx(eve,{"data-slot":"select",...e})}function Tn({...e}){return u.jsx(nve,{"data-slot":"select-value",...e})}function _n({className:e,size:r="default",children:s,...o}){return u.jsxs(tve,{"data-slot":"select-trigger","data-size":r,className:ht("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 dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent 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-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *: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),...o,children:[s,u.jsx(rve,{asChild:!0,children:u.jsx(az,{className:"size-4 opacity-50"})})]})}function $n({className:e,children:r,position:s="popper",align:o="center",...d}){return u.jsx(sve,{children:u.jsxs(ive,{"data-slot":"select-content",className:ht("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-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",s==="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:s,align:o,...d,children:[u.jsx(hve,{}),u.jsx(ave,{className:ht("p-1",s==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:r}),u.jsx(pve,{})]})})}function jt({className:e,children:r,...s}){return u.jsxs(ove,{"data-slot":"select-item",className:ht("focus:bg-accent 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),...s,children:[u.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:u.jsx(cve,{children:u.jsx(iz,{className:"size-4"})})}),u.jsx(lve,{children:r})]})}function hve({className:e,...r}){return u.jsx(uve,{"data-slot":"select-scroll-up-button",className:ht("flex cursor-default items-center justify-center py-1",e),...r,children:u.jsx(EZ,{className:"size-4"})})}function pve({className:e,...r}){return u.jsx(dve,{"data-slot":"select-scroll-down-button",className:ht("flex cursor-default items-center justify-center py-1",e),...r,children:u.jsx(az,{className:"size-4"})})}function hu({className:e,...r}){return u.jsx("textarea",{"data-slot":"textarea",className:ht("border-input placeholder: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 dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),...r})}const rq=Xs({name:zn().trim().min(1,"Name is required").max(120,"Max 120 chars"),provider:zn().trim().min(1,"Provider is required").max(120,"Max 120 chars"),region:zn().trim().min(1,"Region is required").max(120,"Max 120 chars")}),fve=rq.partial();function mve({status:e}){const r=(e??"").toLowerCase();return r?r==="ready"?u.jsxs(rs,{variant:"default",className:"flex items-center gap-1 text-xs",children:[u.jsx(I_,{className:"h-3 w-3"}),"ready"]}):r==="failed"?u.jsxs(rs,{variant:"destructive",className:"flex items-center gap-1 text-xs",children:[u.jsx(kM,{className:"h-3 w-3"}),"failed"]}):r==="provisioning"||r==="pending"||r==="pre_pending"?u.jsxs(rs,{variant:"secondary",className:"flex items-center gap-1 text-xs",children:[u.jsx(Ds,{className:"h-3 w-3 animate-spin"}),r.replace("_"," ")]}):r==="incomplete"?u.jsxs(rs,{variant:"outline",className:"flex items-center gap-1 text-xs",children:[u.jsx(kM,{className:"h-3 w-3"}),"incomplete"]}):u.jsx(rs,{variant:"outline",className:"text-xs",children:r}):u.jsx(rs,{variant:"outline",className:"text-xs",children:"unknown"})}function gve({c:e}){return u.jsxs("div",{className:"flex flex-col gap-1 text-xs text-muted-foreground",children:[u.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.provider&&u.jsxs("span",{className:"inline-flex items-center gap-1",children:[u.jsx(zZ,{className:"h-3 w-3"}),e.provider]}),e.region&&u.jsxs("span",{className:"inline-flex items-center gap-1",children:[u.jsx(rW,{className:"h-3 w-3"}),e.region]})]}),u.jsxs("div",{className:"flex flex-wrap items-center gap-2 font-mono",children:[e.random_token&&u.jsxs("span",{children:["token: ",u.jsx("span",{className:"ml-1",children:el(e.random_token,8)})]}),e.certificate_key&&u.jsxs("span",{children:["cert: ",u.jsx("span",{className:"ml-1",children:el(e.certificate_key,8)})]})]})]})}const yve=()=>{const[e,r]=R.useState(""),[s,o]=R.useState(!1),[d,p]=R.useState(!1),[m,g]=R.useState(null),[b,S]=R.useState(null),[E,A]=R.useState(null),[k,T]=R.useState(""),[M,I]=R.useState(""),[q,G]=R.useState(""),[K,X]=R.useState(""),[z,ee]=R.useState(""),[oe,Q]=R.useState(""),[ne,de]=R.useState(""),[Ce,xe]=R.useState(null),le=W=>Ce===W,be=Hs(),je=rr({queryKey:["clusters"],queryFn:()=>Es.listClusters()}),Ke=rr({queryKey:["load-balancers"],queryFn:()=>jb.listLoadBalancers()}),ce=rr({queryKey:["domains"],queryFn:()=>tc.listDomains()}),re=rr({queryKey:["record-sets",k],enabled:!!k,queryFn:()=>tc.listRecordSetsByDomain(k)}),ue=rr({queryKey:["servers"],queryFn:()=>hg.listServers()}),_e=rr({queryKey:["node-pools"],queryFn:()=>ka.listNodePools()}),fe=mr({resolver:gr(rq),defaultValues:{name:"",provider:"",region:""}}),He=nn({mutationFn:W=>Es.createCluster(W),onSuccess:async()=>{await be.invalidateQueries({queryKey:["clusters"]}),fe.reset(),o(!1),Ze.success("Cluster created successfully.")},onError:W=>{Ze.error(W?.message??"There was an error while creating the cluster")}}),Oe=W=>{He.mutate(W)},ke=mr({resolver:gr(fve),defaultValues:{}}),Ve=nn({mutationFn:({id:W,values:we})=>Es.updateCluster(W,we),onSuccess:async()=>{await be.invalidateQueries({queryKey:["clusters"]}),ke.reset(),p(!1),Ze.success("Cluster updated successfully.")},onError:W=>{Ze.error(W?.message??"There was an error while updating the cluster")}}),ie=W=>{W.id&&(S(W.id),ke.reset({name:W.name??"",provider:W.provider??"",region:W.region??""}),p(!0))},Ne=nn({mutationFn:W=>Es.deleteCluster(W),onSuccess:async()=>{await be.invalidateQueries({queryKey:["clusters"]}),g(null),Ze.success("Cluster deleted successfully.")},onError:W=>{Ze.error(W?.message??"There was an error while deleting the cluster")}}),ze=R.useMemo(()=>{const W=je.data??[],we=e.trim().toLowerCase();return we?W.filter(Re=>Re.name?.toLowerCase().includes(we)||Re.provider?.toLowerCase().includes(we)||Re.region?.toLowerCase().includes(we)||Re.status?.toLowerCase().includes(we)):W},[e,je.data]);R.useEffect(()=>{if(!E){T(""),I(""),G(""),X(""),ee(""),Q(""),de("");return}E.captain_domain?.id&&T(E.captain_domain.id),E.control_plane_record_set?.id&&I(E.control_plane_record_set.id),E.apps_load_balancer?.id&&G(E.apps_load_balancer.id),E.glueops_load_balancer?.id&&X(E.glueops_load_balancer.id),E.bastion_server?.id&&ee(E.bastion_server.id)},[E]);async function tt(){if(E?.id)try{const W=await Es.getCluster(E.id);A(W),await be.invalidateQueries({queryKey:["clusters"]})}catch{}}async function ft(){if(E?.id){if(!k){Ze.error("Domain is required");return}xe("captain");try{await Es.attachCaptainDomain(E.id,{domain_id:k}),Ze.success("Captain domain attached."),await tt()}catch(W){Ze.error(W?.message??"Failed to attach captain domain.")}finally{xe(null)}}}async function Ot(){if(E?.id){xe("captain");try{await Es.detachCaptainDomain(E.id),Ze.success("Captain domain detached."),await tt()}catch(W){Ze.error(W?.message??"Failed to detach captain domain.")}finally{xe(null)}}}async function Ft(){if(E?.id){if(!M){Ze.error("Record set is required");return}xe("recordset");try{await Es.attachControlPlaneRecordSet(E.id,{record_set_id:M}),Ze.success("Control plane record set attached."),await tt()}catch(W){Ze.error(W?.message??"Failed to attach record set.")}finally{xe(null)}}}async function kt(){if(E?.id){xe("recordset");try{await Es.detachControlPlaneRecordSet(E.id),Ze.success("Control plane record set detached."),await tt()}catch(W){Ze.error(W?.message??"Failed to detach record set.")}finally{xe(null)}}}async function Jt(){if(E?.id){if(!q){Ze.error("Load balancer is required");return}xe("apps-lb");try{await Es.attachAppsLoadBalancer(E.id,{load_balancer_id:q}),Ze.success("Apps load balancer attached."),await tt()}catch(W){Ze.error(W?.message??"Failed to attach apps load balancer.")}finally{xe(null)}}}async function Le(){if(E?.id){xe("apps-lb");try{await Es.detachAppsLoadBalancer(E.id),Ze.success("Apps load balancer detached."),await tt()}catch(W){Ze.error(W?.message??"Failed to detach apps load balancer.")}finally{xe(null)}}}async function Lt(){if(E?.id){if(!K){Ze.error("Load balancer is required");return}xe("glueops-lb");try{await Es.attachGlueOpsLoadBalancer(E.id,{load_balancer_id:K}),Ze.success("GlueOps load balancer attached."),await tt()}catch(W){Ze.error(W?.message??"Failed to attach GlueOps load balancer.")}finally{xe(null)}}}async function Rt(){if(E?.id){xe("glueops-lb");try{await Es.detachGlueOpsLoadBalancer(E.id),Ze.success("GlueOps load balancer detached."),await tt()}catch(W){Ze.error(W?.message??"Failed to detach GlueOps load balancer.")}finally{xe(null)}}}async function V(){if(E?.id){if(!z){Ze.error("Server is required");return}xe("bastion");try{await Es.attachBastion(E.id,{server_id:z}),Ze.success("Bastion server attached."),await tt()}catch(W){Ze.error(W?.message??"Failed to attach bastion server.")}finally{xe(null)}}}async function Nn(){if(E?.id){xe("bastion");try{await Es.detachBastion(E.id),Ze.success("Bastion server detached."),await tt()}catch(W){Ze.error(W?.message??"Failed to detach bastion server.")}finally{xe(null)}}}async function cn(){if(E?.id){if(!oe){Ze.error("Node pool is required");return}xe("nodepool");try{await Es.attachNodePool(E.id,oe),Ze.success("Node pool attached."),Q(""),await tt()}catch(W){Ze.error(W?.message??"Failed to attach node pool.")}finally{xe(null)}}}async function ve(W){if(E?.id){xe("nodepool");try{await Es.detachNodePool(E.id,W),Ze.success("Node pool detached."),await tt()}catch(we){Ze.error(we?.message??"Failed to detach node pool.")}finally{xe(null)}}}async function De(){if(E?.id){if(!ne.trim()){Ze.error("Kubeconfig is required");return}xe("kubeconfig");try{await Es.setKubeconfig(E.id,{kubeconfig:ne}),Ze.success("Kubeconfig updated."),de(""),await tt()}catch(W){Ze.error(W?.message??"Failed to set kubeconfig.")}finally{xe(null)}}}async function Ge(){if(E?.id){xe("kubeconfig");try{await Es.clearKubeconfig(E.id),Ze.success("Kubeconfig cleared."),await tt()}catch(W){Ze.error(W?.message??"Failed to clear kubeconfig.")}finally{xe(null)}}}if(je.isLoading)return u.jsx("div",{className:"p-6",children:"Loading clusters…"});if(je.error)return u.jsx("div",{className:"p-6 text-red-500",children:"Error loading clusters."});const D=Ke.data??[],L=D.filter(W=>W.kind==="public"),H=D.filter(W=>W.kind==="glueops");return u.jsxs("div",{className:"space-y-4 p-6",children:[u.jsxs("div",{className:"flex flex-col gap-3 md:flex-row md:items-center md:justify-between",children:[u.jsx("h1",{className:"mb-4 text-2xl font-bold",children:"Clusters"}),u.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[u.jsxs("div",{className:"relative",children:[u.jsx(Pa,{className:"absolute top-2.5 left-2 h-4 w-4 opacity-60"}),u.jsx(xt,{value:e,onChange:W=>r(W.target.value),placeholder:"Search clusters",className:"w-64 pl-8"})]}),u.jsxs(fn,{open:s,onOpenChange:o,children:[u.jsx(Li,{asChild:!0,children:u.jsxs(Fe,{onClick:()=>o(!0),children:[u.jsx(lo,{className:"mr-2 h-4 w-4"}),"Create Cluster"]})}),u.jsxs(mn,{className:"sm:max-w-lg",children:[u.jsx(gn,{children:u.jsx(yn,{children:"Create Cluster"})}),u.jsx(yr,{...fe,children:u.jsxs("form",{className:"space-y-4",onSubmit:fe.handleSubmit(Oe),children:[u.jsx(yt,{control:fe.control,name:"name",render:({field:W})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Name"}),u.jsx(wt,{children:u.jsx(xt,{placeholder:"prod-cluster-eu-west-1",...W})}),u.jsx(mt,{})]})}),u.jsx(yt,{control:fe.control,name:"provider",render:({field:W})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Provider"}),u.jsx(wt,{children:u.jsx(xt,{placeholder:"aws / hetzner / baremetal",...W})}),u.jsx(mt,{})]})}),u.jsx(yt,{control:fe.control,name:"region",render:({field:W})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Region"}),u.jsx(wt,{children:u.jsx(xt,{placeholder:"eu-west-1",...W})}),u.jsx(mt,{})]})}),u.jsxs(Sn,{className:"gap-2",children:[u.jsx(Fe,{type:"button",variant:"outline",onClick:()=>o(!1),children:"Cancel"}),u.jsx(Fe,{type:"submit",disabled:He.isPending,children:He.isPending?"Creating…":"Create"})]})]})})]})]})]})]}),u.jsx("div",{className:"bg-background overflow-hidden rounded-2xl border shadow-sm",children:u.jsx("div",{className:"overflow-x-auto",children:u.jsxs(Fi,{children:[u.jsx(qi,{children:u.jsxs(an,{children:[u.jsx(At,{children:"Name"}),u.jsx(At,{children:"Provider"}),u.jsx(At,{children:"Region"}),u.jsx(At,{children:"Status"}),u.jsx(At,{children:"Summary"}),u.jsx(At,{className:"w-[320px] text-right",children:"Actions"})]})}),u.jsxs(Bi,{children:[ze.map(W=>u.jsxs(an,{children:[u.jsx(vt,{className:"font-medium",children:W.name}),u.jsx(vt,{children:W.provider}),u.jsx(vt,{children:W.region}),u.jsxs(vt,{children:[u.jsx(mve,{status:W.status}),W.last_error&&u.jsx("div",{className:"mt-1 text-xs text-red-500",children:el(W.last_error,80)})]}),u.jsxs(vt,{children:[u.jsx(gve,{c:W}),W.id&&u.jsx("code",{className:"text-muted-foreground mt-1 block text-xs",children:el(W.id,6)})]}),u.jsx(vt,{children:u.jsxs("div",{className:"flex flex-wrap justify-end gap-2",children:[u.jsxs(Fe,{variant:"ghost",size:"sm",onClick:()=>A(W),children:[u.jsx(_W,{className:"mr-1 h-4 w-4"})," Configure"]}),u.jsxs(Fe,{variant:"outline",size:"sm",onClick:()=>ie(W),children:[u.jsx(pu,{className:"mr-2 h-4 w-4"})," Edit"]}),u.jsx(Fe,{variant:"destructive",size:"sm",onClick:()=>W.id&&g(W.id),disabled:Ne.isPending&&m===W.id,children:Ne.isPending&&m===W.id?"Deleting…":"Delete"})]})})]},W.id)),ze.length===0&&u.jsx(an,{children:u.jsxs(vt,{colSpan:6,className:"text-muted-foreground py-10 text-center",children:[u.jsx(ew,{className:"mx-auto mb-2 h-6 w-6 opacity-60"}),"No clusters match your search."]})})]})]})})}),u.jsx(fn,{open:d,onOpenChange:p,children:u.jsxs(mn,{className:"sm:max-w-lg",children:[u.jsx(gn,{children:u.jsx(yn,{children:"Edit Cluster"})}),u.jsx(yr,{...ke,children:u.jsxs("form",{className:"space-y-4",onSubmit:ke.handleSubmit(W=>{b&&Ve.mutate({id:b,values:W})}),children:[u.jsx(yt,{control:ke.control,name:"name",render:({field:W})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Name"}),u.jsx(wt,{children:u.jsx(xt,{placeholder:"prod-cluster-eu-west-1",...W})}),u.jsx(mt,{})]})}),u.jsx(yt,{control:ke.control,name:"provider",render:({field:W})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Provider"}),u.jsx(wt,{children:u.jsx(xt,{placeholder:"aws / hetzner / baremetal",...W})}),u.jsx(mt,{})]})}),u.jsx(yt,{control:ke.control,name:"region",render:({field:W})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Region"}),u.jsx(wt,{children:u.jsx(xt,{placeholder:"eu-west-1",...W})}),u.jsx(mt,{})]})}),u.jsxs(Sn,{className:"gap-2",children:[u.jsx(Fe,{type:"button",variant:"outline",onClick:()=>p(!1),children:"Cancel"}),u.jsx(Fe,{type:"submit",disabled:Ve.isPending,children:Ve.isPending?"Saving…":"Save changes"})]})]})})]})}),u.jsx(fn,{open:!!E,onOpenChange:W=>!W&&A(null),children:u.jsxs(mn,{className:"max-h-[90vh] w-full max-w-3xl overflow-y-auto",children:[u.jsx(gn,{children:u.jsxs(yn,{children:["Configure Cluster",E?.name?`: ${E.name}`:""]})}),E&&u.jsxs("div",{className:"space-y-6 py-2",children:[u.jsxs("section",{className:"space-y-2 rounded-xl border p-4",children:[u.jsx("div",{className:"flex items-center justify-between gap-2",children:u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(KZ,{className:"h-4 w-4"}),u.jsx("h3",{className:"font-semibold text-sm",children:"Kubeconfig"})]}),u.jsx("p",{className:"text-muted-foreground text-xs",children:"Paste the kubeconfig for this cluster. It will be stored encrypted and never returned by the API."})]})}),u.jsx(hu,{value:ne,onChange:W=>de(W.target.value),rows:6,placeholder:`apiVersion: v1
|
||
clusters:
|
||
- cluster: ...`,className:"font-mono text-xs"}),u.jsxs("div",{className:"flex flex-wrap gap-2",children:[u.jsx(Fe,{size:"sm",onClick:De,disabled:le("kubeconfig"),children:le("kubeconfig")?"Saving…":"Save kubeconfig"}),u.jsx(Fe,{size:"sm",variant:"outline",onClick:Ge,disabled:le("kubeconfig"),children:"Clear kubeconfig"})]})]}),u.jsxs("section",{className:"space-y-2 rounded-xl border p-4",children:[u.jsxs("div",{className:"flex items-center justify-between gap-2",children:[u.jsxs("div",{children:[u.jsx("h3",{className:"font-semibold text-sm",children:"Captain Domain"}),u.jsx("p",{className:"text-muted-foreground text-xs",children:"Domain used for the AutoGlue captain endpoint."})]}),u.jsx("div",{className:"text-right text-xs",children:u.jsx("div",{className:"font-mono",children:E.captain_domain?E.captain_domain.domain_name:"Not attached"})})]}),u.jsxs("div",{className:"flex flex-col gap-2 md:flex-row md:items-end",children:[u.jsxs("div",{className:"flex-1",children:[u.jsx(xi,{className:"text-xs",children:"Domain"}),u.jsxs(Rn,{value:k,onValueChange:W=>{T(W),I("")},children:[u.jsx(_n,{className:"w-full",children:u.jsx(Tn,{placeholder:ce.isLoading?"Loading domains…":"Select domain"})}),u.jsx($n,{children:(ce.data??[]).map(W=>u.jsx(jt,{value:W.id,children:W.domain_name},W.id))})]}),u.jsx("p",{className:"text-muted-foreground mt-1 text-[11px]",children:"Once a domain is attached, control plane record sets for that domain will be available below."})]}),u.jsxs("div",{className:"flex gap-2",children:[u.jsx(Fe,{size:"sm",onClick:ft,disabled:le("captain")||ce.isLoading,children:le("captain")?"Attaching…":"Attach"}),u.jsx(Fe,{size:"sm",variant:"outline",onClick:Ot,disabled:le("captain")||!E.captain_domain,children:"Detach"})]})]})]}),k&&u.jsxs("section",{className:"space-y-2 rounded-xl border p-4",children:[u.jsxs("div",{className:"flex items-center justify-between gap-2",children:[u.jsxs("div",{children:[u.jsx("h3",{className:"font-semibold text-sm",children:"Control Plane Record Set"}),u.jsx("p",{className:"text-muted-foreground text-xs",children:"DNS record set used for the cluster control plane endpoint."})]}),u.jsx("div",{className:"text-right text-xs",children:u.jsx("div",{className:"font-mono",children:E.control_plane_record_set?E.control_plane_record_set.name:"Not attached"})})]}),u.jsxs("div",{className:"flex flex-col gap-2 md:flex-row md:items-end",children:[u.jsxs("div",{className:"flex-1",children:[u.jsx(xi,{className:"text-xs",children:"Record Set"}),u.jsxs(Rn,{value:M,onValueChange:W=>I(W),children:[u.jsx(_n,{className:"w-full",children:u.jsx(Tn,{placeholder:re.isLoading?"Loading record sets…":"Select record set"})}),u.jsx($n,{children:(re.data??[]).map(W=>u.jsxs(jt,{value:W.id,children:[W.name," · ",W.type]},W.id))})]})]}),u.jsxs("div",{className:"flex gap-2",children:[u.jsx(Fe,{size:"sm",onClick:Ft,disabled:le("recordset")||re.isLoading,children:le("recordset")?"Attaching…":"Attach"}),u.jsx(Fe,{size:"sm",variant:"outline",onClick:kt,disabled:le("recordset")||!E.control_plane_record_set,children:"Detach"})]})]})]}),u.jsxs("section",{className:"space-y-2 rounded-xl border p-4",children:[u.jsxs("div",{className:"flex items-center justify-between gap-2",children:[u.jsxs("div",{children:[u.jsx("h3",{className:"font-semibold text-sm",children:"Apps Load Balancer"}),u.jsx("p",{className:"text-muted-foreground text-xs",children:"Frontend load balancer for application traffic."})]}),u.jsx("div",{className:"text-right text-xs",children:u.jsx("div",{className:"font-mono",children:E.apps_load_balancer?E.apps_load_balancer.name:"Not attached"})})]}),u.jsxs("div",{className:"flex flex-col gap-2 md:flex-row md:items-end",children:[u.jsxs("div",{className:"flex-1",children:[u.jsx(xi,{className:"text-xs",children:"Apps Load Balancer"}),u.jsxs(Rn,{value:q,onValueChange:W=>G(W),children:[u.jsx(_n,{className:"w-full",children:u.jsx(Tn,{placeholder:Ke.isLoading?"Loading load balancers…":"Select apps LB"})}),u.jsx($n,{children:L.map(W=>u.jsxs(jt,{value:W.id,children:[W.name," · ",W.public_ip_address]},W.id))})]})]}),u.jsxs("div",{className:"flex gap-2",children:[u.jsx(Fe,{size:"sm",onClick:Jt,disabled:le("apps-lb")||Ke.isLoading,children:le("apps-lb")?"Attaching…":"Attach"}),u.jsx(Fe,{size:"sm",variant:"outline",onClick:Le,disabled:le("apps-lb")||!E.apps_load_balancer,children:"Detach"})]})]})]}),u.jsxs("section",{className:"space-y-2 rounded-xl border p-4",children:[u.jsxs("div",{className:"flex items-center justify-between gap-2",children:[u.jsxs("div",{children:[u.jsx("h3",{className:"font-semibold text-sm",children:"GlueOps / Control-plane Load Balancer"}),u.jsx("p",{className:"text-muted-foreground text-xs",children:"Load balancer for GlueOps/control-plane traffic."})]}),u.jsx("div",{className:"text-right text-xs",children:u.jsx("div",{className:"font-mono",children:E.glueops_load_balancer?E.glueops_load_balancer.name:"Not attached"})})]}),u.jsxs("div",{className:"flex flex-col gap-2 md:flex-row md:items-end",children:[u.jsxs("div",{className:"flex-1",children:[u.jsx(xi,{className:"text-xs",children:"GlueOps Load Balancer"}),u.jsxs(Rn,{value:K,onValueChange:W=>X(W),children:[u.jsx(_n,{className:"w-full",children:u.jsx(Tn,{placeholder:Ke.isLoading?"Loading load balancers…":"Select GlueOps LB"})}),u.jsx($n,{children:H.map(W=>u.jsxs(jt,{value:W.id,children:[W.name," · ",W.private_ip_address]},W.id))})]})]}),u.jsxs("div",{className:"flex gap-2",children:[u.jsx(Fe,{size:"sm",onClick:Lt,disabled:le("glueops-lb")||Ke.isLoading,children:le("glueops-lb")?"Attaching…":"Attach"}),u.jsx(Fe,{size:"sm",variant:"outline",onClick:Rt,disabled:le("glueops-lb")||!E.glueops_load_balancer,children:"Detach"})]})]})]}),u.jsxs("section",{className:"space-y-2 rounded-xl border p-4",children:[u.jsxs("div",{className:"flex items-center justify-between gap-2",children:[u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(L_,{className:"h-4 w-4"}),u.jsx("h3",{className:"font-semibold text-sm",children:"Bastion Server"})]}),u.jsx("p",{className:"text-muted-foreground text-xs",children:"SSH bastion used to reach the cluster nodes."})]}),u.jsx("div",{className:"text-right text-xs",children:u.jsx("div",{className:"font-mono",children:E.bastion_server?E.bastion_server.hostname??E.bastion_server.id:"Not attached"})})]}),u.jsxs("div",{className:"flex flex-col gap-2 md:flex-row md:items-end",children:[u.jsxs("div",{className:"flex-1",children:[u.jsx(xi,{className:"text-xs",children:"Bastion Server"}),u.jsxs(Rn,{value:z,onValueChange:W=>ee(W),children:[u.jsx(_n,{className:"w-full",children:u.jsx(Tn,{placeholder:ue.isLoading?"Loading servers…":"Select server"})}),u.jsx($n,{children:(ue.data??[]).map(W=>u.jsxs(jt,{value:W.id,children:[W.hostname??W.id," · ",W.private_ip_address]},W.id))})]})]}),u.jsxs("div",{className:"flex gap-2",children:[u.jsx(Fe,{size:"sm",onClick:V,disabled:le("bastion")||ue.isLoading,children:le("bastion")?"Attaching…":"Attach"}),u.jsx(Fe,{size:"sm",variant:"outline",onClick:Nn,disabled:le("bastion")||!E.bastion_server,children:"Detach"})]})]})]}),u.jsxs("section",{className:"space-y-2 rounded-xl border p-4",children:[u.jsx("div",{className:"flex items-center justify-between gap-2",children:u.jsxs("div",{children:[u.jsx("h3",{className:"font-semibold text-sm",children:"Node Pools"}),u.jsx("p",{className:"text-muted-foreground text-xs",children:"Attach node pools to this cluster. Each node pool may have its own labels, taints, and backing servers."})]})}),u.jsxs("div",{className:"flex flex-col gap-2 md:flex-row md:items-end",children:[u.jsxs("div",{className:"flex-1",children:[u.jsx(xi,{className:"text-xs",children:"Available Node Pools"}),u.jsxs(Rn,{value:oe,onValueChange:W=>Q(W),children:[u.jsx(_n,{className:"w-full",children:u.jsx(Tn,{placeholder:_e.isLoading?"Loading node pools…":"Select node pool"})}),u.jsx($n,{children:(_e.data??[]).map(W=>u.jsxs(jt,{value:W.id,children:[W.name," · ",W.role]},W.id))})]})]}),u.jsx("div",{className:"flex gap-2",children:u.jsx(Fe,{size:"sm",onClick:cn,disabled:le("nodepool")||_e.isLoading,children:le("nodepool")?"Attaching…":"Attach"})})]}),u.jsxs("div",{className:"mt-3 space-y-1",children:[u.jsx(xi,{className:"text-xs",children:"Attached Node Pools"}),E.node_pools&&E.node_pools.length>0?u.jsx("div",{className:"divide-border mt-1 rounded-md border",children:E.node_pools.map(W=>u.jsxs("div",{className:"flex items-center justify-between gap-3 px-3 py-2 text-xs",children:[u.jsxs("div",{className:"flex flex-col",children:[u.jsx("span",{className:"font-medium",children:W.name}),u.jsxs("span",{className:"text-muted-foreground",children:["role: ",W.role," · servers: ",W.servers?.length??0]})]}),u.jsx(Fe,{size:"sm",variant:"outline",onClick:()=>W.id&&ve(W.id),disabled:le("nodepool"),children:"Detach"})]},W.id))}):u.jsx("p",{className:"text-muted-foreground mt-1 text-xs",children:"No node pools attached to this cluster yet."})]})]}),u.jsx(Sn,{className:"mt-2",children:u.jsx(Fe,{variant:"outline",onClick:()=>A(null),children:"Close"})})]})]})}),u.jsx(fn,{open:!!m,onOpenChange:W=>!W&&g(null),children:u.jsxs(mn,{className:"sm:max-w-md",children:[u.jsx(gn,{children:u.jsx(yn,{children:"Delete cluster"})}),u.jsx("p",{className:"text-muted-foreground text-sm",children:"This action cannot be undone. Are you sure you want to delete this cluster?"}),u.jsxs(Sn,{className:"gap-2",children:[u.jsx(Fe,{variant:"outline",onClick:()=>g(null),children:"Cancel"}),u.jsx(Fe,{variant:"destructive",onClick:()=>m&&Ne.mutate(m),disabled:Ne.isPending,children:Ne.isPending?"Deleting…":"Delete"})]})]})}),u.jsx("pre",{children:JSON.stringify(je.data,null,2)})]})},Ym=ste(),Qm={listCredentials:()=>ut(async()=>await Ym.listCredentials()),createCredential:async e=>ut(async()=>await Ym.createCredential({dtoCreateCredentialRequest:e})),getCredential:async e=>ut(async()=>await Ym.getCredential({id:e})),deleteCredential:async e=>ut(async()=>{await Ym.deleteCredential({id:e})}),updateCredential:async(e,r)=>ut(async()=>await Ym.updateCredential({id:e,dtoUpdateCredentialRequest:r})),revealCredential:async e=>ut(async()=>await Ym.revealCredential({id:e}))};var vve=Symbol("radix.slottable");function xve(e){const r=({children:s})=>u.jsx(u.Fragment,{children:s});return r.displayName=`${e}.Slottable`,r.__radixId=vve,r}var sq="AlertDialog",[bve]=al(sq,[AL]),vu=AL(),iq=e=>{const{__scopeAlertDialog:r,...s}=e,o=vu(r);return u.jsx(_C,{...o,...s,modal:!0})};iq.displayName=sq;var wve="AlertDialogTrigger",aq=R.forwardRef((e,r)=>{const{__scopeAlertDialog:s,...o}=e,d=vu(s);return u.jsx(BL,{...d,...o,ref:r})});aq.displayName=wve;var Sve="AlertDialogPortal",oq=e=>{const{__scopeAlertDialog:r,...s}=e,o=vu(r);return u.jsx($C,{...o,...s})};oq.displayName=Sve;var Eve="AlertDialogOverlay",lq=R.forwardRef((e,r)=>{const{__scopeAlertDialog:s,...o}=e,d=vu(s);return u.jsx(NC,{...d,...o,ref:r})});lq.displayName=Eve;var yg="AlertDialogContent",[jve,Cve]=bve(yg),Ave=xve("AlertDialogContent"),cq=R.forwardRef((e,r)=>{const{__scopeAlertDialog:s,children:o,...d}=e,p=vu(s),m=R.useRef(null),g=Ln(r,m),b=R.useRef(null);return u.jsx(aae,{contentName:yg,titleName:uq,docsSlug:"alert-dialog",children:u.jsx(jve,{scope:s,cancelRef:b,children:u.jsxs(DC,{role:"alertdialog",...p,...d,ref:g,onOpenAutoFocus:$t(d.onOpenAutoFocus,S=>{S.preventDefault(),b.current?.focus({preventScroll:!0})}),onPointerDownOutside:S=>S.preventDefault(),onInteractOutside:S=>S.preventDefault(),children:[u.jsx(Ave,{children:o}),u.jsx(kve,{contentRef:m})]})})})});cq.displayName=yg;var uq="AlertDialogTitle",dq=R.forwardRef((e,r)=>{const{__scopeAlertDialog:s,...o}=e,d=vu(s);return u.jsx(s2,{...d,...o,ref:r})});dq.displayName=uq;var hq="AlertDialogDescription",pq=R.forwardRef((e,r)=>{const{__scopeAlertDialog:s,...o}=e,d=vu(s);return u.jsx(i2,{...d,...o,ref:r})});pq.displayName=hq;var Ove="AlertDialogAction",fq=R.forwardRef((e,r)=>{const{__scopeAlertDialog:s,...o}=e,d=vu(s);return u.jsx(cw,{...d,...o,ref:r})});fq.displayName=Ove;var mq="AlertDialogCancel",gq=R.forwardRef((e,r)=>{const{__scopeAlertDialog:s,...o}=e,{cancelRef:d}=Cve(mq,s),p=vu(s),m=Ln(r,d);return u.jsx(cw,{...p,...o,ref:m})});gq.displayName=mq;var kve=({contentRef:e})=>{const r=`\`${yg}\` requires a description for the component to be accessible for screen reader users.
|
||
|
||
You can add a description to the \`${yg}\` by passing a \`${hq}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
||
|
||
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${yg}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
||
|
||
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return R.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(r)},[r,e]),null},Rve=iq,Tve=aq,_ve=oq,$ve=lq,Nve=cq,Dve=fq,Pve=gq,Mve=dq,Ive=pq;function rC({...e}){return u.jsx(Rve,{"data-slot":"alert-dialog",...e})}function sC({...e}){return u.jsx(Tve,{"data-slot":"alert-dialog-trigger",...e})}function zve({...e}){return u.jsx(_ve,{"data-slot":"alert-dialog-portal",...e})}function Lve({className:e,...r}){return u.jsx($ve,{"data-slot":"alert-dialog-overlay",className:ht("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/50",e),...r})}function iC({className:e,...r}){return u.jsxs(zve,{children:[u.jsx(Lve,{}),u.jsx(Nve,{"data-slot":"alert-dialog-content",className:ht("bg-background 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)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",e),...r})]})}function aC({className:e,...r}){return u.jsx("div",{"data-slot":"alert-dialog-header",className:ht("flex flex-col gap-2 text-center sm:text-left",e),...r})}function oC({className:e,...r}){return u.jsx("div",{"data-slot":"alert-dialog-footer",className:ht("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...r})}function lC({className:e,...r}){return u.jsx(Mve,{"data-slot":"alert-dialog-title",className:ht("text-lg font-semibold",e),...r})}function cC({className:e,...r}){return u.jsx(Ive,{"data-slot":"alert-dialog-description",className:ht("text-muted-foreground text-sm",e),...r})}function uC({className:e,...r}){return u.jsx(Dve,{className:ht(K_(),e),...r})}function dC({className:e,...r}){return u.jsx(Pve,{className:ht(K_({variant:"outline"}),e),...r})}var gT="rovingFocusGroup.onEntryFocus",Fve={bubbles:!1,cancelable:!0},vw="RovingFocusGroup",[S_,yq,qve]=s$(vw),[Bve,vq]=al(vw,[qve]),[Uve,Kve]=Bve(vw),xq=R.forwardRef((e,r)=>u.jsx(S_.Provider,{scope:e.__scopeRovingFocusGroup,children:u.jsx(S_.Slot,{scope:e.__scopeRovingFocusGroup,children:u.jsx(Vve,{...e,ref:r})})}));xq.displayName=vw;var Vve=R.forwardRef((e,r)=>{const{__scopeRovingFocusGroup:s,orientation:o,loop:d=!1,dir:p,currentTabStopId:m,defaultCurrentTabStopId:g,onCurrentTabStopIdChange:b,onEntryFocus:S,preventScrollOnEntryFocus:E=!1,...A}=e,k=R.useRef(null),T=Ln(r,k),M=i$(p),[I,q]=qd({prop:m,defaultProp:g??null,onChange:b,caller:vw}),[G,K]=R.useState(!1),X=tl(S),z=yq(s),ee=R.useRef(!1),[oe,Q]=R.useState(0);return R.useEffect(()=>{const ne=k.current;if(ne)return ne.addEventListener(gT,X),()=>ne.removeEventListener(gT,X)},[X]),u.jsx(Uve,{scope:s,orientation:o,dir:M,loop:d,currentTabStopId:I,onItemFocus:R.useCallback(ne=>q(ne),[q]),onItemShiftTab:R.useCallback(()=>K(!0),[]),onFocusableItemAdd:R.useCallback(()=>Q(ne=>ne+1),[]),onFocusableItemRemove:R.useCallback(()=>Q(ne=>ne-1),[]),children:u.jsx(Cn.div,{tabIndex:G||oe===0?-1:0,"data-orientation":o,...A,ref:T,style:{outline:"none",...e.style},onMouseDown:$t(e.onMouseDown,()=>{ee.current=!0}),onFocus:$t(e.onFocus,ne=>{const de=!ee.current;if(ne.target===ne.currentTarget&&de&&!G){const Ce=new CustomEvent(gT,Fve);if(ne.currentTarget.dispatchEvent(Ce),!Ce.defaultPrevented){const xe=z().filter(ce=>ce.focusable),le=xe.find(ce=>ce.active),be=xe.find(ce=>ce.id===I),Ke=[le,be,...xe].filter(Boolean).map(ce=>ce.ref.current);Sq(Ke,E)}}ee.current=!1}),onBlur:$t(e.onBlur,()=>K(!1))})})}),bq="RovingFocusGroupItem",wq=R.forwardRef((e,r)=>{const{__scopeRovingFocusGroup:s,focusable:o=!0,active:d=!1,tabStopId:p,children:m,...g}=e,b=Vs(),S=p||b,E=Kve(bq,s),A=E.currentTabStopId===S,k=yq(s),{onFocusableItemAdd:T,onFocusableItemRemove:M,currentTabStopId:I}=E;return R.useEffect(()=>{if(o)return T(),()=>M()},[o,T,M]),u.jsx(S_.ItemSlot,{scope:s,id:S,focusable:o,active:d,children:u.jsx(Cn.span,{tabIndex:A?0:-1,"data-orientation":E.orientation,...g,ref:r,onMouseDown:$t(e.onMouseDown,q=>{o?E.onItemFocus(S):q.preventDefault()}),onFocus:$t(e.onFocus,()=>E.onItemFocus(S)),onKeyDown:$t(e.onKeyDown,q=>{if(q.key==="Tab"&&q.shiftKey){E.onItemShiftTab();return}if(q.target!==q.currentTarget)return;const G=Xve(q,E.orientation,E.dir);if(G!==void 0){if(q.metaKey||q.ctrlKey||q.altKey||q.shiftKey)return;q.preventDefault();let X=k().filter(z=>z.focusable).map(z=>z.ref.current);if(G==="last")X.reverse();else if(G==="prev"||G==="next"){G==="prev"&&X.reverse();const z=X.indexOf(q.currentTarget);X=E.loop?Yve(X,z+1):X.slice(z+1)}setTimeout(()=>Sq(X))}}),children:typeof m=="function"?m({isCurrentTabStop:A,hasTabStop:I!=null}):m})})});wq.displayName=bq;var Hve={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Gve(e,r){return r!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Xve(e,r,s){const o=Gve(e.key,s);if(!(r==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(r==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return Hve[o]}function Sq(e,r=!1){const s=document.activeElement;for(const o of e)if(o===s||(o.focus({preventScroll:r}),document.activeElement!==s))return}function Yve(e,r){return e.map((s,o)=>e[(r+o)%e.length])}var Zve=xq,Wve=wq;function Jve(e){const r=Qve(e),s=R.forwardRef((o,d)=>{const{children:p,...m}=o,g=R.Children.toArray(p),b=g.find(txe);if(b){const S=b.props.children,E=g.map(A=>A===b?R.Children.count(S)>1?R.Children.only(null):R.isValidElement(S)?S.props.children:null:A);return u.jsx(r,{...m,ref:d,children:R.isValidElement(S)?R.cloneElement(S,void 0,E):null})}return u.jsx(r,{...m,ref:d,children:p})});return s.displayName=`${e}.Slot`,s}function Qve(e){const r=R.forwardRef((s,o)=>{const{children:d,...p}=s;if(R.isValidElement(d)){const m=rxe(d),g=nxe(p,d.props);return d.type!==R.Fragment&&(g.ref=o?zi(o,m):m),R.cloneElement(d,g)}return R.Children.count(d)>1?R.Children.only(null):null});return r.displayName=`${e}.SlotClone`,r}var exe=Symbol("radix.slottable");function txe(e){return R.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===exe}function nxe(e,r){const s={...r};for(const o in r){const d=e[o],p=r[o];/^on[A-Z]/.test(o)?d&&p?s[o]=(...g)=>{const b=p(...g);return d(...g),b}:d&&(s[o]=d):o==="style"?s[o]={...d,...p}:o==="className"&&(s[o]=[d,p].filter(Boolean).join(" "))}return{...e,...s}}function rxe(e){let r=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning;return s?e.ref:(r=Object.getOwnPropertyDescriptor(e,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning,s?e.props.ref:e.props.ref||e.ref)}var E_=["Enter"," "],sxe=["ArrowDown","PageUp","Home"],Eq=["ArrowUp","PageDown","End"],ixe=[...sxe,...Eq],axe={ltr:[...E_,"ArrowRight"],rtl:[...E_,"ArrowLeft"]},oxe={ltr:["ArrowLeft"],rtl:["ArrowRight"]},xw="Menu",[Jb,lxe,cxe]=s$(xw),[Mp,jq]=al(xw,[cxe,Hd,vq]),WC=Hd(),Cq=vq(),[uxe,Ip]=Mp(xw),[dxe,bw]=Mp(xw),Aq=e=>{const{__scopeMenu:r,open:s=!1,children:o,dir:d,onOpenChange:p,modal:m=!0}=e,g=WC(r),[b,S]=R.useState(null),E=R.useRef(!1),A=tl(p),k=i$(d);return R.useEffect(()=>{const T=()=>{E.current=!0,document.addEventListener("pointerdown",M,{capture:!0,once:!0}),document.addEventListener("pointermove",M,{capture:!0,once:!0})},M=()=>E.current=!1;return document.addEventListener("keydown",T,{capture:!0}),()=>{document.removeEventListener("keydown",T,{capture:!0}),document.removeEventListener("pointerdown",M,{capture:!0}),document.removeEventListener("pointermove",M,{capture:!0})}},[]),u.jsx(SC,{...g,children:u.jsx(uxe,{scope:r,open:s,onOpenChange:A,content:b,onContentChange:S,children:u.jsx(dxe,{scope:r,onClose:R.useCallback(()=>A(!1),[A]),isUsingKeyboardRef:E,dir:k,modal:m,children:o})})})};Aq.displayName=xw;var hxe="MenuAnchor",o$=R.forwardRef((e,r)=>{const{__scopeMenu:s,...o}=e,d=WC(s);return u.jsx(rw,{...d,...o,ref:r})});o$.displayName=hxe;var l$="MenuPortal",[pxe,Oq]=Mp(l$,{forceMount:void 0}),kq=e=>{const{__scopeMenu:r,forceMount:s,children:o,container:d}=e,p=Ip(l$,r);return u.jsx(pxe,{scope:r,forceMount:s,children:u.jsx(co,{present:s||p.open,children:u.jsx(_g,{asChild:!0,container:d,children:o})})})};kq.displayName=l$;var ao="MenuContent",[fxe,c$]=Mp(ao),Rq=R.forwardRef((e,r)=>{const s=Oq(ao,e.__scopeMenu),{forceMount:o=s.forceMount,...d}=e,p=Ip(ao,e.__scopeMenu),m=bw(ao,e.__scopeMenu);return u.jsx(Jb.Provider,{scope:e.__scopeMenu,children:u.jsx(co,{present:o||p.open,children:u.jsx(Jb.Slot,{scope:e.__scopeMenu,children:m.modal?u.jsx(mxe,{...d,ref:r}):u.jsx(gxe,{...d,ref:r})})})})}),mxe=R.forwardRef((e,r)=>{const s=Ip(ao,e.__scopeMenu),o=R.useRef(null),d=Ln(r,o);return R.useEffect(()=>{const p=o.current;if(p)return RC(p)},[]),u.jsx(u$,{...e,ref:d,trapFocus:s.open,disableOutsidePointerEvents:s.open,disableOutsideScroll:!0,onFocusOutside:$t(e.onFocusOutside,p=>p.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>s.onOpenChange(!1)})}),gxe=R.forwardRef((e,r)=>{const s=Ip(ao,e.__scopeMenu);return u.jsx(u$,{...e,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>s.onOpenChange(!1)})}),yxe=Jve("MenuContent.ScrollLock"),u$=R.forwardRef((e,r)=>{const{__scopeMenu:s,loop:o=!1,trapFocus:d,onOpenAutoFocus:p,onCloseAutoFocus:m,disableOutsidePointerEvents:g,onEntryFocus:b,onEscapeKeyDown:S,onPointerDownOutside:E,onFocusOutside:A,onInteractOutside:k,onDismiss:T,disableOutsideScroll:M,...I}=e,q=Ip(ao,s),G=bw(ao,s),K=WC(s),X=Cq(s),z=lxe(s),[ee,oe]=R.useState(null),Q=R.useRef(null),ne=Ln(r,Q,q.onContentChange),de=R.useRef(0),Ce=R.useRef(""),xe=R.useRef(0),le=R.useRef(null),be=R.useRef("right"),je=R.useRef(0),Ke=M?lw:R.Fragment,ce=M?{as:yxe,allowPinchZoom:!0}:void 0,re=_e=>{const fe=Ce.current+_e,He=z().filter(ze=>!ze.disabled),Oe=document.activeElement,ke=He.find(ze=>ze.ref.current===Oe)?.textValue,Ve=He.map(ze=>ze.textValue),ie=Rxe(Ve,fe,ke),Ne=He.find(ze=>ze.textValue===ie)?.ref.current;(function ze(tt){Ce.current=tt,window.clearTimeout(de.current),tt!==""&&(de.current=window.setTimeout(()=>ze(""),1e3))})(fe),Ne&&setTimeout(()=>Ne.focus())};R.useEffect(()=>()=>window.clearTimeout(de.current),[]),OC();const ue=R.useCallback(_e=>be.current===le.current?.side&&_xe(_e,le.current?.area),[]);return u.jsx(fxe,{scope:s,searchRef:Ce,onItemEnter:R.useCallback(_e=>{ue(_e)&&_e.preventDefault()},[ue]),onItemLeave:R.useCallback(_e=>{ue(_e)||(Q.current?.focus(),oe(null))},[ue]),onTriggerLeave:R.useCallback(_e=>{ue(_e)&&_e.preventDefault()},[ue]),pointerGraceTimerRef:xe,onPointerGraceIntentChange:R.useCallback(_e=>{le.current=_e},[]),children:u.jsx(Ke,{...ce,children:u.jsx(ow,{asChild:!0,trapped:d,onMountAutoFocus:$t(p,_e=>{_e.preventDefault(),Q.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:m,children:u.jsx(kg,{asChild:!0,disableOutsidePointerEvents:g,onEscapeKeyDown:S,onPointerDownOutside:E,onFocusOutside:A,onInteractOutside:k,onDismiss:T,children:u.jsx(Zve,{asChild:!0,...X,dir:G.dir,orientation:"vertical",loop:o,currentTabStopId:ee,onCurrentTabStopIdChange:oe,onEntryFocus:$t(b,_e=>{G.isUsingKeyboardRef.current||_e.preventDefault()}),preventScrollOnEntryFocus:!0,children:u.jsx(EC,{role:"menu","aria-orientation":"vertical","data-state":Vq(q.open),"data-radix-menu-content":"",dir:G.dir,...K,...I,ref:ne,style:{outline:"none",...I.style},onKeyDown:$t(I.onKeyDown,_e=>{const He=_e.target.closest("[data-radix-menu-content]")===_e.currentTarget,Oe=_e.ctrlKey||_e.altKey||_e.metaKey,ke=_e.key.length===1;He&&(_e.key==="Tab"&&_e.preventDefault(),!Oe&&ke&&re(_e.key));const Ve=Q.current;if(_e.target!==Ve||!ixe.includes(_e.key))return;_e.preventDefault();const Ne=z().filter(ze=>!ze.disabled).map(ze=>ze.ref.current);Eq.includes(_e.key)&&Ne.reverse(),Oxe(Ne)}),onBlur:$t(e.onBlur,_e=>{_e.currentTarget.contains(_e.target)||(window.clearTimeout(de.current),Ce.current="")}),onPointerMove:$t(e.onPointerMove,Qb(_e=>{const fe=_e.target,He=je.current!==_e.clientX;if(_e.currentTarget.contains(fe)&&He){const Oe=_e.clientX>je.current?"right":"left";be.current=Oe,je.current=_e.clientX}}))})})})})})})});Rq.displayName=ao;var vxe="MenuGroup",d$=R.forwardRef((e,r)=>{const{__scopeMenu:s,...o}=e;return u.jsx(Cn.div,{role:"group",...o,ref:r})});d$.displayName=vxe;var xxe="MenuLabel",Tq=R.forwardRef((e,r)=>{const{__scopeMenu:s,...o}=e;return u.jsx(Cn.div,{...o,ref:r})});Tq.displayName=xxe;var hC="MenuItem",O3="menu.itemSelect",JC=R.forwardRef((e,r)=>{const{disabled:s=!1,onSelect:o,...d}=e,p=R.useRef(null),m=bw(hC,e.__scopeMenu),g=c$(hC,e.__scopeMenu),b=Ln(r,p),S=R.useRef(!1),E=()=>{const A=p.current;if(!s&&A){const k=new CustomEvent(O3,{bubbles:!0,cancelable:!0});A.addEventListener(O3,T=>o?.(T),{once:!0}),Tz(A,k),k.defaultPrevented?S.current=!1:m.onClose()}};return u.jsx(_q,{...d,ref:b,disabled:s,onClick:$t(e.onClick,E),onPointerDown:A=>{e.onPointerDown?.(A),S.current=!0},onPointerUp:$t(e.onPointerUp,A=>{S.current||A.currentTarget?.click()}),onKeyDown:$t(e.onKeyDown,A=>{const k=g.searchRef.current!=="";s||k&&A.key===" "||E_.includes(A.key)&&(A.currentTarget.click(),A.preventDefault())})})});JC.displayName=hC;var _q=R.forwardRef((e,r)=>{const{__scopeMenu:s,disabled:o=!1,textValue:d,...p}=e,m=c$(hC,s),g=Cq(s),b=R.useRef(null),S=Ln(r,b),[E,A]=R.useState(!1),[k,T]=R.useState("");return R.useEffect(()=>{const M=b.current;M&&T((M.textContent??"").trim())},[p.children]),u.jsx(Jb.ItemSlot,{scope:s,disabled:o,textValue:d??k,children:u.jsx(Wve,{asChild:!0,...g,focusable:!o,children:u.jsx(Cn.div,{role:"menuitem","data-highlighted":E?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...p,ref:S,onPointerMove:$t(e.onPointerMove,Qb(M=>{o?m.onItemLeave(M):(m.onItemEnter(M),M.defaultPrevented||M.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:$t(e.onPointerLeave,Qb(M=>m.onItemLeave(M))),onFocus:$t(e.onFocus,()=>A(!0)),onBlur:$t(e.onBlur,()=>A(!1))})})})}),bxe="MenuCheckboxItem",$q=R.forwardRef((e,r)=>{const{checked:s=!1,onCheckedChange:o,...d}=e;return u.jsx(Iq,{scope:e.__scopeMenu,checked:s,children:u.jsx(JC,{role:"menuitemcheckbox","aria-checked":pC(s)?"mixed":s,...d,ref:r,"data-state":p$(s),onSelect:$t(d.onSelect,()=>o?.(pC(s)?!0:!s),{checkForDefaultPrevented:!1})})})});$q.displayName=bxe;var Nq="MenuRadioGroup",[wxe,Sxe]=Mp(Nq,{value:void 0,onValueChange:()=>{}}),Dq=R.forwardRef((e,r)=>{const{value:s,onValueChange:o,...d}=e,p=tl(o);return u.jsx(wxe,{scope:e.__scopeMenu,value:s,onValueChange:p,children:u.jsx(d$,{...d,ref:r})})});Dq.displayName=Nq;var Pq="MenuRadioItem",Mq=R.forwardRef((e,r)=>{const{value:s,...o}=e,d=Sxe(Pq,e.__scopeMenu),p=s===d.value;return u.jsx(Iq,{scope:e.__scopeMenu,checked:p,children:u.jsx(JC,{role:"menuitemradio","aria-checked":p,...o,ref:r,"data-state":p$(p),onSelect:$t(o.onSelect,()=>d.onValueChange?.(s),{checkForDefaultPrevented:!1})})})});Mq.displayName=Pq;var h$="MenuItemIndicator",[Iq,Exe]=Mp(h$,{checked:!1}),zq=R.forwardRef((e,r)=>{const{__scopeMenu:s,forceMount:o,...d}=e,p=Exe(h$,s);return u.jsx(co,{present:o||pC(p.checked)||p.checked===!0,children:u.jsx(Cn.span,{...d,ref:r,"data-state":p$(p.checked)})})});zq.displayName=h$;var jxe="MenuSeparator",Lq=R.forwardRef((e,r)=>{const{__scopeMenu:s,...o}=e;return u.jsx(Cn.div,{role:"separator","aria-orientation":"horizontal",...o,ref:r})});Lq.displayName=jxe;var Cxe="MenuArrow",Fq=R.forwardRef((e,r)=>{const{__scopeMenu:s,...o}=e,d=WC(s);return u.jsx(jC,{...d,...o,ref:r})});Fq.displayName=Cxe;var Axe="MenuSub",[E0e,qq]=Mp(Axe),Ab="MenuSubTrigger",Bq=R.forwardRef((e,r)=>{const s=Ip(Ab,e.__scopeMenu),o=bw(Ab,e.__scopeMenu),d=qq(Ab,e.__scopeMenu),p=c$(Ab,e.__scopeMenu),m=R.useRef(null),{pointerGraceTimerRef:g,onPointerGraceIntentChange:b}=p,S={__scopeMenu:e.__scopeMenu},E=R.useCallback(()=>{m.current&&window.clearTimeout(m.current),m.current=null},[]);return R.useEffect(()=>E,[E]),R.useEffect(()=>{const A=g.current;return()=>{window.clearTimeout(A),b(null)}},[g,b]),u.jsx(o$,{asChild:!0,...S,children:u.jsx(_q,{id:d.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":d.contentId,"data-state":Vq(s.open),...e,ref:zi(r,d.onTriggerChange),onClick:A=>{e.onClick?.(A),!(e.disabled||A.defaultPrevented)&&(A.currentTarget.focus(),s.open||s.onOpenChange(!0))},onPointerMove:$t(e.onPointerMove,Qb(A=>{p.onItemEnter(A),!A.defaultPrevented&&!e.disabled&&!s.open&&!m.current&&(p.onPointerGraceIntentChange(null),m.current=window.setTimeout(()=>{s.onOpenChange(!0),E()},100))})),onPointerLeave:$t(e.onPointerLeave,Qb(A=>{E();const k=s.content?.getBoundingClientRect();if(k){const T=s.content?.dataset.side,M=T==="right",I=M?-5:5,q=k[M?"left":"right"],G=k[M?"right":"left"];p.onPointerGraceIntentChange({area:[{x:A.clientX+I,y:A.clientY},{x:q,y:k.top},{x:G,y:k.top},{x:G,y:k.bottom},{x:q,y:k.bottom}],side:T}),window.clearTimeout(g.current),g.current=window.setTimeout(()=>p.onPointerGraceIntentChange(null),300)}else{if(p.onTriggerLeave(A),A.defaultPrevented)return;p.onPointerGraceIntentChange(null)}})),onKeyDown:$t(e.onKeyDown,A=>{const k=p.searchRef.current!=="";e.disabled||k&&A.key===" "||axe[o.dir].includes(A.key)&&(s.onOpenChange(!0),s.content?.focus(),A.preventDefault())})})})});Bq.displayName=Ab;var Uq="MenuSubContent",Kq=R.forwardRef((e,r)=>{const s=Oq(ao,e.__scopeMenu),{forceMount:o=s.forceMount,...d}=e,p=Ip(ao,e.__scopeMenu),m=bw(ao,e.__scopeMenu),g=qq(Uq,e.__scopeMenu),b=R.useRef(null),S=Ln(r,b);return u.jsx(Jb.Provider,{scope:e.__scopeMenu,children:u.jsx(co,{present:o||p.open,children:u.jsx(Jb.Slot,{scope:e.__scopeMenu,children:u.jsx(u$,{id:g.contentId,"aria-labelledby":g.triggerId,...d,ref:S,align:"start",side:m.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:E=>{m.isUsingKeyboardRef.current&&b.current?.focus(),E.preventDefault()},onCloseAutoFocus:E=>E.preventDefault(),onFocusOutside:$t(e.onFocusOutside,E=>{E.target!==g.trigger&&p.onOpenChange(!1)}),onEscapeKeyDown:$t(e.onEscapeKeyDown,E=>{m.onClose(),E.preventDefault()}),onKeyDown:$t(e.onKeyDown,E=>{const A=E.currentTarget.contains(E.target),k=oxe[m.dir].includes(E.key);A&&k&&(p.onOpenChange(!1),g.trigger?.focus(),E.preventDefault())})})})})})});Kq.displayName=Uq;function Vq(e){return e?"open":"closed"}function pC(e){return e==="indeterminate"}function p$(e){return pC(e)?"indeterminate":e?"checked":"unchecked"}function Oxe(e){const r=document.activeElement;for(const s of e)if(s===r||(s.focus(),document.activeElement!==r))return}function kxe(e,r){return e.map((s,o)=>e[(r+o)%e.length])}function Rxe(e,r,s){const d=r.length>1&&Array.from(r).every(S=>S===r[0])?r[0]:r,p=s?e.indexOf(s):-1;let m=kxe(e,Math.max(p,0));d.length===1&&(m=m.filter(S=>S!==s));const b=m.find(S=>S.toLowerCase().startsWith(d.toLowerCase()));return b!==s?b:void 0}function Txe(e,r){const{x:s,y:o}=e;let d=!1;for(let p=0,m=r.length-1;p<r.length;m=p++){const g=r[p],b=r[m],S=g.x,E=g.y,A=b.x,k=b.y;E>o!=k>o&&s<(A-S)*(o-E)/(k-E)+S&&(d=!d)}return d}function _xe(e,r){if(!r)return!1;const s={x:e.clientX,y:e.clientY};return Txe(s,r)}function Qb(e){return r=>r.pointerType==="mouse"?e(r):void 0}var $xe=Aq,Nxe=o$,Dxe=kq,Pxe=Rq,Mxe=d$,Ixe=Tq,zxe=JC,Lxe=$q,Fxe=Dq,qxe=Mq,Bxe=zq,Uxe=Lq,Kxe=Fq,Vxe=Bq,Hxe=Kq,QC="DropdownMenu",[Gxe]=al(QC,[jq]),Ki=jq(),[Xxe,Hq]=Gxe(QC),Gq=e=>{const{__scopeDropdownMenu:r,children:s,dir:o,open:d,defaultOpen:p,onOpenChange:m,modal:g=!0}=e,b=Ki(r),S=R.useRef(null),[E,A]=qd({prop:d,defaultProp:p??!1,onChange:m,caller:QC});return u.jsx(Xxe,{scope:r,triggerId:Vs(),triggerRef:S,contentId:Vs(),open:E,onOpenChange:A,onOpenToggle:R.useCallback(()=>A(k=>!k),[A]),modal:g,children:u.jsx($xe,{...b,open:E,onOpenChange:A,dir:o,modal:g,children:s})})};Gq.displayName=QC;var Xq="DropdownMenuTrigger",Yq=R.forwardRef((e,r)=>{const{__scopeDropdownMenu:s,disabled:o=!1,...d}=e,p=Hq(Xq,s),m=Ki(s);return u.jsx(Nxe,{asChild:!0,...m,children:u.jsx(Cn.button,{type:"button",id:p.triggerId,"aria-haspopup":"menu","aria-expanded":p.open,"aria-controls":p.open?p.contentId:void 0,"data-state":p.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...d,ref:zi(r,p.triggerRef),onPointerDown:$t(e.onPointerDown,g=>{!o&&g.button===0&&g.ctrlKey===!1&&(p.onOpenToggle(),p.open||g.preventDefault())}),onKeyDown:$t(e.onKeyDown,g=>{o||(["Enter"," "].includes(g.key)&&p.onOpenToggle(),g.key==="ArrowDown"&&p.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(g.key)&&g.preventDefault())})})})});Yq.displayName=Xq;var Yxe="DropdownMenuPortal",Zq=e=>{const{__scopeDropdownMenu:r,...s}=e,o=Ki(r);return u.jsx(Dxe,{...o,...s})};Zq.displayName=Yxe;var Wq="DropdownMenuContent",Jq=R.forwardRef((e,r)=>{const{__scopeDropdownMenu:s,...o}=e,d=Hq(Wq,s),p=Ki(s),m=R.useRef(!1);return u.jsx(Pxe,{id:d.contentId,"aria-labelledby":d.triggerId,...p,...o,ref:r,onCloseAutoFocus:$t(e.onCloseAutoFocus,g=>{m.current||d.triggerRef.current?.focus(),m.current=!1,g.preventDefault()}),onInteractOutside:$t(e.onInteractOutside,g=>{const b=g.detail.originalEvent,S=b.button===0&&b.ctrlKey===!0,E=b.button===2||S;(!d.modal||E)&&(m.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)"}})});Jq.displayName=Wq;var Zxe="DropdownMenuGroup",Wxe=R.forwardRef((e,r)=>{const{__scopeDropdownMenu:s,...o}=e,d=Ki(s);return u.jsx(Mxe,{...d,...o,ref:r})});Wxe.displayName=Zxe;var Jxe="DropdownMenuLabel",Qxe=R.forwardRef((e,r)=>{const{__scopeDropdownMenu:s,...o}=e,d=Ki(s);return u.jsx(Ixe,{...d,...o,ref:r})});Qxe.displayName=Jxe;var ebe="DropdownMenuItem",Qq=R.forwardRef((e,r)=>{const{__scopeDropdownMenu:s,...o}=e,d=Ki(s);return u.jsx(zxe,{...d,...o,ref:r})});Qq.displayName=ebe;var tbe="DropdownMenuCheckboxItem",nbe=R.forwardRef((e,r)=>{const{__scopeDropdownMenu:s,...o}=e,d=Ki(s);return u.jsx(Lxe,{...d,...o,ref:r})});nbe.displayName=tbe;var rbe="DropdownMenuRadioGroup",sbe=R.forwardRef((e,r)=>{const{__scopeDropdownMenu:s,...o}=e,d=Ki(s);return u.jsx(Fxe,{...d,...o,ref:r})});sbe.displayName=rbe;var ibe="DropdownMenuRadioItem",abe=R.forwardRef((e,r)=>{const{__scopeDropdownMenu:s,...o}=e,d=Ki(s);return u.jsx(qxe,{...d,...o,ref:r})});abe.displayName=ibe;var obe="DropdownMenuItemIndicator",lbe=R.forwardRef((e,r)=>{const{__scopeDropdownMenu:s,...o}=e,d=Ki(s);return u.jsx(Bxe,{...d,...o,ref:r})});lbe.displayName=obe;var cbe="DropdownMenuSeparator",ube=R.forwardRef((e,r)=>{const{__scopeDropdownMenu:s,...o}=e,d=Ki(s);return u.jsx(Uxe,{...d,...o,ref:r})});ube.displayName=cbe;var dbe="DropdownMenuArrow",hbe=R.forwardRef((e,r)=>{const{__scopeDropdownMenu:s,...o}=e,d=Ki(s);return u.jsx(Kxe,{...d,...o,ref:r})});hbe.displayName=dbe;var pbe="DropdownMenuSubTrigger",fbe=R.forwardRef((e,r)=>{const{__scopeDropdownMenu:s,...o}=e,d=Ki(s);return u.jsx(Vxe,{...d,...o,ref:r})});fbe.displayName=pbe;var mbe="DropdownMenuSubContent",gbe=R.forwardRef((e,r)=>{const{__scopeDropdownMenu:s,...o}=e,d=Ki(s);return u.jsx(Hxe,{...d,...o,ref:r,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)"}})});gbe.displayName=mbe;var ybe=Gq,vbe=Yq,xbe=Zq,bbe=Jq,wbe=Qq;function f$({...e}){return u.jsx(ybe,{"data-slot":"dropdown-menu",...e})}function m$({...e}){return u.jsx(vbe,{"data-slot":"dropdown-menu-trigger",...e})}function g$({className:e,sideOffset:r=4,...s}){return u.jsx(xbe,{children:u.jsx(bbe,{"data-slot":"dropdown-menu-content",sideOffset:r,className:ht("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 p-1 shadow-md",e),...s})})}function jp({className:e,inset:r,variant:s="default",...o}){return u.jsx(wbe,{"data-slot":"dropdown-menu-item","data-inset":r,"data-variant":s,className:ht("focus:bg-accent focus:text-accent-foreground 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-default 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),...o})}var eA="Switch",[Sbe]=al(eA),[Ebe,jbe]=Sbe(eA),eB=R.forwardRef((e,r)=>{const{__scopeSwitch:s,name:o,checked:d,defaultChecked:p,required:m,disabled:g,value:b="on",onCheckedChange:S,form:E,...A}=e,[k,T]=R.useState(null),M=Ln(r,X=>T(X)),I=R.useRef(!1),q=k?E||!!k.closest("form"):!0,[G,K]=qd({prop:d,defaultProp:p??!1,onChange:S,caller:eA});return u.jsxs(Ebe,{scope:s,checked:G,disabled:g,children:[u.jsx(Cn.button,{type:"button",role:"switch","aria-checked":G,"aria-required":m,"data-state":sB(G),"data-disabled":g?"":void 0,disabled:g,value:b,...A,ref:M,onClick:$t(e.onClick,X=>{K(z=>!z),q&&(I.current=X.isPropagationStopped(),I.current||X.stopPropagation())})}),q&&u.jsx(rB,{control:k,bubbles:!I.current,name:o,value:b,checked:G,required:m,disabled:g,form:E,style:{transform:"translateX(-100%)"}})]})});eB.displayName=eA;var tB="SwitchThumb",nB=R.forwardRef((e,r)=>{const{__scopeSwitch:s,...o}=e,d=jbe(tB,s);return u.jsx(Cn.span,{"data-state":sB(d.checked),"data-disabled":d.disabled?"":void 0,...o,ref:r})});nB.displayName=tB;var Cbe="SwitchBubbleInput",rB=R.forwardRef(({__scopeSwitch:e,control:r,checked:s,bubbles:o=!0,...d},p)=>{const m=R.useRef(null),g=Ln(m,p),b=T6(s),S=Vz(r);return R.useEffect(()=>{const E=m.current;if(!E)return;const A=window.HTMLInputElement.prototype,T=Object.getOwnPropertyDescriptor(A,"checked").set;if(b!==s&&T){const M=new Event("click",{bubbles:o});T.call(E,s),E.dispatchEvent(M)}},[b,s,o]),u.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:s,...d,tabIndex:-1,ref:g,style:{...d.style,...S,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});rB.displayName=Cbe;function sB(e){return e?"checked":"unchecked"}var Abe=eB,Obe=nB;function k3({className:e,...r}){return u.jsx(Abe,{"data-slot":"switch",className:ht("peer data-[state=checked]:bg-primary 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),...r,children:u.jsx(Obe,{"data-slot":"switch-thumb",className:ht("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground 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 fC=["route53","s3","ec2","iam","rds","dynamodb"],jj=Xs({provider:Da(["aws","cloudflare","hetzner","digitalocean","generic"]),kind:Da(["aws_access_key","api_token","basic_auth","oauth2"]),schema_version:Zb().default(1),name:zn().min(1,"Name is required").max(100),scope_kind:Da(["provider","service","resource"]),scope_version:Zb().default(1),scope:b3(),account_id:zn().optional().or(Wb("")).transform(e=>e||void 0),region:zn().optional().or(Wb("")).transform(e=>e||void 0),secret:b3()}).superRefine((e,r)=>{if(e.provider==="aws"){if(e.scope_kind==="service"){const s=e.scope?.service;fC.includes(s)||r.addIssue({code:Dd.custom,path:["scope"],message:`For AWS service scope, "service" must be one of: ${fC.join(", ")}`})}if(e.scope_kind==="resource"){const s=e.scope?.arn;(typeof s!="string"||!s.startsWith("arn:"))&&r.addIssue({code:Dd.custom,path:["scope"],message:'For AWS resource scope, "arn" must start with "arn:"'})}if(e.kind==="aws_access_key"){const s=e.secret??{},o=s.access_key_id;(typeof o!="string"||!/^[A-Z0-9]{20}$/.test(o))&&r.addIssue({code:Dd.custom,path:["secret"],message:"access_key_id must be 20 chars (A-Z0-9)"}),(typeof s.secret_access_key!="string"||s.secret_access_key.length<10)&&r.addIssue({code:Dd.custom,path:["secret"],message:"secret_access_key is required"})}}if(e.kind==="api_token"&&((e.secret??{}).token||r.addIssue({code:Dd.custom,path:["secret"],message:"token is required"})),e.kind==="basic_auth"){const s=e.secret??{};(!s.username||!s.password)&&r.addIssue({code:Dd.custom,path:["secret"],message:"username and password are required"})}if(e.kind==="oauth2"){const s=e.secret??{};(!s.client_id||!s.client_secret||!s.refresh_token)&&r.addIssue({code:Dd.custom,path:["secret"],message:"client_id, client_secret, and refresh_token are required"})}e.scope_kind!=="provider"&&!e.scope&&r.addIssue({code:Dd.custom,path:["scope"],message:"scope is required"})}),yT=jj.partial().extend({name:zn().min(1,"Name is required").max(100).optional()});function Ql(e){try{return JSON.stringify(JSON.parse(e),null,2)}catch{return""}}function hj(e){const r=e?.body??e?.response??e?.message;if(typeof r=="string")return r;try{const s=e?.response?.data?.message||e?.message;if(s)return String(s)}catch{return"Unknown error"}return"Unknown error"}function kbe({provider:e,scope_kind:r}){return e==="aws"&&r==="service"}function Rbe({provider:e,scope_kind:r}){return e==="aws"&&r==="resource"}function Tbe({scope_kind:e}){return e==="provider"}function R3(){return{provider:"aws",kind:"aws_access_key",schema_version:1,name:"",scope_kind:"provider",scope_version:1,scope:{},account_id:"",region:"",secret:{}}}function T3(e){return{provider:e.provider,kind:e.kind,schema_version:e.schema_version??1,name:e.name,scope_kind:e.scope_kind,scope_version:e.scope_version??1,scope:e.scope??{},account_id:e.account_id,region:e.region,secret:e.secret??{}}}function _3(e){const r={},s=["name","account_id","region","scope_kind","scope_version","scope","secret","provider","kind","schema_version"];for(const o of s)typeof e[o]<"u"&&e[o]!==""&&(r[o]=e[o]);return r}const _be=()=>{const[e,r]=R.useState(""),[s,o]=R.useState(!1),[d,p]=R.useState(!1),[m,g]=R.useState(!1),[b,S]=R.useState(null),[E,A]=R.useState(null),[k,T]=R.useState(!1),[M,I]=R.useState(!1),[q,G]=R.useState(!1),[K,X]=R.useState(null),[z,ee]=R.useState(!1),[oe,Q]=R.useState(null),ne=Hs(),de=rr({queryKey:["credentials"],queryFn:()=>Qm.listCredentials()}),Ce=nn({mutationFn:ie=>Qm.createCredential(T3(ie)),onSuccess:async()=>{await ne.invalidateQueries({queryKey:["credentials"]}),Ze.success("Credential created"),o(!1),je.reset(R3()),T(!1)},onError:ie=>{Ze.error("Failed to create credential",{description:hj(ie)})}}),xe=nn({mutationFn:ie=>Qm.updateCredential(ie.id,_3(ie.body)),onSuccess:async()=>{await ne.invalidateQueries({queryKey:["credentials"]}),Ze.success("Credential updated"),p(!1),A(null),I(!1)},onError:ie=>{Ze.error("Failed to update credential",{description:hj(ie)})}}),le=nn({mutationFn:ie=>Qm.deleteCredential(ie),onSuccess:async()=>{await ne.invalidateQueries({queryKey:["credentials"]}),Ze.success("Credential deleted")},onError:ie=>{Ze.error("Failed to delete credential",{description:hj(ie)})}}),be=nn({mutationFn:ie=>Qm.revealCredential(ie),onSuccess:ie=>{S(ie),g(!0)},onError:ie=>{Ze.error("Failed to reveal secret",{description:hj(ie)})}}),je=mr({resolver:gr(jj),defaultValues:R3(),mode:"onBlur"}),Ke=mr({resolver:gr(yT),defaultValues:{},mode:"onBlur"});function ce(ie){A(ie.id),Ke.reset({provider:ie.provider,kind:ie.kind,schema_version:ie.schema_version??1,name:ie.name,scope_kind:ie.scope_kind,scope_version:ie.scope_version??1,account_id:ie.account_id??"",region:ie.region??"",scope:ie.scope??(ie.scope_kind==="provider"?{}:void 0),secret:void 0}),I(!1),p(!0)}const re=R.useMemo(()=>{const ie=de.data??[];if(!e.trim())return ie;const Ne=e.toLowerCase();return ie.filter(ze=>[ze.name,ze.provider,ze.kind,ze.scope_kind,ze.account_id,ze.region,JSON.stringify(ze.scope??{})].filter(Boolean).map(tt=>String(tt).toLowerCase()).some(tt=>tt.includes(Ne)))},[de.data,e]);if(de.isLoading)return u.jsxs("div",{className:"flex items-center gap-2 p-6",children:[u.jsx(Ds,{className:"h-4 w-4 animate-spin"})," Loading credentials…"]});if(de.error)return u.jsxs("div",{className:"p-6 text-red-500",children:["Error loading credentials.",u.jsx("pre",{className:"mt-2 text-xs opacity-80",children:JSON.stringify(de.error,null,2)})]});const ue=je.watch("provider"),_e=je.watch("kind"),fe=je.watch("scope_kind"),He=ie=>je.setValue("scope",ie,{shouldDirty:!0,shouldValidate:!0}),Oe=ie=>je.setValue("secret",ie,{shouldDirty:!0,shouldValidate:!0});function ke(){if(!k){if(ue==="aws"&&_e==="aws_access_key"){const ie=je.getValues("secret")??{};Oe({access_key_id:ie.access_key_id??"",secret_access_key:ie.secret_access_key??""})}else if(_e==="api_token"){const ie=je.getValues("secret")??{};Oe({token:ie.token??""})}else if(_e==="basic_auth"){const ie=je.getValues("secret")??{};Oe({username:ie.username??"",password:ie.password??""})}else if(_e==="oauth2"){const ie=je.getValues("secret")??{};Oe({client_id:ie.client_id??"",client_secret:ie.client_secret??"",refresh_token:ie.refresh_token??""})}}}function Ve(ie){je.setValue("scope_kind",ie),ie==="provider"&&He({}),ie==="service"&&He({service:"route53"}),ie==="resource"&&He({arn:""})}return u.jsxs("div",{className:"space-y-4 p-6",children:[u.jsxs("div",{className:"flex flex-col gap-3 md:flex-row md:items-center md:justify-between",children:[u.jsxs("div",{children:[u.jsx("h1",{className:"mb-1 text-2xl font-bold",children:"Credentials"}),u.jsx("p",{className:"text-muted-foreground text-sm",children:"Store provider credentials. Secrets are encrypted server-side; revealing is a one-time read."})]}),u.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[u.jsxs("div",{className:"relative",children:[u.jsx(Pa,{className:"absolute top-2.5 left-2 h-4 w-4 opacity-60"}),u.jsx(xt,{value:e,onChange:ie=>r(ie.target.value),placeholder:"Search by name, provider, kind, scope…",className:"w-64 pl-8"})]}),u.jsxs(fn,{open:s,onOpenChange:o,children:[u.jsx(Li,{asChild:!0,children:u.jsxs(Fe,{onClick:()=>o(!0),children:[u.jsx(lo,{className:"mr-2 h-4 w-4"}),"Create Credential"]})}),u.jsxs(mn,{className:"sm:max-w-2xl",children:[u.jsx(gn,{children:u.jsx(yn,{children:"Create Credential"})}),u.jsx(yr,{...je,children:u.jsxs("form",{onSubmit:je.handleSubmit(ie=>{const Ne=jj.safeParse(ie);if(!Ne.success){Ze.error("Please fix validation errors");return}Ce.mutate(Ne.data)}),className:"space-y-5 pt-2",children:[u.jsxs("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2",children:[u.jsx(yt,{control:je.control,name:"provider",render:({field:ie})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Provider"}),u.jsxs(Rn,{onValueChange:Ne=>{ie.onChange(Ne),ke()},defaultValue:ie.value,children:[u.jsx(wt,{children:u.jsx(_n,{children:u.jsx(Tn,{})})}),u.jsxs($n,{children:[u.jsx(jt,{value:"aws",children:"AWS"}),u.jsx(jt,{value:"cloudflare",children:"Cloudflare"}),u.jsx(jt,{value:"hetzner",children:"Hetzner"}),u.jsx(jt,{value:"digitalocean",children:"DigitalOcean"}),u.jsx(jt,{value:"generic",children:"Generic"})]})]}),u.jsx(mt,{})]})}),u.jsx(yt,{control:je.control,name:"kind",render:({field:ie})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Kind"}),u.jsxs(Rn,{onValueChange:Ne=>{ie.onChange(Ne),ke()},defaultValue:ie.value,children:[u.jsx(wt,{children:u.jsx(_n,{children:u.jsx(Tn,{})})}),u.jsxs($n,{children:[u.jsx(jt,{value:"aws_access_key",children:"AWS Access Key"}),u.jsx(jt,{value:"api_token",children:"API Token"}),u.jsx(jt,{value:"basic_auth",children:"Basic Auth"}),u.jsx(jt,{value:"oauth2",children:"OAuth2"})]})]}),u.jsx(mt,{})]})}),u.jsx(yt,{control:je.control,name:"scope_kind",render:({field:ie})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Scope Kind"}),u.jsxs(Rn,{onValueChange:Ne=>{Ve(Ne)},defaultValue:ie.value,children:[u.jsx(wt,{children:u.jsx(_n,{children:u.jsx(Tn,{})})}),u.jsxs($n,{children:[u.jsx(jt,{value:"provider",children:"Provider"}),u.jsx(jt,{value:"service",children:"Service"}),u.jsx(jt,{value:"resource",children:"Resource"})]})]}),u.jsx(mt,{})]})}),u.jsx(yt,{control:je.control,name:"name",render:({field:ie})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Name"}),u.jsx(xt,{...ie,placeholder:"My AWS Key"}),u.jsx(mt,{})]})}),u.jsx(yt,{control:je.control,name:"account_id",render:({field:ie})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Account ID (optional)"}),u.jsx(xt,{...ie,placeholder:"e.g. 123456789012"}),u.jsx(mt,{})]})}),u.jsx(yt,{control:je.control,name:"region",render:({field:ie})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Region (optional)"}),u.jsx(xt,{...ie,placeholder:"e.g. us-east-1"}),u.jsx(mt,{})]})})]}),!Tbe({scope_kind:fe})&&u.jsx(u.Fragment,{children:kbe({provider:ue,scope_kind:fe})?u.jsxs(lt,{children:[u.jsx(ct,{children:"Service"}),u.jsx(Go,{control:je.control,name:"scope",render:({field:ie})=>u.jsxs(Rn,{onValueChange:Ne=>ie.onChange({service:Ne}),value:ie.value?.service??"route53",children:[u.jsx(wt,{children:u.jsx(_n,{children:u.jsx(Tn,{placeholder:"Select an AWS service"})})}),u.jsx($n,{children:fC.map(Ne=>u.jsx(jt,{value:Ne,children:Ne.toUpperCase()},Ne))})]})}),u.jsxs("p",{className:"text-muted-foreground mt-1 text-xs",children:["Must be one of: ",fC.join(", "),"."]})]}):Rbe({provider:ue,scope_kind:fe})?u.jsxs(lt,{children:[u.jsx(ct,{children:"Resource ARN"}),u.jsx(Go,{control:je.control,name:"scope",render:({field:ie})=>u.jsx(xt,{value:ie.value?.arn??"",onChange:Ne=>ie.onChange({arn:Ne.target.value}),placeholder:"arn:aws:service:region:account:resource"})}),u.jsx(mt,{})]}):u.jsx(yt,{control:je.control,name:"scope",render:({field:ie})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Scope (JSON)"}),u.jsx(hu,{value:Ql(ie.value??{}),onChange:Ne=>{try{const ze=JSON.parse(Ne.target.value);ie.onChange(ze)}catch{ie.onChange(Ne.target.value)}},rows:3,placeholder:'{"service":"route53"} or {"arn":"arn:aws:..."}',className:"font-mono"}),u.jsx(mt,{})]})})}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(k3,{checked:k,onCheckedChange:ie=>{T(ie),ke()},id:"raw-secret-toggle"}),u.jsx("label",{htmlFor:"raw-secret-toggle",className:"text-sm",children:"Edit secret as raw JSON"})]}),k?u.jsx(yt,{control:je.control,name:"secret",render:({field:ie})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Secret (JSON)"}),u.jsx(hu,{value:Ql(ie.value??{}),onChange:Ne=>{try{ie.onChange(JSON.parse(Ne.target.value))}catch{ie.onChange(Ne.target.value)}},rows:6,placeholder:_e==="aws_access_key"?'{"access_key_id":"...","secret_access_key":"..."}':_e==="api_token"?'{"token":"..."}':_e==="basic_auth"?'{"username":"...","password":"..."}':'{"client_id":"...","client_secret":"...","refresh_token":"..."}',className:"font-mono"}),u.jsx(mt,{})]})}):u.jsxs(u.Fragment,{children:[ue==="aws"&&_e==="aws_access_key"&&u.jsxs("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2",children:[u.jsxs(lt,{children:[u.jsx(ct,{children:"Access Key ID"}),u.jsx(Go,{control:je.control,name:"secret",render:({field:ie})=>u.jsx(xt,{value:(ie.value??{}).access_key_id??"",onChange:Ne=>Oe({...ie.value??{},access_key_id:Ne.target.value.trim()}),placeholder:"AKIA..."})})]}),u.jsxs(lt,{children:[u.jsx(ct,{children:"Secret Access Key"}),u.jsx(Go,{control:je.control,name:"secret",render:({field:ie})=>u.jsx(xt,{type:"password",value:(ie.value??{}).secret_access_key??"",onChange:Ne=>Oe({...ie.value??{},secret_access_key:Ne.target.value}),placeholder:"•••••••••••••••"})})]})]}),_e==="api_token"&&u.jsxs(lt,{children:[u.jsx(ct,{children:"API Token"}),u.jsx(Go,{control:je.control,name:"secret",render:({field:ie})=>u.jsx(xt,{value:(ie.value??{}).token??"",onChange:Ne=>Oe({...ie.value??{},token:Ne.target.value}),placeholder:"token..."})})]}),_e==="basic_auth"&&u.jsxs("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2",children:[u.jsxs(lt,{children:[u.jsx(ct,{children:"Username"}),u.jsx(Go,{control:je.control,name:"secret",render:({field:ie})=>u.jsx(xt,{value:(ie.value??{}).username??"",onChange:Ne=>Oe({...ie.value??{},username:Ne.target.value})})})]}),u.jsxs(lt,{children:[u.jsx(ct,{children:"Password"}),u.jsx(Go,{control:je.control,name:"secret",render:({field:ie})=>u.jsx(xt,{type:"password",value:(ie.value??{}).password??"",onChange:Ne=>Oe({...ie.value??{},password:Ne.target.value})})})]})]}),_e==="oauth2"&&u.jsxs("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-3",children:[u.jsxs(lt,{children:[u.jsx(ct,{children:"Client ID"}),u.jsx(Go,{control:je.control,name:"secret",render:({field:ie})=>u.jsx(xt,{value:(ie.value??{}).client_id??"",onChange:Ne=>Oe({...ie.value??{},client_id:Ne.target.value})})})]}),u.jsxs(lt,{children:[u.jsx(ct,{children:"Client Secret"}),u.jsx(Go,{control:je.control,name:"secret",render:({field:ie})=>u.jsx(xt,{type:"password",value:(ie.value??{}).client_secret??"",onChange:Ne=>Oe({...ie.value??{},client_secret:Ne.target.value})})})]}),u.jsxs(lt,{children:[u.jsx(ct,{children:"Refresh Token"}),u.jsx(Go,{control:je.control,name:"secret",render:({field:ie})=>u.jsx(xt,{value:(ie.value??{}).refresh_token??"",onChange:Ne=>Oe({...ie.value??{},refresh_token:Ne.target.value})})})]})]})]}),u.jsxs(Sn,{className:"gap-2",children:[u.jsx(Fe,{type:"button",variant:"secondary",onClick:()=>{const ie=jj.safeParse(je.getValues());if(!ie.success){Ze.error("Fix validation errors before previewing");return}const Ne=T3(ie.data);X(Ne),G(!0)},children:"Preview request"}),u.jsx(Fe,{variant:"outline",type:"button",onClick:()=>o(!1),children:"Cancel"}),u.jsxs(Fe,{type:"submit",disabled:Ce.isPending,children:[Ce.isPending&&u.jsx(Ds,{className:"mr-2 h-4 w-4 animate-spin"}),"Create"]})]})]})})]})]})]})]}),u.jsx("div",{className:"overflow-x-auto rounded-xl border",children:u.jsxs("table",{className:"min-w-full text-sm",children:[u.jsx("thead",{className:"bg-muted/40 text-xs tracking-wide uppercase",children:u.jsxs("tr",{children:[u.jsx("th",{className:"w-[26%] px-4 py-2 text-left",children:"Name"}),u.jsx("th",{className:"px-4 py-2 text-left",children:"Provider"}),u.jsx("th",{className:"px-4 py-2 text-left",children:"Kind"}),u.jsx("th",{className:"px-4 py-2 text-left",children:"Scope"}),u.jsx("th",{className:"px-4 py-2 text-left",children:"Account"}),u.jsx("th",{className:"px-4 py-2 text-left",children:"Region"}),u.jsx("th",{className:"px-4 py-2 text-right",children:"Actions"})]})}),u.jsxs("tbody",{children:[re.map(ie=>u.jsxs("tr",{className:"border-t",children:[u.jsxs("td",{className:"px-4 py-2",children:[u.jsx("div",{className:"font-medium",children:ie.name}),u.jsxs("div",{className:"text-muted-foreground text-xs",children:[u.jsx("span",{className:"mr-1",children:"id:"}),u.jsxs("code",{className:"bg-muted rounded px-1",children:[ie.id.slice(0,8),"…"]})]})]}),u.jsx("td",{className:"px-4 py-2",children:ie.provider}),u.jsx("td",{className:"px-4 py-2",children:ie.kind}),u.jsx("td",{className:"px-4 py-2",children:u.jsx(rs,{variant:"secondary",children:ie.scope_kind})}),u.jsx("td",{className:"px-4 py-2",children:ie.account_id??"—"}),u.jsx("td",{className:"px-4 py-2",children:ie.region??"—"}),u.jsx("td",{className:"px-4 py-2",children:u.jsxs("div",{className:"flex items-center justify-end gap-2",children:[u.jsx(Fe,{size:"icon",variant:"ghost",title:"Reveal secret (one-time read)",onClick:()=>be.mutate(ie.id),children:u.jsx(kT,{className:"h-4 w-4"})}),u.jsx(Fe,{size:"icon",variant:"ghost",title:"Edit",onClick:()=>ce(ie),children:u.jsx(pu,{className:"h-4 w-4"})}),u.jsxs(rC,{children:[u.jsx(sC,{asChild:!0,children:u.jsx(Fe,{size:"icon",variant:"ghost",title:"Delete",children:u.jsx(zb,{className:"h-4 w-4"})})}),u.jsxs(iC,{children:[u.jsxs(aC,{children:[u.jsxs(lC,{children:["Delete “",ie.name,"”?"]}),u.jsx(cC,{children:"This will permanently remove the credential metadata. Secrets are not recoverable."})]}),u.jsxs(oC,{children:[u.jsx(dC,{disabled:le.isPending,children:"Cancel"}),u.jsxs(uC,{className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",onClick:()=>le.mutate(ie.id),disabled:le.isPending,children:[le.isPending&&u.jsx(Ds,{className:"mr-2 inline h-4 w-4 animate-spin"}),"Delete"]})]})]})]}),u.jsxs(f$,{children:[u.jsx(m$,{asChild:!0,children:u.jsx(Fe,{size:"icon",variant:"ghost",children:u.jsx(z_,{className:"h-4 w-4"})})}),u.jsxs(g$,{align:"end",children:[u.jsx(jp,{onClick:()=>ce(ie),children:"Edit"}),u.jsx(jp,{onClick:()=>be.mutate(ie.id),children:"Reveal secret"}),u.jsx(jp,{className:"text-destructive",onClick:()=>le.mutate(ie.id),children:"Delete"})]})]})]})})]},ie.id)),re.length===0&&u.jsx("tr",{children:u.jsx("td",{colSpan:7,className:"px-4 py-12 text-center",children:u.jsxs("div",{className:"mx-auto max-w-md",children:[u.jsx("div",{className:"mb-2 flex items-center justify-center",children:u.jsx(Tj,{className:"text-muted-foreground h-5 w-5"})}),u.jsx("p",{className:"text-muted-foreground",children:"No credentials match your search."})]})})})]})]})}),u.jsx(fn,{open:d,onOpenChange:p,children:u.jsxs(mn,{className:"sm:max-w-2xl",children:[u.jsx(gn,{children:u.jsx(yn,{children:"Edit Credential"})}),u.jsx(yr,{...Ke,children:u.jsxs("form",{onSubmit:Ke.handleSubmit(ie=>{if(!E)return;const Ne=yT.safeParse(ie);if(!Ne.success){Ze.error("Please fix validation errors");return}xe.mutate({id:E,body:Ne.data})}),className:"space-y-5 pt-2",children:[u.jsxs("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2",children:[u.jsx(yt,{control:Ke.control,name:"provider",render:({field:ie})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Provider"}),u.jsxs(Rn,{onValueChange:ie.onChange,value:ie.value,children:[u.jsx(wt,{children:u.jsx(_n,{children:u.jsx(Tn,{})})}),u.jsxs($n,{children:[u.jsx(jt,{value:"aws",children:"AWS"}),u.jsx(jt,{value:"cloudflare",children:"Cloudflare"}),u.jsx(jt,{value:"hetzner",children:"Hetzner"}),u.jsx(jt,{value:"digitalocean",children:"DigitalOcean"}),u.jsx(jt,{value:"generic",children:"Generic"})]})]}),u.jsx(mt,{})]})}),u.jsx(yt,{control:Ke.control,name:"kind",render:({field:ie})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Kind"}),u.jsxs(Rn,{onValueChange:ie.onChange,value:ie.value,children:[u.jsx(wt,{children:u.jsx(_n,{children:u.jsx(Tn,{})})}),u.jsxs($n,{children:[u.jsx(jt,{value:"aws_access_key",children:"AWS Access Key"}),u.jsx(jt,{value:"api_token",children:"API Token"}),u.jsx(jt,{value:"basic_auth",children:"Basic Auth"}),u.jsx(jt,{value:"oauth2",children:"OAuth2"})]})]}),u.jsx(mt,{})]})}),u.jsx(yt,{control:Ke.control,name:"scope_kind",render:({field:ie})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Scope Kind"}),u.jsxs(Rn,{onValueChange:ie.onChange,value:ie.value,children:[u.jsx(wt,{children:u.jsx(_n,{children:u.jsx(Tn,{})})}),u.jsxs($n,{children:[u.jsx(jt,{value:"provider",children:"Provider"}),u.jsx(jt,{value:"service",children:"Service"}),u.jsx(jt,{value:"resource",children:"Resource"})]})]}),u.jsx(mt,{})]})}),u.jsx(yt,{control:Ke.control,name:"name",render:({field:ie})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Name"}),u.jsx(xt,{...ie}),u.jsx(mt,{})]})}),u.jsx(yt,{control:Ke.control,name:"account_id",render:({field:ie})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Account ID"}),u.jsx(xt,{...ie,placeholder:"optional"}),u.jsx(mt,{})]})}),u.jsx(yt,{control:Ke.control,name:"region",render:({field:ie})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Region"}),u.jsx(xt,{...ie,placeholder:"optional"}),u.jsx(mt,{})]})})]}),u.jsx(yt,{control:Ke.control,name:"scope",render:({field:ie})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Scope (JSON)"}),u.jsx(hu,{value:Ql(ie.value??(Ke.getValues("scope_kind")==="provider"?{}:void 0)),onChange:Ne=>{try{ie.onChange(JSON.parse(Ne.target.value))}catch{ie.onChange(Ne.target.value)}},rows:3,className:"font-mono"}),u.jsx(mt,{})]})}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(k3,{checked:M,onCheckedChange:I,id:"raw-edit-secret-toggle"}),u.jsx("label",{htmlFor:"raw-edit-secret-toggle",className:"text-sm",children:"Rotate secret with raw JSON (leave empty to keep existing)"})]}),M&&u.jsx(yt,{control:Ke.control,name:"secret",render:({field:ie})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Rotate Secret (JSON)"}),u.jsx(hu,{value:typeof ie.value=="string"?ie.value:Ql(ie.value??{}),onChange:Ne=>{try{ie.onChange(JSON.parse(Ne.target.value))}catch{ie.onChange(Ne.target.value)}},rows:6,className:"font-mono",placeholder:'{"access_key_id":"...","secret_access_key":"..."}'}),u.jsx(mt,{})]})}),u.jsxs(Sn,{className:"gap-2",children:[u.jsx(Fe,{type:"button",variant:"secondary",onClick:()=>{const ie=yT.safeParse(Ke.getValues());if(!ie.success){Ze.error("Fix validation errors before previewing");return}const Ne=_3(ie.data);Q(Ne),ee(!0)},children:"Preview request"}),u.jsx(Fe,{variant:"outline",type:"button",onClick:()=>p(!1),children:"Cancel"}),u.jsxs(Fe,{type:"submit",disabled:xe.isPending,children:[xe.isPending&&u.jsx(Ds,{className:"mr-2 h-4 w-4 animate-spin"}),"Save changes"]})]})]})})]})}),u.jsx(fn,{open:m,onOpenChange:g,children:u.jsxs(mn,{className:"sm:max-w-xl",children:[u.jsx(gn,{children:u.jsxs(yn,{className:"flex items-center gap-2",children:[u.jsx(kT,{className:"h-4 w-4"})," Decrypted Secret"]})}),u.jsx("div",{className:"bg-muted/40 rounded-lg border p-3",children:u.jsx("pre",{className:"max-h-[50vh] overflow-auto text-xs leading-relaxed",children:Ql(b??{})})}),u.jsxs("div",{className:"text-muted-foreground flex items-center gap-2 text-xs",children:[u.jsx(Tj,{className:"h-3.5 w-3.5"}),"One-time read. Close this dialog to hide the secret."]}),u.jsxs(Sn,{children:[u.jsx(Fe,{variant:"outline",onClick:()=>{navigator.clipboard.writeText(Ql(b??{})),Ze.success("Copied to clipboard")},children:"Copy"}),u.jsx(Fe,{onClick:()=>g(!1),children:"Close"})]})]})}),u.jsx(fn,{open:q,onOpenChange:G,children:u.jsxs(mn,{className:"sm:max-w-2xl",children:[u.jsx(gn,{children:u.jsx(yn,{children:"Preview: POST /api/v1/credentials"})}),u.jsx("div",{className:"bg-muted/40 rounded-lg border p-3",children:u.jsx("pre",{className:"max-h-[50vh] overflow-auto text-xs leading-relaxed",children:Ql(K??{})})}),u.jsxs(Sn,{children:[u.jsx(Fe,{variant:"outline",onClick:()=>{navigator.clipboard.writeText(Ql(K??{})),Ze.success("Copied body")},children:"Copy body"}),u.jsx(Fe,{onClick:()=>G(!1),children:"Close"})]})]})}),u.jsx(fn,{open:z,onOpenChange:ee,children:u.jsxs(mn,{className:"sm:max-w-2xl",children:[u.jsx(gn,{children:u.jsx(yn,{children:"Preview: PATCH /api/v1/credentials/:id"})}),u.jsx("div",{className:"bg-muted/40 rounded-lg border p-3",children:u.jsx("pre",{className:"max-h-[50vh] overflow-auto text-xs leading-relaxed",children:Ql(oe??{})})}),u.jsxs(Sn,{children:[u.jsx(Fe,{variant:"outline",onClick:()=>{navigator.clipboard.writeText(Ql(oe??{})),Ze.success("Copied body")},children:"Copy body"}),u.jsx(Fe,{onClick:()=>ee(!1),children:"Close"})]})]})}),u.jsx("pre",{children:JSON.stringify(de.data,null,2)})]})};function ha({className:e,...r}){return u.jsx("div",{"data-slot":"card",className:ht("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",e),...r})}function sl({className:e,...r}){return u.jsx("div",{"data-slot":"card-header",className:ht("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...r})}function il({className:e,...r}){return u.jsx("div",{"data-slot":"card-title",className:ht("leading-none font-semibold",e),...r})}function j_({className:e,...r}){return u.jsx("div",{"data-slot":"card-description",className:ht("text-muted-foreground text-sm",e),...r})}function oo({className:e,...r}){return u.jsx("div",{"data-slot":"card-content",className:ht("px-6",e),...r})}const $be=e=>{switch(e){case"ready":return u.jsx(I_,{className:"h-4 w-4 text-emerald-600"});case"provisioning":return u.jsx(Ds,{className:"h-4 w-4 animate-spin text-blue-600"});case"failed":return u.jsx(Tj,{className:"h-4 w-4 text-red-600"});default:return u.jsx(TZ,{className:"text-muted-foreground h-4 w-4"})}},vT=({s:e})=>u.jsxs(rs,{variant:e==="failed"?"destructive":e==="ready"?"default":"secondary",className:"gap-1",title:e,children:[$be(e),u.jsx("span",{className:"capitalize",children:e??"pending"})]}),C_=e=>e.split(",").map(r=>r.trim()).filter(Boolean),Nbe=e=>e&&e.length?e.join(","):"",A_=["A","AAAA","CNAME","TXT","MX","NS","SRV","CAA"],Dbe=e=>e.provider==="aws"&&e.scope_kind==="service"&&(()=>{const r=e.scope;try{return(typeof r=="string"?JSON.parse(r):r||{})?.service==="route53"}catch{return!1}})(),$3=e=>[e.name||"Unnamed",e.account_id,e.region].filter(Boolean).join(" · "),iB=Xs({domain_name:zn().min(1,"Domain is required").max(253).transform(e=>e.trim().replace(/\.$/,"").toLowerCase()),credential_id:zn().uuid("Pick a credential"),zone_id:zn().optional().or(Wb("")).transform(e=>e?e.trim():void 0)}),Pbe=iB.partial(),Mbe=E6([Zb(),zn().regex(/^\d+$/).transform(e=>Number(e))]).optional().refine(e=>e===void 0||e>=1&&e<=86400,{message:"TTL must be between 1 and 86400"}),aB=Xs({name:zn().min(1,"Name required").max(253).transform(e=>e.trim().replace(/\.$/,"").toLowerCase()),type:Da(A_),ttl:Mbe,valuesCsv:zn().optional()}).superRefine((e,r)=>{const s=C_(e.valuesCsv??"");s.length===0&&r.addIssue({code:"custom",message:"At least one value is required"}),e.type==="CNAME"&&s.length!==1&&r.addIssue({code:"custom",message:"CNAME requires exactly one value"})}),Ibe=aB.partial(),zbe=()=>{const[e,r]=R.useState(""),[s,o]=R.useState(null),[d,p]=R.useState(!1),[m,g]=R.useState(!1),[b,S]=R.useState(!1),[E,A]=R.useState(!1),[k,T]=R.useState(null),M=Hs(),I=rr({queryKey:["dns","domains"],queryFn:()=>tc.listDomains()}),q=rr({queryKey:["dns","records",s?.id],queryFn:async()=>s?await tc.listRecordSetsByDomain(s.id):[],enabled:!!s?.id}),G=rr({queryKey:["credentials","r53"],queryFn:()=>Qm.listCredentials()}),K=R.useMemo(()=>(G.data??[]).filter(Dbe),[G.data]);R.useEffect(()=>{(()=>{!s&&I.data&&I.data.length&&o(I.data[0])})()},[I.data,s]);const X=R.useMemo(()=>{const re=I.data??[];if(!e.trim())return re;const ue=e.toLowerCase();return re.filter(_e=>[_e.domain_name,_e.zone_id,_e.status,_e.domain_name].filter(Boolean).map(fe=>String(fe).toLowerCase()).some(fe=>fe.includes(ue)))},[I.data,e]),z=mr({resolver:gr(iB),defaultValues:{domain_name:"",credential_id:"",zone_id:""}}),ee=nn({mutationFn:re=>tc.createDomain(re),onSuccess:async re=>{Ze.success("Domain created"),p(!1),z.reset(),await M.invalidateQueries({queryKey:["dns","domains"]}),o(re)},onError:re=>Ze.error("Failed to create domain",{description:re?.message??"Unknown error"})}),oe=mr({resolver:gr(Pbe)}),Q=re=>{o(re),oe.reset({domain_name:re.domain_name,credential_id:re.credential_id,zone_id:re.zone_id||""}),g(!0)},ne=nn({mutationFn:re=>{if(!s)throw new Error("No domain selected");return tc.updateDomain(s.id,re)},onSuccess:async()=>{Ze.success("Domain updated"),g(!1),await M.invalidateQueries({queryKey:["dns","domains"]}),await M.invalidateQueries({queryKey:["dns","records",s?.id]})},onError:re=>Ze.error("Failed to update domain",{description:re?.message??"Unknown error"})}),de=nn({mutationFn:re=>tc.deleteDomain(re),onSuccess:async()=>{Ze.success("Domain deleted"),await M.invalidateQueries({queryKey:["dns","domains"]}),o(null)},onError:re=>Ze.error("Failed to delete domain",{description:re?.message??"Unknown error"})}),Ce=mr({resolver:gr(aB),defaultValues:{name:"",type:"A",ttl:300,valuesCsv:""}}),xe=re=>{const ue=re?.response?.data?.error||re?.message||"Unknown error";return ue.includes("ownership_conflict")?"Ownership conflict: this (name,type) exists but isn’t owned by autoglue.":ue.includes("already_exists")?"A record with this (name,type) already exists. Use Edit instead.":ue},le=nn({mutationFn:async re=>{if(!s)throw new Error("No domain selected");const ue={name:re.name,type:re.type,...re.ttl?{ttl:re.ttl}:{},values:C_(re.valuesCsv??"")};return tc.createRecordSetsByDomain(s.id,ue)},onSuccess:async()=>{Ze.success("Record set created"),S(!1),Ce.reset(),await M.invalidateQueries({queryKey:["dns","records",s?.id]})},onError:re=>Ze.error("Failed to create record set",{description:xe(re)})}),be=mr({resolver:gr(Ibe)}),je=re=>{T(re);const ue=re.values||[];be.reset({name:re.name,type:re.type,ttl:re.ttl?Number(re.ttl):void 0,valuesCsv:Nbe(ue)}),A(!0)},Ke=nn({mutationFn:async re=>{if(!k)throw new Error("No record selected");const ue={};return re.name!==void 0&&(ue.name=re.name),re.type!==void 0&&(ue.type=re.type),re.ttl!==void 0&&re.ttl!==null&&(ue.ttl=re.ttl),re.valuesCsv!==void 0&&(ue.values=C_(re.valuesCsv)),tc.updateRecordSetsByDomain(k.id,ue)},onSuccess:async()=>{Ze.success("Record set updated"),A(!1),T(null),await M.invalidateQueries({queryKey:["dns","records",s?.id]})},onError:re=>Ze.error("Failed to update record set",{description:xe(re)})}),ce=nn({mutationFn:re=>tc.deleteRecordSetsByDomain(re),onSuccess:async()=>{Ze.success("Record set deleted"),await M.invalidateQueries({queryKey:["dns","records",s?.id]})},onError:re=>Ze.error("Failed to delete record set",{description:re?.message??"Unknown error"})});return u.jsxs("div",{className:"space-y-5 p-6",children:[u.jsxs("div",{className:"flex flex-col gap-3 md:flex-row md:items-center md:justify-between",children:[u.jsx("h1",{className:"text-2xl font-bold",children:"DNS"}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsxs("div",{className:"relative",children:[u.jsx(Pa,{className:"absolute top-2.5 left-2 h-4 w-4 opacity-60"}),u.jsx(xt,{value:e,onChange:re=>r(re.target.value),placeholder:"Search domains…",className:"w-64 pl-8"})]}),u.jsxs(fn,{open:d,onOpenChange:p,children:[u.jsx(Li,{asChild:!0,children:u.jsxs(Fe,{onClick:()=>p(!0),children:[u.jsx(lo,{className:"mr-2 h-4 w-4"}),"Add Domain"]})}),u.jsxs(mn,{className:"sm:max-w-lg",children:[u.jsx(gn,{children:u.jsx(yn,{children:"Add Domain"})}),u.jsx(yr,{...z,children:u.jsxs("form",{className:"space-y-4 pt-2",onSubmit:z.handleSubmit(re=>ee.mutate(re)),children:[u.jsx(yt,{control:z.control,name:"domain_name",render:({field:re})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Domain"}),u.jsx(wt,{children:u.jsx(xt,{...re,placeholder:"example.com"})}),u.jsx(mt,{})]})}),u.jsx(yt,{control:z.control,name:"credential_id",render:({field:re})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Route53 Credential"}),u.jsxs(Rn,{onValueChange:re.onChange,value:re.value,disabled:G.isLoading||(K?.length??0)===0,children:[u.jsx(wt,{children:u.jsx(_n,{children:u.jsx(Tn,{placeholder:G.isLoading?"Loading…":(K?.length??0)===0?"No Route53 credentials found":"Select credential"})})}),u.jsx($n,{children:(K??[]).map(ue=>u.jsx(jt,{value:ue.id,children:$3(ue)},ue.id))})]}),G.error&&u.jsx("p",{className:"text-destructive text-xs",children:"Failed to load credentials."}),u.jsx(mt,{})]})}),u.jsx(yt,{control:z.control,name:"zone_id",render:({field:re})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Zone ID (optional)"}),u.jsx(wt,{children:u.jsx(xt,{...re,placeholder:"/hostedzone/Z123…"})}),u.jsx(mt,{})]})}),u.jsxs(Sn,{className:"gap-2",children:[u.jsx(Fe,{type:"button",variant:"outline",onClick:()=>p(!1),children:"Cancel"}),u.jsxs(Fe,{type:"submit",disabled:ee.isPending,children:[ee.isPending&&u.jsx(Ds,{className:"mr-2 h-4 w-4 animate-spin"}),"Create"]})]})]})})]})]})]})]}),u.jsx("div",{children:u.jsxs(ha,{className:"p-3 md:col-span-5",children:[u.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[u.jsx("div",{className:"text-sm font-semibold",children:"Domains"}),I.isFetching&&u.jsx(Ds,{className:"h-4 w-4 animate-spin"})]}),u.jsx("div",{className:"max-h-[60vh] overflow-auto rounded-md border",children:u.jsxs("table",{className:"min-w-full text-sm",children:[u.jsx("thead",{className:"bg-muted/40 text-xs tracking-wide uppercase",children:u.jsxs("tr",{children:[u.jsx("th",{className:"px-3 py-2 text-left",children:"Domain"}),u.jsx("th",{className:"px-3 py-2 text-left",children:"Zone"}),u.jsx("th",{className:"px-3 py-2 text-left",children:"Status"}),u.jsx("th",{className:"px-3 py-2 text-right",children:"Actions"})]})}),u.jsxs("tbody",{children:[(X??[]).map(re=>u.jsxs("tr",{className:`hover:bg-muted/30 border-t ${s?.id===re.id?"bg-muted/40":""}`,onClick:()=>o(re),children:[u.jsx("td",{className:"cursor-pointer px-3 py-2 font-medium",children:re.domain_name}),u.jsx("td",{className:"px-3 py-2",children:re.zone_id||"—"}),u.jsx("td",{className:"px-3 py-2",children:u.jsx(vT,{s:re.status})}),u.jsx("td",{className:"px-3 py-2",children:u.jsxs("div",{className:"flex items-center justify-end gap-2",children:[u.jsx(Fe,{size:"icon",variant:"ghost",onClick:()=>Q(re),children:u.jsx(pu,{className:"h-4 w-4"})}),u.jsxs(rC,{children:[u.jsx(sC,{asChild:!0,children:u.jsx(Fe,{size:"icon",variant:"ghost",onClick:ue=>ue.stopPropagation(),children:u.jsx(zb,{className:"h-4 w-4"})})}),u.jsxs(iC,{children:[u.jsxs(aC,{children:[u.jsxs(lC,{children:["Delete “",re.domain_name,"”?"]}),u.jsx(cC,{children:"This deletes the domain metadata. External DNS records are not touched."})]}),u.jsxs(oC,{children:[u.jsx(dC,{children:"Cancel"}),u.jsx(uC,{className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",onClick:()=>de.mutate(re.id),children:"Delete"})]})]})]})]})})]},re.id)),(!X||X.length===0)&&u.jsx("tr",{children:u.jsx("td",{colSpan:4,className:"text-muted-foreground px-3 py-8 text-center",children:"No domains yet."})})]})]})})]})}),u.jsx("div",{children:u.jsxs(ha,{className:"p-3 md:col-span-7",children:[u.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[u.jsxs("div",{className:"text-sm font-semibold",children:["Records ",s?`— ${s.domain_name}`:""]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(vT,{s:s?.status}),u.jsxs(fn,{open:b,onOpenChange:S,children:[u.jsx(Li,{asChild:!0,children:u.jsxs(Fe,{disabled:!s,children:[u.jsx(lo,{className:"mr-2 h-4 w-4"}),"Add Record"]})}),u.jsxs(mn,{className:"sm:max-w-xl",children:[u.jsx(gn,{children:u.jsx(yn,{children:"Add Record"})}),u.jsx(yr,{...Ce,children:u.jsxs("form",{className:"space-y-4 pt-2",onSubmit:Ce.handleSubmit(re=>le.mutate(re)),children:[u.jsxs("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-3",children:[u.jsx(yt,{control:Ce.control,name:"name",render:({field:re})=>u.jsxs(lt,{className:"md:col-span-1",children:[u.jsx(ct,{children:"Name"}),u.jsx(wt,{children:u.jsx(xt,{...re,placeholder:"endpoint (or @)"})}),u.jsx(mt,{})]})}),u.jsx(yt,{control:Ce.control,name:"type",render:({field:re})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Type"}),u.jsxs(Rn,{onValueChange:re.onChange,defaultValue:re.value,children:[u.jsx(wt,{children:u.jsx(_n,{children:u.jsx(Tn,{})})}),u.jsx($n,{children:A_.map(ue=>u.jsx(jt,{value:ue,children:ue},ue))})]}),u.jsx(mt,{})]})}),u.jsx(yt,{control:Ce.control,name:"ttl",render:({field:re})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"TTL (sec, optional)"}),u.jsx(wt,{children:u.jsx(xt,{type:"number",value:re.value,onChange:ue=>re.onChange(ue.target.value===""?void 0:Number(ue.target.value)),placeholder:"300"})}),u.jsx(mt,{})]})})]}),u.jsx(yt,{control:Ce.control,name:"valuesCsv",render:({field:re})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Values (comma-separated)"}),u.jsx(wt,{children:u.jsx(hu,{...re,rows:3,placeholder:'e.g. 10.0.30.1, 10.0.30.2 or "v=spf1 ~all"',className:"font-mono"})}),u.jsx(mt,{})]})}),u.jsxs(Sn,{className:"gap-2",children:[u.jsx(Fe,{variant:"outline",type:"button",onClick:()=>S(!1),children:"Cancel"}),u.jsxs(Fe,{type:"submit",disabled:le.isPending,children:[le.isPending&&u.jsx(Ds,{className:"mr-2 h-4 w-4 animate-spin"}),"Create"]})]})]})})]})]})]})]}),u.jsxs("div",{className:"overflow-x-auto rounded-md border",children:[q.isLoading&&u.jsxs("div",{className:"flex items-center gap-2 p-4",children:[u.jsx(Ds,{className:"h-4 w-4 animate-spin"})," Loading records…"]}),!q.isLoading&&u.jsxs("table",{className:"min-w-full text-sm",children:[u.jsx("thead",{className:"bg-muted/40 text-xs tracking-wide uppercase",children:u.jsxs("tr",{children:[u.jsx("th",{className:"px-3 py-2 text-left",children:"Name"}),u.jsx("th",{className:"px-3 py-2 text-left",children:"Type"}),u.jsx("th",{className:"px-3 py-2 text-left",children:"TTL"}),u.jsx("th",{className:"px-3 py-2 text-left",children:"Values"}),u.jsx("th",{className:"px-3 py-2 text-left",children:"Status"}),u.jsx("th",{className:"px-3 py-2 text-left",children:"Owner"}),u.jsx("th",{className:"px-3 py-2 text-right",children:"Actions"})]})}),u.jsxs("tbody",{children:[(q.data??[]).map(re=>{const ue=re.values||[];return u.jsxs("tr",{className:"border-t",children:[u.jsx("td",{className:"px-3 py-2 font-medium",children:re.name||"@"}),u.jsx("td",{className:"px-3 py-2",children:re.type}),u.jsx("td",{className:"px-3 py-2",children:re.ttl??"—"}),u.jsx("td",{className:"px-3 py-2",children:u.jsx("div",{className:"max-w-[420px] truncate",title:(ue||[]).join(", "),children:(ue||[]).join(", ")})}),u.jsx("td",{className:"px-3 py-2",children:u.jsx(vT,{s:re.status})}),u.jsx("td",{className:"px-3 py-2",children:re.owner}),u.jsx("td",{className:"px-3 py-2",children:u.jsxs("div",{className:"flex items-center justify-end gap-2",children:[u.jsx(Fe,{size:"icon",variant:"ghost",onClick:()=>je(re),children:u.jsx(pu,{className:"h-4 w-4"})}),u.jsxs(rC,{children:[u.jsx(sC,{asChild:!0,children:u.jsx(Fe,{size:"icon",variant:"ghost",children:u.jsx(zb,{className:"h-4 w-4"})})}),u.jsxs(iC,{children:[u.jsxs(aC,{children:[u.jsxs(lC,{children:["Delete “",re.name||"@"," ",re.type,"”?"]}),u.jsx(cC,{children:"This removes the record set from your project. Your worker does not delete it from the DNS provider right now."})]}),u.jsxs(oC,{children:[u.jsx(dC,{children:"Cancel"}),u.jsx(uC,{className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",onClick:()=>ce.mutate(re.id),children:"Delete"})]})]})]}),u.jsxs(f$,{children:[u.jsx(m$,{asChild:!0,children:u.jsx(Fe,{variant:"ghost",size:"icon",children:u.jsx(z_,{className:"h-4 w-4"})})}),u.jsxs(g$,{align:"end",children:[u.jsx(jp,{onClick:()=>je(re),children:"Edit"}),u.jsx(jp,{className:"text-destructive",onClick:()=>ce.mutate(re.id),children:"Delete"})]})]})]})})]},re.id)}),(!q.data||q.data.length===0)&&u.jsx("tr",{children:u.jsx("td",{colSpan:7,className:"text-muted-foreground px-3 py-8 text-center",children:s?"No records yet — add one.":"Select a domain to view records."})})]})]})]})]})}),u.jsx(fn,{open:m,onOpenChange:g,children:u.jsxs(mn,{className:"sm:max-w-lg",children:[u.jsx(gn,{children:u.jsx(yn,{children:"Edit Domain"})}),u.jsx(yr,{...oe,children:u.jsxs("form",{className:"space-y-4 pt-2",onSubmit:oe.handleSubmit(re=>ne.mutate(re)),children:[u.jsx(yt,{control:oe.control,name:"domain_name",render:({field:re})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Domain"}),u.jsx(wt,{children:u.jsx(xt,{...re,placeholder:"example.com"})}),u.jsx(mt,{})]})}),u.jsx(yt,{control:oe.control,name:"credential_id",render:({field:re})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Route53 Credential"}),u.jsxs(Rn,{onValueChange:re.onChange,value:re.value??"",disabled:G.isLoading||(K?.length??0)===0,children:[u.jsx(wt,{children:u.jsx(_n,{children:u.jsx(Tn,{placeholder:G.isLoading?"Loading…":(K?.length??0)===0?"No Route53 credentials found":"Select credential"})})}),u.jsx($n,{children:(K??[]).map(ue=>u.jsx(jt,{value:ue.id,children:$3(ue)},ue.id))})]}),G.error&&u.jsx("p",{className:"text-destructive text-xs",children:"Failed to load credentials."}),u.jsx(mt,{})]})}),u.jsx(yt,{control:oe.control,name:"zone_id",render:({field:re})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Zone ID"}),u.jsx(wt,{children:u.jsx(xt,{...re,placeholder:"/hostedzone/Z123…"})}),u.jsx(mt,{})]})}),u.jsxs(Sn,{className:"gap-2",children:[u.jsx(Fe,{variant:"outline",type:"button",onClick:()=>g(!1),children:"Cancel"}),u.jsxs(Fe,{type:"submit",disabled:ne.isPending,children:[ne.isPending&&u.jsx(Ds,{className:"mr-2 h-4 w-4 animate-spin"}),"Save Changes"]})]})]})})]})}),u.jsx(fn,{open:E,onOpenChange:A,children:u.jsxs(mn,{className:"sm:max-w-xl",children:[u.jsx(gn,{children:u.jsx(yn,{children:"Edit Record"})}),u.jsx(yr,{...be,children:u.jsxs("form",{className:"space-y-4 pt-2",onSubmit:be.handleSubmit(re=>Ke.mutate(re)),children:[u.jsxs("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-3",children:[u.jsx(yt,{control:be.control,name:"name",render:({field:re})=>u.jsxs(lt,{className:"md:col-span-1",children:[u.jsx(ct,{children:"Name"}),u.jsx(wt,{children:u.jsx(xt,{...re})}),u.jsx(mt,{})]})}),u.jsx(yt,{control:be.control,name:"type",render:({field:re})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Type"}),u.jsxs(Rn,{onValueChange:re.onChange,defaultValue:re.value,children:[u.jsx(wt,{children:u.jsx(_n,{children:u.jsx(Tn,{})})}),u.jsx($n,{children:A_.map(ue=>u.jsx(jt,{value:ue,children:ue},ue))})]}),u.jsx(mt,{})]})}),u.jsx(yt,{control:be.control,name:"ttl",render:({field:re})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"TTL (sec, optional)"}),u.jsx(wt,{children:u.jsx(xt,{type:"number",value:re.value,onChange:ue=>re.onChange(ue.target.value===""?void 0:Number(ue.target.value)),placeholder:"300"})}),u.jsx(mt,{})]})})]}),u.jsx(yt,{control:be.control,name:"valuesCsv",render:({field:re})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Values (comma-separated)"}),u.jsx(wt,{children:u.jsx(hu,{...re,rows:3,className:"font-mono"})}),u.jsx(mt,{})]})}),u.jsxs(Sn,{className:"gap-2",children:[u.jsx(Fe,{variant:"outline",type:"button",onClick:()=>A(!1),children:"Cancel"}),u.jsxs(Fe,{type:"submit",disabled:Ke.isPending,children:[Ke.isPending&&u.jsx(Ds,{className:"mr-2 h-4 w-4 animate-spin"}),"Save Changes"]})]})]})})]})})]})};var N3={};var D3;function Lbe(){return D3||(D3=1,(()=>{var e,r,s={557:(p,m,g)=>{const b=globalThis,S=b.ShadowRoot&&(b.ShadyCSS===void 0||b.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,E=Symbol(),A=new WeakMap;class k{constructor(n,i,l){if(this._$cssResult$=!0,l!==E)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=n,this.t=i}get styleSheet(){let n=this.o;const i=this.t;if(S&&n===void 0){const l=i!==void 0&&i.length===1;l&&(n=A.get(i)),n===void 0&&((this.o=n=new CSSStyleSheet).replaceSync(this.cssText),l&&A.set(i,n))}return n}toString(){return this.cssText}}const T=t=>new k(typeof t=="string"?t:t+"",void 0,E),M=(t,...n)=>{const i=t.length===1?t[0]:n.reduce(((l,h,v)=>l+(x=>{if(x._$cssResult$===!0)return x.cssText;if(typeof x=="number")return x;throw Error("Value passed to 'css' function must be a 'css' function result: "+x+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(h)+t[v+1]),t[0]);return new k(i,t,E)},I=(t,n)=>{if(S)t.adoptedStyleSheets=n.map((i=>i instanceof CSSStyleSheet?i:i.styleSheet));else for(const i of n){const l=document.createElement("style"),h=b.litNonce;h!==void 0&&l.setAttribute("nonce",h),l.textContent=i.cssText,t.appendChild(l)}},q=S?t=>t:t=>t instanceof CSSStyleSheet?(n=>{let i="";for(const l of n.cssRules)i+=l.cssText;return T(i)})(t):t,{is:G,defineProperty:K,getOwnPropertyDescriptor:X,getOwnPropertyNames:z,getOwnPropertySymbols:ee,getPrototypeOf:oe}=Object,Q=globalThis,ne=Q.trustedTypes,de=ne?ne.emptyScript:"",Ce=Q.reactiveElementPolyfillSupport,xe=(t,n)=>t,le={toAttribute(t,n){switch(n){case Boolean:t=t?de:null;break;case Object:case Array:t=t==null?t:JSON.stringify(t)}return t},fromAttribute(t,n){let i=t;switch(n){case Boolean:i=t!==null;break;case Number:i=t===null?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch{i=null}}return i}},be=(t,n)=>!G(t,n),je={attribute:!0,type:String,converter:le,reflect:!1,hasChanged:be};Symbol.metadata??=Symbol("metadata"),Q.litPropertyMetadata??=new WeakMap;class Ke extends HTMLElement{static addInitializer(n){this._$Ei(),(this.l??=[]).push(n)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(n,i=je){if(i.state&&(i.attribute=!1),this._$Ei(),this.elementProperties.set(n,i),!i.noAccessor){const l=Symbol(),h=this.getPropertyDescriptor(n,l,i);h!==void 0&&K(this.prototype,n,h)}}static getPropertyDescriptor(n,i,l){const{get:h,set:v}=X(this.prototype,n)??{get(){return this[i]},set(x){this[i]=x}};return{get(){return h?.call(this)},set(x){const w=h?.call(this);v.call(this,x),this.requestUpdate(n,w,l)},configurable:!0,enumerable:!0}}static getPropertyOptions(n){return this.elementProperties.get(n)??je}static _$Ei(){if(this.hasOwnProperty(xe("elementProperties")))return;const n=oe(this);n.finalize(),n.l!==void 0&&(this.l=[...n.l]),this.elementProperties=new Map(n.elementProperties)}static finalize(){if(this.hasOwnProperty(xe("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(xe("properties"))){const i=this.properties,l=[...z(i),...ee(i)];for(const h of l)this.createProperty(h,i[h])}const n=this[Symbol.metadata];if(n!==null){const i=litPropertyMetadata.get(n);if(i!==void 0)for(const[l,h]of i)this.elementProperties.set(l,h)}this._$Eh=new Map;for(const[i,l]of this.elementProperties){const h=this._$Eu(i,l);h!==void 0&&this._$Eh.set(h,i)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(n){const i=[];if(Array.isArray(n)){const l=new Set(n.flat(1/0).reverse());for(const h of l)i.unshift(q(h))}else n!==void 0&&i.push(q(n));return i}static _$Eu(n,i){const l=i.attribute;return l===!1?void 0:typeof l=="string"?l:typeof n=="string"?n.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((n=>this.enableUpdating=n)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((n=>n(this)))}addController(n){(this._$EO??=new Set).add(n),this.renderRoot!==void 0&&this.isConnected&&n.hostConnected?.()}removeController(n){this._$EO?.delete(n)}_$E_(){const n=new Map,i=this.constructor.elementProperties;for(const l of i.keys())this.hasOwnProperty(l)&&(n.set(l,this[l]),delete this[l]);n.size>0&&(this._$Ep=n)}createRenderRoot(){const n=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return I(n,this.constructor.elementStyles),n}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((n=>n.hostConnected?.()))}enableUpdating(n){}disconnectedCallback(){this._$EO?.forEach((n=>n.hostDisconnected?.()))}attributeChangedCallback(n,i,l){this._$AK(n,l)}_$EC(n,i){const l=this.constructor.elementProperties.get(n),h=this.constructor._$Eu(n,l);if(h!==void 0&&l.reflect===!0){const v=(l.converter?.toAttribute!==void 0?l.converter:le).toAttribute(i,l.type);this._$Em=n,v==null?this.removeAttribute(h):this.setAttribute(h,v),this._$Em=null}}_$AK(n,i){const l=this.constructor,h=l._$Eh.get(n);if(h!==void 0&&this._$Em!==h){const v=l.getPropertyOptions(h),x=typeof v.converter=="function"?{fromAttribute:v.converter}:v.converter?.fromAttribute!==void 0?v.converter:le;this._$Em=h,this[h]=x.fromAttribute(i,v.type),this._$Em=null}}requestUpdate(n,i,l){if(n!==void 0){if(l??=this.constructor.getPropertyOptions(n),!(l.hasChanged??be)(this[n],i))return;this.P(n,i,l)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(n,i,l){this._$AL.has(n)||this._$AL.set(n,i),l.reflect===!0&&this._$Em!==n&&(this._$Ej??=new Set).add(n)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(i){Promise.reject(i)}const n=this.scheduleUpdate();return n!=null&&await n,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[h,v]of this._$Ep)this[h]=v;this._$Ep=void 0}const l=this.constructor.elementProperties;if(l.size>0)for(const[h,v]of l)v.wrapped!==!0||this._$AL.has(h)||this[h]===void 0||this.P(h,this[h],v)}let n=!1;const i=this._$AL;try{n=this.shouldUpdate(i),n?(this.willUpdate(i),this._$EO?.forEach((l=>l.hostUpdate?.())),this.update(i)):this._$EU()}catch(l){throw n=!1,this._$EU(),l}n&&this._$AE(i)}willUpdate(n){}_$AE(n){this._$EO?.forEach((i=>i.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(n)),this.updated(n)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(n){return!0}update(n){this._$Ej&&=this._$Ej.forEach((i=>this._$EC(i,this[i]))),this._$EU()}updated(n){}firstUpdated(n){}}Ke.elementStyles=[],Ke.shadowRootOptions={mode:"open"},Ke[xe("elementProperties")]=new Map,Ke[xe("finalized")]=new Map,Ce?.({ReactiveElement:Ke}),(Q.reactiveElementVersions??=[]).push("2.0.4");const ce=globalThis,re=ce.trustedTypes,ue=re?re.createPolicy("lit-html",{createHTML:t=>t}):void 0,_e="$lit$",fe=`lit$${Math.random().toFixed(9).slice(2)}$`,He="?"+fe,Oe=`<${He}>`,ke=document,Ve=()=>ke.createComment(""),ie=t=>t===null||typeof t!="object"&&typeof t!="function",Ne=Array.isArray,ze=t=>Ne(t)||typeof t?.[Symbol.iterator]=="function",tt=`[
|
||
\f\r]`,ft=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ot=/-->/g,Ft=/>/g,kt=RegExp(`>|${tt}(?:([^\\s"'>=/]+)(${tt}*=${tt}*(?:[^
|
||
\f\r"'\`<>=]|("|')|))|$)`,"g"),Jt=/'/g,Le=/"/g,Lt=/^(?:script|style|textarea|title)$/i,Rt=t=>(n,...i)=>({_$litType$:t,strings:n,values:i}),V=Rt(1),Nn=Symbol.for("lit-noChange"),cn=Symbol.for("lit-nothing"),ve=new WeakMap,De=ke.createTreeWalker(ke,129);function Ge(t,n){if(!Ne(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return ue!==void 0?ue.createHTML(n):n}const D=(t,n)=>{const i=t.length-1,l=[];let h,v=n===2?"<svg>":n===3?"<math>":"",x=ft;for(let w=0;w<i;w++){const C=t[w];let $,N,_=-1,F=0;for(;F<C.length&&(x.lastIndex=F,N=x.exec(C),N!==null);)F=x.lastIndex,x===ft?N[1]==="!--"?x=Ot:N[1]!==void 0?x=Ft:N[2]!==void 0?(Lt.test(N[2])&&(h=RegExp("</"+N[2],"g")),x=kt):N[3]!==void 0&&(x=kt):x===kt?N[0]===">"?(x=h??ft,_=-1):N[1]===void 0?_=-2:(_=x.lastIndex-N[2].length,$=N[1],x=N[3]===void 0?kt:N[3]==='"'?Le:Jt):x===Le||x===Jt?x=kt:x===Ot||x===Ft?x=ft:(x=kt,h=void 0);const U=x===kt&&t[w+1].startsWith("/>")?" ":"";v+=x===ft?C+Oe:_>=0?(l.push($),C.slice(0,_)+_e+C.slice(_)+fe+U):C+fe+(_===-2?w:U)}return[Ge(t,v+(t[i]||"<?>")+(n===2?"</svg>":n===3?"</math>":"")),l]};class L{constructor({strings:n,_$litType$:i},l){let h;this.parts=[];let v=0,x=0;const w=n.length-1,C=this.parts,[$,N]=D(n,i);if(this.el=L.createElement($,l),De.currentNode=this.el.content,i===2||i===3){const _=this.el.content.firstChild;_.replaceWith(..._.childNodes)}for(;(h=De.nextNode())!==null&&C.length<w;){if(h.nodeType===1){if(h.hasAttributes())for(const _ of h.getAttributeNames())if(_.endsWith(_e)){const F=N[x++],U=h.getAttribute(_).split(fe),J=/([.?@])?(.*)/.exec(F);C.push({type:1,index:v,name:J[2],strings:U,ctor:J[1]==="."?st:J[1]==="?"?Kt:J[1]==="@"?Qt:Re}),h.removeAttribute(_)}else _.startsWith(fe)&&(C.push({type:6,index:v}),h.removeAttribute(_));if(Lt.test(h.tagName)){const _=h.textContent.split(fe),F=_.length-1;if(F>0){h.textContent=re?re.emptyScript:"";for(let U=0;U<F;U++)h.append(_[U],Ve()),De.nextNode(),C.push({type:2,index:++v});h.append(_[F],Ve())}}}else if(h.nodeType===8)if(h.data===He)C.push({type:2,index:v});else{let _=-1;for(;(_=h.data.indexOf(fe,_+1))!==-1;)C.push({type:7,index:v}),_+=fe.length-1}v++}}static createElement(n,i){const l=ke.createElement("template");return l.innerHTML=n,l}}function H(t,n,i=t,l){if(n===Nn)return n;let h=l!==void 0?i.o?.[l]:i.l;const v=ie(n)?void 0:n._$litDirective$;return h?.constructor!==v&&(h?._$AO?.(!1),v===void 0?h=void 0:(h=new v(t),h._$AT(t,i,l)),l!==void 0?(i.o??=[])[l]=h:i.l=h),h!==void 0&&(n=H(t,h._$AS(t,n.values),h,l)),n}class W{constructor(n,i){this._$AV=[],this._$AN=void 0,this._$AD=n,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(n){const{el:{content:i},parts:l}=this._$AD,h=(n?.creationScope??ke).importNode(i,!0);De.currentNode=h;let v=De.nextNode(),x=0,w=0,C=l[0];for(;C!==void 0;){if(x===C.index){let $;C.type===2?$=new we(v,v.nextSibling,this,n):C.type===1?$=new C.ctor(v,C.name,C.strings,this,n):C.type===6&&($=new Fn(v,this,n)),this._$AV.push($),C=l[++w]}x!==C?.index&&(v=De.nextNode(),x++)}return De.currentNode=ke,h}p(n){let i=0;for(const l of this._$AV)l!==void 0&&(l.strings!==void 0?(l._$AI(n,l,i),i+=l.strings.length-2):l._$AI(n[i])),i++}}class we{get _$AU(){return this._$AM?._$AU??this.v}constructor(n,i,l,h){this.type=2,this._$AH=cn,this._$AN=void 0,this._$AA=n,this._$AB=i,this._$AM=l,this.options=h,this.v=h?.isConnected??!0}get parentNode(){let n=this._$AA.parentNode;const i=this._$AM;return i!==void 0&&n?.nodeType===11&&(n=i.parentNode),n}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(n,i=this){n=H(this,n,i),ie(n)?n===cn||n==null||n===""?(this._$AH!==cn&&this._$AR(),this._$AH=cn):n!==this._$AH&&n!==Nn&&this._(n):n._$litType$!==void 0?this.$(n):n.nodeType!==void 0?this.T(n):ze(n)?this.k(n):this._(n)}O(n){return this._$AA.parentNode.insertBefore(n,this._$AB)}T(n){this._$AH!==n&&(this._$AR(),this._$AH=this.O(n))}_(n){this._$AH!==cn&&ie(this._$AH)?this._$AA.nextSibling.data=n:this.T(ke.createTextNode(n)),this._$AH=n}$(n){const{values:i,_$litType$:l}=n,h=typeof l=="number"?this._$AC(n):(l.el===void 0&&(l.el=L.createElement(Ge(l.h,l.h[0]),this.options)),l);if(this._$AH?._$AD===h)this._$AH.p(i);else{const v=new W(h,this),x=v.u(this.options);v.p(i),this.T(x),this._$AH=v}}_$AC(n){let i=ve.get(n.strings);return i===void 0&&ve.set(n.strings,i=new L(n)),i}k(n){Ne(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let l,h=0;for(const v of n)h===i.length?i.push(l=new we(this.O(Ve()),this.O(Ve()),this,this.options)):l=i[h],l._$AI(v),h++;h<i.length&&(this._$AR(l&&l._$AB.nextSibling,h),i.length=h)}_$AR(n=this._$AA.nextSibling,i){for(this._$AP?.(!1,!0,i);n&&n!==this._$AB;){const l=n.nextSibling;n.remove(),n=l}}setConnected(n){this._$AM===void 0&&(this.v=n,this._$AP?.(n))}}class Re{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(n,i,l,h,v){this.type=1,this._$AH=cn,this._$AN=void 0,this.element=n,this.name=i,this._$AM=h,this.options=v,l.length>2||l[0]!==""||l[1]!==""?(this._$AH=Array(l.length-1).fill(new String),this.strings=l):this._$AH=cn}_$AI(n,i=this,l,h){const v=this.strings;let x=!1;if(v===void 0)n=H(this,n,i,0),x=!ie(n)||n!==this._$AH&&n!==Nn,x&&(this._$AH=n);else{const w=n;let C,$;for(n=v[0],C=0;C<v.length-1;C++)$=H(this,w[l+C],i,C),$===Nn&&($=this._$AH[C]),x||=!ie($)||$!==this._$AH[C],$===cn?n=cn:n!==cn&&(n+=($??"")+v[C+1]),this._$AH[C]=$}x&&!h&&this.j(n)}j(n){n===cn?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,n??"")}}class st extends Re{constructor(){super(...arguments),this.type=3}j(n){this.element[this.name]=n===cn?void 0:n}}class Kt extends Re{constructor(){super(...arguments),this.type=4}j(n){this.element.toggleAttribute(this.name,!!n&&n!==cn)}}class Qt extends Re{constructor(n,i,l,h,v){super(n,i,l,h,v),this.type=5}_$AI(n,i=this){if((n=H(this,n,i,0)??cn)===Nn)return;const l=this._$AH,h=n===cn&&l!==cn||n.capture!==l.capture||n.once!==l.once||n.passive!==l.passive,v=n!==cn&&(l===cn||h);h&&this.element.removeEventListener(this.name,this,l),v&&this.element.addEventListener(this.name,this,n),this._$AH=n}handleEvent(n){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,n):this._$AH.handleEvent(n)}}class Fn{constructor(n,i,l){this.element=n,this.type=6,this._$AN=void 0,this._$AM=i,this.options=l}get _$AU(){return this._$AM._$AU}_$AI(n){H(this,n)}}const dn=ce.litHtmlPolyfillSupport;dn?.(L,we),(ce.litHtmlVersions??=[]).push("3.2.0");class Ht extends Ke{constructor(){super(...arguments),this.renderOptions={host:this},this.o=void 0}createRenderRoot(){const n=super.createRenderRoot();return this.renderOptions.renderBefore??=n.firstChild,n}update(n){const i=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(n),this.o=((l,h,v)=>{const x=v?.renderBefore??h;let w=x._$litPart$;if(w===void 0){const C=v?.renderBefore??null;x._$litPart$=w=new we(h.insertBefore(Ve(),C),C,void 0,v??{})}return w._$AI(l),w})(i,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this.o?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this.o?.setConnected(!1)}render(){return Nn}}Ht._$litElement$=!0,Ht.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:Ht});const wi=globalThis.litElementPolyfillSupport;wi?.({LitElement:Ht});function Xr(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,hooks:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}(globalThis.litElementVersions??=[]).push("4.1.0");let fa={async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,hooks:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1};const ho=/[&<>"']/,Ma=new RegExp(ho.source,"g"),cc=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,xu=new RegExp(cc.source,"g"),uc={"&":"&","<":"<",">":">",'"':""","'":"'"},ma=t=>uc[t];function zt(t,n){if(n){if(ho.test(t))return t.replace(Ma,ma)}else if(cc.test(t))return t.replace(xu,ma);return t}const vr=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function Yr(t){return t.replace(vr,((n,i)=>(i=i.toLowerCase())==="colon"?":":i.charAt(0)==="#"?i.charAt(1)==="x"?String.fromCharCode(parseInt(i.substring(2),16)):String.fromCharCode(+i.substring(1)):""))}const Os=/(^|[^\[])\^/g;function Dn(t,n){t=typeof t=="string"?t:t.source,n=n||"";const i={replace:(l,h)=>(h=(h=h.source||h).replace(Os,"$1"),t=t.replace(l,h),i),getRegex:()=>new RegExp(t,n)};return i}const Er=/[^\w:]/g,Ys=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function ll(t,n,i){if(t){let l;try{l=decodeURIComponent(Yr(i)).replace(Er,"").toLowerCase()}catch{return null}if(l.indexOf("javascript:")===0||l.indexOf("vbscript:")===0||l.indexOf("data:")===0)return null}n&&!Ys.test(i)&&(i=(function(l,h){ys[" "+l]||(Zs.test(l)?ys[" "+l]=l+"/":ys[" "+l]=ya(l,"/",!0)),l=ys[" "+l];const v=l.indexOf(":")===-1;return h.substring(0,2)==="//"?v?h:l.replace(bu,"$1")+h:h.charAt(0)==="/"?v?h:l.replace(ga,"$1")+h:l+h})(n,i));try{i=encodeURI(i).replace(/%25/g,"%")}catch{return null}return i}const ys={},Zs=/^[^:]+:\/*[^/]*$/,bu=/^([^:]+:)[\s\S]*$/,ga=/^([^:]+:\/*[^/]*)[\s\S]*$/,wu={exec:function(){}};function Ig(t,n){const i=t.replace(/\|/g,((h,v,x)=>{let w=!1,C=v;for(;--C>=0&&x[C]==="\\";)w=!w;return w?"|":" |"})).split(/ \|/);let l=0;if(i[0].trim()||i.shift(),i.length>0&&!i[i.length-1].trim()&&i.pop(),i.length>n)i.splice(n);else for(;i.length<n;)i.push("");for(;l<i.length;l++)i[l]=i[l].trim().replace(/\\\|/g,"|");return i}function ya(t,n,i){const l=t.length;if(l===0)return"";let h=0;for(;h<l;){const v=t.charAt(l-h-1);if(v!==n||i){if(v===n||!i)break;h++}else h++}return t.slice(0,l-h)}function is(t,n){if(n<1)return"";let i="";for(;n>1;)1&n&&(i+=t),n>>=1,t+=t;return i+t}function Ps(t,n,i,l){const h=n.href,v=n.title?zt(n.title):null,x=t[1].replace(/\\([\[\]])/g,"$1");if(t[0].charAt(0)!=="!"){l.state.inLink=!0;const w={type:"link",raw:i,href:h,title:v,text:x,tokens:l.inlineTokens(x)};return l.state.inLink=!1,w}return{type:"image",raw:i,href:h,title:v,text:zt(x)}}class cl{constructor(n){this.options=n||fa}space(n){const i=this.rules.block.newline.exec(n);if(i&&i[0].length>0)return{type:"space",raw:i[0]}}code(n){const i=this.rules.block.code.exec(n);if(i){const l=i[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:i[0],codeBlockStyle:"indented",text:this.options.pedantic?l:ya(l,`
|
||
`)}}}fences(n){const i=this.rules.block.fences.exec(n);if(i){const l=i[0],h=(function(v,x){const w=v.match(/^(\s+)(?:```)/);if(w===null)return x;const C=w[1];return x.split(`
|
||
`).map(($=>{const N=$.match(/^\s+/);if(N===null)return $;const[_]=N;return _.length>=C.length?$.slice(C.length):$})).join(`
|
||
`)})(l,i[3]||"");return{type:"code",raw:l,lang:i[2]?i[2].trim().replace(this.rules.inline._escapes,"$1"):i[2],text:h}}}heading(n){const i=this.rules.block.heading.exec(n);if(i){let l=i[2].trim();if(/#$/.test(l)){const h=ya(l,"#");this.options.pedantic?l=h.trim():h&&!/ $/.test(h)||(l=h.trim())}return{type:"heading",raw:i[0],depth:i[1].length,text:l,tokens:this.lexer.inline(l)}}}hr(n){const i=this.rules.block.hr.exec(n);if(i)return{type:"hr",raw:i[0]}}blockquote(n){const i=this.rules.block.blockquote.exec(n);if(i){const l=i[0].replace(/^ *>[ \t]?/gm,""),h=this.lexer.state.top;this.lexer.state.top=!0;const v=this.lexer.blockTokens(l);return this.lexer.state.top=h,{type:"blockquote",raw:i[0],tokens:v,text:l}}}list(n){let i=this.rules.block.list.exec(n);if(i){let l,h,v,x,w,C,$,N,_,F,U,J,Y=i[1].trim();const Z=Y.length>1,P={type:"list",raw:"",ordered:Z,start:Z?+Y.slice(0,-1):"",loose:!1,items:[]};Y=Z?`\\d{1,9}\\${Y.slice(-1)}`:`\\${Y}`,this.options.pedantic&&(Y=Z?Y:"[*+-]");const se=new RegExp(`^( {0,3}${Y})((?:[ ][^\\n]*)?(?:\\n|$))`);for(;n&&(J=!1,i=se.exec(n))&&!this.rules.block.hr.test(n);){if(l=i[0],n=n.substring(l.length),N=i[2].split(`
|
||
`,1)[0].replace(/^\t+/,(he=>" ".repeat(3*he.length))),_=n.split(`
|
||
`,1)[0],this.options.pedantic?(x=2,U=N.trimLeft()):(x=i[2].search(/[^ ]/),x=x>4?1:x,U=N.slice(x),x+=i[1].length),C=!1,!N&&/^ *$/.test(_)&&(l+=_+`
|
||
`,n=n.substring(_.length+1),J=!0),!J){const he=new RegExp(`^ {0,${Math.min(3,x-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),ge=new RegExp(`^ {0,${Math.min(3,x-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),pe=new RegExp(`^ {0,${Math.min(3,x-1)}}(?:\`\`\`|~~~)`),Te=new RegExp(`^ {0,${Math.min(3,x-1)}}#`);for(;n&&(F=n.split(`
|
||
`,1)[0],_=F,this.options.pedantic&&(_=_.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!pe.test(_))&&!Te.test(_)&&!he.test(_)&&!ge.test(n);){if(_.search(/[^ ]/)>=x||!_.trim())U+=`
|
||
`+_.slice(x);else{if(C||N.search(/[^ ]/)>=4||pe.test(N)||Te.test(N)||ge.test(N))break;U+=`
|
||
`+_}C||_.trim()||(C=!0),l+=F+`
|
||
`,n=n.substring(F.length+1),N=_.slice(x)}}P.loose||($?P.loose=!0:/\n *\n *$/.test(l)&&($=!0)),this.options.gfm&&(h=/^\[[ xX]\] /.exec(U),h&&(v=h[0]!=="[ ] ",U=U.replace(/^\[[ xX]\] +/,""))),P.items.push({type:"list_item",raw:l,task:!!h,checked:v,loose:!1,text:U}),P.raw+=l}P.items[P.items.length-1].raw=l.trimRight(),P.items[P.items.length-1].text=U.trimRight(),P.raw=P.raw.trimRight();const ae=P.items.length;for(w=0;w<ae;w++)if(this.lexer.state.top=!1,P.items[w].tokens=this.lexer.blockTokens(P.items[w].text,[]),!P.loose){const he=P.items[w].tokens.filter((pe=>pe.type==="space")),ge=he.length>0&&he.some((pe=>/\n.*\n/.test(pe.raw)));P.loose=ge}if(P.loose)for(w=0;w<ae;w++)P.items[w].loose=!0;return P}}html(n){const i=this.rules.block.html.exec(n);if(i){const l={type:"html",raw:i[0],pre:!this.options.sanitizer&&(i[1]==="pre"||i[1]==="script"||i[1]==="style"),text:i[0]};if(this.options.sanitize){const h=this.options.sanitizer?this.options.sanitizer(i[0]):zt(i[0]);l.type="paragraph",l.text=h,l.tokens=this.lexer.inline(h)}return l}}def(n){const i=this.rules.block.def.exec(n);if(i){const l=i[1].toLowerCase().replace(/\s+/g," "),h=i[2]?i[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline._escapes,"$1"):"",v=i[3]?i[3].substring(1,i[3].length-1).replace(this.rules.inline._escapes,"$1"):i[3];return{type:"def",tag:l,raw:i[0],href:h,title:v}}}table(n){const i=this.rules.block.table.exec(n);if(i){const l={type:"table",header:Ig(i[1]).map((h=>({text:h}))),align:i[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:i[3]&&i[3].trim()?i[3].replace(/\n[ \t]*$/,"").split(`
|
||
`):[]};if(l.header.length===l.align.length){l.raw=i[0];let h,v,x,w,C=l.align.length;for(h=0;h<C;h++)/^ *-+: *$/.test(l.align[h])?l.align[h]="right":/^ *:-+: *$/.test(l.align[h])?l.align[h]="center":/^ *:-+ *$/.test(l.align[h])?l.align[h]="left":l.align[h]=null;for(C=l.rows.length,h=0;h<C;h++)l.rows[h]=Ig(l.rows[h],l.header.length).map(($=>({text:$})));for(C=l.header.length,v=0;v<C;v++)l.header[v].tokens=this.lexer.inline(l.header[v].text);for(C=l.rows.length,v=0;v<C;v++)for(w=l.rows[v],x=0;x<w.length;x++)w[x].tokens=this.lexer.inline(w[x].text);return l}}}lheading(n){const i=this.rules.block.lheading.exec(n);if(i)return{type:"heading",raw:i[0],depth:i[2].charAt(0)==="="?1:2,text:i[1],tokens:this.lexer.inline(i[1])}}paragraph(n){const i=this.rules.block.paragraph.exec(n);if(i){const l=i[1].charAt(i[1].length-1)===`
|
||
`?i[1].slice(0,-1):i[1];return{type:"paragraph",raw:i[0],text:l,tokens:this.lexer.inline(l)}}}text(n){const i=this.rules.block.text.exec(n);if(i)return{type:"text",raw:i[0],text:i[0],tokens:this.lexer.inline(i[0])}}escape(n){const i=this.rules.inline.escape.exec(n);if(i)return{type:"escape",raw:i[0],text:zt(i[1])}}tag(n){const i=this.rules.inline.tag.exec(n);if(i)return!this.lexer.state.inLink&&/^<a /i.test(i[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(i[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(i[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(i[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:i[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(i[0]):zt(i[0]):i[0]}}link(n){const i=this.rules.inline.link.exec(n);if(i){const l=i[2].trim();if(!this.options.pedantic&&/^</.test(l)){if(!/>$/.test(l))return;const x=ya(l.slice(0,-1),"\\");if((l.length-x.length)%2==0)return}else{const x=(function(w,C){if(w.indexOf(C[1])===-1)return-1;const $=w.length;let N=0,_=0;for(;_<$;_++)if(w[_]==="\\")_++;else if(w[_]===C[0])N++;else if(w[_]===C[1]&&(N--,N<0))return _;return-1})(i[2],"()");if(x>-1){const w=(i[0].indexOf("!")===0?5:4)+i[1].length+x;i[2]=i[2].substring(0,x),i[0]=i[0].substring(0,w).trim(),i[3]=""}}let h=i[2],v="";if(this.options.pedantic){const x=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(h);x&&(h=x[1],v=x[3])}else v=i[3]?i[3].slice(1,-1):"";return h=h.trim(),/^</.test(h)&&(h=this.options.pedantic&&!/>$/.test(l)?h.slice(1):h.slice(1,-1)),Ps(i,{href:h&&h.replace(this.rules.inline._escapes,"$1"),title:v&&v.replace(this.rules.inline._escapes,"$1")},i[0],this.lexer)}}reflink(n,i){let l;if((l=this.rules.inline.reflink.exec(n))||(l=this.rules.inline.nolink.exec(n))){let h=(l[2]||l[1]).replace(/\s+/g," ");if(h=i[h.toLowerCase()],!h){const v=l[0].charAt(0);return{type:"text",raw:v,text:v}}return Ps(l,h,l[0],this.lexer)}}emStrong(n,i,l=""){let h=this.rules.inline.emStrong.lDelim.exec(n);if(!h||h[3]&&l.match(/[\p{L}\p{N}]/u))return;const v=h[1]||h[2]||"";if(!v||v&&(l===""||this.rules.inline.punctuation.exec(l))){const x=h[0].length-1;let w,C,$=x,N=0;const _=h[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(_.lastIndex=0,i=i.slice(-1*n.length+x);(h=_.exec(i))!=null;){if(w=h[1]||h[2]||h[3]||h[4]||h[5]||h[6],!w)continue;if(C=w.length,h[3]||h[4]){$+=C;continue}if((h[5]||h[6])&&x%3&&!((x+C)%3)){N+=C;continue}if($-=C,$>0)continue;C=Math.min(C,C+$+N);const F=n.slice(0,x+h.index+(h[0].length-w.length)+C);if(Math.min(x,C)%2){const J=F.slice(1,-1);return{type:"em",raw:F,text:J,tokens:this.lexer.inlineTokens(J)}}const U=F.slice(2,-2);return{type:"strong",raw:F,text:U,tokens:this.lexer.inlineTokens(U)}}}}codespan(n){const i=this.rules.inline.code.exec(n);if(i){let l=i[2].replace(/\n/g," ");const h=/[^ ]/.test(l),v=/^ /.test(l)&&/ $/.test(l);return h&&v&&(l=l.substring(1,l.length-1)),l=zt(l,!0),{type:"codespan",raw:i[0],text:l}}}br(n){const i=this.rules.inline.br.exec(n);if(i)return{type:"br",raw:i[0]}}del(n){const i=this.rules.inline.del.exec(n);if(i)return{type:"del",raw:i[0],text:i[2],tokens:this.lexer.inlineTokens(i[2])}}autolink(n,i){const l=this.rules.inline.autolink.exec(n);if(l){let h,v;return l[2]==="@"?(h=zt(this.options.mangle?i(l[1]):l[1]),v="mailto:"+h):(h=zt(l[1]),v=h),{type:"link",raw:l[0],text:h,href:v,tokens:[{type:"text",raw:h,text:h}]}}}url(n,i){let l;if(l=this.rules.inline.url.exec(n)){let h,v;if(l[2]==="@")h=zt(this.options.mangle?i(l[0]):l[0]),v="mailto:"+h;else{let x;do x=l[0],l[0]=this.rules.inline._backpedal.exec(l[0])[0];while(x!==l[0]);h=zt(l[0]),v=l[1]==="www."?"http://"+l[0]:l[0]}return{type:"link",raw:l[0],text:h,href:v,tokens:[{type:"text",raw:h,text:h}]}}}inlineText(n,i){const l=this.rules.inline.text.exec(n);if(l){let h;return h=this.lexer.state.inRawBlock?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(l[0]):zt(l[0]):l[0]:zt(this.options.smartypants?i(l[0]):l[0]),{type:"text",raw:l[0],text:h}}}}const Gt={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:wu,lheading:/^((?:.|\n(?!\n))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\.|[^\[\]\\])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};Gt.def=Dn(Gt.def).replace("label",Gt._label).replace("title",Gt._title).getRegex(),Gt.bullet=/(?:[*+-]|\d{1,9}[.)])/,Gt.listItemStart=Dn(/^( *)(bull) */).replace("bull",Gt.bullet).getRegex(),Gt.list=Dn(Gt.list).replace(/bull/g,Gt.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+Gt.def.source+")").getRegex(),Gt._tag="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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Gt._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,Gt.html=Dn(Gt.html,"i").replace("comment",Gt._comment).replace("tag",Gt._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Gt.paragraph=Dn(Gt._paragraph).replace("hr",Gt.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Gt._tag).getRegex(),Gt.blockquote=Dn(Gt.blockquote).replace("paragraph",Gt.paragraph).getRegex(),Gt.normal={...Gt},Gt.gfm={...Gt.normal,table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"},Gt.gfm.table=Dn(Gt.gfm.table).replace("hr",Gt.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Gt._tag).getRegex(),Gt.gfm.paragraph=Dn(Gt._paragraph).replace("hr",Gt.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",Gt.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Gt._tag).getRegex(),Gt.pedantic={...Gt.normal,html:Dn(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Gt._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:wu,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Dn(Gt.normal._paragraph).replace("hr",Gt.hr).replace("heading",` *#{1,6} *[^
|
||
]`).replace("lheading",Gt.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()};const Nt={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:wu,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^(?:[^_*\\]|\\.)*?\_\_(?:[^_*\\]|\\.)*?\*(?:[^_*\\]|\\.)*?(?=\_\_)|(?:[^*\\]|\\.)+(?=[^*])|[punct_](\*+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|(?:[^punct*_\s\\]|\\.)(\*+)(?=[^punct*_\s])/,rDelimUnd:/^(?:[^_*\\]|\\.)*?\*\*(?:[^_*\\]|\\.)*?\_(?:[^_*\\]|\\.)*?(?=\*\*)|(?:[^_\\]|\\.)+(?=[^_])|[punct*](\_+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:wu,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};function tA(t){return t.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…")}function zg(t){let n,i,l="";const h=t.length;for(n=0;n<h;n++)i=t.charCodeAt(n),Math.random()>.5&&(i="x"+i.toString(16)),l+="&#"+i+";";return l}Nt._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",Nt.punctuation=Dn(Nt.punctuation).replace(/punctuation/g,Nt._punctuation).getRegex(),Nt.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,Nt.escapedEmSt=/(?:^|[^\\])(?:\\\\)*\\[*_]/g,Nt._comment=Dn(Gt._comment).replace("(?:-->|$)","-->").getRegex(),Nt.emStrong.lDelim=Dn(Nt.emStrong.lDelim).replace(/punct/g,Nt._punctuation).getRegex(),Nt.emStrong.rDelimAst=Dn(Nt.emStrong.rDelimAst,"g").replace(/punct/g,Nt._punctuation).getRegex(),Nt.emStrong.rDelimUnd=Dn(Nt.emStrong.rDelimUnd,"g").replace(/punct/g,Nt._punctuation).getRegex(),Nt._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,Nt._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,Nt._email=/[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])?)+(?![-_])/,Nt.autolink=Dn(Nt.autolink).replace("scheme",Nt._scheme).replace("email",Nt._email).getRegex(),Nt._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,Nt.tag=Dn(Nt.tag).replace("comment",Nt._comment).replace("attribute",Nt._attribute).getRegex(),Nt._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Nt._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,Nt._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,Nt.link=Dn(Nt.link).replace("label",Nt._label).replace("href",Nt._href).replace("title",Nt._title).getRegex(),Nt.reflink=Dn(Nt.reflink).replace("label",Nt._label).replace("ref",Gt._label).getRegex(),Nt.nolink=Dn(Nt.nolink).replace("ref",Gt._label).getRegex(),Nt.reflinkSearch=Dn(Nt.reflinkSearch,"g").replace("reflink",Nt.reflink).replace("nolink",Nt.nolink).getRegex(),Nt.normal={...Nt},Nt.pedantic={...Nt.normal,strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:Dn(/^!?\[(label)\]\((.*?)\)/).replace("label",Nt._label).getRegex(),reflink:Dn(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Nt._label).getRegex()},Nt.gfm={...Nt.normal,escape:Dn(Nt.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},Nt.gfm.url=Dn(Nt.gfm.url,"i").replace("email",Nt.gfm._extended_email).getRegex(),Nt.breaks={...Nt.gfm,br:Dn(Nt.br).replace("{2,}","*").getRegex(),text:Dn(Nt.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()};class Vi{constructor(n){this.tokens=[],this.tokens.links=Object.create(null),this.options=n||fa,this.options.tokenizer=this.options.tokenizer||new cl,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const i={block:Gt.normal,inline:Nt.normal};this.options.pedantic?(i.block=Gt.pedantic,i.inline=Nt.pedantic):this.options.gfm&&(i.block=Gt.gfm,this.options.breaks?i.inline=Nt.breaks:i.inline=Nt.gfm),this.tokenizer.rules=i}static get rules(){return{block:Gt,inline:Nt}}static lex(n,i){return new Vi(i).lex(n)}static lexInline(n,i){return new Vi(i).inlineTokens(n)}lex(n){let i;for(n=n.replace(/\r\n|\r/g,`
|
||
`),this.blockTokens(n,this.tokens);i=this.inlineQueue.shift();)this.inlineTokens(i.src,i.tokens);return this.tokens}blockTokens(n,i=[]){let l,h,v,x;for(n=this.options.pedantic?n.replace(/\t/g," ").replace(/^ +$/gm,""):n.replace(/^( *)(\t+)/gm,((w,C,$)=>C+" ".repeat($.length)));n;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((w=>!!(l=w.call({lexer:this},n,i))&&(n=n.substring(l.raw.length),i.push(l),!0)))))if(l=this.tokenizer.space(n))n=n.substring(l.raw.length),l.raw.length===1&&i.length>0?i[i.length-1].raw+=`
|
||
`:i.push(l);else if(l=this.tokenizer.code(n))n=n.substring(l.raw.length),h=i[i.length-1],!h||h.type!=="paragraph"&&h.type!=="text"?i.push(l):(h.raw+=`
|
||
`+l.raw,h.text+=`
|
||
`+l.text,this.inlineQueue[this.inlineQueue.length-1].src=h.text);else if(l=this.tokenizer.fences(n))n=n.substring(l.raw.length),i.push(l);else if(l=this.tokenizer.heading(n))n=n.substring(l.raw.length),i.push(l);else if(l=this.tokenizer.hr(n))n=n.substring(l.raw.length),i.push(l);else if(l=this.tokenizer.blockquote(n))n=n.substring(l.raw.length),i.push(l);else if(l=this.tokenizer.list(n))n=n.substring(l.raw.length),i.push(l);else if(l=this.tokenizer.html(n))n=n.substring(l.raw.length),i.push(l);else if(l=this.tokenizer.def(n))n=n.substring(l.raw.length),h=i[i.length-1],!h||h.type!=="paragraph"&&h.type!=="text"?this.tokens.links[l.tag]||(this.tokens.links[l.tag]={href:l.href,title:l.title}):(h.raw+=`
|
||
`+l.raw,h.text+=`
|
||
`+l.raw,this.inlineQueue[this.inlineQueue.length-1].src=h.text);else if(l=this.tokenizer.table(n))n=n.substring(l.raw.length),i.push(l);else if(l=this.tokenizer.lheading(n))n=n.substring(l.raw.length),i.push(l);else{if(v=n,this.options.extensions&&this.options.extensions.startBlock){let w=1/0;const C=n.slice(1);let $;this.options.extensions.startBlock.forEach((function(N){$=N.call({lexer:this},C),typeof $=="number"&&$>=0&&(w=Math.min(w,$))})),w<1/0&&w>=0&&(v=n.substring(0,w+1))}if(this.state.top&&(l=this.tokenizer.paragraph(v)))h=i[i.length-1],x&&h.type==="paragraph"?(h.raw+=`
|
||
`+l.raw,h.text+=`
|
||
`+l.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=h.text):i.push(l),x=v.length!==n.length,n=n.substring(l.raw.length);else if(l=this.tokenizer.text(n))n=n.substring(l.raw.length),h=i[i.length-1],h&&h.type==="text"?(h.raw+=`
|
||
`+l.raw,h.text+=`
|
||
`+l.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=h.text):i.push(l);else if(n){const w="Infinite loop on byte: "+n.charCodeAt(0);if(this.options.silent){console.error(w);break}throw new Error(w)}}return this.state.top=!0,i}inline(n,i=[]){return this.inlineQueue.push({src:n,tokens:i}),i}inlineTokens(n,i=[]){let l,h,v,x,w,C,$=n;if(this.tokens.links){const N=Object.keys(this.tokens.links);if(N.length>0)for(;(x=this.tokenizer.rules.inline.reflinkSearch.exec($))!=null;)N.includes(x[0].slice(x[0].lastIndexOf("[")+1,-1))&&($=$.slice(0,x.index)+"["+is("a",x[0].length-2)+"]"+$.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(x=this.tokenizer.rules.inline.blockSkip.exec($))!=null;)$=$.slice(0,x.index)+"["+is("a",x[0].length-2)+"]"+$.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(x=this.tokenizer.rules.inline.escapedEmSt.exec($))!=null;)$=$.slice(0,x.index+x[0].length-2)+"++"+$.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex),this.tokenizer.rules.inline.escapedEmSt.lastIndex--;for(;n;)if(w||(C=""),w=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((N=>!!(l=N.call({lexer:this},n,i))&&(n=n.substring(l.raw.length),i.push(l),!0)))))if(l=this.tokenizer.escape(n))n=n.substring(l.raw.length),i.push(l);else if(l=this.tokenizer.tag(n))n=n.substring(l.raw.length),h=i[i.length-1],h&&l.type==="text"&&h.type==="text"?(h.raw+=l.raw,h.text+=l.text):i.push(l);else if(l=this.tokenizer.link(n))n=n.substring(l.raw.length),i.push(l);else if(l=this.tokenizer.reflink(n,this.tokens.links))n=n.substring(l.raw.length),h=i[i.length-1],h&&l.type==="text"&&h.type==="text"?(h.raw+=l.raw,h.text+=l.text):i.push(l);else if(l=this.tokenizer.emStrong(n,$,C))n=n.substring(l.raw.length),i.push(l);else if(l=this.tokenizer.codespan(n))n=n.substring(l.raw.length),i.push(l);else if(l=this.tokenizer.br(n))n=n.substring(l.raw.length),i.push(l);else if(l=this.tokenizer.del(n))n=n.substring(l.raw.length),i.push(l);else if(l=this.tokenizer.autolink(n,zg))n=n.substring(l.raw.length),i.push(l);else if(this.state.inLink||!(l=this.tokenizer.url(n,zg))){if(v=n,this.options.extensions&&this.options.extensions.startInline){let N=1/0;const _=n.slice(1);let F;this.options.extensions.startInline.forEach((function(U){F=U.call({lexer:this},_),typeof F=="number"&&F>=0&&(N=Math.min(N,F))})),N<1/0&&N>=0&&(v=n.substring(0,N+1))}if(l=this.tokenizer.inlineText(v,tA))n=n.substring(l.raw.length),l.raw.slice(-1)!=="_"&&(C=l.raw.slice(-1)),w=!0,h=i[i.length-1],h&&h.type==="text"?(h.raw+=l.raw,h.text+=l.text):i.push(l);else if(n){const N="Infinite loop on byte: "+n.charCodeAt(0);if(this.options.silent){console.error(N);break}throw new Error(N)}}else n=n.substring(l.raw.length),i.push(l);return i}}class Qd{constructor(n){this.options=n||fa}code(n,i,l){const h=(i||"").match(/\S*/)[0];if(this.options.highlight){const v=this.options.highlight(n,h);v!=null&&v!==n&&(l=!0,n=v)}return n=n.replace(/\n$/,"")+`
|
||
`,h?'<pre><code class="'+this.options.langPrefix+zt(h)+'">'+(l?n:zt(n,!0))+`</code></pre>
|
||
`:"<pre><code>"+(l?n:zt(n,!0))+`</code></pre>
|
||
`}blockquote(n){return`<blockquote>
|
||
${n}</blockquote>
|
||
`}html(n){return n}heading(n,i,l,h){return this.options.headerIds?`<h${i} id="${this.options.headerPrefix+h.slug(l)}">${n}</h${i}>
|
||
`:`<h${i}>${n}</h${i}>
|
||
`}hr(){return this.options.xhtml?`<hr/>
|
||
`:`<hr>
|
||
`}list(n,i,l){const h=i?"ol":"ul";return"<"+h+(i&&l!==1?' start="'+l+'"':"")+`>
|
||
`+n+"</"+h+`>
|
||
`}listitem(n){return`<li>${n}</li>
|
||
`}checkbox(n){return"<input "+(n?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "}paragraph(n){return`<p>${n}</p>
|
||
`}table(n,i){return i&&(i=`<tbody>${i}</tbody>`),`<table>
|
||
<thead>
|
||
`+n+`</thead>
|
||
`+i+`</table>
|
||
`}tablerow(n){return`<tr>
|
||
${n}</tr>
|
||
`}tablecell(n,i){const l=i.header?"th":"td";return(i.align?`<${l} align="${i.align}">`:`<${l}>`)+n+`</${l}>
|
||
`}strong(n){return`<strong>${n}</strong>`}em(n){return`<em>${n}</em>`}codespan(n){return`<code>${n}</code>`}br(){return this.options.xhtml?"<br/>":"<br>"}del(n){return`<del>${n}</del>`}link(n,i,l){if((n=ll(this.options.sanitize,this.options.baseUrl,n))===null)return l;let h='<a href="'+n+'"';return i&&(h+=' title="'+i+'"'),h+=">"+l+"</a>",h}image(n,i,l){if((n=ll(this.options.sanitize,this.options.baseUrl,n))===null)return l;let h=`<img src="${n}" alt="${l}"`;return i&&(h+=` title="${i}"`),h+=this.options.xhtml?"/>":">",h}text(n){return n}}class dc{strong(n){return n}em(n){return n}codespan(n){return n}del(n){return n}html(n){return n}text(n){return n}link(n,i,l){return""+l}image(n,i,l){return""+l}br(){return""}}class hc{constructor(){this.seen={}}serialize(n){return n.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}getNextSafeSlug(n,i){let l=n,h=0;if(this.seen.hasOwnProperty(l)){h=this.seen[n];do h++,l=n+"-"+h;while(this.seen.hasOwnProperty(l))}return i||(this.seen[n]=h,this.seen[l]=0),l}slug(n,i={}){const l=this.serialize(n);return this.getNextSafeSlug(l,i.dryrun)}}class Hi{constructor(n){this.options=n||fa,this.options.renderer=this.options.renderer||new Qd,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new dc,this.slugger=new hc}static parse(n,i){return new Hi(i).parse(n)}static parseInline(n,i){return new Hi(i).parseInline(n)}parse(n,i=!0){let l,h,v,x,w,C,$,N,_,F,U,J,Y,Z,P,se,ae,he,ge,pe="";const Te=n.length;for(l=0;l<Te;l++)if(F=n[l],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[F.type]&&(ge=this.options.extensions.renderers[F.type].call({parser:this},F),ge!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(F.type)))pe+=ge||"";else switch(F.type){case"space":continue;case"hr":pe+=this.renderer.hr();continue;case"heading":pe+=this.renderer.heading(this.parseInline(F.tokens),F.depth,Yr(this.parseInline(F.tokens,this.textRenderer)),this.slugger);continue;case"code":pe+=this.renderer.code(F.text,F.lang,F.escaped);continue;case"table":for(N="",$="",x=F.header.length,h=0;h<x;h++)$+=this.renderer.tablecell(this.parseInline(F.header[h].tokens),{header:!0,align:F.align[h]});for(N+=this.renderer.tablerow($),_="",x=F.rows.length,h=0;h<x;h++){for(C=F.rows[h],$="",w=C.length,v=0;v<w;v++)$+=this.renderer.tablecell(this.parseInline(C[v].tokens),{header:!1,align:F.align[v]});_+=this.renderer.tablerow($)}pe+=this.renderer.table(N,_);continue;case"blockquote":_=this.parse(F.tokens),pe+=this.renderer.blockquote(_);continue;case"list":for(U=F.ordered,J=F.start,Y=F.loose,x=F.items.length,_="",h=0;h<x;h++)P=F.items[h],se=P.checked,ae=P.task,Z="",P.task&&(he=this.renderer.checkbox(se),Y?P.tokens.length>0&&P.tokens[0].type==="paragraph"?(P.tokens[0].text=he+" "+P.tokens[0].text,P.tokens[0].tokens&&P.tokens[0].tokens.length>0&&P.tokens[0].tokens[0].type==="text"&&(P.tokens[0].tokens[0].text=he+" "+P.tokens[0].tokens[0].text)):P.tokens.unshift({type:"text",text:he}):Z+=he),Z+=this.parse(P.tokens,Y),_+=this.renderer.listitem(Z,ae,se);pe+=this.renderer.list(_,U,J);continue;case"html":pe+=this.renderer.html(F.text);continue;case"paragraph":pe+=this.renderer.paragraph(this.parseInline(F.tokens));continue;case"text":for(_=F.tokens?this.parseInline(F.tokens):F.text;l+1<Te&&n[l+1].type==="text";)F=n[++l],_+=`
|
||
`+(F.tokens?this.parseInline(F.tokens):F.text);pe+=i?this.renderer.paragraph(_):_;continue;default:{const Ae='Token with "'+F.type+'" type was not found.';if(this.options.silent)return void console.error(Ae);throw new Error(Ae)}}return pe}parseInline(n,i){i=i||this.renderer;let l,h,v,x="";const w=n.length;for(l=0;l<w;l++)if(h=n[l],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[h.type]&&(v=this.options.extensions.renderers[h.type].call({parser:this},h),v!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(h.type)))x+=v||"";else switch(h.type){case"escape":case"text":x+=i.text(h.text);break;case"html":x+=i.html(h.text);break;case"link":x+=i.link(h.href,h.title,this.parseInline(h.tokens,i));break;case"image":x+=i.image(h.href,h.title,h.text);break;case"strong":x+=i.strong(this.parseInline(h.tokens,i));break;case"em":x+=i.em(this.parseInline(h.tokens,i));break;case"codespan":x+=i.codespan(h.text);break;case"br":x+=i.br();break;case"del":x+=i.del(this.parseInline(h.tokens,i));break;default:{const C='Token with "'+h.type+'" type was not found.';if(this.options.silent)return void console.error(C);throw new Error(C)}}return x}}class ul{constructor(n){this.options=n||fa}static passThroughHooks=new Set(["preprocess","postprocess"]);preprocess(n){return n}postprocess(n){return n}}function Zr(t,n){return(i,l,h)=>{typeof l=="function"&&(h=l,l=null);const v={...l},x=(function(w,C,$){return N=>{if(N.message+=`
|
||
Please report this to https://github.com/markedjs/marked.`,w){const _="<p>An error occurred:</p><pre>"+zt(N.message+"",!0)+"</pre>";return C?Promise.resolve(_):$?void $(null,_):_}if(C)return Promise.reject(N);if(!$)throw N;$(N)}})((l={...dt.defaults,...v}).silent,l.async,h);if(i==null)return x(new Error("marked(): input parameter is undefined or null"));if(typeof i!="string")return x(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(i)+", string expected"));if((function(w){w&&w.sanitize&&!w.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")})(l),l.hooks&&(l.hooks.options=l),h){const w=l.highlight;let C;try{l.hooks&&(i=l.hooks.preprocess(i)),C=t(i,l)}catch(_){return x(_)}const $=function(_){let F;if(!_)try{l.walkTokens&&dt.walkTokens(C,l.walkTokens),F=n(C,l),l.hooks&&(F=l.hooks.postprocess(F))}catch(U){_=U}return l.highlight=w,_?x(_):h(null,F)};if(!w||w.length<3||(delete l.highlight,!C.length))return $();let N=0;return dt.walkTokens(C,(function(_){_.type==="code"&&(N++,setTimeout((()=>{w(_.text,_.lang,(function(F,U){if(F)return $(F);U!=null&&U!==_.text&&(_.text=U,_.escaped=!0),N--,N===0&&$()}))}),0))})),void(N===0&&$())}if(l.async)return Promise.resolve(l.hooks?l.hooks.preprocess(i):i).then((w=>t(w,l))).then((w=>l.walkTokens?Promise.all(dt.walkTokens(w,l.walkTokens)).then((()=>w)):w)).then((w=>n(w,l))).then((w=>l.hooks?l.hooks.postprocess(w):w)).catch(x);try{l.hooks&&(i=l.hooks.preprocess(i));const w=t(i,l);l.walkTokens&&dt.walkTokens(w,l.walkTokens);let C=n(w,l);return l.hooks&&(C=l.hooks.postprocess(C)),C}catch(w){return x(w)}}}function dt(t,n,i){return Zr(Vi.lex,Hi.parse)(t,n,i)}dt.options=dt.setOptions=function(t){var n;return dt.defaults={...dt.defaults,...t},n=dt.defaults,fa=n,dt},dt.getDefaults=Xr,dt.defaults=fa,dt.use=function(...t){const n=dt.defaults.extensions||{renderers:{},childTokens:{}};t.forEach((i=>{const l={...i};if(l.async=dt.defaults.async||l.async||!1,i.extensions&&(i.extensions.forEach((h=>{if(!h.name)throw new Error("extension name required");if(h.renderer){const v=n.renderers[h.name];n.renderers[h.name]=v?function(...x){let w=h.renderer.apply(this,x);return w===!1&&(w=v.apply(this,x)),w}:h.renderer}if(h.tokenizer){if(!h.level||h.level!=="block"&&h.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");n[h.level]?n[h.level].unshift(h.tokenizer):n[h.level]=[h.tokenizer],h.start&&(h.level==="block"?n.startBlock?n.startBlock.push(h.start):n.startBlock=[h.start]:h.level==="inline"&&(n.startInline?n.startInline.push(h.start):n.startInline=[h.start]))}h.childTokens&&(n.childTokens[h.name]=h.childTokens)})),l.extensions=n),i.renderer){const h=dt.defaults.renderer||new Qd;for(const v in i.renderer){const x=h[v];h[v]=(...w)=>{let C=i.renderer[v].apply(h,w);return C===!1&&(C=x.apply(h,w)),C}}l.renderer=h}if(i.tokenizer){const h=dt.defaults.tokenizer||new cl;for(const v in i.tokenizer){const x=h[v];h[v]=(...w)=>{let C=i.tokenizer[v].apply(h,w);return C===!1&&(C=x.apply(h,w)),C}}l.tokenizer=h}if(i.hooks){const h=dt.defaults.hooks||new ul;for(const v in i.hooks){const x=h[v];ul.passThroughHooks.has(v)?h[v]=w=>{if(dt.defaults.async)return Promise.resolve(i.hooks[v].call(h,w)).then(($=>x.call(h,$)));const C=i.hooks[v].call(h,w);return x.call(h,C)}:h[v]=(...w)=>{let C=i.hooks[v].apply(h,w);return C===!1&&(C=x.apply(h,w)),C}}l.hooks=h}if(i.walkTokens){const h=dt.defaults.walkTokens;l.walkTokens=function(v){let x=[];return x.push(i.walkTokens.call(this,v)),h&&(x=x.concat(h.call(this,v))),x}}dt.setOptions(l)}))},dt.walkTokens=function(t,n){let i=[];for(const l of t)switch(i=i.concat(n.call(dt,l)),l.type){case"table":for(const h of l.header)i=i.concat(dt.walkTokens(h.tokens,n));for(const h of l.rows)for(const v of h)i=i.concat(dt.walkTokens(v.tokens,n));break;case"list":i=i.concat(dt.walkTokens(l.items,n));break;default:dt.defaults.extensions&&dt.defaults.extensions.childTokens&&dt.defaults.extensions.childTokens[l.type]?dt.defaults.extensions.childTokens[l.type].forEach((function(h){i=i.concat(dt.walkTokens(l[h],n))})):l.tokens&&(i=i.concat(dt.walkTokens(l.tokens,n)))}return i},dt.parseInline=Zr(Vi.lexInline,Hi.parseInline),dt.Parser=Hi,dt.parser=Hi.parse,dt.Renderer=Qd,dt.TextRenderer=dc,dt.Lexer=Vi,dt.lexer=Vi.lex,dt.Tokenizer=cl,dt.Slugger=hc,dt.Hooks=ul,dt.parse=dt,dt.options,dt.setOptions,dt.use,dt.walkTokens,dt.parseInline,Hi.parse,Vi.lex;var ww=g(848),sr=g.n(ww);g(113),g(83),g(378),g(976),g(514),g(22),g(342),g(784),g(651);const Si=M`
|
||
.hover-bg:hover {
|
||
background: var(--bg3);
|
||
}
|
||
::selection {
|
||
background: var(--selection-bg);
|
||
color: var(--selection-fg);
|
||
}
|
||
.regular-font {
|
||
font-family:var(--font-regular);
|
||
}
|
||
.mono-font {
|
||
font-family:var(--font-mono);
|
||
}
|
||
.title {
|
||
font-size: calc(var(--font-size-small) + 18px);
|
||
font-weight: normal
|
||
}
|
||
.sub-title{ font-size: 20px; }
|
||
.req-res-title {
|
||
font-family: var(--font-regular);
|
||
font-size: calc(var(--font-size-small) + 4px);
|
||
font-weight:bold;
|
||
margin-bottom:8px;
|
||
text-align:left;
|
||
}
|
||
.tiny-title {
|
||
font-size:calc(var(--font-size-small) + 1px);
|
||
font-weight:bold;
|
||
}
|
||
.regular-font-size { font-size: var(--font-size-regular); }
|
||
.small-font-size { font-size: var(--font-size-small); }
|
||
.upper { text-transform: uppercase; }
|
||
.primary-text { color: var(--primary-color); }
|
||
.bold-text { font-weight:bold; }
|
||
.gray-text { color: var(--light-fg); }
|
||
.red-text { color: var(--red) }
|
||
.blue-text { color: var(--blue) }
|
||
.multiline {
|
||
overflow: scroll;
|
||
max-height: var(--resp-area-height, 400px);
|
||
color: var(--fg3);
|
||
}
|
||
.method-fg.put { color: var(--orange); }
|
||
.method-fg.post { color: var(--green); }
|
||
.method-fg.get { color: var(--blue); }
|
||
.method-fg.delete { color: var(--red); }
|
||
.method-fg.options,
|
||
.method-fg.head,
|
||
.method-fg.patch {
|
||
color: var(--yellow);
|
||
}
|
||
|
||
h1 { font-family:var(--font-regular); font-size:28px; padding-top: 10px; letter-spacing:normal; font-weight:normal; }
|
||
h2 { font-family:var(--font-regular); font-size:24px; padding-top: 10px; letter-spacing:normal; font-weight:normal; }
|
||
h3 { font-family:var(--font-regular); font-size:18px; padding-top: 10px; letter-spacing:normal; font-weight:normal; }
|
||
h4 { font-family:var(--font-regular); font-size:16px; padding-top: 10px; letter-spacing:normal; font-weight:normal; }
|
||
h5 { font-family:var(--font-regular); font-size:14px; padding-top: 10px; letter-spacing:normal; font-weight:normal; }
|
||
h6 { font-family:var(--font-regular); font-size:14px; padding-top: 10px; letter-spacing:normal; font-weight:normal; }
|
||
|
||
h1,h2,h3,h4,h5,h5 {
|
||
margin-block-end: 0.2em;
|
||
}
|
||
p { margin-block-start: 0.5em; }
|
||
a { color: var(--blue); cursor:pointer; }
|
||
a.inactive-link {
|
||
color:var(--fg);
|
||
text-decoration: none;
|
||
cursor:text;
|
||
}
|
||
|
||
code,
|
||
pre {
|
||
margin: 0px;
|
||
font-family: var(--font-mono);
|
||
font-size: calc(var(--font-size-mono) - 1px);
|
||
}
|
||
|
||
.m-markdown,
|
||
.m-markdown-small {
|
||
display:block;
|
||
}
|
||
|
||
.m-markdown p,
|
||
.m-markdown span {
|
||
font-size: var(--font-size-regular);
|
||
line-height:calc(var(--font-size-regular) + 8px);
|
||
}
|
||
.m-markdown li {
|
||
font-size: var(--font-size-regular);
|
||
line-height:calc(var(--font-size-regular) + 10px);
|
||
}
|
||
|
||
.m-markdown-small p,
|
||
.m-markdown-small span,
|
||
.m-markdown-small li {
|
||
font-size: var(--font-size-small);
|
||
line-height: calc(var(--font-size-small) + 6px);
|
||
}
|
||
.m-markdown-small li {
|
||
line-height: calc(var(--font-size-small) + 8px);
|
||
}
|
||
|
||
.m-markdown p:not(:first-child) {
|
||
margin-block-start: 24px;
|
||
}
|
||
|
||
.m-markdown-small p:not(:first-child) {
|
||
margin-block-start: 12px;
|
||
}
|
||
.m-markdown-small p:first-child {
|
||
margin-block-start: 0;
|
||
}
|
||
|
||
.m-markdown p,
|
||
.m-markdown-small p {
|
||
margin-block-end: 0
|
||
}
|
||
|
||
.m-markdown code span {
|
||
font-size:var(--font-size-mono);
|
||
}
|
||
|
||
.m-markdown-small code,
|
||
.m-markdown code {
|
||
padding: 1px 6px;
|
||
border-radius: 2px;
|
||
color: var(--inline-code-fg);
|
||
background-color: var(--bg3);
|
||
font-size: calc(var(--font-size-mono));
|
||
line-height: 1.2;
|
||
}
|
||
|
||
.m-markdown-small code {
|
||
font-size: calc(var(--font-size-mono) - 1px);
|
||
}
|
||
|
||
.m-markdown-small pre,
|
||
.m-markdown pre {
|
||
white-space: pre-wrap;
|
||
overflow-x: auto;
|
||
line-height: normal;
|
||
border-radius: 2px;
|
||
border: 1px solid var(--code-border-color);
|
||
}
|
||
|
||
.m-markdown pre {
|
||
padding: 12px;
|
||
background-color: var(--code-bg);
|
||
color:var(--code-fg);
|
||
}
|
||
|
||
.m-markdown-small pre {
|
||
margin-top: 4px;
|
||
padding: 2px 4px;
|
||
background-color: var(--bg3);
|
||
color: var(--fg2);
|
||
}
|
||
|
||
.m-markdown-small pre code,
|
||
.m-markdown pre code {
|
||
border:none;
|
||
padding:0;
|
||
}
|
||
|
||
.m-markdown pre code {
|
||
color: var(--code-fg);
|
||
background-color: var(--code-bg);
|
||
background-color: transparent;
|
||
}
|
||
|
||
.m-markdown-small pre code {
|
||
color: var(--fg2);
|
||
background-color: var(--bg3);
|
||
}
|
||
|
||
.m-markdown ul,
|
||
.m-markdown ol {
|
||
padding-inline-start: 30px;
|
||
}
|
||
|
||
.m-markdown-small ul,
|
||
.m-markdown-small ol {
|
||
padding-inline-start: 20px;
|
||
}
|
||
|
||
.m-markdown-small a,
|
||
.m-markdown a {
|
||
color:var(--blue);
|
||
}
|
||
|
||
.m-markdown-small img,
|
||
.m-markdown img {
|
||
max-width: 100%;
|
||
}
|
||
|
||
/* Markdown table */
|
||
|
||
.m-markdown-small table,
|
||
.m-markdown table {
|
||
border-spacing: 0;
|
||
margin: 10px 0;
|
||
border-collapse: separate;
|
||
border: 1px solid var(--border-color);
|
||
border-radius: var(--border-radius);
|
||
font-size: calc(var(--font-size-small) + 1px);
|
||
line-height: calc(var(--font-size-small) + 4px);
|
||
max-width: 100%;
|
||
}
|
||
|
||
.m-markdown-small table {
|
||
font-size: var(--font-size-small);
|
||
line-height: calc(var(--font-size-small) + 2px);
|
||
margin: 8px 0;
|
||
}
|
||
|
||
.m-markdown-small td,
|
||
.m-markdown-small th,
|
||
.m-markdown td,
|
||
.m-markdown th {
|
||
vertical-align: top;
|
||
border-top: 1px solid var(--border-color);
|
||
line-height: calc(var(--font-size-small) + 4px);
|
||
}
|
||
|
||
.m-markdown-small tr:first-child th,
|
||
.m-markdown tr:first-child th {
|
||
border-top: 0 none;
|
||
}
|
||
|
||
.m-markdown th,
|
||
.m-markdown td {
|
||
padding: 10px 12px;
|
||
}
|
||
|
||
.m-markdown-small th,
|
||
.m-markdown-small td {
|
||
padding: 8px 8px;
|
||
}
|
||
|
||
.m-markdown th,
|
||
.m-markdown-small th {
|
||
font-weight: 600;
|
||
background-color: var(--bg2);
|
||
vertical-align: middle;
|
||
}
|
||
|
||
.m-markdown-small table code {
|
||
font-size: calc(var(--font-size-mono) - 2px);
|
||
}
|
||
|
||
.m-markdown table code {
|
||
font-size: calc(var(--font-size-mono) - 1px);
|
||
}
|
||
|
||
.m-markdown blockquote,
|
||
.m-markdown-small blockquote {
|
||
margin-inline-start: 0;
|
||
margin-inline-end: 0;
|
||
border-left: 3px solid var(--border-color);
|
||
padding: 6px 0 6px 6px;
|
||
}
|
||
.m-markdown hr{
|
||
border: 1px solid var(--border-color);
|
||
}
|
||
`,Su=M`
|
||
/* Button */
|
||
.m-btn {
|
||
border-radius: var(--border-radius);
|
||
font-weight: 600;
|
||
display: inline-block;
|
||
padding: 6px 16px;
|
||
font-size: var(--font-size-small);
|
||
outline: 0;
|
||
line-height: 1;
|
||
text-align: center;
|
||
white-space: nowrap;
|
||
border: 2px solid var(--primary-color);
|
||
background-color:transparent;
|
||
user-select: none;
|
||
cursor: pointer;
|
||
box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
|
||
transition-duration: 0.75s;
|
||
}
|
||
.m-btn.primary {
|
||
background-color: var(--primary-color);
|
||
color: var(--primary-color-invert);
|
||
}
|
||
.m-btn.thin-border { border-width: 1px; }
|
||
.m-btn.large { padding:8px 14px; }
|
||
.m-btn.small { padding:5px 12px; }
|
||
.m-btn.tiny { padding:5px 6px; }
|
||
.m-btn.circle { border-radius: 50%; }
|
||
.m-btn:hover {
|
||
background-color: var(--primary-color);
|
||
color: var(--primary-color-invert);
|
||
}
|
||
.m-btn.nav { border: 2px solid var(--nav-accent-color); }
|
||
.m-btn.nav:hover {
|
||
background-color: var(--nav-accent-color);
|
||
}
|
||
.m-btn:disabled {
|
||
background-color: var(--bg3);
|
||
color: var(--fg3);
|
||
border-color: var(--fg3);
|
||
cursor: not-allowed;
|
||
opacity: 0.4;
|
||
}
|
||
.m-btn:active {
|
||
filter: brightness(75%);
|
||
transform: scale(0.95);
|
||
transition:scale 0s;
|
||
}
|
||
.toolbar-btn {
|
||
cursor: pointer;
|
||
padding: 4px;
|
||
margin:0 2px;
|
||
font-size: var(--font-size-small);
|
||
min-width: 50px;
|
||
color: var(--primary-color-invert);
|
||
border-radius: 2px;
|
||
border: none;
|
||
background-color: var(--primary-color);
|
||
}
|
||
|
||
input, textarea, select, button, pre {
|
||
color:var(--fg);
|
||
outline: none;
|
||
background-color: var(--input-bg);
|
||
border: 1px solid var(--border-color);
|
||
border-radius: var(--border-radius);
|
||
}
|
||
button {
|
||
font-family: var(--font-regular);
|
||
}
|
||
|
||
/* Form Inputs */
|
||
pre,
|
||
select,
|
||
textarea,
|
||
input[type="file"],
|
||
input[type="text"],
|
||
input[type="password"] {
|
||
font-family: var(--font-mono);
|
||
font-weight: 400;
|
||
font-size: var(--font-size-small);
|
||
transition: border .2s;
|
||
padding: 6px 5px;
|
||
}
|
||
|
||
select {
|
||
font-family: var(--font-regular);
|
||
padding: 5px 30px 5px 5px;
|
||
background-image: url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2212%22%20height%3D%2212%22%3E%3Cpath%20d%3D%22M10.3%203.3L6%207.6%201.7%203.3A1%201%200%2000.3%204.7l5%205a1%201%200%20001.4%200l5-5a1%201%200%2010-1.4-1.4z%22%20fill%3D%22%23777777%22%2F%3E%3C%2Fsvg%3E");
|
||
background-position: calc(100% - 5px) center;
|
||
background-repeat: no-repeat;
|
||
background-size: 10px;
|
||
-webkit-appearance: none;
|
||
-moz-appearance: none;
|
||
appearance: none;
|
||
cursor: pointer;
|
||
}
|
||
|
||
select:hover {
|
||
border-color: var(--primary-color);
|
||
}
|
||
|
||
textarea::placeholder,
|
||
input[type="text"]::placeholder,
|
||
input[type="password"]::placeholder {
|
||
color: var(--placeholder-color);
|
||
opacity:1;
|
||
}
|
||
|
||
|
||
input[type="file"]{
|
||
font-family: var(--font-regular);
|
||
padding:2px;
|
||
cursor:pointer;
|
||
border: 1px solid var(--primary-color);
|
||
min-height: calc(var(--font-size-small) + 18px);
|
||
}
|
||
|
||
input[type="file"]::-webkit-file-upload-button {
|
||
font-family: var(--font-regular);
|
||
font-size: var(--font-size-small);
|
||
outline: none;
|
||
cursor:pointer;
|
||
padding: 3px 8px;
|
||
border: 1px solid var(--primary-color);
|
||
background-color: var(--primary-color);
|
||
color: var(--primary-color-invert);
|
||
border-radius: var(--border-radius);;
|
||
-webkit-appearance: none;
|
||
}
|
||
|
||
pre,
|
||
textarea {
|
||
scrollbar-width: thin;
|
||
scrollbar-color: var(--border-color) var(--input-bg);
|
||
}
|
||
|
||
pre::-webkit-scrollbar,
|
||
textarea::-webkit-scrollbar {
|
||
width: 8px;
|
||
height: 8px;
|
||
}
|
||
|
||
pre::-webkit-scrollbar-track,
|
||
textarea::-webkit-scrollbar-track {
|
||
background:var(--input-bg);
|
||
}
|
||
|
||
pre::-webkit-scrollbar-thumb,
|
||
textarea::-webkit-scrollbar-thumb {
|
||
border-radius: 2px;
|
||
background-color: var(--border-color);
|
||
}
|
||
|
||
.link {
|
||
font-size:var(--font-size-small);
|
||
text-decoration: underline;
|
||
color:var(--blue);
|
||
font-family:var(--font-mono);
|
||
margin-bottom:2px;
|
||
}
|
||
|
||
/* Toggle Body */
|
||
input[type="checkbox"] {
|
||
appearance: none;
|
||
display: inline-block;
|
||
background-color: var(--light-bg);
|
||
border: 1px solid var(--light-bg);
|
||
border-radius: 9px;
|
||
cursor: pointer;
|
||
height: 18px;
|
||
position: relative;
|
||
transition: border .25s .15s, box-shadow .25s .3s, padding .25s;
|
||
min-width: 36px;
|
||
width: 36px;
|
||
vertical-align: top;
|
||
}
|
||
/* Toggle Thumb */
|
||
input[type="checkbox"]:after {
|
||
position: absolute;
|
||
background-color: var(--bg);
|
||
border: 1px solid var(--light-bg);
|
||
border-radius: 8px;
|
||
content: '';
|
||
top: 0px;
|
||
left: 0px;
|
||
right: 16px;
|
||
display: block;
|
||
height: 16px;
|
||
transition: border .25s .15s, left .25s .1s, right .15s .175s;
|
||
}
|
||
|
||
/* Toggle Body - Checked */
|
||
input[type="checkbox"]:checked {
|
||
background-color: var(--green);
|
||
border-color: var(--green);
|
||
}
|
||
/* Toggle Thumb - Checked*/
|
||
input[type="checkbox"]:checked:after {
|
||
border: 1px solid var(--green);
|
||
left: 16px;
|
||
right: 1px;
|
||
transition: border .25s, left .15s .25s, right .25s .175s;
|
||
}`,Eu=M`
|
||
.row, .col {
|
||
display:flex;
|
||
}
|
||
.row {
|
||
align-items:center;
|
||
flex-direction: row;
|
||
}
|
||
.col {
|
||
align-items:stretch;
|
||
flex-direction: column;
|
||
}
|
||
`,ju=M`
|
||
.m-table {
|
||
border-spacing: 0;
|
||
border-collapse: separate;
|
||
border: 1px solid var(--light-border-color);
|
||
border-radius: var(--border-radius);
|
||
margin: 0;
|
||
max-width: 100%;
|
||
direction: ltr;
|
||
}
|
||
.m-table tr:first-child td,
|
||
.m-table tr:first-child th {
|
||
border-top: 0 none;
|
||
}
|
||
.m-table td,
|
||
.m-table th {
|
||
font-size: var(--font-size-small);
|
||
line-height: calc(var(--font-size-small) + 4px);
|
||
padding: 4px 5px 4px;
|
||
vertical-align: top;
|
||
}
|
||
|
||
.m-table.padded-12 td,
|
||
.m-table.padded-12 th {
|
||
padding: 12px;
|
||
}
|
||
|
||
.m-table td:not([align]),
|
||
.m-table th:not([align]) {
|
||
text-align: left;
|
||
}
|
||
|
||
.m-table th {
|
||
color: var(--fg2);
|
||
font-size: var(--font-size-small);
|
||
line-height: calc(var(--font-size-small) + 18px);
|
||
font-weight: 600;
|
||
letter-spacing: normal;
|
||
background-color: var(--bg2);
|
||
vertical-align: bottom;
|
||
border-bottom: 1px solid var(--light-border-color);
|
||
}
|
||
|
||
.m-table > tbody > tr > td,
|
||
.m-table > tr > td {
|
||
border-top: 1px solid var(--light-border-color);
|
||
text-overflow: ellipsis;
|
||
overflow: hidden;
|
||
}
|
||
.table-title {
|
||
font-size:var(--font-size-small);
|
||
font-weight:bold;
|
||
vertical-align: middle;
|
||
margin: 12px 0 4px 0;
|
||
}
|
||
`,Lg=M`
|
||
:host {
|
||
container-type: inline-size;
|
||
}
|
||
.only-large-screen { display:none; }
|
||
.endpoint-head .path {
|
||
display: flex;
|
||
font-family:var(--font-mono);
|
||
font-size: var(--font-size-small);
|
||
align-items: center;
|
||
overflow-wrap: break-word;
|
||
word-break: break-all;
|
||
}
|
||
|
||
.endpoint-head .descr {
|
||
font-size: var(--font-size-small);
|
||
color:var(--light-fg);
|
||
font-weight:400;
|
||
align-items: center;
|
||
overflow-wrap: break-word;
|
||
word-break: break-all;
|
||
display:none;
|
||
}
|
||
|
||
.m-endpoint.expanded { margin-bottom:16px; }
|
||
.m-endpoint > .endpoint-head{
|
||
border-width:1px 1px 1px 5px;
|
||
border-style:solid;
|
||
border-color:transparent;
|
||
border-top-color:var(--light-border-color);
|
||
display:flex;
|
||
padding:6px 16px;
|
||
align-items: center;
|
||
cursor: pointer;
|
||
}
|
||
.m-endpoint > .endpoint-head.put:hover,
|
||
.m-endpoint > .endpoint-head.put.expanded {
|
||
border-color:var(--orange);
|
||
background-color:var(--light-orange);
|
||
}
|
||
.m-endpoint > .endpoint-head.post:hover,
|
||
.m-endpoint > .endpoint-head.post.expanded {
|
||
border-color:var(--green);
|
||
background-color:var(--light-green);
|
||
}
|
||
.m-endpoint > .endpoint-head.get:hover,
|
||
.m-endpoint > .endpoint-head.get.expanded {
|
||
border-color:var(--blue);
|
||
background-color:var(--light-blue);
|
||
}
|
||
.m-endpoint > .endpoint-head.delete:hover,
|
||
.m-endpoint > .endpoint-head.delete.expanded {
|
||
border-color:var(--red);
|
||
background-color:var(--light-red);
|
||
}
|
||
|
||
.m-endpoint > .endpoint-head.head:hover,
|
||
.m-endpoint > .endpoint-head.head.expanded,
|
||
.m-endpoint > .endpoint-head.patch:hover,
|
||
.m-endpoint > .endpoint-head.patch.expanded,
|
||
.m-endpoint > .endpoint-head.options:hover,
|
||
.m-endpoint > .endpoint-head.options.expanded {
|
||
border-color:var(--yellow);
|
||
background-color:var(--light-yellow);
|
||
}
|
||
|
||
.m-endpoint > .endpoint-head.deprecated:hover,
|
||
.m-endpoint > .endpoint-head.deprecated.expanded {
|
||
border-color:var(--border-color);
|
||
filter:opacity(0.6);
|
||
}
|
||
|
||
.m-endpoint .endpoint-body {
|
||
flex-wrap:wrap;
|
||
padding:16px 0px 0 0px;
|
||
border-width:0px 1px 1px 5px;
|
||
border-style:solid;
|
||
box-shadow: 0px 4px 3px -3px rgba(0, 0, 0, 0.15);
|
||
}
|
||
.m-endpoint .endpoint-body.delete{ border-color:var(--red); }
|
||
.m-endpoint .endpoint-body.put{ border-color:var(--orange); }
|
||
.m-endpoint .endpoint-body.post { border-color:var(--green); }
|
||
.m-endpoint .endpoint-body.get { border-color:var(--blue); }
|
||
.m-endpoint .endpoint-body.head,
|
||
.m-endpoint .endpoint-body.patch,
|
||
.m-endpoint .endpoint-body.options {
|
||
border-color:var(--yellow);
|
||
}
|
||
|
||
.m-endpoint .endpoint-body.deprecated {
|
||
border-color:var(--border-color);
|
||
filter:opacity(0.6);
|
||
}
|
||
|
||
.endpoint-head .deprecated {
|
||
color: var(--light-fg);
|
||
filter:opacity(0.6);
|
||
}
|
||
|
||
.summary{
|
||
padding:8px 8px;
|
||
}
|
||
.summary .title {
|
||
font-size:calc(var(--font-size-regular) + 2px);
|
||
margin-bottom: 6px;
|
||
word-break: break-all;
|
||
}
|
||
|
||
.endpoint-head .method {
|
||
padding:2px 5px;
|
||
vertical-align: middle;
|
||
font-size:var(--font-size-small);
|
||
height: calc(var(--font-size-small) + 16px);
|
||
line-height: calc(var(--font-size-small) + 8px);
|
||
width: 60px;
|
||
border-radius: 2px;
|
||
display:inline-block;
|
||
text-align: center;
|
||
font-weight: bold;
|
||
text-transform:uppercase;
|
||
margin-right:5px;
|
||
}
|
||
.endpoint-head .method.delete{ border: 2px solid var(--red);}
|
||
.endpoint-head .method.put{ border: 2px solid var(--orange); }
|
||
.endpoint-head .method.post{ border: 2px solid var(--green); }
|
||
.endpoint-head .method.get{ border: 2px solid var(--blue); }
|
||
.endpoint-head .method.get.deprecated{ border: 2px solid var(--border-color); }
|
||
.endpoint-head .method.head,
|
||
.endpoint-head .method.patch,
|
||
.endpoint-head .method.options {
|
||
border: 2px solid var(--yellow);
|
||
}
|
||
|
||
.req-resp-container {
|
||
display: flex;
|
||
margin-top:16px;
|
||
align-items: stretch;
|
||
flex-wrap: wrap;
|
||
flex-direction: column;
|
||
border-top:1px solid var(--light-border-color);
|
||
}
|
||
|
||
.view-mode-request,
|
||
api-response.view-mode {
|
||
flex:1;
|
||
min-height:100px;
|
||
padding:16px 8px;
|
||
overflow:hidden;
|
||
}
|
||
.view-mode-request {
|
||
border-width:0 0 1px 0;
|
||
border-style:dashed;
|
||
}
|
||
|
||
.head .view-mode-request,
|
||
.patch .view-mode-request,
|
||
.options .view-mode-request {
|
||
border-color:var(--yellow);
|
||
}
|
||
.put .view-mode-request {
|
||
border-color:var(--orange);
|
||
}
|
||
.post .view-mode-request {
|
||
border-color:var(--green);
|
||
}
|
||
.get .view-mode-request {
|
||
border-color:var(--blue);
|
||
}
|
||
.delete .view-mode-request {
|
||
border-color:var(--red);
|
||
}
|
||
|
||
@container (min-width: 1024px) {
|
||
.only-large-screen { display:block; }
|
||
.endpoint-head .path{
|
||
font-size: var(--font-size-regular);
|
||
}
|
||
.endpoint-head .descr{
|
||
display: flex;
|
||
}
|
||
.endpoint-head .m-markdown-small,
|
||
.descr .m-markdown-small{
|
||
display:block;
|
||
}
|
||
.req-resp-container{
|
||
flex-direction: var(--layout, row);
|
||
flex-wrap: nowrap;
|
||
}
|
||
api-response.view-mode {
|
||
padding:16px;
|
||
}
|
||
.view-mode-request.row-layout {
|
||
border-width:0 1px 0 0;
|
||
padding:16px;
|
||
}
|
||
.summary{
|
||
padding:8px 16px;
|
||
}
|
||
}
|
||
`,pc=M`
|
||
code[class*="language-"],
|
||
pre[class*="language-"] {
|
||
text-align: left;
|
||
white-space: pre;
|
||
word-spacing: normal;
|
||
word-break: normal;
|
||
word-wrap: normal;
|
||
line-height: 1.5;
|
||
tab-size: 2;
|
||
|
||
-webkit-hyphens: none;
|
||
-moz-hyphens: none;
|
||
-ms-hyphens: none;
|
||
hyphens: none;
|
||
}
|
||
|
||
/* Code blocks */
|
||
pre[class*="language-"] {
|
||
padding: 1em;
|
||
margin: .5em 0;
|
||
overflow: auto;
|
||
}
|
||
|
||
/* Inline code */
|
||
:not(pre) > code[class*="language-"] {
|
||
white-space: normal;
|
||
}
|
||
|
||
.token.comment,
|
||
.token.block-comment,
|
||
.token.prolog,
|
||
.token.doctype,
|
||
.token.cdata {
|
||
color: var(--light-fg)
|
||
}
|
||
|
||
.token.punctuation {
|
||
color: var(--fg);
|
||
}
|
||
|
||
.token.tag,
|
||
.token.attr-name,
|
||
.token.namespace,
|
||
.token.deleted {
|
||
color:var(--pink);
|
||
}
|
||
|
||
.token.function-name {
|
||
color: var(--blue);
|
||
}
|
||
|
||
.token.boolean,
|
||
.token.number,
|
||
.token.function {
|
||
color: var(--red);
|
||
}
|
||
|
||
.token.property,
|
||
.token.class-name,
|
||
.token.constant,
|
||
.token.symbol {
|
||
color: var(--code-property-color);
|
||
}
|
||
|
||
.token.selector,
|
||
.token.important,
|
||
.token.atrule,
|
||
.token.keyword,
|
||
.token.builtin {
|
||
color: var(--code-keyword-color);
|
||
}
|
||
|
||
.token.string,
|
||
.token.char,
|
||
.token.attr-value,
|
||
.token.regex,
|
||
.token.variable {
|
||
color: var(--green);
|
||
}
|
||
|
||
.token.operator,
|
||
.token.entity,
|
||
.token.url {
|
||
color: var(--code-operator-color);
|
||
}
|
||
|
||
.token.important,
|
||
.token.bold {
|
||
font-weight: bold;
|
||
}
|
||
.token.italic {
|
||
font-style: italic;
|
||
}
|
||
|
||
.token.entity {
|
||
cursor: help;
|
||
}
|
||
|
||
.token.inserted {
|
||
color: green;
|
||
}
|
||
`,dl=M`
|
||
.tab-panel {
|
||
border: none;
|
||
}
|
||
.tab-buttons {
|
||
height:30px;
|
||
padding: 4px 4px 0 4px;
|
||
border-bottom: 1px solid var(--light-border-color) ;
|
||
align-items: stretch;
|
||
overflow-y: hidden;
|
||
overflow-x: auto;
|
||
scrollbar-width: thin;
|
||
}
|
||
.tab-buttons::-webkit-scrollbar {
|
||
height: 1px;
|
||
background-color: var(--border-color);
|
||
}
|
||
.tab-btn {
|
||
border: none;
|
||
border-bottom: 3px solid transparent;
|
||
color: var(--light-fg);
|
||
background-color: transparent;
|
||
white-space: nowrap;
|
||
cursor:pointer;
|
||
outline:none;
|
||
font-family:var(--font-regular);
|
||
font-size:var(--font-size-small);
|
||
margin-right:16px;
|
||
padding:1px;
|
||
}
|
||
.tab-btn.active {
|
||
border-bottom: 3px solid var(--primary-color);
|
||
font-weight:bold;
|
||
color:var(--primary-color);
|
||
}
|
||
|
||
.tab-btn:hover {
|
||
color:var(--primary-color);
|
||
}
|
||
.tab-content {
|
||
margin:-1px 0 0 0;
|
||
position:relative;
|
||
min-height: 50px;
|
||
}
|
||
`,va=M`
|
||
.nav-bar-info:focus-visible,
|
||
.nav-bar-tag:focus-visible,
|
||
.nav-bar-path:focus-visible {
|
||
outline: 1px solid;
|
||
box-shadow: none;
|
||
outline-offset: -4px;
|
||
}
|
||
.nav-bar-expand-all:focus-visible,
|
||
.nav-bar-collapse-all:focus-visible,
|
||
.nav-bar-tag-icon:focus-visible {
|
||
outline: 1px solid;
|
||
box-shadow: none;
|
||
outline-offset: 2px;
|
||
}
|
||
.nav-bar {
|
||
width:0;
|
||
height:100%;
|
||
overflow: hidden;
|
||
color:var(--nav-text-color);
|
||
background-color: var(--nav-bg-color);
|
||
background-blend-mode: multiply;
|
||
line-height: calc(var(--font-size-small) + 4px);
|
||
display:none;
|
||
position:relative;
|
||
flex-direction:column;
|
||
flex-wrap:nowrap;
|
||
word-break:break-word;
|
||
}
|
||
::slotted([slot=nav-logo]) {
|
||
padding:16px 16px 0 16px;
|
||
}
|
||
.nav-scroll {
|
||
overflow-x: hidden;
|
||
overflow-y: auto;
|
||
overflow-y: overlay;
|
||
scrollbar-width: thin;
|
||
scrollbar-color: var(--nav-hover-bg-color) transparent;
|
||
}
|
||
|
||
.nav-bar-tag {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
flex-direction: row;
|
||
}
|
||
.nav-bar.read .nav-bar-tag-icon {
|
||
display:none;
|
||
}
|
||
.nav-bar-paths-under-tag {
|
||
overflow:hidden;
|
||
transition: max-height .2s ease-out, visibility .3s;
|
||
}
|
||
.collapsed .nav-bar-paths-under-tag {
|
||
visibility: hidden;
|
||
}
|
||
|
||
.nav-bar-expand-all {
|
||
transform: rotate(90deg);
|
||
cursor:pointer;
|
||
margin-right:10px;
|
||
}
|
||
.nav-bar-collapse-all {
|
||
transform: rotate(270deg);
|
||
cursor:pointer;
|
||
}
|
||
.nav-bar-expand-all:hover, .nav-bar-collapse-all:hover {
|
||
color: var(--primary-color);
|
||
}
|
||
|
||
.nav-bar-tag-icon {
|
||
color: var(--nav-text-color);
|
||
font-size: 20px;
|
||
}
|
||
.nav-bar-tag-icon:hover {
|
||
color:var(--nav-hover-text-color);
|
||
}
|
||
.nav-bar.focused .nav-bar-tag-and-paths.collapsed .nav-bar-tag-icon::after {
|
||
content: '⌵';
|
||
width:16px;
|
||
height:16px;
|
||
text-align: center;
|
||
display: inline-block;
|
||
transform: rotate(-90deg);
|
||
transition: transform 0.2s ease-out 0s;
|
||
}
|
||
.nav-bar.focused .nav-bar-tag-and-paths.expanded .nav-bar-tag-icon::after {
|
||
content: '⌵';
|
||
width:16px;
|
||
height:16px;
|
||
text-align: center;
|
||
display: inline-block;
|
||
transition: transform 0.2s ease-out 0s;
|
||
}
|
||
.nav-scroll::-webkit-scrollbar {
|
||
width: var(--scroll-bar-width, 8px);
|
||
}
|
||
.nav-scroll::-webkit-scrollbar-track {
|
||
background:transparent;
|
||
}
|
||
.nav-scroll::-webkit-scrollbar-thumb {
|
||
background-color: var(--nav-hover-bg-color);
|
||
}
|
||
|
||
.nav-bar-tag {
|
||
font-size: var(--font-size-regular);
|
||
color: var(--nav-accent-color);
|
||
border-left:4px solid transparent;
|
||
font-weight:bold;
|
||
padding: 15px 15px 15px 10px;
|
||
text-transform: capitalize;
|
||
}
|
||
|
||
.nav-bar-components,
|
||
.nav-bar-h1,
|
||
.nav-bar-h2,
|
||
.nav-bar-info,
|
||
.nav-bar-tag,
|
||
.nav-bar-path {
|
||
display:flex;
|
||
cursor: pointer;
|
||
width: 100%;
|
||
border: none;
|
||
border-radius:4px;
|
||
color: var(--nav-text-color);
|
||
background: transparent;
|
||
border-left:4px solid transparent;
|
||
}
|
||
|
||
.nav-bar-h1,
|
||
.nav-bar-h2,
|
||
.nav-bar-path {
|
||
font-size: calc(var(--font-size-small) + 1px);
|
||
padding: var(--nav-item-padding);
|
||
}
|
||
.nav-bar-path.small-font {
|
||
font-size: var(--font-size-small);
|
||
}
|
||
|
||
.nav-bar-info {
|
||
font-size: var(--font-size-regular);
|
||
padding: 16px 10px;
|
||
font-weight:bold;
|
||
}
|
||
.nav-bar-section {
|
||
display: flex;
|
||
flex-direction: row;
|
||
justify-content: space-between;
|
||
font-size: var(--font-size-small);
|
||
color: var(--nav-text-color);
|
||
padding: var(--nav-item-padding);
|
||
font-weight:bold;
|
||
}
|
||
.nav-bar-section.operations {
|
||
cursor:pointer;
|
||
}
|
||
.nav-bar-section.operations:hover {
|
||
color:var(--nav-hover-text-color);
|
||
background-color:var(--nav-hover-bg-color);
|
||
}
|
||
|
||
.nav-bar-section:first-child {
|
||
display: none;
|
||
}
|
||
.nav-bar-h2 {margin-left:12px;}
|
||
|
||
.nav-bar-h1.left-bar.active,
|
||
.nav-bar-h2.left-bar.active,
|
||
.nav-bar-info.left-bar.active,
|
||
.nav-bar-tag.left-bar.active,
|
||
.nav-bar-path.left-bar.active,
|
||
.nav-bar-section.left-bar.operations.active {
|
||
border-left:4px solid var(--nav-accent-color);
|
||
color:var(--nav-hover-text-color);
|
||
}
|
||
|
||
.nav-bar-h1.colored-block.active,
|
||
.nav-bar-h2.colored-block.active,
|
||
.nav-bar-info.colored-block.active,
|
||
.nav-bar-tag.colored-block.active,
|
||
.nav-bar-path.colored-block.active,
|
||
.nav-bar-section.colored-block.operations.active {
|
||
background-color: var(--nav-accent-color);
|
||
color: var(--nav-accent-text-color);
|
||
border-radius: 0;
|
||
}
|
||
|
||
.nav-bar-h1:hover,
|
||
.nav-bar-h2:hover,
|
||
.nav-bar-info:hover,
|
||
.nav-bar-tag:hover,
|
||
.nav-bar-path:hover {
|
||
color:var(--nav-hover-text-color);
|
||
background-color:var(--nav-hover-bg-color);
|
||
}
|
||
`,Ws=M`
|
||
#api-info {
|
||
font-size: calc(var(--font-size-regular) - 1px);
|
||
margin-top: 8px;
|
||
margin-left: -15px;
|
||
}
|
||
|
||
#api-info span:before {
|
||
content: "|";
|
||
display: inline-block;
|
||
opacity: 0.5;
|
||
width: 15px;
|
||
text-align: center;
|
||
}
|
||
#api-info span:first-child:before {
|
||
content: "";
|
||
width: 0px;
|
||
}
|
||
`,fc=M`
|
||
|
||
`,eh=/[\s#:?&={}]/g,po="_rapidoc_api_key";function Cu(t){return new Promise((n=>setTimeout(n,t)))}function hl(t,n){const i=n.target,l=document.createElement("textarea");l.value=t,l.style.position="fixed",document.body.appendChild(l),l.focus(),l.select();try{document.execCommand("copy"),i.innerText="Copied",setTimeout((()=>{i.innerText="Copy"}),5e3)}catch(h){console.error("Unable to copy",h)}document.body.removeChild(l)}function th(t,n,i=""){return`${n.method} ${n.path} ${n.summary||""} ${n.description||""} ${n.operationId||""} ${i}`.toLowerCase().includes(t.toLowerCase())}function Js(t,n=new Set){return t&&Object.keys(t).forEach((i=>{var l;if(n.add(i),t[i].properties)Js(t[i].properties,n);else if((l=t[i].items)!==null&&l!==void 0&&l.properties){var h;Js((h=t[i].items)===null||h===void 0?void 0:h.properties,n)}})),n}function zp(t,n){if(t){const i=document.createElement("a");document.body.appendChild(i),i.style="display: none",i.href=t,i.download=n,i.click(),i.remove()}}function Fg(t){if(t){const n=document.createElement("a");document.body.appendChild(n),n.style="display: none",n.href=t,n.target="_blank",n.click(),n.remove()}}const Lp=Object.freeze({url:"/"}),{fetch:Au,Response:Sw,Headers:Ew,Request:Ou,FormData:nA,File:jw,Blob:Cw}=globalThis;function nh(t,n){return n||typeof navigator>"u"||(n=navigator),n&&n.product==="ReactNative"?!(!t||typeof t!="object"||typeof t.uri!="string"):typeof File<"u"&&t instanceof File||typeof Blob<"u"&&t instanceof Blob||!!ArrayBuffer.isView(t)||t!==null&&typeof t=="object"&&typeof t.pipe=="function"}function Aw(t,n){return Array.isArray(t)&&t.some((i=>nh(i,n)))}globalThis.fetch===void 0&&(globalThis.fetch=Au),globalThis.Headers===void 0&&(globalThis.Headers=Ew),globalThis.Request===void 0&&(globalThis.Request=Ou),globalThis.Response===void 0&&(globalThis.Response=Sw),globalThis.FormData===void 0&&(globalThis.FormData=nA),globalThis.File===void 0&&(globalThis.File=jw),globalThis.Blob===void 0&&(globalThis.Blob=Cw);class qg extends File{constructor(n,i="",l={}){super([n],i,l),this.data=n}valueOf(){return this.data}toString(){return this.valueOf()}}function rh(t,n="reserved"){return[...t].map((i=>{if((h=>/^[a-z0-9\-._~]+$/i.test(h))(i)||(h=>":/?#[]@!$&'()*+,;=".indexOf(h)>-1)(i)&&n==="unsafe")return i;const l=new TextEncoder;return Array.from(l.encode(i)).map((h=>`0${h.toString(16).toUpperCase()}`.slice(-2))).map((h=>`%${h}`)).join("")})).join("")}function xa(t){const{value:n}=t;return Array.isArray(n)?(function({key:i,value:l,style:h,explode:v,escape:x}){if(h==="simple")return l.map((w=>as(w,x))).join(",");if(h==="label")return`.${l.map((w=>as(w,x))).join(".")}`;if(h==="matrix")return l.map((w=>as(w,x))).reduce(((w,C)=>!w||v?`${w||""};${i}=${C}`:`${w},${C}`),"");if(h==="form"){const w=v?`&${i}=`:",";return l.map((C=>as(C,x))).join(w)}if(h==="spaceDelimited"){const w=v?`${i}=`:"";return l.map((C=>as(C,x))).join(` ${w}`)}if(h==="pipeDelimited"){const w=v?`${i}=`:"";return l.map((C=>as(C,x))).join(`|${w}`)}})(t):typeof n=="object"?(function({key:i,value:l,style:h,explode:v,escape:x}){const w=Object.keys(l);return h==="simple"?w.reduce(((C,$)=>{const N=as(l[$],x);return`${C?`${C},`:""}${$}${v?"=":","}${N}`}),""):h==="label"?w.reduce(((C,$)=>{const N=as(l[$],x);return`${C?`${C}.`:"."}${$}${v?"=":"."}${N}`}),""):h==="matrix"&&v?w.reduce(((C,$)=>`${C?`${C};`:";"}${$}=${as(l[$],x)}`),""):h==="matrix"?w.reduce(((C,$)=>{const N=as(l[$],x);return`${C?`${C},`:`;${i}=`}${$},${N}`}),""):h==="form"?w.reduce(((C,$)=>{const N=as(l[$],x);return`${C?`${C}${v?"&":","}`:""}${$}${v?"=":","}${N}`}),""):void 0})(t):(function({key:i,value:l,style:h,escape:v}){return h==="simple"?as(l,v):h==="label"?`.${as(l,v)}`:h==="matrix"?`;${i}=${as(l,v)}`:h==="form"||h==="deepObject"?as(l,v):void 0})(t)}function as(t,n=!1){return Array.isArray(t)||t!==null&&typeof t=="object"?t=JSON.stringify(t):typeof t!="number"&&typeof t!="boolean"||(t=String(t)),n&&t.length>0?rh(t,n):t}const Bg={form:",",spaceDelimited:"%20",pipeDelimited:"|"},ku={csv:",",ssv:"%20",tsv:"%09",pipes:"|"};function mc(t,n,i=!1){const{collectionFormat:l,allowEmptyValue:h,serializationOption:v,encoding:x}=n,w=typeof n!="object"||Array.isArray(n)?n:n.value,C=i?N=>N.toString():N=>encodeURIComponent(N),$=C(t);if(w===void 0&&h)return[[$,""]];if(nh(w)||Aw(w))return[[$,w]];if(v)return Ug(t,w,i,v);if(x){if([typeof x.style,typeof x.explode,typeof x.allowReserved].some((N=>N!=="undefined"))){const{style:N,explode:_,allowReserved:F}=x;return Ug(t,w,i,{style:N,explode:_,allowReserved:F})}if(typeof x.contentType=="string"){if(x.contentType.startsWith("application/json")){const _=C(typeof w=="string"?w:JSON.stringify(w));return[[$,new qg(_,"blob",{type:x.contentType})]]}const N=C(String(w));return[[$,new qg(N,"blob",{type:x.contentType})]]}return typeof w!="object"?[[$,C(w)]]:Array.isArray(w)&&w.every((N=>typeof N!="object"))?[[$,w.map(C).join(",")]]:[[$,C(JSON.stringify(w))]]}return typeof w!="object"?[[$,C(w)]]:Array.isArray(w)?l==="multi"?[[$,w.map(C)]]:[[$,w.map(C).join(ku[l||"csv"])]]:[[$,""]]}function Ug(t,n,i,l){const h=l.style||"form",v=l.explode===void 0?h==="form":l.explode,x=!i&&(l&&l.allowReserved?"unsafe":"reserved"),w=$=>as($,x),C=i?$=>$:$=>w($);return typeof n!="object"?[[C(t),w(n)]]:Array.isArray(n)?v?[[C(t),n.map(w)]]:[[C(t),n.map(w).join(Bg[h])]]:h==="deepObject"?Object.keys(n).map(($=>[C(`${t}[${$}]`),w(n[$])])):v?Object.keys(n).map(($=>[C($),w(n[$])])):[[C(t),Object.keys(n).map(($=>[`${C($)},${w(n[$])}`])).join(",")]]}function Fp(t){return((n,{encode:i=!0}={})=>{const l=(x,w,C)=>(C==null?x.append(w,""):Array.isArray(C)?C.reduce((($,N)=>l(x,w,N)),x):C instanceof Date?x.append(w,C.toISOString()):typeof C=="object"?Object.entries(C).reduce((($,[N,_])=>l(x,`${w}[${N}]`,_)),x):x.append(w,C),x),h=Object.entries(n).reduce(((x,[w,C])=>l(x,w,C)),new URLSearchParams),v=String(h);return i?v:decodeURIComponent(v)})(Object.keys(t).reduce(((n,i)=>{for(const[l,h]of mc(i,t[i]))n[l]=h instanceof qg?h.valueOf():h;return n}),{}),{encode:!1})}function qp(t={}){const{url:n="",query:i,form:l}=t;if(l){const v=Object.keys(l).some((w=>{const{value:C}=l[w];return nh(C)||Aw(C)})),x=t.headers["content-type"]||t.headers["Content-Type"];if(v||/multipart\/form-data/i.test(x)){const w=(h=t.form,Object.entries(h).reduce(((C,[$,N])=>{for(const[_,F]of mc($,N,!0))if(Array.isArray(F))for(const U of F)if(ArrayBuffer.isView(U)){const J=new Blob([U]);C.append(_,J)}else C.append(_,U);else if(ArrayBuffer.isView(F)){const U=new Blob([F]);C.append(_,U)}else C.append(_,F);return C}),new FormData));t.formdata=w,t.body=w}else t.body=Fp(l);delete t.form}var h;if(i){const[v,x]=n.split("?");let w="";if(x){const $=new URLSearchParams(x);Object.keys(i).forEach((N=>$.delete(N))),w=String($)}const C=((...$)=>{const N=$.filter((_=>_)).join("&");return N?`?${N}`:""})(w,Fp(i));t.url=v+C,delete t.query}return t}function Ru(t){return t==null}var ar={isNothing:Ru,isObject:function(t){return typeof t=="object"&&t!==null},toArray:function(t){return Array.isArray(t)?t:Ru(t)?[]:[t]},repeat:function(t,n){var i,l="";for(i=0;i<n;i+=1)l+=t;return l},isNegativeZero:function(t){return t===0&&Number.NEGATIVE_INFINITY===1/t},extend:function(t,n){var i,l,h,v;if(n)for(i=0,l=(v=Object.keys(n)).length;i<l;i+=1)t[h=v[i]]=n[h];return t}};function Bp(t,n){var i="",l=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(i+='in "'+t.mark.name+'" '),i+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!n&&t.mark.snippet&&(i+=`
|
||
|
||
`+t.mark.snippet),l+" "+i):l}function fo(t,n){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=n,this.message=Bp(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}fo.prototype=Object.create(Error.prototype),fo.prototype.constructor=fo,fo.prototype.toString=function(t){return this.name+": "+Bp(this,t)};var Rr=fo;function sh(t,n,i,l,h){var v="",x="",w=Math.floor(h/2)-1;return l-n>w&&(n=l-w+(v=" ... ").length),i-l>w&&(i=l+w-(x=" ...").length),{str:v+t.slice(n,i).replace(/\t/g,"→")+x,pos:l-n+v.length}}function Tu(t,n){return ar.repeat(" ",n-t.length)+t}var Ow=function(t,n){if(n=Object.create(n||null),!t.buffer)return null;n.maxLength||(n.maxLength=79),typeof n.indent!="number"&&(n.indent=1),typeof n.linesBefore!="number"&&(n.linesBefore=3),typeof n.linesAfter!="number"&&(n.linesAfter=2);for(var i,l=/\r?\n|\r|\0/g,h=[0],v=[],x=-1;i=l.exec(t.buffer);)v.push(i.index),h.push(i.index+i[0].length),t.position<=i.index&&x<0&&(x=h.length-2);x<0&&(x=h.length-1);var w,C,$="",N=Math.min(t.line+n.linesAfter,v.length).toString().length,_=n.maxLength-(n.indent+N+3);for(w=1;w<=n.linesBefore&&!(x-w<0);w++)C=sh(t.buffer,h[x-w],v[x-w],t.position-(h[x]-h[x-w]),_),$=ar.repeat(" ",n.indent)+Tu((t.line-w+1).toString(),N)+" | "+C.str+`
|
||
`+$;for(C=sh(t.buffer,h[x],v[x],t.position,_),$+=ar.repeat(" ",n.indent)+Tu((t.line+1).toString(),N)+" | "+C.str+`
|
||
`,$+=ar.repeat("-",n.indent+N+3+C.pos)+`^
|
||
`,w=1;w<=n.linesAfter&&!(x+w>=v.length);w++)C=sh(t.buffer,h[x+w],v[x+w],t.position-(h[x]-h[x+w]),_),$+=ar.repeat(" ",n.indent)+Tu((t.line+w+1).toString(),N)+" | "+C.str+`
|
||
`;return $.replace(/\n$/,"")},Up=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Kp=["scalar","sequence","mapping"],os=function(t,n){if(n=n||{},Object.keys(n).forEach((function(i){if(Up.indexOf(i)===-1)throw new Rr('Unknown option "'+i+'" is met in definition of "'+t+'" YAML type.')})),this.options=n,this.tag=t,this.kind=n.kind||null,this.resolve=n.resolve||function(){return!0},this.construct=n.construct||function(i){return i},this.instanceOf=n.instanceOf||null,this.predicate=n.predicate||null,this.represent=n.represent||null,this.representName=n.representName||null,this.defaultStyle=n.defaultStyle||null,this.multi=n.multi||!1,this.styleAliases=(function(i){var l={};return i!==null&&Object.keys(i).forEach((function(h){i[h].forEach((function(v){l[String(v)]=h}))})),l})(n.styleAliases||null),Kp.indexOf(this.kind)===-1)throw new Rr('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')};function Ms(t,n){var i=[];return t[n].forEach((function(l){var h=i.length;i.forEach((function(v,x){v.tag===l.tag&&v.kind===l.kind&&v.multi===l.multi&&(h=x)})),i[h]=l})),i}function mo(t){return this.extend(t)}mo.prototype.extend=function(t){var n=[],i=[];if(t instanceof os)i.push(t);else if(Array.isArray(t))i=i.concat(t);else{if(!t||!Array.isArray(t.implicit)&&!Array.isArray(t.explicit))throw new Rr("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");t.implicit&&(n=n.concat(t.implicit)),t.explicit&&(i=i.concat(t.explicit))}n.forEach((function(h){if(!(h instanceof os))throw new Rr("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(h.loadKind&&h.loadKind!=="scalar")throw new Rr("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(h.multi)throw new Rr("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")})),i.forEach((function(h){if(!(h instanceof os))throw new Rr("Specified list of YAML types (or a single Type object) contains a non-Type object.")}));var l=Object.create(mo.prototype);return l.implicit=(this.implicit||[]).concat(n),l.explicit=(this.explicit||[]).concat(i),l.compiledImplicit=Ms(l,"implicit"),l.compiledExplicit=Ms(l,"explicit"),l.compiledTypeMap=(function(){var h,v,x={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function w(C){C.multi?(x.multi[C.kind].push(C),x.multi.fallback.push(C)):x[C.kind][C.tag]=x.fallback[C.tag]=C}for(h=0,v=arguments.length;h<v;h+=1)arguments[h].forEach(w);return x})(l.compiledImplicit,l.compiledExplicit),l};var ih=mo,_u=new os("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return t!==null?t:""}}),kw=new os("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return t!==null?t:[]}}),Vp=new os("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return t!==null?t:{}}}),Hp=new ih({explicit:[_u,kw,Vp]}),$u=new os("tag:yaml.org,2002:null",{kind:"scalar",resolve:function(t){if(t===null)return!0;var n=t.length;return n===1&&t==="~"||n===4&&(t==="null"||t==="Null"||t==="NULL")},construct:function(){return null},predicate:function(t){return t===null},represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"}),ah=new os("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function(t){if(t===null)return!1;var n=t.length;return n===4&&(t==="true"||t==="True"||t==="TRUE")||n===5&&(t==="false"||t==="False"||t==="FALSE")},construct:function(t){return t==="true"||t==="True"||t==="TRUE"},predicate:function(t){return Object.prototype.toString.call(t)==="[object Boolean]"},represent:{lowercase:function(t){return t?"true":"false"},uppercase:function(t){return t?"TRUE":"FALSE"},camelcase:function(t){return t?"True":"False"}},defaultStyle:"lowercase"});function Rw(t){return 48<=t&&t<=55}function rA(t){return 48<=t&&t<=57}var Tw=new os("tag:yaml.org,2002:int",{kind:"scalar",resolve:function(t){if(t===null)return!1;var n,i,l=t.length,h=0,v=!1;if(!l)return!1;if((n=t[h])!=="-"&&n!=="+"||(n=t[++h]),n==="0"){if(h+1===l)return!0;if((n=t[++h])==="b"){for(h++;h<l;h++)if((n=t[h])!=="_"){if(n!=="0"&&n!=="1")return!1;v=!0}return v&&n!=="_"}if(n==="x"){for(h++;h<l;h++)if((n=t[h])!=="_"){if(!(48<=(i=t.charCodeAt(h))&&i<=57||65<=i&&i<=70||97<=i&&i<=102))return!1;v=!0}return v&&n!=="_"}if(n==="o"){for(h++;h<l;h++)if((n=t[h])!=="_"){if(!Rw(t.charCodeAt(h)))return!1;v=!0}return v&&n!=="_"}}if(n==="_")return!1;for(;h<l;h++)if((n=t[h])!=="_"){if(!rA(t.charCodeAt(h)))return!1;v=!0}return!(!v||n==="_")},construct:function(t){var n,i=t,l=1;if(i.indexOf("_")!==-1&&(i=i.replace(/_/g,"")),(n=i[0])!=="-"&&n!=="+"||(n==="-"&&(l=-1),n=(i=i.slice(1))[0]),i==="0")return 0;if(n==="0"){if(i[1]==="b")return l*parseInt(i.slice(2),2);if(i[1]==="x")return l*parseInt(i.slice(2),16);if(i[1]==="o")return l*parseInt(i.slice(2),8)}return l*parseInt(i,10)},predicate:function(t){return Object.prototype.toString.call(t)==="[object Number]"&&t%1==0&&!ar.isNegativeZero(t)},represent:{binary:function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},octal:function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},decimal:function(t){return t.toString(10)},hexadecimal:function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),sA=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),Kg=/^[-+]?[0-9]+e/,_w=new os("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(t){return t!==null&&!(!sA.test(t)||t[t.length-1]==="_")},construct:function(t){var n,i;return i=(n=t.replace(/_/g,"").toLowerCase())[0]==="-"?-1:1,"+-".indexOf(n[0])>=0&&(n=n.slice(1)),n===".inf"?i===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:n===".nan"?NaN:i*parseFloat(n,10)},predicate:function(t){return Object.prototype.toString.call(t)==="[object Number]"&&(t%1!=0||ar.isNegativeZero(t))},represent:function(t,n){var i;if(isNaN(t))switch(n){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(n){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(n){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(ar.isNegativeZero(t))return"-0.0";return i=t.toString(10),Kg.test(i)?i.replace("e",".e"):i},defaultStyle:"lowercase"}),$w=Hp.extend({implicit:[$u,ah,Tw,_w]}),Nw=$w,Dw=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Pw=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$"),Vg=new os("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(t){return t!==null&&(Dw.exec(t)!==null||Pw.exec(t)!==null)},construct:function(t){var n,i,l,h,v,x,w,C,$=0,N=null;if((n=Dw.exec(t))===null&&(n=Pw.exec(t)),n===null)throw new Error("Date resolve error");if(i=+n[1],l=+n[2]-1,h=+n[3],!n[4])return new Date(Date.UTC(i,l,h));if(v=+n[4],x=+n[5],w=+n[6],n[7]){for($=n[7].slice(0,3);$.length<3;)$+="0";$=+$}return n[9]&&(N=6e4*(60*+n[10]+ +(n[11]||0)),n[9]==="-"&&(N=-N)),C=new Date(Date.UTC(i,l,h,v,x,w,$)),N&&C.setTime(C.getTime()-N),C},instanceOf:Date,represent:function(t){return t.toISOString()}}),Mw=new os("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(t){return t==="<<"||t===null}}),Hg=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
||
\r`,Iw=new os("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(t){if(t===null)return!1;var n,i,l=0,h=t.length,v=Hg;for(i=0;i<h;i++)if(!((n=v.indexOf(t.charAt(i)))>64)){if(n<0)return!1;l+=6}return l%8==0},construct:function(t){var n,i,l=t.replace(/[\r\n=]/g,""),h=l.length,v=Hg,x=0,w=[];for(n=0;n<h;n++)n%4==0&&n&&(w.push(x>>16&255),w.push(x>>8&255),w.push(255&x)),x=x<<6|v.indexOf(l.charAt(n));return(i=h%4*6)==0?(w.push(x>>16&255),w.push(x>>8&255),w.push(255&x)):i===18?(w.push(x>>10&255),w.push(x>>2&255)):i===12&&w.push(x>>4&255),new Uint8Array(w)},predicate:function(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"},represent:function(t){var n,i,l="",h=0,v=t.length,x=Hg;for(n=0;n<v;n++)n%3==0&&n&&(l+=x[h>>18&63],l+=x[h>>12&63],l+=x[h>>6&63],l+=x[63&h]),h=(h<<8)+t[n];return(i=v%3)==0?(l+=x[h>>18&63],l+=x[h>>12&63],l+=x[h>>6&63],l+=x[63&h]):i===2?(l+=x[h>>10&63],l+=x[h>>4&63],l+=x[h<<2&63],l+=x[64]):i===1&&(l+=x[h>>2&63],l+=x[h<<4&63],l+=x[64],l+=x[64]),l}}),iA=Object.prototype.hasOwnProperty,Gg=Object.prototype.toString,zw=new os("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(t){if(t===null)return!0;var n,i,l,h,v,x=[],w=t;for(n=0,i=w.length;n<i;n+=1){if(l=w[n],v=!1,Gg.call(l)!=="[object Object]")return!1;for(h in l)if(iA.call(l,h)){if(v)return!1;v=!0}if(!v||x.indexOf(h)!==-1)return!1;x.push(h)}return!0},construct:function(t){return t!==null?t:[]}}),aA=Object.prototype.toString,Lw=new os("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:function(t){if(t===null)return!0;var n,i,l,h,v,x=t;for(v=new Array(x.length),n=0,i=x.length;n<i;n+=1){if(l=x[n],aA.call(l)!=="[object Object]"||(h=Object.keys(l)).length!==1)return!1;v[n]=[h[0],l[h[0]]]}return!0},construct:function(t){if(t===null)return[];var n,i,l,h,v,x=t;for(v=new Array(x.length),n=0,i=x.length;n<i;n+=1)l=x[n],h=Object.keys(l),v[n]=[h[0],l[h[0]]];return v}}),Fw=Object.prototype.hasOwnProperty,qw=new os("tag:yaml.org,2002:set",{kind:"mapping",resolve:function(t){if(t===null)return!0;var n,i=t;for(n in i)if(Fw.call(i,n)&&i[n]!==null)return!1;return!0},construct:function(t){return t!==null?t:{}}}),Xg=Nw.extend({implicit:[Vg,Mw],explicit:[Iw,zw,Lw,qw]}),pl=Object.prototype.hasOwnProperty,oA=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,lA=/[\x85\u2028\u2029]/,cA=/[,\[\]\{\}]/,Bw=/^(?:!|!!|![a-z\-]+!)$/i,Uw=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Kw(t){return Object.prototype.toString.call(t)}function Gi(t){return t===10||t===13}function ba(t){return t===9||t===32}function Qs(t){return t===9||t===32||t===10||t===13}function gc(t){return t===44||t===91||t===93||t===123||t===125}function Vw(t){var n;return 48<=t&&t<=57?t-48:97<=(n=32|t)&&n<=102?n-97+10:-1}function Yg(t){return t===48?"\0":t===97?"\x07":t===98?"\b":t===116||t===9?" ":t===110?`
|
||
`:t===118?"\v":t===102?"\f":t===114?"\r":t===101?"\x1B":t===32?" ":t===34?'"':t===47?"/":t===92?"\\":t===78?"
":t===95?" ":t===76?"\u2028":t===80?"\u2029":""}function Hw(t){return t<=65535?String.fromCharCode(t):String.fromCharCode(55296+(t-65536>>10),56320+(t-65536&1023))}for(var Zg=new Array(256),yc=new Array(256),Nu=0;Nu<256;Nu++)Zg[Nu]=Yg(Nu)?1:0,yc[Nu]=Yg(Nu);function uA(t,n){this.input=t,this.filename=n.filename||null,this.schema=n.schema||Xg,this.onWarning=n.onWarning||null,this.legacy=n.legacy||!1,this.json=n.json||!1,this.listener=n.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function Gw(t,n){var i={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return i.snippet=Ow(i),new Rr(n,i)}function Bt(t,n){throw Gw(t,n)}function oh(t,n){t.onWarning&&t.onWarning.call(null,Gw(t,n))}var Du={YAML:function(t,n,i){var l,h,v;t.version!==null&&Bt(t,"duplication of %YAML directive"),i.length!==1&&Bt(t,"YAML directive accepts exactly one argument"),(l=/^([0-9]+)\.([0-9]+)$/.exec(i[0]))===null&&Bt(t,"ill-formed argument of the YAML directive"),h=parseInt(l[1],10),v=parseInt(l[2],10),h!==1&&Bt(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=v<2,v!==1&&v!==2&&oh(t,"unsupported YAML version of the document")},TAG:function(t,n,i){var l,h;i.length!==2&&Bt(t,"TAG directive accepts exactly two arguments"),l=i[0],h=i[1],Bw.test(l)||Bt(t,"ill-formed tag handle (first argument) of the TAG directive"),pl.call(t.tagMap,l)&&Bt(t,'there is a previously declared suffix for "'+l+'" tag handle'),Uw.test(h)||Bt(t,"ill-formed tag prefix (second argument) of the TAG directive");try{h=decodeURIComponent(h)}catch{Bt(t,"tag prefix is malformed: "+h)}t.tagMap[l]=h}};function Xi(t,n,i,l){var h,v,x,w;if(n<i){if(w=t.input.slice(n,i),l)for(h=0,v=w.length;h<v;h+=1)(x=w.charCodeAt(h))===9||32<=x&&x<=1114111||Bt(t,"expected valid JSON character");else oA.test(w)&&Bt(t,"the stream contains non-printable characters");t.result+=w}}function Xw(t,n,i,l){var h,v,x,w;for(ar.isObject(i)||Bt(t,"cannot merge mappings; the provided source object is unacceptable"),x=0,w=(h=Object.keys(i)).length;x<w;x+=1)v=h[x],pl.call(n,v)||(n[v]=i[v],l[v]=!0)}function go(t,n,i,l,h,v,x,w,C){var $,N;if(Array.isArray(h))for($=0,N=(h=Array.prototype.slice.call(h)).length;$<N;$+=1)Array.isArray(h[$])&&Bt(t,"nested arrays are not supported inside keys"),typeof h=="object"&&Kw(h[$])==="[object Object]"&&(h[$]="[object Object]");if(typeof h=="object"&&Kw(h)==="[object Object]"&&(h="[object Object]"),h=String(h),n===null&&(n={}),l==="tag:yaml.org,2002:merge")if(Array.isArray(v))for($=0,N=v.length;$<N;$+=1)Xw(t,n,v[$],i);else Xw(t,n,v,i);else t.json||pl.call(i,h)||!pl.call(n,h)||(t.line=x||t.line,t.lineStart=w||t.lineStart,t.position=C||t.position,Bt(t,"duplicated mapping key")),h==="__proto__"?Object.defineProperty(n,h,{configurable:!0,enumerable:!0,writable:!0,value:v}):n[h]=v,delete i[h];return n}function Gp(t){var n;(n=t.input.charCodeAt(t.position))===10?t.position++:n===13?(t.position++,t.input.charCodeAt(t.position)===10&&t.position++):Bt(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}function Nr(t,n,i){for(var l=0,h=t.input.charCodeAt(t.position);h!==0;){for(;ba(h);)h===9&&t.firstTabInLine===-1&&(t.firstTabInLine=t.position),h=t.input.charCodeAt(++t.position);if(n&&h===35)do h=t.input.charCodeAt(++t.position);while(h!==10&&h!==13&&h!==0);if(!Gi(h))break;for(Gp(t),h=t.input.charCodeAt(t.position),l++,t.lineIndent=0;h===32;)t.lineIndent++,h=t.input.charCodeAt(++t.position)}return i!==-1&&l!==0&&t.lineIndent<i&&oh(t,"deficient indentation"),l}function Pu(t){var n,i=t.position;return!((n=t.input.charCodeAt(i))!==45&&n!==46||n!==t.input.charCodeAt(i+1)||n!==t.input.charCodeAt(i+2)||(i+=3,(n=t.input.charCodeAt(i))!==0&&!Qs(n)))}function lh(t,n){n===1?t.result+=" ":n>1&&(t.result+=ar.repeat(`
|
||
`,n-1))}function Wg(t,n){var i,l,h=t.tag,v=t.anchor,x=[],w=!1;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=x),l=t.input.charCodeAt(t.position);l!==0&&(t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,Bt(t,"tab characters must not be used in indentation")),l===45)&&Qs(t.input.charCodeAt(t.position+1));)if(w=!0,t.position++,Nr(t,!0,-1)&&t.lineIndent<=n)x.push(null),l=t.input.charCodeAt(t.position);else if(i=t.line,Mu(t,n,3,!1,!0),x.push(t.result),Nr(t,!0,-1),l=t.input.charCodeAt(t.position),(t.line===i||t.lineIndent>n)&&l!==0)Bt(t,"bad indentation of a sequence entry");else if(t.lineIndent<n)break;return!!w&&(t.tag=h,t.anchor=v,t.kind="sequence",t.result=x,!0)}function Yw(t){var n,i,l,h,v=!1,x=!1;if((h=t.input.charCodeAt(t.position))!==33)return!1;if(t.tag!==null&&Bt(t,"duplication of a tag property"),(h=t.input.charCodeAt(++t.position))===60?(v=!0,h=t.input.charCodeAt(++t.position)):h===33?(x=!0,i="!!",h=t.input.charCodeAt(++t.position)):i="!",n=t.position,v){do h=t.input.charCodeAt(++t.position);while(h!==0&&h!==62);t.position<t.length?(l=t.input.slice(n,t.position),h=t.input.charCodeAt(++t.position)):Bt(t,"unexpected end of the stream within a verbatim tag")}else{for(;h!==0&&!Qs(h);)h===33&&(x?Bt(t,"tag suffix cannot contain exclamation marks"):(i=t.input.slice(n-1,t.position+1),Bw.test(i)||Bt(t,"named tag handle cannot contain such characters"),x=!0,n=t.position+1)),h=t.input.charCodeAt(++t.position);l=t.input.slice(n,t.position),cA.test(l)&&Bt(t,"tag suffix cannot contain flow indicator characters")}l&&!Uw.test(l)&&Bt(t,"tag name cannot contain such characters: "+l);try{l=decodeURIComponent(l)}catch{Bt(t,"tag name is malformed: "+l)}return v?t.tag=l:pl.call(t.tagMap,i)?t.tag=t.tagMap[i]+l:i==="!"?t.tag="!"+l:i==="!!"?t.tag="tag:yaml.org,2002:"+l:Bt(t,'undeclared tag handle "'+i+'"'),!0}function Zw(t){var n,i;if((i=t.input.charCodeAt(t.position))!==38)return!1;for(t.anchor!==null&&Bt(t,"duplication of an anchor property"),i=t.input.charCodeAt(++t.position),n=t.position;i!==0&&!Qs(i)&&!gc(i);)i=t.input.charCodeAt(++t.position);return t.position===n&&Bt(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(n,t.position),!0}function Mu(t,n,i,l,h){var v,x,w,C,$,N,_,F,U,J=1,Y=!1,Z=!1;if(t.listener!==null&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,v=x=w=i===4||i===3,l&&Nr(t,!0,-1)&&(Y=!0,t.lineIndent>n?J=1:t.lineIndent===n?J=0:t.lineIndent<n&&(J=-1)),J===1)for(;Yw(t)||Zw(t);)Nr(t,!0,-1)?(Y=!0,w=v,t.lineIndent>n?J=1:t.lineIndent===n?J=0:t.lineIndent<n&&(J=-1)):w=!1;if(w&&(w=Y||h),J!==1&&i!==4||(F=i===1||i===2?n:n+1,U=t.position-t.lineStart,J===1?w&&(Wg(t,U)||(function(P,se,ae){var he,ge,pe,Te,Ae,qe,Se,me=P.tag,Me=P.anchor,Ie={},Qe=Object.create(null),ot=null,qt=null,kn=null,Tt=!1,on=!1;if(P.firstTabInLine!==-1)return!1;for(P.anchor!==null&&(P.anchorMap[P.anchor]=Ie),Se=P.input.charCodeAt(P.position);Se!==0;){if(Tt||P.firstTabInLine===-1||(P.position=P.firstTabInLine,Bt(P,"tab characters must not be used in indentation")),he=P.input.charCodeAt(P.position+1),pe=P.line,Se!==63&&Se!==58||!Qs(he)){if(Te=P.line,Ae=P.lineStart,qe=P.position,!Mu(P,ae,2,!1,!0))break;if(P.line===pe){for(Se=P.input.charCodeAt(P.position);ba(Se);)Se=P.input.charCodeAt(++P.position);if(Se===58)Qs(Se=P.input.charCodeAt(++P.position))||Bt(P,"a whitespace character is expected after the key-value separator within a block mapping"),Tt&&(go(P,Ie,Qe,ot,qt,null,Te,Ae,qe),ot=qt=kn=null),on=!0,Tt=!1,ge=!1,ot=P.tag,qt=P.result;else{if(!on)return P.tag=me,P.anchor=Me,!0;Bt(P,"can not read an implicit mapping pair; a colon is missed")}}else{if(!on)return P.tag=me,P.anchor=Me,!0;Bt(P,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else Se===63?(Tt&&(go(P,Ie,Qe,ot,qt,null,Te,Ae,qe),ot=qt=kn=null),on=!0,Tt=!0,ge=!0):Tt?(Tt=!1,ge=!0):Bt(P,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),P.position+=1,Se=he;if((P.line===pe||P.lineIndent>se)&&(Tt&&(Te=P.line,Ae=P.lineStart,qe=P.position),Mu(P,se,4,!0,ge)&&(Tt?qt=P.result:kn=P.result),Tt||(go(P,Ie,Qe,ot,qt,kn,Te,Ae,qe),ot=qt=kn=null),Nr(P,!0,-1),Se=P.input.charCodeAt(P.position)),(P.line===pe||P.lineIndent>se)&&Se!==0)Bt(P,"bad indentation of a mapping entry");else if(P.lineIndent<se)break}return Tt&&go(P,Ie,Qe,ot,qt,null,Te,Ae,qe),on&&(P.tag=me,P.anchor=Me,P.kind="mapping",P.result=Ie),on})(t,U,F))||(function(P,se){var ae,he,ge,pe,Te,Ae,qe,Se,me,Me,Ie,Qe,ot=!0,qt=P.tag,kn=P.anchor,Tt=Object.create(null);if((Qe=P.input.charCodeAt(P.position))===91)Te=93,Se=!1,pe=[];else{if(Qe!==123)return!1;Te=125,Se=!0,pe={}}for(P.anchor!==null&&(P.anchorMap[P.anchor]=pe),Qe=P.input.charCodeAt(++P.position);Qe!==0;){if(Nr(P,!0,se),(Qe=P.input.charCodeAt(P.position))===Te)return P.position++,P.tag=qt,P.anchor=kn,P.kind=Se?"mapping":"sequence",P.result=pe,!0;ot?Qe===44&&Bt(P,"expected the node content, but found ','"):Bt(P,"missed comma between flow collection entries"),Ie=null,Ae=qe=!1,Qe===63&&Qs(P.input.charCodeAt(P.position+1))&&(Ae=qe=!0,P.position++,Nr(P,!0,se)),ae=P.line,he=P.lineStart,ge=P.position,Mu(P,se,1,!1,!0),Me=P.tag,me=P.result,Nr(P,!0,se),Qe=P.input.charCodeAt(P.position),!qe&&P.line!==ae||Qe!==58||(Ae=!0,Qe=P.input.charCodeAt(++P.position),Nr(P,!0,se),Mu(P,se,1,!1,!0),Ie=P.result),Se?go(P,pe,Tt,Me,me,Ie,ae,he,ge):Ae?pe.push(go(P,null,Tt,Me,me,Ie,ae,he,ge)):pe.push(me),Nr(P,!0,se),(Qe=P.input.charCodeAt(P.position))===44?(ot=!0,Qe=P.input.charCodeAt(++P.position)):ot=!1}Bt(P,"unexpected end of the stream within a flow collection")})(t,F)?Z=!0:(x&&(function(P,se){var ae,he,ge,pe,Te,Ae=1,qe=!1,Se=!1,me=se,Me=0,Ie=!1;if((pe=P.input.charCodeAt(P.position))===124)he=!1;else{if(pe!==62)return!1;he=!0}for(P.kind="scalar",P.result="";pe!==0;)if((pe=P.input.charCodeAt(++P.position))===43||pe===45)Ae===1?Ae=pe===43?3:2:Bt(P,"repeat of a chomping mode identifier");else{if(!((ge=48<=(Te=pe)&&Te<=57?Te-48:-1)>=0))break;ge===0?Bt(P,"bad explicit indentation width of a block scalar; it cannot be less than one"):Se?Bt(P,"repeat of an indentation width identifier"):(me=se+ge-1,Se=!0)}if(ba(pe)){do pe=P.input.charCodeAt(++P.position);while(ba(pe));if(pe===35)do pe=P.input.charCodeAt(++P.position);while(!Gi(pe)&&pe!==0)}for(;pe!==0;){for(Gp(P),P.lineIndent=0,pe=P.input.charCodeAt(P.position);(!Se||P.lineIndent<me)&&pe===32;)P.lineIndent++,pe=P.input.charCodeAt(++P.position);if(!Se&&P.lineIndent>me&&(me=P.lineIndent),Gi(pe))Me++;else{if(P.lineIndent<me){Ae===3?P.result+=ar.repeat(`
|
||
`,qe?1+Me:Me):Ae===1&&qe&&(P.result+=`
|
||
`);break}for(he?ba(pe)?(Ie=!0,P.result+=ar.repeat(`
|
||
`,qe?1+Me:Me)):Ie?(Ie=!1,P.result+=ar.repeat(`
|
||
`,Me+1)):Me===0?qe&&(P.result+=" "):P.result+=ar.repeat(`
|
||
`,Me):P.result+=ar.repeat(`
|
||
`,qe?1+Me:Me),qe=!0,Se=!0,Me=0,ae=P.position;!Gi(pe)&&pe!==0;)pe=P.input.charCodeAt(++P.position);Xi(P,ae,P.position,!1)}}return!0})(t,F)||(function(P,se){var ae,he,ge;if((ae=P.input.charCodeAt(P.position))!==39)return!1;for(P.kind="scalar",P.result="",P.position++,he=ge=P.position;(ae=P.input.charCodeAt(P.position))!==0;)if(ae===39){if(Xi(P,he,P.position,!0),(ae=P.input.charCodeAt(++P.position))!==39)return!0;he=P.position,P.position++,ge=P.position}else Gi(ae)?(Xi(P,he,ge,!0),lh(P,Nr(P,!1,se)),he=ge=P.position):P.position===P.lineStart&&Pu(P)?Bt(P,"unexpected end of the document within a single quoted scalar"):(P.position++,ge=P.position);Bt(P,"unexpected end of the stream within a single quoted scalar")})(t,F)||(function(P,se){var ae,he,ge,pe,Te,Ae,qe;if((Ae=P.input.charCodeAt(P.position))!==34)return!1;for(P.kind="scalar",P.result="",P.position++,ae=he=P.position;(Ae=P.input.charCodeAt(P.position))!==0;){if(Ae===34)return Xi(P,ae,P.position,!0),P.position++,!0;if(Ae===92){if(Xi(P,ae,P.position,!0),Gi(Ae=P.input.charCodeAt(++P.position)))Nr(P,!1,se);else if(Ae<256&&Zg[Ae])P.result+=yc[Ae],P.position++;else if((Te=(qe=Ae)===120?2:qe===117?4:qe===85?8:0)>0){for(ge=Te,pe=0;ge>0;ge--)(Te=Vw(Ae=P.input.charCodeAt(++P.position)))>=0?pe=(pe<<4)+Te:Bt(P,"expected hexadecimal character");P.result+=Hw(pe),P.position++}else Bt(P,"unknown escape sequence");ae=he=P.position}else Gi(Ae)?(Xi(P,ae,he,!0),lh(P,Nr(P,!1,se)),ae=he=P.position):P.position===P.lineStart&&Pu(P)?Bt(P,"unexpected end of the document within a double quoted scalar"):(P.position++,he=P.position)}Bt(P,"unexpected end of the stream within a double quoted scalar")})(t,F)?Z=!0:(function(P){var se,ae,he;if((he=P.input.charCodeAt(P.position))!==42)return!1;for(he=P.input.charCodeAt(++P.position),se=P.position;he!==0&&!Qs(he)&&!gc(he);)he=P.input.charCodeAt(++P.position);return P.position===se&&Bt(P,"name of an alias node must contain at least one character"),ae=P.input.slice(se,P.position),pl.call(P.anchorMap,ae)||Bt(P,'unidentified alias "'+ae+'"'),P.result=P.anchorMap[ae],Nr(P,!0,-1),!0})(t)?(Z=!0,t.tag===null&&t.anchor===null||Bt(t,"alias node should not have any properties")):(function(P,se,ae){var he,ge,pe,Te,Ae,qe,Se,me,Me=P.kind,Ie=P.result;if(Qs(me=P.input.charCodeAt(P.position))||gc(me)||me===35||me===38||me===42||me===33||me===124||me===62||me===39||me===34||me===37||me===64||me===96||(me===63||me===45)&&(Qs(he=P.input.charCodeAt(P.position+1))||ae&&gc(he)))return!1;for(P.kind="scalar",P.result="",ge=pe=P.position,Te=!1;me!==0;){if(me===58){if(Qs(he=P.input.charCodeAt(P.position+1))||ae&&gc(he))break}else if(me===35){if(Qs(P.input.charCodeAt(P.position-1)))break}else{if(P.position===P.lineStart&&Pu(P)||ae&&gc(me))break;if(Gi(me)){if(Ae=P.line,qe=P.lineStart,Se=P.lineIndent,Nr(P,!1,-1),P.lineIndent>=se){Te=!0,me=P.input.charCodeAt(P.position);continue}P.position=pe,P.line=Ae,P.lineStart=qe,P.lineIndent=Se;break}}Te&&(Xi(P,ge,pe,!1),lh(P,P.line-Ae),ge=pe=P.position,Te=!1),ba(me)||(pe=P.position+1),me=P.input.charCodeAt(++P.position)}return Xi(P,ge,pe,!1),!!P.result||(P.kind=Me,P.result=Ie,!1)})(t,F,i===1)&&(Z=!0,t.tag===null&&(t.tag="?")),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):J===0&&(Z=w&&Wg(t,U))),t.tag===null)t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);else if(t.tag==="?"){for(t.result!==null&&t.kind!=="scalar"&&Bt(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"'),C=0,$=t.implicitTypes.length;C<$;C+=1)if((_=t.implicitTypes[C]).resolve(t.result)){t.result=_.construct(t.result),t.tag=_.tag,t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);break}}else if(t.tag!=="!"){if(pl.call(t.typeMap[t.kind||"fallback"],t.tag))_=t.typeMap[t.kind||"fallback"][t.tag];else for(_=null,C=0,$=(N=t.typeMap.multi[t.kind||"fallback"]).length;C<$;C+=1)if(t.tag.slice(0,N[C].tag.length)===N[C].tag){_=N[C];break}_||Bt(t,"unknown tag !<"+t.tag+">"),t.result!==null&&_.kind!==t.kind&&Bt(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+_.kind+'", not "'+t.kind+'"'),_.resolve(t.result,t.tag)?(t.result=_.construct(t.result,t.tag),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):Bt(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return t.listener!==null&&t.listener("close",t),t.tag!==null||t.anchor!==null||Z}function dA(t){var n,i,l,h,v=t.position,x=!1;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);(h=t.input.charCodeAt(t.position))!==0&&(Nr(t,!0,-1),h=t.input.charCodeAt(t.position),!(t.lineIndent>0||h!==37));){for(x=!0,h=t.input.charCodeAt(++t.position),n=t.position;h!==0&&!Qs(h);)h=t.input.charCodeAt(++t.position);for(l=[],(i=t.input.slice(n,t.position)).length<1&&Bt(t,"directive name must not be less than one character in length");h!==0;){for(;ba(h);)h=t.input.charCodeAt(++t.position);if(h===35){do h=t.input.charCodeAt(++t.position);while(h!==0&&!Gi(h));break}if(Gi(h))break;for(n=t.position;h!==0&&!Qs(h);)h=t.input.charCodeAt(++t.position);l.push(t.input.slice(n,t.position))}h!==0&&Gp(t),pl.call(Du,i)?Du[i](t,i,l):oh(t,'unknown document directive "'+i+'"')}Nr(t,!0,-1),t.lineIndent===0&&t.input.charCodeAt(t.position)===45&&t.input.charCodeAt(t.position+1)===45&&t.input.charCodeAt(t.position+2)===45?(t.position+=3,Nr(t,!0,-1)):x&&Bt(t,"directives end mark is expected"),Mu(t,t.lineIndent-1,4,!1,!0),Nr(t,!0,-1),t.checkLineBreaks&&lA.test(t.input.slice(v,t.position))&&oh(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&Pu(t)?t.input.charCodeAt(t.position)===46&&(t.position+=3,Nr(t,!0,-1)):t.position<t.length-1&&Bt(t,"end of the stream or a document separator is expected")}function Ww(t,n){n=n||{},(t=String(t)).length!==0&&(t.charCodeAt(t.length-1)!==10&&t.charCodeAt(t.length-1)!==13&&(t+=`
|
||
`),t.charCodeAt(0)===65279&&(t=t.slice(1)));var i=new uA(t,n),l=t.indexOf("\0");for(l!==-1&&(i.position=l,Bt(i,"null byte is not allowed in input")),i.input+="\0";i.input.charCodeAt(i.position)===32;)i.lineIndent+=1,i.position+=1;for(;i.position<i.length-1;)dA(i);return i.documents}var hA=function(t,n,i){n!==null&&typeof n=="object"&&i===void 0&&(i=n,n=null);var l=Ww(t,i);if(typeof n!="function")return l;for(var h=0,v=l.length;h<v;h+=1)n(l[h])},pA=function(t,n){var i=Ww(t,n);if(i.length!==0){if(i.length===1)return i[0];throw new Rr("expected a single document in the stream, but found more")}},ei=Object.prototype.toString,Iu=Object.prototype.hasOwnProperty,Jw={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},Qw=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],e0=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function t0(t){var n,i,l;if(n=t.toString(16).toUpperCase(),t<=255)i="x",l=2;else if(t<=65535)i="u",l=4;else{if(!(t<=4294967295))throw new Rr("code point within a string may not be greater than 0xFFFFFFFF");i="U",l=8}return"\\"+i+ar.repeat("0",l-n.length)+n}function Jg(t){this.schema=t.schema||Xg,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=ar.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=(function(n,i){var l,h,v,x,w,C,$;if(i===null)return{};for(l={},v=0,x=(h=Object.keys(i)).length;v<x;v+=1)w=h[v],C=String(i[w]),w.slice(0,2)==="!!"&&(w="tag:yaml.org,2002:"+w.slice(2)),($=n.compiledTypeMap.fallback[w])&&Iu.call($.styleAliases,C)&&(C=$.styleAliases[C]),l[w]=C;return l})(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.noRefs=t.noRefs||!1,this.noCompatMode=t.noCompatMode||!1,this.condenseFlow=t.condenseFlow||!1,this.quotingType=t.quotingType==='"'?2:1,this.forceQuotes=t.forceQuotes||!1,this.replacer=typeof t.replacer=="function"?t.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function n0(t,n){for(var i,l=ar.repeat(" ",n),h=0,v=-1,x="",w=t.length;h<w;)(v=t.indexOf(`
|
||
`,h))===-1?(i=t.slice(h),h=w):(i=t.slice(h,v+1),h=v+1),i.length&&i!==`
|
||
`&&(x+=l),x+=i;return x}function fl(t,n){return`
|
||
`+ar.repeat(" ",t.indent*n)}function zu(t){return t===32||t===9}function yo(t){return 32<=t&&t<=126||161<=t&&t<=55295&&t!==8232&&t!==8233||57344<=t&&t<=65533&&t!==65279||65536<=t&&t<=1114111}function Xp(t){return yo(t)&&t!==65279&&t!==13&&t!==10}function Qg(t,n,i){var l=Xp(t),h=l&&!zu(t);return(i?l:l&&t!==44&&t!==91&&t!==93&&t!==123&&t!==125)&&t!==35&&!(n===58&&!h)||Xp(n)&&!zu(n)&&t===35||n===58&&h}function wa(t,n){var i,l=t.charCodeAt(n);return l>=55296&&l<=56319&&n+1<t.length&&(i=t.charCodeAt(n+1))>=56320&&i<=57343?1024*(l-55296)+i-56320+65536:l}function vc(t){return/^\n* /.test(t)}function ey(t,n,i,l,h){t.dump=(function(){if(n.length===0)return t.quotingType===2?'""':"''";if(!t.noCompatMode&&(Qw.indexOf(n)!==-1||e0.test(n)))return t.quotingType===2?'"'+n+'"':"'"+n+"'";var v=t.indent*Math.max(1,i),x=t.lineWidth===-1?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-v),w=l||t.flowLevel>-1&&i>=t.flowLevel;switch((function(C,$,N,_,F,U,J,Y){var Z,P,se=0,ae=null,he=!1,ge=!1,pe=_!==-1,Te=-1,Ae=yo(P=wa(C,0))&&P!==65279&&!zu(P)&&P!==45&&P!==63&&P!==58&&P!==44&&P!==91&&P!==93&&P!==123&&P!==125&&P!==35&&P!==38&&P!==42&&P!==33&&P!==124&&P!==61&&P!==62&&P!==39&&P!==34&&P!==37&&P!==64&&P!==96&&(function(qe){return!zu(qe)&&qe!==58})(wa(C,C.length-1));if($||J)for(Z=0;Z<C.length;se>=65536?Z+=2:Z++){if(!yo(se=wa(C,Z)))return 5;Ae=Ae&&Qg(se,ae,Y),ae=se}else{for(Z=0;Z<C.length;se>=65536?Z+=2:Z++){if((se=wa(C,Z))===10)he=!0,pe&&(ge=ge||Z-Te-1>_&&C[Te+1]!==" ",Te=Z);else if(!yo(se))return 5;Ae=Ae&&Qg(se,ae,Y),ae=se}ge=ge||pe&&Z-Te-1>_&&C[Te+1]!==" "}return he||ge?N>9&&vc(C)?5:J?U===2?5:2:ge?4:3:!Ae||J||F(C)?U===2?5:2:1})(n,w,t.indent,x,(function(C){return(function($,N){var _,F;for(_=0,F=$.implicitTypes.length;_<F;_+=1)if($.implicitTypes[_].resolve(N))return!0;return!1})(t,C)}),t.quotingType,t.forceQuotes&&!l,h)){case 1:return n;case 2:return"'"+n.replace(/'/g,"''")+"'";case 3:return"|"+ty(n,t.indent)+ml(n0(n,v));case 4:return">"+ty(n,t.indent)+ml(n0((function(C,$){for(var N,_,F,U=/(\n+)([^\n]*)/g,J=(F=(F=C.indexOf(`
|
||
`))!==-1?F:C.length,U.lastIndex=F,ny(C.slice(0,F),$)),Y=C[0]===`
|
||
`||C[0]===" ";_=U.exec(C);){var Z=_[1],P=_[2];N=P[0]===" ",J+=Z+(Y||N||P===""?"":`
|
||
`)+ny(P,$),Y=N}return J})(n,x),v));case 5:return'"'+(function(C){for(var $,N="",_=0,F=0;F<C.length;_>=65536?F+=2:F++)_=wa(C,F),!($=Jw[_])&&yo(_)?(N+=C[F],_>=65536&&(N+=C[F+1])):N+=$||t0(_);return N})(n)+'"';default:throw new Rr("impossible error: invalid scalar style")}})()}function ty(t,n){var i=vc(t)?String(n):"",l=t[t.length-1]===`
|
||
`;return i+(!l||t[t.length-2]!==`
|
||
`&&t!==`
|
||
`?l?"":"-":"+")+`
|
||
`}function ml(t){return t[t.length-1]===`
|
||
`?t.slice(0,-1):t}function ny(t,n){if(t===""||t[0]===" ")return t;for(var i,l,h=/ [^ ]/g,v=0,x=0,w=0,C="";i=h.exec(t);)(w=i.index)-v>n&&(l=x>v?x:w,C+=`
|
||
`+t.slice(v,l),v=l+1),x=w;return C+=`
|
||
`,t.length-v>n&&x>v?C+=t.slice(v,x)+`
|
||
`+t.slice(x+1):C+=t.slice(v),C.slice(1)}function ry(t,n,i,l){var h,v,x,w="",C=t.tag;for(h=0,v=i.length;h<v;h+=1)x=i[h],t.replacer&&(x=t.replacer.call(i,String(h),x)),(vo(t,n+1,x,!0,!0,!1,!0)||x===void 0&&vo(t,n+1,null,!0,!0,!1,!0))&&(l&&w===""||(w+=fl(t,n)),t.dump&&t.dump.charCodeAt(0)===10?w+="-":w+="- ",w+=t.dump);t.tag=C,t.dump=w||"[]"}function sy(t,n,i){var l,h,v,x,w,C;for(v=0,x=(h=i?t.explicitTypes:t.implicitTypes).length;v<x;v+=1)if(((w=h[v]).instanceOf||w.predicate)&&(!w.instanceOf||typeof n=="object"&&n instanceof w.instanceOf)&&(!w.predicate||w.predicate(n))){if(i?w.multi&&w.representName?t.tag=w.representName(n):t.tag=w.tag:t.tag="?",w.represent){if(C=t.styleMap[w.tag]||w.defaultStyle,ei.call(w.represent)==="[object Function]")l=w.represent(n,C);else{if(!Iu.call(w.represent,C))throw new Rr("!<"+w.tag+'> tag resolver accepts not "'+C+'" style');l=w.represent[C](n,C)}t.dump=l}return!0}return!1}function vo(t,n,i,l,h,v,x){t.tag=null,t.dump=i,sy(t,i,!1)||sy(t,i,!0);var w,C=ei.call(t.dump),$=l;l&&(l=t.flowLevel<0||t.flowLevel>n);var N,_,F=C==="[object Object]"||C==="[object Array]";if(F&&(_=(N=t.duplicates.indexOf(i))!==-1),(t.tag!==null&&t.tag!=="?"||_||t.indent!==2&&n>0)&&(h=!1),_&&t.usedDuplicates[N])t.dump="*ref_"+N;else{if(F&&_&&!t.usedDuplicates[N]&&(t.usedDuplicates[N]=!0),C==="[object Object]")l&&Object.keys(t.dump).length!==0?((function(U,J,Y,Z){var P,se,ae,he,ge,pe,Te="",Ae=U.tag,qe=Object.keys(Y);if(U.sortKeys===!0)qe.sort();else if(typeof U.sortKeys=="function")qe.sort(U.sortKeys);else if(U.sortKeys)throw new Rr("sortKeys must be a boolean or a function");for(P=0,se=qe.length;P<se;P+=1)pe="",Z&&Te===""||(pe+=fl(U,J)),he=Y[ae=qe[P]],U.replacer&&(he=U.replacer.call(Y,ae,he)),vo(U,J+1,ae,!0,!0,!0)&&((ge=U.tag!==null&&U.tag!=="?"||U.dump&&U.dump.length>1024)&&(U.dump&&U.dump.charCodeAt(0)===10?pe+="?":pe+="? "),pe+=U.dump,ge&&(pe+=fl(U,J)),vo(U,J+1,he,!0,ge)&&(U.dump&&U.dump.charCodeAt(0)===10?pe+=":":pe+=": ",Te+=pe+=U.dump));U.tag=Ae,U.dump=Te||"{}"})(t,n,t.dump,h),_&&(t.dump="&ref_"+N+t.dump)):((function(U,J,Y){var Z,P,se,ae,he,ge="",pe=U.tag,Te=Object.keys(Y);for(Z=0,P=Te.length;Z<P;Z+=1)he="",ge!==""&&(he+=", "),U.condenseFlow&&(he+='"'),ae=Y[se=Te[Z]],U.replacer&&(ae=U.replacer.call(Y,se,ae)),vo(U,J,se,!1,!1)&&(U.dump.length>1024&&(he+="? "),he+=U.dump+(U.condenseFlow?'"':"")+":"+(U.condenseFlow?"":" "),vo(U,J,ae,!1,!1)&&(ge+=he+=U.dump));U.tag=pe,U.dump="{"+ge+"}"})(t,n,t.dump),_&&(t.dump="&ref_"+N+" "+t.dump));else if(C==="[object Array]")l&&t.dump.length!==0?(t.noArrayIndent&&!x&&n>0?ry(t,n-1,t.dump,h):ry(t,n,t.dump,h),_&&(t.dump="&ref_"+N+t.dump)):((function(U,J,Y){var Z,P,se,ae="",he=U.tag;for(Z=0,P=Y.length;Z<P;Z+=1)se=Y[Z],U.replacer&&(se=U.replacer.call(Y,String(Z),se)),(vo(U,J,se,!1,!1)||se===void 0&&vo(U,J,null,!1,!1))&&(ae!==""&&(ae+=","+(U.condenseFlow?"":" ")),ae+=U.dump);U.tag=he,U.dump="["+ae+"]"})(t,n,t.dump),_&&(t.dump="&ref_"+N+" "+t.dump));else{if(C!=="[object String]"){if(C==="[object Undefined]"||t.skipInvalid)return!1;throw new Rr("unacceptable kind of an object to dump "+C)}t.tag!=="?"&&ey(t,t.dump,n,v,$)}t.tag!==null&&t.tag!=="?"&&(w=encodeURI(t.tag[0]==="!"?t.tag.slice(1):t.tag).replace(/!/g,"%21"),w=t.tag[0]==="!"?"!"+w:w.slice(0,18)==="tag:yaml.org,2002:"?"!!"+w.slice(18):"!<"+w+">",t.dump=w+" "+t.dump)}return!0}function fA(t,n){var i,l,h=[],v=[];for(iy(t,h,v),i=0,l=v.length;i<l;i+=1)n.duplicates.push(h[v[i]]);n.usedDuplicates=new Array(l)}function iy(t,n,i){var l,h,v;if(t!==null&&typeof t=="object")if((h=n.indexOf(t))!==-1)i.indexOf(h)===-1&&i.push(h);else if(n.push(t),Array.isArray(t))for(h=0,v=t.length;h<v;h+=1)iy(t[h],n,i);else for(h=0,v=(l=Object.keys(t)).length;h<v;h+=1)iy(t[l[h]],n,i)}function Yp(t,n){return function(){throw new Error("Function yaml."+t+" is removed in js-yaml 4. Use yaml."+n+" instead, which is now safe by default.")}}var r0=os,ay=ih,Sa=Hp,xc=$w,Yi=Nw,Lu=Xg,oy=pA,Zp=hA,Wp=function(t,n){var i=new Jg(n=n||{});i.noRefs||fA(t,i);var l=t;return i.replacer&&(l=i.replacer.call({"":l},"",l)),vo(i,0,l,!0,!0)?i.dump+`
|
||
`:""},ly=Rr,bc={binary:Iw,float:_w,map:Vp,null:$u,pairs:Lw,set:qw,timestamp:Vg,bool:ah,int:Tw,merge:Mw,omap:zw,seq:kw,str:_u},s0=Yp("safeLoad","load"),Jp=Yp("safeLoadAll","loadAll"),Fu=Yp("safeDump","dump"),qu={Type:r0,Schema:ay,FAILSAFE_SCHEMA:Sa,JSON_SCHEMA:xc,CORE_SCHEMA:Yi,DEFAULT_SCHEMA:Lu,load:oy,loadAll:Zp,dump:Wp,YAMLException:ly,types:bc,safeLoad:s0,safeLoadAll:Jp,safeDump:Fu};function ti(t={}){return typeof t.entries!="function"?{}:Array.from(t.entries()).reduce(((n,[i,l])=>(n[i]=(function(h){return h.includes(", ")?h.split(", "):h})(l),n)),{})}function Qp(t,n,{loadSpec:i=!1}={}){const l={ok:t.ok,url:t.url||n,status:t.status,statusText:t.statusText,headers:ti(t.headers)},h=l.headers["content-type"],v=i||((x="")=>/(json|xml|yaml|text)\b/.test(x))(h);return(v?t.text:t.blob||t.buffer).call(t).then((x=>{if(l.text=x,l.data=x,v)try{const w=(function(C,$){return $&&($.indexOf("application/json")===0||$.indexOf("+json")>0)?JSON.parse(C):qu.load(C)})(x,h);l.body=w,l.obj=w}catch(w){l.parseError=w}return l}))}async function ni(t,n={}){typeof t=="object"&&(t=(n=t).url),n.headers=n.headers||{},(n=qp(n)).headers&&Object.keys(n.headers).forEach((h=>{const v=n.headers[h];typeof v=="string"&&(n.headers[h]=v.replace(/\n+/g," "))})),n.requestInterceptor&&(n=await n.requestInterceptor(n)||n);const i=n.headers["content-type"]||n.headers["Content-Type"];let l;/multipart\/form-data/i.test(i)&&(delete n.headers["content-type"],delete n.headers["Content-Type"]);try{l=await(n.userFetch||fetch)(n.url,n),l=await Qp(l,t,n),n.responseInterceptor&&(l=await n.responseInterceptor(l)||l)}catch(h){if(!l)throw h;const v=new Error(l.statusText||`response status is ${l.status}`);throw v.status=l.status,v.statusCode=l.status,v.responseError=h,v}if(!l.ok){const h=new Error(l.statusText||`response status is ${l.status}`);throw h.status=l.status,h.statusCode=l.status,h.response=l,h}return l}function cy(t,n={}){const{requestInterceptor:i,responseInterceptor:l}=n,h=t.withCredentials?"include":"same-origin";return v=>t({url:v,loadSpec:!0,requestInterceptor:i,responseInterceptor:l,headers:{Accept:"application/json, application/yaml"},credentials:h}).then((x=>x.body))}const Bu=t=>{var n,i;const{baseDoc:l,url:h}=t,v=(n=l??h)!==null&&n!==void 0?n:"";return typeof((i=globalThis.document)===null||i===void 0?void 0:i.baseURI)=="string"?String(new URL(v,globalThis.document.baseURI)):v},gl=t=>{const{fetch:n,http:i}=t;return n||i||ni};var Uu,i0=(Uu=function(t,n){return Uu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,l){i.__proto__=l}||function(i,l){for(var h in l)l.hasOwnProperty(h)&&(i[h]=l[h])},Uu(t,n)},function(t,n){function i(){this.constructor=t}Uu(t,n),t.prototype=n===null?Object.create(n):(i.prototype=n.prototype,new i)}),uy=Object.prototype.hasOwnProperty;function ef(t,n){return uy.call(t,n)}function ri(t){if(Array.isArray(t)){for(var n=new Array(t.length),i=0;i<n.length;i++)n[i]=""+i;return n}if(Object.keys)return Object.keys(t);var l=[];for(var h in t)ef(t,h)&&l.push(h);return l}function ls(t){switch(typeof t){case"object":return JSON.parse(JSON.stringify(t));case"undefined":return null;default:return t}}function yl(t){for(var n,i=0,l=t.length;i<l;){if(!((n=t.charCodeAt(i))>=48&&n<=57))return!1;i++}return!0}function Ia(t){return t.indexOf("/")===-1&&t.indexOf("~")===-1?t:t.replace(/~/g,"~0").replace(/\//g,"~1")}function Ku(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}function si(t){if(t===void 0)return!0;if(t){if(Array.isArray(t)){for(var n=0,i=t.length;n<i;n++)if(si(t[n]))return!0}else if(typeof t=="object"){for(var l=ri(t),h=l.length,v=0;v<h;v++)if(si(t[l[v]]))return!0}}return!1}function Ei(t,n){var i=[t];for(var l in n){var h=typeof n[l]=="object"?JSON.stringify(n[l],null,2):n[l];h!==void 0&&i.push(l+": "+h)}return i.join(`
|
||
`)}var xo=(function(t){function n(i,l,h,v,x){var w=this.constructor,C=t.call(this,Ei(i,{name:l,index:h,operation:v,tree:x}))||this;return C.name=l,C.index=h,C.operation=v,C.tree=x,Object.setPrototypeOf(C,w.prototype),C.message=Ei(i,{name:l,index:h,operation:v,tree:x}),C}return i0(n,t),n})(Error),Kn=xo,za=ls,ii={add:function(t,n,i){return t[n]=this.value,{newDocument:i}},remove:function(t,n,i){var l=t[n];return delete t[n],{newDocument:i,removed:l}},replace:function(t,n,i){var l=t[n];return t[n]=this.value,{newDocument:i,removed:l}},move:function(t,n,i){var l=wc(i,this.path);l&&(l=ls(l));var h=bo(i,{op:"remove",path:this.from}).removed;return bo(i,{op:"add",path:this.path,value:h}),{newDocument:i,removed:l}},copy:function(t,n,i){var l=wc(i,this.from);return bo(i,{op:"add",path:this.path,value:ls(l)}),{newDocument:i}},test:function(t,n,i){return{newDocument:i,test:vn(t[n],this.value)}},_get:function(t,n,i){return this.value=t[n],{newDocument:i}}},a0={add:function(t,n,i){return yl(n)?t.splice(n,0,this.value):t[n]=this.value,{newDocument:i,index:n}},remove:function(t,n,i){return{newDocument:i,removed:t.splice(n,1)[0]}},replace:function(t,n,i){var l=t[n];return t[n]=this.value,{newDocument:i,removed:l}},move:ii.move,copy:ii.copy,test:ii.test,_get:ii._get};function wc(t,n){if(n=="")return t;var i={op:"_get",path:n};return bo(t,i),i.value}function bo(t,n,i,l,h,v){if(i===void 0&&(i=!1),l===void 0&&(l=!0),h===void 0&&(h=!0),v===void 0&&(v=0),i&&(typeof i=="function"?i(n,0,t,n.path):Fr(n,0)),n.path===""){var x={newDocument:t};if(n.op==="add")return x.newDocument=n.value,x;if(n.op==="replace")return x.newDocument=n.value,x.removed=t,x;if(n.op==="move"||n.op==="copy")return x.newDocument=wc(t,n.from),n.op==="move"&&(x.removed=t),x;if(n.op==="test"){if(x.test=vn(t,n.value),x.test===!1)throw new Kn("Test operation failed","TEST_OPERATION_FAILED",v,n,t);return x.newDocument=t,x}if(n.op==="remove")return x.removed=t,x.newDocument=null,x;if(n.op==="_get")return n.value=t,x;if(i)throw new Kn("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",v,n,t);return x}l||(t=ls(t));var w=(n.path||"").split("/"),C=t,$=1,N=w.length,_=void 0,F=void 0,U=void 0;for(U=typeof i=="function"?i:Fr;;){if((F=w[$])&&F.indexOf("~")!=-1&&(F=Ku(F)),h&&(F=="__proto__"||F=="prototype"&&$>0&&w[$-1]=="constructor"))throw new TypeError("JSON-Patch: modifying `__proto__` or `constructor/prototype` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README");if(i&&_===void 0&&(C[F]===void 0?_=w.slice(0,$).join("/"):$==N-1&&(_=n.path),_!==void 0&&U(n,0,t,_)),$++,Array.isArray(C)){if(F==="-")F=C.length;else{if(i&&!yl(F))throw new Kn("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index","OPERATION_PATH_ILLEGAL_ARRAY_INDEX",v,n,t);yl(F)&&(F=~~F)}if($>=N){if(i&&n.op==="add"&&F>C.length)throw new Kn("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",v,n,t);if((x=a0[n.op].call(n,C,F,t)).test===!1)throw new Kn("Test operation failed","TEST_OPERATION_FAILED",v,n,t);return x}}else if($>=N){if((x=ii[n.op].call(n,C,F,t)).test===!1)throw new Kn("Test operation failed","TEST_OPERATION_FAILED",v,n,t);return x}if(C=C[F],i&&$<N&&(!C||typeof C!="object"))throw new Kn("Cannot perform operation at the desired path","OPERATION_PATH_UNRESOLVABLE",v,n,t)}}function wo(t,n,i,l,h){if(l===void 0&&(l=!0),h===void 0&&(h=!0),i&&!Array.isArray(n))throw new Kn("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");l||(t=ls(t));for(var v=new Array(n.length),x=0,w=n.length;x<w;x++)v[x]=bo(t,n[x],i,!0,h,x),t=v[x].newDocument;return v.newDocument=t,v}function Fr(t,n,i,l){if(typeof t!="object"||t===null||Array.isArray(t))throw new Kn("Operation is not an object","OPERATION_NOT_AN_OBJECT",n,t,i);if(!ii[t.op])throw new Kn("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",n,t,i);if(typeof t.path!="string")throw new Kn("Operation `path` property is not a string","OPERATION_PATH_INVALID",n,t,i);if(t.path.indexOf("/")!==0&&t.path.length>0)throw new Kn('Operation `path` property must start with "/"',"OPERATION_PATH_INVALID",n,t,i);if((t.op==="move"||t.op==="copy")&&typeof t.from!="string")throw new Kn("Operation `from` property is not present (applicable in `move` and `copy` operations)","OPERATION_FROM_REQUIRED",n,t,i);if((t.op==="add"||t.op==="replace"||t.op==="test")&&t.value===void 0)throw new Kn("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_REQUIRED",n,t,i);if((t.op==="add"||t.op==="replace"||t.op==="test")&&si(t.value))throw new Kn("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED",n,t,i);if(i){if(t.op=="add"){var h=t.path.split("/").length,v=l.split("/").length;if(h!==v+1&&h!==v)throw new Kn("Cannot perform an `add` operation at the desired path","OPERATION_PATH_CANNOT_ADD",n,t,i)}else if(t.op==="replace"||t.op==="remove"||t.op==="_get"){if(t.path!==l)throw new Kn("Cannot perform the operation at a path that does not exist","OPERATION_PATH_UNRESOLVABLE",n,t,i)}else if(t.op==="move"||t.op==="copy"){var x=hr([{op:"_get",path:t.from,value:void 0}],i);if(x&&x.name==="OPERATION_PATH_UNRESOLVABLE")throw new Kn("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",n,t,i)}}}function hr(t,n,i){try{if(!Array.isArray(t))throw new Kn("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(n)wo(ls(n),ls(t),i||!0);else{i=i||Fr;for(var l=0;l<t.length;l++)i(t[l],l,n,void 0)}}catch(h){if(h instanceof Kn)return h;throw h}}function vn(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){var i,l,h,v=Array.isArray(t),x=Array.isArray(n);if(v&&x){if((l=t.length)!=n.length)return!1;for(i=l;i--!=0;)if(!vn(t[i],n[i]))return!1;return!0}if(v!=x)return!1;var w=Object.keys(t);if((l=w.length)!==Object.keys(n).length)return!1;for(i=l;i--!=0;)if(!n.hasOwnProperty(w[i]))return!1;for(i=l;i--!=0;)if(!vn(t[h=w[i]],n[h]))return!1;return!0}return t!=t&&n!=n}const vl=Object.freeze(Object.defineProperty({__proto__:null,JsonPatchError:Kn,_areEquals:vn,applyOperation:bo,applyPatch:wo,applyReducer:function(t,n,i){var l=bo(t,n);if(l.test===!1)throw new Kn("Test operation failed","TEST_OPERATION_FAILED",i,n,t);return l.newDocument},deepClone:za,getValueByPointer:wc,validate:hr,validator:Fr},Symbol.toStringTag,{value:"Module"}));var ai=new WeakMap,dy=function(t){this.observers=new Map,this.obj=t},xl=function(t,n){this.callback=t,this.observer=n};function tf(t,n){n===void 0&&(n=!1);var i=ai.get(t.object);nf(i.value,t.object,t.patches,"",n),t.patches.length&&wo(i.value,t.patches);var l=t.patches;return l.length>0&&(t.patches=[],t.callback&&t.callback(l)),l}function nf(t,n,i,l,h){if(n!==t){typeof n.toJSON=="function"&&(n=n.toJSON());for(var v=ri(n),x=ri(t),w=!1,C=x.length-1;C>=0;C--){var $=t[_=x[C]];if(!ef(n,_)||n[_]===void 0&&$!==void 0&&Array.isArray(n)===!1)Array.isArray(t)===Array.isArray(n)?(h&&i.push({op:"test",path:l+"/"+Ia(_),value:ls($)}),i.push({op:"remove",path:l+"/"+Ia(_)}),w=!0):(h&&i.push({op:"test",path:l,value:t}),i.push({op:"replace",path:l,value:n}));else{var N=n[_];typeof $=="object"&&$!=null&&typeof N=="object"&&N!=null&&Array.isArray($)===Array.isArray(N)?nf($,N,i,l+"/"+Ia(_),h):$!==N&&(h&&i.push({op:"test",path:l+"/"+Ia(_),value:ls($)}),i.push({op:"replace",path:l+"/"+Ia(_),value:ls(N)}))}}if(w||v.length!=x.length)for(C=0;C<v.length;C++){var _;ef(t,_=v[C])||n[_]===void 0||i.push({op:"add",path:l+"/"+Ia(_),value:ls(n[_])})}}}const Vu=Object.freeze(Object.defineProperty({__proto__:null,compare:function(t,n,i){i===void 0&&(i=!1);var l=[];return nf(t,n,l,"",i),l},generate:tf,observe:function(t,n){var i,l=(function(w){return ai.get(w)})(t);if(l){var h=(function(w,C){return w.observers.get(C)})(l,n);i=h&&h.observer}else l=new dy(t),ai.set(t,l);if(i)return i;if(i={},l.value=ls(t),n){i.callback=n,i.next=null;var v=function(){tf(i)},x=function(){clearTimeout(i.next),i.next=setTimeout(v)};typeof window<"u"&&(window.addEventListener("mouseup",x),window.addEventListener("keyup",x),window.addEventListener("mousedown",x),window.addEventListener("keydown",x),window.addEventListener("change",x))}return i.patches=[],i.object=t,i.unobserve=function(){tf(i),clearTimeout(i.next),(function(w,C){w.observers.delete(C.callback)})(l,i),typeof window<"u"&&(window.removeEventListener("mouseup",x),window.removeEventListener("keyup",x),window.removeEventListener("mousedown",x),window.removeEventListener("keydown",x),window.removeEventListener("change",x))},l.observers.set(n,new xl(n,i)),i},unobserve:function(t,n){n.unobserve()}},Symbol.toStringTag,{value:"Module"}));function La(t){return t&&t.t&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}Object.assign({},vl,Vu,{JsonPatchError:xo,deepClone:ls,escapePathComponent:Ia,unescapePathComponent:Ku});var hy=function(t){return(function(n){return!!n&&typeof n=="object"})(t)&&!(function(n){var i=Object.prototype.toString.call(n);return i==="[object RegExp]"||i==="[object Date]"||(function(l){return l.$$typeof===ch})(n)})(t)},ch=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;function Sc(t,n){return n.clone!==!1&&n.isMergeableObject(t)?oi((i=t,Array.isArray(i)?[]:{}),t,n):t;var i}function Ec(t,n,i){return t.concat(n).map((function(l){return Sc(l,i)}))}function Fa(t){return Object.keys(t).concat((function(n){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(n).filter((function(i){return Object.propertyIsEnumerable.call(n,i)})):[]})(t))}function So(t,n){try{return n in t}catch{return!1}}function oi(t,n,i){(i=i||{}).arrayMerge=i.arrayMerge||Ec,i.isMergeableObject=i.isMergeableObject||hy,i.cloneUnlessOtherwiseSpecified=Sc;var l=Array.isArray(n);return l===Array.isArray(t)?l?i.arrayMerge(t,n,i):(function(h,v,x){var w={};return x.isMergeableObject(h)&&Fa(h).forEach((function(C){w[C]=Sc(h[C],x)})),Fa(v).forEach((function(C){(function($,N){return So($,N)&&!(Object.hasOwnProperty.call($,N)&&Object.propertyIsEnumerable.call($,N))})(h,C)||(So(h,C)&&x.isMergeableObject(v[C])?w[C]=(function($,N){if(!N.customMerge)return oi;var _=N.customMerge($);return typeof _=="function"?_:oi})(C,x)(h[C],v[C],x):w[C]=Sc(v[C],x))})),w})(t,n,i):Sc(n,i)}oi.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce((function(i,l){return oi(i,l,n)}),{})};const py=La(oi),qn={add:function(t,n){return{op:"add",path:t,value:n}},replace:Cc,remove:function(t){return{op:"remove",path:t}},merge:function(t,n){return{type:"mutation",op:"merge",path:t,value:n}},mergeDeep:function(t,n){return{type:"mutation",op:"mergeDeep",path:t,value:n}},context:function(t,n){return{type:"context",path:t,value:n}},getIn:function(t,n){return n.reduce(((i,l)=>l!==void 0&&i?i[l]:i),t)},applyPatch:function(t,n,i){if(i=i||{},(n={...n,path:n.path&&jc(n.path)}).op==="merge"){const l=Sl(t,n.path);Object.assign(l,n.value),wo(t,[Cc(n.path,l)])}else if(n.op==="mergeDeep"){const l=Sl(t,n.path),h=py(l,n.value);t=wo(t,[Cc(n.path,h)]).newDocument}else if(n.op==="add"&&n.path===""&&Ac(n.value)){const l=Object.keys(n.value).reduce(((h,v)=>(h.push({op:"add",path:`/${jc(v)}`,value:n.value[v]}),h)),[]);wo(t,l)}else if(n.op==="replace"&&n.path===""){let{value:l}=n;i.allowMetaPatches&&n.meta&&wl(n)&&(Array.isArray(n.value)||Ac(n.value))&&(l={...l,...n.meta}),t=l}else if(wo(t,[n]),i.allowMetaPatches&&n.meta&&wl(n)&&(Array.isArray(n.value)||Ac(n.value))){const l={...Sl(t,n.path),...n.meta};wo(t,[Cc(n.path,l)])}return t},parentPathMatch:function(t,n){if(!Array.isArray(n))return!1;for(let i=0,l=n.length;i<l;i+=1)if(n[i]!==t[i])return!1;return!0},flatten:uh,fullyNormalizeArray:function(t){return o0(uh(fy(t)))},normalizeArray:fy,isPromise:function(t){return Ac(t)&&Dr(t.then)},forEachNew:function(t,n){try{return bl(t,Hu,n)}catch(i){return i}},forEachNewPrimitive:function(t,n){try{return bl(t,Wr,n)}catch(i){return i}},isJsonPatch:rf,isContextPatch:function(t){return Xu(t)&&t.type==="context"},isPatch:Xu,isMutation:Gu,isAdditiveMutation:wl,isGenerator:function(t){return Object.prototype.toString.call(t)==="[object GeneratorFunction]"},isFunction:Dr,isObject:Ac,isError:function(t){return t instanceof Error}};function jc(t){return Array.isArray(t)?t.length<1?"":`/${t.map((n=>(n+"").replace(/~/g,"~0").replace(/\//g,"~1"))).join("/")}`:t}function Cc(t,n,i){return{op:"replace",path:t,value:n,meta:i}}function bl(t,n,i){return o0(uh(t.filter(wl).map((l=>n(l.value,i,l.path)))||[]))}function Wr(t,n,i){return i=i||[],Array.isArray(t)?t.map(((l,h)=>Wr(l,n,i.concat(h)))):Ac(t)?Object.keys(t).map((l=>Wr(t[l],n,i.concat(l)))):n(t,i[i.length-1],i)}function Hu(t,n,i){let l=[];if((i=i||[]).length>0){const h=n(t,i[i.length-1],i);h&&(l=l.concat(h))}if(Array.isArray(t)){const h=t.map(((v,x)=>Hu(v,n,i.concat(x))));h&&(l=l.concat(h))}else if(Ac(t)){const h=Object.keys(t).map((v=>Hu(t[v],n,i.concat(v))));h&&(l=l.concat(h))}return l=uh(l),l}function fy(t){return Array.isArray(t)?t:[t]}function uh(t){return[].concat(...t.map((n=>Array.isArray(n)?uh(n):n)))}function o0(t){return t.filter((n=>n!==void 0))}function Ac(t){return t&&typeof t=="object"}function Dr(t){return t&&typeof t=="function"}function rf(t){if(Xu(t)){const{op:n}=t;return n==="add"||n==="remove"||n==="replace"}return!1}function Gu(t){return rf(t)||Xu(t)&&t.type==="mutation"}function wl(t){return Gu(t)&&(t.op==="add"||t.op==="replace"||t.op==="merge"||t.op==="mergeDeep")}function Xu(t){return t&&typeof t=="object"}function Sl(t,n){try{return wc(t,n)}catch(i){return console.error(i),{}}}var qa=function(t){return t&&t.Math===Math&&t},ji=qa(typeof globalThis=="object"&&globalThis)||qa(typeof window=="object"&&window)||qa(typeof self=="object"&&self)||qa(typeof Um=="object"&&Um)||qa(!1)||(function(){return this})()||Function("return this")(),Zi=function(t){try{return!!t()}catch{return!0}},sf=!Zi((function(){var t=(function(){}).bind();return typeof t!="function"||t.hasOwnProperty("prototype")})),l0=sf,El=Function.prototype,af=El.apply,dh=El.call,of=typeof Reflect=="object"&&Reflect.apply||(l0?dh.bind(af):function(){return dh.apply(af,arguments)}),Oc=sf,lf=Function.prototype,Yu=lf.call,cf=Oc&&lf.bind.bind(Yu,Yu),Wi=Oc?cf:function(t){return function(){return Yu.apply(t,arguments)}},my=Wi,kc=my({}.toString),Rc=my("".slice),uf=function(t){return Rc(kc(t),8,-1)},c0=uf,Zu=Wi,Tc=function(t){if(c0(t)==="Function")return Zu(t)},Wu=typeof document=="object"&&document.all,ks=Wu===void 0&&Wu!==void 0?function(t){return typeof t=="function"||t===Wu}:function(t){return typeof t=="function"},Ju={},Eo=!Zi((function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})),_c=sf,hh=Function.prototype.call,li=_c?hh.bind(hh):function(){return hh.apply(hh,arguments)},df={},hf={}.propertyIsEnumerable,jo=Object.getOwnPropertyDescriptor,jl=jo&&!hf.call({1:2},1);df.f=jl?function(t){var n=jo(this,t);return!!n&&n.enumerable}:hf;var Ji,Qu,$c=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}},ph=Zi,fh=uf,pf=Object,u0=Wi("".split),ed=ph((function(){return!pf("z").propertyIsEnumerable(0)}))?function(t){return fh(t)==="String"?u0(t,""):pf(t)}:pf,td=function(t){return t==null},d0=td,gy=TypeError,nd=function(t){if(d0(t))throw new gy("Can't call method on "+t);return t},Ci=ed,Qi=nd,ea=function(t){return Ci(Qi(t))},yy=ks,Ea=function(t){return typeof t=="object"?t!==null:yy(t)},Ba={},Is=Ba,jr=ji,ff=ks,Ua=function(t){return ff(t)?t:void 0},en=function(t,n){return arguments.length<2?Ua(Is[t])||Ua(jr[t]):Is[t]&&Is[t][n]||jr[t]&&jr[t][n]},Vn=Wi({}.isPrototypeOf),Pr=ji.navigator,mh=Pr&&Pr.userAgent,Nc=ji,Co=mh?String(mh):"",gh=Nc.process,rd=Nc.Deno,Dc=gh&&gh.versions||rd&&rd.version,h0=Dc&&Dc.v8;h0&&(Qu=(Ji=h0.split("."))[0]>0&&Ji[0]<4?1:+(Ji[0]+Ji[1])),!Qu&&Co&&(!(Ji=Co.match(/Edge\/(\d+)/))||Ji[1]>=74)&&(Ji=Co.match(/Chrome\/(\d+)/))&&(Qu=+Ji[1]);var Cr=Qu,vy=Zi,xy=ji.String,by=!!Object.getOwnPropertySymbols&&!vy((function(){var t=Symbol("symbol detection");return!xy(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&Cr&&Cr<41})),wy=by&&!Symbol.sham&&typeof Symbol.iterator=="symbol",mA=en,Sy=ks,Ey=Vn,jy=Object,Rs=wy?function(t){return typeof t=="symbol"}:function(t){var n=mA("Symbol");return Sy(n)&&Ey(n.prototype,jy(t))},Mr=String,sd=function(t){try{return Mr(t)}catch{return"Object"}},yh=ks,mf=sd,Cy=TypeError,ta=function(t){if(yh(t))return t;throw new Cy(mf(t)+" is not a function")},gf=ta,Ay=td,vh=function(t,n){var i=t[n];return Ay(i)?void 0:gf(i)},Oy=li,ky=ks,Ry=Ea,p0=TypeError,Ty={exports:{}},_y=ji,$y=Object.defineProperty,f0=ji,m0=Ty.exports=f0.o||(function(t,n){try{$y(_y,t,{value:n,configurable:!0,writable:!0})}catch{_y[t]=n}return n})("__core-js_shared__",{});(m0.versions||(m0.versions=[])).push({version:"3.38.1",mode:"pure",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE",source:"https://github.com/zloirock/core-js"});var Ny=Ty.exports,Dy=Ny,Py=function(t,n){return Dy[t]||(Dy[t]=n||{})},My=nd,g0=Object,Iy=function(t){return g0(My(t))},y0=Iy,v0=Wi({}.hasOwnProperty),Ka=Object.hasOwn||function(t,n){return v0(y0(t),n)},gA=Wi,x0=0,id=Math.random(),b0=gA(1 .toString),xh=function(t){return"Symbol("+(t===void 0?"":t)+")_"+b0(++x0+id,36)},yf=Py,zy=Ka,Ly=xh,yA=by,w0=wy,Pc=ji.Symbol,vf=yf("wks"),S0=w0?Pc.for||Pc:Pc&&Pc.withoutSetter||Ly,Va=function(t){return zy(vf,t)||(vf[t]=yA&&zy(Pc,t)?Pc[t]:S0("Symbol."+t)),vf[t]},Fy=li,qy=Ea,By=Rs,Uy=vh,E0=TypeError,j0=Va("toPrimitive"),vA=function(t,n){if(!qy(t)||By(t))return t;var i,l=Uy(t,j0);if(l){if(i=Fy(l,t,n),!qy(i)||By(i))return i;throw new E0("Can't convert object to primitive value")}return(function(h,v){var x,w;if(ky(x=h.toString)&&!Ry(w=Oy(x,h))||ky(x=h.valueOf)&&!Ry(w=Oy(x,h)))return w;throw new p0("Can't convert object to primitive value")})(t)},Ky=Rs,Vy=function(t){var n=vA(t,"string");return Ky(n)?n:n+""},Hy=Ea,bh=ji.document,C0=Hy(bh)&&Hy(bh.createElement),Gy=function(t){return C0?bh.createElement(t):{}},xA=Gy,A0=!Eo&&!Zi((function(){return Object.defineProperty(xA("div"),"a",{get:function(){return 7}}).a!==7})),O0=Eo,wh=li,Xy=df,xf=$c,k0=ea,R0=Vy,Sh=Ka,T0=A0,bf=Object.getOwnPropertyDescriptor;Ju.f=O0?bf:function(t,n){if(t=k0(t),n=R0(n),T0)try{return bf(t,n)}catch{}if(Sh(t,n))return xf(!wh(Xy.f,t,n),t[n])};var _0=Zi,Yy=ks,Zy=/#|\.prototype\./,ad=function(t,n){var i=Mc[$0(t)];return i===D0||i!==N0&&(Yy(n)?_0(n):!!n)},$0=ad.normalize=function(t){return String(t).replace(Zy,".").toLowerCase()},Mc=ad.data={},N0=ad.NATIVE="N",D0=ad.POLYFILL="P",P0=ad,wf=ta,M0=sf,Wy=Tc(Tc.bind),Jy=function(t,n){return wf(t),n===void 0?t:M0?Wy(t,n):function(){return t.apply(n,arguments)}},Cl={},I0=Eo&&Zi((function(){return Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype!==42})),Qy=Ea,qr=String,vs=TypeError,Al=function(t){if(Qy(t))return t;throw new vs(qr(t)+" is not an object")},z0=Eo,L0=A0,F0=I0,Ol=Al,ev=Vy,Sf=TypeError,Ef=Object.defineProperty,bA=Object.getOwnPropertyDescriptor;Cl.f=z0?F0?function(t,n,i){if(Ol(t),n=ev(n),Ol(i),typeof t=="function"&&n==="prototype"&&"value"in i&&"writable"in i&&!i.writable){var l=bA(t,n);l&&l.writable&&(t[n]=i.value,i={configurable:"configurable"in i?i.configurable:l.configurable,enumerable:"enumerable"in i?i.enumerable:l.enumerable,writable:!1})}return Ef(t,n,i)}:Ef:function(t,n,i){if(Ol(t),n=ev(n),Ol(i),L0)try{return Ef(t,n,i)}catch{}if("get"in i||"set"in i)throw new Sf("Accessors not supported");return"value"in i&&(t[n]=i.value),t};var jf=Cl,tv=$c,Ao=Eo?function(t,n,i){return jf.f(t,n,tv(1,i))}:function(t,n,i){return t[n]=i,t},od=ji,q0=of,nv=Tc,rv=ks,sv=Ju.f,B0=P0,kl=Ba,Cf=Jy,Rl=Ao,iv=Ka,av=function(t){var n=function(i,l,h){if(this instanceof n){switch(arguments.length){case 0:return new t;case 1:return new t(i);case 2:return new t(i,l)}return new t(i,l,h)}return q0(t,this,arguments)};return n.prototype=t.prototype,n},Eh=function(t,n){var i,l,h,v,x,w,C,$,N,_=t.target,F=t.global,U=t.stat,J=t.proto,Y=F?od:U?od[_]:od[_]&&od[_].prototype,Z=F?kl:kl[_]||Rl(kl,_,{})[_],P=Z.prototype;for(v in n)l=!(i=B0(F?v:_+(U?".":"#")+v,t.forced))&&Y&&iv(Y,v),w=Z[v],l&&(C=t.dontCallGetSet?(N=sv(Y,v))&&N.value:Y[v]),x=l&&C?C:n[v],(i||J||typeof w!=typeof x)&&($=t.bind&&l?Cf(x,od):t.wrap&&l?av(x):J&&rv(x)?nv(x):x,(t.sham||x&&x.sham||w&&w.sham)&&Rl($,"sham",!0),Rl(Z,v,$),J&&(iv(kl,h=_+"Prototype")||Rl(kl,h,{}),Rl(kl[h],v,x),t.real&&P&&(i||!P[v])&&Rl(P,v,x)))},Oo=xh,Af=Py("keys"),ov=function(t){return Af[t]||(Af[t]=Oo(t))},U0=!Zi((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),ko=Ka,lv=ks,K0=Iy,Of=U0,ld=ov("IE_PROTO"),or=Object,wA=or.prototype,cv=Of?or.getPrototypeOf:function(t){var n=K0(t);if(ko(n,ld))return n[ld];var i=n.constructor;return lv(i)&&n instanceof i?i.prototype:n instanceof or?wA:null},V0=Wi,jh=ta,Tl=Ea,H0=String,G0=TypeError,Ch=Ea,Ha=nd,X0=function(t){if((function(n){return Tl(n)||n===null})(t))return t;throw new G0("Can't set "+H0(t)+" as a prototype")},Ah=Object.setPrototypeOf||("__proto__"in{}?(function(){var t,n=!1,i={};try{(t=(function(l,h,v){try{return V0(jh(Object.getOwnPropertyDescriptor(l,h)[v]))}catch{}})(Object.prototype,"__proto__","set"))(i,[]),n=i instanceof Array}catch{}return function(l,h){return Ha(l),X0(h),Ch(l)&&(n?t(l,h):l.__proto__=h),l}})():void 0),uv={},dv=Math.ceil,hv=Math.floor,kf=Math.trunc||function(t){var n=+t;return(n>0?hv:dv)(n)},Rf=function(t){var n=+t;return n!=n||n===0?0:kf(n)},Ro=Rf,Br=Math.max,pv=Math.min,Y0=Rf,cs=Math.min,Z0=function(t){return(function(n){var i=Y0(n);return i>0?cs(i,9007199254740991):0})(t.length)},W0=ea,J0=Z0,xr=function(t){return function(n,i,l){var h=W0(n),v=J0(h);if(v===0)return!t&&-1;var x,w=(function(C,$){var N=Ro(C);return N<0?Br(N+$,0):pv(N,$)})(l,v);if(t&&i!=i){for(;v>w;)if((x=h[w++])!=x)return!0}else for(;v>w;w++)if((t||w in h)&&h[w]===i)return t||w||0;return!t&&-1}},ci={indexOf:xr(!1)},ja={},Tf=Ka,Q0=ea,eS=ci.indexOf,SA=ja,Oh=Wi([].push),zs=function(t,n){var i,l=Q0(t),h=0,v=[];for(i in l)!Tf(SA,i)&&Tf(l,i)&&Oh(v,i);for(;n.length>h;)Tf(l,i=n[h++])&&(~eS(v,i)||Oh(v,i));return v},Ai=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],tS=zs,ui=Ai.concat("length","prototype");uv.f=Object.getOwnPropertyNames||function(t){return tS(t,ui)};var fv={};fv.f=Object.getOwnPropertySymbols;var To=en,Ic=uv,_o=fv,mv=Al,gv=Wi([].concat),Ca=To("Reflect","ownKeys")||function(t){var n=Ic.f(mv(t)),i=_o.f;return i?gv(n,i(t)):n},yv=Ka,cd=Ca,kh=Ju,Rh=Cl,zc=function(t,n,i){for(var l=cd(n),h=Rh.f,v=kh.f,x=0;x<l.length;x++){var w=l[x];yv(t,w)||i&&yv(i,w)||h(t,w,v(n,w))}},vv={},nS=zs,Th=Ai,rS=Object.keys||function(t){return nS(t,Th)},_f=Eo,sS=I0,EA=Cl,jA=Al,Hn=ea,lr=rS;vv.f=_f&&!sS?Object.defineProperties:function(t,n){jA(t);for(var i,l=Hn(n),h=lr(n),v=h.length,x=0;v>x;)EA.f(t,i=h[x++],l[i]);return t};var hn,An=en("document","documentElement"),Wn=Al,Oi=vv,$o=Ai,ud=ja,xv=An,No=Gy,Ar=ov("IE_PROTO"),Ga=function(){},_l=function(t){return"<script>"+t+"<\/script>"},$f=function(t){t.write(_l("")),t.close();var n=t.parentWindow.Object;return t=null,n},Ts=function(){try{hn=new ActiveXObject("htmlfile")}catch{}var t,n;Ts=typeof document<"u"?document.domain&&hn?$f(hn):((n=No("iframe")).style.display="none",xv.appendChild(n),n.src="javascript:",(t=n.contentWindow.document).open(),t.write(_l("document.F=Object")),t.close(),t.F):$f(hn);for(var i=$o.length;i--;)delete Ts.prototype[$o[i]];return Ts()};ud[Ar]=!0;var $l=Object.create||function(t,n){var i;return t!==null?(Ga.prototype=Wn(t),i=new Ga,Ga.prototype=null,i[Ar]=t):i=Ts(),n===void 0?i:Oi.f(i,n)},_h=Ea,di=Ao,Nf=function(t,n){_h(n)&&"cause"in n&&di(t,"cause",n.cause)},$h=Error,iS=Wi("".replace),Df=String(new $h("zxcasd").stack),Nh=/\n\s*at [^:]*:[^\n]*/,Nl=Nh.test(Df),Jr=$c,Dl=!Zi((function(){var t=new Error("a");return!("stack"in t)||(Object.defineProperty(t,"stack",Jr(1,7)),t.stack!==7)})),dd=Ao,Do=Dl,Pf=Error.captureStackTrace,Mf=function(t,n,i,l){Do&&(Pf?Pf(t,n):dd(t,"stack",(function(h,v){if(Nl&&typeof h=="string"&&!$h.prepareStackTrace)for(;v--;)h=iS(h,Nh,"");return h})(i,l)))},Lc={},Dh=Lc,bv=Va("iterator"),ki=Array.prototype,wv={};wv[Va("toStringTag")]="z";var _s=String(wv)==="[object z]",aS=_s,oS=ks,If=uf,Pl=Va("toStringTag"),zf=Object,Sv=If((function(){return arguments})())==="Arguments",Ml=aS?If:function(t){var n,i,l;return t===void 0?"Undefined":t===null?"Null":typeof(i=(function(h,v){try{return h[v]}catch{}})(n=zf(t),Pl))=="string"?i:Sv?If(n):(l=If(n))==="Object"&&oS(n.callee)?"Arguments":l},lS=Ml,Ev=vh,cS=td,uS=Lc,Lf=Va("iterator"),Ff=function(t){if(!cS(t))return Ev(t,Lf)||Ev(t,"@@iterator")||uS[lS(t)]},CA=li,AA=ta,OA=Al,dS=sd,hS=Ff,hd=TypeError,qf=li,jv=Al,pS=vh,fS=Jy,mS=li,gS=Al,yS=sd,Bf=Z0,Cv=Vn,vS=Ff,Xn=function(t,n,i){var l,h;jv(t);try{if(!(l=pS(t,"return"))){if(n==="throw")throw i;return i}l=qf(l,t)}catch(v){h=!0,l=v}if(n==="throw")throw i;if(h)throw l;return jv(l),i},Av=TypeError,Uf=function(t,n){this.stopped=t,this.result=n},Ov=Uf.prototype,kA=Ml,RA=String,kv=function(t){if(kA(t)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return RA(t)},Kf=kv,Fc=function(t,n){return t===void 0?arguments.length<2?"":n:Kf(t)},Rv=Eh,Vf=Vn,Tv=cv,Aa=Ah,Xa=zc,pd=$l,_v=Ao,Hf=$c,xS=Nf,bS=Mf,wS=function(t,n,i){var l,h,v,x,w,C,$,N=i&&i.that,_=!(!i||!i.AS_ENTRIES),F=!(!i||!i.IS_RECORD),U=!(!i||!i.IS_ITERATOR),J=!(!i||!i.INTERRUPTED),Y=fS(n,N),Z=function(se){return l&&Xn(l,"normal",se),new Uf(!0,se)},P=function(se){return _?(gS(se),J?Y(se[0],se[1],Z):Y(se[0],se[1])):J?Y(se,Z):Y(se)};if(F)l=t.iterator;else if(U)l=t;else{if(!(h=vS(t)))throw new Av(yS(t)+" is not iterable");if((function(se){return se!==void 0&&(Dh.Array===se||ki[bv]===se)})(h)){for(v=0,x=Bf(t);x>v;v++)if((w=P(t[v]))&&Cv(Ov,w))return w;return new Uf(!1)}l=(function(se,ae){var he=arguments.length<2?hS(se):ae;if(AA(he))return OA(CA(he,se));throw new hd(dS(se)+" is not iterable")})(t,h)}for(C=F?t.next:l.next;!($=mS(C,l)).done;){try{w=P($.value)}catch(se){Xn(l,"throw",se)}if(typeof w=="object"&&w&&Cv(Ov,w))return w}return new Uf(!1)},TA=Fc,$v=Va("toStringTag"),Ph=Error,SS=[].push,fd=function(t,n){var i,l=Vf(Mh,this);Aa?i=Aa(new Ph,l?Tv(this):Mh):(i=l?this:pd(Mh),_v(i,$v,"Error")),n!==void 0&&_v(i,"message",TA(n)),bS(i,fd,i.stack,1),arguments.length>2&&xS(i,arguments[2]);var h=[];return wS(t,SS,{that:h}),_v(i,"errors",h),i};Aa?Aa(fd,Ph):Xa(fd,Ph,{name:!0});var Mh=fd.prototype=pd(Ph.prototype,{constructor:Hf(1,fd),message:Hf(1,""),name:Hf(1,"AggregateError")});Rv({global:!0},{AggregateError:fd});var Nv=Cl.f,_A=ks,$A=Ea,md=Ah,ES=en,jS=Ao,En=Vn,Gf=Ah,Ih=zc,Xf=function(t,n,i){i in t||Nv(t,i,{configurable:!0,get:function(){return n[i]},set:function(l){n[i]=l}})},CS=Fc,Dv=Nf,zh=Mf,Yf=Eo,AS=function(t,n,i,l){var h="stackTraceLimit",v=l?2:1,x=t.split("."),w=x[x.length-1],C=ES.apply(null,x);if(C){var $=C.prototype;if(!i)return C;var N=ES("Error"),_=n((function(F,U){var J=CS(l?U:F,void 0),Y=l?new C(F):new C;return J!==void 0&&jS(Y,"message",J),zh(Y,_,Y.stack,2),this&&En($,this)&&(function(Z,P,se){var ae,he;md&&_A(ae=P.constructor)&&ae!==se&&$A(he=ae.prototype)&&he!==se.prototype&&md(Z,he)})(Y,this,_),arguments.length>v&&Dv(Y,arguments[v]),Y}));return _.prototype=$,w!=="Error"?Gf?Gf(_,N):Ih(_,N,{name:!0}):Yf&&h in C&&(Xf(_,C,h),Xf(_,C,"prepareStackTrace")),Ih(_,C),_}},Pv=Eh,Ya=of,OS=AS,Mv=ji.WebAssembly,Lh=new Error("e",{cause:7}).cause!==7,Pn=function(t,n){var i={};i[t]=OS(t,n,Lh),Pv({global:!0,forced:Lh},i)},Fh=function(t,n){if(Mv&&Mv[t]){var i={};i[t]=OS("WebAssembly."+t,n,Lh),Pv({target:"WebAssembly",stat:!0,forced:Lh},i)}};Pn("Error",(function(t){return function(n){return Ya(t,this,arguments)}})),Pn("EvalError",(function(t){return function(n){return Ya(t,this,arguments)}})),Pn("RangeError",(function(t){return function(n){return Ya(t,this,arguments)}})),Pn("ReferenceError",(function(t){return function(n){return Ya(t,this,arguments)}})),Pn("SyntaxError",(function(t){return function(n){return Ya(t,this,arguments)}})),Pn("TypeError",(function(t){return function(n){return Ya(t,this,arguments)}})),Pn("URIError",(function(t){return function(n){return Ya(t,this,arguments)}})),Fh("CompileError",(function(t){return function(n){return Ya(t,this,arguments)}})),Fh("LinkError",(function(t){return function(n){return Ya(t,this,arguments)}})),Fh("RuntimeError",(function(t){return function(n){return Ya(t,this,arguments)}}));var xs=Eh,NA=of,Iv=Zi,DA=AS,Zf=en("AggregateError"),Wf=!Iv((function(){return Zf([1]).errors[0]!==1}))&&Iv((function(){return Zf([1],"AggregateError",{cause:7}).cause!==7}));xs({global:!0,forced:Wf},{AggregateError:DA("AggregateError",(function(t){return function(n,i){return NA(t,this,arguments)}}),Wf,!0)});var qc,gd,qh,zv=ks,Jf=ji.WeakMap,PA=zv(Jf)&&/native code/.test(String(Jf)),Lv=ji,MA=Ea,kS=Ao,Fv=Ka,qv=Ny,Il=ov,RS=ja,Qf=Lv.TypeError,Bv=Lv.WeakMap;if(PA||qv.state){var Za=qv.state||(qv.state=new Bv);Za.get=Za.get,Za.has=Za.has,Za.set=Za.set,qc=function(t,n){if(Za.has(t))throw new Qf("Object already initialized");return n.facade=t,Za.set(t,n),n},gd=function(t){return Za.get(t)||{}},qh=function(t){return Za.has(t)}}else{var yd=Il("state");RS[yd]=!0,qc=function(t,n){if(Fv(t,yd))throw new Qf("Object already initialized");return n.facade=t,kS(t,yd,n),n},gd=function(t){return Fv(t,yd)?t[yd]:{}},qh=function(t){return Fv(t,yd)}}var zl,em,tm,TS={set:qc,get:gd,has:qh,enforce:function(t){return qh(t)?gd(t):qc(t,{})},getterFor:function(t){return function(n){var i;if(!MA(n)||(i=gd(n)).type!==t)throw new Qf("Incompatible receiver, "+t+" required");return i}}},hi=Eo,Uv=Ka,Kv=Function.prototype,_S=hi&&Object.getOwnPropertyDescriptor,Vv=Uv(Kv,"name"),Bh={PROPER:Vv&&(function(){}).name==="something",CONFIGURABLE:Vv&&(!hi||hi&&_S(Kv,"name").configurable)},na=Ao,Hv=function(t,n,i,l){return l&&l.enumerable?t[n]=i:na(t,n,i),t},nm=Zi,Po=ks,IA=Ea,zA=$l,Bc=cv,$S=Hv,Gv=Va("iterator"),NS=!1;[].keys&&("next"in(tm=[].keys())?(em=Bc(Bc(tm)))!==Object.prototype&&(zl=em):NS=!0);var LA=!IA(zl)||nm((function(){var t={};return zl[Gv].call(t)!==t}));Po((zl=LA?{}:zA(zl))[Gv])||$S(zl,Gv,(function(){return this}));var DS={IteratorPrototype:zl,BUGGY_SAFARI_ITERATORS:NS},FA=Ml,qA=_s?{}.toString:function(){return"[object "+FA(this)+"]"},BA=_s,PS=Cl.f,vd=Ao,Uh=Ka,MS=qA,IS=Va("toStringTag"),Ll=function(t,n,i,l){var h=i?t:t&&t.prototype;h&&(Uh(h,IS)||PS(h,IS,{configurable:!0,value:n}),l&&!BA&&vd(h,"toString",MS))},Kh=DS.IteratorPrototype,zS=$l,rm=$c,Xv=Ll,Yv=Lc,sm=function(){return this},LS=Eh,FS=li,UA=cv,qS=Ll,BS=Hv,im=Lc,KA=Bh.PROPER,Uc=DS.BUGGY_SAFARI_ITERATORS,xd=Va("iterator"),am=function(){return this},US=function(t,n,i,l,h,v,x){(function(P,se,ae,he){var ge=se+" Iterator";P.prototype=zS(Kh,{next:rm(1,ae)}),Xv(P,ge,!1,!0),Yv[ge]=sm})(i,n,l);var w,C,$,N=function(P){if(P===h&&Y)return Y;if(!Uc&&P&&P in U)return U[P];switch(P){case"keys":case"values":case"entries":return function(){return new i(this,P)}}return function(){return new i(this)}},_=n+" Iterator",F=!1,U=t.prototype,J=U[xd]||U["@@iterator"]||h&&U[h],Y=!Uc&&J||N(h),Z=n==="Array"&&U.entries||J;if(Z&&(w=UA(Z.call(new t)))!==Object.prototype&&w.next&&(qS(w,_,!0,!0),im[_]=am),KA&&h==="values"&&J&&J.name!=="values"&&(F=!0,Y=function(){return FS(J,this)}),h)if(C={values:N("values"),keys:v?Y:N("keys"),entries:N("entries")},x)for($ in C)(Uc||F||!($ in U))&&BS(U,$,C[$]);else LS({target:n,proto:!0,forced:Uc||F},C);return x&&U[xd]!==Y&&BS(U,xd,Y,{}),im[n]=Y,C},bd=function(t,n){return{value:t,done:n}},VA=ea,Zv=Lc,Wv=TS;Cl.f;var KS=US,Vh=bd,Jv=Wv.set,VS=Wv.getterFor("Array Iterator");KS(Array,"Array",(function(t,n){Jv(this,{type:"Array Iterator",target:VA(t),index:0,kind:n})}),(function(){var t=VS(this),n=t.target,i=t.index++;if(!n||i>=n.length)return t.target=null,Vh(void 0,!0);switch(t.kind){case"keys":return Vh(i,!1);case"values":return Vh(n[i],!1)}return Vh([i,n[i]],!1)}),"values"),Zv.Arguments=Zv.Array;var om=Wi,lm=Rf,HA=kv,GA=nd,Qv=om("".charAt),cm=om("".charCodeAt),um=om("".slice),ex=function(t){return function(n,i){var l,h,v=HA(GA(n)),x=lm(i),w=v.length;return x<0||x>=w?t?"":void 0:(l=cm(v,x))<55296||l>56319||x+1===w||(h=cm(v,x+1))<56320||h>57343?t?Qv(v,x):l:t?um(v,x,x+2):h-56320+(l-55296<<10)+65536}},HS=ex(!0),tx=kv,Mo=TS,Fl=US,Io=bd,Hh=Mo.set,Gh=Mo.getterFor("String Iterator");Fl(String,"String",(function(t){Hh(this,{type:"String Iterator",string:tx(t),index:0})}),(function(){var t,n=Gh(this),i=n.string,l=n.index;return l>=i.length?Io(void 0,!0):(t=HS(i,l),n.index+=t.length,Io(t,!1))}));var ql=Ba.AggregateError,XA=ji,GS=Ll,wd=Lc;for(var nx in{CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0})GS(XA[nx],nx),wd[nx]=wd.Array;const XS=La(ql);class dm extends XS{constructor(n,i,l){if(super(n,i,l),this.name=this.constructor.name,typeof i=="string"&&(this.message=i),typeof Error.captureStackTrace=="function"?Error.captureStackTrace(this,this.constructor):this.stack=new Error(i).stack,l!=null&&typeof l=="object"&&Object.hasOwn(l,"cause")&&!("cause"in this)){const{cause:h}=l;this.cause=h,h instanceof Error&&"stack"in h&&(this.stack=`${this.stack}
|
||
CAUSE: ${h.stack}`)}}}class br extends Error{static[Symbol.hasInstance](n){return super[Symbol.hasInstance](n)||Function.prototype[Symbol.hasInstance].call(dm,n)}constructor(n,i){if(super(n,i),this.name=this.constructor.name,typeof n=="string"&&(this.message=n),typeof Error.captureStackTrace=="function"?Error.captureStackTrace(this,this.constructor):this.stack=new Error(n).stack,i!=null&&typeof i=="object"&&Object.hasOwn(i,"cause")&&!("cause"in this)){const{cause:l}=i;this.cause=l,l instanceof Error&&"stack"in l&&(this.stack=`${this.stack}
|
||
CAUSE: ${l.stack}`)}}}class Oa extends br{constructor(n,i){if(super(n,i),i!=null&&typeof i=="object"){const{cause:l,...h}=i;Object.assign(this,h)}}}class Ur extends br{}class Sd extends Ur{}var hm=function(){return!1},pi=function(){return!0};function pr(t){return t!=null&&typeof t=="object"&&t["@@functional/placeholder"]===!0}function Bn(t){return function n(i){return arguments.length===0||pr(i)?n:t.apply(this,arguments)}}function Zt(t){return function n(i,l){switch(arguments.length){case 0:return n;case 1:return pr(i)?n:Bn((function(h){return t(i,h)}));default:return pr(i)&&pr(l)?n:pr(i)?Bn((function(h){return t(h,l)})):pr(l)?Bn((function(h){return t(i,h)})):t(i,l)}}}function Xh(t,n){switch(t){case 0:return function(){return n.apply(this,arguments)};case 1:return function(i){return n.apply(this,arguments)};case 2:return function(i,l){return n.apply(this,arguments)};case 3:return function(i,l,h){return n.apply(this,arguments)};case 4:return function(i,l,h,v){return n.apply(this,arguments)};case 5:return function(i,l,h,v,x){return n.apply(this,arguments)};case 6:return function(i,l,h,v,x,w){return n.apply(this,arguments)};case 7:return function(i,l,h,v,x,w,C){return n.apply(this,arguments)};case 8:return function(i,l,h,v,x,w,C,$){return n.apply(this,arguments)};case 9:return function(i,l,h,v,x,w,C,$,N){return n.apply(this,arguments)};case 10:return function(i,l,h,v,x,w,C,$,N,_){return n.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}function rx(t,n,i){return function(){for(var l=[],h=0,v=t,x=0,w=!1;x<n.length||h<arguments.length;){var C;x<n.length&&(!pr(n[x])||h>=arguments.length)?C=n[x]:(C=arguments[h],h+=1),l[x]=C,pr(C)?w=!0:v-=1,x+=1}return!w&&v<=0?i.apply(this,l):Xh(Math.max(0,v),rx(t,l,i))}}var Jn=Zt((function(t,n){return t===1?Bn(n):Xh(t,rx(t,[],n))}));function a(t){return function n(i,l,h){switch(arguments.length){case 0:return n;case 1:return pr(i)?n:Zt((function(v,x){return t(i,v,x)}));case 2:return pr(i)&&pr(l)?n:pr(i)?Zt((function(v,x){return t(v,l,x)})):pr(l)?Zt((function(v,x){return t(i,v,x)})):Bn((function(v){return t(i,l,v)}));default:return pr(i)&&pr(l)&&pr(h)?n:pr(i)&&pr(l)?Zt((function(v,x){return t(v,x,h)})):pr(i)&&pr(h)?Zt((function(v,x){return t(v,l,x)})):pr(l)&&pr(h)?Zt((function(v,x){return t(i,v,x)})):pr(i)?Bn((function(v){return t(v,l,h)})):pr(l)?Bn((function(v){return t(i,v,h)})):pr(h)?Bn((function(v){return t(i,l,v)})):t(i,l,h)}}}const c=Array.isArray||function(t){return t!=null&&t.length>=0&&Object.prototype.toString.call(t)==="[object Array]"};function f(t,n,i){return function(){if(arguments.length===0)return i();var l=arguments[arguments.length-1];if(!c(l)){for(var h=0;h<t.length;){if(typeof l[t[h]]=="function")return l[t[h]].apply(l,Array.prototype.slice.call(arguments,0,-1));h+=1}if((function(v){return v!=null&&typeof v["@@transducer/step"]=="function"})(l))return n.apply(null,Array.prototype.slice.call(arguments,0,-1))(l)}return i.apply(this,arguments)}}function y(t){return t&&t["@@transducer/reduced"]?t:{"@@transducer/value":t,"@@transducer/reduced":!0}}const j=function(){return this.xf["@@transducer/init"]()},O=function(t){return this.xf["@@transducer/result"](t)};var B=(function(){function t(n,i){this.xf=i,this.f=n,this.all=!0}return t.prototype["@@transducer/init"]=j,t.prototype["@@transducer/result"]=function(n){return this.all&&(n=this.xf["@@transducer/step"](n,!0)),this.xf["@@transducer/result"](n)},t.prototype["@@transducer/step"]=function(n,i){return this.f(i)||(this.all=!1,n=y(this.xf["@@transducer/step"](n,!1))),n},t})(),te=Zt(f(["all"],(function(t){return function(n){return new B(t,n)}}),(function(t,n){for(var i=0;i<n.length;){if(!t(n[i]))return!1;i+=1}return!0})));function ye(t){for(var n,i=[];!(n=t.next()).done;)i.push(n.value);return i}function Be(t,n,i){for(var l=0,h=i.length;l<h;){if(t(n,i[l]))return!0;l+=1}return!1}function We(t,n){return Object.prototype.hasOwnProperty.call(n,t)}const rt=typeof Object.is=="function"?Object.is:function(t,n){return t===n?t!==0||1/t==1/n:t!=t&&n!=n};var Ue=Object.prototype.toString,Xe=(function(){return Ue.call(arguments)==="[object Arguments]"?function(t){return Ue.call(t)==="[object Arguments]"}:function(t){return We("callee",t)}})(),Dt=!{toString:null}.propertyIsEnumerable("toString"),Xt=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],Qn=(function(){return arguments.propertyIsEnumerable("length")})(),$e=function(t,n){for(var i=0;i<t.length;){if(t[i]===n)return!0;i+=1}return!1},Ee=Bn(typeof Object.keys!="function"||Qn?(function(t){if(Object(t)!==t)return[];var n,i,l=[],h=Qn&&Xe(t);for(n in t)!We(n,t)||h&&n==="length"||(l[l.length]=n);if(Dt)for(i=Xt.length-1;i>=0;)We(n=Xt[i],t)&&!$e(l,n)&&(l[l.length]=n),i-=1;return l}):(function(t){return Object(t)!==t?[]:Object.keys(t)})),Pe=Bn((function(t){return t===null?"Null":t===void 0?"Undefined":Object.prototype.toString.call(t).slice(8,-1)}));function nt(t,n,i,l){var h=ye(t);function v(x,w){return Ut(x,w,i.slice(),l.slice())}return!Be((function(x,w){return!Be(v,w,x)}),ye(n),h)}function Ut(t,n,i,l){if(rt(t,n))return!0;var h=Pe(t);if(h!==Pe(n))return!1;if(typeof t["fantasy-land/equals"]=="function"||typeof n["fantasy-land/equals"]=="function")return typeof t["fantasy-land/equals"]=="function"&&t["fantasy-land/equals"](n)&&typeof n["fantasy-land/equals"]=="function"&&n["fantasy-land/equals"](t);if(typeof t.equals=="function"||typeof n.equals=="function")return typeof t.equals=="function"&&t.equals(n)&&typeof n.equals=="function"&&n.equals(t);switch(h){case"Arguments":case"Array":case"Object":if(typeof t.constructor=="function"&&(function(N){var _=String(N).match(/^function (\w*)/);return _==null?"":_[1]})(t.constructor)==="Promise")return t===n;break;case"Boolean":case"Number":case"String":if(typeof t!=typeof n||!rt(t.valueOf(),n.valueOf()))return!1;break;case"Date":if(!rt(t.valueOf(),n.valueOf()))return!1;break;case"Error":return t.name===n.name&&t.message===n.message;case"RegExp":if(t.source!==n.source||t.global!==n.global||t.ignoreCase!==n.ignoreCase||t.multiline!==n.multiline||t.sticky!==n.sticky||t.unicode!==n.unicode)return!1}for(var v=i.length-1;v>=0;){if(i[v]===t)return l[v]===n;v-=1}switch(h){case"Map":return t.size===n.size&&nt(t.entries(),n.entries(),i.concat([t]),l.concat([n]));case"Set":return t.size===n.size&&nt(t.values(),n.values(),i.concat([t]),l.concat([n]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var x=Ee(t);if(x.length!==Ee(n).length)return!1;var w=i.concat([t]),C=l.concat([n]);for(v=x.length-1;v>=0;){var $=x[v];if(!We($,n)||!Ut(n[$],t[$],w,C))return!1;v-=1}return!0}var pn=Zt((function(t,n){return Ut(t,n,[],[])}));function Pt(t,n){return(function(i,l,h){var v,x;if(typeof i.indexOf=="function")switch(typeof l){case"number":if(l===0){for(v=1/l;h<i.length;){if((x=i[h])===0&&1/x===v)return h;h+=1}return-1}if(l!=l){for(;h<i.length;){if(typeof(x=i[h])=="number"&&x!=x)return h;h+=1}return-1}return i.indexOf(l,h);case"string":case"boolean":case"function":case"undefined":return i.indexOf(l,h);case"object":if(l===null)return i.indexOf(l,h)}for(;h<i.length;){if(pn(i[h],l))return h;h+=1}return-1})(n,t,0)>=0}function rn(t,n){for(var i=0,l=n.length,h=Array(l);i<l;)h[i]=t(n[i]),i+=1;return h}function wn(t){return'"'+t.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\f/g,"\\f").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\v/g,"\\v").replace(/\0/g,"\\0").replace(/"/g,'\\"')+'"'}var On=function(t){return(t<10?"0":"")+t},Bl=typeof Date.prototype.toISOString=="function"?function(t){return t.toISOString()}:function(t){return t.getUTCFullYear()+"-"+On(t.getUTCMonth()+1)+"-"+On(t.getUTCDate())+"T"+On(t.getUTCHours())+":"+On(t.getUTCMinutes())+":"+On(t.getUTCSeconds())+"."+(t.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"};function YS(t){return function(){return!t.apply(this,arguments)}}function sx(t,n,i){for(var l=0,h=i.length;l<h;)n=t(n,i[l]),l+=1;return n}function ZS(t){return Object.prototype.toString.call(t)==="[object Object]"}var mB=(function(){function t(n,i){this.xf=i,this.f=n}return t.prototype["@@transducer/init"]=j,t.prototype["@@transducer/result"]=O,t.prototype["@@transducer/step"]=function(n,i){return this.f(i)?this.xf["@@transducer/step"](n,i):n},t})(),gB=Zt(f(["fantasy-land/filter","filter"],(function(t){return function(n){return new mB(t,n)}}),(function(t,n){return ZS(n)?sx((function(i,l){return t(n[l])&&(i[l]=n[l]),i}),{},Ee(n)):(function(i,l){for(var h=0,v=l.length,x=[];h<v;)i(l[h])&&(x[x.length]=l[h]),h+=1;return x})(t,n)}))),yB=Zt((function(t,n){return gB(YS(t),n)}));function x$(t,n){var i=function(v){var x=n.concat([t]);return Pt(v,x)?"<Circular>":x$(v,x)},l=function(v,x){return rn((function(w){return wn(w)+": "+i(v[w])}),x.slice().sort())};switch(Object.prototype.toString.call(t)){case"[object Arguments]":return"(function() { return arguments; }("+rn(i,t).join(", ")+"))";case"[object Array]":return"["+rn(i,t).concat(l(t,yB((function(v){return/^\d+$/.test(v)}),Ee(t)))).join(", ")+"]";case"[object Boolean]":return typeof t=="object"?"new Boolean("+i(t.valueOf())+")":t.toString();case"[object Date]":return"new Date("+(isNaN(t.valueOf())?i(NaN):wn(Bl(t)))+")";case"[object Map]":return"new Map("+i(Array.from(t))+")";case"[object Null]":return"null";case"[object Number]":return typeof t=="object"?"new Number("+i(t.valueOf())+")":1/t==-1/0?"-0":t.toString(10);case"[object Set]":return"new Set("+i(Array.from(t).sort())+")";case"[object String]":return typeof t=="object"?"new String("+i(t.valueOf())+")":wn(t);case"[object Undefined]":return"undefined";default:if(typeof t.toString=="function"){var h=t.toString();if(h!=="[object Object]")return h}return"{"+l(t,Ee(t)).join(", ")+"}"}}var pm=Bn((function(t){return x$(t,[])})),YA=Zt((function(t,n){if(t===n)return n;function i(w,C){if(w>C!=C>w)return C>w?C:w}var l=i(t,n);if(l!==void 0)return l;var h=i(typeof t,typeof n);if(h!==void 0)return h===typeof t?t:n;var v=pm(t),x=i(v,pm(n));return x!==void 0&&x===v?t:n})),vB=(function(){function t(n,i){this.xf=i,this.f=n}return t.prototype["@@transducer/init"]=j,t.prototype["@@transducer/result"]=O,t.prototype["@@transducer/step"]=function(n,i){return this.xf["@@transducer/step"](n,this.f(i))},t})(),ix=Zt(f(["fantasy-land/map","map"],(function(t){return function(n){return new vB(t,n)}}),(function(t,n){switch(Object.prototype.toString.call(n)){case"[object Function]":return Jn(n.length,(function(){return t.call(this,n.apply(this,arguments))}));case"[object Object]":return sx((function(i,l){return i[l]=t(n[l]),i}),{},Ee(n));default:return rn(t,n)}})));const WS=Number.isInteger||function(t){return(t|0)===t};function ZA(t){return Object.prototype.toString.call(t)==="[object String]"}function JS(t,n){var i=t<0?n.length+t:t;return ZA(n)?n.charAt(i):n[i]}var ax=Zt((function(t,n){if(n!=null)return WS(t)?JS(t,n):n[t]})),WA=Zt((function(t,n){return ix(ax(t),n)})),xB=Bn((function(t){return!!c(t)||!!t&&typeof t=="object"&&!ZA(t)&&(t.length===0||t.length>0&&t.hasOwnProperty(0)&&t.hasOwnProperty(t.length-1))})),b$=typeof Symbol<"u"?Symbol.iterator:"@@iterator";function w$(t,n,i){return function(l,h,v){if(xB(v))return t(l,h,v);if(v==null)return h;if(typeof v["fantasy-land/reduce"]=="function")return n(l,h,v,"fantasy-land/reduce");if(v[b$]!=null)return i(l,h,v[b$]());if(typeof v.next=="function")return i(l,h,v);if(typeof v.reduce=="function")return n(l,h,v,"reduce");throw new TypeError("reduce: list must be array or iterable")}}var QS=Zt((function(t,n){return Xh(t.length,(function(){return t.apply(n,arguments)}))})),JA=w$((function(t,n,i){for(var l=0,h=i.length;l<h;){if((n=t["@@transducer/step"](n,i[l]))&&n["@@transducer/reduced"]){n=n["@@transducer/value"];break}l+=1}return t["@@transducer/result"](n)}),(function(t,n,i,l){return t["@@transducer/result"](i[l](QS(t["@@transducer/step"],t),n))}),(function(t,n,i){for(var l=i.next();!l.done;){if((n=t["@@transducer/step"](n,l.value))&&n["@@transducer/reduced"]){n=n["@@transducer/value"];break}l=i.next()}return t["@@transducer/result"](n)})),bB=(function(){function t(n){this.f=n}return t.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},t.prototype["@@transducer/result"]=function(n){return n},t.prototype["@@transducer/step"]=function(n,i){return this.f(n,i)},t})();function S$(t){return new bB(t)}var Yh=a((function(t,n,i){return JA(typeof t=="function"?S$(t):t,n,i)})),wB=Bn((function(t){return Jn(Yh(YA,0,WA("length",t)),(function(){for(var n=0,i=t.length;n<i;){if(!t[n].apply(this,arguments))return!1;n+=1}return!0}))})),Wt=Bn((function(t){return function(){return t}})),SB=Zt((function(t,n){return t&&n})),EB=Bn((function(t){return Jn(Yh(YA,0,WA("length",t)),(function(){for(var n=0,i=t.length;n<i;){if(t[n].apply(this,arguments))return!0;n+=1}return!1}))})),jB=w$(sx,(function(t,n,i,l){return i[l](t,n)}),(function(t,n,i){for(var l=i.next();!l.done;)n=t(n,l.value),l=i.next();return n})),CB=Zt((function(t,n){return typeof n["fantasy-land/ap"]=="function"?n["fantasy-land/ap"](t):typeof t.ap=="function"?t.ap(n):typeof t=="function"?function(i){return t(i)(n(i))}:jB((function(i,l){return(function(h,v){var x;v=v||[];var w=(h=h||[]).length,C=v.length,$=[];for(x=0;x<w;)$[$.length]=h[x],x+=1;for(x=0;x<C;)$[$.length]=v[x],x+=1;return $})(i,ix(l,n))}),[],t)})),AB=Zt((function(t,n){return t.apply(this,n)})),QA=Bn((function(t){return Jn(t.length,t)})),e1=Bn((function(t){return t==null})),OB=a((function t(n,i,l){if(n.length===0)return i;var h=n[0];if(n.length>1){var v=!e1(l)&&We(h,l)&&typeof l[h]=="object"?l[h]:WS(n[1])?[]:{};i=t(Array.prototype.slice.call(n,1),i,v)}return(function(x,w,C){if(WS(x)&&c(C)){var $=[].concat(C);return $[x]=w,$}var N={};for(var _ in C)N[_]=C[_];return N[x]=w,N})(h,i,l)}));function eO(t){var n=Object.prototype.toString.call(t);return n==="[object Function]"||n==="[object AsyncFunction]"||n==="[object GeneratorFunction]"||n==="[object AsyncGeneratorFunction]"}var kB=Zt((function(t,n){var i=Jn(t,n);return Jn(t,(function(){return sx(CB,ix(i,arguments[0]),Array.prototype.slice.call(arguments,1))}))})),tO=Bn((function(t){return kB(t.length,t)})),Zh=Zt((function(t,n){return eO(t)?function(){return t.apply(this,arguments)&&n.apply(this,arguments)}:tO(SB)(t,n)}));function E$(t){return new RegExp(t.source,t.flags?t.flags:(t.global?"g":"")+(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.sticky?"y":"")+(t.unicode?"u":"")+(t.dotAll?"s":""))}function j$(t,n,i){if(i||(i=new RB),(function(h){var v=typeof h;return h==null||v!="object"&&v!="function"})(t))return t;var l=function(h){var v=i.get(t);if(v)return v;for(var x in i.set(t,h),t)Object.prototype.hasOwnProperty.call(t,x)&&(h[x]=t[x]);return h};switch(Pe(t)){case"Object":return l(Object.create(Object.getPrototypeOf(t)));case"Array":return l(Array(t.length));case"Date":return new Date(t.valueOf());case"RegExp":return E$(t);case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":return t.slice();default:return t}}var RB=(function(){function t(){this.map={},this.length=0}return t.prototype.set=function(n,i){var l=this.hash(n),h=this.map[l];h||(this.map[l]=h=[]),h.push([n,i]),this.length+=1},t.prototype.hash=function(n){var i=[];for(var l in n)i.push(Object.prototype.toString.call(n[l]));return i.join()},t.prototype.get=function(n){if(this.length<=180){for(var i in this.map)for(var l=this.map[i],h=0;h<l.length;h+=1)if((x=l[h])[0]===n)return x[1]}else{var v=this.hash(n);if(l=this.map[v])for(h=0;h<l.length;h+=1){var x;if((x=l[h])[0]===n)return x[1]}}},t})(),TB=Bn((function(t){return function(n,i){return t(n,i)?-1:t(i,n)?1:0}})),ox=tO(Bn((function(t){return!t})));function _B(t,n){return function(){return n.call(this,t.apply(this,arguments))}}function nO(t,n){return function(){var i=arguments.length;if(i===0)return n();var l=arguments[i-1];return c(l)||typeof l[t]!="function"?n.apply(this,arguments):l[t].apply(l,Array.prototype.slice.call(arguments,0,i-1))}}var lx=a(nO("slice",(function(t,n,i){return Array.prototype.slice.call(i,t,n)}))),C$=Bn(nO("tail",lx(1,1/0)));function Ls(){if(arguments.length===0)throw new Error("pipe requires at least one argument");return Xh(arguments[0].length,Yh(_B,arguments[0],C$(arguments)))}var $B=Bn((function(t){return JS(0,t)})),rO=Bn((function(t){return t})),NB=Zt((function(t,n){return Jn(Yh(YA,0,WA("length",n)),(function(){var i=arguments,l=this;return t.apply(l,rn((function(h){return h.apply(l,i)}),n))}))})),DB=(function(){function t(n,i,l,h){this.valueFn=n,this.valueAcc=i,this.keyFn=l,this.xf=h,this.inputs={}}return t.prototype["@@transducer/init"]=j,t.prototype["@@transducer/result"]=function(n){var i;for(i in this.inputs)if(We(i,this.inputs)&&(n=this.xf["@@transducer/step"](n,this.inputs[i]))["@@transducer/reduced"]){n=n["@@transducer/value"];break}return this.inputs=null,this.xf["@@transducer/result"](n)},t.prototype["@@transducer/step"]=function(n,i){var l=this.keyFn(i);return this.inputs[l]=this.inputs[l]||[l,j$(this.valueAcc)],this.inputs[l][1]=this.valueFn(this.inputs[l][1],i),n},t})(),PB=rx(4,[],f([],(function(t,n,i){return function(l){return new DB(t,n,i,l)}}),(function(t,n,i,l){var h=S$((function(v,x){var w=i(x),C=t(We(w,v)?v[w]:j$(n),x);return C&&C["@@transducer/reduced"]?y(v):(v[w]=C,v)}));return JA(h,{},l)}))),fm=Zt((function(t,n){return n==null||n!=n?t:n})),MB=(function(){function t(){this._nativeSet=typeof Set=="function"?new Set:null,this._items={}}return t.prototype.add=function(n){return!A$(n,!0,this)},t.prototype.has=function(n){return A$(n,!1,this)},t})();function A$(t,n,i){var l,h=typeof t;switch(h){case"string":case"number":return t===0&&1/t==-1/0?!!i._items["-0"]||(n&&(i._items["-0"]=!0),!1):i._nativeSet!==null?n?(l=i._nativeSet.size,i._nativeSet.add(t),i._nativeSet.size===l):i._nativeSet.has(t):h in i._items?t in i._items[h]||(n&&(i._items[h][t]=!0),!1):(n&&(i._items[h]={},i._items[h][t]=!0),!1);case"boolean":if(h in i._items){var v=t?1:0;return!!i._items[h][v]||(n&&(i._items[h][v]=!0),!1)}return n&&(i._items[h]=t?[!1,!0]:[!0,!1]),!1;case"function":return i._nativeSet!==null?n?(l=i._nativeSet.size,i._nativeSet.add(t),i._nativeSet.size===l):i._nativeSet.has(t):h in i._items?!!Pt(t,i._items[h])||(n&&i._items[h].push(t),!1):(n&&(i._items[h]=[t]),!1);case"undefined":return!!i._items[h]||(n&&(i._items[h]=!0),!1);case"object":if(t===null)return!!i._items.null||(n&&(i._items.null=!0),!1);default:return(h=Object.prototype.toString.call(t))in i._items?!!Pt(t,i._items[h])||(n&&i._items[h].push(t),!1):(n&&(i._items[h]=[t]),!1)}}var IB=Zt((function(t,n){for(var i=[],l=0,h=t.length,v=n.length,x=new MB,w=0;w<v;w+=1)x.add(n[w]);for(;l<h;)x.add(t[l])&&(i[i.length]=t[l]),l+=1;return i})),zB=(function(){function t(n,i){this.xf=i,this.n=n,this.i=0}return t.prototype["@@transducer/init"]=j,t.prototype["@@transducer/result"]=O,t.prototype["@@transducer/step"]=function(n,i){this.i+=1;var l=this.n===0?n:this.xf["@@transducer/step"](n,i);return this.n>=0&&this.i>=this.n?y(l):l},t})(),LB=Zt(f(["take"],(function(t){return function(n){return new zB(t,n)}}),(function(t,n){return lx(0,t<0?1/0:t,n)}))),FB=(function(){function t(n,i){this.f=n,this.retained=[],this.xf=i}return t.prototype["@@transducer/init"]=j,t.prototype["@@transducer/result"]=function(n){return this.retained=null,this.xf["@@transducer/result"](n)},t.prototype["@@transducer/step"]=function(n,i){return this.f(i)?this.retain(n,i):this.flush(n,i)},t.prototype.flush=function(n,i){return n=JA(this.xf,n,this.retained),this.retained=[],this.xf["@@transducer/step"](n,i)},t.prototype.retain=function(n,i){return this.retained.push(i),n},t})(),qB=Zt(f([],(function(t){return function(n){return new FB(t,n)}}),(function(t,n){for(var i=n.length-1;i>=0&&t(n[i]);)i-=1;return lx(0,i+1,n)}))),t1=Bn((function(t){return JS(-1,t)})),BB=(function(){function t(n,i){this.xf=i,this.f=n}return t.prototype["@@transducer/init"]=j,t.prototype["@@transducer/result"]=O,t.prototype["@@transducer/step"]=function(n,i){if(this.f){if(this.f(i))return n;this.f=null}return this.xf["@@transducer/step"](n,i)},t})(),UB=Zt(f(["dropWhile"],(function(t){return function(n){return new BB(t,n)}}),(function(t,n){for(var i=0,l=n.length;i<l&&t(n[i]);)i+=1;return lx(i,1/0,n)}))),KB=Zt((function(t,n){return t||n})),VB=Zt((function(t,n){return eO(t)?function(){return t.apply(this,arguments)||n.apply(this,arguments)}:tO(KB)(t,n)})),HB=Bn((function(t){return t!=null&&typeof t["fantasy-land/empty"]=="function"?t["fantasy-land/empty"]():t!=null&&t.constructor!=null&&typeof t.constructor["fantasy-land/empty"]=="function"?t.constructor["fantasy-land/empty"]():t!=null&&typeof t.empty=="function"?t.empty():t!=null&&t.constructor!=null&&typeof t.constructor.empty=="function"?t.constructor.empty():c(t)?[]:ZA(t)?"":ZS(t)?{}:Xe(t)?(function(){return arguments})():(function(n){var i=Object.prototype.toString.call(n);return i==="[object Uint8ClampedArray]"||i==="[object Int8Array]"||i==="[object Uint8Array]"||i==="[object Int16Array]"||i==="[object Uint16Array]"||i==="[object Int32Array]"||i==="[object Uint32Array]"||i==="[object Float32Array]"||i==="[object Float64Array]"||i==="[object BigInt64Array]"||i==="[object BigUint64Array]"})(t)?t.constructor.from(""):void 0})),GB=Bn((function(t){return Jn(t.length,(function(n,i){var l=Array.prototype.slice.call(arguments,0);return l[0]=i,l[1]=n,t.apply(this,l)}))})),XB=Zt(nO("groupBy",PB((function(t,n){return t.push(n),t}),[]))),YB=Zt((function(t,n){if(t.length===0||e1(n))return!1;for(var i=n,l=0;l<t.length;){if(e1(i)||!We(t[l],i))return!1;i=i[t[l]],l+=1}return!0})),O$=Zt((function(t,n){return YB([t],n)})),Kc=function(t,n){switch(arguments.length){case 0:return Kc;case 1:return function i(l){return arguments.length===0?i:rt(t,l)};default:return rt(t,n)}},sO=a((function(t,n,i){return Jn(Math.max(t.length,n.length,i.length),(function(){return t.apply(this,arguments)?n.apply(this,arguments):i.apply(this,arguments)}))})),ZB=Zt(Pt),WB=lx(0,-1),iO=Zt((function(t,n){return Jn(t+1,(function(){var i=arguments[t];if(i!=null&&eO(i[n]))return i[n].apply(i,Array.prototype.slice.call(arguments,0,t));throw new TypeError(pm(i)+' does not have a method named "'+n+'"')}))})),cx=Bn((function(t){return t!=null&&pn(t,HB(t))})),k$=Bn((function(t){return!cx(t)})),R$=iO(1,"join");function T$(t){return Object.prototype.toString.call(t)==="[object Number]"}var JB=Zt((function(t,n){return function(i){return function(l){return ix((function(h){return n(h,l)}),i(t(l)))}}}));function aO(t,n){for(var i=n,l=0;l<t.length;l+=1){if(i==null)return;var h=t[l];i=WS(h)?JS(h,i):i[h]}return i}var QB=Zt((function(t,n){return sx((function(i,l){return i[l]=t(n[l],l,n),i}),{},Ee(n))})),eU=a((function(t,n,i){var l,h={};for(l in i=i||{},n=n||{})We(l,n)&&(h[l]=We(l,i)?t(l,n[l],i[l]):n[l]);for(l in i)We(l,i)&&!We(l,h)&&(h[l]=i[l]);return h})),tU=a((function t(n,i,l){return eU((function(h,v,x){return ZS(v)&&ZS(x)?t(n,v,x):n(h,v,x)}),i,l)})),oO=Zt((function(t,n){return tU((function(i,l,h){return h}),t,n)})),nU=Zt((function(t,n){return te(YS(t),n)})),_$=function(t){return{value:t,map:function(n){return _$(n(t))}}},rU=a((function(t,n,i){return t((function(l){return _$(n(l))}))(i).value})),ra=Zt(aO),$$=a((function(t,n,i){return fm(t,aO(n,i))})),n1=a((function(t,n,i){return t(aO(n,i))})),N$=Zt((function(t,n){for(var i={},l=0;l<t.length;)t[l]in n&&(i[t[l]]=n[t[l]]),l+=1;return i})),D$=a((function(t,n,i){return pn(t,ax(n,i))})),r1=a((function(t,n,i){return fm(t,ax(n,i))})),sU=a((function(t,n,i){return t(ax(n,i))})),iU=Zt((function(t,n){if(!T$(t)||!T$(n))throw new TypeError("Both arguments to range must be numbers");for(var i=Array(t<n?n-t:0),l=t<0?n+Math.abs(t):n-t,h=0;h<l;)i[h]=h+t,h+=1;return i})),aU=Bn(y),mm=a((function(t,n,i){return i.replace(t,n)})),oU=Zt((function(t,n){return Array.prototype.slice.call(n,0).sort(t)})),lO=iO(1,"split"),P$=Zt((function(t,n){return pn(LB(t.length,n),t)})),lU=Zt((function(t,n){if(i=t,Object.prototype.toString.call(i)!=="[object RegExp]")throw new TypeError("‘test’ requires a value of type RegExp as its first argument; received "+pm(t));var i;return E$(t).test(n)})),cU=(function(){function t(n,i){this.xf=i,this.pred=n,this.items=[]}return t.prototype["@@transducer/init"]=j,t.prototype["@@transducer/result"]=O,t.prototype["@@transducer/step"]=function(n,i){return Be(this.pred,i,this.items)?n:(this.items.push(i),this.xf["@@transducer/step"](n,i))},t})(),uU=Zt(f([],(function(t){return function(n){return new cU(t,n)}}),(function(t,n){for(var i,l=0,h=n.length,v=[];l<h;)Be(t,i=n[l],v)||(v[v.length]=i),l+=1;return v}))),dU=a((function(t,n,i){return t(i)?n(i):i})),s1=Wt(void 0),Ed=pn(s1()),M$=ox(Ed),I$=pn(null),z$=ox(I$),hU=ox(e1),pU=Jn(1,Ls(Pe,Kc("GeneratorFunction"))),fU=Jn(1,Ls(Pe,Kc("AsyncFunction"))),Vc=EB([Ls(Pe,Kc("Function")),pU,fU]),L$=Jn(1,Vc(Array.isArray)?Array.isArray:Ls(Pe,Kc("Array"))),mU=Zh(L$,cx),gU=Zh(L$,k$),Wh=Jn(1,Ls(Pe,Kc("String"))),F$=pn("");function cO(t){return cO=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},cO(t)}var q$=function(t){return cO(t)==="object"},yU=ox(Jn(1,Zh(z$,VB(q$,Vc)))),uO=wB([Wh,yU,k$]),vU=ox(Vc),xU=Jn(1,Zh(z$,q$)),bU=Ls(Pe,Kc("Object")),wU=Ls(pm,pn(pm(Object))),SU=n1(Zh(Vc,wU),["constructor"]),Jh=Jn(1,(function(t){if(!xU(t)||!bU(t))return!1;var n=Object.getPrototypeOf(t);return!!I$(n)||SU(n)})),EU=Zh(Jn(1,Ls(Pe,Kc("Number"))),isFinite),jU=Jn(1,EU),CU=Zh(Vc(Number.isFinite)?Jn(1,QS(Number.isFinite,Number)):jU,NB(pn,[Math.floor,rO])),AU=Jn(1,CU),OU=Vc(Number.isInteger)?Jn(1,QS(Number.isInteger,Number)):AU,kU=Jn(1,Ls(Pe,Kc("RegExp")));function dO(t,n){(n==null||n>t.length)&&(n=t.length);for(var i=0,l=Array(n);i<n;i++)l[i]=t[i];return l}var Hc,Gc,RU=Ls(oU(TB((function(t,n){return t.length>n.length}))),$B,ax("length")),TU=QA((function(t,n,i){var l=i.apply(void 0,(function(h){return(function(v){if(Array.isArray(v))return dO(v)})(h)||(function(v){if(typeof Symbol<"u"&&v[Symbol.iterator]!=null||v["@@iterator"]!=null)return Array.from(v)})(h)||(function(v,x){if(v){if(typeof v=="string")return dO(v,x);var w={}.toString.call(v).slice(8,-1);return w==="Object"&&v.constructor&&(w=v.constructor.name),w==="Map"||w==="Set"?Array.from(v):w==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(w)?dO(v,x):void 0}})(h)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()})(t));return hU(l)?aU(l):n})),B$=sO(gU,(function(t){var n=RU(t);return Jn(n,(function(){for(var i=arguments.length,l=new Array(i),h=0;h<i;h++)l[h]=arguments[h];return Yh(TU(l),void 0,t)}))}),s1),i1=GB(ZB),ux=Jn(3,(function(t,n,i){var l=ra(t,i),h=ra(WB(t),i);if(!vU(l)&&!mU(t)){var v=QS(l,h);return AB(v,n)}})),_U=dU(Wh,mm(/[.*+?^${}()|[\]\\-]/g,"\\$&")),U$=function(t,n){if(typeof t!="string"&&!(t instanceof String))throw TypeError("`".concat(n,"` must be a string"))},$U=Jn(3,(function(t,n,i){(function(h,v,x){if(x==null||h==null||v==null)throw TypeError("Input values must not be `null` or `undefined`")})(t,n,i),U$(i,"str"),U$(n,"replaceValue"),(function(h){if(!(typeof h=="string"||h instanceof String||h instanceof RegExp))throw TypeError("`searchValue` must be a string or an regexp")})(t);var l=new RegExp(kU(t)?t:_U(t),"g");return mm(l,n,i)})),NU=iO(2,"replaceAll"),DU=Vc(String.prototype.replaceAll)?NU:$U,PU=QA((function(t,n){return Ls(lO(""),qB(i1(t)),R$(""))(n)})),hO=QA((function(t,n){return Ls(lO(""),UB(i1(t)),R$(""))(n)})),K$={exports:{}},Qr=K$.exports={};function pO(){throw new Error("setTimeout has not been defined")}function fO(){throw new Error("clearTimeout has not been defined")}function V$(t){if(Hc===setTimeout)return setTimeout(t,0);if((Hc===pO||!Hc)&&setTimeout)return Hc=setTimeout,setTimeout(t,0);try{return Hc(t,0)}catch{try{return Hc.call(null,t,0)}catch{return Hc.call(this,t,0)}}}(function(){try{Hc=typeof setTimeout=="function"?setTimeout:pO}catch{Hc=pO}try{Gc=typeof clearTimeout=="function"?clearTimeout:fO}catch{Gc=fO}})();var Qh,Xc=[],gm=!1,a1=-1;function MU(){gm&&Qh&&(gm=!1,Qh.length?Xc=Qh.concat(Xc):a1=-1,Xc.length&&H$())}function H$(){if(!gm){var t=V$(MU);gm=!0;for(var n=Xc.length;n;){for(Qh=Xc,Xc=[];++a1<n;)Qh&&Qh[a1].run();a1=-1,n=Xc.length}Qh=null,gm=!1,(function(i){if(Gc===clearTimeout)return clearTimeout(i);if((Gc===fO||!Gc)&&clearTimeout)return Gc=clearTimeout,clearTimeout(i);try{Gc(i)}catch{try{return Gc.call(null,i)}catch{return Gc.call(this,i)}}})(t)}}function G$(t,n){this.fun=t,this.array=n}function Yc(){}Qr.nextTick=function(t){var n=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)n[i-1]=arguments[i];Xc.push(new G$(t,n)),Xc.length!==1||gm||V$(H$)},G$.prototype.run=function(){this.fun.apply(null,this.array)},Qr.title="browser",Qr.browser=!0,Qr.env={},Qr.argv=[],Qr.version="",Qr.versions={},Qr.on=Yc,Qr.addListener=Yc,Qr.once=Yc,Qr.off=Yc,Qr.removeListener=Yc,Qr.removeAllListeners=Yc,Qr.emit=Yc,Qr.prependListener=Yc,Qr.prependOnceListener=Yc,Qr.listeners=function(t){return[]},Qr.binding=function(t){throw new Error("process.binding is not supported")},Qr.cwd=function(){return"/"},Qr.chdir=function(t){throw new Error("process.chdir is not supported")},Qr.umask=function(){return 0};const o1=La(K$.exports),mO=()=>n1(lU(/^win/),["platform"],o1),l1=t=>{try{const n=new URL(t);return PU(":",n.protocol)}catch{return}},IU=Ls(l1,M$),X$=t=>{const n=t.lastIndexOf(".");return n>=0?t.substring(n).toLowerCase():""},gO=t=>{if(o1.browser)return!1;const n=l1(t);return Ed(n)||n==="file"||/^[a-zA-Z]$/.test(n)},c1=t=>{const n=l1(t);return n==="http"||n==="https"},yO=(t,n)=>{const i=[/%23/g,"#",/%24/g,"$",/%26/g,"&",/%2C/g,",",/%40/g,"@"],l=r1(!1,"keepFileProtocol",n),h=r1(mO,"isWindows",n);let v=decodeURI(t);for(let w=0;w<i.length;w+=2)v=v.replace(i[w],i[w+1]);let x=v.substring(0,7).toLowerCase()==="file://";return x&&(v=v[7]==="/"?v.substring(8):v.substring(7),h()&&v[1]==="/"&&(v=`${v[0]}:${v.substring(1)}`),l?v=`file:///${v}`:(x=!1,v=h()?v:`/${v}`)),h()&&!x&&(v=DU("/","\\",v),v.substring(1,3)===":\\"&&(v=v[0].toUpperCase()+v.substring(1))),v},Y$=t=>{const n=[/\?/g,"%3F",/#/g,"%23"];let i=t;mO()&&(i=i.replace(/\\/g,"/")),i=encodeURI(i);for(let l=0;l<n.length;l+=2)i=i.replace(n[l],n[l+1]);return i},vO=t=>{const n=t.indexOf("#");return n!==-1?t.substring(n):"#"},cr=t=>{const n=t.indexOf("#");let i=t;return n>=0&&(i=t.substring(0,n)),i},u1=()=>{if(o1.browser)return cr(globalThis.location.href);const t=o1.cwd(),n=t1(t);return["/","\\"].includes(n)?t:t+(mO()?"\\":"/")},$s=(t,n)=>{const i=new URL(n,new URL(t,"resolve://"));if(i.protocol==="resolve:"){const{pathname:l,search:h,hash:v}=i;return l+h+v}return i.toString()},dx=t=>{if(gO(t))return Y$(yO(t));try{return new URL(t).toString()}catch{return encodeURI(decodeURI(t)).replace(/%5B/g,"[").replace(/%5D/g,"]")}},zo=t=>gO(t)?yO(t):decodeURI(t),zU=Object.freeze(Object.defineProperty({__proto__:null,cwd:u1,fromFileSystemPath:Y$,getExtension:X$,getHash:vO,getProtocol:l1,hasProtocol:IU,isFileSystemPath:gO,isHttpUrl:c1,isURI:t=>{try{return new URL(t)&&!0}catch{return!1}},resolve:$s,sanitize:dx,stripHash:cr,toFileSystemPath:yO,unsanitize:zo},Symbol.toStringTag,{value:"Module"}));let hx=class{uri;mediaType;data;parseResult;constructor({uri:t,mediaType:n="text/plain",data:i,parseResult:l}){this.uri=t,this.mediaType=n,this.data=i,this.parseResult=l}get extension(){return Wh(this.uri)?X$(this.uri):""}toString(){return typeof this.data=="string"?this.data:this.data instanceof ArrayBuffer||["ArrayBuffer"].includes(Pe(this.data))||ArrayBuffer.isView(this.data)?new TextDecoder("utf-8").decode(this.data):String(this.data)}};class ym{rootRef;refs;circular;constructor({refs:n=[],circular:i=!1}={}){this.refs=[],this.circular=i,n.forEach(this.add.bind(this))}get size(){return this.refs.length}add(n){return this.has(n)||(this.refs.push(n),this.rootRef=this.rootRef===void 0?n:this.rootRef,n.refSet=this),this}merge(n){for(const i of n.values())this.add(i);return this}has(n){const i=Wh(n)?n:n.uri;return M$(this.find((l=>l.uri===i)))}find(n){return this.refs.find(n)}*values(){yield*this.refs}clean(){this.refs.forEach((n=>{n.refSet=void 0})),this.rootRef=void 0,this.refs.length=0}}const Z$={parse:{mediaType:"text/plain",parsers:[],parserOpts:{}},resolve:{baseURI:"",resolvers:[],resolverOpts:{},strategies:[],strategyOpts:{},internal:!0,external:!0,maxDepth:1/0},dereference:{strategies:[],strategyOpts:{},refSet:null,maxDepth:1/0,circular:"ignore",circularReplacer:rO,immutable:!0},bundle:{strategies:[],refSet:null,maxDepth:1/0}},LU=JB(ra(["resolve","baseURI"]),OB(["resolve","baseURI"])),FU=t=>F$(t)?u1():t,W$=(t,n)=>{const i=oO(t,n);return rU(LU,FU,i)};class qU extends br{plugin;constructor(n,i){super(n,{cause:i.cause}),this.plugin=i.plugin}}const xO=async(t,n,i)=>{const l=await Promise.all(i.map(ux([t],n)));return i.filter(((h,v)=>l[v]))},bO=async(t,n,i)=>{let l;for(const h of i)try{const v=await h[t].call(h,...n);return{plugin:h,result:v}}catch(v){l=new qU("Error while running plugin",{cause:v,plugin:h})}return Promise.reject(l)};class wO extends br{}class SO extends br{}class J$ extends SO{}class Q$ extends J${}var eN=typeof Um=="object"&&Um&&Um.Object===Object&&Um,BU=eN,UU=typeof self=="object"&&self&&self.Object===Object&&self,Zc=BU||UU||Function("return this")(),px=Zc.Symbol,tN=px,nN=Object.prototype,KU=nN.hasOwnProperty,VU=nN.toString,fx=tN?tN.toStringTag:void 0,HU=Object.prototype.toString,GU=function(t){var n=KU.call(t,fx),i=t[fx];try{t[fx]=void 0;var l=!0}catch{}var h=VU.call(t);return l&&(n?t[fx]=i:delete t[fx]),h},rN=px?px.toStringTag:void 0,ep=function(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":rN&&rN in Object(t)?GU(t):(function(n){return HU.call(n)})(t)},d1=Array.isArray,tp=function(t){return t!=null&&typeof t=="object"},XU=ep,YU=d1,ZU=tp,WU=ep,JU=tp,QU=ep,e8=tp,h1=function(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")},sN=function(t,n){return t===n||t!=t&&n!=n},t8=sN,p1=function(t,n){for(var i=t.length;i--;)if(t8(t[i][0],n))return i;return-1},n8=p1,r8=Array.prototype.splice,s8=p1,i8=p1,a8=p1,o8=function(){this.u=[],this.size=0},l8=function(t){var n=this.u,i=n8(n,t);return!(i<0||(i==n.length-1?n.pop():r8.call(n,i,1),--this.size,0))},c8=function(t){var n=this.u,i=s8(n,t);return i<0?void 0:n[i][1]},u8=function(t,n){var i=this.u,l=a8(i,t);return l<0?(++this.size,i.push([t,n])):i[l][1]=n,this};function vm(t){var n=-1,i=t==null?0:t.length;for(this.clear();++n<i;){var l=t[n];this.set(l[0],l[1])}}vm.prototype.clear=o8,vm.prototype.delete=l8,vm.prototype.get=c8,vm.prototype.has=function(t){return i8(this.u,t)>-1},vm.prototype.set=u8;var f1=vm,d8=f1,h8=ep,p8=h1,iN=function(t){if(!p8(t))return!1;var n=h8(t);return n=="[object Function]"||n=="[object GeneratorFunction]"||n=="[object AsyncFunction]"||n=="[object Proxy]"},EO=Zc.o,aN=(function(){var t=/[^.]+$/.exec(EO&&EO.keys&&EO.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})(),f8=Function.prototype.toString,oN=function(t){if(t!=null){try{return f8.call(t)}catch{}try{return t+""}catch{}}return""},m8=iN,g8=function(t){return!!aN&&aN in t},y8=h1,v8=oN,x8=/^\[object .+?Constructor\]$/,b8=Function.prototype,w8=Object.prototype,S8=b8.toString,E8=w8.hasOwnProperty,j8=RegExp("^"+S8.call(E8).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),xm=function(t,n){var i=(function(l,h){return l?.[h]})(t,n);return(function(l){return!(!y8(l)||g8(l))&&(m8(l)?j8:x8).test(v8(l))})(i)?i:void 0},jO=xm(Zc,"Map"),m1=xm(Object,"create"),lN=m1,C8=m1,A8=Object.prototype.hasOwnProperty,O8=m1,k8=Object.prototype.hasOwnProperty,R8=m1,T8=function(){this.u=lN?lN(null):{},this.size=0},_8=function(t){var n=this.has(t)&&delete this.u[t];return this.size-=n?1:0,n},$8=function(t){var n=this.u;if(C8){var i=n[t];return i==="__lodash_hash_undefined__"?void 0:i}return A8.call(n,t)?n[t]:void 0},N8=function(t){var n=this.u;return O8?n[t]!==void 0:k8.call(n,t)},D8=function(t,n){var i=this.u;return this.size+=this.has(t)?0:1,i[t]=R8&&n===void 0?"__lodash_hash_undefined__":n,this};function bm(t){var n=-1,i=t==null?0:t.length;for(this.clear();++n<i;){var l=t[n];this.set(l[0],l[1])}}bm.prototype.clear=T8,bm.prototype.delete=_8,bm.prototype.get=$8,bm.prototype.has=N8,bm.prototype.set=D8;var cN=bm,P8=f1,M8=jO,I8=function(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null},g1=function(t,n){var i=t.u;return I8(n)?i[typeof n=="string"?"string":"hash"]:i.map},z8=g1,L8=g1,F8=g1,q8=g1,B8=function(t,n){var i=q8(this,t),l=i.size;return i.set(t,n),this.size+=i.size==l?0:1,this};function wm(t){var n=-1,i=t==null?0:t.length;for(this.clear();++n<i;){var l=t[n];this.set(l[0],l[1])}}wm.prototype.clear=function(){this.size=0,this.u={hash:new cN,map:new(M8||P8),string:new cN}},wm.prototype.delete=function(t){var n=z8(this,t).delete(t);return this.size-=n?1:0,n},wm.prototype.get=function(t){return L8(this,t).get(t)},wm.prototype.has=function(t){return F8(this,t).has(t)},wm.prototype.set=B8;var uN=wm,U8=f1,K8=jO,V8=uN,H8=f1,G8=function(){this.u=new d8,this.size=0},X8=function(t){var n=this.u,i=n.delete(t);return this.size=n.size,i},Y8=function(t){return this.u.get(t)},Z8=function(t){return this.u.has(t)},W8=function(t,n){var i=this.u;if(i instanceof U8){var l=i.u;if(!K8||l.length<199)return l.push([t,n]),this.size=++i.size,this;i=this.u=new V8(l)}return i.set(t,n),this.size=i.size,this};function Sm(t){var n=this.u=new H8(t);this.size=n.size}Sm.prototype.clear=G8,Sm.prototype.delete=X8,Sm.prototype.get=Y8,Sm.prototype.has=Z8,Sm.prototype.set=W8;var J8=Sm,Q8=uN;function y1(t){var n=-1,i=t==null?0:t.length;for(this.u=new Q8;++n<i;)this.add(t[n])}y1.prototype.add=y1.prototype.push=function(t){return this.u.set(t,"__lodash_hash_undefined__"),this},y1.prototype.has=function(t){return this.u.has(t)};var eK=y1,tK=function(t,n){for(var i=-1,l=t==null?0:t.length;++i<l;)if(n(t[i],i,t))return!0;return!1},nK=function(t,n){return t.has(n)},dN=function(t,n,i,l,h,v){var x=1&i,w=t.length,C=n.length;if(w!=C&&!(x&&C>w))return!1;var $=v.get(t),N=v.get(n);if($&&N)return $==n&&N==t;var _=-1,F=!0,U=2&i?new eK:void 0;for(v.set(t,n),v.set(n,t);++_<w;){var J=t[_],Y=n[_];if(l)var Z=x?l(Y,J,_,n,t,v):l(J,Y,_,t,n,v);if(Z!==void 0){if(Z)continue;F=!1;break}if(U){if(!tK(n,(function(P,se){if(!nK(U,se)&&(J===P||h(J,P,i,l,v)))return U.push(se)}))){F=!1;break}}else if(J!==Y&&!h(J,Y,i,l,v)){F=!1;break}}return v.delete(t),v.delete(n),F},hN=Zc.Uint8Array,rK=sN,sK=dN,iK=function(t){var n=-1,i=Array(t.size);return t.forEach((function(l,h){i[++n]=[h,l]})),i},aK=function(t){var n=-1,i=Array(t.size);return t.forEach((function(l){i[++n]=l})),i},pN=px?px.prototype:void 0,CO=pN?pN.valueOf:void 0,oK=function(t,n){for(var i=-1,l=n.length,h=t.length;++i<l;)t[h+i]=n[i];return t},lK=d1,cK=function(t,n){for(var i=-1,l=t==null?0:t.length,h=0,v=[];++i<l;){var x=t[i];n(x,i,t)&&(v[h++]=x)}return v},uK=Object.prototype.propertyIsEnumerable,fN=Object.getOwnPropertySymbols,dK=fN?function(t){return t==null?[]:(t=Object(t),cK(fN(t),(function(n){return uK.call(t,n)})))}:function(){return[]},hK=ep,pK=tp,mN=function(t){return pK(t)&&hK(t)=="[object Arguments]"},fK=tp,gN=Object.prototype,mK=gN.hasOwnProperty,gK=gN.propertyIsEnumerable,yK=mN((function(){return arguments})())?mN:function(t){return fK(t)&&mK.call(t,"callee")&&!gK.call(t,"callee")},AO={exports:{}},vK=function(){return!1};(function(t,n){var i=Zc,l=vK,h=n&&!n.nodeType&&n,v=h&&t&&!t.nodeType&&t,x=v&&v.exports===h?i.Buffer:void 0,w=(x?x.isBuffer:void 0)||l;t.exports=w})(AO,AO.exports);var yN=AO.exports,xK=/^(?:0|[1-9]\d*)$/,vN=function(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=9007199254740991},bK=ep,wK=vN,SK=tp,Or={};Or["[object Float32Array]"]=Or["[object Float64Array]"]=Or["[object Int8Array]"]=Or["[object Int16Array]"]=Or["[object Int32Array]"]=Or["[object Uint8Array]"]=Or["[object Uint8ClampedArray]"]=Or["[object Uint16Array]"]=Or["[object Uint32Array]"]=!0,Or["[object Arguments]"]=Or["[object Array]"]=Or["[object ArrayBuffer]"]=Or["[object Boolean]"]=Or["[object DataView]"]=Or["[object Date]"]=Or["[object Error]"]=Or["[object Function]"]=Or["[object Map]"]=Or["[object Number]"]=Or["[object Object]"]=Or["[object RegExp]"]=Or["[object Set]"]=Or["[object String]"]=Or["[object WeakMap]"]=!1;var OO={exports:{}};(function(t,n){var i=eN,l=n&&!n.nodeType&&n,h=l&&t&&!t.nodeType&&t,v=h&&h.exports===l&&i.process,x=(function(){try{return h&&h.require&&h.require("util").types||v&&v.binding&&v.binding("util")}catch{}})();t.exports=x})(OO,OO.exports);var xN=OO.exports,EK=function(t){return SK(t)&&wK(t.length)&&!!Or[bK(t)]},jK=function(t){return function(n){return t(n)}},bN=xN&&xN.isTypedArray,wN=bN?jK(bN):EK,CK=function(t,n){for(var i=-1,l=Array(t);++i<t;)l[i]=n(i);return l},AK=yK,OK=d1,kK=yN,RK=function(t,n){var i=typeof t;return!!(n=n??9007199254740991)&&(i=="number"||i!="symbol"&&xK.test(t))&&t>-1&&t%1==0&&t<n},TK=wN,_K=Object.prototype.hasOwnProperty,$K=Object.prototype,NK=(function(t,n){return function(i){return t(n(i))}})(Object.keys,Object),DK=function(t){var n=t&&t.constructor;return t===(typeof n=="function"&&n.prototype||$K)},PK=NK,MK=Object.prototype.hasOwnProperty,IK=iN,zK=vN,LK=function(t,n){var i=OK(t),l=!i&&AK(t),h=!i&&!l&&kK(t),v=!i&&!l&&!h&&TK(t),x=i||l||h||v,w=x?CK(t.length,String):[],C=w.length;for(var $ in t)!_K.call(t,$)||x&&($=="length"||h&&($=="offset"||$=="parent")||v&&($=="buffer"||$=="byteLength"||$=="byteOffset")||RK($,C))||w.push($);return w},FK=function(t,n,i){var l=n(t);return lK(t)?l:oK(l,i(t))},qK=dK,BK=function(t){return(function(n){return n!=null&&zK(n.length)&&!IK(n)})(t)?LK(t):(function(n){if(!DK(n))return PK(n);var i=[];for(var l in Object(n))MK.call(n,l)&&l!="constructor"&&i.push(l);return i})(t)},SN=function(t){return FK(t,BK,qK)},UK=Object.prototype.hasOwnProperty,kO=xm(Zc,"DataView"),RO=jO,TO=xm(Zc,"Promise"),_O=xm(Zc,"Set"),$O=xm(Zc,"WeakMap"),EN=ep,Em=oN,KK=Em(kO),VK=Em(RO),HK=Em(TO),GK=Em(_O),XK=Em($O),np=EN;(kO&&np(new kO(new ArrayBuffer(1)))!="[object DataView]"||RO&&np(new RO)!="[object Map]"||TO&&np(TO.resolve())!="[object Promise]"||_O&&np(new _O)!="[object Set]"||$O&&np(new $O)!="[object WeakMap]")&&(np=function(t){var n=EN(t),i=n=="[object Object]"?t.constructor:void 0,l=i?Em(i):"";if(l)switch(l){case KK:return"[object DataView]";case VK:return"[object Map]";case HK:return"[object Promise]";case GK:return"[object Set]";case XK:return"[object WeakMap]"}return n});var NO=J8,YK=dN,ZK=function(t,n,i,l,h,v,x){switch(i){case"[object DataView]":if(t.byteLength!=n.byteLength||t.byteOffset!=n.byteOffset)return!1;t=t.buffer,n=n.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=n.byteLength||!v(new hN(t),new hN(n)));case"[object Boolean]":case"[object Date]":case"[object Number]":return rK(+t,+n);case"[object Error]":return t.name==n.name&&t.message==n.message;case"[object RegExp]":case"[object String]":return t==n+"";case"[object Map]":var w=iK;case"[object Set]":var C=1&l;if(w||(w=aK),t.size!=n.size&&!C)return!1;var $=x.get(t);if($)return $==n;l|=2,x.set(t,n);var N=sK(w(t),w(n),l,h,v,x);return x.delete(t),N;case"[object Symbol]":if(CO)return CO.call(t)==CO.call(n)}return!1},WK=function(t,n,i,l,h,v){var x=1&i,w=SN(t),C=w.length;if(C!=SN(n).length&&!x)return!1;for(var $=C;$--;){var N=w[$];if(!(x?N in n:UK.call(n,N)))return!1}var _=v.get(t),F=v.get(n);if(_&&F)return _==n&&F==t;var U=!0;v.set(t,n),v.set(n,t);for(var J=x;++$<C;){var Y=t[N=w[$]],Z=n[N];if(l)var P=x?l(Z,Y,N,n,t,v):l(Y,Z,N,t,n,v);if(!(P===void 0?Y===Z||h(Y,Z,i,l,v):P)){U=!1;break}J||(J=N=="constructor")}if(U&&!J){var se=t.constructor,ae=n.constructor;se==ae||!("constructor"in t)||!("constructor"in n)||typeof se=="function"&&se instanceof se&&typeof ae=="function"&&ae instanceof ae||(U=!1)}return v.delete(t),v.delete(n),U},jN=np,CN=d1,AN=yN,JK=wN,v1="[object Object]",ON=Object.prototype.hasOwnProperty,kN=tp,QK=function t(n,i,l,h,v){return n===i||(n==null||i==null||!kN(n)&&!kN(i)?n!=n&&i!=i:(function(x,w,C,$,N,_){var F=CN(x),U=CN(w),J=F?"[object Array]":jN(x),Y=U?"[object Array]":jN(w),Z=(J=J=="[object Arguments]"?v1:J)==v1,P=(Y=Y=="[object Arguments]"?v1:Y)==v1,se=J==Y;if(se&&AN(x)){if(!AN(w))return!1;F=!0,Z=!1}if(se&&!Z)return _||(_=new NO),F||JK(x)?YK(x,w,C,$,N,_):ZK(x,w,J,C,$,N,_);if(!(1&C)){var ae=Z&&ON.call(x,"__wrapped__"),he=P&&ON.call(w,"__wrapped__");if(ae||he){var ge=ae?x.value():x,pe=he?w.value():w;return _||(_=new NO),N(ge,pe,C,$,_)}}return!!se&&(_||(_=new NO),WK(x,w,C,$,N,_))})(n,i,l,h,t,v))},x1=class oB{constructor(n,i){this.key=n,this.value=i}clone(){const n=new oB;return this.key&&(n.key=this.key.clone()),this.value&&(n.value=this.value.clone()),n}},b1=function(t){if(typeof t!="function")throw new TypeError("Expected a function");return function(){var n=arguments;switch(n.length){case 0:return!t.call(this);case 1:return!t.call(this,n[0]);case 2:return!t.call(this,n[0],n[1]);case 3:return!t.call(this,n[0],n[1],n[2])}return!t.apply(this,n)}};const eV=b1;function DO(t){return typeof t=="string"?n=>n.element===t:t.constructor&&t.extend?n=>n instanceof t:t}let RN=class O_{constructor(n){this.elements=n||[]}toValue(){return this.elements.map((n=>n.toValue()))}map(n,i){return this.elements.map(n,i)}flatMap(n,i){return this.map(n,i).reduce(((l,h)=>l.concat(h)),[])}compactMap(n,i){const l=[];return this.forEach((h=>{const v=n.bind(i)(h);v&&l.push(v)})),l}filter(n,i){return n=DO(n),new O_(this.elements.filter(n,i))}reject(n,i){return n=DO(n),new O_(this.elements.filter(eV(n),i))}find(n,i){return n=DO(n),this.elements.find(n,i)}forEach(n,i){this.elements.forEach(n,i)}reduce(n,i){return this.elements.reduce(n,i)}includes(n){return this.elements.some((i=>i.equals(n)))}shift(){return this.elements.shift()}unshift(n){this.elements.unshift(this.refract(n))}push(n){return this.elements.push(this.refract(n)),this}add(n){this.push(n)}get(n){return this.elements[n]}getValue(n){const i=this.elements[n];if(i)return i.toValue()}get length(){return this.elements.length}get isEmpty(){return this.elements.length===0}get first(){return this.elements[0]}};typeof Symbol<"u"&&(RN.prototype[Symbol.iterator]=function(){return this.elements[Symbol.iterator]()});var w1=RN;const tV=function(t,n){return QK(t,n)},S1=x1,jd=w1;var Wc=class Cj{constructor(n,i,l){i&&(this.meta=i),l&&(this.attributes=l),this.content=n}freeze(){Object.isFrozen(this)||(this._meta&&(this.meta.parent=this,this.meta.freeze()),this._attributes&&(this.attributes.parent=this,this.attributes.freeze()),this.children.forEach((n=>{n.parent=this,n.freeze()}),this),this.content&&Array.isArray(this.content)&&Object.freeze(this.content),Object.freeze(this))}primitive(){}clone(){const n=new this.constructor;return n.element=this.element,this.meta.length&&(n._meta=this.meta.clone()),this.attributes.length&&(n._attributes=this.attributes.clone()),this.content?this.content.clone?n.content=this.content.clone():Array.isArray(this.content)?n.content=this.content.map((i=>i.clone())):n.content=this.content:n.content=this.content,n}toValue(){return this.content instanceof Cj?this.content.toValue():this.content instanceof S1?{key:this.content.key.toValue(),value:this.content.value?this.content.value.toValue():void 0}:this.content&&this.content.map?this.content.map((n=>n.toValue()),this):this.content}toRef(n){if(this.id.toValue()==="")throw Error("Cannot create reference to an element that does not contain an ID");const i=new this.RefElement(this.id.toValue());return n&&(i.path=n),i}findRecursive(...n){if(arguments.length>1&&!this.isFrozen)throw new Error("Cannot find recursive with multiple element names without first freezing the element. Call `element.freeze()`");const i=n.pop();let l=new jd;const h=(x,w)=>(x.push(w),x),v=(x,w)=>{w.element===i&&x.push(w);const C=w.findRecursive(i);return C&&C.reduce(h,x),w.content instanceof S1&&(w.content.key&&v(x,w.content.key),w.content.value&&v(x,w.content.value)),x};return this.content&&(this.content.element&&v(l,this.content),Array.isArray(this.content)&&this.content.reduce(v,l)),n.isEmpty||(l=l.filter((x=>{let w=x.parents.map((C=>C.element));for(const C in n){const $=n[C],N=w.indexOf($);if(N===-1)return!1;w=w.splice(0,N)}return!0}))),l}set(n){return this.content=n,this}equals(n){return tV(this.toValue(),n)}getMetaProperty(n,i){if(!this.meta.hasKey(n)){if(this.isFrozen){const l=this.refract(i);return l.freeze(),l}this.meta.set(n,i)}return this.meta.get(n)}setMetaProperty(n,i){this.meta.set(n,i)}get element(){return this._storedElement||"element"}set element(n){this._storedElement=n}get content(){return this._content}set content(n){if(n instanceof Cj)this._content=n;else if(n instanceof jd)this.content=n.elements;else if(typeof n=="string"||typeof n=="number"||typeof n=="boolean"||n==="null"||n==null)this._content=n;else if(n instanceof S1)this._content=n;else if(Array.isArray(n))this._content=n.map(this.refract);else{if(typeof n!="object")throw new Error("Cannot set content to given value");this._content=Object.keys(n).map((i=>new this.MemberElement(i,n[i])))}}get meta(){if(!this._meta){if(this.isFrozen){const n=new this.ObjectElement;return n.freeze(),n}this._meta=new this.ObjectElement}return this._meta}set meta(n){n instanceof this.ObjectElement?this._meta=n:this.meta.set(n||{})}get attributes(){if(!this._attributes){if(this.isFrozen){const n=new this.ObjectElement;return n.freeze(),n}this._attributes=new this.ObjectElement}return this._attributes}set attributes(n){n instanceof this.ObjectElement?this._attributes=n:this.attributes.set(n||{})}get id(){return this.getMetaProperty("id","")}set id(n){this.setMetaProperty("id",n)}get classes(){return this.getMetaProperty("classes",[])}set classes(n){this.setMetaProperty("classes",n)}get title(){return this.getMetaProperty("title","")}set title(n){this.setMetaProperty("title",n)}get description(){return this.getMetaProperty("description","")}set description(n){this.setMetaProperty("description",n)}get links(){return this.getMetaProperty("links",[])}set links(n){this.setMetaProperty("links",n)}get isFrozen(){return Object.isFrozen(this)}get parents(){let{parent:n}=this;const i=new jd;for(;n;)i.push(n),n=n.parent;return i}get children(){if(Array.isArray(this.content))return new jd(this.content);if(this.content instanceof S1){const n=new jd([this.content.key]);return this.content.value&&n.push(this.content.value),n}return this.content instanceof Cj?new jd([this.content]):new jd}get recursiveChildren(){const n=new jd;return this.children.forEach((i=>{n.push(i),i.recursiveChildren.forEach((l=>{n.push(l)}))})),n}};const nV=Wc,rV=Wc,sV=Wc,iV=Wc,aV=b1,oV=Wc,TN=w1;let mx=class extends oV{constructor(t,n,i){super(t||[],n,i),this.element="array"}primitive(){return"array"}get(t){return this.content[t]}getValue(t){const n=this.get(t);if(n)return n.toValue()}getIndex(t){return this.content[t]}set(t,n){return this.content[t]=this.refract(n),this}remove(t){const n=this.content.splice(t,1);return n.length?n[0]:null}map(t,n){return this.content.map(t,n)}flatMap(t,n){return this.map(t,n).reduce(((i,l)=>i.concat(l)),[])}compactMap(t,n){const i=[];return this.forEach((l=>{const h=t.bind(n)(l);h&&i.push(h)})),i}filter(t,n){return new TN(this.content.filter(t,n))}reject(t,n){return this.filter(aV(t),n)}reduce(t,n){let i,l;n!==void 0?(i=0,l=this.refract(n)):(i=1,l=this.primitive()==="object"?this.first.value:this.first);for(let h=i;h<this.length;h+=1){const v=this.content[h];l=this.primitive()==="object"?this.refract(t(l,v.value,v.key,v,this)):this.refract(t(l,v,h,this))}return l}forEach(t,n){this.content.forEach(((i,l)=>{t.bind(n)(i,this.refract(l))}))}shift(){return this.content.shift()}unshift(t){this.content.unshift(this.refract(t))}push(t){return this.content.push(this.refract(t)),this}add(t){this.push(t)}findElements(t,n){const i=n||{},l=!!i.recursive,h=i.results===void 0?[]:i.results;return this.forEach(((v,x,w)=>{l&&v.findElements!==void 0&&v.findElements(t,{results:h,recursive:l}),t(v,x,w)&&h.push(v)})),h}find(t){return new TN(this.findElements(t,{recursive:!0}))}findByElement(t){return this.find((n=>n.element===t))}findByClass(t){return this.find((n=>n.classes.includes(t)))}getById(t){return this.find((n=>n.id.toValue()===t)).first}includes(t){return this.content.some((n=>n.equals(t)))}contains(t){return this.includes(t)}empty(){return new this.constructor([])}"fantasy-land/empty"(){return this.empty()}concat(t){return new this.constructor(this.content.concat(t.content))}"fantasy-land/concat"(t){return this.concat(t)}"fantasy-land/map"(t){return new this.constructor(this.map(t))}"fantasy-land/chain"(t){return this.map((n=>t(n)),this).reduce(((n,i)=>n.concat(i)),this.empty())}"fantasy-land/filter"(t){return new this.constructor(this.content.filter(t))}"fantasy-land/reduce"(t,n){return this.content.reduce(t,n)}get length(){return this.content.length}get isEmpty(){return this.content.length===0}get first(){return this.getIndex(0)}get second(){return this.getIndex(1)}get last(){return this.getIndex(this.length-1)}};mx.empty=function(){return new this},mx["fantasy-land/empty"]=mx.empty,typeof Symbol<"u"&&(mx.prototype[Symbol.iterator]=function(){return this.content[Symbol.iterator]()});var _N=mx;const lV=x1,cV=Wc;var $N=class extends cV{constructor(t,n,i,l){super(new lV,i,l),this.element="member",this.key=t,this.value=n}get key(){return this.content.key}set key(t){this.content.key=this.refract(t)}get value(){return this.content.value}set value(t){this.content.value=this.refract(t)}};const uV=b1,dV=w1;var NN=class lB extends dV{map(n,i){return this.elements.map((l=>n.bind(i)(l.value,l.key,l)))}filter(n,i){return new lB(this.elements.filter((l=>n.bind(i)(l.value,l.key,l))))}reject(n,i){return this.filter(uV(n.bind(i)))}forEach(n,i){return this.elements.forEach(((l,h)=>{n.bind(i)(l.value,l.key,l,h)}))}keys(){return this.map(((n,i)=>i.toValue()))}values(){return this.map((n=>n.toValue()))}};const hV=b1,pV=h1,fV=_N,mV=$N,gV=NN,yV=Wc,vV=Wc,jm=Wc,DN=class extends nV{constructor(t,n,i){super(t||null,n,i),this.element="null"}primitive(){return"null"}set(){return new Error("Cannot set the value of null")}},PN=class extends rV{constructor(t,n,i){super(t,n,i),this.element="string"}primitive(){return"string"}get length(){return this.content.length}},MN=class extends sV{constructor(t,n,i){super(t,n,i),this.element="number"}primitive(){return"number"}},IN=class extends iV{constructor(t,n,i){super(t,n,i),this.element="boolean"}primitive(){return"boolean"}},zN=_N,LN=$N,PO=class extends fV{constructor(t,n,i){super(t||[],n,i),this.element="object"}primitive(){return"object"}toValue(){return this.content.reduce(((t,n)=>(t[n.key.toValue()]=n.value?n.value.toValue():void 0,t)),{})}get(t){const n=this.getMember(t);if(n)return n.value}getMember(t){if(t!==void 0)return this.content.find((n=>n.key.toValue()===t))}remove(t){let n=null;return this.content=this.content.filter((i=>i.key.toValue()!==t||(n=i,!1))),n}getKey(t){const n=this.getMember(t);if(n)return n.key}set(t,n){if(pV(t))return Object.keys(t).forEach((h=>{this.set(h,t[h])})),this;const i=t,l=this.getMember(i);return l?l.value=n:this.content.push(new mV(i,n)),this}keys(){return this.content.map((t=>t.key.toValue()))}values(){return this.content.map((t=>t.value.toValue()))}hasKey(t){return this.content.some((n=>n.key.equals(t)))}items(){return this.content.map((t=>[t.key.toValue(),t.value.toValue()]))}map(t,n){return this.content.map((i=>t.bind(n)(i.value,i.key,i)))}compactMap(t,n){const i=[];return this.forEach(((l,h,v)=>{const x=t.bind(n)(l,h,v);x&&i.push(x)})),i}filter(t,n){return new gV(this.content).filter(t,n)}reject(t,n){return this.filter(hV(t),n)}forEach(t,n){return this.content.forEach((i=>t.bind(n)(i.value,i.key,i)))}},FN=class extends vV{constructor(t,n,i){super(t||[],n,i),this.element="ref",this.path||(this.path="element")}get path(){return this.attributes.get("path")}set path(t){this.attributes.set("path",t)}},qN=w1,xV=NN,bV=x1;function E1(t){return t instanceof jm?t:typeof t=="string"?new PN(t):typeof t=="number"?new MN(t):typeof t=="boolean"?new IN(t):t===null?new DN:Array.isArray(t)?new zN(t.map(E1)):typeof t=="object"?new PO(t):t}jm.prototype.ObjectElement=PO,jm.prototype.RefElement=FN,jm.prototype.MemberElement=LN,jm.prototype.refract=E1,qN.prototype.refract=E1;var sa={Element:jm,NullElement:DN,StringElement:PN,NumberElement:MN,BooleanElement:IN,ArrayElement:zN,MemberElement:LN,ObjectElement:PO,LinkElement:class extends yV{constructor(t,n,i){super(t||[],n,i),this.element="link"}get relation(){return this.attributes.get("relation")}set relation(t){this.attributes.set("relation",t)}get href(){return this.attributes.get("href")}set href(t){this.attributes.set("href",t)}},RefElement:FN,refract:E1,ArraySlice:qN,ObjectSlice:xV,KeyValuePair:bV};const wV=function(t){return t===null},SV=function(t){return typeof t=="string"||!YU(t)&&ZU(t)&&XU(t)=="[object String]"},EV=function(t){return typeof t=="number"||JU(t)&&WU(t)=="[object Number]"},jV=function(t){return t===!0||t===!1||e8(t)&&QU(t)=="[object Boolean]"},CV=h1,BN=class{constructor(t){this.namespace=t||new this.Namespace}serialise(t){if(!(t instanceof this.namespace.elements.Element))throw new TypeError(`Given element \`${t}\` is not an Element instance`);const n={element:t.element};t._meta&&t._meta.length>0&&(n.meta=this.serialiseObject(t.meta)),t._attributes&&t._attributes.length>0&&(n.attributes=this.serialiseObject(t.attributes));const i=this.serialiseContent(t.content);return i!==void 0&&(n.content=i),n}deserialise(t){if(!t.element)throw new Error("Given value is not an object containing an element name");const n=new(this.namespace.getElementClass(t.element));n.element!==t.element&&(n.element=t.element),t.meta&&this.deserialiseObject(t.meta,n.meta),t.attributes&&this.deserialiseObject(t.attributes,n.attributes);const i=this.deserialiseContent(t.content);return i===void 0&&n.content!==null||(n.content=i),n}serialiseContent(t){if(t instanceof this.namespace.elements.Element)return this.serialise(t);if(t instanceof this.namespace.KeyValuePair){const n={key:this.serialise(t.key)};return t.value&&(n.value=this.serialise(t.value)),n}return t&&t.map?t.length===0?void 0:t.map(this.serialise,this):t}deserialiseContent(t){if(t){if(t.element)return this.deserialise(t);if(t.key){const n=new this.namespace.KeyValuePair(this.deserialise(t.key));return t.value&&(n.value=this.deserialise(t.value)),n}if(t.map)return t.map(this.deserialise,this)}return t}serialiseObject(t){const n={};if(t.forEach(((i,l)=>{i&&(n[l.toValue()]=this.serialise(i))})),Object.keys(n).length!==0)return n}deserialiseObject(t,n){Object.keys(t).forEach((i=>{n.set(i,this.deserialise(t[i]))}))}},Fs=sa;let UN=class{constructor(t){this.elementMap={},this.elementDetection=[],this.Element=Fs.Element,this.KeyValuePair=Fs.KeyValuePair,t&&t.noDefault||this.useDefault(),this._attributeElementKeys=[],this._attributeElementArrayKeys=[]}use(t){return t.namespace&&t.namespace({base:this}),t.load&&t.load({base:this}),this}useDefault(){return this.register("null",Fs.NullElement).register("string",Fs.StringElement).register("number",Fs.NumberElement).register("boolean",Fs.BooleanElement).register("array",Fs.ArrayElement).register("object",Fs.ObjectElement).register("member",Fs.MemberElement).register("ref",Fs.RefElement).register("link",Fs.LinkElement),this.detect(wV,Fs.NullElement,!1).detect(SV,Fs.StringElement,!1).detect(EV,Fs.NumberElement,!1).detect(jV,Fs.BooleanElement,!1).detect(Array.isArray,Fs.ArrayElement,!1).detect(CV,Fs.ObjectElement,!1),this}register(t,n){return this._elements=void 0,this.elementMap[t]=n,this}unregister(t){return this._elements=void 0,delete this.elementMap[t],this}detect(t,n,i){return i===void 0||i?this.elementDetection.unshift([t,n]):this.elementDetection.push([t,n]),this}toElement(t){if(t instanceof this.Element)return t;let n;for(let i=0;i<this.elementDetection.length;i+=1){const l=this.elementDetection[i][0],h=this.elementDetection[i][1];if(l(t)){n=new h(t);break}}return n}getElementClass(t){const n=this.elementMap[t];return n===void 0?this.Element:n}fromRefract(t){return this.serialiser.deserialise(t)}toRefract(t){return this.serialiser.serialise(t)}get elements(){return this._elements===void 0&&(this._elements={Element:this.Element},Object.keys(this.elementMap).forEach((t=>{const n=t[0].toUpperCase()+t.substr(1);this._elements[n]=this.elementMap[t]}))),this._elements}get serialiser(){return new BN(this)}};BN.prototype.Namespace=UN;var AV=UN,Cm=x1,gx=sa.ArraySlice,j1=sa.ObjectSlice,OV=sa.Element,Jc=sa.StringElement,MO=sa.NumberElement,Qc=sa.BooleanElement,IO=sa.NullElement,ur=sa.ArrayElement,St=sa.ObjectElement,yx=sa.MemberElement,eu=sa.RefElement,zO=sa.LinkElement,LO=sa.refract;class C1 extends Jc{constructor(n,i,l){super(n,i,l),this.element="annotation"}get code(){return this.attributes.get("code")}set code(n){this.attributes.set("code",n)}}class A1 extends Jc{constructor(n,i,l){super(n,i,l),this.element="comment"}}class Lo extends ur{constructor(n,i,l){super(n,i,l),this.element="parseResult"}get api(){return this.children.filter((n=>n.classes.contains("api"))).first}get results(){return this.children.filter((n=>n.classes.contains("result")))}get result(){return this.results.first}get annotations(){return this.children.filter((n=>n.element==="annotation"))}get warnings(){return this.children.filter((n=>n.element==="annotation"&&n.classes.contains("warning")))}get errors(){return this.children.filter((n=>n.element==="annotation"&&n.classes.contains("error")))}get isEmpty(){return this.children.reject((n=>n.element==="annotation")).isEmpty}replaceResult(n){const{result:i}=this;if(Ed(i))return!1;const l=this.content.findIndex((h=>h===i));return l!==-1&&(this.content[l]=n,!0)}}class O1 extends ur{constructor(n,i,l){super(n,i,l),this.element="sourceMap"}get positionStart(){return this.children.filter((n=>n.classes.contains("position"))).get(0)}get positionEnd(){return this.children.filter((n=>n.classes.contains("position"))).get(1)}set position(n){if(n===void 0)return;const i=new ur([n.start.row,n.start.column,n.start.char]),l=new ur([n.end.row,n.end.column,n.end.char]);i.classes.push("position"),l.classes.push("position"),this.push(i).push(l)}}const kV=(t,n)=>typeof n=="object"&&n!==null&&t in n&&typeof n[t]=="function",RV=t=>typeof t=="object"&&t!=null&&"_storedElement"in t&&typeof t._storedElement=="string"&&"_content"in t,TV=(t,n)=>typeof n=="object"&&n!==null&&"primitive"in n&&typeof n.primitive=="function"&&n.primitive()===t,_V=(t,n)=>typeof n=="object"&&n!==null&&"classes"in n&&(Array.isArray(n.classes)||n.classes instanceof ur)&&n.classes.includes(t),Cd=(t,n)=>typeof n=="object"&&n!==null&&"element"in n&&n.element===t,_t=t=>t({hasMethod:kV,hasBasicElementProps:RV,primitiveEq:TV,isElementType:Cd,hasClass:_V}),es=_t((({hasBasicElementProps:t,primitiveEq:n})=>i=>i instanceof OV||t(i)&&n(void 0,i))),xn=_t((({hasBasicElementProps:t,primitiveEq:n})=>i=>i instanceof Jc||t(i)&&n("string",i))),FO=_t((({hasBasicElementProps:t,primitiveEq:n})=>i=>i instanceof MO||t(i)&&n("number",i))),qO=_t((({hasBasicElementProps:t,primitiveEq:n})=>i=>i instanceof IO||t(i)&&n("null",i))),vx=_t((({hasBasicElementProps:t,primitiveEq:n})=>i=>i instanceof Qc||t(i)&&n("boolean",i))),Un=_t((({hasBasicElementProps:t,primitiveEq:n,hasMethod:i})=>l=>l instanceof St||t(l)&&n("object",l)&&i("keys",l)&&i("values",l)&&i("items",l))),Ri=_t((({hasBasicElementProps:t,primitiveEq:n,hasMethod:i})=>l=>l instanceof ur&&!(l instanceof St)||t(l)&&n("array",l)&&i("push",l)&&i("unshift",l)&&i("map",l)&&i("reduce",l))),Fo=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof yx||t(l)&&n("member",l)&&i(void 0,l))),KN=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof zO||t(l)&&n("link",l)&&i(void 0,l))),VN=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof eu||t(l)&&n("ref",l)&&i(void 0,l))),$V=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof C1||t(l)&&n("annotation",l)&&i("array",l))),NV=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof A1||t(l)&&n("comment",l)&&i("string",l))),HN=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof Lo||t(l)&&n("parseResult",l)&&i("array",l))),GN=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof O1||t(l)&&n("sourceMap",l)&&i("array",l))),rp=t=>Cd("object",t)||Cd("array",t)||Cd("boolean",t)||Cd("number",t)||Cd("string",t)||Cd("null",t)||Cd("member",t),xx=t=>GN(t.meta.get("sourceMap")),k1=(t,n)=>t.length===0||te(i1(n.classes.toValue()),t),DV=Object.freeze(Object.defineProperty({__proto__:null,hasElementSourceMap:xx,includesClasses:k1,includesSymbols:(t,n)=>{if(t.length===0)return!0;const i=n.attributes.get("symbols");return!!Ri(i)&&te(i1(i.toValue()),t)},isAnnotationElement:$V,isArrayElement:Ri,isBooleanElement:vx,isCommentElement:NV,isElement:es,isLinkElement:KN,isMemberElement:Fo,isNullElement:qO,isNumberElement:FO,isObjectElement:Un,isParseResultElement:HN,isPrimitiveElement:rp,isRefElement:VN,isSourceMapElement:GN,isStringElement:xn},Symbol.toStringTag,{value:"Module"}));class XN extends AV{constructor(){super(),this.register("annotation",C1),this.register("comment",A1),this.register("parseResult",Lo),this.register("sourceMap",O1)}}const YN=new XN,bx=t=>{const n=new XN;return Jh(t)&&n.use(t),n},ZN=()=>({predicates:{...DV},namespace:YN}),R1=(t,n,i)=>{const l=t[n];if(l!=null){if(!i&&typeof l=="function")return l;const h=i?l.leave:l.enter;if(typeof h=="function")return h}else{const h=i?t.leave:t.enter;if(h!=null){if(typeof h=="function")return h;const v=h[n];if(typeof v=="function")return v}}return null},Gn={},wx=t=>t?.type,WN=t=>typeof wx(t)=="string",BO=t=>Object.create(Object.getPrototypeOf(t),Object.getOwnPropertyDescriptors(t)),T1=(t,{visitFnGetter:n=R1,nodeTypeGetter:i=wx,breakSymbol:l=Gn,deleteNodeSymbol:h=null,skipVisitingNodeSymbol:v=!1,exposeEdits:x=!1}={})=>{const w=Symbol("skip"),C=new Array(t.length).fill(w);return{enter($,N,_,F,U,J){let Y=$,Z=!1;const P={...J,replaceWith(se,ae){J.replaceWith(se,ae),Y=se}};for(let se=0;se<t.length;se+=1)if(C[se]===w){const ae=n(t[se],i(Y),!1);if(typeof ae=="function"){const he=ae.call(t[se],Y,N,_,F,U,P);if(typeof he?.then=="function")throw new Oa("Async visitor not supported in sync mode",{visitor:t[se],visitFn:ae});if(he===v)C[se]=Y;else if(he===l)C[se]=l;else{if(he===h)return he;if(he!==void 0){if(!x)return he;Y=he,Z=!0}}}}return Z?Y:void 0},leave($,N,_,F,U,J){let Y=$;const Z={...J,replaceWith(P,se){J.replaceWith(P,se),Y=P}};for(let P=0;P<t.length;P+=1)if(C[P]===w){const se=n(t[P],i(Y),!0);if(typeof se=="function"){const ae=se.call(t[P],Y,N,_,F,U,Z);if(typeof ae?.then=="function")throw new Oa("Async visitor not supported in sync mode",{visitor:t[P],visitFn:se});if(ae===l)C[P]=l;else if(ae!==void 0&&ae!==v)return ae}}else C[P]===Y&&(C[P]=w)}}};T1[Symbol.for("nodejs.util.promisify.custom")]=(t,{visitFnGetter:n=R1,nodeTypeGetter:i=wx,breakSymbol:l=Gn,deleteNodeSymbol:h=null,skipVisitingNodeSymbol:v=!1,exposeEdits:x=!1}={})=>{const w=Symbol("skip"),C=new Array(t.length).fill(w);return{async enter($,N,_,F,U,J){let Y=$,Z=!1;const P={...J,replaceWith(se,ae){J.replaceWith(se,ae),Y=se}};for(let se=0;se<t.length;se+=1)if(C[se]===w){const ae=n(t[se],i(Y),!1);if(typeof ae=="function"){const he=await ae.call(t[se],Y,N,_,F,U,P);if(he===v)C[se]=Y;else if(he===l)C[se]=l;else{if(he===h)return he;if(he!==void 0){if(!x)return he;Y=he,Z=!0}}}}return Z?Y:void 0},async leave($,N,_,F,U,J){let Y=$;const Z={...J,replaceWith(P,se){J.replaceWith(P,se),Y=P}};for(let P=0;P<t.length;P+=1)if(C[P]===w){const se=n(t[P],i(Y),!0);if(typeof se=="function"){const ae=await se.call(t[P],Y,N,_,F,U,Z);if(ae===l)C[P]=l;else if(ae!==void 0&&ae!==v)return ae}}else C[P]===Y&&(C[P]=w)}}};const UO=(t,n,{keyMap:i=null,state:l={},breakSymbol:h=Gn,deleteNodeSymbol:v=null,skipVisitingNodeSymbol:x=!1,visitFnGetter:w=R1,nodeTypeGetter:C=wx,nodePredicate:$=WN,nodeCloneFn:N=BO,detectCycles:_=!0}={})=>{const F=i||{};let U,J,Y=Array.isArray(t),Z=[t],P=-1,se=[],ae=t;const he=[],ge=[];do{P+=1;const Ae=P===Z.length;let qe;const Se=Ae&&se.length!==0;if(Ae){if(qe=ge.length===0?void 0:he.pop(),ae=J,J=ge.pop(),Se)if(Y){ae=ae.slice();let Me=0;for(const[Ie,Qe]of se){const ot=Ie-Me;Qe===v?(ae.splice(ot,1),Me+=1):ae[ot]=Qe}}else{ae=N(ae);for(const[Me,Ie]of se)ae[Me]=Ie}P=U.index,Z=U.keys,se=U.edits,Y=U.inArray,U=U.prev}else if(J!==v&&J!==void 0){if(qe=Y?P:Z[P],ae=J[qe],ae===v||ae===void 0)continue;he.push(qe)}let me;if(!Array.isArray(ae)){var pe;if(!$(ae))throw new Oa(`Invalid AST Node: ${String(ae)}`,{node:ae});if(_&&ge.includes(ae)){he.pop();continue}const Me=w(n,C(ae),Ae);if(Me){for(const[Qe,ot]of Object.entries(l))n[Qe]=ot;const Ie={replaceWith(Qe,ot){typeof ot=="function"?ot(Qe,ae,qe,J,he,ge):J&&(J[qe]=Qe),Ae||(ae=Qe)}};me=Me.call(n,ae,qe,J,he,ge,Ie)}if(typeof((pe=me)===null||pe===void 0?void 0:pe.then)=="function")throw new Oa("Async visitor not supported in sync mode",{visitor:n,visitFn:Me});if(me===h)break;if(me===x){if(!Ae){he.pop();continue}}else if(me!==void 0&&(se.push([qe,me]),!Ae)){if(!$(me)){he.pop();continue}ae=me}}var Te;me===void 0&&Se&&se.push([qe,ae]),Ae||(U={inArray:Y,index:P,keys:Z,edits:se,prev:U},Y=Array.isArray(ae),Z=Y?ae:(Te=F[C(ae)])!==null&&Te!==void 0?Te:[],P=-1,se=[],J!==v&&J!==void 0&&ge.push(J),J=ae)}while(U!==void 0);return se.length!==0?se[se.length-1][1]:t};UO[Symbol.for("nodejs.util.promisify.custom")]=async(t,n,{keyMap:i=null,state:l={},breakSymbol:h=Gn,deleteNodeSymbol:v=null,skipVisitingNodeSymbol:x=!1,visitFnGetter:w=R1,nodeTypeGetter:C=wx,nodePredicate:$=WN,nodeCloneFn:N=BO,detectCycles:_=!0}={})=>{const F=i||{};let U,J,Y=Array.isArray(t),Z=[t],P=-1,se=[],ae=t;const he=[],ge=[];do{P+=1;const Te=P===Z.length;let Ae;const qe=Te&&se.length!==0;if(Te){if(Ae=ge.length===0?void 0:he.pop(),ae=J,J=ge.pop(),qe)if(Y){ae=ae.slice();let me=0;for(const[Me,Ie]of se){const Qe=Me-me;Ie===v?(ae.splice(Qe,1),me+=1):ae[Qe]=Ie}}else{ae=N(ae);for(const[me,Me]of se)ae[me]=Me}P=U.index,Z=U.keys,se=U.edits,Y=U.inArray,U=U.prev}else if(J!==v&&J!==void 0){if(Ae=Y?P:Z[P],ae=J[Ae],ae===v||ae===void 0)continue;he.push(Ae)}let Se;if(!Array.isArray(ae)){if(!$(ae))throw new Oa(`Invalid AST Node: ${String(ae)}`,{node:ae});if(_&&ge.includes(ae)){he.pop();continue}const me=w(n,C(ae),Te);if(me){for(const[Ie,Qe]of Object.entries(l))n[Ie]=Qe;const Me={replaceWith(Ie,Qe){typeof Qe=="function"?Qe(Ie,ae,Ae,J,he,ge):J&&(J[Ae]=Ie),Te||(ae=Ie)}};Se=await me.call(n,ae,Ae,J,he,ge,Me)}if(Se===h)break;if(Se===x){if(!Te){he.pop();continue}}else if(Se!==void 0&&(se.push([Ae,Se]),!Te)){if(!$(Se)){he.pop();continue}ae=Se}}var pe;Se===void 0&&qe&&se.push([Ae,ae]),Te||(U={inArray:Y,index:P,keys:Z,edits:se,prev:U},Y=Array.isArray(ae),Z=Y?ae:(pe=F[C(ae)])!==null&&pe!==void 0?pe:[],P=-1,se=[],J!==v&&J!==void 0&&ge.push(J),J=ae)}while(U!==void 0);return se.length!==0?se[se.length-1][1]:t};class JN extends Oa{value;constructor(n,i){super(n,i),i!==void 0&&(this.value=i.value)}}class PV extends JN{}class MV extends JN{}const Ct=(t,n={})=>{const{visited:i=new WeakMap}=n,l={...n,visited:i};if(i.has(t))return i.get(t);if(t instanceof Cm){const{key:h,value:v}=t,x=es(h)?Ct(h,l):h,w=es(v)?Ct(v,l):v,C=new Cm(x,w);return i.set(t,C),C}if(t instanceof j1){const h=w=>Ct(w,l),v=[...t].map(h),x=new j1(v);return i.set(t,x),x}if(t instanceof gx){const h=w=>Ct(w,l),v=[...t].map(h),x=new gx(v);return i.set(t,x),x}if(es(t)){const h=Ti(t);if(i.set(t,h),t.content)if(es(t.content))h.content=Ct(t.content,l);else if(t.content instanceof Cm)h.content=Ct(t.content,l);else if(Array.isArray(t.content)){const v=x=>Ct(x,l);h.content=t.content.map(v)}else h.content=t.content;else h.content=t.content;return h}throw new PV("Value provided to cloneDeep function couldn't be cloned",{value:t})};Ct.safe=t=>{try{return Ct(t)}catch{return t}};const QN=t=>{const{key:n,value:i}=t;return new Cm(n,i)},eD=t=>{const n=new t.constructor;if(n.element=t.element,t.meta.length>0&&(n._meta=Ct(t.meta)),t.attributes.length>0&&(n._attributes=Ct(t.attributes)),es(t.content)){const i=t.content;n.content=eD(i)}else Array.isArray(t.content)?n.content=[...t.content]:t.content instanceof Cm?n.content=QN(t.content):n.content=t.content;return n},Ti=t=>{if(t instanceof Cm)return QN(t);if(t instanceof j1)return(n=>{const i=[...n];return new j1(i)})(t);if(t instanceof gx)return(n=>{const i=[...n];return new gx(i)})(t);if(es(t))return eD(t);throw new MV("Value provided to cloneShallow function couldn't be cloned",{value:t})};Ti.safe=t=>{try{return Ti(t)}catch{return t}};const Am=t=>Un(t)?"ObjectElement":Ri(t)?"ArrayElement":Fo(t)?"MemberElement":xn(t)?"StringElement":vx(t)?"BooleanElement":FO(t)?"NumberElement":qO(t)?"NullElement":KN(t)?"LinkElement":VN(t)?"RefElement":void 0,tD=t=>es(t)?Ti(t):BO(t),nD=Ls(Am,Wh),Om={ObjectElement:["content"],ArrayElement:["content"],MemberElement:["key","value"],StringElement:[],BooleanElement:[],NumberElement:[],NullElement:[],RefElement:[],LinkElement:[],Annotation:[],Comment:[],ParseResultElement:["content"],SourceMap:["content"]};class rD{result;predicate;returnOnTrue;returnOnFalse;constructor({predicate:n=hm,returnOnTrue:i,returnOnFalse:l}={}){this.result=[],this.predicate=n,this.returnOnTrue=i,this.returnOnFalse=l}enter(n){return this.predicate(n)?(this.result.push(n),this.returnOnTrue):this.returnOnFalse}}const fi=(t,n,{keyMap:i=Om,...l}={})=>UO(t,n,{keyMap:i,nodeTypeGetter:Am,nodePredicate:nD,nodeCloneFn:tD,...l});fi[Symbol.for("nodejs.util.promisify.custom")]=async(t,n,{keyMap:i=Om,...l}={})=>UO[Symbol.for("nodejs.util.promisify.custom")](t,n,{keyMap:i,nodeTypeGetter:Am,nodePredicate:nD,nodeCloneFn:tD,...l});const sD={toolboxCreator:ZN,visitorOptions:{nodeTypeGetter:Am,exposeEdits:!0}},km=(t,n,i={})=>{if(n.length===0)return t;const l=oO(sD,i),{toolboxCreator:h,visitorOptions:v}=l,x=h(),w=n.map((N=>N(x))),C=T1(w.map(r1({},"visitor")),{...v});w.forEach(ux(["pre"],[]));const $=fi(t,C,v);return w.forEach(ux(["post"],[])),$};km[Symbol.for("nodejs.util.promisify.custom")]=async(t,n,i={})=>{if(n.length===0)return t;const l=oO(sD,i),{toolboxCreator:h,visitorOptions:v}=l,x=h(),w=n.map((F=>F(x))),C=T1[Symbol.for("nodejs.util.promisify.custom")],$=fi[Symbol.for("nodejs.util.promisify.custom")],N=C(w.map(r1({},"visitor")),{...v});await Promise.allSettled(w.map(ux(["pre"],[])));const _=await $(t,N,v);return await Promise.allSettled(w.map(ux(["post"],[]))),_};var iD={exports:{}};(function(t){var n=(()=>{var i=Object.defineProperty,l=Object.getOwnPropertyDescriptor,h=Object.getOwnPropertyNames,v=Object.getOwnPropertySymbols,x=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable,C=(Z,P,se)=>P in Z?i(Z,P,{enumerable:!0,configurable:!0,writable:!0,value:se}):Z[P]=se,$=(Z,P)=>{for(var se in P||(P={}))x.call(P,se)&&C(Z,se,P[se]);if(v)for(var se of v(P))w.call(P,se)&&C(Z,se,P[se]);return Z},N=(Z,P,se)=>(C(Z,typeof P!="symbol"?P+"":P,se),se),_={};((Z,P)=>{for(var se in P)i(Z,se,{get:P[se],enumerable:!0})})(_,{DEFAULT_OPTIONS:()=>U,DEFAULT_UUID_LENGTH:()=>F,default:()=>Y});var F=6,U={dictionary:"alphanum",shuffle:!0,debug:!1,length:F,counter:0},J=class{constructor(Z={}){N(this,"counter"),N(this,"debug"),N(this,"dict"),N(this,"version"),N(this,"dictIndex",0),N(this,"dictRange",[]),N(this,"lowerBound",0),N(this,"upperBound",0),N(this,"dictLength",0),N(this,"uuidLength"),N(this,"_digit_first_ascii",48),N(this,"_digit_last_ascii",58),N(this,"_alpha_lower_first_ascii",97),N(this,"_alpha_lower_last_ascii",123),N(this,"_hex_last_ascii",103),N(this,"_alpha_upper_first_ascii",65),N(this,"_alpha_upper_last_ascii",91),N(this,"_number_dict_ranges",{digits:[this._digit_first_ascii,this._digit_last_ascii]}),N(this,"_alpha_dict_ranges",{lowerCase:[this._alpha_lower_first_ascii,this._alpha_lower_last_ascii],upperCase:[this._alpha_upper_first_ascii,this._alpha_upper_last_ascii]}),N(this,"_alpha_lower_dict_ranges",{lowerCase:[this._alpha_lower_first_ascii,this._alpha_lower_last_ascii]}),N(this,"_alpha_upper_dict_ranges",{upperCase:[this._alpha_upper_first_ascii,this._alpha_upper_last_ascii]}),N(this,"_alphanum_dict_ranges",{digits:[this._digit_first_ascii,this._digit_last_ascii],lowerCase:[this._alpha_lower_first_ascii,this._alpha_lower_last_ascii],upperCase:[this._alpha_upper_first_ascii,this._alpha_upper_last_ascii]}),N(this,"_alphanum_lower_dict_ranges",{digits:[this._digit_first_ascii,this._digit_last_ascii],lowerCase:[this._alpha_lower_first_ascii,this._alpha_lower_last_ascii]}),N(this,"_alphanum_upper_dict_ranges",{digits:[this._digit_first_ascii,this._digit_last_ascii],upperCase:[this._alpha_upper_first_ascii,this._alpha_upper_last_ascii]}),N(this,"_hex_dict_ranges",{decDigits:[this._digit_first_ascii,this._digit_last_ascii],alphaDigits:[this._alpha_lower_first_ascii,this._hex_last_ascii]}),N(this,"_dict_ranges",{_number_dict_ranges:this._number_dict_ranges,_alpha_dict_ranges:this._alpha_dict_ranges,_alpha_lower_dict_ranges:this._alpha_lower_dict_ranges,_alpha_upper_dict_ranges:this._alpha_upper_dict_ranges,_alphanum_dict_ranges:this._alphanum_dict_ranges,_alphanum_lower_dict_ranges:this._alphanum_lower_dict_ranges,_alphanum_upper_dict_ranges:this._alphanum_upper_dict_ranges,_hex_dict_ranges:this._hex_dict_ranges}),N(this,"log",((...pe)=>{const Te=[...pe];if(Te[0]=`[short-unique-id] ${pe[0]}`,this.debug===!0&&typeof console<"u"&&console!==null)return console.log(...Te)})),N(this,"_normalizeDictionary",((pe,Te)=>{let Ae;if(pe&&Array.isArray(pe)&&pe.length>1)Ae=pe;else{let qe;Ae=[],this.dictIndex=qe=0;const Se=`_${pe}_dict_ranges`,me=this._dict_ranges[Se];Object.keys(me).forEach((Me=>{const Ie=Me;for(this.dictRange=me[Ie],this.lowerBound=this.dictRange[0],this.upperBound=this.dictRange[1],this.dictIndex=qe=this.lowerBound;this.lowerBound<=this.upperBound?qe<this.upperBound:qe>this.upperBound;this.dictIndex=this.lowerBound<=this.upperBound?qe+=1:qe-=1)Ae.push(String.fromCharCode(this.dictIndex))}))}return Te&&(Ae=Ae.sort((()=>Math.random()-.5))),Ae})),N(this,"setDictionary",((pe,Te)=>{this.dict=this._normalizeDictionary(pe,Te),this.dictLength=this.dict.length,this.setCounter(0)})),N(this,"seq",(()=>this.sequentialUUID())),N(this,"sequentialUUID",(()=>{let pe,Te,Ae="";pe=this.counter;do Te=pe%this.dictLength,pe=Math.trunc(pe/this.dictLength),Ae+=this.dict[Te];while(pe!==0);return this.counter+=1,Ae})),N(this,"rnd",((pe=this.uuidLength||F)=>this.randomUUID(pe))),N(this,"randomUUID",((pe=this.uuidLength||F)=>{let Te,Ae,qe;if(pe==null||pe<1)throw new Error("Invalid UUID Length Provided");for(Te="",qe=0;qe<pe;qe+=1)Ae=parseInt((Math.random()*this.dictLength).toFixed(0),10)%this.dictLength,Te+=this.dict[Ae];return Te})),N(this,"fmt",((pe,Te)=>this.formattedUUID(pe,Te))),N(this,"formattedUUID",((pe,Te)=>{const Ae={$r:this.randomUUID,$s:this.sequentialUUID,$t:this.stamp};return pe.replace(/\$[rs]\d{0,}|\$t0|\$t[1-9]\d{1,}/g,(qe=>{const Se=qe.slice(0,2),me=parseInt(qe.slice(2),10);return Se==="$s"?Ae[Se]().padStart(me,"0"):Se==="$t"&&Te?Ae[Se](me,Te):Ae[Se](me)}))})),N(this,"availableUUIDs",((pe=this.uuidLength)=>parseFloat(Math.pow([...new Set(this.dict)].length,pe).toFixed(0)))),N(this,"approxMaxBeforeCollision",((pe=this.availableUUIDs(this.uuidLength))=>parseFloat(Math.sqrt(Math.PI/2*pe).toFixed(20)))),N(this,"collisionProbability",((pe=this.availableUUIDs(this.uuidLength),Te=this.uuidLength)=>parseFloat((this.approxMaxBeforeCollision(pe)/this.availableUUIDs(Te)).toFixed(20)))),N(this,"uniqueness",((pe=this.availableUUIDs(this.uuidLength))=>{const Te=parseFloat((1-this.approxMaxBeforeCollision(pe)/pe).toFixed(20));return Te>1?1:Te<0?0:Te})),N(this,"getVersion",(()=>this.version)),N(this,"stamp",((pe,Te)=>{const Ae=Math.floor(+(Te||new Date)/1e3).toString(16);if(typeof pe=="number"&&pe===0)return Ae;if(typeof pe!="number"||pe<10)throw new Error(["Param finalLength must be a number greater than or equal to 10,","or 0 if you want the raw hexadecimal timestamp"].join(`
|
||
`));const qe=pe-9,Se=Math.round(Math.random()*(qe>15?15:qe)),me=this.randomUUID(qe);return`${me.substring(0,Se)}${Ae}${me.substring(Se)}${Se.toString(16)}`})),N(this,"parseStamp",((pe,Te)=>{if(Te&&!/t0|t[1-9]\d{1,}/.test(Te))throw new Error("Cannot extract date from a formated UUID with no timestamp in the format");const Ae=Te?Te.replace(/\$[rs]\d{0,}|\$t0|\$t[1-9]\d{1,}/g,(Se=>{const me={$r:Qe=>[...Array(Qe)].map((()=>"r")).join(""),$s:Qe=>[...Array(Qe)].map((()=>"s")).join(""),$t:Qe=>[...Array(Qe)].map((()=>"t")).join("")},Me=Se.slice(0,2),Ie=parseInt(Se.slice(2),10);return me[Me](Ie)})).replace(/^(.*?)(t{8,})(.*)$/g,((Se,me,Me)=>pe.substring(me.length,me.length+Me.length))):pe;if(Ae.length===8)return new Date(1e3*parseInt(Ae,16));if(Ae.length<10)throw new Error("Stamp length invalid");const qe=parseInt(Ae.substring(Ae.length-1),16);return new Date(1e3*parseInt(Ae.substring(qe,qe+8),16))})),N(this,"setCounter",(pe=>{this.counter=pe})),N(this,"validate",((pe,Te)=>{const Ae=Te?this._normalizeDictionary(Te):this.dict;return pe.split("").every((qe=>Ae.includes(qe)))}));const P=$($({},U),Z);this.counter=0,this.debug=!1,this.dict=[],this.version="5.2.0";const{dictionary:se,shuffle:ae,length:he,counter:ge}=P;return this.uuidLength=he,this.setDictionary(se,ae),this.setCounter(ge),this.debug=P.debug,this.log(this.dict),this.log(`Generator instantiated with Dictionary Size ${this.dictLength} and counter set to ${this.counter}`),this.log=this.log.bind(this),this.setDictionary=this.setDictionary.bind(this),this.setCounter=this.setCounter.bind(this),this.seq=this.seq.bind(this),this.sequentialUUID=this.sequentialUUID.bind(this),this.rnd=this.rnd.bind(this),this.randomUUID=this.randomUUID.bind(this),this.fmt=this.fmt.bind(this),this.formattedUUID=this.formattedUUID.bind(this),this.availableUUIDs=this.availableUUIDs.bind(this),this.approxMaxBeforeCollision=this.approxMaxBeforeCollision.bind(this),this.collisionProbability=this.collisionProbability.bind(this),this.uniqueness=this.uniqueness.bind(this),this.getVersion=this.getVersion.bind(this),this.stamp=this.stamp.bind(this),this.parseStamp=this.parseStamp.bind(this),this}};N(J,"default",J);var Y=J;return(Z=>((P,se,ae,he)=>{if(se&&typeof se=="object"||typeof se=="function")for(let ge of h(se))x.call(P,ge)||ge===void 0||i(P,ge,{get:()=>se[ge],enumerable:!(he=l(se,ge))||he.enumerable});return P})(i({},"__esModule",{value:!0}),Z))(_)})();t.exports=n.default,typeof window<"u"&&(n=n.default)})(iD);const IV=La(iD.exports);class zV extends Oa{value;constructor(n,i){super(n,i),i!==void 0&&(this.value=i.value)}}class KO{uuid;identityMap;constructor({length:n=6}={}){this.uuid=new IV({length:n}),this.identityMap=new WeakMap}identify(n){if(!es(n))throw new zV("Cannot not identify the element. `element` is neither structurally compatible nor a subclass of an Element class.",{value:n});if(n.meta.hasKey("id")&&xn(n.meta.get("id"))&&!n.meta.get("id").equals(""))return n.id;if(this.identityMap.has(n))return this.identityMap.get(n);const i=new Jc(this.generateId());return this.identityMap.set(n,i),i}forget(n){return!!this.identityMap.has(n)&&(this.identityMap.delete(n),!0)}generateId(){return this.uuid.randomUUID()}}new KO;class LV extends Array{unknownMediaType="application/octet-stream";filterByFormat(){throw new Sd("filterByFormat method in MediaTypes class is not yet implemented.")}findBy(){throw new Sd("findBy method in MediaTypes class is not yet implemented.")}latest(){throw new Sd("latest method in MediaTypes class is not yet implemented.")}}const Wa=t=>(n,i={})=>((l,{Type:h,plugins:v=[]})=>{const x=new h(l);return es(l)&&(l.meta.length>0&&(x.meta=Ct(l.meta)),l.attributes.length>0&&(x.attributes=Ct(l.attributes))),km(x,v,{toolboxCreator:ZN,visitorOptions:{nodeTypeGetter:Am}})})(n,{...i,Type:t});St.refract=Wa(St),ur.refract=Wa(ur),Jc.refract=Wa(Jc),Qc.refract=Wa(Qc),IO.refract=Wa(IO),MO.refract=Wa(MO),zO.refract=Wa(zO),eu.refract=Wa(eu),C1.refract=Wa(C1),A1.refract=Wa(A1),Lo.refract=Wa(Lo),O1.refract=Wa(O1);const aD=(t,n)=>{const i=new rD({predicate:t,returnOnTrue:Gn});return fi(n,i),$$(void 0,[0],i.result)},oD=t=>typeof t?.type=="string"?t.type:Am(t),lD={EphemeralObject:["content"],EphemeralArray:["content"],...Om},cD=(t,n,{keyMap:i=lD,...l}={})=>fi(t,n,{keyMap:i,nodeTypeGetter:oD,nodePredicate:pi,detectCycles:!1,deleteNodeSymbol:Symbol.for("delete-node"),skipVisitingNodeSymbol:Symbol.for("skip-visiting-node"),...l});cD[Symbol.for("nodejs.util.promisify.custom")]=async(t,{keyMap:n=lD,...i}={})=>fi[Symbol.for("nodejs.util.promisify.custom")](t,visitor,{keyMap:n,nodeTypeGetter:oD,nodePredicate:pi,detectCycles:!1,deleteNodeSymbol:Symbol.for("delete-node"),skipVisitingNodeSymbol:Symbol.for("skip-visiting-node"),...i});class FV{type="EphemeralArray";content=[];reference=void 0;constructor(n){this.content=n,this.reference=[]}toReference(){return this.reference}toArray(){return this.reference.push(...this.content),this.reference}}class qV{type="EphemeralObject";content=[];reference=void 0;constructor(n){this.content=n,this.reference={}}toReference(){return this.reference}toObject(){return Object.assign(this.reference,Object.fromEntries(this.content))}}const it=t=>es(t)?xn(t)||FO(t)||vx(t)||qO(t)?t.toValue():cD(t,new class{ObjectElement={enter:n=>{if(this.references.has(n))return this.references.get(n).toReference();const i=new qV(n.content);return this.references.set(n,i),i}};EphemeralObject={leave:n=>n.toObject()};MemberElement={enter:n=>[n.key,n.value]};ArrayElement={enter:n=>{if(this.references.has(n))return this.references.get(n).toReference();const i=new FV(n.content);return this.references.set(n,i),i}};EphemeralArray={leave:n=>n.toArray()};references=new WeakMap;BooleanElement(n){return n.toValue()}NumberElement(n){return n.toValue()}StringElement(n){return n.toValue()}NullElement(){return null}RefElement(n,...i){var l;const h=i[3];return((l=h[h.length-1])===null||l===void 0?void 0:l.type)==="EphemeralObject"?Symbol.for("delete-node"):String(n.toValue())}LinkElement(n){return xn(n.href)?n.href.toValue():""}}):t,_1=(t,n=new WeakMap)=>(Fo(t)?(n.set(t.key,t),_1(t.key,n),n.set(t.value,t),_1(t.value,n)):t.children.forEach((i=>{n.set(i,t),_1(i,n)})),n);class BV{element;edges;constructor({element:n}){this.element=n}transclude(n,i){var l;if(n===this.element)return i;if(n===i)return this.element;this.edges=(l=this.edges)!==null&&l!==void 0?l:_1(this.element);const h=this.edges.get(n);return Ed(h)?void 0:(Un(h)?((v,x,w)=>{const C=w.get(v);Un(C)&&(C.content=C.map((($,N,_)=>_===v?(w.delete(v),w.set(x,C),x):_)))})(n,i,this.edges):Ri(h)?((v,x,w)=>{const C=w.get(v);Ri(C)&&(C.content=C.map(($=>$===v?(w.delete(v),w.set(x,C),x):$)))})(n,i,this.edges):Fo(h)&&((v,x,w)=>{const C=w.get(v);Fo(C)&&(C.key===v&&(C.key=x,w.delete(v),w.set(x,C)),C.value===v&&(C.value=x,w.delete(v),w.set(x,C)))})(n,i,this.edges),this.element)}}const $1=(t,n)=>{const i=fm(t,n);return QB((l=>{if(Jh(l)&&O$("$ref",l)&&sU(Wh,"$ref",l)){const h=ra(["$ref"],l),v=hO("#/",h);return ra(v.split("/"),i)}return Jh(l)?$1(l,i):l}),t)},uD=(t,n=YN)=>{if(Wh(t))try{return n.fromRefract(JSON.parse(t))}catch{}return Jh(t)&&O$("element",t)?n.fromRefract(t):n.toElement(t)},N1=t=>{const n=t.meta.length>0?Ct(t.meta):void 0,i=t.attributes.length>0?Ct(t.attributes):void 0;return new t.constructor(void 0,n,i)},D1=(t,n)=>n.clone&&n.isMergeableElement(t)?Ul(N1(t),t,n):t,P1={clone:!0,isMergeableElement:t=>Un(t)||Ri(t),arrayElementMerge:(t,n,i)=>t.concat(n)["fantasy-land/map"]((l=>D1(l,i))),objectElementMerge:(t,n,i)=>{const l=Un(t)?N1(t):N1(n);return Un(t)&&t.forEach(((h,v,x)=>{const w=Ti(x);w.value=D1(h,i),l.content.push(w)})),n.forEach(((h,v,x)=>{const w=it(v);let C;if(Un(t)&&t.hasKey(w)&&i.isMergeableElement(h)){const $=t.get(w);C=Ti(x),C.value=((N,_)=>{if(typeof _.customMerge!="function")return Ul;const F=_.customMerge(N,_);return typeof F=="function"?F:Ul})(v,i)($,h)}else C=Ti(x),C.value=D1(h,i);l.remove(w),l.content.push(C)})),l},customMerge:void 0,customMetaMerge:void 0,customAttributesMerge:void 0};function Ul(t,n,i){var l,h,v;const x={...P1,...i};x.isMergeableElement=(l=x.isMergeableElement)!==null&&l!==void 0?l:P1.isMergeableElement,x.arrayElementMerge=(h=x.arrayElementMerge)!==null&&h!==void 0?h:P1.arrayElementMerge,x.objectElementMerge=(v=x.objectElementMerge)!==null&&v!==void 0?v:P1.objectElementMerge;const w=Ri(n);if(w!==Ri(t))return D1(n,x);const C=w&&typeof x.arrayElementMerge=="function"?x.arrayElementMerge(t,n,x):x.objectElementMerge(t,n,x);return C.meta=($=>typeof $.customMetaMerge!="function"?N=>Ct(N):$.customMetaMerge)(x)(t.meta,n.meta),C.attributes=($=>typeof $.customAttributesMerge!="function"?N=>Ct(N):$.customAttributesMerge)(x)(t.attributes,n.attributes),C}Ul.all=(t,n)=>{if(!Array.isArray(t))throw new TypeError("First argument of deepmerge should be an array.");return t.length===0?new St:t.reduce(((i,l)=>Ul(i,l,n)),N1(t[0]))};class VO extends br{}class dD extends VO{}let Sx=class{name;allowEmpty;sourceMap;fileExtensions;mediaTypes;constructor({name:t,allowEmpty:n=!0,sourceMap:i=!1,fileExtensions:l=[],mediaTypes:h=[]}){this.name=t,this.allowEmpty=n,this.sourceMap=i,this.fileExtensions=l,this.mediaTypes=h}};class HO extends Array{includesCycle(n){return this.filter((i=>i.has(n))).length>1}includes(n,i){return n instanceof Set?super.includes(n,i):this.some((l=>l.has(n)))}findItem(n){for(const i of this)for(const l of i)if(es(l)&&n(l))return l}}let tu=class{uri;depth;value;refSet;errors;constructor({uri:t,depth:n=0,refSet:i,value:l}){this.uri=t,this.value=l,this.depth=n,this.refSet=i,this.errors=[]}};class hD extends br{}class UV extends hD{}class KV extends br{}class GO extends KV{}class VV extends hD{constructor(n){super(`Invalid JSON Schema $anchor "${n}".`)}}class Rm extends VO{}class HV extends SO{}class nu extends wO{}function pD(t,n){(n==null||n>t.length)&&(n=t.length);for(var i=0,l=new Array(n);i<n;i++)l[i]=t[i];return l}function fD(t,n){return n!=null&&typeof Symbol<"u"&&n[Symbol.hasInstance]?!!n[Symbol.hasInstance](t):t instanceof n}function GV(t,n){return(function(i){if(Array.isArray(i))return i})(t)||(function(i,l){var h=i==null?null:typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(h!=null){var v,x,w=[],C=!0,$=!1;try{for(h=h.call(i);!(C=(v=h.next()).done)&&(w.push(v.value),!l||w.length!==l);C=!0);}catch(N){$=!0,x=N}finally{try{C||h.return==null||h.return()}finally{if($)throw x}}return w}})(t,n)||(function(i,l){if(i){if(typeof i=="string")return pD(i,l);var h=Object.prototype.toString.call(i).slice(8,-1);return h==="Object"&&i.constructor&&(h=i.constructor.name),h==="Map"||h==="Set"?Array.from(h):h==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(h)?pD(i,l):void 0}})(t,n)||(function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")})()}function Tm(t){return t&&typeof Symbol<"u"&&t.constructor===Symbol?"symbol":typeof t}var mD=function(t){throw TypeError(t)},gD=function(t,n,i){return n.has(t)||mD("Cannot "+i)},_i=function(t,n,i){return gD(t,n,"read from private field"),n.get(t)},yD=function(t,n,i){return n.has(t)?mD("Cannot add the same private member more than once"):fD(n,WeakSet)?n.add(t):n.set(t,i)},XO=function(t,n,i,l){return gD(t,n,"write to private field"),n.set(t,i),i},_m=function(t){return Object.prototype.toString.call(t)},vD=function(t){return ArrayBuffer.isView(t)&&!fD(t,DataView)},xD=Array.isArray,XV=Object.getOwnPropertyDescriptor,YV=Object.prototype.propertyIsEnumerable,ZV=Object.getOwnPropertySymbols,M1=Object.prototype.hasOwnProperty;function YO(t){for(var n=Object.keys(t),i=ZV(t),l=0;l<i.length;l++)YV.call(t,i[l])&&n.push(i[l]);return n}function WV(t,n){var i;return!(!((i=XV(t,n))===null||i===void 0)&&i.writable)}function bD(t,n){if((t===void 0?"undefined":Tm(t))==="object"&&t!==null){var i;if(xD(t))i=[];else if(_m(t)==="[object Date]")i=new Date(t.getTime?t.getTime():t);else if((function(N){return _m(N)==="[object RegExp]"})(t))i=new RegExp(t);else if((function(N){return _m(N)==="[object Error]"})(t))i={message:t.message};else if((function(N){return _m(N)==="[object Boolean]"})(t)||(function(N){return _m(N)==="[object Number]"})(t)||(function(N){return _m(N)==="[object String]"})(t))i=Object(t);else{if(vD(t))return t.slice();i=Object.create(Object.getPrototypeOf(t))}var l=n.includeSymbols?YO:Object.keys,h=!0,v=!1,x=void 0;try{for(var w,C=l(t)[Symbol.iterator]();!(h=(w=C.next()).done);h=!0){var $=w.value;i[$]=t[$]}}catch(N){v=!0,x=N}finally{try{h||C.return==null||C.return()}finally{if(v)throw x}}return i}return t}var ia,Ad,wD={includeSymbols:!1,immutable:!1};function SD(t,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:wD,l=[],h=[],v=!0,x=i.includeSymbols?YO:Object.keys,w=!!i.immutable;return(function C($){var N=w?bD($,i):$,_={},F=!0,U={node:N,node_:$,path:[].concat(l),parent:h[h.length-1],parents:h,key:l[l.length-1],isRoot:l.length===0,level:l.length,circular:void 0,isLeaf:!1,notLeaf:!0,notRoot:!0,isFirst:!1,isLast:!1,update:function(me){var Me=arguments.length>1&&arguments[1]!==void 0&&arguments[1];U.isRoot||(U.parent.node[U.key]=me),U.node=me,Me&&(F=!1)},delete:function(me){delete U.parent.node[U.key],me&&(F=!1)},remove:function(me){xD(U.parent.node)?U.parent.node.splice(U.key,1):delete U.parent.node[U.key],me&&(F=!1)},keys:null,before:function(me){_.before=me},after:function(me){_.after=me},pre:function(me){_.pre=me},post:function(me){_.post=me},stop:function(){v=!1},block:function(){F=!1}};if(!v)return U;function J(){if(Tm(U.node)==="object"&&U.node!==null){U.keys&&U.node_===U.node||(U.keys=x(U.node)),U.isLeaf=U.keys.length===0;for(var me=0;me<h.length;me++)if(h[me].node_===$){U.circular=h[me];break}}else U.isLeaf=!0,U.keys=null;U.notLeaf=!U.isLeaf,U.notRoot=!U.isRoot}J();var Y=n.call(U,U.node);if(Y!==void 0&&U.update&&U.update(Y),_.before&&_.before.call(U,U.node),!F)return U;if(Tm(U.node)==="object"&&U.node!==null&&!U.circular){var Z;h.push(U),J();var P=!0,se=!1,ae=void 0;try{for(var he,ge=Object.entries((Z=U.keys)!==null&&Z!==void 0?Z:[])[Symbol.iterator]();!(P=(he=ge.next()).done);P=!0){var pe,Te=GV(he.value,2),Ae=Te[0],qe=Te[1];l.push(qe),_.pre&&_.pre.call(U,U.node[qe],qe);var Se=C(U.node[qe]);w&&M1.call(U.node,qe)&&!WV(U.node,qe)&&(U.node[qe]=Se.node),Se.isLast=!!(!((pe=U.keys)===null||pe===void 0)&&pe.length)&&+Ae==U.keys.length-1,Se.isFirst=+Ae==0,_.post&&_.post.call(U,Se),l.pop()}}catch(me){se=!0,ae=me}finally{try{P||ge.return==null||ge.return()}finally{if(se)throw ae}}h.pop()}return _.after&&_.after.call(U,U.node),U})(t).node}var Kl=(function(){function t(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:wD;(function(l,h){if(!(l instanceof h))throw new TypeError("Cannot call a class as a function")})(this,t),yD(this,ia),yD(this,Ad),XO(this,ia,n),XO(this,Ad,i)}return(function(n,i){i&&(function(l,h){for(var v=0;v<h.length;v++){var x=h[v];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(l,x.key,x)}})(n.prototype,i)})(t,[{key:"get",value:function(n){for(var i=_i(this,ia),l=0;i&&l<n.length;l++){var h=n[l];if(!M1.call(i,h)||!_i(this,Ad).includeSymbols&&(h===void 0?"undefined":Tm(h))==="symbol")return;i=i[h]}return i}},{key:"has",value:function(n){for(var i=_i(this,ia),l=0;i&&l<n.length;l++){var h=n[l];if(!M1.call(i,h)||!_i(this,Ad).includeSymbols&&(h===void 0?"undefined":Tm(h))==="symbol")return!1;i=i[h]}return!0}},{key:"set",value:function(n,i){var l=_i(this,ia),h=0;for(h=0;h<n.length-1;h++){var v=n[h];M1.call(l,v)||(l[v]={}),l=l[v]}return l[n[h]]=i,i}},{key:"map",value:function(n){return SD(_i(this,ia),n,{immutable:!0,includeSymbols:!!_i(this,Ad).includeSymbols})}},{key:"forEach",value:function(n){return XO(this,ia,SD(_i(this,ia),n,_i(this,Ad))),_i(this,ia)}},{key:"reduce",value:function(n,i){var l=arguments.length===1,h=l?_i(this,ia):i;return this.forEach((function(v){this.isRoot&&l||(h=n.call(this,h,v))})),h}},{key:"paths",value:function(){var n=[];return this.forEach((function(){n.push(this.path)})),n}},{key:"nodes",value:function(){var n=[];return this.forEach((function(){n.push(this.node)})),n}},{key:"clone",value:function(){var n=[],i=[],l=_i(this,Ad);return vD(_i(this,ia))?_i(this,ia).slice():(function h(v){for(var x=0;x<n.length;x++)if(n[x]===v)return i[x];if((v===void 0?"undefined":Tm(v))==="object"&&v!==null){var w=bD(v,l);n.push(v),i.push(w);var C=l.includeSymbols?YO:Object.keys,$=!0,N=!1,_=void 0;try{for(var F,U=C(v)[Symbol.iterator]();!($=(F=U.next()).done);$=!0){var J=F.value;w[J]=h(v[J])}}catch(Y){N=!0,_=Y}finally{try{$||U.return==null||U.return()}finally{if(N)throw _}}return n.pop(),i.pop(),w}return v})(_i(this,ia))}}]),t})();ia=new WeakMap,Ad=new WeakMap;var Vl=function(t,n){return new Kl(t,n)};Vl.get=function(t,n,i){return new Kl(t,i).get(n)},Vl.set=function(t,n,i,l){return new Kl(t,l).set(n,i)},Vl.has=function(t,n,i){return new Kl(t,i).has(n)},Vl.map=function(t,n,i){return new Kl(t,i).map(n)},Vl.forEach=function(t,n,i){return new Kl(t,i).forEach(n)},Vl.reduce=function(t,n,i,l){return new Kl(t,l).reduce(n,i)},Vl.paths=function(t,n){return new Kl(t,n).paths()},Vl.nodes=function(t,n){return new Kl(t,n).nodes()},Vl.clone=function(t,n){return new Kl(t,n).clone()};var JV=Vl;const QV=["properties"],e7=["properties"],t7=["definitions","parameters","responses","securityDefinitions","components/schemas","components/responses","components/parameters","components/securitySchemes"],n7=["schema/example","items/example"];function ED(t){const n=t[t.length-1],i=t[t.length-2],l=t.join("/");return QV.indexOf(n)>-1&&e7.indexOf(i)===-1||t7.indexOf(l)>-1||n7.some((h=>l.indexOf(h)>-1))}function ZO(t,n){const[i,l]=t.split("#"),h=n??"",v=i??"";let x;if(c1(h))x=$s(h,v);else{const w=$s("https://swagger.io",h),C=$s(w,v).replace("https://swagger.io","");x=v.startsWith("/")?C:C.substring(1)}return l?`${x}#${l}`:x}const r7=/^([a-z]+:\/\/|\/\/)/i;class $m extends Oa{}const ru={},jD=new WeakMap,s7=[t=>t[0]==="paths"&&t[3]==="responses"&&t[5]==="examples",t=>t[0]==="paths"&&t[3]==="responses"&&t[5]==="content"&&t[7]==="example",t=>t[0]==="paths"&&t[3]==="responses"&&t[5]==="content"&&t[7]==="examples"&&t[9]==="value",t=>t[0]==="paths"&&t[3]==="requestBody"&&t[4]==="content"&&t[6]==="example",t=>t[0]==="paths"&&t[3]==="requestBody"&&t[4]==="content"&&t[6]==="examples"&&t[8]==="value",t=>t[0]==="paths"&&t[2]==="parameters"&&t[4]==="example",t=>t[0]==="paths"&&t[3]==="parameters"&&t[5]==="example",t=>t[0]==="paths"&&t[2]==="parameters"&&t[4]==="examples"&&t[6]==="value",t=>t[0]==="paths"&&t[3]==="parameters"&&t[5]==="examples"&&t[7]==="value",t=>t[0]==="paths"&&t[2]==="parameters"&&t[4]==="content"&&t[6]==="example",t=>t[0]==="paths"&&t[2]==="parameters"&&t[4]==="content"&&t[6]==="examples"&&t[8]==="value",t=>t[0]==="paths"&&t[3]==="parameters"&&t[4]==="content"&&t[7]==="example",t=>t[0]==="paths"&&t[3]==="parameters"&&t[5]==="content"&&t[7]==="examples"&&t[9]==="value"],i7={key:"$ref",plugin:(t,n,i,l)=>{const h=l.getInstance(),v=i.slice(0,-1);if(ED(v)||(Y=>s7.some((Z=>Z(Y))))(v))return;const{baseDoc:x}=l.getContext(i);if(typeof t!="string")return new $m("$ref: must be a string (JSON-Ref)",{$ref:t,baseDoc:x,fullPath:i});const w=AD(t),C=w[0],$=w[1]||"";let N,_,F;try{N=x||C?CD(C,x):null}catch(Y){return JO(Y,{pointer:$,$ref:t,basePath:N,fullPath:i})}if((function(Y,Z,P,se){let ae=jD.get(se);ae||(ae={},jD.set(se,ae));const he=(function(qe){return qe.length===0?"":`/${qe.map(TD).join("/")}`})(P),ge=`${Z||"<specmap-base>"}#${Y}`,pe=he.replace(/allOf\/\d+\/?/g,"");if(Z===se.contextTree.get([]).baseDoc&&tk(pe,Y))return!0;let Te="";if(P.some((qe=>(Te=`${Te}/${TD(qe)}`,ae[Te]&&ae[Te].some((Se=>tk(Se,ge)||tk(ge,Se)))))))return!0;ae[pe]=(ae[pe]||[]).concat(ge)})($,N,v,l)&&!h.useCircularStructures){const Y=ZO(t,N);return t===Y?null:qn.replace(i,Y)}if(N==null?(F=ek($),_=l.get(F),_===void 0&&(_=new $m(`Could not resolve reference: ${t}`,{pointer:$,$ref:t,baseDoc:x,fullPath:i}))):(_=OD(N,$),_=_.l!=null?_.l:_.catch((Y=>{throw JO(Y,{pointer:$,$ref:t,baseDoc:x,fullPath:i})}))),_ instanceof Error)return[qn.remove(i),_];const U=ZO(t,N),J=qn.replace(v,_,{$$ref:U});if(N&&N!==x)return[J,qn.context(v,{baseDoc:N})];try{if(!(function(Y,Z){const P=[Y];return Z.path.reduce(((se,ae)=>(P.push(se[ae]),se[ae])),Y),(function se(ae){return qn.isObject(ae)&&(P.indexOf(ae)>=0||Object.keys(ae).some((he=>se(ae[he]))))})(Z.value)})(l.state,J)||h.useCircularStructures)return J}catch{return null}}},WO=Object.assign(i7,{docCache:ru,absoluteify:CD,clearCache:function(t){t!==void 0?delete ru[t]:Object.keys(ru).forEach((n=>{delete ru[n]}))},JSONRefError:$m,wrapError:JO,getDoc:kD,split:AD,extractFromDoc:OD,fetchJSON:function(t){return fetch(t,{headers:{Accept:"application/json, application/yaml"},loadSpec:!0}).then((n=>n.text())).then((n=>qu.load(n)))},extract:QO,jsonPointerToArray:ek,unescapeJsonPointerToken:RD});function CD(t,n){if(!r7.test(t)){if(!n)throw new $m(`Tried to resolve a relative URL, without having a basePath. path: '${t}' basePath: '${n}'`);return $s(n,t)}return t}function JO(t,n){let i;return i=t&&t.response&&t.response.body?`${t.response.body.code} ${t.response.body.message}`:t.message,new $m(`Could not resolve reference: ${i}`,{...n,cause:t})}function AD(t){return(t+"").split("#")}function OD(t,n){const i=ru[t];if(i&&!qn.isPromise(i))try{const l=QO(n,i);return Object.assign(Promise.resolve(l),{l})}catch(l){return Promise.reject(l)}return kD(t).then((l=>QO(n,l)))}function kD(t){const n=ru[t];return n?qn.isPromise(n)?n:Promise.resolve(n):(ru[t]=WO.fetchJSON(t).then((i=>(ru[t]=i,i))),ru[t])}function QO(t,n){const i=ek(t);if(i.length<1)return n;const l=qn.getIn(n,i);if(l===void 0)throw new $m(`Could not resolve pointer: ${t} does not exist in document`,{pointer:t});return l}function ek(t){if(typeof t!="string")throw new TypeError("Expected a string, got a "+typeof t);return t[0]==="/"&&(t=t.substr(1)),t===""?[]:t.split("/").map(RD)}function RD(t){return typeof t!="string"?t:new URLSearchParams(`=${t.replace(/~1/g,"/").replace(/~0/g,"~")}`).get("")}function TD(t){return new URLSearchParams([["",t.replace(/~/g,"~0").replace(/\//g,"~1")]]).toString().slice(1)}function tk(t,n){if(!(i=n)||i==="/"||i==="#")return!0;var i;const l=t.charAt(n.length),h=n.slice(-1);return t.indexOf(n)===0&&(!l||l==="/"||l==="#")&&h!=="#"}const a7={key:"allOf",plugin:(t,n,i,l,h)=>{if(h.meta&&h.meta.$$ref)return;const v=i.slice(0,-1);if(ED(v))return;if(!Array.isArray(t)){const $=new TypeError("allOf must be an array");return $.fullPath=i,$}let x=!1,w=h.value;if(v.forEach(($=>{w&&(w=w[$])})),w={...w},Object.keys(w).length===0)return;delete w.allOf;const C=[];return C.push(l.replace(v,{})),t.forEach((($,N)=>{if(!l.isObject($)){if(x)return null;x=!0;const F=new TypeError("Elements in allOf must be objects");return F.fullPath=i,C.push(F)}C.push(l.mergeDeep(v,$));const _=(function(F,U,{specmap:J,getBaseUrlForNodePath:Y=P=>J.getContext([...U,...P]).baseDoc,targetKeys:Z=["$ref","$$ref"]}={}){const P=[];return JV(F).forEach((function(){if(Z.includes(this.key)&&typeof this.node=="string"){const se=this.path,ae=U.concat(this.path),he=ZO(this.node,Y(se));P.push(J.replace(ae,he))}})),P})($,i.slice(0,-1),{getBaseUrlForNodePath:F=>l.getContext([...i,N,...F]).baseDoc,specmap:l});C.push(..._)})),w.example&&C.push(l.remove([].concat(v,"example"))),C.push(l.mergeDeep(v,w)),w.$$ref||C.push(l.remove([].concat(v,"$$ref"))),C}},o7={key:"parameters",plugin:(t,n,i,l)=>{if(Array.isArray(t)&&t.length){const h=Object.assign([],t),v=i.slice(0,-1),x={...qn.getIn(l.spec,v)};for(let w=0;w<t.length;w+=1){const C=t[w];try{h[w].default=l.parameterMacro(x,C)}catch($){const N=new Error($);return N.fullPath=i,N}}return qn.replace(i,h)}return qn.replace(i,t)}},l7={key:"properties",plugin:(t,n,i,l)=>{const h={...t};for(const v in t)try{h[v].default=l.modelPropertyMacro(h[v])}catch(x){const w=new Error(x);return w.fullPath=i,w}return qn.replace(i,h)}};class c7{constructor(n){this.root=nk(n||{})}set(n,i){const l=this.getParent(n,!0);if(!l)return void I1(this.root,i,null);const h=n[n.length-1],{children:v}=l;v[h]?I1(v[h],i,l):v[h]=nk(i,l)}get(n){if((n=n||[]).length<1)return this.root.value;let i,l,h=this.root;for(let v=0;v<n.length&&(l=n[v],i=h.children,i[l]);v+=1)h=i[l];return h&&h.protoValue}getParent(n,i){return!n||n.length<1?null:n.length<2?this.root:n.slice(0,-1).reduce(((l,h)=>{if(!l)return l;const{children:v}=l;return!v[h]&&i&&(v[h]=nk(null,l)),v[h]}),this.root)}}function nk(t,n){return I1({children:{}},t,n)}function I1(t,n,i){return t.value=n||{},t.protoValue=i?{...i.protoValue,...t.value}:t.value,Object.keys(t.children).forEach((l=>{const h=t.children[l];t.children[l]=I1(h,h.value,t)})),t}const _D=()=>{};class u7{static getPluginName(n){return n.pluginName}static getPatchesOfType(n,i){return n.filter(i)}constructor(n){Object.assign(this,{spec:"",debugLevel:"info",plugins:[],pluginHistory:{},errors:[],mutations:[],promisedPatches:[],state:{},patches:[],context:{},contextTree:new c7,showDebug:!1,allPatches:[],pluginProp:"specMap",libMethods:Object.assign(Object.create(this),qn,{getInstance:()=>this}),allowMetaPatches:!1},n),this.get=this._get.bind(this),this.getContext=this._getContext.bind(this),this.hasRun=this._hasRun.bind(this),this.wrappedPlugins=this.plugins.map(this.wrapPlugin.bind(this)).filter(qn.isFunction),this.patches.push(qn.add([],this.spec)),this.patches.push(qn.context([],this.context)),this.updatePatches(this.patches)}debug(n,...i){this.debugLevel===n&&console.log(...i)}verbose(n,...i){this.debugLevel==="verbose"&&console.log(`[${n}] `,...i)}wrapPlugin(n,i){const{pathDiscriminator:l}=this;let h,v=null;return n[this.pluginProp]?(v=n,h=n[this.pluginProp]):qn.isFunction(n)?h=n:qn.isObject(n)&&(h=(function(x){const w=(C,$)=>!Array.isArray(C)||C.every(((N,_)=>N===$[_]));return function*(C,$){const N={};for(const[F,U]of C.filter(qn.isAdditiveMutation).entries()){if(!(F<3e3))return;yield*_(U.value,U.path,U)}function*_(F,U,J){if(qn.isObject(F)){const Y=U.length-1,Z=U[Y],P=U.indexOf("properties"),se=Z==="properties"&&Y===P,ae=$.allowMetaPatches&&N[F.$$ref];for(const he of Object.keys(F)){const ge=F[he],pe=U.concat(he),Te=qn.isObject(ge),Ae=F.$$ref;if(ae||Te&&($.allowMetaPatches&&Ae&&(N[Ae]=!0),yield*_(ge,pe,J)),!se&&he===x.key){const qe=w(l,U);l&&!qe||(yield x.plugin(ge,he,pe,$,J))}}}else x.key===U[U.length-1]&&(yield x.plugin(F,x.key,U,$))}}})(n)),Object.assign(h.bind(v),{pluginName:n.name||i,isGenerator:qn.isGenerator(h)})}nextPlugin(){return this.wrappedPlugins.find((n=>this.getMutationsForPlugin(n).length>0))}nextPromisedPatch(){if(this.promisedPatches.length>0)return Promise.race(this.promisedPatches.map((n=>n.value)))}getPluginHistory(n){const i=this.constructor.getPluginName(n);return this.pluginHistory[i]||[]}getPluginRunCount(n){return this.getPluginHistory(n).length}getPluginHistoryTip(n){const i=this.getPluginHistory(n);return i&&i[i.length-1]||{}}getPluginMutationIndex(n){const i=this.getPluginHistoryTip(n).mutationIndex;return typeof i!="number"?-1:i}updatePluginHistory(n,i){const l=this.constructor.getPluginName(n);this.pluginHistory[l]=this.pluginHistory[l]||[],this.pluginHistory[l].push(i)}updatePatches(n){qn.normalizeArray(n).forEach((i=>{if(i instanceof Error)this.errors.push(i);else try{if(!qn.isObject(i))return void this.debug("updatePatches","Got a non-object patch",i);if(this.showDebug&&this.allPatches.push(i),qn.isPromise(i.value))return this.promisedPatches.push(i),void this.promisedPatchThen(i);if(qn.isContextPatch(i))return void this.setContext(i.path,i.value);qn.isMutation(i)&&this.updateMutations(i)}catch(l){console.error(l),this.errors.push(l)}}))}updateMutations(n){typeof n.value=="object"&&!Array.isArray(n.value)&&this.allowMetaPatches&&(n.value={...n.value});const i=qn.applyPatch(this.state,n,{allowMetaPatches:this.allowMetaPatches});i&&(this.mutations.push(n),this.state=i)}removePromisedPatch(n){const i=this.promisedPatches.indexOf(n);i<0?this.debug("Tried to remove a promisedPatch that isn't there!"):this.promisedPatches.splice(i,1)}promisedPatchThen(n){return n.value=n.value.then((i=>{const l={...n,value:i};this.removePromisedPatch(n),this.updatePatches(l)})).catch((i=>{this.removePromisedPatch(n),this.updatePatches(i)})),n.value}getMutations(n,i){return n=n||0,typeof i!="number"&&(i=this.mutations.length),this.mutations.slice(n,i)}getCurrentMutations(){return this.getMutationsForPlugin(this.getCurrentPlugin())}getMutationsForPlugin(n){const i=this.getPluginMutationIndex(n);return this.getMutations(i+1)}getCurrentPlugin(){return this.currentPlugin}getLib(){return this.libMethods}_get(n){return qn.getIn(this.state,n)}_getContext(n){return this.contextTree.get(n)}setContext(n,i){return this.contextTree.set(n,i)}_hasRun(n){return this.getPluginRunCount(this.getCurrentPlugin())>(n||0)}dispatch(){const n=this,i=this.nextPlugin();if(!i){const h=this.nextPromisedPatch();if(h)return h.then((()=>this.dispatch())).catch((()=>this.dispatch()));const v={spec:this.state,errors:this.errors};return this.showDebug&&(v.patches=this.allPatches),Promise.resolve(v)}if(n.pluginCount=n.pluginCount||new WeakMap,n.pluginCount.set(i,(n.pluginCount.get(i)||0)+1),n.pluginCount[i]>100)return Promise.resolve({spec:n.state,errors:n.errors.concat(new Error("We've reached a hard limit of 100 plugin runs"))});if(i!==this.currentPlugin&&this.promisedPatches.length){const h=this.promisedPatches.map((v=>v.value));return Promise.all(h.map((v=>v.then(_D,_D)))).then((()=>this.dispatch()))}return(function(){n.currentPlugin=i;const h=n.getCurrentMutations(),v=n.mutations.length-1;try{if(i.isGenerator)for(const x of i(h,n.getLib()))l(x);else l(i(h,n.getLib()))}catch(x){console.error(x),l([Object.assign(Object.create(x),{plugin:i})])}finally{n.updatePluginHistory(i,{mutationIndex:v})}return n.dispatch()})();function l(h){h&&(h=qn.fullyNormalizeArray(h),n.updatePatches(h,i))}}}const sp={refs:WO,allOf:a7,parameters:o7,properties:l7};async function rk(t){const{spec:n,mode:i,allowMetaPatches:l=!0,pathDiscriminator:h,modelPropertyMacro:v,parameterMacro:x,requestInterceptor:w,responseInterceptor:C,skipNormalization:$=!1,useCircularStructures:N,strategies:_}=t,F=Bu(t),U=gl(t),J=_.find((Y=>Y.match(n)));return(async function(Y){F&&(sp.refs.docCache[F]=Y),sp.refs.fetchJSON=cy(U,{requestInterceptor:w,responseInterceptor:C});const Z=[sp.refs];typeof x=="function"&&Z.push(sp.parameters),typeof v=="function"&&Z.push(sp.properties),i!=="strict"&&Z.push(sp.allOf);const P=await(se={spec:Y,context:{baseDoc:F},plugins:Z,allowMetaPatches:l,pathDiscriminator:h,parameterMacro:x,modelPropertyMacro:v,useCircularStructures:N},new u7(se).dispatch());var se;return $||(P.spec=J.normalize(P.spec)),P})(n)}const $D=t=>t.replace(/\W/gi,"_");function Ex(t,n,i="",{v2OperationIdCompatibilityMode:l}={}){return t&&typeof t=="object"?(t.operationId||"").replace(/\s/g,"").length?$D(t.operationId):(function(h,v,{v2OperationIdCompatibilityMode:x}={}){if(x){let w=`${v.toLowerCase()}_${h}`.replace(/[\s!@#$%^&*()_+=[{\]};:<>|./?,\\'""-]/g,"_");return w=w||`${h.substring(1)}_${v}`,w.replace(/((_){2,})/g,"_").replace(/^(_)*/g,"").replace(/([_])*$/g,"")}return`${v.toLowerCase()}${$D(h)}`})(n,i,{v2OperationIdCompatibilityMode:l}):null}function sk(t){const{spec:n}=t,{paths:i}=n,l={};if(!i||n.$$normalized)return t;for(const h in i){const v=i[h];if(v==null||!["object","function"].includes(typeof v))continue;const x=v.parameters;for(const w in v){const C=v[w];if(C==null||!["object","function"].includes(typeof C))continue;const $=Ex(C,h,w);if($){l[$]?l[$].push(C):l[$]=[C];const N=l[$];if(N.length>1)N.forEach(((_,F)=>{_.h=_.h||_.operationId,_.operationId=`${$}${F+1}`}));else if(C.operationId!==void 0){const _=N[0];_.h=_.h||C.operationId,_.operationId=$}}if(w!=="parameters"){const N=[],_={};for(const F in n)F!=="produces"&&F!=="consumes"&&F!=="security"||(_[F]=n[F],N.push(_));if(x&&(_.parameters=x,N.push(_)),N.length)for(const F of N)for(const U in F)if(C[U]){if(U==="parameters")for(const J of F[U])C[U].some((Y=>Y.name&&Y.name===J.name||Y.$ref&&Y.$ref===J.$ref||Y.$$ref&&Y.$$ref===J.$$ref||Y===J))||C[U].push(J)}else C[U]=F[U]}}}return n.$$normalized=!0,t}const ND={name:"generic",match:()=>!0,normalize(t){const{spec:n}=sk({spec:t});return n},resolve:async t=>rk(t)},DD=t=>{try{const{swagger:n}=t;return n==="2.0"}catch{return!1}},PD=t=>{try{const{openapi:n}=t;return typeof n=="string"&&/^3\.0\.([0123])(?:-rc[012])?$/.test(n)}catch{return!1}},ik=t=>{try{const{openapi:n}=t;return typeof n=="string"&&/^3\.1\.(?:[1-9]\d*|0)$/.test(n)}catch{return!1}},ak=t=>PD(t)||ik(t),MD={name:"openapi-2",match:t=>DD(t),normalize(t){const{spec:n}=sk({spec:t});return n},resolve:async t=>(async function(n){return rk(n)})(t)},ID={name:"openapi-3-0",match:t=>PD(t),normalize(t){const{spec:n}=sk({spec:t});return n},resolve:async t=>(async function(n){return rk(n)})(t)},zD=t=>async n=>(async i=>{const{spec:l,requestInterceptor:h,responseInterceptor:v}=i,x=Bu(i),w=gl(i),C=l||await cy(w,{requestInterceptor:h,responseInterceptor:v})(x),$={...i,spec:C};return i.strategies.find((N=>N.match(C))).resolve($)})({...t,...n}),d7=zD({strategies:[ID,MD,ND]});class ok extends Oa{}class lk extends ok{pointer;constructor(n,i){super(n,i),i!==void 0&&(this.pointer=i.pointer)}}class h7 extends ok{tokens;constructor(n,i){super(n,i),i!==void 0&&(this.tokens=[...i.tokens])}}class jx extends ok{pointer;tokens;failedToken;failedTokenPosition;element;constructor(n,i){super(n,i),i!==void 0&&(this.pointer=i.pointer,Array.isArray(i.tokens)&&(this.tokens=[...i.tokens]),this.failedToken=i.failedToken,this.failedTokenPosition=i.failedTokenPosition,this.element=i.element)}}const p7=Ls(mm(/~/g,"~0"),mm(/\//g,"~1"),encodeURIComponent),f7=Ls(mm(/~1/g,"/"),mm(/~0/g,"~"),(t=>{try{return decodeURIComponent(t)}catch{return t}})),Ja=t=>{const n=(i=>{const l=i.indexOf("#");return l!==-1?i.substring(l):"#"})(t);return hO("#",n)},LD=t=>{try{return t.length===0?"":`/${t.map(p7).join("/")}`}catch(n){throw new h7("JSON Pointer compilation of tokens encountered an error.",{tokens:t,cause:n})}},qo=(t,n)=>{let i;try{i=(l=>{if(F$(l))return[];if(!P$("/",l))throw new lk(`Invalid JSON Pointer "${l}". JSON Pointers must begin with "/"`,{pointer:l});try{const h=Ls(lO("/"),ix(f7))(l);return C$(h)}catch(h){throw new lk(`JSON Pointer parsing of "${l}" encountered an error.`,{pointer:l,cause:h})}})(t)}catch(l){throw new jx(`JSON Pointer evaluation failed while parsing the pointer "${t}".`,{pointer:t,element:Ct(n),cause:l})}return i.reduce(((l,h,v)=>{if(Un(l)){if(!l.hasKey(h))throw new jx(`JSON Pointer evaluation failed while evaluating token "${h}" against an ObjectElement`,{pointer:t,tokens:i,failedToken:h,failedTokenPosition:v,element:Ct(l)});return l.get(h)}if(Ri(l)){if(!(h in l.content)||!OU(Number(h)))throw new jx(`JSON Pointer evaluation failed while evaluating token "${h}" against an ArrayElement`,{pointer:t,tokens:i,failedToken:h,failedTokenPosition:v,element:Ct(l)});return l.get(Number(h))}throw new jx(`JSON Pointer evaluation failed while evaluating token "${h}" against an unexpected Element`,{pointer:t,tokens:i,failedToken:h,failedTokenPosition:v,element:Ct(l)})}),n)};class ck extends LV{filterByFormat(n="generic"){const i=n==="generic"?"openapi;version":n;return this.filter((l=>l.includes(i)))}findBy(n="3.1.0",i="generic"){const l=i==="generic"?`vnd.oai.openapi;version=${n}`:`vnd.oai.openapi+${i};version=${n}`;return this.find((h=>h.includes(l)))||this.unknownMediaType}latest(n="generic"){return t1(this.filterByFormat(n))}}const Nm=new ck("application/vnd.oai.openapi;version=3.1.0","application/vnd.oai.openapi+json;version=3.1.0","application/vnd.oai.openapi+yaml;version=3.1.0");let Cx=class extends St{constructor(t,n,i){super(t,n,i),this.element="callback"}},Ax=class extends St{constructor(t,n,i){super(t,n,i),this.element="components"}get schemas(){return this.get("schemas")}set schemas(t){this.set("schemas",t)}get responses(){return this.get("responses")}set responses(t){this.set("responses",t)}get parameters(){return this.get("parameters")}set parameters(t){this.set("parameters",t)}get examples(){return this.get("examples")}set examples(t){this.set("examples",t)}get requestBodies(){return this.get("requestBodies")}set requestBodies(t){this.set("requestBodies",t)}get headers(){return this.get("headers")}set headers(t){this.set("headers",t)}get securitySchemes(){return this.get("securitySchemes")}set securitySchemes(t){this.set("securitySchemes",t)}get links(){return this.get("links")}set links(t){this.set("links",t)}get callbacks(){return this.get("callbacks")}set callbacks(t){this.set("callbacks",t)}},Ox=class extends St{constructor(t,n,i){super(t,n,i),this.element="contact"}get name(){return this.get("name")}set name(t){this.set("name",t)}get url(){return this.get("url")}set url(t){this.set("url",t)}get email(){return this.get("email")}set email(t){this.set("email",t)}},z1=class extends St{constructor(t,n,i){super(t,n,i),this.element="discriminator"}get propertyName(){return this.get("propertyName")}set propertyName(t){this.set("propertyName",t)}get mapping(){return this.get("mapping")}set mapping(t){this.set("mapping",t)}},L1=class extends St{constructor(t,n,i){super(t,n,i),this.element="encoding"}get contentType(){return this.get("contentType")}set contentType(t){this.set("contentType",t)}get headers(){return this.get("headers")}set headers(t){this.set("headers",t)}get style(){return this.get("style")}set style(t){this.set("style",t)}get explode(){return this.get("explode")}set explode(t){this.set("explode",t)}get allowedReserved(){return this.get("allowedReserved")}set allowedReserved(t){this.set("allowedReserved",t)}},kx=class extends St{constructor(t,n,i){super(t,n,i),this.element="example"}get summary(){return this.get("summary")}set summary(t){this.set("summary",t)}get description(){return this.get("description")}set description(t){this.set("description",t)}get value(){return this.get("value")}set value(t){this.set("value",t)}get externalValue(){return this.get("externalValue")}set externalValue(t){this.set("externalValue",t)}},Rx=class extends St{constructor(t,n,i){super(t,n,i),this.element="externalDocumentation"}get description(){return this.get("description")}set description(t){this.set("description",t)}get url(){return this.get("url")}set url(t){this.set("url",t)}},Dm=class extends St{constructor(t,n,i){super(t,n,i),this.element="header"}get required(){return this.hasKey("required")?this.get("required"):new Qc(!1)}set required(t){this.set("required",t)}get deprecated(){return this.hasKey("deprecated")?this.get("deprecated"):new Qc(!1)}set deprecated(t){this.set("deprecated",t)}get allowEmptyValue(){return this.get("allowEmptyValue")}set allowEmptyValue(t){this.set("allowEmptyValue",t)}get style(){return this.get("style")}set style(t){this.set("style",t)}get explode(){return this.get("explode")}set explode(t){this.set("explode",t)}get allowReserved(){return this.get("allowReserved")}set allowReserved(t){this.set("allowReserved",t)}get schema(){return this.get("schema")}set schema(t){this.set("schema",t)}get example(){return this.get("example")}set example(t){this.set("example",t)}get examples(){return this.get("examples")}set examples(t){this.set("examples",t)}get contentProp(){return this.get("content")}set contentProp(t){this.set("content",t)}};Object.defineProperty(Dm.prototype,"description",{get(){return this.get("description")},set(t){this.set("description",t)},enumerable:!0});let Tx=class extends St{constructor(t,n,i){super(t,n,i),this.element="info",this.classes.push("info")}get title(){return this.get("title")}set title(t){this.set("title",t)}get description(){return this.get("description")}set description(t){this.set("description",t)}get termsOfService(){return this.get("termsOfService")}set termsOfService(t){this.set("termsOfService",t)}get contact(){return this.get("contact")}set contact(t){this.set("contact",t)}get license(){return this.get("license")}set license(t){this.set("license",t)}get version(){return this.get("version")}set version(t){this.set("version",t)}},_x=class extends St{constructor(t,n,i){super(t,n,i),this.element="license"}get name(){return this.get("name")}set name(t){this.set("name",t)}get url(){return this.get("url")}set url(t){this.set("url",t)}},$x=class extends St{constructor(t,n,i){super(t,n,i),this.element="link"}get operationRef(){return this.get("operationRef")}set operationRef(t){this.set("operationRef",t)}get operationId(){return this.get("operationId")}set operationId(t){this.set("operationId",t)}get operation(){var t,n;return xn(this.operationRef)?(t=this.operationRef)===null||t===void 0?void 0:t.meta.get("operation"):xn(this.operationId)?(n=this.operationId)===null||n===void 0?void 0:n.meta.get("operation"):void 0}set operation(t){this.set("operation",t)}get parameters(){return this.get("parameters")}set parameters(t){this.set("parameters",t)}get requestBody(){return this.get("requestBody")}set requestBody(t){this.set("requestBody",t)}get description(){return this.get("description")}set description(t){this.set("description",t)}get server(){return this.get("server")}set server(t){this.set("server",t)}},Nx=class extends St{constructor(t,n,i){super(t,n,i),this.element="mediaType"}get schema(){return this.get("schema")}set schema(t){this.set("schema",t)}get example(){return this.get("example")}set example(t){this.set("example",t)}get examples(){return this.get("examples")}set examples(t){this.set("examples",t)}get encoding(){return this.get("encoding")}set encoding(t){this.set("encoding",t)}},F1=class extends St{constructor(t,n,i){super(t,n,i),this.element="oAuthFlow"}get authorizationUrl(){return this.get("authorizationUrl")}set authorizationUrl(t){this.set("authorizationUrl",t)}get tokenUrl(){return this.get("tokenUrl")}set tokenUrl(t){this.set("tokenUrl",t)}get refreshUrl(){return this.get("refreshUrl")}set refreshUrl(t){this.set("refreshUrl",t)}get scopes(){return this.get("scopes")}set scopes(t){this.set("scopes",t)}},q1=class extends St{constructor(t,n,i){super(t,n,i),this.element="oAuthFlows"}get implicit(){return this.get("implicit")}set implicit(t){this.set("implicit",t)}get password(){return this.get("password")}set password(t){this.set("password",t)}get clientCredentials(){return this.get("clientCredentials")}set clientCredentials(t){this.set("clientCredentials",t)}get authorizationCode(){return this.get("authorizationCode")}set authorizationCode(t){this.set("authorizationCode",t)}},Dx=class extends Jc{constructor(t,n,i){super(t,n,i),this.element="openapi",this.classes.push("spec-version"),this.classes.push("version")}};class B1 extends St{constructor(n,i,l){super(n,i,l),this.element="openApi3_0",this.classes.push("api")}get openapi(){return this.get("openapi")}set openapi(n){this.set("openapi",n)}get info(){return this.get("info")}set info(n){this.set("info",n)}get servers(){return this.get("servers")}set servers(n){this.set("servers",n)}get paths(){return this.get("paths")}set paths(n){this.set("paths",n)}get components(){return this.get("components")}set components(n){this.set("components",n)}get security(){return this.get("security")}set security(n){this.set("security",n)}get tags(){return this.get("tags")}set tags(n){this.set("tags",n)}get externalDocs(){return this.get("externalDocs")}set externalDocs(n){this.set("externalDocs",n)}}let Px=class extends St{constructor(t,n,i){super(t,n,i),this.element="operation"}get tags(){return this.get("tags")}set tags(t){this.set("tags",t)}get summary(){return this.get("summary")}set summary(t){this.set("summary",t)}get description(){return this.get("description")}set description(t){this.set("description",t)}set externalDocs(t){this.set("externalDocs",t)}get externalDocs(){return this.get("externalDocs")}get operationId(){return this.get("operationId")}set operationId(t){this.set("operationId",t)}get parameters(){return this.get("parameters")}set parameters(t){this.set("parameters",t)}get requestBody(){return this.get("requestBody")}set requestBody(t){this.set("requestBody",t)}get responses(){return this.get("responses")}set responses(t){this.set("responses",t)}get callbacks(){return this.get("callbacks")}set callbacks(t){this.set("callbacks",t)}get deprecated(){return this.hasKey("deprecated")?this.get("deprecated"):new Qc(!1)}set deprecated(t){this.set("deprecated",t)}get security(){return this.get("security")}set security(t){this.set("security",t)}get servers(){return this.get("severs")}set servers(t){this.set("servers",t)}},Pm=class extends St{constructor(t,n,i){super(t,n,i),this.element="parameter"}get name(){return this.get("name")}set name(t){this.set("name",t)}get in(){return this.get("in")}set in(t){this.set("in",t)}get required(){return this.hasKey("required")?this.get("required"):new Qc(!1)}set required(t){this.set("required",t)}get deprecated(){return this.hasKey("deprecated")?this.get("deprecated"):new Qc(!1)}set deprecated(t){this.set("deprecated",t)}get allowEmptyValue(){return this.get("allowEmptyValue")}set allowEmptyValue(t){this.set("allowEmptyValue",t)}get style(){return this.get("style")}set style(t){this.set("style",t)}get explode(){return this.get("explode")}set explode(t){this.set("explode",t)}get allowReserved(){return this.get("allowReserved")}set allowReserved(t){this.set("allowReserved",t)}get schema(){return this.get("schema")}set schema(t){this.set("schema",t)}get example(){return this.get("example")}set example(t){this.set("example",t)}get examples(){return this.get("examples")}set examples(t){this.set("examples",t)}get contentProp(){return this.get("content")}set contentProp(t){this.set("content",t)}};Object.defineProperty(Pm.prototype,"description",{get(){return this.get("description")},set(t){this.set("description",t)},enumerable:!0});let Mx=class extends St{constructor(t,n,i){super(t,n,i),this.element="pathItem"}get $ref(){return this.get("$ref")}set $ref(t){this.set("$ref",t)}get summary(){return this.get("summary")}set summary(t){this.set("summary",t)}get description(){return this.get("description")}set description(t){this.set("description",t)}get GET(){return this.get("get")}set GET(t){this.set("GET",t)}get PUT(){return this.get("put")}set PUT(t){this.set("PUT",t)}get POST(){return this.get("post")}set POST(t){this.set("POST",t)}get DELETE(){return this.get("delete")}set DELETE(t){this.set("DELETE",t)}get OPTIONS(){return this.get("options")}set OPTIONS(t){this.set("OPTIONS",t)}get HEAD(){return this.get("head")}set HEAD(t){this.set("HEAD",t)}get PATCH(){return this.get("patch")}set PATCH(t){this.set("PATCH",t)}get TRACE(){return this.get("trace")}set TRACE(t){this.set("TRACE",t)}get servers(){return this.get("servers")}set servers(t){this.set("servers",t)}get parameters(){return this.get("parameters")}set parameters(t){this.set("parameters",t)}},Ix=class extends St{constructor(t,n,i){super(t,n,i),this.element="paths"}},zx=class extends St{constructor(t,n,i){super(t,n,i),this.element="reference",this.classes.push("openapi-reference")}get $ref(){return this.get("$ref")}set $ref(t){this.set("$ref",t)}},Lx=class extends St{constructor(t,n,i){super(t,n,i),this.element="requestBody"}get description(){return this.get("description")}set description(t){this.set("description",t)}get contentProp(){return this.get("content")}set contentProp(t){this.set("content",t)}get required(){return this.hasKey("required")?this.get("required"):new Qc(!1)}set required(t){this.set("required",t)}},Fx=class extends St{constructor(t,n,i){super(t,n,i),this.element="response"}get description(){return this.get("description")}set description(t){this.set("description",t)}get headers(){return this.get("headers")}set headers(t){this.set("headers",t)}get contentProp(){return this.get("content")}set contentProp(t){this.set("content",t)}get links(){return this.get("links")}set links(t){this.set("links",t)}},qx=class extends St{constructor(t,n,i){super(t,n,i),this.element="responses"}get default(){return this.get("default")}set default(t){this.set("default",t)}};class Bx extends St{constructor(n,i,l){super(n,i,l),this.element="JSONSchemaDraft4"}get idProp(){return this.get("id")}set idProp(n){this.set("id",n)}get $schema(){return this.get("$schema")}set $schema(n){this.set("$schema",n)}get multipleOf(){return this.get("multipleOf")}set multipleOf(n){this.set("multipleOf",n)}get maximum(){return this.get("maximum")}set maximum(n){this.set("maximum",n)}get exclusiveMaximum(){return this.get("exclusiveMaximum")}set exclusiveMaximum(n){this.set("exclusiveMaximum",n)}get minimum(){return this.get("minimum")}set minimum(n){this.set("minimum",n)}get exclusiveMinimum(){return this.get("exclusiveMinimum")}set exclusiveMinimum(n){this.set("exclusiveMinimum",n)}get maxLength(){return this.get("maxLength")}set maxLength(n){this.set("maxLength",n)}get minLength(){return this.get("minLength")}set minLength(n){this.set("minLength",n)}get pattern(){return this.get("pattern")}set pattern(n){this.set("pattern",n)}get additionalItems(){return this.get("additionalItems")}set additionalItems(n){this.set("additionalItems",n)}get items(){return this.get("items")}set items(n){this.set("items",n)}get maxItems(){return this.get("maxItems")}set maxItems(n){this.set("maxItems",n)}get minItems(){return this.get("minItems")}set minItems(n){this.set("minItems",n)}get uniqueItems(){return this.get("uniqueItems")}set uniqueItems(n){this.set("uniqueItems",n)}get maxProperties(){return this.get("maxProperties")}set maxProperties(n){this.set("maxProperties",n)}get minProperties(){return this.get("minProperties")}set minProperties(n){this.set("minProperties",n)}get required(){return this.get("required")}set required(n){this.set("required",n)}get properties(){return this.get("properties")}set properties(n){this.set("properties",n)}get additionalProperties(){return this.get("additionalProperties")}set additionalProperties(n){this.set("additionalProperties",n)}get patternProperties(){return this.get("patternProperties")}set patternProperties(n){this.set("patternProperties",n)}get dependencies(){return this.get("dependencies")}set dependencies(n){this.set("dependencies",n)}get enum(){return this.get("enum")}set enum(n){this.set("enum",n)}get type(){return this.get("type")}set type(n){this.set("type",n)}get allOf(){return this.get("allOf")}set allOf(n){this.set("allOf",n)}get anyOf(){return this.get("anyOf")}set anyOf(n){this.set("anyOf",n)}get oneOf(){return this.get("oneOf")}set oneOf(n){this.set("oneOf",n)}get not(){return this.get("not")}set not(n){this.set("not",n)}get definitions(){return this.get("definitions")}set definitions(n){this.set("definitions",n)}get title(){return this.get("title")}set title(n){this.set("title",n)}get description(){return this.get("description")}set description(n){this.set("description",n)}get default(){return this.get("default")}set default(n){this.set("default",n)}get format(){return this.get("format")}set format(n){this.set("format",n)}get base(){return this.get("base")}set base(n){this.set("base",n)}get links(){return this.get("links")}set links(n){this.set("links",n)}get media(){return this.get("media")}set media(n){this.set("media",n)}get readOnly(){return this.get("readOnly")}set readOnly(n){this.set("readOnly",n)}}class U1 extends St{constructor(n,i,l){super(n,i,l),this.element="JSONReference",this.classes.push("json-reference")}get $ref(){return this.get("$ref")}set $ref(n){this.set("$ref",n)}}class K1 extends St{constructor(n,i,l){super(n,i,l),this.element="media"}get binaryEncoding(){return this.get("binaryEncoding")}set binaryEncoding(n){this.set("binaryEncoding",n)}get type(){return this.get("type")}set type(n){this.set("type",n)}}class V1 extends St{constructor(n,i,l){super(n,i,l),this.element="linkDescription"}get href(){return this.get("href")}set href(n){this.set("href",n)}get rel(){return this.get("rel")}set rel(n){this.set("rel",n)}get title(){return this.get("title")}set title(n){this.set("title",n)}get targetSchema(){return this.get("targetSchema")}set targetSchema(n){this.set("targetSchema",n)}get mediaType(){return this.get("mediaType")}set mediaType(n){this.set("mediaType",n)}get method(){return this.get("method")}set method(n){this.set("method",n)}get encType(){return this.get("encType")}set encType(n){this.set("encType",n)}get schema(){return this.get("schema")}set schema(n){this.set("schema",n)}}const m7={namespace:t=>{const{base:n}=t;return n.register("jSONSchemaDraft4",Bx),n.register("jSONReference",U1),n.register("media",K1),n.register("linkDescription",V1),n}},g7=t=>{if(es(t))return`${t.element.charAt(0).toUpperCase()+t.element.slice(1)}Element`},y7={JSONSchemaDraft4Element:["content"],JSONReferenceElement:["content"],MediaElement:["content"],LinkDescriptionElement:["content"],...Om};let FD=class{element;constructor(t){Object.assign(this,t)}copyMetaAndAttributes(t,n){(t.meta.length>0||n.meta.length>0)&&(n.meta=Ul(n.meta,t.meta),xx(t)&&n.meta.set("sourceMap",t.meta.get("sourceMap"))),(t.attributes.length>0||t.meta.length>0)&&(n.attributes=Ul(n.attributes,t.attributes))}},us=class extends FD{enter(t){return this.element=Ct(t),Gn}};const qD=(t,n,i=[])=>{const l=Object.getOwnPropertyDescriptors(n);for(let h of i)delete l[h];Object.defineProperties(t,l)},Ux=(t,n=[t])=>{const i=Object.getPrototypeOf(t);return i===null?n:Ux(i,[...n,i])},BD=(t,n,i=[])=>{var l;const h=(l=((...w)=>{if(w.length===0)return;let C;const $=w.map((N=>Ux(N)));for(;$.every((N=>N.length>0));){const N=$.map((F=>F.pop())),_=N[0];if(!N.every((F=>F===_)))break;C=_}return C})(...t))!==null&&l!==void 0?l:Object.prototype,v=Object.create(h),x=Ux(h);for(let w of t){let C=Ux(w);for(let $=C.length-1;$>=0;$--){let N=C[$];x.indexOf(N)===-1&&(qD(v,N,["constructor",...i]),x.push(N))}}return v.constructor=n,v},uk=t=>t.filter(((n,i)=>t.indexOf(n)==i)),UD=new WeakMap,v7=t=>UD.get(t),KD=(t,n)=>{var i,l;const h=uk([...Object.getOwnPropertyNames(t),...Object.getOwnPropertyNames(n)]),v={};for(let x of h)v[x]=uk([...(i=t?.[x])!==null&&i!==void 0?i:[],...(l=n?.[x])!==null&&l!==void 0?l:[]]);return v},VD=(t,n)=>{var i,l,h,v;return{property:KD((i=t?.property)!==null&&i!==void 0?i:{},(l=n?.property)!==null&&l!==void 0?l:{}),method:KD((h=t?.method)!==null&&h!==void 0?h:{},(v=n?.method)!==null&&v!==void 0?v:{})}},x7=new Map;function bt(...t){var n,i,l;const h=t.map(($=>$.prototype));function v(...$){for(const N of t)qD(this,new N(...$))}v.prototype=BD(h,v),Object.setPrototypeOf(v,BD(t,null,["prototype"]));let x=v;{const $=((...N)=>{const _=((...F)=>{var U;const J=new Set,Y=new Set([...F]);for(;Y.size>0;)for(let Z of Y){const P=[...Ux(Z.prototype).map((se=>se.constructor)),...(U=v7(Z))!==null&&U!==void 0?U:[]].filter((se=>!J.has(se)));for(let se of P)Y.add(se);J.add(Z),Y.delete(Z)}return[...J]})(...N).map((F=>x7.get(F))).filter((F=>!!F));return _.length==0?{}:_.length==1?_[0]:_.reduce(((F,U)=>((J,Y)=>{var Z,P,se,ae,he,ge;return{class:uk([...(Z=J?.class)!==null&&Z!==void 0?Z:[],...(P=Y?.class)!==null&&P!==void 0?P:[]]),static:VD((se=J?.static)!==null&&se!==void 0?se:{},(ae=Y?.static)!==null&&ae!==void 0?ae:{}),instance:VD((he=J?.instance)!==null&&he!==void 0?he:{},(ge=Y?.instance)!==null&&ge!==void 0?ge:{})}})(F,U)))})(...t);for(let N of(n=$?.class)!==null&&n!==void 0?n:[]){const _=N(x);_&&(x=_)}HD((i=$?.static)!==null&&i!==void 0?i:{},x),HD((l=$?.instance)!==null&&l!==void 0?l:{},x.prototype)}var w,C;return w=x,C=t,UD.set(w,C),x}const HD=(t,n)=>{const i=t.property,l=t.method;if(i)for(let h in i)for(let v of i[h])v(n,h);if(l)for(let h in l)for(let v of l[h])v(n,h,Object.getOwnPropertyDescriptor(n,h))};let Od=class extends FD{specObj;passingOptionsNames=["specObj"];constructor({specObj:t,...n}){super({...n}),this.specObj=t}retrievePassingOptions(){return N$(this.passingOptionsNames,this)}retrieveFixedFields(t){const n=ra(["visitors",...t,"fixedFields"],this.specObj);return typeof n=="object"&&n!==null?Object.keys(n):[]}retrieveVisitor(t){return n1(Vc,["visitors",...t],this.specObj)?ra(["visitors",...t],this.specObj):ra(["visitors",...t,"$visitor"],this.specObj)}retrieveVisitorInstance(t,n={}){const i=this.retrievePassingOptions();return new(this.retrieveVisitor(t))({...i,...n})}toRefractedElement(t,n,i={}){const l=this.retrieveVisitorInstance(t,i);return l instanceof us&&l?.constructor===us?Ct(n):(fi(n,l,i),l.element)}},Kx=class extends Od{specPath;ignoredFields;constructor({specPath:t,ignoredFields:n,...i}){super({...i}),this.specPath=t,this.ignoredFields=n||[]}ObjectElement(t){const n=this.specPath(t),i=this.retrieveFixedFields(n);return t.forEach(((l,h,v)=>{if(xn(h)&&i.includes(it(h))&&!this.ignoredFields.includes(it(h))){const x=this.toRefractedElement([...n,"fixedFields",it(h)],l),w=new yx(Ct(h),x);this.copyMetaAndAttributes(v,w),w.classes.push("fixed-field"),this.element.content.push(w)}else this.ignoredFields.includes(it(h))||this.element.content.push(Ct(v))})),this.copyMetaAndAttributes(t,this.element),Gn}};class b7 extends bt(Kx,us){constructor(n){super(n),this.element=new Bx,this.specPath=Wt(["document","objects","JSONSchema"])}}let su=class{parent;constructor({parent:t}){this.parent=t}};const Hl=t=>Un(t)&&t.hasKey("$ref");let w7=class extends bt(Od,su,us){ObjectElement(t){const n=Hl(t)?["document","objects","JSONReference"]:["document","objects","JSONSchema"];return this.element=this.toRefractedElement(n,t),Gn}ArrayElement(t){return this.element=new ur,this.element.classes.push("json-schema-items"),t.forEach((n=>{const i=Hl(n)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],l=this.toRefractedElement(i,n);this.element.push(l)})),this.copyMetaAndAttributes(t,this.element),Gn}},S7=class extends Od{specPath;ignoredFields;fieldPatternPredicate=hm;constructor({specPath:t,ignoredFields:n,fieldPatternPredicate:i,...l}){super({...l}),this.specPath=t,this.ignoredFields=n||[],typeof i=="function"&&(this.fieldPatternPredicate=i)}ObjectElement(t){return t.forEach(((n,i,l)=>{if(!this.ignoredFields.includes(it(i))&&this.fieldPatternPredicate(it(i))){const h=this.specPath(n),v=this.toRefractedElement(h,n),x=new yx(Ct(i),v);this.copyMetaAndAttributes(l,x),x.classes.push("patterned-field"),this.element.content.push(x)}else this.ignoredFields.includes(it(i))||this.element.content.push(Ct(l))})),this.copyMetaAndAttributes(t,this.element),Gn}},H1=class extends S7{constructor(t){super(t),this.fieldPatternPredicate=uO}},E7=class extends bt(H1,su,us){constructor(t){super(t),this.element=new St,this.element.classes.push("json-schema-properties"),this.specPath=n=>Hl(n)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}},j7=class extends bt(H1,su,us){constructor(t){super(t),this.element=new St,this.element.classes.push("json-schema-patternProperties"),this.specPath=n=>Hl(n)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}};class C7 extends bt(H1,su,us){constructor(n){super(n),this.element=new St,this.element.classes.push("json-schema-dependencies"),this.specPath=i=>Hl(i)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}}let A7=class extends bt(Od,su,us){constructor(t){super(t),this.element=new ur,this.element.classes.push("json-schema-allOf")}ArrayElement(t){return t.forEach((n=>{const i=Hl(n)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],l=this.toRefractedElement(i,n);this.element.push(l)})),this.copyMetaAndAttributes(t,this.element),Gn}},O7=class extends bt(Od,su,us){constructor(t){super(t),this.element=new ur,this.element.classes.push("json-schema-anyOf")}ArrayElement(t){return t.forEach((n=>{const i=Hl(n)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],l=this.toRefractedElement(i,n);this.element.push(l)})),this.copyMetaAndAttributes(t,this.element),Gn}},k7=class extends bt(Od,su,us){constructor(t){super(t),this.element=new ur,this.element.classes.push("json-schema-oneOf")}ArrayElement(t){return t.forEach((n=>{const i=Hl(n)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],l=this.toRefractedElement(i,n);this.element.push(l)})),this.copyMetaAndAttributes(t,this.element),Gn}};class R7 extends bt(H1,su,us){constructor(n){super(n),this.element=new St,this.element.classes.push("json-schema-definitions"),this.specPath=i=>Hl(i)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}}let T7=class extends bt(Od,su,us){constructor(t){super(t),this.element=new ur,this.element.classes.push("json-schema-links")}ArrayElement(t){return t.forEach((n=>{const i=this.toRefractedElement(["document","objects","LinkDescription"],n);this.element.push(i)})),this.copyMetaAndAttributes(t,this.element),Gn}};class _7 extends bt(Kx,us){constructor(n){super(n),this.element=new U1,this.specPath=Wt(["document","objects","JSONReference"])}ObjectElement(n){const i=Kx.prototype.ObjectElement.call(this,n);return xn(this.element.$ref)&&this.element.classes.push("reference-element"),i}}let $7=class extends Od{alternator;constructor({alternator:t,...n}){super({...n}),this.alternator=t}enter(t){const n=this.alternator.map((({predicate:l,specPath:h})=>sO(l,Wt(h),s1))),i=B$(n)(t);return this.element=this.toRefractedElement(i,t),Gn}},Mm=class extends $7{constructor(t){super(t),this.alternator=[{predicate:Hl,specPath:["document","objects","JSONReference"]},{predicate:pi,specPath:["document","objects","JSONSchema"]}]}};class N7 extends bt(Kx,us){constructor(n){super(n),this.element=new K1,this.specPath=Wt(["document","objects","Media"])}}class D7 extends bt(Kx,us){constructor(n){super(n),this.element=new V1,this.specPath=Wt(["document","objects","LinkDescription"])}}const iu={visitors:{value:us,JSONSchemaOrJSONReferenceVisitor:Mm,document:{objects:{JSONSchema:{$visitor:b7,fixedFields:{id:{$ref:"#/visitors/value"},$schema:{$ref:"#/visitors/value"},multipleOf:{$ref:"#/visitors/value"},maximum:{$ref:"#/visitors/value"},exclusiveMaximum:{$ref:"#/visitors/value"},minimum:{$ref:"#/visitors/value"},exclusiveMinimum:{$ref:"#/visitors/value"},maxLength:{$ref:"#/visitors/value"},minLength:{$ref:"#/visitors/value"},pattern:{$ref:"#/visitors/value"},additionalItems:Mm,items:w7,maxItems:{$ref:"#/visitors/value"},minItems:{$ref:"#/visitors/value"},uniqueItems:{$ref:"#/visitors/value"},maxProperties:{$ref:"#/visitors/value"},minProperties:{$ref:"#/visitors/value"},required:class extends us{ArrayElement(t){const n=this.enter(t);return this.element.classes.push("json-schema-required"),n}},properties:E7,additionalProperties:Mm,patternProperties:j7,dependencies:C7,enum:class extends us{ArrayElement(t){const n=this.enter(t);return this.element.classes.push("json-schema-enum"),n}},type:class extends us{StringElement(t){const n=this.enter(t);return this.element.classes.push("json-schema-type"),n}ArrayElement(t){const n=this.enter(t);return this.element.classes.push("json-schema-type"),n}},allOf:A7,anyOf:O7,oneOf:k7,not:Mm,definitions:R7,title:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},default:{$ref:"#/visitors/value"},format:{$ref:"#/visitors/value"},base:{$ref:"#/visitors/value"},links:T7,media:{$ref:"#/visitors/document/objects/Media"},readOnly:{$ref:"#/visitors/value"}}},JSONReference:{$visitor:_7,fixedFields:{$ref:class extends us{StringElement(t){const n=this.enter(t);return this.element.classes.push("reference-value"),n}}}},Media:{$visitor:N7,fixedFields:{binaryEncoding:{$ref:"#/visitors/value"},type:{$ref:"#/visitors/value"}}},LinkDescription:{$visitor:D7,fixedFields:{href:{$ref:"#/visitors/value"},rel:{$ref:"#/visitors/value"},title:{$ref:"#/visitors/value"},targetSchema:Mm,mediaType:{$ref:"#/visitors/value"},method:{$ref:"#/visitors/value"},encType:{$ref:"#/visitors/value"},schema:Mm}}}}}},P7=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof Bx||t(l)&&n("JSONSchemaDraft4",l)&&i("object",l))),M7=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof U1||t(l)&&n("JSONReference",l)&&i("object",l))),I7=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof K1||t(l)&&n("media",l)&&i("object",l))),z7=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof V1||t(l)&&n("linkDescription",l)&&i("object",l))),L7=Object.freeze(Object.defineProperty({__proto__:null,isJSONReferenceElement:M7,isJSONSchemaElement:P7,isLinkDescriptionElement:z7,isMediaElement:I7},Symbol.toStringTag,{value:"Module"})),F7=()=>{const t=bx(m7);return{predicates:{...L7,isStringElement:xn},namespace:t}},G1=t=>(n,i={})=>((l,{specPath:h=["visitors","document","objects","JSONSchema","$visitor"],plugins:v=[],specificationObj:x=iu}={})=>{const w=LO(l),C=$1(x),$=new(ra(h,C))({specObj:C});return fi(w,$),km($.element,v,{toolboxCreator:F7,visitorOptions:{keyMap:y7,nodeTypeGetter:g7}})})(n,{specPath:t,...i});Bx.refract=G1(["visitors","document","objects","JSONSchema","$visitor"]),U1.refract=G1(["visitors","document","objects","JSONReference","$visitor"]),K1.refract=G1(["visitors","document","objects","Media","$visitor"]),V1.refract=G1(["visitors","document","objects","LinkDescription","$visitor"]);let X1=class extends Bx{constructor(t,n,i){super(t,n,i),this.element="schema",this.classes.push("json-schema-draft-4")}get idProp(){throw new Ur("idProp getter in Schema class is not not supported.")}set idProp(t){throw new Ur("idProp setter in Schema class is not not supported.")}get $schema(){throw new Ur("$schema getter in Schema class is not not supported.")}set $schema(t){throw new Ur("$schema setter in Schema class is not not supported.")}get additionalItems(){return this.get("additionalItems")}set additionalItems(t){this.set("additionalItems",t)}get items(){return this.get("items")}set items(t){this.set("items",t)}get additionalProperties(){return this.get("additionalProperties")}set additionalProperties(t){this.set("additionalProperties",t)}get patternProperties(){throw new Ur("patternProperties getter in Schema class is not not supported.")}set patternProperties(t){throw new Ur("patternProperties setter in Schema class is not not supported.")}get dependencies(){throw new Ur("dependencies getter in Schema class is not not supported.")}set dependencies(t){throw new Ur("dependencies setter in Schema class is not not supported.")}get type(){return this.get("type")}set type(t){this.set("type",t)}get not(){return this.get("not")}set not(t){this.set("not",t)}get definitions(){throw new Ur("definitions getter in Schema class is not not supported.")}set definitions(t){throw new Ur("definitions setter in Schema class is not not supported.")}get base(){throw new Ur("base getter in Schema class is not not supported.")}set base(t){throw new Ur("base setter in Schema class is not not supported.")}get links(){throw new Ur("links getter in Schema class is not not supported.")}set links(t){throw new Ur("links setter in Schema class is not not supported.")}get media(){throw new Ur("media getter in Schema class is not not supported.")}set media(t){throw new Ur("media setter in Schema class is not not supported.")}get nullable(){return this.get("nullable")}set nullable(t){this.set("nullable",t)}get discriminator(){return this.get("discriminator")}set discriminator(t){this.set("discriminator",t)}get writeOnly(){return this.get("writeOnly")}set writeOnly(t){this.set("writeOnly",t)}get xml(){return this.get("xml")}set xml(t){this.set("xml",t)}get externalDocs(){return this.get("externalDocs")}set externalDocs(t){this.set("externalDocs",t)}get example(){return this.get("example")}set example(t){this.set("example",t)}get deprecated(){return this.get("deprecated")}set deprecated(t){this.set("deprecated",t)}},Vx=class extends St{constructor(t,n,i){super(t,n,i),this.element="securityRequirement"}},Hx=class extends St{constructor(t,n,i){super(t,n,i),this.element="securityScheme"}get type(){return this.get("type")}set type(t){this.set("type",t)}get description(){return this.get("description")}set description(t){this.set("description",t)}get name(){return this.get("name")}set name(t){this.set("name",t)}get in(){return this.get("in")}set in(t){this.set("in",t)}get scheme(){return this.get("scheme")}set scheme(t){this.set("scheme",t)}get bearerFormat(){return this.get("bearerFormat")}set bearerFormat(t){this.set("bearerFormat",t)}get flows(){return this.get("flows")}set flows(t){this.set("flows",t)}get openIdConnectUrl(){return this.get("openIdConnectUrl")}set openIdConnectUrl(t){this.set("openIdConnectUrl",t)}},Gx=class extends St{constructor(t,n,i){super(t,n,i),this.element="server"}get url(){return this.get("url")}set url(t){this.set("url",t)}get description(){return this.get("description")}set description(t){this.set("description",t)}get variables(){return this.get("variables")}set variables(t){this.set("variables",t)}},Xx=class extends St{constructor(t,n,i){super(t,n,i),this.element="serverVariable"}get enum(){return this.get("enum")}set enum(t){this.set("enum",t)}get default(){return this.get("default")}set default(t){this.set("default",t)}get description(){return this.get("description")}set description(t){this.set("description",t)}},Y1=class extends St{constructor(t,n,i){super(t,n,i),this.element="tag"}get name(){return this.get("name")}set name(t){this.set("name",t)}get description(){return this.get("description")}set description(t){this.set("description",t)}get externalDocs(){return this.get("externalDocs")}set externalDocs(t){this.set("externalDocs",t)}},Z1=class extends St{constructor(t,n,i){super(t,n,i),this.element="xml"}get name(){return this.get("name")}set name(t){this.set("name",t)}get namespace(){return this.get("namespace")}set namespace(t){this.set("namespace",t)}get prefix(){return this.get("prefix")}set prefix(t){this.set("prefix",t)}get attribute(){return this.get("attribute")}set attribute(t){this.set("attribute",t)}get wrapped(){return this.get("wrapped")}set wrapped(t){this.set("wrapped",t)}};const q7={namespace:t=>{const{base:n}=t;return n.register("callback",Cx),n.register("components",Ax),n.register("contact",Ox),n.register("discriminator",z1),n.register("encoding",L1),n.register("example",kx),n.register("externalDocumentation",Rx),n.register("header",Dm),n.register("info",Tx),n.register("license",_x),n.register("link",$x),n.register("mediaType",Nx),n.register("oAuthFlow",F1),n.register("oAuthFlows",q1),n.register("openapi",Dx),n.register("openApi3_0",B1),n.register("operation",Px),n.register("parameter",Pm),n.register("pathItem",Mx),n.register("paths",Ix),n.register("reference",zx),n.register("requestBody",Lx),n.register("response",Fx),n.register("responses",qx),n.register("schema",X1),n.register("securityRequirement",Vx),n.register("securityScheme",Hx),n.register("server",Gx),n.register("serverVariable",Xx),n.register("tag",Y1),n.register("xml",Z1),n}};class W1 extends ur{static primaryClass="servers";constructor(n,i,l){super(n,i,l),this.classes.push(W1.primaryClass)}}class dk extends ur{static primaryClass="security";constructor(n,i,l){super(n,i,l),this.classes.push(dk.primaryClass)}}class hk extends ur{static primaryClass="tags";constructor(n,i,l){super(n,i,l),this.classes.push(hk.primaryClass)}}class pk extends St{static primaryClass="server-variables";constructor(n,i,l){super(n,i,l),this.classes.push(pk.primaryClass)}}class J1 extends St{static primaryClass="components-schemas";constructor(n,i,l){super(n,i,l),this.classes.push(J1.primaryClass)}}class fk extends St{static primaryClass="components-responses";constructor(n,i,l){super(n,i,l),this.classes.push(fk.primaryClass)}}class mk extends St{static primaryClass="components-parameters";constructor(n,i,l){super(n,i,l),this.classes.push(mk.primaryClass),this.classes.push("parameters")}}class gk extends St{static primaryClass="components-examples";constructor(n,i,l){super(n,i,l),this.classes.push(gk.primaryClass),this.classes.push("examples")}}class yk extends St{static primaryClass="components-request-bodies";constructor(n,i,l){super(n,i,l),this.classes.push(yk.primaryClass)}}class vk extends St{static primaryClass="components-headers";constructor(n,i,l){super(n,i,l),this.classes.push(vk.primaryClass)}}class xk extends St{static primaryClass="components-security-schemes";constructor(n,i,l){super(n,i,l),this.classes.push(xk.primaryClass)}}class bk extends St{static primaryClass="components-links";constructor(n,i,l){super(n,i,l),this.classes.push(bk.primaryClass)}}class wk extends St{static primaryClass="components-callbacks";constructor(n,i,l){super(n,i,l),this.classes.push(wk.primaryClass)}}class Sk extends ur{static primaryClass="path-item-servers";constructor(n,i,l){super(n,i,l),this.classes.push(Sk.primaryClass),this.classes.push("servers")}}class Ek extends ur{static primaryClass="path-item-parameters";constructor(n,i,l){super(n,i,l),this.classes.push(Ek.primaryClass),this.classes.push("parameters")}}class Q1 extends ur{static primaryClass="operation-parameters";constructor(n,i,l){super(n,i,l),this.classes.push(Q1.primaryClass),this.classes.push("parameters")}}class jk extends St{static primaryClass="parameter-examples";constructor(n,i,l){super(n,i,l),this.classes.push(jk.primaryClass),this.classes.push("examples")}}class Ck extends St{static primaryClass="parameter-content";constructor(n,i,l){super(n,i,l),this.classes.push(Ck.primaryClass),this.classes.push("content")}}class Ak extends ur{static primaryClass="operation-tags";constructor(n,i,l){super(n,i,l),this.classes.push(Ak.primaryClass)}}class Ok extends St{static primaryClass="operation-callbacks";constructor(n,i,l){super(n,i,l),this.classes.push(Ok.primaryClass)}}class eE extends ur{static primaryClass="operation-security";constructor(n,i,l){super(n,i,l),this.classes.push(eE.primaryClass),this.classes.push("security")}}class kk extends ur{static primaryClass="operation-servers";constructor(n,i,l){super(n,i,l),this.classes.push(kk.primaryClass),this.classes.push("servers")}}class Rk extends St{static primaryClass="request-body-content";constructor(n,i,l){super(n,i,l),this.classes.push(Rk.primaryClass),this.classes.push("content")}}class Tk extends St{static primaryClass="media-type-examples";constructor(n,i,l){super(n,i,l),this.classes.push(Tk.primaryClass),this.classes.push("examples")}}class _k extends St{static primaryClass="media-type-encoding";constructor(n,i,l){super(n,i,l),this.classes.push(_k.primaryClass)}}class $k extends St{static primaryClass="encoding-headers";constructor(n,i,l){super(n,i,l),this.classes.push($k.primaryClass)}}class Nk extends St{static primaryClass="response-headers";constructor(n,i,l){super(n,i,l),this.classes.push(Nk.primaryClass)}}class Dk extends St{static primaryClass="response-content";constructor(n,i,l){super(n,i,l),this.classes.push(Dk.primaryClass),this.classes.push("content")}}class Pk extends St{static primaryClass="response-links";constructor(n,i,l){super(n,i,l),this.classes.push(Pk.primaryClass)}}class Mk extends St{static primaryClass="discriminator-mapping";constructor(n,i,l){super(n,i,l),this.classes.push(Mk.primaryClass)}}class Ik extends St{static primaryClass="oauth-flow-scopes";constructor(n,i,l){super(n,i,l),this.classes.push(Ik.primaryClass)}}class zk extends St{static primaryClass="link-parameters";constructor(n,i,l){super(n,i,l),this.classes.push(zk.primaryClass)}}class Lk extends St{static primaryClass="header-examples";constructor(n,i,l){super(n,i,l),this.classes.push(Lk.primaryClass),this.classes.push("examples")}}class Fk extends St{static primaryClass="header-content";constructor(n,i,l){super(n,i,l),this.classes.push(Fk.primaryClass),this.classes.push("content")}}const B7=t=>{if(es(t))return`${t.element.charAt(0).toUpperCase()+t.element.slice(1)}Element`},U7={CallbackElement:["content"],ComponentsElement:["content"],ContactElement:["content"],DiscriminatorElement:["content"],Encoding:["content"],Example:["content"],ExternalDocumentationElement:["content"],HeaderElement:["content"],InfoElement:["content"],LicenseElement:["content"],MediaTypeElement:["content"],OAuthFlowElement:["content"],OAuthFlowsElement:["content"],OpenApi3_0Element:["content"],OperationElement:["content"],ParameterElement:["content"],PathItemElement:["content"],PathsElement:["content"],ReferenceElement:["content"],RequestBodyElement:["content"],ResponseElement:["content"],ResponsesElement:["content"],SchemaElement:["content"],SecurityRequirementElement:["content"],SecuritySchemeElement:["content"],ServerElement:["content"],ServerVariableElement:["content"],TagElement:["content"],...Om};class GD{element;constructor(n={}){Object.assign(this,n)}copyMetaAndAttributes(n,i){(n.meta.length>0||i.meta.length>0)&&(i.meta=Ul(i.meta,n.meta),xx(n)&&i.meta.set("sourceMap",n.meta.get("sourceMap"))),(n.attributes.length>0||n.meta.length>0)&&(i.attributes=Ul(i.attributes,n.attributes))}}class gt extends GD{enter(n){return this.element=Ct(n),Gn}}class $i extends GD{specObj;passingOptionsNames=["specObj","openApiGenericElement","openApiSemanticElement"];openApiGenericElement;openApiSemanticElement;constructor({specObj:n,passingOptionsNames:i,openApiGenericElement:l,openApiSemanticElement:h,...v}){super({...v}),this.specObj=n,this.openApiGenericElement=l,this.openApiSemanticElement=h,Array.isArray(i)&&(this.passingOptionsNames=i)}retrievePassingOptions(){return N$(this.passingOptionsNames,this)}retrieveFixedFields(n){const i=ra(["visitors",...n,"fixedFields"],this.specObj);return typeof i=="object"&&i!==null?Object.keys(i):[]}retrieveVisitor(n){return n1(Vc,["visitors",...n],this.specObj)?ra(["visitors",...n],this.specObj):ra(["visitors",...n,"$visitor"],this.specObj)}retrieveVisitorInstance(n,i={}){const l=this.retrievePassingOptions();return new(this.retrieveVisitor(n))({...l,...i})}toRefractedElement(n,i,l={}){const h=this.retrieveVisitorInstance(n,l);return h instanceof gt&&h?.constructor===gt?Ct(i):(fi(i,h,l),h.element)}}const wr=t=>Un(t)&&t.hasKey("$ref"),K7=Un,V7=Un,XD=t=>xn(t.key)&&P$("x-",it(t.key));class bn extends $i{specPath;ignoredFields;canSupportSpecificationExtensions=!0;specificationExtensionPredicate=XD;constructor({specPath:n,ignoredFields:i,canSupportSpecificationExtensions:l,specificationExtensionPredicate:h,...v}){super({...v}),this.specPath=n,this.ignoredFields=i||[],typeof l=="boolean"&&(this.canSupportSpecificationExtensions=l),typeof h=="function"&&(this.specificationExtensionPredicate=h)}ObjectElement(n){const i=this.specPath(n),l=this.retrieveFixedFields(i);return n.forEach(((h,v,x)=>{if(xn(v)&&l.includes(it(v))&&!this.ignoredFields.includes(it(v))){const w=this.toRefractedElement([...i,"fixedFields",it(v)],h),C=new yx(Ct(v),w);this.copyMetaAndAttributes(x,C),C.classes.push("fixed-field"),this.element.content.push(C)}else if(this.canSupportSpecificationExtensions&&this.specificationExtensionPredicate(x)){const w=this.toRefractedElement(["document","extension"],x);this.element.content.push(w)}else this.ignoredFields.includes(it(v))||this.element.content.push(Ct(x))})),this.copyMetaAndAttributes(n,this.element),Gn}}class H7 extends bt(bn,gt){constructor(n){super(n),this.element=new B1,this.specPath=Wt(["document","objects","OpenApi"]),this.canSupportSpecificationExtensions=!0}ObjectElement(n){return bn.prototype.ObjectElement.call(this,n)}}class G7 extends bt($i,gt){StringElement(n){const i=new Dx(it(n));return this.copyMetaAndAttributes(n,i),this.element=i,Gn}}let X7=class extends bt(bn,gt){constructor(t){super(t),this.element=new Tx,this.specPath=Wt(["document","objects","Info"]),this.canSupportSpecificationExtensions=!0}},Y7=class extends bt(bn,gt){constructor(t){super(t),this.element=new Ox,this.specPath=Wt(["document","objects","Contact"]),this.canSupportSpecificationExtensions=!0}},Z7=class extends bt(bn,gt){constructor(t){super(t),this.element=new _x,this.specPath=Wt(["document","objects","License"]),this.canSupportSpecificationExtensions=!0}},W7=class extends bt(bn,gt){constructor(t){super(t),this.element=new $x,this.specPath=Wt(["document","objects","Link"]),this.canSupportSpecificationExtensions=!0}ObjectElement(t){const n=bn.prototype.ObjectElement.call(this,t);return(xn(this.element.operationId)||xn(this.element.operationRef))&&this.element.classes.push("reference-element"),n}};class Im extends $i{specPath;ignoredFields;fieldPatternPredicate=hm;canSupportSpecificationExtensions=!1;specificationExtensionPredicate=XD;constructor({specPath:n,ignoredFields:i,fieldPatternPredicate:l,canSupportSpecificationExtensions:h,specificationExtensionPredicate:v,...x}){super({...x}),this.specPath=n,this.ignoredFields=i||[],typeof l=="function"&&(this.fieldPatternPredicate=l),typeof h=="boolean"&&(this.canSupportSpecificationExtensions=h),typeof v=="function"&&(this.specificationExtensionPredicate=v)}ObjectElement(n){return n.forEach(((i,l,h)=>{if(this.canSupportSpecificationExtensions&&this.specificationExtensionPredicate(h)){const v=this.toRefractedElement(["document","extension"],h);this.element.content.push(v)}else if(!this.ignoredFields.includes(it(l))&&this.fieldPatternPredicate(it(l))){const v=this.specPath(i),x=this.toRefractedElement(v,i),w=new yx(Ct(l),x);this.copyMetaAndAttributes(h,w),w.classes.push("patterned-field"),this.element.content.push(w)}else this.ignoredFields.includes(it(l))||this.element.content.push(Ct(h))})),this.copyMetaAndAttributes(n,this.element),Gn}}class un extends Im{constructor(n){super(n),this.fieldPatternPredicate=uO}}let J7=class extends bt(un,gt){constructor(t){super(t),this.element=new zk,this.specPath=Wt(["value"])}},Q7=class extends bt(bn,gt){constructor(t){super(t),this.element=new Gx,this.specPath=Wt(["document","objects","Server"]),this.canSupportSpecificationExtensions=!0}},qk=class extends bt($i,gt){constructor(t){super(t),this.element=new W1}ArrayElement(t){return t.forEach((n=>{const i=K7(n)?["document","objects","Server"]:["value"],l=this.toRefractedElement(i,n);this.element.push(l)})),this.copyMetaAndAttributes(t,this.element),Gn}},e9=class extends bt(bn,gt){constructor(t){super(t),this.element=new Xx,this.specPath=Wt(["document","objects","ServerVariable"]),this.canSupportSpecificationExtensions=!0}};class t9 extends bt(un,gt){constructor(n){super(n),this.element=new pk,this.specPath=Wt(["document","objects","ServerVariable"])}}let n9=class extends bt(bn,gt){constructor(t){super(t),this.element=new Nx,this.specPath=Wt(["document","objects","MediaType"]),this.canSupportSpecificationExtensions=!0}};class Gl extends $i{alternator;constructor({alternator:n,...i}){super({...i}),this.alternator=n||[]}enter(n){const i=this.alternator.map((({predicate:h,specPath:v})=>sO(h,Wt(v),s1))),l=B$(i)(n);return this.element=this.toRefractedElement(l,n),Gn}}const r9=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof Cx||t(l)&&n("callback",l)&&i("object",l))),s9=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof Ax||t(l)&&n("components",l)&&i("object",l))),i9=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof Ox||t(l)&&n("contact",l)&&i("object",l))),a9=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof kx||t(l)&&n("example",l)&&i("object",l))),o9=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof Rx||t(l)&&n("externalDocumentation",l)&&i("object",l))),zm=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof Dm||t(l)&&n("header",l)&&i("object",l))),l9=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof Tx||t(l)&&n("info",l)&&i("object",l))),c9=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof _x||t(l)&&n("license",l)&&i("object",l))),u9=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof $x||t(l)&&n("link",l)&&i("object",l))),d9=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof Dx||t(l)&&n("openapi",l)&&i("string",l))),h9=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i,hasClass:l})=>h=>h instanceof B1||t(h)&&n("openApi3_0",h)&&i("object",h)&&l("api",h))),YD=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof Px||t(l)&&n("operation",l)&&i("object",l))),p9=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof Pm||t(l)&&n("parameter",l)&&i("object",l))),Bk=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof Mx||t(l)&&n("pathItem",l)&&i("object",l))),f9=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof Ix||t(l)&&n("paths",l)&&i("object",l))),fr=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof zx||t(l)&&n("reference",l)&&i("object",l))),m9=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof Lx||t(l)&&n("requestBody",l)&&i("object",l))),tE=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof Fx||t(l)&&n("response",l)&&i("object",l))),g9=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof qx||t(l)&&n("responses",l)&&i("object",l))),y9=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof X1||t(l)&&n("schema",l)&&i("object",l))),v9=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof Vx||t(l)&&n("securityRequirement",l)&&i("object",l))),x9=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof Hx||t(l)&&n("securityScheme",l)&&i("object",l))),b9=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof Gx||t(l)&&n("server",l)&&i("object",l))),w9=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof Xx||t(l)&&n("serverVariable",l)&&i("object",l))),nE=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof Nx||t(l)&&n("mediaType",l)&&i("object",l))),ZD=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i,hasClass:l})=>h=>h instanceof W1||t(h)&&n("array",h)&&i("array",h)&&l("servers",h))),S9=Object.freeze(Object.defineProperty({__proto__:null,isBooleanJsonSchemaElement:t=>vx(t)&&t.classes.includes("boolean-json-schema"),isCallbackElement:r9,isComponentsElement:s9,isContactElement:i9,isExampleElement:a9,isExternalDocumentationElement:o9,isHeaderElement:zm,isInfoElement:l9,isLicenseElement:c9,isLinkElement:u9,isMediaTypeElement:nE,isOpenApi3_0Element:h9,isOpenapiElement:d9,isOperationElement:YD,isParameterElement:p9,isPathItemElement:Bk,isPathsElement:f9,isReferenceElement:fr,isRequestBodyElement:m9,isResponseElement:tE,isResponsesElement:g9,isSchemaElement:y9,isSecurityRequirementElement:v9,isSecuritySchemeElement:x9,isServerElement:b9,isServerVariableElement:w9,isServersElement:ZD},Symbol.toStringTag,{value:"Module"}));let E9=class extends bt(Gl,gt){constructor(t){super(t),this.alternator=[{predicate:wr,specPath:["document","objects","Reference"]},{predicate:pi,specPath:["document","objects","Schema"]}]}ObjectElement(t){const n=Gl.prototype.enter.call(this,t);return fr(this.element)&&this.element.setMetaProperty("referenced-element","schema"),n}},Uk=class extends bt(un,gt){constructor(t){super(t),this.element=new St,this.element.classes.push("examples"),this.specPath=n=>wr(n)?["document","objects","Reference"]:["document","objects","Example"],this.canSupportSpecificationExtensions=!0}ObjectElement(t){const n=un.prototype.ObjectElement.call(this,t);return this.element.filter(fr).forEach((i=>{i.setMetaProperty("referenced-element","example")})),n}},j9=class extends bt(un,gt){constructor(t){super(t),this.element=new _k,this.specPath=Wt(["document","objects","Encoding"])}},C9=class extends bt(un,gt){constructor(t){super(t),this.element=new Vx,this.specPath=Wt(["value"])}},A9=class extends bt($i,gt){constructor(t){super(t),this.element=new dk}ArrayElement(t){return t.forEach((n=>{if(Un(n)){const i=this.toRefractedElement(["document","objects","SecurityRequirement"],n);this.element.push(i)}else this.element.push(Ct(n))})),this.copyMetaAndAttributes(t,this.element),Gn}},O9=class extends bt(bn,gt){constructor(t){super(t),this.element=new Ax,this.specPath=Wt(["document","objects","Components"]),this.canSupportSpecificationExtensions=!0}},k9=class extends bt(bn,gt){constructor(t){super(t),this.element=new Y1,this.specPath=Wt(["document","objects","Tag"]),this.canSupportSpecificationExtensions=!0}},R9=class extends bt(bn,gt){constructor(t){super(t),this.element=new zx,this.specPath=Wt(["document","objects","Reference"]),this.canSupportSpecificationExtensions=!1}ObjectElement(t){const n=bn.prototype.ObjectElement.call(this,t);return xn(this.element.$ref)&&this.element.classes.push("reference-element"),n}},T9=class extends bt(bn,gt){constructor(t){super(t),this.element=new Pm,this.specPath=Wt(["document","objects","Parameter"]),this.canSupportSpecificationExtensions=!0}ObjectElement(t){const n=bn.prototype.ObjectElement.call(this,t);return Un(this.element.contentProp)&&this.element.contentProp.filter(nE).forEach(((i,l)=>{i.setMetaProperty("media-type",it(l))})),n}},_9=class extends bt(Gl,gt){constructor(t){super(t),this.alternator=[{predicate:wr,specPath:["document","objects","Reference"]},{predicate:pi,specPath:["document","objects","Schema"]}]}ObjectElement(t){const n=Gl.prototype.enter.call(this,t);return fr(this.element)&&this.element.setMetaProperty("referenced-element","schema"),n}},$9=class extends bt(bn,gt){constructor(t){super(t),this.element=new Dm,this.specPath=Wt(["document","objects","Header"]),this.canSupportSpecificationExtensions=!0}},N9=class extends bt(Gl,gt){constructor(t){super(t),this.alternator=[{predicate:wr,specPath:["document","objects","Reference"]},{predicate:pi,specPath:["document","objects","Schema"]}]}ObjectElement(t){const n=Gl.prototype.enter.call(this,t);return fr(this.element)&&this.element.setMetaProperty("referenced-element","schema"),n}},rE=class extends bt(un,gt){constructor(t){super(t),this.element=new St,this.element.classes.push("content"),this.specPath=Wt(["document","objects","MediaType"])}},D9=class extends bt(bn,gt){constructor(t){super(t),this.element=new X1,this.specPath=Wt(["document","objects","Schema"]),this.canSupportSpecificationExtensions=!0}};const{allOf:WD}=iu.visitors.document.objects.JSONSchema.fixedFields,{anyOf:JD}=iu.visitors.document.objects.JSONSchema.fixedFields,{oneOf:QD}=iu.visitors.document.objects.JSONSchema.fixedFields,{items:eP}=iu.visitors.document.objects.JSONSchema.fixedFields,{properties:tP}=iu.visitors.document.objects.JSONSchema.fixedFields,{type:P9}=iu.visitors.document.objects.JSONSchema.fixedFields,{JSONSchemaOrJSONReferenceVisitor:nP}=iu.visitors;class rP extends nP{ObjectElement(n){const i=nP.prototype.enter.call(this,n);return fr(this.element)&&this.element.setMetaProperty("referenced-element","schema"),i}}let M9=class extends bt(bn,gt){constructor(t){super(t),this.element=new z1,this.specPath=Wt(["document","objects","Discriminator"]),this.canSupportSpecificationExtensions=!1}};class I9 extends bt(un,gt){constructor(n){super(n),this.element=new Mk,this.specPath=Wt(["value"])}}let z9=class extends bt(bn,gt){constructor(t){super(t),this.element=new Z1,this.specPath=Wt(["document","objects","XML"]),this.canSupportSpecificationExtensions=!0}},L9=class extends bt(un,gt){constructor(t){super(t),this.element=new J1,this.specPath=n=>wr(n)?["document","objects","Reference"]:["document","objects","Schema"]}ObjectElement(t){const n=un.prototype.ObjectElement.call(this,t);return this.element.filter(fr).forEach((i=>{i.setMetaProperty("referenced-element","schema")})),n}},F9=class extends bt(un,gt){constructor(t){super(t),this.element=new fk,this.specPath=n=>wr(n)?["document","objects","Reference"]:["document","objects","Response"]}ObjectElement(t){const n=un.prototype.ObjectElement.call(this,t);return this.element.filter(fr).forEach((i=>{i.setMetaProperty("referenced-element","response")})),this.element.filter(tE).forEach(((i,l)=>{i.setMetaProperty("http-status-code",it(l))})),n}},q9=class extends bt(un,gt){constructor(t){super(t),this.element=new mk,this.specPath=n=>wr(n)?["document","objects","Reference"]:["document","objects","Parameter"]}ObjectElement(t){const n=un.prototype.ObjectElement.call(this,t);return this.element.filter(fr).forEach((i=>{i.setMetaProperty("referenced-element","parameter")})),n}},B9=class extends bt(un,gt){constructor(t){super(t),this.element=new gk,this.specPath=n=>wr(n)?["document","objects","Reference"]:["document","objects","Example"]}ObjectElement(t){const n=un.prototype.ObjectElement.call(this,t);return this.element.filter(fr).forEach((i=>{i.setMetaProperty("referenced-element","example")})),n}};class U9 extends bt(un,gt){constructor(n){super(n),this.element=new yk,this.specPath=i=>wr(i)?["document","objects","Reference"]:["document","objects","RequestBody"]}ObjectElement(n){const i=un.prototype.ObjectElement.call(this,n);return this.element.filter(fr).forEach((l=>{l.setMetaProperty("referenced-element","requestBody")})),i}}let K9=class extends bt(un,gt){constructor(t){super(t),this.element=new vk,this.specPath=n=>wr(n)?["document","objects","Reference"]:["document","objects","Header"]}ObjectElement(t){const n=un.prototype.ObjectElement.call(this,t);return this.element.filter(fr).forEach((i=>{i.setMetaProperty("referenced-element","header")})),this.element.filter(zm).forEach(((i,l)=>{i.setMetaProperty("header-name",it(l))})),n}};class V9 extends bt(un,gt){constructor(n){super(n),this.element=new xk,this.specPath=i=>wr(i)?["document","objects","Reference"]:["document","objects","SecurityScheme"]}ObjectElement(n){const i=un.prototype.ObjectElement.call(this,n);return this.element.filter(fr).forEach((l=>{l.setMetaProperty("referenced-element","securityScheme")})),i}}let H9=class extends bt(un,gt){constructor(t){super(t),this.element=new bk,this.specPath=n=>wr(n)?["document","objects","Reference"]:["document","objects","Link"]}ObjectElement(t){const n=un.prototype.ObjectElement.call(this,t);return this.element.filter(fr).forEach((i=>{i.setMetaProperty("referenced-element","link")})),n}},G9=class extends bt(un,gt){constructor(t){super(t),this.element=new wk,this.specPath=n=>wr(n)?["document","objects","Reference"]:["document","objects","Callback"]}ObjectElement(t){const n=un.prototype.ObjectElement.call(this,t);return this.element.filter(fr).forEach((i=>{i.setMetaProperty("referenced-element","callback")})),n}},X9=class extends bt(bn,gt){constructor(t){super(t),this.element=new kx,this.specPath=Wt(["document","objects","Example"]),this.canSupportSpecificationExtensions=!0}ObjectElement(t){const n=bn.prototype.ObjectElement.call(this,t);return xn(this.element.externalValue)&&this.element.classes.push("reference-element"),n}},Y9=class extends bt(bn,gt){constructor(t){super(t),this.element=new Rx,this.specPath=Wt(["document","objects","ExternalDocumentation"]),this.canSupportSpecificationExtensions=!0}},Z9=class extends bt(bn,gt){constructor(t){super(t),this.element=new L1,this.specPath=Wt(["document","objects","Encoding"]),this.canSupportSpecificationExtensions=!0}ObjectElement(t){const n=bn.prototype.ObjectElement.call(this,t);return Un(this.element.headers)&&this.element.headers.filter(zm).forEach(((i,l)=>{i.setMetaProperty("header-name",it(l))})),n}},W9=class extends bt(un,gt){constructor(t){super(t),this.element=new $k,this.specPath=n=>wr(n)?["document","objects","Reference"]:["document","objects","Header"]}ObjectElement(t){const n=un.prototype.ObjectElement.call(this,t);return this.element.filter(fr).forEach((i=>{i.setMetaProperty("referenced-element","header")})),this.element.forEach(((i,l)=>{if(!zm(i))return;const h=it(l);i.setMetaProperty("headerName",h)})),n}},J9=class extends bt(Im,gt){constructor(t){super(t),this.element=new Ix,this.specPath=Wt(["document","objects","PathItem"]),this.canSupportSpecificationExtensions=!0,this.fieldPatternPredicate=pi}ObjectElement(t){const n=Im.prototype.ObjectElement.call(this,t);return this.element.filter(Bk).forEach(((i,l)=>{l.classes.push("openapi-path-template"),l.classes.push("path-template"),i.setMetaProperty("path",Ct(l))})),n}},Q9=class extends bt(bn,gt){constructor(t){super(t),this.element=new Lx,this.specPath=Wt(["document","objects","RequestBody"])}ObjectElement(t){const n=bn.prototype.ObjectElement.call(this,t);return Un(this.element.contentProp)&&this.element.contentProp.filter(nE).forEach(((i,l)=>{i.setMetaProperty("media-type",it(l))})),n}},eH=class extends bt(Im,gt){constructor(t){super(t),this.element=new Cx,this.specPath=Wt(["document","objects","PathItem"]),this.canSupportSpecificationExtensions=!0,this.fieldPatternPredicate=n=>/{(?<expression>[^}]{1,2083})}/.test(String(n))}ObjectElement(t){const n=un.prototype.ObjectElement.call(this,t);return this.element.filter(Bk).forEach(((i,l)=>{i.setMetaProperty("runtime-expression",it(l))})),n}},tH=class extends bt(bn,gt){constructor(t){super(t),this.element=new Fx,this.specPath=Wt(["document","objects","Response"])}ObjectElement(t){const n=bn.prototype.ObjectElement.call(this,t);return Un(this.element.contentProp)&&this.element.contentProp.filter(nE).forEach(((i,l)=>{i.setMetaProperty("media-type",it(l))})),Un(this.element.headers)&&this.element.headers.filter(zm).forEach(((i,l)=>{i.setMetaProperty("header-name",it(l))})),n}};class nH extends bt(un,gt){constructor(n){super(n),this.element=new Nk,this.specPath=i=>wr(i)?["document","objects","Reference"]:["document","objects","Header"]}ObjectElement(n){const i=un.prototype.ObjectElement.call(this,n);return this.element.filter(fr).forEach((l=>{l.setMetaProperty("referenced-element","header")})),this.element.forEach(((l,h)=>{if(!zm(l))return;const v=it(h);l.setMetaProperty("header-name",v)})),i}}class rH extends bt(un,gt){constructor(n){super(n),this.element=new Pk,this.specPath=i=>wr(i)?["document","objects","Reference"]:["document","objects","Link"]}ObjectElement(n){const i=un.prototype.ObjectElement.call(this,n);return this.element.filter(fr).forEach((l=>{l.setMetaProperty("referenced-element","link")})),i}}class sP extends bt(bn,Im){specPathFixedFields;specPathPatternedFields;constructor({specPathFixedFields:n,specPathPatternedFields:i,...l}){super({...l}),this.specPathFixedFields=n,this.specPathPatternedFields=i}ObjectElement(n){const{specPath:i,ignoredFields:l}=this;try{this.specPath=this.specPathFixedFields;const h=this.retrieveFixedFields(this.specPath(n));this.ignoredFields=[...l,...IB(n.keys(),h)],bn.prototype.ObjectElement.call(this,n),this.specPath=this.specPathPatternedFields,this.ignoredFields=h,Im.prototype.ObjectElement.call(this,n)}catch(h){throw this.specPath=i,h}return Gn}}let sH=class extends bt(sP,gt){constructor(t){super(t),this.element=new qx,this.specPathFixedFields=Wt(["document","objects","Responses"]),this.canSupportSpecificationExtensions=!0,this.specPathPatternedFields=n=>wr(n)?["document","objects","Reference"]:["document","objects","Response"],this.fieldPatternPredicate=n=>new RegExp(`^(1XX|2XX|3XX|4XX|5XX|${iU(100,600).join("|")})$`).test(String(n))}ObjectElement(t){const n=sP.prototype.ObjectElement.call(this,t);return this.element.filter(fr).forEach((i=>{i.setMetaProperty("referenced-element","response")})),this.element.filter(tE).forEach(((i,l)=>{const h=Ct(l);this.fieldPatternPredicate(it(h))&&i.setMetaProperty("http-status-code",h)})),n}};class iH extends bt(Gl,gt){constructor(n){super(n),this.alternator=[{predicate:wr,specPath:["document","objects","Reference"]},{predicate:pi,specPath:["document","objects","Response"]}]}ObjectElement(n){const i=Gl.prototype.enter.call(this,n);return fr(this.element)?this.element.setMetaProperty("referenced-element","response"):tE(this.element)&&this.element.setMetaProperty("http-status-code","default"),i}}let aH=class extends bt(bn,gt){constructor(t){super(t),this.element=new Px,this.specPath=Wt(["document","objects","Operation"])}},iP=class extends bt($i,gt){constructor(t){super(t),this.element=new ur,this.element.classes.push("parameters")}ArrayElement(t){return t.forEach((n=>{const i=wr(n)?["document","objects","Reference"]:["document","objects","Parameter"],l=this.toRefractedElement(i,n);fr(l)&&l.setMetaProperty("referenced-element","parameter"),this.element.push(l)})),this.copyMetaAndAttributes(t,this.element),Gn}};class oH extends bt(un,gt){specPath;constructor(n){super(n),this.element=new Ok,this.specPath=i=>wr(i)?["document","objects","Reference"]:["document","objects","Callback"]}ObjectElement(n){const i=un.prototype.ObjectElement.call(this,n);return this.element.filter(fr).forEach((l=>{l.setMetaProperty("referenced-element","callback")})),i}}class lH extends bt($i,gt){constructor(n){super(n),this.element=new eE}ArrayElement(n){return n.forEach((i=>{const l=Un(i)?["document","objects","SecurityRequirement"]:["value"],h=this.toRefractedElement(l,i);this.element.push(h)})),this.copyMetaAndAttributes(n,this.element),Gn}}let cH=class extends bt(bn,gt){constructor(t){super(t),this.element=new Mx,this.specPath=Wt(["document","objects","PathItem"])}ObjectElement(t){const n=bn.prototype.ObjectElement.call(this,t);return this.element.filter(YD).forEach(((i,l)=>{const h=Ct(l);h.content=it(h).toUpperCase(),i.setMetaProperty("http-method",h)})),xn(this.element.$ref)&&this.element.classes.push("reference-element"),n}},uH=class extends bt(bn,gt){constructor(t){super(t),this.element=new Hx,this.specPath=Wt(["document","objects","SecurityScheme"]),this.canSupportSpecificationExtensions=!0}},dH=class extends bt(bn,gt){constructor(t){super(t),this.element=new q1,this.specPath=Wt(["document","objects","OAuthFlows"]),this.canSupportSpecificationExtensions=!0}},hH=class extends bt(bn,gt){constructor(t){super(t),this.element=new F1,this.specPath=Wt(["document","objects","OAuthFlow"]),this.canSupportSpecificationExtensions=!0}};class pH extends bt(un,gt){constructor(n){super(n),this.element=new Ik,this.specPath=Wt(["value"])}}class fH extends bt($i,gt){constructor(n){super(n),this.element=new hk}ArrayElement(n){return n.forEach((i=>{const l=V7(i)?["document","objects","Tag"]:["value"],h=this.toRefractedElement(l,i);this.element.push(h)})),this.copyMetaAndAttributes(n,this.element),Gn}}const{fixedFields:bs}=iu.visitors.document.objects.JSONSchema,Ye={visitors:{value:gt,document:{objects:{OpenApi:{$visitor:H7,fixedFields:{openapi:G7,info:{$ref:"#/visitors/document/objects/Info"},servers:qk,paths:{$ref:"#/visitors/document/objects/Paths"},components:{$ref:"#/visitors/document/objects/Components"},security:A9,tags:fH,externalDocs:{$ref:"#/visitors/document/objects/ExternalDocumentation"}}},Info:{$visitor:X7,fixedFields:{title:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},termsOfService:{$ref:"#/visitors/value"},contact:{$ref:"#/visitors/document/objects/Contact"},license:{$ref:"#/visitors/document/objects/License"},version:class extends gt{StringElement(t){const n=super.enter(t);return this.element.classes.push("api-version"),this.element.classes.push("version"),n}}}},Contact:{$visitor:Y7,fixedFields:{name:{$ref:"#/visitors/value"},url:{$ref:"#/visitors/value"},email:{$ref:"#/visitors/value"}}},License:{$visitor:Z7,fixedFields:{name:{$ref:"#/visitors/value"},url:{$ref:"#/visitors/value"}}},Server:{$visitor:Q7,fixedFields:{url:class extends gt{StringElement(t){const n=super.enter(t);return this.element.classes.push("server-url"),n}},description:{$ref:"#/visitors/value"},variables:t9}},ServerVariable:{$visitor:e9,fixedFields:{enum:{$ref:"#/visitors/value"},default:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"}}},Components:{$visitor:O9,fixedFields:{schemas:L9,responses:F9,parameters:q9,examples:B9,requestBodies:U9,headers:K9,securitySchemes:V9,links:H9,callbacks:G9}},Paths:{$visitor:J9},PathItem:{$visitor:cH,fixedFields:{$ref:class extends gt{StringElement(t){const n=super.enter(t);return this.element.classes.push("reference-value"),n}},summary:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},get:{$ref:"#/visitors/document/objects/Operation"},put:{$ref:"#/visitors/document/objects/Operation"},post:{$ref:"#/visitors/document/objects/Operation"},delete:{$ref:"#/visitors/document/objects/Operation"},options:{$ref:"#/visitors/document/objects/Operation"},head:{$ref:"#/visitors/document/objects/Operation"},patch:{$ref:"#/visitors/document/objects/Operation"},trace:{$ref:"#/visitors/document/objects/Operation"},servers:class extends qk{constructor(t){super(t),this.element=new Sk}},parameters:class extends iP{constructor(t){super(t),this.element=new Ek}}}},Operation:{$visitor:aH,fixedFields:{tags:class extends gt{constructor(t){super(t),this.element=new Ak}ArrayElement(t){return this.element=this.element.concat(Ct(t)),Gn}},summary:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},externalDocs:{$ref:"#/visitors/document/objects/ExternalDocumentation"},operationId:{$ref:"#/visitors/value"},parameters:class extends iP{constructor(t){super(t),this.element=new Q1}},requestBody:class extends Gl{constructor(t){super(t),this.alternator=[{predicate:wr,specPath:["document","objects","Reference"]},{predicate:pi,specPath:["document","objects","RequestBody"]}]}ObjectElement(t){const n=Gl.prototype.enter.call(this,t);return fr(this.element)&&this.element.setMetaProperty("referenced-element","requestBody"),n}},responses:{$ref:"#/visitors/document/objects/Responses"},callbacks:oH,deprecated:{$ref:"#/visitors/value"},security:lH,servers:class extends qk{constructor(t){super(t),this.element=new kk}}}},ExternalDocumentation:{$visitor:Y9,fixedFields:{description:{$ref:"#/visitors/value"},url:{$ref:"#/visitors/value"}}},Parameter:{$visitor:T9,fixedFields:{name:{$ref:"#/visitors/value"},in:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},required:{$ref:"#/visitors/value"},deprecated:{$ref:"#/visitors/value"},allowEmptyValue:{$ref:"#/visitors/value"},style:{$ref:"#/visitors/value"},explode:{$ref:"#/visitors/value"},allowReserved:{$ref:"#/visitors/value"},schema:_9,example:{$ref:"#/visitors/value"},examples:class extends Uk{constructor(t){super(t),this.element=new jk}},content:class extends rE{constructor(t){super(t),this.element=new Ck}}}},RequestBody:{$visitor:Q9,fixedFields:{description:{$ref:"#/visitors/value"},content:class extends rE{constructor(t){super(t),this.element=new Rk}},required:{$ref:"#/visitors/value"}}},MediaType:{$visitor:n9,fixedFields:{schema:E9,example:{$ref:"#/visitors/value"},examples:class extends Uk{constructor(t){super(t),this.element=new Tk}},encoding:j9}},Encoding:{$visitor:Z9,fixedFields:{contentType:{$ref:"#/visitors/value"},headers:W9,style:{$ref:"#/visitors/value"},explode:{$ref:"#/visitors/value"},allowReserved:{$ref:"#/visitors/value"}}},Responses:{$visitor:sH,fixedFields:{default:iH}},Response:{$visitor:tH,fixedFields:{description:{$ref:"#/visitors/value"},headers:nH,content:class extends rE{constructor(t){super(t),this.element=new Dk}},links:rH}},Callback:{$visitor:eH},Example:{$visitor:X9,fixedFields:{summary:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},value:{$ref:"#/visitors/value"},externalValue:class extends gt{StringElement(t){const n=super.enter(t);return this.element.classes.push("reference-value"),n}}}},Link:{$visitor:W7,fixedFields:{operationRef:class extends gt{StringElement(t){const n=super.enter(t);return this.element.classes.push("reference-value"),n}},operationId:class extends gt{StringElement(t){const n=super.enter(t);return this.element.classes.push("reference-value"),n}},parameters:J7,requestBody:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},server:{$ref:"#/visitors/document/objects/Server"}}},Header:{$visitor:$9,fixedFields:{description:{$ref:"#/visitors/value"},required:{$ref:"#/visitors/value"},deprecated:{$ref:"#/visitors/value"},allowEmptyValue:{$ref:"#/visitors/value"},style:{$ref:"#/visitors/value"},explode:{$ref:"#/visitors/value"},allowReserved:{$ref:"#/visitors/value"},schema:N9,example:{$ref:"#/visitors/value"},examples:class extends Uk{constructor(t){super(t),this.element=new Lk}},content:class extends rE{constructor(t){super(t),this.element=new Fk}}}},Tag:{$visitor:k9,fixedFields:{name:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},externalDocs:{$ref:"#/visitors/document/objects/ExternalDocumentation"}}},Reference:{$visitor:R9,fixedFields:{$ref:class extends gt{StringElement(t){const n=super.enter(t);return this.element.classes.push("reference-value"),n}}}},JSONSchema:{$ref:"#/visitors/document/objects/Schema"},JSONReference:{$ref:"#/visitors/document/objects/Reference"},Schema:{$visitor:D9,fixedFields:{title:bs.title,multipleOf:bs.multipleOf,maximum:bs.maximum,exclusiveMaximum:bs.exclusiveMaximum,minimum:bs.minimum,exclusiveMinimum:bs.exclusiveMinimum,maxLength:bs.maxLength,minLength:bs.minLength,pattern:bs.pattern,maxItems:bs.maxItems,minItems:bs.minItems,uniqueItems:bs.uniqueItems,maxProperties:bs.maxProperties,minProperties:bs.minProperties,required:bs.required,enum:bs.enum,type:class extends P9{ArrayElement(t){return this.enter(t)}},allOf:class extends WD{ArrayElement(t){const n=WD.prototype.ArrayElement.call(this,t);return this.element.filter(fr).forEach((i=>{i.setMetaProperty("referenced-element","schema")})),n}},anyOf:class extends JD{ArrayElement(t){const n=JD.prototype.ArrayElement.call(this,t);return this.element.filter(fr).forEach((i=>{i.setMetaProperty("referenced-element","schema")})),n}},oneOf:class extends QD{ArrayElement(t){const n=QD.prototype.ArrayElement.call(this,t);return this.element.filter(fr).forEach((i=>{i.setMetaProperty("referenced-element","schema")})),n}},not:rP,items:class extends eP{ObjectElement(t){const n=eP.prototype.ObjectElement.call(this,t);return fr(this.element)&&this.element.setMetaProperty("referenced-element","schema"),n}ArrayElement(t){return this.enter(t)}},properties:class extends tP{ObjectElement(t){const n=tP.prototype.ObjectElement.call(this,t);return this.element.filter(fr).forEach((i=>{i.setMetaProperty("referenced-element","schema")})),n}},additionalProperties:rP,description:bs.description,format:bs.format,default:bs.default,nullable:{$ref:"#/visitors/value"},discriminator:{$ref:"#/visitors/document/objects/Discriminator"},writeOnly:{$ref:"#/visitors/value"},xml:{$ref:"#/visitors/document/objects/XML"},externalDocs:{$ref:"#/visitors/document/objects/ExternalDocumentation"},example:{$ref:"#/visitors/value"},deprecated:{$ref:"#/visitors/value"}}},Discriminator:{$visitor:M9,fixedFields:{propertyName:{$ref:"#/visitors/value"},mapping:I9}},XML:{$visitor:z9,fixedFields:{name:{$ref:"#/visitors/value"},namespace:{$ref:"#/visitors/value"},prefix:{$ref:"#/visitors/value"},attribute:{$ref:"#/visitors/value"},wrapped:{$ref:"#/visitors/value"}}},SecurityScheme:{$visitor:uH,fixedFields:{type:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},name:{$ref:"#/visitors/value"},in:{$ref:"#/visitors/value"},scheme:{$ref:"#/visitors/value"},bearerFormat:{$ref:"#/visitors/value"},flows:{$ref:"#/visitors/document/objects/OAuthFlows"},openIdConnectUrl:{$ref:"#/visitors/value"}}},OAuthFlows:{$visitor:dH,fixedFields:{implicit:{$ref:"#/visitors/document/objects/OAuthFlow"},password:{$ref:"#/visitors/document/objects/OAuthFlow"},clientCredentials:{$ref:"#/visitors/document/objects/OAuthFlow"},authorizationCode:{$ref:"#/visitors/document/objects/OAuthFlow"}}},OAuthFlow:{$visitor:hH,fixedFields:{authorizationUrl:{$ref:"#/visitors/value"},tokenUrl:{$ref:"#/visitors/value"},refreshUrl:{$ref:"#/visitors/value"},scopes:pH}},SecurityRequirement:{$visitor:C9}},extension:{$visitor:class extends $i{MemberElement(t){return this.element=Ct(t),this.element.classes.push("specification-extension"),Gn}}}}}},mH=()=>{const t=bx(q7);return{predicates:{...S9,isElement:es,isStringElement:xn,isArrayElement:Ri,isObjectElement:Un,isMemberElement:Fo,includesClasses:k1,hasElementSourceMap:xx},namespace:t}},er=t=>(n,i={})=>((l,{specPath:h=["visitors","document","objects","OpenApi","$visitor"],plugins:v=[]}={})=>{const x=LO(l),w=$1(Ye),C=new(ra(h,w))({specObj:w});return fi(x,C),km(C.element,v,{toolboxCreator:mH,visitorOptions:{keyMap:U7,nodeTypeGetter:B7}})})(n,{specPath:t,...i});Cx.refract=er(["visitors","document","objects","Callback","$visitor"]),Ax.refract=er(["visitors","document","objects","Components","$visitor"]),Ox.refract=er(["visitors","document","objects","Contact","$visitor"]),kx.refract=er(["visitors","document","objects","Example","$visitor"]),z1.refract=er(["visitors","document","objects","Discriminator","$visitor"]),L1.refract=er(["visitors","document","objects","Encoding","$visitor"]),Rx.refract=er(["visitors","document","objects","ExternalDocumentation","$visitor"]),Dm.refract=er(["visitors","document","objects","Header","$visitor"]),Tx.refract=er(["visitors","document","objects","Info","$visitor"]),_x.refract=er(["visitors","document","objects","License","$visitor"]),$x.refract=er(["visitors","document","objects","Link","$visitor"]),Nx.refract=er(["visitors","document","objects","MediaType","$visitor"]),F1.refract=er(["visitors","document","objects","OAuthFlow","$visitor"]),q1.refract=er(["visitors","document","objects","OAuthFlows","$visitor"]),Dx.refract=er(["visitors","document","objects","OpenApi","fixedFields","openapi"]),B1.refract=er(["visitors","document","objects","OpenApi","$visitor"]),Px.refract=er(["visitors","document","objects","Operation","$visitor"]),Pm.refract=er(["visitors","document","objects","Parameter","$visitor"]),Mx.refract=er(["visitors","document","objects","PathItem","$visitor"]),Ix.refract=er(["visitors","document","objects","Paths","$visitor"]),zx.refract=er(["visitors","document","objects","Reference","$visitor"]),Lx.refract=er(["visitors","document","objects","RequestBody","$visitor"]),Fx.refract=er(["visitors","document","objects","Response","$visitor"]),qx.refract=er(["visitors","document","objects","Responses","$visitor"]),X1.refract=er(["visitors","document","objects","Schema","$visitor"]),Vx.refract=er(["visitors","document","objects","SecurityRequirement","$visitor"]),Hx.refract=er(["visitors","document","objects","SecurityScheme","$visitor"]),Gx.refract=er(["visitors","document","objects","Server","$visitor"]),Xx.refract=er(["visitors","document","objects","ServerVariable","$visitor"]),Y1.refract=er(["visitors","document","objects","Tag","$visitor"]),Z1.refract=er(["visitors","document","objects","XML","$visitor"]);class sE extends Cx{}class iE extends Ax{get pathItems(){return this.get("pathItems")}set pathItems(n){this.set("pathItems",n)}}class aE extends Ox{}class Kk extends z1{}class Vk extends L1{}class oE extends kx{}class lE extends Rx{}class cE extends Dm{get schema(){return this.get("schema")}set schema(n){this.set("schema",n)}}class uE extends Tx{get license(){return this.get("license")}set license(n){this.set("license",n)}get summary(){return this.get("summary")}set summary(n){this.set("summary",n)}}class ip extends Jc{static default=new ip("https://spec.openapis.org/oas/3.1/dialect/base");constructor(n,i,l){super(n,i,l),this.element="jsonSchemaDialect"}}class dE extends _x{get identifier(){return this.get("identifier")}set identifier(n){this.set("identifier",n)}}class hE extends $x{}class pE extends Nx{get schema(){return this.get("schema")}set schema(n){this.set("schema",n)}}class Hk extends F1{}class Gk extends q1{}class Xk extends Dx{}class kd extends St{constructor(n,i,l){super(n,i,l),this.element="openApi3_1",this.classes.push("api")}get openapi(){return this.get("openapi")}set openapi(n){this.set("openapi",n)}get info(){return this.get("info")}set info(n){this.set("info",n)}get jsonSchemaDialect(){return this.get("jsonSchemaDialect")}set jsonSchemaDialect(n){this.set("jsonSchemaDialect",n)}get servers(){return this.get("servers")}set servers(n){this.set("servers",n)}get paths(){return this.get("paths")}set paths(n){this.set("paths",n)}get components(){return this.get("components")}set components(n){this.set("components",n)}get security(){return this.get("security")}set security(n){this.set("security",n)}get tags(){return this.get("tags")}set tags(n){this.set("tags",n)}get externalDocs(){return this.get("externalDocs")}set externalDocs(n){this.set("externalDocs",n)}get webhooks(){return this.get("webhooks")}set webhooks(n){this.set("webhooks",n)}}class Yx extends Px{get requestBody(){return this.get("requestBody")}set requestBody(n){this.set("requestBody",n)}}class fE extends Pm{get schema(){return this.get("schema")}set schema(n){this.set("schema",n)}}class Rd extends Mx{get GET(){return this.get("get")}set GET(n){this.set("GET",n)}get PUT(){return this.get("put")}set PUT(n){this.set("PUT",n)}get POST(){return this.get("post")}set POST(n){this.set("POST",n)}get DELETE(){return this.get("delete")}set DELETE(n){this.set("DELETE",n)}get OPTIONS(){return this.get("options")}set OPTIONS(n){this.set("OPTIONS",n)}get HEAD(){return this.get("head")}set HEAD(n){this.set("HEAD",n)}get PATCH(){return this.get("patch")}set PATCH(n){this.set("PATCH",n)}get TRACE(){return this.get("trace")}set TRACE(n){this.set("TRACE",n)}}class mE extends Ix{}class Td extends zx{}Object.defineProperty(Td.prototype,"description",{get(){return this.get("description")},set(t){this.set("description",t)},enumerable:!0}),Object.defineProperty(Td.prototype,"summary",{get(){return this.get("summary")},set(t){this.set("summary",t)},enumerable:!0});class gE extends Lx{}let yE=class extends Fx{};class vE extends qx{}class ap extends St{constructor(n,i,l){super(n,i,l),this.element="schema"}get $schema(){return this.get("$schema")}set $schema(n){this.set("$schema",n)}get $vocabulary(){return this.get("$vocabulary")}set $vocabulary(n){this.set("$vocabulary",n)}get $id(){return this.get("$id")}set $id(n){this.set("$id",n)}get $anchor(){return this.get("$anchor")}set $anchor(n){this.set("$anchor",n)}get $dynamicAnchor(){return this.get("$dynamicAnchor")}set $dynamicAnchor(n){this.set("$dynamicAnchor",n)}get $dynamicRef(){return this.get("$dynamicRef")}set $dynamicRef(n){this.set("$dynamicRef",n)}get $ref(){return this.get("$ref")}set $ref(n){this.set("$ref",n)}get $defs(){return this.get("$defs")}set $defs(n){this.set("$defs",n)}get $comment(){return this.get("$comment")}set $comment(n){this.set("$comment",n)}get allOf(){return this.get("allOf")}set allOf(n){this.set("allOf",n)}get anyOf(){return this.get("anyOf")}set anyOf(n){this.set("anyOf",n)}get oneOf(){return this.get("oneOf")}set oneOf(n){this.set("oneOf",n)}get not(){return this.get("not")}set not(n){this.set("not",n)}get if(){return this.get("if")}set if(n){this.set("if",n)}get then(){return this.get("then")}set then(n){this.set("then",n)}get else(){return this.get("else")}set else(n){this.set("else",n)}get dependentSchemas(){return this.get("dependentSchemas")}set dependentSchemas(n){this.set("dependentSchemas",n)}get prefixItems(){return this.get("prefixItems")}set prefixItems(n){this.set("prefixItems",n)}get items(){return this.get("items")}set items(n){this.set("items",n)}get containsProp(){return this.get("contains")}set containsProp(n){this.set("contains",n)}get properties(){return this.get("properties")}set properties(n){this.set("properties",n)}get patternProperties(){return this.get("patternProperties")}set patternProperties(n){this.set("patternProperties",n)}get additionalProperties(){return this.get("additionalProperties")}set additionalProperties(n){this.set("additionalProperties",n)}get propertyNames(){return this.get("propertyNames")}set propertyNames(n){this.set("propertyNames",n)}get unevaluatedItems(){return this.get("unevaluatedItems")}set unevaluatedItems(n){this.set("unevaluatedItems",n)}get unevaluatedProperties(){return this.get("unevaluatedProperties")}set unevaluatedProperties(n){this.set("unevaluatedProperties",n)}get type(){return this.get("type")}set type(n){this.set("type",n)}get enum(){return this.get("enum")}set enum(n){this.set("enum",n)}get const(){return this.get("const")}set const(n){this.set("const",n)}get multipleOf(){return this.get("multipleOf")}set multipleOf(n){this.set("multipleOf",n)}get maximum(){return this.get("maximum")}set maximum(n){this.set("maximum",n)}get exclusiveMaximum(){return this.get("exclusiveMaximum")}set exclusiveMaximum(n){this.set("exclusiveMaximum",n)}get minimum(){return this.get("minimum")}set minimum(n){this.set("minimum",n)}get exclusiveMinimum(){return this.get("exclusiveMinimum")}set exclusiveMinimum(n){this.set("exclusiveMinimum",n)}get maxLength(){return this.get("maxLength")}set maxLength(n){this.set("maxLength",n)}get minLength(){return this.get("minLength")}set minLength(n){this.set("minLength",n)}get pattern(){return this.get("pattern")}set pattern(n){this.set("pattern",n)}get maxItems(){return this.get("maxItems")}set maxItems(n){this.set("maxItems",n)}get minItems(){return this.get("minItems")}set minItems(n){this.set("minItems",n)}get uniqueItems(){return this.get("uniqueItems")}set uniqueItems(n){this.set("uniqueItems",n)}get maxContains(){return this.get("maxContains")}set maxContains(n){this.set("maxContains",n)}get minContains(){return this.get("minContains")}set minContains(n){this.set("minContains",n)}get maxProperties(){return this.get("maxProperties")}set maxProperties(n){this.set("maxProperties",n)}get minProperties(){return this.get("minProperties")}set minProperties(n){this.set("minProperties",n)}get required(){return this.get("required")}set required(n){this.set("required",n)}get dependentRequired(){return this.get("dependentRequired")}set dependentRequired(n){this.set("dependentRequired",n)}get title(){return this.get("title")}set title(n){this.set("title",n)}get description(){return this.get("description")}set description(n){this.set("description",n)}get default(){return this.get("default")}set default(n){this.set("default",n)}get deprecated(){return this.get("deprecated")}set deprecated(n){this.set("deprecated",n)}get readOnly(){return this.get("readOnly")}set readOnly(n){this.set("readOnly",n)}get writeOnly(){return this.get("writeOnly")}set writeOnly(n){this.set("writeOnly",n)}get examples(){return this.get("examples")}set examples(n){this.set("examples",n)}get format(){return this.get("format")}set format(n){this.set("format",n)}get contentEncoding(){return this.get("contentEncoding")}set contentEncoding(n){this.set("contentEncoding",n)}get contentMediaType(){return this.get("contentMediaType")}set contentMediaType(n){this.set("contentMediaType",n)}get contentSchema(){return this.get("contentSchema")}set contentSchema(n){this.set("contentSchema",n)}get discriminator(){return this.get("discriminator")}set discriminator(n){this.set("discriminator",n)}get xml(){return this.get("xml")}set xml(n){this.set("xml",n)}get externalDocs(){return this.get("externalDocs")}set externalDocs(n){this.set("externalDocs",n)}get example(){return this.get("example")}set example(n){this.set("example",n)}}class xE extends Vx{}class bE extends Hx{}class wE extends Gx{}class SE extends Xx{}class Yk extends Y1{}class Zk extends Z1{}const Wk={namespace:t=>{const{base:n}=t;return n.register("callback",sE),n.register("components",iE),n.register("contact",aE),n.register("discriminator",Kk),n.register("encoding",Vk),n.register("example",oE),n.register("externalDocumentation",lE),n.register("header",cE),n.register("info",uE),n.register("jsonSchemaDialect",ip),n.register("license",dE),n.register("link",hE),n.register("mediaType",pE),n.register("oAuthFlow",Hk),n.register("oAuthFlows",Gk),n.register("openapi",Xk),n.register("openApi3_1",kd),n.register("operation",Yx),n.register("parameter",fE),n.register("pathItem",Rd),n.register("paths",mE),n.register("reference",Td),n.register("requestBody",gE),n.register("response",yE),n.register("responses",vE),n.register("schema",ap),n.register("securityRequirement",xE),n.register("securityScheme",bE),n.register("server",wE),n.register("serverVariable",SE),n.register("tag",Yk),n.register("xml",Zk),n}};class Jk extends St{static primaryClass="components-path-items";constructor(n,i,l){super(n,i,l),this.classes.push(Jk.primaryClass)}}class Qk extends St{static primaryClass="webhooks";constructor(n,i,l){super(n,i,l),this.classes.push(Qk.primaryClass)}}const Bo=t=>{if(es(t))return`${t.element.charAt(0).toUpperCase()+t.element.slice(1)}Element`},Xl={CallbackElement:["content"],ComponentsElement:["content"],ContactElement:["content"],DiscriminatorElement:["content"],Encoding:["content"],Example:["content"],ExternalDocumentationElement:["content"],HeaderElement:["content"],InfoElement:["content"],LicenseElement:["content"],MediaTypeElement:["content"],OAuthFlowElement:["content"],OAuthFlowsElement:["content"],OpenApi3_1Element:["content"],OperationElement:["content"],ParameterElement:["content"],PathItemElement:["content"],PathsElement:["content"],ReferenceElement:["content"],RequestBodyElement:["content"],ResponseElement:["content"],ResponsesElement:["content"],SchemaElement:["content"],SecurityRequirementElement:["content"],SecuritySchemeElement:["content"],ServerElement:["content"],ServerVariableElement:["content"],TagElement:["content"],...Om};class Zx{internalStore;constructor(n,i,l){this.storageElement=n,this.storageField=i,this.storageSubField=l}get store(){if(!this.internalStore){let n=this.storageElement.get(this.storageField);Un(n)||(n=new St,this.storageElement.set(this.storageField,n));let i=n.get(this.storageSubField);Ri(i)||(i=new ur,n.set(this.storageSubField,i)),this.internalStore=i}return this.internalStore}append(n){this.includes(n)||this.store.push(n)}includes(n){return this.store.includes(n)}}const gH=({storageField:t="x-normalized"}={})=>n=>{const{predicates:i,ancestorLineageToJSONPointer:l}=n,h=(w,C)=>!!(i.isParameterElement(w)&&i.isParameterElement(C)&&i.isStringElement(w.name)&&i.isStringElement(w.in)&&i.isStringElement(C.name)&&i.isStringElement(C.in)&&it(w.name)===it(C.name)&&it(w.in)===it(C.in)),v=[];let x;return{visitor:{OpenApi3_1Element:{enter(w){x=new Zx(w,t,"parameters")},leave(){x=void 0}},PathItemElement:{enter(w,C,$,N,_){if(_.some(i.isComponentsElement))return;const{parameters:F}=w;i.isArrayElement(F)?v.push([...F.content]):v.push([])},leave(){v.pop()}},OperationElement:{leave(w,C,$,N,_){const F=t1(v);if(!Array.isArray(F)||F.length===0)return;const U=l([..._,$,w]);if(x.includes(U))return;const J=$$([],["parameters","content"],w),Y=uU(h,[...J,...F]);w.parameters=new Q1(Y),x.append(U)}}}}},yH=({storageField:t="x-normalized"}={})=>n=>{const{predicates:i,ancestorLineageToJSONPointer:l}=n;let h,v;return{visitor:{OpenApi3_1Element:{enter(x){v=new Zx(x,t,"security-requirements"),i.isArrayElement(x.security)&&(h=x.security)},leave(){v=void 0,h=void 0}},OperationElement:{leave(x,w,C,$,N){if(N.some(i.isComponentsElement))return;const _=l([...N,C,x]);var F;v.includes(_)||x.security===void 0&&h!==void 0&&(x.security=new eE((F=h)===null||F===void 0?void 0:F.content),v.append(_))}}}}},eR=t=>t.replace(/\s/g,""),tR=t=>t.replace(/\W/gi,"_"),vH=(t,n,i)=>{const l=eR(t);return l.length>0?tR(l):((h,v)=>`${tR(eR(v.toLowerCase()))}${tR(eR(h))}`)(n,i)},xH=({storageField:t="x-normalized",operationIdNormalizer:n=vH}={})=>i=>{const{predicates:l,ancestorLineageToJSONPointer:h,namespace:v}=i,x=[],w=[],C=[];let $;return{visitor:{OpenApi3_1Element:{enter(N){$=new Zx(N,t,"operation-ids")},leave(){const N=XB((_=>it(_.operationId)),w);Object.entries(N).forEach((([_,F])=>{Array.isArray(F)&&(F.length<=1||F.forEach(((U,J)=>{const Y=`${_}${J+1}`;U.operationId=new v.elements.String(Y)})))})),C.forEach((_=>{if(_.operationId===void 0)return;const F=String(it(_.operationId)),U=w.find((J=>it(J.meta.get("originalOperationId"))===F));U!==void 0&&(_.operationId=Ct.safe(U.operationId),_.meta.set("originalOperationId",F),_.set("__originalOperationId",F))})),w.length=0,C.length=0,$=void 0}},PathItemElement:{enter(N){const _=fm("path",it(N.meta.get("path")));x.push(_)},leave(){x.pop()}},OperationElement:{enter(N,_,F,U,J){if(N.operationId===void 0)return;const Y=h([...J,F,N]);if($.includes(Y))return;const Z=String(it(N.operationId)),P=t1(x),se=fm("method",it(N.meta.get("http-method"))),ae=n(Z,P,se);Z!==ae&&(N.operationId=new v.elements.String(ae),N.set("__originalOperationId",Z),N.meta.set("originalOperationId",Z),w.push(N),$.append(Y))}},LinkElement:{leave(N){l.isLinkElement(N)&&N.operationId!==void 0&&C.push(N)}}}}},bH=({storageField:t="x-normalized"}={})=>n=>{const{predicates:i,ancestorLineageToJSONPointer:l}=n;let h;return{visitor:{OpenApi3_1Element:{enter(v){h=new Zx(v,t,"parameter-examples")},leave(){h=void 0}},ParameterElement:{leave(v,x,w,C,$){var N,_;if($.some(i.isComponentsElement)||v.schema===void 0||!i.isSchemaElement(v.schema)||((N=v.schema)===null||N===void 0?void 0:N.example)===void 0&&((_=v.schema)===null||_===void 0?void 0:_.examples)===void 0)return;const F=l([...$,w,v]);if(!h.includes(F)){if(v.examples!==void 0&&i.isObjectElement(v.examples)){const U=v.examples.map((J=>Ct.safe(J.value)));return v.schema.examples!==void 0&&(v.schema.set("examples",U),h.append(F)),void(v.schema.example!==void 0&&(v.schema.set("example",U[0]),h.append(F)))}v.example!==void 0&&(v.schema.examples!==void 0&&(v.schema.set("examples",[Ct(v.example)]),h.append(F)),v.schema.example!==void 0&&(v.schema.set("example",Ct(v.example)),h.append(F)))}}}}}},wH=({storageField:t="x-normalized"}={})=>n=>{const{predicates:i,ancestorLineageToJSONPointer:l}=n;let h;return{visitor:{OpenApi3_1Element:{enter(v){h=new Zx(v,t,"header-examples")},leave(){h=void 0}},HeaderElement:{leave(v,x,w,C,$){var N,_;if($.some(i.isComponentsElement)||v.schema===void 0||!i.isSchemaElement(v.schema)||((N=v.schema)===null||N===void 0?void 0:N.example)===void 0&&((_=v.schema)===null||_===void 0?void 0:_.examples)===void 0)return;const F=l([...$,w,v]);if(!h.includes(F)){if(v.examples!==void 0&&i.isObjectElement(v.examples)){const U=v.examples.map((J=>Ct.safe(J.value)));return v.schema.examples!==void 0&&(v.schema.set("examples",U),h.append(F)),void(v.schema.example!==void 0&&(v.schema.set("example",U[0]),h.append(F)))}v.example!==void 0&&(v.schema.examples!==void 0&&(v.schema.set("examples",[Ct(v.example)]),h.append(F)),v.schema.example!==void 0&&(v.schema.set("example",Ct(v.example)),h.append(F)))}}}}}},SH=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof sE||t(l)&&n("callback",l)&&i("object",l))),EH=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof iE||t(l)&&n("components",l)&&i("object",l))),jH=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof aE||t(l)&&n("contact",l)&&i("object",l))),CH=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof oE||t(l)&&n("example",l)&&i("object",l))),AH=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof lE||t(l)&&n("externalDocumentation",l)&&i("object",l))),OH=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof cE||t(l)&&n("header",l)&&i("object",l))),kH=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof uE||t(l)&&n("info",l)&&i("object",l))),aP=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof ip||t(l)&&n("jsonSchemaDialect",l)&&i("string",l))),RH=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof dE||t(l)&&n("license",l)&&i("object",l))),TH=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof hE||t(l)&&n("link",l)&&i("object",l))),_H=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof Xk||t(l)&&n("openapi",l)&&i("string",l))),oP=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i,hasClass:l})=>h=>h instanceof kd||t(h)&&n("openApi3_1",h)&&i("object",h)&&l("api",h))),lP=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof Yx||t(l)&&n("operation",l)&&i("object",l))),$H=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof fE||t(l)&&n("parameter",l)&&i("object",l))),op=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof Rd||t(l)&&n("pathItem",l)&&i("object",l))),NH=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof mE||t(l)&&n("paths",l)&&i("object",l))),lp=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof Td||t(l)&&n("reference",l)&&i("object",l))),DH=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof gE||t(l)&&n("requestBody",l)&&i("object",l))),PH=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof yE||t(l)&&n("response",l)&&i("object",l))),MH=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof vE||t(l)&&n("responses",l)&&i("object",l))),au=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof ap||t(l)&&n("schema",l)&&i("object",l))),nR=t=>vx(t)&&t.classes.includes("boolean-json-schema"),IH=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof xE||t(l)&&n("securityRequirement",l)&&i("object",l))),zH=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof bE||t(l)&&n("securityScheme",l)&&i("object",l))),LH=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof wE||t(l)&&n("server",l)&&i("object",l))),FH=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof SE||t(l)&&n("serverVariable",l)&&i("object",l))),qH=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof pE||t(l)&&n("mediaType",l)&&i("object",l))),BH=Object.freeze(Object.defineProperty({__proto__:null,isBooleanJsonSchemaElement:nR,isCallbackElement:SH,isComponentsElement:EH,isContactElement:jH,isExampleElement:CH,isExternalDocumentationElement:AH,isHeaderElement:OH,isInfoElement:kH,isJsonSchemaDialectElement:aP,isLicenseElement:RH,isLinkElement:TH,isMediaTypeElement:qH,isOpenApi3_1Element:oP,isOpenapiElement:_H,isOperationElement:lP,isParameterElement:$H,isPathItemElement:op,isPathItemElementExternal:t=>{if(!op(t)||!xn(t.$ref))return!1;const n=it(t.$ref);return typeof n=="string"&&n.length>0&&!n.startsWith("#")},isPathsElement:NH,isReferenceElement:lp,isReferenceElementExternal:t=>{if(!lp(t)||!xn(t.$ref))return!1;const n=it(t.$ref);return typeof n=="string"&&n.length>0&&!n.startsWith("#")},isRequestBodyElement:DH,isResponseElement:PH,isResponsesElement:MH,isSchemaElement:au,isSecurityRequirementElement:IH,isSecuritySchemeElement:zH,isServerElement:LH,isServerVariableElement:FH},Symbol.toStringTag,{value:"Module"})),UH=t=>{const n=t.reduce(((i,l,h)=>{if(Fo(l)){const v=String(it(l.key));i.push(v)}else if(Ri(t[h-2])){const v=String(t[h-2].content.indexOf(l));i.push(v)}return i}),[]);return LD(n)},cP=()=>{const t=bx(Wk);return{predicates:{...BH,isElement:es,isStringElement:xn,isArrayElement:Ri,isObjectElement:Un,isMemberElement:Fo,isServersElement:ZD,includesClasses:k1,hasElementSourceMap:xx},ancestorLineageToJSONPointer:UH,namespace:t}};class KH extends bt(bn,gt){constructor(n){super(n),this.element=new kd,this.specPath=Wt(["document","objects","OpenApi"]),this.canSupportSpecificationExtensions=!0,this.openApiSemanticElement=this.element}ObjectElement(n){return this.openApiGenericElement=n,bn.prototype.ObjectElement.call(this,n)}}const{visitors:{document:{objects:{Info:{$visitor:VH}}}}}=Ye,{visitors:{document:{objects:{Contact:{$visitor:HH}}}}}=Ye,{visitors:{document:{objects:{License:{$visitor:GH}}}}}=Ye,{visitors:{document:{objects:{Link:{$visitor:XH}}}}}=Ye;class YH extends bt($i,gt){StringElement(n){const i=new ip(it(n));return this.copyMetaAndAttributes(n,i),this.element=i,Gn}}const{visitors:{document:{objects:{Server:{$visitor:ZH}}}}}=Ye,{visitors:{document:{objects:{ServerVariable:{$visitor:WH}}}}}=Ye,{visitors:{document:{objects:{MediaType:{$visitor:JH}}}}}=Ye,{visitors:{document:{objects:{SecurityRequirement:{$visitor:QH}}}}}=Ye,{visitors:{document:{objects:{Components:{$visitor:eG}}}}}=Ye,{visitors:{document:{objects:{Tag:{$visitor:tG}}}}}=Ye,{visitors:{document:{objects:{Reference:{$visitor:nG}}}}}=Ye,{visitors:{document:{objects:{Parameter:{$visitor:rG}}}}}=Ye,{visitors:{document:{objects:{Header:{$visitor:sG}}}}}=Ye;class ou{parent;constructor({parent:n}){this.parent=n}}class iG extends bt(bn,ou,gt){constructor(n){super(n),this.element=new ap,this.specPath=Wt(["document","objects","Schema"]),this.canSupportSpecificationExtensions=!0,this.jsonSchemaDefaultDialect=ip.default,this.passingOptionsNames.push("parent")}ObjectElement(n){this.handle$schema(n),this.handle$id(n),this.parent=this.element;const i=bn.prototype.ObjectElement.call(this,n);return xn(this.element.$ref)&&(this.element.classes.push("reference-element"),this.element.setMetaProperty("referenced-element","schema")),i}BooleanElement(n){const i=super.enter(n);return this.element.classes.push("boolean-json-schema"),i}getJsonSchemaDialect(){let n;return n=this.openApiSemanticElement!==void 0&&aP(this.openApiSemanticElement.jsonSchemaDialect)?it(this.openApiSemanticElement.jsonSchemaDialect):this.openApiGenericElement!==void 0&&xn(this.openApiGenericElement.get("jsonSchemaDialect"))?it(this.openApiGenericElement.get("jsonSchemaDialect")):it(this.jsonSchemaDefaultDialect),n}handle$schema(n){if(Ed(this.parent)&&!xn(n.get("$schema")))this.element.setMetaProperty("inherited$schema",this.getJsonSchemaDialect());else if(au(this.parent)&&!xn(n.get("$schema"))){const i=fm(it(this.parent.meta.get("inherited$schema")),it(this.parent.$schema));this.element.setMetaProperty("inherited$schema",i)}}handle$id(n){const i=this.parent!==void 0?Ct(this.parent.getMetaProperty("inherited$id",[])):new ur,l=it(n.get("$id"));uO(l)&&i.push(l),this.element.setMetaProperty("inherited$id",i)}}class aG extends bt(un,ou,gt){constructor(n){super(n),this.element=new St,this.element.classes.push("json-schema-$defs"),this.specPath=Wt(["document","objects","Schema"]),this.passingOptionsNames.push("parent")}}let oG=class extends bt($i,ou,gt){constructor(t){super(t),this.element=new ur,this.element.classes.push("json-schema-allOf"),this.passingOptionsNames.push("parent")}ArrayElement(t){return t.forEach((n=>{if(Un(n)){const i=this.toRefractedElement(["document","objects","Schema"],n);this.element.push(i)}else{const i=Ct(n);this.element.push(i)}})),this.copyMetaAndAttributes(t,this.element),Gn}};class lG extends bt($i,ou,gt){constructor(n){super(n),this.element=new ur,this.element.classes.push("json-schema-anyOf"),this.passingOptionsNames.push("parent")}ArrayElement(n){return n.forEach((i=>{if(Un(i)){const l=this.toRefractedElement(["document","objects","Schema"],i);this.element.push(l)}else{const l=Ct(i);this.element.push(l)}})),this.copyMetaAndAttributes(n,this.element),Gn}}class cG extends bt($i,ou,gt){constructor(n){super(n),this.element=new ur,this.element.classes.push("json-schema-oneOf"),this.passingOptionsNames.push("parent")}ArrayElement(n){return n.forEach((i=>{if(Un(i)){const l=this.toRefractedElement(["document","objects","Schema"],i);this.element.push(l)}else{const l=Ct(i);this.element.push(l)}})),this.copyMetaAndAttributes(n,this.element),Gn}}class uG extends bt(un,ou,gt){constructor(n){super(n),this.element=new St,this.element.classes.push("json-schema-dependentSchemas"),this.specPath=Wt(["document","objects","Schema"]),this.passingOptionsNames.push("parent")}}class dG extends bt($i,ou,gt){constructor(n){super(n),this.element=new ur,this.element.classes.push("json-schema-prefixItems"),this.passingOptionsNames.push("parent")}ArrayElement(n){return n.forEach((i=>{if(Un(i)){const l=this.toRefractedElement(["document","objects","Schema"],i);this.element.push(l)}else{const l=Ct(i);this.element.push(l)}})),this.copyMetaAndAttributes(n,this.element),Gn}}class hG extends bt(un,ou,gt){constructor(n){super(n),this.element=new St,this.element.classes.push("json-schema-properties"),this.specPath=Wt(["document","objects","Schema"]),this.passingOptionsNames.push("parent")}}class pG extends bt(un,ou,gt){constructor(n){super(n),this.element=new St,this.element.classes.push("json-schema-patternProperties"),this.specPath=Wt(["document","objects","Schema"]),this.passingOptionsNames.push("parent")}}const{visitors:{document:{objects:{Discriminator:{$visitor:fG}}}}}=Ye,{visitors:{document:{objects:{XML:{$visitor:mG}}}}}=Ye;class gG extends bt(un,gt){constructor(n){super(n),this.element=new J1,this.specPath=Wt(["document","objects","Schema"])}}class yG extends bt(un,gt){constructor(n){super(n),this.element=new Jk,this.specPath=i=>wr(i)?["document","objects","Reference"]:["document","objects","PathItem"]}ObjectElement(n){const i=un.prototype.ObjectElement.call(this,n);return this.element.filter(lp).forEach((l=>{l.setMetaProperty("referenced-element","pathItem")})),i}}const{visitors:{document:{objects:{Example:{$visitor:vG}}}}}=Ye,{visitors:{document:{objects:{ExternalDocumentation:{$visitor:xG}}}}}=Ye,{visitors:{document:{objects:{Encoding:{$visitor:bG}}}}}=Ye,{visitors:{document:{objects:{Paths:{$visitor:wG}}}}}=Ye,{visitors:{document:{objects:{RequestBody:{$visitor:SG}}}}}=Ye,{visitors:{document:{objects:{Callback:{$visitor:uP}}}}}=Ye,{visitors:{document:{objects:{Response:{$visitor:EG}}}}}=Ye,{visitors:{document:{objects:{Responses:{$visitor:jG}}}}}=Ye,{visitors:{document:{objects:{Operation:{$visitor:CG}}}}}=Ye,{visitors:{document:{objects:{PathItem:{$visitor:AG}}}}}=Ye,{visitors:{document:{objects:{SecurityScheme:{$visitor:OG}}}}}=Ye,{visitors:{document:{objects:{OAuthFlows:{$visitor:kG}}}}}=Ye,{visitors:{document:{objects:{OAuthFlow:{$visitor:RG}}}}}=Ye;class TG extends bt(un,gt){constructor(n){super(n),this.element=new Qk,this.specPath=i=>wr(i)?["document","objects","Reference"]:["document","objects","PathItem"]}ObjectElement(n){const i=un.prototype.ObjectElement.call(this,n);return this.element.filter(lp).forEach((l=>{l.setMetaProperty("referenced-element","pathItem")})),this.element.filter(op).forEach(((l,h)=>{l.setMetaProperty("webhook-name",it(h))})),i}}const _G={visitors:{value:Ye.visitors.value,document:{objects:{OpenApi:{$visitor:KH,fixedFields:{openapi:Ye.visitors.document.objects.OpenApi.fixedFields.openapi,info:{$ref:"#/visitors/document/objects/Info"},jsonSchemaDialect:YH,servers:Ye.visitors.document.objects.OpenApi.fixedFields.servers,paths:{$ref:"#/visitors/document/objects/Paths"},webhooks:TG,components:{$ref:"#/visitors/document/objects/Components"},security:Ye.visitors.document.objects.OpenApi.fixedFields.security,tags:Ye.visitors.document.objects.OpenApi.fixedFields.tags,externalDocs:{$ref:"#/visitors/document/objects/ExternalDocumentation"}}},Info:{$visitor:class extends VH{constructor(t){super(t),this.element=new uE}},fixedFields:{title:Ye.visitors.document.objects.Info.fixedFields.title,description:Ye.visitors.document.objects.Info.fixedFields.description,summary:{$ref:"#/visitors/value"},termsOfService:Ye.visitors.document.objects.Info.fixedFields.termsOfService,contact:{$ref:"#/visitors/document/objects/Contact"},license:{$ref:"#/visitors/document/objects/License"},version:Ye.visitors.document.objects.Info.fixedFields.version}},Contact:{$visitor:class extends HH{constructor(t){super(t),this.element=new aE}},fixedFields:{name:Ye.visitors.document.objects.Contact.fixedFields.name,url:Ye.visitors.document.objects.Contact.fixedFields.url,email:Ye.visitors.document.objects.Contact.fixedFields.email}},License:{$visitor:class extends GH{constructor(t){super(t),this.element=new dE}},fixedFields:{name:Ye.visitors.document.objects.License.fixedFields.name,identifier:{$ref:"#/visitors/value"},url:Ye.visitors.document.objects.License.fixedFields.url}},Server:{$visitor:class extends ZH{constructor(t){super(t),this.element=new wE}},fixedFields:{url:Ye.visitors.document.objects.Server.fixedFields.url,description:Ye.visitors.document.objects.Server.fixedFields.description,variables:Ye.visitors.document.objects.Server.fixedFields.variables}},ServerVariable:{$visitor:class extends WH{constructor(t){super(t),this.element=new SE}},fixedFields:{enum:Ye.visitors.document.objects.ServerVariable.fixedFields.enum,default:Ye.visitors.document.objects.ServerVariable.fixedFields.default,description:Ye.visitors.document.objects.ServerVariable.fixedFields.description}},Components:{$visitor:class extends eG{constructor(t){super(t),this.element=new iE}},fixedFields:{schemas:gG,responses:Ye.visitors.document.objects.Components.fixedFields.responses,parameters:Ye.visitors.document.objects.Components.fixedFields.parameters,examples:Ye.visitors.document.objects.Components.fixedFields.examples,requestBodies:Ye.visitors.document.objects.Components.fixedFields.requestBodies,headers:Ye.visitors.document.objects.Components.fixedFields.headers,securitySchemes:Ye.visitors.document.objects.Components.fixedFields.securitySchemes,links:Ye.visitors.document.objects.Components.fixedFields.links,callbacks:Ye.visitors.document.objects.Components.fixedFields.callbacks,pathItems:yG}},Paths:{$visitor:class extends wG{constructor(t){super(t),this.element=new mE}}},PathItem:{$visitor:class extends AG{constructor(t){super(t),this.element=new Rd}},fixedFields:{$ref:Ye.visitors.document.objects.PathItem.fixedFields.$ref,summary:Ye.visitors.document.objects.PathItem.fixedFields.summary,description:Ye.visitors.document.objects.PathItem.fixedFields.description,get:{$ref:"#/visitors/document/objects/Operation"},put:{$ref:"#/visitors/document/objects/Operation"},post:{$ref:"#/visitors/document/objects/Operation"},delete:{$ref:"#/visitors/document/objects/Operation"},options:{$ref:"#/visitors/document/objects/Operation"},head:{$ref:"#/visitors/document/objects/Operation"},patch:{$ref:"#/visitors/document/objects/Operation"},trace:{$ref:"#/visitors/document/objects/Operation"},servers:Ye.visitors.document.objects.PathItem.fixedFields.servers,parameters:Ye.visitors.document.objects.PathItem.fixedFields.parameters}},Operation:{$visitor:class extends CG{constructor(t){super(t),this.element=new Yx}},fixedFields:{tags:Ye.visitors.document.objects.Operation.fixedFields.tags,summary:Ye.visitors.document.objects.Operation.fixedFields.summary,description:Ye.visitors.document.objects.Operation.fixedFields.description,externalDocs:{$ref:"#/visitors/document/objects/ExternalDocumentation"},operationId:Ye.visitors.document.objects.Operation.fixedFields.operationId,parameters:Ye.visitors.document.objects.Operation.fixedFields.parameters,requestBody:Ye.visitors.document.objects.Operation.fixedFields.requestBody,responses:{$ref:"#/visitors/document/objects/Responses"},callbacks:Ye.visitors.document.objects.Operation.fixedFields.callbacks,deprecated:Ye.visitors.document.objects.Operation.fixedFields.deprecated,security:Ye.visitors.document.objects.Operation.fixedFields.security,servers:Ye.visitors.document.objects.Operation.fixedFields.servers}},ExternalDocumentation:{$visitor:class extends xG{constructor(t){super(t),this.element=new lE}},fixedFields:{description:Ye.visitors.document.objects.ExternalDocumentation.fixedFields.description,url:Ye.visitors.document.objects.ExternalDocumentation.fixedFields.url}},Parameter:{$visitor:class extends rG{constructor(t){super(t),this.element=new fE}},fixedFields:{name:Ye.visitors.document.objects.Parameter.fixedFields.name,in:Ye.visitors.document.objects.Parameter.fixedFields.in,description:Ye.visitors.document.objects.Parameter.fixedFields.description,required:Ye.visitors.document.objects.Parameter.fixedFields.required,deprecated:Ye.visitors.document.objects.Parameter.fixedFields.deprecated,allowEmptyValue:Ye.visitors.document.objects.Parameter.fixedFields.allowEmptyValue,style:Ye.visitors.document.objects.Parameter.fixedFields.style,explode:Ye.visitors.document.objects.Parameter.fixedFields.explode,allowReserved:Ye.visitors.document.objects.Parameter.fixedFields.allowReserved,schema:{$ref:"#/visitors/document/objects/Schema"},example:Ye.visitors.document.objects.Parameter.fixedFields.example,examples:Ye.visitors.document.objects.Parameter.fixedFields.examples,content:Ye.visitors.document.objects.Parameter.fixedFields.content}},RequestBody:{$visitor:class extends SG{constructor(t){super(t),this.element=new gE}},fixedFields:{description:Ye.visitors.document.objects.RequestBody.fixedFields.description,content:Ye.visitors.document.objects.RequestBody.fixedFields.content,required:Ye.visitors.document.objects.RequestBody.fixedFields.required}},MediaType:{$visitor:class extends JH{constructor(t){super(t),this.element=new pE}},fixedFields:{schema:{$ref:"#/visitors/document/objects/Schema"},example:Ye.visitors.document.objects.MediaType.fixedFields.example,examples:Ye.visitors.document.objects.MediaType.fixedFields.examples,encoding:Ye.visitors.document.objects.MediaType.fixedFields.encoding}},Encoding:{$visitor:class extends bG{constructor(t){super(t),this.element=new Vk}},fixedFields:{contentType:Ye.visitors.document.objects.Encoding.fixedFields.contentType,headers:Ye.visitors.document.objects.Encoding.fixedFields.headers,style:Ye.visitors.document.objects.Encoding.fixedFields.style,explode:Ye.visitors.document.objects.Encoding.fixedFields.explode,allowReserved:Ye.visitors.document.objects.Encoding.fixedFields.allowReserved}},Responses:{$visitor:class extends jG{constructor(t){super(t),this.element=new vE}},fixedFields:{default:Ye.visitors.document.objects.Responses.fixedFields.default}},Response:{$visitor:class extends EG{constructor(t){super(t),this.element=new yE}},fixedFields:{description:Ye.visitors.document.objects.Response.fixedFields.description,headers:Ye.visitors.document.objects.Response.fixedFields.headers,content:Ye.visitors.document.objects.Response.fixedFields.content,links:Ye.visitors.document.objects.Response.fixedFields.links}},Callback:{$visitor:class extends uP{constructor(t){super(t),this.element=new sE,this.specPath=n=>wr(n)?["document","objects","Reference"]:["document","objects","PathItem"]}ObjectElement(t){const n=uP.prototype.ObjectElement.call(this,t);return this.element.filter(lp).forEach((i=>{i.setMetaProperty("referenced-element","pathItem")})),n}}},Example:{$visitor:class extends vG{constructor(t){super(t),this.element=new oE}},fixedFields:{summary:Ye.visitors.document.objects.Example.fixedFields.summary,description:Ye.visitors.document.objects.Example.fixedFields.description,value:Ye.visitors.document.objects.Example.fixedFields.value,externalValue:Ye.visitors.document.objects.Example.fixedFields.externalValue}},Link:{$visitor:class extends XH{constructor(t){super(t),this.element=new hE}},fixedFields:{operationRef:Ye.visitors.document.objects.Link.fixedFields.operationRef,operationId:Ye.visitors.document.objects.Link.fixedFields.operationId,parameters:Ye.visitors.document.objects.Link.fixedFields.parameters,requestBody:Ye.visitors.document.objects.Link.fixedFields.requestBody,description:Ye.visitors.document.objects.Link.fixedFields.description,server:{$ref:"#/visitors/document/objects/Server"}}},Header:{$visitor:class extends sG{constructor(t){super(t),this.element=new cE}},fixedFields:{description:Ye.visitors.document.objects.Header.fixedFields.description,required:Ye.visitors.document.objects.Header.fixedFields.required,deprecated:Ye.visitors.document.objects.Header.fixedFields.deprecated,allowEmptyValue:Ye.visitors.document.objects.Header.fixedFields.allowEmptyValue,style:Ye.visitors.document.objects.Header.fixedFields.style,explode:Ye.visitors.document.objects.Header.fixedFields.explode,allowReserved:Ye.visitors.document.objects.Header.fixedFields.allowReserved,schema:{$ref:"#/visitors/document/objects/Schema"},example:Ye.visitors.document.objects.Header.fixedFields.example,examples:Ye.visitors.document.objects.Header.fixedFields.examples,content:Ye.visitors.document.objects.Header.fixedFields.content}},Tag:{$visitor:class extends tG{constructor(t){super(t),this.element=new Yk}},fixedFields:{name:Ye.visitors.document.objects.Tag.fixedFields.name,description:Ye.visitors.document.objects.Tag.fixedFields.description,externalDocs:{$ref:"#/visitors/document/objects/ExternalDocumentation"}}},Reference:{$visitor:class extends nG{constructor(t){super(t),this.element=new Td}},fixedFields:{$ref:Ye.visitors.document.objects.Reference.fixedFields.$ref,summary:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"}}},Schema:{$visitor:iG,fixedFields:{$schema:{$ref:"#/visitors/value"},$vocabulary:class extends gt{ObjectElement(t){const n=super.enter(t);return this.element.classes.push("json-schema-$vocabulary"),n}},$id:{$ref:"#/visitors/value"},$anchor:{$ref:"#/visitors/value"},$dynamicAnchor:{$ref:"#/visitors/value"},$dynamicRef:{$ref:"#/visitors/value"},$ref:class extends gt{StringElement(t){const n=super.enter(t);return this.element.classes.push("reference-value"),n}},$defs:aG,$comment:{$ref:"#/visitors/value"},allOf:oG,anyOf:lG,oneOf:cG,not:{$ref:"#/visitors/document/objects/Schema"},if:{$ref:"#/visitors/document/objects/Schema"},then:{$ref:"#/visitors/document/objects/Schema"},else:{$ref:"#/visitors/document/objects/Schema"},dependentSchemas:uG,prefixItems:dG,items:{$ref:"#/visitors/document/objects/Schema"},contains:{$ref:"#/visitors/document/objects/Schema"},properties:hG,patternProperties:pG,additionalProperties:{$ref:"#/visitors/document/objects/Schema"},propertyNames:{$ref:"#/visitors/document/objects/Schema"},unevaluatedItems:{$ref:"#/visitors/document/objects/Schema"},unevaluatedProperties:{$ref:"#/visitors/document/objects/Schema"},type:class extends gt{StringElement(t){const n=super.enter(t);return this.element.classes.push("json-schema-type"),n}ArrayElement(t){const n=super.enter(t);return this.element.classes.push("json-schema-type"),n}},enum:class extends gt{ArrayElement(t){const n=super.enter(t);return this.element.classes.push("json-schema-enum"),n}},const:{$ref:"#/visitors/value"},multipleOf:{$ref:"#/visitors/value"},maximum:{$ref:"#/visitors/value"},exclusiveMaximum:{$ref:"#/visitors/value"},minimum:{$ref:"#/visitors/value"},exclusiveMinimum:{$ref:"#/visitors/value"},maxLength:{$ref:"#/visitors/value"},minLength:{$ref:"#/visitors/value"},pattern:{$ref:"#/visitors/value"},maxItems:{$ref:"#/visitors/value"},minItems:{$ref:"#/visitors/value"},uniqueItems:{$ref:"#/visitors/value"},maxContains:{$ref:"#/visitors/value"},minContains:{$ref:"#/visitors/value"},maxProperties:{$ref:"#/visitors/value"},minProperties:{$ref:"#/visitors/value"},required:{$ref:"#/visitors/value"},dependentRequired:class extends gt{ObjectElement(t){const n=super.enter(t);return this.element.classes.push("json-schema-dependentRequired"),n}},title:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},default:{$ref:"#/visitors/value"},deprecated:{$ref:"#/visitors/value"},readOnly:{$ref:"#/visitors/value"},writeOnly:{$ref:"#/visitors/value"},examples:class extends gt{ArrayElement(t){const n=super.enter(t);return this.element.classes.push("json-schema-examples"),n}},format:{$ref:"#/visitors/value"},contentEncoding:{$ref:"#/visitors/value"},contentMediaType:{$ref:"#/visitors/value"},contentSchema:{$ref:"#/visitors/document/objects/Schema"},discriminator:{$ref:"#/visitors/document/objects/Discriminator"},xml:{$ref:"#/visitors/document/objects/XML"},externalDocs:{$ref:"#/visitors/document/objects/ExternalDocumentation"},example:{$ref:"#/visitors/value"}}},Discriminator:{$visitor:class extends fG{constructor(t){super(t),this.element=new Kk,this.canSupportSpecificationExtensions=!0}},fixedFields:{propertyName:Ye.visitors.document.objects.Discriminator.fixedFields.propertyName,mapping:Ye.visitors.document.objects.Discriminator.fixedFields.mapping}},XML:{$visitor:class extends mG{constructor(t){super(t),this.element=new Zk}},fixedFields:{name:Ye.visitors.document.objects.XML.fixedFields.name,namespace:Ye.visitors.document.objects.XML.fixedFields.namespace,prefix:Ye.visitors.document.objects.XML.fixedFields.prefix,attribute:Ye.visitors.document.objects.XML.fixedFields.attribute,wrapped:Ye.visitors.document.objects.XML.fixedFields.wrapped}},SecurityScheme:{$visitor:class extends OG{constructor(t){super(t),this.element=new bE}},fixedFields:{type:Ye.visitors.document.objects.SecurityScheme.fixedFields.type,description:Ye.visitors.document.objects.SecurityScheme.fixedFields.description,name:Ye.visitors.document.objects.SecurityScheme.fixedFields.name,in:Ye.visitors.document.objects.SecurityScheme.fixedFields.in,scheme:Ye.visitors.document.objects.SecurityScheme.fixedFields.scheme,bearerFormat:Ye.visitors.document.objects.SecurityScheme.fixedFields.bearerFormat,flows:{$ref:"#/visitors/document/objects/OAuthFlows"},openIdConnectUrl:Ye.visitors.document.objects.SecurityScheme.fixedFields.openIdConnectUrl}},OAuthFlows:{$visitor:class extends kG{constructor(t){super(t),this.element=new Gk}},fixedFields:{implicit:{$ref:"#/visitors/document/objects/OAuthFlow"},password:{$ref:"#/visitors/document/objects/OAuthFlow"},clientCredentials:{$ref:"#/visitors/document/objects/OAuthFlow"},authorizationCode:{$ref:"#/visitors/document/objects/OAuthFlow"}}},OAuthFlow:{$visitor:class extends RG{constructor(t){super(t),this.element=new Hk}},fixedFields:{authorizationUrl:Ye.visitors.document.objects.OAuthFlow.fixedFields.authorizationUrl,tokenUrl:Ye.visitors.document.objects.OAuthFlow.fixedFields.tokenUrl,refreshUrl:Ye.visitors.document.objects.OAuthFlow.fixedFields.refreshUrl,scopes:Ye.visitors.document.objects.OAuthFlow.fixedFields.scopes}},SecurityRequirement:{$visitor:class extends QH{constructor(t){super(t),this.element=new xE}}}},extension:{$visitor:Ye.visitors.document.extension.$visitor}}}},Yn=t=>(n,i={})=>((l,{specPath:h=["visitors","document","objects","OpenApi","$visitor"],plugins:v=[]}={})=>{const x=LO(l),w=$1(_G),C=new(ra(h,w))({specObj:w});return fi(x,C),km(C.element,v,{toolboxCreator:cP,visitorOptions:{keyMap:Xl,nodeTypeGetter:Bo}})})(n,{specPath:t,...i});sE.refract=Yn(["visitors","document","objects","Callback","$visitor"]),iE.refract=Yn(["visitors","document","objects","Components","$visitor"]),aE.refract=Yn(["visitors","document","objects","Contact","$visitor"]),oE.refract=Yn(["visitors","document","objects","Example","$visitor"]),Kk.refract=Yn(["visitors","document","objects","Discriminator","$visitor"]),Vk.refract=Yn(["visitors","document","objects","Encoding","$visitor"]),lE.refract=Yn(["visitors","document","objects","ExternalDocumentation","$visitor"]),cE.refract=Yn(["visitors","document","objects","Header","$visitor"]),uE.refract=Yn(["visitors","document","objects","Info","$visitor"]),ip.refract=Yn(["visitors","document","objects","OpenApi","fixedFields","jsonSchemaDialect"]),dE.refract=Yn(["visitors","document","objects","License","$visitor"]),hE.refract=Yn(["visitors","document","objects","Link","$visitor"]),pE.refract=Yn(["visitors","document","objects","MediaType","$visitor"]),Hk.refract=Yn(["visitors","document","objects","OAuthFlow","$visitor"]),Gk.refract=Yn(["visitors","document","objects","OAuthFlows","$visitor"]),Xk.refract=Yn(["visitors","document","objects","OpenApi","fixedFields","openapi"]),kd.refract=Yn(["visitors","document","objects","OpenApi","$visitor"]),Yx.refract=Yn(["visitors","document","objects","Operation","$visitor"]),fE.refract=Yn(["visitors","document","objects","Parameter","$visitor"]),Rd.refract=Yn(["visitors","document","objects","PathItem","$visitor"]),mE.refract=Yn(["visitors","document","objects","Paths","$visitor"]),Td.refract=Yn(["visitors","document","objects","Reference","$visitor"]),gE.refract=Yn(["visitors","document","objects","RequestBody","$visitor"]),yE.refract=Yn(["visitors","document","objects","Response","$visitor"]),vE.refract=Yn(["visitors","document","objects","Responses","$visitor"]),ap.refract=Yn(["visitors","document","objects","Schema","$visitor"]),xE.refract=Yn(["visitors","document","objects","SecurityRequirement","$visitor"]),bE.refract=Yn(["visitors","document","objects","SecurityScheme","$visitor"]),wE.refract=Yn(["visitors","document","objects","Server","$visitor"]),SE.refract=Yn(["visitors","document","objects","ServerVariable","$visitor"]),Yk.refract=Yn(["visitors","document","objects","Tag","$visitor"]),Zk.refract=Yn(["visitors","document","objects","XML","$visitor"]);class $G extends Sx{constructor(n){super({...n??{},name:"binary"})}canParse(n){return this.fileExtensions.length===0||this.fileExtensions.includes(n.extension)}parse(n){try{const i=unescape(encodeURIComponent(n.toString())),l=btoa(i),h=new Lo;if(l.length!==0){const v=new Jc(l);v.classes.push("result"),h.push(v)}return h}catch(i){throw new nu(`Error parsing "${n.uri}"`,{cause:i})}}}class NG extends class{name;constructor({name:n}){this.name=n}}{constructor(n){super({...n??{},name:"openapi-3-1"})}canResolve(n,i){const l=i.dereference.strategies.find((h=>h.name==="openapi-3-1"));return l!==void 0&&l.canDereference(n,i)}async resolve(n,i){const l=i.dereference.strategies.find((x=>x.name==="openapi-3-1"));if(l===void 0)throw new dD('"openapi-3-1" dereference strategy is not available.');const h=new ym,v=W$(i,{resolve:{internal:!1},dereference:{refSet:h}});return await l.dereference(n,v),h}}const{AbortController:DG,AbortSignal:PG}=globalThis;globalThis.AbortController===void 0&&(globalThis.AbortController=DG),globalThis.AbortSignal===void 0&&(globalThis.AbortSignal=PG);class dP extends class extends class{name;constructor({name:n}){this.name=n}}{timeout;redirects;withCredentials;constructor(n){const{name:i="http-resolver",timeout:l=5e3,redirects:h=5,withCredentials:v=!1}=n??{};super({name:i}),this.timeout=l,this.redirects=h,this.withCredentials=v}canRead(n){return c1(n.uri)}}{swaggerHTTPClient=ni;swaggerHTTPClientConfig;constructor({swaggerHTTPClient:n=ni,swaggerHTTPClientConfig:i={},...l}={}){super({...l,name:"http-swagger-client"}),this.swaggerHTTPClient=n,this.swaggerHTTPClientConfig=i}getHttpClient(){return this.swaggerHTTPClient}async read(n){const i=this.getHttpClient(),l=new AbortController,{signal:h}=l,v=setTimeout((()=>{l.abort()}),this.timeout),x=this.getHttpClient().withCredentials||this.withCredentials?"include":"same-origin",w=this.redirects===0?"error":"follow",C=this.redirects>0?this.redirects:void 0;try{return(await i({url:n.uri,signal:h,userFetch:async($,N)=>{let _=await fetch($,N);try{_.headers.delete("Content-Type")}catch{_=new Response(_.body,{..._,headers:new Headers(_.headers)}),_.headers.delete("Content-Type")}return _},credentials:x,redirect:w,follow:C,...this.swaggerHTTPClientConfig})).text.arrayBuffer()}catch($){throw new J$(`Error downloading "${n.uri}"`,{cause:$})}finally{clearTimeout(v)}}}class hP extends Sx{constructor(n={}){super({name:"json-swagger-client",mediaTypes:["application/json"],...n})}async canParse(n){const i=this.fileExtensions.length===0||this.fileExtensions.includes(n.extension),l=this.mediaTypes.includes(n.mediaType);if(!i)return!1;if(l)return!0;if(!l)try{return JSON.parse(n.toString()),!0}catch{return!1}return!1}async parse(n){if(this.sourceMap)throw new nu("json-swagger-client parser plugin doesn't support sourceMaps option");const i=new Lo,l=n.toString();if(this.allowEmpty&&l.trim()==="")return i;try{const h=uD(JSON.parse(l));return h.classes.push("result"),i.push(h),i}catch(h){throw new nu(`Error parsing "${n.uri}"`,{cause:h})}}}class pP extends Sx{constructor(n={}){super({name:"yaml-1-2-swagger-client",mediaTypes:["text/yaml","application/yaml"],...n})}async canParse(n){const i=this.fileExtensions.length===0||this.fileExtensions.includes(n.extension),l=this.mediaTypes.includes(n.mediaType);if(!i)return!1;if(l)return!0;if(!l)try{return qu.load(n.toString(),{schema:xc}),!0}catch{return!1}return!1}async parse(n){if(this.sourceMap)throw new nu("yaml-1-2-swagger-client parser plugin doesn't support sourceMaps option");const i=new Lo,l=n.toString();try{const h=qu.load(l,{schema:xc});if(this.allowEmpty&&h===void 0)return i;const v=uD(h);return v.classes.push("result"),i.push(v),i}catch(h){throw new nu(`Error parsing "${n.uri}"`,{cause:h})}}}class fP extends Sx{detectionRegExp=/"openapi"\s*:\s*"(?<version_json>3\.1\.(?:[1-9]\d*|0))"/;constructor(n={}){super({name:"openapi-json-3-1-swagger-client",mediaTypes:new ck(...Nm.filterByFormat("generic"),...Nm.filterByFormat("json")),...n})}async canParse(n){const i=this.fileExtensions.length===0||this.fileExtensions.includes(n.extension),l=this.mediaTypes.includes(n.mediaType);if(!i)return!1;if(l)return!0;if(!l)try{const h=n.toString();return JSON.parse(h),this.detectionRegExp.test(h)}catch{return!1}return!1}async parse(n){if(this.sourceMap)throw new nu("openapi-json-3-1-swagger-client parser plugin doesn't support sourceMaps option");const i=new Lo,l=n.toString();if(this.allowEmpty&&l.trim()==="")return i;try{const h=JSON.parse(l),v=kd.refract(h,this.refractorOpts);return v.classes.push("result"),i.push(v),i}catch(h){throw new nu(`Error parsing "${n.uri}"`,{cause:h})}}}class mP extends Sx{detectionRegExp=/(?<YAML>^(["']?)openapi\2\s*:\s*(["']?)(?<version_yaml>3\.1\.(?:[1-9]\d*|0))\3(?:\s+|$))|(?<JSON>"openapi"\s*:\s*"(?<version_json>3\.1\.(?:[1-9]\d*|0))")/m;constructor(n={}){super({name:"openapi-yaml-3-1-swagger-client",mediaTypes:new ck(...Nm.filterByFormat("generic"),...Nm.filterByFormat("yaml")),...n})}async canParse(n){const i=this.fileExtensions.length===0||this.fileExtensions.includes(n.extension),l=this.mediaTypes.includes(n.mediaType);if(!i)return!1;if(l)return!0;if(!l)try{const h=n.toString();return qu.load(h),this.detectionRegExp.test(h)}catch{return!1}return!1}async parse(n){if(this.sourceMap)throw new nu("openapi-yaml-3-1-swagger-client parser plugin doesn't support sourceMaps option");const i=new Lo,l=n.toString();try{const h=qu.load(l,{schema:xc});if(this.allowEmpty&&h===void 0)return i;const v=kd.refract(h,this.refractorOpts);return v.classes.push("result"),i.push(v),i}catch(h){throw new nu(`Error parsing "${n.uri}"`,{cause:h})}}}const EE=t=>/^[A-Za-z_][A-Za-z_0-9.-]*$/.test(t),Lm=t=>{const n=vO(t);return hO("#",n)},rR=(t,n)=>{const i=(h=>{if(!EE(h))throw new VV(h);return h})(t),l=aD((h=>au(h)&&it(h.$anchor)===i),n);if(Ed(l))throw new UV(`Evaluation failed on token: "${i}"`);return l},gP=(t,n)=>{if(n.$ref===void 0)return;const i=vO(it(n.$ref)),l=it(n.meta.get("inherited$id"));return`${Yh(((h,v)=>$s(h,dx(cr(v)))),t,[...l,it(n.$ref)])}${i==="#"?"":i}`},Wx=t=>{if(Wx.cache.has(t))return Wx.cache.get(t);const n=ap.refract(t);return Wx.cache.set(t,n),n};Wx.cache=new WeakMap;const mi=t=>rp(t)?Wx(t):t,jE=(t,n)=>{const{cache:i}=jE,l=cr(t),h=C=>au(C)&&C.$id!==void 0;if(!i.has(n)){const C=(($,N)=>{const _=new rD({predicate:$});return fi(N,_),new gx(_.result)})(h,n);i.set(n,Array.from(C))}const v=i.get(n).find((C=>((N,_)=>{if(_.$id===void 0)return;const F=it(_.meta.get("inherited$id"));return Yh(((U,J)=>$s(U,dx(cr(J)))),N,[...F,it(_.$id)])})(l,C)===l));if(Ed(v))throw new GO(`Evaluation failed on URI: "${t}"`);let x,w;return EE(Lm(t))?(x=rR,w=Lm(t)):(x=qo,w=Ja(t)),x(w,v)};jE.cache=new WeakMap;const sR=fi[Symbol.for("nodejs.util.promisify.custom")],qs=new KO,Yl=(t,n,i,l)=>{Fo(l)?l.value=t:Array.isArray(l)&&(l[i]=t)};class Fm{indirections;namespace;reference;options;ancestors;refractCache;constructor({reference:n,namespace:i,options:l,indirections:h=[],ancestors:v=new HO,refractCache:x=new Map}){this.indirections=h,this.namespace=i,this.reference=n,this.options=l,this.ancestors=new HO(...v),this.refractCache=x}toBaseURI(n){return $s(this.reference.uri,dx(cr(n)))}async toReference(n){if(this.reference.depth>=this.options.resolve.maxDepth)throw new HV(`Maximum resolution depth of ${this.options.resolve.maxDepth} has been exceeded by file "${this.reference.uri}"`);const i=this.toBaseURI(n),{refSet:l}=this.reference;if(l.has(i))return l.find(D$(i,"uri"));const h=await(async(x,w)=>{const C=new hx({uri:dx(cr(x)),mediaType:w.parse.mediaType}),$=await(async(N,_)=>{const F=_.resolve.resolvers.map((J=>{const Y=Object.create(J);return Object.assign(Y,_.resolve.resolverOpts)})),U=await xO("canRead",[N,_],F);if(cx(U))throw new Q$(N.uri);try{const{result:J}=await bO("read",[N],U);return J}catch(J){throw new SO(`Error while reading file "${N.uri}"`,{cause:J})}})(C,w);return(async(N,_)=>{const F=_.parse.parsers.map((J=>{const Y=Object.create(J);return Object.assign(Y,_.parse.parserOpts)})),U=await xO("canParse",[N,_],F);if(cx(U))throw new Q$(N.uri);try{const{plugin:J,result:Y}=await bO("parse",[N,_],U);return!J.allowEmpty&&Y.isEmpty?Promise.reject(new wO(`Error while parsing file "${N.uri}". File is empty.`)):Y}catch(J){throw new wO(`Error while parsing file "${N.uri}"`,{cause:J})}})(new hx({...C,data:$}),w)})(zo(i),{...this.options,parse:{...this.options.parse,mediaType:"text/plain"}}),v=new tu({uri:i,value:Ct(h),depth:this.reference.depth+1});if(l.add(v),this.options.dereference.immutable){const x=new tu({uri:`immutable://${i}`,value:h,depth:this.reference.depth+1});l.add(x)}return v}toAncestorLineage(n){const i=new Set(n.filter(es));return[new HO(...this.ancestors,i),i]}async ReferenceElement(n,i,l,h,v,x){if(this.indirections.includes(n))return!1;const[w,C]=this.toAncestorLineage([...v,l]),$=this.toBaseURI(it(n.$ref)),N=cr(this.reference.uri)===$,_=!N;if(!this.options.resolve.internal&&N||!this.options.resolve.external&&_)return!1;const F=await this.toReference(it(n.$ref)),U=$s($,it(n.$ref));this.indirections.push(n);const J=Ja(U);let Y=qo(J,F.value.result);if(Y.id=qs.identify(Y),rp(Y)){const ge=it(n.meta.get("referenced-element")),pe=`${ge}-${it(qs.identify(Y))}`;this.refractCache.has(pe)?Y=this.refractCache.get(pe):wr(Y)?(Y=Td.refract(Y),Y.setMetaProperty("referenced-element",ge),this.refractCache.set(pe,Y)):(Y=this.namespace.getElementClass(ge).refract(Y),this.refractCache.set(pe,Y))}if(n===Y)throw new br("Recursive Reference Object detected");if(this.indirections.length>this.options.dereference.maxDepth)throw new Rm(`Maximum dereference depth of "${this.options.dereference.maxDepth}" has been exceeded in file "${this.reference.uri}"`);if(w.includes(Y)){if(F.refSet.circular=!0,this.options.dereference.circular==="error")throw new br("Circular reference detected");if(this.options.dereference.circular==="replace"){var Z,P;const ge=new eu(Y.id,{type:"reference",uri:F.uri,$ref:it(n.$ref)}),pe=((Z=(P=this.options.dereference.strategyOpts["openapi-3-1"])===null||P===void 0?void 0:P.circularReplacer)!==null&&Z!==void 0?Z:this.options.dereference.circularReplacer)(ge);return x.replaceWith(pe,Yl),!l&&pe}}const se=cr(F.refSet.rootRef.uri)!==F.uri,ae=["error","replace"].includes(this.options.dereference.circular);if((_||se||lp(Y)||ae)&&!w.includesCycle(Y)){C.add(n);const ge=new Fm({reference:F,namespace:this.namespace,indirections:[...this.indirections],options:this.options,refractCache:this.refractCache,ancestors:w});Y=await sR(Y,ge,{keyMap:Xl,nodeTypeGetter:Bo}),C.delete(n)}this.indirections.pop();const he=Ti(Y);return he.setMetaProperty("id",qs.generateId()),he.setMetaProperty("ref-fields",{$ref:it(n.$ref),description:it(n.description),summary:it(n.summary)}),he.setMetaProperty("ref-origin",F.uri),he.setMetaProperty("ref-referencing-element-id",Ct(qs.identify(n))),Un(Y)&&Un(he)&&(n.hasKey("description")&&"description"in Y&&(he.remove("description"),he.set("description",n.get("description"))),n.hasKey("summary")&&"summary"in Y&&(he.remove("summary"),he.set("summary",n.get("summary")))),x.replaceWith(he,Yl),!l&&he}async PathItemElement(n,i,l,h,v,x){if(!xn(n.$ref))return;if(this.indirections.includes(n))return!1;const[w,C]=this.toAncestorLineage([...v,l]),$=this.toBaseURI(it(n.$ref)),N=cr(this.reference.uri)===$,_=!N;if(!this.options.resolve.internal&&N||!this.options.resolve.external&&_)return;const F=await this.toReference(it(n.$ref)),U=$s($,it(n.$ref));this.indirections.push(n);const J=Ja(U);let Y=qo(J,F.value.result);if(Y.id=qs.identify(Y),rp(Y)){const he=`path-item-${it(qs.identify(Y))}`;this.refractCache.has(he)?Y=this.refractCache.get(he):(Y=Rd.refract(Y),this.refractCache.set(he,Y))}if(n===Y)throw new br("Recursive Path Item Object reference detected");if(this.indirections.length>this.options.dereference.maxDepth)throw new Rm(`Maximum dereference depth of "${this.options.dereference.maxDepth}" has been exceeded in file "${this.reference.uri}"`);if(w.includes(Y)){if(F.refSet.circular=!0,this.options.dereference.circular==="error")throw new br("Circular reference detected");if(this.options.dereference.circular==="replace"){var Z,P;const he=new eu(Y.id,{type:"path-item",uri:F.uri,$ref:it(n.$ref)}),ge=((Z=(P=this.options.dereference.strategyOpts["openapi-3-1"])===null||P===void 0?void 0:P.circularReplacer)!==null&&Z!==void 0?Z:this.options.dereference.circularReplacer)(he);return x.replaceWith(ge,Yl),!l&&ge}}const se=cr(F.refSet.rootRef.uri)!==F.uri,ae=["error","replace"].includes(this.options.dereference.circular);if((_||se||op(Y)&&xn(Y.$ref)||ae)&&!w.includesCycle(Y)){C.add(n);const he=new Fm({reference:F,namespace:this.namespace,indirections:[...this.indirections],options:this.options,refractCache:this.refractCache,ancestors:w});Y=await sR(Y,he,{keyMap:Xl,nodeTypeGetter:Bo}),C.delete(n)}if(this.indirections.pop(),op(Y)){const he=new Rd([...Y.content],Ct(Y.meta),Ct(Y.attributes));he.setMetaProperty("id",qs.generateId()),n.forEach(((ge,pe,Te)=>{he.remove(it(pe)),he.content.push(Te)})),he.remove("$ref"),he.setMetaProperty("ref-fields",{$ref:it(n.$ref)}),he.setMetaProperty("ref-origin",F.uri),he.setMetaProperty("ref-referencing-element-id",Ct(qs.identify(n))),Y=he}return x.replaceWith(Y,Yl),l?void 0:Y}async LinkElement(n,i,l,h,v,x){if(!xn(n.operationRef)&&!xn(n.operationId))return;if(xn(n.operationRef)&&xn(n.operationId))throw new br("LinkElement operationRef and operationId fields are mutually exclusive.");let w;if(xn(n.operationRef)){var C;const N=Ja(it(n.operationRef)),_=this.toBaseURI(it(n.operationRef)),F=cr(this.reference.uri)===_,U=!F;if(!this.options.resolve.internal&&F||!this.options.resolve.external&&U)return;const J=await this.toReference(it(n.operationRef));if(w=qo(N,J.value.result),rp(w)){const Z=`operation-${it(qs.identify(w))}`;this.refractCache.has(Z)?w=this.refractCache.get(Z):(w=Yx.refract(w),this.refractCache.set(Z,w))}w=Ti(w),w.setMetaProperty("ref-origin",J.uri);const Y=Ti(n);return(C=Y.operationRef)===null||C===void 0||C.meta.set("operation",w),x.replaceWith(Y,Yl),l?void 0:Y}if(xn(n.operationId)){var $;const N=it(n.operationId),_=await this.toReference(zo(this.reference.uri));if(w=aD((U=>lP(U)&&es(U.operationId)&&U.operationId.equals(N)),_.value.result),Ed(w))throw new br(`OperationElement(operationId=${N}) not found.`);const F=Ti(n);return($=F.operationId)===null||$===void 0||$.meta.set("operation",w),x.replaceWith(F,Yl),l?void 0:F}}async ExampleElement(n,i,l,h,v,x){if(!xn(n.externalValue))return;if(n.hasKey("value")&&xn(n.externalValue))throw new br("ExampleElement value and externalValue fields are mutually exclusive.");const w=this.toBaseURI(it(n.externalValue)),C=cr(this.reference.uri)===w,$=!C;if(!this.options.resolve.internal&&C||!this.options.resolve.external&&$)return;const N=await this.toReference(it(n.externalValue)),_=Ti(N.value.result);_.setMetaProperty("ref-origin",N.uri);const F=Ti(n);return F.value=_,x.replaceWith(F,Yl),l?void 0:F}async SchemaElement(n,i,l,h,v,x){if(!xn(n.$ref))return;if(this.indirections.includes(n))return!1;const[w,C]=this.toAncestorLineage([...v,l]);let $=await this.toReference(zo(this.reference.uri)),{uri:N}=$;const _=gP(N,n),F=cr(_),U=new hx({uri:F}),J=nU((Te=>Te.canRead(U)),this.options.resolve.resolvers),Y=!J;let Z,P=cr(this.reference.uri)===_,se=!P;this.indirections.push(n);try{if(J||Y){N=this.toBaseURI(_);const Te=_,Ae=mi($.value.result);if(Z=jE(Te,Ae),Z=mi(Z),Z.id=qs.identify(Z),!this.options.resolve.internal&&P||!this.options.resolve.external&&se)return}else{if(N=this.toBaseURI(_),P=cr(this.reference.uri)===N,se=!P,!this.options.resolve.internal&&P||!this.options.resolve.external&&se)return;$=await this.toReference(zo(_));const Te=Ja(_),Ae=mi($.value.result);Z=qo(Te,Ae),Z=mi(Z),Z.id=qs.identify(Z)}}catch(Te){if(!(Y&&Te instanceof GO))throw Te;if(EE(Lm(_))){if(P=cr(this.reference.uri)===N,se=!P,!this.options.resolve.internal&&P||!this.options.resolve.external&&se)return;$=await this.toReference(zo(_));const Ae=Lm(_),qe=mi($.value.result);Z=rR(Ae,qe),Z=mi(Z),Z.id=qs.identify(Z)}else{if(N=this.toBaseURI(_),P=cr(this.reference.uri)===N,se=!P,!this.options.resolve.internal&&P||!this.options.resolve.external&&se)return;$=await this.toReference(zo(_));const Ae=Ja(_),qe=mi($.value.result);Z=qo(Ae,qe),Z=mi(Z),Z.id=qs.identify(Z)}}if(n===Z)throw new br("Recursive Schema Object reference detected");if(this.indirections.length>this.options.dereference.maxDepth)throw new Rm(`Maximum dereference depth of "${this.options.dereference.maxDepth}" has been exceeded in file "${this.reference.uri}"`);if(w.includes(Z)){if($.refSet.circular=!0,this.options.dereference.circular==="error")throw new br("Circular reference detected");if(this.options.dereference.circular==="replace"){var ae,he;const Te=new eu(Z.id,{type:"json-schema",uri:$.uri,$ref:it(n.$ref)}),Ae=((ae=(he=this.options.dereference.strategyOpts["openapi-3-1"])===null||he===void 0?void 0:he.circularReplacer)!==null&&ae!==void 0?ae:this.options.dereference.circularReplacer)(Te);return x.replaceWith(Ae,Yl),!l&&Ae}}const ge=cr($.refSet.rootRef.uri)!==$.uri,pe=["error","replace"].includes(this.options.dereference.circular);if((se||ge||au(Z)&&xn(Z.$ref)||pe)&&!w.includesCycle(Z)){C.add(n);const Te=new Fm({reference:$,namespace:this.namespace,indirections:[...this.indirections],options:this.options,refractCache:this.refractCache,ancestors:w});Z=await sR(Z,Te,{keyMap:Xl,nodeTypeGetter:Bo}),C.delete(n)}if(this.indirections.pop(),nR(Z)){const Te=Ct(Z);return Te.setMetaProperty("id",qs.generateId()),Te.setMetaProperty("ref-fields",{$ref:it(n.$ref)}),Te.setMetaProperty("ref-origin",$.uri),Te.setMetaProperty("ref-referencing-element-id",Ct(qs.identify(n))),x.replaceWith(Te,Yl),!l&&Te}if(au(Z)){const Te=new ap([...Z.content],Ct(Z.meta),Ct(Z.attributes));Te.setMetaProperty("id",qs.generateId()),n.forEach(((Ae,qe,Se)=>{Te.remove(it(qe)),Te.content.push(Se)})),Te.remove("$ref"),Te.setMetaProperty("ref-fields",{$ref:it(n.$ref)}),Te.setMetaProperty("ref-origin",$.uri),Te.setMetaProperty("ref-referencing-element-id",Ct(qs.identify(n))),Z=Te}return x.replaceWith(Z,Yl),l?void 0:Z}}const MG=fi[Symbol.for("nodejs.util.promisify.custom")],Uo=t=>{const n=(i=>i.slice(2))(t);return n.reduce(((i,l,h)=>{if(Fo(l)){const v=String(it(l.key));i.push(v)}else if(Ri(n[h-2])){const v=n[h-2].content.indexOf(l);i.push(v)}return i}),[])};class IG{modelPropertyMacro;options;SchemaElement={leave:(n,i,l,h,v)=>{n.properties!==void 0&&Un(n.properties)&&n.properties.forEach((x=>{if(Un(x))try{const $=this.modelPropertyMacro(it(x));x.set("default",$)}catch($){var w,C;const N=new Error($,{cause:$});N.fullPath=[...Uo([...v,l,n]),"properties"],(w=this.options.dereference.dereferenceOpts)===null||w===void 0||(w=w.errors)===null||w===void 0||(C=w.push)===null||C===void 0||C.call(w,N)}}))}};constructor({modelPropertyMacro:n,options:i}){this.modelPropertyMacro=n,this.options=i}}class zG{options;SchemaElement={leave(n,i,l,h,v){if(n.allOf!==void 0){if(!Ri(n.allOf)){var x,w;const N=new TypeError("allOf must be an array");return N.fullPath=[...Uo([...v,l,n]),"allOf"],void((x=this.options.dereference.dereferenceOpts)===null||x===void 0||(x=x.errors)===null||x===void 0||(w=x.push)===null||w===void 0||w.call(x,N))}if(n.allOf.isEmpty)n.remove("allOf");else{if(!n.allOf.content.every(au)){var C,$;const N=new TypeError("Elements in allOf must be objects");return N.fullPath=[...Uo([...v,l,n]),"allOf"],void((C=this.options.dereference.dereferenceOpts)===null||C===void 0||(C=C.errors)===null||C===void 0||($=C.push)===null||$===void 0||$.call(C,N))}for(;n.hasKey("allOf");){const{allOf:N}=n;n.remove("allOf");const _=Ul.all([...N.content,n]);if(n.hasKey("$$ref")||_.remove("$$ref"),n.hasKey("example")){const F=_.getMember("example");F&&(F.value=n.get("example"))}if(n.hasKey("examples")){const F=_.getMember("examples");F&&(F.value=n.get("examples"))}n.content=_.content}}}}};constructor({options:n}){this.options=n}}class LG{parameterMacro;options;#e;OperationElement={enter:n=>{this.#e=n},leave:()=>{this.#e=void 0}};ParameterElement={leave:(n,i,l,h,v)=>{const x=this.#e?it(this.#e):null,w=it(n);try{const N=this.parameterMacro(x,w);n.set("default",N)}catch(N){var C,$;const _=new Error(N,{cause:N});_.fullPath=Uo([...v,l]),(C=this.options.dereference.dereferenceOpts)===null||C===void 0||(C=C.errors)===null||C===void 0||($=C.push)===null||$===void 0||$.call(C,_)}}};constructor({parameterMacro:n,options:i}){this.parameterMacro=n,this.options=i}}const CE=t=>{if(t.cause==null)return t;let{cause:n}=t;for(;n.cause!=null;)n=n.cause;return n};class FG extends Oa{}const{wrapError:iR}=WO,aR=fi[Symbol.for("nodejs.util.promisify.custom")],Qa=new KO,cp=(t,n,i,l)=>{Fo(l)?l.value=t:Array.isArray(l)&&(l[i]=t)};class Jx extends Fm{useCircularStructures;allowMetaPatches;basePath;constructor({allowMetaPatches:n=!0,useCircularStructures:i=!1,basePath:l=null,...h}){super(h),this.allowMetaPatches=n,this.useCircularStructures=i,this.basePath=l}async ReferenceElement(n,i,l,h,v,x){try{if(this.indirections.includes(n))return!1;const[U,J]=this.toAncestorLineage([...v,l]),Y=this.toBaseURI(it(n.$ref)),Z=cr(this.reference.uri)===Y,P=!Z;if(!this.options.resolve.internal&&Z||!this.options.resolve.external&&P)return!1;const se=await this.toReference(it(n.$ref)),ae=$s(Y,it(n.$ref));this.indirections.push(n);const he=Ja(ae);let ge=qo(he,se.value.result);if(ge.id=Qa.identify(ge),rp(ge)){const qe=it(n.meta.get("referenced-element")),Se=`${qe}-${it(Qa.identify(ge))}`;this.refractCache.has(Se)?ge=this.refractCache.get(Se):wr(ge)?(ge=Td.refract(ge),ge.setMetaProperty("referenced-element",qe),this.refractCache.set(Se,ge)):(ge=this.namespace.getElementClass(qe).refract(ge),this.refractCache.set(Se,ge))}if(n===ge)throw new br("Recursive Reference Object detected");if(this.indirections.length>this.options.dereference.maxDepth)throw new Rm(`Maximum dereference depth of "${this.options.dereference.maxDepth}" has been exceeded in file "${this.reference.uri}"`);if(U.includes(ge)){if(se.refSet.circular=!0,this.options.dereference.circular==="error")throw new br("Circular reference detected");if(this.options.dereference.circular==="replace"){var w,C;const qe=new eu(ge.id,{type:"reference",uri:se.uri,$ref:it(n.$ref),baseURI:ae,referencingElement:n}),Se=((w=(C=this.options.dereference.strategyOpts["openapi-3-1"])===null||C===void 0?void 0:C.circularReplacer)!==null&&w!==void 0?w:this.options.dereference.circularReplacer)(qe);return x.replaceWith(qe,cp),!l&&Se}}const pe=cr(se.refSet.rootRef.uri)!==se.uri,Te=["error","replace"].includes(this.options.dereference.circular);if((P||pe||lp(ge)||Te)&&!U.includesCycle(ge)){var $;J.add(n);const qe=new Jx({reference:se,namespace:this.namespace,indirections:[...this.indirections],options:this.options,refractCache:this.refractCache,ancestors:U,allowMetaPatches:this.allowMetaPatches,useCircularStructures:this.useCircularStructures,basePath:($=this.basePath)!==null&&$!==void 0?$:[...Uo([...v,l,n]),"$ref"]});ge=await aR(ge,qe,{keyMap:Xl,nodeTypeGetter:Bo}),J.delete(n)}this.indirections.pop();const Ae=Ti(ge);if(Ae.setMetaProperty("ref-fields",{$ref:it(n.$ref),description:it(n.description),summary:it(n.summary)}),Ae.setMetaProperty("ref-origin",se.uri),Ae.setMetaProperty("ref-referencing-element-id",Ct(Qa.identify(n))),Un(ge)&&(n.hasKey("description")&&"description"in ge&&(Ae.remove("description"),Ae.set("description",n.get("description"))),n.hasKey("summary")&&"summary"in ge&&(Ae.remove("summary"),Ae.set("summary",n.get("summary")))),this.allowMetaPatches&&Un(Ae)&&!Ae.hasKey("$$ref")){const qe=$s(Y,ae);Ae.set("$$ref",qe)}return x.replaceWith(Ae,cp),!l&&Ae}catch(U){var N,_,F;const J=CE(U),Y=iR(J,{baseDoc:this.reference.uri,$ref:it(n.$ref),pointer:Ja(it(n.$ref)),fullPath:(N=this.basePath)!==null&&N!==void 0?N:[...Uo([...v,l,n]),"$ref"]});return void((_=this.options.dereference.dereferenceOpts)===null||_===void 0||(_=_.errors)===null||_===void 0||(F=_.push)===null||F===void 0||F.call(_,Y))}}async PathItemElement(n,i,l,h,v,x){try{if(!xn(n.$ref))return;if(this.indirections.includes(n)||k1(["cycle"],n.$ref))return!1;const[U,J]=this.toAncestorLineage([...v,l]),Y=this.toBaseURI(it(n.$ref)),Z=cr(this.reference.uri)===Y,P=!Z;if(!this.options.resolve.internal&&Z||!this.options.resolve.external&&P)return;const se=await this.toReference(it(n.$ref)),ae=$s(Y,it(n.$ref));this.indirections.push(n);const he=Ja(ae);let ge=qo(he,se.value.result);if(ge.id=Qa.identify(ge),rp(ge)){const Ae=`path-item-${it(Qa.identify(ge))}`;this.refractCache.has(Ae)?ge=this.refractCache.get(Ae):(ge=Rd.refract(ge),this.refractCache.set(Ae,ge))}if(n===ge)throw new br("Recursive Path Item Object reference detected");if(this.indirections.length>this.options.dereference.maxDepth)throw new Rm(`Maximum dereference depth of "${this.options.dereference.maxDepth}" has been exceeded in file "${this.reference.uri}"`);if(U.includes(ge)){if(se.refSet.circular=!0,this.options.dereference.circular==="error")throw new br("Circular reference detected");if(this.options.dereference.circular==="replace"){var w,C;const Ae=new eu(ge.id,{type:"path-item",uri:se.uri,$ref:it(n.$ref),baseURI:ae,referencingElement:n}),qe=((w=(C=this.options.dereference.strategyOpts["openapi-3-1"])===null||C===void 0?void 0:C.circularReplacer)!==null&&w!==void 0?w:this.options.dereference.circularReplacer)(Ae);return x.replaceWith(Ae,cp),!l&&qe}}const pe=cr(se.refSet.rootRef.uri)!==se.uri,Te=["error","replace"].includes(this.options.dereference.circular);if((P||pe||op(ge)&&xn(ge.$ref)||Te)&&!U.includesCycle(ge)){var $;J.add(n);const Ae=new Jx({reference:se,namespace:this.namespace,indirections:[...this.indirections],options:this.options,ancestors:U,allowMetaPatches:this.allowMetaPatches,useCircularStructures:this.useCircularStructures,basePath:($=this.basePath)!==null&&$!==void 0?$:[...Uo([...v,l,n]),"$ref"]});ge=await aR(ge,Ae,{keyMap:Xl,nodeTypeGetter:Bo}),J.delete(n)}if(this.indirections.pop(),op(ge)){const Ae=new Rd([...ge.content],Ct(ge.meta),Ct(ge.attributes));if(n.forEach(((qe,Se,me)=>{Ae.remove(it(Se)),Ae.content.push(me)})),Ae.remove("$ref"),Ae.setMetaProperty("ref-fields",{$ref:it(n.$ref)}),Ae.setMetaProperty("ref-origin",se.uri),Ae.setMetaProperty("ref-referencing-element-id",Ct(Qa.identify(n))),this.allowMetaPatches&&Ae.get("$$ref")===void 0){const qe=$s(Y,ae);Ae.set("$$ref",qe)}ge=Ae}return x.replaceWith(ge,cp),l?void 0:ge}catch(U){var N,_,F;const J=CE(U),Y=iR(J,{baseDoc:this.reference.uri,$ref:it(n.$ref),pointer:Ja(it(n.$ref)),fullPath:(N=this.basePath)!==null&&N!==void 0?N:[...Uo([...v,l,n]),"$ref"]});return void((_=this.options.dereference.dereferenceOpts)===null||_===void 0||(_=_.errors)===null||_===void 0||(F=_.push)===null||F===void 0||F.call(_,Y))}}async SchemaElement(n,i,l,h,v,x){try{if(!xn(n.$ref))return;if(this.indirections.includes(n))return!1;const[U,J]=this.toAncestorLineage([...v,l]);let Y=await this.toReference(zo(this.reference.uri)),{uri:Z}=Y;const P=gP(Z,n),se=cr(P),ae=new hx({uri:se}),he=!this.options.resolve.resolvers.some((me=>me.canRead(ae))),ge=!he;let pe,Te=cr(this.reference.uri)===P,Ae=!Te;this.indirections.push(n);try{if(he||ge){Z=this.toBaseURI(P);const me=P,Me=mi(Y.value.result);if(pe=jE(me,Me),pe=mi(pe),pe.id=Qa.identify(pe),!this.options.resolve.internal&&Te||!this.options.resolve.external&&Ae)return}else{if(Z=this.toBaseURI(P),Te=cr(this.reference.uri)===Z,Ae=!Te,!this.options.resolve.internal&&Te||!this.options.resolve.external&&Ae)return;Y=await this.toReference(zo(P));const me=Ja(P),Me=mi(Y.value.result);pe=qo(me,Me),pe=mi(pe),pe.id=Qa.identify(pe)}}catch(me){if(!(ge&&me instanceof GO))throw me;if(EE(Lm(P))){if(Te=cr(this.reference.uri)===Z,Ae=!Te,!this.options.resolve.internal&&Te||!this.options.resolve.external&&Ae)return;Y=await this.toReference(zo(P));const Me=Lm(P),Ie=mi(Y.value.result);pe=rR(Me,Ie),pe=mi(pe),pe.id=Qa.identify(pe)}else{if(Z=this.toBaseURI(it(P)),Te=cr(this.reference.uri)===Z,Ae=!Te,!this.options.resolve.internal&&Te||!this.options.resolve.external&&Ae)return;Y=await this.toReference(zo(P));const Me=Ja(P),Ie=mi(Y.value.result);pe=qo(Me,Ie),pe=mi(pe),pe.id=Qa.identify(pe)}}if(n===pe)throw new br("Recursive Schema Object reference detected");if(this.indirections.length>this.options.dereference.maxDepth)throw new Rm(`Maximum dereference depth of "${this.options.dereference.maxDepth}" has been exceeded in file "${this.reference.uri}"`);if(U.includes(pe)){if(Y.refSet.circular=!0,this.options.dereference.circular==="error")throw new br("Circular reference detected");if(this.options.dereference.circular==="replace"){var w,C;const me=new eu(pe.id,{type:"json-schema",uri:Y.uri,$ref:it(n.$ref),baseURI:$s(Z,P),referencingElement:n}),Me=((w=(C=this.options.dereference.strategyOpts["openapi-3-1"])===null||C===void 0?void 0:C.circularReplacer)!==null&&w!==void 0?w:this.options.dereference.circularReplacer)(me);return x.replaceWith(Me,cp),!l&&Me}}const qe=cr(Y.refSet.rootRef.uri)!==Y.uri,Se=["error","replace"].includes(this.options.dereference.circular);if((Ae||qe||au(pe)&&xn(pe.$ref)||Se)&&!U.includesCycle(pe)){var $;J.add(n);const me=new Jx({reference:Y,namespace:this.namespace,indirections:[...this.indirections],options:this.options,useCircularStructures:this.useCircularStructures,allowMetaPatches:this.allowMetaPatches,ancestors:U,basePath:($=this.basePath)!==null&&$!==void 0?$:[...Uo([...v,l,n]),"$ref"]});pe=await aR(pe,me,{keyMap:Xl,nodeTypeGetter:Bo}),J.delete(n)}if(this.indirections.pop(),nR(pe)){const me=Ct(pe);return me.setMetaProperty("ref-fields",{$ref:it(n.$ref)}),me.setMetaProperty("ref-origin",Y.uri),me.setMetaProperty("ref-referencing-element-id",Ct(Qa.identify(n))),x.replaceWith(me,cp),!l&&me}if(au(pe)){const me=new ap([...pe.content],Ct(pe.meta),Ct(pe.attributes));if(n.forEach(((Me,Ie,Qe)=>{me.remove(it(Ie)),me.content.push(Qe)})),me.remove("$ref"),me.setMetaProperty("ref-fields",{$ref:it(n.$ref)}),me.setMetaProperty("ref-origin",Y.uri),me.setMetaProperty("ref-referencing-element-id",Ct(Qa.identify(n))),this.allowMetaPatches&&me.get("$$ref")===void 0){const Me=$s(Z,P);me.set("$$ref",Me)}pe=me}return x.replaceWith(pe,cp),l?void 0:pe}catch(U){var N,_,F;const J=CE(U),Y=new FG(`Could not resolve reference: ${J.message}`,{baseDoc:this.reference.uri,$ref:it(n.$ref),fullPath:(N=this.basePath)!==null&&N!==void 0?N:[...Uo([...v,l,n]),"$ref"],cause:J});return void((_=this.options.dereference.dereferenceOpts)===null||_===void 0||(_=_.errors)===null||_===void 0||(F=_.push)===null||F===void 0||F.call(_,Y))}}async LinkElement(){}async ExampleElement(n,i,l,h,v,x){try{return await super.ExampleElement(n,i,l,h,v,x)}catch(N){var w,C,$;const _=CE(N),F=iR(_,{baseDoc:this.reference.uri,externalValue:it(n.externalValue),fullPath:(w=this.basePath)!==null&&w!==void 0?w:[...Uo([...v,l,n]),"externalValue"]});return void((C=this.options.dereference.dereferenceOpts)===null||C===void 0||(C=C.errors)===null||C===void 0||($=C.push)===null||$===void 0||$.call(C,F))}}}const qG=T1[Symbol.for("nodejs.util.promisify.custom")];class BG{constructor({parameterMacro:n,modelPropertyMacro:i,mode:l,options:h,...v}){const x=[];x.push(new Jx({...v,options:h})),typeof i=="function"&&x.push(new IG({modelPropertyMacro:i,options:h})),l!=="strict"&&x.push(new zG({options:h})),typeof n=="function"&&x.push(new LG({parameterMacro:n,options:h}));const w=qG(x,{nodeTypeGetter:Bo});Object.assign(this,w)}}const UG=fi[Symbol.for("nodejs.util.promisify.custom")];class yP extends class extends class{name;constructor({name:n}){this.name=n}}{constructor(n){super({...n??{},name:"openapi-3-1"})}canDereference(n){var i;return n.mediaType!=="text/plain"?Nm.includes(n.mediaType):oP((i=n.parseResult)===null||i===void 0?void 0:i.result)}async dereference(n,i){var l;const h=bx(Wk),v=(l=i.dereference.refSet)!==null&&l!==void 0?l:new ym,x=new ym;let w,C=v;v.has(n.uri)?w=v.find(D$(n.uri,"uri")):(w=new tu({uri:n.uri,value:n.parseResult}),v.add(w)),i.dereference.immutable&&(v.refs.map((_=>new tu({..._,value:Ct(_.value)}))).forEach((_=>x.add(_))),w=x.find((_=>_.uri===n.uri)),C=x);const $=new Fm({reference:w,namespace:h,options:i}),N=await MG(C.rootRef.value,$,{keyMap:Xl,nodeTypeGetter:Bo});return i.dereference.immutable&&x.refs.filter((_=>_.uri.startsWith("immutable://"))).map((_=>new tu({..._,uri:_.uri.replace(/^immutable:\/\//,"")}))).forEach((_=>v.add(_))),i.dereference.refSet===null&&v.clean(),x.clean(),N}}{allowMetaPatches;parameterMacro;modelPropertyMacro;mode;ancestors;constructor({allowMetaPatches:n=!1,parameterMacro:i=null,modelPropertyMacro:l=null,mode:h="non-strict",ancestors:v=[],...x}={}){super({...x}),this.name="openapi-3-1-swagger-client",this.allowMetaPatches=n,this.parameterMacro=i,this.modelPropertyMacro=l,this.mode=h,this.ancestors=[...v]}async dereference(n,i){var l;const h=bx(Wk),v=(l=i.dereference.refSet)!==null&&l!==void 0?l:new ym,x=new ym;let w,C=v;v.has(n.uri)?w=v.find((_=>_.uri===n.uri)):(w=new tu({uri:n.uri,value:n.parseResult}),v.add(w)),i.dereference.immutable&&(v.refs.map((_=>new tu({..._,value:Ct(_.value)}))).forEach((_=>x.add(_))),w=x.find((_=>_.uri===n.uri)),C=x);const $=new BG({reference:w,namespace:h,options:i,allowMetaPatches:this.allowMetaPatches,ancestors:this.ancestors,modelPropertyMacro:this.modelPropertyMacro,mode:this.mode,parameterMacro:this.parameterMacro}),N=await UG(C.rootRef.value,$,{keyMap:Xl,nodeTypeGetter:Bo});return i.dereference.immutable&&x.refs.filter((_=>_.uri.startsWith("immutable://"))).map((_=>new tu({..._,uri:_.uri.replace(/^immutable:\/\//,"")}))).forEach((_=>v.add(_))),i.dereference.refSet===null&&v.clean(),x.clean(),N}}const KG=t=>{const n=it(t.meta.get("baseURI")),i=t.meta.get("referencingElement");return new St({$ref:n},Ct(i.meta),Ct(i.attributes))},AE=async t=>{const{spec:n,timeout:i,redirects:l,requestInterceptor:h,responseInterceptor:v,pathDiscriminator:x=[],allowMetaPatches:w=!1,useCircularStructures:C=!1,skipNormalization:$=!1,parameterMacro:N=null,modelPropertyMacro:_=null,mode:F="non-strict",strategies:U}=t;try{const{cache:J}=AE,Y=U.find((Qe=>Qe.match(n))),Z=c1(u1())?u1():"https://swagger.io",P=Bu(t),se=$s(Z,P);let ae;J.has(n)?ae=J.get(n):(ae=kd.refract(n),ae.classes.push("result"),J.set(n,ae));const he=new Lo([ae]),ge=LD(x),pe=ge===""?"":`#${ge}`,Te=qo(ge,ae),Ae=new tu({uri:se,value:he}),qe=new ym({refs:[Ae]});ge!==""&&(qe.rootRef=void 0);const Se=[new Set([Te])],me=[],Me=((Qe,ot,qt)=>new BV({element:qt}).transclude(Qe,ot))(Te,await(async(Qe,ot={})=>(async(qt,kn)=>{let Tt=qt,on=!1;if(!HN(qt)){const Zn=Ti(qt);Zn.classes.push("result"),Tt=new Lo([Zn]),on=!0}const nr=new hx({uri:kn.resolve.baseURI,parseResult:Tt,mediaType:kn.parse.mediaType}),yi=await xO("canDereference",[nr,kn],kn.dereference.strategies);if(cx(yi))throw new dD(nr.uri);try{const{result:Zn}=await bO("dereference",[nr,kn],yi);return on?Zn.get(0):Zn}catch(Zn){throw new VO(`Error while dereferencing file "${nr.uri}"`,{cause:Zn})}})(Qe,W$(Z$,ot)))(Te,{resolve:{baseURI:`${se}${pe}`,resolvers:[new dP({timeout:i||1e4,redirects:l||10})],resolverOpts:{swaggerHTTPClientConfig:{requestInterceptor:h,responseInterceptor:v}},strategies:[new NG]},parse:{mediaType:Nm.latest(),parsers:[new fP({allowEmpty:!1,sourceMap:!1}),new mP({allowEmpty:!1,sourceMap:!1}),new hP({allowEmpty:!1,sourceMap:!1}),new pP({allowEmpty:!1,sourceMap:!1}),new $G({allowEmpty:!1,sourceMap:!1})]},dereference:{maxDepth:100,strategies:[new yP({allowMetaPatches:w,useCircularStructures:C,parameterMacro:N,modelPropertyMacro:_,mode:F,ancestors:Se})],refSet:qe,dereferenceOpts:{errors:me},immutable:!1,circular:C?"ignore":"replace",circularReplacer:C?Z$.dereference.circularReplacer:KG}}),ae),Ie=$?Me:Y.normalize(Me);return{spec:it(Ie),errors:me}}catch(J){if(J instanceof lk||J instanceof jx)return{spec:null,errors:[]};throw J}};AE.cache=new WeakMap;const vP=t=>{if(!Un(t))return t;const n=[xH({operationIdNormalizer:(i,l,h)=>Ex({operationId:i},l,h,{v2OperationIdCompatibilityMode:!1})}),gH(),yH(),bH(),wH()];return km(t,n,{toolboxCreator:cP,visitorOptions:{keyMap:Xl,nodeTypeGetter:Bo}})},VG={name:"openapi-3-1-apidom",match:t=>ik(t),normalize(t){if(!es(t)&&Jh(t)&&!t.$$normalized){const i=(n=vP,l=>{const h=kd.refract(l);h.classes.push("result");const v=n(h),x=it(v);return AE.cache.set(x,v),it(v)})(t);return i.$$normalized=!0,i}var n;return es(t)?vP(t):t},resolve:async t=>AE(t)};function xP(t,n,i){if(!t||typeof t!="object"||!t.paths||typeof t.paths!="object")return null;const{paths:l}=t;for(const h in l)for(const v in l[h]){if(v.toUpperCase()==="PARAMETERS")continue;const x=l[h][v];if(!x||typeof x!="object")continue;const w={spec:t,pathName:h,method:v.toUpperCase(),operation:x},C=n(w);if(i&&C)return w}}function bP(t,n){return`${n.toLowerCase()}-${t}`}const{isHttpUrl:HG}=zU,GG=()=>null,XG=function({spec:t,cb:n=GG,defaultTag:i="default",v2OperationIdCompatibilityMode:l}){const h={},v={};return xP(t,(({pathName:x,method:w,operation:C})=>{var $;(C.tags?($=C.tags,Array.isArray($)?$:[$]):[i]).forEach((N=>{if(typeof N!="string")return;v[N]=v[N]||{};const _=v[N],F=Ex(C,x,w,{v2OperationIdCompatibilityMode:l}),U=n({spec:t,pathName:x,method:w,operation:C,operationId:F});if(h[F])h[F]+=1,_[`${F}${h[F]}`]=U;else if(_[F]!==void 0){const J=h[F]||1;h[F]=J+1,_[`${F}${h[F]}`]=U;const Y=_[F];delete _[F],_[`${F}${J}`]=Y}else _[F]=U}))})),v},YG=function(t={}){return({pathName:n,method:i,operationId:l})=>(h,v={})=>{const{requestInterceptor:x,responseInterceptor:w,userFetch:C}=t;return t.execute({spec:t.spec,requestInterceptor:x,responseInterceptor:w,userFetch:C,pathName:n,method:i,parameters:h,operationId:l,...v})}};var ZG=function(t,n,i){var l={},h=l.encode||JG;if(typeof h!="function")throw new TypeError("option encode is invalid");if(!OE.test(t))throw new TypeError("argument name is invalid");var v=h(n);if(v&&!OE.test(v))throw new TypeError("argument val is invalid");var x=t+"="+v;if(l.maxAge!=null){var w=l.maxAge-0;if(isNaN(w)||!isFinite(w))throw new TypeError("option maxAge is invalid");x+="; Max-Age="+Math.floor(w)}if(l.domain){if(!OE.test(l.domain))throw new TypeError("option domain is invalid");x+="; Domain="+l.domain}if(l.path){if(!OE.test(l.path))throw new TypeError("option path is invalid");x+="; Path="+l.path}if(l.expires){var C=l.expires;if(!(function($){return WG.call($)==="[object Date]"||$ instanceof Date})(C)||isNaN(C.valueOf()))throw new TypeError("option expires is invalid");x+="; Expires="+C.toUTCString()}if(l.httpOnly&&(x+="; HttpOnly"),l.secure&&(x+="; Secure"),l.partitioned&&(x+="; Partitioned"),l.priority)switch(typeof l.priority=="string"?l.priority.toLowerCase():l.priority){case"low":x+="; Priority=Low";break;case"medium":x+="; Priority=Medium";break;case"high":x+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}if(l.sameSite)switch(typeof l.sameSite=="string"?l.sameSite.toLowerCase():l.sameSite){case!0:x+="; SameSite=Strict";break;case"lax":x+="; SameSite=Lax";break;case"strict":x+="; SameSite=Strict";break;case"none":x+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return x},WG=Object.prototype.toString,OE=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function JG(t){return encodeURIComponent(t)}const wP=function(){const t=sn,n=gi,i=this,l="parser.js: Parser(): ";i.ast=void 0,i.stats=void 0,i.trace=void 0,i.callbacks=[];let h,v,x,w,C,$,N,_=0,F=0,U=0,J=0,Y=0,Z=new function(){this.state=t.ACTIVE,this.phraseLength=0,this.refresh=()=>{this.state=t.ACTIVE,this.phraseLength=0}};i.parse=(he,ge,pe,Te)=>{const Ae=`${l}parse(): `;_=0,F=0,U=0,J=0,Y=0,h=void 0,v=void 0,x=void 0,w=void 0,Z.refresh(),C=void 0,$=void 0,N=void 0,w=n.stringToChars(pe),h=he.rules,v=he.udts;const qe=ge.toLowerCase();let Se;for(const Me in h)if(h.hasOwnProperty(Me)&&qe===h[Me].lower){Se=h[Me].index;break}if(Se===void 0)throw new Error(`${Ae}start rule name '${startRule}' not recognized`);(()=>{const Me=`${l}initializeCallbacks(): `;let Ie,Qe;for(C=[],$=[],Ie=0;Ie<h.length;Ie+=1)C[Ie]=void 0;for(Ie=0;Ie<v.length;Ie+=1)$[Ie]=void 0;const ot=[];for(Ie=0;Ie<h.length;Ie+=1)ot.push(h[Ie].lower);for(Ie=0;Ie<v.length;Ie+=1)ot.push(v[Ie].lower);for(const qt in i.callbacks)if(i.callbacks.hasOwnProperty(qt)){if(Ie=ot.indexOf(qt.toLowerCase()),Ie<0)throw new Error(`${Me}syntax callback '${qt}' not a rule or udt name`);if(Qe=i.callbacks[qt]?i.callbacks[qt]:void 0,typeof Qe!="function"&&Qe!==void 0)throw new Error(`${Me}syntax callback[${qt}] must be function reference or falsy)`);Ie<h.length?C[Ie]=Qe:$[Ie-h.length]=Qe}})(),i.trace&&i.trace.init(h,v,w),i.stats&&i.stats.init(h,v),i.ast&&i.ast.init(h,v,w),N=Te,x=[{type:t.RNM,index:Se}],ae(0,0),x=void 0;let me=!1;switch(Z.state){case t.ACTIVE:throw new Error(`${Ae}final state should never be 'ACTIVE'`);case t.NOMATCH:me=!1;break;case t.EMPTY:case t.MATCH:me=Z.phraseLength===w.length;break;default:throw new Error("unrecognized state")}return{success:me,state:Z.state,stateName:t.idName(Z.state),length:w.length,matched:Z.phraseLength,maxMatched:Y,maxTreeDepth:U,nodeHits:J}};const P=(he,ge,pe,Te)=>{if(ge.phraseLength>pe){let Ae=`${l}opRNM(${he.name}): callback function error: `;throw Ae+=`sysData.phraseLength: ${ge.phraseLength}`,Ae+=` must be <= remaining chars: ${pe}`,new Error(Ae)}switch(ge.state){case t.ACTIVE:if(!Te)throw new Error(`${l}opRNM(${he.name}): callback function return error. ACTIVE state not allowed.`);break;case t.EMPTY:ge.phraseLength=0;break;case t.MATCH:ge.phraseLength===0&&(ge.state=t.EMPTY);break;case t.NOMATCH:ge.phraseLength=0;break;default:throw new Error(`${l}opRNM(${he.name}): callback function return error. Unrecognized return state: ${ge.state}`)}},se=(he,ge)=>{let pe,Te,Ae;const qe=x[he],Se=v[qe.index];Z.UdtIndex=Se.index,_||(Ae=i.ast&&i.ast.udtDefined(qe.index),Ae&&(Te=h.length+qe.index,pe=i.ast.getLength(),i.ast.down(Te,Se.name)));const me=w.length-ge;$[qe.index](Z,w,ge,N),((Me,Ie,Qe)=>{if(Ie.phraseLength>Qe){let ot=`${l}opUDT(${Me.name}): callback function error: `;throw ot+=`sysData.phraseLength: ${Ie.phraseLength}`,ot+=` must be <= remaining chars: ${Qe}`,new Error(ot)}switch(Ie.state){case t.ACTIVE:throw new Error(`${l}opUDT(${Me.name}) ACTIVE state return not allowed.`);case t.EMPTY:if(!Me.empty)throw new Error(`${l}opUDT(${Me.name}) may not return EMPTY.`);Ie.phraseLength=0;break;case t.MATCH:if(Ie.phraseLength===0){if(!Me.empty)throw new Error(`${l}opUDT(${Me.name}) may not return EMPTY.`);Ie.state=t.EMPTY}break;case t.NOMATCH:Ie.phraseLength=0;break;default:throw new Error(`${l}opUDT(${Me.name}): callback function return error. Unrecognized return state: ${Ie.state}`)}})(Se,Z,me),_||Ae&&(Z.state===t.NOMATCH?i.ast.setLength(pe):i.ast.up(Te,Se.name,ge,Z.phraseLength))},ae=(he,ge)=>{const pe=`${l}opExecute(): `,Te=x[he];switch(J+=1,F>U&&(U=F),F+=1,Z.refresh(),i.trace&&i.trace.down(Te,ge),Te.type){case t.ALT:((Ae,qe)=>{const Se=x[Ae];for(let me=0;me<Se.children.length&&(ae(Se.children[me],qe),Z.state===t.NOMATCH);me+=1);})(he,ge);break;case t.CAT:((Ae,qe)=>{let Se,me,Me,Ie;const Qe=x[Ae];i.ast&&(me=i.ast.getLength()),Se=!0,Me=qe,Ie=0;for(let ot=0;ot<Qe.children.length;ot+=1){if(ae(Qe.children[ot],Me),Z.state===t.NOMATCH){Se=!1;break}Me+=Z.phraseLength,Ie+=Z.phraseLength}Se?(Z.state=Ie===0?t.EMPTY:t.MATCH,Z.phraseLength=Ie):(Z.state=t.NOMATCH,Z.phraseLength=0,i.ast&&i.ast.setLength(me))})(he,ge);break;case t.REP:((Ae,qe)=>{let Se,me,Me,Ie;const Qe=x[Ae];if(Qe.max===0)return Z.state=t.EMPTY,void(Z.phraseLength=0);for(me=qe,Me=0,Ie=0,i.ast&&(Se=i.ast.getLength());!(me>=w.length)&&(ae(Ae+1,me),Z.state!==t.NOMATCH)&&Z.state!==t.EMPTY&&(Ie+=1,Me+=Z.phraseLength,me+=Z.phraseLength,Ie!==Qe.max););Z.state===t.EMPTY||Ie>=Qe.min?(Z.state=Me===0?t.EMPTY:t.MATCH,Z.phraseLength=Me):(Z.state=t.NOMATCH,Z.phraseLength=0,i.ast&&i.ast.setLength(Se))})(he,ge);break;case t.RNM:((Ae,qe)=>{let Se,me,Me;const Ie=x[Ae],Qe=h[Ie.index],ot=C[Qe.index];if(_||(me=i.ast&&i.ast.ruleDefined(Ie.index),me&&(Se=i.ast.getLength(),i.ast.down(Ie.index,h[Ie.index].name))),ot){const qt=w.length-qe;ot(Z,w,qe,N),P(Qe,Z,qt,!0),Z.state===t.ACTIVE&&(Me=x,x=Qe.opcodes,ae(0,qe),x=Me,ot(Z,w,qe,N),P(Qe,Z,qt,!1))}else Me=x,x=Qe.opcodes,ae(0,qe),x=Me;_||me&&(Z.state===t.NOMATCH?i.ast.setLength(Se):i.ast.up(Ie.index,Qe.name,qe,Z.phraseLength))})(he,ge);break;case t.TRG:((Ae,qe)=>{const Se=x[Ae];Z.state=t.NOMATCH,qe<w.length&&Se.min<=w[qe]&&w[qe]<=Se.max&&(Z.state=t.MATCH,Z.phraseLength=1)})(he,ge);break;case t.TBS:((Ae,qe)=>{const Se=x[Ae],me=Se.string.length;if(Z.state=t.NOMATCH,qe+me<=w.length){for(let Me=0;Me<me;Me+=1)if(w[qe+Me]!==Se.string[Me])return;Z.state=t.MATCH,Z.phraseLength=me}})(he,ge);break;case t.TLS:((Ae,qe)=>{let Se;const me=x[Ae];Z.state=t.NOMATCH;const Me=me.string.length;if(Me!==0){if(qe+Me<=w.length){for(let Ie=0;Ie<Me;Ie+=1)if(Se=w[qe+Ie],Se>=65&&Se<=90&&(Se+=32),Se!==me.string[Ie])return;Z.state=t.MATCH,Z.phraseLength=Me}}else Z.state=t.EMPTY})(he,ge);break;case t.UDT:se(he,ge);break;case t.AND:((Ae,qe)=>{switch(_+=1,ae(Ae+1,qe),_-=1,Z.phraseLength=0,Z.state){case t.EMPTY:case t.MATCH:Z.state=t.EMPTY;break;case t.NOMATCH:Z.state=t.NOMATCH;break;default:throw new Error(`opAND: invalid state ${Z.state}`)}})(he,ge);break;case t.NOT:((Ae,qe)=>{switch(_+=1,ae(Ae+1,qe),_-=1,Z.phraseLength=0,Z.state){case t.EMPTY:case t.MATCH:Z.state=t.NOMATCH;break;case t.NOMATCH:Z.state=t.EMPTY;break;default:throw new Error(`opNOT: invalid state ${Z.state}`)}})(he,ge);break;default:throw new Error(`${pe}unrecognized operator`)}_||ge+Z.phraseLength>Y&&(Y=ge+Z.phraseLength),i.stats&&i.stats.collect(Te,Z),i.trace&&i.trace.up(Te,Z.state,ge,Z.phraseLength),F-=1}},SP=function(){const t=sn,n=gi,i=this;let l,h,v,x=0;const w=[],C=[],$=[];function N(_){let F="";for(;_-- >0;)F+=" ";return F}i.callbacks=[],i.init=(_,F,U)=>{let J;C.length=0,$.length=0,x=0,l=_,h=F,v=U;const Y=[];for(J=0;J<l.length;J+=1)Y.push(l[J].lower);for(J=0;J<h.length;J+=1)Y.push(h[J].lower);for(x=l.length+h.length,J=0;J<x;J+=1)w[J]=void 0;for(const Z in i.callbacks)if(i.callbacks.hasOwnProperty(Z)){const P=Z.toLowerCase();if(J=Y.indexOf(P),J<0)throw new Error(`parser.js: Ast()): init: node '${Z}' not a rule or udt name`);w[J]=i.callbacks[Z]}},i.ruleDefined=_=>!!w[_],i.udtDefined=_=>!!w[l.length+_],i.down=(_,F)=>{const U=$.length;return C.push(U),$.push({name:F,thisIndex:U,thatIndex:void 0,state:t.SEM_PRE,callbackIndex:_,phraseIndex:void 0,phraseLength:void 0,stack:C.length}),U},i.up=(_,F,U,J)=>{const Y=$.length,Z=C.pop();return $.push({name:F,thisIndex:Y,thatIndex:Z,state:t.SEM_POST,callbackIndex:_,phraseIndex:U,phraseLength:J,stack:C.length}),$[Z].thatIndex=Y,$[Z].phraseIndex=U,$[Z].phraseLength=J,Y},i.translate=_=>{let F,U;for(let J=0;J<$.length;J+=1)U=$[J],F=w[U.callbackIndex],F&&(U.state===t.SEM_PRE?F(t.SEM_PRE,v,U.phraseIndex,U.phraseLength,_):F&&F(t.SEM_POST,v,U.phraseIndex,U.phraseLength,_))},i.setLength=_=>{$.length=_,C.length=_>0?$[_-1].stack:0},i.getLength=()=>$.length,i.toXml=()=>{let _="",F=0;return _+=`<?xml version="1.0" encoding="utf-8"?>
|
||
`,_+=`<root nodes="${$.length/2}" characters="${v.length}">
|
||
`,_+=`<!-- input string -->
|
||
`,_+=N(F+2),_+=n.charsToString(v),_+=`
|
||
`,$.forEach((U=>{U.state===t.SEM_PRE?(F+=1,_+=N(F),_+=`<node name="${U.name}" index="${U.phraseIndex}" length="${U.phraseLength}">
|
||
`,_+=N(F+2),_+=n.charsToString(v,U.phraseIndex,U.phraseLength),_+=`
|
||
`):(_+=N(F),_+=`</node><!-- name="${U.name}" -->
|
||
`,F-=1)})),_+=`</root>
|
||
`,_}},gi={stringToChars:t=>[...t].map((n=>n.codePointAt(0))),charsToString:(t,n,i)=>{let l=t;for(;!(n===void 0||n<0);){if(i===void 0){l=t.slice(n);break}if(i<=0)return"";l=t.slice(n,n+i);break}return String.fromCodePoint(...l)}},sn={ALT:1,CAT:2,REP:3,RNM:4,TRG:5,TBS:6,TLS:7,UDT:11,AND:12,NOT:13,ACTIVE:100,MATCH:101,EMPTY:102,NOMATCH:103,SEM_PRE:200,SEM_POST:201,SEM_OK:300,idName:t=>{switch(t){case sn.ALT:return"ALT";case sn.CAT:return"CAT";case sn.REP:return"REP";case sn.RNM:return"RNM";case sn.TRG:return"TRG";case sn.TBS:return"TBS";case sn.TLS:return"TLS";case sn.UDT:return"UDT";case sn.AND:return"AND";case sn.NOT:return"NOT";case sn.ACTIVE:return"ACTIVE";case sn.EMPTY:return"EMPTY";case sn.MATCH:return"MATCH";case sn.NOMATCH:return"NOMATCH";case sn.SEM_PRE:return"SEM_PRE";case sn.SEM_POST:return"SEM_POST";case sn.SEM_OK:return"SEM_OK";default:return"UNRECOGNIZED STATE"}}},QG=(t,n,i,l,h)=>{if(t===sn.SEM_PRE){if(Array.isArray(h)===!1)throw new Error("parser's user data must be an array");h.push(["server-url-template",gi.charsToString(n,i,l)])}return sn.SEM_OK},eX=(t,n,i,l,h)=>{if(t===sn.SEM_PRE){if(Array.isArray(h)===!1)throw new Error("parser's user data must be an array");h.push(["server-variable",gi.charsToString(n,i,l)])}return sn.SEM_OK},tX=(t,n,i,l,h)=>{if(t===sn.SEM_PRE){if(Array.isArray(h)===!1)throw new Error("parser's user data must be an array");h.push(["server-variable-name",gi.charsToString(n,i,l)])}return sn.SEM_OK},nX=(t,n,i,l,h)=>{if(t===sn.SEM_PRE){if(Array.isArray(h)===!1)throw new Error("parser's user data must be an array");h.push(["literals",gi.charsToString(n,i,l)])}return sn.SEM_OK},rX=new function(){this.grammarObject="grammarObject",this.rules=[],this.rules[0]={name:"server-url-template",lower:"server-url-template",index:0,isBkr:!1},this.rules[1]={name:"server-variable",lower:"server-variable",index:1,isBkr:!1},this.rules[2]={name:"server-variable-name",lower:"server-variable-name",index:2,isBkr:!1},this.rules[3]={name:"literals",lower:"literals",index:3,isBkr:!1},this.rules[4]={name:"ALPHA",lower:"alpha",index:4,isBkr:!1},this.rules[5]={name:"DIGIT",lower:"digit",index:5,isBkr:!1},this.rules[6]={name:"HEXDIG",lower:"hexdig",index:6,isBkr:!1},this.rules[7]={name:"pct-encoded",lower:"pct-encoded",index:7,isBkr:!1},this.rules[8]={name:"unreserved",lower:"unreserved",index:8,isBkr:!1},this.rules[9]={name:"sub-delims",lower:"sub-delims",index:9,isBkr:!1},this.rules[10]={name:"ucschar",lower:"ucschar",index:10,isBkr:!1},this.rules[11]={name:"iprivate",lower:"iprivate",index:11,isBkr:!1},this.udts=[],this.rules[0].opcodes=[],this.rules[0].opcodes[0]={type:3,min:1,max:1/0},this.rules[0].opcodes[1]={type:1,children:[2,3]},this.rules[0].opcodes[2]={type:4,index:3},this.rules[0].opcodes[3]={type:4,index:1},this.rules[1].opcodes=[],this.rules[1].opcodes[0]={type:2,children:[1,2,3]},this.rules[1].opcodes[1]={type:7,string:[123]},this.rules[1].opcodes[2]={type:4,index:2},this.rules[1].opcodes[3]={type:7,string:[125]},this.rules[2].opcodes=[],this.rules[2].opcodes[0]={type:3,min:1,max:1/0},this.rules[2].opcodes[1]={type:1,children:[2,3,4,5,6]},this.rules[2].opcodes[2]={type:4,index:8},this.rules[2].opcodes[3]={type:4,index:7},this.rules[2].opcodes[4]={type:4,index:9},this.rules[2].opcodes[5]={type:7,string:[58]},this.rules[2].opcodes[6]={type:7,string:[64]},this.rules[3].opcodes=[],this.rules[3].opcodes[0]={type:3,min:1,max:1/0},this.rules[3].opcodes[1]={type:1,children:[2,3,4,5,6,7,8,9,10,11,12,13,14]},this.rules[3].opcodes[2]={type:6,string:[33]},this.rules[3].opcodes[3]={type:5,min:35,max:36},this.rules[3].opcodes[4]={type:6,string:[38]},this.rules[3].opcodes[5]={type:5,min:40,max:59},this.rules[3].opcodes[6]={type:6,string:[61]},this.rules[3].opcodes[7]={type:5,min:63,max:91},this.rules[3].opcodes[8]={type:6,string:[93]},this.rules[3].opcodes[9]={type:6,string:[95]},this.rules[3].opcodes[10]={type:5,min:97,max:122},this.rules[3].opcodes[11]={type:6,string:[126]},this.rules[3].opcodes[12]={type:4,index:10},this.rules[3].opcodes[13]={type:4,index:11},this.rules[3].opcodes[14]={type:4,index:7},this.rules[4].opcodes=[],this.rules[4].opcodes[0]={type:1,children:[1,2]},this.rules[4].opcodes[1]={type:5,min:65,max:90},this.rules[4].opcodes[2]={type:5,min:97,max:122},this.rules[5].opcodes=[],this.rules[5].opcodes[0]={type:5,min:48,max:57},this.rules[6].opcodes=[],this.rules[6].opcodes[0]={type:1,children:[1,2,3,4,5,6,7]},this.rules[6].opcodes[1]={type:4,index:5},this.rules[6].opcodes[2]={type:7,string:[97]},this.rules[6].opcodes[3]={type:7,string:[98]},this.rules[6].opcodes[4]={type:7,string:[99]},this.rules[6].opcodes[5]={type:7,string:[100]},this.rules[6].opcodes[6]={type:7,string:[101]},this.rules[6].opcodes[7]={type:7,string:[102]},this.rules[7].opcodes=[],this.rules[7].opcodes[0]={type:2,children:[1,2,3]},this.rules[7].opcodes[1]={type:7,string:[37]},this.rules[7].opcodes[2]={type:4,index:6},this.rules[7].opcodes[3]={type:4,index:6},this.rules[8].opcodes=[],this.rules[8].opcodes[0]={type:1,children:[1,2,3,4,5,6]},this.rules[8].opcodes[1]={type:4,index:4},this.rules[8].opcodes[2]={type:4,index:5},this.rules[8].opcodes[3]={type:7,string:[45]},this.rules[8].opcodes[4]={type:7,string:[46]},this.rules[8].opcodes[5]={type:7,string:[95]},this.rules[8].opcodes[6]={type:7,string:[126]},this.rules[9].opcodes=[],this.rules[9].opcodes[0]={type:1,children:[1,2,3,4,5,6,7,8,9,10,11]},this.rules[9].opcodes[1]={type:7,string:[33]},this.rules[9].opcodes[2]={type:7,string:[36]},this.rules[9].opcodes[3]={type:7,string:[38]},this.rules[9].opcodes[4]={type:7,string:[39]},this.rules[9].opcodes[5]={type:7,string:[40]},this.rules[9].opcodes[6]={type:7,string:[41]},this.rules[9].opcodes[7]={type:7,string:[42]},this.rules[9].opcodes[8]={type:7,string:[43]},this.rules[9].opcodes[9]={type:7,string:[44]},this.rules[9].opcodes[10]={type:7,string:[59]},this.rules[9].opcodes[11]={type:7,string:[61]},this.rules[10].opcodes=[],this.rules[10].opcodes[0]={type:1,children:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]},this.rules[10].opcodes[1]={type:5,min:160,max:55295},this.rules[10].opcodes[2]={type:5,min:63744,max:64975},this.rules[10].opcodes[3]={type:5,min:65008,max:65519},this.rules[10].opcodes[4]={type:5,min:65536,max:131069},this.rules[10].opcodes[5]={type:5,min:131072,max:196605},this.rules[10].opcodes[6]={type:5,min:196608,max:262141},this.rules[10].opcodes[7]={type:5,min:262144,max:327677},this.rules[10].opcodes[8]={type:5,min:327680,max:393213},this.rules[10].opcodes[9]={type:5,min:393216,max:458749},this.rules[10].opcodes[10]={type:5,min:458752,max:524285},this.rules[10].opcodes[11]={type:5,min:524288,max:589821},this.rules[10].opcodes[12]={type:5,min:589824,max:655357},this.rules[10].opcodes[13]={type:5,min:655360,max:720893},this.rules[10].opcodes[14]={type:5,min:720896,max:786429},this.rules[10].opcodes[15]={type:5,min:786432,max:851965},this.rules[10].opcodes[16]={type:5,min:851968,max:917501},this.rules[10].opcodes[17]={type:5,min:921600,max:983037},this.rules[11].opcodes=[],this.rules[11].opcodes[0]={type:1,children:[1,2,3]},this.rules[11].opcodes[1]={type:5,min:57344,max:63743},this.rules[11].opcodes[2]={type:5,min:983040,max:1048573},this.rules[11].opcodes[3]={type:5,min:1048576,max:1114109},this.toString=function(){return`; OpenAPI Server URL templating ABNF syntax
|
||
server-url-template = 1*( literals / server-variable )
|
||
server-variable = "{" server-variable-name "}"
|
||
server-variable-name = 1*( unreserved / pct-encoded / sub-delims / ":" / "@" )
|
||
literals = 1*( %x21 / %x23-24 / %x26 / %x28-3B / %x3D / %x3F-5B
|
||
/ %x5D / %x5F / %x61-7A / %x7E / ucschar / iprivate
|
||
/ pct-encoded)
|
||
; any Unicode character except: CTL, SP,
|
||
; DQUOTE, "'", "%" (aside from pct-encoded),
|
||
; "<", ">", "\\", "^", "\`", "{", "|", "}"
|
||
|
||
; Characters definitions (from RFC 6570)
|
||
ALPHA = %x41-5A / %x61-7A ; A-Z / a-z
|
||
DIGIT = %x30-39 ; 0-9
|
||
HEXDIG = DIGIT / "A" / "B" / "C" / "D" / "E" / "F"
|
||
; case-insensitive
|
||
|
||
pct-encoded = "%" HEXDIG HEXDIG
|
||
unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
|
||
sub-delims = "!" / "$" / "&" / "'" / "(" / ")"
|
||
/ "*" / "+" / "," / ";" / "="
|
||
|
||
ucschar = %xA0-D7FF / %xF900-FDCF / %xFDF0-FFEF
|
||
/ %x10000-1FFFD / %x20000-2FFFD / %x30000-3FFFD
|
||
/ %x40000-4FFFD / %x50000-5FFFD / %x60000-6FFFD
|
||
/ %x70000-7FFFD / %x80000-8FFFD / %x90000-9FFFD
|
||
/ %xA0000-AFFFD / %xB0000-BFFFD / %xC0000-CFFFD
|
||
/ %xD0000-DFFFD / %xE1000-EFFFD
|
||
|
||
iprivate = %xE000-F8FF / %xF0000-FFFFD / %x100000-10FFFD
|
||
`}},EP=t=>{const n=new wP;return n.ast=new SP,n.ast.callbacks["server-url-template"]=QG,n.ast.callbacks["server-variable"]=eX,n.ast.callbacks["server-variable-name"]=tX,n.ast.callbacks.literals=nX,{result:n.parse(rX,"server-url-template",t),ast:n.ast}},sX=t=>(n=>{try{return typeof n=="string"&&decodeURIComponent(n)!==n}catch{return!1}})(t)?t:encodeURIComponent(t).replace(/%5B/g,"[").replace(/%5D/g,"]"),iX=["literals","server-variable-name"],aX=(t,n,i,l,h)=>(t===sn.SEM_PRE&&h.push(["slash",gi.charsToString(n,i,l)]),sn.SEM_OK),oX=(t,n,i,l,h)=>{if(t===sn.SEM_PRE){if(Array.isArray(h)===!1)throw new Error("parser's user data must be an array");h.push(["path-template",gi.charsToString(n,i,l)])}return sn.SEM_OK},lX=(t,n,i,l,h)=>(t===sn.SEM_PRE&&h.push(["path",gi.charsToString(n,i,l)]),sn.SEM_OK),cX=(t,n,i,l,h)=>(t===sn.SEM_PRE&&h.push(["path-literal",gi.charsToString(n,i,l)]),sn.SEM_OK),uX=(t,n,i,l,h)=>(t===sn.SEM_PRE&&h.push(["query",gi.charsToString(n,i,l)]),sn.SEM_OK),dX=(t,n,i,l,h)=>(t===sn.SEM_PRE&&h.push(["query-marker",gi.charsToString(n,i,l)]),sn.SEM_OK),hX=(t,n,i,l,h)=>(t===sn.SEM_PRE&&h.push(["fragment",gi.charsToString(n,i,l)]),sn.SEM_OK),pX=(t,n,i,l,h)=>(t===sn.SEM_PRE&&h.push(["fragment-marker",gi.charsToString(n,i,l)]),sn.SEM_OK),fX=(t,n,i,l,h)=>(t===sn.SEM_PRE&&h.push(["template-expression",gi.charsToString(n,i,l)]),sn.SEM_OK),mX=(t,n,i,l,h)=>(t===sn.SEM_PRE&&h.push(["template-expression-param-name",gi.charsToString(n,i,l)]),sn.SEM_OK),gX=new function(){this.grammarObject="grammarObject",this.rules=[],this.rules[0]={name:"path-template",lower:"path-template",index:0,isBkr:!1},this.rules[1]={name:"path",lower:"path",index:1,isBkr:!1},this.rules[2]={name:"path-segment",lower:"path-segment",index:2,isBkr:!1},this.rules[3]={name:"query",lower:"query",index:3,isBkr:!1},this.rules[4]={name:"query-literal",lower:"query-literal",index:4,isBkr:!1},this.rules[5]={name:"query-marker",lower:"query-marker",index:5,isBkr:!1},this.rules[6]={name:"fragment",lower:"fragment",index:6,isBkr:!1},this.rules[7]={name:"fragment-literal",lower:"fragment-literal",index:7,isBkr:!1},this.rules[8]={name:"fragment-marker",lower:"fragment-marker",index:8,isBkr:!1},this.rules[9]={name:"slash",lower:"slash",index:9,isBkr:!1},this.rules[10]={name:"path-literal",lower:"path-literal",index:10,isBkr:!1},this.rules[11]={name:"template-expression",lower:"template-expression",index:11,isBkr:!1},this.rules[12]={name:"template-expression-param-name",lower:"template-expression-param-name",index:12,isBkr:!1},this.rules[13]={name:"unreserved",lower:"unreserved",index:13,isBkr:!1},this.rules[14]={name:"pct-encoded",lower:"pct-encoded",index:14,isBkr:!1},this.rules[15]={name:"sub-delims",lower:"sub-delims",index:15,isBkr:!1},this.rules[16]={name:"ALPHA",lower:"alpha",index:16,isBkr:!1},this.rules[17]={name:"DIGIT",lower:"digit",index:17,isBkr:!1},this.rules[18]={name:"HEXDIG",lower:"hexdig",index:18,isBkr:!1},this.udts=[],this.rules[0].opcodes=[],this.rules[0].opcodes[0]={type:2,children:[1,2,6]},this.rules[0].opcodes[1]={type:4,index:1},this.rules[0].opcodes[2]={type:3,min:0,max:1},this.rules[0].opcodes[3]={type:2,children:[4,5]},this.rules[0].opcodes[4]={type:4,index:5},this.rules[0].opcodes[5]={type:4,index:3},this.rules[0].opcodes[6]={type:3,min:0,max:1},this.rules[0].opcodes[7]={type:2,children:[8,9]},this.rules[0].opcodes[8]={type:4,index:8},this.rules[0].opcodes[9]={type:4,index:6},this.rules[1].opcodes=[],this.rules[1].opcodes[0]={type:2,children:[1,2,6]},this.rules[1].opcodes[1]={type:4,index:9},this.rules[1].opcodes[2]={type:3,min:0,max:1/0},this.rules[1].opcodes[3]={type:2,children:[4,5]},this.rules[1].opcodes[4]={type:4,index:2},this.rules[1].opcodes[5]={type:4,index:9},this.rules[1].opcodes[6]={type:3,min:0,max:1},this.rules[1].opcodes[7]={type:4,index:2},this.rules[2].opcodes=[],this.rules[2].opcodes[0]={type:3,min:1,max:1/0},this.rules[2].opcodes[1]={type:1,children:[2,3]},this.rules[2].opcodes[2]={type:4,index:10},this.rules[2].opcodes[3]={type:4,index:11},this.rules[3].opcodes=[],this.rules[3].opcodes[0]={type:3,min:0,max:1/0},this.rules[3].opcodes[1]={type:4,index:4},this.rules[4].opcodes=[],this.rules[4].opcodes[0]={type:3,min:1,max:1/0},this.rules[4].opcodes[1]={type:1,children:[2,3,4,5,6,7,8,9,10]},this.rules[4].opcodes[2]={type:4,index:13},this.rules[4].opcodes[3]={type:4,index:14},this.rules[4].opcodes[4]={type:4,index:15},this.rules[4].opcodes[5]={type:7,string:[58]},this.rules[4].opcodes[6]={type:7,string:[64]},this.rules[4].opcodes[7]={type:7,string:[47]},this.rules[4].opcodes[8]={type:7,string:[63]},this.rules[4].opcodes[9]={type:7,string:[38]},this.rules[4].opcodes[10]={type:7,string:[61]},this.rules[5].opcodes=[],this.rules[5].opcodes[0]={type:7,string:[63]},this.rules[6].opcodes=[],this.rules[6].opcodes[0]={type:3,min:0,max:1/0},this.rules[6].opcodes[1]={type:4,index:7},this.rules[7].opcodes=[],this.rules[7].opcodes[0]={type:3,min:1,max:1/0},this.rules[7].opcodes[1]={type:1,children:[2,3,4,5,6,7,8]},this.rules[7].opcodes[2]={type:4,index:13},this.rules[7].opcodes[3]={type:4,index:14},this.rules[7].opcodes[4]={type:4,index:15},this.rules[7].opcodes[5]={type:7,string:[58]},this.rules[7].opcodes[6]={type:7,string:[64]},this.rules[7].opcodes[7]={type:7,string:[47]},this.rules[7].opcodes[8]={type:7,string:[63]},this.rules[8].opcodes=[],this.rules[8].opcodes[0]={type:7,string:[35]},this.rules[9].opcodes=[],this.rules[9].opcodes[0]={type:7,string:[47]},this.rules[10].opcodes=[],this.rules[10].opcodes[0]={type:3,min:1,max:1/0},this.rules[10].opcodes[1]={type:1,children:[2,3,4,5,6]},this.rules[10].opcodes[2]={type:4,index:13},this.rules[10].opcodes[3]={type:4,index:14},this.rules[10].opcodes[4]={type:4,index:15},this.rules[10].opcodes[5]={type:7,string:[58]},this.rules[10].opcodes[6]={type:7,string:[64]},this.rules[11].opcodes=[],this.rules[11].opcodes[0]={type:2,children:[1,2,3]},this.rules[11].opcodes[1]={type:7,string:[123]},this.rules[11].opcodes[2]={type:4,index:12},this.rules[11].opcodes[3]={type:7,string:[125]},this.rules[12].opcodes=[],this.rules[12].opcodes[0]={type:3,min:1,max:1/0},this.rules[12].opcodes[1]={type:1,children:[2,3,4,5,6]},this.rules[12].opcodes[2]={type:4,index:13},this.rules[12].opcodes[3]={type:4,index:14},this.rules[12].opcodes[4]={type:4,index:15},this.rules[12].opcodes[5]={type:7,string:[58]},this.rules[12].opcodes[6]={type:7,string:[64]},this.rules[13].opcodes=[],this.rules[13].opcodes[0]={type:1,children:[1,2,3,4,5,6]},this.rules[13].opcodes[1]={type:4,index:16},this.rules[13].opcodes[2]={type:4,index:17},this.rules[13].opcodes[3]={type:7,string:[45]},this.rules[13].opcodes[4]={type:7,string:[46]},this.rules[13].opcodes[5]={type:7,string:[95]},this.rules[13].opcodes[6]={type:7,string:[126]},this.rules[14].opcodes=[],this.rules[14].opcodes[0]={type:2,children:[1,2,3]},this.rules[14].opcodes[1]={type:7,string:[37]},this.rules[14].opcodes[2]={type:4,index:18},this.rules[14].opcodes[3]={type:4,index:18},this.rules[15].opcodes=[],this.rules[15].opcodes[0]={type:1,children:[1,2,3,4,5,6,7,8,9,10,11]},this.rules[15].opcodes[1]={type:7,string:[33]},this.rules[15].opcodes[2]={type:7,string:[36]},this.rules[15].opcodes[3]={type:7,string:[38]},this.rules[15].opcodes[4]={type:7,string:[39]},this.rules[15].opcodes[5]={type:7,string:[40]},this.rules[15].opcodes[6]={type:7,string:[41]},this.rules[15].opcodes[7]={type:7,string:[42]},this.rules[15].opcodes[8]={type:7,string:[43]},this.rules[15].opcodes[9]={type:7,string:[44]},this.rules[15].opcodes[10]={type:7,string:[59]},this.rules[15].opcodes[11]={type:7,string:[61]},this.rules[16].opcodes=[],this.rules[16].opcodes[0]={type:1,children:[1,2]},this.rules[16].opcodes[1]={type:5,min:65,max:90},this.rules[16].opcodes[2]={type:5,min:97,max:122},this.rules[17].opcodes=[],this.rules[17].opcodes[0]={type:5,min:48,max:57},this.rules[18].opcodes=[],this.rules[18].opcodes[0]={type:1,children:[1,2,3,4,5,6,7]},this.rules[18].opcodes[1]={type:4,index:17},this.rules[18].opcodes[2]={type:7,string:[97]},this.rules[18].opcodes[3]={type:7,string:[98]},this.rules[18].opcodes[4]={type:7,string:[99]},this.rules[18].opcodes[5]={type:7,string:[100]},this.rules[18].opcodes[6]={type:7,string:[101]},this.rules[18].opcodes[7]={type:7,string:[102]},this.toString=function(){return`; OpenAPI Path Templating ABNF syntax
|
||
path-template = path [ query-marker query ] [ fragment-marker fragment ]
|
||
path = slash *( path-segment slash ) [ path-segment ]
|
||
path-segment = 1*( path-literal / template-expression )
|
||
query = *( query-literal )
|
||
query-literal = 1*( unreserved / pct-encoded / sub-delims / ":" / "@" / "/" / "?" / "&" / "=" )
|
||
query-marker = "?"
|
||
fragment = *( fragment-literal )
|
||
fragment-literal = 1*( unreserved / pct-encoded / sub-delims / ":" / "@" / "/" / "?" )
|
||
fragment-marker = "#"
|
||
slash = "/"
|
||
path-literal = 1*( unreserved / pct-encoded / sub-delims / ":" / "@" )
|
||
template-expression = "{" template-expression-param-name "}"
|
||
template-expression-param-name = 1*( unreserved / pct-encoded / sub-delims / ":" / "@" )
|
||
|
||
; Characters definitions (from RFC 3986)
|
||
unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
|
||
pct-encoded = "%" HEXDIG HEXDIG
|
||
sub-delims = "!" / "$" / "&" / "'" / "(" / ")"
|
||
/ "*" / "+" / "," / ";" / "="
|
||
ALPHA = %x41-5A / %x61-7A ; A-Z / a-z
|
||
DIGIT = %x30-39 ; 0-9
|
||
HEXDIG = DIGIT / "A" / "B" / "C" / "D" / "E" / "F"
|
||
`}},yX=t=>(n=>{try{return typeof n=="string"&&decodeURIComponent(n)!==n}catch{return!1}})(t)?t:encodeURIComponent(t).replace(/%5B/g,"[").replace(/%5D/g,"]"),vX=["slash","path-literal","query-marker","query-literal","template-expression-param-name"],oR=(t,n,i={})=>{const l={encoder:yX,...i},h=(w=>{const C=new wP;return C.ast=new SP,C.ast.callbacks["path-template"]=oX,C.ast.callbacks.path=lX,C.ast.callbacks.query=uX,C.ast.callbacks["query-marker"]=dX,C.ast.callbacks.fragment=hX,C.ast.callbacks["fragment-marker"]=pX,C.ast.callbacks.slash=aX,C.ast.callbacks["path-literal"]=cX,C.ast.callbacks["template-expression"]=fX,C.ast.callbacks["template-expression-param-name"]=mX,{result:C.parse(gX,"path-template",w),ast:C.ast}})(t);if(!h.result.success)return t;const v=[];return h.ast.translate(v),v.filter((([w])=>vX.includes(w))).map((([w,C])=>w==="template-expression-param-name"?Object.hasOwn(n,C)?l.encoder(n[C],C):`{${C}}`:C)).join("")},xX={body:function({req:t,value:n}){n!==void 0&&(t.body=n)},header:function({req:t,parameter:n,value:i}){t.headers=t.headers||{},i!==void 0&&(t.headers[n.name]=i)},query:function({req:t,value:n,parameter:i}){if(t.query=t.query||{},n===!1&&i.type==="boolean"&&(n="false"),n===0&&["number","integer"].indexOf(i.type)>-1&&(n="0"),n)t.query[i.name]={collectionFormat:i.collectionFormat,value:n};else if(i.allowEmptyValue&&n!==void 0){const l=i.name;t.query[l]=t.query[l]||{},t.query[l].allowEmptyValue=!0}},path:function({req:t,value:n,parameter:i,baseURL:l}){if(n!==void 0){const h=t.url.replace(l,""),v=oR(h,{[i.name]:n});t.url=l+v}},formData:function({req:t,value:n,parameter:i}){if(n===!1&&i.type==="boolean"&&(n="false"),n===0&&["number","integer"].indexOf(i.type)>-1&&(n="0"),n)t.form=t.form||{},t.form[i.name]={collectionFormat:i.collectionFormat,value:n};else if(i.allowEmptyValue&&n!==void 0){t.form=t.form||{};const l=i.name;t.form[l]=t.form[l]||{},t.form[l].allowEmptyValue=!0}}};function kE(t,n){return n.includes("application/json")?typeof t=="string"?t:(Array.isArray(t)&&(t=t.map((i=>{try{return JSON.parse(i)}catch{return i}}))),JSON.stringify(t)):String(t)}const bX=["accept","authorization","content-type"],wX=Object.freeze(Object.defineProperty({__proto__:null,cookie:function({req:t,parameter:n,value:i}){t.headers=t.headers||{};const l=typeof i;if(i!==void 0&&n.content){const h=Object.keys(n.content)[0];t.headers.Cookie=`${n.name}=${kE(i,h)}`}else if(i!==void 0&&(!Array.isArray(i)||i.length!==0)){const h=l==="object"&&!Array.isArray(i)&&n.explode?"":`${n.name}=`;t.headers.Cookie=h+xa({key:n.name,value:i,escape:!1,style:n.style||"form",explode:n.explode!==void 0&&n.explode})}},header:function({req:t,parameter:n,value:i}){if(t.headers=t.headers||{},!(bX.indexOf(n.name.toLowerCase())>-1))if(i!==void 0&&n.content){const l=Object.keys(n.content)[0];t.headers[n.name]=kE(i,l)}else i===void 0||Array.isArray(i)&&i.length===0||(t.headers[n.name]=xa({key:n.name,value:i,style:n.style||"simple",explode:n.explode!==void 0&&n.explode,escape:!1}))},path:function({req:t,value:n,parameter:i,baseURL:l}){const{name:h,style:v,explode:x,content:w}=i;if(n===void 0)return;const C=t.url.replace(l,"");let $;if(w){const N=Object.keys(w)[0];$=oR(C,{[h]:n},{encoder:_=>rh(kE(_,N))})}else $=oR(C,{[h]:n},{encoder:N=>xa({key:i.name,value:N,style:v||"simple",explode:x||!1,escape:"reserved"})});t.url=l+$},query:function({req:t,value:n,parameter:i}){if(t.query=t.query||{},n!==void 0&&i.content){const l=kE(n,Object.keys(i.content)[0]);if(l)t.query[i.name]=l;else if(i.allowEmptyValue){const h=i.name;t.query[h]=t.query[h]||{},t.query[h].allowEmptyValue=!0}}else if(n===!1&&(n="false"),n===0&&(n="0"),n){const{style:l,explode:h,allowReserved:v}=i;t.query[i.name]={value:n,serializationOption:{style:l,explode:h,allowReserved:v}}}else if(i.allowEmptyValue&&n!==void 0){const l=i.name;t.query[l]=t.query[l]||{},t.query[l].allowEmptyValue=!0}}},Symbol.toStringTag,{value:"Module"})),SX=typeof globalThis<"u"?globalThis:typeof self<"u"?self:window,{btoa:jP}=SX,CP=t=>Array.isArray(t)?t:[],lR=t=>{try{return new URL(t)}catch{const n=new URL(t,"https://swagger.io"),i=String(t).startsWith("/")?n.pathname:n.pathname.substring(1);return{hash:n.hash,host:"",hostname:"",href:"",origin:"",password:"",pathname:i,port:"",protocol:"",search:n.search,searchParams:n.searchParams}}};class EX extends Oa{}const jX={buildRequest:AP};function AP(t){const{spec:n,operationId:i,responseContentType:l,scheme:h,requestInterceptor:v,responseInterceptor:x,contextUrl:w,userFetch:C,server:$,serverVariables:N,http:_,signal:F,serverVariableEncoder:U}=t;let{parameters:J,parameterBuilders:Y}=t;const Z=ak(n);Y||(Y=Z?wX:xX);let P={url:"",credentials:_&&_.withCredentials?"include":"same-origin",headers:{},cookies:{}};F&&(P.signal=F),v&&(P.requestInterceptor=v),x&&(P.responseInterceptor=x),C&&(P.userFetch=C);const se=(function(Se,me){return Se&&Se.paths?(function(Me,Ie){return xP(Me,Ie,!0)||null})(Se,(({pathName:Me,method:Ie,operation:Qe})=>{if(!Qe||typeof Qe!="object")return!1;const ot=Qe.operationId;return[Ex(Qe,Me,Ie),bP(Me,Ie),ot].some((qt=>qt&&qt===me))})):null})(n,i);if(!se)throw new EX(`Operation ${i} not found`);const{operation:ae={},method:he,pathName:ge}=se,pe=OP({spec:n,scheme:h,contextUrl:w,server:$,serverVariables:N,pathName:ge,method:he,serverVariableEncoder:U});if(P.url+=pe,!i)return delete P.cookies,P;P.url+=ge,P.method=`${he}`.toUpperCase(),J=J||{};const Te=n.paths[ge]||{};l&&(P.headers.accept=l);const Ae=(Se=>{const me={};Se.forEach((Ie=>{me[Ie.in]||(me[Ie.in]={}),me[Ie.in][Ie.name]=Ie}));const Me=[];return Object.keys(me).forEach((Ie=>{Object.keys(me[Ie]).forEach((Qe=>{Me.push(me[Ie][Qe])}))})),Me})([].concat(CP(ae.parameters)).concat(CP(Te.parameters)));Ae.forEach((Se=>{const me=Y[Se.in];let Me;if(Se.in==="body"&&Se.schema&&Se.schema.properties&&(Me=J),Me=Se&&Se.name&&J[Se.name],Me===void 0?Me=Se&&Se.name&&J[`${Se.in}.${Se.name}`]:((Ie,Qe)=>Qe.filter((ot=>ot.name===Ie)))(Se.name,Ae).length>1&&console.warn(`Parameter '${Se.name}' is ambiguous because the defined spec has more than one parameter with the name: '${Se.name}' and the passed-in parameter values did not define an 'in' value.`),Me!==null){if(Se.default!==void 0&&Me===void 0&&(Me=Se.default),Me===void 0&&Se.required&&!Se.allowEmptyValue)throw new Error(`Required parameter ${Se.name} is not provided`);if(Z&&Se.schema&&Se.schema.type==="object"&&typeof Me=="string")try{Me=JSON.parse(Me)}catch{throw new Error("Could not parse object parameter value string as JSON")}me&&me({req:P,parameter:Se,value:Me,operation:ae,spec:n,baseURL:pe})}}));const qe={...t,operation:ae};if(P=Z?(function(Se,me){const{operation:Me,requestBody:Ie,securities:Qe,spec:ot,attachContentTypeForEmptyPayload:qt}=Se;let{requestContentType:kn}=Se;me=(function({request:kr,securities:Tr={},operation:Ir={},spec:la}){var Zl;const Kr={...kr},{authorized:Ko={}}=Tr,hs=Ir.security||la.security||[],Vo=Ko&&!!Object.keys(Ko).length,pp=(la==null||(Zl=la.components)===null||Zl===void 0?void 0:Zl.securitySchemes)||{};return Kr.headers=Kr.headers||{},Kr.query=Kr.query||{},Object.keys(Tr).length&&Vo&&hs&&(!Array.isArray(Ir.security)||Ir.security.length)?(hs.forEach((Qx=>{Object.keys(Qx).forEach((eb=>{const Ho=Ko[eb],vi=pp[eb];if(!Ho)return;const $d=Ho.value||Ho,{type:IE}=vi;if(Ho){if(IE==="apiKey")vi.in==="query"&&(Kr.query[vi.name]=$d),vi.in==="header"&&(Kr.headers[vi.name]=$d),vi.in==="cookie"&&(Kr.cookies[vi.name]=$d);else if(IE==="http"){if(/^basic$/i.test(vi.scheme)){const zE=$d.username||"",AR=$d.password||"",Bm=jP(`${zE}:${AR}`);Kr.headers.Authorization=`Basic ${Bm}`}/^bearer$/i.test(vi.scheme)&&(Kr.headers.Authorization=`Bearer ${$d}`)}else if(IE==="oauth2"||IE==="openIdConnect"){const zE=Ho.token||{},AR=zE[vi["x-tokenName"]||"access_token"];let Bm=zE.token_type;Bm&&Bm.toLowerCase()!=="bearer"||(Bm="Bearer"),Kr.headers.Authorization=`${Bm} ${AR}`}}}))})),Kr):kr})({request:me,securities:Qe,operation:Me,spec:ot});const Tt=Me.requestBody||{},on=Object.keys(Tt.content||{}),nr=kn&&on.indexOf(kn)>-1;if(Ie||qt){if(kn&&nr)me.headers["Content-Type"]=kn;else if(!kn){const kr=on[0];kr&&(me.headers["Content-Type"]=kr,kn=kr)}}else kn&&nr&&(me.headers["Content-Type"]=kn);if(!Se.responseContentType&&Me.responses){const kr=Object.entries(Me.responses).filter((([Tr,Ir])=>{const la=parseInt(Tr,10);return la>=200&&la<300&&Jh(Ir.content)})).reduce(((Tr,[,Ir])=>Tr.concat(Object.keys(Ir.content))),[]);kr.length>0&&(me.headers.accept=kr.join(", "))}if(Ie)if(kn){if(on.indexOf(kn)>-1)if(kn==="application/x-www-form-urlencoded"||kn==="multipart/form-data")if(typeof Ie=="object"){var yi,Zn;const kr=(yi=(Zn=Tt.content[kn])===null||Zn===void 0?void 0:Zn.encoding)!==null&&yi!==void 0?yi:{};me.form={},Object.keys(Ie).forEach((Tr=>{let Ir;try{Ir=JSON.parse(Ie[Tr])}catch{Ir=Ie[Tr]}me.form[Tr]={value:Ir,encoding:kr[Tr]||{}}}))}else if(typeof Ie=="string"){var In,Ni;const kr=(In=(Ni=Tt.content[kn])===null||Ni===void 0?void 0:Ni.encoding)!==null&&In!==void 0?In:{};try{me.form={};const Tr=JSON.parse(Ie);Object.entries(Tr).forEach((([Ir,la])=>{me.form[Ir]={value:la,encoding:kr[Ir]||{}}}))}catch{me.form=Ie}}else me.form=Ie;else me.body=Ie}else me.body=Ie;return me})(qe,P):(function(Se,me){const{spec:Me,operation:Ie,securities:Qe,requestContentType:ot,responseContentType:qt,attachContentTypeForEmptyPayload:kn}=Se;if(me=(function({request:Tt,securities:on={},operation:nr={},spec:yi}){const Zn={...Tt},{authorized:In={},specSecurity:Ni=[]}=on,kr=nr.security||Ni,Tr=In&&!!Object.keys(In).length,Ir=yi.securityDefinitions;return Zn.headers=Zn.headers||{},Zn.query=Zn.query||{},Object.keys(on).length&&Tr&&kr&&(!Array.isArray(nr.security)||nr.security.length)?(kr.forEach((la=>{Object.keys(la).forEach((Zl=>{const Kr=In[Zl];if(!Kr)return;const{token:Ko}=Kr,hs=Kr.value||Kr,Vo=Ir[Zl],{type:pp}=Vo,Qx=Vo["x-tokenName"]||"access_token",eb=Ko&&Ko[Qx];let Ho=Ko&&Ko.token_type;if(Kr)if(pp==="apiKey"){const vi=Vo.in==="query"?"query":"headers";Zn[vi]=Zn[vi]||{},Zn[vi][Vo.name]=hs}else if(pp==="basic")if(hs.header)Zn.headers.authorization=hs.header;else{const vi=hs.username||"",$d=hs.password||"";hs.base64=jP(`${vi}:${$d}`),Zn.headers.authorization=`Basic ${hs.base64}`}else pp==="oauth2"&&eb&&(Ho=Ho&&Ho.toLowerCase()!=="bearer"?Ho:"Bearer",Zn.headers.authorization=`${Ho} ${eb}`)}))})),Zn):Tt})({request:me,securities:Qe,operation:Ie,spec:Me}),me.body||me.form||kn)ot?me.headers["Content-Type"]=ot:Array.isArray(Ie.consumes)?[me.headers["Content-Type"]]=Ie.consumes:Array.isArray(Me.consumes)?[me.headers["Content-Type"]]=Me.consumes:Ie.parameters&&Ie.parameters.filter((Tt=>Tt.type==="file")).length?me.headers["Content-Type"]="multipart/form-data":Ie.parameters&&Ie.parameters.filter((Tt=>Tt.in==="formData")).length&&(me.headers["Content-Type"]="application/x-www-form-urlencoded");else if(ot){const Tt=Ie.parameters&&Ie.parameters.filter((nr=>nr.in==="body")).length>0,on=Ie.parameters&&Ie.parameters.filter((nr=>nr.in==="formData")).length>0;(Tt||on)&&(me.headers["Content-Type"]=ot)}return!qt&&Array.isArray(Ie.produces)&&Ie.produces.length>0&&(me.headers.accept=Ie.produces.join(", ")),me})(qe,P),P.cookies&&Object.keys(P.cookies).length){const Se=Object.keys(P.cookies).reduce(((me,Me)=>{const Ie=P.cookies[Me];return me+(me?"&":"")+ZG(Me,Ie)}),"");P.headers.Cookie=Se}return P.cookies&&delete P.cookies,qp(P)}const cR=t=>t?t.replace(/\W/g,""):null;function OP(t){return ak(t.spec)?(function({spec:n,pathName:i,method:l,server:h,contextUrl:v,serverVariables:x={},serverVariableEncoder:w}){var C,$;let N,_=[],F="";const U=n==null||(C=n.paths)===null||C===void 0||(C=C[i])===null||C===void 0||(C=C[(l||"").toLowerCase()])===null||C===void 0?void 0:C.servers,J=n==null||($=n.paths)===null||$===void 0||($=$[i])===null||$===void 0?void 0:$.servers,Y=n?.servers;if(_=uR(U)?U:uR(J)?J:uR(Y)?Y:[Lp],h&&(N=_.find((Z=>Z.url===h)),N&&(F=h)),F||([N]=_,F=N.url),((Z,{strict:P=!1}={})=>{try{const se=EP(Z);if(!se.result.success)return!1;const ae=[];se.ast.translate(ae);const he=ae.some((([ge])=>ge==="server-variable"));if(!P&&!he)try{return new URL(Z,"https://vladimirgorej.com"),!0}catch{return!1}return!P||he}catch{return!1}})(F,{strict:!0})){const Z=Object.entries({...N.variables}).reduce(((P,[se,ae])=>(P[se]=ae.default,P)),{});F=((P,se,ae={})=>{const he={encoder:sX,...ae},ge=EP(P);if(!ge.result.success)return P;const pe=[];return ge.ast.translate(pe),pe.filter((([Ae])=>iX.includes(Ae))).map((([Ae,qe])=>Ae==="server-variable-name"?Object.hasOwn(se,qe)?he.encoder(se[qe],qe):`{${qe}}`:qe)).join("")})(F,{...Z,...x},{encoder:typeof w=="function"?w:rO})}return(function(Z="",P=""){const se=lR(Z&&P?$s(P,Z):Z),ae=lR(P),he=cR(se.protocol)||cR(ae.protocol),ge=se.host||ae.host,pe=se.pathname;let Te;return Te=he&&ge?`${he}://${ge+pe}`:pe,Te[Te.length-1]==="/"?Te.slice(0,-1):Te})(F,v)})(t):(function({spec:n,scheme:i,contextUrl:l=""}){const h=lR(l),v=Array.isArray(n.schemes)?n.schemes[0]:null,x=i||v||cR(h.protocol)||"http",w=n.host||h.host||"",C=n.basePath||"";let $;return $=w?`${x}://${w+C}`:C,$[$.length-1]==="/"?$.slice(0,-1):$})(t)}const uR=t=>Array.isArray(t)&&t.length>0;function tr(t,n={}){if(typeof t=="string"?n.url=t:n=t,!(this instanceof tr))return new tr(n);Object.assign(this,n);const i=this.resolve().then((()=>(this.disableInterfaces||Object.assign(this,tr.makeApisTagOperation(this)),this)));return i.client=this,i}function kP(t){const n=(t=t.replace("[]","Array")).split("/");return n[0]=n[0].replace(/[^A-Za-z0-9_\-\.]+|\s+/gm,"_"),n.join("/")}tr.http=ni,tr.makeHttp=(function(t,n,i){return i=i||(l=>l),n=n||(l=>l),l=>(typeof l=="string"&&(l={url:l}),l=qp(l),l=n(l),i(t(l)))}).bind(null,tr.http),tr.resolveStrategies={"openapi-3-1-apidom":VG,"openapi-3-0":ID,"openapi-2-0":MD,generic:ND},tr.resolve=zD({strategies:[tr.resolveStrategies["openapi-3-1-apidom"],tr.resolveStrategies["openapi-3-0"],tr.resolveStrategies["openapi-2-0"],tr.resolveStrategies.generic]}),tr.resolveSubtree=(t=>async(n,i,l={})=>(async(h,v,x={})=>{const{returnEntireTree:w,baseDoc:C,requestInterceptor:$,responseInterceptor:N,parameterMacro:_,modelPropertyMacro:F,useCircularStructures:U,strategies:J}=x,Y={spec:h,pathDiscriminator:v,baseDoc:C,requestInterceptor:$,responseInterceptor:N,parameterMacro:_,modelPropertyMacro:F,useCircularStructures:U,strategies:J},Z=J.find((se=>se.match(h))).normalize(h),P=await d7({spec:Z,...Y,allowMetaPatches:!0,skipNormalization:!ik(h)});return!w&&Array.isArray(v)&&v.length&&(P.spec=v.reduce(((se,ae)=>se?.[ae]),P.spec)||null),P})(n,i,{...t,...l}))({strategies:[tr.resolveStrategies["openapi-3-1-apidom"],tr.resolveStrategies["openapi-3-0"],tr.resolveStrategies["openapi-2-0"],tr.resolveStrategies.generic]}),tr.execute=function({http:t,fetch:n,spec:i,operationId:l,pathName:h,method:v,parameters:x,securities:w,...C}){const $=t||n||ni;h&&v&&!l&&(l=bP(h,v));const N=jX.buildRequest({spec:i,operationId:l,parameters:x,securities:w,http:$,...C});return N.body&&(Jh(N.body)||Array.isArray(N.body))&&(N.body=JSON.stringify(N.body)),$(N)},tr.serializeRes=Qp,tr.serializeHeaders=ti,tr.clearCache=function(){sp.refs.clearCache()},tr.makeApisTagOperation=function(t={}){const n=YG(t);return{apis:XG({v2OperationIdCompatibilityMode:t.v2OperationIdCompatibilityMode,spec:t.spec,cb:n})}},tr.buildRequest=AP,tr.helpers={opId:Ex},tr.getBaseUrl=OP,tr.apidom={resolve:{resolvers:{HTTPResolverSwaggerClient:dP}},parse:{parsers:{JsonParser:hP,YamlParser:pP,OpenApiJson3_1Parser:fP,OpenApiYaml3_1Parser:mP}},dereference:{strategies:{OpenApi3_1SwaggerClientDereferenceStrategy:yP}}},tr.prototype={http:ni,execute(t){return this.applyDefaults(),tr.execute({spec:this.spec,http:this.http,securities:{authorized:this.authorizations},contextUrl:typeof this.url=="string"?this.url:void 0,requestInterceptor:this.requestInterceptor||null,responseInterceptor:this.responseInterceptor||null,...t})},resolve(t={}){return tr.resolve({spec:this.spec,url:this.url,http:this.http||this.fetch,allowMetaPatches:this.allowMetaPatches,useCircularStructures:this.useCircularStructures,requestInterceptor:this.requestInterceptor||null,responseInterceptor:this.responseInterceptor||null,skipNormalization:this.skipNormalization||!1,...t}).then((n=>(this.originalSpec=this.spec,this.spec=n.spec,this.errors=n.errors,this)))}},tr.prototype.applyDefaults=function(){const{spec:t}=this,n=this.url;if(DD(t)&&HG(n)){const i=new URL(n);t.host||(t.host=i.host),t.schemes||(t.schemes=[i.protocol.replace(":","")]),t.basePath||(t.basePath="/")}else if(ak(t)){const i=Array.isArray(t.servers)&&t.servers.length===0;t.servers&&!i||(t.servers=[Lp])}};const ir={parameterTypeProperties:["format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","minLength","maxLength","multipleOf","minItems","maxItems","uniqueItems","minProperties","maxProperties","additionalProperties","pattern","enum","default"],arrayProperties:["items","minItems","maxItems","uniqueItems"],httpMethods:["get","post","put","delete","patch","head","options","trace"],uniqueOnly:function(t,n,i){return i.indexOf(t)===n},createHash:function(t){let n,i=0;if(t.length===0)return i;for(let l=0;l<t.length;l++)n=t.charCodeAt(l),i=(i<<5)-i+n,i|=0;return i},sanitise:kP,sanitiseAll:function(t){return kP(t.split("/").join("_"))},camelize:function(t){return t.toLowerCase().replace(/[-_ \/\.](.)/g,((n,i)=>i.toUpperCase()))},clone:function(t){return JSON.parse(JSON.stringify(t))},circularClone:function t(n,i=null){if(i||(i=new WeakMap),Object(n)!==n||n instanceof Function)return n;if(i.has(n))return i.get(n);let l;try{l=new n.constructor}catch{l=Object.create(Object.getPrototypeOf(n))}return i.set(n,l),Object.assign(l,...Object.keys(n).map((h=>({[h]:t(n[h],i)}))))}};function RP(){return{depth:0,seen:new WeakMap,top:!0,combine:!1,allowRefSiblings:!1}}const CX={getDefaultState:RP,walkSchema:function t(n,i,l,h){if(l.depth===void 0&&(l=RP()),n==null||(l.combine&&(n.allOf&&Array.isArray(n.allOf)&&n.allOf.length===1&&delete(n={...n.allOf[0],...n})?.allOf,n?.anyOf&&Array.isArray(n.anyOf)&&n.anyOf.length===1&&delete(n={...n.anyOf[0],...n})?.anyOf,n?.oneOf&&Array.isArray(n.oneOf)&&n.oneOf.length===1&&delete(n={...n.oneOf[0],...n})?.oneOf),h(n,i,l),l.seen.has(n)))return n;if(typeof n=="object"&&n!==null&&l.seen.set(n,!0),l.top=!1,l.depth++,n?.items!==void 0&&(l.property="items",t(n.items,n,l,h)),n?.additionalItems&&typeof n.additionalItems=="object"&&(l.property="additionalItems",t(n.additionalItems,n,l,h)),n?.additionalProperties&&typeof n.additionalProperties=="object"&&(l.property="additionalProperties",t(n.additionalProperties,n,l,h)),n?.properties)for(const v in n.properties){const x=n.properties[v];l.property=`properties/${v}`,t(x,n,l,h)}if(n?.patternProperties)for(const v in n.patternProperties){const x=n.patternProperties[v];l.property=`patternProperties/${v}`,t(x,n,l,h)}if(n?.allOf)for(const v in n.allOf){const x=n.allOf[v];l.property=`allOf/${v}`,t(x,n,l,h)}if(n?.anyOf)for(const v in n.anyOf){const x=n.anyOf[v];l.property=`anyOf/${v}`,t(x,n,l,h)}if(n?.oneOf)for(const v in n.oneOf){const x=n.oneOf[v];l.property=`oneOf/${v}`,t(x,n,l,h)}return n?.not&&(l.property="not",t(n.not,n,l,h)),l.depth--,n}};function dR(t,n,i){if(n||(n={depth:0}),n.depth||(n={path:"#",depth:0,pkey:"",parent:{},payload:{},seen:new WeakMap,identity:!1,identityDetection:!1,...n}),typeof t!="object")return;const l=n.path;for(const h in t){if(n.key=h,n.path=`${n.path}/${encodeURIComponent(h)}`,n.identityPath=n.seen.get(t[h]),n.identity=n.identityPath!==void 0,t.hasOwnProperty(h)&&i(t,h,n),typeof t[h]=="object"&&!n.identity){n.identityDetection&&!Array.isArray(t[h])&&t[h]!==null&&n.seen.set(t[h],n.path);const v={};v.parent=t,v.path=n.path,v.depth=n.depth?n.depth+1:1,v.pkey=h,v.payload=n.payload,v.seen=n.seen,v.identity=!1,v.identityDetection=n.identityDetection,dR(t[h],v,i)}n.path=l}}let TP;function hR(t,n){for(const i in t)i.startsWith("x-")&&!i.startsWith("x-s2o")&&(n[i]=t[i])}function RE(t,n){CX.walkSchema(t,{},{},((i,l)=>{(function(h){if(h["x-required"]&&Array.isArray(h["x-required"])&&(h.required||(h.required=[]),h.required=h.required.concat(h["x-required"]),delete h["x-required"]),h["x-anyOf"]&&(h.anyOf=h["x-anyOf"],delete h["x-anyOf"]),h["x-oneOf"]&&(h.oneOf=h["x-oneOf"],delete h["x-oneOf"]),h["x-not"]&&(h.not=h["x-not"],delete h["x-not"]),typeof h["x-nullable"]=="boolean"&&(h.nullable=h["x-nullable"],delete h["x-nullable"]),typeof h["x-discriminator"]=="object"&&typeof h["x-discriminator"].propertyName=="string"){h.discriminator=h["x-discriminator"],delete h["x-discriminator"];for(const v in h.discriminator.mapping){const x=h.discriminator.mapping[v];x.startsWith("#/definitions/")&&(h.discriminator.mapping[v]=x.replace("#/definitions/","#/components/schemas/"))}}})(i),(function(h,v,x){if(h.nullable&&x.patches++,h.discriminator&&typeof h.discriminator=="string"&&(h.discriminator={propertyName:h.discriminator}),h.items&&Array.isArray(h.items)&&(h.items.length===0?h.items={}:h.items.length===1?h.items=h.items[0]:h.items={anyOf:h.items}),h.type&&Array.isArray(h.type)){if(x.patches++,x.warnings.push("(Patchable) schema type must not be an array"),h.type.length===0)delete h.type;else{h.oneOf||(h.oneOf=[]);for(const w of h.type){const C={};if(w==="null")h.nullable=!0;else{C.type=w;for(const $ of ir.arrayProperties)h.prop!==void 0&&(C[$]=h[$],delete h[$])}C.type&&h.oneOf.push(C)}delete h.type,h.oneOf.length===0?delete h.oneOf:h.oneOf.length<2&&(h.type=h.oneOf[0].type,Object.keys(h.oneOf[0]).length>1&&(x.patches++,x.warnings.push("Lost properties from oneOf")),delete h.oneOf)}h.type&&Array.isArray(h.type)&&h.type.length===1&&(h.type=h.type[0])}h.type&&h.type==="null"&&(delete h.type,h.nullable=!0),h.type!=="array"||h.items||(h.items={}),h.type==="file"&&(h.type="string",h.format="binary"),typeof h.required=="boolean"&&(h.required&&h.name&&(v.required===void 0&&(v.required=[]),Array.isArray(v.required)&&v.required.push(h.name)),delete h.required),h.xml&&typeof h.xml.namespace=="string"&&(h.xml.namespace||delete h.xml.namespace),h.allowEmptyValue&&(delete h.allowEmptyValue,x.patches++,x.warnings.push("(Patchable): deleted schema.allowEmptyValue"))})(i,l,n)}))}function _P(t){for(const n in t)for(const i in t[n]){const l=ir.sanitise(i);i!==l&&(t[n][l]=t[n][i],delete t[n][i])}}function AX(t,n){if(t.type==="basic"&&(t.type="http",t.scheme="basic"),t.type==="oauth2"){const i={};let l=t.flow;t.flow==="application"&&(l="clientCredentials"),t.flow==="accessCode"&&(l="authorizationCode"),typeof t.authorizationUrl=="string"&&(i.authorizationUrl=t.authorizationUrl.split("?")[0].trim()||"/"),typeof t.tokenUrl=="string"&&(i.tokenUrl=t.tokenUrl.split("?")[0].trim()||"/"),i.scopes=t.scopes||{},t.flows={},t.flows[l]=i,delete t.flow,delete t.authorizationUrl,delete t.tokenUrl,delete t.scopes,t.name&&(delete t.name,n.patches++,n.warnings.push("(Patchable) oauth2 securitySchemes should not have name property"))}}function $P(t){return t&&!t["x-s2o-delete"]}function NP(t,n){if(t.type&&!t.schema&&(t.schema={}),t.type&&(t.schema.type=t.type),t.items&&t.items.type!=="array"){if(t.items.collectionFormat!==t.collectionFormat)return n.errCount++,void n.errors.push({message:"Nested collectionFormats are not supported",pointer:"/.../responses/header"});delete t.items.collectionFormat}t.type==="array"?(t.collectionFormat==="ssv"?(n.patches++,n.warnings.push("collectionFormat:ssv is no longer supported for headers")):t.collectionFormat==="pipes"?(n.patches++,n.warnings.push("collectionFormat:pipes is no longer supported for headers")):t.collectionFormat==="multi"?t.explode=!0:t.collectionFormat==="tsv"?(t["x-collectionFormat"]="tsv",n.patches++,n.warnings.push("collectionFormat:tsv is no longer supported")):t.style="simple",delete t.collectionFormat):t.collectionFormat&&(delete t.collectionFormat,n.patches++,n.warnings.push("(Patchable) collectionFormat is only applicable to header.type array")),delete t.type;for(const i of ir.parameterTypeProperties)t[i]!==void 0&&(t.schema[i]=t[i],delete t[i]);for(const i of ir.arrayProperties)t[i]!==void 0&&(t.schema[i]=t[i],delete t[i])}function TE(t,n,i,l,h,v,x){const w={};let C,$=!0;n&&n.consumes&&typeof n.consumes=="string"&&(n.consumes=[n.consumes],x.patches++,x.warnings.push("(Patchable) operation.consumes must be an array")),Array.isArray(v.consumes)||delete v.consumes;const N=((n?n.consumes:null)||v.consumes||[]).filter(ir.uniqueOnly);if(t&&(t.name||t.in)){typeof t["x-deprecated"]=="boolean"&&(t.deprecated=t["x-deprecated"],delete t["x-deprecated"]),t["x-example"]!==void 0&&(t.example=t["x-example"],delete t["x-example"]),t.in==="body"||t.type||(t.type="string",x.patches++,x.warnings.push("(Patchable) parameter.type is mandatory for non-body parameters")),t.type==="file"&&(t["x-s2o-originalType"]=t.type,C=t.type),t.description===null&&delete t.description;let _=t.collectionFormat;if(t.type!=="array"||_||(_="csv"),_&&(t.type!=="array"&&(delete t.collectionFormat,x.patches++,x.warnings.push("(Patchable) collectionFormat is only applicable to param.type array")),_!=="csv"||t.in!=="query"&&t.in!=="cookie"||(t.style="form",t.explode=!1),_!=="csv"||t.in!=="path"&&t.in!=="header"||(t.style="simple"),_==="ssv"&&(t.in==="query"?t.style="spaceDelimited":x.warnings.push(`${t.name} collectionFormat:ssv is no longer supported except for in:query parameters`)),_==="pipes"&&(t.in==="query"?t.style="pipeDelimited":x.warnings.push(`${t.name} collectionFormat:pipes is no longer supported except for in:query parameters`)),_==="multi"&&(t.explode=!0),_==="tsv"&&(x.warnings.push("collectionFormat:tsv is no longer supported"),t["x-collectionFormat"]="tsv"),delete t.collectionFormat),t.type&&t.type!=="body"&&t.in!=="formData")if(t.items&&t.schema)x.warnings.push(`${t.name} parameter has array,items and schema`);else{t.schema&&x.patches++,t.schema&&typeof t.schema=="object"||(t.schema={}),t.schema.type=t.type,t.items&&(t.schema.items=t.items,delete t.items,dR(t.schema.items,null,((F,U)=>{U==="collectionFormat"&&typeof F[U]=="string"&&(_&&F[U]!==_&&x.warnings.push(`${t.name} Nested collectionFormats are not supported`),delete F[U])})));for(const F of ir.parameterTypeProperties)t[F]!==void 0&&(t.schema[F]=t[F]),delete t[F]}t.schema&&RE(t.schema,x),t["x-ms-skip-url-encoding"]&&t.in==="query"&&(t.allowReserved=!0,delete t["x-ms-skip-url-encoding"])}if(t&&t.in==="formData"){$=!1,w.content={};let _="application/x-www-form-urlencoded";if(N.length&&N.indexOf("multipart/form-data")>=0&&(_="multipart/form-data"),w.content[_]={},t.schema)w.content[_].schema=t.schema;else{w.content[_].schema={},w.content[_].schema.type="object",w.content[_].schema.properties={},w.content[_].schema.properties[t.name]={};const F=w.content[_].schema,U=w.content[_].schema.properties[t.name];t.description&&(U.description=t.description),t.example&&(U.example=t.example),t.type&&(U.type=t.type);for(const J of ir.parameterTypeProperties)t[J]!==void 0&&(U[J]=t[J]);t.required===!0&&(F.required||(F.required=[]),F.required.push(t.name),w.required=!0),t.default!==void 0&&(U.default=t.default),U.properties&&(U.properties=t.properties),t.allOf&&(U.allOf=t.allOf),t.type==="array"&&t.items&&(U.items=t.items,U.items.collectionFormat&&delete U.items.collectionFormat),C!=="file"&&t["x-s2o-originalType"]!=="file"||(U.type="string",U.format="binary"),hR(t,U)}}else t&&t.type==="file"&&(t.required&&(w.required=t.required),w.content={},w.content["application/octet-stream"]={},w.content["application/octet-stream"].schema={},w.content["application/octet-stream"].schema.type="string",w.content["application/octet-stream"].schema.format="binary",hR(t,w));if(t&&t.in==="body"){w.content={},t.name&&(w["x-s2o-name"]=(n&&n.operationId?ir.sanitiseAll(n.operationId):"")+ir.camelize(`_${t.name}`)),t.description&&(w.description=t.description),t.required&&(w.required=t.required),N.length||N.push("application/json");for(const _ of N)w.content[_]={},w.content[_].schema=ir.clone(t.schema||{}),RE(w.content[_].schema,x);hR(t,w)}if(Object.keys(w).length>0&&(t["x-s2o-delete"]=!0,n))if(n.requestBody&&$){n.requestBody["x-s2o-overloaded"]=!0;const _=n.operationId||h;x.warnings.push(`Operation ${_} has multiple requestBodies`)}else n.requestBody||(n=(function(_,F){const U={};for(const J of Object.keys(_))U[J]=_[J],J==="parameters"&&(U.requestBody={},F.rbname&&(U[F.rbname]=""));return U.requestBody={},U})(n,x),i[l]=n),n.requestBody.content&&n.requestBody.content["multipart/form-data"]&&n.requestBody.content["multipart/form-data"].schema&&n.requestBody.content["multipart/form-data"].schema.properties&&w.content["multipart/form-data"]&&w.content["multipart/form-data"].schema&&w.content["multipart/form-data"].schema.properties?(n.requestBody.content["multipart/form-data"].schema.properties=Object.assign(n.requestBody.content["multipart/form-data"].schema.properties,w.content["multipart/form-data"].schema.properties),n.requestBody.content["multipart/form-data"].schema.required=(n.requestBody.content["multipart/form-data"].schema.required||[]).concat(w.content["multipart/form-data"].schema.required||[]),n.requestBody.content["multipart/form-data"].schema.required.length||delete n.requestBody.content["multipart/form-data"].schema.required):n.requestBody.content&&n.requestBody.content["application/x-www-form-urlencoded"]&&n.requestBody.content["application/x-www-form-urlencoded"].schema&&n.requestBody.content["application/x-www-form-urlencoded"].schema.properties&&w.content["application/x-www-form-urlencoded"]&&w.content["application/x-www-form-urlencoded"].schema&&w.content["application/x-www-form-urlencoded"].schema.properties?(n.requestBody.content["application/x-www-form-urlencoded"].schema.properties=Object.assign(n.requestBody.content["application/x-www-form-urlencoded"].schema.properties,w.content["application/x-www-form-urlencoded"].schema.properties),n.requestBody.content["application/x-www-form-urlencoded"].schema.required=(n.requestBody.content["application/x-www-form-urlencoded"].schema.required||[]).concat(w.content["application/x-www-form-urlencoded"].schema.required||[]),n.requestBody.content["application/x-www-form-urlencoded"].schema.required.length||delete n.requestBody.content["application/x-www-form-urlencoded"].schema.required):(n.requestBody=Object.assign(n.requestBody,w),n.requestBody["x-s2o-name"]||n.operationId&&(n.requestBody["x-s2o-name"]=ir.sanitiseAll(n.operationId)));if(t&&!t["x-s2o-delete"]){delete t.type;for(const _ of ir.parameterTypeProperties)delete t[_];t.in!=="path"||t.required!==void 0&&t.required===!0||(t.required=!0,x.patches++,x.warnings.push(`(Patchable) path parameters must be required:true [${t.name} in ${h}]`))}return n}function DP(t,n,i,l){if(!t)return!1;if(t.description||typeof t!="object"||Array.isArray(t)||(l.patches++,l.warnings.push("(Patchable) response.description is mandatory")),t.schema!==void 0){RE(t.schema,l),n&&n.produces&&typeof n.produces=="string"&&(n.produces=[n.produces],l.patches++,l.warnings.push("(Patchable) operation.produces must be an array")),i.produces&&!Array.isArray(i.produces)&&delete i.produces;const h=((n?n.produces:null)||i.produces||[]).filter(ir.uniqueOnly);h.length||h.push("*/*"),t.content={};for(const v of h){if(t.content[v]={},t.content[v].schema=ir.clone(t.schema),t.examples&&t.examples[v]){const x={};x.value=t.examples[v],t.content[v].examples={},t.content[v].examples.response=x,delete t.examples[v]}t.content[v].schema.type==="file"&&(t.content[v].schema={type:"string",format:"binary"})}delete t.schema}for(const h in t.examples)t.content||(t.content={}),t.content[h]||(t.content[h]={}),t.content[h].examples={},t.content[h].examples.response={},t.content[h].examples.response.value=t.examples[h];if(delete t.examples,t.headers)for(const h in t.headers)h.toLowerCase()==="status code"?(delete t.headers[h],l.patches++,l.warnings.push('(Patchable) "Status Code" is not a valid header')):NP(t.headers[h],l)}function PP(t,n,i,l,h){for(const v in t){const x=t[v];x&&x["x-trace"]&&typeof x["x-trace"]=="object"&&(x.trace=x["x-trace"],delete x["x-trace"]),x&&x["x-summary"]&&typeof x["x-summary"]=="string"&&(x.summary=x["x-summary"],delete x["x-summary"]),x&&x["x-description"]&&typeof x["x-description"]=="string"&&(x.description=x["x-description"],delete x["x-description"]),x&&x["x-servers"]&&Array.isArray(x["x-servers"])&&(x.servers=x["x-servers"],delete x["x-servers"]);for(const w in x)if(ir.httpMethods.indexOf(w)>=0||w==="x-amazon-apigateway-any-method"){let C=x[w];if(C&&C.parameters&&Array.isArray(C.parameters)){if(x.parameters)for(const $ of x.parameters)C.parameters.find((N=>N.name===$.name&&N.in===$.in))||$.in!=="formData"&&$.in!=="body"&&$.type!=="file"||(C=TE($,C,x,w,v,h,i));for(const $ of C.parameters)C=TE($,C,x,w,`${w}: ${v}`,h,i);C.parameters&&(C.parameters=C.parameters.filter($P))}if(C&&C.security&&_P(C.security),typeof C=="object"){if(!C.responses){const $={description:"Default response"};C.responses={default:$}}for(const $ in C.responses)DP(C.responses[$],C,h,i)}if(C&&C["x-servers"]&&Array.isArray(C["x-servers"]))C.servers=C["x-servers"],delete C["x-servers"];else if(C&&C.schemes&&C.schemes.length){for(const $ of C.schemes)if((!h.schemes||h.schemes.indexOf($)<0)&&(C.servers||(C.servers=[]),Array.isArray(h.servers)))for(const N of h.servers){const _=ir.clone(N);C.servers.push(_)}}if(C){if(delete C.consumes,delete C.produces,delete C.schemes,C["x-ms-examples"]){for(const $ in C["x-ms-examples"]){const N=C["x-ms-examples"][$],_=ir.sanitiseAll($);if(N.parameters)for(const F in N.parameters){const U=N.parameters[F];for(const J of(C.parameters||[]).concat(x.parameters||[]))J.name!==F||J.example||(J.examples||(J.examples={}),J.examples[$]={value:U})}if(N.responses)for(const F in N.responses){if(N.responses[F].headers)for(const U in N.responses[F].headers){const J=N.responses[F].headers[U];for(const Y in C.responses[F].headers)Y===U&&(C.responses[F].headers[Y].example=J)}if(N.responses[F].body&&(h.components.examples[_]={value:ir.clone(N.responses[F].body)},C.responses[F]&&C.responses[F].content))for(const U in C.responses[F].content){const J=C.responses[F].content[U];J.examples||(J.examples={}),J.examples[$]={$ref:`#/components/examples/${_}`}}}}delete C["x-ms-examples"]}if(C.parameters&&C.parameters.length===0&&delete C.parameters,C.requestBody){const $=C.operationId?ir.sanitiseAll(C.operationId):ir.camelize(ir.sanitiseAll(w+v)),N=ir.sanitise(C.requestBody["x-s2o-name"]||$||"");delete C.requestBody["x-s2o-name"];const _=JSON.stringify(C.requestBody),F=ir.createHash(_);if(!l[F]){const J={};J.name=N,J.body=C.requestBody,J.refs=[],l[F]=J}const U=`#/${n}/${encodeURIComponent(v)}/${w}/requestBody`;l[F].refs.push(U)}}}if(x&&x.parameters){for(const w in x.parameters)TE(x.parameters[w],null,x,null,v,h,i);Array.isArray(x.parameters)&&(x.parameters=x.parameters.filter($P))}}}function MP(t){return t&&t.url&&typeof t.url=="string"&&(t.url=t.url.split("{{").join("{"),t.url=t.url.split("}}").join("}"),t.url.replace(/\{(.+?)\}/g,((n,i)=>{t.variables||(t.variables={}),t.variables[i]={default:"unknown"}}))),t}function IP(t,n){t.info!==void 0&&t.info!==null||(t.info={version:"",title:""},n.patches++,n.warnings.push("(Patchable) info object is mandatory")),(typeof t.info!="object"||Array.isArray(t.info))&&(n.errCount++,n.errors.push({message:"info must be an object",pointer:"/info"})),t.info&&(t.info.title===void 0&&(n.patches++,t.info.title="",n.warnings.push({message:"(Patchable) info.title cannot be null",pointer:"/info/title",patchable:!0})),t.info.version===void 0?(n.patches++,t.info.version="",n.warnings.push("(Patchable) info.version cannot be null")):typeof t.info.version!="string"&&(n.patches++,t.info.version=t.info.version.toString(),n.warnings.push("(Patchable) info.version must be a string")))}function zP(t,n){t.paths||(n.patches++,t.paths={},n.warnings.push("(Patchable) paths object is mandatory"))}function OX(t={}){const n={original:t,openapi:{},patches:0,warnings:[],errCount:0,errors:[]};if(t.openapi&&typeof t.openapi=="string"&&t.openapi.startsWith("3."))return n.openapi=ir.circularClone(t),IP(n.openapi,n),zP(n.openapi,n),n;if(t.swagger!=="2.0")return n.errCount++,n.errors.push({message:`Unsupported swagger/OpenAPI version: ${t.openapi?t.openapi:t.swagger}`,pointer:"/swagger"}),n;if(n.openapi=ir.circularClone(t),n.openapi.openapi="3.0.0",delete n.openapi.swagger,dR(n.openapi,{},((i,l,h)=>{i[l]===null&&!l.startsWith("x-")&&l!=="default"&&h.path.indexOf("/example")<0&&delete i[l]})),t.host)(t.schemes||[]).forEach((i=>{const l={},h=(t.basePath||"").replace(/\/$/,"");l.url=`${i?`${i}:`:""}//${t.host}${h}`,MP(l),n.openapi.servers||(n.openapi.servers=[]),n.openapi.servers.push(l)}));else if(t.basePath){const i={};i.url=t.basePath,MP(i),n.openapi.servers||(n.openapi.servers=[]),n.openapi.servers.push(i)}if(delete n.openapi.host,delete n.openapi.basePath,t["x-ms-parameterized-host"]){const i=t["x-ms-parameterized-host"],l={};l.url=i.hostTemplate+(t.basePath?t.basePath:""),l.variables={};const h=l.url.match(/\{\w+\}/g);for(const v in i.parameters){const x=i.parameters[v];v.startsWith("x-")||(delete x.required,delete x.type,delete x.in,x.default===void 0&&(x.enum?x.default=x.enum[0]:x.default="none"),x.name||(x.name=h[v].replace("{","").replace("}","")),l.variables[x.name]=x,delete x.name)}n.openapi.servers||(n.openapi.servers=[]),i.useSchemePrefix===!1?n.openapi.servers.push(l):t.schemes.forEach((v=>{n.openapi.servers.push({...l,url:`${v}://${l.url}`})})),delete n.openapi["x-ms-parameterized-host"]}return IP(n.openapi,n),zP(n.openapi,n),typeof n.openapi.consumes=="string"&&(n.openapi.consumes=[n.openapi.consumes]),typeof n.openapi.produces=="string"&&(n.openapi.produces=[n.openapi.produces]),n.openapi.components={},n.openapi["x-callbacks"]&&(n.openapi.components.callbacks=n.openapi["x-callbacks"],delete n.openapi["x-callbacks"]),n.openapi.components.examples={},n.openapi.components.headers={},n.openapi["x-links"]&&(n.openapi.components.links=n.openapi["x-links"],delete n.openapi["x-links"]),n.openapi.components.parameters=n.openapi.parameters||{},n.openapi.components.responses=n.openapi.responses||{},n.openapi.components.requestBodies={},n.openapi.components.securitySchemes=n.openapi.securityDefinitions||{},n.openapi.components.schemas=n.openapi.definitions||{},delete n.openapi.definitions,delete n.openapi.responses,delete n.openapi.parameters,delete n.openapi.securityDefinitions,(function(i){const l=i.openapi,h={};TP={schemas:{}},l.security&&_P(l.security);for(const v in l.components.securitySchemes){const x=ir.sanitise(v);if(v!==x){if(l.components.securitySchemes[x])return i.errCount++,i.errors.push({message:`Duplicate sanitised securityScheme name ${x}`,pointer:`/components/securitySchemes/${x}`}),i;l.components.securitySchemes[x]=l.components.securitySchemes[v],delete l.components.securitySchemes[v]}AX(l.components.securitySchemes[x],i)}for(const v in l.components.schemas){const x=ir.sanitiseAll(v);let w=0;if(v!==x){for(;l.components.schemas[x+w];)w=w?++w:2;l.components.schemas[x+w]=l.components.schemas[v],delete l.components.schemas[v]}TP.schemas[v]=x+w,RE(l.components.schemas[`${x}${w}`],i)}for(const v in l.components.parameters){const x=ir.sanitise(v);if(v!==x){if(l.components.parameters[x])return i.errCount++,i.errors.push({message:`Duplicate sanitised parameter name ${x}`,pointer:`/components/parameters/${x}`}),i;l.components.parameters[x]=l.components.parameters[v],delete l.components.parameters[v]}TE(l.components.parameters[x],null,null,null,x,l,i)}for(const v in l.components.responses){const x=ir.sanitise(v);if(v!==x){if(l.components.responses[x])return i.errCount++,i.errors.push({message:`Duplicate sanitised response name ${x}`,pointer:`/components/responses/${x}`}),i;l.components.responses[x]=l.components.responses[v],delete l.components.responses[v]}const w=l.components.responses[x];if(DP(w,null,l,i),w.headers)for(const C in w.headers)C.toLowerCase()==="status code"?(delete w.headers[C],i.patches++,i.warnings.push('(Patchable) "Status Code" is not a valid header')):NP(w.headers[C],i)}for(const v in l.components.requestBodies){const x=l.components.requestBodies[v],w=JSON.stringify(x),C=ir.createHash(w),$={};$.name=v,$.body=x,$.refs=[],h[C]=$}PP(l.paths,"paths",i,h,l),l["x-ms-paths"]&&PP(l["x-ms-paths"],"x-ms-paths",i,h,l);for(const v in l.components.parameters)l.components.parameters[v]["x-s2o-delete"]&&delete l.components.parameters[v];return delete l.consumes,delete l.produces,delete l.schemes,l.components.requestBodies={},l.components.responses&&Object.keys(l.components.responses).length===0&&delete l.components.responses,l.components.parameters&&Object.keys(l.components.parameters).length===0&&delete l.components.parameters,l.components.examples&&Object.keys(l.components.examples).length===0&&delete l.components.examples,l.components.requestBodies&&Object.keys(l.components.requestBodies).length===0&&delete l.components.requestBodies,l.components.securitySchemes&&Object.keys(l.components.securitySchemes).length===0&&delete l.components.securitySchemes,l.components.headers&&Object.keys(l.components.headers).length===0&&delete l.components.headers,l.components.schemas&&Object.keys(l.components.schemas).length===0&&delete l.components.schemas,l.components&&Object.keys(l.components).length===0&&delete l.components,i})(n)}function kX(t){return t.ok&&t.text&&t.parseError&&t.parseError.name==="YAMLException"&&(!t.headers["content-type"]||t.headers["content-type"].match("text/plain"))&&(t.body=t.text),t}const LP=function(t){return new Promise((async n=>{try{const i=await tr.resolve(t,kX);if(i.errors&&i.errors.length>0)n(i);else{i.spec.openapi&&(i.resolvedSpec=i.spec,n(i));const l=OX(i.spec);l.errors&&l.errors.length>0&&(Array.isArray(i.errors)?i.errors.concat(i.errors):i.errors=l.errors),l.warnings&&l.warnings.length>0&&(i.warnings=l.warnings),i.resolvedSpec=i.spec,i.spec=l.openapi,n(i)}}catch(i){n(i)}}))};async function pR(t,n=!1,i=!1,l=!1,h="",v="",x="",w="",C="",$="",N="",_=""){var F,U;let J;try{var Y,Z;let Se;if(this.requestUpdate(),Se=typeof t=="string"?await LP({url:t,allowMetaPatches:!1}):await LP({spec:t,allowMetaPatches:!1}),await Cu(0),(Y=Se.resolvedSpec)!==null&&Y!==void 0&&Y.jsonSchemaViewer&&(Z=Se.resolvedSpec)!==null&&Z!==void 0&&Z.schemaAndExamples){this.dispatchEvent(new CustomEvent("before-render",{detail:{spec:Se.resolvedSpec}}));const me=Object.entries(Se.resolvedSpec.schemaAndExamples).map((Me=>({show:!0,expanded:!0,selectedExample:null,name:Me[0],elementId:Me[0].replace(eh,"-"),...Me[1]})));return{specLoadError:!1,isSpecLoading:!1,info:Se.resolvedSpec.info,schemaAndExamples:me}}var P,se,ae,he;if(!Se.spec||!(Se.spec.components||Se.spec.info||Se.spec.servers||Se.spec.tags||Se.spec.paths))return console.info("RapiDoc: %c There was an issue while parsing the spec %o ","color:orangered",Se),{specLoadError:!0,isSpecLoading:!1,info:{title:"Error loading the spec",description:(P=Se.response)!==null&&P!==void 0&&P.url?`${(se=Se.response)===null||se===void 0?void 0:se.url} ┃ ${(ae=Se.response)===null||ae===void 0?void 0:ae.status} ${(he=Se.response)===null||he===void 0?void 0:he.statusText}`:"Unable to load the Spec",version:" "},tags:[]};J=(function(me,Me="",Ie="",Qe=""){const ot={},qt=Qe.split(",").map((on=>on.trim().toLowerCase())).filter(Boolean);function kn(on,nr){if(!Me)return!0;const yi=`${nr} ${on}`.toLowerCase();return Ie==="regex"?new RegExp(Me,"i").test(Me.toLowerCase()):yi.includes(Me.toLowerCase())}function Tt(on){return on.some((nr=>qt.includes(nr?.label.toLowerCase())))}return Object.entries(me.paths).forEach((([on,nr])=>{const yi={};Object.entries(nr).forEach((([Zn,In])=>{const Ni=In["x-badges"];kn(on,Zn)&&(Ni&&Array.isArray(Ni)&&Tt(Ni)||(yi[Zn]=In))})),Object.keys(yi).length>0&&(ot[on]=yi)})),me.paths=ot,me})(Se.spec,$,N,_),this.dispatchEvent(new CustomEvent("before-render",{detail:{spec:J}}))}catch(Se){console.info("RapiDoc: %c There was an issue while parsing the spec %o ","color:orangered",Se)}const ge=(function(Se,me,Me=!1,Ie=!1){const Qe=["get","put","post","delete","patch","head","options"],ot=Se.tags&&Array.isArray(Se.tags)&&Se.tags.length>0?Se.tags.map((Tt=>({show:!0,elementId:`tag--${Tt.name.replace(eh,"-")}`,name:Tt.name,displayName:Tt["x-displayName"]||Tt.name,description:Tt.description||"",headers:Tt.description?fR(Tt.description):[],paths:[],expanded:Tt["x-tag-expanded"]!==!1}))):[],qt=Se.paths||{};if(Se.webhooks)for(const[Tt,on]of Object.entries(Se.webhooks))on._type="webhook",qt[Tt]=on;for(const Tt in qt){const on=qt[Tt].parameters,nr={servers:qt[Tt].servers||[],parameters:qt[Tt].parameters||[]},yi=qt[Tt]._type==="webhook";Qe.forEach((Zn=>{if(qt[Tt][Zn]){const In=Se.paths[Tt][Zn],Ni=In.tags||[];if(Ni.length===0)if(Me){const kr=Tt.replace(/^\/+|\/+$/g,""),Tr=kr.indexOf("/");Tr===-1?Ni.push(kr):Ni.push(kr.substring(0,Tr))}else Ni.push("General ⦂");Ni.forEach((kr=>{let Tr,Ir;var la,Zl;Se.tags&&(Ir=Se.tags.find((hs=>hs.name.toLowerCase()===kr.toLowerCase()))),Tr=ot.find((hs=>hs.name===kr)),Tr||(Tr={show:!0,elementId:`tag--${kr.replace(eh,"-")}`,name:kr,description:((la=Ir)===null||la===void 0?void 0:la.description)||"",headers:(Zl=Ir)!==null&&Zl!==void 0&&Zl.description?fR(Ir.description):[],paths:[],expanded:!Ir||Ir["x-tag-expanded"]!==!1},ot.push(Tr));let Kr=(In.summary||In.description||`${Zn.toUpperCase()} ${Tt}`).trim();Kr.length>100&&([Kr]=Kr.split(/[.|!|?]\s|[\r?\n]/));let Ko=[];if(Ko=on?In.parameters?on.filter((hs=>{if(!In.parameters.some((Vo=>hs.name===Vo.name&&hs.in===Vo.in)))return hs})).concat(In.parameters):on.slice(0):In.parameters?In.parameters.slice(0):[],In.callbacks)for(const[hs,Vo]of Object.entries(In.callbacks)){const pp=Object.entries(Vo).filter((Qx=>typeof Qx[1]=="object"))||[];In.callbacks[hs]=Object.fromEntries(pp)}Tr.paths.push({show:!0,expanded:!1,isWebhook:yi,expandedAtLeastOnce:!1,summary:In.summary||"",description:In.description||"",externalDocs:In.externalDocs,shortSummary:Kr,method:Zn,path:Tt,operationId:In.operationId,elementId:`${Zn}-${Tt.replace(eh,"-")}`,servers:In.servers?nr.servers.concat(In.servers):nr.servers,parameters:Ko,requestBody:In.requestBody,responses:In.responses,callbacks:In.callbacks,deprecated:In.deprecated,security:In.security,xBadges:In["x-badges"]||void 0,xCodeSamples:In["x-codeSamples"]||In["x-code-samples"]||""})}))}}))}const kn=ot.filter((Tt=>Tt.paths&&Tt.paths.length>0));return kn.forEach((Tt=>{me==="method"?Tt.paths.sort(((on,nr)=>Qe.indexOf(on.method).toString().localeCompare(Qe.indexOf(nr.method)))):me==="summary"?Tt.paths.sort(((on,nr)=>on.shortSummary.localeCompare(nr.shortSummary))):me==="path"&&Tt.paths.sort(((on,nr)=>on.path.localeCompare(nr.path))),Tt.firstPathId=Tt.paths[0].elementId})),Ie?kn.sort(((Tt,on)=>Tt.name.localeCompare(on.name))):kn})(J,h,n,i),pe=(function(Se,me=!1){if(!Se.components)return[];const Me=[];for(const Ie in Se.components){const Qe=[];for(const Tt in Se.components[Ie]){const on={show:!0,id:`${Ie.toLowerCase()}-${Tt.toLowerCase()}`.replace(eh,"-"),name:Tt,component:Se.components[Ie][Tt]};Qe.push(on)}let ot=Ie,qt=Ie;switch(Ie){case"schemas":me&&Qe.sort(((Tt,on)=>Tt.name.localeCompare(on.name))),qt="Schemas",ot="Schemas allows the definition of input and output data types. These types can be objects, but also primitives and arrays.";break;case"responses":qt="Responses",ot="Describes responses from an API Operation, including design-time, static links to operations based on the response.";break;case"parameters":qt="Parameters",ot="Describes operation parameters. A unique parameter is defined by a combination of a name and location.";break;case"examples":qt="Examples",ot="List of Examples for operations, can be requests, responses and objects examples.";break;case"requestBodies":qt="Request Bodies",ot="Describes common request bodies that are used across the API operations.";break;case"headers":qt="Headers",ot='Headers follows the structure of the Parameters but they are explicitly in "header"';break;case"securitySchemes":qt="Security Schemes",ot="Defines a security scheme that can be used by the operations. Supported schemes are HTTP authentication, an API key (either as a header, a cookie parameter or as a query parameter), OAuth2's common flows(implicit, password, client credentials and authorization code) as defined in RFC6749, and OpenID Connect Discovery.";break;case"links":qt="Links",ot="Links represent a possible design-time link for a response. The presence of a link does not guarantee the caller's ability to successfully invoke it, rather it provides a known relationship and traversal mechanism between responses and other operations.";break;case"callbacks":qt="Callbacks",ot="A map of possible out-of band callbacks related to the parent operation. Each value in the map is a Path Item Object that describes a set of requests that may be initiated by the API provider and the expected responses. The key value used to identify the path item object is an expression, evaluated at runtime, that identifies a URL to use for the callback operation.";break;default:qt=Ie,ot=Ie}const kn={show:!0,name:qt,description:ot,subComponents:Qe};Me.push(kn)}return Me||[]})(J,l),Te=(F=J.info)!==null&&F!==void 0&&F.description?fR(J.info.description):[],Ae=[];if((U=J.components)!==null&&U!==void 0&&U.securitySchemes){const Se=new Set;Object.entries(J.components.securitySchemes).forEach((me=>{if(!Se.has(me[0])){Se.add(me[0]);const Me={securitySchemeId:me[0],...me[1]};Me.value="",Me.finalKeyValue="",me[1].type==="apiKey"||me[1].type==="http"?(Me.in=me[1].in||"header",Me.name=me[1].name||"Authorization",Me.user="",Me.password=""):me[1].type==="oauth2"&&(Me.in="header",Me.name="Authorization",Me.clientId="",Me.clientSecret=""),Ae.push(Me)}}))}v&&x&&w&&Ae.push({securitySchemeId:po,description:"api-key provided in rapidoc element attributes",type:"apiKey",oAuthFlow:"",name:v,in:x,value:w,finalKeyValue:w}),Ae.forEach((Se=>{Se.type==="http"?Se.typeDisplay=Se.scheme==="basic"?"HTTP Basic":"HTTP Bearer":Se.type==="apiKey"?Se.typeDisplay=`API Key (${Se.name})`:Se.type==="oauth2"?Se.typeDisplay=`OAuth (${Se.securitySchemeId})`:Se.typeDisplay=Se.type||"None"}));let qe=[];return J.servers&&Array.isArray(J.servers)&&J.servers.length>0?(J.servers.forEach((Se=>{let me=Se.url.trim();me.startsWith("http")||me.startsWith("//")||me.startsWith("{")||window.location.origin.startsWith("http")&&(Se.url=window.location.origin+Se.url,me=Se.url),Se.variables&&Object.entries(Se.variables).forEach((Me=>{const Ie=new RegExp(`{${Me[0]}}`,"g");me=me.replace(Ie,Me[1].default||""),Me[1].value=Me[1].default||""})),Se.computedUrl=me})),C&&J.servers.push({url:C,computedUrl:C})):C?J.servers=[{url:C,computedUrl:C}]:window.location.origin.startsWith("http")?J.servers=[{url:window.location.origin,computedUrl:window.location.origin}]:J.servers=[{url:"http://localhost",computedUrl:"http://localhost"}],qe=J.servers,{specLoadError:!1,isSpecLoading:!1,info:J.info,infoDescriptionHeaders:Te,tags:ge,components:pe,externalDocs:J.externalDocs,securitySchemes:Ae,servers:qe}}function fR(t){return dt.lexer(t).filter((i=>i.type==="heading"&&i.depth<=2))||[]}const FP=1,RX=2,qP=3,BP=4,mR=t=>(...n)=>({_$litDirective$:t,values:n});class gR{constructor(n){}get _$AU(){return this._$AM._$AU}_$AT(n,i,l){this.t=n,this._$AM=i,this.i=l}_$AS(n,i){return this.update(n,i)}update(n,i){return this.render(...i)}}class yR extends gR{constructor(n){if(super(n),this.it=cn,n.type!==RX)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(n){if(n===cn||n==null)return this._t=void 0,this.it=n;if(n===Nn)return n;if(typeof n!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(n===this.it)return this._t;this.it=n;const i=[n];return i.raw=i,this._t={_$litType$:this.constructor.resultType,strings:i,values:[]}}}yR.directiveName="unsafeHTML",yR.resultType=1;const Mn=mR(yR);var UP=g(287).hp;const TX="731DB1C3F7EA533B85E29492D26AA-1234567890-1234567890",_X="4FatVDBJKPAo4JgLLaaQFMUcQPn5CrPRvLlaob9PTYc",KP="rapidoc";function up(t,n="",i="",l=""){var h,v;const x=(h=this.resolvedSpec.securitySchemes)===null||h===void 0?void 0:h.find(($=>$.securitySchemeId===t));if(!x)return!1;let w="";if(((v=x.scheme)===null||v===void 0?void 0:v.toLowerCase())==="basic")n&&(w=`Basic ${UP.from(`${n}:${i}`,"utf8").toString("base64")}`);else if(l){var C;x.value=l,w=`${((C=x.scheme)===null||C===void 0?void 0:C.toLowerCase())==="bearer"?"Bearer ":""}${l}`}return!!w&&(x.finalKeyValue=w,this.requestUpdate(),!0)}function vR(){var t;(t=this.resolvedSpec.securitySchemes)===null||t===void 0||t.forEach((n=>{n.user="",n.password="",n.value="",n.finalKeyValue=""})),this.requestUpdate()}function xR(){return JSON.parse(localStorage.getItem(KP))||{}}function VP(t){localStorage.setItem(KP,JSON.stringify(t))}function $X(){const t=xR.call(this);Object.values(t).forEach((n=>{up.call(this,n.securitySchemeId,n.username,n.password,n.value)}))}function HP(t){let n="";const i=this.resolvedSpec.securitySchemes.find((l=>l.securitySchemeId===t));if(i){const l=this.shadowRoot.getElementById(`security-scheme-${t}`);if(l){if(i.type&&i.scheme&&i.type==="http"&&i.scheme.toLowerCase()==="basic"){const h=l.querySelector(".api-key-user").value.trim(),v=l.querySelector(".api-key-password").value.trim();up.call(this,t,h,v)}else n=l.querySelector(".api-key-input").value.trim(),up.call(this,t,"","",n);if(this.persistAuth==="true"){const h=xR.call(this);h[t]=i,VP.call(this,h)}}}}function GP(t,n,i="Bearer"){const l=this.resolvedSpec.securitySchemes.find((h=>h.securitySchemeId===t));l.finalKeyValue=`${i.toLowerCase()==="bearer"?"Bearer":i.toLowerCase()==="mac"?"MAC":i} ${n}`,this.requestUpdate()}async function bR(t,n,i,l,h,v,x,w,C="header",$=null,N=null,_=null){const F=w?w.querySelector(".oauth-resp-display"):void 0,U=new URLSearchParams,J=new Headers;U.append("grant_type",h),h==="authorization_code"&&(U.append("client_id",n),U.append("client_secret",i)),h!=="client_credentials"&&h!=="password"&&U.append("redirect_uri",l),v&&(U.append("code",v),U.append("code_verifier",TX)),C==="header"?J.set("Authorization",`Basic ${UP.from(`${n}:${i}`,"utf8").toString("base64")}`):h!=="authorization_code"&&(U.append("client_id",n),U.append("client_secret",i)),h==="password"&&(U.append("username",N),U.append("password",_)),$&&U.append("scope",$);try{const Y=await fetch(t,{method:"POST",headers:J,body:U}),Z=await Y.json();if(!Y.ok)return F&&(F.innerHTML=`<span style="color:var(--red)">${Z.error_description||Z.error_description||"Unable to get access token"}</span>`),!1;if(Z.token_type&&Z.access_token)return GP.call(this,x,Z.access_token,Z.token_type),F&&(F.innerHTML='<span style="color:var(--green)">Access Token Received</span>'),!0}catch{return F&&(F.innerHTML='<span style="color:var(--red)">Failed to get access token</span>'),!1}}async function NX(t,n,i,l,h,v,x,w,C,$){sessionStorage.removeItem("winMessageEventActive"),n.close(),t.data.fake||(t.data||console.warn("RapiDoc: Received no data with authorization message"),t.data.error&&console.warn("RapiDoc: Error while receiving data"),t.data&&(t.data.responseType==="code"?bR.call(this,i,l,h,v,x,t.data.code,C,$,w):t.data.responseType==="token"&&GP.call(this,C,t.data.access_token,t.data.token_type)))}async function DX(t,n,i,l,h){const v=h.target.closest(".oauth-flow"),x=v.querySelector(".oauth-client-id")?v.querySelector(".oauth-client-id").value.trim():"",w=v.querySelector(".oauth-client-secret")?v.querySelector(".oauth-client-secret").value.trim():"",C=v.querySelector(".api-key-user")?v.querySelector(".api-key-user").value.trim():"",$=v.querySelector(".api-key-password")?v.querySelector(".api-key-password").value.trim():"",N=v.querySelector(".oauth-send-client-secret-in")?v.querySelector(".oauth-send-client-secret-in").value.trim():"header",_=[...v.querySelectorAll(".scope-checkbox:checked")],F=v.querySelector(`#${t}-pkce`),U=`${Math.random().toString(36).slice(2,9)}random${Math.random().toString(36).slice(2,9)}`,J=`${Math.random().toString(36).slice(2,9)}random${Math.random().toString(36).slice(2,9)}`,Y=new URL(`${window.location.origin}${window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))}/${this.oauthReceiver}`);let Z,P="",se="";if([...v.parentNode.querySelectorAll(".oauth-resp-display")].forEach((ae=>{ae.innerHTML=""})),n==="authorizationCode"||n==="implicit"){const ae=new URL(i);n==="authorizationCode"?(P="authorization_code",se="code"):n==="implicit"&&(se="token");const he=new URLSearchParams(ae.search),ge=_.map((pe=>pe.value)).join(" ");ge&&he.set("scope",ge),he.set("client_id",x),he.set("redirect_uri",Y.toString()),he.set("response_type",se),he.set("state",U),he.set("nonce",J),F&&F.checked&&(he.set("code_challenge",_X),he.set("code_challenge_method","S256")),he.set("show_dialog",!0),ae.search=he.toString(),sessionStorage.getItem("winMessageEventActive")==="true"&&window.postMessage({fake:!0},this),setTimeout((()=>{Z=window.open(ae.toString()),Z?(sessionStorage.setItem("winMessageEventActive","true"),window.addEventListener("message",(pe=>NX.call(this,pe,Z,l,x,w,Y.toString(),P,N,t,v)),{once:!0})):console.error(`RapiDoc: Unable to open ${ae.toString()} in a new window`)}),10)}else if(n==="clientCredentials"){P="client_credentials";const ae=_.map((he=>he.value)).join(" ");bR.call(this,l,x,w,Y.toString(),P,"",t,v,N,ae)}else if(n==="password"){P="password";const ae=_.map((he=>he.value)).join(" ");bR.call(this,l,x,w,Y.toString(),P,"",t,v,N,ae,C,$)}}function PX(t,n,i,l,h,v=[],x="header",w=void 0){var C;let{authorizationUrl:$,tokenUrl:N,refreshUrl:_}=h;const F=h["x-pkce-only"]||!1,U=Z=>Z.indexOf("://")>0||Z.indexOf("//")===0,J=new URL((C=this.selectedServer)===null||C===void 0?void 0:C.computedUrl).origin;let Y;return _&&!U(_)&&(_=`${J}/${_.replace(/^\//,"")}`),N&&!U(N)&&(N=`${J}/${N.replace(/^\//,"")}`),$&&!U($)&&($=`${J}/${$.replace(/^\//,"")}`),Y=t==="authorizationCode"?"Authorization Code Flow":t==="clientCredentials"?"Client Credentials Flow":t==="implicit"?"Implicit Flow":t==="password"?"Password Flow":t,V`
|
||
<div class="oauth-flow ${t}" style="padding: 12px 0; margin-bottom:12px;">
|
||
<div class="tiny-title upper" style="margin-bottom:8px;">${Y}</div>
|
||
${$?V`<div style="margin-bottom:5px"><span style="width:75px; display: inline-block;">Auth URL</span> <span class="mono-font"> ${$} </span></div>`:""}
|
||
${N?V`<div style="margin-bottom:5px"><span style="width:75px; display: inline-block;">Token URL</span> <span class="mono-font">${N}</span></div>`:""}
|
||
${_?V`<div style="margin-bottom:5px"><span style="width:75px; display: inline-block;">Refresh URL</span> <span class="mono-font">${_}</span></div>`:""}
|
||
${t==="authorizationCode"||t==="clientCredentials"||t==="implicit"||t==="password"?V`
|
||
${h.scopes?V`
|
||
<span> Scopes </span>
|
||
<div class= "oauth-scopes" part="section-auth-scopes" style = "width:100%; display:flex; flex-direction:column; flex-wrap:wrap; margin:0 0 10px 24px">
|
||
${Object.entries(h.scopes).map(((Z,P)=>V`
|
||
<div class="m-checkbox" style="display:inline-flex; align-items:center">
|
||
<input type="checkbox" part="checkbox checkbox-auth-scope" class="scope-checkbox" id="${l}${t}${P}" ?checked="${v.includes(Z[0])}" value="${Z[0]}">
|
||
<label for="${l}${t}${P}" style="margin-left:5px; cursor:pointer">
|
||
<span class="mono-font">${Z[0]}</span>
|
||
${Z[0]!==Z[1]?` - ${Z[1]||""}`:""}
|
||
</label>
|
||
</div>
|
||
`))}
|
||
</div>
|
||
`:""}
|
||
${t==="password"?V`
|
||
<div style="margin:5px 0">
|
||
<input type="text" value = "" placeholder="username" spellcheck="false" class="oauth2 ${t} ${l} api-key-user" part="textbox textbox-username" id="input-${l}-${t}-api-key-user">
|
||
<input type="password" value = "" placeholder="password" spellcheck="false" class="oauth2 ${t} ${l} api-key-password" style = "margin:0 5px;" part="textbox textbox-password" id="input-${l}-${t}-api-key-password">
|
||
</div>`:""}
|
||
<div>
|
||
${t==="authorizationCode"?V`
|
||
<div style="margin: 16px 0 4px">
|
||
<input type="checkbox" part="checkbox checkbox-auth-scope" id="${l}-pkce" checked ?disabled=${F}>
|
||
<label for="${l}-pkce" style="margin:0 16px 0 4px; line-height:24px; cursor:pointer">
|
||
Send Proof Key for Code Exchange (PKCE)
|
||
</label>
|
||
</div>
|
||
`:""}
|
||
<input type="text" part="textbox textbox-auth-client-id" value = "${n||""}" placeholder="client-id" spellcheck="false" class="oauth2 ${t} ${l} oauth-client-id">
|
||
${t==="authorizationCode"||t==="clientCredentials"||t==="password"?V`
|
||
<input
|
||
id="${l}-${t}-oauth-client-secret"
|
||
type="password" part="textbox textbox-auth-client-secret"
|
||
value = "${i||""}" placeholder="client-secret" spellcheck="false"
|
||
class="oauth2 ${t} ${l}
|
||
oauth-client-secret"
|
||
style = "margin:0 5px;${F?"display:none;":""}"
|
||
>
|
||
<select style="margin-right:5px;${F?"display:none;":""}" class="${t} ${l} oauth-send-client-secret-in">
|
||
${!w||w.includes("header")?V`<option value = 'header' .selected = ${x==="header"} > Authorization Header </option>`:""}
|
||
${!w||w.includes("request-body")?V` <option value = 'request-body' .selected = ${x==="request-body"}> Request Body </option>`:""}
|
||
</select>`:""}
|
||
${t==="authorizationCode"||t==="clientCredentials"||t==="implicit"||t==="password"?V`
|
||
<button class="m-btn thin-border" part="btn btn-outline"
|
||
@click="${Z=>{DX.call(this,l,t,$,N,Z)}}"
|
||
> GET TOKEN </button>`:""}
|
||
</div>
|
||
<div class="oauth-resp-display red-text small-font-size"></div>
|
||
`:""}
|
||
</div>
|
||
`}function MX(t){var n;const i=(n=this.resolvedSpec.securitySchemes)===null||n===void 0?void 0:n.find((l=>l.securitySchemeId===t));if(i.user="",i.password="",i.value="",i.finalKeyValue="",this.persistAuth==="true"){const l=xR.call(this);delete l[i.securitySchemeId],VP.call(this,l)}this.requestUpdate()}function XP(){var t;if(!this.resolvedSpec)return"";const n=(t=this.resolvedSpec.securitySchemes)===null||t===void 0?void 0:t.filter((i=>i.finalKeyValue));return n?V`
|
||
<section id='auth' part="section-auth" style="text-align:left; direction:ltr; margin-top:24px; margin-bottom:24px;" class = 'observe-me ${"read focused".includes(this.renderStyle)?"section-gap--read-mode":"section-gap "}'>
|
||
<div class='sub-title regular-font'> AUTHENTICATION </div>
|
||
|
||
<div class="small-font-size" style="display:flex; align-items: center; min-height:30px">
|
||
${n.length>0?V`
|
||
<div class="blue-text"> ${n.length} API key applied </div>
|
||
<div style="flex:1"></div>
|
||
<button class="m-btn thin-border" part="btn btn-outline" @click=${()=>{vR.call(this)}}>CLEAR ALL API KEYS</button>`:V`<div class="red-text">No API key applied</div>`}
|
||
</div>
|
||
${this.resolvedSpec.securitySchemes&&this.resolvedSpec.securitySchemes.length>0?V`
|
||
<table role="presentation" id="auth-table" class='m-table padded-12' style="width:100%;">
|
||
${this.resolvedSpec.securitySchemes.filter((i=>i.type)).map((i=>{var l,h;return V`
|
||
<tr id="security-scheme-${i.securitySchemeId}" class="${i.type.toLowerCase()}">
|
||
<td style="max-width:500px; overflow-wrap: break-word;">
|
||
<div style="line-height:28px; margin-bottom:5px;">
|
||
<span style="font-weight:bold; font-size:var(--font-size-regular)">${i.typeDisplay}</span>
|
||
${i.finalKeyValue?V`
|
||
<span class='blue-text'> ${i.finalKeyValue?"Key Applied":""} </span>
|
||
<button class="m-btn thin-border small" part="btn btn-outline" @click=${()=>{MX.call(this,i.securitySchemeId)}}>REMOVE</button>
|
||
`:""}
|
||
</div>
|
||
${i.description?V`
|
||
<div class="m-markdown">
|
||
${Mn(dt(i.description||""))}
|
||
</div>`:""}
|
||
|
||
${i.type.toLowerCase()==="apikey"||i.type.toLowerCase()==="http"&&((l=i.scheme)===null||l===void 0?void 0:l.toLowerCase())==="bearer"?V`
|
||
<div style="margin-bottom:5px">
|
||
${i.type.toLowerCase()==="apikey"?V`Send <code>${i.name}</code> in <code>${i.in}</code>`:V`Send <code>Authorization</code> in <code>header</code> containing the word <code>Bearer</code> followed by a space and a Token String.`}
|
||
</div>
|
||
<div style="max-height:28px;">
|
||
${i.in!=="cookie"?V`
|
||
<input type = "text" value = "${i.value}" class="${i.type} ${i.securitySchemeId} api-key-input" placeholder = "api-token" spellcheck = "false" id = "${i.type}-${i.securitySchemeId}-api-key-input">
|
||
<button class="m-btn thin-border" style = "margin-left:5px;"
|
||
part = "btn btn-outline"
|
||
@click="${v=>{HP.call(this,i.securitySchemeId,v)}}">
|
||
${i.finalKeyValue?"UPDATE":"SET"}
|
||
</button>`:V`<span class="gray-text" style="font-size::var(--font-size-small)"> cookies cannot be set from here</span>`}
|
||
</div>`:""}
|
||
${i.type.toLowerCase()==="http"&&((h=i.scheme)===null||h===void 0?void 0:h.toLowerCase())==="basic"?V`
|
||
<div style="margin-bottom:5px">
|
||
Send <code>Authorization</code> in <code>header</code> containing the word <code>Basic</code> followed by a space and a base64 encoded string of <code>username:password</code>.
|
||
</div>
|
||
<div>
|
||
<input type="text" value = "${i.user}" placeholder="username" spellcheck="false" class="${i.type} ${i.securitySchemeId} api-key-user" style="width:100px" id = "input-${i.type}-${i.securitySchemeId}-api-key-user">
|
||
<input type="password" value = "${i.password}" placeholder="password" spellcheck="false" class="${i.type} ${i.securitySchemeId} api-key-password" style = "width:100px; margin:0 5px;" id = "input-${i.type}-${i.securitySchemeId}-api-key-password">
|
||
<button class="m-btn thin-border"
|
||
@click="${v=>{HP.call(this,i.securitySchemeId,v)}}"
|
||
part = "btn btn-outline"
|
||
>
|
||
${i.finalKeyValue?"UPDATE":"SET"}
|
||
</button>
|
||
</div>`:""}
|
||
</td>
|
||
</tr>
|
||
${i.type.toLowerCase()==="oauth2"?V`
|
||
<tr>
|
||
<td style="border:none; padding-left:48px">
|
||
${Object.keys(i.flows).map((v=>PX.call(this,v,i.flows[v]["x-client-id"]||i["x-client-id"]||"",i.flows[v]["x-client-secret"]||i["x-client-secret"]||"",i.securitySchemeId,i.flows[v],i.flows[v]["x-default-scopes"]||i["x-default-scopes"],i.flows[v]["x-receive-token-in"]||i["x-receive-token-in"],i.flows[v]["x-receive-token-in-options"]||i["x-receive-token-in-options"])))}
|
||
</td>
|
||
</tr>
|
||
`:""}
|
||
`}))}
|
||
</table>`:""}
|
||
<slot name="auth"></slot>
|
||
</section>
|
||
`:void 0}function YP(t){if(this.resolvedSpec.securitySchemes&&t){const n=[];return Array.isArray(t)?t.length===0?"":(t.forEach((i=>{const l=[],h=[];Object.keys(i).length===0?n.push({securityTypes:"None",securityDefs:[]}):(Object.keys(i).forEach((v=>{let x="";const w=this.resolvedSpec.securitySchemes.find((C=>C.securitySchemeId===v));i[v]&&Array.isArray(i[v])&&(x=i[v].join(", ")),w&&(h.push(w.typeDisplay),l.push({...w,scopes:x}))})),n.push({securityTypes:h.length>1?`${h[0]} + ${h.length-1} more`:h[0],securityDefs:l}))})),V`<div style="position:absolute; top:3px; right:2px; font-size:var(--font-size-small); line-height: 1.5;">
|
||
<div style="position:relative; display:flex; min-width:350px; max-width:700px; justify-content: flex-end;">
|
||
<svg width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" fill="none" style="stroke:var(--fg3)"> <rect x="5" y="11" width="14" height="10" rx="2" /> <circle cx="12" cy="16" r="1" /> <path d="M8 11v-4a4 4 0 0 1 8 0v4" /></svg>
|
||
${n.map(((i,l)=>V`
|
||
${i.securityTypes?V`
|
||
${l!==0?V`<div style="padding:3px 4px;"> OR </div>`:""}
|
||
<div class="tooltip">
|
||
<div style = "padding:2px 4px; white-space:nowrap; text-overflow:ellipsis;max-width:150px; overflow:hidden;">
|
||
${this.updateRoute==="true"&&this.allowAuthentication==="true"?V`<a part="anchor anchor-operation-security" href="#auth"> ${i.securityTypes} </a>`:V`${i.securityTypes}`}
|
||
</div>
|
||
<div class="tooltip-text" style="position:absolute; color: var(--fg); top:26px; right:0; border:1px solid var(--border-color);padding:2px 4px; display:block;">
|
||
${i.securityDefs.length>1?V`<div>Requires <b>all</b> of the following </div>`:""}
|
||
<div style="padding-left: 8px">
|
||
${i.securityDefs.map(((h,v)=>{const x=V`${h.scopes!==""?V`
|
||
<div>
|
||
<b>Required scopes:</b>
|
||
<br/>
|
||
<div style="margin-left:8px">
|
||
${h.scopes.split(",").map(((w,C)=>V`${C===0?"":"┃"}<span>${w}</span>`))}
|
||
</div>
|
||
</div>`:""}`;return V`
|
||
${h.type==="oauth2"?V`
|
||
<div>
|
||
${i.securityDefs.length>1?V`<b>${v+1}.</b> `:"Needs"}
|
||
OAuth Token <span style="font-family:var(--font-mono); color:var(--primary-color);">${h.securitySchemeId}</span> in <b>Authorization header</b>
|
||
${x}
|
||
</div>`:h.type==="http"?V`
|
||
<div>
|
||
${i.securityDefs.length>1?V`<b>${v+1}.</b> `:V`Requires`}
|
||
${h.scheme==="basic"?"Base 64 encoded username:password":"Bearer Token"} in <b>Authorization header</b>
|
||
${x}
|
||
</div>`:V`
|
||
<div>
|
||
${i.securityDefs.length>1?V`<b>${v+1}.</b> `:V`Requires`}
|
||
Token in <b>${h.name} ${h.in}</b>
|
||
${x}
|
||
</div>`}`}))}
|
||
</div>
|
||
</div>
|
||
</div>
|
||
`:""}
|
||
`))}
|
||
</div>
|
||
</div>
|
||
`):""}return""}function ZP(t){return V`
|
||
<section class="table-title" style="margin-top:24px;">CODE SAMPLES</div>
|
||
<div part="tab-panel" class="tab-panel col"
|
||
@click="${n=>{if(!n.target.classList.contains("tab-btn"))return;const i=n.target.dataset.tab,l=[...n.currentTarget.querySelectorAll(".tab-btn")],h=[...n.currentTarget.querySelectorAll(".tab-content")];l.forEach((v=>v.classList[v.dataset.tab===i?"add":"remove"]("active"))),h.forEach((v=>{v.style.display=v.dataset.tab===i?"block":"none"}))}}">
|
||
<div part="tab-btn-row" class="tab-buttons row" style="width:100; overflow">
|
||
${t.map(((n,i)=>V`<button part="tab-btn" class="tab-btn ${i===0?"active":""}" data-tab = '${n.lang}${i}'> ${n.label||n.lang} </button>`))}
|
||
</div>
|
||
${t.map(((n,i)=>{var l,h,v;return V`
|
||
<div class="tab-content m-markdown" style= "display:${i===0?"block":"none"}" data-tab = '${n.lang}${i}'>
|
||
<button class="toolbar-btn" style = "position:absolute; top:12px; right:8px" @click='${x=>{hl(n.source,x)}}'> Copy </button>
|
||
<pre><code class="language">${sr().languages[(l=n.lang)===null||l===void 0?void 0:l.toLowerCase()]?Mn(sr().highlight(n.source,sr().languages[(h=n.lang)===null||h===void 0?void 0:h.toLowerCase()],(v=n.lang)===null||v===void 0?void 0:v.toLowerCase())):n.source}</code></pre>
|
||
</div>`}))}
|
||
</div>
|
||
</section>`}function WP(t){return V`
|
||
<div class="req-res-title" style="margin-top:12px">CALLBACKS</div>
|
||
${Object.entries(t).map((n=>V`
|
||
<div class="tiny-title" style="padding: 12px; border:1px solid var(--light-border-color)">
|
||
${n[0]}
|
||
${Object.entries(n[1]).map((i=>V`
|
||
<div class="mono-font small-font-size" style="display:flex; margin-left:16px;">
|
||
<div style="width:100%">
|
||
${Object.entries(i[1]).map((l=>{var h,v,x;return V`
|
||
<div>
|
||
<div style="margin-top:12px;">
|
||
<div class="method method-fg ${l[0]}" style="width:70px; border:none; margin:0; padding:0; line-height:20px; vertical-align: baseline;text-align:left">
|
||
<span style="font-size:20px;"> ⥄ </span>
|
||
${l[0]}
|
||
</div>
|
||
<span style="line-height:20px; vertical-align: baseline;">${i[0]} </span>
|
||
</div>
|
||
<div class='expanded-req-resp-container'>
|
||
<api-request
|
||
class = "${this.renderStyle}-mode callback"
|
||
style = "width:100%;"
|
||
callback = "true"
|
||
method = "${l[0]||""}",
|
||
path = "${i[0]||""}"
|
||
.parameters = "${((h=l[1])===null||h===void 0?void 0:h.parameters)||""}"
|
||
.request_body = "${((v=l[1])===null||v===void 0?void 0:v.requestBody)||""}"
|
||
fill-request-fields-with-example = "${this.fillRequestFieldsWithExample}"
|
||
allow-try = "false"
|
||
render-style="${this.renderStyle}"
|
||
schema-style = "${this.schemaStyle}"
|
||
active-schema-tab = "${this.defaultSchemaTab}"
|
||
schema-expand-level = "${this.schemaExpandLevel}"
|
||
schema-description-expanded = "${this.schemaDescriptionExpanded}"
|
||
allow-schema-description-expand-toggle = "${this.allowSchemaDescriptionExpandToggle}"
|
||
schema-hide-read-only = "false"
|
||
schema-hide-write-only = "${this.schemaHideWriteOnly==="never"?"false":"true"}"
|
||
fetch-credentials = "${this.fetchCredentials}"
|
||
exportparts = "wrap-request-btn:wrap-request-btn, btn:btn, btn-fill:btn-fill, btn-outline:btn-outline, btn-try:btn-try, btn-clear:btn-clear, btn-clear-resp:btn-clear-resp,
|
||
tab-panel:tab-panel, tab-btn:tab-btn, tab-btn-row:tab-btn-row, tab-coontent:tab-content,
|
||
file-input:file-input, textbox:textbox, textbox-param:textbox-param, textarea:textarea, textarea-param:textarea-param,
|
||
anchor:anchor, anchor-param-example:anchor-param-example, schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"
|
||
> </api-request>
|
||
|
||
<api-response
|
||
style = "width:100%;"
|
||
class = "${this.renderStyle}-mode"
|
||
callback = "true"
|
||
.responses="${(x=l[1])===null||x===void 0?void 0:x.responses}"
|
||
render-style="${this.renderStyle}"
|
||
schema-style="${this.schemaStyle}"
|
||
active-schema-tab = "${this.defaultSchemaTab}"
|
||
schema-expand-level = "${this.schemaExpandLevel}"
|
||
schema-description-expanded = "${this.schemaDescriptionExpanded}"
|
||
allow-schema-description-expand-toggle = "${this.allowSchemaDescriptionExpandToggle}"
|
||
schema-hide-read-only = "${this.schemaHideReadOnly==="never"?"false":"true"}"
|
||
schema-hide-write-only = "false"
|
||
exportparts = "btn:btn, btn-response-status:btn-response-status, btn-selected-response-status:btn-selected-response-status, btn-fill:btn-fill, btn-copy:btn-copy,
|
||
tab-panel:tab-panel, tab-btn:tab-btn, tab-btn-row:tab-btn-row, tab-coontent:tab-content,
|
||
schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"
|
||
> </api-response>
|
||
</div>
|
||
</div>
|
||
`}))}
|
||
</div>
|
||
</div>
|
||
`))}
|
||
</div>
|
||
`))}
|
||
`}const IX={},_E=mR(class extends gR{constructor(){super(...arguments),this.ot=IX}render(t,n){return n()}update(t,[n,i]){if(Array.isArray(n)){if(Array.isArray(this.ot)&&this.ot.length===n.length&&n.every(((l,h)=>l===this.ot[h])))return Nn}else if(this.ot===n)return Nn;return this.ot=Array.isArray(n)?Array.from(n):n,this.render(n,i)}}),zX={},wR=mR(class extends gR{constructor(t){if(super(t),t.type!==qP&&t.type!==FP&&t.type!==BP)throw Error("The `live` directive is not allowed on child or event bindings");if(!(n=>n.strings===void 0)(t))throw Error("`live` bindings can only contain a single expression")}render(t){return t}update(t,[n]){if(n===Nn||n===cn)return n;const i=t.element,l=t.name;if(t.type===qP){if(n===i[l])return Nn}else if(t.type===BP){if(!!n===i.hasAttribute(l))return Nn}else if(t.type===FP&&i.getAttribute(l)===n+"")return Nn;return((h,v=zX)=>{h._$AH=v})(t),n}});var LX=g(657),FX=g.n(LX);const $E=M`
|
||
.border-top {
|
||
border-top:1px solid var(--border-color);
|
||
}
|
||
.border{
|
||
border:1px solid var(--border-color);
|
||
border-radius: var(--border-radius);
|
||
}
|
||
.light-border{
|
||
border:1px solid var(--light-border-color);
|
||
border-radius: var(--border-radius);
|
||
}
|
||
.pad-8-16{
|
||
padding: 8px 16px;
|
||
}
|
||
.pad-top-8 {
|
||
padding-top: 8px;
|
||
}
|
||
.mar-top-8 {
|
||
margin-top: 8px;
|
||
}
|
||
`;var qX=g(859),JP=g.n(qX);function dp(t){if(t===void 0)return"";if(t===null)return"null";if(t==="")return"∅";if(typeof t=="boolean"||typeof t=="number")return`${t}`;if(Array.isArray(t))return t.map((n=>n===null?"null":n===""?"∅":n.toString().replace(/^ +| +$/g,(i=>"●".repeat(i.length)))||"")).join(", ");if(typeof t=="object"){const n=Object.keys(t);return`{ ${n[0]}:${t[n[0]]}${n.length>1?",":""} ... }`}return t.toString().replace(/^ +| +$/g,(n=>"●".repeat(n.length)))||""}function _d(t){if(!t)return;let n="",i="";if(t.$ref){const x=t.$ref.lastIndexOf("/");n=`{recursive: ${t.$ref.substring(x+1)}} `}else t.type?(n=Array.isArray(t.type)?t.type.join(t.length===2?" or ":"┃"):t.type,(t.format||t.enum||t.const)&&(n=n.replace("string",t.enum?"enum":t.const?"const":t.format)),t.nullable&&(n+="┃null")):n=t.const?"const":Object.keys(t).length===0?"any":"{missing-type-info}";const l={type:n,format:t.format||"",pattern:t.pattern&&!t.enum?t.pattern:"",readOrWriteOnly:t.readOnly?"🆁":t.writeOnly?"🆆":"",deprecated:t.deprecated?"❌":"",examples:t.examples||t.example,default:dp(t.default),description:t.description||"",constrain:"",allowedValues:"",arrayType:"",html:""};if(l.type==="{recursive}"?l.description=t.$ref.substring(t.$ref.lastIndexOf("/")+1):l.type!=="{missing-type-info}"&&l.type!=="any"||(l.description=l.description||""),l.allowedValues=t.const?t.const:Array.isArray(t.enum)?t.enum.map((x=>dp(x))).join("┃"):"",n==="array"&&t.items){var h,v;const x=(h=t.items)===null||h===void 0?void 0:h.type,w=dp(t.items.default);l.arrayType=`${t.type} of ${Array.isArray(x)?x.join(""):x}`,l.default=w,l.allowedValues=t.items.const?t.const:Array.isArray((v=t.items)===null||v===void 0?void 0:v.enum)?t.items.enum.map((C=>dp(C))).join("┃"):""}return n.match(/integer|number/g)&&(t.minimum===void 0&&t.exclusiveMinimum===void 0||(i+=t.minimum!==void 0?`Min ${t.minimum}`:`More than ${t.exclusiveMinimum}`),t.maximum===void 0&&t.exclusiveMaximum===void 0||(i+=t.maximum!==void 0?`${i?"┃":""}Max ${t.maximum}`:`${i?"┃":""}Less than ${t.exclusiveMaximum}`),t.multipleOf!==void 0&&(i+=`${i?"┃":""} multiple of ${t.multipleOf}`)),n.match(/string/g)&&(t.minLength!==void 0&&t.maxLength!==void 0?i+=`${i?"┃":""}${t.minLength} to ${t.maxLength} chars`:t.minLength!==void 0?i+=`${i?"┃":""}Min ${t.minLength} chars`:t.maxLength!==void 0&&(i+=`Max ${i?"┃":""}${t.maxLength} chars`)),l.constrain=i,l.html=`${l.type}~|~${l.readOrWriteOnly}~|~${l.constrain}~|~${l.default}~|~${l.allowedValues}~|~${l.pattern}~|~${l.description}~|~${t.title||""}~|~${l.deprecated?"deprecated":""}`,l}function aa(t){if(typeof t=="object"&&!Array.isArray(t)){if(t.value!==void 0)return{Example:{...t}};const n=Object.entries(t).filter((([i,l])=>l.value!==void 0));return n.length===0?void 0:Object.fromEntries(n)}return Array.isArray(t)?t.reduce(((n,i,l)=>(n[`Example${l+1}`]={value:i},n)),{}):t?{Example:{value:t}}:void 0}function QP(t,n="string"){if(!t)return{exampleVal:"",exampleList:[]};if(t.constructor===Object){const h=Object.values(t).filter((v=>v["x-example-show-value"]!==!1)).map((v=>({value:typeof v.value=="boolean"||typeof v.value=="number"?`${v.value}`:v.value||"",printableValue:dp(v.value),summary:v.summary||"",description:v.description||""})));return{exampleVal:h.length>0?h[0].value:"",exampleList:h}}if(Array.isArray(t)||(t=t?[t]:[]),t.length===0)return{exampleVal:"",exampleList:[]};if(n==="array"){const[h]=t,v=t.map((x=>({value:x,printableValue:dp(x)})));return{exampleVal:h,exampleList:v}}const i=t[0].toString(),l=t.map((h=>({value:h.toString(),printableValue:dp(h)})));return{exampleVal:i,exampleList:l}}function NE(t){const n=t.examples?t.examples[0]:t.example===null?null:t.example||void 0;if(n==="")return"";if(n===null)return null;if(n===0)return 0;if(n===!1)return!1;if(n instanceof Date)switch(t.format.toLowerCase()){case"date":return n.toISOString().split("T")[0];case"time":return n.toISOString().split("T")[1];default:return n.toISOString()}if(n)return n;if(Object.keys(t).length===0)return null;if(t.$ref)return{};if(t.const===!1||t.const===0||t.const===null||t.const===""||t.const)return t.const;if(t.default)return t.default;const i=Array.isArray(t.type)?t.type[0]:t.type;if(!i)return null;if(i.match(/^integer|^number/g)){const l=Number.isNaN(Number(t.multipleOf))?void 0:Number(t.multipleOf),h=Number.isNaN(Number(t.maximum))?void 0:Number(t.maximum),v=Number.isNaN(Number(t.minimum))?Number.isNaN(Number(t.exclusiveMinimum))?h||0:Number(t.exclusiveMinimum)+(i.startsWith("integer")?1:.001):Number(t.minimum);return l?l>=v?l:v%l==0?v:Math.ceil(v/l)*l:v}if(i.match(/^boolean/g))return!1;if(i.match(/^null/g))return null;if(i.match(/^string/g)){if(t.enum)return t.enum[0];if(t.const)return t.const;if(t.pattern)try{return new(JP())(t.pattern).gen()}catch{return t.pattern}if(!t.format){const l=Number.isNaN(t.minLength)?void 0:Number(t.minLength),h=Number.isNaN(t.maxLength)?void 0:Number(t.maxLength),v=l||(h>6?6:h||void 0);return v?"A".repeat(v):"string"}{const l=`${Date.now().toString(16)}${Math.random().toString(16)}0`.repeat(16);switch(t.format.toLowerCase()){case"url":case"uri":return"http://example.com";case"date":return new Date(0).toISOString().split("T")[0];case"time":return new Date(0).toISOString().split("T")[1];case"date-time":return new Date(0).toISOString();case"duration":return"P3Y6M4DT12H30M5S";case"email":case"idn-email":return"user@example.com";case"hostname":case"idn-hostname":return"www.example.com";case"ipv4":return"198.51.100.42";case"ipv6":return"2001:0db8:5b96:0000:0000:426f:8e17:642a";case"uuid":return[l.substring(0,8),l.substring(8,12),`4000-8${l.substring(13,16)}`,l.substring(16,28)].join("-");case"byte":return"ZXhhbXBsZQ==";default:return""}}}return null}function SR(t,n=1){const i=" ".repeat(n);let l="";if(n===1&&typeof t!="object")return`
|
||
${i}${t.toString()}`;for(const h in t){const v=t[h]["::XML_TAG"]||h;let x="";x=Array.isArray(t[h])?v[0]["::XML_TAG"]||`${h}`:v,h.startsWith("::")||(l=Array.isArray(t[h])||typeof t[h]=="object"?`${l}
|
||
${i}<${x}>${SR(t[h],n+1)}
|
||
${i}</${x}>`:`${l}
|
||
${i}<${x}>${t[h].toString()}</${x}>`)}return l}function DE(t,n){var i,l;if(typeof n=="object"&&n!==null){var h,v;t.title&&(n["::TITLE"]=t.title),t.description&&(n["::DESCRIPTION"]=t.description),(i=t.xml)!==null&&i!==void 0&&i.name&&(n["::XML_TAG"]=(h=t.xml)===null||h===void 0?void 0:h.name),(l=t.xml)!==null&&l!==void 0&&l.wrapped&&(n["::XML_WRAP"]=(v=t.xml)===null||v===void 0?void 0:v.wrapped.toString())}}function eM(t){if(typeof t=="object"&&t!==null){delete t["::TITLE"],delete t["::DESCRIPTION"],delete t["::XML_TAG"],delete t["::XML_WRAP"];for(const n in t)eM(t[n])}}function tM(t,n,i){for(const l in n)n[l][i]=t}function hp(t,n,i){let l=0;const h={};for(const v in t){for(const x in i)if(h[`example-${l}`]={...t[v]},h[`example-${l}`][n]=i[x],l++,l>=10)break;if(l>=10)break}return h}function eo(t,n={}){let i={};if(t){if(t.allOf){var l,h;const Y={};if(!(t.allOf.length!==1||(l=t.allOf[0])!==null&&l!==void 0&&l.properties||(h=t.allOf[0])!==null&&h!==void 0&&h.items))return t.allOf[0].$ref?"{ }":t.allOf[0].readOnly&&n.includeReadOnly?NE(t.allOf[0]):void 0;t.allOf.forEach((Z=>{if(Z.type==="object"||Z.properties||Z.allOf||Z.anyOf||Z.oneOf){const P=eo(Z,n);Object.assign(Y,P)}else if(Z.type==="array"||Z.items){const P=[eo(Z,n)];Object.assign(Y,P)}else{if(!Z.type)return"";{const P=`prop${Object.keys(Y).length}`;Y[P]=NE(Z)}}})),i=Y}else if(t.oneOf){const Y={};if(t.properties)for(const Z in t.properties){var v;t.properties[Z].properties||(v=t.properties[Z].properties)!==null&&v!==void 0&&v.items?Y[Z]=eo(t.properties[Z],n):Y[Z]=NE(t.properties[Z])}if(t.oneOf.length>0){let Z=0;for(const P in t.oneOf){const se=eo(t.oneOf[P],n);for(const ae in se){let he;if(Object.keys(Y).length>0){if(se[ae]===null||typeof se[ae]!="object")continue;he=Object.assign(se[ae],Y)}else he=se[ae];i[`example-${Z}`]=he,DE(t.oneOf[P],i[`example-${Z}`]),Z++}}}}else if(t.anyOf){let Y;if(t.type==="object"||t.properties){Y={"example-0":{}};for(const P in t.properties){if(t.example){Y=t;break}t.properties[P].deprecated&&!n.includeDeprecated||t.properties[P].readOnly&&!n.includeReadOnly||t.properties[P].writeOnly&&!n.includeWriteOnly||(Y=hp(Y,P,eo(t.properties[P],n)))}}let Z=0;for(const P in t.anyOf){const se=eo(t.anyOf[P],n);for(const ae in se){if(Y!==void 0)for(const he in Y)i[`example-${Z}`]={...Y[he],...se[ae]};else i[`example-${Z}`]=se[ae];DE(t.anyOf[P],i[`example-${Z}`]),Z++}}}else if(t.type==="object"||t.properties)if(i["example-0"]={},DE(t,i["example-0"]),t.example)i["example-0"]=t.example;else{for(const Y in t.properties){var x,w,C,$,N,_;if(((x=t.properties[Y])===null||x===void 0||!x.deprecated||n.includeDeprecated)&&((w=t.properties[Y])===null||w===void 0||!w.readOnly||n.includeReadOnly)&&((C=t.properties[Y])===null||C===void 0||!C.writeOnly||n.includeWriteOnly))if((($=t.properties[Y])===null||$===void 0?void 0:$.type)==="array"||(N=t.properties[Y])!==null&&N!==void 0&&N.items)if(t.properties[Y].example)tM(t.properties[Y].example,i,Y);else if((_=t.properties[Y])!==null&&_!==void 0&&(_=_.items)!==null&&_!==void 0&&_.example)tM([t.properties[Y].items.example],i,Y);else{const Z=eo(t.properties[Y].items,n);if(n.useXmlTagForProp){var F,U;const P=((F=t.properties[Y].xml)===null||F===void 0?void 0:F.name)||Y;(U=t.properties[Y].xml)!==null&&U!==void 0&&U.wrapped?i=hp(i,P,JSON.parse(`{ "${P}" : { "${P}" : ${JSON.stringify(Z["example-0"])} } }`)):i=hp(i,P,Z)}else{const P=[];for(const se in Z)P[se]=[Z[se]];i=hp(i,Y,P)}}else i=hp(i,Y,eo(t.properties[Y],n))}if(typeof t.additionalProperties=="object"){const Y=t.additionalProperties["x-additionalPropertiesName"]||"property";i=hp(i,`${Y}1`,eo(t.additionalProperties,n)),i=hp(i,`${Y}2`,eo(t.additionalProperties,n))}}else{if(t.type!=="array"&&!t.items)return{"example-0":NE(t)};var J;if(t.items||t.example)if(t.example)i["example-0"]=t.example;else if((J=t.items)!==null&&J!==void 0&&J.example)i["example-0"]=[t.items.example];else{const Y=eo(t.items,n);let Z=0;for(const P in Y)i[`example-${Z}`]=[Y[P]],DE(t.items,i[`example-${Z}`]),Z++}else i["example-0"]=[]}return i}}function nM(t,n=0){var i;let l=(t.description||t.title)&&(t.minItems||t.maxItems)?'<span class="descr-expand-toggle">➔</span>':"";if(t.title?l=t.description?`${l} <b>${t.title}:</b> ${t.description}<br/>`:`${l} ${t.title}<br/>`:t.description&&(l=`${l} ${t.description}<br/>`),t.minItems&&(l=`${l} <b>Min Items:</b> ${t.minItems}`),t.maxItems&&(l=`${l} <b>Max Items:</b> ${t.maxItems}`),n>0&&(i=t.items)!==null&&i!==void 0&&i.description){let h="";t.items.minProperties&&(h=`<b>Min Properties:</b> ${t.items.minProperties}`),t.items.maxProperties&&(h=`${h} <b>Max Properties:</b> ${t.items.maxProperties}`),l=`${l} ⮕ ${h} [ ${t.items.description} ] `}return l}function ts(t,n,i=0,l=""){if(t){if(t.allOf){const w={};if(t.allOf.length===1&&!t.allOf[0].properties&&!t.allOf[0].items)return`${_d(t.allOf[0]).html}`;t.allOf.map(((C,$)=>{if(C.type==="object"||C.properties||C.allOf||C.anyOf||C.oneOf){const N=(C.anyOf||C.oneOf)&&$>0?$:"",_=ts(C,{},i+1,N);Object.assign(w,_)}else if(C.type==="array"||C.items){const N=ts(C,{},i+1);Object.assign(w,N)}else{if(!C.type)return"";{const N=`prop${Object.keys(w).length}`,_=_d(C);w[N]=`${_.html}`}}})),n=w}else if(t.anyOf||t.oneOf){if(n["::description"]=t.description||"",t.type==="object"||t.properties){n["::description"]=t.description||"",n["::type"]="object";for(const $ in t.properties)t.required&&t.required.includes($)?n[`${$}*`]=ts(t.properties[$],{},i+1):n[$]=ts(t.properties[$],{},i+1)}const w={},C=t.anyOf?"anyOf":"oneOf";t[C].forEach((($,N)=>{if($.type==="object"||$.properties||$.allOf||$.anyOf||$.oneOf){const _=ts($,{});w[`::OPTION~${N+1}${$.title?`~${$.title}`:""}`]=_,w[`::OPTION~${N+1}${$.title?`~${$.title}`:""}`]["::readwrite"]="",w["::type"]="xxx-of-option"}else if($.type==="array"||$.items){const _=ts($,{});w[`::OPTION~${N+1}${$.title?`~${$.title}`:""}`]=_,w[`::OPTION~${N+1}${$.title?`~${$.title}`:""}`]["::readwrite"]="",w["::type"]="xxx-of-array"}else{const _=`::OPTION~${N+1}${$.title?`~${$.title}`:""}`;w[_]=`${_d($).html}`,w["::type"]="xxx-of-option"}})),n[t.anyOf?`::ANY~OF ${l}`:`::ONE~OF ${l}`]=w,n["::type"]="object"}else if(Array.isArray(t.type)){const w=JSON.parse(JSON.stringify(t)),C=[],$=[];let N;var h;if(w.type.forEach((_=>{var F,U;_.match(/integer|number|string|null|boolean/g)?C.push(_):_==="array"&&typeof((F=w.items)===null||F===void 0?void 0:F.type)=="string"&&(U=w.items)!==null&&U!==void 0&&U.type.match(/integer|number|string|null|boolean/g)?w.items.type==="string"&&w.items.format?C.push(`[${w.items.format}]`):C.push(`[${w.items.type}]`):$.push(_)})),C.length>0&&(w.type=C.join(C.length===2?" or ":"┃"),N=_d(w),$.length===0))return`${((h=N)===null||h===void 0?void 0:h.html)||""}`;if($.length>0){var v;n["::type"]="object";const _={"::type":"xxx-of-option"};$.forEach(((F,U)=>{if(F==="null")_[`::OPTION~${U+1}`]="NULL~|~~|~~|~~|~~|~~|~~|~~|~";else if("integer, number, string, boolean,".includes(`${F},`)){w.type=Array.isArray(F)?F.join("┃"):F;const J=_d(w);_[`::OPTION~${U+1}`]=J.html}else if(F==="object"){const J={"::title":t.title||"","::description":t.description||"","::type":"object","::deprecated":t.deprecated||!1};for(const Y in t.properties)t.required&&t.required.includes(Y)?J[`${Y}*`]=ts(t.properties[Y],{},i+1):J[Y]=ts(t.properties[Y],{},i+1);_[`::OPTION~${U+1}`]=J}else F==="array"&&(_[`::OPTION~${U+1}`]={"::title":t.title||"","::description":t.description||"","::type":"array","::props":ts(t.items,{},i+1)})})),_[`::OPTION~${$.length+1}`]=((v=N)===null||v===void 0?void 0:v.html)||"",n["::ONE~OF"]=_}}else if(t.type==="object"||t.properties){n["::title"]=t.title||"",n["::description"]=nM(t,i),n["::type"]="object",(Array.isArray(t.type)&&t.type.includes("null")||t.nullable)&&(n["::dataTypeLabel"]="object or null",n["::nullable"]=!0),n["::deprecated"]=t.deprecated||!1,n["::readwrite"]=t.readOnly?"readonly":t.writeOnly?"writeonly":"";for(const w in t.properties)t.required&&t.required.includes(w)?n[`${w}*`]=ts(t.properties[w],{},i+1):n[w]=ts(t.properties[w],{},i+1);for(const w in t.patternProperties)n[`[pattern: ${w}]`]=ts(t.patternProperties[w],n,i+1);t.additionalProperties&&(n["[any-key]"]=ts(t.additionalProperties,{}))}else{if(t.type!=="array"&&!t.items){const w=_d(t);return w!=null&&w.html?`${w.html}`:""}var x;n["::title"]=t.title||"",n["::description"]=nM(t,i),n["::type"]="array",(Array.isArray(t.type)&&t.type.includes("null")||t.nullable)&&(n["::dataTypeLabel"]="array or null",n["::nullable"]=!0),n["::deprecated"]=t.deprecated||!1,n["::readwrite"]=t.readOnly?"readonly":t.writeOnly?"writeonly":"",(x=t.items)!==null&&x!==void 0&&x.items&&(n["::array-type"]=t.items.items.type),n["::props"]=ts(t.items,{},i+1)}return n}}function qm(t,n,i={},l={},h=!0,v=!0,x="json",w=!1){const C=[];if(i)for(const _ in i){let F="",U="json";if(n!=null&&n.toLowerCase().includes("json")){if(x==="text")F=typeof i[_].value=="string"?i[_].value:JSON.stringify(i[_].value,void 0,2),U="text";else if(F=i[_].value,typeof i[_].value=="string")try{const J=i[_].value;F=JSON.parse(J),U="json"}catch{U="text",F=i[_].value}}else F=i[_].value,U="text";C.push({exampleId:_,exampleSummary:i[_].summary||_,exampleDescription:i[_].description||"",exampleType:n,exampleValue:F,exampleFormat:U})}else if(l){let _="",F="json";if(n!=null&&n.toLowerCase().includes("json")){if(x==="text")_=typeof l=="string"?l:JSON.stringify(l,void 0,2),F="text";else if(typeof l=="object")_=l,F="json";else if(typeof l=="string")try{_=JSON.parse(l),F="json"}catch{F="text",_=l}}else _=l,F="text";C.push({exampleId:"Example",exampleSummary:"",exampleDescription:"",exampleType:n,exampleValue:_,exampleFormat:F})}if(C.length===0||w===!0)if(t)if(t.example)C.push({exampleId:"Example",exampleSummary:"",exampleDescription:"",exampleType:n,exampleValue:t.example,exampleFormat:n!=null&&n.toLowerCase().includes("json")&&typeof t.example=="object"?"json":"text"});else if(n!=null&&n.toLowerCase().includes("json")||n!=null&&n.toLowerCase().includes("text")||n!=null&&n.toLowerCase().includes("*/*")||n!=null&&n.toLowerCase().includes("xml")){let _="",F="",U="",J="";var $,N;n!=null&&n.toLowerCase().includes("xml")?(_=($=t.xml)!==null&&$!==void 0&&$.name?`<${t.xml.name} ${t.xml.namespace?`xmlns="${t.xml.namespace}"`:""}>`:"<root>",F=(N=t.xml)!==null&&N!==void 0&&N.name?`</${t.xml.name}>`:"</root>",U="text"):U=x;const Y=eo(t,{includeReadOnly:h,includeWriteOnly:v,useXmlTagForProp:n?.toLowerCase().includes("xml")});let Z=0;for(const P in Y){if(!Y[P])continue;const se=Y[P]["::TITLE"]||"Example "+ ++Z,ae=Y[P]["::DESCRIPTION"]||"";n!=null&&n.toLowerCase().includes("xml")?J=`<?xml version="1.0" encoding="UTF-8"?>
|
||
${_}${SR(Y[P],1)}
|
||
${F}`:(eM(Y[P]),J=x==="text"?JSON.stringify(Y[P],null,2):Y[P]),C.push({exampleId:P,exampleSummary:se,exampleDescription:ae,exampleType:n,exampleFormat:U,exampleValue:J})}}else n!=null&&n.toLowerCase().includes("jose")?C.push({exampleId:"Example",exampleSummary:"Base64 Encoded",exampleDescription:"",exampleType:n,exampleValue:t.pattern||"bXJpbg==",exampleFormat:"text"}):C.push({exampleId:"Example",exampleSummary:"",exampleDescription:"",exampleType:n,exampleValue:"",exampleFormat:"text"});else C.push({exampleId:"Example",exampleSummary:"",exampleDescription:"",exampleType:n,exampleValue:"",exampleFormat:"text"});return C}function BX(t){return t==="application/json"?"json":t==="application/xml"?"xml":null}function UX(t){if(t.schema)return[t.schema,null,null];if(t.content){for(const n of Object.keys(t.content))if(t.content[n].schema)return[t.content[n].schema,BX(n),t.content[n]]}return[null,null,null]}JP().prototype.randInt=t=>t,customElements.define("json-tree",class extends Ht{static get properties(){return{data:{type:Object},renderStyle:{type:String,attribute:"render-style"}}}static get styles(){return[Si,$E,Su,M`
|
||
:host{
|
||
display:flex;
|
||
}
|
||
:where(button, input[type="checkbox"], [tabindex="0"]):focus-visible { box-shadow: var(--focus-shadow); }
|
||
:where(input[type="text"], input[type="password"], select, textarea):focus-visible { border-color: var(--primary-color); }
|
||
.json-tree {
|
||
position: relative;
|
||
font-family: var(--font-mono);
|
||
font-size: var(--font-size-small);
|
||
display:inline-block;
|
||
overflow:hidden;
|
||
word-break: break-all;
|
||
flex:1;
|
||
line-height: calc(var(--font-size-small) + 6px);
|
||
min-height: 40px;
|
||
direction: ltr;
|
||
text-align: left;
|
||
}
|
||
|
||
.open-bracket {
|
||
display:inline-block;
|
||
padding: 0 20px 0 0;
|
||
cursor:pointer;
|
||
border: 1px solid transparent;
|
||
border-radius:3px;
|
||
}
|
||
.close-bracket {
|
||
border: 1px solid transparent;
|
||
border-radius:3px;
|
||
display:inline-block;
|
||
}
|
||
.open-bracket:hover {
|
||
color:var(--primary-color);
|
||
background-color:var(--hover-color);
|
||
border: 1px solid var(--border-color);
|
||
}
|
||
.open-bracket.expanded:hover ~ .inside-bracket {
|
||
border-left: 1px solid var(--fg3);
|
||
}
|
||
.open-bracket.expanded:hover ~ .close-bracket {
|
||
color:var(--primary-color);
|
||
}
|
||
.inside-bracket {
|
||
padding-left:12px;
|
||
overflow: hidden;
|
||
border-left:1px dotted var(--border-color);
|
||
}
|
||
.open-bracket.collapsed + .inside-bracket,
|
||
.open-bracket.collapsed + .inside-bracket + .close-bracket {
|
||
display:none;
|
||
}
|
||
|
||
.string{color:var(--green);}
|
||
.number{color:var(--blue);}
|
||
.null{color:var(--red);}
|
||
.boolean{color:var(--purple);}
|
||
.object{color:var(--fg)}
|
||
.toolbar {
|
||
position: absolute;
|
||
top:5px;
|
||
right:6px;
|
||
display:flex;
|
||
padding:2px;
|
||
align-items: center;
|
||
}`,fc]}render(){return V`
|
||
<div class = "json-tree" @click='${t=>{t.target.classList.contains("btn-copy")?hl(JSON.stringify(this.data,null,2),t):this.toggleExpand(t)}}'>
|
||
<div class='toolbar'>
|
||
<button class="toolbar-btn btn-copy" part="btn btn-fill btn-copy"> Copy </button>
|
||
</div>
|
||
${this.generateTree(this.data,!0)}
|
||
</div>
|
||
`}generateTree(t,n=!1){if(t===null)return V`<span class="null">null</span>${n?"":","}`;if(typeof t=="object"&&!(t instanceof Date)){const i=Array.isArray(t)?"array":"pure_object";return Object.keys(t).length===0?V`${Array.isArray(t)?"[ ],":"{ },"}`:V`
|
||
<div class="open-bracket expanded ${i==="array"?"array":"object"}" > ${i==="array"?"[":"{"}</div>
|
||
<div class="inside-bracket">
|
||
${Object.keys(t).map(((l,h,v)=>V`
|
||
<div class="item">
|
||
${i==="pure_object"?V`"${l}":`:""}
|
||
${this.generateTree(t[l],h===v.length-1)}
|
||
</div>`))}
|
||
</div>
|
||
<div class="close-bracket">${i==="array"?"]":"}"}${n?"":","}</div>
|
||
`}return typeof t=="string"||t instanceof Date?V`<span class="${typeof t}">"${t}"</span>${n?"":","}`:V`<span class="${typeof t}">${t}</span>${n?"":","}`}toggleExpand(t){const n=t.target;t.target.classList.contains("open-bracket")&&(n.classList.contains("expanded")?(n.classList.replace("expanded","collapsed"),t.target.innerHTML=t.target.classList.contains("array")?"[...]":"{...}"):(n.classList.replace("collapsed","expanded"),t.target.innerHTML=t.target.classList.contains("array")?"[":"{"))}});const rM=M`
|
||
|
||
*, *:before, *:after { box-sizing: border-box; }
|
||
:host {
|
||
container-type: inline-size;
|
||
}
|
||
|
||
.tr {
|
||
display: flex;
|
||
flex: none;
|
||
width: 100%;
|
||
box-sizing: content-box;
|
||
border-bottom: 1px dotted transparent;
|
||
transition: max-height 0.3s ease-out;
|
||
}
|
||
.td {
|
||
display: block;
|
||
flex: 0 0 auto;
|
||
}
|
||
.key {
|
||
font-family: var(--font-mono);
|
||
white-space: normal;
|
||
word-break: break-all;
|
||
}
|
||
|
||
.collapsed-all-descr .key {
|
||
overflow:hidden;
|
||
}
|
||
.expanded-all-descr .key-descr .descr-expand-toggle {
|
||
display:none;
|
||
}
|
||
|
||
.key-descr .descr-expand-toggle {
|
||
display:inline-block;
|
||
user-select:none;
|
||
color: var(--fg);
|
||
cursor: pointer;
|
||
transform: rotate(45deg);
|
||
transition: transform .2s ease;
|
||
}
|
||
|
||
.expanded-descr .key-descr .descr-expand-toggle {
|
||
transform: rotate(270deg)
|
||
}
|
||
|
||
.key-descr .descr-expand-toggle:hover {
|
||
color: var(--primary-color);
|
||
}
|
||
|
||
.expanded-descr .more-content { display:none; }
|
||
|
||
.key-descr {
|
||
font-family:var(--font-regular);
|
||
color:var(--light-fg);
|
||
flex-shrink: 1;
|
||
text-overflow: ellipsis;
|
||
overflow: hidden;
|
||
display: none;
|
||
}
|
||
.expanded-descr .key-descr{
|
||
max-height:auto;
|
||
overflow:hidden;
|
||
display: none;
|
||
}
|
||
|
||
.xxx-of-key {
|
||
font-size: calc(var(--font-size-small) - 2px);
|
||
font-weight:bold;
|
||
background-color:var(--primary-color);
|
||
color:var(--primary-color-invert);
|
||
border-radius:2px;
|
||
line-height:calc(var(--font-size-small) + 6px);
|
||
padding:0px 5px;
|
||
margin-bottom:1px;
|
||
display:inline-block;
|
||
}
|
||
|
||
.xxx-of-descr {
|
||
font-family: var(--font-regular);
|
||
color: var(--primary-color);
|
||
font-size: calc(var(--font-size-small) - 1px);
|
||
margin-left: 2px;
|
||
}
|
||
|
||
.stri, .string, .uri, .url, .byte, .bina, .date, .pass, .ipv4, .ipv4, .uuid, .emai, .host { color:var(--green); }
|
||
.inte, .numb, .number, .int6, .int3, .floa, .doub, .deci .blue { color:var(--blue); }
|
||
.null { color:var(--red); }
|
||
.bool, .boolean { color:var(--orange) }
|
||
.enum { color:var(--purple) }
|
||
.cons { color:var(--purple) }
|
||
.recu { color:var(--brown) }
|
||
.toolbar {
|
||
display:flex;
|
||
width:100%;
|
||
padding: 2px 0;
|
||
color:var(--primary-color);
|
||
}
|
||
.toolbar-item {
|
||
cursor:pointer;
|
||
padding:5px 0;
|
||
margin:0 2px;
|
||
}
|
||
.schema-root-type {
|
||
cursor:auto;
|
||
color:var(--fg2);
|
||
font-weight: bold;
|
||
text-transform: uppercase;
|
||
}
|
||
.toolbar-item:first-of-type { margin:0 2px 0 0;}
|
||
|
||
@container (min-width: 500px) {
|
||
.key-descr {
|
||
display: block;
|
||
}
|
||
.expanded-descr .key-descr {
|
||
display: block;
|
||
}
|
||
}
|
||
`;customElements.define("schema-tree",class extends Ht{static get properties(){return{data:{type:Object},schemaExpandLevel:{type:Number,attribute:"schema-expand-level"},schemaDescriptionExpanded:{type:String,attribute:"schema-description-expanded"},allowSchemaDescriptionExpandToggle:{type:String,attribute:"allow-schema-description-expand-toggle"},schemaHideReadOnly:{type:String,attribute:"schema-hide-read-only"},schemaHideWriteOnly:{type:String,attribute:"schema-hide-write-only"}}}connectedCallback(){super.connectedCallback(),(!this.schemaExpandLevel||this.schemaExpandLevel<1)&&(this.schemaExpandLevel=99999),this.schemaDescriptionExpanded&&"true false".includes(this.schemaDescriptionExpanded)||(this.schemaDescriptionExpanded="false"),this.schemaHideReadOnly&&"true false".includes(this.schemaHideReadOnly)||(this.schemaHideReadOnly="true"),this.schemaHideWriteOnly&&"true false".includes(this.schemaHideWriteOnly)||(this.schemaHideWriteOnly="true")}static get styles(){return[Si,rM,$E,M`
|
||
.tree {
|
||
font-size:var(--font-size-small);
|
||
text-align: left;
|
||
direction: ltr;
|
||
line-height:calc(var(--font-size-small) + 6px);
|
||
}
|
||
.tree .tr:hover{
|
||
background-color:var(--hover-color);
|
||
}
|
||
.collapsed-all-descr .tr:not(.expanded-descr) {
|
||
overflow: hidden;
|
||
max-height:calc(var(--font-size-small) + 8px);
|
||
}
|
||
.tree .key {
|
||
max-width: 300px;
|
||
}
|
||
.tr.expanded:hover > .td.key > .open-bracket {
|
||
color: var(--primary-color);
|
||
}
|
||
.tr.expanded:hover + .inside-bracket {
|
||
border-left: 1px solid var(--fg3);
|
||
}
|
||
.tr.expanded:hover + .inside-bracket + .close-bracket {
|
||
color: var(--primary-color);
|
||
}
|
||
.inside-bracket.xxx-of-option {
|
||
border-left: 1px solid transparent;
|
||
}
|
||
.open-bracket{
|
||
display:inline-block;
|
||
padding: 0 20px 0 0;
|
||
cursor:pointer;
|
||
border: 1px solid transparent;
|
||
border-radius:3px;
|
||
}
|
||
.open-bracket:hover {
|
||
color:var(--primary-color);
|
||
background-color:var(--hover-color);
|
||
border: 1px solid var(--border-color);
|
||
}
|
||
.close-bracket{
|
||
display:inline-block;
|
||
font-family: var(--font-mono);
|
||
}
|
||
.tr.collapsed + .inside-bracket,
|
||
.tr.collapsed + .inside-bracket + .close-bracket{
|
||
overflow: hidden;
|
||
display:none;
|
||
}
|
||
.inside-bracket.object,
|
||
.inside-bracket.array {
|
||
border-left: 1px dotted var(--border-color);
|
||
}`,fc]}render(){var t,n,i;return V`
|
||
<div class="tree ${this.schemaDescriptionExpanded==="true"?"expanded-all-descr":"collapsed-all-descr"}" @click="${l=>this.handleAllEvents(l)}">
|
||
<div class="toolbar">
|
||
<div class="toolbar-item schema-root-type ${((t=this.data)===null||t===void 0?void 0:t["::type"])||""} "> ${((n=this.data)===null||n===void 0?void 0:n["::type"])||""} </div>
|
||
${this.allowSchemaDescriptionExpandToggle==="true"?V`
|
||
<div style="flex:1"></div>
|
||
<div part="schema-toolbar-item schema-multiline-toggle" class='toolbar-item schema-multiline-toggle'>
|
||
${this.schemaDescriptionExpanded==="true"?"Single line description":"Multiline description"}
|
||
</div>`:""}
|
||
</div>
|
||
<span part="schema-description" class='m-markdown'> ${Mn(dt(((i=this.data)===null||i===void 0?void 0:i["::description"])||""))}</span>
|
||
${this.data?V`
|
||
${this.generateTree(this.data["::type"]==="array"?this.data["::props"]:this.data,this.data["::type"],this.data["::array-type"]||"")}`:V`<span class='mono-font' style='color:var(--red)'> Schema not found </span>`}
|
||
</div>
|
||
`}generateTree(t,n="object",i="",l="",h="",v=0,x=0,w="",C=!1){var $;if(this.schemaHideReadOnly==="true"&&(n==="array"&&w==="readonly"||t?.["::readwrite"]==="readonly")||this.schemaHideWriteOnly==="true"&&(n==="array"&&w==="writeonly"||t?.["::readwrite"]==="writeonly"))return;if(!t)return V`<div class="null" style="display:inline;">
|
||
<span class="key-label xxx-of-key"> ${l.replace("::OPTION~","")}</span>
|
||
${n==="array"?V`<span class='mono-font'> [ ] </span>`:n==="object"?V`<span class='mono-font'> { } </span>`:V`<span class='mono-font'> schema undefined </span>`}
|
||
</div>`;if(Object.keys(t).length===0)return V`<span class="key object">${l}:{ }</span>`;let N="",_="";l.startsWith("::ONE~OF")||l.startsWith("::ANY~OF")?N=l.replace("::","").replace("~"," "):l.startsWith("::OPTION")?[,N,_]=l.split("~"):N=l;const F=400-12*x;let U="",J="";const Y=($=t["::type"])!==null&&$!==void 0&&$.startsWith("xxx-of")?v:v+1,Z=n==="xxx-of-option"||t["::type"]==="xxx-of-option"||l.startsWith("::OPTION")?x:x+1;if(t["::type"]==="object")n==="array"?(U=v<this.schemaExpandLevel?V`<span class="open-bracket array-of-object" >[{</span>`:V`<span class="open-bracket array-of-object">[{...}]</span>`,J="}]"):(U=v<this.schemaExpandLevel?V`<span class="open-bracket object">${t["::nullable"]?"null┃":""}{</span>`:V`<span class="open-bracket object">${t["::nullable"]?"null┃":""}{...}</span>`,J="}");else if(t["::type"]==="array")if(n==="array"){const ot=i!=="object"?i:"";U=v<this.schemaExpandLevel?V`<span class="open-bracket array-of-array" data-array-type="${ot}">[[ ${ot} </span>`:V`<span class="open-bracket array-of-array" data-array-type="${ot}">[[...]]</span>`,J="]]"}else U=v<this.schemaExpandLevel?V`<span class="open-bracket array">[</span>`:V`<span class="open-bracket array">[...]</span>`,J="]";var P;if(typeof t=="object")return V`
|
||
<div class="tr ${v<this.schemaExpandLevel||(P=t["::type"])!==null&&P!==void 0&&P.startsWith("xxx-of")?"expanded":"collapsed"} ${t["::type"]||"no-type-info"}${t["::nullable"]?" nullable":""}" title="${C||t["::deprecated"]?"Deprecated":""}">
|
||
<div class="td key ${C||t["::deprecated"]?"deprecated":""}" style='min-width:${F}px'>
|
||
${t["::type"]==="xxx-of-option"||t["::type"]==="xxx-of-array"||l.startsWith("::OPTION")?V`<span class='key-label xxx-of-key'> ${N}</span><span class="xxx-of-descr">${_}</span>`:N==="::props"||N==="::ARRAY~OF"?"":v>0?V`<span class="key-label" title="${w==="readonly"?"Read-Only":w==="writeonly"?"Write-Only":""}">
|
||
${C||t["::deprecated"]?V`<svg viewBox="0 0 10 10" width="10" height="10" style="stroke:var(--red); margin-right:-6px"><path d="M2 2L8 8M2 8L8 2"/></svg>`:""}
|
||
${N.replace(/\*$/,"")}${N.endsWith("*")?V`<span style="color:var(--red)">*</span>`:""}${w==="readonly"?V` 🆁`:w==="writeonly"?V` 🆆`:w}:
|
||
</span>`:""}
|
||
${U}
|
||
</div>
|
||
<div class='td key-descr m-markdown-small'>${Mn(dt(h||""))}</div>
|
||
</div>
|
||
<div class='inside-bracket ${t["::type"]||"no-type-info"}' style='padding-left:${t["::type"]==="xxx-of-option"||t["::type"]==="xxx-of-array"?0:12}px;'>
|
||
${Array.isArray(t)&&t[0]?V`${this.generateTree(t[0],"xxx-of-option","","::ARRAY~OF","",Y,Z,t[0]["::readwrite"],C||t[0]["::deprecated"])}`:V`
|
||
${Object.keys(t).map((ot=>{var qt;return V`
|
||
${["::title","::description","::type","::props","::deprecated","::array-type","::readwrite","::dataTypeLabel","::nullable"].includes(ot)?t[ot]["::type"]==="array"||t[ot]["::type"]==="object"?V`${this.generateTree(t[ot]["::type"]==="array"?t[ot]["::props"]:t[ot],t[ot]["::type"],t[ot]["::array-type"]||"",ot,t[ot]["::description"],Y,Z,t[ot]["::readwrite"]?t[ot]["::readwrite"]:"",C||t[ot]["::deprecated"])}`:"":V`${this.generateTree(t[ot]["::type"]==="array"?t[ot]["::props"]:t[ot],t[ot]["::type"],t[ot]["::array-type"]||"",ot,((qt=t[ot])===null||qt===void 0?void 0:qt["::description"])||"",Y,Z,t[ot]["::readwrite"]?t[ot]["::readwrite"]:"",C||t[ot]["::deprecated"])}`}
|
||
`}))}
|
||
`}
|
||
</div>
|
||
${t["::type"]&&t["::type"].includes("xxx-of")?"":V`<div class='close-bracket'> ${J} </div>`}
|
||
`;const[se,ae,he,ge,pe,Te,Ae,qe,Se]=t.split("~|~");if(ae==="🆁"&&this.schemaHideReadOnly==="true"||ae==="🆆"&&this.schemaHideWriteOnly==="true")return;const me=se.replace(/┃.*/g,"").replace(/[^a-zA-Z0-9+]/g,"").substring(0,4).toLowerCase(),Me=he||ge||pe||Te?`<span class="descr-expand-toggle ${this.schemaDescriptionExpanded==="true"?"expanded-descr":""}">➔</span>`:"";let Ie="",Qe="";return n==="array"?w==="readonly"?(Ie="🆁",Qe="Read-Only"):w==="writeonly"&&(Ie="🆆",Qe="Write-Only"):ae==="🆁"?(Ie="🆁",Qe="Read-Only"):ae==="🆆"&&(Ie="🆆",Qe="Write-Only"),V`
|
||
<div class = "tr primitive" title="${Se?"Deprecated":""}">
|
||
<div class="td key ${C||Se}" style='min-width:${F}px'>
|
||
${C||Se?V`<svg viewBox="0 0 10 10" width="10" height="10" style="stroke:var(--red); margin-right:-6px"><path d="M2 2L8 8M2 8L8 2"/></svg>`:""}
|
||
${N.endsWith("*")?V`<span class="key-label">${N.substring(0,N.length-1)}</span><span style='color:var(--red);'>*</span>:`:l.startsWith("::OPTION")?V`<span class='key-label xxx-of-key'>${N}</span><span class="xxx-of-descr">${_}</span>`:V`<span class="key-label">${N}:</span>`}
|
||
<span class="${me}" title="${Qe}">
|
||
${n==="array"?`[${se}]`:`${se}`}
|
||
${Ie}
|
||
</span>
|
||
</div>
|
||
<div class='td key-descr'>
|
||
${h||qe||Ae?V`${V`<span class="m-markdown-small">
|
||
${Mn(dt(n==="array"?`${Me} ${h}`:qe?`${Me} <b>${qe}:</b> ${Ae}`:`${Me} ${Ae}`))}
|
||
</span>`}`:""}
|
||
${he?V`<div style='display:inline-block; line-break:anywhere; margin-right:8px'><span class='bold-text'>Constraints: </span>${he}</div>`:""}
|
||
${ge?V`<div style='display:inline-block; line-break:anywhere; margin-right:8px'><span class='bold-text'>Default: </span>${ge}</div>`:""}
|
||
${pe?V`<div style='display:inline-block; line-break:anywhere; margin-right:8px'><span class='bold-text'>${se==="const"?"Value":"Allowed"}: </span>${pe}</div>`:""}
|
||
${Te?V`<div style='display:inline-block; line-break: anywhere; margin-right:8px'><span class='bold-text'>Pattern: </span>${Te}</div>`:""}
|
||
</div>
|
||
</div>
|
||
`}handleAllEvents(t){if(t.target.classList.contains("open-bracket"))this.toggleObjectExpand(t);else if(t.target.classList.contains("schema-multiline-toggle"))this.schemaDescriptionExpanded=this.schemaDescriptionExpanded==="true"?"false":"true";else if(t.target.classList.contains("descr-expand-toggle")){const n=t.target.closest(".tr");n&&(n.classList.toggle("expanded-descr"),n.style.maxHeight=n.scrollHeight)}}toggleObjectExpand(t){const n=t.target.closest(".tr"),i=n.classList.contains("nullable");n.classList.contains("expanded")?(n.classList.replace("expanded","collapsed"),t.target.innerHTML=t.target.classList.contains("array-of-object")?"[{...}]":t.target.classList.contains("array-of-array")?"[[...]]":t.target.classList.contains("array")?"[...]":(i?"null┃":"")+"{...}"):(n.classList.replace("collapsed","expanded"),t.target.innerHTML=t.target.classList.contains("array-of-object")?"[{":t.target.classList.contains("array-of-array")?`[[ ${t.target.dataset.arrayType}`:t.target.classList.contains("object")?(i?"null┃":"")+"{":"[")}}),customElements.define("tag-input",class extends Ht{render(){let t="";return Array.isArray(this.value)&&(t=V`${this.value.filter((n=>typeof n=="string"&&n.trim()!=="")).map((n=>V`<span class='tag'>${n}</span>`))}`),V`
|
||
<div class='tags'>
|
||
${t}
|
||
<input type="text" class='editor' @paste="${n=>this.afterPaste(n)}" @keydown="${this.afterKeyDown}" @blur="${this.onBlur}" placeholder="${this.placeholder||""}">
|
||
</div>
|
||
`}static get properties(){return{placeholder:{type:String},value:{type:Array,attribute:"value"}}}attributeChangedCallback(t,n,i){t==="value"&&i&&n!==i&&(this.value=i.split(",").filter((l=>l.trim()!==""))),super.attributeChangedCallback(t,n,i)}afterPaste(t){const n=(t.clipboardData||window.clipboardData).getData("Text"),i=n?n.split(",").filter((l=>l.trim()!=="")):"";i&&(Array.isArray(this.value)?this.value=[...this.value,...i]:this.value=i),t.preventDefault()}afterKeyDown(t){t.keyCode===13?(t.stopPropagation(),t.preventDefault(),t.target.value&&(Array.isArray(this.value)?this.value=[...this.value,t.target.value]:this.value=[t.target.value],t.target.value="")):t.keyCode===8&&t.target.value.length===0&&Array.isArray(this.value)&&this.value.length>0&&(this.value.splice(-1),this.value=[...this.value])}onBlur(t){t.target.value&&(Array.isArray(this.value)?this.value=[...this.value,t.target.value]:this.value=[t.target.value],t.target.value="")}static get styles(){return[M`
|
||
.tags {
|
||
display:flex;
|
||
flex-wrap: wrap;
|
||
outline: none;
|
||
padding:0;
|
||
border-radius:var(--border-radius);
|
||
border:1px solid var(--border-color);
|
||
cursor:text;
|
||
overflow:hidden;
|
||
background:var(--input-bg);
|
||
}
|
||
.tag, .editor {
|
||
padding:3px;
|
||
margin:2px;
|
||
}
|
||
.tag{
|
||
border:1px solid var(--border-color);
|
||
background-color:var(--bg3);
|
||
color:var(--fg3);
|
||
border-radius:var(--border-radius);
|
||
word-break: break-all;
|
||
font-size: var(--font-size-small);
|
||
}
|
||
.tag:hover ~ #cursor {
|
||
display: block;
|
||
}
|
||
.editor {
|
||
flex:1;
|
||
border:1px solid transparent;
|
||
color:var(--fg);
|
||
min-width:60px;
|
||
outline: none;
|
||
line-height: inherit;
|
||
font-family:inherit;
|
||
background:transparent;
|
||
font-size: calc(var(--font-size-small) + 1px);
|
||
}
|
||
.editor:focus-visible {
|
||
outline: 1px solid;
|
||
}
|
||
.editor::placeholder {
|
||
color: var(--placeholder-color);
|
||
opacity:1;
|
||
}
|
||
`]}}),customElements.define("api-request",class extends Ht{constructor(){super(),this.responseMessage="",this.responseStatus="success",this.responseHeaders="",this.responseText="",this.responseUrl="",this.curlSyntax="",this.activeResponseTab="response",this.selectedRequestBodyType="",this.selectedRequestBodyExample="",this.activeParameterSchemaTabs={}}static get properties(){return{serverUrl:{type:String,attribute:"server-url"},servers:{type:Array},method:{type:String},path:{type:String},security:{type:Array},parameters:{type:Array},request_body:{type:Object},api_keys:{type:Array},parser:{type:Object},accept:{type:String},callback:{type:String},webhook:{type:String},responseMessage:{type:String,attribute:!1},responseText:{type:String,attribute:!1},responseHeaders:{type:String,attribute:!1},responseStatus:{type:String,attribute:!1},responseUrl:{type:String,attribute:!1},curlSyntax:{type:String,attribute:!1},fillRequestFieldsWithExample:{type:String,attribute:"fill-request-fields-with-example"},allowTry:{type:String,attribute:"allow-try"},showCurlBeforeTry:{type:String,attribute:"show-curl-before-try"},renderStyle:{type:String,attribute:"render-style"},schemaStyle:{type:String,attribute:"schema-style"},activeSchemaTab:{type:String,attribute:"active-schema-tab"},activeParameterSchemaTabs:{type:Object,converter:{fromAttribute:t=>JSON.parse(t),toAttribute:t=>JSON.stringify(t)},attribute:"active-parameter-schema-tabs"},schemaExpandLevel:{type:Number,attribute:"schema-expand-level"},schemaDescriptionExpanded:{type:String,attribute:"schema-description-expanded"},allowSchemaDescriptionExpandToggle:{type:String,attribute:"allow-schema-description-expand-toggle"},schemaHideReadOnly:{type:String,attribute:"schema-hide-read-only"},schemaHideWriteOnly:{type:String,attribute:"schema-hide-write-only"},fetchCredentials:{type:String,attribute:"fetch-credentials"},activeResponseTab:{type:String},selectedRequestBodyType:{type:String,attribute:"selected-request-body-type"},selectedRequestBodyExample:{type:String,attribute:"selected-request-body-example"}}}static get styles(){return[ju,Su,Si,Eu,$E,dl,pc,M`
|
||
:host {
|
||
container-type: inline-size;
|
||
}
|
||
*, *:before, *:after { box-sizing: border-box; }
|
||
:where(button, input[type="checkbox"], [tabindex="0"]):focus-visible { box-shadow: var(--focus-shadow); }
|
||
:where(input[type="text"], input[type="password"], select, textarea):focus-visible { border-color: var(--primary-color); }
|
||
tag-input:focus-within { outline: 1px solid;}
|
||
.read-mode {
|
||
margin-top: 24px;
|
||
}
|
||
.param-name,
|
||
.param-type {
|
||
margin: 1px 0;
|
||
text-align: right;
|
||
line-height: var(--font-size-small);
|
||
}
|
||
.param-name {
|
||
color: var(--fg);
|
||
font-family: var(--font-mono);
|
||
}
|
||
.param-name.deprecated {
|
||
color: var(--red);
|
||
}
|
||
.param-type{
|
||
color: var(--light-fg);
|
||
font-family: var(--font-regular);
|
||
}
|
||
.param-constraint{
|
||
min-width:100px;
|
||
}
|
||
.param-constraint:empty{
|
||
display:none;
|
||
}
|
||
.top-gap{margin-top:24px;}
|
||
|
||
.textarea {
|
||
min-height:220px;
|
||
padding:5px;
|
||
resize:vertical;
|
||
direction: ltr;
|
||
}
|
||
.example:first-child {
|
||
margin-top: -9px;
|
||
}
|
||
|
||
.response-message{
|
||
font-weight:bold;
|
||
text-overflow: ellipsis;
|
||
}
|
||
.response-message.error {
|
||
color:var(--red);
|
||
}
|
||
.response-message.success {
|
||
color:var(--blue);
|
||
}
|
||
|
||
.file-input-container {
|
||
align-items:flex-end;
|
||
}
|
||
.file-input-container .input-set:first-child .file-input-remove-btn{
|
||
visibility:hidden;
|
||
}
|
||
|
||
.file-input-remove-btn{
|
||
font-size:16px;
|
||
color:var(--red);
|
||
outline: none;
|
||
border: none;
|
||
background:none;
|
||
cursor:pointer;
|
||
}
|
||
|
||
.v-tab-btn {
|
||
font-size: var(--smal-font-size);
|
||
height:24px;
|
||
border:none;
|
||
background:none;
|
||
opacity: 0.3;
|
||
cursor: pointer;
|
||
padding: 4px 8px;
|
||
}
|
||
.v-tab-btn.active {
|
||
font-weight: bold;
|
||
background: var(--bg);
|
||
opacity: 1;
|
||
}
|
||
|
||
@container (min-width: 768px) {
|
||
.textarea {
|
||
padding:8px;
|
||
}
|
||
}
|
||
|
||
@container (max-width: 470px) {
|
||
.hide-in-small-screen {
|
||
display:none;
|
||
}
|
||
}
|
||
`,fc]}render(){return V`
|
||
<div class="col regular-font request-panel ${"read focused".includes(this.renderStyle)||this.callback==="true"?"read-mode":"view-mode"}">
|
||
<div class=" ${this.callback==="true"?"tiny-title":"req-res-title"} ">
|
||
${this.callback==="true"?"CALLBACK REQUEST":"REQUEST"}
|
||
</div>
|
||
<div>
|
||
${_E([this.method,this.path,this.allowTry,this.parameters,this.activeParameterSchemaTabs],(()=>this.inputParametersTemplate("path")))}
|
||
${_E([this.method,this.path,this.allowTry,this.parameters,this.activeParameterSchemaTabs],(()=>this.inputParametersTemplate("query")))}
|
||
${this.requestBodyTemplate()}
|
||
${_E([this.method,this.path,this.allowTry,this.parameters,this.activeParameterSchemaTabs],(()=>this.inputParametersTemplate("header")))}
|
||
${_E([this.method,this.path,this.allowTry,this.parameters,this.activeParameterSchemaTabs],(()=>this.inputParametersTemplate("cookie")))}
|
||
${this.allowTry==="false"?"":V`${this.apiCallTemplate()}`}
|
||
</div>
|
||
</div>
|
||
`}async updated(){this.showCurlBeforeTry==="true"&&this.applyCURLSyntax(this.shadowRoot),this.webhook==="true"&&(this.allowTry="false")}async saveExampleState(){this.renderStyle==="focused"&&([...this.shadowRoot.querySelectorAll("textarea.request-body-param-user-input")].forEach((t=>{t.dataset.user_example=t.value})),[...this.shadowRoot.querySelectorAll('textarea[data-ptype="form-data"]')].forEach((t=>{t.dataset.user_example=t.value})),this.requestUpdate())}async updateExamplesFromDataAttr(){this.renderStyle==="focused"&&([...this.shadowRoot.querySelectorAll("textarea.request-body-param-user-input")].forEach((t=>{t.value=t.dataset.user_example||t.dataset.example})),[...this.shadowRoot.querySelectorAll('textarea[data-ptype="form-data"]')].forEach((t=>{t.value=t.dataset.user_example||t.dataset.example})),this.requestUpdate())}renderExample(t,n,i){var l,h;return V`
|
||
${n==="array"?"[":""}
|
||
<a
|
||
part="anchor anchor-param-example"
|
||
style="display:inline-block; min-width:24px; text-align:center"
|
||
class="${this.allowTry==="true"?"":"inactive-link"}"
|
||
data-example-type="${n==="array"?n:"string"}"
|
||
data-example="${t.value&&Array.isArray(t.value)?(l=t.value)===null||l===void 0?void 0:l.join("~|~"):(typeof t.value=="object"?JSON.stringify(t.value,null,2):t.value)||""}"
|
||
title="${t.value&&Array.isArray(t.value)?(h=t.value)===null||h===void 0?void 0:h.join("~|~"):(typeof t.value=="object"?JSON.stringify(t.value,null,2):t.value)||""}"
|
||
@click="${v=>{const x=v.target.closest("table").querySelector(`[data-pname="${i}"]`);x&&(x.value=v.target.dataset.exampleType==="array"?v.target.dataset.example.split("~|~"):v.target.dataset.example)}}"
|
||
> ${t.printableValue||t.value} </a>
|
||
${n==="array"?"] ":""}
|
||
`}renderShortFormatExamples(t,n,i){return V`${t.map(((l,h)=>V`
|
||
${h===0?"":"┃"}
|
||
${this.renderExample(l,n,i)}`))}`}renderLongFormatExamples(t,n,i){return V` <ul style="list-style-type: disclosure-closed;">
|
||
${t.map((l=>{var h,v;return V`
|
||
<li>
|
||
${this.renderExample(l,n,i)}
|
||
${((h=l.summary)===null||h===void 0?void 0:h.length)>0?V`<span>(${l.summary})</span>`:""}
|
||
${((v=l.description)===null||v===void 0?void 0:v.length)>0?V`<p>${Mn(dt(l.description))}</p>`:""}
|
||
</li>
|
||
`}))}
|
||
</ul>`}exampleListTemplate(t,n,i=[]){return V` ${i.length>0?V`<span style="font-weight:bold">Examples: </span>
|
||
${l=i,l.some((h=>{var v,x;return((v=h.summary)===null||v===void 0?void 0:v.length)>0||((x=h.description)===null||x===void 0?void 0:x.length)>0}))?this.renderLongFormatExamples(i,n,t):this.renderShortFormatExamples(i,n,t)}`:""}`;var l}inputParametersTemplate(t){const n=this.parameters?this.parameters.filter((h=>h.in===t)):[];if(n.length===0)return"";let i="";t==="path"?i="PATH PARAMETERS":t==="query"?i="QUERY-STRING PARAMETERS":t==="header"?i="REQUEST HEADERS":t==="cookie"&&(i="COOKIES");const l=[];for(const h of n){const[v,x,w]=UX(h);if(!v)continue;const C=_d(v);if(!C)continue;const $=ts(v,{});let N="form",_=!0,F=!1;t!=="query"&&t!=="header"&&t!=="path"||(h.style&&"form spaceDelimited pipeDelimited".includes(h.style)?N=h.style:x&&(N=x),typeof h.explode=="boolean"&&(_=h.explode),typeof h.allowReserved=="boolean"&&(F=h.allowReserved));const U=QP(aa(h.examples)||aa(h.example)||aa(w?.example)||aa(w?.examples)||aa(C.examples)||aa(C.example),C.type);U.exampleVal||C.type!=="object"||(U.exampleVal=qm(v,x||"json",{},{},this.callback==="true"||this.webhook==="true",this.callback!=="true"&&this.webhook!=="true",!0,"text")[0].exampleValue);const J="read focused".includes(this.renderStyle)?"200px":"160px";l.push(V`
|
||
<tr title="${h.deprecated?"Deprecated":""}">
|
||
<td rowspan="${this.allowTry==="true"?"1":"2"}" style="width:${J}; min-width:100px;">
|
||
<div class="param-name ${h.deprecated?"deprecated":""}" >
|
||
${h.deprecated?V`<svg viewBox="0 0 10 10" width="10" height="10" style="stroke:var(--red); margin-right:-6px"><path d="M2 2L8 8M2 8L8 2"/></svg>`:""}
|
||
${h.required?V`<span style='color:var(--red)'>*</span>`:""}
|
||
${h.name}
|
||
</div>
|
||
<div class="param-type">
|
||
${C.type==="array"?`${C.arrayType}`:`${C.format?C.format:C.type}`}
|
||
</div>
|
||
</td>
|
||
${this.allowTry==="true"?V`
|
||
<td style="min-width:100px;" colspan="${C.default||C.constrain||C.allowedValues||C.pattern?"1":"2"}">
|
||
${C.type==="array"?V`
|
||
<tag-input class="request-param"
|
||
id = "tag-input-request-param-${h.name}"
|
||
style = "width:100%"
|
||
data-ptype = "${t}"
|
||
data-pname = "${h.name}"
|
||
data-example = "${Array.isArray(U.exampleVal)?U.exampleVal.join("~|~"):U.exampleVal}"
|
||
data-param-serialize-style = "${N}"
|
||
data-param-serialize-explode = "${_}"
|
||
data-param-allow-reserved = "${F}"
|
||
data-x-fill-example = "${h["x-fill-example"]||"yes"}"
|
||
data-array = "true"
|
||
placeholder = "add-multiple ↩"
|
||
.value="${h["x-fill-example"]==="no"?[]:wR(this.fillRequestFieldsWithExample==="true"?Array.isArray(U.exampleVal)?U.exampleVal:[U.exampleVal]:[])}"
|
||
>
|
||
</tag-input>`:C.type==="object"?V`
|
||
<div part="tab-panel" class="tab-panel col" style="border-width:0 0 1px 0;">
|
||
<div part="tab-btn-row" class="tab-buttons row" @click="${Y=>{if(Y.target.tagName.toLowerCase()==="button"){const Z={...this.activeParameterSchemaTabs};Z[h.name]=Y.target.dataset.tab,this.activeParameterSchemaTabs=Z}}}">
|
||
<button part="tab-btn" class="tab-btn ${this.activeParameterSchemaTabs[h.name]==="example"?"active":""}" data-tab = 'example'>EXAMPLE </button>
|
||
<button part="tab-btn" class="tab-btn ${this.activeParameterSchemaTabs[h.name]!=="example"?"active":""}" data-tab = 'schema'>SCHEMA</button>
|
||
</div>
|
||
|
||
${V`<div part="tab-content" class="tab-content col" data-tab = 'example' style="display:${this.activeParameterSchemaTabs[h.name]==="example"?"block":"none"}; padding-left:5px; width:100%">
|
||
<textarea
|
||
id = "textarea-request-param-${h.name}"
|
||
class = "textarea request-param"
|
||
part = "textarea textarea-param"
|
||
data-ptype = "${t}-object"
|
||
data-pname = "${h.name}"
|
||
data-example = "${U.exampleVal}"
|
||
data-param-serialize-style = "${N}"
|
||
data-param-serialize-explode = "${_}"
|
||
data-param-allow-reserved = "${F}"
|
||
data-x-fill-example = "${h["x-fill-example"]||"yes"}"
|
||
spellcheck = "false"
|
||
.textContent="${h["x-fill-example"]==="no"?"":wR(this.fillRequestFieldsWithExample==="true"?typeof U.exampleVal=="object"?JSON.stringify(U.exampleVal,null,2):U.exampleVal:"")}"
|
||
style = "resize:vertical; width:100%; height: ${"read focused".includes(this.renderStyle)?"180px":"120px"};"
|
||
@input=${Y=>{const Z=this.getRequestPanel(Y);this.liveCURLSyntaxUpdate(Z)}}
|
||
></textarea>
|
||
</div>`}
|
||
${V`<div part="tab-content" class="tab-content col" data-tab = 'schema' style="display:${this.activeParameterSchemaTabs[h.name]!=="example"?"block":"none"}; padding-left:5px; width:100%;">
|
||
<schema-tree
|
||
class = 'json'
|
||
style = 'display: block'
|
||
.data = '${$}'
|
||
schema-expand-level = "${this.schemaExpandLevel}"
|
||
schema-description-expanded = "${this.schemaDescriptionExpanded}"
|
||
allow-schema-description-expand-toggle = "${this.allowSchemaDescriptionExpandToggle}"
|
||
schema-hide-read-only = "${this.schemaHideReadOnly.includes(this.method)}"
|
||
schema-hide-write-only = "${this.schemaHideWriteOnly.includes(this.method)}"
|
||
exportparts = "wrap-request-btn:wrap-request-btn, btn:btn, btn-fill:btn-fill, btn-outline:btn-outline, btn-try:btn-try, btn-clear:btn-clear, btn-clear-resp:btn-clear-resp,
|
||
file-input:file-input, textbox:textbox, textbox-param:textbox-param, textarea:textarea, textarea-param:textarea-param,
|
||
anchor:anchor, anchor-param-example:anchor-param-example"
|
||
> </schema-tree>
|
||
</div>`}
|
||
</div>`:V`
|
||
<input type="${C.format==="password"?"password":"text"}" spellcheck="false" style="width:100%"
|
||
id="input-request-param-${h.name}"
|
||
class="request-param"
|
||
part="textbox textbox-param"
|
||
data-ptype="${t}"
|
||
data-pname="${h.name}"
|
||
data-example="${Array.isArray(U.exampleVal)?U.exampleVal.join("~|~"):U.exampleVal}"
|
||
data-param-allow-reserved = "${F}"
|
||
data-x-fill-example = "${h["x-fill-example"]||"yes"}"
|
||
data-array="false"
|
||
.value="${h["x-fill-example"]==="no"?"":wR(this.fillRequestFieldsWithExample==="true"?U.exampleVal:"")}"
|
||
@input=${Y=>{const Z=this.getRequestPanel(Y);this.liveCURLSyntaxUpdate(Z)}}
|
||
/>`}
|
||
</td>`:""}
|
||
${C.default||C.constrain||C.allowedValues||C.pattern?V`
|
||
<td colspan="${this.allowTry==="true"?"1":"2"}">
|
||
<div class="param-constraint">
|
||
${C.default?V`<span style="font-weight:bold">Default: </span>${C.default}<br/>`:""}
|
||
${C.pattern?V`<span style="font-weight:bold">Pattern: </span>${C.pattern}<br/>`:""}
|
||
${C.constrain?V`${C.constrain}<br/>`:""}
|
||
${C.allowedValues&&C.allowedValues.split("┃").map(((Y,Z)=>V`
|
||
${Z>0?"┃":V`<span style="font-weight:bold">Allowed: </span>`}
|
||
${V`
|
||
<a part="anchor anchor-param-constraint" class = "${this.allowTry==="true"?"":"inactive-link"}"
|
||
data-type="${C.type==="array"?C.type:"string"}"
|
||
data-enum="${Y.trim()}"
|
||
@click="${P=>{const se=P.target.closest("table").querySelector(`[data-pname="${h.name}"]`);se&&(P.target.dataset.type==="array"?se.value=[P.target.dataset.enum]:se.value=P.target.dataset.enum)}}"
|
||
>${Y}</a>`}`))}
|
||
</div>
|
||
</td>`:V`<td></td>`}
|
||
</tr>
|
||
<tr>
|
||
${this.allowTry==="true"?V`<td style="border:none"> </td>`:""}
|
||
<td colspan="2" style="border:none">
|
||
<span class="m-markdown-small">${Mn(dt(h.description||""))}</span>
|
||
${this.exampleListTemplate.call(this,h.name,C.type,U.exampleList)}
|
||
</td>
|
||
</tr>
|
||
`)}return V`
|
||
<div class="table-title top-gap">${i}</div>
|
||
<div style="display:block; overflow-x:auto; max-width:100%;">
|
||
<table role="presentation" class="m-table" style="width:100%; word-break:break-word;">
|
||
${l}
|
||
</table>
|
||
</div>`}async beforeNavigationFocusedMode(){}async afterNavigationFocusedMode(){this.selectedRequestBodyType="",this.selectedRequestBodyExample="",this.updateExamplesFromDataAttr(),this.clearResponseData()}onSelectExample(t){this.selectedRequestBodyExample=t.target.value;const n=t.target;window.setTimeout((i=>{const l=i.closest(".example-panel").querySelector(".request-body-param");i.closest(".example-panel").querySelector(".request-body-param-user-input").value=l.innerText;const h=this.getRequestPanel({target:i});this.liveCURLSyntaxUpdate(h)}),0,n)}onMimeTypeChange(t){this.selectedRequestBodyType=t.target.value;const n=t.target;this.selectedRequestBodyExample="",window.setTimeout((i=>{const l=i.closest(".request-body-container").querySelector(".request-body-param");l&&(i.closest(".request-body-container").querySelector(".request-body-param-user-input").value=l.innerText)}),0,n)}requestBodyTemplate(){if(!this.request_body||Object.keys(this.request_body).length===0)return"";let t="",n="",i="",l="",h="";const v=[],{content:x}=this.request_body;for(const w in x)v.push({mimeType:w,schema:x[w].schema,example:x[w].example,examples:x[w].examples}),this.selectedRequestBodyType||(this.selectedRequestBodyType=w);return t=v.length===1?"":V`
|
||
<select style="min-width:100px; max-width:100%; margin-bottom:-1px;" @change = '${w=>this.onMimeTypeChange(w)}'>
|
||
${v.map((w=>V`
|
||
<option value = '${w.mimeType}' ?selected = '${w.mimeType===this.selectedRequestBodyType}'>
|
||
${w.mimeType}
|
||
</option> `))}
|
||
</select>
|
||
`,v.forEach((w=>{let C,$=[];if(this.selectedRequestBodyType.includes("json")||this.selectedRequestBodyType.includes("xml")||this.selectedRequestBodyType.includes("text")||this.selectedRequestBodyType.includes("jose"))w.mimeType===this.selectedRequestBodyType&&($=qm(w.schema,w.mimeType,aa(w.examples),aa(w.example),this.callback==="true"||this.webhook==="true",this.callback!=="true"&&this.webhook!=="true","text",!1),this.selectedRequestBodyExample||(this.selectedRequestBodyExample=$.length>0?$[0].exampleId:""),h=V`
|
||
${h}
|
||
<div class = 'example-panel border-top pad-top-8'>
|
||
${$.length===1?"":V`
|
||
<select style="min-width:100px; max-width:100%; margin-bottom:-1px;" @change='${N=>this.onSelectExample(N)}'>
|
||
${$.map((N=>V`<option value="${N.exampleId}" ?selected=${N.exampleId===this.selectedRequestBodyExample} >
|
||
${N.exampleSummary.length>80?N.exampleId:N.exampleSummary?N.exampleSummary:N.exampleId}
|
||
</option>`))}
|
||
</select>
|
||
`}
|
||
${$.filter((N=>N.exampleId===this.selectedRequestBodyExample)).map((N=>V`
|
||
<div class="example ${N.exampleId===this.selectedRequestBodyExample?"example-selected":""}" data-example = '${N.exampleId}'>
|
||
${N.exampleSummary&&N.exampleSummary.length>80?V`<div style="padding: 4px 0"> ${N.exampleSummary} </div>`:""}
|
||
${N.exampleDescription?V`<div class="m-markdown-small" style="padding: 4px 0"> ${Mn(dt(N.exampleDescription||""))} </div>`:""}
|
||
<!-- This pre(hidden) is to store the original example value, this will remain unchanged when users switches from one example to another, its is used to populate the editable textarea -->
|
||
<pre
|
||
class = "textarea is-hidden request-body-param ${w.mimeType.substring(w.mimeType.indexOf("/")+1)}"
|
||
spellcheck = "false"
|
||
data-ptype = "${w.mimeType}"
|
||
style="width:100%; resize:vertical; display:none"
|
||
>${N.exampleFormat==="text"?N.exampleValue:JSON.stringify(N.exampleValue,null,2)}</pre>
|
||
|
||
<!-- this textarea is for user to edit the example -->
|
||
<textarea
|
||
class = "textarea request-body-param-user-input"
|
||
part = "textarea textarea-param"
|
||
spellcheck = "false"
|
||
data-ptype = "${w.mimeType}"
|
||
data-example = "${N.exampleFormat==="text"?N.exampleValue:JSON.stringify(N.exampleValue,null,2)}"
|
||
data-example-format = "${N.exampleFormat}"
|
||
style="width:100%; resize:vertical;"
|
||
.textContent = "${this.fillRequestFieldsWithExample==="true"?N.exampleFormat==="text"?N.exampleValue:JSON.stringify(N.exampleValue,null,2):""}"
|
||
@input=${_=>{const F=this.getRequestPanel(_);this.liveCURLSyntaxUpdate(F)}}
|
||
@keydown=${_=>{if((_.keyCode===10||_.keyCode===13)&&_.ctrlKey)return this.onTryClick(_)}}
|
||
|
||
></textarea>
|
||
</div>
|
||
`))}
|
||
|
||
</div>
|
||
`);else if(this.selectedRequestBodyType.includes("form-urlencoded")||this.selectedRequestBodyType.includes("form-data")){if(w.mimeType===this.selectedRequestBodyType){const N=qm(w.schema,w.mimeType,w.examples,w.example,this.callback==="true"||this.webhook==="true",this.callback!=="true"&&this.webhook!=="true","text",!1);w.schema&&(i=this.formDataTemplate(w.schema,w.mimeType,N[0]?N[0].exampleValue:""))}}else/^audio\/|^image\/|^video\/|^font\/|tar$|zip$|7z$|rtf$|msword$|excel$|\/pdf$|\/octet-stream$/.test(this.selectedRequestBodyType)&&w.mimeType===this.selectedRequestBodyType&&(n=V`
|
||
<div class = "small-font-size bold-text row">
|
||
<input id="input-request-body-param-file" type="file" part="file-input" style="max-width:100%" class="request-body-param-file" data-ptype="${w.mimeType}" spellcheck="false" />
|
||
</div>
|
||
`);(w.mimeType.includes("json")||w.mimeType.includes("xml")||w.mimeType.includes("text")||this.selectedRequestBodyType.includes("jose"))&&(C=ts(w.schema,{}),this.schemaStyle==="table"?l=V`
|
||
${l}
|
||
<schema-table
|
||
class = '${w.mimeType.substring(w.mimeType.indexOf("/")+1)}'
|
||
style = 'display: ${this.selectedRequestBodyType===w.mimeType?"block":"none"};'
|
||
.data = '${C}'
|
||
schema-expand-level = "${this.schemaExpandLevel}"
|
||
schema-description-expanded = "${this.schemaDescriptionExpanded}"
|
||
allow-schema-description-expand-toggle = "${this.allowSchemaDescriptionExpandToggle}"
|
||
schema-hide-read-only = "${this.schemaHideReadOnly}"
|
||
schema-hide-write-only = "${this.schemaHideWriteOnly}"
|
||
exportparts = "schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"
|
||
> </schema-table>
|
||
`:this.schemaStyle==="tree"&&(l=V`
|
||
${l}
|
||
<schema-tree
|
||
class = "${w.mimeType.substring(w.mimeType.indexOf("/")+1)}"
|
||
style = "display: ${this.selectedRequestBodyType===w.mimeType?"block":"none"};"
|
||
.data = "${C}"
|
||
schema-expand-level = "${this.schemaExpandLevel}"
|
||
schema-description-expanded = "${this.schemaDescriptionExpanded}"
|
||
allow-schema-description-expand-toggle = "${this.allowSchemaDescriptionExpandToggle}"
|
||
schema-hide-read-only = "${this.schemaHideReadOnly}"
|
||
schema-hide-write-only = "${this.schemaHideWriteOnly}"
|
||
exportparts = "schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"
|
||
> </schema-tree>
|
||
`))})),V`
|
||
<div class='request-body-container' data-selected-request-body-type="${this.selectedRequestBodyType}">
|
||
<div class="table-title top-gap row">
|
||
REQUEST BODY ${this.request_body.required?V`<span class="mono-font" style='color:var(--red)'>*</span>`:""}
|
||
<span style = "font-weight:normal; margin-left:5px"> ${this.selectedRequestBodyType}</span>
|
||
<span style="flex:1"></span>
|
||
${t}
|
||
</div>
|
||
${this.request_body.description?V`<div class="m-markdown" style="margin-bottom:12px">${Mn(dt(this.request_body.description))}</div>`:""}
|
||
|
||
${this.selectedRequestBodyType.includes("json")||this.selectedRequestBodyType.includes("xml")||this.selectedRequestBodyType.includes("text")||this.selectedRequestBodyType.includes("jose")?V`
|
||
<div part="tab-panel" class="tab-panel col" style="border-width:0 0 1px 0;">
|
||
<div part="tab-btn-row" class="tab-buttons row" @click="${w=>{w.target.tagName.toLowerCase()==="button"&&(this.activeSchemaTab=w.target.dataset.tab)}}">
|
||
<button part="tab-btn" class="tab-btn ${this.activeSchemaTab==="example"?"active":""}" data-tab = 'example'>EXAMPLE</button>
|
||
<button part="tab-btn" class="tab-btn ${this.activeSchemaTab!=="example"?"active":""}" data-tab = 'schema'>SCHEMA</button>
|
||
</div>
|
||
${V`<div part="tab-content" class="tab-content col" style="display:${this.activeSchemaTab==="example"?"block":"none"};"> ${h}</div>`}
|
||
${V`<div part="tab-content" class="tab-content col" style="display:${this.activeSchemaTab==="example"?"none":"block"};"> ${l}</div>`}
|
||
</div>`:V`
|
||
${n}
|
||
${i}`}
|
||
</div>
|
||
`}formDataParamAsObjectTemplate(t,n,i){var l;const h=ts(n,{}),v=qm(n,"json",aa(n.examples),aa(n.example),this.callback==="true"||this.webhook==="true",this.callback!=="true"&&this.webhook!=="true","text",!1);return V`
|
||
<div part="tab-panel" class="tab-panel row" style="min-height:220px; border-left: 6px solid var(--light-border-color); align-items: stretch;">
|
||
<div style="width:24px; background-color:var(--light-border-color)">
|
||
<div class="row" style="flex-direction:row-reverse; width:160px; height:24px; transform:rotate(270deg) translateX(-160px); transform-origin:top left; display:block;" @click="${x=>{if(x.target.classList.contains("v-tab-btn")){const{tab:w}=x.target.dataset;if(w){const C=x.target.closest(".tab-panel"),$=C.querySelector(`.v-tab-btn[data-tab="${w}"]`),N=[...C.querySelectorAll(`.v-tab-btn:not([data-tab="${w}"])`)],_=C.querySelector(`.tab-content[data-tab="${w}"]`),F=[...C.querySelectorAll(`.tab-content:not([data-tab="${w}"])`)];$.classList.add("active"),_.style.display="block",N.forEach((U=>{U.classList.remove("active")})),F.forEach((U=>{U.style.display="none"}))}}x.target.tagName.toLowerCase()==="button"&&(this.activeSchemaTab=x.target.dataset.tab)}}">
|
||
<button class="v-tab-btn ${this.activeSchemaTab==="example"?"active":""}" data-tab = 'example'>EXAMPLE</button>
|
||
<button class="v-tab-btn ${this.activeSchemaTab!=="example"?"active":""}" data-tab = 'schema'>SCHEMA</button>
|
||
</div>
|
||
</div>
|
||
${V`
|
||
<div class="tab-content col" data-tab = 'example' style="display:${this.activeSchemaTab==="example"?"block":"none"}; padding-left:5px; width:100%">
|
||
<textarea
|
||
class = "textarea"
|
||
part = "textarea textarea-param"
|
||
style = "width:100%; border:none; resize:vertical;"
|
||
data-array = "false"
|
||
data-ptype = "${i.includes("form-urlencode")?"form-urlencode":"form-data"}"
|
||
data-pname = "${t}"
|
||
data-example = "${((l=v[0])===null||l===void 0?void 0:l.exampleValue)||""}"
|
||
.textContent = "${this.fillRequestFieldsWithExample==="true"?v[0].exampleValue:""}"
|
||
spellcheck = "false"
|
||
></textarea>
|
||
</div>`}
|
||
${V`
|
||
<div class="tab-content col" data-tab = 'schema' style="display:${this.activeSchemaTab!=="example"?"block":"none"}; padding-left:5px; width:100%;">
|
||
<schema-tree
|
||
.data = "${h}"
|
||
schema-expand-level = "${this.schemaExpandLevel}"
|
||
schema-description-expanded = "${this.schemaDescriptionExpanded}"
|
||
allow-schema-description-expand-toggle = "${this.allowSchemaDescriptionExpandToggle}",
|
||
> </schema-tree>
|
||
</div>`}
|
||
</div>
|
||
`}formDataTemplate(t,n,i=""){const l=[];if(t.properties){for(const x in t.properties){var h,v;const w=t.properties[x];if(w.readOnly)continue;const C=w.examples||w.example||"",$=w.type,N=_d(w),_="read focused".includes(this.renderStyle)?"200px":"160px",F=QP(N.examples||N.example,N.type);l.push(V`
|
||
<tr title="${w.deprecated?"Deprecated":""}">
|
||
<td style="width:${_}; min-width:100px;">
|
||
<div class="param-name ${w.deprecated?"deprecated":""}">
|
||
${x}${(h=t.required)!==null&&h!==void 0&&h.includes(x)||w.required?V`<span style='color:var(--red);'>*</span>`:""}
|
||
</div>
|
||
<div class="param-type">${N.type}</div>
|
||
</td>
|
||
<td
|
||
style="${$==="object"?"width:100%; padding:0;":this.allowTry==="true"?"":"display:none;"} min-width:100px;"
|
||
colspan="${$==="object"?2:1}">
|
||
${$==="array"?((v=w.items)===null||v===void 0?void 0:v.format)==="binary"?V`
|
||
<div class="file-input-container col" style='align-items:flex-end;' @click="${U=>this.onAddRemoveFileInput(U,x,n)}">
|
||
<div class='input-set row'>
|
||
<input
|
||
type = "file"
|
||
part = "file-input"
|
||
style = "width:100%"
|
||
data-pname = "${x}"
|
||
data-ptype = "${n.includes("form-urlencode")?"form-urlencode":"form-data"}"
|
||
data-array = "false"
|
||
data-file-array = "true"
|
||
/>
|
||
<button class="file-input-remove-btn"> ✕ </button>
|
||
</div>
|
||
<button class="m-btn primary file-input-add-btn" part="btn btn-fill" style="margin:2px 25px 0 0; padding:2px 6px;">ADD</button>
|
||
</div>
|
||
`:V`
|
||
<tag-input
|
||
style = "width:100%"
|
||
data-ptype = "${n.includes("form-urlencode")?"form-urlencode":"form-data"}"
|
||
data-pname = "${x}"
|
||
data-example = "${Array.isArray(C)?C.join("~|~"):C}"
|
||
data-array = "true"
|
||
placeholder = "add-multiple ↩"
|
||
.value = "${Array.isArray(C)?Array.isArray(C[0])?C[0]:C:[]}"
|
||
>
|
||
</tag-input>
|
||
`:V`
|
||
${$==="object"?this.formDataParamAsObjectTemplate.call(this,x,w,n):V`
|
||
${this.allowTry==="true"?V`<input
|
||
.value = "${this.fillRequestFieldsWithExample==="true"?F.exampleVal:""}"
|
||
spellcheck = "false"
|
||
type = "${w.format==="binary"?"file":w.format==="password"?"password":"text"}"
|
||
part = "textbox textbox-param"
|
||
style = "width:100%"
|
||
data-ptype = "${n.includes("form-urlencode")?"form-urlencode":"form-data"}"
|
||
data-pname = "${x}"
|
||
data-example = "${Array.isArray(C)?C[0]:C}"
|
||
data-array = "false"
|
||
/>`:""}
|
||
`}`}
|
||
</td>
|
||
${$==="object"?"":V`
|
||
<td>
|
||
${N.default||N.constrain||N.allowedValues||N.pattern?V`
|
||
<div class="param-constraint">
|
||
${N.default?V`<span style="font-weight:bold">Default: </span>${N.default}<br/>`:""}
|
||
${N.pattern?V`<span style="font-weight:bold">Pattern: </span>${N.pattern}<br/>`:""}
|
||
${N.constrain?V`${N.constrain}<br/>`:""}
|
||
${N.allowedValues&&N.allowedValues.split("┃").map(((U,J)=>V`
|
||
${J>0?"┃":V`<span style="font-weight:bold">Allowed: </span>`}
|
||
${V`
|
||
<a part="anchor anchor-param-constraint" class = "${this.allowTry==="true"?"":"inactive-link"}"
|
||
data-type="${N.type==="array"?N.type:"string"}"
|
||
data-enum="${U.trim()}"
|
||
@click="${Y=>{const Z=Y.target.closest("table").querySelector(`[data-pname="${x}"]`);Z&&(Y.target.dataset.type==="array"?Z.value=[Y.target.dataset.enum]:Z.value=Y.target.dataset.enum)}}"
|
||
>
|
||
${U}
|
||
</a>`}`))}
|
||
</div>`:""}
|
||
</td>`}
|
||
</tr>
|
||
${$==="object"?"":V`
|
||
<tr>
|
||
<td style="border:none"> </td>
|
||
<td colspan="2" style="border:none; margin-top:0; padding:0 5px 8px 5px;">
|
||
<span class="m-markdown-small">${Mn(dt(w.description||""))}</span>
|
||
${this.exampleListTemplate.call(this,x,N.type,F.exampleList)}
|
||
</td>
|
||
</tr>
|
||
`}`)}return V`
|
||
<table role="presentation" style="width:100%;" class="m-table">
|
||
${l}
|
||
</table>
|
||
`}return V`
|
||
<textarea
|
||
class = "textarea dynamic-form-param ${n}"
|
||
part = "textarea textarea-param"
|
||
spellcheck = "false"
|
||
data-pname="dynamic-form"
|
||
data-ptype="${n}"
|
||
.textContent = "${i}"
|
||
style="width:100%"
|
||
></textarea>
|
||
${t.description?V`<span class="m-markdown-small">${Mn(dt(t.description))}</span>`:""}
|
||
`}curlSyntaxTemplate(t="flex"){return V`
|
||
<div class="col m-markdown" style="flex:1; display:${t}; position:relative; max-width: 100%;">
|
||
<button class="toolbar-btn" style = "position:absolute; top:12px; right:8px" @click='${n=>{hl(this.curlSyntax.trim().replace(/\\$/,""),n)}}' part="btn btn-fill"> Copy </button>
|
||
<pre style="white-space:pre"><code>${Mn(sr().highlight(this.curlSyntax.trim().replace(/\\$/,""),sr().languages.shell,"shell"))}</code></pre>
|
||
</div>
|
||
`}apiResponseTabTemplate(){let t="",n="";if(!this.responseIsBlob)if(this.responseHeaders.includes("application/x-ndjson")){t="json";const i=this.responseText.split(`
|
||
`).map((l=>sr().highlight(l,sr().languages[t],t))).join(`
|
||
`);n=V`<code>${Mn(i)}</code>`}else this.responseHeaders.includes("json")?(t="json",n=V`<code>${Mn(sr().highlight(this.responseText,sr().languages[t],t))}</code>`):this.responseHeaders.includes("html")||this.responseHeaders.includes("xml")?(t="html",n=V`<code>${Mn(sr().highlight(this.responseText,sr().languages[t],t))}</code>`):(t="text",n=V`<code>${this.responseText}</code>`);return V`
|
||
<div class="row" style="font-size:var(--font-size-small); margin:5px 0">
|
||
<div class="response-message ${this.responseStatus}">Response Status: ${this.responseMessage}</div>
|
||
<div style="flex:1"></div>
|
||
<button class="m-btn" part="btn btn-outline btn-clear-response" @click="${this.clearResponseData}">CLEAR RESPONSE</button>
|
||
</div>
|
||
<div part="tab-panel" class="tab-panel col" style="border-width:0 0 1px 0;">
|
||
<div id="tab_buttons" part="tab-btn-row" class="tab-buttons row" @click="${i=>{i.target.classList.contains("tab-btn")!==!1&&(this.activeResponseTab=i.target.dataset.tab)}}">
|
||
<button part="tab-btn" class="tab-btn ${this.activeResponseTab==="response"?"active":""}" data-tab = 'response' > RESPONSE</button>
|
||
<button part="tab-btn" class="tab-btn ${this.activeResponseTab==="headers"?"active":""}" data-tab = 'headers' > RESPONSE HEADERS</button>
|
||
${this.showCurlBeforeTry==="true"?"":V`<button part="tab-btn" class="tab-btn ${this.activeResponseTab==="curl"?"active":""}" data-tab = 'curl'>CURL</button>`}
|
||
</div>
|
||
${this.responseIsBlob?V`
|
||
<div part="tab-content" class="tab-content col" style="flex:1; display:${this.activeResponseTab==="response"?"flex":"none"};">
|
||
${this.responseBlobType==="image"?V`<img style="max-height:var(--resp-area-height, 400px); object-fit:contain;" class="mar-top-8" src="${(i=>i??cn)(this.responseBlobUrl)}"></img>`:""}
|
||
<button class="m-btn thin-border mar-top-8" style="width:135px" @click='${i=>{zp(this.responseBlobUrl,this.respContentDisposition)}}' part="btn btn-outline">
|
||
DOWNLOAD
|
||
</button>
|
||
${this.responseBlobType==="view"||this.responseBlobType==="image"?V`<button class="m-btn thin-border mar-top-8" style="width:135px" @click='${i=>{Fg(this.responseBlobUrl)}}' part="btn btn-outline">VIEW (NEW TAB)</button>`:""}
|
||
</div>`:V`
|
||
<div part="tab-content" class="tab-content col m-markdown" style="flex:1; display:${this.activeResponseTab==="response"?"flex":"none"};" >
|
||
<button class="toolbar-btn" style="position:absolute; top:12px; right:8px" @click='${i=>{hl(this.responseText,i)}}' part="btn btn-fill"> Copy </button>
|
||
<pre style="white-space:pre; min-height:50px; height:var(--resp-area-height, 400px); resize:vertical; overflow:auto">${n}</pre>
|
||
</div>`}
|
||
<div part="tab-content" class="tab-content col m-markdown" style="flex:1; display:${this.activeResponseTab==="headers"?"flex":"none"};" >
|
||
<button class="toolbar-btn" style = "position:absolute; top:12px; right:8px" @click='${i=>{hl(this.responseHeaders,i)}}' part="btn btn-fill"> Copy </button>
|
||
<pre style="white-space:pre"><code>${Mn(sr().highlight(this.responseHeaders,sr().languages.css,"css"))}</code></pre>
|
||
</div>
|
||
${this.showCurlBeforeTry==="true"?"":this.curlSyntaxTemplate(this.activeResponseTab==="curl"?"flex":"none")}
|
||
</div>`}apiCallTemplate(){var t,n;const i=V`
|
||
<div style="display:flex; flex-direction:column;">
|
||
${this.serverUrl?V`
|
||
<div style="display:flex; align-items:baseline;">
|
||
<div style="font-weight:bold; padding-right:5px;">API Server</div>
|
||
<span class = "gray-text"> ${this.serverUrl} </span>
|
||
</div>
|
||
`:""}
|
||
</div>
|
||
`;return V`
|
||
<div style="display:flex; align-items:flex-end; margin:16px 0; font-size:var(--font-size-small);" part="wrap-request-btn">
|
||
<div class="hide-in-small-screen" style="flex-direction:column; margin:0; width:calc(100% - 60px);">
|
||
<div style="display:flex; flex-direction:row; align-items:center; overflow:hidden;">
|
||
${i}
|
||
</div>
|
||
<div style="display:flex;">
|
||
<div style="font-weight:bold; padding-right:5px;">Authentication</div>
|
||
${((t=this.security)===null||t===void 0?void 0:t.length)>0?V`
|
||
${this.api_keys.length>0?V`<div style="color:var(--blue); overflow:hidden;">
|
||
${this.api_keys.length===1?`${(n=this.api_keys[0])===null||n===void 0?void 0:n.typeDisplay} in ${this.api_keys[0].in}`:`${this.api_keys.length} API keys applied`}
|
||
</div>`:V`<div class="gray-text">Required <span style="color:var(--red)">(None Applied)</span> </div>`}`:V`<span class="gray-text"> Not Required </span>`}
|
||
</div>
|
||
</div>
|
||
${this.parameters.length>0||this.request_body?V`
|
||
<button class="m-btn thin-border" part="btn btn-outline btn-fill" style="margin-right:5px;" @click="${this.onFillRequestData}" title="Fills with example data (if provided)">
|
||
FILL EXAMPLE
|
||
</button>
|
||
<button class="m-btn thin-border" part="btn btn-outline btn-clear" style="margin-right:5px;" @click="${this.onClearRequestData}">
|
||
CLEAR
|
||
</button>`:""}
|
||
<button class="m-btn primary thin-border" part="btn btn-try" @click="${this.onTryClick}">TRY</button>
|
||
</div>
|
||
<div class="row" style="font-size:var(--font-size-small); margin:5px 0">
|
||
${this.showCurlBeforeTry==="true"?this.curlSyntaxTemplate():""}
|
||
</div>
|
||
${this.responseMessage===""?"":this.apiResponseTabTemplate()}
|
||
`}async onFillRequestData(t){[...t.target.closest(".request-panel").querySelectorAll("input, tag-input, textarea:not(.is-hidden)")].forEach((n=>{n.dataset.example&&(n.tagName.toUpperCase()==="TAG-INPUT"?n.value=n.dataset.example.split("~|~"):n.value=n.dataset.example)}))}async onClearRequestData(t){[...t.target.closest(".request-panel").querySelectorAll("input, tag-input, textarea:not(.is-hidden)")].forEach((n=>{n.value=""}))}buildFetchURL(t){let n;const i=[...t.querySelectorAll("[data-ptype='path']")],l=[...t.querySelectorAll("[data-ptype='query']")],h=[...t.querySelectorAll("[data-ptype='query-object']")];n=this.path,i.map((C=>{n=n.replace(`{${C.dataset.pname}}`,encodeURIComponent(C.value))}));const v=new Map,x=[];l.length>0&&l.forEach((C=>{const $=new URLSearchParams;if(C.dataset.paramAllowReserved==="true"&&x.push(C.dataset.pname),C.dataset.array==="false")C.value!==""&&$.append(C.dataset.pname,C.value);else{const{paramSerializeStyle:N,paramSerializeExplode:_}=C.dataset;let F=C.value&&Array.isArray(C.value)?C.value:[];F=Array.isArray(F)?F.filter((U=>U!=="")):[],F.length>0&&(N==="spaceDelimited"?$.append(C.dataset.pname,F.join(" ").replace(/^\s|\s$/g,"")):N==="pipeDelimited"?$.append(C.dataset.pname,F.join("|").replace(/^\||\|$/g,"")):_==="true"?F.forEach((U=>{$.append(C.dataset.pname,U)})):$.append(C.dataset.pname,F.join(",").replace(/^,|,$/g,"")))}$.toString()&&v.set(C.dataset.pname,$)})),h.length>0&&h.map((C=>{const $=new URLSearchParams;try{let N={};const{paramSerializeStyle:_,paramSerializeExplode:F,pname:U}=C.dataset;if(N=Object.assign(N,JSON.parse(C.value.replace(/\s+/g," "))),C.dataset.paramAllowReserved==="true"&&x.push(C.dataset.pname),"json xml".includes(_))_==="json"?$.append(C.dataset.pname,JSON.stringify(N)):_==="xml"&&$.append(C.dataset.pname,SR(N));else for(const J in N){const Y=`${U}[${J}]`;typeof N[J]=="object"?Array.isArray(N[J])&&(_==="spaceDelimited"?$.append(Y,N[J].join(" ")):_==="pipeDelimited"?$.append(Y,N[J].join("|")):F==="true"?N[J].forEach((Z=>{$.append(Y,Z)})):$.append(Y,N[J])):$.append(Y,N[J])}}catch{console.error("RapiDoc: unable to parse %s into object",C.value)}$.toString()&&v.set(C.dataset.pname,$)}));let w="";return v.size&&(v.forEach(((C,$)=>{x.includes($)?(w+=`${$}=`,w+=C.getAll($).join(`&${$}=`),w+="&"):w+=`${C.toString()}&`})),w=w.slice(0,-1)),w.length!==0&&(n=`${n}${n.includes("?")?"&":"?"}${w}`),this.api_keys.filter((C=>C.in==="query")).forEach((C=>{n=`${n}${n.includes("?")?"&":"?"}${C.name}=${encodeURIComponent(C.finalKeyValue)}`})),n=`${this.serverUrl.replace(/\/$/,"")}${n}`,n}buildFetchHeaders(t){var n;const i=(n=this.closest(".expanded-req-resp-container, .req-resp-container"))===null||n===void 0?void 0:n.getElementsByTagName("api-response")[0],l=[...t.querySelectorAll("[data-ptype='header'], [data-ptype='header-object']")],h=t.querySelector(".request-body-container"),v=i?.selectedMimeType,x=new Headers;if(v?x.append("Accept",v):this.accept&&x.append("Accept",this.accept),this.api_keys.filter((w=>w.in==="header")).forEach((w=>{x.append(w.name,w.finalKeyValue)})),l.map((w=>{if(w.value)if(w.dataset.ptype==="header-object"){const C=JSON.parse(w.value.replace(/\n/g,"").trim()),$=w.dataset.paramSerializeExplode==="true"?"=":",",N=Object.keys(C).map((_=>{const F=C[_];return typeof F=="object"?`${_}${$}${JSON.stringify(F)}`:`${_}${$}${F}`})).join(",");x.append(w.dataset.pname,N)}else x.append(w.dataset.pname,w.value)})),h){const w=h.dataset.selectedRequestBodyType;w.includes("form-data")||x.append("Content-Type",w)}return x}buildFetchBodyOptions(t){const n=t.querySelector(".request-body-container"),i={method:this.method.toUpperCase()};if(n){const l=n.dataset.selectedRequestBodyType;if(l.includes("form-urlencoded")){const h=t.querySelector("[data-ptype='dynamic-form']");if(h){const v=h.value,x=new URLSearchParams;let w,C=!0;if(v)try{w=JSON.parse(v)}catch($){C=!1,console.warn("RapiDoc: Invalid JSON provided",$)}else C=!1;if(C){for(const $ in w)x.append($,JSON.stringify(w[$]));i.body=x}}else{const v=[...t.querySelectorAll("[data-ptype='form-urlencode']")],x=new URLSearchParams;v.filter((w=>w.type!=="file")).forEach((w=>{if(w.dataset.array==="false")w.value&&x.append(w.dataset.pname,w.value);else{const C=w.value&&Array.isArray(w.value)?w.value.join(","):"";x.append(w.dataset.pname,C)}})),i.body=x}}else if(l.includes("form-data")){const h=new FormData;[...t.querySelectorAll("[data-ptype='form-data']")].forEach((v=>{v.dataset.array==="false"?v.type==="file"&&v.files[0]?h.append(v.dataset.pname,v.files[0],v.files[0].name):v.value&&h.append(v.dataset.pname,v.value):v.value&&Array.isArray(v.value)&&h.append(v.dataset.pname,v.value.join(","))})),i.body=h}else if(/^audio\/|^image\/|^video\/|^font\/|tar$|zip$|7z$|rtf$|msword$|excel$|\/pdf$|\/octet-stream$/.test(l)){const h=t.querySelector(".request-body-param-file");h!=null&&h.files[0]&&(i.body=h.files[0])}else if(l.includes("json")||l.includes("xml")||l.includes("text")){const h=t.querySelector(".request-body-param-user-input");h!=null&&h.value&&(i.body=h.value)}}return i}async onTryClick(t){const n=t.target,i=n.closest(".request-panel"),l=this.buildFetchURL(i),h=this.buildFetchBodyOptions(i),v=this.buildFetchHeaders(i);this.responseUrl="",this.responseHeaders=[],this.curlSyntax=this.generateCURLSyntax(l,v,h,i),this.responseStatus="success",this.responseIsBlob=!1,this.respContentDisposition="",this.responseBlobUrl&&(URL.revokeObjectURL(this.responseBlobUrl),this.responseBlobUrl=""),this.fetchCredentials&&(h.credentials=this.fetchCredentials);const x=new AbortController,{signal:w}=x;h.headers=v;const C={url:l,...h};this.dispatchEvent(new CustomEvent("before-try",{bubbles:!0,composed:!0,detail:{request:C,controller:x}}));const $={method:C.method,headers:C.headers,credentials:C.credentials,body:C.body},N=new Request(C.url,$);let _,F;try{let U,J,Y;n.disabled=!0,this.responseText="⌛",this.responseMessage="",this.requestUpdate();const Z=performance.now();_=await fetch(N,{signal:w});const P=performance.now();F=_.clone(),n.disabled=!1,this.responseMessage=V`${_.statusText?`${_.statusText}:${_.status}`:_.status} <div style="color:var(--light-fg)"> Took ${Math.round(P-Z)} milliseconds </div>`,this.responseUrl=_.url;const se={};_.headers.forEach(((he,ge)=>{se[ge]=he,this.responseHeaders=`${this.responseHeaders}${ge}: ${he}
|
||
`}));let ae=_.headers.get("content-type");if((await _.clone().text()).length===0)this.responseText="";else if(ae){if(ae=ae.split(";")[0].trim(),ae==="application/x-ndjson")this.responseText=await _.text();else if(ae.includes("json"))if(/charset=[^"']+/.test(ae)){const he=ae.split("charset=")[1],ge=await _.arrayBuffer();try{Y=new TextDecoder(he).decode(ge)}catch{Y=new TextDecoder("utf-8").decode(ge)}try{J=JSON.parse(Y),this.responseText=JSON.stringify(J,null,2)}catch{this.responseText=Y}}else J=await _.json(),this.responseText=JSON.stringify(J,null,2);else/^font\/|tar$|zip$|7z$|rtf$|msword$|excel$|\/pdf$|\/octet-stream$|^application\/vnd\./.test(ae)?(this.responseIsBlob=!0,this.responseBlobType="download"):/^image/.test(ae)?(this.responseIsBlob=!0,this.responseBlobType="image"):/^audio|^image|^video/.test(ae)?(this.responseIsBlob=!0,this.responseBlobType="view"):(Y=await _.text(),ae.includes("xml")?this.responseText=FX()(Y,{textNodesOnSameLine:!0,indentor:" "}):this.responseText=Y);if(this.responseIsBlob){const he=_.headers.get("content-disposition")||"";let ge="filename";if(he){const pe=he.match(/filename\*=\s*UTF-8''([^;]+)/);if(pe)ge=decodeURIComponent(pe[1]);else{const Te=he.match(/filename="?([^"]+)"?/);Te&&(ge=Te[1])}}this.respContentDisposition=ge,U=await _.blob(),this.responseBlobUrl=URL.createObjectURL(U)}}else Y=await _.text(),this.responseText=Y;this.dispatchEvent(new CustomEvent("after-try",{bubbles:!0,composed:!0,detail:{request:N,response:F,responseHeaders:se,responseBody:J||Y||U,responseStatus:F.ok}}))}catch(U){n.disabled=!1,U.name==="AbortError"?(this.dispatchEvent(new CustomEvent("request-aborted",{bubbles:!0,composed:!0,detail:{err:U,request:N}})),this.responseMessage="Request Aborted",this.responseText="Request Aborted"):(this.dispatchEvent(new CustomEvent("after-try",{bubbles:!0,composed:!0,detail:{err:U,request:N}})),this.responseMessage=`${U.message} (CORS or Network Issue)`)}this.requestUpdate()}liveCURLSyntaxUpdate(t){this.applyCURLSyntax(t),this.requestUpdate()}onGenerateCURLClick(t){const n=this.getRequestPanel(t);this.applyCURLSyntax(n)}getRequestPanel(t){return t.target.closest(".request-panel")}applyCURLSyntax(t){const n=this.buildFetchURL(t),i=this.buildFetchBodyOptions(t),l=this.buildFetchHeaders(t);this.curlSyntax=this.generateCURLSyntax(n,l,i,t)}generateCURLSyntax(t,n,i,l){let h,v="",x="",w="",C="";const $=l.querySelector(".request-body-container");if(t.startsWith("http")===!1?h=new URL(t,window.location.href).href:h=t,v=`curl -X ${this.method.toUpperCase()} "${h}" \\
|
||
`,n.forEach(((N,_)=>{let F=N.split(",");F=F.map((U=>U.trim())).filter(((U,J)=>F.indexOf(U)===J)),n.set(_,F.join(", "))})),x=Array.from(n).map((([N,_])=>` -H '${N}: ${_}'`)).join(`\\
|
||
`),x&&(x=`${x} \\
|
||
`),i.body instanceof URLSearchParams)w=` -d ${i.body.toString()} \\
|
||
`;else if(i.body instanceof File)w=` --data-binary @${i.body.name} \\
|
||
`;else if(i.body instanceof FormData)C=Array.from(i.body).reduce(((N,[_,F])=>{if(F instanceof File)return[...N,` -F "${_}=@${F.name}"`];const U=F.match(/([^,],)/gm);if(U){const J=U.map((Y=>`-F "${_}[]=${Y}"`));return[...N,...J]}return[...N,` -F "${_}=${F}"`]}),[]).join(`\\
|
||
`);else if($&&$.dataset.selectedRequestBodyType){const N=$.dataset.selectedRequestBodyType,_=l.querySelector(".request-body-param-user-input");if(_!=null&&_.value){if(i.body=_.value,N.includes("json"))try{w=` -d '${JSON.stringify(JSON.parse(_.value))}' \\
|
||
`}catch{}w||(w=` -d '${_.value.replace(/'/g,`'"'"'`)}' \\
|
||
`)}}return`${v}${x}${w}${C}`}onAddRemoveFileInput(t,n,i){if(t.target.tagName.toLowerCase()!=="button")return;if(t.target.classList.contains("file-input-remove-btn"))return void t.target.closest(".input-set").remove();const l=t.target.closest(".file-input-container"),h=document.createElement("div");h.setAttribute("class","input-set row");const v=document.createElement("input");v.type="file",v.style="width:200px; margin-top:2px;",v.setAttribute("data-pname",n),v.setAttribute("data-ptype",i.includes("form-urlencode")?"form-urlencode":"form-data"),v.setAttribute("data-array","false"),v.setAttribute("data-file-array","true");const x=document.createElement("button");x.setAttribute("class","file-input-remove-btn"),x.innerHTML="✕",h.appendChild(v),h.appendChild(x),l.insertBefore(h,t.target)}clearResponseData(){this.responseUrl="",this.responseHeaders="",this.responseText="",this.responseStatus="success",this.responseMessage="",this.responseIsBlob=!1,this.responseBlobType="",this.respContentDisposition="",this.responseBlobUrl&&(URL.revokeObjectURL(this.responseBlobUrl),this.responseBlobUrl="")}disconnectedCallback(){this.curlSyntax="",this.responseBlobUrl&&(URL.revokeObjectURL(this.responseBlobUrl),this.responseBlobUrl=""),super.disconnectedCallback()}}),customElements.define("schema-table",class extends Ht{static get properties(){return{schemaExpandLevel:{type:Number,attribute:"schema-expand-level"},schemaDescriptionExpanded:{type:String,attribute:"schema-description-expanded"},allowSchemaDescriptionExpandToggle:{type:String,attribute:"allow-schema-description-expand-toggle"},schemaHideReadOnly:{type:String,attribute:"schema-hide-read-only"},schemaHideWriteOnly:{type:String,attribute:"schema-hide-write-only"},data:{type:Object}}}connectedCallback(){super.connectedCallback(),(!this.schemaExpandLevel||this.schemaExpandLevel<1)&&(this.schemaExpandLevel=99999),this.schemaDescriptionExpanded&&"true false".includes(this.schemaDescriptionExpanded)||(this.schemaDescriptionExpanded="false"),this.schemaHideReadOnly&&"true false".includes(this.schemaHideReadOnly)||(this.schemaHideReadOnly="true"),this.schemaHideWriteOnly&&"true false".includes(this.schemaHideWriteOnly)||(this.schemaHideWriteOnly="true")}static get styles(){return[Si,rM,M`
|
||
.table {
|
||
font-size: var(--font-size-small);
|
||
text-align: left;
|
||
line-height: calc(var(--font-size-small) + 6px);
|
||
}
|
||
.table .tr {
|
||
width: calc(100% - 5px);
|
||
padding: 0 0 0 5px;
|
||
border-bottom: 1px dotted var(--light-border-color);
|
||
}
|
||
.table .td {
|
||
padding: 4px 0;
|
||
}
|
||
.table .key {
|
||
width: 240px;
|
||
}
|
||
.key .key-label {
|
||
font-size: var(--font-size-mono);
|
||
}
|
||
.key.deprecated .key-label {
|
||
color: var(--red);
|
||
}
|
||
|
||
.table .key-type {
|
||
white-space: normal;
|
||
width: 150px;
|
||
}
|
||
.collapsed-all-descr .tr:not(.expanded-descr) {
|
||
max-height: calc(var(--font-size-small) + var(--font-size-small));
|
||
}
|
||
|
||
.obj-toggle {
|
||
padding: 0 2px;
|
||
border-radius:2px;
|
||
border: 1px solid transparent;
|
||
display: inline-block;
|
||
margin-left: -16px;
|
||
color:var(--primary-color);
|
||
cursor:pointer;
|
||
font-size: calc(var(--font-size-small) + 4px);
|
||
font-family: var(--font-mono);
|
||
background-clip: border-box;
|
||
}
|
||
.obj-toggle:hover {
|
||
border-color: var(--primary-color);
|
||
}
|
||
.tr.expanded + .object-body {
|
||
display:block;
|
||
}
|
||
.tr.collapsed + .object-body {
|
||
display:none;
|
||
}`,fc]}render(){var t,n,i;return V`
|
||
<div class="table ${this.schemaDescriptionExpanded==="true"?"expanded-all-descr":"collapsed-all-descr"}" @click="${l=>this.handleAllEvents(l)}">
|
||
<div class='toolbar'>
|
||
<div class="toolbar-item schema-root-type ${((t=this.data)===null||t===void 0?void 0:t["::type"])||""} "> ${((n=this.data)===null||n===void 0?void 0:n["::type"])||""} </div>
|
||
${this.allowSchemaDescriptionExpandToggle==="true"?V`
|
||
<div style="flex:1"></div>
|
||
<div part="schema-multiline-toggle" class='toolbar-item schema-multiline-toggle' >
|
||
${this.schemaDescriptionExpanded==="true"?"Single line description":"Multiline description"}
|
||
</div>
|
||
`:""}
|
||
</div>
|
||
<span part="schema-description" class='m-markdown'> ${Mn(dt(((i=this.data)===null||i===void 0?void 0:i["::description"])||""))} </span>
|
||
<div style = 'border:1px solid var(--light-border-color)'>
|
||
<div style='display:flex; background-color: var(--bg2); padding:8px 4px; border-bottom:1px solid var(--light-border-color);'>
|
||
<div class='key' style='font-family:var(--font-regular); font-weight:bold; color:var(--fg);'> Field </div>
|
||
<div class='key-type' style='font-family:var(--font-regular); font-weight:bold; color:var(--fg);'> Type </div>
|
||
<div class='key-descr' style='font-family:var(--font-regular); font-weight:bold; color:var(--fg);'> Description </div>
|
||
</div>
|
||
${this.data?V`
|
||
${this.generateTree(this.data["::type"]==="array"?this.data["::props"]:this.data,this.data["::type"],this.data["::array-type"])}`:""}
|
||
</div>
|
||
</div>
|
||
`}generateTree(t,n="object",i="",l="",h="",v=0,x=0,w="",C=!1){var $,N;if(this.schemaHideReadOnly==="true"&&(n==="array"&&w==="readonly"||t&&t["::readwrite"]==="readonly")||this.schemaHideWriteOnly==="true"&&(n==="array"&&w==="writeonly"||t&&t["::readwrite"]==="writeonly"))return;if(!t)return V`<div class="null" style="display:inline;">
|
||
<span style='margin-left:${16*(v+1)}px'> </span>
|
||
<span class="key-label xxx-of-key"> ${l.replace("::OPTION~","")}</span>
|
||
${n==="array"?V`<span class='mono-font'> [ ] </span>`:n==="object"?V`<span class='mono-font'> { } </span>`:V`<span class='mono-font'> schema undefined </span>`}
|
||
</div>`;const _=($=t["::type"])!==null&&$!==void 0&&$.startsWith("xxx-of")?v:v+1,F=n==="xxx-of-option"||t["::type"]==="xxx-of-option"||l.startsWith("::OPTION")?x:x+1,U=16*F;if(Object.keys(t).length===0)return V`<span class="td key object" style='padding-left:${U}px'>${l}</span>`;let J="",Y="",Z=!1;if(l.startsWith("::ONE~OF")||l.startsWith("::ANY~OF"))J=l.replace("::","").replace("~"," "),Z=!0;else if(l.startsWith("::OPTION")){const Qe=l.split("~");J=Qe[1],Y=Qe[2]}else J=l;let P="";if(t["::type"]==="object"?P=n==="array"?"array of object":t["::dataTypeLabel"]||t["::type"]:t["::type"]==="array"&&(P=n==="array"?"array of array "+(i!=="object"?`of ${i}`:""):t["::dataTypeLabel"]||t["::type"]),typeof t=="object")return V`
|
||
${_>=0&&l?V`
|
||
<div class='tr ${_<=this.schemaExpandLevel?"expanded":"collapsed"} ${t["::type"]}' data-obj='${J}' title="${C||t["::deprecated"]?"Deprecated":""}">
|
||
<div class="td key ${C||t["::deprecated"]?"deprecated":""}" style='padding-left:${U}px'>
|
||
${J||Y?V`
|
||
<span class='obj-toggle ${_<this.schemaExpandLevel?"expanded":"collapsed"}' data-obj='${J}'>
|
||
${v<this.schemaExpandLevel?"-":"+"}
|
||
</span>`:""}
|
||
${t["::type"]==="xxx-of-option"||t["::type"]==="xxx-of-array"||l.startsWith("::OPTION")?V`<span class="xxx-of-key" style="margin-left:-6px">${J}</span><span class="${Z?"xxx-of-key":"xxx-of-descr"}">${Y}</span>`:J.endsWith("*")?V`<span class="key-label" style="display:inline-block; margin-left:-6px;">${C||t["::deprecated"]?V`<svg viewBox="0 0 10 10" width="10" height="10" style="stroke:var(--red); margin-right:-6px"><path d="M2 2L8 8M2 8L8 2"/></svg>`:""} ${J.substring(0,J.length-1)}</span><span style='color:var(--red);'>*</span>`:V`<span class="key-label" style="display:inline-block; margin-left:-6px;">${C||t["::deprecated"]?V`<svg viewBox="0 0 10 10" width="10" height="10" style="stroke:var(--red); margin-right:-6px"><path d="M2 2L8 8M2 8L8 2"/></svg>`:""} ${J==="::props"?"":J}</span>`}
|
||
${t["::type"]==="xxx-of"&&n==="array"?V`<span style="color:var(--primary-color)">ARRAY</span>`:""}
|
||
</div>
|
||
<div class='td key-type' title="${t["::readwrite"]==="readonly"?"Read-Only":t["::readwrite"]==="writeonly"?"Write-Only":""}">
|
||
${(t["::type"]||"").includes("xxx-of")?"":P}
|
||
${t["::readwrite"]==="readonly"?" 🆁":t["::readwrite"]==="writeonly"?" 🆆":""}
|
||
</div>
|
||
<div class='td key-descr m-markdown-small' style='line-height:1.7'>${Mn(dt(h||""))}</div>
|
||
</div>`:V`
|
||
${t["::type"]==="array"&&n==="array"?V`
|
||
<div class='tr'>
|
||
<div class='td key'></div>
|
||
<div class='td key-type'>
|
||
${i&&i!=="object"?`${n} of ${i}`:n}
|
||
</div>
|
||
<div class='td key-descr'></div>
|
||
</div>`:""}`}
|
||
<div class='object-body'>
|
||
${Array.isArray(t)&&t[0]?V`${this.generateTree(t[0],"xxx-of-option","","::ARRAY~OF","",_,F,"")}`:V`
|
||
${Object.keys(t).map((Qe=>{var ot;return V`
|
||
${["::title","::description","::type","::props","::deprecated","::array-type","::readwrite","::dataTypeLabel","::nullable"].includes(Qe)?t[Qe]["::type"]==="array"||t[Qe]["::type"]==="object"?V`${this.generateTree(t[Qe]["::type"]==="array"?t[Qe]["::props"]:t[Qe],t[Qe]["::type"],t[Qe]["::array-type"]||"",Qe,t[Qe]["::description"],_,F,t[Qe]["::readwrite"]?t[Qe]["::readwrite"]:"",C||t[Qe]["::deprecated"])}`:"":V`${this.generateTree(t[Qe]["::type"]==="array"?t[Qe]["::props"]:t[Qe],t[Qe]["::type"],t[Qe]["::array-type"]||"",Qe,((ot=t[Qe])===null||ot===void 0?void 0:ot["::description"])||"",_,F,t[Qe]["::readwrite"]?t[Qe]["::readwrite"]:"",C||t[Qe]["::deprecated"])}`}
|
||
`}))}
|
||
`}
|
||
</div>
|
||
`;const[se,ae,he,ge,pe,Te,Ae,qe,Se]=t.split("~|~");if(ae==="🆁"&&this.schemaHideReadOnly==="true"||ae==="🆆"&&this.schemaHideWriteOnly==="true")return;const me=se.replace(/┃.*/g,"").replace(/[^a-zA-Z0-9+]/g,"").substring(0,4).toLowerCase(),Me=he||ge||pe||Te?'<span class="descr-expand-toggle">➔</span>':"";let Ie="";return Ie=n==="array"?V`
|
||
<div class='td key-type ${me}' title="${w==="readonly"?"Read-Only":ae==="writeonly"?"Write-Only":""}">
|
||
[${se}] ${w==="readonly"?"🆁":w==="writeonly"?"🆆":""}
|
||
</div>`:V`
|
||
<div class='td key-type ${me}' title="${ae==="🆁"?"Read-Only":ae==="🆆"?"Write-Only":""}">
|
||
${se} ${ae}
|
||
</div>`,V`
|
||
<div class = "tr primitive" title="${C||Se?"Deprecated":""}">
|
||
<div class="td key ${C||Se?"deprecated":""}" style='padding-left:${U}px'>
|
||
${C||Se?V`<svg viewBox="0 0 10 10" width="10" height="10" style="stroke:var(--red); margin-right:-6px"><path d="M2 2L8 8M2 8L8 2"/></svg>`:""}
|
||
${(N=J)!==null&&N!==void 0&&N.endsWith("*")?V`
|
||
<span class="key-label">${J.substring(0,J.length-1)}</span>
|
||
<span style='color:var(--red);'>*</span>`:l.startsWith("::OPTION")?V`<span class='xxx-of-key'>${J}</span><span class="xxx-of-descr">${Y}</span>`:V`${J?V`<span class="key-label"> ${J}</span>`:V`<span class="xxx-of-descr">${qe}</span>`}`}
|
||
</div>
|
||
${Ie}
|
||
<div class='td key-descr' style='font-size: var(--font-size-small)'>
|
||
${V`<span class="m-markdown-small">
|
||
${Mn(dt(n==="array"?`${Me} ${h}`:qe?`${Me} <b>${qe}:</b> ${Ae}`:`${Me} ${Ae}`))}
|
||
</span>`}
|
||
${he?V`<div class='' style='display:inline-block; line-break:anywhere; margin-right:8px;'> <span class='bold-text'>Constraints: </span> ${he}</div>`:""}
|
||
${ge?V`<div style='display:inline-block; line-break:anywhere; margin-right:8px;'> <span class='bold-text'>Default: </span>${ge}</div>`:""}
|
||
${pe?V`<div style='display:inline-block; line-break:anywhere; margin-right:8px;'> <span class='bold-text'>${se==="const"?"Value":"Allowed"}: </span>${pe}</div>`:""}
|
||
${Te?V`<div style='display:inline-block; line-break:anywhere; margin-right:8px;'> <span class='bold-text'>Pattern: </span>${Te}</div>`:""}
|
||
</div>
|
||
</div>
|
||
`}handleAllEvents(t){if(t.target.classList.contains("obj-toggle"))this.toggleObjectExpand(t);else if(t.target.classList.contains("schema-multiline-toggle"))this.schemaDescriptionExpanded=this.schemaDescriptionExpanded==="true"?"false":"true";else if(t.target.classList.contains("descr-expand-toggle")){const n=t.target.closest(".tr");n&&(n.classList.toggle("expanded-descr"),n.style.maxHeight=n.scrollHeight)}}toggleObjectExpand(t){const n=t.target.closest(".tr");n.classList.contains("expanded")?(n.classList.add("collapsed"),n.classList.remove("expanded"),t.target.innerText="+"):(n.classList.remove("collapsed"),n.classList.add("expanded"),t.target.innerText="-")}});function KX(t){const n=new dt.Renderer;return n.heading=(i,l,h,v)=>`<h${l} class="observe-me" id="${t}--${v.slug(h)}">${i}</h${l}>`,n}function VX(t){const n=t.target.closest(".tag-container").querySelector(".tag-description"),i=t.target.closest(".tag-container").querySelector(".tag-icon");n&&i&&(n.classList.contains("expanded")?(n.style.maxHeight=0,n.classList.replace("expanded","collapsed"),i.classList.replace("expanded","collapsed")):(n.style.maxHeight=`${n.scrollHeight}px`,n.classList.replace("collapsed","expanded"),i.classList.replace("collapsed","expanded")))}function ER(t,n="",i=""){var l,h,v,x,w,C,$,N,_;const F=new Set;for(const se in t.responses)for(const ae in(U=t.responses[se])===null||U===void 0?void 0:U.content){var U;F.add(ae.trim())}const J=[...F].join(", "),Y=this.resolvedSpec.securitySchemes.filter((se=>{var ae;return se.finalKeyValue&&((ae=t.security)===null||ae===void 0?void 0:ae.some((he=>se.securitySchemeId in he)))}))||[],Z=this.resolvedSpec.securitySchemes.find((se=>se.securitySchemeId===po&&se.value!=="-"));Z&&Y.push(Z);const P=t.xCodeSamples?ZP.call(this,t.xCodeSamples):"";return V`
|
||
${this.renderStyle==="read"?V`<div class='divider' part="operation-divider"></div>`:""}
|
||
<div class='expanded-endpoint-body observe-me ${t.method} ${t.deprecated?"deprecated":""} ' part="section-operation ${t.elementId}" id='${t.elementId}'>
|
||
${this.renderStyle==="focused"&&n!=="General ⦂"?V`
|
||
<div class="tag-container" part="section-operation-tag">
|
||
<span class="upper" style="font-weight:bold; font-size:18px;"> ${n} </span>
|
||
${i?V`
|
||
<svg class="tag-icon collapsed" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" fill="none" style="stroke:var(--primary-color); vertical-align:top; cursor:pointer"
|
||
@click="${se=>{VX.call(this,se)}}"
|
||
>
|
||
<path d="M12 20h-6a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2h8"></path><path d="M18 4v17"></path><path d="M15 18l3 3l3 -3"></path>
|
||
</svg>
|
||
<div class="tag-description collapsed" style="max-height:0px; overflow:hidden; margin-top:16px; border:1px solid var(--border-color)">
|
||
<div class="m-markdown" style="padding:8px"> ${Mn(dt(i))}</div>
|
||
</div>`:""}
|
||
</div>
|
||
`:""}
|
||
${t.deprecated?V`<div class="bold-text red-text"> DEPRECATED </div>`:""}
|
||
${V`
|
||
${t.xBadges&&((l=t.xBadges)===null||l===void 0?void 0:l.length)>0?V`
|
||
<div style="display:flex; flex-wrap:wrap; margin-bottom: -24px; font-size: var(--font-size-small);">
|
||
${t.xBadges.map((se=>se.color==="none"?"":V`<span style="margin:1px; margin-right:5px; padding:1px 8px; font-weight:bold; border-radius:12px; background-color: var(--light-${se.color}, var(--input-bg)); color:var(--${se.color}); border:1px solid var(--${se.color})">${se.label}</span>`))}
|
||
</div>
|
||
`:""}
|
||
<h2 part="section-operation-summary"> ${t.shortSummary||`${t.method.toUpperCase()} ${t.path}`}</h2>
|
||
${t.isWebhook?V`<span part="section-operation-webhook" style="color:var(--primary-color); font-weight:bold; font-size: var(--font-size-regular);"> WEBHOOK </span>`:V`
|
||
<div part="section-operation-webhook-method" class="mono-font regular-font-size" style="text-align:left; direction:ltr; padding: 8px 0; color:var(--fg3)">
|
||
<span part="label-operation-method" class="regular-font upper method-fg bold-text ${t.method}">${t.method}</span>
|
||
<span part="label-operation-path">${t.path}</span>
|
||
</div>
|
||
`}
|
||
<slot name="${t.elementId}"></slot>`}
|
||
${t.description?V`<div class="m-markdown"> ${Mn(dt(t.description))}</div>`:""}
|
||
${YP.call(this,t.security)}
|
||
${(h=t.externalDocs)!==null&&h!==void 0&&h.url||(v=t.externalDocs)!==null&&v!==void 0&&v.description?V`<div style="background-color:var(--bg3); padding:2px 8px 8px 8px; margin:8px 0; border-radius:var(--border-radius)">
|
||
<div class="m-markdown"> ${Mn(dt(((x=t.externalDocs)===null||x===void 0?void 0:x.description)||""))} </div>
|
||
${(w=t.externalDocs)!==null&&w!==void 0&&w.url?V`<a style="font-family:var(--font-mono); font-size:var(--font-size-small)" href="${(C=t.externalDocs)===null||C===void 0?void 0:C.url}" target="_blank">
|
||
${($=t.externalDocs)===null||$===void 0?void 0:$.url} <div style="transform: rotate(270deg) scale(1.5); display: inline-block; margin-left:5px">⇲</div>
|
||
</a>`:""}
|
||
</div>`:""}
|
||
${P}
|
||
<div class='expanded-req-resp-container'>
|
||
<api-request
|
||
class = "${this.renderStyle}-mode"
|
||
style = "width:100%;"
|
||
webhook = "${t.isWebhook}"
|
||
method = "${t.method}"
|
||
path = "${t.path}"
|
||
.security = "${t.security}"
|
||
.parameters = "${t.parameters}"
|
||
.request_body = "${t.requestBody}"
|
||
.api_keys = "${Y}"
|
||
.servers = "${t.servers}"
|
||
server-url = "${((N=t.servers)===null||N===void 0||(N=N[0])===null||N===void 0?void 0:N.url)||((_=this.selectedServer)===null||_===void 0?void 0:_.computedUrl)}"
|
||
fill-request-fields-with-example = "${this.fillRequestFieldsWithExample}"
|
||
allow-try = "${this.allowTry}"
|
||
show-curl-before-try = "${this.showCurlBeforeTry}"
|
||
accept = "${J}"
|
||
render-style="${this.renderStyle}"
|
||
schema-style = "${this.schemaStyle}"
|
||
active-schema-tab = "${this.defaultSchemaTab}"
|
||
schema-expand-level = "${this.schemaExpandLevel}"
|
||
schema-description-expanded = "${this.schemaDescriptionExpanded}"
|
||
allow-schema-description-expand-toggle = "${this.allowSchemaDescriptionExpandToggle}"
|
||
schema-hide-read-only = "${this.schemaHideReadOnly==="never"||t.isWebhook?"false":"true"}"
|
||
schema-hide-write-only = "${this.schemaHideWriteOnly==="never"?"false":t.isWebhook?"true":"false"}"
|
||
fetch-credentials = "${this.fetchCredentials}"
|
||
exportparts = "wrap-request-btn:wrap-request-btn, btn:btn, btn-fill:btn-fill, btn-outline:btn-outline, btn-try:btn-try, btn-clear:btn-clear, btn-clear-resp:btn-clear-resp,
|
||
tab-panel:tab-panel, tab-btn:tab-btn, tab-btn-row:tab-btn-row, tab-coontent:tab-content,
|
||
file-input:file-input, textbox:textbox, textbox-param:textbox-param, textarea:textarea, textarea-param:textarea-param,
|
||
anchor:anchor, anchor-param-example:anchor-param-example, schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"
|
||
> </api-request>
|
||
|
||
${t.callbacks?WP.call(this,t.callbacks):""}
|
||
|
||
<api-response
|
||
class = "${this.renderStyle}-mode"
|
||
style = "width:100%;"
|
||
webhook = "${t.isWebhook}"
|
||
.responses = "${t.responses}"
|
||
render-style = "${this.renderStyle}"
|
||
schema-style = "${this.schemaStyle}"
|
||
active-schema-tab = "${this.defaultSchemaTab}"
|
||
schema-expand-level = "${this.schemaExpandLevel}"
|
||
schema-description-expanded = "${this.schemaDescriptionExpanded}"
|
||
allow-schema-description-expand-toggle = "${this.allowSchemaDescriptionExpandToggle}"
|
||
schema-hide-read-only = "${this.schemaHideReadOnly==="never"?"false":t.isWebhook?"true":"false"}"
|
||
schema-hide-write-only = "${this.schemaHideWriteOnly==="never"||t.isWebhook?"false":"true"}"
|
||
selected-status = "${Object.keys(t.responses||{})[0]||""}"
|
||
exportparts = "btn:btn, btn-response-status:btn-response-status, btn-selected-response-status:btn-selected-response-status, btn-fill:btn-fill, btn-copy:btn-copy,
|
||
tab-panel:tab-panel, tab-btn:tab-btn, tab-btn-row:tab-btn-row, tab-coontent:tab-content,
|
||
schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"
|
||
> </api-response>
|
||
</div>
|
||
</div>
|
||
`}function HX(){return this.resolvedSpec?V`
|
||
${this.resolvedSpec.tags.map((t=>V`
|
||
<section id="${t.elementId}" part="section-tag" class="regular-font section-gap--read-mode observe-me" style="border-top:1px solid var(--primary-color);">
|
||
<div class="title tag" part="section-tag-title label-tag-title">${t.displayName||t.name}</div>
|
||
<slot name="${t.elementId}"></slot>
|
||
<div class="regular-font-size">
|
||
${Mn(`
|
||
<div class="m-markdown regular-font">
|
||
${dt(t.description||"",this.infoDescriptionHeadingsInNavBar==="true"?{renderer:KX(t.elementId)}:void 0)}
|
||
</div>`)}
|
||
</div>
|
||
</section>
|
||
<section class="regular-font section-gap--read-mode" part="section-operations-in-tag">
|
||
${t.paths.map((n=>ER.call(this,n)))}
|
||
</section>
|
||
`))}
|
||
`:""}function GX(t){return V`
|
||
<div class='divider'></div>
|
||
<div class='expanded-endpoint-body observe-me ${t.name}' id='cmp--${t.id}' >
|
||
<div style="font-weight:bold"> ${t.name} <span style="color:var(--light-fg); font-size:var(--font-size-small); font-weight:400;"> Schema </span></div>
|
||
${this.schemaStyle==="table"?V`
|
||
<schema-table
|
||
.data = '${ts(t.component,{})}'
|
||
schema-expand-level = "${this.schemaExpandLevel}"
|
||
schema-description-expanded = "${this.schemaDescriptionExpanded}"
|
||
allow-schema-description-expand-toggle = "${this.allowSchemaDescriptionExpandToggle}"
|
||
schema-hide-read-only = "false"
|
||
schema-hide-write-only = "${this.schemaHideWriteOnly}"
|
||
exportparts = "schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"
|
||
> </schema-table>`:V`
|
||
<schema-tree
|
||
.data = '${ts(t.component,{})}'
|
||
schema-expand-level = "${this.schemaExpandLevel}"
|
||
schema-description-expanded = "${this.schemaDescriptionExpanded}"
|
||
allow-schema-description-expand-toggle = "${this.allowSchemaDescriptionExpandToggle}"
|
||
schema-hide-read-only = "false"
|
||
schema-hide-write-only = "${this.schemaHideWriteOnly}"
|
||
exportparts = "schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"
|
||
> </schema-tree>`}
|
||
</div>`}function XX(t,n){return t.id.indexOf("schemas-")!==-1?GX.call(this,t):V`
|
||
<div class='divider'></div>
|
||
<div class='expanded-endpoint-body observe-me ${t.name}' id='cmp--${t.id}' >
|
||
${V`
|
||
<div style="font-weight:bold"> ${t.name} <span style="color:var(--light-fg); font-size:var(--font-size-small); font-weight:400"> ${n} </span> </div>
|
||
${t.component?V`
|
||
<div class='mono-font regular-font-size' style='padding: 8px 0; color:var(--fg2)'>
|
||
<json-tree class="border tree" render-style='${this.renderStyle}' .data="${t.component}"> </json-tree>
|
||
</div>`:""}
|
||
`}
|
||
</div>
|
||
`}function YX(){return this.resolvedSpec?V`
|
||
${this.resolvedSpec.components.map((t=>V`
|
||
<div id="cmp--${t.name.toLowerCase()}" class='regular-font section-gap--read-mode observe-me' style="border-top:1px solid var(--primary-color);">
|
||
<div class="title tag">${t.name}</div>
|
||
<div class="regular-font-size">
|
||
${Mn(`<div class='m-markdown regular-font'>${dt(t.description?t.description:"")}</div>`)}
|
||
</div>
|
||
</div>
|
||
<div class='regular-font section-gap--read-mode'>
|
||
${t.subComponents.filter((n=>n.expanded!==!1)).map((n=>XX.call(this,n,t.name)))}
|
||
</div>
|
||
`))}
|
||
`:""}function ZX(){const t=new dt.Renderer;return t.heading=(n,i,l,h)=>`<h${i} class="observe-me" id="overview--${h.slug(l)}">${n}</h${i}>`,t}function PE(){var t,n,i,l;return V`
|
||
<section id="overview" part="section-overview"
|
||
class="observe-me ${this.renderStyle==="view"?"section-gap":"section-gap--read-mode"}">
|
||
${(t=this.resolvedSpec)!==null&&t!==void 0&&t.info?V`
|
||
<div id="api-title" part="section-overview-title" style="font-size:32px">
|
||
${this.resolvedSpec.info.title}
|
||
${this.resolvedSpec.info.version?V`
|
||
<span style = 'font-size:var(--font-size-small);font-weight:bold'>
|
||
${this.resolvedSpec.info.version}
|
||
</span>`:""}
|
||
</div>
|
||
<div id="api-info" style="font-size:calc(var(--font-size-regular) - 1px); margin-top:8px;">
|
||
${(n=this.resolvedSpec.info.contact)!==null&&n!==void 0&&n.email?V`<span>${this.resolvedSpec.info.contact.name||"Email"}:
|
||
<a href="mailto:${this.resolvedSpec.info.contact.email}" part="anchor anchor-overview">${this.resolvedSpec.info.contact.email}</a>
|
||
</span>`:""}
|
||
${(i=this.resolvedSpec.info.contact)!==null&&i!==void 0&&i.url?V`<span>URL: <a href="${this.resolvedSpec.info.contact.url}" part="anchor anchor-overview">${this.resolvedSpec.info.contact.url}</a></span>`:""}
|
||
${this.resolvedSpec.info.license?V`<span>License:
|
||
${this.resolvedSpec.info.license.url?V`<a href="${this.resolvedSpec.info.license.url}" part="anchor anchor-overview">${this.resolvedSpec.info.license.name}</a>`:this.resolvedSpec.info.license.name} </span>`:""}
|
||
${this.resolvedSpec.info.termsOfService?V`<span><a href="${this.resolvedSpec.info.termsOfService}" part="anchor anchor-overview">Terms of Service</a></span>`:""}
|
||
${this.specUrl&&this.allowSpecFileDownload==="true"?V`
|
||
<div style="display:flex; margin:12px 0; gap:8px; justify-content: start;">
|
||
<button class="m-btn thin-border" style="min-width:170px" part="btn btn-outline" @click='${h=>{zp(this.specUrl,"openapi-spec")}}'>Download OpenAPI spec</button>
|
||
${(l=this.specUrl)!==null&&l!==void 0&&l.trim().toLowerCase().endsWith("json")?V`<button class="m-btn thin-border" style="width:200px" part="btn btn-outline" @click='${h=>{Fg(this.specUrl)}}'>View OpenAPI spec (New Tab)</button>`:""}
|
||
</div>`:""}
|
||
</div>
|
||
<slot name="overview"></slot>
|
||
<div id="api-description">
|
||
${this.resolvedSpec.info.description?V`${Mn(`
|
||
<div class="m-markdown regular-font">
|
||
${dt(this.resolvedSpec.info.description,this.infoDescriptionHeadingsInNavBar==="true"?{renderer:ZX()}:void 0)}
|
||
</div>`)}`:""}
|
||
</div>
|
||
`:""}
|
||
</section>
|
||
`}function jR(t){var n;const i=(n=this.resolvedSpec)===null||n===void 0?void 0:n.servers.find((l=>l.url===t));return!!i&&(this.selectedServer=i,this.requestUpdate(),this.dispatchEvent(new CustomEvent("api-server-change",{bubbles:!0,composed:!0,detail:{selectedServer:i}})),!0)}function sM(t,n){const i=[...t.currentTarget.closest("table").querySelectorAll("input, select")];let l=n.url;i.forEach((h=>{const v=new RegExp(`{${h.dataset.var}}`,"g");l=l.replace(v,h.value)})),n.computedUrl=l,this.requestUpdate()}function WX(){return this.selectedServer&&this.selectedServer.variables?V`
|
||
<div class="table-title">SERVER VARIABLES</div>
|
||
<table class='m-table' role='presentation'>
|
||
${Object.entries(this.selectedServer.variables).map((t=>V`
|
||
<tr>
|
||
<td style="vertical-align: middle;" >${t[0]}</td>
|
||
<td>
|
||
${t[1].enum?V`
|
||
<select
|
||
data-var = "${t[0]}"
|
||
@input = ${n=>{sM.call(this,n,this.selectedServer)}}
|
||
>
|
||
${Object.entries(t[1].enum).map((n=>t[1].default===n[1]?V`
|
||
<option
|
||
selected
|
||
label = ${n[1]}
|
||
value = ${n[1]}
|
||
/>`:V`
|
||
<option
|
||
label = ${n[1]}
|
||
value = ${n[1]}
|
||
/>`))}
|
||
</select>`:V`
|
||
<input
|
||
type = "text"
|
||
part="textbox textbox-server-var"
|
||
spellcheck = "false"
|
||
data-var = "${t[0]}"
|
||
value = "${t[1].default}"
|
||
@input = ${n=>{sM.call(this,n,this.selectedServer)}}
|
||
/>`}
|
||
</td>
|
||
</tr>
|
||
${t[1].description?V`<tr><td colspan="2" style="border:none"><span class="m-markdown-small"> ${Mn(dt(t[1].description))} </span></td></tr>`:""}
|
||
`))}
|
||
</table>
|
||
`:""}function iM(){var t,n,i;return!this.resolvedSpec||this.resolvedSpec.specLoadError?"":V`
|
||
<section id = 'servers' part="section-servers" style="text-align:left; direction:ltr; margin-top:24px; margin-bottom:24px;" class='regular-font observe-me ${"read focused".includes(this.renderStyle)?"section-gap--read-mode":"section-gap"}'>
|
||
<div part = "section-servers-title" class = "sub-title">API SERVER</div>
|
||
<div class = 'mono-font' style='margin: 12px 0; font-size:calc(var(--font-size-small) + 1px);'>
|
||
${this.resolvedSpec.servers&&((t=this.resolvedSpec.servers)===null||t===void 0?void 0:t.length)!==0?V`
|
||
${(n=this.resolvedSpec)===null||n===void 0?void 0:n.servers.map(((l,h)=>V`
|
||
<input type = 'radio'
|
||
name = 'api_server'
|
||
id = 'srvr-opt-${h}'
|
||
value = '${l.url}'
|
||
@change = ${()=>{jR.call(this,l.url)}}
|
||
.checked = '${this.selectedServer.url===l.url}'
|
||
style = 'margin:4px 0; cursor:pointer'
|
||
/>
|
||
<label style='cursor:pointer' for='srvr-opt-${h}'>
|
||
${l.url} ${l.description?V`- <span class='regular-font'>${l.description} </span>`:""}
|
||
</label>
|
||
<br/>
|
||
`))}
|
||
`:""}
|
||
<div class="table-title primary-text" part="label-selected-server"> SELECTED: ${((i=this.selectedServer)===null||i===void 0?void 0:i.computedUrl)||"none"}</div>
|
||
</div>
|
||
<slot name="servers"></slot>
|
||
${WX.call(this)}
|
||
</section>`}function aM(t,n="toggle"){const i=t?.closest(".nav-bar-tag-and-paths"),l=i?.querySelector(".nav-bar-paths-under-tag");if(i){const h=i.classList.contains("expanded");!h||n!=="toggle"&&n!=="collapse"?h||n!=="toggle"&&n!=="expand"||(i.classList.replace("collapsed","expanded"),l.style.maxHeight=`${l.scrollHeight}px`):(l.style.maxHeight=0,i.classList.replace("expanded","collapsed"))}}function oM(t){var n,i,l,h;if(t.type!=="click"&&(t.type!=="keyup"||t.keyCode!==13))return;const v=t.target;t.stopPropagation(),((n=v.dataset)===null||n===void 0?void 0:n.action)==="navigate"?this.scrollToEventTarget(t,!1):((i=v.dataset)===null||i===void 0?void 0:i.action)==="expand-all"||((l=v.dataset)===null||l===void 0?void 0:l.action)==="collapse-all"?(function(x,w="expand-all"){if(x.type!=="click"&&(x.type!=="keyup"||x.keyCode!==13))return;const C=[...x.target.closest(".nav-scroll").querySelectorAll(".nav-bar-tag-and-paths")];w==="expand-all"?C.forEach(($=>{const N=$.querySelector(".nav-bar-paths-under-tag");$.classList.replace("collapsed","expanded"),N.style.maxHeight=`${N?.scrollHeight}px`})):C.forEach(($=>{$.classList.replace("expanded","collapsed"),$.querySelector(".nav-bar-paths-under-tag").style.maxHeight=0}))})(t,v.dataset.action):((h=v.dataset)===null||h===void 0?void 0:h.action)==="expand-collapse-tag"&&aM(v,"toggle")}function JX(){var t,n;return!this.resolvedSpec||this.resolvedSpec.specLoadError?V`
|
||
<nav class='nav-bar' part='section-navbar'>
|
||
<slot name='nav-logo' class='logo'></slot>
|
||
</nav>
|
||
`:V`
|
||
<nav class='nav-bar ${this.renderStyle}' part='section-navbar'>
|
||
<slot name='nav-logo' class='logo'></slot>
|
||
${this.allowSearch==="false"&&this.allowAdvancedSearch==="false"?"":V`
|
||
<div style='display:flex; flex-direction:row; justify-content:center; align-items:stretch; padding:8px 24px 12px 24px; ${this.allowAdvancedSearch==="false"?"border-bottom: 1px solid var(--nav-hover-bg-color)":""}' part='section-navbar-search'>
|
||
${this.allowSearch==="false"?"":V`
|
||
<div style = 'display:flex; flex:1; line-height:22px;'>
|
||
<input id = 'nav-bar-search'
|
||
part = 'textbox textbox-nav-filter'
|
||
style = 'width:100%; padding-right:20px; color:var(--nav-hover-text-color); border-color:var(--nav-accent-color); background-color:var(--nav-hover-bg-color)'
|
||
type = 'text'
|
||
placeholder = 'Filter'
|
||
@change = '${this.onSearchChange}'
|
||
spellcheck = 'false'
|
||
>
|
||
<div style='margin: 6px 5px 0 -24px; font-size:var(--font-size-regular); cursor:pointer;'>↩</div>
|
||
</div>
|
||
${this.searchVal?V`
|
||
<button @click = '${this.onClearSearch}' class='m-btn thin-border' style='margin-left:5px; color:var(--nav-text-color); width:75px; padding:6px 8px;' part='btn btn-outline btn-clear-filter'>
|
||
CLEAR
|
||
</button>`:""}
|
||
`}
|
||
${this.allowAdvancedSearch==="false"||this.searchVal?"":V`
|
||
<button class='m-btn primary' part='btn btn-fill btn-search' style='margin-left:5px; padding:6px 8px; width:75px' @click='${this.onShowSearchModalClicked}'>
|
||
SEARCH
|
||
</button>
|
||
`}
|
||
</div>
|
||
`}
|
||
${V`<nav class='nav-scroll' tabindex='-1' part='section-navbar-scroll' @click='${i=>oM.call(this,i)}' @keyup='${i=>oM.call(this,i)}' >
|
||
${this.showInfo!=="false"&&this.resolvedSpec.info?V`
|
||
${this.infoDescriptionHeadingsInNavBar==="true"?V`
|
||
${this.resolvedSpec.infoDescriptionHeaders.length>0?V`<div class='nav-bar-info ${this.navActiveItemMarker}' id='link-overview' data-content-id='overview' data-action='navigate' tabindex='0' part='section-navbar-item section-navbar-overview'>
|
||
${((t=this.resolvedSpec.info)===null||t===void 0||(t=t.title)===null||t===void 0?void 0:t.trim())||"Overview"}
|
||
</div>`:""}
|
||
<div class='overview-headers'>
|
||
${this.resolvedSpec.infoDescriptionHeaders.map((i=>V`
|
||
<div
|
||
class='nav-bar-h${i.depth} ${this.navActiveItemMarker}'
|
||
id='link-overview--${new dt.Slugger().slug(i.text)}'
|
||
data-action='navigate'
|
||
data-content-id='overview--${new dt.Slugger().slug(i.text)}'
|
||
>
|
||
${i.text}
|
||
</div>`))}
|
||
</div>
|
||
${this.resolvedSpec.infoDescriptionHeaders.length>0?V`<hr style='border-top: 1px solid var(--nav-hover-bg-color); border-width:1px 0 0 0; margin: 15px 0 0 0'/>`:""}
|
||
`:V`<div class='nav-bar-info ${this.navActiveItemMarker}' id='link-overview' data-action='navigate' data-content-id='overview' tabindex='0'>
|
||
${((n=this.resolvedSpec.info)===null||n===void 0||(n=n.title)===null||n===void 0?void 0:n.trim())||"Overview"}
|
||
</div>`}
|
||
`:""}
|
||
|
||
${this.allowServerSelection==="false"?"":V`<div class='nav-bar-info ${this.navActiveItemMarker}' id='link-servers' data-action='navigate' data-content-id='servers' tabindex='0' part='section-navbar-item section-navbar-servers'> API Servers </div>`}
|
||
${this.allowAuthentication!=="false"&&this.resolvedSpec.securitySchemes?V`<div class='nav-bar-info ${this.navActiveItemMarker}' id='link-auth' data-action='navigate' data-content-id='auth' tabindex='0' part='section-navbar-item section-navbar-auth'> Authentication </div>`:""}
|
||
|
||
<div id='link-operations-top' class='nav-bar-section operations' data-action='navigate' data-content-id='${this.renderStyle==="focused"?"":"operations-top"}' part='section-navbar-item section-navbar-operations-top'>
|
||
<div style='font-size:16px; display:flex; margin-left:10px;'>
|
||
${this.renderStyle==="focused"?V`
|
||
<div class='nav-bar-expand-all'
|
||
data-action='expand-all'
|
||
tabindex='0'
|
||
title='Expand all'
|
||
>▸</div>
|
||
<div class='nav-bar-collapse-all'
|
||
data-action='collapse-all'
|
||
tabindex='0'
|
||
title='Collapse all'
|
||
>▸</div>`:""}
|
||
</div>
|
||
<div class='nav-bar-section-title'> OPERATIONS </div>
|
||
</div>
|
||
|
||
<!-- TAGS AND PATHS-->
|
||
${this.resolvedSpec.tags.filter((i=>i.paths.filter((l=>th(this.searchVal,l,i.name))).length)).map((i=>{var l;return V`
|
||
<div class='nav-bar-tag-and-paths ${this.renderStyle==="read"||i.expanded?"expanded":"collapsed"}' >
|
||
${i.name==="General ⦂"?V`<hr style='border:none; border-top: 1px dotted var(--nav-text-color); opacity:0.3; margin:-1px 0 0 0;'/>`:V`
|
||
<div
|
||
class='nav-bar-tag ${this.navActiveItemMarker}'
|
||
part='section-navbar-item section-navbar-tag'
|
||
id='link-${i.elementId}'
|
||
data-action='${this.renderStyle==="read"||this.onNavTagClick==="show-description"?"navigate":"expand-collapse-tag"}'
|
||
data-content-id='${(this.renderStyle==="read"?`${i.elementId}`:this.onNavTagClick==="show-description")?`${i.elementId}`:""}'
|
||
data-first-path-id='${i.firstPathId}'
|
||
tabindex='0'
|
||
>
|
||
<div style="pointer-events:none;">${i.displayName||i.name}</div>
|
||
<div class='nav-bar-tag-icon' tabindex='0' data-action='expand-collapse-tag'></div>
|
||
</div>
|
||
`}
|
||
${this.infoDescriptionHeadingsInNavBar==="true"?V`
|
||
${this.renderStyle==="focused"&&this.onNavTagClick==="expand-collapse"?"":V`
|
||
<div class='tag-headers'>
|
||
${i.headers.map((h=>V`
|
||
<div
|
||
class='nav-bar-h${h.depth} ${this.navActiveItemMarker}'
|
||
part='section-navbar-item section-navbar-h${h.depth}'
|
||
id='link-${i.elementId}--${new dt.Slugger().slug(h.text)}'
|
||
data-action='navigate'
|
||
data-content-id='${i.elementId}--${new dt.Slugger().slug(h.text)}'
|
||
tabindex='0'
|
||
> ${h.text}</div>`))}
|
||
</div>`}`:""}
|
||
<div class='nav-bar-paths-under-tag' style='max-height:${i.expanded||this.renderStyle==="read"?50*(((l=i.paths)===null||l===void 0?void 0:l.length)||1):0}px;'>
|
||
<!-- Paths in each tag (endpoints) -->
|
||
${i.paths.filter((h=>!this.searchVal||th(this.searchVal,h,i.name))).map((h=>V`
|
||
<div
|
||
class='nav-bar-path ${this.navActiveItemMarker} ${this.usePathInNavBar==="true"?"small-font":""}'
|
||
part='section-navbar-item section-navbar-path'
|
||
data-action='navigate'
|
||
data-content-id='${h.elementId}'
|
||
id='link-${h.elementId}'
|
||
tabindex='0'
|
||
>
|
||
<span style = 'display:flex; pointer-events: none; align-items:start; ${h.deprecated?"filter:opacity(0.5)":""}'>
|
||
${V`<span class='nav-method ${this.showMethodInNavBar} ${h.method}' style='pointer-events: none;'>
|
||
${this.showMethodInNavBar==="as-colored-block"?h.method.substring(0,3).toUpperCase():h.method.toUpperCase()}
|
||
</span>`}
|
||
${h.isWebhook?V`<span style='font-weight:bold; pointer-events: none; margin-right:8px; font-size: calc(var(--font-size-small) - 2px)'>WEBHOOK</span>`:""}
|
||
${this.usePathInNavBar==="true"?V`<span style='pointer-events: none;' class='mono-font'>${h.path}</span>`:h.summary||h.shortSummary}
|
||
</span>
|
||
</div>`))}
|
||
</div>
|
||
</div>
|
||
`}))}
|
||
|
||
<!-- COMPONENTS -->
|
||
${this.resolvedSpec.components&&this.showComponents==="true"&&this.renderStyle==="focused"?V`
|
||
<div id='link-components' class='nav-bar-section components'>
|
||
<div></div>
|
||
<div class='nav-bar-section-title'>COMPONENTS</div>
|
||
</div>
|
||
${this.resolvedSpec.components.map((i=>i.subComponents.length?V`
|
||
<div class='nav-bar-tag'
|
||
part='section-navbar-item section-navbar-tag'
|
||
data-action='navigate'
|
||
data-content-id='cmp--${i.name.toLowerCase()}'
|
||
id='link-cmp--${i.name.toLowerCase()}'
|
||
>
|
||
${i.name}
|
||
</div>
|
||
${i.subComponents.filter((l=>l.expanded!==!1)).map((l=>V`
|
||
<div class='nav-bar-path' data-action='navigate' data-content-id='cmp--${l.id}' id='link-cmp--${l.id}'>
|
||
<span style = 'pointer-events: none;'> ${l.name} </span>
|
||
</div>`))}`:""))}`:""}
|
||
</nav>`}
|
||
</nav>
|
||
`}function QX(t){const n=new dt.Renderer;return n.heading=(i,l,h,v)=>`<h${l} class="observe-me" id="${t}--${v.slug(h)}">${i}</h${l}>`,n}function ME(t){return V`
|
||
<div class='regular-font section-gap--focused-mode' part="section-operations-in-tag">
|
||
${t}
|
||
</div>`}function lM(){var t;if(this.showInfo==="true")return ME(PE.call(this));const n=this.resolvedSpec.tags[0],i=(t=this.resolvedSpec.tags[0])===null||t===void 0?void 0:t.paths[0];return ME(n&&i?ER.call(this,i,n.name):"")}function eY(t){return V`
|
||
<h1 id="${t.elementId}">${t.displayName||t.name}</h1>
|
||
${this.onNavTagClick==="show-description"&&t.description?V`
|
||
<div class="m-markdown">
|
||
${Mn(`
|
||
<div class="m-markdown regular-font">
|
||
${dt(t.description||"",this.infoDescriptionHeadingsInNavBar==="true"?{renderer:QX(t.elementId)}:void 0)}
|
||
</div>`)}
|
||
</div>`:""}
|
||
`}function tY(){if(!this.focusedElementId||!this.resolvedSpec)return;const t=this.focusedElementId;let n,i=null,l=null,h=0;if(t.startsWith("overview")&&this.showInfo==="true")n=PE.call(this);else if(t==="auth"&&this.allowAuthentication==="true")n=XP.call(this);else if(t==="servers"&&this.allowServerSelection==="true")n=iM.call(this);else if(t==="operations-top")n=V`
|
||
<div id="operations-top" class="observe-me">
|
||
<slot name="operations-top"></slot>
|
||
</div>`;else if(t.startsWith("cmp--")&&this.showComponents==="true")n=YX.call(this);else if(t.startsWith("tag--")){const v=t.indexOf("--",4)>0?t.substring(0,t.indexOf("--",5)):t;l=this.resolvedSpec.tags.find((x=>x.elementId===v)),n=l?ME.call(this,eY.call(this,l)):lM.call(this)}else{for(h=0;h<this.resolvedSpec.tags.length&&(l=this.resolvedSpec.tags[h],i=this.resolvedSpec.tags[h].paths.find((v=>`${v.elementId}`===t)),!i);h+=1);i?(aM(this.shadowRoot.getElementById(`link-${t}`),"expand"),n=ME.call(this,ER.call(this,i,l.name||"",l.description||""))):n=lM.call(this)}return n}function nY(t){if(t.expanded)t.expanded=!1,this.updateRoute==="true"&&this.replaceHistoryState("");else if(t.expanded=!0,this.updateRoute==="true"){const n=`${this.routePrefix||"#"}${t.elementId}`;window.location.hash!==n&&this.replaceHistoryState(t.elementId)}this.requestUpdate()}function rY(t,n="expand-all"){const i=[...t.querySelectorAll(".section-tag")];n==="expand-all"?i.map((l=>{l.classList.replace("collapsed","expanded")})):i.map((l=>{l.classList.replace("expanded","collapsed")}))}function cM(t,n="expand-all"){rY.call(this,t.target.closest(".operations-root"),n)}function uM(t,n=!1){return V`
|
||
<summary @click="${i=>{nY.call(this,t,i)}}" part="section-endpoint-head-${t.expanded?"expanded":"collapsed"}" class='endpoint-head ${t.method} ${t.deprecated?"deprecated":""} ${n||t.expanded?"expanded":"collapsed"}'>
|
||
<div part="section-endpoint-head-method" class="method ${t.method} ${t.deprecated?"deprecated":""}"> ${t.method} </div>
|
||
<div part="section-endpoint-head-path" class="path ${t.deprecated?"deprecated":""}">
|
||
${t.path}
|
||
${t.isWebhook?V`<span style="font-family: var(--font-regular); font-size: var(--); font-size: var(--font-size-small); color:var(--primary-color); margin-left: 16px"> Webhook</span>`:""}
|
||
</div>
|
||
${t.deprecated?V`
|
||
<span style="font-size:var(--font-size-small); text-transform:uppercase; font-weight:bold; color:var(--red); margin:2px 0 0 5px;">
|
||
deprecated
|
||
</span>`:""}
|
||
${this.showSummaryWhenCollapsed?V`
|
||
<div class="only-large-screen" style="min-width:60px; flex:1"></div>
|
||
<div part="section-endpoint-head-description" class="descr">${t.summary||t.shortSummary} </div>`:""}
|
||
</summary>
|
||
`}function dM(t){var n,i,l,h,v,x,w,C;const $=new Set;for(const Y in t.responses)for(const Z in(N=t.responses[Y])===null||N===void 0?void 0:N.content){var N;$.add(Z.trim())}const _=[...$].join(", "),F=this.resolvedSpec.securitySchemes.filter((Y=>{var Z;return Y.finalKeyValue&&((Z=t.security)===null||Z===void 0?void 0:Z.some((P=>Y.securitySchemeId in P)))}))||[],U=this.resolvedSpec.securitySchemes.find((Y=>Y.securitySchemeId===po&&Y.value!=="-"));U&&F.push(U);const J=t.xCodeSamples?ZP(t.xCodeSamples):"";return V`
|
||
<div part="section-endpoint-body-${t.expanded?"expanded":"collapsed"}" class='endpoint-body ${t.method} ${t.deprecated?"deprecated":""}'>
|
||
<div class="summary">
|
||
${t.summary?V`<div class="title" part="section-endpoint-body-title">${t.summary}</div>`:t.shortSummary!==t.description?V`<div class="title" part="section-endpoint-body-title">${t.shortSummary}</div>`:""}
|
||
${t.xBadges&&((n=t.xBadges)===null||n===void 0?void 0:n.length)>0?V`
|
||
<div style="display:flex; flex-wrap:wrap;font-size: var(--font-size-small);">
|
||
${t.xBadges.map((Y=>Y.color==="none"?"":V`<span part="endpoint-badge" style="margin:1px; margin-right:5px; padding:1px 8px; font-weight:bold; border-radius:12px; background-color: var(--light-${Y.color}, var(--input-bg)); color:var(--${Y.color}); border:1px solid var(--${Y.color})">${Y.label}</span>`))}
|
||
</div>
|
||
`:""}
|
||
|
||
${t.description?V`<div part="section-endpoint-body-description" class="m-markdown"> ${Mn(dt(t.description))}</div>`:""}
|
||
${(i=t.externalDocs)!==null&&i!==void 0&&i.url||(l=t.externalDocs)!==null&&l!==void 0&&l.description?V`<div style="background-color:var(--bg3); padding:2px 8px 8px 8px; margin:8px 0; border-radius:var(--border-radius)">
|
||
<div class="m-markdown"> ${Mn(dt(((h=t.externalDocs)===null||h===void 0?void 0:h.description)||""))} </div>
|
||
${(v=t.externalDocs)!==null&&v!==void 0&&v.url?V`<a style="font-family:var(--font-mono); font-size:var(--font-size-small)" href="${(x=t.externalDocs)===null||x===void 0?void 0:x.url}" target="_blank">
|
||
${(w=t.externalDocs)===null||w===void 0?void 0:w.url} <div style="transform: rotate(270deg) scale(1.5); display: inline-block; margin-left:5px">⇲</div>
|
||
</a>`:""}
|
||
</div>`:""}
|
||
<slot name="${t.elementId}"></slot>
|
||
${YP.call(this,t.security)}
|
||
${J}
|
||
</div>
|
||
<div class='req-resp-container'>
|
||
<div style="display:flex; flex-direction:column" class="view-mode-request ${this.layout}-layout">
|
||
<api-request
|
||
class = "${this.renderStyle}-mode ${this.layout}-layout"
|
||
style = "width:100%;"
|
||
webhook = "${t.isWebhook}"
|
||
method = "${t.method}"
|
||
path = "${t.path}"
|
||
.security = "${t.security}"
|
||
.parameters = "${t.parameters}"
|
||
.request_body = "${t.requestBody}"
|
||
.api_keys = "${F}"
|
||
.servers = "${t.servers}"
|
||
server-url = "${t.servers&&t.servers.length>0?t.servers[0].url:(C=this.selectedServer)===null||C===void 0?void 0:C.computedUrl}"
|
||
active-schema-tab = "${this.defaultSchemaTab}"
|
||
fill-request-fields-with-example = "${this.fillRequestFieldsWithExample}"
|
||
allow-try = "${this.allowTry}"
|
||
show-curl-before-try = "${this.showCurlBeforeTry}"
|
||
accept = "${_}"
|
||
render-style="${this.renderStyle}"
|
||
schema-style = "${this.schemaStyle}"
|
||
schema-expand-level = "${this.schemaExpandLevel}"
|
||
schema-description-expanded = "${this.schemaDescriptionExpanded}"
|
||
allow-schema-description-expand-toggle = "${this.allowSchemaDescriptionExpandToggle}"
|
||
schema-hide-read-only = "${this.schemaHideReadOnly==="never"||t.isWebhook?"false":"true"}"
|
||
schema-hide-write-only = "${this.schemaHideWriteOnly==="never"?"false":t.isWebhook?"true":"false"}"
|
||
fetch-credentials = "${this.fetchCredentials}"
|
||
exportparts = "wrap-request-btn:wrap-request-btn, btn:btn, btn-fill:btn-fill, btn-outline:btn-outline, btn-try:btn-try, btn-clear:btn-clear, btn-clear-resp:btn-clear-resp,
|
||
tab-panel:tab-panel, tab-btn:tab-btn, tab-btn-row:tab-btn-row, tab-coontent:tab-content,
|
||
file-input:file-input, textbox:textbox, textbox-param:textbox-param, textarea:textarea, textarea-param:textarea-param,
|
||
anchor:anchor, anchor-param-example:anchor-param-example, schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"
|
||
> </api-request>
|
||
|
||
${t.callbacks?WP.call(this,t.callbacks):""}
|
||
</div>
|
||
|
||
<api-response
|
||
class = "${this.renderStyle}-mode"
|
||
style = "width:100%;"
|
||
webhook = "${t.isWebhook}"
|
||
.responses="${t.responses}"
|
||
active-schema-tab = "${this.defaultSchemaTab}"
|
||
render-style="${this.renderStyle}"
|
||
schema-style="${this.schemaStyle}"
|
||
schema-expand-level = "${this.schemaExpandLevel}"
|
||
schema-description-expanded = "${this.schemaDescriptionExpanded}"
|
||
allow-schema-description-expand-toggle = "${this.allowSchemaDescriptionExpandToggle}"
|
||
schema-hide-read-only = "${this.schemaHideReadOnly==="never"?"false":t.isWebhook?"true":"false"}"
|
||
schema-hide-write-only = "${this.schemaHideWriteOnly==="never"||t.isWebhook?"false":"true"}"
|
||
selected-status = "${Object.keys(t.responses||{})[0]||""}"
|
||
exportparts = "btn:btn, btn-fill:btn-fill, btn-outline:btn-outline, btn-try:btn-try, file-input:file-input,
|
||
textbox:textbox, textbox-param:textbox-param, textarea:textarea, textarea-param:textarea-param, anchor:anchor, anchor-param-example:anchor-param-example, btn-clear-resp:btn-clear-resp,
|
||
tab-panel:tab-panel, tab-btn:tab-btn, tab-btn-row:tab-btn-row, tab-coontent:tab-content,
|
||
schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"
|
||
> </api-response>
|
||
</div>
|
||
</div>`}function sY(t=!1,n=!1){return this.resolvedSpec?V`
|
||
${t?"":V`
|
||
<div style="display:flex; justify-content:flex-end;">
|
||
<span @click="${i=>cM(i,"expand-all")}" style="color:var(--primary-color); cursor:pointer;">
|
||
Expand all
|
||
</span>
|
||
|
|
||
<span @click="${i=>cM(i,"collapse-all")}" style="color:var(--primary-color); cursor:pointer;" >
|
||
Collapse all
|
||
</span>
|
||
sections
|
||
</div>`}
|
||
${this.resolvedSpec.tags.map((i=>V`
|
||
${t?V`
|
||
<div class='section-tag-body'>
|
||
${i.paths.filter((l=>!this.searchVal||th(this.searchVal,l,i.name))).map((l=>V`
|
||
<section id='${l.elementId}' class='m-endpoint regular-font ${l.method} ${n||l.expanded?"expanded":"collapsed"}'>
|
||
${uM.call(this,l,n)}
|
||
${n||l.expanded?dM.call(this,l):""}
|
||
</section>`))}
|
||
</div>
|
||
`:V`
|
||
<div class='regular-font section-gap section-tag ${i.expanded?"expanded":"collapsed"}'>
|
||
<div class='section-tag-header' @click="${()=>{i.expanded=!i.expanded,this.requestUpdate()}}">
|
||
<div id='${i.elementId}' class="sub-title tag" style="color:var(--primary-color)">${i.displayName||i.name}</div>
|
||
</div>
|
||
<div class='section-tag-body'>
|
||
<slot name="${i.elementId}"></slot>
|
||
<div class="regular-font regular-font-size m-markdown" style="padding-bottom:12px">
|
||
${Mn(dt(i.description||""))}
|
||
</div>
|
||
${i.paths.filter((l=>!this.searchVal||th(this.searchVal,l,i.name))).map((l=>V`
|
||
<section part="section-endpoint" id='${l.elementId}' class='m-endpoint regular-font ${l.method} ${n||l.expanded?"expanded":"collapsed"}'>
|
||
${uM.call(this,l,n)}
|
||
${n||l.expanded?dM.call(this,l):""}
|
||
</section>`))}
|
||
</div>
|
||
</div>
|
||
`}
|
||
`))}`:""}function CR(){return V`
|
||
<header class="row main-header regular-font" part="section-header" style="padding:8px 4px 8px 4px;min-height:48px;">
|
||
<div class="only-large-screen-flex" style="align-items: center;">
|
||
<slot name="logo" class="logo" part="section-logo">
|
||
${t="height:36px;width:36px;margin-left:5px",V`
|
||
<div style=${t}>
|
||
<svg viewBox="1 0 511 512">
|
||
<path d="M351 411a202 202 0 01-350 0 203 203 0 01333-24 203 203 0 0117 24zm0 0" fill="#adc165"/>
|
||
<path d="M334 387a202 202 0 01-216-69 202 202 0 01216 69zm78 32H85a8 8 0 01-8-8 8 8 0 018-8h327a8 8 0 017 8 8 8 0 01-7 8zm0 0" fill="#99aa52"/>
|
||
<path d="M374 338l-5 30a202 202 0 01-248-248 203 203 0 01253 218zm0 0" fill="#ffc73b"/>
|
||
<path d="M374 338a202 202 0 01-100-197 203 203 0 01100 197zm38 81l-6-2-231-231a8 8 0 0111-11l231 230a8 8 0 01-5 14zm0 0" fill="#efb025"/>
|
||
<path d="M311 175c0 75 40 140 101 175a202 202 0 000-350 202 202 0 00-101 175zm0 0" fill="#ff903e"/>
|
||
<path d="M412 419a8 8 0 01-8-8V85a8 8 0 0115 0v326a8 8 0 01-7 8zm0 0" fill="#e87425"/>
|
||
</svg>
|
||
</div>
|
||
`}
|
||
<!-- m-logo style="height:36px;width:36px;margin-left:5px"></m-logo -->
|
||
</slot>
|
||
<div class="header-title" part="label-header-title">${this.headingText}</div>
|
||
</div>
|
||
<div style="margin: 0px 8px;display:flex;flex:1">
|
||
${this.allowSpecUrlLoad==="false"?"":V`
|
||
<input id="spec-url"
|
||
type="text"
|
||
style="font-size:var(--font-size-small)"
|
||
class="header-input mono-font"
|
||
part="textbox textbox-spec-url"
|
||
placeholder="Spec URL"
|
||
value="${this.specUrl||""}"
|
||
@change="${this.onSpecUrlChange}"
|
||
spellcheck="false"
|
||
>
|
||
<div style="margin: 6px 5px 0 -24px; font-size:var(--font-size-regular); cursor:pointer;">↩</div>
|
||
`}
|
||
${this.allowSpecFileLoad==="false"?"":V`
|
||
<input id="spec-file"
|
||
part = "file-input"
|
||
type="file"
|
||
style="display:none"
|
||
value="${this.specFile||""}"
|
||
@change="${this.onSpecFileChange}"
|
||
spellcheck="false"
|
||
>
|
||
<button class="m-btn primary only-large-screen" style="margin-left:10px;" part="btn btn-fill" @click="${this.onFileLoadClick}"> LOCAL JSON FILE </button>
|
||
`}
|
||
<slot name="header"></slot>
|
||
${this.allowSearch==="false"||"read focused".includes(this.renderStyle)?"":V`
|
||
<input id="search" class="header-input" type="text" part="textbox textbox-header-filter" placeholder="Filter" @change="${this.onSearchChange}" style="max-width:130px;margin-left:10px;" spellcheck="false" >
|
||
<div style="margin: 6px 5px 0 -24px; font-size:var(--font-size-regular); cursor:pointer;">↩</div>
|
||
`}
|
||
|
||
${this.allowAdvancedSearch==="false"||"read focused".includes(this.renderStyle)?"":V`
|
||
<button class="m-btn primary only-large-screen" part="btn btn-fill btn-search" style="margin-left:10px;" @click="${this.onShowSearchModalClicked}">
|
||
Search
|
||
</button>
|
||
`}
|
||
</div>
|
||
</header>`;var t}customElements.define("api-response",class extends Ht{constructor(){super(),this.selectedStatus="",this.headersForEachRespStatus={},this.mimeResponsesForEachStatus={},this.activeSchemaTab="schema"}static get properties(){return{callback:{type:String},webhook:{type:String},responses:{type:Object},parser:{type:Object},schemaStyle:{type:String,attribute:"schema-style"},renderStyle:{type:String,attribute:"render-style"},selectedStatus:{type:String,attribute:"selected-status"},selectedMimeType:{type:String,attribute:"selected-mime-type"},activeSchemaTab:{type:String,attribute:"active-schema-tab"},schemaExpandLevel:{type:Number,attribute:"schema-expand-level"},schemaDescriptionExpanded:{type:String,attribute:"schema-description-expanded"},allowSchemaDescriptionExpandToggle:{type:String,attribute:"allow-schema-description-expand-toggle"},schemaHideReadOnly:{type:String,attribute:"schema-hide-read-only"},schemaHideWriteOnly:{type:String,attribute:"schema-hide-write-only"}}}static get styles(){return[Si,Eu,dl,ju,Su,$E,M`
|
||
:where(button, input[type="checkbox"], [tabindex="0"]):focus-visible { box-shadow: var(--focus-shadow); }
|
||
:where(input[type="text"], input[type="password"], select, textarea):focus-visible { border-color: var(--primary-color); }
|
||
.resp-head{
|
||
vertical-align: middle;
|
||
padding:16px 0 8px;
|
||
}
|
||
.resp-head.divider{
|
||
border-top: 1px solid var(--border-color);
|
||
margin-top:10px;
|
||
}
|
||
.resp-status{
|
||
font-weight:bold;
|
||
font-size:calc(var(--font-size-small) + 1px);
|
||
}
|
||
.resp-descr{
|
||
font-size:calc(var(--font-size-small) + 1px);
|
||
color:var(--light-fg);
|
||
text-align:left;
|
||
}
|
||
.top-gap{margin-top:16px;}
|
||
.example-panel{
|
||
font-size:var(--font-size-small);
|
||
margin:0;
|
||
}
|
||
.focused-mode,
|
||
.read-mode {
|
||
padding-top:24px;
|
||
margin-top:12px;
|
||
border-top: 1px dashed var(--border-color);
|
||
}`,fc]}render(){return V`
|
||
<div class="col regular-font response-panel ${this.renderStyle}-mode">
|
||
<div class=" ${this.callback==="true"?"tiny-title":"req-res-title"} ">
|
||
${this.callback==="true"?"CALLBACK RESPONSE":"RESPONSE"}
|
||
</div>
|
||
<div>
|
||
${this.responseTemplate()}
|
||
</div>
|
||
</div>
|
||
`}resetSelection(){this.selectedStatus="",this.selectedMimeType=""}responseTemplate(){if(!this.responses)return"";for(const l in this.responses){this.selectedStatus||(this.selectedStatus=l);const h={};for(const x in(t=this.responses[l])===null||t===void 0?void 0:t.content){var t,n;const w=this.responses[l].content[x];this.selectedMimeType||(this.selectedMimeType=x);const C=ts(w.schema,{}),$=qm(w.schema,x,aa(w.examples),aa(w.example),this.callback!=="true"&&this.webhook!=="true",this.callback==="true"||this.webhook==="true",x.includes("json")?"json":"text");h[x]={description:this.responses[l].description,examples:$,selectedExample:((n=$[0])===null||n===void 0?void 0:n.exampleId)||"",schemaTree:C}}const v=[];for(const x in(i=this.responses[l])===null||i===void 0?void 0:i.headers){var i;v.push({name:x,...this.responses[l].headers[x]})}this.headersForEachRespStatus[l]=v,this.mimeResponsesForEachStatus[l]=h}return V`
|
||
${Object.keys(this.responses).length>1?V`<div class='row' style='flex-wrap:wrap'>
|
||
${Object.keys(this.responses).map((l=>V`
|
||
${l==="$$ref"?"":V`
|
||
<button
|
||
@click="${()=>{this.selectedStatus=l,this.responses[l].content&&Object.keys(this.responses[l].content)[0]?this.selectedMimeType=Object.keys(this.responses[l].content)[0]:this.selectedMimeType=void 0}}"
|
||
class='m-btn small ${this.selectedStatus===l?"primary":""}'
|
||
part="btn ${this.selectedStatus===l?"btn-response-status btn-selected-response-status":" btn-response-status"}"
|
||
style='margin: 8px 4px 0 0'
|
||
>
|
||
${l}
|
||
</button>`}`))}</div>`:V`<span>${Object.keys(this.responses)[0]}</span>`}
|
||
|
||
${Object.keys(this.responses).map((l=>{var h,v;return V`
|
||
<div style = 'display: ${l===this.selectedStatus?"block":"none"}' >
|
||
<div class="top-gap">
|
||
<span class="resp-descr m-markdown ">${Mn(dt(((h=this.responses[l])===null||h===void 0?void 0:h.description)||""))}</span>
|
||
${this.headersForEachRespStatus[l]&&((v=this.headersForEachRespStatus[l])===null||v===void 0?void 0:v.length)>0?V`${this.responseHeaderListTemplate(this.headersForEachRespStatus[l])}`:""}
|
||
</div>
|
||
${Object.keys(this.mimeResponsesForEachStatus[l]).length===0?"":V`
|
||
<div part="tab-panel" class="tab-panel col">
|
||
<div part="tab-btn-row" class="tab-buttons row" @click="${x=>{x.target.tagName.toLowerCase()==="button"&&(this.activeSchemaTab=x.target.dataset.tab)}}" >
|
||
<button part="tab-btn" class="tab-btn ${this.activeSchemaTab==="example"?"active":""}" data-tab = 'example'>EXAMPLE </button>
|
||
<button part="tab-btn" class="tab-btn ${this.activeSchemaTab!=="example"?"active":""}" data-tab = 'schema' >SCHEMA</button>
|
||
<div style="flex:1"></div>
|
||
${Object.keys(this.mimeResponsesForEachStatus[l]).length===1?V`<span class='small-font-size gray-text' style='align-self:center; margin-top:8px;'> ${Object.keys(this.mimeResponsesForEachStatus[l])[0]} </span>`:V`${this.mimeTypeDropdownTemplate(Object.keys(this.mimeResponsesForEachStatus[l]))}`}
|
||
</div>
|
||
${this.activeSchemaTab==="example"?V`<div part="tab-content" class ='tab-content col' style = 'flex:1;'>
|
||
${this.mimeExampleTemplate(this.mimeResponsesForEachStatus[l][this.selectedMimeType])}
|
||
</div>`:V`<div part="tab-content" class ='tab-content col' style = 'flex:1;'>
|
||
${this.mimeSchemaTemplate(this.mimeResponsesForEachStatus[l][this.selectedMimeType])}
|
||
</div>`}
|
||
</div>
|
||
`}</div>`}))}
|
||
`}responseHeaderListTemplate(t){return V`
|
||
<div style="padding:16px 0 8px 0" class="resp-headers small-font-size bold-text">RESPONSE HEADERS</div>
|
||
<table role="presentation" style="border-collapse: collapse; margin-bottom:16px; border:1px solid var(--border-color); border-radius: var(--border-radius)" class="small-font-size mono-font">
|
||
${t.map((n=>{var i,l;return V`
|
||
<tr>
|
||
<td style="padding:8px; vertical-align: baseline; min-width:120px; border-top: 1px solid var(--light-border-color); text-overflow: ellipsis;">
|
||
${n.name||""}
|
||
</td>
|
||
<td style="padding:4px; vertical-align: baseline; padding:0 5px; border-top: 1px solid var(--light-border-color); text-overflow: ellipsis;">
|
||
${((i=n.schema)===null||i===void 0?void 0:i.type)||""}
|
||
</td>
|
||
<td style="padding:8px; vertical-align: baseline; border-top: 1px solid var(--light-border-color);text-overflow: ellipsis;">
|
||
<div class="m-markdown-small regular-font" >${Mn(dt(n.description||""))}</div>
|
||
</td>
|
||
<td style="padding:8px; vertical-align: baseline; border-top: 1px solid var(--light-border-color); text-overflow: ellipsis;">
|
||
${((l=n.schema)===null||l===void 0?void 0:l.example)||""}
|
||
</td>
|
||
</tr>
|
||
`}))}
|
||
</table>`}mimeTypeDropdownTemplate(t){return V`
|
||
<select aria-label='mime types' @change="${n=>{this.selectedMimeType=n.target.value}}" style='margin-bottom: -1px; z-index:1'>
|
||
${t.map((n=>V`<option value='${n}' ?selected = '${n===this.selectedMimeType}'> ${n} </option>`))}
|
||
</select>`}onSelectExample(t){[...t.target.closest(".example-panel").querySelectorAll(".example")].forEach((n=>{n.style.display=n.dataset.example===t.target.value?"block":"none"}))}mimeExampleTemplate(t){return t?V`
|
||
${t.examples.length===1?V`
|
||
${t.examples[0].exampleFormat==="json"?V`
|
||
${t.examples[0].exampleSummary&&t.examples[0].exampleSummary.length>80?V`<div style="padding: 4px 0"> ${t.examples[0].exampleSummary} </div>`:""}
|
||
${t.examples[0].exampleDescription?V`<div class="m-markdown-small" style="padding: 4px 0"> ${Mn(dt(t.examples[0].exampleDescription||""))} </div>`:""}
|
||
<json-tree
|
||
render-style = '${this.renderStyle}'
|
||
.data="${t.examples[0].exampleValue}"
|
||
class = 'example-panel ${this.renderStyle==="read"?"border pad-8-16":"border-top pad-top-8"}'
|
||
exportparts = "btn:btn, btn-fill:btn-fill, btn-copy:btn-copy"
|
||
></json-tree>`:V`
|
||
${t.examples[0].exampleSummary&&t.examples[0].exampleSummary.length>80?V`<div style="padding: 4px 0"> ${t.examples[0].exampleSummary} </div>`:""}
|
||
${t.examples[0].exampleDescription?V`<div class="m-markdown-small" style="padding: 4px 0"> ${Mn(dt(t.examples[0].exampleDescription||""))} </div>`:""}
|
||
<pre class = 'example-panel ${this.renderStyle==="read"?"border pad-8-16":"border-top pad-top-8"}'>${t.examples[0].exampleValue}</pre>
|
||
`}`:V`
|
||
<span class = 'example-panel ${this.renderStyle==="read"?"border pad-8-16":"border-top pad-top-8"}'>
|
||
<select aria-label='response examples' style="min-width:100px; max-width:100%" @change='${n=>this.onSelectExample(n)}'>
|
||
${t.examples.map((n=>V`<option value="${n.exampleId}" ?selected=${n.exampleId===t.selectedExample} >
|
||
${n.exampleSummary.length>80?n.exampleId:n.exampleSummary}
|
||
</option>`))}
|
||
</select>
|
||
${t.examples.map((n=>V`
|
||
<div class="example" data-example = '${n.exampleId}' style = "display: ${n.exampleId===t.selectedExample?"block":"none"}">
|
||
${n.exampleSummary&&n.exampleSummary.length>80?V`<div style="padding: 4px 0"> ${n.exampleSummary} </div>`:""}
|
||
${n.exampleDescription?V`<div class="m-markdown-small" style="padding: 4px 0"> ${Mn(dt(n.exampleDescription||""))} </div>`:""}
|
||
${n.exampleFormat==="json"?V`
|
||
<json-tree
|
||
render-style = '${this.renderStyle}'
|
||
.data = '${n.exampleValue}'
|
||
exportparts = "btn:btn, btn-fill:btn-fill, btn-copy:btn-copy"
|
||
></json-tree>`:V`<pre>${n.exampleValue}</pre>`}
|
||
</div>
|
||
`))}
|
||
</span>
|
||
`}
|
||
`:V`
|
||
<pre style='color:var(--red)' class = '${this.renderStyle==="read"?"read example-panel border pad-8-16":"example-panel border-top"}'> No example provided </pre>
|
||
`}mimeSchemaTemplate(t){return t?V`
|
||
${this.schemaStyle==="table"?V`
|
||
<schema-table
|
||
.data = "${t.schemaTree}"
|
||
schema-expand-level = "${this.schemaExpandLevel}"
|
||
schema-description-expanded = "${this.schemaDescriptionExpanded}"
|
||
allow-schema-description-expand-toggle = "${this.allowSchemaDescriptionExpandToggle}"
|
||
schema-hide-read-only = "${this.schemaHideReadOnly}"
|
||
schema-hide-write-only = "${this.schemaHideWriteOnly}"
|
||
exportparts = "schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"
|
||
> </schema-table> `:V`
|
||
<schema-tree
|
||
.data = '${t.schemaTree}'
|
||
schema-expand-level = "${this.schemaExpandLevel}"
|
||
schema-description-expanded = "${this.schemaDescriptionExpanded}"
|
||
allow-schema-description-expand-toggle = "${this.allowSchemaDescriptionExpandToggle}"
|
||
schema-hide-read-only = "${this.schemaHideReadOnly}"
|
||
schema-hide-write-only = "${this.schemaHideWriteOnly}"
|
||
exportparts = "schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"
|
||
> </schema-tree>`}`:V`
|
||
<pre style='color:var(--red)' class = '${this.renderStyle==="read"?"border pad-8-16":"border-top"}'> Schema not found</pre>
|
||
`}});const iY=M`
|
||
*, *:before, *:after { box-sizing: border-box; }
|
||
|
||
.dialog-box-overlay {
|
||
background-color: var(--overlay-bg);
|
||
position: fixed;
|
||
left: 0;
|
||
top: 0;
|
||
width: 100vw;
|
||
height: 100vh;
|
||
overflow: hidden;
|
||
z-index: var(--dialog-z-index);
|
||
}
|
||
|
||
.dialog-box {
|
||
position: fixed;
|
||
top: 100px;
|
||
left: 50%;
|
||
transform: translate(-50%, 0%);
|
||
display: flex;
|
||
flex-direction: column;
|
||
width: 70vw;
|
||
background-color: var(--bg2);
|
||
color: var(--fg2);
|
||
border-radius: 4px;
|
||
max-height: 500px;
|
||
overflow: hidden;
|
||
border: 1px solid var(--border-color);
|
||
box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22);
|
||
}
|
||
|
||
.dialog-box-header {
|
||
position: sticky;
|
||
top: 0;
|
||
align-self: stretch;
|
||
display: flex;
|
||
align-items: center;
|
||
padding: 0px 16px;
|
||
min-height: 60px;
|
||
max-height: 60px;
|
||
border-bottom: 1px solid var(--light-border-color);
|
||
overflow: hidden;
|
||
}
|
||
|
||
.dialog-box-header button {
|
||
font-size: 1.5rem;
|
||
font-weight: 700;
|
||
line-height: 1;
|
||
color: var(--fg);
|
||
border: none;
|
||
outline: none;
|
||
background-color: transparent;
|
||
cursor:pointer;
|
||
border: 1px solid transparent;
|
||
border-radius: 50%;
|
||
margin-right: -8px;
|
||
}
|
||
.dialog-box-header button:hover {
|
||
border-color: var(--primary-color);
|
||
}
|
||
|
||
.dialog-box-content {
|
||
padding: 16px;
|
||
display:block;
|
||
overflow: auto;
|
||
height: 100%;
|
||
}
|
||
|
||
.dialog-box-title {
|
||
flex-grow: 1;
|
||
font-size:24px;
|
||
}
|
||
`;function aY(){var t;return document.addEventListener("close",(()=>{this.showAdvancedSearchDialog=!1})),document.addEventListener("open",this.onOpenSearchDialog),V`
|
||
<dialog-box
|
||
heading="Search"
|
||
show="${!!this.showAdvancedSearchDialog}"
|
||
>
|
||
<span class="advanced-search-options">
|
||
<input
|
||
id="input-advanced-search-dialog"
|
||
style="width:100%; padding-right:20px;"
|
||
type="text"
|
||
part="textbox textbox-search-dialog"
|
||
placeholder="search text..."
|
||
spellcheck="false"
|
||
@keyup = "${n=>this.onAdvancedSearch(n,400)}"
|
||
>
|
||
<div style="display:flex; margin:8px 0 24px;">
|
||
<div>
|
||
<input style="cursor:pointer;" type="checkbox" part="checkbox checkbox-search-dialog" id="search-api-path" checked @change = "${n=>this.onAdvancedSearch(n,0)}">
|
||
<label for="search-api-path" style="cursor:pointer;"> API Path </label>
|
||
</div>
|
||
<div style="margin-left: 16px;">
|
||
<input style="cursor:pointer;" type="checkbox" part="checkbox checkbox-search-dialog" id="search-api-descr" checked @change = "${n=>this.onAdvancedSearch(n,0)}">
|
||
<label style="cursor:pointer;" for="search-api-descr"> API Description </label>
|
||
</div>
|
||
<div style="margin-left: 16px;">
|
||
<input style="cursor:pointer;" type="checkbox" part="checkbox checkbox-search-dialog" id="search-api-params" @change = "${n=>this.onAdvancedSearch(n,0)}">
|
||
<label style="cursor:pointer;" for="search-api-params"> API Parameters </label>
|
||
</div>
|
||
<div style="margin-left: 16px;">
|
||
<input style="cursor:pointer;" type="checkbox" part="checkbox checkbox-search-dialog" id="search-api-request-body" @change = "${n=>this.onAdvancedSearch(n,0)}">
|
||
<label style="cursor:pointer;" for="search-api-request-body"> Request Body Parameters </label>
|
||
</div>
|
||
<div style="margin-left: 16px;">
|
||
<input style="cursor:pointer;" type="checkbox" part="checkbox checkbox-search-dialog" id="search-api-resp-descr" @change = "${n=>this.onAdvancedSearch(n,0)}">
|
||
<label style="cursor:pointer;" for="search-api-resp-descr"> Response Description </label>
|
||
</div>
|
||
</div>
|
||
</span>
|
||
|
||
${(t=this.advancedSearchMatches)===null||t===void 0?void 0:t.map((n=>V`
|
||
<div
|
||
class="mono-font small-font-size hover-bg"
|
||
style='padding: 5px; cursor: pointer; border-bottom: 1px solid var(--light-border-color); ${n.deprecated?"filter:opacity(0.5);":""}'
|
||
data-content-id='${n.elementId}'
|
||
tabindex = '0'
|
||
@click="${i=>{this.searchVal="",this.showAdvancedSearchDialog=!1,this.requestUpdate(),this.scrollToEventTarget(i,!0)}}"
|
||
>
|
||
<span style="pointer-events: none" class="upper bold-text method-fg ${n.method}">${n.method}</span>
|
||
<span style="pointer-events: none">${n.path}</span>
|
||
<span style="pointer-events: none" class="regular-font gray-text">${n.summary}</span>
|
||
</div>
|
||
`))}
|
||
</dialog-box>
|
||
`}customElements.define("dialog-box",class extends Ht{static get properties(){return{heading:{type:String,attribute:"heading"},show:{type:String,attribute:"show"}}}static get styles(){return[iY]}connectedCallback(){super.connectedCallback(),document.addEventListener("keydown",(t=>{t.code==="Escape"&&this.onClose()}))}attributeChangedCallback(t,n,i){n!==i&&(t==="heading"&&(this.heading=i),t==="show"&&(this.show=i,i==="true"&&document.dispatchEvent(new CustomEvent("open",{bubbles:!0,composed:!0,detail:this})))),super.attributeChangedCallback(t,n,i)}render(){return V`
|
||
${this.show==="true"?V`
|
||
<div class="dialog-box-overlay">
|
||
<div class="dialog-box">
|
||
<header class="dialog-box-header">
|
||
<span class="dialog-box-title">${this.heading}</span>
|
||
<button type="button" @click="${this.onClose}">×</button>
|
||
</header>
|
||
<div class="dialog-box-content">
|
||
<slot></slot>
|
||
</div>
|
||
</div>
|
||
</div>`:""}`}onClose(){document.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}});const Vt={color:{inputReverseFg:"#fff",inputReverseBg:"#333",headerBg:"#444",getRgb(t){if(t.indexOf("#")===0&&(t=t.slice(1,7)),t.length!==3&&t.length!==4||(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]),t.length!==6)throw new Error("Invalid HEX color.");return{r:parseInt(t.slice(0,2),16),g:parseInt(t.slice(2,4),16),b:parseInt(t.slice(4,6),16)}},luminanace(t){const n=this.getRgb(t);return .299*n.r+.587*n.g+.114*n.b},invert(t){return this.luminanace(t)>135?"#000":"#fff"},opacity(t,n){const i=this.getRgb(t);return`rgba(${i.r}, ${i.g}, ${i.b}, ${n})`},brightness(t,n){const i=this.getRgb(t);return i.r+=n,i.g+=n,i.b+=n,i.r>255?i.r=255:i.r<0&&(i.r=0),i.g>255?i.g=255:i.g<0&&(i.g=0),i.b>255?i.b=255:i.b<0&&(i.b=0),`#${i.r.toString(16).padStart(2,"0")}${i.g.toString(16).padStart(2,"0")}${i.b.toString(16).padStart(2,"0")}`},hasGoodContrast(t,n){return this.luminanace(t)-this.luminanace(n)}}};function ds(t){return/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3}|[A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/i.test(t)}function oa(t,n={}){let i={};const l=n.primaryColor?n.primaryColor:t==="dark"?"#f76b39":"#ff591e",h=Vt.color.invert(l),v=Vt.color.opacity(l,"0.4");if(t==="dark"){const x=n.bg1?n.bg1:"#2a2b2c",w=n.fg1?n.fg1:"#bbb",C=n.bg2?n.bg2:Vt.color.brightness(x,5),$=n.bg3?n.bg3:Vt.color.brightness(x,17),N=n.bg3?n.bg3:Vt.color.brightness(x,35),_=n.fg2?n.fg2:Vt.color.brightness(w,-15),F=n.fg3?n.fg3:Vt.color.brightness(w,-20),U=n.fg3?n.fg3:Vt.color.brightness(w,-65),J=n.inlineCodeFg?n.inlineCodeFg:"#aaa",Y=_,Z=C,P=n.headerColor?n.headerColor:Vt.color.brightness(x,10),se=n.navBgColor?n.navBgColor:Vt.color.brightness(x,10),ae=n.navTextColor?n.navTextColor:Vt.color.opacity(Vt.color.invert(se),"0.50"),he=n.navHoverBgColor?n.navHoverBgColor:Vt.color.brightness(se,-15),ge=n.navHoverTextColor?n.navHoverTextColor:Vt.color.invert(se),pe=n.navAccentColor?n.navAccentColor:Vt.color.brightness(l,25);i={bg1:x,bg2:C,bg3:$,lightBg:N,fg1:w,fg2:_,fg3:F,lightFg:U,inlineCodeFg:J,primaryColor:l,primaryColorTrans:v,primaryColorInvert:h,selectionBg:Y,selectionFg:Z,overlayBg:"rgba(80, 80, 80, 0.4)",navBgColor:se,navTextColor:ae,navHoverBgColor:he,navHoverTextColor:ge,navAccentColor:pe,navAccentTextColor:n.navAccentTextColor?n.navAccenttextColor:Vt.color.invert(pe),headerColor:P,headerColorInvert:Vt.color.invert(P),headerColorDarker:Vt.color.brightness(P,-20),headerColorBorder:Vt.color.brightness(P,10),borderColor:n.borderColor||Vt.color.brightness(x,20),lightBorderColor:n.lightBorderColor||Vt.color.brightness(x,15),codeBorderColor:n.codeBorderColor||Vt.color.brightness(x,30),inputBg:n.inputBg||Vt.color.brightness(x,-5),placeHolder:n.placeHolder||Vt.color.opacity(w,"0.3"),hoverColor:n.hoverColor||Vt.color.brightness(x,-10),red:n.red?n.red:"#F06560",lightRed:n.lightRed?n.lightRed:Vt.color.brightness(x,-10),pink:n.pink?n.pink:"#ffb2b2",lightPink:n.lightPink||Vt.color.brightness(x,-10),green:n.green||"#7ec699",lightGreen:n.lightGreen||Vt.color.brightness(x,-10),blue:n.blue||"#71b7ff",lightBlue:n.lightBlue||Vt.color.brightness(x,-10),orange:n.orange?n.orange:"#f08d49",lightOrange:n.lightOrange||Vt.color.brightness(x,-10),yellow:n.yellow||"#827717",lightYellow:n.lightYellow||Vt.color.brightness(x,-10),purple:n.purple||"#786FF1",brown:n.brown||"#D4AC0D",codeBg:n.codeBg||Vt.color.opacity(Vt.color.brightness(x,-15),.7),codeFg:n.codeFg||"#aaa",codePropertyColor:n.codePropertyColor||"#f8c555",codeKeywordColor:n.codeKeywordColor||"#cc99cd",codeOperatorColor:n.codeOperatorColor||"#67cdcc"}}else{const x=n.bg1?n.bg1:"#fafbfc",w=n.fg1?n.fg1:"#444444",C=n.bg2?n.bg2:Vt.color.brightness(x,-5),$=n.bg3?n.bg3:Vt.color.brightness(x,-15),N=n.bg3?n.bg3:Vt.color.brightness(x,-45),_=n.fg2?n.fg2:Vt.color.brightness(w,17),F=n.fg3?n.fg3:Vt.color.brightness(w,30),U=n.fg3?n.fg3:Vt.color.brightness(w,70),J=n.inlineCodeFg?n.inlineCodeFg:"brown",Y=_,Z=C,P=n.headerColor?n.headerColor:Vt.color.brightness(x,-180),se=n.navBgColor?n.navBgColor:Vt.color.brightness(x,-200),ae=n.navTextColor?n.navTextColor:Vt.color.opacity(Vt.color.invert(se),"0.65"),he=n.navHoverBgColor?n.navHoverBgColor:Vt.color.brightness(se,-15),ge=n.navHoverTextColor?n.navHoverTextColor:Vt.color.invert(se),pe=n.navAccentColor?n.navAccentColor:Vt.color.brightness(l,25);i={bg1:x,bg2:C,bg3:$,lightBg:N,fg1:w,fg2:_,fg3:F,lightFg:U,inlineCodeFg:J,primaryColor:l,primaryColorTrans:v,primaryColorInvert:h,selectionBg:Y,selectionFg:Z,overlayBg:"rgba(0, 0, 0, 0.4)",navBgColor:se,navTextColor:ae,navHoverBgColor:he,navHoverTextColor:ge,navAccentColor:pe,navAccentTextColor:n.navAccentTextColor?n.navAccenttextColor:Vt.color.invert(pe),headerColor:P,headerColorInvert:Vt.color.invert(P),headerColorDarker:Vt.color.brightness(P,-20),headerColorBorder:Vt.color.brightness(P,10),borderColor:n.borderColor||Vt.color.brightness(x,-38),lightBorderColor:n.lightBorderColor||Vt.color.brightness(x,-23),codeBorderColor:n.codeBorderColor||"transparent",inputBg:n.inputBg||Vt.color.brightness(x,10),placeHolder:n.placeHolder||Vt.color.brightness(U,20),hoverColor:n.hoverColor||Vt.color.brightness(x,-5),red:n.red||"#F06560",lightRed:n.lightRed||"#fff0f0",pink:n.pink?n.pink:"#990055",lightPink:n.lightPink?n.lightPink:"#ffb2b2",green:n.green||"#690",lightGreen:n.lightGreen||"#fbfff0",blue:n.blue||"#47AFE8",lightBlue:n.lightBlue||"#eff8fd",orange:n.orange||"#FF9900",lightOrange:n.lightOrange||"#fff5e6",yellow:n.yellow||"#827717",lightYellow:n.lightYellow||"#fff5cc",purple:n.purple||"#786FF1",brown:n.brown||"#D4AC0D",codeBg:n.codeBg||Vt.color.opacity(Vt.color.brightness(x,-15),.7),codeFg:n.codeFg||"#666",codePropertyColor:n.codePropertyColor||"#905",codeKeywordColor:n.codeKeywordColor||"#07a",codeOperatorColor:n.codeOperatorColor||"#9a6e3a"}}return V`
|
||
<style>
|
||
*, *:before, *:after { box-sizing: border-box; }
|
||
|
||
:host {
|
||
/* Common Styles - irrespective of themes */
|
||
--border-radius: 2px;
|
||
--layout: ${this.layout||"row"};
|
||
--font-mono: ${this.monoFont||'Monaco, "Andale Mono", "Roboto Mono", Consolas, monospace'};
|
||
--font-regular: ${this.regularFont||'"Open Sans", Avenir, "Segoe UI", Arial, sans-serif'};
|
||
--scroll-bar-width: 8px;
|
||
--nav-item-padding: ${this.navItemSpacing==="relaxed"?"10px 16px 10px 10px":this.navItemSpacing==="compact"?"5px 16px 5px 10px":"7px 16px 7px 10px"};
|
||
|
||
--resp-area-height: ${this.responseAreaHeight};
|
||
--font-size-small: ${this.fontSize==="default"?"12px":this.fontSize==="large"?"13px":"14px"};
|
||
--font-size-mono: ${this.fontSize==="default"?"13px":this.fontSize==="large"?"14px":"15px"};
|
||
--font-size-regular: ${this.fontSize==="default"?"14px":this.fontSize==="large"?"15px":"16px"};
|
||
--dialog-z-index: 1000;
|
||
|
||
--focus-shadow: 0 0 0 1px transparent, 0 0 0 3px ${i.primaryColorTrans};
|
||
|
||
/* Theme specific styles */
|
||
--bg:${i.bg1};
|
||
--bg2:${i.bg2};
|
||
--bg3:${i.bg3};
|
||
--light-bg:${i.lightBg};
|
||
--fg:${i.fg1};
|
||
--fg2:${i.fg2};
|
||
--fg3:${i.fg3};
|
||
--light-fg:${i.lightFg};
|
||
--selection-bg:${i.selectionBg};
|
||
--selection-fg:${i.selectionFg};
|
||
--overlay-bg:${i.overlayBg};
|
||
|
||
/* Border Colors */
|
||
--border-color:${i.borderColor};
|
||
--light-border-color:${i.lightBorderColor};
|
||
--code-border-color:${i.codeBorderColor};
|
||
|
||
--input-bg:${i.inputBg};
|
||
--placeholder-color:${i.placeHolder};
|
||
--hover-color:${i.hoverColor};
|
||
--red:${i.red};
|
||
--light-red:${i.lightRed};
|
||
--pink:${i.pink};
|
||
--light-pink:${i.lightPink};
|
||
--green:${i.green};
|
||
--light-green:${i.lightGreen};
|
||
--blue:${i.blue};
|
||
--light-blue:${i.lightBlue};
|
||
--orange:${i.orange};
|
||
--light-orange:${i.lightOrange};
|
||
--yellow:${i.yellow};
|
||
--light-yellow:${i.lightYellow};
|
||
--purple:${i.purple};
|
||
--brown:${i.brown};
|
||
|
||
/* Header Color */
|
||
--header-bg:${i.headerColor};
|
||
--header-fg:${i.headerColorInvert};
|
||
--header-color-darker:${i.headerColorDarker};
|
||
--header-color-border:${i.headerColorBorder};
|
||
|
||
/* Nav Colors */
|
||
--nav-bg-color:${i.navBgColor};
|
||
--nav-text-color:${i.navTextColor};
|
||
--nav-hover-bg-color:${i.navHoverBgColor};
|
||
--nav-hover-text-color:${i.navHoverTextColor};
|
||
--nav-accent-color:${i.navAccentColor};
|
||
--nav-accent-text-color:${i.navAccentTextColor};
|
||
|
||
/* Nav API Method Colors*/
|
||
--nav-get-color:${i.blue};
|
||
--nav-put-color:${i.orange};
|
||
--nav-post-color:${i.green};
|
||
--nav-delete-color:${i.red};
|
||
--nav-head-color:${i.yellow};
|
||
|
||
/* Primary Colors */
|
||
--primary-color:${i.primaryColor};
|
||
--primary-color-invert:${i.primaryColorInvert};
|
||
--primary-color-trans:${i.primaryColorTrans};
|
||
|
||
/*Code Syntax Color*/
|
||
--code-bg:${i.codeBg};
|
||
--code-fg:${i.codeFg};
|
||
--inline-code-fg:${i.inlineCodeFg};
|
||
--code-property-color:${i.codePropertyColor};
|
||
--code-keyword-color:${i.codeKeywordColor};
|
||
--code-operator-color:${i.codeOperatorColor};
|
||
}
|
||
</style>`}function hM(t=!1,n=!1){if(!this.resolvedSpec)return"";this.persistAuth==="true"&&$X.call(this);const i={bg1:ds(this.bgColor)?this.bgColor:"",fg1:ds(this.textColor)?this.textColor:"",headerColor:ds(this.headerColor)?this.headerColor:"",primaryColor:ds(this.primaryColor)?this.primaryColor:"",navBgColor:ds(this.navBgColor)?this.navBgColor:"",navTextColor:ds(this.navTextColor)?this.navTextColor:"",navHoverBgColor:ds(this.navHoverBgColor)?this.navHoverBgColor:"",navHoverTextColor:ds(this.navHoverTextColor)?this.navHoverTextColor:"",navAccentColor:ds(this.navAccentColor)?this.navAccentColor:"",navAccentTextColor:ds(this.navAccentTextColor)?this.navAccentTextColor:""};return this.resolvedSpec.specLoadError?V`
|
||
${this.theme==="dark"?oa.call(this,"dark",i):oa.call(this,"light",i)}
|
||
<div id="spec-not-found" style='display:flex; align-items:center; justify-content: center; border:1px dashed var(--border-color); height:42px; padding:5px; font-size:var(--font-size-small); color:var(--red); font-family:var(--font-mono)'>
|
||
${this.resolvedSpec.info.description}
|
||
</div>
|
||
`:this.resolvedSpec.isSpecLoading?V`
|
||
${this.theme==="dark"?oa.call(this,"dark",i):oa.call(this,"light",i)}
|
||
<main class='main-content regular-font' part='section-main-content'>
|
||
<slot></slot>
|
||
<div class='main-content-inner--${this.renderStyle}-mode'>
|
||
<div class='loader'></div>
|
||
</div>
|
||
</main>
|
||
`:V`
|
||
${this.theme==="dark"?oa.call(this,"dark",i):oa.call(this,"light",i)}
|
||
|
||
<!-- Header -->
|
||
${this.showHeader==="false"?"":CR.call(this)}
|
||
|
||
<!-- Advanced Search -->
|
||
${this.allowAdvancedSearch==="false"?"":aY.call(this)}
|
||
|
||
<div id='the-main-body' class='body ${this.cssClasses}' dir='${this.pageDirection}' >
|
||
<!-- Side Nav -->
|
||
${this.renderStyle!=="read"&&this.renderStyle!=="focused"||this.showSideNav!=="true"||!this.resolvedSpec?"":JX.call(this)}
|
||
|
||
<!-- Main Content -->
|
||
<main class='main-content regular-font' tabindex='-1' part='section-main-content'>
|
||
<slot></slot>
|
||
<div class='main-content-inner--${this.renderStyle}-mode'>
|
||
${this.loading===!0?V`<div class='loader'></div>`:V`
|
||
${this.loadFailed===!0?V`<div style='text-align: center;margin: 16px;'> Unable to load the Spec</div>`:V`
|
||
<div class='operations-root' @click='${l=>{this.handleHref(l)}}'>
|
||
${this.renderStyle==="focused"?V`${tY.call(this)}`:V`
|
||
${this.showInfo==="true"?PE.call(this):""}
|
||
${this.allowServerSelection==="true"?iM.call(this):""}
|
||
${this.allowAuthentication==="true"?XP.call(this):""}
|
||
<div id='operations-top' class='observe-me'>
|
||
<slot name='operations-top'></slot>
|
||
</div>
|
||
${this.renderStyle==="read"?HX.call(this):sY.call(this,t,n)}
|
||
`}
|
||
</div>
|
||
`}`}
|
||
</div>
|
||
<slot name='footer'></slot>
|
||
</main>
|
||
</div>
|
||
`}class oY extends Ht{constructor(){super();const n={root:this.getRootNode().host,rootMargin:"-50px 0px -50px 0px",threshold:0};this.showSummaryWhenCollapsed=!0,this.isIntersectionObserverActive=!1,this.intersectionObserver=new IntersectionObserver((i=>{this.onIntersect(i)}),n)}static get properties(){return{headingText:{type:String,attribute:"heading-text"},gotoPath:{type:String,attribute:"goto-path"},updateRoute:{type:String,attribute:"update-route"},routePrefix:{type:String,attribute:"route-prefix"},specUrl:{type:String,attribute:"spec-url"},sortTags:{type:String,attribute:"sort-tags"},sortSchemas:{type:String,attribute:"sort-schemas"},generateMissingTags:{type:String,attribute:"generate-missing-tags"},sortEndpointsBy:{type:String,attribute:"sort-endpoints-by"},specFile:{type:String,attribute:!1},layout:{type:String},renderStyle:{type:String,attribute:"render-style"},defaultSchemaTab:{type:String,attribute:"default-schema-tab"},responseAreaHeight:{type:String,attribute:"response-area-height"},fillRequestFieldsWithExample:{type:String,attribute:"fill-request-fields-with-example"},persistAuth:{type:String,attribute:"persist-auth"},onNavTagClick:{type:String,attribute:"on-nav-tag-click"},schemaStyle:{type:String,attribute:"schema-style"},schemaExpandLevel:{type:Number,attribute:"schema-expand-level"},schemaDescriptionExpanded:{type:String,attribute:"schema-description-expanded"},schemaHideReadOnly:{type:String,attribute:"schema-hide-read-only"},schemaHideWriteOnly:{type:String,attribute:"schema-hide-write-only"},apiKeyName:{type:String,attribute:"api-key-name"},apiKeyLocation:{type:String,attribute:"api-key-location"},apiKeyValue:{type:String,attribute:"api-key-value"},defaultApiServerUrl:{type:String,attribute:"default-api-server"},serverUrl:{type:String,attribute:"server-url"},oauthReceiver:{type:String,attribute:"oauth-receiver"},showHeader:{type:String,attribute:"show-header"},showSideNav:{type:String,attribute:"show-side-nav"},showInfo:{type:String,attribute:"show-info"},allowAuthentication:{type:String,attribute:"allow-authentication"},allowTry:{type:String,attribute:"allow-try"},showCurlBeforeTry:{type:String,attribute:"show-curl-before-try"},allowSpecUrlLoad:{type:String,attribute:"allow-spec-url-load"},allowSpecFileLoad:{type:String,attribute:"allow-spec-file-load"},allowSpecFileDownload:{type:String,attribute:"allow-spec-file-download"},allowSearch:{type:String,attribute:"allow-search"},allowAdvancedSearch:{type:String,attribute:"allow-advanced-search"},allowServerSelection:{type:String,attribute:"allow-server-selection"},allowSchemaDescriptionExpandToggle:{type:String,attribute:"allow-schema-description-expand-toggle"},showComponents:{type:String,attribute:"show-components"},pageDirection:{type:String,attribute:"page-direction"},scrollBehavior:{type:String,attribute:"scroll-behavior"},theme:{type:String},bgColor:{type:String,attribute:"bg-color"},textColor:{type:String,attribute:"text-color"},headerColor:{type:String,attribute:"header-color"},primaryColor:{type:String,attribute:"primary-color"},fontSize:{type:String,attribute:"font-size"},regularFont:{type:String,attribute:"regular-font"},monoFont:{type:String,attribute:"mono-font"},loadFonts:{type:String,attribute:"load-fonts"},cssFile:{type:String,attribute:"css-file"},cssClasses:{type:String,attribute:"css-classes"},navBgColor:{type:String,attribute:"nav-bg-color"},navTextColor:{type:String,attribute:"nav-text-color"},navHoverBgColor:{type:String,attribute:"nav-hover-bg-color"},navHoverTextColor:{type:String,attribute:"nav-hover-text-color"},navAccentColor:{type:String,attribute:"nav-accent-color"},navAccentTextColor:{type:String,attribute:"nav-accent-text-color"},navActiveItemMarker:{type:String,attribute:"nav-active-item-marker"},navItemSpacing:{type:String,attribute:"nav-item-spacing"},showMethodInNavBar:{type:String,attribute:"show-method-in-nav-bar"},usePathInNavBar:{type:String,attribute:"use-path-in-nav-bar"},infoDescriptionHeadingsInNavBar:{type:String,attribute:"info-description-headings-in-navbar"},fetchCredentials:{type:String,attribute:"fetch-credentials"},matchPaths:{type:String,attribute:"match-paths"},matchType:{type:String,attribute:"match-type"},removeEndpointsWithBadgeLabelAs:{type:String,attribute:"remove-endpoints-with-badge-label-as"},loading:{type:Boolean},focusedElementId:{type:String},showAdvancedSearchDialog:{type:Boolean},advancedSearchMatches:{type:Object},searchVal:{type:String}}}static get styles(){return[Si,Su,Eu,ju,Lg,pc,dl,va,Ws,M`
|
||
:host {
|
||
all: initial;
|
||
display:flex;
|
||
flex-direction: column;
|
||
min-width:360px;
|
||
width:100%;
|
||
height:100%;
|
||
margin:0;
|
||
padding:0;
|
||
overflow: hidden;
|
||
letter-spacing:normal;
|
||
color:var(--fg);
|
||
background-color:var(--bg);
|
||
font-family:var(--font-regular);
|
||
container-type: inline-size;
|
||
}
|
||
:where(button, input[type="checkbox"], [tabindex="0"]):focus-visible { box-shadow: var(--focus-shadow); }
|
||
:where(input[type="text"], input[type="password"], select, textarea):focus-visible { border-color: var(--primary-color); }
|
||
.body {
|
||
display:flex;
|
||
height:100%;
|
||
width:100%;
|
||
overflow:hidden;
|
||
}
|
||
.main-content {
|
||
margin:0;
|
||
padding: 0;
|
||
display:block;
|
||
flex:1;
|
||
height:100%;
|
||
overflow-y: auto;
|
||
overflow-x: hidden;
|
||
scrollbar-width: thin;
|
||
scrollbar-color: var(--border-color) transparent;
|
||
}
|
||
|
||
.main-content-inner--view-mode {
|
||
padding: 0 8px;
|
||
}
|
||
.main-content::-webkit-scrollbar {
|
||
width: 8px;
|
||
height: 8px;
|
||
}
|
||
.main-content::-webkit-scrollbar-track {
|
||
background:transparent;
|
||
}
|
||
.main-content::-webkit-scrollbar-thumb {
|
||
background-color: var(--border-color);
|
||
}
|
||
|
||
.section-gap.section-tag {
|
||
border-bottom:1px solid var(--border-color);
|
||
}
|
||
.section-gap,
|
||
.section-gap--focused-mode,
|
||
.section-gap--read-mode {
|
||
padding: 0px 4px;
|
||
}
|
||
.section-tag-header {
|
||
position:relative;
|
||
cursor: n-resize;
|
||
padding: 12px 0;
|
||
}
|
||
.collapsed .section-tag-header:hover {
|
||
cursor: s-resize;
|
||
}
|
||
|
||
.section-tag-header:hover {
|
||
background-image: linear-gradient(to right, rgba(0,0,0,0), var(--border-color), rgba(0,0,0,0));
|
||
}
|
||
|
||
.section-tag-header:hover::after {
|
||
position:absolute;
|
||
margin-left:-24px;
|
||
font-size:20px;
|
||
top: calc(50% - 14px);
|
||
color:var(--primary-color);
|
||
content: '⬆';
|
||
}
|
||
|
||
.collapsed .section-tag-header::after {
|
||
position:absolute;
|
||
margin-left:-24px;
|
||
font-size:20px;
|
||
top: calc(50% - 14px);
|
||
color: var(--border-color);
|
||
content: '⬇';
|
||
}
|
||
.collapsed .section-tag-header:hover::after {
|
||
color:var(--primary-color);
|
||
}
|
||
|
||
.collapsed .section-tag-body {
|
||
display:none;
|
||
}
|
||
|
||
.logo {
|
||
height:36px;
|
||
width:36px;
|
||
margin-left:5px;
|
||
}
|
||
.only-large-screen-flex,
|
||
.only-large-screen {
|
||
display:none;
|
||
}
|
||
.tag.title {
|
||
text-transform: uppercase;
|
||
}
|
||
.main-header {
|
||
background-color:var(--header-bg);
|
||
color:var(--header-fg);
|
||
width:100%;
|
||
}
|
||
.header-title {
|
||
font-size:calc(var(--font-size-regular) + 8px);
|
||
padding:0 8px;
|
||
}
|
||
input.header-input{
|
||
background:var(--header-color-darker);
|
||
color:var(--header-fg);
|
||
border:1px solid var(--header-color-border);
|
||
flex:1;
|
||
padding-right:24px;
|
||
border-radius:3px;
|
||
}
|
||
input.header-input::placeholder {
|
||
opacity:0.4;
|
||
}
|
||
.loader {
|
||
margin: 16px auto 16px auto;
|
||
border: 4px solid var(--bg3);
|
||
border-radius: 50%;
|
||
border-top: 4px solid var(--primary-color);
|
||
width: 36px;
|
||
height: 36px;
|
||
animation: spin 2s linear infinite;
|
||
}
|
||
.expanded-endpoint-body {
|
||
position: relative;
|
||
padding: 6px 0px;
|
||
}
|
||
.expanded-endpoint-body .tag-description {
|
||
background: var(--code-bg);
|
||
border-radius: var(--border-radius);
|
||
transition: max-height .2s ease-out;
|
||
}
|
||
.expanded-endpoint-body .tag-icon {
|
||
transition: transform .2s ease-out;
|
||
}
|
||
.expanded-endpoint-body .tag-icon.expanded {
|
||
transform: rotate(180deg);
|
||
}
|
||
.divider {
|
||
border-top: 2px solid var(--border-color);
|
||
margin: 24px 0;
|
||
width:100%;
|
||
}
|
||
|
||
.tooltip {
|
||
cursor:pointer;
|
||
border: 1px solid var(--border-color);
|
||
border-left-width: 4px;
|
||
margin-left:2px;
|
||
}
|
||
.tooltip a {
|
||
color: var(--fg2);
|
||
text-decoration: none;
|
||
}
|
||
.tooltip-text {
|
||
color: var(--fg2);
|
||
max-width: 400px;
|
||
position: absolute;
|
||
z-index:1;
|
||
background-color: var(--bg2);
|
||
visibility: hidden;
|
||
|
||
overflow-wrap: break-word;
|
||
}
|
||
.tooltip:hover {
|
||
color: var(--primary-color);
|
||
border-color: var(--primary-color);
|
||
}
|
||
.tooltip:hover a:hover {
|
||
color: var(--primary-color);
|
||
}
|
||
|
||
.tooltip:hover .tooltip-text {
|
||
visibility: visible;
|
||
}
|
||
|
||
@keyframes spin {
|
||
0% { transform: rotate(0deg); }
|
||
100% { transform: rotate(360deg); }
|
||
}
|
||
|
||
.nav-method { font-weight: bold; margin-right: 4px; font-size: calc(var(--font-size-small) - 2px); white-space: nowrap; }
|
||
.nav-method.false { display: none; }
|
||
|
||
.nav-method.as-colored-text.get { color:var(--nav-get-color); }
|
||
.nav-method.as-colored-text.put { color:var(--nav-put-color); }
|
||
.nav-method.as-colored-text.post { color:var(--nav-post-color); }
|
||
.nav-method.as-colored-text.delete { color:var(--nav-delete-color); }
|
||
.nav-method.as-colored-text.head, .nav-method.as-colored-text.patch, .nav-method.as-colored-text.options { color:var(--nav-head-color); }
|
||
|
||
.nav-method.as-colored-block {
|
||
padding: 1px 4px;
|
||
min-width: 30px;
|
||
border-radius: 4px 0 0 4px;
|
||
color: #000;
|
||
}
|
||
.colored-block .nav-method.as-colored-block {
|
||
outline: 1px solid;
|
||
}
|
||
|
||
.nav-method.as-colored-block.get { background-color: var(--blue); }
|
||
.nav-method.as-colored-block.put { background-color: var(--orange); }
|
||
.nav-method.as-colored-block.post { background-color: var(--green); }
|
||
.nav-method.as-colored-block.delete { background-color: var(--red); }
|
||
.nav-method.as-colored-block.head, .nav-method.as-colored-block.patch , .nav-method.as-colored-block.options {
|
||
background-color: var(--yellow);
|
||
}
|
||
|
||
@container (min-width: 768px) {
|
||
.nav-bar {
|
||
width: 260px;
|
||
display:flex;
|
||
}
|
||
.only-large-screen {
|
||
display:block;
|
||
}
|
||
.only-large-screen-flex {
|
||
display:flex;
|
||
}
|
||
.section-gap {
|
||
padding: 0 0 0 24px;
|
||
}
|
||
.section-gap--focused-mode {
|
||
padding: 24px 8px;
|
||
}
|
||
.section-gap--read-mode {
|
||
padding: 24px 8px;
|
||
}
|
||
.endpoint-body {
|
||
position: relative;
|
||
padding:36px 0 48px 0;
|
||
}
|
||
}
|
||
|
||
@container (min-width: 1024px) {
|
||
.nav-bar {
|
||
width: ${T(this.fontSize==="default"?"300px":this.fontSize==="large"?"315px":"330px")};
|
||
display:flex;
|
||
}
|
||
.section-gap--focused-mode {
|
||
padding: 12px 80px 12px 80px;
|
||
}
|
||
.section-gap--read-mode {
|
||
padding: 24px 80px 12px 80px;
|
||
}
|
||
}`,fc]}connectedCallback(){super.connectedCallback();const n=this.parentElement;if(n&&(n.offsetWidth===0&&n.style.width===""&&(n.style.width="100vw"),n.offsetHeight===0&&n.style.height===""&&(n.style.height="100vh"),n.tagName==="BODY"&&(n.style.marginTop||(n.style.marginTop="0"),n.style.marginRight||(n.style.marginRight="0"),n.style.marginBottom||(n.style.marginBottom="0"),n.style.marginLeft||(n.style.marginLeft="0"))),this.loadFonts!=="false"){const i={family:"Open Sans",style:"normal",weight:"300",unicodeRange:"U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD"},l=new FontFace("Open Sans","url(https://fonts.gstatic.com/s/opensans/v18/mem5YaGs126MiZpBA-UN_r8OUuhpKKSTjw.woff2) format('woff2')",i);i.weight="600";const h=new FontFace("Open Sans","url(https://fonts.gstatic.com/s/opensans/v18/mem5YaGs126MiZpBA-UNirkOUuhpKKSTjw.woff2) format('woff2')",i);l.load().then((v=>{document.fonts.add(v)})),h.load().then((v=>{document.fonts.add(v)}))}this.layout&&"row, column,".includes(`${this.layout},`)||(this.layout="row"),this.renderStyle&&"read, view, focused,".includes(`${this.renderStyle},`)||(this.renderStyle="focused"),this.schemaStyle&&"tree, table,".includes(`${this.schemaStyle},`)||(this.schemaStyle="tree"),this.theme&&"light, dark,".includes(`${this.theme},`)||(this.theme=window.matchMedia&&window.matchMedia("(prefers-color-scheme: light)").matches?"light":"dark"),this.defaultSchemaTab&&"example, schema, model,".includes(`${this.defaultSchemaTab},`)?this.defaultSchemaTab==="model"&&(this.defaultSchemaTab="schema"):this.defaultSchemaTab="example",(!this.schemaExpandLevel||this.schemaExpandLevel<1)&&(this.schemaExpandLevel=99999),this.schemaDescriptionExpanded&&"true, false,".includes(`${this.schemaDescriptionExpanded},`)||(this.schemaDescriptionExpanded="false"),this.schemaHideReadOnly&&"default, never,".includes(`${this.schemaHideReadOnly},`)||(this.schemaHideReadOnly="default"),this.schemaHideWriteOnly&&"default, never,".includes(`${this.schemaHideWriteOnly},`)||(this.schemaHideWriteOnly="default"),this.fillRequestFieldsWithExample&&"true, false,".includes(`${this.fillRequestFieldsWithExample},`)||(this.fillRequestFieldsWithExample="true"),this.persistAuth&&"true, false,".includes(`${this.persistAuth},`)||(this.persistAuth="false"),this.responseAreaHeight||(this.responseAreaHeight="400px"),this.allowSearch&&"true, false,".includes(`${this.allowSearch},`)||(this.allowSearch="true"),this.allowAdvancedSearch&&"true, false,".includes(`${this.allowAdvancedSearch},`)||(this.allowAdvancedSearch="true"),this.allowTry&&"true, false,".includes(`${this.allowTry},`)||(this.allowTry="true"),this.apiKeyValue||(this.apiKeyValue="-"),this.apiKeyLocation||(this.apiKeyLocation="header"),this.apiKeyName||(this.apiKeyName=""),this.oauthReceiver||(this.oauthReceiver="oauth-receiver.html"),this.updateRoute&&"true, false,".includes(`${this.updateRoute},`)||(this.updateRoute="true"),this.routePrefix||(this.routePrefix="#"),this.sortTags&&"true, false,".includes(`${this.sortTags},`)||(this.sortTags="false"),this.sortSchemas&&"true, false,".includes(`${this.sortSchemas},`)||(this.sortSchemas="false"),this.generateMissingTags&&"true, false,".includes(`${this.generateMissingTags},`)||(this.generateMissingTags="false"),this.sortEndpointsBy&&"method, path, summary, none,".includes(`${this.sortEndpointsBy},`)||(this.sortEndpointsBy="path"),this.onNavTagClick&&"expand-collapse, show-description,".includes(`${this.onNavTagClick},`)||(this.onNavTagClick="expand-collapse"),this.navItemSpacing&&"compact, relaxed, default,".includes(`${this.navItemSpacing},`)||(this.navItemSpacing="default"),this.showMethodInNavBar&&"false, as-plain-text, as-colored-text, as-colored-block,".includes(`${this.showMethodInNavBar},`)||(this.showMethodInNavBar="false"),this.usePathInNavBar&&"true, false,".includes(`${this.usePathInNavBar},`)||(this.usePathInNavBar="false"),this.navActiveItemMarker&&"left-bar, colored-block".includes(`${this.navActiveItemMarker},`)||(this.navActiveItemMarker="left-bar"),this.fontSize&&"default, large, largest,".includes(`${this.fontSize},`)||(this.fontSize="default"),this.showInfo&&"true, false,".includes(`${this.showInfo},`)||(this.showInfo="true"),this.allowServerSelection&&"true, false,".includes(`${this.allowServerSelection},`)||(this.allowServerSelection="true"),this.allowAuthentication&&"true, false,".includes(`${this.allowAuthentication},`)||(this.allowAuthentication="true"),this.allowSchemaDescriptionExpandToggle&&"true, false,".includes(`${this.allowSchemaDescriptionExpandToggle},`)||(this.allowSchemaDescriptionExpandToggle="true"),this.showSideNav&&"true false".includes(this.showSideNav)||(this.showSideNav="true"),this.showComponents&&"true false".includes(this.showComponents)||(this.showComponents="false"),this.infoDescriptionHeadingsInNavBar&&"true, false,".includes(`${this.infoDescriptionHeadingsInNavBar},`)||(this.infoDescriptionHeadingsInNavBar="false"),this.fetchCredentials&&"omit, same-origin, include,".includes(`${this.fetchCredentials},`)||(this.fetchCredentials=""),this.scrollBehavior&&"smooth, auto,".includes(`${this.scrollBehavior},`)||(this.scrollBehavior="auto"),this.matchType&&"includes regex".includes(this.matchType)||(this.matchType="includes"),this.matchPaths||(this.matchPaths=""),this.removeEndpointsWithBadgeLabelAs||(this.removeEndpointsWithBadgeLabelAs=""),this.showAdvancedSearchDialog||(this.showAdvancedSearchDialog=!1),this.cssFile||(this.cssFile=null),this.cssClasses||(this.cssClasses=""),dt.setOptions({highlight:(i,l)=>sr().languages[l]?sr().highlight(i,sr().languages[l],l):i}),window.addEventListener("hashchange",(()=>{this.scrollToPath(this.getElementIDFromURL())}),!0)}disconnectedCallback(){this.intersectionObserver&&this.intersectionObserver.disconnect(),super.disconnectedCallback()}infoDescriptionHeadingRenderer(){const n=new dt.Renderer;return n.heading=(i,l,h,v)=>`<h${l} class="observe-me" id="${v.slug(h)}">${i}</h${l}>`,n}render(){const n=document.querySelector(`link[href*="${this.cssFile}"]`);return n&&this.shadowRoot.appendChild(n.cloneNode()),hM.call(this)}observeExpandedContent(){this.shadowRoot.querySelectorAll(".observe-me").forEach((n=>{this.intersectionObserver.observe(n)}))}attributeChangedCallback(n,i,l){if(n==="spec-url"&&i!==l&&window.setTimeout((async()=>{await this.loadSpec(l),this.gotoPath&&!window.location.hash&&this.scrollToPath(this.gotoPath)}),0),n!=="match-paths"&&n!=="match-type"&&n!=="remove-endpoints-with-badge-label-as"||i!==l&&window.setTimeout((async()=>{await this.loadSpec(this.specUrl)}),0),n==="render-style"&&(l==="read"?window.setTimeout((()=>{this.observeExpandedContent()}),100):this.intersectionObserver.disconnect()),n==="api-key-name"||n==="api-key-location"||n==="api-key-value"){let h=!1,v="",x="",w="";if(n==="api-key-name"?this.getAttribute("api-key-location")&&this.getAttribute("api-key-value")&&(v=l,x=this.getAttribute("api-key-location"),w=this.getAttribute("api-key-value"),h=!0):n==="api-key-location"?this.getAttribute("api-key-name")&&this.getAttribute("api-key-value")&&(x=l,v=this.getAttribute("api-key-name"),w=this.getAttribute("api-key-value"),h=!0):n==="api-key-value"&&this.getAttribute("api-key-name")&&this.getAttribute("api-key-location")&&(w=l,x=this.getAttribute("api-key-location"),v=this.getAttribute("api-key-name"),h=!0),h&&this.resolvedSpec){const C=this.resolvedSpec.securitySchemes.find(($=>$.securitySchemeId===po));C?(C.name=v,C.in=x,C.value=w,C.finalKeyValue=w):this.resolvedSpec.securitySchemes.push({securitySchemeId:po,description:"api-key provided in rapidoc element attributes",type:"apiKey",name:v,in:x,value:w,finalKeyValue:w}),this.requestUpdate()}}super.attributeChangedCallback(n,i,l)}onSpecUrlChange(){this.setAttribute("spec-url",this.shadowRoot.getElementById("spec-url").value)}onSpecFileChange(n){this.setAttribute("spec-file",this.shadowRoot.getElementById("spec-file").value);const i=n.target.files[0],l=new FileReader;l.onload=()=>{try{const h=JSON.parse(l.result);this.loadSpec(h),this.shadowRoot.getElementById("spec-url").value=""}catch{console.error("RapiDoc: Unable to read or parse json")}},l.readAsText(i)}onFileLoadClick(){this.shadowRoot.getElementById("spec-file").click()}onSearchChange(n){this.searchVal=n.target.value,this.resolvedSpec.tags.forEach((i=>i.paths.filter((l=>{this.searchVal&&th(this.searchVal,l,i.name)&&(i.expanded=!0)})))),this.resolvedSpec.components.forEach((i=>i.subComponents.filter((l=>{l.expanded=!1,(function(h,v){return v.name.toLowerCase().includes(h.toLowerCase())})(this.searchVal,l)&&(l.expanded=!0)})))),this.requestUpdate()}onClearSearch(){this.shadowRoot.getElementById("nav-bar-search").value="",this.searchVal="",this.resolvedSpec.components.forEach((n=>n.subComponents.filter((i=>{i.expanded=!0}))))}onShowSearchModalClicked(){this.showAdvancedSearchDialog=!0}async onOpenSearchDialog(n){const i=n.detail.querySelector("input");await Cu(0),i&&i.focus()}async loadSpec(n){if(n){this.searchVal="";try{this.resolvedSpec={specLoadError:!1,isSpecLoading:!0,tags:[]},this.loading=!0,this.loadFailed=!1;const i=await pR.call(this,n,this.generateMissingTags==="true",this.sortTags==="true",this.sortSchemas==="true",this.getAttribute("sort-endpoints-by"),this.getAttribute("api-key-name"),this.getAttribute("api-key-location"),this.getAttribute("api-key-value"),this.getAttribute("server-url"),this.matchPaths,this.matchType,this.removeEndpointsWithBadgeLabelAs);this.loading=!1,this.afterSpecParsedAndValidated(i)}catch(i){this.loading=!1,this.loadFailed=!0,this.resolvedSpec=null,console.error(`RapiDoc: Unable to resolve the API spec.. ${i.message}`)}}}async afterSpecParsedAndValidated(n){for(this.resolvedSpec=n,this.selectedServer=void 0,this.defaultApiServerUrl&&(this.defaultApiServerUrl===this.serverUrl?this.selectedServer={url:this.serverUrl,computedUrl:this.serverUrl}:this.resolvedSpec.servers&&(this.selectedServer=this.resolvedSpec.servers.find((v=>v.url===this.defaultApiServerUrl)))),this.selectedServer||this.resolvedSpec.servers&&(this.selectedServer=this.resolvedSpec.servers[0]),this.requestUpdate();!await this.updateComplete;);const i=new CustomEvent("spec-loaded",{detail:n});this.dispatchEvent(i),this.intersectionObserver.disconnect(),this.renderStyle==="read"&&(await Cu(100),this.observeExpandedContent()),this.isIntersectionObserverActive=!0;const l=this.getElementIDFromURL();if(l)this.renderStyle==="view"?this.expandAndGotoOperation(l,!0,!0):this.scrollToPath(l);else if(this.renderStyle==="focused"&&!this.gotoPath){var h;const v=this.showInfo?"overview":(h=this.resolvedSpec.tags[0])===null||h===void 0?void 0:h.paths[0];this.scrollToPath(v)}}getComponentBaseURL(){const{href:n}=window.location,i=this.routePrefix.replace(/(#|\/)$/,"");if(!i)return n.split("#")[0];const l=n.lastIndexOf(i);return l===-1?n:n.slice(0,l)}getElementIDFromURL(){const n=this.getComponentBaseURL();return window.location.href.replace(n+this.routePrefix,"")}replaceHistoryState(n){const i=this.getComponentBaseURL();window.history.replaceState(null,null,`${i}${this.routePrefix||"#"}${n}`)}expandAndGotoOperation(n,i=!0){if(!this.resolvedSpec)return;let l=!0;const h=n.indexOf("#")===-1?n:n.substring(1);if(h.startsWith("overview")||h==="servers"||h==="auth")l=!1;else for(let w=0;w<((v=this.resolvedSpec.tags)===null||v===void 0?void 0:v.length);w++){var v,x;const C=this.resolvedSpec.tags[w],$=(x=C.paths)===null||x===void 0?void 0:x.find((N=>N.elementId===n));$&&($.expanded&&C.expanded?l=!1:($.expanded=!0,C.expanded=!0))}i&&(l&&this.requestUpdate(),window.setTimeout((()=>{const w=this.shadowRoot.getElementById(h);w&&(w.scrollIntoView({behavior:this.scrollBehavior,block:"start"}),this.updateRoute==="true"&&this.replaceHistoryState(h))}),l?150:0))}isValidTopId(n){return n.startsWith("overview")||n==="servers"||n==="auth"}isValidPathId(n){var i,l;return!(n!=="overview"||!this.showInfo)||!(n!=="servers"||!this.allowServerSelection)||!(n!=="auth"||!this.allowAuthentication)||(n.startsWith("tag--")?(l=this.resolvedSpec)===null||l===void 0||(l=l.tags)===null||l===void 0?void 0:l.find((h=>h.elementId===n)):(i=this.resolvedSpec)===null||i===void 0||(i=i.tags)===null||i===void 0?void 0:i.find((h=>h.paths.find((v=>v.elementId===n)))))}onIntersect(n){this.isIntersectionObserverActive!==!1&&n.forEach((i=>{if(i.isIntersecting&&i.intersectionRatio>0){const l=this.shadowRoot.querySelector(".nav-bar-tag.active, .nav-bar-path.active, .nav-bar-info.active, .nav-bar-h1.active, .nav-bar-h2.active, .operations.active"),h=this.shadowRoot.getElementById(`link-${i.target.id}`);h&&(this.updateRoute==="true"&&this.replaceHistoryState(i.target.id),h.scrollIntoView({behavior:this.scrollBehavior,block:"center"}),h.classList.add("active"),h.part.add("section-navbar-active-item")),l&&l!==h&&(l.classList.remove("active"),l.part.remove("section-navbar-active-item"))}}))}handleHref(n){if(n.target.tagName.toLowerCase()==="a"&&n.target.getAttribute("href").startsWith("#")){const i=this.shadowRoot.getElementById(n.target.getAttribute("href").replace("#",""));i&&i.scrollIntoView({behavior:this.scrollBehavior,block:"start"})}}async scrollToEventTarget(n,i=!0){if(n.type!=="click"&&(n.type!=="keyup"||n.keyCode!==13))return;const l=n.target;if(l.dataset.contentId){if(this.isIntersectionObserverActive=!1,this.renderStyle==="focused"){const h=this.shadowRoot.querySelector("api-request");h&&h.beforeNavigationFocusedMode()}this.scrollToPath(l.dataset.contentId,!0,i),setTimeout((()=>{this.isIntersectionObserverActive=!0}),300)}}async scrollToPath(n,i=!0,l=!0){if(this.renderStyle==="focused"&&(this.focusedElementId=n,await Cu(0)),this.renderStyle==="view")this.expandAndGotoOperation(n,i,!0);else{let h=!1;const v=this.shadowRoot.getElementById(n);if(v?(h=!0,v.scrollIntoView({behavior:this.scrollBehavior,block:"start"})):h=!1,h){if(this.renderStyle==="focused"){const w=this.shadowRoot.querySelector("api-request");w&&w.afterNavigationFocusedMode();const C=this.shadowRoot.querySelector("api-response");C&&C.resetSelection()}this.updateRoute==="true"&&this.replaceHistoryState(n);const x=this.shadowRoot.getElementById(`link-${n}`);if(x){l&&x.scrollIntoView({behavior:this.scrollBehavior,block:"center"}),await Cu(0);const w=this.shadowRoot.querySelector(".nav-bar-tag.active, .nav-bar-path.active, .nav-bar-info.active, .nav-bar-h1.active, .nav-bar-h2.active, .operations.active");w&&(w.classList.remove("active"),w.part.remove("active"),w.part.remove("section-navbar-active-item")),x.classList.add("active"),x.part.add("section-navbar-active-item")}}}}setHttpUserNameAndPassword(n,i,l){return up.call(this,n,i,l)}setApiKey(n,i){return up.call(this,n,"","",i)}removeAllSecurityKeys(){return vR.call(this)}setApiServer(n){return jR.call(this,n)}onAdvancedSearch(n,i){const l=n.target;clearTimeout(this.timeoutId),this.timeoutId=setTimeout((()=>{let h;h=l.type==="text"?l:l.closest(".advanced-search-options").querySelector("input[type=text]");const v=[...l.closest(".advanced-search-options").querySelectorAll("input:checked")].map((x=>x.id));this.advancedSearchMatches=(function(x,w,C=[]){if(!x.trim()||C.length===0)return;const $=[];return w.forEach((N=>{N.paths.forEach((_=>{let F="";var U;if(C.includes("search-api-path")&&(F=_.path),C.includes("search-api-descr")&&(F=`${F} ${(_.summary||"")+(_.description||"")}`),C.includes("search-api-params")&&(F=`${F} ${((U=_.parameters)===null||U===void 0?void 0:U.map((P=>P.name)).join(" "))||""}`),C.includes("search-api-request-body")&&_.requestBody){let P=new Set;for(const se in(J=_.requestBody)===null||J===void 0?void 0:J.content){var J,Y,Z;(Y=_.requestBody.content[se].schema)!==null&&Y!==void 0&&Y.properties&&(P=Js((Z=_.requestBody.content[se].schema)===null||Z===void 0?void 0:Z.properties)),F=`${F} ${[...P].join(" ")}`}}C.includes("search-api-resp-descr")&&(F=`${F} ${Object.values(_.responses).map((P=>P.description||"")).join(" ")}`),F.toLowerCase().includes(x.trim().toLowerCase())&&$.push({elementId:_.elementId,method:_.method,path:_.path,summary:_.summary||_.description||"",deprecated:_.deprecated})}))})),$})(h.value,this.resolvedSpec.tags,v)}),i)}}customElements.define("rapi-doc",oY),customElements.define("rapi-doc-mini",class extends Ht{constructor(){super(),this.isMini=!0,this.updateRoute="false",this.renderStyle="view",this.showHeader="false",this.allowAdvancedSearch="false"}static get properties(){return{specUrl:{type:String,attribute:"spec-url"},sortEndpointsBy:{type:String,attribute:"sort-endpoints-by"},layout:{type:String},pathsExpanded:{type:String,attribute:"paths-expanded"},defaultSchemaTab:{type:String,attribute:"default-schema-tab"},responseAreaHeight:{type:String,attribute:"response-area-height"},showSummaryWhenCollapsed:{type:String,attribute:"show-summary-when-collapsed"},fillRequestFieldsWithExample:{type:String,attribute:"fill-request-fields-with-example"},persistAuth:{type:String,attribute:"persist-auth"},schemaStyle:{type:String,attribute:"schema-style"},schemaExpandLevel:{type:Number,attribute:"schema-expand-level"},schemaDescriptionExpanded:{type:String,attribute:"schema-description-expanded"},apiKeyName:{type:String,attribute:"api-key-name"},apiKeyLocation:{type:String,attribute:"api-key-location"},apiKeyValue:{type:String,attribute:"api-key-value"},defaultApiServerUrl:{type:String,attribute:"default-api-server"},serverUrl:{type:String,attribute:"server-url"},oauthReceiver:{type:String,attribute:"oauth-receiver"},allowTry:{type:String,attribute:"allow-try"},showCurlBeforeTry:{type:String,attribute:"show-curl-before-try"},theme:{type:String},bgColor:{type:String,attribute:"bg-color"},textColor:{type:String,attribute:"text-color"},primaryColor:{type:String,attribute:"primary-color"},fontSize:{type:String,attribute:"font-size"},regularFont:{type:String,attribute:"regular-font"},monoFont:{type:String,attribute:"mono-font"},loadFonts:{type:String,attribute:"load-fonts"},fetchCredentials:{type:String,attribute:"fetch-credentials"},matchPaths:{type:String,attribute:"match-paths"},matchType:{type:String,attribute:"match-type"},removeEndpointsWithBadgeLabelAs:{type:String,attribute:"remove-endpoints-with-badge-label-as"},loading:{type:Boolean}}}static get styles(){return[Si,Su,Eu,ju,Lg,pc,dl,va,Ws,M`
|
||
:host {
|
||
all: initial;
|
||
display:flex;
|
||
flex-direction: column;
|
||
min-width:360px;
|
||
width:100%;
|
||
height:100%;
|
||
margin:0;
|
||
padding:0;
|
||
overflow: hidden;
|
||
letter-spacing:normal;
|
||
color:var(--fg);
|
||
background-color:var(--bg);
|
||
font-family:var(--font-regular);
|
||
container-type: inline-size;
|
||
}
|
||
|
||
@container (min-width: 768px) {
|
||
.only-large-screen {
|
||
display:block;
|
||
}
|
||
.only-large-screen-flex {
|
||
display:flex;
|
||
}
|
||
}`]}connectedCallback(){if(super.connectedCallback(),this.loadFonts!=="false"){const t={family:"Open Sans",style:"normal",weight:"300",unicodeRange:"U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD"},n=new FontFace("Open Sans","url(https://fonts.gstatic.com/s/opensans/v18/mem5YaGs126MiZpBA-UN_r8OUuhpKKSTjw.woff2) format('woff2')",t);t.weight="600";const i=new FontFace("Open Sans","url(https://fonts.gstatic.com/s/opensans/v18/mem5YaGs126MiZpBA-UNirkOUuhpKKSTjw.woff2) format('woff2')",t);n.load().then((l=>{document.fonts.add(l)})),i.load().then((l=>{document.fonts.add(l)}))}this.showSummaryWhenCollapsed&&"true, false,".includes(`${this.showSummaryWhenCollapsed},`)||(this.showSummaryWhenCollapsed="true"),this.layout&&"row, column,".includes(`${this.layout},`)||(this.layout="row"),this.schemaStyle&&"tree, table,".includes(`${this.schemaStyle},`)||(this.schemaStyle="tree"),this.theme&&"light, dark,".includes(`${this.theme},`)||(this.theme=window.matchMedia&&window.matchMedia("(prefers-color-scheme: light)").matches?"light":"dark"),this.defaultSchemaTab&&"example, schema, model,".includes(`${this.defaultSchemaTab},`)?this.defaultSchemaTab==="model"&&(this.defaultSchemaTab="schema"):this.defaultSchemaTab="example",this.pathsExpanded=this.pathsExpanded==="true",(!this.schemaExpandLevel||this.schemaExpandLevel<1)&&(this.schemaExpandLevel=99999),this.schemaDescriptionExpanded&&"true, false,".includes(`${this.schemaDescriptionExpanded},`)||(this.schemaDescriptionExpanded="false"),this.fillRequestFieldsWithExample&&"true, false,".includes(`${this.fillRequestFieldsWithExample},`)||(this.fillRequestFieldsWithExample="true"),this.persistAuth&&"true, false,".includes(`${this.persistAuth},`)||(this.persistAuth="false"),this.responseAreaHeight||(this.responseAreaHeight="300px"),this.allowTry&&"true, false,".includes(`${this.allowTry},`)||(this.allowTry="true"),this.apiKeyValue||(this.apiKeyValue="-"),this.apiKeyLocation||(this.apiKeyLocation="header"),this.apiKeyName||(this.apiKeyName=""),this.oauthReceiver||(this.oauthReceiver="oauth-receiver.html"),this.sortTags&&"true, false,".includes(`${this.sortTags},`)||(this.sortTags="false"),this.sortEndpointsBy&&"method, path, summary,".includes(`${this.sortEndpointsBy},`)||(this.sortEndpointsBy="path"),this.fontSize&&"default, large, largest,".includes(`${this.fontSize},`)||(this.fontSize="default"),this.matchType&&"includes regex".includes(this.matchType)||(this.matchType="includes"),this.matchPaths||(this.matchPaths=""),this.removeEndpointsWithBadgeLabelAs||(this.removeEndpointsWithBadgeLabelAs=""),this.allowSchemaDescriptionExpandToggle&&"true, false,".includes(`${this.allowSchemaDescriptionExpandToggle},`)||(this.allowSchemaDescriptionExpandToggle="true"),this.fetchCredentials&&"omit, same-origin, include,".includes(`${this.fetchCredentials},`)||(this.fetchCredentials=""),dt.setOptions({highlight:(t,n)=>sr().languages[n]?sr().highlight(t,sr().languages[n],n):t})}render(){return hM.call(this,!0,this.pathsExpanded)}attributeChangedCallback(t,n,i){if(t==="spec-url"&&n!==i&&window.setTimeout((async()=>{await this.loadSpec(i)}),0),t!=="match-paths"&&t!=="match-type"&&t!=="remove-endpoints-with-badge-label-as"||n!==i&&window.setTimeout((async()=>{await this.loadSpec(this.specUrl)}),0),t==="api-key-name"||t==="api-key-location"||t==="api-key-value"){let l=!1,h="",v="",x="";if(t==="api-key-name"?this.getAttribute("api-key-location")&&this.getAttribute("api-key-value")&&(h=i,v=this.getAttribute("api-key-location"),x=this.getAttribute("api-key-value"),l=!0):t==="api-key-location"?this.getAttribute("api-key-name")&&this.getAttribute("api-key-value")&&(v=i,h=this.getAttribute("api-key-name"),x=this.getAttribute("api-key-value"),l=!0):t==="api-key-value"&&this.getAttribute("api-key-name")&&this.getAttribute("api-key-location")&&(x=i,v=this.getAttribute("api-key-location"),h=this.getAttribute("api-key-name"),l=!0),l&&this.resolvedSpec){const w=this.resolvedSpec.securitySchemes.find((C=>C.securitySchemeId===po));w?(w.name=h,w.in=v,w.value=x,w.finalKeyValue=x):this.resolvedSpec.securitySchemes.push({apiKeyId:po,description:"api-key provided in rapidoc element attributes",type:"apiKey",name:h,in:v,value:x,finalKeyValue:x}),this.requestUpdate()}}super.attributeChangedCallback(t,n,i)}onSpecUrlChange(){this.setAttribute("spec-url",this.shadowRoot.getElementById("spec-url").value)}async loadSpec(t){if(t)try{this.resolvedSpec={specLoadError:!1,isSpecLoading:!0,tags:[]},this.loading=!0,this.loadFailed=!1,this.requestUpdate();const n=await pR.call(this,t,this.generateMissingTags==="true",this.sortTags==="true",this.sortSchemas==="true",this.getAttribute("sort-endpoints-by"),this.getAttribute("api-key-name"),this.getAttribute("api-key-location"),this.getAttribute("api-key-value"),this.getAttribute("server-url"),this.matchPaths,this.matchType,this.removeEndpointsWithBadgeLabelAs);this.loading=!1,this.afterSpecParsedAndValidated(n)}catch(n){this.loading=!1,this.loadFailed=!0,this.resolvedSpec=null,console.error(`RapiDoc: Unable to resolve the API spec.. ${n.message}`)}}setHttpUserNameAndPassword(t,n,i){return up.call(this,t,n,i)}setApiKey(t,n){return up.call(this,t,"","",n)}removeAllSecurityKeys(){return vR.call(this)}setApiServer(t){return jR.call(this,t)}async afterSpecParsedAndValidated(t){for(this.resolvedSpec=t,this.selectedServer=void 0,this.defaultApiServerUrl&&(this.defaultApiServerUrl===this.serverUrl?this.selectedServer={url:this.serverUrl,computedUrl:this.serverUrl}:this.resolvedSpec.servers&&(this.selectedServer=this.resolvedSpec.servers.find((i=>i.url===this.defaultApiServerUrl)))),this.selectedServer||this.resolvedSpec.servers&&(this.selectedServer=this.resolvedSpec.servers[0]),this.requestUpdate();!await this.updateComplete;);const n=new CustomEvent("spec-loaded",{detail:t});this.dispatchEvent(n)}handleHref(t){if(t.target.tagName.toLowerCase()==="a"&&t.target.getAttribute("href").startsWith("#")){const n=this.shadowRoot.getElementById(t.target.getAttribute("href").replace("#",""));n&&n.scrollIntoView({behavior:"auto",block:"start"})}}});class lY extends HTMLElement{connectedCallback(){this.receiveAuthParms(),window.addEventListener("storage",(n=>this.receiveStorage(n)),!0)}receiveAuthParms(){let n={};if(document.location.search){const i=new URLSearchParams(document.location.search);n={code:i.get("code"),error:i.get("error"),state:i.get("state"),responseType:"code"}}else window.location.hash&&(n={token_type:this.parseQueryString(window.location.hash.substring(1),"token_type"),access_token:this.parseQueryString(window.location.hash.substring(1),"access_token"),responseType:"token"});window.opener?window.opener.postMessage(n,this.target):sessionStorage.setItem("rapidoc-oauth-data",JSON.stringify(n))}relayAuthParams(n){if(window.parent&&n.key==="rapidoc-oauth-data"){const i=JSON.parse(n.newValue);window.parent.postMessage(i,this.target)}}parseQueryString(n,i){const l=n.split("&");for(let h=0;h<l.length;h++){const v=l[h].split("=");if(decodeURIComponent(v[0])===i)return decodeURIComponent(v[1])}}}function cY(){return V`
|
||
<nav class='nav-bar' part="section-navbar">
|
||
<slot name="nav-logo" class="logo"></slot>
|
||
<div style="display:flex;line-height:22px; padding:8px">
|
||
<input id="nav-bar-search"
|
||
part = "textbox textbox-nav-filter"
|
||
style = "width:100%; height: 26px; padding-right:20px; color:var(--nav-hover-text-color); border-color:var(--nav-accent-color); background-color:var(--nav-hover-bg-color)"
|
||
type = "text"
|
||
placeholder = "Filter"
|
||
@change = "${this.onSearchChange}"
|
||
spellcheck = "false"
|
||
>
|
||
<div style="margin: 6px 5px 0 -24px; font-size:var(--font-size-regular); cursor:pointer;">↩</div>
|
||
</div>
|
||
<nav style="flex:1" class='nav-scroll' part="section-navbar-scroll">
|
||
${this.resolvedSpec.schemaAndExamples.map((t=>V`
|
||
<div class='nav-bar-path' data-content-id='${t.elementId}' id='link-${t.elementId}'
|
||
@click = '${n=>{this.scrollToEventTarget(n,!1)}}'
|
||
>
|
||
${t.name}
|
||
</div>`))}
|
||
</nav>
|
||
</nav>
|
||
`}function uY(){return V`
|
||
${this.showInfo==="true"?PE.call(this):""}
|
||
<div style="font-size:var(--font-size-regular);">
|
||
${this.resolvedSpec.schemaAndExamples.map((t=>{var n;const i=qm(t.schema,"json",aa(t.examples),aa(t.example),!0,!1,"json",!0);return t.selectedExample=(n=i[0])===null||n===void 0?void 0:n.exampleId,V`
|
||
<section id='${t.elementId}' class='json-schema-and-example regular-font' style="display:flex; flex-direction: column; border:1px solid var(--border-color); margin-bottom:32px; border-top: 5px solid var(--border-color)">
|
||
<div style="padding:16px; border-bottom: 1px solid var(--border-color)">
|
||
<div style="font-size:var(--font-size-small); font-weight:bold">${t.name}</div>
|
||
<span class="json-schema-description m-markdown ">${Mn(dt(t.description||""))}</span>
|
||
</div>
|
||
<div style="display:flex; flex-direction: row; gap:16px;">
|
||
<div class="json-schema-def" style="flex:1; padding:16px 0 16px 16px; ">
|
||
<schema-tree
|
||
.data = "${ts(t.schema,{})}"
|
||
schema-expand-level = "${this.schemaExpandLevel}"
|
||
schema-description-expanded = "${this.schemaDescriptionExpanded}"
|
||
allow-schema-description-expand-toggle = "${this.allowSchemaDescriptionExpandToggle}"
|
||
schema-hide-read-only = "false"
|
||
schema-hide-write-only = "false"
|
||
> </schema-tree>
|
||
</div>
|
||
<div class="json-schema-example-panel" style="width:400px; background-color: var(--input-bg); padding:16px 0 16px 16px; border-left: 1px dashed var(--border-color);">
|
||
${i.length>1?V`<select style="min-width:100px; max-width:100%" @change='${l=>this.onSelectExample(l,t)}'>
|
||
${i.map((l=>V`
|
||
<option value="${l.exampleId}" ?selected=${l.exampleId===t.selectedExample}>
|
||
${l.exampleSummary.length>80?l.exampleId:l.exampleSummary}
|
||
</option>`))}
|
||
</select>`:V`<div style="font-size: var(--font-size-small);font-weight:700; margin:5px 0"> ${i[0].exampleSummary}</div>`}
|
||
${i.map((l=>V`
|
||
<json-tree
|
||
.data = "${l.exampleValue}"
|
||
data-example = "${l.exampleId}"
|
||
class = "example"
|
||
style = "margin-top:16px; display: ${l.exampleId===t.selectedExample?"flex":"none"}"
|
||
></json-tree>`))}
|
||
</div>
|
||
</div>
|
||
</section>`}))}
|
||
</div>
|
||
`}function dY(t=!1){if(!this.resolvedSpec)return"";const n={bg1:ds(this.bgColor)?this.bgColor:"",fg1:ds(this.textColor)?this.textColor:"",headerColor:ds(this.headerColor)?this.headerColor:"",primaryColor:ds(this.primaryColor)?this.primaryColor:"",navBgColor:ds(this.navBgColor)?this.navBgColor:"",navTextColor:ds(this.navTextColor)?this.navTextColor:"",navHoverBgColor:ds(this.navHoverBgColor)?this.navHoverBgColor:"",navHoverTextColor:ds(this.navHoverTextColor)?this.navHoverTextColor:"",navAccentColor:ds(this.navAccentColor)?this.navAccentColor:"",navAccenttextColor:ds(this.navAccentTextColor)?this.navAccentTextColor:""};return this.resolvedSpec.specLoadError?t?V`
|
||
${this.theme==="dark"?oa.call(this,"dark",n):oa.call(this,"light",n)}
|
||
<div style="display:flex; align-items:center; border:1px dashed var(--border-color); height:42px; padding:5px; font-size:var(--font-size-small); color:var(--red); font-family:var(--font-mono)"> ${this.resolvedSpec.info.description} </div>
|
||
`:V`
|
||
${this.theme==="dark"?oa.call(this,"dark",n):oa.call(this,"light",n)}
|
||
<!-- Header -->
|
||
${CR.call(this)}
|
||
<h1> Header </h1>
|
||
<main class="main-content regular-font" part="section-main-content">
|
||
<slot></slot>
|
||
<div style="margin:24px; text-align: center;">
|
||
<h1 style="color: var(--red)"> ${this.resolvedSpec.info.title} </h1>
|
||
<div style="font-family:var(--font-mono)"> ${this.resolvedSpec.info.description} </div>
|
||
</div>
|
||
</main>
|
||
`:this.resolvedSpec.isSpecLoading?V`
|
||
${this.theme==="dark"?oa.call(this,"dark",n):oa.call(this,"light",n)}
|
||
<main class="main-content regular-font" part="section-main-content">
|
||
<slot></slot>
|
||
<div class="main-content-inner--${this.renderStyle}-mode">
|
||
<div class="loader"></div>
|
||
</div>
|
||
</main>
|
||
`:V`
|
||
${this.theme==="dark"?oa.call(this,"dark",n):oa.call(this,"light",n)}
|
||
|
||
<!-- Header -->
|
||
${this.showHeader==="false"?"":CR.call(this)}
|
||
|
||
<div id='the-main-body' class="body ${this.cssClasses}" dir= ${this.pageDirection}>
|
||
|
||
<!-- Side Nav -->
|
||
${cY.call(this)}
|
||
|
||
<!-- Main Content -->
|
||
<main class="main-content regular-font" part="section-main-content">
|
||
<slot></slot>
|
||
<div class="main-content-inner--${this.renderStyle}-mode">
|
||
${this.loading===!0?V`<div class="loader"></div>`:V`
|
||
${this.loadFailed===!0?V`<div style="text-align: center;margin: 16px;"> Unable to load the Spec</div>`:V`
|
||
<div class="operations-root" @click="${i=>{this.handleHref(i)}}">
|
||
${uY.call(this)}
|
||
</div>
|
||
`}`}
|
||
</div>
|
||
<slot name="footer"></slot>
|
||
</main>
|
||
</div>
|
||
`}customElements.define("oauth-receiver",lY),customElements.define("json-schema-viewer",class extends Ht{constructor(){super(),this.isMini=!1,this.updateRoute="false",this.renderStyle="focused",this.showHeader="true",this.allowAdvancedSearch="false",this.selectedExampleForEachSchema={}}static get properties(){return{specUrl:{type:String,attribute:"spec-url"},schemaStyle:{type:String,attribute:"schema-style"},schemaExpandLevel:{type:Number,attribute:"schema-expand-level"},schemaDescriptionExpanded:{type:String,attribute:"schema-description-expanded"},allowSchemaDescriptionExpandToggle:{type:String,attribute:"allow-schema-description-expand-toggle"},showHeader:{type:String,attribute:"show-header"},showSideNav:{type:String,attribute:"show-side-nav"},showInfo:{type:String,attribute:"show-info"},allowSpecUrlLoad:{type:String,attribute:"allow-spec-url-load"},allowSpecFileLoad:{type:String,attribute:"allow-spec-file-load"},allowSpecFileDownload:{type:String,attribute:"allow-spec-file-download"},allowSearch:{type:String,attribute:"allow-search"},theme:{type:String},bgColor:{type:String,attribute:"bg-color"},textColor:{type:String,attribute:"text-color"},primaryColor:{type:String,attribute:"primary-color"},fontSize:{type:String,attribute:"font-size"},regularFont:{type:String,attribute:"regular-font"},monoFont:{type:String,attribute:"mono-font"},loadFonts:{type:String,attribute:"load-fonts"},loading:{type:Boolean}}}static get styles(){return[Si,Su,Eu,ju,Lg,pc,dl,va,Ws,M`
|
||
:host {
|
||
all: initial;
|
||
display:flex;
|
||
flex-direction: column;
|
||
min-width:360px;
|
||
width:100%;
|
||
height:100%;
|
||
margin:0;
|
||
padding:0;
|
||
overflow: hidden;
|
||
letter-spacing:normal;
|
||
color:var(--fg);
|
||
background-color:var(--bg);
|
||
font-family:var(--font-regular);
|
||
container-type: inline-size;
|
||
}
|
||
.body {
|
||
display:flex;
|
||
height:100%;
|
||
width:100%;
|
||
overflow:hidden;
|
||
}
|
||
.nav-bar {
|
||
width: 230px;
|
||
display:flex;
|
||
}
|
||
|
||
.main-content {
|
||
margin:0;
|
||
padding: 16px;
|
||
display:block;
|
||
flex:1;
|
||
height:100%;
|
||
overflow-y: auto;
|
||
overflow-x: hidden;
|
||
scrollbar-width: thin;
|
||
scrollbar-color: var(--border-color) transparent;
|
||
}
|
||
.main-content-inner--view-mode {
|
||
padding: 0 8px;
|
||
}
|
||
.main-content::-webkit-scrollbar {
|
||
width: 8px;
|
||
height: 8px;
|
||
}
|
||
.main-content::-webkit-scrollbar-track {
|
||
background:transparent;
|
||
}
|
||
.main-content::-webkit-scrollbar-thumb {
|
||
background-color: var(--border-color);
|
||
}
|
||
.main-header {
|
||
background-color:var(--header-bg);
|
||
color:var(--header-fg);
|
||
width:100%;
|
||
}
|
||
.header-title {
|
||
font-size:calc(var(--font-size-regular) + 8px);
|
||
padding:0 8px;
|
||
}
|
||
input.header-input{
|
||
background:var(--header-color-darker);
|
||
color:var(--header-fg);
|
||
border:1px solid var(--header-color-border);
|
||
flex:1;
|
||
padding-right:24px;
|
||
border-radius:3px;
|
||
}
|
||
input.header-input::placeholder {
|
||
opacity:0.4;
|
||
}
|
||
.loader {
|
||
margin: 16px auto 16px auto;
|
||
border: 4px solid var(--bg3);
|
||
border-radius: 50%;
|
||
border-top: 4px solid var(--primary-color);
|
||
width: 36px;
|
||
height: 36px;
|
||
animation: spin 2s linear infinite;
|
||
}
|
||
@container (min-width: 768px) {
|
||
.only-large-screen{
|
||
display:block;
|
||
}
|
||
.only-large-screen-flex {
|
||
display:flex;
|
||
}
|
||
}`]}connectedCallback(){super.connectedCallback();const t=this.parentElement;if(t&&(t.offsetWidth===0&&t.style.width===""&&(t.style.width="100vw"),t.offsetHeight===0&&t.style.height===""&&(t.style.height="100vh"),t.tagName==="BODY"&&(t.style.marginTop||(t.style.marginTop="0"),t.style.marginRight||(t.style.marginRight="0"),t.style.marginBottom||(t.style.marginBottom="0"),t.style.marginLeft||(t.style.marginLeft="0"))),this.loadFonts!=="false"){const n={family:"Open Sans",style:"normal",weight:"300",unicodeRange:"U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD"},i=new FontFace("Open Sans","url(https://fonts.gstatic.com/s/opensans/v18/mem5YaGs126MiZpBA-UN_r8OUuhpKKSTjw.woff2) format('woff2')",n);n.weight="600";const l=new FontFace("Open Sans","url(https://fonts.gstatic.com/s/opensans/v18/mem5YaGs126MiZpBA-UNirkOUuhpKKSTjw.woff2) format('woff2')",n);i.load().then((h=>{document.fonts.add(h)})),l.load().then((h=>{document.fonts.add(h)}))}this.renderStyle="focused",this.pathsExpanded=this.pathsExpanded==="true",this.showInfo&&"true, false,".includes(`${this.showInfo},`)||(this.showInfo="true"),this.showSideNav&&"true false".includes(this.showSideNav)||(this.showSideNav="true"),this.showHeader&&"true, false,".includes(`${this.showHeader},`)||(this.showHeader="true"),this.schemaStyle&&"tree, table,".includes(`${this.schemaStyle},`)||(this.schemaStyle="tree"),this.theme&&"light, dark,".includes(`${this.theme},`)||(this.theme=window.matchMedia&&window.matchMedia("(prefers-color-scheme: light)").matches?"light":"dark"),this.allowSearch&&"true, false,".includes(`${this.allowSearch},`)||(this.allowSearch="true"),(!this.schemaExpandLevel||this.schemaExpandLevel<1)&&(this.schemaExpandLevel=99999),this.schemaDescriptionExpanded&&"true, false,".includes(`${this.schemaDescriptionExpanded},`)||(this.schemaDescriptionExpanded="false"),this.fontSize&&"default, large, largest,".includes(`${this.fontSize},`)||(this.fontSize="default"),this.matchType&&"includes regex".includes(this.matchType)||(this.matchType="includes"),this.allowSchemaDescriptionExpandToggle&&"true, false,".includes(`${this.allowSchemaDescriptionExpandToggle},`)||(this.allowSchemaDescriptionExpandToggle="true"),dt.setOptions({highlight:(n,i)=>sr().languages[i]?sr().highlight(n,sr().languages[i],i):n})}render(){return dY.call(this,!0,!1,!1,this.pathsExpanded)}attributeChangedCallback(t,n,i){t==="spec-url"&&n!==i&&window.setTimeout((async()=>{await this.loadSpec(i)}),0),super.attributeChangedCallback(t,n,i)}onSpecUrlChange(){this.setAttribute("spec-url",this.shadowRoot.getElementById("spec-url").value)}onSearchChange(t){this.matchPaths=t.target.value}async loadSpec(t){if(t)try{this.resolvedSpec={specLoadError:!1,isSpecLoading:!0,tags:[]},this.loading=!0,this.loadFailed=!1,this.requestUpdate();const n=await pR.call(this,t,this.generateMissingTags==="true",this.sortTags==="true",this.sortSchemas==="true",this.getAttribute("sort-endpoints-by"),this.getAttribute("match-paths"),this.getAttribute("match-type"),this.getAttribute("remove-endpoints-with-badge-label-as"));this.loading=!1,this.afterSpecParsedAndValidated(n)}catch(n){this.loading=!1,this.loadFailed=!0,this.resolvedSpec=null,console.error(`RapiDoc: Unable to resolve the API spec.. ${n.message}`)}}async afterSpecParsedAndValidated(t){this.resolvedSpec=t;const n=new CustomEvent("spec-loaded",{detail:t});this.dispatchEvent(n)}handleHref(t){if(t.target.tagName.toLowerCase()==="a"&&t.target.getAttribute("href").startsWith("#")){const n=this.shadowRoot.getElementById(t.target.getAttribute("href").replace("#",""));n&&n.scrollIntoView({behavior:"auto",block:"start"})}}onSelectExample(t){[...t.target.closest(".json-schema-example-panel").querySelectorAll(".example")].forEach((n=>{n.style.display=n.dataset.example===t.target.value?"flex":"none"}))}async scrollToEventTarget(t){const n=t.currentTarget;if(!n.dataset.contentId)return;const i=this.shadowRoot.getElementById(n.dataset.contentId);i&&i.scrollIntoView({behavior:"auto",block:"start"})}})},526:(p,m)=>{m.byteLength=function(M){var I=k(M),q=I[0],G=I[1];return 3*(q+G)/4-G},m.toByteArray=function(M){var I,q,G=k(M),K=G[0],X=G[1],z=new S((function(Q,ne,de){return 3*(ne+de)/4-de})(0,K,X)),ee=0,oe=X>0?K-4:K;for(q=0;q<oe;q+=4)I=b[M.charCodeAt(q)]<<18|b[M.charCodeAt(q+1)]<<12|b[M.charCodeAt(q+2)]<<6|b[M.charCodeAt(q+3)],z[ee++]=I>>16&255,z[ee++]=I>>8&255,z[ee++]=255&I;return X===2&&(I=b[M.charCodeAt(q)]<<2|b[M.charCodeAt(q+1)]>>4,z[ee++]=255&I),X===1&&(I=b[M.charCodeAt(q)]<<10|b[M.charCodeAt(q+1)]<<4|b[M.charCodeAt(q+2)]>>2,z[ee++]=I>>8&255,z[ee++]=255&I),z},m.fromByteArray=function(M){for(var I,q=M.length,G=q%3,K=[],X=16383,z=0,ee=q-G;z<ee;z+=X)K.push(T(M,z,z+X>ee?ee:z+X));return G===1?(I=M[q-1],K.push(g[I>>2]+g[I<<4&63]+"==")):G===2&&(I=(M[q-2]<<8)+M[q-1],K.push(g[I>>10]+g[I>>4&63]+g[I<<2&63]+"=")),K.join("")};for(var g=[],b=[],S=typeof Uint8Array<"u"?Uint8Array:Array,E="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",A=0;A<64;++A)g[A]=E[A],b[E.charCodeAt(A)]=A;function k(M){var I=M.length;if(I%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var q=M.indexOf("=");return q===-1&&(q=I),[q,q===I?0:4-q%4]}function T(M,I,q){for(var G,K,X=[],z=I;z<q;z+=3)G=(M[z]<<16&16711680)+(M[z+1]<<8&65280)+(255&M[z+2]),X.push(g[(K=G)>>18&63]+g[K>>12&63]+g[K>>6&63]+g[63&K]);return X.join("")}b[45]=62,b[95]=63},287:(p,m,g)=>{const b=g(526),S=g(251),E=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;m.hp=T,m.IS=50;const A=2147483647;function k(D){if(D>A)throw new RangeError('The value "'+D+'" is invalid for option "size"');const L=new Uint8Array(D);return Object.setPrototypeOf(L,T.prototype),L}function T(D,L,H){if(typeof D=="number"){if(typeof L=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return q(D)}return M(D,L,H)}function M(D,L,H){if(typeof D=="string")return(function(Re,st){if(typeof st=="string"&&st!==""||(st="utf8"),!T.isEncoding(st))throw new TypeError("Unknown encoding: "+st);const Kt=0|z(Re,st);let Qt=k(Kt);const Fn=Qt.write(Re,st);return Fn!==Kt&&(Qt=Qt.slice(0,Fn)),Qt})(D,L);if(ArrayBuffer.isView(D))return(function(Re){if(Nn(Re,Uint8Array)){const st=new Uint8Array(Re);return K(st.buffer,st.byteOffset,st.byteLength)}return G(Re)})(D);if(D==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof D);if(Nn(D,ArrayBuffer)||D&&Nn(D.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Nn(D,SharedArrayBuffer)||D&&Nn(D.buffer,SharedArrayBuffer)))return K(D,L,H);if(typeof D=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const W=D.valueOf&&D.valueOf();if(W!=null&&W!==D)return T.from(W,L,H);const we=(function(Re){if(T.isBuffer(Re)){const st=0|X(Re.length),Kt=k(st);return Kt.length===0||Re.copy(Kt,0,0,st),Kt}if(Re.length!==void 0)return typeof Re.length!="number"||cn(Re.length)?k(0):G(Re);if(Re.type==="Buffer"&&Array.isArray(Re.data))return G(Re.data)})(D);if(we)return we;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof D[Symbol.toPrimitive]=="function")return T.from(D[Symbol.toPrimitive]("string"),L,H);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof D)}function I(D){if(typeof D!="number")throw new TypeError('"size" argument must be of type number');if(D<0)throw new RangeError('The value "'+D+'" is invalid for option "size"')}function q(D){return I(D),k(D<0?0:0|X(D))}function G(D){const L=D.length<0?0:0|X(D.length),H=k(L);for(let W=0;W<L;W+=1)H[W]=255&D[W];return H}function K(D,L,H){if(L<0||D.byteLength<L)throw new RangeError('"offset" is outside of buffer bounds');if(D.byteLength<L+(H||0))throw new RangeError('"length" is outside of buffer bounds');let W;return W=L===void 0&&H===void 0?new Uint8Array(D):H===void 0?new Uint8Array(D,L):new Uint8Array(D,L,H),Object.setPrototypeOf(W,T.prototype),W}function X(D){if(D>=A)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+A.toString(16)+" bytes");return 0|D}function z(D,L){if(T.isBuffer(D))return D.length;if(ArrayBuffer.isView(D)||Nn(D,ArrayBuffer))return D.byteLength;if(typeof D!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof D);const H=D.length,W=arguments.length>2&&arguments[2]===!0;if(!W&&H===0)return 0;let we=!1;for(;;)switch(L){case"ascii":case"latin1":case"binary":return H;case"utf8":case"utf-8":return Lt(D).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*H;case"hex":return H>>>1;case"base64":return Rt(D).length;default:if(we)return W?-1:Lt(D).length;L=(""+L).toLowerCase(),we=!0}}function ee(D,L,H){let W=!1;if((L===void 0||L<0)&&(L=0),L>this.length||((H===void 0||H>this.length)&&(H=this.length),H<=0)||(H>>>=0)<=(L>>>=0))return"";for(D||(D="utf8");;)switch(D){case"hex":return _e(this,L,H);case"utf8":case"utf-8":return Ke(this,L,H);case"ascii":return re(this,L,H);case"latin1":case"binary":return ue(this,L,H);case"base64":return je(this,L,H);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return fe(this,L,H);default:if(W)throw new TypeError("Unknown encoding: "+D);D=(D+"").toLowerCase(),W=!0}}function oe(D,L,H){const W=D[L];D[L]=D[H],D[H]=W}function Q(D,L,H,W,we){if(D.length===0)return-1;if(typeof H=="string"?(W=H,H=0):H>2147483647?H=2147483647:H<-2147483648&&(H=-2147483648),cn(H=+H)&&(H=we?0:D.length-1),H<0&&(H=D.length+H),H>=D.length){if(we)return-1;H=D.length-1}else if(H<0){if(!we)return-1;H=0}if(typeof L=="string"&&(L=T.from(L,W)),T.isBuffer(L))return L.length===0?-1:ne(D,L,H,W,we);if(typeof L=="number")return L&=255,typeof Uint8Array.prototype.indexOf=="function"?we?Uint8Array.prototype.indexOf.call(D,L,H):Uint8Array.prototype.lastIndexOf.call(D,L,H):ne(D,[L],H,W,we);throw new TypeError("val must be string, number or Buffer")}function ne(D,L,H,W,we){let Re,st=1,Kt=D.length,Qt=L.length;if(W!==void 0&&((W=String(W).toLowerCase())==="ucs2"||W==="ucs-2"||W==="utf16le"||W==="utf-16le")){if(D.length<2||L.length<2)return-1;st=2,Kt/=2,Qt/=2,H/=2}function Fn(dn,Ht){return st===1?dn[Ht]:dn.readUInt16BE(Ht*st)}if(we){let dn=-1;for(Re=H;Re<Kt;Re++)if(Fn(D,Re)===Fn(L,dn===-1?0:Re-dn)){if(dn===-1&&(dn=Re),Re-dn+1===Qt)return dn*st}else dn!==-1&&(Re-=Re-dn),dn=-1}else for(H+Qt>Kt&&(H=Kt-Qt),Re=H;Re>=0;Re--){let dn=!0;for(let Ht=0;Ht<Qt;Ht++)if(Fn(D,Re+Ht)!==Fn(L,Ht)){dn=!1;break}if(dn)return Re}return-1}function de(D,L,H,W){H=Number(H)||0;const we=D.length-H;W?(W=Number(W))>we&&(W=we):W=we;const Re=L.length;let st;for(W>Re/2&&(W=Re/2),st=0;st<W;++st){const Kt=parseInt(L.substr(2*st,2),16);if(cn(Kt))return st;D[H+st]=Kt}return st}function Ce(D,L,H,W){return V(Lt(L,D.length-H),D,H,W)}function xe(D,L,H,W){return V((function(we){const Re=[];for(let st=0;st<we.length;++st)Re.push(255&we.charCodeAt(st));return Re})(L),D,H,W)}function le(D,L,H,W){return V(Rt(L),D,H,W)}function be(D,L,H,W){return V((function(we,Re){let st,Kt,Qt;const Fn=[];for(let dn=0;dn<we.length&&!((Re-=2)<0);++dn)st=we.charCodeAt(dn),Kt=st>>8,Qt=st%256,Fn.push(Qt),Fn.push(Kt);return Fn})(L,D.length-H),D,H,W)}function je(D,L,H){return L===0&&H===D.length?b.fromByteArray(D):b.fromByteArray(D.slice(L,H))}function Ke(D,L,H){H=Math.min(D.length,H);const W=[];let we=L;for(;we<H;){const Re=D[we];let st=null,Kt=Re>239?4:Re>223?3:Re>191?2:1;if(we+Kt<=H){let Qt,Fn,dn,Ht;switch(Kt){case 1:Re<128&&(st=Re);break;case 2:Qt=D[we+1],(192&Qt)==128&&(Ht=(31&Re)<<6|63&Qt,Ht>127&&(st=Ht));break;case 3:Qt=D[we+1],Fn=D[we+2],(192&Qt)==128&&(192&Fn)==128&&(Ht=(15&Re)<<12|(63&Qt)<<6|63&Fn,Ht>2047&&(Ht<55296||Ht>57343)&&(st=Ht));break;case 4:Qt=D[we+1],Fn=D[we+2],dn=D[we+3],(192&Qt)==128&&(192&Fn)==128&&(192&dn)==128&&(Ht=(15&Re)<<18|(63&Qt)<<12|(63&Fn)<<6|63&dn,Ht>65535&&Ht<1114112&&(st=Ht))}}st===null?(st=65533,Kt=1):st>65535&&(st-=65536,W.push(st>>>10&1023|55296),st=56320|1023&st),W.push(st),we+=Kt}return(function(Re){const st=Re.length;if(st<=ce)return String.fromCharCode.apply(String,Re);let Kt="",Qt=0;for(;Qt<st;)Kt+=String.fromCharCode.apply(String,Re.slice(Qt,Qt+=ce));return Kt})(W)}T.TYPED_ARRAY_SUPPORT=(function(){try{const D=new Uint8Array(1),L={foo:function(){return 42}};return Object.setPrototypeOf(L,Uint8Array.prototype),Object.setPrototypeOf(D,L),D.foo()===42}catch{return!1}})(),T.TYPED_ARRAY_SUPPORT||typeof console>"u"||typeof console.error!="function"||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(T.prototype,"parent",{enumerable:!0,get:function(){if(T.isBuffer(this))return this.buffer}}),Object.defineProperty(T.prototype,"offset",{enumerable:!0,get:function(){if(T.isBuffer(this))return this.byteOffset}}),T.poolSize=8192,T.from=function(D,L,H){return M(D,L,H)},Object.setPrototypeOf(T.prototype,Uint8Array.prototype),Object.setPrototypeOf(T,Uint8Array),T.alloc=function(D,L,H){return(function(W,we,Re){return I(W),W<=0?k(W):we!==void 0?typeof Re=="string"?k(W).fill(we,Re):k(W).fill(we):k(W)})(D,L,H)},T.allocUnsafe=function(D){return q(D)},T.allocUnsafeSlow=function(D){return q(D)},T.isBuffer=function(D){return D!=null&&D._isBuffer===!0&&D!==T.prototype},T.compare=function(D,L){if(Nn(D,Uint8Array)&&(D=T.from(D,D.offset,D.byteLength)),Nn(L,Uint8Array)&&(L=T.from(L,L.offset,L.byteLength)),!T.isBuffer(D)||!T.isBuffer(L))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(D===L)return 0;let H=D.length,W=L.length;for(let we=0,Re=Math.min(H,W);we<Re;++we)if(D[we]!==L[we]){H=D[we],W=L[we];break}return H<W?-1:W<H?1:0},T.isEncoding=function(D){switch(String(D).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},T.concat=function(D,L){if(!Array.isArray(D))throw new TypeError('"list" argument must be an Array of Buffers');if(D.length===0)return T.alloc(0);let H;if(L===void 0)for(L=0,H=0;H<D.length;++H)L+=D[H].length;const W=T.allocUnsafe(L);let we=0;for(H=0;H<D.length;++H){let Re=D[H];if(Nn(Re,Uint8Array))we+Re.length>W.length?(T.isBuffer(Re)||(Re=T.from(Re)),Re.copy(W,we)):Uint8Array.prototype.set.call(W,Re,we);else{if(!T.isBuffer(Re))throw new TypeError('"list" argument must be an Array of Buffers');Re.copy(W,we)}we+=Re.length}return W},T.byteLength=z,T.prototype._isBuffer=!0,T.prototype.swap16=function(){const D=this.length;if(D%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let L=0;L<D;L+=2)oe(this,L,L+1);return this},T.prototype.swap32=function(){const D=this.length;if(D%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let L=0;L<D;L+=4)oe(this,L,L+3),oe(this,L+1,L+2);return this},T.prototype.swap64=function(){const D=this.length;if(D%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let L=0;L<D;L+=8)oe(this,L,L+7),oe(this,L+1,L+6),oe(this,L+2,L+5),oe(this,L+3,L+4);return this},T.prototype.toString=function(){const D=this.length;return D===0?"":arguments.length===0?Ke(this,0,D):ee.apply(this,arguments)},T.prototype.toLocaleString=T.prototype.toString,T.prototype.equals=function(D){if(!T.isBuffer(D))throw new TypeError("Argument must be a Buffer");return this===D||T.compare(this,D)===0},T.prototype.inspect=function(){let D="";const L=m.IS;return D=this.toString("hex",0,L).replace(/(.{2})/g,"$1 ").trim(),this.length>L&&(D+=" ... "),"<Buffer "+D+">"},E&&(T.prototype[E]=T.prototype.inspect),T.prototype.compare=function(D,L,H,W,we){if(Nn(D,Uint8Array)&&(D=T.from(D,D.offset,D.byteLength)),!T.isBuffer(D))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof D);if(L===void 0&&(L=0),H===void 0&&(H=D?D.length:0),W===void 0&&(W=0),we===void 0&&(we=this.length),L<0||H>D.length||W<0||we>this.length)throw new RangeError("out of range index");if(W>=we&&L>=H)return 0;if(W>=we)return-1;if(L>=H)return 1;if(this===D)return 0;let Re=(we>>>=0)-(W>>>=0),st=(H>>>=0)-(L>>>=0);const Kt=Math.min(Re,st),Qt=this.slice(W,we),Fn=D.slice(L,H);for(let dn=0;dn<Kt;++dn)if(Qt[dn]!==Fn[dn]){Re=Qt[dn],st=Fn[dn];break}return Re<st?-1:st<Re?1:0},T.prototype.includes=function(D,L,H){return this.indexOf(D,L,H)!==-1},T.prototype.indexOf=function(D,L,H){return Q(this,D,L,H,!0)},T.prototype.lastIndexOf=function(D,L,H){return Q(this,D,L,H,!1)},T.prototype.write=function(D,L,H,W){if(L===void 0)W="utf8",H=this.length,L=0;else if(H===void 0&&typeof L=="string")W=L,H=this.length,L=0;else{if(!isFinite(L))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");L>>>=0,isFinite(H)?(H>>>=0,W===void 0&&(W="utf8")):(W=H,H=void 0)}const we=this.length-L;if((H===void 0||H>we)&&(H=we),D.length>0&&(H<0||L<0)||L>this.length)throw new RangeError("Attempt to write outside buffer bounds");W||(W="utf8");let Re=!1;for(;;)switch(W){case"hex":return de(this,D,L,H);case"utf8":case"utf-8":return Ce(this,D,L,H);case"ascii":case"latin1":case"binary":return xe(this,D,L,H);case"base64":return le(this,D,L,H);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return be(this,D,L,H);default:if(Re)throw new TypeError("Unknown encoding: "+W);W=(""+W).toLowerCase(),Re=!0}},T.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const ce=4096;function re(D,L,H){let W="";H=Math.min(D.length,H);for(let we=L;we<H;++we)W+=String.fromCharCode(127&D[we]);return W}function ue(D,L,H){let W="";H=Math.min(D.length,H);for(let we=L;we<H;++we)W+=String.fromCharCode(D[we]);return W}function _e(D,L,H){const W=D.length;(!L||L<0)&&(L=0),(!H||H<0||H>W)&&(H=W);let we="";for(let Re=L;Re<H;++Re)we+=ve[D[Re]];return we}function fe(D,L,H){const W=D.slice(L,H);let we="";for(let Re=0;Re<W.length-1;Re+=2)we+=String.fromCharCode(W[Re]+256*W[Re+1]);return we}function He(D,L,H){if(D%1!=0||D<0)throw new RangeError("offset is not uint");if(D+L>H)throw new RangeError("Trying to access beyond buffer length")}function Oe(D,L,H,W,we,Re){if(!T.isBuffer(D))throw new TypeError('"buffer" argument must be a Buffer instance');if(L>we||L<Re)throw new RangeError('"value" argument is out of bounds');if(H+W>D.length)throw new RangeError("Index out of range")}function ke(D,L,H,W,we){Ft(L,W,we,D,H,7);let Re=Number(L&BigInt(4294967295));D[H++]=Re,Re>>=8,D[H++]=Re,Re>>=8,D[H++]=Re,Re>>=8,D[H++]=Re;let st=Number(L>>BigInt(32)&BigInt(4294967295));return D[H++]=st,st>>=8,D[H++]=st,st>>=8,D[H++]=st,st>>=8,D[H++]=st,H}function Ve(D,L,H,W,we){Ft(L,W,we,D,H,7);let Re=Number(L&BigInt(4294967295));D[H+7]=Re,Re>>=8,D[H+6]=Re,Re>>=8,D[H+5]=Re,Re>>=8,D[H+4]=Re;let st=Number(L>>BigInt(32)&BigInt(4294967295));return D[H+3]=st,st>>=8,D[H+2]=st,st>>=8,D[H+1]=st,st>>=8,D[H]=st,H+8}function ie(D,L,H,W,we,Re){if(H+W>D.length)throw new RangeError("Index out of range");if(H<0)throw new RangeError("Index out of range")}function Ne(D,L,H,W,we){return L=+L,H>>>=0,we||ie(D,0,H,4),S.write(D,L,H,W,23,4),H+4}function ze(D,L,H,W,we){return L=+L,H>>>=0,we||ie(D,0,H,8),S.write(D,L,H,W,52,8),H+8}T.prototype.slice=function(D,L){const H=this.length;(D=~~D)<0?(D+=H)<0&&(D=0):D>H&&(D=H),(L=L===void 0?H:~~L)<0?(L+=H)<0&&(L=0):L>H&&(L=H),L<D&&(L=D);const W=this.subarray(D,L);return Object.setPrototypeOf(W,T.prototype),W},T.prototype.readUintLE=T.prototype.readUIntLE=function(D,L,H){D>>>=0,L>>>=0,H||He(D,L,this.length);let W=this[D],we=1,Re=0;for(;++Re<L&&(we*=256);)W+=this[D+Re]*we;return W},T.prototype.readUintBE=T.prototype.readUIntBE=function(D,L,H){D>>>=0,L>>>=0,H||He(D,L,this.length);let W=this[D+--L],we=1;for(;L>0&&(we*=256);)W+=this[D+--L]*we;return W},T.prototype.readUint8=T.prototype.readUInt8=function(D,L){return D>>>=0,L||He(D,1,this.length),this[D]},T.prototype.readUint16LE=T.prototype.readUInt16LE=function(D,L){return D>>>=0,L||He(D,2,this.length),this[D]|this[D+1]<<8},T.prototype.readUint16BE=T.prototype.readUInt16BE=function(D,L){return D>>>=0,L||He(D,2,this.length),this[D]<<8|this[D+1]},T.prototype.readUint32LE=T.prototype.readUInt32LE=function(D,L){return D>>>=0,L||He(D,4,this.length),(this[D]|this[D+1]<<8|this[D+2]<<16)+16777216*this[D+3]},T.prototype.readUint32BE=T.prototype.readUInt32BE=function(D,L){return D>>>=0,L||He(D,4,this.length),16777216*this[D]+(this[D+1]<<16|this[D+2]<<8|this[D+3])},T.prototype.readBigUInt64LE=De((function(D){kt(D>>>=0,"offset");const L=this[D],H=this[D+7];L!==void 0&&H!==void 0||Jt(D,this.length-8);const W=L+256*this[++D]+65536*this[++D]+this[++D]*2**24,we=this[++D]+256*this[++D]+65536*this[++D]+H*2**24;return BigInt(W)+(BigInt(we)<<BigInt(32))})),T.prototype.readBigUInt64BE=De((function(D){kt(D>>>=0,"offset");const L=this[D],H=this[D+7];L!==void 0&&H!==void 0||Jt(D,this.length-8);const W=L*2**24+65536*this[++D]+256*this[++D]+this[++D],we=this[++D]*2**24+65536*this[++D]+256*this[++D]+H;return(BigInt(W)<<BigInt(32))+BigInt(we)})),T.prototype.readIntLE=function(D,L,H){D>>>=0,L>>>=0,H||He(D,L,this.length);let W=this[D],we=1,Re=0;for(;++Re<L&&(we*=256);)W+=this[D+Re]*we;return we*=128,W>=we&&(W-=Math.pow(2,8*L)),W},T.prototype.readIntBE=function(D,L,H){D>>>=0,L>>>=0,H||He(D,L,this.length);let W=L,we=1,Re=this[D+--W];for(;W>0&&(we*=256);)Re+=this[D+--W]*we;return we*=128,Re>=we&&(Re-=Math.pow(2,8*L)),Re},T.prototype.readInt8=function(D,L){return D>>>=0,L||He(D,1,this.length),128&this[D]?-1*(255-this[D]+1):this[D]},T.prototype.readInt16LE=function(D,L){D>>>=0,L||He(D,2,this.length);const H=this[D]|this[D+1]<<8;return 32768&H?4294901760|H:H},T.prototype.readInt16BE=function(D,L){D>>>=0,L||He(D,2,this.length);const H=this[D+1]|this[D]<<8;return 32768&H?4294901760|H:H},T.prototype.readInt32LE=function(D,L){return D>>>=0,L||He(D,4,this.length),this[D]|this[D+1]<<8|this[D+2]<<16|this[D+3]<<24},T.prototype.readInt32BE=function(D,L){return D>>>=0,L||He(D,4,this.length),this[D]<<24|this[D+1]<<16|this[D+2]<<8|this[D+3]},T.prototype.readBigInt64LE=De((function(D){kt(D>>>=0,"offset");const L=this[D],H=this[D+7];L!==void 0&&H!==void 0||Jt(D,this.length-8);const W=this[D+4]+256*this[D+5]+65536*this[D+6]+(H<<24);return(BigInt(W)<<BigInt(32))+BigInt(L+256*this[++D]+65536*this[++D]+this[++D]*16777216)})),T.prototype.readBigInt64BE=De((function(D){kt(D>>>=0,"offset");const L=this[D],H=this[D+7];L!==void 0&&H!==void 0||Jt(D,this.length-8);const W=(L<<24)+65536*this[++D]+256*this[++D]+this[++D];return(BigInt(W)<<BigInt(32))+BigInt(this[++D]*16777216+65536*this[++D]+256*this[++D]+H)})),T.prototype.readFloatLE=function(D,L){return D>>>=0,L||He(D,4,this.length),S.read(this,D,!0,23,4)},T.prototype.readFloatBE=function(D,L){return D>>>=0,L||He(D,4,this.length),S.read(this,D,!1,23,4)},T.prototype.readDoubleLE=function(D,L){return D>>>=0,L||He(D,8,this.length),S.read(this,D,!0,52,8)},T.prototype.readDoubleBE=function(D,L){return D>>>=0,L||He(D,8,this.length),S.read(this,D,!1,52,8)},T.prototype.writeUintLE=T.prototype.writeUIntLE=function(D,L,H,W){D=+D,L>>>=0,H>>>=0,!W&&Oe(this,D,L,H,Math.pow(2,8*H)-1,0);let we=1,Re=0;for(this[L]=255&D;++Re<H&&(we*=256);)this[L+Re]=D/we&255;return L+H},T.prototype.writeUintBE=T.prototype.writeUIntBE=function(D,L,H,W){D=+D,L>>>=0,H>>>=0,!W&&Oe(this,D,L,H,Math.pow(2,8*H)-1,0);let we=H-1,Re=1;for(this[L+we]=255&D;--we>=0&&(Re*=256);)this[L+we]=D/Re&255;return L+H},T.prototype.writeUint8=T.prototype.writeUInt8=function(D,L,H){return D=+D,L>>>=0,H||Oe(this,D,L,1,255,0),this[L]=255&D,L+1},T.prototype.writeUint16LE=T.prototype.writeUInt16LE=function(D,L,H){return D=+D,L>>>=0,H||Oe(this,D,L,2,65535,0),this[L]=255&D,this[L+1]=D>>>8,L+2},T.prototype.writeUint16BE=T.prototype.writeUInt16BE=function(D,L,H){return D=+D,L>>>=0,H||Oe(this,D,L,2,65535,0),this[L]=D>>>8,this[L+1]=255&D,L+2},T.prototype.writeUint32LE=T.prototype.writeUInt32LE=function(D,L,H){return D=+D,L>>>=0,H||Oe(this,D,L,4,4294967295,0),this[L+3]=D>>>24,this[L+2]=D>>>16,this[L+1]=D>>>8,this[L]=255&D,L+4},T.prototype.writeUint32BE=T.prototype.writeUInt32BE=function(D,L,H){return D=+D,L>>>=0,H||Oe(this,D,L,4,4294967295,0),this[L]=D>>>24,this[L+1]=D>>>16,this[L+2]=D>>>8,this[L+3]=255&D,L+4},T.prototype.writeBigUInt64LE=De((function(D,L=0){return ke(this,D,L,BigInt(0),BigInt("0xffffffffffffffff"))})),T.prototype.writeBigUInt64BE=De((function(D,L=0){return Ve(this,D,L,BigInt(0),BigInt("0xffffffffffffffff"))})),T.prototype.writeIntLE=function(D,L,H,W){if(D=+D,L>>>=0,!W){const Kt=Math.pow(2,8*H-1);Oe(this,D,L,H,Kt-1,-Kt)}let we=0,Re=1,st=0;for(this[L]=255&D;++we<H&&(Re*=256);)D<0&&st===0&&this[L+we-1]!==0&&(st=1),this[L+we]=(D/Re|0)-st&255;return L+H},T.prototype.writeIntBE=function(D,L,H,W){if(D=+D,L>>>=0,!W){const Kt=Math.pow(2,8*H-1);Oe(this,D,L,H,Kt-1,-Kt)}let we=H-1,Re=1,st=0;for(this[L+we]=255&D;--we>=0&&(Re*=256);)D<0&&st===0&&this[L+we+1]!==0&&(st=1),this[L+we]=(D/Re|0)-st&255;return L+H},T.prototype.writeInt8=function(D,L,H){return D=+D,L>>>=0,H||Oe(this,D,L,1,127,-128),D<0&&(D=255+D+1),this[L]=255&D,L+1},T.prototype.writeInt16LE=function(D,L,H){return D=+D,L>>>=0,H||Oe(this,D,L,2,32767,-32768),this[L]=255&D,this[L+1]=D>>>8,L+2},T.prototype.writeInt16BE=function(D,L,H){return D=+D,L>>>=0,H||Oe(this,D,L,2,32767,-32768),this[L]=D>>>8,this[L+1]=255&D,L+2},T.prototype.writeInt32LE=function(D,L,H){return D=+D,L>>>=0,H||Oe(this,D,L,4,2147483647,-2147483648),this[L]=255&D,this[L+1]=D>>>8,this[L+2]=D>>>16,this[L+3]=D>>>24,L+4},T.prototype.writeInt32BE=function(D,L,H){return D=+D,L>>>=0,H||Oe(this,D,L,4,2147483647,-2147483648),D<0&&(D=4294967295+D+1),this[L]=D>>>24,this[L+1]=D>>>16,this[L+2]=D>>>8,this[L+3]=255&D,L+4},T.prototype.writeBigInt64LE=De((function(D,L=0){return ke(this,D,L,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),T.prototype.writeBigInt64BE=De((function(D,L=0){return Ve(this,D,L,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),T.prototype.writeFloatLE=function(D,L,H){return Ne(this,D,L,!0,H)},T.prototype.writeFloatBE=function(D,L,H){return Ne(this,D,L,!1,H)},T.prototype.writeDoubleLE=function(D,L,H){return ze(this,D,L,!0,H)},T.prototype.writeDoubleBE=function(D,L,H){return ze(this,D,L,!1,H)},T.prototype.copy=function(D,L,H,W){if(!T.isBuffer(D))throw new TypeError("argument should be a Buffer");if(H||(H=0),W||W===0||(W=this.length),L>=D.length&&(L=D.length),L||(L=0),W>0&&W<H&&(W=H),W===H||D.length===0||this.length===0)return 0;if(L<0)throw new RangeError("targetStart out of bounds");if(H<0||H>=this.length)throw new RangeError("Index out of range");if(W<0)throw new RangeError("sourceEnd out of bounds");W>this.length&&(W=this.length),D.length-L<W-H&&(W=D.length-L+H);const we=W-H;return this===D&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(L,H,W):Uint8Array.prototype.set.call(D,this.subarray(H,W),L),we},T.prototype.fill=function(D,L,H,W){if(typeof D=="string"){if(typeof L=="string"?(W=L,L=0,H=this.length):typeof H=="string"&&(W=H,H=this.length),W!==void 0&&typeof W!="string")throw new TypeError("encoding must be a string");if(typeof W=="string"&&!T.isEncoding(W))throw new TypeError("Unknown encoding: "+W);if(D.length===1){const Re=D.charCodeAt(0);(W==="utf8"&&Re<128||W==="latin1")&&(D=Re)}}else typeof D=="number"?D&=255:typeof D=="boolean"&&(D=Number(D));if(L<0||this.length<L||this.length<H)throw new RangeError("Out of range index");if(H<=L)return this;let we;if(L>>>=0,H=H===void 0?this.length:H>>>0,D||(D=0),typeof D=="number")for(we=L;we<H;++we)this[we]=D;else{const Re=T.isBuffer(D)?D:T.from(D,W),st=Re.length;if(st===0)throw new TypeError('The value "'+D+'" is invalid for argument "value"');for(we=0;we<H-L;++we)this[we+L]=Re[we%st]}return this};const tt={};function ft(D,L,H){tt[D]=class extends H{constructor(){super(),Object.defineProperty(this,"message",{value:L.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${D}]`,this.stack,delete this.name}get code(){return D}set code(W){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:W,writable:!0})}toString(){return`${this.name} [${D}]: ${this.message}`}}}function Ot(D){let L="",H=D.length;const W=D[0]==="-"?1:0;for(;H>=W+4;H-=3)L=`_${D.slice(H-3,H)}${L}`;return`${D.slice(0,H)}${L}`}function Ft(D,L,H,W,we,Re){if(D>H||D<L){const st=typeof L=="bigint"?"n":"";let Kt;throw Kt=L===0||L===BigInt(0)?`>= 0${st} and < 2${st} ** ${8*(Re+1)}${st}`:`>= -(2${st} ** ${8*(Re+1)-1}${st}) and < 2 ** ${8*(Re+1)-1}${st}`,new tt.ERR_OUT_OF_RANGE("value",Kt,D)}(function(st,Kt,Qt){kt(Kt,"offset"),st[Kt]!==void 0&&st[Kt+Qt]!==void 0||Jt(Kt,st.length-(Qt+1))})(W,we,Re)}function kt(D,L){if(typeof D!="number")throw new tt.ERR_INVALID_ARG_TYPE(L,"number",D)}function Jt(D,L,H){throw Math.floor(D)!==D?(kt(D,H),new tt.ERR_OUT_OF_RANGE("offset","an integer",D)):L<0?new tt.ERR_BUFFER_OUT_OF_BOUNDS:new tt.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${L}`,D)}ft("ERR_BUFFER_OUT_OF_BOUNDS",(function(D){return D?`${D} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),ft("ERR_INVALID_ARG_TYPE",(function(D,L){return`The "${D}" argument must be of type number. Received type ${typeof L}`}),TypeError),ft("ERR_OUT_OF_RANGE",(function(D,L,H){let W=`The value of "${D}" is out of range.`,we=H;return Number.isInteger(H)&&Math.abs(H)>4294967296?we=Ot(String(H)):typeof H=="bigint"&&(we=String(H),(H>BigInt(2)**BigInt(32)||H<-(BigInt(2)**BigInt(32)))&&(we=Ot(we)),we+="n"),W+=` It must be ${L}. Received ${we}`,W}),RangeError);const Le=/[^+/0-9A-Za-z-_]/g;function Lt(D,L){let H;L=L||1/0;const W=D.length;let we=null;const Re=[];for(let st=0;st<W;++st){if(H=D.charCodeAt(st),H>55295&&H<57344){if(!we){if(H>56319){(L-=3)>-1&&Re.push(239,191,189);continue}if(st+1===W){(L-=3)>-1&&Re.push(239,191,189);continue}we=H;continue}if(H<56320){(L-=3)>-1&&Re.push(239,191,189),we=H;continue}H=65536+(we-55296<<10|H-56320)}else we&&(L-=3)>-1&&Re.push(239,191,189);if(we=null,H<128){if((L-=1)<0)break;Re.push(H)}else if(H<2048){if((L-=2)<0)break;Re.push(H>>6|192,63&H|128)}else if(H<65536){if((L-=3)<0)break;Re.push(H>>12|224,H>>6&63|128,63&H|128)}else{if(!(H<1114112))throw new Error("Invalid code point");if((L-=4)<0)break;Re.push(H>>18|240,H>>12&63|128,H>>6&63|128,63&H|128)}}return Re}function Rt(D){return b.toByteArray((function(L){if((L=(L=L.split("=")[0]).trim().replace(Le,"")).length<2)return"";for(;L.length%4!=0;)L+="=";return L})(D))}function V(D,L,H,W){let we;for(we=0;we<W&&!(we+H>=L.length||we>=D.length);++we)L[we+H]=D[we];return we}function Nn(D,L){return D instanceof L||D!=null&&D.constructor!=null&&D.constructor.name!=null&&D.constructor.name===L.name}function cn(D){return D!=D}const ve=(function(){const D="0123456789abcdef",L=new Array(256);for(let H=0;H<16;++H){const W=16*H;for(let we=0;we<16;++we)L[W+we]=D[H]+D[we]}return L})();function De(D){return typeof BigInt>"u"?Ge:D}function Ge(){throw new Error("BigInt not supported")}},4:p=>{class m{constructor(S,E){this.low=S,this.high=E,this.length=1+E-S}overlaps(S){return!(this.high<S.low||this.low>S.high)}touches(S){return!(this.high+1<S.low||this.low-1>S.high)}add(S){return new m(Math.min(this.low,S.low),Math.max(this.high,S.high))}subtract(S){return S.low<=this.low&&S.high>=this.high?[]:S.low>this.low&&S.high<this.high?[new m(this.low,S.low-1),new m(S.high+1,this.high)]:S.low<=this.low?[new m(S.high+1,this.high)]:[new m(this.low,S.low-1)]}toString(){return this.low==this.high?this.low.toString():this.low+"-"+this.high}}class g{constructor(S,E){this.ranges=[],this.length=0,S!=null&&this.add(S,E)}_update_length(){this.length=this.ranges.reduce(((S,E)=>S+E.length),0)}add(S,E){var A=k=>{for(var T=0;T<this.ranges.length&&!k.touches(this.ranges[T]);)T++;for(var M=this.ranges.slice(0,T);T<this.ranges.length&&k.touches(this.ranges[T]);)k=k.add(this.ranges[T]),T++;M.push(k),this.ranges=M.concat(this.ranges.slice(T)),this._update_length()};return S instanceof g?S.ranges.forEach(A):(E==null&&(E=S),A(new m(S,E))),this}subtract(S,E){var A=k=>{for(var T=0;T<this.ranges.length&&!k.overlaps(this.ranges[T]);)T++;for(var M=this.ranges.slice(0,T);T<this.ranges.length&&k.overlaps(this.ranges[T]);)M=M.concat(this.ranges[T].subtract(k)),T++;this.ranges=M.concat(this.ranges.slice(T)),this._update_length()};return S instanceof g?S.ranges.forEach(A):(E==null&&(E=S),A(new m(S,E))),this}intersect(S,E){var A=[],k=T=>{for(var M=0;M<this.ranges.length&&!T.overlaps(this.ranges[M]);)M++;for(;M<this.ranges.length&&T.overlaps(this.ranges[M]);){var I=Math.max(this.ranges[M].low,T.low),q=Math.min(this.ranges[M].high,T.high);A.push(new m(I,q)),M++}};return S instanceof g?S.ranges.forEach(k):(E==null&&(E=S),k(new m(S,E))),this.ranges=A,this._update_length(),this}index(S){for(var E=0;E<this.ranges.length&&this.ranges[E].length<=S;)S-=this.ranges[E].length,E++;return this.ranges[E].low+S}toString(){return"[ "+this.ranges.join(", ")+" ]"}clone(){return new g(this)}numbers(){return this.ranges.reduce(((S,E)=>{for(var A=E.low;A<=E.high;)S.push(A),A++;return S}),[])}subranges(){return this.ranges.map((S=>({low:S.low,high:S.high,length:1+S.high-S.low})))}}p.exports=g},251:(p,m)=>{m.read=function(g,b,S,E,A){var k,T,M=8*A-E-1,I=(1<<M)-1,q=I>>1,G=-7,K=S?A-1:0,X=S?-1:1,z=g[b+K];for(K+=X,k=z&(1<<-G)-1,z>>=-G,G+=M;G>0;k=256*k+g[b+K],K+=X,G-=8);for(T=k&(1<<-G)-1,k>>=-G,G+=E;G>0;T=256*T+g[b+K],K+=X,G-=8);if(k===0)k=1-q;else{if(k===I)return T?NaN:1/0*(z?-1:1);T+=Math.pow(2,E),k-=q}return(z?-1:1)*T*Math.pow(2,k-E)},m.write=function(g,b,S,E,A,k){var T,M,I,q=8*k-A-1,G=(1<<q)-1,K=G>>1,X=A===23?Math.pow(2,-24)-Math.pow(2,-77):0,z=E?0:k-1,ee=E?1:-1,oe=b<0||b===0&&1/b<0?1:0;for(b=Math.abs(b),isNaN(b)||b===1/0?(M=isNaN(b)?1:0,T=G):(T=Math.floor(Math.log(b)/Math.LN2),b*(I=Math.pow(2,-T))<1&&(T--,I*=2),(b+=T+K>=1?X/I:X*Math.pow(2,1-K))*I>=2&&(T++,I/=2),T+K>=G?(M=0,T=G):T+K>=1?(M=(b*I-1)*Math.pow(2,A),T+=K):(M=b*Math.pow(2,K-1)*Math.pow(2,A),T=0));A>=8;g[S+z]=255&M,z+=ee,M/=256,A-=8);for(T=T<<A|M,q+=A;q>0;g[S+z]=255&T,z+=ee,T/=256,q-=8);g[S+z-ee]|=128*oe}},22:()=>{(function(p){var m="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",g={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},b={bash:g,environment:{pattern:RegExp("\\$"+m),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+m),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};p.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+m),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:b},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:g}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:b},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:b.entity}}],environment:{pattern:RegExp("\\$?"+m),alias:"constant"},variable:b.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},g.inside=p.languages.bash;for(var S=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],E=b.variable[1].inside,A=0;A<S.length;A++)E[S[A]]=p.languages.bash[S[A]];p.languages.sh=p.languages.bash,p.languages.shell=p.languages.bash})(Prism)},651:()=>{(function(p){function m(ze,tt){return ze.replace(/<<(\d+)>>/g,(function(ft,Ot){return"(?:"+tt[+Ot]+")"}))}function g(ze,tt,ft){return RegExp(m(ze,tt),"")}function b(ze,tt){for(var ft=0;ft<tt;ft++)ze=ze.replace(/<<self>>/g,(function(){return"(?:"+ze+")"}));return ze.replace(/<<self>>/g,"[^\\s\\S]")}var S="bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",E="class enum interface record struct",A="add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)",k="abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield";function T(ze){return"\\b(?:"+ze.trim().replace(/ /g,"|")+")\\b"}var M=T(E),I=RegExp(T(S+" "+E+" "+A+" "+k)),q=T(E+" "+A+" "+k),G=T(S+" "+E+" "+k),K=b(/<(?:[^<>;=+\-*/%&|^]|<<self>>)*>/.source,2),X=b(/\((?:[^()]|<<self>>)*\)/.source,2),z=/@?\b[A-Za-z_]\w*\b/.source,ee=m(/<<0>>(?:\s*<<1>>)?/.source,[z,K]),oe=m(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source,[q,ee]),Q=/\[\s*(?:,\s*)*\]/.source,ne=m(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,[oe,Q]),de=m(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,[K,X,Q]),Ce=m(/\(<<0>>+(?:,<<0>>+)+\)/.source,[de]),xe=m(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,[Ce,oe,Q]),le={keyword:I,punctuation:/[<>()?,.:[\]]/},be=/'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source,je=/"(?:\\.|[^\\"\r\n])*"/.source,Ke=/@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;p.languages.csharp=p.languages.extend("clike",{string:[{pattern:g(/(^|[^$\\])<<0>>/.source,[Ke]),lookbehind:!0,greedy:!0},{pattern:g(/(^|[^@$\\])<<0>>/.source,[je]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:g(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source,[oe]),lookbehind:!0,inside:le},{pattern:g(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source,[z,xe]),lookbehind:!0,inside:le},{pattern:g(/(\busing\s+)<<0>>(?=\s*=)/.source,[z]),lookbehind:!0},{pattern:g(/(\b<<0>>\s+)<<1>>/.source,[M,ee]),lookbehind:!0,inside:le},{pattern:g(/(\bcatch\s*\(\s*)<<0>>/.source,[oe]),lookbehind:!0,inside:le},{pattern:g(/(\bwhere\s+)<<0>>/.source,[z]),lookbehind:!0},{pattern:g(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source,[ne]),lookbehind:!0,inside:le},{pattern:g(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source,[xe,G,z]),inside:le}],keyword:I,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),p.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),p.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:g(/([(,]\s*)<<0>>(?=\s*:)/.source,[z]),lookbehind:!0,alias:"punctuation"}}),p.languages.insertBefore("csharp","class-name",{namespace:{pattern:g(/(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,[z]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:g(/(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/.source,[X]),lookbehind:!0,alias:"class-name",inside:le},"return-type":{pattern:g(/<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,[xe,oe]),inside:le,alias:"class-name"},"constructor-invocation":{pattern:g(/(\bnew\s+)<<0>>(?=\s*[[({])/.source,[xe]),lookbehind:!0,inside:le,alias:"class-name"},"generic-method":{pattern:g(/<<0>>\s*<<1>>(?=\s*\()/.source,[z,K]),inside:{function:g(/^<<0>>/.source,[z]),generic:{pattern:RegExp(K),alias:"class-name",inside:le}}},"type-list":{pattern:g(/\b((?:<<0>>\s+<<1>>|record\s+<<1>>\s*<<5>>|where\s+<<2>>)\s*:\s*)(?:<<3>>|<<4>>|<<1>>\s*<<5>>|<<6>>)(?:\s*,\s*(?:<<3>>|<<4>>|<<6>>))*(?=\s*(?:where|[{;]|=>|$))/.source,[M,ee,z,xe,I.source,X,/\bnew\s*\(\s*\)/.source]),lookbehind:!0,inside:{"record-arguments":{pattern:g(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source,[ee,X]),lookbehind:!0,greedy:!0,inside:p.languages.csharp},keyword:I,"class-name":{pattern:RegExp(xe),greedy:!0,inside:le},punctuation:/[,()]/}},preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var ce=je+"|"+be,re=m(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,[ce]),ue=b(m(/[^"'/()]|<<0>>|\(<<self>>*\)/.source,[re]),2),_e=/\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source,fe=m(/<<0>>(?:\s*\(<<1>>*\))?/.source,[oe,ue]);p.languages.insertBefore("csharp","class-name",{attribute:{pattern:g(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source,[_e,fe]),lookbehind:!0,greedy:!0,inside:{target:{pattern:g(/^<<0>>(?=\s*:)/.source,[_e]),alias:"keyword"},"attribute-arguments":{pattern:g(/\(<<0>>*\)/.source,[ue]),inside:p.languages.csharp},"class-name":{pattern:RegExp(oe),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var He=/:[^}\r\n]+/.source,Oe=b(m(/[^"'/()]|<<0>>|\(<<self>>*\)/.source,[re]),2),ke=m(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[Oe,He]),Ve=b(m(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<<self>>*\)/.source,[ce]),2),ie=m(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[Ve,He]);function Ne(ze,tt){return{interpolation:{pattern:g(/((?:^|[^{])(?:\{\{)*)<<0>>/.source,[ze]),lookbehind:!0,inside:{"format-string":{pattern:g(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source,[tt,He]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:p.languages.csharp}}},string:/[\s\S]+/}}p.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:g(/(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/.source,[ke]),lookbehind:!0,greedy:!0,inside:Ne(ke,Oe)},{pattern:g(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source,[ie]),lookbehind:!0,greedy:!0,inside:Ne(ie,Ve)}],char:{pattern:RegExp(be),greedy:!0}}),p.languages.dotnet=p.languages.cs=p.languages.csharp})(Prism)},113:()=>{(function(p){var m=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;p.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+m.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+m.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+m.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+m.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:m,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},p.languages.css.atrule.inside.rest=p.languages.css;var g=p.languages.markup;g&&(g.tag.addInlined("style","css"),g.tag.addAttribute("style","css"))})(Prism)},378:()=>{Prism.languages.go=Prism.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),Prism.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete Prism.languages.go["class-name"]},784:()=>{(function(p){function m(M){return RegExp("(^(?:"+M+"):[ ]*(?![ ]))[^]+","i")}p.languages.http={"request-line":{pattern:/^(?:CONNECT|DELETE|GET|HEAD|OPTIONS|PATCH|POST|PRI|PUT|SEARCH|TRACE)\s(?:https?:\/\/|\/)\S*\sHTTP\/[\d.]+/m,inside:{method:{pattern:/^[A-Z]+\b/,alias:"property"},"request-target":{pattern:/^(\s)(?:https?:\/\/|\/)\S*(?=\s)/,lookbehind:!0,alias:"url",inside:p.languages.uri},"http-version":{pattern:/^(\s)HTTP\/[\d.]+/,lookbehind:!0,alias:"property"}}},"response-status":{pattern:/^HTTP\/[\d.]+ \d+ .+/m,inside:{"http-version":{pattern:/^HTTP\/[\d.]+/,alias:"property"},"status-code":{pattern:/^(\s)\d+(?=\s)/,lookbehind:!0,alias:"number"},"reason-phrase":{pattern:/^(\s).+/,lookbehind:!0,alias:"string"}}},header:{pattern:/^[\w-]+:.+(?:(?:\r\n?|\n)[ \t].+)*/m,inside:{"header-value":[{pattern:m(/Content-Security-Policy/.source),lookbehind:!0,alias:["csp","languages-csp"],inside:p.languages.csp},{pattern:m(/Public-Key-Pins(?:-Report-Only)?/.source),lookbehind:!0,alias:["hpkp","languages-hpkp"],inside:p.languages.hpkp},{pattern:m(/Strict-Transport-Security/.source),lookbehind:!0,alias:["hsts","languages-hsts"],inside:p.languages.hsts},{pattern:m(/[^:]+/.source),lookbehind:!0}],"header-name":{pattern:/^[^:]+/,alias:"keyword"},punctuation:/^:/}}};var g,b=p.languages,S={"application/javascript":b.javascript,"application/json":b.json||b.javascript,"application/xml":b.xml,"text/xml":b.xml,"text/html":b.html,"text/css":b.css,"text/plain":b.plain},E={"application/json":!0,"application/xml":!0};function A(M){var I=M.replace(/^[a-z]+\//,"");return"(?:"+M+"|"+("\\w+/(?:[\\w.-]+\\+)+"+I+"(?![+\\w.-])")+")"}for(var k in S)if(S[k]){g=g||{};var T=E[k]?A(k):k;g[k.replace(/\//g,"-")]={pattern:RegExp("("+/content-type:\s*/.source+T+/(?:(?:\r\n?|\n)[\w-].*)*(?:\r(?:\n|(?!\n))|\n)/.source+")"+/[^ \t\w-][\s\S]*/.source,"i"),lookbehind:!0,inside:S[k]}}g&&p.languages.insertBefore("http","header",g)})(Prism)},976:()=>{(function(p){var m=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,g=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,b={pattern:RegExp(/(^|[^\w.])/.source+g+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};p.languages.java=p.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[b,{pattern:RegExp(/(^|[^\w.])/.source+g+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:b.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+g+/[A-Z]\w*\b/.source),lookbehind:!0,inside:b.inside}],keyword:m,function:[p.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),p.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),p.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":b,keyword:m,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+g+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:b.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+g+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:b.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g,(function(){return m.source}))),lookbehind:!0,inside:{punctuation:/\./}}})})(Prism)},514:()=>{Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},Prism.languages.webmanifest=Prism.languages.json},342:()=>{Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern://,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python},83:()=>{(function(p){var m=/[*&][^\s[\]{},]+/,g=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,b="(?:"+g.source+"(?:[ ]+"+m.source+")?|"+m.source+"(?:[ ]+"+g.source+")?)",S=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g,(function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source})),E=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function A(k,T){T=(T||"").replace(/m/g,"")+"m";var M=/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,(function(){return b})).replace(/<<value>>/g,(function(){return k}));return RegExp(M,T)}p.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g,(function(){return b}))),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,(function(){return b})).replace(/<<key>>/g,(function(){return"(?:"+S+"|"+E+")"}))),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:A(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:A(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:A(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:A(E),lookbehind:!0,greedy:!0},number:{pattern:A(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:g,important:m,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},p.languages.yml=p.languages.yaml})(Prism)},848:(p,m,g)=>{var b=(function(S){var E=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,A=0,k={},T={manual:S.Prism&&S.Prism.manual,disableWorkerMessageHandler:S.Prism&&S.Prism.disableWorkerMessageHandler,util:{encode:function Q(ne){return ne instanceof M?new M(ne.type,Q(ne.content),ne.alias):Array.isArray(ne)?ne.map(Q):ne.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(Q){return Object.prototype.toString.call(Q).slice(8,-1)},objId:function(Q){return Q.__id||Object.defineProperty(Q,"__id",{value:++A}),Q.__id},clone:function Q(ne,de){var Ce,xe;switch(de=de||{},T.util.type(ne)){case"Object":if(xe=T.util.objId(ne),de[xe])return de[xe];for(var le in Ce={},de[xe]=Ce,ne)ne.hasOwnProperty(le)&&(Ce[le]=Q(ne[le],de));return Ce;case"Array":return xe=T.util.objId(ne),de[xe]?de[xe]:(Ce=[],de[xe]=Ce,ne.forEach((function(be,je){Ce[je]=Q(be,de)})),Ce);default:return ne}},getLanguage:function(Q){for(;Q;){var ne=E.exec(Q.className);if(ne)return ne[1].toLowerCase();Q=Q.parentElement}return"none"},setLanguage:function(Q,ne){Q.className=Q.className.replace(RegExp(E,"gi"),""),Q.classList.add("language-"+ne)},currentScript:function(){if(typeof document>"u")return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(Ce){var Q=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(Ce.stack)||[])[1];if(Q){var ne=document.getElementsByTagName("script");for(var de in ne)if(ne[de].src==Q)return ne[de]}return null}},isActive:function(Q,ne,de){for(var Ce="no-"+ne;Q;){var xe=Q.classList;if(xe.contains(ne))return!0;if(xe.contains(Ce))return!1;Q=Q.parentElement}return!!de}},languages:{plain:k,plaintext:k,text:k,txt:k,extend:function(Q,ne){var de=T.util.clone(T.languages[Q]);for(var Ce in ne)de[Ce]=ne[Ce];return de},insertBefore:function(Q,ne,de,Ce){var xe=(Ce=Ce||T.languages)[Q],le={};for(var be in xe)if(xe.hasOwnProperty(be)){if(be==ne)for(var je in de)de.hasOwnProperty(je)&&(le[je]=de[je]);de.hasOwnProperty(be)||(le[be]=xe[be])}var Ke=Ce[Q];return Ce[Q]=le,T.languages.DFS(T.languages,(function(ce,re){re===Ke&&ce!=Q&&(this[ce]=le)})),le},DFS:function Q(ne,de,Ce,xe){xe=xe||{};var le=T.util.objId;for(var be in ne)if(ne.hasOwnProperty(be)){de.call(ne,be,ne[be],Ce||be);var je=ne[be],Ke=T.util.type(je);Ke!=="Object"||xe[le(je)]?Ke!=="Array"||xe[le(je)]||(xe[le(je)]=!0,Q(je,de,be,xe)):(xe[le(je)]=!0,Q(je,de,null,xe))}}},plugins:{},highlightAll:function(Q,ne){T.highlightAllUnder(document,Q,ne)},highlightAllUnder:function(Q,ne,de){var Ce={callback:de,container:Q,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};T.hooks.run("before-highlightall",Ce),Ce.elements=Array.prototype.slice.apply(Ce.container.querySelectorAll(Ce.selector)),T.hooks.run("before-all-elements-highlight",Ce);for(var xe,le=0;xe=Ce.elements[le++];)T.highlightElement(xe,ne===!0,Ce.callback)},highlightElement:function(Q,ne,de){var Ce=T.util.getLanguage(Q),xe=T.languages[Ce];T.util.setLanguage(Q,Ce);var le=Q.parentElement;le&&le.nodeName.toLowerCase()==="pre"&&T.util.setLanguage(le,Ce);var be={element:Q,language:Ce,grammar:xe,code:Q.textContent};function je(ce){be.highlightedCode=ce,T.hooks.run("before-insert",be),be.element.innerHTML=be.highlightedCode,T.hooks.run("after-highlight",be),T.hooks.run("complete",be),de&&de.call(be.element)}if(T.hooks.run("before-sanity-check",be),(le=be.element.parentElement)&&le.nodeName.toLowerCase()==="pre"&&!le.hasAttribute("tabindex")&&le.setAttribute("tabindex","0"),!be.code)return T.hooks.run("complete",be),void(de&&de.call(be.element));if(T.hooks.run("before-highlight",be),be.grammar)if(ne&&S.Worker){var Ke=new Worker(T.filename);Ke.onmessage=function(ce){je(ce.data)},Ke.postMessage(JSON.stringify({language:be.language,code:be.code,immediateClose:!0}))}else je(T.highlight(be.code,be.grammar,be.language));else je(T.util.encode(be.code))},highlight:function(Q,ne,de){var Ce={code:Q,grammar:ne,language:de};if(T.hooks.run("before-tokenize",Ce),!Ce.grammar)throw new Error('The language "'+Ce.language+'" has no grammar.');return Ce.tokens=T.tokenize(Ce.code,Ce.grammar),T.hooks.run("after-tokenize",Ce),M.stringify(T.util.encode(Ce.tokens),Ce.language)},tokenize:function(Q,ne){var de=ne.rest;if(de){for(var Ce in de)ne[Ce]=de[Ce];delete ne.rest}var xe=new G;return K(xe,xe.head,Q),q(Q,xe,ne,xe.head,0),(function(le){for(var be=[],je=le.head.next;je!==le.tail;)be.push(je.value),je=je.next;return be})(xe)},hooks:{all:{},add:function(Q,ne){var de=T.hooks.all;de[Q]=de[Q]||[],de[Q].push(ne)},run:function(Q,ne){var de=T.hooks.all[Q];if(de&&de.length)for(var Ce,xe=0;Ce=de[xe++];)Ce(ne)}},Token:M};function M(Q,ne,de,Ce){this.type=Q,this.content=ne,this.alias=de,this.length=0|(Ce||"").length}function I(Q,ne,de,Ce){Q.lastIndex=ne;var xe=Q.exec(de);if(xe&&Ce&&xe[1]){var le=xe[1].length;xe.index+=le,xe[0]=xe[0].slice(le)}return xe}function q(Q,ne,de,Ce,xe,le){for(var be in de)if(de.hasOwnProperty(be)&&de[be]){var je=de[be];je=Array.isArray(je)?je:[je];for(var Ke=0;Ke<je.length;++Ke){if(le&&le.cause==be+","+Ke)return;var ce=je[Ke],re=ce.inside,ue=!!ce.lookbehind,_e=!!ce.greedy,fe=ce.alias;if(_e&&!ce.pattern.global){var He=ce.pattern.toString().match(/[imsuy]*$/)[0];ce.pattern=RegExp(ce.pattern.source,He+"g")}for(var Oe=ce.pattern||ce,ke=Ce.next,Ve=xe;ke!==ne.tail&&!(le&&Ve>=le.reach);Ve+=ke.value.length,ke=ke.next){var ie=ke.value;if(ne.length>Q.length)return;if(!(ie instanceof M)){var Ne,ze=1;if(_e){if(!(Ne=I(Oe,Ve,Q,ue))||Ne.index>=Q.length)break;var tt=Ne.index,ft=Ne.index+Ne[0].length,Ot=Ve;for(Ot+=ke.value.length;tt>=Ot;)Ot+=(ke=ke.next).value.length;if(Ve=Ot-=ke.value.length,ke.value instanceof M)continue;for(var Ft=ke;Ft!==ne.tail&&(Ot<ft||typeof Ft.value=="string");Ft=Ft.next)ze++,Ot+=Ft.value.length;ze--,ie=Q.slice(Ve,Ot),Ne.index-=Ve}else if(!(Ne=I(Oe,0,ie,ue)))continue;tt=Ne.index;var kt=Ne[0],Jt=ie.slice(0,tt),Le=ie.slice(tt+kt.length),Lt=Ve+ie.length;le&&Lt>le.reach&&(le.reach=Lt);var Rt=ke.prev;if(Jt&&(Rt=K(ne,Rt,Jt),Ve+=Jt.length),X(ne,Rt,ze),ke=K(ne,Rt,new M(be,re?T.tokenize(kt,re):kt,fe,kt)),Le&&K(ne,ke,Le),ze>1){var V={cause:be+","+Ke,reach:Lt};q(Q,ne,de,ke.prev,Ve,V),le&&V.reach>le.reach&&(le.reach=V.reach)}}}}}}function G(){var Q={value:null,prev:null,next:null},ne={value:null,prev:Q,next:null};Q.next=ne,this.head=Q,this.tail=ne,this.length=0}function K(Q,ne,de){var Ce=ne.next,xe={value:de,prev:ne,next:Ce};return ne.next=xe,Ce.prev=xe,Q.length++,xe}function X(Q,ne,de){for(var Ce=ne.next,xe=0;xe<de&&Ce!==Q.tail;xe++)Ce=Ce.next;ne.next=Ce,Ce.prev=ne,Q.length-=xe}if(S.Prism=T,M.stringify=function Q(ne,de){if(typeof ne=="string")return ne;if(Array.isArray(ne)){var Ce="";return ne.forEach((function(Ke){Ce+=Q(Ke,de)})),Ce}var xe={type:ne.type,content:Q(ne.content,de),tag:"span",classes:["token",ne.type],attributes:{},language:de},le=ne.alias;le&&(Array.isArray(le)?Array.prototype.push.apply(xe.classes,le):xe.classes.push(le)),T.hooks.run("wrap",xe);var be="";for(var je in xe.attributes)be+=" "+je+'="'+(xe.attributes[je]||"").replace(/"/g,""")+'"';return"<"+xe.tag+' class="'+xe.classes.join(" ")+'"'+be+">"+xe.content+"</"+xe.tag+">"},!S.document)return S.addEventListener&&(T.disableWorkerMessageHandler||S.addEventListener("message",(function(Q){var ne=JSON.parse(Q.data),de=ne.language,Ce=ne.code,xe=ne.immediateClose;S.postMessage(T.highlight(Ce,T.languages[de],de)),xe&&S.close()}),!1)),T;var z=T.util.currentScript();function ee(){T.manual||T.highlightAll()}if(z&&(T.filename=z.src,z.hasAttribute("data-manual")&&(T.manual=!0)),!T.manual){var oe=document.readyState;oe==="loading"||oe==="interactive"&&z&&z.defer?document.addEventListener("DOMContentLoaded",ee):window.requestAnimationFrame?window.requestAnimationFrame(ee):window.setTimeout(ee,16)}return T})(typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{});p.exports&&(p.exports=b),g.g!==void 0&&(g.g.Prism=b),b.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},b.languages.markup.tag.inside["attr-value"].inside.entity=b.languages.markup.entity,b.languages.markup.doctype.inside["internal-subset"].inside=b.languages.markup,b.hooks.add("wrap",(function(S){S.type==="entity"&&(S.attributes.title=S.content.replace(/&/,"&"))})),Object.defineProperty(b.languages.markup.tag,"addInlined",{value:function(S,E){var A={};A["language-"+E]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:b.languages[E]},A.cdata=/^<!\[CDATA\[|\]\]>$/i;var k={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:A}};k["language-"+E]={pattern:/[\s\S]+/,inside:b.languages[E]};var T={};T[S]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,(function(){return S})),"i"),lookbehind:!0,greedy:!0,inside:k},b.languages.insertBefore("markup","cdata",T)}}),Object.defineProperty(b.languages.markup.tag,"addAttribute",{value:function(S,E){b.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+S+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[E,"language-"+E],inside:b.languages[E]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),b.languages.html=b.languages.markup,b.languages.mathml=b.languages.markup,b.languages.svg=b.languages.markup,b.languages.xml=b.languages.extend("markup",{}),b.languages.ssml=b.languages.xml,b.languages.atom=b.languages.xml,b.languages.rss=b.languages.xml,(function(S){var E=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;S.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+E.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+E.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+E.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+E.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:E,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},S.languages.css.atrule.inside.rest=S.languages.css;var A=S.languages.markup;A&&(A.tag.addInlined("style","css"),A.tag.addAttribute("style","css"))})(b),b.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},b.languages.javascript=b.languages.extend("clike",{"class-name":[b.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),b.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,b.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:b.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:b.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:b.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:b.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:b.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),b.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:b.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),b.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),b.languages.markup&&(b.languages.markup.tag.addInlined("script","javascript"),b.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),b.languages.js=b.languages.javascript,(function(){if(b!==void 0&&typeof document<"u"){Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var S={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},E="data-src-status",A="loading",k="loaded",T="pre[data-src]:not(["+E+'="'+k+'"]):not(['+E+'="'+A+'"])';b.hooks.add("before-highlightall",(function(I){I.selector+=", "+T})),b.hooks.add("before-sanity-check",(function(I){var q=I.element;if(q.matches(T)){I.code="",q.setAttribute(E,A);var G=q.appendChild(document.createElement("CODE"));G.textContent="Loading…";var K=q.getAttribute("data-src"),X=I.language;if(X==="none"){var z=(/\.(\w+)$/.exec(K)||[,"none"])[1];X=S[z]||z}b.util.setLanguage(G,X),b.util.setLanguage(q,X);var ee=b.plugins.autoloader;ee&&ee.loadLanguages(X),(function(oe,Q,ne){var de=new XMLHttpRequest;de.open("GET",oe,!0),de.onreadystatechange=function(){de.readyState==4&&(de.status<400&&de.responseText?Q(de.responseText):de.status>=400?ne("✖ Error "+de.status+" while fetching file: "+de.statusText):ne("✖ Error: File does not exist or is empty"))},de.send(null)})(K,(function(oe){q.setAttribute(E,k);var Q=(function(xe){var le=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(xe||"");if(le){var be=Number(le[1]),je=le[2],Ke=le[3];return je?Ke?[be,Number(Ke)]:[be,void 0]:[be,be]}})(q.getAttribute("data-range"));if(Q){var ne=oe.split(/\r\n?|\n/g),de=Q[0],Ce=Q[1]==null?ne.length:Q[1];de<0&&(de+=ne.length),de=Math.max(0,Math.min(de-1,ne.length)),Ce<0&&(Ce+=ne.length),Ce=Math.max(0,Math.min(Ce,ne.length)),oe=ne.slice(de,Ce).join(`
|
||
`),q.hasAttribute("data-start")||q.setAttribute("data-start",String(de+1))}G.textContent=oe,b.highlightElement(G)}),(function(oe){q.setAttribute(E,"failed"),G.textContent=oe}))}})),b.plugins.fileHighlight={highlight:function(I){for(var q,G=(I||document).querySelectorAll(T),K=0;q=G[K++];)b.highlightElement(q)}};var M=!1;b.fileHighlight=function(){M||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),M=!0),b.plugins.fileHighlight.highlight.apply(this,arguments)}}})()},859:(p,m,g)=>{const b=g(96),S=g(4),E=b.types;p.exports=class Ob{constructor(k,T){if(this._setDefaults(k),k instanceof RegExp)this.ignoreCase=k.ignoreCase,this.multiline=k.multiline,k=k.source;else{if(typeof k!="string")throw new Error("Expected a regexp or string");this.ignoreCase=T&&T.indexOf("i")!==-1,this.multiline=T&&T.indexOf("m")!==-1}this.tokens=b(k)}_setDefaults(k){this.max=k.max!=null?k.max:Ob.prototype.max!=null?Ob.prototype.max:100,this.defaultRange=k.defaultRange?k.defaultRange:this.defaultRange.clone(),k.randInt&&(this.randInt=k.randInt)}gen(){return this._gen(this.tokens,[])}_gen(k,T){var M,I,q,G,K;switch(k.type){case E.ROOT:case E.GROUP:if(k.followedBy||k.notFollowedBy)return"";for(k.remember&&k.groupNumber===void 0&&(k.groupNumber=T.push(null)-1),I="",G=0,K=(M=k.options?this._randSelect(k.options):k.stack).length;G<K;G++)I+=this._gen(M[G],T);return k.remember&&(T[k.groupNumber]=I),I;case E.POSITION:return"";case E.SET:var X=this._expand(k);return X.length?String.fromCharCode(this._randSelect(X)):"";case E.REPETITION:for(q=this.randInt(k.min,k.max===1/0?k.min+this.max:k.max),I="",G=0;G<q;G++)I+=this._gen(k.value,T);return I;case E.REFERENCE:return T[k.value-1]||"";case E.CHAR:var z=this.ignoreCase&&this._randBool()?this._toOtherCase(k.value):k.value;return String.fromCharCode(z)}}_toOtherCase(k){return k+(97<=k&&k<=122?-32:65<=k&&k<=90?32:0)}_randBool(){return!this.randInt(0,1)}_randSelect(k){return k instanceof S?k.index(this.randInt(0,k.length-1)):k[this.randInt(0,k.length-1)]}_expand(k){if(k.type===b.types.CHAR)return new S(k.value);if(k.type===b.types.RANGE)return new S(k.from,k.to);{let T=new S;for(let M=0;M<k.set.length;M++){let I=this._expand(k.set[M]);if(T.add(I),this.ignoreCase)for(let q=0;q<I.length;q++){let G=I.index(q),K=this._toOtherCase(G);G!==K&&T.add(K)}}return k.not?this.defaultRange.clone().subtract(T):this.defaultRange.clone().intersect(T)}}randInt(k,T){return k+Math.floor(Math.random()*(1+T-k))}get defaultRange(){return this._range=this._range||new S(32,126)}set defaultRange(k){this._range=k}static randexp(k,T){var M;return typeof k=="string"&&(k=new RegExp(k,T)),k._randexp===void 0?(M=new Ob(k,T),k._randexp=M):(M=k._randexp)._setDefaults(k),M.gen()}static sugar(){RegExp.prototype.gen=function(){return Ob.randexp(this)}}}},208:p=>{var m,g="";p.exports=function(b,S){if(typeof b!="string")throw new TypeError("expected a string");if(S===1)return b;if(S===2)return b+b;var E=b.length*S;if(m!==b||m===void 0)m=b,g="";else if(g.length>=E)return g.substr(0,E);for(;E>g.length&&S>1;)1&S&&(g+=b),S>>=1,b+=b;return g=(g+=b).substr(0,E)}},96:(p,m,g)=>{const b=g(586),S=g(205),E=g(23),A=g(48);p.exports=k=>{var T,M,I=0,q={type:S.ROOT,stack:[]},G=q,K=q.stack,X=[],z=be=>{b.error(k,"Nothing to repeat at column "+(be-1))},ee=b.strToChars(k);for(T=ee.length;I<T;)switch(M=ee[I++]){case"\\":switch(M=ee[I++]){case"b":K.push(A.wordBoundary());break;case"B":K.push(A.nonWordBoundary());break;case"w":K.push(E.words());break;case"W":K.push(E.notWords());break;case"d":K.push(E.ints());break;case"D":K.push(E.notInts());break;case"s":K.push(E.whitespace());break;case"S":K.push(E.notWhitespace());break;default:/\d/.test(M)?K.push({type:S.REFERENCE,value:parseInt(M,10)}):K.push({type:S.CHAR,value:M.charCodeAt(0)})}break;case"^":K.push(A.begin());break;case"$":K.push(A.end());break;case"[":var oe;ee[I]==="^"?(oe=!0,I++):oe=!1;var Q=b.tokenizeClass(ee.slice(I),k);I+=Q[1],K.push({type:S.SET,set:Q[0],not:oe});break;case".":K.push(E.anyChar());break;case"(":var ne={type:S.GROUP,stack:[],remember:!0};(M=ee[I])==="?"&&(M=ee[I+1],I+=2,M==="="?ne.followedBy=!0:M==="!"?ne.notFollowedBy=!0:M!==":"&&b.error(k,`Invalid group, character '${M}' after '?' at column `+(I-1)),ne.remember=!1),K.push(ne),X.push(G),G=ne,K=ne.stack;break;case")":X.length===0&&b.error(k,"Unmatched ) at column "+(I-1)),K=(G=X.pop()).options?G.options[G.options.length-1]:G.stack;break;case"|":G.options||(G.options=[G.stack],delete G.stack);var de=[];G.options.push(de),K=de;break;case"{":var Ce,xe,le=/^(\d+)(,(\d+)?)?\}/.exec(ee.slice(I));le!==null?(K.length===0&&z(I),Ce=parseInt(le[1],10),xe=le[2]?le[3]?parseInt(le[3],10):1/0:Ce,I+=le[0].length,K.push({type:S.REPETITION,min:Ce,max:xe,value:K.pop()})):K.push({type:S.CHAR,value:123});break;case"?":K.length===0&&z(I),K.push({type:S.REPETITION,min:0,max:1,value:K.pop()});break;case"+":K.length===0&&z(I),K.push({type:S.REPETITION,min:1,max:1/0,value:K.pop()});break;case"*":K.length===0&&z(I),K.push({type:S.REPETITION,min:0,max:1/0,value:K.pop()});break;default:K.push({type:S.CHAR,value:M.charCodeAt(0)})}return X.length!==0&&b.error(k,"Unterminated group"),q},p.exports.types=S},48:(p,m,g)=>{const b=g(205);m.wordBoundary=()=>({type:b.POSITION,value:"b"}),m.nonWordBoundary=()=>({type:b.POSITION,value:"B"}),m.begin=()=>({type:b.POSITION,value:"^"}),m.end=()=>({type:b.POSITION,value:"$"})},23:(p,m,g)=>{const b=g(205),S=()=>[{type:b.RANGE,from:48,to:57}],E=()=>[{type:b.CHAR,value:95},{type:b.RANGE,from:97,to:122},{type:b.RANGE,from:65,to:90}].concat(S()),A=()=>[{type:b.CHAR,value:9},{type:b.CHAR,value:10},{type:b.CHAR,value:11},{type:b.CHAR,value:12},{type:b.CHAR,value:13},{type:b.CHAR,value:32},{type:b.CHAR,value:160},{type:b.CHAR,value:5760},{type:b.RANGE,from:8192,to:8202},{type:b.CHAR,value:8232},{type:b.CHAR,value:8233},{type:b.CHAR,value:8239},{type:b.CHAR,value:8287},{type:b.CHAR,value:12288},{type:b.CHAR,value:65279}];m.words=()=>({type:b.SET,set:E(),not:!1}),m.notWords=()=>({type:b.SET,set:E(),not:!0}),m.ints=()=>({type:b.SET,set:S(),not:!1}),m.notInts=()=>({type:b.SET,set:S(),not:!0}),m.whitespace=()=>({type:b.SET,set:A(),not:!1}),m.notWhitespace=()=>({type:b.SET,set:A(),not:!0}),m.anyChar=()=>({type:b.SET,set:[{type:b.CHAR,value:10},{type:b.CHAR,value:13},{type:b.CHAR,value:8232},{type:b.CHAR,value:8233}],not:!0})},205:p=>{p.exports={ROOT:0,GROUP:1,POSITION:2,SET:3,RANGE:4,REPETITION:5,REFERENCE:6,CHAR:7}},586:(p,m,g)=>{const b=g(205),S=g(23),E={0:0,t:9,n:10,v:11,f:12,r:13};m.strToChars=function(A){return A=A.replace(/(\[\\b\])|(\\)?\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|(0?[0-7]{2})|c([@A-Z[\\\]^?])|([0tnvfr]))/g,(function(k,T,M,I,q,G,K,X){if(M)return k;var z=T?8:I?parseInt(I,16):q?parseInt(q,16):G?parseInt(G,8):K?"@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?".indexOf(K):E[X],ee=String.fromCharCode(z);return/[[\]{}^$.|?*+()]/.test(ee)&&(ee="\\"+ee),ee}))},m.tokenizeClass=(A,k)=>{for(var T,M,I=[],q=/\\(?:(w)|(d)|(s)|(W)|(D)|(S))|((?:(?:\\)(.)|([^\]\\]))-(?:\\)?([^\]]))|(\])|(?:\\)?([^])/g;(T=q.exec(A))!=null;)if(T[1])I.push(S.words());else if(T[2])I.push(S.ints());else if(T[3])I.push(S.whitespace());else if(T[4])I.push(S.notWords());else if(T[5])I.push(S.notInts());else if(T[6])I.push(S.notWhitespace());else if(T[7])I.push({type:b.RANGE,from:(T[8]||T[9]).charCodeAt(0),to:T[10].charCodeAt(0)});else{if(!(M=T[12]))return[I,q.lastIndex];I.push({type:b.CHAR,value:M.charCodeAt(0)})}m.error(k,"Unterminated character class")},m.error=(A,k)=>{throw new SyntaxError("Invalid regular expression: /"+A+"/: "+k)}},657:(p,m,g)=>{var b=g(208),S=function(T){return/<\/+[^>]+>/.test(T)},E=function(T){return/<[^>]+\/>/.test(T)},A=function(T){return(function(M){return/<[^>!]+>/.test(M)})(T)&&!S(T)&&!E(T)};function k(T){return S(T)?"ClosingTag":A(T)?"OpeningTag":E(T)?"SelfClosingTag":"Text"}p.exports=function(T){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},I=M.indentor,q=M.textNodesOnSameLine,G=0,K=[];I=I||" ";var X,z,ee=(X=T,(z=X,z.split(/(<\/?[^>]+>)/g).filter((function(oe){return oe.trim()!==""}))).map((function(oe){return{value:oe,type:k(oe)}}))).map((function(oe,Q,ne){var de=oe.value,Ce=oe.type;Ce==="ClosingTag"&&G--;var xe=b(I,G),le=xe+de;if(Ce==="OpeningTag"&&G++,q){var be=ne[Q-1],je=ne[Q-2];Ce==="ClosingTag"&&be.type==="Text"&&je.type==="OpeningTag"&&(le=""+xe+je.value+be.value+de,K.push(Q-2,Q-1))}return le}));return K.forEach((function(oe){return ee[oe]=null})),ee.filter((function(oe){return!!oe})).join(`
|
||
`)}}},o={};function d(p){var m=o[p];if(m!==void 0){if(m.error!==void 0)throw m.error;return m.exports}var g=o[p]={exports:{}};try{var b={id:p,module:g,factory:s[p],require:d};d.i.forEach((function(S){S(b)})),g=b.module,b.factory.call(g.exports,g,g.exports,b.require)}catch(S){throw g.error=S,S}return g.exports}d.m=s,d.c=o,d.i=[],d.n=p=>{var m=p&&p.__esModule?()=>p.default:()=>p;return d.d(m,{a:m}),m},d.d=(p,m)=>{for(var g in m)d.o(m,g)&&!d.o(p,g)&&Object.defineProperty(p,g,{enumerable:!0,get:m[g]})},d.hu=p=>p+"."+d.h()+".hot-update.js",d.hmrF=()=>"main."+d.h()+".hot-update.json",d.h=()=>"2337278d415d81467132",d.g=(function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}})(),d.o=(p,m)=>Object.prototype.hasOwnProperty.call(p,m),e={},r="rapidoc:",d.l=(p,m,g,b)=>{if(e[p])e[p].push(m);else{var S,E;if(g!==void 0)for(var A=document.getElementsByTagName("script"),k=0;k<A.length;k++){var T=A[k];if(T.getAttribute("src")==p||T.getAttribute("data-webpack")==r+g){S=T;break}}S||(E=!0,(S=document.createElement("script")).charset="utf-8",S.timeout=120,d.nc&&S.setAttribute("nonce",d.nc),S.setAttribute("data-webpack",r+g),S.src=p),e[p]=[m];var M=(q,G)=>{S.onerror=S.onload=null,clearTimeout(I);var K=e[p];if(delete e[p],S.parentNode&&S.parentNode.removeChild(S),K&&K.forEach((X=>X(G))),q)return q(G)},I=setTimeout(M.bind(null,void 0,{type:"timeout",target:S}),12e4);S.onerror=M.bind(null,S.onerror),S.onload=M.bind(null,S.onload),E&&document.head.appendChild(S)}},(()=>{var p,m,g,b={},S=d.c,E=[],A=[],k="idle",T=0,M=[];function I(ee){k=ee;for(var oe=[],Q=0;Q<A.length;Q++)oe[Q]=A[Q].call(null,ee);return Promise.all(oe).then((function(){}))}function q(){--T==0&&I("ready").then((function(){if(T===0){var ee=M;M=[];for(var oe=0;oe<ee.length;oe++)ee[oe]()}}))}function G(ee){if(k!=="idle")throw new Error("check() is only allowed in idle status");return I("check").then(d.hmrM).then((function(oe){return oe?I("prepare").then((function(){var Q=[];return m=[],Promise.all(Object.keys(d.hmrC).reduce((function(ne,de){return d.hmrC[de](oe.c,oe.r,oe.m,ne,m,Q),ne}),[])).then((function(){return ne=function(){return ee?X(ee):I("ready").then((function(){return Q}))},T===0?ne():new Promise((function(de){M.push((function(){de(ne())}))}));var ne}))})):I(z()?"ready":"idle").then((function(){return null}))}))}function K(ee){return k!=="ready"?Promise.resolve().then((function(){throw new Error("apply() is only allowed in ready status (state: "+k+")")})):X(ee)}function X(ee){ee=ee||{},z();var oe=m.map((function(be){return be(ee)}));m=void 0;var Q=oe.map((function(be){return be.error})).filter(Boolean);if(Q.length>0)return I("abort").then((function(){throw Q[0]}));var ne=I("dispose");oe.forEach((function(be){be.dispose&&be.dispose()}));var de,Ce=I("apply"),xe=function(be){de||(de=be)},le=[];return oe.forEach((function(be){if(be.apply){var je=be.apply(xe);if(je)for(var Ke=0;Ke<je.length;Ke++)le.push(je[Ke])}})),Promise.all([ne,Ce]).then((function(){return de?I("fail").then((function(){throw de})):g?X(ee).then((function(be){return le.forEach((function(je){be.indexOf(je)<0&&be.push(je)})),be})):I("idle").then((function(){return le}))}))}function z(){if(g)return m||(m=[]),Object.keys(d.hmrI).forEach((function(ee){g.forEach((function(oe){d.hmrI[ee](oe,m)}))})),g=void 0,!0}d.hmrD=b,d.i.push((function(ee){var oe,Q,ne,de,Ce=ee.module,xe=(function(le,be){var je=S[be];if(!je)return le;var Ke=function(ue){if(je.hot.active){if(S[ue]){var _e=S[ue].parents;_e.indexOf(be)===-1&&_e.push(be)}else E=[be],p=ue;je.children.indexOf(ue)===-1&&je.children.push(ue)}else console.warn("[HMR] unexpected require("+ue+") from disposed module "+be),E=[];return le(ue)},ce=function(ue){return{configurable:!0,enumerable:!0,get:function(){return le[ue]},set:function(_e){le[ue]=_e}}};for(var re in le)Object.prototype.hasOwnProperty.call(le,re)&&re!=="e"&&Object.defineProperty(Ke,re,ce(re));return Ke.e=function(ue,_e){return(function(fe){switch(k){case"ready":I("prepare");case"prepare":return T++,fe.then(q,q),fe;default:return fe}})(le.e(ue,_e))},Ke})(ee.require,ee.id);Ce.hot=(oe=ee.id,Q=Ce,de={_acceptedDependencies:{},_acceptedErrorHandlers:{},_declinedDependencies:{},_selfAccepted:!1,_selfDeclined:!1,_selfInvalidated:!1,_disposeHandlers:[],_main:ne=p!==oe,_requireSelf:function(){E=Q.parents.slice(),p=ne?void 0:oe,d(oe)},active:!0,accept:function(le,be,je){if(le===void 0)de._selfAccepted=!0;else if(typeof le=="function")de._selfAccepted=le;else if(typeof le=="object"&&le!==null)for(var Ke=0;Ke<le.length;Ke++)de._acceptedDependencies[le[Ke]]=be||function(){},de._acceptedErrorHandlers[le[Ke]]=je;else de._acceptedDependencies[le]=be||function(){},de._acceptedErrorHandlers[le]=je},decline:function(le){if(le===void 0)de._selfDeclined=!0;else if(typeof le=="object"&&le!==null)for(var be=0;be<le.length;be++)de._declinedDependencies[le[be]]=!0;else de._declinedDependencies[le]=!0},dispose:function(le){de._disposeHandlers.push(le)},addDisposeHandler:function(le){de._disposeHandlers.push(le)},removeDisposeHandler:function(le){var be=de._disposeHandlers.indexOf(le);be>=0&&de._disposeHandlers.splice(be,1)},invalidate:function(){switch(this._selfInvalidated=!0,k){case"idle":m=[],Object.keys(d.hmrI).forEach((function(le){d.hmrI[le](oe,m)})),I("ready");break;case"ready":Object.keys(d.hmrI).forEach((function(le){d.hmrI[le](oe,m)}));break;case"prepare":case"check":case"dispose":case"apply":(g=g||[]).push(oe)}},check:G,apply:K,status:function(le){if(!le)return k;A.push(le)},addStatusHandler:function(le){A.push(le)},removeStatusHandler:function(le){var be=A.indexOf(le);be>=0&&A.splice(be,1)},data:b[oe]},p=void 0,de),Ce.parents=E,Ce.children=[],E=[],ee.require=xe})),d.hmrC={},d.hmrI={}})(),d.p="",(()=>{var p,m,g,b,S,E=d.hmrS_jsonp=d.hmrS_jsonp||{792:0},A={};function k(M,I){return p=I,new Promise(((q,G)=>{A[M]=q;var K=d.p+d.hu(M),X=new Error;d.l(K,(z=>{if(A[M]){A[M]=void 0;var ee=z&&(z.type==="load"?"missing":z.type),oe=z&&z.target&&z.target.src;X.message="Loading hot update chunk "+M+` failed.
|
||
(`+ee+": "+oe+")",X.name="ChunkLoadError",X.type=ee,X.request=oe,G(X)}}))}))}function T(M){function I(re){for(var ue=[re],_e={},fe=ue.map((function(tt){return{chain:[tt],id:tt}}));fe.length>0;){var He=fe.pop(),Oe=He.id,ke=He.chain,Ve=d.c[Oe];if(Ve&&(!Ve.hot._selfAccepted||Ve.hot._selfInvalidated)){if(Ve.hot._selfDeclined)return{type:"self-declined",chain:ke,moduleId:Oe};if(Ve.hot._main)return{type:"unaccepted",chain:ke,moduleId:Oe};for(var ie=0;ie<Ve.parents.length;ie++){var Ne=Ve.parents[ie],ze=d.c[Ne];if(ze){if(ze.hot._declinedDependencies[Oe])return{type:"declined",chain:ke.concat([Ne]),moduleId:Oe,parentId:Ne};ue.indexOf(Ne)===-1&&(ze.hot._acceptedDependencies[Oe]?(_e[Ne]||(_e[Ne]=[]),q(_e[Ne],[Oe])):(delete _e[Ne],ue.push(Ne),fe.push({chain:ke.concat([Ne]),id:Ne})))}}}}return{type:"accepted",moduleId:re,outdatedModules:ue,outdatedDependencies:_e}}function q(re,ue){for(var _e=0;_e<ue.length;_e++){var fe=ue[_e];re.indexOf(fe)===-1&&re.push(fe)}}d.f&&delete d.f.jsonpHmr,m=void 0;var G={},K=[],X={},z=function(re){console.warn("[HMR] unexpected require("+re.id+") to disposed module")};for(var ee in g)if(d.o(g,ee)){var oe=g[ee],Q=oe?I(ee):{type:"disposed",moduleId:ee},ne=!1,de=!1,Ce=!1,xe="";switch(Q.chain&&(xe=`
|
||
Update propagation: `+Q.chain.join(" -> ")),Q.type){case"self-declined":M.onDeclined&&M.onDeclined(Q),M.ignoreDeclined||(ne=new Error("Aborted because of self decline: "+Q.moduleId+xe));break;case"declined":M.onDeclined&&M.onDeclined(Q),M.ignoreDeclined||(ne=new Error("Aborted because of declined dependency: "+Q.moduleId+" in "+Q.parentId+xe));break;case"unaccepted":M.onUnaccepted&&M.onUnaccepted(Q),M.ignoreUnaccepted||(ne=new Error("Aborted because "+ee+" is not accepted"+xe));break;case"accepted":M.onAccepted&&M.onAccepted(Q),de=!0;break;case"disposed":M.onDisposed&&M.onDisposed(Q),Ce=!0;break;default:throw new Error("Unexception type "+Q.type)}if(ne)return{error:ne};if(de)for(ee in X[ee]=oe,q(K,Q.outdatedModules),Q.outdatedDependencies)d.o(Q.outdatedDependencies,ee)&&(G[ee]||(G[ee]=[]),q(G[ee],Q.outdatedDependencies[ee]));Ce&&(q(K,[Q.moduleId]),X[ee]=z)}g=void 0;for(var le,be=[],je=0;je<K.length;je++){var Ke=K[je],ce=d.c[Ke];ce&&(ce.hot._selfAccepted||ce.hot._main)&&X[Ke]!==z&&!ce.hot._selfInvalidated&&be.push({module:Ke,require:ce.hot._requireSelf,errorHandler:ce.hot._selfAccepted})}return{dispose:function(){var re;b.forEach((function(Ne){delete E[Ne]})),b=void 0;for(var ue,_e=K.slice();_e.length>0;){var fe=_e.pop(),He=d.c[fe];if(He){var Oe={},ke=He.hot._disposeHandlers;for(je=0;je<ke.length;je++)ke[je].call(null,Oe);for(d.hmrD[fe]=Oe,He.hot.active=!1,delete d.c[fe],delete G[fe],je=0;je<He.children.length;je++){var Ve=d.c[He.children[je]];Ve&&(re=Ve.parents.indexOf(fe))>=0&&Ve.parents.splice(re,1)}}}for(var ie in G)if(d.o(G,ie)&&(He=d.c[ie]))for(le=G[ie],je=0;je<le.length;je++)ue=le[je],(re=He.children.indexOf(ue))>=0&&He.children.splice(re,1)},apply:function(re){for(var ue in X)d.o(X,ue)&&(d.m[ue]=X[ue]);for(var _e=0;_e<S.length;_e++)S[_e](d);for(var fe in G)if(d.o(G,fe)){var He=d.c[fe];if(He){le=G[fe];for(var Oe=[],ke=[],Ve=[],ie=0;ie<le.length;ie++){var Ne=le[ie],ze=He.hot._acceptedDependencies[Ne],tt=He.hot._acceptedErrorHandlers[Ne];if(ze){if(Oe.indexOf(ze)!==-1)continue;Oe.push(ze),ke.push(tt),Ve.push(Ne)}}for(var ft=0;ft<Oe.length;ft++)try{Oe[ft].call(null,le)}catch(Jt){if(typeof ke[ft]=="function")try{ke[ft](Jt,{moduleId:fe,dependencyId:Ve[ft]})}catch(Le){M.onErrored&&M.onErrored({type:"accept-error-handler-errored",moduleId:fe,dependencyId:Ve[ft],error:Le,originalError:Jt}),M.ignoreErrored||(re(Le),re(Jt))}else M.onErrored&&M.onErrored({type:"accept-errored",moduleId:fe,dependencyId:Ve[ft],error:Jt}),M.ignoreErrored||re(Jt)}}}for(var Ot=0;Ot<be.length;Ot++){var Ft=be[Ot],kt=Ft.module;try{Ft.require(kt)}catch(Jt){if(typeof Ft.errorHandler=="function")try{Ft.errorHandler(Jt,{moduleId:kt,module:d.c[kt]})}catch(Le){M.onErrored&&M.onErrored({type:"self-accept-error-handler-errored",moduleId:kt,error:Le,originalError:Jt}),M.ignoreErrored||(re(Le),re(Jt))}else M.onErrored&&M.onErrored({type:"self-accept-errored",moduleId:kt,error:Jt}),M.ignoreErrored||re(Jt)}}return K}}}self.webpackHotUpdaterapidoc=(M,I,q)=>{for(var G in I)d.o(I,G)&&(g[G]=I[G],p&&p.push(G));q&&S.push(q),A[M]&&(A[M](),A[M]=void 0)},d.hmrI.jsonp=function(M,I){g||(g={},S=[],b=[],I.push(T)),d.o(g,M)||(g[M]=d.m[M])},d.hmrC.jsonp=function(M,I,q,G,K,X){K.push(T),m={},b=I,g=q.reduce((function(z,ee){return z[ee]=!1,z}),{}),S=[],M.forEach((function(z){d.o(E,z)&&E[z]!==void 0?(G.push(k(z,X)),m[z]=!0):m[z]=!1})),d.f&&(d.f.jsonpHmr=function(z,ee){m&&d.o(m,z)&&!m[z]&&(ee.push(k(z)),m[z]=!0)})},d.hmrM=()=>{if(typeof fetch>"u")throw new Error("No browser support: need fetch API");return fetch(d.p+d.hmrF()).then((M=>{if(M.status!==404){if(!M.ok)throw new Error("Failed to fetch update manifest "+M.statusText);return M.json()}}))}})(),d(557)})()),N3}Lbe();const Fbe=()=>{const e=R.useRef(null),{theme:r,systemTheme:s,setTheme:o}=$_(),[d,p]=R.useState(""),[m,g]=R.useState("auto");R.useEffect(()=>{(()=>{const A=localStorage.getItem("autoglue.org");A&&p(A)})()},[]),R.useEffect(()=>{const E=e.current;if(!E)return;let A="light";if(m==="light"?A="light":m==="dark"?A="dark":A=(r==="system"?s:r)==="dark"?"dark":"light",E.setAttribute("theme",A),typeof window<"u"){const k=`${window.location.origin}/api/v1`;E.setAttribute("default-api-server",k)}d?(E.setAttribute("api-key-name","X-ORG-ID"),E.setAttribute("api-key-location","header"),E.setAttribute("api-key-value",d)):E.removeAttribute("api-key-value")},[r,s,m,d]);const b=()=>{const E=d.trim();localStorage.setItem("autoglue.org",E);const A=e.current;A&&(E?A.setAttribute("api-key-value",E):A.removeAttribute("api-key-value"))},S=()=>{localStorage.removeItem("autoglue.org"),p("");const E=e.current;E&&E.removeAttribute("api-key-value")};return u.jsxs("div",{className:"flex h-[100svh] flex-col",children:[u.jsxs(ha,{className:"rounded-none border-b",children:[u.jsx(sl,{className:"py-3",children:u.jsxs(il,{className:"flex flex-wrap items-center justify-between gap-4 text-base",children:[u.jsx("span",{children:"AutoGlue API Docs"}),u.jsx("div",{className:"flex items-center gap-2 text-xs",children:u.jsxs("div",{className:"flex flex-wrap items-center gap-3 text-xs",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("span",{className:"text-muted-foreground",children:"Docs theme"}),u.jsxs(Rn,{value:m,onValueChange:E=>{const A=E;g(A),o(A==="auto"?"system":E)},children:[u.jsx(_n,{className:"h-8 w-[120px]",children:u.jsx(Tn,{})}),u.jsxs($n,{children:[u.jsx(jt,{value:"auto",children:"Auto (match app)"}),u.jsx(jt,{value:"light",children:"Light"}),u.jsx(jt,{value:"dark",children:"Dark"})]})]})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("span",{className:"text-muted-foreground",children:"Org ID (X-ORG-ID)"}),u.jsx(xt,{className:"h-8 w-80",value:d,onChange:E=>p(E.target.value),placeholder:"org_..."}),u.jsx(Fe,{size:"sm",onClick:b,children:"Save"}),u.jsx(Fe,{size:"sm",variant:"outline",onClick:S,children:"Reset"})]})]})})]})}),u.jsxs(oo,{className:"text-muted-foreground py-0 pb-2 text-xs",children:["Requests from ",u.jsx("code",{children:"<rapi-doc>"})," will include:",u.jsx("code",{className:"ml-1",children:"Cookie: ag_jwt=…"})," and"," ",u.jsxs("code",{className:"ml-1",children:["X-ORG-ID=",d]}),!d&&u.jsx(u.Fragment,{children:" (set an Org ID above to send an X-ORG-ID header)"})]})]}),u.jsx("rapi-doc",{ref:e,id:"autoglue-docs","spec-url":"/swagger/openapi.json","render-style":"read","show-header":"false","persist-auth":"true","allow-advanced-search":"true","schema-description-expanded":"true","allow-schema-description-expand-toggle":"false","allow-spec-file-download":"true","allow-spec-file-load":"false","allow-spec-url-load":"false","allow-try":"true","schema-style":"tree","fetch-credentials":"include"})]})},ub=nte(),db={listJobs:(e={})=>ut(async()=>await ub.adminListArcherJobs(e)),enqueue:e=>ut(async()=>await ub.adminEnqueueArcherJob({dtoEnqueueRequest:e})),retryJob:e=>ut(async()=>await ub.adminRetryArcherJob({id:e})),cancelJob:e=>ut(async()=>await ub.adminCancelArcherJob({id:e})),listQueues:()=>ut(async()=>await ub.adminListArcherQueues())},qbe=[Ra.queued,Ra.running,Ra.succeeded,Ra.failed,Ra.canceled,Ra.retrying,Ra.scheduled],Bbe={queued:"bg-amber-100 text-amber-800",running:"bg-sky-100 text-sky-800",succeeded:"bg-emerald-100 text-emerald-800",failed:"bg-red-100 text-red-800",canceled:"bg-zinc-200 text-zinc-700",retrying:"bg-orange-100 text-orange-800",scheduled:"bg-violet-100 text-violet-800"};function P3(e){if(!e)return"—";const r=new Date(e);return new Intl.DateTimeFormat(void 0,{dateStyle:"medium",timeStyle:"short"}).format(r)}function Ube(e,r=300){const[s,o]=R.useState(e);return R.useEffect(()=>{const d=setTimeout(()=>o(e),r);return()=>clearTimeout(d)},[e,r]),s}const Kbe=()=>{const e=Hs(),[r,s]=R.useState(""),[o,d]=R.useState(""),[p,m]=R.useState(""),g=Ube(p,300),[b,S]=R.useState(1),[E,A]=R.useState(25),T=rr({queryKey:["archer","jobs",{status:r,queue:o,q:g,page:b,pageSize:E}],queryFn:()=>db.listJobs({status:r||void 0,queue:o||void 0,q:g||void 0,page:b,pageSize:E}),placeholderData:Q=>Q,staleTime:1e4}),M=rr({queryKey:["archer","queues"],queryFn:()=>db.listQueues(),staleTime:3e4}),I=nn({mutationFn:Q=>db.enqueue(Q),onSuccess:()=>e.invalidateQueries({queryKey:["archer","jobs"]})}),q=nn({mutationFn:Q=>db.retryJob(Q),onSuccess:()=>e.invalidateQueries({queryKey:["archer","jobs"]})}),G=nn({mutationFn:Q=>db.cancelJob(Q),onSuccess:()=>e.invalidateQueries({queryKey:["archer","jobs"]})}),K=T.isFetching,X=T.data,z=X?.items??[],ee=X?.total??0,oe=Math.max(1,Math.ceil(ee/E));return u.jsxs("div",{className:"container mx-auto space-y-6 p-6",children:[u.jsxs("div",{className:"flex items-start justify-between gap-4",children:[u.jsxs("div",{children:[u.jsx("h1",{className:"text-2xl font-semibold",children:"Archer Jobs"}),u.jsx("p",{className:"text-muted-foreground text-sm",children:"Inspect, enqueue, retry and cancel background jobs."})]}),u.jsxs("div",{className:"flex gap-2",children:[u.jsx(Hbe,{onSubmit:Q=>I.mutateAsync(Q),submitting:I.isPending}),u.jsxs(Fe,{variant:"secondary",onClick:()=>e.invalidateQueries({queryKey:["archer","jobs"]}),disabled:K,children:[K?u.jsx(Ds,{className:"mr-2 h-4 w-4 animate-spin"}):u.jsx(yW,{className:"mr-2 h-4 w-4"}),"Refresh"]})]})]}),u.jsx("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-4",children:M.data?.map(Q=>u.jsxs(ha,{children:[u.jsx(sl,{children:u.jsx(il,{className:"text-base",children:Q.name})}),u.jsxs(oo,{className:"grid grid-cols-2 gap-2 text-sm",children:[u.jsx(pj,{label:"Pending",value:Q.pending??0}),u.jsx(pj,{label:"Running",value:Q.running??0}),u.jsx(pj,{label:"Failed",value:Q.failed??0}),u.jsx(pj,{label:"Scheduled",value:Q.scheduled??0})]})]},Q.name))}),u.jsxs(ha,{children:[u.jsx(sl,{children:u.jsx(il,{children:"Filters"})}),u.jsxs(oo,{className:"grid gap-3 md:grid-cols-4",children:[u.jsxs("div",{className:"col-span-2 flex items-center gap-2",children:[u.jsx(xt,{placeholder:"Search id, queue, error, payload…",value:p,onChange:Q=>{m(Q.target.value),S(1)},onKeyDown:Q=>Q.key==="Enter"&&e.invalidateQueries({queryKey:["archer","jobs"]})}),p&&u.jsx(Fe,{variant:"ghost",size:"icon",onClick:()=>m(""),children:u.jsx(F_,{className:"h-4 w-4"})}),u.jsxs(Fe,{onClick:()=>e.invalidateQueries({queryKey:["archer","jobs"]}),children:[u.jsx(Pa,{className:"mr-2 h-4 w-4"})," Search"]})]}),u.jsxs(Rn,{value:r||"all",onValueChange:Q=>{s(Q==="all"?"":Q),S(1)},children:[u.jsx(_n,{children:u.jsx(Tn,{placeholder:"All statuses"})}),u.jsxs($n,{children:[u.jsx(jt,{value:"all",children:"All statuses"}),qbe.map(Q=>u.jsx(jt,{value:Q,children:Q},Q))]})]}),u.jsx(xt,{placeholder:"Queue (optional)",value:o,onChange:Q=>{d(Q.target.value),S(1)}}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(xi,{className:"whitespace-nowrap",children:"Page size"}),u.jsxs(Rn,{value:String(E),onValueChange:Q=>{A(Number(Q)),S(1)},children:[u.jsx(_n,{className:"w-[120px]",children:u.jsx(Tn,{})}),u.jsx($n,{children:[10,25,50,100].map(Q=>u.jsx(jt,{value:String(Q),children:Q},Q))})]})]})]})]}),u.jsx(ha,{children:u.jsxs(oo,{className:"p-0",children:[u.jsxs(Fi,{children:[u.jsx(qi,{children:u.jsxs(an,{children:[u.jsx(At,{children:"ID"}),u.jsx(At,{children:"Queue"}),u.jsx(At,{children:"Status"}),u.jsx(At,{children:"Attempts"}),u.jsx(At,{children:"Run At"}),u.jsx(At,{children:"Updated"}),u.jsx(At,{className:"pr-4 text-right",children:"Actions"})]})}),u.jsxs(Bi,{children:[T.isLoading&&u.jsx(an,{children:u.jsx(vt,{colSpan:7,className:"text-muted-foreground py-8 text-center",children:"Loading…"})}),T.isError&&u.jsx(an,{children:u.jsx(vt,{colSpan:7,className:"py-8 text-center text-red-600",children:"Failed to load jobs"})}),!T.isLoading&&z.length===0&&u.jsx(an,{children:u.jsx(vt,{colSpan:7,className:"text-muted-foreground py-8 text-center",children:"No jobs match your filters."})}),z.map(Q=>{const ne=Q.status??Ra.queued;return u.jsxs(an,{children:[u.jsx(vt,{children:u.jsx("code",{className:"text-xs",children:Q.id})}),u.jsx(vt,{children:u.jsx(rs,{variant:"secondary",children:Q.queue})}),u.jsx(vt,{children:u.jsx("span",{className:ht("rounded-md px-2 py-0.5 text-xs",Bbe[ne]),children:ne})}),u.jsx(vt,{children:Q.max_attempts?`${Q.attempts}/${Q.max_attempts}`:Q.attempts}),u.jsx(vt,{children:P3(Q.run_at)}),u.jsx(vt,{children:P3(Q.updated_at??Q.created_at)}),u.jsx(vt,{className:"text-right",children:u.jsxs("div",{className:"flex justify-end gap-2",children:[(ne===Ra.failed||ne===Ra.canceled)&&u.jsx(Fe,{size:"sm",variant:"outline",disabled:q.isPending||!Q.id,onClick:()=>{Q.id&&q.mutate(Q.id)},children:"Retry"}),(ne===Ra.queued||ne===Ra.running||ne===Ra.scheduled)&&u.jsx(Fe,{size:"sm",variant:"outline",disabled:G.isPending||!Q.id,onClick:()=>{Q.id&&G.mutate(Q.id)},children:"Cancel"}),u.jsx(Vbe,{job:Q})]})})]},Q.id)})]})]}),u.jsxs("div",{className:"flex items-center justify-between border-t p-3 text-sm",children:[u.jsxs("div",{children:["Page ",b," of ",oe," • ",ee," total"]}),u.jsxs("div",{className:"flex gap-2",children:[u.jsx(Fe,{variant:"outline",disabled:b<=1||T.isFetching,onClick:()=>S(Q=>Math.max(1,Q-1)),children:"Prev"}),u.jsx(Fe,{variant:"outline",disabled:b>=oe||T.isFetching,onClick:()=>S(Q=>Q+1),children:"Next"})]})]})]})})]})};function pj({label:e,value:r}){return u.jsxs("div",{className:"bg-muted/30 rounded-lg border p-3",children:[u.jsx("div",{className:"text-muted-foreground text-xs",children:e}),u.jsx("div",{className:"text-lg font-semibold",children:r})]})}function Vbe({job:e}){return u.jsxs(fn,{children:[u.jsx(Li,{asChild:!0,children:u.jsx(Fe,{size:"sm",variant:"ghost",children:"Details"})}),u.jsxs(mn,{className:"max-w-2xl",children:[u.jsx(gn,{children:u.jsxs(yn,{children:["Job ",e.id]})}),u.jsxs("div",{className:"grid gap-3",children:[e.last_error&&u.jsxs(ha,{children:[u.jsx(sl,{children:u.jsx(il,{className:"text-sm",children:"Last error"})}),u.jsx(oo,{children:u.jsx("pre",{className:"overflow-auto text-xs whitespace-pre-wrap",children:e.last_error})})]}),u.jsxs(ha,{children:[u.jsx(sl,{children:u.jsx(il,{className:"text-sm",children:"Payload"})}),u.jsx(oo,{children:u.jsx("pre",{className:"overflow-auto text-xs whitespace-pre-wrap",children:JSON.stringify(e.payload,null,2)})})]})]}),u.jsx(Sn,{children:u.jsx(Kj,{asChild:!0,children:u.jsx(Fe,{variant:"secondary",children:"Close"})})})]})]})}function Hbe({onSubmit:e,submitting:r}){const[s,o]=R.useState(!1),[d,p]=R.useState(""),[m,g]=R.useState(""),[b,S]=R.useState("{}"),[E,A]=R.useState(""),k=d&&m&&!r;async function T(){const M=b?JSON.parse(b):void 0;await e({queue:d,type:m,payload:M,run_at:E||void 0}),o(!1),p(""),g(""),S("{}"),A("")}return u.jsxs(fn,{open:s,onOpenChange:o,children:[u.jsx(Li,{asChild:!0,children:u.jsxs(Fe,{children:[u.jsx(lo,{className:"mr-2 h-4 w-4"})," Enqueue"]})}),u.jsxs(mn,{children:[u.jsx(gn,{children:u.jsx(yn,{children:"Enqueue Job"})}),u.jsxs("div",{className:"grid gap-3",children:[u.jsxs("div",{className:"grid gap-2",children:[u.jsx(xi,{children:"Queue"}),u.jsx(xt,{value:d,onChange:M=>p(M.target.value),placeholder:"e.g. bootstrap_bastion"})]}),u.jsxs("div",{className:"grid gap-2",children:[u.jsx(xi,{children:"Type"}),u.jsx(xt,{value:m,onChange:M=>g(M.target.value),placeholder:"e.g. bootstrap_bastion"})]}),u.jsxs("div",{className:"grid gap-2",children:[u.jsx(xi,{children:"Payload (JSON)"}),u.jsx(hu,{value:b,onChange:M=>S(M.target.value),className:"min-h-[120px] font-mono text-xs"})]}),u.jsxs("div",{className:"grid gap-2",children:[u.jsx(xi,{children:"Run at (optional)"}),u.jsx(xt,{type:"datetime-local",value:E,onChange:M=>A(M.target.value)})]})]}),u.jsxs(Sn,{children:[u.jsx(Kj,{asChild:!0,children:u.jsx(Fe,{variant:"secondary",children:"Cancel"})}),u.jsxs(Fe,{onClick:T,disabled:!k,children:[r?u.jsx(Ds,{className:"mr-2 h-4 w-4 animate-spin"}):null,"Enqueue"]})]})]})]})}const hb=ete(),kb={listLabels:()=>ut(async()=>await hb.listLabels()),createLabel:e=>ut(async()=>await hb.createLabel({dtoCreateLabelRequest:e})),getLabel:e=>ut(async()=>await hb.getLabel({id:e})),deleteLabel:e=>ut(async()=>{await hb.deleteLabel({id:e})}),updateLabel:(e,r)=>ut(async()=>await hb.updateLabel({id:e,dtoUpdateLabelRequest:r}))},cB=Xs({key:zn().trim().min(1,"Key is required").max(120,"Max 120 chars"),value:zn().trim().optional()}),Gbe=cB.partial();function Xbe({t:e}){const r=`${e.key}${e.value?`=${e.value}`:""}`;return u.jsxs(rs,{variant:"secondary",className:"font-mono text-xs",children:[u.jsx(gC,{className:"mr-1 h-3 w-3"}),r]})}const Ybe=()=>{const[e,r]=R.useState(""),[s,o]=R.useState(!1),[d,p]=R.useState(!1),[m,g]=R.useState(null),[b,S]=R.useState(null),E=Hs(),A=rr({queryKey:["labels"],queryFn:()=>kb.listLabels()}),k=mr({resolver:gr(cB),defaultValues:{key:"",value:""}}),T=nn({mutationFn:z=>kb.createLabel(z),onSuccess:async()=>{await E.invalidateQueries({queryKey:["labels"]}),k.reset(),o(!1),Ze.success("Label Created Successfully.")},onError:z=>{Ze.error(z.message??"There was an error while creating Label")}}),M=z=>{T.mutate(z)},I=mr({resolver:gr(Gbe),defaultValues:{}}),q=nn({mutationFn:({id:z,values:ee})=>kb.updateLabel(z,ee),onSuccess:async()=>{await E.invalidateQueries({queryKey:["labels"]}),I.reset(),p(!1),Ze.success("Label Updated Successfully.")},onError:z=>{Ze.error(z.message??"There was an error while updating Label")}}),G=z=>{S(z.id),I.reset({key:z.key,value:z.value}),p(!0)},K=nn({mutationFn:z=>kb.deleteLabel(z),onSuccess:async()=>{await E.invalidateQueries({queryKey:["labels"]}),g(null),Ze.success("Label Deleted Successfully.")},onError:z=>{Ze.error(z.message??"There was an error while deleting Label")}}),X=R.useMemo(()=>{const z=A.data??[],ee=e.trim().toLowerCase();return ee?z.filter(oe=>oe.key?.toLowerCase().includes(ee)||oe.value?.toLowerCase().includes(ee)):z},[e,A.data]);return A.isLoading?u.jsx("div",{className:"p-6",children:"Loading labels…"}):A.error?u.jsx("div",{className:"p-6 text-red-500",children:"Error loading labels."}):u.jsxs("div",{className:"space-y-4 p-6",children:[u.jsxs("div",{className:"flex flex-col gap-3 md:flex-row md:items-center md:justify-between",children:[u.jsx("h1",{className:"mb-4 text-2xl font-bold",children:"Labels"}),u.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[u.jsxs("div",{className:"relative",children:[u.jsx(Pa,{className:"absolute top-2.5 left-2 h-4 w-4 opacity-60"}),u.jsx(xt,{value:e,onChange:z=>r(z.target.value),placeholder:"Search labels",className:"w-64 pl-8"})]}),u.jsxs(fn,{open:s,onOpenChange:o,children:[u.jsx(Li,{asChild:!0,children:u.jsxs(Fe,{onClick:()=>o(!0),children:[u.jsx(lo,{className:"mr-2 h-4 w-4"}),"Create Label"]})}),u.jsxs(mn,{className:"sm:max-w-lg",children:[u.jsx(gn,{children:u.jsx(yn,{children:"Create Label"})}),u.jsx(yr,{...k,children:u.jsxs("form",{className:"space-y-4",onSubmit:k.handleSubmit(M),children:[u.jsx(yt,{control:k.control,name:"key",render:({field:z})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Key"}),u.jsx(wt,{children:u.jsx(xt,{placeholder:"environment",...z})}),u.jsx(mt,{})]})}),u.jsx(yt,{control:k.control,name:"value",render:({field:z})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Value"}),u.jsx(wt,{children:u.jsx(xt,{placeholder:"dev",...z})}),u.jsx(mt,{})]})}),u.jsxs(Sn,{className:"gap-2",children:[u.jsx(Fe,{type:"button",variant:"outline",onClick:()=>o(!1),children:"Cancel"}),u.jsx(Fe,{type:"submit",disabled:k.formState.isSubmitting,children:k.formState.isSubmitting?"Creating…":"Create"})]})]})})]})]})]})]}),u.jsx("div",{className:"bg-background overflow-hidden rounded-2xl border shadow-sm",children:u.jsx("div",{className:"overflow-x-auto",children:u.jsxs(Fi,{children:[u.jsx(qi,{children:u.jsxs(an,{children:[u.jsx(At,{children:"Key"}),u.jsx(At,{children:"Value"}),u.jsx(At,{children:"Label"}),u.jsx(At,{className:"w-[180px] text-right",children:"Actions"})]})}),u.jsxs(Bi,{children:[X.map(z=>u.jsxs(an,{children:[u.jsx(vt,{children:z.key}),u.jsx(vt,{children:z.value}),u.jsx(vt,{children:u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(Xbe,{t:z}),u.jsx("code",{className:"text-muted-foreground text-xs",children:el(z.id,6)})]})}),u.jsx(vt,{children:u.jsxs("div",{className:"flex justify-end gap-2",children:[u.jsxs(Fe,{variant:"outline",size:"sm",onClick:()=>G(z),children:[u.jsx(pu,{className:"mr-2 h-4 w-4"})," Edit"]}),u.jsx(Fe,{variant:"destructive",size:"sm",onClick:()=>g(z.id),disabled:K.isPending&&m===z.id,children:K.isPending&&m===z.id?"Deleting…":"Delete"})]})})]},z.id)),X.length===0&&u.jsx(an,{children:u.jsxs(vt,{colSpan:4,className:"text-muted-foreground py-10 text-center",children:[u.jsx(ew,{className:"mx-auto mb-2 h-6 w-6 opacity-60"}),"No labels match your search."]})})]})]})})}),u.jsx(fn,{open:d,onOpenChange:p,children:u.jsxs(mn,{className:"sm:max-w-lg",children:[u.jsx(gn,{children:u.jsx(yn,{children:"Edit Label"})}),u.jsx(yr,{...I,children:u.jsxs("form",{className:"space-y-4",onSubmit:I.handleSubmit(z=>{b&&q.mutate({id:b,values:z})}),children:[u.jsx(yt,{control:I.control,name:"key",render:({field:z})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Key"}),u.jsx(wt,{children:u.jsx(xt,{placeholder:"dedicated",...z})}),u.jsx(mt,{})]})}),u.jsx(yt,{control:I.control,name:"value",render:({field:z})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Value (optional)"}),u.jsx(wt,{children:u.jsx(xt,{placeholder:"gpu",...z})}),u.jsx(mt,{})]})}),u.jsxs(Sn,{className:"gap-2",children:[u.jsx(Fe,{type:"button",variant:"outline",onClick:()=>p(!1),children:"Cancel"}),u.jsx(Fe,{type:"submit",disabled:q.isPending,children:q.isPending?"Saving…":"Save changes"})]})]})})]})}),u.jsx(fn,{open:!!m,onOpenChange:z=>!z&&g(null),children:u.jsxs(mn,{className:"sm:max-w-md",children:[u.jsx(gn,{children:u.jsx(yn,{children:"Delete label"})}),u.jsx("p",{className:"text-muted-foreground text-sm",children:"This action cannot be undone. Are you sure you want to delete this label?"}),u.jsxs(Sn,{className:"gap-2",children:[u.jsx(Fe,{variant:"outline",onClick:()=>g(null),children:"Cancel"}),u.jsx(Fe,{variant:"destructive",onClick:()=>m&&K.mutate(m),disabled:K.isPending,children:K.isPending?"Deleting…":"Delete"})]})]})})]})},uB=Xs({name:zn().trim().min(1,"Name is required").max(120,"Max 120 chars"),kind:Da(["glueops","public"]).default("public"),public_ip_address:zn().trim().min(1,"Public IP/hostname is required").max(255,"Max 255 chars"),private_ip_address:zn().trim().min(1,"Private IP/hostname is required").max(255,"Max 255 chars")}),Zbe=uB.partial();function Wbe({lb:e}){return u.jsxs(rs,{variant:"secondary",className:"font-mono text-xs",children:[u.jsx(cW,{className:"mr-1 h-3 w-3"}),e.name," · ",e.kind," · ",e.public_ip_address," → ",e.private_ip_address]})}const Jbe=()=>{const[e,r]=R.useState(""),[s,o]=R.useState(!1),[d,p]=R.useState(!1),[m,g]=R.useState(null),[b,S]=R.useState(null),E=Hs(),A=rr({queryKey:["loadBalancers"],queryFn:()=>jb.listLoadBalancers()}),k=mr({resolver:gr(uB),defaultValues:{name:"",kind:"public",public_ip_address:"",private_ip_address:""}}),T=nn({mutationFn:z=>jb.createLoadBalancer(z),onSuccess:async()=>{await E.invalidateQueries({queryKey:["loadBalancers"]}),k.reset(),o(!1),Ze.success("Load balancer created successfully.")},onError:z=>{Ze.error(z?.message??"There was an error while creating the load balancer")}}),M=z=>{T.mutate(z)},I=mr({resolver:gr(Zbe),defaultValues:{}}),q=nn({mutationFn:({id:z,values:ee})=>jb.updateLoadBalancer(z,ee),onSuccess:async()=>{await E.invalidateQueries({queryKey:["loadBalancers"]}),I.reset(),p(!1),Ze.success("Load balancer updated successfully.")},onError:z=>{Ze.error(z?.message??"There was an error while updating the load balancer")}}),G=z=>{S(z.id),I.reset({name:z.name??"",kind:z.kind??"public",public_ip_address:z.public_ip_address??"",private_ip_address:z.private_ip_address??""}),p(!0)},K=nn({mutationFn:z=>jb.deleteLoadBalancer(z),onSuccess:async()=>{await E.invalidateQueries({queryKey:["loadBalancers"]}),g(null),Ze.success("Load balancer deleted successfully.")},onError:z=>{Ze.error(z?.message??"There was an error while deleting the load balancer")}}),X=R.useMemo(()=>{const z=A.data??[],ee=e.trim().toLowerCase();return ee?z.filter(oe=>oe.name?.toLowerCase().includes(ee)||oe.kind?.toLowerCase().includes(ee)||oe.public_ip_address?.toLowerCase().includes(ee)||oe.private_ip_address?.toLowerCase().includes(ee)):z},[e,A.data]);return A.isLoading?u.jsx("div",{className:"p-6",children:"Loading load balancers…"}):A.error?u.jsx("div",{className:"p-6 text-red-500",children:"Error loading load balancers."}):u.jsxs("div",{className:"space-y-4 p-6",children:[u.jsxs("div",{className:"flex flex-col gap-3 md:flex-row md:items-center md:justify-between",children:[u.jsx("h1",{className:"mb-4 text-2xl font-bold",children:"Load Balancers"}),u.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[u.jsxs("div",{className:"relative",children:[u.jsx(Pa,{className:"absolute top-2.5 left-2 h-4 w-4 opacity-60"}),u.jsx(xt,{value:e,onChange:z=>r(z.target.value),placeholder:"Search load balancers",className:"w-64 pl-8"})]}),u.jsxs(fn,{open:s,onOpenChange:o,children:[u.jsx(Li,{asChild:!0,children:u.jsxs(Fe,{onClick:()=>o(!0),children:[u.jsx(lo,{className:"mr-2 h-4 w-4"}),"Create Load Balancer"]})}),u.jsxs(mn,{className:"sm:max-w-lg",children:[u.jsx(gn,{children:u.jsx(yn,{children:"Create Load Balancer"})}),u.jsx(yr,{...k,children:u.jsxs("form",{className:"space-y-4",onSubmit:k.handleSubmit(M),children:[u.jsx(yt,{control:k.control,name:"name",render:({field:z})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Name"}),u.jsx(wt,{children:u.jsx(xt,{placeholder:"apps-lb-01",...z})}),u.jsx(mt,{})]})}),u.jsx(yt,{control:k.control,name:"kind",render:({field:z})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Kind"}),u.jsx(wt,{children:u.jsxs(Rn,{onValueChange:z.onChange,value:z.value??"public",children:[u.jsx(_n,{children:u.jsx(Tn,{placeholder:"Select kind"})}),u.jsxs($n,{children:[u.jsx(jt,{value:"public",children:"Public"}),u.jsx(jt,{value:"glueops",children:"GlueOps"})]})]})}),u.jsx(mt,{})]})}),u.jsx(yt,{control:k.control,name:"public_ip_address",render:({field:z})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Public IP"}),u.jsx(wt,{children:u.jsx(xt,{placeholder:"1.2.3.4",...z})}),u.jsx(mt,{})]})}),u.jsx(yt,{control:k.control,name:"private_ip_address",render:({field:z})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Private IP"}),u.jsx(wt,{children:u.jsx(xt,{placeholder:"10.0.30.10",...z})}),u.jsx(mt,{})]})}),u.jsxs(Sn,{className:"gap-2",children:[u.jsx(Fe,{type:"button",variant:"outline",onClick:()=>o(!1),children:"Cancel"}),u.jsx(Fe,{type:"submit",disabled:T.isPending,children:T.isPending?"Creating…":"Create"})]})]})})]})]})]})]}),u.jsx("div",{className:"bg-background overflow-hidden rounded-2xl border shadow-sm",children:u.jsx("div",{className:"overflow-x-auto",children:u.jsxs(Fi,{children:[u.jsx(qi,{children:u.jsxs(an,{children:[u.jsx(At,{children:"Name"}),u.jsx(At,{children:"Kind"}),u.jsx(At,{children:"Public IP / Hostname"}),u.jsx(At,{children:"Private IP / Hostname"}),u.jsx(At,{children:"Summary"}),u.jsx(At,{className:"w-[220px] text-right",children:"Actions"})]})}),u.jsxs(Bi,{children:[X.map(z=>u.jsxs(an,{children:[u.jsx(vt,{children:z.name}),u.jsx(vt,{children:z.kind}),u.jsx(vt,{children:z.public_ip_address}),u.jsx(vt,{children:z.private_ip_address}),u.jsx(vt,{children:u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(Wbe,{lb:z}),z.id&&u.jsx("code",{className:"text-muted-foreground text-xs",children:el(z.id,6)})]})}),u.jsx(vt,{children:u.jsxs("div",{className:"flex justify-end gap-2",children:[u.jsxs(Fe,{variant:"outline",size:"sm",onClick:()=>G(z),children:[u.jsx(pu,{className:"mr-2 h-4 w-4"})," Edit"]}),u.jsx(Fe,{variant:"destructive",size:"sm",onClick:()=>g(z.id),disabled:K.isPending&&m===z.id,children:K.isPending&&m===z.id?"Deleting…":"Delete"})]})})]},z.id)),X.length===0&&u.jsx(an,{children:u.jsxs(vt,{colSpan:6,className:"text-muted-foreground py-10 text-center",children:[u.jsx(ew,{className:"mx-auto mb-2 h-6 w-6 opacity-60"}),"No load balancers match your search."]})})]})]})})}),u.jsx(fn,{open:d,onOpenChange:p,children:u.jsxs(mn,{className:"sm:max-w-lg",children:[u.jsx(gn,{children:u.jsx(yn,{children:"Edit Load Balancer"})}),u.jsx(yr,{...I,children:u.jsxs("form",{className:"space-y-4",onSubmit:I.handleSubmit(z=>{b&&q.mutate({id:b,values:z})}),children:[u.jsx(yt,{control:I.control,name:"name",render:({field:z})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Name"}),u.jsx(wt,{children:u.jsx(xt,{placeholder:"apps-lb-01",...z})}),u.jsx(mt,{})]})}),u.jsx(yt,{control:I.control,name:"kind",render:({field:z})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Kind"}),u.jsx(wt,{children:u.jsxs(Rn,{onValueChange:z.onChange,value:z.value??"public",children:[u.jsx(_n,{children:u.jsx(Tn,{placeholder:"Select kind"})}),u.jsxs($n,{children:[u.jsx(jt,{value:"public",children:"Public"}),u.jsx(jt,{value:"glueops",children:"GlueOps"})]})]})}),u.jsx(mt,{})]})}),u.jsx(yt,{control:I.control,name:"public_ip_address",render:({field:z})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Public IP / Hostname"}),u.jsx(wt,{children:u.jsx(xt,{placeholder:"1.2.3.4 or apps.example.com",...z})}),u.jsx(mt,{})]})}),u.jsx(yt,{control:I.control,name:"private_ip_address",render:({field:z})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Private IP / Hostname"}),u.jsx(wt,{children:u.jsx(xt,{placeholder:"10.0.30.10",...z})}),u.jsx(mt,{})]})}),u.jsxs(Sn,{className:"gap-2",children:[u.jsx(Fe,{type:"button",variant:"outline",onClick:()=>p(!1),children:"Cancel"}),u.jsx(Fe,{type:"submit",disabled:q.isPending,children:q.isPending?"Saving…":"Save changes"})]})]})})]})}),u.jsx(fn,{open:!!m,onOpenChange:z=>!z&&g(null),children:u.jsxs(mn,{className:"sm:max-w-md",children:[u.jsx(gn,{children:u.jsx(yn,{children:"Delete load balancer"})}),u.jsx("p",{className:"text-muted-foreground text-sm",children:"This action cannot be undone. Are you sure you want to delete this load balancer?"}),u.jsxs(Sn,{className:"gap-2",children:[u.jsx(Fe,{variant:"outline",onClick:()=>g(null),children:"Cancel"}),u.jsx(Fe,{variant:"destructive",onClick:()=>m&&K.mutate(m),disabled:K.isPending,children:K.isPending?"Deleting…":"Delete"})]})]})})]})};function Qbe(e,r="gsot-auth",s=520,o=640){const d=window.top.outerHeight/2+window.top.screenY-o/2,p=window.top.outerWidth/2+window.top.screenX-s/2;return window.open(e,r,`toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=${s},height=${o},top=${d},left=${p}`)}async function ewe(e){const r=new URLSearchParams({mode:"spa",origin:window.location.origin}),s=await fetch(`${q_}/auth/${e}/start?`+r,{method:"POST"});if(!s.ok)throw new Error("Failed to start auth");return(await s.json()).auth_url}const M3=()=>{const e=fY(),r=T_(),s=R.useMemo(()=>{const d=new URLSearchParams(r.search).get("to")||"/me";try{const p=new URL(d,window.location.origin);return p.origin===window.location.origin?p.pathname+p.search:"/me"}catch{return"/me"}},[r.search]);R.useEffect(()=>{Ks.get()?.access_token&&e(s,{replace:!0})},[e,s]),R.useEffect(()=>{const d=p=>{if(!(typeof p.data=="object"&&p.data?.type==="autoglue:auth"))return;const g=p.data.payload;Ks.set(g),e(s,{replace:!0})};return window.addEventListener("message",d),()=>window.removeEventListener("message",d)},[e,s]);const o=async d=>{const p=await ewe(d);Qbe(p)||alert("Please allow popups to sign in.")};return u.jsx("div",{className:"mx-auto flex items-center justify-center p-4",children:u.jsxs(ha,{className:"w-full max-w-md",children:[u.jsxs(sl,{children:[u.jsx(il,{className:"text-lg md:text-xl",children:"Sign In"}),u.jsx(j_,{className:"text-xs md:text-sm",children:"Continue with a provider below to access your account."})]}),u.jsx(oo,{children:u.jsx("div",{className:"grid gap-4",children:u.jsx("div",{className:ht("flex w-full items-center gap-2","flex-col justify-between"),children:u.jsxs(Fe,{variant:"outline",className:"w-full gap-2",onClick:()=>o("google"),children:[u.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"0.98em",height:"1em",viewBox:"0 0 256 262","aria-hidden":"true",focusable:"false",children:[u.jsx("path",{fill:"#4285F4",d:"M255.878 133.451c0-10.734-.871-18.567-2.756-26.69H130.55v48.448h71.947c-1.45 12.04-9.283 30.172-26.69 42.356l-.244 1.622l38.755 30.023l2.685.268c24.659-22.774 38.875-56.282 38.875-96.027"}),u.jsx("path",{fill:"#34A853",d:"M130.55 261.1c35.248 0 64.839-11.605 86.453-31.622l-41.196-31.913c-11.024 7.688-25.82 13.055-45.257 13.055c-34.523 0-63.824-22.773-74.269-54.25l-1.531.13l-40.298 31.187l-.527 1.465C35.393 231.798 79.49 261.1 130.55 261.1"}),u.jsx("path",{fill:"#FBBC05",d:"M56.281 156.37c-2.756-8.123-4.351-16.827-4.351-25.82c0-8.994 1.595-17.697 4.206-25.82l-.073-1.73L15.26 71.312l-1.335.635C5.077 89.644 0 109.517 0 130.55s5.077 40.905 13.925 58.602z"}),u.jsx("path",{fill:"#EB4335",d:"M130.55 50.479c24.514 0 41.05 10.589 50.479 19.438l36.844-35.974C195.245 12.91 165.798 0 130.55 0C79.49 0 35.393 29.301 13.925 71.947l42.211 32.783c10.59-31.477 39.891-54.251 74.414-54.251"})]}),"Sign in with Google"]})})})})]})})},twe=yC(),nwe={create:e=>ut(async()=>twe.createOrg({handlersOrgCreateReq:e}))},rwe=Xs({display_name:zn().min(2,"Too short").max(100,"Too long")}),swe=Xs({name:zn().min(2,"Too short").max(100,"Too long"),expires_in_hours:Zb().min(1).max(43800)}),iwe=Xs({name:zn().min(2,"Too short").max(100,"Too long"),domain:zn().trim().toLowerCase().optional().or(Wb("")).refine(e=>!e||/^[a-z0-9.-]+\.[a-z]{2,}$/i.test(e),"Invalid domain (e.g. example.com)")}),awe=()=>{const e=Hs(),r=rr({queryKey:["me"],queryFn:()=>yp.getMe()}),s=mr({resolver:gr(rwe),defaultValues:{display_name:""},values:r.data?{display_name:r.data.display_name??""}:void 0}),o=nn({mutationFn:X=>yp.updateMe(X),onSuccess:()=>{e.invalidateQueries({queryKey:["me"]}),Ze.success("Profile updated")},onError:X=>Ze.error(X?.message??"Update failed")}),d=rr({queryKey:["me","api-keys"],queryFn:()=>yp.listKeys()}),[p,m]=R.useState(!1),[g,b]=R.useState(null),S=mr({resolver:gr(swe),defaultValues:{name:"",expires_in_hours:720}}),E=nn({mutationFn:X=>yp.createKey({name:X.name,expires_in_hours:X.expires_in_hours}),onSuccess:X=>{b(X),m(!1),e.invalidateQueries({queryKey:["me","api-keys"]}),Ze.success("API key created")},onError:X=>Ze.error(X?.message??"Failed to create key")}),[A,k]=R.useState(null),T=nn({mutationFn:X=>yp.deleteKey(X),onSuccess:()=>{e.invalidateQueries({queryKey:["me","api-keys"]}),k(null),Ze.success("Key deleted")},onError:X=>Ze.error(X?.message??"Failed to delete key")}),M=R.useMemo(()=>r.data?.emails?.find(X=>X.is_primary)?.email??r.data?.primary_email??"",[r.data]),[I,q]=R.useState(!1),G=mr({resolver:gr(iwe),defaultValues:{name:"",domain:""}}),K=nn({mutationFn:X=>nwe.create({name:X.name.trim(),domain:X.domain?.trim()?X.domain.trim().toLowerCase():void 0}),onSuccess:()=>{q(!1),G.reset(),e.invalidateQueries({queryKey:["me"]}),Ze.success("Organization created")},onError:X=>Ze.error(X?.message??"Failed to create organization")});return r.isLoading?u.jsx("div",{className:"p-6",children:"Loading…"}):r.error?u.jsx("div",{className:"text-destructive p-6",children:"Failed to load profile"}):u.jsxs("div",{className:"space-y-6 p-6",children:[u.jsxs(ha,{children:[u.jsxs(sl,{children:[u.jsx(il,{children:"Profile"}),u.jsx(j_,{children:"Manage your personal information."})]}),u.jsx(oo,{children:u.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{children:[u.jsx(xi,{children:"Email"}),u.jsx("div",{className:"text-muted-foreground mt-1 text-sm",children:M||"—"})]}),u.jsxs("div",{children:[u.jsx(xi,{children:"ID"}),u.jsx("div",{className:"text-muted-foreground mt-1 text-sm",children:r.data?.id||"—"}),u.jsx("div",{className:"text-muted-foreground mt-1 text-sm",children:"Share this ID with the organization owner of the Organization to join"})]}),u.jsx(yr,{...s,children:u.jsxs("form",{className:"space-y-4",onSubmit:s.handleSubmit(X=>o.mutate(X)),children:[u.jsx(yt,{control:s.control,name:"display_name",render:({field:X})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Display name"}),u.jsx(wt,{children:u.jsx(xt,{placeholder:"Your name",...X})}),u.jsx(mt,{})]})}),u.jsx(Fe,{type:"submit",disabled:o.isPending,children:"Save"})]})})]}),u.jsxs("div",{className:"space-y-3",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx(xi,{children:"Organizations"}),u.jsxs(fn,{open:I,onOpenChange:q,children:[u.jsx(Li,{asChild:!0,children:u.jsx(Fe,{size:"sm",children:"New Organization"})}),u.jsxs(mn,{children:[u.jsxs(gn,{children:[u.jsx(yn,{children:"Create organization"}),u.jsx(XR,{children:"Give it a name, and optionally assign your company domain."})]}),u.jsx(yr,{...G,children:u.jsxs("form",{className:"space-y-4",onSubmit:G.handleSubmit(X=>K.mutate(X)),children:[u.jsx(yt,{control:G.control,name:"name",render:({field:X})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Name"}),u.jsx(wt,{children:u.jsx(xt,{placeholder:"Acme Inc.",...X})}),u.jsx(mt,{})]})}),u.jsx(yt,{control:G.control,name:"domain",render:({field:X})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Domain (optional)"}),u.jsx(wt,{children:u.jsx(xt,{placeholder:"acme.com",...X})}),u.jsx(mt,{})]})}),u.jsxs(Sn,{children:[u.jsx(Kj,{asChild:!0,children:u.jsx(Fe,{type:"button",variant:"outline",children:"Cancel"})}),u.jsx(Fe,{type:"submit",disabled:K.isPending,children:"Create"})]})]})})]})]})]}),u.jsx("div",{className:"rounded-md border",children:u.jsxs(Fi,{children:[u.jsx(qi,{children:u.jsxs(an,{children:[u.jsx(At,{children:"Name"}),u.jsx(At,{children:"Domain"})]})}),u.jsxs(Bi,{children:[r.data?.organizations?.map(X=>u.jsxs(an,{children:[u.jsx(vt,{children:X.name}),u.jsx(vt,{children:X.domain??"—"})]},X.id)),(!r.data?.organizations||r.data.organizations.length===0)&&u.jsx(an,{children:u.jsx(vt,{colSpan:2,className:"text-muted-foreground",children:"No organizations"})})]})]})})]})]})})]}),u.jsx(bb,{}),u.jsxs(ha,{children:[u.jsxs(sl,{className:"flex flex-row items-center justify-between space-y-0",children:[u.jsxs("div",{children:[u.jsx(il,{children:"User API Keys"}),u.jsx(j_,{children:"Personal keys for API access."})]}),u.jsxs(fn,{open:p,onOpenChange:m,children:[u.jsx(Li,{asChild:!0,children:u.jsx(Fe,{children:"New Key"})}),u.jsxs(mn,{children:[u.jsxs(gn,{children:[u.jsx(yn,{children:"Create API Key"}),u.jsx(XR,{children:"Give it a label and expiry."})]}),u.jsx(yr,{...S,children:u.jsxs("form",{className:"space-y-4",onSubmit:S.handleSubmit(X=>E.mutate(X)),children:[u.jsx(yt,{control:S.control,name:"name",render:({field:X})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Label"}),u.jsx(wt,{children:u.jsx(xt,{placeholder:"CI script, local dev, ...",...X})}),u.jsx(mt,{})]})}),u.jsx(yt,{control:S.control,name:"expires_in_hours",render:({field:X})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Expires in hours"}),u.jsx(wt,{children:u.jsx(xt,{type:"number",inputMode:"numeric",step:1,min:1,placeholder:"e.g. 720",...X,onChange:z=>X.onChange(z.target.value===""?"":Number(z.target.value))})}),u.jsx(mt,{})]})}),u.jsxs(Sn,{children:[u.jsx(Kj,{asChild:!0,children:u.jsx(Fe,{type:"button",variant:"outline",children:"Cancel"})}),u.jsx(Fe,{type:"submit",disabled:E.isPending,children:"Create"})]})]})})]})]})]}),u.jsx(oo,{children:u.jsx("div",{className:"overflow-x-auto rounded-md border",children:u.jsxs(Fi,{className:"text-sm",children:[u.jsx(fye,{children:"Your user-scoped API keys."}),u.jsx(qi,{children:u.jsxs(an,{children:[u.jsx(At,{children:"Label"}),u.jsx(At,{children:"Created"}),u.jsx(At,{children:"Expires"}),u.jsx(At,{children:"Last used"}),u.jsx(At,{className:"w-24"})]})}),u.jsxs(Bi,{children:[d.data?.map(X=>u.jsxs(an,{children:[u.jsx(vt,{children:X.name??"—"}),u.jsx(vt,{children:new Date(X.created_at).toLocaleString()}),u.jsx(vt,{children:X.expires_at?new Date(X.expires_at).toLocaleString():"—"}),u.jsx(vt,{children:X.last_used_at?new Date(X.last_used_at).toLocaleString():"—"}),u.jsx(vt,{className:"text-right",children:u.jsxs(rC,{open:A===X.id,onOpenChange:z=>!z&&k(null),children:[u.jsx(sC,{asChild:!0,children:u.jsx(Fe,{variant:"destructive",size:"sm",onClick:()=>k(X.id),children:"Delete"})}),u.jsxs(iC,{children:[u.jsxs(aC,{children:[u.jsx(lC,{children:"Delete this key?"}),u.jsx(cC,{children:"This action cannot be undone. Requests using this key will stop working."})]}),u.jsxs(oC,{children:[u.jsx(dC,{children:"Cancel"}),u.jsx(uC,{onClick:()=>T.mutate(X.id),children:"Delete"})]})]})]})})]},X.id)),(!d.data||d.data.length===0)&&u.jsx(an,{children:u.jsx(vt,{colSpan:5,className:"text-muted-foreground",children:"No API keys yet."})})]})]})})})]}),u.jsx(fn,{open:!!g,onOpenChange:X=>!X&&b(null),children:u.jsxs(mn,{children:[u.jsxs(gn,{children:[u.jsx(yn,{children:"Copy your new API key"}),u.jsx(XR,{children:"This is only shown once. Store it securely."})]}),u.jsx("div",{className:"rounded-md border p-3 font-mono text-sm break-all",children:g?.plain??"—"}),u.jsxs("div",{className:"flex justify-end gap-2",children:[u.jsx(Fe,{variant:"outline",onClick:()=>{const X=g?.plain;X&&(navigator.clipboard.writeText(X),Ze.success("Copied"))},children:"Copy"}),u.jsx(Fe,{onClick:()=>b(null),children:"Done"})]})]})})]})},pb=Qee(),Rb={listTaints:()=>ut(async()=>await pb.listTaints()),createTaint:e=>ut(async()=>await pb.createTaint({dtoCreateTaintRequest:e})),getTaint:e=>ut(async()=>await pb.getTaint({id:e})),deleteTaint:e=>ut(async()=>{await pb.deleteTaint({id:e})}),updateTaint:(e,r)=>ut(async()=>await pb.updateTaint({id:e,dtoUpdateTaintRequest:r}))},owe=["master","worker"];function I3({status:e}){const r=e==="ready"?"default":e==="provisioning"?"secondary":e==="failed"?"destructive":"outline";return u.jsx(rs,{variant:r,className:"capitalize",children:e||"unknown"})}function du(e,r){return(e??"").toLowerCase().includes(r)}function xT(e){const{open:r,title:s,onOpenChange:o,items:d,initialSelectedIds:p,onSave:m,columns:g,allowItem:b}=e,[S,E]=R.useState(""),[A,k]=R.useState(new Set(p)),[T,M]=R.useState(!1);R.useEffect(()=>{k(new Set(p)),E("")},[p,r]);const I=R.useMemo(()=>{const K=S.trim().toLowerCase();return d.filter(X=>b&&!b(X)?!1:K?du(X.name,K)||du(X.key,K)||du(X.value,K)||du(X.effect,K)||du(X.hostname,K)||du(X.private_ip_address,K)||du(X.public_ip_address,K)||du(X.role,K)||du(X.status,K):!0)},[d,S,b]),q=p,G=Array.from(A).some(K=>!q.has(K))||Array.from(q).some(K=>!A.has(K));return u.jsx(fn,{open:r,onOpenChange:o,children:u.jsxs(mn,{className:"sm:max-w-3xl",children:[u.jsx(gn,{children:u.jsx(yn,{children:s})}),u.jsxs("div",{className:"space-y-3",children:[u.jsxs("div",{className:"relative",children:[u.jsx(Pa,{className:"absolute top-2.5 left-2 h-4 w-4 opacity-60"}),u.jsx(xt,{value:S,onChange:K=>E(K.target.value),placeholder:"Search…",className:"pl-8"})]}),u.jsx("div",{className:"max-h-[50vh] overflow-auto rounded border",children:u.jsxs(Fi,{children:[u.jsx(qi,{children:u.jsxs(an,{children:[u.jsx(At,{className:"w-[48px]"}),g.map((K,X)=>u.jsx(At,{children:K.header},X))]})}),u.jsxs(Bi,{children:[I.map(K=>{const X=K.id,z=A.has(X);return u.jsxs(an,{children:[u.jsx(vt,{className:"text-center align-middle",children:u.jsx("input",{type:"checkbox",className:"h-4 w-4",checked:z,onChange:ee=>{const oe=new Set(A);ee.target.checked?oe.add(X):oe.delete(X),k(oe)}})}),g.map((ee,oe)=>u.jsx(vt,{children:ee.render(K)},oe))]},X)}),I.length===0&&u.jsx(an,{children:u.jsx(vt,{colSpan:1+g.length,className:"text-muted-foreground py-8 text-center",children:"No items found."})})]})]})}),u.jsxs("div",{className:"text-muted-foreground text-sm",children:["Selected: ",u.jsx("span",{className:"text-foreground font-medium",children:A.size})]})]}),u.jsxs(Sn,{className:"gap-2",children:[u.jsx(Fe,{type:"button",variant:"outline",onClick:()=>o(!1),disabled:T,children:"Close"}),u.jsx(Fe,{onClick:async()=>{const K=[],X=[];for(const z of A)q.has(z)||K.push(z);for(const z of q)A.has(z)||X.push(z);try{M(!0),await m({toAttach:K,toDetach:X}),o(!1)}finally{M(!1)}},disabled:T||!G,children:T?"Saving…":"Save changes"})]})]})})}const dB=Xs({name:zn().trim().min(1,"Name is required").max(120,"Max 120 chars"),role:Da(owe)}),lwe=dB.partial();function cwe(){const[e,r]=R.useState(""),[s,o]=R.useState(!1),[d,p]=R.useState(!1),[m,g]=R.useState(!1),[b,S]=R.useState(null),[E,A]=R.useState(null),[k,T]=R.useState(!1),[M,I]=R.useState(null),[q,G]=R.useState(new Set),[K,X]=R.useState(new Set),[z,ee]=R.useState(""),[oe,Q]=R.useState(!1),[ne,de]=R.useState(!1),[Ce,xe]=R.useState(!1),[le,be]=R.useState(null),[je,Ke]=R.useState(new Set),[ce,re]=R.useState(new Set),[ue,_e]=R.useState(new Set),fe=Hs(),He=rr({queryKey:["node-pools"],queryFn:()=>ka.listNodePools()}),Oe=rr({queryKey:["servers"],queryFn:()=>hg.listServers()}),ke=rr({queryKey:["annotations"],queryFn:()=>Sb.listAnnotations()}),Ve=rr({queryKey:["labels"],queryFn:()=>kb.listLabels()}),ie=rr({queryKey:["taints"],queryFn:()=>Rb.listTaints()}),Ne=mr({resolver:gr(dB),defaultValues:{name:"",role:"worker"}}),ze=nn({mutationFn:Le=>ka.createNodePool(Le),onSuccess:async()=>{await fe.invalidateQueries({queryKey:["node-pools"]}),Ne.reset({name:"",role:"worker"}),o(!1),Ze.success("Node pool created.")},onError:Le=>Ze.error(Le?.message??"Unable to create node pool.")}),tt=Le=>ze.mutate(Le),ft=mr({resolver:gr(lwe),defaultValues:{name:void 0,role:void 0}});R.useEffect(()=>{b?ft.reset({name:b.name,role:b.role}):ft.reset({name:void 0,role:void 0})},[b]);const Ot=nn({mutationFn:async Le=>{if(!b)return;const Lt={};return Le.name!==b.name&&(Lt.name=Le.name),Le.role!==b.role&&(Lt.role=Le.role),await ka.updateNodePool(b.id,Lt)},onSuccess:async()=>{await fe.invalidateQueries({queryKey:["node-pools"]}),p(!1),S(null),Ze.success("Node pool updated.")},onError:Le=>Ze.error(Le?.message??"Unable to update node pool.")}),Ft=Le=>Ot.mutate(Le),kt=nn({mutationFn:async()=>{E&&await ka.deleteNodePool(E.id)},onSuccess:async()=>{await fe.invalidateQueries({queryKey:["node-pools"]}),g(!1),A(null),Ze.success("Node pool deleted.")},onError:Le=>Ze.error(Le?.message??"Unable to delete node pool.")}),Jt=R.useMemo(()=>{const Le=He.data??[],Lt=e.trim().toLowerCase();return Lt?Le.filter(Rt=>Rt.name?.toLowerCase().includes(Lt)||Rt.role?.toLowerCase().includes(Lt)):Le},[e,He.data]);return He.isLoading?u.jsx("div",{className:"p-6",children:"Loading node pools…"}):He.error?u.jsxs("div",{className:"p-6 text-red-500",children:["Error loading node pools.",u.jsx("pre",{className:"bg-muted mt-3 rounded p-3 text-xs",children:JSON.stringify(He.error,null,2)})]}):u.jsxs("div",{className:"space-y-4 p-6",children:[u.jsxs("div",{className:"flex flex-col gap-3 md:flex-row md:items-center md:justify-between",children:[u.jsx("h1",{className:"mb-4 text-2xl font-bold",children:"Node Pools"}),u.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[u.jsxs("div",{className:"relative",children:[u.jsx(Pa,{className:"absolute top-2.5 left-2 h-4 w-4 opacity-60"}),u.jsx(xt,{value:e,onChange:Le=>r(Le.target.value),placeholder:"Search node pools",className:"w-64 pl-8"})]}),u.jsxs(fn,{open:s,onOpenChange:o,children:[u.jsx(Li,{asChild:!0,children:u.jsxs(Fe,{onClick:()=>o(!0),children:[u.jsx(lo,{className:"mr-2 h-4 w-4"}),"Create Node Pool"]})}),u.jsxs(mn,{className:"sm:max-w-lg",children:[u.jsx(gn,{children:u.jsx(yn,{children:"Create Node Pool"})}),u.jsx(yr,{...Ne,children:u.jsxs("form",{className:"space-y-4",onSubmit:Ne.handleSubmit(tt),children:[u.jsx(yt,{control:Ne.control,name:"name",render:({field:Le})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Name"}),u.jsx(wt,{children:u.jsx(xt,{placeholder:"master-pool",...Le})}),u.jsx(mt,{})]})}),u.jsx(yt,{control:Ne.control,name:"role",render:({field:Le})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Role"}),u.jsxs(Rn,{onValueChange:Lt=>Ne.setValue("role",Lt,{shouldDirty:!0,shouldValidate:!0}),value:Le.value,children:[u.jsx(wt,{children:u.jsx(_n,{children:u.jsx(Tn,{placeholder:"Select role"})})}),u.jsxs($n,{children:[u.jsx(jt,{value:"master",children:"master"}),u.jsx(jt,{value:"worker",children:"worker"})]})]}),u.jsx(mt,{})]})}),u.jsxs(Sn,{className:"gap-2",children:[u.jsx(Fe,{type:"button",variant:"outline",onClick:()=>o(!1),children:"Cancel"}),u.jsx(Fe,{type:"submit",disabled:Ne.formState.isSubmitting,children:Ne.formState.isSubmitting?"Creating…":"Create"})]})]})})]})]})]})]}),u.jsx("div",{className:"bg-background overflow-hidden rounded-2xl border shadow-sm",children:u.jsx("div",{className:"overflow-x-auto",children:u.jsxs(Fi,{children:[u.jsx(qi,{children:u.jsxs(an,{children:[u.jsx(At,{children:"Name"}),u.jsx(At,{children:"Role"}),u.jsx(At,{children:"Servers"}),u.jsx(At,{children:"Annotations"}),u.jsx(At,{children:"Labels"}),u.jsx(At,{children:"Taints"}),u.jsx(At,{className:"w-[180px] text-right",children:"Actions"})]})}),u.jsxs(Bi,{children:[Jt.map(Le=>{const Lt=Array.isArray(Le.servers)?Le.servers.length:0;return u.jsxs(an,{children:[u.jsx(vt,{className:"font-medium",children:Le.name}),u.jsx(vt,{className:"font-medium",children:Le.role}),u.jsx(vt,{children:u.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[(Le.servers||[]).slice(0,6).map(Rt=>u.jsxs(rs,{variant:"secondary",className:"gap-1",children:[u.jsx(L_,{className:"h-3 w-3"}),Rt.hostname||Rt.private_ip_address,u.jsx("span",{className:"ml-1",children:Rt.role}),Rt.status&&u.jsx("span",{className:"ml-1",children:u.jsx(I3,{status:Rt.status})})]},Rt.id)),Lt===0&&u.jsx("span",{className:"text-muted-foreground",children:"No servers"}),Lt>6&&u.jsxs("span",{className:"text-muted-foreground",children:["+",Lt-6," more"]}),u.jsxs(Fe,{variant:"outline",size:"sm",onClick:()=>{I(Le);const Rt=new Set((Le.servers||[]).map(V=>V.id));G(new Set(Rt)),X(new Set(Rt)),ee(""),T(!0)},children:[u.jsx(qE,{className:"mr-2 h-4 w-4"}),"Manage Servers"]})]})}),u.jsx(vt,{children:u.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[(Le.annotations||[]).slice(0,6).map(Rt=>u.jsxs(rs,{variant:"outline",className:"gap-1",children:[Rt.key,":",Rt.value]},Rt.id)),(Le.annotations||[]).length===0&&u.jsx("span",{className:"text-muted-foreground",children:"No annotations"}),(Le.annotations||[]).length>6&&u.jsxs("span",{className:"text-muted-foreground",children:["+",(Le.annotations||[]).length-6," more"]}),u.jsxs(Fe,{variant:"outline",size:"sm",onClick:()=>{be(Le),re(new Set((Le.annotations||[]).map(Rt=>Rt.id))),de(!0)},children:[u.jsx(qE,{className:"mr-2 h-4 w-4"}),"Manage"]})]})}),u.jsx(vt,{children:u.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[(Le.labels||[]).slice(0,6).map(Rt=>u.jsxs(rs,{variant:"secondary",className:"gap-1",children:[Rt.key,":",Rt.value]},Rt.id)),(Le.labels||[]).length===0&&u.jsx("span",{className:"text-muted-foreground",children:"No labels"}),(Le.labels||[]).length>6&&u.jsxs("span",{className:"text-muted-foreground",children:["+",(Le.labels||[]).length-6," more"]}),u.jsxs(Fe,{variant:"outline",size:"sm",onClick:()=>{be(Le),Ke(new Set((Le.labels||[]).map(Rt=>Rt.id))),Q(!0)},children:[u.jsx(qE,{className:"mr-2 h-4 w-4"}),"Manage"]})]})}),u.jsx(vt,{children:u.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[(Le.taints||[]).slice(0,6).map(Rt=>u.jsxs(rs,{variant:"outline",className:"gap-1",children:[Rt.key,":",Rt.value,Rt.effect?u.jsxs("span",{className:"ml-1",children:["(",Rt.effect,")"]}):null]},Rt.id)),(Le.taints||[]).length===0&&u.jsx("span",{className:"text-muted-foreground",children:"No taints"}),(Le.taints||[]).length>6&&u.jsxs("span",{className:"text-muted-foreground",children:["+",(Le.taints||[]).length-6," more"]}),u.jsxs(Fe,{variant:"outline",size:"sm",onClick:()=>{be(Le),_e(new Set((Le.taints||[]).map(Rt=>Rt.id))),xe(!0)},children:[u.jsx(qE,{className:"mr-2 h-4 w-4"}),"Manage"]})]})}),u.jsx(vt,{className:"text-right",children:u.jsxs(f$,{children:[u.jsx(m$,{asChild:!0,children:u.jsx(Fe,{size:"icon",variant:"ghost",className:"h-8 w-8",children:u.jsx(z_,{className:"h-4 w-4"})})}),u.jsxs(g$,{align:"end",children:[u.jsxs(jp,{onClick:()=>{S(Le),p(!0)},children:[u.jsx(pu,{className:"mr-2 h-4 w-4"})," Edit"]}),u.jsxs(jp,{className:"text-red-600 focus:text-red-600",onClick:()=>{A(Le),g(!0)},children:[u.jsx(zb,{className:"mr-2 h-4 w-4"})," Delete"]})]})]})})]},Le.id)}),Jt.length===0&&u.jsx(an,{children:u.jsx(vt,{colSpan:7,className:"text-muted-foreground py-10 text-center",children:"No node pools found."})})]})]})})}),u.jsx(fn,{open:d,onOpenChange:p,children:u.jsxs(mn,{className:"sm:max-w-lg",children:[u.jsx(gn,{children:u.jsx(yn,{children:"Edit Node Pool"})}),u.jsx(yr,{...ft,children:u.jsxs("form",{className:"space-y-4",onSubmit:ft.handleSubmit(Ft),children:[u.jsx(yt,{control:ft.control,name:"name",render:({field:Le})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Name"}),u.jsx(wt,{children:u.jsx(xt,{placeholder:"pool-name",...Le})}),u.jsx(mt,{})]})}),u.jsx(yt,{control:ft.control,name:"role",render:({field:Le})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Role"}),u.jsxs(Rn,{onValueChange:Lt=>ft.setValue("role",Lt,{shouldDirty:!0,shouldValidate:!0}),value:Le.value,children:[u.jsx(wt,{children:u.jsx(_n,{children:u.jsx(Tn,{placeholder:"Select role"})})}),u.jsxs($n,{children:[u.jsx(jt,{value:"master",children:"master"}),u.jsx(jt,{value:"worker",children:"worker"})]})]}),u.jsx(mt,{})]})}),u.jsxs(Sn,{className:"gap-2",children:[u.jsx(Fe,{type:"button",variant:"outline",onClick:()=>{p(!1),S(null)},children:"Cancel"}),u.jsx(Fe,{type:"submit",disabled:ft.formState.isSubmitting,children:ft.formState.isSubmitting?"Saving…":"Save changes"})]})]})})]})}),u.jsx(fn,{open:m,onOpenChange:g,children:u.jsxs(mn,{className:"sm:max-w-md",children:[u.jsx(gn,{children:u.jsx(yn,{children:"Delete node pool"})}),u.jsxs("p",{className:"text-muted-foreground text-sm",children:["This will permanently delete"," ",u.jsx("span",{className:"text-foreground font-medium",children:E?.name}),"."]}),u.jsxs(Sn,{className:"gap-2",children:[u.jsx(Fe,{type:"button",variant:"outline",onClick:()=>{g(!1),A(null)},children:"Cancel"}),u.jsx(Fe,{variant:"destructive",onClick:()=>kt.mutate(),disabled:kt.isPending,children:kt.isPending?"Deleting…":"Delete"})]})]})}),u.jsx(fn,{open:k,onOpenChange:T,children:u.jsxs(mn,{className:"sm:max-w-3xl",children:[u.jsx(gn,{children:u.jsxs(yn,{children:["Manage Servers",M?` — ${M.name}`:""]})}),u.jsxs("div",{className:"space-y-3",children:[u.jsxs("div",{className:"relative",children:[u.jsx(Pa,{className:"absolute top-2.5 left-2 h-4 w-4 opacity-60"}),u.jsx(xt,{value:z,onChange:Le=>ee(Le.target.value),placeholder:"Search by hostname, IP or role…",className:"pl-8"})]}),u.jsx("div",{className:"max-h-[50vh] overflow-auto rounded border",children:u.jsxs(Fi,{children:[u.jsx(qi,{children:u.jsxs(an,{children:[u.jsx(At,{className:"w-[48px]"}),u.jsx(At,{children:"Hostname"}),u.jsx(At,{children:"Private IP"}),u.jsx(At,{children:"Public IP"}),u.jsx(At,{children:"Role"}),u.jsx(At,{children:"Status"})]})}),u.jsxs(Bi,{children:[(Oe.data??[]).filter(Le=>{if(M?.role&&!vye(M.role,Le.role))return!1;const Lt=z.trim().toLowerCase();return Lt?(Le.hostname??"").toLowerCase().includes(Lt)||(Le.private_ip_address??"").toLowerCase().includes(Lt)||(Le.public_ip_address??"").toLowerCase().includes(Lt)||(Le.role??"").toLowerCase().includes(Lt):!0}).map(Le=>{const Lt=Le.id,Rt=q.has(Lt);return u.jsxs(an,{children:[u.jsx(vt,{className:"text-center align-middle",children:u.jsx("input",{type:"checkbox",className:"h-4 w-4",checked:Rt,onChange:V=>{const Nn=new Set(q);V.target.checked?Nn.add(Lt):Nn.delete(Lt),G(Nn)}})}),u.jsx(vt,{className:"font-medium",children:Le.hostname||"—"}),u.jsx(vt,{children:Le.private_ip_address||"—"}),u.jsx(vt,{children:Le.public_ip_address||"—"}),u.jsx(vt,{className:"capitalize",children:Le.role||"—"}),u.jsx(vt,{children:u.jsx(I3,{status:Le.status})})]},Lt)}),(Oe.data??[]).length===0&&u.jsx(an,{children:u.jsx(vt,{colSpan:6,className:"text-muted-foreground py-8 text-center",children:Oe.isLoading?"Loading servers…":"No servers found."})})]})]})}),u.jsxs("div",{className:"text-muted-foreground text-sm",children:["Selected: ",u.jsx("span",{className:"text-foreground font-medium",children:q.size})]})]}),u.jsxs(Sn,{className:"gap-2",children:[u.jsx(Fe,{type:"button",variant:"outline",onClick:()=>{T(!1),I(null),G(new Set),X(new Set),ee("")},children:"Close"}),u.jsx(Fe,{onClick:async()=>{if(!M)return;const Le=M.id,Lt=[],Rt=[];for(const V of q)K.has(V)||Lt.push(V);for(const V of K)q.has(V)||Rt.push(V);try{Lt.length>0&&await ka.attachNodePoolServer(Le,{server_ids:Lt});for(const V of Rt)await ka.detachNodePoolServers(Le,V);await fe.invalidateQueries({queryKey:["node-pools"]}),await fe.invalidateQueries({queryKey:["servers"]}),Ze.success("Servers updated for node pool."),T(!1),I(null),G(new Set),X(new Set),ee("")}catch(V){Ze.error(V?.message??"Failed to update servers.")}},disabled:Oe.isLoading,children:"Save changes"})]})]})}),u.jsx(xT,{open:oe,onOpenChange:Le=>{Q(Le),Le||be(null)},title:`Manage Labels${le?` — ${le.name}`:""}`,items:(Ve.data??[]).map(Le=>({id:Le.id,key:Le.key,value:Le.value,name:`${Le.key}:${Le.value}`})),initialSelectedIds:je,columns:[{header:"Key",render:Le=>u.jsx("span",{className:"font-medium",children:Le.key})},{header:"Value",render:Le=>Le.value??"—"}],onSave:async({toAttach:Le,toDetach:Lt})=>{if(!le)return;const Rt=le.id;try{Le.length>0&&await ka.attachNodePoolLabels(Rt,{label_ids:Le});for(const V of Lt)await ka.detachNodePoolLabels(Rt,V);await fe.invalidateQueries({queryKey:["node-pools"]}),Ze.success("Labels updated for node pool.")}catch(V){throw Ze.error(V?.message??"Failed to update labels."),V}}}),u.jsx(xT,{open:ne,onOpenChange:Le=>{de(Le),Le||be(null)},title:`Manage Annotations${le?` — ${le.name}`:""}`,items:(ke.data??[]).map(Le=>({id:Le.id,key:Le.key,value:Le.value,name:`${Le.key}:${Le.value}`})),initialSelectedIds:ce,columns:[{header:"Key",render:Le=>u.jsx("span",{className:"font-medium",children:Le.key})},{header:"Value",render:Le=>Le.value??"—"}],onSave:async({toAttach:Le,toDetach:Lt})=>{if(!le)return;const Rt=le.id;try{Le.length>0&&await ka.attachNodePoolAnnotations(Rt,{annotation_ids:Le});for(const V of Lt)await ka.detachNodePoolAnnotations(Rt,V);await fe.invalidateQueries({queryKey:["node-pools"]}),Ze.success("Annotations updated for node pool.")}catch(V){throw Ze.error(V?.message??"Failed to update annotations."),V}}}),u.jsx(xT,{open:Ce,onOpenChange:Le=>{xe(Le),Le||be(null)},title:`Manage Taints${le?` — ${le.name}`:""}`,items:(ie.data??[]).map(Le=>({id:Le.id,key:Le.key,value:Le.value,effect:Le.effect,name:`${Le.key}:${Le.value}`})),initialSelectedIds:ue,columns:[{header:"Key",render:Le=>u.jsx("span",{className:"font-medium",children:Le.key})},{header:"Value",render:Le=>Le.value??"—"},{header:"Effect",render:Le=>Le.effect??"—"}],onSave:async({toAttach:Le,toDetach:Lt})=>{if(!le)return;const Rt=le.id;try{Le.length>0&&await ka.attachNodePoolTaints(Rt,{taint_ids:Le});for(const V of Lt)await ka.detachNodePoolTaints(Rt,V);await fe.invalidateQueries({queryKey:["node-pools"]}),Ze.success("Taints updated for node pool.")}catch(V){throw Ze.error(V?.message??"Failed to update taints."),V}}})]})}const uwe=Xs({name:zn(),expires_in_hours:Zb().min(1).max(43800)}),dwe=()=>{const e=yC(),r=Hs(),s=Qo.get(),o=rr({enabled:!!s,queryKey:["org:keys",s],queryFn:()=>ut(()=>e.listOrgKeys({id:s}))}),d=mr({resolver:gr(uwe),defaultValues:{name:"",expires_in_hours:720}}),[p,m]=R.useState(null),g=nn({mutationFn:S=>e.createOrgKey({id:s,handlersOrgKeyCreateReq:S}),onSuccess:S=>{r.invalidateQueries({queryKey:["org:keys",s]}),m({key:S.org_key,secret:S.org_secret}),Ze.success("Key created"),d.reset({name:"",expires_in_hours:void 0})},onError:S=>Ze.error(S?.message??"Failed to create key")}),b=nn({mutationFn:S=>e.deleteOrgKey({id:s,keyId:S}),onSuccess:()=>{r.invalidateQueries({queryKey:["org:keys",s]}),Ze.success("Key deleted")},onError:S=>Ze.error(S?.message??"Failed to delete key")});return s?o.isLoading?u.jsx("p",{children:"Loading..."}):o.error?u.jsx("p",{className:"text-destructive",children:"Failed to load keys."}):u.jsxs(ha,{children:[u.jsx(sl,{children:u.jsx(il,{children:"Org API Keys"})}),u.jsxs(oo,{className:"space-y-6",children:[u.jsx(yr,{...d,children:u.jsxs("form",{onSubmit:d.handleSubmit(S=>g.mutate(S)),className:"grid grid-cols-1 items-end gap-3 md:grid-cols-12",children:[u.jsx("div",{className:"md:col-span-6",children:u.jsx(yt,{control:d.control,name:"name",render:({field:S})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Name"}),u.jsx(wt,{children:u.jsx(xt,{placeholder:"automation-bot",...S})}),u.jsx(mt,{})]})})}),u.jsx("div",{className:"md:col-span-4",children:u.jsx(yt,{control:d.control,name:"expires_in_hours",render:({field:S})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Expires In (hours)"}),u.jsx(wt,{children:u.jsx(xt,{placeholder:"e.g. 720",...S})}),u.jsx(mt,{})]})})}),u.jsx("div",{className:"md:col-span-2",children:u.jsx(Fe,{type:"submit",className:"w-full",disabled:g.isPending,children:"Create"})})]})}),u.jsx("div",{className:"overflow-x-auto rounded-md border",children:u.jsxs(Fi,{children:[u.jsx(qi,{children:u.jsxs(an,{children:[u.jsx(At,{children:"Name"}),u.jsx(At,{children:"Scope"}),u.jsx(At,{children:"Created"}),u.jsx(At,{children:"Expires"}),u.jsx(At,{className:"w-28"})]})}),u.jsxs(Bi,{children:[o.data?.map(S=>u.jsxs(an,{children:[u.jsx(vt,{children:S.name??"-"}),u.jsx(vt,{children:S.scope}),u.jsx(vt,{children:new Date(S.created_at).toLocaleString()}),u.jsx(vt,{children:S.expires_at?new Date(S.expires_at).toLocaleString():"-"}),u.jsx(vt,{className:"text-right",children:u.jsx(Fe,{variant:"destructive",size:"sm",onClick:()=>b.mutate(S.id),children:"Delete"})})]},S.id)),o.data?.length===0&&u.jsx(an,{children:u.jsx(vt,{colSpan:5,className:"text-muted-foreground p-4",children:"No keys."})})]})]})}),u.jsx(fn,{open:!!p,onOpenChange:S=>!S&&m(null),children:u.jsxs(mn,{children:[u.jsx(gn,{children:u.jsx(yn,{children:"Copy your credentials"})}),u.jsxs("div",{className:"space-y-2",children:[u.jsxs("div",{children:[u.jsx("div",{className:"text-muted-foreground mb-1 text-xs",children:"Org Key"}),u.jsx(xt,{readOnly:!0,value:p?.key??"",onFocus:S=>S.currentTarget.select()})]}),u.jsxs("div",{children:[u.jsx("div",{className:"text-muted-foreground mb-1 text-xs",children:"Org Secret"}),u.jsx(xt,{readOnly:!0,value:p?.secret??"",onFocus:S=>S.currentTarget.select()})]}),u.jsx("p",{className:"text-muted-foreground text-xs",children:"This secret is shown once. Store it securely."})]}),u.jsx(Sn,{children:u.jsx(Fe,{onClick:()=>m(null),children:"Done"})})]})})]})]}):u.jsx("p",{className:"text-muted-foreground",children:"Pick an organization."})},hwe=Xs({user_id:w6("Invalid UUID"),role:Da(["owner","admin","member"])}),pwe=()=>{const e=yC(),r=Hs(),s=Qo.get(),[o,d]=R.useState(null),p=rr({enabled:!!s,queryKey:["org:members",s],queryFn:()=>ut(()=>e.listMembers({id:s}))}),m=R.useMemo(()=>(p.data??[]).filter(k=>k.role==="owner").length,[p.data]),g=mr({resolver:gr(hwe),defaultValues:{user_id:"",role:"member"}}),b=nn({mutationFn:k=>e.addOrUpdateMember({id:s,handlersMemberUpsertReq:k}),onSuccess:()=>{Ze.success("Member added/updated"),r.invalidateQueries({queryKey:["org:members",s]}),g.reset({user_id:"",role:"member"})},onError:k=>Ze.error(k?.message??"Failed")}),S=nn({mutationFn:k=>e.removeMember({id:s,userId:k}),onSuccess:()=>{Ze.success("Member removed"),r.invalidateQueries({queryKey:["org:members",s]})},onError:k=>Ze.error(k?.message??"Failed")}),E=nn({mutationFn:({userId:k,role:T})=>e.addOrUpdateMember({id:s,handlersMemberUpsertReq:{user_id:k,role:T}}),onMutate:async({userId:k,role:T})=>{d(k),await r.cancelQueries({queryKey:["org:members",s]});const M=r.getQueryData(["org:members",s]);return r.setQueryData(["org:members",s],(I=[])=>I.map(q=>q.user_id===k?{...q,role:T}:q)),{prev:M}},onError:(k,T,M)=>{M?.prev&&r.setQueryData(["org:members",s],M.prev),Ze.error(k?.message??"Failed to update role")},onSuccess:()=>{Ze.success("Role updated")},onSettled:()=>{d(null),r.invalidateQueries({queryKey:["org:members",s]})}}),A=k=>!(k.role==="owner"&&m<=1);return s?p.isLoading?u.jsx("p",{children:"Loading..."}):p.error?u.jsx("p",{className:"text-destructive",children:"Failed to load members."}):u.jsxs(ha,{children:[u.jsx(sl,{children:u.jsx(il,{children:"Members"})}),u.jsxs(oo,{className:"space-y-6",children:[u.jsx(yr,{...g,children:u.jsxs("form",{className:"grid grid-cols-1 items-end gap-3 md:grid-cols-12",onSubmit:g.handleSubmit(k=>b.mutate(k)),children:[u.jsx("div",{className:"md:col-span-6",children:u.jsx(yt,{control:g.control,name:"user_id",render:({field:k})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"User ID"}),u.jsx(wt,{children:u.jsx(xt,{placeholder:"UUID",...k})}),u.jsx(mt,{})]})})}),u.jsx("div",{className:"md:col-span-4",children:u.jsx(yt,{control:g.control,name:"role",render:({field:k})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Role"}),u.jsxs(Rn,{onValueChange:k.onChange,value:k.value,children:[u.jsx(_n,{children:u.jsx(Tn,{placeholder:"Select role"})}),u.jsxs($n,{children:[u.jsx(jt,{value:"member",children:"member"}),u.jsx(jt,{value:"admin",children:"admin"}),u.jsx(jt,{value:"owner",children:"owner"})]})]}),u.jsx(mt,{})]})})}),u.jsx("div",{className:"md:col-span-2",children:u.jsx(Fe,{type:"submit",className:"w-full",disabled:b.isPending,children:"Save"})})]})}),u.jsx("div",{className:"overflow-x-auto rounded-md border",children:u.jsxs(Fi,{children:[u.jsx(qi,{children:u.jsxs(an,{children:[u.jsx(At,{children:"Id"}),u.jsx(At,{children:"User"}),u.jsx(At,{children:"Role"}),u.jsx(At,{className:"w-28"})]})}),u.jsxs(Bi,{children:[p.data?.map(k=>{const T=o===k.user_id;return u.jsxs(an,{className:"align-middle",children:[u.jsx(vt,{className:"font-mono text-xs",children:k.user_id}),u.jsx(vt,{children:k.email}),u.jsx(vt,{className:"capitalize",children:u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsxs(Rn,{value:k.role,onValueChange:M=>{if(k.role!==M){if(k.role==="owner"&&M!=="owner"&&!A(k)){Ze.error("You cannot demote the last owner.");return}E.mutate({userId:k.user_id,role:M})}},disabled:T,children:[u.jsx(_n,{className:"h-8 w-[140px]",children:u.jsx(Tn,{})}),u.jsxs($n,{children:[u.jsx(jt,{value:"member",children:"member"}),u.jsx(jt,{value:"admin",children:"admin"}),u.jsx(jt,{value:"owner",children:"owner"})]})]}),T&&u.jsx(Ds,{className:"h-4 w-4 animate-spin"})]})}),u.jsx(vt,{className:"text-right",children:u.jsx(Fe,{variant:"destructive",size:"sm",onClick:()=>S.mutate(k.user_id),disabled:k.role==="owner"&&m<=1,title:k.role==="owner"&&m<=1?"Cannot remove the last owner":"",children:"Remove"})})]},k.user_id)}),p.data?.length===0&&u.jsx(an,{children:u.jsx(vt,{colSpan:3,className:"text-muted-foreground p-4",children:"No members."})})]})]})})]})]}):u.jsx("p",{className:"text-muted-foreground",children:"Pick an organization."})},fwe=Xs({name:zn().min(1,"Required"),domain:zn().optional()}),mwe=()=>{const e=yC(),r=Hs(),s=Qo.get(),o=rr({enabled:!!s,queryKey:["org",s],queryFn:()=>ut(()=>e.getOrg({id:s}))}),d=mr({resolver:gr(fwe),defaultValues:{name:"",domain:""}});R.useEffect(()=>{o.data&&d.reset({name:o.data.name??"",domain:o.data.domain??""})},[o.data,d]);const p=nn({mutationFn:b=>e.updateOrg({id:s,handlersOrgUpdateReq:b}),onSuccess:()=>{r.invalidateQueries({queryKey:["org",s]}),Ze.success("Organization updated")},onError:b=>Ze.error(b?.message??"Update failed")}),m=nn({mutationFn:()=>e.deleteOrg({id:s}),onSuccess:()=>{Ze.success("Organization deleted"),Qo.set(""),r.invalidateQueries({queryKey:["orgs:mine"]})},onError:b=>Ze.error(b?.message??"Delete failed")});if(!s)return u.jsx("p",{className:"text-muted-foreground",children:"Pick an organization."});if(o.isLoading)return u.jsx("p",{children:"Loading..."});if(o.error)return u.jsx("p",{className:"text-destructive",children:"Failed to load."});const g=b=>{const S={};b.name!==o.data?.name&&(S.name=b.name);const E=b.domain?.trim()||void 0;(E??null)!==(o.data?.domain??null)&&(S.domain=E),Object.keys(S).length!==0&&p.mutate(S)};return u.jsxs(ha,{children:[u.jsx(sl,{children:u.jsx(il,{children:"Organization Settings"})}),u.jsx(oo,{className:"space-y-6",children:u.jsx(yr,{...d,children:u.jsxs("form",{className:"space-y-4",onSubmit:d.handleSubmit(g),children:[u.jsx(yt,{control:d.control,name:"name",render:({field:b})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Name"}),u.jsx(wt,{children:u.jsx(xt,{...b})}),u.jsx(mt,{})]})}),u.jsx(yt,{control:d.control,name:"domain",render:({field:b})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Domain (optional)"}),u.jsx(wt,{children:u.jsx(xt,{placeholder:"acme.com",...b})}),u.jsx(mt,{})]})}),u.jsxs("div",{className:"flex gap-2",children:[u.jsx(Fe,{type:"submit",disabled:p.isPending,children:"Save"}),u.jsx(Fe,{type:"button",variant:"destructive",onClick:()=>m.mutate(),disabled:m.isPending,children:"Delete Org"})]})]})})})]})},fb=Wee();function gwe(){const e=Ks.getAccessToken(),r=Qo.get();return{...e?{Authorization:`Bearer ${e}`}:{},...r?{"X-Org-ID":r}:{}}}async function z3(e,r={}){return fetch(e,{...r,headers:{...r.headers,...gwe()},credentials:"include"})}const eg={listSshKeys:()=>ut(async()=>await fb.listPublicSshKeys()),createSshKey:e=>ut(async()=>await fb.createSSHKey({dtoCreateSSHRequest:e})),getSshKeyById:e=>ut(async()=>await fb.getSSHKey({id:e})),revealSshKeyById:e=>ut(async()=>await fb.getSSHKey({id:e,reveal:!0})),deleteSshKey:e=>ut(async()=>{await fb.deleteSSHKey({id:e})}),downloadJson:(e,r)=>ut(async()=>{const s=new URL(`/api/v1/ssh/${e}/download`,window.location.origin);s.searchParams.set("part",r),s.searchParams.set("mode","json");const o=await z3(s.toString());if(!o.ok)throw new Error(`Download failed: ${o.statusText}`);return await o.json()}),downloadBlob:(e,r)=>ut(async()=>{const s=new URL(`/api/v1/ssh/${e}/download`,window.location.origin);s.searchParams.set("part",r);const o=await z3(s.toString());if(!o.ok)throw new Error(`Download failed: ${o.statusText}`);const d=o.headers.get("Content-Disposition")||"",m=/filename="([^"]+)"/i.exec(d)?.[1]??"ssh-key-download",g=await o.blob();return{filename:m,blob:g}})},fj=43200,L3=1440,F3=Symbol.for("constructDateFrom");function y$(e,r){return typeof e=="function"?e(r):e&&typeof e=="object"&&F3 in e?e[F3](r):e instanceof Date?new e.constructor(r):new Date(r)}function Vd(e,r){return y$(e,e)}let ywe={};function vwe(){return ywe}function q3(e){const r=Vd(e),s=new Date(Date.UTC(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds()));return s.setUTCFullYear(r.getFullYear()),+e-+s}function v$(e,...r){const s=y$.bind(null,e||r.find(o=>typeof o=="object"));return r.map(s)}function Aj(e,r){const s=+Vd(e)-+Vd(r);return s<0?-1:s>0?1:s}function xwe(e){return y$(e,Date.now())}function bwe(e,r,s){const[o,d]=v$(s?.in,e,r),p=o.getFullYear()-d.getFullYear(),m=o.getMonth()-d.getMonth();return p*12+m}function wwe(e){return r=>{const o=(e?Math[e]:Math.trunc)(r);return o===0?0:o}}function Swe(e,r){return+Vd(e)-+Vd(r)}function Ewe(e,r){const s=Vd(e);return s.setHours(23,59,59,999),s}function jwe(e,r){const s=Vd(e),o=s.getMonth();return s.setFullYear(s.getFullYear(),o+1,0),s.setHours(23,59,59,999),s}function Cwe(e,r){const s=Vd(e);return+Ewe(s)==+jwe(s)}function Awe(e,r,s){const[o,d,p]=v$(s?.in,e,e,r),m=Aj(d,p),g=Math.abs(bwe(d,p));if(g<1)return 0;d.getMonth()===1&&d.getDate()>27&&d.setDate(30),d.setMonth(d.getMonth()-m*g);let b=Aj(d,p)===-m;Cwe(o)&&g===1&&Aj(o,p)===1&&(b=!1);const S=m*(g-+b);return S===0?0:S}function Owe(e,r,s){const o=Swe(e,r)/1e3;return wwe(s?.roundingMethod)(o)}const kwe={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Rwe=(e,r,s)=>{let o;const d=kwe[e];return typeof d=="string"?o=d:r===1?o=d.one:o=d.other.replace("{{count}}",r.toString()),s?.addSuffix?s.comparison&&s.comparison>0?"in "+o:o+" ago":o};function bT(e){return(r={})=>{const s=r.width?String(r.width):e.defaultWidth;return e.formats[s]||e.formats[e.defaultWidth]}}const Twe={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},_we={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},$we={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Nwe={date:bT({formats:Twe,defaultWidth:"full"}),time:bT({formats:_we,defaultWidth:"full"}),dateTime:bT({formats:$we,defaultWidth:"full"})},Dwe={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Pwe=(e,r,s,o)=>Dwe[e];function mb(e){return(r,s)=>{const o=s?.context?String(s.context):"standalone";let d;if(o==="formatting"&&e.formattingValues){const m=e.defaultFormattingWidth||e.defaultWidth,g=s?.width?String(s.width):m;d=e.formattingValues[g]||e.formattingValues[m]}else{const m=e.defaultWidth,g=s?.width?String(s.width):e.defaultWidth;d=e.values[g]||e.values[m]}const p=e.argumentCallback?e.argumentCallback(r):r;return d[p]}}const Mwe={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Iwe={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},zwe={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Lwe={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Fwe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},qwe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Bwe=(e,r)=>{const s=Number(e),o=s%100;if(o>20||o<10)switch(o%10){case 1:return s+"st";case 2:return s+"nd";case 3:return s+"rd"}return s+"th"},Uwe={ordinalNumber:Bwe,era:mb({values:Mwe,defaultWidth:"wide"}),quarter:mb({values:Iwe,defaultWidth:"wide",argumentCallback:e=>e-1}),month:mb({values:zwe,defaultWidth:"wide"}),day:mb({values:Lwe,defaultWidth:"wide"}),dayPeriod:mb({values:Fwe,defaultWidth:"wide",formattingValues:qwe,defaultFormattingWidth:"wide"})};function gb(e){return(r,s={})=>{const o=s.width,d=o&&e.matchPatterns[o]||e.matchPatterns[e.defaultMatchWidth],p=r.match(d);if(!p)return null;const m=p[0],g=o&&e.parsePatterns[o]||e.parsePatterns[e.defaultParseWidth],b=Array.isArray(g)?Vwe(g,A=>A.test(m)):Kwe(g,A=>A.test(m));let S;S=e.valueCallback?e.valueCallback(b):b,S=s.valueCallback?s.valueCallback(S):S;const E=r.slice(m.length);return{value:S,rest:E}}}function Kwe(e,r){for(const s in e)if(Object.prototype.hasOwnProperty.call(e,s)&&r(e[s]))return s}function Vwe(e,r){for(let s=0;s<e.length;s++)if(r(e[s]))return s}function Hwe(e){return(r,s={})=>{const o=r.match(e.matchPattern);if(!o)return null;const d=o[0],p=r.match(e.parsePattern);if(!p)return null;let m=e.valueCallback?e.valueCallback(p[0]):p[0];m=s.valueCallback?s.valueCallback(m):m;const g=r.slice(d.length);return{value:m,rest:g}}}const Gwe=/^(\d+)(th|st|nd|rd)?/i,Xwe=/\d+/i,Ywe={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Zwe={any:[/^b/i,/^(a|c)/i]},Wwe={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Jwe={any:[/1/i,/2/i,/3/i,/4/i]},Qwe={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},e0e={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},t0e={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},n0e={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},r0e={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},s0e={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},i0e={ordinalNumber:Hwe({matchPattern:Gwe,parsePattern:Xwe,valueCallback:e=>parseInt(e,10)}),era:gb({matchPatterns:Ywe,defaultMatchWidth:"wide",parsePatterns:Zwe,defaultParseWidth:"any"}),quarter:gb({matchPatterns:Wwe,defaultMatchWidth:"wide",parsePatterns:Jwe,defaultParseWidth:"any",valueCallback:e=>e+1}),month:gb({matchPatterns:Qwe,defaultMatchWidth:"wide",parsePatterns:e0e,defaultParseWidth:"any"}),day:gb({matchPatterns:t0e,defaultMatchWidth:"wide",parsePatterns:n0e,defaultParseWidth:"any"}),dayPeriod:gb({matchPatterns:r0e,defaultMatchWidth:"any",parsePatterns:s0e,defaultParseWidth:"any"})},a0e={code:"en-US",formatDistance:Rwe,formatLong:Nwe,formatRelative:Pwe,localize:Uwe,match:i0e,options:{weekStartsOn:0,firstWeekContainsDate:1}};function o0e(e,r,s){const o=vwe(),d=s?.locale??o.locale??a0e,p=2520,m=Aj(e,r);if(isNaN(m))throw new RangeError("Invalid time value");const g=Object.assign({},s,{addSuffix:s?.addSuffix,comparison:m}),[b,S]=v$(s?.in,...m>0?[r,e]:[e,r]),E=Owe(S,b),A=(q3(S)-q3(b))/1e3,k=Math.round((E-A)/60);let T;if(k<2)return s?.includeSeconds?E<5?d.formatDistance("lessThanXSeconds",5,g):E<10?d.formatDistance("lessThanXSeconds",10,g):E<20?d.formatDistance("lessThanXSeconds",20,g):E<40?d.formatDistance("halfAMinute",0,g):E<60?d.formatDistance("lessThanXMinutes",1,g):d.formatDistance("xMinutes",1,g):k===0?d.formatDistance("lessThanXMinutes",1,g):d.formatDistance("xMinutes",k,g);if(k<45)return d.formatDistance("xMinutes",k,g);if(k<90)return d.formatDistance("aboutXHours",1,g);if(k<L3){const M=Math.round(k/60);return d.formatDistance("aboutXHours",M,g)}else{if(k<p)return d.formatDistance("xDays",1,g);if(k<fj){const M=Math.round(k/L3);return d.formatDistance("xDays",M,g)}else if(k<fj*2)return T=Math.round(k/fj),d.formatDistance("aboutXMonths",T,g)}if(T=Awe(S,b),T<12){const M=Math.round(k/fj);return d.formatDistance("xMonths",M,g)}else{const M=T%12,I=Math.trunc(T/12);return M<3?d.formatDistance("aboutXYears",I,g):M<9?d.formatDistance("overXYears",I,g):d.formatDistance("almostXYears",I+1,g)}}function l0e(e,r){return o0e(e,xwe(e),r)}const hB=["master","worker","bastion"],Oj=["pending","provisioning","ready","failed"],pB=Xs({hostname:zn().trim().max(60,"Max 60 chars"),public_ip_address:zn().trim().optional().or(Wb("")),private_ip_address:zn().trim().min(1,"Private IP address required"),role:Da(hB),ssh_key_id:w6("Pick a valid SSH key"),ssh_user:zn().trim().min(1,"SSH user is required"),status:Da(Oj).default("pending")}).refine(e=>e.role!=="bastion"||e.public_ip_address&&e.public_ip_address.trim()!=="",{message:"Public IP required for bastion",path:["public_ip_address"]}),c0e=pB.partial();function u0e({status:e}){const r=e==="ready"?"default":e==="provisioning"?"secondary":e==="failed"?"destructive":"outline";return u.jsx(rs,{variant:r,className:"capitalize",children:e})}const d0e=()=>{const[e,r]=R.useState(""),[s,o]=R.useState(!1),[d,p]=R.useState(!1),[m,g]=R.useState(null),[b,S]=R.useState(""),[E,A]=R.useState(""),[k,T]=R.useState(null),M=Hs(),I=rr({queryKey:["servers"],queryFn:()=>hg.listServers()}),q=rr({queryKey:["ssh_keys"],queryFn:()=>eg.listSshKeys()}),G=R.useMemo(()=>{const fe=new Map;for(const He of q.data??[]){const Oe=He.name?He.name:"Unnamed key",ke=He.fingerprint?el(He.fingerprint,8):"";fe.set(He.id,ke?`${Oe} — ${ke}`:Oe)}return fe},[q.data]),K=mr({resolver:gr(pB),defaultValues:{hostname:"",private_ip_address:"",public_ip_address:"",role:"worker",ssh_key_id:"",ssh_user:"",status:"pending"},mode:"onChange"}),z=ug({control:K.control,name:"role"})==="bastion",oe=ug({control:K.control,name:"public_ip_address"})?.trim()??"",Q=z&&oe==="",ne=nn({mutationFn:fe=>hg.createServer(fe),onSuccess:async()=>{await M.invalidateQueries({queryKey:["servers"]}),K.reset(),o(!1),Ze.success("Server created successfully")},onError:fe=>{Ze.error(fe?.message??"Failed to create server")}}),de=mr({resolver:gr(c0e),defaultValues:{},mode:"onChange"}),Ce=ug({control:de.control,name:"role"}),xe=ug({control:de.control,name:"public_ip_address"}),le=Ce==="bastion",be=xe?.trim()??"",je=le&&be==="",Ke=nn({mutationFn:({id:fe,values:He})=>hg.updateServer(fe,He),onSuccess:async()=>{await M.invalidateQueries({queryKey:["servers"]}),p(!1),T(null),Ze.success("Server updated successfully")},onError:fe=>{Ze.error(fe?.message??"Failed to update server")}}),ce=nn({mutationFn:fe=>hg.deleteServer(fe),onSuccess:async()=>{await M.invalidateQueries({queryKey:["servers"]}),g(null),Ze.success("Server deleted successfully")},onError:fe=>{Ze.error(fe?.message??"Failed to delete server")}}),re=R.useMemo(()=>{const fe=I.data??[],He=e.trim().toLowerCase(),Oe=He?fe.filter(ie=>ie.hostname?.toLowerCase().includes(He)||ie.public_ip_address?.toLowerCase().includes(He)||ie.private_ip_address?.toLowerCase().includes(He)||ie.role?.toLowerCase().includes(He)||ie.ssh_user?.toLowerCase().includes(He)):fe,ke=E?Oe.filter(ie=>ie.role===E):Oe;return b?ke.filter(ie=>ie.status===b):ke},[e,E,b,I.data]),ue=fe=>{ne.mutate(fe)},_e=fe=>{T(fe.id),de.reset({hostname:fe.hostname??"",public_ip_address:fe.public_ip_address??"",private_ip_address:fe.private_ip_address??"",role:fe.role??"worker",ssh_key_id:fe.ssh_key_id??"",ssh_user:fe.ssh_user??"",status:fe.status??"pending"}),p(!0)};return q.data?.length===0?u.jsx("div",{className:"p-6",children:"Please create an SSH key for your organization first."}):I.isLoading?u.jsx("div",{className:"p-6",children:"Loading servers…"}):I.error?u.jsx("div",{className:"p-6 text-red-500",children:"Error loading servers."}):u.jsxs(iw,{children:[u.jsxs("div",{className:"space-y-4 p-6",children:[u.jsxs("div",{className:"flex flex-col gap-3 md:flex-row md:items-center md:justify-between",children:[u.jsx("h1",{className:"mb-4 text-2xl font-bold",children:"Servers"}),u.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[u.jsxs("div",{className:"relative",children:[u.jsx(Pa,{className:"absolute top-2.5 left-2 h-4 w-4 opacity-60"}),u.jsx(xt,{value:e,onChange:fe=>r(fe.target.value),placeholder:"Search hostname, Public IP, Private IP, role, user…",className:"w-64 pl-8"})]}),u.jsxs(Rn,{value:E||"all",onValueChange:fe=>A(fe==="all"?"":fe),children:[u.jsx(_n,{className:"w-36",children:u.jsx(Tn,{placeholder:"Role (all)"})}),u.jsxs($n,{children:[u.jsx(jt,{value:"all",children:"All roles"}),hB.map(fe=>u.jsx(jt,{value:fe,children:fe},fe))]})]}),u.jsxs(Rn,{value:b||"all",onValueChange:fe=>S(fe==="all"?"":fe),children:[u.jsx(_n,{className:"w-40",children:u.jsx(Tn,{placeholder:"Status (all)"})}),u.jsxs($n,{children:[u.jsx(jt,{value:"all",children:"All statuses"})," ",Oj.map(fe=>u.jsx(jt,{value:fe,children:fe},fe))]})]}),u.jsxs(fn,{open:s,onOpenChange:o,children:[u.jsx(Li,{asChild:!0,children:u.jsxs(Fe,{onClick:()=>o(!0),children:[u.jsx(lo,{className:"mr-2 h-4 w-4"}),"Create Server"]})}),u.jsxs(mn,{className:"sm:max-w-lg",children:[u.jsx(gn,{children:u.jsx(yn,{children:"Create server"})}),u.jsx(yr,{...K,children:u.jsxs("form",{className:"space-y-4",onSubmit:K.handleSubmit(ue),children:[u.jsx(yt,{control:K.control,name:"hostname",render:({field:fe})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Hostname"}),u.jsx(wt,{children:u.jsx(xt,{placeholder:"worker-01",...fe})}),u.jsx(mt,{})]})}),u.jsxs("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2",children:[u.jsx(yt,{control:K.control,name:"public_ip_address",render:({field:fe})=>u.jsxs(lt,{children:[u.jsxs(ct,{className:"flex items-center justify-between",children:[u.jsx("span",{children:"Public IP Address"}),u.jsx("span",{className:ht("rounded-full px-2 py-0.5 text-xs",z?"bg-amber-100 text-amber-900":"bg-muted text-muted-foreground"),children:z?"Required for bastion":"Optional"})]}),u.jsx(wt,{children:u.jsx(xt,{placeholder:z?"Required for bastion (e.g. 34.12.56.78)":"34.12.56.78","aria-required":z,"aria-invalid":Q||!!K.formState.errors.public_ip_address,required:z,...fe,className:ht(Q&&"border-destructive focus-visible:ring-destructive")})}),z&&u.jsxs("div",{className:"rounded-md border border-amber-200 bg-amber-50 p-2 text-xs text-amber-900",children:["Bastion nodes must have a"," ",u.jsx("span",{className:"font-medium",children:"Public IP"}),"."]}),u.jsx(mt,{})]})}),u.jsx(yt,{control:K.control,name:"private_ip_address",render:({field:fe})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Private IP Address"}),u.jsx(wt,{children:u.jsx(xt,{placeholder:"192.168.10.1",...fe})}),u.jsx(mt,{})]})})]}),u.jsxs("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2",children:[u.jsx(yt,{control:K.control,name:"role",render:({field:fe})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Role"}),u.jsxs(Rn,{onValueChange:He=>K.setValue("role",He,{shouldDirty:!0,shouldValidate:!0}),value:fe.value,children:[u.jsx(wt,{children:u.jsx(_n,{children:u.jsx(Tn,{placeholder:"Select role"})})}),u.jsxs($n,{children:[u.jsx(jt,{value:"master",children:"master"}),u.jsx(jt,{value:"worker",children:"worker"}),u.jsx(jt,{value:"bastion",children:"bastion — requires Public IP"})]})]}),u.jsx(mt,{})]})}),u.jsx(yt,{control:K.control,name:"ssh_user",render:({field:fe})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"SSH user"}),u.jsx(wt,{children:u.jsx(xt,{placeholder:"ubuntu",...fe})}),u.jsx(mt,{})]})})]}),u.jsx(yt,{control:K.control,name:"ssh_key_id",render:({field:fe})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"SSH key"}),u.jsxs(Rn,{onValueChange:fe.onChange,value:fe.value,children:[u.jsx(wt,{children:u.jsx(_n,{children:u.jsx(Tn,{placeholder:q.data?.length?"Select SSH key":"No SSH keys found"})})}),u.jsx($n,{children:q.data.map(He=>u.jsxs(jt,{value:He.id,children:[He.name?He.name:"Unnamed key"," —"," ",el(He.fingerprint,8)]},He.id))})]}),u.jsx(mt,{})]})}),u.jsx(yt,{control:K.control,name:"status",render:({field:fe})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Initial status"}),u.jsxs(Rn,{onValueChange:fe.onChange,value:fe.value,children:[u.jsx(wt,{children:u.jsx(_n,{children:u.jsx(Tn,{placeholder:"pending"})})}),u.jsx($n,{children:Oj.map(He=>u.jsx(jt,{value:He,children:He},He))})]}),u.jsx(mt,{})]})}),u.jsxs(Sn,{className:"gap-2",children:[u.jsx(Fe,{type:"button",variant:"outline",onClick:()=>o(!1),children:"Cancel"}),u.jsx(Fe,{type:"submit",disabled:ne.isPending||K.formState.isSubmitting||!K.formState.isValid,children:ne.isPending?"Creating…":"Create"})]})]})})]})]})]})]}),u.jsx("div",{className:"bg-background overflow-hidden rounded-2xl border shadow-sm",children:u.jsx("div",{className:"overflow-x-auto",children:u.jsxs(Fi,{children:[u.jsx(qi,{children:u.jsxs(an,{children:[u.jsx(At,{children:"Hostname"}),u.jsx(At,{children:"IP address"}),u.jsx(At,{children:"Role"}),u.jsx(At,{children:"SSH user"}),u.jsx(At,{children:"SSH key"}),u.jsx(At,{children:"Status"}),u.jsx(At,{children:"Created"}),u.jsx(At,{className:"w-[220px] text-right",children:"Actions"})]})}),u.jsx(Bi,{children:re.length===0?u.jsx(an,{children:u.jsx(vt,{colSpan:8,className:"text-muted-foreground py-10 text-center text-sm",children:"No servers found."})}):re.map(fe=>u.jsxs(an,{children:[u.jsx(vt,{className:"font-medium",children:fe.hostname}),u.jsx(vt,{children:u.jsxs("div",{className:"flex flex-col",children:[u.jsx("span",{className:ht("tabular-nums",!fe.public_ip_address&&"text-muted-foreground"),children:fe.public_ip_address||"—"}),u.jsx("span",{className:"text-muted-foreground tabular-nums",children:fe.private_ip_address})]})}),u.jsx(vt,{className:"capitalize",children:u.jsx("span",{className:ht(fe.role==="bastion"&&"rounded bg-amber-50 px-2 py-0.5 dark:bg-amber-900"),children:fe.role})}),u.jsx(vt,{className:"tabular-nums",children:fe.ssh_user}),u.jsx(vt,{className:"truncate",children:G.get(fe.ssh_key_id)??"—"}),u.jsx(vt,{children:u.jsx(u0e,{status:fe.status??"pending"})}),u.jsx(vt,{title:fe.created_at,children:fe.created_at?`${l0e(new Date(fe.created_at),{addSuffix:!0})}`:"—"}),u.jsx(vt,{className:"text-right",children:u.jsxs("div",{className:"flex justify-end gap-2",children:[u.jsx(Fe,{variant:"outline",size:"sm",onClick:()=>_e(fe),children:"Edit"}),u.jsx(Fe,{variant:"destructive",size:"sm",onClick:()=>g(fe.id),disabled:ce.isPending&&m===fe.id,children:ce.isPending&&m===fe.id?"Deleting…":"Delete"})]})})]},fe.id))})]})})})]}),u.jsx(fn,{open:d,onOpenChange:p,children:u.jsxs(mn,{className:"sm:max-w-lg",children:[u.jsx(gn,{children:u.jsx(yn,{children:"Edit server"})}),u.jsx(yr,{...de,children:u.jsxs("form",{className:"space-y-4",onSubmit:de.handleSubmit(fe=>{k&&Ke.mutate({id:k,values:fe})}),children:[u.jsx(yt,{control:de.control,name:"hostname",render:({field:fe})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Hostname"}),u.jsx(wt,{children:u.jsx(xt,{placeholder:"worker-01",...fe})}),u.jsx(mt,{})]})}),u.jsxs("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2",children:[u.jsx(yt,{control:de.control,name:"public_ip_address",render:({field:fe})=>u.jsxs(lt,{children:[u.jsxs(ct,{className:"flex items-center justify-between",children:[u.jsx("span",{children:"Public IP Address"}),u.jsx("span",{className:ht("rounded-full px-2 py-0.5 text-xs",le?"bg-amber-100 text-amber-900":"bg-muted text-muted-foreground"),children:le?"Required for bastion":"Optional"})]}),u.jsx(wt,{children:u.jsx(xt,{placeholder:le?"Required for bastion (e.g. 34.12.56.78)":"34.12.56.78","aria-required":le,"aria-invalid":je||!!de.formState.errors.public_ip_address,required:le,...fe,className:ht(je&&"border-destructive focus-visible:ring-destructive")})}),le&&u.jsxs("div",{className:"rounded-md border border-amber-200 bg-amber-50 p-2 text-xs text-amber-900",children:["Bastion nodes must have a ",u.jsx("span",{className:"font-medium",children:"Public IP"}),"."]}),u.jsx(mt,{})]})}),u.jsx(yt,{control:de.control,name:"private_ip_address",render:({field:fe})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Private IP Address"}),u.jsx(wt,{children:u.jsx(xt,{placeholder:"192.168.10.1",...fe})}),u.jsx(mt,{})]})})]}),u.jsxs("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2",children:[u.jsx(yt,{control:de.control,name:"role",render:({field:fe})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Role"}),u.jsxs(Rn,{onValueChange:He=>de.setValue("role",He,{shouldDirty:!0,shouldValidate:!0}),value:fe.value,children:[u.jsx(wt,{children:u.jsx(_n,{children:u.jsx(Tn,{placeholder:"Select role"})})}),u.jsxs($n,{children:[u.jsx(jt,{value:"master",children:"master"}),u.jsx(jt,{value:"worker",children:"worker"}),u.jsx(jt,{value:"bastion",children:"bastion — requires Public IP"})]})]}),u.jsx(mt,{})]})}),u.jsx(yt,{control:de.control,name:"ssh_user",render:({field:fe})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"SSH user"}),u.jsx(wt,{children:u.jsx(xt,{placeholder:"ubuntu",...fe})}),u.jsx(mt,{})]})})]}),u.jsx(yt,{control:de.control,name:"ssh_key_id",render:({field:fe})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"SSH key"}),u.jsxs(Rn,{onValueChange:fe.onChange,value:fe.value,children:[u.jsx(wt,{children:u.jsx(_n,{children:u.jsx(Tn,{placeholder:"Select SSH key"})})}),u.jsx($n,{children:q.data.map(He=>u.jsxs(jt,{value:He.id,children:[He.name?He.name:"Unnamed key"," — ",el(He.fingerprint,8)]},He.id))})]}),u.jsx(mt,{})]})}),u.jsx(yt,{control:de.control,name:"status",render:({field:fe})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Status"}),u.jsxs(Rn,{onValueChange:fe.onChange,value:fe.value,children:[u.jsx(wt,{children:u.jsx(_n,{children:u.jsx(Tn,{placeholder:"pending"})})}),u.jsx($n,{children:Oj.map(He=>u.jsx(jt,{value:He,children:He},He))})]}),u.jsx(mt,{})]})}),u.jsxs(Sn,{className:"gap-2",children:[u.jsx(Fe,{type:"button",variant:"outline",onClick:()=>p(!1),children:"Cancel"}),u.jsx(Fe,{type:"submit",disabled:Ke.isPending,children:Ke.isPending?"Saving…":"Save changes"})]})]})})]})}),u.jsx(fn,{open:!!m,onOpenChange:fe=>!fe&&g(null),children:u.jsxs(mn,{className:"sm:max-w-md",children:[u.jsx(gn,{children:u.jsx(yn,{children:"Delete server"})}),u.jsx("p",{className:"text-muted-foreground text-sm",children:"This action cannot be undone. Are you sure you want to delete this server?"}),u.jsxs(Sn,{className:"gap-2",children:[u.jsx(Fe,{variant:"outline",onClick:()=>g(null),children:"Cancel"}),u.jsx(Fe,{variant:"destructive",onClick:()=>m&&ce.mutate(m),disabled:ce.isPending,children:ce.isPending?"Deleting…":"Delete"})]})]})})]})},h0e=Xs({name:zn().trim().min(1,"Name is required").max(100,"Max 100 characters"),comment:zn().trim().min(1,"Comment is required").max(100,"Max 100 characters"),bits:Da(["2048","3072","4096"]).optional(),type:Da(["rsa","ed25519"]).optional()});function p0e(e,r){const s=URL.createObjectURL(e),o=document.createElement("a");o.href=s,o.download=r,document.body.appendChild(o),o.click(),o.remove(),URL.revokeObjectURL(s)}function wT(e,r="Copied"){navigator.clipboard.writeText(e).then(()=>Ze.success(r)).catch(()=>Ze.error("Copy failed"))}function f0e(e){return e?.split(/\s+/)?.[0]??"ssh-key"}const m0e=()=>{const[e,r]=R.useState(""),[s,o]=R.useState(!1),[d,p]=R.useState(null),[m,g]=R.useState(null),b=Hs(),S=rr({queryKey:["ssh"],queryFn:()=>eg.listSshKeys()}),E=mr({resolver:gr(h0e),defaultValues:{name:"",comment:"",type:"rsa",bits:"4096"}}),A=ug({control:E.control,name:"type"}),k=nn({mutationFn:async q=>{const G={name:q.name,comment:q.comment,bits:q.type==="rsa"&&q.bits?Number(q.bits):void 0,type:q.type};return await eg.createSshKey(G)},onSuccess:()=>{b.invalidateQueries({queryKey:["ssh"]}),o(!1),E.reset({name:"",comment:"",type:"rsa",bits:"4096"}),Ze.success("SSH Key created")},onError:q=>Ze.error(q?.message??"SSH Key creation failed")}),T=nn({mutationFn:q=>eg.revealSshKeyById(q),onSuccess:q=>p(q),onError:q=>Ze.error(q?.message??"Failed to reveal key")}),M=nn({mutationFn:q=>eg.deleteSshKey(q),onSuccess:async()=>{await b.invalidateQueries({queryKey:["ssh"]}),g(null),Ze.success("SSH Key deleted")},onError:q=>Ze.error(q?.message??"Delete failed")}),I=R.useMemo(()=>{const q=e.trim().toLowerCase();return q?(S.data??[]).filter(G=>G.name?.toLowerCase().includes(q)||G.fingerprint?.toLowerCase().includes(q)||G.public_key?.toLowerCase().includes(q)):S.data??[]},[e,S.data]);return S.isLoading?u.jsx("div",{className:"p-6",children:"Loading SSH Keys…"}):S.error?u.jsx("div",{className:"p-6 text-red-500",children:"Error Loading SSH Keys"}):u.jsx(iw,{children:u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{className:"flex items-center justify-between gap-3",children:[u.jsx("h1",{className:"text-2xl font-bold",children:"SSH Keys"}),u.jsx("div",{className:"w-full max-w-sm",children:u.jsx(xt,{value:e,onChange:q=>r(q.target.value),placeholder:"Search by name, fingerprint or key"})}),u.jsxs(fn,{open:s,onOpenChange:o,children:[u.jsx(Li,{asChild:!0,children:u.jsxs(Fe,{onClick:()=>o(!0),children:[u.jsx(lo,{className:"mr-2 h-4 w-4"}),"Create New Keypair"]})}),u.jsxs(mn,{className:"sm:max-w-lg",children:[u.jsx(gn,{children:u.jsx(yn,{children:"Create SSH Keypair"})}),u.jsx(yr,{...E,children:u.jsxs("form",{onSubmit:E.handleSubmit(q=>k.mutate(q)),className:"space-y-4",children:[u.jsx(yt,{control:E.control,name:"name",render:({field:q})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Name"}),u.jsx(wt,{children:u.jsx(xt,{placeholder:"e.g., CI deploy key",...q})}),u.jsx(mt,{})]})}),u.jsx(yt,{control:E.control,name:"comment",render:({field:q})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Comment"}),u.jsx(wt,{children:u.jsx(xt,{placeholder:"e.g., deploy@autoglue",...q})}),u.jsx(mt,{})]})}),u.jsx(yt,{control:E.control,name:"type",render:({field:q})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Type"}),u.jsx(wt,{children:u.jsxs(Rn,{value:q.value,onValueChange:G=>{q.onChange(G),G==="ed25519"?E.setValue("bits",void 0):E.setValue("bits","4096")},children:[u.jsx(_n,{className:"w-[180px]",children:u.jsx(Tn,{placeholder:"Select a ssh key type"})}),u.jsxs($n,{children:[u.jsx(jt,{value:"rsa",children:"RSA"}),u.jsx(jt,{value:"ed25519",children:"ED25519"})]})]})}),u.jsx(mt,{})]})}),u.jsx(yt,{control:E.control,name:"bits",render:({field:q})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Key size"}),u.jsx(wt,{children:u.jsxs(Rn,{value:q.value,disabled:A==="ed25519",onValueChange:q.onChange,children:[u.jsx(_n,{className:"w-[180px]",children:u.jsx(Tn,{placeholder:"RSA only"})}),u.jsxs($n,{children:[u.jsx(jt,{value:"2048",children:"2048"}),u.jsx(jt,{value:"3072",children:"3072"}),u.jsx(jt,{value:"4096",children:"4096"})]})]})}),u.jsx(mt,{})]})}),u.jsxs(Sn,{className:"gap-2",children:[u.jsx(Fe,{type:"button",variant:"outline",onClick:()=>o(!1),disabled:k.isPending,children:"Cancel"}),u.jsx(Fe,{type:"submit",disabled:k.isPending,children:k.isPending?u.jsxs(u.Fragment,{children:[u.jsx(Ds,{className:"mr-2 h-4 w-4 animate-spin"}),"Creating…"]}):"Create"})]})]})})]})]})]}),u.jsx("div",{className:"bg-background overflow-hidden rounded-2xl border shadow-sm",children:u.jsx("div",{className:"overflow-x-auto",children:u.jsxs(Fi,{children:[u.jsx(qi,{children:u.jsxs(an,{children:[u.jsx(At,{children:"Name"}),u.jsx(At,{children:"Public Key"}),u.jsx(At,{children:"Fingerprint"}),u.jsx(At,{children:"Created"}),u.jsx(At,{className:"w-[160px] text-right",children:"Actions"})]})}),u.jsxs(Bi,{children:[I.map(q=>{const G=f0e(q.public_key);return u.jsxs(an,{children:[u.jsx(vt,{className:"font-medium",children:q.name||"—"}),u.jsx(vt,{children:u.jsxs(zj,{children:[u.jsx(Lj,{asChild:!0,children:u.jsx(rs,{variant:"secondary",className:"whitespace-nowrap",children:G})}),u.jsx(Fj,{className:"max-w-[70vw]",children:u.jsx("div",{className:"max-w-full",children:u.jsx("p",{className:"font-mono text-xs break-all",children:q.public_key})})})]})}),u.jsx(vt,{className:"font-mono text-xs",children:q.fingerprint}),u.jsx(vt,{children:q.created_at?new Date(q.created_at).toLocaleString(void 0,{year:"numeric",month:"short",day:"2-digit",hour:"2-digit",minute:"2-digit"}):"—"}),u.jsxs(vt,{className:"space-x-2 text-right",children:[u.jsx(Fe,{size:"sm",variant:"outline",onClick:()=>wT(q.public_key??"","Public key copied"),children:"Copy Pub"}),u.jsx(Fe,{size:"sm",variant:"outline",onClick:()=>wT(q.fingerprint??"","Fingerprint copied"),children:"Copy FP"}),u.jsxs(Fe,{size:"sm",variant:"outline",onClick:()=>T.mutate(q.id),children:[u.jsx(kT,{className:"mr-1 h-4 w-4"}),"Reveal"]}),u.jsxs(Fe,{size:"sm",variant:"outline",onClick:async()=>{try{const{filename:K,blob:X}=await eg.downloadBlob(q.id,"both");p0e(X,K)}catch(K){Ze.error(K?.message??"Download failed")}},children:[u.jsx(MZ,{className:"mr-1 h-4 w-4"}),"Download"]}),u.jsxs(Fe,{size:"sm",variant:"destructive",onClick:()=>g(q.id),children:[u.jsx(zb,{className:"mr-1 h-4 w-4"}),"Delete"]})]})]},q.id)}),I.length===0&&u.jsx(an,{children:u.jsx(vt,{colSpan:5,className:"text-muted-foreground py-10 text-center",children:"No SSH Keys"})})]})]})})}),u.jsx(fn,{open:!!d,onOpenChange:q=>!q&&p(null),children:u.jsxs(mn,{className:"sm:max-w-2xl",children:[u.jsx(gn,{children:u.jsx(yn,{children:"Private Key (read-only)"})}),u.jsx("div",{className:"space-y-3",children:u.jsxs("div",{className:"text-sm",children:[u.jsx("div",{className:"font-medium",children:d?.name??"SSH key"}),u.jsx("div",{className:"text-muted-foreground font-mono text-xs",children:d?.fingerprint}),u.jsx(hu,{readOnly:!0,className:"h-64 w-full rounded-md border p-3 font-mono text-xs",value:d?.private_key??""}),u.jsx("div",{className:"flex justify-end",children:u.jsx(Fe,{onClick:()=>d?.private_key&&wT(d.private_key,"Private key copied"),children:"Copy"})})]})})]})}),u.jsx(fn,{open:!!m,onOpenChange:q=>!q&&g(null),children:u.jsxs(mn,{className:"sm:max-w-md",children:[u.jsx(gn,{children:u.jsx(yn,{children:"Delete SSH Key"})}),u.jsx("p",{className:"text-muted-foreground text-sm",children:"This will permanently delete the keypair. This action cannot be undone."}),u.jsxs(Sn,{className:"gap-2",children:[u.jsx(Fe,{variant:"outline",onClick:()=>g(null),children:"Cancel"}),u.jsx(Fe,{variant:"destructive",onClick:()=>m&&M.mutate(m),disabled:M.isPending,children:M.isPending?u.jsxs(u.Fragment,{children:[u.jsx(Ds,{className:"mr-2 h-4 w-4 animate-spin"}),"Deleting…"]}):"Delete"})]})]})})]})})},k_=["NoSchedule","PreferNoSchedule","NoExecute"],fB=Xs({key:zn().trim().min(1,"Key is required").max(120,"Max 120 chars"),value:zn().trim().optional(),effect:Da(k_)}),g0e=fB.partial();function y0e({t:e}){const r=`${e.key}${e.value?`=${e.value}`:""}${e.effect?`:${e.effect}`:""}`;return u.jsxs(rs,{variant:"secondary",className:"font-mono text-xs",children:[u.jsx(gC,{className:"mr-1 h-3 w-3"}),r]})}const v0e=()=>{const[e,r]=R.useState(""),[s,o]=R.useState(!1),[d,p]=R.useState(!1),[m,g]=R.useState(null),[b,S]=R.useState(null),E=Hs(),A=rr({queryKey:["taints"],queryFn:()=>Rb.listTaints()}),k=mr({resolver:gr(fB),defaultValues:{key:"",value:"",effect:void 0}}),T=nn({mutationFn:z=>Rb.createTaint(z),onSuccess:async()=>{await E.invalidateQueries({queryKey:["taints"]}),k.reset(),o(!1),Ze.success("Taint Created Successfully.")},onError:z=>{Ze.error(z.message??"There was an error while creating Taint")}}),M=z=>{T.mutate(z)},I=mr({resolver:gr(g0e),defaultValues:{}}),q=nn({mutationFn:({id:z,values:ee})=>Rb.updateTaint(z,ee),onSuccess:async()=>{await E.invalidateQueries({queryKey:["taints"]}),I.reset(),p(!1),Ze.success("Taint Updated Successfully.")},onError:z=>{Ze.error(z.message??"There was an error while updating Taint")}}),G=z=>{S(z.id),I.reset({key:z.key,value:z.value,effect:z.effect}),p(!0)},K=nn({mutationFn:z=>Rb.deleteTaint(z),onSuccess:async()=>{await E.invalidateQueries({queryKey:["taints"]}),g(null),Ze.success("Taint Deleted Successfully.")},onError:z=>{Ze.error(z.message??"There was an error while deleting Taint")}}),X=R.useMemo(()=>{const z=A.data??[],ee=e.trim().toLowerCase();return ee?z.filter(oe=>oe.key?.toLowerCase().includes(ee)||oe.value?.toLowerCase().includes(ee)||oe.effect?.toLowerCase().includes(ee)):z},[e,A.data]);return A.isLoading?u.jsx("div",{className:"p-6",children:"Loading taints…"}):A.error?u.jsx("div",{className:"p-6 text-red-500",children:"Error loading taints."}):u.jsxs("div",{className:"space-y-4 p-6",children:[u.jsxs("div",{className:"flex flex-col gap-3 md:flex-row md:items-center md:justify-between",children:[u.jsx("h1",{className:"mb-4 text-2xl font-bold",children:"Taints"}),u.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[u.jsxs("div",{className:"relative",children:[u.jsx(Pa,{className:"absolute top-2.5 left-2 h-4 w-4 opacity-60"}),u.jsx(xt,{value:e,onChange:z=>r(z.target.value),placeholder:"Search taints",className:"w-64 pl-8"})]}),u.jsxs(fn,{open:s,onOpenChange:o,children:[u.jsx(Li,{asChild:!0,children:u.jsxs(Fe,{onClick:()=>o(!0),children:[u.jsx(lo,{className:"mr-2 h-4 w-4"})," Create Taint"]})}),u.jsxs(mn,{className:"sm:max-w-lg",children:[u.jsx(gn,{children:u.jsx(yn,{children:"Create taint"})}),u.jsx(yr,{...k,children:u.jsxs("form",{className:"space-y-4",onSubmit:k.handleSubmit(M),children:[u.jsx(yt,{control:k.control,name:"key",render:({field:z})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Key"}),u.jsx(wt,{children:u.jsx(xt,{placeholder:"dedicated",...z})}),u.jsx(mt,{})]})}),u.jsx(yt,{control:k.control,name:"value",render:({field:z})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Value (optional)"}),u.jsx(wt,{children:u.jsx(xt,{placeholder:"gpu",...z})}),u.jsx(mt,{})]})}),u.jsx(yt,{control:k.control,name:"effect",render:({field:z})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Effect"}),u.jsxs(Rn,{onValueChange:z.onChange,value:z.value,children:[u.jsx(wt,{children:u.jsx(_n,{children:u.jsx(Tn,{placeholder:"Select effect"})})}),u.jsx($n,{children:k_.map(ee=>u.jsx(jt,{value:ee,children:ee},ee))})]}),u.jsx(mt,{})]})}),u.jsxs(Sn,{className:"gap-2",children:[u.jsx(Fe,{type:"button",variant:"outline",onClick:()=>o(!1),children:"Cancel"}),u.jsx(Fe,{type:"submit",disabled:k.formState.isSubmitting,children:k.formState.isSubmitting?"Creating…":"Create"})]})]})})]})]})]})]}),u.jsx("div",{className:"bg-background overflow-hidden rounded-2xl border shadow-sm",children:u.jsx("div",{className:"overflow-x-auto",children:u.jsxs(Fi,{children:[u.jsx(qi,{children:u.jsxs(an,{children:[u.jsx(At,{children:"Taint"}),u.jsx(At,{className:"w-[180px] text-right",children:"Actions"})]})}),u.jsxs(Bi,{children:[X.map(z=>u.jsxs(an,{children:[u.jsx(vt,{children:u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(y0e,{t:z}),u.jsx("code",{className:"text-muted-foreground text-xs",children:el(z.id,6)})]})}),u.jsx(vt,{children:u.jsxs("div",{className:"flex justify-end gap-2",children:[u.jsxs(Fe,{variant:"outline",size:"sm",onClick:()=>G(z),children:[u.jsx(pu,{className:"mr-2 h-4 w-4"})," Edit"]}),u.jsx(Fe,{variant:"destructive",size:"sm",onClick:()=>g(z.id),disabled:K.isPending&&m===z.id,children:K.isPending&&m===z.id?"Deleting…":"Delete"})]})})]},z.id)),X.length===0&&u.jsx(an,{children:u.jsxs(vt,{colSpan:3,className:"text-muted-foreground py-10 text-center",children:[u.jsx(ew,{className:"mx-auto mb-2 h-6 w-6 opacity-60"}),"No taints match your search."]})})]})]})})}),u.jsx(fn,{open:d,onOpenChange:p,children:u.jsxs(mn,{className:"sm:max-w-lg",children:[u.jsx(gn,{children:u.jsx(yn,{children:"Edit taint"})}),u.jsx(yr,{...I,children:u.jsxs("form",{className:"space-y-4",onSubmit:I.handleSubmit(z=>{b&&q.mutate({id:b,values:z})}),children:[u.jsx(yt,{control:I.control,name:"key",render:({field:z})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Key"}),u.jsx(wt,{children:u.jsx(xt,{placeholder:"dedicated",...z})}),u.jsx(mt,{})]})}),u.jsx(yt,{control:I.control,name:"value",render:({field:z})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Value (optional)"}),u.jsx(wt,{children:u.jsx(xt,{placeholder:"gpu",...z})}),u.jsx(mt,{})]})}),u.jsx(yt,{control:I.control,name:"effect",render:({field:z})=>u.jsxs(lt,{children:[u.jsx(ct,{children:"Effect"}),u.jsxs(Rn,{onValueChange:z.onChange,value:z.value,children:[u.jsx(wt,{children:u.jsx(_n,{children:u.jsx(Tn,{placeholder:"Select effect"})})}),u.jsx($n,{children:k_.map(ee=>u.jsx(jt,{value:ee,children:ee},ee))})]}),u.jsx(mt,{})]})}),u.jsxs(Sn,{className:"gap-2",children:[u.jsx(Fe,{type:"button",variant:"outline",onClick:()=>p(!1),children:"Cancel"}),u.jsx(Fe,{type:"submit",disabled:q.isPending,children:q.isPending?"Saving…":"Save changes"})]})]})})]})}),u.jsx(fn,{open:!!m,onOpenChange:z=>!z&&g(null),children:u.jsxs(mn,{className:"sm:max-w-md",children:[u.jsx(gn,{children:u.jsx(yn,{children:"Delete taint"})}),u.jsx("p",{className:"text-muted-foreground text-sm",children:"This action cannot be undone. Are you sure you want to delete this taint?"}),u.jsxs(Sn,{className:"gap-2",children:[u.jsx(Fe,{variant:"outline",onClick:()=>g(null),children:"Cancel"}),u.jsx(Fe,{variant:"destructive",onClick:()=>m&&K.mutate(m),disabled:K.isPending,children:K.isPending?"Deleting…":"Delete"})]})]})})]})};function x0e(){return u.jsxs(mY,{children:[u.jsx(ps,{path:"/login",element:u.jsx(M3,{})}),u.jsx(ps,{path:"/docs",element:u.jsx(Fbe,{})}),u.jsx(ps,{element:u.jsx($he,{}),children:u.jsxs(ps,{element:u.jsx(The,{}),children:[u.jsx(ps,{path:"/me",element:u.jsx(awe,{})}),u.jsx(ps,{path:"/org/settings",element:u.jsx(mwe,{})}),u.jsx(ps,{path:"/org/members",element:u.jsx(pwe,{})}),u.jsx(ps,{path:"/org/api-keys",element:u.jsx(dwe,{})}),u.jsx(ps,{path:"/ssh",element:u.jsx(m0e,{})}),u.jsx(ps,{path:"/servers",element:u.jsx(d0e,{})}),u.jsx(ps,{path:"/taints",element:u.jsx(v0e,{})}),u.jsx(ps,{path:"/labels",element:u.jsx(Ybe,{})}),u.jsx(ps,{path:"/annotations",element:u.jsx(yye,{})}),u.jsx(ps,{path:"/node-pools",element:u.jsx(cwe,{})}),u.jsx(ps,{path:"/credentials",element:u.jsx(_be,{})}),u.jsx(ps,{path:"/dns",element:u.jsx(zbe,{})}),u.jsx(ps,{path:"/load-balancers",element:u.jsx(Jbe,{})}),u.jsx(ps,{path:"/clusters",element:u.jsx(yve,{})}),u.jsx(ps,{path:"/admin/jobs",element:u.jsx(Kbe,{})})]})}),u.jsx(ps,{path:"*",element:u.jsx(M3,{})})]})}pJ.createRoot(document.getElementById("root")).render(u.jsx(R.StrictMode,{children:u.jsx(gY,{children:u.jsx(lJ,{children:u.jsx(x0e,{})})})}));
|
||
//# sourceMappingURL=index-BRRMZeeQ.js.map
|