@zuplo/editor 1.0.18287807713-dev → 1.0.18288435022-dev

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/static/js/local-worker-D9T8NcSk.js","/static/js/main-Dd-HTlVJ.js","/static/css/main-BHHEkZna.css"])))=>i.map(i=>d[i]);
2
- var Cxe=Object.defineProperty;var S5=e=>{throw TypeError(e)};var Axe=(e,t,n)=>t in e?Cxe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Xe=(e,t,n)=>Axe(e,typeof t!="symbol"?t+"":t,n),jP=(e,t,n)=>t.has(e)||S5("Cannot "+n);var W=(e,t,n)=>(jP(e,t,"read from private field"),n?n.call(e):t.get(e)),Ze=(e,t,n)=>t.has(e)?S5("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),De=(e,t,n,r)=>(jP(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),ke=(e,t,n)=>(jP(e,t,"access private method"),n);var Ub=(e,t,n,r)=>({set _(i){De(e,t,i,n)},get _(){return W(e,t,r)}});import{r as x,j as p,a as Txe,g as Yt,R as zs,b as oe,l as un,c as Oxe,L as uc,w as Vne,_ as Rxe,d as Vb,F as vf}from"./main-Dd-HTlVJ.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="79526e05-333c-433e-99f5-47f452425403",e._sentryDebugIdIdentifier="sentry-dbid-79526e05-333c-433e-99f5-47f452425403")}catch{}})();function zne(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=zne(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function dn(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=zne(e))&&(r&&(r+=" "),r+=t);return r}const Y4="-",jxe=e=>{const t=Nxe(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const s=o.split(Y4);return s[0]===""&&s.length!==1&&s.shift(),Bne(s,t)||kxe(o)},getConflictingClassGroupIds:(o,s)=>{const l=n[o]||[];return s&&r[o]?[...l,...r[o]]:l}}},Bne=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?Bne(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const a=e.join(Y4);return(o=t.validators.find(({validator:s})=>s(a)))==null?void 0:o.classGroupId},E5=/^\[(.+)\]$/,kxe=e=>{if(E5.test(e)){const t=E5.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Nxe=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Mxe(Object.entries(e.classGroups),n).forEach(([a,o])=>{GN(o,r,a,t)}),r},GN=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const a=i===""?t:$5(t,i);a.classGroupId=n;return}if(typeof i=="function"){if(Ixe(i)){GN(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([a,o])=>{GN(o,$5(t,a),n,r)})})},$5=(e,t)=>{let n=e;return t.split(Y4).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Ixe=e=>e.isThemeGetter,Mxe=(e,t)=>t?e.map(([n,r])=>{const i=r.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([o,s])=>[t+o,s])):a);return[n,i]}):e,Dxe=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(a,o)=>{n.set(a,o),t++,t>e&&(t=0,r=n,n=new Map)};return{get(a){let o=n.get(a);if(o!==void 0)return o;if((o=r.get(a))!==void 0)return i(a,o),o},set(a,o){n.has(a)?n.set(a,o):i(a,o)}}},Hne="!",Lxe=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],a=t.length,o=s=>{const l=[];let c=0,u=0,d;for(let g=0;g<s.length;g++){let y=s[g];if(c===0){if(y===i&&(r||s.slice(g,g+a)===t)){l.push(s.slice(u,g)),u=g+a;continue}if(y==="/"){d=g;continue}}y==="["?c++:y==="]"&&c--}const f=l.length===0?s:s.substring(u),h=f.startsWith(Hne),v=h?f.substring(1):f,m=d&&d>u?d-u:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:v,maybePostfixModifierPosition:m}};return n?s=>n({className:s,parseClassName:o}):o},Fxe=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},qxe=e=>({cache:Dxe(e.cacheSize),parseClassName:Lxe(e),...jxe(e)}),Uxe=/\s+/,Vxe=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,a=[],o=e.trim().split(Uxe);let s="";for(let l=o.length-1;l>=0;l-=1){const c=o[l],{modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:h}=n(c);let v=!!h,m=r(v?f.substring(0,h):f);if(!m){if(!v){s=c+(s.length>0?" "+s:s);continue}if(m=r(f),!m){s=c+(s.length>0?" "+s:s);continue}v=!1}const g=Fxe(u).join(":"),y=d?g+Hne:g,b=y+m;if(a.includes(b))continue;a.push(b);const w=i(m,v);for(let S=0;S<w.length;++S){const E=w[S];a.push(y+E)}s=c+(s.length>0?" "+s:s)}return s};function zxe(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Wne(t))&&(r&&(r+=" "),r+=n);return r}const Wne=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Wne(e[r]))&&(n&&(n+=" "),n+=t);return n};function Bxe(e,...t){let n,r,i,a=o;function o(l){const c=t.reduce((u,d)=>d(u),e());return n=qxe(c),r=n.cache.get,i=n.cache.set,a=s,s(l)}function s(l){const c=r(l);if(c)return c;const u=Vxe(l,n);return i(l,u),u}return function(){return a(zxe.apply(null,arguments))}}const Hn=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Gne=/^\[(?:([a-z-]+):)?(.+)\]$/i,Hxe=/^\d+\/\d+$/,Wxe=new Set(["px","full","screen"]),Gxe=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Kxe=/\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$/,Zxe=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Yxe=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Xxe=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,pl=e=>Jh(e)||Wxe.has(e)||Hxe.test(e),Sc=e=>Am(e,"length",awe),Jh=e=>!!e&&!Number.isNaN(Number(e)),kP=e=>Am(e,"number",Jh),dg=e=>!!e&&Number.isInteger(Number(e)),Qxe=e=>e.endsWith("%")&&Jh(e.slice(0,-1)),Ut=e=>Gne.test(e),Ec=e=>Gxe.test(e),Jxe=new Set(["length","size","percentage"]),ewe=e=>Am(e,Jxe,Kne),twe=e=>Am(e,"position",Kne),nwe=new Set(["image","url"]),rwe=e=>Am(e,nwe,swe),iwe=e=>Am(e,"",owe),fg=()=>!0,Am=(e,t,n)=>{const r=Gne.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},awe=e=>Kxe.test(e)&&!Zxe.test(e),Kne=()=>!1,owe=e=>Yxe.test(e),swe=e=>Xxe.test(e),lwe=()=>{const e=Hn("colors"),t=Hn("spacing"),n=Hn("blur"),r=Hn("brightness"),i=Hn("borderColor"),a=Hn("borderRadius"),o=Hn("borderSpacing"),s=Hn("borderWidth"),l=Hn("contrast"),c=Hn("grayscale"),u=Hn("hueRotate"),d=Hn("invert"),f=Hn("gap"),h=Hn("gradientColorStops"),v=Hn("gradientColorStopPositions"),m=Hn("inset"),g=Hn("margin"),y=Hn("opacity"),b=Hn("padding"),w=Hn("saturate"),S=Hn("scale"),E=Hn("sepia"),_=Hn("skew"),$=Hn("space"),P=Hn("translate"),A=()=>["auto","contain","none"],O=()=>["auto","hidden","clip","visible","scroll"],k=()=>["auto",Ut,t],N=()=>[Ut,t],F=()=>["",pl,Sc],M=()=>["auto",Jh,Ut],H=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],G=()=>["solid","dashed","dotted","double","none"],X=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Y=()=>["start","end","center","between","around","evenly","stretch"],J=()=>["","0",Ut],I=()=>["auto","avoid","all","avoid-page","page","left","right","column"],L=()=>[Jh,Ut];return{cacheSize:500,separator:":",theme:{colors:[fg],spacing:[pl,Sc],blur:["none","",Ec,Ut],brightness:L(),borderColor:[e],borderRadius:["none","","full",Ec,Ut],borderSpacing:N(),borderWidth:F(),contrast:L(),grayscale:J(),hueRotate:L(),invert:J(),gap:N(),gradientColorStops:[e],gradientColorStopPositions:[Qxe,Sc],inset:k(),margin:k(),opacity:L(),padding:N(),saturate:L(),scale:L(),sepia:J(),skew:L(),space:N(),translate:N()},classGroups:{aspect:[{aspect:["auto","square","video",Ut]}],container:["container"],columns:[{columns:[Ec]}],"break-after":[{"break-after":I()}],"break-before":[{"break-before":I()}],"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"],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:[...H(),Ut]}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",dg,Ut]}],basis:[{basis:k()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Ut]}],grow:[{grow:J()}],shrink:[{shrink:J()}],order:[{order:["first","last","none",dg,Ut]}],"grid-cols":[{"grid-cols":[fg]}],"col-start-end":[{col:["auto",{span:["full",dg,Ut]},Ut]}],"col-start":[{"col-start":M()}],"col-end":[{"col-end":M()}],"grid-rows":[{"grid-rows":[fg]}],"row-start-end":[{row:["auto",{span:[dg,Ut]},Ut]}],"row-start":[{"row-start":M()}],"row-end":[{"row-end":M()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Ut]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ut]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...Y()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Y(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Y(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[b]}],px:[{px:[b]}],py:[{py:[b]}],ps:[{ps:[b]}],pe:[{pe:[b]}],pt:[{pt:[b]}],pr:[{pr:[b]}],pb:[{pb:[b]}],pl:[{pl:[b]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[$]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[$]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Ut,t]}],"min-w":[{"min-w":[Ut,t,"min","max","fit"]}],"max-w":[{"max-w":[Ut,t,"none","full","min","max","fit","prose",{screen:[Ec]},Ec]}],h:[{h:[Ut,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Ut,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Ut,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Ut,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Ec,Sc]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",kP]}],"font-family":[{font:[fg]}],"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:["tighter","tight","normal","wide","wider","widest",Ut]}],"line-clamp":[{"line-clamp":["none",Jh,kP]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",pl,Ut]}],"list-image":[{"list-image":["none",Ut]}],"list-style-type":[{list:["none","disc","decimal",Ut]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...G(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",pl,Sc]}],"underline-offset":[{"underline-offset":["auto",pl,Ut]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ut]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ut]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...H(),twe]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",ewe]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},rwe]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[v]}],"gradient-via-pos":[{via:[v]}],"gradient-to-pos":[{to:[v]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[...G(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:G()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...G()]}],"outline-offset":[{"outline-offset":[pl,Ut]}],"outline-w":[{outline:[pl,Sc]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:F()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[pl,Sc]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Ec,iwe]}],"shadow-color":[{shadow:[fg]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...X(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":X()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Ec,Ut]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[w]}],sepia:[{sepia:[E]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[E]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Ut]}],duration:[{duration:L()}],ease:[{ease:["linear","in","out","in-out",Ut]}],delay:[{delay:L()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ut]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[dg,Ut]}],"translate-x":[{"translate-x":[P]}],"translate-y":[{"translate-y":[P]}],"skew-x":[{"skew-x":[_]}],"skew-y":[{"skew-y":[_]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ut]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],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",Ut]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"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",Ut]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[pl,Sc,kP]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"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-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-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"],"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"]}}},cwe=Bxe(lwe);function Ie(...e){return cwe(dn(e))}const uwe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAYAAAA8AXHiAAAACXBIWXMAAAAAAAAAAQCEeRdzAAAGWElEQVR4nO2dy4oeVRSFo4gXUBEnJqMEzESciIPMvIGCQxUzc6JkojhylKFvEB/Dl7CjCQYj0Yhi1BBFHPkGDiu9/C1S/nTnr+o+q9beZ68PNjR0d11OfVVn17nVicEYAifUB2D6xGIZChbLULBYhoLFMhQslqFgsQwFi2UoWCxDwWIZChbLULBYhoLFMhQslqFgsQwFi2UoWCxDwWIZChbLULBYhoLFMhQslqFgsQwFi2UoWCxDwWIZChbLULBYhoLF2uazv4bhwi/D8Op39+LU1WF46qtN4Ofp7/C3+B/zP2qL9fnfw/D2jxtZHvhivzSOGdgGtoVtYtuFqScWnjCtRJorGvZZjBpiXdqvqs5eW0em+0mGYyjyJOtbrIu/b/IilUyHBY7pUt95WZ9ioep5aE8v0K7AMXZaTfYlFqqZiE+oOU+wzqrIPsT6859hePFbvSDHDZwDzqUD8ouFOz1DtTc3cC4dPL1yi4UGSrUIrEBbWGJyioXqImMutTTQBpa0aswnFgr6scv6i75W4FwTypVLLOQeykZOVSTMu/KIVVWqMXDuieTKIVZ1qRLKFV8s5BeW6l6gWkyQc8UWq1qiPjcSJPSxxarQpHDUQFNEYOKK9UrHjZ+t4q24jagxxUKCqr5oWSJoMh9PLOQOPfX9sSNoMh9PrBeu6y9WtkCZBSOWWK4Cjx7BqsRYYvkt8OiBsgtEHLE+uKW/ONkDZRiEOGIpEvYH9+PRy+vEGueDMgxCDLEwm0Zxh5/5ehg+/WO9uHhnM/yYKVqQ2T8xxFLlVmuLNY3Xvuf0gQbJtfRi4Q5TSKUWC/H+rU113Pq8Arwh6sV69lpdsRDv/tT+yYUyFaMXSzkkJoJYiLONby6UqRitWOomhihiIalvfYPhhUiIVqyTVy3WGKcal8VJ7bAarVjqkaGRxHqp8TAhcXWoEytCv2AksZDEtz4/4duhTiwMUlOLhYZKyMWKN39YJlfr8xMOBNSJVaHD+fEv50vFuNGEjaU6sdQXfY14/eZ8sZ7/pv3+hXmWxYogFYLVf6i6vJK9fvyb/sJHkuqj27xjQVkL0Ij18g39xUc8d30Yzt1YFs9caSsVArkY6xzf0STwGrFOC/sHjyPAGzfbb/Mc+SY7rek3rClWFKl2bdNiLUQpViWpyomlmjdYTSrEI3uSS1xHrIpSIUTj4GuIVVUqi2WpaFGqKlwrea8uFaJU8r6GWJbKYjUPNDpGkOq9n7VSlROL2aWDoSKtpXr6yvKunyjf9inVpcPshP7w11xVFTtKdUL/u2dCIT65YGAdAiM81ReeHarLK9szYyIFJiTMleo8YaJotBAuEqITizH1CxMS5or1BHGoSpQQTgHrazLFkmoQEjInUqy1dNH9ouRkCsb0r/MLnljsgFxqsUpO/wKtc5yl0616FqvshFXQOs/CNHW1UFHEKj3FvvWiIFhrSi1UFLFKLwoCWleHUabNK8Uqv4wRaL3wGgo1QhKvFMsLrw2ct8MIcinF8lKR/8FYxwFyoSO4mlhe3HYCczluNFRCsE9u1xDLy3FvscZw5Yf31vtgAGM15F2BL68GIY5Y6vVIewh/8uQQKqyZxYogudVILLEiLB+ZNQK8CU6JJRbwhzCXB76fHYx4YvnTvcvCn+5dgKvE+RGsChyJKRaIsKpy9BAO5NtFXLGA+ssVkUM8LGYXscVC7oBGP/VFjBYok4B51ZTYYgEUYO+zaZZE0GR9m/hiASSolmtTBkGT9W1yiAWqy5VIKpBHLFBVLlR/iaQCucQC1RL6BIn6QeQTC6CgKzRF4BwTSgVyijXScyNq4MbPOeQWCyD36KlvMWE+dRD5xQKoLnoYFYFRCkmrvm36EGsEd3rGwYI45g6eUlP6EmsEQ3QzVI944ws0nLglfYo1ghkrEZ9gOKYgs2lY9C3WCKoZzA5WNq5i3ziGzqq8w6gh1hTMYUT70BqSYR/Yl3iBDgX1xJqCpwfai1qJhrwO28I2izyZDqO2WAeB3AdPGLz6jwFZkBch8PP0d/jbzvOlo2CxDAWLZShYLEPBYhkKFstQsFiGgsUyFCyWoWCxDAWLZShYLEPBYhkKFstQsFiGgsUyFCyWoWCxDAWLZShYLEPBYhkKFstQsFiGgsUyFCyWoWCxDAWLZShYLEPBYhkKFstQuAuHQWblXH1mCgAAAABJRU5ErkJggg==";function dwe(){const[e,t]=x.useState(!1);return x.useEffect(()=>(document.body.style.overflow="hidden",()=>{document.body.style.overflow="initial"}),[]),p.jsxs("div",{className:"flex flex-row justify-center h-full w-full relative items-center",children:[p.jsx("img",{src:uwe,className:Ie("size-20",e&&"hidden")}),p.jsx("img",{src:"/zuplo.apng",className:Ie("h-20 w-20",!e&&"hidden"),onLoad:()=>t(!0)})]})}const fwe=x.createContext(null);function hwe(e,t){const n=new Set(e.requirements),r={...e.timestamps};switch(t.type){case"add":return n.add(t.id),r[t.id]=Date.now(),{requirements:[...n],timestamps:r};case"remove":return n.delete(t.id),delete r[t.id],{requirements:[...n],timestamps:r};default:throw new Error}}const pwe=({children:e})=>{const[t,n]=x.useReducer(hwe,{requirements:[],timestamps:{}}),r=x.useRef(null),i=x.useRef(new Set),a=x.useCallback(s=>n({type:"add",id:s}),[]),o=x.useCallback(s=>n({type:"remove",id:s}),[]);return x.useEffect(()=>(t.requirements.length>0?r.current=setInterval(()=>{const s=Date.now(),l=2e3;t.requirements.forEach(c=>{const u=t.timestamps[c];u&&s-u>l&&(i.current.has(c)||(console.warn(`🐌 Slow loading detected: "${c}" has been loading for ${Math.round((s-u)/1e3)} seconds`),i.current.add(c)))})},2e3):(r.current&&(clearInterval(r.current),r.current=null),i.current.clear()),()=>{r.current&&clearInterval(r.current)}),[t.requirements,t.timestamps]),p.jsxs(fwe.Provider,{value:{add:a,remove:o},children:[t.requirements.length>0&&p.jsx(dwe,{}),e]})};var Tm=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(){}},mwe={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Wc,Z4,Rne,gwe=(Rne=class{constructor(){Ze(this,Wc,mwe);Ze(this,Z4,!1)}setTimeoutProvider(e){De(this,Wc,e)}setTimeout(e,t){return W(this,Wc).setTimeout(e,t)}clearTimeout(e){W(this,Wc).clearTimeout(e)}setInterval(e,t){return W(this,Wc).setInterval(e,t)}clearInterval(e){W(this,Wc).clearInterval(e)}},Wc=new WeakMap,Z4=new WeakMap,Rne),Ld=new gwe;function vwe(e){setTimeout(e,0)}var yf=typeof window>"u"||"Deno"in globalThis;function Zi(){}function ywe(e,t){return typeof e=="function"?e(t):e}function KN(e){return typeof e=="number"&&e>=0&&e!==1/0}function Zne(e,t){return Math.max(e+(t||0)-Date.now(),0)}function su(e,t){return typeof e=="function"?e(t):e}function po(e,t){return typeof e=="function"?e(t):e}function P5(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==X4(o,t.options))return!1}else if(!t0(t.queryKey,o))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof s=="boolean"&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function C5(e,t){const{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(bf(t.options.mutationKey)!==bf(a))return!1}else if(!t0(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function X4(e,t){return((t==null?void 0:t.queryKeyHashFn)||bf)(e)}function bf(e){return JSON.stringify(e,(t,n)=>ZN(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function t0(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>t0(e[n],t[n])):!1}var bwe=Object.prototype.hasOwnProperty;function Yne(e,t){if(e===t)return e;const n=A5(e)&&A5(t);if(!n&&!(ZN(e)&&ZN(t)))return t;const i=(n?e:Object.keys(e)).length,a=n?t:Object.keys(t),o=a.length,s=n?new Array(o):{};let l=0;for(let c=0;c<o;c++){const u=n?c:a[c],d=e[u],f=t[u];if(d===f){s[u]=d,(n?c<i:bwe.call(e,u))&&l++;continue}if(d===null||f===null||typeof d!="object"||typeof f!="object"){s[u]=f;continue}const h=Yne(d,f);s[u]=h,h===d&&l++}return i===o&&l===i?e:s}function x_(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function A5(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ZN(e){if(!T5(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!T5(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function T5(e){return Object.prototype.toString.call(e)==="[object Object]"}function xwe(e){return new Promise(t=>{Ld.setTimeout(t,e)})}function YN(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Yne(e,t):t}function wwe(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function _we(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Q4=Symbol();function Xne(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Q4?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Qne(e,t){return typeof e=="function"?e(...t):!!e}var Kd,Gc,gp,jne,Swe=(jne=class extends Tm{constructor(){super();Ze(this,Kd);Ze(this,Gc);Ze(this,gp);De(this,gp,t=>{if(!yf&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){W(this,Gc)||this.setEventListener(W(this,gp))}onUnsubscribe(){var t;this.hasListeners()||((t=W(this,Gc))==null||t.call(this),De(this,Gc,void 0))}setEventListener(t){var n;De(this,gp,t),(n=W(this,Gc))==null||n.call(this),De(this,Gc,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){W(this,Kd)!==t&&(De(this,Kd,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof W(this,Kd)=="boolean"?W(this,Kd):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Kd=new WeakMap,Gc=new WeakMap,gp=new WeakMap,jne),J4=new Swe;function XN(){let e,t;const n=new Promise((i,a)=>{e=i,t=a});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}var Ewe=vwe;function $we(){let e=[],t=0,n=s=>{s()},r=s=>{s()},i=Ewe;const a=s=>{t?e.push(s):i(()=>{n(s)})},o=()=>{const s=e;e=[],s.length&&i(()=>{r(()=>{s.forEach(l=>{n(l)})})})};return{batch:s=>{let l;t++;try{l=s()}finally{t--,t||o()}return l},batchCalls:s=>(...l)=>{a(()=>{s(...l)})},schedule:a,setNotifyFunction:s=>{n=s},setBatchNotifyFunction:s=>{r=s},setScheduler:s=>{i=s}}}var Kr=$we(),vp,Kc,yp,kne,Pwe=(kne=class extends Tm{constructor(){super();Ze(this,vp,!0);Ze(this,Kc);Ze(this,yp);De(this,yp,t=>{if(!yf&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){W(this,Kc)||this.setEventListener(W(this,yp))}onUnsubscribe(){var t;this.hasListeners()||((t=W(this,Kc))==null||t.call(this),De(this,Kc,void 0))}setEventListener(t){var n;De(this,yp,t),(n=W(this,Kc))==null||n.call(this),De(this,Kc,t(this.setOnline.bind(this)))}setOnline(t){W(this,vp)!==t&&(De(this,vp,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return W(this,vp)}},vp=new WeakMap,Kc=new WeakMap,yp=new WeakMap,kne),w_=new Pwe;function Cwe(e){return Math.min(1e3*2**e,3e4)}function Jne(e){return(e??"online")==="online"?w_.isOnline():!0}var QN=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function ere(e){let t=!1,n=0,r;const i=XN(),a=()=>i.status!=="pending",o=m=>{var g;if(!a()){const y=new QN(m);f(y),(g=e.onCancel)==null||g.call(e,y)}},s=()=>{t=!0},l=()=>{t=!1},c=()=>J4.isFocused()&&(e.networkMode==="always"||w_.isOnline())&&e.canRun(),u=()=>Jne(e.networkMode)&&e.canRun(),d=m=>{a()||(r==null||r(),i.resolve(m))},f=m=>{a()||(r==null||r(),i.reject(m))},h=()=>new Promise(m=>{var g;r=y=>{(a()||c())&&m(y)},(g=e.onPause)==null||g.call(e)}).then(()=>{var m;r=void 0,a()||(m=e.onContinue)==null||m.call(e)}),v=()=>{if(a())return;let m;const g=n===0?e.initialPromise:void 0;try{m=g??e.fn()}catch(y){m=Promise.reject(y)}Promise.resolve(m).then(d).catch(y=>{var _;if(a())return;const b=e.retry??(yf?0:3),w=e.retryDelay??Cwe,S=typeof w=="function"?w(n,y):w,E=b===!0||typeof b=="number"&&n<b||typeof b=="function"&&b(n,y);if(t||!E){f(y);return}n++,(_=e.onFail)==null||_.call(e,n,y),xwe(S).then(()=>c()?void 0:h()).then(()=>{t?f(y):v()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r==null||r(),i),cancelRetry:s,continueRetry:l,canStart:u,start:()=>(u()?v():h().then(v),i)}}var Zd,Nne,tre=(Nne=class{constructor(){Ze(this,Zd)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),KN(this.gcTime)&&De(this,Zd,Ld.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(yf?1/0:5*60*1e3))}clearGcTimeout(){W(this,Zd)&&(Ld.clearTimeout(W(this,Zd)),De(this,Zd,void 0))}},Zd=new WeakMap,Nne),Yd,bp,co,Xd,si,Ty,Qd,Bo,Pl,Ine,Awe=(Ine=class extends tre{constructor(t){super();Ze(this,Bo);Ze(this,Yd);Ze(this,bp);Ze(this,co);Ze(this,Xd);Ze(this,si);Ze(this,Ty);Ze(this,Qd);De(this,Qd,!1),De(this,Ty,t.defaultOptions),this.setOptions(t.options),this.observers=[],De(this,Xd,t.client),De(this,co,W(this,Xd).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,De(this,Yd,O5(this.options)),this.state=t.state??W(this,Yd),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=W(this,si))==null?void 0:t.promise}setOptions(t){if(this.options={...W(this,Ty),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=O5(this.options);n.data!==void 0&&(this.setData(n.data,{updatedAt:n.dataUpdatedAt,manual:!0}),De(this,Yd,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&W(this,co).remove(this)}setData(t,n){const r=YN(this.state.data,t,this.options);return ke(this,Bo,Pl).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){ke(this,Bo,Pl).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=W(this,si))==null?void 0:r.promise;return(i=W(this,si))==null||i.cancel(t),n?n.then(Zi).catch(Zi):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(W(this,Yd))}isActive(){return this.observers.some(t=>po(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Q4||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>su(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!Zne(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=W(this,si))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=W(this,si))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),W(this,co).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(W(this,si)&&(W(this,Qd)?W(this,si).cancel({revert:!0}):W(this,si).cancelRetry()),this.scheduleGc()),W(this,co).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||ke(this,Bo,Pl).call(this,{type:"invalidate"})}async fetch(t,n){var l,c,u,d,f,h,v,m,g,y,b,w;if(this.state.fetchStatus!=="idle"&&((l=W(this,si))==null?void 0:l.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(W(this,si))return W(this,si).continueRetry(),W(this,si).promise}if(t&&this.setOptions(t),!this.options.queryFn){const S=this.observers.find(E=>E.options.queryFn);S&&this.setOptions(S.options)}const r=new AbortController,i=S=>{Object.defineProperty(S,"signal",{enumerable:!0,get:()=>(De(this,Qd,!0),r.signal)})},a=()=>{const S=Xne(this.options,n),_=(()=>{const $={client:W(this,Xd),queryKey:this.queryKey,meta:this.meta};return i($),$})();return De(this,Qd,!1),this.options.persister?this.options.persister(S,_,this):S(_)},s=(()=>{const S={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:W(this,Xd),state:this.state,fetchFn:a};return i(S),S})();(c=this.options.behavior)==null||c.onFetch(s,this),De(this,bp,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=s.fetchOptions)==null?void 0:u.meta))&&ke(this,Bo,Pl).call(this,{type:"fetch",meta:(d=s.fetchOptions)==null?void 0:d.meta}),De(this,si,ere({initialPromise:n==null?void 0:n.initialPromise,fn:s.fetchFn,onCancel:S=>{S instanceof QN&&S.revert&&this.setState({...W(this,bp),fetchStatus:"idle"}),r.abort()},onFail:(S,E)=>{ke(this,Bo,Pl).call(this,{type:"failed",failureCount:S,error:E})},onPause:()=>{ke(this,Bo,Pl).call(this,{type:"pause"})},onContinue:()=>{ke(this,Bo,Pl).call(this,{type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0}));try{const S=await W(this,si).start();if(S===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(S),(h=(f=W(this,co).config).onSuccess)==null||h.call(f,S,this),(m=(v=W(this,co).config).onSettled)==null||m.call(v,S,this.state.error,this),S}catch(S){if(S instanceof QN){if(S.silent)return W(this,si).promise;if(S.revert){if(this.state.data===void 0)throw S;return this.state.data}}throw ke(this,Bo,Pl).call(this,{type:"error",error:S}),(y=(g=W(this,co).config).onError)==null||y.call(g,S,this),(w=(b=W(this,co).config).onSettled)==null||w.call(b,this.state.data,S,this),S}finally{this.scheduleGc()}}},Yd=new WeakMap,bp=new WeakMap,co=new WeakMap,Xd=new WeakMap,si=new WeakMap,Ty=new WeakMap,Qd=new WeakMap,Bo=new WeakSet,Pl=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...nre(r.data,this.options),fetchMeta:t.meta??null};case"success":const i={...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return De(this,bp,t.manual?i:void 0),i;case"error":const a=t.error;return{...r,error:a,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Kr.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),W(this,co).notify({query:this,type:"updated",action:t})})},Ine);function nre(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Jne(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function O5(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var ua,rn,Oy,Wi,Jd,xp,Il,Zc,Ry,wp,_p,ef,tf,Yc,Sp,En,Qg,JN,eI,tI,nI,rI,iI,aI,rre,Mne,Twe=(Mne=class extends Tm{constructor(t,n){super();Ze(this,En);Ze(this,ua);Ze(this,rn);Ze(this,Oy);Ze(this,Wi);Ze(this,Jd);Ze(this,xp);Ze(this,Il);Ze(this,Zc);Ze(this,Ry);Ze(this,wp);Ze(this,_p);Ze(this,ef);Ze(this,tf);Ze(this,Yc);Ze(this,Sp,new Set);this.options=n,De(this,ua,t),De(this,Zc,null),De(this,Il,XN()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(W(this,rn).addObserver(this),R5(W(this,rn),this.options)?ke(this,En,Qg).call(this):this.updateResult(),ke(this,En,nI).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return oI(W(this,rn),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return oI(W(this,rn),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,ke(this,En,rI).call(this),ke(this,En,iI).call(this),W(this,rn).removeObserver(this)}setOptions(t){const n=this.options,r=W(this,rn);if(this.options=W(this,ua).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof po(this.options.enabled,W(this,rn))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");ke(this,En,aI).call(this),W(this,rn).setOptions(this.options),n._defaulted&&!x_(this.options,n)&&W(this,ua).getQueryCache().notify({type:"observerOptionsUpdated",query:W(this,rn),observer:this});const i=this.hasListeners();i&&j5(W(this,rn),r,this.options,n)&&ke(this,En,Qg).call(this),this.updateResult(),i&&(W(this,rn)!==r||po(this.options.enabled,W(this,rn))!==po(n.enabled,W(this,rn))||su(this.options.staleTime,W(this,rn))!==su(n.staleTime,W(this,rn)))&&ke(this,En,JN).call(this);const a=ke(this,En,eI).call(this);i&&(W(this,rn)!==r||po(this.options.enabled,W(this,rn))!==po(n.enabled,W(this,rn))||a!==W(this,Yc))&&ke(this,En,tI).call(this,a)}getOptimisticResult(t){const n=W(this,ua).getQueryCache().build(W(this,ua),t),r=this.createResult(n,t);return Rwe(this,r)&&(De(this,Wi,r),De(this,xp,this.options),De(this,Jd,W(this,rn).state)),r}getCurrentResult(){return W(this,Wi)}trackResult(t,n){return new Proxy(t,{get:(r,i)=>(this.trackProp(i),n==null||n(i),i==="promise"&&!this.options.experimental_prefetchInRender&&W(this,Il).status==="pending"&&W(this,Il).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),Reflect.get(r,i))})}trackProp(t){W(this,Sp).add(t)}getCurrentQuery(){return W(this,rn)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=W(this,ua).defaultQueryOptions(t),r=W(this,ua).getQueryCache().build(W(this,ua),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return ke(this,En,Qg).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),W(this,Wi)))}createResult(t,n){var A;const r=W(this,rn),i=this.options,a=W(this,Wi),o=W(this,Jd),s=W(this,xp),c=t!==r?t.state:W(this,Oy),{state:u}=t;let d={...u},f=!1,h;if(n._optimisticResults){const O=this.hasListeners(),k=!O&&R5(t,n),N=O&&j5(t,r,n,i);(k||N)&&(d={...d,...nre(u.data,t.options)}),n._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:v,errorUpdatedAt:m,status:g}=d;h=d.data;let y=!1;if(n.placeholderData!==void 0&&h===void 0&&g==="pending"){let O;a!=null&&a.isPlaceholderData&&n.placeholderData===(s==null?void 0:s.placeholderData)?(O=a.data,y=!0):O=typeof n.placeholderData=="function"?n.placeholderData((A=W(this,_p))==null?void 0:A.state.data,W(this,_p)):n.placeholderData,O!==void 0&&(g="success",h=YN(a==null?void 0:a.data,O,n),f=!0)}if(n.select&&h!==void 0&&!y)if(a&&h===(o==null?void 0:o.data)&&n.select===W(this,Ry))h=W(this,wp);else try{De(this,Ry,n.select),h=n.select(h),h=YN(a==null?void 0:a.data,h,n),De(this,wp,h),De(this,Zc,null)}catch(O){De(this,Zc,O)}W(this,Zc)&&(v=W(this,Zc),h=W(this,wp),m=Date.now(),g="error");const b=d.fetchStatus==="fetching",w=g==="pending",S=g==="error",E=w&&b,_=h!==void 0,P={status:g,fetchStatus:d.fetchStatus,isPending:w,isSuccess:g==="success",isError:S,isInitialLoading:E,isLoading:E,data:h,dataUpdatedAt:d.dataUpdatedAt,error:v,errorUpdatedAt:m,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>c.dataUpdateCount||d.errorUpdateCount>c.errorUpdateCount,isFetching:b,isRefetching:b&&!w,isLoadingError:S&&!_,isPaused:d.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:S&&_,isStale:e6(t,n),refetch:this.refetch,promise:W(this,Il),isEnabled:po(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const O=F=>{P.status==="error"?F.reject(P.error):P.data!==void 0&&F.resolve(P.data)},k=()=>{const F=De(this,Il,P.promise=XN());O(F)},N=W(this,Il);switch(N.status){case"pending":t.queryHash===r.queryHash&&O(N);break;case"fulfilled":(P.status==="error"||P.data!==N.value)&&k();break;case"rejected":(P.status!=="error"||P.error!==N.reason)&&k();break}}return P}updateResult(){const t=W(this,Wi),n=this.createResult(W(this,rn),this.options);if(De(this,Jd,W(this,rn).state),De(this,xp,this.options),W(this,Jd).data!==void 0&&De(this,_p,W(this,rn)),x_(n,t))return;De(this,Wi,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,a=typeof i=="function"?i():i;if(a==="all"||!a&&!W(this,Sp).size)return!0;const o=new Set(a??W(this,Sp));return this.options.throwOnError&&o.add("error"),Object.keys(W(this,Wi)).some(s=>{const l=s;return W(this,Wi)[l]!==t[l]&&o.has(l)})};ke(this,En,rre).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&ke(this,En,nI).call(this)}},ua=new WeakMap,rn=new WeakMap,Oy=new WeakMap,Wi=new WeakMap,Jd=new WeakMap,xp=new WeakMap,Il=new WeakMap,Zc=new WeakMap,Ry=new WeakMap,wp=new WeakMap,_p=new WeakMap,ef=new WeakMap,tf=new WeakMap,Yc=new WeakMap,Sp=new WeakMap,En=new WeakSet,Qg=function(t){ke(this,En,aI).call(this);let n=W(this,rn).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Zi)),n},JN=function(){ke(this,En,rI).call(this);const t=su(this.options.staleTime,W(this,rn));if(yf||W(this,Wi).isStale||!KN(t))return;const r=Zne(W(this,Wi).dataUpdatedAt,t)+1;De(this,ef,Ld.setTimeout(()=>{W(this,Wi).isStale||this.updateResult()},r))},eI=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(W(this,rn)):this.options.refetchInterval)??!1},tI=function(t){ke(this,En,iI).call(this),De(this,Yc,t),!(yf||po(this.options.enabled,W(this,rn))===!1||!KN(W(this,Yc))||W(this,Yc)===0)&&De(this,tf,Ld.setInterval(()=>{(this.options.refetchIntervalInBackground||J4.isFocused())&&ke(this,En,Qg).call(this)},W(this,Yc)))},nI=function(){ke(this,En,JN).call(this),ke(this,En,tI).call(this,ke(this,En,eI).call(this))},rI=function(){W(this,ef)&&(Ld.clearTimeout(W(this,ef)),De(this,ef,void 0))},iI=function(){W(this,tf)&&(Ld.clearInterval(W(this,tf)),De(this,tf,void 0))},aI=function(){const t=W(this,ua).getQueryCache().build(W(this,ua),this.options);if(t===W(this,rn))return;const n=W(this,rn);De(this,rn,t),De(this,Oy,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},rre=function(t){Kr.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(W(this,Wi))}),W(this,ua).getQueryCache().notify({query:W(this,rn),type:"observerResultsUpdated"})})},Mne);function Owe(e,t){return po(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function R5(e,t){return Owe(e,t)||e.state.data!==void 0&&oI(e,t,t.refetchOnMount)}function oI(e,t,n){if(po(t.enabled,e)!==!1&&su(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&e6(e,t)}return!1}function j5(e,t,n,r){return(e!==t||po(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&e6(e,n)}function e6(e,t){return po(t.enabled,e)!==!1&&e.isStaleByTime(su(t.staleTime,e))}function Rwe(e,t){return!x_(e.getCurrentResult(),t)}function k5(e){return{onFetch:(t,n)=>{var u,d,f,h,v;const r=t.options,i=(f=(d=(u=t.fetchOptions)==null?void 0:u.meta)==null?void 0:d.fetchMore)==null?void 0:f.direction,a=((h=t.state.data)==null?void 0:h.pages)||[],o=((v=t.state.data)==null?void 0:v.pageParams)||[];let s={pages:[],pageParams:[]},l=0;const c=async()=>{let m=!1;const g=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(t.signal.aborted?m=!0:t.signal.addEventListener("abort",()=>{m=!0}),t.signal)})},y=Xne(t.options,t.fetchOptions),b=async(w,S,E)=>{if(m)return Promise.reject();if(S==null&&w.pages.length)return Promise.resolve(w);const $=(()=>{const k={client:t.client,queryKey:t.queryKey,pageParam:S,direction:E?"backward":"forward",meta:t.options.meta};return g(k),k})(),P=await y($),{maxPages:A}=t.options,O=E?_we:wwe;return{pages:O(w.pages,P,A),pageParams:O(w.pageParams,S,A)}};if(i&&a.length){const w=i==="backward",S=w?jwe:N5,E={pages:a,pageParams:o},_=S(r,E);s=await b(E,_,w)}else{const w=e??a.length;do{const S=l===0?o[0]??r.initialPageParam:N5(r,s);if(l>0&&S==null)break;s=await b(s,S),l++}while(l<w)}return s};t.options.persister?t.fetchFn=()=>{var m,g;return(g=(m=t.options).persister)==null?void 0:g.call(m,c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=c}}}function N5(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function jwe(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var Ss,Gi,nf,Es,kc,Dne,kwe=(Dne=class extends tre{constructor(t){super();Ze(this,Es);Ze(this,Ss);Ze(this,Gi);Ze(this,nf);this.mutationId=t.mutationId,De(this,Gi,t.mutationCache),De(this,Ss,[]),this.state=t.state||ire(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){W(this,Ss).includes(t)||(W(this,Ss).push(t),this.clearGcTimeout(),W(this,Gi).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){De(this,Ss,W(this,Ss).filter(n=>n!==t)),this.scheduleGc(),W(this,Gi).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){W(this,Ss).length||(this.state.status==="pending"?this.scheduleGc():W(this,Gi).remove(this))}continue(){var t;return((t=W(this,nf))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var a,o,s,l,c,u,d,f,h,v,m,g,y,b,w,S,E,_,$,P;const n=()=>{ke(this,Es,kc).call(this,{type:"continue"})};De(this,nf,ere({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(A,O)=>{ke(this,Es,kc).call(this,{type:"failed",failureCount:A,error:O})},onPause:()=>{ke(this,Es,kc).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>W(this,Gi).canRun(this)}));const r=this.state.status==="pending",i=!W(this,nf).canStart();try{if(r)n();else{ke(this,Es,kc).call(this,{type:"pending",variables:t,isPaused:i}),await((o=(a=W(this,Gi).config).onMutate)==null?void 0:o.call(a,t,this));const O=await((l=(s=this.options).onMutate)==null?void 0:l.call(s,t));O!==this.state.context&&ke(this,Es,kc).call(this,{type:"pending",context:O,variables:t,isPaused:i})}const A=await W(this,nf).start();return await((u=(c=W(this,Gi).config).onSuccess)==null?void 0:u.call(c,A,t,this.state.context,this)),await((f=(d=this.options).onSuccess)==null?void 0:f.call(d,A,t,this.state.context)),await((v=(h=W(this,Gi).config).onSettled)==null?void 0:v.call(h,A,null,this.state.variables,this.state.context,this)),await((g=(m=this.options).onSettled)==null?void 0:g.call(m,A,null,t,this.state.context)),ke(this,Es,kc).call(this,{type:"success",data:A}),A}catch(A){try{throw await((b=(y=W(this,Gi).config).onError)==null?void 0:b.call(y,A,t,this.state.context,this)),await((S=(w=this.options).onError)==null?void 0:S.call(w,A,t,this.state.context)),await((_=(E=W(this,Gi).config).onSettled)==null?void 0:_.call(E,void 0,A,this.state.variables,this.state.context,this)),await((P=($=this.options).onSettled)==null?void 0:P.call($,void 0,A,t,this.state.context)),A}finally{ke(this,Es,kc).call(this,{type:"error",error:A})}}finally{W(this,Gi).runNext(this)}}},Ss=new WeakMap,Gi=new WeakMap,nf=new WeakMap,Es=new WeakSet,kc=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Kr.batch(()=>{W(this,Ss).forEach(r=>{r.onMutationUpdate(t)}),W(this,Gi).notify({mutation:this,type:"updated",action:t})})},Dne);function ire(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ml,Ho,jy,Lne,Nwe=(Lne=class extends Tm{constructor(t={}){super();Ze(this,Ml);Ze(this,Ho);Ze(this,jy);this.config=t,De(this,Ml,new Set),De(this,Ho,new Map),De(this,jy,0)}build(t,n,r){const i=new kwe({mutationCache:this,mutationId:++Ub(this,jy)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){W(this,Ml).add(t);const n=zb(t);if(typeof n=="string"){const r=W(this,Ho).get(n);r?r.push(t):W(this,Ho).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(W(this,Ml).delete(t)){const n=zb(t);if(typeof n=="string"){const r=W(this,Ho).get(n);if(r)if(r.length>1){const i=r.indexOf(t);i!==-1&&r.splice(i,1)}else r[0]===t&&W(this,Ho).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=zb(t);if(typeof n=="string"){const r=W(this,Ho).get(n),i=r==null?void 0:r.find(a=>a.state.status==="pending");return!i||i===t}else return!0}runNext(t){var r;const n=zb(t);if(typeof n=="string"){const i=(r=W(this,Ho).get(n))==null?void 0:r.find(a=>a!==t&&a.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Kr.batch(()=>{W(this,Ml).forEach(t=>{this.notify({type:"removed",mutation:t})}),W(this,Ml).clear(),W(this,Ho).clear()})}getAll(){return Array.from(W(this,Ml))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>C5(n,r))}findAll(t={}){return this.getAll().filter(n=>C5(t,n))}notify(t){Kr.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Kr.batch(()=>Promise.all(t.map(n=>n.continue().catch(Zi))))}},Ml=new WeakMap,Ho=new WeakMap,jy=new WeakMap,Lne);function zb(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Xc,Qc,da,Dl,Ql,Bw,sI,Fne,Iwe=(Fne=class extends Tm{constructor(n,r){super();Ze(this,Ql);Ze(this,Xc);Ze(this,Qc);Ze(this,da);Ze(this,Dl);De(this,Xc,n),this.setOptions(r),this.bindMethods(),ke(this,Ql,Bw).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var i;const r=this.options;this.options=W(this,Xc).defaultMutationOptions(n),x_(this.options,r)||W(this,Xc).getMutationCache().notify({type:"observerOptionsUpdated",mutation:W(this,da),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&bf(r.mutationKey)!==bf(this.options.mutationKey)?this.reset():((i=W(this,da))==null?void 0:i.state.status)==="pending"&&W(this,da).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=W(this,da))==null||n.removeObserver(this)}onMutationUpdate(n){ke(this,Ql,Bw).call(this),ke(this,Ql,sI).call(this,n)}getCurrentResult(){return W(this,Qc)}reset(){var n;(n=W(this,da))==null||n.removeObserver(this),De(this,da,void 0),ke(this,Ql,Bw).call(this),ke(this,Ql,sI).call(this)}mutate(n,r){var i;return De(this,Dl,r),(i=W(this,da))==null||i.removeObserver(this),De(this,da,W(this,Xc).getMutationCache().build(W(this,Xc),this.options)),W(this,da).addObserver(this),W(this,da).execute(n)}},Xc=new WeakMap,Qc=new WeakMap,da=new WeakMap,Dl=new WeakMap,Ql=new WeakSet,Bw=function(){var r;const n=((r=W(this,da))==null?void 0:r.state)??ire();De(this,Qc,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},sI=function(n){Kr.batch(()=>{var r,i,a,o,s,l,c,u;if(W(this,Dl)&&this.hasListeners()){const d=W(this,Qc).variables,f=W(this,Qc).context;(n==null?void 0:n.type)==="success"?((i=(r=W(this,Dl)).onSuccess)==null||i.call(r,n.data,d,f),(o=(a=W(this,Dl)).onSettled)==null||o.call(a,n.data,null,d,f)):(n==null?void 0:n.type)==="error"&&((l=(s=W(this,Dl)).onError)==null||l.call(s,n.error,d,f),(u=(c=W(this,Dl)).onSettled)==null||u.call(c,void 0,n.error,d,f))}this.listeners.forEach(d=>{d(W(this,Qc))})})},Fne),$s,qne,Mwe=(qne=class extends Tm{constructor(t={}){super();Ze(this,$s);this.config=t,De(this,$s,new Map)}build(t,n,r){const i=n.queryKey,a=n.queryHash??X4(i,n);let o=this.get(a);return o||(o=new Awe({client:t,queryKey:i,queryHash:a,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){W(this,$s).has(t.queryHash)||(W(this,$s).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=W(this,$s).get(t.queryHash);n&&(t.destroy(),n===t&&W(this,$s).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Kr.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return W(this,$s).get(t)}getAll(){return[...W(this,$s).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>P5(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>P5(t,r)):n}notify(t){Kr.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Kr.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Kr.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},$s=new WeakMap,qne),ur,Jc,eu,Ep,$p,tu,Pp,Cp,Une,Dwe=(Une=class{constructor(e={}){Ze(this,ur);Ze(this,Jc);Ze(this,eu);Ze(this,Ep);Ze(this,$p);Ze(this,tu);Ze(this,Pp);Ze(this,Cp);De(this,ur,e.queryCache||new Mwe),De(this,Jc,e.mutationCache||new Nwe),De(this,eu,e.defaultOptions||{}),De(this,Ep,new Map),De(this,$p,new Map),De(this,tu,0)}mount(){Ub(this,tu)._++,W(this,tu)===1&&(De(this,Pp,J4.subscribe(async e=>{e&&(await this.resumePausedMutations(),W(this,ur).onFocus())})),De(this,Cp,w_.subscribe(async e=>{e&&(await this.resumePausedMutations(),W(this,ur).onOnline())})))}unmount(){var e,t;Ub(this,tu)._--,W(this,tu)===0&&((e=W(this,Pp))==null||e.call(this),De(this,Pp,void 0),(t=W(this,Cp))==null||t.call(this),De(this,Cp,void 0))}isFetching(e){return W(this,ur).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return W(this,Jc).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=W(this,ur).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=W(this,ur).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(su(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return W(this,ur).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=W(this,ur).get(r.queryHash),a=i==null?void 0:i.state.data,o=ywe(t,a);if(o!==void 0)return W(this,ur).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return Kr.batch(()=>W(this,ur).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=W(this,ur).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=W(this,ur);Kr.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=W(this,ur);return Kr.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Kr.batch(()=>W(this,ur).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(Zi).catch(Zi)}invalidateQueries(e,t={}){return Kr.batch(()=>(W(this,ur).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Kr.batch(()=>W(this,ur).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let a=i.fetch(void 0,n);return n.throwOnError||(a=a.catch(Zi)),i.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(r).then(Zi)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=W(this,ur).build(this,t);return n.isStaleByTime(su(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Zi).catch(Zi)}fetchInfiniteQuery(e){return e.behavior=k5(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Zi).catch(Zi)}ensureInfiniteQueryData(e){return e.behavior=k5(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return w_.isOnline()?W(this,Jc).resumePausedMutations():Promise.resolve()}getQueryCache(){return W(this,ur)}getMutationCache(){return W(this,Jc)}getDefaultOptions(){return W(this,eu)}setDefaultOptions(e){De(this,eu,e)}setQueryDefaults(e,t){W(this,Ep).set(bf(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...W(this,Ep).values()],n={};return t.forEach(r=>{t0(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){W(this,$p).set(bf(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...W(this,$p).values()],n={};return t.forEach(r=>{t0(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...W(this,eu).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=X4(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Q4&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...W(this,eu).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){W(this,ur).clear(),W(this,Jc).clear()}},ur=new WeakMap,Jc=new WeakMap,eu=new WeakMap,Ep=new WeakMap,$p=new WeakMap,tu=new WeakMap,Pp=new WeakMap,Cp=new WeakMap,Une),are=x.createContext(void 0),t6=e=>{const t=x.useContext(are);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Lwe=({client:e,children:t})=>(x.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),p.jsx(are.Provider,{value:e,children:t})),ore=x.createContext(!1),Fwe=()=>x.useContext(ore);ore.Provider;function qwe(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Uwe=x.createContext(qwe()),Vwe=()=>x.useContext(Uwe),zwe=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},Bwe=e=>{x.useEffect(()=>{e.clearReset()},[e])},Hwe=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||Qne(n,[e.error,r])),Wwe=e=>{if(e.suspense){const n=i=>i==="static"?i:Math.max(i??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...i)=>n(r(...i)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},Gwe=(e,t)=>e.isLoading&&e.isFetching&&!t,Kwe=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,I5=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Zwe(e,t,n){var d,f,h,v,m;const r=Fwe(),i=Vwe(),a=t6(),o=a.defaultQueryOptions(e);(f=(d=a.getDefaultOptions().queries)==null?void 0:d._experimental_beforeQuery)==null||f.call(d,o),o._optimisticResults=r?"isRestoring":"optimistic",Wwe(o),zwe(o,i),Bwe(i);const s=!a.getQueryCache().get(o.queryHash),[l]=x.useState(()=>new t(a,o)),c=l.getOptimisticResult(o),u=!r&&e.subscribed!==!1;if(x.useSyncExternalStore(x.useCallback(g=>{const y=u?l.subscribe(Kr.batchCalls(g)):Zi;return l.updateResult(),y},[l,u]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),x.useEffect(()=>{l.setOptions(o)},[o,l]),Kwe(o,c))throw I5(o,l,i);if(Hwe({result:c,errorResetBoundary:i,throwOnError:o.throwOnError,query:a.getQueryCache().get(o.queryHash),suspense:o.suspense}))throw c.error;if((v=(h=a.getDefaultOptions().queries)==null?void 0:h._experimental_afterQuery)==null||v.call(h,o,c),o.experimental_prefetchInRender&&!yf&&Gwe(c,r)){const g=s?I5(o,l,i):(m=a.getQueryCache().get(o.queryHash))==null?void 0:m.promise;g==null||g.catch(Zi).finally(()=>{l.updateResult()})}return o.notifyOnChangeProps?c:l.trackResult(c)}function VE(e,t){return Zwe(e,Twe)}function Uu(e,t){const n=t6(),[r]=x.useState(()=>new Iwe(n,e));x.useEffect(()=>{r.setOptions(e)},[r,e]);const i=x.useSyncExternalStore(x.useCallback(o=>r.subscribe(Kr.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=x.useCallback((o,s)=>{r.mutate(o,s).catch(Zi)},[r]);if(i.error&&Qne(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}function Ge(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function M5(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Jl(...e){return t=>{let n=!1;const r=e.map(i=>{const a=M5(i,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let i=0;i<r.length;i++){const a=r[i];typeof a=="function"?a():M5(e[i],null)}}}}function Zt(...e){return x.useCallback(Jl(...e),e)}function Ywe(e,t){const n=x.createContext(t),r=a=>{const{children:o,...s}=a,l=x.useMemo(()=>s,Object.values(s));return p.jsx(n.Provider,{value:l,children:o})};r.displayName=e+"Provider";function i(a){const o=x.useContext(n);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,i]}function $a(e,t=[]){let n=[];function r(a,o){const s=x.createContext(o),l=n.length;n=[...n,o];const c=d=>{var y;const{scope:f,children:h,...v}=d,m=((y=f==null?void 0:f[e])==null?void 0:y[l])||s,g=x.useMemo(()=>v,Object.values(v));return p.jsx(m.Provider,{value:g,children:h})};c.displayName=a+"Provider";function u(d,f){var m;const h=((m=f==null?void 0:f[e])==null?void 0:m[l])||s,v=x.useContext(h);if(v)return v;if(o!==void 0)return o;throw new Error(`\`${d}\` must be used within \`${a}\``)}return[c,u]}const i=()=>{const a=n.map(o=>x.createContext(o));return function(s){const l=(s==null?void 0:s[e])||a;return x.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,Xwe(i,...t)]}function Xwe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const o=r.reduce((s,{useScope:l,scopeName:c})=>{const d=l(a)[`__scope${c}`];return{...s,...d}},{});return x.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}var Ji=Txe();const sre=Yt(Ji);function wu(e){const t=Qwe(e),n=x.forwardRef((r,i)=>{const{children:a,...o}=r,s=x.Children.toArray(a),l=s.find(e_e);if(l){const c=l.props.children,u=s.map(d=>d===l?x.Children.count(c)>1?x.Children.only(null):x.isValidElement(c)?c.props.children:null:d);return p.jsx(t,{...o,ref:i,children:x.isValidElement(c)?x.cloneElement(c,void 0,u):null})}return p.jsx(t,{...o,ref:i,children:a})});return n.displayName=`${e}.Slot`,n}var lre=wu("Slot");function Qwe(e){const t=x.forwardRef((n,r)=>{const{children:i,...a}=n;if(x.isValidElement(i)){const o=n_e(i),s=t_e(a,i.props);return i.type!==x.Fragment&&(s.ref=r?Jl(r,o):o),x.cloneElement(i,s)}return x.Children.count(i)>1?x.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var cre=Symbol("radix.slottable");function Jwe(e){const t=({children:n})=>p.jsx(p.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=cre,t}function e_e(e){return x.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===cre}function t_e(e,t){const n={...t};for(const r in t){const i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...s)=>{a(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...a}:r==="className"&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function n_e(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var r_e=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],vt=r_e.reduce((e,t)=>{const n=wu(`Primitive.${t}`),r=x.forwardRef((i,a)=>{const{asChild:o,...s}=i,l=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(l,{...s,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function n6(e,t){e&&Ji.flushSync(()=>e.dispatchEvent(t))}function Sa(e){const t=x.useRef(e);return x.useEffect(()=>{t.current=e}),x.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function i_e(e,t=globalThis==null?void 0:globalThis.document){const n=Sa(e);x.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var a_e="DismissableLayer",lI="dismissableLayer.update",o_e="dismissableLayer.pointerDownOutside",s_e="dismissableLayer.focusOutside",D5,ure=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Vu=x.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...l}=e,c=x.useContext(ure),[u,d]=x.useState(null),f=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=x.useState({}),v=Zt(t,$=>d($)),m=Array.from(c.layers),[g]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(g),b=u?m.indexOf(u):-1,w=c.layersWithOutsidePointerEventsDisabled.size>0,S=b>=y,E=c_e($=>{const P=$.target,A=[...c.branches].some(O=>O.contains(P));!S||A||(i==null||i($),o==null||o($),$.defaultPrevented||s==null||s())},f),_=u_e($=>{const P=$.target;[...c.branches].some(O=>O.contains(P))||(a==null||a($),o==null||o($),$.defaultPrevented||s==null||s())},f);return i_e($=>{b===c.layers.size-1&&(r==null||r($),!$.defaultPrevented&&s&&($.preventDefault(),s()))},f),x.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(D5=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),L5(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=D5)}},[u,f,n,c]),x.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),L5())},[u,c]),x.useEffect(()=>{const $=()=>h({});return document.addEventListener(lI,$),()=>document.removeEventListener(lI,$)},[]),p.jsx(vt.div,{...l,ref:v,style:{pointerEvents:w?S?"auto":"none":void 0,...e.style},onFocusCapture:Ge(e.onFocusCapture,_.onFocusCapture),onBlurCapture:Ge(e.onBlurCapture,_.onBlurCapture),onPointerDownCapture:Ge(e.onPointerDownCapture,E.onPointerDownCapture)})});Vu.displayName=a_e;var l_e="DismissableLayerBranch",dre=x.forwardRef((e,t)=>{const n=x.useContext(ure),r=x.useRef(null),i=Zt(t,r);return x.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),p.jsx(vt.div,{...e,ref:i})});dre.displayName=l_e;function c_e(e,t=globalThis==null?void 0:globalThis.document){const n=Sa(e),r=x.useRef(!1),i=x.useRef(()=>{});return x.useEffect(()=>{const a=s=>{if(s.target&&!r.current){let l=function(){fre(o_e,n,c,{discrete:!0})};const c={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=l,t.addEventListener("click",i.current,{once:!0})):l()}else t.removeEventListener("click",i.current);r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",a),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function u_e(e,t=globalThis==null?void 0:globalThis.document){const n=Sa(e),r=x.useRef(!1);return x.useEffect(()=>{const i=a=>{a.target&&!r.current&&fre(s_e,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function L5(){const e=new CustomEvent(lI);document.dispatchEvent(e)}function fre(e,t,n,{discrete:r}){const i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?n6(i,a):i.dispatchEvent(a)}var d_e=Vu,f_e=dre,mi=globalThis!=null&&globalThis.document?x.useLayoutEffect:()=>{},h_e=zs[" useId ".trim().toString()]||(()=>{}),p_e=0;function pi(e){const[t,n]=x.useState(h_e());return mi(()=>{n(r=>r??String(p_e++))},[e]),e||(t?`radix-${t}`:"")}const m_e=["top","right","bottom","left"],_u=Math.min,Va=Math.max,__=Math.round,Bb=Math.floor,Rs=e=>({x:e,y:e}),g_e={left:"right",right:"left",bottom:"top",top:"bottom"},v_e={start:"end",end:"start"};function cI(e,t,n){return Va(e,_u(t,n))}function ec(e,t){return typeof e=="function"?e(t):e}function tc(e){return e.split("-")[0]}function Om(e){return e.split("-")[1]}function r6(e){return e==="x"?"y":"x"}function i6(e){return e==="y"?"height":"width"}function Su(e){return["top","bottom"].includes(tc(e))?"y":"x"}function a6(e){return r6(Su(e))}function y_e(e,t,n){n===void 0&&(n=!1);const r=Om(e),i=a6(e),a=i6(i);let o=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(o=S_(o)),[o,S_(o)]}function b_e(e){const t=S_(e);return[uI(e),t,uI(t)]}function uI(e){return e.replace(/start|end/g,t=>v_e[t])}function x_e(e,t,n){const r=["left","right"],i=["right","left"],a=["top","bottom"],o=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:r:t?r:i;case"left":case"right":return t?a:o;default:return[]}}function w_e(e,t,n,r){const i=Om(e);let a=x_e(tc(e),n==="start",r);return i&&(a=a.map(o=>o+"-"+i),t&&(a=a.concat(a.map(uI)))),a}function S_(e){return e.replace(/left|right|bottom|top/g,t=>g_e[t])}function __e(e){return{top:0,right:0,bottom:0,left:0,...e}}function hre(e){return typeof e!="number"?__e(e):{top:e,right:e,bottom:e,left:e}}function E_(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function F5(e,t,n){let{reference:r,floating:i}=e;const a=Su(t),o=a6(t),s=i6(o),l=tc(t),c=a==="y",u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2;let h;switch(l){case"top":h={x:u,y:r.y-i.height};break;case"bottom":h={x:u,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-i.width,y:d};break;default:h={x:r.x,y:r.y}}switch(Om(t)){case"start":h[o]-=f*(n&&c?-1:1);break;case"end":h[o]+=f*(n&&c?-1:1);break}return h}const S_e=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:a=[],platform:o}=n,s=a.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(t));let c=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=F5(c,r,l),f=r,h={},v=0;for(let m=0;m<s.length;m++){const{name:g,fn:y}=s[m],{x:b,y:w,data:S,reset:E}=await y({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:h,rects:c,platform:o,elements:{reference:e,floating:t}});u=b??u,d=w??d,h={...h,[g]:{...h[g],...S}},E&&v<=50&&(v++,typeof E=="object"&&(E.placement&&(f=E.placement),E.rects&&(c=E.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):E.rects),{x:u,y:d}=F5(c,f,l)),m=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:h}};async function n0(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:a,rects:o,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=ec(t,e),v=hre(h),g=s[f?d==="floating"?"reference":"floating":d],y=E_(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(g)))==null||n?g:g.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),b=d==="floating"?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,w=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),S=await(a.isElement==null?void 0:a.isElement(w))?await(a.getScale==null?void 0:a.getScale(w))||{x:1,y:1}:{x:1,y:1},E=E_(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:b,offsetParent:w,strategy:l}):b);return{top:(y.top-E.top+v.top)/S.y,bottom:(E.bottom-y.bottom+v.bottom)/S.y,left:(y.left-E.left+v.left)/S.x,right:(E.right-y.right+v.right)/S.x}}const E_e=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:l}=t,{element:c,padding:u=0}=ec(e,t)||{};if(c==null)return{};const d=hre(u),f={x:n,y:r},h=a6(i),v=i6(h),m=await o.getDimensions(c),g=h==="y",y=g?"top":"left",b=g?"bottom":"right",w=g?"clientHeight":"clientWidth",S=a.reference[v]+a.reference[h]-f[h]-a.floating[v],E=f[h]-a.reference[h],_=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let $=_?_[w]:0;(!$||!await(o.isElement==null?void 0:o.isElement(_)))&&($=s.floating[w]||a.floating[v]);const P=S/2-E/2,A=$/2-m[v]/2-1,O=_u(d[y],A),k=_u(d[b],A),N=O,F=$-m[v]-k,M=$/2-m[v]/2+P,H=cI(N,M,F),G=!l.arrow&&Om(i)!=null&&M!==H&&a.reference[v]/2-(M<N?O:k)-m[v]/2<0,X=G?M<N?M-N:M-F:0;return{[h]:f[h]+X,data:{[h]:H,centerOffset:M-H-X,...G&&{alignmentOffset:X}},reset:G}}}),$_e=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:a,rects:o,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:m=!0,...g}=ec(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const y=tc(i),b=Su(s),w=tc(s)===s,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),E=f||(w||!m?[S_(s)]:b_e(s)),_=v!=="none";!f&&_&&E.push(...w_e(s,m,v,S));const $=[s,...E],P=await n0(t,g),A=[];let O=((r=a.flip)==null?void 0:r.overflows)||[];if(u&&A.push(P[y]),d){const M=y_e(i,o,S);A.push(P[M[0]],P[M[1]])}if(O=[...O,{placement:i,overflows:A}],!A.every(M=>M<=0)){var k,N;const M=(((k=a.flip)==null?void 0:k.index)||0)+1,H=$[M];if(H)return{data:{index:M,overflows:O},reset:{placement:H}};let G=(N=O.filter(X=>X.overflows[0]<=0).sort((X,Y)=>X.overflows[1]-Y.overflows[1])[0])==null?void 0:N.placement;if(!G)switch(h){case"bestFit":{var F;const X=(F=O.filter(Y=>{if(_){const J=Su(Y.placement);return J===b||J==="y"}return!0}).map(Y=>[Y.placement,Y.overflows.filter(J=>J>0).reduce((J,I)=>J+I,0)]).sort((Y,J)=>Y[1]-J[1])[0])==null?void 0:F[0];X&&(G=X);break}case"initialPlacement":G=s;break}if(i!==G)return{reset:{placement:G}}}return{}}}};function q5(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function U5(e){return m_e.some(t=>e[t]>=0)}const P_e=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=ec(e,t);switch(r){case"referenceHidden":{const a=await n0(t,{...i,elementContext:"reference"}),o=q5(a,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:U5(o)}}}case"escaped":{const a=await n0(t,{...i,altBoundary:!0}),o=q5(a,n.floating);return{data:{escapedOffsets:o,escaped:U5(o)}}}default:return{}}}}};async function C_e(e,t){const{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=tc(n),s=Om(n),l=Su(n)==="y",c=["left","top"].includes(o)?-1:1,u=a&&l?-1:1,d=ec(t,e);let{mainAxis:f,crossAxis:h,alignmentAxis:v}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof v=="number"&&(h=s==="end"?v*-1:v),l?{x:h*u,y:f*c}:{x:f*c,y:h*u}}const A_e=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:a,placement:o,middlewareData:s}=t,l=await C_e(t,e);return o===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:a+l.y,data:{...l,placement:o}}}}},T_e=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:a=!0,crossAxis:o=!1,limiter:s={fn:g=>{let{x:y,y:b}=g;return{x:y,y:b}}},...l}=ec(e,t),c={x:n,y:r},u=await n0(t,l),d=Su(tc(i)),f=r6(d);let h=c[f],v=c[d];if(a){const g=f==="y"?"top":"left",y=f==="y"?"bottom":"right",b=h+u[g],w=h-u[y];h=cI(b,h,w)}if(o){const g=d==="y"?"top":"left",y=d==="y"?"bottom":"right",b=v+u[g],w=v-u[y];v=cI(b,v,w)}const m=s.fn({...t,[f]:h,[d]:v});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[f]:a,[d]:o}}}}}},O_e=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=ec(e,t),u={x:n,y:r},d=Su(i),f=r6(d);let h=u[f],v=u[d];const m=ec(s,t),g=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const w=f==="y"?"height":"width",S=a.reference[f]-a.floating[w]+g.mainAxis,E=a.reference[f]+a.reference[w]-g.mainAxis;h<S?h=S:h>E&&(h=E)}if(c){var y,b;const w=f==="y"?"width":"height",S=["top","left"].includes(tc(i)),E=a.reference[d]-a.floating[w]+(S&&((y=o.offset)==null?void 0:y[d])||0)+(S?0:g.crossAxis),_=a.reference[d]+a.reference[w]+(S?0:((b=o.offset)==null?void 0:b[d])||0)-(S?g.crossAxis:0);v<E?v=E:v>_&&(v=_)}return{[f]:h,[d]:v}}}},R_e=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:a,platform:o,elements:s}=t,{apply:l=()=>{},...c}=ec(e,t),u=await n0(t,c),d=tc(i),f=Om(i),h=Su(i)==="y",{width:v,height:m}=a.floating;let g,y;d==="top"||d==="bottom"?(g=d,y=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?"start":"end")?"left":"right"):(y=d,g=f==="end"?"top":"bottom");const b=m-u.top-u.bottom,w=v-u.left-u.right,S=_u(m-u[g],b),E=_u(v-u[y],w),_=!t.middlewareData.shift;let $=S,P=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(P=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&($=b),_&&!f){const O=Va(u.left,0),k=Va(u.right,0),N=Va(u.top,0),F=Va(u.bottom,0);h?P=v-2*(O!==0||k!==0?O+k:Va(u.left,u.right)):$=m-2*(N!==0||F!==0?N+F:Va(u.top,u.bottom))}await l({...t,availableWidth:P,availableHeight:$});const A=await o.getDimensions(s.floating);return v!==A.width||m!==A.height?{reset:{rects:!0}}:{}}}};function zE(){return typeof window<"u"}function Rm(e){return pre(e)?(e.nodeName||"").toLowerCase():"#document"}function Ka(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function nl(e){var t;return(t=(pre(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function pre(e){return zE()?e instanceof Node||e instanceof Ka(e).Node:!1}function os(e){return zE()?e instanceof Element||e instanceof Ka(e).Element:!1}function Bs(e){return zE()?e instanceof HTMLElement||e instanceof Ka(e).HTMLElement:!1}function V5(e){return!zE()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ka(e).ShadowRoot}function Ny(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=ss(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function j_e(e){return["table","td","th"].includes(Rm(e))}function BE(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function o6(e){const t=s6(),n=os(e)?ss(e):e;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function k_e(e){let t=Eu(e);for(;Bs(t)&&!Ap(t);){if(o6(t))return t;if(BE(t))return null;t=Eu(t)}return null}function s6(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ap(e){return["html","body","#document"].includes(Rm(e))}function ss(e){return Ka(e).getComputedStyle(e)}function HE(e){return os(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Eu(e){if(Rm(e)==="html")return e;const t=e.assignedSlot||e.parentNode||V5(e)&&e.host||nl(e);return V5(t)?t.host:t}function mre(e){const t=Eu(e);return Ap(t)?e.ownerDocument?e.ownerDocument.body:e.body:Bs(t)&&Ny(t)?t:mre(t)}function r0(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=mre(e),a=i===((r=e.ownerDocument)==null?void 0:r.body),o=Ka(i);if(a){const s=dI(o);return t.concat(o,o.visualViewport||[],Ny(i)?i:[],s&&n?r0(s):[])}return t.concat(i,r0(i,[],n))}function dI(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function gre(e){const t=ss(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Bs(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=__(n)!==a||__(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function l6(e){return os(e)?e:e.contextElement}function ep(e){const t=l6(e);if(!Bs(t))return Rs(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:a}=gre(t);let o=(a?__(n.width):n.width)/r,s=(a?__(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}const N_e=Rs(0);function vre(e){const t=Ka(e);return!s6()||!t.visualViewport?N_e:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function I_e(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ka(e)?!1:t}function xf(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),a=l6(e);let o=Rs(1);t&&(r?os(r)&&(o=ep(r)):o=ep(e));const s=I_e(a,n,r)?vre(a):Rs(0);let l=(i.left+s.x)/o.x,c=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){const f=Ka(a),h=r&&os(r)?Ka(r):r;let v=f,m=dI(v);for(;m&&r&&h!==v;){const g=ep(m),y=m.getBoundingClientRect(),b=ss(m),w=y.left+(m.clientLeft+parseFloat(b.paddingLeft))*g.x,S=y.top+(m.clientTop+parseFloat(b.paddingTop))*g.y;l*=g.x,c*=g.y,u*=g.x,d*=g.y,l+=w,c+=S,v=Ka(m),m=dI(v)}}return E_({width:u,height:d,x:l,y:c})}function c6(e,t){const n=HE(e).scrollLeft;return t?t.left+n:xf(nl(e)).left+n}function yre(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),i=r.left+t.scrollLeft-(n?0:c6(e,r)),a=r.top+t.scrollTop;return{x:i,y:a}}function M_e(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const a=i==="fixed",o=nl(r),s=t?BE(t.floating):!1;if(r===o||s&&a)return n;let l={scrollLeft:0,scrollTop:0},c=Rs(1);const u=Rs(0),d=Bs(r);if((d||!d&&!a)&&((Rm(r)!=="body"||Ny(o))&&(l=HE(r)),Bs(r))){const h=xf(r);c=ep(r),u.x=h.x+r.clientLeft,u.y=h.y+r.clientTop}const f=o&&!d&&!a?yre(o,l,!0):Rs(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:n.y*c.y-l.scrollTop*c.y+u.y+f.y}}function D_e(e){return Array.from(e.getClientRects())}function L_e(e){const t=nl(e),n=HE(e),r=e.ownerDocument.body,i=Va(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Va(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+c6(e);const s=-n.scrollTop;return ss(r).direction==="rtl"&&(o+=Va(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}function F_e(e,t){const n=Ka(e),r=nl(e),i=n.visualViewport;let a=r.clientWidth,o=r.clientHeight,s=0,l=0;if(i){a=i.width,o=i.height;const c=s6();(!c||c&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:a,height:o,x:s,y:l}}function q_e(e,t){const n=xf(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Bs(e)?ep(e):Rs(1),o=e.clientWidth*a.x,s=e.clientHeight*a.y,l=i*a.x,c=r*a.y;return{width:o,height:s,x:l,y:c}}function z5(e,t,n){let r;if(t==="viewport")r=F_e(e,n);else if(t==="document")r=L_e(nl(e));else if(os(t))r=q_e(t,n);else{const i=vre(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return E_(r)}function bre(e,t){const n=Eu(e);return n===t||!os(n)||Ap(n)?!1:ss(n).position==="fixed"||bre(n,t)}function U_e(e,t){const n=t.get(e);if(n)return n;let r=r0(e,[],!1).filter(s=>os(s)&&Rm(s)!=="body"),i=null;const a=ss(e).position==="fixed";let o=a?Eu(e):e;for(;os(o)&&!Ap(o);){const s=ss(o),l=o6(o);!l&&s.position==="fixed"&&(i=null),(a?!l&&!i:!l&&s.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Ny(o)&&!l&&bre(e,o))?r=r.filter(u=>u!==o):i=s,o=Eu(o)}return t.set(e,r),r}function V_e(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[...n==="clippingAncestors"?BE(t)?[]:U_e(t,this._c):[].concat(n),r],s=o[0],l=o.reduce((c,u)=>{const d=z5(t,u,i);return c.top=Va(d.top,c.top),c.right=_u(d.right,c.right),c.bottom=_u(d.bottom,c.bottom),c.left=Va(d.left,c.left),c},z5(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function z_e(e){const{width:t,height:n}=gre(e);return{width:t,height:n}}function B_e(e,t,n){const r=Bs(t),i=nl(t),a=n==="fixed",o=xf(e,!0,a,t);let s={scrollLeft:0,scrollTop:0};const l=Rs(0);if(r||!r&&!a)if((Rm(t)!=="body"||Ny(i))&&(s=HE(t)),r){const f=xf(t,!0,a,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else i&&(l.x=c6(i));const c=i&&!r&&!a?yre(i,s):Rs(0),u=o.left+s.scrollLeft-l.x-c.x,d=o.top+s.scrollTop-l.y-c.y;return{x:u,y:d,width:o.width,height:o.height}}function NP(e){return ss(e).position==="static"}function B5(e,t){if(!Bs(e)||ss(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return nl(e)===n&&(n=n.ownerDocument.body),n}function xre(e,t){const n=Ka(e);if(BE(e))return n;if(!Bs(e)){let i=Eu(e);for(;i&&!Ap(i);){if(os(i)&&!NP(i))return i;i=Eu(i)}return n}let r=B5(e,t);for(;r&&j_e(r)&&NP(r);)r=B5(r,t);return r&&Ap(r)&&NP(r)&&!o6(r)?n:r||k_e(e)||n}const H_e=async function(e){const t=this.getOffsetParent||xre,n=this.getDimensions,r=await n(e.floating);return{reference:B_e(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function W_e(e){return ss(e).direction==="rtl"}const G_e={convertOffsetParentRelativeRectToViewportRelativeRect:M_e,getDocumentElement:nl,getClippingRect:V_e,getOffsetParent:xre,getElementRects:H_e,getClientRects:D_e,getDimensions:z_e,getScale:ep,isElement:os,isRTL:W_e};function wre(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function K_e(e,t){let n=null,r;const i=nl(e);function a(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function o(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),a();const c=e.getBoundingClientRect(),{left:u,top:d,width:f,height:h}=c;if(s||t(),!f||!h)return;const v=Bb(d),m=Bb(i.clientWidth-(u+f)),g=Bb(i.clientHeight-(d+h)),y=Bb(u),w={rootMargin:-v+"px "+-m+"px "+-g+"px "+-y+"px",threshold:Va(0,_u(1,l))||1};let S=!0;function E(_){const $=_[0].intersectionRatio;if($!==l){if(!S)return o();$?o(!1,$):r=setTimeout(()=>{o(!1,1e-7)},1e3)}$===1&&!wre(c,e.getBoundingClientRect())&&o(),S=!1}try{n=new IntersectionObserver(E,{...w,root:i.ownerDocument})}catch{n=new IntersectionObserver(E,w)}n.observe(e)}return o(!0),a}function Z_e(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=l6(e),u=i||a?[...c?r0(c):[],...r0(t)]:[];u.forEach(y=>{i&&y.addEventListener("scroll",n,{passive:!0}),a&&y.addEventListener("resize",n)});const d=c&&s?K_e(c,n):null;let f=-1,h=null;o&&(h=new ResizeObserver(y=>{let[b]=y;b&&b.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var w;(w=h)==null||w.observe(t)})),n()}),c&&!l&&h.observe(c),h.observe(t));let v,m=l?xf(e):null;l&&g();function g(){const y=xf(e);m&&!wre(m,y)&&n(),m=y,v=requestAnimationFrame(g)}return n(),()=>{var y;u.forEach(b=>{i&&b.removeEventListener("scroll",n),a&&b.removeEventListener("resize",n)}),d==null||d(),(y=h)==null||y.disconnect(),h=null,l&&cancelAnimationFrame(v)}}const Y_e=A_e,X_e=T_e,Q_e=$_e,J_e=R_e,eSe=P_e,H5=E_e,tSe=O_e,nSe=(e,t,n)=>{const r=new Map,i={platform:G_e,...n},a={...i.platform,_c:r};return S_e(e,t,{...i,platform:a})};var Hw=typeof document<"u"?x.useLayoutEffect:x.useEffect;function $_(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!$_(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const a=i[r];if(!(a==="_owner"&&e.$$typeof)&&!$_(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function _re(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function W5(e,t){const n=_re(e);return Math.round(t*n)/n}function IP(e){const t=x.useRef(e);return Hw(()=>{t.current=e}),t}function rSe(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[u,d]=x.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,h]=x.useState(r);$_(f,r)||h(r);const[v,m]=x.useState(null),[g,y]=x.useState(null),b=x.useCallback(Y=>{Y!==_.current&&(_.current=Y,m(Y))},[]),w=x.useCallback(Y=>{Y!==$.current&&($.current=Y,y(Y))},[]),S=a||v,E=o||g,_=x.useRef(null),$=x.useRef(null),P=x.useRef(u),A=l!=null,O=IP(l),k=IP(i),N=IP(c),F=x.useCallback(()=>{if(!_.current||!$.current)return;const Y={placement:t,strategy:n,middleware:f};k.current&&(Y.platform=k.current),nSe(_.current,$.current,Y).then(J=>{const I={...J,isPositioned:N.current!==!1};M.current&&!$_(P.current,I)&&(P.current=I,Ji.flushSync(()=>{d(I)}))})},[f,t,n,k,N]);Hw(()=>{c===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,d(Y=>({...Y,isPositioned:!1})))},[c]);const M=x.useRef(!1);Hw(()=>(M.current=!0,()=>{M.current=!1}),[]),Hw(()=>{if(S&&(_.current=S),E&&($.current=E),S&&E){if(O.current)return O.current(S,E,F);F()}},[S,E,F,O,A]);const H=x.useMemo(()=>({reference:_,floating:$,setReference:b,setFloating:w}),[b,w]),G=x.useMemo(()=>({reference:S,floating:E}),[S,E]),X=x.useMemo(()=>{const Y={position:n,left:0,top:0};if(!G.floating)return Y;const J=W5(G.floating,u.x),I=W5(G.floating,u.y);return s?{...Y,transform:"translate("+J+"px, "+I+"px)",..._re(G.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:J,top:I}},[n,s,G.floating,u.x,u.y]);return x.useMemo(()=>({...u,update:F,refs:H,elements:G,floatingStyles:X}),[u,F,H,G,X])}const iSe=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?H5({element:r.current,padding:i}).fn(n):{}:r?H5({element:r,padding:i}).fn(n):{}}}},aSe=(e,t)=>({...Y_e(e),options:[e,t]}),oSe=(e,t)=>({...X_e(e),options:[e,t]}),sSe=(e,t)=>({...tSe(e),options:[e,t]}),lSe=(e,t)=>({...Q_e(e),options:[e,t]}),cSe=(e,t)=>({...J_e(e),options:[e,t]}),uSe=(e,t)=>({...eSe(e),options:[e,t]}),dSe=(e,t)=>({...iSe(e),options:[e,t]});var fSe="Arrow",Sre=x.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...a}=e;return p.jsx(vt.svg,{...a,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:p.jsx("polygon",{points:"0,0 30,0 15,10"})})});Sre.displayName=fSe;var hSe=Sre;function u6(e){const[t,n]=x.useState(void 0);return mi(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const a=i[0];let o,s;if("borderBoxSize"in a){const l=a.borderBoxSize,c=Array.isArray(l)?l[0]:l;o=c.inlineSize,s=c.blockSize}else o=e.offsetWidth,s=e.offsetHeight;n({width:o,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var d6="Popper",[Ere,rl]=$a(d6),[pSe,$re]=Ere(d6),Pre=e=>{const{__scopePopper:t,children:n}=e,[r,i]=x.useState(null);return p.jsx(pSe,{scope:t,anchor:r,onAnchorChange:i,children:n})};Pre.displayName=d6;var Cre="PopperAnchor",Are=x.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,a=$re(Cre,n),o=x.useRef(null),s=Zt(t,o);return x.useEffect(()=>{a.onAnchorChange((r==null?void 0:r.current)||o.current)}),r?null:p.jsx(vt.div,{...i,ref:s})});Are.displayName=Cre;var f6="PopperContent",[mSe,gSe]=Ere(f6),Tre=x.forwardRef((e,t)=>{var K,te,ne,re,U,q;const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:a="center",alignOffset:o=0,arrowPadding:s=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:u=0,sticky:d="partial",hideWhenDetached:f=!1,updatePositionStrategy:h="optimized",onPlaced:v,...m}=e,g=$re(f6,n),[y,b]=x.useState(null),w=Zt(t,ee=>b(ee)),[S,E]=x.useState(null),_=u6(S),$=(_==null?void 0:_.width)??0,P=(_==null?void 0:_.height)??0,A=r+(a!=="center"?"-"+a:""),O=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},k=Array.isArray(c)?c:[c],N=k.length>0,F={padding:O,boundary:k.filter(ySe),altBoundary:N},{refs:M,floatingStyles:H,placement:G,isPositioned:X,middlewareData:Y}=rSe({strategy:"fixed",placement:A,whileElementsMounted:(...ee)=>Z_e(...ee,{animationFrame:h==="always"}),elements:{reference:g.anchor},middleware:[aSe({mainAxis:i+P,alignmentAxis:o}),l&&oSe({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?sSe():void 0,...F}),l&&lSe({...F}),cSe({...F,apply:({elements:ee,rects:se,availableWidth:ye,availableHeight:Ee})=>{const{width:ze,height:tt}=se.reference,Qe=ee.floating.style;Qe.setProperty("--radix-popper-available-width",`${ye}px`),Qe.setProperty("--radix-popper-available-height",`${Ee}px`),Qe.setProperty("--radix-popper-anchor-width",`${ze}px`),Qe.setProperty("--radix-popper-anchor-height",`${tt}px`)}}),S&&dSe({element:S,padding:s}),bSe({arrowWidth:$,arrowHeight:P}),f&&uSe({strategy:"referenceHidden",...F})]}),[J,I]=jre(G),L=Sa(v);mi(()=>{X&&(L==null||L())},[X,L]);const D=(K=Y.arrow)==null?void 0:K.x,T=(te=Y.arrow)==null?void 0:te.y,C=((ne=Y.arrow)==null?void 0:ne.centerOffset)!==0,[j,z]=x.useState();return mi(()=>{y&&z(window.getComputedStyle(y).zIndex)},[y]),p.jsx("div",{ref:M.setFloating,"data-radix-popper-content-wrapper":"",style:{...H,transform:X?H.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:j,"--radix-popper-transform-origin":[(re=Y.transformOrigin)==null?void 0:re.x,(U=Y.transformOrigin)==null?void 0:U.y].join(" "),...((q=Y.hide)==null?void 0:q.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:p.jsx(mSe,{scope:n,placedSide:J,onArrowChange:E,arrowX:D,arrowY:T,shouldHideArrow:C,children:p.jsx(vt.div,{"data-side":J,"data-align":I,...m,ref:w,style:{...m.style,animation:X?void 0:"none"}})})})});Tre.displayName=f6;var Ore="PopperArrow",vSe={top:"bottom",right:"left",bottom:"top",left:"right"},Rre=x.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,a=gSe(Ore,r),o=vSe[a.placedSide];return p.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:p.jsx(hSe,{...i,ref:n,style:{...i.style,display:"block"}})})});Rre.displayName=Ore;function ySe(e){return e!==null}var bSe=e=>({name:"transformOrigin",options:e,fn(t){var g,y,b;const{placement:n,rects:r,middlewareData:i}=t,o=((g=i.arrow)==null?void 0:g.centerOffset)!==0,s=o?0:e.arrowWidth,l=o?0:e.arrowHeight,[c,u]=jre(n),d={start:"0%",center:"50%",end:"100%"}[u],f=(((y=i.arrow)==null?void 0:y.x)??0)+s/2,h=(((b=i.arrow)==null?void 0:b.y)??0)+l/2;let v="",m="";return c==="bottom"?(v=o?d:`${f}px`,m=`${-l}px`):c==="top"?(v=o?d:`${f}px`,m=`${r.floating.height+l}px`):c==="right"?(v=`${-l}px`,m=o?d:`${h}px`):c==="left"&&(v=`${r.floating.width+l}px`,m=o?d:`${h}px`),{data:{x:v,y:m}}}});function jre(e){const[t,n="center"]=e.split("-");return[t,n]}var Iy=Pre,jm=Are,My=Tre,Dy=Rre,xSe="Portal",km=x.forwardRef((e,t)=>{var s;const{container:n,...r}=e,[i,a]=x.useState(!1);mi(()=>a(!0),[]);const o=n||i&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return o?sre.createPortal(p.jsx(vt.div,{...r,ref:t}),o):null});km.displayName=xSe;function wSe(e,t){return x.useReducer((n,r)=>t[n][r]??n,e)}var sa=e=>{const{present:t,children:n}=e,r=_Se(t),i=typeof n=="function"?n({present:r.isPresent}):x.Children.only(n),a=Zt(r.ref,SSe(i));return typeof n=="function"||r.isPresent?x.cloneElement(i,{ref:a}):null};sa.displayName="Presence";function _Se(e){const[t,n]=x.useState(),r=x.useRef(null),i=x.useRef(e),a=x.useRef("none"),o=e?"mounted":"unmounted",[s,l]=wSe(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return x.useEffect(()=>{const c=Hb(r.current);a.current=s==="mounted"?c:"none"},[s]),mi(()=>{const c=r.current,u=i.current;if(u!==e){const f=a.current,h=Hb(c);e?l("MOUNT"):h==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&f!==h?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),mi(()=>{if(t){let c;const u=t.ownerDocument.defaultView??window,d=h=>{const m=Hb(r.current).includes(h.animationName);if(h.target===t&&m&&(l("ANIMATION_END"),!i.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},f=h=>{h.target===t&&(a.current=Hb(r.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:x.useCallback(c=>{r.current=c?getComputedStyle(c):null,n(c)},[])}}function Hb(e){return(e==null?void 0:e.animationName)||"none"}function SSe(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ESe=zs[" useInsertionEffect ".trim().toString()]||mi;function Po({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,a,o]=$Se({defaultProp:t,onChange:n}),s=e!==void 0,l=s?e:i;{const u=x.useRef(e!==void 0);x.useEffect(()=>{const d=u.current;d!==s&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${s?"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.`),u.current=s},[s,r])}const c=x.useCallback(u=>{var d;if(s){const f=PSe(u)?u(e):u;f!==e&&((d=o.current)==null||d.call(o,f))}else a(u)},[s,e,a,o]);return[l,c]}function $Se({defaultProp:e,onChange:t}){const[n,r]=x.useState(e),i=x.useRef(n),a=x.useRef(t);return ESe(()=>{a.current=t},[t]),x.useEffect(()=>{var o;i.current!==n&&((o=a.current)==null||o.call(a,n),i.current=n)},[n,i]),[n,r,a]}function PSe(e){return typeof e=="function"}var kre=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"}),CSe="VisuallyHidden",WE=x.forwardRef((e,t)=>p.jsx(vt.span,{...e,ref:t,style:{...kre,...e.style}}));WE.displayName=CSe;var ASe=WE,[GE,iCt]=$a("Tooltip",[rl]),KE=rl(),Nre="TooltipProvider",TSe=700,fI="tooltip.open",[OSe,h6]=GE(Nre),Ire=e=>{const{__scopeTooltip:t,delayDuration:n=TSe,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,o=x.useRef(!0),s=x.useRef(!1),l=x.useRef(0);return x.useEffect(()=>{const c=l.current;return()=>window.clearTimeout(c)},[]),p.jsx(OSe,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:x.useCallback(()=>{window.clearTimeout(l.current),o.current=!1},[]),onClose:x.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>o.current=!0,r)},[r]),isPointerInTransitRef:s,onPointerInTransitChange:x.useCallback(c=>{s.current=c},[]),disableHoverableContent:i,children:a})};Ire.displayName=Nre;var i0="Tooltip",[RSe,ZE]=GE(i0),Mre=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,l=h6(i0,e.__scopeTooltip),c=KE(t),[u,d]=x.useState(null),f=pi(),h=x.useRef(0),v=o??l.disableHoverableContent,m=s??l.delayDuration,g=x.useRef(!1),[y,b]=Po({prop:r,defaultProp:i??!1,onChange:$=>{$?(l.onOpen(),document.dispatchEvent(new CustomEvent(fI))):l.onClose(),a==null||a($)},caller:i0}),w=x.useMemo(()=>y?g.current?"delayed-open":"instant-open":"closed",[y]),S=x.useCallback(()=>{window.clearTimeout(h.current),h.current=0,g.current=!1,b(!0)},[b]),E=x.useCallback(()=>{window.clearTimeout(h.current),h.current=0,b(!1)},[b]),_=x.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{g.current=!0,b(!0),h.current=0},m)},[m,b]);return x.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),p.jsx(Iy,{...c,children:p.jsx(RSe,{scope:t,contentId:f,open:y,stateAttribute:w,trigger:u,onTriggerChange:d,onTriggerEnter:x.useCallback(()=>{l.isOpenDelayedRef.current?_():S()},[l.isOpenDelayedRef,_,S]),onTriggerLeave:x.useCallback(()=>{v?E():(window.clearTimeout(h.current),h.current=0)},[E,v]),onOpen:S,onClose:E,disableHoverableContent:v,children:n})})};Mre.displayName=i0;var hI="TooltipTrigger",Dre=x.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=ZE(hI,n),a=h6(hI,n),o=KE(n),s=x.useRef(null),l=Zt(t,s,i.onTriggerChange),c=x.useRef(!1),u=x.useRef(!1),d=x.useCallback(()=>c.current=!1,[]);return x.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),p.jsx(jm,{asChild:!0,...o,children:p.jsx(vt.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:l,onPointerMove:Ge(e.onPointerMove,f=>{f.pointerType!=="touch"&&!u.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),u.current=!0)}),onPointerLeave:Ge(e.onPointerLeave,()=>{i.onTriggerLeave(),u.current=!1}),onPointerDown:Ge(e.onPointerDown,()=>{i.open&&i.onClose(),c.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:Ge(e.onFocus,()=>{c.current||i.onOpen()}),onBlur:Ge(e.onBlur,i.onClose),onClick:Ge(e.onClick,i.onClose)})})});Dre.displayName=hI;var jSe="TooltipPortal",[aCt,kSe]=GE(jSe,{forceMount:void 0}),Tp="TooltipContent",Lre=x.forwardRef((e,t)=>{const n=kSe(Tp,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...a}=e,o=ZE(Tp,e.__scopeTooltip);return p.jsx(sa,{present:r||o.open,children:o.disableHoverableContent?p.jsx(Fre,{side:i,...a,ref:t}):p.jsx(NSe,{side:i,...a,ref:t})})}),NSe=x.forwardRef((e,t)=>{const n=ZE(Tp,e.__scopeTooltip),r=h6(Tp,e.__scopeTooltip),i=x.useRef(null),a=Zt(t,i),[o,s]=x.useState(null),{trigger:l,onClose:c}=n,u=i.current,{onPointerInTransitChange:d}=r,f=x.useCallback(()=>{s(null),d(!1)},[d]),h=x.useCallback((v,m)=>{const g=v.currentTarget,y={x:v.clientX,y:v.clientY},b=LSe(y,g.getBoundingClientRect()),w=FSe(y,b),S=qSe(m.getBoundingClientRect()),E=VSe([...w,...S]);s(E),d(!0)},[d]);return x.useEffect(()=>()=>f(),[f]),x.useEffect(()=>{if(l&&u){const v=g=>h(g,u),m=g=>h(g,l);return l.addEventListener("pointerleave",v),u.addEventListener("pointerleave",m),()=>{l.removeEventListener("pointerleave",v),u.removeEventListener("pointerleave",m)}}},[l,u,h,f]),x.useEffect(()=>{if(o){const v=m=>{const g=m.target,y={x:m.clientX,y:m.clientY},b=(l==null?void 0:l.contains(g))||(u==null?void 0:u.contains(g)),w=!USe(y,o);b?f():w&&(f(),c())};return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[l,u,o,c,f]),p.jsx(Fre,{...e,ref:a})}),[ISe,MSe]=GE(i0,{isInside:!1}),DSe=Jwe("TooltipContent"),Fre=x.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:o,...s}=e,l=ZE(Tp,n),c=KE(n),{onClose:u}=l;return x.useEffect(()=>(document.addEventListener(fI,u),()=>document.removeEventListener(fI,u)),[u]),x.useEffect(()=>{if(l.trigger){const d=f=>{const h=f.target;h!=null&&h.contains(l.trigger)&&u()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,u]),p.jsx(Vu,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:d=>d.preventDefault(),onDismiss:u,children:p.jsxs(My,{"data-state":l.stateAttribute,...c,...s,ref:t,style:{...s.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:[p.jsx(DSe,{children:r}),p.jsx(ISe,{scope:n,isInside:!0,children:p.jsx(ASe,{id:l.contentId,role:"tooltip",children:i||r})})]})})});Lre.displayName=Tp;var qre="TooltipArrow",Ure=x.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=KE(n);return MSe(qre,n).isInside?null:p.jsx(Dy,{...i,...r,ref:t})});Ure.displayName=qre;function LSe(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function FSe(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function qSe(e){const{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function USe(e,t){const{x:n,y:r}=e;let i=!1;for(let a=0,o=t.length-1;a<t.length;o=a++){const s=t[a],l=t[o],c=s.x,u=s.y,d=l.x,f=l.y;u>r!=f>r&&n<(d-c)*(r-u)/(f-u)+c&&(i=!i)}return i}function VSe(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),zSe(t)}function zSe(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const i=e[r];for(;t.length>=2;){const a=t[t.length-1],o=t[t.length-2];if((a.x-o.x)*(i.y-o.y)>=(a.y-o.y)*(i.x-o.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const i=e[r];for(;n.length>=2;){const a=n[n.length-1],o=n[n.length-2];if((a.x-o.x)*(i.y-o.y)>=(a.y-o.y)*(i.x-o.x))n.pop();else break}n.push(i)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var BSe=Ire,Vre=Mre,zre=Dre,Bre=Lre,HSe=Ure;const WSe=BSe,YE=Vre,XE=zre,Nm=x.forwardRef(({className:e,sideOffset:t=4,...n},r)=>p.jsx(Bre,{ref:r,sideOffset:t,className:Ie("z-50 rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md 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",e),...n}));Nm.displayName=Bre.displayName;const Hre=({className:e,...t})=>p.jsx(HSe,{...t,className:Ie("fill-white -translate-y-px drop-shadow-md [clip-path:inset(0_-10px_-10px_-10px)]",e)}),pI=({children:e,content:t,open:n,defaultOpen:r,onOpenChange:i,side:a="top",align:o="center",className:s,asChild:l=!0,...c})=>t?p.jsxs(Vre,{open:n,defaultOpen:r,onOpenChange:i,children:[p.jsx(zre,{asChild:l,children:e}),p.jsxs(Nm,{side:a,align:o,className:s,...c,children:[t,p.jsx(Hre,{})]})]}):e,Av="8.55.0",Hs=globalThis;function p6(e,t,n){const r=n||Hs,i=r.__SENTRY__=r.__SENTRY__||{},a=i[Av]=i[Av]||{};return a[e]||(a[e]=t())}const m6=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,GSe="Sentry Logger ",G5=["debug","info","warn","error","log","assert","trace"],K5={};function Wre(e){if(!("console"in Hs))return e();const t=Hs.console,n={},r=Object.keys(K5);r.forEach(i=>{const a=K5[i];n[i]=t[i],t[i]=a});try{return e()}finally{r.forEach(i=>{t[i]=n[i]})}}function KSe(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return m6?G5.forEach(n=>{t[n]=(...r)=>{e&&Wre(()=>{Hs.console[n](`${GSe}[${n}]:`,...r)})}}):G5.forEach(n=>{t[n]=()=>{}}),t}const Ha=p6("logger",KSe);function QE(){return g6(Hs),Hs}function g6(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||Av,t[Av]=t[Av]||{}}const Gre=Object.prototype.toString;function ZSe(e){switch(Gre.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return JSe(e,Error)}}function YSe(e,t){return Gre.call(e)===`[object ${t}]`}function XSe(e){return YSe(e,"Object")}function QSe(e){return!!(e&&e.then&&typeof e.then=="function")}function JSe(e,t){try{return e instanceof t}catch{return!1}}function eEe(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{m6&&Ha.log(`Failed to add non-enumerable property "${t}" to object`,e)}}const Kre=1e3;function Zre(){return Date.now()/Kre}function tEe(){const{performance:e}=Hs;if(!e||!e.now)return Zre;const t=Date.now()-e.now(),n=e.timeOrigin==null?t:e.timeOrigin;return()=>(n+e.now())/Kre}const nEe=tEe();(()=>{const{performance:e}=Hs;if(!e||!e.now)return;const t=3600*1e3,n=e.now(),r=Date.now(),i=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,a=i<t,o=e.timing&&e.timing.navigationStart,l=typeof o=="number"?Math.abs(o+n-r):t,c=l<t;return a||c?i<=l?e.timeOrigin:o:r})();function tp(){const e=Hs,t=e.crypto||e.msCrypto;let n=()=>Math.random()*16;try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(n=()=>{const r=new Uint8Array(1);return t.getRandomValues(r),r[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,r=>(r^(n()&15)>>r/4).toString(16))}function rEe(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||nEe(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:tp()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{const n=e.timestamp-e.started;e.duration=n>=0?n:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function Z5(){return tp()}function Y5(){return tp().substring(16)}function Yre(e,t,n=2){if(!t||typeof t!="object"||n<=0)return t;if(e&&t&&Object.keys(t).length===0)return e;const r={...e};for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=Yre(r[i],t[i],n-1));return r}const mI="_sentrySpan";function X5(e,t){t?eEe(e,mI,t):delete e[mI]}function Q5(e){return e[mI]}const iEe=100;class v6{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:Z5(),spanId:Y5()}}clone(){const t=new v6;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._extra={...this._extra},t._contexts={...this._contexts},this._contexts.flags&&(t._contexts.flags={values:[...this._contexts.flags.values]}),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._requestSession=this._requestSession,t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,X5(t,Q5(this)),t}setClient(t){this._client=t}setLastEventId(t){this._lastEventId=t}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&rEe(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(t){return this._requestSession=t,this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,n){return this._tags={...this._tags,[t]:n},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,n){return this._extra={...this._extra,[t]:n},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,n){return n===null?delete this._contexts[t]:this._contexts[t]=n,this._notifyScopeListeners(),this}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;const n=typeof t=="function"?t(this):t,[r,i]=n instanceof wf?[n.getScopeData(),n.getRequestSession()]:XSe(n)?[t,t.requestSession]:[],{tags:a,extra:o,user:s,contexts:l,level:c,fingerprint:u=[],propagationContext:d}=r||{};return this._tags={...this._tags,...a},this._extra={...this._extra,...o},this._contexts={...this._contexts,...l},s&&Object.keys(s).length&&(this._user=s),c&&(this._level=c),u.length&&(this._fingerprint=u),d&&(this._propagationContext=d),i&&(this._requestSession=i),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._session=void 0,X5(this,void 0),this._attachments=[],this.setPropagationContext({traceId:Z5()}),this._notifyScopeListeners(),this}addBreadcrumb(t,n){const r=typeof n=="number"?n:iEe;if(r<=0)return this;const i={timestamp:Zre(),...t};return this._breadcrumbs.push(i),this._breadcrumbs.length>r&&(this._breadcrumbs=this._breadcrumbs.slice(-r),this._client&&this._client.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:Q5(this)}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=Yre(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext={spanId:Y5(),...t},this}getPropagationContext(){return this._propagationContext}captureException(t,n){const r=n&&n.event_id?n.event_id:tp();if(!this._client)return Ha.warn("No client configured on scope - will not capture exception!"),r;const i=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:i,...n,event_id:r},this),r}captureMessage(t,n,r){const i=r&&r.event_id?r.event_id:tp();if(!this._client)return Ha.warn("No client configured on scope - will not capture message!"),i;const a=new Error(t);return this._client.captureMessage(t,n,{originalException:t,syntheticException:a,...r,event_id:i},this),i}captureEvent(t,n){const r=n&&n.event_id?n.event_id:tp();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(Ha.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}}const wf=v6;function aEe(){return p6("defaultCurrentScope",()=>new wf)}function oEe(){return p6("defaultIsolationScope",()=>new wf)}class sEe{constructor(t,n){let r;t?r=t:r=new wf;let i;n?i=n:i=new wf,this._stack=[{scope:r}],this._isolationScope=i}withScope(t){const n=this._pushScope();let r;try{r=t(n)}catch(i){throw this._popScope(),i}return QSe(r)?r.then(i=>(this._popScope(),i),i=>{throw this._popScope(),i}):(this._popScope(),r)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const t=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:t}),t}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}}function Op(){const e=QE(),t=g6(e);return t.stack=t.stack||new sEe(aEe(),oEe())}function lEe(e){return Op().withScope(e)}function cEe(e,t){const n=Op();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function J5(e){return Op().withScope(()=>e(Op().getIsolationScope()))}function uEe(){return{withIsolationScope:J5,withScope:lEe,withSetScope:cEe,withSetIsolationScope:(e,t)=>J5(t),getCurrentScope:()=>Op().getScope(),getIsolationScope:()=>Op().getIsolationScope()}}function y6(e){const t=g6(e);return t.acs?t.acs:uEe()}function JE(){const e=QE();return y6(e).getCurrentScope()}function dEe(){const e=QE();return y6(e).getIsolationScope()}function fEe(...e){const t=QE(),n=y6(t);if(e.length===2){const[r,i]=e;return r?n.withSetScope(r,i):n.withScope(i)}return n.withScope(e[0])}function hEe(){return JE().getClient()}const pEe=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function mEe(e){return e==="http"||e==="https"}function gEe(e,t=!1){const{host:n,path:r,pass:i,port:a,projectId:o,protocol:s,publicKey:l}=e;return`${s}://${l}${t&&i?`:${i}`:""}@${n}${a?`:${a}`:""}/${r&&`${r}/`}${o}`}function vEe(e){const t=pEe.exec(e);if(!t){Wre(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[n,r,i="",a="",o="",s=""]=t.slice(1);let l="",c=s;const u=c.split("/");if(u.length>1&&(l=u.slice(0,-1).join("/"),c=u.pop()),c){const d=c.match(/^\d+/);d&&(c=d[0])}return Xre({host:a,pass:i,path:l,projectId:c,port:o,protocol:n,publicKey:r})}function Xre(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function yEe(e){if(!m6)return!0;const{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(o=>e[o]?!1:(Ha.error(`Invalid Sentry Dsn: ${o} missing`),!0))?!1:n.match(/^\d+$/)?mEe(r)?t&&isNaN(parseInt(t,10))?(Ha.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(Ha.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(Ha.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function bEe(e){const t=typeof e=="string"?vEe(e):Xre(e);if(!(!t||!yEe(t)))return t}function xEe(e){if(e)return wEe(e)?{captureContext:e}:SEe(e)?{captureContext:e}:e}function wEe(e){return e instanceof wf||typeof e=="function"}const _Ee=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function SEe(e){return Object.keys(e).some(t=>_Ee.includes(t))}function ra(e,t){return JE().captureException(e,xEe(t))}function Qre(e,t){const n=typeof t=="string"?t:void 0,r=typeof t!="string"?{captureContext:t}:void 0;return JE().captureMessage(e,n,r)}function EEe(){return dEe().lastEventId()}function $Ee(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function PEe(e,t){const n=bEe(e);if(!n)return"";const r=`${$Ee(n)}embed/error-page/`;let i=`dsn=${gEe(n)}`;for(const a in t)if(a!=="dsn"&&a!=="onClose")if(a==="user"){const o=t.user;if(!o)continue;o.name&&(i+=`&name=${encodeURIComponent(o.name)}`),o.email&&(i+=`&email=${encodeURIComponent(o.email)}`)}else i+=`&${encodeURIComponent(a)}=${encodeURIComponent(t[a])}`;return`${r}?${i}`}const Jf=Hs,MP=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function e9(e={}){if(!Jf.document){MP&&Ha.error("Global document not defined in showReportDialog call");return}const t=JE(),n=t.getClient(),r=n&&n.getDsn();if(!r){MP&&Ha.error("DSN not configured for showReportDialog call");return}if(t&&(e.user={...t.getUser(),...e.user}),!e.eventId){const s=EEe();s&&(e.eventId=s)}const i=Jf.document.createElement("script");i.async=!0,i.crossOrigin="anonymous",i.src=PEe(r,e),e.onLoad&&(i.onload=e.onLoad);const{onClose:a}=e;if(a){const s=l=>{if(l.data==="__sentry_reportdialog_closed__")try{a()}finally{Jf.removeEventListener("message",s)}};Jf.addEventListener("message",s)}const o=Jf.document.head||Jf.document.body;o?o.appendChild(i):MP&&Ha.error("Not injecting report dialog. No injection point found in HTML")}function CEe(e){const t=e.match(/^([^.]+)/);return t!==null&&parseInt(t[0])>=17}function AEe(e,t){const n=new WeakSet;function r(i,a){if(!n.has(i)){if(i.cause)return n.add(i),r(i.cause,a);i.cause=a}}r(e,t)}function TEe(e,{componentStack:t},n){if(CEe(x.version)&&ZSe(e)&&t){const r=new Error(e.message);r.name=`React ErrorBoundary ${e.name}`,r.stack=t,AEe(e,r)}return ra(e,{...n,captureContext:{contexts:{react:{componentStack:t}}}})}var DP={exports:{}},bn={};/** @license React v16.13.1
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/static/js/local-worker-CT-ae3Yc.js","/static/js/main-BKE_GwQc.js","/static/css/main-DB0Klj1W.css"])))=>i.map(i=>d[i]);
2
+ var Cxe=Object.defineProperty;var S5=e=>{throw TypeError(e)};var Axe=(e,t,n)=>t in e?Cxe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Xe=(e,t,n)=>Axe(e,typeof t!="symbol"?t+"":t,n),jP=(e,t,n)=>t.has(e)||S5("Cannot "+n);var W=(e,t,n)=>(jP(e,t,"read from private field"),n?n.call(e):t.get(e)),Ze=(e,t,n)=>t.has(e)?S5("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),De=(e,t,n,r)=>(jP(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),ke=(e,t,n)=>(jP(e,t,"access private method"),n);var Ub=(e,t,n,r)=>({set _(i){De(e,t,i,n)},get _(){return W(e,t,r)}});import{r as x,j as p,a as Txe,g as Yt,R as zs,b as oe,l as un,c as Oxe,L as uc,w as Vne,_ as Rxe,d as Vb,F as vf}from"./main-BKE_GwQc.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="79526e05-333c-433e-99f5-47f452425403",e._sentryDebugIdIdentifier="sentry-dbid-79526e05-333c-433e-99f5-47f452425403")}catch{}})();function zne(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=zne(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function dn(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=zne(e))&&(r&&(r+=" "),r+=t);return r}const Y4="-",jxe=e=>{const t=Nxe(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const s=o.split(Y4);return s[0]===""&&s.length!==1&&s.shift(),Bne(s,t)||kxe(o)},getConflictingClassGroupIds:(o,s)=>{const l=n[o]||[];return s&&r[o]?[...l,...r[o]]:l}}},Bne=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?Bne(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const a=e.join(Y4);return(o=t.validators.find(({validator:s})=>s(a)))==null?void 0:o.classGroupId},E5=/^\[(.+)\]$/,kxe=e=>{if(E5.test(e)){const t=E5.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Nxe=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Mxe(Object.entries(e.classGroups),n).forEach(([a,o])=>{GN(o,r,a,t)}),r},GN=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const a=i===""?t:$5(t,i);a.classGroupId=n;return}if(typeof i=="function"){if(Ixe(i)){GN(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([a,o])=>{GN(o,$5(t,a),n,r)})})},$5=(e,t)=>{let n=e;return t.split(Y4).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Ixe=e=>e.isThemeGetter,Mxe=(e,t)=>t?e.map(([n,r])=>{const i=r.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([o,s])=>[t+o,s])):a);return[n,i]}):e,Dxe=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(a,o)=>{n.set(a,o),t++,t>e&&(t=0,r=n,n=new Map)};return{get(a){let o=n.get(a);if(o!==void 0)return o;if((o=r.get(a))!==void 0)return i(a,o),o},set(a,o){n.has(a)?n.set(a,o):i(a,o)}}},Hne="!",Lxe=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],a=t.length,o=s=>{const l=[];let c=0,u=0,d;for(let g=0;g<s.length;g++){let y=s[g];if(c===0){if(y===i&&(r||s.slice(g,g+a)===t)){l.push(s.slice(u,g)),u=g+a;continue}if(y==="/"){d=g;continue}}y==="["?c++:y==="]"&&c--}const f=l.length===0?s:s.substring(u),h=f.startsWith(Hne),v=h?f.substring(1):f,m=d&&d>u?d-u:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:v,maybePostfixModifierPosition:m}};return n?s=>n({className:s,parseClassName:o}):o},Fxe=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},qxe=e=>({cache:Dxe(e.cacheSize),parseClassName:Lxe(e),...jxe(e)}),Uxe=/\s+/,Vxe=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,a=[],o=e.trim().split(Uxe);let s="";for(let l=o.length-1;l>=0;l-=1){const c=o[l],{modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:h}=n(c);let v=!!h,m=r(v?f.substring(0,h):f);if(!m){if(!v){s=c+(s.length>0?" "+s:s);continue}if(m=r(f),!m){s=c+(s.length>0?" "+s:s);continue}v=!1}const g=Fxe(u).join(":"),y=d?g+Hne:g,b=y+m;if(a.includes(b))continue;a.push(b);const w=i(m,v);for(let S=0;S<w.length;++S){const E=w[S];a.push(y+E)}s=c+(s.length>0?" "+s:s)}return s};function zxe(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Wne(t))&&(r&&(r+=" "),r+=n);return r}const Wne=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Wne(e[r]))&&(n&&(n+=" "),n+=t);return n};function Bxe(e,...t){let n,r,i,a=o;function o(l){const c=t.reduce((u,d)=>d(u),e());return n=qxe(c),r=n.cache.get,i=n.cache.set,a=s,s(l)}function s(l){const c=r(l);if(c)return c;const u=Vxe(l,n);return i(l,u),u}return function(){return a(zxe.apply(null,arguments))}}const Hn=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Gne=/^\[(?:([a-z-]+):)?(.+)\]$/i,Hxe=/^\d+\/\d+$/,Wxe=new Set(["px","full","screen"]),Gxe=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Kxe=/\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$/,Zxe=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Yxe=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Xxe=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,pl=e=>Jh(e)||Wxe.has(e)||Hxe.test(e),Sc=e=>Am(e,"length",awe),Jh=e=>!!e&&!Number.isNaN(Number(e)),kP=e=>Am(e,"number",Jh),dg=e=>!!e&&Number.isInteger(Number(e)),Qxe=e=>e.endsWith("%")&&Jh(e.slice(0,-1)),Ut=e=>Gne.test(e),Ec=e=>Gxe.test(e),Jxe=new Set(["length","size","percentage"]),ewe=e=>Am(e,Jxe,Kne),twe=e=>Am(e,"position",Kne),nwe=new Set(["image","url"]),rwe=e=>Am(e,nwe,swe),iwe=e=>Am(e,"",owe),fg=()=>!0,Am=(e,t,n)=>{const r=Gne.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},awe=e=>Kxe.test(e)&&!Zxe.test(e),Kne=()=>!1,owe=e=>Yxe.test(e),swe=e=>Xxe.test(e),lwe=()=>{const e=Hn("colors"),t=Hn("spacing"),n=Hn("blur"),r=Hn("brightness"),i=Hn("borderColor"),a=Hn("borderRadius"),o=Hn("borderSpacing"),s=Hn("borderWidth"),l=Hn("contrast"),c=Hn("grayscale"),u=Hn("hueRotate"),d=Hn("invert"),f=Hn("gap"),h=Hn("gradientColorStops"),v=Hn("gradientColorStopPositions"),m=Hn("inset"),g=Hn("margin"),y=Hn("opacity"),b=Hn("padding"),w=Hn("saturate"),S=Hn("scale"),E=Hn("sepia"),_=Hn("skew"),$=Hn("space"),P=Hn("translate"),A=()=>["auto","contain","none"],O=()=>["auto","hidden","clip","visible","scroll"],k=()=>["auto",Ut,t],N=()=>[Ut,t],F=()=>["",pl,Sc],M=()=>["auto",Jh,Ut],H=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],G=()=>["solid","dashed","dotted","double","none"],X=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Y=()=>["start","end","center","between","around","evenly","stretch"],J=()=>["","0",Ut],I=()=>["auto","avoid","all","avoid-page","page","left","right","column"],L=()=>[Jh,Ut];return{cacheSize:500,separator:":",theme:{colors:[fg],spacing:[pl,Sc],blur:["none","",Ec,Ut],brightness:L(),borderColor:[e],borderRadius:["none","","full",Ec,Ut],borderSpacing:N(),borderWidth:F(),contrast:L(),grayscale:J(),hueRotate:L(),invert:J(),gap:N(),gradientColorStops:[e],gradientColorStopPositions:[Qxe,Sc],inset:k(),margin:k(),opacity:L(),padding:N(),saturate:L(),scale:L(),sepia:J(),skew:L(),space:N(),translate:N()},classGroups:{aspect:[{aspect:["auto","square","video",Ut]}],container:["container"],columns:[{columns:[Ec]}],"break-after":[{"break-after":I()}],"break-before":[{"break-before":I()}],"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"],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:[...H(),Ut]}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",dg,Ut]}],basis:[{basis:k()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Ut]}],grow:[{grow:J()}],shrink:[{shrink:J()}],order:[{order:["first","last","none",dg,Ut]}],"grid-cols":[{"grid-cols":[fg]}],"col-start-end":[{col:["auto",{span:["full",dg,Ut]},Ut]}],"col-start":[{"col-start":M()}],"col-end":[{"col-end":M()}],"grid-rows":[{"grid-rows":[fg]}],"row-start-end":[{row:["auto",{span:[dg,Ut]},Ut]}],"row-start":[{"row-start":M()}],"row-end":[{"row-end":M()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Ut]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ut]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...Y()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Y(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Y(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[b]}],px:[{px:[b]}],py:[{py:[b]}],ps:[{ps:[b]}],pe:[{pe:[b]}],pt:[{pt:[b]}],pr:[{pr:[b]}],pb:[{pb:[b]}],pl:[{pl:[b]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[$]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[$]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Ut,t]}],"min-w":[{"min-w":[Ut,t,"min","max","fit"]}],"max-w":[{"max-w":[Ut,t,"none","full","min","max","fit","prose",{screen:[Ec]},Ec]}],h:[{h:[Ut,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Ut,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Ut,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Ut,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Ec,Sc]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",kP]}],"font-family":[{font:[fg]}],"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:["tighter","tight","normal","wide","wider","widest",Ut]}],"line-clamp":[{"line-clamp":["none",Jh,kP]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",pl,Ut]}],"list-image":[{"list-image":["none",Ut]}],"list-style-type":[{list:["none","disc","decimal",Ut]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...G(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",pl,Sc]}],"underline-offset":[{"underline-offset":["auto",pl,Ut]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ut]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ut]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...H(),twe]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",ewe]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},rwe]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[v]}],"gradient-via-pos":[{via:[v]}],"gradient-to-pos":[{to:[v]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[...G(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:G()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...G()]}],"outline-offset":[{"outline-offset":[pl,Ut]}],"outline-w":[{outline:[pl,Sc]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:F()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[pl,Sc]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Ec,iwe]}],"shadow-color":[{shadow:[fg]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...X(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":X()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Ec,Ut]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[w]}],sepia:[{sepia:[E]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[E]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Ut]}],duration:[{duration:L()}],ease:[{ease:["linear","in","out","in-out",Ut]}],delay:[{delay:L()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ut]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[dg,Ut]}],"translate-x":[{"translate-x":[P]}],"translate-y":[{"translate-y":[P]}],"skew-x":[{"skew-x":[_]}],"skew-y":[{"skew-y":[_]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ut]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],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",Ut]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"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",Ut]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[pl,Sc,kP]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"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-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-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"],"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"]}}},cwe=Bxe(lwe);function Ie(...e){return cwe(dn(e))}const uwe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAYAAAA8AXHiAAAACXBIWXMAAAAAAAAAAQCEeRdzAAAGWElEQVR4nO2dy4oeVRSFo4gXUBEnJqMEzESciIPMvIGCQxUzc6JkojhylKFvEB/Dl7CjCQYj0Yhi1BBFHPkGDiu9/C1S/nTnr+o+q9beZ68PNjR0d11OfVVn17nVicEYAifUB2D6xGIZChbLULBYhoLFMhQslqFgsQwFi2UoWCxDwWIZChbLULBYhoLFMhQslqFgsQwFi2UoWCxDwWIZChbLULBYhoLFMhQslqFgsQwFi2UoWCxDwWIZChbLULBYhoLF2uazv4bhwi/D8Op39+LU1WF46qtN4Ofp7/C3+B/zP2qL9fnfw/D2jxtZHvhivzSOGdgGtoVtYtuFqScWnjCtRJorGvZZjBpiXdqvqs5eW0em+0mGYyjyJOtbrIu/b/IilUyHBY7pUt95WZ9ioep5aE8v0K7AMXZaTfYlFqqZiE+oOU+wzqrIPsT6859hePFbvSDHDZwDzqUD8ouFOz1DtTc3cC4dPL1yi4UGSrUIrEBbWGJyioXqImMutTTQBpa0aswnFgr6scv6i75W4FwTypVLLOQeykZOVSTMu/KIVVWqMXDuieTKIVZ1qRLKFV8s5BeW6l6gWkyQc8UWq1qiPjcSJPSxxarQpHDUQFNEYOKK9UrHjZ+t4q24jagxxUKCqr5oWSJoMh9PLOQOPfX9sSNoMh9PrBeu6y9WtkCZBSOWWK4Cjx7BqsRYYvkt8OiBsgtEHLE+uKW/ONkDZRiEOGIpEvYH9+PRy+vEGueDMgxCDLEwm0Zxh5/5ehg+/WO9uHhnM/yYKVqQ2T8xxFLlVmuLNY3Xvuf0gQbJtfRi4Q5TSKUWC/H+rU113Pq8Arwh6sV69lpdsRDv/tT+yYUyFaMXSzkkJoJYiLONby6UqRitWOomhihiIalvfYPhhUiIVqyTVy3WGKcal8VJ7bAarVjqkaGRxHqp8TAhcXWoEytCv2AksZDEtz4/4duhTiwMUlOLhYZKyMWKN39YJlfr8xMOBNSJVaHD+fEv50vFuNGEjaU6sdQXfY14/eZ8sZ7/pv3+hXmWxYogFYLVf6i6vJK9fvyb/sJHkuqj27xjQVkL0Ij18g39xUc8d30Yzt1YFs9caSsVArkY6xzf0STwGrFOC/sHjyPAGzfbb/Mc+SY7rek3rClWFKl2bdNiLUQpViWpyomlmjdYTSrEI3uSS1xHrIpSIUTj4GuIVVUqi2WpaFGqKlwrea8uFaJU8r6GWJbKYjUPNDpGkOq9n7VSlROL2aWDoSKtpXr6yvKunyjf9inVpcPshP7w11xVFTtKdUL/u2dCIT65YGAdAiM81ReeHarLK9szYyIFJiTMleo8YaJotBAuEqITizH1CxMS5or1BHGoSpQQTgHrazLFkmoQEjInUqy1dNH9ouRkCsb0r/MLnljsgFxqsUpO/wKtc5yl0616FqvshFXQOs/CNHW1UFHEKj3FvvWiIFhrSi1UFLFKLwoCWleHUabNK8Uqv4wRaL3wGgo1QhKvFMsLrw2ct8MIcinF8lKR/8FYxwFyoSO4mlhe3HYCczluNFRCsE9u1xDLy3FvscZw5Yf31vtgAGM15F2BL68GIY5Y6vVIewh/8uQQKqyZxYogudVILLEiLB+ZNQK8CU6JJRbwhzCXB76fHYx4YvnTvcvCn+5dgKvE+RGsChyJKRaIsKpy9BAO5NtFXLGA+ssVkUM8LGYXscVC7oBGP/VFjBYok4B51ZTYYgEUYO+zaZZE0GR9m/hiASSolmtTBkGT9W1yiAWqy5VIKpBHLFBVLlR/iaQCucQC1RL6BIn6QeQTC6CgKzRF4BwTSgVyijXScyNq4MbPOeQWCyD36KlvMWE+dRD5xQKoLnoYFYFRCkmrvm36EGsEd3rGwYI45g6eUlP6EmsEQ3QzVI944ws0nLglfYo1ghkrEZ9gOKYgs2lY9C3WCKoZzA5WNq5i3ziGzqq8w6gh1hTMYUT70BqSYR/Yl3iBDgX1xJqCpwfai1qJhrwO28I2izyZDqO2WAeB3AdPGLz6jwFZkBch8PP0d/jbzvOlo2CxDAWLZShYLEPBYhkKFstQsFiGgsUyFCyWoWCxDAWLZShYLEPBYhkKFstQsFiGgsUyFCyWoWCxDAWLZShYLEPBYhkKFstQsFiGgsUyFCyWoWCxDAWLZShYLEPBYhkKFstQuAuHQWblXH1mCgAAAABJRU5ErkJggg==";function dwe(){const[e,t]=x.useState(!1);return x.useEffect(()=>(document.body.style.overflow="hidden",()=>{document.body.style.overflow="initial"}),[]),p.jsxs("div",{className:"flex flex-row justify-center h-full w-full relative items-center",children:[p.jsx("img",{src:uwe,className:Ie("size-20",e&&"hidden")}),p.jsx("img",{src:"/zuplo.apng",className:Ie("h-20 w-20",!e&&"hidden"),onLoad:()=>t(!0)})]})}const fwe=x.createContext(null);function hwe(e,t){const n=new Set(e.requirements),r={...e.timestamps};switch(t.type){case"add":return n.add(t.id),r[t.id]=Date.now(),{requirements:[...n],timestamps:r};case"remove":return n.delete(t.id),delete r[t.id],{requirements:[...n],timestamps:r};default:throw new Error}}const pwe=({children:e})=>{const[t,n]=x.useReducer(hwe,{requirements:[],timestamps:{}}),r=x.useRef(null),i=x.useRef(new Set),a=x.useCallback(s=>n({type:"add",id:s}),[]),o=x.useCallback(s=>n({type:"remove",id:s}),[]);return x.useEffect(()=>(t.requirements.length>0?r.current=setInterval(()=>{const s=Date.now(),l=2e3;t.requirements.forEach(c=>{const u=t.timestamps[c];u&&s-u>l&&(i.current.has(c)||(console.warn(`🐌 Slow loading detected: "${c}" has been loading for ${Math.round((s-u)/1e3)} seconds`),i.current.add(c)))})},2e3):(r.current&&(clearInterval(r.current),r.current=null),i.current.clear()),()=>{r.current&&clearInterval(r.current)}),[t.requirements,t.timestamps]),p.jsxs(fwe.Provider,{value:{add:a,remove:o},children:[t.requirements.length>0&&p.jsx(dwe,{}),e]})};var Tm=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(){}},mwe={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Wc,Z4,Rne,gwe=(Rne=class{constructor(){Ze(this,Wc,mwe);Ze(this,Z4,!1)}setTimeoutProvider(e){De(this,Wc,e)}setTimeout(e,t){return W(this,Wc).setTimeout(e,t)}clearTimeout(e){W(this,Wc).clearTimeout(e)}setInterval(e,t){return W(this,Wc).setInterval(e,t)}clearInterval(e){W(this,Wc).clearInterval(e)}},Wc=new WeakMap,Z4=new WeakMap,Rne),Ld=new gwe;function vwe(e){setTimeout(e,0)}var yf=typeof window>"u"||"Deno"in globalThis;function Zi(){}function ywe(e,t){return typeof e=="function"?e(t):e}function KN(e){return typeof e=="number"&&e>=0&&e!==1/0}function Zne(e,t){return Math.max(e+(t||0)-Date.now(),0)}function su(e,t){return typeof e=="function"?e(t):e}function po(e,t){return typeof e=="function"?e(t):e}function P5(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==X4(o,t.options))return!1}else if(!t0(t.queryKey,o))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof s=="boolean"&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function C5(e,t){const{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(bf(t.options.mutationKey)!==bf(a))return!1}else if(!t0(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function X4(e,t){return((t==null?void 0:t.queryKeyHashFn)||bf)(e)}function bf(e){return JSON.stringify(e,(t,n)=>ZN(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function t0(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>t0(e[n],t[n])):!1}var bwe=Object.prototype.hasOwnProperty;function Yne(e,t){if(e===t)return e;const n=A5(e)&&A5(t);if(!n&&!(ZN(e)&&ZN(t)))return t;const i=(n?e:Object.keys(e)).length,a=n?t:Object.keys(t),o=a.length,s=n?new Array(o):{};let l=0;for(let c=0;c<o;c++){const u=n?c:a[c],d=e[u],f=t[u];if(d===f){s[u]=d,(n?c<i:bwe.call(e,u))&&l++;continue}if(d===null||f===null||typeof d!="object"||typeof f!="object"){s[u]=f;continue}const h=Yne(d,f);s[u]=h,h===d&&l++}return i===o&&l===i?e:s}function x_(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function A5(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ZN(e){if(!T5(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!T5(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function T5(e){return Object.prototype.toString.call(e)==="[object Object]"}function xwe(e){return new Promise(t=>{Ld.setTimeout(t,e)})}function YN(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Yne(e,t):t}function wwe(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function _we(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Q4=Symbol();function Xne(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Q4?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Qne(e,t){return typeof e=="function"?e(...t):!!e}var Kd,Gc,gp,jne,Swe=(jne=class extends Tm{constructor(){super();Ze(this,Kd);Ze(this,Gc);Ze(this,gp);De(this,gp,t=>{if(!yf&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){W(this,Gc)||this.setEventListener(W(this,gp))}onUnsubscribe(){var t;this.hasListeners()||((t=W(this,Gc))==null||t.call(this),De(this,Gc,void 0))}setEventListener(t){var n;De(this,gp,t),(n=W(this,Gc))==null||n.call(this),De(this,Gc,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){W(this,Kd)!==t&&(De(this,Kd,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof W(this,Kd)=="boolean"?W(this,Kd):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Kd=new WeakMap,Gc=new WeakMap,gp=new WeakMap,jne),J4=new Swe;function XN(){let e,t;const n=new Promise((i,a)=>{e=i,t=a});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}var Ewe=vwe;function $we(){let e=[],t=0,n=s=>{s()},r=s=>{s()},i=Ewe;const a=s=>{t?e.push(s):i(()=>{n(s)})},o=()=>{const s=e;e=[],s.length&&i(()=>{r(()=>{s.forEach(l=>{n(l)})})})};return{batch:s=>{let l;t++;try{l=s()}finally{t--,t||o()}return l},batchCalls:s=>(...l)=>{a(()=>{s(...l)})},schedule:a,setNotifyFunction:s=>{n=s},setBatchNotifyFunction:s=>{r=s},setScheduler:s=>{i=s}}}var Kr=$we(),vp,Kc,yp,kne,Pwe=(kne=class extends Tm{constructor(){super();Ze(this,vp,!0);Ze(this,Kc);Ze(this,yp);De(this,yp,t=>{if(!yf&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){W(this,Kc)||this.setEventListener(W(this,yp))}onUnsubscribe(){var t;this.hasListeners()||((t=W(this,Kc))==null||t.call(this),De(this,Kc,void 0))}setEventListener(t){var n;De(this,yp,t),(n=W(this,Kc))==null||n.call(this),De(this,Kc,t(this.setOnline.bind(this)))}setOnline(t){W(this,vp)!==t&&(De(this,vp,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return W(this,vp)}},vp=new WeakMap,Kc=new WeakMap,yp=new WeakMap,kne),w_=new Pwe;function Cwe(e){return Math.min(1e3*2**e,3e4)}function Jne(e){return(e??"online")==="online"?w_.isOnline():!0}var QN=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function ere(e){let t=!1,n=0,r;const i=XN(),a=()=>i.status!=="pending",o=m=>{var g;if(!a()){const y=new QN(m);f(y),(g=e.onCancel)==null||g.call(e,y)}},s=()=>{t=!0},l=()=>{t=!1},c=()=>J4.isFocused()&&(e.networkMode==="always"||w_.isOnline())&&e.canRun(),u=()=>Jne(e.networkMode)&&e.canRun(),d=m=>{a()||(r==null||r(),i.resolve(m))},f=m=>{a()||(r==null||r(),i.reject(m))},h=()=>new Promise(m=>{var g;r=y=>{(a()||c())&&m(y)},(g=e.onPause)==null||g.call(e)}).then(()=>{var m;r=void 0,a()||(m=e.onContinue)==null||m.call(e)}),v=()=>{if(a())return;let m;const g=n===0?e.initialPromise:void 0;try{m=g??e.fn()}catch(y){m=Promise.reject(y)}Promise.resolve(m).then(d).catch(y=>{var _;if(a())return;const b=e.retry??(yf?0:3),w=e.retryDelay??Cwe,S=typeof w=="function"?w(n,y):w,E=b===!0||typeof b=="number"&&n<b||typeof b=="function"&&b(n,y);if(t||!E){f(y);return}n++,(_=e.onFail)==null||_.call(e,n,y),xwe(S).then(()=>c()?void 0:h()).then(()=>{t?f(y):v()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r==null||r(),i),cancelRetry:s,continueRetry:l,canStart:u,start:()=>(u()?v():h().then(v),i)}}var Zd,Nne,tre=(Nne=class{constructor(){Ze(this,Zd)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),KN(this.gcTime)&&De(this,Zd,Ld.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(yf?1/0:5*60*1e3))}clearGcTimeout(){W(this,Zd)&&(Ld.clearTimeout(W(this,Zd)),De(this,Zd,void 0))}},Zd=new WeakMap,Nne),Yd,bp,co,Xd,si,Ty,Qd,Bo,Pl,Ine,Awe=(Ine=class extends tre{constructor(t){super();Ze(this,Bo);Ze(this,Yd);Ze(this,bp);Ze(this,co);Ze(this,Xd);Ze(this,si);Ze(this,Ty);Ze(this,Qd);De(this,Qd,!1),De(this,Ty,t.defaultOptions),this.setOptions(t.options),this.observers=[],De(this,Xd,t.client),De(this,co,W(this,Xd).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,De(this,Yd,O5(this.options)),this.state=t.state??W(this,Yd),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=W(this,si))==null?void 0:t.promise}setOptions(t){if(this.options={...W(this,Ty),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=O5(this.options);n.data!==void 0&&(this.setData(n.data,{updatedAt:n.dataUpdatedAt,manual:!0}),De(this,Yd,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&W(this,co).remove(this)}setData(t,n){const r=YN(this.state.data,t,this.options);return ke(this,Bo,Pl).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){ke(this,Bo,Pl).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=W(this,si))==null?void 0:r.promise;return(i=W(this,si))==null||i.cancel(t),n?n.then(Zi).catch(Zi):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(W(this,Yd))}isActive(){return this.observers.some(t=>po(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Q4||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>su(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!Zne(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=W(this,si))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=W(this,si))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),W(this,co).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(W(this,si)&&(W(this,Qd)?W(this,si).cancel({revert:!0}):W(this,si).cancelRetry()),this.scheduleGc()),W(this,co).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||ke(this,Bo,Pl).call(this,{type:"invalidate"})}async fetch(t,n){var l,c,u,d,f,h,v,m,g,y,b,w;if(this.state.fetchStatus!=="idle"&&((l=W(this,si))==null?void 0:l.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(W(this,si))return W(this,si).continueRetry(),W(this,si).promise}if(t&&this.setOptions(t),!this.options.queryFn){const S=this.observers.find(E=>E.options.queryFn);S&&this.setOptions(S.options)}const r=new AbortController,i=S=>{Object.defineProperty(S,"signal",{enumerable:!0,get:()=>(De(this,Qd,!0),r.signal)})},a=()=>{const S=Xne(this.options,n),_=(()=>{const $={client:W(this,Xd),queryKey:this.queryKey,meta:this.meta};return i($),$})();return De(this,Qd,!1),this.options.persister?this.options.persister(S,_,this):S(_)},s=(()=>{const S={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:W(this,Xd),state:this.state,fetchFn:a};return i(S),S})();(c=this.options.behavior)==null||c.onFetch(s,this),De(this,bp,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=s.fetchOptions)==null?void 0:u.meta))&&ke(this,Bo,Pl).call(this,{type:"fetch",meta:(d=s.fetchOptions)==null?void 0:d.meta}),De(this,si,ere({initialPromise:n==null?void 0:n.initialPromise,fn:s.fetchFn,onCancel:S=>{S instanceof QN&&S.revert&&this.setState({...W(this,bp),fetchStatus:"idle"}),r.abort()},onFail:(S,E)=>{ke(this,Bo,Pl).call(this,{type:"failed",failureCount:S,error:E})},onPause:()=>{ke(this,Bo,Pl).call(this,{type:"pause"})},onContinue:()=>{ke(this,Bo,Pl).call(this,{type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0}));try{const S=await W(this,si).start();if(S===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(S),(h=(f=W(this,co).config).onSuccess)==null||h.call(f,S,this),(m=(v=W(this,co).config).onSettled)==null||m.call(v,S,this.state.error,this),S}catch(S){if(S instanceof QN){if(S.silent)return W(this,si).promise;if(S.revert){if(this.state.data===void 0)throw S;return this.state.data}}throw ke(this,Bo,Pl).call(this,{type:"error",error:S}),(y=(g=W(this,co).config).onError)==null||y.call(g,S,this),(w=(b=W(this,co).config).onSettled)==null||w.call(b,this.state.data,S,this),S}finally{this.scheduleGc()}}},Yd=new WeakMap,bp=new WeakMap,co=new WeakMap,Xd=new WeakMap,si=new WeakMap,Ty=new WeakMap,Qd=new WeakMap,Bo=new WeakSet,Pl=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...nre(r.data,this.options),fetchMeta:t.meta??null};case"success":const i={...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return De(this,bp,t.manual?i:void 0),i;case"error":const a=t.error;return{...r,error:a,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Kr.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),W(this,co).notify({query:this,type:"updated",action:t})})},Ine);function nre(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Jne(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function O5(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var ua,rn,Oy,Wi,Jd,xp,Il,Zc,Ry,wp,_p,ef,tf,Yc,Sp,En,Qg,JN,eI,tI,nI,rI,iI,aI,rre,Mne,Twe=(Mne=class extends Tm{constructor(t,n){super();Ze(this,En);Ze(this,ua);Ze(this,rn);Ze(this,Oy);Ze(this,Wi);Ze(this,Jd);Ze(this,xp);Ze(this,Il);Ze(this,Zc);Ze(this,Ry);Ze(this,wp);Ze(this,_p);Ze(this,ef);Ze(this,tf);Ze(this,Yc);Ze(this,Sp,new Set);this.options=n,De(this,ua,t),De(this,Zc,null),De(this,Il,XN()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(W(this,rn).addObserver(this),R5(W(this,rn),this.options)?ke(this,En,Qg).call(this):this.updateResult(),ke(this,En,nI).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return oI(W(this,rn),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return oI(W(this,rn),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,ke(this,En,rI).call(this),ke(this,En,iI).call(this),W(this,rn).removeObserver(this)}setOptions(t){const n=this.options,r=W(this,rn);if(this.options=W(this,ua).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof po(this.options.enabled,W(this,rn))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");ke(this,En,aI).call(this),W(this,rn).setOptions(this.options),n._defaulted&&!x_(this.options,n)&&W(this,ua).getQueryCache().notify({type:"observerOptionsUpdated",query:W(this,rn),observer:this});const i=this.hasListeners();i&&j5(W(this,rn),r,this.options,n)&&ke(this,En,Qg).call(this),this.updateResult(),i&&(W(this,rn)!==r||po(this.options.enabled,W(this,rn))!==po(n.enabled,W(this,rn))||su(this.options.staleTime,W(this,rn))!==su(n.staleTime,W(this,rn)))&&ke(this,En,JN).call(this);const a=ke(this,En,eI).call(this);i&&(W(this,rn)!==r||po(this.options.enabled,W(this,rn))!==po(n.enabled,W(this,rn))||a!==W(this,Yc))&&ke(this,En,tI).call(this,a)}getOptimisticResult(t){const n=W(this,ua).getQueryCache().build(W(this,ua),t),r=this.createResult(n,t);return Rwe(this,r)&&(De(this,Wi,r),De(this,xp,this.options),De(this,Jd,W(this,rn).state)),r}getCurrentResult(){return W(this,Wi)}trackResult(t,n){return new Proxy(t,{get:(r,i)=>(this.trackProp(i),n==null||n(i),i==="promise"&&!this.options.experimental_prefetchInRender&&W(this,Il).status==="pending"&&W(this,Il).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),Reflect.get(r,i))})}trackProp(t){W(this,Sp).add(t)}getCurrentQuery(){return W(this,rn)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=W(this,ua).defaultQueryOptions(t),r=W(this,ua).getQueryCache().build(W(this,ua),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return ke(this,En,Qg).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),W(this,Wi)))}createResult(t,n){var A;const r=W(this,rn),i=this.options,a=W(this,Wi),o=W(this,Jd),s=W(this,xp),c=t!==r?t.state:W(this,Oy),{state:u}=t;let d={...u},f=!1,h;if(n._optimisticResults){const O=this.hasListeners(),k=!O&&R5(t,n),N=O&&j5(t,r,n,i);(k||N)&&(d={...d,...nre(u.data,t.options)}),n._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:v,errorUpdatedAt:m,status:g}=d;h=d.data;let y=!1;if(n.placeholderData!==void 0&&h===void 0&&g==="pending"){let O;a!=null&&a.isPlaceholderData&&n.placeholderData===(s==null?void 0:s.placeholderData)?(O=a.data,y=!0):O=typeof n.placeholderData=="function"?n.placeholderData((A=W(this,_p))==null?void 0:A.state.data,W(this,_p)):n.placeholderData,O!==void 0&&(g="success",h=YN(a==null?void 0:a.data,O,n),f=!0)}if(n.select&&h!==void 0&&!y)if(a&&h===(o==null?void 0:o.data)&&n.select===W(this,Ry))h=W(this,wp);else try{De(this,Ry,n.select),h=n.select(h),h=YN(a==null?void 0:a.data,h,n),De(this,wp,h),De(this,Zc,null)}catch(O){De(this,Zc,O)}W(this,Zc)&&(v=W(this,Zc),h=W(this,wp),m=Date.now(),g="error");const b=d.fetchStatus==="fetching",w=g==="pending",S=g==="error",E=w&&b,_=h!==void 0,P={status:g,fetchStatus:d.fetchStatus,isPending:w,isSuccess:g==="success",isError:S,isInitialLoading:E,isLoading:E,data:h,dataUpdatedAt:d.dataUpdatedAt,error:v,errorUpdatedAt:m,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>c.dataUpdateCount||d.errorUpdateCount>c.errorUpdateCount,isFetching:b,isRefetching:b&&!w,isLoadingError:S&&!_,isPaused:d.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:S&&_,isStale:e6(t,n),refetch:this.refetch,promise:W(this,Il),isEnabled:po(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const O=F=>{P.status==="error"?F.reject(P.error):P.data!==void 0&&F.resolve(P.data)},k=()=>{const F=De(this,Il,P.promise=XN());O(F)},N=W(this,Il);switch(N.status){case"pending":t.queryHash===r.queryHash&&O(N);break;case"fulfilled":(P.status==="error"||P.data!==N.value)&&k();break;case"rejected":(P.status!=="error"||P.error!==N.reason)&&k();break}}return P}updateResult(){const t=W(this,Wi),n=this.createResult(W(this,rn),this.options);if(De(this,Jd,W(this,rn).state),De(this,xp,this.options),W(this,Jd).data!==void 0&&De(this,_p,W(this,rn)),x_(n,t))return;De(this,Wi,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,a=typeof i=="function"?i():i;if(a==="all"||!a&&!W(this,Sp).size)return!0;const o=new Set(a??W(this,Sp));return this.options.throwOnError&&o.add("error"),Object.keys(W(this,Wi)).some(s=>{const l=s;return W(this,Wi)[l]!==t[l]&&o.has(l)})};ke(this,En,rre).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&ke(this,En,nI).call(this)}},ua=new WeakMap,rn=new WeakMap,Oy=new WeakMap,Wi=new WeakMap,Jd=new WeakMap,xp=new WeakMap,Il=new WeakMap,Zc=new WeakMap,Ry=new WeakMap,wp=new WeakMap,_p=new WeakMap,ef=new WeakMap,tf=new WeakMap,Yc=new WeakMap,Sp=new WeakMap,En=new WeakSet,Qg=function(t){ke(this,En,aI).call(this);let n=W(this,rn).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Zi)),n},JN=function(){ke(this,En,rI).call(this);const t=su(this.options.staleTime,W(this,rn));if(yf||W(this,Wi).isStale||!KN(t))return;const r=Zne(W(this,Wi).dataUpdatedAt,t)+1;De(this,ef,Ld.setTimeout(()=>{W(this,Wi).isStale||this.updateResult()},r))},eI=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(W(this,rn)):this.options.refetchInterval)??!1},tI=function(t){ke(this,En,iI).call(this),De(this,Yc,t),!(yf||po(this.options.enabled,W(this,rn))===!1||!KN(W(this,Yc))||W(this,Yc)===0)&&De(this,tf,Ld.setInterval(()=>{(this.options.refetchIntervalInBackground||J4.isFocused())&&ke(this,En,Qg).call(this)},W(this,Yc)))},nI=function(){ke(this,En,JN).call(this),ke(this,En,tI).call(this,ke(this,En,eI).call(this))},rI=function(){W(this,ef)&&(Ld.clearTimeout(W(this,ef)),De(this,ef,void 0))},iI=function(){W(this,tf)&&(Ld.clearInterval(W(this,tf)),De(this,tf,void 0))},aI=function(){const t=W(this,ua).getQueryCache().build(W(this,ua),this.options);if(t===W(this,rn))return;const n=W(this,rn);De(this,rn,t),De(this,Oy,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},rre=function(t){Kr.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(W(this,Wi))}),W(this,ua).getQueryCache().notify({query:W(this,rn),type:"observerResultsUpdated"})})},Mne);function Owe(e,t){return po(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function R5(e,t){return Owe(e,t)||e.state.data!==void 0&&oI(e,t,t.refetchOnMount)}function oI(e,t,n){if(po(t.enabled,e)!==!1&&su(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&e6(e,t)}return!1}function j5(e,t,n,r){return(e!==t||po(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&e6(e,n)}function e6(e,t){return po(t.enabled,e)!==!1&&e.isStaleByTime(su(t.staleTime,e))}function Rwe(e,t){return!x_(e.getCurrentResult(),t)}function k5(e){return{onFetch:(t,n)=>{var u,d,f,h,v;const r=t.options,i=(f=(d=(u=t.fetchOptions)==null?void 0:u.meta)==null?void 0:d.fetchMore)==null?void 0:f.direction,a=((h=t.state.data)==null?void 0:h.pages)||[],o=((v=t.state.data)==null?void 0:v.pageParams)||[];let s={pages:[],pageParams:[]},l=0;const c=async()=>{let m=!1;const g=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(t.signal.aborted?m=!0:t.signal.addEventListener("abort",()=>{m=!0}),t.signal)})},y=Xne(t.options,t.fetchOptions),b=async(w,S,E)=>{if(m)return Promise.reject();if(S==null&&w.pages.length)return Promise.resolve(w);const $=(()=>{const k={client:t.client,queryKey:t.queryKey,pageParam:S,direction:E?"backward":"forward",meta:t.options.meta};return g(k),k})(),P=await y($),{maxPages:A}=t.options,O=E?_we:wwe;return{pages:O(w.pages,P,A),pageParams:O(w.pageParams,S,A)}};if(i&&a.length){const w=i==="backward",S=w?jwe:N5,E={pages:a,pageParams:o},_=S(r,E);s=await b(E,_,w)}else{const w=e??a.length;do{const S=l===0?o[0]??r.initialPageParam:N5(r,s);if(l>0&&S==null)break;s=await b(s,S),l++}while(l<w)}return s};t.options.persister?t.fetchFn=()=>{var m,g;return(g=(m=t.options).persister)==null?void 0:g.call(m,c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=c}}}function N5(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function jwe(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var Ss,Gi,nf,Es,kc,Dne,kwe=(Dne=class extends tre{constructor(t){super();Ze(this,Es);Ze(this,Ss);Ze(this,Gi);Ze(this,nf);this.mutationId=t.mutationId,De(this,Gi,t.mutationCache),De(this,Ss,[]),this.state=t.state||ire(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){W(this,Ss).includes(t)||(W(this,Ss).push(t),this.clearGcTimeout(),W(this,Gi).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){De(this,Ss,W(this,Ss).filter(n=>n!==t)),this.scheduleGc(),W(this,Gi).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){W(this,Ss).length||(this.state.status==="pending"?this.scheduleGc():W(this,Gi).remove(this))}continue(){var t;return((t=W(this,nf))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var a,o,s,l,c,u,d,f,h,v,m,g,y,b,w,S,E,_,$,P;const n=()=>{ke(this,Es,kc).call(this,{type:"continue"})};De(this,nf,ere({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(A,O)=>{ke(this,Es,kc).call(this,{type:"failed",failureCount:A,error:O})},onPause:()=>{ke(this,Es,kc).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>W(this,Gi).canRun(this)}));const r=this.state.status==="pending",i=!W(this,nf).canStart();try{if(r)n();else{ke(this,Es,kc).call(this,{type:"pending",variables:t,isPaused:i}),await((o=(a=W(this,Gi).config).onMutate)==null?void 0:o.call(a,t,this));const O=await((l=(s=this.options).onMutate)==null?void 0:l.call(s,t));O!==this.state.context&&ke(this,Es,kc).call(this,{type:"pending",context:O,variables:t,isPaused:i})}const A=await W(this,nf).start();return await((u=(c=W(this,Gi).config).onSuccess)==null?void 0:u.call(c,A,t,this.state.context,this)),await((f=(d=this.options).onSuccess)==null?void 0:f.call(d,A,t,this.state.context)),await((v=(h=W(this,Gi).config).onSettled)==null?void 0:v.call(h,A,null,this.state.variables,this.state.context,this)),await((g=(m=this.options).onSettled)==null?void 0:g.call(m,A,null,t,this.state.context)),ke(this,Es,kc).call(this,{type:"success",data:A}),A}catch(A){try{throw await((b=(y=W(this,Gi).config).onError)==null?void 0:b.call(y,A,t,this.state.context,this)),await((S=(w=this.options).onError)==null?void 0:S.call(w,A,t,this.state.context)),await((_=(E=W(this,Gi).config).onSettled)==null?void 0:_.call(E,void 0,A,this.state.variables,this.state.context,this)),await((P=($=this.options).onSettled)==null?void 0:P.call($,void 0,A,t,this.state.context)),A}finally{ke(this,Es,kc).call(this,{type:"error",error:A})}}finally{W(this,Gi).runNext(this)}}},Ss=new WeakMap,Gi=new WeakMap,nf=new WeakMap,Es=new WeakSet,kc=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Kr.batch(()=>{W(this,Ss).forEach(r=>{r.onMutationUpdate(t)}),W(this,Gi).notify({mutation:this,type:"updated",action:t})})},Dne);function ire(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ml,Ho,jy,Lne,Nwe=(Lne=class extends Tm{constructor(t={}){super();Ze(this,Ml);Ze(this,Ho);Ze(this,jy);this.config=t,De(this,Ml,new Set),De(this,Ho,new Map),De(this,jy,0)}build(t,n,r){const i=new kwe({mutationCache:this,mutationId:++Ub(this,jy)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){W(this,Ml).add(t);const n=zb(t);if(typeof n=="string"){const r=W(this,Ho).get(n);r?r.push(t):W(this,Ho).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(W(this,Ml).delete(t)){const n=zb(t);if(typeof n=="string"){const r=W(this,Ho).get(n);if(r)if(r.length>1){const i=r.indexOf(t);i!==-1&&r.splice(i,1)}else r[0]===t&&W(this,Ho).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=zb(t);if(typeof n=="string"){const r=W(this,Ho).get(n),i=r==null?void 0:r.find(a=>a.state.status==="pending");return!i||i===t}else return!0}runNext(t){var r;const n=zb(t);if(typeof n=="string"){const i=(r=W(this,Ho).get(n))==null?void 0:r.find(a=>a!==t&&a.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Kr.batch(()=>{W(this,Ml).forEach(t=>{this.notify({type:"removed",mutation:t})}),W(this,Ml).clear(),W(this,Ho).clear()})}getAll(){return Array.from(W(this,Ml))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>C5(n,r))}findAll(t={}){return this.getAll().filter(n=>C5(t,n))}notify(t){Kr.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Kr.batch(()=>Promise.all(t.map(n=>n.continue().catch(Zi))))}},Ml=new WeakMap,Ho=new WeakMap,jy=new WeakMap,Lne);function zb(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Xc,Qc,da,Dl,Ql,Bw,sI,Fne,Iwe=(Fne=class extends Tm{constructor(n,r){super();Ze(this,Ql);Ze(this,Xc);Ze(this,Qc);Ze(this,da);Ze(this,Dl);De(this,Xc,n),this.setOptions(r),this.bindMethods(),ke(this,Ql,Bw).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var i;const r=this.options;this.options=W(this,Xc).defaultMutationOptions(n),x_(this.options,r)||W(this,Xc).getMutationCache().notify({type:"observerOptionsUpdated",mutation:W(this,da),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&bf(r.mutationKey)!==bf(this.options.mutationKey)?this.reset():((i=W(this,da))==null?void 0:i.state.status)==="pending"&&W(this,da).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=W(this,da))==null||n.removeObserver(this)}onMutationUpdate(n){ke(this,Ql,Bw).call(this),ke(this,Ql,sI).call(this,n)}getCurrentResult(){return W(this,Qc)}reset(){var n;(n=W(this,da))==null||n.removeObserver(this),De(this,da,void 0),ke(this,Ql,Bw).call(this),ke(this,Ql,sI).call(this)}mutate(n,r){var i;return De(this,Dl,r),(i=W(this,da))==null||i.removeObserver(this),De(this,da,W(this,Xc).getMutationCache().build(W(this,Xc),this.options)),W(this,da).addObserver(this),W(this,da).execute(n)}},Xc=new WeakMap,Qc=new WeakMap,da=new WeakMap,Dl=new WeakMap,Ql=new WeakSet,Bw=function(){var r;const n=((r=W(this,da))==null?void 0:r.state)??ire();De(this,Qc,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},sI=function(n){Kr.batch(()=>{var r,i,a,o,s,l,c,u;if(W(this,Dl)&&this.hasListeners()){const d=W(this,Qc).variables,f=W(this,Qc).context;(n==null?void 0:n.type)==="success"?((i=(r=W(this,Dl)).onSuccess)==null||i.call(r,n.data,d,f),(o=(a=W(this,Dl)).onSettled)==null||o.call(a,n.data,null,d,f)):(n==null?void 0:n.type)==="error"&&((l=(s=W(this,Dl)).onError)==null||l.call(s,n.error,d,f),(u=(c=W(this,Dl)).onSettled)==null||u.call(c,void 0,n.error,d,f))}this.listeners.forEach(d=>{d(W(this,Qc))})})},Fne),$s,qne,Mwe=(qne=class extends Tm{constructor(t={}){super();Ze(this,$s);this.config=t,De(this,$s,new Map)}build(t,n,r){const i=n.queryKey,a=n.queryHash??X4(i,n);let o=this.get(a);return o||(o=new Awe({client:t,queryKey:i,queryHash:a,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){W(this,$s).has(t.queryHash)||(W(this,$s).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=W(this,$s).get(t.queryHash);n&&(t.destroy(),n===t&&W(this,$s).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Kr.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return W(this,$s).get(t)}getAll(){return[...W(this,$s).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>P5(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>P5(t,r)):n}notify(t){Kr.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Kr.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Kr.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},$s=new WeakMap,qne),ur,Jc,eu,Ep,$p,tu,Pp,Cp,Une,Dwe=(Une=class{constructor(e={}){Ze(this,ur);Ze(this,Jc);Ze(this,eu);Ze(this,Ep);Ze(this,$p);Ze(this,tu);Ze(this,Pp);Ze(this,Cp);De(this,ur,e.queryCache||new Mwe),De(this,Jc,e.mutationCache||new Nwe),De(this,eu,e.defaultOptions||{}),De(this,Ep,new Map),De(this,$p,new Map),De(this,tu,0)}mount(){Ub(this,tu)._++,W(this,tu)===1&&(De(this,Pp,J4.subscribe(async e=>{e&&(await this.resumePausedMutations(),W(this,ur).onFocus())})),De(this,Cp,w_.subscribe(async e=>{e&&(await this.resumePausedMutations(),W(this,ur).onOnline())})))}unmount(){var e,t;Ub(this,tu)._--,W(this,tu)===0&&((e=W(this,Pp))==null||e.call(this),De(this,Pp,void 0),(t=W(this,Cp))==null||t.call(this),De(this,Cp,void 0))}isFetching(e){return W(this,ur).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return W(this,Jc).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=W(this,ur).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=W(this,ur).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(su(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return W(this,ur).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=W(this,ur).get(r.queryHash),a=i==null?void 0:i.state.data,o=ywe(t,a);if(o!==void 0)return W(this,ur).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return Kr.batch(()=>W(this,ur).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=W(this,ur).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=W(this,ur);Kr.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=W(this,ur);return Kr.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Kr.batch(()=>W(this,ur).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(Zi).catch(Zi)}invalidateQueries(e,t={}){return Kr.batch(()=>(W(this,ur).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Kr.batch(()=>W(this,ur).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let a=i.fetch(void 0,n);return n.throwOnError||(a=a.catch(Zi)),i.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(r).then(Zi)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=W(this,ur).build(this,t);return n.isStaleByTime(su(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Zi).catch(Zi)}fetchInfiniteQuery(e){return e.behavior=k5(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Zi).catch(Zi)}ensureInfiniteQueryData(e){return e.behavior=k5(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return w_.isOnline()?W(this,Jc).resumePausedMutations():Promise.resolve()}getQueryCache(){return W(this,ur)}getMutationCache(){return W(this,Jc)}getDefaultOptions(){return W(this,eu)}setDefaultOptions(e){De(this,eu,e)}setQueryDefaults(e,t){W(this,Ep).set(bf(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...W(this,Ep).values()],n={};return t.forEach(r=>{t0(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){W(this,$p).set(bf(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...W(this,$p).values()],n={};return t.forEach(r=>{t0(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...W(this,eu).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=X4(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Q4&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...W(this,eu).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){W(this,ur).clear(),W(this,Jc).clear()}},ur=new WeakMap,Jc=new WeakMap,eu=new WeakMap,Ep=new WeakMap,$p=new WeakMap,tu=new WeakMap,Pp=new WeakMap,Cp=new WeakMap,Une),are=x.createContext(void 0),t6=e=>{const t=x.useContext(are);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Lwe=({client:e,children:t})=>(x.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),p.jsx(are.Provider,{value:e,children:t})),ore=x.createContext(!1),Fwe=()=>x.useContext(ore);ore.Provider;function qwe(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Uwe=x.createContext(qwe()),Vwe=()=>x.useContext(Uwe),zwe=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},Bwe=e=>{x.useEffect(()=>{e.clearReset()},[e])},Hwe=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||Qne(n,[e.error,r])),Wwe=e=>{if(e.suspense){const n=i=>i==="static"?i:Math.max(i??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...i)=>n(r(...i)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},Gwe=(e,t)=>e.isLoading&&e.isFetching&&!t,Kwe=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,I5=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Zwe(e,t,n){var d,f,h,v,m;const r=Fwe(),i=Vwe(),a=t6(),o=a.defaultQueryOptions(e);(f=(d=a.getDefaultOptions().queries)==null?void 0:d._experimental_beforeQuery)==null||f.call(d,o),o._optimisticResults=r?"isRestoring":"optimistic",Wwe(o),zwe(o,i),Bwe(i);const s=!a.getQueryCache().get(o.queryHash),[l]=x.useState(()=>new t(a,o)),c=l.getOptimisticResult(o),u=!r&&e.subscribed!==!1;if(x.useSyncExternalStore(x.useCallback(g=>{const y=u?l.subscribe(Kr.batchCalls(g)):Zi;return l.updateResult(),y},[l,u]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),x.useEffect(()=>{l.setOptions(o)},[o,l]),Kwe(o,c))throw I5(o,l,i);if(Hwe({result:c,errorResetBoundary:i,throwOnError:o.throwOnError,query:a.getQueryCache().get(o.queryHash),suspense:o.suspense}))throw c.error;if((v=(h=a.getDefaultOptions().queries)==null?void 0:h._experimental_afterQuery)==null||v.call(h,o,c),o.experimental_prefetchInRender&&!yf&&Gwe(c,r)){const g=s?I5(o,l,i):(m=a.getQueryCache().get(o.queryHash))==null?void 0:m.promise;g==null||g.catch(Zi).finally(()=>{l.updateResult()})}return o.notifyOnChangeProps?c:l.trackResult(c)}function VE(e,t){return Zwe(e,Twe)}function Uu(e,t){const n=t6(),[r]=x.useState(()=>new Iwe(n,e));x.useEffect(()=>{r.setOptions(e)},[r,e]);const i=x.useSyncExternalStore(x.useCallback(o=>r.subscribe(Kr.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=x.useCallback((o,s)=>{r.mutate(o,s).catch(Zi)},[r]);if(i.error&&Qne(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}function Ge(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function M5(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Jl(...e){return t=>{let n=!1;const r=e.map(i=>{const a=M5(i,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let i=0;i<r.length;i++){const a=r[i];typeof a=="function"?a():M5(e[i],null)}}}}function Zt(...e){return x.useCallback(Jl(...e),e)}function Ywe(e,t){const n=x.createContext(t),r=a=>{const{children:o,...s}=a,l=x.useMemo(()=>s,Object.values(s));return p.jsx(n.Provider,{value:l,children:o})};r.displayName=e+"Provider";function i(a){const o=x.useContext(n);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,i]}function $a(e,t=[]){let n=[];function r(a,o){const s=x.createContext(o),l=n.length;n=[...n,o];const c=d=>{var y;const{scope:f,children:h,...v}=d,m=((y=f==null?void 0:f[e])==null?void 0:y[l])||s,g=x.useMemo(()=>v,Object.values(v));return p.jsx(m.Provider,{value:g,children:h})};c.displayName=a+"Provider";function u(d,f){var m;const h=((m=f==null?void 0:f[e])==null?void 0:m[l])||s,v=x.useContext(h);if(v)return v;if(o!==void 0)return o;throw new Error(`\`${d}\` must be used within \`${a}\``)}return[c,u]}const i=()=>{const a=n.map(o=>x.createContext(o));return function(s){const l=(s==null?void 0:s[e])||a;return x.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,Xwe(i,...t)]}function Xwe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const o=r.reduce((s,{useScope:l,scopeName:c})=>{const d=l(a)[`__scope${c}`];return{...s,...d}},{});return x.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}var Ji=Txe();const sre=Yt(Ji);function wu(e){const t=Qwe(e),n=x.forwardRef((r,i)=>{const{children:a,...o}=r,s=x.Children.toArray(a),l=s.find(e_e);if(l){const c=l.props.children,u=s.map(d=>d===l?x.Children.count(c)>1?x.Children.only(null):x.isValidElement(c)?c.props.children:null:d);return p.jsx(t,{...o,ref:i,children:x.isValidElement(c)?x.cloneElement(c,void 0,u):null})}return p.jsx(t,{...o,ref:i,children:a})});return n.displayName=`${e}.Slot`,n}var lre=wu("Slot");function Qwe(e){const t=x.forwardRef((n,r)=>{const{children:i,...a}=n;if(x.isValidElement(i)){const o=n_e(i),s=t_e(a,i.props);return i.type!==x.Fragment&&(s.ref=r?Jl(r,o):o),x.cloneElement(i,s)}return x.Children.count(i)>1?x.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var cre=Symbol("radix.slottable");function Jwe(e){const t=({children:n})=>p.jsx(p.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=cre,t}function e_e(e){return x.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===cre}function t_e(e,t){const n={...t};for(const r in t){const i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...s)=>{a(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...a}:r==="className"&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function n_e(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var r_e=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],vt=r_e.reduce((e,t)=>{const n=wu(`Primitive.${t}`),r=x.forwardRef((i,a)=>{const{asChild:o,...s}=i,l=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(l,{...s,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function n6(e,t){e&&Ji.flushSync(()=>e.dispatchEvent(t))}function Sa(e){const t=x.useRef(e);return x.useEffect(()=>{t.current=e}),x.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function i_e(e,t=globalThis==null?void 0:globalThis.document){const n=Sa(e);x.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var a_e="DismissableLayer",lI="dismissableLayer.update",o_e="dismissableLayer.pointerDownOutside",s_e="dismissableLayer.focusOutside",D5,ure=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Vu=x.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...l}=e,c=x.useContext(ure),[u,d]=x.useState(null),f=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=x.useState({}),v=Zt(t,$=>d($)),m=Array.from(c.layers),[g]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(g),b=u?m.indexOf(u):-1,w=c.layersWithOutsidePointerEventsDisabled.size>0,S=b>=y,E=c_e($=>{const P=$.target,A=[...c.branches].some(O=>O.contains(P));!S||A||(i==null||i($),o==null||o($),$.defaultPrevented||s==null||s())},f),_=u_e($=>{const P=$.target;[...c.branches].some(O=>O.contains(P))||(a==null||a($),o==null||o($),$.defaultPrevented||s==null||s())},f);return i_e($=>{b===c.layers.size-1&&(r==null||r($),!$.defaultPrevented&&s&&($.preventDefault(),s()))},f),x.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(D5=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),L5(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=D5)}},[u,f,n,c]),x.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),L5())},[u,c]),x.useEffect(()=>{const $=()=>h({});return document.addEventListener(lI,$),()=>document.removeEventListener(lI,$)},[]),p.jsx(vt.div,{...l,ref:v,style:{pointerEvents:w?S?"auto":"none":void 0,...e.style},onFocusCapture:Ge(e.onFocusCapture,_.onFocusCapture),onBlurCapture:Ge(e.onBlurCapture,_.onBlurCapture),onPointerDownCapture:Ge(e.onPointerDownCapture,E.onPointerDownCapture)})});Vu.displayName=a_e;var l_e="DismissableLayerBranch",dre=x.forwardRef((e,t)=>{const n=x.useContext(ure),r=x.useRef(null),i=Zt(t,r);return x.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),p.jsx(vt.div,{...e,ref:i})});dre.displayName=l_e;function c_e(e,t=globalThis==null?void 0:globalThis.document){const n=Sa(e),r=x.useRef(!1),i=x.useRef(()=>{});return x.useEffect(()=>{const a=s=>{if(s.target&&!r.current){let l=function(){fre(o_e,n,c,{discrete:!0})};const c={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=l,t.addEventListener("click",i.current,{once:!0})):l()}else t.removeEventListener("click",i.current);r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",a),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function u_e(e,t=globalThis==null?void 0:globalThis.document){const n=Sa(e),r=x.useRef(!1);return x.useEffect(()=>{const i=a=>{a.target&&!r.current&&fre(s_e,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function L5(){const e=new CustomEvent(lI);document.dispatchEvent(e)}function fre(e,t,n,{discrete:r}){const i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?n6(i,a):i.dispatchEvent(a)}var d_e=Vu,f_e=dre,mi=globalThis!=null&&globalThis.document?x.useLayoutEffect:()=>{},h_e=zs[" useId ".trim().toString()]||(()=>{}),p_e=0;function pi(e){const[t,n]=x.useState(h_e());return mi(()=>{n(r=>r??String(p_e++))},[e]),e||(t?`radix-${t}`:"")}const m_e=["top","right","bottom","left"],_u=Math.min,Va=Math.max,__=Math.round,Bb=Math.floor,Rs=e=>({x:e,y:e}),g_e={left:"right",right:"left",bottom:"top",top:"bottom"},v_e={start:"end",end:"start"};function cI(e,t,n){return Va(e,_u(t,n))}function ec(e,t){return typeof e=="function"?e(t):e}function tc(e){return e.split("-")[0]}function Om(e){return e.split("-")[1]}function r6(e){return e==="x"?"y":"x"}function i6(e){return e==="y"?"height":"width"}function Su(e){return["top","bottom"].includes(tc(e))?"y":"x"}function a6(e){return r6(Su(e))}function y_e(e,t,n){n===void 0&&(n=!1);const r=Om(e),i=a6(e),a=i6(i);let o=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(o=S_(o)),[o,S_(o)]}function b_e(e){const t=S_(e);return[uI(e),t,uI(t)]}function uI(e){return e.replace(/start|end/g,t=>v_e[t])}function x_e(e,t,n){const r=["left","right"],i=["right","left"],a=["top","bottom"],o=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:r:t?r:i;case"left":case"right":return t?a:o;default:return[]}}function w_e(e,t,n,r){const i=Om(e);let a=x_e(tc(e),n==="start",r);return i&&(a=a.map(o=>o+"-"+i),t&&(a=a.concat(a.map(uI)))),a}function S_(e){return e.replace(/left|right|bottom|top/g,t=>g_e[t])}function __e(e){return{top:0,right:0,bottom:0,left:0,...e}}function hre(e){return typeof e!="number"?__e(e):{top:e,right:e,bottom:e,left:e}}function E_(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function F5(e,t,n){let{reference:r,floating:i}=e;const a=Su(t),o=a6(t),s=i6(o),l=tc(t),c=a==="y",u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2;let h;switch(l){case"top":h={x:u,y:r.y-i.height};break;case"bottom":h={x:u,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-i.width,y:d};break;default:h={x:r.x,y:r.y}}switch(Om(t)){case"start":h[o]-=f*(n&&c?-1:1);break;case"end":h[o]+=f*(n&&c?-1:1);break}return h}const S_e=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:a=[],platform:o}=n,s=a.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(t));let c=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=F5(c,r,l),f=r,h={},v=0;for(let m=0;m<s.length;m++){const{name:g,fn:y}=s[m],{x:b,y:w,data:S,reset:E}=await y({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:h,rects:c,platform:o,elements:{reference:e,floating:t}});u=b??u,d=w??d,h={...h,[g]:{...h[g],...S}},E&&v<=50&&(v++,typeof E=="object"&&(E.placement&&(f=E.placement),E.rects&&(c=E.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):E.rects),{x:u,y:d}=F5(c,f,l)),m=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:h}};async function n0(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:a,rects:o,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=ec(t,e),v=hre(h),g=s[f?d==="floating"?"reference":"floating":d],y=E_(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(g)))==null||n?g:g.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),b=d==="floating"?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,w=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),S=await(a.isElement==null?void 0:a.isElement(w))?await(a.getScale==null?void 0:a.getScale(w))||{x:1,y:1}:{x:1,y:1},E=E_(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:b,offsetParent:w,strategy:l}):b);return{top:(y.top-E.top+v.top)/S.y,bottom:(E.bottom-y.bottom+v.bottom)/S.y,left:(y.left-E.left+v.left)/S.x,right:(E.right-y.right+v.right)/S.x}}const E_e=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:l}=t,{element:c,padding:u=0}=ec(e,t)||{};if(c==null)return{};const d=hre(u),f={x:n,y:r},h=a6(i),v=i6(h),m=await o.getDimensions(c),g=h==="y",y=g?"top":"left",b=g?"bottom":"right",w=g?"clientHeight":"clientWidth",S=a.reference[v]+a.reference[h]-f[h]-a.floating[v],E=f[h]-a.reference[h],_=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let $=_?_[w]:0;(!$||!await(o.isElement==null?void 0:o.isElement(_)))&&($=s.floating[w]||a.floating[v]);const P=S/2-E/2,A=$/2-m[v]/2-1,O=_u(d[y],A),k=_u(d[b],A),N=O,F=$-m[v]-k,M=$/2-m[v]/2+P,H=cI(N,M,F),G=!l.arrow&&Om(i)!=null&&M!==H&&a.reference[v]/2-(M<N?O:k)-m[v]/2<0,X=G?M<N?M-N:M-F:0;return{[h]:f[h]+X,data:{[h]:H,centerOffset:M-H-X,...G&&{alignmentOffset:X}},reset:G}}}),$_e=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:a,rects:o,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:m=!0,...g}=ec(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const y=tc(i),b=Su(s),w=tc(s)===s,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),E=f||(w||!m?[S_(s)]:b_e(s)),_=v!=="none";!f&&_&&E.push(...w_e(s,m,v,S));const $=[s,...E],P=await n0(t,g),A=[];let O=((r=a.flip)==null?void 0:r.overflows)||[];if(u&&A.push(P[y]),d){const M=y_e(i,o,S);A.push(P[M[0]],P[M[1]])}if(O=[...O,{placement:i,overflows:A}],!A.every(M=>M<=0)){var k,N;const M=(((k=a.flip)==null?void 0:k.index)||0)+1,H=$[M];if(H)return{data:{index:M,overflows:O},reset:{placement:H}};let G=(N=O.filter(X=>X.overflows[0]<=0).sort((X,Y)=>X.overflows[1]-Y.overflows[1])[0])==null?void 0:N.placement;if(!G)switch(h){case"bestFit":{var F;const X=(F=O.filter(Y=>{if(_){const J=Su(Y.placement);return J===b||J==="y"}return!0}).map(Y=>[Y.placement,Y.overflows.filter(J=>J>0).reduce((J,I)=>J+I,0)]).sort((Y,J)=>Y[1]-J[1])[0])==null?void 0:F[0];X&&(G=X);break}case"initialPlacement":G=s;break}if(i!==G)return{reset:{placement:G}}}return{}}}};function q5(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function U5(e){return m_e.some(t=>e[t]>=0)}const P_e=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=ec(e,t);switch(r){case"referenceHidden":{const a=await n0(t,{...i,elementContext:"reference"}),o=q5(a,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:U5(o)}}}case"escaped":{const a=await n0(t,{...i,altBoundary:!0}),o=q5(a,n.floating);return{data:{escapedOffsets:o,escaped:U5(o)}}}default:return{}}}}};async function C_e(e,t){const{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=tc(n),s=Om(n),l=Su(n)==="y",c=["left","top"].includes(o)?-1:1,u=a&&l?-1:1,d=ec(t,e);let{mainAxis:f,crossAxis:h,alignmentAxis:v}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof v=="number"&&(h=s==="end"?v*-1:v),l?{x:h*u,y:f*c}:{x:f*c,y:h*u}}const A_e=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:a,placement:o,middlewareData:s}=t,l=await C_e(t,e);return o===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:a+l.y,data:{...l,placement:o}}}}},T_e=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:a=!0,crossAxis:o=!1,limiter:s={fn:g=>{let{x:y,y:b}=g;return{x:y,y:b}}},...l}=ec(e,t),c={x:n,y:r},u=await n0(t,l),d=Su(tc(i)),f=r6(d);let h=c[f],v=c[d];if(a){const g=f==="y"?"top":"left",y=f==="y"?"bottom":"right",b=h+u[g],w=h-u[y];h=cI(b,h,w)}if(o){const g=d==="y"?"top":"left",y=d==="y"?"bottom":"right",b=v+u[g],w=v-u[y];v=cI(b,v,w)}const m=s.fn({...t,[f]:h,[d]:v});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[f]:a,[d]:o}}}}}},O_e=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=ec(e,t),u={x:n,y:r},d=Su(i),f=r6(d);let h=u[f],v=u[d];const m=ec(s,t),g=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const w=f==="y"?"height":"width",S=a.reference[f]-a.floating[w]+g.mainAxis,E=a.reference[f]+a.reference[w]-g.mainAxis;h<S?h=S:h>E&&(h=E)}if(c){var y,b;const w=f==="y"?"width":"height",S=["top","left"].includes(tc(i)),E=a.reference[d]-a.floating[w]+(S&&((y=o.offset)==null?void 0:y[d])||0)+(S?0:g.crossAxis),_=a.reference[d]+a.reference[w]+(S?0:((b=o.offset)==null?void 0:b[d])||0)-(S?g.crossAxis:0);v<E?v=E:v>_&&(v=_)}return{[f]:h,[d]:v}}}},R_e=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:a,platform:o,elements:s}=t,{apply:l=()=>{},...c}=ec(e,t),u=await n0(t,c),d=tc(i),f=Om(i),h=Su(i)==="y",{width:v,height:m}=a.floating;let g,y;d==="top"||d==="bottom"?(g=d,y=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?"start":"end")?"left":"right"):(y=d,g=f==="end"?"top":"bottom");const b=m-u.top-u.bottom,w=v-u.left-u.right,S=_u(m-u[g],b),E=_u(v-u[y],w),_=!t.middlewareData.shift;let $=S,P=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(P=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&($=b),_&&!f){const O=Va(u.left,0),k=Va(u.right,0),N=Va(u.top,0),F=Va(u.bottom,0);h?P=v-2*(O!==0||k!==0?O+k:Va(u.left,u.right)):$=m-2*(N!==0||F!==0?N+F:Va(u.top,u.bottom))}await l({...t,availableWidth:P,availableHeight:$});const A=await o.getDimensions(s.floating);return v!==A.width||m!==A.height?{reset:{rects:!0}}:{}}}};function zE(){return typeof window<"u"}function Rm(e){return pre(e)?(e.nodeName||"").toLowerCase():"#document"}function Ka(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function nl(e){var t;return(t=(pre(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function pre(e){return zE()?e instanceof Node||e instanceof Ka(e).Node:!1}function os(e){return zE()?e instanceof Element||e instanceof Ka(e).Element:!1}function Bs(e){return zE()?e instanceof HTMLElement||e instanceof Ka(e).HTMLElement:!1}function V5(e){return!zE()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ka(e).ShadowRoot}function Ny(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=ss(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function j_e(e){return["table","td","th"].includes(Rm(e))}function BE(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function o6(e){const t=s6(),n=os(e)?ss(e):e;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function k_e(e){let t=Eu(e);for(;Bs(t)&&!Ap(t);){if(o6(t))return t;if(BE(t))return null;t=Eu(t)}return null}function s6(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ap(e){return["html","body","#document"].includes(Rm(e))}function ss(e){return Ka(e).getComputedStyle(e)}function HE(e){return os(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Eu(e){if(Rm(e)==="html")return e;const t=e.assignedSlot||e.parentNode||V5(e)&&e.host||nl(e);return V5(t)?t.host:t}function mre(e){const t=Eu(e);return Ap(t)?e.ownerDocument?e.ownerDocument.body:e.body:Bs(t)&&Ny(t)?t:mre(t)}function r0(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=mre(e),a=i===((r=e.ownerDocument)==null?void 0:r.body),o=Ka(i);if(a){const s=dI(o);return t.concat(o,o.visualViewport||[],Ny(i)?i:[],s&&n?r0(s):[])}return t.concat(i,r0(i,[],n))}function dI(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function gre(e){const t=ss(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Bs(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=__(n)!==a||__(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function l6(e){return os(e)?e:e.contextElement}function ep(e){const t=l6(e);if(!Bs(t))return Rs(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:a}=gre(t);let o=(a?__(n.width):n.width)/r,s=(a?__(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}const N_e=Rs(0);function vre(e){const t=Ka(e);return!s6()||!t.visualViewport?N_e:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function I_e(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ka(e)?!1:t}function xf(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),a=l6(e);let o=Rs(1);t&&(r?os(r)&&(o=ep(r)):o=ep(e));const s=I_e(a,n,r)?vre(a):Rs(0);let l=(i.left+s.x)/o.x,c=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){const f=Ka(a),h=r&&os(r)?Ka(r):r;let v=f,m=dI(v);for(;m&&r&&h!==v;){const g=ep(m),y=m.getBoundingClientRect(),b=ss(m),w=y.left+(m.clientLeft+parseFloat(b.paddingLeft))*g.x,S=y.top+(m.clientTop+parseFloat(b.paddingTop))*g.y;l*=g.x,c*=g.y,u*=g.x,d*=g.y,l+=w,c+=S,v=Ka(m),m=dI(v)}}return E_({width:u,height:d,x:l,y:c})}function c6(e,t){const n=HE(e).scrollLeft;return t?t.left+n:xf(nl(e)).left+n}function yre(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),i=r.left+t.scrollLeft-(n?0:c6(e,r)),a=r.top+t.scrollTop;return{x:i,y:a}}function M_e(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const a=i==="fixed",o=nl(r),s=t?BE(t.floating):!1;if(r===o||s&&a)return n;let l={scrollLeft:0,scrollTop:0},c=Rs(1);const u=Rs(0),d=Bs(r);if((d||!d&&!a)&&((Rm(r)!=="body"||Ny(o))&&(l=HE(r)),Bs(r))){const h=xf(r);c=ep(r),u.x=h.x+r.clientLeft,u.y=h.y+r.clientTop}const f=o&&!d&&!a?yre(o,l,!0):Rs(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:n.y*c.y-l.scrollTop*c.y+u.y+f.y}}function D_e(e){return Array.from(e.getClientRects())}function L_e(e){const t=nl(e),n=HE(e),r=e.ownerDocument.body,i=Va(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Va(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+c6(e);const s=-n.scrollTop;return ss(r).direction==="rtl"&&(o+=Va(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}function F_e(e,t){const n=Ka(e),r=nl(e),i=n.visualViewport;let a=r.clientWidth,o=r.clientHeight,s=0,l=0;if(i){a=i.width,o=i.height;const c=s6();(!c||c&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:a,height:o,x:s,y:l}}function q_e(e,t){const n=xf(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Bs(e)?ep(e):Rs(1),o=e.clientWidth*a.x,s=e.clientHeight*a.y,l=i*a.x,c=r*a.y;return{width:o,height:s,x:l,y:c}}function z5(e,t,n){let r;if(t==="viewport")r=F_e(e,n);else if(t==="document")r=L_e(nl(e));else if(os(t))r=q_e(t,n);else{const i=vre(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return E_(r)}function bre(e,t){const n=Eu(e);return n===t||!os(n)||Ap(n)?!1:ss(n).position==="fixed"||bre(n,t)}function U_e(e,t){const n=t.get(e);if(n)return n;let r=r0(e,[],!1).filter(s=>os(s)&&Rm(s)!=="body"),i=null;const a=ss(e).position==="fixed";let o=a?Eu(e):e;for(;os(o)&&!Ap(o);){const s=ss(o),l=o6(o);!l&&s.position==="fixed"&&(i=null),(a?!l&&!i:!l&&s.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Ny(o)&&!l&&bre(e,o))?r=r.filter(u=>u!==o):i=s,o=Eu(o)}return t.set(e,r),r}function V_e(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[...n==="clippingAncestors"?BE(t)?[]:U_e(t,this._c):[].concat(n),r],s=o[0],l=o.reduce((c,u)=>{const d=z5(t,u,i);return c.top=Va(d.top,c.top),c.right=_u(d.right,c.right),c.bottom=_u(d.bottom,c.bottom),c.left=Va(d.left,c.left),c},z5(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function z_e(e){const{width:t,height:n}=gre(e);return{width:t,height:n}}function B_e(e,t,n){const r=Bs(t),i=nl(t),a=n==="fixed",o=xf(e,!0,a,t);let s={scrollLeft:0,scrollTop:0};const l=Rs(0);if(r||!r&&!a)if((Rm(t)!=="body"||Ny(i))&&(s=HE(t)),r){const f=xf(t,!0,a,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else i&&(l.x=c6(i));const c=i&&!r&&!a?yre(i,s):Rs(0),u=o.left+s.scrollLeft-l.x-c.x,d=o.top+s.scrollTop-l.y-c.y;return{x:u,y:d,width:o.width,height:o.height}}function NP(e){return ss(e).position==="static"}function B5(e,t){if(!Bs(e)||ss(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return nl(e)===n&&(n=n.ownerDocument.body),n}function xre(e,t){const n=Ka(e);if(BE(e))return n;if(!Bs(e)){let i=Eu(e);for(;i&&!Ap(i);){if(os(i)&&!NP(i))return i;i=Eu(i)}return n}let r=B5(e,t);for(;r&&j_e(r)&&NP(r);)r=B5(r,t);return r&&Ap(r)&&NP(r)&&!o6(r)?n:r||k_e(e)||n}const H_e=async function(e){const t=this.getOffsetParent||xre,n=this.getDimensions,r=await n(e.floating);return{reference:B_e(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function W_e(e){return ss(e).direction==="rtl"}const G_e={convertOffsetParentRelativeRectToViewportRelativeRect:M_e,getDocumentElement:nl,getClippingRect:V_e,getOffsetParent:xre,getElementRects:H_e,getClientRects:D_e,getDimensions:z_e,getScale:ep,isElement:os,isRTL:W_e};function wre(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function K_e(e,t){let n=null,r;const i=nl(e);function a(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function o(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),a();const c=e.getBoundingClientRect(),{left:u,top:d,width:f,height:h}=c;if(s||t(),!f||!h)return;const v=Bb(d),m=Bb(i.clientWidth-(u+f)),g=Bb(i.clientHeight-(d+h)),y=Bb(u),w={rootMargin:-v+"px "+-m+"px "+-g+"px "+-y+"px",threshold:Va(0,_u(1,l))||1};let S=!0;function E(_){const $=_[0].intersectionRatio;if($!==l){if(!S)return o();$?o(!1,$):r=setTimeout(()=>{o(!1,1e-7)},1e3)}$===1&&!wre(c,e.getBoundingClientRect())&&o(),S=!1}try{n=new IntersectionObserver(E,{...w,root:i.ownerDocument})}catch{n=new IntersectionObserver(E,w)}n.observe(e)}return o(!0),a}function Z_e(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=l6(e),u=i||a?[...c?r0(c):[],...r0(t)]:[];u.forEach(y=>{i&&y.addEventListener("scroll",n,{passive:!0}),a&&y.addEventListener("resize",n)});const d=c&&s?K_e(c,n):null;let f=-1,h=null;o&&(h=new ResizeObserver(y=>{let[b]=y;b&&b.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var w;(w=h)==null||w.observe(t)})),n()}),c&&!l&&h.observe(c),h.observe(t));let v,m=l?xf(e):null;l&&g();function g(){const y=xf(e);m&&!wre(m,y)&&n(),m=y,v=requestAnimationFrame(g)}return n(),()=>{var y;u.forEach(b=>{i&&b.removeEventListener("scroll",n),a&&b.removeEventListener("resize",n)}),d==null||d(),(y=h)==null||y.disconnect(),h=null,l&&cancelAnimationFrame(v)}}const Y_e=A_e,X_e=T_e,Q_e=$_e,J_e=R_e,eSe=P_e,H5=E_e,tSe=O_e,nSe=(e,t,n)=>{const r=new Map,i={platform:G_e,...n},a={...i.platform,_c:r};return S_e(e,t,{...i,platform:a})};var Hw=typeof document<"u"?x.useLayoutEffect:x.useEffect;function $_(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!$_(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const a=i[r];if(!(a==="_owner"&&e.$$typeof)&&!$_(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function _re(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function W5(e,t){const n=_re(e);return Math.round(t*n)/n}function IP(e){const t=x.useRef(e);return Hw(()=>{t.current=e}),t}function rSe(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[u,d]=x.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,h]=x.useState(r);$_(f,r)||h(r);const[v,m]=x.useState(null),[g,y]=x.useState(null),b=x.useCallback(Y=>{Y!==_.current&&(_.current=Y,m(Y))},[]),w=x.useCallback(Y=>{Y!==$.current&&($.current=Y,y(Y))},[]),S=a||v,E=o||g,_=x.useRef(null),$=x.useRef(null),P=x.useRef(u),A=l!=null,O=IP(l),k=IP(i),N=IP(c),F=x.useCallback(()=>{if(!_.current||!$.current)return;const Y={placement:t,strategy:n,middleware:f};k.current&&(Y.platform=k.current),nSe(_.current,$.current,Y).then(J=>{const I={...J,isPositioned:N.current!==!1};M.current&&!$_(P.current,I)&&(P.current=I,Ji.flushSync(()=>{d(I)}))})},[f,t,n,k,N]);Hw(()=>{c===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,d(Y=>({...Y,isPositioned:!1})))},[c]);const M=x.useRef(!1);Hw(()=>(M.current=!0,()=>{M.current=!1}),[]),Hw(()=>{if(S&&(_.current=S),E&&($.current=E),S&&E){if(O.current)return O.current(S,E,F);F()}},[S,E,F,O,A]);const H=x.useMemo(()=>({reference:_,floating:$,setReference:b,setFloating:w}),[b,w]),G=x.useMemo(()=>({reference:S,floating:E}),[S,E]),X=x.useMemo(()=>{const Y={position:n,left:0,top:0};if(!G.floating)return Y;const J=W5(G.floating,u.x),I=W5(G.floating,u.y);return s?{...Y,transform:"translate("+J+"px, "+I+"px)",..._re(G.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:J,top:I}},[n,s,G.floating,u.x,u.y]);return x.useMemo(()=>({...u,update:F,refs:H,elements:G,floatingStyles:X}),[u,F,H,G,X])}const iSe=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?H5({element:r.current,padding:i}).fn(n):{}:r?H5({element:r,padding:i}).fn(n):{}}}},aSe=(e,t)=>({...Y_e(e),options:[e,t]}),oSe=(e,t)=>({...X_e(e),options:[e,t]}),sSe=(e,t)=>({...tSe(e),options:[e,t]}),lSe=(e,t)=>({...Q_e(e),options:[e,t]}),cSe=(e,t)=>({...J_e(e),options:[e,t]}),uSe=(e,t)=>({...eSe(e),options:[e,t]}),dSe=(e,t)=>({...iSe(e),options:[e,t]});var fSe="Arrow",Sre=x.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...a}=e;return p.jsx(vt.svg,{...a,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:p.jsx("polygon",{points:"0,0 30,0 15,10"})})});Sre.displayName=fSe;var hSe=Sre;function u6(e){const[t,n]=x.useState(void 0);return mi(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const a=i[0];let o,s;if("borderBoxSize"in a){const l=a.borderBoxSize,c=Array.isArray(l)?l[0]:l;o=c.inlineSize,s=c.blockSize}else o=e.offsetWidth,s=e.offsetHeight;n({width:o,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var d6="Popper",[Ere,rl]=$a(d6),[pSe,$re]=Ere(d6),Pre=e=>{const{__scopePopper:t,children:n}=e,[r,i]=x.useState(null);return p.jsx(pSe,{scope:t,anchor:r,onAnchorChange:i,children:n})};Pre.displayName=d6;var Cre="PopperAnchor",Are=x.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,a=$re(Cre,n),o=x.useRef(null),s=Zt(t,o);return x.useEffect(()=>{a.onAnchorChange((r==null?void 0:r.current)||o.current)}),r?null:p.jsx(vt.div,{...i,ref:s})});Are.displayName=Cre;var f6="PopperContent",[mSe,gSe]=Ere(f6),Tre=x.forwardRef((e,t)=>{var K,te,ne,re,U,q;const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:a="center",alignOffset:o=0,arrowPadding:s=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:u=0,sticky:d="partial",hideWhenDetached:f=!1,updatePositionStrategy:h="optimized",onPlaced:v,...m}=e,g=$re(f6,n),[y,b]=x.useState(null),w=Zt(t,ee=>b(ee)),[S,E]=x.useState(null),_=u6(S),$=(_==null?void 0:_.width)??0,P=(_==null?void 0:_.height)??0,A=r+(a!=="center"?"-"+a:""),O=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},k=Array.isArray(c)?c:[c],N=k.length>0,F={padding:O,boundary:k.filter(ySe),altBoundary:N},{refs:M,floatingStyles:H,placement:G,isPositioned:X,middlewareData:Y}=rSe({strategy:"fixed",placement:A,whileElementsMounted:(...ee)=>Z_e(...ee,{animationFrame:h==="always"}),elements:{reference:g.anchor},middleware:[aSe({mainAxis:i+P,alignmentAxis:o}),l&&oSe({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?sSe():void 0,...F}),l&&lSe({...F}),cSe({...F,apply:({elements:ee,rects:se,availableWidth:ye,availableHeight:Ee})=>{const{width:ze,height:tt}=se.reference,Qe=ee.floating.style;Qe.setProperty("--radix-popper-available-width",`${ye}px`),Qe.setProperty("--radix-popper-available-height",`${Ee}px`),Qe.setProperty("--radix-popper-anchor-width",`${ze}px`),Qe.setProperty("--radix-popper-anchor-height",`${tt}px`)}}),S&&dSe({element:S,padding:s}),bSe({arrowWidth:$,arrowHeight:P}),f&&uSe({strategy:"referenceHidden",...F})]}),[J,I]=jre(G),L=Sa(v);mi(()=>{X&&(L==null||L())},[X,L]);const D=(K=Y.arrow)==null?void 0:K.x,T=(te=Y.arrow)==null?void 0:te.y,C=((ne=Y.arrow)==null?void 0:ne.centerOffset)!==0,[j,z]=x.useState();return mi(()=>{y&&z(window.getComputedStyle(y).zIndex)},[y]),p.jsx("div",{ref:M.setFloating,"data-radix-popper-content-wrapper":"",style:{...H,transform:X?H.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:j,"--radix-popper-transform-origin":[(re=Y.transformOrigin)==null?void 0:re.x,(U=Y.transformOrigin)==null?void 0:U.y].join(" "),...((q=Y.hide)==null?void 0:q.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:p.jsx(mSe,{scope:n,placedSide:J,onArrowChange:E,arrowX:D,arrowY:T,shouldHideArrow:C,children:p.jsx(vt.div,{"data-side":J,"data-align":I,...m,ref:w,style:{...m.style,animation:X?void 0:"none"}})})})});Tre.displayName=f6;var Ore="PopperArrow",vSe={top:"bottom",right:"left",bottom:"top",left:"right"},Rre=x.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,a=gSe(Ore,r),o=vSe[a.placedSide];return p.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:p.jsx(hSe,{...i,ref:n,style:{...i.style,display:"block"}})})});Rre.displayName=Ore;function ySe(e){return e!==null}var bSe=e=>({name:"transformOrigin",options:e,fn(t){var g,y,b;const{placement:n,rects:r,middlewareData:i}=t,o=((g=i.arrow)==null?void 0:g.centerOffset)!==0,s=o?0:e.arrowWidth,l=o?0:e.arrowHeight,[c,u]=jre(n),d={start:"0%",center:"50%",end:"100%"}[u],f=(((y=i.arrow)==null?void 0:y.x)??0)+s/2,h=(((b=i.arrow)==null?void 0:b.y)??0)+l/2;let v="",m="";return c==="bottom"?(v=o?d:`${f}px`,m=`${-l}px`):c==="top"?(v=o?d:`${f}px`,m=`${r.floating.height+l}px`):c==="right"?(v=`${-l}px`,m=o?d:`${h}px`):c==="left"&&(v=`${r.floating.width+l}px`,m=o?d:`${h}px`),{data:{x:v,y:m}}}});function jre(e){const[t,n="center"]=e.split("-");return[t,n]}var Iy=Pre,jm=Are,My=Tre,Dy=Rre,xSe="Portal",km=x.forwardRef((e,t)=>{var s;const{container:n,...r}=e,[i,a]=x.useState(!1);mi(()=>a(!0),[]);const o=n||i&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return o?sre.createPortal(p.jsx(vt.div,{...r,ref:t}),o):null});km.displayName=xSe;function wSe(e,t){return x.useReducer((n,r)=>t[n][r]??n,e)}var sa=e=>{const{present:t,children:n}=e,r=_Se(t),i=typeof n=="function"?n({present:r.isPresent}):x.Children.only(n),a=Zt(r.ref,SSe(i));return typeof n=="function"||r.isPresent?x.cloneElement(i,{ref:a}):null};sa.displayName="Presence";function _Se(e){const[t,n]=x.useState(),r=x.useRef(null),i=x.useRef(e),a=x.useRef("none"),o=e?"mounted":"unmounted",[s,l]=wSe(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return x.useEffect(()=>{const c=Hb(r.current);a.current=s==="mounted"?c:"none"},[s]),mi(()=>{const c=r.current,u=i.current;if(u!==e){const f=a.current,h=Hb(c);e?l("MOUNT"):h==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&f!==h?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),mi(()=>{if(t){let c;const u=t.ownerDocument.defaultView??window,d=h=>{const m=Hb(r.current).includes(h.animationName);if(h.target===t&&m&&(l("ANIMATION_END"),!i.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},f=h=>{h.target===t&&(a.current=Hb(r.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:x.useCallback(c=>{r.current=c?getComputedStyle(c):null,n(c)},[])}}function Hb(e){return(e==null?void 0:e.animationName)||"none"}function SSe(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ESe=zs[" useInsertionEffect ".trim().toString()]||mi;function Po({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,a,o]=$Se({defaultProp:t,onChange:n}),s=e!==void 0,l=s?e:i;{const u=x.useRef(e!==void 0);x.useEffect(()=>{const d=u.current;d!==s&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${s?"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.`),u.current=s},[s,r])}const c=x.useCallback(u=>{var d;if(s){const f=PSe(u)?u(e):u;f!==e&&((d=o.current)==null||d.call(o,f))}else a(u)},[s,e,a,o]);return[l,c]}function $Se({defaultProp:e,onChange:t}){const[n,r]=x.useState(e),i=x.useRef(n),a=x.useRef(t);return ESe(()=>{a.current=t},[t]),x.useEffect(()=>{var o;i.current!==n&&((o=a.current)==null||o.call(a,n),i.current=n)},[n,i]),[n,r,a]}function PSe(e){return typeof e=="function"}var kre=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"}),CSe="VisuallyHidden",WE=x.forwardRef((e,t)=>p.jsx(vt.span,{...e,ref:t,style:{...kre,...e.style}}));WE.displayName=CSe;var ASe=WE,[GE,iCt]=$a("Tooltip",[rl]),KE=rl(),Nre="TooltipProvider",TSe=700,fI="tooltip.open",[OSe,h6]=GE(Nre),Ire=e=>{const{__scopeTooltip:t,delayDuration:n=TSe,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,o=x.useRef(!0),s=x.useRef(!1),l=x.useRef(0);return x.useEffect(()=>{const c=l.current;return()=>window.clearTimeout(c)},[]),p.jsx(OSe,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:x.useCallback(()=>{window.clearTimeout(l.current),o.current=!1},[]),onClose:x.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>o.current=!0,r)},[r]),isPointerInTransitRef:s,onPointerInTransitChange:x.useCallback(c=>{s.current=c},[]),disableHoverableContent:i,children:a})};Ire.displayName=Nre;var i0="Tooltip",[RSe,ZE]=GE(i0),Mre=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,l=h6(i0,e.__scopeTooltip),c=KE(t),[u,d]=x.useState(null),f=pi(),h=x.useRef(0),v=o??l.disableHoverableContent,m=s??l.delayDuration,g=x.useRef(!1),[y,b]=Po({prop:r,defaultProp:i??!1,onChange:$=>{$?(l.onOpen(),document.dispatchEvent(new CustomEvent(fI))):l.onClose(),a==null||a($)},caller:i0}),w=x.useMemo(()=>y?g.current?"delayed-open":"instant-open":"closed",[y]),S=x.useCallback(()=>{window.clearTimeout(h.current),h.current=0,g.current=!1,b(!0)},[b]),E=x.useCallback(()=>{window.clearTimeout(h.current),h.current=0,b(!1)},[b]),_=x.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{g.current=!0,b(!0),h.current=0},m)},[m,b]);return x.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),p.jsx(Iy,{...c,children:p.jsx(RSe,{scope:t,contentId:f,open:y,stateAttribute:w,trigger:u,onTriggerChange:d,onTriggerEnter:x.useCallback(()=>{l.isOpenDelayedRef.current?_():S()},[l.isOpenDelayedRef,_,S]),onTriggerLeave:x.useCallback(()=>{v?E():(window.clearTimeout(h.current),h.current=0)},[E,v]),onOpen:S,onClose:E,disableHoverableContent:v,children:n})})};Mre.displayName=i0;var hI="TooltipTrigger",Dre=x.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=ZE(hI,n),a=h6(hI,n),o=KE(n),s=x.useRef(null),l=Zt(t,s,i.onTriggerChange),c=x.useRef(!1),u=x.useRef(!1),d=x.useCallback(()=>c.current=!1,[]);return x.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),p.jsx(jm,{asChild:!0,...o,children:p.jsx(vt.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:l,onPointerMove:Ge(e.onPointerMove,f=>{f.pointerType!=="touch"&&!u.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),u.current=!0)}),onPointerLeave:Ge(e.onPointerLeave,()=>{i.onTriggerLeave(),u.current=!1}),onPointerDown:Ge(e.onPointerDown,()=>{i.open&&i.onClose(),c.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:Ge(e.onFocus,()=>{c.current||i.onOpen()}),onBlur:Ge(e.onBlur,i.onClose),onClick:Ge(e.onClick,i.onClose)})})});Dre.displayName=hI;var jSe="TooltipPortal",[aCt,kSe]=GE(jSe,{forceMount:void 0}),Tp="TooltipContent",Lre=x.forwardRef((e,t)=>{const n=kSe(Tp,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...a}=e,o=ZE(Tp,e.__scopeTooltip);return p.jsx(sa,{present:r||o.open,children:o.disableHoverableContent?p.jsx(Fre,{side:i,...a,ref:t}):p.jsx(NSe,{side:i,...a,ref:t})})}),NSe=x.forwardRef((e,t)=>{const n=ZE(Tp,e.__scopeTooltip),r=h6(Tp,e.__scopeTooltip),i=x.useRef(null),a=Zt(t,i),[o,s]=x.useState(null),{trigger:l,onClose:c}=n,u=i.current,{onPointerInTransitChange:d}=r,f=x.useCallback(()=>{s(null),d(!1)},[d]),h=x.useCallback((v,m)=>{const g=v.currentTarget,y={x:v.clientX,y:v.clientY},b=LSe(y,g.getBoundingClientRect()),w=FSe(y,b),S=qSe(m.getBoundingClientRect()),E=VSe([...w,...S]);s(E),d(!0)},[d]);return x.useEffect(()=>()=>f(),[f]),x.useEffect(()=>{if(l&&u){const v=g=>h(g,u),m=g=>h(g,l);return l.addEventListener("pointerleave",v),u.addEventListener("pointerleave",m),()=>{l.removeEventListener("pointerleave",v),u.removeEventListener("pointerleave",m)}}},[l,u,h,f]),x.useEffect(()=>{if(o){const v=m=>{const g=m.target,y={x:m.clientX,y:m.clientY},b=(l==null?void 0:l.contains(g))||(u==null?void 0:u.contains(g)),w=!USe(y,o);b?f():w&&(f(),c())};return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[l,u,o,c,f]),p.jsx(Fre,{...e,ref:a})}),[ISe,MSe]=GE(i0,{isInside:!1}),DSe=Jwe("TooltipContent"),Fre=x.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:o,...s}=e,l=ZE(Tp,n),c=KE(n),{onClose:u}=l;return x.useEffect(()=>(document.addEventListener(fI,u),()=>document.removeEventListener(fI,u)),[u]),x.useEffect(()=>{if(l.trigger){const d=f=>{const h=f.target;h!=null&&h.contains(l.trigger)&&u()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,u]),p.jsx(Vu,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:d=>d.preventDefault(),onDismiss:u,children:p.jsxs(My,{"data-state":l.stateAttribute,...c,...s,ref:t,style:{...s.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:[p.jsx(DSe,{children:r}),p.jsx(ISe,{scope:n,isInside:!0,children:p.jsx(ASe,{id:l.contentId,role:"tooltip",children:i||r})})]})})});Lre.displayName=Tp;var qre="TooltipArrow",Ure=x.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=KE(n);return MSe(qre,n).isInside?null:p.jsx(Dy,{...i,...r,ref:t})});Ure.displayName=qre;function LSe(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function FSe(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function qSe(e){const{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function USe(e,t){const{x:n,y:r}=e;let i=!1;for(let a=0,o=t.length-1;a<t.length;o=a++){const s=t[a],l=t[o],c=s.x,u=s.y,d=l.x,f=l.y;u>r!=f>r&&n<(d-c)*(r-u)/(f-u)+c&&(i=!i)}return i}function VSe(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),zSe(t)}function zSe(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const i=e[r];for(;t.length>=2;){const a=t[t.length-1],o=t[t.length-2];if((a.x-o.x)*(i.y-o.y)>=(a.y-o.y)*(i.x-o.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const i=e[r];for(;n.length>=2;){const a=n[n.length-1],o=n[n.length-2];if((a.x-o.x)*(i.y-o.y)>=(a.y-o.y)*(i.x-o.x))n.pop();else break}n.push(i)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var BSe=Ire,Vre=Mre,zre=Dre,Bre=Lre,HSe=Ure;const WSe=BSe,YE=Vre,XE=zre,Nm=x.forwardRef(({className:e,sideOffset:t=4,...n},r)=>p.jsx(Bre,{ref:r,sideOffset:t,className:Ie("z-50 rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md 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",e),...n}));Nm.displayName=Bre.displayName;const Hre=({className:e,...t})=>p.jsx(HSe,{...t,className:Ie("fill-white -translate-y-px drop-shadow-md [clip-path:inset(0_-10px_-10px_-10px)]",e)}),pI=({children:e,content:t,open:n,defaultOpen:r,onOpenChange:i,side:a="top",align:o="center",className:s,asChild:l=!0,...c})=>t?p.jsxs(Vre,{open:n,defaultOpen:r,onOpenChange:i,children:[p.jsx(zre,{asChild:l,children:e}),p.jsxs(Nm,{side:a,align:o,className:s,...c,children:[t,p.jsx(Hre,{})]})]}):e,Av="8.55.0",Hs=globalThis;function p6(e,t,n){const r=n||Hs,i=r.__SENTRY__=r.__SENTRY__||{},a=i[Av]=i[Av]||{};return a[e]||(a[e]=t())}const m6=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,GSe="Sentry Logger ",G5=["debug","info","warn","error","log","assert","trace"],K5={};function Wre(e){if(!("console"in Hs))return e();const t=Hs.console,n={},r=Object.keys(K5);r.forEach(i=>{const a=K5[i];n[i]=t[i],t[i]=a});try{return e()}finally{r.forEach(i=>{t[i]=n[i]})}}function KSe(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return m6?G5.forEach(n=>{t[n]=(...r)=>{e&&Wre(()=>{Hs.console[n](`${GSe}[${n}]:`,...r)})}}):G5.forEach(n=>{t[n]=()=>{}}),t}const Ha=p6("logger",KSe);function QE(){return g6(Hs),Hs}function g6(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||Av,t[Av]=t[Av]||{}}const Gre=Object.prototype.toString;function ZSe(e){switch(Gre.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return JSe(e,Error)}}function YSe(e,t){return Gre.call(e)===`[object ${t}]`}function XSe(e){return YSe(e,"Object")}function QSe(e){return!!(e&&e.then&&typeof e.then=="function")}function JSe(e,t){try{return e instanceof t}catch{return!1}}function eEe(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{m6&&Ha.log(`Failed to add non-enumerable property "${t}" to object`,e)}}const Kre=1e3;function Zre(){return Date.now()/Kre}function tEe(){const{performance:e}=Hs;if(!e||!e.now)return Zre;const t=Date.now()-e.now(),n=e.timeOrigin==null?t:e.timeOrigin;return()=>(n+e.now())/Kre}const nEe=tEe();(()=>{const{performance:e}=Hs;if(!e||!e.now)return;const t=3600*1e3,n=e.now(),r=Date.now(),i=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,a=i<t,o=e.timing&&e.timing.navigationStart,l=typeof o=="number"?Math.abs(o+n-r):t,c=l<t;return a||c?i<=l?e.timeOrigin:o:r})();function tp(){const e=Hs,t=e.crypto||e.msCrypto;let n=()=>Math.random()*16;try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(n=()=>{const r=new Uint8Array(1);return t.getRandomValues(r),r[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,r=>(r^(n()&15)>>r/4).toString(16))}function rEe(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||nEe(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:tp()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{const n=e.timestamp-e.started;e.duration=n>=0?n:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function Z5(){return tp()}function Y5(){return tp().substring(16)}function Yre(e,t,n=2){if(!t||typeof t!="object"||n<=0)return t;if(e&&t&&Object.keys(t).length===0)return e;const r={...e};for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=Yre(r[i],t[i],n-1));return r}const mI="_sentrySpan";function X5(e,t){t?eEe(e,mI,t):delete e[mI]}function Q5(e){return e[mI]}const iEe=100;class v6{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:Z5(),spanId:Y5()}}clone(){const t=new v6;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._extra={...this._extra},t._contexts={...this._contexts},this._contexts.flags&&(t._contexts.flags={values:[...this._contexts.flags.values]}),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._requestSession=this._requestSession,t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,X5(t,Q5(this)),t}setClient(t){this._client=t}setLastEventId(t){this._lastEventId=t}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&rEe(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(t){return this._requestSession=t,this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,n){return this._tags={...this._tags,[t]:n},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,n){return this._extra={...this._extra,[t]:n},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,n){return n===null?delete this._contexts[t]:this._contexts[t]=n,this._notifyScopeListeners(),this}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;const n=typeof t=="function"?t(this):t,[r,i]=n instanceof wf?[n.getScopeData(),n.getRequestSession()]:XSe(n)?[t,t.requestSession]:[],{tags:a,extra:o,user:s,contexts:l,level:c,fingerprint:u=[],propagationContext:d}=r||{};return this._tags={...this._tags,...a},this._extra={...this._extra,...o},this._contexts={...this._contexts,...l},s&&Object.keys(s).length&&(this._user=s),c&&(this._level=c),u.length&&(this._fingerprint=u),d&&(this._propagationContext=d),i&&(this._requestSession=i),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._session=void 0,X5(this,void 0),this._attachments=[],this.setPropagationContext({traceId:Z5()}),this._notifyScopeListeners(),this}addBreadcrumb(t,n){const r=typeof n=="number"?n:iEe;if(r<=0)return this;const i={timestamp:Zre(),...t};return this._breadcrumbs.push(i),this._breadcrumbs.length>r&&(this._breadcrumbs=this._breadcrumbs.slice(-r),this._client&&this._client.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:Q5(this)}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=Yre(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext={spanId:Y5(),...t},this}getPropagationContext(){return this._propagationContext}captureException(t,n){const r=n&&n.event_id?n.event_id:tp();if(!this._client)return Ha.warn("No client configured on scope - will not capture exception!"),r;const i=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:i,...n,event_id:r},this),r}captureMessage(t,n,r){const i=r&&r.event_id?r.event_id:tp();if(!this._client)return Ha.warn("No client configured on scope - will not capture message!"),i;const a=new Error(t);return this._client.captureMessage(t,n,{originalException:t,syntheticException:a,...r,event_id:i},this),i}captureEvent(t,n){const r=n&&n.event_id?n.event_id:tp();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(Ha.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}}const wf=v6;function aEe(){return p6("defaultCurrentScope",()=>new wf)}function oEe(){return p6("defaultIsolationScope",()=>new wf)}class sEe{constructor(t,n){let r;t?r=t:r=new wf;let i;n?i=n:i=new wf,this._stack=[{scope:r}],this._isolationScope=i}withScope(t){const n=this._pushScope();let r;try{r=t(n)}catch(i){throw this._popScope(),i}return QSe(r)?r.then(i=>(this._popScope(),i),i=>{throw this._popScope(),i}):(this._popScope(),r)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const t=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:t}),t}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}}function Op(){const e=QE(),t=g6(e);return t.stack=t.stack||new sEe(aEe(),oEe())}function lEe(e){return Op().withScope(e)}function cEe(e,t){const n=Op();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function J5(e){return Op().withScope(()=>e(Op().getIsolationScope()))}function uEe(){return{withIsolationScope:J5,withScope:lEe,withSetScope:cEe,withSetIsolationScope:(e,t)=>J5(t),getCurrentScope:()=>Op().getScope(),getIsolationScope:()=>Op().getIsolationScope()}}function y6(e){const t=g6(e);return t.acs?t.acs:uEe()}function JE(){const e=QE();return y6(e).getCurrentScope()}function dEe(){const e=QE();return y6(e).getIsolationScope()}function fEe(...e){const t=QE(),n=y6(t);if(e.length===2){const[r,i]=e;return r?n.withSetScope(r,i):n.withScope(i)}return n.withScope(e[0])}function hEe(){return JE().getClient()}const pEe=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function mEe(e){return e==="http"||e==="https"}function gEe(e,t=!1){const{host:n,path:r,pass:i,port:a,projectId:o,protocol:s,publicKey:l}=e;return`${s}://${l}${t&&i?`:${i}`:""}@${n}${a?`:${a}`:""}/${r&&`${r}/`}${o}`}function vEe(e){const t=pEe.exec(e);if(!t){Wre(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[n,r,i="",a="",o="",s=""]=t.slice(1);let l="",c=s;const u=c.split("/");if(u.length>1&&(l=u.slice(0,-1).join("/"),c=u.pop()),c){const d=c.match(/^\d+/);d&&(c=d[0])}return Xre({host:a,pass:i,path:l,projectId:c,port:o,protocol:n,publicKey:r})}function Xre(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function yEe(e){if(!m6)return!0;const{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(o=>e[o]?!1:(Ha.error(`Invalid Sentry Dsn: ${o} missing`),!0))?!1:n.match(/^\d+$/)?mEe(r)?t&&isNaN(parseInt(t,10))?(Ha.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(Ha.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(Ha.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function bEe(e){const t=typeof e=="string"?vEe(e):Xre(e);if(!(!t||!yEe(t)))return t}function xEe(e){if(e)return wEe(e)?{captureContext:e}:SEe(e)?{captureContext:e}:e}function wEe(e){return e instanceof wf||typeof e=="function"}const _Ee=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function SEe(e){return Object.keys(e).some(t=>_Ee.includes(t))}function ra(e,t){return JE().captureException(e,xEe(t))}function Qre(e,t){const n=typeof t=="string"?t:void 0,r=typeof t!="string"?{captureContext:t}:void 0;return JE().captureMessage(e,n,r)}function EEe(){return dEe().lastEventId()}function $Ee(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function PEe(e,t){const n=bEe(e);if(!n)return"";const r=`${$Ee(n)}embed/error-page/`;let i=`dsn=${gEe(n)}`;for(const a in t)if(a!=="dsn"&&a!=="onClose")if(a==="user"){const o=t.user;if(!o)continue;o.name&&(i+=`&name=${encodeURIComponent(o.name)}`),o.email&&(i+=`&email=${encodeURIComponent(o.email)}`)}else i+=`&${encodeURIComponent(a)}=${encodeURIComponent(t[a])}`;return`${r}?${i}`}const Jf=Hs,MP=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function e9(e={}){if(!Jf.document){MP&&Ha.error("Global document not defined in showReportDialog call");return}const t=JE(),n=t.getClient(),r=n&&n.getDsn();if(!r){MP&&Ha.error("DSN not configured for showReportDialog call");return}if(t&&(e.user={...t.getUser(),...e.user}),!e.eventId){const s=EEe();s&&(e.eventId=s)}const i=Jf.document.createElement("script");i.async=!0,i.crossOrigin="anonymous",i.src=PEe(r,e),e.onLoad&&(i.onload=e.onLoad);const{onClose:a}=e;if(a){const s=l=>{if(l.data==="__sentry_reportdialog_closed__")try{a()}finally{Jf.removeEventListener("message",s)}};Jf.addEventListener("message",s)}const o=Jf.document.head||Jf.document.body;o?o.appendChild(i):MP&&Ha.error("Not injecting report dialog. No injection point found in HTML")}function CEe(e){const t=e.match(/^([^.]+)/);return t!==null&&parseInt(t[0])>=17}function AEe(e,t){const n=new WeakSet;function r(i,a){if(!n.has(i)){if(i.cause)return n.add(i),r(i.cause,a);i.cause=a}}r(e,t)}function TEe(e,{componentStack:t},n){if(CEe(x.version)&&ZSe(e)&&t){const r=new Error(e.message);r.name=`React ErrorBoundary ${e.name}`,r.stack=t,AEe(e,r)}return ra(e,{...n,captureContext:{contexts:{react:{componentStack:t}}}})}var DP={exports:{}},bn={};/** @license React v16.13.1
3
3
  * react-is.production.min.js
4
4
  *
5
5
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -529,7 +529,7 @@ export function runtimeInit(runtime: RuntimeExtensions) {
529
529
  `,uL=()=>({root:{deleteSupported:!1,createSupported:!1,renameSupported:!1,subdirectoryCreateSupported:!1,fileGlob:"/+(package.json)",folderName:"",name:"",order:0},config:{createExtensions:{"OpenAPI Spec":"oas.json"},deleteSupported:!0,createSupported:!0,renameSupported:!0,subdirectoryCreateSupported:!1,fileGlob:"/config/+(routes.json|*.oas.json|policies.json|dev-portal.json)",folderName:"/config",name:"config",newFileTemplates:{"OpenAPI Spec":X6e},supportedFileTemplates:["OpenAPI Spec"],order:1,defaultFileTemplate:"OpenAPI Spec",customConfig:{"routes.json":{deleteSupported:!1,renameSupported:!1},"policies.json":{deleteSupported:!1,renameSupported:!1},"dev-portal.json":{deleteSupported:!0,renameSupported:!1}}},modules:{createExtensions:{"Empty Module":"ts","Inbound Policy":"ts","Outbound Policy":"ts","Request Handler":"ts"},predefinedTemplateFilename:{"zuplo.runtime.ts":"zuplo.runtime.ts"},deleteSupported:!0,createSupported:!0,renameSupported:!0,subdirectoryCreateSupported:!0,subdirectoryGlob:"/modules/**",fileGlob:"/modules/**/*.ts",folderName:"/modules",name:"modules",newFileTemplates:{"Empty Module":p1,"Inbound Policy":Sce,"zuplo.runtime.ts":Q6e,"Outbound Policy":Ece,"Request Handler":Y6e},order:2,supportedFileTemplates:["Inbound Policy","Outbound Policy","zuplo.runtime.ts","Request Handler","Empty Module"],customConfig:{"zuplo.runtime.ts":{deleteSupported:!0,renameSupported:!1}},defaultFileTemplate:"Request Handler"},schemas:{createExtensions:{"Empty Schema":"json",Schema:"json"},deleteSupported:!0,createSupported:!0,renameSupported:!0,subdirectoryCreateSupported:!1,fileGlob:"/schemas/*.json",folderName:"/schemas",name:"schemas",newFileTemplates:{"Empty Schema":p1,Schema:K6e},order:3,supportedFileTemplates:["Empty Schema","Schema"],defaultFileTemplate:"Schema"},tests:{name:"tests",folderName:"/tests",deleteSupported:!0,createSupported:!0,renameSupported:!0,subdirectoryCreateSupported:!1,order:4,defaultFileTemplate:"Code Test",createExtensions:{"Manual Test":"json","Code Test":"test.ts"},fileGlob:"/tests/+(*.json|*.ts)",newFileTemplates:{"Code Test":Z6e},supportedFileTemplates:["Code Test"]},docs:{createExtensions:{"Docs Page":"md","MDX Page":"mdx"},deleteSupported:!0,createSupported:!0,renameSupported:!0,subdirectoryCreateSupported:!0,subdirectoryGlob:"/docs/**",fileGlob:"/docs/**",folderName:"/docs",name:"docs",order:4,newFileTemplates:{"Docs Page":p1,"MDX Page":p1},supportedFileTemplates:["Docs Page","MDX Page"],defaultFileTemplate:"Docs Page"}});function J6e(e){const t=uL();return Object.values(t).find(n=>n.createSupported&&qr(e,n.fileGlob))}const dL=()=>{const e=uL(),t=[e.root,e.config,e.modules,e.schemas,e.docs,e.tests],n=[e.tests];return{strategies:e,editStrategies:t,testStrategies:n}},e8e=(e=!1)=>async({queryKey:t})=>{const[n]=t;if(typeof n!="string")throw new Gs({type:"https://zup.fail/invalid-query-key",title:"Invalid query key"});const r=new Request(n);let i;try{i=await fetch(r)}catch(a){throw a instanceof TypeError?new Gs({type:"https://zup.fail/api-request-failed",title:"API request failed",status:500,instance:n}):a}if(!i.ok){const a=new Mi("Error while making request. Please try again or contact support if the problem persists.");throw await a.tryReadResponse(i),a}try{return await(e?i.clone().json():i.clone().text())}catch(a){const o=await i.clone().text();throw Qre(`Failed to parse response of ${n} to JSON. Response: ${o}`,"error"),a}};function Vm(e,{json:t,...n}={}){return VE({queryKey:[e.url],queryFn:e8e(t),...n})}const Bf=(e={})=>Vm(ea.cdnContent("/portal/policies.v4.json?v=2"),{...e,json:!0}),$ce=e=>Vm(ea.cdnContent("/schemas/routes.json"),{...e}),t8e=e=>Vm(ea.cdnContent("/schemas/sidebar.json"),{...e}),Pce=e=>Vm(ea.cdnContent("/schemas/openapi-v3.1-zuplo.json"),{...e}),Cce=e=>Vm(ea.cdnContent("/schemas/openapi-v3.0-zuplo.json"),{...e}),fL=e=>Vm(ea.cdnContent("/schemas/policies.json"),{...e}),hL=()=>{const e=uc(),t=In(["environment"]),n=cL(),{strategies:r}=dL(),i=z6e(Object.values(r),t.environment.name),[a,o]=x.useState(null),s=yn(y=>y.setProjectTreeNodes),l=yn(y=>y.addFile),c=yn(y=>y.resetStore),{logEvent:u}=Xt(),d=$ce({enabled:!1}),f=Pce({enabled:!1}),h=Cce({enabled:!1}),v=fL({enabled:!1}),m=Bf({enabled:!1}),g=qm(async y=>{if(!e)return;performance.mark("totalTimeStart");const b=`${y.account.name}-${y.project.name}-${y.environment.name}`,w={"project-name":y.project.name};if(a&&a!==b&&e.editor.getModels().length>0){performance.mark("cleanMonacoStart"),c(),e.editor.getModels().forEach(P=>P.dispose());try{w.cleanMonaco=Math.trunc(performance.measure("cleanMonacoTimer","cleanMonacoStart").duration)}catch{w.cleanMonaco=-1}}performance.mark("fileTreeStart");const E=await i();e.editor.getModels().forEach(P=>P.dispose());try{w.fileTreeLoader=Math.trunc(performance.measure("fileTreeTimer","fileTreeStart").duration)}catch{w.fileTreeLoader=-1}performance.mark("loadingFilesStart");const _=E.filter(P=>P.type===Ks.File),$=E.filter(P=>P.type===Ks.Directory);await Promise.allSettled(_.map(async P=>{try{const A=await sf(y.environment.name,P.path);l({...P,...A,saveState:Dt.unmodified});const O=e.Uri.file(A.path),k=e.editor.getModel(O);k?k.setValue(A.content??""):e.editor.createModel(A.content??"",void 0,O)}catch{l({...P,saveState:Dt.error})}})),$.forEach(P=>{l({...P,saveState:Dt.unmodified})});try{w.loadingFiles=Math.trunc(performance.measure("loadingFilesTimer","loadingFilesStart").duration)}catch{w.loadingFiles=-1}await Promise.allSettled([d.refetch(),f.refetch(),h.refetch(),v.refetch(),m.refetch()]),o(b),s(E);try{w.totalTime=Math.trunc(performance.measure("totalTime","totalTimeStart").duration)}catch{w.totalTime=-1}u("project-loaded",w);try{performance.clearMarks()}catch(P){ra(P)}});return{unsavedFiles:n,monaco:e,reloadFiles:g}};function n8e(){const{unsavedFiles:e}=hL(),{isAuthenticated:t}=Im();return x.useEffect(()=>{if(e.length===0||!t)return;function n(r){return r.preventDefault(),r.returnValue=j4e,r}return window.addEventListener("beforeunload",n,{capture:!0}),()=>{window.removeEventListener("beforeunload",n,{capture:!0})}},[e,t]),null}const Tu=e=>{const t=x.useRef(e);return t.current=e,x.useEffect(()=>{t.current=e},[e]),t},Ace=()=>{const[e,t]=x.useState(null),n=yn(l=>l.updateFile),r=yn(l=>l.filesByPath),i=x.useCallback(async(l,c)=>{const u=r[l];if(!(u!=null&&u.lastModified))return await c(),!0;try{const d=await sf("local",l);return d.lastModified?d.lastModified>u.lastModified?(un.warn(`File ${l} was modified on disk. Showing conflict dialog before save.`),new Promise(f=>{t({filePath:l,localContent:u.content??"",remoteContent:d.content??"",remoteLastModified:d.lastModified,onProceed:async()=>{await c(),f(!0)}})})):(await c(),!0):(await c(),!0)}catch(d){return un.error("Error checking for conflicts:",d),await c(),!0}},[r]),a=x.useCallback(l=>{un.info(`Showing conflict dialog for ${l.filePath}`),t(l)},[]),o=x.useCallback(async l=>{if(!e)return;const c=r[e.filePath];if(!c){t(null);return}if(l==="remote")n({...c,content:e.remoteContent,lastModified:e.remoteLastModified,saveState:Dt.unmodified}),un.info(`Using disk version for ${e.filePath}, canceling save`),t(null);else if(un.info(`User chose local version for ${e.filePath}${e.onProceed?", proceeding with save":", saving to disk"}`),e.onProceed)await e.onProceed(),t(null);else try{const u={path:c.path,content:c.content};await I4e("local",u,{forceSave:!0});const d=await sf("local",e.filePath);n({...c,lastModified:d.lastModified,saveState:Dt.unmodified}),un.info(`Successfully saved local version for ${e.filePath}`),t(null)}catch(u){un.error(`Error saving local version for ${e.filePath}:`,u),n({...c,saveState:Dt.modified})}},[e,r,n]),s=x.useCallback(async()=>{if(!e)return;const l=r[e.filePath];if(l)try{const c=await sf("local",e.filePath);n({...l,lastModified:c.lastModified}),un.info(`Conflict dialog canceled for ${e.filePath}, updated lastModified timestamp`)}catch(c){un.error("Error fetching latest file on cancel:",c)}t(null)},[e,r,n]);return{conflict:e,checkForConflictsBeforeSave:i,showConflict:a,resolveConflict:o,cancelConflict:s}};function ti(){return ti=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ti.apply(null,arguments)}function fu(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function r8e(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Tce(...e){return t=>e.forEach(n=>r8e(n,t))}function zm(...e){return x.useCallback(Tce(...e),e)}function i8e(e,t){const n=x.createContext(t);function r(a){const{children:o,...s}=a,l=x.useMemo(()=>s,Object.values(s));return x.createElement(n.Provider,{value:l},o)}function i(a){const o=x.useContext(n);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return r.displayName=e+"Provider",[r,i]}function a8e(e,t=[]){let n=[];function r(a,o){const s=x.createContext(o),l=n.length;n=[...n,o];function c(d){const{scope:f,children:h,...v}=d,m=(f==null?void 0:f[e][l])||s,g=x.useMemo(()=>v,Object.values(v));return x.createElement(m.Provider,{value:g},h)}function u(d,f){const h=(f==null?void 0:f[e][l])||s,v=x.useContext(h);if(v)return v;if(o!==void 0)return o;throw new Error(`\`${d}\` must be used within \`${a}\``)}return c.displayName=a+"Provider",[c,u]}const i=()=>{const a=n.map(o=>x.createContext(o));return function(s){const l=(s==null?void 0:s[e])||a;return x.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,o8e(i,...t)]}function o8e(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const o=r.reduce((s,{useScope:l,scopeName:c})=>{const d=l(a)[`__scope${c}`];return{...s,...d}},{});return x.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}const PM=globalThis!=null&&globalThis.document?x.useLayoutEffect:()=>{},s8e=zs.useId||(()=>{});let l8e=0;function kC(e){const[t,n]=x.useState(s8e());return PM(()=>{n(r=>r??String(l8e++))},[e]),e||(t?`radix-${t}`:"")}function $f(e){const t=x.useRef(e);return x.useEffect(()=>{t.current=e}),x.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function c8e({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=u8e({defaultProp:t,onChange:n}),a=e!==void 0,o=a?e:r,s=$f(n),l=x.useCallback(c=>{if(a){const d=typeof c=="function"?c(e):c;d!==e&&s(d)}else i(c)},[a,e,i,s]);return[o,l]}function u8e({defaultProp:e,onChange:t}){const n=x.useState(e),[r]=n,i=x.useRef(r),a=$f(t);return x.useEffect(()=>{i.current!==r&&(a(r),i.current=r)},[r,i,a]),n}const pL=x.forwardRef((e,t)=>{const{children:n,...r}=e,i=x.Children.toArray(n),a=i.find(f8e);if(a){const o=a.props.children,s=i.map(l=>l===a?x.Children.count(o)>1?x.Children.only(null):x.isValidElement(o)?o.props.children:null:l);return x.createElement(CM,ti({},r,{ref:t}),x.isValidElement(o)?x.cloneElement(o,void 0,s):null)}return x.createElement(CM,ti({},r,{ref:t}),n)});pL.displayName="Slot";const CM=x.forwardRef((e,t)=>{const{children:n,...r}=e;return x.isValidElement(n)?x.cloneElement(n,{...h8e(r,n.props),ref:t?Tce(t,n.ref):n.ref}):x.Children.count(n)>1?x.Children.only(null):null});CM.displayName="SlotClone";const d8e=({children:e})=>x.createElement(x.Fragment,null,e);function f8e(e){return x.isValidElement(e)&&e.type===d8e}function h8e(e,t){const n={...t};for(const r in t){const i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...s)=>{a(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...a}:r==="className"&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}const p8e=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Zu=p8e.reduce((e,t)=>{const n=x.forwardRef((r,i)=>{const{asChild:a,...o}=r,s=a?pL:t;return x.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),x.createElement(s,ti({},o,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function m8e(e,t){e&&Ji.flushSync(()=>e.dispatchEvent(t))}function g8e(e,t=globalThis==null?void 0:globalThis.document){const n=$f(e);x.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const AM="dismissableLayer.update",v8e="dismissableLayer.pointerDownOutside",y8e="dismissableLayer.focusOutside";let CU;const b8e=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),x8e=x.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:s,onDismiss:l,...c}=e,u=x.useContext(b8e),[d,f]=x.useState(null),h=(n=d==null?void 0:d.ownerDocument)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.document,[,v]=x.useState({}),m=zm(t,P=>f(P)),g=Array.from(u.layers),[y]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),b=g.indexOf(y),w=d?g.indexOf(d):-1,S=u.layersWithOutsidePointerEventsDisabled.size>0,E=w>=b,_=w8e(P=>{const A=P.target,O=[...u.branches].some(k=>k.contains(A));!E||O||(a==null||a(P),s==null||s(P),P.defaultPrevented||l==null||l())},h),$=_8e(P=>{const A=P.target;[...u.branches].some(k=>k.contains(A))||(o==null||o(P),s==null||s(P),P.defaultPrevented||l==null||l())},h);return g8e(P=>{w===u.layers.size-1&&(i==null||i(P),!P.defaultPrevented&&l&&(P.preventDefault(),l()))},h),x.useEffect(()=>{if(d)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(CU=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),AU(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=CU)}},[d,h,r,u]),x.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),AU())},[d,u]),x.useEffect(()=>{const P=()=>v({});return document.addEventListener(AM,P),()=>document.removeEventListener(AM,P)},[]),x.createElement(Zu.div,ti({},c,{ref:m,style:{pointerEvents:S?E?"auto":"none":void 0,...e.style},onFocusCapture:fu(e.onFocusCapture,$.onFocusCapture),onBlurCapture:fu(e.onBlurCapture,$.onBlurCapture),onPointerDownCapture:fu(e.onPointerDownCapture,_.onPointerDownCapture)}))});function w8e(e,t=globalThis==null?void 0:globalThis.document){const n=$f(e),r=x.useRef(!1),i=x.useRef(()=>{});return x.useEffect(()=>{const a=s=>{if(s.target&&!r.current){let c=function(){Oce(v8e,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=c,t.addEventListener("click",i.current,{once:!0})):c()}else t.removeEventListener("click",i.current);r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",a),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function _8e(e,t=globalThis==null?void 0:globalThis.document){const n=$f(e),r=x.useRef(!1);return x.useEffect(()=>{const i=a=>{a.target&&!r.current&&Oce(y8e,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function AU(){const e=new CustomEvent(AM);document.dispatchEvent(e)}function Oce(e,t,n,{discrete:r}){const i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?m8e(i,a):i.dispatchEvent(a)}const NC="focusScope.autoFocusOnMount",IC="focusScope.autoFocusOnUnmount",TU={bubbles:!1,cancelable:!0},S8e=x.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,l]=x.useState(null),c=$f(i),u=$f(a),d=x.useRef(null),f=zm(t,m=>l(m)),h=x.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;x.useEffect(()=>{if(r){let m=function(w){if(h.paused||!s)return;const S=w.target;s.contains(S)?d.current=S:Lc(d.current,{select:!0})},g=function(w){if(h.paused||!s)return;const S=w.relatedTarget;S!==null&&(s.contains(S)||Lc(d.current,{select:!0}))},y=function(w){if(document.activeElement===document.body)for(const E of w)E.removedNodes.length>0&&Lc(s)};document.addEventListener("focusin",m),document.addEventListener("focusout",g);const b=new MutationObserver(y);return s&&b.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",g),b.disconnect()}}},[r,s,h.paused]),x.useEffect(()=>{if(s){RU.add(h);const m=document.activeElement;if(!s.contains(m)){const y=new CustomEvent(NC,TU);s.addEventListener(NC,c),s.dispatchEvent(y),y.defaultPrevented||(E8e(T8e(Rce(s)),{select:!0}),document.activeElement===m&&Lc(s))}return()=>{s.removeEventListener(NC,c),setTimeout(()=>{const y=new CustomEvent(IC,TU);s.addEventListener(IC,u),s.dispatchEvent(y),y.defaultPrevented||Lc(m??document.body,{select:!0}),s.removeEventListener(IC,u),RU.remove(h)},0)}}},[s,c,u,h]);const v=x.useCallback(m=>{if(!n&&!r||h.paused)return;const g=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,y=document.activeElement;if(g&&y){const b=m.currentTarget,[w,S]=$8e(b);w&&S?!m.shiftKey&&y===S?(m.preventDefault(),n&&Lc(w,{select:!0})):m.shiftKey&&y===w&&(m.preventDefault(),n&&Lc(S,{select:!0})):y===b&&m.preventDefault()}},[n,r,h.paused]);return x.createElement(Zu.div,ti({tabIndex:-1},o,{ref:f,onKeyDown:v}))});function E8e(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Lc(r,{select:t}),document.activeElement!==n)return}function $8e(e){const t=Rce(e),n=OU(t,e),r=OU(t.reverse(),e);return[n,r]}function Rce(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function OU(e,t){for(const n of e)if(!P8e(n,{upTo:t}))return n}function P8e(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function C8e(e){return e instanceof HTMLInputElement&&"select"in e}function Lc(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&C8e(e)&&t&&e.select()}}const RU=A8e();function A8e(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=jU(e,t),e.unshift(t)},remove(t){var n;e=jU(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function jU(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function T8e(e){return e.filter(t=>t.tagName!=="A")}const O8e=x.forwardRef((e,t)=>{var n;const{container:r=globalThis==null||(n=globalThis.document)===null||n===void 0?void 0:n.body,...i}=e;return r?sre.createPortal(x.createElement(Zu.div,ti({},i,{ref:t})),r):null});function R8e(e,t){return x.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const O2=e=>{const{present:t,children:n}=e,r=j8e(t),i=typeof n=="function"?n({present:r.isPresent}):x.Children.only(n),a=zm(r.ref,i.ref);return typeof n=="function"||r.isPresent?x.cloneElement(i,{ref:a}):null};O2.displayName="Presence";function j8e(e){const[t,n]=x.useState(),r=x.useRef({}),i=x.useRef(e),a=x.useRef("none"),o=e?"mounted":"unmounted",[s,l]=R8e(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return x.useEffect(()=>{const c=m1(r.current);a.current=s==="mounted"?c:"none"},[s]),PM(()=>{const c=r.current,u=i.current;if(u!==e){const f=a.current,h=m1(c);e?l("MOUNT"):h==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&f!==h?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),PM(()=>{if(t){const c=d=>{const h=m1(r.current).includes(d.animationName);d.target===t&&h&&Ji.flushSync(()=>l("ANIMATION_END"))},u=d=>{d.target===t&&(a.current=m1(r.current))};return t.addEventListener("animationstart",u),t.addEventListener("animationcancel",c),t.addEventListener("animationend",c),()=>{t.removeEventListener("animationstart",u),t.removeEventListener("animationcancel",c),t.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:x.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function m1(e){return(e==null?void 0:e.animationName)||"none"}let MC=0;function k8e(){x.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:kU()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:kU()),MC++,()=>{MC===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),MC--}},[])}function kU(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var jce=Ioe(),DC=function(){},R2=x.forwardRef(function(e,t){var n=x.useRef(null),r=x.useState({onScrollCapture:DC,onWheelCapture:DC,onTouchMoveCapture:DC}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,l=e.className,c=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,h=e.noIsolation,v=e.inert,m=e.allowPinchZoom,g=e.as,y=g===void 0?"div":g,b=b8(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),w=f,S=Noe([n,t]),E=ji(ji({},b),i);return x.createElement(x.Fragment,null,u&&x.createElement(w,{sideCar:jce,removeScrollBar:c,shards:d,noIsolation:h,inert:v,setCallbacks:a,allowPinchZoom:!!m,lockRef:n}),o?x.cloneElement(x.Children.only(s),ji(ji({},E),{ref:S})):x.createElement(y,ji({},E,{className:l,ref:S}),s))});R2.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};R2.classNames={fullWidth:Nv,zeroRight:kv};var TM=!1;if(typeof window<"u")try{var g1=Object.defineProperty({},"passive",{get:function(){return TM=!0,!0}});window.addEventListener("test",g1,g1),window.removeEventListener("test",g1,g1)}catch{TM=!1}var ah=TM?{passive:!1}:!1,N8e=function(e){return e.tagName==="TEXTAREA"},kce=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!N8e(e)&&n[t]==="visible")},I8e=function(e){return kce(e,"overflowY")},M8e=function(e){return kce(e,"overflowX")},NU=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=Nce(e,n);if(r){var i=Ice(e,n),a=i[1],o=i[2];if(a>o)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},D8e=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},L8e=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Nce=function(e,t){return e==="v"?I8e(t):M8e(t)},Ice=function(e,t){return e==="v"?D8e(t):L8e(t)},F8e=function(e,t){return e==="h"&&t==="rtl"?-1:1},q8e=function(e,t,n,r,i){var a=F8e(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,l=t.contains(s),c=!1,u=o>0,d=0,f=0;do{var h=Ice(e,s),v=h[0],m=h[1],g=h[2],y=m-g-a*v;(v||y)&&Nce(e,s)&&(d+=y,f+=v),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(u&&d===0||!u&&f===0)&&(c=!0),c},v1=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},IU=function(e){return[e.deltaX,e.deltaY]},MU=function(e){return e&&"current"in e?e.current:e},U8e=function(e,t){return e[0]===t[0]&&e[1]===t[1]},V8e=function(e){return`
530
530
  .block-interactivity-`.concat(e,` {pointer-events: none;}
531
531
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
532
- `)},z8e=0,oh=[];function B8e(e){var t=x.useRef([]),n=x.useRef([0,0]),r=x.useRef(),i=x.useState(z8e++)[0],a=x.useState(function(){return x8()})[0],o=x.useRef(e);x.useEffect(function(){o.current=e},[e]),x.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var m=koe([e.lockRef.current],(e.shards||[]).map(MU),!0).filter(Boolean);return m.forEach(function(g){return g.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),m.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=x.useCallback(function(m,g){if("touches"in m&&m.touches.length===2)return!o.current.allowPinchZoom;var y=v1(m),b=n.current,w="deltaX"in m?m.deltaX:b[0]-y[0],S="deltaY"in m?m.deltaY:b[1]-y[1],E,_=m.target,$=Math.abs(w)>Math.abs(S)?"h":"v";if("touches"in m&&$==="h"&&_.type==="range")return!1;var P=NU($,_);if(!P)return!0;if(P?E=$:(E=$==="v"?"h":"v",P=NU($,_)),!P)return!1;if(!r.current&&"changedTouches"in m&&(w||S)&&(r.current=E),!E)return!0;var A=r.current||E;return q8e(A,g,m,A==="h"?w:S)},[]),l=x.useCallback(function(m){var g=m;if(!(!oh.length||oh[oh.length-1]!==a)){var y="deltaY"in g?IU(g):v1(g),b=t.current.filter(function(E){return E.name===g.type&&E.target===g.target&&U8e(E.delta,y)})[0];if(b&&b.should){g.cancelable&&g.preventDefault();return}if(!b){var w=(o.current.shards||[]).map(MU).filter(Boolean).filter(function(E){return E.contains(g.target)}),S=w.length>0?s(g,w[0]):!o.current.noIsolation;S&&g.cancelable&&g.preventDefault()}}},[]),c=x.useCallback(function(m,g,y,b){var w={name:m,delta:g,target:y,should:b};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(S){return S!==w})},1)},[]),u=x.useCallback(function(m){n.current=v1(m),r.current=void 0},[]),d=x.useCallback(function(m){c(m.type,IU(m),m.target,s(m,e.lockRef.current))},[]),f=x.useCallback(function(m){c(m.type,v1(m),m.target,s(m,e.lockRef.current))},[]);x.useEffect(function(){return oh.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",l,ah),document.addEventListener("touchmove",l,ah),document.addEventListener("touchstart",u,ah),function(){oh=oh.filter(function(m){return m!==a}),document.removeEventListener("wheel",l,ah),document.removeEventListener("touchmove",l,ah),document.removeEventListener("touchstart",u,ah)}},[]);var h=e.removeScrollBar,v=e.inert;return x.createElement(x.Fragment,null,v?x.createElement(a,{styles:V8e(i)}):null,h?x.createElement(Foe,{gapMode:"margin"}):null)}const H8e=Doe(jce,B8e);var Mce=x.forwardRef(function(e,t){return x.createElement(R2,ji({},e,{ref:t,sideCar:H8e}))});Mce.classNames=R2.classNames;const Dce="Dialog",[Lce,yCt]=a8e(Dce),[W8e,fs]=Lce(Dce),G8e=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=x.useRef(null),l=x.useRef(null),[c=!1,u]=c8e({prop:r,defaultProp:i,onChange:a});return x.createElement(W8e,{scope:t,triggerRef:s,contentRef:l,contentId:kC(),titleId:kC(),descriptionId:kC(),open:c,onOpenChange:u,onOpenToggle:x.useCallback(()=>u(d=>!d),[u]),modal:o},n)},K8e="DialogTrigger",Z8e=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=fs(K8e,n),a=zm(t,i.triggerRef);return x.createElement(Zu.button,ti({type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":mL(i.open)},r,{ref:a,onClick:fu(e.onClick,i.onOpenToggle)}))}),Fce="DialogPortal",[Y8e,qce]=Lce(Fce,{forceMount:void 0}),X8e=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=fs(Fce,t);return x.createElement(Y8e,{scope:t,forceMount:n},x.Children.map(r,o=>x.createElement(O2,{present:n||a.open},x.createElement(O8e,{asChild:!0,container:i},o))))},OM="DialogOverlay",Q8e=x.forwardRef((e,t)=>{const n=qce(OM,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=fs(OM,e.__scopeDialog);return a.modal?x.createElement(O2,{present:r||a.open},x.createElement(J8e,ti({},i,{ref:t}))):null}),J8e=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=fs(OM,n);return x.createElement(Mce,{as:pL,allowPinchZoom:!0,shards:[i.contentRef]},x.createElement(Zu.div,ti({"data-state":mL(i.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))}),Up="DialogContent",eLe=x.forwardRef((e,t)=>{const n=qce(Up,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=fs(Up,e.__scopeDialog);return x.createElement(O2,{present:r||a.open},a.modal?x.createElement(tLe,ti({},i,{ref:t})):x.createElement(nLe,ti({},i,{ref:t})))}),tLe=x.forwardRef((e,t)=>{const n=fs(Up,e.__scopeDialog),r=x.useRef(null),i=zm(t,n.contentRef,r);return x.useEffect(()=>{const a=r.current;if(a)return Ky(a)},[]),x.createElement(Uce,ti({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:fu(e.onCloseAutoFocus,a=>{var o;a.preventDefault(),(o=n.triggerRef.current)===null||o===void 0||o.focus()}),onPointerDownOutside:fu(e.onPointerDownOutside,a=>{const o=a.detail.originalEvent,s=o.button===0&&o.ctrlKey===!0;(o.button===2||s)&&a.preventDefault()}),onFocusOutside:fu(e.onFocusOutside,a=>a.preventDefault())}))}),nLe=x.forwardRef((e,t)=>{const n=fs(Up,e.__scopeDialog),r=x.useRef(!1),i=x.useRef(!1);return x.createElement(Uce,ti({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var o;if((o=e.onCloseAutoFocus)===null||o===void 0||o.call(e,a),!a.defaultPrevented){var s;r.current||(s=n.triggerRef.current)===null||s===void 0||s.focus(),a.preventDefault()}r.current=!1,i.current=!1},onInteractOutside:a=>{var o,s;(o=e.onInteractOutside)===null||o===void 0||o.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const l=a.target;((s=n.triggerRef.current)===null||s===void 0?void 0:s.contains(l))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}}))}),Uce=x.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=fs(Up,n),l=x.useRef(null),c=zm(t,l);return k8e(),x.createElement(x.Fragment,null,x.createElement(S8e,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a},x.createElement(x8e,ti({role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":mL(s.open)},o,{ref:c,onDismiss:()=>s.onOpenChange(!1)}))),!1)}),Vce="DialogTitle",rLe=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=fs(Vce,n);return x.createElement(Zu.h2,ti({id:i.titleId},r,{ref:t}))}),iLe="DialogDescription",aLe=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=fs(iLe,n);return x.createElement(Zu.p,ti({id:i.descriptionId},r,{ref:t}))}),oLe="DialogClose",sLe=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=fs(oLe,n);return x.createElement(Zu.button,ti({type:"button"},r,{ref:t,onClick:fu(e.onClick,()=>i.onOpenChange(!1))}))});function mL(e){return e?"open":"closed"}const lLe="DialogTitleWarning";i8e(lLe,{contentName:Up,titleName:Vce,docsSlug:"dialog"});const zce=G8e,Bce=Z8e,Hce=X8e,j2=Q8e,k2=eLe,N2=rLe,I2=aLe,gL=sLe,Yu=zce,vL=Bce,cLe=Hce,DU=gL,Wce=x.forwardRef(({className:e,...t},n)=>p.jsx(j2,{ref:n,className:Ie("fixed inset-0 z-50 bg-black/50 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));Wce.displayName=j2.displayName;const Zs=x.forwardRef(({className:e,children:t,hideClose:n,...r},i)=>p.jsxs(cLe,{children:[p.jsx(Wce,{}),p.jsxs(k2,{ref:i,className:Ie("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...r,children:[t,!n&&p.jsxs(gL,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[p.jsx(al,{className:"h-4 w-4"}),p.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Zs.displayName=k2.displayName;const Ou=({className:e,...t})=>p.jsx("div",{className:Ie("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Ou.displayName="DialogHeader";const rc=({className:e,...t})=>p.jsx("div",{className:Ie("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});rc.displayName="DialogFooter";const Ys=x.forwardRef(({className:e,...t},n)=>p.jsx(N2,{ref:n,className:Ie("text-2xl font-semibold leading-none text-center tracking-tight mb-5",e),...t}));Ys.displayName=N2.displayName;const Ru=x.forwardRef(({className:e,...t},n)=>p.jsx(I2,{ref:n,className:Ie("text-sm text-center",e),...t}));Ru.displayName=I2.displayName;const LC={".ts":"typescript",".tsx":"typescript",".js":"javascript",".jsx":"javascript",".mjs":"javascript",".cjs":"javascript",".json":"json",".html":"html",".htm":"html",".xml":"xml",".svg":"xml",".yaml":"yaml",".yml":"yaml",".md":"markdown",".mdx":"markdown",".css":"css",".scss":"scss",".sass":"sass",".less":"less",".py":"python",".rs":"rust",".go":"go",".java":"java",".c":"c",".cpp":"cpp",".cs":"csharp",".php":"php",".rb":"ruby",".sh":"shell",".bash":"shell",".zsh":"shell",".sql":"sql",".graphql":"graphql",".gql":"graphql",".env":"plaintext",".toml":"toml",".ini":"ini",".properties":"properties",".dockerfile":"dockerfile",Dockerfile:"dockerfile",".makefile":"makefile",Makefile:"makefile"};function uLe(e){const t=e.split("/").pop()||"";if(LC[t])return LC[t];const n=t.lastIndexOf(".");if(n===-1)return"plaintext";const r=t.slice(n);return LC[r]||"plaintext"}function Gce({open:e,filePath:t,localContent:n,remoteContent:r,onResolve:i,onCancel:a}){const[o,s]=x.useState("local"),l=uLe(t);return p.jsx(Yu,{open:e,onOpenChange:c=>!c&&a(),children:p.jsxs(Zs,{className:"max-w-7xl max-h-[90vh] p-0",hideClose:!0,children:[p.jsx("div",{className:"p-6 pb-0",children:p.jsxs(Ou,{children:[p.jsx(Ys,{className:"text-lg font-semibold text-left mb-1",children:"File Conflict Detected"}),p.jsxs("p",{className:"text-sm text-gray-600 text-left",children:[p.jsx("span",{className:"font-mono font-semibold",children:t})," has been modified both locally and on disk"]})]})}),p.jsxs("div",{className:"flex-1 min-h-0 flex flex-col px-6",children:[p.jsxs("div",{className:"grid grid-cols-2 pr-[30px]",children:[p.jsxs("button",{type:"button",className:`flex flex-col py-3 cursor-pointer transition-all border-t-4 border-x ${o==="local"?"border-t-pink-500 border-x-pink-200 bg-pink-50":"border-t-gray-200 border-x-gray-200 bg-gray-50 hover:bg-gray-100"}`,style:{paddingLeft:"26px",paddingRight:"24px"},onClick:()=>s("local"),"aria-pressed":o==="local",children:[p.jsx("div",{className:"font-semibold text-sm",children:"Browser Version"}),p.jsx("div",{className:"text-xs text-gray-500",children:"Current editor content"})]}),p.jsxs("button",{type:"button",className:`flex flex-col px-6 py-3 cursor-pointer transition-all border-t-4 border-x ${o==="remote"?"border-t-pink-500 border-x-pink-200 bg-pink-50":"border-t-gray-200 border-x-gray-200 bg-gray-50 hover:bg-gray-100"}`,onClick:()=>s("remote"),"aria-pressed":o==="remote",children:[p.jsx("div",{className:"font-semibold text-sm",children:"Disk Version"}),p.jsx("div",{className:"text-xs text-gray-500",children:"File on disk"})]})]}),p.jsx("div",{className:"border border-t-0 overflow-hidden shadow-sm flex-1",style:{minHeight:"55vh"},children:p.jsx(Vne,{original:n,modified:r,language:l,theme:"vs",options:{readOnly:!0,renderSideBySide:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1,fontSize:13,wordWrap:"on"}})})]}),p.jsxs(rc,{className:"px-6 pb-6 flex-row justify-between items-center",children:[p.jsx("p",{className:"text-sm text-gray-600",children:o==="local"?p.jsx(p.Fragment,{children:"Browser version will be saved to disk"}):p.jsx(p.Fragment,{children:"Disk version will replace browser content"})}),p.jsxs("div",{className:"flex gap-2",children:[p.jsx(Ke,{variant:"ghost",onClick:a,children:"Cancel"}),p.jsxs(Ke,{variant:"default",onClick:()=>i(o),children:["Apply ",o==="local"?"Browser":"Disk"," Version"]})]})]})]})})}function dLe(){const{conflict:e,showConflict:t,resolveConflict:n,cancelConflict:r}=Ace(),i=yn(s=>s.filesByPath),a=yn(s=>s.saveConflictPath),o=yn(s=>s.clearSaveConflict);return x.useEffect(()=>{if(a){un.info(`Save conflict detected for ${a}`);const s=i[a];s?sf("local",a).then(l=>{t({filePath:a,localContent:s.content??"",remoteContent:l.content??"",remoteLastModified:l.lastModified})}).catch(l=>{un.error("Error fetching file for conflict dialog:",l)}):un.warn(`No file model found for ${a}`),o()}},[a,i,o,t]),e?p.jsx(Gce,{open:!0,filePath:e.filePath,localContent:e.localContent,remoteContent:e.remoteContent,onResolve:n,onCancel:r}):null}const yL=Symbol.for("RemoteUi::Retain"),bL=Symbol.for("RemoteUi::Release"),nS=Symbol.for("RemoteUi::RetainedBy");class Kce{constructor(){this.memoryManaged=new Set}add(t){this.memoryManaged.add(t),t[nS].add(this),t[yL]()}release(){for(const t of this.memoryManaged)t[nS].delete(this),t[bL]();this.memoryManaged.clear()}}function fLe(e){return!!(e&&e[yL]&&e[bL])}function LU(e){if(e==null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t==null||t===Object.prototype}const y1="_@f";function hLe(e){const t=new Map,n=new Map,r=new Map;return{encode:i,decode:a,async call(o,s){const l=new Kce,c=n.get(o);if(c==null)throw new Error("You attempted to call a function that was already released.");try{const u=fLe(c)?[l,...c[nS]]:[l];return await c(...a(s,u))}finally{l.release()}},release(o){const s=n.get(o);s&&(n.delete(o),t.delete(s))},terminate(){t.clear(),n.clear(),r.clear()}};function i(o,s=new Map){if(o==null)return[o];const l=s.get(o);if(l)return l;if(typeof o=="object"){if(Array.isArray(o)){s.set(o,[void 0]);const u=[],f=[o.map(h=>{const[v,m=[]]=i(h,s);return u.push(...m),v}),u];return s.set(o,f),f}if(LU(o)){s.set(o,[void 0]);const u=[],f=[Object.keys(o).reduce((h,v)=>{const[m,g=[]]=i(o[v],s);return u.push(...g),{...h,[v]:m}},{}),u];return s.set(o,f),f}}if(typeof o=="function"){if(t.has(o)){const f=t.get(o),h=[{[y1]:f}];return s.set(o,h),h}const u=e.uuid();t.set(o,u),n.set(u,o);const d=[{[y1]:u}];return s.set(o,d),d}const c=[o];return s.set(o,c),c}function a(o,s){if(typeof o=="object"){if(o==null)return o;if(Array.isArray(o))return o.map(l=>a(l,s));if(y1 in o){const l=o[y1];if(r.has(l))return r.get(l);let c=0,u=!1;const d=()=>{c-=1,c===0&&(u=!0,r.delete(l),e.release(l))},f=()=>{c+=1},h=new Set(s),v=(...m)=>{if(u)throw new Error("You attempted to call a function that was already released.");if(!r.has(l))throw new Error("You attempted to call a function that was already revoked.");return e.call(l,m)};Object.defineProperties(v,{[bL]:{value:d,writable:!1},[yL]:{value:f,writable:!1},[nS]:{value:h,writable:!1}});for(const m of h)m.add(v);return r.set(l,v),v}if(LU(o))return Object.keys(o).reduce((l,c)=>({...l,[c]:a(o[c],s)}),{})}return o}}const FU=0,FC=1,qU=2,UU=3,VU=5,qC=6;function pLe(e,{uuid:t=mLe,createEncoder:n=hLe,callable:r}={}){let i=!1,a=e;const o=new Map,s=new Map,l=gLe(f,r),c=n({uuid:t,release(m){u(UU,[m])},call(m,g,y){const b=t(),w=h(b,y),[S,E]=c.encode(g);return u(VU,[b,m,S],E),w}});return a.addEventListener("message",d),{call:l,replace(m){const g=a;a=m,g.removeEventListener("message",d),m.addEventListener("message",d)},expose(m){for(const g of Object.keys(m)){const y=m[g];typeof y=="function"?o.set(g,y):o.delete(g)}},callable(...m){if(r!=null)for(const g of m)Object.defineProperty(l,g,{value:f(g),writable:!1,configurable:!0,enumerable:!0})},terminate(){u(qU,void 0),v(),a.terminate&&a.terminate()}};function u(m,g,y){i||a.postMessage(g?[m,g]:[m],y)}async function d(m){const{data:g}=m;if(!(g==null||!Array.isArray(g)))switch(g[0]){case qU:{v();break}case FU:{const y=new Kce,[b,w,S]=g[1],E=o.get(w);try{if(E==null)throw new Error(`No '${w}' method is exposed on this endpoint`);const[_,$]=c.encode(await E(...c.decode(S,[y])));u(FC,[b,void 0,_],$)}catch(_){const{name:$,message:P,stack:A}=_;throw u(FC,[b,{name:$,message:P,stack:A}]),_}finally{y.release()}break}case FC:{const[y]=g[1];s.get(y)(...g[1]),s.delete(y);break}case UU:{const[y]=g[1];c.release(y);break}case qC:{const[y]=g[1];s.get(y)(...g[1]),s.delete(y);break}case VU:{const[y,b,w]=g[1];try{const S=await c.call(b,w),[E,_]=c.encode(S);u(qC,[y,void 0,E],_)}catch(S){const{name:E,message:_,stack:$}=S;throw u(qC,[y,{name:E,message:_,stack:$}]),S}break}}}function f(m){return(...g)=>{if(i)return Promise.reject(new Error("You attempted to call a function on a terminated web worker."));if(typeof m!="string"&&typeof m!="number")return Promise.reject(new Error(`Can’t call a symbol method on a remote endpoint: ${m.toString()}`));const y=t(),b=h(y),[w,S]=c.encode(g);return u(FU,[y,m,w],S),b}}function h(m,g){return new Promise((y,b)=>{s.set(m,(w,S,E)=>{if(S==null)y(E&&c.decode(E,g));else{const _=new Error;Object.assign(_,S),b(_)}})})}function v(){var m;i=!0,o.clear(),s.clear(),(m=c.terminate)===null||m===void 0||m.call(c),a.removeEventListener("message",d)}}function mLe(){return`${b1()}-${b1()}-${b1()}-${b1()}`}function b1(){return Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)}function gLe(e,t){let n;if(t==null){if(typeof Proxy!="function")throw new Error("You must pass an array of callable methods in environments without Proxies.");const r=new Map;n=new Proxy({},{get(i,a){if(r.has(a))return r.get(a);const o=e(a);return r.set(a,o),o}})}else{n={};for(const r of t)Object.defineProperty(n,r,{value:e(r),writable:!1,configurable:!0,enumerable:!0})}return n}function vLe(e){return typeof window>"u"||typeof e!="string"?void 0:new URL(e,window.location.href)}function yLe(e){const t=URL.createObjectURL(new Blob([`importScripts(${JSON.stringify(e.href)})`])),n=new Worker(t),r=n.terminate.bind(n);return n.terminate=()=>{URL.revokeObjectURL(t),r()},n}const xL=new WeakMap;function bLe(e){const t=vLe(e);function n({createMessenger:r=yLe,...i}={}){if(t){const a=pLe(r(t),i),{call:o}=a;return xL.set(o,a),o}if(typeof e=="function")return new Proxy({},{get(a,o){return async(...s)=>(await e())[o](...s)}});if(typeof window>"u")return new Proxy({},{get(a,o){return()=>{throw new Error("You can’t call a method on a worker on the server.")}}});throw new Error("Could not create a suitable fallback")}return Reflect.defineProperty(n,"url",{value:t}),n}function xLe(e){const t=wLe(e);return t==null||t.terminate(),xL.delete(e),t!=null}function wLe(e){return xL.get(e)}function _Le(e){const[t]=x.useState(e);return x.useRef(t)}function SLe(e,...t){const{current:n}=_Le(()=>e(...t));return x.useEffect(()=>()=>{xLe(n)},[n]),n}const ELe=bLe(()=>Rxe(()=>import("./local-worker-D9T8NcSk.js"),__vite__mapDeps([0,1,2]),import.meta.url)),$Le=()=>{const e=uc(),t=SLe(ELe),n=x.useRef(null),{conflict:r,showConflict:i,resolveConflict:a,cancelConflict:o}=Ace();x.useEffect(()=>{e&&t.ready().catch(l=>{un.warn("Failed to load local types:",l)})},[t,e]),x.useEffect(()=>{if(!e)return;const l=new EventSource("/api/changes");return n.current=l,l.addEventListener("change",async c=>{try{const u=JSON.parse(c.data),d=u.filePath.startsWith("/")?u.filePath:`/${u.filePath}`,f=yn.getState().filesByPath,h=yn.getState().updateFile,v=f[d];if(!v){un.info(`File ${d} changed but not loaded in editor`);return}if(v.saveState===Dt.modified||v.saveState===Dt.new){un.warn(`File ${d} changed on disk but has unsaved changes. Showing conflict dialog.`);const b=await sf("local",d);i({filePath:d,localContent:v.content??"",remoteContent:b.content??"",remoteLastModified:b.lastModified});return}un.info(`Reloading ${d} from disk...`);const m=await sf("local",d),g=e.Uri.file(d),y=e.editor.getModel(g);y&&m.content!==void 0&&(y.setValue(m.content),un.info(`Updated Monaco model for ${d}`)),h({...v,content:m.content,saveState:Dt.unmodified,lastModified:m.lastModified}),un.info(`Successfully reloaded ${d}`)}catch(u){un.error("Error handling file change event:",u)}}),l.addEventListener("init",()=>{un.info("SSE connection established")}),l.onerror=c=>{l.readyState===EventSource.CLOSED?un.debug("SSE connection closed"):un.warn("SSE connection error:",c)},()=>{l.close(),n.current=null,un.info("SSE connection closed")}},[e,i]);const s=async l=>{if(!r||!e)return;if(l==="remote"){await a(l);return}if(yn.getState().filesByPath[r.filePath]){const u=e.Uri.file(r.filePath),d=e.editor.getModel(u);d&&d.setValue(r.localContent)}await a(l)};return p.jsx(p.Fragment,{children:r&&p.jsx(Gce,{open:!0,filePath:r.filePath,localContent:r.localContent,remoteContent:r.remoteContent,onResolve:s,onCancel:o})})};function PLe(){const e=In(),{monaco:t,reloadFiles:n}=hL(),r=Tu(n.execute),i=Tu(e),a=e.environment.name,{error:o,isLoading:s}=VE({queryKey:["reloadFiles",a],queryFn:async()=>{try{return await r.current(i.current),!0}catch(l){throw un.error("Failed to reload files:",l),l}},refetchOnWindowFocus:!1,enabled:!!t&&!!a,retry:3,retryDelay:l=>Math.min(1e3*2**l,3e4)});return o?p.jsx("div",{className:"flex items-center justify-center h-full bg-gray-50",children:p.jsxs("div",{className:"text-center p-8 max-w-lg",children:[p.jsx("h2",{className:"text-xl font-semibold text-gray-900 mb-2",children:"Failed to Load Files"}),p.jsx("p",{className:"text-gray-600 mb-4",children:"Unable to load project files from the local server. Please check that the dev server is running and try again."}),p.jsx("button",{type:"button",onClick:()=>window.location.reload(),className:"px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700",children:"Retry"})]})}):s?p.jsx("div",{className:"flex items-center justify-center h-full bg-gray-50",children:p.jsxs("div",{className:"text-center",children:[p.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600 mx-auto mb-4"}),p.jsx("p",{className:"text-gray-600",children:"Loading project files..."})]})}):p.jsxs(p.Fragment,{children:[p.jsx($Le,{}),p.jsx(dLe,{}),p.jsx(n8e,{}),p.jsx(s8,{})]})}function zU(e,t){return[...e.slice(0,t),...e.slice(t+1)]}function BU(e){return`$import(${e})`}function CLe(e){const t=e.split("/").pop();return t?t.replace(".ts",""):""}function UC(e,t){const r=/\$import\((.*?)\)/g.exec(e);if(!r||r.length!==2)return"INVALID IMPORT STATEMENT";const i=r[1];return t!==void 0&&i.indexOf(t)===0?i.substring(t.length):i}function Zce(e){if(!e)return"";if(typeof e=="object"){if(e instanceof Mi)return e.detail??e.title??e.message;if("message"in e)return e.message}return typeof e=="string"?e:""}const ALe=(e,t,n)=>nb(ea.environments(e,t),{extractData:!0,...n}),wL=(e,t,n,r={})=>nb(ea.deploymentVersions(e,t,n),{...r,extractData:!0,select:i=>i.map(a=>({...a,stages:[...a.stages].sort((o,s)=>o.stage.localeCompare(s.stage))}))}),TLe=(e,t)=>e.environmentType===t.environmentType?e.name.localeCompare(t.name):t.environmentType==="WORKING_COPY"?1:e.environmentType==="WORKING_COPY"||e.environmentType==="PRODUCTION"?-1:t.environmentType==="PRODUCTION"?1:e.name.localeCompare(t.name);var HU=1,OLe=.9,RLe=.8,jLe=.17,VC=.1,zC=.999,kLe=.9999,NLe=.99,ILe=/[\\\/_+.#"@\[\(\{&]/,MLe=/[\\\/_+.#"@\[\(\{&]/g,DLe=/[\s-]/,Yce=/[\s-]/g;function RM(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?HU:NLe;var s=`${i},${a}`;if(o[s]!==void 0)return o[s];for(var l=r.charAt(a),c=n.indexOf(l,i),u=0,d,f,h,v;c>=0;)d=RM(e,t,n,r,c+1,a+1,o),d>u&&(c===i?d*=HU:ILe.test(e.charAt(c-1))?(d*=RLe,h=e.slice(i,c-1).match(MLe),h&&i>0&&(d*=Math.pow(zC,h.length))):DLe.test(e.charAt(c-1))?(d*=OLe,v=e.slice(i,c-1).match(Yce),v&&i>0&&(d*=Math.pow(zC,v.length))):(d*=jLe,i>0&&(d*=Math.pow(zC,c-i))),e.charAt(c)!==t.charAt(a)&&(d*=kLe)),(d<VC&&n.charAt(c-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(c-1)!==r.charAt(a))&&(f=RM(e,t,n,r,c+1,a+2,o),f*VC>d&&(d=f*VC)),d>u&&(u=d),c=n.indexOf(l,c+1);return o[s]=u,u}function WU(e){return e.toLowerCase().replace(Yce," ")}function LLe(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,RM(e,t,WU(e),WU(t),0,0,{})}var M2="Dialog",[Xce,bCt]=$a(M2),[FLe,hs]=Xce(M2),Qce=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=x.useRef(null),l=x.useRef(null),[c,u]=Po({prop:r,defaultProp:i??!1,onChange:a,caller:M2});return p.jsx(FLe,{scope:t,triggerRef:s,contentRef:l,contentId:pi(),titleId:pi(),descriptionId:pi(),open:c,onOpenChange:u,onOpenToggle:x.useCallback(()=>u(d=>!d),[u]),modal:o,children:n})};Qce.displayName=M2;var Jce="DialogTrigger",qLe=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=hs(Jce,n),a=Zt(t,i.triggerRef);return p.jsx(vt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":EL(i.open),...r,ref:a,onClick:Ge(e.onClick,i.onOpenToggle)})});qLe.displayName=Jce;var _L="DialogPortal",[ULe,eue]=Xce(_L,{forceMount:void 0}),tue=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=hs(_L,t);return p.jsx(ULe,{scope:t,forceMount:n,children:x.Children.map(r,o=>p.jsx(sa,{present:n||a.open,children:p.jsx(km,{asChild:!0,container:i,children:o})}))})};tue.displayName=_L;var rS="DialogOverlay",nue=x.forwardRef((e,t)=>{const n=eue(rS,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=hs(rS,e.__scopeDialog);return a.modal?p.jsx(sa,{present:r||a.open,children:p.jsx(zLe,{...i,ref:t})}):null});nue.displayName=rS;var VLe=wu("DialogOverlay.RemoveScroll"),zLe=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=hs(rS,n);return p.jsx(Zy,{as:VLe,allowPinchZoom:!0,shards:[i.contentRef],children:p.jsx(vt.div,{"data-state":EL(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Pf="DialogContent",rue=x.forwardRef((e,t)=>{const n=eue(Pf,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=hs(Pf,e.__scopeDialog);return p.jsx(sa,{present:r||a.open,children:a.modal?p.jsx(BLe,{...i,ref:t}):p.jsx(HLe,{...i,ref:t})})});rue.displayName=Pf;var BLe=x.forwardRef((e,t)=>{const n=hs(Pf,e.__scopeDialog),r=x.useRef(null),i=Zt(t,n.contentRef,r);return x.useEffect(()=>{const a=r.current;if(a)return Ky(a)},[]),p.jsx(iue,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ge(e.onCloseAutoFocus,a=>{var o;a.preventDefault(),(o=n.triggerRef.current)==null||o.focus()}),onPointerDownOutside:Ge(e.onPointerDownOutside,a=>{const o=a.detail.originalEvent,s=o.button===0&&o.ctrlKey===!0;(o.button===2||s)&&a.preventDefault()}),onFocusOutside:Ge(e.onFocusOutside,a=>a.preventDefault())})}),HLe=x.forwardRef((e,t)=>{const n=hs(Pf,e.__scopeDialog),r=x.useRef(!1),i=x.useRef(!1);return p.jsx(iue,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var o,s;(o=e.onCloseAutoFocus)==null||o.call(e,a),a.defaultPrevented||(r.current||(s=n.triggerRef.current)==null||s.focus(),a.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:a=>{var l,c;(l=e.onInteractOutside)==null||l.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const o=a.target;((c=n.triggerRef.current)==null?void 0:c.contains(o))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),iue=x.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=hs(Pf,n),l=x.useRef(null),c=Zt(t,l);return v2(),p.jsxs(p.Fragment,{children:[p.jsx(Wy,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:p.jsx(Vu,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":EL(s.open),...o,ref:c,onDismiss:()=>s.onOpenChange(!1)})}),p.jsxs(p.Fragment,{children:[p.jsx(ZLe,{titleId:s.titleId}),p.jsx(XLe,{contentRef:l,descriptionId:s.descriptionId})]})]})}),SL="DialogTitle",WLe=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=hs(SL,n);return p.jsx(vt.h2,{id:i.titleId,...r,ref:t})});WLe.displayName=SL;var aue="DialogDescription",GLe=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=hs(aue,n);return p.jsx(vt.p,{id:i.descriptionId,...r,ref:t})});GLe.displayName=aue;var oue="DialogClose",KLe=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=hs(oue,n);return p.jsx(vt.button,{type:"button",...r,ref:t,onClick:Ge(e.onClick,()=>i.onOpenChange(!1))})});KLe.displayName=oue;function EL(e){return e?"open":"closed"}var sue="DialogTitleWarning",[xCt,lue]=Ywe(sue,{contentName:Pf,titleName:SL,docsSlug:"dialog"}),ZLe=({titleId:e})=>{const t=lue(sue),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
532
+ `)},z8e=0,oh=[];function B8e(e){var t=x.useRef([]),n=x.useRef([0,0]),r=x.useRef(),i=x.useState(z8e++)[0],a=x.useState(function(){return x8()})[0],o=x.useRef(e);x.useEffect(function(){o.current=e},[e]),x.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var m=koe([e.lockRef.current],(e.shards||[]).map(MU),!0).filter(Boolean);return m.forEach(function(g){return g.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),m.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=x.useCallback(function(m,g){if("touches"in m&&m.touches.length===2)return!o.current.allowPinchZoom;var y=v1(m),b=n.current,w="deltaX"in m?m.deltaX:b[0]-y[0],S="deltaY"in m?m.deltaY:b[1]-y[1],E,_=m.target,$=Math.abs(w)>Math.abs(S)?"h":"v";if("touches"in m&&$==="h"&&_.type==="range")return!1;var P=NU($,_);if(!P)return!0;if(P?E=$:(E=$==="v"?"h":"v",P=NU($,_)),!P)return!1;if(!r.current&&"changedTouches"in m&&(w||S)&&(r.current=E),!E)return!0;var A=r.current||E;return q8e(A,g,m,A==="h"?w:S)},[]),l=x.useCallback(function(m){var g=m;if(!(!oh.length||oh[oh.length-1]!==a)){var y="deltaY"in g?IU(g):v1(g),b=t.current.filter(function(E){return E.name===g.type&&E.target===g.target&&U8e(E.delta,y)})[0];if(b&&b.should){g.cancelable&&g.preventDefault();return}if(!b){var w=(o.current.shards||[]).map(MU).filter(Boolean).filter(function(E){return E.contains(g.target)}),S=w.length>0?s(g,w[0]):!o.current.noIsolation;S&&g.cancelable&&g.preventDefault()}}},[]),c=x.useCallback(function(m,g,y,b){var w={name:m,delta:g,target:y,should:b};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(S){return S!==w})},1)},[]),u=x.useCallback(function(m){n.current=v1(m),r.current=void 0},[]),d=x.useCallback(function(m){c(m.type,IU(m),m.target,s(m,e.lockRef.current))},[]),f=x.useCallback(function(m){c(m.type,v1(m),m.target,s(m,e.lockRef.current))},[]);x.useEffect(function(){return oh.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",l,ah),document.addEventListener("touchmove",l,ah),document.addEventListener("touchstart",u,ah),function(){oh=oh.filter(function(m){return m!==a}),document.removeEventListener("wheel",l,ah),document.removeEventListener("touchmove",l,ah),document.removeEventListener("touchstart",u,ah)}},[]);var h=e.removeScrollBar,v=e.inert;return x.createElement(x.Fragment,null,v?x.createElement(a,{styles:V8e(i)}):null,h?x.createElement(Foe,{gapMode:"margin"}):null)}const H8e=Doe(jce,B8e);var Mce=x.forwardRef(function(e,t){return x.createElement(R2,ji({},e,{ref:t,sideCar:H8e}))});Mce.classNames=R2.classNames;const Dce="Dialog",[Lce,yCt]=a8e(Dce),[W8e,fs]=Lce(Dce),G8e=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=x.useRef(null),l=x.useRef(null),[c=!1,u]=c8e({prop:r,defaultProp:i,onChange:a});return x.createElement(W8e,{scope:t,triggerRef:s,contentRef:l,contentId:kC(),titleId:kC(),descriptionId:kC(),open:c,onOpenChange:u,onOpenToggle:x.useCallback(()=>u(d=>!d),[u]),modal:o},n)},K8e="DialogTrigger",Z8e=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=fs(K8e,n),a=zm(t,i.triggerRef);return x.createElement(Zu.button,ti({type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":mL(i.open)},r,{ref:a,onClick:fu(e.onClick,i.onOpenToggle)}))}),Fce="DialogPortal",[Y8e,qce]=Lce(Fce,{forceMount:void 0}),X8e=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=fs(Fce,t);return x.createElement(Y8e,{scope:t,forceMount:n},x.Children.map(r,o=>x.createElement(O2,{present:n||a.open},x.createElement(O8e,{asChild:!0,container:i},o))))},OM="DialogOverlay",Q8e=x.forwardRef((e,t)=>{const n=qce(OM,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=fs(OM,e.__scopeDialog);return a.modal?x.createElement(O2,{present:r||a.open},x.createElement(J8e,ti({},i,{ref:t}))):null}),J8e=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=fs(OM,n);return x.createElement(Mce,{as:pL,allowPinchZoom:!0,shards:[i.contentRef]},x.createElement(Zu.div,ti({"data-state":mL(i.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))}),Up="DialogContent",eLe=x.forwardRef((e,t)=>{const n=qce(Up,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=fs(Up,e.__scopeDialog);return x.createElement(O2,{present:r||a.open},a.modal?x.createElement(tLe,ti({},i,{ref:t})):x.createElement(nLe,ti({},i,{ref:t})))}),tLe=x.forwardRef((e,t)=>{const n=fs(Up,e.__scopeDialog),r=x.useRef(null),i=zm(t,n.contentRef,r);return x.useEffect(()=>{const a=r.current;if(a)return Ky(a)},[]),x.createElement(Uce,ti({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:fu(e.onCloseAutoFocus,a=>{var o;a.preventDefault(),(o=n.triggerRef.current)===null||o===void 0||o.focus()}),onPointerDownOutside:fu(e.onPointerDownOutside,a=>{const o=a.detail.originalEvent,s=o.button===0&&o.ctrlKey===!0;(o.button===2||s)&&a.preventDefault()}),onFocusOutside:fu(e.onFocusOutside,a=>a.preventDefault())}))}),nLe=x.forwardRef((e,t)=>{const n=fs(Up,e.__scopeDialog),r=x.useRef(!1),i=x.useRef(!1);return x.createElement(Uce,ti({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var o;if((o=e.onCloseAutoFocus)===null||o===void 0||o.call(e,a),!a.defaultPrevented){var s;r.current||(s=n.triggerRef.current)===null||s===void 0||s.focus(),a.preventDefault()}r.current=!1,i.current=!1},onInteractOutside:a=>{var o,s;(o=e.onInteractOutside)===null||o===void 0||o.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const l=a.target;((s=n.triggerRef.current)===null||s===void 0?void 0:s.contains(l))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}}))}),Uce=x.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=fs(Up,n),l=x.useRef(null),c=zm(t,l);return k8e(),x.createElement(x.Fragment,null,x.createElement(S8e,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a},x.createElement(x8e,ti({role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":mL(s.open)},o,{ref:c,onDismiss:()=>s.onOpenChange(!1)}))),!1)}),Vce="DialogTitle",rLe=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=fs(Vce,n);return x.createElement(Zu.h2,ti({id:i.titleId},r,{ref:t}))}),iLe="DialogDescription",aLe=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=fs(iLe,n);return x.createElement(Zu.p,ti({id:i.descriptionId},r,{ref:t}))}),oLe="DialogClose",sLe=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=fs(oLe,n);return x.createElement(Zu.button,ti({type:"button"},r,{ref:t,onClick:fu(e.onClick,()=>i.onOpenChange(!1))}))});function mL(e){return e?"open":"closed"}const lLe="DialogTitleWarning";i8e(lLe,{contentName:Up,titleName:Vce,docsSlug:"dialog"});const zce=G8e,Bce=Z8e,Hce=X8e,j2=Q8e,k2=eLe,N2=rLe,I2=aLe,gL=sLe,Yu=zce,vL=Bce,cLe=Hce,DU=gL,Wce=x.forwardRef(({className:e,...t},n)=>p.jsx(j2,{ref:n,className:Ie("fixed inset-0 z-50 bg-black/50 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));Wce.displayName=j2.displayName;const Zs=x.forwardRef(({className:e,children:t,hideClose:n,...r},i)=>p.jsxs(cLe,{children:[p.jsx(Wce,{}),p.jsxs(k2,{ref:i,className:Ie("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...r,children:[t,!n&&p.jsxs(gL,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[p.jsx(al,{className:"h-4 w-4"}),p.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Zs.displayName=k2.displayName;const Ou=({className:e,...t})=>p.jsx("div",{className:Ie("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Ou.displayName="DialogHeader";const rc=({className:e,...t})=>p.jsx("div",{className:Ie("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});rc.displayName="DialogFooter";const Ys=x.forwardRef(({className:e,...t},n)=>p.jsx(N2,{ref:n,className:Ie("text-2xl font-semibold leading-none text-center tracking-tight mb-5",e),...t}));Ys.displayName=N2.displayName;const Ru=x.forwardRef(({className:e,...t},n)=>p.jsx(I2,{ref:n,className:Ie("text-sm text-center",e),...t}));Ru.displayName=I2.displayName;const LC={".ts":"typescript",".tsx":"typescript",".js":"javascript",".jsx":"javascript",".mjs":"javascript",".cjs":"javascript",".json":"json",".html":"html",".htm":"html",".xml":"xml",".svg":"xml",".yaml":"yaml",".yml":"yaml",".md":"markdown",".mdx":"markdown",".css":"css",".scss":"scss",".sass":"sass",".less":"less",".py":"python",".rs":"rust",".go":"go",".java":"java",".c":"c",".cpp":"cpp",".cs":"csharp",".php":"php",".rb":"ruby",".sh":"shell",".bash":"shell",".zsh":"shell",".sql":"sql",".graphql":"graphql",".gql":"graphql",".env":"plaintext",".toml":"toml",".ini":"ini",".properties":"properties",".dockerfile":"dockerfile",Dockerfile:"dockerfile",".makefile":"makefile",Makefile:"makefile"};function uLe(e){const t=e.split("/").pop()||"";if(LC[t])return LC[t];const n=t.lastIndexOf(".");if(n===-1)return"plaintext";const r=t.slice(n);return LC[r]||"plaintext"}function Gce({open:e,filePath:t,localContent:n,remoteContent:r,onResolve:i,onCancel:a}){const[o,s]=x.useState("local"),l=uLe(t);return p.jsx(Yu,{open:e,onOpenChange:c=>!c&&a(),children:p.jsxs(Zs,{className:"max-w-7xl max-h-[90vh] p-0",hideClose:!0,children:[p.jsx("div",{className:"p-6 pb-0",children:p.jsxs(Ou,{children:[p.jsx(Ys,{className:"text-lg font-semibold text-left mb-1",children:"File Conflict Detected"}),p.jsxs("p",{className:"text-sm text-gray-600 text-left",children:[p.jsx("span",{className:"font-mono font-semibold",children:t})," has been modified both locally and on disk"]})]})}),p.jsxs("div",{className:"flex-1 min-h-0 flex flex-col px-6",children:[p.jsxs("div",{className:"grid grid-cols-2 pr-[30px]",children:[p.jsxs("button",{type:"button",className:`flex flex-col py-3 cursor-pointer transition-all border-t-4 border-x ${o==="local"?"border-t-pink-500 border-x-pink-200 bg-pink-50":"border-t-gray-200 border-x-gray-200 bg-gray-50 hover:bg-gray-100"}`,style:{paddingLeft:"26px",paddingRight:"24px"},onClick:()=>s("local"),"aria-pressed":o==="local",children:[p.jsx("div",{className:"font-semibold text-sm",children:"Browser Version"}),p.jsx("div",{className:"text-xs text-gray-500",children:"Current editor content"})]}),p.jsxs("button",{type:"button",className:`flex flex-col px-6 py-3 cursor-pointer transition-all border-t-4 border-x ${o==="remote"?"border-t-pink-500 border-x-pink-200 bg-pink-50":"border-t-gray-200 border-x-gray-200 bg-gray-50 hover:bg-gray-100"}`,onClick:()=>s("remote"),"aria-pressed":o==="remote",children:[p.jsx("div",{className:"font-semibold text-sm",children:"Disk Version"}),p.jsx("div",{className:"text-xs text-gray-500",children:"File on disk"})]})]}),p.jsx("div",{className:"border border-t-0 overflow-hidden shadow-sm flex-1",style:{minHeight:"55vh"},children:p.jsx(Vne,{original:n,modified:r,language:l,theme:"vs",options:{readOnly:!0,renderSideBySide:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1,fontSize:13,wordWrap:"on"}})})]}),p.jsxs(rc,{className:"px-6 pb-6 flex-row justify-between items-center",children:[p.jsx("p",{className:"text-sm text-gray-600",children:o==="local"?p.jsx(p.Fragment,{children:"Browser version will be saved to disk"}):p.jsx(p.Fragment,{children:"Disk version will replace browser content"})}),p.jsxs("div",{className:"flex gap-2",children:[p.jsx(Ke,{variant:"ghost",onClick:a,children:"Cancel"}),p.jsxs(Ke,{variant:"default",onClick:()=>i(o),children:["Apply ",o==="local"?"Browser":"Disk"," Version"]})]})]})]})})}function dLe(){const{conflict:e,showConflict:t,resolveConflict:n,cancelConflict:r}=Ace(),i=yn(s=>s.filesByPath),a=yn(s=>s.saveConflictPath),o=yn(s=>s.clearSaveConflict);return x.useEffect(()=>{if(a){un.info(`Save conflict detected for ${a}`);const s=i[a];s?sf("local",a).then(l=>{t({filePath:a,localContent:s.content??"",remoteContent:l.content??"",remoteLastModified:l.lastModified})}).catch(l=>{un.error("Error fetching file for conflict dialog:",l)}):un.warn(`No file model found for ${a}`),o()}},[a,i,o,t]),e?p.jsx(Gce,{open:!0,filePath:e.filePath,localContent:e.localContent,remoteContent:e.remoteContent,onResolve:n,onCancel:r}):null}const yL=Symbol.for("RemoteUi::Retain"),bL=Symbol.for("RemoteUi::Release"),nS=Symbol.for("RemoteUi::RetainedBy");class Kce{constructor(){this.memoryManaged=new Set}add(t){this.memoryManaged.add(t),t[nS].add(this),t[yL]()}release(){for(const t of this.memoryManaged)t[nS].delete(this),t[bL]();this.memoryManaged.clear()}}function fLe(e){return!!(e&&e[yL]&&e[bL])}function LU(e){if(e==null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t==null||t===Object.prototype}const y1="_@f";function hLe(e){const t=new Map,n=new Map,r=new Map;return{encode:i,decode:a,async call(o,s){const l=new Kce,c=n.get(o);if(c==null)throw new Error("You attempted to call a function that was already released.");try{const u=fLe(c)?[l,...c[nS]]:[l];return await c(...a(s,u))}finally{l.release()}},release(o){const s=n.get(o);s&&(n.delete(o),t.delete(s))},terminate(){t.clear(),n.clear(),r.clear()}};function i(o,s=new Map){if(o==null)return[o];const l=s.get(o);if(l)return l;if(typeof o=="object"){if(Array.isArray(o)){s.set(o,[void 0]);const u=[],f=[o.map(h=>{const[v,m=[]]=i(h,s);return u.push(...m),v}),u];return s.set(o,f),f}if(LU(o)){s.set(o,[void 0]);const u=[],f=[Object.keys(o).reduce((h,v)=>{const[m,g=[]]=i(o[v],s);return u.push(...g),{...h,[v]:m}},{}),u];return s.set(o,f),f}}if(typeof o=="function"){if(t.has(o)){const f=t.get(o),h=[{[y1]:f}];return s.set(o,h),h}const u=e.uuid();t.set(o,u),n.set(u,o);const d=[{[y1]:u}];return s.set(o,d),d}const c=[o];return s.set(o,c),c}function a(o,s){if(typeof o=="object"){if(o==null)return o;if(Array.isArray(o))return o.map(l=>a(l,s));if(y1 in o){const l=o[y1];if(r.has(l))return r.get(l);let c=0,u=!1;const d=()=>{c-=1,c===0&&(u=!0,r.delete(l),e.release(l))},f=()=>{c+=1},h=new Set(s),v=(...m)=>{if(u)throw new Error("You attempted to call a function that was already released.");if(!r.has(l))throw new Error("You attempted to call a function that was already revoked.");return e.call(l,m)};Object.defineProperties(v,{[bL]:{value:d,writable:!1},[yL]:{value:f,writable:!1},[nS]:{value:h,writable:!1}});for(const m of h)m.add(v);return r.set(l,v),v}if(LU(o))return Object.keys(o).reduce((l,c)=>({...l,[c]:a(o[c],s)}),{})}return o}}const FU=0,FC=1,qU=2,UU=3,VU=5,qC=6;function pLe(e,{uuid:t=mLe,createEncoder:n=hLe,callable:r}={}){let i=!1,a=e;const o=new Map,s=new Map,l=gLe(f,r),c=n({uuid:t,release(m){u(UU,[m])},call(m,g,y){const b=t(),w=h(b,y),[S,E]=c.encode(g);return u(VU,[b,m,S],E),w}});return a.addEventListener("message",d),{call:l,replace(m){const g=a;a=m,g.removeEventListener("message",d),m.addEventListener("message",d)},expose(m){for(const g of Object.keys(m)){const y=m[g];typeof y=="function"?o.set(g,y):o.delete(g)}},callable(...m){if(r!=null)for(const g of m)Object.defineProperty(l,g,{value:f(g),writable:!1,configurable:!0,enumerable:!0})},terminate(){u(qU,void 0),v(),a.terminate&&a.terminate()}};function u(m,g,y){i||a.postMessage(g?[m,g]:[m],y)}async function d(m){const{data:g}=m;if(!(g==null||!Array.isArray(g)))switch(g[0]){case qU:{v();break}case FU:{const y=new Kce,[b,w,S]=g[1],E=o.get(w);try{if(E==null)throw new Error(`No '${w}' method is exposed on this endpoint`);const[_,$]=c.encode(await E(...c.decode(S,[y])));u(FC,[b,void 0,_],$)}catch(_){const{name:$,message:P,stack:A}=_;throw u(FC,[b,{name:$,message:P,stack:A}]),_}finally{y.release()}break}case FC:{const[y]=g[1];s.get(y)(...g[1]),s.delete(y);break}case UU:{const[y]=g[1];c.release(y);break}case qC:{const[y]=g[1];s.get(y)(...g[1]),s.delete(y);break}case VU:{const[y,b,w]=g[1];try{const S=await c.call(b,w),[E,_]=c.encode(S);u(qC,[y,void 0,E],_)}catch(S){const{name:E,message:_,stack:$}=S;throw u(qC,[y,{name:E,message:_,stack:$}]),S}break}}}function f(m){return(...g)=>{if(i)return Promise.reject(new Error("You attempted to call a function on a terminated web worker."));if(typeof m!="string"&&typeof m!="number")return Promise.reject(new Error(`Can’t call a symbol method on a remote endpoint: ${m.toString()}`));const y=t(),b=h(y),[w,S]=c.encode(g);return u(FU,[y,m,w],S),b}}function h(m,g){return new Promise((y,b)=>{s.set(m,(w,S,E)=>{if(S==null)y(E&&c.decode(E,g));else{const _=new Error;Object.assign(_,S),b(_)}})})}function v(){var m;i=!0,o.clear(),s.clear(),(m=c.terminate)===null||m===void 0||m.call(c),a.removeEventListener("message",d)}}function mLe(){return`${b1()}-${b1()}-${b1()}-${b1()}`}function b1(){return Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)}function gLe(e,t){let n;if(t==null){if(typeof Proxy!="function")throw new Error("You must pass an array of callable methods in environments without Proxies.");const r=new Map;n=new Proxy({},{get(i,a){if(r.has(a))return r.get(a);const o=e(a);return r.set(a,o),o}})}else{n={};for(const r of t)Object.defineProperty(n,r,{value:e(r),writable:!1,configurable:!0,enumerable:!0})}return n}function vLe(e){return typeof window>"u"||typeof e!="string"?void 0:new URL(e,window.location.href)}function yLe(e){const t=URL.createObjectURL(new Blob([`importScripts(${JSON.stringify(e.href)})`])),n=new Worker(t),r=n.terminate.bind(n);return n.terminate=()=>{URL.revokeObjectURL(t),r()},n}const xL=new WeakMap;function bLe(e){const t=vLe(e);function n({createMessenger:r=yLe,...i}={}){if(t){const a=pLe(r(t),i),{call:o}=a;return xL.set(o,a),o}if(typeof e=="function")return new Proxy({},{get(a,o){return async(...s)=>(await e())[o](...s)}});if(typeof window>"u")return new Proxy({},{get(a,o){return()=>{throw new Error("You can’t call a method on a worker on the server.")}}});throw new Error("Could not create a suitable fallback")}return Reflect.defineProperty(n,"url",{value:t}),n}function xLe(e){const t=wLe(e);return t==null||t.terminate(),xL.delete(e),t!=null}function wLe(e){return xL.get(e)}function _Le(e){const[t]=x.useState(e);return x.useRef(t)}function SLe(e,...t){const{current:n}=_Le(()=>e(...t));return x.useEffect(()=>()=>{xLe(n)},[n]),n}const ELe=bLe(()=>Rxe(()=>import("./local-worker-CT-ae3Yc.js"),__vite__mapDeps([0,1,2]),import.meta.url)),$Le=()=>{const e=uc(),t=SLe(ELe),n=x.useRef(null),{conflict:r,showConflict:i,resolveConflict:a,cancelConflict:o}=Ace();x.useEffect(()=>{e&&t.ready().catch(l=>{un.warn("Failed to load local types:",l)})},[t,e]),x.useEffect(()=>{if(!e)return;const l=new EventSource("/api/changes");return n.current=l,l.addEventListener("change",async c=>{try{const u=JSON.parse(c.data),d=u.filePath.startsWith("/")?u.filePath:`/${u.filePath}`,f=yn.getState().filesByPath,h=yn.getState().updateFile,v=f[d];if(!v){un.info(`File ${d} changed but not loaded in editor`);return}if(v.saveState===Dt.modified||v.saveState===Dt.new){un.warn(`File ${d} changed on disk but has unsaved changes. Showing conflict dialog.`);const b=await sf("local",d);i({filePath:d,localContent:v.content??"",remoteContent:b.content??"",remoteLastModified:b.lastModified});return}un.info(`Reloading ${d} from disk...`);const m=await sf("local",d),g=e.Uri.file(d),y=e.editor.getModel(g);y&&m.content!==void 0&&(y.setValue(m.content),un.info(`Updated Monaco model for ${d}`)),h({...v,content:m.content,saveState:Dt.unmodified,lastModified:m.lastModified}),un.info(`Successfully reloaded ${d}`)}catch(u){un.error("Error handling file change event:",u)}}),l.addEventListener("init",()=>{un.info("SSE connection established")}),l.onerror=c=>{l.readyState===EventSource.CLOSED?un.debug("SSE connection closed"):un.warn("SSE connection error:",c)},()=>{l.close(),n.current=null,un.info("SSE connection closed")}},[e,i]);const s=async l=>{if(!r||!e)return;if(l==="remote"){await a(l);return}if(yn.getState().filesByPath[r.filePath]){const u=e.Uri.file(r.filePath),d=e.editor.getModel(u);d&&d.setValue(r.localContent)}await a(l)};return p.jsx(p.Fragment,{children:r&&p.jsx(Gce,{open:!0,filePath:r.filePath,localContent:r.localContent,remoteContent:r.remoteContent,onResolve:s,onCancel:o})})};function PLe(){const e=In(),{monaco:t,reloadFiles:n}=hL(),r=Tu(n.execute),i=Tu(e),a=e.environment.name,{error:o,isLoading:s}=VE({queryKey:["reloadFiles",a],queryFn:async()=>{try{return await r.current(i.current),!0}catch(l){throw un.error("Failed to reload files:",l),l}},refetchOnWindowFocus:!1,enabled:!!t&&!!a,retry:3,retryDelay:l=>Math.min(1e3*2**l,3e4)});return o?p.jsx("div",{className:"flex items-center justify-center h-full bg-gray-50",children:p.jsxs("div",{className:"text-center p-8 max-w-lg",children:[p.jsx("h2",{className:"text-xl font-semibold text-gray-900 mb-2",children:"Failed to Load Files"}),p.jsx("p",{className:"text-gray-600 mb-4",children:"Unable to load project files from the local server. Please check that the dev server is running and try again."}),p.jsx("button",{type:"button",onClick:()=>window.location.reload(),className:"px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700",children:"Retry"})]})}):s?p.jsx("div",{className:"flex items-center justify-center h-full bg-gray-50",children:p.jsxs("div",{className:"text-center",children:[p.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600 mx-auto mb-4"}),p.jsx("p",{className:"text-gray-600",children:"Loading project files..."})]})}):p.jsxs(p.Fragment,{children:[p.jsx($Le,{}),p.jsx(dLe,{}),p.jsx(n8e,{}),p.jsx(s8,{})]})}function zU(e,t){return[...e.slice(0,t),...e.slice(t+1)]}function BU(e){return`$import(${e})`}function CLe(e){const t=e.split("/").pop();return t?t.replace(".ts",""):""}function UC(e,t){const r=/\$import\((.*?)\)/g.exec(e);if(!r||r.length!==2)return"INVALID IMPORT STATEMENT";const i=r[1];return t!==void 0&&i.indexOf(t)===0?i.substring(t.length):i}function Zce(e){if(!e)return"";if(typeof e=="object"){if(e instanceof Mi)return e.detail??e.title??e.message;if("message"in e)return e.message}return typeof e=="string"?e:""}const ALe=(e,t,n)=>nb(ea.environments(e,t),{extractData:!0,...n}),wL=(e,t,n,r={})=>nb(ea.deploymentVersions(e,t,n),{...r,extractData:!0,select:i=>i.map(a=>({...a,stages:[...a.stages].sort((o,s)=>o.stage.localeCompare(s.stage))}))}),TLe=(e,t)=>e.environmentType===t.environmentType?e.name.localeCompare(t.name):t.environmentType==="WORKING_COPY"?1:e.environmentType==="WORKING_COPY"||e.environmentType==="PRODUCTION"?-1:t.environmentType==="PRODUCTION"?1:e.name.localeCompare(t.name);var HU=1,OLe=.9,RLe=.8,jLe=.17,VC=.1,zC=.999,kLe=.9999,NLe=.99,ILe=/[\\\/_+.#"@\[\(\{&]/,MLe=/[\\\/_+.#"@\[\(\{&]/g,DLe=/[\s-]/,Yce=/[\s-]/g;function RM(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?HU:NLe;var s=`${i},${a}`;if(o[s]!==void 0)return o[s];for(var l=r.charAt(a),c=n.indexOf(l,i),u=0,d,f,h,v;c>=0;)d=RM(e,t,n,r,c+1,a+1,o),d>u&&(c===i?d*=HU:ILe.test(e.charAt(c-1))?(d*=RLe,h=e.slice(i,c-1).match(MLe),h&&i>0&&(d*=Math.pow(zC,h.length))):DLe.test(e.charAt(c-1))?(d*=OLe,v=e.slice(i,c-1).match(Yce),v&&i>0&&(d*=Math.pow(zC,v.length))):(d*=jLe,i>0&&(d*=Math.pow(zC,c-i))),e.charAt(c)!==t.charAt(a)&&(d*=kLe)),(d<VC&&n.charAt(c-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(c-1)!==r.charAt(a))&&(f=RM(e,t,n,r,c+1,a+2,o),f*VC>d&&(d=f*VC)),d>u&&(u=d),c=n.indexOf(l,c+1);return o[s]=u,u}function WU(e){return e.toLowerCase().replace(Yce," ")}function LLe(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,RM(e,t,WU(e),WU(t),0,0,{})}var M2="Dialog",[Xce,bCt]=$a(M2),[FLe,hs]=Xce(M2),Qce=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=x.useRef(null),l=x.useRef(null),[c,u]=Po({prop:r,defaultProp:i??!1,onChange:a,caller:M2});return p.jsx(FLe,{scope:t,triggerRef:s,contentRef:l,contentId:pi(),titleId:pi(),descriptionId:pi(),open:c,onOpenChange:u,onOpenToggle:x.useCallback(()=>u(d=>!d),[u]),modal:o,children:n})};Qce.displayName=M2;var Jce="DialogTrigger",qLe=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=hs(Jce,n),a=Zt(t,i.triggerRef);return p.jsx(vt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":EL(i.open),...r,ref:a,onClick:Ge(e.onClick,i.onOpenToggle)})});qLe.displayName=Jce;var _L="DialogPortal",[ULe,eue]=Xce(_L,{forceMount:void 0}),tue=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=hs(_L,t);return p.jsx(ULe,{scope:t,forceMount:n,children:x.Children.map(r,o=>p.jsx(sa,{present:n||a.open,children:p.jsx(km,{asChild:!0,container:i,children:o})}))})};tue.displayName=_L;var rS="DialogOverlay",nue=x.forwardRef((e,t)=>{const n=eue(rS,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=hs(rS,e.__scopeDialog);return a.modal?p.jsx(sa,{present:r||a.open,children:p.jsx(zLe,{...i,ref:t})}):null});nue.displayName=rS;var VLe=wu("DialogOverlay.RemoveScroll"),zLe=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=hs(rS,n);return p.jsx(Zy,{as:VLe,allowPinchZoom:!0,shards:[i.contentRef],children:p.jsx(vt.div,{"data-state":EL(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Pf="DialogContent",rue=x.forwardRef((e,t)=>{const n=eue(Pf,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=hs(Pf,e.__scopeDialog);return p.jsx(sa,{present:r||a.open,children:a.modal?p.jsx(BLe,{...i,ref:t}):p.jsx(HLe,{...i,ref:t})})});rue.displayName=Pf;var BLe=x.forwardRef((e,t)=>{const n=hs(Pf,e.__scopeDialog),r=x.useRef(null),i=Zt(t,n.contentRef,r);return x.useEffect(()=>{const a=r.current;if(a)return Ky(a)},[]),p.jsx(iue,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ge(e.onCloseAutoFocus,a=>{var o;a.preventDefault(),(o=n.triggerRef.current)==null||o.focus()}),onPointerDownOutside:Ge(e.onPointerDownOutside,a=>{const o=a.detail.originalEvent,s=o.button===0&&o.ctrlKey===!0;(o.button===2||s)&&a.preventDefault()}),onFocusOutside:Ge(e.onFocusOutside,a=>a.preventDefault())})}),HLe=x.forwardRef((e,t)=>{const n=hs(Pf,e.__scopeDialog),r=x.useRef(!1),i=x.useRef(!1);return p.jsx(iue,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var o,s;(o=e.onCloseAutoFocus)==null||o.call(e,a),a.defaultPrevented||(r.current||(s=n.triggerRef.current)==null||s.focus(),a.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:a=>{var l,c;(l=e.onInteractOutside)==null||l.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const o=a.target;((c=n.triggerRef.current)==null?void 0:c.contains(o))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),iue=x.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=hs(Pf,n),l=x.useRef(null),c=Zt(t,l);return v2(),p.jsxs(p.Fragment,{children:[p.jsx(Wy,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:p.jsx(Vu,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":EL(s.open),...o,ref:c,onDismiss:()=>s.onOpenChange(!1)})}),p.jsxs(p.Fragment,{children:[p.jsx(ZLe,{titleId:s.titleId}),p.jsx(XLe,{contentRef:l,descriptionId:s.descriptionId})]})]})}),SL="DialogTitle",WLe=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=hs(SL,n);return p.jsx(vt.h2,{id:i.titleId,...r,ref:t})});WLe.displayName=SL;var aue="DialogDescription",GLe=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=hs(aue,n);return p.jsx(vt.p,{id:i.descriptionId,...r,ref:t})});GLe.displayName=aue;var oue="DialogClose",KLe=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=hs(oue,n);return p.jsx(vt.button,{type:"button",...r,ref:t,onClick:Ge(e.onClick,()=>i.onOpenChange(!1))})});KLe.displayName=oue;function EL(e){return e?"open":"closed"}var sue="DialogTitleWarning",[xCt,lue]=Ywe(sue,{contentName:Pf,titleName:SL,docsSlug:"dialog"}),ZLe=({titleId:e})=>{const t=lue(sue),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
533
533
 
534
534
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
535
535
 
@@ -2159,4 +2159,4 @@ PERFORMANCE OF THIS SOFTWARE.
2159
2159
  `,...a.current()});return/^[\t ]/.test(c)&&(c=Ay(c.charCodeAt(0))+c.slice(1)),c=c?o+" "+c:o,n.options.closeAtx&&(c+=" "+o),l(),s(),c}Rbe.peek=p2t;function Rbe(e){return e.value||""}function p2t(){return"<"}jbe.peek=m2t;function jbe(e,t,n,r){const i=a5(n),a=i==='"'?"Quote":"Apostrophe",o=n.enter("image");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("![");return c+=l.move(n.safe(e.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=n.enter(`title${a}`),c+=l.move(" "+i),c+=l.move(n.safe(e.title,{before:c,after:i,...l.current()})),c+=l.move(i),s()),c+=l.move(")"),o(),c}function m2t(){return"!"}kbe.peek=g2t;function kbe(e,t,n,r){const i=e.referenceType,a=n.enter("imageReference");let o=n.enter("label");const s=n.createTracker(r);let l=s.move("![");const c=n.safe(e.alt,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),o();const u=n.stack;n.stack=[],o=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return o(),n.stack=u,a(),i==="full"||!c||c!==d?l+=s.move(d+"]"):i==="shortcut"?l=l.slice(0,-1):l+=s.move("]"),l}function g2t(){return"!"}Nbe.peek=v2t;function Nbe(e,t,n){let r=e.value||"",i="`",a=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const o=n.unsafe[a],s=n.compilePattern(o);let l;if(o.atBreak)for(;l=s.exec(r);){let c=l.index;r.charCodeAt(c)===10&&r.charCodeAt(c-1)===13&&c--,r=r.slice(0,c)+" "+r.slice(l.index+1)}}return i+r+i}function v2t(){return"`"}function Ibe(e,t){const n=YF(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Mbe.peek=y2t;function Mbe(e,t,n,r){const i=a5(n),a=i==='"'?"Quote":"Apostrophe",o=n.createTracker(r);let s,l;if(Ibe(e,n)){const u=n.stack;n.stack=[],s=n.enter("autolink");let d=o.move("<");return d+=o.move(n.containerPhrasing(e,{before:d,after:">",...o.current()})),d+=o.move(">"),s(),n.stack=u,d}s=n.enter("link"),l=n.enter("label");let c=o.move("[");return c+=o.move(n.containerPhrasing(e,{before:c,after:"](",...o.current()})),c+=o.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=o.move("<"),c+=o.move(n.safe(e.url,{before:c,after:">",...o.current()})),c+=o.move(">")):(l=n.enter("destinationRaw"),c+=o.move(n.safe(e.url,{before:c,after:e.title?" ":")",...o.current()}))),l(),e.title&&(l=n.enter(`title${a}`),c+=o.move(" "+i),c+=o.move(n.safe(e.title,{before:c,after:i,...o.current()})),c+=o.move(i),l()),c+=o.move(")"),s(),c}function y2t(e,t,n){return Ibe(e,n)?"<":"["}Dbe.peek=b2t;function Dbe(e,t,n,r){const i=e.referenceType,a=n.enter("linkReference");let o=n.enter("label");const s=n.createTracker(r);let l=s.move("[");const c=n.containerPhrasing(e,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),o();const u=n.stack;n.stack=[],o=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return o(),n.stack=u,a(),i==="full"||!c||c!==d?l+=s.move(d+"]"):i==="shortcut"?l=l.slice(0,-1):l+=s.move("]"),l}function b2t(){return"["}function o5(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function x2t(e){const t=o5(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function w2t(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Lbe(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function _2t(e,t,n,r){const i=n.enter("list"),a=n.bulletCurrent;let o=e.ordered?w2t(n):o5(n);const s=e.ordered?o==="."?")":".":x2t(n);let l=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){const u=e.children?e.children[0]:void 0;if((o==="*"||o==="-")&&u&&(!u.children||!u.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(l=!0),Lbe(n)===o&&u){let d=-1;for(;++d<e.children.length;){const f=e.children[d];if(f&&f.type==="listItem"&&f.children&&f.children[0]&&f.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(o=s),n.bulletCurrent=o;const c=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),c}function S2t(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function E2t(e,t,n,r){const i=S2t(n);let a=n.bulletCurrent||o5(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);const s=n.createTracker(r);s.move(a+" ".repeat(o-a.length)),s.shift(o);const l=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,s.current()),u);return l(),c;function u(d,f,h){return f?(h?"":" ".repeat(o))+d:(h?a:a+" ".repeat(o-a.length))+d}}function $2t(e,t,n,r){const i=n.enter("paragraph"),a=n.enter("phrasing"),o=n.containerPhrasing(e,r);return a(),i(),o}const P2t=EP(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function C2t(e,t,n,r){return(e.children.some(function(o){return P2t(o)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function A2t(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Fbe.peek=T2t;function Fbe(e,t,n,r){const i=A2t(n),a=n.enter("strong"),o=n.createTracker(r),s=o.move(i+i);let l=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()}));const c=l.charCodeAt(0),u=LE(r.before.charCodeAt(r.before.length-1),c,i);u.inside&&(l=Ay(c)+l.slice(1));const d=l.charCodeAt(l.length-1),f=LE(r.after.charCodeAt(0),d,i);f.inside&&(l=l.slice(0,-1)+Ay(d));const h=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+l+h}function T2t(e,t,n){return n.options.strong||"*"}function O2t(e,t,n,r){return n.safe(e.value,r)}function R2t(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function j2t(e,t,n){const r=(Lbe(n)+(n.options.ruleSpaces?" ":"")).repeat(R2t(n));return n.options.ruleSpaces?r.slice(0,-1):r}const qbe={blockquote:t2t,break:Pne,code:s2t,definition:c2t,emphasis:Obe,hardBreak:Pne,heading:h2t,html:Rbe,image:jbe,imageReference:kbe,inlineCode:Nbe,link:Mbe,linkReference:Dbe,list:_2t,listItem:E2t,paragraph:$2t,root:C2t,strong:Fbe,text:O2t,thematicBreak:j2t};function k2t(){return{enter:{table:N2t,tableData:Cne,tableHeader:Cne,tableRow:M2t},exit:{codeText:D2t,table:I2t,tableData:HN,tableHeader:HN,tableRow:HN}}}function N2t(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function I2t(e){this.exit(e),this.data.inTable=void 0}function M2t(e){this.enter({type:"tableRow",children:[]},e)}function HN(e){this.exit(e)}function Cne(e){this.enter({type:"tableCell",children:[]},e)}function D2t(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,L2t));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function L2t(e,t){return t==="|"?t:e}function F2t(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
2160
2160
  `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:f,table:o,tableCell:l,tableRow:s}};function o(h,v,m,g){return c(u(h,m,g),h.align)}function s(h,v,m,g){const y=d(h,m,g),b=c([y]);return b.slice(0,b.indexOf(`
2161
2161
  `))}function l(h,v,m,g){const y=m.enter("tableCell"),b=m.enter("phrasing"),w=m.containerPhrasing(h,{...g,before:a,after:a});return b(),y(),w}function c(h,v){return JEt(h,{align:v,alignDelimiters:r,padding:n,stringLength:i})}function u(h,v,m){const g=h.children;let y=-1;const b=[],w=v.enter("table");for(;++y<g.length;)b[y]=d(g[y],v,m);return w(),b}function d(h,v,m){const g=h.children;let y=-1;const b=[],w=v.enter("tableRow");for(;++y<g.length;)b[y]=l(g[y],h,v,m);return w(),b}function f(h,v,m){let g=qbe.inlineCode(h,v,m);return m.stack.includes("tableCell")&&(g=g.replace(/\|/g,"\\$&")),g}}function q2t(){return{exit:{taskListCheckValueChecked:Ane,taskListCheckValueUnchecked:Ane,paragraph:V2t}}}function U2t(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:z2t}}}function Ane(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function V2t(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let a=-1,o;for(;++a<i.length;){const s=i[a];if(s.type==="paragraph"){o=s;break}}o===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function z2t(e,t,n,r){const i=e.children[0],a=typeof e.checked=="boolean"&&i&&i.type==="paragraph",o="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);a&&s.move(o);let l=qbe.listItem(e,t,n,{...r,...s.current()});return a&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),l;function c(u){return u+o}}function B2t(){return[_Et(),zEt(),GEt(),k2t(),q2t()]}function H2t(e){return{extensions:[SEt(),BEt(e),KEt(),F2t(e),U2t()]}}const W2t={tokenize:Q2t,partial:!0},Ube={tokenize:J2t,partial:!0},Vbe={tokenize:e$t,partial:!0},zbe={tokenize:t$t,partial:!0},G2t={tokenize:n$t,partial:!0},Bbe={name:"wwwAutolink",tokenize:Y2t,previous:Wbe},Hbe={name:"protocolAutolink",tokenize:X2t,previous:Gbe},xc={name:"emailAutolink",tokenize:Z2t,previous:Kbe},hl={};function K2t(){return{text:hl}}let Sd=48;for(;Sd<123;)hl[Sd]=xc,Sd++,Sd===58?Sd=65:Sd===91&&(Sd=97);hl[43]=xc;hl[45]=xc;hl[46]=xc;hl[95]=xc;hl[72]=[xc,Hbe];hl[104]=[xc,Hbe];hl[87]=[xc,Bbe];hl[119]=[xc,Bbe];function Z2t(e,t,n){const r=this;let i,a;return o;function o(d){return!H4(d)||!Kbe.call(r,r.previous)||s5(r.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(d))}function s(d){return H4(d)?(e.consume(d),s):d===64?(e.consume(d),l):n(d)}function l(d){return d===46?e.check(G2t,u,c)(d):d===45||d===95||Ni(d)?(a=!0,e.consume(d),l):u(d)}function c(d){return e.consume(d),i=!0,l}function u(d){return a&&i&&Qi(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function Y2t(e,t,n){const r=this;return i;function i(o){return o!==87&&o!==119||!Wbe.call(r,r.previous)||s5(r.events)?n(o):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(W2t,e.attempt(Ube,e.attempt(Vbe,a),n),n)(o))}function a(o){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(o)}}function X2t(e,t,n){const r=this;let i="",a=!1;return o;function o(d){return(d===72||d===104)&&Gbe.call(r,r.previous)&&!s5(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(d),e.consume(d),s):n(d)}function s(d){if(Qi(d)&&i.length<5)return i+=String.fromCodePoint(d),e.consume(d),s;if(d===58){const f=i.toLowerCase();if(f==="http"||f==="https")return e.consume(d),l}return n(d)}function l(d){return d===47?(e.consume(d),a?c:(a=!0,l)):n(d)}function c(d){return d===null||IE(d)||qn(d)||Df(d)||wP(d)?n(d):e.attempt(Ube,e.attempt(Vbe,u),n)(d)}function u(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function Q2t(e,t,n){let r=0;return i;function i(o){return(o===87||o===119)&&r<3?(r++,e.consume(o),i):o===46&&r===3?(e.consume(o),a):n(o)}function a(o){return o===null?n(o):t(o)}}function J2t(e,t,n){let r,i,a;return o;function o(c){return c===46||c===95?e.check(zbe,l,s)(c):c===null||qn(c)||Df(c)||c!==45&&wP(c)?l(c):(a=!0,e.consume(c),o)}function s(c){return c===95?r=!0:(i=r,r=void 0),e.consume(c),o}function l(c){return i||r||!a?n(c):t(c)}}function e$t(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(zbe,t,a)(o):o===null||qn(o)||Df(o)?t(o):(e.consume(o),i)}function a(o){return o===41&&r++,e.consume(o),i}}function t$t(e,t,n){return r;function r(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),r):s===38?(e.consume(s),a):s===93?(e.consume(s),i):s===60||s===null||qn(s)||Df(s)?t(s):n(s)}function i(s){return s===null||s===40||s===91||qn(s)||Df(s)?t(s):r(s)}function a(s){return Qi(s)?o(s):n(s)}function o(s){return s===59?(e.consume(s),r):Qi(s)?(e.consume(s),o):n(s)}}function n$t(e,t,n){return r;function r(a){return e.consume(a),i}function i(a){return Ni(a)?n(a):t(a)}}function Wbe(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||qn(e)}function Gbe(e){return!Qi(e)}function Kbe(e){return!(e===47||H4(e))}function H4(e){return e===43||e===45||e===46||e===95||Ni(e)}function s5(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const r$t={tokenize:d$t,partial:!0};function i$t(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:l$t,continuation:{tokenize:c$t},exit:u$t}},text:{91:{name:"gfmFootnoteCall",tokenize:s$t},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:a$t,resolveTo:o$t}}}}function a$t(e,t,n){const r=this;let i=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o;for(;i--;){const l=r.events[i][1];if(l.type==="labelImage"){o=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return s;function s(l){if(!o||!o._balanced)return n(l);const c=as(r.sliceSerialize({start:o.end,end:r.now()}));return c.codePointAt(0)!==94||!a.includes(c.slice(1))?n(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function o$t(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",a,t],["enter",o,t],["exit",o,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function s$t(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,o;return s;function s(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),l}function l(d){return d!==94?n(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(d){if(a>999||d===93&&!o||d===null||d===91||qn(d))return n(d);if(d===93){e.exit("chunkString");const f=e.exit("gfmFootnoteCallString");return i.includes(as(r.sliceSerialize(f)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return qn(d)||(o=!0),a++,e.consume(d),d===92?u:c}function u(d){return d===91||d===92||d===93?(e.consume(d),a++,c):c(d)}}function l$t(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,o=0,s;return l;function l(v){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(v),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(v){return v===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(v),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",u):n(v)}function u(v){if(o>999||v===93&&!s||v===null||v===91||qn(v))return n(v);if(v===93){e.exit("chunkString");const m=e.exit("gfmFootnoteDefinitionLabelString");return a=as(r.sliceSerialize(m)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(v),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),f}return qn(v)||(s=!0),o++,e.consume(v),v===92?d:u}function d(v){return v===91||v===92||v===93?(e.consume(v),o++,u):u(v)}function f(v){return v===58?(e.enter("definitionMarker"),e.consume(v),e.exit("definitionMarker"),i.includes(a)||i.push(a),cn(e,h,"gfmFootnoteDefinitionWhitespace")):n(v)}function h(v){return t(v)}}function c$t(e,t,n){return e.check(Mb,t,e.attempt(r$t,t,n))}function u$t(e){e.exit("gfmFootnoteDefinition")}function d$t(e,t,n){const r=this;return cn(e,i,"gfmFootnoteDefinitionIndent",5);function i(a){const o=r.events[r.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?t(a):n(a)}}function f$t(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(o,s){let l=-1;for(;++l<o.length;)if(o[l][0]==="enter"&&o[l][1].type==="strikethroughSequenceTemporary"&&o[l][1]._close){let c=l;for(;c--;)if(o[c][0]==="exit"&&o[c][1].type==="strikethroughSequenceTemporary"&&o[c][1]._open&&o[l][1].end.offset-o[l][1].start.offset===o[c][1].end.offset-o[c][1].start.offset){o[l][1].type="strikethroughSequence",o[c][1].type="strikethroughSequence";const u={type:"strikethrough",start:Object.assign({},o[c][1].start),end:Object.assign({},o[l][1].end)},d={type:"strikethroughText",start:Object.assign({},o[c][1].end),end:Object.assign({},o[l][1].start)},f=[["enter",u,s],["enter",o[c][1],s],["exit",o[c][1],s],["enter",d,s]],h=s.parser.constructs.insideSpan.null;h&&Xa(f,f.length,0,_P(h,o.slice(c+1,l),s)),Xa(f,f.length,0,[["exit",d,s],["enter",o[l][1],s],["exit",o[l][1],s],["exit",u,s]]),Xa(o,c-1,l-c+3,f),l=c+f.length-2;break}}for(l=-1;++l<o.length;)o[l][1].type==="strikethroughSequenceTemporary"&&(o[l][1].type="data");return o}function a(o,s,l){const c=this.previous,u=this.events;let d=0;return f;function f(v){return c===126&&u[u.length-1][1].type!=="characterEscape"?l(v):(o.enter("strikethroughSequenceTemporary"),h(v))}function h(v){const m=Cm(c);if(v===126)return d>1?l(v):(o.consume(v),d++,h);if(d<2&&!n)return l(v);const g=o.exit("strikethroughSequenceTemporary"),y=Cm(v);return g._open=!y||y===2&&!!m,g._close=!m||m===2&&!!y,s(v)}}}class h$t{constructor(){this.map=[]}add(t,n,r){p$t(this,t,n,r)}consume(t){if(this.map.sort(function(a,o){return a[0]-o[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const a of i)t.push(a);i=r.pop()}this.map.length=0}}function p$t(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function m$t(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function g$t(){return{flow:{null:{name:"table",tokenize:v$t,resolveAll:y$t}}}}function v$t(e,t,n){const r=this;let i=0,a=0,o;return s;function s(O){let k=r.events.length-1;for(;k>-1;){const M=r.events[k][1].type;if(M==="lineEnding"||M==="linePrefix")k--;else break}const N=k>-1?r.events[k][1].type:null,F=N==="tableHead"||N==="tableRow"?_:l;return F===_&&r.parser.lazy[r.now().line]?n(O):F(O)}function l(O){return e.enter("tableHead"),e.enter("tableRow"),c(O)}function c(O){return O===124||(o=!0,a+=1),u(O)}function u(O){return O===null?n(O):$t(O)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),h):n(O):Jt(O)?cn(e,u,"whitespace")(O):(a+=1,o&&(o=!1,i+=1),O===124?(e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),o=!0,u):(e.enter("data"),d(O)))}function d(O){return O===null||O===124||qn(O)?(e.exit("data"),u(O)):(e.consume(O),O===92?f:d)}function f(O){return O===92||O===124?(e.consume(O),d):d(O)}function h(O){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(O):(e.enter("tableDelimiterRow"),o=!1,Jt(O)?cn(e,v,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):v(O))}function v(O){return O===45||O===58?g(O):O===124?(o=!0,e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),m):E(O)}function m(O){return Jt(O)?cn(e,g,"whitespace")(O):g(O)}function g(O){return O===58?(a+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(O),e.exit("tableDelimiterMarker"),y):O===45?(a+=1,y(O)):O===null||$t(O)?S(O):E(O)}function y(O){return O===45?(e.enter("tableDelimiterFiller"),b(O)):E(O)}function b(O){return O===45?(e.consume(O),b):O===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(O),e.exit("tableDelimiterMarker"),w):(e.exit("tableDelimiterFiller"),w(O))}function w(O){return Jt(O)?cn(e,S,"whitespace")(O):S(O)}function S(O){return O===124?v(O):O===null||$t(O)?!o||i!==a?E(O):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(O)):E(O)}function E(O){return n(O)}function _(O){return e.enter("tableRow"),$(O)}function $(O){return O===124?(e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),$):O===null||$t(O)?(e.exit("tableRow"),t(O)):Jt(O)?cn(e,$,"whitespace")(O):(e.enter("data"),P(O))}function P(O){return O===null||O===124||qn(O)?(e.exit("data"),$(O)):(e.consume(O),O===92?A:P)}function A(O){return O===92||O===124?(e.consume(O),P):P(O)}}function y$t(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,l=0,c,u,d;const f=new h$t;for(;++n<e.length;){const h=e[n],v=h[1];h[0]==="enter"?v.type==="tableHead"?(s=!1,l!==0&&(Tne(f,t,l,c,u),u=void 0,l=0),c={type:"table",start:Object.assign({},v.start),end:Object.assign({},v.end)},f.add(n,0,[["enter",c,t]])):v.type==="tableRow"||v.type==="tableDelimiterRow"?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:"tableBody",start:Object.assign({},v.start),end:Object.assign({},v.end)},f.add(n,0,[["enter",u,t]])),i=v.type==="tableDelimiterRow"?2:u?3:1):i&&(v.type==="data"||v.type==="tableDelimiterMarker"||v.type==="tableDelimiterFiller")?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=Uw(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):v.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=Uw(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):v.type==="tableHead"?(s=!0,l=n):v.type==="tableRow"||v.type==="tableDelimiterRow"?(l=n,a[1]!==0?(o[0]=o[1],d=Uw(f,t,a,i,n,d)):o[1]!==0&&(d=Uw(f,t,o,i,n,d)),i=0):i&&(v.type==="data"||v.type==="tableDelimiterMarker"||v.type==="tableDelimiterFiller")&&(o[3]=n)}for(l!==0&&Tne(f,t,l,c,u),f.consume(t.events),n=-1;++n<t.events.length;){const h=t.events[n];h[0]==="enter"&&h[1].type==="table"&&(h[1]._align=m$t(t.events,n))}return e}function Uw(e,t,n,r,i,a){const o=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(a.end=Object.assign({},Nh(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const l=Nh(t.events,n[1]);if(a={type:o,start:Object.assign({},l),end:Object.assign({},l)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const c=Nh(t.events,n[2]),u=Nh(t.events,n[3]),d={type:s,start:Object.assign({},c),end:Object.assign({},u)};if(e.add(n[2],0,[["enter",d,t]]),r!==2){const f=t.events[n[2]],h=t.events[n[3]];if(f[1].end=Object.assign({},h[1].end),f[1].type="chunkText",f[1].contentType="text",n[3]>n[2]+1){const v=n[2]+1,m=n[3]-n[2]-1;e.add(v,m,[])}}e.add(n[3]+1,0,[["exit",d,t]])}return i!==void 0&&(a.end=Object.assign({},Nh(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function Tne(e,t,n,r,i){const a=[],o=Nh(t.events,n);i&&(i.end=Object.assign({},o),a.push(["exit",i,t])),r.end=Object.assign({},o),a.push(["exit",r,t]),e.add(n+1,0,a)}function Nh(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const b$t={name:"tasklistCheck",tokenize:w$t};function x$t(){return{text:{91:b$t}}}function w$t(e,t,n){const r=this;return i;function i(l){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),a)}function a(l){return qn(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),o):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),o):n(l)}function o(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(l)}function s(l){return $t(l)?t(l):Jt(l)?e.check({tokenize:_$t},t,n)(l):n(l)}}function _$t(e,t,n){return cn(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function S$t(e){return abe([K2t(),i$t(),f$t(e),g$t(),x$t()])}const E$t={};function $$t(e){const t=this,n=e||E$t,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(S$t(n)),a.push(B2t()),o.push(H2t(n))}const P$t=({content:e,classNames:t})=>{const n="font-[helvetica]",r=`${n} not-italic font-medium`,i=`${n} text-[#697386]`;return p.jsx("div",{className:"font-[helvetica, apple-system, BlinkMacSystemFont, Roboto, Ubuntu, sans-serif]",children:p.jsx(fEt,{className:kt("max-w-3xl prose prose-code:before:content-none prose-code:after:content-none font-[helvetica, -apple-system, BlinkMacSystemFont, Roboto, Ubuntu, sans-serif]",t),remarkPlugins:[$$t],components:{a({href:a,children:o,...s}){return p.jsx("a",{...s,className:"text-[#556cd6] no-underline",target:"_blank",rel:"noreferrer",href:a,children:o})},h1({children:a,...o}){return p.jsx("h1",{...o,className:`${r} text-[1.5rem] leading-[2rem]`,children:a})},h2({children:a,...o}){return p.jsx("h2",{...o,className:`${r} text-[1.25rem] leading-[1.75rem]`,children:a})},h3({children:a,...o}){return p.jsx("h3",{...o,className:`${r} text-[1rem] leading-[1.5rem]`,children:a})},p({children:a,...o}){return p.jsx("p",{...o,className:`${i}`,children:a})},li({children:a,...o}){return p.jsx("li",{...o,className:`${i} mt-6 mb-6 marker:text-[#000]`,children:a})},blockquote({children:a,...o}){return p.jsx("blockquote",{...o,children:a})},code({children:a,className:o,...s}){return/language-(\w+)/.exec(o??"")?p.jsx("code",{className:o,...s,children:a}):p.jsx("code",{className:"text-sm p-[0.25rem] rounded-[0.25rem] bg-[#f7fafc] text-[#2a2f45] font-light font-[ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace]",...s,children:a})}},children:e})})},C$t={"Markdown Preview":"markdown-preview-tab-clicked"};function A$t({fileName:e}){const{logEvent:t}=Xt(),n=Ku(),r=[{content:p.jsx("div",{className:"pt-2 h-full",children:p.jsx(Yo,{})}),name:e,testId:"markdown-file-tab"},{content:p.jsx("div",{className:"w-full m-4 pt-8 flex items-center justify-center",children:p.jsx(P$t,{content:(n==null?void 0:n.content)??""})}),name:"Markdown Preview",testId:"markdown-preview-tab"}],i=s=>t(C$t[s.name]),{currentTab:a,onSelectTab:o}=Xf(r,i);return p.jsx("div",{className:"h-full",children:p.jsx(Zf,{tabs:r,currentTab:a,onSelectTab:o})})}const Zbe=({button:e,expandDirection:t="bottom-left",classNames:n,children:r,onMenuOpened:i,onMenuClosed:a})=>p.jsxs(If,{as:"div",className:"relative inline-block text-left",children:[p.jsx("div",{children:e}),p.jsx(vu,{as:x.Fragment,enter:"transition ease-out duration-100",enterFrom:"transform opacity-0 scale-95",enterTo:"transform opacity-100 scale-100",leave:"transition ease-in duration-75",leaveFrom:"transform opacity-100 scale-100",leaveTo:"transform opacity-0 scale-95",children:p.jsx(If.Items,{onFocus:()=>i==null?void 0:i(),onBlur:o=>{o.relatedTarget===null&&(a==null||a())},className:kt(n,`${t==="bottom-left"?"origin-top-right right-0":"origin-top-left left-0"} absolute mt-2 w-56 rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5 focus:outline-none z-30`),children:p.jsx("div",{className:"py-1 z-30",children:r})})})]}),Ybe=({icon:e,onClick:t,text:n,testId:r})=>p.jsx(If.Item,{children:({active:i,close:a})=>p.jsxs("button",{onClick:o=>{o.stopPropagation(),t(o),a()},type:"button","data-test":r,className:kt(i?"bg-gray-100 text-gray-700":"text-gray-600","group flex items-center w-full text-left px-4 py-2 text-sm"),children:[e?p.jsx("div",{className:"mr-3 h-5 w-5 text-gray-400 group-hover:text-gray-500","aria-hidden":"true",children:e}):null,n]})});function T$t(e){switch(e){case"delete":return{text:"Delete",icon:p.jsx(H6,{className:"h-4 w-4 text-gray-400 group-hover:text-gray-500"}),id:"delete"};case"rename":return{text:"Rename",icon:p.jsx(xae,{className:"h-4 w-4 text-gray-400 group-hover:text-gray-500"}),id:"rename"}}}const Xbe=({fileActions:e,testId:t,isDisabled:n=!1,onActionSelected:r})=>{const{isReadOnly:i}=rr();return i||e.length===0?null:p.jsx(Zbe,{classNames:"max-w-[140px]",button:p.jsx(If.Button,{disabled:n,"data-test":t,onClick:a=>a.stopPropagation(),className:"enabled:hover:bg-neutral-200 enabled:hover:text-neutral-600 p-1 rounded-md disabled:opacity-50 disabled:cursor-not-allowed",children:p.jsx(c2,{className:"h-4 w-4"})}),children:e.map(a=>{const{icon:o,text:s,id:l}=T$t(a);return p.jsx(If.Item,{children:p.jsx(Ybe,{text:s,testId:`file-overflow-menu-${l}`,icon:o,onClick:()=>r(a)})},`file-overflow-menu-${l}`)})})},Qbe=({icon:e,inputProps:t,validationMessage:n})=>p.jsxs("div",{className:"flex flex-col",children:[p.jsxs("div",{className:"flex items-center h-7",children:[p.jsx("span",{className:"flex-shrink-0 w-[--file-tree-chevron]"}),p.jsx("span",{className:"flex items-center justify-center flex-shrink-0 w-[--file-tree-icon] ml-[--file-tree-gap]",children:e}),p.jsx("input",{className:Ie("text-sm w-full h-6 p-0 border-none bg-transparent focus:outline-none ml-[--file-tree-gap]",t.className),...t})]}),p.jsx("div",{className:"text-red-500 text-xs text-left pl-[--indent]",children:n})]}),O$t="headlessui-menu-button",R$t=({strategy:e,onDirectoryCreationCancelled:t,onValidated:n})=>{const r=x.useRef(null),[i,a]=x.useState(""),[o,s]=x.useState(""),l=f=>{var h,v;if((h=f.relatedTarget)!=null&&h.id.includes(O$t)){(v=r.current)==null||v.focus();return}t()},c=f=>{a(f.target.value)},u=f=>{if(f.currentTarget.value.trim().length===0){t();return}const h=qF(f.currentTarget.value.trim());if(!h.isValid&&h.errorMessage){s(h.errorMessage);return}n(f.currentTarget.value.trim(),e)},d=f=>{f.key==="Enter"&&u(f),f.key==="Escape"&&t()};return p.jsx(Qbe,{icon:p.jsx(z6,{className:"text-gray-400 h-4 w-4","aria-hidden":"true"}),inputProps:{autoFocus:!0,ref:r,type:"text",value:i,onChange:c,onKeyDown:d,onBlur:l},validationMessage:o})},j$t="headlessui-menu-button",k$t="<filename>",Jbe=({defaultNewFileName:e,onFileCreationCancelled:t,onValidated:n})=>{const r=x.useRef(null),[i,a]=x.useState(e),[o,s]=x.useState("");x.useEffect(()=>{var v;const f=e.indexOf("."),h=f>0?f:e.length;(v=r.current)==null||v.setSelectionRange(0,h)},[e]);const l=f=>{var h,v;if((h=f.relatedTarget)!=null&&h.id.includes(j$t)){(v=r.current)==null||v.focus();return}t()},c=f=>{a(f.target.value)},u=f=>{if(f.currentTarget.value.trim().length===0){t();return}const h=qF(f.currentTarget.value.trim());if(!h.isValid&&h.errorMessage){s(h.errorMessage);return}n(f.currentTarget.value.trim())},d=f=>{f.key==="Enter"&&u(f),f.key==="Escape"&&t()};return p.jsx(Qbe,{icon:p.jsx(Ly,{className:"text-gray-400 h-4 w-4","aria-hidden":"true"}),inputProps:{autoFocus:!0,ref:r,type:"text",value:i,onChange:c,onKeyDown:d,onBlur:l},validationMessage:o})};function N$t(e){const t=p.jsx(Ly,{className:"mr-3 h-5 w-5 text-gray-400 group-hover:text-gray-500","aria-hidden":"true"}),n=p.jsx(jCe,{className:"mr-3 h-5 w-5 text-gray-400 group-hover:text-gray-500","aria-hidden":"true"}),r=p.jsx(EAe,{className:"mr-3 h-5 w-5 text-gray-400 group-hover:text-gray-500","aria-hidden":"true"});switch(e){case"Request Handler":return{text:"Request Handler",icon:t,id:"request-handler"};case"Schema":return{text:"Example Schema",icon:t,id:"example-schema"};case"Manual Test":return{text:"Manual Test",icon:t,id:"manual-test"};case"Code Test":return{text:"Code Test",icon:t,id:"code-test"};case"zuplo.runtime.ts":return{text:"Runtime Extension",icon:r,id:"zuplo-runtime"};case"Empty Module":return{text:"Empty Module",icon:n,id:"empty-module"};case"Inbound Policy":return{text:"Inbound Policy",icon:p.jsx(ip,{className:"mr-3 h-5 w-5 text-gray-400 group-hover:text-gray-500","aria-hidden":"true"}),id:"inbound-policy"};case"Outbound Policy":return{text:"Outbound Policy",icon:p.jsx(F6,{className:"mr-3 h-5 w-5 text-gray-400 group-hover:text-gray-500","aria-hidden":"true"}),id:"outbound-policy"};case"Empty Schema":return{text:"Empty Schema",icon:n,id:"empty-schema"};case"Docs Page":return{text:"Docs Page",icon:p.jsxs("div",{className:"flex items-center text-xs mr-3 h-5 w-5 text-gray-400 group-hover:text-gray-500",children:["M",p.jsx(ip,{className:"h-4 w-4 text-gray-400 group-hover:text-gray-500"})]}),id:"docs-page"};case"MDX Page":return{text:"MDX Page",icon:p.jsxs("div",{className:"flex items-center text-xs mr-3 h-5 w-5 text-gray-400 group-hover:text-gray-500",children:["M",p.jsx(ip,{className:"h-4 w-4 text-gray-400 group-hover:text-gray-500"})]}),id:"mdx-page"};case"Developer Portal Config":return{text:"Developer Portal Config",icon:p.jsx(YI,{className:"mr-3 h-5 w-5 text-gray-400 group-hover:text-gray-500","aria-hidden":"true"}),id:"dev-portal-conf"};case"Sidebar":return{text:"Sidebar",icon:p.jsx(YI,{className:"mr-3 h-5 w-5 text-gray-400 group-hover:text-gray-500","aria-hidden":"true"}),id:"sidebar"};case"OpenAPI Spec":return{text:"OpenAPI Spec",icon:p.jsx(spe,{className:"h-4 w-4 text-gray-400 group-hover:text-gray-500"}),id:"open-api-spec"};case"Subdirectory":return{text:"Folder",icon:p.jsx(z6,{className:"mr-3 h-5 w-5 text-gray-400 group-hover:text-gray-500","aria-hidden":"true"}),id:"subdirectory"};case"Policy List":return}}const I$t=({supportedFileTemplates:e,testId:t,onNewFileTemplateSelected:n})=>{const{isReadOnly:r}=rr();return p.jsx(Zbe,{button:p.jsx(If.Button,{disabled:r,"data-test":t,onClick:i=>i.stopPropagation(),className:"enabled:hover:bg-neutral-200 enabled:hover:text-neutral-600 p-1 rounded-md disabled:opacity-50 disabled:cursor-not-allowed",children:p.jsx(JPe,{size:12})}),children:e.map(i=>{const a=N$t(i);if(!a)return null;const{icon:o,text:s,id:l}=a;return p.jsx(If.Item,{children:p.jsx(Ybe,{text:s,testId:`${t}-${l}`,icon:o,onClick:()=>n(i)})},`file-dropdown-menu-${l}`)})})},M$t=({name:e,path:t,strategy:n,isTopLevelDirectory:r,isCollapsed:i,onToggleCollapse:a})=>{const{logEvent:o}=Xt(),[s,l]=x.useState(),{account:c,project:u,environment:d}=In(),f=Mm(),h=In(),[v,m]=x.useState(),g=zf(t),[y,b]=x.useState(!1),[w,S]=x.useState(!1),E=xce(n),_=T2(),$=W6e(d.name),P=bce(),{subdirectoryCreateSupported:A,createSupported:O,supportedFileTemplates:k,createExtensions:N}=n,F=(g==null?void 0:g.saveState)===Dt.new||(g==null?void 0:g.saveState)===Dt.removing,M=v&&(N!=null&&N[v])?`${k$t}.${N[v]}`:"",H=A?k.concat("Subdirectory"):k,G=async(z,K)=>{const te=await _(z,t,v,K);te===void 0?l(p.jsx(Xo,{alertType:"ERROR",bodyText:"We found an error creating the file.",onPrimaryButtonClick:async()=>{T(),await G(z,K)},onSecondaryButtonClick:async()=>{T()},primaryButtonText:"Try again",secondaryButtonText:"Continue editing",hideModal:T,title:"Error creating file"})):f({pathname:Mp(gm.Code,{account:c.name,project:u.name,environment:encodeURIComponent(d.urlParameter)}),search:`?path=${te.path}`})},X=async(z,K)=>{const te=await $(z,t,K);if(te===void 0||te instanceof Error){let ne="Error creating folder",re="We found an error creating the folder.";te instanceof Mi?(ne=te.message,re=te.detail??re):te!==void 0&&(re=te.message),l(p.jsx(Xo,{alertType:"ERROR",bodyText:re,onPrimaryButtonClick:async()=>{T(),await X(z,K)},onSecondaryButtonClick:async()=>{T()},primaryButtonText:"Try again",secondaryButtonText:"Close",hideModal:T,title:ne}))}},Y=async z=>{let K="Error deleting folder",te="We found an error trying to remove the folder.",ne;try{const re=await P(z);if(re.success){f(Mp(gm.Code,{account:h.account.name,project:h.project.name,environment:encodeURIComponent(h.environment.urlParameter)}));return}ne=re.error}catch(re){ne=re}ne instanceof Mi&&(K=ne.title??K,te=ne.detail??te),l(p.jsx(Xo,{alertType:"ERROR",bodyText:te,onPrimaryButtonClick:async()=>{T(),await Y(z)},onSecondaryButtonClick:async()=>{T()},primaryButtonText:"Try again",secondaryButtonText:"Cancel",hideModal:async()=>{T()},title:K}))},[J,I]=na(()=>{const z=async()=>{g&&(await Y(g),I())};return p.jsx(Xo,{hideModal:I,alertType:"DELETE",bodyText:"Are you sure you want to delete this folder?",primaryButtonText:"Confirm",secondaryButtonText:"Cancel",primaryButtonTestID:"confirm-delete",onPrimaryButtonClick:z,onSecondaryButtonClick:I})}),L=async(z,K)=>{b(!1),await X(z,K)},D=async z=>{S(!1),await G(z,n)},T=()=>{l(void 0)},C=async z=>{var te;o("file-template-selected",{account:h.account.name,project:h.project.name,environment:h.environment.name,fileTemplate:z}),i&&(a==null||a()),m(z);const K=(te=n.predefinedTemplateFilename)==null?void 0:te[z];K?await _(K,t,z,n):z==="Subdirectory"?b(!0):S(!0)},j=async z=>{switch(z){case"delete":J();break}};return e.length===0?null:p.jsxs("div",{className:"h-full flex-col","data-test":e,children:[s,p.jsxs("div",{className:"group cursor-pointer flex items-center justify-between h-7 text-neutral-900 hover:bg-neutral-200/40 pr-2",onClick:a,children:[p.jsxs("span",{className:"text-sm inline-flex items-center min-w-0 pl-[--indent]",children:[p.jsx("span",{className:"flex items-center justify-center flex-shrink-0 w-[--file-tree-chevron]",children:i?p.jsx(q6,{className:"text-neutral-500 h-3 w-3"}):p.jsx(Lf,{className:"text-neutral-500 h-3 w-3"})}),p.jsx("span",{className:"flex items-center justify-center flex-shrink-0 w-[--file-tree-icon] ml-[--file-tree-gap]",children:F?p.jsx(G$,{className:"w-4 h-4",borderPositionAndSize:"border-l-2"}):p.jsx(z6,{className:"text-neutral-500 h-4 w-4"})}),p.jsx("span",{className:"truncate flex-shrink min-w-0 ml-[--file-tree-gap]",children:e})]}),p.jsxs("div",{children:[O&&H&&p.jsx(I$t,{testId:`${e.replace(" ","-").toLowerCase()}-new-file-menu`,supportedFileTemplates:H.filter(z=>{var te;const K=(te=n.predefinedTemplateFilename)==null?void 0:te[z];return!K||K&&!E.find(ne=>ne.path.includes(K))}),onNewFileTemplateSelected:C}),!r&&p.jsx(Xbe,{fileActions:["delete"],testId:`file-overflow-menu-${e}`,onActionSelected:j})]})]}),O&&v&&w&&p.jsx("div",{className:"relative",children:p.jsx("div",{className:"pl-[--indent] before:content-[''] before:absolute before:top-0 before:bottom-0 before:left-[--indent-guide] before:w-px before:bg-neutral-300",children:p.jsx(Jbe,{onFileCreationCancelled:()=>S(!1),defaultNewFileName:M,onValidated:D})})}),A&&v&&y&&p.jsx("div",{className:"relative",children:p.jsx("div",{className:"pl-[--indent] before:content-[''] before:absolute before:top-0 before:bottom-0 before:left-[--indent-guide] before:w-px before:bg-neutral-300",children:p.jsx(R$t,{strategy:n,onDirectoryCreationCancelled:()=>b(!1),onValidated:L})})})]})},D$t=({fileName:e})=>{const t=p.jsx("span",{title:e,className:"flex-shrink truncate min-w-0",children:e});return e.length>20?p.jsx(pI,{content:e,children:t}):t},L$t=({filePath:e,icon:t,isDeleteAllowed:n,isRenameAllowed:r})=>{const[i]=By(),a=i.get("path"),o=In(),s=o.environment.name,l=zf(e),c=Mm(),u=bce(),d=H6e(s),[f,h]=x.useState(!1),[v,m]=x.useState(Dt.unmodified),[g,y]=x.useState(!1),{logEvent:b}=Xt(),w=l?W$(l.path):"",S=(l==null?void 0:l.path)===a,[E,_]=x.useState();x.useEffect(()=>{l&&m(l.saveState)},[l]);const $=async J=>{try{const I=await u(J);if(I.success){const L=new URLSearchParams(i);L.set("path",""),c({search:L.toString()});return}_(I.error),P()}catch(I){I instanceof Error&&_(I),P()}},[P,A]=na(()=>{const J=async()=>{A(),l&&await $(l)};let I="Error deleting file",L="We found an error trying to remove the file.";return E instanceof Mi&&(I=E.title??I,L=E.detail??L),p.jsx(Xo,{alertType:"ERROR",bodyText:L,onPrimaryButtonClick:J,onSecondaryButtonClick:A,primaryButtonText:"Try again",secondaryButtonText:"Continue editing",hideModal:A,title:I})},[E]),{execute:O}=qm(async()=>{if(!l)return;h(!0),b("file-opened",{fileName:l.path,account:o.account.name,project:o.project.name,environment:s}),h(!1);const J=new URLSearchParams(i);J.set("path",l.path),c({search:J.toString()})}),[k,N]=na(()=>{const J=async()=>{l&&(await $(l),N())};return p.jsx(Xo,{hideModal:N,alertType:"DELETE",bodyText:"Are you sure you want to delete this file?",primaryButtonText:"Confirm",secondaryButtonText:"Cancel",primaryButtonTestID:"confirm-delete",onPrimaryButtonClick:J,onSecondaryButtonClick:N})}),F=async J=>{if(!l)return;const I=l.path.split("/");I.pop();const L=I.concat(J).join("/");if(y(!1),await d(l,L),S){const D=new URLSearchParams(i);D.set("path",L),c({search:D.toString()})}},M=()=>{const J=[];return r&&J.push("rename"),n&&J.push("delete"),J},H=async J=>{switch(J){case"delete":k();break;case"rename":y(!0);break}};if(!l)return null;const G=[Dt.new,Dt.saving,Dt.removing].includes(l.saveState),X=!G&&!g,Y=p.jsx("div",{className:"flex pr-1 justify-center items-center",children:p.jsx(tAe,{size:16,className:"animate-spin opacity-60"})});return p.jsxs("div",{className:kt("group flex items-center h-7 pr-2 text-sm relative",g?"bg-neutral-200/60":S?"bg-zuplo-200/25 border-zuplo-300/50 border-y text-neutral-950":"text-neutral-900 hover:bg-neutral-200/40"),children:[g?p.jsx("div",{className:"w-full pl-[--indent]",children:p.jsx(Jbe,{defaultNewFileName:w,onFileCreationCancelled:()=>y(!1),onValidated:F})}):p.jsxs("span",{className:"inline-flex items-center cursor-pointer w-full h-full min-w-0 pl-[--indent]","data-test":w,onClick:O,children:[p.jsx("span",{className:"flex-shrink-0 w-[--file-tree-chevron]"}),p.jsx("span",{className:"flex items-center justify-center flex-shrink-0 w-[--file-tree-icon] ml-[--file-tree-gap]",children:f?Y:t}),p.jsx("span",{className:"truncate ml-[--file-tree-gap]",children:p.jsx(D$t,{fileName:uet[w]??w})}),v===Dt.modified&&p.jsx("div",{className:"h-2 w-2 bg-neutral-500 rounded ml-1 flex-shrink-0"})]}),G&&Y,X&&p.jsx(Xbe,{fileActions:M(),testId:`file-overflow-menu-${w}`,onActionSelected:H}),v===Dt.error&&p.jsx("div",{className:"flex pr-1 justify-center items-center",children:p.jsx(il,{size:16,className:"text-red-500 rounded block"})})]})},F$t=(e,t)=>t.name==="Config"?e.sort((n,r)=>n.path==="/config/routes.json"?-1:n.path.includes(".oas.json")?r.path.includes(".oas.json")?n.path<r.path?-1:1:-1:n.path==="/config/policies.json"&&!r.path.includes("oas.json")||n.path<r.path?-1:1):e,e1e=({level:e,files:t,pathPrefix:n,dirStrategy:r,name:i})=>{var y;const[a]=By(),o=F$t(t,r),{isReadOnly:s}=rr(),[l,c]=x.useState(e>1);if(!i&&t.length===0)return null;const u=()=>{c(!l)},d=o.reduce((b,w)=>{let S=n;const E=w.path.split("/"),_=n.split("/"),$=E.length,P=_.length;if(w.type===Ks.Directory)$>P&&(S=`${n}/${E[P]}`);else{const O=P+1;$>O&&(S=`${n}/${E[P]}`)}const A=b[S];return A?(b[S]=A.concat(w),b):(b[S]=[w],b)},{}),f=Object.entries(d).filter(([b])=>b!==n),h=((y=d[n])==null?void 0:y.filter(b=>b.type===Ks.File))??[],v=f.length+h.length>0,m=!l&&f.map(([b,w])=>p.jsx(e1e,{level:e+1,files:w??[],dirStrategy:r,pathPrefix:b,name:b.split("/").at(-1)??""},b)),g=!l&&h.map(b=>{var $;const w=($=r.customConfig)==null?void 0:$[W$(b.path)],S=((w==null?void 0:w.deleteSupported)??r.deleteSupported)&&!s,E=((w==null?void 0:w.renameSupported)??r.renameSupported)&&!s,_=b.path===a.get("path")?"text-gray-500":"text-gray-400";return p.jsx(L$t,{filePath:b.path,icon:cet(b.path,_)??p.jsx(Ly,{className:kt(_,"flex-shrink-0 h-4 w-4"),"aria-hidden":"true"}),isDeleteAllowed:S,isRenameAllowed:E},b.path)});return p.jsxs("div",{style:{"--level":e,"--indent":"calc(var(--level) * var(--file-tree-indent) + var(--file-tree-base-indent))","--indent-guide":"calc(var(--indent) + var(--file-tree-chevron) / 2)"},children:[p.jsx(M$t,{strategy:r,level:e,name:i,path:n,isTopLevelDirectory:e===0,isCollapsed:l,onToggleCollapse:u}),p.jsxs("div",{className:"relative",children:[!l&&v&&p.jsx("div",{className:"absolute top-0 bottom-0 w-px bg-neutral-300 left-[--indent-guide]"}),m,g]})]})},q$t=(e=null)=>{const t=x.useRef(e),[n,r]=x.useState(),[i,a]=x.useState(),[o,s]=x.useState(),l=()=>{var f,h,v;const c=(f=t.current)==null?void 0:f.offsetLeft;r(c);const u=(h=t.current)==null?void 0:h.offsetTop;a(u);const d=(v=t.current)==null?void 0:v.offsetWidth;s(d)};return x.useEffect(()=>{l()},[]),x.useEffect(()=>(window.addEventListener("resize",l),()=>{window.removeEventListener("resize",l)}),[]),{x:n,y:i,width:o,boxRef:t}},U$t=({strategy:e})=>{const t=xce(e);return p.jsx(e1e,{level:0,files:t,pathPrefix:e.folderName,dirStrategy:e,name:e.name})},V$t=({directoryStrategies:e,hasSelectorOnDropdown:t=!1})=>{const n=yn(d=>d.projectTreeNodes),r=G6e(e),[i,a]=x.useState(null),{boxRef:o,x:s,y:l,width:c}=q$t(i),u=()=>i?s&&l&&c?{x:s+c+15,y:l}:{x:i.offsetLeft+i.offsetWidth+15,y:i.offsetTop}:{x:0,y:0};return n.length===0?p.jsxs("div",{className:"flex flex-col gap-1 p-2",children:[p.jsx(Pr,{className:"w-full h-6"}),p.jsx(Pr,{className:"w-10/12 h-6"}),p.jsx(Pr,{className:"w-8/12 h-6"}),p.jsx(Pr,{className:"w-8/12 h-6"}),p.jsx(Pr,{className:"w-8/12 h-6"})]}):p.jsx("div",{className:"font-medium text-neutral-800 overflow-auto h-full select-none",ref:d=>a(d),children:p.jsxs("div",{ref:o,style:{"--file-tree-indent":"16px","--file-tree-chevron":"16px","--file-tree-icon":"16px","--file-tree-gap":"6px","--file-tree-base-indent":"12px"},children:[r.map(d=>p.jsx(U$t,{strategy:d},d.name)),t&&p.jsx("div",{className:"absolute",style:{top:u().y,left:u().x},children:p.jsx(mae,{className:"h-10 text-zuplo-pink"})})]})})},z$t=x.memo(V$t),B$t={Policies:"route-designer-tab-policy","Route Designer":"route-designer-tab-opened","routes.json":"route.json-tab-opened"};function H$t(){const{logEvent:e}=Xt(),t=$ce(),n=[{content:p.jsxs("div",{className:"space-y-6 mt-10 text-gray-600 mx-auto px-10 flex-wrap",children:[p.jsx("div",{className:"font-extrabold text-2xl text-gray-600",children:"Project migration required"}),p.jsxs("p",{children:["Zuplo is going native in support for the"," ",p.jsx(Zn,{href:"https://www.openapis.org/",children:"OpenAPI standard"}),". This means we will be deprecating support for our proprietary routes.json file format."]}),p.jsxs("p",{children:["It's easy to convert your project from the old routes.json format to use our new OpenAPI support, follow the steps on this"," ",p.jsx(Zn,{href:"https://zuplo.com/docs/articles/routes-json-deprecation-for-openapi",target:"_blank",children:"guide"}),"."]})]}),name:"Route Designer",testId:"route-designer-tab"},{content:p.jsx("div",{className:"pt-2 h-full",children:p.jsx(Yo,{jsonSchemas:[{fileMatch:["routes.json"],schema:{...JSON.parse(t.data??"{}")},uri:"https://zuplo.com/routes-schema.json"}]})}),name:"routes.json",testId:"routes-json-tab"}],r=o=>e(B$t[o.name]),{currentTab:i,onSelectTab:a}=Xf(n,r);return t.data?p.jsx("div",{className:"h-full",children:p.jsx(Zf,{tabs:n,currentTab:i,onSelectTab:a})}):p.jsx("div",{className:"p-6",children:p.jsx(K$,{message:"Loading Schema"})})}const W$t=({activeFilePath:e})=>{const t=In(),n=yn(r=>r.executionHistory.filter(i=>i.account===t.account.name&&i.project===t.project.name&&i.environment===t.environment.name&&i.path===e));return p.jsxs("div",{className:"bg-gray-100 h-full",children:["Execution History",p.jsx("div",{className:"text-sm text-gray-400",children:n.slice().reverse().map((r,i)=>p.jsxs("div",{className:"inline-flex items-center w-full",children:[p.jsx(m0e,{code:r.status,icon:!0})," - ",new Date(r.timestamp).toISOString().substring(11)]},i))})]})},G$t=e=>{if(!e)return{error:{type:"Invalid JSON File",messages:["Error parsing file. Please ensure the file is valid JSON"]}};try{const t=JSON.parse(e),r=bye.compile(zye.schema)(t);return r.isValid?t:{error:{type:"Invalid JSON File",messages:r.errors.map(i=>i.message)}}}catch(t){return{error:{type:"Invalid JSON File",messages:["Error parsing file. Please ensure the file is valid JSON",t instanceof Error?t.message:"Unknown error"]}}}};function K$t({ape:e,showRebuildWarning:t}){const n=yn(h=>h.testResponse),r=yn(h=>h.setTestResponse),i=Ku(),a=sl(),[o,s]=x.useState(),l=_ce((i==null?void 0:i.path)??""),c=G$t(i==null?void 0:i.content);x.useEffect(()=>{r(void 0)},[]),x.useEffect(()=>{r(void 0),s(void 0)},[i==null?void 0:i.path]);const u=h=>{s(h)},d=h=>{const v=JSON.stringify(h,null,Cb);!i||i.content===v||(n&&r(void 0),o&&s(void 0),a({...i,content:v},!0))};if(!i)return p.jsx(Sge,{});const f=()=>{l(Dt.modified)};return p.jsx("div",{className:"flex-grow h-full",children:p.jsx("div",{className:"flex-grow grid grid-cols-6 h-full",children:"error"in c?p.jsxs("div",{className:"col-span-5",children:[" ",p.jsxs("div",{className:"text-red-500 text-lg p-5",children:[p.jsx("span",{className:"font-medium",children:c.error.type}),p.jsx("ul",{className:"mt-5 list-inside list-disc",children:c.error.messages.map(h=>p.jsx("li",{children:h},h))})]})]}):p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:"col-span-5 h-full",children:[p.jsx("div",{className:"p-2",children:c?p.jsx(v0e,{ape:e,apiTest:c,path:i.path,onBeforeFire:u,onRequestChange:d,onTestDirtied:f,showRebuildWarning:t}):p.jsx("div",{children:"Invalid state - no API test"})}),p.jsx("div",{className:"p-2 h-full max-h-[450px]",children:n?p.jsx(g0e,{result:n,requestId:o}):null})]}),p.jsx("div",{className:"bg-gray-100 p-2 col-span-1",children:p.jsx(W$t,{activeFilePath:i.path})})]})})})}const Z$t={"text-console-tab":"test-console-tab-opened","text-file-tab":"oas.json-tab-opened",OpenAPI:"openapi-tab-opened"};function Y$t({ape:e}){const{logEvent:t}=Xt(),n=Ku(),r=C2().get("path");if(!r)throw new Error("Invalid state, should not be rendering test control with no path querystring");const i=W$(r),o=[{id:1,name:i.replace(Not(i),""),content:p.jsx(K$t,{showRebuildWarning:!1,ape:e}),testId:"text-console-tab"},{id:2,name:i,content:p.jsx(Yo,{jsonSchemas:[zye]}),testId:"text-file-tab"}],s=d=>t(Z$t[d.testId]),{currentTab:l,setCurrentTab:c,onSelectTab:u}=Xf(o,s);return x.useEffect(()=>{c(o[0])},[n==null?void 0:n.path]),p.jsx("div",{className:"h-full w-full overflow-y-auto flex flex-col",children:p.jsx(Zf,{currentTab:l,onSelectTab:u,tabs:o})})}function X$t({isEmptyFolder:e=!1,emptyFolderTitle:t,emptyFolderDescription:n}){const r=In(),{editStrategies:i}=dL(),[a]=To("path"),[o]=To("build"),{monaco:s,reloadFiles:l}=hL(),c=Tu(l.execute),u=Tu(r),d=r.environment.name,{isReadOnly:f}=rr(),{isError:h,error:v}=VE({queryKey:["reloadFiles",d],queryFn:async()=>(await c.current(u.current),!0),refetchOnWindowFocus:!1,enabled:!!s&&!!d});if(e&&(!n||!t))throw Error("Empty state must have a title and description");return h&&v instanceof Mi?p.jsx("div",{className:"w-full h-full flex items-center justify-center",children:p.jsxs(Dm,{className:"max-w-md",children:[p.jsx(h8,{children:v.title}),p.jsxs(p8,{className:"flex flex-col gap-2",children:[Zce(v),p.jsx(j3e,{})]})]})}):p.jsxs(GK,{direction:"horizontal",autoSaveId:"file-tree",children:[p.jsx(o_,{minSize:10,defaultSize:20,className:"bg-neutral-50",children:p.jsx(z$t,{directoryStrategies:i,hasSelectorOnDropdown:e})}),p.jsx(rpe,{}),p.jsx(o_,{minSize:70,children:p.jsxs(GK,{direction:"vertical",autoSaveId:"bottom-pane",className:"relative",children:[p.jsx(o_,{minSize:10,children:a?p.jsx(D6,{fallback:m=>p.jsx(ege,{...m}),children:p.jsx(Q$t,{ape:r})}):e?null:p.jsx(J$t,{})}),f&&p.jsx("a",{href:"https://zuplo.com/docs/articles/environments",target:"_blank",rel:"noreferrer",children:p.jsx("div",{className:"absolute mx-auto border-zuplo-200 left-0 right-0 bottom-12 bg-zuplo-100 text-zuplo-700 h-8 rounded-full shadow-md border w-36 items-center justify-center flex text-sm font-medium",children:"Read-only"})}),o!==void 0&&p.jsx(KJe,{})]})})]})}const Q$t=({ape:e})=>{const[t]=To("path");if(!t)throw new Error("Invalid state - FileViewer should not be displayed if no path");const n=t.toLowerCase();if(n==="/config/routes.json")return p.jsx(H$t,{});if(n==="/docs/sidebar.json")return p.jsx(Dot,{});if(n.includes(".oas.json"))return p.jsx(X0t,{ape:e});if(n==="/config/policies.json")return p.jsx(ext,{});if(n==="/config/dev-portal.json")return p.jsx(Mot,{});if(n.endsWith(".md")||n.endsWith(".mdx")){const r=n.split("/"),i=r[r.length-1];return p.jsx(A$t,{fileName:i})}return n.endsWith(".ts")?p.jsx(Yo,{maxHeightVh:100}):n.endsWith(".css")?p.jsx(Yo,{maxHeightVh:100}):n.startsWith("/tests")&&n.endsWith(".json")?p.jsx(Y$t,{ape:e}):n.startsWith("/schemas")&&n.endsWith(".json")?p.jsx(Yo,{jsonSchemas:[txt]}):p.jsx(Yo,{})},J$t=()=>p.jsxs("div",{className:"flex flex-col items-center justify-center w-full h-full text-muted-foreground",children:[p.jsx(ZJe,{className:"text-gray-100 w-52 h-52 hover:text-zuplo-100 transition-colors duration-5000"}),p.jsx("h1",{className:"text-xl ",children:"Select a file to get started"}),p.jsxs("div",{className:"flex mt-6 gap-4 w-full max-w-[350px] flex-col items-center",children:[p.jsx(Ke,{variant:"white",className:"opacity-60",asChild:!0,children:p.jsx("a",{href:"https://zuplo.com/docs/",children:"Documentation"})}),p.jsxs("div",{className:"text-sm grid grid-cols-[1fr_min-content] gap-2 mt-2",children:[p.jsx("div",{className:"text-end",children:"Show command palette"}),p.jsx("div",{children:p.jsx("kbd",{className:"h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[11px] font-medium shadow-sm",children:"⌘K"})}),p.jsx("div",{className:"text-end",children:"Save & deploy changes"}),p.jsx("div",{children:p.jsx("kbd",{className:"h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[11px] font-medium shadow-sm",children:"⌘S"})})]})]})]}),ePt=()=>{var a,o;const e=In(),t=B6e(),n=cL(),i=(o=(a=wL(e.account.name,e.project.name,e.environment.name).data)==null?void 0:a.at(-1))==null?void 0:o.stages.find(s=>s.stage==="api"&&s.status==="in-progress");return{isPending:t.isPending,isSuccess:t.isSuccess,saveAndDeploy:x.useCallback(async()=>{i||t.mutateAsync({environmentName:e.environment.name,accountName:e.account.name,projectName:e.project.name,files:n}).catch(s=>{if(!(s instanceof Error&&"status"in s&&s.status===409))throw s})},[t,n,i,e.environment.name,e.account.name,e.project.name])}},tPt=e=>new Promise(t=>setTimeout(t,e)),nPt=(e={})=>{const{isReadOnly:t=!1,onSave:n}=e,{saveAndDeploy:r,isPending:i}=ePt(),[a,o]=x.useState(null),s=yn(f=>{let h=0;for(const v of f.projectTreeNodes){const m=v.path?f.filesByPath[v.path]:void 0;m&&m.saveState===Dt.modified&&h++}return h}),l=x.useRef(null),c=f=>{o(f),l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{o(null)},1600)},u=Tu(r),d=Tu(n);return x.useEffect(()=>{const f=async h=>{var v;try{if(h.code===aft&&(h.metaKey||h.ctrlKey)){if(h.preventDefault(),t){c("Read only environment");return}const m=document.activeElement;if(m instanceof HTMLInputElement||m instanceof HTMLTextAreaElement){const g=m.selectionEnd;m.blur(),m.focus(),(m instanceof HTMLInputElement&&m.type!=="checkbox"||m instanceof HTMLTextAreaElement)&&m.setSelectionRange(g,g),await tPt(100)}if(s===0){c("No unsaved changes");return}(v=d.current)==null||v.call(d),await u.current()}}catch(m){un.error("Error saving files:",m),o("Error saving files")}};return document.addEventListener("keydown",f),()=>{document.removeEventListener("keydown",f)}},[t,s,u,d]),{showTooltip:a,isSaving:i,unsavedChangesCount:s,saveAll:r}},Vw="/api/v1/editor";function rPt(){const[e]=By(),[t,n]=x.useState(null),[r,i]=x.useState(null),[a,o]=x.useState([]),[s,l]=x.useState(!1),[c,u]=x.useState(!0);x.useEffect(()=>{(async()=>{try{const v=await fetch(`${Vw}/list`);if(!v.ok)throw new Error(`Failed to fetch editors: ${v.status}`);const m=await v.json();o(m.editors);const g=await fetch(`${Vw}/detect`);if(!g.ok)throw new Error(`Failed to detect editor: ${g.status}`);const y=await g.json();y.editor&&y.name&&(n(y.editor),i(y.name))}catch(v){un.error("Failed to load editor preference:",v)}finally{u(!1)}})()},[]);const d=x.useCallback(async h=>{try{if((await fetch(`${Vw}/preference`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({editor:h})})).ok){const m=a.find(g=>g.id===h);m&&(n(h),i(m.name)),l(!1)}}catch(v){un.error("Failed to save editor preference:",v)}},[a]),f=x.useCallback(async()=>{const h=e.get("path");if(!h){un.warn("No file path in URL");return}if(!t){l(!0);return}try{const v=await fetch(`${Vw}/open`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({file:h})});if(!v.ok){const g=await v.json();un.error("Failed to open file in editor:",g.message);return}const m=await v.json();m.url&&window.open(m.url,"_blank")}catch(v){un.error("Failed to open file in editor:",v)}},[e,t]);return{hasEditor:!!t,editorName:r,isLoading:c,showPreferenceDialog:s,setShowPreferenceDialog:l,availableEditors:a,savePreference:d,openInEditor:f}}function iPt({open:e,editors:t,onSelect:n,onCancel:r}){const[i,a]=x.useState(null),o=()=>{i&&n(i)};return p.jsx(Yu,{open:e,onOpenChange:s=>!s&&r(),children:p.jsxs(Zs,{className:"sm:max-w-md",children:[p.jsxs(Ou,{children:[p.jsx(Ys,{children:"Choose Your Editor"}),p.jsx(Ru,{children:"Select which editor you'd like to use for opening files. This preference will be saved for future use."})]}),p.jsx("div",{className:"space-y-2 py-4",children:t.map(s=>p.jsx("button",{type:"button",className:`w-full text-left px-4 py-3 rounded-md border transition-colors ${i===s.id?"border-blue-500 bg-blue-50":"border-gray-200 hover:border-gray-300 hover:bg-gray-50"}`,onClick:()=>a(s.id),children:p.jsx("div",{className:"font-medium",children:s.name})},s.id))}),p.jsxs(rc,{children:[p.jsx(Ke,{variant:"ghost",onClick:r,children:"Cancel"}),p.jsx(Ke,{variant:"default",onClick:o,disabled:!i,children:"Save Preference"})]})]})})}const aPt=()=>{const{showTooltip:e,saveAll:t,isSaving:n,unsavedChangesCount:r}=nPt(),{hasEditor:i,editorName:a,isLoading:o,showPreferenceDialog:s,setShowPreferenceDialog:l,availableEditors:c,savePreference:u,openInEditor:d}=rPt();return p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:"sticky bottom-0 h-12 border-t bg-neutral-50 items-center flex px-2 gap-x-2",children:[p.jsx(pI,{open:!!e,content:e??"",children:p.jsx(Ke,{variant:r>0||n?"default":"ghost",size:"xs","data-test":"save",disabled:n,onClick:async()=>{await t()},children:p.jsxs(Sb,{className:"flex items-center gap-1 text-xs relative",loading:n,children:["Save",p.jsx("span",{className:r>0?"text-white":"text-gray-400",children:"[⌘+S]"})]})})}),!o&&p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"h-6 w-px bg-gray-300"}),p.jsx(pI,{content:i?`Open in ${a}`:"Choose editor to open files",children:p.jsxs(Ke,{variant:"ghost",size:"xs",onClick:d,className:"flex items-center gap-1",children:[p.jsx(yae,{size:14}),p.jsx("span",{className:"text-xs",children:"Open in Editor"})]})})]})]}),p.jsx(iPt,{open:s,editors:c,onSelect:u,onCancel:()=>l(!1)})]})};function oPt(){return p.jsxs("div",{className:"flex-1 overflow-hidden flex flex-col",children:[p.jsx("div",{className:"flex-1 overflow-hidden",children:p.jsx(X$t,{})}),p.jsx(aPt,{})]})}function Xl(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function sPt(e,t=[]){let n=[];function r(a,o){const s=x.createContext(o),l=n.length;n=[...n,o];const c=d=>{var y;const{scope:f,children:h,...v}=d,m=((y=f==null?void 0:f[e])==null?void 0:y[l])||s,g=x.useMemo(()=>v,Object.values(v));return p.jsx(m.Provider,{value:g,children:h})};c.displayName=a+"Provider";function u(d,f){var m;const h=((m=f==null?void 0:f[e])==null?void 0:m[l])||s,v=x.useContext(h);if(v)return v;if(o!==void 0)return o;throw new Error(`\`${d}\` must be used within \`${a}\``)}return[c,u]}const i=()=>{const a=n.map(o=>x.createContext(o));return function(s){const l=(s==null?void 0:s[e])||a;return x.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,lPt(i,...t)]}function lPt(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const o=r.reduce((s,{useScope:l,scopeName:c})=>{const d=l(a)[`__scope${c}`];return{...s,...d}},{});return x.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}function t1e(e,t=[]){let n=[];function r(a,o){const s=x.createContext(o),l=n.length;n=[...n,o];function c(d){const{scope:f,children:h,...v}=d,m=(f==null?void 0:f[e][l])||s,g=x.useMemo(()=>v,Object.values(v));return p.jsx(m.Provider,{value:g,children:h})}function u(d,f){const h=(f==null?void 0:f[e][l])||s,v=x.useContext(h);if(v)return v;if(o!==void 0)return o;throw new Error(`\`${d}\` must be used within \`${a}\``)}return c.displayName=a+"Provider",[c,u]}const i=()=>{const a=n.map(o=>x.createContext(o));return function(s){const l=(s==null?void 0:s[e])||a;return x.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,cPt(i,...t)]}function cPt(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const o=r.reduce((s,{useScope:l,scopeName:c})=>{const d=l(a)[`__scope${c}`];return{...s,...d}},{});return x.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}function uPt(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function n1e(...e){return t=>e.forEach(n=>uPt(n,t))}function FE(...e){return x.useCallback(n1e(...e),e)}var qE=x.forwardRef((e,t)=>{const{children:n,...r}=e,i=x.Children.toArray(n),a=i.find(fPt);if(a){const o=a.props.children,s=i.map(l=>l===a?x.Children.count(o)>1?x.Children.only(null):x.isValidElement(o)?o.props.children:null:l);return p.jsx(W4,{...r,ref:t,children:x.isValidElement(o)?x.cloneElement(o,void 0,s):null})}return p.jsx(W4,{...r,ref:t,children:n})});qE.displayName="Slot";var W4=x.forwardRef((e,t)=>{const{children:n,...r}=e;if(x.isValidElement(n)){const i=pPt(n);return x.cloneElement(n,{...hPt(r,n.props),ref:t?n1e(t,i):i})}return x.Children.count(n)>1?x.Children.only(null):null});W4.displayName="SlotClone";var dPt=({children:e})=>p.jsx(p.Fragment,{children:e});function fPt(e){return x.isValidElement(e)&&e.type===dPt}function hPt(e,t){const n={...t};for(const r in t){const i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...s)=>{a(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...a}:r==="className"&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function pPt(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function mPt(e){const t=e+"CollectionProvider",[n,r]=t1e(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=h=>{const{scope:v,children:m}=h,g=oe.useRef(null),y=oe.useRef(new Map).current;return p.jsx(i,{scope:v,itemMap:y,collectionRef:g,children:m})};o.displayName=t;const s=e+"CollectionSlot",l=oe.forwardRef((h,v)=>{const{scope:m,children:g}=h,y=a(s,m),b=FE(v,y.collectionRef);return p.jsx(qE,{ref:b,children:g})});l.displayName=s;const c=e+"CollectionItemSlot",u="data-radix-collection-item",d=oe.forwardRef((h,v)=>{const{scope:m,children:g,...y}=h,b=oe.useRef(null),w=FE(v,b),S=a(c,m);return oe.useEffect(()=>(S.itemMap.set(b,{ref:b,...y}),()=>void S.itemMap.delete(b))),p.jsx(qE,{[u]:"",ref:w,children:g})});d.displayName=c;function f(h){const v=a(e+"CollectionConsumer",h);return oe.useCallback(()=>{const g=v.collectionRef.current;if(!g)return[];const y=Array.from(g.querySelectorAll(`[${u}]`));return Array.from(v.itemMap.values()).sort((S,E)=>y.indexOf(S.ref.current)-y.indexOf(E.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:o,Slot:l,ItemSlot:d},f,r]}var G4=globalThis!=null&&globalThis.document?x.useLayoutEffect:()=>{},gPt=zs.useId||(()=>{}),vPt=0;function r1e(e){const[t,n]=x.useState(gPt());return G4(()=>{n(r=>r??String(vPt++))},[e]),e||(t?`radix-${t}`:"")}var yPt=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],lg=yPt.reduce((e,t)=>{const n=x.forwardRef((r,i)=>{const{asChild:a,...o}=r,s=a?qE:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(s,{...o,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function l5(e){const t=x.useRef(e);return x.useEffect(()=>{t.current=e}),x.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function i1e({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=bPt({defaultProp:t,onChange:n}),a=e!==void 0,o=a?e:r,s=l5(n),l=x.useCallback(c=>{if(a){const d=typeof c=="function"?c(e):c;d!==e&&s(d)}else i(c)},[a,e,i,s]);return[o,l]}function bPt({defaultProp:e,onChange:t}){const n=x.useState(e),[r]=n,i=x.useRef(r),a=l5(t);return x.useEffect(()=>{i.current!==r&&(a(r),i.current=r)},[r,i,a]),n}var xPt=x.createContext(void 0);function a1e(e){const t=x.useContext(xPt);return e||t||"ltr"}var WN="rovingFocusGroup.onEntryFocus",wPt={bubbles:!1,cancelable:!0},PP="RovingFocusGroup",[K4,o1e,_Pt]=mPt(PP),[SPt,s1e]=t1e(PP,[_Pt]),[EPt,$Pt]=SPt(PP),l1e=x.forwardRef((e,t)=>p.jsx(K4.Provider,{scope:e.__scopeRovingFocusGroup,children:p.jsx(K4.Slot,{scope:e.__scopeRovingFocusGroup,children:p.jsx(PPt,{...e,ref:t})})}));l1e.displayName=PP;var PPt=x.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:c,preventScrollOnEntryFocus:u=!1,...d}=e,f=x.useRef(null),h=FE(t,f),v=a1e(a),[m=null,g]=i1e({prop:o,defaultProp:s,onChange:l}),[y,b]=x.useState(!1),w=l5(c),S=o1e(n),E=x.useRef(!1),[_,$]=x.useState(0);return x.useEffect(()=>{const P=f.current;if(P)return P.addEventListener(WN,w),()=>P.removeEventListener(WN,w)},[w]),p.jsx(EPt,{scope:n,orientation:r,dir:v,loop:i,currentTabStopId:m,onItemFocus:x.useCallback(P=>g(P),[g]),onItemShiftTab:x.useCallback(()=>b(!0),[]),onFocusableItemAdd:x.useCallback(()=>$(P=>P+1),[]),onFocusableItemRemove:x.useCallback(()=>$(P=>P-1),[]),children:p.jsx(lg.div,{tabIndex:y||_===0?-1:0,"data-orientation":r,...d,ref:h,style:{outline:"none",...e.style},onMouseDown:Xl(e.onMouseDown,()=>{E.current=!0}),onFocus:Xl(e.onFocus,P=>{const A=!E.current;if(P.target===P.currentTarget&&A&&!y){const O=new CustomEvent(WN,wPt);if(P.currentTarget.dispatchEvent(O),!O.defaultPrevented){const k=S().filter(G=>G.focusable),N=k.find(G=>G.active),F=k.find(G=>G.id===m),H=[N,F,...k].filter(Boolean).map(G=>G.ref.current);d1e(H,u)}}E.current=!1}),onBlur:Xl(e.onBlur,()=>b(!1))})})}),c1e="RovingFocusGroupItem",u1e=x.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,...o}=e,s=r1e(),l=a||s,c=$Pt(c1e,n),u=c.currentTabStopId===l,d=o1e(n),{onFocusableItemAdd:f,onFocusableItemRemove:h}=c;return x.useEffect(()=>{if(r)return f(),()=>h()},[r,f,h]),p.jsx(K4.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:p.jsx(lg.span,{tabIndex:u?0:-1,"data-orientation":c.orientation,...o,ref:t,onMouseDown:Xl(e.onMouseDown,v=>{r?c.onItemFocus(l):v.preventDefault()}),onFocus:Xl(e.onFocus,()=>c.onItemFocus(l)),onKeyDown:Xl(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){c.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const m=TPt(v,c.orientation,c.dir);if(m!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let y=d().filter(b=>b.focusable).map(b=>b.ref.current);if(m==="last")y.reverse();else if(m==="prev"||m==="next"){m==="prev"&&y.reverse();const b=y.indexOf(v.currentTarget);y=c.loop?OPt(y,b+1):y.slice(b+1)}setTimeout(()=>d1e(y))}})})})});u1e.displayName=c1e;var CPt={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function APt(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function TPt(e,t,n){const r=APt(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return CPt[r]}function d1e(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function OPt(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var RPt=l1e,jPt=u1e;function kPt(e,t){return x.useReducer((n,r)=>t[n][r]??n,e)}var f1e=e=>{const{present:t,children:n}=e,r=NPt(t),i=typeof n=="function"?n({present:r.isPresent}):x.Children.only(n),a=FE(r.ref,IPt(i));return typeof n=="function"||r.isPresent?x.cloneElement(i,{ref:a}):null};f1e.displayName="Presence";function NPt(e){const[t,n]=x.useState(),r=x.useRef({}),i=x.useRef(e),a=x.useRef("none"),o=e?"mounted":"unmounted",[s,l]=kPt(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return x.useEffect(()=>{const c=zw(r.current);a.current=s==="mounted"?c:"none"},[s]),G4(()=>{const c=r.current,u=i.current;if(u!==e){const f=a.current,h=zw(c);e?l("MOUNT"):h==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&f!==h?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),G4(()=>{if(t){let c;const u=t.ownerDocument.defaultView??window,d=h=>{const m=zw(r.current).includes(h.animationName);if(h.target===t&&m&&(l("ANIMATION_END"),!i.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},f=h=>{h.target===t&&(a.current=zw(r.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:x.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function zw(e){return(e==null?void 0:e.animationName)||"none"}function IPt(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var c5="Tabs",[MPt,ACt]=sPt(c5,[s1e]),h1e=s1e(),[DPt,u5]=MPt(c5),p1e=x.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:i,defaultValue:a,orientation:o="horizontal",dir:s,activationMode:l="automatic",...c}=e,u=a1e(s),[d,f]=i1e({prop:r,onChange:i,defaultProp:a});return p.jsx(DPt,{scope:n,baseId:r1e(),value:d,onValueChange:f,orientation:o,dir:u,activationMode:l,children:p.jsx(lg.div,{dir:u,"data-orientation":o,...c,ref:t})})});p1e.displayName=c5;var m1e="TabsList",g1e=x.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...i}=e,a=u5(m1e,n),o=h1e(n);return p.jsx(RPt,{asChild:!0,...o,orientation:a.orientation,dir:a.dir,loop:r,children:p.jsx(lg.div,{role:"tablist","aria-orientation":a.orientation,...i,ref:t})})});g1e.displayName=m1e;var v1e="TabsTrigger",y1e=x.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:i=!1,...a}=e,o=u5(v1e,n),s=h1e(n),l=w1e(o.baseId,r),c=_1e(o.baseId,r),u=r===o.value;return p.jsx(jPt,{asChild:!0,...s,focusable:!i,active:u,children:p.jsx(lg.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":c,"data-state":u?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:l,...a,ref:t,onMouseDown:Xl(e.onMouseDown,d=>{!i&&d.button===0&&d.ctrlKey===!1?o.onValueChange(r):d.preventDefault()}),onKeyDown:Xl(e.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&o.onValueChange(r)}),onFocus:Xl(e.onFocus,()=>{const d=o.activationMode!=="manual";!u&&!i&&d&&o.onValueChange(r)})})})});y1e.displayName=v1e;var b1e="TabsContent",x1e=x.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:i,children:a,...o}=e,s=u5(b1e,n),l=w1e(s.baseId,r),c=_1e(s.baseId,r),u=r===s.value,d=x.useRef(u);return x.useEffect(()=>{const f=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(f)},[]),p.jsx(f1e,{present:i||u,children:({present:f})=>p.jsx(lg.div,{"data-state":u?"active":"inactive","data-orientation":s.orientation,role:"tabpanel","aria-labelledby":l,hidden:!f,id:c,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:d.current?"0s":void 0},children:f&&a})})});x1e.displayName=b1e;function w1e(e,t){return`${e}-trigger-${t}`}function _1e(e,t){return`${e}-content-${t}`}var LPt=p1e,FPt=g1e,qPt=y1e,UPt=x1e;const One=[{label:"MCP",value:"mcp",items:[{title:"Installing the MCP Inspector",description:"Set up the MCP Inspector locally and start testing your MCP server with ease.",icon:Kve,link:{href:{web:"https://zuplo.com/docs/handlers/mcp-server#mcp-inspector",local:"https://zuplo.com/docs/handlers/mcp-server#mcp-inspector"},text:"Get Started"}},{title:"MCP Quickstart",description:"Learn how to start using Model Context Protocol to pass context into any model call.",icon:Qve,link:{href:{web:"https://zuplo.com/docs/articles/mcp-quickstart",local:"https://zuplo.com/docs/articles/mcp-quickstart"},text:"Get Started"}},{title:"Using OAuth with MCP",description:"Authenticate users securely by integrating OAuth flows into your Model Context Protocol setup.",icon:Xve,link:{href:{web:"https://zuplo.com/docs/articles/configuring-auth0-for-mcp-auth",local:"https://zuplo.com/docs/articles/configuring-auth0-for-mcp-auth"},text:"Get Started"}}]},{label:"Rate Limiting",value:"rate-limiting",items:[{title:"Adding Rate Limiting",description:"Control traffic and protect your APIs by setting up flexible, customizable rate limits.",icon:Wve,link:{href:{web:"https://zuplo.com/docs/articles/step-2-add-rate-limiting",local:"https://zuplo.com/docs/articles/step-2-add-rate-limiting-local"},text:"Get Started"}},{title:"Complex Rate Limiting",description:"Implement advanced rules to rate limit by user, IP, plan, or custom logic.",icon:Gve,link:{href:{web:"https://zuplo.com/docs/policies/complex-rate-limit-inbound",local:"https://zuplo.com/docs/policies/complex-rate-limit-inbound"},text:"Get Started"}},{title:"Dynamic Rate Limits",description:"Set rate limits that adapt in real-time based on headers, tokens, or user context.",icon:Yve,link:{href:{web:"https://zuplo.com/examples/dynamic-rate-limits",local:"https://zuplo.com/examples/dynamic-rate-limits"},text:"Get Started"}}]},{label:"Authentication",value:"authentication",items:[{title:"Using API Keys",description:"Authenticate and manage access to your APIs with simple, secure API key workflows.",icon:e0e,link:{href:{web:"https://zuplo.com/docs/policies/api-key-inbound",local:"https://zuplo.com/docs/policies/api-key-inbound"},text:"Get Started"}},{title:"Using Auth0",description:"Connect your APIs to Auth0 for streamlined authentication and powerful identity management.",icon:t0e,link:{href:{web:"https://zuplo.com/docs/policies/auth0-jwt-auth-inbound",local:"https://zuplo.com/docs/policies/auth0-jwt-auth-inbound"},text:"Get Started"}},{title:"Using Okta",description:"Integrate Okta with your APIs to enable secure, enterprise-grade authentication and authorization.",icon:Zve,link:{href:{web:"https://zuplo.com/docs/policies/okta-jwt-auth-inbound",local:"https://zuplo.com/docs/policies/okta-jwt-auth-inbound"},text:"Get Started"}}]},{label:"Dev Portal",value:"dev-portal",items:[{title:"Setup your API Reference",description:"Instantly generate an interactive reference by importing your OpenAPI spec—no manual work needed.",icon:Bve,link:{href:{web:"https://zuplo.com/docs/dev-portal/zudoku/configuration/api-reference",local:"https://zuplo.com/docs/dev-portal/zudoku/configuration/api-reference"},text:"Get Started"}},{title:"Adding Authentication",description:"Guide users through secure API access by adding auth flows to your developer portal.",icon:Jve,link:{href:{web:"https://zuplo.com/docs/dev-portal/zudoku/configuration/authentication",local:"https://zuplo.com/docs/dev-portal/zudoku/configuration/authentication"},text:"Get Started"}},{title:"Creating API Catalogs",description:"Organize your APIs into searchable, user-friendly catalogs for easier discovery and onboarding.",icon:Hve,link:{href:{web:"https://zuplo.com/docs/dev-portal/zudoku/guides/using-multiple-apis",local:"https://zuplo.com/docs/dev-portal/zudoku/guides/using-multiple-apis"},text:"Get Started"}}]}],VPt=({mode:e="web"})=>p.jsxs(LPt,{defaultValue:"mcp",className:"flex flex-col my-8",children:[p.jsx(FPt,{className:"flex gap-8 border-b border-gray-200 mb-8 ml-1",children:One.map(t=>p.jsx(qPt,{value:t.value,className:"relative py-2 text-sm font-medium text-gray-600 hover:text-gray-900 data-[state=active]:text-gray-900 border-b-2 border-transparent data-[state=active]:border-black transition-colors",children:t.label},t.value))}),One.map(t=>p.jsx(UPt,{value:t.value,className:"grid grid-cols-3 gap-4",children:t.items.map(n=>p.jsxs(Xn,{className:"flex flex-col gap-2 text-muted-foreground text-gray-700 ",children:[p.jsxs(ts,{className:"flex gap-2",children:[p.jsx(n.icon,{size:24,weight:"duotone",className:"[&_[opacity='0.2']]:fill-pink-500"}),p.jsx($o,{className:"gap-x-2 text-lg font-semibold",children:n.title})]}),p.jsx(qs,{className:"text-md",children:n.description}),p.jsx(T$,{className:"flex-1 items-end border-0 mb-4",children:p.jsx(Ke,{variant:"white",asChild:!0,size:"sm",className:"w-full",children:p.jsx(Zn,{href:n.link.href[e],variant:"ghost",children:n.link.text})})})]},n.title))},t.value))]}),zPt=({title:e,url:t,className:n})=>{const{copyToClipboard:r,state:i}=g2(t??"",{showValue:!1});return p.jsxs(Xn,{className:Ie("col-span-full md:col-span-5 py-2 px-4 flex items-center text-sm gap-x-2",n),children:[p.jsx("div",{className:"bg-green-600 rounded-full w-4 h-4 p-0.5",children:p.jsx(ia,{className:"text-white",size:12})}),p.jsx("span",{className:"font-semibold",children:e}),p.jsx("div",{className:"flex-1",children:t?p.jsx(Zn,{href:t,className:"ml-2 font-medium line-clamp-1 break-all",children:t}):p.jsx(Pr,{className:"ml-2 h-4 w-8/12"})}),p.jsx(Ke,{variant:"secondary",size:"xs",onClick:r,children:p.jsxs(Sb,{loading:i==="copied",alternative:p.jsx(ia,{size:12,className:"text-green-600",strokeWidth:3}),className:"flex",children:[p.jsx(l2,{size:16,className:"mr-2",strokeWidth:1.5}),"Copy URL"]})})]})},BPt="/static/img/hero-CA-QKTbm.svg",HPt=()=>{const{account:e,project:t}=In(["account","project"]),{logEvent:n}=Xt();return p.jsxs("div",{className:"flex flex-col space-y-4",children:[p.jsx("h2",{className:"text-lg font-semibold",children:"Support"}),p.jsx(Xn,{offset:"md",className:"p-6",children:p.jsxs("div",{className:"flex w-full gap-4 items-center",children:[p.jsx("div",{className:"rounded-lg bg-gray-100 w-20 h-20 grid place-items-center",children:p.jsx(pq,{size:38,strokeWidth:1.6,fill:"#FF99E5",fillOpacity:.2})}),p.jsxs("div",{className:"flex-1",children:[p.jsx($o,{className:"text-base",children:"Talk to an API expert"}),p.jsx(dp,{className:"text-md",children:"Get a free technical consultation with one of our API experts."})]}),p.jsx(Ke,{onClick:()=>{n("getting-started-book-a-meeting-clicked",{account:e.name}),window.open(uq,"_blank")},size:"sm",className:"min-w-40",variant:"secondary",asChild:!0,children:p.jsxs(Zn,{href:uq,variant:"ghost",children:[p.jsx(LPe,{className:"mr-2",size:16}),"Book a Meeting"]})})]})}),p.jsx(Xn,{offset:"md",className:"p-6",children:p.jsxs("div",{className:"flex w-full gap-4 items-center",children:[p.jsx("div",{className:"rounded-lg bg-gray-100 w-20 h-20 grid place-items-center",children:p.jsx(hq,{size:38,strokeWidth:1.6,fill:"#FF99E5",fillOpacity:.2})}),p.jsxs("div",{className:"flex-1",children:[p.jsx($o,{className:"text-base",children:"Feeling Stuck?"}),p.jsx(dp,{className:"text-md",children:"Check out our various support options to get help with your API"})]}),p.jsx(Ke,{size:"sm",className:"min-w-40",variant:"secondary",asChild:!0,children:p.jsxs(zy,{to:Mp(gm.Support,{account:e.name}),children:[p.jsx(hq,{className:"h-4 w-4 mr-2 mb-0.5"}),"Get Help"]})})]})}),p.jsx(Xn,{offset:"md",className:"p-6",children:p.jsxs("div",{className:"flex w-full gap-4 items-center",children:[p.jsx("div",{className:"rounded-lg bg-gray-100 w-20 h-20 grid place-items-center",children:p.jsx(pq,{size:38,strokeWidth:1.6,fill:"#FF99E5",fillOpacity:.2})}),p.jsxs("div",{className:"flex-1",children:[p.jsx($o,{className:"text-base",children:"Join the Zuplo API Community"}),p.jsx(dp,{className:"text-md",children:"Come chat with fellow Zuplo users and the Zuplo team in our Discord channel."})]}),p.jsx(Ke,{onClick:()=>{n("getting-started-join-discord-clicked",{account:e.name,project:t.name}),window.open(KI,"_blank")},size:"sm",className:"min-w-40",variant:"secondary",asChild:!0,children:p.jsxs(Zn,{href:KI,variant:"ghost",children:[p.jsx(sAe,{className:"mr-2",size:16}),"Join Us"]})})]})})]})},WPt={EDIT:"/dev/project/local/edit"},GPt=()=>p.jsxs("div",{children:[p.jsxs(ts,{children:[p.jsx($o,{className:"text-base",children:"Welcome to your Gateway"}),p.jsx(dp,{className:"text-base",children:"You can get started by configuring your routes and setting up policies in our visual Route Designer."})]}),p.jsxs(T$,{className:"border-0 gap-2 py-6",children:[p.jsx(Ke,{asChild:!0,size:"sm",className:"gap-2 px-8",variant:"outline-primary",children:p.jsxs(zy,{to:WPt.EDIT,children:[p.jsx(ZI,{size:16}),"Start Building"]})}),p.jsx(Ke,{className:"gap-x-2 px-8",variant:"secondary",size:"sm",asChild:!0,children:p.jsxs(Zn,{variant:"ghost",href:"https://zuplo.com/docs/articles/step-1-setup-basic-gateway",children:[p.jsx(Ly,{size:16})," Quickstart"]})})]})]}),KPt=()=>{const[e,t]=x.useState(!1);return p.jsxs(p.Fragment,{children:[p.jsxs(Xn,{className:"col-span-full md:col-span-3 py-2 px-4 flex items-center text-sm gap-x-2",children:[p.jsx("div",{className:"rounded-full w-4 h-4 p-0.5 bg-gray-500",children:p.jsx(V6,{className:"text-white",size:12})}),p.jsx("span",{className:"font-semibold flex-1 line-clamp-1 break-all",children:"Developer Portal"}),p.jsxs(Ke,{variant:"secondary",size:"xs",onClick:()=>t(!0),children:[p.jsx(Ly,{size:16,strokeWidth:1.5,className:"mr-2"}),"Open Portal"]})]}),p.jsx(Yu,{open:e,onOpenChange:t,children:p.jsxs(Zs,{children:[p.jsxs(Ou,{children:[p.jsx(Ys,{children:"Run Developer Portal Locally"}),p.jsx(Ru,{children:"To view and edit your API documentation, you need to run the developer portal locally."})]}),p.jsxs("div",{className:"space-y-4 py-4",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx("p",{className:"text-sm font-semibold",children:"Steps to run the portal:"}),p.jsxs("ol",{className:"list-decimal list-inside space-y-2 text-sm text-gray-600",children:[p.jsxs("li",{children:["Open a terminal in the"," ",p.jsx("code",{className:"bg-gray-100 px-1 rounded",children:"/docs"})," folder of your Zuplo project"]}),p.jsxs("li",{children:["Run"," ",p.jsx("code",{className:"bg-gray-100 px-1 rounded",children:"npm run dev"})]}),p.jsx("li",{children:"The portal will open in your browser automatically"})]})]}),p.jsx("div",{className:"bg-blue-50 border border-blue-200 rounded-md p-3",children:p.jsxs("p",{className:"text-xs text-blue-800",children:[p.jsx("strong",{children:"Tip:"})," The developer portal will automatically reload when you make changes to your OpenAPI documentation."]})})]}),p.jsxs(rc,{children:[p.jsx(Ke,{variant:"secondary",onClick:()=>t(!1),children:"Close"}),p.jsx(Ke,{asChild:!0,variant:"outline",children:p.jsx(Zn,{href:"https://zuplo.com/docs/dev-portal",children:"View Documentation"})})]})]})})]})},ZPt=()=>{const{project:e,environment:t}=In(),n=Dp(t);return p.jsx("div",{className:"bg-neutral-50 h-full overflow-y-auto",children:p.jsxs("div",{className:"pt-4 max-w-6xl pb-16 m-auto px-5 flex flex-col gap-4",children:[p.jsx("h1",{className:"text-2xl font-semibold",children:e.name}),p.jsxs("div",{className:"grid grid-cols-8 gap-3",children:[p.jsx(zPt,{title:"Gateway",url:n}),p.jsx(KPt,{})]}),p.jsxs(Xn,{className:"relative grid md:grid-cols-2 overflow-hidden min-h-[220px]",children:[p.jsx(GPt,{}),p.jsx("img",{src:BPt,alt:e.name,className:"self-end w-full hidden md:block object-cover object-left h-full"})]}),p.jsx(VPt,{mode:"local"}),p.jsx(HPt,{})]})})},YPt=NEe(MOe),XPt=YPt(fOe(p.jsxs(Pd,{path:"/",element:p.jsx(s8,{}),errorElement:p.jsx(dRe,{id:"root"}),children:[p.jsx(Pd,{path:"/:account/:project/:environment",element:p.jsx(PLe,{}),children:p.jsxs(Pd,{element:p.jsx(R4e,{}),children:[p.jsx(Pd,{index:!0,element:p.jsx(ZPt,{})}),p.jsx(Pd,{path:"edit",element:p.jsx(oPt,{})})]})}),p.jsx(Pd,{path:"*",element:p.jsx(fRe,{})})]}))),QPt=({children:e})=>{const[t,n]=x.useState(()=>qq()),[r,i]=x.useState(!0);return x.useEffect(()=>{(async()=>{try{const s=await(await h2("/deployments/local")).json();n(qq(s.deploymentVersion))}catch(o){un.error("Failed to fetch deployment info:",o)}finally{i(!1)}})()},[]),r?null:p.jsx(sRe,{children:p.jsx(noe.Provider,{value:t,children:p.jsx(nRe,{children:e})})})},TCt=XOe({router:XPt,additionalProviders:QPt});export{TCt as default};
2162
- //# sourceMappingURL=App-DUom8Fbi.js.map
2162
+ //# sourceMappingURL=App-BfMl6jhU.js.map